From ddcaf3d0db27dba1b376e8b866d06aef4de0de07 Mon Sep 17 00:00:00 2001 From: Klaus Holst Jacobsen <48069914+klausholstjacobsen@users.noreply.github.com> Date: Thu, 20 Jul 2023 14:07:25 +0200 Subject: [PATCH 001/637] (#18525) Re-added support for gtest/1.8.1 as this is the latest version supported by qnx 7.0 --- recipes/gtest/all/conandata.yml | 7 +++++++ recipes/gtest/all/patches/gtest-1.8.1.patch | 13 +++++++++++++ recipes/gtest/config.yml | 2 ++ 3 files changed, 22 insertions(+) create mode 100755 recipes/gtest/all/patches/gtest-1.8.1.patch diff --git a/recipes/gtest/all/conandata.yml b/recipes/gtest/all/conandata.yml index 70ff2819b4d9f..1634a1e79e6fd 100644 --- a/recipes/gtest/all/conandata.yml +++ b/recipes/gtest/all/conandata.yml @@ -8,6 +8,9 @@ sources: "1.10.0": url: "https://github.com/google/googletest/archive/release-1.10.0.tar.gz" sha256: "9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb" + "1.8.1": + url: "https://github.com/google/googletest/archive/release-1.8.1.tar.gz" + sha256: "9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c" patches: "1.10.0": - patch_file: "patches/gtest-1.10.0.patch" @@ -17,3 +20,7 @@ patches: patch_description: "prevent compiler from complaining while compiling" patch_type: "bugfix" patch_source: "https://github.com/google/googletest/pull/2507" + "1.8.1": + - patch_file: "patches/gtest-1.8.1.patch" + patch_description: "add CUSTOM_DEBUG_POSTFIX option" + patch_type: "conan" diff --git a/recipes/gtest/all/patches/gtest-1.8.1.patch b/recipes/gtest/all/patches/gtest-1.8.1.patch new file mode 100755 index 0000000000000..838ab42c89f02 --- /dev/null +++ b/recipes/gtest/all/patches/gtest-1.8.1.patch @@ -0,0 +1,13 @@ +diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake +index 8c1f9ba..2203d3c 100644 +--- a/googletest/cmake/internal_utils.cmake ++++ b/googletest/cmake/internal_utils.cmake +@@ -166,7 +166,7 @@ function(cxx_library_with_type name type cxx_flags) + # Generate debug library name with a postfix. + set_target_properties(${name} + PROPERTIES +- DEBUG_POSTFIX "d") ++ DEBUG_POSTFIX "${CUSTOM_DEBUG_POSTFIX}") + if (BUILD_SHARED_LIBS OR type STREQUAL "SHARED") + set_target_properties(${name} + PROPERTIES diff --git a/recipes/gtest/config.yml b/recipes/gtest/config.yml index 6df56e900d95a..ee070419b09c3 100644 --- a/recipes/gtest/config.yml +++ b/recipes/gtest/config.yml @@ -5,3 +5,5 @@ versions: folder: all "1.10.0": folder: all + "1.8.1": + folder: all From 5ef08656189412fe33184f70b92dc452607d5f9f Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 20 Jul 2023 15:52:52 +0300 Subject: [PATCH 002/637] (#18700) forestdb: migrate to Conan v2 --- recipes/forestdb/all/CMakeLists.txt | 7 -- recipes/forestdb/all/conandata.yml | 1 - recipes/forestdb/all/conanfile.py | 83 ++++++++++--------- .../forestdb/all/test_package/CMakeLists.txt | 5 +- .../forestdb/all/test_package/conanfile.py | 22 +++-- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../forestdb/all/test_v1_package/conanfile.py | 18 ++++ 7 files changed, 87 insertions(+), 57 deletions(-) delete mode 100644 recipes/forestdb/all/CMakeLists.txt create mode 100644 recipes/forestdb/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/forestdb/all/test_v1_package/conanfile.py diff --git a/recipes/forestdb/all/CMakeLists.txt b/recipes/forestdb/all/CMakeLists.txt deleted file mode 100644 index 78b537ac50f88..0000000000000 --- a/recipes/forestdb/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.10) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/forestdb/all/conandata.yml b/recipes/forestdb/all/conandata.yml index 935f0559af335..e15581c6eba7e 100644 --- a/recipes/forestdb/all/conandata.yml +++ b/recipes/forestdb/all/conandata.yml @@ -5,4 +5,3 @@ sources: patches: "cci.20220727": - patch_file: "patches/0001-proper-cxx-std-flag.patch" - base_path: "source_subfolder" diff --git a/recipes/forestdb/all/conanfile.py b/recipes/forestdb/all/conanfile.py index 526ab2f1f2069..fd380e2335813 100644 --- a/recipes/forestdb/all/conanfile.py +++ b/recipes/forestdb/all/conanfile.py @@ -1,8 +1,13 @@ import os -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration -required_conan_version = ">=1.33.0" +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 apply_conandata_patches, copy, export_conandata_patches, get + +required_conan_version = ">=1.53.0" + class ForestDBConan(ConanFile): name = "forestdb" @@ -11,12 +16,13 @@ class ForestDBConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/ForestDB-KVStore/forestdb" topics = ("kv-store", "mvcc", "wal") - settings = "os", "arch", "compiler", "build_type" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], - "with_snappy": [True, False] + "with_snappy": [True, False], } default_options = { "shared": False, @@ -24,64 +30,65 @@ class ForestDBConan(ConanFile): "with_snappy": False, } - generators = "cmake" + def export_sources(self): + export_conandata_patches(self) - @property - def _source_subfolder(self): - return "source_subfolder" + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") - 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 layout(self): + cmake_layout(self, src_folder="src") def requirements(self): if self.options.with_snappy: - self.requires("snappy/1.1.9") + self.requires("snappy/1.1.10") def validate(self): if self.settings.os == "Windows": raise ConanInvalidConfiguration("Windows Builds Unsupported") if self.settings.compiler == "clang": - if self.settings.compiler.libcxx == "libc++" and self.options.shared == False: + if self.settings.compiler.libcxx == "libc++" and not self.options.shared: raise ConanInvalidConfiguration("LibC++ Static Builds Unsupported") if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, 11) - - def configure(self): - if self.options.shared: - del self.options.fPIC + check_min_cppstd(self, 11) def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = CMake(self) - cmake.definitions["SNAPPY_OPTION"] = "Disable" + def generate(self): + tc = CMakeToolchain(self) + tc.variables["SNAPPY_OPTION"] = "Disable" if self.options.with_snappy: - cmake.definitions["SNAPPY_OPTION"] = "Enable" - cmake.configure() + tc.variables["SNAPPY_OPTION"] = "Enable" + tc.generate() + tc = CMakeDeps(self) + tc.generate() + + def build(self): + apply_conandata_patches(self) lib_target = "forestdb" if not self.options.shared: lib_target = "static_lib" + cmake = CMake(self) + cmake.configure() cmake.build(target=lib_target) def package(self): - self.copy("LICENSE", dst="licenses/", src=self._source_subfolder ) + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) # Parent Build system does not support library type selection # and will only install the shared object from cmake; so we must # handpick our libraries. - self.copy("*.a*", dst="lib", src="lib") - self.copy("*.lib", dst="lib", src="lib") - self.copy("*.so*", dst="lib", src="lib", symlinks=True) - self.copy("*.dylib*", dst="lib", src="lib", symlinks=True) - self.copy("*.dll*", dst="lib", src="lib") - self.copy("*.h", dst="include", src=os.path.join(self._source_subfolder, "include"), keep_path=True) + for pattern in ["*.a*", "*.lib", "*.so*", "*.dylib*", "*.dll*"]: + copy(self, pattern, + dst=os.path.join(self.package_folder, "lib"), + src=self.build_folder) + copy(self, "*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + keep_path=True) def package_info(self): self.cpp_info.libs = ["forestdb"] - self.cpp_info.system_libs.extend(["pthread", "m", "dl"]) - if self.settings.os == "Linux": - self.cpp_info.system_libs.extend(["rt"]) + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["pthread", "m", "dl", "rt"] diff --git a/recipes/forestdb/all/test_package/CMakeLists.txt b/recipes/forestdb/all/test_package/CMakeLists.txt index 9912b39ed8da5..44b53f97f3be5 100644 --- a/recipes/forestdb/all/test_package/CMakeLists.txt +++ b/recipes/forestdb/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - find_package(forestdb REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/forestdb/all/test_package/conanfile.py b/recipes/forestdb/all/test_package/conanfile.py index 751b9d5bc7b9c..fae501d0afb9e 100644 --- a/recipes/forestdb/all/test_package/conanfile.py +++ b/recipes/forestdb/all/test_package/conanfile.py @@ -1,11 +1,19 @@ -from conans import ConanFile, CMake, tools, RunEnvironment -from conan.tools.build import cross_building +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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not 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/forestdb/all/test_v1_package/CMakeLists.txt b/recipes/forestdb/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/forestdb/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/forestdb/all/test_v1_package/conanfile.py b/recipes/forestdb/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..751b9d5bc7b9c --- /dev/null +++ b/recipes/forestdb/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +from conans import ConanFile, CMake, tools, RunEnvironment +from conan.tools.build import cross_building +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 8a8966a1ca011677f9389476050697c8d4a0a4e6 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 20 Jul 2023 22:34:34 +0900 Subject: [PATCH 003/637] (#18713) highway: add version 1.0.5 --- recipes/highway/all/conandata.yml | 3 +++ recipes/highway/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/highway/all/conandata.yml b/recipes/highway/all/conandata.yml index a0cdc4a6b1936..b0736b5e17350 100644 --- a/recipes/highway/all/conandata.yml +++ b/recipes/highway/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.5": + url: "https://github.com/google/highway/archive/1.0.5.tar.gz" + sha256: "99b7dad98b8fa088673b720151458fae698ae5df9154016e39de4afdc23bb927" "1.0.4": url: "https://github.com/google/highway/archive/1.0.4.tar.gz" sha256: "faccd343935c9e98afd1016e9d20e0b8b89d908508d1af958496f8c2d3004ac2" diff --git a/recipes/highway/config.yml b/recipes/highway/config.yml index d3cb7d334892f..48d515416587a 100644 --- a/recipes/highway/config.yml +++ b/recipes/highway/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.5": + folder: all "1.0.4": folder: all "1.0.3": From 9eabe0479c531211cb145f92393ca2eece8b900c Mon Sep 17 00:00:00 2001 From: whalien Date: Fri, 21 Jul 2023 00:11:27 +0800 Subject: [PATCH 004/637] (#18572) migrate tree-sitter to conan2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build: update to conan2 * build: bump version v0.20.8 * fix: fix lint errors * fix: fix forgotten of bump version 0.20.8 * fix: migrate del to rm_safe in configure * style: add newline to test-pacaage.c * fix: add conan v1 test * Add missing test_type, remove test_v1_package * Dont import every tool * Tooooooools * some fixes * Update recipes/tree-sitter/all/conanfile.py --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: czoido --- recipes/tree-sitter/all/CMakeLists.txt | 13 ++--- recipes/tree-sitter/all/conandata.yml | 3 ++ recipes/tree-sitter/all/conanfile.py | 47 ++++++++++--------- .../all/test_package/CMakeLists.txt | 3 -- .../tree-sitter/all/test_package/conanfile.py | 24 +++++++--- .../all/test_package/test_package.c | 9 ++-- recipes/tree-sitter/config.yml | 2 + 7 files changed, 56 insertions(+), 45 deletions(-) diff --git a/recipes/tree-sitter/all/CMakeLists.txt b/recipes/tree-sitter/all/CMakeLists.txt index 2d67e95f598b6..5f48ce80be466 100644 --- a/recipes/tree-sitter/all/CMakeLists.txt +++ b/recipes/tree-sitter/all/CMakeLists.txt @@ -1,21 +1,18 @@ cmake_minimum_required(VERSION 3.4) project(tree-sitter C) -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - # Use cmake script instead of Makefile to support MSVC + follow fPIC option -file(GLOB SOURCES RELATIVE "${PROJECT_SOURCE_DIR}" source_subfolder/lib/src/*.c) -list(REMOVE_ITEM SOURCES source_subfolder/lib/src/lib.c) +file(GLOB SOURCES RELATIVE "${PROJECT_SOURCE_DIR}" src/lib/src/*.c) +list(REMOVE_ITEM SOURCES src/lib/src/lib.c) -file(GLOB HEADERS source_subfolder/lib/include/tree_sitter/*.h) +file(GLOB HEADERS src/lib/include/tree_sitter/*.h) add_library(${PROJECT_NAME} ${SOURCES}) target_include_directories(${PROJECT_NAME} PRIVATE - $ - $ + $ + $ ) set_target_properties(${PROJECT_NAME} PROPERTIES diff --git a/recipes/tree-sitter/all/conandata.yml b/recipes/tree-sitter/all/conandata.yml index d0e08afc47bc9..43b71bcba5f69 100644 --- a/recipes/tree-sitter/all/conandata.yml +++ b/recipes/tree-sitter/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.20.8": + url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.20.8.tar.gz" + sha256: "6181ede0b7470bfca37e293e7d5dc1d16469b9485d13f13a605baec4a8b1f791" "0.20.6": url: "https://github.com/tree-sitter/tree-sitter/archive/v0.20.6.tar.gz" sha256: "4d37eaef8a402a385998ff9aca3e1043b4a3bba899bceeff27a7178e1165b9de" diff --git a/recipes/tree-sitter/all/conanfile.py b/recipes/tree-sitter/all/conanfile.py index 0ab58caffc58f..db16033332a0c 100644 --- a/recipes/tree-sitter/all/conanfile.py +++ b/recipes/tree-sitter/all/conanfile.py @@ -1,7 +1,10 @@ -from conans import CMake, ConanFile, tools -import functools +import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.files import get, copy + +required_conan_version = ">=1.53.0" class TreeSitterConan(ConanFile): @@ -11,6 +14,7 @@ class TreeSitterConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://tree-sitter.github.io/tree-sitter" license = "MIT" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "fPIC": [True, False], @@ -21,42 +25,39 @@ class TreeSitterConan(ConanFile): "shared": False, } - generators = "cmake" + generators = "CMakeToolchain" exports_sources = "CMakeLists.txt" - @property - def _source_subfolder(self): - return "source_subfolder" - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.cppstd - del self.settings.compiler.libcxx + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") - def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + def layout(self): + cmake_layout(self, src_folder="src") - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.configure() - return cmake + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): - 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("LICENSE", src=self._source_subfolder, dst="licenses") - cmake = self._configure_cmake() + copy( + self, + "LICENSE", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses"), + ) + cmake = CMake(self) cmake.install() def package_info(self): - self.cpp_info.names["pkg_config"] = "tree-sitter" self.cpp_info.libs = ["tree-sitter"] diff --git a/recipes/tree-sitter/all/test_package/CMakeLists.txt b/recipes/tree-sitter/all/test_package/CMakeLists.txt index 1f6c3d19b27a6..c0b053bd23a36 100644 --- a/recipes/tree-sitter/all/test_package/CMakeLists.txt +++ b/recipes/tree-sitter/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ cmake_minimum_required(VERSION 3.1) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(tree-sitter REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) diff --git a/recipes/tree-sitter/all/test_package/conanfile.py b/recipes/tree-sitter/all/test_package/conanfile.py index 38f4483872d47..a8ebbe0c45c36 100644 --- a/recipes/tree-sitter/all/test_package/conanfile.py +++ b/recipes/tree-sitter/all/test_package/conanfile.py @@ -1,17 +1,27 @@ -from conans import ConanFile, CMake, tools import os +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + +class TestPacakgeConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) def build(self): cmake = CMake(self) cmake.configure() cmake.build() + def layout(self): + cmake_layout(self) + 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/tree-sitter/all/test_package/test_package.c b/recipes/tree-sitter/all/test_package/test_package.c index 6ed5f62951a82..08527638921d3 100644 --- a/recipes/tree-sitter/all/test_package/test_package.c +++ b/recipes/tree-sitter/all/test_package/test_package.c @@ -1,8 +1,9 @@ #include -//More detailed example search at https://tree-sitter.github.io/tree-sitter/using-parsers#getting-started +// More detailed example search at +// https://tree-sitter.github.io/tree-sitter/using-parsers#getting-started int main() { - TSParser *parser = ts_parser_new(); - ts_parser_delete(parser); - return 0; + TSParser *parser = ts_parser_new(); + ts_parser_delete(parser); + return 0; } diff --git a/recipes/tree-sitter/config.yml b/recipes/tree-sitter/config.yml index be011f8935f2a..30720fc6f1016 100644 --- a/recipes/tree-sitter/config.yml +++ b/recipes/tree-sitter/config.yml @@ -1,4 +1,6 @@ versions: + "0.20.8": + folder: all "0.20.6": folder: all "0.20.0": From c4ddd3028ab28c4b6b8d81677568146d9a3995e1 Mon Sep 17 00:00:00 2001 From: Esteban Dugueperoux <43169544+EstebanDugueperoux2@users.noreply.github.com> Date: Thu, 20 Jul 2023 22:28:05 +0200 Subject: [PATCH 005/637] (#18762) Add dav1d/1.2.1 --- recipes/dav1d/all/conandata.yml | 3 +++ recipes/dav1d/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/dav1d/all/conandata.yml b/recipes/dav1d/all/conandata.yml index 960fc25c0f85a..7841b712b35c9 100644 --- a/recipes/dav1d/all/conandata.yml +++ b/recipes/dav1d/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.1": + url: "http://ftp.videolan.org/pub/videolan/dav1d/1.2.1/dav1d-1.2.1.tar.xz" + sha256: "4e33eb61ec54c768a16da0cf8fa0928b4c4593f5f804a3c887d4a21c318340b2" "1.1.0": url: "http://ftp.videolan.org/pub/videolan/dav1d/1.1.0/dav1d-1.1.0.tar.xz" sha256: "fb57aae7875f28c30fb3dbae4a3683d27e2f91dde09ce5c60c22cef9bc58dfd1" diff --git a/recipes/dav1d/config.yml b/recipes/dav1d/config.yml index 1807dabd0bac4..2ef77329e43db 100644 --- a/recipes/dav1d/config.yml +++ b/recipes/dav1d/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.1": + folder: "all" "1.1.0": folder: "all" "1.0.0": From ceb0d5cec463cca78d958d08cade4b29df211241 Mon Sep 17 00:00:00 2001 From: Esteban Dugueperoux <43169544+EstebanDugueperoux2@users.noreply.github.com> Date: Fri, 21 Jul 2023 00:10:17 +0200 Subject: [PATCH 006/637] (#18763) Add libaom-av1 release 3.6.1 --- recipes/libaom-av1/all/conandata.yml | 7 +++++++ recipes/libaom-av1/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/libaom-av1/all/conandata.yml b/recipes/libaom-av1/all/conandata.yml index 17b677e8b1c9a..bb3a5a205cc9f 100644 --- a/recipes/libaom-av1/all/conandata.yml +++ b/recipes/libaom-av1/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.6.1": + url: "https://storage.googleapis.com/aom-releases/libaom-3.6.1.tar.gz" + sha256: "42b862f58b3d00bd3902d2dc469526574f5b012e5b178e6a9652845a113d6887" "3.6.0": url: "https://storage.googleapis.com/aom-releases/libaom-3.6.0.tar.gz" sha256: "a4a6c0fab685da743b796662a928fcdf7ae60594edc306efb73e78a17ea6cde6" @@ -21,6 +24,10 @@ sources: url: "https://storage.googleapis.com/aom-releases/libaom-2.0.1.tar.gz" sha256: "a0cff299621e2ef885aba219c498fa39a7d9a7ddf47585a118fd66c64ad1b312" patches: + "3.6.1": + - patch_file: "patches/0001-3.4.0-fix-install.patch" + patch_type: conan + patch_description: Install just aom library without aom_static. "3.6.0": - patch_file: "patches/0001-3.4.0-fix-install.patch" patch_type: conan diff --git a/recipes/libaom-av1/config.yml b/recipes/libaom-av1/config.yml index 55199e7891956..2ac5e2242b2d4 100644 --- a/recipes/libaom-av1/config.yml +++ b/recipes/libaom-av1/config.yml @@ -1,4 +1,6 @@ versions: + "3.6.1": + folder: all "3.6.0": folder: all "3.5.0": From 58ac0a13c5fe5a2ae1649329ffba02a8abf7685b Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 21 Jul 2023 04:45:42 +0300 Subject: [PATCH 007/637] (#18107) opentelemetry-proto: add package_type, clean up * opentelemetry-proto: add package_type, clean up * opentelemetry-proto: fix Conan v1 incompatibility * opentelemetry-proto: restore test_v1_package * opentelemetry-proto: apply PR suggestions, restore layout() * Update recipes/opentelemetry-proto/all/test_package/conanfile.py * Update recipes/opentelemetry-proto/all/test_package/conanfile.py * package_type = "build-scripts" Co-authored-by: Uilian Ries * bindirs = [] Co-authored-by: Uilian Ries --------- Co-authored-by: Uilian Ries --- recipes/opentelemetry-proto/all/conanfile.py | 32 ++++++++++--------- .../all/test_package/conanfile.py | 26 +++++---------- 2 files changed, 25 insertions(+), 33 deletions(-) diff --git a/recipes/opentelemetry-proto/all/conanfile.py b/recipes/opentelemetry-proto/all/conanfile.py index 05dc5d3a1f5cc..b24f1a700e446 100644 --- a/recipes/opentelemetry-proto/all/conanfile.py +++ b/recipes/opentelemetry-proto/all/conanfile.py @@ -1,19 +1,22 @@ +import os + from conan import ConanFile -from conan.tools.files import get, copy, save +from conan.tools.files import get, copy from conan.tools.layout import basic_layout -import os required_conan_version = ">=1.52.0" + class OpenTelemetryProtoConan(ConanFile): name = "opentelemetry-proto" license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/open-telemetry/opentelemetry-proto" description = "Protobuf definitions for the OpenTelemetry protocol (OTLP)" - topics = ("opentelemetry", "telemetry", "otlp") + topics = ("opentelemetry", "telemetry", "otlp", "pre-built") + + package_type = "build-scripts" settings = "os", "arch", "compiler", "build_type" - no_copy_source = True def layout(self): basic_layout(self, src_folder="src") @@ -21,23 +24,22 @@ def layout(self): def package_id(self): self.info.clear() - def source(self): + def build(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - copy( - self, - pattern="*.proto", - dst=os.path.join(self.package_folder, "res"), - src=self.source_folder, - ) - # satisfy KB-H014 (header_only recipes require headers) - save(self, os.path.join(self.package_folder, "include", "dummy_header.h"), "\n") + copy(self, pattern="LICENSE", + dst=os.path.join(self.package_folder, "licenses"), src=self.build_folder) + copy(self, pattern="*.proto", + dst=os.path.join(self.package_folder, "res"), src=self.build_folder) def package_info(self): - self.conf_info.define("user.opentelemetry-proto:proto_root", os.path.join(self.package_folder, "res")) + self.conf_info.define("user.opentelemetry-proto:proto_root", + os.path.join(self.package_folder, "res")) + self.cpp_info.resdirs = ["res"] + self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] self.cpp_info.includedirs = [] + # TODO: to remove in conan v2 self.user_info.proto_root = os.path.join(self.package_folder, "res") diff --git a/recipes/opentelemetry-proto/all/test_package/conanfile.py b/recipes/opentelemetry-proto/all/test_package/conanfile.py index 468f9bc6b7433..43eb202cc1d23 100644 --- a/recipes/opentelemetry-proto/all/test_package/conanfile.py +++ b/recipes/opentelemetry-proto/all/test_package/conanfile.py @@ -1,15 +1,14 @@ +import os + from conan import ConanFile -from conan.tools.cmake import CMakeDeps, CMakeToolchain -from conan.tools.env import VirtualBuildEnv +from conan.tools.files import save, load from conan.tools.layout import basic_layout -import os + class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" test_type = "explicit" - _res_folder = "" - def layout(self): basic_layout(self, src_folder="src") @@ -17,18 +16,9 @@ def requirements(self): self.requires(self.tested_reference_str) def generate(self): - tc = CMakeToolchain(self) - tc.generate() - tc = CMakeDeps(self) - tc.generate() - tc = VirtualBuildEnv(self) - tc.generate(scope="build") - - self._res_folder = self.dependencies["opentelemetry-proto"].conf_info.get("user.opentelemetry-proto:proto_root") + save(self, os.path.join(self.build_folder, "proto_root"), self.dependencies["opentelemetry-proto"].conf_info.get("user.opentelemetry-proto:proto_root")) def test(self): - # TODO: to remove in conan v2 - if self._res_folder == "": - self._res_folder = self.deps_user_info["opentelemetry-proto"].proto_root - - assert os.path.isfile(os.path.join(self._res_folder, "opentelemetry", "proto", "common", "v1", "common.proto")) + res_folder = load(self, os.path.join(self.build_folder, "proto_root")) + proto_path = os.path.join(res_folder, "opentelemetry", "proto", "common", "v1", "common.proto") + assert os.path.isfile(proto_path) From 9d6fda4d6a9ab5bbccf80cf27e3bba17020a9b17 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 21 Jul 2023 05:25:44 +0300 Subject: [PATCH 008/637] (#18357) simple-yaml: migrate to Conan v2 * simple-yaml: migrate to Conan v2 * simple-yaml: restore test_v1_package * simple-yaml: set min MSVC version * simple-yaml: drop test_v1_package --- recipes/simple-yaml/all/conanfile.py | 98 +++++++++++-------- .../all/test_package/CMakeLists.txt | 6 +- .../simple-yaml/all/test_package/conanfile.py | 27 +++-- 3 files changed, 76 insertions(+), 55 deletions(-) diff --git a/recipes/simple-yaml/all/conanfile.py b/recipes/simple-yaml/all/conanfile.py index fea9f3e7e071f..9573f235455af 100644 --- a/recipes/simple-yaml/all/conanfile.py +++ b/recipes/simple-yaml/all/conanfile.py @@ -1,74 +1,88 @@ import os -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" class SimpleYamlConan(ConanFile): name = "simple-yaml" + description = "Read configuration files in YAML format by code structure" license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/Rechip/simple-yaml" - description = "Read configuration files in YAML format by code structure" - topics = ("cpp", "yaml", "configuration") - settings = ["compiler"] - no_copy_source = True + topics = ("cpp", "yaml", "configuration", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" options = { "enable_enum": [True, False], } default_options = { - "enable_enum": True + "enable_enum": True, } + no_copy_source = True @property - def _source_subfolder(self): - return "source_subfolder" - - def source(self): - tools.get(**self.conan_data["sources"][self.version], - strip_root=True, destination=self._source_subfolder) - - def requirements(self): - self.requires("pretty-name/1.0.0") - self.requires("yaml-cpp/0.7.0") - self.requires("source_location/0.2.0") - if self.options.enable_enum: - self.requires("magic_enum/0.7.3") - - def package(self): - self.copy(pattern="LICENSE", dst="licenses", - src=self._source_subfolder) - self.copy(pattern="*", dst="include", - src=os.path.join(self._source_subfolder, "include")) + def _min_cppstd(self): + return 20 @property def _minimum_compilers_version(self): return { - "Visual Studio": "16.3", "gcc": "10", "clang": "11", "apple-clang": "13.3", + "msvc": "193", + "Visual Studio": "16.3", } + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("pretty-name/1.0.0") + self.requires("yaml-cpp/0.7.0") + self.requires("source_location/0.2.1") + if self.options.enable_enum: + self.requires("magic_enum/0.7.3") + + def package_id(self): + self.info.clear() + def validate(self): if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, "20") - if self.settings.compiler == "clang" and self.settings.compiler.libcxx in ["libstdc++", "libstdc++11"] and self.settings.compiler.version == "11": - raise ConanInvalidConfiguration("clang 11 with libstdc++ is not supported due to old libstdc++ missing C++17 support") - minimum_version = self._minimum_compilers_version.get( - str(self.settings.compiler), False) - if not minimum_version: - self.output.warn( - "simple-yaml requires C++20. Your compiler is unknown. Assuming it fully supports C++20.") - elif tools.Version(self.settings.compiler.version) < minimum_version: + check_min_cppstd(self, self._min_cppstd) + if ( + self.settings.compiler == "clang" + and self.settings.compiler.libcxx in ["libstdc++", "libstdc++11"] + and self.settings.compiler.version == "11" + ): raise ConanInvalidConfiguration( - "simple-yaml requires C++20, which your compiler does not support.") + "clang 11 with libstdc++ is not supported due to old libstdc++ missing C++17 support" + ) + minimum_version = self._minimum_compilers_version.get(str(self.settings.compiler), False) + if not minimum_version: + self.output.warning("simple-yaml requires C++20. Your compiler is unknown. Assuming it fully supports C++20.") + elif Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration("simple-yaml requires C++20, which your compiler does not support.") - def package_id(self): - self.info.header_only() + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + copy(self, "*", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include")) def package_info(self): - self.cpp_info.names["cmake_find_package"] = "simple-yaml" - self.cpp_info.names["cmake_find_package_multi"] = "simple-yaml" + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/simple-yaml/all/test_package/CMakeLists.txt b/recipes/simple-yaml/all/test_package/CMakeLists.txt index 506dba003a47f..08e8ff623e894 100644 --- a/recipes/simple-yaml/all/test_package/CMakeLists.txt +++ b/recipes/simple-yaml/all/test_package/CMakeLists.txt @@ -1,10 +1,8 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +find_package(simple-yaml REQUIRED CONFIG) -find_package(simple-yaml CONFIG REQUIRED) add_executable(${PROJECT_NAME} src/test.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE simple-yaml::simple-yaml) diff --git a/recipes/simple-yaml/all/test_package/conanfile.py b/recipes/simple-yaml/all/test_package/conanfile.py index cbe0be23191a2..fae501d0afb9e 100644 --- a/recipes/simple-yaml/all/test_package/conanfile.py +++ b/recipes/simple-yaml/all/test_package/conanfile.py @@ -1,17 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools class TestPackageConan(ConanFile): - settings = "os", "compiler", "arch", "build_type" - generators = "cmake", "cmake_find_package_multi" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): - self.cmake = CMake(self) - self.cmake.configure() - self.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 can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") From da32e8025edb7c2a4679e97bf43ad74147f53c6a Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 21 Jul 2023 07:05:46 +0300 Subject: [PATCH 009/637] (#18169) aeron: add package_type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * aeron: add package_type * aeron: restore test_v1_package --------- Co-authored-by: Rubén Rincón Blanco --- recipes/aeron/all/conanfile.py | 3 ++- recipes/aeron/all/test_v1_package/CMakeLists.txt | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/recipes/aeron/all/conanfile.py b/recipes/aeron/all/conanfile.py index aef0519cfd69a..4bf9894df2c4c 100644 --- a/recipes/aeron/all/conanfile.py +++ b/recipes/aeron/all/conanfile.py @@ -20,6 +20,7 @@ class AeronConan(ConanFile): homepage = "https://github.com/real-logic/aeron/wiki" license = "Apache-2.0" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -47,7 +48,7 @@ def _compilers_minimum_version(self): } def config_options(self): - if self.settings.os == 'Windows': + if self.settings.os == "Windows": del self.options.fPIC def configure(self): diff --git a/recipes/aeron/all/test_v1_package/CMakeLists.txt b/recipes/aeron/all/test_v1_package/CMakeLists.txt index 0d20897301b68..91630d79f4abb 100644 --- a/recipes/aeron/all/test_v1_package/CMakeLists.txt +++ b/recipes/aeron/all/test_v1_package/CMakeLists.txt @@ -1,8 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) From f411bf6b84307b8771ee698dff05aeb283f9f7ee Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 21 Jul 2023 07:46:12 +0300 Subject: [PATCH 010/637] (#18173) alembic: add package_type * alembic: add package_type * alembic: add transitive_headers=True to imath, bump deps --- recipes/alembic/all/conanfile.py | 5 +++-- recipes/alembic/all/test_v1_package/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/alembic/all/conanfile.py b/recipes/alembic/all/conanfile.py index 73264829b63a3..96e5f773727fd 100644 --- a/recipes/alembic/all/conanfile.py +++ b/recipes/alembic/all/conanfile.py @@ -15,6 +15,7 @@ class AlembicConan(ConanFile): description = "Open framework for storing and sharing scene data." topics = ("3d", "scene", "geometry", "graphics") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -42,9 +43,9 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("imath/3.1.6") + self.requires("imath/3.1.9", transitive_headers=True) if self.options.with_hdf5: - self.requires("hdf5/1.14.0") + self.requires("hdf5/1.14.1") def validate(self): if self.settings.compiler.get_safe("cppstd"): diff --git a/recipes/alembic/all/test_v1_package/CMakeLists.txt b/recipes/alembic/all/test_v1_package/CMakeLists.txt index 0d20897301b68..b21cc49efde95 100644 --- a/recipes/alembic/all/test_v1_package/CMakeLists.txt +++ b/recipes/alembic/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) From cc04ccb57706695569d1545bc276289f15546374 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 21 Jul 2023 14:26:45 +0900 Subject: [PATCH 011/637] (#18294) re2: add version 20230701, update icu, remove older versions --- recipes/re2/all/conandata.yml | 15 +++------------ recipes/re2/all/conanfile.py | 2 +- recipes/re2/config.yml | 10 ++-------- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/recipes/re2/all/conandata.yml b/recipes/re2/all/conandata.yml index bc9a3a910cce5..6705ed6ddc2fa 100644 --- a/recipes/re2/all/conandata.yml +++ b/recipes/re2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "20230701": + url: "https://github.com/google/re2/releases/download/2023-07-01/re2-2023-07-01.tar.gz" + sha256: "18cf85922e27fad3ed9c96a27733037da445f35eb1a2744c306a37c6d11e95c4" "20230602": url: "https://github.com/google/re2/releases/download/2023-06-02/re2-2023-06-02.tar.gz" sha256: "4ccdd5aafaa1bcc24181e6dd3581c3eee0354734bb9f3cb4306273ffa434b94f" @@ -23,15 +26,3 @@ sources: "20210901": url: "https://github.com/google/re2/archive/refs/tags/2021-09-01.tar.gz" sha256: "42a2e1d56b5de252f5d418dc1cc0848e9e52ca22b056453988b18c6195ec7f8d" - "20210601": - url: "https://github.com/google/re2/archive/refs/tags/2021-06-01.tar.gz" - sha256: "26155e050b10b5969e986dab35654247a3b1b295e0532880b5a9c13c0a700ceb" - "20210401": - url: "https://github.com/google/re2/archive/refs/tags/2021-04-01.tar.gz" - sha256: "358aedf71dbf26506848905f5d4417b7adba5cf44d3bbcf70bf4ef68ccb0871e" - "20210202": - url: "https://github.com/google/re2/archive/2021-02-02.tar.gz" - sha256: "1396ab50c06c1a8885fb68bf49a5ecfd989163015fd96699a180d6414937f33f" - "20201101": - url: "https://github.com/google/re2/archive/2020-11-01.tar.gz" - sha256: "8903cc66c9d34c72e2bc91722288ebc7e3ec37787ecfef44d204b2d6281954d7" diff --git a/recipes/re2/all/conanfile.py b/recipes/re2/all/conanfile.py index ca615ecb2c5f0..b0f960a2c6e3c 100644 --- a/recipes/re2/all/conanfile.py +++ b/recipes/re2/all/conanfile.py @@ -60,7 +60,7 @@ def layout(self): def requirements(self): if self.options.get_safe("with_icu"): - self.requires("icu/73.1") + self.requires("icu/73.2") if Version(self.version) >= "20230601": self.requires("abseil/20230125.3", transitive_headers=True) diff --git a/recipes/re2/config.yml b/recipes/re2/config.yml index 6ecf995b443ac..4d4c9dcf9a641 100644 --- a/recipes/re2/config.yml +++ b/recipes/re2/config.yml @@ -1,4 +1,6 @@ versions: + "20230701": + folder: all "20230602": folder: all "20230301": @@ -15,11 +17,3 @@ versions: folder: all "20210901": folder: all - "20210601": - folder: all - "20210401": - folder: all - "20210202": - folder: all - "20201101": - folder: all From 7dbff93fc3acd0c91d79ce0cab8e60b1737616a9 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 21 Jul 2023 09:25:18 +0300 Subject: [PATCH 012/637] (#18181) archicad-apidevkit: add package_type, adjust package_id * archicad-apidevkit: add package_type, adjust package_id * archicad-apidevkit: remove redundant Visual Studio check --- recipes/archicad-apidevkit/all/conanfile.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/recipes/archicad-apidevkit/all/conanfile.py b/recipes/archicad-apidevkit/all/conanfile.py index 55e0ec99e9a6b..2cdfa85c58927 100644 --- a/recipes/archicad-apidevkit/all/conanfile.py +++ b/recipes/archicad-apidevkit/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.tools.files import copy, get +from conan.tools.layout import basic_layout from conan.tools.microsoft import check_min_vs, is_msvc -from conan.tools.scm import Version from conan.errors import ConanInvalidConfiguration import os @@ -14,11 +14,20 @@ class ArchicadApidevkitConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://archicadapi.graphisoft.com/" license = "LicenseRef-LICENSE" - settings = "os", "compiler", "arch", "build_type" + topics = ("api", "archicad", "development", "pre-built") + + package_type = "application" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True - topics = "api", "archicad", "development" short_paths = True + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + del self.info.settings.compiler + del self.info.settings.build_type + def validate(self): if self.settings.build_type == "Debug": raise ConanInvalidConfiguration("Debug configuration is not supported") @@ -31,9 +40,6 @@ def validate(self): if not str(self.settings.arch) in ("x86_64"): raise ConanInvalidConfiguration( f"{self.ref} is not supported yet.") - if self.settings.compiler == "Visual Studio" and Version(self.settings.compiler.version) < "16": - raise ConanInvalidConfiguration( - "This recipe does not support this compiler version") def build(self): devkit, licenses = self.conan_data["sources"][self.version][str(self.settings.os)][str(self.settings.arch)] From 9e90d35a50a66056d570c72506dcff65c9185719 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Fri, 21 Jul 2023 08:48:43 +0200 Subject: [PATCH 013/637] (#18313) turtle: fix lib/bindirs * turtle: fix lib/bindirs * turtle: package_id -> package_info --- recipes/turtle/all/conanfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/turtle/all/conanfile.py b/recipes/turtle/all/conanfile.py index a032a9c58db93..1f12c41eb77c7 100644 --- a/recipes/turtle/all/conanfile.py +++ b/recipes/turtle/all/conanfile.py @@ -25,6 +25,10 @@ def requirements(self): def package_id(self): self.info.clear() + def package_info(self): + self.cpp_info.libdirs = [] + self.cpp_info.bindirs = [] + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 85775aa79a46487156b6f7414e462857e7364f4e Mon Sep 17 00:00:00 2001 From: krabbstek Date: Fri, 21 Jul 2023 09:30:13 +0200 Subject: [PATCH 014/637] (#18753) Added cmake 3.27 --- recipes/cmake/binary/conandata.yml | 19 +++++++++++++++++++ recipes/cmake/config.yml | 2 ++ 2 files changed, 21 insertions(+) diff --git a/recipes/cmake/binary/conandata.yml b/recipes/cmake/binary/conandata.yml index b8c5dfe2bfbee..c9e3ccde2563d 100644 --- a/recipes/cmake/binary/conandata.yml +++ b/recipes/cmake/binary/conandata.yml @@ -1,4 +1,23 @@ sources: + "3.27.0": + Linux: + armv8: + url: "https://cmake.org/files/v3.27/cmake-3.27.0-linux-aarch64.tar.gz" + sha256: "97c2f8cf9e063a7acf9f15ed472d87c511bf5cb62d3e42b9c90524fb0c2e4748" + x86_64: + url: "https://cmake.org/files/v3.27/cmake-3.27.0-linux-x86_64.tar.gz" + sha256: "89c7e74d29f442e4734954310e09dd12d13636991f2d90d0ed1bececb8bf9b9c" + Macos: + universal: + url: "https://cmake.org/files/v3.27/cmake-3.27.0-macos10.10-universal.tar.gz" + sha256: "dd9a7a8d5bd7d20b694eda8ff9c31147a5e1faa3bca1099836cfa0f81f8d5809" + Windows: + armv8: + url: "https://cmake.org/files/v3.27/cmake-3.27.0-windows-arm64.zip" + sha256: "9345cbbb25cb5e8f3c68db067151a013c628783edbfc6fcf622ae58900aa8ad3" + x86_64: + url: "https://cmake.org/files/v3.27/cmake-3.27.0-windows-x86_64.zip" + sha256: "fc5f901ef4d438eafbe35b24c608d5de11e517f157b3b7ab8ebbaa7c3c0171d2" "3.26.4": Linux: armv8: diff --git a/recipes/cmake/config.yml b/recipes/cmake/config.yml index 174b2ccab0551..0ed8eb6281e81 100644 --- a/recipes/cmake/config.yml +++ b/recipes/cmake/config.yml @@ -15,3 +15,5 @@ versions: folder: "binary" "3.26.4": folder: "binary" + "3.27.0": + folder: "binary" From 3dde02d48d85f36ec93bda899c30eee5a6b6713f Mon Sep 17 00:00:00 2001 From: Guillaume Egles Date: Fri, 21 Jul 2023 01:07:04 -0700 Subject: [PATCH 015/637] (#18606) restinio: bump standalone asio & remove older versions --- recipes/restinio/all/conandata.yml | 27 --------------------------- recipes/restinio/all/conanfile.py | 17 +++-------------- recipes/restinio/config.yml | 18 ------------------ 3 files changed, 3 insertions(+), 59 deletions(-) diff --git a/recipes/restinio/all/conandata.yml b/recipes/restinio/all/conandata.yml index 8eaf747a395e3..ad2cb8100089c 100644 --- a/recipes/restinio/all/conandata.yml +++ b/recipes/restinio/all/conandata.yml @@ -8,30 +8,3 @@ sources: "0.6.16": url: "https://github.com/Stiffstream/restinio/archive/v.0.6.16.tar.gz" sha256: "b3208d746087ba979f51b3a32e08463718c33d58720247d53ffb5bda99f4f92a" - "0.6.15": - url: "https://github.com/Stiffstream/restinio/archive/v.0.6.15.tar.gz" - sha256: "5977e7a21064a42dc690a644adc7ba03037eb4007bfbc36586faf715583967bd" - "0.6.14": - url: https://github.com/Stiffstream/restinio/archive/v.0.6.14.tar.gz - sha256: 9742c051e7199d826697f86e6ba4a9fcb7f00c71a408b5c172134b2206404c4e - "0.6.13": - url: https://github.com/Stiffstream/restinio/archive/v.0.6.13.tar.gz - sha256: 72d7ad40c8d34e69cd79f42145b4059e8a7356114fb13864c3c0ad5a5607b44f - "0.6.12": - url: https://github.com/Stiffstream/restinio/archive/v.0.6.12.tar.gz - sha256: 7176d608afb8e5cd29eec2216e747be262215f5b3ab3df2b3c86e691f1cec79e - "0.6.11": - url: https://github.com/Stiffstream/restinio/archive/v.0.6.11.tar.gz - sha256: 66c25c19efd9dc9683d60f540e9ac09b66245c5afde096fc05ec69cbb502fc5d - "0.6.10": - url: https://github.com/Stiffstream/restinio/archive/v.0.6.10.tar.gz - sha256: dc9cad7e19f1bc255532cee53ab2027c93108c79e27f9fbe971f3ea0b10274a5 - "0.6.9": - url: https://github.com/Stiffstream/restinio/archive/v.0.6.9.tar.gz - sha256: fcb05e15a346b4ff27757b89741289864f82f71affe61364325ce70dddefe31f - "0.6.8.1": - url: https://github.com/Stiffstream/restinio/archive/v.0.6.8.1.tar.gz - sha256: 6a365ce645fc7188c287602886eba1a99c797e01b734f0c69bcb370b3494b54c - "0.6.8": - url: https://github.com/Stiffstream/restinio/archive/v.0.6.8.tar.gz - sha256: 92ab0faa9f9de582df787e133acf5c10fb6ab7cecbd96c128997554d8ceda0cd diff --git a/recipes/restinio/all/conanfile.py b/recipes/restinio/all/conanfile.py index 3d82682de5578..e65bd0d3bc7f9 100644 --- a/recipes/restinio/all/conanfile.py +++ b/recipes/restinio/all/conanfile.py @@ -38,27 +38,16 @@ def layout(self): def requirements(self): self.requires("http_parser/2.9.4") - - if Version(self.version) >= "0.6.16": - self.requires("fmt/10.0.0") - else: - self.requires("fmt/8.1.1") - + self.requires("fmt/10.0.0") self.requires("expected-lite/0.6.3") self.requires("optional-lite/3.5.0") self.requires("string-view-lite/1.7.0") self.requires("variant-lite/2.0.0") if self.options.asio == "standalone": - if Version(self.version) >= "0.6.9": - self.requires("asio/1.22.1") - else: - self.requires("asio/1.16.1") + self.requires("asio/1.28.0") else: - if Version(self.version) >= "0.6.9": - self.requires("boost/1.82.0") - else: - self.requires("boost/1.73.0") + self.requires("boost/1.82.0") if self.options.with_openssl: self.requires("openssl/[>=1.1 <4]") diff --git a/recipes/restinio/config.yml b/recipes/restinio/config.yml index c650402f2c503..517f51717a3a8 100644 --- a/recipes/restinio/config.yml +++ b/recipes/restinio/config.yml @@ -5,21 +5,3 @@ versions: folder: all "0.6.16": folder: all - "0.6.15": - folder: all - "0.6.14": - folder: all - "0.6.13": - folder: all - "0.6.12": - folder: all - "0.6.11": - folder: all - "0.6.10": - folder: all - "0.6.9": - folder: all - "0.6.8.1": - folder: all - "0.6.8": - folder: all From 74400fb6d7baef609215ae58f9b1d232b1c9950e Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 21 Jul 2023 11:52:31 +0300 Subject: [PATCH 016/637] (#18682) cn-cbor: migrate to Conan v2 --- recipes/cn-cbor/all/CMakeLists.txt | 7 -- recipes/cn-cbor/all/conanfile.py | 83 +++++++++---------- .../cn-cbor/all/test_package/CMakeLists.txt | 9 +- recipes/cn-cbor/all/test_package/conanfile.py | 22 +++-- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../cn-cbor/all/test_v1_package/conanfile.py | 18 ++++ 6 files changed, 85 insertions(+), 62 deletions(-) delete mode 100644 recipes/cn-cbor/all/CMakeLists.txt create mode 100644 recipes/cn-cbor/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/cn-cbor/all/test_v1_package/conanfile.py diff --git a/recipes/cn-cbor/all/CMakeLists.txt b/recipes/cn-cbor/all/CMakeLists.txt deleted file mode 100644 index 361b35d4c17d9..0000000000000 --- a/recipes/cn-cbor/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8.11) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory(source_subfolder) diff --git a/recipes/cn-cbor/all/conanfile.py b/recipes/cn-cbor/all/conanfile.py index 74e90a06cc919..91eccd3167699 100644 --- a/recipes/cn-cbor/all/conanfile.py +++ b/recipes/cn-cbor/all/conanfile.py @@ -1,82 +1,79 @@ import os -from conans import CMake, ConanFile, 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, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir + +required_conan_version = ">=1.53.0" class CnCborStackConan(ConanFile): name = "cn-cbor" + description = "A constrained node implementation of CBOR in C" license = "MIT" - homepage = "https://github.com/jimsch/cn-cbor/" url = "https://github.com/conan-io/conan-center-index" - description = "A constrained node implementation of CBOR in C" - topics = "cbor", "nodes", "messaging" - exports_sources = ['CMakeLists.txt'] - settings = "os", "compiler", "build_type", "arch" + homepage = "https://github.com/jimsch/cn-cbor/" + topics = ("cbor", "nodes", "messaging") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], } default_options = { "shared": False, - "fPIC": True + "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" def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) if self.settings.os == "Windows" and self.options.shared: raise ConanInvalidConfiguration("Windows shared builds are not supported right now") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = self.name + "-" + self.version - os.rename(extracted_dir, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["fatal_warnings"] = False - self._cmake.definitions["coveralls"] = False - self._cmake.definitions["build_tests"] = False - self._cmake.definitions["build_docs"] = False - - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + def generate(self): + tc = CMakeToolchain(self) + tc.variables["fatal_warnings"] = False + tc.variables["coveralls"] = False + tc.variables["build_tests"] = False + tc.variables["build_docs"] = False + tc.generate() def build(self): - 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", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() os.remove(os.path.join(self.package_folder, "README.md")) os.remove(os.path.join(self.package_folder, "LICENSE")) - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.rmdir(os.path.join(self.package_folder, "lib", "cn-cbor", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cn-cbor", "cmake")) def package_info(self): - self.cpp_info.libs = tools.collect_libs(self) + self.cpp_info.libs = ["cn-cbor"] if self.settings.os == "Windows": self.cpp_info.system_libs = ["ws2_32"] diff --git a/recipes/cn-cbor/all/test_package/CMakeLists.txt b/recipes/cn-cbor/all/test_package/CMakeLists.txt index 33ae887aa6aea..50e6a7de0b4ea 100644 --- a/recipes/cn-cbor/all/test_package/CMakeLists.txt +++ b/recipes/cn-cbor/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(cn-cbor REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE cn-cbor::cn-cbor) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/cn-cbor/all/test_package/conanfile.py b/recipes/cn-cbor/all/test_package/conanfile.py index 933dbf96533ae..fae501d0afb9e 100644 --- a/recipes/cn-cbor/all/test_package/conanfile.py +++ b/recipes/cn-cbor/all/test_package/conanfile.py @@ -1,11 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain" + test_type = "explicit" -class TestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - bin_path = 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/cn-cbor/all/test_v1_package/CMakeLists.txt b/recipes/cn-cbor/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/cn-cbor/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/cn-cbor/all/test_v1_package/conanfile.py b/recipes/cn-cbor/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..9de3689208f00 --- /dev/null +++ b/recipes/cn-cbor/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class TestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + bin_path = self.run(bin_path, run_environment=True) From 506f3b287cb4c8d051d9b85a98a2b9df5f2b299a Mon Sep 17 00:00:00 2001 From: Quentin Chateau Date: Fri, 21 Jul 2023 11:32:52 +0200 Subject: [PATCH 017/637] (#18773) aeron: add version 1.41.4 Generated and committed by [Conan Center Bot](https://github.com/qchateau/conan-center-bot) Find more updatable recipes in the [GitHub Pages](https://qchateau.github.io/conan-center-bot/) --- recipes/aeron/all/conandata.yml | 3 +++ recipes/aeron/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/aeron/all/conandata.yml b/recipes/aeron/all/conandata.yml index a888d0c721120..c3ee6521cf6a5 100644 --- a/recipes/aeron/all/conandata.yml +++ b/recipes/aeron/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.41.4": + url: "https://github.com/real-logic/aeron/archive/1.41.4.tar.gz" + sha256: "681e2a045ca04672612b6edeb7a09c0d574e12c6875cfe26f677b12772d71ad5" "1.35.1": url: "https://github.com/real-logic/aeron/archive/1.35.1.tar.gz" sha256: "19b0f27c2cbc27b422e26a533e4a04a60592217e1c70fdbdd48a92a7b932cccb" diff --git a/recipes/aeron/config.yml b/recipes/aeron/config.yml index 0c20e51036f8b..9f6aea7a8f54b 100644 --- a/recipes/aeron/config.yml +++ b/recipes/aeron/config.yml @@ -1,4 +1,6 @@ versions: + "1.41.4": + folder: all "1.35.1": folder: all "1.34.0": From c8d2cf559a7b7114cefc8ffbe3c9c26fc208a5de Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Fri, 21 Jul 2023 13:22:23 +0200 Subject: [PATCH 018/637] (#18718) [bot] Update authorized users list (2023-07-20) --- .c3i/authorized_users.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index bb46de7b8ad44..f24e1eb3d8a3a 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1201,3 +1201,5 @@ authorized_users: - klausholstjacobsen - xahon - jeremy-rifkin +- Christian-Prather +- Siarh199 From c5013168c3270993bdd4b1a19b07bc3f63e39931 Mon Sep 17 00:00:00 2001 From: Maksim Petukhov <6967052+maksim-petukhov@users.noreply.github.com> Date: Fri, 21 Jul 2023 14:58:00 +0300 Subject: [PATCH 019/637] (#18675) snappy: add with_bmi2 and with_ssse3 options * add options * fix --- recipes/snappy/all/conanfile.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/recipes/snappy/all/conanfile.py b/recipes/snappy/all/conanfile.py index 0ce00288cff64..d60c824527335 100644 --- a/recipes/snappy/all/conanfile.py +++ b/recipes/snappy/all/conanfile.py @@ -21,10 +21,14 @@ class SnappyConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "with_bmi2": [True, False, "auto"], + "with_ssse3": [True, False, "auto"], } default_options = { "shared": False, "fPIC": True, + "with_bmi2": "auto", + "with_ssse3": "auto", } def export_sources(self): @@ -33,6 +37,9 @@ def export_sources(self): def config_options(self): if self.settings.os == 'Windows': del self.options.fPIC + if self.settings.arch not in ["x86", "x86_64"]: + del self.options.with_bmi2 + del self.options.with_ssse3 def configure(self): if self.options.shared: @@ -60,6 +67,11 @@ def generate(self): tc.variables["SNAPPY_INSTALL"] = True if Version(self.version) >= "1.1.9": tc.variables["SNAPPY_BUILD_BENCHMARKS"] = False + if self.settings.arch in ["x86", "x86_64"]: + if self.options.with_bmi2 != "auto": + tc.variables["SNAPPY_HAVE_BMI2"] = self.options.with_bmi2 + if self.options.with_ssse3 != "auto": + tc.variables["SNAPPY_HAVE_SSSE3"] = self.options.with_ssse3 tc.generate() def build(self): From c3500e48c3f3d02dac0df140fe387b2a12958d1b Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 21 Jul 2023 15:53:39 +0300 Subject: [PATCH 020/637] (#18345) pybind11_json: migrate to Conan v2 * pybind11_json: migrate to Conan v2 * pybind11_json: restore test_v1_package * pybind11_json: fix v1 support in test --- recipes/pybind11_json/all/conanfile.py | 59 +++++++++---------- .../all/test_package/CMakeLists.txt | 10 ++-- .../all/test_package/conanfile.py | 21 +++++-- .../all/test_package/test_package.cpp | 4 +- .../all/test_v1_package/CMakeLists.txt | 8 +++ .../all/test_v1_package/conanfile.py | 17 ++++++ 6 files changed, 75 insertions(+), 44 deletions(-) create mode 100644 recipes/pybind11_json/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/pybind11_json/all/test_v1_package/conanfile.py diff --git a/recipes/pybind11_json/all/conanfile.py b/recipes/pybind11_json/all/conanfile.py index 4c4feedd8416a..829dedced7271 100644 --- a/recipes/pybind11_json/all/conanfile.py +++ b/recipes/pybind11_json/all/conanfile.py @@ -1,48 +1,47 @@ -from conans import ConanFile, tools import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.52.0" class Pybind11JsonConan(ConanFile): name = "pybind11_json" - homepage = "https://github.com/pybind/pybind11_json" description = "An nlohmann_json to pybind11 bridge" - topics = ( - "conan", - "header-only", - "json", - "nlohmann_json", - "pybind11", - "pybind11_json", - "python", - "python-binding", - ) - url = "https://github.com/conan-io/conan-center-index" - no_copy_source = True license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/pybind/pybind11_json" + topics = ("header-only", "json", "nlohmann_json", "pybind11", "pybind11_json", "python", "python-binding") - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True - def package_id(self): - self.info.header_only() + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): - self.requires("nlohmann_json/3.9.1") - self.requires("pybind11/2.6.2") + self.requires("nlohmann_json/3.11.2") + self.requires("pybind11/2.10.4") + + def package_id(self): + self.info.clear() def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy(pattern="LICENSE*", src=self._source_subfolder, dst="licenses") - self.copy( - "*", dst="include", src=os.path.join(self._source_subfolder, "include") - ) + copy(self, "LICENSE*", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + copy(self, "*", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include")) def package_info(self): - self.cpp_info.names["cmake_find_package"] = "pybind11_json" - self.cpp_info.names["cmake_find_package_multi"] = "pybind11_json" + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + self.cpp_info.set_property("cmake_target_aliases", ["pybind11_json"]) diff --git a/recipes/pybind11_json/all/test_package/CMakeLists.txt b/recipes/pybind11_json/all/test_package/CMakeLists.txt index d1ca457a18f13..f795a0bec7158 100644 --- a/recipes/pybind11_json/all/test_package/CMakeLists.txt +++ b/recipes/pybind11_json/all/test_package/CMakeLists.txt @@ -1,12 +1,10 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) set(CMAKE_CXX_STANDARD 11) find_package(pybind11_json REQUIRED CONFIG) add_executable(test_package test_package.cpp) -target_link_libraries(test_package PUBLIC pybind11_json::pybind11_json) # FIXME: target should be pybind11_json + # FIXME: target should be pybind11_json, replace once Conan v1 has been dropped +target_link_libraries(test_package PUBLIC pybind11_json::pybind11_json) diff --git a/recipes/pybind11_json/all/test_package/conanfile.py b/recipes/pybind11_json/all/test_package/conanfile.py index 7e2dfe859bb27..fae501d0afb9e 100644 --- a/recipes/pybind11_json/all/test_package/conanfile.py +++ b/recipes/pybind11_json/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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain" + 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.settings): - 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/pybind11_json/all/test_package/test_package.cpp b/recipes/pybind11_json/all/test_package/test_package.cpp index 1e50fae0cd666..2ebca6ab52bbd 100644 --- a/recipes/pybind11_json/all/test_package/test_package.cpp +++ b/recipes/pybind11_json/all/test_package/test_package.cpp @@ -17,10 +17,10 @@ int main() { py::scoped_interpreter guard{}; const py::dict original_py_dict{"number"_a=1234, "hello"_a="world"}; - + const nl::json converted_nl_json{original_py_dict}; std::cout << "Converted nlohmann::json contents: " << converted_nl_json << std::endl; - + const py::dict converted_py_dict = converted_nl_json.front(); // assigning the only list element std::cout << "Converted py::dict contents: {hello:" << converted_py_dict["hello"].cast() diff --git a/recipes/pybind11_json/all/test_v1_package/CMakeLists.txt b/recipes/pybind11_json/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/pybind11_json/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/pybind11_json/all/test_v1_package/conanfile.py b/recipes/pybind11_json/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..7e2dfe859bb27 --- /dev/null +++ b/recipes/pybind11_json/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 4c4bf4e2258cb887d52480782932a3e0a0630de1 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 21 Jul 2023 16:29:14 +0300 Subject: [PATCH 021/637] (#18347) tiny-dnn: migrate to Conan v2 * tiny-dnn: migrate to Conan v2 * tiny-dnn: restore test_v1_package * tiny-dnn: add msvc version, drop questionable comment --- recipes/tiny-dnn/all/CMakeLists.txt | 7 -- recipes/tiny-dnn/all/conanfile.py | 92 ++++++++++--------- .../tiny-dnn/all/test_package/CMakeLists.txt | 5 +- .../tiny-dnn/all/test_package/conanfile.py | 19 +++- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../tiny-dnn/all/test_v1_package/conanfile.py | 17 ++++ 6 files changed, 87 insertions(+), 61 deletions(-) delete mode 100644 recipes/tiny-dnn/all/CMakeLists.txt create mode 100644 recipes/tiny-dnn/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/tiny-dnn/all/test_v1_package/conanfile.py diff --git a/recipes/tiny-dnn/all/CMakeLists.txt b/recipes/tiny-dnn/all/CMakeLists.txt deleted file mode 100644 index b71c882d9d33f..0000000000000 --- a/recipes/tiny-dnn/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/tiny-dnn/all/conanfile.py b/recipes/tiny-dnn/all/conanfile.py index b3a57165d52a3..d88cf7b9a6e9e 100644 --- a/recipes/tiny-dnn/all/conanfile.py +++ b/recipes/tiny-dnn/all/conanfile.py @@ -1,35 +1,28 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.43.0" +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, replace_in_file, rmdir +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" class TinyDnnConan(ConanFile): name = "tiny-dnn" + description = "tiny-dnn is a C++14 implementation of deep learning." license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/tiny-dnn/tiny-dnn" - description = "tiny-dnn is a C++14 implementation of deep learning." topics = ("header-only", "deep-learning", "embedded", "iot", "computational") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" - options = { - "with_tbb": [True, False], - } - default_options = { - "with_tbb": False, - } - - exports_sources = "CMakeLists.txt" - # TODO: if you move this recipe to CMakeDeps, be aware that tiny-dnn - # relies on CMake variables which are not defined in CMakeDeps, only - # in cmake_find_package. So patch it before. - generators = "cmake", "cmake_find_package" - - @property - def _source_subfolder(self): - return "source_subfolder" + options = {"with_tbb": [True, False]} + default_options = {"with_tbb": False} + no_copy_source = True @property def _min_cppstd(self): @@ -41,58 +34,71 @@ def _min_compilers_version(self): "gcc": "5", "clang": "3.4", "apple-clang": "10", - "Visual Studio": "14" + "msvc": "190", + "Visual Studio": "14", } + def layout(self): + cmake_layout(self, src_folder="src") + def requirements(self): self.requires("cereal/1.3.1") self.requires("stb/cci.20210713") if self.options.with_tbb: self.requires("onetbb/2020.3") + def package_id(self): + self.info.clear() + def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, self._min_cppstd) + check_min_cppstd(self, self._min_cppstd) compiler = str(self.settings.compiler) - version = tools.Version(self.settings.compiler.version) + version = Version(self.settings.compiler.version) if compiler in self._min_compilers_version and version < self._min_compilers_version[compiler]: - raise ConanInvalidConfiguration( - "{} requires a compiler that supports at least C++{}".format( - self.name, self._min_cppstd, - ) - ) - - def package_id(self): - self.info.header_only() + raise ConanInvalidConfiguration(f"{self.name} requires a compiler that supports at least C++{self._min_cppstd}") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["USE_TBB"] = self.options.with_tbb + tc.variables["USE_GEMMLOWP"] = False + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - tools.replace_in_file( - os.path.join(self._source_subfolder, "tiny_dnn", "util", "image.h"), - "third_party/", "", - ) + replace_in_file(self, + os.path.join(self.source_folder, "tiny_dnn", "util", "image.h"), + "third_party/", "") def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) cmake = CMake(self) - cmake.definitions["USE_TBB"] = self.options.with_tbb - cmake.definitions["USE_GEMMLOWP"] = False cmake.configure() cmake.install() - tools.rmdir(os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.set_property("cmake_file_name", "tinydnn") self.cpp_info.set_property("cmake_target_name", "TinyDNN::tiny_dnn") + # TODO: back to global scope in conan v2 once cmake_find_package* generators removed + self.cpp_info.components["tinydnn"].set_property("cmake_target_name", "TinyDNN::tiny_dnn") + self.cpp_info.components["tinydnn"].requires = ["cereal::cereal", "stb::stb"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["tinydnn"].system_libs = ["pthread"] if self.options.with_tbb: self.cpp_info.components["tinydnn"].defines = ["CNN_USE_TBB=1"] + self.cpp_info.components["tinydnn"].requires.append("onetbb::onetbb") # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.filenames["cmake_find_package"] = "tinydnn" @@ -101,7 +107,3 @@ def package_info(self): self.cpp_info.names["cmake_find_package_multi"] = "TinyDNN" self.cpp_info.components["tinydnn"].names["cmake_find_package"] = "tiny_dnn" self.cpp_info.components["tinydnn"].names["cmake_find_package_multi"] = "tiny_dnn" - self.cpp_info.components["tinydnn"].set_property("cmake_target_name", "TinyDNN::tiny_dnn") - self.cpp_info.components["tinydnn"].requires = ["cereal::cereal", "stb::stb"] - if self.options.with_tbb: - self.cpp_info.components["tinydnn"].requires.append("onetbb::onetbb") diff --git a/recipes/tiny-dnn/all/test_package/CMakeLists.txt b/recipes/tiny-dnn/all/test_package/CMakeLists.txt index e2d99200a80ab..efce3e2e31902 100644 --- a/recipes/tiny-dnn/all/test_package/CMakeLists.txt +++ b/recipes/tiny-dnn/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(tinydnn REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/tiny-dnn/all/test_package/conanfile.py b/recipes/tiny-dnn/all/test_package/conanfile.py index 38f4483872d47..fae501d0afb9e 100644 --- a/recipes/tiny-dnn/all/test_package/conanfile.py +++ b/recipes/tiny-dnn/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" + 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/tiny-dnn/all/test_v1_package/CMakeLists.txt b/recipes/tiny-dnn/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/tiny-dnn/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/tiny-dnn/all/test_v1_package/conanfile.py b/recipes/tiny-dnn/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..38f4483872d47 --- /dev/null +++ b/recipes/tiny-dnn/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 8e2d581d6315808b9e568a7b0b5b74c99701c4a9 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 21 Jul 2023 17:07:48 +0300 Subject: [PATCH 022/637] (#18705) marisa: migrate to Conan v2 --- recipes/marisa/all/CMakeLists.txt | 7 -- recipes/marisa/all/conandata.yml | 1 - recipes/marisa/all/conanfile.py | 75 ++++++++----------- .../marisa/all/test_package/CMakeLists.txt | 5 +- recipes/marisa/all/test_package/conanfile.py | 22 ++++-- .../marisa/all/test_package/test_package.cpp | 2 +- .../marisa/all/test_v1_package/CMakeLists.txt | 8 ++ .../marisa/all/test_v1_package/conanfile.py | 18 +++++ 8 files changed, 76 insertions(+), 62 deletions(-) delete mode 100644 recipes/marisa/all/CMakeLists.txt create mode 100644 recipes/marisa/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/marisa/all/test_v1_package/conanfile.py diff --git a/recipes/marisa/all/CMakeLists.txt b/recipes/marisa/all/CMakeLists.txt deleted file mode 100644 index 84887fbda2ddf..0000000000000 --- a/recipes/marisa/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) - -add_subdirectory(source_subfolder) diff --git a/recipes/marisa/all/conandata.yml b/recipes/marisa/all/conandata.yml index 087e45138b499..6f5b0ae3b7c45 100644 --- a/recipes/marisa/all/conandata.yml +++ b/recipes/marisa/all/conandata.yml @@ -5,4 +5,3 @@ sources: patches: "0.2.6": - patch_file: "patches/0001-add-cmake.patch" - base_path: "source_subfolder" diff --git a/recipes/marisa/all/conanfile.py b/recipes/marisa/all/conanfile.py index 13b534d613bd9..05b8f1775310a 100644 --- a/recipes/marisa/all/conanfile.py +++ b/recipes/marisa/all/conanfile.py @@ -1,20 +1,22 @@ import os -from conan import ConanFile, tools -from conan.tools.files import apply_conandata_patches -from conans import CMake -required_conan_version = ">=1.45.0" +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir + +required_conan_version = ">=1.53.0" class MarisaConan(ConanFile): name = "marisa" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/s-yata/marisa-trie" description = "Matching Algorithm with Recursively Implemented StorAge " license = ("BSD-2-Clause", "LGPL-2.1") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/s-yata/marisa-trie" topics = ("algorithm", "dictionary", "marisa") - exports_sources = "patches/**", "CMakeLists.txt" - settings = "os", "compiler", "build_type", "arch" + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -26,16 +28,8 @@ class MarisaConan(ConanFile): "tools": True, } - generators = "cmake" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -43,45 +37,42 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") - def source(self): - tools.files.get(**self.conan_data["sources"][self.version], - conanfile=self, destination=self._source_subfolder, strip_root=True) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) + def layout(self): + cmake_layout(self, src_folder="src") - self._cmake.definitions["BUILD_TOOLS"] = self.options.tools + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_TOOLS"] = self.options.tools + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): apply_conandata_patches(self) - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy(pattern="COPYING.md", dst="licenses", - src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, pattern="COPYING.md", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() - tools.files.rmdir(self, os.path.join( - self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): - self.cpp_info.names["cmake_find_package"] = "marisa" - self.cpp_info.names["cmake_find_package_multi"] = "marisa" - self.cpp_info.names["pkgconfig"] = "marisa" + self.cpp_info.set_property("pkg_config_name", "marisa") self.cpp_info.libs = ["marisa"] - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["m"] + # TODO: to remove in conan v2 bin_path = os.path.join(self.package_folder, "bin") self.output.info(f"Appending PATH env var with : '{bin_path}'") self.env_info.PATH.append(bin_path) diff --git a/recipes/marisa/all/test_package/CMakeLists.txt b/recipes/marisa/all/test_package/CMakeLists.txt index 9bae1c0958b76..8f42c91d450ee 100644 --- a/recipes/marisa/all/test_package/CMakeLists.txt +++ b/recipes/marisa/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - find_package(marisa REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/marisa/all/test_package/conanfile.py b/recipes/marisa/all/test_package/conanfile.py index 251bf8ae3e3dd..fae501d0afb9e 100644 --- a/recipes/marisa/all/test_package/conanfile.py +++ b/recipes/marisa/all/test_package/conanfile.py @@ -1,11 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import CMake, ConanFile, tools -from conan.tools.build import cross_building class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not 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/marisa/all/test_package/test_package.cpp b/recipes/marisa/all/test_package/test_package.cpp index ba90951dd5e1b..5180045c1a180 100644 --- a/recipes/marisa/all/test_package/test_package.cpp +++ b/recipes/marisa/all/test_package/test_package.cpp @@ -1,6 +1,6 @@ -#include #include "marisa.h" +#include int main() { int x = 100; diff --git a/recipes/marisa/all/test_v1_package/CMakeLists.txt b/recipes/marisa/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/marisa/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/marisa/all/test_v1_package/conanfile.py b/recipes/marisa/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..251bf8ae3e3dd --- /dev/null +++ b/recipes/marisa/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os +from conans import CMake, ConanFile, tools +from conan.tools.build import cross_building + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From bed40ca0a7eb45a7b1c8882ef4be2c79b48563b0 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 21 Jul 2023 23:50:40 +0900 Subject: [PATCH 023/637] (#18677) libcurl: add version 8.2.0, update libnghttp2, remove older versions * libcurl: add version 8.2.0, update libnghttp2 * fix brotli patch --- recipes/libcurl/all/conandata.yml | 9 +++------ recipes/libcurl/all/conanfile.py | 5 +++-- recipes/libcurl/config.yml | 6 ++---- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/recipes/libcurl/all/conandata.yml b/recipes/libcurl/all/conandata.yml index ed67365a84b81..fa48006c6d92f 100644 --- a/recipes/libcurl/all/conandata.yml +++ b/recipes/libcurl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "8.2.0": + url: "https://curl.se/download/curl-8.2.0.tar.gz" + sha256: "c67849462d171a3fee08b605cdd837d18ee22ecc3ee2c6a0393c9cec5d1a137e" "8.1.2": url: "https://curl.se/download/curl-8.1.2.tar.gz" sha256: "2e5a9b8fcdc095bdd2f079561f369de71c5eb3b80f00a702fbe9a8b8d9897891" @@ -38,9 +41,3 @@ sources: "7.78.0": url: "https://curl.se/download/curl-7.78.0.tar.gz" sha256: "ed936c0b02c06d42cf84b39dd12bb14b62d77c7c4e875ade022280df5dcc81d7" - "7.77.0": - url: "https://curl.se/download/curl-7.77.0.tar.gz" - sha256: "b0a3428acb60fa59044c4d0baae4e4fc09ae9af1d8a3aa84b2e3fbcd99841f77" - "7.76.0": - url: "https://curl.se/download/curl-7.76.0.tar.gz" - sha256: "3b4378156ba09e224008e81dcce854b7ce4d182b1f9cfb97fe5ed9e9c18c6bd3" diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index 6fc552c1f2f77..85bc4477130be 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -185,7 +185,7 @@ def requirements(self): elif self.options.with_ssl == "wolfssl": self.requires("wolfssl/5.6.3") if self.options.with_nghttp2: - self.requires("libnghttp2/1.54.0") + self.requires("libnghttp2/1.55.1") if self.options.with_libssh2: self.requires("libssh2/1.11.0") if self.options.with_zlib: @@ -334,7 +334,8 @@ def _patch_cmake(self): "include(CurlSymbolHiding)", "") # brotli - replace_in_file(self, cmakelists, "find_package(Brotli QUIET)", "find_package(brotli REQUIRED CONFIG)") + if Version(self.version) < "8.2.0": + replace_in_file(self, cmakelists, "find_package(Brotli QUIET)", "find_package(brotli REQUIRED CONFIG)") replace_in_file(self, cmakelists, "if(BROTLI_FOUND)", "if(brotli_FOUND)") replace_in_file(self, cmakelists, "${BROTLI_LIBRARIES}", "brotli::brotli") replace_in_file(self, cmakelists, "${BROTLI_INCLUDE_DIRS}", "${brotli_INCLUDE_DIRS}") diff --git a/recipes/libcurl/config.yml b/recipes/libcurl/config.yml index cb27832872bdf..29dfe667599fa 100644 --- a/recipes/libcurl/config.yml +++ b/recipes/libcurl/config.yml @@ -1,4 +1,6 @@ versions: + "8.2.0": + folder: all "8.1.2": folder: all "8.1.1": @@ -25,7 +27,3 @@ versions: folder: all "7.78.0": folder: all - "7.77.0": - folder: all - "7.76.0": - folder: all From 0b168024b30a5e0ce5c7ac551a38a63308ed92e3 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 22 Jul 2023 02:12:02 +0900 Subject: [PATCH 024/637] (#18712) etl: add version 20.37.2, remove older versions --- recipes/etl/all/conandata.yml | 9 +++------ recipes/etl/config.yml | 6 ++---- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/recipes/etl/all/conandata.yml b/recipes/etl/all/conandata.yml index d02bdeabb7ddb..716bd8799f7d5 100644 --- a/recipes/etl/all/conandata.yml +++ b/recipes/etl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "20.37.2": + url: "https://github.com/ETLCPP/etl/archive/20.37.2.tar.gz" + sha256: "13bd5d9d1bfbc887e3182895ca0291df0008a1c5770ddd12ef6cd2215c2bc6af" "20.37.1": url: "https://github.com/ETLCPP/etl/archive/20.37.1.tar.gz" sha256: "73c29678e478eca9243c1d0c98e727a2249a7973d1429a847c669bccc65dca88" @@ -23,9 +26,3 @@ sources: "20.34.0": url: "https://github.com/ETLCPP/etl/archive/20.34.0.tar.gz" sha256: "56e25968f20167a161ee50c3eecda3daa91f696660ba59654c1afd22e502c465" - "20.33.0": - url: "https://github.com/ETLCPP/etl/archive/20.33.0.tar.gz" - sha256: "46068e44cc3cbd626fc8adc5344101b4654c675b9a5faec0c80989176419cd7d" - "20.32.1": - url: "https://github.com/ETLCPP/etl/archive/20.32.1.tar.gz" - sha256: "f39c8ccf33190303946dbcb2b251c86b4516234f57e0e87b83c0a28a1bdb059d" diff --git a/recipes/etl/config.yml b/recipes/etl/config.yml index 587b12dc52899..b1fd5bf4caa62 100644 --- a/recipes/etl/config.yml +++ b/recipes/etl/config.yml @@ -1,4 +1,6 @@ versions: + "20.37.2": + folder: all "20.37.1": folder: all "20.37.0": @@ -15,7 +17,3 @@ versions: folder: all "20.34.0": folder: all - "20.33.0": - folder: all - "20.32.1": - folder: all From bab9d5518f12717380651becf469f26fec1a8bac Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 21 Jul 2023 21:10:50 +0300 Subject: [PATCH 025/637] (#18742) matio: migrate to Conan v2 --- recipes/matio/all/CMakeLists.txt | 7 -- recipes/matio/all/conandata.yml | 12 --- recipes/matio/all/conanfile.py | 98 ++++++++++--------- recipes/matio/all/test_package/CMakeLists.txt | 7 +- recipes/matio/all/test_package/conanfile.py | 25 +++-- .../matio/all/test_v1_package/CMakeLists.txt | 8 ++ .../matio/all/test_v1_package/conanfile.py | 17 ++++ 7 files changed, 96 insertions(+), 78 deletions(-) delete mode 100644 recipes/matio/all/CMakeLists.txt create mode 100644 recipes/matio/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/matio/all/test_v1_package/conanfile.py diff --git a/recipes/matio/all/CMakeLists.txt b/recipes/matio/all/CMakeLists.txt deleted file mode 100644 index bd3083b512cb9..0000000000000 --- a/recipes/matio/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory(source_subfolder) diff --git a/recipes/matio/all/conandata.yml b/recipes/matio/all/conandata.yml index 8a659653f91f9..fec43221cc62a 100644 --- a/recipes/matio/all/conandata.yml +++ b/recipes/matio/all/conandata.yml @@ -14,29 +14,17 @@ sources: patches: "1.5.18": - patch_file: "patches/require-cmake-3.10.patch" - base_path: "source_subfolder" - patch_file: "patches/disable-hdf5-target.patch" - base_path: "source_subfolder" - patch_file: "patches/patch-apple-no-undefined.patch" - base_path: "source_subfolder" - patch_file: "patches/cmake-install-bundle.patch" - base_path: "source_subfolder" "1.5.19": - patch_file: "patches/require-cmake-3.10.patch" - base_path: "source_subfolder" - patch_file: "patches/patch-apple-no-undefined.patch" - base_path: "source_subfolder" - patch_file: "patches/cmake-install-bundle.patch" - base_path: "source_subfolder" "1.5.21": - patch_file: "patches/require-cmake-3.10.patch" - base_path: "source_subfolder" - patch_file: "patches/patch-apple-no-undefined.patch" - base_path: "source_subfolder" - patch_file: "patches/cmake-install-bundle.patch" - base_path: "source_subfolder" "1.5.23": - patch_file: "patches/require-cmake-3.10.patch" - base_path: "source_subfolder" - patch_file: "patches/cmake-install-bundle.patch" - base_path: "source_subfolder" diff --git a/recipes/matio/all/conanfile.py b/recipes/matio/all/conanfile.py index 213dcdf0eba5b..127218a42d277 100644 --- a/recipes/matio/all/conanfile.py +++ b/recipes/matio/all/conanfile.py @@ -1,42 +1,43 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.53.0" class MatioConan(ConanFile): name = "matio" + description = "Matio is a C library for reading and writing binary MATLAB MAT files." license = "BSD-2-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://sourceforge.net/projects/matio/" - description = "Matio is a C library for reading and writing binary MATLAB MAT files." - topics = ("conan", "matlab", "mat-file", "file-format", "hdf5") - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" - exports_sources = "CMakeLists.txt", "patches/*" + topics = ("matlab", "mat-file", "file-format", "hdf5") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], - "extended_sparse": [True, False], "fPIC": [True, False], + "extended_sparse": [True, False], "mat73": [True, False], "with_hdf5": [True, False], "with_zlib": [True, False], } default_options = { "shared": False, - "extended_sparse": True, "fPIC": True, + "extended_sparse": True, "mat73": True, "with_hdf5": True, "with_zlib": True, } - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -44,61 +45,64 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): if self.options.with_hdf5: - self.requires("hdf5/1.12.1") + self.requires("hdf5/1.14.1") if self.options.with_zlib: - self.requires("zlib/1.2.12") + self.requires("zlib/1.2.13") def validate(self): if not self.options.with_hdf5 and self.options.mat73: raise ConanInvalidConfiguration("Support of version 7.3 MAT files requires HDF5") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - - self._cmake = CMake(self) - self._cmake.definitions["MATIO_EXTENDED_SPARSE"] = self.options.extended_sparse - self._cmake.definitions["MATIO_PIC"] = self.options.get_safe("fPIC", True) - self._cmake.definitions["MATIO_SHARED"] = self.options.shared - self._cmake.definitions["MATIO_MAT73"] = self.options.mat73 - self._cmake.definitions["MATIO_WITH_HDF5"] = self.options.with_hdf5 - self._cmake.definitions["MATIO_WITH_ZLIB"] = self.options.with_zlib - self._cmake.definitions["HDF5_USE_STATIC_LIBRARIES"] = self.options.with_hdf5 and not self.options["hdf5"].shared - self._cmake.configure() - return self._cmake + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["MATIO_EXTENDED_SPARSE"] = self.options.extended_sparse + tc.variables["MATIO_PIC"] = self.options.get_safe("fPIC", True) + tc.variables["MATIO_SHARED"] = self.options.shared + tc.variables["MATIO_MAT73"] = self.options.mat73 + tc.variables["MATIO_WITH_HDF5"] = self.options.with_hdf5 + tc.variables["MATIO_WITH_ZLIB"] = self.options.with_zlib + tc.variables["HDF5_USE_STATIC_LIBRARIES"] = ( + self.options.with_hdf5 and not self.dependencies["hdf5"].options.shared + ) + tc.generate() + + tc = CMakeDeps(self) + tc.generate() def build(self): - self._patch_sources() - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("COPYING", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "COPYING", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): - if self.settings.compiler == "Visual Studio": + if is_msvc(self): self.cpp_info.libs = ["libmatio"] else: self.cpp_info.libs = ["matio"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["m"] + # TODO: remove in conan v2 bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) + self.output.info(f"Appending PATH environment variable: {bin_path}") self.env_info.PATH.append(bin_path) diff --git a/recipes/matio/all/test_package/CMakeLists.txt b/recipes/matio/all/test_package/CMakeLists.txt index f8b971e2db377..e5b668ec22178 100644 --- a/recipes/matio/all/test_package/CMakeLists.txt +++ b/recipes/matio/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(matio REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE matio::matio) diff --git a/recipes/matio/all/test_package/conanfile.py b/recipes/matio/all/test_package/conanfile.py index f96969845ae24..fae501d0afb9e 100644 --- a/recipes/matio/all/test_package/conanfile.py +++ b/recipes/matio/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools -import os.path +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os -class MatioTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain" + 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.settings): - 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/matio/all/test_v1_package/CMakeLists.txt b/recipes/matio/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/matio/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/matio/all/test_v1_package/conanfile.py b/recipes/matio/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..3053c8502b32d --- /dev/null +++ b/recipes/matio/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os.path + + +class MatioTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 2034cf1f86e0db54356fbc63f910939223040104 Mon Sep 17 00:00:00 2001 From: Tobulus Date: Fri, 21 Jul 2023 21:28:32 +0200 Subject: [PATCH 026/637] (#18760) [libmnl] migrate to v2 * [libmnl] migrate to v2 * add package_type * fix indentation --- recipes/libmnl/all/conanfile.py | 58 +++++++++---------- .../libmnl/all/test_package/CMakeLists.txt | 5 +- recipes/libmnl/all/test_package/conanfile.py | 20 +++++-- 3 files changed, 42 insertions(+), 41 deletions(-) diff --git a/recipes/libmnl/all/conanfile.py b/recipes/libmnl/all/conanfile.py index 14628c1889b0d..4542e12fe1d34 100644 --- a/recipes/libmnl/all/conanfile.py +++ b/recipes/libmnl/all/conanfile.py @@ -1,8 +1,12 @@ import os -from conans import ConanFile, tools, AutoToolsBuildEnvironment -from conans.errors import ConanInvalidConfiguration -required_conan_version = ">=1.29.1" +from conan import ConanFile +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.files import copy, get, rmdir, rm +from conan.tools.layout import basic_layout +from conan.errors import ConanInvalidConfiguration + +required_conan_version = ">=1.53.0" class LibmnlConan(ConanFile): name = "libmnl" @@ -14,50 +18,40 @@ class LibmnlConan(ConanFile): settings = "os", "compiler", "build_type", "arch" options = {"shared": [True, False], "fPIC": [True, False]} default_options = {"shared": False, "fPIC": True} - _autotools = None + package_type = "library" - @property - def _source_subfolder(self): - return "source_subfolder" + def layout(self): + basic_layout(self, src_folder="src") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = self.name + "-" + self.version - os.rename(extracted_dir, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def configure(self): if self.settings.os != "Linux": raise ConanInvalidConfiguration("libmnl is only supported on Linux") if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self) - conf_args = [] - if self.options.shared: - conf_args.extend(["--enable-shared", "--disable-static"]) - else: - conf_args.extend(["--disable-shared", "--enable-static"]) - self._autotools.configure(configure_dir=self._source_subfolder, args=conf_args) - return self._autotools + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def generate(self): + tc = AutotoolsToolchain(self) + tc.generate() def build(self): - autotools = self._configure_autotools() + autotools = Autotools(self) + autotools.configure() autotools.make() def package(self): - self.copy("COPYING", dst="licenses", src=self._source_subfolder) - autotools = self._configure_autotools() + copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) autotools.install() - tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.la") - tools.rmdir(os.path.join(self.package_folder, "share")) - tools.rmdir(os.path.join(self.package_folder, "etc")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "etc")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): self.cpp_info.libs = ["mnl"] diff --git a/recipes/libmnl/all/test_package/CMakeLists.txt b/recipes/libmnl/all/test_package/CMakeLists.txt index d4fdee1a8a79c..941d5b3d99ff8 100644 --- a/recipes/libmnl/all/test_package/CMakeLists.txt +++ b/recipes/libmnl/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ cmake_minimum_required(VERSION 3.1) project(PackageTest CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(libmnl REQUIRED) add_executable(example example.cpp) -target_link_libraries(example ${CONAN_LIBS}) +target_link_libraries(example libmnl::libmnl) diff --git a/recipes/libmnl/all/test_package/conanfile.py b/recipes/libmnl/all/test_package/conanfile.py index 58e0d68615142..39ac1b7b50008 100644 --- a/recipes/libmnl/all/test_package/conanfile.py +++ b/recipes/libmnl/all/test_package/conanfile.py @@ -1,11 +1,19 @@ import os -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 class LibmnlTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "example") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "example") + self.run(bin_path, env="conanrun") From 1ff9e0af57141bb476c471cb07d0955570111b8c Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 22 Jul 2023 05:32:06 +0900 Subject: [PATCH 027/637] (#18770) platform.hashing: add version 0.5.6 --- recipes/platform.hashing/all/conandata.yml | 3 +++ recipes/platform.hashing/all/conanfile.py | 6 ++++-- recipes/platform.hashing/config.yml | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/recipes/platform.hashing/all/conandata.yml b/recipes/platform.hashing/all/conandata.yml index c156d1c289438..f7e585564ab8a 100644 --- a/recipes/platform.hashing/all/conandata.yml +++ b/recipes/platform.hashing/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.5.6": + url: "https://github.com/linksplatform/Hashing/archive/refs/tags/cpp_0.5.6.tar.gz" + sha256: "b387d772750eea2187ca7ca0651ddd701e8f2ef6eb8d86a6f8dfda00193a4123" "0.5.5": url: "https://github.com/linksplatform/Hashing/archive/refs/tags/cpp_0.5.5.tar.gz" sha256: "8155f1d0b18cfdad7b93f6c41aaabbe655c9f7ce6bfddb10eae86156cbff02cf" diff --git a/recipes/platform.hashing/all/conanfile.py b/recipes/platform.hashing/all/conanfile.py index 8e331fda1698f..bb49b80ef8c5e 100644 --- a/recipes/platform.hashing/all/conanfile.py +++ b/recipes/platform.hashing/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy +from conan.tools.files import get, copy from conan.tools.layout import basic_layout from conan.tools.scm import Version from conan.tools.microsoft import is_msvc @@ -47,7 +47,9 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - if Version(self.version) >= "0.5.0": + if Version(self.version) >= "0.5.6": + self.requires("cpuinfo/cci.20220228", transitive_headers=True) + elif Version(self.version) >= "0.5.0": self.requires("cpu_features/0.8.0", transitive_headers=True) def package_id(self): diff --git a/recipes/platform.hashing/config.yml b/recipes/platform.hashing/config.yml index ee55970fe3a0b..4a9a6395456f8 100644 --- a/recipes/platform.hashing/config.yml +++ b/recipes/platform.hashing/config.yml @@ -1,4 +1,6 @@ versions: + "0.5.6": + folder: all "0.5.5": folder: all "0.4.0": From 247c1aa28707633adf61ca29c89ff44b179e2be1 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Sat, 22 Jul 2023 14:30:20 +0200 Subject: [PATCH 028/637] (#18805) cairo/all: bump deps --- recipes/cairo/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/cairo/all/conanfile.py b/recipes/cairo/all/conanfile.py index e1166eb30e7ea..1e8675e64a203 100644 --- a/recipes/cairo/all/conanfile.py +++ b/recipes/cairo/all/conanfile.py @@ -91,10 +91,10 @@ def requirements(self): if self.options.with_xlib or self.options.with_xlib_xrender or self.options.with_xcb: self.requires("xorg/system") if self.options.get_safe("with_glib", True): - self.requires("glib/2.76.2") + self.requires("glib/2.76.3") self.requires("zlib/1.2.13") self.requires("pixman/0.40.0") - self.requires("libpng/1.6.39") + self.requires("libpng/1.6.40") def package_id(self): if self.options.get_safe("with_glib") and not self.dependencies["glib"].options.shared: From 0a504008f4c4d535d53a595c1113c5c9ce3a2d90 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Sat, 22 Jul 2023 16:04:58 +0200 Subject: [PATCH 029/637] (#18699) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 24a3d8f44d647..d9f1bd61e113a 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -242,6 +242,7 @@ required_for_references: - embree3 - emio - enet +- enhex-generic_serialization - entityx - entt - enum-flags @@ -637,6 +638,7 @@ required_for_references: - picojson - pixman - pkgconf +- platform.delegates - platform.hashing - plutovg - poco @@ -659,6 +661,7 @@ required_for_references: - pystring - qhull - qpdf +- qt - quantlib - quaternions - quill From 0a58ce0309739ab2a9c52d79529f0b66df09ad4e Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 23 Jul 2023 03:05:08 +0900 Subject: [PATCH 030/637] (#18153) st_tree: support conan v2 * st_tree: support conan v2 * Simplify st_tree Conan recipe The upstream cmake is very simple, only copies headers files to include folder. Plus, it has testing and install steps, but we can simplify a lot by copying directly to the include folder without CMake steps. Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries --- recipes/st_tree/all/conanfile.py | 44 ++++++++----------- .../st_tree/all/test_package/CMakeLists.txt | 13 +++--- recipes/st_tree/all/test_package/conanfile.py | 24 +++++++--- 3 files changed, 41 insertions(+), 40 deletions(-) diff --git a/recipes/st_tree/all/conanfile.py b/recipes/st_tree/all/conanfile.py index 2654379b52b95..0f32eb68fb548 100644 --- a/recipes/st_tree/all/conanfile.py +++ b/recipes/st_tree/all/conanfile.py @@ -1,42 +1,36 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy import os -from conans.errors import ConanInvalidConfiguration -from conans import ConanFile, CMake, tools -required_conan_version = ">=1.33.0" +required_conan_version = ">=1.52.0" class STTreeConan(ConanFile): name = "st_tree" + description = "A fast and flexible c++ template class for tree data structures" license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" - description = "A fast and flexible c++ template class for tree data structures" - topics = ("stl", "container", "data-structures") homepage = "https://github.com/erikerlandson/st_tree" + topics = ("stl", "container", "data-structures", "tree", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True - @property - def _source_subfolder(self): - return "source_subfolder" + def package_id(self): + self.info.clear() - def source(self): - tools.get(**self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True) + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) - def _configure_cmake(self): - cmake = CMake(self) - cmake.configure(source_folder=self._source_subfolder) - return cmake + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy("LICENSE", "licenses", self._source_subfolder) - - cmake = self._configure_cmake() - cmake.install() - - tools.rmdir(os.path.join(self.package_folder, "lib")) - - def package_id(self): - self.info.header_only() + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, pattern="*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include")) def package_info(self): - self.cpp_info.filenames["cmake_find_package"] = "st_tree" - self.cpp_info.filenames["cmake_find_package_multi"] = "st_tree" + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/st_tree/all/test_package/CMakeLists.txt b/recipes/st_tree/all/test_package/CMakeLists.txt index bce4a94d44821..221a27bafd9ef 100644 --- a/recipes/st_tree/all/test_package/CMakeLists.txt +++ b/recipes/st_tree/all/test_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package CXX) +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(st_tree CONFIG REQUIRED) +find_package(st_tree REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} st_tree::st_tree) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) +target_link_libraries(${PROJECT_NAME} PRIVATE st_tree::st_tree) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/st_tree/all/test_package/conanfile.py b/recipes/st_tree/all/test_package/conanfile.py index 5d1d0c318d32c..ef5d7042163ec 100644 --- a/recipes/st_tree/all/test_package/conanfile.py +++ b/recipes/st_tree/all/test_package/conanfile.py @@ -1,9 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools -class STTreeTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + +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) @@ -11,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") From 4c0c17a4a0956d2c3d8b8610ceebeb7746b5301e Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Sat, 22 Jul 2023 11:22:09 -0700 Subject: [PATCH 031/637] (#18566) docs: Improve license attribute guidelines * docs: Improve license attribute guidelines This follow @jcar87 comment https://github.com/conan-io/conan-center-index/pull/18481#discussion_r1260070682 wtih extra formatting The main issue is there was contridicting sections and advice * Apply suggestions from code review Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> --------- Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> --- docs/adding_packages/conanfile_attributes.md | 13 ++++++------- docs/faqs.md | 10 +++++----- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/docs/adding_packages/conanfile_attributes.md b/docs/adding_packages/conanfile_attributes.md index 0044d960505ba..dba2fb82308f0 100644 --- a/docs/adding_packages/conanfile_attributes.md +++ b/docs/adding_packages/conanfile_attributes.md @@ -49,14 +49,13 @@ In order to create reproducible builds, we also "commit-lock" to the latest comm ### License Attribute -The mandatory license attribute of each recipe **should** be a [SPDX license](https://spdx.org/licenses/) [short Identifiers](https://spdx.dev/ids/) when applicable. - -Where the SPDX guidelines do not apply, packages should do the following: - -* Packages without a license or closed source cannot be accepted in ConanCenter, even if the code is publicly available in Github or other platforms. -* When some package is under the ["public domain"](https://fairuse.stanford.edu/overview/public-domain/welcome/) - these are not a license by itself. The author original intent and files should be respected, and the relevant files defining the "public domain" status should be the ones packaged in the "licenses" folder, for example the source repository README. The ``license`` field should be as close as the original one as possible, like ``license = "Public-domain"``. -* When a custom (e.g. project specific) license is given, the value should be set to `LicenseRef-` as a prefix, followed by the name of the file which contains the custom license. See [this example](https://github.com/conan-io/conan-center-index/blob/e604534bbe0ef56bdb1f8513b83404eff02aebc8/recipes/fft/all/conanfile.py#L8). For more details, [read this conversation](https://github.com/conan-io/conan-center-index/pull/4928/files#r596216206). +The license attribute is a mandatory field which provides the legal information that summarizes the contents saved in the package. These follow the +[SPDX license](https://spdx.org/licenses/) as a standard. This is for consummers, in particular in the enterprise sector, that do rely on SDPX compliant identifiers so that they can flag this as a custom license text. +* If the library has a license that has a SPDX identifier, use the [short Identifiers](https://spdx.dev/ids/). +* If the library has a license text that does not match a SPDX identifier, including custom wording disclaiming copyright or dedicating the words to the ["public domain"](https://fairuse.stanford.edu/overview/public-domain/welcome/), use the [SPDX License Expressions](https://spdx.github.io/spdx-spec/v2-draft/SPDX-license-expressions/), this can follow: + * `LicenseRef-` as a prefix, followed by the name of the library. For example:`LicenseRef-libfoo-public-domain` +* If the library makes no mention of a license and the terms of use - it **shall not be accepted in ConanCenter** , even if the code is publicly available in GitHub or any other platforms. ## Order of methods and attributes diff --git a/docs/faqs.md b/docs/faqs.md index b84d6e6a09102..8fc8cb331f121 100644 --- a/docs/faqs.md +++ b/docs/faqs.md @@ -10,7 +10,6 @@ This section gathers the most common questions from the community related to pac * [What is the policy on creating packages from pre-compiled binaries?](#what-is-the-policy-on-creating-packages-from-pre-compiled-binaries) * [Should reference names use `-` or `_`?](#should-reference-names-use---or-_) * [Why are CMake find/config files and pkg-config files not packaged?](#why-are-cmake-findconfig-files-and-pkg-config-files-not-packaged) - * [Should recipes export a recipe's license?](#should-recipes-export-a-recipes-license) * [Why recipes that use build tools (like CMake) that have packages in Conan Center do not use it as a build require by default?](#why-recipes-that-use-build-tools-like-cmake-that-have-packages-in-conan-center-do-not-use-it-as-a-build-require-by-default) * [How are rare build systems without generators packaged?](#how-are-rare-build-systems-without-generators-packaged) * [Are python requires allowed in the `conan-center-index`?](#are-python-requires-allowed-in-the-conan-center-index) @@ -24,6 +23,7 @@ This section gathers the most common questions from the community related to pac * [Doesn't this make debug builds useless?](#doesnt-this-make-debug-builds-useless) * [Can I remove an option from a recipe?](#can-i-remove-an-option-from-a-recipe) * [Can I split a project into an installer and library package?](#can-i-split-a-project-into-an-installer-and-library-package) + * [Should recipes export a recipe's license?](#should-recipes-export-a-recipes-license) * [What license should I use for Public Domain?](#what-license-should-i-use-for-public-domain) * [What license should I use for a custom project specific license?](#what-license-should-i-use-for-a-custom-project-specific-license) * [How do I flag a problem to a recipe consumer?](#how-do-i-flag-a-problem-to-a-recipe-consumer) @@ -103,10 +103,6 @@ If you really think this is an issue and there is something missing to cover the \* Take a look at the integrations section to learn more: https://docs.conan.io/1/integrations/build_system/cmake/cmake_find_package_generator.html -## Should recipes export a recipe's license? - -No, recipes do not need to export a recipe license. Recipes and all files contributed to this repository are licensed under the license in the root of the repository. Using any recipe from this repository or directly from conan-center implies the same licensing. - ## Why recipes that use build tools (like CMake) that have packages in Conan Center do not use it as a build require by default? We generally consider tools like CMake as a standard tool to have installed in your system. Having the `cmake` package as a build require in **all** the recipes that use it will be an overkill, as every build requirement is installed like a requirement and takes time to download. However, `cmake` could still be useful to use in your profile: @@ -209,6 +205,10 @@ After one month, we will welcome a PR removing the option that was deprecated. No. Some projects provide more than a simple library, but also applications. For those projects, both libraries and executables should be kept together under the same Conan package. In the past, we tried to separate popular projects, like Protobuf, and it proved to be a complex and hard task to be maintained, requiring custom patches to disable parts of the building. Also, with the [context](https://docs.conan.io/1/systems_cross_building/cross_building.html#conan-v1-24-and-newer) feature, we can use the same package as build requirement, for the same build platform, and as a regular requirement, for the host platform, when cross-building. It's recommended using 2 profiles in that case, one for build platform (where the compilation tools are being executed) and one for host platform (where the generated binaries will run). +## Should recipes export a recipe's license? + +No, recipes do not need to export a recipe license. Recipes and all files contributed to this repository are licensed under the license in the root of the repository. Using any recipe from this repository or directly from conan-center implies the same licensing. + ## What license should I use for Public Domain? See [License Attribute](adding_packages/conanfile_attributes.md#license-attribute) for details. From b87f8aae742a40a71c39a81336015f66427f94b4 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 22 Jul 2023 21:44:35 +0300 Subject: [PATCH 032/637] (#18262) glshaderpp: migrate to Conan v2 * glshaderpp: migrate to Conan v2 * glshaderpp: restore test_v1_package * glshaderpp: fix v1 test, add min msvc version --------- Co-authored-by: Uilian Ries --- recipes/glshaderpp/all/conanfile.py | 62 ++++++++++++------- .../all/test_package/CMakeLists.txt | 9 +-- .../glshaderpp/all/test_package/conanfile.py | 20 ++++-- .../{example.cpp => test_package.cpp} | 8 ++- .../all/test_v1_package/CMakeLists.txt | 8 +++ .../all/test_v1_package/conanfile.py | 19 ++++++ 6 files changed, 89 insertions(+), 37 deletions(-) rename recipes/glshaderpp/all/test_package/{example.cpp => test_package.cpp} (72%) create mode 100644 recipes/glshaderpp/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/glshaderpp/all/test_v1_package/conanfile.py diff --git a/recipes/glshaderpp/all/conanfile.py b/recipes/glshaderpp/all/conanfile.py index 5f5d7e6cc487c..047572c5d5dc7 100644 --- a/recipes/glshaderpp/all/conanfile.py +++ b/recipes/glshaderpp/all/conanfile.py @@ -1,25 +1,26 @@ -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + class GLShaderPPConan(ConanFile): name = "glshaderpp" - homepage = "https://gitlab-lepuy.iut.uca.fr/opengl/glshaderpp" description = "A lightweight header-only library to compile and link OpenGL GLSL shaders." - topics = ("opengl", "glsl", "shader", "header-only") - url = "https://github.com/conan-io/conan-center-index" - no_copy_source = True license = "LGPL-3.0-or-later" - settings = "compiler", "os", "arch", "build_type" - - @property - def _source_subfolder(self): - return "source_subfolder" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://gitlab-lepuy.iut.uca.fr/opengl/glshaderpp" + topics = ("opengl", "glsl", "shader", "header-only") - def package_id(self): - self.info.header_only() + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True @property def _minimum_cpp_standard(self): @@ -28,28 +29,45 @@ def _minimum_cpp_standard(self): @property def _minimum_compilers_version(self): return { - "Visual Studio": "17", "gcc": "7", "clang": "6", "apple-clang": "10", + "msvc": "193", + "Visual Studio": "17", } + 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"): - tools.check_min_cppstd(self, self._minimum_cpp_standard) + check_min_cppstd(self, self._minimum_cpp_standard) min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) if not min_version: - self.output.warn(f"{self.name} recipe lacks information about the {self.settings.compiler} compiler support.") + self.output.warning(f"{self.name} recipe lacks information about the {self.settings.compiler} compiler support.") else: - if tools.Version(self.settings.compiler.version) < min_version: - raise ConanInvalidConfiguration(f"{self.name} requires C++{self._minimum_cpp_standard} support. The current compiler {self.settings.compiler} {self.settings.compiler.version} does not support it.") + if Version(self.settings.compiler.version) < min_version: + raise ConanInvalidConfiguration( + f"{self.name} requires C++{self._minimum_cpp_standard} support. The current compiler" + f" {self.settings.compiler} {self.settings.compiler.version} does not support it." + ) def source(self): - tools.get(**self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") - self.copy("*", src=os.path.join(self._source_subfolder, "include"), dst="include") + copy(self, "LICENSE", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses")) + copy(self, "*", + src=os.path.join(self.source_folder, "include"), + dst=os.path.join(self.package_folder, "include")) def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.includedirs.append(os.path.join("include", "GLShaderPP")) diff --git a/recipes/glshaderpp/all/test_package/CMakeLists.txt b/recipes/glshaderpp/all/test_package/CMakeLists.txt index 7f0e01ff5256f..36af631b4dd6a 100644 --- a/recipes/glshaderpp/all/test_package/CMakeLists.txt +++ b/recipes/glshaderpp/all/test_package/CMakeLists.txt @@ -1,12 +1,9 @@ -cmake_minimum_required(VERSION 3.1) -project(PackageTest CXX) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) find_package(glew CONFIG REQUIRED) find_package(glshaderpp CONFIG REQUIRED) -add_executable(${PROJECT_NAME} example.cpp) +add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} glshaderpp::glshaderpp GLEW::GLEW) set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON) diff --git a/recipes/glshaderpp/all/test_package/conanfile.py b/recipes/glshaderpp/all/test_package/conanfile.py index b5aad28ecae40..8141b9ee65dbb 100644 --- a/recipes/glshaderpp/all/test_package/conanfile.py +++ b/recipes/glshaderpp/all/test_package/conanfile.py @@ -1,19 +1,27 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain" + test_type = "explicit" def requirements(self): + self.requires(self.tested_reference_str) self.requires("glew/2.2.0") + def layout(self): + cmake_layout(self) + def build(self): cmake = CMake(self) cmake.configure() cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "PackageTest") - 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/glshaderpp/all/test_package/example.cpp b/recipes/glshaderpp/all/test_package/test_package.cpp similarity index 72% rename from recipes/glshaderpp/all/test_package/example.cpp rename to recipes/glshaderpp/all/test_package/test_package.cpp index eb8a668f50e89..e8dce6ff7068b 100644 --- a/recipes/glshaderpp/all/test_package/example.cpp +++ b/recipes/glshaderpp/all/test_package/test_package.cpp @@ -1,11 +1,13 @@ -#include #include -#include #include #include +#include + +#include int main() { - GLShaderPP::CShaderException e("If you read this, GLShaderPP is happy :)", GLShaderPP::CShaderException::ExceptionType::LinkError); + GLShaderPP::CShaderException e("If you read this, GLShaderPP is happy :)", + GLShaderPP::CShaderException::ExceptionType::LinkError); std::cout << e.what() << '\n'; return EXIT_SUCCESS; } diff --git a/recipes/glshaderpp/all/test_v1_package/CMakeLists.txt b/recipes/glshaderpp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/glshaderpp/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/glshaderpp/all/test_v1_package/conanfile.py b/recipes/glshaderpp/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..6e16e1852823f --- /dev/null +++ b/recipes/glshaderpp/all/test_v1_package/conanfile.py @@ -0,0 +1,19 @@ +import os +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def requirements(self): + self.requires("glew/2.2.0") + + def build(self): + 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) From b7c8b17b6a07b501d35f39714904b299c6eaf3ae Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 22 Jul 2023 22:05:17 +0300 Subject: [PATCH 033/637] (#18272) seqan: migrate to Conan v2 * seqan: migrate to Conan v2 seqan: autoformat * seqan: restore test_v1_package * seqan: add cmake_find_package_multi to v1 * seqan: add -DNOMINMAX on Windows Otherwise std::min() and std::max() will fail. * configure() -> validate() Co-authored-by: Uilian Ries * seqan: fix indentation --------- Co-authored-by: Uilian Ries --- recipes/seqan/2.x.x/conanfile.py | 87 ++++++++++++------- .../seqan/2.x.x/test_package/CMakeLists.txt | 7 +- recipes/seqan/2.x.x/test_package/conanfile.py | 21 +++-- .../seqan/2.x.x/test_package/test_package.cpp | 5 +- .../2.x.x/test_v1_package/CMakeLists.txt | 8 ++ .../seqan/2.x.x/test_v1_package/conanfile.py | 17 ++++ 6 files changed, 102 insertions(+), 43 deletions(-) create mode 100644 recipes/seqan/2.x.x/test_v1_package/CMakeLists.txt create mode 100644 recipes/seqan/2.x.x/test_v1_package/conanfile.py diff --git a/recipes/seqan/2.x.x/conanfile.py b/recipes/seqan/2.x.x/conanfile.py index 5f567373a4d1a..fb2227d760d8f 100644 --- a/recipes/seqan/2.x.x/conanfile.py +++ b/recipes/seqan/2.x.x/conanfile.py @@ -1,56 +1,81 @@ import os -from conans import ConanFile, 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.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + class SeqanConan(ConanFile): name = "seqan" + description = ( + "SeqAn is an open source C++ library of efficient algorithms and data structures for the analysis of sequences " + "with the focus on biological data. Our library applies a unique generic design that guarantees high performance, " + "generality, extensibility, and integration with other libraries. " + "SeqAn is easy to use and simplifies the development of new software tools with a minimal loss of performance." + ) + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/seqan/seqan" - description = """ -SeqAn is an open source C++ library of efficient algorithms and data structures for the analysis of sequences -with the focus on biological data. Our library applies a unique generic design that guarantees high performance, -generality, extensibility, and integration with other libraries. -SeqAn is easy to use and simplifies the development of new software tools with a minimal loss of performance. -""" - topics = ("conan", "cpp98", "cpp11", "cpp14", "cpp17", - "algorithms", "data structures", "biological sequences") - license = "BSD-3-Clause" - settings = "compiler" + topics = ("algorithms", "data structures", "biological sequences", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 14 @property def _compilers_minimum_version(self): return { "gcc": "5", - "Visual Studio": "14", "clang": "3.4", - "apple-clang": "3.4" + "apple-clang": "3.4", + "msvc": "190", + "Visual Studio": "14", } - def configure(self): + def validate(self): if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, 14) + check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version: - if tools.Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration("seqan requires C++14, which your compiler does not fully support.") - else: - self.output.warn("seqan requires C++14. Your compiler is unknown. Assuming it supports C++14.") + if not minimum_version: + self.output.warning( + f"{self.name} requires C++{self._min_cppstd}. " + f"Your compiler is unknown. Assuming it supports C++{self._min_cppstd}." + ) + elif Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.name} requires C++{self._min_cppstd}, which your compiler does not fully support." + ) + + def layout(self): + basic_layout(self, src_folder="src") + def package_id(self): + self.info.clear() def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = "seqan-seqan-v" + self.version - os.rename(extracted_dir, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy("*", dst="include", - src=os.path.join(self._source_subfolder, "include"), keep_path=True) - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + copy(self, "*", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + keep_path=True) + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) - def package_id(self): - self.info.header_only() + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + if self.settings.os == "Windows": + self.cpp_info.defines = ["NOMINMAX"] diff --git a/recipes/seqan/2.x.x/test_package/CMakeLists.txt b/recipes/seqan/2.x.x/test_package/CMakeLists.txt index 64fd988616e27..6fdde597b12f4 100644 --- a/recipes/seqan/2.x.x/test_package/CMakeLists.txt +++ b/recipes/seqan/2.x.x/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +find_package(seqan REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} CONAN_PKG::seqan) +target_link_libraries(${PROJECT_NAME} PRIVATE seqan::seqan) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) diff --git a/recipes/seqan/2.x.x/test_package/conanfile.py b/recipes/seqan/2.x.x/test_package/conanfile.py index a59a26a52c8dc..fae501d0afb9e 100644 --- a/recipes/seqan/2.x.x/test_package/conanfile.py +++ b/recipes/seqan/2.x.x/test_package/conanfile.py @@ -1,10 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain" + 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.settings): - 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/seqan/2.x.x/test_package/test_package.cpp b/recipes/seqan/2.x.x/test_package/test_package.cpp index dd08405d3402d..d9a44258b866d 100644 --- a/recipes/seqan/2.x.x/test_package/test_package.cpp +++ b/recipes/seqan/2.x.x/test_package/test_package.cpp @@ -1,8 +1,9 @@ // Demo program for clipping with Gaps objects. -#include -#include #include +#include + +#include using namespace seqan; diff --git a/recipes/seqan/2.x.x/test_v1_package/CMakeLists.txt b/recipes/seqan/2.x.x/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/seqan/2.x.x/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/seqan/2.x.x/test_v1_package/conanfile.py b/recipes/seqan/2.x.x/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..abcaeed3f89b6 --- /dev/null +++ b/recipes/seqan/2.x.x/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 793ba6f9a241c0ea32b551bb4d6f6c3263f6331d Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 22 Jul 2023 22:36:17 +0300 Subject: [PATCH 034/637] (#18637) aws-libfabric: migrate to Conan v2 * aws-libfabric: migrate to Conan v2 * Update recipes/aws-libfabric/all/conanfile.py --------- Co-authored-by: Carlos Zoido --- recipes/aws-libfabric/all/conanfile.py | 113 ++++++++++-------- .../all/test_package/CMakeLists.txt | 9 +- .../all/test_package/conanfile.py | 21 +++- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../all/test_v1_package/conanfile.py | 17 +++ 5 files changed, 105 insertions(+), 63 deletions(-) create mode 100644 recipes/aws-libfabric/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/aws-libfabric/all/test_v1_package/conanfile.py diff --git a/recipes/aws-libfabric/all/conanfile.py b/recipes/aws-libfabric/all/conanfile.py index 134b19e72fb91..cdf0ee0dd3198 100644 --- a/recipes/aws-libfabric/all/conanfile.py +++ b/recipes/aws-libfabric/all/conanfile.py @@ -1,33 +1,44 @@ -from conans import ConanFile, AutoToolsBuildEnvironment, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.35.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.build import cross_building +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import chdir, collect_libs, copy, get, rm, rmdir +from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import unix_path + +required_conan_version = ">=1.53.0" + class LibfabricConan(ConanFile): name = "aws-libfabric" description = "AWS Libfabric" - topics = ("fabric", "communication", "framework", "service") + license = ("BSD-2-Clause", "GPL-2.0-or-later") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/aws/libfabric" - license = "BSD-2-Clause", "GPL-2.0-or-later" + topics = ("fabric", "communication", "framework", "service") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" _providers = ["gni", "psm", "psm2", "sockets", "rxm", "tcp", "udp", "usnic", "verbs", "bgq", "shm", "efa", "rxd", "mrail", "rstream", "perf", "hook_debug"] options = { + "shared": [True, False], + "fPIC": [True, False], **{ p: [True, False, "shared"] for p in _providers }, **{ - "shared": [True, False], - "fPIC": [True, False], "with_libnl": [True, False], "bgq_progress": ["auto", "manual"], "bgq_mr": ["basic", "scalable"] } } default_options = { + "shared": False, + "fPIC": True, **{ p: False for p in _providers }, **{ - "shared": False, - "fPIC": True, "tcp": True, "with_libnl": False, "bgq_progress": "manual", @@ -35,15 +46,6 @@ class LibfabricConan(ConanFile): } } - @property - def _source_subfolder(self): - return "source_subfolder" - - _autotools = None - - def build_requirements(self): - self.build_requires("libtool/2.4.6") - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -52,9 +54,12 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): if self.options.with_libnl: @@ -64,52 +69,56 @@ def validate(self): if self.settings.os == "Windows": raise ConanInvalidConfiguration("The libfabric package cannot be built on Windows.") - def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - with tools.chdir(self._source_subfolder): - self.run("{} -fiv".format(tools.get_env("AUTORECONF")), win_bash=tools.os_info.is_windows) + def build_requirements(self): + self.tool_requires("libtool/2.4.7") + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") yes_no_dl = lambda v: {"True": "yes", "False": "no", "shared": "dl"}[str(v)] - yes_no = lambda v: "yes" if v else "no" - args = [ - "--enable-shared={}".format(yes_no(self.options.shared)), - "--enable-static={}".format(yes_no(not self.options.shared)), + tc = AutotoolsToolchain(self) + tc.configure_args += [ "--with-bgq-progress={}".format(self.options.bgq_progress), "--with-bgq-mr={}".format(self.options.bgq_mr), ] for p in self._providers: - args.append("--enable-{}={}".format(p, yes_no_dl(getattr(self.options, p)))) + tc.configure_args.append("--enable-{}={}".format(p, yes_no_dl(getattr(self.options, p)))) if self.options.with_libnl: - args.append("--with-libnl={}".format(tools.unix_path(self.deps_cpp_info["libnl"].rootpath))), + tc.configure_args.append("--with-libnl={}".format(unix_path(self, self.dependencies["libnl"].package_folder))) else: - args.append("--with-libnl=no") + tc.configure_args.append("--with-libnl=no") if self.settings.build_type == "Debug": - args.append("--enable-debug") - self._autotools.configure(args=args, configure_dir=self._source_subfolder) - return self._autotools + tc.configure_args.append("--enable-debug") + tc.generate() + tc = AutotoolsDeps(self) + tc.generate() def build(self): - autotools = self._configure_autotools() - autotools.make() + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.autoreconf() + autotools.configure() + autotools.make() def package(self): - self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder) - autotools = self._configure_autotools() - autotools.install() - - tools.rmdir(os.path.join(self.package_folder, "share")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.la") + copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.install() + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rm(self, "*.la", self.package_folder, recursive=True) + fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.names["pkg_config"] = "libfabric" - self.cpp_info.libs = self.collect_libs() + self.cpp_info.set_property("pkg_config_name", "libfabric") + self.cpp_info.libs = collect_libs(self) if self.settings.os in ("FreeBSD", "Linux"): self.cpp_info.system_libs = ["pthread", "m"] if not self.options.shared: diff --git a/recipes/aws-libfabric/all/test_package/CMakeLists.txt b/recipes/aws-libfabric/all/test_package/CMakeLists.txt index 34af13462f44f..1af9ab7c6f511 100644 --- a/recipes/aws-libfabric/all/test_package/CMakeLists.txt +++ b/recipes/aws-libfabric/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(aws-libfabric REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE aws-libfabric::aws-libfabric) diff --git a/recipes/aws-libfabric/all/test_package/conanfile.py b/recipes/aws-libfabric/all/test_package/conanfile.py index d4128b0450777..ef5d7042163ec 100644 --- a/recipes/aws-libfabric/all/test_package/conanfile.py +++ b/recipes/aws-libfabric/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", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -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/aws-libfabric/all/test_v1_package/CMakeLists.txt b/recipes/aws-libfabric/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/aws-libfabric/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/aws-libfabric/all/test_v1_package/conanfile.py b/recipes/aws-libfabric/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/aws-libfabric/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + 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) From 77e3b1907f1ec247981a1214052371eada61070c Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 22 Jul 2023 23:07:55 +0300 Subject: [PATCH 035/637] (#18639) xsd: migrate to Conan v2 --- recipes/xsd/all/conandata.yml | 5 - recipes/xsd/all/conanfile.py | 116 +++++++++---------- recipes/xsd/all/test_package/conanfile.py | 11 +- recipes/xsd/all/test_v1_package/conanfile.py | 10 ++ 4 files changed, 73 insertions(+), 69 deletions(-) create mode 100644 recipes/xsd/all/test_v1_package/conanfile.py diff --git a/recipes/xsd/all/conandata.yml b/recipes/xsd/all/conandata.yml index d0b47cfe2aef6..342ac8fd08fed 100644 --- a/recipes/xsd/all/conandata.yml +++ b/recipes/xsd/all/conandata.yml @@ -5,12 +5,7 @@ sources: patches: "4.0.0": - patch_file: "patches/0002-missing-include.patch" - base_path: "source_subfolder" - patch_file: "patches/0100-C++Parser_Expat_support.patch" - base_path: "source_subfolder" - patch_file: "patches/0105-Fix_path_handling_bug.patch" - base_path: "source_subfolder" - patch_file: "patches/0110-xerces-c3.2.patch" - base_path: "source_subfolder" - patch_file: "patches/0700_hurd_PATH_MAX.patch" - base_path: "source_subfolder" diff --git a/recipes/xsd/all/conanfile.py b/recipes/xsd/all/conanfile.py index 19183a5008e25..8d9e15a3818f4 100644 --- a/recipes/xsd/all/conanfile.py +++ b/recipes/xsd/all/conanfile.py @@ -1,91 +1,87 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.40.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, rmdir +from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.52.0" class ConanXqilla(ConanFile): name = "xsd" - description = ( - "XSD is a W3C XML Schema to C++ translator. It generates vocabulary-specific, statically-typed C++ mappings (also called bindings) from XML Schema definitions. XSD supports two C++ mappings: in-memory C++/Tree and event-driven C++/Parser." + "XSD is a W3C XML Schema to C++ translator. " + "It generates vocabulary-specific, statically-typed C++ mappings (also called bindings) from XML Schema definitions. " + "XSD supports two C++ mappings: in-memory C++/Tree and event-driven C++/Parser." ) - topics = ("xsd", "xml", "c++") + license = ("GPL-2.0", "FLOSSE") url = "https://github.com/conan-io/conan-center-index" homepage = "https://codesynthesis.com/projects/xsd/" - license = ("GPL-2.0","FLOSSE") + topics = ("xml", "c++") + + package_type = "application" settings = "os", "arch", "compiler", "build_type" - exports_sources = "patches/**" + def export_sources(self): + export_conandata_patches(self) - @property - def _source_subfolder(self): - return "source_subfolder" + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): self.requires("xerces-c/3.2.3") - @property - def _doc_folder(self): - return os.path.join(self._source_subfolder,"xsd","doc") - - @property - def _make_cmd(self): - return self._gnumake_cmd - - @property - def _make_program(self): - return tools.get_env('CONAN_MAKE_PROGRAM', tools.which('make')) - - @property - def _gnumake_cmd(self): - make_ldflags = "LDFLAGS='{libs} -pthread'".format( - libs=" ".join(["-L{}".format(os.path.join(self.deps_cpp_info["xerces-c"].rootpath, it)) for it in self.deps_cpp_info["xerces-c"].libdirs])) - flags = [] - flags.append(' '.join(["-I{}".format(os.path.join(self.deps_cpp_info["xerces-c"].rootpath, it)) for it in self.deps_cpp_info["xerces-c"].includedirs])) - if self.settings.compiler == "gcc": - flags.append('-std=c++11') - make_ccpflags = "CPPFLAGS='{}'".format(" ".join(flags)) - make_cmd = f'{make_ldflags} {make_ccpflags} {self._make_program} -j{tools.cpu_count()}' - return make_cmd + def package_id(self): + del self.info.settings.compiler def validate(self): - if self.settings.os != "Linux": + if self.settings.os not in ["Linux", "FreeBSD"]: raise ConanInvalidConfiguration("The xsd recipe currently only supports Linux.") if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, 11) - - def package_id(self): - del self.info.settings.compiler + check_min_cppstd(self, 11) def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, - destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) + tc.extra_cxxflags = ["-std=c++11"] + tc.extra_ldflags = ["-pthread"] + tc.generate() + tc = AutotoolsDeps(self) + tc.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - - with tools.chdir(self._source_subfolder): - self.run(self._make_cmd) + apply_conandata_patches(self) + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.make() def package(self): - self.copy("LICENSE", dst="licenses", src=os.path.join(self._source_subfolder, "xsd")) - self.copy("GPLv2", dst="licenses", src=os.path.join(self._source_subfolder, "xsd")) - self.copy("FLOSSE", dst="licenses", src=os.path.join(self._source_subfolder, "xsd")) - - with tools.chdir(self._source_subfolder): - self.run(self._make_install_cmd) - - tools.rmdir(os.path.join(self.package_folder, "share")) + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=os.path.join(self.source_folder, "xsd")) + copy(self, "GPLv2", + dst=os.path.join(self.package_folder, "licenses"), + src=os.path.join(self.source_folder, "xsd")) + copy(self, "FLOSSE", + dst=os.path.join(self.package_folder, "licenses"), + src=os.path.join(self.source_folder, "xsd")) + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.install(args=[f"install_prefix={self.package_folder}"]) + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): + self.cpp_info.frameworkdirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] + self.cpp_info.includedirs = [] + + # TODO: to remove in conan v2 bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) + self.output.info(f"Appending PATH environment variable: {bin_path}") self.env_info.path.append(bin_path) - - @property - def _make_install_cmd(self): - make_install_cmd = f'{self._make_cmd} install_prefix={self.package_folder} install' - return make_install_cmd diff --git a/recipes/xsd/all/test_package/conanfile.py b/recipes/xsd/all/test_package/conanfile.py index 7ea50ba1ad430..fd802956c6269 100644 --- a/recipes/xsd/all/test_package/conanfile.py +++ b/recipes/xsd/all/test_package/conanfile.py @@ -1,10 +1,13 @@ -from conans import ConanFile, tools -import os +from conan import ConanFile class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" + generators = "VirtualBuildEnv" + test_type = "explicit" + + def build_requirements(self): + self.tool_requires(self.tested_reference_str) def test(self): - if not tools.cross_building(self): - self.run("xsd --help", run_environment=True) + self.run("xsd --help") diff --git a/recipes/xsd/all/test_v1_package/conanfile.py b/recipes/xsd/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..7ea50ba1ad430 --- /dev/null +++ b/recipes/xsd/all/test_v1_package/conanfile.py @@ -0,0 +1,10 @@ +from conans import ConanFile, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + + def test(self): + if not tools.cross_building(self): + self.run("xsd --help", run_environment=True) From 4e1dc323256090b271aa2246f1e9ef4585b864de Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 22 Jul 2023 23:47:13 +0300 Subject: [PATCH 036/637] (#18648) pbtools: migrate to Conan v2 --- recipes/pbtools/all/CMakeLists.txt | 7 --- recipes/pbtools/all/conanfile.py | 59 +++++++++++-------- .../pbtools/all/test_package/CMakeLists.txt | 5 +- recipes/pbtools/all/test_package/conanfile.py | 24 +++++--- .../all/test_v1_package/CMakeLists.txt | 8 +++ .../pbtools/all/test_v1_package/conanfile.py | 25 ++++++++ 6 files changed, 83 insertions(+), 45 deletions(-) delete mode 100644 recipes/pbtools/all/CMakeLists.txt create mode 100644 recipes/pbtools/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/pbtools/all/test_v1_package/conanfile.py diff --git a/recipes/pbtools/all/CMakeLists.txt b/recipes/pbtools/all/CMakeLists.txt deleted file mode 100644 index 432799d5aaab2..0000000000000 --- a/recipes/pbtools/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/lib) diff --git a/recipes/pbtools/all/conanfile.py b/recipes/pbtools/all/conanfile.py index 9aee2f753fe6d..98670e16a72dc 100644 --- a/recipes/pbtools/all/conanfile.py +++ b/recipes/pbtools/all/conanfile.py @@ -1,53 +1,60 @@ -import functools -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get + +required_conan_version = ">=1.53.0" class PbtoolsConan(ConanFile): name = "pbtools" description = "A Google Protocol Buffers C library" + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/eerimoq/pbtools" - license = "MIT" topics = ("protobuf", "serialization", "rpc", "protocol-buffers") - settings = ("os", "compiler", "build_type", "arch") - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} - exports_sources = "CMakeLists.txt" - generators = "cmake" - - @property - def _source_subfolder(self): - return "source_subfolder" - @property - def _build_subfolder(self): - return "build_subfolder" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } 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 validate(self): if self.settings.os == "Windows": raise ConanInvalidConfiguration("This library is not compatible with Windows") def source(self): - tools.get(**self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.configure(build_folder=self._build_subfolder) - return cmake + def generate(self): + tc = CMakeToolchain(self) + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure(build_script_folder="lib") cmake.build() def package(self): - self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): diff --git a/recipes/pbtools/all/test_package/CMakeLists.txt b/recipes/pbtools/all/test_package/CMakeLists.txt index 9f0ff5e7f11af..cd447f6cc0d27 100644 --- a/recipes/pbtools/all/test_package/CMakeLists.txt +++ b/recipes/pbtools/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(PackageTest C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(pbtools REQUIRED CONFIG) add_executable(test_package test_package.c hello_world.c) diff --git a/recipes/pbtools/all/test_package/conanfile.py b/recipes/pbtools/all/test_package/conanfile.py index 1ed584307b354..bd118a1d0023b 100644 --- a/recipes/pbtools/all/test_package/conanfile.py +++ b/recipes/pbtools/all/test_package/conanfile.py @@ -1,18 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" -class PbtoolsTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + def requirements(self): + self.requires(self.tested_reference_str) def build_requirements(self): if self.settings.os == "Macos" and self.settings.arch == "armv8": # Attempting to use @rpath without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being # set. This could be because you are using a Mac OS X version less than 10.5 # or because CMake's platform configuration is corrupt. - self.build_requires("cmake/3.20.1") + self.tool_requires("cmake/[>=3.20]") + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -20,6 +28,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/pbtools/all/test_v1_package/CMakeLists.txt b/recipes/pbtools/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/pbtools/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/pbtools/all/test_v1_package/conanfile.py b/recipes/pbtools/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..1ed584307b354 --- /dev/null +++ b/recipes/pbtools/all/test_v1_package/conanfile.py @@ -0,0 +1,25 @@ +import os + +from conans import ConanFile, CMake, tools + + +class PbtoolsTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build_requirements(self): + if self.settings.os == "Macos" and self.settings.arch == "armv8": + # Attempting to use @rpath without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being + # set. This could be because you are using a Mac OS X version less than 10.5 + # or because CMake's platform configuration is corrupt. + self.build_requires("cmake/3.20.1") + + def build(self): + 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) From 61564e7cf5d970ff8e004ce0105bc8256c3ce0ad Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 23 Jul 2023 00:27:31 +0300 Subject: [PATCH 037/637] (#18649) parg: migrate to Conan v2 * parg: migrate to Conan v2 * parg: fix_apple_shared_install_name() --- recipes/parg/all/CMakeLists.txt | 12 +-- recipes/parg/all/conanfile.py | 80 ++++++++++--------- recipes/parg/all/test_package/CMakeLists.txt | 5 +- recipes/parg/all/test_package/conanfile.py | 21 +++-- .../parg/all/test_v1_package/CMakeLists.txt | 8 ++ recipes/parg/all/test_v1_package/conanfile.py | 17 ++++ 6 files changed, 88 insertions(+), 55 deletions(-) create mode 100644 recipes/parg/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/parg/all/test_v1_package/conanfile.py diff --git a/recipes/parg/all/CMakeLists.txt b/recipes/parg/all/CMakeLists.txt index ea07630def81d..5aea9449b5c81 100644 --- a/recipes/parg/all/CMakeLists.txt +++ b/recipes/parg/all/CMakeLists.txt @@ -1,12 +1,6 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.15) project(cmake_wrapper) -include("conanbuildinfo.cmake") -conan_basic_setup() -set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - -add_subdirectory("source_subfolder") - -set_target_properties(parg PROPERTIES PUBLIC_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder/parg.h") - +add_subdirectory(src) +set_target_properties(parg PROPERTIES PUBLIC_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/src/parg.h") install(TARGETS parg) diff --git a/recipes/parg/all/conanfile.py b/recipes/parg/all/conanfile.py index 0e70a696cc039..4947f721cb4de 100644 --- a/recipes/parg/all/conanfile.py +++ b/recipes/parg/all/conanfile.py @@ -1,60 +1,68 @@ import os -from conans import ConanFile, CMake, tools + +from conan import ConanFile +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get + +required_conan_version = ">=1.53.0" class PargConan(ConanFile): name = "parg" + description = "Parser for argv that works similarly to getopt" license = "CC0-1.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/jibsen/parg" - description = "Parser for argv that works similarly to getopt" - topics = ("conan", 'getopt', 'c') - settings = "os", "arch", "compiler", "build_type" - options = {"shared": [True, False], - "fPIC": [True, False]} - default_options = {"shared": False, - "fPIC": True} - exports_sources = ["CMakeLists.txt"] - generators = "cmake", - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" + topics = ("getopt", "c") - def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } - def configure(self): - if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + 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_cmake(self): - if self._cmake: - return self._cmake - cmake = CMake(self) - cmake.configure(build_folder=self._build_subfolder) - self._cmake = cmake - return self._cmake + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = self.options.shared + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure(build_script_folder=self.export_sources_folder) cmake.build() def package(self): - self.copy("COPYING", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() + fix_apple_shared_install_name(self) def package_info(self): self.cpp_info.libs = ["parg"] diff --git a/recipes/parg/all/test_package/CMakeLists.txt b/recipes/parg/all/test_package/CMakeLists.txt index 187d95623fba1..ee46ccf27506c 100644 --- a/recipes/parg/all/test_package/CMakeLists.txt +++ b/recipes/parg/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(parg REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) diff --git a/recipes/parg/all/test_package/conanfile.py b/recipes/parg/all/test_package/conanfile.py index 86f0279553123..5030221edcc76 100644 --- a/recipes/parg/all/test_package/conanfile.py +++ b/recipes/parg/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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run("%s -h" % bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(f"{bin_path} -h", env="conanrun") diff --git a/recipes/parg/all/test_v1_package/CMakeLists.txt b/recipes/parg/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/parg/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/parg/all/test_v1_package/conanfile.py b/recipes/parg/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..86f0279553123 --- /dev/null +++ b/recipes/parg/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run("%s -h" % bin_path, run_environment=True) From ecd6a668b4f5438cd436070890a8d7fa8d18ddcf Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 23 Jul 2023 01:06:45 +0300 Subject: [PATCH 038/637] (#18651) imguizmo: migrate to Conan v2 * imguizmo: migrate to Conan v2 * imguizmo: get rid of version range in dep --- recipes/imguizmo/all/CMakeLists.txt | 19 +++--- recipes/imguizmo/all/conanfile.py | 60 +++++++++++-------- .../imguizmo/all/test_package/CMakeLists.txt | 12 ++-- .../imguizmo/all/test_package/conanfile.py | 22 +++++-- .../all/test_v1_package/CMakeLists.txt | 8 +++ .../imguizmo/all/test_v1_package/conanfile.py | 16 +++++ 6 files changed, 86 insertions(+), 51 deletions(-) create mode 100644 recipes/imguizmo/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/imguizmo/all/test_v1_package/conanfile.py diff --git a/recipes/imguizmo/all/CMakeLists.txt b/recipes/imguizmo/all/CMakeLists.txt index 73784d828761a..00a03f5032972 100644 --- a/recipes/imguizmo/all/CMakeLists.txt +++ b/recipes/imguizmo/all/CMakeLists.txt @@ -1,27 +1,22 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.15) project(imguizmo CXX) + set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) - -include(conanbuildinfo.cmake) -conan_basic_setup() - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) -set(SOURCE_DIR source_subfolder) +set(SOURCE_DIR src) file(GLOB SOURCE_FILES ${SOURCE_DIR}/*.cpp) file(GLOB HEADER_FILES ${SOURCE_DIR}/*.h) +find_package(imgui CONFIG REQUIRED) + add_library(${PROJECT_NAME} ${SOURCE_FILES}) target_include_directories(${PROJECT_NAME} PRIVATE ${SOURCE_DIR}) -target_link_libraries(${PROJECT_NAME} PUBLIC ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PUBLIC imgui::imgui) include(GNUInstallDirs) - -install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +install(TARGETS ${PROJECT_NAME}) install(FILES ${HEADER_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) diff --git a/recipes/imguizmo/all/conanfile.py b/recipes/imguizmo/all/conanfile.py index 62c65e6489c8b..57281934555cf 100644 --- a/recipes/imguizmo/all/conanfile.py +++ b/recipes/imguizmo/all/conanfile.py @@ -1,31 +1,33 @@ -import functools -from conans import ConanFile, CMake, tools +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get + +required_conan_version = ">=1.53.0" class ImGuizmoConan(ConanFile): name = "imguizmo" + description = "Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui" + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/CedricGuillemet/ImGuizmo" - description = "Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui" topics = ("imgui", "3d", "graphics", "guizmo") - license = "MIT" - settings = "os", "arch", "compiler", "build_type" - - exports_sources = ["CMakeLists.txt"] - generators = "cmake" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], - "fPIC": [True, False] + "fPIC": [True, False], } default_options = { "shared": False, - "fPIC": True + "fPIC": True, } - @property - def _source_subfolder(self): - return "source_subfolder" + 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": @@ -33,28 +35,34 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") - def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("imgui/1.87") + # 1.89 is the newest imgui version compatible with imguizmo + self.requires("imgui/1.89.3", transitive_headers=True) - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.configure() - return cmake + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure(build_script_folder=self.export_sources_folder) cmake.build() def package(self): - self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): diff --git a/recipes/imguizmo/all/test_package/CMakeLists.txt b/recipes/imguizmo/all/test_package/CMakeLists.txt index 4db4d9b97252b..bca22087e3920 100644 --- a/recipes/imguizmo/all/test_package/CMakeLists.txt +++ b/recipes/imguizmo/all/test_package/CMakeLists.txt @@ -1,13 +1,11 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -find_package(imgui REQUIRED) -find_package(imguizmo REQUIRED) +find_package(imgui REQUIRED CONFIG) +find_package(imguizmo REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} imgui::imgui) diff --git a/recipes/imguizmo/all/test_package/conanfile.py b/recipes/imguizmo/all/test_package/conanfile.py index 23ba95e79f465..ef5d7042163ec 100644 --- a/recipes/imguizmo/all/test_package/conanfile.py +++ b/recipes/imguizmo/all/test_package/conanfile.py @@ -1,9 +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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -11,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/imguizmo/all/test_v1_package/CMakeLists.txt b/recipes/imguizmo/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/imguizmo/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/imguizmo/all/test_v1_package/conanfile.py b/recipes/imguizmo/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..6c9d5dba712c7 --- /dev/null +++ b/recipes/imguizmo/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From ea21feadf70b8ff01a7754ee073bf6c19810c709 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 23 Jul 2023 01:46:32 +0300 Subject: [PATCH 039/637] (#18653) libipt: migrate to Conan v2 --- recipes/libipt/all/CMakeLists.txt | 7 -- recipes/libipt/all/conanfile.py | 80 +++++++++---------- .../libipt/all/test_package/CMakeLists.txt | 5 +- recipes/libipt/all/test_package/conanfile.py | 20 +++-- .../libipt/all/test_package/test_package.cpp | 3 +- .../libipt/all/test_v1_package/CMakeLists.txt | 8 ++ .../libipt/all/test_v1_package/conanfile.py | 18 +++++ 7 files changed, 80 insertions(+), 61 deletions(-) delete mode 100644 recipes/libipt/all/CMakeLists.txt create mode 100644 recipes/libipt/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/libipt/all/test_v1_package/conanfile.py diff --git a/recipes/libipt/all/CMakeLists.txt b/recipes/libipt/all/CMakeLists.txt deleted file mode 100644 index f62f6ae283c5f..0000000000000 --- a/recipes/libipt/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.0) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) - -add_subdirectory(source_subfolder) diff --git a/recipes/libipt/all/conanfile.py b/recipes/libipt/all/conanfile.py index 73c8a14fe3622..e7687b6d7c00d 100644 --- a/recipes/libipt/all/conanfile.py +++ b/recipes/libipt/all/conanfile.py @@ -1,30 +1,34 @@ -from conans import ConanFile, CMake, tools +import os + +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get + +required_conan_version = ">=1.53.0" -required_conan_version = ">=1.33.0" class LibIptConan(ConanFile): name = "libipt" + description = "Intel(R) Processor Trace Decoder Library" license = "BSD-3-Clause" - homepage = "https://github.com/intel/libipt" url = "https://github.com/conan-io/conan-center-index" - description = "Intel(R) Processor Trace Decoder Library" + homepage = "https://github.com/intel/libipt" topics = ("profiling", "tracing") - settings = "os", "compiler", "build_type", "arch" + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { - "shared": [True, False], - "fPIC": [True, False], + "shared": [True, False], + "fPIC": [True, False], } default_options = { - "shared": False, - "fPIC": True, + "shared": False, + "fPIC": True, } - generators = "cmake" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -32,43 +36,35 @@ def config_options(self): 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 validate(self): - pass + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) 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.configure() - return self._cmake + get(self, **self.conan_data["sources"][self.version], strip_root=True) - 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 _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) + def generate(self): + tc = CMakeToolchain(self) + tc.generate() def build(self): - self._patch_sources() - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") - cmake = self._configure_cmake() + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() def package_info(self): - self.cpp_info.libs = ["libipt"] if self.settings.os == "Windows" else ["ipt"] - self.cpp_info.set_property("cmake_file_name", "libipt") - self.cpp_info.set_property("cmake_target_name", "libipt::libipt") - + if self.settings.os == "Windows": + self.cpp_info.libs = ["libipt"] + else: + self.cpp_info.libs = ["ipt"] diff --git a/recipes/libipt/all/test_package/CMakeLists.txt b/recipes/libipt/all/test_package/CMakeLists.txt index 614fc23d88dda..9f56367278f32 100644 --- a/recipes/libipt/all/test_package/CMakeLists.txt +++ b/recipes/libipt/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(libipt REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/libipt/all/test_package/conanfile.py b/recipes/libipt/all/test_package/conanfile.py index a8c92dea63335..ef5d7042163ec 100644 --- a/recipes/libipt/all/test_package/conanfile.py +++ b/recipes/libipt/all/test_package/conanfile.py @@ -1,11 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools - 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) @@ -13,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/libipt/all/test_package/test_package.cpp b/recipes/libipt/all/test_package/test_package.cpp index 6b9e18b8eb133..26def6a295d25 100644 --- a/recipes/libipt/all/test_package/test_package.cpp +++ b/recipes/libipt/all/test_package/test_package.cpp @@ -1,9 +1,8 @@ #include -int main(int argc, char **argv) +int main() { pt_config cfg; pt_config_init(&cfg); - return 0; } diff --git a/recipes/libipt/all/test_v1_package/CMakeLists.txt b/recipes/libipt/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libipt/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libipt/all/test_v1_package/conanfile.py b/recipes/libipt/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..a8c92dea63335 --- /dev/null +++ b/recipes/libipt/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 9fd06ff6274bd443a27c4dd7fc4ca7bb7aa794da Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 23 Jul 2023 02:26:23 +0300 Subject: [PATCH 040/637] (#18655) whereami: migrate to Conan v2 --- recipes/whereami/all/CMakeLists.txt | 14 ++-- recipes/whereami/all/conanfile.py | 68 ++++++++++--------- .../whereami/all/test_package/CMakeLists.txt | 5 +- .../whereami/all/test_package/conanfile.py | 21 ++++-- .../all/test_v1_package/CMakeLists.txt | 8 +++ .../whereami/all/test_v1_package/conanfile.py | 17 +++++ 6 files changed, 82 insertions(+), 51 deletions(-) create mode 100644 recipes/whereami/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/whereami/all/test_v1_package/conanfile.py diff --git a/recipes/whereami/all/CMakeLists.txt b/recipes/whereami/all/CMakeLists.txt index 9ad1b58bfdd92..4595ccd0654eb 100644 --- a/recipes/whereami/all/CMakeLists.txt +++ b/recipes/whereami/all/CMakeLists.txt @@ -1,14 +1,11 @@ -cmake_minimum_required(VERSION 3.4.3) +cmake_minimum_required(VERSION 3.12) project(whereami C) -include(conanbuildinfo.cmake) -conan_basic_setup() - if (WIN32 AND BUILD_SHARED_LIBS) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) endif() -set(WHEREAMI_SRC "${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder") +set(WHEREAMI_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src") set(SOURCE_FILES ${WHEREAMI_SRC}/src/whereami.c) set(HEADER_FILES ${WHEREAMI_SRC}/src/whereami.h) @@ -17,9 +14,6 @@ add_library(${CMAKE_PROJECT_NAME} ${SOURCE_FILES} ${HEADER_FILES}) target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC ${WHEREAMI_SRC}/src) set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY C_STANDARD 99) -install(TARGETS ${CMAKE_PROJECT_NAME} - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) - +include(GNUInstallDirs) +install(TARGETS ${CMAKE_PROJECT_NAME}) install(FILES ${HEADER_FILES} DESTINATION include) diff --git a/recipes/whereami/all/conanfile.py b/recipes/whereami/all/conanfile.py index 323a8747c8641..6035268b447ee 100644 --- a/recipes/whereami/all/conanfile.py +++ b/recipes/whereami/all/conanfile.py @@ -1,58 +1,64 @@ -from conans import ConanFile, CMake, tools +import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get + +required_conan_version = ">=1.53.0" class WhereamiConan(ConanFile): name = "whereami" description = "Locate the current executable and the current module/library on the file system" - topics = ("whereami", "introspection", "getmodulefilename", - "dladdr", "executable-path", "getexecutablepath") + license = ("MIT", "WTFPL") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/gpakosz/whereami" - license = ("MIT", "WTFPL") - exports_sources = ["CMakeLists.txt"] - generators = "cmake" - settings = "os", "arch", "compiler", "build_type" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} + topics = ("whereami", "introspection", "getmodulefilename", "dladdr", "executable-path", "getexecutablepath") - _cmake = None + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } - @property - def _source_subfolder(self): - return "source_subfolder" + 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': + if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") - def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + def layout(self): + cmake_layout(self, src_folder="src") - def _configure_cmake(self): - if self._cmake: - return self._cmake + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) - self._cmake = CMake(self) - self._cmake.configure() - return self._cmake + def generate(self): + tc = CMakeToolchain(self) + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure(build_script_folder=self.export_sources_folder) cmake.build() def package(self): - self.copy(pattern="LICENSE.*", dst="licenses", - src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE.*", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): diff --git a/recipes/whereami/all/test_package/CMakeLists.txt b/recipes/whereami/all/test_package/CMakeLists.txt index 7c0f4c847fb31..4789557edaa68 100644 --- a/recipes/whereami/all/test_package/CMakeLists.txt +++ b/recipes/whereami/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(whereami REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) diff --git a/recipes/whereami/all/test_package/conanfile.py b/recipes/whereami/all/test_package/conanfile.py index 49a3a66ea5bad..ef5d7042163ec 100644 --- a/recipes/whereami/all/test_package/conanfile.py +++ b/recipes/whereami/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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -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/whereami/all/test_v1_package/CMakeLists.txt b/recipes/whereami/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/whereami/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/whereami/all/test_v1_package/conanfile.py b/recipes/whereami/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/whereami/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + 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) From 29ad596337985938836bfa0037c0e3929b90d393 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 23 Jul 2023 03:07:55 +0300 Subject: [PATCH 041/637] (#18658) rg-etc1: migrate to Conan v2 --- recipes/rg-etc1/all/CMakeLists.txt | 16 ++-- recipes/rg-etc1/all/conanfile.py | 75 ++++++++++--------- .../rg-etc1/all/test_package/CMakeLists.txt | 10 +-- recipes/rg-etc1/all/test_package/conanfile.py | 21 ++++-- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../rg-etc1/all/test_v1_package/conanfile.py | 17 +++++ 6 files changed, 89 insertions(+), 58 deletions(-) create mode 100644 recipes/rg-etc1/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/rg-etc1/all/test_v1_package/conanfile.py diff --git a/recipes/rg-etc1/all/CMakeLists.txt b/recipes/rg-etc1/all/CMakeLists.txt index 5f0b2b410ca60..5d4d0f4829476 100644 --- a/recipes/rg-etc1/all/CMakeLists.txt +++ b/recipes/rg-etc1/all/CMakeLists.txt @@ -1,22 +1,16 @@ cmake_minimum_required(VERSION 3.4) project(cmake_wrapper) -include(conanbuildinfo.cmake) -conan_basic_setup() - if(WIN32 AND BUILD_SHARED_LIBS) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) endif() -file(GLOB SRCS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder/*.cpp) -file(GLOB HDRS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder/*.h) +file(GLOB SRCS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp) +file(GLOB HDRS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.h) add_library(rg_etc1 ${SRCS_FILES}) -target_include_directories(rg_etc1 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder) +target_include_directories(rg_etc1 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src) -install(TARGETS rg_etc1 - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) +include(GNUInstallDirs) +install(TARGETS rg_etc1) install(FILES ${HDRS_FILES} DESTINATION include) diff --git a/recipes/rg-etc1/all/conanfile.py b/recipes/rg-etc1/all/conanfile.py index 43c69a50b6b5c..1a5ed53523f88 100644 --- a/recipes/rg-etc1/all/conanfile.py +++ b/recipes/rg-etc1/all/conanfile.py @@ -1,17 +1,22 @@ import os -import glob -from conans import ConanFile, CMake, tools + +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import collect_libs, copy, get, save + +required_conan_version = ">=1.53.0" class RgEtc1Conan(ConanFile): name = "rg-etc1" description = "A performant, easy to use, and high quality 4x4 pixel block packer/unpacker for the ETC1." - homepage = "https://github.com/richgel999/rg-etc1" - url = "https://github.com/conan-io/conan-center-index" - topics = ("conan", "etc1", "packer", "unpacker") license = "Zlib" - exports_sources = ["CMakeLists.txt"] - generators = "cmake" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/richgel999/rg-etc1" + topics = ("etc1", "packer", "unpacker") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -22,53 +27,51 @@ class RgEtc1Conan(ConanFile): "fPIC": True, } - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - - def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = glob.glob('rg-etc1-*/')[0] - os.rename(extracted_dir, self._source_subfolder) + 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': + 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 _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure(build_script_folder=self.export_sources_folder) cmake.build() def _extract_license(self): - with open(os.path.join(self._source_subfolder, "rg_etc1.h")) as f: + with open(os.path.join(self.source_folder, "rg_etc1.h")) as f: content_lines = f.readlines() license_content = [] for i in range(52, 75): license_content.append(content_lines[i][2:-1]) - tools.save("LICENSE", "\n".join(license_content)) + save(self, os.path.join(self.package_folder, "licenses", "LICENSE"), "\n".join(license_content)) def package(self): - cmake = self._configure_cmake() - cmake.install() self._extract_license() - self.copy(pattern="LICENSE", dst="licenses") + cmake = CMake(self) + cmake.install() def package_info(self): - self.cpp_info.libs = tools.collect_libs(self) + self.cpp_info.libs = ["rg_etc1"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m"] diff --git a/recipes/rg-etc1/all/test_package/CMakeLists.txt b/recipes/rg-etc1/all/test_package/CMakeLists.txt index 196188113685c..249e96fb582fb 100644 --- a/recipes/rg-etc1/all/test_package/CMakeLists.txt +++ b/recipes/rg-etc1/all/test_package/CMakeLists.txt @@ -1,8 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(rg-etc1 REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE rg-etc1::rg-etc1) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/rg-etc1/all/test_package/conanfile.py b/recipes/rg-etc1/all/test_package/conanfile.py index bd7165a553cf4..ef5d7042163ec 100644 --- a/recipes/rg-etc1/all/test_package/conanfile.py +++ b/recipes/rg-etc1/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", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/rg-etc1/all/test_v1_package/CMakeLists.txt b/recipes/rg-etc1/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/rg-etc1/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/rg-etc1/all/test_v1_package/conanfile.py b/recipes/rg-etc1/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..7e2dfe859bb27 --- /dev/null +++ b/recipes/rg-etc1/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 43a907ca4c560e9a450326950c862812611531e3 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 23 Jul 2023 03:47:27 +0300 Subject: [PATCH 042/637] (#18662) libslz: migrate to Conan v2 --- recipes/libslz/all/CMakeLists.txt | 17 ++---- recipes/libslz/all/conanfile.py | 54 ++++++++++--------- .../libslz/all/test_package/CMakeLists.txt | 7 +-- recipes/libslz/all/test_package/conanfile.py | 19 +++++-- .../libslz/all/test_v1_package/CMakeLists.txt | 8 +++ .../libslz/all/test_v1_package/conanfile.py | 17 ++++++ 6 files changed, 75 insertions(+), 47 deletions(-) create mode 100644 recipes/libslz/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/libslz/all/test_v1_package/conanfile.py diff --git a/recipes/libslz/all/CMakeLists.txt b/recipes/libslz/all/CMakeLists.txt index 3086b45fa1be2..84ba240aba82b 100644 --- a/recipes/libslz/all/CMakeLists.txt +++ b/recipes/libslz/all/CMakeLists.txt @@ -1,24 +1,17 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.12) project(slz LANGUAGES C) -include(conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) - -include(GNUInstallDirs) - -add_library(slz source_subfolder/src/slz.c) -include_directories(source_subfolder/src) +add_library(slz src/src/slz.c) +include_directories(src/src) set_target_properties(slz PROPERTIES - PUBLIC_HEADER source_subfolder/src/slz.h + PUBLIC_HEADER src/src/slz.h WINDOWS_EXPORT_ALL_SYMBOLS ON C_STANDARD 11 C_EXTENSIONS ON ) +include(GNUInstallDirs) install( TARGETS slz - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) diff --git a/recipes/libslz/all/conanfile.py b/recipes/libslz/all/conanfile.py index b33407244e1eb..56bb34708956f 100644 --- a/recipes/libslz/all/conanfile.py +++ b/recipes/libslz/all/conanfile.py @@ -1,17 +1,23 @@ -import functools -from conans import ConanFile, CMake, tools -from conans.tools import ConanInvalidConfiguration +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get from conan.tools.microsoft import is_msvc -required_conan_version = ">=1.43.0" +required_conan_version = ">=1.53.0" + class LibslzConan(ConanFile): name = "libslz" description = "Simple, modern libpng alternative " - topics = ("zlib", "compression",) license = "X11" url = "https://github.com/conan-io/conan-center-index" homepage = "http://www.libslz.org/" + topics = ("zlib", "compression") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -21,14 +27,9 @@ class LibslzConan(ConanFile): "shared": False, "fPIC": True, } - generators = "cmake" - - @property - def _source_subfolder(self): - return "source_subfolder" def export_sources(self): - self.copy("CMakeLists.txt") + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) def config_options(self): if self.settings.os == "Windows": @@ -36,31 +37,34 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def validate(self): if is_msvc(self): - raise ConanInvalidConfiguration("{}/{} does not support Visual Studio.".format(self.name, self.version)) + raise ConanInvalidConfiguration(f"{self.ref} does not support MSVC.") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.configure() - return cmake + def generate(self): + tc = CMakeToolchain(self) + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure(build_script_folder=self.export_sources_folder) cmake.build() def package(self): - self.copy("LICENSE", src=self._source_subfolder, dst="licenses", ignore_case=True, keep_path=False) - cmake = self._configure_cmake() + copy(self, "LICENSE", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses"), keep_path=False) + cmake = CMake(self) cmake.install() def package_info(self): diff --git a/recipes/libslz/all/test_package/CMakeLists.txt b/recipes/libslz/all/test_package/CMakeLists.txt index 13e3af8ad2791..14c66f6f3d628 100644 --- a/recipes/libslz/all/test_package/CMakeLists.txt +++ b/recipes/libslz/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(libslz REQUIRED) +find_package(libslz REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} libslz::libslz) diff --git a/recipes/libslz/all/test_package/conanfile.py b/recipes/libslz/all/test_package/conanfile.py index 19e6a0c06e3d8..fae501d0afb9e 100644 --- a/recipes/libslz/all/test_package/conanfile.py +++ b/recipes/libslz/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" + generators = "CMakeDeps", "CMakeToolchain" + 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/libslz/all/test_v1_package/CMakeLists.txt b/recipes/libslz/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libslz/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libslz/all/test_v1_package/conanfile.py b/recipes/libslz/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..38f4483872d47 --- /dev/null +++ b/recipes/libslz/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 2037dc950bd85fb76c76f15419b3c8b062f3098e Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 23 Jul 2023 04:26:59 +0300 Subject: [PATCH 043/637] (#18664) iqa: migrate to Conan v2 --- recipes/iqa/all/CMakeLists.txt | 18 ++--- recipes/iqa/all/conanfile.py | 65 +++++++++---------- recipes/iqa/all/test_package/CMakeLists.txt | 7 +- recipes/iqa/all/test_package/conanfile.py | 23 +++++-- .../iqa/all/test_v1_package/CMakeLists.txt | 8 +++ recipes/iqa/all/test_v1_package/conanfile.py | 17 +++++ 6 files changed, 80 insertions(+), 58 deletions(-) create mode 100644 recipes/iqa/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/iqa/all/test_v1_package/conanfile.py diff --git a/recipes/iqa/all/CMakeLists.txt b/recipes/iqa/all/CMakeLists.txt index 04c167a387fc1..6b7355d415953 100644 --- a/recipes/iqa/all/CMakeLists.txt +++ b/recipes/iqa/all/CMakeLists.txt @@ -1,22 +1,16 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.12) project(cmake_wrapper) -include(conanbuildinfo.cmake) -conan_basic_setup() - if(MSVC AND BUILD_SHARED_LIBS) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) endif() -file(GLOB IQA_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder/source/*.c) -file(GLOB IQA_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder/include/*.h) +file(GLOB IQA_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/source/*.c) +file(GLOB IQA_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/include/*.h) add_library(iqa ${IQA_SOURCES}) -target_include_directories(iqa PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder/include) +target_include_directories(iqa PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/include) -install(TARGETS iqa - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin -) +include(GNUInstallDirs) +install(TARGETS iqa) install(FILES ${IQA_HEADERS} DESTINATION include) diff --git a/recipes/iqa/all/conanfile.py b/recipes/iqa/all/conanfile.py index 1f64617c87676..5fed7c16effcf 100644 --- a/recipes/iqa/all/conanfile.py +++ b/recipes/iqa/all/conanfile.py @@ -1,16 +1,22 @@ import os -import glob -from conans import ConanFile, CMake, tools + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import collect_libs, copy, get, save + +required_conan_version = ">=1.53.0" class IqaConan(ConanFile): name = "iqa" description = "Image Quality Analysis Library" license = "BSD-3-Clause" - topics = ("conan", "iqa", "image", "quality", "analysis") - homepage = "https://github.com/tjdistler/iqa" url = "https://github.com/conan-io/conan-center-index" - settings = "os", "compiler", "build_type", "arch" + homepage = "https://github.com/tjdistler/iqa" + topics = ("image", "quality", "analysis") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -19,18 +25,9 @@ class IqaConan(ConanFile): "shared": False, "fPIC": True, } - exports_sources = ["CMakeLists.txt"] - generators = "cmake" - - _cmake = None - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" + 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": @@ -38,40 +35,38 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.cppstd - del self.settings.compiler.libcxx + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = glob.glob('iqa-*/')[0] - os.rename(extracted_dir, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + def generate(self): + tc = CMakeToolchain(self) + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure(build_script_folder=self.export_sources_folder) cmake.build() def _extract_license(self): - content_lines = open(os.path.join(self._source_subfolder, "include", "iqa.h")).readlines() + content_lines = open(os.path.join(self.source_folder, "include", "iqa.h")).readlines() license_content = [] for i in range(1, 31): license_content.append(content_lines[i][3:-1]) - tools.save("LICENSE", "\n".join(license_content)) + save(self, os.path.join(self.package_folder, "licenses", "LICENSE"), "\n".join(license_content)) def package(self): - cmake = self._configure_cmake() - cmake.install() self._extract_license() - self.copy("LICENSE", dst="licenses") + cmake = CMake(self) + cmake.install() def package_info(self): - self.cpp_info.libs = tools.collect_libs(self) + self.cpp_info.libs = collect_libs(self) if self.settings.os == "Linux": self.cpp_info.system_libs = ["m"] diff --git a/recipes/iqa/all/test_package/CMakeLists.txt b/recipes/iqa/all/test_package/CMakeLists.txt index 094a38e418f47..5401493431040 100644 --- a/recipes/iqa/all/test_package/CMakeLists.txt +++ b/recipes/iqa/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(PackageTest C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(iqa REQUIRED CONFIG) add_executable(test_package test_package.c) -target_link_libraries(test_package ${CONAN_LIBS}) +target_link_libraries(test_package PRIVATE iqa::iqa) diff --git a/recipes/iqa/all/test_package/conanfile.py b/recipes/iqa/all/test_package/conanfile.py index 02bdaace3b783..ef5d7042163ec 100644 --- a/recipes/iqa/all/test_package/conanfile.py +++ b/recipes/iqa/all/test_package/conanfile.py @@ -1,10 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools -class TestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" +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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/iqa/all/test_v1_package/CMakeLists.txt b/recipes/iqa/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/iqa/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/iqa/all/test_v1_package/conanfile.py b/recipes/iqa/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..54e4743603cf3 --- /dev/null +++ b/recipes/iqa/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From b91047ad2c32fa74ad00c9fd870d364c4abca815 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 23 Jul 2023 05:08:04 +0300 Subject: [PATCH 044/637] (#18665) astro-informatics-so3: migrate to Conan v2 --- .../astro-informatics-so3/all/CMakeLists.txt | 7 -- .../astro-informatics-so3/all/conanfile.py | 81 ++++++++++--------- .../all/test_package/CMakeLists.txt | 7 +- .../all/test_package/conanfile.py | 21 +++-- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../all/test_v1_package/conanfile.py | 17 ++++ 6 files changed, 87 insertions(+), 54 deletions(-) delete mode 100644 recipes/astro-informatics-so3/all/CMakeLists.txt create mode 100644 recipes/astro-informatics-so3/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/astro-informatics-so3/all/test_v1_package/conanfile.py diff --git a/recipes/astro-informatics-so3/all/CMakeLists.txt b/recipes/astro-informatics-so3/all/CMakeLists.txt deleted file mode 100644 index 0496b29838549..0000000000000 --- a/recipes/astro-informatics-so3/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.0) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory(source_subfolder) diff --git a/recipes/astro-informatics-so3/all/conanfile.py b/recipes/astro-informatics-so3/all/conanfile.py index 24be830f3db99..e7486ed5b8c5a 100644 --- a/recipes/astro-informatics-so3/all/conanfile.py +++ b/recipes/astro-informatics-so3/all/conanfile.py @@ -1,69 +1,78 @@ -from conans import CMake, ConanFile, tools -from conans.errors import ConanInvalidConfiguration +import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.53.0" class AstroInformaticsSO3(ConanFile): name = "astro-informatics-so3" + description = "Fast and accurate Wigner transforms" license = "GPL-3.0-or-later" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/astro-informatics/so3" - description = "Fast and accurate Wigner transforms" - settings = "os", "arch", "compiler", "build_type" topics = ("physics", "astrophysics", "radio interferometry") - options = {"fPIC": [True, False]} - default_options = {"fPIC": True} - - generators = "cmake", "cmake_find_package" - exports_sources = ["CMakeLists.txt"] - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): - del self.settings.compiler.cppstd - del self.settings.compiler.libcxx + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): + self.requires("ssht/1.4.0", transitive_headers=True) self.requires("fftw/3.3.9") - self.requires("ssht/1.3.7") def validate(self): - if self.settings.compiler == "Visual Studio": + if is_msvc(self): raise ConanInvalidConfiguration( "Visual Studio not supported, since SO3 requires C99 support for complex numbers" ) def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - @property - def cmake(self): - if not hasattr(self, "_cmake"): - self._cmake = CMake(self) - self._cmake.definitions["conan_deps"] = False - self._cmake.definitions["BUILD_TESTING"] = 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["conan_deps"] = False + tc.variables["CONAN_EXPORTED"] = True + tc.variables["BUILD_TESTING"] = False + tc.generate() + deps = CMakeDeps(self) + deps.set_property("fftw", "cmake_target_name", "FFTW3::FFTW3") + deps.generate() def build(self): - self.cmake.build() + cmake = CMake(self) + cmake.configure() + cmake.build() def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - self.cmake.install() + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) + cmake.install() def package_info(self): self.cpp_info.libs = ["astro-informatics-so3"] diff --git a/recipes/astro-informatics-so3/all/test_package/CMakeLists.txt b/recipes/astro-informatics-so3/all/test_package/CMakeLists.txt index aecca63b59f68..6e7e3d57dba81 100644 --- a/recipes/astro-informatics-so3/all/test_package/CMakeLists.txt +++ b/recipes/astro-informatics-so3/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -find_package(astro-informatics-so3 REQUIRED NO_MODULE) +find_package(astro-informatics-so3 REQUIRED CONFIG) add_executable(${PROJECT_NAME} example.c) target_compile_features(${PROJECT_NAME} PUBLIC c_std_99) diff --git a/recipes/astro-informatics-so3/all/test_package/conanfile.py b/recipes/astro-informatics-so3/all/test_package/conanfile.py index abcaeed3f89b6..ef5d7042163ec 100644 --- a/recipes/astro-informatics-so3/all/test_package/conanfile.py +++ b/recipes/astro-informatics-so3/all/test_package/conanfile.py @@ -1,10 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/astro-informatics-so3/all/test_v1_package/CMakeLists.txt b/recipes/astro-informatics-so3/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/astro-informatics-so3/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/astro-informatics-so3/all/test_v1_package/conanfile.py b/recipes/astro-informatics-so3/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..abcaeed3f89b6 --- /dev/null +++ b/recipes/astro-informatics-so3/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 2703f9515f6594d2de93f10c8ca72a719e35fd34 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 23 Jul 2023 05:47:06 +0300 Subject: [PATCH 045/637] (#18671) libmbus: migrate to Conan v2 --- recipes/libmbus/all/CMakeLists.txt | 7 -- recipes/libmbus/all/conanfile.py | 87 +++++++++---------- .../libmbus/all/test_package/CMakeLists.txt | 9 +- recipes/libmbus/all/test_package/conanfile.py | 22 +++-- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../libmbus/all/test_v1_package/conanfile.py | 18 ++++ 6 files changed, 85 insertions(+), 66 deletions(-) delete mode 100644 recipes/libmbus/all/CMakeLists.txt create mode 100644 recipes/libmbus/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/libmbus/all/test_v1_package/conanfile.py diff --git a/recipes/libmbus/all/CMakeLists.txt b/recipes/libmbus/all/CMakeLists.txt deleted file mode 100644 index 361b35d4c17d9..0000000000000 --- a/recipes/libmbus/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8.11) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory(source_subfolder) diff --git a/recipes/libmbus/all/conanfile.py b/recipes/libmbus/all/conanfile.py index 5c3ff6e87aae2..841dbf22c8b0d 100644 --- a/recipes/libmbus/all/conanfile.py +++ b/recipes/libmbus/all/conanfile.py @@ -1,36 +1,31 @@ import os -from conans import CMake, ConanFile, tools -from conans.errors import ConanInvalidConfiguration + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir + +required_conan_version = ">=1.53.0" class LibMbusConan(ConanFile): name = "libmbus" + description = "Meter-bus library and utility programs" license = "BSD-3-Clause" - homepage = "https://github.com/rscada/libmbus" url = "https://github.com/conan-io/conan-center-index" - description = """Meter-bus library and utility programs""" - topics = "conan", "mbus", "metering", "iot", "meter", "bus", "protocol" - exports_sources = "CMakeLists.txt" - settings = "os", "compiler", "build_type", "arch" + homepage = "https://github.com/rscada/libmbus" + topics = ("mbus", "metering", "iot", "meter", "bus", "protocol") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], - "fPIC": [True, False] + "fPIC": [True, False], } default_options = { "shared": False, - "fPIC": True + "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" def config_options(self): if self.settings.os == "Windows": @@ -38,43 +33,41 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): if self.settings.os not in ["Linux"]: - raise ConanInvalidConfiguration("Only Linux supported") - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + raise ConanInvalidConfiguration("Only Linux is supported") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = self.name + "-" + \ - os.path.basename( - self.conan_data["sources"][self.version]["url"]).split(".")[0] - os.rename(extracted_dir, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions['LIBMBUS_ENABLE_COVERAGE'] = False - self._cmake.definitions['LIBMBUS_BUILD_TESTS'] = False - self._cmake.definitions['LIBMBUS_BUILD_EXAMPLES'] = False - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + def generate(self): + tc = CMakeToolchain(self) + tc.variables["LIBMBUS_ENABLE_COVERAGE"] = False + tc.variables["LIBMBUS_BUILD_TESTS"] = False + tc.variables["LIBMBUS_BUILD_EXAMPLES"] = False + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") - cmake = self._configure_cmake() + copy(self, "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, "share")) - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) - tools.rmdir(os.path.join(self.package_folder, - "lib", "libmbus", "cmake")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "libmbus", "cmake")) def package_info(self): - self.cpp_info.libs = tools.collect_libs(self) - if self.settings.os == "Linux": + self.cpp_info.libs = ["libmbus"] + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["pthread", "m"] diff --git a/recipes/libmbus/all/test_package/CMakeLists.txt b/recipes/libmbus/all/test_package/CMakeLists.txt index 34af13462f44f..076d1645a34b0 100644 --- a/recipes/libmbus/all/test_package/CMakeLists.txt +++ b/recipes/libmbus/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(libmbus REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE libmbus::libmbus) diff --git a/recipes/libmbus/all/test_package/conanfile.py b/recipes/libmbus/all/test_package/conanfile.py index 933dbf96533ae..fae501d0afb9e 100644 --- a/recipes/libmbus/all/test_package/conanfile.py +++ b/recipes/libmbus/all/test_package/conanfile.py @@ -1,11 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain" + test_type = "explicit" -class TestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - bin_path = 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/libmbus/all/test_v1_package/CMakeLists.txt b/recipes/libmbus/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libmbus/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libmbus/all/test_v1_package/conanfile.py b/recipes/libmbus/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..9de3689208f00 --- /dev/null +++ b/recipes/libmbus/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class TestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + bin_path = self.run(bin_path, run_environment=True) From 1214ee4ecc21e09c2bb471df8f4fd1249d0a0927 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 23 Jul 2023 06:27:12 +0300 Subject: [PATCH 046/637] (#18703) libgta: migrate to Conan v2 --- recipes/libgta/all/CMakeLists.txt | 7 -- recipes/libgta/all/conanfile.py | 102 ++++++++++-------- .../libgta/all/test_package/CMakeLists.txt | 7 +- recipes/libgta/all/test_package/conanfile.py | 21 ++-- .../libgta/all/test_v1_package/CMakeLists.txt | 8 ++ .../libgta/all/test_v1_package/conanfile.py | 17 +++ 6 files changed, 103 insertions(+), 59 deletions(-) delete mode 100644 recipes/libgta/all/CMakeLists.txt create mode 100644 recipes/libgta/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/libgta/all/test_v1_package/conanfile.py diff --git a/recipes/libgta/all/CMakeLists.txt b/recipes/libgta/all/CMakeLists.txt deleted file mode 100644 index 217b9530b904d..0000000000000 --- a/recipes/libgta/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8.11) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/libgta/all/conanfile.py b/recipes/libgta/all/conanfile.py index a0064e504c27d..a15e741e867e1 100644 --- a/recipes/libgta/all/conanfile.py +++ b/recipes/libgta/all/conanfile.py @@ -1,69 +1,87 @@ import os -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import collect_libs, copy, get, replace_in_file, rmdir +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.53.0" + class LibgtaConan(ConanFile): name = "libgta" description = "Library that reads and writes GTA (Generic Tagged Arrays) files." license = "LGPL-2.1-or-later" - topics = ("conan", "libgta", "gta") - homepage = "https://marlam.de/gta" url = "https://github.com/conan-io/conan-center-index" - exports_sources = "CMakeLists.txt" - generators = "cmake" - settings = "os", "arch", "compiler", "build_type" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} - - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" + homepage = "https://marlam.de/gta" + topics = ("gta",) - @property - def _build_subfolder(self): - return "build_subfolder" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - os.rename(self.name + "-" + self.version, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["GTA_BUILD_STATIC_LIB"] = not self.options.shared + tc.variables["GTA_BUILD_SHARED_LIB"] = self.options.shared + tc.variables["GTA_BUILD_DOCUMENTATION"] = False + tc.generate() + + tc = CMakeDeps(self) + tc.generate() + + def _patch_sources(self): + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "${CMAKE_SOURCE_DIR}", + "${CMAKE_CURRENT_SOURCE_DIR}") def build(self): - tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), - "${CMAKE_SOURCE_DIR}", "${CMAKE_CURRENT_SOURCE_DIR}") - cmake = self._configure_cmake() + self._patch_sources() + cmake = CMake(self) + cmake.configure() cmake.build() - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["GTA_BUILD_STATIC_LIB"] = not self.options.shared - self._cmake.definitions["GTA_BUILD_SHARED_LIB"] = self.options.shared - self._cmake.definitions["GTA_BUILD_DOCUMENTATION"] = False - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake - def package(self): - self.copy("COPYING", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "COPYING", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): + # https://marlam.de/gta/documentation/ uses GTA as the package name + self.cpp_info.set_property("cmake_file_name", "GTA") + self.cpp_info.set_property("cmake_target_name", "GTA::GTA") + self.cpp_info.set_property("pkg_config_name", "gta") + self.cpp_info.libs = collect_libs(self) + if is_msvc(self) and not self.options.shared: + self.cpp_info.defines.append("GTA_STATIC") + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.names["cmake_find_package"] = "GTA" self.cpp_info.names["cmake_find_package_multi"] = "GTA" - self.cpp_info.names["pkg_config"] = "gta" - self.cpp_info.libs = tools.collect_libs(self) - if self.settings.compiler == "Visual Studio" and not self.options.shared: - self.cpp_info.defines.append("GTA_STATIC") diff --git a/recipes/libgta/all/test_package/CMakeLists.txt b/recipes/libgta/all/test_package/CMakeLists.txt index 7b9b613cbb24a..3bb9ae06e8bb8 100644 --- a/recipes/libgta/all/test_package/CMakeLists.txt +++ b/recipes/libgta/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(GTA REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE GTA::GTA) diff --git a/recipes/libgta/all/test_package/conanfile.py b/recipes/libgta/all/test_package/conanfile.py index ea57a464900be..ef5d7042163ec 100644 --- a/recipes/libgta/all/test_package/conanfile.py +++ b/recipes/libgta/all/test_package/conanfile.py @@ -1,10 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libgta/all/test_v1_package/CMakeLists.txt b/recipes/libgta/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libgta/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libgta/all/test_v1_package/conanfile.py b/recipes/libgta/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..84ee68733e516 --- /dev/null +++ b/recipes/libgta/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From eda10bab6beaaa2a079caeca765057f165a80ffa Mon Sep 17 00:00:00 2001 From: choll Date: Sun, 23 Jul 2023 23:10:42 +0100 Subject: [PATCH 047/637] (#18856) xtr: bump to 2.1.0 --- recipes/xtr/all/conandata.yml | 3 +++ recipes/xtr/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/xtr/all/conandata.yml b/recipes/xtr/all/conandata.yml index 73147ae073149..c4c7a036934fc 100644 --- a/recipes/xtr/all/conandata.yml +++ b/recipes/xtr/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.0": + url: "https://github.com/choll/xtr/archive/refs/tags/2.1.0.tar.gz" + sha256: "5abe2e53d91a893d63998968450d9bbfc23c45f552c81e2b7d17694699ab17c4" "2.0.1": url: "https://github.com/choll/xtr/archive/refs/tags/2.0.1.tar.gz" sha256: "92327264541900a2c9d43aaa3070d143d5e91879737fcea8cbf56065330af059" diff --git a/recipes/xtr/config.yml b/recipes/xtr/config.yml index 066b0d5ac74d1..ecc6dca2fd252 100644 --- a/recipes/xtr/config.yml +++ b/recipes/xtr/config.yml @@ -1,4 +1,6 @@ versions: + "2.1.0": + folder: all "2.0.1": folder: all "2.0.0": From 1d8e33a55811ffc5ea3f1135ccc7b07c79e74cf5 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 24 Jul 2023 08:02:53 +0200 Subject: [PATCH 048/637] (#18838) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index d9f1bd61e113a..a660a23ab7baa 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -13,6 +13,7 @@ required_for_references: - aeron - aggeom-agg - alac +- alembic - alpaca - amgcl - amqp-cpp @@ -25,6 +26,7 @@ required_for_references: - apr - apr-util - apriltag +- archicad-apidevkit - arcus - arduinojson - arg_router @@ -37,6 +39,7 @@ required_for_references: - arsenalgear - artery-font-format - asio +- asio-grpc - asmjit - astc-codec - async_simple @@ -57,6 +60,7 @@ required_for_references: - aws-c-mqtt - aws-c-sdkutils - aws-checksums +- aws-libfabric - b2 - b64 - backport-cpp @@ -143,6 +147,7 @@ required_for_references: - cmake - cmocka - cmp +- cn-cbor - cnpy - coin-cgl - coin-clp @@ -172,6 +177,7 @@ required_for_references: - cpptoml - cppunit - cpputest +- cppzmq - cpr - cpu_features - cpuinfo @@ -231,12 +237,15 @@ required_for_references: - earcut - eastl - easy_profiler +- easyhttpcpp - ecos - editline - edlib +- edyn - effcee - effolkronium-random - egl +- egl-headers - eigen - elfio - embree3 @@ -260,9 +269,13 @@ required_for_references: - fakeit - farmhash - fast-cdr +- fast-cpp-csv-parser - fast-dds +- fast_double_parser - fast_float - fastgltf +- fastpfor +- fastprng - fernandovelcic-hexdump - fff - ffmpeg @@ -278,6 +291,7 @@ required_for_references: - fontconfig - foonathan-lexy - foonathan-memory +- forestdb - foxglove-schemas-protobuf - fp16 - freeglut @@ -310,6 +324,7 @@ required_for_references: - glm - glog - glpk +- glshaderpp - glslang - glu - gmp @@ -354,6 +369,7 @@ required_for_references: - imake - imath - imgui +- imguizmo - incbin - indicators - indirect_value @@ -431,6 +447,7 @@ required_for_references: - libiberty - libiconv - libinterpolate +- libipt - libjpeg - libjpeg-turbo - libkml @@ -441,6 +458,7 @@ required_for_references: - libmediainfo - libmemcached - libmikmod +- libmnl - libmodbus - libmodplug - libmorton @@ -472,6 +490,7 @@ required_for_references: - libselinux - libserial - libsgp4 +- libslz - libsmacker - libsndfile - libsodium @@ -527,8 +546,10 @@ required_for_references: - mailio - make - mariadb-connector-c +- marisa - matchit - mathter +- matio - mattiasgustavsson-libs - maven - mawk @@ -626,7 +647,9 @@ required_for_references: - p-ranav-glob - paho-mqtt-c - paho-mqtt-cpp +- parg - patchelf +- pbtools - pcapplusplus - pcg-cpp - pcre @@ -658,6 +681,7 @@ required_for_references: - pugixml - pulseaudio - pybind11 +- pybind11_json - pystring - qhull - qpdf @@ -687,6 +711,7 @@ required_for_references: - replxx - restbed - restinio +- rg-etc1 - ring-span-lite - rmm - roaring @@ -711,6 +736,7 @@ required_for_references: - sentry-breakpad - sentry-crashpad - sentry-native +- seqan - serd - serdepp - sfml @@ -741,6 +767,7 @@ required_for_references: - sqlitecpp - sqlpp11 - ssht +- st_tree - status-code - stb - stlab @@ -768,6 +795,7 @@ required_for_references: - thrift - thrust - timsort +- tiny-dnn - tinycthread - tinycthreadpool - tinydir @@ -782,6 +810,7 @@ required_for_references: - tlx - toml11 - trantor +- tree-sitter - troldal-zippy - tsl-hopscotch-map - turtle @@ -826,6 +855,7 @@ required_for_references: - websocketpp - wg21-linear_algebra - wglext +- whereami - whisper-cpp - wil - winflexbison @@ -849,6 +879,7 @@ required_for_references: - xorg-makedepend - xorg-proto - xoshiro-cpp +- xsd - xsimd - xtensor - xtl From aafe6899408fecc46b52c992b1695a588dc3692d Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 24 Jul 2023 08:23:03 +0200 Subject: [PATCH 049/637] (#18767) [bot] Update list of references (prod-v2/ListPackages) From 1b4b0279c9b20856f49cdb0cfbe7b308c243e8a1 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 24 Jul 2023 08:42:30 +0200 Subject: [PATCH 050/637] (#18774) [bot] Update list of references (prod-v2/ListPackages) From a3fae2a757f8a6fafc7c712510f4190dd8dd5329 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 24 Jul 2023 09:02:23 +0200 Subject: [PATCH 051/637] (#18851) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index a660a23ab7baa..9b1a222098118 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -42,6 +42,7 @@ required_for_references: - asio-grpc - asmjit - astc-codec +- astro-informatics-so3 - async_simple - asyncly - asyncplusplus @@ -281,10 +282,12 @@ required_for_references: - ffmpeg - fft - fftw +- fire-hpp - flac - flann - flatbuffers - flatbush +- flecs - flex - fmt - fmtlog @@ -293,10 +296,15 @@ required_for_references: - foonathan-memory - forestdb - foxglove-schemas-protobuf +- foxi - fp16 - freeglut +- freeimage - freetype +- freexl +- fribidi - frozen +- fruit - ftxui - function2 - fxdiv @@ -378,6 +386,7 @@ required_for_references: - inja - intel-neon2sse - inversify-cpp +- iqa - itlib - jasper - jbig @@ -443,6 +452,7 @@ required_for_references: - libgpg-error - libgphoto2 - libgpiod +- libgta - libharu - libiberty - libiconv @@ -455,6 +465,7 @@ required_for_references: - libltc - liblzf - libmad +- libmbus - libmediainfo - libmemcached - libmikmod From 8e73e146e9791c11b42693f2cb9b947b1df1715a Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 24 Jul 2023 10:29:53 +0300 Subject: [PATCH 052/637] (#18709) cpp-ipc: migrate to Conan v2 * cpp-ipc: migrate to Conan v2 * cpp-ipc: restore is_apple_os usage * cpp-ipc: add m --- recipes/cpp-ipc/all/CMakeLists.txt | 7 -- recipes/cpp-ipc/all/conanfile.py | 90 +++++++++++-------- .../cpp-ipc/all/test_package/CMakeLists.txt | 5 +- recipes/cpp-ipc/all/test_package/conanfile.py | 21 +++-- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../cpp-ipc/all/test_v1_package/conanfile.py | 17 ++++ 6 files changed, 92 insertions(+), 56 deletions(-) delete mode 100644 recipes/cpp-ipc/all/CMakeLists.txt create mode 100644 recipes/cpp-ipc/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/cpp-ipc/all/test_v1_package/conanfile.py diff --git a/recipes/cpp-ipc/all/CMakeLists.txt b/recipes/cpp-ipc/all/CMakeLists.txt deleted file mode 100644 index e17d82eddcc5d..0000000000000 --- a/recipes/cpp-ipc/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12) -project(cmake_wrapper LANGUAGES CXX) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory(source_subfolder) diff --git a/recipes/cpp-ipc/all/conanfile.py b/recipes/cpp-ipc/all/conanfile.py index b11041af3f594..5baa058938b2b 100644 --- a/recipes/cpp-ipc/all/conanfile.py +++ b/recipes/cpp-ipc/all/conanfile.py @@ -1,17 +1,26 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration +import os + +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, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" -required_conan_version = ">=1.33.0" class CppIPCConan(ConanFile): name = "cpp-ipc" description = "C++ IPC Library: A high-performance inter-process communication using shared memory on Linux/Windows." - topics = ("ipc", "shared memory", ) + license = ("MIT",) url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/mutouyun/cpp-ipc" - license = "MIT", + topics = ("ipc", "shared memory") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" - exports_sources = ["CMakeLists.txt"] options = { "shared": [True, False], "fPIC": [True, False], @@ -21,19 +30,18 @@ class CppIPCConan(ConanFile): "fPIC": True, } - generators = "cmake" - - _compiler_required_cpp17 = { - "Visual Studio": "17", - "gcc": "8", - "clang": "4", - } - - _cmake = None + @property + def _min_cppstd(self): + return 17 @property - def _source_subfolder(self): - return "source_subfolder" + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "4", + "msvc": "193", + "Visual Studio": "17", + } def config_options(self): if self.settings.os == "Windows": @@ -41,47 +49,51 @@ def config_options(self): 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 validate(self): - if tools.is_apple_os(self.settings.os): - raise ConanInvalidConfiguration("{} does not support Apple platform".format(self.name)) + if is_apple_os(self): + raise ConanInvalidConfiguration(f"{self.name} does not support Apple platform") if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 17) + check_min_cppstd(self, self._min_cppstd) - minimum_version = self._compiler_required_cpp17.get(str(self.settings.compiler), False) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version: - if tools.Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration("{} requires C++17, which your compiler does not support.".format(self.name)) + if Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.name} requires C++{self._min_cppstd}, " + "which your compiler does not support.") else: - self.output.warn("{0} requires C++17. Your compiler is unknown. Assuming it supports C++17.".format(self.name)) + self.output.warning(f"{self.name} requires C++{self._min_cppstd}. Your compiler is unknown. " + f"Assuming it supports C++{self._min_cppstd}.") if self.settings.compiler == "clang" and self.settings.compiler.get_safe("libcxx") == "libc++": - raise ConanInvalidConfiguration("{} doesn't support clang with libc++".format(self.name)) + raise ConanInvalidConfiguration(f"{self.name} doesn't support clang with libc++") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["LIBIPC_BUILD_SHARED_LIBS"] = self.options.shared - self._cmake.configure() - return self._cmake + def generate(self): + tc = CMakeToolchain(self) + tc.variables["LIBIPC_BUILD_SHARED_LIBS"] = self.options.shared + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): self.cpp_info.libs = ["ipc"] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs = ["rt", "pthread"] + self.cpp_info.system_libs = ["rt", "pthread", "m"] diff --git a/recipes/cpp-ipc/all/test_package/CMakeLists.txt b/recipes/cpp-ipc/all/test_package/CMakeLists.txt index c258338b9324e..ad0594de35161 100644 --- a/recipes/cpp-ipc/all/test_package/CMakeLists.txt +++ b/recipes/cpp-ipc/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(cpp-ipc REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/cpp-ipc/all/test_package/conanfile.py b/recipes/cpp-ipc/all/test_package/conanfile.py index 49a3a66ea5bad..fae501d0afb9e 100644 --- a/recipes/cpp-ipc/all/test_package/conanfile.py +++ b/recipes/cpp-ipc/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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain" + 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/cpp-ipc/all/test_v1_package/CMakeLists.txt b/recipes/cpp-ipc/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/cpp-ipc/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/cpp-ipc/all/test_v1_package/conanfile.py b/recipes/cpp-ipc/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/cpp-ipc/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + 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) From d32bd41c2ede09ffe33643c7e458e3c20e19aa48 Mon Sep 17 00:00:00 2001 From: Jacob Bandes-Storch Date: Mon, 24 Jul 2023 01:12:05 -0700 Subject: [PATCH 053/637] (#18784) mcap: add version 1.1.0 and 1.2.0 * mcap: add version 1.1.0 and 1.2.0 * add tested_reference_str --- recipes/mcap/all/conandata.yml | 6 ++++++ recipes/mcap/all/test_package/conanfile.py | 3 +++ recipes/mcap/config.yml | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/recipes/mcap/all/conandata.yml b/recipes/mcap/all/conandata.yml index 4d475c04d971c..a1bc6133e68c9 100644 --- a/recipes/mcap/all/conandata.yml +++ b/recipes/mcap/all/conandata.yml @@ -1,4 +1,10 @@ sources: + 1.2.0: + url: "https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v1.2.0/main.tar.gz" + sha256: "11a6badecac2b10e9687e912648a6e9679ef8731e4ab9570346ae9845ae64a65" + 1.1.0: + url: "https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v1.1.0/main.tar.gz" + sha256: "1cb2ae9f2e910eeb2e93b3ab722744d1805b9da45764e4fd88703b669413350d" 1.0.0: url: "https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v1.0.0/main.tar.gz" sha256: "e36169e46a67a9431f73df335f67488461817bc423f9af63ac0af7f29e0bd696" diff --git a/recipes/mcap/all/test_package/conanfile.py b/recipes/mcap/all/test_package/conanfile.py index 14c16cdc02a92..615cc1d54ffcc 100644 --- a/recipes/mcap/all/test_package/conanfile.py +++ b/recipes/mcap/all/test_package/conanfile.py @@ -11,6 +11,9 @@ class TestPackageConan(ConanFile): def layout(self): cmake_layout(self) + def requirements(self): + self.requires(self.tested_reference_str) + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/mcap/config.yml b/recipes/mcap/config.yml index 8d906d6516e97..bfc72fea8d81a 100644 --- a/recipes/mcap/config.yml +++ b/recipes/mcap/config.yml @@ -1,4 +1,8 @@ versions: + 1.2.0: + folder: all + 1.1.0: + folder: all 1.0.0: folder: all 0.9.0: From 4f03f6573bc2035ee42bc6d1a7c6a7af9b636767 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 24 Jul 2023 17:50:46 +0900 Subject: [PATCH 054/637] (#18825) xxhash: add version 0.8.2, add package_type --- recipes/xxhash/all/conandata.yml | 4 +++- recipes/xxhash/all/conanfile.py | 9 ++++----- recipes/xxhash/config.yml | 2 ++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/recipes/xxhash/all/conandata.yml b/recipes/xxhash/all/conandata.yml index a0b4d68deb6b4..06fb02fd0ae83 100644 --- a/recipes/xxhash/all/conandata.yml +++ b/recipes/xxhash/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.8.2": + url: "https://github.com/Cyan4973/xxHash/archive/v0.8.2.tar.gz" + sha256: "baee0c6afd4f03165de7a4e67988d16f0f2b257b51d0e3cb91909302a26a79c4" "0.8.1": url: "https://github.com/Cyan4973/xxHash/archive/v0.8.1.tar.gz" sha256: "3bb6b7d6f30c591dd65aaaff1c8b7a5b94d81687998ca9400082c739a690436c" @@ -10,7 +13,6 @@ patches: - patch_file: "patches/0.8.1-fix-cmakelists.patch" patch_description: "Update CMakeLists.txt to properly install manuals" patch_type: conan - - patch_file: "patches/0.8.1-fix-static-assert-link-error.patch" patch_source: "https://github.com/Cyan4973/xxHash/commit/6189ecd3d44a693460f86280ccf49d33cb4b18e1" patch_description: "Backport fix for link error" diff --git a/recipes/xxhash/all/conanfile.py b/recipes/xxhash/all/conanfile.py index 7ce90e1beb92a..3e018a810c976 100644 --- a/recipes/xxhash/all/conanfile.py +++ b/recipes/xxhash/all/conanfile.py @@ -8,12 +8,12 @@ class XxHashConan(ConanFile): name = "xxhash" + description = "Extremely fast non-cryptographic hash algorithm" + license = "BSD-2-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/Cyan4973/xxHash" - description = "Extremely fast non-cryptographic hash algorithm" topics = ("hash", "algorithm", "fast", "checksum", "hash-functions") - license = "BSD-2-Clause" - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -43,8 +43,7 @@ def layout(self): cmake_layout(self, src_folder="src") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/xxhash/config.yml b/recipes/xxhash/config.yml index 20824a4afbb4d..50595ee5e4913 100644 --- a/recipes/xxhash/config.yml +++ b/recipes/xxhash/config.yml @@ -1,4 +1,6 @@ versions: + "0.8.2": + folder: all "0.8.1": folder: all "0.8.0": From 2446b360494107ceae62dd885b3d6c52fdfdc453 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 25 Jul 2023 17:53:19 +0300 Subject: [PATCH 055/637] (#18740) libnfnetlink: migrate to Conan v2 Co-authored-by: Daniel --- recipes/libnfnetlink/all/conanfile.py | 87 ++++++++++--------- .../all/test_package/CMakeLists.txt | 7 +- .../all/test_package/conanfile.py | 22 +++-- .../libnfnetlink/all/test_package/example.cpp | 5 +- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../all/test_v1_package/conanfile.py | 18 ++++ 6 files changed, 92 insertions(+), 55 deletions(-) create mode 100644 recipes/libnfnetlink/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/libnfnetlink/all/test_v1_package/conanfile.py diff --git a/recipes/libnfnetlink/all/conanfile.py b/recipes/libnfnetlink/all/conanfile.py index 10540d39fbf9c..3797ae3ceea3a 100644 --- a/recipes/libnfnetlink/all/conanfile.py +++ b/recipes/libnfnetlink/all/conanfile.py @@ -1,67 +1,70 @@ import os -import functools -from conans import ConanFile, tools, AutoToolsBuildEnvironment -from conans.errors import ConanInvalidConfiguration -required_conan_version = ">=1.43.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import copy, get, rm, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.53.0" + class LibnfnetlinkConan(ConanFile): name = "libnfnetlink" + description = "low-level library for netfilter related kernel/userspace communication" license = "GPL-2.0-or-later" url = "https://github.com/conan-io/conan-center-index" homepage = "https://netfilter.org/projects/libnfnetlink/index.html" - description = "low-level library for netfilter related kernel/userspace communication" - topics = ("libnfnetlink", "netlink", "netfilter") - settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} + topics = ("netlink", "netfilter") - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } - def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") def validate(self): - if self.settings.os != "Linux": + if self.settings.os not in ["Linux", "FreeBSD"]: raise ConanInvalidConfiguration("libnfnetlink is only supported on Linux") - def configure(self): - if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) - @functools.lru_cache(1) - def _configure_autotools(self): - autotools = AutoToolsBuildEnvironment(self) - conf_args = [] - if self.options.shared: - conf_args.extend(["--enable-shared", "--disable-static"]) - else: - conf_args.extend(["--disable-shared", "--enable-static"]) - autotools.configure(configure_dir=self._source_subfolder, args=conf_args) - return autotools + def generate(self): + tc = AutotoolsToolchain(self) + tc.generate() def build(self): - autotools = self._configure_autotools() + autotools = Autotools(self) + autotools.configure() autotools.make() def package(self): - self.copy("COPYING", dst="licenses", src=self._source_subfolder) - autotools = self._configure_autotools() + copy(self, "COPYING", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + autotools = Autotools(self) autotools.install() - tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.la") - tools.rmdir(os.path.join(self.package_folder, "share")) - tools.rmdir(os.path.join(self.package_folder, "etc")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + rm(self, "*.la", self.package_folder, recursive=True) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "etc")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): self.cpp_info.libs = ["nfnetlink"] - self.cpp_info.set_property("pkg_config_name", "libnfnetlink") - - # TODO: to remove in conan v2 once pkg_config generator is removed - self.cpp_info.names["pkg_config"] = "libnfnetlink" + self.cpp_info.set_property("pkg_config_name", "libnfnetlink") diff --git a/recipes/libnfnetlink/all/test_package/CMakeLists.txt b/recipes/libnfnetlink/all/test_package/CMakeLists.txt index d4fdee1a8a79c..7e1aa1808dfd5 100644 --- a/recipes/libnfnetlink/all/test_package/CMakeLists.txt +++ b/recipes/libnfnetlink/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(PackageTest CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(libnfnetlink REQUIRED CONFIG) add_executable(example example.cpp) -target_link_libraries(example ${CONAN_LIBS}) +target_link_libraries(example libnfnetlink::libnfnetlink) diff --git a/recipes/libnfnetlink/all/test_package/conanfile.py b/recipes/libnfnetlink/all/test_package/conanfile.py index e4f1965959dec..e0f447388fa1b 100644 --- a/recipes/libnfnetlink/all/test_package/conanfile.py +++ b/recipes/libnfnetlink/all/test_package/conanfile.py @@ -1,11 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain" + test_type = "explicit" -class LibnfnetlinkTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "example") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "example") + self.run(bin_path, env="conanrun") diff --git a/recipes/libnfnetlink/all/test_package/example.cpp b/recipes/libnfnetlink/all/test_package/example.cpp index 95153d8532f51..395453bdde08a 100644 --- a/recipes/libnfnetlink/all/test_package/example.cpp +++ b/recipes/libnfnetlink/all/test_package/example.cpp @@ -1,7 +1,8 @@ -#include -#include #include +#include +#include + int main() { struct nfnl_handle *nl = nfnl_open(); if (nl == NULL) { diff --git a/recipes/libnfnetlink/all/test_v1_package/CMakeLists.txt b/recipes/libnfnetlink/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libnfnetlink/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libnfnetlink/all/test_v1_package/conanfile.py b/recipes/libnfnetlink/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..c8689f282274d --- /dev/null +++ b/recipes/libnfnetlink/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class LibnfnetlinkTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "example") + self.run(bin_path, run_environment=True) From 108aa461a886be7a09ee5bf50faf91141e6fb2de Mon Sep 17 00:00:00 2001 From: Maksim Petukhov <6967052+maksim-petukhov@users.noreply.github.com> Date: Tue, 25 Jul 2023 19:46:00 +0200 Subject: [PATCH 056/637] (#18634) add svgpp library * add svgpp * add c++11 compiler feature to test_package fix * Update recipes/svgpp/all/conanfile.py --------- Co-authored-by: Carlos Zoido --- recipes/svgpp/all/conandata.yml | 4 ++ recipes/svgpp/all/conanfile.py | 59 +++++++++++++++++++ recipes/svgpp/all/test_package/CMakeLists.txt | 8 +++ recipes/svgpp/all/test_package/conanfile.py | 26 ++++++++ .../svgpp/all/test_package/test_package.cpp | 23 ++++++++ recipes/svgpp/config.yml | 3 + 6 files changed, 123 insertions(+) create mode 100644 recipes/svgpp/all/conandata.yml create mode 100644 recipes/svgpp/all/conanfile.py create mode 100644 recipes/svgpp/all/test_package/CMakeLists.txt create mode 100644 recipes/svgpp/all/test_package/conanfile.py create mode 100644 recipes/svgpp/all/test_package/test_package.cpp create mode 100644 recipes/svgpp/config.yml diff --git a/recipes/svgpp/all/conandata.yml b/recipes/svgpp/all/conandata.yml new file mode 100644 index 0000000000000..b4612b4441137 --- /dev/null +++ b/recipes/svgpp/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20221030": + url: "https://github.com/svgpp/svgpp/archive/1583a7b209038bfd0d98c6ce7d4c93986f7b235e.tar.gz" + sha256: "95f4145c43aada913e7b24e37d20d0eef5f170a7c70e00ffcb318a3910b43ca6" diff --git a/recipes/svgpp/all/conanfile.py b/recipes/svgpp/all/conanfile.py new file mode 100644 index 0000000000000..f683b8d50fc0b --- /dev/null +++ b/recipes/svgpp/all/conanfile.py @@ -0,0 +1,59 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +import os + + +required_conan_version = ">=1.52.0" + + +class SvgPPConan(ConanFile): + name = "svgpp" + description = "SVG++ library contains parsers for various SVG syntaxes, " \ + "adapters that simplify handling of parsed data and a lot of other utilities and helpers for the most common tasks." + license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/svgpp/svgpp" + topics = ("svgpp", "svg", "parser", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 11 + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("boost/1.82.0", transitive_headers=True) + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + pass + + def package(self): + copy(self, pattern="LICENSE_1_0.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.*", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + self.cpp_info.requires.append("boost::headers") diff --git a/recipes/svgpp/all/test_package/CMakeLists.txt b/recipes/svgpp/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..366f84e91c306 --- /dev/null +++ b/recipes/svgpp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(svgpp REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE svgpp::svgpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/svgpp/all/test_package/conanfile.py b/recipes/svgpp/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/svgpp/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/svgpp/all/test_package/test_package.cpp b/recipes/svgpp/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..cb8c51e57fb33 --- /dev/null +++ b/recipes/svgpp/all/test_package/test_package.cpp @@ -0,0 +1,23 @@ +#include +#include +#include + +using namespace svgpp; + +struct Context +{ + void transform_matrix(const boost::array & matrix) + { + std::copy(matrix.begin(), matrix.end(), + std::ostream_iterator(std::cout, " ")); + std::cout << "\n"; + } +}; + +int main() +{ + Context context; + value_parser::parse(tag::attribute::transform(), context, + std::string("translate(-10,-20) scale(2) rotate(45) translate(5,10)"), tag::source::attribute()); + return 0; +} diff --git a/recipes/svgpp/config.yml b/recipes/svgpp/config.yml new file mode 100644 index 0000000000000..d6e527e7221f4 --- /dev/null +++ b/recipes/svgpp/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20221030": + folder: "all" From a547bc7a5c09a7108421c59cce729eeb70cad55b Mon Sep 17 00:00:00 2001 From: qwqbot Date: Wed, 26 Jul 2023 11:07:44 +0800 Subject: [PATCH 057/637] (#18858) add intx * add intx * fix * test v1 * compiler check * resolve comment * clean import --------- Co-authored-by: Carlos Zoido --- recipes/intx/all/conandata.yml | 4 ++ recipes/intx/all/conanfile.py | 65 +++++++++++++++++++ recipes/intx/all/test_package/CMakeLists.txt | 8 +++ recipes/intx/all/test_package/conanfile.py | 26 ++++++++ .../intx/all/test_package/test_package.cpp | 6 ++ .../intx/all/test_v1_package/CMakeLists.txt | 9 +++ recipes/intx/all/test_v1_package/conanfile.py | 18 +++++ recipes/intx/config.yml | 3 + 8 files changed, 139 insertions(+) create mode 100644 recipes/intx/all/conandata.yml create mode 100644 recipes/intx/all/conanfile.py create mode 100644 recipes/intx/all/test_package/CMakeLists.txt create mode 100644 recipes/intx/all/test_package/conanfile.py create mode 100644 recipes/intx/all/test_package/test_package.cpp create mode 100644 recipes/intx/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/intx/all/test_v1_package/conanfile.py create mode 100644 recipes/intx/config.yml diff --git a/recipes/intx/all/conandata.yml b/recipes/intx/all/conandata.yml new file mode 100644 index 0000000000000..82ca4023ed3e5 --- /dev/null +++ b/recipes/intx/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.10.1": + url: "https://github.com/chfast/intx/archive/v0.10.1.tar.gz" + sha256: "4663073458b5e0564e92058e5aa1a7ce88634fc72827191856b17bd7335de29b" diff --git a/recipes/intx/all/conanfile.py b/recipes/intx/all/conanfile.py new file mode 100644 index 0000000000000..7d3e3dcf60652 --- /dev/null +++ b/recipes/intx/all/conanfile.py @@ -0,0 +1,65 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import get, copy +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.51.1" + +class IntxConan(ConanFile): + name = "intx" + description = "Extended precision integer C++ library" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/chfast/intx" + topics = ("evm", "biginteger", "arbitrary-precision", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + + @property + def _min_cppstd(self): + return 20 + + def layout(self): + basic_layout(self, src_folder="src") + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "12", + "clang": "15", + "apple-clang": "14.1", + } + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.get_safe("compiler.cppstd"): + check_min_cppstd(self, self._min_cppstd) + + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.hpp", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/intx/all/test_package/CMakeLists.txt b/recipes/intx/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..460d6198ba06f --- /dev/null +++ b/recipes/intx/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.12) +project(test_package LANGUAGES CXX) + +find_package(intx REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE intx::intx) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/intx/all/test_package/conanfile.py b/recipes/intx/all/test_package/conanfile.py new file mode 100644 index 0000000000000..a9fb96656f203 --- /dev/null +++ b/recipes/intx/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/intx/all/test_package/test_package.cpp b/recipes/intx/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..e9521bde28299 --- /dev/null +++ b/recipes/intx/all/test_package/test_package.cpp @@ -0,0 +1,6 @@ +#include + +int main(int argc, char**) +{ + return static_cast(intx::uint512{argc} / (intx::uint512{1} << 111)); +} diff --git a/recipes/intx/all/test_v1_package/CMakeLists.txt b/recipes/intx/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..9652e22fc19d5 --- /dev/null +++ b/recipes/intx/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.12) + +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/intx/all/test_v1_package/conanfile.py b/recipes/intx/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..5a05af3c2dfd2 --- /dev/null +++ b/recipes/intx/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +from conans import ConanFile, CMake +from conan.tools.build import cross_building +import os + + +class TestPackageV1Conan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/intx/config.yml b/recipes/intx/config.yml new file mode 100644 index 0000000000000..36cf695df0df6 --- /dev/null +++ b/recipes/intx/config.yml @@ -0,0 +1,3 @@ +versions: + "0.10.1": + folder: all From a628dae46424b0bc7ce8089b66fb33bc08664de5 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 2 Aug 2023 12:28:56 +0300 Subject: [PATCH 058/637] (#18754) upx: migrate to Conan v2 Co-authored-by: Carlos Zoido --- recipes/upx/all/conanfile.py | 56 ++++++++++++------- recipes/upx/all/test_package/CMakeLists.txt | 5 +- recipes/upx/all/test_package/conanfile.py | 24 +++++--- recipes/upx/all/test_package/test_package.c | 2 +- .../upx/all/test_v1_package/CMakeLists.txt | 8 +++ recipes/upx/all/test_v1_package/conanfile.py | 35 ++++++++++++ 6 files changed, 96 insertions(+), 34 deletions(-) create mode 100644 recipes/upx/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/upx/all/test_v1_package/conanfile.py diff --git a/recipes/upx/all/conanfile.py b/recipes/upx/all/conanfile.py index ebbe1deba6846..4a0f911cedf71 100644 --- a/recipes/upx/all/conanfile.py +++ b/recipes/upx/all/conanfile.py @@ -1,23 +1,29 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import copy, get + +required_conan_version = ">=1.47.0" class UPXConan(ConanFile): name = "upx" description = "UPX - the Ultimate Packer for eXecutables " - license = "GPL-2.0-or-later", "special-exception-for-compressed-executables" + license = ("GPL-2.0-or-later", "special-exception-for-compressed-executables") url = "https://github.com/conan-io/conan-center-index" homepage = "https://upx.github.io/" - topics = ("packer", "executable", "compression", "size", "reduction", "small", "footprintt") - no_copy_source = True - settings = "os", "arch" + topics = ("packer", "executable", "compression", "size", "reduction", "small", "footprintt", "pre-built") + + package_type = "application" + settings = "os", "arch", "compiler", "build_type" + + def layout(self): + pass - @property - def _source_subfolder(self): - return "source_subfolder" + def package_id(self): + del self.info.settings.compiler + del self.info.settings.build_type def _conan_data_sources(self): # Don't surround this with try/catch to catch unknown versions @@ -32,24 +38,32 @@ def validate(self): raise ConanInvalidConfiguration(f"This recipe has no upx binary for os/arch={self.settings.os}/{self.settings.arch}") def build(self): - tools.get(**self._conan_data_sources(), - destination=self._source_subfolder, strip_root=True) + get(self, **self._conan_data_sources(), strip_root=True) def package(self): - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") - self.copy("COPYING", src=self._source_subfolder, dst="licenses") - if self.settings.os == "Windows": - self.copy("upx.exe", src=self._source_subfolder, dst="bin") - else: - self.copy("upx", src=self._source_subfolder, dst="bin") + copy(self, "LICENSE", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses")) + copy(self, "COPYING", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses")) + extension = ".exe" if self.settings.os == "Windows" else "" + copy(self, f"upx{extension}", + src=self.source_folder, + dst=os.path.join(self.package_folder, "bin")) def package_info(self): + self.cpp_info.frameworkdirs = [] + self.cpp_info.resdirs = [] + self.cpp_info.includedirs = [] self.cpp_info.libdirs = [] bin_path = os.path.join(self.package_folder, "bin") - self.output.info(f"Appending PATH environment variable: {bin_path}") - self.env_info.PATH.append(bin_path) - bin_ext = ".exe" if self.settings.os == "Windows" else "" upx = os.path.join(bin_path, f"upx{bin_ext}") + self.conf_info.define("user.upx:upx", upx) + + # TODO: to remove in conan v2 + self.output.info(f"Appending PATH environment variable: {bin_path}") + self.env_info.PATH.append(bin_path) self.user_info.upx = upx diff --git a/recipes/upx/all/test_package/CMakeLists.txt b/recipes/upx/all/test_package/CMakeLists.txt index f31cfe1e1aa8e..e58a04fd19cf1 100644 --- a/recipes/upx/all/test_package/CMakeLists.txt +++ b/recipes/upx/all/test_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang|GNU") add_link_options(-static) endif() -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - add_executable(${PROJECT_NAME} test_package.c) diff --git a/recipes/upx/all/test_package/conanfile.py b/recipes/upx/all/test_package/conanfile.py index 8274c17267c14..8d1367a88209a 100644 --- a/recipes/upx/all/test_package/conanfile.py +++ b/recipes/upx/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" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def build_requirements(self): + self.tool_requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,21 +21,20 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self, skip_x64_x86=True): + if can_run(self): bin_ext = ".exe" if self.settings.os == "Windows" else "" - bin_path = os.path.join("bin", f"test_package{bin_ext}") + bin_path = os.path.join(self.cpp.build.bindir, f"test_package{bin_ext}") - upx_bin = self.deps_user_info["upx"].upx - self.run(f"{upx_bin} --help", run_environment=True) + self.run(f"upx --help") original_size = os.stat(bin_path).st_size - self.run(f"{upx_bin} {bin_path}", run_environment=True) + self.run(f"upx {bin_path}") packed_size = os.stat(bin_path).st_size # Run the packed executable to see whether it still works - self.run(bin_path, run_environment=True) + self.run(bin_path, env="conanrun") self.output.info(f"File: {bin_path}") self.output.info(f"Original size: {original_size:>9}") diff --git a/recipes/upx/all/test_package/test_package.c b/recipes/upx/all/test_package/test_package.c index 725533f119f42..f81e0540072d7 100644 --- a/recipes/upx/all/test_package/test_package.c +++ b/recipes/upx/all/test_package/test_package.c @@ -1,6 +1,6 @@ #include -int main(int argc, char *argv[]) { +int main() { puts("Hello world!"); return 0; } diff --git a/recipes/upx/all/test_v1_package/CMakeLists.txt b/recipes/upx/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/upx/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/upx/all/test_v1_package/conanfile.py b/recipes/upx/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..2b7a8250c9937 --- /dev/null +++ b/recipes/upx/all/test_v1_package/conanfile.py @@ -0,0 +1,35 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self, skip_x64_x86=True): + bin_ext = ".exe" if self.settings.os == "Windows" else "" + bin_path = os.path.join("bin", f"test_package{bin_ext}") + + upx_bin = self.deps_user_info["upx"].upx + self.run(f"{upx_bin} --help", run_environment=True) + + original_size = os.stat(bin_path).st_size + + self.run(f"{upx_bin} {bin_path}", run_environment=True) + + packed_size = os.stat(bin_path).st_size + + # Run the packed executable to see whether it still works + self.run(bin_path, run_environment=True) + + self.output.info(f"File: {bin_path}") + self.output.info(f"Original size: {original_size:>9}") + self.output.info(f"Packed size: {packed_size:>9}") + self.output.info(f" ---------") + self.output.info(f"Size diff: {original_size-packed_size:>9}") From 4660fa8c40ef4827d529d73c201eb3d6854d6ad3 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 2 Aug 2023 18:59:29 +0900 Subject: [PATCH 059/637] (#18918) unordered_dense: add version 4.0.4, remove older versions --- recipes/unordered_dense/all/conandata.yml | 15 +++------------ recipes/unordered_dense/config.yml | 10 ++-------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/recipes/unordered_dense/all/conandata.yml b/recipes/unordered_dense/all/conandata.yml index b69698c93c08e..5002689bc73b0 100644 --- a/recipes/unordered_dense/all/conandata.yml +++ b/recipes/unordered_dense/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.0.4": + url: "https://github.com/martinus/unordered_dense/archive/v4.0.4.tar.gz" + sha256: "b34a8c942963e3a647f1bbc192a6391cd56d7ae615b2ddc1601c1779b5792206" "4.0.1": url: "https://github.com/martinus/unordered_dense/archive/v4.0.1.tar.gz" sha256: "6c8be4f76fed592f8c1ae07ce07eaa8749ed3a929a84a502764564dcbcc53a76" @@ -14,24 +17,12 @@ sources: "3.0.2": url: "https://github.com/martinus/unordered_dense/archive/v3.0.2.tar.gz" sha256: "0c0b874e9682cce3c75a1152308bfbb108538aaf1e90824d7789e2b64122520b" - "3.0.0": - url: "https://github.com/martinus/unordered_dense/archive/v3.0.0.tar.gz" - sha256: "e73452d7c1e274b4a15b553c0904f1de4bcfa61b00514acd1eaad7deac805ef0" "2.0.1": url: "https://github.com/martinus/unordered_dense/archive/v2.0.1.tar.gz" sha256: "450d53bd8709f9476702a3c4975bf6e40d66059b25b125e480534228d7f5616d" - "2.0.0": - url: "https://github.com/martinus/unordered_dense/archive/v2.0.0.tar.gz" - sha256: "e838bdcf380a1aeb6f1fee17fbdf59d7a14b6b9fb6dfca32981e4cbd60739d20" "1.4.0": url: "https://github.com/martinus/unordered_dense/archive/v1.4.0.tar.gz" sha256: "36b6bfe2fe2633f9d9c537b9b808b4be6b77ff51c66d370d855f477517bc3bc9" "1.3.3": url: "https://github.com/martinus/unordered_dense/archive/v1.3.3.tar.gz" sha256: "621a984d7f1de156d3078ecb5e1252bcc2ebc875de6eb6b8635f6c2a0898e496" - "1.3.2": - url: "https://github.com/martinus/unordered_dense/archive/v1.3.2.tar.gz" - sha256: "f12db3b93f31f7f20f4d8cac6adc551f6ae17a5b9a16040abeee427f54427953" - "1.3.1": - url: "https://github.com/martinus/unordered_dense/archive/refs/tags/v1.3.1.tar.gz" - sha256: "d393168833d6609c9eaf54a05b19fc3120f68b85feffb282ab225119a86df1d4" diff --git a/recipes/unordered_dense/config.yml b/recipes/unordered_dense/config.yml index 50c688a80fb21..f99a8339fb570 100644 --- a/recipes/unordered_dense/config.yml +++ b/recipes/unordered_dense/config.yml @@ -1,4 +1,6 @@ versions: + "4.0.4": + folder: all "4.0.1": folder: all "4.0.0": @@ -9,17 +11,9 @@ versions: folder: all "3.0.2": folder: all - "3.0.0": - folder: all "2.0.1": folder: all - "2.0.0": - folder: all "1.4.0": folder: all "1.3.3": folder: all - "1.3.2": - folder: all - "1.3.1": - folder: all From bf7fb309c2cc4becab033a24af9ca6364ee5524d Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 2 Aug 2023 19:16:01 +0900 Subject: [PATCH 060/637] (#18966) cpp-httplib: add version 0.13.3 * cpp-httplib: add version 0.13.2 * update 0.13.3 --- recipes/cpp-httplib/all/conandata.yml | 3 +++ recipes/cpp-httplib/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/cpp-httplib/all/conandata.yml b/recipes/cpp-httplib/all/conandata.yml index dff9808ae31f2..448d3a594468d 100644 --- a/recipes/cpp-httplib/all/conandata.yml +++ b/recipes/cpp-httplib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.13.3": + url: "https://github.com/yhirose/cpp-httplib/archive/v0.13.3.tar.gz" + sha256: "2a4503f9f2015f6878baef54cd94b01849cc3ed19dfe95f2c9775655bea8b73f" "0.13.1": url: "https://github.com/yhirose/cpp-httplib/archive/v0.13.1.tar.gz" sha256: "9b837d290b61e3f0c4239da0b23bbf14c382922e2bf2a9bac21c1e3feabe1ff9" diff --git a/recipes/cpp-httplib/config.yml b/recipes/cpp-httplib/config.yml index 7af780ed5d22d..8e636ccafe3a6 100644 --- a/recipes/cpp-httplib/config.yml +++ b/recipes/cpp-httplib/config.yml @@ -1,4 +1,6 @@ versions: + "0.13.3": + folder: all "0.13.1": folder: all "0.12.6": From cd917a34f0bc77e85891ca1bc7b478fea60d1685 Mon Sep 17 00:00:00 2001 From: trns1997 <17682846+trns1997@users.noreply.github.com> Date: Wed, 2 Aug 2023 12:30:18 +0200 Subject: [PATCH 061/637] (#18163) kickcat: add recipe Co-authored-by: Carlos Zoido --- recipes/kickcat/all/conandata.yml | 4 + recipes/kickcat/all/conanfile.py | 74 +++++++++++++++++++ .../kickcat/all/test_package/CMakeLists.txt | 9 +++ recipes/kickcat/all/test_package/conanfile.py | 25 +++++++ .../kickcat/all/test_package/test_package.cc | 32 ++++++++ recipes/kickcat/config.yml | 3 + 6 files changed, 147 insertions(+) create mode 100644 recipes/kickcat/all/conandata.yml create mode 100644 recipes/kickcat/all/conanfile.py create mode 100644 recipes/kickcat/all/test_package/CMakeLists.txt create mode 100644 recipes/kickcat/all/test_package/conanfile.py create mode 100644 recipes/kickcat/all/test_package/test_package.cc create mode 100644 recipes/kickcat/config.yml diff --git a/recipes/kickcat/all/conandata.yml b/recipes/kickcat/all/conandata.yml new file mode 100644 index 0000000000000..19c0f19034aff --- /dev/null +++ b/recipes/kickcat/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "v2-alpha3": + url: "https://github.com/Siviuze/KickCAT/archive/refs/tags/v2-alpha3.zip" + sha256: "dadd8518c3232162b7455fdcd837578120ece5a42c3bc2701147a68cbee60da4" diff --git a/recipes/kickcat/all/conanfile.py b/recipes/kickcat/all/conanfile.py new file mode 100644 index 0000000000000..abaf5d422d588 --- /dev/null +++ b/recipes/kickcat/all/conanfile.py @@ -0,0 +1,74 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout +from conan.tools.files import get, copy +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.55" + + +class KickCATRecipe(ConanFile): + name = "kickcat" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/Siviuze/KickCAT" + description = "Thin EtherCAT stack designed to be embedded in a more complex software and with efficiency in mind" + license = "CeCILL-C" + topics = ("ethercat") + package_type = "library" + settings = "os", "compiler", "build_type", "arch" + options = {"shared": [True, False], "fPIC": [True, False]} + default_options = {"shared": False, "fPIC": True} + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def configure(self): + if self.options.get_safe("shared"): + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 17) + + if self.settings.os != "Linux": + raise ConanInvalidConfiguration( + f"{self.ref} is not supported on {self.settings.os}.") + + if self.settings.compiler != "gcc": + raise ConanInvalidConfiguration( + f"{self.ref} is not supported on {self.settings.compiler}.") + + if self.settings.compiler == 'gcc' and Version(self.settings.compiler.version) < "7": + raise ConanInvalidConfiguration("Building requires GCC >= 7") + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["BUILD_UNIT_TESTS"] = "OFF" + tc.cache_variables["BUILD_EXAMPLES"] = "OFF" + tc.cache_variables["BUILD_SIMULATION"] = "OFF" + tc.cache_variables["BUILD_TOOLS"] = "OFF" + tc.cache_variables["DEBUG"] = "OFF" + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "*.h", os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include")) + copy(self, "*.a", self.build_folder, + os.path.join(self.package_folder, "lib"), keep_path=False) + copy(self, "*.so", self.build_folder, + os.path.join(self.package_folder, "lib"), keep_path=False) + copy(self, "LICENSE", self.source_folder, + os.path.join(self.package_folder, "licenses")) + + def package_info(self): + self.cpp_info.libs = ["kickcat"] diff --git a/recipes/kickcat/all/test_package/CMakeLists.txt b/recipes/kickcat/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..8b77c31d9ca12 --- /dev/null +++ b/recipes/kickcat/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 17) + +find_package(kickcat REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cc) +target_link_libraries(${PROJECT_NAME} PRIVATE kickcat::kickcat) diff --git a/recipes/kickcat/all/test_package/conanfile.py b/recipes/kickcat/all/test_package/conanfile.py new file mode 100644 index 0000000000000..e46a141327eed --- /dev/null +++ b/recipes/kickcat/all/test_package/conanfile.py @@ -0,0 +1,25 @@ +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" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/kickcat/all/test_package/test_package.cc b/recipes/kickcat/all/test_package/test_package.cc new file mode 100644 index 0000000000000..a0ac4c8fdf423 --- /dev/null +++ b/recipes/kickcat/all/test_package/test_package.cc @@ -0,0 +1,32 @@ +#include "kickcat/Bus.h" +#include "kickcat/Link.h" +#include "kickcat/Prints.h" +#include "kickcat/SocketNull.h" + +#include + +using namespace kickcat; + +int main(int argc, char *argv[]) +{ + std::shared_ptr socket = std::make_shared(); + try + { + socket->open("null"); + } + catch (std::exception const &e) + { + std::cerr << e.what() << std::endl; + return 1; + } + + auto report_redundancy = []() { + }; + + std::shared_ptr link = std::make_shared(socket, socket, report_redundancy); + link->setTimeout(2ms); + link->checkRedundancyNeeded(); + + Bus bus(link); + return 0; +} diff --git a/recipes/kickcat/config.yml b/recipes/kickcat/config.yml new file mode 100644 index 0000000000000..7990d533925c9 --- /dev/null +++ b/recipes/kickcat/config.yml @@ -0,0 +1,3 @@ +versions: + "v2-alpha3": + folder: all From cc64809e4f39262077e27346436d45050f64e3cb Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Wed, 2 Aug 2023 12:50:02 +0200 Subject: [PATCH 062/637] (#19016) [bot] Update authorized users list (2023-08-02) --- .c3i/authorized_users.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index f24e1eb3d8a3a..902e3fd4b97b9 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1203,3 +1203,9 @@ authorized_users: - jeremy-rifkin - Christian-Prather - Siarh199 +- liquiddaniel +- seppeon +- SavenkovIgor +- aliaksei135 +- ibosnic00 +- Xav83 From d3883d5f94b981a28a8f8daab8f222379d315586 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 3 Aug 2023 16:19:46 +0900 Subject: [PATCH 063/637] (#18325) opentelemetry-proto: add version 1.0.0 Co-authored-by: Daniel --- recipes/opentelemetry-proto/all/conandata.yml | 3 +++ recipes/opentelemetry-proto/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/opentelemetry-proto/all/conandata.yml b/recipes/opentelemetry-proto/all/conandata.yml index 88d8d71b3c37a..94ffeec1c7831 100644 --- a/recipes/opentelemetry-proto/all/conandata.yml +++ b/recipes/opentelemetry-proto/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.0": + url: "https://github.com/open-telemetry/opentelemetry-proto/archive/v1.0.0.tar.gz" + sha256: "a13a1a7b76a1f22a0ca2e6c293e176ffef031413ab8ba653a82a1dbc286a3a33" "0.20.0": url: "https://github.com/open-telemetry/opentelemetry-proto/archive/v0.20.0.tar.gz" sha256: "6ab267cf82832ed60ad075d574c78da736193eecb9693e8a8d02f65d6d3f3520" diff --git a/recipes/opentelemetry-proto/config.yml b/recipes/opentelemetry-proto/config.yml index f4d1c28407340..64c1fc73aecec 100644 --- a/recipes/opentelemetry-proto/config.yml +++ b/recipes/opentelemetry-proto/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.0": + folder: all "0.20.0": folder: all "0.19.0": From f42fbae2ab256de710cb036a075983e78ec82a5f Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 3 Aug 2023 12:04:11 +0200 Subject: [PATCH 064/637] (#19026) [bx] Fix test package imports Signed-off-by: Uilian Ries --- recipes/bx/all/test_package/conanfile.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/recipes/bx/all/test_package/conanfile.py b/recipes/bx/all/test_package/conanfile.py index 7914baa434398..d3dd545ae68ba 100644 --- a/recipes/bx/all/test_package/conanfile.py +++ b/recipes/bx/all/test_package/conanfile.py @@ -1,10 +1,8 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.layout import cmake_layout -from conan.tools.cmake import CMake +from conan.tools.cmake import CMake, cmake_layout import os -required_conan_version = ">=1.50.0" class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" From 5423b3589c3df50d8852ab0b1b4c53f441181039 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 3 Aug 2023 19:19:51 +0900 Subject: [PATCH 065/637] (#18425) msgpack-cxx: add version 6.1.0, use download tarballs, update boost --- recipes/msgpack-cxx/all/conandata.yml | 31 +++++++++++++++------------ recipes/msgpack-cxx/all/conanfile.py | 2 +- recipes/msgpack-cxx/config.yml | 2 ++ 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/recipes/msgpack-cxx/all/conandata.yml b/recipes/msgpack-cxx/all/conandata.yml index 64a5e6f43e3e6..6af577efebddf 100644 --- a/recipes/msgpack-cxx/all/conandata.yml +++ b/recipes/msgpack-cxx/all/conandata.yml @@ -1,22 +1,25 @@ sources: + "6.1.0": + url: "https://github.com/msgpack/msgpack-c/releases/download/cpp-6.1.0/msgpack-cxx-6.1.0.tar.gz" + sha256: "23ede7e93c8efee343ad8c6514c28f3708207e5106af3b3e4969b3a9ed7039e7" "6.0.0": - url: "https://github.com/msgpack/msgpack-c/archive/cpp-6.0.0.tar.gz" - sha256: "d02f7ffd28b1d38ab9f5f758c4744fadfae92150461fb8154c98ac49226cff90" + url: "https://github.com/msgpack/msgpack-c/releases/download/cpp-6.0.0/msgpack-cxx-6.0.0.tar.gz" + sha256: "0948d2db98245fb97b9721cfbc3e44c1b832e3ce3b8cfd7485adc368dc084d14" "5.0.0": - url: "https://github.com/msgpack/msgpack-c/archive/cpp-5.0.0.tar.gz" - sha256: "bd6b8e255f0a62cf8f50f1d292f979ac8ea9a4aa121938679d6f419d6df70ea3" + url: "https://github.com/msgpack/msgpack-c/releases/download/cpp-5.0.0/msgpack-cxx-5.0.0.tar.gz" + sha256: "80f997575acff12b1b64158ef9dbad4cff32595f985532e16c6ea67e317452d5" "4.1.3": - url: "https://github.com/msgpack/msgpack-c/archive/cpp-4.1.3.tar.gz" - sha256: "fd0a685656f11b8aa09ed33bcbdcad3105d25d0034ca3dba9fe957623a42d253" + url: "https://github.com/msgpack/msgpack-c/releases/download/cpp-4.1.3/msgpack-cxx-4.1.3.tar.gz" + sha256: "2539075ea2f35c15cab5c50ecba00d76fc4cbdcd485840257f15ebb04e8e3e1a" "4.1.2": - url: "https://github.com/msgpack/msgpack-c/archive/cpp-4.1.2.tar.gz" - sha256: "7460ad43552c9d9b56a75f20e1f4fedf18fff1c48715d6cfa91d779b26ca3795" + url: "https://github.com/msgpack/msgpack-c/releases/download/cpp-4.1.2/msgpack-cxx-4.1.2.tar.gz" + sha256: "eeddd7faeacbc12e10052bd1e3ec78bd26c69bfbbea9f9264c7ffce9b1ede7b1" "4.1.1": - url: "https://github.com/msgpack/msgpack-c/archive/cpp-4.1.1.tar.gz" - sha256: "221cc539e77f5ca02f4f0bbb1edafa9ca8c08de7ba8072d7baf2139930d99182" + url: "https://github.com/msgpack/msgpack-c/releases/download/cpp-4.1.1/msgpack-cxx-4.1.1.tar.gz" + sha256: "8115c5edcf20bc1408c798a6bdaec16c1e52b1c34859d4982a0fb03300438f0b" "4.1.0": - url: "https://github.com/msgpack/msgpack-c/archive/cpp-4.1.0.tar.gz" - sha256: "634762502a192026bd5db773f9e18d900ad04cfc312b52faee350a5c76e5ccfb" + url: "https://github.com/msgpack/msgpack-c/releases/download/cpp-4.1.0/msgpack-cxx-4.1.0.tar.gz" + sha256: "11e042ffdafda6fc4ebdc5f4f63b352229b89796c2f8aa3e813116ec1dd8377d" "4.0.3": - url: "https://github.com/msgpack/msgpack-c/archive/cpp-4.0.3.tar.gz" - sha256: "23d737b1e959dfb6ca420564563f098e758adacc0b18003c56abf1b945bd1d4a" + url: "https://github.com/msgpack/msgpack-c/releases/download/cpp-4.0.3/msgpack-cxx-4.0.3.tar.gz" + sha256: "9b3c1803b9855b7b023d7f181f66ebb0d6941275ba41d692037e0aa27736443f" diff --git a/recipes/msgpack-cxx/all/conanfile.py b/recipes/msgpack-cxx/all/conanfile.py index 2bcaa82b381e6..0431bac108f83 100644 --- a/recipes/msgpack-cxx/all/conanfile.py +++ b/recipes/msgpack-cxx/all/conanfile.py @@ -34,7 +34,7 @@ def layout(self): def requirements(self): if self.options.get_safe("use_boost", True): - self.requires("boost/1.81.0") + self.requires("boost/1.82.0") def package_id(self): self.info.clear() diff --git a/recipes/msgpack-cxx/config.yml b/recipes/msgpack-cxx/config.yml index 1c632d41b23dd..934a0432a27c7 100644 --- a/recipes/msgpack-cxx/config.yml +++ b/recipes/msgpack-cxx/config.yml @@ -1,4 +1,6 @@ versions: + "6.1.0": + folder: all "6.0.0": folder: all "5.0.0": From e72d332dc8c1751cf957bc176baecaa374346ad1 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 3 Aug 2023 13:45:05 +0300 Subject: [PATCH 066/637] (#18346) cprocessing: migrate to Conan v2, disable interactive GUI in test_package * cprocessing: migrate to Conan v2 * cprocessing: disable GUI creation in test_package * cprocessing: restore test_v1_package * cprocessing: restore VirtualRunEnv in test_package --- recipes/cprocessing/all/conanfile.py | 81 ++++++++++-------- .../all/test_package/CMakeLists.txt | 5 +- .../cprocessing/all/test_package/conanfile.py | 20 +++-- .../all/test_package/test_package.cpp | 85 ++++++++++--------- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../all/test_v1_package/conanfile.py | 18 ++++ 6 files changed, 131 insertions(+), 86 deletions(-) create mode 100644 recipes/cprocessing/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/cprocessing/all/test_v1_package/conanfile.py diff --git a/recipes/cprocessing/all/conanfile.py b/recipes/cprocessing/all/conanfile.py index f1d8d20922d76..c9ae209b2576f 100644 --- a/recipes/cprocessing/all/conanfile.py +++ b/recipes/cprocessing/all/conanfile.py @@ -1,33 +1,45 @@ -from conans import ConanFile, tools -from conans.tools import ConanInvalidConfiguration import os import re -required_conan_version = ">=1.43.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get, load, replace_in_file, save +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + class CProcessingConan(ConanFile): name = "cprocessing" - description = "Processsing programming for C++ " + description = "Processing programming for C++ " license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/maksmakuta/CProcessing" - topics = ("processing", "opengl", "sketch") + topics = ("processing", "opengl", "sketch", "header-only") + + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" + no_copy_source = True @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 20 @property def _compilers_minimum_version(self): return { - "gcc": "9", - "Visual Studio": "16.2", - "msvc": "19.22", - "clang": "10", - "apple-clang": "11" + "gcc": "9", + "Visual Studio": "16.2", + "msvc": "19.22", + "clang": "10", + "apple-clang": "11", } + def layout(self): + basic_layout(self, src_folder="src") + def requirements(self): self.requires("glfw/3.3.7") self.requires("glm/0.9.9.8") @@ -36,44 +48,39 @@ def requirements(self): self.requires("opengl/system") def package_id(self): - self.info.header_only() + self.info.clear() def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 20) - - def lazy_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] - - compiler_version = str(self.settings.compiler.version) - + check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if not minimum_version: - self.output.warn("{} requires C++20. Your compiler is unknown. Assuming it supports C++20.".format(self.name)) - elif lazy_lt_semver(compiler_version, minimum_version): - raise ConanInvalidConfiguration("{} requires some C++20 features,".format(self.name)) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires some C++{self._min_cppstd} features, which your compiler does not support." + ) def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, - destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): - tools.replace_in_file(os.path.join(self._source_subfolder, "lib", "PImage.h"), - "stb/stb_image.h", - "stb_image.h") - - def package(self): - self.copy("*.h", "include", os.path.join(self._source_subfolder, "lib")) + replace_in_file(self, os.path.join(self.source_folder, "lib", "PImage.h"), "stb/stb_image.h", "stb_image.h") + def _extract_license(self): # Extract the License/s from README.md to a file - tmp = tools.load(os.path.join(self._source_subfolder, "README.md")) + tmp = load(self, os.path.join(self.source_folder, "README.md")) license_contents = re.search("(## Author.*)", tmp, re.DOTALL)[1] - tools.save(os.path.join(self.package_folder, "licenses", "LICENSE.md"), license_contents) + save(self, os.path.join(self.package_folder, "licenses", "LICENSE.md"), license_contents) + + def package(self): + self._extract_license() + copy(self, "*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "lib")) def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.set_property("cmake_file_name", "CProcessing") self.cpp_info.set_property("cmake_target_name", "CProcessing::CProcessing") diff --git a/recipes/cprocessing/all/test_package/CMakeLists.txt b/recipes/cprocessing/all/test_package/CMakeLists.txt index 05121b9bfe414..eeeb2f9006cc8 100644 --- a/recipes/cprocessing/all/test_package/CMakeLists.txt +++ b/recipes/cprocessing/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(CProcessing REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/cprocessing/all/test_package/conanfile.py b/recipes/cprocessing/all/test_package/conanfile.py index 51cf79f1d6887..ef5d7042163ec 100644 --- a/recipes/cprocessing/all/test_package/conanfile.py +++ b/recipes/cprocessing/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,7 +21,6 @@ def build(self): cmake.build() def test(self): - test_file = os.path.join("bin", "test_package") - if self.settings.os == "Windows": - test_file += ".exe" - assert os.path.exists(test_file) + 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/cprocessing/all/test_package/test_package.cpp b/recipes/cprocessing/all/test_package/test_package.cpp index 479e221b8ea06..e8aaee04efe2b 100644 --- a/recipes/cprocessing/all/test_package/test_package.cpp +++ b/recipes/cprocessing/all/test_package/test_package.cpp @@ -6,67 +6,74 @@ * Part 2: https://youtube.com/shorts/IS6_apBewlI */ +// Disable the main function from from processing.h +// to disable the interactive GUI for the purposes of this test +#define main _main #include +#undef main float speed; -class Star{ +class Star { private: - float x,y,z,pz; + float x, y, z, pz; + public: - Star(){ - this->x = random(-width,width); - this->y = random(-height,height); - this->z = random(width); - this->pz = z; + Star() { + this->x = random(-width, width); + this->y = random(-height, height); + this->z = random(width); + this->pz = z; } - void update(){ - this->z -= speed; - if(this->z < 1.f){ - this->z = width; - this->x = random(-width,width); - this->y = random(-height,height); - this->pz = z; - } + void update() { + this->z -= speed; + if (this->z < 1.f) { + this->z = width; + this->x = random(-width, width); + this->y = random(-height, height); + this->pz = z; + } } - void show(){ - fill(255); + void show() { + fill(255); - float sx = map(this->x / this->z,0,1,0, width); - float sy = map(this->y / this->z,0,1,0,height); + float sx = map(this->x / this->z, 0, 1, 0, width); + float sy = map(this->y / this->z, 0, 1, 0, height); - float r = map(this->z,0,width,16,0); - circle(sx,sy,r); + float r = map(this->z, 0, width, 16, 0); + circle(sx, sy, r); - float zx = map(this->x / this->pz,0,1,0, width); - float zy = map(this->y / this->pz,0,1,0,height); + float zx = map(this->x / this->pz, 0, 1, 0, width); + float zy = map(this->y / this->pz, 0, 1, 0, height); - this->pz = z; + this->pz = z; - stroke(255); - line(zx,zy,sx,sy); + stroke(255); + line(zx, zy, sx, sy); } - }; std::vector stars; -void setup(){ - size(640,480); - for(int a = 0;a < 100;a++) - stars.push_back(Star()); +void setup() { + size(640, 480); + for (int a = 0; a < 100; a++) + stars.push_back(Star()); } -void draw(){ - speed = map(mouseX,0,width,0.f,50.f); - background(0); - translate(width/2,height/2); +void draw() { + speed = map(mouseX, 0, width, 0.f, 50.f); + background(0); + translate(width / 2, height / 2); - for(int a = 0;a < stars.size();a++){ - stars[a].update(); - stars[a].show(); - } + for (int a = 0; a < stars.size(); a++) { + stars[a].update(); + stars[a].show(); + } +} +int main() { + return 0; } diff --git a/recipes/cprocessing/all/test_v1_package/CMakeLists.txt b/recipes/cprocessing/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/cprocessing/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/cprocessing/all/test_v1_package/conanfile.py b/recipes/cprocessing/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..51cf79f1d6887 --- /dev/null +++ b/recipes/cprocessing/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + test_file = os.path.join("bin", "test_package") + if self.settings.os == "Windows": + test_file += ".exe" + assert os.path.exists(test_file) From 243374c8b66df5c95d631ce297afb7b8f3906dbd Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Thu, 3 Aug 2023 13:05:30 +0200 Subject: [PATCH 067/637] (#18417) libjpeg-turbo: add version 3.0.0 * libjpeg-turbo: add version 3.0.0 * simplify version comparison * libjpeg-turbo: remove older versions per https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/sources_and_patches.md#removing-old-versions --- recipes/libjpeg-turbo/all/conandata.yml | 21 +++------------------ recipes/libjpeg-turbo/all/conanfile.py | 18 +++++++++++------- recipes/libjpeg-turbo/config.yml | 14 ++------------ 3 files changed, 16 insertions(+), 37 deletions(-) diff --git a/recipes/libjpeg-turbo/all/conandata.yml b/recipes/libjpeg-turbo/all/conandata.yml index 1821235633f65..fed4921e77f53 100644 --- a/recipes/libjpeg-turbo/all/conandata.yml +++ b/recipes/libjpeg-turbo/all/conandata.yml @@ -1,25 +1,10 @@ sources: + "3.0.0": + url: "https://sourceforge.net/projects/libjpeg-turbo/files/3.0.0/libjpeg-turbo-3.0.0.tar.gz" + sha256: "c77c65fcce3d33417b2e90432e7a0eb05f59a7fff884022a9d931775d583bfaa" "2.1.5": url: "https://sourceforge.net/projects/libjpeg-turbo/files/2.1.5/libjpeg-turbo-2.1.5.tar.gz" sha256: "bc12bc9dce55300c6bf4342bc233bcc26bd38bf289eedf147360d731c668ddaf" - "2.1.4": - url: "https://sourceforge.net/projects/libjpeg-turbo/files/2.1.4/libjpeg-turbo-2.1.4.tar.gz" - sha256: "d3ed26a1131a13686dfca4935e520eb7c90ae76fbc45d98bb50a8dc86230342b" - "2.1.3": - url: "https://sourceforge.net/projects/libjpeg-turbo/files/2.1.3/libjpeg-turbo-2.1.3.tar.gz" - sha256: "467b310903832b033fe56cd37720d1b73a6a3bd0171dbf6ff0b620385f4f76d0" - "2.1.2": - url: "https://sourceforge.net/projects/libjpeg-turbo/files/2.1.2/libjpeg-turbo-2.1.2.tar.gz" - sha256: "09b96cb8cbff9ea556a9c2d173485fd19488844d55276ed4f42240e1e2073ce5" - "2.1.1": - url: "https://sourceforge.net/projects/libjpeg-turbo/files/2.1.1/libjpeg-turbo-2.1.1.tar.gz" - sha256: "b76aaedefb71ba882cbad4e9275b30c2ae493e3195be0a099425b5c6b99bd510" - "2.1.0": - url: "https://sourceforge.net/projects/libjpeg-turbo/files/2.1.0/libjpeg-turbo-2.1.0.tar.gz" - sha256: "bef89803e506f27715c5627b1e3219c95b80fc31465d4452de2a909d382e4444" "2.0.6": url: "https://sourceforge.net/projects/libjpeg-turbo/files/2.0.6/libjpeg-turbo-2.0.6.tar.gz" sha256: "d74b92ac33b0e3657123ddcf6728788c90dc84dcb6a52013d758af3c4af481bb" - "2.0.5": - url: "https://sourceforge.net/projects/libjpeg-turbo/files/2.0.5/libjpeg-turbo-2.0.5.tar.gz" - sha256: "16f8f6f2715b3a38ab562a84357c793dd56ae9899ce130563c72cd93d8357b5d" diff --git a/recipes/libjpeg-turbo/all/conanfile.py b/recipes/libjpeg-turbo/all/conanfile.py index afc30df36cff2..9405b0c63aaf6 100644 --- a/recipes/libjpeg-turbo/all/conanfile.py +++ b/recipes/libjpeg-turbo/all/conanfile.py @@ -49,6 +49,9 @@ class LibjpegTurboConan(ConanFile): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) >= "3.0.0": + del self.options.enable12bit + del self.options.mem_src_dst def configure(self): if self.options.shared: @@ -56,22 +59,22 @@ def configure(self): self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") - if self.options.enable12bit: + if self.options.get_safe("enable12bit"): del self.options.java del self.options.turbojpeg - if self.options.enable12bit or self.settings.os == "Emscripten": + if self.options.get_safe("enable12bit") or self.settings.os == "Emscripten": del self.options.SIMD - if self.options.enable12bit or self.options.libjpeg7_compatibility or self.options.libjpeg8_compatibility: + if self.options.get_safe("enable12bit") or self.options.libjpeg7_compatibility or self.options.libjpeg8_compatibility: del self.options.arithmetic_encoder del self.options.arithmetic_decoder if self.options.libjpeg8_compatibility: - del self.options.mem_src_dst + self.options.rm_safe("mem_src_dst") def layout(self): cmake_layout(self, src_folder="src") def validate(self): - if self.options.enable12bit and (self.options.libjpeg7_compatibility or self.options.libjpeg8_compatibility): + if self.options.get_safe("enable12bit") and (self.options.libjpeg7_compatibility or self.options.libjpeg8_compatibility): raise ConanInvalidConfiguration("12-bit samples is not allowed with libjpeg v7/v8 API/ABI") if self.options.get_safe("java") and not self.options.shared: raise ConanInvalidConfiguration("java wrapper requires shared libjpeg-turbo") @@ -107,10 +110,11 @@ def generate(self): tc.variables["WITH_ARITH_DEC"] = self._is_arithmetic_decoding_enabled tc.variables["WITH_JPEG7"] = self.options.libjpeg7_compatibility tc.variables["WITH_JPEG8"] = self.options.libjpeg8_compatibility - tc.variables["WITH_MEM_SRCDST"] = self.options.get_safe("mem_src_dst", False) tc.variables["WITH_TURBOJPEG"] = self.options.get_safe("turbojpeg", False) tc.variables["WITH_JAVA"] = self.options.get_safe("java", False) - tc.variables["WITH_12BIT"] = self.options.enable12bit + if Version(self.version) < "3.0.0": + tc.variables["WITH_MEM_SRCDST"] = self.options.get_safe("mem_src_dst", False) + tc.variables["WITH_12BIT"] = self.options.enable12bit if is_msvc(self): tc.variables["WITH_CRT_DLL"] = True # avoid replacing /MD by /MT in compiler flags if Version(self.version) <= "2.1.0": diff --git a/recipes/libjpeg-turbo/config.yml b/recipes/libjpeg-turbo/config.yml index cdfe1237074c7..d646887ca99a3 100644 --- a/recipes/libjpeg-turbo/config.yml +++ b/recipes/libjpeg-turbo/config.yml @@ -1,17 +1,7 @@ versions: - "2.1.5": - folder: all - "2.1.4": - folder: all - "2.1.3": - folder: all - "2.1.2": + "3.0.0": folder: all - "2.1.1": - folder: all - "2.1.0": + "2.1.5": folder: all "2.0.6": folder: all - "2.0.5": - folder: all From a875c3c8a0be8bbc522dc8bac6206b453edf50d6 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 4 Aug 2023 01:17:50 +0900 Subject: [PATCH 068/637] (#18882) dice-template-library: add version 1.1.0 --- recipes/dice-template-library/all/conandata.yml | 3 +++ recipes/dice-template-library/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/dice-template-library/all/conandata.yml b/recipes/dice-template-library/all/conandata.yml index def2d951ef94e..8bfdcb315eb92 100644 --- a/recipes/dice-template-library/all/conandata.yml +++ b/recipes/dice-template-library/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v1.1.0.tar.gz" + sha256: "a00ee401379eaf6c8af013fb39d6732fa68c3852e14b50789edde6f054647ca2" "1.0.0": url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v1.0.0.tar.gz" sha256: "485505ad3f9fb033083e2952bd8b4e68f6b4f123746b20f4ec3af46f4ce66cfe" diff --git a/recipes/dice-template-library/config.yml b/recipes/dice-template-library/config.yml index 930d790eeb4ba..f1e3df07fed83 100644 --- a/recipes/dice-template-library/config.yml +++ b/recipes/dice-template-library/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.0": + folder: all "1.0.0": folder: all "0.3.0": From 384dcf89df6fa87f9999e0d553236ada370f8d0a Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Fri, 4 Aug 2023 08:34:27 +0200 Subject: [PATCH 069/637] (#18975) asio: add version 1.28.1 Generated and committed by [Conan Center Bot](https://github.com/qchateau/conan-center-bot) Find more updatable recipes in the [GitHub Pages](https://qchateau.github.io/conan-center-bot/) Co-authored-by: Quentin Chateau via Conan Center Bot --- recipes/asio/all/conandata.yml | 3 +++ recipes/asio/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/asio/all/conandata.yml b/recipes/asio/all/conandata.yml index 46bc4f8f41b43..d8865c47b5bf0 100644 --- a/recipes/asio/all/conandata.yml +++ b/recipes/asio/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.28.1": + url: "https://github.com/chriskohlhoff/asio/archive/asio-1-28-1.tar.gz" + sha256: "5ff6111ec8cbe73a168d997c547f562713aa7bd004c5c02326f0e9d579a5f2ce" "1.28.0": url: "https://github.com/chriskohlhoff/asio/archive/asio-1-28-0.tar.gz" sha256: "226438b0798099ad2a202563a83571ce06dd13b570d8fded4840dbc1f97fa328" diff --git a/recipes/asio/config.yml b/recipes/asio/config.yml index 06fbadd587b1a..33c8893e89fa5 100644 --- a/recipes/asio/config.yml +++ b/recipes/asio/config.yml @@ -1,4 +1,6 @@ versions: + "1.28.1": + folder: all "1.28.0": folder: all "1.27.0": From 30e8234e38100d357c5f66cd5720ef7fdf5bfa05 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 4 Aug 2023 10:43:20 +0200 Subject: [PATCH 070/637] (#19035) [config] Update Conan client version: 1.60.2 and 2.0.9 Signed-off-by: Uilian Ries --- .c3i/config_v1.yml | 2 +- .c3i/config_v2.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.c3i/config_v1.yml b/.c3i/config_v1.yml index 5241e481d134f..c28c0345e0824 100644 --- a/.c3i/config_v1.yml +++ b/.c3i/config_v1.yml @@ -3,7 +3,7 @@ id: 'conan-io/conan-center-index' conan: - version: 1.60.1 + version: 1.60.2 artifactory: url: "https://c3i.jfrog.io/c3i" diff --git a/.c3i/config_v2.yml b/.c3i/config_v2.yml index 7aaabf1c918f1..b5ee3148ca00b 100644 --- a/.c3i/config_v2.yml +++ b/.c3i/config_v2.yml @@ -3,7 +3,7 @@ id: 'conan-io/conan-center-index' conan: - version: 2.0.8 + version: 2.0.9 artifactory: url: "https://c3i.jfrog.io/c3i" From f14921c2dab30f659c6d576c108d866c59bcae81 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 4 Aug 2023 18:54:55 +0900 Subject: [PATCH 071/637] (#18841) usockets: add version 0.8.6 Co-authored-by: Carlos Zoido --- recipes/usockets/all/conandata.yml | 7 ++++ .../all/patches/0001-makefile_0.8.6.patch | 35 +++++++++++++++++++ recipes/usockets/config.yml | 2 ++ 3 files changed, 44 insertions(+) create mode 100644 recipes/usockets/all/patches/0001-makefile_0.8.6.patch diff --git a/recipes/usockets/all/conandata.yml b/recipes/usockets/all/conandata.yml index e6a17b330a5a4..1e162a7179edd 100644 --- a/recipes/usockets/all/conandata.yml +++ b/recipes/usockets/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.8.6": + url: "https://github.com/uNetworking/uSockets/archive/v0.8.6.tar.gz" + sha256: "16eba133dd33eade2f5f8dd87612c04b5dd711066e0471c60d641a2f6a988f16" "0.8.5": url: "https://github.com/uNetworking/uSockets/archive/v0.8.5.tar.gz" sha256: "c52c98b7ff2c24534c17ad97d5fea8ca0cb7ff38cc933b8d08bac6e498a2ea6b" @@ -21,6 +24,10 @@ sources: url: "https://github.com/uNetworking/uSockets/archive/v0.4.0.tar.gz" sha256: "f9f15b395def578cc79a5b32abc64fa9cff5dac873062911f515b984b90f7cc2" patches: + "0.8.6": + - patch_file: "patches/0001-makefile_0.8.6.patch" + patch_description: "remove lto options" + patch_type: "portability" "0.8.5": - patch_file: "patches/0001-makefile_0.8.3.patch" patch_description: "remove lto options" diff --git a/recipes/usockets/all/patches/0001-makefile_0.8.6.patch b/recipes/usockets/all/patches/0001-makefile_0.8.6.patch new file mode 100644 index 0000000000000..e77691ceeac47 --- /dev/null +++ b/recipes/usockets/all/patches/0001-makefile_0.8.6.patch @@ -0,0 +1,35 @@ +diff --git a/Makefile b/Makefile +index aa874b9..d58ac0a 100644 +--- a/Makefile ++++ b/Makefile +@@ -74,10 +74,10 @@ endif + # By default we build the uSockets.a static library + default: + rm -f *.o +- $(CC) $(CFLAGS) -O3 -c src/*.c src/eventing/*.c src/crypto/*.c src/io_uring/*.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) -O3 -c src/*.c src/eventing/*.c src/crypto/*.c src/io_uring/*.c + # Also link in Boost Asio support + ifeq ($(WITH_ASIO),1) +- $(CXX) $(CXXFLAGS) -Isrc -std=c++14 -flto -O3 -c src/eventing/asio.cpp ++ $(CXX) $(CXXFLAGS) -Isrc -std=c++14 $(CPPFLAGS) -O3 -c src/eventing/asio.cpp + endif + + # For now we do rely on C++17 for OpenSSL support but we will be porting this work to C11 +@@ -88,7 +88,7 @@ ifeq ($(WITH_BORINGSSL),1) + $(CXX) $(CXXFLAGS) -std=c++17 -flto -O3 -c src/crypto/*.cpp + endif + # Create a static library (try windows, then unix) +- lib.exe /out:uSockets.a *.o || $(AR) rvs uSockets.a *.o ++ lib.exe /out:uSockets.lib *.obj || $(AR) rvs libuSockets.a *.o + + # BoringSSL needs cmake and golang + .PHONY: boringssl +@@ -98,7 +98,7 @@ boringssl: + # Builds all examples + .PHONY: examples + examples: default +- for f in examples/*.c; do $(CC) -O3 $(CFLAGS) -o $$(basename "$$f" ".c")$(EXEC_SUFFIX) "$$f" $(LDFLAGS); done ++ for f in examples/*.c; do $(CC) -O3 $(CFLAGS) $(CPPFLAGS) -o $$(basename "$$f" ".c")$(EXEC_SUFFIX) "$$f" $(LDFLAGS); done + + swift_examples: + swiftc -O -I . examples/swift_http_server/main.swift uSockets.a -o swift_http_server diff --git a/recipes/usockets/config.yml b/recipes/usockets/config.yml index c4f53d0a2aff0..ed2a319a00e8b 100644 --- a/recipes/usockets/config.yml +++ b/recipes/usockets/config.yml @@ -1,4 +1,6 @@ versions: + "0.8.6": + folder: all "0.8.5": folder: all "0.8.3": From 0d22b4e75343a5a48281316af499bd9c9add4390 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Fri, 4 Aug 2023 12:21:58 +0200 Subject: [PATCH 072/637] (#18859) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 9b1a222098118..1a5d515961ed7 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -309,13 +309,18 @@ required_for_references: - function2 - fxdiv - g3log +- gainput - gamma +- gcem - gdbm - gdcm - gdk-pixbuf - gegles-spdlog_setup - gemmlowp +- genie +- geographiclib - geos +- geotrans - getopt-for-visual-studio - gettext - gflags @@ -326,6 +331,9 @@ required_for_references: - gklib - glad - glaze +- glbinding +- glew +- glext - glfw - gli - glib From ad47e864c041bc92f294067c9ce10030ea64fa39 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 4 Aug 2023 20:12:40 +0900 Subject: [PATCH 073/637] (#19009) imgui: add version 1.89.8, 1.89.8-docking --- recipes/imgui/all/conandata.yml | 6 ++++++ recipes/imgui/config.yml | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/recipes/imgui/all/conandata.yml b/recipes/imgui/all/conandata.yml index 82db7f4c7e4b5..18b830b59f364 100644 --- a/recipes/imgui/all/conandata.yml +++ b/recipes/imgui/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.89.8": + url: "https://github.com/ocornut/imgui/archive/v1.89.8.tar.gz" + sha256: "6680ccc32430009a8204291b1268b2367d964bd6d1b08a4e0358a017eb8e8c9e" + "1.89.8-docking": + url: "https://github.com/ocornut/imgui/archive/v1.89.8-docking.tar.gz" + sha256: "d48c4856e42a8fa3e6df3efae7eae86012fa65d9dceb03d1a2080a2386063635" "1.89.7": url: "https://github.com/ocornut/imgui/archive/v1.89.7.tar.gz" sha256: "115ee9e242af98a884302ac0f6ca3b2b26b1f10c660205f5e7ad9f1d1c96d269" diff --git a/recipes/imgui/config.yml b/recipes/imgui/config.yml index 737cb8b3dbc2c..d3d7aaa4e4a68 100644 --- a/recipes/imgui/config.yml +++ b/recipes/imgui/config.yml @@ -1,4 +1,8 @@ versions: + "1.89.8": + folder: all + "1.89.8-docking": + folder: all "1.89.7": folder: all "1.89.7-docking": From bedaf1a4ae5b4a341be350dda700ad5686af0af8 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 4 Aug 2023 20:50:14 +0900 Subject: [PATCH 074/637] (#18437) asio-grpc: add version 2.5.1, update dependencies --- recipes/asio-grpc/all/conandata.yml | 3 +++ recipes/asio-grpc/all/conanfile.py | 5 +++-- recipes/asio-grpc/config.yml | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/recipes/asio-grpc/all/conandata.yml b/recipes/asio-grpc/all/conandata.yml index 67c8b715cb2d3..2e070194bef3f 100644 --- a/recipes/asio-grpc/all/conandata.yml +++ b/recipes/asio-grpc/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.5.1": + url: "https://github.com/Tradias/asio-grpc/archive/refs/tags/v2.5.1.tar.gz" + sha256: "571779a25be6eed77a345088e3ded2cccf880c16800ee0075ece57116f14fc35" "2.4.0": url: "https://github.com/Tradias/asio-grpc/archive/refs/tags/v2.4.0.tar.gz" sha256: "d71de4f8de91dc0ad44d6a161fc628496b80622a6f9030dcd4c53b516629b8b7" diff --git a/recipes/asio-grpc/all/conanfile.py b/recipes/asio-grpc/all/conanfile.py index 41ebfbae5f918..a0e6d608281c4 100644 --- a/recipes/asio-grpc/all/conanfile.py +++ b/recipes/asio-grpc/all/conanfile.py @@ -38,6 +38,7 @@ def _compilers_minimum_version(self): return { "gcc": "7", "Visual Studio": "15.7", + "msvc": "191", "clang": "6", "apple-clang": "11", } @@ -57,9 +58,9 @@ def configure(self): def requirements(self): self.requires("grpc/1.50.1") if self._local_allocator_option == "boost_container" or self.options.backend == "boost": - self.requires("boost/1.81.0") + self.requires("boost/1.82.0") if self.options.backend == "asio": - self.requires("asio/1.24.0") + self.requires("asio/1.28.0") if self.options.backend == "unifex": self.requires("libunifex/cci.20220430") diff --git a/recipes/asio-grpc/config.yml b/recipes/asio-grpc/config.yml index 25e51279385fd..9952741d8464d 100644 --- a/recipes/asio-grpc/config.yml +++ b/recipes/asio-grpc/config.yml @@ -1,4 +1,6 @@ versions: + "2.5.1": + folder: all "2.4.0": folder: all "2.3.0": From a290187f7e7779286d2da3c7a518d3af9f9fbeff Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 4 Aug 2023 21:31:29 +0900 Subject: [PATCH 075/637] (#19033) gtest: add version 1.14.0 --- recipes/gtest/all/conandata.yml | 3 +++ recipes/gtest/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/gtest/all/conandata.yml b/recipes/gtest/all/conandata.yml index 1634a1e79e6fd..b22247dc8573d 100644 --- a/recipes/gtest/all/conandata.yml +++ b/recipes/gtest/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.14.0": + url: "https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz" + sha256: "8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7" "1.13.0": url: "https://github.com/google/googletest/archive/refs/tags/v1.13.0.tar.gz" sha256: "ad7fdba11ea011c1d925b3289cf4af2c66a352e18d4c7264392fead75e919363" diff --git a/recipes/gtest/config.yml b/recipes/gtest/config.yml index ee070419b09c3..fa66f2eb7d4d7 100644 --- a/recipes/gtest/config.yml +++ b/recipes/gtest/config.yml @@ -1,4 +1,6 @@ versions: + "1.14.0": + folder: all "1.13.0": folder: all "1.12.1": From 6e32eb389b3cb0f5859ca33c6de66e576164bc01 Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Fri, 4 Aug 2023 14:08:39 +0100 Subject: [PATCH 076/637] (#19040) emsdk: add version 3.1.44 --- recipes/emsdk/all/conandata.yml | 3 +++ recipes/emsdk/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/emsdk/all/conandata.yml b/recipes/emsdk/all/conandata.yml index 8a32427b651c2..72c3415a7c7c2 100644 --- a/recipes/emsdk/all/conandata.yml +++ b/recipes/emsdk/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.1.44": + url: "https://github.com/emscripten-core/emsdk/archive/3.1.44.tar.gz" + sha256: "cb8cded78f6953283429d724556e89211e51ac4d871fcf38e0b32405ee248e91" "3.1.31": url: "https://github.com/emscripten-core/emsdk/archive/3.1.31.tar.gz" sha256: "1d38b7375e12e85197165a4c51d76d90e1d9db8c2c593b64cfaec4338af54750" diff --git a/recipes/emsdk/config.yml b/recipes/emsdk/config.yml index 82752e0f1209d..f990e1dc35d29 100644 --- a/recipes/emsdk/config.yml +++ b/recipes/emsdk/config.yml @@ -1,4 +1,6 @@ versions: + "3.1.44": + folder: all "3.1.31": folder: all "3.1.30": From e976ac6b8782a90a5d6493184018109cd9af5450 Mon Sep 17 00:00:00 2001 From: igormironchik Date: Fri, 4 Aug 2023 16:28:24 +0300 Subject: [PATCH 077/637] (#19043) md4qt: bump version --- recipes/md4qt/all/conandata.yml | 3 +++ recipes/md4qt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index 876c188b63e35..e4f01057df770 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.9": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.9.tar.gz" + sha256: "5b00c997eb33e877ca54468a101345e3a9986ce1b61b0919fa8632efabc51b6d" "2.0.8": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.8.tar.gz" sha256: "50a47d407acf1ca6a5b96af0386da74f7cfb66322ec7453cbb543f4f66251683" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index 9e06767160daf..c184130e67ed4 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.9": + folder: all "2.0.8": folder: all "2.0.7": From c3046a2b65cc060b790f3015f0e7b187e8afe8d8 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Fri, 4 Aug 2023 21:09:28 +0200 Subject: [PATCH 078/637] (#19025) harfbuzz: add version 8.1.1 Generated and committed by [Conan Center Bot](https://github.com/qchateau/conan-center-bot) Find more updatable recipes in the [GitHub Pages](https://qchateau.github.io/conan-center-bot/) Co-authored-by: Quentin Chateau via Conan Center Bot --- recipes/harfbuzz/all/conandata.yml | 3 +++ recipes/harfbuzz/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/harfbuzz/all/conandata.yml b/recipes/harfbuzz/all/conandata.yml index 807ef3305d985..d165dd235addd 100644 --- a/recipes/harfbuzz/all/conandata.yml +++ b/recipes/harfbuzz/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "8.1.1": + url: "https://github.com/harfbuzz/harfbuzz/releases/download/8.1.1/harfbuzz-8.1.1.tar.xz" + sha256: "0305ad702e11906a5fc0c1ba11c270b7f64a8f5390d676aacfd71db129d6565f" "8.0.1": url: "https://github.com/harfbuzz/harfbuzz/releases/download/8.0.1/harfbuzz-8.0.1.tar.xz" sha256: "c1ce780acd385569f25b9a29603d1d5bc71e6940e55bfdd4f7266fad50e42620" diff --git a/recipes/harfbuzz/config.yml b/recipes/harfbuzz/config.yml index b575f01311eb4..502391a71084d 100644 --- a/recipes/harfbuzz/config.yml +++ b/recipes/harfbuzz/config.yml @@ -1,4 +1,6 @@ versions: + "8.1.1": + folder: all "8.0.1": folder: all "8.0.0": From fa28c8ea366db978953ccd9b8a63b26c347774c3 Mon Sep 17 00:00:00 2001 From: Klaus Holst Jacobsen <48069914+klausholstjacobsen@users.noreply.github.com> Date: Fri, 4 Aug 2023 23:49:39 +0200 Subject: [PATCH 079/637] (#19011) msgpack-c/3.3.0: Added version 3.3.0 --- recipes/msgpack-c/all/conandata.yml | 3 +++ recipes/msgpack-c/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/msgpack-c/all/conandata.yml b/recipes/msgpack-c/all/conandata.yml index dc158b2bf02e6..0062926e73ac9 100644 --- a/recipes/msgpack-c/all/conandata.yml +++ b/recipes/msgpack-c/all/conandata.yml @@ -8,3 +8,6 @@ sources: "4.0.0": url: "https://github.com/msgpack/msgpack-c/releases/download/c-4.0.0/msgpack-c-4.0.0.tar.gz" sha256: "420fe35e7572f2a168d17e660ef981a589c9cbe77faa25eb34a520e1fcc032c8" + "3.3.0": + url: "https://github.com/msgpack/msgpack-c/releases/download/cpp-3.3.0/msgpack-3.3.0.tar.gz" + sha256: "6e114d12a5ddb8cb11f669f83f32246e484a8addd0ce93f274996f1941c1f07b" diff --git a/recipes/msgpack-c/config.yml b/recipes/msgpack-c/config.yml index c43afaf0f726a..08e152a5c47d0 100644 --- a/recipes/msgpack-c/config.yml +++ b/recipes/msgpack-c/config.yml @@ -5,3 +5,5 @@ versions: folder: all "4.0.0": folder: all + "3.3.0": + folder: all From 5c83d68549e6dd45fb978e91809f989199eb95f2 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 5 Aug 2023 10:05:57 +0300 Subject: [PATCH 080/637] (#18748) perf: migrate to Conan v2 * perf: migrate to Conan v2 * perf: restore VirtualRunEnv in test_package --------- Co-authored-by: Carlos Zoido --- recipes/perf/all/conandata.yml | 1 - recipes/perf/all/conanfile.py | 75 ++++++++++++------- recipes/perf/all/test_package/conanfile.py | 14 ++-- recipes/perf/all/test_v1_package/conanfile.py | 9 +++ 4 files changed, 67 insertions(+), 32 deletions(-) create mode 100644 recipes/perf/all/test_v1_package/conanfile.py diff --git a/recipes/perf/all/conandata.yml b/recipes/perf/all/conandata.yml index 72be9d8648e78..7cffe456681ae 100644 --- a/recipes/perf/all/conandata.yml +++ b/recipes/perf/all/conandata.yml @@ -5,4 +5,3 @@ sources: patches: "5.13": - patch_file: patches/0001-Wno-strict-prototypes.patch - base_path: source_subfolder diff --git a/recipes/perf/all/conanfile.py b/recipes/perf/all/conanfile.py index 2b1346904f2b5..cfea4cd9b1a61 100644 --- a/recipes/perf/all/conanfile.py +++ b/recipes/perf/all/conanfile.py @@ -1,51 +1,74 @@ -from conans import ConanFile, AutoToolsBuildEnvironment, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.47.0" + class Perf(ConanFile): name = "perf" description = "Linux profiling with performance counters" - topics = ("linux", "profiling") + license = "GPL-2.0 WITH Linux-syscall-note" url = "https://github.com/conan-io/conan-center-index" homepage = "https://perf.wiki.kernel.org/index.php" - license = "GPL-2.0 WITH Linux-syscall-note" - settings = "os", "compiler", "build_type", "arch" - exports_sources = "patches/*" + topics = ("linux", "profiling") - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "application" + settings = "os", "arch", "compiler", "build_type" + def export_sources(self): + export_conandata_patches(self) + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + del self.info.settings.compiler def validate(self): - if self.settings.os != "Linux": + if self.settings.os not in ["Linux", "FreeBSD"]: raise ConanInvalidConfiguration("perf is supported only on Linux") def build_requirements(self): - self.build_requires("flex/2.6.4") - self.build_requires("bison/3.5.3") + self.tool_requires("flex/2.6.4") + self.tool_requires("bison/3.8.2") def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) + tc.make_args += ["NO_LIBPYTHON=1"] + tc.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - autotools = AutoToolsBuildEnvironment(self) - with tools.chdir(os.path.join(self.build_folder, self._source_subfolder, "tools", "perf")): - vars=autotools.vars - vars["NO_LIBPYTHON"] = "1" - autotools.make(vars=vars) + apply_conandata_patches(self) + autotools = Autotools(self) + with chdir(self, os.path.join(self.source_folder, "tools", "perf")): + autotools.make() def package(self): - self.copy("COPYING", src=self._source_subfolder, dst="licenses") - self.copy("LICENSES/**", src=self._source_subfolder, dst="licenses") - - self.copy("perf", src=os.path.join(self._source_subfolder, "tools", "perf"), dst="bin") + copy(self, "COPYING", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses")) + copy(self, "LICENSES/**", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses")) + copy(self, "perf", + src=os.path.join(self.source_folder, "tools", "perf"), + dst=os.path.join(self.package_folder, "bin")) def package_info(self): + self.cpp_info.frameworkdirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] + self.cpp_info.includedirs = [] + + # TODO: remove in conan v2 bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: %s" % bin_path) + self.output.info(f"Appending PATH environment variable: {bin_path}") self.env_info.PATH.append(bin_path) diff --git a/recipes/perf/all/test_package/conanfile.py b/recipes/perf/all/test_package/conanfile.py index 4001f8991b676..451dee24987b0 100644 --- a/recipes/perf/all/test_package/conanfile.py +++ b/recipes/perf/all/test_package/conanfile.py @@ -1,9 +1,13 @@ -from conans import ConanFile, tools +from conan import ConanFile -class TestPackage(ConanFile): +class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - + generators = "VirtualBuildEnv" + test_type = "explicit" + + def build_requirements(self): + self.tool_requires(self.tested_reference_str) + def test(self): - if not tools.cross_building(self): - self.run("perf version") + self.run("perf version") diff --git a/recipes/perf/all/test_v1_package/conanfile.py b/recipes/perf/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..4001f8991b676 --- /dev/null +++ b/recipes/perf/all/test_v1_package/conanfile.py @@ -0,0 +1,9 @@ +from conans import ConanFile, tools + + +class TestPackage(ConanFile): + settings = "os", "arch", "compiler", "build_type" + + def test(self): + if not tools.cross_building(self): + self.run("perf version") From 850a3544fdf179d741a79aab35aace6fbaa18806 Mon Sep 17 00:00:00 2001 From: Beartama <8091245+uyha@users.noreply.github.com> Date: Sat, 5 Aug 2023 10:26:45 +0300 Subject: [PATCH 081/637] (#18880) luajit: specify `provides` attribute --- recipes/luajit/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/luajit/all/conanfile.py b/recipes/luajit/all/conanfile.py index 5271897d749e2..47079e98290b1 100644 --- a/recipes/luajit/all/conanfile.py +++ b/recipes/luajit/all/conanfile.py @@ -20,6 +20,7 @@ class LuajitConan(ConanFile): homepage = "http://luajit.org" description = "LuaJIT is a Just-In-Time Compiler (JIT) for the Lua programming language." topics = ("lua", "jit") + provides = "lua" settings = "os", "arch", "compiler", "build_type" options = {"shared": [True, False], "fPIC": [True, False]} default_options = {"shared": False, "fPIC": True} From 9e5b00044fce3db4a39932c05639a566d75719c6 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Sat, 5 Aug 2023 12:25:29 +0200 Subject: [PATCH 082/637] (#18499) gdal/post_3.5.0: bump deps * gdal/post_3.5.0: bump deps * build with cmake>=3.18 * fix build when with_libdeflate=True or when with_cryptopp=True and cryptopp is shared * fix_apple_shared_install_name --------- Co-authored-by: Carlos Zoido --- recipes/gdal/post_3.5.0/CMakeLists.txt | 4 +-- recipes/gdal/post_3.5.0/conanfile.py | 41 +++++++++++++++----------- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/recipes/gdal/post_3.5.0/CMakeLists.txt b/recipes/gdal/post_3.5.0/CMakeLists.txt index c0e666f41f1de..7c7f67a48db89 100644 --- a/recipes/gdal/post_3.5.0/CMakeLists.txt +++ b/recipes/gdal/post_3.5.0/CMakeLists.txt @@ -26,12 +26,12 @@ endif() if (${GDAL_USE_CRYPTOPP}) find_package(cryptopp REQUIRED) - add_library(CRYPTOPP::CRYPTOPP ALIAS cryptopp::cryptopp-static) + add_library(CRYPTOPP::CRYPTOPP ALIAS ${TARGET_FOR_CRYPTOPP}) endif() if (${GDAL_USE_DEFLATE}) find_package(libdeflate REQUIRED) - add_library(Deflate::Deflate ALIAS libdeflate::libdeflate) + add_library(Deflate::Deflate ALIAS ${TARGET_FOR_DEFLATE}) endif() if (${GDAL_USE_LZ4}) diff --git a/recipes/gdal/post_3.5.0/conanfile.py b/recipes/gdal/post_3.5.0/conanfile.py index d03de4e5125cc..3e0847981c026 100644 --- a/recipes/gdal/post_3.5.0/conanfile.py +++ b/recipes/gdal/post_3.5.0/conanfile.py @@ -1,4 +1,5 @@ from conan import ConanFile +from conan.tools.apple import fix_apple_shared_install_name from conan.tools.files import apply_conandata_patches, get, files from conan.errors import ConanInvalidConfiguration from conans import CMake @@ -172,23 +173,23 @@ def requirements(self): self.requires("cryptopp/8.7.0") if self.options.with_curl: - self.requires("libcurl/7.85.0") + self.requires("libcurl/8.2.0") if self.options.with_dds: self.requires("crunch/cci.20190615") if self.options.with_expat: - self.requires("expat/2.4.9") + self.requires("expat/2.5.0") if self.options.with_exr: - self.requires("openexr/3.1.5") - self.requires("imath/3.1.5") + self.requires("openexr/3.1.9") + self.requires("imath/3.1.9") if self.options.with_freexl: self.requires("freexl/1.0.6") if self.options.with_geos: - self.requires("geos/3.11.0") + self.requires("geos/3.11.1") if self.options.with_gif: self.requires("giflib/5.2.1") @@ -208,13 +209,13 @@ def requirements(self): if self.options.with_jpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_jpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/2.1.4") + self.requires("libjpeg-turbo/2.1.5") if self.options.with_kea: self.requires("kealib/1.4.14") if self.options.with_libdeflate: - self.requires("libdeflate/1.12") + self.requires("libdeflate/1.18") if self.options.with_libiconv: self.requires("libiconv/1.17") @@ -223,7 +224,7 @@ def requirements(self): self.requires("libkml/1.3.0") if self.options.with_libtiff: - self.requires("libtiff/4.4.0") + self.requires("libtiff/4.5.1") if self.options.with_lz4: self.requires("lz4/1.9.4") @@ -246,19 +247,19 @@ def requirements(self): self.requires("openjpeg/2.5.0") if self.options.with_openssl: - self.requires("openssl/1.1.1q") + self.requires("openssl/1.1.1u") if self.options.with_pcre: self.requires("pcre/8.45") if self.options.with_pcre2: - self.requires("pcre2/10.40") + self.requires("pcre2/10.42") if self.options.with_pg: self.requires("libpq/14.5") if self.options.with_png: - self.requires("libpng/1.6.38") + self.requires("libpng/1.6.40") if self.options.with_podofo: self.requires("podofo/0.9.7") @@ -267,28 +268,32 @@ def requirements(self): self.requires("poppler/21.07.0") if self.options.with_proj: - self.requires("proj/9.0.1") + self.requires("proj/9.1.1") if self.options.with_qhull: self.requires("qhull/8.0.1") if self.options.with_sqlite3: - self.requires("sqlite3/3.39.3") + self.requires("sqlite3/3.42.0") if self.options.with_webp: - self.requires("libwebp/1.2.4") + self.requires("libwebp/1.3.1") if self.options.with_xerces: self.requires("xerces-c/3.2.3") if self.options.with_xml2: - self.requires("libxml2/2.9.14") + self.requires("libxml2/2.10.3") if self.options.with_zlib: - self.requires("zlib/1.2.12") + self.requires("zlib/1.2.13") if self.options.with_zstd: - self.requires("zstd/1.5.2") + self.requires("zstd/1.5.5") + + def build_requirements(self): + # https://github.com/conan-io/conan/issues/3482#issuecomment-662284561 + self.tool_requires("cmake/[>=3.18 <4]") def package_id(self): del self.info.options.with_crypto @@ -724,10 +729,10 @@ def package(self): self.copy("LICENSE.TXT", dst="licenses", src=self._source_subfolder) cmake = self._configure_cmake() cmake.install() - files.rmdir(self, os.path.join(self.package_folder, "share")) files.rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) files.rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + fix_apple_shared_install_name(self) def package_info(self): From af3b6ce7431c820d9de18c3c4f0cbd53a096e750 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Sat, 5 Aug 2023 15:27:26 +0200 Subject: [PATCH 083/637] (#18974) libunwind: add version 1.7.2 Generated and committed by [Conan Center Bot](https://github.com/qchateau/conan-center-bot) Find more updatable recipes in the [GitHub Pages](https://qchateau.github.io/conan-center-bot/) Co-authored-by: Quentin Chateau via Conan Center Bot --- recipes/libunwind/all/conandata.yml | 3 +++ recipes/libunwind/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/libunwind/all/conandata.yml b/recipes/libunwind/all/conandata.yml index 933dd5e18e6e0..baa8d36f9cd17 100644 --- a/recipes/libunwind/all/conandata.yml +++ b/recipes/libunwind/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.7.2": + url: "https://github.com/libunwind/libunwind/releases/download/v1.7.2/libunwind-1.7.2.tar.gz" + sha256: "a18a6a24307443a8ace7a8acc2ce79fbbe6826cd0edf98d6326d0225d6a5d6e6" "1.7.0": url: "https://github.com/libunwind/libunwind/releases/download/v1.7.0/libunwind-1.70.tar.gz" sha256: "c24c913d2337d6eff851b6ab32aadfb683a86fee48d28fe1fc9cd56c8e9dfa58" diff --git a/recipes/libunwind/config.yml b/recipes/libunwind/config.yml index 06062bdf41682..ce44762c05da1 100644 --- a/recipes/libunwind/config.yml +++ b/recipes/libunwind/config.yml @@ -1,4 +1,6 @@ versions: + "1.7.2": + folder: all "1.7.0": folder: all "1.6.2": From d0b45c9664437b9e4924098674d0b67f45dc100c Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Sat, 5 Aug 2023 15:48:27 +0200 Subject: [PATCH 084/637] (#19052) cairo/meson: bump deps --- recipes/cairo/meson/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cairo/meson/conanfile.py b/recipes/cairo/meson/conanfile.py index 22c79e1b6951e..f45ccd7290ad4 100644 --- a/recipes/cairo/meson/conanfile.py +++ b/recipes/cairo/meson/conanfile.py @@ -107,7 +107,7 @@ def requirements(self): if self.options.with_png: self.requires("libpng/1.6.40") if self.options.with_glib: - self.requires("glib/2.76.3") + self.requires("glib/2.77.0") if self.settings.os == "Linux": if self.options.with_xlib or self.options.with_xlib_xrender or self.options.with_xcb: self.requires("xorg/system") From 0eea54acc08b78922dd57f3ee3e97dcacfb5031c Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 5 Aug 2023 23:07:56 +0900 Subject: [PATCH 085/637] (#19053) simdjson: add version 3.2.2 --- recipes/simdjson/all/conandata.yml | 3 +++ recipes/simdjson/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/simdjson/all/conandata.yml b/recipes/simdjson/all/conandata.yml index 68f7a88456dcd..4dd45c1bc80bc 100644 --- a/recipes/simdjson/all/conandata.yml +++ b/recipes/simdjson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.2.2": + url: "https://github.com/simdjson/simdjson/archive/v3.2.2.tar.gz" + sha256: "13a702536e051db612cdca82bf8585f2c69d9c6fd156ef291b170f13202c1b4c" "3.2.1": url: "https://github.com/simdjson/simdjson/archive/v3.2.1.tar.gz" sha256: "121206c9bfe972a2202a74d4cddb8cb0561932427f96d6c4b70fb49a2a74560e" diff --git a/recipes/simdjson/config.yml b/recipes/simdjson/config.yml index 5a66369f45d95..cda9ed23f089a 100644 --- a/recipes/simdjson/config.yml +++ b/recipes/simdjson/config.yml @@ -1,4 +1,6 @@ versions: + "3.2.2": + folder: all "3.2.1": folder: all "3.2.0": From a08f778e4c7cbf7995d3fbc38ca7ba6c3749fc11 Mon Sep 17 00:00:00 2001 From: Holger Detering Date: Sat, 5 Aug 2023 16:47:16 +0200 Subject: [PATCH 086/637] (#18973) aws-c-common: add version 0.9.0 * aws-c-common: add version 0.9.0 * cleanup: remove test_v1_package folder * add version 0.9.0 to config.yml * add patch_type and patch_description --- recipes/aws-c-common/all/conandata.yml | 7 +++++++ .../all/test_v1_package/CMakeLists.txt | 8 -------- .../all/test_v1_package/conanfile.py | 17 ----------------- recipes/aws-c-common/config.yml | 2 ++ 4 files changed, 9 insertions(+), 25 deletions(-) delete mode 100644 recipes/aws-c-common/all/test_v1_package/CMakeLists.txt delete mode 100644 recipes/aws-c-common/all/test_v1_package/conanfile.py diff --git a/recipes/aws-c-common/all/conandata.yml b/recipes/aws-c-common/all/conandata.yml index 773702bbe2c98..6929bedbf2e12 100644 --- a/recipes/aws-c-common/all/conandata.yml +++ b/recipes/aws-c-common/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.9.0": + url: "https://github.com/awslabs/aws-c-common/archive/v0.9.0.tar.gz" + sha256: "9b62ab1dcece3107810ea4f4511fe8e1e010a83cb0cb502b6ec685ce752a7b0c" "0.8.2": url: "https://github.com/awslabs/aws-c-common/archive/v0.8.2.tar.gz" sha256: "36edc6e486c43bbb34059dde227e872c0d41ab54f0b3609d38f188cfbbc6d1f8" @@ -53,4 +56,8 @@ sources: patches: "0.4.25": - patch_file: "patches/0001-disable-fPIC.patch" + patch_description: "Don't enable position independent code (will be handled by conan)" + patch_type: "conan" - patch_file: "patches/0002-no-warnings-as-errors.patch" + patch_description: "Don't make all warnings into errors" + patch_type: "portability" diff --git a/recipes/aws-c-common/all/test_v1_package/CMakeLists.txt b/recipes/aws-c-common/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 0d20897301b68..0000000000000 --- a/recipes/aws-c-common/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/aws-c-common/all/test_v1_package/conanfile.py b/recipes/aws-c-common/all/test_v1_package/conanfile.py deleted file mode 100644 index 38f4483872d47..0000000000000 --- a/recipes/aws-c-common/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/aws-c-common/config.yml b/recipes/aws-c-common/config.yml index 5a8e794412c2f..472e641908fd0 100644 --- a/recipes/aws-c-common/config.yml +++ b/recipes/aws-c-common/config.yml @@ -1,4 +1,6 @@ versions: + "0.9.0": + folder: all "0.8.2": folder: all "0.7.5": From 8d74df2c59a66ebb951273a163903e77e634bad4 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Sat, 5 Aug 2023 18:07:03 +0200 Subject: [PATCH 087/637] (#18972) glib: add version 2.77.1 Generated and committed by [Conan Center Bot](https://github.com/qchateau/conan-center-bot) Find more updatable recipes in the [GitHub Pages](https://qchateau.github.io/conan-center-bot/) Co-authored-by: Quentin Chateau via Conan Center Bot --- recipes/glib/all/conandata.yml | 3 +++ recipes/glib/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/glib/all/conandata.yml b/recipes/glib/all/conandata.yml index a457da4866ed6..861fdaf023395 100644 --- a/recipes/glib/all/conandata.yml +++ b/recipes/glib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.77.1": + url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.1.tar.xz" + sha256: "dce8d0c9e916d8c81a64436bd4ee4d6515a52dd3d157c994e1cdb9b3d6300a03" "2.77.0": url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.0.tar.xz" sha256: "1897fd8ad4ebb523c32fabe7508c3b0b039c089661ae1e7917df0956a320ac4d" diff --git a/recipes/glib/config.yml b/recipes/glib/config.yml index 709e827338b68..f86b157199163 100644 --- a/recipes/glib/config.yml +++ b/recipes/glib/config.yml @@ -1,4 +1,6 @@ versions: + "2.77.1": + folder: all "2.77.0": folder: all "2.76.3": From 11c6c5bc221329aa2e6cea1a9a3d465000cf69f6 Mon Sep 17 00:00:00 2001 From: Marcin Zdun Date: Sun, 6 Aug 2023 00:03:41 +0200 Subject: [PATCH 088/637] (#17825) add mbits-lngs/0.7.5 * add mbits-lngs/0.7.5 * fix: take a better build system * fix: add encoding to open * fix: follow forced tag * fix: follow another force tag * fix: follow yet another forced tag * fix: will this compile with Clang? * fix: dependencies do not like Clang * fix: take forced tag compilable with clang/libc++ * build: yes to M1, not to cross-compilation * fix: allow cross-compile for M1 * fix: build test on M1 and support VirtualRunEnv * fix: detect cross-compilation in universal way * build: add note from protobuf' conanfile.py * simplify executable usage Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries Co-authored-by: Daniel Co-authored-by: Uilian Ries --- recipes/mbits-lngs/all/conandata.yml | 4 + recipes/mbits-lngs/all/conanfile.py | 142 ++++++++++++++++++ .../all/test_package/CMakeLists.txt | 22 +++ .../mbits-lngs/all/test_package/conanfile.py | 43 ++++++ .../all/test_package/test_package.cpp | 10 ++ .../all/test_package/translations.idl | 9 ++ recipes/mbits-lngs/config.yml | 3 + 7 files changed, 233 insertions(+) create mode 100644 recipes/mbits-lngs/all/conandata.yml create mode 100644 recipes/mbits-lngs/all/conanfile.py create mode 100644 recipes/mbits-lngs/all/test_package/CMakeLists.txt create mode 100644 recipes/mbits-lngs/all/test_package/conanfile.py create mode 100644 recipes/mbits-lngs/all/test_package/test_package.cpp create mode 100644 recipes/mbits-lngs/all/test_package/translations.idl create mode 100644 recipes/mbits-lngs/config.yml diff --git a/recipes/mbits-lngs/all/conandata.yml b/recipes/mbits-lngs/all/conandata.yml new file mode 100644 index 0000000000000..a85ddd2561b52 --- /dev/null +++ b/recipes/mbits-lngs/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.7.6": + url: "https://github.com/mbits-os/lngs/archive/v0.7.6.tar.gz" + sha256: "85c9fd3afd5b6d5446a294f4de11221ae7fa160a62d1115a7ea0c1af17633a0b" diff --git a/recipes/mbits-lngs/all/conanfile.py b/recipes/mbits-lngs/all/conanfile.py new file mode 100644 index 0000000000000..2db7f9f7b6cca --- /dev/null +++ b/recipes/mbits-lngs/all/conanfile.py @@ -0,0 +1,142 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.microsoft import check_min_vs, is_msvc +from conan.tools.files import get, copy, save, rmdir +from conan.tools.build import check_min_cppstd, cross_building +from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +import os +import textwrap + + +required_conan_version = ">=1.53.0" + + +class MBitsLngsConan(ConanFile): + name = "mbits-lngs" + description = "Language strings support" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/mbits-os/lngs" + topics = ("gettext", "locale",) + settings = "os", "arch", "compiler", "build_type" + package_type = "static-library" + options = { + "fPIC": [True, False], + } + default_options = { + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "11", + "clang": "12", + "Visual Studio": "16", + "msvc": "192", + "apple-clang": "11.0.3", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("fmt/9.1.0") + self.requires("mbits-utfconv/1.0.3") + self.requires("mbits-diags/0.9.6") + self.requires("mbits-mstch/1.0.4") + self.requires("mbits-args/0.12.3") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + check_min_vs(self, 192) + if not is_msvc(self): + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + @property + def _settings_build(self): + return self.settings_build if hasattr(self, "settings_build") else self.settings + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["LNGS_TESTING"] = False + tc.variables["LNGS_LITE"] = False + tc.variables["LNGS_LINKED_RESOURCES"] = True + tc.variables["LNGS_NO_PKG_CONFIG"] = True + if cross_building(self) and hasattr(self, "settings_build"): + tc.variables["LNGS_REBUILD_RESOURCES"] = False + tc.generate() + tc = CMakeDeps(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + @property + def _cmake_install_base_path(self): + return os.path.join("lib", "cmake") + + @property + def _cmake_targets_module_file(self): + return os.path.join(self._cmake_install_base_path, "mbits-lngs-targets.cmake") + + 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, self._cmake_install_base_path)) + + + # Provide relocatable mbits::lngs target and Mbitslngs_LNGS_EXECUTABLE cache variable + # TODO: some of the following logic might be disabled when conan will + # allow to create executable imported targets in package_info() + module_folder_depth = len(os.path.normpath(self._cmake_install_base_path).split(os.path.sep)) + lngs_rel_path = "{}bin/{}".format("".join(["../"] * module_folder_depth), "lngs") + save(self, os.path.join(self.package_folder, self._cmake_targets_module_file), + textwrap.dedent( + f"""\ + if(NOT TARGET mbits::lngs) + if(CMAKE_CROSSCOMPILING) + find_program(LNGS_PROGRAM lngs PATHS ENV PATH NO_DEFAULT_PATH) + endif() + if(NOT LNGS_PROGRAM) + set(LNGS_PROGRAM "${{CMAKE_CURRENT_LIST_DIR}}/{lngs_rel_path}") + endif() + get_filename_component(LNGS_PROGRAM "${{LNGS_PROGRAM}}" ABSOLUTE) + set(Mbitslngs_LNGS_EXECUTABLE ${{LNGS_PROGRAM}} CACHE FILEPATH "The lngs tool") + add_executable(mbits::lngs IMPORTED) + set_property(TARGET mbits::lngs PROPERTY IMPORTED_LOCATION ${{Mbitslngs_LNGS_EXECUTABLE}}) + endif() + """) + ) + + def package_info(self): + self.cpp_info.builddirs = [self._cmake_install_base_path ] + self.cpp_info.set_property("cmake_build_modules", [self._cmake_targets_module_file]) + self.cpp_info.set_property("cmake_file_name", "mbits-lngs") + + comp = self.cpp_info.components["liblngs"] + comp.set_property("cmake_target_name", "mbits::liblngs") + comp.libs = ["lngs"] diff --git a/recipes/mbits-lngs/all/test_package/CMakeLists.txt b/recipes/mbits-lngs/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..de4330a77c2a6 --- /dev/null +++ b/recipes/mbits-lngs/all/test_package/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package CXX) + +find_package(mbits-lngs REQUIRED CONFIG) + +set(IDL ${CMAKE_CURRENT_SOURCE_DIR}/translations.idl) +set(CPP ${CMAKE_CURRENT_BINARY_DIR}/translations.cpp) +set(HPP ${CMAKE_CURRENT_BINARY_DIR}/translations.hpp) + +add_custom_target( + make_lngs + COMMAND mbits::lngs res ${IDL} -o ${CPP} --include "translations.hpp" + COMMAND mbits::lngs enums -r ${IDL} -o ${HPP} + BYPRODUCTS ${CPP} ${HPP} + DEPENDS ${IDL} +) + +add_executable(${PROJECT_NAME} test_package.cpp ${CPP} ${HPP}) +target_link_libraries(${PROJECT_NAME} PRIVATE mbits::liblngs) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) +add_dependencies(${PROJECT_NAME} make_lngs) diff --git a/recipes/mbits-lngs/all/test_package/conanfile.py b/recipes/mbits-lngs/all/test_package/conanfile.py new file mode 100644 index 0000000000000..e3b64136d43e7 --- /dev/null +++ b/recipes/mbits-lngs/all/test_package/conanfile.py @@ -0,0 +1,43 @@ +from conan import ConanFile +from conan.tools.build import can_run, cross_building +from conan.tools.cmake import cmake_layout, CMake, CMakeDeps, CMakeToolchain +from conan.tools.env import VirtualRunEnv, VirtualBuildEnv +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def build_requirements(self): + if cross_building(self) and hasattr(self, "settings_build"): + self.tool_requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def generate(self): + tc = VirtualRunEnv(self) + tc.generate() + tc = VirtualBuildEnv(self) + if cross_building(self) and hasattr(self, "settings_build"): + tc.generate() + else: + tc.generate(scope="build") + tc = CMakeToolchain(self) + tc.generate() + tc = CMakeDeps(self) + tc.generate() + + 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/mbits-lngs/all/test_package/test_package.cpp b/recipes/mbits-lngs/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..54cfa70731d8d --- /dev/null +++ b/recipes/mbits-lngs/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include "translations.hpp" +#include + +int main() { + lngs::test::Strings tr{}; + tr.init_builtin(); + tr.path_manager(".", "example"); + + std::cout << tr(lngs::test::lng::MESSAGE) << '\n'; +} diff --git a/recipes/mbits-lngs/all/test_package/translations.idl b/recipes/mbits-lngs/all/test_package/translations.idl new file mode 100644 index 0000000000000..52b142116a700 --- /dev/null +++ b/recipes/mbits-lngs/all/test_package/translations.idl @@ -0,0 +1,9 @@ +[ + project("lngs-test"), + namespace("lngs::test"), + version("0.1"), + serial(1) +] strings { + [help("Hello world string"), id(1001)] + MESSAGE = "Hello, world!"; +} diff --git a/recipes/mbits-lngs/config.yml b/recipes/mbits-lngs/config.yml new file mode 100644 index 0000000000000..1d3599e3efc2e --- /dev/null +++ b/recipes/mbits-lngs/config.yml @@ -0,0 +1,3 @@ +versions: + "0.7.6": + folder: all From 70ca6dc14675c9a17374ef96c1a4d75deb89c702 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Sun, 6 Aug 2023 02:06:56 +0200 Subject: [PATCH 089/637] (#18953) [cgal] add cgal/5.5.3 * [cgal] add cgal/5.5.3 * i forgot config.yml --- recipes/cgal/all/conandata.yml | 8 ++++++++ recipes/cgal/config.yml | 2 ++ 2 files changed, 10 insertions(+) diff --git a/recipes/cgal/all/conandata.yml b/recipes/cgal/all/conandata.yml index 243b9320511a5..74b2b15e01e38 100644 --- a/recipes/cgal/all/conandata.yml +++ b/recipes/cgal/all/conandata.yml @@ -11,6 +11,9 @@ sources: "5.5.2": sha256: b2b05d5616ecc69facdc24417cce0b04fb4321491d107db45103add520e3d8c3 url: https://github.com/CGAL/cgal/releases/download/v5.5.2/CGAL-5.5.2.tar.xz + "5.5.3": + sha256: 0a04f662693256328b05babfabb5e3a5b7db2f5a58d52e3c520df9d0828ddd73 + url: https://github.com/CGAL/cgal/releases/download/v5.5.3/CGAL-5.5.3.tar.xz patches: "5.3.2": - patch_file: "patches/0001-fix-for-conan.patch" @@ -32,3 +35,8 @@ patches: patch_type: bugfix patch_source: https://github.com/CGAL/cgal/pull/7502 patch_description: Fix Eigen3 support in CGAL + "5.5.3": + - patch_file: "patches/0001-fix-for-conan.patch" + patch_type: bugfix + patch_source: https://github.com/CGAL/cgal/pull/7502 + patch_description: Fix Eigen3 support in CGAL diff --git a/recipes/cgal/config.yml b/recipes/cgal/config.yml index 48232844708f0..e8e1391dbacd3 100644 --- a/recipes/cgal/config.yml +++ b/recipes/cgal/config.yml @@ -7,3 +7,5 @@ versions: folder: all "5.5.2": folder: all + "5.5.3": + folder: all From 7efe2fda18e986c41debfe2bce2010d8280c50ff Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Sun, 6 Aug 2023 07:22:37 +0200 Subject: [PATCH 090/637] (#19042) [docs] Add changelog 2023-Aug-04 Signed-off-by: Uilian Ries --- docs/changelog.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/changelog.md b/docs/changelog.md index 4ea36e44e8667..24c6950d686aa 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,12 @@ # Changelog +### 04-Aug-2023 - 10:26 CEST + +- [feature] Enable Conan 2.0.8 +- [feature] Enable Conan 1.60.2 +- [feature] Update Jenkins server version +- [hotfix] Better error management when having CI build timeout + ### 19-Jul-2023 - 09:45 CEST - [fix] Fix message processing if no message is passed. From 89e0b7bffe5bdad217492ffc5ded1162ef50941b Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Sun, 6 Aug 2023 08:02:08 +0200 Subject: [PATCH 091/637] (#19036) [bimg] Fix imports for test package Signed-off-by: Uilian Ries --- recipes/bimg/all/test_package/conanfile.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/recipes/bimg/all/test_package/conanfile.py b/recipes/bimg/all/test_package/conanfile.py index 4100c3ff4959c..17cae79880122 100644 --- a/recipes/bimg/all/test_package/conanfile.py +++ b/recipes/bimg/all/test_package/conanfile.py @@ -1,10 +1,8 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.layout import cmake_layout -from conan.tools.cmake import CMake +from conan.tools.cmake import CMake, cmake_layout import os -required_conan_version = ">=1.50.0" class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" From bc1eb9037ecab0d1455367efada63dcd3f2aab9f Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 6 Aug 2023 09:25:06 +0300 Subject: [PATCH 092/637] (#17933) gtsam: add v4.2.0a9, update package options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gtsam: add missing Boost::program_options requirement See https://github.com/borglab/gtsam/blob/4.1.1/cmake/HandleBoost.cmake#L26 * gtsam: add transitive_headers/libs to deps * gtsam: drop test_v1_package * gtsam: backport a patch for C++17 compatibility * gtsam: add v4.2.0a9 https://github.com/borglab/gtsam/releases/tag/4.2a9 * gtsam: update package options - Covers all options that could be found in GTSAM build scripts. - Added links to source code since they are hard to find otherwise. - Added `allow_deprecated` option and deprecated `allow_deprecated_since_V4` as the wording of the GTSAM variable keeps changing but the meaning has stayed the same. - Added vars: GTSAM_DEFAULT_ALLOCATOR GTSAM_SLOW_BUT_CORRECT_BETWEENFACTOR GTSAM_USE_SYSTEM_METIS GTSAM_MEX_BUILD_STATIC_MODULE * gtsam: tweak formatting * gtsam: get rid of a duplicate patch * gtsam: handle `build_type_postfixes` option correctly * gtsam: correct metis lib name in 4.0 * gtsam: correct build_type_postfixes behavior * gtsam: fix a bug in 4.2.0a9 * gtsam: add 'lib' prefix to libraries on Windows * gtsam: add patch_source info to conandata.yml * gtsam: apply "lib" prefix on Windows correctly * gtsam: drop v4.0.2 To limit the load on CI. Superseded by v4.0.3. * gtsam: update onetbb and boost versions onetbb/2020.3 did not support Conan v2. * gtsam: better TBB validation * gtsam: add tcmalloc support with gperftools * gtsam: fix Eigen version check * gtsam: enable shared builds on Windows for v4.2 * gtsam: shared builds on Windows are broken in v4.2.0a9 * gtsam: document options with options_description * gtsam: add use_vendored_metis option * gtsam: simplify Conan v1 boilerplate * gtsam: improve default_allocator handling * gtsam: remove use_vendored_metis option It no longer builds with the new metis recipe. --------- Co-authored-by: Francisco Ramírez --- recipes/gtsam/all/conandata.yml | 40 ++- recipes/gtsam/all/conanfile.py | 334 +++++++++++++----- .../all/patches/4.0.2-0001-cmake-boost.patch | 61 ---- .../all/patches/4.0.2-0002-cmake-eigen.patch | 20 -- .../all/patches/4.0.2-0003-macos-rpath.patch | 34 -- ...t.patch => 4.0.3-0004-cmake-project.patch} | 0 .../patches/4.1.1-0005-eigen3-version.patch | 21 ++ .../all/patches/4.2.0-0001-macos-rpath.patch | 30 ++ .../patches/4.2.0-0002-eigen3-version.patch | 20 ++ .../4.2.0a9-0001-fix-invalid-include.patch | 12 + .../gtsam/all/test_v1_package/CMakeLists.txt | 8 - .../gtsam/all/test_v1_package/conanfile.py | 17 - recipes/gtsam/config.yml | 4 +- 13 files changed, 348 insertions(+), 253 deletions(-) delete mode 100644 recipes/gtsam/all/patches/4.0.2-0001-cmake-boost.patch delete mode 100644 recipes/gtsam/all/patches/4.0.2-0002-cmake-eigen.patch delete mode 100644 recipes/gtsam/all/patches/4.0.2-0003-macos-rpath.patch rename recipes/gtsam/all/patches/{4.0.2-0003-cmake-project.patch => 4.0.3-0004-cmake-project.patch} (100%) create mode 100644 recipes/gtsam/all/patches/4.1.1-0005-eigen3-version.patch create mode 100644 recipes/gtsam/all/patches/4.2.0-0001-macos-rpath.patch create mode 100644 recipes/gtsam/all/patches/4.2.0-0002-eigen3-version.patch create mode 100644 recipes/gtsam/all/patches/4.2.0a9-0001-fix-invalid-include.patch delete mode 100644 recipes/gtsam/all/test_v1_package/CMakeLists.txt delete mode 100644 recipes/gtsam/all/test_v1_package/conanfile.py diff --git a/recipes/gtsam/all/conandata.yml b/recipes/gtsam/all/conandata.yml index a7ab46e7ea6fb..eecf7c3eb615e 100644 --- a/recipes/gtsam/all/conandata.yml +++ b/recipes/gtsam/all/conandata.yml @@ -1,14 +1,28 @@ sources: + "4.2.0a9": + url: "https://github.com/borglab/gtsam/archive/refs/tags/4.2a9.tar.gz" + sha256: "a9790e5132bfb2705a5985a1505c3cf9cdf95b711be8352ffa9a9299b279f2f8" "4.1.1": url: "https://github.com/borglab/gtsam/archive/4.1.1.tar.gz" sha256: "c7b5e6cdad52b141c272778f47baf628975457be3e26ed96a7bc2ae685a00af0" "4.0.3": url: "https://github.com/borglab/gtsam/archive/4.0.3.tar.gz" sha256: "eaa561749edf7a2d402981828253e28aed6c717dae35738301c5ab23e2595f25" - "4.0.2": - url: "https://github.com/borglab/gtsam/archive/4.0.2.tar.gz" - sha256: "8770a440f1af98c3f0d9d4dffd568de2d4c21b245e7231e987e26bc236aeb5aa" patches: + "4.2.0a9": + - patch_file: "patches/4.1.1-0001-cmake-boost.patch" + patch_description: "Use boost targets" + patch_type: "conan" + - patch_file: "patches/4.2.0-0001-macos-rpath.patch" + patch_description: "Relocatable shared libs on Apple OS" + patch_type: "conan" + - patch_file: "patches/4.2.0-0002-eigen3-version.patch" + patch_description: "Get Eigen3 version info from Conan" + patch_type: "conan" + - patch_file: "patches/4.2.0a9-0001-fix-invalid-include.patch" + patch_description: "Fix an invalid include for pre-C++17 compatibility" + patch_type: "portability" + patch_source: "https://github.com/borglab/gtsam/pull/1545" "4.1.1": - patch_file: "patches/4.1.1-0001-cmake-boost.patch" patch_description: "Use boost targets" @@ -19,9 +33,12 @@ patches: - patch_file: "patches/4.1.1-0003-macos-rpath.patch" patch_description: "Relocatable shared libs on Apple OS" patch_type: "conan" - - patch_file: "patches/4.0.2-0003-cmake-project.patch" + - patch_file: "patches/4.0.3-0004-cmake-project.patch" patch_description: "CMake: move project() after cmake_minimum_required()" patch_type: "conan" + - patch_file: "patches/4.1.1-0005-eigen3-version.patch" + patch_description: "Get Eigen3 version info from Conan" + patch_type: "conan" "4.0.3": - patch_file: "patches/4.0.3-0001-cmake-boost.patch" patch_description: "Use boost targets" @@ -32,19 +49,6 @@ patches: - patch_file: "patches/4.0.3-0003-macos-rpath.patch" patch_description: "Relocatable shared libs on Apple OS" patch_type: "conan" - - patch_file: "patches/4.0.2-0003-cmake-project.patch" - patch_description: "CMake: move project() after cmake_minimum_required()" - patch_type: "conan" - "4.0.2": - - patch_file: "patches/4.0.2-0001-cmake-boost.patch" - patch_description: "Use boost targets" - patch_type: "conan" - - patch_file: "patches/4.0.2-0002-cmake-eigen.patch" - patch_description: "Use Eigen include variable from CMakeDeps" - patch_type: "conan" - - patch_file: "patches/4.0.2-0003-macos-rpath.patch" - patch_description: "Relocatable shared libs on Apple OS" - patch_type: "conan" - - patch_file: "patches/4.0.2-0003-cmake-project.patch" + - patch_file: "patches/4.0.3-0004-cmake-project.patch" patch_description: "CMake: move project() after cmake_minimum_required()" patch_type: "conan" diff --git a/recipes/gtsam/all/conanfile.py b/recipes/gtsam/all/conanfile.py index 6ed583d1786ac..4320c2bbb7e69 100644 --- a/recipes/gtsam/all/conanfile.py +++ b/recipes/gtsam/all/conanfile.py @@ -15,58 +15,100 @@ class GtsamConan(ConanFile): license = "BSD-3-Clause" homepage = "https://github.com/borglab/gtsam" url = "https://github.com/conan-io/conan-center-index" - description = ("GTSAM is a library of C++ classes that implement\ - smoothing and mapping (SAM) in robotics and vision") - topics = ("mapping", "smoothing") + description = ("GTSAM is a library of C++ classes that implement " + "smoothing and mapping (SAM) in robotics and vision") + topics = ("mapping", "smoothing", "optimization", "factor-graphs") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], - "use_quaternions": [True, False], + "allow_deprecated": [True, False], + "allow_deprecated_since_V4": [True, False, "deprecated"], + "build_type_postfixes": [True, False], + "build_unstable": [True, False], + "build_with_march_native": [True, False], + "default_allocator": [None, "STL", "BoostPool", "TBB", "tcmalloc"], + "disable_new_timers": [True, False], + "enable_consistency_checks": [True, False], + "install_cppunitlite": [True, False], + "install_matlab_toolbox": [True, False], "pose3_expmap": [True, False], "rot3_expmap": [True, False], - "enable_consistency_checks": [True, False], + "slow_but_correct_betweenfactor": [True, False], + "support_nested_dissection": [True, False], + "tangent_preintegration": [True, False], + "throw_cheirality_exception": [True, False], + "use_quaternions": [True, False], "with_TBB": [True, False], "with_eigen_MKL": [True, False], "with_eigen_MKL_OPENMP": [True, False], - "throw_cheirality_exception": [True, False], - "allow_deprecated_since_V4": [True, False], - "typedef_points_to_vectors": [True, False], - "support_nested_dissection": [True, False], - "tangent_preintegration": [True, False], + + # Removed since v4.1 "build_wrap": [True, False], - "wrap_serialization": [True, False], - "build_unstable": [True, False], - "disable_new_timers": [True, False], - "build_type_postfixes": [True, False], - "install_matlab_toolbox": [True, False], "install_cython_toolbox": [True, False], - "install_cppunitlite": [True, False], + "typedef_points_to_vectors": [True, False], + "wrap_serialization": [True, False], } default_options = { "shared": False, "fPIC": True, - "use_quaternions": False, + "allow_deprecated": True, + "allow_deprecated_since_V4": "deprecated", + "build_type_postfixes": True, + "build_unstable": True, + "build_with_march_native": False, + "default_allocator": None, + "disable_new_timers": False, + "enable_consistency_checks": False, + "install_cppunitlite": True, + "install_matlab_toolbox": False, "pose3_expmap": False, "rot3_expmap": False, - "enable_consistency_checks": False, + "slow_but_correct_betweenfactor": False, + "support_nested_dissection": False, + "tangent_preintegration": False, + "throw_cheirality_exception": True, + "use_quaternions": False, "with_TBB": False, "with_eigen_MKL": False, "with_eigen_MKL_OPENMP": False, - "throw_cheirality_exception": True, - "allow_deprecated_since_V4": True, - "typedef_points_to_vectors": False, - "support_nested_dissection": False, - "tangent_preintegration": False, + + # < v4.1 only "build_wrap": False, - "wrap_serialization": True, - "build_unstable": True, - "disable_new_timers": False, - "build_type_postfixes": True, - "install_matlab_toolbox": False, "install_cython_toolbox": False, - "install_cppunitlite": True, + "typedef_points_to_vectors": False, + "wrap_serialization": True, + } + options_description = { + "allow_deprecated": "Allow use of deprecated methods/functions", + "build_type_postfixes": "Append the build type to the name of compiled libraries", + "build_unstable": "Enable building of gtsam_unstable", + "build_with_march_native": "Build with all instructions supported by native architecture (binary may not be portable!)", + "default_allocator": "Set preferred memory allocator. If unset, defaults to STL or to TBB, if with_TBB is enabled", + "disable_new_timers": "Disables using Boost.chrono for timing", + "enable_consistency_checks": "Enable expensive consistency checks", + "install_cppunitlite": "Install CppUnitLite library as a component", + "install_matlab_toolbox": "Install MATLAB toolbox", + "pose3_expmap": "Use Pose3::EXPMAP as the default mode. If disabled, Pose3::FIRST_ORDER will be used.", + "rot3_expmap": ("Ignore if GTSAM_USE_QUATERNIONS is OFF (Rot3::EXPMAP by default). " + "Otherwise, enable Rot3::EXPMAP, or if disabled, use Rot3::CAYLEY."), + "slow_but_correct_betweenfactor": "Use the slower but correct version of BetweenFactor", + "support_nested_dissection": "Support Metis-based nested dissection", + "tangent_preintegration": "Use the new ImuFactor with integration on tangent space", + "throw_cheirality_exception": "Throw exception when a triangulated point is behind a camera", + "use_quaternions": ("Enable an internal Quaternion representation for rotations instead of rotation matrices. " + "If enabled, Rot3::EXPMAP is enforced by default."), + "with_TBB": "Use Intel Threaded Building Blocks (TBB)", + "with_eigen_MKL": "Eigen will use Intel MKL if available", + "with_eigen_MKL_OPENMP": "Eigen, when using Intel MKL, will also use OpenMP for multithreading if available", + + # < v4.1 only + "build_wrap": "Build Matlab/Cython wrap utility (necessary for Matlab/Cython interface)", + "install_cython_toolbox": "Install Cython toolbox", + "typedef_points_to_vectors": "Typedef Point2 and Point3 to Eigen::Vector equivalents", + "wrap_serialization": "Allow wrapped objects to be saved via boost.serialization", } def export_sources(self): @@ -75,43 +117,90 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) >= "4.1": + del self.options.build_wrap + del self.options.install_cython_toolbox + del self.options.typedef_points_to_vectors + del self.options.wrap_serialization + else: + del self.options.slow_but_correct_betweenfactor def configure(self): if self.options.shared: self.options.rm_safe("fPIC") if self.options.with_TBB: self.options["onetbb"].tbbmalloc = True + if self.options.allow_deprecated_since_V4 != "deprecated": + self.output.warn("'allow_deprecated_since_V4' option is deprecated. Use 'allow_deprecated' instead.") + def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.81.0") - self.requires("eigen/3.4.0") + self.requires("boost/1.82.0", transitive_headers=True) + self.requires("eigen/3.4.0", transitive_headers=True) if self.options.with_TBB: - self.requires("onetbb/2020.3") + self.requires("onetbb/2021.9.0", transitive_headers=True) + if self.options.default_allocator == "tcmalloc": + self.requires("gperftools/2.10.0") + # TODO: add use_vendored_metis=False option + # if self.options.support_nested_dissection and not self.options.use_vendored_metis: + # # Used in a public header here: + # # https://github.com/borglab/gtsam/blob/4.2a9/gtsam_unstable/partition/FindSeparator-inl.h#L23-L27 + # self.requires("metis/5.1.1", transitive_headers=True) @property def _required_boost_components(self): - return ["serialization", "system", "filesystem", "thread", "date_time", "regex", "timer", "chrono"] + # Based on https://github.com/borglab/gtsam/blob/4.2a9/cmake/HandleBoost.cmake#L26 + return [ + "chrono", + "date_time", + "filesystem", + "program_options", + "regex", + "serialization", + "system", + "thread", + "timer", + ] def validate(self): - miss_boost_required_comp = any(self.dependencies["boost"].options.get_safe(f"without_{boost_comp}", True) - for boost_comp in self._required_boost_components) + miss_boost_required_comp = any( + self.dependencies["boost"].options.get_safe(f"without_{boost_comp}", True) + for boost_comp in self._required_boost_components + ) if self.dependencies["boost"].options.header_only or miss_boost_required_comp: raise ConanInvalidConfiguration( f"{self.ref} requires non header-only boost with these components: " f"{', '.join(self._required_boost_components)}" ) - if self.options.with_TBB and not self.dependencies["onetbb"].options.tbbmalloc: - raise ConanInvalidConfiguration("gtsam with tbb requires onetbb:tbbmalloc=True") + if self.options.with_TBB: + if self.options.default_allocator in [None, "TBB"]: + if not self.dependencies["onetbb"].options.tbbmalloc: + raise ConanInvalidConfiguration("GTSAM with TBB requires onetbb/*:tbbmalloc=True") + elif self.options.default_allocator != "tcmalloc": + raise ConanInvalidConfiguration( + "with_TBB option cannot be used with" + f" default_allocator={self.options.default_allocator}" + ) + elif self.options.default_allocator == "TBB": + raise ConanInvalidConfiguration("default_allocator=TBB requires with_TBB=True") check_min_vs(self, "191") - if Version(self.version) >= "4.1.0" and is_msvc(self) and self.options.shared: + if Version(self.version) >= "4.1" and is_msvc(self) and self.options.shared: raise ConanInvalidConfiguration( - f"{self.ref} does not support shared builds with MSVC. See https://github.com/borglab/gtsam/issues/1087" + f"{self.ref} does not support shared builds with MSVC. See" + "https://github.com/borglab/gtsam/issues/1087" + if Version(self.version) < "4.2" + else "https://github.com/borglab/gtsam/issues/1541" + ) + + if self.options.allow_deprecated_since_V4 != "deprecated": + self.output.warn( + "'allow_deprecated_since_V4' option is deprecated. Use 'allow_deprecated' instead." ) def source(self): @@ -120,6 +209,10 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_SHARED_LIBS"] = self.options.shared + # https://github.com/borglab/gtsam/blob/4.2a9/cmake/HandleGeneralOptions.cmake + tc.variables["GTSAM_BUILD_UNSTABLE"] = self.options.build_unstable + tc.variables["GTSAM_UNSTABLE_BUILD_PYTHON"] = False + tc.variables["GTSAM_UNSTABLE_INSTALL_MATLAB_TOOLBOX"] = self.options.install_matlab_toolbox tc.variables["GTSAM_USE_QUATERNIONS"] = self.options.use_quaternions tc.variables["GTSAM_POSE3_EXPMAP"] = self.options.pose3_expmap tc.variables["GTSAM_ROT3_EXPMAP"] = self.options.rot3_expmap @@ -128,41 +221,89 @@ def generate(self): tc.variables["GTSAM_WITH_EIGEN_MKL"] = self.options.with_eigen_MKL tc.variables["GTSAM_WITH_EIGEN_MKL_OPENMP"] = self.options.with_eigen_MKL_OPENMP tc.variables["GTSAM_THROW_CHEIRALITY_EXCEPTION"] = self.options.throw_cheirality_exception - tc.variables["GTSAM_ALLOW_DEPRECATED_SINCE_V4"] = self.options.allow_deprecated_since_V4 - tc.variables["GTSAM_TYPEDEF_POINTS_TO_VECTORS"] = self.options.typedef_points_to_vectors + tc.variables["GTSAM_BUILD_PYTHON"] = False + tc.variables["GTSAM_INSTALL_MATLAB_TOOLBOX"] = self.options.install_matlab_toolbox + tc.variables["GTSAM_ALLOW_DEPRECATED_SINCE_V4"] = self.options.allow_deprecated + if self.options.allow_deprecated_since_V4 != "deprecated": + tc.variables["GTSAM_ALLOW_DEPRECATED_SINCE_V4"] = self.options.allow_deprecated_since_V4 + tc.variables["GTSAM_ALLOW_DEPRECATED_SINCE_V41"] = self.options.allow_deprecated + tc.variables["GTSAM_ALLOW_DEPRECATED_SINCE_V42"] = self.options.allow_deprecated tc.variables["GTSAM_SUPPORT_NESTED_DISSECTION"] = self.options.support_nested_dissection tc.variables["GTSAM_TANGENT_PREINTEGRATION"] = self.options.tangent_preintegration + # Added in 4.1+ + if Version(self.version) >= "4.1": + tc.variables["GTSAM_SLOW_BUT_CORRECT_BETWEENFACTOR"] = self.options.slow_but_correct_betweenfactor tc.variables["GTSAM_BUILD_WITH_CCACHE"] = False - tc.variables["GTSAM_BUILD_UNSTABLE"] = self.options.build_unstable - tc.variables["GTSAM_DISABLE_NEW_TIMERS"] = self.options.disable_new_timers + # https://github.com/borglab/gtsam/blob/4.2a9/cmake/HandleAllocators.cmake + if self.options.default_allocator is not None: + tc.variables["GTSAM_DEFAULT_ALLOCATOR"] = self.options.default_allocator + # https://github.com/borglab/gtsam/blob/4.2a9/cmake/GtsamBuildTypes.cmake#L59 tc.variables["GTSAM_BUILD_TYPE_POSTFIXES"] = self.options.build_type_postfixes + # https://github.com/borglab/gtsam/blob/4.2a9/cmake/GtsamBuildTypes.cmake#L193 + tc.variables["GTSAM_BUILD_WITH_MARCH_NATIVE"] = self.options.build_with_march_native + # https://github.com/borglab/gtsam/blob/4.2a9/cmake/HandleBoost.cmake#L36 + tc.variables["GTSAM_DISABLE_NEW_TIMERS"] = self.options.disable_new_timers + # https://github.com/borglab/gtsam/blob/4.2a9/CppUnitLite/CMakeLists.txt#L13 + tc.variables["GTSAM_INSTALL_CPPUNITLITE"] = self.options.install_cppunitlite + # https://github.com/borglab/gtsam/blob/4.2a9/cmake/HandleEigen.cmake#L3 + tc.variables["GTSAM_USE_SYSTEM_EIGEN"] = True + # https://github.com/borglab/gtsam/blob/4.2a9/cmake/HandleMetis.cmake#L11 + tc.variables["GTSAM_USE_SYSTEM_METIS"] = False + # https://github.com/borglab/gtsam/blob/4.2a9/gtsam/3rdparty/CMakeLists.txt#L76 + tc.variables["GTSAM_INSTALL_GEOGRAPHICLIB"] = False + # https://github.com/borglab/gtsam/blob/4.2a9/matlab/CMakeLists.txt#L14-L15 + tc.variables["GTSAM_MEX_BUILD_STATIC_MODULE"] = False + # https://github.com/borglab/gtsam/blob/4.2a9/cmake/GtsamTesting.cmake#L89-L91 tc.variables["GTSAM_BUILD_TESTS"] = False - tc.variables["Boost_USE_STATIC_LIBS"] = not self.dependencies["boost"].options.shared - tc.variables["Boost_NO_SYSTEM_PATHS"] = True + tc.variables["GTSAM_BUILD_EXAMPLES_ALWAYS"] = False + tc.variables["GTSAM_BUILD_TIMING_ALWAYS"] = False + # https://github.com/borglab/gtsam/blob/4.2a9/doc/CMakeLists.txt tc.variables["GTSAM_BUILD_DOCS"] = False tc.variables["GTSAM_BUILD_DOC_HTML"] = False - tc.variables["GTSAM_BUILD_EXAMPLES_ALWAYS"] = False - tc.variables["GTSAM_BUILD_WRAP"] = self.options.build_wrap - tc.variables["GTSAM_BUILD_WITH_MARCH_NATIVE"] = False - tc.variables["GTSAM_WRAP_SERIALIZATION"] = self.options.wrap_serialization - tc.variables["GTSAM_INSTALL_MATLAB_TOOLBOX"] = self.options.install_matlab_toolbox - tc.variables["GTSAM_INSTALL_CYTHON_TOOLBOX"] = self.options.install_cython_toolbox - tc.variables["GTSAM_INSTALL_CPPUNITLITE"] = self.options.install_cppunitlite - tc.variables["GTSAM_INSTALL_GEOGRAPHICLIB"] = False - tc.variables["GTSAM_USE_SYSTEM_EIGEN"] = True - tc.variables["GTSAM_BUILD_TYPE_POSTFIXES"] = False + tc.variables["GTSAM_BUILD_DOC_LATEX"] = False + + # Removed in 4.1+ + if Version(self.version) < "4.1": + # https://github.com/borglab/gtsam/blob/4.0.3/CMakeLists.txt + tc.variables["GTSAM_BUILD_WRAP"] = self.options.build_wrap + tc.variables["GTSAM_INSTALL_CYTHON_TOOLBOX"] = self.options.install_cython_toolbox + tc.variables["GTSAM_TYPEDEF_POINTS_TO_VECTORS"] = self.options.typedef_points_to_vectors + # https://github.com/borglab/gtsam/blob/4.0.3/wrap/CMakeLists.txt#L15 + tc.variables["GTSAM_WRAP_SERIALIZATION"] = self.options.wrap_serialization + + tc.variables["Boost_USE_STATIC_LIBS"] = not self.dependencies["boost"].options.shared + tc.variables["Boost_NO_SYSTEM_PATHS"] = True tc.generate() + deps = CMakeDeps(self) deps.generate() def _patch_sources(self): apply_conandata_patches(self) + # Honor vc runtime if is_msvc(self): gtsam_build_types_cmake = os.path.join(self.source_folder, "cmake", "GtsamBuildTypes.cmake") replace_in_file(self, gtsam_build_types_cmake, "/MD ", f"/{msvc_runtime_flag(self)} ") replace_in_file(self, gtsam_build_types_cmake, "/MDd ", f"/{msvc_runtime_flag(self)} ") + if self.options.default_allocator == "tcmalloc": + handle_allocators_path = os.path.join(self.source_folder, "cmake", "HandleAllocators.cmake") + if Version(self.version) < "4.1": + handle_allocators_path = os.path.join(self.source_folder, "CMakeLists.txt") + replace_in_file( + self, + handle_allocators_path, + "if(GOOGLE", + "find_package(gperftools REQUIRED)\nset(GOOGLE_PERFTOOLS_FOUND TRUE)\nif(GOOGLE", + ) + replace_in_file( + self, + handle_allocators_path, + 'GTSAM_ADDITIONAL_LIBRARIES "tcmalloc"', + 'GTSAM_ADDITIONAL_LIBRARIES "gperftools::gperftools"', + ) + def build(self): self._patch_sources() cmake = CMake(self) @@ -206,53 +347,60 @@ def _module_file_rel_path(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "GTSAM") - prefix = "lib" if is_msvc(self) and not self.options.shared else "" - - self.cpp_info.components["libgtsam"].set_property("cmake_target_name", "gtsam") - self.cpp_info.components["libgtsam"].libs = [f"{prefix}gtsam"] - self.cpp_info.components["libgtsam"].requires = [f"boost::{component}" for component in self._required_boost_components] - self.cpp_info.components["libgtsam"].requires.append("eigen::eigen") + gtsam = self.cpp_info.components["libgtsam"] + gtsam.set_property("cmake_target_name", "gtsam") + gtsam.libs = ["gtsam"] + gtsam.requires = [f"boost::{component}" for component in self._required_boost_components] + gtsam.requires.append("eigen::eigen") if self.options.with_TBB: - self.cpp_info.components["libgtsam"].requires.append("onetbb::onetbb") + gtsam.requires.append("onetbb::onetbb") + if self.options.default_allocator == "tcmalloc": + gtsam.requires.append("gperftools::gperftools") if self.options.support_nested_dissection: - self.cpp_info.components["libgtsam"].requires.append("libmetis-gtsam") - if self.settings.os == "Windows" and Version(self.version) >= "4.0.3": - self.cpp_info.components["libgtsam"].system_libs = ["dbghelp"] + gtsam.requires.append("libmetis-gtsam") + if self.settings.os == "Windows": + gtsam.system_libs = ["dbghelp"] if self.options.build_unstable: - self.cpp_info.components["libgtsam_unstable"].set_property("cmake_target_name", "gtsam_unstable") - self.cpp_info.components["libgtsam_unstable"].libs = [f"{prefix}gtsam_unstable"] - self.cpp_info.components["libgtsam_unstable"].requires = ["libgtsam"] + gtsam_unstable = self.cpp_info.components["libgtsam_unstable"] + gtsam_unstable.set_property("cmake_target_name", "gtsam_unstable") + gtsam_unstable.libs = ["gtsam_unstable"] + gtsam_unstable.requires = ["libgtsam"] if self.options.support_nested_dissection: - self.cpp_info.components["libmetis-gtsam"].set_property("cmake_target_name", "metis-gtsam") - self.cpp_info.components["libmetis-gtsam"].libs = ["metis-gtsam"] - self.cpp_info.components["libmetis-gtsam"].names["pkg_config"] = "metis-gtsam" + metis = self.cpp_info.components["libmetis-gtsam"] + metis.set_property("cmake_target_name", "metis-gtsam") + if Version(self.version) >= "4.1": + metis.libs = ["metis-gtsam"] + else: + metis.libs = ["metis"] + metis.names["pkg_config"] = "metis-gtsam" if self.options.install_cppunitlite: - self.cpp_info.components["gtsam_CppUnitLite"].set_property("cmake_target_name", "CppUnitLite") - self.cpp_info.components["gtsam_CppUnitLite"].libs = ["CppUnitLite"] - self.cpp_info.components["gtsam_CppUnitLite"].requires = ["boost::boost"] + cppunitlite = self.cpp_info.components["gtsam_CppUnitLite"] + cppunitlite.set_property("cmake_target_name", "CppUnitLite") + cppunitlite.libs = ["CppUnitLite"] + cppunitlite.requires = ["boost::boost"] + + if is_msvc(self) and not self.options.shared: + for component in self.cpp_info.components.values(): + component.libs = [f"lib{lib}" for lib in component.libs if lib.startswith("gtsam")] + if self.options.build_type_postfixes and self.settings.build_type != "Release": + for component in self.cpp_info.components.values(): + component.libs = [f"{lib}{self.settings.build_type}" for lib in component.libs] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.names["cmake_find_package"] = "GTSAM" self.cpp_info.names["cmake_find_package_multi"] = "GTSAM" - self.cpp_info.components["libgtsam"].names["cmake_find_package"] = "gtsam" - self.cpp_info.components["libgtsam"].names["cmake_find_package_multi"] = "gtsam" - self.cpp_info.components["libgtsam"].build_modules["cmake_find_package"] = [self._module_file_rel_path] - self.cpp_info.components["libgtsam"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] - if self.options.build_unstable: - self.cpp_info.components["libgtsam_unstable"].names["cmake_find_package"] = "gtsam_unstable" - self.cpp_info.components["libgtsam_unstable"].names["cmake_find_package_multi"] = "gtsam_unstable" - self.cpp_info.components["libgtsam_unstable"].build_modules["cmake_find_package"] = [self._module_file_rel_path] - self.cpp_info.components["libgtsam_unstable"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] - if self.options.support_nested_dissection: - self.cpp_info.components["libmetis-gtsam"].names["cmake_find_package"] = "metis-gtsam" - self.cpp_info.components["libmetis-gtsam"].names["cmake_find_package_multi"] = "metis-gtsam" - self.cpp_info.components["libmetis-gtsam"].build_modules["cmake_find_package"] = [self._module_file_rel_path] - self.cpp_info.components["libmetis-gtsam"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] - if self.options.install_cppunitlite: - self.cpp_info.components["gtsam_CppUnitLite"].names["cmake_find_package"] = "CppUnitLite" - self.cpp_info.components["gtsam_CppUnitLite"].names["cmake_find_package_multi"] = "CppUnitLite" - self.cpp_info.components["gtsam_CppUnitLite"].build_modules["cmake_find_package"] = [self._module_file_rel_path] - self.cpp_info.components["gtsam_CppUnitLite"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] + for component_name, lib_name in [ + ("libgtsam", "gtsam"), + ("libgtsam_unstable", "gtsam_unstable"), + ("libmetis-gtsam", "metis-gtsam"), + ("gtsam_CppUnitLite", "CppUnitLite"), + ]: + if component_name in self.cpp_info.components: + component = self.cpp_info.components[component_name] + component.names["cmake_find_package"] = lib_name + component.names["cmake_find_package_multi"] = lib_name + component.build_modules["cmake_find_package"] = [self._module_file_rel_path] + component.build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] diff --git a/recipes/gtsam/all/patches/4.0.2-0001-cmake-boost.patch b/recipes/gtsam/all/patches/4.0.2-0001-cmake-boost.patch deleted file mode 100644 index d19f34cd53327..0000000000000 --- a/recipes/gtsam/all/patches/4.0.2-0001-cmake-boost.patch +++ /dev/null @@ -1,61 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -163,13 +163,13 @@ - set(BOOST_FIND_MINIMUM_VERSION 1.43) - set(BOOST_FIND_MINIMUM_COMPONENTS serialization system filesystem thread program_options date_time timer chrono regex) - --find_package(Boost ${BOOST_FIND_MINIMUM_VERSION} COMPONENTS ${BOOST_FIND_MINIMUM_COMPONENTS}) -+find_package(Boost ${BOOST_FIND_MINIMUM_VERSION} COMPONENTS ${BOOST_FIND_MINIMUM_COMPONENTS} REQUIRED) - - # Required components --if(NOT Boost_SERIALIZATION_LIBRARY OR NOT Boost_SYSTEM_LIBRARY OR NOT Boost_FILESYSTEM_LIBRARY OR -- NOT Boost_THREAD_LIBRARY OR NOT Boost_DATE_TIME_LIBRARY) -- message(FATAL_ERROR "Missing required Boost components >= v1.43, please install/upgrade Boost or configure your search paths.") --endif() -+#if(NOT Boost_SERIALIZATION_LIBRARY OR NOT Boost_SYSTEM_LIBRARY OR NOT Boost_FILESYSTEM_LIBRARY OR -+# NOT Boost_THREAD_LIBRARY OR NOT Boost_DATE_TIME_LIBRARY) -+# message(FATAL_ERROR "Missing required Boost components >= v1.43, please install/upgrade Boost or configure your search paths.") -+#endif() - - # Allow for not using the timer libraries on boost < 1.48 (GTSAM timing code falls back to old timer library) - option(GTSAM_DISABLE_NEW_TIMERS "Disables using Boost.chrono for timing" OFF) -@@ -179,30 +179,22 @@ - # so we downgraded this to classic filenames-based variables, and manually adding - # the target_include_directories(xxx ${Boost_INCLUDE_DIR}) - set(GTSAM_BOOST_LIBRARIES -- optimized ${Boost_SERIALIZATION_LIBRARY_RELEASE} -- optimized ${Boost_SYSTEM_LIBRARY_RELEASE} -- optimized ${Boost_FILESYSTEM_LIBRARY_RELEASE} -- optimized ${Boost_THREAD_LIBRARY_RELEASE} -- optimized ${Boost_DATE_TIME_LIBRARY_RELEASE} -- optimized ${Boost_REGEX_LIBRARY_RELEASE} -- debug ${Boost_SERIALIZATION_LIBRARY_DEBUG} -- debug ${Boost_SYSTEM_LIBRARY_DEBUG} -- debug ${Boost_FILESYSTEM_LIBRARY_DEBUG} -- debug ${Boost_THREAD_LIBRARY_DEBUG} -- debug ${Boost_DATE_TIME_LIBRARY_DEBUG} -- debug ${Boost_REGEX_LIBRARY_DEBUG} -+ Boost::serialization -+ Boost::system -+ Boost::filesystem -+ Boost::thread -+ Boost::date_time -+ Boost::regex - ) - message(STATUS "GTSAM_BOOST_LIBRARIES: ${GTSAM_BOOST_LIBRARIES}") - if (GTSAM_DISABLE_NEW_TIMERS) - message("WARNING: GTSAM timing instrumentation manually disabled") - list_append_cache(GTSAM_COMPILE_DEFINITIONS_PUBLIC DGTSAM_DISABLE_NEW_TIMERS) - else() -- if(Boost_TIMER_LIBRARY) -+ if(TARGET Boost::timer) - list(APPEND GTSAM_BOOST_LIBRARIES -- optimized ${Boost_TIMER_LIBRARY_RELEASE} -- optimized ${Boost_CHRONO_LIBRARY_RELEASE} -- debug ${Boost_TIMER_LIBRARY_DEBUG} -- debug ${Boost_CHRONO_LIBRARY_DEBUG} -+ Boost::timer -+ Boost::chrono - ) - else() - list(APPEND GTSAM_BOOST_LIBRARIES rt) # When using the header-only boost timer library, need -lrt diff --git a/recipes/gtsam/all/patches/4.0.2-0002-cmake-eigen.patch b/recipes/gtsam/all/patches/4.0.2-0002-cmake-eigen.patch deleted file mode 100644 index 21c808ace60fd..0000000000000 --- a/recipes/gtsam/all/patches/4.0.2-0002-cmake-eigen.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -292,7 +292,7 @@ if(GTSAM_USE_SYSTEM_EIGEN) - find_package(Eigen3 REQUIRED) - - # Use generic Eigen include paths e.g. -- set(GTSAM_EIGEN_INCLUDE_FOR_INSTALL "${EIGEN3_INCLUDE_DIR}") -+ set(GTSAM_EIGEN_INCLUDE_FOR_INSTALL "${Eigen3_INCLUDE_DIRS}") - - # check if MKL is also enabled - can have one or the other, but not both! - # Note: Eigen >= v3.2.5 includes our patches -@@ -307,7 +307,7 @@ if(GTSAM_USE_SYSTEM_EIGEN) - endif() - - # The actual include directory (for BUILD cmake target interface): -- set(GTSAM_EIGEN_INCLUDE_FOR_BUILD "${EIGEN3_INCLUDE_DIR}") -+ set(GTSAM_EIGEN_INCLUDE_FOR_BUILD "${Eigen3_INCLUDE_DIRS}") - else() - # Use bundled Eigen include path. - # Clear any variables set by FindEigen3 diff --git a/recipes/gtsam/all/patches/4.0.2-0003-macos-rpath.patch b/recipes/gtsam/all/patches/4.0.2-0003-macos-rpath.patch deleted file mode 100644 index 6bc74d30d7ff1..0000000000000 --- a/recipes/gtsam/all/patches/4.0.2-0003-macos-rpath.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -4,7 +4,6 @@ cmake_minimum_required(VERSION 3.0) - # new feature to Cmake Version > 2.8.12 - # Mac ONLY. Define Relative Path on Mac OS - if(NOT DEFINED CMAKE_MACOSX_RPATH) -- set(CMAKE_MACOSX_RPATH 0) - endif() - - # Set the version number for the library ---- a/gtsam/CMakeLists.txt -+++ b/gtsam/CMakeLists.txt -@@ -177,9 +177,6 @@ if(WIN32) # Add 'lib' prefix to static library to avoid filename collision with - endif() - - if (APPLE AND BUILD_SHARED_LIBS) -- set_target_properties(gtsam PROPERTIES -- INSTALL_NAME_DIR -- "${CMAKE_INSTALL_PREFIX}/lib") - endif() - - install( ---- a/gtsam/3rdparty/metis/libmetis/CMakeLists.txt -+++ b/gtsam/3rdparty/metis/libmetis/CMakeLists.txt -@@ -16,9 +16,6 @@ if(WIN32) - endif() - - if (APPLE) -- set_target_properties(metis PROPERTIES -- INSTALL_NAME_DIR -- "${CMAKE_INSTALL_PREFIX}/lib") - endif() - - install(TARGETS metis EXPORT GTSAM-exports LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) diff --git a/recipes/gtsam/all/patches/4.0.2-0003-cmake-project.patch b/recipes/gtsam/all/patches/4.0.3-0004-cmake-project.patch similarity index 100% rename from recipes/gtsam/all/patches/4.0.2-0003-cmake-project.patch rename to recipes/gtsam/all/patches/4.0.3-0004-cmake-project.patch diff --git a/recipes/gtsam/all/patches/4.1.1-0005-eigen3-version.patch b/recipes/gtsam/all/patches/4.1.1-0005-eigen3-version.patch new file mode 100644 index 0000000000000..8bd45c6d8f747 --- /dev/null +++ b/recipes/gtsam/all/patches/4.1.1-0005-eigen3-version.patch @@ -0,0 +1,21 @@ +Otherwise the Eigen version detection will fail due to the Eigen path variable containing a generator expression. +diff --git a/cmake/HandleEigen.cmake b/cmake/HandleEigen.cmake +--- a/cmake/HandleEigen.cmake ++++ b/cmake/HandleEigen.cmake +@@ -46,6 +46,8 @@ + endif() + + # Detect Eigen version: ++set(GTSAM_EIGEN_VERSION "${Eigen3_VERSION_STRING}") ++if (FALSE) + set(EIGEN_VER_H "${GTSAM_EIGEN_INCLUDE_FOR_BUILD}/Eigen/src/Core/util/Macros.h") + if (EXISTS ${EIGEN_VER_H}) + file(READ "${EIGEN_VER_H}" STR_EIGEN_VERSION) +@@ -67,6 +69,7 @@ + else() + message(WARNING "Cannot determine Eigen version, missing file: `${EIGEN_VER_H}`") + endif () ++endif() + + if (MSVC) + if (BUILD_SHARED_LIBS) diff --git a/recipes/gtsam/all/patches/4.2.0-0001-macos-rpath.patch b/recipes/gtsam/all/patches/4.2.0-0001-macos-rpath.patch new file mode 100644 index 0000000000000..2f60f9adaef8a --- /dev/null +++ b/recipes/gtsam/all/patches/4.2.0-0001-macos-rpath.patch @@ -0,0 +1,30 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,5 +5,4 @@ cmake_minimum_required(VERSION 3.0) + if(NOT DEFINED CMAKE_MACOSX_RPATH) +- set(CMAKE_MACOSX_RPATH 0) + endif() + + # Set the version number for the library +--- a/cmake/HandleGlobalBuildFlags.cmake ++++ b/cmake/HandleGlobalBuildFlags.cmake +@@ -20,7 +20,6 @@ endif() + + if (APPLE AND BUILD_SHARED_LIBS) + # Set the default install directory on macOS +- set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib") + endif() + + ############################################################################### +--- a/gtsam/3rdparty/metis/libmetis/CMakeLists.txt ++++ b/gtsam/3rdparty/metis/libmetis/CMakeLists.txt +@@ -17,9 +17,6 @@ if(WIN32) + endif() + + if (APPLE) +- set_target_properties(metis-gtsam PROPERTIES +- INSTALL_NAME_DIR +- "${CMAKE_INSTALL_PREFIX}/lib") + endif() + + install(TARGETS metis-gtsam EXPORT GTSAM-exports diff --git a/recipes/gtsam/all/patches/4.2.0-0002-eigen3-version.patch b/recipes/gtsam/all/patches/4.2.0-0002-eigen3-version.patch new file mode 100644 index 0000000000000..19bc6febd2db0 --- /dev/null +++ b/recipes/gtsam/all/patches/4.2.0-0002-eigen3-version.patch @@ -0,0 +1,20 @@ +diff --git a/cmake/HandleEigen.cmake b/cmake/HandleEigen.cmake +--- a/cmake/HandleEigen.cmake ++++ b/cmake/HandleEigen.cmake +@@ -59,6 +59,8 @@ + endif() + + # Detect Eigen version: ++set(GTSAM_EIGEN_VERSION "${Eigen3_VERSION_STRING}") ++if (FALSE) + set(EIGEN_VER_H "${GTSAM_EIGEN_INCLUDE_FOR_BUILD}/Eigen/src/Core/util/Macros.h") + if (EXISTS ${EIGEN_VER_H}) + file(READ "${EIGEN_VER_H}" STR_EIGEN_VERSION) +@@ -80,6 +82,7 @@ + else() + message(WARNING "Cannot determine Eigen version, missing file: `${EIGEN_VER_H}`") + endif () ++endif() + + if (MSVC) + if (BUILD_SHARED_LIBS) diff --git a/recipes/gtsam/all/patches/4.2.0a9-0001-fix-invalid-include.patch b/recipes/gtsam/all/patches/4.2.0a9-0001-fix-invalid-include.patch new file mode 100644 index 0000000000000..a0431a45e608d --- /dev/null +++ b/recipes/gtsam/all/patches/4.2.0a9-0001-fix-invalid-include.patch @@ -0,0 +1,12 @@ +diff --git a/gtsam/sfm/DsfTrackGenerator.h b/gtsam/sfm/DsfTrackGenerator.h +--- a/gtsam/sfm/DsfTrackGenerator.h (revision c57988fe554e7213c77fe379c1d7c483de26ad33) ++++ b/gtsam/sfm/DsfTrackGenerator.h (revision 26a37d62103a9b3b828d36e8b1a76f875ed842e3) +@@ -22,7 +22,7 @@ + + #include + #include +-#include ++#include + #include + + namespace gtsam { diff --git a/recipes/gtsam/all/test_v1_package/CMakeLists.txt b/recipes/gtsam/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 0d20897301b68..0000000000000 --- a/recipes/gtsam/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/gtsam/all/test_v1_package/conanfile.py b/recipes/gtsam/all/test_v1_package/conanfile.py deleted file mode 100644 index 38f4483872d47..0000000000000 --- a/recipes/gtsam/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/gtsam/config.yml b/recipes/gtsam/config.yml index 6f380a83ebb14..9c6d4a9be25c5 100644 --- a/recipes/gtsam/config.yml +++ b/recipes/gtsam/config.yml @@ -1,7 +1,7 @@ versions: + "4.2.0a9": + folder: all "4.1.1": folder: all "4.0.3": folder: all - "4.0.2": - folder: all From a31e544dd650d5fee78ab3f8fe736a42b0ecf787 Mon Sep 17 00:00:00 2001 From: nextsilicon-itay-bookstein <55076759+nextsilicon-itay-bookstein@users.noreply.github.com> Date: Sun, 6 Aug 2023 09:45:37 +0300 Subject: [PATCH 093/637] (#18676) mpfr: Add 4.2.0 Signed-off-by: Itay Bookstein Co-authored-by: Daniel --- recipes/mpfr/all/conandata.yml | 7 +++++ .../4.2.0-0001-configure.ac-fixes.patch | 10 +++++++ .../4.2.0-0002-windows-header-dll.patch | 27 +++++++++++++++++++ recipes/mpfr/config.yml | 2 ++ 4 files changed, 46 insertions(+) create mode 100644 recipes/mpfr/all/patches/4.2.0-0001-configure.ac-fixes.patch create mode 100644 recipes/mpfr/all/patches/4.2.0-0002-windows-header-dll.patch diff --git a/recipes/mpfr/all/conandata.yml b/recipes/mpfr/all/conandata.yml index dd4e8f905e5f9..53fa206c24da1 100644 --- a/recipes/mpfr/all/conandata.yml +++ b/recipes/mpfr/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.2.0": + sha256: f1cc1c6bb14d18f0c61cc416e083f5e697b6e0e3cf9630b9b33e8e483fc960f0 + url: https://ftp.gnu.org/gnu/mpfr/mpfr-4.2.0.tar.gz "4.1.0": sha256: 3127fe813218f3a1f0adf4e8899de23df33b4cf4b4b3831a5314f78e65ffa2d6 url: https://ftp.gnu.org/gnu/mpfr/mpfr-4.1.0.tar.gz @@ -6,6 +9,10 @@ sources: sha256: ae26cace63a498f07047a784cd3b0e4d010b44d2b193bab82af693de57a19a78 url: https://ftp.gnu.org/gnu/mpfr/mpfr-4.0.2.tar.gz patches: + "4.2.0": + - patch_file: "patches/4.2.0-0002-windows-header-dll.patch" + patch_description: "Windows header DLL" + patch_type: "portability" "4.1.0": - patch_file: "patches/4.1.0-0002-windows-header-dll.patch" patch_description: "Windows header DLL" diff --git a/recipes/mpfr/all/patches/4.2.0-0001-configure.ac-fixes.patch b/recipes/mpfr/all/patches/4.2.0-0001-configure.ac-fixes.patch new file mode 100644 index 0000000000000..59480e9bde74c --- /dev/null +++ b/recipes/mpfr/all/patches/4.2.0-0001-configure.ac-fixes.patch @@ -0,0 +1,10 @@ +--- configure.ac ++++ configure.ac +@@ -44,6 +44,7 @@ + dnl as it could cause confusion. But let's keep AC_CANONICAL_HOST here, + dnl since this may be a better place than later. + AC_CANONICAL_HOST ++AC_CANONICAL_TARGET + + dnl Older Automake versions than 1.13 may still be supported, but no longer + dnl tested, and many things have changed in 1.13. Moreover the INSTALL file diff --git a/recipes/mpfr/all/patches/4.2.0-0002-windows-header-dll.patch b/recipes/mpfr/all/patches/4.2.0-0002-windows-header-dll.patch new file mode 100644 index 0000000000000..8bd309400c5a6 --- /dev/null +++ b/recipes/mpfr/all/patches/4.2.0-0002-windows-header-dll.patch @@ -0,0 +1,27 @@ +--- src/mpfr.h ++++ src/mpfr.h +@@ -319,16 +319,15 @@ + # endif + #endif + +-/* Support for WINDOWS Dll: +- Check if we are inside a MPFR build, and if so export the functions. +- Otherwise does the same thing as GMP */ +-#if defined(__MPFR_WITHIN_MPFR) && __GMP_LIBGMP_DLL +-# define __MPFR_DECLSPEC __GMP_DECLSPEC_EXPORT +-#else +-# ifndef __GMP_DECLSPEC +-# define __GMP_DECLSPEC ++/* Support for WINDOWS Dll */ ++#if defined(MPFR_DLL) ++# if defined(__MPFR_WITHIN_MPFR) ++# define __MPFR_DECLSPEC __GMP_DECLSPEC_EXPORT ++# else ++# define __MPFR_DECLSPEC __GMP_DECLSPEC_IMPORT + # endif +-# define __MPFR_DECLSPEC __GMP_DECLSPEC ++#else ++# define __MPFR_DECLSPEC + #endif + + /* Use MPFR_DEPRECATED to mark MPFR functions, types or variables as diff --git a/recipes/mpfr/config.yml b/recipes/mpfr/config.yml index 72132855c0cf8..217c84a76cc94 100644 --- a/recipes/mpfr/config.yml +++ b/recipes/mpfr/config.yml @@ -1,4 +1,6 @@ versions: + "4.2.0": + folder: all "4.1.0": folder: all "4.0.2": From 37c9c3a258c4eea9e8a11cd1707a5513e6be76fc Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 6 Aug 2023 10:05:39 +0300 Subject: [PATCH 094/637] (#18701) jungle: migrate to Conan v2 * jungle: migrate to Conan v2 * Apply suggestions from code review * jungle: restore VirtualRunEnv in test_package --------- Co-authored-by: Carlos Zoido --- recipes/jungle/all/CMakeLists.txt | 7 -- recipes/jungle/all/conandata.yml | 12 ---- recipes/jungle/all/conanfile.py | 72 ++++++++++--------- .../jungle/all/test_package/CMakeLists.txt | 10 ++- recipes/jungle/all/test_package/conanfile.py | 24 ++++--- .../jungle/all/test_v1_package/CMakeLists.txt | 8 +++ .../jungle/all/test_v1_package/conanfile.py | 18 +++++ 7 files changed, 85 insertions(+), 66 deletions(-) delete mode 100644 recipes/jungle/all/CMakeLists.txt create mode 100644 recipes/jungle/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/jungle/all/test_v1_package/conanfile.py diff --git a/recipes/jungle/all/CMakeLists.txt b/recipes/jungle/all/CMakeLists.txt deleted file mode 100644 index d2b01e47d9d63..0000000000000 --- a/recipes/jungle/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.11) -project(jungle) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory("source_subfolder") diff --git a/recipes/jungle/all/conandata.yml b/recipes/jungle/all/conandata.yml index bd27aef1a8932..804a4efea38b2 100644 --- a/recipes/jungle/all/conandata.yml +++ b/recipes/jungle/all/conandata.yml @@ -10,31 +10,19 @@ patches: - patch_file: "patches/0001-cmake-alterations.patch" patch_description: "CMake dependency discovery outside subtree." patch_type: "conan" - base_path: "source_subfolder" - sha256: "a7111a290e145717ae0cbdace9866db69c70782731c8568a806f8579e30759eb" - patch_file: "patches/0002-forestdb-path.patch" patch_description: "Update include macros for ForestDB headers." patch_type: "conan" - base_path: "source_subfolder" - sha256: "84ec45a312c52e2fa8cb7ab615aaa11088f24dcb4e4b880340b46c2763900d6b" - patch_file: "patches/0003-stdatomic.patch" patch_description: "Include std::atomic from all compilers." patch_type: "portability" - base_path: "source_subfolder" - sha256: "3ca66676f89e2425255eeb15bf18a77ae21c4f383124013bd6d1cb660cbc1544" "cci.20221201": - patch_file: "patches/0004-cmake-alterations-cci.20221201.patch" patch_description: "CMake dependency discovery outside subtree." patch_type: "conan" - base_path: "source_subfolder" - sha256: "a7111a290e145717ae0cbdace9866db69c70782731c8568a806f8579e30759eb" - patch_file: "patches/0002-forestdb-path.patch" patch_description: "Update include macros for ForestDB headers." patch_type: "conan" - base_path: "source_subfolder" - sha256: "84ec45a312c52e2fa8cb7ab615aaa11088f24dcb4e4b880340b46c2763900d6b" - patch_file: "patches/0003-stdatomic.patch" patch_description: "Include std::atomic from all compilers." patch_type: "portability" - base_path: "source_subfolder" - sha256: "3ca66676f89e2425255eeb15bf18a77ae21c4f383124013bd6d1cb660cbc1544" diff --git a/recipes/jungle/all/conanfile.py b/recipes/jungle/all/conanfile.py index 5350d8f70668d..dba32eb6f0f01 100644 --- a/recipes/jungle/all/conanfile.py +++ b/recipes/jungle/all/conanfile.py @@ -1,21 +1,23 @@ -from os.path import join +import os + from conan import ConanFile -from conan.tools.files import apply_conandata_patches, copy, get from conan.tools.build import check_min_cppstd -from conans import CMake +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get + +required_conan_version = ">=1.53.0" -required_conan_version = ">=1.50.0" class JungleConan(ConanFile): name = "jungle" - homepage = "https://github.com/eBay/Jungle" description = "Key-value storage library, based on a combined index of LSM-tree and copy-on-write B+tree" - topics = ("kv-store", "cow") - url = "https://github.com/conan-io/conan-center-index" license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/eBay/Jungle" + topics = ("kv-store", "cow") + package_type = "library" settings = "os", "arch", "compiler", "build_type" - options = { "shared": [True, False], "fPIC": [True, False], @@ -25,16 +27,19 @@ class JungleConan(ConanFile): "fPIC": True, } - generators = "cmake", "cmake_find_package" + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC - @property - def _source_subfolder(self): - return "source_subfolder" + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") - def export_sources(self): - self.copy("CMakeLists.txt") - for patch_file in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch_file["patch_file"]) + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): self.requires("forestdb/cci.20220727") @@ -43,12 +48,14 @@ def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, 11) - def configure(self): - if self.options.shared: - del self.options.fPIC - def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): apply_conandata_patches(self) @@ -57,18 +64,17 @@ def build(self): cmake.build() def package(self): - src_dir = join(self.source_folder, self._source_subfolder) - copy(self, "LICENSE*", src_dir, join(self.package_folder, "licenses")) - - hdr_src = join(src_dir, "include") - copy(self, "*.h", hdr_src, join(self.package_folder, "include"), keep_path=True) - - lib_dir = join(self.package_folder, "lib") - copy(self, "*.a", self.build_folder, lib_dir, keep_path=False) - copy(self, "*.lib", self.build_folder, lib_dir, keep_path=False) - copy(self, "*.so*", self.build_folder, lib_dir, keep_path=False) - copy(self, "*.dylib*", self.build_folder, lib_dir, keep_path=False) - copy(self, "*.dll*", self.build_folder, join(self.package_folder, "bin"), keep_path=False) + copy(self, "LICENSE*", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses")) + copy(self, "*.h", + src=os.path.join(self.source_folder, "include"), + dst=os.path.join(self.package_folder, "include")) + for pattern in ["*.a", "*.lib", "*.so*", "*.dylib*", "*.dll*"]: + copy(self, pattern, + src=self.build_folder, + dst=os.path.join(self.package_folder, "lib"), + keep_path=False) def package_info(self): self.cpp_info.libs = ["jungle"] diff --git a/recipes/jungle/all/test_package/CMakeLists.txt b/recipes/jungle/all/test_package/CMakeLists.txt index 354670d11c755..fdc2bc33ffe24 100644 --- a/recipes/jungle/all/test_package/CMakeLists.txt +++ b/recipes/jungle/all/test_package/CMakeLists.txt @@ -1,11 +1,9 @@ -cmake_minimum_required(VERSION 3.11) -set(CMAKE_CXX_STANDARD 11) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +set(CMAKE_CXX_STANDARD 11) -find_package(jungle CONFIG REQUIRED) +find_package(jungle REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} jungle::jungle) diff --git a/recipes/jungle/all/test_package/conanfile.py b/recipes/jungle/all/test_package/conanfile.py index 9ebf26743f34b..ef5d7042163ec 100644 --- a/recipes/jungle/all/test_package/conanfile.py +++ b/recipes/jungle/all/test_package/conanfile.py @@ -1,11 +1,19 @@ -from conans import ConanFile -from conan.tools.build import cross_building -from conans import CMake +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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not 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/jungle/all/test_v1_package/CMakeLists.txt b/recipes/jungle/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/jungle/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/jungle/all/test_v1_package/conanfile.py b/recipes/jungle/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..9ebf26743f34b --- /dev/null +++ b/recipes/jungle/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +from conans import ConanFile +from conan.tools.build import cross_building +from conans import CMake +import os + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From c53c2c0ad52c1d76d6fa94c83c1af2021985190f Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 6 Aug 2023 10:25:56 +0300 Subject: [PATCH 095/637] (#18741) openfx: migrate to Conan v2 * openfx: migrate to Conan v2 * openfx: add OpenGL dep to CMakeLists.txt * openfx: restore VirtualRunEnv in test_package --------- Co-authored-by: Carlos Zoido --- recipes/openfx/all/CMakeLists.txt | 20 ++-- recipes/openfx/all/conanfile.py | 106 +++++++++++------- .../openfx/all/test_package/CMakeLists.txt | 7 +- recipes/openfx/all/test_package/conanfile.py | 19 +++- .../openfx/all/test_v1_package/CMakeLists.txt | 8 ++ .../openfx/all/test_v1_package/conanfile.py | 17 +++ 6 files changed, 116 insertions(+), 61 deletions(-) create mode 100644 recipes/openfx/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/openfx/all/test_v1_package/conanfile.py diff --git a/recipes/openfx/all/CMakeLists.txt b/recipes/openfx/all/CMakeLists.txt index 5232e354a73ee..1a7641b6f3019 100644 --- a/recipes/openfx/all/CMakeLists.txt +++ b/recipes/openfx/all/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.12) project(openfx VERSION 1.4.0 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -6,18 +6,18 @@ add_definitions(-D_HAS_AUTO_PTR_ETC) # Flags if(MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWINDOWS -DNOMINMAX") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWINDOWS -DNOMINMAX -D_WIN32") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-deprecated -Wno-deprecated-declarations") + add_definitions(-Dlinux) endif() # Conan -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) -find_package(EXPAT REQUIRED) +find_package(expat REQUIRED) +find_package(OpenGL REQUIRED) # Macros -set(SOURCE_SUBFOLDER ${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder) +set(SOURCE_SUBFOLDER ${CMAKE_CURRENT_LIST_DIR}/src) # Sources set(OFX_HEADER_DIR "${SOURCE_SUBFOLDER}/include") @@ -50,7 +50,7 @@ add_library(OfxHost ${OFX_HOSTSUPPORT_HEADER_FILES} ${OFX_HOSTSUPPORT_LIBRARY_FILES}) -target_link_libraries(OfxHost PUBLIC EXPAT::EXPAT) +target_link_libraries(OfxHost PUBLIC expat::expat OpenGL::GL) target_include_directories(OfxHost PUBLIC ${OFX_HEADER_DIR} @@ -68,7 +68,5 @@ install(FILES ${OFX_HOSTSUPPORT_HEADER_FILES} DESTINATION "include") -install(TARGETS OfxSupport OfxHost - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) +include(GNUInstallDirs) +install(TARGETS OfxSupport OfxHost) diff --git a/recipes/openfx/all/conanfile.py b/recipes/openfx/all/conanfile.py index 6f5bee8600958..935c3113a9393 100644 --- a/recipes/openfx/all/conanfile.py +++ b/recipes/openfx/all/conanfile.py @@ -1,54 +1,73 @@ -from conans import ConanFile, CMake, tools import os +from conan import ConanFile +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, get, rmdir + +required_conan_version = ">=1.53.0" + class openfx(ConanFile): name = "openfx" + description = "OpenFX image processing plug-in standard." license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "http://openeffects.org" - description = "OpenFX image processing plug-in standard." topics = ("image-processing", "standard") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { - "fPIC": [True, False], "shared": [True, False], + "fPIC": [True, False], } default_options = { - "fPIC": True, "shared": False, + "fPIC": True, } - requires = ("opengl/system", "expat/2.4.8") - exports_sources = "CMakeLists.txt", "cmake/*", "symbols/*" - generators = "cmake", "cmake_find_package" - _cmake = None + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + copy(self, "*", + src=os.path.join(self.recipe_folder, "cmake"), + dst=os.path.join(self.export_sources_folder, "cmake")) + copy(self, "*", + src=os.path.join(self.recipe_folder, "symbols"), + dst=os.path.join(self.export_sources_folder, "symbols")) - def source(self): - tools.get( - **self.conan_data["sources"][self.version], - destination="source_subfolder", - strip_root=True - ) + 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 config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("opengl/system") + self.requires("expat/2.5.0") - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.configure() - return self._cmake + 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 generate(self): + tc = CMakeToolchain(self) + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure(build_script_folder=self.source_path.parent) cmake.build() @property @@ -56,26 +75,25 @@ def _build_modules(self): return [os.path.join("lib", "cmake", "OpenFX.cmake")] def package(self): - cmake = self._configure_cmake() - - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - + cmake = CMake(self) cmake.install() - - self.copy("*.symbols", src="symbols", dst="lib/symbols") - self.copy("*.cmake", src="cmake", dst="lib/cmake") - self.copy("LICENSE", src="source_subfolder/Support", dst="licenses") - self.copy("readme.md") + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + copy(self, "*.symbols", + src=os.path.join(self.export_sources_folder, "symbols"), + dst=os.path.join(self.package_folder, "lib", "symbols")) + copy(self, "*.cmake", + src=os.path.join(self.export_sources_folder, "cmake"), + dst=os.path.join(self.package_folder, "lib", "cmake")) + copy(self, "LICENSE", + src=os.path.join(self.source_folder, "Support"), + dst=os.path.join(self.package_folder, "licenses")) def package_info(self): - self.cpp_info.names["cmake_find_package"] = "openfx" - self.cpp_info.names["cmake_find_package_multi"] = "openfx" - + self.cpp_info.set_property("cmake_file_name", "openfx") + self.cpp_info.set_property("cmake_target_name", "openfx::openfx") self.cpp_info.set_property("cmake_build_modules", self._build_modules) self.cpp_info.builddirs.append(os.path.join("lib", "cmake")) - self.cpp_info.build_modules["cmake_find_package"] = self._build_modules - self.cpp_info.build_modules["cmake_find_package_multi"] = self._build_modules if self.options.shared: self.cpp_info.libs = ["OfxSupport"] @@ -84,5 +102,11 @@ def package_info(self): if self.settings.os in ("Linux", "FreeBSD"): self.cpp_info.system_libs.extend(["GL"]) - if self.settings.os == "Macos": + if is_apple_os(self): self.cpp_info.frameworks = ["CoreFoundation", "OpenGL"] + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.names["cmake_find_package"] = "openfx" + self.cpp_info.names["cmake_find_package_multi"] = "openfx" + self.cpp_info.build_modules["cmake_find_package"] = self._build_modules + self.cpp_info.build_modules["cmake_find_package_multi"] = self._build_modules diff --git a/recipes/openfx/all/test_package/CMakeLists.txt b/recipes/openfx/all/test_package/CMakeLists.txt index c80f526f36b85..130ac63e132fe 100644 --- a/recipes/openfx/all/test_package/CMakeLists.txt +++ b/recipes/openfx/all/test_package/CMakeLists.txt @@ -1,12 +1,11 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) add_definitions(-D_HAS_AUTO_PTR_ETC) # Conan -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) find_package(openfx REQUIRED CONFIG) # Flags diff --git a/recipes/openfx/all/test_package/conanfile.py b/recipes/openfx/all/test_package/conanfile.py index 884a3017a3bd6..93275299d1c47 100644 --- a/recipes/openfx/all/test_package/conanfile.py +++ b/recipes/openfx/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("%s --help" % bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(f"{bin_path} --help", env="conanrun") diff --git a/recipes/openfx/all/test_v1_package/CMakeLists.txt b/recipes/openfx/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/openfx/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/openfx/all/test_v1_package/conanfile.py b/recipes/openfx/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..884a3017a3bd6 --- /dev/null +++ b/recipes/openfx/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run("%s --help" % bin_path, run_environment=True) From 5a8849ff935198d6e1a0dcf3dee59a2a10050c2e Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Sun, 6 Aug 2023 09:47:40 +0200 Subject: [PATCH 096/637] (#18778) qt6: add new components * qt6: add new components TextToSpeech, HttpServer, Protobuf and Grpc * disable failing macos configuration --- recipes/qt/6.x.x/conanfile.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/recipes/qt/6.x.x/conanfile.py b/recipes/qt/6.x.x/conanfile.py index eefa33f1dae93..70ddeb3bf605a 100644 --- a/recipes/qt/6.x.x/conanfile.py +++ b/recipes/qt/6.x.x/conanfile.py @@ -245,6 +245,9 @@ def validate(self): if self.settings.compiler == "clang" and "libstdc++" in str(self.settings.compiler.libcxx): raise ConanInvalidConfiguration("Qt needs recent libstdc++, with charconv. please switch to gcc, or to libc++") + if self.settings.os == "Macos" and self.dependencies["double-conversion"].options.shared: + raise ConanInvalidConfiguration("Test recipe fails because of Macos' SIP. Contributions are welcome.") + if self.options.get_safe("qtwebengine"): if not self.options.shared: raise ConanInvalidConfiguration("Static builds of Qt WebEngine are not supported") @@ -291,6 +294,9 @@ def validate(self): if self.options.with_sqlite3 and not self.dependencies["sqlite3"].options.enable_column_metadata: raise ConanInvalidConfiguration("sqlite3 option enable_column_metadata must be enabled for qt") + if self.options.get_safe("qtspeech") and not self.options.qtdeclarative: + raise ConanInvalidConfiguration("qtspeech requires qtdeclarative, cf QTBUG-108381") + def layout(self): cmake_layout(self, src_folder="src") @@ -1270,6 +1276,19 @@ def _create_plugin(pluginname, libname, plugintype, requires): if self.options.get_safe("qtwebview"): _create_module("WebView", ["Core", "Gui"]) + if self.options.get_safe("qtspeech"): + _create_module("TextToSpeech", []) + + if self.options.get_safe("qthttpserver"): + http_server_deps = ["Core", "Network"] + if self.options.get_safe("qtwebsockets"): + http_server_deps.append("WebSockets") + _create_module("HttpServer", http_server_deps) + + if self.options.get_safe("qtgrpc"): + _create_module("Protobuf", []) + _create_module("Grpc", ["Core", "Protobuf", "Network"]) + if self.settings.os in ["Windows", "iOS"]: if self.settings.os == "Windows": self.cpp_info.components["qtEntryPointImplementation"].set_property("cmake_target_name", "Qt6::EntryPointImplementation") From 96802b34bac5421da024c09a5a21b830c31796d1 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 6 Aug 2023 11:27:29 +0300 Subject: [PATCH 097/637] (#18799) aws-kvs-pic: migrate to Conan v2 * aws-kvs-pic: migrate to Conan v2 * aws-kvs-pic: improve os detection --------- Co-authored-by: Carlos Zoido --- recipes/aws-kvs-pic/all/CMakeLists.txt | 7 -- recipes/aws-kvs-pic/all/conandata.yml | 3 +- recipes/aws-kvs-pic/all/conanfile.py | 85 ++++++++++--------- .../all/test_package/CMakeLists.txt | 5 +- .../aws-kvs-pic/all/test_package/conanfile.py | 27 ++++-- .../all/test_package/test_package.c | 3 +- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../all/test_v1_package/conanfile.py | 19 +++++ 8 files changed, 97 insertions(+), 60 deletions(-) delete mode 100644 recipes/aws-kvs-pic/all/CMakeLists.txt create mode 100644 recipes/aws-kvs-pic/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/aws-kvs-pic/all/test_v1_package/conanfile.py diff --git a/recipes/aws-kvs-pic/all/CMakeLists.txt b/recipes/aws-kvs-pic/all/CMakeLists.txt deleted file mode 100644 index 6abb33ac667b0..0000000000000 --- a/recipes/aws-kvs-pic/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper LANGUAGES C) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/aws-kvs-pic/all/conandata.yml b/recipes/aws-kvs-pic/all/conandata.yml index 3e715c5477031..9d7d13929fbbc 100644 --- a/recipes/aws-kvs-pic/all/conandata.yml +++ b/recipes/aws-kvs-pic/all/conandata.yml @@ -4,5 +4,4 @@ sources: sha256: "5a6d8da62af766ec86423ead2a45d9ff00cd80ddea679ce228ff9696a490fae5" patches: "cci.20210812": - - base_path: "source_subfolder" - patch_file: "patches/0001-do-not-enforce-fpic.patch" + - patch_file: "patches/0001-do-not-enforce-fpic.patch" diff --git a/recipes/aws-kvs-pic/all/conanfile.py b/recipes/aws-kvs-pic/all/conanfile.py index 3cdebbedda863..f9858a924f304 100644 --- a/recipes/aws-kvs-pic/all/conanfile.py +++ b/recipes/aws-kvs-pic/all/conanfile.py @@ -1,37 +1,34 @@ import os -from conans import ConanFile, tools, CMake -from conans.errors import ConanInvalidConfiguration -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir + +required_conan_version = ">=1.53.0" + class awskvspicConan(ConanFile): name = "aws-kvs-pic" + description = "Platform Independent Code for Amazon Kinesis Video Streams" license = "Apache-2.0" - homepage = "https://github.com/awslabs/amazon-kinesis-video-streams-pic" url = "https://github.com/conan-io/conan-center-index" - description = ("Platform Independent Code for Amazon Kinesis Video Streams") - settings = "os", "arch", "compiler", "build_type" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {'shared': False, "fPIC": True} - generators = "cmake" + homepage = "https://github.com/awslabs/amazon-kinesis-video-streams-pic" topics = ("aws", "kvs", "kinesis", "video", "stream") - exports_sources = ["CMakeLists.txt", "patches/*"] - _cmake = None - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } - def _configure_cmake(self): - if not self._cmake: - self._cmake = CMake(self) - self._cmake.definitions["BUILD_DEPENDENCIES"] = False - self._cmake.configure() - return self._cmake - - def validate(self): - if (self.settings.os != "Linux" and self.options.shared): - raise ConanInvalidConfiguration("This library can only be built shared on Linux") + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -39,38 +36,50 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.cppstd - del self.settings.compiler.libcxx + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.os not in ["Linux", "FreeBSD"] and self.options.shared: + raise ConanInvalidConfiguration("This library can only be built shared on Linux") def source(self): - tools.get(**self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_DEPENDENCIES"] = False + tc.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") - cmake = self._configure_cmake() + copy(self, "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, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): self.cpp_info.components["kvspic"].libs = ["kvspic"] - self.cpp_info.components["kvspic"].names["pkg_config"] = "libkvspic" + self.cpp_info.components["kvspic"].set_property("pkg_config_name", "libkvspic") if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["kvspic"].system_libs = ["dl", "rt", "pthread"] self.cpp_info.components["kvspicClient"].libs = ["kvspicClient"] - self.cpp_info.components["kvspicClient"].names["pkg_config"] = "libkvspicClient" + self.cpp_info.components["kvspicClient"].set_property("pkg_config_name", "libkvspicClient") self.cpp_info.components["kvspicState"].libs = ["kvspicState"] - self.cpp_info.components["kvspicState"].names["pkg_config"] = "libkvspicState" + self.cpp_info.components["kvspicState"].set_property("pkg_config_name", "libkvspicState") self.cpp_info.components["kvspicUtils"].libs = ["kvspicUtils"] - self.cpp_info.components["kvspicUtils"].names["pkg_config"] = "libkvspicUtils" + self.cpp_info.components["kvspicUtils"].set_property("pkg_config_name", "libkvspicUtils") if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["kvspicUtils"].system_libs = ["dl", "rt", "pthread"] diff --git a/recipes/aws-kvs-pic/all/test_package/CMakeLists.txt b/recipes/aws-kvs-pic/all/test_package/CMakeLists.txt index dbfb3fd9c7861..33561c82ed591 100644 --- a/recipes/aws-kvs-pic/all/test_package/CMakeLists.txt +++ b/recipes/aws-kvs-pic/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(PkgConfig REQUIRED) pkg_check_modules(LIBKVSPIC REQUIRED IMPORTED_TARGET libkvspic) diff --git a/recipes/aws-kvs-pic/all/test_package/conanfile.py b/recipes/aws-kvs-pic/all/test_package/conanfile.py index 6fdab74d20c22..062f65da30ce6 100644 --- a/recipes/aws-kvs-pic/all/test_package/conanfile.py +++ b/recipes/aws-kvs-pic/all/test_package/conanfile.py @@ -1,12 +1,23 @@ import os -from conans import ConanFile, CMake, tools -class TestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "pkg_config" +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "PkgConfigDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) def build_requirements(self): - self.build_requires("pkgconf/1.7.4") + self.tool_requires("pkgconf/1.9.3") + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -14,6 +25,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/aws-kvs-pic/all/test_package/test_package.c b/recipes/aws-kvs-pic/all/test_package/test_package.c index fe89810597779..08c9a0b45013e 100644 --- a/recipes/aws-kvs-pic/all/test_package/test_package.c +++ b/recipes/aws-kvs-pic/all/test_package/test_package.c @@ -1,6 +1,7 @@ -#include #include "com/amazonaws/kinesis/video/client/Include.h" +#include + int main(int argc, char *argv[]) { diff --git a/recipes/aws-kvs-pic/all/test_v1_package/CMakeLists.txt b/recipes/aws-kvs-pic/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/aws-kvs-pic/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/aws-kvs-pic/all/test_v1_package/conanfile.py b/recipes/aws-kvs-pic/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..c890c831be123 --- /dev/null +++ b/recipes/aws-kvs-pic/all/test_v1_package/conanfile.py @@ -0,0 +1,19 @@ +import os +from conans import ConanFile, CMake, tools + +class TestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "pkg_config" + + def build_requirements(self): + self.build_requires("pkgconf/1.9.3") + + def build(self): + 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) From 08572f515fc56ccc1d61c09ec6d63032b6f522a9 Mon Sep 17 00:00:00 2001 From: Maksim Petukhov <6967052+maksim-petukhov@users.noreply.github.com> Date: Sun, 6 Aug 2023 10:46:29 +0200 Subject: [PATCH 098/637] (#18821) add nmea library * init * Update recipes/nmea/all/conanfile.py Co-authored-by: Martin Valgur * Update recipes/nmea/all/conanfile.py --------- Co-authored-by: Martin Valgur Co-authored-by: Carlos Zoido --- recipes/nmea/all/CMakeLists.txt | 67 ++++++++++++++++++++ recipes/nmea/all/conandata.yml | 4 ++ recipes/nmea/all/conanfile.py | 67 ++++++++++++++++++++ recipes/nmea/all/test_package/CMakeLists.txt | 8 +++ recipes/nmea/all/test_package/conanfile.py | 26 ++++++++ recipes/nmea/all/test_package/test_package.c | 9 +++ recipes/nmea/config.yml | 3 + 7 files changed, 184 insertions(+) create mode 100644 recipes/nmea/all/CMakeLists.txt create mode 100644 recipes/nmea/all/conandata.yml create mode 100644 recipes/nmea/all/conanfile.py create mode 100644 recipes/nmea/all/test_package/CMakeLists.txt create mode 100644 recipes/nmea/all/test_package/conanfile.py create mode 100644 recipes/nmea/all/test_package/test_package.c create mode 100644 recipes/nmea/config.yml diff --git a/recipes/nmea/all/CMakeLists.txt b/recipes/nmea/all/CMakeLists.txt new file mode 100644 index 0000000000000..75b13231e08ae --- /dev/null +++ b/recipes/nmea/all/CMakeLists.txt @@ -0,0 +1,67 @@ +cmake_minimum_required(VERSION 3.15) + +project(nmea LANGUAGES C) + +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + +add_library(${PROJECT_NAME}) + +set(NMEA_INCLUDE_DIR ${NMEA_ROOT_DIR}/include) +set(NMEA_SRC_DIR ${NMEA_ROOT_DIR}/src) + +target_sources( + ${PROJECT_NAME} + PRIVATE + ${NMEA_SRC_DIR}/context.c + ${NMEA_SRC_DIR}/generate.c + ${NMEA_SRC_DIR}/generator.c + ${NMEA_SRC_DIR}/gmath.c + ${NMEA_SRC_DIR}/info.c + ${NMEA_SRC_DIR}/parse.c + ${NMEA_SRC_DIR}/parser.c + ${NMEA_SRC_DIR}/sentence.c + ${NMEA_SRC_DIR}/time.c + ${NMEA_SRC_DIR}/tok.c +) + +target_include_directories( + ${PROJECT_NAME} + PUBLIC + ${NMEA_INCLUDE_DIR} +) + +set( + NMEA_HEADERS + ${NMEA_INCLUDE_DIR}/${PROJECT_NAME}/config.h + ${NMEA_INCLUDE_DIR}/${PROJECT_NAME}/context.h + ${NMEA_INCLUDE_DIR}/${PROJECT_NAME}/generate.h + ${NMEA_INCLUDE_DIR}/${PROJECT_NAME}/generator.h + ${NMEA_INCLUDE_DIR}/${PROJECT_NAME}/gmath.h + ${NMEA_INCLUDE_DIR}/${PROJECT_NAME}/info.h + ${NMEA_INCLUDE_DIR}/${PROJECT_NAME}/nmea.h + ${NMEA_INCLUDE_DIR}/${PROJECT_NAME}/parse.h + ${NMEA_INCLUDE_DIR}/${PROJECT_NAME}/parser.h + ${NMEA_INCLUDE_DIR}/${PROJECT_NAME}/sentence.h + ${NMEA_INCLUDE_DIR}/${PROJECT_NAME}/time.h + ${NMEA_INCLUDE_DIR}/${PROJECT_NAME}/tok.h + ${NMEA_INCLUDE_DIR}/${PROJECT_NAME}/units.h +) + +set_target_properties( + ${PROJECT_NAME} + PROPERTIES + PUBLIC_HEADER "${NMEA_HEADERS}" + C_EXTENSIONS OFF +) + +find_library(LIBM m) +target_link_libraries(${PROJECT_NAME} PRIVATE $<$:${LIBM}>) + +include(GNUInstallDirs) +install( + TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} +) diff --git a/recipes/nmea/all/conandata.yml b/recipes/nmea/all/conandata.yml new file mode 100644 index 0000000000000..11255f314caf5 --- /dev/null +++ b/recipes/nmea/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.5.3": + url: "http://downloads.sourceforge.net/nmea/nmealib-0.5.3.zip" + sha256: "41e9fbb8fd5cb1836ff727355b3debe98662b39beb7493af9b78bc4bd4a2ad7d" diff --git a/recipes/nmea/all/conanfile.py b/recipes/nmea/all/conanfile.py new file mode 100644 index 0000000000000..17706f598b456 --- /dev/null +++ b/recipes/nmea/all/conanfile.py @@ -0,0 +1,67 @@ +from conan import ConanFile +from conan.tools.files import get, copy +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +import os + + +required_conan_version = ">=1.53.0" + + +class NmeaConan(ConanFile): + name = "nmea" + description = "Library to work with NMEA protocol" + license = "LGPL-2.1-only" + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://nmea.sourceforge.net/" + topics = ("nmea", "geospatial", "gnss", "gps", "navigation") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def export_sources(self): + copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["NMEA_ROOT_DIR"] = self.source_folder.replace("\\", "/") + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + cmake.build() + + def package(self): + copy(self, pattern="LICENSE.TXT", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs.append(self.name) + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/nmea/all/test_package/CMakeLists.txt b/recipes/nmea/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..0fc5503253f05 --- /dev/null +++ b/recipes/nmea/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package C) + +find_package(nmea REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE nmea::nmea) diff --git a/recipes/nmea/all/test_package/conanfile.py b/recipes/nmea/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/nmea/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/nmea/all/test_package/test_package.c b/recipes/nmea/all/test_package/test_package.c new file mode 100644 index 0000000000000..2c83a9e9a35fb --- /dev/null +++ b/recipes/nmea/all/test_package/test_package.c @@ -0,0 +1,9 @@ +#include + +#include + +int main() +{ + printf("%f", nmea_degree2radian(180.0)); + return 0; +} diff --git a/recipes/nmea/config.yml b/recipes/nmea/config.yml new file mode 100644 index 0000000000000..2a0554e18df80 --- /dev/null +++ b/recipes/nmea/config.yml @@ -0,0 +1,3 @@ +versions: + "0.5.3": + folder: all From f16a2f87e34da77c0ce7ed78147dbc8f0c1be5e6 Mon Sep 17 00:00:00 2001 From: David Ledger <68693576+seppeon@users.noreply.github.com> Date: Sun, 6 Aug 2023 20:44:50 +1000 Subject: [PATCH 099/637] (#18284) BugFix: Update assimp's Draco version from 1.5.5 to 1.5.6 to resolve build error --- recipes/assimp/5.x/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/assimp/5.x/conanfile.py b/recipes/assimp/5.x/conanfile.py index 6f021e008adb4..e821ffefdeea3 100644 --- a/recipes/assimp/5.x/conanfile.py +++ b/recipes/assimp/5.x/conanfile.py @@ -181,7 +181,7 @@ def requirements(self): if self._depends_on_zlib: self.requires("zlib/1.2.13") if self._depends_on_draco: - self.requires("draco/1.5.5") + self.requires("draco/1.5.6") if self._depends_on_clipper: self.requires("clipper/4.10.0") # Only 4.x supported if self._depends_on_stb: From b794cf5d83e5e59028e515a36f60c17399f20bb1 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 6 Aug 2023 23:28:40 +0900 Subject: [PATCH 100/637] (#19068) zpp_bits: add version 4.4.18 --- recipes/zpp_bits/all/conandata.yml | 3 +++ recipes/zpp_bits/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/zpp_bits/all/conandata.yml b/recipes/zpp_bits/all/conandata.yml index 5c61aeec321ee..aa294b864983d 100644 --- a/recipes/zpp_bits/all/conandata.yml +++ b/recipes/zpp_bits/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.4.18": + url: "https://github.com/eyalz800/zpp_bits/archive/v4.4.18.tar.gz" + sha256: "c81a221a3d857218d990aa39f420f4cb5cdbe906672d22286b871355068bc14b" "4.4.17": url: "https://github.com/eyalz800/zpp_bits/archive/v4.4.17.tar.gz" sha256: "e6aacf3fbea7ee16a9b55a8622665d37b157efad321750876aa5c15ed8ac65e6" diff --git a/recipes/zpp_bits/config.yml b/recipes/zpp_bits/config.yml index f68457e089852..e6e42fa0160a3 100644 --- a/recipes/zpp_bits/config.yml +++ b/recipes/zpp_bits/config.yml @@ -1,4 +1,6 @@ versions: + "4.4.18": + folder: all "4.4.17": folder: all "4.4.13": From c0f58a3008333da64df130057c671244a9006a86 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 7 Aug 2023 02:30:34 +0900 Subject: [PATCH 101/637] (#19072) libuvc: update libjpeg-turbo/3.0.0 --- recipes/libuvc/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libuvc/all/conanfile.py b/recipes/libuvc/all/conanfile.py index c10470d935e60..798d7b5db6063 100644 --- a/recipes/libuvc/all/conanfile.py +++ b/recipes/libuvc/all/conanfile.py @@ -60,7 +60,7 @@ def requirements(self): if self.options.with_jpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_jpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/2.1.5") + self.requires("libjpeg-turbo/3.0.0") elif self.options.with_jpeg == "mozjpeg": self.requires("mozjpeg/4.1.1") From c8f78a23637eea6b174995ea601a645875f6c9cc Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Sun, 6 Aug 2023 20:48:26 +0200 Subject: [PATCH 102/637] (#18932) nss 3.92 --- recipes/nss/all/conandata.yml | 3 +++ recipes/nss/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/nss/all/conandata.yml b/recipes/nss/all/conandata.yml index 254439032f647..a7c913155a824 100644 --- a/recipes/nss/all/conandata.yml +++ b/recipes/nss/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.92": + url: "https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_92_RTM/src/nss-3.92.tar.gz" + sha256: "3db192d6e882039af02ae7eaf3217ed114bb7ad83414c646772ab8021e24a254" "3.91": url: "https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_91_RTM/src/nss-3.91.tar.gz" sha256: "84bd46376df17118c55f6d73d30fd93a0af21296c66e7690471547e5898fc4b3" diff --git a/recipes/nss/config.yml b/recipes/nss/config.yml index 741d3aab48e70..467e717cc1ff4 100644 --- a/recipes/nss/config.yml +++ b/recipes/nss/config.yml @@ -1,4 +1,6 @@ versions: + "3.92": + folder: all "3.91": folder: all "3.89": From f72a5ba2241a809f4e68e365242a0078778c3594 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 7 Aug 2023 10:30:26 +0900 Subject: [PATCH 103/637] (#19079) libtiff: update libjpeg-turbo --- recipes/libtiff/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libtiff/all/conanfile.py b/recipes/libtiff/all/conanfile.py index 6305fc3fa4a6f..9d1f6de079291 100644 --- a/recipes/libtiff/all/conanfile.py +++ b/recipes/libtiff/all/conanfile.py @@ -71,7 +71,7 @@ def requirements(self): if self.options.jpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.jpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/2.1.5") + self.requires("libjpeg-turbo/3.0.0") elif self.options.jpeg == "mozjpeg": self.requires("mozjpeg/4.1.1") if self.options.jbig: From 81bccad50b0b5be644ae8d4daac1a96b51bd8436 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 7 Aug 2023 11:47:43 +0900 Subject: [PATCH 104/637] (#18909) wt: add version 4.10.0 --- recipes/wt/all/conandata.yml | 7 +++++++ recipes/wt/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/wt/all/conandata.yml b/recipes/wt/all/conandata.yml index c26a610e865f7..2b98a42d759a5 100644 --- a/recipes/wt/all/conandata.yml +++ b/recipes/wt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.10.0": + url: "https://github.com/emweb/wt/archive/4.10.0.tar.gz" + sha256: "7090023d4fc4b6594bf4cb11072d9d3d775269327aece9a8993c7bbe46decb9d" "4.9.1": url: "https://github.com/emweb/wt/archive/4.9.1.tar.gz" sha256: "253c61779623ed125bdd604a7b7fe48e64bd991548d17180f040bfa88ccafd98" @@ -15,6 +18,10 @@ sources: url: "https://github.com/emweb/wt/archive/4.6.0.tar.gz" sha256: "7f709e132d32c4925e6db0a590c7ccc5613344e8b9052676ef891a25ccb550e6" patches: + "4.10.0": + - patch_file: "patches/4.8.0-0001-use-cci-package.patch" + patch_description: "use cci package" + patch_type: "conan" "4.9.1": - patch_file: "patches/4.8.0-0001-use-cci-package.patch" patch_description: "use cci package" diff --git a/recipes/wt/config.yml b/recipes/wt/config.yml index d129fd323175f..6ef848d4e1336 100644 --- a/recipes/wt/config.yml +++ b/recipes/wt/config.yml @@ -1,4 +1,6 @@ versions: + "4.10.0": + folder: all "4.9.1": folder: all "4.8.0": From 8305ea0ec1be297f700d10531682332339e8d14e Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 7 Aug 2023 12:48:59 +0900 Subject: [PATCH 105/637] (#19080) jasper: update libjpeg-turbo --- recipes/jasper/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/jasper/all/conanfile.py b/recipes/jasper/all/conanfile.py index 6bc3bfb690d58..9a1c9b8badf36 100644 --- a/recipes/jasper/all/conanfile.py +++ b/recipes/jasper/all/conanfile.py @@ -49,7 +49,7 @@ def requirements(self): if self.options.with_libjpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_libjpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/2.1.5") + self.requires("libjpeg-turbo/3.0.0") elif self.options.with_libjpeg == "mozjpeg": self.requires("mozjpeg/4.1.1") From cc3da478dac3bccbb41bb59e95e3b34bfef29f8e Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 7 Aug 2023 11:43:35 +0200 Subject: [PATCH 106/637] (#19078) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 188 +++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 1a5d515961ed7..d74f708376b9e 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -50,6 +50,7 @@ required_for_references: - autoconf - autoconf-archive - automake +- avahi - avir - aws-c-auth - aws-c-cal @@ -61,6 +62,7 @@ required_for_references: - aws-c-mqtt - aws-c-sdkutils - aws-checksums +- aws-kvs-pic - aws-libfabric - b2 - b64 @@ -75,6 +77,7 @@ required_for_references: - benchmark - bertrand - bigint +- bimg - binutils - bison - bit-lite @@ -99,6 +102,7 @@ required_for_references: - bullet3 - butteraugli - bvdberg-ctest +- bx - byte-lite - bzip2 - bzip3 @@ -161,6 +165,7 @@ required_for_references: - console_bridge - continuable - cpp-httplib +- cpp-ipc - cpp-jwt - cpp-lazy - cpp-optparse @@ -180,6 +185,7 @@ required_for_references: - cpputest - cppzmq - cpr +- cprocessing - cpu_features - cpuinfo - cqrlib @@ -307,6 +313,7 @@ required_for_references: - fruit - ftxui - function2 +- functionalplus - fxdiv - g3log - gainput @@ -346,12 +353,14 @@ required_for_references: - gmp - gnu-config - gnutls +- godot_headers - googleapis - gperf - gperftools - graphene - graphthewy - greatest +- greg7mdp-gtl - grpc - grpc-proto - gsl @@ -361,13 +370,22 @@ required_for_references: - gtest - gtk - gtk-doc-stub +- gtsam +- gumbo-parser - gurkenlaeufer +- gzip-hpp - h3 - h5pp +- half - happly - harfbuzz +- hash-library +- hazelcast-cpp-client - hdf5 - hdrhistogram-c +- heatshrink +- hedley +- hffix - hidapi - highfive - highs @@ -375,8 +393,10 @@ required_for_references: - hipony-enumerate - hippomocks - hiredis +- hlslpp - homog2d - http_parser +- hwloc - icecream-cpp - icu - id3v2lib @@ -386,6 +406,7 @@ required_for_references: - imath - imgui - imguizmo +- implot - incbin - indicators - indirect_value @@ -393,9 +414,13 @@ required_for_references: - inih - inja - intel-neon2sse +- intx - inversify-cpp - iqa +- irrxml +- iso8601lib - itlib +- ittapi - jasper - jbig - jinja2cpp @@ -407,44 +432,64 @@ required_for_references: - jsoncons - jsoncpp - jsonnet +- jthread-lite +- jungle +- jwasm - jwt-cpp - jxrlib - kainjow-mustache +- kaitai_struct_cpp_stl_runtime - kangaru - keychain - khrplatform +- kickcat +- kissfft - kmod - ktx - kuba-zip +- laszip - lcms - ldns - lefticus-tools +- lely-core - lemon - leptonica - lerc - lest +- leveldb - lexbor +- libaio - libalsa +- libaom-av1 - libarchive - libassert - libatomic_ops - libattr +- libavif - libbacktrace - libbigwig - libbsd - libcap - libcbor +- libccd - libcds +- libconfig - libconfuse - libcoro +- libcorrect - libcuckoo - libcurl +- libdaemon +- libdc1394 - libde265 - libdeflate - libdisasm - libdivide +- libdmtx - libdrawille - libdwarf +- libdxfrw +- libe57format - libelf - libepoxy - libev @@ -455,13 +500,17 @@ required_for_references: - libfreenect - libfuse - libgcrypt +- libgd - libgeotiff - libgettext - libgpg-error - libgphoto2 - libgpiod - libgta +- libhal - libharu +- libheif +- libhydrogen - libiberty - libiconv - libinterpolate @@ -473,9 +522,12 @@ required_for_references: - libltc - liblzf - libmad +- libmaxminddb - libmbus - libmediainfo - libmemcached +- libmetalink +- libmicrohttpd - libmikmod - libmnl - libmodbus @@ -485,9 +537,12 @@ required_for_references: - libmp3lame - libmysqlclient - libnabo +- libnet +- libnfnetlink - libnfs - libnghttp2 - libnl +- libnoise - libnop - libnova - libnuma @@ -505,18 +560,23 @@ required_for_references: - libressl - librttopo - libsamplerate +- libschrift - libsecret - libselinux - libserial - libsgp4 +- libsigcpp - libslz - libsmacker - libsndfile - libsodium - libspatialindex +- libspatialite - libspng +- libsquish - libsrtp - libssh2 +- libsvm - libsvtav1 - libsystemd - libtar @@ -525,12 +585,15 @@ required_for_references: - libtins - libtool - libtorrent +- libucl - libudev +- libunistring - libunwind - libusb - libuuid - libuv - libuvc +- libvault - libverto - libvips - libvpx @@ -540,30 +603,45 @@ required_for_references: - libx264 - libx265 - libxls +- libxlsxwriter - libxml2 - libxslt +- libyaml - libyuv - libzen - libzip - libzippp - lief +- linmath.h - linux-headers-generic - linux-syscall-support +- litehtml - llhttp +- lmdb - lodepng +- log.c +- log4cplus - logr - loguru +- ls-qpack - lua +- luajit - luau - lunasvg - luple +- lurlparser +- lyra - lz4 +- lzfse +- lzham - lzma_sdk - lzo - m4 - magic_enum - mailio - make +- mapbox-geometry +- mapbox-variant - mariadb-connector-c - marisa - matchit @@ -574,46 +652,68 @@ required_for_references: - mawk - mbedtls - mbits-args +- mbits-diags +- mbits-lngs - mbits-mstch - mbits-semver - mbits-utfconv +- mcap - md4c - md4qt - mdnsresponder - mdspan +- meshoptimizer - meson +- metall - metis - mgs - microservice-essentials +- microtar - mikelankamp-fpm +- mikktspace - mimalloc - mingw-builds - miniaudio - minimp3 - minisat +- miniscript +- minitrace +- miniupnpc - miniz - minizip - minizip-ng +- mio +- modern-cpp-kafka +- moltenvk - mongo-c-driver - mongo-cxx-driver +- morton-nd - mozilla-build - mozjpeg - mp-units +- mpark-variant +- mpc - mpg123 +- mpmcqueue - mppp - ms-gsl - msdf-atlas-gen - msgpack-c - msgpack-cxx - msys2 +- mujs +- muparser +- muparserx - naive-tsearch - namedtype - nameof +- nanobench - nanodbc - nanoflann - nanomsg - nanorange - nanort +- nanosvg - nas - nasm - netcdf @@ -621,22 +721,33 @@ required_for_references: - nextsilicon-cpp-subprocess - ninja - nlohmann_json +- nlopt +- nmea - nng - nodejs - norm - nsync +- ntv2 - nudb +- nuklear - numcpp - nuraft - nv-codec-headers +- nvtx +- oatpp +- objectbox +- observer-ptr-lite - octomap - odbc +- ode - ogdf - ogg - ois - onetbb +- oniguruma - onnx - onnxruntime +- open-dis-cpp - openal - openal-soft - openapi-generator @@ -646,27 +757,36 @@ required_for_references: - opencl-icd-loader - opencolorio - opencore-amr +- openddl-parser - openexr +- openfbx +- openfx - opengl +- opengl-registry - opengv - openh264 - openjdk - openjpeg - openmesh +- openmvg - openssl - opensubdiv - opentelemetry-cpp - opentelemetry-proto +- openxlsx - optional-lite - opus - opusfile - orcania - osqp - out_ptr +- outcome - p-ranav-glob - paho-mqtt-c - paho-mqtt-cpp +- parallel-hashmap - parg +- parson - patchelf - pbtools - pcapplusplus @@ -674,16 +794,38 @@ required_for_references: - pcre - pcre2 - pdfgen +- pdqsort +- perf +- perfetto +- perlinnoise +- pffft - pfr +- pgm-index +- physfs - physx - picobench - picojson +- picosha2 - pixman - pkgconf - platform.delegates - platform.hashing +- platform.interfaces +- plf_colony +- plf_indiesort +- plf_list +- plf_nanotimer +- plf_queue +- plf_stack +- plog - plutovg +- pngpp - poco +- poly2tri +- polylabel +- polylineencoder +- polymorphic_value +- poppler-data - popt - portable-file-dialogs - pprint @@ -694,7 +836,11 @@ required_for_references: - proposal - protobuf - protobuf-c +- protopuf +- protozero - psimd +- psyinf-gmtl +- ptex - pthreadpool - pthreads4w - pugixml @@ -702,11 +848,15 @@ required_for_references: - pybind11 - pybind11_json - pystring +- qcbor - qhull - qpdf +- qpoases +- qr-code-generator - qt - quantlib - quaternions +- quickjs - quill - quirc - r8brain-free-src @@ -722,11 +872,16 @@ required_for_references: - rapidyaml - raylib - re2 +- reactiveplusplus +- read-excel - readerwriterqueue - readline - readosm +- recastnavigation +- reckless - rectpack2d - redis-plus-plus +- refl-cpp - replxx - restbed - restinio @@ -735,23 +890,32 @@ required_for_references: - rmm - roaring - robin-hood-hashing +- rply - rtm +- rtmidi - rttr - ruy +- rxcpp - s2n +- safeint +- sail - samurai - sbepp - sbp - scip - scnlib - scons +- scope-lite - screen_capture_lite - sdbus-cpp +- sdf - sdl - sdl_image - sdl_ttf - seadex-essentials +- seasocks - semimap +- semver.c - sentry-breakpad - sentry-crashpad - sentry-native @@ -759,21 +923,27 @@ required_for_references: - serd - serdepp - sfml +- shapelib - shield - sigslot - simde - simdjson - simdutf - simple-websocket-server +- simple-yaml - sjson-cpp - skyr-url - sml - snappy - snowhouse - soci +- sofa +- sokol +- sol2 - sonic-cpp - sophus - soplex +- soundtouch - source_location - soxr - span-lite @@ -781,27 +951,42 @@ required_for_references: - spirv-cross - spirv-headers - spirv-tools +- spscqueue +- spy - sqlite3 - sqlite_orm - sqlitecpp - sqlpp11 +- squirrel - ssht - st_tree +- statslib - status-code +- status-value-lite - stb +- stc +- stduuid - stlab - strawberryperl - string-view-lite - stringtoolbox - strong_type - structopt +- sundials +- svector +- svgpp - svgwrite - symengine - szip - tabulate +- taglib - taocpp-json +- taocpp-operators - taocpp-pegtl +- taocpp-sequences +- taocpp-tuple - taskflow +- taywee-args - tcb-span - tcl - tclap @@ -809,6 +994,8 @@ required_for_references: - tensorpipe - termcap - termcolor +- tesseract +- tgc - thelink2012-any - threadpool - thrift @@ -842,6 +1029,7 @@ required_for_references: - univalue - unordered_dense - unqlite +- upx - uriparser - usockets - utf8proc From eece843f51176004ce5e51f91f0df3d0e603d40b Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Mon, 7 Aug 2023 17:41:44 +0400 Subject: [PATCH 107/637] (#19024) onetbb: use AnyNewerVersion cmake version policy --- recipes/onetbb/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/onetbb/all/conanfile.py b/recipes/onetbb/all/conanfile.py index 57b1bd6404c1e..0996273678365 100644 --- a/recipes/onetbb/all/conanfile.py +++ b/recipes/onetbb/all/conanfile.py @@ -109,6 +109,7 @@ def package(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "TBB") self.cpp_info.set_property("pkg_config_name", "tbb") + self.cpp_info.set_property("cmake_config_version_compat", "AnyNewerVersion") def lib_name(name): if self.settings.build_type == "Debug": From 301d8d811f27906cd902465b152a615cff598f18 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Mon, 7 Aug 2023 18:50:11 +0200 Subject: [PATCH 108/637] (#19086) function2: add version 4.2.3 --- recipes/function2/all/conandata.yml | 3 +++ recipes/function2/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/function2/all/conandata.yml b/recipes/function2/all/conandata.yml index 4a8c1d45eb5f5..ef31d20ffc355 100644 --- a/recipes/function2/all/conandata.yml +++ b/recipes/function2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.2.3": + url: "https://github.com/Naios/function2/archive/refs/tags/4.2.3.tar.gz" + sha256: "097333b05e596280d3bc7a4769f1262931716cd8cc31ca7337b7af714085f3fc" "4.2.2": url: "https://github.com/Naios/function2/archive/refs/tags/4.2.2.tar.gz" sha256: "f755cb79712dfb9ceefcf7f7ff3225f7c99d22a164dae109044dbfad55d7111e" diff --git a/recipes/function2/config.yml b/recipes/function2/config.yml index 955cd0773fc58..0be889b562c58 100644 --- a/recipes/function2/config.yml +++ b/recipes/function2/config.yml @@ -1,4 +1,6 @@ versions: + "4.2.3": + folder: all "4.2.2": folder: all "4.2.1": From 5c1dc0e189988d4fd6dabe93822ffb5233eb370b Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 8 Aug 2023 13:08:06 +0900 Subject: [PATCH 109/637] (#19087) mongo-c-driver: add version 1.24.3 --- recipes/mongo-c-driver/all/conandata.yml | 13 +++++++++++++ recipes/mongo-c-driver/config.yml | 2 ++ 2 files changed, 15 insertions(+) diff --git a/recipes/mongo-c-driver/all/conandata.yml b/recipes/mongo-c-driver/all/conandata.yml index eefdc63f63260..5e5abc368ffce 100644 --- a/recipes/mongo-c-driver/all/conandata.yml +++ b/recipes/mongo-c-driver/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.24.3": + url: "https://github.com/mongodb/mongo-c-driver/releases/download/1.24.3/mongo-c-driver-1.24.3.tar.gz" + sha256: "cc0ad1006447ded21bbefecf57d6fef61afe6f0d56a4e28da73805d50fdb81b5" "1.24.1": url: "https://github.com/mongodb/mongo-c-driver/releases/download/1.24.1/mongo-c-driver-1.24.1.tar.gz" sha256: "f9bdf71f24c6621c12535bad07f4654a218d84f16b85a68aca3abf6cd36d1859" @@ -21,6 +24,16 @@ sources: url: "https://github.com/mongodb/mongo-c-driver/releases/download/1.17.6/mongo-c-driver-1.17.6.tar.gz" sha256: "8644deec7ae585e8d12566978f2017181e883f303a028b5b3ccb83c91248b150" patches: + "1.24.3": + - patch_file: "patches/1.24.1-0001-disable-shared-when-static.patch" + patch_description: "separate static and shared builds" + patch_type: "conan" + - patch_file: "patches/1.24.1-0002-fix-uninitialized-warning.patch" + patch_description: "fix uninitialized variable warning" + patch_type: "portability" + - patch_file: "patches/1.22.0-0003-disable-warning-errors.patch" + patch_description: "disable compiler flags to make warnings into errors" + patch_type: "conan" "1.24.1": - patch_file: "patches/1.24.1-0001-disable-shared-when-static.patch" patch_description: "separate static and shared builds" diff --git a/recipes/mongo-c-driver/config.yml b/recipes/mongo-c-driver/config.yml index 20b511f9ecd13..c20e8c0d07847 100644 --- a/recipes/mongo-c-driver/config.yml +++ b/recipes/mongo-c-driver/config.yml @@ -1,4 +1,6 @@ versions: + "1.24.3": + folder: all "1.24.1": folder: all "1.23.5": From 0cde8936f6b5f8a1021d8bcaaa3759961eea0c52 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 8 Aug 2023 13:49:07 +0900 Subject: [PATCH 110/637] (#19088) libyuv: update libjpeg-turbo/3.0.0 --- recipes/libyuv/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libyuv/all/conanfile.py b/recipes/libyuv/all/conanfile.py index 5e5b8c258b2f3..4fea1b63b21f1 100644 --- a/recipes/libyuv/all/conanfile.py +++ b/recipes/libyuv/all/conanfile.py @@ -46,7 +46,7 @@ def requirements(self): if self.options.with_jpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_jpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/2.1.5") + self.requires("libjpeg-turbo/3.0.0") elif self.options.with_jpeg == "mozjpeg": self.requires("mozjpeg/4.1.1") From 0931599cfa2b9261dac03db36321b53e37d5934e Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 8 Aug 2023 11:45:29 +0300 Subject: [PATCH 111/637] (#18238) mdns: migrate to Conan v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * mdns: migrate to Conan v2 * mdns: restore test_v1_package * mdns: add cmake_find_package_multi generator to test_v1_package * mdns: simplify test_package.c Do not open a socket during the test. * mdns: remove old versions, add v1.4.3 * mdns: restore VirtualRunEnv in test_package --------- Co-authored-by: Rubén Rincón Blanco --- recipes/mdns/all/conandata.yml | 27 +++++-------- recipes/mdns/all/conanfile.py | 39 +++++++++++-------- recipes/mdns/all/test_package/CMakeLists.txt | 7 ++-- recipes/mdns/all/test_package/conanfile.py | 23 +++++++---- recipes/mdns/all/test_package/test_package.c | 12 ++++-- .../mdns/all/test_v1_package/CMakeLists.txt | 8 ++++ recipes/mdns/all/test_v1_package/conanfile.py | 17 ++++++++ recipes/mdns/config.yml | 12 ++---- 8 files changed, 87 insertions(+), 58 deletions(-) create mode 100644 recipes/mdns/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/mdns/all/test_v1_package/conanfile.py diff --git a/recipes/mdns/all/conandata.yml b/recipes/mdns/all/conandata.yml index ef0896308dfb2..67326bafe7dd9 100644 --- a/recipes/mdns/all/conandata.yml +++ b/recipes/mdns/all/conandata.yml @@ -1,22 +1,13 @@ sources: - "1.0": - sha256: e06ed954b4705f0e48f3e6bd44b75c115ee03f745c62394ee615f466e44e9373 - url: https://github.com/mjansson/mdns/archive/1.0.tar.gz - "1.1": - sha256: a0d170bc88151235b9f2dea10a9ffd1d538e4ce3b098426893fd45890efcbffb - url: https://github.com/mjansson/mdns/archive/1.1.tar.gz - "1.2": - sha256: 1919f8fd01b2b7e1128e51d51e4bd9e48fd4f2ef4ade88c152970a35d2084bae - url: https://github.com/mjansson/mdns/archive/1.2.tar.gz - "1.3": - url: "https://github.com/mjansson/mdns/archive/1.3.tar.gz" - sha256: "d3bfd684ef07beadca71c426586be88a10a92026fe6fe5355609d9e805ff5f85" - "1.4": - url: "https://github.com/mjansson/mdns/archive/1.4.tar.gz" - sha256: "413af72a6ce655dc96d35584dd0134f4ba87534ff78471b5b578e175b9f58dd5" - "1.4.1": - url: "https://github.com/mjansson/mdns/archive/1.4.1.tar.gz" - sha256: "decaf007376c62389712dda67c0eaa8ffb682e7be32ece816b1646119f061be3" + "1.4.3": + url: "https://github.com/mjansson/mdns/archive/1.4.3.tar.gz" + sha256: "be1fd8e35599cb7de179decbd0633c121d11a2dcb9cc193ff5c590bd0d480483" "1.4.2": url: "https://github.com/mjansson/mdns/archive/1.4.2.tar.gz" sha256: "c69cfdebe28a489c85f33744f7811c40572a9769a81cd57ecc09ef95802347f2" + "1.3": + url: "https://github.com/mjansson/mdns/archive/1.3.tar.gz" + sha256: "d3bfd684ef07beadca71c426586be88a10a92026fe6fe5355609d9e805ff5f85" + "1.2": + url: "https://github.com/mjansson/mdns/archive/1.2.tar.gz" + sha256: "1919f8fd01b2b7e1128e51d51e4bd9e48fd4f2ef4ade88c152970a35d2084bae" diff --git a/recipes/mdns/all/conanfile.py b/recipes/mdns/all/conanfile.py index aa012f43092fc..6842da5a57847 100644 --- a/recipes/mdns/all/conanfile.py +++ b/recipes/mdns/all/conanfile.py @@ -1,38 +1,45 @@ import os -from conans import CMake, ConanFile, tools -required_conan_version = ">=1.43.0" +from conan import ConanFile +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.52.0" + class MdnsConan(ConanFile): name = "mdns" + description = "Public domain mDNS/DNS-SD library in C" license = "Unlicense" - homepage = "https://github.com/mjansson/mdns" url = "https://github.com/conan-io/conan-center-index" - description = "Public domain mDNS/DNS-SD library in C" - topics = ("mdns", "dns", "dns-sd", "multicast discovery", "discovery") - settings = "os", "compiler", "build_type", "arch" + homepage = "https://github.com/mjansson/mdns" + topics = ("dns", "dns-sd", "multicast discovery", "discovery", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True - @property - def _source_subfolder(self): - return "source_subfolder" + def layout(self): + basic_layout(self, src_folder="src") def package_id(self): - self.info.header_only() + self.info.clear() def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - self.copy(pattern="*.h", dst="include", src=self._source_subfolder) + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "*.h", dst=os.path.join(self.package_folder, "include"), src=self.source_folder) def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + if self.settings.os == "Windows": self.cpp_info.system_libs = ["iphlpapi", "ws2_32"] - if str(self.settings.os) in ["Linux", "Android"]: - self.cpp_info.system_libs.append('pthread') + if str(self.settings.os) in ["Linux", "FreeBSD", "Android"]: + self.cpp_info.system_libs.append("pthread") self.cpp_info.set_property("cmake_file_name", "mdns") self.cpp_info.set_property("cmake_target_name", "mdns::mdns") diff --git a/recipes/mdns/all/test_package/CMakeLists.txt b/recipes/mdns/all/test_package/CMakeLists.txt index c7366be61abf1..351413082436f 100644 --- a/recipes/mdns/all/test_package/CMakeLists.txt +++ b/recipes/mdns/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(mdns REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE mdns::mdns) set_target_properties(${PROJECT_NAME} PROPERTIES C_STANDARD 99) diff --git a/recipes/mdns/all/test_package/conanfile.py b/recipes/mdns/all/test_package/conanfile.py index 6c0a50e0f7678..ef5d7042163ec 100644 --- a/recipes/mdns/all/test_package/conanfile.py +++ b/recipes/mdns/all/test_package/conanfile.py @@ -1,10 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools -class TestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" +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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - bin_path = 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/mdns/all/test_package/test_package.c b/recipes/mdns/all/test_package/test_package.c index b27d9acd4f04b..57ae843c7e0c0 100644 --- a/recipes/mdns/all/test_package/test_package.c +++ b/recipes/mdns/all/test_package/test_package.c @@ -15,8 +15,7 @@ # include #endif -int -main(int argc, const char* const* argv) { +int test() { #ifdef _WIN32 WORD versionWanted = MAKEWORD(1, 1); WSADATA wsaData; @@ -26,8 +25,7 @@ main(int argc, const char* const* argv) { } #endif - int port = 0; - int sock = mdns_socket_open_ipv4(port); + int sock = mdns_socket_open_ipv4(NULL); if (sock < 0) { printf("Failed to open socket: %s\n", strerror(errno)); return -1; @@ -35,9 +33,15 @@ main(int argc, const char* const* argv) { printf("socket cleanup\n"); mdns_socket_close(sock); + #ifdef _WIN32 WSACleanup(); #endif +} + +int main() { + // Do not run test() to not open a socket unnecessarily. + // Verifying that the function compiles is sufficient. return 0; } diff --git a/recipes/mdns/all/test_v1_package/CMakeLists.txt b/recipes/mdns/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/mdns/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/mdns/all/test_v1_package/conanfile.py b/recipes/mdns/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..6dffe66394a26 --- /dev/null +++ b/recipes/mdns/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + bin_path = self.run(bin_path, run_environment=True) diff --git a/recipes/mdns/config.yml b/recipes/mdns/config.yml index cdb4b7bded43e..59538424539ea 100644 --- a/recipes/mdns/config.yml +++ b/recipes/mdns/config.yml @@ -1,15 +1,9 @@ versions: - "1.0": + "1.4.3": folder: "all" - "1.1": - folder: "all" - "1.2": + "1.4.2": folder: "all" "1.3": folder: "all" - "1.4": - folder: "all" - "1.4.1": - folder: "all" - "1.4.2": + "1.2": folder: "all" From 0d0e9aea2d0a95fdc7d71185a65a03729101a9a4 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Tue, 8 Aug 2023 11:03:30 +0200 Subject: [PATCH 112/637] (#19089) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index d74f708376b9e..2b71385973697 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -421,12 +421,18 @@ required_for_references: - iso8601lib - itlib - ittapi +- ixwebsocket +- jansson - jasper - jbig +- jeaiii-itoa +- jfalcou-eve - jinja2cpp - joltphysics - jom - jpcre2 +- jpeg-compressor +- jsmn - json-c - json-schema-validator - jsoncons @@ -554,6 +560,7 @@ required_for_references: - libpqxx - libpsl - libqrencode +- librasterlite - libraw - librdkafka - librealsense @@ -602,6 +609,7 @@ required_for_references: - libwebsockets - libx264 - libx265 +- libxcrypt - libxls - libxlsxwriter - libxml2 From 5b2024b2ae1468c31c19d2b485e5fead82a20fac Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 8 Aug 2023 12:26:29 +0300 Subject: [PATCH 113/637] (#18350) di: migrate to Conan v2 * di: migrate to Conan v2 * di: restore test_v1_package * di: add cmake_find_package_multi generator to test_v1_package * di: fix license not being packaged * di: restore VirtualRunEnv in test_package * Added license extraction --------- Co-authored-by: Francisco Ramirez de Anton --- recipes/di/all/BSL-1.0.txt | 23 ---- recipes/di/all/conanfile.py | 112 ++++++++++++------ recipes/di/all/test_package/CMakeLists.txt | 7 +- recipes/di/all/test_package/conanfile.py | 22 +++- recipes/di/all/test_v1_package/CMakeLists.txt | 8 ++ recipes/di/all/test_v1_package/conanfile.py | 16 +++ 6 files changed, 119 insertions(+), 69 deletions(-) delete mode 100644 recipes/di/all/BSL-1.0.txt create mode 100644 recipes/di/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/di/all/test_v1_package/conanfile.py diff --git a/recipes/di/all/BSL-1.0.txt b/recipes/di/all/BSL-1.0.txt deleted file mode 100644 index 36b7cd93cdfba..0000000000000 --- a/recipes/di/all/BSL-1.0.txt +++ /dev/null @@ -1,23 +0,0 @@ -Boost Software License - Version 1.0 - August 17th, 2003 - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/recipes/di/all/conanfile.py b/recipes/di/all/conanfile.py index 5ccda35c324e5..25630735095f5 100644 --- a/recipes/di/all/conanfile.py +++ b/recipes/di/all/conanfile.py @@ -1,61 +1,101 @@ -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration import os +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get, save, load +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + class DiConan(ConanFile): name = "di" + description = "DI: C++14 Dependency Injection Library." license = "BSL-1.0" - homepage = "https://github.com/boost-ext/di" url = "https://github.com/conan-io/conan-center-index" - description = "DI: C++14 Dependency Injection Library." - topics = ("dependency-injection", "metaprogramming", "design-patterns") - exports_sources = ["BSL-1.0.txt"] - settings = "compiler" - options = {"with_extensions": [True, False], "diagnostics_level": [0, 1, 2]} - default_options = {"with_extensions": False, "diagnostics_level": 1} + homepage = "https://github.com/boost-ext/di" + topics = ("dependency-injection", "metaprogramming", "design-patterns", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "with_extensions": [True, False], + "diagnostics_level": [0, 1, 2] + } + default_options = { + "with_extensions": False, + "diagnostics_level": 1 + } no_copy_source = True @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 14 - def configure(self): - minimal_cpp_standard = "14" - if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, minimal_cpp_standard) - minimal_version = { + @property + def _compilers_minimum_version(self): + return { "gcc": "5", "clang": "3.4", "apple-clang": "10", - "Visual Studio": "15" + "Visual Studio": "15", + "msvc": "191" } + + def configure(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) compiler = str(self.settings.compiler) - if compiler not in minimal_version: - self.output.warn( - "%s recipe lacks information about the %s compiler standard version support" % (self.name, compiler)) - self.output.warn( - "%s requires a compiler that supports at least C++%s" % (self.name, minimal_cpp_standard)) + if compiler not in self._compilers_minimum_version: + self.output.warning( + f"{self.name} recipe lacks information about the {compiler} compiler standard version support") + self.output.warning( + f"{self.name} requires a compiler that supports at least C++{self._min_cppstd}") return - version = tools.Version(self.settings.compiler.version) - if version < minimal_version[compiler]: - raise ConanInvalidConfiguration("%s requires a compiler that supports at least C++%s" % (self.name, minimal_cpp_standard)) + version = Version(self.settings.compiler.version) + if version < self._compilers_minimum_version[compiler]: + raise ConanInvalidConfiguration( + f"{self.name} requires a compiler that supports at least C++{self._min_cppstd}") - def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = "di-" + self.version - os.rename(extracted_dir, self._source_subfolder) - - def package(self): - self.copy("BSL-1.0.txt", src="", dst="licenses") - if self.options.with_extensions: - self.copy("*.hpp", src=os.path.join(self._source_subfolder, "extension", "include", "boost", "di", "extension"), dst=os.path.join("include", "boost", "di", "extension"), keep_path=True) - self.copy("di.hpp", src=os.path.join(self._source_subfolder, "include", "boost"), dst=os.path.join("include", "boost")) + def layout(self): + basic_layout(self, src_folder="src") def package_id(self): self.info.requires.clear() self.info.settings.clear() del self.info.options.diagnostics_level + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def _extract_license(self): + file = os.path.join(self.source_folder, "CMakeLists.txt") + file_content = load(self, file) + + license_start = file_content.find("# Copyright") + sub_end = "LICENSE_1_0.txt)" + license_end = file_content.find(sub_end) + license_contents = file_content[license_start:(license_end + len(sub_end))] + save(self, os.path.join(self.package_folder, "licenses", "LICENSE"), license_contents) + + + def package(self): + self._extract_license() + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + if self.options.with_extensions: + copy(self, "*.hpp", + dst=os.path.join(self.package_folder, "include", "boost", "di", "extension"), + src=os.path.join(self.source_folder, "extension", "include", "boost", "di", "extension"), + keep_path=True) + copy(self, "di.hpp", + dst=os.path.join(self.package_folder, "include", "boost"), + src=os.path.join(self.source_folder, "include", "boost")) + def package_info(self): - self.cpp_info.defines.append("BOOST_DI_CFG_DIAGNOSTICS_LEVEL={}".format(self.options.diagnostics_level)) + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + self.cpp_info.defines.append( + f"BOOST_DI_CFG_DIAGNOSTICS_LEVEL={self.options.diagnostics_level}") diff --git a/recipes/di/all/test_package/CMakeLists.txt b/recipes/di/all/test_package/CMakeLists.txt index 44d785353d02d..4ead030531af2 100644 --- a/recipes/di/all/test_package/CMakeLists.txt +++ b/recipes/di/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.1.3) +cmake_minimum_required(VERSION 3.15) project(PackageTest CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +find_package(di REQUIRED CONFIG) add_executable(example example.cpp) +target_link_libraries(example di::di) set_target_properties(example PROPERTIES CXX_STANDARD 14) -target_link_libraries(example CONAN_PKG::di) diff --git a/recipes/di/all/test_package/conanfile.py b/recipes/di/all/test_package/conanfile.py index 8d63f059b4cdc..8d52b7021efe1 100644 --- a/recipes/di/all/test_package/conanfile.py +++ b/recipes/di/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 DiConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" +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) @@ -12,5 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - self.run(os.path.join("bin", "example"), run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "example") + self.run(bin_path, env="conanrun") diff --git a/recipes/di/all/test_v1_package/CMakeLists.txt b/recipes/di/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/di/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/di/all/test_v1_package/conanfile.py b/recipes/di/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..da134b42a75e3 --- /dev/null +++ b/recipes/di/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + + +class DiConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + self.run(os.path.join("bin", "example"), run_environment=True) From 1eaf77a85f94918f67be390dfb43b35898ee2171 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 8 Aug 2023 12:46:46 +0300 Subject: [PATCH 114/637] (#18352) si: migrate to Conan v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * si: migrate to Conan v2 * si: restore test_v1_package * si: drop older versions * si: restore VirtualRunEnv in test_package --------- Co-authored-by: Rubén Rincón Blanco --- recipes/si/all/CMakeLists.txt | 7 -- recipes/si/all/conandata.yml | 40 ++++----- recipes/si/all/conanfile.py | 81 +++++++++++-------- recipes/si/all/test_package/CMakeLists.txt | 7 +- recipes/si/all/test_package/conanfile.py | 22 +++-- recipes/si/all/test_v1_package/CMakeLists.txt | 8 ++ recipes/si/all/test_v1_package/conanfile.py | 18 +++++ recipes/si/config.yml | 16 +--- 8 files changed, 107 insertions(+), 92 deletions(-) delete mode 100644 recipes/si/all/CMakeLists.txt create mode 100644 recipes/si/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/si/all/test_v1_package/conanfile.py diff --git a/recipes/si/all/CMakeLists.txt b/recipes/si/all/CMakeLists.txt deleted file mode 100644 index 6c3ae2de9686d..0000000000000 --- a/recipes/si/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8.11) -project(cmake_wrapper) - -include(${CMAKE_BINARY_DIR}/../conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/si/all/conandata.yml b/recipes/si/all/conandata.yml index 5576f1491e1a5..a84644449fec8 100644 --- a/recipes/si/all/conandata.yml +++ b/recipes/si/all/conandata.yml @@ -1,28 +1,16 @@ sources: - 1.7.6: - url: https://github.com/bernedom/SI/archive/1.7.6.tar.gz - sha256: 88041156890c34f7ca92f3ae385b19189583aa5c59ac470bfe2db6df5d5c954b - 2.0.4: - url: https://github.com/bernedom/SI/archive/2.0.4.tar.gz - sha256: 459936b913e887325e6ad69e9d64389b80f49e700aa8e5308df2bd77b8c74a0e - 2.1.3: - url: https://github.com/bernedom/SI/archive/2.1.3.tar.gz - sha256: c4728155bd8878fecc5c71c006e01cb193e6084d1604f79edc71ee723027534b - 2.2.0: - url: https://github.com/bernedom/SI/archive/2.2.0.tar.gz - sha256: 4b42dbe878995e19991487b60e235699b02858a5036a1729890d7adc865794bf - 2.3.0: - url: https://github.com/bernedom/SI/archive/2.3.0.tar.gz - sha256: b714162a933ddf1be66c8f2f2d31b52626189d6e4b292770bbb899106e8f6ac1 - 2.4.0: - url: https://github.com/bernedom/SI/archive/2.4.0.tar.gz - sha256: 84e13b52520808d9a55a073b1bb98376be03dc3b09ddee862a1418ef543e9f2d - 2.4.1: - url: https://github.com/bernedom/SI/archive/2.4.1.tar.gz - sha256: 6bfdbebb549da1b2db93b55c1c7f8228a0cdc6144a815319918237ca8601ad3a - 2.5.0: - url: https://github.com/bernedom/SI/archive/2.5.0.tar.gz - sha256: dc00eb8cfaa32e19c83595b238726188d2b857f8999dae08fe3001d0107ba276 2.5.1: - url: https://github.com/bernedom/SI/archive/2.5.1.tar.gz - sha256: b7b977c04c220a47a2bd3b8e2b6acfd640d286dfe1ae609f20e184cfec998798 + url: "https://github.com/bernedom/SI/archive/2.5.1.tar.gz" + sha256: "b7b977c04c220a47a2bd3b8e2b6acfd640d286dfe1ae609f20e184cfec998798" + 2.5.0: + url: "https://github.com/bernedom/SI/archive/2.5.0.tar.gz" + sha256: "dc00eb8cfaa32e19c83595b238726188d2b857f8999dae08fe3001d0107ba276" + 2.4.1: + url: "https://github.com/bernedom/SI/archive/2.4.1.tar.gz" + sha256: "6bfdbebb549da1b2db93b55c1c7f8228a0cdc6144a815319918237ca8601ad3a" + 2.3.0: + url: "https://github.com/bernedom/SI/archive/2.3.0.tar.gz" + sha256: "b714162a933ddf1be66c8f2f2d31b52626189d6e4b292770bbb899106e8f6ac1" + 1.7.6: + url: "https://github.com/bernedom/SI/archive/1.7.6.tar.gz" + sha256: "88041156890c34f7ca92f3ae385b19189583aa5c59ac470bfe2db6df5d5c954b" diff --git a/recipes/si/all/conanfile.py b/recipes/si/all/conanfile.py index 38915243d0bef..592ef3c7ad910 100644 --- a/recipes/si/all/conanfile.py +++ b/recipes/si/all/conanfile.py @@ -1,31 +1,33 @@ -from conans import CMake, ConanFile, tools -from conans.errors import ConanInvalidConfiguration - import os -required_conan_version = ">=1.43.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + class SiConan(ConanFile): name = "si" + description = ( + "A header only c++ library that provides type safety and user defined literals " + "for handling physical values defined in the International System of Units." + ) license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/bernedom/SI" - description = "A header only c++ library that provides type safety and user defined literals \ - for handling pyhsical values defined in the International System of Units." - topics = ("physical units", "SI-unit-conversion", - "cplusplus-library", "cplusplus-17") - exports_sources = "CMakeLists.txt" + topics = ("physical units", "SI-unit-conversion", "cplusplus-library", "cplusplus-17", "header-only") + + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True - generators = "cmake" @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" + def _min_cppstd(self): + return 17 @property def _compilers_minimum_version(self): @@ -36,38 +38,47 @@ def _compilers_minimum_version(self): "apple-clang": "10", } + def layout(self): + cmake_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, "17") + check_min_cppstd(self, self._min_cppstd) - minimum_version = self._compilers_minimum_version.get( - str(self.settings.compiler), False) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version: - if tools.Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration("'si' requires C++17, which your compiler ({} {}) does not support.".format( - self.settings.compiler, self.settings.compiler.version)) + if Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + "'si' requires C++17, which your compiler " + f"({self.settings.compiler} {self.settings.compiler.version}) does not support.") else: - self.output.warn( - "'si' requires C++17. Your compiler is unknown. Assuming it supports C++17.") - - def package_id(self): - self.info.header_only() + self.output.warning("'si' requires C++17. Your compiler is unknown. Assuming it supports C++17.") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["SI_BUILD_TESTING"] = False + tc.variables["SI_BUILD_DOC"] = False + tc.variables["SI_INSTALL_LIBRARY"] = True + tc.generate() def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) cmake = CMake(self) - cmake.definitions["SI_BUILD_TESTING"] = False - cmake.definitions["SI_BUILD_DOC"] = False - cmake.definitions["SI_INSTALL_LIBRARY"] = True - cmake.configure(build_folder=self._build_subfolder) + cmake.configure() cmake.install() - tools.rmdir(os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + self.cpp_info.set_property("cmake_file_name", "SI") self.cpp_info.set_property("cmake_target_name", "SI::SI") self.cpp_info.names["cmake_find_package"] = "SI" diff --git a/recipes/si/all/test_package/CMakeLists.txt b/recipes/si/all/test_package/CMakeLists.txt index 14c1322818a6b..b7052eb3cd9b3 100644 --- a/recipes/si/all/test_package/CMakeLists.txt +++ b/recipes/si/all/test_package/CMakeLists.txt @@ -1,8 +1,5 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) find_package(SI REQUIRED CONFIG) diff --git a/recipes/si/all/test_package/conanfile.py b/recipes/si/all/test_package/conanfile.py index 8ae9b638e62fe..ef5d7042163ec 100644 --- a/recipes/si/all/test_package/conanfile.py +++ b/recipes/si/all/test_package/conanfile.py @@ -1,11 +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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -13,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/si/all/test_v1_package/CMakeLists.txt b/recipes/si/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/si/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/si/all/test_v1_package/conanfile.py b/recipes/si/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..8ae9b638e62fe --- /dev/null +++ b/recipes/si/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ + +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/si/config.yml b/recipes/si/config.yml index 8530898d2c4b5..7296df14f7ece 100644 --- a/recipes/si/config.yml +++ b/recipes/si/config.yml @@ -1,19 +1,11 @@ versions: - 1.7.6: - folder: all - 2.0.4: - folder: all - 2.1.3: - folder: all - 2.2.0: - folder: all - 2.3.0: + 2.5.1: folder: all - 2.4.0: + 2.5.0: folder: all 2.4.1: folder: all - 2.5.0: + 2.3.0: folder: all - 2.5.1: + 1.7.6: folder: all From bd9b51234dfbcf81a9b03455de7a0a32e002984e Mon Sep 17 00:00:00 2001 From: Alexander Bigerl Date: Tue, 8 Aug 2023 12:09:22 +0200 Subject: [PATCH 115/637] (#19015) Fix: sha256 sum of data for dice-template-library v1.0.0 --- recipes/dice-template-library/all/conandata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/dice-template-library/all/conandata.yml b/recipes/dice-template-library/all/conandata.yml index 8bfdcb315eb92..3dcfa182d3a53 100644 --- a/recipes/dice-template-library/all/conandata.yml +++ b/recipes/dice-template-library/all/conandata.yml @@ -4,7 +4,7 @@ sources: sha256: "a00ee401379eaf6c8af013fb39d6732fa68c3852e14b50789edde6f054647ca2" "1.0.0": url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v1.0.0.tar.gz" - sha256: "485505ad3f9fb033083e2952bd8b4e68f6b4f123746b20f4ec3af46f4ce66cfe" + sha256: "d0c75ec4861e2480dc7d6533125f9c2dfb3574fc2cffd15c66665b1cdfa66561" "0.3.0": url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v0.3.0.tar.gz" sha256: "2c02278f86c7b5fe1c684f5126f30529952a03784fa7c883cc4fd44965b3c33e" From 4a0d5f020920532d720f962d4ab9d8437c799273 Mon Sep 17 00:00:00 2001 From: Samuel Dowling Date: Tue, 8 Aug 2023 20:15:37 +0930 Subject: [PATCH 116/637] (#18559) [util-linux-libuuid] Change CMake target from LibUUID::LibUUID to libuuid::libuuid * [util-linux-libuuid] Change CMake target from LibUUID::LibUUID to libuuid::libuuid * This is in line with what conan recipes seem to expect, which will minimise the number of patches required. LibUUID was chosen as the target name given this is what's used internally within cmake, but this isn't a public interface and so there is no common usage to take guidance from. Closes #18554 * add alias for LibUUID::LibUUID --------- Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> --- recipes/util-linux-libuuid/all/conanfile.py | 7 +++++-- recipes/util-linux-libuuid/all/test_package/CMakeLists.txt | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/recipes/util-linux-libuuid/all/conanfile.py b/recipes/util-linux-libuuid/all/conanfile.py index 736f1aadf0369..71265d08f5124 100644 --- a/recipes/util-linux-libuuid/all/conanfile.py +++ b/recipes/util-linux-libuuid/all/conanfile.py @@ -109,7 +109,10 @@ def package(self): def package_info(self): self.cpp_info.set_property("pkg_config_name", "uuid") - self.cpp_info.set_property("cmake_target_name", "LibUUID::LibUUID") - self.cpp_info.set_property("cmake_file_name", "LibUUID") + self.cpp_info.set_property("cmake_target_name", "libuuid::libuuid") + self.cpp_info.set_property("cmake_file_name", "libuuid") + # Maintain alias to `LibUUID::LibUUID` for previous version of the recipe + self.cpp_info.set_property("cmake_target_aliases", ["LibUUID::LibUUID"]) + self.cpp_info.libs = ["uuid"] self.cpp_info.includedirs.append(os.path.join("include", "uuid")) diff --git a/recipes/util-linux-libuuid/all/test_package/CMakeLists.txt b/recipes/util-linux-libuuid/all/test_package/CMakeLists.txt index 02a93367160a0..75c717f769900 100644 --- a/recipes/util-linux-libuuid/all/test_package/CMakeLists.txt +++ b/recipes/util-linux-libuuid/all/test_package/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.8) project(test_package LANGUAGES C) -find_package(LibUUID REQUIRED CONFIG) +find_package(libuuid REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE LibUUID::LibUUID) +target_link_libraries(${PROJECT_NAME} PRIVATE libuuid::libuuid) target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) From ff2b8d99c65e4b346ce7b289164815952734573a Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 8 Aug 2023 20:09:21 +0900 Subject: [PATCH 117/637] (#19050) freexl: add version 2.0.0, add package_type * freexl: add version 2.0.0, add package_type * fix typo in patch file --- recipes/freexl/all/conandata.yml | 5 +++ recipes/freexl/all/conanfile.py | 10 +++-- .../freexl/all/patches/fix-nmake-2.0.0.patch | 42 +++++++++++++++++++ recipes/freexl/config.yml | 2 + 4 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 recipes/freexl/all/patches/fix-nmake-2.0.0.patch diff --git a/recipes/freexl/all/conandata.yml b/recipes/freexl/all/conandata.yml index 1ded763735f94..9d309ba6c3c0d 100644 --- a/recipes/freexl/all/conandata.yml +++ b/recipes/freexl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.0": + url: "http://www.gaia-gis.it/gaia-sins/freexl-sources/freexl-2.0.0.tar.gz" + sha256: "176705f1de58ab7c1eebbf5c6de46ab76fcd8b856508dbd28f5648f7c6e1a7f0" "1.0.6": url: "http://www.gaia-gis.it/gaia-sins/freexl-sources/freexl-1.0.6.tar.gz" sha256: "3de8b57a3d130cb2881ea52d3aa9ce1feedb1b57b7daa4eb37f751404f90fc22" @@ -6,6 +9,8 @@ sources: url: "http://www.gaia-gis.it/gaia-sins/freexl-sources/freexl-1.0.5.tar.gz" sha256: "3dc9b150d218b0e280a3d6a41d93c1e45f4d7155829d75f1e5bf3e0b0de6750d" patches: + "2.0.0": + - patch_file: "patches/fix-nmake-2.0.0.patch" "1.0.6": - patch_file: "patches/fix-nmake-1.0.6.patch" "1.0.5": diff --git a/recipes/freexl/all/conanfile.py b/recipes/freexl/all/conanfile.py index 794b52fdc98a5..6f97355b38f7c 100644 --- a/recipes/freexl/all/conanfile.py +++ b/recipes/freexl/all/conanfile.py @@ -6,6 +6,7 @@ from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc, NMakeDeps, NMakeToolchain +from conan.tools.scm import Version import os required_conan_version = ">=1.55.0" @@ -16,10 +17,10 @@ class FreexlConan(ConanFile): description = "FreeXL is an open source library to extract valid data " \ "from within an Excel (.xls) spreadsheet." license = ["MPL-1.0", "GPL-2.0-only", "LGPL-2.1-only"] - topics = ("excel", "xls") - homepage = "https://www.gaia-gis.it/fossil/freexl/index" url = "https://github.com/conan-io/conan-center-index" - + homepage = "https://www.gaia-gis.it/fossil/freexl/index" + topics = ("excel", "xls") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -52,6 +53,9 @@ def layout(self): def requirements(self): self.requires("libiconv/1.17") + if Version(self.version) >= "2.0.0": + self.requires("expat/2.5.0") + self.requires("minizip/1.2.13") def build_requirements(self): if not is_msvc(self): diff --git a/recipes/freexl/all/patches/fix-nmake-2.0.0.patch b/recipes/freexl/all/patches/fix-nmake-2.0.0.patch new file mode 100644 index 0000000000000..80cf36670487d --- /dev/null +++ b/recipes/freexl/all/patches/fix-nmake-2.0.0.patch @@ -0,0 +1,42 @@ +diff --git a/a/makefile.vc b/b/makefile.vc +index 5cd5d05..f7505ea 100644 +--- a/a/makefile.vc ++++ b/b/makefile.vc +@@ -11,7 +11,7 @@ ODS = freexl_ods.obj + LIBOBJ = $(CORE) $(XLSX) $(ODS) + FREEXL_DLL = freexl$(VERSION).dll + +-CFLAGS = /nologo -I. -Iheaders -IC:\OSGeo4W\include $(OPTFLAGS) ++CFLAGS = /nologo -I. -Iheaders $(OPTFLAGS) + + default: all + +@@ -33,12 +33,8 @@ freexl.lib: $(LIBOBJ) + $(FREEXL_DLL): freexl_i.lib + + freexl_i.lib: $(LIBOBJ) +- link /debug /dll /out:$(FREEXL_DLL) \ +- /implib:freexl_i.lib $(LIBOBJ) \ +- C:\OSGeo4W\lib\iconv.lib \ +- C:\OSGeo4W\lib\libexpat.lib \ +- C:\OSGeo4W\lib\libminizip.lib \ +- C:\OSGeo4w\lib\zlib.lib ++ link /dll /out:$(FREEXL_DLL) \ ++ /implib:freexl_i.lib $(LIBOBJ) + if exist $(FREEXL_DLL).manifest mt -manifest \ + $(FREEXL_DLL).manifest -outputresource:$(FREEXL_DLL);2 + +diff --git a/a/nmake.opt b/b/nmake.opt +index 35f9242..15abafe 100644 +--- a/a/nmake.opt ++++ b/b/nmake.opt +@@ -2,8 +2,7 @@ + INSTDIR=C:\OSGeo4W + + # Uncomment the first for an optimized build, or the second for debug. +-OPTFLAGS= /nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS \ +- /DDLL_EXPORT ++OPTFLAGS= /nologo /fp:precise /W3 /D_CRT_SECURE_NO_WARNINGS $(FREEXL_EXPORT) + #OPTFLAGS= /nologo /Zi /MD /Fdfreexl.pdb /DDLL_EXPORT + + # Set the version number for the DLL. Normally we leave this blank since diff --git a/recipes/freexl/config.yml b/recipes/freexl/config.yml index 06269eb399e91..e78a14da43e74 100644 --- a/recipes/freexl/config.yml +++ b/recipes/freexl/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.0": + folder: all "1.0.6": folder: all "1.0.5": From 7008564c91237b7767521d87b18200bd3c0ec3b4 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Tue, 8 Aug 2023 16:51:11 +0200 Subject: [PATCH 118/637] (#19097) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 2b71385973697..fdcbe4b81dbb2 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -765,6 +765,7 @@ required_for_references: - opencl-icd-loader - opencolorio - opencore-amr +- opencv - openddl-parser - openexr - openfbx From 52263aadbcc9777247c2ec8d4d8f99fc3d287476 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 9 Aug 2023 00:12:10 +0900 Subject: [PATCH 119/637] (#19071) minizip-ng: add version 4.0.1, remove older versions --- recipes/minizip-ng/all/conandata.yml | 36 ++----------------- recipes/minizip-ng/all/conanfile.py | 2 +- .../3.0.1-0001-fix-cmake-project.patch | 22 ------------ .../3.0.2-0001-fix-cmake-project.patch | 22 ------------ .../3.0.3-0001-fix-cmake-project.patch | 22 ------------ recipes/minizip-ng/config.yml | 8 ++--- 6 files changed, 6 insertions(+), 106 deletions(-) delete mode 100644 recipes/minizip-ng/all/patches/3.0.1-0001-fix-cmake-project.patch delete mode 100644 recipes/minizip-ng/all/patches/3.0.2-0001-fix-cmake-project.patch delete mode 100644 recipes/minizip-ng/all/patches/3.0.3-0001-fix-cmake-project.patch diff --git a/recipes/minizip-ng/all/conandata.yml b/recipes/minizip-ng/all/conandata.yml index 352a0f4b634fe..cad464b51193b 100644 --- a/recipes/minizip-ng/all/conandata.yml +++ b/recipes/minizip-ng/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.0.1": + url: "https://github.com/zlib-ng/minizip-ng/archive/4.0.1.tar.gz" + sha256: "63e47a2b4dbac0da501f43f4da74f118dfb3ef0dee0ffbbe89428271002260f8" "4.0.0": url: "https://github.com/zlib-ng/minizip-ng/archive/4.0.0.tar.gz" sha256: "f9062e576de026fd5026d65597de3b05263cd4d91400cacdbbe36dfa8a642fff" @@ -20,15 +23,6 @@ sources: "3.0.4": url: "https://github.com/zlib-ng/minizip-ng/archive/3.0.4.tar.gz" sha256: "2ab219f651901a337a7d3c268128711b80330a99ea36bdc528c76b591a624c3c" - "3.0.3": - url: "https://github.com/zlib-ng/minizip-ng/archive/3.0.3.tar.gz" - sha256: "5f1dd0d38adbe9785cb9c4e6e47738c109d73a0afa86e58c4025ce3e2cc504ed" - "3.0.2": - url: "https://github.com/zlib-ng/minizip-ng/archive/3.0.2.tar.gz" - sha256: "6ba4b6629c107c27ab526e517bdb105612232f0965a6747f60150e5a04c2fe5a" - "3.0.1": - url: "https://github.com/zlib-ng/minizip-ng/archive/3.0.1.tar.gz" - sha256: "96c95b274dd535984ce0e87691691388f2b976106e8cf8d527b15da552ac94e4" patches: "3.0.9": - patch_file: "patches/3.0.9-0001-fix-cmake-project.patch" @@ -70,27 +64,3 @@ patches: patch_description: "CMake: inject libdir of lzma" patch_type: "conan" patch_source: "https://github.com/zlib-ng/minizip-ng/pull/658" - "3.0.3": - - patch_file: "patches/3.0.3-0001-fix-cmake-project.patch" - patch_description: "CMake: declare project() sooner" - patch_type: "conan" - - patch_file: "patches/3.0.1-0002-fix-lzma-libdir.patch" - patch_description: "CMake: inject libdir of lzma" - patch_type: "conan" - patch_source: "https://github.com/zlib-ng/minizip-ng/pull/658" - "3.0.2": - - patch_file: "patches/3.0.2-0001-fix-cmake-project.patch" - patch_description: "CMake: declare project() sooner" - patch_type: "conan" - - patch_file: "patches/3.0.1-0002-fix-lzma-libdir.patch" - patch_description: "CMake: inject libdir of lzma" - patch_type: "conan" - patch_source: "https://github.com/zlib-ng/minizip-ng/pull/658" - "3.0.1": - - patch_file: "patches/3.0.1-0001-fix-cmake-project.patch" - patch_description: "CMake: declare project() sooner" - patch_type: "conan" - - patch_file: "patches/3.0.1-0002-fix-lzma-libdir.patch" - patch_description: "CMake: inject libdir of lzma" - patch_type: "conan" - patch_source: "https://github.com/zlib-ng/minizip-ng/pull/658" diff --git a/recipes/minizip-ng/all/conanfile.py b/recipes/minizip-ng/all/conanfile.py index 01bda6f608ccb..9dec1a6119509 100644 --- a/recipes/minizip-ng/all/conanfile.py +++ b/recipes/minizip-ng/all/conanfile.py @@ -140,7 +140,7 @@ def _patch_sources(self): replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE 1)", "") - else: + elif Version(self.version) == "4.0.0": replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "set_target_properties(${MINIZIP_TARGET} PROPERTIES POSITION_INDEPENDENT_CODE 1)", "") diff --git a/recipes/minizip-ng/all/patches/3.0.1-0001-fix-cmake-project.patch b/recipes/minizip-ng/all/patches/3.0.1-0001-fix-cmake-project.patch deleted file mode 100644 index c44b1784ce620..0000000000000 --- a/recipes/minizip-ng/all/patches/3.0.1-0001-fix-cmake-project.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -63,10 +63,10 @@ endif() - # BZIP2_ROOT - Parent directory of BZip2 installation - # OPENSSL_ROOT - Parent directory of OpenSSL installation - --enable_language(C) - - # Library version - set(VERSION "3.0.1") -+project(minizip${MZ_PROJECT_SUFFIX} VERSION ${VERSION} LANGUAGES C) - - # API version - set(SOVERSION "3.0") -@@ -677,7 +677,6 @@ endif() - list(APPEND MINIZIP_INC ${CMAKE_CURRENT_SOURCE_DIR}) - - # Create minizip library --project(minizip${MZ_PROJECT_SUFFIX} VERSION ${VERSION}) - - if(NOT ${MZ_PROJECT_SUFFIX} STREQUAL "") - message(STATUS "Project configured as ${PROJECT_NAME}") diff --git a/recipes/minizip-ng/all/patches/3.0.2-0001-fix-cmake-project.patch b/recipes/minizip-ng/all/patches/3.0.2-0001-fix-cmake-project.patch deleted file mode 100644 index 8cfa267f8cff7..0000000000000 --- a/recipes/minizip-ng/all/patches/3.0.2-0001-fix-cmake-project.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -63,10 +63,10 @@ endif() - # BZIP2_ROOT - Parent directory of BZip2 installation - # OPENSSL_ROOT - Parent directory of OpenSSL installation - --enable_language(C) - - # Library version - set(VERSION "3.0.2") -+project(minizip${MZ_PROJECT_SUFFIX} VERSION ${VERSION} LANGUAGES C) - - # API version - set(SOVERSION "3.0") -@@ -681,7 +681,6 @@ endif() - list(APPEND MINIZIP_INC ${CMAKE_CURRENT_SOURCE_DIR}) - - # Create minizip library --project(minizip${MZ_PROJECT_SUFFIX} VERSION ${VERSION}) - - if(NOT ${MZ_PROJECT_SUFFIX} STREQUAL "") - message(STATUS "Project configured as ${PROJECT_NAME}") diff --git a/recipes/minizip-ng/all/patches/3.0.3-0001-fix-cmake-project.patch b/recipes/minizip-ng/all/patches/3.0.3-0001-fix-cmake-project.patch deleted file mode 100644 index 484eb23a91671..0000000000000 --- a/recipes/minizip-ng/all/patches/3.0.3-0001-fix-cmake-project.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -63,10 +63,10 @@ endif() - # BZIP2_ROOT - Parent directory of BZip2 installation - # OPENSSL_ROOT - Parent directory of OpenSSL installation - --enable_language(C) - - # Library version - set(VERSION "3.0.3") -+project(minizip${MZ_PROJECT_SUFFIX} VERSION ${VERSION} LANGUAGES C) - - # API version - set(SOVERSION "3") -@@ -681,7 +681,6 @@ endif() - list(APPEND MINIZIP_INC ${CMAKE_CURRENT_SOURCE_DIR}) - - # Create minizip library --project(minizip${MZ_PROJECT_SUFFIX} VERSION ${VERSION}) - - if(NOT ${MZ_PROJECT_SUFFIX} STREQUAL "") - message(STATUS "Project configured as ${PROJECT_NAME}") diff --git a/recipes/minizip-ng/config.yml b/recipes/minizip-ng/config.yml index 85231c7536268..b2948c58fb880 100644 --- a/recipes/minizip-ng/config.yml +++ b/recipes/minizip-ng/config.yml @@ -1,4 +1,6 @@ versions: + "4.0.1": + folder: all "4.0.0": folder: all "3.0.9": @@ -13,9 +15,3 @@ versions: folder: all "3.0.4": folder: all - "3.0.3": - folder: all - "3.0.2": - folder: all - "3.0.1": - folder: all From c110531128f32a5fd72eb40fc134e3ebfba4232b Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 9 Aug 2023 01:43:03 +0900 Subject: [PATCH 120/637] (#19020) quill: add version 3.3.1 --- recipes/quill/all/conandata.yml | 3 +++ recipes/quill/all/test_package/CMakeLists.txt | 4 ++++ recipes/quill/all/test_package/test_package.cpp | 8 ++++++++ recipes/quill/config.yml | 2 ++ 4 files changed, 17 insertions(+) diff --git a/recipes/quill/all/conandata.yml b/recipes/quill/all/conandata.yml index d0c356569441c..bb2b9571b97fb 100644 --- a/recipes/quill/all/conandata.yml +++ b/recipes/quill/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "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" diff --git a/recipes/quill/all/test_package/CMakeLists.txt b/recipes/quill/all/test_package/CMakeLists.txt index d53c2b924044a..b6b657d776df5 100644 --- a/recipes/quill/all/test_package/CMakeLists.txt +++ b/recipes/quill/all/test_package/CMakeLists.txt @@ -10,3 +10,7 @@ if(quill_VERSION VERSION_GREATER_EQUAL "2.0.0") 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/all/test_package/test_package.cpp b/recipes/quill/all/test_package/test_package.cpp index ab2f3ef6f2de8..b02a6dd344b06 100644 --- a/recipes/quill/all/test_package/test_package.cpp +++ b/recipes/quill/all/test_package/test_package.cpp @@ -3,7 +3,15 @@ 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"); diff --git a/recipes/quill/config.yml b/recipes/quill/config.yml index d8522cb2854c6..6c3cb17b45637 100644 --- a/recipes/quill/config.yml +++ b/recipes/quill/config.yml @@ -1,4 +1,6 @@ versions: + "3.3.1": + folder: "all" "3.2.0": folder: "all" "3.1.0": From 4e10ea1897c7bd98cad8e12bf8f5cbb5e25988a1 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 9 Aug 2023 04:21:32 +0900 Subject: [PATCH 121/637] (#19069) asio-grpc: add version 2.6.0 --- recipes/asio-grpc/all/conandata.yml | 3 +++ recipes/asio-grpc/all/conanfile.py | 2 +- recipes/asio-grpc/config.yml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/asio-grpc/all/conandata.yml b/recipes/asio-grpc/all/conandata.yml index 2e070194bef3f..93b16454d2a6d 100644 --- a/recipes/asio-grpc/all/conandata.yml +++ b/recipes/asio-grpc/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.6.0": + url: "https://github.com/Tradias/asio-grpc/archive/refs/tags/v2.6.0.tar.gz" + sha256: "9f17f1dfe390667c71d8e0645937afa36f1a0e146f60f6036c7b4e12b09ed14e" "2.5.1": url: "https://github.com/Tradias/asio-grpc/archive/refs/tags/v2.5.1.tar.gz" sha256: "571779a25be6eed77a345088e3ded2cccf880c16800ee0075ece57116f14fc35" diff --git a/recipes/asio-grpc/all/conanfile.py b/recipes/asio-grpc/all/conanfile.py index a0e6d608281c4..b49ad78283c25 100644 --- a/recipes/asio-grpc/all/conanfile.py +++ b/recipes/asio-grpc/all/conanfile.py @@ -60,7 +60,7 @@ def requirements(self): if self._local_allocator_option == "boost_container" or self.options.backend == "boost": self.requires("boost/1.82.0") if self.options.backend == "asio": - self.requires("asio/1.28.0") + self.requires("asio/1.28.1") if self.options.backend == "unifex": self.requires("libunifex/cci.20220430") diff --git a/recipes/asio-grpc/config.yml b/recipes/asio-grpc/config.yml index 9952741d8464d..5c9bbc56f454e 100644 --- a/recipes/asio-grpc/config.yml +++ b/recipes/asio-grpc/config.yml @@ -1,4 +1,6 @@ versions: + "2.6.0": + folder: all "2.5.1": folder: all "2.4.0": From 4a565cec2909255fea330c92b33858ed25e2dbf0 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 8 Aug 2023 22:33:12 +0200 Subject: [PATCH 122/637] (#19093) [proj] Bump libcurl version Signed-off-by: Uilian Ries --- recipes/proj/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/proj/all/conanfile.py b/recipes/proj/all/conanfile.py index e5322b9f644f0..9afbca02d3ff6 100644 --- a/recipes/proj/all/conanfile.py +++ b/recipes/proj/all/conanfile.py @@ -61,7 +61,7 @@ def requirements(self): if self.options.get_safe("with_tiff"): self.requires("libtiff/4.5.1") if self.options.get_safe("with_curl"): - self.requires("libcurl/8.0.1") + self.requires("libcurl/8.2.0") def build_requirements(self): if not can_run(self): From 9f96ee436d2af9ee5c15fbf2af10796eaaa92c80 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 8 Aug 2023 23:49:21 +0200 Subject: [PATCH 123/637] (#19064) cmake: add 3.27.1 --- recipes/cmake/binary/conandata.yml | 19 +++++++++++++++++++ recipes/cmake/config.yml | 18 ++++++++++-------- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/recipes/cmake/binary/conandata.yml b/recipes/cmake/binary/conandata.yml index c9e3ccde2563d..a778631e96cba 100644 --- a/recipes/cmake/binary/conandata.yml +++ b/recipes/cmake/binary/conandata.yml @@ -1,4 +1,23 @@ sources: + "3.27.1": + Linux: + armv8: + url: "https://cmake.org/files/v3.27/cmake-3.27.1-linux-aarch64.tar.gz" + sha256: "812e32b569bcfb61f5ededdec244c4fddcd18d2c352a902ef88ed7d02005b2bd" + x86_64: + url: "https://cmake.org/files/v3.27/cmake-3.27.1-linux-x86_64.tar.gz" + sha256: "9fef63e1cf87cab1153f9433045df2e43c336e462518b0f5e52d2cc91d762cff" + Macos: + universal: + url: "https://cmake.org/files/v3.27/cmake-3.27.1-macos10.10-universal.tar.gz" + sha256: "3f9b1b6c29369d2b4e71991420966599a378b01f84e6420d5e881946a04debed" + Windows: + armv8: + url: "https://cmake.org/files/v3.27/cmake-3.27.1-windows-arm64.zip" + sha256: "588576bd73f20a851de053571a3ccb9bfe28446b5952ea62918dd273da608183" + x86_64: + url: "https://cmake.org/files/v3.27/cmake-3.27.1-windows-x86_64.zip" + sha256: "664fe1655999f0b693d1e64ddb430191c727ab0a03dc1da7278f291172e1e04e" "3.27.0": Linux: armv8: diff --git a/recipes/cmake/config.yml b/recipes/cmake/config.yml index 0ed8eb6281e81..4a1e12b81255f 100644 --- a/recipes/cmake/config.yml +++ b/recipes/cmake/config.yml @@ -1,19 +1,21 @@ versions: - "3.19.8": + "3.27.1": folder: "binary" - "3.20.6": + "3.27.0": folder: "binary" - "3.21.7": + "3.26.4": folder: "binary" - "3.22.6": + "3.25.3": + folder: "binary" + "3.24.4": folder: "binary" "3.23.5": folder: "binary" - "3.24.4": + "3.22.6": folder: "binary" - "3.25.3": + "3.21.7": folder: "binary" - "3.26.4": + "3.20.6": folder: "binary" - "3.27.0": + "3.19.8": folder: "binary" From 0238c2b1dfb76814b4ea0c602846df05862ad228 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Wed, 9 Aug 2023 00:32:01 +0200 Subject: [PATCH 124/637] (#19091) [sentry-breakpad] bump libcurl to 8.2.0 --- recipes/sentry-crashpad/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/sentry-crashpad/all/conanfile.py b/recipes/sentry-crashpad/all/conanfile.py index 645ba8aaf554d..af63a7ade4f9d 100644 --- a/recipes/sentry-crashpad/all/conanfile.py +++ b/recipes/sentry-crashpad/all/conanfile.py @@ -62,7 +62,7 @@ def build_requirements(self): def requirements(self): self.requires("zlib/1.2.13") if self.settings.os in ("Linux", "FreeBSD"): - self.requires("libcurl/8.1.2") + self.requires("libcurl/8.2.0") if self.options.get_safe("with_tls"): self.requires("openssl/[>=1.1 <4]") From 61ec603a9f2122621fec76bc9288080d0d200d04 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 9 Aug 2023 03:05:59 +0300 Subject: [PATCH 125/637] (#18081) systemc: migrate to Conan v2 * systemc: migrate to Conan v2 * systemc: restore test_v1_package * systemc: add exception for GCC v5 * systemc: don not set cxx_std_11 --------- Co-authored-by: James --- recipes/systemc/all/CMakeLists.txt | 7 -- recipes/systemc/all/conandata.yml | 6 - recipes/systemc/all/conanfile.py | 119 +++++++++--------- recipes/systemc/all/patches/0001-cmake.patch | 8 +- recipes/systemc/all/patches/0004-cmake.patch | 8 +- .../systemc/all/test_package/CMakeLists.txt | 5 +- recipes/systemc/all/test_package/conanfile.py | 21 +++- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../systemc/all/test_v1_package/conanfile.py | 17 +++ 9 files changed, 103 insertions(+), 96 deletions(-) delete mode 100644 recipes/systemc/all/CMakeLists.txt create mode 100644 recipes/systemc/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/systemc/all/test_v1_package/conanfile.py diff --git a/recipes/systemc/all/CMakeLists.txt b/recipes/systemc/all/CMakeLists.txt deleted file mode 100644 index bd3083b512cb9..0000000000000 --- a/recipes/systemc/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory(source_subfolder) diff --git a/recipes/systemc/all/conandata.yml b/recipes/systemc/all/conandata.yml index db213ca0aa834..234032a9f92d2 100644 --- a/recipes/systemc/all/conandata.yml +++ b/recipes/systemc/all/conandata.yml @@ -8,15 +8,9 @@ sources: patches: "2.3.3": - patch_file: "patches/0001-cmake.patch" - base_path: "source_subfolder" - patch_file: "patches/0002-sc_string_view.patch" - base_path: "source_subfolder" - patch_file: "patches/0003-mingw.patch" - base_path: "source_subfolder" "2.3.4": - patch_file: "patches/0002-sc_string_view.patch" - base_path: "source_subfolder" - patch_file: "patches/0003-mingw.patch" - base_path: "source_subfolder" - patch_file: "patches/0004-cmake.patch" - base_path: "source_subfolder" diff --git a/recipes/systemc/all/conanfile.py b/recipes/systemc/all/conanfile.py index e65862f8bd94b..60fb8e631adf2 100644 --- a/recipes/systemc/all/conanfile.py +++ b/recipes/systemc/all/conanfile.py @@ -1,20 +1,25 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration -import functools +from conan import ConanFile, conan_version +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version import os -required_conan_version = ">=1.43.0" +required_conan_version = ">=1.53.0" class SystemcConan(ConanFile): name = "systemc" - description = """SystemC is a set of C++ classes and macros which provide - an event-driven simulation interface.""" - homepage = "https://www.accellera.org/" - url = "https://github.com/conan-io/conan-center-index" + description = ("SystemC is a set of C++ classes and macros which provide " + "an event-driven simulation interface.") license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.accellera.org/" topics = ("simulation", "modeling", "esl", "tlm") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -33,7 +38,7 @@ class SystemcConan(ConanFile): "fPIC": True, "disable_async_updates": False, "disable_copyright_msg": False, - "disable_virtual_bind": False, + "disable_virtual_bind": False, "enable_assertions": True, "enable_immediate_self_notifications": False, "enable_pthreads": False, @@ -41,85 +46,81 @@ class SystemcConan(ConanFile): "enable_phase_callbacks_tracing": False, } - generators = "cmake" - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _is_msvc(self): - return str(self.settings.compiler) in ["Visual Studio", "msvc"] - def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - del self.options.enable_pthreads + self.options.rm_safe("enable_pthreads") 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 validate(self): - if self.settings.os == "Macos": + if is_apple_os(self): raise ConanInvalidConfiguration("Macos build not supported") if self.settings.os == "Windows" and self.options.shared: - raise ConanInvalidConfiguration("Building SystemC as a shared library on Windows is currently not supported") + raise ConanInvalidConfiguration( + "Building SystemC as a shared library on Windows is currently not supported" + ) + + if ( + conan_version.major == 1 + and self.settings.compiler == "gcc" + and Version(self.settings.compiler.version) <= "5" + ): + raise ConanInvalidConfiguration( + f"GCC {self.settings.compiler.version} is not supported by SystemC on Conan v1" + ) def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["DISABLE_ASYNC_UPDATES"] = self.options.disable_async_updates + tc.variables["DISABLE_COPYRIGHT_MESSAGE"] = self.options.disable_copyright_msg + tc.variables["DISABLE_VIRTUAL_BIND"] = self.options.disable_virtual_bind + tc.variables["ENABLE_ASSERTIONS"] = self.options.enable_assertions + tc.variables["ENABLE_IMMEDIATE_SELF_NOTIFICATIONS"] = self.options.enable_immediate_self_notifications + tc.variables["ENABLE_PTHREADS"] = self.options.get_safe("enable_pthreads", False) + tc.variables["ENABLE_PHASE_CALLBACKS"] = self.options.get_safe("enable_phase_callbacks", False) + tc.variables["ENABLE_PHASE_CALLBACKS_TRACING"] = self.options.get_safe("enable_phase_callbacks_tracing", False) + tc.generate() - @functools.lru_cache(1) - def _configure_cmake(self): + def build(self): + apply_conandata_patches(self) cmake = CMake(self) - cmake.definitions["DISABLE_ASYNC_UPDATES"] = \ - self.options.disable_async_updates - cmake.definitions["DISABLE_COPYRIGHT_MESSAGE"] = \ - self.options.disable_copyright_msg - cmake.definitions["DISABLE_VIRTUAL_BIND"] = \ - self.options.disable_virtual_bind - cmake.definitions["ENABLE_ASSERTIONS"] = \ - self.options.enable_assertions - cmake.definitions["ENABLE_IMMEDIATE_SELF_NOTIFICATIONS"] = \ - self.options.enable_immediate_self_notifications - cmake.definitions["ENABLE_PTHREADS"] = \ - self.options.get_safe("enable_pthreads", False) - cmake.definitions["ENABLE_PHASE_CALLBACKS"] = \ - self.options.get_safe("enable_phase_callbacks", False) - cmake.definitions["ENABLE_PHASE_CALLBACKS_TRACING"] = \ - self.options.get_safe("enable_phase_callbacks_tracing", False) cmake.configure() - return cmake - - def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() cmake.build() def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - self.copy("NOTICE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + copy(self, "NOTICE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) - tools.rmdir(os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "SystemCLanguage") self.cpp_info.set_property("cmake_target_name", "SystemC::systemc") + # TODO: back to global scope in conan v2 once cmake_find_package* generators removed self.cpp_info.components["_systemc"].libs = ["systemc"] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["_systemc"].system_libs = ["pthread"] - if self._is_msvc: + self.cpp_info.components["_systemc"].system_libs = ["pthread", "m"] + if is_msvc(self): self.cpp_info.components["_systemc"].cxxflags.append("/vmg") # TODO: to remove in conan v2 once cmake_find_package* generators removed diff --git a/recipes/systemc/all/patches/0001-cmake.patch b/recipes/systemc/all/patches/0001-cmake.patch index 46f27b30da924..3598e00cb51a5 100644 --- a/recipes/systemc/all/patches/0001-cmake.patch +++ b/recipes/systemc/all/patches/0001-cmake.patch @@ -1,6 +1,6 @@ --- CMakeLists.txt +++ CMakeLists.txt -@@ -273,12 +273,12 @@ +@@ -273,12 +273,6 @@ FORCE) endif (NOT CMAKE_BUILD_TYPE) @@ -10,12 +10,6 @@ - "The with CMAKE_CXX_STANDARD selected C++ standard is a requirement.") -mark_as_advanced (CMAKE_CXX_STANDARD_REQUIRED) - -+#set (CMAKE_CXX_STANDARD 98 CACHE STRING -+# "C++ standard to build all targets. Supported values are 98, 11, and 14.") -+#set (CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL -+# "The with CMAKE_CXX_STANDARD selected C++ standard is a requirement.") -+#mark_as_advanced (CMAKE_CXX_STANDARD_REQUIRED) -+# if (NOT (WIN32 OR CYGWIN)) option (BUILD_SHARED_LIBS "Build shared libraries." ON) else (NOT (WIN32 OR CYGWIN)) diff --git a/recipes/systemc/all/patches/0004-cmake.patch b/recipes/systemc/all/patches/0004-cmake.patch index 83eead38732bc..5c4004ed81fc2 100644 --- a/recipes/systemc/all/patches/0004-cmake.patch +++ b/recipes/systemc/all/patches/0004-cmake.patch @@ -1,6 +1,6 @@ --- CMakeLists.txt +++ CMakeLists.txt -@@ -277,12 +277,12 @@ +@@ -277,12 +277,6 @@ FORCE) endif (NOT CMAKE_BUILD_TYPE) @@ -10,12 +10,6 @@ - "The with CMAKE_CXX_STANDARD selected C++ standard is a requirement.") -mark_as_advanced (CMAKE_CXX_STANDARD_REQUIRED) - -+#set (CMAKE_CXX_STANDARD 98 CACHE STRING -+# "C++ standard to build all targets. Supported values are 98, 11, 14, and 17.") -+#set (CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL -+# "The with CMAKE_CXX_STANDARD selected C++ standard is a requirement.") -+#mark_as_advanced (CMAKE_CXX_STANDARD_REQUIRED) -+# if (NOT (WIN32 OR CYGWIN)) option (BUILD_SHARED_LIBS "Build shared libraries." ON) else (NOT (WIN32 OR CYGWIN)) diff --git a/recipes/systemc/all/test_package/CMakeLists.txt b/recipes/systemc/all/test_package/CMakeLists.txt index 5d31301bc9ee2..86a595ce48e9a 100644 --- a/recipes/systemc/all/test_package/CMakeLists.txt +++ b/recipes/systemc/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(SystemCLanguage REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/systemc/all/test_package/conanfile.py b/recipes/systemc/all/test_package/conanfile.py index 49a3a66ea5bad..ef5d7042163ec 100644 --- a/recipes/systemc/all/test_package/conanfile.py +++ b/recipes/systemc/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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -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/systemc/all/test_v1_package/CMakeLists.txt b/recipes/systemc/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/systemc/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/systemc/all/test_v1_package/conanfile.py b/recipes/systemc/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/systemc/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + 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) From 88c385576f6c0a4cad20a56c6c14d2769bf33cb1 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 9 Aug 2023 02:39:56 +0200 Subject: [PATCH 126/637] (#19099) zookeeper-client-c: use stable url for tarball of source code --- recipes/zookeeper-client-c/all/conandata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/zookeeper-client-c/all/conandata.yml b/recipes/zookeeper-client-c/all/conandata.yml index 5a209ac187af0..f81d1f4e6d34f 100644 --- a/recipes/zookeeper-client-c/all/conandata.yml +++ b/recipes/zookeeper-client-c/all/conandata.yml @@ -1,6 +1,6 @@ sources: "3.8.1": - url: "https://dlcdn.apache.org/zookeeper/zookeeper-3.8.1/apache-zookeeper-3.8.1.tar.gz" + url: "https://archive.apache.org/dist/zookeeper/zookeeper-3.8.1/apache-zookeeper-3.8.1.tar.gz" sha256: "ccc16850c8ab2553583583234d11c813061b5ea5f3b8ff1d740cde6c1fd1e219" patches: "3.8.1": From d6e70e93f154cf014117e2903b54dede76266411 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Wed, 9 Aug 2023 02:50:00 +0200 Subject: [PATCH 127/637] (#19105) meson: add version 1.2.1 Generated and committed by [Conan Center Bot](https://github.com/qchateau/conan-center-bot) Find more updatable recipes in the [GitHub Pages](https://qchateau.github.io/conan-center-bot/) Co-authored-by: Quentin Chateau via Conan Center Bot --- 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 df69b3c1b2cb9..17f050a573292 100644 --- a/recipes/meson/all/conandata.yml +++ b/recipes/meson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.1": + url: "https://github.com/mesonbuild/meson/releases/download/1.2.1/meson-1.2.1.tar.gz" + sha256: "b1db3a153087549497ee52b1c938d2134e0338214fe14f7efd16fecd57b639f5" "1.2.0": url: "https://github.com/mesonbuild/meson/archive/1.2.0.tar.gz" sha256: "603489f0aaa6305f806c6cc4a4455a965f22290fc74f65871f589b002110c790" diff --git a/recipes/meson/config.yml b/recipes/meson/config.yml index b926152e71ae8..785517ff377e8 100644 --- a/recipes/meson/config.yml +++ b/recipes/meson/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.1": + folder: all "1.2.0": folder: all "1.1.1": From 1023c443c01ebb21b6f20417a06fab9ab0a1c2ad Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Wed, 9 Aug 2023 03:30:59 +0200 Subject: [PATCH 128/637] (#19106) libgeotiff: bump deps --- recipes/libgeotiff/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libgeotiff/all/conanfile.py b/recipes/libgeotiff/all/conanfile.py index 4125b818ee21d..74323fd2d39a0 100644 --- a/recipes/libgeotiff/all/conanfile.py +++ b/recipes/libgeotiff/all/conanfile.py @@ -45,7 +45,7 @@ def layout(self): def requirements(self): # libgeotiff/include/xtiffio.h includes libtiff/include/tiffio.h self.requires("libtiff/4.5.1", transitive_headers=True, transitive_libs=True) - self.requires("proj/9.1.1") + self.requires("proj/9.2.1") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From b6bf78a15124bcf90591baa19ed89793bbe746c0 Mon Sep 17 00:00:00 2001 From: Esteban Dugueperoux <43169544+EstebanDugueperoux2@users.noreply.github.com> Date: Wed, 9 Aug 2023 08:12:27 +0200 Subject: [PATCH 129/637] (#19102) Add libsvtav1/1.6.0 --- recipes/libsvtav1/all/conandata.yml | 3 +++ recipes/libsvtav1/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/libsvtav1/all/conandata.yml b/recipes/libsvtav1/all/conandata.yml index 74d595eb1046f..116460d8d2500 100644 --- a/recipes/libsvtav1/all/conandata.yml +++ b/recipes/libsvtav1/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.6.0": + url: https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.6.0/SVT-AV1-v1.6.0.tar.bz2 + sha256: c6b49111a2d4c5113f1ada0c2f716d94bd4a8db704623d453066826401ecdab5 "1.4.1": url: https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.4.1/SVT-AV1-v1.4.1.tar.bz2 sha256: 0e988582f315fe76c909accf5e7f81b975c5bd2b850ee760d8e9fac297f70b5d diff --git a/recipes/libsvtav1/config.yml b/recipes/libsvtav1/config.yml index 37cfc8825c04f..e7e0786241704 100644 --- a/recipes/libsvtav1/config.yml +++ b/recipes/libsvtav1/config.yml @@ -1,4 +1,6 @@ versions: + "1.6.0": + folder: all "1.4.1": folder: all "1.3.0": From c4ca097e9ef0e863b04f9107b00bf767f6be6cde Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 9 Aug 2023 16:09:24 +0900 Subject: [PATCH 130/637] (#18910) libmysqlclient: add version 8.0.34 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * libmysqlclient: add version 8.0.34 * update openssl --------- Co-authored-by: Rubén Rincón Blanco --- recipes/libmysqlclient/all/conandata.yml | 7 +++++++ recipes/libmysqlclient/all/conanfile.py | 25 +++++++++++++----------- recipes/libmysqlclient/config.yml | 2 ++ 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/recipes/libmysqlclient/all/conandata.yml b/recipes/libmysqlclient/all/conandata.yml index 7533ad1b401d8..6ace30de16974 100644 --- a/recipes/libmysqlclient/all/conandata.yml +++ b/recipes/libmysqlclient/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "8.0.34": + url: "https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.34.tar.gz" + sha256: "e65d03a3c42618b5fbf99042aed33209402e9b27aa62c7c8743ffd4788d8db1d" "8.0.31": url: "https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.31.tar.gz" sha256: "67bb8cba75b28e95c7f7948563f01fb84528fcbb1a35dba839d4ce44fe019baa" @@ -9,6 +12,10 @@ sources: url: "https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.25.tar.gz" sha256: "c16aa9cf621bc028efba2bb11f3c36a323b125fa0d108ff92fab60e46309206e" patches: + "8.0.34": + - patch_file: "patches/0006-fix-cpp20-build-8.0.29.patch" + patch_description: "Fix C++20 compilation" + patch_type: "portability" "8.0.31": - patch_file: "patches/0006-fix-cpp20-build-8.0.29.patch" patch_description: "Fix C++20 compilation" diff --git a/recipes/libmysqlclient/all/conanfile.py b/recipes/libmysqlclient/all/conanfile.py index 46f8df1537d5e..ba135f46de785 100644 --- a/recipes/libmysqlclient/all/conanfile.py +++ b/recipes/libmysqlclient/all/conanfile.py @@ -63,7 +63,7 @@ def layout(self): def requirements(self): if Version(self.version) < "8.0.30": - self.requires("openssl/1.1.1t") + self.requires("openssl/1.1.1u") else: self.requires("openssl/[>=1.1 <4]") self.requires("zlib/1.2.13") @@ -127,14 +127,14 @@ def _patch_sources(self): f"# WARN_MISSING_SYSTEM_{lib.upper()}({lib.upper()}_WARN_GIVEN)", strict=False) - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), - f"SET({lib.upper()}_WARN_GIVEN)", - f"# SET({lib.upper()}_WARN_GIVEN)", - strict=False) + if lib != "libevent" or Version(self.version) < "8.0.34": + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + f"SET({lib.upper()}_WARN_GIVEN)", + f"# SET({lib.upper()}_WARN_GIVEN)", + strict=False) rmdir(self, os.path.join(self.source_folder, "extra")) for folder in ["client", "man", "mysql-test", "libbinlogstandalone"]: - rmdir(self, os.path.join(self.source_folder, folder)) replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), f"ADD_SUBDIRECTORY({folder})\n", "", @@ -147,9 +147,10 @@ def _patch_sources(self): strict=False) # Upstream does not actually load lz4 directories for system, force it to - replace_in_file(self, os.path.join(self.source_folder, "libbinlogevents", "CMakeLists.txt"), - "INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/libbinlogevents/include)", - "MY_INCLUDE_SYSTEM_DIRECTORIES(LZ4)\nINCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/libbinlogevents/include)") + if Version(self.version) < "8.0.34": + replace_in_file(self, os.path.join(self.source_folder, "libbinlogevents", "CMakeLists.txt"), + "INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/libbinlogevents/include)", + "MY_INCLUDE_SYSTEM_DIRECTORIES(LZ4)\nINCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/libbinlogevents/include)") replace_in_file(self, os.path.join(self.source_folder, "cmake", "zstd.cmake"), "NAMES zstd", @@ -180,7 +181,9 @@ def _patch_sources(self): "if(0)") # Do not copy shared libs of dependencies to package folder - deps_shared = ["SSL", "KERBEROS", "SASL", "LDAP", "PROTOBUF", "CURL"] + deps_shared = ["SSL", "KERBEROS", "SASL", "LDAP", "PROTOBUF"] + if Version(self.version) < "8.0.34": + deps_shared.append("CURL") for dep in deps_shared: replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), f"MYSQL_CHECK_{dep}_DLLS()", @@ -211,7 +214,7 @@ def generate(self): tc.cache_variables["ENABLED_PROFILING"] = False tc.cache_variables["MYSQL_MAINTAINER_MODE"] = False tc.cache_variables["WIX_DIR"] = False - # Disable additional Linux distro-specific compiler checks. + # Disable additional Linux distro-specific compiler checks. # The recipe already checks for minimum versions of supported # compilers. tc.cache_variables["FORCE_UNSUPPORTED_COMPILER"] = True diff --git a/recipes/libmysqlclient/config.yml b/recipes/libmysqlclient/config.yml index d2183e51a5f3c..7df89d243f495 100644 --- a/recipes/libmysqlclient/config.yml +++ b/recipes/libmysqlclient/config.yml @@ -1,4 +1,6 @@ versions: + "8.0.34": + folder: all "8.0.31": folder: all "8.0.30": From 3d75d65d19ee7e406f669a51ff40e8ffac208efe Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Wed, 9 Aug 2023 09:48:30 +0200 Subject: [PATCH 131/637] (#18697) qt 6.5.2 * qt 6.5.2 generated with: conan config install https://github.com/conan-io/conan-extensions.git conan cci:upgrade-qt-recipe 6.5.2 * remove qt 6.4.1 --- recipes/qt/6.x.x/conandata.yml | 39 +-- recipes/qt/6.x.x/patches/3801bba82.patch | 27 -- recipes/qt/6.x.x/qtmodules6.5.2.conf | 331 +++++++++++++++++++++++ recipes/qt/config.yml | 4 +- 4 files changed, 347 insertions(+), 54 deletions(-) delete mode 100644 recipes/qt/6.x.x/patches/3801bba82.patch create mode 100644 recipes/qt/6.x.x/qtmodules6.5.2.conf diff --git a/recipes/qt/6.x.x/conandata.yml b/recipes/qt/6.x.x/conandata.yml index fc7a158ca9517..ed9afdd80458b 100644 --- a/recipes/qt/6.x.x/conandata.yml +++ b/recipes/qt/6.x.x/conandata.yml @@ -1,4 +1,14 @@ sources: + "6.5.2": + url: + - "https://download.qt.io/official_releases/qt/6.5/6.5.2/single/qt-everywhere-src-6.5.2.tar.xz" + - "https://download.qt.io/archive/qt/6.5/6.5.2/single/qt-everywhere-src-6.5.2.tar.xz" + - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.5/6.5.2/single/qt-everywhere-src-6.5.2.tar.xz" + - "https://qt-mirror.dannhauer.de/archive/qt/6.5/6.5.2/single/qt-everywhere-src-6.5.2.tar.xz" + - "https://master.qt.io/archive/qt/6.5/6.5.2/single/qt-everywhere-src-6.5.2.tar.xz" + - "https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/6.5/6.5.2/single/qt-everywhere-src-6.5.2.tar.xz" + - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/6.5/6.5.2/single/qt-everywhere-src-6.5.2.tar.xz" + sha256: "cde57be663d0f875759797298bdc37a936d517c39f2013e4e6ece5e12edeed12" "6.5.1": url: - "https://download.qt.io/official_releases/qt/6.5/6.5.1/single/qt-everywhere-src-6.5.1.tar.xz" @@ -45,14 +55,6 @@ sources: - "https://ftp.fau.de/qtproject/archive/qt/6.4/6.4.2/single/qt-everywhere-src-6.4.2.tar.xz" - "https://mirrors.ustc.edu.cn/qtproject/archive/qt/6.4/6.4.2/single/qt-everywhere-src-6.4.2.tar.xz" sha256: "689f53e6652da82fccf7c2ab58066787487339f28d1ec66a8765ad357f4976be" - "6.4.1": - url: - - "https://download.qt.io/archive/qt/6.4/6.4.1/single/qt-everywhere-src-6.4.1.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/6.4/6.4.1/single/qt-everywhere-src-6.4.1.tar.xz" - - "https://www.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/6.4/6.4.1/single/qt-everywhere-src-6.4.1.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/6.4/6.4.1/single/qt-everywhere-src-6.4.1.tar.xz" - - "https://mirrors.ustc.edu.cn/qtproject/archive/qt/6.4/6.4.1/single/qt-everywhere-src-6.4.1.tar.xz" - sha256: "e20b850b6134098a7f2e7701cfddfb213c6cf394b9e848e6fbc5b0e89dcfcc09" "6.3.2": url: - "https://download.qt.io/archive/qt/6.3/6.3.2/single/qt-everywhere-src-6.3.2.tar.xz" @@ -62,6 +64,10 @@ sources: - "https://mirrors.ustc.edu.cn/qtproject/archive/qt/6.3/6.3.2/single/qt-everywhere-src-6.3.2.tar.xz" sha256: "b90524f686224a0e5a945c1d65307e16a375348dbe275c9ac11de171fe31374a" patches: + "6.5.2": + - "base_path": "qtwebengine" + "patch_description": "Workaround for too long .rps file name" + "patch_file": "patches/c72097e.diff" "6.5.1": - base_path: "qtwebengine" patch_description: "Workaround for too long .rps file name" @@ -88,23 +94,6 @@ patches: patch_description: "Fix PCRE2 detection" patch_type: "bugfix" patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/445885" - "6.4.1": - - base_path: "qtbase/cmake" - patch_description: "Fix pri helpers" - patch_file: "patches/qt6-pri-helpers-fix.diff" - - patch_file: "patches/c72097e.diff" - base_path: "qtwebengine" - patch_description: "Workaround for too long .rps file name" - - patch_file: "patches/d13958d.diff" - base_path: "qtbase" - patch_description: "Fix PCRE2 detection" - patch_type: "bugfix" - patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/445885" - - patch_file: "patches/3801bba82.patch" - base_path: "qtwebengine/src/3rdparty" - patch_description: "fix qtwebengine with MSVC2022" - patch_type: "portability" - patch_source: "https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/444132" "6.3.2": - base_path: "qtbase/cmake" patch_description: "Fix pri helpers" diff --git a/recipes/qt/6.x.x/patches/3801bba82.patch b/recipes/qt/6.x.x/patches/3801bba82.patch deleted file mode 100644 index 79b347ce90a23..0000000000000 --- a/recipes/qt/6.x.x/patches/3801bba82.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 3801bba822bf88c202a348d3e01dd493c0ca0551 Mon Sep 17 00:00:00 2001 -From: Nadim Asaduzzaman -Date: Fri, 18 Nov 2022 04:34:38 -0700 -Subject: [PATCH] skia: fix compilation with MSVC2022 - -compilation with MSVC2022 failed due to missing string definition within std namespace - -Fixes: QTBUG-108532 -Change-Id: I2119952d5809895e2511ce1c2c262022af3ba191 -Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/444132 -Reviewed-by: Allan Sandfeld Jensen ---- - chromium/third_party/skia/src/core/SkShaderCodeDictionary.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/chromium/third_party/skia/src/core/SkShaderCodeDictionary.h b/chromium/third_party/skia/src/core/SkShaderCodeDictionary.h -index 3a54bbe22e7..8612a469862 100644 ---- a/chromium/third_party/skia/src/core/SkShaderCodeDictionary.h -+++ b/chromium/third_party/skia/src/core/SkShaderCodeDictionary.h -@@ -9,6 +9,7 @@ - #define SkShaderCodeDictionary_DEFINED - - #include -+#include - #include - #include - #include "include/core/SkSpan.h" diff --git a/recipes/qt/6.x.x/qtmodules6.5.2.conf b/recipes/qt/6.x.x/qtmodules6.5.2.conf new file mode 100644 index 0000000000000..b8053b7bdfcc3 --- /dev/null +++ b/recipes/qt/6.x.x/qtmodules6.5.2.conf @@ -0,0 +1,331 @@ +[submodule "qtbase"] + path = qtbase + url = ../qtbase.git + branch = 6.5.2 + status = essential +[submodule "qtsvg"] + depends = qtbase + path = qtsvg + url = ../qtsvg.git + branch = 6.5.2 + status = addon +[submodule "qtdeclarative"] + depends = qtbase + recommends = qtimageformats qtshadertools qtsvg qtlanguageserver + path = qtdeclarative + url = ../qtdeclarative.git + branch = 6.5.2 + status = essential +[submodule "qtactiveqt"] + depends = qtbase + path = qtactiveqt + url = ../qtactiveqt.git + branch = 6.5.2 + status = addon +[submodule "qtmultimedia"] + depends = qtbase qtshadertools + recommends = qtdeclarative qtquick3d + path = qtmultimedia + url = ../qtmultimedia.git + branch = 6.5.2 + status = addon +[submodule "qttools"] + depends = qtbase + recommends = qtdeclarative qtactiveqt + path = qttools + url = ../qttools.git + branch = 6.5.2 + status = essential +[submodule "qtxmlpatterns"] + depends = qtbase + recommends = qtdeclarative + path = qtxmlpatterns + url = ../qtxmlpatterns.git + branch = dev + status = ignore +[submodule "qttranslations"] + depends = qttools + path = qttranslations + url = ../qttranslations.git + branch = 6.5.2 + status = essential + priority = 30 +[submodule "qtdoc"] + depends = qtdeclarative qttools + recommends = qtmultimedia qtshadertools qtwebengine + path = qtdoc + url = ../qtdoc.git + branch = 6.5.2 + status = essential + priority = 40 +[submodule "qtrepotools"] + path = qtrepotools + url = ../qtrepotools.git + branch = master + status = essential + project = - +[submodule "qtqa"] + depends = qtbase + path = qtqa + url = ../qtqa.git + branch = dev + status = essential + priority = 50 +[submodule "qtlocation"] + depends = qtbase qtpositioning + recommends = qtdeclarative + path = qtlocation + url = ../qtlocation.git + branch = 6.5.2 + status = preview +[submodule "qtpositioning"] + depends = qtbase + recommends = qtdeclarative qtserialport + path = qtpositioning + url = ../qtpositioning.git + branch = 6.5.2 + status = addon +[submodule "qtsensors"] + depends = qtbase + recommends = qtdeclarative + path = qtsensors + url = ../qtsensors.git + branch = 6.5.2 + status = addon +[submodule "qtsystems"] + depends = qtbase + recommends = qtdeclarative + path = qtsystems + url = ../qtsystems.git + branch = dev + status = ignore +[submodule "qtfeedback"] + depends = qtdeclarative + recommends = qtmultimedia + path = qtfeedback + url = ../qtfeedback.git + branch = master + status = ignore +[submodule "qtpim"] + depends = qtdeclarative + path = qtpim + url = ../qtpim.git + branch = dev + status = ignore +[submodule "qtconnectivity"] + depends = qtbase + recommends = qtdeclarative + path = qtconnectivity + url = ../qtconnectivity.git + branch = 6.5.2 + status = addon +[submodule "qtwayland"] + depends = qtbase + recommends = qtdeclarative + path = qtwayland + url = ../qtwayland.git + branch = 6.5.2 + status = addon +[submodule "qt3d"] + depends = qtbase + recommends = qtdeclarative qtshadertools + path = qt3d + url = ../qt3d.git + branch = 6.5.2 + status = addon +[submodule "qtimageformats"] + depends = qtbase + path = qtimageformats + url = ../qtimageformats.git + branch = 6.5.2 + status = addon +[submodule "qtserialbus"] + depends = qtbase + recommends = qtserialport + path = qtserialbus + url = ../qtserialbus.git + branch = 6.5.2 + status = addon +[submodule "qtserialport"] + depends = qtbase + path = qtserialport + url = ../qtserialport.git + branch = 6.5.2 + status = addon +[submodule "qtwebsockets"] + depends = qtbase + recommends = qtdeclarative + path = qtwebsockets + url = ../qtwebsockets.git + branch = 6.5.2 + status = addon +[submodule "qtwebchannel"] + depends = qtbase + recommends = qtdeclarative qtwebsockets + path = qtwebchannel + url = ../qtwebchannel.git + branch = 6.5.2 + status = addon +[submodule "qtwebengine"] + depends = qtdeclarative + recommends = qtwebchannel qttools qtpositioning + path = qtwebengine + url = ../qtwebengine.git + branch = 6.5.2 + status = addon + priority = 10 +[submodule "qtcanvas3d"] + depends = qtdeclarative + path = qtcanvas3d + url = ../qtcanvas3d.git + branch = dev + status = ignore +[submodule "qtwebview"] + depends = qtdeclarative + recommends = qtwebengine + path = qtwebview + url = ../qtwebview.git + branch = 6.5.2 + status = addon +[submodule "qtcharts"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtcharts + url = ../qtcharts.git + branch = 6.5.2 + status = addon +[submodule "qtdatavis3d"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtdatavis3d + url = ../qtdatavis3d.git + branch = 6.5.2 + status = addon +[submodule "qtvirtualkeyboard"] + depends = qtbase qtdeclarative qtsvg + recommends = qtmultimedia + path = qtvirtualkeyboard + url = ../qtvirtualkeyboard.git + branch = 6.5.2 + status = addon +[submodule "qtgamepad"] + depends = qtbase + recommends = qtdeclarative + path = qtgamepad + url = ../qtgamepad.git + branch = dev + status = ignore +[submodule "qtscxml"] + depends = qtbase qtdeclarative + path = qtscxml + url = ../qtscxml.git + branch = 6.5.2 + status = addon +[submodule "qtspeech"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtspeech + url = ../qtspeech.git + branch = 6.5.2 + status = addon +[submodule "qtnetworkauth"] + depends = qtbase + path = qtnetworkauth + url = ../qtnetworkauth.git + branch = 6.5.2 + status = addon +[submodule "qtremoteobjects"] + depends = qtbase + recommends = qtdeclarative + path = qtremoteobjects + url = ../qtremoteobjects.git + branch = 6.5.2 + status = addon +[submodule "qtwebglplugin"] + depends = qtbase qtwebsockets + recommends = qtdeclarative + path = qtwebglplugin + url = ../qtwebglplugin.git + branch = dev + status = ignore +[submodule "qtlottie"] + depends = qtbase qtdeclarative + path = qtlottie + url = ../qtlottie.git + branch = 6.5.2 + status = addon +[submodule "qtquicktimeline"] + depends = qtbase qtdeclarative + path = qtquicktimeline + url = ../qtquicktimeline + branch = 6.5.2 + status = addon +[submodule "qtquick3d"] + depends = qtbase qtdeclarative qtshadertools + recommends = qtquicktimeline + path = qtquick3d + url = ../qtquick3d.git + branch = 6.5.2 + status = addon +[submodule "qtshadertools"] + depends = qtbase + path = qtshadertools + url = ../qtshadertools.git + branch = 6.5.2 + status = addon +[submodule "qt5compat"] + depends = qtbase qtdeclarative + path = qt5compat + url = ../qt5compat.git + branch = 6.5.2 + status = deprecated +[submodule "qtcoap"] + depends = qtbase + path = qtcoap + url = ../qtcoap.git + branch = 6.5.2 + status = addon +[submodule "qtmqtt"] + depends = qtbase qtdeclarative + path = qtmqtt + url = ../qtmqtt.git + branch = 6.5.2 + status = addon +[submodule "qtopcua"] + depends = qtbase qtdeclarative + path = qtopcua + url = ../qtopcua.git + branch = 6.5.2 + status = addon +[submodule "qtlanguageserver"] + depends = qtbase + path = qtlanguageserver + url = ../qtlanguageserver.git + branch = 6.5.2 + status = preview +[submodule "qthttpserver"] + depends = qtbase + recommends = qtwebsockets + path = qthttpserver + url = ../qthttpserver.git + branch = 6.5.2 + status = preview +[submodule "qtquick3dphysics"] + depends = qtbase qtdeclarative qtquick3d qtshadertools + path = qtquick3dphysics + url = ../qtquick3dphysics.git + branch = 6.5.2 + status = addon +[submodule "qtgrpc"] + depends = qtbase + path = qtgrpc + url = ../qtgrpc.git + branch = 6.5.2 + status = preview +[submodule "qtquickeffectmaker"] + depends = qtbase qtdeclarative qtshadertools + recommends = qtquick3d + path = qtquickeffectmaker + url = ../qtquickeffectmaker.git + branch = 6.5.2 + status = addon diff --git a/recipes/qt/config.yml b/recipes/qt/config.yml index 84b51c6e98dab..6d034f7e11227 100644 --- a/recipes/qt/config.yml +++ b/recipes/qt/config.yml @@ -1,12 +1,12 @@ versions: + "6.5.2": + folder: 6.x.x "6.5.1": folder: 6.x.x "6.5.0": folder: 6.x.x "6.4.2": folder: 6.x.x - "6.4.1": - folder: 6.x.x "6.3.2": folder: 6.x.x "5.15.10": From afaedf634cf90bd11e9a52c60e4198d88cbe6630 Mon Sep 17 00:00:00 2001 From: Samuel Dowling Date: Wed, 9 Aug 2023 17:39:28 +0930 Subject: [PATCH 132/637] [aaf] Use util-linux-libuuid instead of deprecated libuuid (#18556) Use `util-linux-libuuid` instead of deprecated `libuuid`. --- recipes/aaf/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/aaf/all/conanfile.py b/recipes/aaf/all/conanfile.py index 080c644424a04..ee7906ff05936 100644 --- a/recipes/aaf/all/conanfile.py +++ b/recipes/aaf/all/conanfile.py @@ -38,7 +38,7 @@ def requirements(self): self.requires("expat/2.5.0") self.requires("libjpeg/9e") if self.settings.os in ("FreeBSD", "Linux"): - self.requires("libuuid/1.0.3") + self.requires("util-linux-libuuid/2.39") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From ab7f4e22e80b47c346c9f4b855dbc09de43889cc Mon Sep 17 00:00:00 2001 From: Samuel Dowling Date: Wed, 9 Aug 2023 17:51:32 +0930 Subject: [PATCH 133/637] [azure-storage-cpp] Use util-linux-libuuid instead of deprecated libuuid (#18557) Use util-linux-libuuid instead of deprecated libuuid (#18557), see issue #19084 --- recipes/azure-storage-cpp/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/azure-storage-cpp/all/conanfile.py b/recipes/azure-storage-cpp/all/conanfile.py index 692bc2ab703fe..92f05a255ac83 100644 --- a/recipes/azure-storage-cpp/all/conanfile.py +++ b/recipes/azure-storage-cpp/all/conanfile.py @@ -51,7 +51,7 @@ def requirements(self): if self.settings.os != "Windows": self.requires("boost/1.76.0") self.requires("libxml2/2.9.10") - self.requires("libuuid/1.0.3") + self.requires("util-linux-libuuid/2.39") if self.settings.os == "Macos": self.requires("libgettext/0.20.1") From 32e7f51732d62e0fee383f3417a20a64a065cf07 Mon Sep 17 00:00:00 2001 From: Samuel Dowling Date: Wed, 9 Aug 2023 17:58:32 +0930 Subject: [PATCH 134/637] [cppcommon] Use util-linux-libuuid instead of deprecated libuuid (#18553) Use util-linux-libuuid instead of deprecated libuuid (#18553), see issue #19084 --- recipes/cppcommon/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cppcommon/all/conanfile.py b/recipes/cppcommon/all/conanfile.py index c289f88e777b0..31e78b570dc50 100644 --- a/recipes/cppcommon/all/conanfile.py +++ b/recipes/cppcommon/all/conanfile.py @@ -64,7 +64,7 @@ def requirements(self): else: self.requires("fmt/10.0.0") if self.settings.os == "Linux": - self.requires("libuuid/1.0.3") + self.requires("util-linux-libuuid/2.39") def validate(self): if self.settings.compiler.cppstd: From e3c7fb70d7ebd2582bf1034dbf1e9c729dba376f Mon Sep 17 00:00:00 2001 From: Samuel Dowling Date: Wed, 9 Aug 2023 18:21:05 +0930 Subject: [PATCH 135/637] [czmq] Use util-linux-libuuid instead of deprecated libuuid (#18552) * [czmq] Use util-linux-libuuid instead of deprecated libuuid * czmq: add transitive headers for zeromq --------- Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> --- recipes/czmq/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/czmq/all/conanfile.py b/recipes/czmq/all/conanfile.py index 88618f4797ed7..1ea4a28e1852a 100644 --- a/recipes/czmq/all/conanfile.py +++ b/recipes/czmq/all/conanfile.py @@ -62,7 +62,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("zeromq/4.3.4") + self.requires("zeromq/4.3.4", transitive_headers=True) if self.options.get_safe("with_libmicrohttpd"): self.requires("libmicrohttpd/0.9.75") if self.options.get_safe("with_libcurl"): @@ -70,7 +70,7 @@ def requirements(self): if self.options.with_lz4: self.requires("lz4/1.9.4") if self.options.get_safe("with_libuuid"): - self.requires("libuuid/1.0.3") + self.requires("util-linux-libuuid/2.39") if self.options.get_safe("with_systemd"): self.requires("libsystemd/252.4") From 4aa57795d3fde534ab1f3d45ebe36ecbbf0ea74a Mon Sep 17 00:00:00 2001 From: Samuel Dowling Date: Wed, 9 Aug 2023 18:39:23 +0930 Subject: [PATCH 136/637] [drogon] Use util-linux-libuuid instead of deprecated libuuid (#18555) --- recipes/drogon/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/drogon/all/conanfile.py b/recipes/drogon/all/conanfile.py index 80dc0d0264500..0b84047ab4ed5 100644 --- a/recipes/drogon/all/conanfile.py +++ b/recipes/drogon/all/conanfile.py @@ -113,7 +113,7 @@ def requirements(self): self.requires("openssl/[>=1.1 <4]") self.requires("zlib/1.2.13") if self.settings.os == "Linux": - self.requires("libuuid/1.0.3") + self.requires("util-linux-libuuid/2.39") if self.options.with_profile: self.requires("coz/cci.20210322") if self.options.with_boost: From 201d8e3ee0d1dca10c89450ae5a72da2dbbdace6 Mon Sep 17 00:00:00 2001 From: Samuel Dowling Date: Wed, 9 Aug 2023 19:04:39 +0930 Subject: [PATCH 137/637] [fontconfig] Use util-linux-libuuid instead of deprecated libuuid (#18550) --- recipes/fontconfig/all/conanfile.py | 2 +- recipes/fontconfig/meson/conanfile.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/fontconfig/all/conanfile.py b/recipes/fontconfig/all/conanfile.py index c44276116659f..1a6adb5ab1e22 100644 --- a/recipes/fontconfig/all/conanfile.py +++ b/recipes/fontconfig/all/conanfile.py @@ -50,7 +50,7 @@ def requirements(self): self.requires("freetype/2.13.0") self.requires("expat/2.5.0") if self.settings.os == "Linux": - self.requires("libuuid/1.0.3") + self.requires("util-linux-libuuid/2.39") def validate(self): if is_msvc(self): diff --git a/recipes/fontconfig/meson/conanfile.py b/recipes/fontconfig/meson/conanfile.py index dc1462585f4ec..54997946cfcf6 100644 --- a/recipes/fontconfig/meson/conanfile.py +++ b/recipes/fontconfig/meson/conanfile.py @@ -52,7 +52,7 @@ def requirements(self): self.requires("freetype/2.13.0") self.requires("expat/2.5.0") if self.settings.os == "Linux": - self.requires("libuuid/1.0.3") + self.requires("util-linux-libuuid/2.39") def build_requirements(self): self.tool_requires("gperf/3.1") From f0239e2af1f3a809b2d4722a633e491009624d57 Mon Sep 17 00:00:00 2001 From: Samuel Dowling Date: Wed, 9 Aug 2023 19:18:26 +0930 Subject: [PATCH 138/637] [stduuid] Use util-linux-libuuid instead of deprecated libuuid (#18549) --- recipes/stduuid/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/stduuid/all/conanfile.py b/recipes/stduuid/all/conanfile.py index f5148b86a236f..0ca3e6b2dcb08 100644 --- a/recipes/stduuid/all/conanfile.py +++ b/recipes/stduuid/all/conanfile.py @@ -46,7 +46,7 @@ def requirements(self): if not self.options.with_cxx20_span: self.requires("ms-gsl/3.1.0", transitive_headers=True) if self.settings.os == "Linux" and Version(self.version) <= "1.0": - self.requires("libuuid/1.0.3", transitive_headers=True, transitive_libs=True) + self.requires("util-linux-libuuid/2.39", transitive_headers=True, transitive_libs=True) def package_id(self): self.info.clear() From c189ba416c4a028329ccf26b07c3653a174ce62e Mon Sep 17 00:00:00 2001 From: Samuel Dowling Date: Wed, 9 Aug 2023 19:30:13 +0930 Subject: [PATCH 139/637] [xapian-core] Use util-linux-libuuid instead of deprecated libuuid (#18551) --- recipes/xapian-core/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/xapian-core/all/conanfile.py b/recipes/xapian-core/all/conanfile.py index f2cc68f3f1bd4..f4278ec4f019a 100644 --- a/recipes/xapian-core/all/conanfile.py +++ b/recipes/xapian-core/all/conanfile.py @@ -56,7 +56,7 @@ def layout(self): def requirements(self): self.requires("zlib/1.2.13") if self.settings.os != "Windows": - self.requires("libuuid/1.0.3") + self.requires("util-linux-libuuid/2.39") def validate(self): if self.options.shared and self.settings.os == "Windows": From 48de38e7fef219370afc1a712a8e74a618599401 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 9 Aug 2023 19:17:09 +0900 Subject: [PATCH 140/637] libcurl: add version 8.2.1 (#18923) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rubén Rincón Blanco --- recipes/libcurl/all/conandata.yml | 3 +++ recipes/libcurl/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/libcurl/all/conandata.yml b/recipes/libcurl/all/conandata.yml index fa48006c6d92f..e0c9dcbbb2484 100644 --- a/recipes/libcurl/all/conandata.yml +++ b/recipes/libcurl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "8.2.1": + url: "https://curl.se/download/curl-8.2.1.tar.gz" + sha256: "f98bdb06c0f52bdd19e63c4a77b5eb19b243bcbbd0f5b002b9f3cba7295a3a42" "8.2.0": url: "https://curl.se/download/curl-8.2.0.tar.gz" sha256: "c67849462d171a3fee08b605cdd837d18ee22ecc3ee2c6a0393c9cec5d1a137e" diff --git a/recipes/libcurl/config.yml b/recipes/libcurl/config.yml index 29dfe667599fa..91b7536f966b4 100644 --- a/recipes/libcurl/config.yml +++ b/recipes/libcurl/config.yml @@ -1,4 +1,6 @@ versions: + "8.2.1": + folder: all "8.2.0": folder: all "8.1.2": From 78a9ff7d0feb0035cf9905337769ce6b2acea0d7 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Wed, 9 Aug 2023 12:39:47 +0200 Subject: [PATCH 141/637] Update list of references (prod-v2/ListPackages) (#19109) --- .c3i/conan_v2_ready_references.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index fdcbe4b81dbb2..0b338c3849bdd 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -224,6 +224,7 @@ required_for_references: - dbus - debug_assert - decimal_for_cpp +- di - dice-template-library - dirent - discount @@ -668,6 +669,7 @@ required_for_references: - mcap - md4c - md4qt +- mdns - mdnsresponder - mdspan - meshoptimizer @@ -934,6 +936,7 @@ required_for_references: - sfml - shapelib - shield +- si - sigslot - simde - simdjson From 3fe4c9fa39d87e5ef9604938aa1590eeda49e1fe Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 9 Aug 2023 19:42:47 +0900 Subject: [PATCH 142/637] leptonica: add version 1.83.1, update libjpeg-turbo (#19101) --- recipes/leptonica/all/conandata.yml | 3 +++ recipes/leptonica/all/conanfile.py | 4 ++-- recipes/leptonica/config.yml | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/recipes/leptonica/all/conandata.yml b/recipes/leptonica/all/conandata.yml index 2902df5b0c405..49782e81d8fcd 100644 --- a/recipes/leptonica/all/conandata.yml +++ b/recipes/leptonica/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.83.1": + url: "https://github.com/DanBloomberg/leptonica/archive/1.83.1.tar.gz" + sha256: "4289d0a4224b614010072253531c0455a33a4d7c7a0017fe7825ed382290c0da" "1.83.0": url: "https://github.com/DanBloomberg/leptonica/archive/1.83.0.tar.gz" sha256: "14cf531c2219a1414e8e3c51a3caa5cf021a52e782c4a6561bf64d0ef2119282" diff --git a/recipes/leptonica/all/conanfile.py b/recipes/leptonica/all/conanfile.py index 405081e59b384..d072baae99b61 100644 --- a/recipes/leptonica/all/conanfile.py +++ b/recipes/leptonica/all/conanfile.py @@ -72,7 +72,7 @@ def requirements(self): if self.options.with_jpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_jpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/2.1.5") + self.requires("libjpeg-turbo/3.0.0") elif self.options.with_jpeg == "mozjpeg": self.requires("mozjpeg/4.1.1") if self.options.with_png: @@ -87,7 +87,7 @@ def requirements(self): def build_requirements(self): if self.options.with_webp or self.options.with_openjpeg: if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/1.9.3") + self.tool_requires("pkgconf/1.9.5") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/leptonica/config.yml b/recipes/leptonica/config.yml index 36297367918ec..7de53a77a3916 100644 --- a/recipes/leptonica/config.yml +++ b/recipes/leptonica/config.yml @@ -1,4 +1,6 @@ versions: + "1.83.1": + folder: all "1.83.0": folder: all "1.82.0": From e05300c58b46b5dd6b929315b9d371243e776789 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 9 Aug 2023 15:36:37 +0400 Subject: [PATCH 143/637] [onetbb] added hwloc / tbbbind support (#17939) --- recipes/onetbb/all/conandata.yml | 6 ++ recipes/onetbb/all/conanfile.py | 45 +++++++++ ...pkg-search-module-use-imported-target.diff | 97 +++++++++++++++++++ 3 files changed, 148 insertions(+) create mode 100644 recipes/onetbb/all/patches/pkg-search-module-use-imported-target.diff diff --git a/recipes/onetbb/all/conandata.yml b/recipes/onetbb/all/conandata.yml index 9ccf39c2f9dca..880145b4a46b0 100644 --- a/recipes/onetbb/all/conandata.yml +++ b/recipes/onetbb/all/conandata.yml @@ -35,3 +35,9 @@ patches: patch_type: "portability" patch_source: "https://github.com/oneapi-src/oneTBB/pull/716.diff" patch_file: "patches/fix-overeager-stripping-of-compile-flag.diff" + - patch_description: "Use pkg_search_module with IMPORTED_TARGET" + patch_type: "portability" + patch_source: + - "https://github.com/oneapi-src/oneTBB/pull/448.diff" + - "https://github.com/oneapi-src/oneTBB/commit/df3096075a00942acbdd3ce9347f5298cc153fd6.diff" + patch_file: "patches/pkg-search-module-use-imported-target.diff" diff --git a/recipes/onetbb/all/conanfile.py b/recipes/onetbb/all/conanfile.py index 0996273678365..165436b84b383 100644 --- a/recipes/onetbb/all/conanfile.py +++ b/recipes/onetbb/all/conanfile.py @@ -1,7 +1,9 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, load, rmdir +from conan.tools.gnu import PkgConfigDeps from conan.tools.scm import Version import os import re @@ -26,6 +28,7 @@ class OneTBBConan(ConanFile): "fPIC": [True, False], "tbbmalloc": [True, False], "tbbproxy": [True, False], + "tbbbind": [True, False], "interprocedural_optimization": [True, False], } default_options = { @@ -33,15 +36,37 @@ class OneTBBConan(ConanFile): "fPIC": True, "tbbmalloc": True, "tbbproxy": True, + "tbbbind": True, "interprocedural_optimization": True, } + @property + def _tbbbind_hwloc_version(self): + # TBB expects different variables depending on the version + return "2_5" if Version(self.version) >= "2021.4.0" else "2_4" + + @property + def _tbbbind_supported(self): + return Version(self.version) >= "2021.1.1" and not self.settings.os == "Macos" + + @property + def _tbbbind_build(self): + return self.options.get_safe("tbbbind", False) and self._tbbbind_supported + + @property + def _tbbbind_explicit_hwloc(self): + # during cross-compilation, oneTBB does not search for HWLOC and we need to specify it explicitly + # but then oneTBB creates an imported SHARED target from provided paths, so we have to set shared=True + return self._tbbbind_build and cross_building(self) + def export_sources(self): export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if not self._tbbbind_supported: + del self.options.tbbbind if Version(self.version) < "2021.6.0" or self.settings.os == "Android": del self.options.interprocedural_optimization if Version(self.version) < "2021.2.0": @@ -53,8 +78,15 @@ def configure(self): self.options.rm_safe("fPIC") else: del self.options.tbbproxy + self.options.rm_safe("tbbbind") if not self.options.tbbmalloc: self.options.rm_safe("tbbproxy") + if self._tbbbind_explicit_hwloc: + self.options["hwloc"].shared = True + + def requirements(self): + if self._tbbbind_build: + self.requires("hwloc/2.9.1") def layout(self): cmake_layout(self, src_folder="src") @@ -76,6 +108,8 @@ def validate_build(self): "Please consider fixing at least the aforementioned issue in upstream." ) self.output.warning("oneTBB strongly discourages usage of static linkage") + if self._tbbbind_explicit_hwloc and not self.dependencies["hwloc"].options.shared: + raise ConanInvalidConfiguration(f"{self.ref} requires hwloc:shared=True to be built.") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -90,6 +124,17 @@ def generate(self): toolchain.variables["TBB_ENABLE_IPO"] = self.options.interprocedural_optimization if Version(self.version) >= "2021.6.0" and self.options.get_safe("tbbproxy"): toolchain.variables["TBBMALLOC_PROXY_BUILD"] = self.options.tbbproxy + toolchain.variables["TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH"] = not self._tbbbind_build + if self._tbbbind_build: + deps = PkgConfigDeps(self) + deps.generate() + if self._tbbbind_explicit_hwloc: + hwloc_package_folder = self.dependencies["hwloc"].package_folder.replace("\\", "/") + hwloc_lib_name = "hwloc.lib" if self.settings.os == "Windows" else "libhwloc.so" + toolchain.variables[f"CMAKE_HWLOC_{self._tbbbind_hwloc_version}_LIBRARY_PATH"] = os.path.join(hwloc_package_folder, "lib", hwloc_lib_name) + toolchain.variables[f"CMAKE_HWLOC_{self._tbbbind_hwloc_version}_INCLUDE_PATH"] = os.path.join(hwloc_package_folder, "include") + if self.settings.os == "Windows": + toolchain.variables[f"CMAKE_HWLOC_{self._tbbbind_hwloc_version}_DLL_PATH"] = os.path.join(hwloc_package_folder, "bin", "hwloc.dll") toolchain.generate() def build(self): diff --git a/recipes/onetbb/all/patches/pkg-search-module-use-imported-target.diff b/recipes/onetbb/all/patches/pkg-search-module-use-imported-target.diff new file mode 100644 index 0000000000000..e1a3505708cba --- /dev/null +++ b/recipes/onetbb/all/patches/pkg-search-module-use-imported-target.diff @@ -0,0 +1,97 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 34a23d40..d569d57e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -100,6 +100,8 @@ option(TBB_NO_APPCONTAINER "Apply /APPCONTAINER:NO (for testing binaries for Win + option(TBB4PY_BUILD "Enable tbb4py build" OFF) + option(TBB_CPF "Enable preview features of the library" OFF) + option(TBB_FIND_PACKAGE "Enable search for external oneTBB using find_package instead of build from sources" OFF) ++option(TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH "Disable HWLOC automatic search by pkg-config tool" OFF) ++ + + if (NOT DEFINED BUILD_SHARED_LIBS) + set(BUILD_SHARED_LIBS ON) +@@ -194,7 +196,7 @@ else() + if (NOT "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "mips") + add_subdirectory(src/tbbmalloc) + add_subdirectory(src/tbbmalloc_proxy) +- if (APPLE) ++ if (APPLE OR NOT BUILD_SHARED_LIBS) + message(STATUS "TBBBind build target is disabled due to unsupported environment") + else() + add_subdirectory(src/tbbbind) +diff --git a/cmake/hwloc_detection.cmake b/cmake/hwloc_detection.cmake +index f1740662..e1806a0f 100644 +--- a/cmake/hwloc_detection.cmake ++++ b/cmake/hwloc_detection.cmake +@@ -45,11 +45,15 @@ endforeach() + + unset(HWLOC_TARGET_NAME) + +-if (NOT HWLOC_TARGET_EXPLICITLY_DEFINED) ++if (NOT HWLOC_TARGET_EXPLICITLY_DEFINED AND ++ # No hwloc auto detection for cross compilation ++ NOT CMAKE_CROSSCOMPILING AND ++ NOT TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH ++) + find_package(PkgConfig QUIET) +- if (PKG_CONFIG_FOUND) +- pkg_search_module(HWLOC hwloc) +- if (HWLOC_FOUND) ++ if (PKG_CONFIG_FOUND AND NOT CMAKE_VERSION VERSION_LESS 3.6) ++ pkg_search_module(HWLOC hwloc IMPORTED_TARGET) ++ if (TARGET PkgConfig::HWLOC) + if (HWLOC_VERSION VERSION_LESS 2) + set(TBBBIND_LIBRARY_NAME tbbbind) + elseif(HWLOC_VERSION VERSION_LESS 2.4) +@@ -60,4 +64,3 @@ if (NOT HWLOC_TARGET_EXPLICITLY_DEFINED) + endif() + endif() + endif() +- +diff --git a/src/tbbbind/CMakeLists.txt b/src/tbbbind/CMakeLists.txt +index da9dabfe..1a4c6ca0 100644 +--- a/src/tbbbind/CMakeLists.txt ++++ b/src/tbbbind/CMakeLists.txt +@@ -18,12 +18,13 @@ endif() + set(CMAKE_SKIP_BUILD_RPATH TRUE) + + function(tbbbind_build TBBBIND_NAME REQUIRED_HWLOC_TARGET) +- if (NOT TARGET ${REQUIRED_HWLOC_TARGET} AND NOT DEFINED HWLOC_LIBRARIES) ++ if (NOT TARGET ${REQUIRED_HWLOC_TARGET}) + message(STATUS "HWLOC target ${REQUIRED_HWLOC_TARGET} doesn't exist." + " The ${TBBBIND_NAME} target cannot be created") + return() + endif() + add_library(${TBBBIND_NAME} tbb_bind.cpp) ++ + add_library(TBB::${TBBBIND_NAME} ALIAS ${TBBBIND_NAME}) + + target_compile_definitions(${TBBBIND_NAME} +@@ -64,14 +65,12 @@ function(tbbbind_build TBBBIND_NAME REQUIRED_HWLOC_TARGET) + PRIVATE + ${TBB_LIB_LINK_FLAGS} + ${TBB_COMMON_LINK_FLAGS} +- ${HWLOC_LIBRARY_DIRS} # pkg-config defined + ) + else() + target_link_libraries(${TBBBIND_NAME} + PRIVATE + ${TBB_LIB_LINK_FLAGS} + ${TBB_COMMON_LINK_FLAGS} +- ${HWLOC_LIBRARY_DIRS} # pkg-config defined + ) + endif() + +@@ -90,9 +89,9 @@ function(tbbbind_build TBBBIND_NAME REQUIRED_HWLOC_TARGET) + endif() + endfunction() + +-if (NOT DEFINED HWLOC_TARGET_EXPLICITLY_DEFINED AND DEFINED HWLOC_LIBRARIES) ++if (NOT DEFINED HWLOC_TARGET_EXPLICITLY_DEFINED AND TARGET PkgConfig::HWLOC) + message(STATUS "The ${TBBBIND_LIBRARY_NAME} target will be configured using the HWLOC ${HWLOC_VERSION}") +- tbbbind_build(${TBBBIND_LIBRARY_NAME} ${HWLOC_LIBRARIES}) ++ tbbbind_build(${TBBBIND_LIBRARY_NAME} PkgConfig::HWLOC) + else() + tbbbind_build(tbbbind HWLOC::hwloc_1_11) + tbbbind_build(tbbbind_2_0 HWLOC::hwloc_2 ) From 00ebe43c1551751bffbc19a2463f4f1913e51821 Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Wed, 9 Aug 2023 15:02:22 +0100 Subject: [PATCH 144/637] fontconfig: minimal change to ensure most recent rrev (#19114) --- recipes/fontconfig/meson/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/fontconfig/meson/conanfile.py b/recipes/fontconfig/meson/conanfile.py index 54997946cfcf6..f037cbc5601ca 100644 --- a/recipes/fontconfig/meson/conanfile.py +++ b/recipes/fontconfig/meson/conanfile.py @@ -95,7 +95,7 @@ def package(self): copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) meson = Meson(self) meson.install() - rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + rm(self, "*.pdb", self.package_folder, recursive=True) rm(self, "*.conf", os.path.join(self.package_folder, "bin", "etc", "fonts", "conf.d")) rm(self, "*.def", os.path.join(self.package_folder, "lib")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) From 823512b432652a73a37b85cbd097adf25ce170a1 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 9 Aug 2023 23:33:48 +0900 Subject: [PATCH 145/637] uwebsockets: add version 20.45.0 (#19047) --- recipes/uwebsockets/all/conandata.yml | 3 +++ recipes/uwebsockets/all/conanfile.py | 2 +- recipes/uwebsockets/config.yml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/uwebsockets/all/conandata.yml b/recipes/uwebsockets/all/conandata.yml index d0d6f814547b2..02893378e4419 100644 --- a/recipes/uwebsockets/all/conandata.yml +++ b/recipes/uwebsockets/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "20.45.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.45.0.tar.gz" + sha256: "db7599e9eac0c18b76740e7c391663652e0d7188b992a1a5a8dc28f347f483ec" "20.36.0": url: "https://github.com/uNetworking/uWebSockets/archive/v20.36.0.tar.gz" sha256: "cda266f7ed6abe67ef3cae6e223a580fe5091db9156c1f4123ee328ae21511c9" diff --git a/recipes/uwebsockets/all/conanfile.py b/recipes/uwebsockets/all/conanfile.py index a7539cf95209b..1ef8ede49e767 100644 --- a/recipes/uwebsockets/all/conanfile.py +++ b/recipes/uwebsockets/all/conanfile.py @@ -56,7 +56,7 @@ def requirements(self): self.requires("libdeflate/1.14") if Version(self.version) > "20.17.0": - self.requires("usockets/0.8.5") + self.requires("usockets/0.8.6") elif Version(self.version) >= "20.15.0": self.requires("usockets/0.8.2") elif Version(self.version) >= "19.0.0": diff --git a/recipes/uwebsockets/config.yml b/recipes/uwebsockets/config.yml index be1e8815a9c32..06958fe4bce17 100644 --- a/recipes/uwebsockets/config.yml +++ b/recipes/uwebsockets/config.yml @@ -1,4 +1,6 @@ versions: + "20.45.0": + folder: all "20.36.0": folder: all "20.17.0": From 542429318a13c65a309773ab92e7fc57d35d22e2 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 9 Aug 2023 17:59:17 +0300 Subject: [PATCH 146/637] cargs: migrate to Conan v2 (#18704) * cargs: migrate to Conan v2 * cargs: restore VirtualRunEnv in test_package * cargs: fix packaging of DLLs --- recipes/cargs/all/CMakeLists.txt | 7 -- recipes/cargs/all/conanfile.py | 94 +++++++++++-------- recipes/cargs/all/test_package/CMakeLists.txt | 9 +- recipes/cargs/all/test_package/conanfile.py | 22 +++-- .../cargs/all/test_v1_package/CMakeLists.txt | 8 ++ .../cargs/all/test_v1_package/conanfile.py | 16 ++++ 6 files changed, 100 insertions(+), 56 deletions(-) delete mode 100644 recipes/cargs/all/CMakeLists.txt create mode 100644 recipes/cargs/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/cargs/all/test_v1_package/conanfile.py diff --git a/recipes/cargs/all/CMakeLists.txt b/recipes/cargs/all/CMakeLists.txt deleted file mode 100644 index 42d6e7408fb33..0000000000000 --- a/recipes/cargs/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.9.2) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/cargs/all/conanfile.py b/recipes/cargs/all/conanfile.py index 6aeeae1d3b488..6de6ac89acce0 100644 --- a/recipes/cargs/all/conanfile.py +++ b/recipes/cargs/all/conanfile.py @@ -1,34 +1,37 @@ import os -from conans import ConanFile, CMake, tools -required_conan_version = ">=1.33.0" +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 + +required_conan_version = ">=1.53.0" class CargsConan(ConanFile): name = "cargs" - description = "A lightweight getopt replacement that works on Linux, " \ - "Windows and macOS. Command line argument parser library" \ - " for C/C++. Can be used to parse argv and argc parameters." - url = "https://github.com/conan-io/conan-center-index" + description = ( + "A lightweight getopt replacement that works on Linux, " + "Windows and macOS. Command line argument parser library" + " for C/C++. Can be used to parse argv and argc parameters." + ) license = "MIT" + url = "https://github.com/conan-io/conan-center-index" homepage = "https://likle.github.io/cargs/" topics = ("cargs", "cross-platform", "windows", "macos", "osx", "linux", "getopt", "getopt-long", "command-line-parser", "command-line", "arguments", "argument-parser") - exports_sources = ["CMakeLists.txt"] - generators = "cmake" + package_type = "library" settings = "os", "arch", "compiler", "build_type" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {'shared': False, 'fPIC': True} - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } def config_options(self): if self.settings.os == "Windows": @@ -36,33 +39,48 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = self.options.shared + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): cmake = CMake(self) - cmake.definitions["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = self.options.shared and self.settings.os == "Windows" - cmake.configure(build_folder=self._build_subfolder) + cmake.configure() cmake.build(target="cargs") def package(self): - include_dir = os.path.join(self._source_subfolder, 'include') - lib_dir = os.path.join(self._build_subfolder, "lib") - bin_dir = os.path.join(self._build_subfolder, "bin") - - self.copy("LICENSE.md", dst="licenses", src=self._source_subfolder) - self.copy("cargs.h", dst="include", src=include_dir) - self.copy(pattern="*.a", dst="lib", src=lib_dir, keep_path=False) - self.copy(pattern="*.lib", dst="lib", src=lib_dir, keep_path=False) - self.copy(pattern="*.dylib", dst="lib", src=lib_dir, keep_path=False) - self.copy(pattern="*.so*", dst="lib", src=lib_dir, keep_path=False, - symlinks=True) - self.copy(pattern="*.dll", dst="bin", src=bin_dir, keep_path=False) + copy(self, "LICENSE.md", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + copy(self, "cargs.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include")) + for pattern in ["*.a", "*.so*", "*.dylib", "*.lib"]: + copy(self, pattern, + dst=os.path.join(self.package_folder, "lib"), + src=self.build_folder, + keep_path=False) + copy(self, "*.dll", + dst=os.path.join(self.package_folder, "bin"), + src=self.build_folder, + keep_path=False) def package_info(self): - self.cpp_info.libs = tools.collect_libs(self) + self.cpp_info.libs = ["cargs"] diff --git a/recipes/cargs/all/test_package/CMakeLists.txt b/recipes/cargs/all/test_package/CMakeLists.txt index f6bb6f79f518f..2d259c06a7d89 100644 --- a/recipes/cargs/all/test_package/CMakeLists.txt +++ b/recipes/cargs/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(cargs REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE cargs::cargs) set_property(TARGET ${PROJECT_NAME} PROPERTY C_STANDARD 11) diff --git a/recipes/cargs/all/test_package/conanfile.py b/recipes/cargs/all/test_package/conanfile.py index 4903f1a7e8fa0..ef5d7042163ec 100644 --- a/recipes/cargs/all/test_package/conanfile.py +++ b/recipes/cargs/all/test_package/conanfile.py @@ -1,9 +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", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -11,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/cargs/all/test_v1_package/CMakeLists.txt b/recipes/cargs/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/cargs/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/cargs/all/test_v1_package/conanfile.py b/recipes/cargs/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..6c9d5dba712c7 --- /dev/null +++ b/recipes/cargs/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From bbe0e7dac732b9a4fc3a8a114a6bce07dbfe3693 Mon Sep 17 00:00:00 2001 From: Daniel <140124999+liquiddaniel@users.noreply.github.com> Date: Thu, 10 Aug 2023 02:08:33 +1000 Subject: [PATCH 147/637] (#18769) Add capnproto/0.10.4 --- recipes/capnproto/all/conandata.yml | 5 +++++ recipes/capnproto/config.yml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/recipes/capnproto/all/conandata.yml b/recipes/capnproto/all/conandata.yml index 8a6eeaab5a8d1..9becf4a51dc85 100644 --- a/recipes/capnproto/all/conandata.yml +++ b/recipes/capnproto/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.10.4": + url: "https://github.com/capnproto/capnproto/archive/v0.10.4.tar.gz" + sha256: "c6f25940688c87ddb24e0c4e475c3213d9b044aad2ba305439cc8c224f559da6" "0.10.3": url: "https://github.com/capnproto/capnproto/archive/v0.10.3.tar.gz" sha256: "e07446f56043c983e009038e69d18ff86a2924909f0b518ccf47eccf5ac03919" @@ -18,6 +21,8 @@ sources: url: "https://github.com/capnproto/capnproto/archive/v0.7.0.tar.gz" sha256: 76c7114a3d142ad08b7208b3964a26e72a6320ee81331d3f0b87569fc9c47a28 patches: + "0.10.4": + - patch_file: patches/0014-disable-tests-for-0.10.1.patch "0.10.3": - patch_file: patches/0014-disable-tests-for-0.10.1.patch "0.10.1": diff --git a/recipes/capnproto/config.yml b/recipes/capnproto/config.yml index 89d97bce3d850..884c84c332e24 100644 --- a/recipes/capnproto/config.yml +++ b/recipes/capnproto/config.yml @@ -1,4 +1,6 @@ versions: + "0.10.4": + folder: all "0.10.3": folder: all "0.10.1": From 6a5d58eaca59aa19d457535890a2736c76c8b851 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 10 Aug 2023 01:32:13 +0900 Subject: [PATCH 148/637] (#19054) simdutf: add version 3.2.15, remove older versions, remove unused patch --- recipes/simdutf/all/conandata.yml | 24 ++++------- .../2.0.6-0002-add-workaround-gcc9.patch | 42 ------------------- recipes/simdutf/config.yml | 6 +-- 3 files changed, 9 insertions(+), 63 deletions(-) delete mode 100644 recipes/simdutf/all/patches/2.0.6-0002-add-workaround-gcc9.patch diff --git a/recipes/simdutf/all/conandata.yml b/recipes/simdutf/all/conandata.yml index b0cd66f4e34df..a0fbb53596197 100644 --- a/recipes/simdutf/all/conandata.yml +++ b/recipes/simdutf/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.2.15": + url: "https://github.com/simdutf/simdutf/archive/v3.2.15.tar.gz" + sha256: "c26d2e2e9124e1c20335d3880d74c8b0d74a5e247ba82ef82d15df4ccc413bcd" "3.2.14": url: "https://github.com/simdutf/simdutf/archive/v3.2.14.tar.gz" sha256: "6bd6cd41e0e588312c3ae24adb297454bd9bd9622ed7443f41300d7201f233a1" @@ -23,16 +26,14 @@ sources: "2.0.9": url: "https://github.com/simdutf/simdutf/archive/v2.0.9.tar.gz" sha256: "ff6a19de4c23671e7f1077cf6c0f60bc01197f29c6e4f56fa485c9cd732576ac" - "2.0.8": - url: "https://github.com/simdutf/simdutf/archive/v2.0.8.tar.gz" - sha256: "bd7aa550a8d9a1aba2c0b4eb2088f90c964375b13394f9076f7ba49f51dc40b5" - "2.0.6": - url: "https://github.com/simdutf/simdutf/archive/v2.0.6.tar.gz" - sha256: "40f1f9a4403f81c2c3d736ef9c73662835b2241871caa262fcd654e0898f9e4e" "1.0.1": url: "https://github.com/simdutf/simdutf/archive/v1.0.1.tar.gz" sha256: "e7832ba58fb95fe00de76dbbb2f17d844a7ad02a6f5e3e9e5ce9520e820049a0" patches: + "3.2.15": + - patch_file: "patches/3.2.14-0001-fix-cmake.patch" + patch_description: "remove static build, enable rpath on macOS" + patch_type: "conan" "3.2.14": - patch_file: "patches/3.2.14-0001-fix-cmake.patch" patch_description: "remove static build, enable rpath on macOS" @@ -65,17 +66,6 @@ patches: - patch_file: "patches/2.0.3-0001-fix-cmake.patch" patch_description: "remove static build, enable rpath on macOS" patch_type: "conan" - "2.0.8": - - patch_file: "patches/2.0.3-0001-fix-cmake.patch" - patch_description: "remove static build, enable rpath on macOS" - patch_type: "conan" - "2.0.6": - - patch_file: "patches/2.0.3-0001-fix-cmake.patch" - patch_description: "remove static build, enable rpath on macOS" - patch_type: "conan" - - patch_file: "patches/2.0.6-0002-add-workaround-gcc9.patch" - patch_description: "apply gcc8 workaround to gcc9" - patch_type: "portability" "1.0.1": - patch_file: "patches/1.0.1-0001-fix-cmake.patch" patch_description: "disable test and benchmark build and enable rpath on macOS" diff --git a/recipes/simdutf/all/patches/2.0.6-0002-add-workaround-gcc9.patch b/recipes/simdutf/all/patches/2.0.6-0002-add-workaround-gcc9.patch deleted file mode 100644 index 957a9759ee2fa..0000000000000 --- a/recipes/simdutf/all/patches/2.0.6-0002-add-workaround-gcc9.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff --git a/src/icelake/icelake_utf8_common.inl.cpp b/src/icelake/icelake_utf8_common.inl.cpp -index 962700b..a192a18 100644 ---- a/src/icelake/icelake_utf8_common.inl.cpp -+++ b/src/icelake/icelake_utf8_common.inl.cpp -@@ -448,12 +448,12 @@ __m512i prev(__m512i input, __m512i previous) { - static_assert(N<=32, "N must be no larger than 32"); - const __m512i movemask = _mm512_setr_epi32(28,29,30,31,0,1,2,3,4,5,6,7,8,9,10,11); - const __m512i rotated = _mm512_permutex2var_epi32(input, movemask, previous); --#if SIMDUTF_GCC8 -- constexpr int shift = 16-N; // workaround for GCC8 -+#if SIMDUTF_GCC8 || SIMDUTF_GCC9 -+ constexpr int shift = 16-N; // workaround for GCC8,9 - return _mm512_alignr_epi8(input, rotated, shift); - #else - return _mm512_alignr_epi8(input, rotated, 16-N); --#endif // SIMDUTF_GCC8 -+#endif // SIMDUTF_GCC8 || SIMDUTF_GCC9 - } - - template -diff --git a/src/simdutf/icelake/intrinsics.h b/src/simdutf/icelake/intrinsics.h -index c71a085..edcd289 100644 ---- a/src/simdutf/icelake/intrinsics.h -+++ b/src/simdutf/icelake/intrinsics.h -@@ -64,7 +64,9 @@ - #if defined(__GNUC__) && !defined(__clang__) - #if __GNUC__ == 8 - #define SIMDUTF_GCC8 1 --#endif // __GNUC__ == 8 -+#elif __GNUC__ == 9 -+#define SIMDUTF_GCC9 1 -+#endif // __GNUC__ == 8 || __GNUC__ == 9 - #endif // defined(__GNUC__) && !defined(__clang__) - - #if SIMDUTF_GCC8 -@@ -83,4 +85,4 @@ inline __m512i _mm512_set_epi8(uint8_t a0, uint8_t a1, uint8_t a2, uint8_t a3, u - } - #endif // SIMDUTF_GCC8 - --#endif // SIMDUTF_HASWELL_INTRINSICS_H -\ No newline at end of file -+#endif // SIMDUTF_HASWELL_INTRINSICS_H diff --git a/recipes/simdutf/config.yml b/recipes/simdutf/config.yml index ec7185837f86c..997781983cc10 100644 --- a/recipes/simdutf/config.yml +++ b/recipes/simdutf/config.yml @@ -1,4 +1,6 @@ versions: + "3.2.15": + folder: all "3.2.14": folder: all "3.2.2": @@ -15,9 +17,5 @@ versions: folder: all "2.0.9": folder: all - "2.0.8": - folder: all - "2.0.6": - folder: all "1.0.1": folder: all From ece3a9e3e94f7de261a685dca49d553298e3ad82 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Wed, 9 Aug 2023 19:25:12 +0200 Subject: [PATCH 149/637] (#19092) [sentry-breakpad] Replace _patch_sources by patches * [sentry-breakpad] Convert to patches * Remove second patch * Fix breakpad patch * Remove base_path in other versions * Fix patches for all versions --- recipes/sentry-breakpad/all/conandata.yml | 46 ++++ recipes/sentry-breakpad/all/conanfile.py | 83 +------ .../0.4.18-0001-remove-third-pary-lss.patch | 227 ++++++++++++++++++ .../0.4.18-0002-install-breakpad-header.patch | 54 +++++ .../0.5.4-0001-remove-third-pary-lss.patch | 227 ++++++++++++++++++ .../0.5.4-0002-install-breakpad-header.patch | 54 +++++ .../0.6.x-0001-remove-third-pary-lss.patch | 227 ++++++++++++++++++ .../0.6.x-0002-install-breakpad-header.patch | 54 +++++ 8 files changed, 893 insertions(+), 79 deletions(-) create mode 100644 recipes/sentry-breakpad/all/patches/0.4.18-0001-remove-third-pary-lss.patch create mode 100644 recipes/sentry-breakpad/all/patches/0.4.18-0002-install-breakpad-header.patch create mode 100644 recipes/sentry-breakpad/all/patches/0.5.4-0001-remove-third-pary-lss.patch create mode 100644 recipes/sentry-breakpad/all/patches/0.5.4-0002-install-breakpad-header.patch create mode 100644 recipes/sentry-breakpad/all/patches/0.6.x-0001-remove-third-pary-lss.patch create mode 100644 recipes/sentry-breakpad/all/patches/0.6.x-0002-install-breakpad-header.patch diff --git a/recipes/sentry-breakpad/all/conandata.yml b/recipes/sentry-breakpad/all/conandata.yml index ced5e36dba275..2687fcfc48fd4 100644 --- a/recipes/sentry-breakpad/all/conandata.yml +++ b/recipes/sentry-breakpad/all/conandata.yml @@ -14,3 +14,49 @@ sources: "0.4.18": url: "https://github.com/getsentry/sentry-native/releases/download/0.4.18/sentry-native.zip" sha256: "41fdf6499cd8576142beb03104badcc9e0b80b8ef27080ca71cd4408cc1d7ece" +patches: + "0.6.5": + - patch_file: "patches/0.6.x-0001-remove-third-pary-lss.patch" + patch_description: "Remove third party lss from include" + patch_type: "conan" + patch_source: "https://github.com/getsentry/breakpad/pull/37" + - patch_file: "patches/0.6.x-0002-install-breakpad-header.patch" + patch_description: "Install breakpad header" + patch_type: "conan" + patch_source: "https://github.com/getsentry/sentry-native/pull/872" + "0.6.4": + - patch_file: "patches/0.6.x-0001-remove-third-pary-lss.patch" + patch_description: "Remove third party lss from include" + patch_type: "conan" + patch_source: "https://github.com/getsentry/breakpad/pull/37" + - patch_file: "patches/0.6.x-0002-install-breakpad-header.patch" + patch_description: "Install breakpad header" + patch_type: "conan" + patch_source: "https://github.com/getsentry/sentry-native/pull/872" + "0.6.3": + - patch_file: "patches/0.6.x-0001-remove-third-pary-lss.patch" + patch_description: "Remove third party lss from include" + patch_type: "conan" + patch_source: "https://github.com/getsentry/breakpad/pull/37" + - patch_file: "patches/0.6.x-0002-install-breakpad-header.patch" + patch_description: "Install breakpad header" + patch_type: "conan" + patch_source: "https://github.com/getsentry/sentry-native/pull/872" + "0.5.4": + - patch_file: "patches/0.5.4-0001-remove-third-pary-lss.patch" + patch_description: "Remove third party lss from include" + patch_type: "conan" + patch_source: "https://github.com/getsentry/breakpad/pull/37" + - patch_file: "patches/0.5.4-0002-install-breakpad-header.patch" + patch_description: "Install breakpad header" + patch_type: "conan" + patch_source: "https://github.com/getsentry/sentry-native/pull/872" + "0.4.18": + - patch_file: "patches/0.4.18-0001-remove-third-pary-lss.patch" + patch_description: "Remove third party lss from include" + patch_type: "conan" + patch_source: "https://github.com/getsentry/breakpad/pull/37" + - patch_file: "patches/0.4.18-0002-install-breakpad-header.patch" + patch_description: "Install breakpad header" + patch_type: "conan" + patch_source: "https://github.com/getsentry/sentry-native/pull/872" diff --git a/recipes/sentry-breakpad/all/conanfile.py b/recipes/sentry-breakpad/all/conanfile.py index a7d5646c8989e..8e95117df3a32 100644 --- a/recipes/sentry-breakpad/all/conanfile.py +++ b/recipes/sentry-breakpad/all/conanfile.py @@ -3,7 +3,7 @@ from conan.tools.apple import is_apple_os from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, replace_in_file, save +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get from conan.tools.scm import Version import os @@ -43,6 +43,7 @@ def _compilers_minimum_version(self): def export_sources(self): copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -54,7 +55,7 @@ def layout(self): def requirements(self): if self.settings.os in ("FreeBSD", "Linux"): # linux-syscal-support is a public dependency - # see https://github.com/conan-io/conan-center-index/pull/16752#issuecomment-1487241864 + # see https://github.com/conan-io/conan-center-index/pull/16752#issuecomment-1487241864 self.requires("linux-syscall-support/cci.20200813", transitive_headers=True) def validate(self): @@ -75,84 +76,8 @@ def generate(self): tc.variables["LINUX"] = True tc.generate() - def _patch_sources(self): - # FIXME: convert to patches - import textwrap - - files_to_patch = [ - # "src/tools/linux/md2core/minidump-2-core.cc", - # "src/processor/testdata/linux_test_app.cc", - "src/common/memory_allocator.h", - "src/common/linux/memory_mapped_file.cc", - "src/common/linux/file_id.cc", - "src/common/linux/safe_readlink.cc", - "src/client/minidump_file_writer.cc", - "src/client/linux/handler/exception_handler.cc", - "src/client/linux/handler/exception_handler_unittest.cc", - "src/client/linux/log/log.cc", - "src/client/linux/crash_generation/crash_generation_client.cc", - "src/client/linux/minidump_writer/linux_dumper.cc", - "src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc", - "src/client/linux/minidump_writer/proc_cpuinfo_reader.h", - "src/client/linux/minidump_writer/minidump_writer.cc", - "src/client/linux/minidump_writer/linux_ptrace_dumper.cc", - "src/client/linux/minidump_writer/cpu_set.h", - "src/client/linux/minidump_writer/directory_reader.h", - "src/client/linux/minidump_writer/line_reader.h" - ] - - for file in files_to_patch: - replace_in_file(self, - os.path.join(self.source_folder, "external", "breakpad", file), - "#include \"third_party/lss/linux_syscall_support.h\"", - "#include " - ) - - save(self, os.path.join(self.source_folder, "external", "CMakeLists.txt"), - textwrap.dedent("""\ - target_compile_features(breakpad_client PUBLIC cxx_std_11) - if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") - find_path(LINUX_SYSCALL_INCLUDE_DIR NAMES linux_syscall_support.h) - target_include_directories(breakpad_client PRIVATE ${LINUX_SYSCALL_INCLUDE_DIR}) - endif() - install(TARGETS breakpad_client - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin - ) - file(GLOB COMMON_FILES breakpad/src/common/*.h) - install(FILES ${COMMON_FILES} - DESTINATION include/breakpad/common - ) - set(PLATFORM_FOLDER) - if(IOS) - set(PLATFORM_FOLDER ios) - elseif(APPLE) - set(PLATFORM_FOLDER mac) - elseif(UNIX) - set(PLATFORM_FOLDER linux) - endif() - if(WIN32) - set(PLATFORM_FOLDER windows) - endif() - if(NOT PLATFORM_FOLDER) - message(FATAL_ERROR "Unknown os -> don't know how to install headers") - endif() - file(GLOB COMMON_PLATFORM_HEADERS breakpad/src/common/${PLATFORM_FOLDER}/*.h) - install(FILES ${COMMON_PLATFORM_HEADERS} - DESTINATION include/breakpad/common/${PLATFORM_FOLDER}) - install(DIRECTORY breakpad/src/client/${PLATFORM_FOLDER} - DESTINATION include/breakpad/client - FILES_MATCHING PATTERN *.h - ) - install(DIRECTORY breakpad/src/google_breakpad/common - DESTINATION include/breakpad/google_breakpad - FILES_MATCHING PATTERN *.h - ) - """), append=True) - def build(self): - self._patch_sources() + apply_conandata_patches(self) cmake = CMake(self) cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) cmake.build() diff --git a/recipes/sentry-breakpad/all/patches/0.4.18-0001-remove-third-pary-lss.patch b/recipes/sentry-breakpad/all/patches/0.4.18-0001-remove-third-pary-lss.patch new file mode 100644 index 0000000000000..a573e142644bb --- /dev/null +++ b/recipes/sentry-breakpad/all/patches/0.4.18-0001-remove-third-pary-lss.patch @@ -0,0 +1,227 @@ +commit a9d52d999e0450a2f6b7ca24b245e718ab537cec +Author: Martin Delille +Date: Tue Aug 8 11:59:04 2023 +0200 + + Remove third_party/lss + +diff --git a/external/breakpad/src/client/linux/crash_generation/crash_generation_client.cc b/external/breakpad/src/client/linux/crash_generation/crash_generation_client.cc +index d8bfbbad..b7b43cff 100644 +--- a/external/breakpad/src/client/linux/crash_generation/crash_generation_client.cc ++++ b/external/breakpad/src/client/linux/crash_generation/crash_generation_client.cc +@@ -37,7 +37,7 @@ + + #include "common/linux/eintr_wrapper.h" + #include "common/linux/ignore_ret.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/client/linux/handler/exception_handler.cc b/external/breakpad/src/client/linux/handler/exception_handler.cc +index 499be0a9..d6c3ba71 100644 +--- a/external/breakpad/src/client/linux/handler/exception_handler.cc ++++ b/external/breakpad/src/client/linux/handler/exception_handler.cc +@@ -95,7 +95,7 @@ + #include "client/linux/minidump_writer/linux_dumper.h" + #include "client/linux/minidump_writer/minidump_writer.h" + #include "common/linux/eintr_wrapper.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + #if defined(__ANDROID__) + #include "linux/sched.h" +diff --git a/external/breakpad/src/client/linux/handler/exception_handler_unittest.cc b/external/breakpad/src/client/linux/handler/exception_handler_unittest.cc +index 35dcbfd4..21647998 100644 +--- a/external/breakpad/src/client/linux/handler/exception_handler_unittest.cc ++++ b/external/breakpad/src/client/linux/handler/exception_handler_unittest.cc +@@ -50,7 +50,7 @@ + #include "common/linux/linux_libc_support.h" + #include "common/tests/auto_tempdir.h" + #include "common/using_std_string.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + #include "google_breakpad/processor/minidump.h" + + using namespace google_breakpad; +diff --git a/external/breakpad/src/client/linux/log/log.cc b/external/breakpad/src/client/linux/log/log.cc +index 31879409..072377ed 100644 +--- a/external/breakpad/src/client/linux/log/log.cc ++++ b/external/breakpad/src/client/linux/log/log.cc +@@ -33,7 +33,7 @@ + #include + #include + #else +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + #endif + + namespace logger { +diff --git a/external/breakpad/src/client/linux/minidump_writer/cpu_set.h b/external/breakpad/src/client/linux/minidump_writer/cpu_set.h +index 1cca9aa5..50f83d8c 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/cpu_set.h ++++ b/external/breakpad/src/client/linux/minidump_writer/cpu_set.h +@@ -35,7 +35,7 @@ + #include + + #include "common/linux/linux_libc_support.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/client/linux/minidump_writer/directory_reader.h b/external/breakpad/src/client/linux/minidump_writer/directory_reader.h +index a4bde180..e1c69a23 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/directory_reader.h ++++ b/external/breakpad/src/client/linux/minidump_writer/directory_reader.h +@@ -38,7 +38,7 @@ + #include + + #include "common/linux/linux_libc_support.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/client/linux/minidump_writer/line_reader.h b/external/breakpad/src/client/linux/minidump_writer/line_reader.h +index 9fc4b7cc..cf75dfe0 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/line_reader.h ++++ b/external/breakpad/src/client/linux/minidump_writer/line_reader.h +@@ -35,7 +35,7 @@ + #include + + #include "common/linux/linux_libc_support.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/client/linux/minidump_writer/linux_dumper.cc b/external/breakpad/src/client/linux/minidump_writer/linux_dumper.cc +index 44430c4e..a702ee68 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/linux_dumper.cc ++++ b/external/breakpad/src/client/linux/minidump_writer/linux_dumper.cc +@@ -51,7 +51,7 @@ + #include "common/linux/memory_mapped_file.h" + #include "common/linux/safe_readlink.h" + #include "google_breakpad/common/minidump_exception_linux.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + using google_breakpad::elf::FileID; + +diff --git a/external/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc b/external/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc +index 331f4bb3..c4c5bd42 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc ++++ b/external/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc +@@ -39,7 +39,7 @@ + #include + + #include "common/scoped_ptr.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + #if defined(__ARM_EABI__) + #define TID_PTR_REGISTER "r3" +diff --git a/external/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc b/external/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc +index e3ddb81a..6712af94 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc ++++ b/external/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc +@@ -57,7 +57,7 @@ + #include "client/linux/minidump_writer/directory_reader.h" + #include "client/linux/minidump_writer/line_reader.h" + #include "common/linux/linux_libc_support.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + // Suspends a thread by attaching to it. + static bool SuspendThread(pid_t pid) { +diff --git a/external/breakpad/src/client/linux/minidump_writer/minidump_writer.cc b/external/breakpad/src/client/linux/minidump_writer/minidump_writer.cc +index 7ce9ac57..4d9f1e21 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/minidump_writer.cc ++++ b/external/breakpad/src/client/linux/minidump_writer/minidump_writer.cc +@@ -79,7 +79,7 @@ + #include "common/linux/linux_libc_support.h" + #include "common/minidump_type_helper.h" + #include "google_breakpad/common/minidump_format.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace { + +diff --git a/external/breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader.h b/external/breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader.h +index d9461bf3..a915a88b 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader.h ++++ b/external/breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader.h +@@ -36,7 +36,7 @@ + + #include "client/linux/minidump_writer/line_reader.h" + #include "common/linux/linux_libc_support.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/client/minidump_file_writer.cc b/external/breakpad/src/client/minidump_file_writer.cc +index 5c3c5cbb..6b0e2dd0 100644 +--- a/external/breakpad/src/client/minidump_file_writer.cc ++++ b/external/breakpad/src/client/minidump_file_writer.cc +@@ -41,7 +41,7 @@ + #include "common/linux/linux_libc_support.h" + #include "common/string_conversion.h" + #if defined(__linux__) && __linux__ +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + #endif + + #if defined(__ANDROID__) +diff --git a/external/breakpad/src/common/linux/file_id.cc b/external/breakpad/src/common/linux/file_id.cc +index b483eb5c..eff1e8ce 100644 +--- a/external/breakpad/src/common/linux/file_id.cc ++++ b/external/breakpad/src/common/linux/file_id.cc +@@ -46,7 +46,7 @@ + #include "common/linux/linux_libc_support.h" + #include "common/linux/memory_mapped_file.h" + #include "common/using_std_string.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + namespace elf { +diff --git a/external/breakpad/src/common/linux/memory_mapped_file.cc b/external/breakpad/src/common/linux/memory_mapped_file.cc +index 99362945..efaae8ec 100644 +--- a/external/breakpad/src/common/linux/memory_mapped_file.cc ++++ b/external/breakpad/src/common/linux/memory_mapped_file.cc +@@ -40,7 +40,7 @@ + #include + + #include "common/memory_range.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/common/linux/safe_readlink.cc b/external/breakpad/src/common/linux/safe_readlink.cc +index 870c28af..37872b5b 100644 +--- a/external/breakpad/src/common/linux/safe_readlink.cc ++++ b/external/breakpad/src/common/linux/safe_readlink.cc +@@ -32,7 +32,7 @@ + + #include + +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/common/memory_allocator.h b/external/breakpad/src/common/memory_allocator.h +index d28fbfc3..fbf8c977 100644 +--- a/external/breakpad/src/common/memory_allocator.h ++++ b/external/breakpad/src/common/memory_allocator.h +@@ -47,7 +47,7 @@ + #define sys_munmap munmap + #define MAP_ANONYMOUS MAP_ANON + #else +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + #endif + + namespace google_breakpad { diff --git a/recipes/sentry-breakpad/all/patches/0.4.18-0002-install-breakpad-header.patch b/recipes/sentry-breakpad/all/patches/0.4.18-0002-install-breakpad-header.patch new file mode 100644 index 0000000000000..2956814e8f096 --- /dev/null +++ b/recipes/sentry-breakpad/all/patches/0.4.18-0002-install-breakpad-header.patch @@ -0,0 +1,54 @@ +commit 6f1543b58c2ae4dbe129aec0123e45461da24c3c +Author: Martin Delille +Date: Tue Aug 8 12:45:23 2023 +0200 + + Update external/CMakeLists.txt to install breakpad headers + +diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt +index ca807f7..41d7cd4 100644 +--- a/external/CMakeLists.txt ++++ b/external/CMakeLists.txt +@@ -177,3 +177,43 @@ target_include_directories(breakpad_client + PUBLIC + "$" + ) ++ ++target_compile_features(breakpad_client PUBLIC cxx_std_11) ++if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") ++ find_path(LINUX_SYSCALL_INCLUDE_DIR NAMES linux_syscall_support.h) ++ target_include_directories(breakpad_client PRIVATE ${LINUX_SYSCALL_INCLUDE_DIR}) ++endif() ++install(TARGETS breakpad_client ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++ RUNTIME DESTINATION bin ++) ++file(GLOB COMMON_FILES breakpad/src/common/*.h) ++install(FILES ${COMMON_FILES} ++ DESTINATION include/breakpad/common ++) ++set(PLATFORM_FOLDER) ++if(IOS) ++ set(PLATFORM_FOLDER ios) ++elseif(APPLE) ++ set(PLATFORM_FOLDER mac) ++elseif(UNIX) ++ set(PLATFORM_FOLDER linux) ++endif() ++if(WIN32) ++ set(PLATFORM_FOLDER windows) ++endif() ++if(NOT PLATFORM_FOLDER) ++ message(FATAL_ERROR "Unknown os -> don't know how to install headers") ++endif() ++file(GLOB COMMON_PLATFORM_HEADERS breakpad/src/common/${PLATFORM_FOLDER}/*.h) ++install(FILES ${COMMON_PLATFORM_HEADERS} ++ DESTINATION include/breakpad/common/${PLATFORM_FOLDER}) ++install(DIRECTORY breakpad/src/client/${PLATFORM_FOLDER} ++ DESTINATION include/breakpad/client ++ FILES_MATCHING PATTERN *.h ++) ++install(DIRECTORY breakpad/src/google_breakpad/common ++ DESTINATION include/breakpad/google_breakpad ++ FILES_MATCHING PATTERN *.h ++) diff --git a/recipes/sentry-breakpad/all/patches/0.5.4-0001-remove-third-pary-lss.patch b/recipes/sentry-breakpad/all/patches/0.5.4-0001-remove-third-pary-lss.patch new file mode 100644 index 0000000000000..f97256dfd7ea1 --- /dev/null +++ b/recipes/sentry-breakpad/all/patches/0.5.4-0001-remove-third-pary-lss.patch @@ -0,0 +1,227 @@ +commit d4424474455a06293d64571b58bef889a8956c34 +Author: Martin Delille +Date: Tue Aug 8 11:59:04 2023 +0200 + + Remove third_party/lss + +diff --git a/external/breakpad/src/client/linux/crash_generation/crash_generation_client.cc b/external/breakpad/src/client/linux/crash_generation/crash_generation_client.cc +index 5a8c6b4c..ea502283 100644 +--- a/external/breakpad/src/client/linux/crash_generation/crash_generation_client.cc ++++ b/external/breakpad/src/client/linux/crash_generation/crash_generation_client.cc +@@ -36,7 +36,7 @@ + + #include "common/linux/eintr_wrapper.h" + #include "common/linux/ignore_ret.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/client/linux/handler/exception_handler.cc b/external/breakpad/src/client/linux/handler/exception_handler.cc +index bbdb798b..cc8e451b 100644 +--- a/external/breakpad/src/client/linux/handler/exception_handler.cc ++++ b/external/breakpad/src/client/linux/handler/exception_handler.cc +@@ -94,7 +94,7 @@ + #include "client/linux/minidump_writer/linux_dumper.h" + #include "client/linux/minidump_writer/minidump_writer.h" + #include "common/linux/eintr_wrapper.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + #if defined(__ANDROID__) + #include "linux/sched.h" +diff --git a/external/breakpad/src/client/linux/handler/exception_handler_unittest.cc b/external/breakpad/src/client/linux/handler/exception_handler_unittest.cc +index 691ea133..93ae3cae 100644 +--- a/external/breakpad/src/client/linux/handler/exception_handler_unittest.cc ++++ b/external/breakpad/src/client/linux/handler/exception_handler_unittest.cc +@@ -49,7 +49,7 @@ + #include "common/linux/linux_libc_support.h" + #include "common/tests/auto_tempdir.h" + #include "common/using_std_string.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + #include "google_breakpad/processor/minidump.h" + + using namespace google_breakpad; +diff --git a/external/breakpad/src/client/linux/log/log.cc b/external/breakpad/src/client/linux/log/log.cc +index c45de64b..69b8832a 100644 +--- a/external/breakpad/src/client/linux/log/log.cc ++++ b/external/breakpad/src/client/linux/log/log.cc +@@ -32,7 +32,7 @@ + #include + #include + #else +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + #endif + + namespace logger { +diff --git a/external/breakpad/src/client/linux/minidump_writer/cpu_set.h b/external/breakpad/src/client/linux/minidump_writer/cpu_set.h +index 70c1c758..92f7cdec 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/cpu_set.h ++++ b/external/breakpad/src/client/linux/minidump_writer/cpu_set.h +@@ -34,7 +34,7 @@ + #include + + #include "common/linux/linux_libc_support.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/client/linux/minidump_writer/directory_reader.h b/external/breakpad/src/client/linux/minidump_writer/directory_reader.h +index 62bba877..568278ff 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/directory_reader.h ++++ b/external/breakpad/src/client/linux/minidump_writer/directory_reader.h +@@ -37,7 +37,7 @@ + #include + + #include "common/linux/linux_libc_support.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/client/linux/minidump_writer/line_reader.h b/external/breakpad/src/client/linux/minidump_writer/line_reader.h +index d54a67d0..9ba8cd4c 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/line_reader.h ++++ b/external/breakpad/src/client/linux/minidump_writer/line_reader.h +@@ -34,7 +34,7 @@ + #include + + #include "common/linux/linux_libc_support.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/client/linux/minidump_writer/linux_dumper.cc b/external/breakpad/src/client/linux/minidump_writer/linux_dumper.cc +index 01b06fac..d967034d 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/linux_dumper.cc ++++ b/external/breakpad/src/client/linux/minidump_writer/linux_dumper.cc +@@ -50,7 +50,7 @@ + #include "common/linux/memory_mapped_file.h" + #include "common/linux/safe_readlink.h" + #include "google_breakpad/common/minidump_exception_linux.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + using google_breakpad::elf::FileID; + +diff --git a/external/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc b/external/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc +index bc1e4fbe..01fa6bd4 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc ++++ b/external/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc +@@ -38,7 +38,7 @@ + #include + + #include "common/scoped_ptr.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + #if defined(__ARM_EABI__) + #define TID_PTR_REGISTER "r3" +diff --git a/external/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc b/external/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc +index 718fab7c..51be53ea 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc ++++ b/external/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc +@@ -56,7 +56,7 @@ + #include "client/linux/minidump_writer/directory_reader.h" + #include "client/linux/minidump_writer/line_reader.h" + #include "common/linux/linux_libc_support.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + // Suspends a thread by attaching to it. + static bool SuspendThread(pid_t pid) { +diff --git a/external/breakpad/src/client/linux/minidump_writer/minidump_writer.cc b/external/breakpad/src/client/linux/minidump_writer/minidump_writer.cc +index a5f9b841..6b9241a8 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/minidump_writer.cc ++++ b/external/breakpad/src/client/linux/minidump_writer/minidump_writer.cc +@@ -78,7 +78,7 @@ + #include "common/linux/linux_libc_support.h" + #include "common/minidump_type_helper.h" + #include "google_breakpad/common/minidump_format.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace { + +diff --git a/external/breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader.h b/external/breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader.h +index 5ae16dfb..dcbb2e63 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader.h ++++ b/external/breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader.h +@@ -35,7 +35,7 @@ + + #include "client/linux/minidump_writer/line_reader.h" + #include "common/linux/linux_libc_support.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/client/minidump_file_writer.cc b/external/breakpad/src/client/minidump_file_writer.cc +index d5193e2c..e9d0b3bd 100644 +--- a/external/breakpad/src/client/minidump_file_writer.cc ++++ b/external/breakpad/src/client/minidump_file_writer.cc +@@ -40,7 +40,7 @@ + #include "common/linux/linux_libc_support.h" + #include "common/string_conversion.h" + #if defined(__linux__) && __linux__ +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + #endif + + #if defined(__ANDROID__) +diff --git a/external/breakpad/src/common/linux/file_id.cc b/external/breakpad/src/common/linux/file_id.cc +index 0bd2a759..a330f9c1 100644 +--- a/external/breakpad/src/common/linux/file_id.cc ++++ b/external/breakpad/src/common/linux/file_id.cc +@@ -45,7 +45,7 @@ + #include "common/linux/linux_libc_support.h" + #include "common/linux/memory_mapped_file.h" + #include "common/using_std_string.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + namespace elf { +diff --git a/external/breakpad/src/common/linux/memory_mapped_file.cc b/external/breakpad/src/common/linux/memory_mapped_file.cc +index 7e444607..f193163b 100644 +--- a/external/breakpad/src/common/linux/memory_mapped_file.cc ++++ b/external/breakpad/src/common/linux/memory_mapped_file.cc +@@ -39,7 +39,7 @@ + #include + + #include "common/memory_range.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/common/linux/safe_readlink.cc b/external/breakpad/src/common/linux/safe_readlink.cc +index 97ea62c0..27f39326 100644 +--- a/external/breakpad/src/common/linux/safe_readlink.cc ++++ b/external/breakpad/src/common/linux/safe_readlink.cc +@@ -31,7 +31,7 @@ + + #include + +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/common/memory_allocator.h b/external/breakpad/src/common/memory_allocator.h +index 1c99913a..5fa3c337 100644 +--- a/external/breakpad/src/common/memory_allocator.h ++++ b/external/breakpad/src/common/memory_allocator.h +@@ -46,7 +46,7 @@ + #define sys_munmap munmap + #define MAP_ANONYMOUS MAP_ANON + #else +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + #endif + + namespace google_breakpad { diff --git a/recipes/sentry-breakpad/all/patches/0.5.4-0002-install-breakpad-header.patch b/recipes/sentry-breakpad/all/patches/0.5.4-0002-install-breakpad-header.patch new file mode 100644 index 0000000000000..4af6201d0565f --- /dev/null +++ b/recipes/sentry-breakpad/all/patches/0.5.4-0002-install-breakpad-header.patch @@ -0,0 +1,54 @@ +commit 32bf5d991a43151e149a88ee77d600170713ad69 +Author: Martin Delille +Date: Tue Aug 8 12:45:23 2023 +0200 + + Update external/CMakeLists.txt to install breakpad headers + +diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt +index ca807f7..41d7cd4 100644 +--- a/external/CMakeLists.txt ++++ b/external/CMakeLists.txt +@@ -177,3 +177,43 @@ target_include_directories(breakpad_client + PUBLIC + "$" + ) ++ ++target_compile_features(breakpad_client PUBLIC cxx_std_11) ++if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") ++ find_path(LINUX_SYSCALL_INCLUDE_DIR NAMES linux_syscall_support.h) ++ target_include_directories(breakpad_client PRIVATE ${LINUX_SYSCALL_INCLUDE_DIR}) ++endif() ++install(TARGETS breakpad_client ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++ RUNTIME DESTINATION bin ++) ++file(GLOB COMMON_FILES breakpad/src/common/*.h) ++install(FILES ${COMMON_FILES} ++ DESTINATION include/breakpad/common ++) ++set(PLATFORM_FOLDER) ++if(IOS) ++ set(PLATFORM_FOLDER ios) ++elseif(APPLE) ++ set(PLATFORM_FOLDER mac) ++elseif(UNIX) ++ set(PLATFORM_FOLDER linux) ++endif() ++if(WIN32) ++ set(PLATFORM_FOLDER windows) ++endif() ++if(NOT PLATFORM_FOLDER) ++ message(FATAL_ERROR "Unknown os -> don't know how to install headers") ++endif() ++file(GLOB COMMON_PLATFORM_HEADERS breakpad/src/common/${PLATFORM_FOLDER}/*.h) ++install(FILES ${COMMON_PLATFORM_HEADERS} ++ DESTINATION include/breakpad/common/${PLATFORM_FOLDER}) ++install(DIRECTORY breakpad/src/client/${PLATFORM_FOLDER} ++ DESTINATION include/breakpad/client ++ FILES_MATCHING PATTERN *.h ++) ++install(DIRECTORY breakpad/src/google_breakpad/common ++ DESTINATION include/breakpad/google_breakpad ++ FILES_MATCHING PATTERN *.h ++) diff --git a/recipes/sentry-breakpad/all/patches/0.6.x-0001-remove-third-pary-lss.patch b/recipes/sentry-breakpad/all/patches/0.6.x-0001-remove-third-pary-lss.patch new file mode 100644 index 0000000000000..5134a67b8fcd0 --- /dev/null +++ b/recipes/sentry-breakpad/all/patches/0.6.x-0001-remove-third-pary-lss.patch @@ -0,0 +1,227 @@ +commit 2f63423367c2624a26e60b3867dd2462530d9334 +Author: Martin Delille +Date: Tue Aug 8 11:59:04 2023 +0200 + + Remove third_party/lss + +diff --git a/external/breakpad/src/client/linux/crash_generation/crash_generation_client.cc b/external/breakpad/src/client/linux/crash_generation/crash_generation_client.cc +index f06273d5..45599971 100644 +--- a/external/breakpad/src/client/linux/crash_generation/crash_generation_client.cc ++++ b/external/breakpad/src/client/linux/crash_generation/crash_generation_client.cc +@@ -40,7 +40,7 @@ + + #include "common/linux/eintr_wrapper.h" + #include "common/linux/ignore_ret.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/client/linux/handler/exception_handler.cc b/external/breakpad/src/client/linux/handler/exception_handler.cc +index 9e23c119..4edd781c 100644 +--- a/external/breakpad/src/client/linux/handler/exception_handler.cc ++++ b/external/breakpad/src/client/linux/handler/exception_handler.cc +@@ -98,7 +98,7 @@ + #include "client/linux/minidump_writer/linux_dumper.h" + #include "client/linux/minidump_writer/minidump_writer.h" + #include "common/linux/eintr_wrapper.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + #if defined(__ANDROID__) + #include "linux/sched.h" +diff --git a/external/breakpad/src/client/linux/handler/exception_handler_unittest.cc b/external/breakpad/src/client/linux/handler/exception_handler_unittest.cc +index b2d8d468..a9199e2d 100644 +--- a/external/breakpad/src/client/linux/handler/exception_handler_unittest.cc ++++ b/external/breakpad/src/client/linux/handler/exception_handler_unittest.cc +@@ -53,7 +53,7 @@ + #include "common/linux/linux_libc_support.h" + #include "common/tests/auto_tempdir.h" + #include "common/using_std_string.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + #include "google_breakpad/processor/minidump.h" + + using namespace google_breakpad; +diff --git a/external/breakpad/src/client/linux/log/log.cc b/external/breakpad/src/client/linux/log/log.cc +index 2a48d7fe..0e3329a4 100644 +--- a/external/breakpad/src/client/linux/log/log.cc ++++ b/external/breakpad/src/client/linux/log/log.cc +@@ -36,7 +36,7 @@ + #include + #include + #else +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + #endif + + namespace logger { +diff --git a/external/breakpad/src/client/linux/minidump_writer/cpu_set.h b/external/breakpad/src/client/linux/minidump_writer/cpu_set.h +index 70c1c758..92f7cdec 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/cpu_set.h ++++ b/external/breakpad/src/client/linux/minidump_writer/cpu_set.h +@@ -34,7 +34,7 @@ + #include + + #include "common/linux/linux_libc_support.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/client/linux/minidump_writer/directory_reader.h b/external/breakpad/src/client/linux/minidump_writer/directory_reader.h +index 62bba877..568278ff 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/directory_reader.h ++++ b/external/breakpad/src/client/linux/minidump_writer/directory_reader.h +@@ -37,7 +37,7 @@ + #include + + #include "common/linux/linux_libc_support.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/client/linux/minidump_writer/line_reader.h b/external/breakpad/src/client/linux/minidump_writer/line_reader.h +index d54a67d0..9ba8cd4c 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/line_reader.h ++++ b/external/breakpad/src/client/linux/minidump_writer/line_reader.h +@@ -34,7 +34,7 @@ + #include + + #include "common/linux/linux_libc_support.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/client/linux/minidump_writer/linux_dumper.cc b/external/breakpad/src/client/linux/minidump_writer/linux_dumper.cc +index 85922a9c..3df94a6b 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/linux_dumper.cc ++++ b/external/breakpad/src/client/linux/minidump_writer/linux_dumper.cc +@@ -54,7 +54,7 @@ + #include "common/linux/memory_mapped_file.h" + #include "common/linux/safe_readlink.h" + #include "google_breakpad/common/minidump_exception_linux.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + using google_breakpad::elf::FileID; + +diff --git a/external/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc b/external/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc +index 5a135fda..9f27f8d9 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc ++++ b/external/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc +@@ -42,7 +42,7 @@ + #include + + #include "common/scoped_ptr.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + #if defined(__ARM_EABI__) + #define TID_PTR_REGISTER "r3" +diff --git a/external/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc b/external/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc +index 0e58236b..d8613cd3 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc ++++ b/external/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc +@@ -60,7 +60,7 @@ + #include "client/linux/minidump_writer/directory_reader.h" + #include "client/linux/minidump_writer/line_reader.h" + #include "common/linux/linux_libc_support.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + // Suspends a thread by attaching to it. + static bool SuspendThread(pid_t pid) { +diff --git a/external/breakpad/src/client/linux/minidump_writer/minidump_writer.cc b/external/breakpad/src/client/linux/minidump_writer/minidump_writer.cc +index a95dd254..a0ed1e1d 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/minidump_writer.cc ++++ b/external/breakpad/src/client/linux/minidump_writer/minidump_writer.cc +@@ -82,7 +82,7 @@ + #include "common/linux/linux_libc_support.h" + #include "common/minidump_type_helper.h" + #include "google_breakpad/common/minidump_format.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace { + +diff --git a/external/breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader.h b/external/breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader.h +index 5ae16dfb..dcbb2e63 100644 +--- a/external/breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader.h ++++ b/external/breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader.h +@@ -35,7 +35,7 @@ + + #include "client/linux/minidump_writer/line_reader.h" + #include "common/linux/linux_libc_support.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/client/minidump_file_writer.cc b/external/breakpad/src/client/minidump_file_writer.cc +index c00af36c..acf5a520 100644 +--- a/external/breakpad/src/client/minidump_file_writer.cc ++++ b/external/breakpad/src/client/minidump_file_writer.cc +@@ -44,7 +44,7 @@ + #include "common/linux/linux_libc_support.h" + #include "common/string_conversion.h" + #if defined(__linux__) && __linux__ +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + #endif + + #if defined(__ANDROID__) +diff --git a/external/breakpad/src/common/linux/file_id.cc b/external/breakpad/src/common/linux/file_id.cc +index d8fcbd8d..c81e43bc 100644 +--- a/external/breakpad/src/common/linux/file_id.cc ++++ b/external/breakpad/src/common/linux/file_id.cc +@@ -49,7 +49,7 @@ + #include "common/linux/linux_libc_support.h" + #include "common/linux/memory_mapped_file.h" + #include "common/using_std_string.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + namespace elf { +diff --git a/external/breakpad/src/common/linux/memory_mapped_file.cc b/external/breakpad/src/common/linux/memory_mapped_file.cc +index a7b96eb5..b89a3c95 100644 +--- a/external/breakpad/src/common/linux/memory_mapped_file.cc ++++ b/external/breakpad/src/common/linux/memory_mapped_file.cc +@@ -43,7 +43,7 @@ + #include + + #include "common/memory_range.h" +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/common/linux/safe_readlink.cc b/external/breakpad/src/common/linux/safe_readlink.cc +index a42b01a5..939e5309 100644 +--- a/external/breakpad/src/common/linux/safe_readlink.cc ++++ b/external/breakpad/src/common/linux/safe_readlink.cc +@@ -35,7 +35,7 @@ + + #include + +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + + namespace google_breakpad { + +diff --git a/external/breakpad/src/common/memory_allocator.h b/external/breakpad/src/common/memory_allocator.h +index 1c99913a..5fa3c337 100644 +--- a/external/breakpad/src/common/memory_allocator.h ++++ b/external/breakpad/src/common/memory_allocator.h +@@ -46,7 +46,7 @@ + #define sys_munmap munmap + #define MAP_ANONYMOUS MAP_ANON + #else +-#include "third_party/lss/linux_syscall_support.h" ++#include "linux_syscall_support.h" + #endif + + namespace google_breakpad { diff --git a/recipes/sentry-breakpad/all/patches/0.6.x-0002-install-breakpad-header.patch b/recipes/sentry-breakpad/all/patches/0.6.x-0002-install-breakpad-header.patch new file mode 100644 index 0000000000000..e71cb09fcd187 --- /dev/null +++ b/recipes/sentry-breakpad/all/patches/0.6.x-0002-install-breakpad-header.patch @@ -0,0 +1,54 @@ +commit 78914ad6c0099d1ca4d891435c85ba0a6289814d +Author: Martin Delille +Date: Tue Aug 8 12:45:23 2023 +0200 + + Update external/CMakeLists.txt to install breakpad headers + +diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt +index 9f3a298..31ac3f8 100644 +--- a/external/CMakeLists.txt ++++ b/external/CMakeLists.txt +@@ -185,3 +185,43 @@ target_include_directories(breakpad_client + PUBLIC + "$" + ) ++ ++target_compile_features(breakpad_client PUBLIC cxx_std_11) ++if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") ++ find_path(LINUX_SYSCALL_INCLUDE_DIR NAMES linux_syscall_support.h) ++ target_include_directories(breakpad_client PRIVATE ${LINUX_SYSCALL_INCLUDE_DIR}) ++endif() ++install(TARGETS breakpad_client ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++ RUNTIME DESTINATION bin ++) ++file(GLOB COMMON_FILES breakpad/src/common/*.h) ++install(FILES ${COMMON_FILES} ++ DESTINATION include/breakpad/common ++) ++set(PLATFORM_FOLDER) ++if(IOS) ++ set(PLATFORM_FOLDER ios) ++elseif(APPLE) ++ set(PLATFORM_FOLDER mac) ++elseif(UNIX) ++ set(PLATFORM_FOLDER linux) ++endif() ++if(WIN32) ++ set(PLATFORM_FOLDER windows) ++endif() ++if(NOT PLATFORM_FOLDER) ++ message(FATAL_ERROR "Unknown os -> don't know how to install headers") ++endif() ++file(GLOB COMMON_PLATFORM_HEADERS breakpad/src/common/${PLATFORM_FOLDER}/*.h) ++install(FILES ${COMMON_PLATFORM_HEADERS} ++ DESTINATION include/breakpad/common/${PLATFORM_FOLDER}) ++install(DIRECTORY breakpad/src/client/${PLATFORM_FOLDER} ++ DESTINATION include/breakpad/client ++ FILES_MATCHING PATTERN *.h ++) ++install(DIRECTORY breakpad/src/google_breakpad/common ++ DESTINATION include/breakpad/google_breakpad ++ FILES_MATCHING PATTERN *.h ++) From 2b9fdef89fdb389275df584b615cb3029bf3223c Mon Sep 17 00:00:00 2001 From: Thomas Steiner <47025493+steinerthomas@users.noreply.github.com> Date: Wed, 9 Aug 2023 20:08:17 +0200 Subject: [PATCH 150/637] (#19019) sqlitecpp: bump sqlite3 3.42.0 --- recipes/sqlitecpp/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/sqlitecpp/all/conanfile.py b/recipes/sqlitecpp/all/conanfile.py index 70dd5900f9a1a..3cb33ddd1e3dd 100644 --- a/recipes/sqlitecpp/all/conanfile.py +++ b/recipes/sqlitecpp/all/conanfile.py @@ -43,7 +43,7 @@ def configure(self): self.options.rm_safe("fPIC") def requirements(self): - self.requires("sqlite3/3.40.0") + self.requires("sqlite3/3.42.0") def validate(self): if Version(self.version) >= "3.0.0" and self.info.settings.compiler.get_safe("cppstd"): From b9727130b965a5eb00a45ef71264e52d62c9d329 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 9 Aug 2023 20:19:05 +0200 Subject: [PATCH 151/637] (#19117) librttopo: bump geos --- recipes/librttopo/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/librttopo/all/conanfile.py b/recipes/librttopo/all/conanfile.py index ceb7c7bc70c18..aeef7fdcae406 100644 --- a/recipes/librttopo/all/conanfile.py +++ b/recipes/librttopo/all/conanfile.py @@ -45,7 +45,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("geos/3.11.1", transitive_headers=True, transitive_libs=True) + self.requires("geos/3.11.2", transitive_headers=True, transitive_libs=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 981a12748abe6a0875ef18625b0ac9e378b314dd Mon Sep 17 00:00:00 2001 From: Thomas Steiner <47025493+steinerthomas@users.noreply.github.com> Date: Wed, 9 Aug 2023 23:09:05 +0200 Subject: [PATCH 152/637] (#18937) poco: sqlite3 bump 3.42.0 * poco sqlite3 3.42.0 * sqlitecpp sqlite3 3.42.0 * Revert sqlitecpp --------- Co-authored-by: Uilian Ries --- recipes/poco/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/poco/all/conanfile.py b/recipes/poco/all/conanfile.py index 330da5a01ce34..a9fe39975ab8a 100644 --- a/recipes/poco/all/conanfile.py +++ b/recipes/poco/all/conanfile.py @@ -116,7 +116,7 @@ def requirements(self): if self.options.enable_xml: self.requires("expat/2.5.0") if self.options.enable_data_sqlite: - self.requires("sqlite3/3.41.2") + self.requires("sqlite3/3.42.0") if self.options.enable_apacheconnector: self.requires("apr/1.7.0") self.requires("apr-util/1.6.1") From cb446e5070838ef568d6a4438cf8a6cab617e3b4 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 10 Aug 2023 11:36:14 +0900 Subject: [PATCH 153/637] (#19132) etl: add version 20.37.3 --- 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 716bd8799f7d5..048eb0ba5716e 100644 --- a/recipes/etl/all/conandata.yml +++ b/recipes/etl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "20.37.3": + url: "https://github.com/ETLCPP/etl/archive/20.37.3.tar.gz" + sha256: "fbdf60c770772cd96d1eb25bdf56e4f45f23bf4029e18ef1f2af1f2056b9ea41" "20.37.2": url: "https://github.com/ETLCPP/etl/archive/20.37.2.tar.gz" sha256: "13bd5d9d1bfbc887e3182895ca0291df0008a1c5770ddd12ef6cd2215c2bc6af" diff --git a/recipes/etl/config.yml b/recipes/etl/config.yml index b1fd5bf4caa62..aa2b1c54bb8bd 100644 --- a/recipes/etl/config.yml +++ b/recipes/etl/config.yml @@ -1,4 +1,6 @@ versions: + "20.37.3": + folder: all "20.37.2": folder: all "20.37.1": From 6ae5af76a1535994cff26adb4cc7da1da0ac932d Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Thu, 10 Aug 2023 10:24:31 +0200 Subject: [PATCH 154/637] (#19134) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 0b338c3849bdd..00fca46490117 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -211,6 +211,7 @@ required_for_references: - cxxopts - cyclonedds - cyrus-sasl +- czmq - dacap-clip - darknet - dataframe @@ -703,6 +704,7 @@ required_for_references: - mp-units - mpark-variant - mpc +- mpfr - mpg123 - mpmcqueue - mppp @@ -989,6 +991,7 @@ required_for_references: - svgpp - svgwrite - symengine +- systemc - szip - tabulate - taglib @@ -1048,6 +1051,7 @@ required_for_references: - utfcpp - util-linux-libuuid - uvw +- uwebsockets - vaapi - variant-lite - vdpau From ea3af1333d855ce9d028d046ace13e153b5763cc Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 10 Aug 2023 17:49:45 +0900 Subject: [PATCH 155/637] (#19130) drogon: fix compilation error on gcc13 * drogon: fix compilation error on gcc13 * support 1.8.2 --- recipes/drogon/all/conandata.yml | 12 ++++++++++++ .../all/patches/1.8.2-0004-support-gcc13.patch | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 recipes/drogon/all/patches/1.8.2-0004-support-gcc13.patch diff --git a/recipes/drogon/all/conandata.yml b/recipes/drogon/all/conandata.yml index 3ee3725bb502d..dd03c6b133f92 100644 --- a/recipes/drogon/all/conandata.yml +++ b/recipes/drogon/all/conandata.yml @@ -28,6 +28,10 @@ patches: - patch_file: "patches/1.8.4-0004-find-package-yaml-cpp.patch" patch_description: "Fix yaml-cpp cmake target name" patch_type: "conan" + - patch_file: "patches/1.8.2-0004-support-gcc13.patch" + patch_description: "Fix compilation error on gcc13 with C++17" + patch_type: "portability" + patch_source: "https://github.com/drogonframework/drogon/pull/1563/" "1.8.3": - patch_file: "patches/1.8.0-0001-disable-unused-data.patch" patch_description: "Consume Trantor package from Conan instead of using the\ @@ -39,6 +43,10 @@ patches: - patch_file: "patches/1.8.3-0003-find-package-sqlite.patch" patch_description: "Fix sqlite cmake target name" patch_type: "conan" + - patch_file: "patches/1.8.2-0004-support-gcc13.patch" + patch_description: "Fix compilation error on gcc13 with C++17" + patch_type: "portability" + patch_source: "https://github.com/drogonframework/drogon/pull/1563/" "1.8.2": - patch_file: "patches/1.8.0-0001-disable-unused-data.patch" patch_description: "Consume Trantor package from Conan instead of using the\ @@ -50,6 +58,10 @@ patches: - patch_file: "patches/1.8.2-0003-find-package-sqlite.patch" patch_description: "Fix sqlite cmake target name" patch_type: "conan" + - patch_file: "patches/1.8.2-0004-support-gcc13.patch" + patch_description: "Fix compilation error on gcc13 with C++17" + patch_type: "portability" + patch_source: "https://github.com/drogonframework/drogon/pull/1563/" "1.8.0": - patch_file: "patches/1.8.0-0001-disable-unused-data.patch" patch_description: "Consume Trantor package from Conan instead of using the subproject" diff --git a/recipes/drogon/all/patches/1.8.2-0004-support-gcc13.patch b/recipes/drogon/all/patches/1.8.2-0004-support-gcc13.patch new file mode 100644 index 0000000000000..477d23fb1fd63 --- /dev/null +++ b/recipes/drogon/all/patches/1.8.2-0004-support-gcc13.patch @@ -0,0 +1,12 @@ +diff --git a/lib/inc/drogon/RateLimiter.h b/lib/inc/drogon/RateLimiter.h +index 3b8706b..dece795 100644 +--- a/lib/inc/drogon/RateLimiter.h ++++ b/lib/inc/drogon/RateLimiter.h +@@ -3,6 +3,7 @@ + #include + #include + #include ++#include + + namespace drogon + { From 216654c1aefde6294eefeb67fceab9307a209bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Thu, 10 Aug 2023 10:57:35 +0200 Subject: [PATCH 156/637] Add backup sources config (#18082) --- .c3i/config_v2.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.c3i/config_v2.yml b/.c3i/config_v2.yml index b5ee3148ca00b..1f13510578fc9 100644 --- a/.c3i/config_v2.yml +++ b/.c3i/config_v2.yml @@ -4,6 +4,14 @@ id: 'conan-io/conan-center-index' conan: version: 2.0.9 + backup_sources: + upload_url: "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/" + download_url: "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/" + + globalconf: + - 'core.sources:download_cache={{ CONFIG_HOME }}/backup_sources_cache' + - 'core.sources:download_urls=["{{ ARTI_DOWNLOAD_URL }}", "origin"]' + - 'core.sources:upload_url={{ ARTI_UPLOAD_URL }}' artifactory: url: "https://c3i.jfrog.io/c3i" From f3a66013c215e28bed06746407ccc09c4e4f50d7 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 11 Aug 2023 00:29:28 +0900 Subject: [PATCH 157/637] (#18958) fpzip: add recipe * fpzip: add recipe * add FPZIP_SHARED_LIBS --- recipes/fpzip/all/conandata.yml | 4 + recipes/fpzip/all/conanfile.py | 80 ++++++++++ recipes/fpzip/all/test_package/CMakeLists.txt | 7 + recipes/fpzip/all/test_package/conanfile.py | 26 ++++ recipes/fpzip/all/test_package/test_package.c | 142 ++++++++++++++++++ recipes/fpzip/config.yml | 3 + 6 files changed, 262 insertions(+) create mode 100644 recipes/fpzip/all/conandata.yml create mode 100644 recipes/fpzip/all/conanfile.py create mode 100644 recipes/fpzip/all/test_package/CMakeLists.txt create mode 100644 recipes/fpzip/all/test_package/conanfile.py create mode 100644 recipes/fpzip/all/test_package/test_package.c create mode 100644 recipes/fpzip/config.yml diff --git a/recipes/fpzip/all/conandata.yml b/recipes/fpzip/all/conandata.yml new file mode 100644 index 0000000000000..ef306da4b0649 --- /dev/null +++ b/recipes/fpzip/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.3.0": + url: "https://github.com/LLNL/fpzip/releases/download/1.3.0/fpzip-1.3.0.tar.gz" + sha256: "248df7d84259e3feaa4c4797956b2a77c3fcd734e8f8fdc51ce171dcf4f0136c" diff --git a/recipes/fpzip/all/conanfile.py b/recipes/fpzip/all/conanfile.py new file mode 100644 index 0000000000000..2369b2e58e6b6 --- /dev/null +++ b/recipes/fpzip/all/conanfile.py @@ -0,0 +1,80 @@ +from conan import ConanFile +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +import os + + +required_conan_version = ">=1.53.0" + +class FpzipConan(ConanFile): + name = "fpzip" + description = "Lossless compressor of multidimensional floating-point arrays" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://fpzip.llnl.gov/" + topics = ("compression", "lossless", "floating-point") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_fp": ["fast", "safe", "emul", "int"], + } + default_options = { + "shared": False, + "fPIC": True, + "with_fp": "fast", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + @property + def _fp_name_table(self): + return { + "fast": "FPZIP_FP_FAST", + "safe": "FPZIP_FP_SAFE", + "emul": "FPZIP_FP_EMUL", + "int": "FPZIP_FP_INT", + } + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["FPZIP_FP"] = self._fp_name_table.get(str(self.options.with_fp), "FP_ZIP_FAST") + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.libs = ["fpzip"] + self.cpp_info.defines.append("FPZIP_FP={}".format(self._fp_name_table.get(str(self.options.with_fp), "FP_ZIP_FAST"))) + if self.options.shared: + self.cpp_info.defines.append("FPZIP_SHARED_LIBS") + if self.settings.compiler in ["gcc", "clang", "apple-clang"]: + self.cpp_info.system_libs += ["stdc++"] diff --git a/recipes/fpzip/all/test_package/CMakeLists.txt b/recipes/fpzip/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..1476da8811ce6 --- /dev/null +++ b/recipes/fpzip/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(fpzip REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE fpzip::fpzip) diff --git a/recipes/fpzip/all/test_package/conanfile.py b/recipes/fpzip/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/fpzip/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/fpzip/all/test_package/test_package.c b/recipes/fpzip/all/test_package/test_package.c new file mode 100644 index 0000000000000..8e359fe8da319 --- /dev/null +++ b/recipes/fpzip/all/test_package/test_package.c @@ -0,0 +1,142 @@ +#include +#include +#include +#include +#include + +#include "fpzip.h" + +static size_t +compress(FPZ* fpz, const void* data) +{ + size_t size; + /* write header */ + if (!fpzip_write_header(fpz)) { + fprintf(stderr, "cannot write header: %s\n", fpzip_errstr[fpzip_errno]); + return 0; + } + /* perform actual compression */ + size = fpzip_write(fpz, data); + if (!size) { + fprintf(stderr, "compression failed: %s\n", fpzip_errstr[fpzip_errno]); + return 0; + } + return size; +} + +static int +decompress(FPZ* fpz, void* data, size_t inbytes) +{ + /* read header */ + if (!fpzip_read_header(fpz)) { + fprintf(stderr, "cannot read header: %s\n", fpzip_errstr[fpzip_errno]); + return 0; + } + /* make sure array size stored in header matches expectations */ + if ((fpz->type == FPZIP_TYPE_FLOAT ? sizeof(float) : sizeof(double)) * fpz->nx * fpz->ny * fpz->nz * fpz->nf != inbytes) { + fprintf(stderr, "array size does not match dimensions from header\n"); + return 0; + } + /* perform actual decompression */ + if (!fpzip_read(fpz, data)) { + fprintf(stderr, "decompression failed: %s\n", fpzip_errstr[fpzip_errno]); + return 0; + } + return 1; +} + +static float +float_rand() +{ + static unsigned int seed = 1; + double val; + seed = 1103515245 * seed + 12345; + seed &= 0x7fffffffu; + val = ldexp((double)seed, -31); + val = 2 * val - 1; + val *= val * val; + val *= val * val; + return val; +} + +/* generate a trilinear field perturbed by random noise */ +float* +float_field(int nx, int ny, int nz, float offset) +{ + int n = nx * ny * nz; + float* field = malloc(n * sizeof(float)); + int i, x, y, z; + /* generate random field */ + *field = offset; + for (i = 1; i < n; i++) + field[i] = float_rand(); + /* integrate along x */ + for (z = 0; z < nz; z++) + for (y = 0; y < ny; y++) + for (x = 1; x < nx; x++) + field[x + nx * (y + ny * z)] += field[(x - 1) + nx * (y + ny * z)]; + /* integrate along y */ + for (z = 0; z < nz; z++) + for (y = 1; y < ny; y++) + for (x = 0; x < nx; x++) + field[x + nx * (y + ny * z)] += field[x + nx * ((y - 1) + ny * z)]; + /* integrate along z */ + for (z = 1; z < nz; z++) + for (y = 0; y < ny; y++) + for (x = 0; x < nx; x++) + field[x + nx * (y + ny * z)] += field[x + nx * (y + ny * (z - 1))]; + return field; +} + +static void +test_float_array(const float* field, int nx, int ny, int nz, int prec) +{ + int status; + unsigned int actual_checksum; + int dims = (nz == 1 ? ny == 1 ? 1 : 2 : 3); + size_t inbytes = nx * ny * nz * sizeof(float); + size_t bufbytes = 1024 + inbytes; + size_t outbytes = 0; + void* buffer = malloc(bufbytes); + float* copy = malloc(inbytes); + char name[0x100]; + + /* compress to memory */ + FPZ* fpz = fpzip_write_to_buffer(buffer, bufbytes); + fpz->type = FPZIP_TYPE_FLOAT; + fpz->prec = prec; + fpz->nx = nx; + fpz->ny = ny; + fpz->nz = nz; + fpz->nf = 1; + outbytes = compress(fpz, field); + status = (0 < outbytes && outbytes <= bufbytes); + fpzip_write_close(fpz); + sprintf(name, "test.float.%dd.prec%d.compress", dims, prec); + + /* decompress */ + fpz = fpzip_read_from_buffer(buffer); + status = decompress(fpz, copy, inbytes); + fpzip_read_close(fpz); + sprintf(name, "test.float.%dd.prec%d.decompress", dims, prec); + + free(copy); + free(buffer); +} + +static int +test_float(int nx, int ny, int nz) +{ + float* field = float_field(nx, ny, nz, 0); + int prec = 8; + test_float_array(field, nx * ny * nz, 1, 1, prec); + test_float_array(field, nx, ny * nz, 1, prec); + test_float_array(field, nx, ny, nz, prec); + free(field); +} + +int main(void) { + test_float(65, 64, 63); + + return 0; +} diff --git a/recipes/fpzip/config.yml b/recipes/fpzip/config.yml new file mode 100644 index 0000000000000..426a0e4c79e9b --- /dev/null +++ b/recipes/fpzip/config.yml @@ -0,0 +1,3 @@ +versions: + "1.3.0": + folder: all From ebfaa8b83cd995e56dcbcd388038768a310e9cb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Thu, 10 Aug 2023 18:04:17 +0200 Subject: [PATCH 158/637] (#19136) Fix documentation typo --- docs/adding_packages/folders_and_files.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/adding_packages/folders_and_files.md b/docs/adding_packages/folders_and_files.md index 0136f36792b5b..b5a51c8d60309 100644 --- a/docs/adding_packages/folders_and_files.md +++ b/docs/adding_packages/folders_and_files.md @@ -140,7 +140,7 @@ When a package needs other packages those can be include with the `requirements( ```python def requirements(self): - self.require("fmt/9.0.0") + self.requires("fmt/9.0.0") ``` For more information see the [Dependencies](dependencies.md) documentation. From d2ce190148958e5c954def44d60e6d7bdb7e583e Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 10 Aug 2023 19:28:08 +0300 Subject: [PATCH 159/637] (#18893) openfst: migrate to Conan v2 * openfst: migrate to Conan v2 * openfst: restore VirtualRunEnv in test_package * openfst: use -pthread instead of -lpthread --- recipes/openfst/all/conandata.yml | 1 - recipes/openfst/all/conanfile.py | 123 ++++++++++-------- .../openfst/all/test_package/CMakeLists.txt | 5 +- recipes/openfst/all/test_package/conanfile.py | 21 ++- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../openfst/all/test_v1_package/conanfile.py | 17 +++ 6 files changed, 110 insertions(+), 65 deletions(-) create mode 100644 recipes/openfst/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/openfst/all/test_v1_package/conanfile.py diff --git a/recipes/openfst/all/conandata.yml b/recipes/openfst/all/conandata.yml index ef54f290e0077..aed678082ff26 100644 --- a/recipes/openfst/all/conandata.yml +++ b/recipes/openfst/all/conandata.yml @@ -5,4 +5,3 @@ sources: patches: "1.8.2": - patch_file: "patches/1.8.2-allocate-hint.patch" - base_path: "source_subfolder" diff --git a/recipes/openfst/all/conanfile.py b/recipes/openfst/all/conanfile.py index ef0a6f1a558d2..350f5171a2fd1 100644 --- a/recipes/openfst/all/conanfile.py +++ b/recipes/openfst/all/conanfile.py @@ -1,20 +1,26 @@ -from conans import ConanFile, AutoToolsBuildEnvironment, tools -from conans.errors import ConanInvalidConfiguration -import functools -from itertools import product import os +from itertools import product + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rename, rm, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.scm import Version -required_conan_version = ">=1.33.0" +required_conan_version = ">=1.53.0" class OpenFstConan(ConanFile): name = "openfst" description = "A library for constructing, combining, optimizing and searching weighted finite-state-transducers (FSTs)." - topics = ("asr", "fst", "wfst", "openfst") + license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.openfst.org/twiki/bin/view/FST/WebHome" - license = "Apache-2.0" + topics = ("asr", "fst", "wfst", "openfst") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -49,26 +55,27 @@ class OpenFstConan(ConanFile): "enable_special": False, } - @property - def _source_subfolder(self): - return "source_subfolder" - @property def _settings_build(self): return getattr(self, "settings_build", self.settings) + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + + def layout(self): + basic_layout(self, src_folder="src") def validate(self): - if self.settings.os != "Linux": - raise ConanInvalidConfiguration( - "OpenFst is only supported on linux") + if self.settings.os not in ["Linux", "FreeBSD"]: + raise ConanInvalidConfiguration("OpenFst is only supported on linux") compilers = { "gcc": "8", @@ -76,33 +83,36 @@ def validate(self): } if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, 17) + check_min_cppstd(self, 17) minimum_compiler = compilers.get(str(self.settings.compiler)) if minimum_compiler: - if tools.Version(self.settings.compiler.version) < minimum_compiler: - raise ConanInvalidConfiguration(f"{self.name} requires c++17, which your compiler does not support.") + if Version(self.settings.compiler.version) < minimum_compiler: + raise ConanInvalidConfiguration( + f"{self.name} requires c++17, which your compiler does not support." + ) else: - self.output.warn(f"{self.name} requires c++17, but this compiler is unknown to this recipe. Assuming your compiler supports c++17.") + self.output.warning( + f"{self.name} requires c++17, but this compiler is unknown to this recipe." + f" Assuming your compiler supports c++17." + ) # Check stdlib ABI compatibility if self.settings.compiler == "gcc" and self.settings.compiler.libcxx != "libstdc++11": - raise ConanInvalidConfiguration('Using %s with GCC requires "compiler.libcxx=libstdc++11"' % self.name) + raise ConanInvalidConfiguration( + f'Using {self.name} with GCC requires "compiler.libcxx=libstdc++11"' + ) elif self.settings.compiler == "clang" and self.settings.compiler.libcxx not in ["libstdc++11", "libc++"]: - raise ConanInvalidConfiguration('Using %s with Clang requires either "compiler.libcxx=libstdc++11"' - ' or "compiler.libcxx=libc++"' % self.name) + raise ConanInvalidConfiguration( + f'Using {self.name} with Clang requires either "compiler.libcxx=libstdc++11" or "compiler.libcxx=libc++"' + ) def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - @functools.lru_cache(1) - def _configure_autotools(self): - autotools = AutoToolsBuildEnvironment(self) + def generate(self): + tc = AutotoolsToolchain(self) yes_no = lambda v: "yes" if v else "no" - args = [ - "--with-pic={}".format(yes_no(self.options.get_safe("fPIC", True))), - "--enable-shared={}".format(yes_no(self.options.shared)), - "--enable-static={}".format(yes_no(not self.options.shared)), + tc.configure_args += [ "--enable-bin={}".format(yes_no(self.options.enable_bin)), "--enable-compact-fsts={}".format(yes_no(self.options.enable_compact_fsts)), "--enable-compress={}".format(yes_no(self.options.enable_compress)), @@ -115,47 +125,51 @@ def _configure_autotools(self): "--enable-ngram-fsts={}".format(yes_no(self.options.enable_ngram_fsts)), "--enable-pdt={}".format(yes_no(self.options.enable_pdt)), "--enable-special={}".format(yes_no(self.options.enable_special)), - "LIBS=-lpthread", ] - autotools.configure(args=args, configure_dir=self._source_subfolder) - return autotools - - def export_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + tc.extra_cflags.append("-pthread") + tc.extra_cxxflags.append("-pthread") + tc.generate() def _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) + apply_conandata_patches(self) def build(self): self._patch_sources() - autotools = self._configure_autotools() + autotools = Autotools(self) + autotools.configure() autotools.make() def package(self): - self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder) - autotools = self._configure_autotools() + copy(self, "COPYING", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + + autotools = Autotools(self) autotools.install() lib_dir = os.path.join(self.package_folder, "lib") lib_subdir = os.path.join(self.package_folder, "lib", "fst") if os.path.exists(lib_subdir): for fn in os.listdir(lib_subdir): - tools.rename(os.path.join(lib_subdir, fn), os.path.join(lib_dir, "lib{}".format(fn))) - tools.rmdir(lib_subdir) + rename(self, + os.path.join(lib_subdir, fn), + os.path.join(lib_dir, f"lib{fn}")) + rmdir(self, lib_subdir) - tools.rmdir(os.path.join(self.package_folder, "share")) - tools.remove_files_by_mask(lib_dir, "*.la") + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.la", lib_dir, recursive=True) @property def _get_const_fsts_libs(self): - return ["const{}-fst".format(n) for n in [8, 16, 64]] + return [f"const{n}-fst" for n in [8, 16, 64]] @property def _get_compact_fsts_libs(self): - return ["compact{}_{}-fst".format(n, fst) - for n, fst in product([8, 16, 64], ["acceptor", "string", "unweighted_acceptor", "unweighted", "weighted_string"])] + return [f"compact{n}_{fst}-fst" + for n, fst in product( + [8, 16, 64], + ["acceptor", "string", "unweighted_acceptor", "unweighted", "weighted_string"] + )] def package_info(self): self.cpp_info.set_property("cmake_file_name", "OpenFst") @@ -196,8 +210,9 @@ def package_info(self): if self.options.enable_pdt or self.options.enable_grm: self.cpp_info.libs.append("fstpdtscript") - bindir = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment var: {}".format(bindir)) - self.env_info.PATH.append(bindir) - self.cpp_info.system_libs = ["pthread", "dl", "m"] + + # TODO: Legacy, to be removed on Conan 2.0 + bindir = os.path.join(self.package_folder, "bin") + self.output.info(f"Appending PATH environment var: {bindir}") + self.env_info.PATH.append(bindir) diff --git a/recipes/openfst/all/test_package/CMakeLists.txt b/recipes/openfst/all/test_package/CMakeLists.txt index cdd919fc9ae03..71588be2b8f7e 100644 --- a/recipes/openfst/all/test_package/CMakeLists.txt +++ b/recipes/openfst/all/test_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) set(CMAKE_CXX_STANDARD 17) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(OpenFst REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/openfst/all/test_package/conanfile.py b/recipes/openfst/all/test_package/conanfile.py index 90eb89e3f2f46..ef5d7042163ec 100644 --- a/recipes/openfst/all/test_package/conanfile.py +++ b/recipes/openfst/all/test_package/conanfile.py @@ -1,10 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -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/openfst/all/test_v1_package/CMakeLists.txt b/recipes/openfst/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/openfst/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/openfst/all/test_v1_package/conanfile.py b/recipes/openfst/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..90eb89e3f2f46 --- /dev/null +++ b/recipes/openfst/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 39a944e865c161cbad60c158c2d6c8fe37a4f646 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 10 Aug 2023 19:52:09 +0300 Subject: [PATCH 160/637] (#18939) djinni-generator: migrate to Conan v2 --- recipes/djinni-generator/all/conanfile.py | 47 ++++++++++++++----- .../all/test_package/conanfile.py | 22 +++++---- .../all/test_v1_package/conanfile.py | 21 +++++++++ 3 files changed, 69 insertions(+), 21 deletions(-) create mode 100644 recipes/djinni-generator/all/test_v1_package/conanfile.py diff --git a/recipes/djinni-generator/all/conanfile.py b/recipes/djinni-generator/all/conanfile.py index ae2c62ed78bb5..f6319f3914356 100644 --- a/recipes/djinni-generator/all/conanfile.py +++ b/recipes/djinni-generator/all/conanfile.py @@ -1,37 +1,60 @@ import os -from conans import ConanFile, tools +from conan import ConanFile +from conan.tools.files import copy, download +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.47.0" class Djinni(ConanFile): name = "djinni-generator" + description = "Djinni is a tool for generating cross-language type declarations and interface bindings." + license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://djinni.xlcpp.dev" - description = "Djinni is a tool for generating cross-language type declarations and interface bindings." topics = ("java", "Objective-C", "ios", "Android") - license = "Apache-2.0" - settings = "os", "arch" + package_type = "application" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + del self.info.settings.compiler + del self.info.settings.build_type def source(self): filename = os.path.basename(self.conan_data["sources"][self.version]["url"]) - tools.download(filename=filename, **self.conan_data["sources"][self.version]) - tools.download(filename="LICENSE", url="https://raw.githubusercontent.com/cross-language-cpp/djinni-generator/main/LICENSE") + download(self, filename=filename, **self.conan_data["sources"][self.version]) + download(self, filename="LICENSE", url="https://raw.githubusercontent.com/cross-language-cpp/djinni-generator/main/LICENSE") def build(self): pass # avoid warning for missing build steps def package(self): - if tools.detected_os() == "Windows": - os.rename('djinni','djinni.bat') - self.copy("djinni.bat", dst="bin", keep_path=False) + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder, + keep_path=False) + copy(self, "djinni", + dst=os.path.join(self.package_folder, "bin"), + src=self.source_folder, + keep_path=False) + if self.settings.os == "Windows": + os.rename(os.path.join(self.package_folder, "bin", "djinni"), + os.path.join(self.package_folder, "bin", "djinni.bat")) else: - self.copy("djinni", dst="bin", keep_path=False) executable = os.path.join(self.package_folder, "bin", "djinni") os.chmod(executable, os.stat(executable).st_mode | 0o111) - self.copy("LICENSE", dst="licenses", keep_path=False) def package_info(self): + self.cpp_info.frameworkdirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] self.cpp_info.includedirs = [] - self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) + # TODO: Legacy, to be removed on Conan 2.0 + self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) diff --git a/recipes/djinni-generator/all/test_package/conanfile.py b/recipes/djinni-generator/all/test_package/conanfile.py index 456428a9a8670..7d899a138c0dd 100644 --- a/recipes/djinni-generator/all/test_package/conanfile.py +++ b/recipes/djinni-generator/all/test_package/conanfile.py @@ -1,21 +1,25 @@ - from io import StringIO -from conans import ConanFile, tools + +from conan import ConanFile +from conan.tools.build import can_run + class TestPackageConan(ConanFile): - settings = "os", "arch" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" - def build(self): - pass # please no warning that we build nothing + def build_requirements(self): + self.tool_requires(self.tested_reference_str) def test(self): - if not tools.cross_building(self.settings): + if can_run(self): output = StringIO() - self.run("djinni --help", output=output, run_environment=True) - output.seek(0, 0) + self.run("djinni --help", output) + output.seek(0) found_usage = False for line in output: if "Usage: djinni [options]" in line: found_usage = True break - assert(found_usage) + assert found_usage diff --git a/recipes/djinni-generator/all/test_v1_package/conanfile.py b/recipes/djinni-generator/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..456428a9a8670 --- /dev/null +++ b/recipes/djinni-generator/all/test_v1_package/conanfile.py @@ -0,0 +1,21 @@ + +from io import StringIO +from conans import ConanFile, tools + +class TestPackageConan(ConanFile): + settings = "os", "arch" + + def build(self): + pass # please no warning that we build nothing + + def test(self): + if not tools.cross_building(self.settings): + output = StringIO() + self.run("djinni --help", output=output, run_environment=True) + output.seek(0, 0) + found_usage = False + for line in output: + if "Usage: djinni [options]" in line: + found_usage = True + break + assert(found_usage) From e69902cb0473c637073ebbc993a961f228440436 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 10 Aug 2023 20:29:25 +0300 Subject: [PATCH 161/637] (#18984) pupnp: migrate to Conan v2 --- recipes/pupnp/all/conanfile.py | 121 ++++++++---------- recipes/pupnp/all/test_package/CMakeLists.txt | 7 +- recipes/pupnp/all/test_package/conanfile.py | 21 ++- .../pupnp/all/test_v1_package/CMakeLists.txt | 8 ++ .../pupnp/all/test_v1_package/conanfile.py | 17 +++ 5 files changed, 96 insertions(+), 78 deletions(-) create mode 100644 recipes/pupnp/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/pupnp/all/test_v1_package/conanfile.py diff --git a/recipes/pupnp/all/conanfile.py b/recipes/pupnp/all/conanfile.py index be3c8ca6dae34..b3ee88419c46c 100644 --- a/recipes/pupnp/all/conanfile.py +++ b/recipes/pupnp/all/conanfile.py @@ -1,8 +1,14 @@ -from conans import AutoToolsBuildEnvironment, ConanFile, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rm, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.53.0" class PupnpConan(ConanFile): @@ -15,8 +21,10 @@ class PupnpConan(ConanFile): license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/pupnp/pupnp" - topics = ("conan", "upnp", "networking") - settings = "os", "compiler", "build_type", "arch" + topics = ("upnp", "networking") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -28,7 +36,7 @@ class PupnpConan(ConanFile): "largefile": [True, False], "tools": [True, False], "blocking-tcp": [True, False], - "debug": [True, False] + "debug": [True, False], } default_options = { "shared": False, @@ -41,95 +49,74 @@ class PupnpConan(ConanFile): "largefile": True, "tools": True, "blocking-tcp": False, - "debug": True # Actually enables logging routines... + "debug": True, } - _autotools = None - @property - def _source_subfolder(self): - return "source_subfolder" + def _settings_build(self): + return getattr(self, "settings_build", self.settings) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + + def layout(self): + basic_layout(self, src_folder="src") def validate(self): - if self.settings.compiler == "Visual Studio": + if is_msvc(self): # Note, pupnp has build instructions for Visual Studio but they # include VC 6 and require pthreads-w32 library. # Someone who needs it and has possibility to build it could step in. raise ConanInvalidConfiguration("Visual Studio not supported yet in this recipe") - @property - def _settings_build(self): - return getattr(self, "settings_build", self.settings) - def build_requirements(self): - self.build_requires("libtool/2.4.6") - self.build_requires("pkgconf/1.7.4") - if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): - self.build_requires("msys2/cci.latest") + self.tool_requires("libtool/2.4.7") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/1.9.5") + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _configure_autotools(self): - if not self._autotools: - args = [ - "--enable-static=%s" % ("no" if self.options.shared else "yes"), - "--enable-shared=%s" % ("yes" if self.options.shared else "no"), - "--disable-samples", - ] - - def enable_disable(opt): - what = "enable" if getattr(self.options, opt) else "disable" - return "--{}-{}".format(what, opt) - - args.extend( - map( - enable_disable, - ( - "ipv6", - "reuseaddr", - "webserver", - "client", - "device", - "largefile", - "tools", - "debug" - ), - ) - ) - - args.append("--%s-blocking_tcp_connections" % ("enable" if getattr(self.options, "blocking-tcp") else "disable")) - - self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - self._autotools.configure(configure_dir=self._source_subfolder, args=args) - return self._autotools + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = AutotoolsToolchain(self) + features = {} + features["samples"] = False + features["blocking_tcp_connections"] = self.options["blocking-tcp"] + for opt in ("ipv6", "reuseaddr", "webserver", "client", "device", "largefile", "tools", "debug"): + features[opt] = self.options[opt] + for feature, enabled in features.items(): + what = "enable" if enabled else "disable" + tc.configure_args.append(f"--{what}-{feature}") + tc.generate() def build(self): - with tools.chdir(self._source_subfolder): - self.run("{} -fiv".format(tools.get_env("AUTORECONF")), win_bash=tools.os_info.is_windows) - autotools = self._configure_autotools() + autotools = Autotools(self) + autotools.autoreconf() + autotools.configure() autotools.make() def package(self): - self.copy("COPYING", dst="licenses", src=self._source_subfolder) - autotools = self._configure_autotools() + copy(self, "COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + autotools = Autotools(self) autotools.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.la") + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rm(self, "*.la", self.package_folder, recursive=True) def package_info(self): - self.cpp_info.names["pkg_config"] = "libupnp" + self.cpp_info.set_property("pkg_config_name", "libupnp") self.cpp_info.libs = ["upnp", "ixml"] self.cpp_info.includedirs.append(os.path.join("include", "upnp")) if self.settings.os in ["Linux", "FreeBSD"]: diff --git a/recipes/pupnp/all/test_package/CMakeLists.txt b/recipes/pupnp/all/test_package/CMakeLists.txt index 4715fd995b522..d453ce024a968 100644 --- a/recipes/pupnp/all/test_package/CMakeLists.txt +++ b/recipes/pupnp/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(pupnp REQUIRED) +find_package(pupnp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} pupnp::pupnp) diff --git a/recipes/pupnp/all/test_package/conanfile.py b/recipes/pupnp/all/test_package/conanfile.py index 91263ae215697..ef5d7042163ec 100644 --- a/recipes/pupnp/all/test_package/conanfile.py +++ b/recipes/pupnp/all/test_package/conanfile.py @@ -1,11 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import CMake, ConanFile, tools +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" -class PupnpTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -13,5 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self, skip_x64_x86=True): - self.run(os.path.join("bin", "test_package"), 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/pupnp/all/test_v1_package/CMakeLists.txt b/recipes/pupnp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/pupnp/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/pupnp/all/test_v1_package/conanfile.py b/recipes/pupnp/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..b1255b47b830e --- /dev/null +++ b/recipes/pupnp/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os + +from conans import CMake, ConanFile, tools + + +class PupnpTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self, skip_x64_x86=True): + self.run(os.path.join("bin", "test_package"), run_environment=True) From 29994e05d35b6756254b90a88204d69ff7a6314a Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 11 Aug 2023 02:52:46 +0900 Subject: [PATCH 162/637] (#19133) libmysqlclient: add version 8.1.0 --- recipes/libmysqlclient/all/conandata.yml | 7 +++++++ .../patches/0006-fix-cpp20-build-8.1.0.patch | 17 +++++++++++++++++ recipes/libmysqlclient/config.yml | 2 ++ 3 files changed, 26 insertions(+) create mode 100644 recipes/libmysqlclient/all/patches/0006-fix-cpp20-build-8.1.0.patch diff --git a/recipes/libmysqlclient/all/conandata.yml b/recipes/libmysqlclient/all/conandata.yml index 6ace30de16974..78b5ed97e3e15 100644 --- a/recipes/libmysqlclient/all/conandata.yml +++ b/recipes/libmysqlclient/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "8.1.0": + url: "https://dev.mysql.com/get/Downloads/MySQL-8.1/mysql-8.1.0.tar.gz" + sha256: "3dd017a940734aa90796a4c65e125e6712f64bbbbe3388d36469deaa87b599eb" "8.0.34": url: "https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.34.tar.gz" sha256: "e65d03a3c42618b5fbf99042aed33209402e9b27aa62c7c8743ffd4788d8db1d" @@ -12,6 +15,10 @@ sources: url: "https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.25.tar.gz" sha256: "c16aa9cf621bc028efba2bb11f3c36a323b125fa0d108ff92fab60e46309206e" patches: + "8.1.0": + - patch_file: "patches/0006-fix-cpp20-build-8.1.0.patch" + patch_description: "Fix C++20 compilation" + patch_type: "portability" "8.0.34": - patch_file: "patches/0006-fix-cpp20-build-8.0.29.patch" patch_description: "Fix C++20 compilation" diff --git a/recipes/libmysqlclient/all/patches/0006-fix-cpp20-build-8.1.0.patch b/recipes/libmysqlclient/all/patches/0006-fix-cpp20-build-8.1.0.patch new file mode 100644 index 0000000000000..ebaba58ec7fab --- /dev/null +++ b/recipes/libmysqlclient/all/patches/0006-fix-cpp20-build-8.1.0.patch @@ -0,0 +1,17 @@ +diff --git a/sql/sql_bitmap.h b/sql/sql_bitmap.h +index 0f4a540..bd81a40 100644 +--- a/sql/sql_bitmap.h ++++ b/sql/sql_bitmap.h +@@ -145,10 +145,10 @@ class Bitmap<64> { + ulonglong map; + + public: +- Bitmap<64>() { init(); } ++ Bitmap() { init(); } + enum { ALL_BITS = 64 }; + +- explicit Bitmap<64>(uint prefix_to_set) { set_prefix(prefix_to_set); } ++ explicit Bitmap(uint prefix_to_set) { set_prefix(prefix_to_set); } + void init() { clear_all(); } + void init(uint prefix_to_set) { set_prefix(prefix_to_set); } + uint length() const { return 64; } diff --git a/recipes/libmysqlclient/config.yml b/recipes/libmysqlclient/config.yml index 7df89d243f495..1b617851b7de6 100644 --- a/recipes/libmysqlclient/config.yml +++ b/recipes/libmysqlclient/config.yml @@ -1,4 +1,6 @@ versions: + "8.1.0": + folder: all "8.0.34": folder: all "8.0.31": From d8efa063851f272049a78807deae4a957db68068 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Thu, 10 Aug 2023 20:35:27 +0200 Subject: [PATCH 163/637] (#19143) [freetype] Bump requirements for libpng and zlib --- recipes/freetype/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/freetype/all/conanfile.py b/recipes/freetype/all/conanfile.py index 2d1c5c126ce10..5073e3cf9b655 100644 --- a/recipes/freetype/all/conanfile.py +++ b/recipes/freetype/all/conanfile.py @@ -64,9 +64,9 @@ def layout(self): def requirements(self): if self.options.with_png: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <1.7]") if self.options.with_zlib: - self.requires("zlib/1.2.13") + self.requires("zlib/[>=1.2 <1.3]") if self.options.with_bzip2: self.requires("bzip2/1.0.8") if self.options.get_safe("with_brotli"): From c23527885c7fa4df0c1c1c9d0d69602b1fc43dbf Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 11 Aug 2023 16:30:16 +0900 Subject: [PATCH 164/637] (#19149) zookeeper-client-c: add version 3.9.0 --- recipes/zookeeper-client-c/all/conandata.yml | 7 +++++++ recipes/zookeeper-client-c/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/zookeeper-client-c/all/conandata.yml b/recipes/zookeeper-client-c/all/conandata.yml index f81d1f4e6d34f..0487be945d8c9 100644 --- a/recipes/zookeeper-client-c/all/conandata.yml +++ b/recipes/zookeeper-client-c/all/conandata.yml @@ -1,8 +1,15 @@ sources: + "3.9.0": + url: "https://archive.apache.org/dist/zookeeper/zookeeper-3.9.0/apache-zookeeper-3.9.0.tar.gz" + sha256: "c7af07e7411c798398bb8cd50f47780d8e014831666c41df6ec6540c143c0da2" "3.8.1": url: "https://archive.apache.org/dist/zookeeper/zookeeper-3.8.1/apache-zookeeper-3.8.1.tar.gz" sha256: "ccc16850c8ab2553583583234d11c813061b5ea5f3b8ff1d740cde6c1fd1e219" patches: + "3.9.0": + - patch_file: "patches/3.8.1-0001-add-install.patch" + patch_description: "add installer, disable cli program" + patch_type: "conan" "3.8.1": - patch_file: "patches/3.8.1-0001-add-install.patch" patch_description: "add installer, disable cli program" diff --git a/recipes/zookeeper-client-c/config.yml b/recipes/zookeeper-client-c/config.yml index f3cf585c380d6..31b8685d6b74a 100644 --- a/recipes/zookeeper-client-c/config.yml +++ b/recipes/zookeeper-client-c/config.yml @@ -1,3 +1,5 @@ versions: + "3.9.0": + folder: all "3.8.1": folder: all From b47f2ebfbf29742e5c1c7ceba26f674d784c0524 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Fri, 11 Aug 2023 10:44:49 +0200 Subject: [PATCH 165/637] (#19139) [bot] Update authorized users list (2023-08-10) --- .c3i/authorized_users.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 902e3fd4b97b9..29f7167d2ab9c 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1209,3 +1209,6 @@ authorized_users: - aliaksei135 - ibosnic00 - Xav83 +- matthewT53 +- sjlamerton +- marxin From 6ee3c95cb77ed11b7dfeda27d93895fb9052a102 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Fri, 11 Aug 2023 11:03:11 +0200 Subject: [PATCH 166/637] (#19142) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 00fca46490117..2158d3f771f43 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -119,6 +119,7 @@ required_for_references: - canvas_ity - capnproto - capstone +- cargs - catch2 - ccache - cccl From bd75b4178d25de88a5a3215216e008e3330d88ab Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Fri, 11 Aug 2023 11:28:21 +0200 Subject: [PATCH 167/637] (#19128) wil: add 1.0.230629.1 --- recipes/wil/all/conandata.yml | 3 +++ recipes/wil/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/wil/all/conandata.yml b/recipes/wil/all/conandata.yml index a123bb6fadf86..9253a5b752cf3 100644 --- a/recipes/wil/all/conandata.yml +++ b/recipes/wil/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.230629.1": + url: "https://github.com/microsoft/wil/archive/refs/tags/v1.0.230629.1.tar.gz" + sha256: "c0d9ad1f295e181aa28d7c9b219e7d530e6bc4b7533317be50e7eae760c8d63f" "1.0.230411.1": url: "https://github.com/microsoft/wil/archive/refs/tags/v1.0.230411.1.tar.gz" sha256: "03742849f5cb458fcfe8d30ff7afb6ff4bd67fe3aee3768cd6fb1140c59fcfd3" diff --git a/recipes/wil/config.yml b/recipes/wil/config.yml index 4e26f7b007f29..00c073f03a7a2 100644 --- a/recipes/wil/config.yml +++ b/recipes/wil/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.230629.1": + folder: "all" "1.0.230411.1": folder: "all" "1.0.230202.1": From 02ab9f1d8a79fa9e1937acde59d946df13dc095f Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Fri, 11 Aug 2023 12:07:39 +0200 Subject: [PATCH 168/637] (#18438) [sentry-native/0.6.5] Add version * [sentry-native/0.6.4] Add version * [sentry-native/0.6.5] Add version --- 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 17d89711effcc..ced5e36dba275 100644 --- a/recipes/sentry-native/all/conandata.yml +++ b/recipes/sentry-native/all/conandata.yml @@ -1,13 +1,13 @@ sources: + "0.6.5": + url: "https://github.com/getsentry/sentry-native/releases/download/0.6.5/sentry-native.zip" + sha256: "5f74a5c5c3abc6e1e7825d3306be9e3b3fd4e0f586f3cf7e86607d6f56a71995" "0.6.4": url: "https://github.com/getsentry/sentry-native/releases/download/0.6.4/sentry-native.zip" sha256: "e00278bf9a4821bb4008985a5a552a84aba6ebb06d3f9e828082fcbf06b04a38" "0.6.3": url: "https://github.com/getsentry/sentry-native/releases/download/0.6.3/sentry-native.zip" sha256: "6b515c17a9b860ea47c6a5fd7abdfdc89b4b8cbc654c23a8bb42a39bfcb87ad9" - "0.6.2": - url: "https://github.com/getsentry/sentry-native/releases/download/0.6.2/sentry-native.zip" - sha256: "9b9f4b2cec961ca132039c7887fb876b3dd6f4795b31ca01d188187f69758efa" "0.5.4": url: "https://github.com/getsentry/sentry-native/releases/download/0.5.4/sentry-native.zip" sha256: "e151bdc76894eb964ba4637361b2a96b7447fb04212053cf695fd7f72b636e4d" diff --git a/recipes/sentry-native/config.yml b/recipes/sentry-native/config.yml index fb99bc2eb64b8..3450228c14b09 100644 --- a/recipes/sentry-native/config.yml +++ b/recipes/sentry-native/config.yml @@ -1,10 +1,10 @@ versions: + "0.6.5": + folder: all "0.6.4": folder: all "0.6.3": folder: all - "0.6.2": - folder: all "0.5.4": folder: all "0.4.18": From 62f912380c62db5add03821791a9fc6d3f688e30 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Fri, 11 Aug 2023 12:30:06 +0200 Subject: [PATCH 169/637] (#19003) dbus: enable static build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * dbus: enable static build * fix windows static library name * Update recipes/dbus/1.x.x/conanfile.py Co-authored-by: Uilian Ries --------- Co-authored-by: Uilian Ries Co-authored-by: Rubén Rincón Blanco --- recipes/dbus/1.x.x/conandata.yml | 12 -- recipes/dbus/1.x.x/conanfile.py | 134 ++++++------------ .../1.x.x/patches/0001-cmake-project.patch | 23 --- ...make_configure_checks_list_separator.patch | 22 --- recipes/dbus/config.yml | 4 - 5 files changed, 47 insertions(+), 148 deletions(-) delete mode 100644 recipes/dbus/1.x.x/patches/0001-cmake-project.patch delete mode 100644 recipes/dbus/1.x.x/patches/0002-cmake_configure_checks_list_separator.patch diff --git a/recipes/dbus/1.x.x/conandata.yml b/recipes/dbus/1.x.x/conandata.yml index c3b193cfa06c5..3dc58977ca2ea 100644 --- a/recipes/dbus/1.x.x/conandata.yml +++ b/recipes/dbus/1.x.x/conandata.yml @@ -8,12 +8,6 @@ sources: "1.15.0": url: "https://dbus.freedesktop.org/releases/dbus/dbus-1.15.0.tar.xz" sha256: "5073c8cb9ad20226647bb38f4965182b762a6e1f595ccdc8e59411014bfd640a" - "1.14.0": - url: "https://dbus.freedesktop.org/releases/dbus/dbus-1.14.0.tar.xz" - sha256: "ccd7cce37596e0a19558fd6648d1272ab43f011d80c8635aea8fd0bad58aebd4" - "1.12.20": - url: "https://dbus.freedesktop.org/releases/dbus/dbus-1.12.20.tar.gz" - sha256: "f77620140ecb4cdc67f37fb444f8a6bea70b5b6461f12f1cbe2cec60fa7de5fe" patches: "1.15.2": - patch_file: "patches/0003-meson-monotonic-clock-check.patch" @@ -25,9 +19,3 @@ patches: patch_type: "portability" patch_description: "Fix detection of necessary monotonic clock functions in pthread" patch_source: "https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/352" - "1.12.20": - - patch_file: "patches/0001-cmake-project.patch" - - patch_file: "patches/0002-cmake_configure_checks_list_separator.patch" - patch_type: "portability" - url: "https://gitlab.freedesktop.org/dbus/dbus/-/commit/8cd1c2155252938ed38d2612e4d054c7fc0244c3.patch" - patch_source: "https://gitlab.freedesktop.org/dbus/dbus/-/issues/324" diff --git a/recipes/dbus/1.x.x/conanfile.py b/recipes/dbus/1.x.x/conanfile.py index 7be295c8d8605..c20fd3f03b189 100644 --- a/recipes/dbus/1.x.x/conanfile.py +++ b/recipes/dbus/1.x.x/conanfile.py @@ -1,7 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import fix_apple_shared_install_name, is_apple_os -from conan.tools.cmake import CMake, cmake_layout, CMakeDeps, CMakeToolchain from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, mkdir, rename, replace_in_file, rm, rmdir, save from conan.tools.gnu import PkgConfigDeps @@ -21,10 +20,12 @@ class DbusConan(ConanFile): homepage = "https://www.freedesktop.org/wiki/Software/dbus" description = "D-Bus is a simple system for interprocess communication and coordination." topics = "bus", "interprocess", "message" - package_type = "shared-library" + package_type = "library" settings = "os", "arch", "compiler", "build_type" short_paths = True options = { + "shared": [True, False], + "fPIC": [True, False], "system_socket": [None, "ANY"], "system_pid_file": [None, "ANY"], "with_x11": [True, False], @@ -34,6 +35,8 @@ class DbusConan(ConanFile): "session_socket_dir": ["ANY"], } default_options = { + "shared": False, + "fPIC": True, "system_socket": None, "system_pid_file": None, "with_x11": False, @@ -43,28 +46,25 @@ class DbusConan(ConanFile): "session_socket_dir": "/tmp", } - @property - def _meson_available(self): - return Version(self.version) >= "1.15.0" - def export_sources(self): export_conandata_patches(self) def config_options(self): - if self.settings.os not in ("Linux", "FreeBSD") or Version(self.version) < "1.14.0": + if self.settings.os not in ("Linux", "FreeBSD"): del self.options.with_systemd if self.settings.os not in ("Linux", "FreeBSD"): del self.options.with_x11 + if self.settings.os == "Windows": + del self.options.fPIC def configure(self): self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") + if self.options.shared: + self.options.rm_safe("fPIC") def layout(self): - if self._meson_available: - basic_layout(self, src_folder="src") - else: - cmake_layout(self, src_folder="src") + basic_layout(self, src_folder="src") def requirements(self): self.requires("expat/2.5.0") @@ -78,19 +78,13 @@ def requirements(self): self.requires("xorg/system") def validate(self): - if Version(self.version) >= "1.14.0": - if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < 7: - raise ConanInvalidConfiguration(f"{self.ref} requires at least gcc 7.") - - if not self._meson_available and self.settings.os == "Windows": - raise ConanInvalidConfiguration(f"{self.ref} does not support Windows. Contributions welcome.") + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < 7: + raise ConanInvalidConfiguration(f"{self.ref} requires at least gcc 7.") def build_requirements(self): - if self._meson_available: - self.tool_requires("meson/1.2.0") - if self._meson_available or self.options.get_safe("with_systemd"): - if not self.conf.get("tools.gnu:pkg_config",check_type=str): - self.tool_requires("pkgconf/1.9.5") + self.tool_requires("meson/1.2.0") + if not self.conf.get("tools.gnu:pkg_config",check_type=str): + self.tool_requires("pkgconf/1.9.5") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -98,77 +92,38 @@ def source(self): def generate(self): env = VirtualBuildEnv(self) env.generate() - if self._meson_available: - tc = MesonToolchain(self) - tc.project_options["asserts"] = not is_apple_os(self) - tc.project_options["checks"] = False - tc.project_options["doxygen_docs"] = "disabled" - tc.project_options["modular_tests"] = "disabled" - tc.project_options["system_socket"] = str(self.options.get_safe("system_socket", "")) - tc.project_options["system_pid_file"] = str(self.options.get_safe("system_pid_file", "")) - tc.project_options["session_socket_dir"] = str(self.options.get_safe("session_socket_dir", "")) - tc.project_options["selinux"] = "enabled" if self.options.get_safe("with_selinux", False) else "disabled" - tc.project_options["systemd"] = "enabled" if self.options.get_safe("with_systemd", False) else "disabled" - if self.options.get_safe("with_systemd", False): - tc.project_options["systemd_system_unitdir"] = os.path.join(self.package_folder, "lib", "systemd", "system") - tc.project_options["systemd_user_unitdir"] = os.path.join(self.package_folder, "lib", "systemd", "user") - if is_apple_os(self): - tc.project_options["launchd_agent_dir"] = os.path.join(self.package_folder, "res", "LaunchAgents") - tc.project_options["x11_autolaunch"] = "enabled" if self.options.get_safe("with_x11", False) else "disabled" - tc.project_options["xml_docs"] = "disabled" - tc.generate() - deps = PkgConfigDeps(self) - deps.generate() - else: - tc = CMakeToolchain(self) - tc.variables["DBUS_BUILD_TESTS"] = False - tc.variables["DBUS_ENABLE_DOXYGEN_DOCS"] = False - tc.variables["DBUS_ENABLE_XML_DOCS"] = False - tc.variables["DBUS_BUILD_X11"] = bool(self.options.get_safe("with_x11", False)) - tc.variables["ENABLE_SYSTEMD"] = "ON" if self.options.get_safe("with_systemd", False) else "OFF" - tc.variables["DBUS_WITH_GLIB"] = bool(self.options.get_safe("with_glib", False)) - tc.variables["DBUS_DISABLE_ASSERT"] = is_apple_os(self) - tc.variables["DBUS_DISABLE_CHECKS"] = False - tc.variables["DBUS_SYSTEM_BUS_DEFAULT_ADDRESS"] = str(self.options.get_safe("system_socket", "")) - - # Conan does not provide an EXPAT_LIBRARIES CMake variable for the Expat library. - # Define EXPAT_LIBRARIES to be the expat::expat target provided by Conan to fix linking. - tc.variables["EXPAT_LIBRARIES"] = "expat::expat" - - # https://github.com/freedesktop/dbus/commit/e827309976cab94c806fda20013915f1db2d4f5a - tc.variables["DBUS_SESSION_SOCKET_DIR"] = str(self.options.get_safe("session_socket_dir", "")) - - tc.cache_variables["CMAKE_FIND_PACKAGE_PREFER_CONFIG"] = False - tc.generate() - cmake_deps = CMakeDeps(self) - cmake_deps.generate() - if self.options.get_safe("with_systemd"): - deps = PkgConfigDeps(self) - deps.generate() + tc = MesonToolchain(self) + tc.project_options["asserts"] = not is_apple_os(self) + tc.project_options["checks"] = False + tc.project_options["doxygen_docs"] = "disabled" + tc.project_options["modular_tests"] = "disabled" + tc.project_options["system_socket"] = str(self.options.get_safe("system_socket", "")) + tc.project_options["system_pid_file"] = str(self.options.get_safe("system_pid_file", "")) + tc.project_options["session_socket_dir"] = str(self.options.get_safe("session_socket_dir", "")) + tc.project_options["selinux"] = "enabled" if self.options.get_safe("with_selinux", False) else "disabled" + tc.project_options["systemd"] = "enabled" if self.options.get_safe("with_systemd", False) else "disabled" + if self.options.get_safe("with_systemd", False): + tc.project_options["systemd_system_unitdir"] = os.path.join(self.package_folder, "lib", "systemd", "system") + tc.project_options["systemd_user_unitdir"] = os.path.join(self.package_folder, "lib", "systemd", "user") + if is_apple_os(self): + tc.project_options["launchd_agent_dir"] = os.path.join(self.package_folder, "res", "LaunchAgents") + tc.project_options["x11_autolaunch"] = "enabled" if self.options.get_safe("with_x11", False) else "disabled" + tc.project_options["xml_docs"] = "disabled" + tc.generate() + deps = PkgConfigDeps(self) + deps.generate() def build(self): apply_conandata_patches(self) - if self._meson_available: - replace_in_file(self, os.path.join(self.source_folder, "meson.build"), "subdir('test')", "# subdir('test')") - meson = Meson(self) - meson.configure() - meson.build() - else: - cmake = CMake(self) - build_script_folder = None - if Version(self.version) < "1.14.0": - build_script_folder = "cmake" - cmake.configure(build_script_folder=build_script_folder) - cmake.build() + replace_in_file(self, os.path.join(self.source_folder, "meson.build"), "subdir('test')", "# subdir('test')") + meson = Meson(self) + meson.configure() + meson.build() def package(self): copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - if self._meson_available: - meson = Meson(self) - meson.install() - else: - cmake = CMake(self) - cmake.install() + meson = Meson(self) + meson.install() rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) rmdir(self, os.path.join(self.package_folder, "share", "doc")) @@ -180,6 +135,8 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "lib", "systemd")) fix_apple_shared_install_name(self) + if self.settings.os == "Windows" and not self.options.shared: + rename(self, os.path.join(self.package_folder, "lib", "libdbus-1.a"), os.path.join(self.package_folder, "lib", "dbus-1.lib")) # TODO: to remove in conan v2 once cmake_find_package_* generators removed self._create_cmake_module_alias_targets( @@ -219,6 +176,9 @@ def package_info(self): else: self.cpp_info.system_libs.append("pthread") + if not self.options.shared: + self.cpp_info.defines.append("DBUS_STATIC_BUILD") + # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed self.cpp_info.filenames["cmake_find_package"] = "DBus1" self.cpp_info.filenames["cmake_find_package_multi"] = "DBus1" diff --git a/recipes/dbus/1.x.x/patches/0001-cmake-project.patch b/recipes/dbus/1.x.x/patches/0001-cmake-project.patch deleted file mode 100644 index 2d00f57d33527..0000000000000 --- a/recipes/dbus/1.x.x/patches/0001-cmake-project.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt -@@ -1,10 +1,3 @@ --# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked --list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules") -- --# we do not need to have WIN32 defined --set(CMAKE_LEGACY_CYGWIN_WIN32 0) -- --project(dbus) - - # we need to be up to date - CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2 FATAL_ERROR) -@@ -19,6 +12,9 @@ if(CMAKE_MAJOR_VERSION GREATER 2) - cmake_policy(SET CMP0054 NEW) - endif() - endif() -+set(CMAKE_LEGACY_CYGWIN_WIN32 0) -+project(dbus) -+list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules") - - # detect version - include(MacrosAutotools) diff --git a/recipes/dbus/1.x.x/patches/0002-cmake_configure_checks_list_separator.patch b/recipes/dbus/1.x.x/patches/0002-cmake_configure_checks_list_separator.patch deleted file mode 100644 index 7c60bf52d5ec2..0000000000000 --- a/recipes/dbus/1.x.x/patches/0002-cmake_configure_checks_list_separator.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake -index a9a5fc90..1a59461a 100644 ---- a/cmake/ConfigureChecks.cmake -+++ b/cmake/ConfigureChecks.cmake -@@ -43,7 +43,7 @@ check_symbol_exists(backtrace "execinfo.h" HAVE_BACKTRACE) # - check_symbol_exists(getgrouplist "grp.h" HAVE_GETGROUPLIST) # dbus-sysdeps.c - check_symbol_exists(getpeerucred "ucred.h" HAVE_GETPEERUCRED) # dbus-sysdeps.c, dbus-sysdeps-win.c - check_symbol_exists(nanosleep "time.h" HAVE_NANOSLEEP) # dbus-sysdeps.c --check_symbol_exists(getpwnam_r "errno.h pwd.h" HAVE_POSIX_GETPWNAM_R) # dbus-sysdeps-util-unix.c -+check_symbol_exists(getpwnam_r "errno.h;pwd.h" HAVE_POSIX_GETPWNAM_R) # dbus-sysdeps-util-unix.c - check_symbol_exists(setenv "stdlib.h" HAVE_SETENV) # dbus-sysdeps.c - check_symbol_exists(unsetenv "stdlib.h" HAVE_UNSETENV) # dbus-sysdeps.c - check_symbol_exists(clearenv "stdlib.h" HAVE_CLEARENV) # dbus-sysdeps.c -@@ -66,7 +66,7 @@ check_symbol_exists(getrlimit "sys/resource.h;sys/time.h" HAVE_GETRLIMIT) - check_symbol_exists(prlimit "sys/resource.h;sys/time.h" HAVE_PRLIMIT) - check_symbol_exists(setrlimit "sys/resource.h;sys/time.h" HAVE_SETRLIMIT) - --check_struct_member(cmsgcred cmcred_pid "sys/types.h sys/socket.h" HAVE_CMSGCRED) # dbus-sysdeps.c -+check_struct_member(cmsgcred cmcred_pid "sys/types.h;sys/socket.h" HAVE_CMSGCRED) # dbus-sysdeps.c - - # missing: - # DBUS_HAVE_GCC33_GCOV diff --git a/recipes/dbus/config.yml b/recipes/dbus/config.yml index b9caba7b44349..53bb57eb6cadc 100644 --- a/recipes/dbus/config.yml +++ b/recipes/dbus/config.yml @@ -5,7 +5,3 @@ versions: folder: 1.x.x "1.15.0": folder: 1.x.x - "1.14.0": - folder: 1.x.x - "1.12.20": - folder: 1.x.x From b65900a5b8d1b1c96b1e99ebc2b8dc8f293fc9bb Mon Sep 17 00:00:00 2001 From: Jason Sobotka Date: Fri, 11 Aug 2023 06:07:06 -0500 Subject: [PATCH 170/637] (#18027) [gdal] add version 3.7.0 --- recipes/gdal/config.yml | 2 + recipes/gdal/post_3.5.0/conandata.yml | 6 + .../3.7.0/0-replace-find-package.patch | 282 ++++++++++++++++++ 3 files changed, 290 insertions(+) create mode 100644 recipes/gdal/post_3.5.0/patches/3.7.0/0-replace-find-package.patch diff --git a/recipes/gdal/config.yml b/recipes/gdal/config.yml index 3a324b7465d34..da2f4dc3a9cab 100644 --- a/recipes/gdal/config.yml +++ b/recipes/gdal/config.yml @@ -1,4 +1,6 @@ versions: + "3.7.0": + folder: "post_3.5.0" "3.5.2": folder: "post_3.5.0" "3.5.1": diff --git a/recipes/gdal/post_3.5.0/conandata.yml b/recipes/gdal/post_3.5.0/conandata.yml index 2dbc2d17b374f..6ac086393ccfd 100644 --- a/recipes/gdal/post_3.5.0/conandata.yml +++ b/recipes/gdal/post_3.5.0/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.7.0": + url: "https://github.com/OSGeo/gdal/releases/download/v3.7.0/gdal-3.7.0.tar.gz" + sha256: "5a806d759f403a15bbbf8a14ecc6947071afc5ab91e5abaef0d11d1d2d16bf94" "3.5.2": url: "https://github.com/OSGeo/gdal/releases/download/v3.5.2/gdal-3.5.2.tar.gz" sha256: "fbd696e1b2a858fbd2eb3718db16b14ed9ba82521d3578770d480c74fe1146d2" @@ -6,6 +9,9 @@ sources: url: "https://github.com/OSGeo/gdal/releases/download/v3.5.1/gdal-3.5.1.tar.gz" sha256: "7c4406ca010dc8632703a0a326f39e9db25d9f1f6ebaaeca64a963e3fac123d1" patches: + "3.7.0": + - patch_file: "patches/3.7.0/0-replace-find-package.patch" + base_path: "source_subfolder" "3.5.2": - patch_file: "patches/3.5.2/0-replace-find-package.patch" base_path: "source_subfolder" diff --git a/recipes/gdal/post_3.5.0/patches/3.7.0/0-replace-find-package.patch b/recipes/gdal/post_3.5.0/patches/3.7.0/0-replace-find-package.patch new file mode 100644 index 0000000000000..34401a53eae6d --- /dev/null +++ b/recipes/gdal/post_3.5.0/patches/3.7.0/0-replace-find-package.patch @@ -0,0 +1,282 @@ +diff -urN ./a/alg/CMakeLists.txt ./b/alg/CMakeLists.txt +--- ./a/alg/CMakeLists.txt 2023-05-02 08:47:11.000000000 -0500 ++++ ./b/alg/CMakeLists.txt 2023-06-06 16:47:02.784509800 -0500 +@@ -73,7 +73,7 @@ + target_sources(alg PRIVATE gdalwarpkernel_opencl.h gdalwarpkernel_opencl.cpp) + endif () + +-gdal_target_link_libraries(alg PRIVATE PROJ::proj) ++target_link_libraries(alg PUBLIC PROJ::proj) + + if (GDAL_USE_QHULL_INTERNAL) + target_compile_definitions(alg PRIVATE -DINTERNAL_QHULL) +diff -urN ./a/apps/CMakeLists.txt ./b/apps/CMakeLists.txt +--- ./a/apps/CMakeLists.txt 2023-05-02 08:47:11.000000000 -0500 ++++ ./b/apps/CMakeLists.txt 2023-06-06 16:46:55.380690700 -0500 +@@ -26,7 +26,7 @@ + appslib PRIVATE $ $ + $ $) + +-gdal_target_link_libraries(appslib PRIVATE PROJ::proj) ++target_link_libraries(appslib PUBLIC PROJ::proj) + + set_property(TARGET appslib PROPERTY POSITION_INDEPENDENT_CODE ${GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE}) + if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16) +diff -urN ./a/cmake/helpers/CheckDependentLibraries.cmake ./b/cmake/helpers/CheckDependentLibraries.cmake +--- ./a/cmake/helpers/CheckDependentLibraries.cmake 2023-06-07 09:33:06.599777700 -0500 ++++ ./b/cmake/helpers/CheckDependentLibraries.cmake 2023-06-07 13:38:51.722872200 -0500 +@@ -11,7 +11,8 @@ + include(CheckFunctionExists) + include(CMakeDependentOption) + include(FeatureSummary) +-include(DefineFindPackage2) ++#include(DefineFindPackage2) ++include(ConanFindPackage) + include(CheckSymbolExists) + + option( +@@ -109,51 +110,8 @@ + string(TOUPPER ${name} key) + set(_find_dependency "") + set(_find_dependency_args "") +- if(FIND_PACKAGE2_${name}_ENABLED) +- find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) +- else() +- set(_find_package_args) +- if (_GCP_VERSION) +- list(APPEND _find_package_args ${_GCP_VERSION}) +- endif () +- if (_GCP_CONFIG) +- list(APPEND _find_package_args CONFIG) +- endif () +- if (_GCP_COMPONENTS) +- list(APPEND _find_package_args COMPONENTS ${_GCP_COMPONENTS}) +- endif () +- if (_GCP_PATHS) +- list(APPEND _find_package_args PATHS ${_GCP_PATHS}) +- endif () +- if (_GCP_NAMES) +- set(GDAL_CHECK_PACKAGE_${name}_NAMES "${_GCP_NAMES}" CACHE STRING "Config file name for ${name}") +- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_NAMES) +- endif () +- if (_GCP_TARGETS) +- set(GDAL_CHECK_PACKAGE_${name}_TARGETS "${_GCP_TARGETS}" CACHE STRING "Target name candidates for ${name}") +- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_TARGETS) +- endif () +- if (GDAL_CHECK_PACKAGE_${name}_NAMES) +- find_package(${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} ${_find_package_args}) +- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS} REQUIRED) +- if (${name}_FOUND) +- get_filename_component(_find_dependency_args "${${name}_CONFIG}" NAME) +- string(REPLACE ";" " " _find_dependency_args "${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} CONFIGS ${_find_dependency_args} ${_find_package_args}") +- endif () +- endif () +- if (NOT ${name}_FOUND) +- find_package(${name} ${_find_package_args}) +- if (${name}_FOUND) +- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) +- elseif (${key}_FOUND) # Some find modules do not set _FOUND +- gdal_check_package_target(${key} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) +- set(${name}_FOUND "${key}_FOUND") +- endif () +- if (${name}_FOUND) +- string(REPLACE ";" " " _find_dependency_args "${name} ${_find_package_args}") +- endif() +- endif () +- endif () ++ ++ find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) + if (${key}_FOUND OR ${name}_FOUND) + if(_GCP_MINIMUM_VERSION) + +@@ -368,14 +326,12 @@ + endif () + + # First check with CMake config files (starting at version 8, due to issues with earlier ones), and then fallback to the FindPROJ module. +-find_package(PROJ 9 CONFIG QUIET) +-if (NOT PROJ_FOUND) +- find_package(PROJ 8 CONFIG QUIET) +-endif() ++find_package2(PROJ) ++target_include_directories(PROJ::proj INTERFACE ${PROJ_INCLUDE_DIRS}) + if (PROJ_FOUND) + string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ ${PROJ_VERSION_MAJOR} CONFIG)\n") + else() +- find_package(PROJ 6.0 REQUIRED) ++ find_package(proj 6.0 REQUIRED) + string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ 6.0)\n") + endif () + +@@ -458,15 +414,10 @@ + TARGETS json-c::json-c JSONC::JSONC + ) + gdal_internal_library(JSONC REQUIRED) +-if(TARGET json-c::json-c) +- get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) +- find_path(GDAL_JSON_INCLUDE_DIR NAMES json.h PATHS ${include_dirs} PATH_SUFFIXES json-c NO_DEFAULT_PATH) +- list(APPEND include_dirs "${GDAL_JSON_INCLUDE_DIR}") +- list(REMOVE_DUPLICATES include_dirs) +- set_target_properties(json-c::json-c PROPERTIES +- INTERFACE_INCLUDE_DIRECTORIES "${GDAL_JSON_INCLUDE_DIR}" +- ) +-endif() ++get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) ++list(APPEND include_dirs "${JSONC_INCLUDE_DIRS}/json-c") ++set_target_properties(json-c::json-c PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${include_dirs}") ++message("Setting include for json-c: ${include_dirs}") + + gdal_check_package(OpenCAD "libopencad (external, used by OpenCAD driver)" CAN_DISABLE) + gdal_internal_library(OPENCAD) +@@ -527,6 +478,24 @@ + gdal_check_package(SQLite3 "Enable SQLite3 support (used by SQLite/Spatialite, GPKG, Rasterlite, MBTiles, etc.)" + CAN_DISABLE RECOMMENDED) + if (SQLite3_FOUND) ++ set(CMAKE_REQUIRED_INCLUDES ${SQLite3_INCLUDE_DIRS}) ++ check_symbol_exists(sqlite3_mutex_alloc sqlite3ext.h SQLite3_HAS_MUTEX_ALLOC) ++ check_symbol_exists(sqlite3_column_table_name sqlite3ext.h SQLite3_HAS_COLUMN_METADATA) ++ check_symbol_exists(sqlite3_rtree_query_callback sqlite3.h SQLite3_HAS_RTREE) ++ check_symbol_exists(sqlite3_load_extension sqlite3ext.h SQLite3_HAS_LOAD_EXTENSION) ++ # https://www.sqlite.org/compile.html recommends to build with -DSQLITE_OMIT_PROGRESS_CALLBACK ++ # "for applications that are able to use them"... This is sometimes wrongly ++ # understood as recommended in all situations. ++ check_symbol_exists(sqlite3_progress_handler sqlite3.h SQLite3_HAS_PROGRESS_HANDLER) ++ ++ #if(NOT TARGET SQLite::SQLite3) ++ # add_library(SQLite::SQLite3 UNKNOWN IMPORTED) ++ # set_target_properties(SQLite::SQLite3 PROPERTIES ++ # INTERFACE_INCLUDE_DIRECTORIES "${SQLite3_INCLUDE_DIRS}" ++ # IMPORTED_LINK_INTERFACE_LANGUAGES "C" ++ # IMPORTED_LOCATION "${SQLite3_LIBRARY}") ++ #endif() ++ + if (NOT DEFINED SQLite3_HAS_COLUMN_METADATA) + message(FATAL_ERROR "missing SQLite3_HAS_COLUMN_METADATA") + endif () +@@ -566,7 +535,7 @@ + gdal_check_package(SPATIALITE "Enable spatialite support for sqlite3" VERSION 4.1.2 CAN_DISABLE) + gdal_check_package(RASTERLITE2 "Enable RasterLite2 support for sqlite3" VERSION 1.1.0 CAN_DISABLE) + +-find_package(LibKML COMPONENTS DOM ENGINE) ++find_package(LibKML COMPONENTS kmlengine kmldom kmlbase) + if (GDAL_USE_LIBKML) + if (NOT LibKML_FOUND) + message(FATAL_ERROR "Configured to use GDAL_USE_LIBKML, but not found") +diff -urN ./a/cmake/helpers/ConanFindPackage.cmake ./b/cmake/helpers/ConanFindPackage.cmake +--- ./a/cmake/helpers/ConanFindPackage.cmake 1969-12-31 18:00:00.000000000 -0600 ++++ ./b/cmake/helpers/ConanFindPackage.cmake 2023-06-06 16:26:55.800008000 -0500 +@@ -0,0 +1,43 @@ ++ ++function(define_find_package2 pkgname include_file library_name) ++endfunction() ++ ++function(find_package2 pkgname) ++ set(_options QUIET REQUIRED) ++ set(_oneValueArgs OUT_DEPENDENCY) ++ set(_multiValueArgs) ++ cmake_parse_arguments(arg "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) ++ if(arg_QUIET) ++ set(${pkgname}_FIND_QUIETLY TRUE) ++ endif() ++ if(arg_REQUIRED) ++ set(${pkgname}_FIND_REQUIRED TRUE) ++ endif() ++ ++ string(TOUPPER ${pkgname} key) ++ ++ set(docstring "Configured for conan package ${GDAL_CONAN_PACKAGE_FOR_${key}}") ++ if (DEFINED GDAL_CONAN_PACKAGE_FOR_${key}) ++ message("Using conan package ${GDAL_CONAN_PACKAGE_FOR_${key}} for dependency ${pkgname}") ++ set(conan_package ${GDAL_CONAN_PACKAGE_FOR_${key}}) ++ string(TOUPPER ${conan_package} conan_package_upper) ++ ++ set(${key}_INCLUDE_DIRS "${CONAN_INCLUDE_DIRS_${conan_package_upper}}" CACHE STRING ${docstring}) ++ if (NOT TARGET_FOR_${key}) ++ set(TARGET_FOR_${key} "${conan_package}::${conan_package}") ++ endif() ++ set(${key}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) ++ set(${key}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) ++ set(${key}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) ++ set(${pkgname}_INCLUDE_DIRS "CONAN_INCLUDE_DIRS_${conan_package_upper}" CACHE STRING ${docstring}) ++ set(${pkgname}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) ++ set(${pkgname}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) ++ set(${pkgname}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) ++ set(${key}_FOUND TRUE CACHE BOOL ${docstring}) ++ ++ else () ++ message("dependency ${pkgname} has no conan package") ++ set(${key}_FOUND FALSE CACHE BOOL ${docstring}) ++ endif() ++ ++endfunction() +diff -urN ./a/frmts/hfa/CMakeLists.txt ./b/frmts/hfa/CMakeLists.txt +--- ./a/frmts/hfa/CMakeLists.txt 2023-05-02 08:47:11.000000000 -0500 ++++ ./b/frmts/hfa/CMakeLists.txt 2023-06-06 16:54:31.162043900 -0500 +@@ -15,7 +15,8 @@ + hfa_overviews.cpp + BUILTIN) + gdal_standard_includes(gdal_HFA) +-target_include_directories(gdal_HFA PRIVATE $) ++target_link_libraries(gdal_HFA INTERFACE PROJ::proj) ++target_include_directories(gdal_HFA PRIVATE ${PROJ_INCLUDE_DIRS}) + target_compile_definitions(gdal_HFA PRIVATE $) + + if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) +diff -urN ./a/gdal.cmake ./b/gdal.cmake +--- ./a/gdal.cmake 2023-05-02 08:47:12.000000000 -0500 ++++ ./b/gdal.cmake 2023-06-06 16:55:34.252830900 -0500 +@@ -859,25 +859,6 @@ + ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/gdal/) + +- # Generate gdal-config utility command and pkg-config module gdal.pc +- include(GdalGenerateConfig) +- gdal_generate_config( +- TARGET +- "${GDAL_LIB_TARGET_NAME}" +- GLOBAL_PROPERTY +- "gdal_private_link_libraries" +- GDAL_CONFIG +- "${PROJECT_BINARY_DIR}/apps/gdal-config" +- PKG_CONFIG +- "${CMAKE_CURRENT_BINARY_DIR}/gdal.pc") +- install( +- PROGRAMS ${PROJECT_BINARY_DIR}/apps/gdal-config +- DESTINATION ${CMAKE_INSTALL_BINDIR} +- COMPONENT applications) +- install( +- FILES ${CMAKE_CURRENT_BINARY_DIR}/gdal.pc +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig +- COMPONENT libraries) + endif () + + configure_file(${GDAL_CMAKE_TEMPLATE_PATH}/uninstall.cmake.in ${PROJECT_BINARY_DIR}/cmake_uninstall.cmake @ONLY) +diff -urN ./a/ogr/CMakeLists.txt ./b/ogr/CMakeLists.txt +--- ./a/ogr/CMakeLists.txt 2023-05-02 08:47:12.000000000 -0500 ++++ ./b/ogr/CMakeLists.txt 2023-06-06 16:56:18.682151700 -0500 +@@ -89,12 +89,12 @@ + + target_compile_definitions(ogr PRIVATE HAVE_MITAB) + +-gdal_target_link_libraries(ogr PRIVATE PROJ::proj) ++target_link_libraries(ogr PUBLIC PROJ::proj) + + # External libs then + if (GDAL_USE_GEOS) + target_compile_definitions(ogr PRIVATE -DHAVE_GEOS=1) +- gdal_target_link_libraries(ogr PRIVATE ${GEOS_TARGET}) ++ target_link_libraries(ogr PUBLIC ${GEOS_TARGET}) + endif () + + if (GDAL_USE_SFCGAL) +diff -urN ./a/ogr/ogr_proj_p.h ./b/ogr/ogr_proj_p.h +--- ./a/ogr/ogr_proj_p.h 2023-05-02 08:47:12.000000000 -0500 ++++ ./b/ogr/ogr_proj_p.h 2023-06-06 16:56:30.772908800 -0500 +@@ -29,7 +29,7 @@ + #ifndef OGR_PROJ_P_H_INCLUDED + #define OGR_PROJ_P_H_INCLUDED + +-#include "proj.h" ++#include + + #include "cpl_mem_cache.h" + From 6ad6f3cf709dc5ed2420f316cea75b79fcbec5fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Farr=C3=A9?= Date: Fri, 11 Aug 2023 14:00:51 +0200 Subject: [PATCH 171/637] (#18164) [cpuinfo] Add 20230118 20220618 versions * [cpuinfo] Add 20230118 20220618 versions - Refactor package_info and expose clog as a component. Require that component from cpuinfo only in the specific versions that required it * Remove share folder from installed package * Provide CPUINFO_VERSION for test_v1_package * Fix Version handling --- recipes/cpuinfo/all/conandata.yml | 6 +++++ recipes/cpuinfo/all/conanfile.py | 23 ++++++++++++++----- .../cpuinfo/all/test_package/CMakeLists.txt | 8 ++++++- recipes/cpuinfo/all/test_package/conanfile.py | 9 ++++++-- .../cpuinfo/all/test_v1_package/conanfile.py | 1 + recipes/cpuinfo/config.yml | 4 ++++ 6 files changed, 42 insertions(+), 9 deletions(-) diff --git a/recipes/cpuinfo/all/conandata.yml b/recipes/cpuinfo/all/conandata.yml index 6231a9e8c3b97..56ce9c275f3d9 100644 --- a/recipes/cpuinfo/all/conandata.yml +++ b/recipes/cpuinfo/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "cci.20230118": + url: "https://github.com/pytorch/cpuinfo/archive/3dc310302210c1891ffcfb12ae67b11a3ad3a150.tar.gz" + sha256: "f2f4df6d2b01036f36c5e372954e536881cdd59f5c2461c67aa0a92c6d755c61" + "cci.20220618": + url: "https://github.com/pytorch/cpuinfo/archive/082deffc80ce517f81dc2f3aebe6ba671fcd09c9.tar.gz" + sha256: "4379348ec3127b37e854a0a66f85ea1d3c606e5f3a6dce235dc9c69ce663c026" "cci.20220228": url: "https://github.com/pytorch/cpuinfo/archive/6288930068efc8dff4f3c0b95f062fc5ddceba04.tar.gz" sha256: "9e9e937b3569320d23d8b1c8c26ed3603affe55c3e4a3e49622e8a2c6d6e1696" diff --git a/recipes/cpuinfo/all/conanfile.py b/recipes/cpuinfo/all/conanfile.py index 3a1f62573cb43..00574928a56f7 100644 --- a/recipes/cpuinfo/all/conanfile.py +++ b/recipes/cpuinfo/all/conanfile.py @@ -65,9 +65,10 @@ def generate(self): tc.generate() def _patch_sources(self): - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), - "SET_PROPERTY(TARGET clog PROPERTY POSITION_INDEPENDENT_CODE ON)", - "") + if self.version < "cci.20230118": + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "SET_PROPERTY(TARGET clog PROPERTY POSITION_INDEPENDENT_CODE ON)", + "") def build(self): self._patch_sources() @@ -80,9 +81,19 @@ def package(self): cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): self.cpp_info.set_property("pkg_config_name", "libcpuinfo") - self.cpp_info.libs = ["cpuinfo", "clog"] - if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs = ["pthread"] + + if self.version < "cci.20230118": + self.cpp_info.components["clog"].libs = ["clog"] + cpuinfo_clog_target = "clog" if self.version < "cci.20220618" else "cpuinfo::clog" + self.cpp_info.components["clog"].set_property("cmake_target_name", cpuinfo_clog_target) + + self.cpp_info.components["cpuinfo"].set_property("cmake_target_name", "cpuinfo::cpuinfo") + self.cpp_info.components["cpuinfo"].libs = ["cpuinfo"] + if self.version < "cci.20230118": + self.cpp_info.components["cpuinfo"].requires = ["clog"] + if self.settings.os in ["Linux", "FreeBSD", "Android"]: + self.cpp_info.components["cpuinfo"].system_libs.append("pthread") diff --git a/recipes/cpuinfo/all/test_package/CMakeLists.txt b/recipes/cpuinfo/all/test_package/CMakeLists.txt index f7fd88969d977..96ba94c8edef5 100644 --- a/recipes/cpuinfo/all/test_package/CMakeLists.txt +++ b/recipes/cpuinfo/all/test_package/CMakeLists.txt @@ -4,5 +4,11 @@ project(test_package LANGUAGES C) find_package(cpuinfo REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE cpuinfo::cpuinfo) +if ((${CPUINFO_VERSION} GREATER_EQUAL "20220618") AND (${CPUINFO_VERSION} LESS "20230118")) + # in that version range cpuinfo exposed cpuinfo::clog. Check that is available through conan recipe + target_link_libraries(${PROJECT_NAME} PRIVATE cpuinfo::cpuinfo cpuinfo::clog) +else () + target_link_libraries(${PROJECT_NAME} PRIVATE cpuinfo::cpuinfo) +endif() + target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) diff --git a/recipes/cpuinfo/all/test_package/conanfile.py b/recipes/cpuinfo/all/test_package/conanfile.py index 0a6bc68712d90..2690818e47570 100644 --- a/recipes/cpuinfo/all/test_package/conanfile.py +++ b/recipes/cpuinfo/all/test_package/conanfile.py @@ -1,12 +1,12 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import CMake, cmake_layout +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + generators = "CMakeDeps", "VirtualRunEnv" test_type = "explicit" def layout(self): @@ -15,6 +15,11 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CPUINFO_VERSION"] = str(self.dependencies["cpuinfo"].ref.version).split('.')[1] + tc.generate() + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/cpuinfo/all/test_v1_package/conanfile.py b/recipes/cpuinfo/all/test_v1_package/conanfile.py index 38f4483872d47..ea57bb8b3a514 100644 --- a/recipes/cpuinfo/all/test_v1_package/conanfile.py +++ b/recipes/cpuinfo/all/test_v1_package/conanfile.py @@ -8,6 +8,7 @@ class TestPackageConan(ConanFile): def build(self): cmake = CMake(self) + cmake.definitions["CPUINFO_VERSION"] = self.deps_cpp_info["cpuinfo"].version.split('.')[1] cmake.configure() cmake.build() diff --git a/recipes/cpuinfo/config.yml b/recipes/cpuinfo/config.yml index a6383a8ac8924..8e98d8506c888 100644 --- a/recipes/cpuinfo/config.yml +++ b/recipes/cpuinfo/config.yml @@ -1,4 +1,8 @@ versions: + "cci.20230118": + folder: all + "cci.20220618": + folder: all "cci.20220228": folder: all "cci.20201217": From f4635a5ab2b2d0c9f73ba41f247885c3c7d95d24 Mon Sep 17 00:00:00 2001 From: Esteban Dugueperoux <43169544+EstebanDugueperoux2@users.noreply.github.com> Date: Fri, 11 Aug 2023 14:52:00 +0200 Subject: [PATCH 172/637] (#18771) Add libde265/1.0.12 Since 1.0.12 release win lib has lib prefix See https://github.com/strukturag/libde265/compare/v1.0.12..v1.0.11#diff-9d651a9edfe60c8a6d63c14ddc658ecec43e23b1376257c555d4e15577e52f41 --- recipes/libde265/all/conandata.yml | 3 +++ recipes/libde265/all/conanfile.py | 3 ++- recipes/libde265/config.yml | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/recipes/libde265/all/conandata.yml b/recipes/libde265/all/conandata.yml index 1536fa75197a7..d9b1262d06c1f 100644 --- a/recipes/libde265/all/conandata.yml +++ b/recipes/libde265/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.12": + url: "https://github.com/strukturag/libde265/releases/download/v1.0.12/libde265-1.0.12.tar.gz" + sha256: "62185ea2182e68cf68bba20cc6eb4c287407b509cf0a827d7ddb75614db77b5c" "1.0.11": url: "https://github.com/strukturag/libde265/releases/download/v1.0.11/libde265-1.0.11.tar.gz" sha256: "2f8f12cabbdb15e53532b7c1eb964d4e15d444db1be802505e6ac97a25035bab" diff --git a/recipes/libde265/all/conanfile.py b/recipes/libde265/all/conanfile.py index 286e6952e05dc..6618b97bf0692 100644 --- a/recipes/libde265/all/conanfile.py +++ b/recipes/libde265/all/conanfile.py @@ -106,7 +106,8 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "de265") self.cpp_info.set_property("cmake_target_aliases", ["libde265"]) # official imported target before 1.0.10 self.cpp_info.set_property("pkg_config_name", "libde265") - prefix = "lib" if Version(self.version) < "1.0.10" else "" + version = Version(self.version) + prefix = "lib" if (version < "1.0.10" or (version > "1.0.11" and self.settings.os == "Windows" and not self.options.shared)) else "" self.cpp_info.libs = [f"{prefix}de265"] if not self.options.shared: self.cpp_info.defines = ["LIBDE265_STATIC_BUILD"] diff --git a/recipes/libde265/config.yml b/recipes/libde265/config.yml index d32ffee4c65d8..2745db31bb6cd 100644 --- a/recipes/libde265/config.yml +++ b/recipes/libde265/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.12": + folder: all "1.0.11": folder: all "1.0.9": From 78976dd93818c5217b227d539800fce114be6e66 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 11 Aug 2023 15:23:51 +0200 Subject: [PATCH 173/637] (#19150) [mpfr] Fix when building shared library on Linux Signed-off-by: Uilian Ries --- recipes/mpfr/all/conanfile.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/recipes/mpfr/all/conanfile.py b/recipes/mpfr/all/conanfile.py index 03acd9af8c081..0356da09ec7fb 100644 --- a/recipes/mpfr/all/conanfile.py +++ b/recipes/mpfr/all/conanfile.py @@ -5,6 +5,8 @@ from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps from conan.tools.microsoft import is_msvc, check_min_vs, unix_path from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.env import VirtualRunEnv +from conan.tools.build import cross_building from conan.errors import ConanException import os import re @@ -73,6 +75,9 @@ def source(self): destination=self.source_folder, strip_root=True) def generate(self): + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") if self.settings.os == "Windows": if is_msvc(self) and not check_min_vs(self, 193, raise_invalid=False) and \ not self.conf.get("tools.cmake.cmaketoolchain:generator", check_type=str): @@ -126,9 +131,8 @@ def _extract_mpfr_autotools_variables(self): defs = self._extract_makefile_variable(makefile, "DEFS") return sources, headers, defs - def build(self): + def _patch_sources(self): apply_conandata_patches(self) - if self.settings.os == "Windows": # Allow mixed shared and static libs replace_in_file(self, os.path.join(self.source_folder, "configure"), 'as_fn_error $? "libgmp isn\'t provided as a DLL: use --enable-static --disable-shared" "$LINENO" 5', @@ -144,6 +148,8 @@ def build(self): "", "") save(self, "gmp.h", "#pragma once\n#include \n") + def build(self): + self._patch_sources() autotools = Autotools(self) autotools.configure() # Need to generate Makefile to extract variables for CMake below From d05b789cd0ec20451364609c5372d53399b78738 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Fri, 11 Aug 2023 16:26:45 +0200 Subject: [PATCH 174/637] (#18611) at-spi2-core: conan V2 compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * at-spi2-core: conan V2 compatibility * bump deps * add glib as tool requirement * Use proper conan min version check * Option * Add package_type --------- Co-authored-by: Rubén Rincón Blanco --- recipes/at-spi2-core/new/conanfile.py | 22 ++++++------- .../new/test_package/CMakeLists.txt | 9 ----- .../new/test_package/conanfile.py | 33 ++++++++++++++----- .../at-spi2-core/new/test_package/meson.build | 5 +++ 4 files changed, 39 insertions(+), 30 deletions(-) delete mode 100644 recipes/at-spi2-core/new/test_package/CMakeLists.txt create mode 100644 recipes/at-spi2-core/new/test_package/meson.build diff --git a/recipes/at-spi2-core/new/conanfile.py b/recipes/at-spi2-core/new/conanfile.py index 85d759b7547fc..041ae5da456f1 100644 --- a/recipes/at-spi2-core/new/conanfile.py +++ b/recipes/at-spi2-core/new/conanfile.py @@ -9,7 +9,8 @@ import os -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.60.0 <2.0 || >=2.0.5" + class AtSpi2CoreConan(ConanFile): name = "at-spi2-core" description = "It provides a Service Provider Interface for the Assistive Technologies available on the GNOME platform and a library against which applications can be linked" @@ -20,17 +21,18 @@ class AtSpi2CoreConan(ConanFile): provides = "at-spi2-atk", "atk" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], "with_x11": [True, False], - } + } default_options = { "shared": False, "fPIC": True, "with_x11": False, - } + } def export_sources(self): export_conandata_patches(self) @@ -40,22 +42,21 @@ def configure(self): self.options.rm_safe("fPIC") self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") - if self.options.shared: - self.options["glib"].shared = True def build_requirements(self): - self.tool_requires("meson/1.1.1") + self.tool_requires("meson/1.2.0") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/1.9.3") + self.tool_requires("pkgconf/1.9.5") + self.tool_requires("glib/") def requirements(self): - self.requires("glib/2.76.3") + self.requires("glib/2.77.0") if self.options.with_x11: self.requires("xorg/system") self.requires("dbus/1.15.6") def validate(self): - if self.options.shared and not self.options["glib"].shared: + if self.options.shared and not self.dependencies["glib"].options.shared: raise ConanInvalidConfiguration( "Linking a shared library against static glib can cause unexpected behaviour." ) @@ -123,6 +124,3 @@ def package_info(self): self.cpp_info.components["atk-bridge"].includedirs = [os.path.join('include', 'at-spi2-atk', '2.0')] self.cpp_info.components["atk-bridge"].requires = ["dbus::dbus", "atk", "glib::glib", "atspi"] self.cpp_info.components["atk-bridge"].set_property("pkg_config_name", 'atk-bridge-2.0') - - def package_id(self): - self.info.requires["glib"].full_package_mode() diff --git a/recipes/at-spi2-core/new/test_package/CMakeLists.txt b/recipes/at-spi2-core/new/test_package/CMakeLists.txt deleted file mode 100644 index afa2476357074..0000000000000 --- a/recipes/at-spi2-core/new/test_package/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/at-spi2-core/new/test_package/conanfile.py b/recipes/at-spi2-core/new/test_package/conanfile.py index d4128b0450777..74125d16c3d5f 100644 --- a/recipes/at-spi2-core/new/test_package/conanfile.py +++ b/recipes/at-spi2-core/new/test_package/conanfile.py @@ -1,17 +1,32 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "PkgConfigDeps", "MesonToolchain", "VirtualRunEnv", "VirtualBuildEnv" + test_type = "explicit" + + def layout(self): + basic_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build_requirements(self): + self.tool_requires("meson/1.2.0") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/1.9.5") def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() + meson = Meson(self) + meson.configure() + meson.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/at-spi2-core/new/test_package/meson.build b/recipes/at-spi2-core/new/test_package/meson.build new file mode 100644 index 0000000000000..a6950ebe6d4ab --- /dev/null +++ b/recipes/at-spi2-core/new/test_package/meson.build @@ -0,0 +1,5 @@ +project('test_package', 'c') +package_dep = dependency('atspi-2') +executable('test_package', + sources : ['test_package.c'], + dependencies : [package_dep]) From 49ccd98bb1ff5deb1fd34cad484e7393e0723a85 Mon Sep 17 00:00:00 2001 From: Esteban Dugueperoux <43169544+EstebanDugueperoux2@users.noreply.github.com> Date: Fri, 11 Aug 2023 17:08:26 +0200 Subject: [PATCH 175/637] (#18719) Add Alembic 1.8.5 * Add Alembic 1.8.5 * Update recipes/alembic/all/patches/1.8.5-0001-fix-cmake.patch Co-authored-by: Martin Valgur * Update 1.8.5-0001-fix-cmake.patch Co-authored-by: Martin Valgur --------- Co-authored-by: Martin Valgur Co-authored-by: Uilian Ries --- recipes/alembic/all/conandata.yml | 7 +++++ .../all/patches/1.8.5-0001-fix-cmake.patch | 26 +++++++++++++++++++ recipes/alembic/config.yml | 2 ++ 3 files changed, 35 insertions(+) create mode 100644 recipes/alembic/all/patches/1.8.5-0001-fix-cmake.patch diff --git a/recipes/alembic/all/conandata.yml b/recipes/alembic/all/conandata.yml index bf7fb209af8bc..c09b44adc0b83 100644 --- a/recipes/alembic/all/conandata.yml +++ b/recipes/alembic/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.8.5": + url: "https://github.com/alembic/alembic/archive/1.8.5.tar.gz" + sha256: "180a12f08d391cd89f021f279dbe3b5423b1db751a9898540c8059a45825c2e9" "1.8.3": url: "https://github.com/alembic/alembic/archive/1.8.3.tar.gz" sha256: "b0bc74833bff118a869e81e6acb810a58797e77ef63143954b2f8e817c7f65cb" @@ -6,6 +9,10 @@ sources: url: "https://github.com/alembic/alembic/archive/refs/tags/1.8.2.tar.gz" sha256: "3f1c466ee1600578689b32b1f2587066d3259704ec7ed1fcf80c324d01274f48" patches: + "1.8.5": + - patch_file: "patches/1.8.5-0001-fix-cmake.patch" + patch_description: "Disable a line in a CMakeLists.txt to build with shared=True" + patch_type: "portability" "1.8.3": - patch_file: "patches/1.8.2-0001-fix-cmake.patch" "1.8.2": diff --git a/recipes/alembic/all/patches/1.8.5-0001-fix-cmake.patch b/recipes/alembic/all/patches/1.8.5-0001-fix-cmake.patch new file mode 100644 index 0000000000000..3ebad2885a641 --- /dev/null +++ b/recipes/alembic/all/patches/1.8.5-0001-fix-cmake.patch @@ -0,0 +1,26 @@ +--- a/lib/Alembic/CMakeLists.txt ++++ b/lib/Alembic/CMakeLists.txt +@@ -68,7 +68,6 @@ IF (ALEMBIC_SHARED_LIBS) + + if (ALEMBIC_USING_IMATH_3) + if (APPLE OR UNIX) +- set_target_properties(Alembic PROPERTIES INSTALL_RPATH "$") + endif () + endif () + ENDIF() +@@ -87,9 +87,9 @@ TARGET_LINK_LIBRARIES(Alembic + SET( ALEMBIC_LIB_INSTALL_DIR lib CACHE STRING "Where to install the Alembic libs") + INSTALL(TARGETS Alembic + EXPORT AlembicTargets +- LIBRARY DESTINATION ${ALEMBIC_LIB_INSTALL_DIR} +- ARCHIVE DESTINATION ${ALEMBIC_LIB_INSTALL_DIR} +- RUNTIME DESTINATION ${ALEMBIC_LIB_INSTALL_DIR}) ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + #-****************************************************************************** + # PACKAGE EXPORTS +-- +2.41.0 + diff --git a/recipes/alembic/config.yml b/recipes/alembic/config.yml index 68197c279a4ee..d20dd33414a44 100644 --- a/recipes/alembic/config.yml +++ b/recipes/alembic/config.yml @@ -1,4 +1,6 @@ versions: + "1.8.5": + folder: all "1.8.3": folder: all "1.8.2": From 1485a373e72c9017500133c8cae3b32c171e4514 Mon Sep 17 00:00:00 2001 From: PeteAudinate <99274874+PeteAudinate@users.noreply.github.com> Date: Fri, 11 Aug 2023 19:46:55 +0100 Subject: [PATCH 176/637] (#17882) b2: Support CXX from a VirtualBuildEnv * Use environment from VirtualBuildEnv to get CXX/CXXFLAGS * Write a project-config.jam file containing the toolset from CXX This ensures the b2 install command can find the correct compiler binary. --------- Co-authored-by: Chris Mc --- recipes/b2/portable/conanfile.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/recipes/b2/portable/conanfile.py b/recipes/b2/portable/conanfile.py index dad95965dea31..829c74015b1ef 100644 --- a/recipes/b2/portable/conanfile.py +++ b/recipes/b2/portable/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import cross_building +from conan.tools.env import VirtualBuildEnv from conan.tools.files import chdir, copy, get from conan.tools.layout import basic_layout @@ -107,6 +108,12 @@ def _bootstrap_env(self): os.environ.clear() os.environ.update(saved_env) + def _write_project_config(self, cxx): + with open(os.path.join(self.source_folder, "project-config.jam"), "w") as f: + f.write( + f"using {self.options.toolset} : : {cxx} ;\n" + ) + def build(self): # The order of the with:with: below is important. The first one changes # the current dir. While the second does env changes that guarantees @@ -139,10 +146,14 @@ def build(self): command += "build" if use_windows_commands else "./build.sh" if self.options.use_cxx_env: - cxx = os.environ.get("CXX") + envvars = VirtualBuildEnv(self).vars() + + cxx = envvars.get("CXX") if cxx: command += f" --cxx={cxx}" - cxxflags = os.environ.get("CXXFLAGS") + self._write_project_config(cxx) + + cxxflags = envvars.get("CXXFLAGS") if cxxflags: command += f" --cxxflags={cxxflags}" From ba719d617331f6432ae68488cc832e1953bca1ec Mon Sep 17 00:00:00 2001 From: James Date: Sun, 13 Aug 2023 12:22:25 +0200 Subject: [PATCH 177/637] (#18961) fix fastdds binaries --- recipes/fast-dds/all/conanfile.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/recipes/fast-dds/all/conanfile.py b/recipes/fast-dds/all/conanfile.py index d47f222eebac4..e8ad7b42a13f0 100644 --- a/recipes/fast-dds/all/conanfile.py +++ b/recipes/fast-dds/all/conanfile.py @@ -1,3 +1,6 @@ +import os +import textwrap + from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd @@ -15,8 +18,7 @@ ) from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc, msvc_runtime_flag from conan.tools.scm import Version -import os -import textwrap + required_conan_version = ">=1.53.0" @@ -69,7 +71,7 @@ def layout(self): def requirements(self): self.requires("tinyxml2/9.0.0") - self.requires("asio/1.28.0") + self.requires("asio/1.28.0") # This is now a package_type = header self.requires("fast-cdr/1.0.27", transitive_headers=True, transitive_libs=True) self.requires("foonathan-memory/0.7.3") if self.options.with_ssl: From f9102fd6be2e512122b5b66d14c5589d83fc9733 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 13 Aug 2023 12:42:35 +0200 Subject: [PATCH 178/637] (#15193) opencv 4.x: refactor to allow fine-grained selection of each module/contrib * allow to build opencv_objdetect without dnn in 4.5.5 It has been "fixed" upstream for OpenCV 4.6.0 It fixes few things in this recipe: - avoid a bug where quirc is in requirements, but not required by any component in package_indo() when dnn is False - a regression introduced by https://github.com/conan-io/conan-center-index/pull/11009. Indeed objdetect can be built without dnn in all OpenCV version before 4.5.4, so this PR was breaking these versions when dnn was False by not exposing opencv_objdetect and few contrib components. * add missing contrib components when dnn is True components: - dnn_objdetect & opencv_text - dnn_superres since 4.1.2 - mcc since 4.5.0 - wechat_qrcode since 4.5.2 - barcode since 4.5.3 * fix photo & stitching components when cuda is enabled * add quality component in contrib only if version >= 4.1.0 * add dnn as an option dependency of video since 4.5.1 * dnn is an optional dependency of tracking * text is an optional dependency of datasets * move cuda components under contrib * fix requires of several contrib components * improve requires of main components * add an option for each contrib and deprecate contrib option * fix internal requirements of tracking module * force disable tesseract in text module for the moment * deprecate with_ade option in favor of gapi option * add option to allow to disable stitching module * remove useless comments * adapt test package to new options * add option to allow disabling highgui * add option to allow disabling videoio * add option to allow disabling ml * add option to allow disabling photo * move options related to modules first * add missing frameworks for imgcodecs * add with_tesseract option for text module * also handle cuda contribs * add option to allow disabling objdetect * add option to allow disabling video * prefer to force enable options required by modules explicitly required by consumers * improve CMakeLists of test package * add option to allow disabling imgcodecs * typo * remove with_imgcodec_* options when imgcodecs module is disabled * add option to allow disabling calib3d * add option to allow disabling features2d * classification of options by category * add option to allow disabling flann * split executables in test package per tested module * add option to allow disabling imgproc * opencv 4.x requires at least C++11 * test opencv_core * add options for gdal & gdcm support in imgcodecs * test opencv_imgcodecs * minor change * add missing mantadory dependency to tracking * minor change * add contrib_ovis option * add contrib_hdf option * fix system libs of opencv_gapi on Windows * remove with_v4l option if videoio module is disabled * control build of cudev through with_cuda option * add vulkan support in dnn module * add with_opencl option * do not build Android examples * fix discovery of zlib static if Android * fix install layout for Android * better filter to collect extra libs in opencv core * remove contrib prefix * add deprecation messages * alphamat requires eigen support * fix injection of cpu_baseline and cpu_dispatch in case of empty string * neon stuff * pass False to WITH_FFMPEG if option removed * remove deprecated options from package id * simplify * add cvv and viz options viz module can't be enabled yet, due to lack of vtk recipe in conan-center * avoid redefining cmake variables * do not force disable openexr if Android * better handling of qt * no base_path in conandata.yml * fix qt link * improve deprecated contrib option handling * factorize modules in options & default_options * declare frameworks & system_libs in _opencv_modules * typo * fix link to qt in cvv module * add a test of calib3d module * add a test of flann module * add a test of objdetect module * add a test of video module * add a test of photo module * add a test of stitching module * add a test of ml module * add a test of highgui module * parallel ctest in test package * add a test of features2d module * add a test of freetype module * parallel ctest in test v1 package * add a test of structured_light module * add a test of shape module * add a test of reg module * simplify test_imgproc.cpp * test more extra modules * more elegant workaround of get_safe in test_v1_package * small change * missing tesseract in requires of text component * add a test of text module * add test of xfeatures2d module * add test of ximgproc module * test more extra modules * add missing header in alphamat.hpp * typo * sfm module needs eigen enabled * test more extra modules * test more extra modules * test more extra modules * simplify CMakeLists of test package * simplify test package even more * test more modules * adapt dnn_superres test to work with old versions * fix build of sfm extra module in opencv < 4.5.3 * check again internal dependencies between options in validate() in conan v2 downstream options values always have precedence, so we have to check again in validate() that combination of opencv options is still valid * add world option * minor change * minor comment change * factorize a little bit * bump protobuf to 3.21.9 * compat with openexr 3.x in old opencv versions * add res to resdirs of components * bump dependencies * some conan v2 stuff * bump freetype * properly set requires of each component regarding eigen Eigen is a private dependency of: - calib3d - core - features2d - stitching - rgbd - sfm - ximgproc * fix cuda internal dependencies * use self.dependencies["ffmpeg"] * fix ffmpeg required components * improve ffmpeg handling * ffmpeg workaround for the moment * bump ffmpeg * avutil always available in ffmpeg * bump dependencies * factorize * remove patches of removed versions * fix world option * bump dependencies * fix typo in requires of cudacodec * bump several dependencies * Update recipes/opencv/4.x/conandata.yml Co-authored-by: Uilian Ries --------- Co-authored-by: Uilian Ries --- recipes/opencv/4.x/conandata.yml | 66 +- recipes/opencv/4.x/conanfile.py | 1506 ++++++++++++----- .../4.1.2-0005-tracking-no-plot-deps.patch | 7 + .../opencv/4.x/patches/4.1.2-0006-hdf.patch | 21 + .../patches/4.1.2-0008-link-qt-targets.patch | 29 + .../4.x/patches/4.1.2-0009-sfm-deps.patch | 49 + .../4.1.2-0010-compat-protobuf-ge-3.18.patch | 22 + .../patches/4.1.2-0011-compat-openexr3.patch | 10 + .../4.5.1-0001-tracking-no-plot-deps.patch | 13 + .../patches/4.5.1-0002-alphamat-header.patch | 11 + .../patches/4.5.3-0002-link-qt-targets.patch | 30 + .../4.5.5-0002-objdetect-without-dnn.patch | 97 ++ .../4.x/patches/4.5.5-0003-find-quirc.patch | 12 + .../patches/4.5.5-0004-link-qt-targets.patch | 22 + .../opencv/4.x/test_package/CMakeLists.txt | 55 +- recipes/opencv/4.x/test_package/conanfile.py | 37 +- .../opencv/4.x/test_package/test_alphamat.cpp | 10 + .../opencv/4.x/test_package/test_aruco.cpp | 9 + .../opencv/4.x/test_package/test_bgsegm.cpp | 6 + .../4.x/test_package/test_bioinspired.cpp | 6 + .../opencv/4.x/test_package/test_calib3d.cpp | 26 + .../opencv/4.x/test_package/test_ccalib.cpp | 8 + recipes/opencv/4.x/test_package/test_core.cpp | 6 + .../opencv/4.x/test_package/test_datasets.cpp | 6 + recipes/opencv/4.x/test_package/test_dnn.cpp | 6 + .../4.x/test_package/test_dnn_superres.cpp | 6 + recipes/opencv/4.x/test_package/test_face.cpp | 6 + .../4.x/test_package/test_features2d.cpp | 6 + .../opencv/4.x/test_package/test_flann.cpp | 28 + .../opencv/4.x/test_package/test_freetype.cpp | 6 + .../opencv/4.x/test_package/test_fuzzy.cpp | 9 + recipes/opencv/4.x/test_package/test_gapi.cpp | 18 + recipes/opencv/4.x/test_package/test_hdf.cpp | 6 + recipes/opencv/4.x/test_package/test_hfs.cpp | 6 + .../opencv/4.x/test_package/test_highgui.cpp | 8 + .../opencv/4.x/test_package/test_img_hash.cpp | 10 + .../4.x/test_package/test_imgcodecs.cpp | 9 + .../opencv/4.x/test_package/test_imgproc.cpp | 14 + .../test_package/test_intensity_transform.cpp | 9 + .../4.x/test_package/test_line_descriptor.cpp | 6 + recipes/opencv/4.x/test_package/test_mcc.cpp | 6 + recipes/opencv/4.x/test_package/test_ml.cpp | 6 + .../4.x/test_package/test_objdetect.cpp | 17 + .../opencv/4.x/test_package/test_optflow.cpp | 7 + .../opencv/4.x/test_package/test_package.cpp | 235 --- .../test_package/test_phase_unwrapping.cpp | 6 + .../opencv/4.x/test_package/test_photo.cpp | 10 + recipes/opencv/4.x/test_package/test_plot.cpp | 12 + .../opencv/4.x/test_package/test_quality.cpp | 8 + recipes/opencv/4.x/test_package/test_reg.cpp | 9 + recipes/opencv/4.x/test_package/test_rgbd.cpp | 7 + .../opencv/4.x/test_package/test_saliency.cpp | 6 + recipes/opencv/4.x/test_package/test_sfm.cpp | 10 + .../opencv/4.x/test_package/test_shape.cpp | 6 + .../4.x/test_package/test_stitching.cpp | 13 + .../test_package/test_structured_light.cpp | 6 + .../opencv/4.x/test_package/test_superres.cpp | 6 + .../test_package/test_surface_matching.cpp | 7 + recipes/opencv/4.x/test_package/test_text.cpp | 11 + .../opencv/4.x/test_package/test_tracking.cpp | 6 + .../opencv/4.x/test_package/test_video.cpp | 7 + .../opencv/4.x/test_package/test_videoio.cpp | 11 + .../4.x/test_package/test_wechat_qrcode.cpp | 9 + .../4.x/test_package/test_xfeatures2d.cpp | 6 + .../opencv/4.x/test_package/test_ximgproc.cpp | 6 + .../4.x/test_package/test_xobjdetect.cpp | 6 + .../opencv/4.x/test_package/test_xphoto.cpp | 6 + .../opencv/4.x/test_v1_package/CMakeLists.txt | 4 +- .../opencv/4.x/test_v1_package/conanfile.py | 40 +- 69 files changed, 2042 insertions(+), 664 deletions(-) create mode 100644 recipes/opencv/4.x/patches/4.1.2-0005-tracking-no-plot-deps.patch create mode 100644 recipes/opencv/4.x/patches/4.1.2-0006-hdf.patch create mode 100644 recipes/opencv/4.x/patches/4.1.2-0008-link-qt-targets.patch create mode 100644 recipes/opencv/4.x/patches/4.1.2-0009-sfm-deps.patch create mode 100644 recipes/opencv/4.x/patches/4.1.2-0010-compat-protobuf-ge-3.18.patch create mode 100644 recipes/opencv/4.x/patches/4.1.2-0011-compat-openexr3.patch create mode 100644 recipes/opencv/4.x/patches/4.5.1-0001-tracking-no-plot-deps.patch create mode 100644 recipes/opencv/4.x/patches/4.5.1-0002-alphamat-header.patch create mode 100644 recipes/opencv/4.x/patches/4.5.3-0002-link-qt-targets.patch create mode 100644 recipes/opencv/4.x/patches/4.5.5-0002-objdetect-without-dnn.patch create mode 100644 recipes/opencv/4.x/patches/4.5.5-0003-find-quirc.patch create mode 100644 recipes/opencv/4.x/patches/4.5.5-0004-link-qt-targets.patch create mode 100644 recipes/opencv/4.x/test_package/test_alphamat.cpp create mode 100644 recipes/opencv/4.x/test_package/test_aruco.cpp create mode 100644 recipes/opencv/4.x/test_package/test_bgsegm.cpp create mode 100644 recipes/opencv/4.x/test_package/test_bioinspired.cpp create mode 100644 recipes/opencv/4.x/test_package/test_calib3d.cpp create mode 100644 recipes/opencv/4.x/test_package/test_ccalib.cpp create mode 100644 recipes/opencv/4.x/test_package/test_core.cpp create mode 100644 recipes/opencv/4.x/test_package/test_datasets.cpp create mode 100644 recipes/opencv/4.x/test_package/test_dnn.cpp create mode 100644 recipes/opencv/4.x/test_package/test_dnn_superres.cpp create mode 100644 recipes/opencv/4.x/test_package/test_face.cpp create mode 100644 recipes/opencv/4.x/test_package/test_features2d.cpp create mode 100644 recipes/opencv/4.x/test_package/test_flann.cpp create mode 100644 recipes/opencv/4.x/test_package/test_freetype.cpp create mode 100644 recipes/opencv/4.x/test_package/test_fuzzy.cpp create mode 100644 recipes/opencv/4.x/test_package/test_gapi.cpp create mode 100644 recipes/opencv/4.x/test_package/test_hdf.cpp create mode 100644 recipes/opencv/4.x/test_package/test_hfs.cpp create mode 100644 recipes/opencv/4.x/test_package/test_highgui.cpp create mode 100644 recipes/opencv/4.x/test_package/test_img_hash.cpp create mode 100644 recipes/opencv/4.x/test_package/test_imgcodecs.cpp create mode 100644 recipes/opencv/4.x/test_package/test_imgproc.cpp create mode 100644 recipes/opencv/4.x/test_package/test_intensity_transform.cpp create mode 100644 recipes/opencv/4.x/test_package/test_line_descriptor.cpp create mode 100644 recipes/opencv/4.x/test_package/test_mcc.cpp create mode 100644 recipes/opencv/4.x/test_package/test_ml.cpp create mode 100644 recipes/opencv/4.x/test_package/test_objdetect.cpp create mode 100644 recipes/opencv/4.x/test_package/test_optflow.cpp delete mode 100644 recipes/opencv/4.x/test_package/test_package.cpp create mode 100644 recipes/opencv/4.x/test_package/test_phase_unwrapping.cpp create mode 100644 recipes/opencv/4.x/test_package/test_photo.cpp create mode 100644 recipes/opencv/4.x/test_package/test_plot.cpp create mode 100644 recipes/opencv/4.x/test_package/test_quality.cpp create mode 100644 recipes/opencv/4.x/test_package/test_reg.cpp create mode 100644 recipes/opencv/4.x/test_package/test_rgbd.cpp create mode 100644 recipes/opencv/4.x/test_package/test_saliency.cpp create mode 100644 recipes/opencv/4.x/test_package/test_sfm.cpp create mode 100644 recipes/opencv/4.x/test_package/test_shape.cpp create mode 100644 recipes/opencv/4.x/test_package/test_stitching.cpp create mode 100644 recipes/opencv/4.x/test_package/test_structured_light.cpp create mode 100644 recipes/opencv/4.x/test_package/test_superres.cpp create mode 100644 recipes/opencv/4.x/test_package/test_surface_matching.cpp create mode 100644 recipes/opencv/4.x/test_package/test_text.cpp create mode 100644 recipes/opencv/4.x/test_package/test_tracking.cpp create mode 100644 recipes/opencv/4.x/test_package/test_video.cpp create mode 100644 recipes/opencv/4.x/test_package/test_videoio.cpp create mode 100644 recipes/opencv/4.x/test_package/test_wechat_qrcode.cpp create mode 100644 recipes/opencv/4.x/test_package/test_xfeatures2d.cpp create mode 100644 recipes/opencv/4.x/test_package/test_ximgproc.cpp create mode 100644 recipes/opencv/4.x/test_package/test_xobjdetect.cpp create mode 100644 recipes/opencv/4.x/test_package/test_xphoto.cpp diff --git a/recipes/opencv/4.x/conandata.yml b/recipes/opencv/4.x/conandata.yml index 3da12bba6234f..694b74e2be5aa 100644 --- a/recipes/opencv/4.x/conandata.yml +++ b/recipes/opencv/4.x/conandata.yml @@ -5,25 +5,42 @@ sources: - url: "https://github.com/opencv/opencv_contrib/archive/refs/tags/4.5.5.tar.gz" sha256: "a97c2eaecf7a23c6dbd119a609c6d7fae903e5f9ff5f1fe678933e01c67a6c11" "4.5.3": - - url: "https://github.com/opencv/opencv/archive/4.5.3.tar.gz" + - url: "https://github.com/opencv/opencv/archive/refs/tags/4.5.3.tar.gz" sha256: "77f616ae4bea416674d8c373984b20c8bd55e7db887fd38c6df73463a0647bab" - - url: "https://github.com/opencv/opencv_contrib/archive/4.5.3.tar.gz" + - url: "https://github.com/opencv/opencv_contrib/archive/refs/tags/4.5.3.tar.gz" sha256: "73da052fd10e73aaba2560eaff10cc5177e2dcc58b27f8aedf7c649e24c233bc" "4.1.2": - - url: "https://github.com/opencv/opencv/archive/4.1.2.tar.gz" + - url: "https://github.com/opencv/opencv/archive/refs/tags/4.1.2.tar.gz" sha256: "385dd0a9c25e67ef0dd60e022d2a2d7b17e2f36819cf3cb46aa8cdff5c5282c9" - - url: "https://github.com/opencv/opencv_contrib/archive/4.1.2.tar.gz" + - url: "https://github.com/opencv/opencv_contrib/archive/refs/tags/4.1.2.tar.gz" sha256: "0f6c3d30baa39e3e7611afb481ee86dea45dafb182cac87d570c95dccd83eb8b" patches: "4.5.5": - patch_file: "patches/4.5.5-0001-find-openexr.patch" patch_description: "Robust discovery & injection of OpenEXR" patch_type: "conan" + - patch_file: "patches/4.5.5-0002-objdetect-without-dnn.patch" + patch_description: "Allow to build objdetect module without dnn" + patch_type: "portability" + patch_source: "https://github.com/opencv/opencv/pull/21369" + - patch_file: "patches/4.5.5-0003-find-quirc.patch" + patch_description: "Robust discovery & injection of quirc" + patch_type: "conan" + - patch_file: "patches/4.5.5-0004-link-qt-targets.patch" + patch_description: "Link to Qt through CMake targets" + patch_type: "conan" - patch_file: "patches/4.5.0-0002-find-ade.patch" patch_description: "Robust discovery & injection of ade" patch_type: "conan" - - patch_file: "patches/4.1.2-0003-find-quirc.patch" - patch_description: "Robust discovery & injection of quirc" + - patch_file: "patches/4.5.1-0001-tracking-no-plot-deps.patch" + patch_description: "Fix requirements of tracking module" + patch_type: "conan" + - patch_file: "patches/4.5.1-0002-alphamat-header.patch" + patch_description: "Add missing header in alphamat.hpp" + patch_type: "portability" + patch_source: "https://github.com/opencv/opencv_contrib/pull/3422" + - patch_file: "patches/4.1.2-0006-hdf.patch" + patch_description: "Robust discovery of hdf" patch_type: "conan" - patch_file: "patches/4.5.2-0001-fix-zlib-static-android.patch" patch_description: "Fix discovery of zlib static if Android" @@ -35,18 +52,35 @@ patches: - patch_file: "patches/4.5.3-0001-find-openexr.patch" patch_description: "Robust discovery & injection of OpenEXR" patch_type: "conan" + - patch_file: "patches/4.5.3-0002-link-qt-targets.patch" + patch_description: "Link to Qt through CMake targets" + patch_type: "conan" - patch_file: "patches/4.5.0-0002-find-ade.patch" patch_description: "Robust discovery & injection of ade" patch_type: "conan" - patch_file: "patches/4.1.2-0003-find-quirc.patch" patch_description: "Robust discovery & injection of quirc" patch_type: "conan" + - patch_file: "patches/4.5.1-0001-tracking-no-plot-deps.patch" + patch_description: "Fix requirements of tracking module" + patch_type: "conan" + - patch_file: "patches/4.5.1-0002-alphamat-header.patch" + patch_description: "Add missing header in alphamat.hpp" + patch_type: "portability" + patch_source: "https://github.com/opencv/opencv_contrib/pull/3422" + - patch_file: "patches/4.1.2-0006-hdf.patch" + patch_description: "Robust discovery of hdf" + patch_type: "conan" - patch_file: "patches/4.5.2-0001-fix-zlib-static-android.patch" patch_description: "Fix discovery of zlib static if Android" patch_type: "conan" - patch_file: "patches/4.1.2-0007-android-install-layout.patch" patch_description: "Honor install layout from conan if Android" patch_type: "conan" + - patch_file: "patches/4.1.2-0010-compat-protobuf-ge-3.18.patch" + patch_description: "Compatibility with protobuf >= 3.18" + patch_type: "portability" + patch_source: "https://github.com/opencv/opencv/pull/20386" "4.1.2": - patch_file: "patches/4.1.2-0001-find-openexr.patch" patch_description: "Robust discovery & injection of OpenEXR" @@ -60,6 +94,26 @@ patches: - patch_file: "patches/4.1.2-0004-jasper.patch" patch_description: "Compatibility with recent jasper versions" patch_type: "portability" + - patch_file: "patches/4.1.2-0005-tracking-no-plot-deps.patch" + patch_description: "Fix requirements of tracking module" + patch_type: "conan" + - patch_file: "patches/4.1.2-0006-hdf.patch" + patch_description: "Robust discovery of hdf" + patch_type: "conan" - patch_file: "patches/4.1.2-0007-android-install-layout.patch" patch_description: "Honor install layout from conan if Android" patch_type: "conan" + - patch_file: "patches/4.1.2-0008-link-qt-targets.patch" + patch_description: "Link to Qt through CMake targets" + patch_type: "conan" + - patch_file: "patches/4.1.2-0009-sfm-deps.patch" + patch_description: "Fix link to dependencies of sfm module" + patch_type: "conan" + - patch_file: "patches/4.1.2-0010-compat-protobuf-ge-3.18.patch" + patch_description: "Compatibility with protobuf >= 3.18" + patch_type: "portability" + patch_source: "https://github.com/opencv/opencv/pull/20386" + - patch_file: "patches/4.1.2-0011-compat-openexr3.patch" + patch_description: "Compatibility with OpenEXR 3.x" + patch_type: "portability" + patch_source: "https://github.com/opencv/opencv/pull/19970" diff --git a/recipes/opencv/4.x/conanfile.py b/recipes/opencv/4.x/conanfile.py index 895fee1eb0186..96c7055a75aa0 100644 --- a/recipes/opencv/4.x/conanfile.py +++ b/recipes/opencv/4.x/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile -from conan.errors import ConanInvalidConfiguration -from conan.tools.build import cross_building +from conan.errors import ConanException, ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.build import can_run, check_min_cppstd, valid_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv, VirtualRunEnv from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, rename, replace_in_file, rmdir, save @@ -13,6 +14,81 @@ required_conan_version = ">=1.54.0" +OPENCV_MAIN_MODULES_OPTIONS = ( + "calib3d", + "dnn", + "features2d", + "flann", + "gapi", + "highgui", + "imgcodecs", + "imgproc", + "ml", + "objdetect", + "photo", + "stitching", + "video", + "videoio", +) + +OPENCV_EXTRA_MODULES_OPTIONS = ( + "alphamat", + "aruco", + "barcode", + "bgsegm", + "bioinspired", + "ccalib", + "cudaarithm", + "cudabgsegm", + "cudacodec", + "cudafeatures2d", + "cudafilters", + "cudaimgproc", + "cudalegacy", + "cudaobjdetect", + "cudaoptflow", + "cudastereo", + "cudawarping", + "cvv", + "datasets", + "dnn_objdetect", + "dnn_superres", + "dpm", + "face", + "freetype", + "fuzzy", + "hdf", + "hfs", + "img_hash", + "intensity_transform", + "line_descriptor", + "mcc", + "optflow", + "ovis", + "phase_unwrapping", + "plot", + "quality", + "rapid", + "reg", + "rgbd", + "saliency", + "sfm", + "shape", + "stereo", + "structured_light", + "superres", + "surface_matching", + "text", + "tracking", + "videostab", + "viz", + "wechat_qrcode", + "xfeatures2d", + "ximgproc", + "xobjdetect", + "xphoto", +) + class OpenCVConan(ConanFile): name = "opencv" license = "Apache-2.0" @@ -21,83 +97,117 @@ class OpenCVConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" topics = ("computer-vision", "deep-learning", "image-processing") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], - "contrib": [True, False], - "contrib_freetype": [True, False], - "contrib_sfm": [True, False], + # global options "parallel": [False, "tbb", "openmp"], "with_ipp": [False, "intel-ipp", "opencv-icv"], - "with_ade": [True, False], + "with_eigen": [True, False], + "neon": [True, False], + "with_opencl": [True, False], + "with_cuda": [True, False], + "with_cublas": [True, False], + "with_cufft": [True, False], + "with_cudnn": [True, False], + "cuda_arch_bin": [None, "ANY"], + "cpu_baseline": [None, "ANY"], + "cpu_dispatch": [None, "ANY"], + "world": [True, False], + "nonfree": [True, False], + # dnn module options + "with_vulkan": [True, False], + "dnn_cuda": [True, False], + # highgui module options + "with_gtk": [True, False], + "with_qt": [True, False], + # imgcodecs module options "with_jpeg": [False, "libjpeg", "libjpeg-turbo", "mozjpeg"], "with_png": [True, False], "with_tiff": [True, False], "with_jpeg2000": [False, "jasper", "openjpeg"], "with_openexr": [True, False], - "with_eigen": [True, False], "with_webp": [True, False], - "with_gtk": [True, False], - "with_quirc": [True, False], - "with_cuda": [True, False], - "with_cublas": [True, False], - "with_cufft": [True, False], - "with_cudnn": [True, False], - "with_v4l": [True, False], - "with_ffmpeg": [True, False], + "with_gdal": [True, False], + "with_gdcm": [True, False], "with_imgcodec_hdr": [True, False], "with_imgcodec_pfm": [True, False], "with_imgcodec_pxm": [True, False], "with_imgcodec_sunraster": [True, False], "with_msmf": [True, False], "with_msmf_dxva": [True, False], - "neon": [True, False], - "dnn": [True, False], - "dnn_cuda": [True, False], - "cuda_arch_bin": [None, "ANY"], - "cpu_baseline": [None, "ANY"], - "cpu_dispatch": [None, "ANY"], - "nonfree": [True, False], + # objdetect module options + "with_quirc": [True, False], + # videoio module options + "with_ffmpeg": [True, False], + "with_v4l": [True, False], + # text module options + "with_tesseract": [True, False], + # TODO: deprecated options to remove in few months + "contrib": [True, False, "deprecated"], + "contrib_freetype": [True, False, "deprecated"], + "contrib_sfm": [True, False, "deprecated"], + "with_ade": [True, False, "deprecated"], } + options.update({_name: [True, False] for _name in OPENCV_MAIN_MODULES_OPTIONS}) + options.update({_name: [True, False] for _name in OPENCV_EXTRA_MODULES_OPTIONS}) + default_options = { "shared": False, "fPIC": True, + # global options "parallel": False, - "contrib": False, - "contrib_freetype": False, - "contrib_sfm": False, "with_ipp": False, - "with_ade": True, + "with_eigen": True, + "neon": True, + "with_opencl": False, + "with_cuda": False, + "with_cublas": False, + "with_cufft": False, + "with_cudnn": False, + "cuda_arch_bin": None, + "cpu_baseline": None, + "cpu_dispatch": None, + "world": False, + "nonfree": False, + # dnn module options + "with_vulkan": False, + "dnn_cuda": False, + # highgui module options + "with_gtk": True, + "with_qt": False, + # imgcodecs module options "with_jpeg": "libjpeg", "with_png": True, "with_tiff": True, "with_jpeg2000": "jasper", "with_openexr": True, - "with_eigen": True, "with_webp": True, - "with_gtk": True, - "with_quirc": True, - "with_cuda": False, - "with_cublas": False, - "with_cufft": False, - "with_cudnn": False, - "with_v4l": False, - "with_ffmpeg": True, + "with_gdal": False, + "with_gdcm": False, "with_imgcodec_hdr": False, "with_imgcodec_pfm": False, "with_imgcodec_pxm": False, "with_imgcodec_sunraster": False, "with_msmf": True, "with_msmf_dxva": True, - "neon": True, - "dnn": True, - "dnn_cuda": False, - "cuda_arch_bin": None, - "cpu_baseline": None, - "cpu_dispatch": None, - "nonfree": False, + # objdetect module options + "with_quirc": True, + # videoio module options + "with_ffmpeg": True, + "with_v4l": False, + # text module options + "with_tesseract": True, + # TODO: deprecated options to remove in few months + "contrib": "deprecated", + "contrib_freetype": "deprecated", + "contrib_sfm": "deprecated", + "with_ade": "deprecated", } + default_options.update({_name: True for _name in OPENCV_MAIN_MODULES_OPTIONS}) + default_options.update({_name: False for _name in OPENCV_EXTRA_MODULES_OPTIONS}) short_paths = True @@ -117,9 +227,37 @@ def _has_with_tiff_option(self): def _has_with_ffmpeg_option(self): return self.settings.os != "iOS" and self.settings.os != "WindowsStore" + @property + def _has_superres_option(self): + return self.settings.os != "iOS" + + @property + def _has_alphamat_option(self): + return Version(self.version) >= "4.3.0" + + @property + def _has_intensity_transform_option(self): + return Version(self.version) >= "4.3.0" + + @property + def _has_rapid_option(self): + return Version(self.version) >= "4.3.0" + + @property + def _has_mcc_option(self): + return Version(self.version) >= "4.5.0" + + @property + def _has_wechat_qrcode_option(self): + return Version(self.version) >= "4.5.2" + + @property + def _has_barcode_option(self): + return Version(self.version) >= "4.5.3" + @property def _protobuf_version(self): - return "3.17.1" + return "3.21.12" def export_sources(self): export_conandata_patches(self) @@ -130,6 +268,8 @@ def config_options(self): if self.settings.os != "Linux": del self.options.with_gtk del self.options.with_v4l + if self.settings.os in ["iOS", "Android"]: + del self.options.with_opencl if self.settings.os != "Windows": del self.options.with_msmf del self.options.with_msmf_dxva @@ -148,101 +288,848 @@ def config_options(self): del self.options.with_jpeg2000 if not self._has_with_tiff_option: del self.options.with_tiff + if not self._has_superres_option: + del self.options.superres + if not self._has_alphamat_option: + del self.options.alphamat + if not self._has_intensity_transform_option: + del self.options.intensity_transform + if not self._has_rapid_option: + del self.options.rapid + if not self._has_mcc_option: + del self.options.mcc + if not self._has_wechat_qrcode_option: + del self.options.wechat_qrcode + if not self._has_barcode_option: + del self.options.barcode + + @property + def _opencv_modules(self): + def imageformats_deps(): + components = [] + if self.options.get_safe("with_jpeg2000"): + components.append("{0}::{0}".format(self.options.with_jpeg2000)) + if self.options.get_safe("with_png"): + components.append("libpng::libpng") + if self.options.get_safe("with_jpeg") == "libjpeg": + components.append("libjpeg::libjpeg") + elif self.options.get_safe("with_jpeg") == "libjpeg-turbo": + components.append("libjpeg-turbo::jpeg") + elif self.options.get_safe("with_jpeg") == "mozjpeg": + components.append("mozjpeg::libjpeg") + if self.options.get_safe("with_tiff"): + components.append("libtiff::libtiff") + if self.options.get_safe("with_openexr"): + components.append("openexr::openexr") + if self.options.get_safe("with_webp"): + components.append("libwebp::libwebp") + if self.options.get_safe("with_gdal"): + components.append("gdal::gdal") + if self.options.get_safe("with_gdcm"): + components.append("gdcm::gdcm") + return components + + def eigen(): + return ["eigen::eigen"] if self.options.with_eigen else [] + + def ffmpeg(): + if self.options.get_safe("with_ffmpeg"): + return [ + "ffmpeg::avcodec", "ffmpeg::avdevice", "ffmpeg::avformat", + "ffmpeg::avutil", "ffmpeg::swscale", + ] + return [] + + def freetype(): + return ["freetype::freetype"] if self.options.freetype else [] + + def gtk(): + return ["gtk::gtk"] if self.options.get_safe("with_gtk") else [] + + def ipp(): + if self.options.with_ipp == "intel-ipp": + return ["intel-ipp::intel-ipp"] + elif self.options.with_ipp == "opencv-icv" and not self.options.shared: + return ["ippiw"] + return [] + + def parallel(): + return ["onetbb::onetbb"] if self.options.parallel == "tbb" else [] + + def qt(): + return ["qt::qt"] if self.options.get_safe("with_qt") else [] + + def quirc(): + return ["quirc::quirc"] if self.options.get_safe("with_quirc") else [] + + def tesseract(): + return ["tesseract::tesseract"] if self.options.get_safe("with_tesseract") else [] + + def vulkan(): + return ["vulkan-headers::vulkan-headers"] if self.options.get_safe("with_vulkan") else [] + + def opencv_calib3d(): + return ["opencv_calib3d"] if self.options.calib3d else [] + + def opencv_cudaarithm(): + return ["opencv_cudaarithm"] if self.options.cudaarithm else [] + + def opencv_cudacodec(): + return ["opencv_cudacodec"] if self.options.cudacodec else [] + + def opencv_cudafeatures2d(): + return ["opencv_cudafeatures2d"] if self.options.cudafeatures2d else [] + + def opencv_cudafilters(): + return ["opencv_cudafilters"] if self.options.cudafilters else [] + + def opencv_cudaimgproc(): + return ["opencv_cudaimgproc"] if self.options.cudaimgproc else [] + + def opencv_cudalegacy(): + return ["opencv_cudalegacy"] if self.options.cudalegacy else [] + + def opencv_cudaoptflow(): + return ["opencv_cudaoptflow"] if self.options.cudaoptflow else [] + + def opencv_cudawarping(): + return ["opencv_cudawarping"] if self.options.cudawarping else [] + + def opencv_dnn(): + return ["opencv_dnn"] if self.options.dnn else [] + + def opencv_flann(): + return ["opencv_flann"] if self.options.flann else [] + + def opencv_imgcodecs(): + return ["opencv_imgcodecs"] if self.options.imgcodecs else [] + + def opencv_imgproc(): + return ["opencv_imgproc"] if self.options.imgproc else [] + + def opencv_objdetect(): + return ["opencv_objdetect"] if self.options.objdetect else [] + + def opencv_video(): + return ["opencv_video"] if self.options.video else [] + + def opencv_videoio(): + return ["opencv_videoio"] if self.options.videoio else [] + + def opencv_xfeatures2d(): + return ["opencv_xfeatures2d"] if self.options.xfeatures2d else [] + + opencv_modules = { + # Main modules + "calib3d": { + "is_built": self.options.calib3d, + "mandatory_options": ["features2d", "flann", "imgproc"], + "requires": ["opencv_core", "opencv_features2d", "opencv_flann", "opencv_imgproc"] + eigen() + ipp(), + }, + "core": { + "is_built": True, + "no_option": True, + "requires": ["zlib::zlib"] + parallel() + eigen() + ipp(), + "system_libs": [ + (self.settings.os == "Android", ["dl", "m", "log"]), + (self.settings.os == "FreeBSD", ["m", "pthread"]), + (self.settings.os == "Linux", ["dl", "m", "pthread", "rt"]), + ], + "frameworks": [ + (self.settings.os == "Macos" and self.options.get_safe("with_opencl"), ["OpenCL"]), + ], + }, + "dnn": { + "is_built": self.options.dnn, + "mandatory_options": ["imgproc"], + "requires": ["opencv_core", "opencv_imgproc", "protobuf::protobuf"] + vulkan() + ipp(), + }, + "features2d": { + "is_built": self.options.features2d, + "mandatory_options": ["imgproc"], + "requires": ["opencv_imgproc"] + opencv_flann() + eigen() + ipp(), + }, + "flann": { + "is_built": self.options.flann, + "requires": ["opencv_core"] + ipp(), + }, + "gapi": { + "is_built": self.options.gapi, + "mandatory_options": ["imgproc"], + "requires": ["opencv_imgproc", "ade::ade"], + "system_libs": [ + (self.settings.os == "Windows", ["ws2_32", "wsock32"]), + ], + }, + "highgui": { + "is_built": self.options.highgui, + "mandatory_options": ["imgproc"], + "requires": ["opencv_core", "opencv_imgproc"] + opencv_imgcodecs() + + opencv_videoio() + freetype() + gtk() + qt() + ipp(), + "system_libs": [ + (self.settings.os == "Windows", ["comctl32", "gdi32", "ole32", "setupapi", "ws2_32", "vfw32"]), + ], + "frameworks": [ + (self.settings.os == "Macos", ["Cocoa"]), + ], + }, + "imgcodecs": { + "is_built": self.options.imgcodecs, + "mandatory_options": ["imgproc"], + "requires": ["opencv_imgproc", "zlib::zlib"] + imageformats_deps() + ipp(), + "frameworks": [ + (is_apple_os(self), ["CoreFoundation", "CoreGraphics"]), + (self.settings.os == "iOS", ["UIKit"]), + (self.settings.os == "Macos", ["AppKit"]), + ], + }, + "imgproc": { + "is_built": self.options.imgproc, + "requires": ["opencv_core"] + ipp(), + }, + "ml": { + "is_built": self.options.ml, + "requires": ["opencv_core"] + ipp(), + }, + "objdetect": { + "is_built": self.options.objdetect, + "mandatory_options": ["calib3d", "imgproc"], + "requires": ["opencv_core", "opencv_calib3d", "opencv_imgproc"] + quirc() + ipp(), + }, + "photo": { + "is_built": self.options.photo, + "mandatory_options": ["imgproc"], + "requires": ["opencv_imgproc"] + opencv_cudaarithm() + opencv_cudaimgproc() + ipp(), + }, + "stitching": { + "is_built": self.options.stitching, + "mandatory_options": ["calib3d", "features2d", "flann", "imgproc"], + "requires": ["opencv_calib3d", "opencv_features2d", "opencv_flann", "opencv_imgproc"] + + opencv_xfeatures2d() + opencv_cudaarithm() + opencv_cudawarping() + + opencv_cudafeatures2d() + opencv_cudalegacy() + opencv_cudaimgproc() + eigen() + ipp(), + }, + "video": { + "is_built": self.options.video, + "mandatory_options": ["imgproc"], + "requires": ["opencv_imgproc"] + opencv_calib3d() + ipp(), + }, + "videoio": { + "is_built": self.options.videoio, + "mandatory_options": ["imgcodecs", "imgproc"], + "requires": ["opencv_imgcodecs", "opencv_imgproc"] + ffmpeg() + ipp(), + "system_libs": [ + (self.settings.os == "Android" and int(str(self.settings.os.api_level)) > 20, ["mediandk"]), + ], + "frameworks": [ + (is_apple_os(self), ["Accelerate", "AVFoundation", "CoreGraphics", "CoreMedia", "CoreVideo", "QuartzCore"]), + (self.settings.os == "iOS", ["CoreImage", "UIKit"]), + (self.settings.os == "Macos", ["Cocoa"]), + ], + }, + # Extra modules + "alphamat": { + "is_built": self.options.get_safe("alphamat"), + "mandatory_options": ["with_eigen", "imgproc"], + "requires": ["opencv_core", "opencv_imgproc"] + ipp(), + }, + "aruco": { + "is_built": self.options.aruco, + "mandatory_options": ["calib3d", "imgproc"], + "requires": ["opencv_core", "opencv_calib3d", "opencv_imgproc"] + ipp(), + }, + "barcode": { + "is_built": self.options.get_safe("barcode"), + "mandatory_options": ["dnn", "imgproc"], + "requires": ["opencv_core", "opencv_dnn", "opencv_imgproc"] + ipp(), + }, + "bgsegm": { + "is_built": self.options.bgsegm, + "mandatory_options": ["calib3d", "imgproc", "video"], + "requires": ["opencv_core", "opencv_calib3d", "opencv_imgproc", "opencv_video"] + ipp(), + }, + "bioinspired": { + "is_built": self.options.bioinspired, + "requires": ["opencv_core"] + ipp(), + }, + "ccalib": { + "is_built": self.options.ccalib, + "mandatory_options": ["calib3d", "features2d", "highgui", "imgproc"], + "requires": ["opencv_core", "opencv_calib3d", "opencv_features2d", "opencv_highgui", "opencv_imgproc"] + ipp(), + }, + "cudaarithm": { + "is_built": self.options.cudaarithm, + "mandatory_options": ["with_cuda"], + "requires": ["opencv_core", "opencv_cudev"] + ipp(), + }, + "cudabgsegm": { + "is_built": self.options.cudabgsegm, + "mandatory_options": ["with_cuda", "video"], + "requires": ["opencv_video"] + ipp(), + }, + "cudacodec": { + "is_built": self.options.cudacodec, + "mandatory_options": ["with_cuda", "videoio"], + "requires": ["opencv_core", "opencv_videoio", "opencv_cudev"] + ipp(), + }, + "cudafeatures2d": { + "is_built": self.options.cudafeatures2d, + "mandatory_options": ["with_cuda", "features2d", "cudafilters", "cudawarping"], + "requires": ["opencv_features2d", "opencv_cudafilters", "opencv_cudawarping"] + ipp(), + }, + "cudafilters": { + "is_built": self.options.cudafilters, + "mandatory_options": ["with_cuda", "imgproc", "cudaarithm"], + "requires": ["opencv_imgproc", "opencv_cudaarithm"] + ipp(), + }, + "cudaimgproc": { + "is_built": self.options.cudaimgproc, + "mandatory_options": ["with_cuda", "imgproc"], + "requires": ["opencv_imgproc", "opencv_cudev"] + opencv_cudaarithm() + opencv_cudafilters() + ipp(), + }, + "cudalegacy": { + "is_built": self.options.cudalegacy, + "mandatory_options": ["with_cuda", "video"], + "requires": ["opencv_core", "opencv_video"] + opencv_calib3d() + opencv_imgproc() + opencv_objdetect() + + opencv_cudaarithm() + opencv_cudafilters() + opencv_cudaimgproc() + ipp(), + }, + "cudaobjdetect": { + "is_built": self.options.cudaobjdetect, + "mandatory_options": ["with_cuda", "objdetect", "cudaarithm", "cudawarping"], + "requires": ["opencv_objdetect", "opencv_cudaarithm", "opencv_cudawarping"] + opencv_cudalegacy() + ipp(), + }, + "cudaoptflow": { + "is_built": self.options.cudaoptflow, + "mandatory_options": ["with_cuda", "video", "cudaarithm", "cudaimgproc", "cudawarping", "optflow"], + "requires": ["opencv_video", "opencv_cudaarithm", "cudaimgproc", "opencv_cudawarping", + "opencv_optflow"] + opencv_cudalegacy() + ipp(), + }, + "cudastereo": { + "is_built": self.options.cudastereo, + "mandatory_options": ["with_cuda", "calib3d"], + "requires": ["opencv_calib3d", "opencv_cudev"] + ipp(), + }, + "cudawarping": { + "is_built": self.options.cudawarping, + "mandatory_options": ["with_cuda", "imgproc"], + "requires": ["opencv_core", "opencv_imgproc", "opencv_cudev"] + ipp(), + }, + "cudev": { + "is_built": self.options.with_cuda, + "no_option": True, + "requires": ipp(), + }, + "cvv": { + "is_built": self.options.cvv, + "mandatory_options": ["with_qt", "features2d", "imgproc"], + "requires": ["opencv_core", "opencv_features2d", "opencv_imgproc", "qt::qt"] + ipp(), + }, + "datasets": { + "is_built": self.options.datasets, + "mandatory_options": ["flann", "imgcodecs", "ml"], + "requires": ["opencv_core", "opencv_flann", "opencv_imgcodecs", "opencv_ml"] + ipp(), + }, + "dnn_objdetect": { + "is_built": self.options.dnn_objdetect, + "mandatory_options": ["dnn", "imgproc"], + "requires": ["opencv_core", "opencv_dnn", "opencv_imgproc"] + ipp(), + }, + "dnn_superres": { + "is_built": self.options.dnn_superres, + "mandatory_options": ["dnn", "imgproc"], + "requires": ["opencv_core", "opencv_dnn", "opencv_imgproc"] + ipp(), + }, + "dpm": { + "is_built": self.options.dpm, + "mandatory_options": ["imgproc", "objdetect"], + "requires": ["opencv_core", "opencv_imgproc", "opencv_objdetect"] + ipp(), + }, + "face": { + "is_built": self.options.face, + "mandatory_options": ["calib3d", "imgproc", "objdetect", "photo"], + "requires": ["opencv_core", "opencv_calib3d", "opencv_imgproc", "opencv_objdetect", "opencv_photo"] + ipp(), + }, + "freetype": { + "is_built": self.options.freetype, + "mandatory_options": ["imgproc"], + "requires": ["opencv_core", "opencv_imgproc", "freetype::freetype", "harfbuzz::harfbuzz"] + ipp(), + }, + "fuzzy": { + "is_built": self.options.fuzzy, + "mandatory_options": ["imgproc"], + "requires": ["opencv_core", "opencv_imgproc"] + ipp(), + }, + "hdf": { + "is_built": self.options.hdf, + "requires": ["opencv_core", "hdf5::hdf5"] + ipp(), + }, + "hfs": { + "is_built": self.options.hfs, + "mandatory_options": ["imgproc"], + "requires": ["opencv_core", "opencv_imgproc"] + ipp(), + }, + "img_hash": { + "is_built": self.options.img_hash, + "is_part_of_world": False, + "mandatory_options": ["imgproc"], + "requires": ["opencv_core", "opencv_imgproc"] + ipp(), + }, + "intensity_transform": { + "is_built": self.options.get_safe("intensity_transform"), + "requires": ["opencv_core"] + ipp(), + }, + "line_descriptor": { + "is_built": self.options.line_descriptor, + "mandatory_options": ["imgproc"], + "requires": ["opencv_imgproc"] + ipp(), + }, + "mcc": { + "is_built": self.options.get_safe("mcc"), + "mandatory_options": ["calib3d", "dnn", "imgproc"], + "requires": ["opencv_core", "opencv_calib3d", "opencv_dnn", "opencv_imgproc"] + ipp(), + }, + "optflow": { + "is_built": self.options.optflow, + "mandatory_options": ["calib3d", "flann", "imgcodecs", "imgproc", "video", "ximgproc"], + "requires": ["opencv_core", "opencv_calib3d", "opencv_flann", "opencv_imgcodecs", "opencv_imgproc", + "opencv_video", "opencv_ximgproc"] + ipp(), + }, + "ovis": { + "is_built": self.options.ovis, + "mandatory_options": ["calib3d", "imgproc"], + "requires": ["opencv_core", "opencv_calib3d", "opencv_imgproc", "ogre::ogre"] + ipp(), + }, + "phase_unwrapping": { + "is_built": self.options.phase_unwrapping, + "mandatory_options": ["imgproc"], + "requires": ["opencv_core", "opencv_imgproc"] + ipp(), + }, + "plot": { + "is_built": self.options.plot, + "mandatory_options": ["imgproc"], + "requires": ["opencv_core", "opencv_imgproc"] + ipp(), + }, + "quality": { + "is_built": self.options.quality, + "mandatory_options": ["imgproc", "ml"], + "requires": ["opencv_core", "opencv_imgproc", "opencv_ml"] + ipp(), + }, + "rapid": { + "is_built": self.options.get_safe("rapid"), + "mandatory_options": ["calib3d", "imgproc"], + "requires": ["opencv_core", "opencv_calib3d", "opencv_imgproc"] + ipp(), + }, + "reg": { + "is_built": self.options.reg, + "mandatory_options": ["imgproc"], + "requires": ["opencv_core", "opencv_imgproc"] + ipp(), + }, + "rgbd": { + "is_built": self.options.rgbd, + "mandatory_options": ["calib3d", "imgproc"], + "requires": ["opencv_core", "opencv_calib3d", "opencv_imgproc"] + eigen() + ipp(), + }, + "saliency": { + "is_built": self.options.saliency, + "mandatory_options": ["features2d", "imgproc"], + "requires": ["opencv_features2d", "opencv_imgproc"] + ipp(), + }, + "sfm": { + "is_built": self.options.sfm, + "is_part_of_world": False, + "mandatory_options": ["with_eigen", "calib3d", "features2d", "imgcodecs", "xfeatures2d"], + "requires": ["opencv_core", "opencv_calib3d", "opencv_features2d", "opencv_imgcodecs", "opencv_xfeatures2d", + "correspondence", "multiview", "numeric", "glog::glog", "gflags::gflags"] + eigen() + ipp(), + }, + "shape": { + "is_built": self.options.shape, + "mandatory_options": ["calib3d", "imgproc"], + "requires": ["opencv_core", "opencv_calib3d", "opencv_imgproc"] + ipp(), + }, + "stereo": { + "is_built": self.options.stereo, + "mandatory_options": ["features2d", "imgproc", "tracking"], + "requires": ["opencv_core", "opencv_features2d", "opencv_imgproc", "opencv_tracking"] + ipp(), + }, + "structured_light": { + "is_built": self.options.structured_light, + "mandatory_options": ["calib3d", "imgproc", "phase_unwrapping"], + "requires": ["opencv_core", "opencv_calib3d", "opencv_imgproc", "opencv_phase_unwrapping"] + ipp(), + }, + "superres": { + "is_built": self.options.get_safe("superres"), + "mandatory_options": ["imgproc", "video", "optflow"], + "requires": ["opencv_imgproc", "opencv_video", "opencv_optflow"] + opencv_videoio() + ipp() + + opencv_cudaarithm() + opencv_cudafilters() + opencv_cudawarping() + opencv_cudaimgproc() + + opencv_cudaoptflow() + opencv_cudacodec(), + }, + "surface_matching": { + "is_built": self.options.surface_matching, + "mandatory_options": ["flann"], + "requires": ["opencv_core", "opencv_flann"] + ipp(), + }, + "text": { + "is_built": self.options.text, + "mandatory_options": ["dnn", "features2d", "imgproc", "ml"], + "requires": ["opencv_core", "opencv_dnn", "opencv_features2d", "opencv_imgproc", "opencv_ml"] + + tesseract() + ipp(), + }, + "tracking": { + "is_built": self.options.tracking, + "mandatory_options": ["imgproc", "video"], + "requires": ["opencv_core", "opencv_imgproc", "opencv_video"] + opencv_dnn() + ipp(), + }, + "videostab": { + "is_built": self.options.videostab, + "mandatory_options": ["calib3d", "features2d", "imgproc", "photo", "video"], + "requires": ["opencv_calib3d", "opencv_features2d", "opencv_imgproc", "opencv_photo", "opencv_video"] + + opencv_videoio() + ipp() + opencv_cudawarping() + opencv_cudaoptflow(), + }, + "viz": { + "is_built": self.options.viz, + "requires": ["opencv_core", "vtk::vtk"] + ipp(), + }, + "wechat_qrcode": { + "is_built": self.options.get_safe("wechat_qrcode"), + "mandatory_options": ["dnn", "imgproc"], + "requires": ["opencv_core", "opencv_dnn", "opencv_imgproc"] + ipp(), + }, + "xfeatures2d": { + "is_built": self.options.xfeatures2d, + "mandatory_options": ["calib3d", "features2d", "imgproc"], + "requires": ["opencv_core", "opencv_calib3d", "opencv_features2d", "opencv_imgproc"] + ipp() + opencv_cudaarithm(), + }, + "ximgproc": { + "is_built": self.options.ximgproc, + "mandatory_options": ["calib3d", "imgcodecs", "imgproc", "video"], + "requires": ["opencv_core", "opencv_calib3d", "opencv_imgcodecs", "opencv_imgproc", "opencv_video"] + + eigen() + ipp(), + }, + "xobjdetect": { + "is_built": self.options.xobjdetect, + "mandatory_options": ["imgcodecs", "imgproc", "objdetect"], + "requires": ["opencv_core", "opencv_imgcodecs", "opencv_imgproc", "opencv_objdetect"] + ipp(), + }, + "xphoto": { + "is_built": self.options.xphoto, + "mandatory_options": ["imgproc", "photo"], + "requires": ["opencv_core", "opencv_imgproc", "opencv_photo"] + ipp(), + }, + # Extra targets (without prefix in their target & lib name) + "ippiw": { + "is_built": self.options.with_ipp == "opencv-icv" and not self.options.shared, + "is_part_of_world": False, + "no_option": True, + }, + "numeric": { + "is_built": self.options.sfm, + "is_part_of_world": False, + "no_option": True, + "requires": eigen() + ipp(), + }, + "correspondence": { + "is_built": self.options.sfm, + "is_part_of_world": False, + "no_option": True, + "requires": ["opencv_imgcodecs", "multiview", "glog::glog"] + eigen() + ipp(), + }, + "multiview": { + "is_built": self.options.sfm, + "is_part_of_world": False, + "no_option": True, + "requires": ["numeric", "glog::glog"] + eigen() + ipp(), + }, + } + + if Version(self.version) >= "4.3.0": + opencv_modules["gapi"].setdefault("requires", []).extend(opencv_video()) + if Version(self.version) >= "4.5.2": + opencv_modules["gapi"].setdefault("requires", []).extend(opencv_calib3d()) + if Version(self.version) >= "4.5.4": + opencv_modules["objdetect"].setdefault("requires", []).extend(opencv_dnn()) + if Version(self.version) >= "4.5.1": + opencv_modules["video"].setdefault("requires", []).extend(opencv_dnn()) + if Version(self.version) >= "4.4.0": + opencv_modules["intensity_transform"].setdefault("mandatory_options", []).append("imgproc") + opencv_modules["intensity_transform"].setdefault("requires", []).append("opencv_imgproc") + if Version(self.version) < "4.3.0": + opencv_modules["stereo"].setdefault("mandatory_options", []).extend(["calib3d", "video"]) + opencv_modules["stereo"].setdefault("requires", []).extend(["opencv_calib3d", "opencv_video"]) + + return opencv_modules + + def _get_mandatory_disabled_options(self, opencv_modules): + direct_options_to_enable = {} + transitive_options_to_enable = {} + + # Check which direct options have to be enabled + base_options = [option for option, values in opencv_modules.items() + if not values.get("no_option") and self.options.get_safe(option)] + for base_option in base_options: + for mandatory_option in opencv_modules.get(base_option, {}).get("mandatory_options", []): + if not self.options.get_safe(mandatory_option): + direct_options_to_enable.setdefault(mandatory_option, set()).add(base_option) + + # Now traverse the graph to check which transitive options have to be enabled + def collect_transitive_options(base_option, option): + for mandatory_option in opencv_modules.get(option, {}).get("mandatory_options", []): + if not self.options.get_safe(mandatory_option): + if mandatory_option not in transitive_options_to_enable: + transitive_options_to_enable[mandatory_option] = set() + collect_transitive_options(base_option, mandatory_option) + if base_option not in direct_options_to_enable.get(mandatory_option, set()): + transitive_options_to_enable[mandatory_option].add(base_option) + + for base_option in base_options: + collect_transitive_options(base_option, base_option) + + return { + "direct": direct_options_to_enable, + "transitive": transitive_options_to_enable, + } + + def _solve_internal_dependency_graph(self, opencv_modules): + disabled_options = self._get_mandatory_disabled_options(opencv_modules) + direct_options_to_enable = disabled_options["direct"] + transitive_options_to_enable = disabled_options["transitive"] + + # Enable mandatory options + all_options_to_enable = set(direct_options_to_enable.keys()) + all_options_to_enable.update(transitive_options_to_enable.keys()) + if all_options_to_enable: + message = ("Several opencv options which were disabled will be enabled because " + "they are required by modules you have explicitly requested:\n") + + for option_to_enable in all_options_to_enable: + setattr(self.options, option_to_enable, True) + + direct_and_transitive = [] + direct = ", ".join(direct_options_to_enable.get(option_to_enable, [])) + if direct: + direct_and_transitive.append(f"direct dependency of {direct}") + transitive = ", ".join(transitive_options_to_enable.get(option_to_enable, [])) + if transitive: + direct_and_transitive.append(f"transitive dependency of {transitive}") + message += f" - {option_to_enable}: {' / '.join(direct_and_transitive)}\n" + + self.output.warning(message) def configure(self): if self.options.shared: self.options.rm_safe("fPIC") - if not self.options.contrib: - del self.options.contrib_freetype - del self.options.contrib_sfm + + # TODO: remove contrib option in few months + if self.options.contrib != "deprecated": + self.output.warning("contrib option is deprecated") + if self.options.contrib: + # During deprecation period, keep old behavior of contrib=True, which was to enable + # all available contribs. + ## Filter main module options + filtered_options = list(OPENCV_MAIN_MODULES_OPTIONS) + ## Filter extra modules not built previously with contrib=True + filtered_options.extend(["cvv", "freetype", "hdf", "ovis", "sfm", "viz"]) + ## Filter extra modules not built previously when some option was disabled + if not self.options.with_eigen: + filtered_options.append("alphamat") + if not self.options.with_cuda: + filtered_options.extend([ + "cudaarithm", "cudabgsegm", "cudacodec", "cudafeatures2d", "cudafilters", "cudaimgproc", + "cudalegacy", "cudaobjdetect", "cudaoptflow", "cudastereo", "cudawarping", + ]) + for option, values in self._opencv_modules.items(): + if option not in filtered_options and not values.get("no_option"): + try: + if hasattr(self.options, option): + setattr(self.options, option, True) + except ConanException: + continue + + # TODO: remove contrib_freetype option in few months + if self.options.contrib_freetype != "deprecated": + self.output.warning("contrib_freetype option is deprecated, use freetype option instead") + self.options.freetype = self.options.contrib_freetype + + # TODO: remove contrib_sfm option in few months + if self.options.contrib_sfm != "deprecated": + self.output.warning("contrib_sfm option is deprecated, use sfm option instead") + self.options.sfm = self.options.contrib_sfm + + # TODO: remove with_ade option in few months + if self.options.with_ade != "deprecated": + self.output.warning("with_ade option is deprecated, use gapi option instead") + self.options.gapi = self.options.with_ade + + # Call this first before any further manipulation of options based on other options + self._solve_internal_dependency_graph(self._opencv_modules) + if not self.options.dnn: - del self.options.dnn_cuda + self.options.rm_safe("dnn_cuda") + self.options.rm_safe("with_vulkan") + if not self.options.highgui: + self.options.rm_safe("with_gtk") + if not (self.options.highgui or self.options.cvv): + self.options.rm_safe("with_qt") + if not self.options.imgcodecs: + self.options.rm_safe("with_jpeg") + self.options.rm_safe("with_jpeg2000") + self.options.rm_safe("with_openexr") + self.options.rm_safe("with_png") + self.options.rm_safe("with_tiff") + self.options.rm_safe("with_webp") + self.options.rm_safe("with_gdal") + self.options.rm_safe("with_gdcm") + self.options.rm_safe("with_imgcodec_hdr") + self.options.rm_safe("with_imgcodec_pfm") + self.options.rm_safe("with_imgcodec_pxm") + self.options.rm_safe("with_imgcodec_sunraster") + self.options.rm_safe("with_msmf") + self.options.rm_safe("with_msmf_dxva") + if not self.options.objdetect: + self.options.rm_safe("with_quirc") + if not self.options.videoio: + self.options.rm_safe("with_ffmpeg") + self.options.rm_safe("with_v4l") if not self.options.with_cuda: - del self.options.with_cublas - del self.options.with_cudnn - del self.options.with_cufft - del self.options.dnn_cuda - del self.options.cuda_arch_bin - if bool(self.options.with_jpeg): + self.options.rm_safe("with_cublas") + self.options.rm_safe("with_cudnn") + self.options.rm_safe("with_cufft") + self.options.rm_safe("dnn_cuda") + self.options.rm_safe("cuda_arch_bin") + if not self.options.text: + self.options.rm_safe("with_tesseract") + + if bool(self.options.get_safe("with_jpeg", False)): if self.options.get_safe("with_jpeg2000") == "jasper": self.options["jasper"].with_libjpeg = self.options.with_jpeg if self.options.get_safe("with_tiff"): self.options["libtiff"].jpeg = self.options.with_jpeg - if self.settings.os == "Android": - self.options.with_openexr = False # disabled because this forces linkage to libc++_shared.so - def layout(self): cmake_layout(self, src_folder="src") def requirements(self): + # core module dependencies self.requires("zlib/1.2.13") - if self.options.with_jpeg == "libjpeg": + if self.options.with_eigen: + self.requires("eigen/3.4.0") + if self.options.parallel == "tbb": + self.requires("onetbb/2021.9.0") + if self.options.with_ipp == "intel-ipp": + self.requires("intel-ipp/2020") + # dnn module dependencies + if self.options.dnn: + # Symbols are exposed https://github.com/conan-io/conan-center-index/pull/16678#issuecomment-1507811867 + self.requires(f"protobuf/{self._protobuf_version}", transitive_libs=True, run=can_run(self)) + if self.options.get_safe("with_vulkan"): + self.requires("vulkan-headers/1.3.250.0") + # gapi module dependencies + if self.options.gapi: + self.requires("ade/0.1.2a") + # highgui module dependencies + if self.options.get_safe("with_gtk"): + self.requires("gtk/system") + if self.options.get_safe("with_qt"): + self.requires("qt/5.15.10") + # imgcodecs module dependencies + if self.options.get_safe("with_jpeg") == "libjpeg": self.requires("libjpeg/9e") - elif self.options.with_jpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/2.1.5") - elif self.options.with_jpeg == "mozjpeg": + elif self.options.get_safe("with_jpeg") == "libjpeg-turbo": + self.requires("libjpeg-turbo/3.0.0") + elif self.options.get_safe("with_jpeg") == "mozjpeg": self.requires("mozjpeg/4.1.1") if self.options.get_safe("with_jpeg2000") == "jasper": self.requires("jasper/4.0.0") elif self.options.get_safe("with_jpeg2000") == "openjpeg": self.requires("openjpeg/2.5.0") - if self.options.with_png: + if self.options.get_safe("with_png"): self.requires("libpng/1.6.40") - if self.options.with_openexr: - if Version(self.version) < "4.5.3": - # opencv < 4.5.3 doesn't support openexr >= 3 - self.requires("openexr/2.5.7") - else: - self.requires("openexr/3.1.9") + if self.options.get_safe("with_openexr"): + self.requires("openexr/3.1.9") if self.options.get_safe("with_tiff"): self.requires("libtiff/4.5.1") - if self.options.with_eigen: - self.requires("eigen/3.4.0") + if self.options.get_safe("with_webp"): + self.requires("libwebp/1.3.1") + if self.options.get_safe("with_gdal"): + self.requires("gdal/3.5.2") + if self.options.get_safe("with_gdcm"): + self.requires("gdcm/3.0.21") + # objdetect module dependencies + if self.options.get_safe("with_quirc"): + self.requires("quirc/1.2") + # videoio module dependencies if self.options.get_safe("with_ffmpeg"): # opencv doesn't support ffmpeg >= 5.0.0 for the moment (until 4.5.5 at least) self.requires("ffmpeg/4.4.3") - if self.options.parallel == "tbb": - self.requires("onetbb/2021.9.0") - if self.options.with_ipp == "intel-ipp": - self.requires("intel-ipp/2020") - if self.options.with_webp: - self.requires("libwebp/1.3.1") - if self.options.get_safe("contrib_freetype"): + # freetype module dependencies + if self.options.freetype: self.requires("freetype/2.13.0") - self.requires("harfbuzz/6.0.0") - if self.options.get_safe("contrib_sfm"): + self.requires("harfbuzz/8.1.1") + # hdf module dependencies + if self.options.hdf: + self.requires("hdf5/1.14.1") + # ovis module dependencies + if self.options.ovis: + self.requires("ogre/1.10.2") + # sfm module dependencies + if self.options.sfm: self.requires("gflags/2.2.2") self.requires("glog/0.6.0") - if self.options.with_quirc: - self.requires("quirc/1.1") - if self.options.get_safe("with_gtk"): - self.requires("gtk/system") - if self.options.dnn: - # Symbols are exposed https://github.com/conan-io/conan-center-index/pull/16678#issuecomment-1507811867 - self.requires(f"protobuf/{self._protobuf_version}", transitive_libs=True) - if self.options.with_ade: - self.requires("ade/0.1.2a") + # text module dependencies + if self.options.get_safe("with_tesseract"): + self.requires("tesseract/5.3.0") + + def package_id(self): + # deprecated options + del self.info.options.contrib + del self.info.options.contrib_freetype + del self.info.options.contrib_sfm + del self.info.options.with_ade + + def _check_mandatory_options(self, opencv_modules): + disabled_options = self._get_mandatory_disabled_options(opencv_modules) + direct_disabled_mandatory_options = disabled_options["direct"] + transitive_disabled_mandatory_options = disabled_options["transitive"] + + # check mandatory options + all_disabled_mandatory_options = set(direct_disabled_mandatory_options.keys()) + all_disabled_mandatory_options.update(transitive_disabled_mandatory_options.keys()) + if all_disabled_mandatory_options: + message = ("Several opencv options are disabled but are required by modules " + "you have explicitly requested:\n") + + for disabled_option in all_disabled_mandatory_options: + direct_and_transitive = [] + direct = ", ".join(direct_disabled_mandatory_options.get(disabled_option, [])) + if direct: + direct_and_transitive.append(f"direct dependency of {direct}") + transitive = ", ".join(transitive_disabled_mandatory_options.get(disabled_option, [])) + if transitive: + direct_and_transitive.append(f"transitive dependency of {transitive}") + message += f" - {disabled_option}: {' / '.join(direct_and_transitive)}\n" + + raise ConanInvalidConfiguration(message) 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.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.with_cuda and not self.options.contrib: - raise ConanInvalidConfiguration("contrib must be enabled for cuda") if self.options.get_safe("dnn_cuda") and \ - (not self.options.with_cuda or not self.options.contrib or not self.options.with_cublas or not self.options.with_cudnn): - raise ConanInvalidConfiguration("with_cublas, with_cudnn and contrib must be enabled for dnn_cuda") + (not self.options.with_cuda or not self.options.with_cublas or not self.options.with_cudnn): + raise ConanInvalidConfiguration("with_cublas and with_cudnn must be enabled for dnn_cuda") if self.options.with_ipp == "opencv-icv" and \ - (not str(self.settings.arch) in ["x86", "x86_64"] or \ - not str(self.settings.os) in ["Linux", "Macos", "Windows"]): + not (self.settings.arch in ["x86", "x86_64"] and self.settings.os in ["Linux", "Macos", "Windows"]): raise ConanInvalidConfiguration(f"opencv-icv is not available for {self.settings.os}/{self.settings.arch}") + if self.options.viz: + raise ConanInvalidConfiguration( + "viz module can't be enabled yet. It requires VTK which is not available in conan-center." + ) def build_requirements(self): - if self.options.dnn: - if hasattr(self, "settings_build") and cross_building(self): - self.tool_requires(f"protobuf/{self._protobuf_version}") + if self.options.dnn and not can_run(self): + self.tool_requires(f"protobuf/{self._protobuf_version}") def source(self): get(self, **self.conan_data["sources"][self.version][0], strip_root=True) @@ -258,6 +1145,7 @@ def _patch_sources(self): replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "ANDROID OR NOT UNIX", "FALSE") replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "elseif(EMSCRIPTEN)", "elseif(QNXNTO)\nelseif(EMSCRIPTEN)") replace_in_file(self, os.path.join(self.source_folder, "modules", "imgcodecs", "CMakeLists.txt"), "JASPER_", "Jasper_") + replace_in_file(self, os.path.join(self.source_folder, "modules", "imgcodecs", "CMakeLists.txt"), "${GDAL_LIBRARY}", "GDAL::GDAL") # Fix detection of ffmpeg replace_in_file(self, os.path.join(self.source_folder, "modules", "videoio", "cmake", "detect_ffmpeg.cmake"), @@ -285,35 +1173,20 @@ def _patch_sources(self): 'if(TARGET "${Protobuf_LIBRARIES}")', 'if(FALSE) # patch: disable if(TARGET "${Protobuf_LIBRARIES}")') - if self.options.get_safe("contrib_freetype"): + if self.options.freetype: freetype_cmake = os.path.join(self._contrib_folder, "modules", "freetype", "CMakeLists.txt") replace_in_file(self, freetype_cmake, "ocv_check_modules(FREETYPE freetype2)", "find_package(Freetype REQUIRED MODULE)") replace_in_file(self, freetype_cmake, "FREETYPE_", "Freetype_") - replace_in_file(self, freetype_cmake, "ocv_check_modules(HARFBUZZ harfbuzz)", "find_package(harfbuzz REQUIRED)") + replace_in_file(self, freetype_cmake, "ocv_check_modules(HARFBUZZ harfbuzz)", "find_package(harfbuzz REQUIRED CONFIG)") replace_in_file(self, freetype_cmake, "HARFBUZZ_", "harfbuzz_") - if self.options.get_safe("contrib_sfm") and Version(self.version) <= "4.5.2": - sfm_cmake = os.path.join(self._contrib_folder, "modules", "sfm", "CMakeLists.txt") - ver = Version(self.version) - if ver <= "4.5.0": - search = " find_package(Glog QUIET)\nendif()" - else: - search = ' set(GLOG_INCLUDE_DIRS "${GLOG_INCLUDE_DIR}")\nendif()' - replace_in_file(self, sfm_cmake, search, f"""{search} - if(NOT GFLAGS_LIBRARIES AND TARGET gflags::gflags) - set(GFLAGS_LIBRARIES gflags::gflags) - endif() - if(NOT GLOG_LIBRARIES AND TARGET glog::glog) - set(GLOG_LIBRARIES glog::glog) - endif()""") - def generate(self): if self.options.dnn: - if hasattr(self, "settings_build") and cross_building(self): - VirtualBuildEnv(self).generate() - else: + if can_run(self): VirtualRunEnv(self).generate(scope="build") + else: + VirtualBuildEnv(self).generate() tc = CMakeToolchain(self) tc.variables["OPENCV_CONFIG_INSTALL_PATH"] = "cmake" @@ -323,11 +1196,13 @@ def generate(self): tc.variables["OPENCV_OTHER_INSTALL_PATH"] = "res" tc.variables["OPENCV_LICENSES_INSTALL_PATH"] = "licenses" + tc.variables["OPENCV_SKIP_CMAKE_CXX_STANDARD"] = valid_min_cppstd(self, 11) + tc.variables["BUILD_CUDA_STUBS"] = False tc.variables["BUILD_DOCS"] = False tc.variables["BUILD_EXAMPLES"] = False tc.variables["BUILD_FAT_JAVA_LIB"] = False - tc.variables["BUILD_IPP_IW"] = False + tc.variables["BUILD_IPP_IW"] = self.options.with_ipp == "opencv-icv" tc.variables["BUILD_ITT"] = False tc.variables["BUILD_JASPER"] = False tc.variables["BUILD_JAVA"] = False @@ -357,12 +1232,11 @@ def generate(self): tc.variables["BUILD_opencv_ts"] = False tc.variables["WITH_1394"] = False - tc.variables["WITH_ADE"] = False tc.variables["WITH_ARAVIS"] = False tc.variables["WITH_CLP"] = False tc.variables["WITH_NVCUVID"] = False - tc.variables["WITH_FFMPEG"] = self.options.get_safe("with_ffmpeg") + tc.variables["WITH_FFMPEG"] = self.options.get_safe("with_ffmpeg", False) if self.options.get_safe("with_ffmpeg"): tc.variables["OPENCV_FFMPEG_SKIP_BUILD_CHECK"] = True tc.variables["OPENCV_FFMPEG_SKIP_DOWNLOAD"] = True @@ -370,72 +1244,70 @@ def generate(self): # libavcodec;libavformat;libavutil;libswscale modules tc.variables["OPENCV_FFMPEG_USE_FIND_PACKAGE"] = "ffmpeg" tc.variables["OPENCV_INSTALL_FFMPEG_DOWNLOAD_SCRIPT"] = False - tc.variables["FFMPEG_LIBRARIES"] = "ffmpeg::avcodec;ffmpeg::avformat;ffmpeg::avutil;ffmpeg::swscale" - ffmpeg_cpp_info = self.dependencies["ffmpeg"].cpp_info - for component in ["avcodec", "avformat", "avutil", "swscale"]: - ffmpeg_component_version = ffmpeg_cpp_info.components[component].get_property("component_version") - tc.variables[f"FFMPEG_lib{component}_VERSION"] = ffmpeg_component_version + ffmpeg_libraries = [] + for component in ["avcodec", "avdevice", "avformat", "avutil", "swscale", "avresample"]: + if component == "avutil" or self.dependencies["ffmpeg"].options.get_safe(component): + ffmpeg_libraries.append(f"ffmpeg::{component}") + ffmpeg_component_version = self.dependencies["ffmpeg"].cpp_info.components[component].get_property("component_version") + tc.variables[f"FFMPEG_lib{component}_VERSION"] = ffmpeg_component_version + tc.variables["FFMPEG_LIBRARIES"] = ";".join(ffmpeg_libraries) tc.variables["WITH_GSTREAMER"] = False tc.variables["WITH_HALIDE"] = False tc.variables["WITH_HPX"] = False - tc.variables["WITH_IMGCODEC_HDR"] = self.options.with_imgcodec_hdr - tc.variables["WITH_IMGCODEC_PFM"] = self.options.with_imgcodec_pfm - tc.variables["WITH_IMGCODEC_PXM"] = self.options.with_imgcodec_pxm - tc.variables["WITH_IMGCODEC_SUNRASTER"] = self.options.with_imgcodec_sunraster + tc.variables["WITH_IMGCODEC_HDR"] = self.options.get_safe("with_imgcodec_hdr", False) + tc.variables["WITH_IMGCODEC_PFM"] = self.options.get_safe("with_imgcodec_pfm", False) + tc.variables["WITH_IMGCODEC_PXM"] = self.options.get_safe("with_imgcodec_pxm", False) + tc.variables["WITH_IMGCODEC_SUNRASTER"] = self.options.get_safe("with_imgcodec_sunraster", False) tc.variables["WITH_INF_ENGINE"] = False - tc.variables["WITH_IPP"] = False - if self.options.with_ipp: - tc.variables["WITH_IPP"] = True - if self.options.with_ipp == "intel-ipp": - ipp_root = self.dependencies["intel-ipp"].package_folder.replace("\\", "/") - if self.settings.os == "Windows": - ipp_root = ipp_root.replace("\\", "/") - tc.variables["IPPROOT"] = ipp_root - tc.variables["IPPIWROOT"] = ipp_root - else: - tc.variables["BUILD_IPP_IW"] = True + tc.variables["WITH_IPP"] = bool(self.options.with_ipp) + if self.options.with_ipp == "intel-ipp": + ipp_root = self.dependencies["intel-ipp"].package_folder.replace("\\", "/") + tc.variables["IPPROOT"] = ipp_root + tc.variables["IPPIWROOT"] = ipp_root tc.variables["WITH_ITT"] = False tc.variables["WITH_LIBREALSENSE"] = False tc.variables["WITH_MFX"] = False tc.variables["WITH_NGRAPH"] = False - tc.variables["WITH_OPENCL"] = False + tc.variables["WITH_OPENCL"] = self.options.get_safe("with_opencl", False) tc.variables["WITH_OPENCLAMDBLAS"] = False tc.variables["WITH_OPENCLAMDFFT"] = False tc.variables["WITH_OPENCL_SVM"] = False tc.variables["WITH_OPENGL"] = False - tc.variables["WITH_OPENMP"] = False + tc.variables["WITH_TBB"] = self.options.parallel == "tbb" + tc.variables["WITH_OPENMP"] = self.options.parallel == "openmp" tc.variables["WITH_OPENNI"] = False tc.variables["WITH_OPENNI2"] = False tc.variables["WITH_OPENVX"] = False tc.variables["WITH_PLAIDML"] = False tc.variables["WITH_PVAPI"] = False - tc.variables["WITH_QT"] = False + tc.variables["WITH_QT"] = self.options.get_safe("with_qt", False) tc.variables["WITH_QUIRC"] = False tc.variables["WITH_V4L"] = self.options.get_safe("with_v4l", False) tc.variables["WITH_VA"] = False tc.variables["WITH_VA_INTEL"] = False - tc.variables["WITH_VTK"] = False - tc.variables["WITH_VULKAN"] = False + tc.variables["WITH_VTK"] = self.options.viz + tc.variables["WITH_VULKAN"] = self.options.get_safe("with_vulkan", False) + if self.options.get_safe("with_vulkan"): + tc.variables["VULKAN_INCLUDE_DIRS"] = os.path.join(self.dependencies["vulkan-headers"].package_folder, "include").replace("\\", "/") tc.variables["WITH_XIMEA"] = False tc.variables["WITH_XINE"] = False tc.variables["WITH_LAPACK"] = False tc.variables["WITH_GTK"] = self.options.get_safe("with_gtk", False) tc.variables["WITH_GTK_2_X"] = self._is_gtk_version2 - tc.variables["WITH_WEBP"] = self.options.with_webp - tc.variables["WITH_JPEG"] = bool(self.options.with_jpeg) - tc.variables["WITH_PNG"] = self.options.with_png + tc.variables["WITH_WEBP"] = self.options.get_safe("with_webp", False) + tc.variables["WITH_JPEG"] = bool(self.options.get_safe("with_jpeg", False)) + tc.variables["WITH_PNG"] = self.options.get_safe("with_png", False) if self._has_with_tiff_option: - tc.variables["WITH_TIFF"] = self.options.with_tiff + tc.variables["WITH_TIFF"] = self.options.get_safe("with_tiff", False) if self._has_with_jpeg2000_option: - tc.variables["WITH_JASPER"] = self.options.with_jpeg2000 == "jasper" - tc.variables["WITH_OPENJPEG"] = self.options.with_jpeg2000 == "openjpeg" - tc.variables["WITH_OPENEXR"] = self.options.with_openexr - if self.options.with_openexr: - tc.variables["CMAKE_CXX_STANDARD"] = 11 + tc.variables["WITH_JASPER"] = self.options.get_safe("with_jpeg2000") == "jasper" + tc.variables["WITH_OPENJPEG"] = self.options.get_safe("with_jpeg2000") == "openjpeg" + tc.variables["WITH_OPENEXR"] = self.options.get_safe("with_openexr", False) + 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["HAVE_QUIRC"] = self.options.with_quirc # force usage of quirc requirement tc.variables["WITH_DSHOW"] = is_msvc(self) tc.variables["WITH_MSMF"] = self.options.get_safe("with_msmf", False) tc.variables["WITH_MSMF_DXVA"] = self.options.get_safe("with_msmf_dxva", False) @@ -448,31 +1320,43 @@ def generate(self): if self.options.cpu_dispatch or self.options.cpu_dispatch == "": tc.variables["CPU_DISPATCH"] = self.options.cpu_dispatch - if self.options.get_safe("neon") is not None: - tc.variables["ENABLE_NEON"] = self.options.get_safe("neon") + tc.variables["ENABLE_NEON"] = self.options.get_safe("neon", False) + tc.variables["OPENCV_DNN_CUDA"] = self.options.get_safe("dnn_cuda", False) + + # Special world option merging all enabled modules into one big library file + tc.variables["BUILD_opencv_world"] = self.options.world + + # Main modules + tc.variables["BUILD_opencv_core"] = True + for module in OPENCV_MAIN_MODULES_OPTIONS: + tc.variables[f"BUILD_opencv_{module}"] = self.options.get_safe(module, False) tc.variables["WITH_PROTOBUF"] = self.options.dnn if self.options.dnn: tc.variables["PROTOBUF_UPDATE_FILES"] = True - tc.variables["BUILD_opencv_dnn"] = True - tc.variables["OPENCV_DNN_CUDA"] = self.options.get_safe("dnn_cuda", False) - - if self.options.contrib: - tc.variables["OPENCV_EXTRA_MODULES_PATH"] = os.path.join(self._contrib_folder, "modules").replace("\\", "/") - tc.variables["BUILD_opencv_freetype"] = self.options.get_safe("contrib_freetype", False) - tc.variables["BUILD_opencv_sfm"] = self.options.get_safe("contrib_sfm", False) + tc.variables["WITH_ADE"] = self.options.gapi + if self.options.objdetect: + tc.variables["HAVE_QUIRC"] = self.options.with_quirc # force usage of quirc requirement + + # Extra modules + tc.variables["OPENCV_EXTRA_MODULES_PATH"] = os.path.join(self._contrib_folder, "modules").replace("\\", "/") + tc.variables["BUILD_opencv_cudev"] = self.options.with_cuda + for module in OPENCV_EXTRA_MODULES_OPTIONS: + tc.variables[f"BUILD_opencv_{module}"] = self.options.get_safe(module, False) + tc.variables["BUILD_opencv_cnn_3dobj"] = False + if Version(self.version) >= "4.4.0": + tc.variables["BUILD_opencv_julia"] = False + tc.variables["BUILD_opencv_matlab"] = False + if self.options.text: + tc.variables["WITH_TESSERACT"] = self.options.with_tesseract if self.options.get_safe("with_jpeg2000") == "openjpeg": openjpeg_version = Version(self.dependencies["openjpeg"].ref.version) tc.variables["OPENJPEG_MAJOR_VERSION"] = openjpeg_version.major tc.variables["OPENJPEG_MINOR_VERSION"] = openjpeg_version.minor tc.variables["OPENJPEG_BUILD_VERSION"] = openjpeg_version.patch - if self.options.parallel: - tc.variables["WITH_TBB"] = self.options.parallel == "tbb" - tc.variables["WITH_OPENMP"] = self.options.parallel == "openmp" tc.variables["WITH_CUDA"] = self.options.with_cuda - tc.variables["WITH_ADE"] = self.options.with_ade if self.options.with_cuda: # This allows compilation on older GCC/NVCC, otherwise build errors. tc.variables["CUDA_NVCC_FLAGS"] = "--expt-relaxed-constexpr" @@ -511,9 +1395,12 @@ def package(self): os.path.join(self.package_folder, "res", "setup_vars_opencv4.cmd")) # TODO: to remove in conan v2 once cmake_find_package* generators removed + targets_mapping = {self._cmake_target(k): f"opencv::{self._cmake_target(k)}" for k in self._opencv_modules.keys()} + if self.options.world: + targets_mapping.update({"opencv_world": "opencv::opencv_world"}) self._create_cmake_module_alias_targets( os.path.join(self.package_folder, self._module_file_rel_path), - {component["target"]:"opencv::{}".format(component["target"]) for component in self._opencv_components} + targets_mapping, ) def _create_cmake_module_alias_targets(self, module_file, targets): @@ -544,245 +1431,104 @@ def _is_gtk_version2(self): else: return Version(gtk_version) < "3.0.0" - @property - def _opencv_components(self): - def imageformats_deps(): - components = [] - if self.options.get_safe("with_jpeg2000"): - components.append("{0}::{0}".format(self.options.with_jpeg2000)) - if self.options.with_png: - components.append("libpng::libpng") - if self.options.with_jpeg == "libjpeg": - components.append("libjpeg::libjpeg") - elif self.options.with_jpeg == "libjpeg-turbo": - components.append("libjpeg-turbo::jpeg") - elif self.options.with_jpeg == "mozjpeg": - components.append("mozjpeg::libjpeg") - if self.options.get_safe("with_tiff"): - components.append("libtiff::libtiff") - if self.options.with_openexr: - components.append("openexr::openexr") - if self.options.with_webp: - components.append("libwebp::libwebp") - return components - - def eigen(): - return ["eigen::eigen"] if self.options.with_eigen else [] - - def parallel(): - return ["onetbb::onetbb"] if self.options.parallel == "tbb" else [] - - def quirc(): - return ["quirc::quirc"] if self.options.with_quirc else [] - - def gtk(): - return ["gtk::gtk"] if self.options.get_safe("with_gtk") else [] - - def protobuf(): - return ["protobuf::protobuf"] if self.options.dnn else [] - - def freetype(): - return ["freetype::freetype"] if self.options.get_safe("contrib_freetype") else [] - - def xfeatures2d(): - return ["opencv_xfeatures2d"] if self.options.contrib else [] - - def ffmpeg(): - if self.options.get_safe("with_ffmpeg"): - return [ - "ffmpeg::avcodec", - "ffmpeg::avfilter", - "ffmpeg::avformat", - "ffmpeg::avutil", - "ffmpeg::swresample", - "ffmpeg::swscale" ] - else: - return [ ] - - def ipp(): - if self.options.with_ipp: - if self.options.with_ipp == "intel-ipp": - return ["intel-ipp::intel-ipp"] - elif self.options.with_ipp == "opencv-icv" and not self.options.shared: - return ["ippiw"] - else: - return [] - else: - return [] - - opencv_components = [ - {"target": "opencv_core", "lib": "core", "requires": ["zlib::zlib"] + parallel() + eigen() + ipp()}, - {"target": "opencv_flann", "lib": "flann", "requires": ["opencv_core"] + eigen() + ipp()}, - {"target": "opencv_imgproc", "lib": "imgproc", "requires": ["opencv_core"] + eigen() + ipp()}, - {"target": "opencv_ml", "lib": "ml", "requires": ["opencv_core"] + eigen() + ipp()}, - {"target": "opencv_photo", "lib": "photo", "requires": ["opencv_core", "opencv_imgproc"] + eigen() + ipp()}, - {"target": "opencv_features2d", "lib": "features2d", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc"] + eigen() + ipp()}, - {"target": "opencv_imgcodecs", "lib": "imgcodecs", "requires": ["opencv_core", "opencv_imgproc", "zlib::zlib"] + eigen() + imageformats_deps() + ipp()}, - {"target": "opencv_videoio", "lib": "videoio", "requires": ( - ["opencv_core", "opencv_imgproc", "opencv_imgcodecs"] - + eigen() + ffmpeg() + ipp())}, - {"target": "opencv_calib3d", "lib": "calib3d", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_features2d"]+ eigen() + ipp()}, - {"target": "opencv_highgui", "lib": "highgui", "requires": ["opencv_core", "opencv_imgproc", "opencv_imgcodecs", "opencv_videoio"] + freetype() + eigen() + gtk() + ipp()}, - {"target": "opencv_stitching", "lib": "stitching", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_features2d", "opencv_calib3d"] + xfeatures2d() + eigen() + ipp()}, - {"target": "opencv_video", "lib": "video", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_features2d", "opencv_calib3d"] + eigen() + ipp()}, - ] - if self.options.with_ipp == "opencv-icv" and not self.options.shared: - opencv_components.extend([ - {"target": "ippiw", "lib": "ippiw", "requires": []} - ]) - - if self.options.dnn: - opencv_components.extend([ - {"target": "opencv_dnn", "lib": "dnn", "requires": ["opencv_core", "opencv_imgproc"] + protobuf() + ipp()}, - {"target": "opencv_objdetect", "lib": "objdetect", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_features2d", "opencv_calib3d"] + eigen() + quirc() + ipp()}, - - ]) - if self.options.contrib: - opencv_components.extend([ - {"target": "opencv_phase_unwrapping", "lib": "phase_unwrapping", "requires": ["opencv_core", "opencv_imgproc"] + eigen() + ipp()}, - {"target": "opencv_plot", "lib": "plot", "requires": ["opencv_core", "opencv_imgproc"] + eigen() + ipp()}, - {"target": "opencv_quality", "lib": "quality", "requires": ["opencv_core", "opencv_imgproc", "opencv_ml"] + eigen() + ipp()}, - {"target": "opencv_reg", "lib": "reg", "requires": ["opencv_core", "opencv_imgproc"] + eigen() + ipp()}, - {"target": "opencv_surface_matching", "lib": "surface_matching", "requires": ["opencv_core", "opencv_flann"] + eigen() + ipp()}, - {"target": "opencv_xphoto", "lib": "xphoto", "requires": ["opencv_core", "opencv_imgproc", "opencv_photo"] + eigen() + ipp()}, - {"target": "opencv_fuzzy", "lib": "fuzzy", "requires": ["opencv_core", "opencv_imgproc"] + eigen() + ipp()}, - {"target": "opencv_hfs", "lib": "hfs", "requires": ["opencv_core", "opencv_imgproc"] + eigen() + ipp()}, - {"target": "opencv_img_hash", "lib": "img_hash", "requires": ["opencv_core", "opencv_imgproc"] + eigen() + ipp()}, - {"target": "opencv_line_descriptor", "lib": "line_descriptor", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_features2d"] + eigen() + ipp()}, - {"target": "opencv_saliency", "lib": "saliency", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_features2d"] + eigen() + ipp()}, - {"target": "opencv_datasets", "lib": "datasets", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_ml", "opencv_imgcodecs"] + eigen() + ipp()}, - {"target": "opencv_rgbd", "lib": "rgbd", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_features2d", "opencv_calib3d"] + eigen() + ipp()}, - {"target": "opencv_shape", "lib": "shape", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_features2d", "opencv_calib3d"] + eigen() + ipp()}, - {"target": "opencv_structured_light", "lib": "structured_light", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_phase_unwrapping", "opencv_features2d", "opencv_calib3d"] + eigen() + ipp()}, - {"target": "opencv_videostab", "lib": "videostab", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_photo", "opencv_features2d", "opencv_imgcodecs", "opencv_videoio", "opencv_calib3d", "opencv_video"] + eigen() + ipp()}, - {"target": "opencv_xfeatures2d", "lib": "xfeatures2d", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_ml", "opencv_features2d", "opencv_calib3d", "opencv_shape", ] + eigen() + ipp()}, - {"target": "opencv_ximgproc", "lib": "ximgproc", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_features2d", "opencv_imgcodecs", "opencv_calib3d", "opencv_video"] + eigen() + ipp()}, - {"target": "opencv_aruco", "lib": "aruco", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_features2d", "opencv_imgcodecs", "opencv_calib3d"] + eigen() + ipp()}, - {"target": "opencv_bgsegm", "lib": "bgsegm", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_features2d", "opencv_calib3d", "opencv_video"] + eigen() + ipp()}, - {"target": "opencv_bioinspired", "lib": "bioinspired", "requires": ["opencv_core", "opencv_imgproc", "opencv_imgcodecs", "opencv_videoio", "opencv_highgui"] + eigen() + ipp()}, - {"target": "opencv_ccalib", "lib": "ccalib", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_features2d", "opencv_imgcodecs", "opencv_videoio", "opencv_calib3d", "opencv_highgui"] + eigen() + ipp()}, - {"target": "opencv_optflow", "lib": "optflow", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_video", "opencv_features2d", "opencv_imgcodecs", "opencv_calib3d", "opencv_video", "opencv_ximgproc"] + eigen() + ipp()}, - {"target": "opencv_superres", "lib": "superres", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_features2d", "opencv_imgcodecs", "opencv_videoio", "opencv_calib3d", "opencv_video", "opencv_ximgproc", "opencv_optflow"] + eigen() + ipp()}, - {"target": "opencv_tracking", "lib": "tracking", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_ml", "opencv_plot", "opencv_features2d", "opencv_imgcodecs", "opencv_calib3d", "opencv_datasets", "opencv_video"] + eigen() + ipp()}, - {"target": "opencv_stereo", "lib": "stereo", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_ml", "opencv_plot", "opencv_features2d", "opencv_imgcodecs", "opencv_calib3d", "opencv_datasets", "opencv_video", "opencv_tracking"] + eigen() + ipp()}, - ]) - if self.options.dnn: - opencv_components.extend([ - {"target": "opencv_xobjdetect", "lib": "xobjdetect", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_features2d", "opencv_imgcodecs", "opencv_calib3d", "opencv_objdetect"] + eigen() + ipp()}, - {"target": "opencv_dpm", "lib": "dpm", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_features2d", "opencv_imgcodecs", "opencv_videoio", "opencv_calib3d", "opencv_highgui", "opencv_objdetect"] + eigen() + ipp()}, - {"target": "opencv_face", "lib": "face", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_photo", "opencv_features2d", "opencv_calib3d", "opencv_objdetect"] + eigen() + ipp()} - ]) - if self.version >= "4.3.0": - opencv_components.extend([ - {"target": "opencv_intensity_transform", "lib": "intensity_transform", "requires": ["opencv_core", "opencv_imgproc"] + eigen() + ipp()}, - {"target": "opencv_alphamat", "lib": "alphamat", "requires": ["opencv_core", "opencv_imgproc"] + eigen() + ipp()}, - {"target": "opencv_rapid", "lib": "rapid", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_features2d", "opencv_calib3d"] + eigen() + ipp()}, - ]) - - if self.options.get_safe("contrib_freetype"): - opencv_components.extend([ - {"target": "opencv_freetype", "lib": "freetype", "requires": ["opencv_core", "opencv_imgproc", "freetype::freetype", "harfbuzz::harfbuzz"] + eigen() + ipp()}, - ]) - - if self.options.get_safe("contrib_sfm"): - opencv_components.extend([ - {"target": "opencv_sfm", "lib": "sfm", "requires": ["opencv_core", "opencv_flann", "opencv_imgproc", "opencv_ml", "opencv_features2d", "opencv_imgcodecs", "opencv_calib3d", "opencv_shape", "opencv_xfeatures2d", "correspondence", "multiview", "numeric", "glog::glog", "gflags::gflags"] + eigen() + ipp()}, - {"target": "numeric", "lib": "numeric", "requires": eigen() + ipp()}, - {"target": "correspondence", "lib": "correspondence", "requires": ["multiview", "glog::glog"] + eigen() + ipp()}, - {"target": "multiview", "lib": "multiview", "requires": ["numeric", "gflags::gflags"] + eigen() + ipp()}, - ]) - - - if self.options.with_cuda: - opencv_components.extend([ - {"target": "opencv_cudaarithm", "lib": "cudaarithm", "requires": ["opencv_core"] + eigen() + ipp()}, - {"target": "opencv_cudabgsegm", "lib": "cudabgsegm", "requires": ["opencv_core", "opencv_video"] + eigen() + ipp()}, - {"target": "opencv_cudacodec", "lib": "cudacodec", "requires": ["opencv_core"] + eigen() + ipp()}, - {"target": "opencv_cudafeatures2d", "lib": "cudafeatures2d", "requires": ["opencv_core", "opencv_cudafilters"] + eigen() + ipp()}, - {"target": "opencv_cudafilters", "lib": "cudafilters", "requires": ["opencv_core", "opencv_imgproc"] + eigen() + ipp()}, - {"target": "opencv_cudaimgproc", "lib": "cudaimgproc", "requires": ["opencv_core", "opencv_imgproc"] + eigen() + ipp()}, - {"target": "opencv_cudalegacy", "lib": "cudalegacy", "requires": ["opencv_core", "opencv_video"] + eigen() + ipp()}, - {"target": "opencv_cudaobjdetect", "lib": "cudaobjdetect", "requires": ["opencv_core", "opencv_objdetect"] + eigen() + ipp()}, - {"target": "opencv_cudaoptflow", "lib": "cudaoptflow", "requires": ["opencv_core"] + eigen() + ipp()}, - {"target": "opencv_cudastereo", "lib": "cudastereo", "requires": ["opencv_core", "opencv_calib3d"] + eigen() + ipp()}, - {"target": "opencv_cudawarping", "lib": "cudawarping", "requires": ["opencv_core", "opencv_imgproc"] + eigen() + ipp()}, - {"target": "opencv_cudev", "lib": "cudev", "requires": [] + eigen() + ipp()}, - ]) - - if self.options.with_ade: - opencv_components.extend([ - {"target": "opencv_gapi", "lib": "gapi", "requires": ["opencv_imgproc", "opencv_calib3d", "opencv_video", "ade::ade"]}, - ]) - - return opencv_components + @staticmethod + def _cmake_target(module): + if module in ("ippiw", "correspondence", "multiview", "numeric"): + return module + return f"opencv_{module}" def package_info(self): version = self.version.split(".") version = "".join(version) if self.settings.os == "Windows" else "" debug = "d" if self.settings.build_type == "Debug" and self.settings.os == "Windows" else "" - def get_lib_name(module): + def get_libs(module): if module == "ippiw": - return f"{module}{debug}" + return [ + f"{module}{debug}", + "ippicvmt" if self.settings.os == "Windows" else "ippicv", + ] elif module in ("correspondence", "multiview", "numeric"): - return module + return [module] else: - return f"opencv_{module}{version}{debug}" - - def add_components(components): - for component in components: - conan_component = component["target"] - cmake_target = component["target"] - cmake_component = component["lib"] - lib_name = get_lib_name(component["lib"]) - requires = component["requires"] - # TODO: we should also define COMPONENTS names of each target for find_package() but not possible yet in CMakeDeps - # see https://github.com/conan-io/conan/issues/10258 + libs = [f"opencv_{module}{version}{debug}"] + if module in ["core", "world"] and not self.options.shared: + lib_exclude_filter = "(opencv_|ippi|correspondence|multiview|numeric).*" + libs += list(filter(lambda x: not re.match(lib_exclude_filter, x), collect_libs(self))) + return libs + + def add_components(modules): + if self.options.world: + self.cpp_info.components["opencv_world"].set_property("cmake_target_name", "opencv_world") + self.cpp_info.components["opencv_world"].libs = get_libs("world") + self.cpp_info.components["opencv_world"].resdirs = ["res"] + if self.settings.os != "Windows": + self.cpp_info.components["opencv_world"].includedirs.append(os.path.join("include", "opencv4")) + world_requires = set() + world_requires_exclude = set() + world_system_libs = set() + world_frameworks = set() + + for module, values in modules.items(): + if not values.get("is_built"): + continue + cmake_target = self._cmake_target(module) + conan_component = cmake_target + # TODO: we should also define COMPONENTS names of each target for find_package() but + # not possible yet in CMakeDeps. See https://github.com/conan-io/conan/issues/10258 self.cpp_info.components[conan_component].set_property("cmake_target_name", cmake_target) - self.cpp_info.components[conan_component].libs = [lib_name] - if lib_name.startswith("ippiw"): - self.cpp_info.components[conan_component].libs.append("ippicvmt" if self.settings.os == "Windows" else "ippicv") + self.cpp_info.components[conan_component].resdirs = ["res"] if self.settings.os != "Windows": self.cpp_info.components[conan_component].includedirs.append(os.path.join("include", "opencv4")) - self.cpp_info.components[conan_component].requires = requires - if self.settings.os == "Linux": - self.cpp_info.components[conan_component].system_libs = ["dl", "m", "pthread", "rt"] - - if self.settings.os == "Android": - self.cpp_info.components[conan_component].system_libs.append("log") - if int(str(self.settings.os.api_level)) > 20: - self.cpp_info.components[conan_component].system_libs.append("mediandk") - if conan_component == "opencv_core" and not self.options.shared: - lib_exclude_filter = "(opencv_|ippi|correspondence|multiview|numeric).*" - libs = list(filter(lambda x: not re.match(lib_exclude_filter, x), collect_libs(self))) - self.cpp_info.components[conan_component].libs += libs + module_requires = values.get("requires", []) + module_system_libs = [] + for _condition, _system_libs in values.get("system_libs", []): + if _condition: + module_system_libs.extend(_system_libs) + module_frameworks = [] + for _condition, _frameworks in values.get("frameworks", []): + if _condition: + module_frameworks.extend(_frameworks) + + if self.options.world and values.get("is_part_of_world", True): + self.cpp_info.components[conan_component].requires = ["opencv_world"] + world_requires.update(module_requires) + world_requires_exclude.add(conan_component) + world_system_libs.update(module_system_libs) + world_frameworks.update(module_frameworks) + else: + self.cpp_info.components[conan_component].libs = get_libs(module) + self.cpp_info.components[conan_component].requires = module_requires + self.cpp_info.components[conan_component].system_libs = module_system_libs + self.cpp_info.components[conan_component].frameworks = module_frameworks # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.components[conan_component].names["cmake_find_package"] = cmake_target self.cpp_info.components[conan_component].names["cmake_find_package_multi"] = cmake_target self.cpp_info.components[conan_component].build_modules["cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components[conan_component].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] - if cmake_component != cmake_target: + if module != cmake_target: conan_component_alias = conan_component + "_alias" - self.cpp_info.components[conan_component_alias].names["cmake_find_package"] = cmake_component - self.cpp_info.components[conan_component_alias].names["cmake_find_package_multi"] = cmake_component + self.cpp_info.components[conan_component_alias].names["cmake_find_package"] = module + self.cpp_info.components[conan_component_alias].names["cmake_find_package_multi"] = module self.cpp_info.components[conan_component_alias].requires = [conan_component] self.cpp_info.components[conan_component_alias].bindirs = [] self.cpp_info.components[conan_component_alias].includedirs = [] self.cpp_info.components[conan_component_alias].libdirs = [] - self.cpp_info.set_property("cmake_file_name", "OpenCV") + if self.options.world: + self.cpp_info.components["opencv_world"].requires = list(world_requires - world_requires_exclude) + self.cpp_info.components["opencv_world"].system_libs = list(world_system_libs) + self.cpp_info.components["opencv_world"].frameworks = list(world_frameworks) + + # TODO: to remove in conan v2 once cmake_find_package* generators removed + self.cpp_info.components["opencv_world"].build_modules["cmake_find_package"] = [self._module_file_rel_path] + self.cpp_info.components["opencv_world"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] - add_components(self._opencv_components) + self.cpp_info.set_property("cmake_file_name", "OpenCV") - if self.settings.os == "Windows": - self.cpp_info.components["opencv_highgui"].system_libs = ["comctl32", "gdi32", "ole32", "setupapi", "ws2_32", "vfw32"] - elif self.settings.os == "Macos": - self.cpp_info.components["opencv_highgui"].frameworks = ["Cocoa"] - self.cpp_info.components["opencv_videoio"].frameworks = ["Cocoa", "Accelerate", "AVFoundation", "CoreGraphics", "CoreMedia", "CoreVideo", "QuartzCore"] - elif self.settings.os == "iOS": - self.cpp_info.components["opencv_videoio"].frameworks = ["AVFoundation", "QuartzCore"] + add_components(self._opencv_modules) # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.filenames["cmake_find_package"] = "OpenCV" diff --git a/recipes/opencv/4.x/patches/4.1.2-0005-tracking-no-plot-deps.patch b/recipes/opencv/4.x/patches/4.1.2-0005-tracking-no-plot-deps.patch new file mode 100644 index 0000000000000..9113058791110 --- /dev/null +++ b/recipes/opencv/4.x/patches/4.1.2-0005-tracking-no-plot-deps.patch @@ -0,0 +1,7 @@ +--- a/contrib/modules/tracking/CMakeLists.txt ++++ b/contrib/modules/tracking/CMakeLists.txt +@@ -1,3 +1,3 @@ + set(the_description "Tracking API") +-ocv_define_module(tracking opencv_imgproc opencv_core opencv_video opencv_plot OPTIONAL opencv_dnn opencv_datasets WRAP java python) ++ocv_define_module(tracking opencv_imgproc opencv_core opencv_video OPTIONAL opencv_plot opencv_dnn opencv_datasets WRAP java python) + ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-shadow /wd4458) diff --git a/recipes/opencv/4.x/patches/4.1.2-0006-hdf.patch b/recipes/opencv/4.x/patches/4.1.2-0006-hdf.patch new file mode 100644 index 0000000000000..29f4b36e65dc2 --- /dev/null +++ b/recipes/opencv/4.x/patches/4.1.2-0006-hdf.patch @@ -0,0 +1,21 @@ +--- a/contrib/modules/hdf/CMakeLists.txt ++++ b/contrib/modules/hdf/CMakeLists.txt +@@ -1,6 +1,4 @@ +-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}) +- +-if(WIN32) ++if(0) + # windows cmake internal lookups are broken for now + # will lookup for headers and shared libs given HDF_DIR env + find_path(HDF5_INCLUDE_DIRS hdf5.h HINTS "$ENV{HDF5_DIR}\\..\\include") +@@ -16,8 +14,8 @@ if(WIN32) + set(HDF5_FOUND "NO") + endif() + else() +- if(NOT CMAKE_CROSSCOMPILING) # iOS build should not reuse OSX package +- find_package(HDF5) ++ if(1) ++ find_package(HDF5 CONFIG) + endif() + endif() + diff --git a/recipes/opencv/4.x/patches/4.1.2-0008-link-qt-targets.patch b/recipes/opencv/4.x/patches/4.1.2-0008-link-qt-targets.patch new file mode 100644 index 0000000000000..b32a2916816cb --- /dev/null +++ b/recipes/opencv/4.x/patches/4.1.2-0008-link-qt-targets.patch @@ -0,0 +1,29 @@ +--- a/contrib/modules/cvv/CMakeLists.txt ++++ b/contrib/modules/cvv/CMakeLists.txt +@@ -14,7 +14,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) + foreach(dt5_dep Core Gui Widgets) + add_definitions(${Qt5${dt5_dep}_DEFINITIONS}) + include_directories(${Qt5${dt5_dep}_INCLUDE_DIRS}) +- list(APPEND CVV_LIBRARIES ${Qt5${dt5_dep}_LIBRARIES}) ++ list(APPEND CVV_LIBRARIES Qt5::${dt5_dep}) + endforeach() + + ocv_glob_module_sources() +--- a/modules/highgui/CMakeLists.txt ++++ b/modules/highgui/CMakeLists.txt +@@ -58,13 +58,13 @@ if(HAVE_QT5) + foreach(dt5_dep Core Gui Widgets Test Concurrent) + add_definitions(${Qt5${dt5_dep}_DEFINITIONS}) + include_directories(${Qt5${dt5_dep}_INCLUDE_DIRS}) +- list(APPEND HIGHGUI_LIBRARIES ${Qt5${dt5_dep}_LIBRARIES}) ++ list(APPEND HIGHGUI_LIBRARIES Qt5::${dt5_dep}) + endforeach() + + if(HAVE_QT_OPENGL) + add_definitions(${Qt5OpenGL_DEFINITIONS}) + include_directories(${Qt5OpenGL_INCLUDE_DIRS}) +- list(APPEND HIGHGUI_LIBRARIES ${Qt5OpenGL_LIBRARIES}) ++ list(APPEND HIGHGUI_LIBRARIES Qt5::OpenGL) + endif() + + elseif(HAVE_QT) diff --git a/recipes/opencv/4.x/patches/4.1.2-0009-sfm-deps.patch b/recipes/opencv/4.x/patches/4.1.2-0009-sfm-deps.patch new file mode 100644 index 0000000000000..c4ff008107555 --- /dev/null +++ b/recipes/opencv/4.x/patches/4.1.2-0009-sfm-deps.patch @@ -0,0 +1,49 @@ +--- a/contrib/modules/sfm/CMakeLists.txt ++++ b/contrib/modules/sfm/CMakeLists.txt +@@ -9,8 +9,14 @@ find_package(Ceres QUIET) + if(NOT Ceres_FOUND) # Looks like Ceres find glog on the own, so separate search isn't necessary + find_package(Glog QUIET) + endif() ++if(NOT GFLAGS_LIBRARIES AND TARGET gflags::gflags) ++ set(GFLAGS_LIBRARIES gflags::gflags) ++endif() ++if(NOT GLOG_LIBRARIES AND TARGET glog::glog) ++ set(GLOG_LIBRARIES glog::glog) ++endif() + +-if((gflags_FOUND OR GFLAGS_FOUND OR GFLAGS_INCLUDE_DIRS) AND (glog_FOUND OR GLOG_FOUND OR GLOG_INCLUDE_DIRS)) ++if(0) + set(_fname "${CMAKE_CURRENT_BINARY_DIR}/test_sfm_deps.cpp") + file(WRITE "${_fname}" "#include \n#include \nint main() { (void)(0); return 0; }\n") + try_compile(SFM_DEPS_OK "${CMAKE_BINARY_DIR}" "${_fname}" +@@ -21,7 +27,7 @@ if((gflags_FOUND OR GFLAGS_FOUND OR GFLAGS_INCLUDE_DIRS) AND (glog_FOUND OR GLOG + file(REMOVE "${_fname}") + message(STATUS "Checking SFM deps... ${SFM_DEPS_OK}") + else() +- set(SFM_DEPS_OK FALSE) ++ set(SFM_DEPS_OK TRUE) + endif() + + if(NOT HAVE_EIGEN OR NOT SFM_DEPS_OK) +--- a/contrib/modules/sfm/src/libmv_light/libmv/correspondence/CMakeLists.txt ++++ b/contrib/modules/sfm/src/libmv_light/libmv/correspondence/CMakeLists.txt +@@ -8,7 +8,7 @@ FILE(GLOB CORRESPONDENCE_HDRS *.h) + + ADD_LIBRARY(correspondence STATIC ${CORRESPONDENCE_SRC} ${CORRESPONDENCE_HDRS}) + +-TARGET_LINK_LIBRARIES(correspondence LINK_PRIVATE ${GLOG_LIBRARY} multiview) ++TARGET_LINK_LIBRARIES(correspondence LINK_PRIVATE ${GLOG_LIBRARIES} multiview) + IF(TARGET Eigen3::Eigen) + TARGET_LINK_LIBRARIES(correspondence LINK_PUBLIC Eigen3::Eigen) + ENDIF() +--- a/contrib/modules/sfm/src/libmv_light/libmv/multiview/CMakeLists.txt ++++ b/contrib/modules/sfm/src/libmv_light/libmv/multiview/CMakeLists.txt +@@ -17,7 +17,7 @@ SET(MULTIVIEW_SRC conditioning.cc + FILE(GLOB MULTIVIEW_HDRS *.h) + + ADD_LIBRARY(multiview STATIC ${MULTIVIEW_SRC} ${MULTIVIEW_HDRS}) +-TARGET_LINK_LIBRARIES(multiview LINK_PRIVATE ${GLOG_LIBRARY} numeric) ++TARGET_LINK_LIBRARIES(multiview LINK_PRIVATE ${GLOG_LIBRARIES} numeric) + IF(TARGET Eigen3::Eigen) + TARGET_LINK_LIBRARIES(multiview LINK_PUBLIC Eigen3::Eigen) + ENDIF() diff --git a/recipes/opencv/4.x/patches/4.1.2-0010-compat-protobuf-ge-3.18.patch b/recipes/opencv/4.x/patches/4.1.2-0010-compat-protobuf-ge-3.18.patch new file mode 100644 index 0000000000000..5bd6bfd1b3816 --- /dev/null +++ b/recipes/opencv/4.x/patches/4.1.2-0010-compat-protobuf-ge-3.18.patch @@ -0,0 +1,22 @@ +--- a/modules/dnn/src/caffe/caffe_io.cpp ++++ b/modules/dnn/src/caffe/caffe_io.cpp +@@ -92,6 +92,7 @@ + #ifdef HAVE_PROTOBUF + #include + #include ++#include + #include + + #include +@@ -1111,7 +1112,11 @@ static const int kProtoReadBytesLimit = INT_MAX; // Max size of 2 GB minus 1 by + + bool ReadProtoFromBinary(ZeroCopyInputStream* input, Message *proto) { + CodedInputStream coded_input(input); ++#if GOOGLE_PROTOBUF_VERSION >= 3006000 ++ coded_input.SetTotalBytesLimit(kProtoReadBytesLimit); ++#else + coded_input.SetTotalBytesLimit(kProtoReadBytesLimit, 536870912); ++#endif + + return proto->ParseFromCodedStream(&coded_input); + } diff --git a/recipes/opencv/4.x/patches/4.1.2-0011-compat-openexr3.patch b/recipes/opencv/4.x/patches/4.1.2-0011-compat-openexr3.patch new file mode 100644 index 0000000000000..3854d36a913a0 --- /dev/null +++ b/recipes/opencv/4.x/patches/4.1.2-0011-compat-openexr3.patch @@ -0,0 +1,10 @@ +--- a/modules/imgcodecs/src/grfmt_exr.cpp ++++ b/modules/imgcodecs/src/grfmt_exr.cpp +@@ -56,6 +56,7 @@ + #include + #include + ++#include + #include + #include + #include diff --git a/recipes/opencv/4.x/patches/4.5.1-0001-tracking-no-plot-deps.patch b/recipes/opencv/4.x/patches/4.5.1-0001-tracking-no-plot-deps.patch new file mode 100644 index 0000000000000..6e57a96b98355 --- /dev/null +++ b/recipes/opencv/4.x/patches/4.5.1-0001-tracking-no-plot-deps.patch @@ -0,0 +1,13 @@ +--- a/contrib/modules/tracking/CMakeLists.txt ++++ b/contrib/modules/tracking/CMakeLists.txt +@@ -9,9 +9,9 @@ ocv_define_module(tracking + opencv_imgproc + opencv_core + opencv_video +- opencv_plot # samples only + ${debug_modules} + OPTIONAL ++ opencv_plot + opencv_dnn + opencv_datasets + opencv_highgui diff --git a/recipes/opencv/4.x/patches/4.5.1-0002-alphamat-header.patch b/recipes/opencv/4.x/patches/4.5.1-0002-alphamat-header.patch new file mode 100644 index 0000000000000..847eeaa9e9869 --- /dev/null +++ b/recipes/opencv/4.x/patches/4.5.1-0002-alphamat-header.patch @@ -0,0 +1,11 @@ +--- a/contrib/modules/alphamat/include/opencv2/alphamat.hpp ++++ b/contrib/modules/alphamat/include/opencv2/alphamat.hpp +@@ -7,6 +7,8 @@ + #ifndef _OPENCV_ALPHAMAT_HPP_ + #define _OPENCV_ALPHAMAT_HPP_ + ++#include ++ + /** + * @defgroup alphamat Alpha Matting + * Alpha matting is used to extract a foreground object with soft boundaries from a background image. diff --git a/recipes/opencv/4.x/patches/4.5.3-0002-link-qt-targets.patch b/recipes/opencv/4.x/patches/4.5.3-0002-link-qt-targets.patch new file mode 100644 index 0000000000000..b9b34a95156fe --- /dev/null +++ b/recipes/opencv/4.x/patches/4.5.3-0002-link-qt-targets.patch @@ -0,0 +1,30 @@ +--- a/contrib/modules/cvv/CMakeLists.txt ++++ b/contrib/modules/cvv/CMakeLists.txt +@@ -14,7 +14,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) + foreach(dt5_dep Core Gui Widgets) + add_definitions(${Qt5${dt5_dep}_DEFINITIONS}) + include_directories(${Qt5${dt5_dep}_INCLUDE_DIRS}) +- list(APPEND CVV_LIBRARIES ${Qt5${dt5_dep}_LIBRARIES}) ++ list(APPEND CVV_LIBRARIES Qt5::${dt5_dep}) + endforeach() + + ocv_glob_module_sources() +--- a/modules/highgui/CMakeLists.txt ++++ b/modules/highgui/CMakeLists.txt +@@ -69,14 +69,14 @@ if(HAVE_QT5) + foreach(dt5_dep Core Gui Widgets Test Concurrent) + add_definitions(${Qt5${dt5_dep}_DEFINITIONS}) + include_directories(${Qt5${dt5_dep}_INCLUDE_DIRS}) +- list(APPEND HIGHGUI_LIBRARIES ${Qt5${dt5_dep}_LIBRARIES}) ++ list(APPEND HIGHGUI_LIBRARIES Qt5::${dt5_dep}) + endforeach() + + if(HAVE_QT_OPENGL) + add_definitions(-DHAVE_QT_OPENGL) + add_definitions(${Qt5OpenGL_DEFINITIONS}) + include_directories(${Qt5OpenGL_INCLUDE_DIRS}) +- list(APPEND HIGHGUI_LIBRARIES ${Qt5OpenGL_LIBRARIES}) ++ list(APPEND HIGHGUI_LIBRARIES Qt5::OpenGL) + endif() + elseif(HAVE_QT) + set(OPENCV_HIGHGUI_BUILTIN_BACKEND "QT4") diff --git a/recipes/opencv/4.x/patches/4.5.5-0002-objdetect-without-dnn.patch b/recipes/opencv/4.x/patches/4.5.5-0002-objdetect-without-dnn.patch new file mode 100644 index 0000000000000..5313e7b762001 --- /dev/null +++ b/recipes/opencv/4.x/patches/4.5.5-0002-objdetect-without-dnn.patch @@ -0,0 +1,97 @@ +--- a/modules/objdetect/CMakeLists.txt ++++ b/modules/objdetect/CMakeLists.txt +@@ -1,5 +1,16 @@ + set(the_description "Object Detection") +-ocv_define_module(objdetect opencv_core opencv_imgproc opencv_calib3d opencv_dnn WRAP java objc python js) ++ocv_define_module(objdetect ++ opencv_core ++ opencv_imgproc ++ opencv_calib3d ++ OPTIONAL ++ opencv_dnn ++ WRAP ++ python ++ java ++ objc ++ js ++) + + if(HAVE_QUIRC) + get_property(QUIRC_INCLUDE GLOBAL PROPERTY QUIRC_INCLUDE_DIR) +--- a/modules/objdetect/src/face_detect.cpp ++++ b/modules/objdetect/src/face_detect.cpp +@@ -6,13 +6,16 @@ + + #include "opencv2/imgproc.hpp" + #include "opencv2/core.hpp" ++#ifdef HAVE_OPENCV_DNN + #include "opencv2/dnn.hpp" ++#endif + + #include + + namespace cv + { + ++#ifdef HAVE_OPENCV_DNN + class FaceDetectorYNImpl : public FaceDetectorYN + { + public: +@@ -273,6 +276,7 @@ class FaceDetectorYNImpl : public FaceDetectorYN + + std::vector priors; + }; ++#endif + + Ptr FaceDetectorYN::create(const String& model, + const String& config, +@@ -283,7 +287,12 @@ Ptr FaceDetectorYN::create(const String& model, + const int backend_id, + const int target_id) + { ++#ifdef HAVE_OPENCV_DNN + return makePtr(model, config, input_size, score_threshold, nms_threshold, top_k, backend_id, target_id); ++#else ++ CV_UNUSED(model); CV_UNUSED(config); CV_UNUSED(input_size); CV_UNUSED(score_threshold); CV_UNUSED(nms_threshold); CV_UNUSED(top_k); CV_UNUSED(backend_id); CV_UNUSED(target_id); ++ CV_Error(cv::Error::StsNotImplemented, "cv::FaceDetectorYN requires enabled 'dnn' module."); ++#endif + } + + } // namespace cv +--- a/modules/objdetect/src/face_recognize.cpp ++++ b/modules/objdetect/src/face_recognize.cpp +@@ -4,13 +4,17 @@ + + #include "precomp.hpp" + ++#include "opencv2/core.hpp" ++#ifdef HAVE_OPENCV_DNN + #include "opencv2/dnn.hpp" ++#endif + + #include + + namespace cv + { + ++#ifdef HAVE_OPENCV_DNN + class FaceRecognizerSFImpl : public FaceRecognizerSF + { + public: +@@ -173,10 +177,16 @@ class FaceRecognizerSFImpl : public FaceRecognizerSF + private: + dnn::Net net; + }; ++#endif + + Ptr FaceRecognizerSF::create(const String& model, const String& config, int backend_id, int target_id) + { ++#ifdef HAVE_OPENCV_DNN + return makePtr(model, config, backend_id, target_id); ++#else ++ CV_UNUSED(model); CV_UNUSED(config); CV_UNUSED(backend_id); CV_UNUSED(target_id); ++ CV_Error(cv::Error::StsNotImplemented, "cv::FaceRecognizerSF requires enabled 'dnn' module"); ++#endif + } + + } // namespace cv diff --git a/recipes/opencv/4.x/patches/4.5.5-0003-find-quirc.patch b/recipes/opencv/4.x/patches/4.5.5-0003-find-quirc.patch new file mode 100644 index 0000000000000..e53df28368b3b --- /dev/null +++ b/recipes/opencv/4.x/patches/4.5.5-0003-find-quirc.patch @@ -0,0 +1,12 @@ +--- a/modules/objdetect/CMakeLists.txt ++++ b/modules/objdetect/CMakeLists.txt +@@ -13,7 +13,6 @@ ocv_define_module(objdetect + ) + + if(HAVE_QUIRC) +- get_property(QUIRC_INCLUDE GLOBAL PROPERTY QUIRC_INCLUDE_DIR) +- ocv_include_directories(${QUIRC_INCLUDE}) +- ocv_target_link_libraries(${the_module} quirc) ++ find_package(quirc REQUIRED CONFIG) ++ ocv_target_link_libraries(${the_module} quirc::quirc) + endif() diff --git a/recipes/opencv/4.x/patches/4.5.5-0004-link-qt-targets.patch b/recipes/opencv/4.x/patches/4.5.5-0004-link-qt-targets.patch new file mode 100644 index 0000000000000..4c497271a4d6a --- /dev/null +++ b/recipes/opencv/4.x/patches/4.5.5-0004-link-qt-targets.patch @@ -0,0 +1,22 @@ +--- a/contrib/modules/cvv/CMakeLists.txt ++++ b/contrib/modules/cvv/CMakeLists.txt +@@ -14,7 +14,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) + foreach(dt5_dep Core Gui Widgets) + add_definitions(${Qt5${dt5_dep}_DEFINITIONS}) + include_directories(${Qt5${dt5_dep}_INCLUDE_DIRS}) +- list(APPEND CVV_LIBRARIES ${Qt5${dt5_dep}_LIBRARIES}) ++ list(APPEND CVV_LIBRARIES Qt5::${dt5_dep}) + endforeach() + + ocv_glob_module_sources() +--- a/modules/highgui/CMakeLists.txt ++++ b/modules/highgui/CMakeLists.txt +@@ -89,7 +89,7 @@ if(HAVE_QT) + foreach(dt_dep ${qt_deps}) + add_definitions(${Qt${QT_VERSION_MAJOR}${dt_dep}_DEFINITIONS}) + include_directories(${Qt${QT_VERSION_MAJOR}${dt_dep}_INCLUDE_DIRS}) +- list(APPEND HIGHGUI_LIBRARIES ${Qt${QT_VERSION_MAJOR}${dt_dep}_LIBRARIES}) ++ list(APPEND HIGHGUI_LIBRARIES Qt${QT_VERSION_MAJOR}::${dt_dep}) + endforeach() + else() + ocv_assert(QT_VERSION_MAJOR EQUAL 4) diff --git a/recipes/opencv/4.x/test_package/CMakeLists.txt b/recipes/opencv/4.x/test_package/CMakeLists.txt index e49280ad955c0..5404f6ff23915 100644 --- a/recipes/opencv/4.x/test_package/CMakeLists.txt +++ b/recipes/opencv/4.x/test_package/CMakeLists.txt @@ -1,32 +1,33 @@ cmake_minimum_required(VERSION 3.8) project(test_package LANGUAGES CXX) -option(built_dnn "Enabled if opencv is built dnn" OFF) -option(built_with_ade "Enabled if opencv is built with ade" OFF) -option(built_with_ffmpeg "Enabled if opencv is built with ffmpeg" OFF) -option(built_contrib_sfm "Enabled if opencv is built contrib sfm" OFF) +enable_testing() -find_package(OpenCV REQUIRED imgcodecs highgui objdetect CONFIG) - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE - opencv_imgcodecs - opencv_highgui - opencv_objdetect - $ - $ - $ +set(TESTED_MODULES + # Main modules + "calib3d" "core" "dnn" "features2d" "flann" "gapi" "highgui" "imgcodecs" + "imgproc" "ml" "objdetect" "photo" "stitching" "video" "videoio" + # Extra modules + "alphamat" "aruco" "bgsegm" "bioinspired" "ccalib" "datasets" "dnn_superres" + "face" "freetype" "fuzzy" "hdf" "hfs" "img_hash" "intensity_transform" + "line_descriptor" "mcc" "optflow" "phase_unwrapping" "plot" "quality" "reg" + "rgbd" "saliency" "sfm" "shape" "structured_light" "superres" + "surface_matching" "text" "tracking" "wechat_qrcode" "xfeatures2d" + "ximgproc" "xobjdetect" "xphoto" ) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) -if(built_dnn) - target_link_libraries(${PROJECT_NAME} PRIVATE opencv_dnn) -endif() -if(built_with_ade) - target_compile_definitions(${PROJECT_NAME} PRIVATE BUILT_WITH_ADE) -endif() -if(built_with_ffmpeg) - target_compile_definitions(${PROJECT_NAME} PRIVATE BUILT_WITH_FFMPEG) -endif() -if(built_contrib_sfm) - target_compile_definitions(${PROJECT_NAME} PRIVATE BUILT_CONTRIB_SFM) -endif() + +find_package(OpenCV REQUIRED core CONFIG) + +foreach(_module ${TESTED_MODULES}) + string(TOUPPER ${_module} _module_upper) + if(OPENCV_WITH_${_module_upper}) + set(_test_target test_${_module}) + set(_module_target opencv_${_module}) + add_executable(${_test_target} ${_test_target}.cpp) + target_link_libraries(${_test_target} PRIVATE ${_module_target}) + target_compile_features(${_test_target} PRIVATE cxx_std_11) + if(NOT ${_module} STREQUAL "highgui") + add_test(NAME ${_test_target} COMMAND ${_test_target}) + endif() + endif() +endforeach() diff --git a/recipes/opencv/4.x/test_package/conanfile.py b/recipes/opencv/4.x/test_package/conanfile.py index 5d9136c00ec0e..e5b25fb84dd4b 100644 --- a/recipes/opencv/4.x/test_package/conanfile.py +++ b/recipes/opencv/4.x/test_package/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile -from conan.tools.build import can_run +from conan.tools.build import build_jobs, can_run from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -import os +from conan.tools.files import chdir class TestPackageConan(ConanFile): @@ -9,6 +9,21 @@ class TestPackageConan(ConanFile): generators = "CMakeDeps", "VirtualRunEnv" test_type = "explicit" + @property + def _tested_modules(self): + return [ + # Main modules + "calib3d", "core", "dnn", "features2d", "flann", "gapi", "highgui", "imgcodecs", + "imgproc", "ml", "objdetect", "photo", "stitching", "video", "videoio", + # Extra modules + "alphamat", "aruco", "bgsegm", "bioinspired", "ccalib", "datasets", "dnn_superres", + "face", "freetype", "fuzzy", "hdf", "hfs", "img_hash", "intensity_transform", + "line_descriptor", "mcc", "optflow", "phase_unwrapping", "plot", "quality", "reg", + "rgbd", "saliency", "sfm", "shape", "structured_light", "superres", + "surface_matching", "text", "tracking", "wechat_qrcode", "xfeatures2d", + "ximgproc", "xobjdetect", "xphoto", + ] + def layout(self): cmake_layout(self) @@ -17,10 +32,16 @@ def requirements(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["built_dnn"] = self.dependencies["opencv"].options.dnn - tc.variables["built_with_ade"] = self.dependencies["opencv"].options.with_ade - tc.variables["built_with_ffmpeg"] = self.dependencies["opencv"].options.with_ffmpeg - tc.variables["built_contrib_sfm"] = self.dependencies["opencv"].options.contrib and self.dependencies["opencv"].options.contrib_sfm + for module in self._tested_modules: + cmake_option = f"OPENCV_WITH_{module.upper()}" + if module == "core": + tc.variables[cmake_option] = True + elif module == "imgcodecs": + tc.variables[cmake_option] = self.dependencies["opencv"].options.imgcodecs and self.dependencies["opencv"].options.with_png + elif module == "videoio": + tc.variables[cmake_option] = self.dependencies["opencv"].options.videoio and self.dependencies["opencv"].options.with_ffmpeg + else: + tc.variables[cmake_option] = self.dependencies["opencv"].options.get_safe(module, False) tc.generate() def build(self): @@ -30,5 +51,5 @@ def build(self): 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") + with chdir(self, self.build_folder): + self.run(f"ctest --output-on-failure -C {self.settings.build_type} -j {build_jobs(self)}", env="conanrun") diff --git a/recipes/opencv/4.x/test_package/test_alphamat.cpp b/recipes/opencv/4.x/test_package/test_alphamat.cpp new file mode 100644 index 0000000000000..af8ea966d9715 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_alphamat.cpp @@ -0,0 +1,10 @@ +#include +#include + +int main() { + cv::Mat image = cv::Mat::ones(400, 400, CV_8UC3) * 50; + cv::Mat tmap = cv::Mat::ones(400, 400, CV_8U) * 120; + cv::Mat result; + cv::alphamat::infoFlow(image, tmap, result); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_aruco.cpp b/recipes/opencv/4.x/test_package/test_aruco.cpp new file mode 100644 index 0000000000000..bc510aeaf4b18 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_aruco.cpp @@ -0,0 +1,9 @@ +#include +#include + +int main() { + cv::Mat markerImage; + auto dictionary = cv::aruco::getPredefinedDictionary(cv::aruco::DICT_6X6_250); + cv::aruco::drawMarker(dictionary, 23, 200, markerImage, 1); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_bgsegm.cpp b/recipes/opencv/4.x/test_package/test_bgsegm.cpp new file mode 100644 index 0000000000000..ba01af2fd1861 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_bgsegm.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto bkg_subtractor = cv::bgsegm::createBackgroundSubtractorCNT(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_bioinspired.cpp b/recipes/opencv/4.x/test_package/test_bioinspired.cpp new file mode 100644 index 0000000000000..219fc935596f3 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_bioinspired.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto retina_tone_mapping = cv::bioinspired::RetinaFastToneMapping::create(cv::Size(10, 10)); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_calib3d.cpp b/recipes/opencv/4.x/test_package/test_calib3d.cpp new file mode 100644 index 0000000000000..ce5c7e8b7c821 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_calib3d.cpp @@ -0,0 +1,26 @@ +#include +#include + +#include +#include + +int main() { + const int point_count = 100; + std::vector points1; + points1.reserve(point_count); + std::vector points2; + points2.reserve(point_count); + for (int i = 0; i < point_count; ++i) { + points1.emplace_back( + cv::Point2f(static_cast(100 + 30 * std::cos(i * CV_PI * 2 / 5)), + static_cast(100 - 30 * std::sin(i * CV_PI * 2 / 5))) + ); + points2.emplace_back( + cv::Point2f(static_cast(100 + 30 * std::sin(i * CV_PI * 2 / 5)), + static_cast(100 - 30 * std::cos(i * CV_PI * 2 / 5))) + ); + } + auto fundamental_matrix = cv::findFundamentalMat(points1, points2, cv::FM_RANSAC, 3, 0.99); + + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_ccalib.cpp b/recipes/opencv/4.x/test_package/test_ccalib.cpp new file mode 100644 index 0000000000000..079bcb7ba21ce --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_ccalib.cpp @@ -0,0 +1,8 @@ +#include + +int main() { + cv::randpattern::RandomPatternGenerator generator(50, 50); + generator.generatePattern(); + auto pattern = generator.getPattern(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_core.cpp b/recipes/opencv/4.x/test_package/test_core.cpp new file mode 100644 index 0000000000000..b9635e35d0fc8 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_core.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + cv::Mat m = cv::Mat::zeros(400, 400, CV_8UC3); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_datasets.cpp b/recipes/opencv/4.x/test_package/test_datasets.cpp new file mode 100644 index 0000000000000..16c5eca1c9205 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_datasets.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto dataset = cv::datasets::AR_hmdb::create(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_dnn.cpp b/recipes/opencv/4.x/test_package/test_dnn.cpp new file mode 100644 index 0000000000000..3d8474fcdd230 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_dnn.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto backends = cv::dnn::getAvailableBackends(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_dnn_superres.cpp b/recipes/opencv/4.x/test_package/test_dnn_superres.cpp new file mode 100644 index 0000000000000..bbe3442b46dc4 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_dnn_superres.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + cv::dnn_superres::DnnSuperResImpl dnn_superres_impl; + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_face.cpp b/recipes/opencv/4.x/test_package/test_face.cpp new file mode 100644 index 0000000000000..9e3953a255cc0 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_face.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto face_recognizer = cv::face::FisherFaceRecognizer::create(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_features2d.cpp b/recipes/opencv/4.x/test_package/test_features2d.cpp new file mode 100644 index 0000000000000..2154a2126ebb1 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_features2d.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto matcher = cv::DescriptorMatcher::create(cv::DescriptorMatcher::BRUTEFORCE); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_flann.cpp b/recipes/opencv/4.x/test_package/test_flann.cpp new file mode 100644 index 0000000000000..0461a2651192b --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_flann.cpp @@ -0,0 +1,28 @@ +#include +#include + +#include +#include + +int main() { + const int point_count = 100; + std::vector points; + points.reserve(point_count); + for (int i = 0; i < point_count; ++i) { + points.emplace_back( + cv::Point2f(static_cast(100 + 30 * std::cos(i * CV_PI * 2 / 5)), + static_cast(100 - 30 * std::sin(i * CV_PI * 2 / 5))) + ); + } + + cv::flann::KDTreeIndexParams indexParams; + cv::flann::Index kdtree(cv::Mat(points).reshape(1), indexParams); + + std::vector query{110, 98}; + + std::vector indices; + std::vector dists; + kdtree.knnSearch(query, indices, dists, 3); + + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_freetype.cpp b/recipes/opencv/4.x/test_package/test_freetype.cpp new file mode 100644 index 0000000000000..49ee14c10ed6a --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_freetype.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto ft2 = cv::freetype::createFreeType2(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_fuzzy.cpp b/recipes/opencv/4.x/test_package/test_fuzzy.cpp new file mode 100644 index 0000000000000..ad4485785acc4 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_fuzzy.cpp @@ -0,0 +1,9 @@ +#include +#include + +int main() { + cv::Mat image = cv::Mat::zeros(400, 400, CV_8UC3); + cv::Mat output; + cv::ft::FT02D_FL_process(image, 10, output); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_gapi.cpp b/recipes/opencv/4.x/test_package/test_gapi.cpp new file mode 100644 index 0000000000000..1894733df9580 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_gapi.cpp @@ -0,0 +1,18 @@ +#include +#include +#include + +int main() { + // derived from https://docs.opencv.org/4.5.0/d0/d1e/gapi.html + cv::GMat in; + cv::GMat vga = cv::gapi::resize(in, cv::Size(), 0.5, 0.5); + cv::GMat gray = cv::gapi::BGR2Gray(vga); + cv::GMat blurred = cv::gapi::blur(gray, cv::Size(5,5)); + cv::GMat edges = cv::gapi::Canny(blurred, 32, 128, 3); + cv::GMat b,g,r; + std::tie(b,g,r) = cv::gapi::split3(vga); + cv::GMat out = cv::gapi::merge3(b, g | edges, r); + cv::GComputation ac(in, out); + + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_hdf.cpp b/recipes/opencv/4.x/test_package/test_hdf.cpp new file mode 100644 index 0000000000000..94d3e97ba46b4 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_hdf.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto hdf5 = cv::hdf::open("test_package_hdf.h5"); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_hfs.cpp b/recipes/opencv/4.x/test_package/test_hfs.cpp new file mode 100644 index 0000000000000..8d5391b6b1421 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_hfs.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto hfs_segment = cv::hfs::HfsSegment::create(100, 100); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_highgui.cpp b/recipes/opencv/4.x/test_package/test_highgui.cpp new file mode 100644 index 0000000000000..69025d66e0e23 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_highgui.cpp @@ -0,0 +1,8 @@ +#include +#include + +int main() { + cv::Mat image = cv::Mat::zeros(400, 400, CV_8UC3); + cv::imshow("test highgui", image); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_img_hash.cpp b/recipes/opencv/4.x/test_package/test_img_hash.cpp new file mode 100644 index 0000000000000..73ca684981092 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_img_hash.cpp @@ -0,0 +1,10 @@ +#include +#include + +int main() { + cv::Mat image = cv::Mat::zeros(400, 400, CV_8UC3); + auto func = cv::img_hash::AverageHash::create(); + cv::Mat hash; + func->compute(image, hash); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_imgcodecs.cpp b/recipes/opencv/4.x/test_package/test_imgcodecs.cpp new file mode 100644 index 0000000000000..909d28ae9465d --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_imgcodecs.cpp @@ -0,0 +1,9 @@ +#include +#include + +int main() { + cv::Mat img = cv::Mat::zeros(400, 400, CV_8UC3); + cv::imwrite("test_imgcodecs.png", img); + + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_imgproc.cpp b/recipes/opencv/4.x/test_package/test_imgproc.cpp new file mode 100644 index 0000000000000..23784d8f0a1b6 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_imgproc.cpp @@ -0,0 +1,14 @@ +#include +#include + +int main() { + const int width = 400; + cv::Mat image = cv::Mat::zeros(width, width, CV_8UC3); + + cv::ellipse( + image, cv::Point(width / 2, width / 2), cv::Size(width / 4, width / 16), + 90, 0, 360, cv::Scalar(255, 0, 0), 2, 8 + ); + + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_intensity_transform.cpp b/recipes/opencv/4.x/test_package/test_intensity_transform.cpp new file mode 100644 index 0000000000000..dce55e2e9e3a7 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_intensity_transform.cpp @@ -0,0 +1,9 @@ +#include +#include + +int main() { + cv::Mat src_image = cv::Mat::zeros(400, 400, CV_8UC3); + cv::Mat dst_image; + cv::intensity_transform::autoscaling(src_image, dst_image); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_line_descriptor.cpp b/recipes/opencv/4.x/test_package/test_line_descriptor.cpp new file mode 100644 index 0000000000000..a9c8f66bb0d01 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_line_descriptor.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto descriptor = cv::line_descriptor::BinaryDescriptor::createBinaryDescriptor(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_mcc.cpp b/recipes/opencv/4.x/test_package/test_mcc.cpp new file mode 100644 index 0000000000000..7b2647b223c4d --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_mcc.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto checker_detector = cv::mcc::CCheckerDetector::create(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_ml.cpp b/recipes/opencv/4.x/test_package/test_ml.cpp new file mode 100644 index 0000000000000..e53dbd4cf97ee --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_ml.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto dtrees = cv::ml::DTrees::create(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_objdetect.cpp b/recipes/opencv/4.x/test_package/test_objdetect.cpp new file mode 100644 index 0000000000000..2533cbb506d59 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_objdetect.cpp @@ -0,0 +1,17 @@ +#include +#include + +#include + +int main() { + std::vector rectangles; + rectangles.reserve(100); + for (int i = 0; i < 10; ++i) { + for (int j = 0; j < 10; ++j) { + rectangles.emplace_back(cv::Rect(10 * i, 5 * (i + j), 2, 3)); + } + } + cv::groupRectangles(rectangles, 2); + + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_optflow.cpp b/recipes/opencv/4.x/test_package/test_optflow.cpp new file mode 100644 index 0000000000000..f7ef8c92b736e --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_optflow.cpp @@ -0,0 +1,7 @@ +#include +#include + +int main() { + auto tree = cv::optflow::GPCTree::create(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_package.cpp b/recipes/opencv/4.x/test_package/test_package.cpp deleted file mode 100644 index 220a68d7c84b1..0000000000000 --- a/recipes/opencv/4.x/test_package/test_package.cpp +++ /dev/null @@ -1,235 +0,0 @@ -// Test file borrowed from OpenCV tutorial: https://docs.opencv.org/master/d3/d96/tutorial_basic_geometric_drawing.html - -/** - * @file Drawing_1.cpp - * @brief Simple geometric drawing - * @author OpenCV team - */ -#include -#include -#ifdef BUILT_WITH_ADE -#include -#include -#include -#endif -#ifdef BUILT_WITH_FFMPEG -#include -#include -#endif -#ifdef BUILT_CONTRIB_SFM -#include -#endif - -#define w 400 - -using namespace cv; - -/// Function headers -void MyEllipse( Mat img, double angle ); -void MyFilledCircle( Mat img, Point center ); -void MyPolygon( Mat img ); -void MyLine( Mat img, Point start, Point end ); -// to test `with_ade` option -void TestGAPI(); -void TestVideo(); -void TestSFM(); - -/** - * @function main - * @brief Main function - */ -int main( void ){ - - //![create_images] - /// Windows names - char atom_window[] = "Drawing 1: Atom"; - char rook_window[] = "Drawing 2: Rook"; - - /// Create black empty images - Mat atom_image = Mat::zeros( w, w, CV_8UC3 ); - Mat rook_image = Mat::zeros( w, w, CV_8UC3 ); - //![create_images] - - /// 1. Draw a simple atom: - /// ----------------------- - - //![draw_atom] - /// 1.a. Creating ellipses - MyEllipse( atom_image, 90 ); - MyEllipse( atom_image, 0 ); - MyEllipse( atom_image, 45 ); - MyEllipse( atom_image, -45 ); - - /// 1.b. Creating circles - MyFilledCircle( atom_image, Point( w/2, w/2) ); - //![draw_atom] - - /// 2. Draw a rook - /// ------------------ - - //![draw_rook] - /// 2.a. Create a convex polygon - MyPolygon( rook_image ); - - //![rectangle] - /// 2.b. Creating rectangles - rectangle( rook_image, - Point( 0, 7*w/8 ), - Point( w, w), - Scalar( 0, 255, 255 ), - FILLED, - LINE_8 ); - //![rectangle] - - /// 2.c. Create a few lines - MyLine( rook_image, Point( 0, 15*w/16 ), Point( w, 15*w/16 ) ); - MyLine( rook_image, Point( w/4, 7*w/8 ), Point( w/4, w ) ); - MyLine( rook_image, Point( w/2, 7*w/8 ), Point( w/2, w ) ); - MyLine( rook_image, Point( 3*w/4, 7*w/8 ), Point( 3*w/4, w ) ); - //![draw_rook] - TestGAPI(); - TestVideo(); - TestSFM(); - - return(0); -} - -/// Function Declaration - -/** - * @function MyEllipse - * @brief Draw a fixed-size ellipse with different angles - */ -//![my_ellipse] -void MyEllipse( Mat img, double angle ) -{ - int thickness = 2; - int lineType = 8; - - ellipse( img, - Point( w/2, w/2 ), - Size( w/4, w/16 ), - angle, - 0, - 360, - Scalar( 255, 0, 0 ), - thickness, - lineType ); -} -//![my_ellipse] - -/** - * @function MyFilledCircle - * @brief Draw a fixed-size filled circle - */ -//![my_filled_circle] -void MyFilledCircle( Mat img, Point center ) -{ - circle( img, - center, - w/32, - Scalar( 0, 0, 255 ), - FILLED, - LINE_8 ); -} -//![my_filled_circle] - -/** - * @function MyPolygon - * @brief Draw a simple concave polygon (rook) - */ -//![my_polygon] -void MyPolygon( Mat img ) -{ - int lineType = LINE_8; - - /** Create some points */ - Point rook_points[1][20]; - rook_points[0][0] = Point( w/4, 7*w/8 ); - rook_points[0][1] = Point( 3*w/4, 7*w/8 ); - rook_points[0][2] = Point( 3*w/4, 13*w/16 ); - rook_points[0][3] = Point( 11*w/16, 13*w/16 ); - rook_points[0][4] = Point( 19*w/32, 3*w/8 ); - rook_points[0][5] = Point( 3*w/4, 3*w/8 ); - rook_points[0][6] = Point( 3*w/4, w/8 ); - rook_points[0][7] = Point( 26*w/40, w/8 ); - rook_points[0][8] = Point( 26*w/40, w/4 ); - rook_points[0][9] = Point( 22*w/40, w/4 ); - rook_points[0][10] = Point( 22*w/40, w/8 ); - rook_points[0][11] = Point( 18*w/40, w/8 ); - rook_points[0][12] = Point( 18*w/40, w/4 ); - rook_points[0][13] = Point( 14*w/40, w/4 ); - rook_points[0][14] = Point( 14*w/40, w/8 ); - rook_points[0][15] = Point( w/4, w/8 ); - rook_points[0][16] = Point( w/4, 3*w/8 ); - rook_points[0][17] = Point( 13*w/32, 3*w/8 ); - rook_points[0][18] = Point( 5*w/16, 13*w/16 ); - rook_points[0][19] = Point( w/4, 13*w/16 ); - - const Point* ppt[1] = { rook_points[0] }; - int npt[] = { 20 }; - - fillPoly( img, - ppt, - npt, - 1, - Scalar( 255, 255, 255 ), - lineType ); -} -//![my_polygon] - -/** - * @function MyLine - * @brief Draw a simple line - */ -//![my_line] -void MyLine( Mat img, Point start, Point end ) -{ - int thickness = 2; - int lineType = LINE_8; - - line( img, - start, - end, - Scalar( 0, 0, 0 ), - thickness, - lineType ); -} -//![my_line] - -/** - * @function TestGAPI - @brief to test `with_ade` - derived from https://docs.opencv.org/4.5.0/d0/d1e/gapi.html -*/ -void TestGAPI() -{ -#ifdef BUILT_WITH_ADE - cv::GMat in; - cv::GMat vga = cv::gapi::resize(in, cv::Size(), 0.5, 0.5); - cv::GMat gray = cv::gapi::BGR2Gray(vga); - cv::GMat blurred = cv::gapi::blur(gray, cv::Size(5,5)); - cv::GMat edges = cv::gapi::Canny(blurred, 32, 128, 3); - cv::GMat b,g,r; - std::tie(b,g,r) = cv::gapi::split3(vga); - cv::GMat out = cv::gapi::merge3(b, g | edges, r); - cv::GComputation ac(in, out); -#endif -} - -void TestVideo() -{ -#ifdef BUILT_WITH_FFMPEG - if (!videoio_registry::hasBackend(CAP_FFMPEG)) - throw std::runtime_error("FFmpeg backend was not found"); -#endif -} - -void TestSFM() -{ -#ifdef BUILT_CONTRIB_SFM - Vec3f a; - a << 1,2,3; - Matx33f ax = sfm::skew(a); -#endif -} diff --git a/recipes/opencv/4.x/test_package/test_phase_unwrapping.cpp b/recipes/opencv/4.x/test_package/test_phase_unwrapping.cpp new file mode 100644 index 0000000000000..d8863b429ecd4 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_phase_unwrapping.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto histogram_phase_unwrapping = cv::phase_unwrapping::HistogramPhaseUnwrapping::create(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_photo.cpp b/recipes/opencv/4.x/test_package/test_photo.cpp new file mode 100644 index 0000000000000..4a94f1b4c0c8f --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_photo.cpp @@ -0,0 +1,10 @@ +#include +#include + +int main() { + auto src_image = cv::Mat::zeros(400, 400, CV_8UC3); + cv::Mat dst_image; + cv::fastNlMeansDenoising(src_image, dst_image); + + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_plot.cpp b/recipes/opencv/4.x/test_package/test_plot.cpp new file mode 100644 index 0000000000000..40dc21023a5fc --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_plot.cpp @@ -0,0 +1,12 @@ +#include +#include + +int main() { + cv::Mat xData; + xData.create(1, 100, CV_64F); + for (int i = 0; i < 100; ++i) { + xData.at(i) = i / 10.0; + } + auto plot = cv::plot::Plot2d::create(xData); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_quality.cpp b/recipes/opencv/4.x/test_package/test_quality.cpp new file mode 100644 index 0000000000000..75faaa7e15666 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_quality.cpp @@ -0,0 +1,8 @@ +#include +#include + +int main() { + cv::Mat image = cv::Mat::ones(10, 10, CV_8UC3) * 40; + auto quality_mse = cv::quality::QualityMSE::create(image); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_reg.cpp b/recipes/opencv/4.x/test_package/test_reg.cpp new file mode 100644 index 0000000000000..26957e3fa333b --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_reg.cpp @@ -0,0 +1,9 @@ +#include + +int main() { + cv::reg::MapProjec map; + map.scale(5.5); + map.inverseMap(); + map.normalize(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_rgbd.cpp b/recipes/opencv/4.x/test_package/test_rgbd.cpp new file mode 100644 index 0000000000000..f4c2a3c31ec3b --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_rgbd.cpp @@ -0,0 +1,7 @@ +#include +#include + +int main() { + auto depth_cleaner = cv::rgbd::DepthCleaner::create(5); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_saliency.cpp b/recipes/opencv/4.x/test_package/test_saliency.cpp new file mode 100644 index 0000000000000..c3938011335b0 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_saliency.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto objectness_bing = cv::saliency::ObjectnessBING::create(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_sfm.cpp b/recipes/opencv/4.x/test_package/test_sfm.cpp new file mode 100644 index 0000000000000..e4b4bacb2a25a --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_sfm.cpp @@ -0,0 +1,10 @@ +#include +#include + +int main() { + cv::Vec3f a; + a << 1,2,3; + cv::Matx33f ax = cv::sfm::skew(a); + + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_shape.cpp b/recipes/opencv/4.x/test_package/test_shape.cpp new file mode 100644 index 0000000000000..ef5e9500abe47 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_shape.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto extractor = cv::createChiHistogramCostExtractor(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_stitching.cpp b/recipes/opencv/4.x/test_package/test_stitching.cpp new file mode 100644 index 0000000000000..8a445823efb35 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_stitching.cpp @@ -0,0 +1,13 @@ +#include +#include + +int main() { + cv::Rect roi; + bool overlap = cv::detail::overlapRoi( + cv::Point2f(2, 3), cv::Point2f(4, -3), + cv::Size(10, 10), cv::Size(3, 4), + roi + ); + + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_structured_light.cpp b/recipes/opencv/4.x/test_package/test_structured_light.cpp new file mode 100644 index 0000000000000..d6f0b0661cdba --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_structured_light.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto pattern = cv::structured_light::GrayCodePattern::create(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_superres.cpp b/recipes/opencv/4.x/test_package/test_superres.cpp new file mode 100644 index 0000000000000..70097500036ec --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_superres.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto frame_source = cv::superres::createFrameSource_Empty(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_surface_matching.cpp b/recipes/opencv/4.x/test_package/test_surface_matching.cpp new file mode 100644 index 0000000000000..3a215084288be --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_surface_matching.cpp @@ -0,0 +1,7 @@ +#include +#include + +int main() { + cv::ppf_match_3d::PPF3DDetector detector(0.03, 0.05); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_text.cpp b/recipes/opencv/4.x/test_package/test_text.cpp new file mode 100644 index 0000000000000..1c8dbed4b8ea2 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_text.cpp @@ -0,0 +1,11 @@ +#include +#include + +#include + +int main() { + cv::Mat image = cv::Mat::zeros(10, 10, CV_8UC3); + std::vector channels; + cv::text::computeNMChannels(image, channels); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_tracking.cpp b/recipes/opencv/4.x/test_package/test_tracking.cpp new file mode 100644 index 0000000000000..69efe349df222 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_tracking.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto kcf_tracker = cv::TrackerKCF::create(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_video.cpp b/recipes/opencv/4.x/test_package/test_video.cpp new file mode 100644 index 0000000000000..09a4342add1a1 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_video.cpp @@ -0,0 +1,7 @@ +#include + +int main() { + auto bkg_subtractor_knn = cv::createBackgroundSubtractorKNN(); + + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_videoio.cpp b/recipes/opencv/4.x/test_package/test_videoio.cpp new file mode 100644 index 0000000000000..7b0955e888a06 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_videoio.cpp @@ -0,0 +1,11 @@ +#include +#include + +#include + +int main() { + if (!cv::videoio_registry::hasBackend(cv::CAP_FFMPEG)) + throw std::runtime_error("FFmpeg backend was not found"); + + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_wechat_qrcode.cpp b/recipes/opencv/4.x/test_package/test_wechat_qrcode.cpp new file mode 100644 index 0000000000000..6dce15eeb7b40 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_wechat_qrcode.cpp @@ -0,0 +1,9 @@ +#include +#include + +int main() { + cv::Mat image = cv::Mat::ones(100, 100, CV_8UC3) * 50; + cv::wechat_qrcode::WeChatQRCode wechat_qrcode; + auto decoded_strings = wechat_qrcode.detectAndDecode(image); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_xfeatures2d.cpp b/recipes/opencv/4.x/test_package/test_xfeatures2d.cpp new file mode 100644 index 0000000000000..673b9737b4fdd --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_xfeatures2d.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto vgg = cv::xfeatures2d::VGG::create(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_ximgproc.cpp b/recipes/opencv/4.x/test_package/test_ximgproc.cpp new file mode 100644 index 0000000000000..b4804362da9b2 --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_ximgproc.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto feature_getter = cv::ximgproc::createRFFeatureGetter(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_xobjdetect.cpp b/recipes/opencv/4.x/test_package/test_xobjdetect.cpp new file mode 100644 index 0000000000000..15cecaff5b8ef --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_xobjdetect.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto detector = cv::xobjdetect::WBDetector::create(); + return 0; +} diff --git a/recipes/opencv/4.x/test_package/test_xphoto.cpp b/recipes/opencv/4.x/test_package/test_xphoto.cpp new file mode 100644 index 0000000000000..5c0eb661f221c --- /dev/null +++ b/recipes/opencv/4.x/test_package/test_xphoto.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + auto grayworld_wb = cv::xphoto::createGrayworldWB(); + return 0; +} diff --git a/recipes/opencv/4.x/test_v1_package/CMakeLists.txt b/recipes/opencv/4.x/test_v1_package/CMakeLists.txt index 0d20897301b68..c23ed5cfe6d98 100644 --- a/recipes/opencv/4.x/test_v1_package/CMakeLists.txt +++ b/recipes/opencv/4.x/test_v1_package/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 3.1) -project(test_package) +project(test_v1_package) + +enable_testing() include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) diff --git a/recipes/opencv/4.x/test_v1_package/conanfile.py b/recipes/opencv/4.x/test_v1_package/conanfile.py index dc9799aa32b63..9aa234fbd88b8 100644 --- a/recipes/opencv/4.x/test_v1_package/conanfile.py +++ b/recipes/opencv/4.x/test_v1_package/conanfile.py @@ -1,21 +1,47 @@ from conans import ConanFile, CMake, tools -import os +from conans.errors import ConanException class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "cmake", "cmake_find_package_multi" + @property + def _tested_modules(self): + return [ + # Main modules + "calib3d", "core", "dnn", "features2d", "flann", "gapi", "highgui", "imgcodecs", + "imgproc", "ml", "objdetect", "photo", "stitching", "video", "videoio", + # Extra modules + "alphamat", "aruco", "bgsegm", "bioinspired", "ccalib", "datasets", "dnn_superres", + "face", "freetype", "fuzzy", "hdf", "hfs", "img_hash", "intensity_transform", + "line_descriptor", "mcc", "optflow", "phase_unwrapping", "plot", "quality", "reg", + "rgbd", "saliency", "sfm", "shape", "structured_light", "superres", + "surface_matching", "text", "tracking", "wechat_qrcode", "xfeatures2d", + "ximgproc", "xobjdetect", "xphoto", + ] + + def _opencv_option(self, name, default): + try: + return getattr(self.options["opencv"], name, default) + except (AttributeError, ConanException): + return default + def build(self): cmake = CMake(self) - cmake.definitions["built_dnn"] = self.options["opencv"].dnn - cmake.definitions["built_with_ade"] = self.options["opencv"].with_ade - cmake.definitions["built_with_ffmpeg"] = self.options["opencv"].with_ffmpeg - cmake.definitions["built_contrib_sfm"] = self.options["opencv"].contrib and self.options["opencv"].contrib_sfm + for module in self._tested_modules: + cmake_option = f"OPENCV_WITH_{module.upper()}" + if module == "core": + cmake.definitions[cmake_option] = True + elif module == "imgcodecs": + cmake.definitions[cmake_option] = self.options["opencv"].imgcodecs and self.options["opencv"].with_png + elif module == "videoio": + cmake.definitions[cmake_option] = self.options["opencv"].videoio and self.options["opencv"].with_ffmpeg + else: + cmake.definitions[cmake_option] = self._opencv_option(module, False) 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) + self.run(f"ctest --output-on-failure -C {self.settings.build_type} -j {tools.cpu_count()}", run_environment=True) From 05e5a14450621593004cac50d4fd4f5c6ceb3111 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 13 Aug 2023 14:03:38 +0300 Subject: [PATCH 179/637] (#18117) dtl: migrate to Conan v2 * dtl: migrate to Conan v2 * dtl: undo addition of cxx_std_11 in test_package No min cppstd check is done in the recipe, so this should not be necessary. * dtl: add check_min_cppstd * dtl: restore test_v1_package * dtl: drop cppstd check * dtl: restore VirtualRunEnv in test_package --------- Co-authored-by: Carlos Zoido --- recipes/dtl/all/conanfile.py | 32 +++++++++++++------ recipes/dtl/all/test_package/CMakeLists.txt | 7 ++-- recipes/dtl/all/test_package/conanfile.py | 21 ++++++++---- .../dtl/all/test_v1_package/CMakeLists.txt | 8 +++++ recipes/dtl/all/test_v1_package/conanfile.py | 17 ++++++++++ 5 files changed, 64 insertions(+), 21 deletions(-) create mode 100644 recipes/dtl/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/dtl/all/test_v1_package/conanfile.py diff --git a/recipes/dtl/all/conanfile.py b/recipes/dtl/all/conanfile.py index 6d45ac4104004..c53d228db8921 100644 --- a/recipes/dtl/all/conanfile.py +++ b/recipes/dtl/all/conanfile.py @@ -1,28 +1,40 @@ -from conans import ConanFile, tools import os -required_conan_version = ">=1.33.0" +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 DtlConan(ConanFile): name = "dtl" description = "diff template library written by C++" - topics = ("diff", "library", "algorithm") license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/cubicdaiya/dtl" + topics = ("diff", "library", "algorithm", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True - @property - def _source_subfolder(self): - return "source_subfolder" + def layout(self): + basic_layout(self, src_folder="src") def package_id(self): - self.info.header_only() + self.info.clear() def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy(os.path.join("dtl", "*.hpp"), dst="include", src=self._source_subfolder) - self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder) + copy(self, "COPYING", + dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, os.path.join("dtl", "*.hpp"), + dst=os.path.join(self.package_folder, "include"), src=self.source_folder) + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/dtl/all/test_package/CMakeLists.txt b/recipes/dtl/all/test_package/CMakeLists.txt index 9710bb88ce36c..f8aa0df23cba2 100644 --- a/recipes/dtl/all/test_package/CMakeLists.txt +++ b/recipes/dtl/all/test_package/CMakeLists.txt @@ -1,8 +1,5 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) find_package(dtl CONFIG REQUIRED) diff --git a/recipes/dtl/all/test_package/conanfile.py b/recipes/dtl/all/test_package/conanfile.py index 49a3a66ea5bad..ef5d7042163ec 100644 --- a/recipes/dtl/all/test_package/conanfile.py +++ b/recipes/dtl/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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -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/dtl/all/test_v1_package/CMakeLists.txt b/recipes/dtl/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/dtl/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/dtl/all/test_v1_package/conanfile.py b/recipes/dtl/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/dtl/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + 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) From c3618f1cd9521d601aece7c402853b6f9a34d0f1 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 13 Aug 2023 20:28:06 +0900 Subject: [PATCH 180/637] (#18495) mongo-cxx-driver: add version 3.8.0, update mongo-c-driver * mongo-cxx-driver: add version 3.8.0, update mongo-c-driver * update mongo-c-driver --- recipes/mongo-cxx-driver/all/conandata.yml | 10 +++ recipes/mongo-cxx-driver/all/conanfile.py | 2 +- .../all/patches/3.8.0-0001-dirs.patch | 82 +++++++++++++++++++ recipes/mongo-cxx-driver/config.yml | 2 + 4 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 recipes/mongo-cxx-driver/all/patches/3.8.0-0001-dirs.patch diff --git a/recipes/mongo-cxx-driver/all/conandata.yml b/recipes/mongo-cxx-driver/all/conandata.yml index 5f674bff2da01..3d37bb8ee6cf3 100644 --- a/recipes/mongo-cxx-driver/all/conandata.yml +++ b/recipes/mongo-cxx-driver/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.8.0": + url: "https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.8.0/mongo-cxx-driver-r3.8.0.tar.gz" + sha256: "60c7a53a0f6b984aab0b231dc0b31c85c8950059f42a354fb522672b059d5089" "3.7.2": url: "https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.7.2/mongo-cxx-driver-r3.7.2.tar.gz" sha256: "bc0f5193a8184db47a75685b58acd484b0e489eb0476b4d931d1bf4f5fc2186e" @@ -18,6 +21,13 @@ sources: url: "https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.6.1/mongo-cxx-driver-r3.6.1.tar.gz" sha256: "83523e897ef18f7ce05d85d1632dd4ba486c264a1b89c09020163ab29e11eab7" patches: + "3.8.0": + - patch_file: "patches/3.8.0-0001-dirs.patch" + patch_description: "disable documentation features, fix directories" + patch_type: "conan" + - patch_file: "patches/3.7.2-0002-poly_use_std_define.patch" + patch_description: "use poly macro instead __cplusplus" + patch_type: "portability" "3.7.2": - patch_file: "patches/3.7.2-0001-dirs.patch" patch_description: "disable documentation features, fix directories" diff --git a/recipes/mongo-cxx-driver/all/conanfile.py b/recipes/mongo-cxx-driver/all/conanfile.py index 557880613c87c..26e997f666df1 100644 --- a/recipes/mongo-cxx-driver/all/conanfile.py +++ b/recipes/mongo-cxx-driver/all/conanfile.py @@ -47,7 +47,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("mongo-c-driver/1.23.5") + self.requires("mongo-c-driver/1.24.3") if self.options.polyfill == "boost": self.requires("boost/1.82.0", transitive_headers=True) diff --git a/recipes/mongo-cxx-driver/all/patches/3.8.0-0001-dirs.patch b/recipes/mongo-cxx-driver/all/patches/3.8.0-0001-dirs.patch new file mode 100644 index 0000000000000..e057a4548d890 --- /dev/null +++ b/recipes/mongo-cxx-driver/all/patches/3.8.0-0001-dirs.patch @@ -0,0 +1,82 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 20254fa..98add65 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -206,6 +206,7 @@ set (BUILD_SOURCE_DIR ${CMAKE_BINARY_DIR}) + + include (MakeDistFiles) + ++if(FALSE) + add_custom_target(hugo_dir + COMMAND ${CMAKE_COMMAND} -E make_directory hugo + ) +@@ -261,6 +262,7 @@ add_custom_target(format-lint + add_custom_target(docs + DEPENDS hugo doxygen-current + ) ++endif() + + set(THIRD_PARTY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/third_party) + +@@ -270,6 +272,9 @@ if (ENABLE_TESTS) + enable_testing() + endif () + ++set(MONGO_CXX_PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR}) ++set(MONGO_CXX_PROJECT_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}) ++ + add_subdirectory(src) + + add_subdirectory(examples EXCLUDE_FROM_ALL) +@@ -281,6 +286,7 @@ add_subdirectory(benchmark EXCLUDE_FROM_ALL) + # CMake does not implement anything like 'dist' from autotools. + # This implementation is based on the one in GnuCash. + ++if(FALSE) + add_subdirectory (cmake) + add_subdirectory (data) + add_subdirectory (docs) +@@ -381,4 +387,4 @@ endif () + if (CMAKE_GENERATOR_TOOLSET) + message (STATUS "\tinstance: ${CMAKE_GENERATOR_TOOLSET}") + endif () +- ++endif () +diff --git a/src/bsoncxx/CMakeLists.txt b/src/bsoncxx/CMakeLists.txt +index f30aea8..09e907c 100644 +--- a/src/bsoncxx/CMakeLists.txt ++++ b/src/bsoncxx/CMakeLists.txt +@@ -71,7 +71,7 @@ set(BSONCXX_VERSION_NO_EXTRA ${BSONCXX_VERSION_MAJOR}.${BSONCXX_VERSION_MINOR}.$ + set(BSONCXX_VERSION ${BSONCXX_VERSION_NO_EXTRA}${BSONCXX_VERSION_EXTRA}) + message ("bsoncxx version: ${BSONCXX_VERSION}") + set(BSONCXX_INLINE_NAMESPACE "v${BSONCXX_ABI_VERSION}") +-set(BSONCXX_HEADER_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/bsoncxx/${BSONCXX_INLINE_NAMESPACE}" CACHE INTERNAL "") ++set(BSONCXX_HEADER_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}" CACHE INTERNAL "") + + set(LIBBSON_REQUIRED_VERSION 1.24.0) + set(LIBBSON_REQUIRED_ABI_VERSION 1.0) +@@ -95,8 +95,9 @@ if(TARGET bson_shared OR TARGET bson_static) + endif() + else() + # Attempt to find libbson by new package name (without lib). +- find_package(bson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} QUIET) +- ++ find_package(bson-${LIBBSON_REQUIRED_ABI_VERSION} REQUIRED) ++ set(bson-${LIBBSON_REQUIRED_ABI_VERSION}_FOUND TRUE) ++ + if(bson-${LIBBSON_REQUIRED_ABI_VERSION}_FOUND) + message ("found libbson version ${bson-${LIBBSON_REQUIRED_ABI_VERSION}_VERSION}") + if(NOT BSONCXX_LINK_WITH_STATIC_MONGOC) +diff --git a/src/mongocxx/CMakeLists.txt b/src/mongocxx/CMakeLists.txt +index 45fd3ad..3248655 100644 +--- a/src/mongocxx/CMakeLists.txt ++++ b/src/mongocxx/CMakeLists.txt +@@ -27,7 +27,7 @@ set(MONGOCXX_VERSION_NO_EXTRA ${MONGOCXX_VERSION_MAJOR}.${MONGOCXX_VERSION_MINOR + set(MONGOCXX_VERSION ${MONGOCXX_VERSION_NO_EXTRA}${MONGOCXX_VERSION_EXTRA}) + message ("mongocxx version: ${MONGOCXX_VERSION}") + set(MONGOCXX_INLINE_NAMESPACE "v${MONGOCXX_ABI_VERSION}") +-set(MONGOCXX_HEADER_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/mongocxx/${MONGOCXX_INLINE_NAMESPACE}" CACHE INTERNAL "") ++set(MONGOCXX_HEADER_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/" CACHE INTERNAL "") + + set(LIBMONGOC_REQUIRED_VERSION 1.24.0) + set(LIBMONGOC_REQUIRED_ABI_VERSION 1.0) diff --git a/recipes/mongo-cxx-driver/config.yml b/recipes/mongo-cxx-driver/config.yml index 454f3110a5cca..21ad02b8d9466 100644 --- a/recipes/mongo-cxx-driver/config.yml +++ b/recipes/mongo-cxx-driver/config.yml @@ -1,4 +1,6 @@ versions: + "3.8.0": + folder: all "3.7.2": folder: all "3.7.0": From 9eafdf0628c3ec6ce434ef4b83711d593151c6f7 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 13 Aug 2023 21:26:46 +0900 Subject: [PATCH 181/637] (#18601) glaze: add version 1.3.5, remove older versions * glaze: add version 1.3.3, remove older versions * add 1.3.3 to config.yml * drop support msvc 16 since 1.3.3 * drop support msvc 192 on glaze/1.3.3 * update 1.3.4 * update 1.3.5 --- recipes/glaze/all/conandata.yml | 12 +++--------- recipes/glaze/all/conanfile.py | 4 ++-- recipes/glaze/config.yml | 8 ++------ 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index 9a250bd76e55c..ca57858e477ea 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.5": + url: "https://github.com/stephenberry/glaze/archive/v1.3.5.tar.gz" + sha256: "de5d59cb7f31193d45f67f25d8ced1499df50c0d926a1461432b87f2b2368817" "1.3.2": url: "https://github.com/stephenberry/glaze/archive/v1.3.2.tar.gz" sha256: "c7dd5fd8da63708328e02efbaa91f58df5573114a11c91ae025b711cb0d7f7ab" @@ -14,15 +17,6 @@ sources: "1.2.5": url: "https://github.com/stephenberry/glaze/archive/v1.2.5.tar.gz" sha256: "bc3ff0b24c8c71557e7aabc5a2bfedd51acea92548c208c3a51815848d2b2c5a" - "1.2.3": - url: "https://github.com/stephenberry/glaze/archive/v1.2.3.tar.gz" - sha256: "003cd3922795319253f080b328dd5c957bc8f446cc2a8145324c2748f4acf10f" - "1.2.2": - url: "https://github.com/stephenberry/glaze/archive/v1.2.2.tar.gz" - sha256: "9bacbe5b07819de9799c8b9aa4861224768d2f87b0cb2f16bd1a4639c6e54755" - "1.2.0": - url: "https://github.com/stephenberry/glaze/archive/v1.2.0.tar.gz" - sha256: "f324a88885da5ed832ddb3ab4e3b0c8994815167b2608615fabfe0373c48a0a4" "1.1.2": url: "https://github.com/stephenberry/glaze/archive/v1.1.2.tar.gz" sha256: "ee22d55b7f40d63f510a41f22765cb24e9e70d312978bad4eb9c94c7ba2fe58c" diff --git a/recipes/glaze/all/conanfile.py b/recipes/glaze/all/conanfile.py index 253e1e45cba72..41a166e34e3ca 100644 --- a/recipes/glaze/all/conanfile.py +++ b/recipes/glaze/all/conanfile.py @@ -25,8 +25,8 @@ def _min_cppstd(self): @property def _compilers_minimum_version(self): return { - "Visual Studio": "16", - "msvc": "192", + "Visual Studio": "17" if Version(self.version) >= "1.3.3" else "16", + "msvc": "193" if Version(self.version) >= "1.3.3" else "192", "gcc": "12", "clang": "12" if Version(self.version) > "1.0.0" else "13", "apple-clang": "13.1", diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index c9458b20872be..ae1392b97f20d 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.5": + folder: all "1.3.2": folder: all "1.3.1": @@ -9,12 +11,6 @@ versions: folder: all "1.2.5": folder: all - "1.2.3": - folder: all - "1.2.2": - folder: all - "1.2.0": - folder: all "1.1.2": folder: all "0.3.6": From 89cff30b30f698002105c2c9ee3230070f2a2403 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 13 Aug 2023 16:06:12 +0300 Subject: [PATCH 182/637] (#18667) rvo2: migrate to Conan v2 * rvo2: migrate to Conan v2 * rvo2: fix_apple_shared_install_name() * rvo2: restore VirtualRunEnv in test_package --- recipes/rvo2/all/CMakeLists.txt | 11 --- recipes/rvo2/all/conanfile.py | 75 ++++++++++--------- recipes/rvo2/all/test_package/CMakeLists.txt | 9 +-- recipes/rvo2/all/test_package/conanfile.py | 21 ++++-- .../rvo2/all/test_v1_package/CMakeLists.txt | 8 ++ recipes/rvo2/all/test_v1_package/conanfile.py | 17 +++++ 6 files changed, 83 insertions(+), 58 deletions(-) delete mode 100644 recipes/rvo2/all/CMakeLists.txt create mode 100644 recipes/rvo2/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/rvo2/all/test_v1_package/conanfile.py diff --git a/recipes/rvo2/all/CMakeLists.txt b/recipes/rvo2/all/CMakeLists.txt deleted file mode 100644 index 4e4f66d9ee7ef..0000000000000 --- a/recipes/rvo2/all/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.4) -project(cmake_wrapper) - -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup() - -if(WIN32 AND BUILD_SHARED_LIBS) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) -endif() - -add_subdirectory(source_subfolder) diff --git a/recipes/rvo2/all/conanfile.py b/recipes/rvo2/all/conanfile.py index c7ee9cc9e4688..f5f8524c916a7 100644 --- a/recipes/rvo2/all/conanfile.py +++ b/recipes/rvo2/all/conanfile.py @@ -1,16 +1,23 @@ import os -from conans import ConanFile, tools, CMake + +from conan import ConanFile +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, replace_in_file + +required_conan_version = ">=1.53.0" class Rvo2Conan(ConanFile): name = "rvo2" description = "Optimal Reciprocal Collision Avoidance" - topics = ("conan", "collision", "avoidance", ) + license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/snape/RVO2" - license = "Apache-2.0" + topics = ("collision", "avoidance") - settings = "os", "compiler", "build_type", "arch" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -20,55 +27,51 @@ class Rvo2Conan(ConanFile): "fPIC": True, } - exports_sources = ["CMakeLists.txt"] - generators = "cmake" - - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - 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 source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = "RVO2-{}".format(self.version) - os.rename(extracted_dir, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.configure() - return self._cmake + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.generate() def _patch_sources(self): - tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), - "add_subdirectory(examples)", - "") - tools.replace_in_file(os.path.join(self._source_subfolder, "src", "CMakeLists.txt"), - "DESTINATION include", - "DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}") - tools.replace_in_file(os.path.join(self._source_subfolder, "src", "CMakeLists.txt"), - "RVO DESTINATION lib", - "RVO RUNTIME LIBRARY ARCHIVE") + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "add_subdirectory(examples)", "") + replace_in_file( + self, + os.path.join(self.source_folder, "src", "CMakeLists.txt"), + "DESTINATION include", + "DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}", + ) + replace_in_file( + self, + os.path.join(self.source_folder, "src", "CMakeLists.txt"), + "RVO DESTINATION lib", + "RVO RUNTIME LIBRARY ARCHIVE", + ) def build(self): self._patch_sources() - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("LICENSE", src=os.path.join(self.source_folder, self._source_subfolder), dst="licenses") - cmake = self._configure_cmake() + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() + fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.libs = tools.collect_libs(self) + self.cpp_info.libs = ["RVO"] diff --git a/recipes/rvo2/all/test_package/CMakeLists.txt b/recipes/rvo2/all/test_package/CMakeLists.txt index 196188113685c..17ebed2c5661d 100644 --- a/recipes/rvo2/all/test_package/CMakeLists.txt +++ b/recipes/rvo2/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(rvo2 REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE rvo2::rvo2) diff --git a/recipes/rvo2/all/test_package/conanfile.py b/recipes/rvo2/all/test_package/conanfile.py index bd7165a553cf4..ef5d7042163ec 100644 --- a/recipes/rvo2/all/test_package/conanfile.py +++ b/recipes/rvo2/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", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/rvo2/all/test_v1_package/CMakeLists.txt b/recipes/rvo2/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/rvo2/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/rvo2/all/test_v1_package/conanfile.py b/recipes/rvo2/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..7e2dfe859bb27 --- /dev/null +++ b/recipes/rvo2/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 60231935b32310ddb54fcd81f85a1a22cdeb1428 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 13 Aug 2023 16:26:15 +0300 Subject: [PATCH 183/637] (#18683) usrsctp: migrate to Conan v2 * usrsctp: migrate to Conan v2 * usrsctp: set CMP0091 to NEW * usrsctp: restore VirtualRunEnv in test_package * usrsctp: fix CMP0091 error * usrsctp: clean up imports --- recipes/usrsctp/all/CMakeLists.txt | 11 --- recipes/usrsctp/all/conandata.yml | 1 - recipes/usrsctp/all/conanfile.py | 95 +++++++++++-------- .../usrsctp/all/test_package/CMakeLists.txt | 5 +- recipes/usrsctp/all/test_package/conanfile.py | 21 ++-- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../usrsctp/all/test_v1_package/conanfile.py | 17 ++++ 7 files changed, 94 insertions(+), 64 deletions(-) delete mode 100644 recipes/usrsctp/all/CMakeLists.txt create mode 100644 recipes/usrsctp/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/usrsctp/all/test_v1_package/conanfile.py diff --git a/recipes/usrsctp/all/CMakeLists.txt b/recipes/usrsctp/all/CMakeLists.txt deleted file mode 100644 index 3bead6a0d9320..0000000000000 --- a/recipes/usrsctp/all/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.4) -project(cmake_wrapper) - -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup() - -if (WIN32 AND BUILD_SHARED_LIBS) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) -endif() - -add_subdirectory(source_subfolder) diff --git a/recipes/usrsctp/all/conandata.yml b/recipes/usrsctp/all/conandata.yml index 61e799fd3d464..9dffac4dd65c9 100644 --- a/recipes/usrsctp/all/conandata.yml +++ b/recipes/usrsctp/all/conandata.yml @@ -5,4 +5,3 @@ sources: patches: "0.9.5.0": - patch_file: "patches/0001-install.patch" - base_path: "source_subfolder" diff --git a/recipes/usrsctp/all/conanfile.py b/recipes/usrsctp/all/conanfile.py index 73752d1325d3b..9eba2832eb8dd 100644 --- a/recipes/usrsctp/all/conanfile.py +++ b/recipes/usrsctp/all/conanfile.py @@ -1,27 +1,33 @@ -from conans import ConanFile, CMake, tools import os +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, replace_in_file + +required_conan_version = ">=1.53.0" + class UsrsctpConan(ConanFile): name = "usrsctp" + description = " A portable SCTP userland stack" license = "BSD-3-Clause" - homepage = "https://github.com/sctplab/usrsctp" url = "https://github.com/conan-io/conan-center-index" - topics = ("conan", "network", "sctp") - description = " A portable SCTP userland stack" - settings = "os", "compiler", "arch", "build_type" - options = {"shared": [True, False], - "fPIC": [True, False]} - default_options = {"shared": False, - "fPIC": True} - exports_sources = ["CMakeLists.txt", "patches/*"] - generators = "cmake" + homepage = "https://github.com/sctplab/usrsctp" + topics = ("network", "sctp") - _cmake = None + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } - @property - def _source_subfolder(self): - return "source_subfolder" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -29,46 +35,51 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = "usrsctp-{}".format(self.version) - os.rename(extracted_dir, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) + def generate(self): + tc = CMakeToolchain(self) + tc.variables["sctp_debug"] = False + tc.variables["sctp_werror"] = False + tc.variables["sctp_build_shared_lib"] = self.options.shared + tc.variables["sctp_build_programs"] = False + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = self.options.shared + tc.generate() - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["sctp_debug"] = False - self._cmake.definitions["sctp_werror"] = False - self._cmake.definitions["sctp_build_shared_lib"] = self.options.shared - self._cmake.definitions["sctp_build_programs"] = False - self._cmake.configure() - return self._cmake + def _patch_sources(self): + apply_conandata_patches(self) + # Fix "The CMake policy CMP0091 must be NEW, but is ''" + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "project(usrsctplib C)\ncmake_minimum_required(VERSION 3.0)", + "cmake_minimum_required(VERSION 3.15)\nproject(usrsctplib C)") def build(self): self._patch_sources() - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("LICENSE.md", src=self._source_subfolder, dst="licenses") - cmake = self._configure_cmake() + copy(self, "LICENSE.md", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): - self.cpp_info.names["pkg_config"] = "usrsctp" + self.cpp_info.set_property("pkg_config_name", "usrsctp") if self.settings.os == "Windows": - self.cpp_info.system_libs.extend(['ws2_32', 'iphlpapi']) - elif self.settings.os == "Linux": - self.cpp_info.system_libs.extend(['pthread']) + self.cpp_info.system_libs = ["ws2_32", "iphlpapi"] + elif self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["pthread"] suffix = "_import" if self.settings.os == "Windows" and self.options.shared else "" self.cpp_info.libs = ["usrsctp" + suffix] diff --git a/recipes/usrsctp/all/test_package/CMakeLists.txt b/recipes/usrsctp/all/test_package/CMakeLists.txt index a60174007a234..d8fa3f6efba33 100644 --- a/recipes/usrsctp/all/test_package/CMakeLists.txt +++ b/recipes/usrsctp/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(usrsctp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) diff --git a/recipes/usrsctp/all/test_package/conanfile.py b/recipes/usrsctp/all/test_package/conanfile.py index 7e2dfe859bb27..ef5d7042163ec 100644 --- a/recipes/usrsctp/all/test_package/conanfile.py +++ b/recipes/usrsctp/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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/usrsctp/all/test_v1_package/CMakeLists.txt b/recipes/usrsctp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/usrsctp/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/usrsctp/all/test_v1_package/conanfile.py b/recipes/usrsctp/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..7e2dfe859bb27 --- /dev/null +++ b/recipes/usrsctp/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 8cb127aa2e4e16161412266771d85f907f8982ba Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 13 Aug 2023 16:45:51 +0300 Subject: [PATCH 184/637] (#18692) fusepp: migrate to Conan v2 * fusepp: migrate to Conan v2 * fusepp: add m * fusepp: restore VirtualRunEnv in test_package --- recipes/fusepp/all/CMakeLists.txt | 16 ++-- recipes/fusepp/all/conanfile.py | 85 ++++++++++--------- .../fusepp/all/test_package/CMakeLists.txt | 9 +- recipes/fusepp/all/test_package/conanfile.py | 21 +++-- .../fusepp/all/test_v1_package/CMakeLists.txt | 8 ++ .../fusepp/all/test_v1_package/conanfile.py | 17 ++++ 6 files changed, 97 insertions(+), 59 deletions(-) create mode 100644 recipes/fusepp/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/fusepp/all/test_v1_package/conanfile.py diff --git a/recipes/fusepp/all/CMakeLists.txt b/recipes/fusepp/all/CMakeLists.txt index 661f0d421c545..95ef7fe563895 100644 --- a/recipes/fusepp/all/CMakeLists.txt +++ b/recipes/fusepp/all/CMakeLists.txt @@ -1,18 +1,16 @@ -cmake_minimum_required(VERSION 3.4) -project(cmake_wrapper) +cmake_minimum_required(VERSION 3.12) +project(cmake_wrapper LANGUAGES CXX) -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup(KEEP_RPATHS) +find_package(libfuse REQUIRED CONFIG) -set(SOURCE_SUBFOLDER ${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder) +set(SOURCE_SUBFOLDER ${CMAKE_CURRENT_LIST_DIR}/src) file(GLOB_RECURSE INCLUDE_FILES "${SOURCE_SUBFOLDER}/Fuse*.h" "${SOURCE_SUBFOLDER}/Fuse.cpp") add_library(fusepp ${SOURCE_SUBFOLDER}/Fuse.cpp) - +target_link_libraries(fusepp PUBLIC libfuse::libfuse) set_target_properties(fusepp PROPERTIES PUBLIC_HEADER "${INCLUDE_FILES}") + +include(GNUInstallDirs) install(TARGETS fusepp - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/recipes/fusepp/all/conanfile.py b/recipes/fusepp/all/conanfile.py index f23b9daa7e874..36394b1187d48 100644 --- a/recipes/fusepp/all/conanfile.py +++ b/recipes/fusepp/all/conanfile.py @@ -1,15 +1,24 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration +import os + +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 +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" class FuseppConan(ConanFile): name = "fusepp" description = "A simple C++ wrapper for the FUSE filesystem." license = "MIT" - topics = ("fuse", "fusepp", "wrapper", "filesystem") - homepage = "https://github.com/jachappell/Fusepp" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/jachappell/Fusepp" + topics = ("fuse", "wrapper", "filesystem") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -17,23 +26,11 @@ class FuseppConan(ConanFile): } default_options = { "shared": False, - "fPIC": True + "fPIC": True, } - exports_sources = "CMakeLists.txt" - - generators = "cmake" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - def validate(self): - if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, "11") - if self.settings.compiler == "gcc": - if tools.Version(self.settings.compiler.version) < "6": - raise ConanInvalidConfiguration("gcc < 6 is unsupported") + 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": @@ -41,38 +38,50 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") - def source(self): - tools.get(**self.conan_data["sources"][self.version], - strip_root=True, destination=self._source_subfolder) + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("libfuse/3.10.5") + self.requires("libfuse/3.10.5", transitive_headers=True) - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.configure() - return self._cmake + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) + if self.settings.compiler == "gcc": + if Version(self.settings.compiler.version) < "6": + raise ConanInvalidConfiguration("gcc < 6 is unsupported") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure(build_script_folder=self.export_sources_folder) cmake.build() def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): self.cpp_info.libs = ["fusepp"] + self.cpp_info.set_property("cmake_file_name", "fusepp") + self.cpp_info.set_property("cmake_target_name", "fusepp::fusepp") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m"] + # TODO: Remove after Conan 2.0 self.cpp_info.names["cmake_find_package"] = "fusepp" self.cpp_info.names["cmake_find_package_multi"] = "fusepp" - - self.cpp_info.set_property("cmake_file_name", "fusepp") - self.cpp_info.set_property("cmake_target_name", "fusepp") diff --git a/recipes/fusepp/all/test_package/CMakeLists.txt b/recipes/fusepp/all/test_package/CMakeLists.txt index 00168e2e07000..03f33e510f02d 100644 --- a/recipes/fusepp/all/test_package/CMakeLists.txt +++ b/recipes/fusepp/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(fusepp CONFIG REQUIRED) +find_package(fusepp REQUIRED CONFIG) add_executable(${PROJECT_NAME} example.cpp) target_link_libraries(${PROJECT_NAME} fusepp::fusepp) diff --git a/recipes/fusepp/all/test_package/conanfile.py b/recipes/fusepp/all/test_package/conanfile.py index 46d9d6bbaf311..23d14d1e4b9f6 100644 --- a/recipes/fusepp/all/test_package/conanfile.py +++ b/recipes/fusepp/all/test_package/conanfile.py @@ -1,10 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -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("%s --version" % bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(f"{bin_path} --version", env="conanrun") diff --git a/recipes/fusepp/all/test_v1_package/CMakeLists.txt b/recipes/fusepp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/fusepp/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/fusepp/all/test_v1_package/conanfile.py b/recipes/fusepp/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..46d9d6bbaf311 --- /dev/null +++ b/recipes/fusepp/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run("%s --version" % bin_path, run_environment=True) From 4a6374ce6b8eb87879040618df4e95ef386e00cf Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 13 Aug 2023 17:06:15 +0300 Subject: [PATCH 185/637] (#18695) etc2comp: migrate to Conan v2 * etc2comp: migrate to Conan v2 * etc2comp: use collect_libs() for Windows * etc2comp: restore VirtualRunEnv in test_package --- recipes/etc2comp/all/CMakeLists.txt | 7 -- recipes/etc2comp/all/conandata.yml | 1 - recipes/etc2comp/all/conanfile.py | 85 ++++++++++--------- .../etc2comp/all/test_package/CMakeLists.txt | 9 +- .../etc2comp/all/test_package/conanfile.py | 22 +++-- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../etc2comp/all/test_v1_package/conanfile.py | 16 ++++ 7 files changed, 88 insertions(+), 60 deletions(-) delete mode 100644 recipes/etc2comp/all/CMakeLists.txt create mode 100644 recipes/etc2comp/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/etc2comp/all/test_v1_package/conanfile.py diff --git a/recipes/etc2comp/all/CMakeLists.txt b/recipes/etc2comp/all/CMakeLists.txt deleted file mode 100644 index c986d294c7547..0000000000000 --- a/recipes/etc2comp/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/etc2comp/all/conandata.yml b/recipes/etc2comp/all/conandata.yml index c09fa8bdc3d9b..a0bae7c1226dd 100644 --- a/recipes/etc2comp/all/conandata.yml +++ b/recipes/etc2comp/all/conandata.yml @@ -5,4 +5,3 @@ sources: patches: "cci.20170424": - patch_file: "patches/fix-cmake.patch" - base_path: "source_subfolder" diff --git a/recipes/etc2comp/all/conanfile.py b/recipes/etc2comp/all/conanfile.py index 4a9a0df7d2266..0293dc8b7a996 100644 --- a/recipes/etc2comp/all/conanfile.py +++ b/recipes/etc2comp/all/conanfile.py @@ -1,16 +1,22 @@ import os -import glob -from conans import ConanFile, CMake, tools + +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get + +required_conan_version = ">=1.53.0" + class Etc2compConan(ConanFile): name = "etc2comp" description = "Open source c++ skeletal animation library and toolset." - license = "Apache-2.0", - topics = ("conan", "texture", "etc2", "compressor") - homepage = "https://github.com/google/etc2comp" + license = ("Apache-2.0",) url = "https://github.com/conan-io/conan-center-index" - exports_sources = ["CMakeLists.txt", "patches/**"] - generators = "cmake" + homepage = "https://github.com/google/etc2comp" + topics = ("texture", "etc2", "compressor") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -21,54 +27,51 @@ class Etc2compConan(ConanFile): "fPIC": True, } - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" + def export_sources(self): + export_conandata_patches(self) def config_options(self): - if self.settings.os == 'Windows': + 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 validate(self): if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, 11) + check_min_cppstd(self, 11) def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = glob.glob('etc2comp-*/')[0] - os.rename(extracted_dir, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + def generate(self): + tc = CMakeToolchain(self) + tc.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) - self.copy("*.lib", dst="lib", keep_path=False) - self.copy("*.dll", dst="bin", keep_path=False) - self.copy("*.so*", dst="lib", keep_path=False, symlinks=True) - self.copy("*.dylib", dst="lib", keep_path=False) - self.copy("*.a", dst="lib", keep_path=False) - self.copy("*.h", dst=os.path.join("include"), src=os.path.join(self._source_subfolder, "EtcLib"), keep_path=False) + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + for pattern in ["*.lib", "*.a", "*.so*", "*.dylib"]: + copy(self, pattern, dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False) + copy(self, "*.dll", dst=os.path.join(self.package_folder, "bin"), src=self.build_folder, keep_path=False) + copy( + self, + "*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "EtcLib"), + keep_path=False, + ) def package_info(self): - self.cpp_info.libs = tools.collect_libs(self) - if self.settings.os == "Linux": - self.cpp_info.system_libs.append("pthread") + self.cpp_info.libs = collect_libs(self) + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["pthread"] diff --git a/recipes/etc2comp/all/test_package/CMakeLists.txt b/recipes/etc2comp/all/test_package/CMakeLists.txt index aede60e3b1e4a..174341b077e2c 100644 --- a/recipes/etc2comp/all/test_package/CMakeLists.txt +++ b/recipes/etc2comp/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(etc2comp REQUIRED CONFIG) add_executable(${CMAKE_PROJECT_NAME} test_package.cpp) -target_link_libraries(${CMAKE_PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE etc2comp::etc2comp) set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/etc2comp/all/test_package/conanfile.py b/recipes/etc2comp/all/test_package/conanfile.py index 4903f1a7e8fa0..ef5d7042163ec 100644 --- a/recipes/etc2comp/all/test_package/conanfile.py +++ b/recipes/etc2comp/all/test_package/conanfile.py @@ -1,9 +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", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -11,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/etc2comp/all/test_v1_package/CMakeLists.txt b/recipes/etc2comp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/etc2comp/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/etc2comp/all/test_v1_package/conanfile.py b/recipes/etc2comp/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..6c9d5dba712c7 --- /dev/null +++ b/recipes/etc2comp/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 5a508201e7d09789f3b37253725eefe68e8b9452 Mon Sep 17 00:00:00 2001 From: Carel Date: Sun, 13 Aug 2023 16:27:05 +0200 Subject: [PATCH 186/637] (#18829) hunspell/1.7.2: migrate conan 2 and update * Migrate recipe to conan 2 - Test for both * Add 1.7.2 - Newest at this time * Use v2 test package * Remove visibility * Fix includes * Check min gcc * Check C++ standard * Update recipes/hunspell/all/conanfile.py Co-authored-by: Chris Mc * C++11 by default * Remove unused file * Update recipes/hunspell/all/conanfile.py Co-authored-by: Uilian Ries * Review feedback - Use cmake path - Use CMAKE_CURRENT_SOURCE_DIR instead of passing it in through conan * Fix string append Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries Co-authored-by: Chris Mc Co-authored-by: Uilian Ries --- recipes/hunspell/all/CMakeLists.txt | 8 +-- recipes/hunspell/all/conandata.yml | 9 +++ recipes/hunspell/all/conanfile.py | 63 +++++++++------- .../all/patches/0001-fix-basic-string.patch | 71 +++++++++++++++++++ .../hunspell/all/test_package/CMakeLists.txt | 11 ++- .../hunspell/all/test_package/conanfile.py | 20 ++++-- .../all/test_v1_package/CMakeLists.txt | 8 +++ .../hunspell/all/test_v1_package/conanfile.py | 16 +++++ recipes/hunspell/config.yml | 2 + 9 files changed, 167 insertions(+), 41 deletions(-) create mode 100644 recipes/hunspell/all/patches/0001-fix-basic-string.patch create mode 100644 recipes/hunspell/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/hunspell/all/test_v1_package/conanfile.py diff --git a/recipes/hunspell/all/CMakeLists.txt b/recipes/hunspell/all/CMakeLists.txt index b2bc98f40adab..8fb4e22ab52aa 100644 --- a/recipes/hunspell/all/CMakeLists.txt +++ b/recipes/hunspell/all/CMakeLists.txt @@ -1,10 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(hunspell VERSION "${CONAN_hunspell_VERSION}" LANGUAGES CXX) -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup(TARGETS KEEP_RPATHS) -set(src src/hunspell) +set(src "${CMAKE_CURRENT_SOURCE_DIR}/src/src/hunspell") # ---- Configure hunvisapi.h ---- @@ -28,6 +26,8 @@ add_library( "${src}/suggestmgr.cxx" ) +target_compile_features(hunspell PRIVATE cxx_std_11) + if(MSVC) target_compile_options(hunspell PRIVATE /wd4267 /wd4996) endif() diff --git a/recipes/hunspell/all/conandata.yml b/recipes/hunspell/all/conandata.yml index 6c8c08bc2e4b0..69ac32949f949 100644 --- a/recipes/hunspell/all/conandata.yml +++ b/recipes/hunspell/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.7.2": + sha256: "69fa312d3586c988789266eaf7ffc9861d9f6396c31fc930a014d551b59bbd6e" + url: https://github.com/hunspell/hunspell/archive/refs/tags/v1.7.2.tar.gz "1.7.0": sha256: "57be4e03ae9dd62c3471f667a0d81a14513e314d4d92081292b90435944ff951" url: https://github.com/hunspell/hunspell/files/2573619/hunspell-1.7.0.tar.gz +patches: + "1.7.2": + - patch_file: "patches/0001-fix-basic-string.patch" + patch_description: "Fix build problem with basic_string::append()" + patch_type: "official" + patch_source: "https://github.com/hunspell/hunspell/commit/a6cb9f609b0292df12e2e855c97303de306bae44" diff --git a/recipes/hunspell/all/conanfile.py b/recipes/hunspell/all/conanfile.py index 6c74ea78eaba7..914e9604ac575 100644 --- a/recipes/hunspell/all/conanfile.py +++ b/recipes/hunspell/all/conanfile.py @@ -1,21 +1,21 @@ -import functools +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, export_conandata_patches, apply_conandata_patches import os -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration -required_conan_version = ">=1.43.0" +required_conan_version = ">=1.53.0" class HunspellConan(ConanFile): name = "hunspell" - description = ( - "Hunspell is a free spell checker and morphological analyzer library" - ) + description = "Hunspell is a free spell checker and morphological analyzer library" url = "https://github.com/conan-io/conan-center-index" homepage = "https://hunspell.github.io/" topics = "spell", "spell-check" license = "MPL-1.1", "GPL-2.0-or-later", "LGPL-2.1-or-later" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -25,10 +25,11 @@ class HunspellConan(ConanFile): "shared": False, "fPIC": True, } - generators = "cmake" - # FIXME: Remove once the pending upstream PR for CMake support is merged - exports_sources = "CMakeLists.txt" - no_copy_source = True + + def export_sources(self): + export_conandata_patches(self) + # TODO: Remove once PR is merged: https://github.com/hunspell/hunspell/pull/704/ + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) def config_options(self): if self.settings.os == "Windows": @@ -36,30 +37,44 @@ def config_options(self): 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 source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) # NOTE: The source contains a pre-configured hunvisapi.h and it would # prevent no_copy_source and building without patches. h = os.path.join(self.source_folder, "src", "hunspell", "hunvisapi.h") os.remove(h) - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["CONAN_hunspell_VERSION"] = self.version - cmake.configure() - return cmake + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CONAN_hunspell_VERSION"] = self.version + tc.generate() def build(self): - self._configure_cmake().build() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + cmake.build() def package(self): - self._configure_cmake().install() - self.copy("COPYING", "licenses") - self.copy("COPYING.LESSER", "licenses") - self.copy("license.hunspell", "licenses") + cmake = CMake(self) + cmake.install() + copy(self, "COPYING*", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses"), + keep_path=False) + copy(self, "license.hunspell", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses"), + keep_path=False) def package_info(self): self.cpp_info.libs = ["hunspell"] diff --git a/recipes/hunspell/all/patches/0001-fix-basic-string.patch b/recipes/hunspell/all/patches/0001-fix-basic-string.patch new file mode 100644 index 0000000000000..71aa1cdafa6c8 --- /dev/null +++ b/recipes/hunspell/all/patches/0001-fix-basic-string.patch @@ -0,0 +1,71 @@ +diff --git a/src/hunspell/affentry.cxx b/src/hunspell/affentry.cxx +index 46e8b5826..6ee23bec9 100644 +--- a/src/hunspell/affentry.cxx ++++ b/src/hunspell/affentry.cxx +@@ -290,7 +290,7 @@ struct hentry* PfxEntry::check_twosfx(const std::string& word, + // back any characters that would have been stripped + + std::string tmpword(strip); +- tmpword.append(word, start + appnd.size()); ++ tmpword.append(word, start + appnd.size(), tmpl); + + // now make sure all of the conditions on characters + // are met. Please see the appendix at the end of +@@ -338,7 +338,7 @@ std::string PfxEntry::check_twosfx_morph(const std::string& word, + // back any characters that would have been stripped + + std::string tmpword(strip); +- tmpword.append(word, start + appnd.size()); ++ tmpword.append(word, start + appnd.size(), tmpl); + + // now make sure all of the conditions on characters + // are met. Please see the appendix at the end of +@@ -386,7 +386,7 @@ std::string PfxEntry::check_morph(const std::string& word, + // back any characters that would have been stripped + + std::string tmpword(strip); +- tmpword.append(word, start + appnd.size()); ++ tmpword.append(word, start + appnd.size(), tmpl); + + // now make sure all of the conditions on characters + // are met. Please see the appendix at the end of +diff --git a/src/hunspell/affixmgr.cxx b/src/hunspell/affixmgr.cxx +index 4d1ad2f12..a8931c14a 100644 +--- a/src/hunspell/affixmgr.cxx ++++ b/src/hunspell/affixmgr.cxx +@@ -2465,7 +2465,7 @@ int AffixMgr::compound_check_morph(const std::string& word, + result.append(presult); + result.push_back(MSEP_FLD); + result.append(MORPH_PART); +- result.append(word, i); ++ result.append(word, i, word.size()); + if (complexprefixes && HENTRY_DATA(rv)) + result.append(HENTRY_DATA2(rv)); + if (!HENTRY_FIND(rv, MORPH_STEM)) { +@@ -2522,7 +2522,7 @@ int AffixMgr::compound_check_morph(const std::string& word, + result.append(presult); + result.push_back(MSEP_FLD); + result.append(MORPH_PART); +- result.append(word, i); ++ result.append(word, i, word.size()); + + if (HENTRY_DATA(rv)) { + if (complexprefixes) +@@ -2573,7 +2573,7 @@ int AffixMgr::compound_check_morph(const std::string& word, + if (!m.empty()) { + result.push_back(MSEP_FLD); + result.append(MORPH_PART); +- result.append(word, i); ++ result.append(word, i, word.size()); + line_uniq_app(m, MSEP_REC); + result.append(m); + } +@@ -2665,7 +2665,7 @@ int AffixMgr::compound_check_morph(const std::string& word, + if (!m.empty()) { + result.push_back(MSEP_FLD); + result.append(MORPH_PART); +- result.append(word, i); ++ result.append(word, i, word.size()); + line_uniq_app(m, MSEP_REC); + result.push_back(MSEP_FLD); + result.append(m); diff --git a/recipes/hunspell/all/test_package/CMakeLists.txt b/recipes/hunspell/all/test_package/CMakeLists.txt index 73177e055de6d..45217182fc8cf 100644 --- a/recipes/hunspell/all/test_package/CMakeLists.txt +++ b/recipes/hunspell/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package CXX) - -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) find_package(hunspell REQUIRED CONFIG) -add_executable(test_package test_package.cxx) -target_link_libraries(test_package PRIVATE hunspell::hunspell) +add_executable(${PROJECT_NAME} test_package.cxx) +target_link_libraries(${PROJECT_NAME} PRIVATE hunspell::hunspell) diff --git a/recipes/hunspell/all/test_package/conanfile.py b/recipes/hunspell/all/test_package/conanfile.py index a8c92dea63335..0a6bc68712d90 100644 --- a/recipes/hunspell/all/test_package/conanfile.py +++ b/recipes/hunspell/all/test_package/conanfile.py @@ -1,11 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout import os -from conans import ConanFile, CMake, tools - class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) def build(self): cmake = CMake(self) @@ -13,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.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/hunspell/all/test_v1_package/CMakeLists.txt b/recipes/hunspell/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..5d38c542b67a4 --- /dev/null +++ b/recipes/hunspell/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/hunspell/all/test_v1_package/conanfile.py b/recipes/hunspell/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..a500b98343c74 --- /dev/null +++ b/recipes/hunspell/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/hunspell/config.yml b/recipes/hunspell/config.yml index 0f57b11de8fb0..cc37272dbe648 100644 --- a/recipes/hunspell/config.yml +++ b/recipes/hunspell/config.yml @@ -1,3 +1,5 @@ versions: + "1.7.2": + folder: all "1.7.0": folder: all From 7521c744ff1b5b295228de8d29a6f0a8d5f1ae61 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 13 Aug 2023 23:47:28 +0900 Subject: [PATCH 187/637] (#18843) sol2: add version 3.3.1, add package_type, update lua --- recipes/sol2/all/conandata.yml | 3 +++ recipes/sol2/all/conanfile.py | 5 +++-- recipes/sol2/config.yml | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/recipes/sol2/all/conandata.yml b/recipes/sol2/all/conandata.yml index aa516653323cf..f83f4a6a36735 100644 --- a/recipes/sol2/all/conandata.yml +++ b/recipes/sol2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.3.1": + url: "https://github.com/ThePhD/sol2/archive/v3.3.1.tar.gz" + sha256: "ad121461047d52b449aa84234a6b578fa3ed95d67d1a0703902eba72417f61bb" "3.3.0": url: "https://github.com/ThePhD/sol2/archive/v3.3.0.tar.gz" sha256: "b82c5de030e18cb2bcbcefcd5f45afd526920c517a96413f0b59b4332d752a1e" diff --git a/recipes/sol2/all/conanfile.py b/recipes/sol2/all/conanfile.py index 93f899011d335..4ebb24964da6a 100644 --- a/recipes/sol2/all/conanfile.py +++ b/recipes/sol2/all/conanfile.py @@ -17,7 +17,8 @@ class Sol2Conan(ConanFile): license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/ThePhD/sol2" - topics = ("lua", "c++", "bindings", "scripting") + topics = ("lua", "c++", "bindings", "scripting", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -66,7 +67,7 @@ def requirements(self): # v2.x.x & v3.0.x supports up to Lua 5.3 self.requires("lua/5.3.6") else: - self.requires("lua/5.4.4") + self.requires("lua/5.4.6") elif self.options.with_lua == "luajit": self.requires("luajit/2.1.0-beta3") diff --git a/recipes/sol2/config.yml b/recipes/sol2/config.yml index 28097c1cf11a2..d6be5bd0bfdf0 100644 --- a/recipes/sol2/config.yml +++ b/recipes/sol2/config.yml @@ -1,4 +1,6 @@ versions: + "3.3.1": + folder: "all" "3.3.0": folder: "all" "3.2.3": From ec4868889aabf53e9b7a87e6b2af16936efaa769 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 13 Aug 2023 18:27:48 +0300 Subject: [PATCH 188/637] (#18944) nmslib: migrate to Conan v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * nmslib: migrate to Conan v2 * nmslib: add m, fix_apple_shared_install_name() * nmslib: add mvec * Update recipes/nmslib/all/conanfile.py Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> --- recipes/nmslib/all/CMakeLists.txt | 7 -- recipes/nmslib/all/conandata.yml | 12 +-- recipes/nmslib/all/conanfile.py | 93 +++++++++++-------- .../nmslib/all/test_package/CMakeLists.txt | 5 +- recipes/nmslib/all/test_package/conanfile.py | 21 +++-- .../nmslib/all/test_v1_package/CMakeLists.txt | 8 ++ .../nmslib/all/test_v1_package/conanfile.py | 17 ++++ 7 files changed, 100 insertions(+), 63 deletions(-) delete mode 100644 recipes/nmslib/all/CMakeLists.txt create mode 100644 recipes/nmslib/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/nmslib/all/test_v1_package/conanfile.py diff --git a/recipes/nmslib/all/CMakeLists.txt b/recipes/nmslib/all/CMakeLists.txt deleted file mode 100644 index c8e560d40aa56..0000000000000 --- a/recipes/nmslib/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.4) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(source_subfolder/similarity_search) diff --git a/recipes/nmslib/all/conandata.yml b/recipes/nmslib/all/conandata.yml index bc747087c62bd..a76e6327ac2f8 100644 --- a/recipes/nmslib/all/conandata.yml +++ b/recipes/nmslib/all/conandata.yml @@ -4,11 +4,7 @@ sources: sha256: d1f5c60a62e0e61e14c92b37d6f1420ed4bb3c6fd19ced67c84b7e0e0e3f07c5 patches: "2.1.1": - - base_path: source_subfolder - patch_file: patches/0001-cmake-disable-app-build.patch - - base_path: source_subfolder - patch_file: patches/0002-cmake-fix-install.patch - - base_path: source_subfolder - patch_file: patches/0003-cmake-fix-flags.patch - - base_path: source_subfolder - patch_file: patches/0004-missing-utils-header.patch + - patch_file: patches/0001-cmake-disable-app-build.patch + - patch_file: patches/0002-cmake-fix-install.patch + - patch_file: patches/0003-cmake-fix-flags.patch + - patch_file: patches/0004-missing-utils-header.patch diff --git a/recipes/nmslib/all/conanfile.py b/recipes/nmslib/all/conanfile.py index 637febf0d43bb..0aeec8ba9e93f 100644 --- a/recipes/nmslib/all/conanfile.py +++ b/recipes/nmslib/all/conanfile.py @@ -1,66 +1,83 @@ import os -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +from conan.tools.microsoft import is_msvc, check_min_vs + +required_conan_version = ">=1.53.0" class Nmslib(ConanFile): name = "nmslib" + description = ( + "Non-Metric Space Library (NMSLIB): An efficient similarity search library " + "and a toolkit for evaluation of k-NN methods for generic non-metric spaces." + ) + license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/nmslib/nmslib" - description = "Non-Metric Space Library (NMSLIB): An efficient similarity search library and a toolkit for evaluation of k-NN methods for generic non-metric spaces." topics = ("knn-search", "non-metric", "neighborhood-graphs", "neighborhood-graphs", "vp-tree") - license = "Apache-2.0" + + package_type = "library" settings = "os", "arch", "compiler", "build_type" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} - exports_sources = "CMakeLists.txt", "patches/**" - generators = "cmake" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } - _cmake = None + def export_sources(self): + export_conandata_patches(self) - def validate(self): - if self.settings.compiler == "Visual Studio": - if self.settings.compiler.version == "14": - raise ConanInvalidConfiguration("Visual Studio 14 builds are not supported") # TODO: add reason in message - if self.options.shared: - raise ConanInvalidConfiguration("Visual Studio shared builds are not supported (.lib artifacts missing)") + 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 config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC + def layout(self): + cmake_layout(self, src_folder="src") - @property - def _source_subfolder(self): - return "source_subfolder" + def validate(self): + check_min_vs(self, 190) # TODO: add reason in message + if is_msvc(self) and self.options.shared: + raise ConanInvalidConfiguration( + "Visual Studio shared builds are not supported (.lib artifacts missing)" + ) def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, - destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _configure_cmake(self): - if self._cmake is None: - cmake = CMake(self) - cmake.definitions["WITHOUT_TESTS"] = True - cmake.configure() - self._cmake = cmake - return self._cmake + def generate(self): + tc = CMakeToolchain(self) + tc.variables["WITHOUT_TESTS"] = True + tc.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, "similarity_search")) cmake.build() def package(self): - self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() + fix_apple_shared_install_name(self) def package_info(self): self.cpp_info.libs = ["NonMetricSpaceLib"] - if self.settings.os == "Linux": - self.cpp_info.system_libs = ["pthread"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["pthread", "m"] + if self.settings.arch in ["x86", "x86_64"]: + self.cpp_info.system_libs.append("mvec") diff --git a/recipes/nmslib/all/test_package/CMakeLists.txt b/recipes/nmslib/all/test_package/CMakeLists.txt index 7b52b10445744..a7336347af2da 100644 --- a/recipes/nmslib/all/test_package/CMakeLists.txt +++ b/recipes/nmslib/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - find_package(nmslib REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/nmslib/all/test_package/conanfile.py b/recipes/nmslib/all/test_package/conanfile.py index abcaeed3f89b6..ef5d7042163ec 100644 --- a/recipes/nmslib/all/test_package/conanfile.py +++ b/recipes/nmslib/all/test_package/conanfile.py @@ -1,10 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/nmslib/all/test_v1_package/CMakeLists.txt b/recipes/nmslib/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/nmslib/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/nmslib/all/test_v1_package/conanfile.py b/recipes/nmslib/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..abcaeed3f89b6 --- /dev/null +++ b/recipes/nmslib/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From b0cdc00b50640a5acdb6b9dbca7ef710a401b1ad Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 13 Aug 2023 18:48:13 +0300 Subject: [PATCH 189/637] (#18981) libsafec: migrate to Conan v2 * libsafec: migrate to Conan v2 * libsafec: add fix_apple_shared_install_name() --- recipes/libsafec/all/conanfile.py | 113 +++++++++--------- .../libsafec/all/test_package/CMakeLists.txt | 7 +- .../libsafec/all/test_package/conanfile.py | 21 +++- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../libsafec/all/test_v1_package/conanfile.py | 17 +++ 5 files changed, 102 insertions(+), 64 deletions(-) create mode 100644 recipes/libsafec/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/libsafec/all/test_v1_package/conanfile.py diff --git a/recipes/libsafec/all/conanfile.py b/recipes/libsafec/all/conanfile.py index 6924adfd04703..7086816ccca53 100644 --- a/recipes/libsafec/all/conanfile.py +++ b/recipes/libsafec/all/conanfile.py @@ -1,23 +1,28 @@ +import os + from conan import ConanFile from conan.errors import ConanInvalidConfiguration, ConanException -from conan.tools.files import get, rmdir, copy, rm, chdir +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import chdir, copy, get, rm, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc from conan.tools.scm import Version -from conans import AutoToolsBuildEnvironment, tools -import os required_conan_version = ">=1.53.0" class LibSafeCConan(ConanFile): name = "libsafec" - description = "This library implements the secure C11 Annex K[^5] functions" \ - " on top of most libc implementations, which are missing from them." + description = ("This library implements the secure C11 Annex K[^5] functions" + " on top of most libc implementations, which are missing from them.") + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/rurban/safeclib" - license = "MIT" - topics = ("safec", "libc", "bounds-checking") + topics = ("safec", "libc", "bounds-checking", "pre-built") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -32,16 +37,20 @@ class LibSafeCConan(ConanFile): "memmax": 268435456, } - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" - @property def _settings_build(self): return getattr(self, "settings_build", self.settings) + @property + def _supported_compiler(self): + compiler = self.settings.compiler + version = Version(self.settings.compiler.version) + if is_msvc(self): + return False + if compiler == "gcc" and version < "5": + return False + return True + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -52,71 +61,67 @@ def configure(self): self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") - def build_requirements(self): - self.tool_requires("libtool/2.4.6") - if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): - self.tool_requires("msys2/cci.latest") - - @property - def _supported_compiler(self): - compiler = self.settings.compiler - version = Version(self.settings.compiler.version) - if is_msvc(self): - return False - if compiler == "gcc" and version < "5": - return False - return True + def layout(self): + basic_layout(self, src_folder="src") def validate(self): - if self.settings.os == "Macos" and self.settings.arch == "armv8": - raise ConanInvalidConfiguration(f"This platform is not yet supported by {self.ref} (os=Macos arch=armv8)") + if is_apple_os(self) and self.settings.arch == "armv8": + raise ConanInvalidConfiguration( + f"This platform is not yet supported by {self.ref} (os=Macos arch=armv8)" + ) if not self._supported_compiler: raise ConanInvalidConfiguration( - f"{self.ref} doesn't support {self.settings.compiler}-{self.settings.compiler.version}") + f"{self.ref} doesn't support {self.settings.compiler}-{self.settings.compiler.version}" + ) if not str(self.info.options.strmax).isdigit(): raise ConanException(f"{self.ref} option 'strmax' must be a valid integer number.") + def build_requirements(self): + self.tool_requires("libtool/2.4.7") + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = AutotoolsToolchain(self) yes_no = lambda v: "yes" if v else "no" - args = [ - "--enable-shared={}".format(yes_no(self.options.shared)), - "--enable-static={}".format(yes_no(not self.options.shared)), - "--enable-debug={}".format(yes_no(self.settings.build_type == "Debug")), + tc.configure_args += [ + f"--enable-debug={yes_no(self.settings.build_type == 'Debug')}", "--disable-doc", "--disable-Werror", - "--enable-strmax={}".format(self.options.strmax), - "--enable-memmax={}".format(self.options.memmax), + f"--enable-strmax={self.options.strmax}", + f"--enable-memmax={self.options.memmax}", ] - self._autotools.configure(args=args, configure_dir=self._source_subfolder) - return self._autotools + tc.generate() def build(self): - with chdir(self, self._source_subfolder): - self.run("{} -fiv".format(tools.get_env("AUTORECONF")), - win_bash=tools.os_info.is_windows, run_environment=True) - autotools = self._configure_autotools() - autotools.make() + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.autoreconf() + autotools.configure() + autotools.make() def package(self): - copy(self, "COPYING", src=self._source_subfolder, dst=os.path.join(self.package_folder, "licenses")) - autotools = self._configure_autotools() - autotools.install() + copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rm(self, "*.la", os.path.join(self.package_folder, "lib")) + fix_apple_shared_install_name(self) def package_info(self): self.cpp_info.includedirs.append(os.path.join("include", "libsafec")) - self.cpp_info.libs = ["safec-{}".format(self.version)] + self.cpp_info.libs = [f"safec-{self.version}"] self.cpp_info.set_property("pkg_config_name", "libsafec") bin_dir = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_dir)) + self.output.info(f"Appending PATH environment variable: {bin_dir}") self.env_info.PATH.append(bin_dir) diff --git a/recipes/libsafec/all/test_package/CMakeLists.txt b/recipes/libsafec/all/test_package/CMakeLists.txt index 31762006efa77..2a28db28a9c5d 100644 --- a/recipes/libsafec/all/test_package/CMakeLists.txt +++ b/recipes/libsafec/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(libsafec REQUIRED CONFIG) add_executable(test_package test_package.c) -target_link_libraries(test_package ${CONAN_LIBS}) +target_link_libraries(test_package PRIVATE libsafec::libsafec) diff --git a/recipes/libsafec/all/test_package/conanfile.py b/recipes/libsafec/all/test_package/conanfile.py index b7cd0e8fa4f62..ef5d7042163ec 100644 --- a/recipes/libsafec/all/test_package/conanfile.py +++ b/recipes/libsafec/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import CMake, ConanFile, 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", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -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/libsafec/all/test_v1_package/CMakeLists.txt b/recipes/libsafec/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libsafec/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libsafec/all/test_v1_package/conanfile.py b/recipes/libsafec/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..043b77522562f --- /dev/null +++ b/recipes/libsafec/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import CMake, ConanFile, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 22b6c2bc6389ecbb29f021bf9970063ccecb0294 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 14 Aug 2023 01:09:14 +0900 Subject: [PATCH 190/637] (#18985) ctre: add version 3.8, add package_type * ctre: add version 3.8, add package_type * drop support clang/12.0 without cppstd on ctre/3.4.1 * fix condition expr --- recipes/ctre/all/conandata.yml | 3 +++ recipes/ctre/all/conanfile.py | 10 +++++++--- recipes/ctre/config.yml | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/recipes/ctre/all/conandata.yml b/recipes/ctre/all/conandata.yml index 0cbb6fc297fa1..84177523424ed 100644 --- a/recipes/ctre/all/conandata.yml +++ b/recipes/ctre/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.8": + url: "https://github.com/hanickadot/compile-time-regular-expressions/archive/v3.8.tar.gz" + sha256: "6462ee41fa6aa12075f6b9d13f42358091d32963087443a6669d2c94232eea04" "3.7.2": url: "https://github.com/hanickadot/compile-time-regular-expressions/archive/v3.7.2.tar.gz" sha256: "0711a6f97496e010f72adab69839939a9e50ba35ad87779e422ae3ff3b0edfc3" diff --git a/recipes/ctre/all/conanfile.py b/recipes/ctre/all/conanfile.py index 4a9068c2ee4fe..7170bf3ad6425 100644 --- a/recipes/ctre/all/conanfile.py +++ b/recipes/ctre/all/conanfile.py @@ -17,6 +17,7 @@ class CtreConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/hanickadot/compile-time-regular-expressions" topics = ("cpp17", "regex", "compile-time-regular-expressions", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -38,8 +39,11 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} doesn't support MSVC < 16") elif compiler == "gcc" and compiler_version < min_gcc: raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc < {min_gcc}") - elif compiler == "clang" and compiler_version < "6.0": - raise ConanInvalidConfiguration(f"{self.ref} doesn't support clang < 6.0") + elif compiler == "clang": + if compiler_version < "6.0": + raise ConanInvalidConfiguration(f"{self.ref} doesn't support clang < 6.0") + if ctre_version == "3.4.1" and compiler_version >= "12.0" and not self.settings.compiler.get_safe("cppstd"): + raise ConanInvalidConfiguration(f"{self.ref} doesn't support clang >= 12.0 without cppstd. Please set cppstd.") elif compiler == "apple-clang": if compiler_version < "10.0": raise ConanInvalidConfiguration(f"{self.ref} doesn't support Apple clang < 10.0") @@ -53,7 +57,7 @@ def package_id(self): self.info.clear() def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): copy(self, pattern="*.hpp", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) diff --git a/recipes/ctre/config.yml b/recipes/ctre/config.yml index 791985db54420..e8d08c6a4805a 100644 --- a/recipes/ctre/config.yml +++ b/recipes/ctre/config.yml @@ -1,4 +1,6 @@ versions: + "3.8": + folder: all "3.7.2": folder: all "3.7.1": From fcfa9587260464528a82ed7980a7352ec634fde6 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 14 Aug 2023 01:48:06 +0900 Subject: [PATCH 191/637] (#18991) luau: add version 0.589, remove older versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * luau: add version 0.588, remove older versions * apply patch for 0.588 * update 0.589 --------- Co-authored-by: Rubén Rincón Blanco --- recipes/luau/all/conandata.yml | 37 +++++++--------------------------- recipes/luau/config.yml | 8 ++------ 2 files changed, 9 insertions(+), 36 deletions(-) diff --git a/recipes/luau/all/conandata.yml b/recipes/luau/all/conandata.yml index 1dc4953f665e9..ce7fa7f71284a 100644 --- a/recipes/luau/all/conandata.yml +++ b/recipes/luau/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.589": + url: "https://github.com/Roblox/luau/archive/0.589.tar.gz" + sha256: "dc4489de52dbf29cd3d04d78c1112f812e04a03b68d57585749260ba791e65ed" "0.582": url: "https://github.com/Roblox/luau/archive/0.582.tar.gz" sha256: "ee6da6329e58afc956bcca907ed9c6bc0455cd580990aa73f7cfb285aea22a6d" @@ -26,16 +29,11 @@ sources: "0.548": url: "https://github.com/Roblox/luau/archive/0.548.tar.gz" sha256: "1ec0aa919955aaa2d88dbef115801681d3b4dbfa7a276435a03d20230918659c" - "0.544": - url: "https://github.com/Roblox/luau/archive/0.544.tar.gz" - sha256: "c1e2d4e04fe6f191192d1570bd83f96531804fc484a0bc0e00b53248a01d7dee" - "0.541": - url: "https://github.com/Roblox/luau/archive/0.541.tar.gz" - sha256: "02d50b8c0396a353ed641a61959851d6858607d535ed7373478b8fbc2a508eba" - "0.540": - url: "https://github.com/Roblox/luau/archive/0.540.tar.gz" - sha256: "84b3e52b3b0ccf4d5bc0e0c04055f3a9b2f045c1281e203a858335a6fe76b0ff" patches: + "0.589": + - patch_file: "patches/0.572-0001-fix-cmake.patch" + patch_description: "enable shared build" + patch_type: "portability" "0.582": - patch_file: "patches/0.572-0001-fix-cmake.patch" patch_description: "enable shared build" @@ -87,24 +85,3 @@ patches: - patch_file: "patches/0.536-0002-rename-lerp.patch" patch_description: "rename lerp function to avoid name conflict" patch_type: "portability" - "0.544": - - patch_file: "patches/0.536-0001-fix-cmake.patch" - patch_description: "enable shared build" - patch_type: "portability" - - patch_file: "patches/0.536-0002-rename-lerp.patch" - patch_description: "rename lerp function to avoid name conflict" - patch_type: "portability" - "0.541": - - patch_file: "patches/0.536-0001-fix-cmake.patch" - patch_description: "enable shared build" - patch_type: "portability" - - patch_file: "patches/0.536-0002-rename-lerp.patch" - patch_description: "rename lerp function to avoid name conflict" - patch_type: "portability" - "0.540": - - patch_file: "patches/0.536-0001-fix-cmake.patch" - patch_description: "enable shared build" - patch_type: "portability" - - patch_file: "patches/0.536-0002-rename-lerp.patch" - patch_description: "rename lerp function to avoid name conflict" - patch_type: "portability" diff --git a/recipes/luau/config.yml b/recipes/luau/config.yml index 8a8c09827d38e..da348c9822453 100644 --- a/recipes/luau/config.yml +++ b/recipes/luau/config.yml @@ -1,4 +1,6 @@ versions: + "0.589": + folder: all "0.582": folder: all "0.577": @@ -17,9 +19,3 @@ versions: folder: all "0.548": folder: all - "0.544": - folder: all - "0.541": - folder: all - "0.540": - folder: all From 981f569c41e5ed12812ef425433000abee36efda Mon Sep 17 00:00:00 2001 From: Roberto Rossini <71787608+robomics@users.noreply.github.com> Date: Sun, 13 Aug 2023 19:08:21 +0200 Subject: [PATCH 192/637] (#19039) hictk: new recipe * Add hictk * Add CMake to build_requirements * Bugfix * Bugfix * Bugfix * Specify transitive_headers=True in requirements * Update recipes/hictk/all/conanfile.py Co-authored-by: Uilian Ries --------- Co-authored-by: Uilian Ries --- recipes/hictk/all/conandata.yml | 4 + recipes/hictk/all/conanfile.py | 127 ++++++++++++++++++ recipes/hictk/all/test_package/CMakeLists.txt | 9 ++ recipes/hictk/all/test_package/conanfile.py | 27 ++++ .../hictk/all/test_package/test_package.cpp | 8 ++ recipes/hictk/config.yml | 3 + 6 files changed, 178 insertions(+) create mode 100644 recipes/hictk/all/conandata.yml create mode 100644 recipes/hictk/all/conanfile.py create mode 100644 recipes/hictk/all/test_package/CMakeLists.txt create mode 100644 recipes/hictk/all/test_package/conanfile.py create mode 100644 recipes/hictk/all/test_package/test_package.cpp create mode 100644 recipes/hictk/config.yml diff --git a/recipes/hictk/all/conandata.yml b/recipes/hictk/all/conandata.yml new file mode 100644 index 0000000000000..b46596ee0372e --- /dev/null +++ b/recipes/hictk/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.0.1": + url: "https://github.com/paulsengroup/hictk/archive/refs/tags/v0.0.1.tar.gz" + sha256: "460985413c3b2e80121f7697c6c824a91955a38051de770d7eb946ddafa88460" diff --git a/recipes/hictk/all/conanfile.py b/recipes/hictk/all/conanfile.py new file mode 100644 index 0000000000000..cf1428272f465 --- /dev/null +++ b/recipes/hictk/all/conanfile.py @@ -0,0 +1,127 @@ +import os.path + +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 + +required_conan_version = ">=1.50.0" + + +class HictkConan(ConanFile): + name = "hictk" + description = "Blazing fast toolkit to work with .hic and .cool files" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/paulsengroup/hictk" + topics = "hictk", "bioinformatics", "hic" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + options = {"with_eigen": [True, False]} + default_options = {"with_eigen": True} + + @property + def _minimum_cpp_standard(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "11", + "clang": "7", + "gcc": "8", + "Visual Studio": "16", + "msvc": "192", + } + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("fast_float/5.2.0", transitive_headers=True) + if self.options.with_eigen: + self.requires("eigen/3.4.0", transitive_headers=True) + self.requires("fmt/10.0.0", transitive_headers=True) + self.requires("hdf5/1.14.0", transitive_headers=True) + self.requires("highfive/2.7.1", transitive_headers=True) + self.requires("libdeflate/1.18", transitive_headers=True) + self.requires("parallel-hashmap/1.3.11", transitive_headers=True) + self.requires("spdlog/1.12.0", transitive_headers=True) + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.get_safe("compiler.cppstd"): + check_min_cppstd(self, self._minimum_cpp_standard) + + 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] + + compiler = str(self.settings.compiler) + version = str(self.settings.compiler.version) + try: + minimum_version = self._compilers_minimum_version[str(compiler)] + if minimum_version and loose_lt_semver(version, minimum_version): + msg = ( + f"{self.ref} requires C++{self._minimum_cpp_standard} features " + f"which are not supported by compiler {compiler} {version}." + ) + raise ConanInvalidConfiguration(msg) + except KeyError: + msg = ( + f"{self.ref} recipe lacks information about the {compiler} compiler, " + f"support for the required C++{self._minimum_cpp_standard} features is assumed" + ) + self.output.warn(msg) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build_requirements(self): + self.tool_requires("cmake/[>=3.25 <4]") + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["HICTK_BUILD_BENCHMARKS"] = "OFF" + tc.variables["HICTK_BUILD_EXAMPLES"] = "OFF" + tc.variables["HICTK_BUILD_TOOLS"] = "OFF" + tc.variables["HICTK_ENABLE_GIT_VERSION_TRACKING"] = "OFF" + tc.variables["HICTK_ENABLE_TESTING"] = "OFF" + tc.variables["HICTK_WITH_EIGEN"] = self.options.with_eigen + tc.generate() + + cmakedeps = CMakeDeps(self) + cmakedeps.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy( + self, + "LICENSE", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses"), + ) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.libdirs = [] + self.cpp_info.set_property("cmake_file_name", "hictk") + self.cpp_info.set_property("cmake_target_name", "hictk::libhictk") + self.cpp_info.set_property("pkg_config_name", "hictk") + + # TODO: to remove in conan v2 once legacy generators removed + self.cpp_info.names["cmake_find_package"] = "hictk" + self.cpp_info.names["cmake_find_package_multi"] = "hictk" diff --git a/recipes/hictk/all/test_package/CMakeLists.txt b/recipes/hictk/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..969fb76fe7be1 --- /dev/null +++ b/recipes/hictk/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.8) + +project(test_package LANGUAGES CXX) + +find_package(hictk REQUIRED CONFIG) + +add_executable(${CMAKE_PROJECT_NAME} test_package.cpp) +target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE hictk::libhictk) +target_compile_features(${CMAKE_PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/hictk/all/test_package/conanfile.py b/recipes/hictk/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3bfefffc36b5c --- /dev/null +++ b/recipes/hictk/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +import os + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout + + +class HictkTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + 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/hictk/all/test_package/test_package.cpp b/recipes/hictk/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..bbe13ab6a3219 --- /dev/null +++ b/recipes/hictk/all/test_package/test_package.cpp @@ -0,0 +1,8 @@ +#include +#include "hictk/fmt.hpp" +#include "hictk/cooler/utils.hpp" + + +int main(int argc, char** argv) { + fmt::print("{}\n", hictk::cooler::utils::is_cooler(argv[0])); +} diff --git a/recipes/hictk/config.yml b/recipes/hictk/config.yml new file mode 100644 index 0000000000000..f6f5b5679b9d4 --- /dev/null +++ b/recipes/hictk/config.yml @@ -0,0 +1,3 @@ +versions: + "0.0.1": + folder: all From 5a0102f41398597c046baac8a93e1a9889ca5898 Mon Sep 17 00:00:00 2001 From: Frank Schoenmann Date: Sun, 13 Aug 2023 19:30:07 +0200 Subject: [PATCH 193/637] (#19060) fast-cdr: add version 1.1.0 --- recipes/fast-cdr/all/conandata.yml | 3 +++ recipes/fast-cdr/all/conanfile.py | 5 +++++ recipes/fast-cdr/config.yml | 2 ++ 3 files changed, 10 insertions(+) diff --git a/recipes/fast-cdr/all/conandata.yml b/recipes/fast-cdr/all/conandata.yml index 6a9ba77868449..48019c99a1647 100644 --- a/recipes/fast-cdr/all/conandata.yml +++ b/recipes/fast-cdr/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/eProsima/Fast-CDR/archive/v1.1.0.tar.gz" + sha256: "5c4b2ad5493abd30b9475b14856641a8944c98077a36bd0760c1d83c65216e67" "1.0.27": url: "https://github.com/eProsima/Fast-CDR/archive/v1.0.27.tar.gz" sha256: "a9bc8fd31a2c2b95e6d2fb46e6ce1ad733e86dc4442f733479e33ed9cdc54bf6" diff --git a/recipes/fast-cdr/all/conanfile.py b/recipes/fast-cdr/all/conanfile.py index c39c56b44ddc4..29f8a4528ad1d 100644 --- a/recipes/fast-cdr/all/conanfile.py +++ b/recipes/fast-cdr/all/conanfile.py @@ -4,6 +4,7 @@ from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import collect_libs, copy, get, rm, rmdir, save from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.scm import Version import os import textwrap @@ -40,6 +41,10 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") + def build_requirements(self): + if Version(self.version) >= "1.1.0": + self.tool_requires("cmake/[>=3.16.3 <4]") + def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) diff --git a/recipes/fast-cdr/config.yml b/recipes/fast-cdr/config.yml index 3527dfb5e8511..c67335370b9c4 100644 --- a/recipes/fast-cdr/config.yml +++ b/recipes/fast-cdr/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.0": + folder: all "1.0.27": folder: all "1.0.26": From e8f108ac51b7b20595d32f6ea6cb926f6d3a017e Mon Sep 17 00:00:00 2001 From: Holger Detering Date: Sun, 13 Aug 2023 20:04:42 +0200 Subject: [PATCH 194/637] (#19062) aws-checksums: add version 0.1.17 * aws-checksums: add version 0.1.17 * cleanup: remove test_v1_package folder * add patch_type and patch_description * Revert "cleanup: remove test_v1_package folder" This reverts commit f607f6ef718552f3022a949bdf7204e27845a5e7. --- recipes/aws-checksums/all/conandata.yml | 9 +++++++++ recipes/aws-checksums/all/conanfile.py | 6 +++++- recipes/aws-checksums/config.yml | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/recipes/aws-checksums/all/conandata.yml b/recipes/aws-checksums/all/conandata.yml index ddf66e3fcf5ae..989708680b889 100644 --- a/recipes/aws-checksums/all/conandata.yml +++ b/recipes/aws-checksums/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.1.17": + url: "https://github.com/awslabs/aws-checksums/archive/v0.1.17.tar.gz" + sha256: "83c1fbae826631361a529e9565e64a942c412baaec6b705ae5da3f056b97b958" "0.1.13": url: "https://github.com/awslabs/aws-checksums/archive/v0.1.13.tar.gz" sha256: "0f897686f1963253c5069a0e495b85c31635ba146cd3ac38cc2ea31eaf54694d" @@ -14,5 +17,11 @@ sources: patches: "0.1.5": - patch_file: "patches/0001-use-PROJECT_SOURCE_DIR.patch" + patch_description: "use PROJECT_NAME instead of CMAKE_PROJECT_NAME" + patch_type: "conan" - patch_file: "patches/0002-disable-overriding-fPIC.patch" + patch_description: "disable overriding -fPIC" + patch_type: "conan" - patch_file: "patches/0003-disable-building-tests.patch" + patch_description: "build no tests" + patch_type: "conan" diff --git a/recipes/aws-checksums/all/conanfile.py b/recipes/aws-checksums/all/conanfile.py index 80a0c88a8c55b..401b1b679aa04 100644 --- a/recipes/aws-checksums/all/conanfile.py +++ b/recipes/aws-checksums/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rmdir, save +from conan.tools.scm import Version import os import textwrap @@ -45,7 +46,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("aws-c-common/0.8.2") + if Version(self.version) < "0.1.17": + self.requires("aws-c-common/0.8.2") + else: + self.requires("aws-c-common/0.9.0", transitive_headers=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-checksums/config.yml b/recipes/aws-checksums/config.yml index 55fedf4c307f5..efe23bdebe7e1 100644 --- a/recipes/aws-checksums/config.yml +++ b/recipes/aws-checksums/config.yml @@ -1,4 +1,6 @@ versions: + "0.1.17": + folder: all "0.1.13": folder: all "0.1.12": From ff506944bdda4e9bcbb800ba2c8c7f4f86d59b76 Mon Sep 17 00:00:00 2001 From: Holger Detering Date: Sun, 13 Aug 2023 20:14:30 +0200 Subject: [PATCH 195/637] (#19063) aws-c-sdkutils: add version 0.1.12 * aws-c-sdkutils: add version 0.1.12 * cleanup: remove test_v1_package folder * Revert "cleanup: remove test_v1_package folder" This reverts commit f1d5863bea6420124d93603037791f12b34a869c. --- recipes/aws-c-sdkutils/all/conandata.yml | 3 +++ recipes/aws-c-sdkutils/all/conanfile.py | 6 +++++- recipes/aws-c-sdkutils/config.yml | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/recipes/aws-c-sdkutils/all/conandata.yml b/recipes/aws-c-sdkutils/all/conandata.yml index 7ec4906cf9a7f..4f2cc09884562 100644 --- a/recipes/aws-c-sdkutils/all/conandata.yml +++ b/recipes/aws-c-sdkutils/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.1.12": + url: "https://github.com/awslabs/aws-c-sdkutils/archive/v0.1.12.tar.gz" + sha256: "c876c3ce2918f1181c24829f599c8f06e29733f0bd6556d4c4fb523390561316" "0.1.3": url: "https://github.com/awslabs/aws-c-sdkutils/archive/v0.1.3.tar.gz" sha256: "13d99c0877424a8fad40f312762968012dd54ec60a4438fb601ee65ff8b2484b" diff --git a/recipes/aws-c-sdkutils/all/conanfile.py b/recipes/aws-c-sdkutils/all/conanfile.py index f2158c8d10fa8..2312d025b2cb0 100644 --- a/recipes/aws-c-sdkutils/all/conanfile.py +++ b/recipes/aws-c-sdkutils/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import get, copy, rmdir, save +from conan.tools.scm import Version import os import textwrap @@ -39,7 +40,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) + if Version(self.version) <= "0.1.3": + self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) + else: + self.requires("aws-c-common/0.9.0", transitive_headers=True, transitive_libs=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-sdkutils/config.yml b/recipes/aws-c-sdkutils/config.yml index b2ced6f0d7ab7..c2aa05a42982f 100644 --- a/recipes/aws-c-sdkutils/config.yml +++ b/recipes/aws-c-sdkutils/config.yml @@ -1,4 +1,6 @@ versions: + "0.1.12": + folder: all "0.1.3": folder: all "0.1.2": From 6aed7ce0bf02f685291f61d589cff9d801ab14da Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Sun, 13 Aug 2023 20:47:48 +0200 Subject: [PATCH 196/637] (#19067) [rtmidi/6.0.0] Add version * [rtmidi/6.0.0] Add version * Add cmake as build requirement --- recipes/rtmidi/all/conandata.yml | 3 +++ recipes/rtmidi/all/conanfile.py | 6 +++++- recipes/rtmidi/config.yml | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/recipes/rtmidi/all/conandata.yml b/recipes/rtmidi/all/conandata.yml index 53cfe6b111167..4359539b48015 100644 --- a/recipes/rtmidi/all/conandata.yml +++ b/recipes/rtmidi/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "6.0.0": + url: "https://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-6.0.0.tar.gz" + sha256: "3336248e8c1f054ea5e51a4449558490dca51edd324fcde0eea27df33b80a9ed" "5.0.0": url: "https://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-5.0.0.tar.gz" sha256: "48db0ed58c8c0e207b5d7327a0210b5bcaeb50e26387935d02829239b0f3c2b9" diff --git a/recipes/rtmidi/all/conanfile.py b/recipes/rtmidi/all/conanfile.py index a347f4bbefb6f..ab614a8ee05fb 100644 --- a/recipes/rtmidi/all/conanfile.py +++ b/recipes/rtmidi/all/conanfile.py @@ -48,6 +48,9 @@ def requirements(self): if self._with_alsa: self.requires("libalsa/1.2.7.2") + 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) @@ -60,7 +63,8 @@ def generate(self): def _patch_sources(self): apply_conandata_patches(self) - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "${ALSA_LIBRARY}", "ALSA::ALSA") + if Version(self.version) < "6.0.0": + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "${ALSA_LIBRARY}", "ALSA::ALSA") def build(self): self._patch_sources() diff --git a/recipes/rtmidi/config.yml b/recipes/rtmidi/config.yml index 30e9497f54064..f7c2ad14131bc 100644 --- a/recipes/rtmidi/config.yml +++ b/recipes/rtmidi/config.yml @@ -1,4 +1,6 @@ versions: + "6.0.0": + folder: "all" "5.0.0": folder: "all" "4.0.0": From 5454aab8ab0a1af9abaaedf32d8646aa56887319 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 14 Aug 2023 04:08:28 +0900 Subject: [PATCH 197/637] (#19100) blend2d: add version 0.10 --- recipes/blend2d/all/conandata.yml | 7 +++++ .../0.10-0001-disable-embed-asmjit.patch | 27 +++++++++++++++++++ recipes/blend2d/config.yml | 2 ++ 3 files changed, 36 insertions(+) create mode 100644 recipes/blend2d/all/patches/0.10-0001-disable-embed-asmjit.patch diff --git a/recipes/blend2d/all/conandata.yml b/recipes/blend2d/all/conandata.yml index a8918f809e2b0..ddbc54ae6e873 100644 --- a/recipes/blend2d/all/conandata.yml +++ b/recipes/blend2d/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.10": + url: "https://blend2d.com/download/blend2d-0.10.tar.xz" + sha256: "eaed6cc5f1fc33061a99d70cf166836994d952f75762bfacb397ee388e13ccc9" "0.9": url: "https://blend2d.com/download/blend2d-0.9.tar.xz" sha256: "a70a2a57c67017afa1067a11807fef9808788c69b4012ba4d56a5c47a5ba87c3" @@ -12,6 +15,10 @@ sources: url: "https://blend2d.com/download/blend2d-beta17.zip" sha256: "06ee8fb0bea281d09291e498900093139426501a1a7f09dba0ec801dd340635e" patches: + "0.10": + - patch_file: "patches/0.10-0001-disable-embed-asmjit.patch" + patch_description: "use asmjit cci package" + patch_type: "conan" "0.9": - patch_file: "patches/0.9-0001-disable-embed-asmjit.patch" patch_description: "use asmjit cci package" diff --git a/recipes/blend2d/all/patches/0.10-0001-disable-embed-asmjit.patch b/recipes/blend2d/all/patches/0.10-0001-disable-embed-asmjit.patch new file mode 100644 index 0000000000000..29e6457e6c6f5 --- /dev/null +++ b/recipes/blend2d/all/patches/0.10-0001-disable-embed-asmjit.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 02507bc..8fa7dcf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -392,7 +392,7 @@ endif() + + # Find asmjit dependency if building with JIT support. + if (NOT BLEND2D_NO_JIT) +- if (NOT DEFINED ASMJIT_DIR) ++ if (0) + foreach(dir "${BLEND2D_DIR}/3rdparty/asmjit" + "${CMAKE_CURRENT_LIST_DIR}/../asmjit") + if (EXISTS ${dir}/CMakeLists.txt) +@@ -410,10 +410,9 @@ if (NOT BLEND2D_NO_JIT) + endif() + + set(ASMJIT_NO_FOREIGN TRUE) +- include("${ASMJIT_DIR}/CMakeLists.txt") +- list(APPEND BLEND2D_DEPS ${ASMJIT_LIBS}) +- list(APPEND BLEND2D_PRIVATE_CFLAGS ${ASMJIT_CFLAGS}) +- list(APPEND BLEND2D_PRIVATE_CFLAGS -DASMJIT_NO_STDCXX) ++ find_package(asmjit CONFIG REQUIRED) ++ list(APPEND BLEND2D_DEPS asmjit::asmjit) ++ list(APPEND BLEND2D_PRIVATE_CFLAGS ${asmjit_DEFINITIONS_DEBUG}${asmjit_DEFINITIONS_RELEASE}) + + # A possibility to reduce the resulting binary size by disabling asmjit logging. + if (BLEND2D_NO_JIT_LOGGING) diff --git a/recipes/blend2d/config.yml b/recipes/blend2d/config.yml index bf1e95c0dd1d1..447f9c7043b58 100644 --- a/recipes/blend2d/config.yml +++ b/recipes/blend2d/config.yml @@ -1,4 +1,6 @@ versions: + "0.10": + folder: all "0.9": folder: all "0.8": From bba042306f6f59358aec73c96b099b387bc9b2cc Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Sun, 13 Aug 2023 22:50:16 +0300 Subject: [PATCH 198/637] (#19110) [vulkan-loader] Bump version to 1.3.243.0 vulkan-loader and vulkan-headers should be kept in sync otherwise packages that requiere both will have problems. --- recipes/vulkan-loader/all/conandata.yml | 3 +++ recipes/vulkan-loader/all/conanfile.py | 10 +++++++--- recipes/vulkan-loader/config.yml | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/recipes/vulkan-loader/all/conandata.yml b/recipes/vulkan-loader/all/conandata.yml index fceeca688d80b..ad864b56911fd 100644 --- a/recipes/vulkan-loader/all/conandata.yml +++ b/recipes/vulkan-loader/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.243.0": + url: "https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/sdk-1.3.243.0.tar.gz" + sha256: "89a09547be30491ee0a11cd7c883e78a637fb761280d6c6c2174f37188527dc3" "1.3.239.0": url: "https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/sdk-1.3.239.0.tar.gz" sha256: "fa2078408793b2173f174173a8784de56b6bbfbcb5fb958a07e46ef126c7eada" diff --git a/recipes/vulkan-loader/all/conanfile.py b/recipes/vulkan-loader/all/conanfile.py index 7d7adac29c32f..d0c415a0ecae6 100644 --- a/recipes/vulkan-loader/all/conanfile.py +++ b/recipes/vulkan-loader/all/conanfile.py @@ -95,6 +95,8 @@ def build_requirements(self): self.tool_requires("pkgconf/1.9.3") if self._is_mingw: self.tool_requires("jwasm/2.13") + if Version(self.version) >= "1.3.234": + self.tool_requires("cmake/[>=3.17.2 <4.0]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -147,12 +149,14 @@ def _patch_sources(self): replace_in_file(self, cmakelists, "/WX", "") # This fix is needed due to CMAKE_FIND_PACKAGE_PREFER_CONFIG ON in CMakeToolchain (see https://github.com/conan-io/conan/issues/10387). # Indeed we want to use upstream Find modules of xcb, x11, wayland and directfb. There are properly using pkgconfig under the hood. - replace_in_file(self, cmakelists, "find_package(XCB REQUIRED)", "find_package(XCB REQUIRED MODULE)") - replace_in_file(self, cmakelists, "find_package(X11 REQUIRED)", "find_package(X11 REQUIRED MODULE)") + if Version(self.version) < "1.3.234": + replace_in_file(self, cmakelists, "find_package(XCB REQUIRED)", "find_package(XCB REQUIRED MODULE)") + replace_in_file(self, cmakelists, "find_package(X11 REQUIRED)", "find_package(X11 REQUIRED MODULE)") # find_package(Wayland REQUIRED) was removed, as it was unused if Version(self.version) < "1.3.231": replace_in_file(self, cmakelists, "find_package(Wayland REQUIRED)", "find_package(Wayland REQUIRED MODULE)") - replace_in_file(self, cmakelists, "find_package(DirectFB REQUIRED)", "find_package(DirectFB REQUIRED MODULE)") + if Version(self.version) < "1.3.234": + replace_in_file(self, cmakelists, "find_package(DirectFB REQUIRED)", "find_package(DirectFB REQUIRED MODULE)") def build(self): self._patch_sources() diff --git a/recipes/vulkan-loader/config.yml b/recipes/vulkan-loader/config.yml index 493a9fc0ba035..3d8ee9ef8d984 100644 --- a/recipes/vulkan-loader/config.yml +++ b/recipes/vulkan-loader/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.243.0": + folder: all "1.3.239.0": folder: all "1.3.236.0": From a9fb8ebed168897087ac27fa556d4584bf0a39b8 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 13 Aug 2023 22:47:33 +0200 Subject: [PATCH 199/637] (#19115) Add new recipe: libmpdclient/2.20 * add libmpdclient/2.20 * remove share folder * drop msvc shared --- recipes/libmpdclient/all/conandata.yml | 4 + recipes/libmpdclient/all/conanfile.py | 111 ++++++++++++++++++ .../all/test_package/CMakeLists.txt | 7 ++ .../all/test_package/conanfile.py | 26 ++++ .../all/test_package/test_package.c | 25 ++++ .../all/test_v1_package/CMakeLists.txt | 8 ++ .../all/test_v1_package/conanfile.py | 17 +++ recipes/libmpdclient/config.yml | 3 + 8 files changed, 201 insertions(+) create mode 100644 recipes/libmpdclient/all/conandata.yml create mode 100644 recipes/libmpdclient/all/conanfile.py create mode 100644 recipes/libmpdclient/all/test_package/CMakeLists.txt create mode 100644 recipes/libmpdclient/all/test_package/conanfile.py create mode 100644 recipes/libmpdclient/all/test_package/test_package.c create mode 100644 recipes/libmpdclient/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/libmpdclient/all/test_v1_package/conanfile.py create mode 100644 recipes/libmpdclient/config.yml diff --git a/recipes/libmpdclient/all/conandata.yml b/recipes/libmpdclient/all/conandata.yml new file mode 100644 index 0000000000000..254f101651949 --- /dev/null +++ b/recipes/libmpdclient/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.20": + url: "https://www.musicpd.org/download/libmpdclient/2/libmpdclient-2.20.tar.xz" + sha256: "18793f68e939c3301e34d8fcadea1f7daa24143941263cecadb80126194e277d" diff --git a/recipes/libmpdclient/all/conanfile.py b/recipes/libmpdclient/all/conanfile.py new file mode 100644 index 0000000000000..6a838ea6cdaa3 --- /dev/null +++ b/recipes/libmpdclient/all/conanfile.py @@ -0,0 +1,111 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rmdir +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson, MesonToolchain +from conan.tools.microsoft import is_msvc +import os + +required_conan_version = ">=1.53.0" + + +class LibmpdclientConan(ConanFile): + name = "libmpdclient" + description = "libmpdclient is a C library which implements the Music Player Daemon protocol." + license = "BSD-3-Clause" + topics = ("music", "music-player-demon", "sound") + homepage = "https://www.musicpd.org/libs/libmpdclient" + url = "https://github.com/conan-io/conan-center-index" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "default_socket": ["ANY"], + "default_host": ["ANY"], + "default_port": ["ANY"], + "tcp": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "default_socket": "/var/run/mpd/socket", + "default_host": "localhost", + "default_port": "6600", + "tcp": True, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + del self.options.default_socket + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + basic_layout(self, src_folder="src") + + def validate(self): + if is_msvc(self) and self.options.shared: + raise ConanInvalidConfiguration(f"{self.ref} doesn't support build of shared lib with msvc") + + def build_requirements(self): + self.tool_requires("meson/1.2.1") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = MesonToolchain(self) + if self.settings.os != "Windows": + tc.project_options["default_socket"] = str(self.options.default_socket) + tc.project_options["default_host"] = str(self.options.default_host) + tc.project_options["default_port"] = str(self.options.default_port) + tc.project_options["tcp"] = self.options.tcp + tc.project_options["documentation"] = False + tc.project_options["test"] = False + tc.generate() + + def build(self): + meson = Meson(self) + meson.configure() + meson.build() + + def package(self): + copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + meson = Meson(self) + meson.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + fix_apple_shared_install_name(self) + fix_msvc_libname(self) + + def package_info(self): + self.cpp_info.set_property("pkg_config_name", "libmpdclient") + self.cpp_info.libs = ["mpdclient"] + if self.settings.os == "Windows": + self.cpp_info.system_libs.append("ws2_32") + +def fix_msvc_libname(conanfile, remove_lib_prefix=True): + """remove lib prefix & change extension to .lib in case of cl like compiler""" + from conan.tools.files import rename + import glob + if not conanfile.settings.get_safe("compiler.runtime"): + return + libdirs = getattr(conanfile.cpp.package, "libdirs") + for libdir in libdirs: + for ext in [".dll.a", ".dll.lib", ".a"]: + full_folder = os.path.join(conanfile.package_folder, libdir) + for filepath in glob.glob(os.path.join(full_folder, f"*{ext}")): + libname = os.path.basename(filepath)[0:-len(ext)] + if remove_lib_prefix and libname[0:3] == "lib": + libname = libname[3:] + rename(conanfile, filepath, os.path.join(os.path.dirname(filepath), f"{libname}.lib")) diff --git a/recipes/libmpdclient/all/test_package/CMakeLists.txt b/recipes/libmpdclient/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..f00d9cb1c388c --- /dev/null +++ b/recipes/libmpdclient/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(libmpdclient CONFIG REQUIRED) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE libmpdclient::libmpdclient) diff --git a/recipes/libmpdclient/all/test_package/conanfile.py b/recipes/libmpdclient/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/libmpdclient/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libmpdclient/all/test_package/test_package.c b/recipes/libmpdclient/all/test_package/test_package.c new file mode 100644 index 0000000000000..bb53ebecfee6d --- /dev/null +++ b/recipes/libmpdclient/all/test_package/test_package.c @@ -0,0 +1,25 @@ +#include +#include + +#include +#include + +int main() +{ + struct mpd_connection *conn = mpd_connection_new(NULL, 0, 0); + + if (conn == NULL) { + fprintf(stderr, "Out of memory\n"); + return 1; + } + if (mpd_connection_get_error(conn) != MPD_ERROR_SUCCESS) { + fprintf(stderr, "%s\n", mpd_connection_get_error_message(conn)); + mpd_connection_free(conn); + return 0; + } + + mpd_run_next(conn); + mpd_connection_free(conn); + + return 0; +} diff --git a/recipes/libmpdclient/all/test_v1_package/CMakeLists.txt b/recipes/libmpdclient/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..0d20897301b68 --- /dev/null +++ b/recipes/libmpdclient/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/libmpdclient/all/test_v1_package/conanfile.py b/recipes/libmpdclient/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..38f4483872d47 --- /dev/null +++ b/recipes/libmpdclient/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/libmpdclient/config.yml b/recipes/libmpdclient/config.yml new file mode 100644 index 0000000000000..e36906bed874c --- /dev/null +++ b/recipes/libmpdclient/config.yml @@ -0,0 +1,3 @@ +versions: + "2.20": + folder: "all" From 08ae7205365c86fc7e80cd8c9aecebdc49e8643f Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 14 Aug 2023 00:08:34 +0300 Subject: [PATCH 200/637] (#19116) cuda-samples: add new package * cuda-samples: add new package * cuda-samples: use helper_string.h for test, which is available in v10.2. --- recipes/cuda-samples/all/conandata.yml | 10 ++++ recipes/cuda-samples/all/conanfile.py | 51 +++++++++++++++++++ .../all/test_package/CMakeLists.txt | 7 +++ .../all/test_package/conanfile.py | 26 ++++++++++ .../all/test_package/test_package.cpp | 16 ++++++ recipes/cuda-samples/config.yml | 7 +++ 6 files changed, 117 insertions(+) create mode 100644 recipes/cuda-samples/all/conandata.yml create mode 100644 recipes/cuda-samples/all/conanfile.py create mode 100644 recipes/cuda-samples/all/test_package/CMakeLists.txt create mode 100644 recipes/cuda-samples/all/test_package/conanfile.py create mode 100644 recipes/cuda-samples/all/test_package/test_package.cpp create mode 100644 recipes/cuda-samples/config.yml diff --git a/recipes/cuda-samples/all/conandata.yml b/recipes/cuda-samples/all/conandata.yml new file mode 100644 index 0000000000000..0fc2e78f080c8 --- /dev/null +++ b/recipes/cuda-samples/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "12.2": + url: "https://github.com/NVIDIA/cuda-samples/archive/refs/tags/v12.2.tar.gz" + sha256: "c9fbdee420fd4567edb1239420e2a5c93d9652b4ccf3a828fcb3e0de3152e466" + "11.8": + url: "https://github.com/NVIDIA/cuda-samples/archive/refs/tags/v11.8.tar.gz" + sha256: "1bc02c0ca42a323f3c7a05b5682eae703681a91e95b135bfe81f848b2d6a2c51" + "10.2": + url: "https://github.com/NVIDIA/cuda-samples/archive/refs/tags/v10.2.tar.gz" + sha256: "f3d224dcc7028d055617360b481947c27346d87dd1ccfbdd134ab24648c084e8" diff --git a/recipes/cuda-samples/all/conanfile.py b/recipes/cuda-samples/all/conanfile.py new file mode 100644 index 0000000000000..aa2ee3b794d8a --- /dev/null +++ b/recipes/cuda-samples/all/conanfile.py @@ -0,0 +1,51 @@ +import os + +from conan import ConanFile +from conan.tools.files import copy, get, rmdir +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.52.0" + + +class CudaSamplesConan(ConanFile): + name = "cuda-samples" + description = ("Common headers from NVIDIA CUDA Samples - " + "samples for CUDA developers which demonstrate features in CUDA Toolkit") + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/NVIDIA/cuda-samples" + topics = ("cuda", "cuda-kernels", "cuda-driver-api", "cuda-opengl", "nvcudasamples") + + 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 source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + # Package only headers under Common/ folder + rmdir(self, os.path.join(self.source_folder, "Samples")) + rmdir(self, os.path.join(self.source_folder, "bin")) + # Skip GL headers and precompiled libs, since these should be provided by separate Conan packages + rmdir(self, os.path.join(self.source_folder, "Common", "GL")) + rmdir(self, os.path.join(self.source_folder, "Common", "lib")) + rmdir(self, os.path.join(self.source_folder, "Common", "data")) + + def build(self): + pass + + def package(self): + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "*", + dst=os.path.join(self.package_folder, "include", "Common"), + src=os.path.join(self.source_folder, "Common")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.includedirs.append(os.path.join("include", "Common")) diff --git a/recipes/cuda-samples/all/test_package/CMakeLists.txt b/recipes/cuda-samples/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..fc3bd6fda4c9c --- /dev/null +++ b/recipes/cuda-samples/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(cuda-samples REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE cuda-samples::cuda-samples) diff --git a/recipes/cuda-samples/all/test_package/conanfile.py b/recipes/cuda-samples/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/cuda-samples/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/cuda-samples/all/test_package/test_package.cpp b/recipes/cuda-samples/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..041e701c086ac --- /dev/null +++ b/recipes/cuda-samples/all/test_package/test_package.cpp @@ -0,0 +1,16 @@ +#include +#include + +// One of the few non-CUDA-specific headers in the CUDA Samples. +#include "helper_string.h" + + +int main() { + char file[] = "hello_world.jpg"; + char *ext = NULL; + getFileExtension(file, &ext); + + std::cout << "getFileExtension(\"" << file << "\") returned \"" << ext << "\"." << std::endl; + + return EXIT_SUCCESS; +} diff --git a/recipes/cuda-samples/config.yml b/recipes/cuda-samples/config.yml new file mode 100644 index 0000000000000..0cc56090a313f --- /dev/null +++ b/recipes/cuda-samples/config.yml @@ -0,0 +1,7 @@ +versions: + "12.2": + folder: all + "11.8": + folder: all + "10.2": + folder: all From fd48ba967c4a6f90a18b2aa89931c80ecbca06da Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 14 Aug 2023 06:29:06 +0900 Subject: [PATCH 201/637] (#19129) daw_header_libraries: add version 2.95.0, remove older versions --- recipes/daw_header_libraries/all/conandata.yml | 18 +++--------------- recipes/daw_header_libraries/config.yml | 12 ++---------- 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/recipes/daw_header_libraries/all/conandata.yml b/recipes/daw_header_libraries/all/conandata.yml index 29376e7702ee0..76073e7c9033b 100644 --- a/recipes/daw_header_libraries/all/conandata.yml +++ b/recipes/daw_header_libraries/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.95.0": + url: "https://github.com/beached/header_libraries/archive/v2.95.0.tar.gz" + sha256: "8799c06f0587b202fd6049d95e70b04675acbfdbf6e86ac3bbd061cbb9d42b54" "2.93.1": url: "https://github.com/beached/header_libraries/archive/v2.93.1.tar.gz" sha256: "200690094237e4a2c37ac81c23c8c5138ba90ccdeeb2a1dda37690a9d32301ad" @@ -23,18 +26,3 @@ sources: "2.74.2": url: "https://github.com/beached/header_libraries/archive/v2.74.2.tar.gz" sha256: "32871df3d314cc9b4e293a9a8c79968d1c963dfd3dd60965dbf704eb18acb218" - "2.73.1": - url: "https://github.com/beached/header_libraries/archive/v2.73.1.tar.gz" - sha256: "62bd26398afa7eba1aae7bbbf107865044b8be0539d266085c36aed82557ae07" - "2.72.0": - url: "https://github.com/beached/header_libraries/archive/v2.72.0.tar.gz" - sha256: "f681755183af4af35f4741f3bcb7d99c6707911806e39e3acc982f9532aacc08" - "2.71.0": - url: "https://github.com/beached/header_libraries/archive/v2.71.0.tar.gz" - sha256: "50b9ddebdbc808a5714408a45f686fafe9d1d3b78c988df3973c12c9928828b9" - "2.68.3": - url: "https://github.com/beached/header_libraries/archive/v2.68.3.tar.gz" - sha256: "9bb7d25d161b89ad4a0ac857c28734c061cf53f6e80212c7fe70b8e0fd14789f" - "1.29.7": - url: "https://github.com/beached/header_libraries/archive/refs/tags/v1.29.7.tar.gz" - sha256: "524c34f3f5d2af498e7bcaff7802b914ba42acde29f7e3ecce41a035db0bf5bd" diff --git a/recipes/daw_header_libraries/config.yml b/recipes/daw_header_libraries/config.yml index 1983a1c07c015..6a27257347e52 100644 --- a/recipes/daw_header_libraries/config.yml +++ b/recipes/daw_header_libraries/config.yml @@ -1,4 +1,6 @@ versions: + "2.95.0": + folder: all "2.93.1": folder: all "2.92.0": @@ -15,13 +17,3 @@ versions: folder: all "2.74.2": folder: all - "2.73.1": - folder: all - "2.72.0": - folder: all - "2.71.0": - folder: all - "2.68.3": - folder: all - "1.29.7": - folder: all From 8e798f632fbe4f88bc4a489cb7488e09aba21b2e Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 14 Aug 2023 06:49:33 +0900 Subject: [PATCH 202/637] (#19131) capnproto: add version 1.0.0 * capnproto: add version 1.0.0 * add patch descriptions * drop support gcc 5, 6 * link math lib * drop support MSVC Release build --- recipes/capnproto/all/conandata.yml | 80 ++++++-- recipes/capnproto/all/conanfile.py | 12 +- .../0015-disable-tests-for-1.0.0.patch | 176 ++++++++++++++++++ recipes/capnproto/config.yml | 2 + 4 files changed, 249 insertions(+), 21 deletions(-) create mode 100644 recipes/capnproto/all/patches/0015-disable-tests-for-1.0.0.patch diff --git a/recipes/capnproto/all/conandata.yml b/recipes/capnproto/all/conandata.yml index 9becf4a51dc85..64808b6c7cee4 100644 --- a/recipes/capnproto/all/conandata.yml +++ b/recipes/capnproto/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.0": + url: "https://github.com/capnproto/capnproto/archive/v1.0.0.tar.gz" + sha256: "bcd44dde78055313a7786cb6ab020cbef19b9045b53857f90cce101c9453f715" "0.10.4": url: "https://github.com/capnproto/capnproto/archive/v0.10.4.tar.gz" sha256: "c6f25940688c87ddb24e0c4e475c3213d9b044aad2ba305439cc8c224f559da6" @@ -19,28 +22,71 @@ sources: sha256: "6d8b43a7ec2a764b4dfe4139a7cdd070ad9057f106898050d9f4db3754b98820" "0.7.0": url: "https://github.com/capnproto/capnproto/archive/v0.7.0.tar.gz" - sha256: 76c7114a3d142ad08b7208b3964a26e72a6320ee81331d3f0b87569fc9c47a28 + sha256: "76c7114a3d142ad08b7208b3964a26e72a6320ee81331d3f0b87569fc9c47a28" patches: + "1.0.0": + - patch_file: "patches/0015-disable-tests-for-1.0.0.patch" + patch_description: "disable test build" + patch_type: "conan" "0.10.4": - - patch_file: patches/0014-disable-tests-for-0.10.1.patch + - patch_file: "patches/0014-disable-tests-for-0.10.1.patch" + patch_description: "disable test build" + patch_type: "conan" "0.10.3": - - patch_file: patches/0014-disable-tests-for-0.10.1.patch + - patch_file: "patches/0014-disable-tests-for-0.10.1.patch" + patch_description: "disable test build" + patch_type: "conan" "0.10.1": - - patch_file: patches/0014-disable-tests-for-0.10.1.patch + - patch_file: "patches/0014-disable-tests-for-0.10.1.patch" + patch_description: "disable test build" + patch_type: "conan" "0.10.0": - - patch_file: patches/0013-disable-tests-for-0.10.0.patch + - patch_file: "patches/0013-disable-tests-for-0.10.0.patch" + patch_description: "disable test build" + patch_type: "conan" "0.9.1": - - patch_file: patches/0010-disable-tests-for-0.9.1.patch - - patch_file: patches/0011-msvc-cpp17-hassubstring-fix-0.9.1.patch - - patch_file: patches/0012-msvc-nogdi-fix-0.9.1.patch + - patch_file: "patches/0010-disable-tests-for-0.9.1.patch" + patch_description: "disable test build" + patch_type: "conan" + - patch_file: "patches/0011-msvc-cpp17-hassubstring-fix-0.9.1.patch" + patch_description: "fix compilation errors on Windows Clang" + patch_type: "portability" + patch_source: "https://github.com/capnproto/capnproto/pull/1344" + - patch_file: "patches/0012-msvc-nogdi-fix-0.9.1.patch" + patch_description: "fix compilation error on Windows" + patch_type: "portability" + patch_source: "https://github.com/capnproto/capnproto/issues/1421" "0.8.0": - - patch_file: patches/0001-disable-tests.patch - - patch_file: patches/0002-cmake-compat-header-install.patch - - patch_file: patches/0003-kj-tls-windows.patch - - patch_file: patches/0004-cmake-module-path.patch - - patch_file: patches/0005-msvc-16.7-ice-workaround.patch - - patch_file: patches/0009-windows-symlink-fix-0.8.0.patch + - patch_file: "patches/0001-disable-tests.patch" + patch_description: "disable test build" + patch_type: "conan" + - patch_file: "patches/0002-cmake-compat-header-install.patch" + patch_description: "fix compilation error for std::copy with list types" + patch_type: "portability" + patch_source: "https://github.com/capnproto/capnproto/pull/895" + - patch_file: "patches/0003-kj-tls-windows.patch" + patch_description: "add kj-tls target" + patch_type: "portability" + patch_source: "https://github.com/capnproto/capnproto/commit/7da6abf233fdf74a4ad4db56b6e98778b162dd7d" + - patch_file: "patches/0004-cmake-module-path.patch" + patch_description: "append cmake module path instead set" + patch_type: "conan" + - patch_file: "patches/0005-msvc-16.7-ice-workaround.patch" + patch_description: "Workaround for internal compiler error with msvc 16.7.x" + patch_type: "portability" + patch_source: "https://github.com/capnproto/capnproto/pull/1058" + - patch_file: "patches/0009-windows-symlink-fix-0.8.0.patch" + patch_description: "orkaround for install step on Windows where symlinks might be not supported." + patch_type: "portability" + patch_source: "https://github.com/capnproto/capnproto/pull/1240" "0.7.0": - - patch_file: patches/0006-symlink.patch - - patch_file: patches/0007-cmake-module-path.patch - - patch_file: patches/0008-disable-tests.patch + - patch_file: "patches/0006-symlink.patch" + patch_description: "Fix capnpc extension handling on Windows" + patch_type: "portability" + patch_source: "https://github.com/capnproto/capnproto/pull/804" + - patch_file: "patches/0007-cmake-module-path.patch" + patch_description: "append cmake module path instead set" + patch_type: "conan" + - patch_file: "patches/0008-disable-tests.patch" + patch_description: "disable test build" + patch_type: "conan" diff --git a/recipes/capnproto/all/conanfile.py b/recipes/capnproto/all/conanfile.py index f101073a53368..72462e3198e71 100644 --- a/recipes/capnproto/all/conanfile.py +++ b/recipes/capnproto/all/conanfile.py @@ -47,7 +47,7 @@ def _minimum_compilers_version(self): return { "Visual Studio": "15", "msvc": "191", - "gcc": "5", + "gcc": "5" if Version(self.version) < "1.0.0" else "7", "clang": "5", "apple-clang": "5.1", } @@ -93,6 +93,10 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} doesn't support shared libraries for Visual Studio") if self.settings.os == "Windows" and Version(self.version) < "0.8.0" and self.options.with_openssl: raise ConanInvalidConfiguration(f"{self.ref} doesn't support OpenSSL on Windows pre 0.8.0") + # MSVC Release build is not supported in 1.0.0 + # https://github.com/capnproto/capnproto/issues/1740 + if Version(self.version) == "1.0.0" and is_msvc(self) and self.settings.build_type == "Release": + raise ConanInvalidConfiguration(f"{self.ref} doesn't support MSVC Release build") def build_requirements(self): if self.settings.os != "Windows": @@ -218,9 +222,9 @@ def package_info(self): self._register_component(component) if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["capnpc"].system_libs = ["pthread"] - self.cpp_info.components["kj"].system_libs = ["pthread"] - self.cpp_info.components["kj-async"].system_libs = ["pthread"] + self.cpp_info.components["capnpc"].system_libs = ["pthread", "m"] + self.cpp_info.components["kj"].system_libs = ["pthread", "m"] + self.cpp_info.components["kj-async"].system_libs = ["pthread", "m"] elif self.settings.os == "Windows": self.cpp_info.components["kj-async"].system_libs = ["ws2_32"] diff --git a/recipes/capnproto/all/patches/0015-disable-tests-for-1.0.0.patch b/recipes/capnproto/all/patches/0015-disable-tests-for-1.0.0.patch new file mode 100644 index 0000000000000..38c9dd1ee414b --- /dev/null +++ b/recipes/capnproto/all/patches/0015-disable-tests-for-1.0.0.patch @@ -0,0 +1,176 @@ +diff --git a/c++/Makefile.am b/c++/Makefile.am +index 1567491..95ebc4a 100644 +--- a/c++/Makefile.am ++++ b/c++/Makefile.am +@@ -457,171 +457,4 @@ endif LITE_MODE + # src/capnp/benchmark/... + # src/capnp/compiler/... + +-# Tests ============================================================== +- +-test_capnpc_inputs = \ +- src/capnp/test.capnp \ +- src/capnp/test-import.capnp \ +- src/capnp/test-import2.capnp \ +- src/capnp/compat/json-test.capnp +- +-test_capnpc_outputs = \ +- src/capnp/test.capnp.c++ \ +- src/capnp/test.capnp.h \ +- src/capnp/test-import.capnp.c++ \ +- src/capnp/test-import.capnp.h \ +- src/capnp/test-import2.capnp.c++ \ +- src/capnp/test-import2.capnp.h \ +- src/capnp/compat/json-test.capnp.c++ \ +- src/capnp/compat/json-test.capnp.h +- +-if USE_EXTERNAL_CAPNP +- +-test_capnpc_middleman: $(test_capnpc_inputs) +- @$(MKDIR_P) src +- $(CAPNP) compile --src-prefix=$(srcdir)/src -o$(CAPNPC_CXX):src -I$(srcdir)/src $$(for FILE in $(test_capnpc_inputs); do echo $(srcdir)/$$FILE; done) +- touch test_capnpc_middleman + +-else +- +-test_capnpc_middleman: capnp$(EXEEXT) capnpc-c++$(EXEEXT) $(test_capnpc_inputs) +- @$(MKDIR_P) src +- ./capnp$(EXEEXT) compile --src-prefix=$(srcdir)/src -o./capnpc-c++$(EXEEXT):src -I$(srcdir)/src $$(for FILE in $(test_capnpc_inputs); do echo $(srcdir)/$$FILE; done) +- touch test_capnpc_middleman +- +-endif +- +-$(test_capnpc_outputs): test_capnpc_middleman +- +-BUILT_SOURCES = $(test_capnpc_outputs) +- +-check_LIBRARIES = libcapnp-test.a +-libcapnp_test_a_SOURCES = \ +- src/capnp/test-util.c++ \ +- src/capnp/test-util.h +-nodist_libcapnp_test_a_SOURCES = $(test_capnpc_outputs) +- +-if LITE_MODE +- +-check_PROGRAMS = capnp-test +-compiler_tests = +-capnp_test_LDADD = libcapnp-test.a libcapnp.la libkj-test.la libkj.la +- +-else !LITE_MODE +- +-check_PROGRAMS = capnp-test capnp-evolution-test capnp-afl-testcase +-if HAS_FUZZING_ENGINE +- check_PROGRAMS += capnp-llvm-fuzzer-testcase +-endif +-heavy_tests = \ +- src/kj/async-test.c++ \ +- src/kj/async-xthread-test.c++ \ +- src/kj/async-coroutine-test.c++ \ +- src/kj/async-unix-test.c++ \ +- src/kj/async-unix-xthread-test.c++ \ +- src/kj/async-win32-test.c++ \ +- src/kj/async-win32-xthread-test.c++ \ +- src/kj/async-io-test.c++ \ +- src/kj/async-queue-test.c++ \ +- src/kj/parse/common-test.c++ \ +- src/kj/parse/char-test.c++ \ +- src/kj/std/iostream-test.c++ \ +- src/kj/compat/url-test.c++ \ +- src/kj/compat/http-test.c++ \ +- $(MAYBE_KJ_GZIP_TESTS) \ +- $(MAYBE_KJ_TLS_TESTS) \ +- src/capnp/canonicalize-test.c++ \ +- src/capnp/capability-test.c++ \ +- src/capnp/membrane-test.c++ \ +- src/capnp/schema-test.c++ \ +- src/capnp/schema-loader-test.c++ \ +- src/capnp/schema-parser-test.c++ \ +- src/capnp/dynamic-test.c++ \ +- src/capnp/stringify-test.c++ \ +- src/capnp/serialize-async-test.c++ \ +- src/capnp/serialize-text-test.c++ \ +- src/capnp/rpc-test.c++ \ +- src/capnp/rpc-twoparty-test.c++ \ +- src/capnp/ez-rpc-test.c++ \ +- src/capnp/compat/json-test.c++ \ +- src/capnp/compat/websocket-rpc-test.c++ \ +- src/capnp/compiler/lexer-test.c++ \ +- src/capnp/compiler/type-id-test.c++ +-capnp_test_LDADD = \ +- libcapnp-test.a \ +- libcapnpc.la \ +- libcapnp-rpc.la \ +- libcapnp-websocket.la \ +- libcapnp-json.la \ +- libcapnp.la \ +- libkj-http.la \ +- $(MAYBE_KJ_GZIP_LA) \ +- $(MAYBE_KJ_TLS_LA) \ +- libkj-async.la \ +- libkj-test.la \ +- libkj.la \ +- $(ASYNC_LIBS) \ +- $(PTHREAD_LIBS) +- +-endif !LITE_MODE +- +-capnp_test_CPPFLAGS = -Wno-deprecated-declarations +-capnp_test_SOURCES = \ +- src/kj/common-test.c++ \ +- src/kj/memory-test.c++ \ +- src/kj/refcount-test.c++ \ +- src/kj/array-test.c++ \ +- src/kj/list-test.c++ \ +- src/kj/string-test.c++ \ +- src/kj/string-tree-test.c++ \ +- src/kj/table-test.c++ \ +- src/kj/map-test.c++ \ +- src/kj/encoding-test.c++ \ +- src/kj/exception-test.c++ \ +- src/kj/debug-test.c++ \ +- src/kj/arena-test.c++ \ +- src/kj/units-test.c++ \ +- src/kj/tuple-test.c++ \ +- src/kj/one-of-test.c++ \ +- src/kj/function-test.c++ \ +- src/kj/io-test.c++ \ +- src/kj/mutex-test.c++ \ +- src/kj/time-test.c++ \ +- src/kj/threadlocal-test.c++ \ +- src/kj/filesystem-test.c++ \ +- src/kj/filesystem-disk-test.c++ \ +- src/kj/test-test.c++ \ +- src/capnp/common-test.c++ \ +- src/capnp/blob-test.c++ \ +- src/capnp/endian-test.c++ \ +- src/capnp/endian-fallback-test.c++ \ +- src/capnp/endian-reverse-test.c++ \ +- src/capnp/layout-test.c++ \ +- src/capnp/any-test.c++ \ +- src/capnp/message-test.c++ \ +- src/capnp/encoding-test.c++ \ +- src/capnp/orphan-test.c++ \ +- src/capnp/serialize-test.c++ \ +- src/capnp/serialize-packed-test.c++ \ +- src/capnp/fuzz-test.c++ \ +- $(heavy_tests) +- +-if !LITE_MODE +-capnp_evolution_test_LDADD = libcapnpc.la libcapnp.la libkj.la +-capnp_evolution_test_SOURCES = src/capnp/compiler/evolution-test.c++ +- +-capnp_afl_testcase_LDADD = libcapnp-test.a libcapnp-rpc.la libcapnp.la libkj.la libkj-async.la +-capnp_afl_testcase_SOURCES = src/capnp/afl-testcase.c++ +- +-if HAS_FUZZING_ENGINE +- capnp_llvm_fuzzer_testcase_LDADD = libcapnp-test.a libcapnp-rpc.la libcapnp.la libkj.la libkj-async.la +- capnp_llvm_fuzzer_testcase_SOURCES = src/capnp/llvm-fuzzer-testcase.c++ +- capnp_llvm_fuzzer_testcase_LDFLAGS = $(LIB_FUZZING_ENGINE) +-endif +-endif !LITE_MODE +- +-if LITE_MODE +-TESTS = capnp-test +-else !LITE_MODE +-TESTS = capnp-test capnp-evolution-test src/capnp/compiler/capnp-test.sh +-endif !LITE_MODE diff --git a/recipes/capnproto/config.yml b/recipes/capnproto/config.yml index 884c84c332e24..fe4f6cbbb70b3 100644 --- a/recipes/capnproto/config.yml +++ b/recipes/capnproto/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.0": + folder: all "0.10.4": folder: all "0.10.3": From e9cb930aba4ff34985ba0193fb8f690e0d4d4455 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Mon, 14 Aug 2023 00:28:07 +0200 Subject: [PATCH 203/637] (#19140) [bandit] Add transitive headers for snowhouse * [bandit] Add transitive headers for snowhouse * Fix linters issues --- recipes/bandit/all/conanfile.py | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/recipes/bandit/all/conanfile.py b/recipes/bandit/all/conanfile.py index 31fd2c6978fa4..5bc2e2513915d 100644 --- a/recipes/bandit/all/conanfile.py +++ b/recipes/bandit/all/conanfile.py @@ -1,39 +1,41 @@ from conan import ConanFile -from conan.tools.files import apply_conandata_patches, copy, get +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get from conan.tools.layout import basic_layout import os -required_conan_version = ">=1.51.3" +required_conan_version = ">=1.52.0" class BanditConan(ConanFile): name = "bandit" description = "Human-friendly unit testing for C++11" - topics = ("testing", "header-only") + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/banditcpp/bandit" - license = "MIT" + topics = ("testing", "header-only") + package_type = "header-library" def export_sources(self): - for p in self.conan_data.get("patches", {}).get(self.version, []): - copy(self, p["patch_file"], self.recipe_folder, self.export_sources_folder) + export_conandata_patches(self) def requirements(self): - self.requires("snowhouse/5.0.0") + self.requires("snowhouse/5.0.0", transitive_headers=True) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def layout(self): - basic_layout(self) + basic_layout(self, src_folder="src") def build(self): apply_conandata_patches(self) def package(self): copy(self, "LICENSE.txt", src=os.path.join(self.source_folder, "docs"), dst=os.path.join(self.package_folder, "licenses")) - copy(self, pattern="*", dst=os.path.join(self.package_folder, "include", "bandit"), src=os.path.join(self.source_folder, "bandit")) + copy(self, + pattern="*.h", + dst=os.path.join(self.package_folder, "include", "bandit"), + src=os.path.join(self.source_folder, "bandit")) def package_id(self): self.info.clear() @@ -43,4 +45,3 @@ def package_info(self): self.cpp_info.frameworkdirs = [] self.cpp_info.libdirs = [] self.cpp_info.resdirs = [] - From ac67b6e2e37fd8df29a66b8534793836bd62336a Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 14 Aug 2023 07:49:13 +0900 Subject: [PATCH 204/637] (#19144) bzip3: add version 1.3.2, remove older versions * bzip3: add version 1.3.2, remove older versions * remove unused import --- recipes/bzip3/all/conandata.yml | 30 +++--------------------------- recipes/bzip3/all/conanfile.py | 4 +--- recipes/bzip3/config.yml | 10 ++-------- 3 files changed, 6 insertions(+), 38 deletions(-) diff --git a/recipes/bzip3/all/conandata.yml b/recipes/bzip3/all/conandata.yml index 0de00365a28f1..e5219a4ddad45 100644 --- a/recipes/bzip3/all/conandata.yml +++ b/recipes/bzip3/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.2": + url: "https://github.com/kspalaiologos/bzip3/releases/download/1.3.2/bzip3-1.3.2.tar.xz" + sha256: "b1d04b8b1b89a3c490cf2b89ea8cee1281584b07f25276fcfd8d40ec2c488e94" "1.3.1": url: "https://github.com/kspalaiologos/bzip3/releases/download/1.3.1/bzip3-1.3.1.tar.xz" sha256: "b023c261307ff4e0e64935ea32bba0216377fd8fc2fd19ba86509a32cbb8a35a" @@ -20,30 +23,3 @@ sources: "1.1.8": url: "https://github.com/kspalaiologos/bzip3/releases/download/1.1.8/bzip3-1.1.8.tar.bz2" sha256: "bc15d0e4599aad18d9ed71ee0f7e859af89051bf5105b0751e8ca3a26117567d" - "1.1.7": - url: "https://github.com/kspalaiologos/bzip3/releases/download/1.1.7/bzip3-1.1.7.tar.bz2" - sha256: "1f74768dd1a76c45417f84779cc04d8d8b1f595ac564a2ea2aeb0248defca803" - "1.1.6": - url: "https://github.com/kspalaiologos/bzip3/releases/download/1.1.6/bzip3-1.1.6.tar.bz2" - sha256: "2bfd35dd57ab80b35b25e3ad628e0ff8f1f5e6dea02a8d472914823ea2e07e96" - "1.1.5": - url: "https://github.com/kspalaiologos/bzip3/releases/download/1.1.5/bzip3-1.1.5.tar.bz2" - sha256: "2f5012b0004b6c23d5f606deed9191fdce44849234edbcf26e0316bf7856d114" - "1.1.4": - url: "https://github.com/kspalaiologos/bzip3/releases/download/1.1.4/bzip3-1.1.4.tar.bz2" - sha256: "e23a06ae17fc36192e79d0151950b3bbd4e26381af50ba4b4fd7a2d9797e498f" -patches: - "1.1.5": - - patch_file: "patches/1.1.5-0002-export-symbols.patch" - patch_description: "fix hidden public symbols on shard build" - patch_type: "portability" - patch_source: "https://github.com/kspalaiologos/bzip3/issues/46" - "1.1.4": - - patch_file: "patches/1.1.4-0001-make-restrict-alias.patch" - patch_description: "make restrict alias" - patch_type: "portability" - patch_source: "https://github.com/kspalaiologos/bzip3/commit/c5bba99d1a655a177eef9aeb71207326929c66d9" - - patch_file: "patches/1.1.4-0002-export-symbols.patch" - patch_description: "fix hidden public symbols on shard build" - patch_type: "portability" - patch_source: "https://github.com/kspalaiologos/bzip3/issues/46" diff --git a/recipes/bzip3/all/conanfile.py b/recipes/bzip3/all/conanfile.py index 484c139e122f3..2102c952e4cf1 100644 --- a/recipes/bzip3/all/conanfile.py +++ b/recipes/bzip3/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import export_conandata_patches, apply_conandata_patches, copy, get +from conan.tools.files import copy, get import os required_conan_version = ">=1.53.0" @@ -30,7 +30,6 @@ class BZip3Conan(ConanFile): def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) - export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -62,7 +61,6 @@ def generate(self): tc.generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) cmake.build() diff --git a/recipes/bzip3/config.yml b/recipes/bzip3/config.yml index 014fd9d903968..b6e0a161eb7bf 100644 --- a/recipes/bzip3/config.yml +++ b/recipes/bzip3/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.2": + folder: all "1.3.1": folder: all "1.3.0": @@ -13,11 +15,3 @@ versions: folder: all "1.1.8": folder: all - "1.1.7": - folder: all - "1.1.6": - folder: all - "1.1.5": - folder: all - "1.1.4": - folder: all From 01752343eeb196ed114bb3acc6588fa4a70a8e48 Mon Sep 17 00:00:00 2001 From: igormironchik Date: Mon, 14 Aug 2023 11:08:26 +0300 Subject: [PATCH 205/637] (#19183) args-parser: bump version --- recipes/args-parser/all/conandata.yml | 3 +++ recipes/args-parser/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/args-parser/all/conandata.yml b/recipes/args-parser/all/conandata.yml index 787c510a62b53..427c4c05d81dd 100644 --- a/recipes/args-parser/all/conandata.yml +++ b/recipes/args-parser/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "6.3.3": + url: "https://github.com/igormironchik/args-parser/archive/refs/tags/6.3.3.tar.gz" + sha256: "67867d7ab624a8c2f391230c54c37830e6127f7f5c716ff634165f674d876b64" "6.3.2": url: "https://github.com/igormironchik/args-parser/archive/refs/tags/6.3.2.tar.gz" sha256: "cd89549a9f5b5cfd16db2f8b9c93fd164cea334147c58890d5322365789e05e5" diff --git a/recipes/args-parser/config.yml b/recipes/args-parser/config.yml index 08a70490fa0ab..b67bad0e21e0f 100644 --- a/recipes/args-parser/config.yml +++ b/recipes/args-parser/config.yml @@ -1,4 +1,6 @@ versions: + "6.3.3": + folder: all "6.3.2": folder: all "6.3.1": From 07b8de14d66d6acac4b09bae08e95f5aa4ebbbae Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 14 Aug 2023 10:59:36 +0200 Subject: [PATCH 206/637] Add new Conan v2-ready references (#19184) --- .c3i/conan_v2_ready_references.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 2158d3f771f43..f8823a111ab28 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -41,6 +41,7 @@ required_for_references: - asio - asio-grpc - asmjit +- assimp - astc-codec - astro-informatics-so3 - async_simple @@ -70,6 +71,7 @@ required_for_references: - backward-cpp - bacnet-stack - baical-p7 +- bandit - base64 - bazel - bdwgc @@ -205,6 +207,7 @@ required_for_references: - cubicinterpolation - cuda-api-wrappers - cuda-kat +- cuda-samples - cunit - cute_headers - cvplot @@ -230,6 +233,7 @@ required_for_references: - dice-template-library - dirent - discount +- djinni-generator - dlpack - docopt.cpp - doctest @@ -242,6 +246,7 @@ required_for_references: - drmp3 - drogon - drwav +- dtl - duckdb - eabase - earcut @@ -267,6 +272,7 @@ required_for_references: - enum-flags - erikzenker-hsm - erkir +- etc2comp - eternal - etl - exiv2 @@ -307,6 +313,7 @@ required_for_references: - foxglove-schemas-protobuf - foxi - fp16 +- fpzip - freeglut - freeimage - freetype @@ -317,6 +324,7 @@ required_for_references: - ftxui - function2 - functionalplus +- fusepp - fxdiv - g3log - gainput @@ -389,6 +397,7 @@ required_for_references: - heatshrink - hedley - hffix +- hictk - hidapi - highfive - highs @@ -399,6 +408,7 @@ required_for_references: - hlslpp - homog2d - http_parser +- hunspell - hwloc - icecream-cpp - icu @@ -410,6 +420,7 @@ required_for_references: - imgui - imguizmo - implot +- imutils-cpp - incbin - indicators - indirect_value @@ -544,6 +555,7 @@ required_for_references: - libmorton - libmount - libmp3lame +- libmpdclient - libmysqlclient - libnabo - libnet @@ -569,6 +581,7 @@ required_for_references: - librealsense - libressl - librttopo +- libsafec - libsamplerate - libschrift - libsecret @@ -711,6 +724,7 @@ required_for_references: - mppp - ms-gsl - msdf-atlas-gen +- msdfgen - msgpack-c - msgpack-cxx - msys2 @@ -736,6 +750,7 @@ required_for_references: - nlohmann_json - nlopt - nmea +- nmslib - nng - nodejs - norm @@ -774,6 +789,7 @@ required_for_references: - openddl-parser - openexr - openfbx +- openfst - openfx - opengl - opengl-registry @@ -859,6 +875,7 @@ required_for_references: - pthreads4w - pugixml - pulseaudio +- pupnp - pybind11 - pybind11_json - pystring @@ -909,6 +926,7 @@ required_for_references: - rtmidi - rttr - ruy +- rvo2 - rxcpp - s2n - safeint @@ -1048,6 +1066,7 @@ required_for_references: - upx - uriparser - usockets +- usrsctp - utf8proc - utfcpp - util-linux-libuuid From b9ae7dabcc2a39779feaa0ec7f0fae0cd4b1b8b1 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 14 Aug 2023 11:23:19 +0200 Subject: [PATCH 207/637] (#19176) [bot] Update list of references (prod-v2/ListPackages) From c36b516eab85b345af0180743eecd8ec75b23db6 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 14 Aug 2023 20:30:26 +0900 Subject: [PATCH 208/637] (#19169) fmt: add version 10.1.0 --- recipes/fmt/all/conandata.yml | 3 +++ recipes/fmt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/fmt/all/conandata.yml b/recipes/fmt/all/conandata.yml index 2125f36949279..0ab235a8e96fa 100644 --- a/recipes/fmt/all/conandata.yml +++ b/recipes/fmt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "10.1.0": + url: "https://github.com/fmtlib/fmt/releases/download/10.1.0/fmt-10.1.0.zip" + sha256: "d725fa83a8b57a3cedf238828fa6b167f963041e8f9f7327649bddc68ae316f4" "10.0.0": url: "https://github.com/fmtlib/fmt/releases/download/10.0.0/fmt-10.0.0.zip" sha256: "4943cb165f3f587f26da834d3056ee8733c397e024145ca7d2a8a96bb71ac281" diff --git a/recipes/fmt/config.yml b/recipes/fmt/config.yml index 44e12e4e3ddc7..94b218a304025 100644 --- a/recipes/fmt/config.yml +++ b/recipes/fmt/config.yml @@ -1,4 +1,6 @@ versions: + "10.1.0": + folder: all "10.0.0": folder: all "9.1.0": From 27b1d23c14ad209a03aa6f52b69d80e7b251ecff Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Mon, 14 Aug 2023 14:54:39 +0200 Subject: [PATCH 209/637] osgearth/all: bump deps (#18500) * osgearth/all: bump deps * fix linter error * override libpng version * remove openssl override * bump libcurl --------- Co-authored-by: Carlos Zoido --- recipes/osgearth/all/conanfile.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/recipes/osgearth/all/conanfile.py b/recipes/osgearth/all/conanfile.py index 5e59c1a6652d9..611835c64bf48 100644 --- a/recipes/osgearth/all/conanfile.py +++ b/recipes/osgearth/all/conanfile.py @@ -105,13 +105,13 @@ def requirements(self): self.requires("opengl/system") self.requires("gdal/3.4.3") self.requires("openscenegraph/3.6.5") - self.requires("libcurl/7.83.1") + self.requires("libcurl/8.2.0") self.requires("lerc/2.2") self.requires("rapidjson/1.1.0") - self.requires("zlib/1.2.12", override=True) - self.requires("libtiff/4.3.0", override=True) - self.requires("openssl/1.1.1l", override=True) + self.requires("zlib/1.2.13") # override + self.requires("libtiff/4.5.1") # override + self.requires("libpng/1.6.40") # override # if self.options.build_triton_nodekit: # self.requires("triton_nodekit") @@ -122,11 +122,11 @@ def requirements(self): if self.options.build_rocksdb_cache: self.requires("rocksdb/6.20.3") if self.options.build_zip_plugin: - self.requires("zstd/1.4.9") # override + self.requires("zstd/1.5.5") # override if self.options.with_geos: - self.requires("geos/3.10.2") + self.requires("geos/3.11.1") if self.options.with_sqlite3: - self.requires("sqlite3/3.38.5") + self.requires("sqlite3/3.42.0") if self.options.with_draco: self.requires("draco/1.4.3") # if self.options.with_basisu: @@ -134,9 +134,9 @@ def requirements(self): # if self.options.with_glew: # self.requires("glew/2.2.0") if self.options.with_protobuf: - self.requires("protobuf/3.17.1") + self.requires("protobuf/3.21.9") if self.options.with_webp: - self.requires("libwebp/1.2.0") + self.requires("libwebp/1.3.1") def _patch_sources(self): for patch in self.conan_data.get("patches", {}).get(self.version, []): From 8ea2f3a855477a90b8519354e34c93b97bab39af Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Mon, 14 Aug 2023 06:06:56 -0700 Subject: [PATCH 210/637] Fix link to CLA (#19007) --- CONTRIBUTING.md | 2 +- docs/CONTRIBUTOR_LICENSE_AGREEMENT.md | 23 ----------------------- docs/adding_packages/README.md | 2 +- docs/review_process.md | 2 +- 4 files changed, 3 insertions(+), 26 deletions(-) delete mode 100644 docs/CONTRIBUTOR_LICENSE_AGREEMENT.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e3e7f52de2da8..6e24832e93e98 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,7 +23,7 @@ To contribute follow the next steps: 1. Comment in the corresponding issue that you want to contribute the package/fix proposed. If there is no open issue, we strongly suggest opening one to gather feedback. -2. Make sure to [request access](docs/adding_packages/README.md#request-access) and be aware there is a [CLA](docs/CONTRIBUTOR_LICENSE_AGREEMENT.md). +2. Make sure to [request access](docs/adding_packages/README.md#request-access) and be aware there is a [contributor licenses agreement](https://cla-assistant.io/conan-io/conan-center-index). 3. Get setup by following the [Developing Recipes](docs/developing_recipes_locally.md) guide and learn the basic commands. 4. Check the [How To Add Packages](docs/adding_packages/README.md) page for the break down of ConanCenterIndex specific conventions and practices. 5. In your fork create a `package/xxx` branch from the `master` branch and develop diff --git a/docs/CONTRIBUTOR_LICENSE_AGREEMENT.md b/docs/CONTRIBUTOR_LICENSE_AGREEMENT.md deleted file mode 100644 index 39acf20a7aebd..0000000000000 --- a/docs/CONTRIBUTOR_LICENSE_AGREEMENT.md +++ /dev/null @@ -1,23 +0,0 @@ -Conan-Center-Index project Contributor License Agreement --------------------------------------------------------- - -The following terms are used throughout this agreement: - -- You - the person or legal entity including its affiliates asked to accept this agreement. An affiliate is any entity that controls or is controlled by the legal entity, or is under common control with it. -- Contribution - any type of work that is submitted to the repository, including any modifications or additions to existing work. -- Project - Conan-Center-Index project (https://github.com/conan-io/conan-center-index) -- Submitted - conveyed to a Project via a pull request, commit, issue, or any form of electronic, written, or verbal communication with the copyright owner, contributors or maintainers. - -1. Grant of Copyright License. - - Subject to the terms and conditions of this agreement, You grant to JFrog LTD, a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute your contributions and such derivative works. - -2. Grant of Patent License. - - Subject to the terms and conditions of this agreement, You grant to JFrog LTD, a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer your contributions, where such license applies only to those patent claims licensable by you that are necessarily infringed by your contribution or by combination of your contribution with the project to which this contribution was submitted. - - If any entity institutes patent litigation - including cross-claim or counterclaim in a lawsuit - against You alleging that your contribution or any project it was submitted to constitutes or is responsible for direct or contributory patent infringement, then any patent licenses granted to that entity under this agreement shall terminate as of the date such litigation is filed. - -3. Source of Contribution. - - Your contribution is either your original creation, based upon previous work that, to the best of your knowledge, is covered under an appropriate open source license and you have the right under that license to submit that work with modifications, whether created in whole or in part by you, or you have clearly identified the source of the contribution and any license or other restriction (like related patents, trademarks, and license agreements) of which you are personally aware. diff --git a/docs/adding_packages/README.md b/docs/adding_packages/README.md index 3f310562fdf6a..409f61c38fc0e 100644 --- a/docs/adding_packages/README.md +++ b/docs/adding_packages/README.md @@ -30,7 +30,7 @@ generally approved on a weekly basis. Feel free to continue to step :two: while > All interactions are subject to the expectations of the [code of conduct](../code_of_conduct.md). Any misuse or inappropriate behavior > are subject to the same principals. -When submitting a pull request for the first time, you will be prompted to sign the [CLA](../CONTRIBUTOR_LICENSE_AGREEMENT.md) for your +When submitting a pull request for the first time, you will be prompted to sign the [CLA](https://cla-assistant.io/conan-io/conan-center-index) for your code contributions. You can view your signed CLA's by going to and signing in. ## Inactivity and user removal diff --git a/docs/review_process.md b/docs/review_process.md index 55eadf1bd0738..cf9d98f130d9b 100644 --- a/docs/review_process.md +++ b/docs/review_process.md @@ -101,7 +101,7 @@ The bot runs Automatic Merges every 20 minutes. Currently, it can only merge a s PR is selected for the merge only if: - Author is already [approved](https://github.com/conan-io/conan-center-index/issues/4). -- Author has signed the [CLA](CONTRIBUTOR_LICENSE_AGREEMENT.md). +- Author has signed the [CLA](https://cla-assistant.io/conan-io/conan-center-index). - PR is not a Draft. - PR has a green status (successful build). - PR doesn't have merge conflicts with `master` branch. From b1ee96c53a09de3126ac5fc422b820e8bc0eb0b6 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 14 Aug 2023 23:26:45 +0900 Subject: [PATCH 211/637] (#18598) fakeit: make bindirs and libdirs empty, update dependencies --- recipes/fakeit/all/conanfile.py | 28 +++++++++---------- .../fakeit/all/test_package/CMakeLists.txt | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/recipes/fakeit/all/conanfile.py b/recipes/fakeit/all/conanfile.py index 821c0ce34e387..790c00d882ca3 100644 --- a/recipes/fakeit/all/conanfile.py +++ b/recipes/fakeit/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy +from conan.tools.files import get, copy from conan.tools.layout import basic_layout import os @@ -11,35 +11,34 @@ class FakeItConan(ConanFile): name = "fakeit" description = "C++ mocking made easy. A simple yet very expressive, headers only library for c++ mocking." - topics = ("mock", "fake", "spy") license = "MIT" - homepage = "https://github.com/eranpeer/FakeIt" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/eranpeer/FakeIt" + topics = ("mock", "fake", "spy", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" options = { - "integration": ["boost", "catch", "cute", "gtest", "mettle", "nunit", "mstest", "qtest", "standalone", "tpunit"] + "integration": ["boost", "catch", "cute", "gtest", "mettle", "nunit", "mstest", "qtest", "standalone", "tpunit"], + } + default_options = { + "integration": "standalone", } - default_options = {"integration": "standalone"} no_copy_source = True @property def _min_cppstd(self): return 11 - def export_sources(self): - export_conandata_patches(self) - def layout(self): basic_layout(self, src_folder="src") def requirements(self): if self.options.integration == "boost": - self.requires("boost/1.79.0") + self.requires("boost/1.82.0") elif self.options.integration == "catch": - self.requires("catch2/2.13.9") + self.requires("catch2/3.4.0") elif self.options.integration == "gtest": - self.requires("gtest/1.11.0") + self.requires("gtest/1.13.0") elif self.options.integration == "qtest": self.requires("qt/6.3.0") elif self.options.integration == "standalone": @@ -60,9 +59,6 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - apply_conandata_patches(self) - def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy( @@ -71,3 +67,7 @@ def package(self): dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "single_header", str(self.options.integration)), ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/fakeit/all/test_package/CMakeLists.txt b/recipes/fakeit/all/test_package/CMakeLists.txt index bc2658ff1b34e..6beebe71b3c83 100644 --- a/recipes/fakeit/all/test_package/CMakeLists.txt +++ b/recipes/fakeit/all/test_package/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.8) -project(test_package CXX) +project(test_package LANGUAGES CXX) find_package(fakeit REQUIRED CONFIG) From 058d67c5cd5428af095d97b65ca4fbefbbeaeb8e Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 15 Aug 2023 00:12:56 +0900 Subject: [PATCH 212/637] (#19188) quill: update fmt/10.1.0 --- recipes/quill/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/quill/all/conanfile.py b/recipes/quill/all/conanfile.py index 8de97161e3619..ef58c5e9a36f9 100644 --- a/recipes/quill/all/conanfile.py +++ b/recipes/quill/all/conanfile.py @@ -69,7 +69,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("fmt/10.0.0", transitive_headers=True) + self.requires("fmt/10.1.0", transitive_headers=True) def validate(self): supported_archs = ["x86", "x86_64", "armv6", "armv7", "armv7hf", "armv8"] From b5f7e8c2b80bf22fc849d4f34b917cc8d68fcd55 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Mon, 14 Aug 2023 18:29:34 +0200 Subject: [PATCH 213/637] (#19162) date: update libcurl --- recipes/date/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/date/all/conanfile.py b/recipes/date/all/conanfile.py index a42b06fc8f951..74e5999eba368 100644 --- a/recipes/date/all/conanfile.py +++ b/recipes/date/all/conanfile.py @@ -53,7 +53,7 @@ def layout(self): def requirements(self): if not self.options.header_only and not self.options.use_system_tz_db: - self.requires("libcurl/8.0.1") + self.requires("libcurl/8.2.1") def package_id(self): if self.info.options.header_only: From 48d10319dedcc037ab7dc8452b691f4e76b57c5a Mon Sep 17 00:00:00 2001 From: Frank Schoenmann Date: Mon, 14 Aug 2023 19:08:48 +0200 Subject: [PATCH 214/637] (#19057) fast-dds: add version 2.11.1 --- recipes/fast-dds/all/conandata.yml | 7 +++++ ...11.1-0001-fix-find-asio-and-tinyxml2.patch | 31 +++++++++++++++++++ recipes/fast-dds/config.yml | 2 ++ 3 files changed, 40 insertions(+) create mode 100644 recipes/fast-dds/all/patches/2.11.1-0001-fix-find-asio-and-tinyxml2.patch diff --git a/recipes/fast-dds/all/conandata.yml b/recipes/fast-dds/all/conandata.yml index 89a0fa550b4d4..d1212c03f024a 100644 --- a/recipes/fast-dds/all/conandata.yml +++ b/recipes/fast-dds/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.11.1": + url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.11.1.tar.gz" + sha256: "3fe8b9f67a13a5d2aa40c0bd10581bd90f0a192b39c71f92ee233ffe584d3374" "2.10.1": url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.10.1.tar.gz" sha256: "2cc2682db5dc7e87684b7f23166e2f32faf8d5c4b4a8c94c6c21211a8a38f553" @@ -12,6 +15,10 @@ sources: url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.3.2.tar.gz" sha256: "4d8183cf4d37c3de9e6fd28d2850dd08023a9079001c4880b23c95f0d8c0b5ce" patches: + "2.11.1": + - patch_file: "patches/2.11.1-0001-fix-find-asio-and-tinyxml2.patch" + patch_type: "conan" + patch_description: "Fixup find asio and tinyxml2" "2.10.1": - patch_file: "patches/2.10.1-0001-fix-find-asio-and-tinyxml2.patch" patch_type: "conan" diff --git a/recipes/fast-dds/all/patches/2.11.1-0001-fix-find-asio-and-tinyxml2.patch b/recipes/fast-dds/all/patches/2.11.1-0001-fix-find-asio-and-tinyxml2.patch new file mode 100644 index 0000000000000..bada751126e81 --- /dev/null +++ b/recipes/fast-dds/all/patches/2.11.1-0001-fix-find-asio-and-tinyxml2.patch @@ -0,0 +1,31 @@ +From b8c533b0fb2b92e9bd2aada5e195d7a0b3c0c6a9 Mon Sep 17 00:00:00 2001 +From: Joakim Haugen +Date: Wed, 10 May 2023 13:17:11 +0200 +Subject: [PATCH] fix find asio and tinyxml2 + +--- + CMakeLists.txt | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b01b2c470..7867feff3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -232,9 +232,11 @@ if(NOT BUILD_SHARED_LIBS) + set(FASTDDS_STATIC ON) + endif() + +-eprosima_find_package(fastcdr REQUIRED) +-eprosima_find_thirdparty(Asio asio VERSION 1.10.8) +-eprosima_find_thirdparty(TinyXML2 tinyxml2) ++eprosima_find_thirdparty(fastcdr REQUIRED) ++eprosima_find_thirdparty(asio REQUIRED) ++eprosima_find_thirdparty(tinyxml2 REQUIRED) ++set(TINYXML2_LIBRARY tinyxml2::tinyxml2) ++set(Asio_INCLUDE_DIR ${asio_INCLUDE_DIR}) + + find_package(foonathan_memory REQUIRED) + message(STATUS "Found foonathan_memory: ${foonathan_memory_DIR}") +-- +2.30.2 + diff --git a/recipes/fast-dds/config.yml b/recipes/fast-dds/config.yml index 9d0fe488028aa..b5f51dc05cbcf 100644 --- a/recipes/fast-dds/config.yml +++ b/recipes/fast-dds/config.yml @@ -1,4 +1,6 @@ versions: + "2.11.1": + folder: all "2.10.1": folder: all "2.3.4": From 499445e03d9ddc8b9587e6ac6642617c12d39c97 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 15 Aug 2023 02:50:05 +0900 Subject: [PATCH 215/637] (#19189) mppp: update dependencies --- recipes/mppp/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/mppp/all/conanfile.py b/recipes/mppp/all/conanfile.py index bf3dbe732b8b1..7fed2f8affb27 100644 --- a/recipes/mppp/all/conanfile.py +++ b/recipes/mppp/all/conanfile.py @@ -63,13 +63,13 @@ def layout(self): def requirements(self): self.requires("gmp/6.2.1", transitive_headers=True) if self.options.with_mpfr: - self.requires("mpfr/4.1.0") + self.requires("mpfr/4.2.0") if self.options.with_mpc: self.requires("mpc/1.2.0") if self.options.with_boost: self.requires("boost/1.82.0") if self.options.get_safe("with_fmt"): - self.requires("fmt/10.0.0", transitive_headers=True) + self.requires("fmt/10.1.0", transitive_headers=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): From 50d110e5d44681bf834e702f2a4ffea5853fa6d2 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Mon, 14 Aug 2023 21:28:09 +0200 Subject: [PATCH 216/637] (#19195) pngpp: update libpng --- recipes/pngpp/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/pngpp/all/conanfile.py b/recipes/pngpp/all/conanfile.py index 9693d59416e60..57559867af002 100644 --- a/recipes/pngpp/all/conanfile.py +++ b/recipes/pngpp/all/conanfile.py @@ -22,7 +22,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("libpng/1.6.38") + self.requires("libpng/1.6.40") def package_id(self): self.info.clear() From 8b1d42814d553966f7e20fde4b5f5e30f589ea48 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 15 Aug 2023 11:50:28 +0900 Subject: [PATCH 217/637] (#19197) blend2d: add version 0.10.4 --- recipes/blend2d/all/conandata.yml | 7 +++++++ recipes/blend2d/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/blend2d/all/conandata.yml b/recipes/blend2d/all/conandata.yml index ddbc54ae6e873..81cc43bbe5bf8 100644 --- a/recipes/blend2d/all/conandata.yml +++ b/recipes/blend2d/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.10.4": + url: "https://blend2d.com/download/blend2d-0.10.4.tar.xz" + sha256: "6363e5c13c1c9e4709f949585a6af772ee13a16f75b0084f91b3918dece2fff3" "0.10": url: "https://blend2d.com/download/blend2d-0.10.tar.xz" sha256: "eaed6cc5f1fc33061a99d70cf166836994d952f75762bfacb397ee388e13ccc9" @@ -15,6 +18,10 @@ sources: url: "https://blend2d.com/download/blend2d-beta17.zip" sha256: "06ee8fb0bea281d09291e498900093139426501a1a7f09dba0ec801dd340635e" patches: + "0.10.4": + - patch_file: "patches/0.10-0001-disable-embed-asmjit.patch" + patch_description: "use asmjit cci package" + patch_type: "conan" "0.10": - patch_file: "patches/0.10-0001-disable-embed-asmjit.patch" patch_description: "use asmjit cci package" diff --git a/recipes/blend2d/config.yml b/recipes/blend2d/config.yml index 447f9c7043b58..abc5bb6a7611e 100644 --- a/recipes/blend2d/config.yml +++ b/recipes/blend2d/config.yml @@ -1,4 +1,6 @@ versions: + "0.10.4": + folder: all "0.10": folder: all "0.9": From 5ce4d59ea7942f14863fa4dbffb80f22ee45b7d3 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 15 Aug 2023 12:35:47 +0900 Subject: [PATCH 218/637] (#19198) fmtlog: update fmt/10.1.0 --- recipes/fmtlog/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/fmtlog/all/conanfile.py b/recipes/fmtlog/all/conanfile.py index 17e20eaf9c51b..759d3b12c6861 100644 --- a/recipes/fmtlog/all/conanfile.py +++ b/recipes/fmtlog/all/conanfile.py @@ -67,7 +67,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("fmt/10.0.0", transitive_headers=True, transitive_libs=True) + self.requires("fmt/10.1.0", transitive_headers=True, transitive_libs=True) def package_id(self): if self.info.options.header_only: From e98ebfe43280ed145c476ce8cf91086d12c08c6f Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 15 Aug 2023 13:48:19 +0900 Subject: [PATCH 219/637] (#19199) jinja2cpp: update fmt/10.1.0 --- recipes/jinja2cpp/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/jinja2cpp/all/conanfile.py b/recipes/jinja2cpp/all/conanfile.py index f6bfa2d0a3b34..c40b675dc715a 100644 --- a/recipes/jinja2cpp/all/conanfile.py +++ b/recipes/jinja2cpp/all/conanfile.py @@ -66,7 +66,7 @@ def requirements(self): self.requires("fmt/6.2.1") # not compatible with fmt >= 7.0.0 else: self.requires("nlohmann_json/3.11.2") - self.requires("fmt/10.0.0") + self.requires("fmt/10.1.0") def validate(self): if self.settings.compiler.get_safe("cppstd"): From 3298067ae4e38b4bdb6f9ed294197de01431e2d1 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 15 Aug 2023 18:16:21 +0900 Subject: [PATCH 220/637] (#18840) strong_type: add version v12 Co-authored-by: Carlos Zoido --- recipes/strong_type/all/conandata.yml | 3 +++ recipes/strong_type/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/strong_type/all/conandata.yml b/recipes/strong_type/all/conandata.yml index 93df54150e6a0..1b5da1a4d1c20 100644 --- a/recipes/strong_type/all/conandata.yml +++ b/recipes/strong_type/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "v12": + url: "https://github.com/rollbear/strong_type/archive/refs/tags/v12.tar.gz" + sha256: "8af0400c7ae76c7ec8646e929bacb37fc7fcae33e54eeaa61fa9f9df508a9248" "v11": url: "https://github.com/rollbear/strong_type/archive/refs/tags/v11.tar.gz" sha256: "b9879c8835501c05147603ac86097b263437f72a35299b5f96c90be789932418" diff --git a/recipes/strong_type/config.yml b/recipes/strong_type/config.yml index 547a5c53c28e3..3fcbeb72e7dd9 100644 --- a/recipes/strong_type/config.yml +++ b/recipes/strong_type/config.yml @@ -1,4 +1,6 @@ versions: + "v12": + folder: all "v11": folder: all "v10": From 9833fcdbde0fdd4c1cb91d4521560e334b4593b3 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 16 Aug 2023 01:48:18 +0900 Subject: [PATCH 221/637] (#19207) screen_capture_lite: add version 17.1.1369 --- recipes/screen_capture_lite/all/conandata.yml | 3 +++ recipes/screen_capture_lite/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/screen_capture_lite/all/conandata.yml b/recipes/screen_capture_lite/all/conandata.yml index aa72c475ba532..7bc7e84245c17 100644 --- a/recipes/screen_capture_lite/all/conandata.yml +++ b/recipes/screen_capture_lite/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "17.1.1369": + url: "https://github.com/smasherprog/screen_capture_lite/archive/refs/tags/17.1.1369.tar.gz" + sha256: "72abf1cd9fc538e98547841ec56396ba75a36853e861f7bf721f21c64c34453e" "17.1.1327": url: "https://github.com/smasherprog/screen_capture_lite/archive/refs/tags/17.1.1327.tar.gz" sha256: "bc5c17f3df14c1013268fc0107b52a98c6d032803fd1faea1983772f3b7ac5ed" diff --git a/recipes/screen_capture_lite/config.yml b/recipes/screen_capture_lite/config.yml index 7298de37ef363..d2022be0c81a1 100644 --- a/recipes/screen_capture_lite/config.yml +++ b/recipes/screen_capture_lite/config.yml @@ -1,4 +1,6 @@ versions: + "17.1.1369": + folder: "all" "17.1.1327": folder: "all" "17.1.1173": From 260f853130b76350e8b27a27a269a84ef6c763ab Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 16 Aug 2023 02:36:02 +0900 Subject: [PATCH 222/637] (#19208) r8brain-free-src: add version 6.4 --- recipes/r8brain-free-src/all/conandata.yml | 3 +++ recipes/r8brain-free-src/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/r8brain-free-src/all/conandata.yml b/recipes/r8brain-free-src/all/conandata.yml index e43484f945f02..66f72e2a32048 100644 --- a/recipes/r8brain-free-src/all/conandata.yml +++ b/recipes/r8brain-free-src/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "6.4": + url: "https://github.com/avaneev/r8brain-free-src/archive/refs/tags/version-6.4.tar.gz" + sha256: "27e6749e140648894b79003fe16a4d416eca3bed8d067e0f00cfb2e246c556ca" "6.3": url: "https://github.com/avaneev/r8brain-free-src/archive/refs/tags/version-6.3.tar.gz" sha256: "f2cd46cd8806294d9be45ed4e6bda5f8ef1dc808625eec3facde784953d2bc23" diff --git a/recipes/r8brain-free-src/config.yml b/recipes/r8brain-free-src/config.yml index 8f56257b3441d..2402c4c664c5f 100644 --- a/recipes/r8brain-free-src/config.yml +++ b/recipes/r8brain-free-src/config.yml @@ -1,4 +1,6 @@ versions: + "6.4": + folder: all "6.3": folder: all "6.2": From 9a72a33917fb67865b4ddeecb23bacabbe382fb4 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 16 Aug 2023 13:08:25 +0900 Subject: [PATCH 223/637] (#19216) maven: add version 3.9.4 --- recipes/maven/all/conandata.yml | 3 +++ recipes/maven/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/maven/all/conandata.yml b/recipes/maven/all/conandata.yml index 7cdcaeb46d6b1..ce4fe6b87794c 100644 --- a/recipes/maven/all/conandata.yml +++ b/recipes/maven/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.9.4": + url: "https://dlcdn.apache.org/maven/maven-3/3.9.4/binaries/apache-maven-3.9.4-bin.tar.gz" + sha256: "ff66b70c830a38d331d44f6c25a37b582471def9a161c93902bac7bea3098319" "3.9.2": url: "https://dlcdn.apache.org/maven/maven-3/3.9.2/binaries/apache-maven-3.9.2-bin.tar.gz" sha256: "809ef3220c6d179195c06c324cb9a6d34d8ecba566c5cfd8eb83167bc034117d" diff --git a/recipes/maven/config.yml b/recipes/maven/config.yml index 2f82b90ebcf02..95a41cd441c27 100644 --- a/recipes/maven/config.yml +++ b/recipes/maven/config.yml @@ -1,3 +1,5 @@ versions: + "3.9.4": + folder: all "3.9.2": folder: all From 012bfc5bb3d7ee26ce9214fd2ed4c4bc6359cb39 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 16 Aug 2023 13:29:38 +0900 Subject: [PATCH 224/637] (#19214) cppcommon: update fmt/10.1.0 --- recipes/cppcommon/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cppcommon/all/conanfile.py b/recipes/cppcommon/all/conanfile.py index 31e78b570dc50..4997a9d1cf9fb 100644 --- a/recipes/cppcommon/all/conanfile.py +++ b/recipes/cppcommon/all/conanfile.py @@ -62,7 +62,7 @@ def requirements(self): if Version(self.version) < "1.0.3" or self.version == "cci.20201104": self.requires("fmt/8.1.1") else: - self.requires("fmt/10.0.0") + self.requires("fmt/10.1.0") if self.settings.os == "Linux": self.requires("util-linux-libuuid/2.39") From c0d4ff3f18cc1a68343e63bc80e0f66f3e152043 Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Wed, 16 Aug 2023 07:02:08 +0100 Subject: [PATCH 225/637] (#19185) Update wording on patch policy * Update wording on patch policy * Update sources_and_patches.md --- docs/adding_packages/sources_and_patches.md | 69 +++------------------ 1 file changed, 10 insertions(+), 59 deletions(-) diff --git a/docs/adding_packages/sources_and_patches.md b/docs/adding_packages/sources_and_patches.md index 66f10a1232726..abd4c25d16e75 100644 --- a/docs/adding_packages/sources_and_patches.md +++ b/docs/adding_packages/sources_and_patches.md @@ -138,62 +138,13 @@ def _patch_sources(self): replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "${CMAKE_SOURCE_DIR}", "${CMAKE_CURRENT_SOURCE_DIR}") ``` -### Rules - -These are the rules that apply to regular versions of Conan packages: - -**Build system patches.** In order to add libraries into ConanCenter sometimes -it is NEEDED to apply patches so they can consume existing packages -for requirements and binaries can be generated. These patches are totally -needed for the purpose of ConanCenter and Conan keeps adding features trying -to minimize these changes. - -**Source patches.** ConanCenter DOES NOT accept patches **backporting bugfixes or -features** from upcoming releases, they break the principle of minimum surprise, -they change the behavior of the library and it will no longer match the -documentation or the changelog originally delivered by the authors. - -However, ConanCenter DOES accept **working software patches**, these patches -are needed to generate the binaries for architectures not considered by -library maintainers, or to use some compilers or configurations. These patches -make it possible to generate binaries that cannot be generated otherwise, or -they can turn a crashing binary into a working software one (bugs, errors, or -faults are considered working software as long as they produce deterministic -results). - -Patches to sources to add support to newer versions of dependencies are -considered feature patches and they are not allowed either. They can -introduce new behaviors or bugs not considered when delivering the -library by maintainers. If a requirement is known not to work, the recipe -should raise a `ConanInvalidConfiguration` from the `validate()` method. - -**Vulnerability patches.** Patches published to CVE databases or declared as -vulnerabilities by the authors in non-mainstream libraries WILL be applied -to packages generated in Conan Center. - -**Official release patches.** If the library documents that a patch should be -applied to sources when building a tag/release from sources, ConanCenter WILL -apply that patch too. This is needed to match the documented behavior or the -binaries of that library offered by other means. -[Example here](https://www.boost.org/users/history/version_1_73_0.html). - -### Exceptions - -Exceptionally, we might find libraries that aren't actively developed and consumers -might benefit from having some bugfixes applied to previous versions while -waiting for the next release, or because the library is no longer maintained. These -are the rules for this exceptional scenario: - -* **new release**, based on some official release and clearly identifiable will - be created to apply these patches to: <>. -* **only patches backporting bugfixes** will be accepted after they have - been submitted to the upstream and there is a consensus that it's a bug and the patch is the solution. - -ConanCenter will build this patched release and serve its binaries like it does with -any other Conan reference. - -Notice that these <> releases are unique to ConanCenter -and they can get new patches or discard existing ones according to upstream -considerations. It means that these releases will modify their behavior without previous -notice, the documentation or changelog for these specific releases won't exist. Use -them carefully in your projects. +### Policy on patches + +Conan Center is a package repository, and the aim of the service is to provide the recipes to build libraries from the sources as provided by the library authors, and to provide binaries for Conan Center’s supported platforms and configurations. + +In general, patches to source code should be avoided and only done as a last resort. In situations where it is strictly necessary, the aim should be that the patches could be eventually merged upstream so that in the future they are no longer necessary. + +Pull Requests that introduce patches will be carefully reviewed by the Conan Team. We recognize that in some instances, patches are necessary in the build system/build scripts. +Patches that affect C and C++ code are strongly discouraged and will only be accepted at the discretion of the Conan Team, after a strict validation process. Patches are more likely to be accepted if they are first reported and acknowledged by the library authors. + +For scenarios that require patching source code, we greatly encourage raising a new issue explaining the need and motivation, reproducible steps and complete logs, behind the patch. Please note that for issues that strictly affect C and C++ source code, it is very unlikely that a patch will be accepted if an issue is not first raised with the original library authors, or if the patches are not addressing a known security advisory. From 625304d16b23e6c0465ff0277a0ab964d6b3bb13 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 16 Aug 2023 09:24:15 +0300 Subject: [PATCH 226/637] (#18233) rgbcx: migrate to Conan v2 * rgbcx: migrate to Conan v2 * rgbcx: restore test_v1_package * rgbcx: add cmake_find_package_multi generator to test_v1_package * rgbcx: fix v1 test on armv8 * rgbcx: restore VirtualRunEnv in test_package --- recipes/rgbcx/all/conanfile.py | 55 +++++++++++++------ recipes/rgbcx/all/test_package/CMakeLists.txt | 7 +-- recipes/rgbcx/all/test_package/conanfile.py | 20 +++++-- .../rgbcx/all/test_package/test_package.cpp | 3 + .../rgbcx/all/test_v1_package/CMakeLists.txt | 8 +++ .../rgbcx/all/test_v1_package/conanfile.py | 19 +++++++ 6 files changed, 85 insertions(+), 27 deletions(-) create mode 100644 recipes/rgbcx/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/rgbcx/all/test_v1_package/conanfile.py diff --git a/recipes/rgbcx/all/conanfile.py b/recipes/rgbcx/all/conanfile.py index 62f3ee9f485a5..2978797a9067e 100644 --- a/recipes/rgbcx/all/conanfile.py +++ b/recipes/rgbcx/all/conanfile.py @@ -1,34 +1,53 @@ import os -import glob -from conans import ConanFile, tools + +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get, replace_in_file +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.52.0" class RgbcxConan(ConanFile): name = "rgbcx" description = "High-performance scalar BC1-5 encoders." - homepage = "https://github.com/richgel999/bc7enc" + license = ("MIT", "Unlicense") url = "https://github.com/conan-io/conan-center-index" - topics = ("conan", "BC1", "BC5", "BCx", "encoding") - license = "MIT", "Unlicense" + homepage = "https://github.com/richgel999/bc7enc" + topics = ("BC1", "BC5", "BCx", "encoding", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 11 + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = glob.glob('bc7enc-*/')[0] - os.rename(extracted_dir, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): - tools.replace_in_file(os.path.join(self._source_subfolder, "rgbcx.h"), - "#include ", - "#include \n#include ") + replace_in_file(self, + os.path.join(self.source_folder, "rgbcx.h"), + "#include ", + "#include \n#include ") def package(self): - self.copy("rgbcx.h", dst="include", src=self._source_subfolder) - self.copy("rgbcx_table4.h", dst="include", src=self._source_subfolder) - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + copy(self, "rgbcx.h", dst=os.path.join(self.package_folder, "include"), src=self.source_folder) + copy(self, "rgbcx_table4.h", dst=os.path.join(self.package_folder, "include"), src=self.source_folder) + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - def package_id(self): - self.info.header_only() + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/rgbcx/all/test_package/CMakeLists.txt b/recipes/rgbcx/all/test_package/CMakeLists.txt index 454c47bb2cbab..e86d42248fffd 100644 --- a/recipes/rgbcx/all/test_package/CMakeLists.txt +++ b/recipes/rgbcx/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(rgbcx REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE rgbcx::rgbcx) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/rgbcx/all/test_package/conanfile.py b/recipes/rgbcx/all/test_package/conanfile.py index be0a94674e5bd..ef5d7042163ec 100644 --- a/recipes/rgbcx/all/test_package/conanfile.py +++ b/recipes/rgbcx/all/test_package/conanfile.py @@ -1,10 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -12,5 +21,6 @@ def build(self): cmake.build() def test(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/rgbcx/all/test_package/test_package.cpp b/recipes/rgbcx/all/test_package/test_package.cpp index 136968a37d7d1..c4faf6d5e5b49 100644 --- a/recipes/rgbcx/all/test_package/test_package.cpp +++ b/recipes/rgbcx/all/test_package/test_package.cpp @@ -1,3 +1,6 @@ +// Workaround for a missing math.h include in rgbcx.h +#include + #define RGBCX_IMPLEMENTATION #include "rgbcx.h" diff --git a/recipes/rgbcx/all/test_v1_package/CMakeLists.txt b/recipes/rgbcx/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/rgbcx/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/rgbcx/all/test_v1_package/conanfile.py b/recipes/rgbcx/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..f96c48347ffda --- /dev/null +++ b/recipes/rgbcx/all/test_v1_package/conanfile.py @@ -0,0 +1,19 @@ +import os + +from conan.tools.build import can_run +from conans import ConanFile, CMake + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From d29f9060f9e58aee8fdd05bf2cbd400b6caa8884 Mon Sep 17 00:00:00 2001 From: Maksim Petukhov <6967052+maksim-petukhov@users.noreply.github.com> Date: Wed, 16 Aug 2023 08:44:18 +0200 Subject: [PATCH 227/637] (#18400) openmvg: add with_jpeg option * add jpeg option * fix * review * Update recipes/openmvg/all/conanfile.py Co-authored-by: Martin Valgur * add workaround for build rpath issue on Linux --------- Co-authored-by: Martin Valgur Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> --- recipes/openmvg/all/conanfile.py | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/recipes/openmvg/all/conanfile.py b/recipes/openmvg/all/conanfile.py index b320aba511407..6774e8b893191 100644 --- a/recipes/openmvg/all/conanfile.py +++ b/recipes/openmvg/all/conanfile.py @@ -30,6 +30,7 @@ class Openmvgconan(ConanFile): "with_openmp": [True, False], "with_avx": [False, "avx", "avx2"], "programs": [True, False], + "with_jpeg": ["libjpeg", "libjpeg-turbo", "mozjpeg"] } default_options = { "shared": False, @@ -37,6 +38,7 @@ class Openmvgconan(ConanFile): "with_openmp": False, "with_avx": False, "programs": True, + "with_jpeg": "libjpeg" } short_paths = True @@ -66,7 +68,12 @@ def requirements(self): self.requires("coin-utils/2.11.6") self.requires("eigen/3.4.0", transitive_headers=True) self.requires("flann/1.9.2", transitive_headers=True, transitive_libs=True) - self.requires("libjpeg/9e") + if self.options.with_jpeg == "libjpeg": + self.requires("libjpeg/9e") + elif self.options.with_jpeg == "libjpeg-turbo": + self.requires("libjpeg-turbo/3.0.0") + elif self.options.with_jpeg == "mozjpeg": + self.requires("mozjpeg/4.1.1") self.requires("libpng/1.6.40") self.requires("libtiff/4.5.1") @@ -108,6 +115,12 @@ def generate(self): # see https://github.com/conan-io/conan/issues/10281 if Version(self.dependencies["ceres-solver"].ref.version) >= "2.0.0" and not valid_min_cppstd(self, "14"): tc.variables["CMAKE_CXX_STANDARD"] = "14" + + if self.settings.os == "Linux": + # Workaround for: https://github.com/conan-io/conan/issues/13560 + libdirs_host = [l for dependency in self.dependencies.host.values() for l in dependency.cpp_info.aggregated_components().libdirs] + tc.variables["CMAKE_BUILD_RPATH"] = ";".join(libdirs_host) + tc.generate() deps = CMakeDeps(self) @@ -131,6 +144,14 @@ def package(self): @property def _openmvg_components(self): + def jpeg(): + if self.options.with_jpeg == "libjpeg": + return ["libjpeg::libjpeg"] + elif self.options.with_jpeg == "libjpeg-turbo": + return ["libjpeg-turbo::jpeg"] + elif self.options.with_jpeg == "mozjpeg": + return ["mozjpeg::libjpeg"] + return { "openmvg_camera": { "target": "openMVG_camera", @@ -162,7 +183,7 @@ def _openmvg_components(self): "openmvg_image": { "target": "openMVG_image", "libs": ["openMVG_image"], - "requires": ["openmvg_numeric", "libjpeg::libjpeg", "libpng::libpng", "libtiff::libtiff"], + "requires": ["openmvg_numeric", "libpng::libpng", "libtiff::libtiff"] + jpeg(), }, "openmvg_linearprogramming": { "target": "openMVG_linearProgramming", From 316603b08544d37338cf42e65c322d0702b99d8f Mon Sep 17 00:00:00 2001 From: Ivo Hedtke Date: Wed, 16 Aug 2023 09:05:03 +0200 Subject: [PATCH 228/637] (#18467) Update nodesoup to conan v2 * Update nodesoup to conan v2 * Apply patches * Delete unused CMakeLists * Drop minimum conan version * Enable export of symbols on Windows --- recipes/nodesoup/all/CMakeLists.txt | 9 --- recipes/nodesoup/all/conandata.yml | 1 - recipes/nodesoup/all/conanfile.py | 67 +++++++++---------- .../nodesoup/all/test_package/CMakeLists.txt | 3 - .../nodesoup/all/test_package/conanfile.py | 21 ++++-- 5 files changed, 48 insertions(+), 53 deletions(-) delete mode 100644 recipes/nodesoup/all/CMakeLists.txt diff --git a/recipes/nodesoup/all/CMakeLists.txt b/recipes/nodesoup/all/CMakeLists.txt deleted file mode 100644 index 881b1cb39250b..0000000000000 --- a/recipes/nodesoup/all/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 3.4) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - -add_subdirectory(source_subfolder) diff --git a/recipes/nodesoup/all/conandata.yml b/recipes/nodesoup/all/conandata.yml index bf507c033f50b..633f6755af50c 100644 --- a/recipes/nodesoup/all/conandata.yml +++ b/recipes/nodesoup/all/conandata.yml @@ -5,4 +5,3 @@ sources: patches: "cci.20200905": - patch_file: "patches/0001-install-shared-windows.patch" - base_path: "source_subfolder" diff --git a/recipes/nodesoup/all/conanfile.py b/recipes/nodesoup/all/conanfile.py index 19ef9ea3f1923..86e6f75fa6616 100644 --- a/recipes/nodesoup/all/conanfile.py +++ b/recipes/nodesoup/all/conanfile.py @@ -1,9 +1,11 @@ -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, CMakeToolchain, CMakeDeps, cmake_layout +from conan.tools.files import copy, get, rmdir, apply_conandata_patches, export_conandata_patches +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.33.0" - class NodesoupConan(ConanFile): name = "nodesoup" @@ -13,6 +15,7 @@ class NodesoupConan(ConanFile): homepage = "https://github.com/olvb/nodesoup" url = "https://github.com/conan-io/conan-center-index" settings = "os", "arch", "compiler", "build_type" + package_type = "library" options = { "shared": [True, False], "fPIC": [True, False], @@ -22,18 +25,8 @@ class NodesoupConan(ConanFile): "fPIC": True, } - generators = "cmake" - exports_sources = "CMakeLists.txt", "patches/*" - - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" + def layout(self): + cmake_layout(self, src_folder="src") def config_options(self): if self.settings.os == "Windows": @@ -41,38 +34,44 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + + @property + def _min_cppstd(self): + return 14 def validate(self): if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, 14) + check_min_cppstd(self, self._min_cppstd) if self.settings.compiler == "clang": - if tools.Version(self.settings.compiler.version) < "5.0" and self.settings.compiler.libcxx in ("libstdc++", "libstdc++11"): + if Version(self.settings.compiler.version) < "5.0" and self.settings.compiler.libcxx in ("libstdc++", "libstdc++11"): raise ConanInvalidConfiguration("The version of libstdc++(11) of the current compiler does not support building nodesoup") + def export_sources(self): + export_conandata_patches(self) + def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_DEMO"] = False + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + 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() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + 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.includedirs.append(os.path.join("include", "nodesoup")) diff --git a/recipes/nodesoup/all/test_package/CMakeLists.txt b/recipes/nodesoup/all/test_package/CMakeLists.txt index 027a67d403fb1..881aec891e1d0 100644 --- a/recipes/nodesoup/all/test_package/CMakeLists.txt +++ b/recipes/nodesoup/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ cmake_minimum_required(VERSION 3.1) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(nodesoup REQUIRED CONFIG) add_executable(${CMAKE_PROJECT_NAME} test_package.cpp) diff --git a/recipes/nodesoup/all/test_package/conanfile.py b/recipes/nodesoup/all/test_package/conanfile.py index 49a3a66ea5bad..8a5bb47f50c4c 100644 --- a/recipes/nodesoup/all/test_package/conanfile.py +++ b/recipes/nodesoup/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, cmake_layout import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -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.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") From f9fd67a038d28e63a31ed40fbf0fb666f5ad1c0f Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 16 Aug 2023 10:27:20 +0300 Subject: [PATCH 229/637] (#18781) libfuse: fix fPIC handling on Windows * libfuse: fix fPIC handling on Windows * libfuse: restore VirtualRunEnv in test_package * libfuse: bump deps --- recipes/libfuse/2.x.x/conanfile.py | 12 ++++++++---- recipes/libfuse/2.x.x/test_package/CMakeLists.txt | 2 +- .../libfuse/2.x.x/test_v1_package/CMakeLists.txt | 2 +- recipes/libfuse/all/conanfile.py | 13 ++++++++----- recipes/libfuse/all/test_package/CMakeLists.txt | 2 +- recipes/libfuse/all/test_v1_package/CMakeLists.txt | 2 +- 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/recipes/libfuse/2.x.x/conanfile.py b/recipes/libfuse/2.x.x/conanfile.py index 4cc77383a646b..d233b32a70631 100644 --- a/recipes/libfuse/2.x.x/conanfile.py +++ b/recipes/libfuse/2.x.x/conanfile.py @@ -14,7 +14,8 @@ class LibfuseConan(ConanFile): homepage = "https://github.com/libfuse/libfuse" license = "LGPL-2.1" description = "The reference implementation of the Linux FUSE interface" - topics = ("fuse", "libfuse", "filesystem", "linux") + topics = ("fuse", "filesystem", "linux") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -26,9 +27,13 @@ class LibfuseConan(ConanFile): "fPIC": True, } + 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") self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") @@ -72,6 +77,5 @@ def package_info(self): self.cpp_info.system_libs = ["pthread"] # libfuse requires this define to compile successfully self.cpp_info.defines = ["_FILE_OFFSET_BITS=64"] - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("dl") - diff --git a/recipes/libfuse/2.x.x/test_package/CMakeLists.txt b/recipes/libfuse/2.x.x/test_package/CMakeLists.txt index 701d331873021..b328202f167f9 100644 --- a/recipes/libfuse/2.x.x/test_package/CMakeLists.txt +++ b/recipes/libfuse/2.x.x/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES C) find_package(libfuse REQUIRED CONFIG) diff --git a/recipes/libfuse/2.x.x/test_v1_package/CMakeLists.txt b/recipes/libfuse/2.x.x/test_v1_package/CMakeLists.txt index 0d20897301b68..b21cc49efde95 100644 --- a/recipes/libfuse/2.x.x/test_v1_package/CMakeLists.txt +++ b/recipes/libfuse/2.x.x/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/libfuse/all/conanfile.py b/recipes/libfuse/all/conanfile.py index 0f2c7852403e0..2b5f67a4fee98 100644 --- a/recipes/libfuse/all/conanfile.py +++ b/recipes/libfuse/all/conanfile.py @@ -15,7 +15,7 @@ class LibfuseConan(ConanFile): homepage = "https://github.com/libfuse/libfuse" license = "LGPL-2.1" description = "The reference implementation of the Linux FUSE interface" - topics = ("fuse", "libfuse", "filesystem", "linux") + topics = ("fuse", "filesystem", "linux") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -27,9 +27,13 @@ class LibfuseConan(ConanFile): "fPIC": True, } + 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") self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") @@ -41,7 +45,7 @@ def validate(self): raise ConanInvalidConfiguration("libfuse supports only Linux and FreeBSD") def build_requirements(self): - self.tool_requires("meson/1.0.0") + self.tool_requires("meson/1.2.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -72,6 +76,5 @@ def package_info(self): self.cpp_info.libs = ["fuse3"] self.cpp_info.includedirs = [os.path.join("include", "fuse3")] self.cpp_info.system_libs = ["pthread"] - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.extend(["dl", "rt"]) - diff --git a/recipes/libfuse/all/test_package/CMakeLists.txt b/recipes/libfuse/all/test_package/CMakeLists.txt index c8bc174f2164d..2fd81a9f515e7 100644 --- a/recipes/libfuse/all/test_package/CMakeLists.txt +++ b/recipes/libfuse/all/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES C) find_package(libfuse REQUIRED CONFIG) diff --git a/recipes/libfuse/all/test_v1_package/CMakeLists.txt b/recipes/libfuse/all/test_v1_package/CMakeLists.txt index 0d20897301b68..b21cc49efde95 100644 --- a/recipes/libfuse/all/test_v1_package/CMakeLists.txt +++ b/recipes/libfuse/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) From 4ca516712774b522ad76bb68f1f04aac531d83f8 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 16 Aug 2023 11:48:00 +0400 Subject: [PATCH 230/637] (#19171) onetbb: set package_type --- recipes/onetbb/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/onetbb/all/conanfile.py b/recipes/onetbb/all/conanfile.py index 165436b84b383..fa6e990f3c829 100644 --- a/recipes/onetbb/all/conanfile.py +++ b/recipes/onetbb/all/conanfile.py @@ -21,6 +21,7 @@ class OneTBBConan(ConanFile): " programs that take full advantage of multicore performance, that are portable, composable" " and have future-proof scalability.") topics = ("tbb", "threading", "parallelism", "tbbmalloc") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { From f4260277bcf0768a5b078a089de9b5e474cd813d Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Wed, 16 Aug 2023 10:22:29 +0200 Subject: [PATCH 231/637] (#19186) [bot] Update authorized users list (2023-08-14) --- .c3i/authorized_users.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 29f7167d2ab9c..d4bb58861e74d 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1212,3 +1212,6 @@ authorized_users: - matthewT53 - sjlamerton - marxin +- Arkokat +- adattatri +- jwfallawuiuc From 63042b5a95505b78ca3c5c9a37c23611a48dfdbb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 16 Aug 2023 10:43:11 +0200 Subject: [PATCH 232/637] (#19217) [docs] Regenerate tables of contents Co-authored-by: conan-center-bot --- docs/adding_packages/sources_and_patches.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/adding_packages/sources_and_patches.md b/docs/adding_packages/sources_and_patches.md index abd4c25d16e75..56ff5130c26e4 100644 --- a/docs/adding_packages/sources_and_patches.md +++ b/docs/adding_packages/sources_and_patches.md @@ -16,8 +16,7 @@ These are a very important aspects and it helps us to establish the quality of t * [Format and Conventions](#format-and-conventions) * [Exporting Patches](#exporting-patches) * [Applying Patches](#applying-patches) - * [Rules](#rules) - * [Exceptions](#exceptions) + * [Policy on patches](#policy-on-patches) ## Picking the Sources From 37ab4bd027654c453211528d3f4d411ea2389129 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 16 Aug 2023 18:12:50 +0900 Subject: [PATCH 233/637] (#19166) xbyak: add version 6.73, add package_type --- recipes/xbyak/all/conandata.yml | 3 +++ recipes/xbyak/all/conanfile.py | 17 ++++++++--------- recipes/xbyak/config.yml | 2 ++ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/recipes/xbyak/all/conandata.yml b/recipes/xbyak/all/conandata.yml index 2e045a1c8a082..a0e8dd18cf451 100644 --- a/recipes/xbyak/all/conandata.yml +++ b/recipes/xbyak/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "6.73": + url: "https://github.com/herumi/xbyak/archive/v6.73.tar.gz" + sha256: "41f3dc7727a48c751024c92fa4da24a4a1e0ed16b7930c79d05b76960b19562d" "6.62": url: "https://github.com/herumi/xbyak/archive/v6.62.tar.gz" sha256: "fd5f074d64cdfcacad3bbe8664727a8eab569f131cadd725a778c028fa6b0ccd" diff --git a/recipes/xbyak/all/conanfile.py b/recipes/xbyak/all/conanfile.py index 9523784e16e7c..724743a916f47 100644 --- a/recipes/xbyak/all/conanfile.py +++ b/recipes/xbyak/all/conanfile.py @@ -11,21 +11,21 @@ class XbyakConan(ConanFile): description = "Xbyak is a C++ header library that enables dynamically to " \ "assemble x86(IA32), x64(AMD64, x86-64) mnemonic." license = "BSD-3-Clause" - topics = ("xbyak", "jit", "assembler") - homepage = "https://github.com/herumi/xbyak" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/herumi/xbyak" + topics = ("jit", "assembler", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True - def package_id(self): - self.info.clear() - def layout(self): basic_layout(self, src_folder="src") + def package_id(self): + self.info.clear() + def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass @@ -37,7 +37,6 @@ def package(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "xbyak") self.cpp_info.set_property("cmake_target_name", "xbyak::xbyak") + self.cpp_info.bindirs = [] - self.cpp_info.frameworkdirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] diff --git a/recipes/xbyak/config.yml b/recipes/xbyak/config.yml index 9006396a7028a..65c8029e207c3 100644 --- a/recipes/xbyak/config.yml +++ b/recipes/xbyak/config.yml @@ -1,4 +1,6 @@ versions: + "6.73": + folder: all "6.62": folder: all "6.61.2": From 7443a4a506e944b4d98600bf65064137974168ba Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Wed, 16 Aug 2023 11:50:38 +0200 Subject: [PATCH 234/637] (#19201) libpq: add 15.4 * libpq: add 15.4 * libpq: update openssl dependency --- recipes/libpq/all/conandata.yml | 3 +++ recipes/libpq/all/conanfile.py | 5 ++++- recipes/libpq/config.yml | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/recipes/libpq/all/conandata.yml b/recipes/libpq/all/conandata.yml index eef5fefc1dd9a..cf627d10addbc 100644 --- a/recipes/libpq/all/conandata.yml +++ b/recipes/libpq/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "15.4": + url: "https://ftp.postgresql.org/pub/source/v15.4/postgresql-15.4.tar.bz2" + sha256: "baec5a4bdc4437336653b6cb5d9ed89be5bd5c0c58b94e0becee0a999e63c8f9" "15.3": url: "https://ftp.postgresql.org/pub/source/v15.3/postgresql-15.3.tar.bz2" sha256: "ffc7d4891f00ffbf5c3f4eab7fbbced8460b8c0ee63c5a5167133b9e6599d932" diff --git a/recipes/libpq/all/conanfile.py b/recipes/libpq/all/conanfile.py index b4e66be74d363..cc7d54df6ee85 100644 --- a/recipes/libpq/all/conanfile.py +++ b/recipes/libpq/all/conanfile.py @@ -65,7 +65,10 @@ def layout(self): def requirements(self): if self.options.with_openssl: - self.requires("openssl/1.1.1t") + if Version(self.version) < "13.5": + self.requires("openssl/1.1.1u") + else: + self.requires("openssl/[>=1.1 <4]") def build_requirements(self): if is_msvc(self): diff --git a/recipes/libpq/config.yml b/recipes/libpq/config.yml index bf80d539d9d1e..5a83ac4481a63 100644 --- a/recipes/libpq/config.yml +++ b/recipes/libpq/config.yml @@ -1,4 +1,6 @@ versions: + "15.4": + folder: all "15.3": folder: all "14.8": From 7758eb75ce0f8b198bfa278726cfdf6959b57c3b Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Wed, 16 Aug 2023 11:44:25 +0100 Subject: [PATCH 235/637] (#19220) jwt-cpp: update version range for OpenSSL --- recipes/jwt-cpp/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/jwt-cpp/all/conanfile.py b/recipes/jwt-cpp/all/conanfile.py index bbf3918d2b235..5a0889c19e2e1 100644 --- a/recipes/jwt-cpp/all/conanfile.py +++ b/recipes/jwt-cpp/all/conanfile.py @@ -24,7 +24,7 @@ def export_sources(self): export_conandata_patches(self) def requirements(self): - self.requires("openssl/[>1.1.1c,<1.1.1u]") + self.requires("openssl/[>=1.1 <4]") if not self._supports_generic_json: self.requires("picojson/1.3.0") From 0ed2d49cc6f00afc04a3691de086144532688ebd Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 16 Aug 2023 20:09:20 +0900 Subject: [PATCH 236/637] (#18678) implot: add version 0.15 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * implot: add version 0.15 * improve CMakeLists.txt * update checksum of 0.15 * drop support shared imgui on msvc * Update recipes/implot/all/conanfile.py --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: Carlos Zoido --- recipes/implot/all/CMakeLists.txt | 14 +++++++------- recipes/implot/all/conandata.yml | 3 +++ recipes/implot/all/conanfile.py | 21 ++++++++++++++------- recipes/implot/config.yml | 2 ++ 4 files changed, 26 insertions(+), 14 deletions(-) diff --git a/recipes/implot/all/CMakeLists.txt b/recipes/implot/all/CMakeLists.txt index ec869caed9029..84afb4ed40721 100644 --- a/recipes/implot/all/CMakeLists.txt +++ b/recipes/implot/all/CMakeLists.txt @@ -1,14 +1,12 @@ cmake_minimum_required(VERSION 3.4) -project(implot CXX) -set(CMAKE_CXX_STANDARD 11) -set(CMAKE_CXX_STANDARD_REQUIRED ON) +project(implot LANGUAGES CXX) -set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - -file(GLOB SOURCE_FILES ${IMPLOT_SRC_DIR}/*.cpp) file(GLOB HEADER_FILES ${IMPLOT_SRC_DIR}/*.h) -add_library(${PROJECT_NAME} ${SOURCE_FILES}) +add_library(${PROJECT_NAME} + ${IMPLOT_SRC_DIR}/implot.cpp + ${IMPLOT_SRC_DIR}/implot_items.cpp +) target_include_directories(${PROJECT_NAME} PRIVATE ${IMPLOT_SRC_DIR}) find_package(imgui CONFIG REQUIRED) @@ -16,6 +14,8 @@ find_package(imgui CONFIG REQUIRED) target_link_libraries(${PROJECT_NAME} PUBLIC imgui::imgui) target_compile_definitions(${PROJECT_NAME} PRIVATE IMGUI_DEFINE_MATH_OPERATORS) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +set_target_properties(${PROJECT_NAME} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) include(GNUInstallDirs) diff --git a/recipes/implot/all/conandata.yml b/recipes/implot/all/conandata.yml index 21af4dfe87312..a9c9c08b5ed78 100644 --- a/recipes/implot/all/conandata.yml +++ b/recipes/implot/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.15": + url: "https://github.com/epezent/implot/archive/v0.15.tar.gz" + sha256: "4c20f22fbfbe4ad055f3d344581918d62cde72070b233dad75419a4334f82146" "0.14": url: "https://github.com/epezent/implot/archive/v0.14.tar.gz" sha256: "1613af3e6554c0a74de20c6e60e9bce5ce35c2d4f9e1aa5ff963f7fe2d48af88" diff --git a/recipes/implot/all/conanfile.py b/recipes/implot/all/conanfile.py index ce2e069d3196d..20e340b605f31 100644 --- a/recipes/implot/all/conanfile.py +++ b/recipes/implot/all/conanfile.py @@ -1,28 +1,29 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import get, copy from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc import os required_conan_version = ">=1.54" class ImplotConan(ConanFile): name = "implot" + description = "Advanced 2D Plotting for Dear ImGui" + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/epezent/implot" - description = "Advanced 2D Plotting for Dear ImGui" topics = ("imgui", "plot", "graphics", ) - license = "MIT" - settings = "os", "arch", "compiler", "build_type" package_type = "library" - + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], - "fPIC": [True, False] + "fPIC": [True, False], } default_options = { "shared": False, - "fPIC": True + "fPIC": True, } def export_sources(self): @@ -37,7 +38,9 @@ def configure(self): self.options.rm_safe("fPIC") def requirements(self): - if Version(self.version) >= "0.14": + if Version(self.version) >= "0.15": + self.requires("imgui/1.89.8", transitive_headers=True) + elif Version(self.version) >= "0.14": self.requires("imgui/1.89.4", transitive_headers=True) elif Version(self.version) >= "0.13": # imgui 1.89 renamed ImGuiKeyModFlags_* to ImGuiModFlags_* @@ -48,6 +51,10 @@ def requirements(self): def layout(self): cmake_layout(self, src_folder="src") + def validate(self): + if Version(self.version) < "0.13" and is_msvc(self) and self.dependencies["imgui"].options.shared: + raise ConanInvalidConfiguration(f"{self.ref} doesn't support shared imgui.") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/implot/config.yml b/recipes/implot/config.yml index d62abd0d999a8..5c3099f028cc2 100644 --- a/recipes/implot/config.yml +++ b/recipes/implot/config.yml @@ -1,4 +1,6 @@ versions: + "0.15": + folder: "all" "0.14": folder: "all" "0.13": From da7183df6b05a6b97ae127d88394ddd19d670e55 Mon Sep 17 00:00:00 2001 From: Raziel Alphadios <64050682+RazielXYZ@users.noreply.github.com> Date: Wed, 16 Aug 2023 16:54:48 +0300 Subject: [PATCH 237/637] (#16134) Add bgfx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add bgfx with locally tested files * Fix projs list Add required system libs Better shared lib support * Add opengl/system requirement * Minimum apple-clang to 12 for now to keep CCI from compiling on macOS older than 11 Add apparently missing macOS frameworks * Apparently apple dylibs break if renamed * Fix oops of using settings instead of options * Fix conditional logic * Why is macos so difficult? * Fix test for Conan 2.x * Maybe this helps on macos * Make suggested changes * Update recipes/bgfx/all/test_package/conanfile.py Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com> * Fix shared some more --------- Co-authored-by: Raziel Alphadios Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Co-authored-by: Francisco Ramírez --- recipes/bgfx/all/conandata.yml | 4 + recipes/bgfx/all/conanfile.py | 321 ++++++++++++++++++ recipes/bgfx/all/test_package/CMakeLists.txt | 9 + recipes/bgfx/all/test_package/conanfile.py | 25 ++ .../bgfx/all/test_package/test_package.cpp | 36 ++ .../bgfx/all/test_v1_package/CMakeLists.txt | 9 + recipes/bgfx/all/test_v1_package/conanfile.py | 17 + recipes/bgfx/config.yml | 3 + 8 files changed, 424 insertions(+) create mode 100644 recipes/bgfx/all/conandata.yml create mode 100644 recipes/bgfx/all/conanfile.py create mode 100644 recipes/bgfx/all/test_package/CMakeLists.txt create mode 100644 recipes/bgfx/all/test_package/conanfile.py create mode 100644 recipes/bgfx/all/test_package/test_package.cpp create mode 100644 recipes/bgfx/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/bgfx/all/test_v1_package/conanfile.py create mode 100644 recipes/bgfx/config.yml diff --git a/recipes/bgfx/all/conandata.yml b/recipes/bgfx/all/conandata.yml new file mode 100644 index 0000000000000..47606f9539fe5 --- /dev/null +++ b/recipes/bgfx/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20230216": + url: "https://github.com/bkaradzic/bgfx/archive/9d5b980f5c060e54cc30dec18500a5b54db00405.tar.gz" + sha256: "291739720E369C5C2422273D887AEC590084B29E5C9DC5C9441F5A68869B6736" diff --git a/recipes/bgfx/all/conanfile.py b/recipes/bgfx/all/conanfile.py new file mode 100644 index 0000000000000..9de812b7f94ea --- /dev/null +++ b/recipes/bgfx/all/conanfile.py @@ -0,0 +1,321 @@ +from conan import ConanFile +from conan.tools.files import copy, get, rename +from conan.tools.build import check_min_cppstd +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, check_min_vs, is_msvc_static_runtime +from conan.tools.apple import fix_apple_shared_install_name, is_apple_os +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration +from conan.tools.microsoft import MSBuild, VCVars +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.env import VirtualBuildEnv +from pathlib import Path +import os + +required_conan_version = ">=1.50.0" + +class bgfxConan(ConanFile): + name = "bgfx" + license = "BSD-2-Clause" + homepage = "https://github.com/bkaradzic/bgfx" + url = "https://github.com/conan-io/conan-center-index" + description = "Cross-platform, graphics API agnostic, \"Bring Your Own Engine/Framework\" style rendering library." + topics = ("rendering", "graphics") + settings = "os", "compiler", "arch", "build_type" + options = {"shared": [True, False], "tools": [True, False]} + default_options = {"shared": False, "tools": False} + + @property + def _bx_folder(self): + return "bx" + + @property + def _bimg_folder(self): + return "bimg" + + @property + def _bgfx_folder(self): + return "bgfx" + + @property + def _bgfx_path(self): + return os.path.join(self.source_folder, self._bgfx_folder) + + @property + def _genie_extra(self): + genie_extra = "" + if is_msvc(self) and not is_msvc_static_runtime(self): + genie_extra += " --with-dynamic-runtime" + if self.options.shared: + genie_extra += " --with-shared-lib" + if self.options.tools: + genie_extra += " --with-tools" + return genie_extra + + @property + def _lib_target_prefix(self): + if self.settings.os == "Windows": + return "libs\\" + else: + return "" + + @property + def _tool_target_prefix(self): + if self.settings.os == "Windows": + return "tools\\" + else: + return "" + + @property + def _shaderc_target_prefix(self): + if self.settings.os == "Windows": + return "shaderc\\" + else: + return "" + + @property + def _projs(self): + if self.options.shared: + projs = [f"{self._lib_target_prefix}bgfx-shared-lib"] + else: + projs = [f"{self._lib_target_prefix}bgfx"] + if self.options.tools: + projs.extend([f"{self._tool_target_prefix}{self._shaderc_target_prefix}shaderc", + f"{self._tool_target_prefix}texturev", + f"{self._tool_target_prefix}geometryc", + f"{self._tool_target_prefix}geometryv"]) + return projs + + @property + def _compiler_required(self): + return { + "gcc": "8", + "clang": "3.3", + "apple-clang": "12", #to keep CCI compiling on osx 11.0 or higher, for now + "msvc": "191", + "Visual Studio": "15" #TODO remove with conan 2.0 + } + + @property + def _bx_version(self): #mapping of bgfx version to required/used bx version + return {"cci.20230216": "cci.20221116"} + + @property + def _bimg_version(self): #mapping of bgfx version to required/used bimg version + return {"cci.20230216": "cci.20230114"} + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + # bgfx's C99 API absolutely requires a header from bx so we need those to be transitive + self.requires(f"bx/{self._bx_version[self.version]}", transitive_headers=True) + self.requires(f"bimg/{self._bimg_version[self.version]}") + self.requires("opengl/system") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 14) + check_min_vs(self, 191) + if not is_msvc(self): + try: + minimum_required_compiler_version = self._compiler_required[str(self.settings.compiler)] + if Version(self.settings.compiler.version) < minimum_required_compiler_version: + raise ConanInvalidConfiguration("This package requires C++14 support. The current compiler does not support it.") + except KeyError: + self.output.warn("This recipe has no checking for the current compiler. Please consider adding it.") + + def build_requirements(self): + self.tool_requires("genie/1170") + if not is_msvc(self) and self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True, + destination=os.path.join(self.source_folder, self._bgfx_folder)) + # bgfx's genie project, and the projects generated by it, expect bx and bimg source to be present on the same relative root as bimg's in order to build + # usins a pre-built bx and bimg instead would require significant changes to the genie project but may be worth looking into in the future + get(self, **self.dependencies["bx"].conan_data["sources"][self._bx_version[self.version]], strip_root=True, + destination=os.path.join(self.source_folder, self._bx_folder)) + get(self, **self.dependencies["bimg"].conan_data["sources"][self._bimg_version[self.version]], strip_root=True, + destination=os.path.join(self.source_folder, self._bimg_folder)) + + def generate(self): + vbe = VirtualBuildEnv(self) + vbe.generate() + if is_msvc(self): + tc = VCVars(self) + tc.generate() + else: + tc = AutotoolsToolchain(self) + tc.generate() + + def build(self): + if is_msvc(self): + # Conan to Genie translation maps + vs_ver_to_genie = {"17": "2022", "16": "2019", "15": "2017", + "193": "2022", "192": "2019", "191": "2017"} + + # Use genie directly, then msbuild on specific projects based on requirements + genie_VS = f"vs{vs_ver_to_genie[str(self.settings.compiler.version)]}" + genie_gen = f"{self._genie_extra} {genie_VS}" + self.run(f"genie {genie_gen}", cwd=self._bgfx_path) + + msbuild = MSBuild(self) + # customize to Release when RelWithDebInfo + msbuild.build_type = "Debug" if self.settings.build_type == "Debug" else "Release" + # use Win32 instead of the default value when building x86 + msbuild.platform = "Win32" if self.settings.arch == "x86" else msbuild.platform + msbuild.build(os.path.join(self._bgfx_path, ".build", "projects", genie_VS, "bgfx.sln"), targets=self._projs) + else: + # Not sure if XCode can be spefically handled by conan for building through, so assume everything not VS is make + # gcc-multilib and g++-multilib required for 32bit cross-compilation, should see if we can check and install through conan + + # Conan to Genie translation maps + compiler_str = str(self.settings.compiler) + compiler_and_os_to_genie = {"Windows": f"--gcc=mingw-{compiler_str}", "Linux": f"--gcc=linux-{compiler_str}", + "FreeBSD": "--gcc=freebsd", "Macos": "--gcc=osx", + "Android": "--gcc=android", "iOS": "--gcc=ios"} + gmake_os_to_proj = {"Windows": "mingw", "Linux": "linux", "FreeBSD": "freebsd", "Macos": "osx", "Android": "android", "iOS": "ios"} + gmake_arch_to_genie_suffix = {"x86": "-x86", "x86_64": "-x64", "armv8": "-arm64", "armv7": "-arm"} + os_to_use_arch_config_suffix = {"Windows": False, "Linux": False, "FreeBSD": False, "Macos": True, "Android": True, "iOS": True} + + build_type_to_make_config = {"Debug": "config=debug", "Release": "config=release"} + arch_to_make_config_suffix = {"x86": "32", "x86_64": "64"} + os_to_use_make_config_suffix = {"Windows": True, "Linux": True, "FreeBSD": True, "Macos": False, "Android": False, "iOS": False} + + # Generate projects through genie + genieGen = f"{self._genie_extra} {compiler_and_os_to_genie[str(self.settings.os)]}" + if os_to_use_arch_config_suffix[str(self.settings.os)]: + genieGen += f"{gmake_arch_to_genie_suffix[str(self.settings.arch)]}" + genieGen += " gmake" + self.run(f"genie {genieGen}", cwd=self._bgfx_path) + + # Build project folder and path from given settings + projFolder = f"gmake-{gmake_os_to_proj[str(self.settings.os)]}" + if self.settings.os == "Windows" or compiler_str not in ["gcc", "apple-clang"]: + projFolder += f"-{compiler_str}" #mingw-gcc or mingw-clang for windows; -clang for linux (where gcc on linux has no extra) + if os_to_use_arch_config_suffix[str(self.settings.os)]: + projFolder += gmake_arch_to_genie_suffix[str(self.settings.arch)] + proj_path = os.path.sep.join([self._bgfx_path, ".build", "projects", projFolder]) + + # Build make args from settings + conf = build_type_to_make_config[str(self.settings.build_type)] + if os_to_use_make_config_suffix[str(self.settings.os)]: + conf += arch_to_make_config_suffix[str(self.settings.arch)] + if self.settings.os == "Windows": + mingw = "MINGW=$MINGW_PREFIX" + proj_path = proj_path.replace("\\", "/") # Fix path for msys... + else: + mingw = "" + autotools = Autotools(self) + # Build with make + for proj in self._projs: + autotools.make(target=proj, args=["-R", f"-C {proj_path}", mingw, conf]) + + def package(self): + # Set platform suffixes and prefixes + if self.settings.os == "Windows": + if self.options.shared: + lib_pat = "*bgfx-shared-lib*.lib" + else: + lib_pat = "*bgfx*.lib" + package_lib_prefix = "" + elif self.settings.os in ["Linux", "FreeBSD"]: + if self.options.shared: + lib_pat = "*bgfx*.so" + else: + lib_pat = "*bgfx*.a" + package_lib_prefix = "lib" + elif self.settings.os in ["Macos", "iOS"]: + if self.options.shared: + lib_pat = "*bgfx*.dylib" + else: + lib_pat = "*bgfx*.a" + package_lib_prefix = "lib" + + # Get build bin folder + for bimg_out_dir in os.listdir(os.path.join(self._bgfx_path, ".build")): + if not bimg_out_dir=="projects": + build_bin = os.path.join(self._bgfx_path, ".build", bimg_out_dir, "bin") + break + + # Copy license + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self._bgfx_path) + # Copy includes + copy(self, pattern="*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self._bgfx_path, "include")) + # Copy libs + copy(self, pattern=lib_pat, dst=os.path.join(self.package_folder, "lib"), src=build_bin, keep_path=False) + if self.options.shared: + copy(self, pattern="*.dll", dst=os.path.join(self.package_folder, "bin"), src=build_bin, keep_path=False) + + # Copy tools + if self.options.tools: + copy(self, pattern="shaderc*", dst=os.path.join(self.package_folder, "bin"), src=build_bin, keep_path=False) + copy(self, pattern="texturev*", dst=os.path.join(self.package_folder, "bin"), src=build_bin, keep_path=False) + copy(self, pattern="geometryc*", dst=os.path.join(self.package_folder, "bin"), src=build_bin, keep_path=False) + copy(self, pattern="geometryv*", dst=os.path.join(self.package_folder, "bin"), src=build_bin, keep_path=False) + + # Rename for consistency across platforms and configs + if not (is_apple_os(self) and self.options.shared): #Apparently apple dylibs break if renamed + for bgfx_file in Path(os.path.join(self.package_folder, "lib")).glob("*bgfx*"): + rename(self, os.path.join(self.package_folder, "lib", bgfx_file.name), + os.path.join(self.package_folder, "lib", f"{package_lib_prefix}bgfx{bgfx_file.suffix}")) + if self.options.tools: + for bgfx_file in Path(os.path.join(self.package_folder, "bin")).glob("*shaderc*"): + rename(self, os.path.join(self.package_folder, "bin", bgfx_file.name), + os.path.join(self.package_folder, "bin", f"shaderc{bgfx_file.suffix}")) + for bgfx_file in Path(os.path.join(self.package_folder, "bin")).glob("*texturev*"): + rename(self, os.path.join(self.package_folder, "bin", bgfx_file.name), + os.path.join(self.package_folder, "bin", f"texturev{bgfx_file.suffix}")) + for bgfx_file in Path(os.path.join(self.package_folder, "bin")).glob("*geometryc*"): + rename(self, os.path.join(self.package_folder, "bin", bgfx_file.name), + os.path.join(self.package_folder, "bin", f"geometryc{bgfx_file.suffix}")) + for bgfx_file in Path(os.path.join(self.package_folder, "bin")).glob("*geometryv*"): + rename(self, os.path.join(self.package_folder, "bin", bgfx_file.name), + os.path.join(self.package_folder, "bin", f"geometryv{bgfx_file.suffix}")) + + # Maybe this helps + if is_apple_os(self): + fix_apple_shared_install_name(self) + + def package_info(self): + self.cpp_info.includedirs = ["include"] + if self.options.shared and self.settings.os in ["Macos", "iOS"]: + self.cpp_info.libs = [f"bgfx-shared-lib{self.settings.build_type}"] + else: + self.cpp_info.libs = ["bgfx"] + + if self.options.shared: + self.cpp_info.defines.extend(["BGFX_SHARED_LIB_USE=1"]) + + if self.settings.os == "Windows": + self.cpp_info.system_libs.extend(["gdi32"]) + if not is_msvc(self): + self.cpp_info.system_libs.extend(["comdlg32"]) + elif self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["X11", "GL"]) + elif self.settings.os in ["Macos", "iOS"]: + self.cpp_info.frameworks.extend(["CoreFoundation", "AppKit", "IOKit", "QuartzCore", "Metal"]) + if self.settings.os in ["Macos"]: + self.cpp_info.frameworks.extend(["OpenGL"]) + else: + self.cpp_info.frameworks.extend(["OpenGLES", "UIKit"]) + elif self.settings.os in ["Android"]: + self.cpp_info.system_libs.extend(["EGL", "GLESv2"]) + + self.cpp_info.set_property("cmake_file_name", "bgfx") + self.cpp_info.set_property("cmake_target_name", "bgfx::bgfx") + self.cpp_info.set_property("pkg_config_name", "bgfx") + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.filenames["cmake_find_package"] = "bgfx" + self.cpp_info.filenames["cmake_find_package_multi"] = "bgfx" + self.cpp_info.names["cmake_find_package"] = "bgfx" + self.cpp_info.names["cmake_find_package_multi"] = "bgfx" diff --git a/recipes/bgfx/all/test_package/CMakeLists.txt b/recipes/bgfx/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..2c968e2dda718 --- /dev/null +++ b/recipes/bgfx/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.8) + +project(test_package LANGUAGES CXX) + +find_package(bgfx REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +target_link_libraries(${PROJECT_NAME} bgfx::bgfx) diff --git a/recipes/bgfx/all/test_package/conanfile.py b/recipes/bgfx/all/test_package/conanfile.py new file mode 100644 index 0000000000000..4e578144a798a --- /dev/null +++ b/recipes/bgfx/all/test_package/conanfile.py @@ -0,0 +1,25 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/bgfx/all/test_package/test_package.cpp b/recipes/bgfx/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..630c14bc99ec9 --- /dev/null +++ b/recipes/bgfx/all/test_package/test_package.cpp @@ -0,0 +1,36 @@ +//Important: bgfx shared on windows only works with the C99 API, the C++ API is not exported +#include + +#if BGFX_SHARED_LIB_USE && (BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT) +#include +#else +#include +#endif + +int main() { +#if BGFX_SHARED_LIB_USE && (BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT) + bgfx_init_t init; + bgfx_init_ctor(&init); + init.type = bgfx_renderer_type::BGFX_RENDERER_TYPE_NOOP; + init.vendorId = BGFX_PCI_ID_NONE; + init.platformData.nwh = nullptr; + init.platformData.ndt = nullptr; + init.resolution.width = 0; + init.resolution.height = 0; + init.resolution.reset = BGFX_RESET_NONE; + bgfx_init(&init); + bgfx_shutdown(); + return 0; +#else + bgfx::Init init; + init.type = bgfx::RendererType::Noop; + init.vendorId = BGFX_PCI_ID_NONE; + init.platformData.nwh = nullptr; + init.platformData.ndt = nullptr; + init.resolution.width = 0; + init.resolution.height = 0; + init.resolution.reset = BGFX_RESET_NONE; + bgfx::init(init); + bgfx::shutdown(); +#endif +} diff --git a/recipes/bgfx/all/test_v1_package/CMakeLists.txt b/recipes/bgfx/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..667976629550a --- /dev/null +++ b/recipes/bgfx/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.8) + +project(test_package LANGUAGES CXX) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/bgfx/all/test_v1_package/conanfile.py b/recipes/bgfx/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..056e75eddb91c --- /dev/null +++ b/recipes/bgfx/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class BimgTestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/bgfx/config.yml b/recipes/bgfx/config.yml new file mode 100644 index 0000000000000..0fa69d015c844 --- /dev/null +++ b/recipes/bgfx/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20230216": + folder: all From b7cf54029b6ba9176ef313f0213acd382784c712 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 16 Aug 2023 17:31:57 +0300 Subject: [PATCH 238/637] (#18258) rangesnext: migrate to Conan v2 * rangesnext: migrate to Conan v2 * rangesnext: restore test_v1_package * rangesnext: update min compiler versions * rangesnext: not compatible with Clang * rangesnext: restore VirtualRunEnv in test_package * rangesnext: fix min Visual Studio version --------- Co-authored-by: Daniel --- recipes/rangesnext/all/conandata.yml | 3 +- recipes/rangesnext/all/conanfile.py | 65 ++++++++++++++----- .../all/test_package/CMakeLists.txt | 7 +- .../rangesnext/all/test_package/conanfile.py | 22 +++++-- .../all/test_package/test_package.cpp | 7 +- .../all/test_v1_package/CMakeLists.txt | 8 +++ .../all/test_v1_package/conanfile.py | 16 +++++ 7 files changed, 95 insertions(+), 33 deletions(-) create mode 100644 recipes/rangesnext/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/rangesnext/all/test_v1_package/conanfile.py diff --git a/recipes/rangesnext/all/conandata.yml b/recipes/rangesnext/all/conandata.yml index 72383f2492ee7..29a3d8ef00ff0 100644 --- a/recipes/rangesnext/all/conandata.yml +++ b/recipes/rangesnext/all/conandata.yml @@ -1,8 +1,7 @@ sources: "cci.20210426": url: "https://github.com/cor3ntin/rangesnext/archive/10fd1cffe7a2a9688a31f91ec8754668c4cdd9a6.tar.gz" - sha256: 8b4ba9129346818d1ad2ab1fe00ccb85c5c1b35fef91868aece97aa079e0dec4 + sha256: "8b4ba9129346818d1ad2ab1fe00ccb85c5c1b35fef91868aece97aa079e0dec4" patches: "cci.20210426": - patch_file: "patches/0001-cmake-disable-tests.patch" - base_path: "source_subfolder" diff --git a/recipes/rangesnext/all/conanfile.py b/recipes/rangesnext/all/conanfile.py index b438391b226f9..6c7782838deee 100644 --- a/recipes/rangesnext/all/conanfile.py +++ b/recipes/rangesnext/all/conanfile.py @@ -1,37 +1,68 @@ -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration import os +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + class RangesnextConan(ConanFile): name = "rangesnext" description = "ranges features for C++23 ported to C++20" - topics = ("conan", "rangesnext", "ranges", "backport", "backport-cpp") + license = "BSL-1.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/cor3ntin/rangesnext" - license = "BSL-1.0" - settings = "compiler" + topics = ("ranges", "backport", "backport-cpp", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True - _compilers_minimum_version = { - "gcc": "10", - "Visual Studio": "19", - "clang": "13" - } - _source_subfolder = "source_subfolder" + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "10", + "msvc": "193", + "Visual Studio": "17", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() def validate(self): if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, "20") + check_min_cppstd(self, self._min_cppstd) + + if "clang" in str(self.settings.compiler): + raise ConanInvalidConfiguration("rangesnext is not compatible with Clang") minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if not minimum_version or tools.Version(self.settings.compiler.version) < minimum_version: + if not minimum_version or Version(self.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration("rangesnext requires C++20, which your compiler does not fully support.") def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - include_folder = os.path.join(self._source_subfolder, "include") - self.copy(pattern="LICENSE.md", dst="licenses", src=self._source_subfolder) - self.copy(pattern="*", dst="include", src=include_folder) + include_folder = os.path.join(self.source_folder, "include") + copy(self, "LICENSE.md", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + copy(self, "*", + dst=os.path.join(self.package_folder, "include"), + src=include_folder) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/rangesnext/all/test_package/CMakeLists.txt b/recipes/rangesnext/all/test_package/CMakeLists.txt index 2bd2a465ffb06..9b8b15ab7a013 100644 --- a/recipes/rangesnext/all/test_package/CMakeLists.txt +++ b/recipes/rangesnext/all/test_package/CMakeLists.txt @@ -1,8 +1,5 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) find_package(rangesnext REQUIRED CONFIG) diff --git a/recipes/rangesnext/all/test_package/conanfile.py b/recipes/rangesnext/all/test_package/conanfile.py index 6c9d5dba712c7..ef5d7042163ec 100644 --- a/recipes/rangesnext/all/test_package/conanfile.py +++ b/recipes/rangesnext/all/test_package/conanfile.py @@ -1,9 +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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -11,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/rangesnext/all/test_package/test_package.cpp b/recipes/rangesnext/all/test_package/test_package.cpp index e25f23d096604..f1a7ea7bef564 100644 --- a/recipes/rangesnext/all/test_package/test_package.cpp +++ b/recipes/rangesnext/all/test_package/test_package.cpp @@ -1,6 +1,7 @@ -#include #include +#include + namespace rangesnext = cor3ntin::rangesnext; template @@ -12,11 +13,11 @@ bool test_enumerate_with(RangeT &&range) { bool success = true; for (auto &&[i, v] : enumerated_range) { - std::cout << i << " - " << v << "\n"; + std::cout << i << " - " << v << "\n"; success = (i == idx_ref++) && (v == *it_ref++); if (success == false) { - return false; + return false; } } diff --git a/recipes/rangesnext/all/test_v1_package/CMakeLists.txt b/recipes/rangesnext/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/rangesnext/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/rangesnext/all/test_v1_package/conanfile.py b/recipes/rangesnext/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..6c9d5dba712c7 --- /dev/null +++ b/recipes/rangesnext/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 0461dc91a45fed5cbcd02bbe4ee7dfc957ab41ea Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 16 Aug 2023 18:22:07 +0300 Subject: [PATCH 239/637] (#18266) platform.exceptions: migrate to Conan v2 * platform.exceptions: migrate to Conan v2 * platform.exceptions: restore test_v1_package * platform.exceptions: add cmake_find_package_multi generator to test_v1_package * platform.exceptions: restore VirtualRunEnv in test_package * platform.exceptions: bump deps --- recipes/platform.exceptions/all/conanfile.py | 75 +++++++++++-------- .../all/test_package/CMakeLists.txt | 7 +- .../all/test_package/conanfile.py | 21 ++++-- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../all/test_v1_package/conanfile.py | 17 +++++ 5 files changed, 86 insertions(+), 42 deletions(-) create mode 100644 recipes/platform.exceptions/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/platform.exceptions/all/test_v1_package/conanfile.py diff --git a/recipes/platform.exceptions/all/conanfile.py b/recipes/platform.exceptions/all/conanfile.py index e352e58aa4f01..28942c0367e11 100644 --- a/recipes/platform.exceptions/all/conanfile.py +++ b/recipes/platform.exceptions/all/conanfile.py @@ -1,28 +1,34 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" class PlatformExceptionsConan(ConanFile): name = "platform.exceptions" + description = "platform.exceptions is one of the libraries of the LinksPlatform modular framework, to ensure exceptions" license = "MIT" - homepage = "https://github.com/linksplatform/Exceptions" url = "https://github.com/conan-io/conan-center-index" - description = "platform.exceptions is one of the libraries of the LinksPlatform modular framework, " \ - "to ensure exceptions" - topics = ("linksplatform", "cpp20", "exceptions", "any", "ranges", "native") - settings = "compiler", "arch" + homepage = "https://github.com/linksplatform/Exceptions" + topics = ("linksplatform", "cpp20", "exceptions", "any", "ranges", "native", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True @property - def _source_subfolder(self): - return "source_subfolder" + def _minimum_cpp_standard(self): + return 20 @property def _internal_cpp_subfolder(self): - return os.path.join(self._source_subfolder, "cpp", "Platform.Exceptions") + return os.path.join(self.source_folder, "cpp", "Platform.Exceptions") @property def _compilers_minimum_version(self): @@ -30,42 +36,47 @@ def _compilers_minimum_version(self): "gcc": "10", "Visual Studio": "16", "clang": "11", - "apple-clang": "11" + "apple-clang": "11", } - @property - def _minimum_cpp_standard(self): - return 20 + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): - if tools.Version(self.version) >= "0.3.0": - self.requires("platform.delegates/0.2.7") + if Version(self.version) >= "0.3.0": + self.requires("platform.delegates/0.3.7") else: self.requires("platform.delegates/0.1.3") + def package_id(self): + self.info.clear() + def validate(self): minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler)) if not minimum_version: - self.output.warn("{} recipe lacks information about the {} compiler support.".format( - self.name, self.settings.compiler)) + self.output.warning(f"{self.name} recipe lacks information about the {self.settings.compiler} compiler support.") - elif tools.Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration("{}/{} requires c++{}, " - "which is not supported by {} {}.".format( - self.name, self.version, self._minimum_cpp_standard, self.settings.compiler, - self.settings.compiler.version)) + elif Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.name}/{self.version} requires c++{self._minimum_cpp_standard}, which is not supported" + f" by {self.settings.compiler} {self.settings.compiler.version}." + ) if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, self._minimum_cpp_standard) - - def package_id(self): - self.info.header_only() + check_min_cppstd(self, self._minimum_cpp_standard) def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy("*.h", dst="include", src=self._internal_cpp_subfolder) - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + copy(self, "*.h", + dst=os.path.join(self.package_folder, "include"), + src=self._internal_cpp_subfolder) + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/platform.exceptions/all/test_package/CMakeLists.txt b/recipes/platform.exceptions/all/test_package/CMakeLists.txt index dadfcbe5ecf0a..a63090495da9c 100644 --- a/recipes/platform.exceptions/all/test_package/CMakeLists.txt +++ b/recipes/platform.exceptions/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(platform.exceptions REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE platform.exceptions::platform.exceptions) set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 20) diff --git a/recipes/platform.exceptions/all/test_package/conanfile.py b/recipes/platform.exceptions/all/test_package/conanfile.py index d4128b0450777..ef5d7042163ec 100644 --- a/recipes/platform.exceptions/all/test_package/conanfile.py +++ b/recipes/platform.exceptions/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", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -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/platform.exceptions/all/test_v1_package/CMakeLists.txt b/recipes/platform.exceptions/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/platform.exceptions/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/platform.exceptions/all/test_v1_package/conanfile.py b/recipes/platform.exceptions/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/platform.exceptions/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + 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) From 239d75c4ca6d6047017f325902f6e4c7f9e56c5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20F=C3=BCchsl?= Date: Wed, 16 Aug 2023 18:55:19 +0200 Subject: [PATCH 240/637] (#19224) [package] lz4/1.9.4 : Bugfix / Patch to support lz4 and xxhash at the same time. * Patch to support lz4 and xxhash at the same time. * Remove whitespace --- recipes/lz4/all/conandata.yml | 5 +++++ ...pace-declaration-for-xxhash-in-CMake.patch | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 recipes/lz4/all/patches/0004-Added-namespace-declaration-for-xxhash-in-CMake.patch diff --git a/recipes/lz4/all/conandata.yml b/recipes/lz4/all/conandata.yml index 577763acfe7a6..fc3f8472653fd 100644 --- a/recipes/lz4/all/conandata.yml +++ b/recipes/lz4/all/conandata.yml @@ -9,6 +9,11 @@ sources: sha256: 658ba6191fa44c92280d4aa2c271b0f4fbc0e34d249578dd05e50e76d0e5efcc url: https://github.com/lz4/lz4/archive/v1.9.2.tar.gz patches: + "1.9.4": + - patch_file: "patches/0004-Added-namespace-declaration-for-xxhash-in-CMake.patch" + patch_description: "Added namespace/prefix for xxHash functions by altering CMakeLists.txt" + patch_type: official + patch_source: "https://github.com/lz4/lz4/pull/1258" "1.9.3": - patch_file: "patches/0003-cmake-minimum-required-first-1.9.3.patch" patch_description: "Move cmake_minimum_required to the top of CMakeFile.txt" diff --git a/recipes/lz4/all/patches/0004-Added-namespace-declaration-for-xxhash-in-CMake.patch b/recipes/lz4/all/patches/0004-Added-namespace-declaration-for-xxhash-in-CMake.patch new file mode 100644 index 0000000000000..04a888ec1c444 --- /dev/null +++ b/recipes/lz4/all/patches/0004-Added-namespace-declaration-for-xxhash-in-CMake.patch @@ -0,0 +1,19 @@ +--- a/build/cmake/CMakeLists.txt ++++ b/build/cmake/CMakeLists.txt +@@ -131,6 +131,16 @@ if(BUILD_STATIC_LIBS) + list(APPEND LZ4_LIBRARIES_BUILT lz4_static) + endif() + ++# xxhash namesapce ++if(BUILD_SHARED_LIBS) ++ target_compile_definitions(lz4_shared PRIVATE ++ XXH_NAMESPACE=LZ4_) ++endif() ++if(BUILD_STATIC_LIBS) ++ target_compile_definitions(lz4_static PRIVATE ++ XXH_NAMESPACE=LZ4_) ++endif() ++ + if(BUILD_STATIC_LIBS) + set(LZ4_LINK_LIBRARY lz4_static) + else() From bdfa780b1a265b8c5fb01b5b3294bc836ddab1b7 Mon Sep 17 00:00:00 2001 From: Stefan Floeren <42731906+stefan-floeren@users.noreply.github.com> Date: Wed, 16 Aug 2023 21:53:22 +0200 Subject: [PATCH 241/637] (#19225) utfcpp: add 3.2.4 - Add version 3.2.4 - Set target to utf8cpp::utf8cpp Co-authored-by: Stefan Floeren --- recipes/utfcpp/all/conandata.yml | 3 +++ recipes/utfcpp/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/utfcpp/all/conandata.yml b/recipes/utfcpp/all/conandata.yml index f435f56f7acf1..572f41ae51de7 100644 --- a/recipes/utfcpp/all/conandata.yml +++ b/recipes/utfcpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.2.4": + url: "https://github.com/nemtrif/utfcpp/archive/refs/tags/v3.2.4.tar.gz" + sha256: "fde21a4c519eed25f095a1cd8490167409cc70d7b5e9c38756142e588ccb7c7e" "3.2.3": url: "https://github.com/nemtrif/utfcpp/archive/v3.2.3.tar.gz" sha256: "3ba9b0dbbff08767bdffe8f03b10e596ca351228862722e4c9d4d126d2865250" diff --git a/recipes/utfcpp/config.yml b/recipes/utfcpp/config.yml index 00df0fb881cb8..b081129769046 100644 --- a/recipes/utfcpp/config.yml +++ b/recipes/utfcpp/config.yml @@ -1,4 +1,6 @@ versions: + "3.2.4": + folder: all "3.2.3": folder: all "3.2.2": From fb392e83252f231a5f22694d7390a56b33c995c8 Mon Sep 17 00:00:00 2001 From: Pat Mancuso <46453397+patmantru@users.noreply.github.com> Date: Wed, 16 Aug 2023 22:48:45 -0400 Subject: [PATCH 242/637] (#18896) Adds opentdf-client versions 1.4.0 and 1.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adds versions 1.4.0 and 1.5.0 * Need magic_enum for 1.4.0 also * Update to new release content * Update to newest release tag content * Change OpenSSL version references to ranges per CCI requirements * fix typo * Try different range spec for 1.1.x * Try another range spec for openssl 1.1.x * Another try at version ranges * Still another try at ranges for openssl 1.1.x * Pick a version range that is also compatible with jwt-cpp * openssl/[>=3.1 <3.2] range is not compatible with jwt-cpp. Use fixed version to override * One more try with newer jwt-cpp and ranges * Avoid jwt-cpp complaint about OpenSSL 1.1.1u * Override 3.1.1 for openssl to avoid jwt-cpp complaint * jwt-cpp requires are broken forr 0.5.0 and 0.6.0, avoid * opentdf-client: update openssl version ranges --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> --- recipes/opentdf-client/all/conandata.yml | 6 ++++++ recipes/opentdf-client/all/conanfile.py | 11 ++++++++++- recipes/opentdf-client/config.yml | 4 ++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/recipes/opentdf-client/all/conandata.yml b/recipes/opentdf-client/all/conandata.yml index 17500dcbe918b..382304e4f3de0 100644 --- a/recipes/opentdf-client/all/conandata.yml +++ b/recipes/opentdf-client/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.5.0": + url: "https://github.com/opentdf/client-cpp/archive/1.5.0.tar.gz" + sha256: "0d6134634c0c6fde5e8457361332242259e1ef238e5254ccbed2f94549998c48" + "1.4.0": + url: "https://github.com/opentdf/client-cpp/archive/1.4.0.tar.gz" + sha256: "0ef9cdf5e49f83a8ddcde10d64cdf9108652e781396cfab000f50cc067e6f795" "1.3.10": url: "https://github.com/opentdf/client-cpp/archive/1.3.10.tar.gz" sha256: "539bd5e64bceb86f63b3f7db75de470d5ea1d52ae6436a6a2d6789f7d0710dd4" diff --git a/recipes/opentdf-client/all/conanfile.py b/recipes/opentdf-client/all/conanfile.py index 0633733157211..1c4773399329b 100644 --- a/recipes/opentdf-client/all/conanfile.py +++ b/recipes/opentdf-client/all/conanfile.py @@ -66,7 +66,14 @@ def validate(self): raise ConanInvalidConfiguration(f'{self.name} can not be built with MT or MTd at this time') def requirements(self): - self.requires("openssl/1.1.1q") + # Uses openssl 3.x for 1.5.0 and newer + if Version(self.version) >= "1.5.0": + self.requires("openssl/[>=3.1 <4]") + else: + self.requires("openssl/1.1.1u") + # Uses magic_enum for 1.4.0 and newer + if Version(self.version) >= "1.4.0": + self.requires("magic_enum/0.8.2") self.requires("ms-gsl/2.1.0") self.requires("nlohmann_json/3.11.1") self.requires("jwt-cpp/0.4.0") @@ -121,3 +128,5 @@ def package_info(self): self.cpp_info.components["libopentdf"].requires = ["openssl::openssl", "boost::boost", "ms-gsl::ms-gsl", "libxml2::libxml2", "jwt-cpp::jwt-cpp", "nlohmann_json::nlohmann_json"] if Version(self.version) < "1.1.0": self.cpp_info.components["libopentdf"].requires.append("libarchive::libarchive") + if Version(self.version) >= "1.4.0": + self.cpp_info.components["libopentdf"].requires.append("magic_enum::magic_enum") diff --git a/recipes/opentdf-client/config.yml b/recipes/opentdf-client/config.yml index 6747766ab2d49..109b67265732e 100644 --- a/recipes/opentdf-client/config.yml +++ b/recipes/opentdf-client/config.yml @@ -1,4 +1,8 @@ versions: + "1.5.0": + folder: all + "1.4.0": + folder: all "1.3.10": folder: all "1.3.9": From acde2b2419e6e131d86a5aac656d40d9fe267932 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 17 Aug 2023 12:29:44 +0900 Subject: [PATCH 243/637] (#19236) json-c: add version 0.17 --- recipes/json-c/all/conandata.yml | 3 +++ recipes/json-c/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/json-c/all/conandata.yml b/recipes/json-c/all/conandata.yml index 7ed706059e17c..a27364e09b956 100644 --- a/recipes/json-c/all/conandata.yml +++ b/recipes/json-c/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.17": + url: "https://github.com/json-c/json-c/archive/json-c-0.17-20230812.tar.gz" + sha256: "024d302a3aadcbf9f78735320a6d5aedf8b77876c8ac8bbb95081ca55054c7eb" "0.16": url: "https://github.com/json-c/json-c/archive/json-c-0.16-20220414.tar.gz" sha256: "3ecaeedffd99a60b1262819f9e60d7d983844073abc74e495cb822b251904185" diff --git a/recipes/json-c/config.yml b/recipes/json-c/config.yml index 1e4023fe84046..301a8d09f5b3a 100644 --- a/recipes/json-c/config.yml +++ b/recipes/json-c/config.yml @@ -1,4 +1,6 @@ versions: + "0.17": + folder: all "0.16": folder: all "0.15": From 3f28198497dafd9fe2cce348d2a7c182b7d3d7e0 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Thu, 17 Aug 2023 07:27:25 +0200 Subject: [PATCH 244/637] (#19180) onnxruntime: bump deps --- recipes/onnxruntime/all/conanfile.py | 10 +++++----- .../patches/1.14.1-0002-cmake-dependencies.patch | 13 ------------- .../patches/1.15.1-0001-cmake-dependencies.patch | 13 ------------- 3 files changed, 5 insertions(+), 31 deletions(-) diff --git a/recipes/onnxruntime/all/conanfile.py b/recipes/onnxruntime/all/conanfile.py index 7d8bf9dd19bda..f8951c6e25374 100644 --- a/recipes/onnxruntime/all/conanfile.py +++ b/recipes/onnxruntime/all/conanfile.py @@ -72,22 +72,22 @@ def _onnx_version(self): }[f"{version.major}.{version.minor}"] def requirements(self): - self.requires("abseil/20230125.2") + self.requires("abseil/20230125.3") self.requires("protobuf/3.21.9") self.requires("date/3.0.1") self.requires("re2/20230301") self.requires(f"onnx/{self._onnx_version}") self.requires("flatbuffers/1.12.0") - self.requires("boost/1.81.0", headers=True, libs=False, run=False) # for mp11, header only, no need for libraries to link/run + self.requires("boost/1.82.0", headers=True, libs=False, run=False) # for mp11, header only, no need for libraries to link/run self.requires("safeint/3.0.28") self.requires("nlohmann_json/3.11.2") self.requires("eigen/3.4.0") self.requires("ms-gsl/4.0.0") - self.requires("cpuinfo/cci.20220228") + self.requires("cpuinfo/cci.20220618") if self.settings.os != "Windows": - self.requires("nsync/1.25.0") + self.requires("nsync/1.26.0") else: - self.requires("wil/1.0.230202.1") + self.requires("wil/1.0.230629.1") if self.options.with_xnnpack: self.requires("xnnpack/cci.20220801") diff --git a/recipes/onnxruntime/all/patches/1.14.1-0002-cmake-dependencies.patch b/recipes/onnxruntime/all/patches/1.14.1-0002-cmake-dependencies.patch index 9d0a0f6763613..6dbbfc4af9df4 100644 --- a/recipes/onnxruntime/all/patches/1.14.1-0002-cmake-dependencies.patch +++ b/recipes/onnxruntime/all/patches/1.14.1-0002-cmake-dependencies.patch @@ -149,19 +149,6 @@ index 1fc2c6ccdc..a2c28957f9 100644 set(onnxruntime_EXTERNAL_LIBRARIES_XNNPACK XNNPACK pthreadpool) -diff --git a/cmake/onnxruntime_common.cmake b/cmake/onnxruntime_common.cmake -index 0410d3361c..685df7a487 100644 ---- a/cmake/onnxruntime_common.cmake -+++ b/cmake/onnxruntime_common.cmake -@@ -195,7 +195,7 @@ if (ARM64 OR ARM OR X86 OR X64 OR X86_64) - # Its functionality in detecting x86 cpu features are lacking, so is support for Windows. - if (CPUINFO_SUPPORTED) - onnxruntime_add_include_to_target(onnxruntime_common cpuinfo::cpuinfo) -- list(APPEND onnxruntime_EXTERNAL_LIBRARIES cpuinfo::cpuinfo cpuinfo::clog) -+ list(APPEND onnxruntime_EXTERNAL_LIBRARIES cpuinfo::cpuinfo) - endif() - endif() - endif() diff --git a/cmake/onnxruntime_providers.cmake b/cmake/onnxruntime_providers.cmake index 7a99bac233..bbf1955494 100644 --- a/cmake/onnxruntime_providers.cmake diff --git a/recipes/onnxruntime/all/patches/1.15.1-0001-cmake-dependencies.patch b/recipes/onnxruntime/all/patches/1.15.1-0001-cmake-dependencies.patch index 7da019aa807e9..bee9115bc809e 100644 --- a/recipes/onnxruntime/all/patches/1.15.1-0001-cmake-dependencies.patch +++ b/recipes/onnxruntime/all/patches/1.15.1-0001-cmake-dependencies.patch @@ -142,19 +142,6 @@ index 1fc2c6ccdc..a2c28957f9 100644 set(onnxruntime_EXTERNAL_LIBRARIES_XNNPACK XNNPACK pthreadpool) -diff --git a/cmake/onnxruntime_common.cmake b/cmake/onnxruntime_common.cmake -index 0410d3361c..685df7a487 100644 ---- a/cmake/onnxruntime_common.cmake -+++ b/cmake/onnxruntime_common.cmake -@@ -195,7 +195,7 @@ if (ARM64 OR ARM OR X86 OR X64 OR X86_64) - # Its functionality in detecting x86 cpu features are lacking, so is support for Windows. - if (CPUINFO_SUPPORTED) - onnxruntime_add_include_to_target(onnxruntime_common cpuinfo::cpuinfo) -- list(APPEND onnxruntime_EXTERNAL_LIBRARIES cpuinfo::cpuinfo cpuinfo::clog) -+ list(APPEND onnxruntime_EXTERNAL_LIBRARIES cpuinfo::cpuinfo) - endif() - endif() - endif() diff --git a/cmake/onnxruntime_providers.cmake b/cmake/onnxruntime_providers.cmake index 0daa1b8a3d..1f25467a8c 100644 --- a/cmake/onnxruntime_providers.cmake From 9e96c5b7242eab7c628d3af961793d2c0863385e Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 17 Aug 2023 08:44:48 +0300 Subject: [PATCH 245/637] (#18115) panzi-portable-endian: migrate to Conan v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * panzi-portable-endian: migrate to Conan v2 * panzi-portable-endian: convert test_package from C++ to C * panzi-portable-endian: restore test_v1_package * panzi-portable-endian: add cmake_find_package_multi generator to test_v1_package * panzi-portable-endian: bump version for MSVC bugfix * panzi-portable-endian: restore VirtualRunEnv in test_package * Set proper license --------- Co-authored-by: Rubén Rincón --- .../panzi-portable-endian/all/conandata.yml | 6 +-- .../panzi-portable-endian/all/conanfile.py | 45 +++++++++++-------- .../all/test_package/CMakeLists.txt | 12 +++-- .../all/test_package/conanfile.py | 21 ++++++--- .../{test_package.cpp => test_package.c} | 2 +- .../all/test_v1_package/CMakeLists.txt | 8 ++++ .../all/test_v1_package/conanfile.py | 17 +++++++ recipes/panzi-portable-endian/config.yml | 2 +- 8 files changed, 77 insertions(+), 36 deletions(-) rename recipes/panzi-portable-endian/all/test_package/{test_package.cpp => test_package.c} (81%) create mode 100644 recipes/panzi-portable-endian/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/panzi-portable-endian/all/test_v1_package/conanfile.py diff --git a/recipes/panzi-portable-endian/all/conandata.yml b/recipes/panzi-portable-endian/all/conandata.yml index 5cba065a6c822..a4dfc7805d29c 100644 --- a/recipes/panzi-portable-endian/all/conandata.yml +++ b/recipes/panzi-portable-endian/all/conandata.yml @@ -1,4 +1,4 @@ sources: - "cci.20150416": - url: "https://gist.github.com/panzi/6856583/archive/1eca2ab34f2301b9641aa73d1016b951fff3fc39.zip" - sha256: "488d5d08215f657e769b31764013ef845355832cc6f1d165e1809fa5fe168eeb" + "cci.20220509": + url: "https://gist.github.com/panzi/6856583/archive/f6512b0830a4e9e06b26e32fc2509d67bbfa93d8.zip" + sha256: "88593bad9a1050779e98f93194b028566df575e06da9f8a60e44fa97a36b92f8" diff --git a/recipes/panzi-portable-endian/all/conanfile.py b/recipes/panzi-portable-endian/all/conanfile.py index 9c18999c225be..5655ba304a520 100644 --- a/recipes/panzi-portable-endian/all/conanfile.py +++ b/recipes/panzi-portable-endian/all/conanfile.py @@ -1,34 +1,43 @@ import os -from conans import ConanFile, tools + +from conan import ConanFile +from conan.tools.files import copy, get, load, save +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.52.0" class PanziPortableEndian(ConanFile): name = "panzi-portable-endian" + description = ("This provides the endian conversion functions from " + "endian.h on Windows, Linux, *BSD, and Mac OS X") + license = "LicenseRef-panzi-portable-endian-public-domain" url = "https://github.com/conan-io/conan-center-index" homepage = "https://gist.github.com/panzi/6856583" - description = "This provides the endian conversion functions form endian.h on Windows, Linux, *BSD, and Mac OS X" - topics = ("conan", "endian") - license = "Unlicense" + topics = ("endian", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True - @property - def _source_subfolder(self): - return "source_subfolder" + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def _extract_license(self): - header = tools.load(os.path.join( - self._source_subfolder, "portable_endian.h")) - license_contents = header[0:(header.find("#ifndef", 1))] - tools.save("LICENSE", license_contents) + header = load(self, os.path.join(self.source_folder, "portable_endian.h")) + license_contents = header[0: (header.find("#ifndef", 1))] + save(self, os.path.join(self.package_folder, "licenses", "LICENSE"), license_contents) def package(self): self._extract_license() - self.copy("LICENSE", dst="licenses") - self.copy(pattern="*.h", dst="include", - src=self._source_subfolder, keep_path=False) + copy(self, "*.h", dst=os.path.join(self.package_folder, "include"), src=self.source_folder, keep_path=False) - def package_id(self): - self.info.header_only() + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/panzi-portable-endian/all/test_package/CMakeLists.txt b/recipes/panzi-portable-endian/all/test_package/CMakeLists.txt index 454c47bb2cbab..272ae426964be 100644 --- a/recipes/panzi-portable-endian/all/test_package/CMakeLists.txt +++ b/recipes/panzi-portable-endian/all/test_package/CMakeLists.txt @@ -1,9 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package CXX) +cmake_minimum_required(VERSION 3.15) +project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(panzi-portable-endian REQUIRED CONFIG) -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE panzi-portable-endian::panzi-portable-endian) diff --git a/recipes/panzi-portable-endian/all/test_package/conanfile.py b/recipes/panzi-portable-endian/all/test_package/conanfile.py index a59a26a52c8dc..ef5d7042163ec 100644 --- a/recipes/panzi-portable-endian/all/test_package/conanfile.py +++ b/recipes/panzi-portable-endian/all/test_package/conanfile.py @@ -1,10 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/panzi-portable-endian/all/test_package/test_package.cpp b/recipes/panzi-portable-endian/all/test_package/test_package.c similarity index 81% rename from recipes/panzi-portable-endian/all/test_package/test_package.cpp rename to recipes/panzi-portable-endian/all/test_package/test_package.c index d5884326032ea..8a45d0928397d 100644 --- a/recipes/panzi-portable-endian/all/test_package/test_package.cpp +++ b/recipes/panzi-portable-endian/all/test_package/test_package.c @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/recipes/panzi-portable-endian/all/test_v1_package/CMakeLists.txt b/recipes/panzi-portable-endian/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/panzi-portable-endian/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/panzi-portable-endian/all/test_v1_package/conanfile.py b/recipes/panzi-portable-endian/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..abcaeed3f89b6 --- /dev/null +++ b/recipes/panzi-portable-endian/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/panzi-portable-endian/config.yml b/recipes/panzi-portable-endian/config.yml index 5b6ed6e7fb074..dcdd7cd8a501e 100644 --- a/recipes/panzi-portable-endian/config.yml +++ b/recipes/panzi-portable-endian/config.yml @@ -1,3 +1,3 @@ versions: - "cci.20150416": + "cci.20220509": folder: all From 966858bb4a8db12d90f15a7ddec2c7f39cd5340d Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 17 Aug 2023 09:05:31 +0300 Subject: [PATCH 246/637] (#18170) aggeom-agg: add package_type, tidy * aggeom-agg: add package_type, tidy * aggeom-agg: restore test_v1_package --------- Co-authored-by: Carlos Zoido --- recipes/aggeom-agg/all/conanfile.py | 119 +++++++++--------- .../all/test_v1_package/CMakeLists.txt | 6 +- 2 files changed, 61 insertions(+), 64 deletions(-) diff --git a/recipes/aggeom-agg/all/conanfile.py b/recipes/aggeom-agg/all/conanfile.py index 55a67e88a5f75..991d2d1af6b1e 100644 --- a/recipes/aggeom-agg/all/conanfile.py +++ b/recipes/aggeom-agg/all/conanfile.py @@ -1,49 +1,43 @@ +import os + from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import copy, get, rmdir -from conan.errors import ConanInvalidConfiguration - -import os required_conan_version = ">=1.53.0" class AggConan(ConanFile): - name = 'aggeom-agg' - description = 'AGG Anti-Grain Geometry Library' - topics = ('graphics') + name = "aggeom-agg" + description = "AGG Anti-Grain Geometry Library" + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" - homepage = 'https://github.com/aggeom' - license = 'BSD-3-Clause' + homepage = "https://github.com/aggeom" + topics = ("graphics",) - settings = 'os', 'arch', 'compiler', 'build_type' + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { - 'shared': [True, False], - 'fPIC': [True, False], - 'with_gpc': [True, False], - 'with_freetype': [True, False], - 'with_agg2d': [True, False], - 'with_agg2d_freetype': [True, False], - 'with_platform': [True, False], - 'with_controls': [True, False], + "shared": [True, False], + "fPIC": [True, False], + "with_gpc": [True, False], + "with_freetype": [True, False], + "with_agg2d": [True, False], + "with_agg2d_freetype": [True, False], + "with_platform": [True, False], + "with_controls": [True, False], } - default_options = { - 'shared': False, - 'fPIC': True, - 'with_gpc': True, - 'with_freetype': True, - 'with_agg2d': True, - 'with_agg2d_freetype': True, - 'with_platform': True, - 'with_controls': True, + "shared": False, + "fPIC": True, + "with_gpc": True, + "with_freetype": True, + "with_agg2d": True, + "with_agg2d_freetype": True, + "with_platform": True, + "with_controls": True, } - def validate(self): - if self.settings.os not in ("Windows", "Linux"): - raise ConanInvalidConfiguration("OS is not supported") - if self.options.shared: - raise ConanInvalidConfiguration("Invalid configuration") - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -51,31 +45,37 @@ def config_options(self): def configure(self): self.options.rm_safe("fPIC") - def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) - def layout(self): cmake_layout(self, src_folder="src") def requirements(self): if self.options.with_freetype: - self.requires('freetype/2.13.0') + self.requires("freetype/2.13.0") if self.options.with_platform and self.settings.os in ["Linux"]: self.requires("xorg/system") + def validate(self): + if self.settings.os not in ("Windows", "Linux"): + raise ConanInvalidConfiguration("OS is not supported") + if self.options.shared: + raise ConanInvalidConfiguration("Invalid configuration") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + def generate(self): tc = CMakeToolchain(self) - tc.variables['agg_USE_EXPAT'] = False - tc.variables['agg_USE_SDL_PLATFORM'] = False - tc.variables['agg_BUILD_DEMO'] = False - tc.variables['agg_BUILD_EXAMPLES'] = False - - tc.variables['agg_USE_GPC'] = self.options.with_gpc - tc.variables['agg_USE_FREETYPE'] = self.options.with_freetype - tc.variables['agg_USE_AGG2D'] = self.options.with_agg2d - tc.variables['agg_USE_AGG2D_FREETYPE'] = self.options.with_agg2d_freetype - tc.variables['agg_BUILD_PLATFORM'] = self.options.with_platform - tc.variables['agg_BUILD_CONTROLS'] = self.options.with_controls + tc.variables["agg_USE_EXPAT"] = False + tc.variables["agg_USE_SDL_PLATFORM"] = False + tc.variables["agg_BUILD_DEMO"] = False + tc.variables["agg_BUILD_EXAMPLES"] = False + + tc.variables["agg_USE_GPC"] = self.options.with_gpc + tc.variables["agg_USE_FREETYPE"] = self.options.with_freetype + tc.variables["agg_USE_AGG2D"] = self.options.with_agg2d + tc.variables["agg_USE_AGG2D_FREETYPE"] = self.options.with_agg2d_freetype + tc.variables["agg_BUILD_PLATFORM"] = self.options.with_platform + tc.variables["agg_BUILD_CONTROLS"] = self.options.with_controls tc.generate() @@ -95,12 +95,11 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): - self.cpp_info.set_property("cmake_file_name", "agg") - self.cpp_info.filenames["cmake_find_package"]="agg" - self.cpp_info.filenames["cmake_find_package_multi"]="agg" - self.cpp_info.names["cmake_find_package"]="agg" - self.cpp_info.names["cmake_find_package_multi"]="agg" + self.cpp_info.filenames["cmake_find_package"] = "agg" + self.cpp_info.filenames["cmake_find_package_multi"] = "agg" + self.cpp_info.names["cmake_find_package"] = "agg" + self.cpp_info.names["cmake_find_package_multi"] = "agg" self.cpp_info.components["agg"].set_property("cmake_target_name", "agg::agg") self.cpp_info.components["agg"].libs = ["agg"] @@ -109,33 +108,31 @@ def package_info(self): if self.options.with_freetype: self.cpp_info.components["fontfreetype"].set_property("cmake_target_name", "agg::fontfreetype") self.cpp_info.components["fontfreetype"].libs = ["aggfontfreetype"] - self.cpp_info.components["fontfreetype"].includedirs = [os.path.join("include", "agg","fontfreetype")] + self.cpp_info.components["fontfreetype"].includedirs = [os.path.join("include", "agg", "fontfreetype")] self.cpp_info.components["fontfreetype"].requires = ["agg", "freetype::freetype"] - + if self.options.with_gpc: self.cpp_info.components["gpc"].set_property("cmake_target_name", "agg::gpc") - self.cpp_info.components["gpc"].libs = [ "agggpc"] - self.cpp_info.components["gpc"].includedirs = [os.path.join("include", "agg","gpc")] - + self.cpp_info.components["gpc"].libs = ["agggpc"] + self.cpp_info.components["gpc"].includedirs = [os.path.join("include", "agg", "gpc")] if self.options.with_agg2d: self.cpp_info.components["2d"].set_property("cmake_target_name", "agg::2d") self.cpp_info.components["2d"].libs = ["agg2d"] - self.cpp_info.components["2d"].includedirs = [os.path.join("include", "agg","2d")] + self.cpp_info.components["2d"].includedirs = [os.path.join("include", "agg", "2d")] self.cpp_info.components["2d"].requires = ["agg"] if self.options.with_agg2d_freetype: self.cpp_info.components["2d"].requires = ["agg", "fontfreetype"] if self.options.with_platform: - self.cpp_info.components["platform"].set_property("cmake_target_name", "agg::platform") self.cpp_info.components["platform"].libs = ["aggplatform"] - self.cpp_info.components["platform"].includedirs = [os.path.join("include", "agg","platform")] + self.cpp_info.components["platform"].includedirs = [os.path.join("include", "agg", "platform")] if self.settings.os in ["Linux"]: self.cpp_info.components["platform"].requires = ["xorg::xorg", "agg"] if self.options.with_controls: self.cpp_info.components["controls"].set_property("cmake_target_name", "agg::controls") self.cpp_info.components["controls"].libs = ["aggctrl"] - self.cpp_info.components["controls"].includedirs = [os.path.join("include", "agg","ctrl")] + self.cpp_info.components["controls"].includedirs = [os.path.join("include", "agg", "ctrl")] self.cpp_info.components["controls"].requires = ["agg"] diff --git a/recipes/aggeom-agg/all/test_v1_package/CMakeLists.txt b/recipes/aggeom-agg/all/test_v1_package/CMakeLists.txt index 0d20897301b68..91630d79f4abb 100644 --- a/recipes/aggeom-agg/all/test_v1_package/CMakeLists.txt +++ b/recipes/aggeom-agg/all/test_v1_package/CMakeLists.txt @@ -1,8 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) From a31873c0eed25c3536429ef1ef19459eb0b66605 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 17 Aug 2023 09:25:01 +0300 Subject: [PATCH 247/637] (#18205) maddy: migrate to Conan v2 * maddy: migrate to Conan v2 * maddy: restore test_v1_package --- recipes/maddy/all/conanfile.py | 53 +++++++++---------- recipes/maddy/all/test_package/CMakeLists.txt | 13 +++-- recipes/maddy/all/test_package/conanfile.py | 19 +++++-- recipes/maddy/all/test_package/example.cpp | 0 .../maddy/all/test_v1_package/CMakeLists.txt | 8 +++ .../maddy/all/test_v1_package/conanfile.py | 17 ++++++ 6 files changed, 69 insertions(+), 41 deletions(-) mode change 100755 => 100644 recipes/maddy/all/test_package/example.cpp create mode 100755 recipes/maddy/all/test_v1_package/CMakeLists.txt create mode 100755 recipes/maddy/all/test_v1_package/conanfile.py diff --git a/recipes/maddy/all/conanfile.py b/recipes/maddy/all/conanfile.py index 7bcdd1cec24d5..1cc4a8a062ec2 100644 --- a/recipes/maddy/all/conanfile.py +++ b/recipes/maddy/all/conanfile.py @@ -1,47 +1,42 @@ -from conans import ConanFile, tools import os -required_conan_version = ">=1.33.0" +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 MaddyConan(ConanFile): name = "maddy" + description = "open-source, maddy is a C++ Markdown to HTML header-only parser library." + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/progsource/maddy" - description = ( - "open-source, maddy is a C++ Markdown to HTML header-only parser library." - ) - topics = ("maddy", "markdown", "header-only") - license = "MIT" + topics = ("markdown", "header-only") + + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True - @property - def _source_subfolder(self): - return "source_subfolder" + 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"): - tools.check_min_cppstd(self, 14) + check_min_cppstd(self, 14) def source(self): - tools.get( - **self.conan_data["sources"][self.version], - destination=self._source_subfolder, - strip_root=True - ) - - def package_id(self): - self.info.header_only() + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy( - "LICENSE", - src=os.path.join(self.source_folder, self._source_subfolder), - dst="licenses", - ) - self.copy( - pattern="maddy/*.h", - src=os.path.join(self.source_folder, self._source_subfolder, "include"), - dst="include", - ) + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, pattern="maddy/*.h", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/maddy/all/test_package/CMakeLists.txt b/recipes/maddy/all/test_package/CMakeLists.txt index b85bbd5581573..8b3d049ce58f5 100755 --- a/recipes/maddy/all/test_package/CMakeLists.txt +++ b/recipes/maddy/all/test_package/CMakeLists.txt @@ -1,12 +1,11 @@ -cmake_minimum_required(VERSION 3.5) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) find_package(maddy REQUIRED CONFIG) add_executable(${PROJECT_NAME} example.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE maddy::maddy) -set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED - ON) +set_target_properties(${PROJECT_NAME} PROPERTIES + CXX_STANDARD 14 + CXX_STANDARD_REQUIRED ON +) diff --git a/recipes/maddy/all/test_package/conanfile.py b/recipes/maddy/all/test_package/conanfile.py index 38f4483872d47..ef5d7042163ec 100755 --- a/recipes/maddy/all/test_package/conanfile.py +++ b/recipes/maddy/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/maddy/all/test_package/example.cpp b/recipes/maddy/all/test_package/example.cpp old mode 100755 new mode 100644 diff --git a/recipes/maddy/all/test_v1_package/CMakeLists.txt b/recipes/maddy/all/test_v1_package/CMakeLists.txt new file mode 100755 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/maddy/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/maddy/all/test_v1_package/conanfile.py b/recipes/maddy/all/test_v1_package/conanfile.py new file mode 100755 index 0000000000000..38f4483872d47 --- /dev/null +++ b/recipes/maddy/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 2c85b3b4769b2cdac6dc2511934ddce79b666c17 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 17 Aug 2023 09:44:15 +0300 Subject: [PATCH 248/637] (#18206) dbg-macro: migrate to Conan v2 * dbg-macro: migrate to Conan v2 * dbg-macro: restore test_v1_package * dbg-macro: add cmake_find_package_multi generator to test_v1_package * Set min_cppstd to C++17 * Fix layout * Update CMakeLists.txt * dbg-macro: restore VirtualRunEnv in test_package --- recipes/dbg-macro/all/conanfile.py | 27 +++++++++++++------ .../dbg-macro/all/test_package/CMakeLists.txt | 2 +- .../dbg-macro/all/test_package/conanfile.py | 6 ++--- .../all/test_v1_package/CMakeLists.txt | 8 ++++++ .../all/test_v1_package/conanfile.py | 18 +++++++++++++ 5 files changed, 48 insertions(+), 13 deletions(-) create mode 100644 recipes/dbg-macro/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/dbg-macro/all/test_v1_package/conanfile.py diff --git a/recipes/dbg-macro/all/conanfile.py b/recipes/dbg-macro/all/conanfile.py index 7fdad007c1070..5955544e24b0d 100644 --- a/recipes/dbg-macro/all/conanfile.py +++ b/recipes/dbg-macro/all/conanfile.py @@ -1,25 +1,32 @@ import os + from conan import ConanFile -from conan.tools.files import get, copy -from conan.tools.build import check_min_cppstd from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout from conan.tools.scm import Version +required_conan_version = ">=1.52.0" + class DbgMacroConan(ConanFile): name = "dbg-macro" + description = "A dbg(...) macro for C++" + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/sharkdp/dbg-macro" - license = "MIT" - description = "A dbg(...) macro for C++" topics = ("debugging", "macro", "pretty-printing", "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 source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) + def package_id(self): + self.info.clear() def validate(self): if self.settings.compiler.get_safe('cppstd'): @@ -33,9 +40,13 @@ def validate(self): if str(compiler) in min_versions and Version(compiler.version) < min_versions[str(compiler)]: raise ConanInvalidConfiguration("dbg-macro requires C++17 which your compiler does not support.") + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + def package(self): copy(self, "dbg.h", src=self.source_folder, dst=os.path.join(self.package_folder, "include")) copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - def package_id(self): - self.info.clear() + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/dbg-macro/all/test_package/CMakeLists.txt b/recipes/dbg-macro/all/test_package/CMakeLists.txt index 38914f6edfd7d..535b1e583d6c5 100644 --- a/recipes/dbg-macro/all/test_package/CMakeLists.txt +++ b/recipes/dbg-macro/all/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) find_package(dbg-macro REQUIRED CONFIG) diff --git a/recipes/dbg-macro/all/test_package/conanfile.py b/recipes/dbg-macro/all/test_package/conanfile.py index 61ef483bce067..2ee2f747a7393 100644 --- a/recipes/dbg-macro/all/test_package/conanfile.py +++ b/recipes/dbg-macro/all/test_package/conanfile.py @@ -1,16 +1,14 @@ import os from conan import ConanFile +from conan.tools.build import can_run from conan.tools.cmake import CMake, cmake_layout -from conan.tools.build import cross_building, can_run -from conan.tools.files import mkdir class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "CMakeDeps", "CMakeToolchain" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" test_type = "explicit" - def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/dbg-macro/all/test_v1_package/CMakeLists.txt b/recipes/dbg-macro/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/dbg-macro/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/dbg-macro/all/test_v1_package/conanfile.py b/recipes/dbg-macro/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..e9e25c6e641af --- /dev/null +++ b/recipes/dbg-macro/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + tools.mkdir("logs/") + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From d916e4dd25b4cecdeafe982de9bdb565df2f0715 Mon Sep 17 00:00:00 2001 From: Maksim Petukhov <6967052+maksim-petukhov@users.noreply.github.com> Date: Thu, 17 Aug 2023 09:04:22 +0200 Subject: [PATCH 249/637] (#18059) autoconf: fix msvc debug build for test_package --- recipes/autoconf/all/test_package/conanfile.py | 3 +++ recipes/autoconf/all/test_v1_package/conanfile.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/autoconf/all/test_package/conanfile.py b/recipes/autoconf/all/test_package/conanfile.py index bb22349ed9696..540a389d38f89 100644 --- a/recipes/autoconf/all/test_package/conanfile.py +++ b/recipes/autoconf/all/test_package/conanfile.py @@ -29,6 +29,9 @@ def generate(self): env = VirtualBuildEnv(self) env.generate() tc = AutotoolsToolchain(self) + if is_msvc(self): + tc.extra_cflags.append("-FS") + tc.extra_cxxflags.append("-FS") tc.generate() if is_msvc(self): env = Environment() diff --git a/recipes/autoconf/all/test_v1_package/conanfile.py b/recipes/autoconf/all/test_v1_package/conanfile.py index 422d5f44c10cf..7098a4c30759b 100644 --- a/recipes/autoconf/all/test_v1_package/conanfile.py +++ b/recipes/autoconf/all/test_v1_package/conanfile.py @@ -34,6 +34,8 @@ def build(self): self.run("{} --help".format(os.path.join(self.build_folder, "configure").replace("\\", "/")), win_bash=tools.os_info.is_windows) autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + if is_msvc(self): + autotools.flags.append("-FS") with self._build_context(): autotools.configure() autotools.make() From 842e078da29e162e2aa9820acdf28197678f3357 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 17 Aug 2023 10:24:42 +0300 Subject: [PATCH 250/637] (#18239) cotila: migrate to Conan v2 * cotila: migrate to Conan v2 * cotila: restore test_v1_package * cotila: disable MSVC builds due to an internal compiler error * cotila: restore VirtualRunEnv in test_package --- recipes/cotila/all/conanfile.py | 77 ++++++++++--------- .../cotila/all/test_package/CMakeLists.txt | 7 +- recipes/cotila/all/test_package/conanfile.py | 23 ++++-- .../cotila/all/test_v1_package/CMakeLists.txt | 8 ++ .../cotila/all/test_v1_package/conanfile.py | 17 ++++ 5 files changed, 84 insertions(+), 48 deletions(-) create mode 100644 recipes/cotila/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/cotila/all/test_v1_package/conanfile.py diff --git a/recipes/cotila/all/conanfile.py b/recipes/cotila/all/conanfile.py index eb47a8c74e0c9..cbc8f6be75064 100644 --- a/recipes/cotila/all/conanfile.py +++ b/recipes/cotila/all/conanfile.py @@ -1,66 +1,71 @@ -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration +import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" class CotilaConan(ConanFile): name = "cotila" description = "A compile time linear algebra system" - homepage = "https://github.com/calebzulawski/cotila" - topics = ("c++", "math", "linear algebra", "compile-time") license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" - no_copy_source = True + homepage = "https://github.com/calebzulawski/cotila" + topics = ("c++", "math", "linear algebra", "compile-time", "header-only") - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True @property def _min_cppstd(self): - return "17" + return 17 @property def _compilers_minimum_version(self): return { "gcc": "7", - "Visual Studio": "15.7", "clang": "6.0", "apple-clang": "10", + "Visual Studio": "15.7", + "msvc": "193", } - def validate(self): - if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, "17") + def layout(self): + basic_layout(self, src_folder="src") - def lazy_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] + def package_id(self): + self.info.clear() + def validate(self): + if is_msvc(self): + raise ConanInvalidConfiguration("cotila currently does not support MSVC. " + "See https://github.com/calebzulawski/cotila/issues/36.") + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if not minimum_version: - self.output.warn("{} {} requires C++17. Your compiler is unknown. Assuming it supports C++17.".format(self.name, self.version)) - elif lazy_lt_semver(str(self.settings.compiler.version), minimum_version): - raise ConanInvalidConfiguration("{} {} requires C++17, which your compiler does not support.".format(self.name, self.version)) - - - def package_id(self): - self.info.header_only() + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, - destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) - self.copy(pattern="include/*", src=self._source_subfolder) + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + copy(self, "*", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include")) def package_info(self): - self.cpp_info.names["cmake_find_package"] = "cotila" - self.cpp_info.names["cmake_find_package_multi"] = "cotila" - + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/cotila/all/test_package/CMakeLists.txt b/recipes/cotila/all/test_package/CMakeLists.txt index fb76dc36e1dc6..cf3db6db5cc45 100644 --- a/recipes/cotila/all/test_package/CMakeLists.txt +++ b/recipes/cotila/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup(TARGETS) - -find_package(cotila CONFIG REQUIRED) +find_package(cotila REQUIRED CONFIG) add_executable(test_package test_package.cpp) target_compile_features(test_package PRIVATE cxx_std_17) diff --git a/recipes/cotila/all/test_package/conanfile.py b/recipes/cotila/all/test_package/conanfile.py index e1ab7e3d234d6..ef5d7042163ec 100644 --- a/recipes/cotila/all/test_package/conanfile.py +++ b/recipes/cotila/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 CotilaTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" +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) @@ -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/cotila/all/test_v1_package/CMakeLists.txt b/recipes/cotila/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/cotila/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/cotila/all/test_v1_package/conanfile.py b/recipes/cotila/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..e1ab7e3d234d6 --- /dev/null +++ b/recipes/cotila/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class CotilaTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 539ca1b3f83cf90280055a0bc8e28ebc7889e842 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 17 Aug 2023 10:44:56 +0300 Subject: [PATCH 251/637] (#18240) immer: migrate to Conan v2 * immer: migrate to Conan v2 * immer: drop v0.6.2 test_package fails to build with it. * immer: restore test_v1_package * immer: fix removed version * immer: restore VirtualRunEnv in test_package --- recipes/immer/all/conandata.yml | 3 - recipes/immer/all/conanfile.py | 73 +++++++++++-------- recipes/immer/all/test_package/CMakeLists.txt | 9 +-- recipes/immer/all/test_package/conanfile.py | 21 ++++-- recipes/immer/all/test_package/example.cpp | 2 +- .../immer/all/test_v1_package/CMakeLists.txt | 8 ++ .../immer/all/test_v1_package/conanfile.py | 17 +++++ recipes/immer/config.yml | 2 - 8 files changed, 85 insertions(+), 50 deletions(-) create mode 100644 recipes/immer/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/immer/all/test_v1_package/conanfile.py diff --git a/recipes/immer/all/conandata.yml b/recipes/immer/all/conandata.yml index 811b858690dba..6d029402576cc 100644 --- a/recipes/immer/all/conandata.yml +++ b/recipes/immer/all/conandata.yml @@ -5,6 +5,3 @@ sources: "0.7.0": url: "https://github.com/arximboldi/immer/archive/v0.7.0.tar.gz" sha256: "cf67ab428aa3610eb0f72d0ea936c15cce3f91df26ee143ab783acd053507fe4" - "0.6.2": - url: "https://github.com/arximboldi/immer/archive/refs/tags/v0.6.2.tar.gz" - sha256: "c3bb8847034437dee64adacb04e1e0163ae640b596c582eb4c0aa1d7c6447cd7" diff --git a/recipes/immer/all/conanfile.py b/recipes/immer/all/conanfile.py index 952501519b554..b605235f93553 100644 --- a/recipes/immer/all/conanfile.py +++ b/recipes/immer/all/conanfile.py @@ -1,40 +1,32 @@ -from conans import ConanFile, tools, errors +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" -required_conan_version = ">=1.33.0" class ImmerConan(ConanFile): name = "immer" + description = "Postmodern immutable and persistent data structures for C++ - value semantics at scale" license = "BSL-1.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/arximboldi/immer" - description = "Postmodern immutable and persistent data structures for C++---value semantics at scale" - topics = ("header", "header-only", "persistent", "modern", "immutable", - "data structures", "functional", "value semantics", "postmodern", - "rrb-tree") + topics = ("header", "header-only", "persistent", "modern", "immutable", "data structures", + "functional", "value semantics", "postmodern", "rrb-tree") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True - settings = "compiler" @property def _minimum_cpp_standard(self): return 14 - @property - def _source_subfolder(self): - return "source_subfolder" - - def source(self): - tools.get(**self.conan_data["sources"][self.version], - strip_root=True, - destination=self._source_subfolder) - - def package(self): - include_folder = self._source_subfolder - self.copy(pattern="*.hpp", dst="include", src=include_folder) - self.copy(pattern="LICENSE", dst="licenses", src=include_folder) - - def package_id(self): - self.info.header_only() - @property def _minimum_compilers_version(self): # Reference: https://en.cppreference.com/w/cpp/compiler_support/14 @@ -44,17 +36,36 @@ def _minimum_compilers_version(self): "gcc": "6", "intel": "17", "sun-cc": "5.15", - "Visual Studio": "15" + "Visual Studio": "15", } + 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"): - tools.check_min_cppstd(self, self._minimum_cpp_standard) + check_min_cppstd(self, self._minimum_cpp_standard) min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) if not min_version: - self.output.warn("{} recipe lacks information about the {} compiler support.".format( - self.name, self.settings.compiler)) + self.output.warning(f"{self.name} recipe lacks information about the {self.settings.compiler} compiler support.") else: - if tools.Version(self.settings.compiler.version) < min_version: - raise errors.ConanInvalidConfiguration("{} requires C++{} support. The current compiler {} {} does not support it.".format( - self.name, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler.version)) + if Version(self.settings.compiler.version) < min_version: + raise ConanInvalidConfiguration( + f"{self.name} requires C++{self._minimum_cpp_standard} support. The current compiler" + f" {self.settings.compiler} {self.settings.compiler.version} does not support it." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + include_folder = self.source_folder + copy(self, pattern="*.hpp", dst=os.path.join(self.package_folder, "include"), src=include_folder) + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=include_folder) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/immer/all/test_package/CMakeLists.txt b/recipes/immer/all/test_package/CMakeLists.txt index 870b269d2d660..c9d3024076801 100644 --- a/recipes/immer/all/test_package/CMakeLists.txt +++ b/recipes/immer/all/test_package/CMakeLists.txt @@ -1,13 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(PackageTest CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(immer CONFIG REQUIRED) +find_package(immer REQUIRED CONFIG) add_executable(example example.cpp) - target_link_libraries(example immer::immer) - target_compile_features(example PUBLIC cxx_std_14) diff --git a/recipes/immer/all/test_package/conanfile.py b/recipes/immer/all/test_package/conanfile.py index 0242d96a644ca..8d52b7021efe1 100644 --- a/recipes/immer/all/test_package/conanfile.py +++ b/recipes/immer/all/test_package/conanfile.py @@ -1,10 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "example") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "example") + self.run(bin_path, env="conanrun") diff --git a/recipes/immer/all/test_package/example.cpp b/recipes/immer/all/test_package/example.cpp index 3778564a31082..78e26ad5b37e6 100644 --- a/recipes/immer/all/test_package/example.cpp +++ b/recipes/immer/all/test_package/example.cpp @@ -1,5 +1,5 @@ #include "immer/vector.hpp" -#include +#include int main() { const auto v0 = immer::vector{}; diff --git a/recipes/immer/all/test_v1_package/CMakeLists.txt b/recipes/immer/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/immer/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/immer/all/test_v1_package/conanfile.py b/recipes/immer/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..0242d96a644ca --- /dev/null +++ b/recipes/immer/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "example") + self.run(bin_path, run_environment=True) diff --git a/recipes/immer/config.yml b/recipes/immer/config.yml index 9e53a8732b403..7090494339fd4 100644 --- a/recipes/immer/config.yml +++ b/recipes/immer/config.yml @@ -3,5 +3,3 @@ versions: folder: all "0.7.0": folder: all - "0.6.2": - folder: all From 446330367ec0083e16c18034a28dbb44ca2dad8f Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 17 Aug 2023 11:06:02 +0300 Subject: [PATCH 252/637] (#18243) fpgen: migrate to Conan v2 * fpgen: migrate to Conan v2 * fpgen: restore test_v1_package * fpgen: fix package() * fpgen: drop older version with broken clang and msvc support --- recipes/fpgen/all/conandata.yml | 3 - recipes/fpgen/all/conanfile.py | 104 +++++++----------- recipes/fpgen/all/test_package/CMakeLists.txt | 5 +- recipes/fpgen/all/test_package/conanfile.py | 22 ++-- recipes/fpgen/all/test_package/main.cpp | 9 +- .../fpgen/all/test_v1_package/CMakeLists.txt | 8 ++ .../fpgen/all/test_v1_package/conanfile.py | 18 +++ recipes/fpgen/config.yml | 2 - 8 files changed, 89 insertions(+), 82 deletions(-) create mode 100644 recipes/fpgen/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/fpgen/all/test_v1_package/conanfile.py diff --git a/recipes/fpgen/all/conandata.yml b/recipes/fpgen/all/conandata.yml index 89315a6f71ce4..0ed9b7cc136ee 100644 --- a/recipes/fpgen/all/conandata.yml +++ b/recipes/fpgen/all/conandata.yml @@ -1,7 +1,4 @@ sources: - "1.1.0": - url: "https://github.com/jay-tux/fpgen/archive/refs/tags/v1.1.0.tar.gz" - sha256: "5e5faf1fbdcb3d93306bd8a838f805afdccdbb9076d78356ad5443943555be7d" "1.1.0-clang": url: "https://github.com/jay-tux/fpgen/archive/refs/tags/v1.1.0-clang.tar.gz" sha256: "02936c1e790bcdba1479cf8164596b05cfc5b7401b3c71e0a1fd77e51fe8b93f" diff --git a/recipes/fpgen/all/conanfile.py b/recipes/fpgen/all/conanfile.py index b9e1ea43fa34a..46fc8ca2ceba0 100644 --- a/recipes/fpgen/all/conanfile.py +++ b/recipes/fpgen/all/conanfile.py @@ -1,94 +1,74 @@ import os -from conans import ConanFile, 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.files import copy, get, replace_in_file +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" class FpgenConan(ConanFile): name = "fpgen" - description = " Functional programming in C++ using C++20 coroutines." + description = "Functional programming in C++ using C++20 coroutines." license = ["MPL2"] - topics = ( - "generators", - "coroutines", - "c++20", - "header-only", - "functional-programming", - "functional", - ) - homepage = "https://github.com/jay-tux/fpgen/" url = "https://github.com/conan-io/conan-center-index" - settings = "arch", "os", "compiler", "build_type" - no_copy_source = True + homepage = "https://github.com/jay-tux/fpgen/" + topics = ("generators", "coroutines", "c++20", "header-only", "functional-programming", "functional") - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True @property def _min_cppstd(self): - return "20" + return 20 @property def _compilers_minimum_version(self): return { "gcc": "11", "clang": "13", + "apple-clang": "13.1", + "Visual Studio": "16", + "msvc": "192", } - def package_id(self): - self.info.header_only() + def layout(self): + basic_layout(self, src_folder="src") - def source(self): - tools.get( - **self.conan_data["sources"][self.version], - destination=self._source_subfolder, - strip_root=True, - ) + def package_id(self): + self.info.clear() def validate(self): - if self.settings.compiler == "clang" and "clang" not in str(self.version): - raise ConanInvalidConfiguration( - f"Use '{self.version}-clang' for Clang support." - ) - - if ( - self.settings.compiler == "clang" - and not self.settings.compiler.libcxx == "libc++" - ): - raise ConanInvalidConfiguration( - f"Use 'compiler.libcxx=libc++' for {self.name} on Clang." - ) + if self.settings.compiler == "clang" and not self.settings.compiler.libcxx == "libc++": + raise ConanInvalidConfiguration(f"Use 'compiler.libcxx=libc++' with Clang for {self.name}.") if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, self._min_cppstd) - - def lazy_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] - - minimum_version = self._compilers_minimum_version.get( - str(self.settings.compiler), False - ) - if not minimum_version: - raise ConanInvalidConfiguration( - f"{self.name} is currently not available for your compiler." - ) - elif lazy_lt_semver(str(self.settings.compiler.version), minimum_version): + 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.name} {self.version} requires C++20, which your compiler does not support." + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + def package(self): - self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) - self.copy( - pattern="*.hpp", - dst=os.path.join("include", "fpgen"), - src=self._source_subfolder, - keep_path=False, - ) + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + copy(self, "*.hpp", + dst=os.path.join(self.package_folder, "include", "fpgen"), + src=self.source_folder, + keep_path=False) def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.includedirs.append(os.path.join("include", "fpgen")) diff --git a/recipes/fpgen/all/test_package/CMakeLists.txt b/recipes/fpgen/all/test_package/CMakeLists.txt index 2d7e6737381f9..7013b94735f0f 100644 --- a/recipes/fpgen/all/test_package/CMakeLists.txt +++ b/recipes/fpgen/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - find_package(fpgen REQUIRED CONFIG) add_executable(${PROJECT_NAME} main.cpp) diff --git a/recipes/fpgen/all/test_package/conanfile.py b/recipes/fpgen/all/test_package/conanfile.py index 3f4a9f50f389e..ef5d7042163ec 100644 --- a/recipes/fpgen/all/test_package/conanfile.py +++ b/recipes/fpgen/all/test_package/conanfile.py @@ -1,11 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools - class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/fpgen/all/test_package/main.cpp b/recipes/fpgen/all/test_package/main.cpp index 43bf51fe320f0..d9d39d7a4b608 100644 --- a/recipes/fpgen/all/test_package/main.cpp +++ b/recipes/fpgen/all/test_package/main.cpp @@ -1,13 +1,14 @@ +#include "fpgen/fpgen.hpp" + #include #include -#include "fpgen/fpgen.hpp" int main() { - std::vector vals = {0,1,2,3}; + std::vector vals = {0, 1, 2, 3}; auto gen = fpgen::from(vals); - for(auto &&val : gen) { - std::cout << val << std::endl; + for (auto &&val : gen) { + std::cout << val << std::endl; } return 0; } diff --git a/recipes/fpgen/all/test_v1_package/CMakeLists.txt b/recipes/fpgen/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/fpgen/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/fpgen/all/test_v1_package/conanfile.py b/recipes/fpgen/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..3f4a9f50f389e --- /dev/null +++ b/recipes/fpgen/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/fpgen/config.yml b/recipes/fpgen/config.yml index ec935d5cf64ff..2786096f9ff86 100644 --- a/recipes/fpgen/config.yml +++ b/recipes/fpgen/config.yml @@ -1,5 +1,3 @@ versions: - "1.1.0": - folder: all "1.1.0-clang": folder: all From 1731012f043ef2981e286990c42694523395d258 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 17 Aug 2023 11:30:28 +0300 Subject: [PATCH 253/637] (#18246) rangeless: migrate to Conan v2 * rangeless: migrate to Conan v2 * rangeless: restore test_v1_package * rangeless: add compilers_minimum_version check * rangeless: fix recipe bug * rangeless: restore VirtualRunEnv in test_package --- recipes/rangeless/all/conanfile.py | 64 ++++++++++++++----- .../rangeless/all/test_package/CMakeLists.txt | 9 ++- .../rangeless/all/test_package/conanfile.py | 22 +++++-- .../all/test_package/test_package.cpp | 2 +- .../all/test_v1_package/CMakeLists.txt | 8 +++ .../all/test_v1_package/conanfile.py | 16 +++++ 6 files changed, 93 insertions(+), 28 deletions(-) create mode 100644 recipes/rangeless/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/rangeless/all/test_v1_package/conanfile.py diff --git a/recipes/rangeless/all/conanfile.py b/recipes/rangeless/all/conanfile.py index d37a7eb54aeb3..4eb06ece4e627 100644 --- a/recipes/rangeless/all/conanfile.py +++ b/recipes/rangeless/all/conanfile.py @@ -1,34 +1,66 @@ -from conans import ConanFile, tools import os -import glob + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + class RangelessConan(ConanFile): name = "rangeless" description = "c++ LINQ -like library of higher-order functions for data manipulation" license = "MIT" - homepage = "https://github.com/ast-al/rangeless" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ast-al/rangeless" topics = ("range", "linq", "lazy-evaluation", "header-only") - settings = "compiler" + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 14 - def configure(self): - minimal_cpp_standard = "14" - if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, minimal_cpp_standard) + @property + def _compilers_minimum_version(self): + return { + "gcc": "5", + "clang": "3.4", + "apple-clang": "10", + "Visual Studio": "14", + "msvc": "191", + } + + def layout(self): + basic_layout(self, src_folder="src") def package_id(self): - self.info.header_only() + self.info.clear() + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.get_safe("compiler.version")) < minimum_version: + raise ConanInvalidConfiguration(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]) - extracted_dir = glob.glob(self.name + "-*/")[0] - os.rename(extracted_dir, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - self.copy("*.hpp", dst="include", src=os.path.join(self._source_subfolder, "include")) + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + copy(self, "*.hpp", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/rangeless/all/test_package/CMakeLists.txt b/recipes/rangeless/all/test_package/CMakeLists.txt index 5e1e9d9b89fe0..6f31fb97ff44c 100644 --- a/recipes/rangeless/all/test_package/CMakeLists.txt +++ b/recipes/rangeless/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(rangeless REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE rangeless::rangeless) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) diff --git a/recipes/rangeless/all/test_package/conanfile.py b/recipes/rangeless/all/test_package/conanfile.py index 6c9d5dba712c7..ef5d7042163ec 100644 --- a/recipes/rangeless/all/test_package/conanfile.py +++ b/recipes/rangeless/all/test_package/conanfile.py @@ -1,9 +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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -11,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/rangeless/all/test_package/test_package.cpp b/recipes/rangeless/all/test_package/test_package.cpp index 4f49c17e155f2..96e45179153e6 100644 --- a/recipes/rangeless/all/test_package/test_package.cpp +++ b/recipes/rangeless/all/test_package/test_package.cpp @@ -11,7 +11,7 @@ int main() { values = std::move(values) % fn::where([](auto&& _) { return _ % 2 == 0; }) % fn::transform([] (auto&& _) { return _ * 3; }); - + auto expected = std::vector{0,6,12,18,24,30}; bool success = values == expected; diff --git a/recipes/rangeless/all/test_v1_package/CMakeLists.txt b/recipes/rangeless/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/rangeless/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/rangeless/all/test_v1_package/conanfile.py b/recipes/rangeless/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..6c9d5dba712c7 --- /dev/null +++ b/recipes/rangeless/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 83f9db87d6efb34d947bfd72a8f8249f94b080be Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 17 Aug 2023 11:45:55 +0300 Subject: [PATCH 254/637] (#18249) neargye-semver: migrate to Conan v2 * neargye-semver: migrate to Conan v2 * neargye-semver: restore test_v1_package * neargye-semver: restore VirtualRunEnv in test_package --- recipes/neargye-semver/all/conanfile.py | 81 ++++++++++--------- .../all/test_package/CMakeLists.txt | 9 +-- .../all/test_package/conanfile.py | 21 +++-- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../all/test_v1_package/conanfile.py | 17 ++++ 5 files changed, 88 insertions(+), 48 deletions(-) create mode 100644 recipes/neargye-semver/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/neargye-semver/all/test_v1_package/conanfile.py diff --git a/recipes/neargye-semver/all/conanfile.py b/recipes/neargye-semver/all/conanfile.py index 53652835d3593..4c81f48ec928f 100644 --- a/recipes/neargye-semver/all/conanfile.py +++ b/recipes/neargye-semver/all/conanfile.py @@ -1,63 +1,72 @@ -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration - import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" class NeargyeSemverConan(ConanFile): name = "neargye-semver" description = "Semantic Versioning for modern C++" - topics = ("conan", "semver", "semantic", "versioning") + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/Neargye/semver" - license = "MIT" - generators = "cmake", "cmake_find_package_multi" - settings = "compiler", "build_type" + topics = ("semver", "semantic", "versioning", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 17 - def configure(self): - compiler = str(self.settings.compiler) - compiler_version = tools.Version(self.settings.compiler.version) - - min_req_cppstd = "17" - if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, min_req_cppstd) - else: - self.output.warn("%s recipe lacks information about the %s compiler" - " standard version support." % (self.name, compiler)) - - minimal_version = { + @property + def _compilers_minimum_version(self): + return { "Visual Studio": "16", + "msvc": "192", "gcc": "7.3", "clang": "6.0", "apple-clang": "10.0", } - # Exclude compilers not supported - if compiler not in minimal_version: - self.output.info("%s requires a compiler that supports at least C++%s" % (self.name, min_req_cppstd)) - return - if compiler_version < minimal_version[compiler]: + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration( - "%s requires a compiler that supports at least C++%s. %s %s is not supported." % - (self.name, min_req_cppstd, compiler, tools.Version(self.settings.compiler.version.value))) + 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], destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") - self.copy("*.hpp", dst="include", src=os.path.join(self._source_subfolder, "include")) + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "*.hpp", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include")) def package_info(self): - self.cpp_info.names["pkg_config"] = "semver" + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + self.cpp_info.set_property("pkg_config_name", "semver") + self.cpp_info.set_property("cmake_file_name", "semver") + self.cpp_info.set_property("cmake_target_name", "semver::semver") + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.names["cmake_find_package"] = "semver" self.cpp_info.names["cmake_find_package_multi"] = "semver" - - def package_id(self): - self.info.header_only() diff --git a/recipes/neargye-semver/all/test_package/CMakeLists.txt b/recipes/neargye-semver/all/test_package/CMakeLists.txt index 4b4849803c256..6915cbdbd4166 100644 --- a/recipes/neargye-semver/all/test_package/CMakeLists.txt +++ b/recipes/neargye-semver/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(semver CONFIG REQUIRED) +find_package(semver REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} semver::semver) diff --git a/recipes/neargye-semver/all/test_package/conanfile.py b/recipes/neargye-semver/all/test_package/conanfile.py index 49a3a66ea5bad..ef5d7042163ec 100644 --- a/recipes/neargye-semver/all/test_package/conanfile.py +++ b/recipes/neargye-semver/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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -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/neargye-semver/all/test_v1_package/CMakeLists.txt b/recipes/neargye-semver/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/neargye-semver/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/neargye-semver/all/test_v1_package/conanfile.py b/recipes/neargye-semver/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/neargye-semver/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + 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) From b0c55109b6f799d08744a7782602de5a06bd4637 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 17 Aug 2023 12:06:38 +0300 Subject: [PATCH 255/637] (#18252) yas: migrate to Conan v2 * yas: migrate to Conan v2 * yas: restore test_v1_package * yas: add cmake_find_package_multi generator to test_v1_package * yas: fix license packaging * yas: restore VirtualRunEnv in test_package --- recipes/yas/all/conanfile.py | 52 ++++++++++++------- recipes/yas/all/test_package/CMakeLists.txt | 9 ++-- recipes/yas/all/test_package/conanfile.py | 21 +++++--- .../yas/all/test_v1_package/CMakeLists.txt | 8 +++ recipes/yas/all/test_v1_package/conanfile.py | 17 ++++++ 5 files changed, 77 insertions(+), 30 deletions(-) create mode 100644 recipes/yas/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/yas/all/test_v1_package/conanfile.py diff --git a/recipes/yas/all/conanfile.py b/recipes/yas/all/conanfile.py index 8cfe2a15884cf..4b089cd3a4efe 100644 --- a/recipes/yas/all/conanfile.py +++ b/recipes/yas/all/conanfile.py @@ -1,39 +1,53 @@ -from conans import ConanFile, tools import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get, load, save +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.52.0" class YasConan(ConanFile): name = "yas" description = "Yet Another Serialization" - topics = ("yas", "serialization", "header-only") + license = "BSL-1.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/niXman/yas" - license = "BSL-1.0" + topics = ("serialization", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 11 + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def _extract_license(self): - header = tools.load(os.path.join( - self.source_folder, self._source_subfolder, - "include", "yas", "binary_oarchive.hpp")) - license_contents = header[:header.find("#")] \ - .replace("//", "").replace("\n ", "\n").lstrip() - tools.save("LICENSE", license_contents) + header = load(self, os.path.join(self.source_folder, "include", "yas", "binary_oarchive.hpp")) + license_contents = header[: header.find("#")].replace("//", "").replace("\n ", "\n").lstrip() + save(self, os.path.join(self.package_folder, "licenses", "LICENSE"), license_contents) def package(self): self._extract_license() - self.copy("LICENSE", dst="licenses") - self.copy("*", src=os.path.join(self._source_subfolder, "include"), - dst="include") + copy(self, "*", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include")) - def package_id(self): - self.info.header_only() + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/yas/all/test_package/CMakeLists.txt b/recipes/yas/all/test_package/CMakeLists.txt index 641059df6fa46..31c7068ad2a4f 100644 --- a/recipes/yas/all/test_package/CMakeLists.txt +++ b/recipes/yas/all/test_package/CMakeLists.txt @@ -1,10 +1,9 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) set(CMAKE_CXX_STANDARD 11) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(yas REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE yas::yas) diff --git a/recipes/yas/all/test_package/conanfile.py b/recipes/yas/all/test_package/conanfile.py index bd7165a553cf4..ef5d7042163ec 100644 --- a/recipes/yas/all/test_package/conanfile.py +++ b/recipes/yas/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", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/yas/all/test_v1_package/CMakeLists.txt b/recipes/yas/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/yas/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/yas/all/test_v1_package/conanfile.py b/recipes/yas/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..7e2dfe859bb27 --- /dev/null +++ b/recipes/yas/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From cbb48b98c3e26a954246f40caa32c37939f09313 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 17 Aug 2023 12:26:13 +0300 Subject: [PATCH 256/637] (#18255) plusaes: migrate to Conan v2 * plusaes: migrate to Conan v2 * plusaes: restore test_v1_package * plusaes: restore VirtualRunEnv in test_package --- recipes/plusaes/all/conanfile.py | 37 +++++++++++++------ .../plusaes/all/test_package/CMakeLists.txt | 7 +--- recipes/plusaes/all/test_package/conanfile.py | 20 +++++++--- .../all/test_v1_package/CMakeLists.txt | 8 ++++ .../plusaes/all/test_v1_package/conanfile.py | 16 ++++++++ 5 files changed, 66 insertions(+), 22 deletions(-) create mode 100644 recipes/plusaes/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/plusaes/all/test_v1_package/conanfile.py diff --git a/recipes/plusaes/all/conanfile.py b/recipes/plusaes/all/conanfile.py index 5d1248265e161..c073789122310 100644 --- a/recipes/plusaes/all/conanfile.py +++ b/recipes/plusaes/all/conanfile.py @@ -1,35 +1,48 @@ -from conans import ConanFile, tools import os -required_conan_version = ">=1.33.0" +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 PlusaesConan(ConanFile): name = "plusaes" description = "Header only C++ AES cipher library" - topics = ("encryption", "header-only") license = "BSL-1.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/kkAyataka/plusaes" + topics = ("encryption", "header-only") + + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 11 + + def layout(self): + basic_layout(self, src_folder="src") def package_id(self): - self.info.header_only() + self.info.clear() def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 11) + check_min_cppstd(self, self._min_cppstd) def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - root_dir = self._source_subfolder + root_dir = self.source_folder include_dir = os.path.join(root_dir, "include") - self.copy(pattern="LICENSE_1_0.txt", dst="licenses", src=root_dir) - self.copy(pattern="*plusaes.hpp", dst="include", src=include_dir) + copy(self, "LICENSE_1_0.txt", dst=os.path.join(self.package_folder, "licenses"), src=root_dir) + copy(self, "*plusaes.hpp", dst=os.path.join(self.package_folder, "include"), src=include_dir) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/plusaes/all/test_package/CMakeLists.txt b/recipes/plusaes/all/test_package/CMakeLists.txt index 0a4d2fae5c706..8b5b4793ec8d8 100644 --- a/recipes/plusaes/all/test_package/CMakeLists.txt +++ b/recipes/plusaes/all/test_package/CMakeLists.txt @@ -1,8 +1,5 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) find_package(plusaes REQUIRED CONFIG) diff --git a/recipes/plusaes/all/test_package/conanfile.py b/recipes/plusaes/all/test_package/conanfile.py index a500b98343c74..ef5d7042163ec 100644 --- a/recipes/plusaes/all/test_package/conanfile.py +++ b/recipes/plusaes/all/test_package/conanfile.py @@ -1,9 +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) @@ -11,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/plusaes/all/test_v1_package/CMakeLists.txt b/recipes/plusaes/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/plusaes/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/plusaes/all/test_v1_package/conanfile.py b/recipes/plusaes/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..a500b98343c74 --- /dev/null +++ b/recipes/plusaes/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 350fb4e98d7d384ceaf234d336fb3d54da742f01 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 17 Aug 2023 12:47:39 +0300 Subject: [PATCH 257/637] (#18779) tinyxml: enable with_stl by default --- recipes/tinyxml/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/tinyxml/all/conanfile.py b/recipes/tinyxml/all/conanfile.py index 46d31e88896c2..3616d277c7fb4 100644 --- a/recipes/tinyxml/all/conanfile.py +++ b/recipes/tinyxml/all/conanfile.py @@ -25,7 +25,7 @@ class TinyXmlConan(ConanFile): default_options = { "shared": False, "fPIC": True, - "with_stl": False, + "with_stl": True, } exports_sources = "CMakeLists.txt" From 7e68b950b4e07d01ab84207c36883437a766fb10 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 17 Aug 2023 12:22:59 +0200 Subject: [PATCH 258/637] (#19244) [docs] Add changelog 17-Aug-2023 Signed-off-by: Uilian Ries --- docs/changelog.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/changelog.md b/docs/changelog.md index 24c6950d686aa..3cf79f8d61327 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,11 @@ # Changelog +### 17-Aug-2023 - 11:42 CEST + +- [fix] Fix type error when catching generic exceptions in Jenkins +- [fix] Bump dependencies no longer allow version range +- [feature] Show recipe revision on the pull-request summary table + ### 04-Aug-2023 - 10:26 CEST - [feature] Enable Conan 2.0.8 From cbac272ef7ea6564c533079f6d4248d8195db1aa Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 17 Aug 2023 13:46:19 +0300 Subject: [PATCH 259/637] (#18808) opentracing-cpp: migrate to Conan v2 * opentracing-cpp: migrate to Conan v2 * opentracing-cpp: restore VirtualRunEnv in test_package --- recipes/opentracing-cpp/all/CMakeLists.txt | 7 - recipes/opentracing-cpp/all/conandata.yml | 3 +- recipes/opentracing-cpp/all/conanfile.py | 125 ++++++++---------- .../all/test_package/CMakeLists.txt | 5 +- .../all/test_package/conanfile.py | 21 ++- .../all/test_package/test_package.cpp | 2 +- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../all/test_v1_package/conanfile.py | 17 +++ 8 files changed, 100 insertions(+), 88 deletions(-) delete mode 100644 recipes/opentracing-cpp/all/CMakeLists.txt create mode 100644 recipes/opentracing-cpp/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/opentracing-cpp/all/test_v1_package/conanfile.py diff --git a/recipes/opentracing-cpp/all/CMakeLists.txt b/recipes/opentracing-cpp/all/CMakeLists.txt deleted file mode 100644 index bd3083b512cb9..0000000000000 --- a/recipes/opentracing-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() - -add_subdirectory(source_subfolder) diff --git a/recipes/opentracing-cpp/all/conandata.yml b/recipes/opentracing-cpp/all/conandata.yml index 97fc5249ab98a..98d819b31175b 100644 --- a/recipes/opentracing-cpp/all/conandata.yml +++ b/recipes/opentracing-cpp/all/conandata.yml @@ -4,5 +4,4 @@ sources: sha256: 5b170042da4d1c4c231df6594da120875429d5231e9baa5179822ee8d1054ac3 patches: "1.6.0": - - base_path: "source_subfolder" - patch_file: "patches/0001-Set-default-installation-folders.patch" + - patch_file: "patches/0001-Set-default-installation-folders.patch" diff --git a/recipes/opentracing-cpp/all/conanfile.py b/recipes/opentracing-cpp/all/conanfile.py index 16f16b80280d2..bd664e1278224 100644 --- a/recipes/opentracing-cpp/all/conanfile.py +++ b/recipes/opentracing-cpp/all/conanfile.py @@ -1,17 +1,21 @@ import os -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir + +required_conan_version = ">=1.53.0" class OpenTracingConan(ConanFile): name = "opentracing-cpp" description = "C++ implementation of the OpenTracing API http://opentracing.io" license = "Apache-2.0" - topics = ("conan", "opentracing") - homepage = "https://github.com/opentracing/opentracing-cpp" url = "https://github.com/conan-io/conan-center-index" - exports_sources = ["CMakeLists.txt", "patches/*.patch"] - generators = "cmake" + homepage = "https://github.com/opentracing/opentracing-cpp" + topics = "opentracing" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -26,15 +30,8 @@ class OpenTracingConan(ConanFile): "enable_dynamic_load": False, } - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -42,78 +39,70 @@ def config_options(self): 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 validate(self): if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, 11) + check_min_cppstd(self, 11) def source(self): - tools.get(**self.conan_data["sources"][self.version]) - os.rename(self.name + "-" + self.version, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_MOCKTRACER"] = self.options.enable_mocktracer + tc.variables["BUILD_DYNAMIC_LOADING"] = self.options.enable_dynamic_load + tc.variables["BUILD_SHARED_LIBS"] = self.options.shared + tc.variables["BUILD_STATIC_LIBS"] = not self.options.shared + tc.variables["BUILD_TESTING"] = False + tc.variables["ENABLE_LINTING"] = False + tc.generate() def build(self): - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["BUILD_MOCKTRACER"] = self.options.enable_mocktracer - self._cmake.definitions[ - "BUILD_DYNAMIC_LOADING" - ] = self.options.enable_dynamic_load - self._cmake.definitions["BUILD_SHARED_LIBS"] = self.options.shared - self._cmake.definitions["BUILD_STATIC_LIBS"] = not self.options.shared - self._cmake.definitions["BUILD_TESTING"] = False - self._cmake.definitions["ENABLE_LINTING"] = False - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake - def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + 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.names["cmake_find_package"] = "OpenTracing" - self.cpp_info.names["cmake_find_package_multi"] = "OpenTracing" + self.cpp_info.set_property("cmake_file_name", "OpenTracing") + self.cpp_info.set_property("cmake_target_name", "OpenTracing::OpenTracing") target_suffix = "" if self.options.shared else "-static" - lib_suffix = ( - "" if self.options.shared or self.settings.os != "Windows" else "-static" - ) + lib_suffix = "" if self.options.shared or self.settings.os != "Windows" else "-static" + # opentracing - self.cpp_info.components["opentracing"].names["cmake_find_package"] = ( - "opentracing" + target_suffix - ) - self.cpp_info.components["opentracing"].names["cmake_find_package_multi"] = ( - "opentracing" + target_suffix - ) - self.cpp_info.components["opentracing"].libs = ["opentracing" + lib_suffix] + opentracing = self.cpp_info.components["opentracing"] + opentracing.set_property("cmake_target_name", "OpenTracing::opentracing" + target_suffix) + opentracing.names["cmake_find_package"] = "opentracing" + target_suffix + opentracing.names["cmake_find_package_multi"] = "opentracing" + target_suffix + opentracing.libs = ["opentracing" + lib_suffix] if not self.options.shared: - self.cpp_info.components["opentracing"].defines.append("OPENTRACING_STATIC") + opentracing.defines.append("OPENTRACING_STATIC") if self.options.enable_dynamic_load and self.settings.os in ("Linux", "FreeBSD"): - self.cpp_info.components["opentracing"].system_libs.append("dl") + opentracing.system_libs.append("dl") # opentracing_mocktracer if self.options.enable_mocktracer: - self.cpp_info.components["opentracing_mocktracer"].names[ - "cmake_find_package" - ] = ("opentracing_mocktracer" + target_suffix) - self.cpp_info.components["opentracing_mocktracer"].names[ - "cmake_find_package_multi" - ] = ("opentracing_mocktracer" + target_suffix) - self.cpp_info.components["opentracing_mocktracer"].libs = [ - "opentracing_mocktracer" + lib_suffix - ] - self.cpp_info.components["opentracing_mocktracer"].requires = [ - "opentracing" - ] + opentracing_mocktracer = self.cpp_info.components["opentracing_mocktracer"] + opentracing_mocktracer.set_property("cmake_target_name", "OpenTracing::opentracing_mocktracer" + target_suffix) + opentracing_mocktracer.names["cmake_find_package"] = "opentracing_mocktracer" + target_suffix + opentracing_mocktracer.names["cmake_find_package_multi"] = "opentracing_mocktracer" + target_suffix + opentracing_mocktracer.libs = ["opentracing_mocktracer" + lib_suffix] + opentracing_mocktracer.requires = ["opentracing"] if not self.options.shared: - self.cpp_info.components["opentracing_mocktracer"].defines.append( - "OPENTRACING_MOCK_TRACER_STATIC" - ) + opentracing_mocktracer.defines.append("OPENTRACING_MOCK_TRACER_STATIC") + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.names["cmake_find_package"] = "OpenTracing" + self.cpp_info.names["cmake_find_package_multi"] = "OpenTracing" diff --git a/recipes/opentracing-cpp/all/test_package/CMakeLists.txt b/recipes/opentracing-cpp/all/test_package/CMakeLists.txt index 124ca7e918838..e9ddbfa9df183 100644 --- a/recipes/opentracing-cpp/all/test_package/CMakeLists.txt +++ b/recipes/opentracing-cpp/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(OpenTracing REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/opentracing-cpp/all/test_package/conanfile.py b/recipes/opentracing-cpp/all/test_package/conanfile.py index abcaeed3f89b6..ef5d7042163ec 100644 --- a/recipes/opentracing-cpp/all/test_package/conanfile.py +++ b/recipes/opentracing-cpp/all/test_package/conanfile.py @@ -1,10 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/opentracing-cpp/all/test_package/test_package.cpp b/recipes/opentracing-cpp/all/test_package/test_package.cpp index ca88714cbdbf7..85d2151582572 100644 --- a/recipes/opentracing-cpp/all/test_package/test_package.cpp +++ b/recipes/opentracing-cpp/all/test_package/test_package.cpp @@ -7,6 +7,6 @@ int main() { auto tracer = MakeNoopTracer(); auto span1 = tracer->StartSpan("a"); - + return 0; } diff --git a/recipes/opentracing-cpp/all/test_v1_package/CMakeLists.txt b/recipes/opentracing-cpp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/opentracing-cpp/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/opentracing-cpp/all/test_v1_package/conanfile.py b/recipes/opentracing-cpp/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..abcaeed3f89b6 --- /dev/null +++ b/recipes/opentracing-cpp/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 237d3a8e1607e48a7114ac2d3a69032797e78853 Mon Sep 17 00:00:00 2001 From: Michael Keck Date: Thu, 17 Aug 2023 13:34:38 +0200 Subject: [PATCH 260/637] (#19029) openssl: add 1.1.1v, 3.0.10, 3.1.2 --- recipes/openssl/1.x.x/conandata.yml | 27 +++++++++------------------ recipes/openssl/3.x.x/conandata.yml | 19 ++++++++++--------- recipes/openssl/config.yml | 14 ++++++-------- 3 files changed, 25 insertions(+), 35 deletions(-) diff --git a/recipes/openssl/1.x.x/conandata.yml b/recipes/openssl/1.x.x/conandata.yml index e9abce013a402..14abde7996026 100644 --- a/recipes/openssl/1.x.x/conandata.yml +++ b/recipes/openssl/1.x.x/conandata.yml @@ -9,17 +9,6 @@ sources: url: - "https://www.openssl.org/source/openssl-1.1.0l.tar.gz" - "https://www.openssl.org/source/old/1.1.0/openssl-1.1.0l.tar.gz" - 1.1.1q: - sha256: d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca - url: - - "https://www.openssl.org/source/openssl-1.1.1q.tar.gz" - - "https://www.openssl.org/source/old/1.1.1/openssl-1.1.1q.tar.gz" - 1.1.1s: - sha256: c5ac01e760ee6ff0dab61d6b2bbd30146724d063eb322180c6f18a6f74e4b6aa - url: - - "https://www.openssl.org/source/openssl-1.1.1s.tar.gz" - - "https://www.openssl.org/source/old/1.1.1/openssl-1.1.1s.tar.gz" - - "https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1s/openssl-1.1.1s.tar.gz" 1.1.1t: sha256: 8dee9b24bdb1dcbf0c3d1e9b02fb8f6bf22165e807f45adeb7c9677536859d3b url: @@ -32,24 +21,26 @@ sources: - "https://www.openssl.org/source/openssl-1.1.1u.tar.gz" - "https://www.openssl.org/source/old/1.1.1/openssl-1.1.1u.tar.gz" - "https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1u/openssl-1.1.1u.tar.gz" + 1.1.1v: + sha256: d6697e2871e77238460402e9362d47d18382b15ef9f246aba6c7bd780d38a6b0 + url: + - "https://www.openssl.org/source/openssl-1.1.1v.tar.gz" + - "https://www.openssl.org/source/old/1.1.1/openssl-1.1.1v.tar.gz" + - "https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1v/openssl-1.1.1v.tar.gz" patches: 1.0.2u: - patch_file: patches/1.0.2u-darwin-arm64.patch patch_description: "Darwin ARM64 support" patch_type: "portability" - 1.1.1q: - - patch_file: patches/1.1.1-tvos-watchos.patch - patch_description: "TVOS and WatchOS don't like fork()" - patch_type: "portability" - 1.1.1s: + 1.1.1t: - patch_file: patches/1.1.1-tvos-watchos.patch patch_description: "TVOS and WatchOS don't like fork()" patch_type: "portability" - 1.1.1t: + 1.1.1u: - patch_file: patches/1.1.1-tvos-watchos.patch patch_description: "TVOS and WatchOS don't like fork()" patch_type: "portability" - 1.1.1u: + 1.1.1v: - patch_file: patches/1.1.1-tvos-watchos.patch patch_description: "TVOS and WatchOS don't like fork()" patch_type: "portability" diff --git a/recipes/openssl/3.x.x/conandata.yml b/recipes/openssl/3.x.x/conandata.yml index d51b393f65f34..f1fe5a2743364 100644 --- a/recipes/openssl/3.x.x/conandata.yml +++ b/recipes/openssl/3.x.x/conandata.yml @@ -1,4 +1,9 @@ sources: + 3.1.2: + url: + - "https://www.openssl.org/source/openssl-3.1.2.tar.gz" + - "https://github.com/openssl/openssl/releases/download/openssl-3.1.2/openssl-3.1.2.tar.gz" + sha256: a0ce69b8b97ea6a35b96875235aa453b966ba3cba8af2de23657d8b6767d6539 3.1.1: url: - "https://www.openssl.org/source/openssl-3.1.1.tar.gz" @@ -9,6 +14,11 @@ sources: - "https://www.openssl.org/source/openssl-3.1.0.tar.gz" - "https://github.com/openssl/openssl/releases/download/openssl-3.1.0/openssl-3.1.0.tar.gz" sha256: aaa925ad9828745c4cad9d9efeb273deca820f2cdcf2c3ac7d7c1212b7c497b4 + 3.0.10: + url: + - "https://www.openssl.org/source/openssl-3.0.10.tar.gz" + - "https://github.com/openssl/openssl/releases/download/openssl-3.0.10/openssl-3.0.10.tar.gz" + sha256: 1761d4f5b13a1028b9b6f3d4b8e17feb0cedc9370f6afe61d7193d2cdce83323 3.0.9: url: - "https://www.openssl.org/source/openssl-3.0.9.tar.gz" @@ -19,12 +29,3 @@ sources: - "https://www.openssl.org/source/openssl-3.0.8.tar.gz" - "https://github.com/openssl/openssl/releases/download/openssl-3.0.8/openssl-3.0.8.tar.gz" sha256: 6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e - 3.0.7: - url: - - "https://www.openssl.org/source/openssl-3.0.7.tar.gz" - - "https://github.com/openssl/openssl/releases/download/openssl-3.0.7/openssl-3.0.7.tar.gz" - sha256: 83049d042a260e696f62406ac5c08bf706fd84383f945cf21bd61e9ed95c396e - 3.0.5: - url: - - "https://www.openssl.org/source/openssl-3.0.5.tar.gz" - sha256: aa7d8d9bef71ad6525c55ba11e5f4397889ce49c2c9349dcea6d3e4f0b024a7a diff --git a/recipes/openssl/config.yml b/recipes/openssl/config.yml index baf4bcb4f9215..add37f9129c6c 100644 --- a/recipes/openssl/config.yml +++ b/recipes/openssl/config.yml @@ -1,28 +1,26 @@ versions: # 3.1.x releases + 3.1.2: + folder: "3.x.x" 3.1.1: folder: "3.x.x" 3.1.0: folder: "3.x.x" # 3.0.x releases + 3.0.10: + folder: "3.x.x" 3.0.9: folder: "3.x.x" 3.0.8: folder: "3.x.x" - 3.0.7: - folder: "3.x.x" - 3.0.5: - folder: "3.x.x" # 1.1.1x releases + 1.1.1v: + folder: "1.x.x" 1.1.1u: folder: "1.x.x" 1.1.1t: folder: "1.x.x" - 1.1.1s: - folder: "1.x.x" - 1.1.1q: - folder: "1.x.x" # 1.1.0x releases 1.1.0l: folder: "1.x.x" From 8903e2251f9e2f68d86c026d09a3effecc0421ac Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 17 Aug 2023 22:20:32 +0900 Subject: [PATCH 261/637] (#19155) trompeloeil: add version 45 --- recipes/trompeloeil/all/conandata.yml | 7 +++-- recipes/trompeloeil/all/conanfile.py | 38 +++++++++++++++++++-------- recipes/trompeloeil/config.yml | 2 ++ 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/recipes/trompeloeil/all/conandata.yml b/recipes/trompeloeil/all/conandata.yml index bb27ac3c59d8a..6aebe5771a442 100644 --- a/recipes/trompeloeil/all/conandata.yml +++ b/recipes/trompeloeil/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "45": + url: "https://github.com/rollbear/trompeloeil/archive/v45.tar.gz" + sha256: "124b0aa45d84415193719376b6557fc1f1180cbfebf4dc4f7ca247cb404d6bd8" "43": url: "https://github.com/rollbear/trompeloeil/archive/v43.tar.gz" sha256: "86a0afa2e97347202a0a883ab43da78c1d4bfff0d6cb93205cfc433d0d9eb9eb" @@ -12,5 +15,5 @@ sources: url: "https://github.com/rollbear/trompeloeil/archive/v40.tar.gz" sha256: "e13e3649223a358a5a72fa5a8a1c36325b48e4f3d9d2f2277b17d746797e1734" "39": - url: https://github.com/rollbear/trompeloeil/archive/v39.tar.gz - sha256: 10506E48ABD605740BC9ED43E34059F5068BC80AF14476BD129A3ED3B54D522F + url: "https://github.com/rollbear/trompeloeil/archive/v39.tar.gz" + sha256: "10506E48ABD605740BC9ED43E34059F5068BC80AF14476BD129A3ED3B54D522F" diff --git a/recipes/trompeloeil/all/conanfile.py b/recipes/trompeloeil/all/conanfile.py index c2548bfe997b8..e3776238f24cf 100644 --- a/recipes/trompeloeil/all/conanfile.py +++ b/recipes/trompeloeil/all/conanfile.py @@ -1,22 +1,38 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.files import copy, get from conan.tools.layout import basic_layout +from conan.tools.scm import Version import os required_conan_version = ">=1.50.0" - class TrompeloeilConan(ConanFile): name = "trompeloeil" description = "Header only C++14 mocking framework" - topics = ("trompeloeil", "header-only", "mocking") - homepage = "https://github.com/rollbear/trompeloeil" - url = "https://github.com/conan-io/conan-center-index" license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/rollbear/trompeloeil" + topics = ("header-only", "mocking") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "15", + "msvc": "190", + "gcc": "5", + "clang": "5", + "apple-clang": "5.1", + } + def layout(self): basic_layout(self, src_folder="src") @@ -25,14 +41,15 @@ def package_id(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 14) + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) - - def build(self): - pass + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): copy(self, "LICENSE*.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) @@ -43,4 +60,3 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "trompeloeil::trompeloeil") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] diff --git a/recipes/trompeloeil/config.yml b/recipes/trompeloeil/config.yml index 26645b05ba8da..2353875452e46 100644 --- a/recipes/trompeloeil/config.yml +++ b/recipes/trompeloeil/config.yml @@ -1,4 +1,6 @@ versions: + "45": + folder: all "43": folder: all "42": From 4df95709fa0f55c17fc2aafe5ce6d270402d0a81 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Thu, 17 Aug 2023 18:48:13 +0400 Subject: [PATCH 262/637] (#19172) pugixml: set package_type --- recipes/pugixml/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/pugixml/all/conanfile.py b/recipes/pugixml/all/conanfile.py index c5890f6dbab55..7ac623ed2f081 100644 --- a/recipes/pugixml/all/conanfile.py +++ b/recipes/pugixml/all/conanfile.py @@ -15,6 +15,7 @@ class PugiXmlConan(ConanFile): license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://pugixml.org/" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { From 323a1f889dc0f1c8b03b9e90f6f70c062b6d95af Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Thu, 17 Aug 2023 19:17:03 +0300 Subject: [PATCH 263/637] (#19181) Added kdbindings/1.0.3 KDBindings enables reactive programming & data binding in C++ From plain C++ you get: - Signals + Slots. - Properties templated on the contained type. - Property bindings allowing reactive code to be written without having to do all the low-level, error prone plumbing by hand. Lazy evaluation of property bindings. - No more broken bindings. - Totally stand-alone "header-only" library. --- recipes/kdbindings/all/conandata.yml | 4 ++ recipes/kdbindings/all/conanfile.py | 54 ++++++++++++++++ .../all/test_package/CMakeLists.txt | 15 +++++ .../kdbindings/all/test_package/conanfile.py | 26 ++++++++ recipes/kdbindings/all/test_package/main.cpp | 63 +++++++++++++++++++ recipes/kdbindings/config.yml | 3 + 6 files changed, 165 insertions(+) create mode 100644 recipes/kdbindings/all/conandata.yml create mode 100644 recipes/kdbindings/all/conanfile.py create mode 100644 recipes/kdbindings/all/test_package/CMakeLists.txt create mode 100644 recipes/kdbindings/all/test_package/conanfile.py create mode 100644 recipes/kdbindings/all/test_package/main.cpp create mode 100644 recipes/kdbindings/config.yml diff --git a/recipes/kdbindings/all/conandata.yml b/recipes/kdbindings/all/conandata.yml new file mode 100644 index 0000000000000..fa9ce176c1b03 --- /dev/null +++ b/recipes/kdbindings/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.3": + url: "https://github.com/KDAB/KDBindings/archive/refs/tags/v1.0.3.tar.gz" + sha256: "da8de679d12bf123df6a3c63a482a862d4122a2f3d3567c9b3b2fc2c4f574393" diff --git a/recipes/kdbindings/all/conanfile.py b/recipes/kdbindings/all/conanfile.py new file mode 100644 index 0000000000000..9f1cf776a90f2 --- /dev/null +++ b/recipes/kdbindings/all/conanfile.py @@ -0,0 +1,54 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.scm import Version +import os + +class KDBindingsConan(ConanFile): + name = "kdbindings" + license = "MIT" + topics = ("c++17", "reactive", "kdab", "header-only") + description = "Reactive programming & data binding in C++" + homepage = "https://github.com/KDAB/KDBindings" + url = "https://github.com/conan-io/conan-center-index" + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + def package_id(self): + self.info.clear() + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True, destination=self.source_folder) + + @property + def _compilers_minimum_version(self): + return { + "gcc": "9", + "Visual Studio": "15.7", + "clang": "7", + "apple-clang": "11", + } + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 17) + + 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++17, which your compiler does not support.") + + def build(self): + pass + + def package(self): + copy(self, "*.h", os.path.join(self.source_folder, "src","kdbindings"), os.path.join(self.package_folder, "include", "kdbindings")) + copy(self, "LICENSES/*", dst=os.path.join(self.package_folder,"licenses"), src=self.source_folder) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.set_property("cmake_file_name", "KDBindings") + self.cpp_info.set_property("cmake_target_name", "KDAB::KDBindings") + self.cpp_info.set_property("cmake_target_aliases", ["KDBindings"]) diff --git a/recipes/kdbindings/all/test_package/CMakeLists.txt b/recipes/kdbindings/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..cbd352d1e0df7 --- /dev/null +++ b/recipes/kdbindings/all/test_package/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(KDBindings REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} main.cpp) + +target_link_libraries(${PROJECT_NAME} PRIVATE KDAB::KDBindings) + +set_target_properties(${PROJECT_NAME} + PROPERTIES + CMAKE_INCLUDE_CURRENT_DIRS ON + CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON +) diff --git a/recipes/kdbindings/all/test_package/conanfile.py b/recipes/kdbindings/all/test_package/conanfile.py new file mode 100644 index 0000000000000..e845ae751a301 --- /dev/null +++ b/recipes/kdbindings/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.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/kdbindings/all/test_package/main.cpp b/recipes/kdbindings/all/test_package/main.cpp new file mode 100644 index 0000000000000..82e0dc503f17b --- /dev/null +++ b/recipes/kdbindings/all/test_package/main.cpp @@ -0,0 +1,63 @@ +/* + This file is part of KDBindings. + + SPDX-FileCopyrightText: 2021-2022 Klarälvdalens Datakonsult AB, a KDAB Group company + Author: Leon Matthes + + SPDX-License-Identifier: MIT + + Contact KDAB at for commercial licensing options. +*/ + +#include +#include + +#include +#include + +using namespace KDBindings; + +void display() +{ + std::cout << "Hello World!" << std::endl; +} + +void displayLabelled(const std::string &label, int value) +{ + std::cout << label << ": " << value << std::endl; +} + +class SignalHandler +{ +public: + bool received = 0; + + void receive() + { + received = true; + } +}; + +int main() +{ + Signal signal; + + // Signal::connect allows connecting functions that take too few arguments. + signal.connect(display); + + // As well as functions with too many arguments, as long as default values are provided. + signal.connect(displayLabelled, "Emitted value"); + + // This is very useful to connect member functions, where the first implicit argument + // is a pointer to the "this" object. + SignalHandler handler; + signal.connect(&SignalHandler::receive, &handler); + + // This will print "Hello World!" and "Emitted value: 5" in an unspecified order. + // It will also set handler.received to true + signal.emit(5); + + std::cout << std::boolalpha << handler.received << std::endl; + + return 0; +} diff --git a/recipes/kdbindings/config.yml b/recipes/kdbindings/config.yml new file mode 100644 index 0000000000000..372dd1cb646bd --- /dev/null +++ b/recipes/kdbindings/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.3": + folder: all From 9436459b4a909c4c533ffe27a95c1f21cbdbbfa8 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Thu, 17 Aug 2023 12:22:34 -0500 Subject: [PATCH 264/637] (#18211) gdcm: Switch libuuid to util-linux-libuuid * gdcm: Switch libuuid to util-linux-libuuid The util-linux-libuuid package relies on an actively maintained project. The libuuid package uses a stale project. Use the active project instead to fix conflicts. Fixes #18203. * Fix component requires * Revert patches --- recipes/gdcm/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/gdcm/all/conanfile.py b/recipes/gdcm/all/conanfile.py index d7959e0134184..8a628f7457e27 100644 --- a/recipes/gdcm/all/conanfile.py +++ b/recipes/gdcm/all/conanfile.py @@ -63,7 +63,7 @@ def requirements(self): else: self.requires("zlib/1.2.13") if self.settings.os != "Windows": - self.requires("libuuid/1.0.3") + self.requires("util-linux-libuuid/2.39") if Version(self.version) >= Version("3.0.20"): self.requires("libiconv/1.17") if self.options.with_json: @@ -241,7 +241,7 @@ def zlib(): if self.options.with_json: self.cpp_info.components["gdcmMSFF"].requires.append("json-c::json-c") if self.settings.os != "Windows": - self.cpp_info.components["gdcmMSFF"].requires.append("libuuid::libuuid") + self.cpp_info.components["gdcmMSFF"].requires.append("util-linux-libuuid::util-linux-libuuid") if Version(self.version) >= Version("3.0.20"): self.cpp_info.components["gdcmMSFF"].requires.append("libiconv::libiconv") if not self.options.shared: From b81d32a6c3513836a1f36cd5b5ebd28c8f45685d Mon Sep 17 00:00:00 2001 From: Liss Heidrich <31625940+Clueliss@users.noreply.github.com> Date: Thu, 17 Aug 2023 20:41:02 +0200 Subject: [PATCH 265/637] (#19206) Add new metall versions * add new metall versions * update boost * newlines --------- Co-authored-by: Liss Heidrich --- recipes/metall/all/conandata.yml | 9 +++++++++ recipes/metall/all/conanfile.py | 2 +- recipes/metall/config.yml | 6 ++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/recipes/metall/all/conandata.yml b/recipes/metall/all/conandata.yml index 788ef5da15507..96fee3029b84f 100644 --- a/recipes/metall/all/conandata.yml +++ b/recipes/metall/all/conandata.yml @@ -8,3 +8,12 @@ sources: "0.23.1": url: "https://github.com/LLNL/metall/archive/refs/tags/v0.23.1.tar.gz" sha256: "25e8fbc424e66d09e0faf60029288e4612685675bfd947cc142bd9d6d0645ac4" + "0.24": + url: "https://github.com/LLNL/metall/archive/refs/tags/v0.24.tar.gz" + sha256: "872de2a1b76d44e6876c0b672c0cc518c6f334959e4a229f2f18cc7e01edf477" + "0.25": + url: "https://github.com/LLNL/metall/archive/refs/tags/v0.25.tar.gz" + sha256: "223cb54543b62a62fdbbe6274b02ddcc14b29806e344ee7e2fd3f055c2374295" + "0.26": + url: "https://github.com/LLNL/metall/archive/refs/tags/v0.26.tar.gz" + sha256: "7453c87d99708be8542e354e582cbeefac1e5ba65e609cd85d7126c5b25a6d7b" diff --git a/recipes/metall/all/conanfile.py b/recipes/metall/all/conanfile.py index 957ba5421027f..c629633bf0094 100644 --- a/recipes/metall/all/conanfile.py +++ b/recipes/metall/all/conanfile.py @@ -27,7 +27,7 @@ def _compilers_minimum_version(self): } def requirements(self): - self.requires("boost/1.79.0") + self.requires("boost/1.81.0") def package_id(self): self.info.clear() diff --git a/recipes/metall/config.yml b/recipes/metall/config.yml index e3fb6e5067c49..11daea4abf351 100644 --- a/recipes/metall/config.yml +++ b/recipes/metall/config.yml @@ -5,3 +5,9 @@ versions: folder: all "0.23.1": folder: all + "0.24": + folder: all + "0.25": + folder: all + "0.26": + folder: all From 3eb269f14ab9c3b5bfe5fa769011bb3bd78ec865 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 18 Aug 2023 04:34:23 +0900 Subject: [PATCH 266/637] (#19210) gperftools: add version 2.11.0 * gperftools: add version 2.11 * enable C++11 * drop support gcc < 7 --- recipes/gperftools/all/conandata.yml | 3 +++ recipes/gperftools/all/conanfile.py | 19 ++++++++++++++----- .../all/test_package/CMakeLists.txt | 2 ++ recipes/gperftools/config.yml | 2 ++ 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/recipes/gperftools/all/conandata.yml b/recipes/gperftools/all/conandata.yml index 8b70af3488037..439e56462f63f 100644 --- a/recipes/gperftools/all/conandata.yml +++ b/recipes/gperftools/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.11.0": + url: "https://github.com/gperftools/gperftools/releases/download/gperftools-2.11/gperftools-2.11.tar.gz" + sha256: "8ffda10e7c500fea23df182d7adddbf378a203c681515ad913c28a64b87e24dc" "2.10.0": url: "https://github.com/gperftools/gperftools/releases/download/gperftools-2.10/gperftools-2.10.tar.gz" sha256: "83e3bfdd28b8bcf53222c3798d4d395d52dadbbae59e8730c4a6d31a9c3732d8" diff --git a/recipes/gperftools/all/conanfile.py b/recipes/gperftools/all/conanfile.py index 60812b411ba17..d1bcecf43d394 100644 --- a/recipes/gperftools/all/conanfile.py +++ b/recipes/gperftools/all/conanfile.py @@ -1,17 +1,16 @@ -import os - from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import fix_apple_shared_install_name, is_apple_os, XCRun -from conan.tools.build import cross_building +from conan.tools.build import cross_building, check_min_cppstd from conan.tools.cmake import cmake_layout from conan.tools.env import VirtualRunEnv from conan.tools.files import get, copy, rm, rmdir, replace_in_file from conan.tools.gnu import AutotoolsToolchain, AutotoolsDeps, Autotools +from conan.tools.scm import Version +import os required_conan_version = ">=1.53.0" - class GperftoolsConan(ConanFile): name = "gperftools" description = "High-performance multi-threaded malloc()" @@ -58,6 +57,10 @@ class GperftoolsConan(ConanFile): "tcmalloc_pagesize": None, } + @property + def _min_cppstd(self): + return 11 + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -88,9 +91,15 @@ def layout(self): cmake_layout(self, src_folder="src") def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + if Version(self.version) >= "2.11.0" and self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "7": + raise ConanInvalidConfiguration(f"{self.ref} does not support gcc < 7.") + if self.settings.os == "Windows": raise ConanInvalidConfiguration( - "gperftools recipe does not currently support Windows. Contributions are welcome." + f"{self.ref} does not currently support Windows. Contributions are welcome." ) def requirements(self): diff --git a/recipes/gperftools/all/test_package/CMakeLists.txt b/recipes/gperftools/all/test_package/CMakeLists.txt index c9f3e082d85e9..0f311015a73f5 100644 --- a/recipes/gperftools/all/test_package/CMakeLists.txt +++ b/recipes/gperftools/all/test_package/CMakeLists.txt @@ -5,6 +5,8 @@ find_package(gperftools REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE gperftools::gperftools) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) add_executable(${PROJECT_NAME}_minimal test_package.cpp) target_link_libraries(${PROJECT_NAME}_minimal PRIVATE gperftools::tcmalloc_minimal) +target_compile_features(${PROJECT_NAME}_minimal PRIVATE cxx_std_11) diff --git a/recipes/gperftools/config.yml b/recipes/gperftools/config.yml index 22d65dcfdfac6..caf3d64443304 100644 --- a/recipes/gperftools/config.yml +++ b/recipes/gperftools/config.yml @@ -1,3 +1,5 @@ versions: + "2.11.0": + folder: all "2.10.0": folder: all From 0173669136e137d71f1dd9204756c0f7697fe07c Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 18 Aug 2023 06:02:36 +0900 Subject: [PATCH 267/637] (#19258) plusaes: add version 1.0.0 --- recipes/plusaes/all/conandata.yml | 3 +++ recipes/plusaes/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/plusaes/all/conandata.yml b/recipes/plusaes/all/conandata.yml index 539b28539b874..595f0e1a79d21 100644 --- a/recipes/plusaes/all/conandata.yml +++ b/recipes/plusaes/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.0": + url: "https://github.com/kkAyataka/plusaes/archive/refs/tags/v1.0.0.tar.gz" + sha256: "0e33e8d0e2ea5e6f9eb7a06093f576350ce8ef58339ce9de791514a8f433087d" "0.10.0": url: "https://github.com/kkAyataka/plusaes/archive/refs/tags/v0.10.0.tar.gz" sha256: "092d64f372f5b732c8e35ab8f1049d4c6ef2eaa4c6ababc56b541b26f4095e51" diff --git a/recipes/plusaes/config.yml b/recipes/plusaes/config.yml index 1b582dcf6716b..f5fa9d899d244 100644 --- a/recipes/plusaes/config.yml +++ b/recipes/plusaes/config.yml @@ -1,3 +1,5 @@ versions: + "1.0.0": + folder: all "0.10.0": folder: all From 09f811dc675618ada4ffb3455837772a4f010344 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 18 Aug 2023 07:53:41 +0900 Subject: [PATCH 268/637] (#19255) s2n: add version 1.3.49 --- recipes/s2n/all/conandata.yml | 3 +++ recipes/s2n/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/s2n/all/conandata.yml b/recipes/s2n/all/conandata.yml index 1f39628799a66..26760a8527f22 100644 --- a/recipes/s2n/all/conandata.yml +++ b/recipes/s2n/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.49": + url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.3.49.tar.gz" + sha256: "2bc7b170a750a435ad02ab8e696c3ad6e9bb7a585c02899472793f87670184dd" "1.3.31": url: "https://github.com/aws/s2n-tls/archive/v1.3.31.tar.gz" sha256: "23cfb42f82cbe1ce94b59f3b1c1c8eb9d24af2a1ae4c8f854209ff88fddd3900" diff --git a/recipes/s2n/config.yml b/recipes/s2n/config.yml index 611e0f7be0d88..7c0e248cb28f0 100644 --- a/recipes/s2n/config.yml +++ b/recipes/s2n/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.49": + folder: all "1.3.31": folder: all "1.3.15": From a5737003c16ba8df5b4f1184ab2745fdfbf0b049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20F=C3=BCchsl?= Date: Fri, 18 Aug 2023 01:48:50 +0200 Subject: [PATCH 269/637] (#19250) [package] angelscript/2.36.1 (Update) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (Maybe we need the last patch again) Co-authored-by: Rubén Rincón Blanco --- recipes/angelscript/all/conandata.yml | 3 +++ recipes/angelscript/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/angelscript/all/conandata.yml b/recipes/angelscript/all/conandata.yml index 1dec7ac1d3e71..edfe7e005b855 100644 --- a/recipes/angelscript/all/conandata.yml +++ b/recipes/angelscript/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.36.1": + url: "https://www.angelcode.com/angelscript/sdk/files/angelscript_2.36.1.zip" + sha256: "58bb749af9c7e386304705f4e6e627ae41dfe03e0b6a73c3d0d2e017c4fc948f" "2.36.0": url: "https://www.angelcode.com/angelscript/sdk/files/angelscript_2.36.0.zip" sha256: "33f95f7597bc0d88b097d35e7b1320d15419ffc5779851d9d2a6cccec57811b3" diff --git a/recipes/angelscript/config.yml b/recipes/angelscript/config.yml index 22190418b16a2..f3cbb4fedf454 100644 --- a/recipes/angelscript/config.yml +++ b/recipes/angelscript/config.yml @@ -1,4 +1,6 @@ versions: + "2.36.1": + folder: all "2.36.0": folder: all "2.35.1": From 4dc114ec7193f54889ecb64823e975a570622ae8 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 18 Aug 2023 03:07:01 +0300 Subject: [PATCH 270/637] (#19256) maven: fix dead URL, bump JDK dep * maven: remove old version with dead URL, bump JDK dep Based on https://repology.org/repository/conancenter/problems * maven: restore v3.9.2, use archive URL --- recipes/maven/all/conandata.yml | 6 ++++-- recipes/maven/all/conanfile.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/recipes/maven/all/conandata.yml b/recipes/maven/all/conandata.yml index ce4fe6b87794c..a0978eddc0d68 100644 --- a/recipes/maven/all/conandata.yml +++ b/recipes/maven/all/conandata.yml @@ -1,7 +1,9 @@ sources: "3.9.4": - url: "https://dlcdn.apache.org/maven/maven-3/3.9.4/binaries/apache-maven-3.9.4-bin.tar.gz" + url: + - "https://dlcdn.apache.org/maven/maven-3/3.9.4/binaries/apache-maven-3.9.4-bin.tar.gz" + - "https://archive.apache.org/dist/maven/maven-3/3.9.4/binaries/apache-maven-3.9.4-bin.tar.gz" sha256: "ff66b70c830a38d331d44f6c25a37b582471def9a161c93902bac7bea3098319" "3.9.2": - url: "https://dlcdn.apache.org/maven/maven-3/3.9.2/binaries/apache-maven-3.9.2-bin.tar.gz" + url: "https://archive.apache.org/dist/maven/maven-3/3.9.2/binaries/apache-maven-3.9.2-bin.tar.gz" sha256: "809ef3220c6d179195c06c324cb9a6d34d8ecba566c5cfd8eb83167bc034117d" diff --git a/recipes/maven/all/conanfile.py b/recipes/maven/all/conanfile.py index f1f95efee4fb1..31d963f2df4c1 100644 --- a/recipes/maven/all/conanfile.py +++ b/recipes/maven/all/conanfile.py @@ -18,7 +18,7 @@ def layout(self): pass def requirements(self): - self.requires("zulu-openjdk/11.0.15") + self.requires("zulu-openjdk/11.0.19") def package_id(self): del self.info.settings.arch From f0ded7723bf6e12a8226fb3e011952a2a1719c9b Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Fri, 18 Aug 2023 07:42:14 +0200 Subject: [PATCH 271/637] (#19246) [bot] Update authorized users list (2023-08-17) --- .c3i/authorized_users.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index d4bb58861e74d..fcf61aaa08fd3 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1215,3 +1215,4 @@ authorized_users: - Arkokat - adattatri - jwfallawuiuc +- tgurriet From 1c43599843bb53254030b06faace72f313c9292f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Fri, 18 Aug 2023 08:05:19 +0200 Subject: [PATCH 272/637] (#19248) harfbuzz: Bump dependencies, fix glib tool_requires * Bump dependencies, fix glib tool_requires * Fix version check, fix outdated url --- recipes/harfbuzz/all/conanfile.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/recipes/harfbuzz/all/conanfile.py b/recipes/harfbuzz/all/conanfile.py index c31c4772cdf26..ce1aa84efb199 100644 --- a/recipes/harfbuzz/all/conanfile.py +++ b/recipes/harfbuzz/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os, fix_apple_shared_install_name from conan.tools.build import can_run, stdcpp_library -from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv +from conan.tools.env import Environment, VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir, replace_in_file from conan.tools.gnu import PkgConfigDeps from conan.tools.layout import basic_layout @@ -12,7 +12,7 @@ import os -required_conan_version = ">=1.54.0" +required_conan_version = ">=1.60.0 <2.0 || >=2.0.6" class HarfbuzzConan(ConanFile): @@ -20,7 +20,7 @@ class HarfbuzzConan(ConanFile): description = "HarfBuzz is an OpenType text shaping engine." topics = ("opentype", "text", "engine") url = "https://github.com/conan-io/conan-center-index" - homepage = "http://harfbuzz.org" + homepage = "https://harfbuzz.github.io/" license = "MIT" package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -78,9 +78,9 @@ def requirements(self): if self.options.with_freetype: self.requires("freetype/2.13.0") if self.options.with_icu: - self.requires("icu/73.1") + self.requires("icu/73.2") if self.options.with_glib: - self.requires("glib/2.76.3", run=can_run(self)) + self.requires("glib/2.77.0") def validate(self): if self.options.shared and self.options.with_glib and not self.dependencies["glib"].options.shared: @@ -100,8 +100,8 @@ def build_requirements(self): self.tool_requires("meson/1.1.0") if not self.conf.get("tools.gnu:pkg_config", check_type=str): self.tool_requires("pkgconf/1.9.3") - if self.options.with_glib and not can_run(self): - self.tool_requires("glib/2.76.3") + if self.options.with_glib: + self.tool_requires("glib/") if self.settings.os == "Macos": # Ensure that the gettext we use at build time is compatible # with the libiconv that is transitively exposed by glib @@ -125,8 +125,6 @@ def is_vs_2017(): return "ninja", [] VirtualBuildEnv(self).generate() - if self.options.with_glib and can_run(self): - VirtualRunEnv(self).generate(scope="build") # Avoid conflicts with libiconv # see: https://github.com/conan-io/conan-center-index/pull/17046#issuecomment-1554629094 From 6a85defe83b26432983a95f57a8ee60261b5cbdf Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 18 Aug 2023 16:07:43 +0900 Subject: [PATCH 273/637] (#18963) streamvbyte: add recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * streamvbyte: add recipe * fix installation path on windows * remove empty line * Update recipes/streamvbyte/all/test_package/test_package.c --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: Rubén Rincón Blanco --- recipes/streamvbyte/all/conandata.yml | 9 +++ recipes/streamvbyte/all/conanfile.py | 63 +++++++++++++++++++ .../all/patches/1.0.0-0001-fix-cmake.patch | 17 +++++ .../all/test_package/CMakeLists.txt | 7 +++ .../streamvbyte/all/test_package/conanfile.py | 26 ++++++++ .../all/test_package/test_package.c | 29 +++++++++ recipes/streamvbyte/config.yml | 3 + 7 files changed, 154 insertions(+) create mode 100644 recipes/streamvbyte/all/conandata.yml create mode 100644 recipes/streamvbyte/all/conanfile.py create mode 100644 recipes/streamvbyte/all/patches/1.0.0-0001-fix-cmake.patch create mode 100644 recipes/streamvbyte/all/test_package/CMakeLists.txt create mode 100644 recipes/streamvbyte/all/test_package/conanfile.py create mode 100644 recipes/streamvbyte/all/test_package/test_package.c create mode 100644 recipes/streamvbyte/config.yml diff --git a/recipes/streamvbyte/all/conandata.yml b/recipes/streamvbyte/all/conandata.yml new file mode 100644 index 0000000000000..a5dd541a0c780 --- /dev/null +++ b/recipes/streamvbyte/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "1.0.0": + url: "https://github.com/lemire/streamvbyte/archive/refs/tags/v1.0.0.tar.gz" + sha256: "6b1920e9865146ba444cc317aa61cd39cdf760236e354ef7956011a9fe577882" +patches: + "1.0.0": + - patch_file: "patches/1.0.0-0001-fix-cmake.patch" + patch_description: "fix install destination" + patch_type: "conan" diff --git a/recipes/streamvbyte/all/conanfile.py b/recipes/streamvbyte/all/conanfile.py new file mode 100644 index 0000000000000..e296e0b170799 --- /dev/null +++ b/recipes/streamvbyte/all/conanfile.py @@ -0,0 +1,63 @@ +from conan import ConanFile +from conan.tools.files import get, copy, export_conandata_patches, apply_conandata_patches +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +import os + +required_conan_version = ">=1.53.0" + +class StreamvbyteConan(ConanFile): + name = "streamvbyte" + description = "Fast integer compression in C using the StreamVByte codec" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/lemire/streamvbyte" + topics = ("compression", "simd") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["STREAMVBYTE_WERROR"] = False + tc.variables["STREAMVBYTE_WALL"] = False + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["streamvbyte"] diff --git a/recipes/streamvbyte/all/patches/1.0.0-0001-fix-cmake.patch b/recipes/streamvbyte/all/patches/1.0.0-0001-fix-cmake.patch new file mode 100644 index 0000000000000..99ab62225b638 --- /dev/null +++ b/recipes/streamvbyte/all/patches/1.0.0-0001-fix-cmake.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b6aa73e..547c44d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -136,7 +136,11 @@ install( + ${PROJECT_SOURCE_DIR}/include/streamvbyte_zigzag.h + DESTINATION include + ) +-install(TARGETS streamvbyte DESTINATION lib) ++install(TARGETS streamvbyte ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++) + + option(STREAMVBYTE_SANITIZE_UNDEFINED "Sanitize undefined behavior" OFF) + if(STREAMVBYTE_SANITIZE_UNDEFINED) diff --git a/recipes/streamvbyte/all/test_package/CMakeLists.txt b/recipes/streamvbyte/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..531d5c3182e36 --- /dev/null +++ b/recipes/streamvbyte/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(streamvbyte REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE streamvbyte::streamvbyte) diff --git a/recipes/streamvbyte/all/test_package/conanfile.py b/recipes/streamvbyte/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/streamvbyte/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/streamvbyte/all/test_package/test_package.c b/recipes/streamvbyte/all/test_package/test_package.c new file mode 100644 index 0000000000000..bda2ad161f942 --- /dev/null +++ b/recipes/streamvbyte/all/test_package/test_package.c @@ -0,0 +1,29 @@ +#include +#include +#include + +#include "streamvbyte.h" + +#ifdef __clang__ +#pragma clang diagnostic ignored "-Wdeclaration-after-statement" +#pragma clang diagnostic ignored "-Wunused-variable" +#endif + +int main(void) { + uint32_t N = 100U; + uint32_t * datain = malloc(N * sizeof(uint32_t)); + uint8_t * compressedbuffer = malloc(streamvbyte_max_compressedbytes(N)); + uint32_t * recovdata = malloc(N * sizeof(uint32_t)); + for (uint32_t k = 0; k < N; ++k) + datain[k] = 120; + size_t compsize = streamvbyte_encode(datain, N, compressedbuffer); // encoding + // here the result is stored in compressedbuffer using compsize bytes + size_t compsize2 = streamvbyte_decode(compressedbuffer, recovdata, + N); // decoding (fast) + assert(compsize == compsize2); + free(datain); + free(compressedbuffer); + free(recovdata); + printf("Compressed %d integers down to %d bytes.\n",N,(int) compsize); + return 0; +} diff --git a/recipes/streamvbyte/config.yml b/recipes/streamvbyte/config.yml new file mode 100644 index 0000000000000..40341aa3db6cd --- /dev/null +++ b/recipes/streamvbyte/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.0": + folder: all From e1b937bd3093567402be2f5e9552630aee5e1dfa Mon Sep 17 00:00:00 2001 From: Joris Putcuyps Date: Fri, 18 Aug 2023 09:29:49 +0200 Subject: [PATCH 274/637] (#19200) Follow the convention and also provide etl::etl alias. * Follow the convention and also provide etl::etl alias. * Previous property is overwritten * Update recipes/etl/all/conanfile.py Support legacy target Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com> --------- Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com> --- recipes/etl/all/conanfile.py | 3 ++- recipes/etl/all/test_package/CMakeLists.txt | 2 +- recipes/etl/all/test_v1_package/CMakeLists.txt | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/etl/all/conanfile.py b/recipes/etl/all/conanfile.py index b0f40f7104e26..a1737588ee965 100644 --- a/recipes/etl/all/conanfile.py +++ b/recipes/etl/all/conanfile.py @@ -60,7 +60,8 @@ def _module_file_rel_path(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "etl") - self.cpp_info.set_property("cmake_target_name", "etl") + self.cpp_info.set_property("cmake_target_name", "etl::etl") + self.cpp_info.set_property("cmake_target_aliases", ["etl"]) # legacy target before 20.27.2 self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] diff --git a/recipes/etl/all/test_package/CMakeLists.txt b/recipes/etl/all/test_package/CMakeLists.txt index b8e7aee7d9458..abf67a0fae7ee 100644 --- a/recipes/etl/all/test_package/CMakeLists.txt +++ b/recipes/etl/all/test_package/CMakeLists.txt @@ -5,4 +5,4 @@ find_package(etl REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) -target_link_libraries(${PROJECT_NAME} PRIVATE etl) +target_link_libraries(${PROJECT_NAME} PRIVATE etl::etl) diff --git a/recipes/etl/all/test_v1_package/CMakeLists.txt b/recipes/etl/all/test_v1_package/CMakeLists.txt index b8e7ad788b821..19dd51b438baa 100644 --- a/recipes/etl/all/test_v1_package/CMakeLists.txt +++ b/recipes/etl/all/test_v1_package/CMakeLists.txt @@ -8,4 +8,4 @@ find_package(etl REQUIRED CONFIG) add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) -target_link_libraries(${PROJECT_NAME} etl) +target_link_libraries(${PROJECT_NAME} etl::etl) From ddc3b9cdd4144623c127ac10ac470f7eb051aca6 Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Fri, 18 Aug 2023 09:13:45 +0100 Subject: [PATCH 275/637] (#19223) nodejs: add version 16.20.2 * nodejs: add version 16.20.2 * Add missing config.yml entry --- recipes/nodejs/all/conandata.yml | 22 ++++++++++++++++++++++ recipes/nodejs/config.yml | 2 ++ 2 files changed, 24 insertions(+) diff --git a/recipes/nodejs/all/conandata.yml b/recipes/nodejs/all/conandata.yml index 0681cc81e538a..56a1be535ef41 100644 --- a/recipes/nodejs/all/conandata.yml +++ b/recipes/nodejs/all/conandata.yml @@ -47,6 +47,28 @@ sources: "armv8": url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-darwin-arm64.tar.gz" sha256: "aeac294dbe54a4dfd222eedfbae704b185c40702254810e2c5917f6dbc80e017" + "16.20.2": + Windows: + "x86_64": + url: "https://nodejs.org/dist/v16.20.2/node-v16.20.2-win-x64.zip" + sha256: "f8bb35f6c08dc7bf14ac753509c06ed1a7ebf5b390cd3fbdc8f8c1aedd020ec3" + Linux: + "x86_64": + url: "https://nodejs.org/dist/v16.20.2/node-v16.20.2-linux-x64.tar.xz" + sha256: "874463523f26ed528634580247f403d200ba17a31adf2de98a7b124c6eb33d87" + "armv7": + url: "https://nodejs.org/dist/v16.20.2/node-v16.20.2-linux-armv7l.tar.xz" + sha256: "5f2a2a34d2f19931b8ef39416bde96933e6666f91a2d1a2b92af30627a8e8429" + "armv8": + url: "https://nodejs.org/dist/v16.20.2/node-v16.20.2-linux-arm64.tar.xz" + sha256: "e88d86154d1ce53dc52fd74d79d4bfdf0b05f58c0bb2639adfa36e9378b770c4" + Macos: + "x86_64": + url: "https://nodejs.org/dist/v16.20.2/node-v16.20.2-darwin-x64.tar.gz" + sha256: "d7a46eaf2b57ffddeda16ece0d887feb2e31a91ad33f8774da553da0249dc4a6" + "armv8": + url: "https://nodejs.org/dist/v16.20.2/node-v16.20.2-darwin-arm64.tar.gz" + sha256: "6a5c4108475871362d742b988566f3fe307f6a67ce14634eb3fbceb4f9eea88c" "18.15.0": Windows: "x86_64": diff --git a/recipes/nodejs/config.yml b/recipes/nodejs/config.yml index e973a099243f7..78cc638a90e4d 100644 --- a/recipes/nodejs/config.yml +++ b/recipes/nodejs/config.yml @@ -5,5 +5,7 @@ versions: folder: all "16.3.0": folder: all + "16.20.2": + folder: all "18.15.0": folder: all From 6e0b64abd1e98161b369dead14ac1f2d7cec9392 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 18 Aug 2023 10:43:45 +0200 Subject: [PATCH 276/637] (#19265) [arsenalgear] Bump dependencies: Boost 1.82.0 Signed-off-by: Uilian Ries --- recipes/arsenalgear/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/arsenalgear/all/conanfile.py b/recipes/arsenalgear/all/conanfile.py index 94953657bcd46..2eafb85d1f49a 100644 --- a/recipes/arsenalgear/all/conanfile.py +++ b/recipes/arsenalgear/all/conanfile.py @@ -57,7 +57,7 @@ def layout(self): def requirements(self): if Version(self.version) < "2.0.0": - self.requires("boost/1.81.0") + self.requires("boost/1.82.0") if self.settings.os in ["Linux", "Macos"]: # exprtk is used in public header of arsenalgear # https://github.com/JustWhit3/arsenalgear-cpp/blob/v1.2.2/include/math.hpp From 3e83e67d63982f3360e8d26439fa29eb71f4a470 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Fri, 18 Aug 2023 16:03:44 +0700 Subject: [PATCH 277/637] (#17025) - add vvenc 1.8.0 * - add vvenc 1.8.0 Signed-off-by: SSE4 * disable LTO explicitly * disable -Werror --------- Signed-off-by: SSE4 Co-authored-by: Daniel --- recipes/vvenc/all/conandata.yml | 5 + recipes/vvenc/all/conanfile.py | 120 ++++++++++++++++++ recipes/vvenc/all/test_package/CMakeLists.txt | 9 ++ recipes/vvenc/all/test_package/conanfile.py | 26 ++++ recipes/vvenc/all/test_package/src/example.c | 6 + recipes/vvenc/config.yml | 3 + 6 files changed, 169 insertions(+) create mode 100644 recipes/vvenc/all/conandata.yml create mode 100644 recipes/vvenc/all/conanfile.py create mode 100644 recipes/vvenc/all/test_package/CMakeLists.txt create mode 100644 recipes/vvenc/all/test_package/conanfile.py create mode 100644 recipes/vvenc/all/test_package/src/example.c create mode 100644 recipes/vvenc/config.yml diff --git a/recipes/vvenc/all/conandata.yml b/recipes/vvenc/all/conandata.yml new file mode 100644 index 0000000000000..ed507f5b4a2bc --- /dev/null +++ b/recipes/vvenc/all/conandata.yml @@ -0,0 +1,5 @@ +sources: + "1.8.0": + url: + - "https://github.com/fraunhoferhhi/vvenc/archive/refs/tags/v1.8.0.tar.gz" + sha256: "119970f1e00667045eb12775db10611fc04f9158348144913c9e233f98664714" diff --git a/recipes/vvenc/all/conanfile.py b/recipes/vvenc/all/conanfile.py new file mode 100644 index 0000000000000..50d169ed09a7f --- /dev/null +++ b/recipes/vvenc/all/conanfile.py @@ -0,0 +1,120 @@ +import os +import sys + +from conan import ConanFile, conan_version +# FIXME: linter complains, but function is there +# https://docs.conan.io/2.0/reference/tools/build.html?highlight=check_min_cppstd#conan-tools-build-check-max-cppstd +# from conan.tools.build import stdcpp_library, check_min_cppstd, check_max_cppstd +from conan.tools.build import stdcpp_library, check_min_cppstd +from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps +from conan.tools.files import get, copy, rmdir, rm + +required_conan_version = ">=1.60.1" + + +class vvencRecipe(ConanFile): + name = "vvenc" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + description = "Fraunhofer Versatile Video Encoder (VVenC)" + topics = ("video", "encoder", "codec", "vvc", "h266") + homepage = "https://www.hhi.fraunhofer.de/en/departments/vca/technologies-and-solutions/h266-vvc.html" + package_type = "library" + + settings = "os", "compiler", "build_type", "arch" + options = {"shared": [True, False], "fPIC": [True, False]} + default_options = {"shared": False, "fPIC": True} + + def validate_build(self): + if conan_version.major == 2: + self._validate_build2() + elif conan_version.major == 1: + self._validate_build1() + + def _validate_build1(self): + if self.settings.get_safe("compiler.cppstd"): + check_min_cppstd(self, 14) + # compiler.cppstd isn't set! but we still continue here in V1, + # imagining just like compiler.cppstd was set to 14 + # while package_id doesn't reflect that at all, and cppstd_default also + # might be different from 14, we silently force -std=c++14 to be + # specified during the build. it may produce more incompatibilities, + # and break user's expectation + # (like, output binary depends really on C++14 symbols libstdc++.so) + # it's V1 design flaw which isn't going to be addressed here + # (and probably nowhere, because conan V1 is going to be discontinued in CCI) + # once V1 is retired, that code will be removed altogether + self.output.warning("compiler.cppstd is not set, but we assume C++14") + + def _validate_build2(self): + # validates the minimum and maximum C++ standard supported + # currently, the project can only be built with C++14 standard + # it cannot be built with older standard because + # it doesn't have all the C++ features needed + # and it cannot be built with newer C++ standard + # because they have existing C++ features removed + check_min_cppstd(self, 14) + # FIXME: linter complains, but function is there + # https://docs.conan.io/2.0/reference/tools/build.html?highlight=check_min_cppstd#conan-tools-build-check-max-cppstd + check_max_cppstd = getattr(sys.modules['conan.tools.build'], 'check_max_cppstd') + check_max_cppstd(self, 14) + + def package_id(self): + # still important, older binutils cannot recognize + # object files created with newer binutils, + # thus linker cannot find any valid object and therefore symbols + # (fails to find `vvenc_get_version`, which is obviously always there) + # this is not exactly modeled by conan right now, + # so "compiler" setting is closest thing to avoid an issue + # (while technically it's not a compiler, but linker and archiver) + # del self.info.settings.compiler + pass + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def config_options(self): + if self.settings.os == "Windows": + self.options.rm_safe("fPIC") + + def configure(self): + if self.options.shared: + self.options.rm_safe('fPIC') + + def layout(self): + cmake_layout(self, src_folder='src') + + def generate(self): + deps = CMakeDeps(self) + deps.generate() + tc = CMakeToolchain(self) + tc.variables["VVENC_ENABLE_LINK_TIME_OPT"] = False + tc.cache_variables["VVENC_ENABLE_LINK_TIME_OPT"] = False + if self.settings.compiler in ["gcc", 'clang']: + tc.blocks["cmake_flags_init"].template += '\nstring(APPEND CMAKE_C_FLAGS_INIT " -Wno-uninitialized")' + tc.blocks["cmake_flags_init"].template += '\nstring(APPEND CMAKE_CXX_FLAGS_INIT " -Wno-uninitialized")' + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", 'pkgconfig')) + rmdir(self, os.path.join(self.package_folder, 'lib', "cmake")) + rm(self, "*.pdb", os.path.join(self.package_folder, 'bin')) + rm(self, '*.pdb', os.path.join(self.package_folder, "lib")) + + def package_info(self): + self.cpp_info.libs = ["vvenc"] + if self.options.shared: + self.cpp_info.defines.extend(["VVENC_DYN_LINK"]) # vvcencDecl.h + libcxx = stdcpp_library(self) # source code is C++, but interface is pure C + libcxx = [libcxx] if libcxx else [] + libm = ["m"] if self.settings.get_safe("os") == "Linux" else [] + libpthread = ['pthread'] if self.settings.get_safe('os') == 'Linux' else [] + self.cpp_info.system_libs.extend(libcxx + libm + libpthread) diff --git a/recipes/vvenc/all/test_package/CMakeLists.txt b/recipes/vvenc/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..efaabb8094acb --- /dev/null +++ b/recipes/vvenc/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) +project(PackageTest C) + +find_package(vvenc CONFIG REQUIRED) + + + +add_executable(example src/example.c) +target_link_libraries(example vvenc::vvenc) diff --git a/recipes/vvenc/all/test_package/conanfile.py b/recipes/vvenc/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0f4e9c14439cf --- /dev/null +++ b/recipes/vvenc/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run + + +class vvencTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", 'VirtualRunEnv', "CMakeToolchain" + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def layout(self): + cmake_layout(self) + + def test(self): + if can_run(self): + cmd = os.path.join(self.cpp.build.bindir, "example") + self.run(cmd, env="conanrun") diff --git a/recipes/vvenc/all/test_package/src/example.c b/recipes/vvenc/all/test_package/src/example.c new file mode 100644 index 0000000000000..2a6652d65f4eb --- /dev/null +++ b/recipes/vvenc/all/test_package/src/example.c @@ -0,0 +1,6 @@ +#include +#include + +int main() { + printf("vvenc_get_version: %s\n", vvenc_get_version()); +} diff --git a/recipes/vvenc/config.yml b/recipes/vvenc/config.yml new file mode 100644 index 0000000000000..6088e2f981017 --- /dev/null +++ b/recipes/vvenc/config.yml @@ -0,0 +1,3 @@ +versions: + "1.8.0": + folder: "all" From 1aa3713781b572f85f0dfa97da854a97564a5de7 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 18 Aug 2023 12:27:32 +0300 Subject: [PATCH 278/637] (#18209) enhex-strong_type: migrate to Conan v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * enhex-strong_type: migrate to Conan v2 * enhex-strong_type: restore test_v1_package * Update recipes/enhex-strong_type/all/conanfile.py * enhex-strong_type: restore VirtualRunEnv in test_package --------- Co-authored-by: Rubén Rincón Blanco --- recipes/enhex-strong_type/all/conanfile.py | 74 ++++++++++++------- .../all/test_package/CMakeLists.txt | 7 +- .../all/test_package/conanfile.py | 22 ++++-- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../all/test_v1_package/conanfile.py | 18 +++++ 5 files changed, 91 insertions(+), 38 deletions(-) create mode 100644 recipes/enhex-strong_type/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/enhex-strong_type/all/test_v1_package/conanfile.py diff --git a/recipes/enhex-strong_type/all/conanfile.py b/recipes/enhex-strong_type/all/conanfile.py index 40601c5f9d3e8..8b4ea08eec845 100644 --- a/recipes/enhex-strong_type/all/conanfile.py +++ b/recipes/enhex-strong_type/all/conanfile.py @@ -1,50 +1,72 @@ -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration import os +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + + class EnhexStrongTypeConan(ConanFile): name = "enhex-strong_type" - license = "MIT" description = "Create new type from existing type without changing the interface." - topics = ("strong_type", "safety") - homepage = "https://github.com/Enhex/strong_type" + license = "MIT" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/Enhex/strong_type" + topics = ("strong_type", "safety", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True - settings = ("compiler") @property - def _source_subfolder(self): - return "source_subfolder" - - def validate(self): - if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 17) + def _min_cppstd(self): + return 17 - minimal_version = { + @property + def _compilers_minimum_version(self): + return { "Visual Studio": "15", + "msvc": "191", "gcc": "7", "clang": "5.0", - "apple-clang": "9.1" + "apple-clang": "9.1", } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + compiler = str(self.settings.compiler) - compiler_version = tools.Version(self.settings.compiler.version) + compiler_version = Version(self.settings.compiler.version) - if compiler not in minimal_version: - self.output.info("{} requires a compiler that supports at least C++17".format(self.name)) + if compiler not in self._compilers_minimum_version: + self.output.info(f"{self.name} requires a compiler that supports at least C++17") return # Exclude compilers not supported - if compiler_version < minimal_version[compiler]: - raise ConanInvalidConfiguration("{} requires a compiler that supports at least C++17. {} {} is not".format( - self.name, compiler, tools.Version(self.settings.compiler.version.value))) + if compiler_version < self._compilers_minimum_version[compiler]: + raise ConanInvalidConfiguration( + f"{self.name} requires a compiler that supports at least C++17. " + f"{compiler} {Version(self.settings.compiler.version.value)} is not" + ) def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy(pattern="LICENSE.txt", dst="licenses", src=self._source_subfolder) - self.copy(pattern="*", dst="include", src=os.path.join(self._source_subfolder, "include")) + copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, pattern="*", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include")) - def package_id(self): - self.info.header_only() + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/enhex-strong_type/all/test_package/CMakeLists.txt b/recipes/enhex-strong_type/all/test_package/CMakeLists.txt index ee8f5992e5656..51d45c127f722 100644 --- a/recipes/enhex-strong_type/all/test_package/CMakeLists.txt +++ b/recipes/enhex-strong_type/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(PackageTest CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(enhex-strong_type CONFIG REQUIRED) +find_package(enhex-strong_type REQUIRED CONFIG) add_executable(example example.cpp) target_link_libraries(example enhex-strong_type::enhex-strong_type) diff --git a/recipes/enhex-strong_type/all/test_package/conanfile.py b/recipes/enhex-strong_type/all/test_package/conanfile.py index c48d1d23bfccd..8d52b7021efe1 100644 --- a/recipes/enhex-strong_type/all/test_package/conanfile.py +++ b/recipes/enhex-strong_type/all/test_package/conanfile.py @@ -1,11 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" -class EnhexStrongTypeTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "example") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "example") + self.run(bin_path, env="conanrun") diff --git a/recipes/enhex-strong_type/all/test_v1_package/CMakeLists.txt b/recipes/enhex-strong_type/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/enhex-strong_type/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/enhex-strong_type/all/test_v1_package/conanfile.py b/recipes/enhex-strong_type/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..c48d1d23bfccd --- /dev/null +++ b/recipes/enhex-strong_type/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class EnhexStrongTypeTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "example") + self.run(bin_path, run_environment=True) From e9ec7131fc1c1e56b004fdb788cd1da2d9f8a6da Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 18 Aug 2023 12:52:32 +0300 Subject: [PATCH 279/637] (#18254) procxx-boost-ext-simd: migrate to Conan v2 * procxx-boost-ext-simd: migrate to Conan v2 * procxx-boost-ext-simd: restore test_v1_package * procxx-boost-ext-simd: add cmake_find_package_multi generator to test_v1_package * procxx-boost-ext-simd: bump boost dependency * procxx-boost-ext-simd: update CMakeLists.txt * procxx-boost-ext-simd: restore VirtualRunEnv in test_package --- .../procxx-boost-ext-simd/all/conanfile.py | 70 +++++++++++-------- .../all/test_package/CMakeLists.txt | 14 ++-- .../all/test_package/conanfile.py | 22 ++++-- .../all/test_package/test_package.cpp | 9 ++- .../all/test_v1_package/CMakeLists.txt | 8 +++ .../all/test_v1_package/conanfile.py | 16 +++++ 6 files changed, 88 insertions(+), 51 deletions(-) create mode 100644 recipes/procxx-boost-ext-simd/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/procxx-boost-ext-simd/all/test_v1_package/conanfile.py diff --git a/recipes/procxx-boost-ext-simd/all/conanfile.py b/recipes/procxx-boost-ext-simd/all/conanfile.py index beacde6952502..58d22448c3e7e 100644 --- a/recipes/procxx-boost-ext-simd/all/conanfile.py +++ b/recipes/procxx-boost-ext-simd/all/conanfile.py @@ -1,61 +1,71 @@ -from conans import ConanFile, CMake, tools import os -required_conan_version = ">=1.33.0" +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 ProCxxBoostExSimdConan(ConanFile): name = "procxx-boost-ext-simd" - description = ("Portable SIMD computation library - was proposed as a " - "Boost library" - ) - homepage = "https://github.com/procxx/boost.simd" - topics = ("conan", "boost", "simd") + description = "Portable SIMD computation library - was proposed as a Boost library" license = "BSL-1.0" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/procxx/boost.simd" + topics = ("boost", "simd", "header-only") + + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package" no_copy_source = True - - @property - def _source_subfolder(self): - return "source_subfolder" + short_paths = True @property def _min_cppstd(self): - return "11" + return 11 + + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.76.0") + self.requires("boost/1.82.0") + + def package_id(self): + self.info.clear() def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, self._min_cppstd) - - def package_id(self): - self.info.header_only() + check_min_cppstd(self, self._min_cppstd) def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_folder = "boost.simd-" + self.version - os.rename(extracted_folder, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy(pattern="*", dst="include", - src=os.path.join(self._source_subfolder, "include")) - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + copy(self, "*", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include")) + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + # this technique was inspired by conan-center's "boost-ex-ut" recipe, # and has been fixed to use the upstream Capitalized `Boost::` # namespace for components - self.cpp_info.names["cmake_find_package"] = "Boost" - self.cpp_info.names["cmake_find_package_multi"] = "Boost" - + self.cpp_info.set_property("cmake_file_name", "Boost.SIMD") + self.cpp_info.set_property("cmake_target_name", "Boost") # The original find_package() name here: + self.cpp_info.components["SIMD"].set_property("cmake_target_name", "Boost::SIMD") + self.cpp_info.components["SIMD"].requires = ["boost::headers"] + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "Boost.SIMD" self.cpp_info.filenames["cmake_find_package_multi"] = "Boost.SIMD" + self.cpp_info.names["cmake_find_package"] = "Boost" + self.cpp_info.names["cmake_find_package_multi"] = "Boost" self.cpp_info.components["SIMD"].names["cmake_find_package"] = "SIMD" - self.cpp_info.components["SIMD"].names["cmake_find_package_multi"] = \ - "SIMD" - self.cpp_info.components["SIMD"].requires = ["boost::headers"] + self.cpp_info.components["SIMD"].names["cmake_find_package_multi"] = "SIMD" diff --git a/recipes/procxx-boost-ext-simd/all/test_package/CMakeLists.txt b/recipes/procxx-boost-ext-simd/all/test_package/CMakeLists.txt index 36ff666d5a74f..f2ca319191721 100644 --- a/recipes/procxx-boost-ext-simd/all/test_package/CMakeLists.txt +++ b/recipes/procxx-boost-ext-simd/all/test_package/CMakeLists.txt @@ -1,19 +1,13 @@ -cmake_minimum_required(VERSION 3.1.0) -project(test_package) - -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup(TARGETS) - -find_package(Boost.SIMD REQUIRED) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) # FIXME: components from Boost.SIMD (target Boost::SIMD) don't work. # It should be: # find_package(BOOST REQUIRED COMPONENTS SIMD) # See https://github.com/conan-io/conan-center-index/issues/6682 for details. -find_package(Boost REQUIRED COMPONENTS date_time) # COMPONENTS SIMD) + +find_package(Boost.SIMD REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} Boost::headers Boost::SIMD) -# FIXME: recipe should transitively sets proper minimum cxx standard. -# See https://github.com/conan-io/conan/issues/7772 about revising cxx std model. set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/procxx-boost-ext-simd/all/test_package/conanfile.py b/recipes/procxx-boost-ext-simd/all/test_package/conanfile.py index 3be12b2d6b0c5..ef5d7042163ec 100644 --- a/recipes/procxx-boost-ext-simd/all/test_package/conanfile.py +++ b/recipes/procxx-boost-ext-simd/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 ProCxxBoostExSimdConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" +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) @@ -12,5 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - self.run(os.path.join("bin", "test_package"), 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/procxx-boost-ext-simd/all/test_package/test_package.cpp b/recipes/procxx-boost-ext-simd/all/test_package/test_package.cpp index ddf7bb1fb383a..48b397b470c70 100644 --- a/recipes/procxx-boost-ext-simd/all/test_package/test_package.cpp +++ b/recipes/procxx-boost-ext-simd/all/test_package/test_package.cpp @@ -3,17 +3,16 @@ // or running library tests - just only check that package is properly created. // See docs for details: // https://docs.conan.io/en/latest/creating_packages/getting_started.html#the-test-package-folder -#include #include +#include #include namespace bs = boost::simd; -int main() -{ +int main() { using namespace boost::date_time; - bs::pack p{1.f,2.f,3.f,4.f}; - std::cout << "Boost.SIMD test from README.md : " << p + 10*p << "\n"; + bs::pack p{1.f, 2.f, 3.f, 4.f}; + std::cout << "Boost.SIMD test from README.md : " << p + 10 * p << "\n"; std::cout << "Boost.date_time interop test: " << boost::gregorian::date(2021, Aug, 4) << "\n"; return 0; } diff --git a/recipes/procxx-boost-ext-simd/all/test_v1_package/CMakeLists.txt b/recipes/procxx-boost-ext-simd/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/procxx-boost-ext-simd/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/procxx-boost-ext-simd/all/test_v1_package/conanfile.py b/recipes/procxx-boost-ext-simd/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..70611dabf01ae --- /dev/null +++ b/recipes/procxx-boost-ext-simd/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + + +class ProCxxBoostExSimdConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + self.run(os.path.join("bin", "test_package"), run_environment=True) From 1cd20e60686d8d866bc522ebe0baab1b396537f7 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 18 Aug 2023 19:47:47 +0900 Subject: [PATCH 280/637] (#19154) mozjpeg: add version 4.1.3 --- recipes/mozjpeg/all/conandata.yml | 7 ++++ .../all/patches/4.1.3-0001-cmake-fixes.patch | 34 +++++++++++++++++++ recipes/mozjpeg/config.yml | 2 ++ 3 files changed, 43 insertions(+) create mode 100644 recipes/mozjpeg/all/patches/4.1.3-0001-cmake-fixes.patch diff --git a/recipes/mozjpeg/all/conandata.yml b/recipes/mozjpeg/all/conandata.yml index b3cb941ad21eb..972600a1f5a90 100644 --- a/recipes/mozjpeg/all/conandata.yml +++ b/recipes/mozjpeg/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.1.3": + url: "https://github.com/mozilla/mozjpeg/archive/v4.1.3.tar.gz" + sha256: "f6ce89f616b30c498d1fb3b0f0940914557d8393a79c9e7aafff72032446bca0" "4.1.1": url: "https://github.com/mozilla/mozjpeg/archive/v4.1.1.tar.gz" sha256: "66b1b8d6b55d263f35f27f55acaaa3234df2a401232de99b6d099e2bb0a9d196" @@ -9,6 +12,10 @@ sources: url: "https://github.com/mozilla/mozjpeg/archive/v3.3.1.tar.gz" sha256: "aebbea60ea038a84a2d1ed3de38fdbca34027e2e54ee2b7d08a97578be72599d" patches: + "4.1.3": + - patch_file: "patches/4.1.3-0001-cmake-fixes.patch" + patch_description: "fix install folder and disable /NODEFAULT in MSVC" + patch_type: "conan" "4.1.1": - patch_file: "patches/4.1.1-0001-cmake-fixes.patch" patch_description: "fix install folder and disable /NODEFAULT in MSVC" diff --git a/recipes/mozjpeg/all/patches/4.1.3-0001-cmake-fixes.patch b/recipes/mozjpeg/all/patches/4.1.3-0001-cmake-fixes.patch new file mode 100644 index 0000000000000..b9d6dd16f33f3 --- /dev/null +++ b/recipes/mozjpeg/all/patches/4.1.3-0001-cmake-fixes.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 82ce902..bde4aba 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1492,7 +1492,7 @@ if(WITH_TURBOJPEG) + else() + set(DIR ${CMAKE_CURRENT_BINARY_DIR}) + endif() +- install(PROGRAMS ${DIR}/tjbench-static${EXE} ++ install(PROGRAMS $ + DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME tjbench${EXE}) + endif() + endif() +@@ -1510,16 +1510,16 @@ if(ENABLE_STATIC) + else() + set(DIR ${CMAKE_CURRENT_BINARY_DIR}) + endif() +- install(PROGRAMS ${DIR}/cjpeg-static${EXE} ++ install(PROGRAMS $ + DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME cjpeg${EXE}) +- install(PROGRAMS ${DIR}/djpeg-static${EXE} ++ install(PROGRAMS $ + DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME djpeg${EXE}) +- install(PROGRAMS ${DIR}/jpegtran-static${EXE} ++ install(PROGRAMS $ + DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME jpegtran${EXE}) + endif() + endif() + +-install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++install(TARGETS rdjpgcom wrjpgcom DESTINATION ${CMAKE_INSTALL_BINDIR}) + + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/README.ijg + ${CMAKE_CURRENT_SOURCE_DIR}/README.md ${CMAKE_CURRENT_SOURCE_DIR}/example.txt diff --git a/recipes/mozjpeg/config.yml b/recipes/mozjpeg/config.yml index c5a4dbb215dd3..980a55d043dc8 100644 --- a/recipes/mozjpeg/config.yml +++ b/recipes/mozjpeg/config.yml @@ -1,4 +1,6 @@ versions: + "4.1.3": + folder: all "4.1.1": folder: all "4.0.0": From fa077ddee415ace91580fc8cab96dde1356f836c Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 18 Aug 2023 20:46:42 +0900 Subject: [PATCH 281/637] (#19161) highway: add version 1.0.6, remove older versions * highway: add version 1.0.6, remove older versions * fix condition --------- Co-authored-by: Carlos Zoido --- recipes/highway/all/conandata.yml | 18 ++----- recipes/highway/all/conanfile.py | 8 ++- .../patches/0.11.1-0001-remove-contrib.patch | 12 ----- .../0.16.0-0001-fix-sys-random-h.patch | 50 ------------------- recipes/highway/config.yml | 6 +-- 5 files changed, 11 insertions(+), 83 deletions(-) delete mode 100644 recipes/highway/all/patches/0.11.1-0001-remove-contrib.patch delete mode 100644 recipes/highway/all/patches/0.16.0-0001-fix-sys-random-h.patch diff --git a/recipes/highway/all/conandata.yml b/recipes/highway/all/conandata.yml index b0736b5e17350..0f97a2fe01fc8 100644 --- a/recipes/highway/all/conandata.yml +++ b/recipes/highway/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.6": + url: "https://github.com/google/highway/archive/1.0.6.tar.gz" + sha256: "d89664a045a41d822146e787bceeefbf648cc228ce354f347b18f2b419e57207" "1.0.5": url: "https://github.com/google/highway/archive/1.0.5.tar.gz" sha256: "99b7dad98b8fa088673b720151458fae698ae5df9154016e39de4afdc23bb927" @@ -20,21 +23,6 @@ sources: "0.17.0": url: "https://github.com/google/highway/archive/0.17.0.tar.gz" sha256: "25158fd5c090b70ecea47fc246c860d150f07f801d2434e1e51ec14a6c15822c" - "0.16.0": - url: "https://github.com/google/highway/archive/0.16.0.tar.gz" - sha256: "746c9578446be6c5286e8846c5f0d4118c0c1f04219c401abadcb8a5f2051893" "0.12.2": url: "https://github.com/google/highway/archive/0.12.2.tar.gz" sha256: "e1d47ce510429fdcf31f41697ca74fb0dcd59d933196e531a86d51751a56f4cc" - "0.11.1": - url: "https://github.com/google/highway/archive/0.11.1.tar.gz" - sha256: "4c4bb9501c02b27a0944afde8923aaab554384690d37e5b2a7f97553426ea641" -patches: - "0.16.0": - - patch_file: "patches/0.16.0-0001-fix-sys-random-h.patch" - patch_description: "fix including sys/random.h on several environments" - patch_type: "portability" - "0.11.1": - - patch_file: "patches/0.11.1-0001-remove-contrib.patch" - patch_description: "remove contrib sources" - patch_type: "portability" diff --git a/recipes/highway/all/conanfile.py b/recipes/highway/all/conanfile.py index 0da9b64e6b9f4..70b41b9d07eb4 100644 --- a/recipes/highway/all/conanfile.py +++ b/recipes/highway/all/conanfile.py @@ -21,10 +21,12 @@ class HighwayConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "with_test": [True, False], } default_options = { "shared": False, "fPIC": True, + "with_test": False, } @property @@ -53,6 +55,8 @@ def configure(self): self.package_type = "static-library" elif self.options.shared: self.options.rm_safe("fPIC") + if Version(self.version) < "1.0.6": + del self.options.with_test def layout(self): cmake_layout(self, src_folder="src") @@ -73,7 +77,7 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_TESTING"] = False tc.variables["HWY_ENABLE_EXAMPLES"] = False - tc.variables["HWY_ENABLE_TESTS"] = False + tc.variables["HWY_ENABLE_TESTS"] = self.options.get_safe("with_test", False) tc.generate() def _patch_sources(self): @@ -109,7 +113,7 @@ def package_info(self): self.cpp_info.components["hwy_contrib"].set_property("pkg_config_name", "libhwy-contrib") self.cpp_info.components["hwy_contrib"].libs = ["hwy_contrib"] self.cpp_info.components["hwy_contrib"].requires = ["hwy"] - if Version(self.version) >= "0.15.0": + if "0.15.0" <= Version(self.version) < "1.0.6" or (Version(self.version) >= "1.0.6" and self.options.with_test): self.cpp_info.components["hwy_test"].set_property("pkg_config_name", "libhwy-test") self.cpp_info.components["hwy_test"].libs = ["hwy_test"] self.cpp_info.components["hwy_test"].requires = ["hwy"] diff --git a/recipes/highway/all/patches/0.11.1-0001-remove-contrib.patch b/recipes/highway/all/patches/0.11.1-0001-remove-contrib.patch deleted file mode 100644 index e409cd92d3227..0000000000000 --- a/recipes/highway/all/patches/0.11.1-0001-remove-contrib.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -52,9 +52,6 @@ check_cxx_source_compiles( - ) - - set(HWY_SOURCES -- contrib/image/image.cc -- contrib/image/image.h -- contrib/math/math-inl.h - hwy/aligned_allocator.cc - hwy/aligned_allocator.h - hwy/base.h diff --git a/recipes/highway/all/patches/0.16.0-0001-fix-sys-random-h.patch b/recipes/highway/all/patches/0.16.0-0001-fix-sys-random-h.patch deleted file mode 100644 index aee3b37dc1e43..0000000000000 --- a/recipes/highway/all/patches/0.16.0-0001-fix-sys-random-h.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/hwy/contrib/sort/vqsort.cc b/hwy/contrib/sort/vqsort.cc -index 951a0bd..2009da8 100644 ---- a/hwy/contrib/sort/vqsort.cc -+++ b/hwy/contrib/sort/vqsort.cc -@@ -25,12 +25,43 @@ - // After foreach_target - #include "hwy/contrib/sort/shared-inl.h" - -+// Check if we have sys/random.h. First skip some systems on which the check -+// itself (features.h) might be problematic. -+#if defined(ANDROID) || defined(__ANDROID__) || HWY_ARCH_RVV -+#define VQSORT_GETRANDOM 0 -+#endif -+ -+#if !defined(VQSORT_GETRANDOM) && (defined(linux) || defined(__linux__)) -+#include -+ -+// ---- which libc -+#if defined(__UCLIBC__) -+#define VQSORT_GETRANDOM 1 // added Mar 2015, before uclibc-ng 1.0 -+ -+#elif defined(__GLIBC__) && defined(__GLIBC_PREREQ) -+#if __GLIBC_PREREQ(2, 25) -+#define VQSORT_GETRANDOM 1 -+#else -+#define VQSORT_GETRANDOM 0 -+#endif -+ -+#else -+// Assume MUSL, which has getrandom since 2018. There is no macro to test, see -+// https://www.openwall.com/lists/musl/2013/03/29/13. -+#define VQSORT_GETRANDOM 1 -+ -+#endif // ---- which libc -+#endif // linux -+ -+#if !defined(VQSORT_GETRANDOM) -+#define VQSORT_GETRANDOM 0 -+#endif -+ - // Seed source for SFC generator: 1=getrandom, 2=CryptGenRandom - // (not all Android support the getrandom wrapper) - #ifndef VQSORT_SECURE_SEED - --#if (defined(linux) || defined(__linux__)) && \ -- !(defined(ANDROID) || defined(__ANDROID__) || HWY_ARCH_RVV) -+#if VQSORT_GETRANDOM - #define VQSORT_SECURE_SEED 1 - #elif defined(_WIN32) || defined(_WIN64) - #define VQSORT_SECURE_SEED 2 diff --git a/recipes/highway/config.yml b/recipes/highway/config.yml index 48d515416587a..e978e314cb0cd 100644 --- a/recipes/highway/config.yml +++ b/recipes/highway/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.6": + folder: all "1.0.5": folder: all "1.0.4": @@ -13,9 +15,5 @@ versions: folder: all "0.17.0": folder: all - "0.16.0": - folder: all "0.12.2": folder: all - "0.11.1": - folder: all From aaf72e4e04386fcba01fda8da2bc352c606fae3d Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Fri, 18 Aug 2023 14:43:07 +0200 Subject: [PATCH 282/637] (#19269) [bot] Update list of references (prod-v2/ListPackages) Co-authored-by: Uilian Ries --- .c3i/conan_v2_ready_references.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index f8823a111ab28..fec7da6449a4b 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -78,6 +78,7 @@ required_for_references: - bear - benchmark - bertrand +- bgfx - bigint - bimg - binutils @@ -167,6 +168,7 @@ required_for_references: - concurrentqueue - console_bridge - continuable +- cotila - cpp-httplib - cpp-ipc - cpp-jwt @@ -313,6 +315,7 @@ required_for_references: - foxglove-schemas-protobuf - foxi - fp16 +- fpgen - fpzip - freeglut - freeimage @@ -419,6 +422,7 @@ required_for_references: - imath - imgui - imguizmo +- immer - implot - imutils-cpp - incbin @@ -661,6 +665,7 @@ required_for_references: - lzma_sdk - lzo - m4 +- maddy - magic_enum - mailio - make @@ -743,6 +748,7 @@ required_for_references: - nanosvg - nas - nasm +- neargye-semver - netcdf - nettle - nextsilicon-cpp-subprocess @@ -753,6 +759,7 @@ required_for_references: - nmslib - nng - nodejs +- nodesoup - norm - nsync - ntv2 @@ -803,6 +810,7 @@ required_for_references: - opensubdiv - opentelemetry-cpp - opentelemetry-proto +- opentracing-cpp - openxlsx - optional-lite - opus @@ -814,6 +822,7 @@ required_for_references: - p-ranav-glob - paho-mqtt-c - paho-mqtt-cpp +- panzi-portable-endian - parallel-hashmap - parg - parson @@ -839,6 +848,7 @@ required_for_references: - pixman - pkgconf - platform.delegates +- platform.exceptions - platform.hashing - platform.interfaces - plf_colony @@ -848,6 +858,7 @@ required_for_references: - plf_queue - plf_stack - plog +- plusaes - plutovg - pngpp - poco @@ -895,6 +906,8 @@ required_for_references: - ragel - rang - range-v3 +- rangeless +- rangesnext - rapidcheck - rapidcsv - rapidfuzz @@ -917,6 +930,7 @@ required_for_references: - restbed - restinio - rg-etc1 +- rgbcx - ring-span-lite - rmm - roaring @@ -1052,6 +1066,7 @@ required_for_references: - trantor - tree-sitter - troldal-zippy +- trompeloeil - tsl-hopscotch-map - turtle - type_safe @@ -1109,6 +1124,7 @@ required_for_references: - wt - wtl - xapian-core +- xbyak - xerces-c - xkbcommon - xkeyboard-config @@ -1132,6 +1148,7 @@ required_for_references: - xz_utils - yajl - yaml-cpp +- yas - yasm - yyjson - z3 From 851342aa5e37d7d16be220549fe6bf69bae55c7a Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 18 Aug 2023 22:17:24 +0900 Subject: [PATCH 283/637] (#19175) boost: add version 1.83.0 * boost: add version 1.83.0, remove older versions * revert 1.71.0, 1.72.0 * use 1.82.0's patch for 1.83.0 --- recipes/boost/all/conandata.yml | 11 +- .../all/dependencies/dependencies-1.83.0.yml | 280 ++++++++++++++++++ recipes/boost/config.yml | 2 + 3 files changed, 292 insertions(+), 1 deletion(-) create mode 100644 recipes/boost/all/dependencies/dependencies-1.83.0.yml diff --git a/recipes/boost/all/conandata.yml b/recipes/boost/all/conandata.yml index b2ef58c60ab75..ee7228b61bc72 100644 --- a/recipes/boost/all/conandata.yml +++ b/recipes/boost/all/conandata.yml @@ -1,9 +1,14 @@ sources: + "1.83.0": + url: + - "https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2" + - "https://sourceforge.net/projects/boost/files/boost/1.83.0/boost_1_83_0.tar.bz2" + sha256: "6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e" "1.82.0": url: - "https://boostorg.jfrog.io/artifactory/main/release/1.82.0/source/boost_1_82_0.tar.bz2" - "https://sourceforge.net/projects/boost/files/boost/1.82.0/boost_1_82_0.tar.bz2" - sha256: a6e1ab9b0860e6a2881dd7b21fe9f737a095e5f33a3a874afc6a345228597ee6 + sha256: "a6e1ab9b0860e6a2881dd7b21fe9f737a095e5f33a3a874afc6a345228597ee6" "1.81.0": url: - "https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.bz2" @@ -58,6 +63,10 @@ sources: url: "https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2" sha256: "d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee" patches: + "1.83.0": + - patch_file: "patches/1.82.0-locale-iconv-library-option.patch" + patch_description: "Optional flag to specify iconv from either libc of libiconv" + patch_type: "conan" "1.82.0": - patch_file: "patches/1.82.0-locale-iconv-library-option.patch" patch_description: "Optional flag to specify iconv from either libc of libiconv" diff --git a/recipes/boost/all/dependencies/dependencies-1.83.0.yml b/recipes/boost/all/dependencies/dependencies-1.83.0.yml new file mode 100644 index 0000000000000..e6b009423a409 --- /dev/null +++ b/recipes/boost/all/dependencies/dependencies-1.83.0.yml @@ -0,0 +1,280 @@ +configure_options: +- atomic +- chrono +- container +- context +- contract +- coroutine +- date_time +- exception +- fiber +- filesystem +- graph +- graph_parallel +- iostreams +- json +- locale +- log +- math +- mpi +- nowide +- program_options +- python +- random +- regex +- serialization +- stacktrace +- system +- test +- thread +- timer +- type_erasure +- url +- wave +dependencies: + atomic: [] + chrono: + - system + container: [] + context: [] + contract: + - exception + - thread + coroutine: + - context + - exception + - system + date_time: [] + exception: [] + fiber: + - context + - filesystem + fiber_numa: + - fiber + filesystem: + - atomic + - system + graph: + - math + - random + - regex + - serialization + graph_parallel: + - filesystem + - graph + - mpi + - random + - serialization + iostreams: + - random + - regex + json: + - container + - system + locale: + - thread + log: + - atomic + - container + - date_time + - exception + - filesystem + - random + - regex + - system + - thread + log_setup: + - log + math: [] + math_c99: + - math + math_c99f: + - math + math_c99l: + - math + math_tr1: + - math + math_tr1f: + - math + math_tr1l: + - math + mpi: + - graph + - serialization + mpi_python: + - mpi + - python + nowide: + - filesystem + numpy: + - python + prg_exec_monitor: + - test + program_options: [] + python: [] + random: + - system + regex: [] + serialization: [] + stacktrace: [] + stacktrace_addr2line: + - stacktrace + stacktrace_backtrace: + - stacktrace + stacktrace_basic: + - stacktrace + stacktrace_noop: + - stacktrace + stacktrace_windbg: + - stacktrace + stacktrace_windbg_cached: + - stacktrace + system: [] + test: + - exception + test_exec_monitor: + - test + thread: + - atomic + - chrono + - container + - date_time + - exception + - system + timer: + - chrono + - system + type_erasure: + - thread + unit_test_framework: + - prg_exec_monitor + - test + - test_exec_monitor + url: + - system + wave: + - filesystem + - serialization + wserialization: + - serialization +libs: + atomic: + - boost_atomic + chrono: + - boost_chrono + container: + - boost_container + context: + - boost_context + contract: + - boost_contract + coroutine: + - boost_coroutine + date_time: + - boost_date_time + exception: + - boost_exception + fiber: + - boost_fiber + fiber_numa: + - boost_fiber_numa + filesystem: + - boost_filesystem + graph: + - boost_graph + graph_parallel: + - boost_graph_parallel + iostreams: + - boost_iostreams + json: + - boost_json + locale: + - boost_locale + log: + - boost_log + log_setup: + - boost_log_setup + math: [] + math_c99: + - boost_math_c99 + math_c99f: + - boost_math_c99f + math_c99l: + - boost_math_c99l + math_tr1: + - boost_math_tr1 + math_tr1f: + - boost_math_tr1f + math_tr1l: + - boost_math_tr1l + mpi: + - boost_mpi + mpi_python: + - boost_mpi_python + nowide: + - boost_nowide + numpy: + - boost_numpy{py_major}{py_minor} + prg_exec_monitor: + - boost_prg_exec_monitor + program_options: + - boost_program_options + python: + - boost_python{py_major}{py_minor} + random: + - boost_random + regex: + - boost_regex + serialization: + - boost_serialization + stacktrace: [] + stacktrace_addr2line: + - boost_stacktrace_addr2line + stacktrace_backtrace: + - boost_stacktrace_backtrace + stacktrace_basic: + - boost_stacktrace_basic + stacktrace_noop: + - boost_stacktrace_noop + stacktrace_windbg: + - boost_stacktrace_windbg + stacktrace_windbg_cached: + - boost_stacktrace_windbg_cached + system: + - boost_system + test: [] + test_exec_monitor: + - boost_test_exec_monitor + thread: + - boost_thread + timer: + - boost_timer + type_erasure: + - boost_type_erasure + unit_test_framework: + - boost_unit_test_framework + url: + - boost_url + wave: + - boost_wave + wserialization: + - boost_wserialization +requirements: + iostreams: + - bzip2 + - lzma + - zlib + - zstd + locale: + - iconv + - icu + python: + - python + regex: + - icu + stacktrace: + - backtrace +static_only: +- boost_exception +- boost_test_exec_monitor +version: 1.83.0 diff --git a/recipes/boost/config.yml b/recipes/boost/config.yml index 38ecaf5c73d63..f81f4b5e8e72b 100644 --- a/recipes/boost/config.yml +++ b/recipes/boost/config.yml @@ -1,4 +1,6 @@ versions: + "1.83.0": + folder: all "1.82.0": folder: all "1.81.0": From cfc4955b0c4910196c8227b08fa777af7eea9cf8 Mon Sep 17 00:00:00 2001 From: Oliver Kuckertz Date: Fri, 18 Aug 2023 16:35:10 +0200 Subject: [PATCH 284/637] (#19179) loguru: fix preprocessor definition values Loguru expects 0 or 1, but the recipe would set "False"/"True", which C's preprocessor would always evaluate to false. --- recipes/loguru/all/conanfile.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/recipes/loguru/all/conanfile.py b/recipes/loguru/all/conanfile.py index 098d77e4ec8b7..8f740c8665ca6 100644 --- a/recipes/loguru/all/conanfile.py +++ b/recipes/loguru/all/conanfile.py @@ -20,6 +20,7 @@ class LoguruConan(ConanFile): description = "Loguru is a C++11 logging library." package_type = "library" settings = "os", "arch", "compiler", "build_type" + options = { "shared": [True, False], "fPIC": [True, False], @@ -79,16 +80,19 @@ def layout(self): def generate(self): tc = CMakeToolchain(self) + tc.variables["LOGURU_USE_FMTLIB"] = self.options.with_fmt tc.variables["LOGURU_VERBOSE_SCOPE_ENDINGS"] = self.options.verbose_scope_endings tc.variables["LOGURU_REDEFINE_ASSERT"] = self.options.redefine_assert tc.variables["LOGURU_WITH_STREAMS"] = self.options.enable_streams tc.variables["LOGURU_WITH_FILEABS"] = self.options.enable_fileabs tc.variables["LOGURU_REPLACE_GLOG"] = self.options.replace_glog + tc.variables["LOGURU_SCOPE_TEXT_SIZE"] = self.options.scope_text_size tc.variables["LOGURU_SCOPE_TIME_PRECISION"] = self.options.scope_time_precision tc.variables["LOGURU_FILENAME_WIDTH"] = self.options.filename_width tc.variables["LOGURU_THREADNAME_WIDTH"] = self.options.threadname_width + if is_msvc(self) and self.options.shared: tc.preprocessor_definitions["LOGURU_EXPORT"] = "__declspec(dllexport)" tc.generate() @@ -110,7 +114,7 @@ def package(self): save(self, os.path.join(self.package_folder, 'licenses', 'LICENSE'), self._extracted_license) cmake = CMake(self) cmake.install() - + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) @@ -124,16 +128,18 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "loguru") self.cpp_info.set_property("cmake_target_name", "loguru::loguru") - self.cpp_info.defines.append(f"LOGURU_USE_FMTLIB={self.options.with_fmt}") + # render each option as either 0 or 1 for loguru's #if preprocessor commands + self.cpp_info.defines.append(f"LOGURU_USE_FMTLIB={bool(self.options.with_fmt)*1}") + self.cpp_info.defines.append(f"LOGURU_VERBOSE_SCOPE_ENDINGS={bool(self.options.verbose_scope_endings)*1}") + self.cpp_info.defines.append(f"LOGURU_REDEFINE_ASSERT={bool(self.options.redefine_assert)*1}") + self.cpp_info.defines.append(f"LOGURU_WITH_STREAMS={bool(self.options.enable_streams)*1}") + self.cpp_info.defines.append(f"LOGURU_WITH_FILEABS={bool(self.options.enable_fileabs)*1}") + self.cpp_info.defines.append(f"LOGURU_REPLACE_GLOG={bool(self.options.replace_glog)*1}") + self.cpp_info.defines.append(f"LOGURU_SCOPE_TEXT_SIZE={self.options.scope_text_size}") self.cpp_info.defines.append(f"LOGURU_SCOPE_TIME_PRECISION={self.options.scope_time_precision}") self.cpp_info.defines.append(f"LOGURU_FILENAME_WIDTH={self.options.filename_width}") self.cpp_info.defines.append(f"LOGURU_THREADNAME_WIDTH={self.options.threadname_width}") - self.cpp_info.defines.append(f"LOGURU_VERBOSE_SCOPE_ENDINGS={self.options.verbose_scope_endings}") - self.cpp_info.defines.append(f"LOGURU_REDEFINE_ASSERT={self.options.redefine_assert}") - self.cpp_info.defines.append(f"LOGURU_WITH_STREAMS={self.options.enable_streams}") - self.cpp_info.defines.append(f"LOGURU_WITH_FILEABS={self.options.enable_fileabs}") - self.cpp_info.defines.append(f"LOGURU_REPLACE_GLOG={self.options.replace_glog}") if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["pthread", "dl", "m"] From d3ad3f126576b4e0134692c4af731a4b5b7527b8 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Fri, 18 Aug 2023 17:10:54 +0200 Subject: [PATCH 285/637] (#19203) [libsnd] Update to 1.2.2 * [libsnd] Update to 1.2.2 * apply CMP0091 patch --------- Co-authored-by: czoido --- recipes/libsndfile/all/conandata.yml | 7 +++++++ recipes/libsndfile/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/libsndfile/all/conandata.yml b/recipes/libsndfile/all/conandata.yml index 77ba2985f3b59..cc9d3fa6bc38c 100644 --- a/recipes/libsndfile/all/conandata.yml +++ b/recipes/libsndfile/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.2": + url: "https://github.com/libsndfile/libsndfile/releases/download/1.2.2/libsndfile-1.2.2.tar.xz" + sha256: "3799ca9924d3125038880367bf1468e53a1b7e3686a934f098b7e1d286cdb80e" "1.2.0": url: "https://github.com/libsndfile/libsndfile/releases/download/1.2.0/libsndfile-1.2.0.tar.xz" sha256: "0e30e7072f83dc84863e2e55f299175c7e04a5902ae79cfb99d4249ee8f6d60a" @@ -12,6 +15,10 @@ sources: url: "https://github.com/libsndfile/libsndfile/releases/download/v1.0.29/libsndfile-1.0.29.tar.bz2" sha256: "2ba20d44817c8176f097ab25eff44ef0aeec9e00973def5a7174c5ae0764b22f" patches: + "1.2.2": + - patch_file: "patches/1.0.31-0001-fix-msvc-runtime-logic.patch" + patch_description: "always set CMP0091" + patch_type: "portability" "1.2.0": - patch_file: "patches/1.0.31-0001-fix-msvc-runtime-logic.patch" patch_description: "always set CMP0091" diff --git a/recipes/libsndfile/config.yml b/recipes/libsndfile/config.yml index 2248a847a68f0..47a9d6a6d063e 100644 --- a/recipes/libsndfile/config.yml +++ b/recipes/libsndfile/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.2": + folder: "all" "1.2.0": folder: "all" "1.0.31": From b864d06e5e8627f688d52d07dbd2cd4d56b94a15 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 19 Aug 2023 01:01:38 +0900 Subject: [PATCH 286/637] (#19209) libmysqlclient: fix compilation error on RHEL --- recipes/libmysqlclient/all/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/libmysqlclient/all/conanfile.py b/recipes/libmysqlclient/all/conanfile.py index ba135f46de785..80776aaf0f037 100644 --- a/recipes/libmysqlclient/all/conanfile.py +++ b/recipes/libmysqlclient/all/conanfile.py @@ -133,7 +133,6 @@ def _patch_sources(self): f"# SET({lib.upper()}_WARN_GIVEN)", strict=False) - rmdir(self, os.path.join(self.source_folder, "extra")) for folder in ["client", "man", "mysql-test", "libbinlogstandalone"]: replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), f"ADD_SUBDIRECTORY({folder})\n", From 32b96bb5d37f8d5ea436826efdaa1576335bc0c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20F=C3=BCchsl?= Date: Fri, 18 Aug 2023 18:25:07 +0200 Subject: [PATCH 287/637] (#19242) [package] opus/1.4 (Update) * Added version 1.4 * Change opus download location to GitHub --- recipes/opus/all/conandata.yml | 3 +++ recipes/opus/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/opus/all/conandata.yml b/recipes/opus/all/conandata.yml index d7e0ee962c3b2..5ac1b419900e1 100644 --- a/recipes/opus/all/conandata.yml +++ b/recipes/opus/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4": + url: "https://github.com/xiph/opus/releases/download/v1.4/opus-1.4.tar.gz" + sha256: "c9b32b4253be5ae63d1ff16eea06b94b5f0f2951b7a02aceef58e3a3ce49c51f" "1.3.1": url: "https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz" sha256: "65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d" diff --git a/recipes/opus/config.yml b/recipes/opus/config.yml index 59334d5077368..3360afdd0ecab 100644 --- a/recipes/opus/config.yml +++ b/recipes/opus/config.yml @@ -1,3 +1,5 @@ versions: + "1.4": + folder: all "1.3.1": folder: all From 8dfe9f93e4617a78a9dc472fd7b06b836addedf5 Mon Sep 17 00:00:00 2001 From: njacquemin1993 Date: Fri, 18 Aug 2023 19:18:56 +0200 Subject: [PATCH 288/637] (#19247) [cpuinfo] fix bug when compiling for Android See https://stackoverflow.com/questions/38666609/cant-find-lpthread-when-cross-compile-to-arm: "The android libc, bionic, provides built-in support for pthreads, so no additional linking (-lpthreads) is necessary." --- recipes/cpuinfo/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cpuinfo/all/conanfile.py b/recipes/cpuinfo/all/conanfile.py index 00574928a56f7..d109a4b7e8b2f 100644 --- a/recipes/cpuinfo/all/conanfile.py +++ b/recipes/cpuinfo/all/conanfile.py @@ -95,5 +95,5 @@ def package_info(self): self.cpp_info.components["cpuinfo"].libs = ["cpuinfo"] if self.version < "cci.20230118": self.cpp_info.components["cpuinfo"].requires = ["clog"] - if self.settings.os in ["Linux", "FreeBSD", "Android"]: + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["cpuinfo"].system_libs.append("pthread") From c7ebb147497ee466a23861c1cec141f50100a9f6 Mon Sep 17 00:00:00 2001 From: Guillaume Egles Date: Fri, 18 Aug 2023 10:53:14 -0700 Subject: [PATCH 289/637] (#19259) restinio: add 0.6.19 * restinio: add 0.6.19 * update version for fmt and pcre/pcre2 and switch to version ranges for more flexibility and future compat * revert: update version for fmt and pcre/pcre2 and switch to version ranges for more flexibility and future compat As per https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/dependencies.md#version-ranges version ranges are only allowed for CMake/OpenSSL. bump fmt and pcre2's versions manually. * removing 4th oldest revision (to use less resources) See doc here: https://github.com/conan-io/conan-center-index/blob/9436459b4a909c4c533ffe27a95c1f21cbdbbfa8/docs/adding_packages/sources_and_patches.md#removing-old-versions --- recipes/restinio/all/conandata.yml | 6 +++--- recipes/restinio/all/conanfile.py | 4 ++-- recipes/restinio/config.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/recipes/restinio/all/conandata.yml b/recipes/restinio/all/conandata.yml index ad2cb8100089c..06ced9d2281b3 100644 --- a/recipes/restinio/all/conandata.yml +++ b/recipes/restinio/all/conandata.yml @@ -1,10 +1,10 @@ sources: + "0.6.19": + url: "https://github.com/Stiffstream/restinio/archive/v.0.6.19.tar.gz" + sha256: "5a739cac8f3148e7e94f05bb08f5cf569dd31f6f3ea2b893eddfffb0a155eb52" "0.6.18": url: "https://github.com/Stiffstream/restinio/archive/v.0.6.18.tar.gz" sha256: "16fa041f4603746c6cd0f29ab126d02d220034535e7019c6ca1b8b9f58bfeee0" "0.6.17": url: "https://github.com/Stiffstream/restinio/archive/v.0.6.17.tar.gz" sha256: "0140b23f50bb964f6917d1f99205476eba92203dc586673bdf2ea48d7406f2c4" - "0.6.16": - url: "https://github.com/Stiffstream/restinio/archive/v.0.6.16.tar.gz" - sha256: "b3208d746087ba979f51b3a32e08463718c33d58720247d53ffb5bda99f4f92a" diff --git a/recipes/restinio/all/conanfile.py b/recipes/restinio/all/conanfile.py index e65bd0d3bc7f9..1fec7b581abe4 100644 --- a/recipes/restinio/all/conanfile.py +++ b/recipes/restinio/all/conanfile.py @@ -38,7 +38,7 @@ def layout(self): def requirements(self): self.requires("http_parser/2.9.4") - self.requires("fmt/10.0.0") + self.requires("fmt/10.1.0") self.requires("expected-lite/0.6.3") self.requires("optional-lite/3.5.0") self.requires("string-view-lite/1.7.0") @@ -58,7 +58,7 @@ def requirements(self): if self.options.with_pcre == 1: self.requires("pcre/8.45") elif self.options.with_pcre == 2: - self.requires("pcre2/10.40") + self.requires("pcre2/10.42") def package_id(self): self.info.clear() diff --git a/recipes/restinio/config.yml b/recipes/restinio/config.yml index 517f51717a3a8..ee5e9f8ed6a0a 100644 --- a/recipes/restinio/config.yml +++ b/recipes/restinio/config.yml @@ -1,7 +1,7 @@ versions: + "0.6.19": + folder: all "0.6.18": folder: all "0.6.17": folder: all - "0.6.16": - folder: all From 8d107eaf9495c20a05641a9a32bcec9ab95475d6 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 19 Aug 2023 03:32:16 +0900 Subject: [PATCH 290/637] (#19260) maddy: add version 1.2.1 with several improvements --- recipes/maddy/all/conandata.yml | 7 ++++-- recipes/maddy/all/conanfile.py | 23 ++++++++++++++++++- recipes/maddy/all/test_package/CMakeLists.txt | 5 +--- recipes/maddy/config.yml | 2 ++ 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/recipes/maddy/all/conandata.yml b/recipes/maddy/all/conandata.yml index 91359378f2072..dfa40b0be6206 100644 --- a/recipes/maddy/all/conandata.yml +++ b/recipes/maddy/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.1": + url: "https://github.com/progsource/maddy/archive/refs/tags/1.2.1.tar.gz" + sha256: "b6058bce7ca32506969633ee7a4042e75b07464489f1c44be00913543cd687ef" "1.1.2": - sha256: ce66e1ee63bda3a6ab9c814edc0ed818abecca1c2218307ff87fb9ec1fc970fc - url: https://github.com/progsource/maddy/archive/refs/tags/1.1.2.tar.gz + url: "https://github.com/progsource/maddy/archive/refs/tags/1.1.2.tar.gz" + sha256: "ce66e1ee63bda3a6ab9c814edc0ed818abecca1c2218307ff87fb9ec1fc970fc" diff --git a/recipes/maddy/all/conanfile.py b/recipes/maddy/all/conanfile.py index 1cc4a8a062ec2..b023f2456bef0 100644 --- a/recipes/maddy/all/conanfile.py +++ b/recipes/maddy/all/conanfile.py @@ -1,9 +1,11 @@ import os from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.files import copy, get from conan.tools.layout import basic_layout +from conan.tools.scm import Version required_conan_version = ">=1.52.0" @@ -20,6 +22,20 @@ class MaddyConan(ConanFile): settings = "os", "arch", "compiler", "build_type" no_copy_source = True + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "6", + "clang": "5", + "apple-clang": "10", + "Visual Studio": "15", + "msvc": "191", + } + def layout(self): basic_layout(self, src_folder="src") @@ -28,7 +44,12 @@ def package_id(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 14) + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/maddy/all/test_package/CMakeLists.txt b/recipes/maddy/all/test_package/CMakeLists.txt index 8b3d049ce58f5..9b4b9a74cb47a 100755 --- a/recipes/maddy/all/test_package/CMakeLists.txt +++ b/recipes/maddy/all/test_package/CMakeLists.txt @@ -5,7 +5,4 @@ find_package(maddy REQUIRED CONFIG) add_executable(${PROJECT_NAME} example.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE maddy::maddy) -set_target_properties(${PROJECT_NAME} PROPERTIES - CXX_STANDARD 14 - CXX_STANDARD_REQUIRED ON -) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/maddy/config.yml b/recipes/maddy/config.yml index 8d13aefb6b4fb..12b8a7bf45a5b 100644 --- a/recipes/maddy/config.yml +++ b/recipes/maddy/config.yml @@ -1,3 +1,5 @@ versions: + "1.2.1": + folder: all "1.1.2": folder: all From cc1e5f0ee43eaf7cbd6f29d24ebdcb120eaf6941 Mon Sep 17 00:00:00 2001 From: igormironchik Date: Fri, 18 Aug 2023 23:50:56 +0300 Subject: [PATCH 291/637] (#19276) md4qt: bump version --- recipes/md4qt/all/conandata.yml | 3 +++ recipes/md4qt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index e4f01057df770..b2befced4887a 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.10": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.10.tar.gz" + sha256: "efcb7c97999ce2d78aba67041a61dda45feb54113e5b21851b0532fdcbc460a8" "2.0.9": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.9.tar.gz" sha256: "5b00c997eb33e877ca54468a101345e3a9986ce1b61b0919fa8632efabc51b6d" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index c184130e67ed4..20cb1b119cc18 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.10": + folder: all "2.0.9": folder: all "2.0.8": From 5fb83dcacc9d78b96c5a293e36607897427e2bc5 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 19 Aug 2023 14:35:15 +0900 Subject: [PATCH 292/637] (#19282) nudb: update boost/1.83.0 --- recipes/nudb/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/nudb/all/conanfile.py b/recipes/nudb/all/conanfile.py index f02496ac2b32a..bd9db41da603f 100644 --- a/recipes/nudb/all/conanfile.py +++ b/recipes/nudb/all/conanfile.py @@ -28,7 +28,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.82.0") + self.requires("boost/1.83.0") def package_id(self): self.info.clear() From 12ba5cea9abf2f73697eec8910ec2a6df202810f Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Sat, 19 Aug 2023 10:03:08 +0200 Subject: [PATCH 293/637] (#19038) [yaclib] Fix import for cmake_layout Signed-off-by: Uilian Ries --- recipes/yaclib/all/conanfile.py | 4 +--- recipes/yaclib/all/test_v1_package/conanfile.py | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/recipes/yaclib/all/conanfile.py b/recipes/yaclib/all/conanfile.py index 4c35bd089113e..5cd68c33e8af5 100644 --- a/recipes/yaclib/all/conanfile.py +++ b/recipes/yaclib/all/conanfile.py @@ -1,9 +1,7 @@ from conan import ConanFile from conan.tools.build import check_min_cppstd -from conan.tools.cmake import CMake, CMakeToolchain -from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import copy, get, export_conandata_patches, apply_conandata_patches, save -from conan.tools.layout import cmake_layout from conan.errors import ConanInvalidConfiguration import os import textwrap diff --git a/recipes/yaclib/all/test_v1_package/conanfile.py b/recipes/yaclib/all/test_v1_package/conanfile.py index 20d4d2e28d57e..22642ac137bfa 100644 --- a/recipes/yaclib/all/test_v1_package/conanfile.py +++ b/recipes/yaclib/all/test_v1_package/conanfile.py @@ -1,5 +1,4 @@ -from conans import ConanFile, CMake -from conan.tools.build import cross_building +from conans import ConanFile, CMake, tools import os class TestPackageV1Conan(ConanFile): @@ -12,6 +11,6 @@ def build(self): cmake.build() def test(self): - if not cross_building(self): + if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") self.run(bin_path, run_environment=True) From c23c100cb410789451770d989428f697787291a5 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 19 Aug 2023 17:22:58 +0900 Subject: [PATCH 294/637] (#14509) cassandra-cpp-driver: add version 2.16.2, support conan v2 * cassandra-cpp-driver: add version 2.16.2, support conan v2 * fix library name, specify C++11 * add transitive_headers=True * update dependencies * fix compilation error on msvc * update dependencies, improve patch file * enable C++11, include type_traits --------- Co-authored-by: Uilian Ries --- .../cassandra-cpp-driver/all/CMakeLists.txt | 7 - .../cassandra-cpp-driver/all/conandata.yml | 38 +++- recipes/cassandra-cpp-driver/all/conanfile.py | 138 ++++++------ .../all/patches/2.15.3/fix-atomic.patch | 28 +++ .../all/patches/2.15.3/fix-cmake.patch | 148 ++++++++----- .../all/patches/2.15.3/fix-rapidjson.patch | 18 +- .../2.15.3/remove-attribute-for-msvc.patch | 18 ++ .../all/patches/2.16.2/fix-cmake.patch | 201 ++++++++++++++++++ .../all/test_package/CMakeLists.txt | 13 +- .../all/test_package/conanfile.py | 25 ++- .../{main.cpp => test_package.cpp} | 0 .../all/test_v1_package/CMakeLists.txt | 8 + .../all/test_v1_package/conanfile.py | 18 ++ recipes/cassandra-cpp-driver/config.yml | 2 + 14 files changed, 491 insertions(+), 171 deletions(-) delete mode 100644 recipes/cassandra-cpp-driver/all/CMakeLists.txt create mode 100644 recipes/cassandra-cpp-driver/all/patches/2.15.3/fix-atomic.patch create mode 100644 recipes/cassandra-cpp-driver/all/patches/2.15.3/remove-attribute-for-msvc.patch create mode 100644 recipes/cassandra-cpp-driver/all/patches/2.16.2/fix-cmake.patch rename recipes/cassandra-cpp-driver/all/test_package/{main.cpp => test_package.cpp} (100%) create mode 100644 recipes/cassandra-cpp-driver/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/cassandra-cpp-driver/all/test_v1_package/conanfile.py diff --git a/recipes/cassandra-cpp-driver/all/CMakeLists.txt b/recipes/cassandra-cpp-driver/all/CMakeLists.txt deleted file mode 100644 index 7f03984bd9149..0000000000000 --- a/recipes/cassandra-cpp-driver/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cassandra C CXX) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/cassandra-cpp-driver/all/conandata.yml b/recipes/cassandra-cpp-driver/all/conandata.yml index 0ca8371b0b30f..35b0bd34f38b7 100644 --- a/recipes/cassandra-cpp-driver/all/conandata.yml +++ b/recipes/cassandra-cpp-driver/all/conandata.yml @@ -1,10 +1,36 @@ sources: + "2.16.2": + url: "https://github.com/datastax/cpp-driver/archive/2.16.2.tar.gz" + sha256: "de60751bd575b5364c2c5a17a24a40f3058264ea2ee6fef19de126ae550febc9" "2.15.3": - url: "https://github.com/datastax/cpp-driver/archive/2.15.3.zip" - sha256: "494b35418f1eaa86d80572a4254b7fae88a1341dcda83788ed038ce4f39117cb" + url: "https://github.com/datastax/cpp-driver/archive/2.15.3.tar.gz" + sha256: "eccb53c5151621c3b647fc83781a542cfb93e76687b4178ebce418fc4c817293" patches: + "2.16.2": + - patch_file: "patches/2.16.2/fix-cmake.patch" + patch_description: "use cci package" + patch_type: "conan" + - patch_file: "patches/2.15.3/fix-rapidjson.patch" + patch_description: "fix include path for cci package" + patch_type: "conan" + - patch_file: "patches/2.15.3/fix-atomic.patch" + patch_description: "Adapt MemoryOrder definition for C++ 20" + patch_type: "portability" + patch_source: "https://github.com/datastax/cpp-driver/pull/533" + - patch_file: "patches/2.15.3/remove-attribute-for-msvc.patch" + patch_description: "remove attribute for msvc" + patch_type: "portability" "2.15.3": - - base_path: "source_subfolder" - patch_file: "patches/2.15.3/fix-cmake.patch" - - base_path: "source_subfolder" - patch_file: "patches/2.15.3/fix-rapidjson.patch" + - patch_file: "patches/2.15.3/fix-cmake.patch" + patch_description: "use cci package" + patch_type: "conan" + - patch_file: "patches/2.15.3/fix-rapidjson.patch" + patch_description: "fix include path for cci package" + patch_type: "conan" + - patch_file: "patches/2.15.3/fix-atomic.patch" + patch_description: "Adapt MemoryOrder definition for C++ 20" + patch_type: "portability" + patch_source: "https://github.com/datastax/cpp-driver/pull/533" + - patch_file: "patches/2.15.3/remove-attribute-for-msvc.patch" + patch_description: "remove attribute for msvc" + patch_type: "portability" diff --git a/recipes/cassandra-cpp-driver/all/conanfile.py b/recipes/cassandra-cpp-driver/all/conanfile.py index 76b1d99adf12b..57fdb66f78e3f 100644 --- a/recipes/cassandra-cpp-driver/all/conanfile.py +++ b/recipes/cassandra-cpp-driver/all/conanfile.py @@ -1,19 +1,20 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, replace_in_file, rm +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.build import check_min_cppstd import os -required_conan_version = ">=1.33.0" - +required_conan_version = ">=1.53.0" class CassandraCppDriverConan(ConanFile): name = "cassandra-cpp-driver" + description = "DataStax C/C++ Driver for Apache Cassandra and DataStax Products" license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://docs.datastax.com/en/developer/cpp-driver/" - description = "DataStax C/C++ Driver for Apache Cassandra and DataStax Products" - topics = ("cassandra", "cpp-driver", "database", "conan-recipe") - - settings = "os", "compiler", "build_type", "arch" + topics = ("cassandra", "cpp-driver", "database",) + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -34,19 +35,14 @@ class CassandraCppDriverConan(ConanFile): "with_kerberos": False, "use_timerfd": True, } - short_paths = True - generators = "cmake" - exports_sources = [ - "CMakeLists.txt", - "patches/*" - ] - - _cmake = None @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 11 + + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -55,24 +51,30 @@ def config_options(self): 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("libuv/1.44.1") + self.requires("libuv/1.46.0") self.requires("http_parser/2.9.4") - self.requires("rapidjson/cci.20211112") + self.requires("rapidjson/cci.20220822") if self.options.with_openssl: - self.requires("openssl/1.1.1q") + self.requires("openssl/[>=1.1 <4]") if self.options.with_zlib: - self.requires("minizip/1.2.12") - self.requires("zlib/1.2.12") + self.requires("minizip/1.2.13") + self.requires("zlib/1.2.13") if self.options.use_atomic == "boost": - self.requires("boost/1.79.0") + self.requires("boost/1.82.0") def validate(self): + if self.info.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + if self.options.use_atomic == "boost": # Compilation error on Linux if self.settings.os == "Linux": @@ -84,69 +86,69 @@ def validate(self): "Kerberos is not supported at the moment") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), - "\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"Clang\"", - "\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"Clang\" OR \"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"AppleClang\"") - - def _configure_cmake(self): - if self._cmake: - return self._cmake - - self._cmake = CMake(self) - self._cmake.definitions["VERSION"] = self.version - self._cmake.definitions["CASS_BUILD_EXAMPLES"] = False - self._cmake.definitions["CASS_BUILD_INTEGRATION_TESTS"] = False - self._cmake.definitions["CASS_BUILD_SHARED"] = self.options.shared - self._cmake.definitions["CASS_BUILD_STATIC"] = not self.options.shared - self._cmake.definitions["CASS_BUILD_TESTS"] = False - self._cmake.definitions["CASS_BUILD_UNIT_TESTS"] = False - self._cmake.definitions["CASS_DEBUG_CUSTOM_ALLOC"] = False - self._cmake.definitions["CASS_INSTALL_HEADER_IN_SUBDIR"] = self.options.install_header_in_subdir - self._cmake.definitions["CASS_INSTALL_PKG_CONFIG"] = False + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["VERSION"] = self.version + tc.variables["CASS_BUILD_EXAMPLES"] = False + tc.variables["CASS_BUILD_INTEGRATION_TESTS"] = False + tc.variables["CASS_BUILD_SHARED"] = self.options.shared + tc.variables["CASS_BUILD_STATIC"] = not self.options.shared + tc.variables["CASS_BUILD_TESTS"] = False + tc.variables["CASS_BUILD_UNIT_TESTS"] = False + tc.variables["CASS_DEBUG_CUSTOM_ALLOC"] = False + tc.variables["CASS_INSTALL_HEADER_IN_SUBDIR"] = self.options.install_header_in_subdir + tc.variables["CASS_INSTALL_PKG_CONFIG"] = False if self.options.use_atomic == "boost": - self._cmake.definitions["CASS_USE_BOOST_ATOMIC"] = True - self._cmake.definitions["CASS_USE_STD_ATOMIC"] = False + tc.variables["CASS_USE_BOOST_ATOMIC"] = True + tc.variables["CASS_USE_STD_ATOMIC"] = False elif self.options.use_atomic == "std": - self._cmake.definitions["CASS_USE_BOOST_ATOMIC"] = False - self._cmake.definitions["CASS_USE_STD_ATOMIC"] = True + tc.variables["CASS_USE_BOOST_ATOMIC"] = False + tc.variables["CASS_USE_STD_ATOMIC"] = True else: - self._cmake.definitions["CASS_USE_BOOST_ATOMIC"] = False - self._cmake.definitions["CASS_USE_STD_ATOMIC"] = False + tc.variables["CASS_USE_BOOST_ATOMIC"] = False + tc.variables["CASS_USE_STD_ATOMIC"] = False - self._cmake.definitions["CASS_USE_OPENSSL"] = self.options.with_openssl - self._cmake.definitions["CASS_USE_STATIC_LIBS"] = False - self._cmake.definitions["CASS_USE_ZLIB"] = self.options.with_zlib - self._cmake.definitions["CASS_USE_LIBSSH2"] = False + tc.variables["CASS_USE_OPENSSL"] = self.options.with_openssl + tc.variables["CASS_USE_STATIC_LIBS"] = False + tc.variables["CASS_USE_ZLIB"] = self.options.with_zlib + tc.variables["CASS_USE_LIBSSH2"] = False # FIXME: To use kerberos, its conan package is needed. Uncomment this when kerberos conan package is ready. - # self._cmake.definitions["CASS_USE_KERBEROS"] = self.options.with_kerberos + # tc.variables["CASS_USE_KERBEROS"] = self.options.with_kerberos if self.settings.os == "Linux": - self._cmake.definitions["CASS_USE_TIMERFD"] = self.options.use_timerfd + tc.variables["CASS_USE_TIMERFD"] = self.options.use_timerfd + tc.generate() - self._cmake.configure() - return self._cmake + deps = CMakeDeps(self) + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"Clang\"", + "\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"Clang\" OR \"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"AppleClang\"") + rm(self, "Findlibssh2.cmake", os.path.join(self.source_folder, "cmake")) + rm(self, "Findlibuv.cmake", os.path.join(self.source_folder, "cmake")) + rm(self, "FindOpenSSL.cmake", os.path.join(self.source_folder, "cmake")) def build(self): self._patch_sources() - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy(pattern="LICENSE.txt", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): - self.cpp_info.libs = tools.collect_libs(self) + self.cpp_info.libs = ["cassandra" if self.options.shared else "cassandra_static"] if self.settings.os == "Windows": self.cpp_info.system_libs.extend(["iphlpapi", "psapi", "wsock32", diff --git a/recipes/cassandra-cpp-driver/all/patches/2.15.3/fix-atomic.patch b/recipes/cassandra-cpp-driver/all/patches/2.15.3/fix-atomic.patch new file mode 100644 index 0000000000000..64a29de126f9f --- /dev/null +++ b/recipes/cassandra-cpp-driver/all/patches/2.15.3/fix-atomic.patch @@ -0,0 +1,28 @@ +diff --git a/src/atomic/atomic_std.hpp b/src/atomic/atomic_std.hpp +index 2ad0103..08418a9 100644 +--- a/src/atomic/atomic_std.hpp ++++ b/src/atomic/atomic_std.hpp +@@ -18,16 +18,17 @@ + #define DATASTAX_INTERNAL_ATOMIC_STD_HPP + + #include ++#include + + namespace datastax { namespace internal { + + enum MemoryOrder { +- MEMORY_ORDER_RELAXED = std::memory_order_relaxed, +- MEMORY_ORDER_CONSUME = std::memory_order_consume, +- MEMORY_ORDER_ACQUIRE = std::memory_order_acquire, +- MEMORY_ORDER_RELEASE = std::memory_order_release, +- MEMORY_ORDER_ACQ_REL = std::memory_order_acq_rel, +- MEMORY_ORDER_SEQ_CST = std::memory_order_seq_cst ++ MEMORY_ORDER_RELAXED = static_cast::type>(std::memory_order_relaxed), ++ MEMORY_ORDER_CONSUME = static_cast::type>(std::memory_order_consume), ++ MEMORY_ORDER_ACQUIRE = static_cast::type>(std::memory_order_acquire), ++ MEMORY_ORDER_RELEASE = static_cast::type>(std::memory_order_release), ++ MEMORY_ORDER_ACQ_REL = static_cast::type>(std::memory_order_acq_rel), ++ MEMORY_ORDER_SEQ_CST = static_cast::type>(std::memory_order_seq_cst) + }; + + template diff --git a/recipes/cassandra-cpp-driver/all/patches/2.15.3/fix-cmake.patch b/recipes/cassandra-cpp-driver/all/patches/2.15.3/fix-cmake.patch index 191d2eb7e8174..9406ccc60d7aa 100644 --- a/recipes/cassandra-cpp-driver/all/patches/2.15.3/fix-cmake.patch +++ b/recipes/cassandra-cpp-driver/all/patches/2.15.3/fix-cmake.patch @@ -1,43 +1,87 @@ - CMakeLists.txt | 4 --- - src/CMakeLists.txt | 84 ++++++++++++++++++++++++++++++++++++------------------ - 2 files changed, 57 insertions(+), 31 deletions(-) - diff --git a/CMakeLists.txt b/CMakeLists.txt -index c6150948b..669eb086e 100644 +index c615094..b10d9c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1,6 +1,3 @@ --cmake_minimum_required(VERSION 2.8.12) --project(cassandra C CXX) -- - set(CASS_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}) - set(CASS_SRC_DIR "${CASS_ROOT_DIR}/src") - set(CASS_INCLUDE_DIR "${CASS_ROOT_DIR}/include") -@@ -81,7 +78,6 @@ endif() - # Dependencies - #------------------------ +@@ -164,7 +164,7 @@ endif() + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR + "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + # Enable C++11 support to use std::atomic +- if(CASS_USE_STD_ATOMIC) ++ if(1) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + endif() + +diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake +index 9052472..3f65adb 100644 +--- a/cmake/Dependencies.cmake ++++ b/cmake/Dependencies.cmake +@@ -21,28 +21,28 @@ if(NOT LIBUV_ROOT_DIR) + endif() + + # Ensure libuv was found +-find_package(Libuv "1.0.0") +-if(WIN32 AND NOT LIBUV_FOUND) ++find_package(libuv "1.0.0") ++if(WIN32 AND NOT libuv_FOUND) + message(STATUS "Unable to Locate libuv: Third party build step will be performed") + include(ExternalProject-libuv) +-elseif(NOT LIBUV_FOUND) ++elseif(NOT libuv_FOUND) + message(FATAL_ERROR "Unable to Locate libuv: libuv v1.0.0+ is required") + endif() + +-if(LIBUV_VERSION VERSION_LESS "1.0") +- message(FATAL_ERROR "Libuv version ${LIBUV_VERSION} is not " ++if(libuv_VERSION VERSION_LESS "1.0") ++ message(FATAL_ERROR "libuv version ${libuv_VERSION} is not " + " supported. Please updgrade to libuv version 1.0 or greater in order to " + "utilize the driver.") + endif() --include(Dependencies) - include(ClangFormat) +-if(LIBUV_VERSION VERSION_LESS "1.6") +- message(WARNING "Libuv version ${LIBUV_VERSION} does not support custom " ++if(libuv_VERSION VERSION_LESS "1.6") ++ message(WARNING "libuv version ${libuv_VERSION} does not support custom " + "memory allocators (version 1.6 or greater required)") + endif() + + # Assign libuv include and libraries +-set(CASS_INCLUDES ${CASS_INCLUDES} ${LIBUV_INCLUDE_DIRS}) +-set(CASS_LIBS ${CASS_LIBS} ${LIBUV_LIBRARIES}) ++set(CASS_INCLUDES ${CASS_INCLUDES} ${libuv_INCLUDE_DIRS}) ++set(CASS_LIBS ${CASS_LIBS} ${libuv_LIBRARIES}) + + # libuv and gtests require thread library + if(NOT WIN32) +@@ -192,3 +192,20 @@ if(CASS_USE_BOOST_ATOMIC) + endif() + endif() - #------------------------ ++#------------------------ ++# RapidJSON ++#------------------------ ++find_package(RapidJSON REQUIRED CONFIG) ++set(CASS_LIBS ${CASS_LIBS} rapidjson) ++ ++#------------------------ ++# http_parser ++#------------------------ ++find_package(http_parser REQUIRED CONFIG) ++set(CASS_LIBS ${CASS_LIBS} http_parser::http_parser) ++ ++#------------------------ ++# minizip ++#------------------------ ++find_package(minizip REQUIRED CONFIG) ++set(CASS_LIBS ${CASS_LIBS} minizip::minizip) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 06b84b759..7e81b2a06 100644 +index 06b84b7..41b23f2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -1,6 +1,50 @@ +@@ -1,6 +1,41 @@ include(CheckSymbolExists) include(CheckCXXSourceCompiles) -+#------------------------ -+# Windows libraries -+#------------------------ -+ -+if(WIN32) -+ # Assign additional library requirements for Windows -+ set(CASS_LIBS iphlpapi psapi wsock32 crypt32 ws2_32 userenv version) -+endif() -+ +#------------------------ +# Libuv +#------------------------ @@ -76,7 +120,7 @@ index 06b84b759..7e81b2a06 100644 file(GLOB SOURCES *.cpp *.hpp) if(APPLE) -@@ -38,18 +82,14 @@ endif() +@@ -38,18 +73,14 @@ endif() add_subdirectory(third_party/curl) add_subdirectory(third_party/hdr_histogram) @@ -90,16 +134,17 @@ index 06b84b759..7e81b2a06 100644 - third_party/http-parser - third_party/minizip - third_party/mt19937_64 +- third_party/rapidjson/rapidjson +- third_party/sparsehash/src) + third_party/curl # FIXME: Use conan package + third_party/hdr_histogram # FIXME: Use conan package + third_party/mt19937_64 # FIXME: Use conan package -+ third_party/sparsehash/src) # FIXME: Use conan package - third_party/rapidjson/rapidjson -- third_party/sparsehash/src) ++ third_party/sparsehash/src # FIXME: Use conan package ++) list(APPEND INCLUDE_DIRS ${CASS_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) -@@ -69,12 +109,6 @@ if(WIN32) +@@ -69,12 +100,6 @@ if(WIN32) endif() endif() @@ -112,40 +157,27 @@ index 06b84b759..7e81b2a06 100644 #------------------------------ # Build configured header #------------------------------ -@@ -130,11 +164,11 @@ if(CASS_BUILD_SHARED) - add_library(cassandra SHARED +@@ -131,8 +156,7 @@ if(CASS_BUILD_SHARED) ${SOURCES} $ -- $ + $ - $ - $) -+ $) ++ ) target_link_libraries(cassandra ${CASS_LIBS}) -- target_include_directories(cassandra PRIVATE ${INCLUDE_DIRS} ${CASS_INCLUDES}) -+ target_include_directories(cassandra PRIVATE ${INCLUDE_DIRS}) -+ -+ conan_target_link_libraries(cassandra) - - set_target_properties(cassandra PROPERTIES OUTPUT_NAME cassandra) - set_target_properties(cassandra PROPERTIES VERSION ${PROJECT_VERSION_STRING} SOVERSION ${PROJECT_VERSION_MAJOR}) -@@ -167,11 +201,12 @@ if(CASS_BUILD_STATIC) - add_library(cassandra_static STATIC + target_include_directories(cassandra PRIVATE ${INCLUDE_DIRS} ${CASS_INCLUDES}) + +@@ -168,8 +192,7 @@ if(CASS_BUILD_STATIC) ${SOURCES} $ -- $ + $ - $ - $) -+ $) -+ ++ ) target_link_libraries(cassandra_static ${CASS_LIBS}) -- target_include_directories(cassandra_static PRIVATE ${INCLUDE_DIRS} ${CASS_INCLUDES}) -+ target_include_directories(cassandra_static PRIVATE ${INCLUDE_DIRS}) -+ -+ conan_target_link_libraries(cassandra_static) - - set_target_properties(cassandra_static PROPERTIES OUTPUT_NAME cassandra_static) - set_target_properties(cassandra_static PROPERTIES VERSION ${PROJECT_VERSION_STRING} SOVERSION ${PROJECT_VERSION_MAJOR}) -@@ -274,11 +309,6 @@ if(CASS_BUILD_SHARED) + target_include_directories(cassandra_static PRIVATE ${INCLUDE_DIRS} ${CASS_INCLUDES}) + +@@ -274,11 +297,6 @@ if(CASS_BUILD_SHARED) endif() endif() endif() diff --git a/recipes/cassandra-cpp-driver/all/patches/2.15.3/fix-rapidjson.patch b/recipes/cassandra-cpp-driver/all/patches/2.15.3/fix-rapidjson.patch index 7c7b5d16994d7..91811710ffbe4 100644 --- a/recipes/cassandra-cpp-driver/all/patches/2.15.3/fix-rapidjson.patch +++ b/recipes/cassandra-cpp-driver/all/patches/2.15.3/fix-rapidjson.patch @@ -1,21 +1,5 @@ - src/CMakeLists.txt | 1 - - src/json.hpp | 8 ++++---- - 2 files changed, 4 insertions(+), 5 deletions(-) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 7e81b2a06..2f3229292 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -89,7 +89,6 @@ list(APPEND INCLUDE_DIRS - third_party/hdr_histogram # FIXME: Use conan package - third_party/mt19937_64 # FIXME: Use conan package - third_party/sparsehash/src) # FIXME: Use conan package -- third_party/rapidjson/rapidjson - - list(APPEND INCLUDE_DIRS ${CASS_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) - diff --git a/src/json.hpp b/src/json.hpp -index 620536e55..6003f2521 100644 +index 620536e..6003f25 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -48,13 +48,13 @@ static void delete_(T* ptr) { diff --git a/recipes/cassandra-cpp-driver/all/patches/2.15.3/remove-attribute-for-msvc.patch b/recipes/cassandra-cpp-driver/all/patches/2.15.3/remove-attribute-for-msvc.patch new file mode 100644 index 0000000000000..216ee8df654e9 --- /dev/null +++ b/recipes/cassandra-cpp-driver/all/patches/2.15.3/remove-attribute-for-msvc.patch @@ -0,0 +1,18 @@ +diff --git a/src/third_party/sparsehash/src/sparsehash/internal/hashtable-common.h b/src/third_party/sparsehash/src/sparsehash/internal/hashtable-common.h +index bac2b88..e802b5c 100644 +--- a/src/third_party/sparsehash/src/sparsehash/internal/hashtable-common.h ++++ b/src/third_party/sparsehash/src/sparsehash/internal/hashtable-common.h +@@ -50,8 +50,13 @@ + _START_GOOGLE_NAMESPACE_ + + template struct SparsehashCompileAssert { }; ++#if defined(_MSC_VER) ++#define SPARSEHASH_COMPILE_ASSERT(expr, msg) \ ++ typedef SparsehashCompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] ++#else + #define SPARSEHASH_COMPILE_ASSERT(expr, msg) \ + __attribute__((unused)) typedef SparsehashCompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] ++#endif + + namespace sparsehash_internal { + diff --git a/recipes/cassandra-cpp-driver/all/patches/2.16.2/fix-cmake.patch b/recipes/cassandra-cpp-driver/all/patches/2.16.2/fix-cmake.patch new file mode 100644 index 0000000000000..5a69b0d7d12b1 --- /dev/null +++ b/recipes/cassandra-cpp-driver/all/patches/2.16.2/fix-cmake.patch @@ -0,0 +1,201 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c615094..b10d9c9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -164,7 +164,7 @@ endif() + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR + "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + # Enable C++11 support to use std::atomic +- if(CASS_USE_STD_ATOMIC) ++ if(1) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + endif() + +diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake +index 9052472..4701133 100644 +--- a/cmake/Dependencies.cmake ++++ b/cmake/Dependencies.cmake +@@ -21,28 +21,28 @@ if(NOT LIBUV_ROOT_DIR) + endif() + + # Ensure libuv was found +-find_package(Libuv "1.0.0") +-if(WIN32 AND NOT LIBUV_FOUND) ++find_package(libuv "1.0.0") ++if(WIN32 AND NOT libuv_FOUND) + message(STATUS "Unable to Locate libuv: Third party build step will be performed") + include(ExternalProject-libuv) +-elseif(NOT LIBUV_FOUND) ++elseif(NOT libuv_FOUND) + message(FATAL_ERROR "Unable to Locate libuv: libuv v1.0.0+ is required") + endif() + +-if(LIBUV_VERSION VERSION_LESS "1.0") +- message(FATAL_ERROR "Libuv version ${LIBUV_VERSION} is not " ++if(libuv_VERSION VERSION_LESS "1.0") ++ message(FATAL_ERROR "Libuv version ${libuv_VERSION} is not " + " supported. Please updgrade to libuv version 1.0 or greater in order to " + "utilize the driver.") + endif() + +-if(LIBUV_VERSION VERSION_LESS "1.6") +- message(WARNING "Libuv version ${LIBUV_VERSION} does not support custom " ++if(libuv_VERSION VERSION_LESS "1.6") ++ message(WARNING "Libuv version ${libuv_VERSION} does not support custom " + "memory allocators (version 1.6 or greater required)") + endif() + + # Assign libuv include and libraries +-set(CASS_INCLUDES ${CASS_INCLUDES} ${LIBUV_INCLUDE_DIRS}) +-set(CASS_LIBS ${CASS_LIBS} ${LIBUV_LIBRARIES}) ++set(CASS_INCLUDES ${CASS_INCLUDES} ${libuv_INCLUDE_DIRS}) ++set(CASS_LIBS ${CASS_LIBS} ${libuv_LIBRARIES}) + + # libuv and gtests require thread library + if(NOT WIN32) +@@ -192,3 +192,20 @@ if(CASS_USE_BOOST_ATOMIC) + endif() + endif() + ++#------------------------ ++# RapidJSON ++#------------------------ ++find_package(RapidJSON REQUIRED CONFIG) ++set(CASS_LIBS ${CASS_LIBS} rapidjson) ++ ++#------------------------ ++# http_parser ++#------------------------ ++find_package(http_parser REQUIRED CONFIG) ++set(CASS_LIBS ${CASS_LIBS} http_parser::http_parser) ++ ++#------------------------ ++# minizip ++#------------------------ ++find_package(minizip REQUIRED CONFIG) ++set(CASS_LIBS ${CASS_LIBS} minizip::minizip) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index d662718..088a153 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,6 +1,42 @@ + include(CheckSymbolExists) + include(CheckCXXSourceCompiles) + ++#------------------------ ++# Libuv ++#------------------------ ++ ++if(NOT WIN32) ++ set(CMAKE_THREAD_PREFER_PTHREAD 1) ++ set(THREADS_PREFER_PTHREAD_FLAG 1) ++endif() ++ ++find_package(Threads REQUIRED) ++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_THREAD_LIBS_INIT}") ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_THREAD_LIBS_INIT}") ++if(NOT WIN32 AND ${CMAKE_VERSION} VERSION_LESS "3.1.0") ++ # FindThreads in CMake versions < v3.1.0 do not have the THREADS_PREFER_PTHREAD_FLAG to prefer -pthread ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread") ++endif() ++ ++#------------------------ ++# Boost ++#------------------------ ++ ++if(CASS_USE_BOOST_ATOMIC) ++ # Ensure Boost auto linking is disabled (defaults to auto linking on Windows) ++ if(WIN32) ++ add_definitions(-DBOOST_ALL_NO_LIB) ++ endif() ++ ++ # Determine if additional Boost definitions are required for driver/executables ++ if(NOT WIN32) ++ # Handle explicit initialization warning in atomic/details/casts ++ add_definitions(-Wno-missing-field-initializers) ++ endif() ++endif() ++ ++ + file(GLOB SOURCES *.cpp *.hpp) + + if(APPLE) +@@ -38,18 +74,14 @@ endif() + + add_subdirectory(third_party/curl) + add_subdirectory(third_party/hdr_histogram) +-add_subdirectory(third_party/http-parser) +-add_subdirectory(third_party/minizip) + add_subdirectory(third_party/sparsehash) + + list(APPEND INCLUDE_DIRS +- third_party/curl +- third_party/hdr_histogram +- third_party/http-parser +- third_party/minizip +- third_party/mt19937_64 +- third_party/rapidjson/rapidjson +- third_party/sparsehash/src) ++ third_party/curl # FIXME: Use conan package ++ third_party/hdr_histogram # FIXME: Use conan package ++ third_party/mt19937_64 # FIXME: Use conan package ++ third_party/sparsehash/src # FIXME: Use conan package ++) + + list(APPEND INCLUDE_DIRS ${CASS_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + +@@ -69,13 +101,6 @@ if(WIN32) + endif() + endif() + +-if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wconversion -Wno-sign-conversion -Wno-shorten-64-to-32 -Wno-undefined-var-template -Werror") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-implicit-int-float-conversion") +-elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # To many superfluous warnings generated with GCC when using -Wconversion (see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40752) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") +-endif() +- + #------------------------------ + # Build configured header + #------------------------------ +@@ -122,7 +147,6 @@ configure_file( + ${CASS_ROOT_DIR}/driver_config.hpp.in + ${CMAKE_CURRENT_SOURCE_DIR}/driver_config.hpp) + +- + #------------------------------ + # Targets + #------------------------------ +@@ -132,8 +156,7 @@ if(CASS_BUILD_SHARED) + ${SOURCES} + $ + $ +- $ +- $) ++ ) + target_link_libraries(cassandra ${CASS_LIBS}) + target_include_directories(cassandra PRIVATE ${INCLUDE_DIRS} ${CASS_INCLUDES}) + +@@ -169,8 +192,7 @@ if(CASS_BUILD_STATIC) + ${SOURCES} + $ + $ +- $ +- $) ++ ) + target_link_libraries(cassandra_static ${CASS_LIBS}) + target_include_directories(cassandra_static PRIVATE ${INCLUDE_DIRS} ${CASS_INCLUDES}) + +@@ -275,11 +297,6 @@ if(CASS_BUILD_SHARED) + endif() + endif() + endif() +- if(WIN32) +- install(FILES $ +- DESTINATION "${INSTALL_DLL_EXE_DIR}" +- OPTIONAL) +- endif() + endif() + + if(CASS_BUILD_STATIC) diff --git a/recipes/cassandra-cpp-driver/all/test_package/CMakeLists.txt b/recipes/cassandra-cpp-driver/all/test_package/CMakeLists.txt index 1a95218e3d7a5..4d590e1005c29 100644 --- a/recipes/cassandra-cpp-driver/all/test_package/CMakeLists.txt +++ b/recipes/cassandra-cpp-driver/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package CXX) +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(cassandra-cpp-driver REQUIRED CONFIG) -add_executable(${PROJECT_NAME} main.cpp) - -conan_target_link_libraries(${PROJECT_NAME}) +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE cassandra-cpp-driver::cassandra-cpp-driver) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/cassandra-cpp-driver/all/test_package/conanfile.py b/recipes/cassandra-cpp-driver/all/test_package/conanfile.py index 0399475aec987..a9fb96656f203 100644 --- a/recipes/cassandra-cpp-driver/all/test_package/conanfile.py +++ b/recipes/cassandra-cpp-driver/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -import os.path -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 CassandraCppDriverTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" +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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if 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/cassandra-cpp-driver/all/test_package/main.cpp b/recipes/cassandra-cpp-driver/all/test_package/test_package.cpp similarity index 100% rename from recipes/cassandra-cpp-driver/all/test_package/main.cpp rename to recipes/cassandra-cpp-driver/all/test_package/test_package.cpp diff --git a/recipes/cassandra-cpp-driver/all/test_v1_package/CMakeLists.txt b/recipes/cassandra-cpp-driver/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..925ecbe19e448 --- /dev/null +++ b/recipes/cassandra-cpp-driver/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/cassandra-cpp-driver/all/test_v1_package/conanfile.py b/recipes/cassandra-cpp-driver/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..5a05af3c2dfd2 --- /dev/null +++ b/recipes/cassandra-cpp-driver/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +from conans import ConanFile, CMake +from conan.tools.build import cross_building +import os + + +class TestPackageV1Conan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/cassandra-cpp-driver/config.yml b/recipes/cassandra-cpp-driver/config.yml index 9792bd17fcc93..fa0680a1da5b5 100644 --- a/recipes/cassandra-cpp-driver/config.yml +++ b/recipes/cassandra-cpp-driver/config.yml @@ -1,3 +1,5 @@ versions: + "2.16.2": + folder: all "2.15.3": folder: all From 244e2cb9434191129a79d3808cf48451b4acfc0c Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 19 Aug 2023 11:45:28 +0300 Subject: [PATCH 295/637] (#17347) urdfdom: add recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * urdfdom: add recipe * urdfdom: fix libraries being hard-coded to SHARED * urdfdom: fix building as static library on Windows * urdfdom: remove unused USE_MSVC_RUNTIME_LIBRARY_DLL * urdfdom: simplify patches * urdfdom: improve conanfile.py - Add src_folder="src" to cmake_layout(). - Add minimum cppstd >= 14. - Explicitly set the CMake package and target names. * urdfdom: replace test_requires() -> build_requires() * urdfdom: drop test_v1_package * urdfdom: drop skip_test=False support For a simpler recipe. * urdfdom: rm unnecessary cpp_info properties * urdfdom: drop transitive_libs from tinyxml * urdfdom: remove *.pc, *.cmake and shared/package.xml * Update recipes/urdfdom/all/conanfile.py --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: Rubén Rincón Blanco --- recipes/urdfdom/all/conandata.yml | 22 ++++ recipes/urdfdom/all/conanfile.py | 107 ++++++++++++++++++ .../all/patches/001-optional-build-apps.patch | 34 ++++++ .../patches/002-use-conan-dependencies.patch | 83 ++++++++++++++ .../003-use-merged-urdfdom_headers.patch | 21 ++++ .../urdfdom/all/test_package/CMakeLists.txt | 8 ++ recipes/urdfdom/all/test_package/conanfile.py | 26 +++++ .../urdfdom/all/test_package/test_package.cpp | 15 +++ recipes/urdfdom/config.yml | 3 + 9 files changed, 319 insertions(+) create mode 100644 recipes/urdfdom/all/conandata.yml create mode 100644 recipes/urdfdom/all/conanfile.py create mode 100644 recipes/urdfdom/all/patches/001-optional-build-apps.patch create mode 100644 recipes/urdfdom/all/patches/002-use-conan-dependencies.patch create mode 100644 recipes/urdfdom/all/patches/003-use-merged-urdfdom_headers.patch create mode 100644 recipes/urdfdom/all/test_package/CMakeLists.txt create mode 100644 recipes/urdfdom/all/test_package/conanfile.py create mode 100644 recipes/urdfdom/all/test_package/test_package.cpp create mode 100644 recipes/urdfdom/config.yml diff --git a/recipes/urdfdom/all/conandata.yml b/recipes/urdfdom/all/conandata.yml new file mode 100644 index 0000000000000..82a2012232450 --- /dev/null +++ b/recipes/urdfdom/all/conandata.yml @@ -0,0 +1,22 @@ +sources: + "3.1.1": + urdfdom: + url: "https://github.com/ros/urdfdom/archive/refs/tags/3.1.1.tar.gz" + sha256: "dd69b2077b8fc1bd2b67022c1dc861cd896ac882df065aa08cabdf2f945a9ac0" + urdfdom_headers: + # Latest unreleased version from 2023-04-25. + # Identical to the latest v1.0.5 release, except headers have been conveniently moved to include/. + # We merge the headers into the main source tree instead of packaging them separately. + url: "https://github.com/ros/urdfdom_headers/archive/1fd21b64ed78493508a174f98af982605d1e4607.zip" + sha256: "aba42c1c83d6d1fb94e54ec84680a8b9e2417337fbaa85424da0e069d0cc89b6" +patches: + "3.1.1": + - patch_file: "patches/001-optional-build-apps.patch" + patch_type: "conan" + patch_description: "Disable building of apps by default" + - patch_file: "patches/002-use-conan-dependencies.patch" + patch_type: "conan" + patch_description: "Use dependencies (console_bridge, TinyXML, GTest) from Conan" + - patch_file: "patches/003-use-merged-urdfdom_headers.patch" + patch_type: "conan" + patch_description: "Use merged urdfdom_headers instead of a separate package" diff --git a/recipes/urdfdom/all/conanfile.py b/recipes/urdfdom/all/conanfile.py new file mode 100644 index 0000000000000..f7a710e7f7ea7 --- /dev/null +++ b/recipes/urdfdom/all/conanfile.py @@ -0,0 +1,107 @@ +import os + +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir + +required_conan_version = ">=1.53.0" + + +class PackageConan(ConanFile): + name = "urdfdom" + description = "Data structures and parsers to access URDF files using the DOM model" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ros/urdfdom" + topics = ("urdf", "ros", "robotics") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 14 + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("tinyxml/2.6.2", transitive_headers=True) + self.requires("console_bridge/1.0.2") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + + def source(self): + # urdfdom packages its headers separately as urdfdom_headers. + # There is no obvious benefit of doing the same for the Conan package, + # so we simply merge the headers into the main source tree. + sources = self.conan_data["sources"][self.version] + get(self, **sources["urdfdom_headers"], strip_root=True, + destination=os.path.join(self.source_folder, "urdf_parser")) + get(self, **sources["urdfdom"], strip_root=True, destination=self.source_folder) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["APPEND_PROJECT_NAME_TO_INCLUDEDIR"] = False + tc.variables["BUILD_TESTING"] = False + tc.variables["BUILD_APPS"] = False + if not self.options.shared: + tc.preprocessor_definitions["URDFDOM_STATIC"] = "1" + tc.generate() + CMakeDeps(self).generate() + + def _patch_sources(self): + apply_conandata_patches(self) + # Do not hard-code libraries to SHARED + parser_cmakelists = os.path.join(self.source_folder, "urdf_parser", "CMakeLists.txt") + replace_in_file(self, parser_cmakelists, " SHARED", "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "urdfdom")) + rmdir(self, os.path.join(self.package_folder, "CMake")) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.pdb", self.package_folder, recursive=True) + + def package_info(self): + self.cpp_info.libs = [ + "urdfdom_model", + "urdfdom_model_state", + "urdfdom_sensor", + "urdfdom_world", + ] + + if not self.options.shared: + self.cpp_info.defines.append("URDFDOM_STATIC=1") diff --git a/recipes/urdfdom/all/patches/001-optional-build-apps.patch b/recipes/urdfdom/all/patches/001-optional-build-apps.patch new file mode 100644 index 0000000000000..a89c2b010b26c --- /dev/null +++ b/recipes/urdfdom/all/patches/001-optional-build-apps.patch @@ -0,0 +1,34 @@ +--- a/urdf_parser/CMakeLists.txt ++++ b/urdf_parser/CMakeLists.txt +@@ -80,6 +78,7 @@ + + # -------------------------------- + ++if(BUILD_APPS) + add_executable(check_urdf src/check_urdf.cpp) + target_include_directories(check_urdf PUBLIC include) + target_link_libraries(check_urdf urdfdom_model urdfdom_world) +@@ -96,6 +95,7 @@ + add_executable(urdf_mem_test test/memtest.cpp) + target_include_directories(urdf_mem_test PUBLIC include) + target_link_libraries(urdf_mem_test urdfdom_model) ++endif() + + include(CTest) + if(BUILD_TESTING) +@@ -103,6 +103,7 @@ + add_subdirectory(test) + endif() + ++if(BUILD_APPS) + INSTALL( + TARGETS + check_urdf +@@ -113,6 +114,7 @@ + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) ++endif() + INSTALL( + TARGETS + urdfdom_model diff --git a/recipes/urdfdom/all/patches/002-use-conan-dependencies.patch b/recipes/urdfdom/all/patches/002-use-conan-dependencies.patch new file mode 100644 index 0000000000000..cbb6f0fc84fb3 --- /dev/null +++ b/recipes/urdfdom/all/patches/002-use-conan-dependencies.patch @@ -0,0 +1,83 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt (revision 1ed7ca95b917f38feb4ff7bd1aa033baf2cfce0e) ++++ b/CMakeLists.txt (revision 6592c04e28cb59b8e9ac5944e3229c50d706a2ee) +@@ -45,19 +45,9 @@ + + set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + +-find_package(tinyxml_vendor QUIET) +-find_package(TinyXML) +-# bionic has not cmake module, workaround +-if (NOT TinyXML_FOUND AND UNIX) +- include(FindPkgConfig) +- pkg_check_modules (TinyXML tinyxml) +-else() +- # Make it fail in platforms without pkgconfig +- find_package(TinyXML REQUIRED) # bionic has not cmake module +-endif() ++find_package(tinyxml REQUIRED CONFIG) + find_package(urdfdom_headers 1.0 REQUIRED) +-find_package(console_bridge_vendor QUIET) # Provides console_bridge 0.4.0 on platforms without it. +-find_package(console_bridge REQUIRED) ++find_package(console_bridge REQUIRED CONFIG) + + # Control where libraries and executables are placed during the build + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}") + +diff --git a/urdf_parser/CMakeLists.txt b/urdf_parser/CMakeLists.txt +--- a/urdf_parser/CMakeLists.txt (revision 1ed7ca95b917f38feb4ff7bd1aa033baf2cfce0e) ++++ b/urdf_parser/CMakeLists.txt (revision 6592c04e28cb59b8e9ac5944e3229c50d706a2ee) +@@ -5,8 +5,6 @@ + + add_library(${add_urdfdom_library_LIBNAME} SHARED + ${add_urdfdom_library_SOURCES}) +- target_include_directories(${add_urdfdom_library_LIBNAME} SYSTEM PUBLIC +- ${TinyXML_INCLUDE_DIRS}) + target_include_directories(${add_urdfdom_library_LIBNAME} PUBLIC + "$" + "$") +@@ -14,7 +12,7 @@ + ${add_urdfdom_library_LINK} + ${console_bridge_link_libs} + ${urdfdom_headers_link_libs} +- ${TinyXML_LIBRARIES}) ++ tinyxml::tinyxml) + if(NOT CMAKE_CXX_STANDARD) + target_compile_features(${add_urdfdom_library_LIBNAME} PUBLIC cxx_std_14) + endif() + +diff --git a/urdf_parser/test/CMakeLists.txt b/urdf_parser/test/CMakeLists.txt +--- a/urdf_parser/test/CMakeLists.txt (revision 1ed7ca95b917f38feb4ff7bd1aa033baf2cfce0e) ++++ b/urdf_parser/test/CMakeLists.txt (revision 6592c04e28cb59b8e9ac5944e3229c50d706a2ee) +@@ -1,18 +1,8 @@ +-include_directories( +- ${CMAKE_CURRENT_SOURCE_DIR}/gtest/include +- ${CMAKE_CURRENT_SOURCE_DIR}/gtest +- ${CMAKE_CURRENT_SOURCE_DIR} +-) +- +-# Build gtest +-add_library(gtest STATIC gtest/src/gtest-all.cc) +-add_library(gtest_main STATIC gtest/src/gtest_main.cc) +-target_link_libraries(gtest_main gtest) +-target_compile_features(gtest PUBLIC cxx_std_11) +- + execute_process(COMMAND cmake -E remove_directory ${CMAKE_BINARY_DIR}/test_results) + execute_process(COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/test_results) + ++find_package(GTest REQUIRED) ++ + # unit test to fix geometry problems + set(tests + urdf_double_convert.cpp +@@ -27,8 +17,8 @@ + add_executable(${BINARY_NAME} ${GTEST_SOURCE_file}) + + target_link_libraries(${BINARY_NAME} +- gtest_main +- gtest ++ GTest::gtest ++ GTest::gtest_main + urdfdom_model + ) + if (UNIX) diff --git a/recipes/urdfdom/all/patches/003-use-merged-urdfdom_headers.patch b/recipes/urdfdom/all/patches/003-use-merged-urdfdom_headers.patch new file mode 100644 index 0000000000000..b4095fcb7ba42 --- /dev/null +++ b/recipes/urdfdom/all/patches/003-use-merged-urdfdom_headers.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt (revision 82fb54588f3ba5091d9a73d072559ac7061eccdf) ++++ b/CMakeLists.txt (revision 1de2b88f231fa0f7f83a028e971d4ebaed1b164c) +@@ -46,7 +46,6 @@ + set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + + find_package(tinyxml REQUIRED CONFIG) +-find_package(urdfdom_headers 1.0 REQUIRED) + find_package(console_bridge REQUIRED CONFIG) + + # Control where libraries and executables are placed during the build + +diff --git a/urdf_parser/CMakeLists.txt b/urdf_parser/CMakeLists.txt +--- a/urdf_parser/CMakeLists.txt (revision 82fb54588f3ba5091d9a73d072559ac7061eccdf) ++++ b/urdf_parser/CMakeLists.txt (revision 1de2b88f231fa0f7f83a028e971d4ebaed1b164c) +@@ -135,4 +135,4 @@ + FILE "urdfdomExport.cmake" + ) + +-INSTALL(DIRECTORY include/urdf_parser DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++INSTALL(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/recipes/urdfdom/all/test_package/CMakeLists.txt b/recipes/urdfdom/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..2d7a881934a29 --- /dev/null +++ b/recipes/urdfdom/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) + +find_package(urdfdom REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE urdfdom::urdfdom) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/urdfdom/all/test_package/conanfile.py b/recipes/urdfdom/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/urdfdom/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/urdfdom/all/test_package/test_package.cpp b/recipes/urdfdom/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..a7e4a0d704e35 --- /dev/null +++ b/recipes/urdfdom/all/test_package/test_package.cpp @@ -0,0 +1,15 @@ +#include +#include +#include + +#include + +int main() { + std::string test_str = + "" + " " + ""; + urdf::ModelInterfaceSharedPtr urdf = urdf::parseURDF(test_str); + std::cout << "urdf::parseURDF() ran successfully" << std::endl; + return EXIT_SUCCESS; +} diff --git a/recipes/urdfdom/config.yml b/recipes/urdfdom/config.yml new file mode 100644 index 0000000000000..fd9669719a7ad --- /dev/null +++ b/recipes/urdfdom/config.yml @@ -0,0 +1,3 @@ +versions: + "3.1.1": + folder: all From 16b4778098a54accf9428a21e67db6f347d2db1a Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 19 Aug 2023 12:25:18 +0300 Subject: [PATCH 296/637] (#17998) rtklib: add recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * rtklib: add recipe * rtklib: add undefined extern functions * rtklib: remove use_iers_tide_model option Disabled by default and would require linking with a precompiled library. * rtklib: simplify defs handling * rtklib: add a comment for the default values * rtklib: remove an unsupported compile flag from Clang * rtklib: add an additional reference for the defaults * rtklib: fix build errors on MacOS * rtklib: add '-undefined dynamic_lookup' ldflags on apple-clang * rtklib: fix Windows builds * rtklib: do not add opt flags for Debug, disable compiler warnings --------- Co-authored-by: Rubén Rincón Blanco --- recipes/rtklib/all/CMakeLists.txt | 38 +++++ recipes/rtklib/all/conandata.yml | 9 ++ recipes/rtklib/all/conanfile.py | 138 ++++++++++++++++++ .../fix-dll-export-of-global-vars.patch | 23 +++ .../rtklib/all/test_package/CMakeLists.txt | 7 + recipes/rtklib/all/test_package/conanfile.py | 27 ++++ .../rtklib/all/test_package/test_package.cpp | 18 +++ recipes/rtklib/config.yml | 3 + 8 files changed, 263 insertions(+) create mode 100644 recipes/rtklib/all/CMakeLists.txt create mode 100644 recipes/rtklib/all/conandata.yml create mode 100644 recipes/rtklib/all/conanfile.py create mode 100644 recipes/rtklib/all/patches/fix-dll-export-of-global-vars.patch create mode 100644 recipes/rtklib/all/test_package/CMakeLists.txt create mode 100644 recipes/rtklib/all/test_package/conanfile.py create mode 100644 recipes/rtklib/all/test_package/test_package.cpp create mode 100644 recipes/rtklib/config.yml diff --git a/recipes/rtklib/all/CMakeLists.txt b/recipes/rtklib/all/CMakeLists.txt new file mode 100644 index 0000000000000..6f87c0e328a59 --- /dev/null +++ b/recipes/rtklib/all/CMakeLists.txt @@ -0,0 +1,38 @@ +# Based largely on https://github.com/tomojitakasu/RTKLIB/blob/v2.4.3-b34/app/consapp/rnx2rtkp/gcc/makefile +cmake_minimum_required(VERSION 3.15) +project(rtklib C) + +if (NOT MSVC) + add_compile_options(-ansi $<$>:-O3>) +# add_compile_options(-Wall -pedantic) +# if (GCC) +# add_compile_options(-Wno-unused-but-set-variable) +# endif() +else() + add_compile_options( /D_CRT_SECURE_NO_WARNINGS $<$>:/O2>) +# add_compile_options(/W4) +endif() + +if (APPLE) + # Allow extern functions (showmsg(), settspan() and settime()) to be found at runtime + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined dynamic_lookup") +endif() + +file(GLOB_RECURSE RTKLIB_SOURCES "src/*.c") + +find_package(Threads REQUIRED) + +add_library(rtklib ${RTKLIB_SOURCES}) +target_include_directories(rtklib PUBLIC src) +target_link_libraries(rtklib PUBLIC Threads::Threads) + +if (WIN32) + target_link_libraries(rtklib PRIVATE + ws2_32 # sockets + winmm # timeGetTime() + ) +endif() + +include(GNUInstallDirs) +install(TARGETS rtklib) +install(FILES src/rtklib.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/recipes/rtklib/all/conandata.yml b/recipes/rtklib/all/conandata.yml new file mode 100644 index 0000000000000..7dc67f1d1ed6d --- /dev/null +++ b/recipes/rtklib/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "2.4.3-b34": + url: "https://github.com/tomojitakasu/RTKLIB/archive/refs/tags/v2.4.3-b34.tar.gz" + sha256: "a9ce13293ef71b028036cb98a114b9bba96bdd439a0aeebca8e9c73156e461cf" +patches: + "2.4.3-b34": + - patch_file: "patches/fix-dll-export-of-global-vars.patch" + patch_description: "Fix missing EXPORT attributes on global variables required for shared Windows builds" + patch_type: "portability" diff --git a/recipes/rtklib/all/conanfile.py b/recipes/rtklib/all/conanfile.py new file mode 100644 index 0000000000000..ea091707cc7ee --- /dev/null +++ b/recipes/rtklib/all/conanfile.py @@ -0,0 +1,138 @@ +import os + +from conan import ConanFile +from conan.tools.apple import is_apple_os +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import get, copy, export_conandata_patches, apply_conandata_patches + +required_conan_version = ">=1.53.0" + + +class RtklibConan(ConanFile): + name = "rtklib" + description = "Library for standard and precise positioning with GNSS" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/tomojitakasu/RTKLIB" + topics = ("gnss", "rtk", "ppp", "rinex", "rtcm", "ublox", "novatel", "septentrio") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "trace": [True, False], + "enable_glonass": [True, False], + "enable_qzss": [True, False], + "enable_galileo": [True, False], + "enable_beidou": [True, False], + "enable_irnss": [True, False], + "num_frequencies": ["ANY"], + "num_ext_obs_codes": ["ANY"], + } + default_options = { + "shared": False, + "fPIC": True, + "trace": False, + "enable_glonass": True, + "enable_qzss": True, + "enable_galileo": True, + "enable_beidou": True, + "enable_irnss": True, + "num_frequencies": 5, + "num_ext_obs_codes": 3, + } + + def export_sources(self): + copy(self, "CMakeLists.txt", + src=self.recipe_folder, + dst=os.path.join(self.export_sources_folder, "src")) + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + @property + def _public_defines(self): + # Values used in the public header + # https://github.com/tomojitakasu/RTKLIB/blob/v2.4.3-b34/src/rtklib.h#L6-L15 + # Default values are based on + # https://github.com/tomojitakasu/RTKLIB/blob/v2.4.3-b34/app/consapp/rnx2rtkp/gcc/makefile#L5 + # https://github.com/tomojitakasu/RTKLIB/blob/v2.4.3-b34/app/consapp/convbin/gcc/makefile#L10 + defs = {} + defs["ENAGLO"] = self.options.enable_glonass + defs["ENAQZS"] = self.options.enable_qzss + defs["ENAGAL"] = self.options.enable_galileo + defs["ENACMP"] = self.options.enable_beidou + defs["ENAIRN"] = self.options.enable_irnss + defs["NFREQ"] = str(self.options.num_frequencies) + defs["NEXOBS"] = str(self.options.num_ext_obs_codes) + defs["WIN32"] = self.settings.os == "Windows" + defs["WIN_DLL"] = self.settings.os == "Windows" and self.options.shared + return defs + + def generate(self): + tc = CMakeToolchain(self) + defs = self._public_defines + defs["TRACE"] = self.options.trace + # TODO: add as options and set libraries correctly + defs["LAPACK"] = False + defs["MKL"] = False + # Set default values + defs["SVR_REUSEADDR"] = True # reuse tcp server address + defs["NOCALLOC"] = False # use calloc for zero matrix + defs["CPUTIME_IN_GPST"] = False # cputime operated in gpst + defs["RRCENA"] = False # enable rrc correction + defs["OUTSTAT_AMB"] = False # output ambiguity parameters to solution status + defs["IERS_MODEL"] = False # use IERS tide model + if is_apple_os(self): + # Add baud rates missing from termios.h for stream.c + defs["B460800"] = 460800 + defs["B921600"] = 921600 + for k, v in defs.items(): + if type(v) in (str, int): + tc.preprocessor_definitions[k] = v + elif v: + tc.preprocessor_definitions[k] = "" + tc.generate() + tc = CMakeDeps(self) + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.txt", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["rtklib"] + + for k, v in self._public_defines.items(): + if type(v) in (str, int): + self.cpp_info.defines.append(f"{k}={v}") + elif v: + self.cpp_info.defines.append(k) + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m", "pthread", "rt"] + elif self.settings.os == "Windows": + self.cpp_info.system_libs = ["ws2_32", "winmm"] diff --git a/recipes/rtklib/all/patches/fix-dll-export-of-global-vars.patch b/recipes/rtklib/all/patches/fix-dll-export-of-global-vars.patch new file mode 100644 index 0000000000000..f52bd22d8d75b --- /dev/null +++ b/recipes/rtklib/all/patches/fix-dll-export-of-global-vars.patch @@ -0,0 +1,23 @@ +--- src/rtklib.h ++++ src/rtklib.h +@@ -1293,13 +1293,13 @@ + typedef void fatalfunc_t(const char *); /* fatal callback function type */ + + /* global variables ----------------------------------------------------------*/ +-extern const double chisqr[]; /* chi-sqr(n) table (alpha=0.001) */ +-extern const prcopt_t prcopt_default; /* default positioning options */ +-extern const solopt_t solopt_default; /* default solution output options */ +-extern const sbsigpband_t igpband1[9][8]; /* SBAS IGP band 0-8 */ +-extern const sbsigpband_t igpband2[2][5]; /* SBAS IGP band 9-10 */ +-extern const char *formatstrs[]; /* stream format strings */ +-extern opt_t sysopts[]; /* system options table */ ++EXPORT extern const double chisqr[]; /* chi-sqr(n) table (alpha=0.001) */ ++EXPORT extern const prcopt_t prcopt_default; /* default positioning options */ ++EXPORT extern const solopt_t solopt_default; /* default solution output options */ ++EXPORT extern const sbsigpband_t igpband1[9][8]; /* SBAS IGP band 0-8 */ ++EXPORT extern const sbsigpband_t igpband2[2][5]; /* SBAS IGP band 9-10 */ ++EXPORT extern const char *formatstrs[]; /* stream format strings */ ++EXPORT extern opt_t sysopts[]; /* system options table */ + + /* satellites, systems, codes functions --------------------------------------*/ + EXPORT int satno (int sys, int prn); diff --git a/recipes/rtklib/all/test_package/CMakeLists.txt b/recipes/rtklib/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..326ac56093a5e --- /dev/null +++ b/recipes/rtklib/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(rtklib REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE rtklib::rtklib) diff --git a/recipes/rtklib/all/test_package/conanfile.py b/recipes/rtklib/all/test_package/conanfile.py new file mode 100644 index 0000000000000..02eb5ce439fb4 --- /dev/null +++ b/recipes/rtklib/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +# It will become the standard on Conan 2.x +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/rtklib/all/test_package/test_package.cpp b/recipes/rtklib/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..51c8582d96563 --- /dev/null +++ b/recipes/rtklib/all/test_package/test_package.cpp @@ -0,0 +1,18 @@ +#include +#undef lock + +#include +#include + +// Extern functions meant to be defined by the user +extern int showmsg(const char *format, ...) { return 0; } +extern void settspan(gtime_t ts, gtime_t te) {} +extern void settime(gtime_t time) {} + +int main() { + int week = 0; + double sec = time2gpst(timeget(), &week); + std::cout << "Current GPS time: week " << week << ", " << sec << " seconds of week" + << std::endl; + return EXIT_SUCCESS; +} diff --git a/recipes/rtklib/config.yml b/recipes/rtklib/config.yml new file mode 100644 index 0000000000000..8faa0eba5645f --- /dev/null +++ b/recipes/rtklib/config.yml @@ -0,0 +1,3 @@ +versions: + "2.4.3-b34": + folder: all From 4cd361e70988b1e3b154f88dacef96f6f912b074 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 19 Aug 2023 12:47:34 +0300 Subject: [PATCH 297/637] (#18133) easyloggingpp: migrate to Conan v2 --- recipes/easyloggingpp/all/CMakeLists.txt | 67 --------- recipes/easyloggingpp/all/conanfile.py | 130 ++++++++---------- .../all/test_package/CMakeLists.txt | 5 +- .../all/test_package/conanfile.py | 21 ++- .../all/test_package/test_package.cpp | 7 +- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../all/test_v1_package/conanfile.py | 17 +++ 7 files changed, 106 insertions(+), 149 deletions(-) delete mode 100644 recipes/easyloggingpp/all/CMakeLists.txt create mode 100644 recipes/easyloggingpp/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/easyloggingpp/all/test_v1_package/conanfile.py diff --git a/recipes/easyloggingpp/all/CMakeLists.txt b/recipes/easyloggingpp/all/CMakeLists.txt deleted file mode 100644 index f6fc5c33e69b0..0000000000000 --- a/recipes/easyloggingpp/all/CMakeLists.txt +++ /dev/null @@ -1,67 +0,0 @@ -cmake_minimum_required(VERSION 3.2) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() -option(enable_crash_log "Enable crash log handler" OFF) -option(enable_thread_safe "Enable thread safety for use in multithreaded env" OFF) -option(enable_debug_errors "Enable debug errors in case of configuration issues" OFF) -option(enable_default_logfile "Enable creation of default logfile" ON) -option(disable_logs "Disables all logs" OFF) -option(disable_debug_logs "Disables debug logs" OFF) -option(disable_info_logs "Disables info logs" OFF) -option(disable_warning_logs "Disables warning logs" OFF) -option(disable_error_logs "Disables error logs" OFF) -option(disable_fatal_logs "Disables fatal logs" OFF) -option(disable_verbose_logs "Disables verbose logs" OFF) -option(disable_trace_logs "Disables trace logs" OFF) - -if (enable_crash_log) - add_definitions(-DELPP_FEATURE_CRASH_LOG) -endif() - -if (enable_thread_safe) - add_definitions(-DELPP_THREAD_SAFE) -endif() - -if (enable_debug_errors) - add_definitions(-DELPP_DEBUG_ERRORS) -endif() - -if (NOT enable_default_logfile) - add_definitions(-DELPP_NO_DEFAULT_LOG_FILE) -endif() - -if (disable_logs) - add_definitions(-DELPP_DISABLE_LOGS) -endif() - -if (disable_debug_logs) - add_definitions(-DELPP_DISABLE_DEBUG_LOGS) -endif() - -if (disable_info_logs) - add_definitions(-DELPP_DISABLE_INFO_LOGS) -endif() - -if (disable_warning_logs) - add_definitions(-DELPP_DISABLE_WARNING_LOGS) -endif() - -if (disable_error_logs) - add_definitions(-DELPP_DISABLE_ERROR_LOGS) -endif() - -if (disable_fatal_logs) - add_definitions(-DELPP_DISABLE_FATAL_LOGS) -endif() - -if (disable_verbose_logs) - add_definitions(-DELPP_DISABLE_VERBOSE_LOGS) -endif() - -if (disable_trace_logs) - add_definitions(-DELPP_DISABLE_TRACE_LOGS) -endif() - -add_subdirectory("source_subfolder") diff --git a/recipes/easyloggingpp/all/conanfile.py b/recipes/easyloggingpp/all/conanfile.py index b5d1f9b44e060..5410892575c4a 100644 --- a/recipes/easyloggingpp/all/conanfile.py +++ b/recipes/easyloggingpp/all/conanfile.py @@ -1,21 +1,22 @@ import os -from conans import CMake -from conan.tools import files + from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir, replace_in_file +required_conan_version = ">=1.53.0" -required_conan_version = ">=1.33.0" class EasyloggingppConan(ConanFile): name = "easyloggingpp" - license = "The MIT License (MIT)" - homepage = "https://github.com/amrayn/easyloggingpp" + description = "Single-header C++ logging library." + license = "MIT" url = "https://github.com/conan-io/conan-center-index" - description = "Single header C++ logging library." + homepage = "https://github.com/amrayn/easyloggingpp" topics = ("logging", "stacktrace", "efficient-logging") - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" - exports_sources = "CMakeLists.txt", + + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" options = { "enable_crash_log": [True, False], "enable_thread_safe": [True, False], @@ -28,7 +29,8 @@ class EasyloggingppConan(ConanFile): "disable_error_logs": [True, False], "disable_fatal_logs": [True, False], "disable_verbose_logs": [True, False], - "disable_trace_logs": [True, False] + "disable_trace_logs": [True, False], + "lib_utc_datetime": [True, False], } default_options = { "enable_crash_log": False, @@ -42,80 +44,70 @@ class EasyloggingppConan(ConanFile): "disable_error_logs": False, "disable_fatal_logs": False, "disable_verbose_logs": False, - "disable_trace_logs": False + "disable_trace_logs": False, + "lib_utc_datetime": False, } - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - def _configure_cmake(self): - if self._cmake is not None: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["build_static_lib"] = True - self._cmake.definitions["enable_crash_log"] = self.options.enable_crash_log - self._cmake.definitions["enable_thread_safe"] = self.options.enable_thread_safe - self._cmake.definitions["enable_debug_errors"] = self.options.enable_debug_errors - self._cmake.definitions["enable_default_logfile"] = self.options.enable_default_logfile - self._cmake.definitions["disable_logs"] = self.options.disable_logs - self._cmake.definitions["disable_debug_logs"] = self.options.disable_debug_logs - self._cmake.definitions["disable_info_logs"] = self.options.disable_info_logs - self._cmake.definitions["disable_warning_logs"] = self.options.disable_warning_logs - self._cmake.definitions["disable_error_logs"] = self.options.disable_error_logs - self._cmake.definitions["disable_fatal_logs"] = self.options.disable_fatal_logs - self._cmake.definitions["disable_verbose_logs"] = self.options.disable_verbose_logs - self._cmake.definitions["disable_trace_logs"] = self.options.disable_trace_logs - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + def layout(self): + cmake_layout(self, src_folder="src") def source(self): - files.get(self, **self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def build(self): - cmake = self._configure_cmake() - cmake.build() - - def package(self): - cmake = self._configure_cmake() - cmake.install() - files.rmdir(self, os.path.join(self.package_folder, "share")) - self.copy(pattern="LICENSE", - dst="licenses", - src=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def package_info(self): - self.cpp_info.names["cmake_find_package"] = "easyloggingpp" - self.cpp_info.names["cmake_find_package_multi"] = "easyloggingpp" - self.cpp_info.libs = ["easyloggingpp"] + @property + def _public_defines(self): + defines = [] if self.options.enable_crash_log: - self.cpp_info.defines.append("ELPP_FEATURE_CRASH_LOG") + defines.append("ELPP_FEATURE_CRASH_LOG") if self.options.enable_thread_safe: - self.cpp_info.defines.append("ELPP_THREAD_SAFE") + defines.append("ELPP_THREAD_SAFE") if self.options.enable_debug_errors: - self.cpp_info.defines.append("ELPP_DEBUG_ERRORS") + defines.append("ELPP_DEBUG_ERRORS") if self.options.enable_default_logfile: - self.cpp_info.defines.append("ELPP_NO_DEFAULT_LOG_FILE") + defines.append("ELPP_NO_DEFAULT_LOG_FILE") if self.options.disable_logs: - self.cpp_info.defines.append("ELPP_DISABLE_LOGS") + defines.append("ELPP_DISABLE_LOGS") if self.options.disable_debug_logs: - self.cpp_info.defines.append("ELPP_DISABLE_DEBUG_LOGS") + defines.append("ELPP_DISABLE_DEBUG_LOGS") if self.options.disable_info_logs: - self.cpp_info.defines.append("ELPP_DISABLE_INFO_LOGS") + defines.append("ELPP_DISABLE_INFO_LOGS") if self.options.disable_warning_logs: - self.cpp_info.defines.append("ELPP_DISABLE_WARNING_LOGS") + defines.append("ELPP_DISABLE_WARNING_LOGS") if self.options.disable_error_logs: - self.cpp_info.defines.append("ELPP_DISABLE_ERROR_LOGS") + defines.append("ELPP_DISABLE_ERROR_LOGS") if self.options.disable_fatal_logs: - self.cpp_info.defines.append("ELPP_DISABLE_FATAL_LOGS") + defines.append("ELPP_DISABLE_FATAL_LOGS") if self.options.disable_verbose_logs: - self.cpp_info.defines.append("ELPP_DISABLE_VERBOSE_LOGS") + defines.append("ELPP_DISABLE_VERBOSE_LOGS") if self.options.disable_trace_logs: - self.cpp_info.defines.append("ELPP_DISABLE_TRACE_LOGS") + defines.append("lib_utc_datetime") + if self.options.lib_utc_datetime: + defines.append("ELPP_UTC_DATETIME") + return defines + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["build_static_lib"] = True + for d in self._public_defines: + tc.preprocessor_definitions[d] = "1" + tc.generate() + def _patch_sources(self): + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set_property(TARGET easyloggingpp PROPERTY POSITION_INDEPENDENT_CODE ON)", "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "share")) + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + + def package_info(self): + self.cpp_info.libs = ["easyloggingpp"] + self.cpp_info.defines = self._public_defines diff --git a/recipes/easyloggingpp/all/test_package/CMakeLists.txt b/recipes/easyloggingpp/all/test_package/CMakeLists.txt index e515e14d7e6ad..a353807cafd1f 100644 --- a/recipes/easyloggingpp/all/test_package/CMakeLists.txt +++ b/recipes/easyloggingpp/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(easyloggingpp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/easyloggingpp/all/test_package/conanfile.py b/recipes/easyloggingpp/all/test_package/conanfile.py index 49a3a66ea5bad..ef5d7042163ec 100644 --- a/recipes/easyloggingpp/all/test_package/conanfile.py +++ b/recipes/easyloggingpp/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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -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/easyloggingpp/all/test_package/test_package.cpp b/recipes/easyloggingpp/all/test_package/test_package.cpp index 9f1fc4b8dad34..da48715e9c0a2 100644 --- a/recipes/easyloggingpp/all/test_package/test_package.cpp +++ b/recipes/easyloggingpp/all/test_package/test_package.cpp @@ -10,11 +10,12 @@ void myCrashHandler(int sig) { } #endif -int main() { +int main(int argc, char* argv[]) { + START_EASYLOGGINGPP(argc, argv); LOG(INFO) << "My first info log using default logger"; - #ifdef ELPP_FEATURE_CRASH_LOG +#ifdef ELPP_FEATURE_CRASH_LOG LOG(INFO) << "Installed crash handler"; el::Helpers::setCrashHandler(myCrashHandler); - #endif +#endif return 0; } diff --git a/recipes/easyloggingpp/all/test_v1_package/CMakeLists.txt b/recipes/easyloggingpp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/easyloggingpp/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/easyloggingpp/all/test_v1_package/conanfile.py b/recipes/easyloggingpp/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/easyloggingpp/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + 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) From b4da1b55601395520df343e62a6bcc82379e0c61 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 19 Aug 2023 13:08:08 +0300 Subject: [PATCH 298/637] (#18227) deco: migrate to Conan v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * deco: migrate to Conan v2 * deco: restore test_v1_package * Update recipes/deco/all/conanfile.py * Update recipes/deco/all/conanfile.py * deco: fix v1 test executable * deco: restore VirtualRunEnv in test_package --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: Uilian Ries --- recipes/deco/all/conanfile.py | 90 ++++++++++++------- recipes/deco/all/test_package/CMakeLists.txt | 13 ++- recipes/deco/all/test_package/conanfile.py | 22 +++-- .../{example.cpp => test_package.cpp} | 0 .../deco/all/test_v1_package/CMakeLists.txt | 8 ++ recipes/deco/all/test_v1_package/conanfile.py | 18 ++++ 6 files changed, 104 insertions(+), 47 deletions(-) rename recipes/deco/all/test_package/{example.cpp => test_package.cpp} (100%) create mode 100644 recipes/deco/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/deco/all/test_v1_package/conanfile.py diff --git a/recipes/deco/all/conanfile.py b/recipes/deco/all/conanfile.py index 3760e5bb68e07..29a4d2480e3aa 100644 --- a/recipes/deco/all/conanfile.py +++ b/recipes/deco/all/conanfile.py @@ -1,56 +1,82 @@ -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration import os +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + + class DecoConan(ConanFile): name = "deco" - license = "Apache-2.0-WITH-LLVM-exception" description = "Delimiter Collision Free Format" - topics = ("serialization") - homepage = "https://github.com/Enhex/Deco" + license = "Apache-2.0-WITH-LLVM-exception" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/Enhex/Deco" + topics = ("serialization", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True - settings = ("compiler", "build_type", "os", "arch") - requires = ( - "enhex-generic_serialization/1.0.0", - "enhex-strong_type/1.0.0", - "boost/1.79.0", - "rang/3.2", - ) @property - def _source_subfolder(self): - return "source_subfolder" - - def validate(self): - if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 17) + def _min_cppstd(self): + return 17 - minimal_version = { + @property + def _compilers_minimum_version(self): + return { "Visual Studio": "15", + "msvc": "191", "gcc": "7", "clang": "5.0", - "apple-clang": "9.1" + "apple-clang": "9.1", } + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("enhex-generic_serialization/1.0.0") + self.requires("enhex-strong_type/1.0.0") + self.requires("boost/1.82.0") + self.requires("rang/3.2") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + compiler = str(self.settings.compiler) - compiler_version = tools.Version(self.settings.compiler.version) + compiler_version = Version(self.settings.compiler.version) - if compiler not in minimal_version: - self.output.info("{} requires a compiler that supports at least C++17".format(self.name)) + if compiler not in self._compilers_minimum_version: + self.output.info(f"{self.name} requires a compiler that supports at least C++17") return # Exclude compilers not supported - if compiler_version < minimal_version[compiler]: - raise ConanInvalidConfiguration("{} requires a compiler that supports at least C++17. {} {} is not".format( - self.name, compiler, tools.Version(self.settings.compiler.version.value))) + if compiler_version < self._compilers_minimum_version[compiler]: + raise ConanInvalidConfiguration( + f"{self.name} requires a compiler that supports at least C++17. " + f"{compiler} {Version(self.settings.compiler.version.value)} is not" + ) def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy(pattern="LICENSE.txt", dst="licenses", src=self._source_subfolder) - self.copy(pattern="*", dst="include", src=os.path.join(self._source_subfolder, "include")) + copy(self, "LICENSE.txt", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + copy(self, "*", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include")) - def package_id(self): - self.info.header_only() + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/deco/all/test_package/CMakeLists.txt b/recipes/deco/all/test_package/CMakeLists.txt index 00c3587be1a63..c3b92714405e8 100644 --- a/recipes/deco/all/test_package/CMakeLists.txt +++ b/recipes/deco/all/test_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(PackageTest CXX) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) find_package(deco CONFIG REQUIRED) -add_executable(example example.cpp) -target_link_libraries(example deco::deco) -set_target_properties(example PROPERTIES CXX_STANDARD 17) +add_executable(test_package test_package.cpp) +target_link_libraries(test_package deco::deco) +set_target_properties(test_package PROPERTIES CXX_STANDARD 17) diff --git a/recipes/deco/all/test_package/conanfile.py b/recipes/deco/all/test_package/conanfile.py index f735734fbcfa9..ef5d7042163ec 100644 --- a/recipes/deco/all/test_package/conanfile.py +++ b/recipes/deco/all/test_package/conanfile.py @@ -1,11 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" -class DecoTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "example") - 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/deco/all/test_package/example.cpp b/recipes/deco/all/test_package/test_package.cpp similarity index 100% rename from recipes/deco/all/test_package/example.cpp rename to recipes/deco/all/test_package/test_package.cpp diff --git a/recipes/deco/all/test_v1_package/CMakeLists.txt b/recipes/deco/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/deco/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/deco/all/test_v1_package/conanfile.py b/recipes/deco/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..f64055b093b4d --- /dev/null +++ b/recipes/deco/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class DecoTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From b4e9798893e8f6b217cf3e962e94d4f082da0db7 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 19 Aug 2023 13:28:13 +0300 Subject: [PATCH 299/637] (#18232) nfrechette-acl: migrate to Conan v2 * nfrechette-acl: migrate to Conan v2 * nfrechette-acl: restore test_v1_package * nfrechette-acl: add cmake_find_package_multi generator to test_v1_package * nfrechette-acl: drop older versions * nfrechette-acl: restore VirtualRunEnv in test_package --- recipes/nfrechette-acl/all/conandata.yml | 12 ---- recipes/nfrechette-acl/all/conanfile.py | 65 ++++++++++++------- .../all/test_package/CMakeLists.txt | 9 ++- .../all/test_package/conanfile.py | 22 +++++-- .../all/test_v1_package/CMakeLists.txt | 8 +++ .../all/test_v1_package/conanfile.py | 18 +++++ recipes/nfrechette-acl/config.yml | 8 --- 7 files changed, 85 insertions(+), 57 deletions(-) create mode 100644 recipes/nfrechette-acl/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/nfrechette-acl/all/test_v1_package/conanfile.py diff --git a/recipes/nfrechette-acl/all/conandata.yml b/recipes/nfrechette-acl/all/conandata.yml index 0c2e8a5978fd0..dca5b638ad1dc 100644 --- a/recipes/nfrechette-acl/all/conandata.yml +++ b/recipes/nfrechette-acl/all/conandata.yml @@ -2,18 +2,6 @@ sources: "1.3.5": url: "https://github.com/nfrechette/acl/archive/v1.3.5.tar.gz" sha256: "06112ad5dc6b586124cc7b22ff6979ea1de9b69abefcd94d43556e20617355a1" - "2.0.0": - url: "https://github.com/nfrechette/acl/archive/v2.0.0.tar.gz" - sha256: "c5b44c063efbee6fb5753d0070e37215162d5d47f047fa033024750d9dbb6cdc" - "2.0.1": - url: "https://github.com/nfrechette/acl/archive/v2.0.1.tar.gz" - sha256: "aeab843b03ba15edd886472d96cdbe06e7c7142a0d54f0bf08a4f30693b9dad7" - "2.0.2": - url: "https://github.com/nfrechette/acl/archive/v2.0.2.tar.gz" - sha256: "d91c7942b4cbc6e8123a9964c1a68eec2778c75dc741c10ea9fede382d831649" - "2.0.3": - url: "https://github.com/nfrechette/acl/archive/v2.0.3.tar.gz" - sha256: "2cc0a6fd8f74ba7fee9177f6b7794bfdc22a27f5b00aa684ba52d60f0f8b3460" "2.0.5": url: "https://github.com/nfrechette/acl/archive/v2.0.5.tar.gz" sha256: "edd255a3ffcdb102b960922069d1ec9ae5fed561bca3bb6ee73224562f76fa36" diff --git a/recipes/nfrechette-acl/all/conanfile.py b/recipes/nfrechette-acl/all/conanfile.py index 23d68bbd569f4..4a590b12eb34e 100644 --- a/recipes/nfrechette-acl/all/conanfile.py +++ b/recipes/nfrechette-acl/all/conanfile.py @@ -1,44 +1,59 @@ import os + from conan import ConanFile -from conan.tools.files import rename, get -from conans import tools -from conans.errors import ConanInvalidConfiguration +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" class AclConan(ConanFile): name = "nfrechette-acl" description = "Animation Compression Library" - topics = ("animation", "compression") license = "MIT" - homepage = "https://github.com/nfrechette/acl" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/nfrechette/acl" + topics = ("animation", "compression", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True - settings = "compiler" @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 11 - def requirements(self): - self.requires("rtm/2.1.4") + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) - def configure(self): - minimal_cpp_standard = "11" - if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, minimal_cpp_standard) + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5": + raise ConanInvalidConfiguration( + f"acl can't be compiled by {self.settings.compiler} {self.settings.compiler.version}") - if self.settings.compiler == "gcc" and tools.Version(self.settings.compiler.version) < "5": - raise ConanInvalidConfiguration("acl can't be compiled by {0} {1}".format(self.settings.compiler, - self.settings.compiler.version)) + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("rtm/2.1.5") + + def package_id(self): + self.info.clear() def source(self): - get(self, **self.conan_data["sources"][self.version]) - extracted_dir = "acl-" + self.version - rename(self, extracted_dir, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - self.copy("*.h", dst="include", src=os.path.join(self._source_subfolder, "includes")) - - def package_id(self): - self.info.header_only() + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + copy(self, "*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "includes")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/nfrechette-acl/all/test_package/CMakeLists.txt b/recipes/nfrechette-acl/all/test_package/CMakeLists.txt index 33ae887aa6aea..da2314ef0ec2b 100644 --- a/recipes/nfrechette-acl/all/test_package/CMakeLists.txt +++ b/recipes/nfrechette-acl/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(nfrechette-acl REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE nfrechette-acl::nfrechette-acl) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/nfrechette-acl/all/test_package/conanfile.py b/recipes/nfrechette-acl/all/test_package/conanfile.py index efea435279716..ef5d7042163ec 100644 --- a/recipes/nfrechette-acl/all/test_package/conanfile.py +++ b/recipes/nfrechette-acl/all/test_package/conanfile.py @@ -1,11 +1,19 @@ -import os from conan import ConanFile -from conans import CMake, tools +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -13,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/nfrechette-acl/all/test_v1_package/CMakeLists.txt b/recipes/nfrechette-acl/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/nfrechette-acl/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/nfrechette-acl/all/test_v1_package/conanfile.py b/recipes/nfrechette-acl/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49ba777923b40 --- /dev/null +++ b/recipes/nfrechette-acl/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os +from conan import ConanFile +from conans import CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/nfrechette-acl/config.yml b/recipes/nfrechette-acl/config.yml index cf68d13e1c698..00fcf38029071 100644 --- a/recipes/nfrechette-acl/config.yml +++ b/recipes/nfrechette-acl/config.yml @@ -1,14 +1,6 @@ versions: "1.3.5": folder: "all" - "2.0.0": - folder: "all" - "2.0.1": - folder: "all" - "2.0.2": - folder: "all" - "2.0.3": - folder: "all" "2.0.5": folder: "all" "2.0.6": From 963bb7fe1914792d7e4796c68b5d82666b9355b1 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 19 Aug 2023 14:27:51 +0300 Subject: [PATCH 300/637] (#18257) cpp_project_framework: migrate to Conan v2 * cpp_project_framework: migrate to Conan v2 * cpp_project_framework: restore test_v1_package * cpp_project_framework: add cmake_find_package_multi generator to test_v1_package * cpp_project_framework: fix gtest dependency in test_package * cpp_project_framework: restore VirtualRunEnv in test_package --- .../cpp_project_framework/all/conanfile.py | 66 ++++++++++++------- .../all/test_package/CMakeLists.txt | 14 ++-- .../all/test_package/conanfile.py | 25 ++++--- .../all/test_v1_package/CMakeLists.txt | 8 +++ .../all/test_v1_package/conanfile.py | 20 ++++++ 5 files changed, 90 insertions(+), 43 deletions(-) create mode 100644 recipes/cpp_project_framework/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/cpp_project_framework/all/test_v1_package/conanfile.py diff --git a/recipes/cpp_project_framework/all/conanfile.py b/recipes/cpp_project_framework/all/conanfile.py index 5a2a5fe5679e4..00ce6a88bd921 100644 --- a/recipes/cpp_project_framework/all/conanfile.py +++ b/recipes/cpp_project_framework/all/conanfile.py @@ -1,24 +1,26 @@ +import os + from conan import ConanFile -from conan.tools.files import get +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout from conan.tools.scm import Version -from conans.errors import ConanInvalidConfiguration -from conans.tools import check_min_cppstd -import os -required_conan_version = ">=1.33.0" +required_conan_version = ">=1.52.0" class CppProjectFrameworkConan(ConanFile): name = "cpp_project_framework" + description = "C++ Project Framework is a framework for creating C++ projects." license = "AGPL-3.0" + url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/sheepgrass/cpp_project_framework" - url = "https://github.com/conan-io/conan-center-index" # Package recipe repository url here, for issues about the package - description = "C++ Project Framework is a framework for creating C++ project." - topics = ("cpp", "project", "framework") - settings = "os", "compiler", "build_type", "arch" + topics = ("cpp", "project", "framework", "header-only") - def package_id(self): - self.info.header_only() + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True @property def _minimum_cpp_standard(self): @@ -28,38 +30,52 @@ def _minimum_cpp_standard(self): def _minimum_compilers_version(self): return { "Visual Studio": "16", + "msvc": "192", "gcc": "7", "clang": "6", "apple-clang": "10", } + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + def validate(self): - if self.settings.os not in ('Linux', 'Windows'): - raise ConanInvalidConfiguration(f"{self.name} is just supported for Linux and Windows") + if self.settings.os not in ("Linux", "FreeBSD", "Windows"): + raise ConanInvalidConfiguration(f"{self.name} is only supported on Linux and Windows") compiler = self.settings.compiler if compiler.get_safe("cppstd"): check_min_cppstd(self, self._minimum_cpp_standard) - if compiler in ('gcc', 'clang'): - if compiler.get_safe("libcxx") != "libstdc++": - raise ConanInvalidConfiguration(f"only supported {compiler} with libstdc++") + if compiler in ("gcc", "clang"): + if not compiler.get_safe("libcxx", "").startswith("libstdc++"): + raise ConanInvalidConfiguration(f"{self.name} is only supported {compiler} with libstdc++") min_version = self._minimum_compilers_version.get(str(compiler)) if not min_version: - self.output.warn(f"{self.name} recipe lacks information about the {compiler} compiler support.") + self.output.warning(f"{self.name} recipe lacks information about the {compiler} compiler support.") else: if Version(compiler.version) < min_version: - raise ConanInvalidConfiguration(f"{self.name} requires C++{self._minimum_cpp_standard} support. The current compiler {compiler} {compiler.version} does not support it.") - - @property - def _source_subfolder(self): - return "source_subfolder" + raise ConanInvalidConfiguration( + f"{self.name} requires C++{self._minimum_cpp_standard} support. " + f"The current compiler {compiler} {compiler.version} does not support it." + ) def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - self.copy("*.h", dst=os.path.join("include", self.name), src=os.path.join(self._source_subfolder, self.name)) + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + copy(self, "*.h", + dst=os.path.join(self.package_folder, "include", self.name), + src=os.path.join(self.source_folder, self.name)) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/cpp_project_framework/all/test_package/CMakeLists.txt b/recipes/cpp_project_framework/all/test_package/CMakeLists.txt index d3c22a987a39d..9edc8bb602af7 100644 --- a/recipes/cpp_project_framework/all/test_package/CMakeLists.txt +++ b/recipes/cpp_project_framework/all/test_package/CMakeLists.txt @@ -1,18 +1,14 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(PackageTest CXX) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED True) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(cpp_project_framework REQUIRED) -find_package(GTest REQUIRED) +find_package(cpp_project_framework REQUIRED CONFIG) +find_package(GTest REQUIRED CONFIG) add_executable(test_package test_package.cpp) +target_link_libraries(test_package PRIVATE cpp_project_framework::cpp_project_framework GTest::gtest GTest::gtest_main) if(UNIX) - target_link_libraries(test_package cpp_project_framework::cpp_project_framework GTest::gtest GTest::gtest_main stdc++fs) -else() - target_link_libraries(test_package cpp_project_framework::cpp_project_framework GTest::gtest GTest::gtest_main) + target_link_libraries(test_package PRIVATE stdc++fs) endif() diff --git a/recipes/cpp_project_framework/all/test_package/conanfile.py b/recipes/cpp_project_framework/all/test_package/conanfile.py index ed8a4e73713c6..c31dc0dd89d14 100644 --- a/recipes/cpp_project_framework/all/test_package/conanfile.py +++ b/recipes/cpp_project_framework/all/test_package/conanfile.py @@ -1,13 +1,20 @@ from conan import ConanFile -from conan.tools.build import cross_building -from conans import CMake +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -class CppProjectFrameworkTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" - requires = "gtest/1.10.0" +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) + self.requires("gtest/1.13.0") + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -15,6 +22,6 @@ def build(self): cmake.build() def test(self): - if not 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/cpp_project_framework/all/test_v1_package/CMakeLists.txt b/recipes/cpp_project_framework/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/cpp_project_framework/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/cpp_project_framework/all/test_v1_package/conanfile.py b/recipes/cpp_project_framework/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..0761aa549fc91 --- /dev/null +++ b/recipes/cpp_project_framework/all/test_v1_package/conanfile.py @@ -0,0 +1,20 @@ +from conan import ConanFile +from conan.tools.build import cross_building +from conans import CMake +import os + + +class CppProjectFrameworkTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + requires = "gtest/1.13.0" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 853fe51f2ae2139cafa24aec91696eb20540a41b Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 19 Aug 2023 20:50:54 +0900 Subject: [PATCH 301/637] (#18277) pbtools: add version 0.47.0, support conan v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * pbtools: add version 0.47.0, support conan v2 * disable C++ feature --------- Co-authored-by: Rubén Rincón Blanco --- recipes/pbtools/all/conandata.yml | 5 ++++- recipes/pbtools/all/conanfile.py | 10 +++++++--- recipes/pbtools/all/test_package/CMakeLists.txt | 7 ++++--- recipes/pbtools/config.yml | 2 ++ 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/recipes/pbtools/all/conandata.yml b/recipes/pbtools/all/conandata.yml index 529d052902f81..236ef4b15fa0a 100644 --- a/recipes/pbtools/all/conandata.yml +++ b/recipes/pbtools/all/conandata.yml @@ -1,7 +1,10 @@ sources: + "0.47.0": + url: "https://github.com/eerimoq/pbtools/archive/0.47.0.tar.gz" + sha256: "f53189ad061e4063d7cb5a3863f778221868b820a1dde4e65b217537c3fa0c9e" "0.45.2": url: "https://github.com/eerimoq/pbtools/archive/0.45.2.tar.gz" sha256: "723967fff6e1d51a078ce7328f937cafe0c32b4e9ab19735cf591d15afc281d3" "0.45.0": url: "https://github.com/eerimoq/pbtools/archive/refs/tags/0.45.0.zip" - sha256: 84b17003f1c7b6c62061e93e11abe8729480338f5f106948ebfefa303c163b75 + sha256: "84b17003f1c7b6c62061e93e11abe8729480338f5f106948ebfefa303c163b75" diff --git a/recipes/pbtools/all/conanfile.py b/recipes/pbtools/all/conanfile.py index 98670e16a72dc..8ae53d392140a 100644 --- a/recipes/pbtools/all/conanfile.py +++ b/recipes/pbtools/all/conanfile.py @@ -5,6 +5,7 @@ from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import copy, get + required_conan_version = ">=1.53.0" @@ -15,7 +16,6 @@ class PbtoolsConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/eerimoq/pbtools" topics = ("protobuf", "serialization", "rpc", "protocol-buffers") - package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -27,6 +27,10 @@ class PbtoolsConan(ConanFile): "fPIC": True, } + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + def configure(self): if self.options.shared: self.options.rm_safe("fPIC") @@ -36,7 +40,7 @@ def layout(self): def validate(self): if self.settings.os == "Windows": - raise ConanInvalidConfiguration("This library is not compatible with Windows") + raise ConanInvalidConfiguration(f"{self.ref} is not compatible with Windows") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -47,7 +51,7 @@ def generate(self): def build(self): cmake = CMake(self) - cmake.configure(build_script_folder="lib") + cmake.configure(build_script_folder=os.path.join(self.source_folder, "lib")) cmake.build() def package(self): diff --git a/recipes/pbtools/all/test_package/CMakeLists.txt b/recipes/pbtools/all/test_package/CMakeLists.txt index cd447f6cc0d27..e01a140f079aa 100644 --- a/recipes/pbtools/all/test_package/CMakeLists.txt +++ b/recipes/pbtools/all/test_package/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.15) -project(PackageTest C) +project(test_package LANGUAGES C) + find_package(pbtools REQUIRED CONFIG) -add_executable(test_package test_package.c hello_world.c) -target_link_libraries(test_package pbtools::pbtools) +add_executable(${PROJECT_NAME} test_package.c hello_world.c) +target_link_libraries(${PROJECT_NAME} PRIVATE pbtools::pbtools) diff --git a/recipes/pbtools/config.yml b/recipes/pbtools/config.yml index 81c0b9ecee392..06df1f3ce6232 100644 --- a/recipes/pbtools/config.yml +++ b/recipes/pbtools/config.yml @@ -1,4 +1,6 @@ versions: + "0.47.0": + folder: "all" "0.45.2": folder: "all" "0.45.0": From a07b155328bf92ff6e1c0cb72eacb120152a6022 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 19 Aug 2023 21:25:42 +0900 Subject: [PATCH 302/637] (#18408) clipper2: add recipe * clipper2: add recipe * support conan v1 * fix install * enable CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS * link math lib --------- Co-authored-by: Carlos Zoido --- recipes/clipper2/all/conandata.yml | 9 ++ recipes/clipper2/all/conanfile.py | 107 ++++++++++++++++++ .../all/patches/1.2.2-0001-fix-install.patch | 14 +++ .../clipper2/all/test_package/CMakeLists.txt | 17 +++ .../clipper2/all/test_package/conanfile.py | 35 ++++++ .../all/test_package/test_package.cpp | 45 ++++++++ .../all/test_package/test_package_z.cpp | 46 ++++++++ recipes/clipper2/config.yml | 3 + 8 files changed, 276 insertions(+) create mode 100644 recipes/clipper2/all/conandata.yml create mode 100644 recipes/clipper2/all/conanfile.py create mode 100644 recipes/clipper2/all/patches/1.2.2-0001-fix-install.patch create mode 100644 recipes/clipper2/all/test_package/CMakeLists.txt create mode 100644 recipes/clipper2/all/test_package/conanfile.py create mode 100644 recipes/clipper2/all/test_package/test_package.cpp create mode 100644 recipes/clipper2/all/test_package/test_package_z.cpp create mode 100644 recipes/clipper2/config.yml diff --git a/recipes/clipper2/all/conandata.yml b/recipes/clipper2/all/conandata.yml new file mode 100644 index 0000000000000..a80a428924ce3 --- /dev/null +++ b/recipes/clipper2/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "1.2.2": + url: "https://github.com/AngusJohnson/Clipper2/files/11071418/Clipper2_1.2.2.zip" + sha256: "ec28bc4e05a86cb0be81a872e8d90a4d575b63882ef3ac78f06662358e410f89" +patches: + "1.2.2": + - patch_file: "patches/1.2.2-0001-fix-install.patch" + patch_description: "fix install for windows shared build" + patch_type: "portability" diff --git a/recipes/clipper2/all/conanfile.py b/recipes/clipper2/all/conanfile.py new file mode 100644 index 0000000000000..688144f7992cd --- /dev/null +++ b/recipes/clipper2/all/conanfile.py @@ -0,0 +1,107 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import get, copy, rmdir, export_conandata_patches, apply_conandata_patches +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +import os + +required_conan_version = ">=1.53.0" + +class Clipper2Conan(ConanFile): + name = "clipper2" + description = " A Polygon Clipping and Offsetting library in C++" + license = "BSL-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/AngusJohnson/Clipper2" + topics = ("geometry", "polygon", "clipping") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "usingz": ["ON", "OFF", "ONLY"], + } + default_options = { + "shared": False, + "fPIC": True, + "usingz": "ON", + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version]) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.variables["CLIPPER2_UTILS"] = False + tc.variables["CLIPPER2_EXAMPLES"] = False + tc.variables["CLIPPER2_TESTS"] = False + tc.variables["CLIPPER2_USINGZ"] = self.options.usingz + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, "CPP")) + cmake.build() + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + + def package_info(self): + if self.options.usingz != "ONLY": + self.cpp_info.components["clipper2"].set_property("cmake_target_name", "Clipper2::clipper2") + self.cpp_info.components["clipper2"].set_property("pkg_config_name", "Clipper2") + self.cpp_info.components["clipper2"].libs = ["Clipper2"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["clipper2"].system_libs.append("m") + + if self.options.usingz != "OFF": + self.cpp_info.components["clipper2z"].set_property("cmake_target_name", "Clipper2::clipper2z") + self.cpp_info.components["clipper2z"].set_property("pkg_config_name", "Clipper2Z") + self.cpp_info.components["clipper2z"].libs = ["Clipper2Z"] + self.cpp_info.components["clipper2z"].defines.append("USINGZ") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["clipper2z"].system_libs.append("m") diff --git a/recipes/clipper2/all/patches/1.2.2-0001-fix-install.patch b/recipes/clipper2/all/patches/1.2.2-0001-fix-install.patch new file mode 100644 index 0000000000000..4f4848313e076 --- /dev/null +++ b/recipes/clipper2/all/patches/1.2.2-0001-fix-install.patch @@ -0,0 +1,14 @@ +diff --git a/CPP/CMakeLists.txt b/CPP/CMakeLists.txt +index 58b41c2..cd2f96b 100644 +--- a/CPP/CMakeLists.txt ++++ b/CPP/CMakeLists.txt +@@ -245,6 +245,9 @@ endforeach() + + install(TARGETS ${CLIPPER2_LIBS} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/clipper2 ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + install(FILES ${CLIPPER2_PCFILES} DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + diff --git a/recipes/clipper2/all/test_package/CMakeLists.txt b/recipes/clipper2/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..6b34466183083 --- /dev/null +++ b/recipes/clipper2/all/test_package/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(clipper2 REQUIRED CONFIG) + +if(TARGET Clipper2::clipper2) + add_executable(${PROJECT_NAME} test_package.cpp) + target_link_libraries(${PROJECT_NAME} PRIVATE Clipper2::clipper2) + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +endif() + +if(TARGET Clipper2::clipper2z) + add_executable(${PROJECT_NAME}_z test_package_z.cpp) + target_link_libraries(${PROJECT_NAME}_z PRIVATE Clipper2::clipper2z) + target_compile_features(${PROJECT_NAME}_z PRIVATE cxx_std_17) +endif() + diff --git a/recipes/clipper2/all/test_package/conanfile.py b/recipes/clipper2/all/test_package/conanfile.py new file mode 100644 index 0000000000000..87531c64cc6a2 --- /dev/null +++ b/recipes/clipper2/all/test_package/conanfile.py @@ -0,0 +1,35 @@ +from conan import ConanFile, conan_version +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): + if conan_version.major >= 2: + usingz = self.dependencies["clipper2"].options.usingz + else: + usingz = self.options["clipper2"].usingz + + if usingz != "ONLY": + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") + if usingz != "OFF": + bin_path = os.path.join(self.cpp.build.bindir, "test_package_z") + self.run(bin_path, env="conanrun") diff --git a/recipes/clipper2/all/test_package/test_package.cpp b/recipes/clipper2/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..f8b893dade24d --- /dev/null +++ b/recipes/clipper2/all/test_package/test_package.cpp @@ -0,0 +1,45 @@ +#include +#include + +#include "clipper2/clipper.h" + +using namespace Clipper2Lib; + +void DoSimpleTest(bool show_solution_coords = false); +Path64 MakeRandomPoly(int width, int height, unsigned vertCnt); + +int main() +{ + DoSimpleTest(); +} + +inline Path64 MakeStar(const Point64& center, int radius, int points) +{ + if (!(points % 2)) --points; + if (points < 5) points = 5; + Path64 tmp = Ellipse(center, radius, radius, points); + Path64 result; + result.reserve(points); + result.push_back(tmp[0]); + for (int i = points - 1, j = i / 2; j;) + { + result.push_back(tmp[j--]); + result.push_back(tmp[i--]); + } + return result; +} + +void DoSimpleTest(bool show_solution_coords) +{ + Paths64 tmp, solution; + FillRule fr = FillRule::NonZero; + + Paths64 subject, clip; + subject.push_back(MakeStar(Point64(225, 225), 220, 9)); + clip.push_back(Ellipse(Point64(225,225), 150, 150)); + + //Intersect both shapes and then 'inflate' result -10 (ie deflate) + solution = Intersect(subject, clip, fr); + solution = InflatePaths(solution, -10, JoinType::Round, EndType::Polygon); +} + diff --git a/recipes/clipper2/all/test_package/test_package_z.cpp b/recipes/clipper2/all/test_package/test_package_z.cpp new file mode 100644 index 0000000000000..3713bf124619a --- /dev/null +++ b/recipes/clipper2/all/test_package/test_package_z.cpp @@ -0,0 +1,46 @@ +#include +#include "clipper2/clipper.h" + +using namespace std; +using namespace Clipper2Lib; + +void TestingZ_Double(); + +// use the Z callback to flag intersections by setting z = 1; + +class MyClass { +public: + + // Point64 callback - see TestingZ_Int64() + void myZCB(const Point64& e1bot, const Point64& e1top, + const Point64& e2bot, const Point64& e2top, Point64& pt) + { + pt.z = 1; + } + + // PointD callback - see TestingZ_Double() + void myZCBD(const PointD& e1bot, const PointD& e1top, + const PointD& e2bot, const PointD& e2top, PointD& pt) + { + pt.z = 1; + } +}; + +int main(int argc, char* argv[]) +{ + TestingZ_Double(); +} +void TestingZ_Double() +{ + PathsD subject, solution; + MyClass mc; + ClipperD c; + + subject.push_back(MakePathD({ 100, 50, 10, 79, 65, 2, 65, 98, 10, 21 })); + c.AddSubject(subject); + c.SetZCallback( + std::bind(&MyClass::myZCBD, mc, std::placeholders::_1, + std::placeholders::_2, std::placeholders::_3, + std::placeholders::_4, std::placeholders::_5)); + c.Execute(ClipType::Union, FillRule::NonZero, solution); +} diff --git a/recipes/clipper2/config.yml b/recipes/clipper2/config.yml new file mode 100644 index 0000000000000..af40d9653a378 --- /dev/null +++ b/recipes/clipper2/config.yml @@ -0,0 +1,3 @@ +versions: + "1.2.2": + folder: all From be941c5e0c4f66303965931ccacba8e7add702ee Mon Sep 17 00:00:00 2001 From: Marian Klymov Date: Sat, 19 Aug 2023 16:04:32 +0300 Subject: [PATCH 303/637] (#17957) gdcm: use charls from conan instead of internal one * gdcm: use charls from conan * gdcm: cosmetic change for test_package * gdcm: suppress warning about deprecated method usage * gdcm: suppress deprecation warning from OpenSSL 3.0 * charls requires at least C++14 * Update charls to 2.4.2 --- recipes/gdcm/all/conandata.yml | 15 +++++--- recipes/gdcm/all/conanfile.py | 18 ++++++--- .../all/patches/0001-3.0.20-find-charls.patch | 28 ++++++++++++++ .../all/patches/0001-3.0.9-find-charls.patch | 28 ++++++++++++++ .../all/patches/0001-charls-linking.patch | 38 ------------------- recipes/gdcm/all/test_package/CMakeLists.txt | 2 +- recipes/gdcm/all/test_package/conanfile.py | 2 +- .../gdcm/all/test_v1_package/CMakeLists.txt | 2 +- 8 files changed, 81 insertions(+), 52 deletions(-) create mode 100644 recipes/gdcm/all/patches/0001-3.0.20-find-charls.patch create mode 100644 recipes/gdcm/all/patches/0001-3.0.9-find-charls.patch delete mode 100644 recipes/gdcm/all/patches/0001-charls-linking.patch diff --git a/recipes/gdcm/all/conandata.yml b/recipes/gdcm/all/conandata.yml index 330dc8dd2483c..2a53250fc718c 100644 --- a/recipes/gdcm/all/conandata.yml +++ b/recipes/gdcm/all/conandata.yml @@ -10,9 +10,10 @@ sources: sha256: "1d518b0e4709cecfb7330c9bd9b3a73cfd01ffe70d1c178f36a4c847283c4672" patches: "3.0.21": - - patch_file: "patches/0001-charls-linking.patch" - patch_description: "fix symbol export for gdcmcharls" + - patch_file: "patches/0001-3.0.20-find-charls.patch" + patch_description: "allow using charls >= 2.2.0" patch_type: "portability" + patch_source: "https://github.com/malaterre/GDCM/pull/157" - patch_file: "patches/0002-3.0.20-openjpeg.patch" patch_description: "fix variable names for openjpeg" patch_type: "conan" @@ -32,9 +33,10 @@ patches: patch_description: "fix find_package for libuuid" patch_type: "conan" "3.0.20": - - patch_file: "patches/0001-charls-linking.patch" - patch_description: "fix symbol export for gdcmcharls" + - patch_file: "patches/0001-3.0.20-find-charls.patch" + patch_description: "allow using charls >= 2.2.0" patch_type: "portability" + patch_source: "https://github.com/malaterre/GDCM/pull/157" - patch_file: "patches/0002-3.0.20-openjpeg.patch" patch_description: "fix variable names for openjpeg" patch_type: "conan" @@ -54,9 +56,10 @@ patches: patch_description: "fix find_package for libuuid" patch_type: "conan" "3.0.9": - - patch_file: "patches/0001-charls-linking.patch" - patch_description: "fix symbol export for gdcmcharls" + - patch_file: "patches/0001-3.0.9-find-charls.patch" + patch_description: "allow using charls >= 2.2.0" patch_type: "portability" + patch_source: "https://github.com/malaterre/GDCM/pull/157" - patch_file: "patches/0002-3.0.9-openjpeg.patch" patch_description: "fix variable names for openjpeg" patch_type: "conan" diff --git a/recipes/gdcm/all/conanfile.py b/recipes/gdcm/all/conanfile.py index 8a628f7457e27..bccb6132bf567 100644 --- a/recipes/gdcm/all/conanfile.py +++ b/recipes/gdcm/all/conanfile.py @@ -39,7 +39,7 @@ class GDCMConan(ConanFile): @property def _min_cppstd(self): - return 11 + return 14 def export_sources(self): export_conandata_patches(self) @@ -56,6 +56,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): + self.requires("charls/2.4.2") self.requires("expat/2.5.0") self.requires("openjpeg/2.5.0") if self.options.with_zlibng: @@ -89,6 +90,7 @@ def generate(self): tc.variables["GDCM_BUILD_DOCBOOK_MANPAGES"] = False tc.variables["GDCM_BUILD_SHARED_LIBS"] = bool(self.options.shared) # FIXME: unvendor deps https://github.com/conan-io/conan-center-index/pull/5705#discussion_r647224146 + tc.variables["GDCM_USE_SYSTEM_CHARLS"] = True tc.variables["GDCM_USE_SYSTEM_EXPAT"] = True tc.variables["GDCM_USE_SYSTEM_JSON"] = self.options.with_json tc.variables["GDCM_USE_SYSTEM_OPENJPEG"] = True @@ -98,6 +100,13 @@ def generate(self): if not valid_min_cppstd(self, self._min_cppstd): tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd + + # https://sourceforge.net/p/gdcm/bugs/548/ + tc.preprocessor_definitions["CHARLS_NO_DEPRECATED_WARNING"] = "1" + + #gdcm currently uses functionality that is deprecated since OpenSSL 3.0 + tc.preprocessor_definitions["OPENSSL_API_COMPAT"] = "0x10101000L" + tc.generate() deps = CMakeDeps(self) deps.generate() @@ -194,8 +203,7 @@ def _gdcm_build_modules(self): @property def _gdcm_libraries(self): - gdcm_libs = ["gdcmcharls", - "gdcmCommon", + gdcm_libs = ["gdcmCommon", "gdcmDICT", "gdcmDSED", "gdcmIOD", @@ -237,7 +245,7 @@ def zlib(): self.cpp_info.components["gdcmDSED"].requires.extend(["gdcmCommon", zlib()]) self.cpp_info.components["gdcmIOD"].requires.extend(["gdcmDSED", "gdcmCommon", "expat::expat"]) - self.cpp_info.components["gdcmMSFF"].requires.extend(["gdcmIOD", "gdcmDSED", "gdcmDICT", "openjpeg::openjpeg"]) + self.cpp_info.components["gdcmMSFF"].requires.extend(["gdcmIOD", "gdcmDSED", "gdcmDICT", "charls::charls", "openjpeg::openjpeg"]) if self.options.with_json: self.cpp_info.components["gdcmMSFF"].requires.append("json-c::json-c") if self.settings.os != "Windows": @@ -247,7 +255,7 @@ def zlib(): if not self.options.shared: self.cpp_info.components["gdcmDICT"].requires.extend(["gdcmDSED", "gdcmIOD"]) self.cpp_info.components["gdcmMEXD"].requires.extend(["gdcmMSFF", "gdcmDICT", "gdcmDSED", "gdcmIOD", "socketxx"]) - self.cpp_info.components["gdcmMSFF"].requires.extend(["gdcmjpeg8", "gdcmjpeg12", "gdcmjpeg16", "gdcmcharls"]) + self.cpp_info.components["gdcmMSFF"].requires.extend(["gdcmjpeg8", "gdcmjpeg12", "gdcmjpeg16"]) if self.settings.os == "Windows": self.cpp_info.components["gdcmCommon"].system_libs = ["ws2_32", "crypt32"] diff --git a/recipes/gdcm/all/patches/0001-3.0.20-find-charls.patch b/recipes/gdcm/all/patches/0001-3.0.20-find-charls.patch new file mode 100644 index 0000000000000..c30995e540d0b --- /dev/null +++ b/recipes/gdcm/all/patches/0001-3.0.20-find-charls.patch @@ -0,0 +1,28 @@ +Allow using charls >= 2.2.0 +https://github.com/malaterre/GDCM/pull/157 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -352,8 +352,8 @@ else() + endif() + + if(GDCM_USE_SYSTEM_CHARLS) +- find_package(CharLS 2.0.0 REQUIRED) +- set(GDCM_CHARLS_LIBRARIES ${CHARLS_LIBRARIES}) ++ find_package(charls 2.2.0 REQUIRED) ++ set(GDCM_CHARLS_LIBRARIES charls) + else() + set(GDCM_CHARLS_LIBRARIES gdcmcharls) + endif() +--- a/Utilities/gdcm_charls.h ++++ b/Utilities/gdcm_charls.h +@@ -17,8 +17,8 @@ + /* Use the charls library configured for gdcm. */ + #include "gdcmTypes.h" + #ifdef GDCM_USE_SYSTEM_CHARLS +-// It is expected that version 2.0.0 is used +-# include ++// It is expected that version >= 2.2.0 is used ++# include + #else + #include "gdcmcharls/charls.h" + #endif diff --git a/recipes/gdcm/all/patches/0001-3.0.9-find-charls.patch b/recipes/gdcm/all/patches/0001-3.0.9-find-charls.patch new file mode 100644 index 0000000000000..c4dfe79c81524 --- /dev/null +++ b/recipes/gdcm/all/patches/0001-3.0.9-find-charls.patch @@ -0,0 +1,28 @@ +Allow using charls >= 2.2.0 +https://github.com/malaterre/GDCM/pull/157 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -356,8 +356,8 @@ else() + endif() + + if(GDCM_USE_SYSTEM_CHARLS) +- find_package(CharLS 2.0.0 REQUIRED) +- set(GDCM_CHARLS_LIBRARIES ${CHARLS_LIBRARIES}) ++ find_package(charls 2.2.0 REQUIRED) ++ set(GDCM_CHARLS_LIBRARIES charls) + else() + set(GDCM_CHARLS_LIBRARIES gdcmcharls) + endif() +--- a/Utilities/gdcm_charls.h ++++ b/Utilities/gdcm_charls.h +@@ -17,8 +17,8 @@ + /* Use the charls library configured for gdcm. */ + #include "gdcmTypes.h" + #ifdef GDCM_USE_SYSTEM_CHARLS +-// It is expected that version 2.0.0 is used +-# include ++// It is expected that version >= 2.2.0 is used ++# include + #else + #include "gdcmcharls/charls.h" + #endif diff --git a/recipes/gdcm/all/patches/0001-charls-linking.patch b/recipes/gdcm/all/patches/0001-charls-linking.patch deleted file mode 100644 index 57df8966f04ba..0000000000000 --- a/recipes/gdcm/all/patches/0001-charls-linking.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/Utilities/gdcmcharls/CMakeLists.txt -+++ b/Utilities/gdcmcharls/CMakeLists.txt -@@ -61,12 +61,10 @@ endif() - #option(charls_BUILD_SHARED_LIBS "Build CharLS with shared libraries." OFF) - #set(BUILD_SHARED_LIBS ${charls_BUILD_SHARED_LIBS}) - --if(WIN32) -- if(BUILD_SHARED_LIBS) -- add_definitions(-DCHARLS_DLL_BUILD) -- else() -- add_definitions(-DCHARLS_STATIC) -- endif() -+if(BUILD_SHARED_LIBS) -+ add_definitions(-DCHARLS_DLL_BUILD) -+else() -+ add_definitions(-DCHARLS_STATIC) - endif() - - add_library(${CHARLS_LIBRARY_NAME} ---- a/Utilities/gdcmcharls/charls.h -+++ b/Utilities/gdcmcharls/charls.h -@@ -13,12 +13,12 @@ - #define CHARLS_IMEXPORT(returntype) __declspec(dllexport) returntype __stdcall - #endif - --// Non-windows (static linking) --#if !defined(CHARLS_IMEXPORT) && !defined(_WIN32) --# define CHARLS_IMEXPORT(returntype) returntype -+// Non-windows (dynamic linking) -+#if !defined(WIN32) && (defined(CHARLS_DLL) || defined(CHARLS_DLL_BUILD)) -+#define CHARLS_IMEXPORT(returntype) __attribute__((visibility("default"))) returntype - #endif - --// Windows static linking -+// Static linking - #if !defined(CHARLS_IMEXPORT) && defined(CHARLS_STATIC) - # define CHARLS_IMEXPORT(returntype) returntype - #endif diff --git a/recipes/gdcm/all/test_package/CMakeLists.txt b/recipes/gdcm/all/test_package/CMakeLists.txt index 5465ea8e54b6d..b8df0da5056db 100644 --- a/recipes/gdcm/all/test_package/CMakeLists.txt +++ b/recipes/gdcm/all/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) find_package(GDCM REQUIRED CONFIG) diff --git a/recipes/gdcm/all/test_package/conanfile.py b/recipes/gdcm/all/test_package/conanfile.py index 1f94130dd62ec..68791e0d3201c 100644 --- a/recipes/gdcm/all/test_package/conanfile.py +++ b/recipes/gdcm/all/test_package/conanfile.py @@ -22,7 +22,7 @@ def build(self): def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") input_file = os.path.join(self.source_folder, "DCMTK_JPEGExt_12Bits.dcm") test_dir = "test_dir" mkdir(self, test_dir) diff --git a/recipes/gdcm/all/test_v1_package/CMakeLists.txt b/recipes/gdcm/all/test_v1_package/CMakeLists.txt index 0d20897301b68..b21cc49efde95 100644 --- a/recipes/gdcm/all/test_v1_package/CMakeLists.txt +++ b/recipes/gdcm/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) From 22876f868798e6bf7c1237391c578ff87ee12153 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 19 Aug 2023 22:44:57 +0900 Subject: [PATCH 304/637] (#18464) xlsxio: add libs and requires definitions * xlsxio: add libs and requires definitions * update dependencies * add system_libs for each components * make test_package.cpp to test_package.c * support static build on msvc * fix package name for minizip-ng * apply @czoido patch --- recipes/xlsxio/all/conanfile.py | 48 ++++++++++++++---- .../xlsxio/all/test_package/CMakeLists.txt | 4 +- .../xlsxio/all/test_package/test_package.c | 49 +++++++++++++++++++ .../xlsxio/all/test_package/test_package.cpp | 13 ----- 4 files changed, 90 insertions(+), 24 deletions(-) create mode 100644 recipes/xlsxio/all/test_package/test_package.c delete mode 100644 recipes/xlsxio/all/test_package/test_package.cpp diff --git a/recipes/xlsxio/all/conanfile.py b/recipes/xlsxio/all/conanfile.py index f1cc40e63d655..55de1430b90bd 100644 --- a/recipes/xlsxio/all/conanfile.py +++ b/recipes/xlsxio/all/conanfile.py @@ -1,4 +1,5 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout, CMakeDeps from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir @@ -47,19 +48,27 @@ def configure(self): self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") + if self.options.with_wide: + self.options["expat"].char_type = "ushort" + if self.options.get_safe("with_minizip_ng"): + self.options["minizip-ng"].mz_compatibility = True + def layout(self): cmake_layout(self, src_folder="src") def requirements(self): if self.options.with_libzip: - self.requires("libzip/1.7.3") + self.requires("libzip/1.9.2") elif Version(self.version) >= "0.2.34" and self.options.with_minizip_ng : self.requires("minizip-ng/3.0.8") else: - self.requires("minizip/1.2.12") - self.requires("expat/2.4.9") - if self.options.with_wide: - self.options["expat"].char_type="ushort" + self.requires("minizip/1.2.13") + self.requires("expat/2.5.0") + + def validate(self): + if Version(self.version) >= "0.2.34": + if self.options.with_libzip and self.options.with_minizip_ng: + raise ConanInvalidConfiguration("with_libzip and with_minizip_ng are mutually exclusive") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -104,20 +113,41 @@ def package_info(self): self.cpp_info.set_property("cmake_module_file_name", "xlsxio") self.cpp_info.set_property("pkg_config_name", "xlsxio") + ziplib = "minizip::minizip" + if self.options.with_libzip: + ziplib = "libzip::libzip" + elif self.options.get_safe("with_minizip_ng"): + ziplib = "minizip-ng::minizip-ng" + + xlsxio_macro = "BUILD_XLSXIO_SHARED" if self.options.shared else "BUILD_XLSXIO_STATIC" + self.cpp_info.components["xlsxio_read"].set_property("cmake_target_name", "xlsxio::xlsxio_read") self.cpp_info.components["xlsxio_read"].set_property("cmake_module_target_name", "xlsxio::xlsxio_read") self.cpp_info.components["xlsxio_read"].set_property("pkg_config_name", "libxlsxio_read") + self.cpp_info.components["xlsxio_read"].libs = ["xlsxio_read"] + self.cpp_info.components["xlsxio_read"].requires = ["expat::expat", ziplib] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["xlsxio_read"].system_libs.append("pthread") + self.cpp_info.components["xlsxio_read"].defines.append(xlsxio_macro) + self.cpp_info.components["xlsxio_write"].set_property("cmake_target_name", "xlsxio::xlsxio_write") self.cpp_info.components["xlsxio_write"].set_property("cmake_module_target_name", "xlsxio::xlsxio_write") self.cpp_info.components["xlsxio_write"].set_property("pkg_config_name", "libxlsxio_write") + self.cpp_info.components["xlsxio_write"].libs = ["xlsxio_write"] + self.cpp_info.components["xlsxio_write"].requires = ["expat::expat", ziplib] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["xlsxio_write"].system_libs.append("pthread") + self.cpp_info.components["xlsxio_write"].defines.append(xlsxio_macro) + if self.options.with_wide: self.cpp_info.components["xlsxio_readw"].set_property("cmake_target_name", "xlsxio::xlsxio_readw") self.cpp_info.components["xlsxio_readw"].set_property("cmake_module_target_name", "xlsxio::xlsxio_readw") self.cpp_info.components["xlsxio_readw"].set_property("pkg_config_name", "libxlsxio_readw") - - - if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs = ["pthread"] + self.cpp_info.components["xlsxio_readw"].libs = ["xlsxio_readw"] + self.cpp_info.components["xlsxio_readw"].requires = ["expat::expat", ziplib] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["xlsxio_readw"].system_libs.append("pthread") + self.cpp_info.components["xlsxio_readw"].defines.append(xlsxio_macro) # TODO: to remove in conan v2 self.cpp_info.names["cmake_find_package"] = "xlsxio" diff --git a/recipes/xlsxio/all/test_package/CMakeLists.txt b/recipes/xlsxio/all/test_package/CMakeLists.txt index 67d6a295ac9dc..a6b2c7649a0c8 100644 --- a/recipes/xlsxio/all/test_package/CMakeLists.txt +++ b/recipes/xlsxio/all/test_package/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.1) -project(test_package LANGUAGES CXX) +project(test_package LANGUAGES C) find_package(xlsxio REQUIRED CONFIG) -add_executable(${PROJECT_NAME} test_package.cpp) +add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} PRIVATE xlsxio::xlsxio_read) target_link_libraries(${PROJECT_NAME} PRIVATE xlsxio::xlsxio_write) diff --git a/recipes/xlsxio/all/test_package/test_package.c b/recipes/xlsxio/all/test_package/test_package.c new file mode 100644 index 0000000000000..097bd99e0a65d --- /dev/null +++ b/recipes/xlsxio/all/test_package/test_package.c @@ -0,0 +1,49 @@ +#include +#include +#include + +int main(int argc, char** argv) { + xlsxiowriter xlsxwrite; + int i; + xlsxioreader xlsxioread; + + // open .xlsx file for writing (will overwrite if it already exists) + if ((xlsxwrite = xlsxiowrite_open("test_package.xlsx", "MySheet")) == NULL) { + fprintf(stderr, "Error creating .xlsx file\n"); + return 1; + } + // set row height + xlsxiowrite_set_row_height(xlsxwrite, 1); + // how many rows to buffer to detect column widths + xlsxiowrite_set_detection_rows(xlsxwrite, 10); + // write column names + xlsxiowrite_add_column(xlsxwrite, "Col1", 0); + xlsxiowrite_add_column(xlsxwrite, "Col2", 21); + xlsxiowrite_add_column(xlsxwrite, "Col3", 0); + xlsxiowrite_add_column(xlsxwrite, "Col4", 2); + xlsxiowrite_add_column(xlsxwrite, "Col5", 0); + xlsxiowrite_add_column(xlsxwrite, "Col6", 0); + xlsxiowrite_add_column(xlsxwrite, "Col7", 0); + xlsxiowrite_next_row(xlsxwrite); + // write data + for (i = 0; i < 1000; i++) { + xlsxiowrite_add_cell_string(xlsxwrite, "Test"); + xlsxiowrite_add_cell_string(xlsxwrite, "A b c d e f\nnew line"); + xlsxiowrite_add_cell_string(xlsxwrite, "&% \"'"); + xlsxiowrite_add_cell_string(xlsxwrite, NULL); + xlsxiowrite_add_cell_int(xlsxwrite, i); + xlsxiowrite_add_cell_datetime(xlsxwrite, time(NULL)); + xlsxiowrite_add_cell_float(xlsxwrite, 3.1415926); + xlsxiowrite_next_row(xlsxwrite); + } + // close .xlsx file + xlsxiowrite_close(xlsxwrite); + + // read .xlsx file + xlsxioread = xlsxioread_open("test_package.xlsx"); + + // close .xlsx file + xlsxioread_close(xlsxioread); + + return 0; +} diff --git a/recipes/xlsxio/all/test_package/test_package.cpp b/recipes/xlsxio/all/test_package/test_package.cpp deleted file mode 100644 index e7ee13469ca6e..0000000000000 --- a/recipes/xlsxio/all/test_package/test_package.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include -#include - -int main(int argc, char** argv) { - xlsxioreader xlsxioread; - xlsxiowriter xlsxiowrite; - xlsxioreadersheet sheet; - (void)xlsxioread; - (void)sheet; - (void)xlsxiowrite; - return 0; -} From 29a11c38757d4a5bc78a94a027ae01e4fd3e56d4 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 19 Aug 2023 23:05:39 +0900 Subject: [PATCH 305/637] (#18512) wasm-micro-runtime: add recipe * wasm-micro-runtime: add recipe * support MSVC * link ws2_32 * simplify test_package.cpp --------- Co-authored-by: Carlos Zoido --- recipes/wasm-micro-runtime/all/conandata.yml | 9 ++ recipes/wasm-micro-runtime/all/conanfile.py | 138 ++++++++++++++++++ .../all/patches/1.2.2-0001-fix-cmake.patch | 57 ++++++++ .../all/test_package/CMakeLists.txt | 12 ++ .../all/test_package/conanfile.py | 33 +++++ .../all/test_package/test_package.cpp | 65 +++++++++ .../all/test_package/test_package.wasm | Bin 0 -> 71 bytes .../test_package/test_package_no_interp.cpp | 64 ++++++++ recipes/wasm-micro-runtime/config.yml | 3 + 9 files changed, 381 insertions(+) create mode 100644 recipes/wasm-micro-runtime/all/conandata.yml create mode 100644 recipes/wasm-micro-runtime/all/conanfile.py create mode 100644 recipes/wasm-micro-runtime/all/patches/1.2.2-0001-fix-cmake.patch create mode 100644 recipes/wasm-micro-runtime/all/test_package/CMakeLists.txt create mode 100644 recipes/wasm-micro-runtime/all/test_package/conanfile.py create mode 100644 recipes/wasm-micro-runtime/all/test_package/test_package.cpp create mode 100644 recipes/wasm-micro-runtime/all/test_package/test_package.wasm create mode 100644 recipes/wasm-micro-runtime/all/test_package/test_package_no_interp.cpp create mode 100644 recipes/wasm-micro-runtime/config.yml diff --git a/recipes/wasm-micro-runtime/all/conandata.yml b/recipes/wasm-micro-runtime/all/conandata.yml new file mode 100644 index 0000000000000..e6acc34530782 --- /dev/null +++ b/recipes/wasm-micro-runtime/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "1.2.2": + url: "https://github.com/bytecodealliance/wasm-micro-runtime/archive/refs/tags/WAMR-1.2.2.tar.gz" + sha256: "d328fc1e19c54cfdb4248b861de54b62977b9b85c0a40eaaeb9cd9b628c0c788" +patches: + "1.2.2": + - patch_file: "patches/1.2.2-0001-fix-cmake.patch" + patch_description: "separate static and shasred build" + patch_type: "conan" diff --git a/recipes/wasm-micro-runtime/all/conanfile.py b/recipes/wasm-micro-runtime/all/conanfile.py new file mode 100644 index 0000000000000..4cd796f406c9c --- /dev/null +++ b/recipes/wasm-micro-runtime/all/conanfile.py @@ -0,0 +1,138 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.microsoft import is_msvc +import os + +required_conan_version = ">=1.53.0" + +class WasmMicroRuntimeConan(ConanFile): + name = "wasm-micro-runtime" + description = "WebAssembly Micro Runtime (WAMR)" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://bytecodealliance.github.io/wamr.dev/" + topics = ("wasm", "embedded", "webassembly", "runtime") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_interp": [False, "fast", "classic"], + "with_aot": [True, False], + "with_jit": [True, False], + "with_fast_jit": [True, False], + "libc": ["builtin", "wasi", "uvwasi"], + "with_multi_module": [True, False], + "with_mini_loader": [True, False], + "with_pthread": [True, False], + "with_wasi_threads": [True, False], + "with_tail_call": [True, False], + "with_simd": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_interp": "fast", + "with_aot": True, + "with_jit": False, + "with_fast_jit": False, + "libc": "builtin", + "with_multi_module": False, + "with_mini_loader": False, + "with_pthread": False, + "with_wasi_threads": False, + "with_tail_call": False, + "with_simd": True, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + # When with_fast_jit is True, C++ is required. + if not self.options.with_fast_jit: + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + # When with_fast_jit is True, C++ is required. + if not self.options.with_fast_jit: + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) + if not self.options.with_interp and not self.options.with_aot: + raise ConanInvalidConfiguration(f"{self.ref} requires with_interp and with_aot at least one.") + if self.options.with_jit: + raise ConanInvalidConfiguration(f"{self.ref} doesn't support with_jit(yet).") + if self.options.with_multi_module and self.options.with_mini_loader: + raise ConanInvalidConfiguration(f"{self.ref} doesn't support both with_multi_module and with_mini_loader.") + if self.options.libc == "wasi" and self.settings.os == "Windows": + raise ConanInvalidConfiguration(f"{self.ref} doesn't support libc=wasi on Windows.") + if self.options.libc == "uvwasi": + raise ConanInvalidConfiguration(f"{self.ref} doesn't support libc=uvwasi(yet).") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + def is_enabled(value): + return 1 if value else 0 + + tc = CMakeToolchain(self) + # FIXME: it should use assembler code instead of C++ on MSVC + if is_msvc(self): + tc.variables["WAMR_BUILD_INVOKE_NATIVE_GENERAL"] = 1 + + # interpreters + tc.variables["WAMR_BUILD_INTERP"] = is_enabled(self.options.with_interp) + if self.options.with_interp: + tc.variables["WAMR_BUILD_FAST_INTERP"] = is_enabled(self.options.with_interp == "fast") + # AOT and JITs + tc.variables["WAMR_BUILD_AOT"] = is_enabled(self.options.with_aot) + tc.variables["WAMR_BUILD_JIT"] = is_enabled(self.options.with_jit) + tc.variables["WAMR_BUILD_FAST_JIT"] = is_enabled(self.options.with_fast_jit) + # LIBC + tc.variables["WAMR_BUILD_LIBC_BUILTIN"] = is_enabled(self.options.libc == "builtin") + tc.variables["WAMR_BUILD_LIBC_WASI"] = is_enabled(self.options.libc == "wasi") + tc.variables["WAMR_BUILD_LIBC_UVWASI"] = is_enabled(self.options.libc == "uvwasi") + # others + tc.variables["WAMR_BUILD_MULTI_MODULE"] = is_enabled(self.options.with_multi_module) + tc.variables["WAMR_BUILD_MINI_LOADER"] = is_enabled(self.options.with_mini_loader) + tc.variables["WAMR_BUILD_LIB_PTHREAD"] = is_enabled(self.options.with_pthread) + tc.variables["WAMR_BUILD_LIB_WASI_THREADS"] = is_enabled(self.options.with_wasi_threads) + tc.variables["WAMR_BUILD_TAIL_CALL"] = is_enabled(self.options.with_tail_call) + tc.variables["WAMR_BUILD_SIMD"] = is_enabled(self.options.with_simd) + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["iwasm" if self.options.shared else "vmlib"] + if self.settings.os == "Windows" and not self.options.shared: + self.cpp_info.defines.append("COMPILING_WASM_RUNTIME_API=0") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + self.cpp_info.system_libs.append("pthread") + if self.settings.os == "Windows": + self.cpp_info.system_libs.append("ws2_32") diff --git a/recipes/wasm-micro-runtime/all/patches/1.2.2-0001-fix-cmake.patch b/recipes/wasm-micro-runtime/all/patches/1.2.2-0001-fix-cmake.patch new file mode 100644 index 0000000000000..baf12ba1a1b62 --- /dev/null +++ b/recipes/wasm-micro-runtime/all/patches/1.2.2-0001-fix-cmake.patch @@ -0,0 +1,57 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1c87994..bbcb2fd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -109,11 +109,6 @@ set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + + include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake) + +-set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat -Wformat-security -Wshadow -Wno-unused-parameter") +-# set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wsign-conversion") +- +-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wformat -Wformat-security -Wno-unused") +- + if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") + if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") +@@ -130,22 +125,29 @@ endif () + + include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake) + ++if (NOT BUILD_SHARED_LIBS) + # STATIC LIBRARY + add_library(iwasm_static STATIC ${WAMR_RUNTIME_LIB_SOURCE}) + set_target_properties (iwasm_static PROPERTIES OUTPUT_NAME vmlib) + target_include_directories(iwasm_static INTERFACE ${WAMR_ROOT_DIR}/core/iwasm/include) +-target_link_libraries (iwasm_static INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl -lpthread) ++target_link_libraries (iwasm_static INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS}) ++if(NOT MSVC) ++target_link_libraries (iwasm_static INTERFACE -lm -ldl -lpthread) ++endif() + if (WAMR_BUILD_WASM_CACHE EQUAL 1) + target_link_libraries(iwasm_static INTERFACE boringssl_crypto) + endif () + + install (TARGETS iwasm_static ARCHIVE DESTINATION lib) +- ++else() + # SHARED LIBRARY + add_library (iwasm_shared SHARED ${WAMR_RUNTIME_LIB_SOURCE}) + set_target_properties (iwasm_shared PROPERTIES OUTPUT_NAME iwasm) + target_include_directories(iwasm_shared INTERFACE ${WAMR_ROOT_DIR}/core/iwasm/include) +-target_link_libraries (iwasm_shared INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl -lpthread) ++target_link_libraries (iwasm_shared INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS}) ++if(NOT MSVC) ++target_link_libraries (iwasm_shared INTERFACE -lm -ldl -lpthread) ++endif() + if (WAMR_BUILD_WASM_CACHE EQUAL 1) + target_link_libraries(iwasm_shared INTERFACE boringssl_crypto) + endif () +@@ -155,6 +157,7 @@ if (MINGW) + endif () + + install (TARGETS iwasm_shared LIBRARY DESTINATION lib) ++endif() + + # HEADERS + install (FILES diff --git a/recipes/wasm-micro-runtime/all/test_package/CMakeLists.txt b/recipes/wasm-micro-runtime/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..3cf7f573410ea --- /dev/null +++ b/recipes/wasm-micro-runtime/all/test_package/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(wasm-micro-runtime REQUIRED CONFIG) + +if(WAMR_NO_INTERP) +add_executable(${PROJECT_NAME} test_package_no_interp.cpp) +else() +add_executable(${PROJECT_NAME} test_package.cpp) +endif() + +target_link_libraries(${PROJECT_NAME} PRIVATE wasm-micro-runtime::wasm-micro-runtime) diff --git a/recipes/wasm-micro-runtime/all/test_package/conanfile.py b/recipes/wasm-micro-runtime/all/test_package/conanfile.py new file mode 100644 index 0000000000000..d56a8c50a887a --- /dev/null +++ b/recipes/wasm-micro-runtime/all/test_package/conanfile.py @@ -0,0 +1,33 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain + +import os + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def generate(self): + tc = CMakeToolchain(self) + if not self.dependencies["wasm-micro-runtime"].options.with_interp: + tc.variables["WAMR_NO_INTERP"] = True + tc.generate() + + 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") + wat_path = os.path.join(self.source_folder, "test_package.wasm") + self.run(f"{bin_path} {wat_path}", env="conanrun") diff --git a/recipes/wasm-micro-runtime/all/test_package/test_package.cpp b/recipes/wasm-micro-runtime/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..6e413e2d402fc --- /dev/null +++ b/recipes/wasm-micro-runtime/all/test_package/test_package.cpp @@ -0,0 +1,65 @@ +#include +#include +#include +#include + +#include "wasm_c_api.h" + +#define own + +int main(int argc, const char* argv[]) { + // Initialize. + printf("Initializing...\n"); + wasm_engine_t* engine = wasm_engine_new(); + wasm_store_t* store = wasm_store_new(engine); + + // Load binary. + printf("Loading binary...\n"); + FILE* file = fopen(argv[1], "rb"); + if (!file) { + printf("> Error loading module!\n"); + return 1; + } + + int ret = fseek(file, 0L, SEEK_END); + if (ret == -1) { + printf("> Error loading module!\n"); + fclose(file); + return 1; + } + + long file_size = ftell(file); + if (file_size == -1) { + printf("> Error loading module!\n"); + fclose(file); + return 1; + } + + ret = fseek(file, 0L, SEEK_SET); + if (ret == -1) { + printf("> Error loading module!\n"); + fclose(file); + return 1; + } + + wasm_byte_vec_t binary; + wasm_byte_vec_new_uninitialized(&binary, file_size); + if (fread(binary.data, file_size, 1, file) != 1) { + printf("> Error loading module!\n"); + fclose(file); + return 1; + } + fclose(file); + + // Compile. + printf("Compiling module...\n"); + own wasm_module_t* module = wasm_module_new(store, &binary); + if (!module) { + printf("> Error compiling module!\n"); + return 1; + } + + wasm_byte_vec_delete(&binary); + + return 0; +} diff --git a/recipes/wasm-micro-runtime/all/test_package/test_package.wasm b/recipes/wasm-micro-runtime/all/test_package/test_package.wasm new file mode 100644 index 0000000000000000000000000000000000000000..18ac7653b03011ec07329a1b12166d0e53061b33 GIT binary patch literal 71 zcmXxbF%Ezr5JkcFmqiRVR-R7^5(~gY +#include +#include +#include + +#include "wasm_c_api.h" + +#define own + +// A function to be called from Wasm code. +own wasm_trap_t* hello_callback( + const wasm_val_vec_t* args, wasm_val_vec_t* results +) { + printf("Calling back...\n"); + printf("> Hello World!\n"); + return NULL; +} + +int main(int argc, const char* argv[]) { + // Initialize. + printf("Initializing...\n"); + wasm_engine_t* engine = wasm_engine_new(); + wasm_store_t* store = wasm_store_new(engine); + + // Load binary. + printf("Loading binary...\n"); + FILE* file = fopen(argv[1], "rb"); + if (!file) { + printf("> Error loading module!\n"); + return 1; + } + + long file_size = 10240; + + wasm_byte_vec_t binary; + wasm_byte_vec_new_uninitialized(&binary, file_size); + + // Compile. + printf("Compiling module...\n"); + own wasm_module_t* module = wasm_module_new(store, &binary); + + wasm_byte_vec_delete(&binary); + + // Create external print functions. + printf("Creating callback...\n"); + own wasm_functype_t* hello_type = wasm_functype_new_0_0(); + own wasm_func_t* hello_func = + wasm_func_new(store, hello_type, hello_callback); + + wasm_functype_delete(hello_type); + + wasm_func_delete(hello_func); + + wasm_module_delete(module); + + // Shut down. + printf("Shutting down...\n"); + wasm_store_delete(store); + wasm_engine_delete(engine); + + // All done. + printf("Done.\n"); + return 0; +} diff --git a/recipes/wasm-micro-runtime/config.yml b/recipes/wasm-micro-runtime/config.yml new file mode 100644 index 0000000000000..af40d9653a378 --- /dev/null +++ b/recipes/wasm-micro-runtime/config.yml @@ -0,0 +1,3 @@ +versions: + "1.2.2": + folder: all From 8ae35ee449b9b5270e252c6867f1037dfcc10051 Mon Sep 17 00:00:00 2001 From: Pavel Geler <53797155+pgeler@users.noreply.github.com> Date: Sat, 19 Aug 2023 10:25:52 -0400 Subject: [PATCH 306/637] (#18544) add grpc package version 1.54.3 and 1.48.4 * add grpc version 1.56.1 * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * add grpc version 1.56.1 * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * update 1.54.2 to the latest 1.54.3 * fix * abseil * fix --------- Co-authored-by: neureal-dev <17104352+neureal-dev@users.noreply.github.com> --- recipes/grpc/all/conandata.yml | 30 ++++++------------ recipes/grpc/all/conanfile.py | 17 +++++----- .../v1.46.x/001-disable-cppstd-override.patch | 26 ---------------- .../v1.47.x/001-disable-cppstd-override.patch | 31 ------------------- .../v1.48.x/001-disable-cppstd-override.patch | 15 ++++++++- .../v1.50.x/001-disable-cppstd-override.patch | 26 ---------------- recipes/grpc/config.yml | 8 ++--- 7 files changed, 35 insertions(+), 118 deletions(-) delete mode 100644 recipes/grpc/all/patches/v1.46.x/001-disable-cppstd-override.patch delete mode 100644 recipes/grpc/all/patches/v1.47.x/001-disable-cppstd-override.patch delete mode 100644 recipes/grpc/all/patches/v1.50.x/001-disable-cppstd-override.patch diff --git a/recipes/grpc/all/conandata.yml b/recipes/grpc/all/conandata.yml index afbe96ebd2a5e..e714373e94d62 100644 --- a/recipes/grpc/all/conandata.yml +++ b/recipes/grpc/all/conandata.yml @@ -1,24 +1,12 @@ sources: - "1.50.1": - url: "https://github.com/grpc/grpc/archive/v1.50.1.tar.gz" - sha256: "fb1ed98eb3555877d55eb2b948caca44bc8601c6704896594de81558639709ef" - "1.50.0": - url: "https://github.com/grpc/grpc/archive/v1.50.0.tar.gz" - sha256: "76900ab068da86378395a8e125b5cc43dfae671e09ff6462ddfef18676e2165a" - "1.47.1": - url: "https://github.com/grpc/grpc/archive/v1.47.1.tar.gz" - sha256: "ba7c36989ad8a52c813adeebb0c65869283448f496dbb2868c75f69941dec6a9" - "1.46.3": - url: "https://github.com/grpc/grpc/archive/refs/tags/v1.46.3.tar.gz" - sha256: "d6cbf22cb5007af71b61c6be316a79397469c58c82a942552a62e708bce60964" + "1.54.3": + url: "https://github.com/grpc/grpc/archive/v1.54.3.tar.gz" + sha256: "17e4e1b100657b88027721220cbfb694d86c4b807e9257eaf2fb2d273b41b1b1" + "1.48.4": + url: "https://github.com/grpc/grpc/archive/v1.48.4.tar.gz" + sha256: "0c3faa83e39d4f1ab55fe1476362b9ac3b81632a46dce7fd4d50271bce816b53" patches: - "1.50.1": - - patch_file: "patches/v1.50.x/001-disable-cppstd-override.patch" - "1.50.0": - - patch_file: "patches/v1.50.x/001-disable-cppstd-override.patch" - "1.48.0": + "1.48.4": - patch_file: "patches/v1.48.x/001-disable-cppstd-override.patch" - "1.47.1": - - patch_file: "patches/v1.47.x/001-disable-cppstd-override.patch" - "1.46.3": - - patch_file: "patches/v1.46.x/001-disable-cppstd-override.patch" + patch_description: "disable cpp std override" + patch_type: "portability" diff --git a/recipes/grpc/all/conanfile.py b/recipes/grpc/all/conanfile.py index 3187b094b3559..2278045abf6b9 100644 --- a/recipes/grpc/all/conanfile.py +++ b/recipes/grpc/all/conanfile.py @@ -1,5 +1,4 @@ import os -import shutil from conan import ConanFile from conan.errors import ConanInvalidConfiguration @@ -86,15 +85,18 @@ def layout(self): def requirements(self): # abseil is public. See https://github.com/conan-io/conan-center-index/pull/17284#issuecomment-1526082638 - if is_msvc(self) and Version(self.version) < "1.47": - self.requires("abseil/20211102.0", transitive_headers=True, transitive_libs=True) + if Version(self.version) < "1.47": + if is_msvc(self): + self.requires("abseil/20211102.0", transitive_headers=True, transitive_libs=True) + else: + self.requires("abseil/20220623.1", transitive_headers=True, transitive_libs=True) else: - self.requires("abseil/20220623.0", transitive_headers=True, transitive_libs=True) - self.requires("c-ares/1.19.0") + self.requires("abseil/20230125.3", transitive_headers=True, transitive_libs=True) + self.requires("c-ares/1.19.1") self.requires("openssl/[>=1.1 <4]") self.requires("re2/20230301") self.requires("zlib/1.2.13") - self.requires("protobuf/3.21.9", transitive_headers=True, transitive_libs=True, run=can_run(self)) + self.requires("protobuf/3.21.12", transitive_headers=True, transitive_libs=True, run=can_run(self)) def package_id(self): del self.info.options.secure @@ -119,7 +121,7 @@ def validate(self): def build_requirements(self): if not can_run(self): - self.tool_requires("protobuf/3.21.9") + self.tool_requires("protobuf/3.21.12") if cross_building(self): # when cross compiling we need pre compiled grpc plugins for protoc self.tool_requires(f"grpc/{self.version}") @@ -309,6 +311,7 @@ def corefoundation(): "abseil::absl_status", "abseil::absl_str_format", "abseil::absl_strings", "abseil::absl_synchronization", "abseil::absl_time", "abseil::absl_optional", + "abseil::absl_flags", ], "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), }, diff --git a/recipes/grpc/all/patches/v1.46.x/001-disable-cppstd-override.patch b/recipes/grpc/all/patches/v1.46.x/001-disable-cppstd-override.patch deleted file mode 100644 index a260124675947..0000000000000 --- a/recipes/grpc/all/patches/v1.46.x/001-disable-cppstd-override.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7a97604b75..7ae815042f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -222,21 +222,6 @@ if (NOT DEFINED CMAKE_C_STANDARD) - set(CMAKE_C_STANDARD 99) - endif() - --# Add c++11 flags --if (NOT DEFINED CMAKE_CXX_STANDARD) -- set(CMAKE_CXX_STANDARD 11) --else() -- if (CMAKE_CXX_STANDARD LESS 11) -- message(FATAL_ERROR "CMAKE_CXX_STANDARD is less than 11, please specify at least SET(CMAKE_CXX_STANDARD 11)") -- endif() --endif() --if (NOT DEFINED CMAKE_CXX_STANDARD_REQUIRED) -- set(CMAKE_CXX_STANDARD_REQUIRED ON) --endif() --if (NOT DEFINED CMAKE_CXX_EXTENSIONS) -- set(CMAKE_CXX_EXTENSIONS OFF) --endif() -- - if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE) - set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) - endif() diff --git a/recipes/grpc/all/patches/v1.47.x/001-disable-cppstd-override.patch b/recipes/grpc/all/patches/v1.47.x/001-disable-cppstd-override.patch deleted file mode 100644 index 0ba329e6480bc..0000000000000 --- a/recipes/grpc/all/patches/v1.47.x/001-disable-cppstd-override.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index db075cbe4a..289cc52215 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -220,26 +220,6 @@ if(WIN32) - set(_gRPC_PLATFORM_WINDOWS ON) - endif() - -- # Use C11 standard --if (NOT DEFINED CMAKE_C_STANDARD) -- set(CMAKE_C_STANDARD 11) --endif() -- --# Add c++14 flags --if (NOT DEFINED CMAKE_CXX_STANDARD) -- set(CMAKE_CXX_STANDARD 14) --else() -- if (CMAKE_CXX_STANDARD LESS 14) -- message(FATAL_ERROR "CMAKE_CXX_STANDARD is less than 14, please specify at least SET(CMAKE_CXX_STANDARD 14)") -- endif() --endif() --if (NOT DEFINED CMAKE_CXX_STANDARD_REQUIRED) -- set(CMAKE_CXX_STANDARD_REQUIRED ON) --endif() --if (NOT DEFINED CMAKE_CXX_EXTENSIONS) -- set(CMAKE_CXX_EXTENSIONS OFF) --endif() -- - if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE) - set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) - endif() diff --git a/recipes/grpc/all/patches/v1.48.x/001-disable-cppstd-override.patch b/recipes/grpc/all/patches/v1.48.x/001-disable-cppstd-override.patch index 65b655ba1f8b5..dee7836ac518b 100644 --- a/recipes/grpc/all/patches/v1.48.x/001-disable-cppstd-override.patch +++ b/recipes/grpc/all/patches/v1.48.x/001-disable-cppstd-override.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 25990a5..f37849c 100644 +index 1ecaea8eb7..0788b88177 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -226,21 +226,6 @@ if (NOT DEFINED CMAKE_C_STANDARD) @@ -24,3 +24,16 @@ index 25990a5..f37849c 100644 if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE) set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) endif() +diff --git a/src/core/ext/xds/xds_http_fault_filter.cc b/src/core/ext/xds/xds_http_fault_filter.cc +index 2a10d2fd27..0900fedf61 100644 +--- a/src/core/ext/xds/xds_http_fault_filter.cc ++++ b/src/core/ext/xds/xds_http_fault_filter.cc +@@ -109,7 +109,7 @@ absl::StatusOr ParseHttpFaultIntoJson( + int abort_http_status_code = + envoy_extensions_filters_http_fault_v3_FaultAbort_http_status( + fault_abort); +- if (abort_http_status_code != 0 and abort_http_status_code != 200) { ++ if (abort_http_status_code != 0 && abort_http_status_code != 200) { + abort_grpc_status_code = + grpc_http2_status_to_grpc_status(abort_http_status_code); + } diff --git a/recipes/grpc/all/patches/v1.50.x/001-disable-cppstd-override.patch b/recipes/grpc/all/patches/v1.50.x/001-disable-cppstd-override.patch deleted file mode 100644 index a9339dbcc896b..0000000000000 --- a/recipes/grpc/all/patches/v1.50.x/001-disable-cppstd-override.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7052846..259fa93 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -227,21 +227,6 @@ if (NOT DEFINED CMAKE_C_STANDARD) - set(CMAKE_C_STANDARD 11) - endif() - --# Add c++14 flags --if (NOT DEFINED CMAKE_CXX_STANDARD) -- set(CMAKE_CXX_STANDARD 14) --else() -- if (CMAKE_CXX_STANDARD LESS 14) -- message(FATAL_ERROR "CMAKE_CXX_STANDARD is less than 14, please specify at least SET(CMAKE_CXX_STANDARD 14)") -- endif() --endif() --if (NOT DEFINED CMAKE_CXX_STANDARD_REQUIRED) -- set(CMAKE_CXX_STANDARD_REQUIRED ON) --endif() --if (NOT DEFINED CMAKE_CXX_EXTENSIONS) -- set(CMAKE_CXX_EXTENSIONS OFF) --endif() -- - if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE) - set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) - endif() diff --git a/recipes/grpc/config.yml b/recipes/grpc/config.yml index d36f53e1f178c..471303e99a287 100644 --- a/recipes/grpc/config.yml +++ b/recipes/grpc/config.yml @@ -1,9 +1,5 @@ versions: - "1.50.1": + "1.54.3": folder: "all" - "1.50.0": - folder: "all" - "1.47.1": - folder: "all" - "1.46.3": + "1.48.4": folder: "all" From 75230bff154ac8b7c12e7bb4742b55e674f014c1 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 19 Aug 2023 17:46:56 +0300 Subject: [PATCH 307/637] (#18625) onetbb/2020.x: migrate to Conan v2, add v2020.3.3 * onetbb/2020.x: migrate to Conan v2 * onetbb/2020.x: fix linker error * onetbb: improve os detection * onetbb: further cleanup * onetbb: fix duplicate arch flag issue * onetbb: fix LDFLAGS getting incorrectly applied to ar command * onetbb: add m to system_libs * onetbb: add v2020.3.3 * onetbb: fix a typo --- recipes/onetbb/2020.x/conandata.yml | 3 + recipes/onetbb/2020.x/conanfile.py | 294 +++++++++--------- .../onetbb/2020.x/test_package/CMakeLists.txt | 5 +- .../onetbb/2020.x/test_package/conanfile.py | 19 +- .../2020.x/test_v1_package/CMakeLists.txt | 8 + .../2020.x/test_v1_package/conanfile.py | 17 + .../onetbb/all/test_package/CMakeLists.txt | 2 +- .../onetbb/all/test_v1_package/CMakeLists.txt | 2 +- recipes/onetbb/config.yml | 2 + 9 files changed, 198 insertions(+), 154 deletions(-) create mode 100644 recipes/onetbb/2020.x/test_v1_package/CMakeLists.txt create mode 100644 recipes/onetbb/2020.x/test_v1_package/conanfile.py diff --git a/recipes/onetbb/2020.x/conandata.yml b/recipes/onetbb/2020.x/conandata.yml index de98a3aa2d71d..bca751ad9a8a8 100644 --- a/recipes/onetbb/2020.x/conandata.yml +++ b/recipes/onetbb/2020.x/conandata.yml @@ -1,4 +1,7 @@ sources: + "2020.3.3": + url: "https://github.com/oneapi-src/oneTBB/archive/v2020.3.3.tar.gz" + sha256: "494ac15f60e91d95ed7aec04f4e1d389b8a55bffc581d0fe9116b99336401963" "2020.3": url: "https://github.com/oneapi-src/oneTBB/archive/v2020.3.tar.gz" sha256: "ebc4f6aa47972daed1f7bf71d100ae5bf6931c2e3144cf299c8cc7d041dca2f3" diff --git a/recipes/onetbb/2020.x/conanfile.py b/recipes/onetbb/2020.x/conanfile.py index 0fd823e9ffd15..3975cf2c1c8b6 100644 --- a/recipes/onetbb/2020.x/conanfile.py +++ b/recipes/onetbb/2020.x/conanfile.py @@ -1,27 +1,34 @@ -from conan import ConanFile -from conan.errors import ConanInvalidConfiguration, ConanException -from conan.tools.files import get, replace_in_file, save, chdir, copy -from conan.tools.microsoft import msvc_runtime_flag, is_msvc -from conan.tools.scm import Version -from conans import tools as legacy_tools import os +import re import textwrap +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.files import chdir, copy, get, replace_in_file, save +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.intel import IntelCC +from conan.tools.layout import basic_layout +from conan.tools.microsoft import VCVars, msvs_toolset, msvc_runtime_flag, is_msvc +from conan.tools.scm import Version + required_conan_version = ">=1.53.0" class OneTBBConan(ConanFile): name = "onetbb" - license = "Apache-2.0" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/oneapi-src/oneTBB" description = ( "oneAPI Threading Building Blocks (oneTBB) lets you easily write parallel " "C++ programs that take full advantage of multicore performance, that " "are portable, composable and have future-proof scalability." ) + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/oneapi-src/oneTBB" topics = ("tbb", "threading", "parallelism", "tbbmalloc") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -36,18 +43,10 @@ class OneTBBConan(ConanFile): "tbbproxy": False, } - @property - def _source_subfolder(self): - return "source_subfolder" - @property def _settings_build(self): return getattr(self, "settings_build", self.settings) - @property - def _is_clanglc(self): - return self.settings.os == "Windows" and self.settings.compiler == "clang" - @property def _base_compiler(self): base = self.settings.get_safe("compiler.base") @@ -55,6 +54,14 @@ def _base_compiler(self): return self.settings.compiler.base return self.settings.compiler + @property + def _is_msvc(self): + return str(self._base_compiler) in ["Visual Studio", "msvc"] + + @property + def _is_clang_cl(self): + return self.settings.os == "Windows" and self.settings.compiler == "clang" + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -63,51 +70,42 @@ def configure(self): if self.options.shared: self.options.rm_safe("fPIC") - def validate(self): - if self.settings.os == "Macos": - if self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "8.0": - raise ConanInvalidConfiguration("%s %s couldn't be built by apple-clang < 8.0" % (self.name, self.version)) - if not self.options.shared: - self.output.warn("oneTBB strongly discourages usage of static linkage") - if self.options.tbbproxy and \ - (not self.options.shared or \ - not self.options.tbbmalloc): - raise ConanInvalidConfiguration("tbbproxy needs tbbmaloc and shared options") + def layout(self): + basic_layout(self, src_folder="src") def package_id(self): del self.info.options.tbbmalloc del self.info.options.tbbproxy + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) + if is_apple_os(self): + if self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "8.0": + raise ConanInvalidConfiguration(f"{self.name} {self.version} couldn't be built by apple-clang < 8.0") + if not self.options.shared: + self.output.warning("oneTBB strongly discourages usage of static linkage") + if self.options.tbbproxy and (not self.options.shared or not self.options.tbbmalloc): + raise ConanInvalidConfiguration("tbbproxy needs tbbmaloc and shared options") + def build_requirements(self): if self._settings_build.os == "Windows": - if "CONAN_MAKE_PROGRAM" not in os.environ and not legacy_tools.which("make"): - self.tool_requires("make/4.2.1") + if not self.conf_info.get("tools.gnu:make_program", check_type=str): + self.tool_requires("make/4.3") def source(self): - get(self, **self.conan_data["sources"][self.version], - strip_root=True, destination=self._source_subfolder) - - def build(self): - def add_flag(name, value): - if name in os.environ: - os.environ[name] += " " + value - else: - os.environ[name] = value - - # Get the version of the current compiler instead of gcc - linux_include = os.path.join(self._source_subfolder, "build", "linux.inc") - replace_in_file(self, linux_include, "shell gcc", "shell $(CC)") - replace_in_file(self, linux_include, "= gcc", "= $(CC)") - - if self.version != "2019_u9" and self.settings.build_type == "Debug": - replace_in_file(self, os.path.join(self._source_subfolder, "Makefile"), "release", "debug") - - if str(self._base_compiler) in ["Visual Studio", "msvc"]: - save(self, - os.path.join(self._source_subfolder, "build", "big_iron_msvc.inc"), + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) + if self._is_msvc: + link_cmd = "xilib" if self.settings.compiler == "intel-cc" else "lib" + save( + self, + os.path.join(self.source_folder, "build", "big_iron_msvc.inc"), # copy of big_iron.inc adapted for MSVC - textwrap.dedent("""\ - LIB_LINK_CMD = {}.exe + textwrap.dedent(f"""\ + LIB_LINK_CMD = {link_cmd}.exe LIB_OUTPUT_KEY = /OUT: LIB_LINK_FLAGS = LIB_LINK_LIBS = @@ -128,39 +126,39 @@ def add_flag(name, value): MALLOC_NO_VERSION.DLL = MALLOCPROXY.DLL = MALLOCPROXY.DEF = - """.format("xilib" if self.settings.compiler == "intel" else "lib")) + """), ) - extra = "" if self.options.shared else "extra_inc=big_iron_msvc.inc" + if not self.options.shared: + tc.make_args.append("extra_inc=big_iron_msvc.inc") else: - extra = "" if self.options.shared else "extra_inc=big_iron.inc" + if not self.options.shared: + tc.make_args.append("extra_inc=big_iron.inc") arch = { "x86": "ia32", "x86_64": "intel64", "armv7": "armv7", - "armv8": "arm64" - if (self.settings.os == "iOS" or self.settings.os == "Macos") - else "aarch64", + "armv8": "arm64" if is_apple_os(self) else "aarch64", }[str(self.settings.arch)] - extra += " arch=%s" % arch + tc.make_args.append(f"arch={arch}") if self.settings.os == "iOS": - extra += " target=ios" + tc.make_args.append("target=ios") if str(self._base_compiler) in ("gcc", "clang", "apple-clang"): if str(self._base_compiler.libcxx) in ("libstdc++", "libstdc++11"): - extra += " stdlib=libstdc++" + tc.make_args.append("stdlib=libstdc++") elif str(self._base_compiler.libcxx) == "libc++": - extra += " stdlib=libc++" + tc.make_args.append("stdlib=libc++") - if str(self.settings.compiler) == "intel": - extra += " compiler=icc" + if str(self.settings.compiler) == "intel-cc": + tc.make_args.append("compiler=icc") elif str(self.settings.compiler) in ("clang", "apple-clang"): - extra += " compiler=clang" + tc.make_args.append("compiler=clang") else: - extra += " compiler=gcc" + tc.make_args.append("compiler=gcc") - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: # runtime is supposed to track the version of the c++ stdlib, # the version of glibc, and the version of the linux kernel. # However, it isn't actually used anywhere other than for @@ -168,113 +166,123 @@ def add_flag(name, value): # TBB computes the value of this variable using gcc, which we # don't necessarily want to require when building this recipe. # Setting it to a dummy value prevents TBB from calling gcc. - extra += " runtime=gnu" - elif str(self._base_compiler) in ["Visual Studio", "msvc"]: + tc.make_args.append("runtime=gnu") + elif self._is_msvc: if "MT" in msvc_runtime_flag(self): runtime = "vc_mt" else: - if self.settings.compiler == "Visual Studio": - runtime = { - "8": "vc8", - "9": "vc9", - "10": "vc10", - "11": "vc11", - "12": "vc12", - "14": "vc14", - "15": "vc14.1", - "16": "vc14.2" - }.get(str(self._base_compiler.version), "vc14.2") + # Convert MSVC toolset to TBB runtime id + # v140 -> vc14, v141 -> vc14.1, etc + toolset = msvs_toolset(self) + m = re.fullmatch(r"v(\d+)(\d)", toolset) + if m: + runtime = f"vc{m[1]}" + (f".{m[2]}" if m[2] != "0" else "") else: - runtime = { - "190": "vc14", - "191": "vc14.1", - "192": "vc14.2" - }.get(str(self._base_compiler.version), "vc14.2") - extra += " runtime=%s" % runtime - - if self.settings.compiler == "intel": - extra += " compiler=icl" + self.output.warning(f"Unknown MSVC toolset: {toolset}") + runtime = "vc14.2" + tc.make_args.append(f"runtime={runtime}") + + if self.settings.compiler == "intel-cc": + tc.make_args.append("compiler=icl") else: - extra += " compiler=cl" - cxx_std_flag = legacy_tools.cppstd_flag(self.settings) - if cxx_std_flag: - cxx_std_value = ( - cxx_std_flag.split("=")[1] - if "=" in cxx_std_flag - else cxx_std_flag.split(":")[1] - if ":" in cxx_std_flag - else None - ) - if cxx_std_value: - extra += f" stdver={cxx_std_value}" - - make = legacy_tools.get_env("CONAN_MAKE_PROGRAM", legacy_tools.which("make") or legacy_tools.which("mingw32-make")) - if not make: - raise ConanException("This package needs 'make' in the path to build") - - with chdir(self, self._source_subfolder): - # intentionally not using AutoToolsBuildEnvironment for now - it's broken for clang-cl - if self._is_clanglc: - add_flag("CFLAGS", "-mrtm") - add_flag("CXXFLAGS", "-mrtm") - - targets = ["tbb", "tbbmalloc", "tbbproxy"] - context = legacy_tools.no_op() - if self.settings.compiler == "intel": - context = legacy_tools.intel_compilervars(self) - elif is_msvc(self): - # intentionally not using vcvars for clang-cl yet - context = legacy_tools.vcvars(self) - with context: - self.run("%s %s %s" % (make, extra, " ".join(targets))) + tc.make_args.append("compiler=cl") + elif self._is_clang_cl: + tc.extra_cflags.append("-mrtm") + tc.extra_cxxflags.append("-mrtm") + + tc.generate() + + if self.settings.compiler == "intel-cc": + intelcc = IntelCC(self) + intelcc.generate() + elif is_msvc(self): + # intentionally not using vcvars for clang-cl yet + vcvars = VCVars(self) + vcvars.generate() + + def _patch_sources(self): + # Fix LDFLAGS getting incorrectly applied to ar command + linux_include = os.path.join(self.source_folder, "build", "common_rules.inc") + replace_in_file(self, linux_include, "LIB_LINK_FLAGS += $(LDFLAGS)", "") + # Get the version of the current compiler instead of gcc + linux_include = os.path.join(self.source_folder, "build", "linux.inc") + replace_in_file(self, linux_include, "shell gcc", "shell $(CC)") + replace_in_file(self, linux_include, "= gcc", "= $(CC)") + if self.version != "2019_u9" and self.settings.build_type == "Debug": + replace_in_file(self, os.path.join(self.source_folder, "Makefile"), "release", "debug") + + def build(self): + self._patch_sources() + with chdir(self, self.source_folder): + autotools = Autotools(self) + for target in ["tbb", "tbbmalloc", "tbbproxy"]: + autotools.make(target) def package(self): - copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self._source_subfolder) - copy(self, pattern="*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self._source_subfolder, "include")) - copy(self, pattern="*", dst=os.path.join(self.package_folder, "include", "tbb", "compat"), src=os.path.join(self._source_subfolder, "include", "tbb", "compat")) - build_folder = os.path.join(self._source_subfolder, "build") + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + + copy(self, "*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include")) + copy(self, "*", + dst=os.path.join(self.package_folder, "include", "tbb", "compat"), + src=os.path.join(self.source_folder, "include", "tbb", "compat")) + + build_folder = os.path.join(self.source_folder, "build") build_type = "debug" if self.settings.build_type == "Debug" else "release" - copy(self, pattern=f"*{build_type}*.lib", dst=os.path.join(self.package_folder, "lib"), src=build_folder, keep_path=False) - copy(self, pattern=f"*{build_type}*.a", dst=os.path.join(self.package_folder, "lib"), src=build_folder, keep_path=False) - copy(self, pattern=f"*{build_type}*.dll", dst=os.path.join(self.package_folder, "bin"), src=build_folder, keep_path=False) - copy(self, pattern=f"*{build_type}*.dylib", dst=os.path.join(self.package_folder, "lib"), src=build_folder, keep_path=False) + for extension in ["lib", "a", "dylib"]: + copy(self, f"*{build_type}*.{extension}", + dst=os.path.join(self.package_folder, "lib"), + src=build_folder, keep_path=False) + copy(self, f"*{build_type}*.dll", + dst=os.path.join(self.package_folder, "bin"), + src=build_folder, keep_path=False) + # Copy also .dlls to lib folder so consumers can link against them directly when using MinGW if self.settings.os == "Windows" and self.settings.compiler == "gcc": - copy(self, f"*{build_type}*.dll", dst=os.path.join(self.package_folder, "lib"), src=build_folder, keep_path=False) + copy(self, f"*{build_type}*.dll", + dst=os.path.join(self.package_folder, "lib"), + src=build_folder, keep_path=False) - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"] and self.options.shared: extension = "so" - if self.options.shared: - copy(self, f"*{build_type}*.{extension}.*", dst=os.path.join(self.package_folder, "lib"), src=build_folder, keep_path=False) - outputlibdir = os.path.join(self.package_folder, "lib") - with chdir(self, outputlibdir): - for fpath in os.listdir(outputlibdir): - filepath = fpath[0:fpath.rfind("." + extension) + len(extension) + 1] - self.run(f'ln -s "{fpath}" "{filepath}"', run_environment=True) + copy(self, f"*{build_type}*.{extension}.*", + dst=os.path.join(self.package_folder, "lib"), + src=build_folder, keep_path=False) + # Create libtbb.so.2 -> libtbb.so, etc symlinks + with chdir(self, os.path.join(self.package_folder, "lib")): + for fname in os.listdir("."): + fname_without_version = fname.split(f".{extension}", 1)[0] + f".{extension}" + self.run(f'ln -s "{fname}" "{fname_without_version}"') def package_info(self): self.cpp_info.set_property("cmake_file_name", "TBB") + self.cpp_info.set_property("cmake_target_name", "TBB::TBB") suffix = "_debug" if self.settings.build_type == "Debug" else "" # tbb self.cpp_info.components["libtbb"].set_property("cmake_target_name", "TBB::tbb") - self.cpp_info.components["libtbb"].libs = ["tbb{}".format(suffix)] + self.cpp_info.components["libtbb"].libs = [f"tbb{suffix}"] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["libtbb"].system_libs = ["dl", "rt", "pthread"] + self.cpp_info.components["libtbb"].system_libs = ["m", "dl", "rt", "pthread"] # tbbmalloc if self.options.tbbmalloc: self.cpp_info.components["tbbmalloc"].set_property("cmake_target_name", "TBB::tbbmalloc") - self.cpp_info.components["tbbmalloc"].libs = ["tbbmalloc{}".format(suffix)] + self.cpp_info.components["tbbmalloc"].libs = [f"tbbmalloc{suffix}"] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["tbbmalloc"].system_libs = ["dl", "pthread"] + self.cpp_info.components["tbbmalloc"].system_libs = ["m", "dl", "pthread"] # tbbmalloc_proxy if self.options.tbbproxy: self.cpp_info.components["tbbmalloc_proxy"].set_property("cmake_target_name", "TBB::tbbmalloc_proxy") - self.cpp_info.components["tbbmalloc_proxy"].libs = ["tbbmalloc_proxy{}".format(suffix)] + self.cpp_info.components["tbbmalloc_proxy"].libs = [f"tbbmalloc_proxy{suffix}"] self.cpp_info.components["tbbmalloc_proxy"].requires = ["tbbmalloc"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["tbbmalloc_proxy"].system_libs = ["m"] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.names["cmake_find_package"] = "TBB" diff --git a/recipes/onetbb/2020.x/test_package/CMakeLists.txt b/recipes/onetbb/2020.x/test_package/CMakeLists.txt index d5a40167452f4..2dd759c70dd11 100644 --- a/recipes/onetbb/2020.x/test_package/CMakeLists.txt +++ b/recipes/onetbb/2020.x/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(TBB REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/onetbb/2020.x/test_package/conanfile.py b/recipes/onetbb/2020.x/test_package/conanfile.py index 38f4483872d47..ef5d7042163ec 100644 --- a/recipes/onetbb/2020.x/test_package/conanfile.py +++ b/recipes/onetbb/2020.x/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/onetbb/2020.x/test_v1_package/CMakeLists.txt b/recipes/onetbb/2020.x/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/onetbb/2020.x/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/onetbb/2020.x/test_v1_package/conanfile.py b/recipes/onetbb/2020.x/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..38f4483872d47 --- /dev/null +++ b/recipes/onetbb/2020.x/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/onetbb/all/test_package/CMakeLists.txt b/recipes/onetbb/all/test_package/CMakeLists.txt index f510136a26a97..fbae62535650c 100644 --- a/recipes/onetbb/all/test_package/CMakeLists.txt +++ b/recipes/onetbb/all/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) find_package(TBB REQUIRED CONFIG) diff --git a/recipes/onetbb/all/test_v1_package/CMakeLists.txt b/recipes/onetbb/all/test_v1_package/CMakeLists.txt index 0d20897301b68..b21cc49efde95 100644 --- a/recipes/onetbb/all/test_v1_package/CMakeLists.txt +++ b/recipes/onetbb/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/onetbb/config.yml b/recipes/onetbb/config.yml index 7995868f434ad..7a33bda288759 100644 --- a/recipes/onetbb/config.yml +++ b/recipes/onetbb/config.yml @@ -9,6 +9,8 @@ versions: folder: all "2021.3.0": folder: all + "2020.3.3": + folder: "2020.x" "2020.3": folder: "2020.x" "2020.2": From 6a5fee9b18f66cd840da22bb0c334f6f5c28cfb4 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 19 Aug 2023 18:26:24 +0300 Subject: [PATCH 308/637] (#18756) quickfix: migrate to Conan v2 * quickfix: migrate to Conan v2 * quickfix: revert to collect_libs() for Windows on v1 * quickfix: restore VirtualRunEnv in test_package * quickfix: bump deps --------- Co-authored-by: Carlos Zoido --- recipes/quickfix/all/conandata.yml | 9 -- recipes/quickfix/all/conanfile.py | 138 ++++++++++-------- ...ake-version-add-conan-basic-setup-an.patch | 4 +- .../quickfix/all/test_package/CMakeLists.txt | 7 +- .../quickfix/all/test_package/conanfile.py | 22 ++- .../all/test_v1_package/CMakeLists.txt | 8 + .../quickfix/all/test_v1_package/conanfile.py | 18 +++ 7 files changed, 124 insertions(+), 82 deletions(-) create mode 100644 recipes/quickfix/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/quickfix/all/test_v1_package/conanfile.py diff --git a/recipes/quickfix/all/conandata.yml b/recipes/quickfix/all/conandata.yml index 863c20f1e79d6..bec3ce0e03d95 100644 --- a/recipes/quickfix/all/conandata.yml +++ b/recipes/quickfix/all/conandata.yml @@ -5,20 +5,11 @@ sources: patches: "1.15.1": - patch_file: "patches/0001-Fix-build-for-C-17-replace-throw-.-with-EXCEPT.patch" - base_path: "source_subfolder" - patch_file: "patches/0002-except-copy.patch" - base_path: "source_subfolder" - patch_file: "patches/0003-fix-condition-for-using-tr1-namespace.patch" - base_path: "source_subfolder" - patch_file: "patches/0004-remove-tests-from-compilatin-unit-performance-and-ac.patch" - base_path: "source_subfolder" - patch_file: "patches/0005-inc.-required-CMake-version-add-conan-basic-setup-an.patch" - base_path: "source_subfolder" - patch_file: "patches/0006-manage-postgres-through-conan.patch" - base_path: "source_subfolder" - patch_file: "patches/0007-add-support-to-static-libraries-for-non-windows-buil.patch" - base_path: "source_subfolder" - patch_file: "patches/0008-manage-mysql-through-conan.patch" - base_path: "source_subfolder" - patch_file: "patches/0009-downgrade-cmake-minimum-required.patch" - base_path: "source_subfolder" diff --git a/recipes/quickfix/all/conanfile.py b/recipes/quickfix/all/conanfile.py index c5c614561ff61..adfbbac153de5 100644 --- a/recipes/quickfix/all/conanfile.py +++ b/recipes/quickfix/all/conanfile.py @@ -1,48 +1,42 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, collect_libs + +required_conan_version = ">=1.53.0" + class QuickfixConan(ConanFile): name = "quickfix" + description = "QuickFIX is a free and open source implementation of the FIX protocol" license = "The QuickFIX Software License, Version 1.0" url = "https://github.com/conan-io/conan-center-index" homepage = "http://www.quickfixengine.org" - description = "QuickFIX is a free and open source implementation of the FIX protocol" - topics = ("conan", "QuickFIX", "FIX", "Financial Information Exchange", "libraries", "cpp") - settings = "os", "compiler", "build_type", "arch" - options = {"fPIC": [True, False], - "shared": [True, False], - "with_ssl": [True, False], - "with_postgres": [True, False], - "with_mysql": [None, "libmysqlclient"]} - default_options = {"fPIC": True, - "shared": False, - "with_ssl": False, - "with_postgres": False, - "with_mysql": None} - generators = "cmake" - exports_sources = "patches/**" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - - def requirements(self): - if self.options.with_ssl: - self.requires("openssl/1.1.1q") - - if self.options.with_postgres: - self.requires("libpq/14.2") - - if self.options.with_mysql == "libmysqlclient": - self.requires("libmysqlclient/8.0.29") + topics = ("FIX", "Financial Information Exchange", "libraries", "cpp") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_ssl": [True, False], + "with_postgres": [True, False], + "with_mysql": [None, "libmysqlclient"], + } + default_options = { + "shared": False, + "fPIC": True, + "with_ssl": False, + "with_postgres": False, + "with_mysql": None, + } + + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -50,43 +44,67 @@ def config_options(self): 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): + if self.options.with_ssl: + self.requires("openssl/[>=1.1 <4]") + + if self.options.with_postgres: + self.requires("libpq/15.3") + + if self.options.with_mysql == "libmysqlclient": + self.requires("libmysqlclient/8.0.31") def validate(self): if self.settings.os == "Windows" and self.options.shared: raise ConanInvalidConfiguration("QuickFIX cannot be built as shared lib on Windows") - if self.settings.os == "Macos" and self.settings.arch == "armv8": - raise ConanInvalidConfiguration("QuickFIX doesn't support ARM compilation") # See issue: https://github.com/quickfix/quickfix/issues/206 + if is_apple_os(self) and self.settings.arch == "armv8": + # See issue: https://github.com/quickfix/quickfix/issues/206 + raise ConanInvalidConfiguration("QuickFIX doesn't support ARM compilation") - def source(self): - tools.get(**self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True) + def build_requirements(self): + self.tool_requires("cmake/[>=3.16 <4]") - def _configure_cmake(self): - if not self._cmake: - self._cmake = CMake(self) - self._cmake.definitions["HAVE_SSL"] = self.options.with_ssl - self._cmake.definitions["HAVE_POSTGRESQL"] = self.options.with_postgres - self._cmake.definitions["HAVE_MYSQL"] = bool(self.options.with_mysql) - self._cmake.configure(source_folder=self._source_subfolder, build_folder=self._build_subfolder) - return self._cmake + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = CMakeToolchain(self) + tc.variables["HAVE_SSL"] = self.options.with_ssl + tc.variables["HAVE_POSTGRESQL"] = self.options.with_postgres + tc.variables["HAVE_MYSQL"] = bool(self.options.with_mysql) + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) - - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build(target="quickfix") def package(self): - cmake = self._configure_cmake() + cmake = CMake(self) cmake.install() - self.copy("config.h", dst=os.path.join("include", "quickfix"), src=self._build_subfolder) - self.copy("Except.h", dst="include", src=os.path.join(self._source_subfolder, "src", "C++")) - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - tools.rmdir(os.path.join(self.package_folder, "share")) + copy(self, "config.h", + dst=os.path.join(self.package_folder, "include", "quickfix"), + src=self.build_folder) + copy(self, "Except.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "src", "C++")) + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): - self.cpp_info.libs = tools.collect_libs(self) + self.cpp_info.libs = collect_libs(self) if self.options.with_ssl: self.cpp_info.defines.append("HAVE_SSL=1") diff --git a/recipes/quickfix/all/patches/0005-inc.-required-CMake-version-add-conan-basic-setup-an.patch b/recipes/quickfix/all/patches/0005-inc.-required-CMake-version-add-conan-basic-setup-an.patch index 3480935d8cd0e..fbea88ec0b6c1 100644 --- a/recipes/quickfix/all/patches/0005-inc.-required-CMake-version-add-conan-basic-setup-an.patch +++ b/recipes/quickfix/all/patches/0005-inc.-required-CMake-version-add-conan-basic-setup-an.patch @@ -25,8 +25,8 @@ index 48908ead..8789432c 100644 endif() project(${quickfix_PROJECT_NAME} VERSION 0.1 LANGUAGES CXX C) -+include(${PROJECT_BINARY_DIR}/../conanbuildinfo.cmake) -+conan_basic_setup() ++ ++ message("-- Project name ${CMAKE_PROJECT_NAME}") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") diff --git a/recipes/quickfix/all/test_package/CMakeLists.txt b/recipes/quickfix/all/test_package/CMakeLists.txt index 57cf0bfd3debb..59fa2d07ab926 100644 --- a/recipes/quickfix/all/test_package/CMakeLists.txt +++ b/recipes/quickfix/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(PackageTest CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(quickfix REQUIRED CONFIG) add_executable(executor ${PROJECT_SOURCE_DIR}/executor.cpp) -target_link_libraries(executor ${CONAN_LIBS}) +target_link_libraries(executor PRIVATE quickfix::quickfix) diff --git a/recipes/quickfix/all/test_package/conanfile.py b/recipes/quickfix/all/test_package/conanfile.py index a68d648c5c5b5..bf3ebab04211e 100644 --- a/recipes/quickfix/all/test_package/conanfile.py +++ b/recipes/quickfix/all/test_package/conanfile.py @@ -1,11 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" -class QuickfixTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "executor") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "executor") + self.run(bin_path, env="conanrun") diff --git a/recipes/quickfix/all/test_v1_package/CMakeLists.txt b/recipes/quickfix/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/quickfix/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/quickfix/all/test_v1_package/conanfile.py b/recipes/quickfix/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..3148dc9605e6c --- /dev/null +++ b/recipes/quickfix/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class QuickfixTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "executor") + self.run(bin_path, run_environment=True) From a55a137d76b14f3f1693df04af7d780bdb3e5825 Mon Sep 17 00:00:00 2001 From: tt4g <45120617+tt4g@users.noreply.github.com> Date: Sun, 20 Aug 2023 00:48:30 +0900 Subject: [PATCH 309/637] (#18857) libpqxx: add version 7.8.0 * libpqxx: add version 7.8.0 * libpqxx: fix build on C++17 * libpqxx: fix conandata.yml format * libpqxx: build only static or shared library * libpqxx: Fix MSVC 2022 compile error An older version could not be built by MSVC 2022. Since the compile error was avoided by a change made in another task, only the relevant change is imported in the patch. --- recipes/libpqxx/all/conandata.yml | 75 +++++++++++++++++++ recipes/libpqxx/all/conanfile.py | 6 ++ ...fix-alternative-operator-error-7.8.0.patch | 24 ++++++ .../patches/stop-using-strnlen-7.2.1.patch | 28 +++++++ .../patches/stop-using-strnlen-7.3.2.patch | 28 +++++++ .../patches/stop-using-strnlen-7.4.2.patch | 28 +++++++ recipes/libpqxx/config.yml | 2 + 7 files changed, 191 insertions(+) create mode 100644 recipes/libpqxx/all/patches/fix-alternative-operator-error-7.8.0.patch create mode 100644 recipes/libpqxx/all/patches/stop-using-strnlen-7.2.1.patch create mode 100644 recipes/libpqxx/all/patches/stop-using-strnlen-7.3.2.patch create mode 100644 recipes/libpqxx/all/patches/stop-using-strnlen-7.4.2.patch diff --git a/recipes/libpqxx/all/conandata.yml b/recipes/libpqxx/all/conandata.yml index a8a8be54d6643..9d9a75993b026 100644 --- a/recipes/libpqxx/all/conandata.yml +++ b/recipes/libpqxx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "7.8.0": + url: "https://github.com/jtv/libpqxx/archive/refs/tags/7.8.0.tar.gz" + sha256: "bc471d8d34588f820f38e19e1cc217f399212eef900416cf12f90fab293628af" "7.7.5": url: "https://github.com/jtv/libpqxx/archive/refs/tags/7.7.5.tar.gz" sha256: "c7dc3e8fa2eee656f2b6a8179d72f15db10e97a80dc4f173f806e615ea990973" @@ -42,39 +45,111 @@ sources: url: "https://github.com/jtv/libpqxx/archive/6.4.8.tar.gz" sha256: "3f7aba951822e01f1b9f9f353702954773323dd9f9dc376ffb57cb6bbd9a7a2f" patches: + "7.8.0": + - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" + - patch_file: "patches/fix-alternative-operator-error-7.8.0.patch" + patch_source: "https://github.com/jtv/libpqxx/pull/714" + patch_description: "Fix a bug undeclared identifier alternative operator." + patch_type: "bugfix" "7.7.5": - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" "7.7.4": - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" "7.7.3": - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" "7.7.2": - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" - patch_file: "patches/fix-install-library-symlink-7.7.2.patch" + patch_source: "https://github.com/jtv/libpqxx/pull/552" + patch_description: "Fix install library symlink error." + patch_type: "bugfix" "7.7.0": - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" - patch_file: "patches/fix-clang-compilation-7.7.0.patch" + patch_source: "https://github.com/jtv/libpqxx/pull/519" + patch_description: "Fix clang compile error." + patch_type: "bugfix" "7.6.1": - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" - patch_file: "patches/fix-inline-constexpr-local-variable-problem-7.6.0.patch" + patch_source: "https://github.com/jtv/libpqxx/pull/468" + patch_description: "Fixed a problem that some compilers did not allow `inline constexpr` local variable declarations." + patch_type: "bugfix" - patch_file: "patches/fix-remove-unlikely-annotation-before-return-7.6.0_to_7.6.1.patch" + patch_source: "https://github.com/jtv/libpqxx/pull/476" + patch_description: "fix: Remove `unlikely` annotation before `return`" + patch_type: "bugfix" "7.6.0": - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" - patch_file: "patches/fix-inline-constexpr-local-variable-problem-7.6.0.patch" + patch_source: "https://github.com/jtv/libpqxx/pull/468" + patch_description: "Fixed a problem that some compilers did not allow `inline constexpr` local variable declarations." + patch_type: "bugfix" - patch_file: "patches/fix-remove-unlikely-annotation-before-return-7.6.0_to_7.6.1.patch" + patch_source: "https://github.com/jtv/libpqxx/pull/476" + patch_description: "fix: Remove `unlikely` annotation before `return`" + patch_type: "bugfix" "7.5.3": - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" "7.4.2": - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" + - patch_file: "patches/stop-using-strnlen-7.4.2.patch" + patch_source: "https://github.com/jtv/libpqxx/commit/df30e186e148acb031244ed0ab1151731d3501a4" + patch_description: "Fix MSVC 2022 compile error: '<': no operator found which takes a right-hand operand of type 'std::_String_view_iterator<_Traits>'" + patch_type: "bugfix" "7.3.2": - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" - patch_file: "patches/fix-msvc-compilation-7.3.1.patch" + patch_source: "https://github.com/jtv/libpqxx/pull/406" + patch_description: "Fix a bug that syntax error on Visual Studio 2017" + patch_type: "bugfix" + - patch_file: "patches/stop-using-strnlen-7.3.2.patch" + patch_source: "https://github.com/jtv/libpqxx/commit/df30e186e148acb031244ed0ab1151731d3501a4" + patch_description: "Fix MSVC 2022 compile error: '<': no operator found which takes a right-hand operand of type 'std::_String_view_iterator<_Traits>'" + patch_type: "bugfix" "7.2.1": - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" + - patch_file: "patches/stop-using-strnlen-7.2.1.patch" + patch_source: "https://github.com/jtv/libpqxx/commit/df30e186e148acb031244ed0ab1151731d3501a4" + patch_description: "Fix MSVC 2022 compile error: '<': no operator found which takes a right-hand operand of type 'std::_String_view_iterator<_Traits>'" + patch_type: "bugfix" "7.1.2": - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" "7.0.7": - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" - patch_file: "patches/fix-not-declared-dumb_stringstream-7.0.6_to_7.0.7.patch" + patch_source: "https://github.com/jtv/libpqxx/commit/0e81d36f522093d7215b3792f1c62dcd06a34ad1" + patch_description: "Fix 'dumb_stringstream' was not declared." + patch_type: "bugfix" "6.4.8": - patch_file: "patches/0001-cmake-fix-module-6.4.8.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" diff --git a/recipes/libpqxx/all/conanfile.py b/recipes/libpqxx/all/conanfile.py index ef9bfe326bc0a..2c06284a7d4d7 100644 --- a/recipes/libpqxx/all/conanfile.py +++ b/recipes/libpqxx/all/conanfile.py @@ -104,6 +104,12 @@ def generate(self): tc.variables["BUILD_TEST"] = False # Set `-mmacosx-version-min` to enable C++17 standard library support. tc.variables["CMAKE_OSX_DEPLOYMENT_TARGET"] = self._mac_os_minimum_required_version + if Version(self.version) < "7.0": + if self.options.shared: + tc.variables["SKIP_PQXX_STATIC"] = True + else: + tc.variables["SKIP_PQXX_SHARED"] = True + tc.generate() deps = CMakeDeps(self) diff --git a/recipes/libpqxx/all/patches/fix-alternative-operator-error-7.8.0.patch b/recipes/libpqxx/all/patches/fix-alternative-operator-error-7.8.0.patch new file mode 100644 index 0000000000000..9a792a2cc015e --- /dev/null +++ b/recipes/libpqxx/all/patches/fix-alternative-operator-error-7.8.0.patch @@ -0,0 +1,24 @@ +Fix a bug undeclared identifier alternative operator (https://github.com/jtv/libpqxx/pull/714) +diff --git a/include/pqxx/internal/header-pre.hxx b/include/pqxx/internal/header-pre.hxx +index 595a53b4..9d4c60e7 100644 +--- a/include/pqxx/internal/header-pre.hxx ++++ b/include/pqxx/internal/header-pre.hxx +@@ -58,6 +58,18 @@ + // Workarounds & definitions that need to be included even in library's headers + #include "pqxx/config-public-compiler.h" + ++#if defined(_MSC_VER) ++# define PQXX_CPLUSPLUS _MSVC_LANG ++#else ++# define PQXX_CPLUSPLUS __cplusplus ++#endif ++ ++// C++20: No longer needed. ++// Enable ISO-646 alternative operaotr representations: "and" instead of "&&" ++// etc. on older compilers. C++20 removes this header. ++#if PQXX_CPLUSPLUS <= 201703L && __has_include() ++# include ++#endif + + #if defined(PQXX_HAVE_GCC_PURE) + /// Declare function "pure": no side effects, only reads globals and its args. diff --git a/recipes/libpqxx/all/patches/stop-using-strnlen-7.2.1.patch b/recipes/libpqxx/all/patches/stop-using-strnlen-7.2.1.patch new file mode 100644 index 0000000000000..39e7b4ab81e4e --- /dev/null +++ b/recipes/libpqxx/all/patches/stop-using-strnlen-7.2.1.patch @@ -0,0 +1,28 @@ +diff --git a/src/strconv.cxx b/src/strconv.cxx +index 4339625e..200b416a 100644 +--- a/src/strconv.cxx ++++ b/src/strconv.cxx +@@ -265,18 +265,18 @@ namespace + template + [[maybe_unused]] inline TYPE from_string_arithmetic(std::string_view in) + { +- char const *begin; ++ char const *here; ++ auto const end{in.data() + std::size(in)}; + + // Skip whitespace. This is not the proper way to do it, but I see no way + // that any of the supported encodings could ever produce a valid character + // whose byte sequence would confuse this code. +- for (begin = in.data(); +- begin < std::end(in) and (*begin == ' ' or *begin == '\t'); ++begin) ++ for (here = in.data(); ++ here < end and (*here == ' ' or *here == '\t'); ++here) + ; + +- auto const end{in.data() + std::size(in)}; + TYPE out; +- auto const res{std::from_chars(begin, end, out)}; ++ auto const res{std::from_chars(here, end, out)}; + if (res.ec == std::errc() and res.ptr == end) + return out; + diff --git a/recipes/libpqxx/all/patches/stop-using-strnlen-7.3.2.patch b/recipes/libpqxx/all/patches/stop-using-strnlen-7.3.2.patch new file mode 100644 index 0000000000000..5602c77e030c6 --- /dev/null +++ b/recipes/libpqxx/all/patches/stop-using-strnlen-7.3.2.patch @@ -0,0 +1,28 @@ +diff --git a/src/strconv.cxx b/src/strconv.cxx +index d82e5c53..ee1628ff 100644 +--- a/src/strconv.cxx ++++ b/src/strconv.cxx +@@ -264,18 +264,18 @@ namespace + template + [[maybe_unused]] inline TYPE from_string_arithmetic(std::string_view in) + { +- char const *begin; ++ char const *here; ++ auto const end{in.data() + std::size(in)}; + + // Skip whitespace. This is not the proper way to do it, but I see no way + // that any of the supported encodings could ever produce a valid character + // whose byte sequence would confuse this code. +- for (begin = in.data(); +- begin < std::end(in) and (*begin == ' ' or *begin == '\t'); ++begin) ++ for (here = in.data(); ++ here < end and (*here == ' ' or *here == '\t'); ++here) + ; + +- auto const end{in.data() + std::size(in)}; + TYPE out; +- auto const res{std::from_chars(begin, end, out)}; ++ auto const res{std::from_chars(here, end, out)}; + if (res.ec == std::errc() and res.ptr == end) + return out; + diff --git a/recipes/libpqxx/all/patches/stop-using-strnlen-7.4.2.patch b/recipes/libpqxx/all/patches/stop-using-strnlen-7.4.2.patch new file mode 100644 index 0000000000000..0c628fb55fdff --- /dev/null +++ b/recipes/libpqxx/all/patches/stop-using-strnlen-7.4.2.patch @@ -0,0 +1,28 @@ +diff --git a/src/strconv.cxx b/src/strconv.cxx +index ea4d3c82..08d645eb 100644 +--- a/src/strconv.cxx ++++ b/src/strconv.cxx +@@ -264,18 +264,18 @@ namespace + template + [[maybe_unused]] inline TYPE from_string_arithmetic(std::string_view in) + { +- char const *begin; ++ char const *here; ++ auto const end{in.data() + std::size(in)}; + + // Skip whitespace. This is not the proper way to do it, but I see no way + // that any of the supported encodings could ever produce a valid character + // whose byte sequence would confuse this code. +- for (begin = in.data(); +- begin < std::end(in) and (*begin == ' ' or *begin == '\t'); ++begin) ++ for (here = in.data(); ++ here < end and (*here == ' ' or *here == '\t'); ++here) + ; + +- auto const end{in.data() + std::size(in)}; + TYPE out; +- auto const res{std::from_chars(begin, end, out)}; ++ auto const res{std::from_chars(here, end, out)}; + if (res.ec == std::errc() and res.ptr == end) + return out; + diff --git a/recipes/libpqxx/config.yml b/recipes/libpqxx/config.yml index 96d5c5cc00956..9ea1691e88502 100644 --- a/recipes/libpqxx/config.yml +++ b/recipes/libpqxx/config.yml @@ -1,4 +1,6 @@ versions: + "7.8.0": + folder: all "7.7.5": folder: all "7.7.4": From 003f526787e31440b1ac9b8b92f6e3d2a47d54a6 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Sat, 19 Aug 2023 18:46:02 +0200 Subject: [PATCH 310/637] (#18498) gdal/pre_3.5.0: bump deps, remove old versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gdal/pre_3.5.0: bump deps * gdal: remove old versions * fix test_package * gdal/pre_3.5.0: bump deps * bump deps --------- Co-authored-by: Rubén Rincón Blanco --- recipes/gdal/config.yml | 4 - recipes/gdal/pre_3.5.0/conandata.yml | 20 -- recipes/gdal/pre_3.5.0/conanfile.py | 24 +- .../patches/3.1.x/fix-autotools-3.1.4.patch | 283 ---------------- .../patches/3.1.x/fix-import-dll-msvc.patch | 15 - .../patches/3.1.x/fix-include-jsonc.patch | 104 ------ .../patches/3.1.x/fix-include-podofo.patch | 11 - .../3.1.x/fix-include-xerces-3.1.2.patch | 63 ---- .../patches/3.1.x/fix-nmake-common.patch | 165 ---------- .../patches/3.1.x/fix-nmake-opt-3.1.2.patch | 14 - .../patches/3.2.x/fix-autotools.patch | 304 ------------------ .../patches/3.2.x/fix-include-jsonc.patch | 104 ------ .../patches/3.2.x/fix-include-podofo.patch | 11 - .../patches/3.2.x/fix-include-xerces.patch | 63 ---- .../pre_3.5.0/patches/3.2.x/fix-nmake.patch | 179 ----------- .../gdal/pre_3.5.0/test_package/conanfile.py | 5 +- 16 files changed, 15 insertions(+), 1354 deletions(-) delete mode 100644 recipes/gdal/pre_3.5.0/patches/3.1.x/fix-autotools-3.1.4.patch delete mode 100644 recipes/gdal/pre_3.5.0/patches/3.1.x/fix-import-dll-msvc.patch delete mode 100644 recipes/gdal/pre_3.5.0/patches/3.1.x/fix-include-jsonc.patch delete mode 100644 recipes/gdal/pre_3.5.0/patches/3.1.x/fix-include-podofo.patch delete mode 100644 recipes/gdal/pre_3.5.0/patches/3.1.x/fix-include-xerces-3.1.2.patch delete mode 100644 recipes/gdal/pre_3.5.0/patches/3.1.x/fix-nmake-common.patch delete mode 100644 recipes/gdal/pre_3.5.0/patches/3.1.x/fix-nmake-opt-3.1.2.patch delete mode 100644 recipes/gdal/pre_3.5.0/patches/3.2.x/fix-autotools.patch delete mode 100644 recipes/gdal/pre_3.5.0/patches/3.2.x/fix-include-jsonc.patch delete mode 100644 recipes/gdal/pre_3.5.0/patches/3.2.x/fix-include-podofo.patch delete mode 100644 recipes/gdal/pre_3.5.0/patches/3.2.x/fix-include-xerces.patch delete mode 100644 recipes/gdal/pre_3.5.0/patches/3.2.x/fix-nmake.patch diff --git a/recipes/gdal/config.yml b/recipes/gdal/config.yml index da2f4dc3a9cab..a2ce278d92965 100644 --- a/recipes/gdal/config.yml +++ b/recipes/gdal/config.yml @@ -11,7 +11,3 @@ versions: folder: "pre_3.5.0" "3.3.3": folder: "pre_3.5.0" - "3.2.3": - folder: "pre_3.5.0" - "3.1.4": - folder: "pre_3.5.0" diff --git a/recipes/gdal/pre_3.5.0/conandata.yml b/recipes/gdal/pre_3.5.0/conandata.yml index 4ca595dd10256..49983edc62730 100644 --- a/recipes/gdal/pre_3.5.0/conandata.yml +++ b/recipes/gdal/pre_3.5.0/conandata.yml @@ -8,12 +8,6 @@ sources: "3.3.3": url: "https://github.com/OSGeo/gdal/releases/download/v3.3.3/gdal-3.3.3.tar.gz" sha256: "28925ea4717b02185ee208bfc121a94fa0bc1dfe9cb862fd3868c2a0394d605a" - "3.2.3": - url: "https://github.com/OSGeo/gdal/releases/download/v3.2.3/gdal-3.2.3.tar.gz" - sha256: "86a35aad60a1eb87c2c0c145f9bccd83a47c4781254544ed5246f64d55ee1f18" - "3.1.4": - url: "https://github.com/OSGeo/gdal/releases/download/v3.1.4/gdal-3.1.4.tar.gz" - sha256: "5f09ea6ca797e296b608d261e08e18ffa43a12fa28d460ae139d2a026ee2b0c0" patches: "3.4.3": - patch_file: "patches/3.4.x/fix-autotools-3.4.3.patch" @@ -33,17 +27,3 @@ patches: - patch_file: "patches/3.3.x/fix-include-jsonc.patch" - patch_file: "patches/3.3.x/fix-include-xerces.patch" - patch_file: "patches/3.3.x/fix-include-podofo.patch" - "3.2.3": - - patch_file: "patches/3.2.x/fix-autotools.patch" - - patch_file: "patches/3.2.x/fix-nmake.patch" - - patch_file: "patches/3.2.x/fix-include-jsonc.patch" - - patch_file: "patches/3.2.x/fix-include-xerces.patch" - - patch_file: "patches/3.2.x/fix-include-podofo.patch" - "3.1.4": - - patch_file: "patches/3.1.x/fix-autotools-3.1.4.patch" - - patch_file: "patches/3.1.x/fix-nmake-common.patch" - - patch_file: "patches/3.1.x/fix-nmake-opt-3.1.2.patch" - - patch_file: "patches/3.1.x/fix-import-dll-msvc.patch" - - patch_file: "patches/3.1.x/fix-include-jsonc.patch" - - patch_file: "patches/3.1.x/fix-include-xerces-3.1.2.patch" - - patch_file: "patches/3.1.x/fix-include-podofo.patch" diff --git a/recipes/gdal/pre_3.5.0/conanfile.py b/recipes/gdal/pre_3.5.0/conanfile.py index 7ecdfb6713c6a..65bbd7d92d812 100644 --- a/recipes/gdal/pre_3.5.0/conanfile.py +++ b/recipes/gdal/pre_3.5.0/conanfile.py @@ -246,21 +246,21 @@ def layout(self): self.folders.build = self.folders.source def requirements(self): - self.requires("json-c/0.16") + self.requires("json-c/0.17") self.requires("libgeotiff/1.7.1") # self.requires("libopencad/0.0.2") # TODO: use conan recipe when available instead of internal one - self.requires("libtiff/4.4.0") - self.requires("proj/9.1.1") + self.requires("libtiff/4.5.1") + self.requires("proj/9.2.1") if Version(self.version) >= "3.1.0": self.requires("flatbuffers/2.0.5") if self.options.get_safe("with_zlib", True): self.requires("zlib/1.2.13") if self.options.get_safe("with_libdeflate"): - self.requires("libdeflate/1.17") + self.requires("libdeflate/1.18") if self.options.with_libiconv: self.requires("libiconv/1.17") if self.options.get_safe("with_zstd"): - self.requires("zstd/1.5.2") + self.requires("zstd/1.5.5") if self.options.get_safe("with_blosc"): self.requires("c-blosc/1.21.3") if self.options.get_safe("with_lz4"): @@ -274,7 +274,7 @@ def requirements(self): # if self.options.with_pcraster: # self.requires("pcraster-rasterformat/1.3.2") if self.options.get_safe("with_png", True): - self.requires("libpng/1.6.39") + self.requires("libpng/1.6.40") if self.options.with_dds: self.requires("crunch/cci.20190615") if self.options.with_gta: @@ -284,7 +284,7 @@ def requirements(self): if self.options.with_jpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_jpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/2.1.4") + self.requires("libjpeg-turbo/3.0.0") elif self.options.with_jpeg == "mozjpeg": self.requires("mozjpeg/4.1.1") if self.options.with_charls: @@ -326,13 +326,13 @@ def requirements(self): # if self.options.with_dods_root: # self.requires("libdap/3.20.6") if self.options.with_curl: - self.requires("libcurl/7.87.0") + self.requires("libcurl/8.2.1") if self.options.with_xml2: self.requires("libxml2/2.10.3") # if self.options.with_spatialite: # self.requires("libspatialite/4.3.0a") if self.options.get_safe("with_sqlite3"): - self.requires("sqlite3/3.40.1") + self.requires("sqlite3/3.42.0") # if self.options.with_rasterlite2: # self.requires("rasterlite2/x.x.x") if self.options.get_safe("with_pcre"): @@ -340,7 +340,7 @@ def requirements(self): if self.options.get_safe("with_pcre2"): self.requires("pcre2/10.42") if self.options.with_webp: - self.requires("libwebp/1.3.0") + self.requires("libwebp/1.3.1") if self.options.with_geos: self.requires("geos/3.11.1") # if self.options.with_sfcgal: @@ -367,11 +367,11 @@ def requirements(self): if self.options.with_cryptopp: self.requires("cryptopp/8.7.0") if self.options.with_crypto: - self.requires("openssl/1.1.1s") + self.requires("openssl/1.1.1u") # if not self.options.without_lerc: # self.requires("lerc/2.1") # TODO: use conan recipe (not possible yet because lerc API is broken for GDAL) if self.options.get_safe("with_exr"): - self.requires("openexr/3.1.5") + self.requires("openexr/3.1.9") if self.options.get_safe("with_heif"): self.requires("libheif/1.13.0") diff --git a/recipes/gdal/pre_3.5.0/patches/3.1.x/fix-autotools-3.1.4.patch b/recipes/gdal/pre_3.5.0/patches/3.1.x/fix-autotools-3.1.4.patch deleted file mode 100644 index 974146f6a3f7a..0000000000000 --- a/recipes/gdal/pre_3.5.0/patches/3.1.x/fix-autotools-3.1.4.patch +++ /dev/null @@ -1,283 +0,0 @@ ---- a/GDALmake.opt.in -+++ b/GDALmake.opt.in -@@ -601,7 +601,7 @@ endif - - ifeq ($(HAVE_LIBTOOL), yes) - --CONFIG_LIBS = $(GDAL_ROOT)/$(LIBGDAL) -+CONFIG_LIBS = $(GDAL_ROOT)/$(LIBGDAL) $(LIBS) - ifeq ($(MACOSX_FRAMEWORK),yes) - CONFIG_LIBS_INS = -L$(INST_LIB)/unix/lib -lgdal - else ---- a/configure.ac -+++ b/configure.ac -@@ -1214,6 +1214,7 @@ dnl --------------------------------------------------------------------------- - dnl PROJ.6 related stuff - dnl --------------------------------------------------------------------------- - -+PKG_PROG_PKG_CONFIG([0.21]) - AC_MSG_CHECKING([for PROJ >= 6 library]) - - AC_ARG_WITH(proj,[ --with-proj=ARG Compile with PROJ.x (ARG=yes or path)],,) -@@ -1229,11 +1230,7 @@ if test "x$with_proj" = "xno" ; then - else - - if test "x$with_proj" = "xyes" -o "x$with_proj" = "x"; then -- ORIG_LIBS="$LIBS" -- LIBS="-lproj $ORIG_LIBS" -- AC_LANG_PUSH([C++]) -- AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) -- AC_LANG_POP([C++]) -+ PROJ_FOUND=yes - if test "$PROJ_FOUND" = "no"; then - AC_LANG_PUSH([C++]) - AC_CHECK_LIB(proj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) -@@ -1876,7 +1873,6 @@ else - - DDS_SETTING=yes - CRUNCHDIR="$with_dds" -- LIBS="-L$with_dds/lib/ -lcrunch $LIBS" - echo "using libcrunch from $with_dds." - - fi -@@ -2012,7 +2008,7 @@ else - AC_MSG_RESULT([using libtiff from ${with_libtiff}.]) - - dnl Check for the BigTIFF enabled library (libtiff >= 4.0) -- AC_CHECK_LIB(tiff,TIFFScanlineSize64,HAVE_BIGTIFF=yes,HAVE_BIGTIFF=no,) -+ AC_CHECK_LIB(tiff,TIFFScanlineSize64,HAVE_BIGTIFF=yes,HAVE_BIGTIFF=no,$LIBS) - - fi - -@@ -2082,7 +2078,6 @@ else - - dnl We now require libgeotiff 1.5.0 - dnl first check if $with_geotiff/lib has the library: -- AC_CHECK_LIB(geotiff,GTIFAttachPROJContext,GEOTIFF_SETTING=external,GEOTIFF_SETTING=not_found,-L$with_geotiff/lib) - - if test $GEOTIFF_SETTING = "external" ; then - LIBS="-L$with_geotiff/lib -lgeotiff $LIBS" -@@ -2650,6 +2645,10 @@ if test x"$with_hdf4" = x"no" ; then - - echo "hdf4 support disabled." - -+elif test x"$with_hdf4" = x"yes" ; then -+ PKG_CHECK_MODULES([HDF4], [hdf], [HAVE_HDF4=yes], [AC_MSG_ERROR([hdf4 not found...])]) -+ PKG_CHECK_MODULES([HDF4], [hdf >= 4.2.5], [HDF4_HAS_MAXOPENFILES=yes], [HDF4_HAS_MAXOPENFILES=no]) -+ HDF4_INCLUDE="$HDF4_CFLAGS" - else - - if test x"$with_hdf4" = x"yes" -o x"$with_hdf4" = x"" ; then -@@ -2780,7 +2779,6 @@ elif test "$with_hdf5" = "yes" -o "$with_hdf5" = "" ; then - # Test that the package found is for the right architecture - saved_LIBS="$LIBS" - LIBS="$HDF5_LIBS" -- AC_CHECK_LIB(hdf5,H5Fopen, [HAVE_HDF5=yes], [HAVE_HDF5=no]) - LIBS="$saved_LIBS" - - if test "$HAVE_HDF5" = "yes"; then -@@ -2849,21 +2847,21 @@ KEA_CONFIG=no - - AC_ARG_WITH(kea,[ --with-kea[=ARG] Include kealib (ARG=path to kea-config) [[default=yes]]],,) - -+AC_MSG_CHECKING([for kea]) - if test "$with_kea" = "yes" -o "x$with_kea" = "x" ; then -- AC_PATH_PROG(KEA_CONFIG, kea-config, no) -+ HAVE_KEA=yes -+ AC_MSG_RESULT([yes]) - else -- KEA_CONFIG=$with_kea -+ HAVE_KEA=no -+ AC_MSG_RESULT([no]) - fi - --AC_MSG_CHECKING([for kea]) - - if test "$KEA_CONFIG" = "no" ; then - -- HAVE_KEA=no - KEA_LIB= - KEA_INC= - -- AC_MSG_RESULT([no]) - - else - if test -d $KEA_CONFIG ; then -@@ -3715,18 +3713,15 @@ MYSQL_CONFIG=no - AC_ARG_WITH(mysql,[ --with-mysql[=ARG] Include MySQL (ARG=path to mysql_config) [[default=no]]],,) - - if test "$with_mysql" = "yes" ; then -- AC_PATH_PROG(MYSQL_CONFIG, mysql_config, no) -+ HAVE_MYSQL=yes - else -- if test "x$with_mysql" != "x" ; then -- MYSQL_CONFIG=$with_mysql -- fi -+ HAVE_MYSQL=no - fi - - AC_MSG_CHECKING([for MySQL]) - - if test "$MYSQL_CONFIG" = "no" ; then - -- HAVE_MYSQL=no - MYSQL_LIB= - MYSQL_INC= - -@@ -3820,8 +3815,11 @@ dnl Check for Expat configuration. - dnl --------------------------------------------------------------------------- - - dnl Expat 1.95.0 released in 2000-09-28 --EXPAT_REQ_VERSION="1.95.0" --AX_LIB_EXPAT($EXPAT_REQ_VERSION) -+# AX_LIB_EXPAT is too fragile, it doesn't properly handle debug expat on Windows -+HAVE_EXPAT=no -+AC_ARG_WITH([expat], AS_HELP_STRING([--with-expat[=ARG]], [use Expat library (ARG=yes or no)]),,) -+if test x"$with_expat" = x"yes" ; then -+PKG_CHECK_MODULES([EXPAT], [expat >= 1.95.0], [HAVE_EXPAT=yes], [AC_MSG_ERROR([expat not found...])]) - - if test "$HAVE_EXPAT" = "yes"; then - LIBS="$EXPAT_LDFLAGS $LIBS" -@@ -3834,6 +3832,7 @@ m4_foreach_w([frmt],EXPAT_DRIVERS,[ - fi - ]) - -+fi - fi - - AC_SUBST([HAVE_EXPAT], $HAVE_EXPAT) -@@ -4059,29 +4058,17 @@ AC_ARG_WITH(curl, - dnl Clear some cache variables - unset ac_cv_path_LIBCURL - --if test "`basename xx/$with_curl`" = "curl-config" ; then -- LIBCURL_CONFIG="$with_curl" --elif test "$with_curl" = "no" ; then -- LIBCURL_CONFIG=no --else -- AC_PATH_PROG(LIBCURL_CONFIG, curl-config, no) --fi -- --if test "$LIBCURL_CONFIG" != "no" ; then -- -- CURL_VERNUM=`$LIBCURL_CONFIG --vernum` -- CURL_VER=`$LIBCURL_CONFIG --version | awk '{print $2}'` -- -- AC_MSG_RESULT([ found libcurl version $CURL_VER]) -- -- AC_CHECK_LIB(curl,curl_global_init,CURL_SETTING=yes,CURL_SETTING=no,`$LIBCURL_CONFIG --libs`) - -+if test "$with_curl" = "yes" ; then -+ PKG_CHECK_MODULES([CURL], [libcurl], [CURL_SETTING=yes], [AC_MSG_ERROR([libcurl not found...])]) -+else -+ CURL_SETTING=no - fi - - if test "$CURL_SETTING" = "yes" ; then - -- CURL_INC=`$LIBCURL_CONFIG --cflags` -- CURL_LIB=`$LIBCURL_CONFIG --libs` -+ CURL_INC="$CURL_CFLAGS" -+ CURL_LIB="$CURL_LIBS" - m4_foreach_w([frmt],CURL_FORMATS,[ - driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED]) - if test "x$driver_enabled" = "xyes"; then -@@ -4121,7 +4108,6 @@ if test "x$with_xml2" = "xyes" -o "x$with_xml2" = "x" ; then - if test "${HAVE_LIBXML2}" = "yes"; then - SAVED_LIBS="${LIBS}" - LIBS="${LIBXML2_LIBS}" -- AC_CHECK_LIB(xml2,xmlParseDoc,HAVE_LIBXML2=yes,HAVE_LIBXML2=no) - LIBS="${SAVED_LIBS}" - fi - -@@ -4242,9 +4228,12 @@ dnl --------------------------------------------------------------------------- - dnl Check for SQLite (only if SpatiaLite is not detected) - dnl --------------------------------------------------------------------------- - -+HAVE_SQLITE3=no -+AC_ARG_WITH(sqlite3, AS_HELP_STRING([--with-sqlite3[=ARG]], [use SQLite 3 library (ARG=yes or no)]),,) - if test "${HAVE_SPATIALITE}" = "no" -o "${HAVE_SPATIALITE}" = "dlopen" ; then -- SQLITE3_REQ_VERSION="3.0.0" -- AX_LIB_SQLITE3($SQLITE3_REQ_VERSION) -+ if test x"$with_sqlite3" = x"yes" ; then -+ PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= 3.0.0], [HAVE_SQLITE3=yes], [AC_MSG_ERROR([sqlite3 not found...])]) -+ fi - - if test "$HAVE_SQLITE3" = "yes"; then - LIBS="$SQLITE3_LDFLAGS $LIBS" -@@ -4597,8 +4586,13 @@ dnl --------------------------------------------------------------------------- - dnl Check if geos library is available. - dnl --------------------------------------------------------------------------- - --GEOS_INIT(3.1.0) -+AC_ARG_WITH(geos, AS_HELP_STRING([--with-geos[=ARG]], [Include GEOS support (ARG=yes or no)]),,) - HAVE_GEOS_RESULT="no" -+HAVE_GEOS=no -+if test x"$with_geos" = x"no" ; then -+ AC_MSG_RESULT([GEOS support disabled]) -+else -+ PKG_CHECK_MODULES([GEOS], [geos >= 3.1.0], [HAVE_GEOS=yes], [AC_MSG_ERROR([geos not found...])]) - if test "${HAVE_GEOS}" = "yes" ; then - - AC_MSG_NOTICE([Using C API from GEOS $GEOS_VERSION]) -@@ -4607,6 +4601,8 @@ if test "${HAVE_GEOS}" = "yes" ; then - LIBS="${GEOS_LIBS} ${LIBS}" - HAVE_GEOS_RESULT="yes" - fi -+fi -+AC_SUBST(HAVE_GEOS, $HAVE_GEOS) - - dnl --------------------------------------------------------------------------- - dnl Check if SFCGAL library is available. -@@ -4641,20 +4637,18 @@ elif test "$with_qhull" = "yes" -o "$with_qhull" = "" ; then - # qhull/qhull.h - AC_CHECK_HEADERS([qhull/libqhull.h]) - if test "$ac_cv_header_qhull_libqhull_h" = "yes"; then -- AC_CHECK_LIB(qhull,qh_new_qhull,QHULL_SETTING=yes,QHULL_SETTING=no,) -+ QHULL_SETTING=yes - if test "$QHULL_SETTING" = "yes"; then - QHULL_SETTING=external - QHULL_INCLUDE_SUBDIR_IS_LIBQHULL=0 -- LIBS="-lqhull $LIBS" - fi - fi - AC_CHECK_HEADERS([libqhull/libqhull.h]) - if test "$ac_cv_header_libqhull_libqhull_h" = "yes"; then -- AC_CHECK_LIB(qhull,qh_new_qhull,QHULL_SETTING=yes,QHULL_SETTING=no,) -+ QHULL_SETTING=yes - if test "$QHULL_SETTING" = "yes"; then - QHULL_SETTING=external - QHULL_INCLUDE_SUBDIR_IS_LIBQHULL=1 -- LIBS="-lqhull $LIBS" - fi - fi - -@@ -4741,7 +4735,9 @@ AC_MSG_CHECKING([for FreeXL support]) - HAVE_FREEXL=no - FREEXL_INCLUDE= - --if test "$with_freexl" = "" -o "$with_freexl" = "yes" ; then -+if test "$with_freexl" = "yes"; then -+ PKG_CHECK_MODULES([FREEXL], [freexl >= 1.0.0], [HAVE_FREEXL=yes], [AC_MSG_ERROR([freexl not found...])]) -+elif test "$with_freexl" = ""; then - AC_CHECK_HEADERS(freexl.h) - AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-lfreexl",FREEXL_LIBS=missing) - -@@ -4847,8 +4843,7 @@ if test "$with_libjson_c" = "external" -o "$with_libjson_c" = "" -o "$with_libjs - elif test "$with_libjson_c" = "internal" ; then - LIBJSONC_SETTING=internal - elif test "$with_libjson_c" != "no"; then -- LIBS="-L$with_libjson_c/lib $LIBS" -- AC_CHECK_LIB(json-c,json_object_set_serializer,LIBJSONC_SETTING=external,LIBJSONC_SETTING=internal,-L$with_libjson_c/lib) -+ LIBJSONC_SETTING=external - else - AC_MSG_ERROR([libjson-c (internal or external) is required]) - fi -@@ -5952,7 +5947,6 @@ else - # Test that the package found is for the right architecture - saved_LIBS="$LIBS" - LIBS="$EXR_LIBS" -- AC_CHECK_LIB(IlmImf,ImfTiledInputReadTile, [HAVE_EXR=yes], [HAVE_EXR=no]) - LIBS="$saved_LIBS" - - if test "$HAVE_EXR" = "yes"; then diff --git a/recipes/gdal/pre_3.5.0/patches/3.1.x/fix-import-dll-msvc.patch b/recipes/gdal/pre_3.5.0/patches/3.1.x/fix-import-dll-msvc.patch deleted file mode 100644 index 308c1bca0a4c0..0000000000000 --- a/recipes/gdal/pre_3.5.0/patches/3.1.x/fix-import-dll-msvc.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/port/cpl_port.h -+++ b/port/cpl_port.h -@@ -344,7 +344,11 @@ typedef unsigned int GUIntptr_t; - - #ifndef CPL_DLL - #if defined(_MSC_VER) && !defined(CPL_DISABLE_DLL) --# define CPL_DLL __declspec(dllexport) -+# ifdef GDAL_COMPILATION -+# define CPL_DLL __declspec(dllexport) -+# else -+# define CPL_DLL -+# endif - # define CPL_INTERNAL - #else - # if defined(USE_GCC_VISIBILITY_FLAG) diff --git a/recipes/gdal/pre_3.5.0/patches/3.1.x/fix-include-jsonc.patch b/recipes/gdal/pre_3.5.0/patches/3.1.x/fix-include-jsonc.patch deleted file mode 100644 index c52f9dff53382..0000000000000 --- a/recipes/gdal/pre_3.5.0/patches/3.1.x/fix-include-jsonc.patch +++ /dev/null @@ -1,104 +0,0 @@ ---- a/gcore/gdal_rat.cpp -+++ b/gcore/gdal_rat.cpp -@@ -50,7 +50,7 @@ - #pragma clang diagnostic ignored "-Wunknown-pragmas" - #pragma clang diagnostic ignored "-Wdocumentation" - #endif --#include "json.h" -+#include - #ifdef __clang__ - #pragma clang diagnostic pop - #endif ---- a/ogr/ogrsf_frmts/geojson/ogresrijsonreader.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogresrijsonreader.cpp -@@ -37,7 +37,7 @@ - - #include "cpl_conv.h" - #include "cpl_error.h" --#include "json.h" -+#include - // #include "json_object.h" - // #include "json_tokener.h" - #include "ogr_api.h" ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsondatasource.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsondatasource.cpp -@@ -41,7 +41,7 @@ - #include "cpl_string.h" - #include "cpl_vsi.h" - #include "cpl_vsi_error.h" --#include "json.h" -+#include - // #include "json_object.h" - #include "gdal_utils.h" - #include "gdal.h" ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsonlayer.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonlayer.cpp -@@ -37,7 +37,7 @@ - # endif - #endif // !DEBUG_VERBOSE - --#include -+#include - - #if !DEBUG_JSON - # ifdef __clang ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsonreader.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonreader.cpp -@@ -32,7 +32,7 @@ - #include "ogrgeojsonreader.h" - #include "ogrgeojsonutils.h" - #include "ogr_geojson.h" --#include // JSON-C -+#include // JSON-C - - #if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013) - #include // just for sizeof(struct json_object) ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsonutils.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonutils.cpp -@@ -31,7 +31,7 @@ - #include - #include - #include --#include // JSON-C -+#include // JSON-C - - #include - #include ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsonwriter.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonwriter.cpp -@@ -33,13 +33,13 @@ - #include "ogrgeojsonutils.h" - #include "ogr_geojson.h" - #include "ogrgeojsonreader.h" --#include // JSON-C -+#include // JSON-C - - #if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013) - #include - #endif - --#include -+#include - #include - #include - ---- a/ogr/ogrsf_frmts/geojson/ogrtopojsonreader.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrtopojsonreader.cpp -@@ -30,5 +30,5 @@ - #include "ogrgeojsonutils.h" - #include "ogr_geojson.h" --#include // JSON-C -+#include // JSON-C - #include - ---- a/port/cpl_json_header.h -+++ b/port/cpl_json_header.h -@@ -33,7 +33,7 @@ - #pragma GCC system_header - #endif - --#include -+#include - - #undef json_object_object_foreachC - #define json_object_object_foreachC(obj,iter) \ diff --git a/recipes/gdal/pre_3.5.0/patches/3.1.x/fix-include-podofo.patch b/recipes/gdal/pre_3.5.0/patches/3.1.x/fix-include-podofo.patch deleted file mode 100644 index aa86489f0296b..0000000000000 --- a/recipes/gdal/pre_3.5.0/patches/3.1.x/fix-include-podofo.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/frmts/pdf/pdfsdk_headers.h -+++ b/frmts/pdf/pdfsdk_headers.h -@@ -103,7 +103,7 @@ typedef unsigned char Guchar; - #undef GetObject - #endif - --#include "podofo.h" -+#include - #endif // HAVE_PODOFO - - #ifdef HAVE_PDFIUM diff --git a/recipes/gdal/pre_3.5.0/patches/3.1.x/fix-include-xerces-3.1.2.patch b/recipes/gdal/pre_3.5.0/patches/3.1.x/fix-include-xerces-3.1.2.patch deleted file mode 100644 index 8b08760381794..0000000000000 --- a/recipes/gdal/pre_3.5.0/patches/3.1.x/fix-include-xerces-3.1.2.patch +++ /dev/null @@ -1,63 +0,0 @@ ---- a/ogr/ogr_xerces_headers.h -+++ b/ogr/ogr_xerces_headers.h -@@ -33,9 +33,9 @@ - #pragma GCC system_header - #endif - --#include --#include --#include -+#include -+#include -+#include - - #ifdef XERCES_CPP_NAMESPACE_USE - XERCES_CPP_NAMESPACE_USE ---- a/ogr/ogrsf_frmts/gml/xercesc_headers.h -+++ b/ogr/ogrsf_frmts/gml/xercesc_headers.h -@@ -33,13 +33,13 @@ - #pragma GCC system_header - #endif - --#include --#include --#include --#include --#include --#include --#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include - - #ifdef XERCES_CPP_NAMESPACE_USE - XERCES_CPP_NAMESPACE_USE ---- a/ogr/ogrsf_frmts/ili/xercesc_headers.h -+++ b/ogr/ogrsf_frmts/ili/xercesc_headers.h -@@ -33,14 +33,14 @@ - #pragma GCC system_header - #endif - --#include --#include --#include --#include --#include --#include --#include --#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include - - #ifdef XERCES_CPP_NAMESPACE_USE - XERCES_CPP_NAMESPACE_USE diff --git a/recipes/gdal/pre_3.5.0/patches/3.1.x/fix-nmake-common.patch b/recipes/gdal/pre_3.5.0/patches/3.1.x/fix-nmake-common.patch deleted file mode 100644 index c0201f8dc9cd8..0000000000000 --- a/recipes/gdal/pre_3.5.0/patches/3.1.x/fix-nmake-common.patch +++ /dev/null @@ -1,165 +0,0 @@ ---- a/alg/makefile.vc -+++ b/alg/makefile.vc -@@ -14,7 +14,7 @@ EXTRAFLAGS = -I../frmts/vrt -I../ogr/ogrsf_frmts $(GEOS_CFLAGS) $(PROJ_FLAGS) $( - EXTRAFLAGS = $(EXTRAFLAGS) -DINTERNAL_QHULL - !ELSE - !IF "$(QHULL_SETTING)" == "EXTERNAL" --EXTRAFLAGS = $(EXTRAFLAGS) -DEXTERNAL_QHULL $(QHULL_INC) -+EXTRAFLAGS = $(EXTRAFLAGS) -DEXTERNAL_QHULL -DQHULL_INCLUDE_SUBDIR_IS_LIBQHULL=1 $(QHULL_INC) - !ENDIF - !ENDIF - !ENDIF ---- a/apps/makefile.vc -+++ b/apps/makefile.vc -@@ -8,6 +8,9 @@ EXTRAFLAGS = -I..\frmts\vrt -I..\ogr\ogrsf_frmts\geojson\libjson -I..\ogr\ogrsf_ - !INCLUDE ..\nmake.opt - - LIBS = $(GDALLIB) -+!IF "$(DLLBUILD)" != "1" -+LIBS = $(LIBS) $(EXTERNAL_LIBS) -+!ENDIF - - !IFDEF INCLUDE_OGR_FRMTS - OGR_PROGRAMS = gdal_contour.exe gdaltindex.exe gdal_rasterize.exe \ ---- a/frmts/gif/makefile.vc -+++ b/frmts/gif/makefile.vc -@@ -10,14 +10,8 @@ EXTRAFLAGS = -Igiflib - - default: $(OBJ) - xcopy /D /Y *.obj ..\o -- cd giflib -- $(MAKE) /f makefile.vc -- cd .. - - clean: - -del *.obj -- cd giflib -- $(MAKE) /f makefile.vc clean -- cd .. - - ---- a/frmts/jpeg/makefile.vc -+++ b/frmts/jpeg/makefile.vc -@@ -29,12 +29,16 @@ default: $(EXTRA_DEP) $(OBJ) - - clean: - -del *.obj -+!IFNDEF JPEG_EXTERNAL_LIB - cd libjpeg - $(MAKE) /f makefile.vc clean - cd .. -+!ENDIF -+!IFDEF JPEG12_SUPPORTED - cd libjpeg12 - $(MAKE) /f makefile.vc clean - cd .. -+!ENDIF - - libjpeg12src: - cd libjpeg12 ---- a/frmts/kea/makefile.vc -+++ b/frmts/kea/makefile.vc -@@ -1,7 +1,7 @@ - - OBJ = keaband.obj keacopy.obj keadataset.obj keadriver.obj keamaskband.obj keaoverview.obj kearat.obj - --EXTRAFLAGS = $(KEA_CFLAGS) -DH5_BUILT_AS_DYNAMIC_LIB -+EXTRAFLAGS = $(KEA_CFLAGS) - - GDAL_ROOT = ..\.. - ---- a/frmts/makefile.vc -+++ b/frmts/makefile.vc -@@ -3,11 +3,11 @@ GDAL_ROOT = .. - - EXTRAFLAGS = -DFRMT_ceos -DFRMT_aigrid -DFRMT_elas -DFRMT_hfa -DFRMT_gtiff\ - -DFRMT_sdts -DFRMT_raw -DFRMT_gxf -DFRMT_ceos2 -DFRMT_png \ -- -DFRMT_dted -DFRMT_mem -DFRMT_jdem -DFRMT_gif \ -+ -DFRMT_dted -DFRMT_mem -DFRMT_jdem \ - -DFRMT_envisat -DFRMT_aaigrid -DFRMT_usgsdem -DFRMT_l1b \ - -DFRMT_fit -DFRMT_vrt -DFRMT_xpm -DFRMT_bmp -DFRMT_rmf \ -- -DFRMT_nitf -DFRMT_pcidsk -DFRMT_airsar -DFRMT_rs2 \ -- -DFRMT_ilwis -DFRMT_msgn -DFRMT_rik -DFRMT_pcraster \ -+ -DFRMT_nitf -DFRMT_airsar -DFRMT_rs2 \ -+ -DFRMT_ilwis -DFRMT_msgn -DFRMT_rik \ - -DFRMT_leveller -DFRMT_sgi -DFRMT_srtmhgt -DFRMT_idrisi \ - -DFRMT_jaxapalsar -DFRMT_ers -DFRMT_ingr -DFRMT_dimap \ - -DFRMT_gff -DFRMT_terragen -DFRMT_gsg -DFRMT_cosar -DFRMT_pds \ -@@ -32,6 +32,22 @@ PLUGINDIRLIST = $(PLUGINFLAGS:-DFRMT_=) - EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_postgisraster - !ENDIF - -+!IFDEF GIF_SETTING -+EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_gif -+!ENDIF -+ -+!IFDEF PCIDSK_SETTING -+EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_pcidsk -+!ENDIF -+ -+!IFDEF PCRASTER_SETTING -+EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_pcraster -+!ENDIF -+ -+!IFDEF EXR_INC -+EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_exr -+!ENDIF -+ - !IFDEF JPEG_SUPPORTED - EXTRAFLAGS = -DFRMT_jpeg $(EXTRAFLAGS) - !ENDIF ---- a/frmts/pcidsk/makefile.vc -+++ b/frmts/pcidsk/makefile.vc -@@ -14,7 +14,11 @@ OBJ = pcidskdataset2.obj ogrpcidsklayer.obj vsi_pcidsk_io.obj gdal_edb.obj - !ENDIF - - !IF "$(PCIDSK_SETTING)" == "INTERNAL" -+!IFDEF JPEG_SUPPORTED - PCIDSKFLAGS = -Isdk -DPCIDSK_INTERNAL -DHAVE_LIBJPEG -+!ELSE -+PCIDSKFLAGS = -Isdk -DPCIDSK_INTERNAL -+!ENDIF - - OBJ = pcidskdataset2.obj ogrpcidsklayer.obj vsi_pcidsk_io.obj gdal_edb.obj \ - sdk\channel\cbandinterleavedchannel.obj \ -@@ -57,11 +61,13 @@ OBJ = pcidskdataset2.obj ogrpcidsklayer.obj vsi_pcidsk_io.obj gdal_edb.obj \ - - !ENDIF - -+!IFDEF JPEG_SUPPORTED - !IFDEF JPEG_EXTERNAL_LIB - JPEGFLAGS = -I$(JPEGDIR) - !ELSE - JPEGFLAGS = -I..\jpeg\libjpeg - !ENDIF -+!ENDIF - - .cpp.obj: - $(CC) $(CFLAGS) $(PCIDSKFLAGS) $(JPEGFLAGS) /c $*.cpp /Fo$*.obj ---- a/makefile.vc -+++ b/makefile.vc -@@ -84,7 +84,7 @@ staticlib: $(LIB_DEPENDS) - call <= 4.0) -- AC_CHECK_LIB(tiff,TIFFScanlineSize64,HAVE_BIGTIFF=yes,HAVE_BIGTIFF=no,) -+ AC_CHECK_LIB(tiff,TIFFScanlineSize64,HAVE_BIGTIFF=yes,HAVE_BIGTIFF=no,$LIBS) - - fi - -@@ -1333,23 +1337,11 @@ AC_ARG_WITH(curl, - dnl Clear some cache variables - unset ac_cv_path_LIBCURL - --if test "`basename xx/$with_curl`" = "curl-config" ; then -- LIBCURL_CONFIG="$with_curl" --elif test "$with_curl" = "no" ; then -- LIBCURL_CONFIG=no -+PKG_PROG_PKG_CONFIG([0.21]) -+if test "$with_curl" = "yes" ; then -+ PKG_CHECK_MODULES([CURL], [libcurl], [CURL_SETTING=yes], [AC_MSG_ERROR([libcurl not found...])]) - else -- AC_PATH_PROG(LIBCURL_CONFIG, curl-config, no) --fi -- --if test "$LIBCURL_CONFIG" != "no" ; then -- -- CURL_VERNUM=`$LIBCURL_CONFIG --vernum` -- CURL_VER=`$LIBCURL_CONFIG --version | awk '{print $2}'` -- -- AC_MSG_RESULT([ found libcurl version $CURL_VER]) -- -- AC_CHECK_LIB(curl,curl_global_init,CURL_SETTING=yes,CURL_SETTING=no,`$LIBCURL_CONFIG --libs`) -- -+ CURL_SETTING=no - fi - - AC_SUBST(CURL_SETTING,$CURL_SETTING) -@@ -1361,8 +1353,11 @@ dnl Check for SQLite - dnl Proj depends on it so it must appear before. - dnl --------------------------------------------------------------------------- - --SQLITE3_REQ_VERSION="3.0.0" --AX_LIB_SQLITE3($SQLITE3_REQ_VERSION) -+HAVE_SQLITE3=no -+AC_ARG_WITH(sqlite3, AS_HELP_STRING([--with-sqlite3[=ARG]], [use SQLite 3 library (ARG=yes or no)]),,) -+if test x"$with_sqlite3" = x"yes" ; then -+ PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= 3.0.0], [HAVE_SQLITE3=yes], [AC_MSG_ERROR([sqlite3 not found...])]) -+fi - - if test "$HAVE_SQLITE3" = "yes"; then - LIBS="$SQLITE3_LDFLAGS $LIBS" -@@ -1393,11 +1388,7 @@ if test "x$with_proj" = "xno" ; then - else - - if test "x$with_proj" = "xyes" -o "x$with_proj" = "x"; then -- ORIG_LIBS="$LIBS" -- LIBS="-lproj $with_proj_extra_lib_for_test $ORIG_LIBS" -- AC_LANG_PUSH([C++]) -- AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) -- AC_LANG_POP([C++]) -+ PROJ_FOUND=yes - if test "$PROJ_FOUND" = "no"; then - AC_LANG_PUSH([C++]) - AC_CHECK_LIB(proj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) -@@ -1820,8 +1811,8 @@ fi - - if test "$CURL_SETTING" = "yes" ; then - -- CURL_INC=`$LIBCURL_CONFIG --cflags` -- CURL_LIB=`$LIBCURL_CONFIG --libs` -+ CURL_INC="$CURL_CFLAGS" -+ CURL_LIB="$CURL_LIBS" - m4_foreach_w([frmt],CURL_FORMATS,[ - driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED]) - if test "x$driver_enabled" = "xyes"; then -@@ -2153,7 +2144,6 @@ else - - DDS_SETTING=yes - CRUNCHDIR="$with_dds" -- LIBS="-L$with_dds/lib/ -lcrunch $LIBS" - echo "using libcrunch from $with_dds." - - fi -@@ -2304,7 +2294,6 @@ else - - dnl We now require libgeotiff 1.5.0 - dnl first check if $with_geotiff/lib has the library: -- AC_CHECK_LIB(geotiff,GTIFAttachPROJContext,GEOTIFF_SETTING=external,GEOTIFF_SETTING=not_found,-L$with_geotiff/lib) - - if test $GEOTIFF_SETTING = "external" ; then - LIBS="-L$with_geotiff/lib -lgeotiff $LIBS" -@@ -2872,6 +2861,10 @@ if test x"$with_hdf4" = x"no" ; then - - echo "hdf4 support disabled." - -+elif test x"$with_hdf4" = x"yes" ; then -+ PKG_CHECK_MODULES([HDF4], [hdf], [HAVE_HDF4=yes], [AC_MSG_ERROR([hdf4 not found...])]) -+ PKG_CHECK_MODULES([HDF4], [hdf >= 4.2.5], [HDF4_HAS_MAXOPENFILES=yes], [HDF4_HAS_MAXOPENFILES=no]) -+ HDF4_INCLUDE="$HDF4_CFLAGS" - else - - if test x"$with_hdf4" = x"yes" -o x"$with_hdf4" = x"" ; then -@@ -3002,7 +2995,6 @@ elif test "$with_hdf5" = "yes" -o "$with_hdf5" = "" ; then - # Test that the package found is for the right architecture - saved_LIBS="$LIBS" - LIBS="$HDF5_LIBS" -- AC_CHECK_LIB(hdf5,H5Fopen, [HAVE_HDF5=yes], [HAVE_HDF5=no]) - LIBS="$saved_LIBS" - - if test "$HAVE_HDF5" = "yes"; then -@@ -3071,21 +3063,21 @@ KEA_CONFIG=no - - AC_ARG_WITH(kea,[ --with-kea[=ARG] Include kealib (ARG=path to kea-config) [[default=yes]]],,) - -+AC_MSG_CHECKING([for kea]) - if test "$with_kea" = "yes" -o "x$with_kea" = "x" ; then -- AC_PATH_PROG(KEA_CONFIG, kea-config, no) -+ HAVE_KEA=yes -+ AC_MSG_RESULT([yes]) - else -- KEA_CONFIG=$with_kea -+ HAVE_KEA=no -+ AC_MSG_RESULT([no]) - fi - --AC_MSG_CHECKING([for kea]) - - if test "$KEA_CONFIG" = "no" ; then - -- HAVE_KEA=no - KEA_LIB= - KEA_INC= - -- AC_MSG_RESULT([no]) - - else - if test -d $KEA_CONFIG ; then -@@ -3937,18 +3929,15 @@ MYSQL_CONFIG=no - AC_ARG_WITH(mysql,[ --with-mysql[=ARG] Include MySQL (ARG=path to mysql_config) [[default=no]]],,) - - if test "$with_mysql" = "yes" ; then -- AC_PATH_PROG(MYSQL_CONFIG, mysql_config, no) -+ HAVE_MYSQL=yes - else -- if test "x$with_mysql" != "x" ; then -- MYSQL_CONFIG=$with_mysql -- fi -+ HAVE_MYSQL=no - fi - - AC_MSG_CHECKING([for MySQL]) - - if test "$MYSQL_CONFIG" = "no" ; then - -- HAVE_MYSQL=no - MYSQL_LIB= - MYSQL_INC= - -@@ -4042,8 +4031,11 @@ dnl Check for Expat configuration. - dnl --------------------------------------------------------------------------- - - dnl Expat 1.95.0 released in 2000-09-28 --EXPAT_REQ_VERSION="1.95.0" --AX_LIB_EXPAT($EXPAT_REQ_VERSION) -+# AX_LIB_EXPAT is too fragile, it doesn't properly handle debug expat on Windows -+HAVE_EXPAT=no -+AC_ARG_WITH([expat], AS_HELP_STRING([--with-expat[=ARG]], [use Expat library (ARG=yes or no)]),,) -+if test x"$with_expat" = x"yes" ; then -+PKG_CHECK_MODULES([EXPAT], [expat >= 1.95.0], [HAVE_EXPAT=yes], [AC_MSG_ERROR([expat not found...])]) - - if test "$HAVE_EXPAT" = "yes"; then - LIBS="$EXPAT_LDFLAGS $LIBS" -@@ -4056,6 +4048,7 @@ m4_foreach_w([frmt],EXPAT_DRIVERS,[ - fi - ]) - -+fi - fi - - AC_SUBST([HAVE_EXPAT], $HAVE_EXPAT) -@@ -4287,7 +4280,6 @@ if test "x$with_xml2" = "xyes" -o "x$with_xml2" = "x" ; then - if test "${HAVE_LIBXML2}" = "yes"; then - SAVED_LIBS="${LIBS}" - LIBS="${LIBXML2_LIBS}" -- AC_CHECK_LIB(xml2,xmlParseDoc,HAVE_LIBXML2=yes,HAVE_LIBXML2=no) - LIBS="${SAVED_LIBS}" - fi - -@@ -4567,8 +4559,13 @@ dnl --------------------------------------------------------------------------- - dnl Check if geos library is available. - dnl --------------------------------------------------------------------------- - --GEOS_INIT(3.1.0) -+AC_ARG_WITH(geos, AS_HELP_STRING([--with-geos[=ARG]], [Include GEOS support (ARG=yes or no)]),,) - HAVE_GEOS_RESULT="no" -+HAVE_GEOS=no -+if test x"$with_geos" = x"no" ; then -+ AC_MSG_RESULT([GEOS support disabled]) -+else -+ PKG_CHECK_MODULES([GEOS], [geos >= 3.1.0], [HAVE_GEOS=yes], [AC_MSG_ERROR([geos not found...])]) - if test "${HAVE_GEOS}" = "yes" ; then - - AC_MSG_NOTICE([Using C API from GEOS $GEOS_VERSION]) -@@ -4577,6 +4574,8 @@ if test "${HAVE_GEOS}" = "yes" ; then - LIBS="${GEOS_LIBS} ${LIBS}" - HAVE_GEOS_RESULT="yes" - fi -+fi -+AC_SUBST(HAVE_GEOS, $HAVE_GEOS) - - dnl --------------------------------------------------------------------------- - dnl Check if SFCGAL library is available. -@@ -4611,20 +4610,18 @@ elif test "$with_qhull" = "yes" -o "$with_qhull" = "" ; then - # qhull/qhull.h - AC_CHECK_HEADERS([qhull/libqhull.h]) - if test "$ac_cv_header_qhull_libqhull_h" = "yes"; then -- AC_CHECK_LIB(qhull,qh_new_qhull,QHULL_SETTING=yes,QHULL_SETTING=no,) -+ QHULL_SETTING=yes - if test "$QHULL_SETTING" = "yes"; then - QHULL_SETTING=external - QHULL_INCLUDE_SUBDIR_IS_LIBQHULL=0 -- LIBS="-lqhull $LIBS" - fi - fi - AC_CHECK_HEADERS([libqhull/libqhull.h]) - if test "$ac_cv_header_libqhull_libqhull_h" = "yes"; then -- AC_CHECK_LIB(qhull,qh_new_qhull,QHULL_SETTING=yes,QHULL_SETTING=no,) -+ QHULL_SETTING=yes - if test "$QHULL_SETTING" = "yes"; then - QHULL_SETTING=external - QHULL_INCLUDE_SUBDIR_IS_LIBQHULL=1 -- LIBS="-lqhull $LIBS" - fi - fi - -@@ -4711,7 +4708,9 @@ AC_MSG_CHECKING([for FreeXL support]) - HAVE_FREEXL=no - FREEXL_INCLUDE= - --if test "$with_freexl" = "" -o "$with_freexl" = "yes" ; then -+if test "$with_freexl" = "yes"; then -+ PKG_CHECK_MODULES([FREEXL], [freexl >= 1.0.0], [HAVE_FREEXL=yes], [AC_MSG_ERROR([freexl not found...])]) -+elif test "$with_freexl" = ""; then - AC_CHECK_HEADERS(freexl.h) - AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-lfreexl",FREEXL_LIBS=missing) - -@@ -4817,8 +4816,7 @@ if test "$with_libjson_c" = "external" -o "$with_libjson_c" = "" -o "$with_libjs - elif test "$with_libjson_c" = "internal" ; then - LIBJSONC_SETTING=internal - elif test "$with_libjson_c" != "no"; then -- LIBS="-L$with_libjson_c/lib $LIBS" -- AC_CHECK_LIB(json-c,json_object_set_serializer,LIBJSONC_SETTING=external,LIBJSONC_SETTING=internal,-L$with_libjson_c/lib) -+ LIBJSONC_SETTING=external - else - AC_MSG_ERROR([libjson-c (internal or external) is required]) - fi -@@ -5928,7 +5926,6 @@ else - # Test that the package found is for the right architecture - saved_LIBS="$LIBS" - LIBS="$EXR_LIBS" -- AC_CHECK_LIB(IlmImf,ImfTiledInputReadTile, [HAVE_EXR=yes], [HAVE_EXR=no]) - LIBS="$saved_LIBS" - - if test "$HAVE_EXR" = "yes"; then diff --git a/recipes/gdal/pre_3.5.0/patches/3.2.x/fix-include-jsonc.patch b/recipes/gdal/pre_3.5.0/patches/3.2.x/fix-include-jsonc.patch deleted file mode 100644 index e88043df4189f..0000000000000 --- a/recipes/gdal/pre_3.5.0/patches/3.2.x/fix-include-jsonc.patch +++ /dev/null @@ -1,104 +0,0 @@ ---- a/gcore/gdal_rat.cpp -+++ b/gcore/gdal_rat.cpp -@@ -50,7 +50,7 @@ - #pragma clang diagnostic ignored "-Wunknown-pragmas" - #pragma clang diagnostic ignored "-Wdocumentation" - #endif --#include "json.h" -+#include - #ifdef __clang__ - #pragma clang diagnostic pop - #endif ---- a/ogr/ogrsf_frmts/geojson/ogresrijsonreader.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogresrijsonreader.cpp -@@ -37,7 +37,7 @@ - - #include "cpl_conv.h" - #include "cpl_error.h" --#include "json.h" -+#include - // #include "json_object.h" - // #include "json_tokener.h" - #include "ogr_api.h" ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsondatasource.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsondatasource.cpp -@@ -41,7 +41,7 @@ - #include "cpl_string.h" - #include "cpl_vsi.h" - #include "cpl_vsi_error.h" --#include "json.h" -+#include - // #include "json_object.h" - #include "gdal_utils.h" - #include "gdal.h" ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsonlayer.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonlayer.cpp -@@ -37,7 +37,7 @@ - # endif - #endif // !DEBUG_VERBOSE - --#include -+#include - - #if !DEBUG_JSON - # ifdef __clang ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsonreader.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonreader.cpp -@@ -32,7 +32,7 @@ - #include "ogrgeojsonreader.h" - #include "ogrgeojsonutils.h" - #include "ogr_geojson.h" --#include // JSON-C -+#include - - #if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013) - #include // just for sizeof(struct json_object) ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsonutils.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonutils.cpp -@@ -32,7 +32,7 @@ - #include - #include - #include --#include // JSON-C -+#include - - #include - #include ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsonwriter.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonwriter.cpp -@@ -33,13 +33,13 @@ - #include "ogrgeojsonutils.h" - #include "ogr_geojson.h" - #include "ogrgeojsonreader.h" --#include // JSON-C -+#include - - #if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013) - #include - #endif - --#include -+#include - #include - #include - ---- a/ogr/ogrsf_frmts/geojson/ogrtopojsonreader.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrtopojsonreader.cpp -@@ -30,5 +30,5 @@ - #include "ogrgeojsonutils.h" - #include "ogr_geojson.h" --#include // JSON-C -+#include - #include - ---- a/port/cpl_json_header.h -+++ b/port/cpl_json_header.h -@@ -33,7 +33,7 @@ - #pragma GCC system_header - #endif - --#include -+#include - - #undef json_object_object_foreachC - #define json_object_object_foreachC(obj,iter) \ diff --git a/recipes/gdal/pre_3.5.0/patches/3.2.x/fix-include-podofo.patch b/recipes/gdal/pre_3.5.0/patches/3.2.x/fix-include-podofo.patch deleted file mode 100644 index aa86489f0296b..0000000000000 --- a/recipes/gdal/pre_3.5.0/patches/3.2.x/fix-include-podofo.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/frmts/pdf/pdfsdk_headers.h -+++ b/frmts/pdf/pdfsdk_headers.h -@@ -103,7 +103,7 @@ typedef unsigned char Guchar; - #undef GetObject - #endif - --#include "podofo.h" -+#include - #endif // HAVE_PODOFO - - #ifdef HAVE_PDFIUM diff --git a/recipes/gdal/pre_3.5.0/patches/3.2.x/fix-include-xerces.patch b/recipes/gdal/pre_3.5.0/patches/3.2.x/fix-include-xerces.patch deleted file mode 100644 index 8b08760381794..0000000000000 --- a/recipes/gdal/pre_3.5.0/patches/3.2.x/fix-include-xerces.patch +++ /dev/null @@ -1,63 +0,0 @@ ---- a/ogr/ogr_xerces_headers.h -+++ b/ogr/ogr_xerces_headers.h -@@ -33,9 +33,9 @@ - #pragma GCC system_header - #endif - --#include --#include --#include -+#include -+#include -+#include - - #ifdef XERCES_CPP_NAMESPACE_USE - XERCES_CPP_NAMESPACE_USE ---- a/ogr/ogrsf_frmts/gml/xercesc_headers.h -+++ b/ogr/ogrsf_frmts/gml/xercesc_headers.h -@@ -33,13 +33,13 @@ - #pragma GCC system_header - #endif - --#include --#include --#include --#include --#include --#include --#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include - - #ifdef XERCES_CPP_NAMESPACE_USE - XERCES_CPP_NAMESPACE_USE ---- a/ogr/ogrsf_frmts/ili/xercesc_headers.h -+++ b/ogr/ogrsf_frmts/ili/xercesc_headers.h -@@ -33,14 +33,14 @@ - #pragma GCC system_header - #endif - --#include --#include --#include --#include --#include --#include --#include --#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include - - #ifdef XERCES_CPP_NAMESPACE_USE - XERCES_CPP_NAMESPACE_USE diff --git a/recipes/gdal/pre_3.5.0/patches/3.2.x/fix-nmake.patch b/recipes/gdal/pre_3.5.0/patches/3.2.x/fix-nmake.patch deleted file mode 100644 index e23b85d35a16a..0000000000000 --- a/recipes/gdal/pre_3.5.0/patches/3.2.x/fix-nmake.patch +++ /dev/null @@ -1,179 +0,0 @@ ---- a/alg/makefile.vc -+++ b/alg/makefile.vc -@@ -14,7 +14,7 @@ EXTRAFLAGS = -I../frmts/vrt -I../ogr/ogrsf_frmts $(GEOS_CFLAGS) $(PROJ_FLAGS) $( - EXTRAFLAGS = $(EXTRAFLAGS) -DINTERNAL_QHULL - !ELSE - !IF "$(QHULL_SETTING)" == "EXTERNAL" --EXTRAFLAGS = $(EXTRAFLAGS) -DEXTERNAL_QHULL $(QHULL_INC) -+EXTRAFLAGS = $(EXTRAFLAGS) -DEXTERNAL_QHULL -DQHULL_INCLUDE_SUBDIR_IS_LIBQHULL=1 $(QHULL_INC) - !ENDIF - !ENDIF - !ENDIF ---- a/apps/makefile.vc -+++ b/apps/makefile.vc -@@ -8,6 +8,9 @@ EXTRAFLAGS = -I..\frmts\vrt -I..\ogr\ogrsf_frmts\geojson\libjson -I..\ogr\ogrsf_ - !INCLUDE ..\nmake.opt - - LIBS = $(GDALLIB) -+!IF "$(DLLBUILD)" != "1" -+LIBS = $(LIBS) $(EXTERNAL_LIBS) -+!ENDIF - - !IFDEF INCLUDE_OGR_FRMTS - OGR_PROGRAMS = gdal_contour.exe gdaltindex.exe gdal_rasterize.exe \ ---- a/frmts/gif/makefile.vc -+++ b/frmts/gif/makefile.vc -@@ -10,14 +10,8 @@ EXTRAFLAGS = -Igiflib - - default: $(OBJ) - xcopy /D /Y *.obj ..\o -- cd giflib -- $(MAKE) /f makefile.vc -- cd .. - - clean: - -del *.obj -- cd giflib -- $(MAKE) /f makefile.vc clean -- cd .. - - ---- a/frmts/jpeg/makefile.vc -+++ b/frmts/jpeg/makefile.vc -@@ -29,12 +29,16 @@ default: $(EXTRA_DEP) $(OBJ) - - clean: - -del *.obj -+!IFNDEF JPEG_EXTERNAL_LIB - cd libjpeg - $(MAKE) /f makefile.vc clean - cd .. -+!ENDIF -+!IFDEF JPEG12_SUPPORTED - cd libjpeg12 - $(MAKE) /f makefile.vc clean - cd .. -+!ENDIF - - libjpeg12src: - cd libjpeg12 ---- a/frmts/kea/makefile.vc -+++ b/frmts/kea/makefile.vc -@@ -1,7 +1,7 @@ - - OBJ = keaband.obj keacopy.obj keadataset.obj keadriver.obj keamaskband.obj keaoverview.obj kearat.obj - --EXTRAFLAGS = $(KEA_CFLAGS) -DH5_BUILT_AS_DYNAMIC_LIB -+EXTRAFLAGS = $(KEA_CFLAGS) - - GDAL_ROOT = ..\.. - ---- a/frmts/makefile.vc -+++ b/frmts/makefile.vc -@@ -3,11 +3,11 @@ GDAL_ROOT = .. - - EXTRAFLAGS = -DFRMT_ceos -DFRMT_aigrid -DFRMT_elas -DFRMT_hfa -DFRMT_gtiff\ - -DFRMT_sdts -DFRMT_raw -DFRMT_gxf -DFRMT_ceos2 -DFRMT_png \ -- -DFRMT_dted -DFRMT_mem -DFRMT_jdem -DFRMT_gif -DFRMT_esric \ -+ -DFRMT_dted -DFRMT_mem -DFRMT_jdem -DFRMT_esric \ - -DFRMT_envisat -DFRMT_aaigrid -DFRMT_usgsdem -DFRMT_l1b \ - -DFRMT_fit -DFRMT_vrt -DFRMT_xpm -DFRMT_bmp -DFRMT_rmf \ -- -DFRMT_nitf -DFRMT_pcidsk -DFRMT_airsar -DFRMT_rs2 \ -- -DFRMT_ilwis -DFRMT_msgn -DFRMT_rik -DFRMT_pcraster \ -+ -DFRMT_nitf -DFRMT_airsar -DFRMT_rs2 \ -+ -DFRMT_ilwis -DFRMT_msgn -DFRMT_rik \ - -DFRMT_leveller -DFRMT_sgi -DFRMT_srtmhgt -DFRMT_idrisi \ - -DFRMT_jaxapalsar -DFRMT_ers -DFRMT_ingr -DFRMT_dimap \ - -DFRMT_gff -DFRMT_terragen -DFRMT_gsg -DFRMT_cosar -DFRMT_pds \ -@@ -32,6 +32,22 @@ PLUGINDIRLIST = $(PLUGINFLAGS:-DFRMT_=) - EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_postgisraster - !ENDIF - -+!IFDEF GIF_SETTING -+EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_gif -+!ENDIF -+ -+!IFDEF PCIDSK_SETTING -+EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_pcidsk -+!ENDIF -+ -+!IFDEF PCRASTER_SETTING -+EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_pcraster -+!ENDIF -+ -+!IFDEF EXR_INC -+EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_exr -+!ENDIF -+ - !IFDEF JPEG_SUPPORTED - EXTRAFLAGS = -DFRMT_jpeg $(EXTRAFLAGS) - !ENDIF ---- a/frmts/pcidsk/makefile.vc -+++ b/frmts/pcidsk/makefile.vc -@@ -14,7 +14,11 @@ OBJ = pcidskdataset2.obj ogrpcidsklayer.obj vsi_pcidsk_io.obj gdal_edb.obj - !ENDIF - - !IF "$(PCIDSK_SETTING)" == "INTERNAL" -+!IFDEF JPEG_SUPPORTED - PCIDSKFLAGS = -Isdk -DPCIDSK_INTERNAL -DHAVE_LIBJPEG -+!ELSE -+PCIDSKFLAGS = -Isdk -DPCIDSK_INTERNAL -+!ENDIF - - OBJ = pcidskdataset2.obj ogrpcidsklayer.obj vsi_pcidsk_io.obj gdal_edb.obj \ - sdk\channel\cbandinterleavedchannel.obj \ -@@ -57,11 +61,13 @@ OBJ = pcidskdataset2.obj ogrpcidsklayer.obj vsi_pcidsk_io.obj gdal_edb.obj \ - - !ENDIF - -+!IFDEF JPEG_SUPPORTED - !IFDEF JPEG_EXTERNAL_LIB - JPEGFLAGS = -I$(JPEGDIR) - !ELSE - JPEGFLAGS = -I..\jpeg\libjpeg - !ENDIF -+!ENDIF - - .cpp.obj: - $(CC) $(CFLAGS) $(PCIDSKFLAGS) $(JPEGFLAGS) /c $*.cpp /Fo$*.obj ---- a/makefile.vc -+++ b/makefile.vc -@@ -84,7 +84,7 @@ staticlib: $(LIB_DEPENDS) - call < Date: Sat, 19 Aug 2023 20:09:45 +0300 Subject: [PATCH 311/637] (#18940) objectbox-generator: migrate to Conan v2 * objectbox-generator: migrate to Conan v2 * objectbox-generator: apply PR suggestions --- recipes/objectbox-generator/all/conanfile.py | 54 +++++++++++-------- .../all/test_package/conanfile.py | 14 +++-- .../all/test_v1_package/conanfile.py | 11 ++++ 3 files changed, 52 insertions(+), 27 deletions(-) create mode 100644 recipes/objectbox-generator/all/test_v1_package/conanfile.py diff --git a/recipes/objectbox-generator/all/conanfile.py b/recipes/objectbox-generator/all/conanfile.py index 5493b25252fde..b6b2defa46e0e 100644 --- a/recipes/objectbox-generator/all/conanfile.py +++ b/recipes/objectbox-generator/all/conanfile.py @@ -1,8 +1,12 @@ -from conans import CMake, ConanFile, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import copy, download, get +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.47.0" + class PackageConan(ConanFile): name = "objectbox-generator" @@ -10,39 +14,45 @@ class PackageConan(ConanFile): license = "GPL-3.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/objectbox/objectbox-generator" - topics = ("database", "code-generator", "objectbox") + topics = ("database", "code-generator", "objectbox", "pre-built") + + package_type = "application" settings = "os", "arch", "compiler", "build_type" - @property - def _source_subfolder(self): - return "source_subfolder" - - def validate(self): - if self.settings.os not in ["Linux", "Windows", "Macos"] or self.settings.arch != "x86_64": - raise ConanInvalidConfiguration("{} doesn't support current environment".format(self.name)) + def layout(self): + basic_layout(self, src_folder="src") def package_id(self): del self.info.settings.compiler del self.info.settings.build_type - def source(self): - tools.get(**self.conan_data["sources"][self.version][str(self.settings.os)], - destination=self.source_folder) - tools.download(**self.conan_data["sources"][self.version]["License"], filename="LICENSE.txt") + def validate(self): + if self.settings.os not in ["Linux", "FreeBSD", "Windows", "Macos"] or self.settings.arch != "x86_64": + raise ConanInvalidConfiguration(f"{self.name} doesn't support current environment") + + def build(self): + get(self, **self.conan_data["sources"][self.version][str(self.info.settings.os)]) + download(self, **self.conan_data["sources"][self.version]["License"], filename="LICENSE.txt") def package(self): if self.settings.os != "Windows": - bin_path = os.path.join(self.source_folder, "objectbox-generator") + bin_path = os.path.join(self.build_folder, "objectbox-generator") os.chmod(bin_path, os.stat(bin_path).st_mode | 0o111) - self.copy("objectbox-generator*", src=self.source_folder, dst="bin", keep_path=False) - self.copy("LICENSE.txt", dst="licenses", src=self.source_folder) + copy(self, "objectbox-generator*", + src=self.build_folder, + dst=os.path.join(self.package_folder, "bin"), + keep_path=False) + copy(self, "LICENSE.txt", + dst=os.path.join(self.package_folder, "licenses"), + src=self.build_folder) def package_info(self): - binpath = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH env var: {}".format(binpath)) - self.env_info.PATH.append(binpath) - self.cpp_info.includedirs = [] self.cpp_info.frameworkdirs = [] self.cpp_info.libdirs = [] self.cpp_info.resdirs = [] + + # TODO: Legacy, to be removed on Conan 2.0 + binpath = os.path.join(self.package_folder, "bin") + self.output.info(f"Appending PATH env var: {binpath}") + self.env_info.PATH.append(binpath) diff --git a/recipes/objectbox-generator/all/test_package/conanfile.py b/recipes/objectbox-generator/all/test_package/conanfile.py index c605339e388af..42f9cfb1d7ca2 100644 --- a/recipes/objectbox-generator/all/test_package/conanfile.py +++ b/recipes/objectbox-generator/all/test_package/conanfile.py @@ -1,11 +1,15 @@ -from conans import ConanFile, CMake, tools -import os +from conan import ConanFile +from conan.tools.build import can_run class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" + generators = "VirtualBuildEnv" + test_type = "explicit" + + def build_requirements(self): + self.tool_requires(self.tested_reference_str) def test(self): - if not tools.cross_building(self): - bin_path = os.path.join(self.deps_cpp_info["objectbox-generator"].rootpath, "bin", "objectbox-generator") - self.run(bin_path + " -help", run_environment=True) + if can_run(self): + self.run("objectbox-generator -help") diff --git a/recipes/objectbox-generator/all/test_v1_package/conanfile.py b/recipes/objectbox-generator/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..c605339e388af --- /dev/null +++ b/recipes/objectbox-generator/all/test_v1_package/conanfile.py @@ -0,0 +1,11 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join(self.deps_cpp_info["objectbox-generator"].rootpath, "bin", "objectbox-generator") + self.run(bin_path + " -help", run_environment=True) From e6dd93bc3b4f4388f579319d12aad6fb0faf7837 Mon Sep 17 00:00:00 2001 From: Ivo Hedtke Date: Sat, 19 Aug 2023 19:51:26 +0200 Subject: [PATCH 312/637] (#19120) Add library SCIP++ * Add library SCIP++ * Add license * Add url and homepage * Output version in test * Set CMake version variable which derived from git in upstream * Update SCIP++ to v1.0.1 * Fix version in config.yml * Also package license file * Update to SCIP++ 1.0.2 --- recipes/scippp/all/conandata.yml | 4 + recipes/scippp/all/conanfile.py | 90 +++++++++++++++++++ .../scippp/all/test_package/CMakeLists.txt | 7 ++ recipes/scippp/all/test_package/conanfile.py | 26 ++++++ .../scippp/all/test_package/test_package.cpp | 13 +++ recipes/scippp/config.yml | 3 + 6 files changed, 143 insertions(+) create mode 100644 recipes/scippp/all/conandata.yml create mode 100644 recipes/scippp/all/conanfile.py create mode 100644 recipes/scippp/all/test_package/CMakeLists.txt create mode 100644 recipes/scippp/all/test_package/conanfile.py create mode 100644 recipes/scippp/all/test_package/test_package.cpp create mode 100644 recipes/scippp/config.yml diff --git a/recipes/scippp/all/conandata.yml b/recipes/scippp/all/conandata.yml new file mode 100644 index 0000000000000..ce0a80569e788 --- /dev/null +++ b/recipes/scippp/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.2": + url: "https://github.com/scipopt/SCIPpp/archive/refs/tags/1.0.2.tar.gz" + sha256: "d51dfd0f1ca1b57619f7c82e32d5390d99d5cdaee98ae1ace99ec05a394dcee3" diff --git a/recipes/scippp/all/conanfile.py b/recipes/scippp/all/conanfile.py new file mode 100644 index 0000000000000..72d7e95e14f56 --- /dev/null +++ b/recipes/scippp/all/conanfile.py @@ -0,0 +1,90 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get +from conan.tools.microsoft import check_min_vs, is_msvc +from conan.tools.scm import Version +from os.path import join + + +class ScipPlusPlus(ConanFile): + name = "scippp" + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps" + exports_sources = "CMakeLists.txt", "source/*", "include/*" + description = "SCIP++ is a C++ wrapper for SCIP's C interface" + package_type = "library" + topics = ("mip", "solver", "linear", "programming") + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/scipopt/SCIPpp" + options = { + "shared": [True, False], + "fPIC": [True, False] + } + default_options = { + "shared": False, + "fPIC": True + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "7", + "apple-clang": "10", + "msvc": "192" + } + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + check_min_vs(self, 192) + if not is_msvc(self): + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def layout(self): + cmake_layout(self, src_folder="src") + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def requirements(self): + # see https://github.com/scipopt/SCIPpp/blob/1.0.0/conanfile.py#L25 + self.requires("scip/8.0.3", transitive_headers=True) + + def generate(self): + tc = CMakeToolchain(self) + # In upstream, the version is injected into CMake via git. + tc.variables["scippp_version"] = self.version + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="LICENSE", dst=join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["ScipPP"] diff --git a/recipes/scippp/all/test_package/CMakeLists.txt b/recipes/scippp/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..877c0c21bd3c0 --- /dev/null +++ b/recipes/scippp/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package CXX) +set(CMAKE_CXX_STANDARD 17) + +find_package(scippp REQUIRED CONFIG) +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE scippp::scippp) diff --git a/recipes/scippp/all/test_package/conanfile.py b/recipes/scippp/all/test_package/conanfile.py new file mode 100644 index 0000000000000..8a5bb47f50c4c --- /dev/null +++ b/recipes/scippp/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def 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/scippp/all/test_package/test_package.cpp b/recipes/scippp/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..5244632b87e16 --- /dev/null +++ b/recipes/scippp/all/test_package/test_package.cpp @@ -0,0 +1,13 @@ +#include +#include +#include +using namespace scippp; +int main() { + std::cout << "This is SCIP++ version " << scippp::getVersion() << std::endl; + Model model("Simple"); + auto x1 = model.addVar("x_1", 1); + auto x2 = model.addVar("x_2", 1); + model.addConstr(3 * x1 + 2 * x2 <= 1, "capacity"); + model.setObjsense(Sense::MAXIMIZE); + model.solve(); +} diff --git a/recipes/scippp/config.yml b/recipes/scippp/config.yml new file mode 100644 index 0000000000000..8457ca9a4a8cd --- /dev/null +++ b/recipes/scippp/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.2": + folder: all From 1e6d79cc9dbac2fe5512151f5ff3f2cf05f092e7 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Sat, 19 Aug 2023 20:30:12 +0200 Subject: [PATCH 313/637] (#19127) re2: add version 20230801 --- recipes/re2/all/conandata.yml | 3 +++ recipes/re2/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/re2/all/conandata.yml b/recipes/re2/all/conandata.yml index 6705ed6ddc2fa..9b52a871bf261 100644 --- a/recipes/re2/all/conandata.yml +++ b/recipes/re2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "20230801": + url: "https://github.com/google/re2/releases/download/2023-08-01/re2-2023-08-01.tar.gz" + sha256: "d82d0efe2389949244445e7a6ac9a10fccc3d6a3d267ec4652991a51291647b0" "20230701": url: "https://github.com/google/re2/releases/download/2023-07-01/re2-2023-07-01.tar.gz" sha256: "18cf85922e27fad3ed9c96a27733037da445f35eb1a2744c306a37c6d11e95c4" diff --git a/recipes/re2/config.yml b/recipes/re2/config.yml index 4d4c9dcf9a641..fb1f7527256cf 100644 --- a/recipes/re2/config.yml +++ b/recipes/re2/config.yml @@ -1,4 +1,6 @@ versions: + "20230801": + folder: all "20230701": folder: all "20230602": From 2a0d3dca6edd772e06da6ab867d8188bc35ac68d Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 20 Aug 2023 04:11:01 +0900 Subject: [PATCH 314/637] (#19190) cpp-sort: add version 1.15.0, remove older versions --- recipes/cpp-sort/all/conandata.yml | 21 +++------------------ recipes/cpp-sort/all/conanfile.py | 16 ++++++++-------- recipes/cpp-sort/config.yml | 14 ++------------ 3 files changed, 13 insertions(+), 38 deletions(-) diff --git a/recipes/cpp-sort/all/conandata.yml b/recipes/cpp-sort/all/conandata.yml index 092fe59db4a19..48e5289632674 100644 --- a/recipes/cpp-sort/all/conandata.yml +++ b/recipes/cpp-sort/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.15.0": + url: "https://github.com/Morwenn/cpp-sort/archive/1.15.0.tar.gz" + sha256: "886e813a4b87c6361e9b50c0a66c73b3b812f0ce0b7039ff3991eddce77e0dc7" "1.14.0": url: "https://github.com/Morwenn/cpp-sort/archive/1.14.0.tar.gz" sha256: "3b85cd4580f54ae3f171777d0630b4f7c89c33cf96e9ae24a1dbebbf200c3195" @@ -23,21 +26,3 @@ sources: "1.10.0": url: "https://github.com/Morwenn/cpp-sort/archive/1.10.0.tar.gz" sha256: "48951cac0051d48fee286c3bc02804975f9d83269d80c10dfc5589e76a542765" - "1.9.0": - url: "https://github.com/Morwenn/cpp-sort/archive/1.9.0.tar.gz" - sha256: "e83f3daad30bd91fed668bdb56ad379c4aeea39d7dc640484fdcc55149b6d0e4" - "1.8.1": - url: "https://github.com/Morwenn/cpp-sort/archive/1.8.1.tar.gz" - sha256: "04d518dabb422614fcb4a2b4e258c515f31dd01d51c26e9eaaec76e77c4d3d40" - "1.8.0": - sha256: a3de426a66cffbe9f8865feb7518ff4f4d1b3aadf3725161b8e118dcbf6fe9b9 - url: https://github.com/Morwenn/cpp-sort/archive/1.8.0.tar.gz - "1.7.0": - sha256: 4a8230be2c63a92395e140cb7e6593171638a41c46f4cd14d6ffc354ba830e2b - url: https://github.com/Morwenn/cpp-sort/archive/1.7.0.tar.gz - "1.6.0": - sha256: df048d15ff555030eb90d3c96f560a75bbec8baee256f2ced647f359c892c9c8 - url: https://github.com/Morwenn/cpp-sort/archive/1.6.0.tar.gz - "1.5.1": - sha256: 39925958dbd773f15d36d74d4ded48f075c05feef7fe604c7c5c4bfae2a4ec55 - url: https://github.com/Morwenn/cpp-sort/archive/1.5.1.tar.gz diff --git a/recipes/cpp-sort/all/conanfile.py b/recipes/cpp-sort/all/conanfile.py index cfda199bf6a78..e0e093c1fa165 100644 --- a/recipes/cpp-sort/all/conanfile.py +++ b/recipes/cpp-sort/all/conanfile.py @@ -1,5 +1,3 @@ -import os.path - from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd @@ -7,6 +5,7 @@ from conan.tools.files import copy, get, rmdir from conan.tools.microsoft import is_msvc from conan.tools.scm import Version +import os required_conan_version = ">=1.50.0" @@ -17,12 +16,13 @@ class CppSortConan(ConanFile): license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/Morwenn/cpp-sort" - topics = "cpp-sort", "sorting", "algorithms" + topics = ("sorting", "algorithms", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @property - def _minimum_cpp_standard(self): + def _min_cppstd(self): return 14 @property @@ -43,7 +43,7 @@ def package_id(self): def validate(self): if self.settings.get_safe("compiler.cppstd"): - check_min_cppstd(self, self._minimum_cpp_standard) + check_min_cppstd(self, self._min_cppstd) if is_msvc(self) and Version(self.version) < "1.10.0": raise ConanInvalidConfiguration(f"{self.ref} versions older than 1.10.0 do not support MSVC") @@ -60,19 +60,19 @@ def loose_lt_semver(v1, v2): minimum_version = self._compilers_minimum_version[str(compiler)] if minimum_version and loose_lt_semver(version, minimum_version): msg = ( - f"{self.ref} requires C++{self._minimum_cpp_standard} features " + f"{self.ref} requires C++{self._min_cppstd} features " f"which are not supported by compiler {compiler} {version}." ) raise ConanInvalidConfiguration(msg) except KeyError: msg = ( f"{self.ref} recipe lacks information about the {compiler} compiler, " - f"support for the required C++{self._minimum_cpp_standard} features is assumed" + f"support for the required C++{self._min_cppstd} features is assumed" ) self.output.warn(msg) def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/cpp-sort/config.yml b/recipes/cpp-sort/config.yml index c097db627e415..acbaa54fefe9c 100644 --- a/recipes/cpp-sort/config.yml +++ b/recipes/cpp-sort/config.yml @@ -1,4 +1,6 @@ versions: + "1.15.0": + folder: all "1.14.0": folder: all "1.13.2": @@ -15,15 +17,3 @@ versions: folder: all "1.10.0": folder: all - "1.9.0": - folder: all - "1.8.1": - folder: all - "1.8.0": - folder: all - "1.7.0": - folder: all - "1.6.0": - folder: all - "1.5.1": - folder: all From 996236ee01bb0b9b267bb5486fbfdfc4ba555219 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Sat, 19 Aug 2023 14:48:30 -0500 Subject: [PATCH 315/637] (#19263) libgettext/*: Set license as LGPL instead of GPL * libgettext/*: Set license as LGPL instead of GPL The portions of libgettext that we package are licensed under the LGPL, not the GPL. We only package the libgnuintl portion of the libgettext package, which is under the LGPL. This can easily be confirmed by checking the packaged libintl.h header file. This is also documented explicitly by the project here: https://www.gnu.org/software/gettext/manual/gettext.html#Licenses. * Add comment about the licensing --------- Co-authored-by: Carlos Zoido --- recipes/libgettext/all/conanfile.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes/libgettext/all/conanfile.py b/recipes/libgettext/all/conanfile.py index 30249cef99da1..a3d65fe027cb3 100644 --- a/recipes/libgettext/all/conanfile.py +++ b/recipes/libgettext/all/conanfile.py @@ -26,7 +26,11 @@ class GetTextConan(ConanFile): topics = ("gettext", "intl", "libintl", "i18n") url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.gnu.org/software/gettext" - license = "GPL-3.0-or-later" + # Some parts of the project are GPL-3.0-or-later and some are LGPL-2.1-or-later. + # At this time, only libintl is packaged, which is licensed under the LGPL-2.1-or-later. + # If you modify this package to include other portions of the library, please configure the license accordingly. + # The licensing of the project is documented here: https://www.gnu.org/software/gettext/manual/gettext.html#Licenses + license = "LGPL-2.1-or-later" package_type = "library" settings = "os", "arch", "compiler", "build_type" From 9619c12ffe8340643464e7e53a1395c1d12fe9be Mon Sep 17 00:00:00 2001 From: Guillaume Egles Date: Sat, 19 Aug 2023 13:29:58 -0700 Subject: [PATCH 316/637] (#19287) restinio: bump boost & asio deps --- recipes/restinio/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/restinio/all/conanfile.py b/recipes/restinio/all/conanfile.py index 1fec7b581abe4..076732d0bd175 100644 --- a/recipes/restinio/all/conanfile.py +++ b/recipes/restinio/all/conanfile.py @@ -45,9 +45,9 @@ def requirements(self): self.requires("variant-lite/2.0.0") if self.options.asio == "standalone": - self.requires("asio/1.28.0") + self.requires("asio/1.28.1") else: - self.requires("boost/1.82.0") + self.requires("boost/1.83.0") if self.options.with_openssl: self.requires("openssl/[>=1.1 <4]") From 6ebc920a20c12fc326e204cdbebf033d2d463562 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 20 Aug 2023 05:49:06 +0900 Subject: [PATCH 317/637] (#19288) asio-grpc: update boost/1.83.0 --- recipes/asio-grpc/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/asio-grpc/all/conanfile.py b/recipes/asio-grpc/all/conanfile.py index b49ad78283c25..cccd69684782d 100644 --- a/recipes/asio-grpc/all/conanfile.py +++ b/recipes/asio-grpc/all/conanfile.py @@ -58,7 +58,7 @@ def configure(self): def requirements(self): self.requires("grpc/1.50.1") if self._local_allocator_option == "boost_container" or self.options.backend == "boost": - self.requires("boost/1.82.0") + self.requires("boost/1.83.0") if self.options.backend == "asio": self.requires("asio/1.28.1") if self.options.backend == "unifex": From 145004db525be971b4e3664e1ca24a628ff5a671 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 20 Aug 2023 06:33:43 +0900 Subject: [PATCH 318/637] (#19289) asyncly: update dependencies --- recipes/asyncly/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/asyncly/all/conanfile.py b/recipes/asyncly/all/conanfile.py index 1f48e267d577a..bed73f009ac53 100644 --- a/recipes/asyncly/all/conanfile.py +++ b/recipes/asyncly/all/conanfile.py @@ -52,8 +52,8 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.81.0", transitive_headers=True) - self.requires("function2/4.2.2", transitive_headers=True) + self.requires("boost/1.83.0", transitive_headers=True) + self.requires("function2/4.2.3", transitive_headers=True) self.requires("prometheus-cpp/1.1.0", transitive_headers=True) def validate(self): From 91f258b8ebfd01c3e93c1081b6fe2a5640159a24 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Sun, 20 Aug 2023 00:08:55 +0200 Subject: [PATCH 319/637] (#19293) tcl: add version 8.6.13 --- recipes/tcl/all/conandata.yml | 5 +++++ recipes/tcl/config.yml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/recipes/tcl/all/conandata.yml b/recipes/tcl/all/conandata.yml index ddecf77805a4c..027d30d480cf0 100644 --- a/recipes/tcl/all/conandata.yml +++ b/recipes/tcl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "8.6.13": + url: "https://downloads.sourceforge.net/project/tcl/Tcl/8.6.13/tcl8.6.13-src.tar.gz" + sha256: "43a1fae7412f61ff11de2cfd05d28cfc3a73762f354a417c62370a54e2caf066" "8.6.11": url: "https://downloads.sourceforge.net/project/tcl/Tcl/8.6.11/tcl8.6.11-src.tar.gz" sha256: "8c0486668586672c5693d7d95817cb05a18c5ecca2f40e2836b9578064088258" @@ -6,6 +9,8 @@ sources: url: "https://downloads.sourceforge.net/project/tcl/Tcl/8.6.10/tcl8.6.10-src.tar.gz" sha256: "5196dbf6638e3df8d5c87b5815c8c2b758496eb6f0e41446596c9a4e638d87ed" patches: + "8.6.13": + - patch_file: "patches/0001-8.6.11-no-read-only-data.patch" "8.6.11": - patch_file: "patches/0001-8.6.11-no-read-only-data.patch" "8.6.10": diff --git a/recipes/tcl/config.yml b/recipes/tcl/config.yml index 9e60b9c906676..108b4ab57b9c6 100644 --- a/recipes/tcl/config.yml +++ b/recipes/tcl/config.yml @@ -1,4 +1,6 @@ versions: + "8.6.13": + folder: "all" "8.6.11": folder: "all" "8.6.10": From 66d1f88625742e8cf16e4a3fcb54a2f9e32b14f4 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 20 Aug 2023 07:31:12 +0900 Subject: [PATCH 320/637] (#19295) boost-leaf: add version 1.83.0 --- recipes/boost-leaf/all/conandata.yml | 3 +++ recipes/boost-leaf/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/boost-leaf/all/conandata.yml b/recipes/boost-leaf/all/conandata.yml index 7ea0efeaa464d..593e982ab983b 100644 --- a/recipes/boost-leaf/all/conandata.yml +++ b/recipes/boost-leaf/all/conandata.yml @@ -5,3 +5,6 @@ sources: "1.82.0": url: "https://github.com/boostorg/leaf/archive/refs/tags/boost-1.82.0.tar.gz" sha256: "0917b22b60a2980bf5e33a393a8545dc6a4a7006c8ca8b78280d1cdb965d75f3" + "1.83.0": + url: "https://github.com/boostorg/leaf/archive/refs/tags/boost-1.83.0.tar.gz" + sha256: "559b16ac2cd287885104f6d2b93cc777f136d98e89e3b9915013561d893f5128" diff --git a/recipes/boost-leaf/config.yml b/recipes/boost-leaf/config.yml index e86af291ae99f..7468e5b299833 100644 --- a/recipes/boost-leaf/config.yml +++ b/recipes/boost-leaf/config.yml @@ -3,3 +3,5 @@ versions: folder: "all" "1.82.0": folder: "all" + "1.83.0": + folder: "all" From 5183d1be3429c0557cc74d02d8232cf0d68f349a Mon Sep 17 00:00:00 2001 From: tt4g <45120617+tt4g@users.noreply.github.com> Date: Sun, 20 Aug 2023 12:09:16 +0900 Subject: [PATCH 321/637] (#19299) libpqxx: add version 7.8.1 --- recipes/libpqxx/all/conandata.yml | 7 +++++++ recipes/libpqxx/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/libpqxx/all/conandata.yml b/recipes/libpqxx/all/conandata.yml index 9d9a75993b026..be515b537e23b 100644 --- a/recipes/libpqxx/all/conandata.yml +++ b/recipes/libpqxx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "7.8.1": + url: "https://github.com/jtv/libpqxx/archive/refs/tags/7.8.1.tar.gz" + sha256: "0f4c0762de45a415c9fd7357ce508666fa88b9a4a463f5fb76c235bc80dd6a84" "7.8.0": url: "https://github.com/jtv/libpqxx/archive/refs/tags/7.8.0.tar.gz" sha256: "bc471d8d34588f820f38e19e1cc217f399212eef900416cf12f90fab293628af" @@ -45,6 +48,10 @@ sources: url: "https://github.com/jtv/libpqxx/archive/6.4.8.tar.gz" sha256: "3f7aba951822e01f1b9f9f353702954773323dd9f9dc376ffb57cb6bbd9a7a2f" patches: + "7.8.1": + - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" "7.8.0": - patch_file: "patches/0001-cmake-fix-module.patch" patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." diff --git a/recipes/libpqxx/config.yml b/recipes/libpqxx/config.yml index 9ea1691e88502..e221557dc8d32 100644 --- a/recipes/libpqxx/config.yml +++ b/recipes/libpqxx/config.yml @@ -1,4 +1,6 @@ versions: + "7.8.1": + folder: all "7.8.0": folder: all "7.7.5": From b41c9dc55232f4730c500415f1c77050d676bff5 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 20 Aug 2023 12:48:32 +0900 Subject: [PATCH 322/637] (#19300) ftxui: add version 5.0.0 --- recipes/ftxui/all/conandata.yml | 3 +++ recipes/ftxui/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/ftxui/all/conandata.yml b/recipes/ftxui/all/conandata.yml index 9093a5522f932..56009c498942c 100644 --- a/recipes/ftxui/all/conandata.yml +++ b/recipes/ftxui/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.0.0": + url: "https://github.com/ArthurSonzogni/FTXUI/archive/refs/tags/v5.0.0.tar.gz" + sha256: "a2991cb222c944aee14397965d9f6b050245da849d8c5da7c72d112de2786b5b" "4.1.1": url: "https://github.com/ArthurSonzogni/FTXUI/archive/refs/tags/v4.1.1.tar.gz" sha256: "9009d093e48b3189487d67fc3e375a57c7b354c0e43fc554ad31bec74a4bc2dd" diff --git a/recipes/ftxui/config.yml b/recipes/ftxui/config.yml index 727707c7ea721..7747269b92a0d 100644 --- a/recipes/ftxui/config.yml +++ b/recipes/ftxui/config.yml @@ -1,4 +1,6 @@ versions: + "5.0.0": + folder: all "4.1.1": folder: all "4.1.0": From 01f4a35ff2a7b5593b9ed5ed237401524223d96b Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 20 Aug 2023 15:29:06 +0900 Subject: [PATCH 323/637] (#19303) docopt.cpp: update boost/1.83.0 --- recipes/docopt.cpp/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/docopt.cpp/all/conanfile.py b/recipes/docopt.cpp/all/conanfile.py index 0745cc959331b..f91d97fba0892 100644 --- a/recipes/docopt.cpp/all/conanfile.py +++ b/recipes/docopt.cpp/all/conanfile.py @@ -48,7 +48,7 @@ def layout(self): def requirements(self): if self.options.boost_regex: - self.requires("boost/1.81.0") + self.requires("boost/1.83.0") def validate(self): if self.settings.compiler.get_safe("cppstd"): From 1f74b2326ba1db92454486dd53b06e11fb5746d2 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 20 Aug 2023 16:10:12 +0900 Subject: [PATCH 324/637] (#19302) numcpp: update boost/1.83.0 --- recipes/numcpp/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/numcpp/all/conanfile.py b/recipes/numcpp/all/conanfile.py index 9f1e7ec1b42e9..a142a263b7704 100644 --- a/recipes/numcpp/all/conanfile.py +++ b/recipes/numcpp/all/conanfile.py @@ -62,7 +62,7 @@ def layout(self): def requirements(self): if self.options.get_safe("with_boost", True): - self.requires("boost/1.82.0", transitive_headers=True) + self.requires("boost/1.83.0", transitive_headers=True) def package_id(self): self.info.clear() From a1af7a97b2d97197741c4c541a95a5c534b9d41e Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 20 Aug 2023 18:31:28 +0900 Subject: [PATCH 325/637] (#19304) wt: update dependencies --- recipes/wt/all/conanfile.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py index 86da6cd03dedb..630f87115fd10 100644 --- a/recipes/wt/all/conanfile.py +++ b/recipes/wt/all/conanfile.py @@ -96,7 +96,7 @@ def requirements(self): if Version(self.version) < "4.9.0": self.requires("boost/1.80.0", transitive_headers = True) else: - self.requires("boost/1.82.0", transitive_headers = True) + self.requires("boost/1.83.0", transitive_headers = True) if self.options.connector_http: self.requires("zlib/1.2.13") if self.options.with_ssl: @@ -104,13 +104,13 @@ def requirements(self): if self.options.get_safe("with_sqlite"): self.requires("sqlite3/3.42.0") if self.options.get_safe("with_mysql"): - self.requires("libmysqlclient/8.0.31", transitive_headers=True, transitive_libs=True) + self.requires("libmysqlclient/8.0.34", transitive_headers=True, transitive_libs=True) if self.options.get_safe("with_postgres"): - self.requires("libpq/15.3", transitive_headers=True, transitive_libs=True) + self.requires("libpq/15.4", transitive_headers=True, transitive_libs=True) if self.options.get_safe("with_mssql") and self.settings.os != "Windows": self.requires("odbc/2.3.11") if self.options.get_safe("with_unwind"): - self.requires("libunwind/1.7.0") + self.requires("libunwind/1.7.2") def validate(self): miss_boost_required_comp = any(self.dependencies["boost"].options.get_safe(f"without_{boost_comp}", True) From e62b499f6692b095655aa6c2fc1a0b3be6982eb1 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 20 Aug 2023 18:12:01 +0300 Subject: [PATCH 326/637] (#19308) proj: bump libcurl to v8.2.1 --- recipes/proj/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/proj/all/conanfile.py b/recipes/proj/all/conanfile.py index 9afbca02d3ff6..38d4022e8f856 100644 --- a/recipes/proj/all/conanfile.py +++ b/recipes/proj/all/conanfile.py @@ -61,7 +61,7 @@ def requirements(self): if self.options.get_safe("with_tiff"): self.requires("libtiff/4.5.1") if self.options.get_safe("with_curl"): - self.requires("libcurl/8.2.0") + self.requires("libcurl/8.2.1") def build_requirements(self): if not can_run(self): From affcf551748a57ed3c1791a35a097a015696a1ac Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 21 Aug 2023 08:09:22 +0900 Subject: [PATCH 327/637] (#19314) unordered_dense: add version 4.1.0 --- recipes/unordered_dense/all/conandata.yml | 3 +++ recipes/unordered_dense/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/unordered_dense/all/conandata.yml b/recipes/unordered_dense/all/conandata.yml index 5002689bc73b0..9666412e076d6 100644 --- a/recipes/unordered_dense/all/conandata.yml +++ b/recipes/unordered_dense/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.1.0": + url: "https://github.com/martinus/unordered_dense/archive/v4.1.0.tar.gz" + sha256: "0f594cb3b08fc657db3843139000005b6827e5c69d00f5c8d74c1239bd21746f" "4.0.4": url: "https://github.com/martinus/unordered_dense/archive/v4.0.4.tar.gz" sha256: "b34a8c942963e3a647f1bbc192a6391cd56d7ae615b2ddc1601c1779b5792206" diff --git a/recipes/unordered_dense/config.yml b/recipes/unordered_dense/config.yml index f99a8339fb570..11719a7c94623 100644 --- a/recipes/unordered_dense/config.yml +++ b/recipes/unordered_dense/config.yml @@ -1,4 +1,6 @@ versions: + "4.1.0": + folder: all "4.0.4": folder: all "4.0.1": From 1e15e5fa1e44d034959ce7c81b16dcdc1dd3dd2c Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 21 Aug 2023 08:30:52 +0900 Subject: [PATCH 328/637] (#19315) daw_utf_range: update daw_header_libraries --- recipes/daw_utf_range/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/daw_utf_range/all/conanfile.py b/recipes/daw_utf_range/all/conanfile.py index 98739a79d1622..77684e08bfd01 100644 --- a/recipes/daw_utf_range/all/conanfile.py +++ b/recipes/daw_utf_range/all/conanfile.py @@ -38,7 +38,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("daw_header_libraries/2.93.1") + self.requires("daw_header_libraries/2.95.0") def package_id(self): self.info.clear() From 518b2b1f539bf305e777dfa654d90e85415bb3f6 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 21 Aug 2023 08:53:13 +0900 Subject: [PATCH 329/637] (#19317) mp-units: update dependencies --- recipes/mp-units/0.8.0/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/mp-units/0.8.0/conanfile.py b/recipes/mp-units/0.8.0/conanfile.py index b662aae02b390..360e81be61b3d 100644 --- a/recipes/mp-units/0.8.0/conanfile.py +++ b/recipes/mp-units/0.8.0/conanfile.py @@ -59,9 +59,9 @@ def _use_range_v3(self): def requirements(self): self.requires("gsl-lite/0.40.0") if self._use_libfmt: - self.requires("fmt/8.1.1") + self.requires("fmt/10.1.0") if self._use_range_v3: - self.requires("range-v3/0.11.0") + self.requires("range-v3/0.12.0") def validate(self): if self.settings.get_safe("compiler.cppstd"): From 8835eb11fa848825700b3a70fb24b7248130e27d Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 21 Aug 2023 10:50:18 +0900 Subject: [PATCH 330/637] (#19319) mbits-diags: update fmt/10.1.0 --- recipes/mbits-diags/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/mbits-diags/all/conanfile.py b/recipes/mbits-diags/all/conanfile.py index f6c4c3381f0e0..204bf4ed9c3fa 100644 --- a/recipes/mbits-diags/all/conanfile.py +++ b/recipes/mbits-diags/all/conanfile.py @@ -51,7 +51,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("fmt/9.1.0") + self.requires("fmt/10.1.0") self.requires("mbits-semver/0.1.1") def validate(self): From c935340e1971dc74dfce281f5be279b24b742ac0 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 21 Aug 2023 12:48:57 +0900 Subject: [PATCH 331/637] (#19321) mbits-lngs: update fmt/10.1.0 --- recipes/mbits-lngs/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/mbits-lngs/all/conanfile.py b/recipes/mbits-lngs/all/conanfile.py index 2db7f9f7b6cca..49f97626d1e47 100644 --- a/recipes/mbits-lngs/all/conanfile.py +++ b/recipes/mbits-lngs/all/conanfile.py @@ -50,7 +50,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("fmt/9.1.0") + self.requires("fmt/10.1.0") self.requires("mbits-utfconv/1.0.3") self.requires("mbits-diags/0.9.6") self.requires("mbits-mstch/1.0.4") From 822a120ae1fb9224acf757be4b68963e29823c7b Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 21 Aug 2023 17:29:32 +0900 Subject: [PATCH 332/637] (#18895) wasmer: add version 4.1.1 * wasmer: add version 4.1.0 * update 4.1.1 * fix checksum for 4.1.1 --------- Co-authored-by: Carlos Zoido --- recipes/wasmer/all/conandata.yml | 27 +++++++++++++++++++++++++++ recipes/wasmer/config.yml | 2 ++ 2 files changed, 29 insertions(+) diff --git a/recipes/wasmer/all/conandata.yml b/recipes/wasmer/all/conandata.yml index 55462c58cc4d0..9f36767ca9925 100644 --- a/recipes/wasmer/all/conandata.yml +++ b/recipes/wasmer/all/conandata.yml @@ -1,4 +1,31 @@ sources: + "4.1.1": + Windows: + "x86_64": + "Visual Studio": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.1.1/wasmer-windows-amd64.tar.gz" + sha256: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.1.1/wasmer-windows-gnu64.tar.gz" + sha256: "47fb2d9563995fe180fc2a56255f8eb2ffe19de6ee9d512920a7823bc12e66c5" + Linux: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.1.1/wasmer-linux-amd64.tar.gz" + sha256: "778e87bb62748f2899bb06fe1d07ca3038705b996c93e0c28db12ccc032c0c4e" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.1.1/wasmer-linux-aarch64.tar.gz" + sha256: "74cc40fcfe4108c0240137a47704d4f6ade8895c70da25358b471fe32ce47a50" + Macos: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.1.1/wasmer-darwin-amd64.tar.gz" + sha256: "113f58b1560c21607f0011ec6a835bdf109efc2f3be6f200ff8bc8b9591d021e" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.1.1/wasmer-darwin-arm64.tar.gz" + sha256: "5eaf3a3b5a2607dd29f70bf21008140a079662bddf42e75e97da71355a29d961" "4.0.0": Windows: "x86_64": diff --git a/recipes/wasmer/config.yml b/recipes/wasmer/config.yml index 23eb21bb556ff..bac9dd3778328 100644 --- a/recipes/wasmer/config.yml +++ b/recipes/wasmer/config.yml @@ -1,4 +1,6 @@ versions: + "4.1.1": + folder: "all" "4.0.0": folder: "all" "3.2.1": From 2d286525197c33b16cd284a7cd39a422d36caebc Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 21 Aug 2023 11:42:08 +0200 Subject: [PATCH 333/637] (#19313) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index fec7da6449a4b..09348eebe130c 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -123,6 +123,7 @@ required_for_references: - capnproto - capstone - cargs +- cassandra-cpp-driver - catch2 - ccache - cccl @@ -152,6 +153,7 @@ required_for_references: - cli11 - clickhouse-cpp - clipper +- clipper2 - clove-unit - cmake - cmocka @@ -176,6 +178,7 @@ required_for_references: - cpp-optparse - cpp-peglib - cpp-sort +- cpp_project_framework - cppbenchmark - cppcheck - cppcmd @@ -231,6 +234,7 @@ required_for_references: - dbus - debug_assert - decimal_for_cpp +- deco - di - dice-template-library - dirent @@ -255,6 +259,7 @@ required_for_references: - eastl - easy_profiler - easyhttpcpp +- easyloggingpp - ecos - editline - edlib @@ -269,6 +274,7 @@ required_for_references: - emio - enet - enhex-generic_serialization +- enhex-strong_type - entityx - entt - enum-flags @@ -464,6 +470,7 @@ required_for_references: - kainjow-mustache - kaitai_struct_cpp_stl_runtime - kangaru +- kdbindings - keychain - khrplatform - kickcat @@ -752,6 +759,7 @@ required_for_references: - netcdf - nettle - nextsilicon-cpp-subprocess +- nfrechette-acl - ninja - nlohmann_json - nlopt @@ -771,6 +779,7 @@ required_for_references: - nvtx - oatpp - objectbox +- objectbox-generator - observer-ptr-lite - octomap - odbc @@ -872,6 +881,7 @@ required_for_references: - pprint - pranav-csv2 - pretty-name +- procxx-boost-ext-simd - proj - prometheus-cpp - proposal @@ -898,6 +908,7 @@ required_for_references: - qt - quantlib - quaternions +- quickfix - quickjs - quill - quirc @@ -936,6 +947,7 @@ required_for_references: - roaring - robin-hood-hashing - rply +- rtklib - rtm - rtmidi - rttr @@ -949,6 +961,7 @@ required_for_references: - sbepp - sbp - scip +- scippp - scnlib - scons - scope-lite @@ -1015,6 +1028,7 @@ required_for_references: - stduuid - stlab - strawberryperl +- streamvbyte - string-view-lite - stringtoolbox - strong_type @@ -1079,6 +1093,7 @@ required_for_references: - unordered_dense - unqlite - upx +- urdfdom - uriparser - usockets - usrsctp @@ -1103,6 +1118,8 @@ required_for_references: - vulkan-loader - vulkan-memory-allocator - vulkan-validationlayers +- vvenc +- wasm-micro-runtime - wasmer - wasmtime - wasmtime-cpp @@ -1146,6 +1163,7 @@ required_for_references: - xxhash - xxsds-sdsl-lite - xz_utils +- yaclib - yajl - yaml-cpp - yas From 4de58a354a00f6c647f7ed1d0a846954873ad413 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 21 Aug 2023 12:08:33 +0200 Subject: [PATCH 334/637] (#19124) [cgal] add cgal/5.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rubén Rincón Blanco --- recipes/cgal/all/conandata.yml | 3 +++ recipes/cgal/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/cgal/all/conandata.yml b/recipes/cgal/all/conandata.yml index 74b2b15e01e38..eda02a9fb3ec4 100644 --- a/recipes/cgal/all/conandata.yml +++ b/recipes/cgal/all/conandata.yml @@ -14,6 +14,9 @@ sources: "5.5.3": sha256: 0a04f662693256328b05babfabb5e3a5b7db2f5a58d52e3c520df9d0828ddd73 url: https://github.com/CGAL/cgal/releases/download/v5.5.3/CGAL-5.5.3.tar.xz + "5.6": + sha256: dcab9b08a50a06a7cc2cc69a8a12200f8d8f391b9b8013ae476965c10b45161f + url: https://github.com/CGAL/cgal/releases/download/v5.6/CGAL-5.6.tar.xz patches: "5.3.2": - patch_file: "patches/0001-fix-for-conan.patch" diff --git a/recipes/cgal/config.yml b/recipes/cgal/config.yml index e8e1391dbacd3..3d807cdb944c7 100644 --- a/recipes/cgal/config.yml +++ b/recipes/cgal/config.yml @@ -9,3 +9,5 @@ versions: folder: all "5.5.3": folder: all + "5.6": + folder: all From 0e747bf17947be9ffcab34f55e9c483647d8dc37 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 21 Aug 2023 21:48:22 +0900 Subject: [PATCH 335/637] (#18870) ada: add version 2.6.0 * ada: add version 2.6.0 * support rpath, link mathlib * fix rpath issue with proper way --- recipes/ada/all/conandata.yml | 3 +++ recipes/ada/all/conanfile.py | 14 +++++++++++--- recipes/ada/config.yml | 2 ++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/recipes/ada/all/conandata.yml b/recipes/ada/all/conandata.yml index 377c8fab6dad4..97acb278526f5 100644 --- a/recipes/ada/all/conandata.yml +++ b/recipes/ada/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.6.0": + url: "https://github.com/ada-url/ada/archive/v2.6.0.tar.gz" + sha256: "09551bfbd92853e59d731e5f44a88a690425fd2906977ad03a6a1059615a02a5" "2.5.1": url: "https://github.com/ada-url/ada/archive/v2.5.1.tar.gz" sha256: "a7591d771822c3f16e6665311b0c6b4de7dd7615333183f35d89c7573be7f7fa" diff --git a/recipes/ada/all/conanfile.py b/recipes/ada/all/conanfile.py index dcb06ed03de1a..76d787b5a14b7 100644 --- a/recipes/ada/all/conanfile.py +++ b/recipes/ada/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import get, copy, rmdir +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 @@ -69,8 +69,7 @@ def validate(self): ) def build_requirements(self): - if Version(self.version) >= "0.6.0": - self.tool_requires("cmake/[>=3.16 <4]") + self.tool_requires("cmake/[>=3.16 <4]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -78,12 +77,19 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_TESTING"] = False + if Version(self.version) >= "2.4.2": + tc.variables["ADA_TOOLS"] = False tc.generate() deps = CMakeDeps(self) deps.generate() + def _patch_sources(self): + # solve APPLE RELOCATABLE SHARED LIBS (KB-H077) + replace_in_file(self, os.path.join(self.source_folder, "cmake", "ada-flags.cmake"), "set(CMAKE_MACOSX_RPATH OFF)", "") + def build(self): + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() @@ -97,3 +103,5 @@ def package(self): def package_info(self): self.cpp_info.libs = ["ada"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/ada/config.yml b/recipes/ada/config.yml index 7612786acc48c..aa9794668e545 100644 --- a/recipes/ada/config.yml +++ b/recipes/ada/config.yml @@ -1,4 +1,6 @@ versions: + "2.6.0": + folder: all "2.5.1": folder: all "2.5.0": From bfb41d731aa030b9b1ddc3d2b840c6682834bec1 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 21 Aug 2023 22:53:27 +0900 Subject: [PATCH 336/637] (#19318) sbepp: update dependencies * sbepp: update dependencies * separate requires recipe's versions * add comment --- recipes/sbepp/all/conanfile.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/recipes/sbepp/all/conanfile.py b/recipes/sbepp/all/conanfile.py index a444e6edb4d52..550f0466dea48 100644 --- a/recipes/sbepp/all/conanfile.py +++ b/recipes/sbepp/all/conanfile.py @@ -64,8 +64,13 @@ def package_id(self): def requirements(self): if self.options.with_sbeppc: - self.requires("fmt/9.1.0") - self.requires("pugixml/1.12.1") + # sbepp/<1.1.0 requires fmt and pugixml with hardcoded versions + if Version(self.version) < "1.1.0": + self.requires("fmt/9.1.0") + self.requires("pugixml/1.12.1") + else: + self.requires("fmt/10.1.0") + self.requires("pugixml/1.13") def validate(self): if self.settings.compiler.cppstd: From b25ae2c58cace7f85dd31b27750a1e99fbcb7837 Mon Sep 17 00:00:00 2001 From: Guillaume Egles Date: Mon, 21 Aug 2023 07:32:03 -0700 Subject: [PATCH 337/637] (#19320) lyra: make sure libdirs is empty for this header-only library --- recipes/lyra/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/lyra/all/conanfile.py b/recipes/lyra/all/conanfile.py index 184573a6e3fe9..f549011151d40 100644 --- a/recipes/lyra/all/conanfile.py +++ b/recipes/lyra/all/conanfile.py @@ -57,3 +57,4 @@ def package_info(self): self.cpp_info.names["cmake_find_package_multi"] = "bfg" self.cpp_info.components["_lyra"].names["cmake_find_package"] = "lyra" self.cpp_info.components["_lyra"].names["cmake_find_package_multi"] = "lyra" + self.cpp_info.components["_lyra"].libdirs = [] From 25e198edb46e55355ec35958f69f92e952f41a5c Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 21 Aug 2023 17:11:03 +0200 Subject: [PATCH 338/637] (#19233) rtmidi: fix sha256 of 6.0.0 --- recipes/rtmidi/all/conandata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/rtmidi/all/conandata.yml b/recipes/rtmidi/all/conandata.yml index 4359539b48015..9413bb8e98246 100644 --- a/recipes/rtmidi/all/conandata.yml +++ b/recipes/rtmidi/all/conandata.yml @@ -1,7 +1,7 @@ sources: "6.0.0": url: "https://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-6.0.0.tar.gz" - sha256: "3336248e8c1f054ea5e51a4449558490dca51edd324fcde0eea27df33b80a9ed" + sha256: "5960ccf64b42c23400720ccc880e2f205677ce9457f747ef758b598acd64db5b" "5.0.0": url: "https://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-5.0.0.tar.gz" sha256: "48db0ed58c8c0e207b5d7327a0210b5bcaeb50e26387935d02829239b0f3c2b9" From 12ba07d07fb0e6694ee611adf49cbab129f212d6 Mon Sep 17 00:00:00 2001 From: Sergey Avseyev Date: Mon, 21 Aug 2023 18:50:58 +0300 Subject: [PATCH 339/637] (#19294) Bump Taocpp JSON to 1.0.0-beta.14 --- recipes/taocpp-json/all/conandata.yml | 3 +++ recipes/taocpp-json/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/taocpp-json/all/conandata.yml b/recipes/taocpp-json/all/conandata.yml index 732888cb32c08..08a817ecfe94b 100644 --- a/recipes/taocpp-json/all/conandata.yml +++ b/recipes/taocpp-json/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.0-beta.14": + sha256: f9e44a1d6a70a6d39b9e45df76eac928e69f5318e5a957fd5c0efdf45dacaf5e + url: https://github.com/taocpp/json/archive/1.0.0-beta.14.tar.gz "1.0.0-beta.13": sha256: 2513b32d1883277f78071ff1cc55d4f35a979fffdaddf6412d3cb67852ce68b5 url: https://github.com/taocpp/json/archive/1.0.0-beta.13.tar.gz diff --git a/recipes/taocpp-json/config.yml b/recipes/taocpp-json/config.yml index 1c4b5480a0dce..fb0ab49d5fd2c 100644 --- a/recipes/taocpp-json/config.yml +++ b/recipes/taocpp-json/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.0-beta.14": + folder: all "1.0.0-beta.13": folder: all "1.0.0-beta.12": From bbb3bc4e48cd9c57b3ed9a159428fdda98b78e78 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 22 Aug 2023 01:11:19 +0900 Subject: [PATCH 340/637] (#19306) trantor: add version 1.5.12 * trantor: add version 1.5.12 * support gcc5 --- recipes/trantor/all/conandata.yml | 7 +++++++ recipes/trantor/all/conanfile.py | 2 +- .../all/patches/1.5.12-0001-disable-werror.patch | 13 +++++++++++++ recipes/trantor/config.yml | 2 ++ 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 recipes/trantor/all/patches/1.5.12-0001-disable-werror.patch diff --git a/recipes/trantor/all/conandata.yml b/recipes/trantor/all/conandata.yml index 22a2a702c41db..336360051b220 100644 --- a/recipes/trantor/all/conandata.yml +++ b/recipes/trantor/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.5.12": + url: "https://github.com/an-tao/trantor/archive/v1.5.12.tar.gz" + sha256: "3389a2ace83fdc0df7e3e7f9cd9fa9b774f8054889a13a73777c71e2d8e2f364" "1.5.11": url: "https://github.com/an-tao/trantor/archive/v1.5.11.tar.gz" sha256: "3cff9653380f65acaa6ffa191620a2783e866a4552c3408a6919759ce4cfc1dc" @@ -18,6 +21,10 @@ sources: url: "https://github.com/an-tao/trantor/archive/refs/tags/v1.5.5.tar.gz" sha256: "5a549c6efebe7ecba73a944cfba4a9713130704d4ccc82af534a2e108b9a0e71" patches: + "1.5.12": + - patch_file: "patches/1.5.12-0001-disable-werror.patch" + patch_description: "disable -Werror for gcc5" + patch_type: "portability" "1.5.11": - patch_file: "patches/1.5.6-0001-include-cstdint.patch" patch_description: "include cstdint for uint8_t, intmax_t" diff --git a/recipes/trantor/all/conanfile.py b/recipes/trantor/all/conanfile.py index eae8498e37414..8d8c3bbf7e46e 100644 --- a/recipes/trantor/all/conanfile.py +++ b/recipes/trantor/all/conanfile.py @@ -61,7 +61,7 @@ def layout(self): def requirements(self): self.requires("openssl/[>=1.1 <4]") if self.options.with_c_ares: - self.requires("c-ares/1.19.0") + self.requires("c-ares/1.19.1") def validate(self): if self.info.settings.compiler.get_safe("cppstd"): diff --git a/recipes/trantor/all/patches/1.5.12-0001-disable-werror.patch b/recipes/trantor/all/patches/1.5.12-0001-disable-werror.patch new file mode 100644 index 0000000000000..ac4b2f2545dce --- /dev/null +++ b/recipes/trantor/all/patches/1.5.12-0001-disable-werror.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 810c2c1..a4f375d 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -46,7 +46,7 @@ if(BUILD_SHARED_LIBS) + endif(BUILD_SHARED_LIBS) + + if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" AND CMAKE_CXX_COMPILER_ID MATCHES Clang|GNU) +- target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Werror) ++ target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra) + endif() + + if(${CMAKE_SYSTEM_NAME} STREQUAL "Haiku") diff --git a/recipes/trantor/config.yml b/recipes/trantor/config.yml index 57e22ce3a2fae..ceb70d2417086 100644 --- a/recipes/trantor/config.yml +++ b/recipes/trantor/config.yml @@ -1,4 +1,6 @@ versions: + "1.5.12": + folder: "all" "1.5.11": folder: "all" "1.5.10": From bcc21d29665f76caa1a901a1ce7ed9b6eef98d58 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Mon, 21 Aug 2023 19:17:38 +0200 Subject: [PATCH 341/637] (#19311) binutils: add version 2.41 --- recipes/binutils/all/conandata.yml | 7 +++ .../all/patches/2.41-0001-no-texinfo.patch | 57 +++++++++++++++++++ recipes/binutils/config.yml | 2 + 3 files changed, 66 insertions(+) create mode 100644 recipes/binutils/all/patches/2.41-0001-no-texinfo.patch diff --git a/recipes/binutils/all/conandata.yml b/recipes/binutils/all/conandata.yml index 24c6d4be96798..92a40425b2590 100644 --- a/recipes/binutils/all/conandata.yml +++ b/recipes/binutils/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.41": + url: "https://ftp.gnu.org/gnu/binutils/binutils-2.41.tar.gz" + sha256: "48d00a8dc73aa7d2394a7dc069b96191d95e8de8f0da6dc91da5cce655c20e45" "2.40": url: "https://ftp.gnu.org/gnu/binutils/binutils-2.40.tar.gz" sha256: "d7f82c4047decf43a6f769ac32456a92ddb6932409a585c633cdd4e9df23d956" @@ -9,6 +12,10 @@ sources: url: "https://ftp.gnu.org/gnu/binutils/binutils-2.37.tar.gz" sha256: "c44968b97cd86499efbc4b4ab7d98471f673e5414c554ef54afa930062dbbfcb" patches: + "2.41": + - patch_file: "patches/2.41-0001-no-texinfo.patch" + patch_type: conan + patch_description: "disable texinfo" "2.40": - patch_file: "patches/2.40-0001-no-texinfo.patch" patch_type: conan diff --git a/recipes/binutils/all/patches/2.41-0001-no-texinfo.patch b/recipes/binutils/all/patches/2.41-0001-no-texinfo.patch new file mode 100644 index 0000000000000..f6d719e75f24e --- /dev/null +++ b/recipes/binutils/all/patches/2.41-0001-no-texinfo.patch @@ -0,0 +1,57 @@ +diff --git a/bfd/Makefile.in b/bfd/Makefile.in +index 4edfedee..47c7de53 100644 +--- a/bfd/Makefile.in ++++ b/bfd/Makefile.in +@@ -253,7 +253,7 @@ am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@) + am__v_texidevnull_0 = > /dev/null + am__v_texidevnull_1 = + am__dirstamp = $(am__leading_dot)dirstamp +-INFO_DEPS = doc/bfd.info ++INFO_DEPS = + am__TEXINFO_TEX_DIR = $(srcdir) + DVIS = doc/bfd.dvi + PDFS = doc/bfd.pdf +@@ -2022,7 +2022,7 @@ distclean-tags: + check-am: all-am + check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-recursive +-all-am: Makefile $(INFO_DEPS) $(LTLIBRARIES) $(HEADERS) config.h ++all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h + installdirs: installdirs-recursive + installdirs-am: + for dir in "$(DESTDIR)$(bfdlibdir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(bfdincludedir)"; do \ +@@ -2089,8 +2089,7 @@ info: info-recursive + + info-am: $(INFO_DEPS) + +-install-data-am: install-bfdincludeHEADERS install-bfdlibLTLIBRARIES \ +- install-info-am ++install-data-am: install-bfdincludeHEADERS install-bfdlibLTLIBRARIES + + install-dvi: install-dvi-recursive + +diff --git a/gas/Makefile.in b/gas/Makefile.in +index 427f42df..535ad3f3 100644 +--- a/gas/Makefile.in ++++ b/gas/Makefile.in +@@ -1793,7 +1793,7 @@ distclean-DEJAGNU: + check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU + check: check-recursive +-all-am: Makefile $(INFO_DEPS) $(PROGRAMS) $(SCRIPTS) $(MANS) config.h ++all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) config.h + installdirs: installdirs-recursive + installdirs-am: + for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \ +@@ -1869,7 +1869,7 @@ info: info-recursive + + info-am: $(INFO_DEPS) info-local + +-install-data-am: install-info-am install-man ++install-data-am: install-man + + install-dvi: install-dvi-recursive + +-- +2.34.1 + diff --git a/recipes/binutils/config.yml b/recipes/binutils/config.yml index 8d19abd9678f7..97d0d2ecab157 100644 --- a/recipes/binutils/config.yml +++ b/recipes/binutils/config.yml @@ -1,4 +1,6 @@ versions: + "2.41": + folder: all "2.40": folder: all "2.38": From 85a0eeb3950b0037da2ee074537408a999700bc8 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 22 Aug 2023 02:54:09 +0900 Subject: [PATCH 342/637] (#19316) svgwrite: update fmt/10.1.0 --- recipes/svgwrite/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/svgwrite/all/conanfile.py b/recipes/svgwrite/all/conanfile.py index cac9b7b0b66e8..9c1c80b182559 100644 --- a/recipes/svgwrite/all/conanfile.py +++ b/recipes/svgwrite/all/conanfile.py @@ -56,7 +56,7 @@ def layout(self): def requirements(self): self.requires("span-lite/0.10.3", transitive_headers=True) - self.requires("fmt/10.0.0") + self.requires("fmt/10.1.0") def validate(self): if self.settings.compiler.cppstd: From 9db4817d600f2513905dcf7df800a2d5e1c949af Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 21 Aug 2023 21:25:12 +0300 Subject: [PATCH 343/637] (#18090) boostdep: migrate to Conan v2, add v1.82.0 * boostdep: migrate to Conan v2 * boostdep: restore test_v1_package * boostdep: fix permanent redirect in URL Was highlighted by https://repology.org/repository/conancenter/problems --------- Co-authored-by: Daniel --- recipes/boostdep/all/CMakeLists.txt | 7 -- recipes/boostdep/all/conandata.yml | 7 +- recipes/boostdep/all/conanfile.py | 74 +++++++++++-------- .../boostdep/all/test_package/conanfile.py | 27 ++++--- .../boostdep/all/test_v1_package/conanfile.py | 17 +++++ recipes/boostdep/config.yml | 2 + 6 files changed, 82 insertions(+), 52 deletions(-) delete mode 100644 recipes/boostdep/all/CMakeLists.txt create mode 100644 recipes/boostdep/all/test_v1_package/conanfile.py diff --git a/recipes/boostdep/all/CMakeLists.txt b/recipes/boostdep/all/CMakeLists.txt deleted file mode 100644 index 5e53cb70bdf38..0000000000000 --- a/recipes/boostdep/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(source_subfolder) diff --git a/recipes/boostdep/all/conandata.yml b/recipes/boostdep/all/conandata.yml index 3831a32bc89c9..943785c9b1d4a 100644 --- a/recipes/boostdep/all/conandata.yml +++ b/recipes/boostdep/all/conandata.yml @@ -1,6 +1,11 @@ sources: + 1.82.0: + - url: "https://github.com/boostorg/boostdep/archive/refs/tags/boost-1.82.0.tar.gz" + sha256: "b3bffa292709ad74bf2fa50831890161ad7b9ef33f9f4ffa83d474da4482a452" + - url: "https://www.boost.org/LICENSE_1_0.txt" + sha256: "c9bff75738922193e67fa726fa225535870d2aa1059f91452c411736284ad566" 1.75.0: - url: "https://github.com/boostorg/boostdep/archive/boost-1.75.0.tar.gz" sha256: "7eecd835eb5b0fd602ff3615a6b663b45917689386d11073d961b86710f428af" - - url: "http://www.boost.org/LICENSE_1_0.txt" + - url: "https://www.boost.org/LICENSE_1_0.txt" sha256: "c9bff75738922193e67fa726fa225535870d2aa1059f91452c411736284ad566" diff --git a/recipes/boostdep/all/conanfile.py b/recipes/boostdep/all/conanfile.py index 01a84ccc90d69..bd8dd57eb93dc 100644 --- a/recipes/boostdep/all/conanfile.py +++ b/recipes/boostdep/all/conanfile.py @@ -1,58 +1,68 @@ -from conans import CMake, ConanFile, tools import os +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, download, get + +required_conan_version = ">=1.52.0" + class BoostDepConan(ConanFile): name = "boostdep" - settings = "os", "arch", "compiler", "build_type" description = "A tool to create Boost module dependency reports" + license = "BSL-1.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/boostorg/boostdep" - license = "BSL-1.0" - topics = ("conan", "boostdep", "dependency", "tree") - exports_sources = "CMakeLists.txt" - generators = "cmake", "cmake_find_package" + topics = ("dependency", "tree") - _cmake = None + package_type = "application" + settings = "os", "arch", "compiler", "build_type" - @property - def _source_subfolder(self): - return "source_subfolder" + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) - @property - def _build_subfolder(self): - return "build_subfolder" + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.75.0") + self.requires(f"boost/{self.version}") def package_id(self): del self.info.settings.compiler def source(self): - tools.get(**self.conan_data["sources"][self.version][0]) - os.rename("boostdep-boost-{}".format(self.version), self._source_subfolder) - license_info = self.conan_data["sources"][self.version][1] - tools.download(filename=os.path.basename(license_info["url"]), **license_info) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["Boost_USE_STATIC_LIBS"] = not self.options["boost"].shared - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + sources_info, license_info = self.conan_data["sources"][self.version] + get(self, **sources_info, strip_root=True) + download(self, **license_info, filename=os.path.basename(license_info["url"])) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["Boost_USE_STATIC_LIBS"] = not self.dependencies["boost"].options.shared + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("LICENSE*", dst="licenses") - cmake = self._configure_cmake() + copy( + self, + "LICENSE*", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder, + ) + cmake = CMake(self) cmake.install() def package_info(self): - bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) - self.deps_env_info.PATH.append(bin_path) + self.cpp_info.frameworkdirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] + self.cpp_info.includedirs = [] + + # TODO: Legacy, to be removed on Conan 2.0 + bin_folder = os.path.join(self.package_folder, "bin") + self.env_info.PATH.append(bin_folder) diff --git a/recipes/boostdep/all/test_package/conanfile.py b/recipes/boostdep/all/test_package/conanfile.py index 190cc18502e11..2b15ef763d620 100644 --- a/recipes/boostdep/all/test_package/conanfile.py +++ b/recipes/boostdep/all/test_package/conanfile.py @@ -1,17 +1,20 @@ -from conans import ConanFile, tools -import os +from conan import ConanFile +from conan.tools.env import Environment +from conan.tools.files import mkdir, save -class DefaultNameConan(ConanFile): - settings = "os", "compiler", "arch", "build_type" +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "VirtualBuildEnv" + test_type = "explicit" - def build(self): - pass + def build_requirements(self): + self.tool_requires(self.tested_reference_str) def test(self): - if tools.cross_building(self.settings): - return - tools.mkdir("libs") - tools.save("Jamroot", "") - with tools.environment_append({"BOOST_ROOT": self.build_folder}): - self.run("boostdep --list-modules", run_environment=True) + mkdir(self, "libs") + save(self, "Jamroot", "") + env = Environment() + env.define("BOOST_ROOT", self.build_folder) + with env.vars(self).apply(): + self.run("boostdep --list-modules") diff --git a/recipes/boostdep/all/test_v1_package/conanfile.py b/recipes/boostdep/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..190cc18502e11 --- /dev/null +++ b/recipes/boostdep/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, tools +import os + + +class DefaultNameConan(ConanFile): + settings = "os", "compiler", "arch", "build_type" + + def build(self): + pass + + def test(self): + if tools.cross_building(self.settings): + return + tools.mkdir("libs") + tools.save("Jamroot", "") + with tools.environment_append({"BOOST_ROOT": self.build_folder}): + self.run("boostdep --list-modules", run_environment=True) diff --git a/recipes/boostdep/config.yml b/recipes/boostdep/config.yml index 640761587c2ae..1cbe5a69a954f 100644 --- a/recipes/boostdep/config.yml +++ b/recipes/boostdep/config.yml @@ -1,3 +1,5 @@ versions: + "1.82.0": + folder: "all" "1.75.0": folder: "all" From bbb7def8d09c938fcd90d4a905c9b8a87880a4f6 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 21 Aug 2023 21:51:46 +0300 Subject: [PATCH 344/637] (#19245) fpgen: use lazy_lt_semver() in validate() * fpgen: use lazy_lt_semver() in validate() * fpgen: remove unused imports --- recipes/fpgen/all/conanfile.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/recipes/fpgen/all/conanfile.py b/recipes/fpgen/all/conanfile.py index 46fc8ca2ceba0..5d2f0cf538ac5 100644 --- a/recipes/fpgen/all/conanfile.py +++ b/recipes/fpgen/all/conanfile.py @@ -3,9 +3,8 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd -from conan.tools.files import copy, get, replace_in_file +from conan.tools.files import copy, get from conan.tools.layout import basic_layout -from conan.tools.scm import Version required_conan_version = ">=1.52.0" @@ -49,8 +48,12 @@ def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) + def lazy_lt_semver(v1, v2): + # Needed to allow version "13" >= "13.1" for apple-clang + return all(int(p1) < int(p2) for p1, p2 in zip(v1.split("."), v2.split("."))) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and Version(self.settings.compiler.version) < minimum_version: + if minimum_version and lazy_lt_semver(str(self.settings.compiler.version), minimum_version): raise ConanInvalidConfiguration( f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) From 428a749939c50f63a85ac846db447d38007303b7 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 21 Aug 2023 22:05:43 +0300 Subject: [PATCH 345/637] (#18260) pipes: migrate to Conan v2 * pipes: migrate to Conan v2 * pipes: restore test_v1_package * pipes: restore VirtualRunEnv in test_package * pipes: dont add test_v1_package --------- Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> --- recipes/pipes/all/conanfile.py | 55 ++++++++++++------- recipes/pipes/all/test_package/CMakeLists.txt | 5 +- recipes/pipes/all/test_package/conanfile.py | 22 ++++++-- .../pipes/all/test_package/test_package.cpp | 6 +- 4 files changed, 56 insertions(+), 32 deletions(-) diff --git a/recipes/pipes/all/conanfile.py b/recipes/pipes/all/conanfile.py index 70bc84cbc789f..c2e8937d21d4a 100644 --- a/recipes/pipes/all/conanfile.py +++ b/recipes/pipes/all/conanfile.py @@ -1,20 +1,26 @@ -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration import os +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + + class PipesConan(ConanFile): name = "pipes" description = "Pipelines for expressive code on collections in C++" license = "MIT" - topics = ("pipes", "functional-programming") - homepage = "https://github.com/joboccara/pipes" url = "https://github.com/conan-io/conan-center-index" - settings = "compiler" - no_copy_source = True + homepage = "https://github.com/joboccara/pipes" + topics = ("functional-programming", "header-only") - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True @property def _minimum_cpp_standard(self): @@ -31,23 +37,30 @@ def _minimum_compilers_version(self): def configure(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, self._minimum_cpp_standard) + check_min_cppstd(self, self._minimum_cpp_standard) min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) if not min_version: - self.output.warn("{} recipe lacks information about the {} compiler support.".format( - self.name, self.settings.compiler)) + self.output.warning(f"{self.name} recipe lacks information about the {self.settings.compiler} compiler support.") else: - if tools.Version(self.settings.compiler.version) < min_version: - raise ConanInvalidConfiguration("{} requires C++{} support. The current compiler {} {} does not support it.".format( - self.name, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler.version)) + if Version(self.settings.compiler.version) < min_version: + raise ConanInvalidConfiguration( + f"{self.name} requires C++{self._minimum_cpp_standard} support. The current compiler" + f" {self.settings.compiler} {self.settings.compiler.version} does not support it." + ) + + def layout(self): + basic_layout(self, src_folder="src") def package_id(self): - self.info.header_only() - + self.info.clear() + def source(self): - tools.get(**self.conan_data["sources"][self.version]) - os.rename("pipes-{}".format(self.version), self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - self.copy("*.hpp", dst="include", src=os.path.join(self._source_subfolder, "include"), keep_path=True) + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "*.hpp", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include"), keep_path=True) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/pipes/all/test_package/CMakeLists.txt b/recipes/pipes/all/test_package/CMakeLists.txt index f24c18a1bb2e1..39ba4f454e712 100644 --- a/recipes/pipes/all/test_package/CMakeLists.txt +++ b/recipes/pipes/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(pipes REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/pipes/all/test_package/conanfile.py b/recipes/pipes/all/test_package/conanfile.py index 910ae60d10438..ef5d7042163ec 100644 --- a/recipes/pipes/all/test_package/conanfile.py +++ b/recipes/pipes/all/test_package/conanfile.py @@ -1,9 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -11,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/pipes/all/test_package/test_package.cpp b/recipes/pipes/all/test_package/test_package.cpp index 5279bc00ec63c..2050756e502b3 100644 --- a/recipes/pipes/all/test_package/test_package.cpp +++ b/recipes/pipes/all/test_package/test_package.cpp @@ -1,6 +1,10 @@ -#include +// Workaround for pipes not finding size_t +#include + #include +#include + int main() { auto source = std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; auto destination = std::vector{}; From d6de8f71f77ceff8cd3851de97737f8a9b20378c Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 21 Aug 2023 22:48:12 +0300 Subject: [PATCH 346/637] (#18789) libxft: migrate to Conan v2, add v2.3.8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * libxft: migrate to Conan v2 * libxft: add 2.3.8 * libxft: restore VirtualRunEnv in test_package * libxft: bump deps --------- Co-authored-by: Rubén Rincón Blanco --- recipes/libxft/all/conandata.yml | 4 +- recipes/libxft/all/conanfile.py | 96 ++++++++++--------- .../libxft/all/test_package/CMakeLists.txt | 5 +- recipes/libxft/all/test_package/conanfile.py | 21 ++-- .../libxft/all/test_v1_package/CMakeLists.txt | 8 ++ .../libxft/all/test_v1_package/conanfile.py | 17 ++++ recipes/libxft/config.yml | 2 + 7 files changed, 98 insertions(+), 55 deletions(-) create mode 100644 recipes/libxft/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/libxft/all/test_v1_package/conanfile.py diff --git a/recipes/libxft/all/conandata.yml b/recipes/libxft/all/conandata.yml index e56e888b5fdb6..83115b8c226aa 100644 --- a/recipes/libxft/all/conandata.yml +++ b/recipes/libxft/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.3.8": + url: "https://www.x.org/archive/individual/lib/libXft-2.3.8.tar.xz" + sha256: "5e8c3c4bc2d4c0a40aef6b4b38ed2fb74301640da29f6528154b5009b1c6dd49" "2.3.6": url: "https://www.x.org/archive/individual/lib/libXft-2.3.6.tar.gz" sha256: "b7e59f69e0bbabe9438088775f7e5a7c16a572e58b11f9722519385d38192df5" @@ -11,4 +14,3 @@ patches: patch_description: "fix gcc 5 and gcc 11 compilation" patch_type: "portability" patch_source: "https://gitlab.freedesktop.org/xorg/lib/libxft/-/merge_requests/17" - base_path: "source_subfolder" diff --git a/recipes/libxft/all/conanfile.py b/recipes/libxft/all/conanfile.py index c237fe2cfea9c..6029ce556514a 100644 --- a/recipes/libxft/all/conanfile.py +++ b/recipes/libxft/all/conanfile.py @@ -1,78 +1,86 @@ +import os + from conan import ConanFile -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, chdir, rm, rmdir -from conans import AutoToolsBuildEnvironment -import functools +from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, rm, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain, PkgConfigDeps +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.53.0" -required_conan_version = ">=1.52.0" class libxftConan(ConanFile): name = "libxft" - description = 'X FreeType library' - topics = ("libxft", "x11", "xorg") + description = "X FreeType library" + license = "X11" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.x.org/wiki/" - license = "X11" + topics = ("x11", "xorg") + package_type = "library" settings = "os", "arch", "compiler", "build_type" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} - generators = "pkg_config" - - @property - def _source_subfolder(self): - return "source_subfolder" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } def export_sources(self): export_conandata_patches(self) + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + basic_layout(self, src_folder="src") + def requirements(self): self.requires("xorg/system") - self.requires("freetype/2.13.0") - self.requires("fontconfig/2.14.2") + self.requires("freetype/2.13.0", transitive_headers=True) + self.requires("fontconfig/2.14.2", transitive_headers=True) def build_requirements(self): - self.build_requires("pkgconf/1.9.3") - self.build_requires("xorg-macros/1.19.3") - self.build_requires("libtool/2.4.7") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/1.9.5") + self.tool_requires("xorg-macros/1.19.3") + self.tool_requires("libtool/2.4.7") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def configure(self): - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd - if self.options.shared: - del self.options.fPIC + get(self, **self.conan_data["sources"][self.version], strip_root=True) - @functools.lru_cache(1) - def _configure_autotools(self): - args = ["--disable-dependency-tracking"] - if self.options.shared: - args.extend(["--disable-static", "--enable-shared"]) - else: - args.extend(["--disable-shared", "--enable-static"]) - autotools = AutoToolsBuildEnvironment(self) - autotools.configure(args=args, pkg_config_paths=self.build_folder) - return autotools + def generate(self): + tc = AutotoolsToolchain(self) + tc.configure_args.append("--disable-dependency-tracking") + tc.generate() + tc = PkgConfigDeps(self) + tc.generate() def build(self): apply_conandata_patches(self) - with chdir(self, self._source_subfolder): - autotools = self._configure_autotools() + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.configure() autotools.make() def package(self): - self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) - self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder) - with chdir(self, self._source_subfolder): - autotools = self._configure_autotools() + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + with chdir(self, self.source_folder): + autotools = Autotools(self) autotools.install(args=["-j1"]) rm(self, "*.la", f"{self.package_folder}/lib", recursive=True) rmdir(self, f"{self.package_folder}/lib/pkgconfig") rmdir(self, f"{self.package_folder}/share") def package_info(self): - self.cpp_info.names['pkg_config'] = "Xft" self.cpp_info.set_property("pkg_config_name", "xft") self.cpp_info.libs = ["Xft"] diff --git a/recipes/libxft/all/test_package/CMakeLists.txt b/recipes/libxft/all/test_package/CMakeLists.txt index e55ad61e844f5..71362aacc231a 100644 --- a/recipes/libxft/all/test_package/CMakeLists.txt +++ b/recipes/libxft/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(libxft REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) diff --git a/recipes/libxft/all/test_package/conanfile.py b/recipes/libxft/all/test_package/conanfile.py index 49a3a66ea5bad..ef5d7042163ec 100644 --- a/recipes/libxft/all/test_package/conanfile.py +++ b/recipes/libxft/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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -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/libxft/all/test_v1_package/CMakeLists.txt b/recipes/libxft/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libxft/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libxft/all/test_v1_package/conanfile.py b/recipes/libxft/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/libxft/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + 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) diff --git a/recipes/libxft/config.yml b/recipes/libxft/config.yml index 6caf25620b5dc..d3f36d4632aef 100644 --- a/recipes/libxft/config.yml +++ b/recipes/libxft/config.yml @@ -1,4 +1,6 @@ versions: + "2.3.8": + folder: all "2.3.6": folder: all "2.3.4": From a69ce31763e8eb90654b740ed6c3f3f5c47d486d Mon Sep 17 00:00:00 2001 From: Guillaume Egles Date: Mon, 21 Aug 2023 15:50:13 -0700 Subject: [PATCH 347/637] (#19284) fmt: make sure libdirs is empty when header_only=True --- recipes/fmt/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/fmt/all/conanfile.py b/recipes/fmt/all/conanfile.py index 862834c358047..ab898ea991411 100644 --- a/recipes/fmt/all/conanfile.py +++ b/recipes/fmt/all/conanfile.py @@ -118,9 +118,9 @@ def package_info(self): if self.options.header_only: self.cpp_info.components["_fmt"].defines.append("FMT_HEADER_ONLY=1") + self.cpp_info.components["_fmt"].libdirs = [] + self.cpp_info.components["_fmt"].bindirs = [] - self.cpp_info.libdirs = [] - self.cpp_info.bindirs = [] else: postfix = "d" if self.settings.build_type == "Debug" else "" libname = "fmt" + postfix From 663bf81b7c803d8a8d340158353ba59a5e4393e6 Mon Sep 17 00:00:00 2001 From: Guillaume Egles Date: Mon, 21 Aug 2023 16:50:33 -0700 Subject: [PATCH 348/637] (#19285) boost: make sure libdirs is empty when header_only=True --- recipes/boost/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index d845fca4e54da..d6c700ab42217 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -1444,6 +1444,7 @@ def package_info(self): # - Use '_libboost' component to attach extra system_libs, ... self.cpp_info.components["headers"].libs = [] + self.cpp_info.components["headers"].libdirs = [] self.cpp_info.components["headers"].set_property("cmake_target_name", "Boost::headers") self.cpp_info.components["headers"].names["cmake_find_package"] = "headers" self.cpp_info.components["headers"].names["cmake_find_package_multi"] = "headers" From a43316eea703d954294cc6140bcaf24505ee7245 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 22 Aug 2023 10:29:59 +0200 Subject: [PATCH 349/637] (#19307) onnxruntime: bump deps --- recipes/onnxruntime/all/conandata.yml | 4 ++ recipes/onnxruntime/all/conanfile.py | 4 +- .../all/patches/1.14.1-0005-re2-compat.patch | 41 +++++++++++++++++++ 3 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 recipes/onnxruntime/all/patches/1.14.1-0005-re2-compat.patch diff --git a/recipes/onnxruntime/all/conandata.yml b/recipes/onnxruntime/all/conandata.yml index 4a029ad509a2b..c1f4ac489cb97 100644 --- a/recipes/onnxruntime/all/conandata.yml +++ b/recipes/onnxruntime/all/conandata.yml @@ -28,3 +28,7 @@ patches: - patch_file: "patches/1.14.1-0004-abseil-no-string-view.patch" patch_description: "allow to build with abseil built without c++17 support" patch_type: "portability" + - patch_file: "patches/1.14.1-0005-re2-compat.patch" + patch_description: "Ensures the forward compatibility with the newest versions of re2 library." + patch_type: "portability" + patch_source: "https://github.com/microsoft/onnxruntime/commit/126e7bf15fa4af8621814b82a3f7bd0d786f0239.patch" diff --git a/recipes/onnxruntime/all/conanfile.py b/recipes/onnxruntime/all/conanfile.py index f8951c6e25374..d9a55a421eb6f 100644 --- a/recipes/onnxruntime/all/conanfile.py +++ b/recipes/onnxruntime/all/conanfile.py @@ -75,10 +75,10 @@ def requirements(self): self.requires("abseil/20230125.3") self.requires("protobuf/3.21.9") self.requires("date/3.0.1") - self.requires("re2/20230301") + self.requires("re2/20230801") self.requires(f"onnx/{self._onnx_version}") self.requires("flatbuffers/1.12.0") - self.requires("boost/1.82.0", headers=True, libs=False, run=False) # for mp11, header only, no need for libraries to link/run + self.requires("boost/1.83.0", headers=True, libs=False, run=False) # for mp11, header only, no need for libraries to link/run self.requires("safeint/3.0.28") self.requires("nlohmann_json/3.11.2") self.requires("eigen/3.4.0") diff --git a/recipes/onnxruntime/all/patches/1.14.1-0005-re2-compat.patch b/recipes/onnxruntime/all/patches/1.14.1-0005-re2-compat.patch new file mode 100644 index 0000000000000..c8e0cc9d9a48e --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.14.1-0005-re2-compat.patch @@ -0,0 +1,41 @@ +From a3a443c80431c390cbf8855e9c7b2a95d413cd54 Mon Sep 17 00:00:00 2001 +From: Yuriy Chernyshov +Date: Thu, 8 Jun 2023 20:26:26 +0200 +Subject: [PATCH] Support re2 == 2023-06-02 (#16257) + +### Description + +google/re2 [was +switched](https://github.com/google/re2/commit/49d776b9d29d79b6e2876d5f091d2207d8123dfa) +to absl::string_view in version 2023-06-02. + +As `absl::string_view` is a drop-in replacement for `std::string_view` +it does not have `as_string()` method. +This PR ensures the forward compatibility with the newest versions of +re2 library. +--- + onnxruntime/contrib_ops/cpu/tokenizer.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/onnxruntime/contrib_ops/cpu/tokenizer.cc b/onnxruntime/contrib_ops/cpu/tokenizer.cc +index 45998b6d8310..1787fb9b3c4a 100644 +--- a/onnxruntime/contrib_ops/cpu/tokenizer.cc ++++ b/onnxruntime/contrib_ops/cpu/tokenizer.cc +@@ -242,7 +242,7 @@ Status Tokenizer::SeparatorExpressionTokenizer(OpKernelContext* ctx, + token_len, utf8_chars); + if (!valid) { + return Status(common::ONNXRUNTIME, common::INVALID_ARGUMENT, +- "Match contains invalid utf8 chars: " + submatch.as_string()); ++ "Match contains invalid utf8 chars: " + std::string{submatch}); + } + if (utf8_chars >= size_t(mincharnum_)) { + tokens.emplace_back(text.data() + start_pos, token_len); +@@ -384,7 +384,7 @@ Status Tokenizer::TokenExpression(OpKernelContext* ctx, + utf8_chars = 0; + if (!utf8_len(reinterpret_cast(submatch.data()), token_len, utf8_chars)) { + return Status(common::ONNXRUNTIME, common::INVALID_ARGUMENT, +- "Match contains invalid utf8 chars: " + submatch.as_string()); ++ "Match contains invalid utf8 chars: " + std::string{submatch}); + } + if (utf8_chars >= size_t(mincharnum_)) { + row.push_back(submatch); From 370c77465cdfe3d4424dd0cef126c45aaabb21cc Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 22 Aug 2023 12:08:49 +0300 Subject: [PATCH 350/637] (#18832) opentdf-client: migrate to Conan v2 * opentdf-client: migrate to Conan v2 * opentdf-client: restore VirtualRunEnv in test_package * opentdf-client: resolve conflicts and remove old versions * opentdf-client fix config.yml * opentdf fixes for Conan 2.0 * opentdf client: remove test_v1_package * opentdf-client: fix patches for install location --------- Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> --- recipes/opentdf-client/all/CMakeLists.txt | 9 - .../all/conan_cmake_project_include.cmake | 11 ++ recipes/opentdf-client/all/conandata.yml | 48 +++--- recipes/opentdf-client/all/conanfile.py | 154 +++++++++++------- .../all/patches/1.1.6-0001-cmake-fixes.patch | 51 ++++++ .../all/patches/1.3.10-0001-cmake-fixes.patch | 51 ++++++ .../all/test_package/CMakeLists.txt | 9 +- .../all/test_package/conanfile.py | 22 ++- recipes/opentdf-client/config.yml | 18 -- 9 files changed, 246 insertions(+), 127 deletions(-) delete mode 100644 recipes/opentdf-client/all/CMakeLists.txt create mode 100644 recipes/opentdf-client/all/conan_cmake_project_include.cmake create mode 100644 recipes/opentdf-client/all/patches/1.1.6-0001-cmake-fixes.patch create mode 100644 recipes/opentdf-client/all/patches/1.3.10-0001-cmake-fixes.patch diff --git a/recipes/opentdf-client/all/CMakeLists.txt b/recipes/opentdf-client/all/CMakeLists.txt deleted file mode 100644 index 93dc9e86f93f9..0000000000000 --- a/recipes/opentdf-client/all/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(opentdf-client) - -set(CMAKE_CXX_STANDARD 17) - -include(${CMAKE_SOURCE_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory(source_subfolder) diff --git a/recipes/opentdf-client/all/conan_cmake_project_include.cmake b/recipes/opentdf-client/all/conan_cmake_project_include.cmake new file mode 100644 index 0000000000000..795904b844ae4 --- /dev/null +++ b/recipes/opentdf-client/all/conan_cmake_project_include.cmake @@ -0,0 +1,11 @@ +find_package(Boost REQUIRED) +find_package(OpenSSL REQUIRED) +find_package(Microsoft.GSL REQUIRED) +find_package(nlohmann_json REQUIRED) +find_package(libxml2 REQUIRED) +find_package(jwt-cpp REQUIRED) +find_package(ZLIB REQUIRED) +if(opentdf_VERSION VERSION_GREATER_EQUAL "1.4.0") + find_package(magic_enum REQUIRED) +endif() +link_libraries(Boost::boost OpenSSL::SSL Microsoft.GSL::GSL nlohmann_json::nlohmann_json LibXml2::LibXml2 jwt-cpp::jwt-cpp $ ZLIB::ZLIB) diff --git a/recipes/opentdf-client/all/conandata.yml b/recipes/opentdf-client/all/conandata.yml index 382304e4f3de0..ead069b25a72d 100644 --- a/recipes/opentdf-client/all/conandata.yml +++ b/recipes/opentdf-client/all/conandata.yml @@ -8,36 +8,30 @@ sources: "1.3.10": url: "https://github.com/opentdf/client-cpp/archive/1.3.10.tar.gz" sha256: "539bd5e64bceb86f63b3f7db75de470d5ea1d52ae6436a6a2d6789f7d0710dd4" - "1.3.9": - url: "https://github.com/opentdf/client-cpp/archive/1.3.9.tar.gz" - sha256: "8fdd88d90afe865ca86261c26abd1ca5e9895261490252199b7f9d4910ca0b49" - "1.3.8": - url: "https://github.com/opentdf/client-cpp/archive/1.3.8.tar.gz" - sha256: "0d73bd17f6d211c04136239e1db630e1ab320a6e41bd5c18533c44381519842c" - "1.3.6": - url: "https://github.com/opentdf/client-cpp/archive/1.3.6.tar.gz" - sha256: "e0d4cf1d0b1824d903a2b0ec1da528acb42623e32f3ca36aa28b2e950c3cc7a0" - "1.3.4": - url: "https://github.com/opentdf/client-cpp/archive/1.3.4.tar.gz" - sha256: "4b9836bff368249b709fc40e67c3a8664fed85a5d8247475ca1f741486210409" - "1.3.3": - url: "https://github.com/opentdf/client-cpp/archive/1.3.3.tar.gz" - sha256: "7949e662dc55a425771e5ecf2d96e25295d1e2394e805608aed72d1131896948" - "1.3.2": - url: "https://github.com/opentdf/client-cpp/archive/1.3.2.tar.gz" - sha256: "d9a38d3aa6114159c90e0c254c78ddda921e2d520851e4def57f3cd26c564b16" "1.2.0": url: "https://github.com/opentdf/client-cpp/archive/1.2.0.tar.gz" sha256: "15828038809ed291ff7881206a675abc5162e1175c8b515363b9c584aebb08f7" "1.1.6": url: "https://github.com/opentdf/client-cpp/archive/1.1.6.tar.gz" sha256: "83992c37c9a58ae2152660a4ffbf1784fe63d7a9e7b8466d10ca1074697b3d3a" - "1.1.5": - url: "https://github.com/opentdf/client-cpp/archive/1.1.5.tar.gz" - sha256: "8fd5b22b36b19cd58a18f63cbffe3d538263ef3aecde4802059951c4eb5ce044" - "1.1.3": - url: "https://github.com/opentdf/client-cpp/archive/1.1.3.tar.gz" - sha256: "67855999010f9c1496e170ad885f73b854f91eb1539e3c20d74b162295d5c732" - "1.1.2": - url: "https://github.com/opentdf/client-cpp/archive/1.1.2.tar.gz" - sha256: "4e41a18ef9d47aa9f964beffa78fdd4290a5f50336c6e4dc3c9bf2dd4b075d10" +patches: + "1.1.6": + - patch_file: "patches/1.1.6-0001-cmake-fixes.patch" + patch_description: "CMake build fixes for Conan 2.0-compatible recipe" + patch_type: "conan" + "1.2.0": + - patch_file: "patches/1.1.6-0001-cmake-fixes.patch" + patch_description: "CMake build fixes for Conan 2.0-compatible recipe" + patch_type: "conan" + "1.3.10": + - patch_file: "patches/1.3.10-0001-cmake-fixes.patch" + patch_description: "CMake build fixes for Conan 2.0-compatible recipe" + patch_type: "conan" + "1.4.0": + - patch_file: "patches/1.3.10-0001-cmake-fixes.patch" + patch_description: "CMake build fixes for Conan 2.0-compatible recipe" + patch_type: "conan" + "1.5.0": + - patch_file: "patches/1.3.10-0001-cmake-fixes.patch" + patch_description: "CMake build fixes for Conan 2.0-compatible recipe" + patch_type: "conan" diff --git a/recipes/opentdf-client/all/conanfile.py b/recipes/opentdf-client/all/conanfile.py index 1c4773399329b..e22c9867361c7 100644 --- a/recipes/opentdf-client/all/conanfile.py +++ b/recipes/opentdf-client/all/conanfile.py @@ -1,35 +1,38 @@ -from conans import CMake +import os + from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import get, copy, patch 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.files import apply_conandata_patches, export_conandata_patches, replace_in_file, get, copy from conan.tools.microsoft import is_msvc_static_runtime -import functools -import os +from conan.tools.scm import Version -required_conan_version = ">=1.51.3" +required_conan_version = ">=1.53.0" class OpenTDFConan(ConanFile): name = "opentdf-client" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://www.virtru.com" - topics = ("opentdf", "opentdf-client", "tdf", "virtru") description = "openTDF core c++ client library for creating and accessing TDF protected data" license = "BSD-3-Clause-Clear" - generators = "cmake", "cmake_find_package" - settings = "os", "arch", "compiler", "build_type" - options = {"fPIC": [True, False]} - default_options = {"fPIC": True} + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.virtru.com" + topics = ("opentdf", "tdf", "virtru") - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } - @property - def _build_subfolder(self): - return "build_subfolder" + def export_sources(self): + copy(self, "conan_cmake_project_include.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) + export_conandata_patches(self) @property def _minimum_cpp_standard(self): @@ -45,25 +48,16 @@ def _minimum_compilers_version(self): "apple-clang": "12.0.0", } - def export_sources(self): - self.copy("CMakeLists.txt") - for data in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(data["patch_file"]) + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC - def validate(self): - # check minimum cpp standard supported by compiler - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, self._minimum_cpp_standard) - # check minimum version of compiler - min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) - if not min_version: - self.output.warn(f'{self.name} recipe lacks information about the {self.settings.compiler} compiler support.') - else: - if Version(self.settings.compiler.version) < min_version: - raise ConanInvalidConfiguration(f'{self.name} requires {self.settings.compiler} {self.settings.compiler.version} but found {min_version}') - # Disallow MT and MTd - if is_msvc_static_runtime(self): - raise ConanInvalidConfiguration(f'{self.name} can not be built with MT or MTd at this time') + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): # Uses openssl 3.x for 1.5.0 and newer @@ -77,55 +71,95 @@ def requirements(self): self.requires("ms-gsl/2.1.0") self.requires("nlohmann_json/3.11.1") self.requires("jwt-cpp/0.4.0") + self.requires("zlib/1.2.13") # Use newer boost+libxml2 after 1.3.6 if Version(self.version) <= "1.3.6": self.requires("boost/1.79.0") self.requires("libxml2/2.9.14") else: - self.requires("boost/1.81.0") - self.requires("libxml2/2.10.3") + self.requires("boost/1.82.0") + self.requires("libxml2/2.11.4") - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._minimum_cpp_standard) + # check minimum version of compiler + min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) + if not min_version: + self.output.warning( + f"{self.name} recipe lacks information about the {self.settings.compiler} compiler support." + ) + else: + if Version(self.settings.compiler.version) < min_version: + raise ConanInvalidConfiguration( + f"{self.name} requires {self.settings.compiler} {self.settings.compiler.version} " + f"but found {min_version}" + ) + # Disallow MT and MTd + if is_msvc_static_runtime(self): + raise ConanInvalidConfiguration(f"{self.name} can not be built with MT or MTd at this time") + + if self.options.shared and self.settings.os == "Windows": + raise ConanInvalidConfiguration(f"{self.name} does not currently support shared library on Windows") def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _patch_sources(self): - for data in self.conan_data.get("patches", {}).get(self.version, []): - patch(self, **data) + def generate(self): + tc = CMakeToolchain(self) + if not self.settings.get_safe("compiler.cppstd"): + tc.variables["CMAKE_CXX_STANDARD"] = 17 + tc.cache_variables["CMAKE_PROJECT_opentdf_INCLUDE"] = os.path.join(self.source_folder, "conan_cmake_project_include.cmake") + tc.generate() + tc = CMakeDeps(self) + tc.generate() - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.configure(build_folder=self._build_subfolder) - return cmake + def _patch_sources(self): + apply_conandata_patches(self) def build(self): self._patch_sources() - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - cmake = self._configure_cmake() + cmake = CMake(self) cmake.install() - copy(self, "*", dst=os.path.join(self.package_folder, "lib"), src=os.path.join(os.path.join(self._source_subfolder,"tdf-lib-cpp"), "lib"), keep_path=False) - copy(self, "*", dst=os.path.join(self.package_folder, "include"), src=os.path.join(os.path.join(self._source_subfolder,"tdf-lib-cpp"), "include"), keep_path=False) - copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self._source_subfolder, ignore_case=True, keep_path=False) + copy(self, "*", + dst=os.path.join(self.package_folder, "lib"), + src=os.path.join(os.path.join(self.source_folder, "tdf-lib-cpp"), "lib"), + keep_path=False) + copy(self, "*", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(os.path.join(self.source_folder, "tdf-lib-cpp"), "include"), + keep_path=False) + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder, + ignore_case=True, + keep_path=False) - # TODO - this only advertises the static lib, add dynamic lib also def package_info(self): self.cpp_info.set_property("cmake_file_name", "opentdf-client") self.cpp_info.set_property("cmake_target_name", "opentdf-client::opentdf-client") self.cpp_info.set_property("pkg_config_name", "opentdf-client") - self.cpp_info.components["libopentdf"].libs = ["opentdf_static"] + self.cpp_info.components["libopentdf"].libs = ["opentdf_static"] if not self.options.shared else ["opentdf"] self.cpp_info.components["libopentdf"].set_property("cmake_target_name", "copentdf-client::opentdf-client") self.cpp_info.components["libopentdf"].names["cmake_find_package"] = "opentdf-client" self.cpp_info.components["libopentdf"].names["cmake_find_package_multi"] = "opentdf-client" - self.cpp_info.components["libopentdf"].names["pkg_config"] = "opentdf-client" - self.cpp_info.components["libopentdf"].requires = ["openssl::openssl", "boost::boost", "ms-gsl::ms-gsl", "libxml2::libxml2", "jwt-cpp::jwt-cpp", "nlohmann_json::nlohmann_json"] + self.cpp_info.components["libopentdf"].requires = [ + "openssl::openssl", + "boost::boost", + "ms-gsl::ms-gsl", + "libxml2::libxml2", + "jwt-cpp::jwt-cpp", + "nlohmann_json::nlohmann_json", + "zlib::zlib" + ] + if Version(self.version) >= "1.4.0": + self.cpp_info.components["libopentdf"].requires.append("magic_enum::magic_enum") if Version(self.version) < "1.1.0": self.cpp_info.components["libopentdf"].requires.append("libarchive::libarchive") if Version(self.version) >= "1.4.0": diff --git a/recipes/opentdf-client/all/patches/1.1.6-0001-cmake-fixes.patch b/recipes/opentdf-client/all/patches/1.1.6-0001-cmake-fixes.patch new file mode 100644 index 0000000000000..7b784e35e922b --- /dev/null +++ b/recipes/opentdf-client/all/patches/1.1.6-0001-cmake-fixes.patch @@ -0,0 +1,51 @@ +diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt +index f1ef646..2414ffc 100644 +--- a/src/lib/CMakeLists.txt ++++ b/src/lib/CMakeLists.txt +@@ -99,7 +99,9 @@ set(TDF_COMBINED_LIB_FULL_PATH ${TDF_LIB_DIR}/${TDF_COMBINED_LIB_FILENAME}) + message(STATUS "Combined full path: ${TDF_COMBINED_LIB_FULL_PATH}") + + #TODO: Also need to handle iOS and Android(arm64). +-if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ++if(TRUE) ++ message(STATUS "Skipping generation of combined static library") ++elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + + FOREACH (LDIR ${CONAN_LIB_DIRS}) + set(V_COMBINED_LIB_DIRS ${V_COMBINED_LIB_DIRS} -L${LDIR}) +@@ -154,8 +156,6 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") + lib -out:${TDF_LIB_DIR}/${TDF_COMBINED_LIB_FILENAME} ${TDF_LIB_DIR}/${TDF_STATIC_LIB_FILENAME} ${V_COMBINED_LIB_DIRS} ${V_COMBINED_LIB_NAMES} + ) + ) +-else() +- message(STATUS "${CMAKE_SYSTEM_NAME} - unknown system FIXME........") + endif() + + # generate the shared library from the library sources +@@ -186,16 +186,19 @@ install(DIRECTORY DESTINATION ${TDF_LIB_INSTALL_LOCATION}) + # move the headers(to include) and tdf(to lib) directory under tdf-lib-cpp + install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ + DESTINATION ${TDF_LIB_INSTALL_LOCATION}/include) +- +-install(FILES ${TDF_STATIC_LIB_FULL_PATH} +- DESTINATION ${TDF_LIB_INSTALL_LOCATION}/lib) + +-install(FILES ${TDF_COMBINED_LIB_FULL_PATH} +- DESTINATION ${TDF_LIB_INSTALL_LOCATION}/lib) ++if(NOT BUILD_SHARED_LIBS) ++ install(FILES $ ++ DESTINATION ${TDF_LIB_INSTALL_LOCATION}/lib) ++endif() ++ ++# Skip combined static library for Conan Center Index package ++# install(FILES ${TDF_COMBINED_LIB_FULL_PATH} ++# DESTINATION ${TDF_LIB_INSTALL_LOCATION}/lib) + + if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + message(STATUS "Skipping shared lib on windows") +-else() +- install(FILES ${TDF_SHARED_LIB_FULL_PATH} ++elseif(BUILD_SHARED_LIBS) ++ install(FILES $ + DESTINATION ${TDF_LIB_INSTALL_LOCATION}/lib) + endif() diff --git a/recipes/opentdf-client/all/patches/1.3.10-0001-cmake-fixes.patch b/recipes/opentdf-client/all/patches/1.3.10-0001-cmake-fixes.patch new file mode 100644 index 0000000000000..9901f248faf03 --- /dev/null +++ b/recipes/opentdf-client/all/patches/1.3.10-0001-cmake-fixes.patch @@ -0,0 +1,51 @@ +diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt +index d7e1dc1..aeb3b2c 100644 +--- a/src/lib/CMakeLists.txt ++++ b/src/lib/CMakeLists.txt +@@ -99,7 +99,9 @@ set(TDF_COMBINED_LIB_FULL_PATH ${TDF_LIB_DIR}/${TDF_COMBINED_LIB_FILENAME}) + message(STATUS "Combined full path: ${TDF_COMBINED_LIB_FULL_PATH}") + + #TODO: Also need to handle iOS and Android(arm64). +-if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ++if(TRUE) ++ message(STATUS "Skipping generation of combined static library") ++elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + + FOREACH (LDIR ${CONAN_LIB_DIRS}) + set(V_COMBINED_LIB_DIRS ${V_COMBINED_LIB_DIRS} -L${LDIR}) +@@ -155,8 +157,6 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") + lib -out:${TDF_LIB_DIR}/${TDF_COMBINED_LIB_FILENAME} ${TDF_LIB_DIR}/${TDF_STATIC_LIB_FILENAME} ${V_COMBINED_LIB_DIRS} ${V_COMBINED_LIB_NAMES} + ) + ) +-else() +- message(STATUS "${CMAKE_SYSTEM_NAME} - unknown system FIXME........") + endif() + + # generate the shared library from the library sources +@@ -187,16 +187,19 @@ install(DIRECTORY DESTINATION ${TDF_LIB_INSTALL_LOCATION}) + # move the headers(to include) and tdf(to lib) directory under tdf-lib-cpp + install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ + DESTINATION ${TDF_LIB_INSTALL_LOCATION}/include) +- +-install(FILES ${TDF_STATIC_LIB_FULL_PATH} +- DESTINATION ${TDF_LIB_INSTALL_LOCATION}/lib) + +-install(FILES ${TDF_COMBINED_LIB_FULL_PATH} +- DESTINATION ${TDF_LIB_INSTALL_LOCATION}/lib) ++if(NOT BUILD_SHARED_LIBS) ++ install(FILES $ ++ DESTINATION ${TDF_LIB_INSTALL_LOCATION}/lib) ++endif() ++ ++# Skip combined static library for Conan Center Index package ++# install(FILES ${TDF_COMBINED_LIB_FULL_PATH} ++# DESTINATION ${TDF_LIB_INSTALL_LOCATION}/lib) + + if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + message(STATUS "Skipping shared lib on windows") +-else() +- install(FILES ${TDF_SHARED_LIB_FULL_PATH} ++elseif(BUILD_SHARED_LIBS) ++ install(FILES $ + DESTINATION ${TDF_LIB_INSTALL_LOCATION}/lib) + endif() diff --git a/recipes/opentdf-client/all/test_package/CMakeLists.txt b/recipes/opentdf-client/all/test_package/CMakeLists.txt index 90a74a2912fcb..d73e39aaa8604 100644 --- a/recipes/opentdf-client/all/test_package/CMakeLists.txt +++ b/recipes/opentdf-client/all/test_package/CMakeLists.txt @@ -1,12 +1,9 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) set(CMAKE_CXX_STANDARD 17) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(opentdf-client CONFIG REQUIRED) +find_package(opentdf-client REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} opentdf-client::opentdf-client) diff --git a/recipes/opentdf-client/all/test_package/conanfile.py b/recipes/opentdf-client/all/test_package/conanfile.py index cffa32351d969..ef5d7042163ec 100644 --- a/recipes/opentdf-client/all/test_package/conanfile.py +++ b/recipes/opentdf-client/all/test_package/conanfile.py @@ -1,11 +1,19 @@ -from conans import CMake from conan import ConanFile -from conan.tools.build import cross_building +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not 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/opentdf-client/config.yml b/recipes/opentdf-client/config.yml index 109b67265732e..ab5feb490bdb8 100644 --- a/recipes/opentdf-client/config.yml +++ b/recipes/opentdf-client/config.yml @@ -5,25 +5,7 @@ versions: folder: all "1.3.10": folder: all - "1.3.9": - folder: all - "1.3.8": - folder: all - "1.3.6": - folder: all - "1.3.4": - folder: all - "1.3.3": - folder: all - "1.3.2": - folder: all "1.2.0": folder: all "1.1.6": folder: all - "1.1.5": - folder: all - "1.1.3": - folder: all - "1.1.2": - folder: all From e5c85578a8420ce861e3e15b1ca5cdd270970185 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 22 Aug 2023 12:03:38 +0200 Subject: [PATCH 351/637] (#18588) [dlib] Port to Conan 2.x * dlib - port to Conan 2.x Signed-off-by: Uilian Ries * fix scm import Signed-off-by: Uilian Ries * fix file import Signed-off-by: Uilian Ries * fix layout Signed-off-by: Uilian Ries * fix copy license Signed-off-by: Uilian Ries * Update recipes/dlib/all/conanfile.py * Update recipes/dlib/all/conanfile.py * Update recipes/dlib/all/conanfile.py * fix windows build Signed-off-by: Uilian Ries * add nsl as system library Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries --- recipes/dlib/all/CMakeLists.txt | 8 - recipes/dlib/all/conanfile.py | 143 +++++++++--------- recipes/dlib/all/test_package/CMakeLists.txt | 11 +- recipes/dlib/all/test_package/conanfile.py | 19 ++- .../dlib/all/test_v1_package/CMakeLists.txt | 8 + recipes/dlib/all/test_v1_package/conanfile.py | 15 ++ 6 files changed, 109 insertions(+), 95 deletions(-) delete mode 100644 recipes/dlib/all/CMakeLists.txt create mode 100644 recipes/dlib/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/dlib/all/test_v1_package/conanfile.py diff --git a/recipes/dlib/all/CMakeLists.txt b/recipes/dlib/all/CMakeLists.txt deleted file mode 100644 index 1c22f04937945..0000000000000 --- a/recipes/dlib/all/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) - -# Include the dlib subdirectory to skip a check -add_subdirectory(source_subfolder/dlib) diff --git a/recipes/dlib/all/conanfile.py b/recipes/dlib/all/conanfile.py index b6ccf5c0b9123..fc668dbc311da 100644 --- a/recipes/dlib/all/conanfile.py +++ b/recipes/dlib/all/conanfile.py @@ -1,13 +1,14 @@ from conan import ConanFile -from conan.errors import ConanInvalidConfiguration -from conan.tools.files import get, rmdir +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import get, replace_in_file, copy, rmdir, collect_libs, rm +from conan.tools.build import check_min_cppstd from conan.tools.microsoft import is_msvc from conan.tools.scm import Version -from conans import CMake, tools -import functools +from conan.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.45.0" + +required_conan_version = ">=1.53.0" class DlibConan(ConanFile): @@ -17,7 +18,7 @@ class DlibConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "http://dlib.net" license = "BSL-1.0" - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -46,34 +47,26 @@ class DlibConan(ConanFile): "with_openblas": True, } - exports_sources = "CMakeLists.txt" - generators = "cmake", "cmake_find_package" - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - @property def _has_with_webp_option(self): return Version(self.version) >= "19.24" def config_options(self): if self.settings.os == "Windows": - del self.options.fPIC + self.options.rm_safe("fPIC") if self.settings.arch not in ["x86", "x86_64"]: - del self.options.with_sse2 - del self.options.with_sse4 - del self.options.with_avx + self.options.rm_safe("with_sse2") + self.options.rm_safe("with_sse4") + self.options.rm_safe("with_avx") if not self._has_with_webp_option: - del self.options.with_webp + self.options.rm_safe("with_webp") 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): if self.options.with_gif: @@ -90,91 +83,91 @@ def requirements(self): self.requires("openblas/0.3.20") def validate(self): + if self.settings.get_safe("compiler.cppstd"): + check_min_cppstd(self, "11") if is_msvc(self) and self.options.shared: - raise ConanInvalidConfiguration("dlib can not be built as a shared library with Visual Studio") - if self.settings.os == "Macos" and self.settings.arch == "armv8": - raise ConanInvalidConfiguration("dlib doesn't support macOS M1") + raise ConanInvalidConfiguration(f"{self.ref} does not support shared on Windows. See https://github.com/davisking/dlib/issues/1483.") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def _patch_sources(self): - dlib_cmakelists = os.path.join(self._source_subfolder, "dlib", "CMakeLists.txt") + dlib_cmakelists = os.path.join(self.source_folder, "dlib", "CMakeLists.txt") # robust giflib injection - tools.replace_in_file(dlib_cmakelists, "${GIF_LIBRARY}", "GIF::GIF") + replace_in_file(self, dlib_cmakelists, "${GIF_LIBRARY}", "GIF::GIF") # robust libjpeg injection for cmake_file in [ dlib_cmakelists, - os.path.join(self._source_subfolder, "dlib", "cmake_utils", "find_libjpeg.cmake"), - os.path.join(self._source_subfolder, "dlib", "cmake_utils", "test_for_libjpeg", "CMakeLists.txt"), + os.path.join(self.source_folder, "dlib", "cmake_utils", "find_libjpeg.cmake"), + os.path.join(self.source_folder, "dlib", "cmake_utils", "test_for_libjpeg", "CMakeLists.txt"), ]: - tools.replace_in_file(cmake_file, "${JPEG_LIBRARY}", "JPEG::JPEG") + replace_in_file(self, cmake_file, "${JPEG_LIBRARY}", "JPEG::JPEG") # robust libpng injection for cmake_file in [ dlib_cmakelists, - os.path.join(self._source_subfolder, "dlib", "cmake_utils", "find_libpng.cmake"), - os.path.join(self._source_subfolder, "dlib", "cmake_utils", "test_for_libpng", "CMakeLists.txt"), + os.path.join(self.source_folder, "dlib", "cmake_utils", "find_libpng.cmake"), + os.path.join(self.source_folder, "dlib", "cmake_utils", "test_for_libpng", "CMakeLists.txt"), ]: - tools.replace_in_file(cmake_file, "${PNG_LIBRARIES}", "PNG::PNG") + replace_in_file(self, cmake_file, "${PNG_LIBRARIES}", "PNG::PNG") # robust sqlite3 injection - tools.replace_in_file(dlib_cmakelists, "find_library(sqlite sqlite3)", "find_package(SQLite3 REQUIRED)") - tools.replace_in_file(dlib_cmakelists, "find_path(sqlite_path sqlite3.h)", "") - tools.replace_in_file(dlib_cmakelists, "if (sqlite AND sqlite_path)", "if(1)") - tools.replace_in_file(dlib_cmakelists, "${sqlite}", "SQLite::SQLite3") + if self.options.with_sqlite3: + replace_in_file(self, dlib_cmakelists, "find_library(sqlite sqlite3)", "find_package(SQLite3 REQUIRED)") + replace_in_file(self, dlib_cmakelists, "find_path(sqlite_path sqlite3.h)", "") + replace_in_file(self, dlib_cmakelists, "if (sqlite AND sqlite_path)", "if(1)") + replace_in_file(self, dlib_cmakelists, "${sqlite}", "SQLite::SQLite3") # robust libwebp injection if self._has_with_webp_option: - tools.replace_in_file(dlib_cmakelists, "include(cmake_utils/find_libwebp.cmake)", "find_package(WebP REQUIRED)") - tools.replace_in_file(dlib_cmakelists, "if (WEBP_FOUND)", "if(1)") - tools.replace_in_file(dlib_cmakelists, "${WEBP_LIBRARY}", "WebP::webp") + replace_in_file(self, dlib_cmakelists, "include(cmake_utils/find_libwebp.cmake)", "find_package(WebP REQUIRED)") + replace_in_file(self, dlib_cmakelists, "if (WEBP_FOUND)", "if(1)") + replace_in_file(self, dlib_cmakelists, "${WEBP_LIBRARY}", "WebP::webp") + if self.options.with_png: + replace_in_file(self, dlib_cmakelists, "include(cmake_utils/find_libpng.cmake)", "find_package(PNG REQUIRED)") + if self.options.with_jpeg: + replace_in_file(self, dlib_cmakelists, "include(cmake_utils/find_libjpeg.cmake)", "find_package(JPEG REQUIRED)") - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) + def generate(self): + tc = CMakeToolchain(self) # With in-project builds dlib is always built as a static library, # we want to be able to build it as a shared library too - cmake.definitions["DLIB_IN_PROJECT_BUILD"] = False - - cmake.definitions["DLIB_ISO_CPP_ONLY"] = False - cmake.definitions["DLIB_NO_GUI_SUPPORT"] = True + tc.variables["DLIB_IN_PROJECT_BUILD"] = False + tc.variables["DLIB_ISO_CPP_ONLY"] = False + tc.variables["DLIB_NO_GUI_SUPPORT"] = True # Configure external dependencies - cmake.definitions["DLIB_JPEG_SUPPORT"] = self.options.with_jpeg + tc.variables["DLIB_JPEG_SUPPORT"] = self.options.with_jpeg if self._has_with_webp_option: - cmake.definitions["DLIB_WEBP_SUPPORT"] = self.options.with_webp - cmake.definitions["DLIB_LINK_WITH_SQLITE3"] = self.options.with_sqlite3 - cmake.definitions["DLIB_USE_BLAS"] = True # FIXME: all the logic behind is not sufficiently under control - cmake.definitions["DLIB_USE_LAPACK"] = True # FIXME: all the logic behind is not sufficiently under control - cmake.definitions["DLIB_USE_CUDA"] = False # TODO: add with_cuda option? - cmake.definitions["DLIB_PNG_SUPPORT"] = self.options.with_png - cmake.definitions["DLIB_GIF_SUPPORT"] = self.options.with_gif - cmake.definitions["DLIB_USE_MKL_FFT"] = False + tc.variables["DLIB_WEBP_SUPPORT"] = self.options.with_webp + tc.variables["DLIB_LINK_WITH_SQLITE3"] = self.options.with_sqlite3 + tc.variables["DLIB_USE_BLAS"] = True # FIXME: all the logic behind is not sufficiently under control + tc.variables["DLIB_USE_LAPACK"] = True # FIXME: all the logic behind is not sufficiently under control + tc.variables["DLIB_USE_CUDA"] = False # TODO: add with_cuda option? + tc.variables["DLIB_PNG_SUPPORT"] = self.options.with_png + tc.variables["DLIB_GIF_SUPPORT"] = self.options.with_gif + tc.variables["DLIB_USE_MKL_FFT"] = False # Configure SIMD options if possible if self.settings.arch in ["x86", "x86_64"]: if self.options.with_sse2 != "auto": - cmake.definitions["USE_SSE2_INSTRUCTIONS"] = self.options.with_sse2 + tc.variables["USE_SSE2_INSTRUCTIONS"] = self.options.with_sse2 if self.options.with_sse4 != "auto": - cmake.definitions["USE_SSE4_INSTRUCTIONS"] = self.options.with_sse4 + tc.variables["USE_SSE4_INSTRUCTIONS"] = self.options.with_sse4 if self.options.with_avx != "auto": - cmake.definitions["USE_AVX_INSTRUCTIONS"] = self.options.with_avx - - cmake.configure(build_folder=self._build_subfolder) - return cmake + tc.variables["USE_AVX_INSTRUCTIONS"] = self.options.with_avx + 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, "dlib")) cmake.build() def package(self): - cmake = self._configure_cmake() + cmake = CMake(self) cmake.install() - - self.copy("LICENSE.txt", "licenses", os.path.join(self._source_subfolder, "dlib"), keep_path=False) - - # Remove configuration files + copy(self, "LICENSE.txt", src=os.path.join(self.source_folder, "dlib"), dst=os.path.join(self.package_folder, "licenses"), keep_path=False) for dir_to_remove in [ os.path.join("lib", "cmake"), os.path.join("lib", "pkgconfig"), @@ -182,15 +175,15 @@ def package(self): os.path.join("include", "dlib", "external", "pybind11", "tools") ]: rmdir(self, os.path.join(self.package_folder, dir_to_remove)) + rm(self, "*.txt", os.path.join(self.package_folder, "include", "dlib")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "dlib") self.cpp_info.set_property("cmake_target_name", "dlib::dlib") self.cpp_info.set_property("pkg_config_name", "dlib-1") - self.cpp_info.libs = tools.collect_libs(self) + # INFO: Unix systems use dlib as library name, but on Windows it includes settings, e.g dlib19.24.0_release_64bit_msvc1933.lib + self.cpp_info.libs = collect_libs(self) if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs = ["pthread"] + self.cpp_info.system_libs = ["pthread", "nsl"] elif self.settings.os == "Windows": self.cpp_info.system_libs = ["ws2_32", "winmm", "comctl32", "gdi32", "imm32"] - - self.cpp_info.names["pkg_config"] = "dlib-1" diff --git a/recipes/dlib/all/test_package/CMakeLists.txt b/recipes/dlib/all/test_package/CMakeLists.txt index 50caaa372ec83..9ce5dccc12983 100644 --- a/recipes/dlib/all/test_package/CMakeLists.txt +++ b/recipes/dlib/all/test_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package LANGUAGES CXX) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) find_package(dlib REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} dlib::dlib) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) +target_link_libraries(${PROJECT_NAME} PRIVATE dlib::dlib) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/dlib/all/test_package/conanfile.py b/recipes/dlib/all/test_package/conanfile.py index 38f4483872d47..ef5d7042163ec 100644 --- a/recipes/dlib/all/test_package/conanfile.py +++ b/recipes/dlib/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/dlib/all/test_v1_package/CMakeLists.txt b/recipes/dlib/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..be00a8c7f57c7 --- /dev/null +++ b/recipes/dlib/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/dlib/all/test_v1_package/conanfile.py b/recipes/dlib/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..e0660e0801b96 --- /dev/null +++ b/recipes/dlib/all/test_v1_package/conanfile.py @@ -0,0 +1,15 @@ +import os +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type", + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + self.run(os.path.join("bin", "test_package"), run_environment=True) From b43e1349398d546db9687ce2d257f72dc474d09a Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 22 Aug 2023 19:27:28 +0900 Subject: [PATCH 352/637] (#18595) xnnpack: add version cci.20230715, add package_type * xnnpack: add version cci.20230715 * drop support for gcc < 11 and clang < 8 * update cpuinfo * use cpuinfo/cci.20220228 for older versions --- recipes/xnnpack/all/conandata.yml | 3 +++ recipes/xnnpack/all/conanfile.py | 31 +++++++++++++++++++------------ recipes/xnnpack/config.yml | 2 ++ 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/recipes/xnnpack/all/conandata.yml b/recipes/xnnpack/all/conandata.yml index 271fcb3d93eeb..97d441c786f9f 100644 --- a/recipes/xnnpack/all/conandata.yml +++ b/recipes/xnnpack/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20230715": + url: "https://github.com/google/XNNPACK/archive/645035286fe31d47eeb07900450f4f6540b75c2c.tar.gz" + sha256: "4c91153dfe4648dc3b325db0b4d6719d6e16f7ce30940b4ceb65abd033e5245e" "cci.20220801": url: "https://github.com/google/XNNPACK/archive/8e3d3359f9bec608e09fac1f7054a2a14b1bd73c.tar.gz" sha256: "c82327543249bd333034bbaa0300ed1fc9c7060fa73673a285042e3f042540e0" diff --git a/recipes/xnnpack/all/conanfile.py b/recipes/xnnpack/all/conanfile.py index 7263f61d28bb8..5d80f5f3cd167 100644 --- a/recipes/xnnpack/all/conanfile.py +++ b/recipes/xnnpack/all/conanfile.py @@ -15,11 +15,11 @@ class XnnpackConan(ConanFile): "neural network inference operators for ARM, WebAssembly, " \ "and x86 platforms." license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/google/XNNPACK" topics = ("neural-network", "inference", "multithreading", "inference-optimization", "matrix-multiplication", "simd") - homepage = "https://github.com/google/XNNPACK" - url = "https://github.com/conan-io/conan-center-index" - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -46,7 +46,6 @@ def config_options(self): def configure(self): if self.options.shared: self.options.rm_safe("fPIC") - # for plain C projects only self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") @@ -54,9 +53,12 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("cpuinfo/cci.20220228") + if self.version in ["cci.20220801", "cci.20220621", "cci.20211210"]: + self.requires("cpuinfo/cci.20220228") + else: + self.requires("cpuinfo/cci.20230118") self.requires("fp16/cci.20210320") - # https://github.com/google/XNNPACK/blob/ed5f9c0562e016a08b274a4579de5ef500fec134/include/xnnpack.h#L15 + # https://github.com/google/XNNPACK/blob/ed5f9c0562e016a08b274a4579de5ef500fec134/include/xnnpack.h#L15 self.requires("pthreadpool/cci.20210218", transitive_headers=True) self.requires("fxdiv/cci.20200417") @@ -64,13 +66,18 @@ def validate(self): check_min_vs(self, 192) compiler = self.info.settings.compiler compiler_version = Version(compiler.version) - if (compiler == "gcc" and compiler_version < "6") or \ - (compiler == "clang" and compiler_version < "5"): - raise ConanInvalidConfiguration(f"{self.ref} doesn't support {compiler} {compiler.version}") + if self.version < "cci.20230715": + if (compiler == "gcc" and compiler_version < "6") or \ + (compiler == "clang" and compiler_version < "5"): + raise ConanInvalidConfiguration(f"{self.ref} doesn't support {compiler} {compiler.version}") + else: + # since cci.20230715, xnnpack requires avx512 header file + 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}") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) @@ -100,7 +107,7 @@ def generate(self): # The CMake scripts don't use targets prefixed with `namespace::` # so we can coerce CMakeDeps to define the exact target names that # are expected. This works in tandem with the file - # `CMAKE_PROJECT_XNNPACK_INCLUDE` which ensure an early call to + # `CMAKE_PROJECT_XNNPACK_INCLUDE` which ensure an early call to # the relevant `find_package` deps.set_property("cpuinfo", "cmake_target_name", "cpuinfo") deps.set_property("cpuinfo", "cmake_target_aliases", ["clog"] ) diff --git a/recipes/xnnpack/config.yml b/recipes/xnnpack/config.yml index d1b55a81c6c28..a1c159e3728ee 100644 --- a/recipes/xnnpack/config.yml +++ b/recipes/xnnpack/config.yml @@ -1,4 +1,6 @@ versions: + "cci.20230715": + folder: all "cci.20220801": folder: all "cci.20220621": From 98e398a3bb6c1b8b1c10f38cbbc0f6f0e544d4b7 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 22 Aug 2023 20:06:49 +0900 Subject: [PATCH 353/637] (#18622) wavelet_buffer: add version 0.7.1 * wavelet_buffer: add version 0.7.1 * update libs for 0.7.1 * rm cmake files * update libjpeg-turbo * use streamvbyte, fpzip cci's recipes --- recipes/wavelet_buffer/all/conandata.yml | 18 +++-- recipes/wavelet_buffer/all/conanfile.py | 14 +++- ...tch => 0.4.0-0001-cmake-no-openblas.patch} | 0 ...ch => 0.4.0-0002-cmake-find-jpeblib.patch} | 0 .../all/patches/0.7.1-0001-fix-packages.patch | 24 +++++++ .../patches/0.7.1-0002-use-cci-packages.patch | 66 +++++++++++++++++++ recipes/wavelet_buffer/config.yml | 2 + 7 files changed, 117 insertions(+), 7 deletions(-) rename recipes/wavelet_buffer/all/patches/{0001-0.4.0-cmake-no-openblas.patch => 0.4.0-0001-cmake-no-openblas.patch} (100%) rename recipes/wavelet_buffer/all/patches/{0002-0.4.0-cmake-find-jpeblib.patch => 0.4.0-0002-cmake-find-jpeblib.patch} (100%) create mode 100644 recipes/wavelet_buffer/all/patches/0.7.1-0001-fix-packages.patch create mode 100644 recipes/wavelet_buffer/all/patches/0.7.1-0002-use-cci-packages.patch diff --git a/recipes/wavelet_buffer/all/conandata.yml b/recipes/wavelet_buffer/all/conandata.yml index fbf3768205fcc..16606180f5c32 100644 --- a/recipes/wavelet_buffer/all/conandata.yml +++ b/recipes/wavelet_buffer/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.7.1": + url: "https://github.com/panda-official/WaveletBuffer/archive/refs/tags/v0.7.1.tar.gz" + sha256: "34931da9a8f3c36a37e7e72c801f5ae139006e3c84013511e6baaae3f8d3da3c" "0.5.0": url: "https://github.com/panda-official/WaveletBuffer/archive/refs/tags/v0.5.0.tar.gz" sha256: "2b1fa552f9a6e032dfd9f59bd05c049bf0cac46aced7cd42f49ff0d020cfdb50" @@ -6,19 +9,26 @@ sources: url: "https://github.com/panda-official/WaveletBuffer/archive/refs/tags/v0.4.0.tar.gz" sha256: "0a30080a6d1e9e7f8947ae0c3395d3c86888900c7ae09730f8dd0ed5138daab2" patches: + "0.7.1": + - patch_file: "patches/0.7.1-0001-fix-packages.patch" + patch_description: "don't find catch2, use jpeg instead of libjpeg-turbo" + patch_type: "conan" + - patch_file: "patches/0.7.1-0002-use-cci-packages.patch" + patch_description: "use cci's packages" + patch_type: "conan" "0.5.0": - - patch_file: "patches/0001-0.4.0-cmake-no-openblas.patch" + - patch_file: "patches/0.4.0-0001-cmake-no-openblas.patch" patch_description: "Fix CMakeLists: OpenBLAS is not a dependency" patch_type: "conan" patch_source: "https://github.com/panda-official/WaveletBuffer/pull/49" - - patch_file: "patches/0002-0.4.0-cmake-find-jpeblib.patch" + - patch_file: "patches/0.4.0-0002-cmake-find-jpeblib.patch" patch_description: "Fix CMakeLists: link to jpeg lib only" patch_type: "conan" "0.4.0": - - patch_file: "patches/0001-0.4.0-cmake-no-openblas.patch" + - patch_file: "patches/0.4.0-0001-cmake-no-openblas.patch" patch_description: "Fix CMakeLists: OpenBLAS is not a dependency" patch_type: "conan" patch_source: "https://github.com/panda-official/WaveletBuffer/pull/49" - - patch_file: "patches/0002-0.4.0-cmake-find-jpeblib.patch" + - patch_file: "patches/0.4.0-0002-cmake-find-jpeblib.patch" patch_description: "Fix CMakeLists: link to jpeg lib only" patch_type: "conan" diff --git a/recipes/wavelet_buffer/all/conanfile.py b/recipes/wavelet_buffer/all/conanfile.py index 8e72fbe22217e..f5ce671013fd5 100644 --- a/recipes/wavelet_buffer/all/conanfile.py +++ b/recipes/wavelet_buffer/all/conanfile.py @@ -60,12 +60,15 @@ def layout(self): def requirements(self): self.requires("blaze/3.8", transitive_headers=True) - self.requires("cimg/3.0.2") + self.requires("cimg/3.2.5") if self.options.jpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/2.1.5") + self.requires("libjpeg-turbo/3.0.0") else: self.requires("libjpeg/9e") # FIXME: unvendor SfCompressor which is currently downloaded at build time :s + if Version(self.version) >= "0.6.0": + self.requires("streamvbyte/1.0.0") + self.requires("fpzip/1.3.0") def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -105,12 +108,17 @@ def package(self): cmake = CMake(self) cmake.install() 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.set_property("cmake_file_name", "wavelet_buffer") self.cpp_info.set_property("cmake_target_name", "wavelet_buffer::wavelet_buffer") - self.cpp_info.libs = ["wavelet_buffer", "sf_compressor"] self.cpp_info.requires = ["blaze::blaze", "cimg::cimg"] + if Version(self.version) >= "0.6.0": + self.cpp_info.libs = ["wavelet_buffer"] + self.cpp_info.requires.extend(["streamvbyte::streamvbyte", "fpzip::fpzip"]) + else: + self.cpp_info.libs = ["wavelet_buffer", "sf_compressor"] if self.options.jpeg == "libjpeg-turbo": self.cpp_info.requires.append("libjpeg-turbo::jpeg") else: diff --git a/recipes/wavelet_buffer/all/patches/0001-0.4.0-cmake-no-openblas.patch b/recipes/wavelet_buffer/all/patches/0.4.0-0001-cmake-no-openblas.patch similarity index 100% rename from recipes/wavelet_buffer/all/patches/0001-0.4.0-cmake-no-openblas.patch rename to recipes/wavelet_buffer/all/patches/0.4.0-0001-cmake-no-openblas.patch diff --git a/recipes/wavelet_buffer/all/patches/0002-0.4.0-cmake-find-jpeblib.patch b/recipes/wavelet_buffer/all/patches/0.4.0-0002-cmake-find-jpeblib.patch similarity index 100% rename from recipes/wavelet_buffer/all/patches/0002-0.4.0-cmake-find-jpeblib.patch rename to recipes/wavelet_buffer/all/patches/0.4.0-0002-cmake-find-jpeblib.patch diff --git a/recipes/wavelet_buffer/all/patches/0.7.1-0001-fix-packages.patch b/recipes/wavelet_buffer/all/patches/0.7.1-0001-fix-packages.patch new file mode 100644 index 0000000000000..6621e790da38b --- /dev/null +++ b/recipes/wavelet_buffer/all/patches/0.7.1-0001-fix-packages.patch @@ -0,0 +1,24 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e2a6681..5ef9cbb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -59,9 +59,8 @@ else() + endif() + + find_package(blaze REQUIRED) +-find_package(libjpeg-turbo REQUIRED) ++find_package(JPEG REQUIRED) + find_package(cimg REQUIRED) +-find_package(Catch2 REQUIRED) + + # Create wb target + set(WB_TARGET_NAME ${PROJECT_NAME}) +@@ -146,7 +145,7 @@ target_include_directories( + # Link dependencies + target_link_libraries(${WB_TARGET_NAME} PRIVATE streamvbyte) + target_link_libraries(${WB_TARGET_NAME} PRIVATE fpzip) +-target_link_libraries(${WB_TARGET_NAME} PRIVATE libjpeg-turbo::libjpeg-turbo) ++target_link_libraries(${WB_TARGET_NAME} PRIVATE JPEG::JPEG) + target_link_libraries(${WB_TARGET_NAME} PRIVATE cimg::cimg) + + target_link_libraries(${WB_TARGET_NAME} PUBLIC blaze::blaze) diff --git a/recipes/wavelet_buffer/all/patches/0.7.1-0002-use-cci-packages.patch b/recipes/wavelet_buffer/all/patches/0.7.1-0002-use-cci-packages.patch new file mode 100644 index 0000000000000..260b4ac4bbddc --- /dev/null +++ b/recipes/wavelet_buffer/all/patches/0.7.1-0002-use-cci-packages.patch @@ -0,0 +1,66 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5ef9cbb..fed641b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -80,39 +80,12 @@ add_library( + sources/internal/matrix_compressor.cc + ) + +-include(FetchContent) +- +-fetchcontent_declare( +- streamvbyte +- URL https://github.com/lemire/streamvbyte/archive/refs/tags/v1.0.0.zip +- URL_HASH MD5=3d1a01cfb704947fa6498944082aeed1 +-) +- +-fetchcontent_declare( +- fpzip +- URL https://github.com/LLNL/fpzip/releases/download/1.3.0/fpzip-1.3.0.zip +- URL_HASH MD5=933ed7628de406a24fe2de61c8c3356c +-) +- +-fetchcontent_makeavailable(streamvbyte) +- +-fetchcontent_getproperties(fpzip) +- +-if(NOT fpzip_POPULATED) +- fetchcontent_populate(fpzip) +- # Make subproject to use 'BUILD_SHARED_LIBS=ON' setting. +- set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build SHARED libraries") +- add_subdirectory(${fpzip_SOURCE_DIR} ${fpzip_BINARY_DIR}) +-endif() ++find_package(streamvbyte REQUIRED CONFIG) ++find_package(fpzip REQUIRED CONFIG) + + # Add alias + add_library(${WB_TARGET_NAME}::${WB_TARGET_NAME} ALIAS ${WB_TARGET_NAME}) + +-# Set fPIC +-set_target_properties(${WB_TARGET_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON) +-set_target_properties(streamvbyte PROPERTIES POSITION_INDEPENDENT_CODE ON) +-set_target_properties(fpzip PROPERTIES POSITION_INDEPENDENT_CODE ON) +- + # Turn off parallelization in blaze + target_compile_definitions( + ${WB_TARGET_NAME} +@@ -143,8 +116,8 @@ target_include_directories( + ) + + # Link dependencies +-target_link_libraries(${WB_TARGET_NAME} PRIVATE streamvbyte) +-target_link_libraries(${WB_TARGET_NAME} PRIVATE fpzip) ++target_link_libraries(${WB_TARGET_NAME} PRIVATE streamvbyte::streamvbyte) ++target_link_libraries(${WB_TARGET_NAME} PRIVATE fpzip::fpzip) + target_link_libraries(${WB_TARGET_NAME} PRIVATE JPEG::JPEG) + target_link_libraries(${WB_TARGET_NAME} PRIVATE cimg::cimg) + +@@ -178,7 +151,7 @@ endif() + include(GNUInstallDirs) + + # Create package targets file +-install(TARGETS ${WB_TARGET_NAME} streamvbyte EXPORT ${WB_TARGET_NAME}-target) ++install(TARGETS ${WB_TARGET_NAME} EXPORT ${WB_TARGET_NAME}-target) + install( + EXPORT ${WB_TARGET_NAME}-target + FILE ${WB_TARGET_NAME}-targets.cmake diff --git a/recipes/wavelet_buffer/config.yml b/recipes/wavelet_buffer/config.yml index d13fcfd021b7b..80a49141e8ea4 100644 --- a/recipes/wavelet_buffer/config.yml +++ b/recipes/wavelet_buffer/config.yml @@ -1,4 +1,6 @@ versions: + "0.7.1": + folder: all "0.5.0": folder: all "0.4.0": From 1da5f06fbb13aba9e551712d4cecc4fa255e3917 Mon Sep 17 00:00:00 2001 From: Andrei Malashkin Date: Tue, 22 Aug 2023 13:29:31 +0200 Subject: [PATCH 354/637] (#18990) implement newmat/11.0.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * implement newmat/11.0.1 * remove blank line in conandata * fix linter warnings * set src_folder to src * fix linter * remove cmake dir * add m as system lib * add license * cleanup * correct test package in order not to depend on zlib * mark shared lib on windows as invalid config * add forgotten import * Apply suggestions from code review Co-authored-by: Uilian Ries * fix review comments * extract license from htm document * reintroduce patch * don't use collect_libs * simplify test package * fix newlines * try to fix conan v1 test * change language to cpp * make cmake names in lowercase * disable macos builds * fix lib names for macos * add patch description * Apply suggestions from code review Co-authored-by: Uilian Ries * add missing import * remove v1 test package * revert of self.cpp_info.libs changes * remove test v1; cmake changes --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: Uilian Ries --- recipes/newmat/all/CMakeLists.txt | 92 +++++++++++++++++++ recipes/newmat/all/conandata.yml | 9 ++ recipes/newmat/all/conanfile.py | 87 ++++++++++++++++++ .../all/patches/11.0.1/newmat6.cpp.patch | 12 +++ .../newmat/all/test_package/CMakeLists.txt | 7 ++ recipes/newmat/all/test_package/conanfile.py | 26 ++++++ .../newmat/all/test_package/test_package.cpp | 7 ++ recipes/newmat/config.yml | 3 + 8 files changed, 243 insertions(+) create mode 100644 recipes/newmat/all/CMakeLists.txt create mode 100644 recipes/newmat/all/conandata.yml create mode 100644 recipes/newmat/all/conanfile.py create mode 100644 recipes/newmat/all/patches/11.0.1/newmat6.cpp.patch create mode 100644 recipes/newmat/all/test_package/CMakeLists.txt create mode 100644 recipes/newmat/all/test_package/conanfile.py create mode 100644 recipes/newmat/all/test_package/test_package.cpp create mode 100644 recipes/newmat/config.yml diff --git a/recipes/newmat/all/CMakeLists.txt b/recipes/newmat/all/CMakeLists.txt new file mode 100644 index 0000000000000..768502b8f6a7f --- /dev/null +++ b/recipes/newmat/all/CMakeLists.txt @@ -0,0 +1,92 @@ +cmake_minimum_required(VERSION 3.0) + +project( + "newmat" + DESCRIPTION + "The package is intended for scientists and engineers who need to \ + manipulate a variety of types of matrices using standard matrix \ + operations. Emphasis is on the kind of operations needed in statistical \ + calculations such as least squares, linear equation solve and eigenvalues." + HOMEPAGE_URL "http://www.robertnz.net/nm11.htm" + LANGUAGES CXX) + +option(SETUP_C_SUBSCRIPTS "Activate SETUP_C_SUBSCRIPTS if you want to use traditional C style element access" OFF) +if (SETUP_C_SUBSCRIPTS) + add_compile_definitions(SETUP_C_SUBSCRIPTS) +endif() +message("Build with C style element access ${SETUP_C_SUBSCRIPTS}") + +# ------------- +# target +# ------------- +set(source_subfolder_ "src") +set(lib_name ${PROJECT_NAME}) +add_library(${lib_name}) + +target_sources( + ${lib_name} + PRIVATE + ${source_subfolder_}/bandmat.cpp + ${source_subfolder_}/jacobi.cpp + ${source_subfolder_}/newmat3.cpp + ${source_subfolder_}/newmat8.cpp + ${source_subfolder_}/nm_misc.cpp + ${source_subfolder_}/cholesky.cpp + ${source_subfolder_}/myexcept.cpp + ${source_subfolder_}/newmat4.cpp + ${source_subfolder_}/newmat9.cpp + ${source_subfolder_}/solution.cpp + ${source_subfolder_}/evalue.cpp + ${source_subfolder_}/newfft.cpp + ${source_subfolder_}/newmat5.cpp + ${source_subfolder_}/newmatex.cpp + ${source_subfolder_}/sort.cpp + ${source_subfolder_}/fft.cpp + ${source_subfolder_}/newmat1.cpp + ${source_subfolder_}/newmat6.cpp + ${source_subfolder_}/newmatnl.cpp + ${source_subfolder_}/submat.cpp + ${source_subfolder_}/hholder.cpp + ${source_subfolder_}/newmat2.cpp + ${source_subfolder_}/newmat7.cpp + ${source_subfolder_}/newmatrm.cpp + ${source_subfolder_}/svd.cpp +) + +set(include_dir ${PROJECT_SOURCE_DIR}/${source_subfolder_}) + +target_include_directories( + ${lib_name} PUBLIC $) +target_include_directories( + ${lib_name} INTERFACE $) + +# code has throwing desctructors, thus try to compile with c++98 +set_property(TARGET ${lib_name} PROPERTY CXX_STANDARD 98) + +# ------------- +# installation +# ------------- +include(GNUInstallDirs) +install( + FILES + ${include_dir}/controlw.h + ${include_dir}/include.h + ${include_dir}/myexcept.h + ${include_dir}/newmatap.h + ${include_dir}/newmat.h + ${include_dir}/newmatio.h + ${include_dir}/newmatnl.h + ${include_dir}/newmatrc.h + ${include_dir}/newmatrm.h + ${include_dir}/precisio.h + ${include_dir}/solution.h + DESTINATION + include/newmat +) +install( + TARGETS ${lib_name} + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) diff --git a/recipes/newmat/all/conandata.yml b/recipes/newmat/all/conandata.yml new file mode 100644 index 0000000000000..e5211d2f68295 --- /dev/null +++ b/recipes/newmat/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "11.0.1": + url: "http://www.robertnz.net/ftp/newmat11.tar.gz" + sha256: "daf313a4db0db14dfcce236ad3cdc514d449e62ddd4f1b07cc31179b0787db6f" +patches: + "11.0.1": + - patch_file: "patches/11.0.1/newmat6.cpp.patch" + patch_type: portability + patch_description: "Fix comparison of pointer and int for new compilers" diff --git a/recipes/newmat/all/conanfile.py b/recipes/newmat/all/conanfile.py new file mode 100644 index 0000000000000..1e8f73c3d75fc --- /dev/null +++ b/recipes/newmat/all/conanfile.py @@ -0,0 +1,87 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rmdir, save, load +from conan.tools.microsoft import is_msvc +import os + +required_conan_version = ">=1.53.0" + + +class NewmatConan(ConanFile): + name = "newmat" + description = "Manipulate a variety of types of matrices using standard matrix operations." + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://newmat.net" + topics = ("matrix") + license = "LicenseRef-newmat" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_c_subscripts": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "with_c_subscripts": False, + } + + def export_sources(self): + copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if is_msvc(self) and self.options.shared: + raise ConanInvalidConfiguration(f"{self.ref} does not support dynamic library with msvc.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], + destination=self.source_folder) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["SETUP_C_SUBSCRIPTS"] = self.options.with_c_subscripts + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + cmake.build() + + def _extract_license(self): + header = load(self, os.path.join(self.source_folder, "nm11.htm")) + return header[header.find("I place no restrictions", 1) : header.find("report bugs to me.", 1) + 18] + + def package(self): + cmake = CMake(self) + cmake.install() + save(self, os.path.join(self.package_folder, "licenses", "LICENSE"), self._extract_license()) + rmdir(self, os.path.join(self.package_folder, "cmake")) + if self.settings.os == "Windows": + rmdir(self, os.path.join(self.package_folder, "bin")) + + def package_info(self): + self.cpp_info.libs = ["newmat"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m"] + + self.cpp_info.includedirs.append(os.path.join("include", "newmat")) + if self.options.with_c_subscripts: + self.cpp_info.defines = ["SETUP_C_SUBSCRIPTS"] + diff --git a/recipes/newmat/all/patches/11.0.1/newmat6.cpp.patch b/recipes/newmat/all/patches/11.0.1/newmat6.cpp.patch new file mode 100644 index 0000000000000..2cbfaaa6c4648 --- /dev/null +++ b/recipes/newmat/all/patches/11.0.1/newmat6.cpp.patch @@ -0,0 +1,12 @@ +@@ -1,11 +0,0 @@ +--- newmat6.cpp ++++ newmat6.cpp +@@ -428,7 +428,7 @@ + { + if (&gm == this) { REPORT tag_val = -1; return; } + REPORT +- if (indx > 0) { delete [] indx; indx = 0; } ++ if (indx != 0) { delete [] indx; indx = 0; } + ((CroutMatrix&)gm).get_aux(*this); + Eq(gm); + } diff --git a/recipes/newmat/all/test_package/CMakeLists.txt b/recipes/newmat/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..b7da1c805dfbd --- /dev/null +++ b/recipes/newmat/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package) + +find_package(newmat REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE newmat::newmat) diff --git a/recipes/newmat/all/test_package/conanfile.py b/recipes/newmat/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/newmat/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/newmat/all/test_package/test_package.cpp b/recipes/newmat/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..bcd358b815b25 --- /dev/null +++ b/recipes/newmat/all/test_package/test_package.cpp @@ -0,0 +1,7 @@ +#include "newmatap.h" + +int main() +{ + Matrix A(2,3); + return 0; +} diff --git a/recipes/newmat/config.yml b/recipes/newmat/config.yml new file mode 100644 index 0000000000000..d7fc56a2cf1b3 --- /dev/null +++ b/recipes/newmat/config.yml @@ -0,0 +1,3 @@ +versions: + "11.0.1": + folder: all From de91d8e7acd9781a74df582938eb4b916d921de3 Mon Sep 17 00:00:00 2001 From: Holger Detering Date: Tue, 22 Aug 2023 14:08:13 +0200 Subject: [PATCH 355/637] (#19065) aws-c-compression: add version 0.2.17 * aws-c-compression: add version 0.2.17 * cleanup: remove test_v1_package folder * Revert "cleanup: remove test_v1_package folder" This reverts commit 2b5643590e31a46fc05e049b9c0154b9e6e6243a. --- recipes/aws-c-compression/all/conandata.yml | 3 +++ recipes/aws-c-compression/all/conanfile.py | 8 ++++++-- recipes/aws-c-compression/config.yml | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/recipes/aws-c-compression/all/conandata.yml b/recipes/aws-c-compression/all/conandata.yml index 1baf0be5b106a..d936f5ef9af18 100644 --- a/recipes/aws-c-compression/all/conandata.yml +++ b/recipes/aws-c-compression/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.2.17": + url: "https://github.com/awslabs/aws-c-compression/archive/v0.2.17.tar.gz" + sha256: "703d1671e395ea26f8b0b70d678ed471421685a89e127f8aa125e2b2ecedb0e0" "0.2.15": url: "https://github.com/awslabs/aws-c-compression/archive/v0.2.15.tar.gz" sha256: "11d58a229e2961b2b36493155a981dea2c8a0bc0d113b0073deb8c3189cfa04e" diff --git a/recipes/aws-c-compression/all/conanfile.py b/recipes/aws-c-compression/all/conanfile.py index 828f55f643189..2c6e25346108a 100644 --- a/recipes/aws-c-compression/all/conanfile.py +++ b/recipes/aws-c-compression/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import copy, get, rmdir, save +from conan.tools.scm import Version import os import textwrap @@ -13,7 +14,7 @@ class AwsCCompression(ConanFile): topics = ("aws", "amazon", "cloud", "compression", "huffman", ) url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/awslabs/aws-c-compression" - license = "Apache-2.0", + license = "Apache-2.0" package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -39,7 +40,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) + if Version(self.version) <= "0.2.15": + self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) + else: + self.requires("aws-c-common/0.9.0", transitive_headers=True, transitive_libs=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-compression/config.yml b/recipes/aws-c-compression/config.yml index 5a381bb0e6674..aae181600c27e 100644 --- a/recipes/aws-c-compression/config.yml +++ b/recipes/aws-c-compression/config.yml @@ -1,4 +1,6 @@ versions: + "0.2.17": + folder: all "0.2.15": folder: all "0.2.14": From 208f1807b5bf5598155df1360299c028967aec2e Mon Sep 17 00:00:00 2001 From: Klaus Holst Jacobsen <48069914+klausholstjacobsen@users.noreply.github.com> Date: Tue, 22 Aug 2023 14:50:22 +0200 Subject: [PATCH 356/637] (#19032) openssl/1.x.x: Added socket to system_libs for Neutrino --- recipes/openssl/1.x.x/conanfile.py | 2 ++ recipes/openssl/3.x.x/conanfile.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/recipes/openssl/1.x.x/conanfile.py b/recipes/openssl/1.x.x/conanfile.py index d7807c3f39ee0..c6f1558ac1cf1 100644 --- a/recipes/openssl/1.x.x/conanfile.py +++ b/recipes/openssl/1.x.x/conanfile.py @@ -905,6 +905,8 @@ def package_info(self): elif self.settings.os == "Neutrino": self.cpp_info.components["crypto"].system_libs.append("atomic") self.cpp_info.components["ssl"].system_libs.append("atomic") + self.cpp_info.components["crypto"].system_libs.append("socket") + self.cpp_info.components["ssl"].system_libs.append("socket") # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.names["cmake_find_package"] = "OpenSSL" diff --git a/recipes/openssl/3.x.x/conanfile.py b/recipes/openssl/3.x.x/conanfile.py index 59da5e3bc2434..f2c81b311e8fd 100644 --- a/recipes/openssl/3.x.x/conanfile.py +++ b/recipes/openssl/3.x.x/conanfile.py @@ -657,6 +657,8 @@ def package_info(self): elif self.settings.os == "Neutrino": self.cpp_info.components["crypto"].system_libs.append("atomic") self.cpp_info.components["ssl"].system_libs.append("atomic") + self.cpp_info.components["crypto"].system_libs.append("socket") + self.cpp_info.components["ssl"].system_libs.append("socket") self.cpp_info.components["crypto"].set_property("cmake_target_name", "OpenSSL::Crypto") self.cpp_info.components["crypto"].set_property("pkg_config_name", "libcrypto") From a065baf819453997f577a29a5aaefe1e96615096 Mon Sep 17 00:00:00 2001 From: Marian Klymov Date: Tue, 22 Aug 2023 16:45:12 +0300 Subject: [PATCH 357/637] (#18298) itk: migrate to Conan v2 * itk: migrate to Conan v2 * Delete CMakeLists.txt * Remove hdf5 from test * bump libtiff to 4.5.1 * Add empty EOL to test_package.cpp * Replace CRLF with LF in test_package.cpp * itksys: link with dl --- recipes/itk/all/CMakeLists.txt | 22 - .../itk/all/conan_cmake_project_include.cmake | 8 + recipes/itk/all/conandata.yml | 6 +- recipes/itk/all/conanfile.py | 483 +++++++++--------- recipes/itk/all/test_package/CMakeLists.txt | 13 +- recipes/itk/all/test_package/conanfile.py | 19 +- recipes/itk/all/test_package/test_package.cpp | 14 +- .../itk/all/test_v1_package/CMakeLists.txt | 8 + recipes/itk/all/test_v1_package/conanfile.py | 18 + 9 files changed, 304 insertions(+), 287 deletions(-) delete mode 100644 recipes/itk/all/CMakeLists.txt create mode 100644 recipes/itk/all/conan_cmake_project_include.cmake create mode 100644 recipes/itk/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/itk/all/test_v1_package/conanfile.py diff --git a/recipes/itk/all/CMakeLists.txt b/recipes/itk/all/CMakeLists.txt deleted file mode 100644 index 7ae2d73951a0d..0000000000000 --- a/recipes/itk/all/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -cmake_minimum_required(VERSION 3.10.2) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) - -# conan created FindXXX.cmake modules that create IMPORTED targets -# that not have the GLOBAL option set. By requiring them here, -# these targets are visible in all the subprojects. -file(GLOB conan_modules "Find*.cmake") -message("modules: ${conan_modules}") -foreach(module ${conan_modules}) - get_filename_component(modname "${module}" NAME) - string(REGEX MATCH "^Find(.*).cmake$" modmatch "${modname}") - if(NOT modmatch) - message(FATAL_ERROR "Not a module?? ${module} (${modname})") - endif() - message(STATUS "requiring package ${CMAKE_MATCH_1}") - find_package("${CMAKE_MATCH_1}" REQUIRED) -endforeach() - -add_subdirectory(source_subfolder) diff --git a/recipes/itk/all/conan_cmake_project_include.cmake b/recipes/itk/all/conan_cmake_project_include.cmake new file mode 100644 index 0000000000000..1583596ab7878 --- /dev/null +++ b/recipes/itk/all/conan_cmake_project_include.cmake @@ -0,0 +1,8 @@ +find_package(double-conversion REQUIRED CONFIG) +find_package(Eigen3 REQUIRED CONFIG) +find_package(EXPAT REQUIRED MODULE) +find_package(JPEG REQUIRED CONFIG) +find_package(OpenJPEG REQUIRED CONFIG) +find_package(PNG REQUIRED) +find_package(TIFF REQUIRED) +find_package(ZLIB REQUIRED) diff --git a/recipes/itk/all/conandata.yml b/recipes/itk/all/conandata.yml index 3cb9b81826a59..9e7f86e6f5246 100644 --- a/recipes/itk/all/conandata.yml +++ b/recipes/itk/all/conandata.yml @@ -8,7 +8,9 @@ sources: patches: "5.1.2": - patch_file: "patches/0001-find-conan-packages.patch" - base_path: "source_subfolder" + patch_description: "inject thirdparties from conan" + patch_type: "conan" "5.1.0": - patch_file: "patches/0001-find-conan-packages.patch" - base_path: "source_subfolder" + patch_description: "inject thirdparties from conan" + patch_type: "conan" diff --git a/recipes/itk/all/conanfile.py b/recipes/itk/all/conanfile.py index 3c833fb68b446..432d4013dd2a6 100644 --- a/recipes/itk/all/conanfile.py +++ b/recipes/itk/all/conanfile.py @@ -1,20 +1,25 @@ -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 apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir, save +from conan.tools.microsoft import check_min_vs, is_msvc +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration import glob import os import textwrap -required_conan_version = ">=1.43.0" +required_conan_version = ">=1.53.0" class ITKConan(ConanFile): name = "itk" - topics = ("itk", "scientific", "image", "processing") - homepage = "http://www.itk.org/" - url = "https://github.com/conan-io/conan-center-index" + description = "Open-source, cross-platform toolkit for N-dimensional scientific image processing, segmentation, and registration" license = "Apache-2.0" - description = "Insight Segmentation and Registration Toolkit" - + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://www.itk.org/" + topics = ("medical-imaging", "scientific", "image", "processing") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -26,26 +31,23 @@ class ITKConan(ConanFile): } short_paths = True - generators = "cmake", "cmake_find_package" - _cmake = None @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 11 @property - def _build_subfolder(self): - return "build_subfolder" - - # TODO: Some packages can be added as optional, but they are not in CCI: - # - mkl - # - vtk - # - opencv + def _compilers_minimum_version(self): + return { + "Visual Studio": "14", + "gcc": "4.8.1", + "clang": "3.3", + "apple-clang": "9", + } def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) + copy(self, "conan_cmake_project_include.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": @@ -53,250 +55,222 @@ def config_options(self): 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("dcmtk/3.6.6") - self.requires("double-conversion/3.2.0") + # TODO: Some packages can be added as optional, but they are not in CCI: + # - mkl + # - vtk + # - opencv + #todo: enable after fixing dcmtk compatibility with openssl on Windows + #self.requires("dcmtk/3.6.7") + self.requires("double-conversion/3.3.0") self.requires("eigen/3.4.0") - self.requires("expat/2.4.8") - self.requires("fftw/3.3.9") - self.requires("gdcm/3.0.9") - self.requires("hdf5/1.12.0") - self.requires("icu/71.1") # TODO: to remove? Seems to be a transitivie dependency through dcmtk - self.requires("libjpeg/9d") - self.requires("libpng/1.6.37") - self.requires("libtiff/4.3.0") - self.requires("openjpeg/2.4.0") - self.requires("onetbb/2020.3") - self.requires("zlib/1.2.12") - - @property - def _minimum_cpp_standard(self): - return 11 - - @property - def _minimum_compilers_version(self): - return { - "Visual Studio": "14", - "gcc": "4.8.1", - "clang": "3.3", - "apple-clang": "9", - } + self.requires("expat/2.5.0") + self.requires("fftw/3.3.10") + self.requires("gdcm/3.0.21") + self.requires("hdf5/1.14.1") + self.requires("libjpeg/9e") + self.requires("libpng/1.6.40") + self.requires("libtiff/4.5.1") + self.requires("openjpeg/2.5.0") + self.requires("onetbb/2021.9.0") + self.requires("zlib/1.2.13") def validate(self): - if self.options.shared and not self.options["hdf5"].shared: + if self.options.shared and not self.dependencies["hdf5"].options.shared: raise ConanInvalidConfiguration("When building a shared itk, hdf5 needs to be shared too (or not linked to by the consumer).\n" "This is because H5::DataSpace::ALL might get initialized twice, which will cause a H5::DataSpaceIException to be thrown).") - if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, self._minimum_cpp_standard) - min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) - if not min_version: - self.output.warn("{} recipe lacks information about the {} compiler support.".format( - self.name, self.settings.compiler)) - else: - if tools.Version(self.settings.compiler.version) < min_version: - raise ConanInvalidConfiguration("{} requires C++{} support. The current compiler {} {} does not support it.".format( - self.name, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler.version)) - + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + check_min_vs(self, 190) + if not is_msvc(self): + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - - self._cmake = CMake(self) - self._cmake.definitions["BUILD_EXAMPLES"] = False - self._cmake.definitions["BUILD_TESTING"] = False - self._cmake.definitions["BUILD_DOCUMENTATION"] = False - self._cmake.definitions["ITK_SKIP_PATH_LENGTH_CHECKS"] = True - - self._cmake.definitions["ITK_USE_SYSTEM_LIBRARIES"] = True - self._cmake.definitions["ITK_USE_SYSTEM_DCMTK"] = True - self._cmake.definitions["ITK_USE_SYSTEM_DOUBLECONVERSION"] = True - self._cmake.definitions["ITK_USE_SYSTEM_EIGEN"] = True - self._cmake.definitions["ITK_USE_SYSTEM_FFTW"] = True - self._cmake.definitions["ITK_USE_SYSTEM_GDCM"] = True - self._cmake.definitions["ITK_USE_SYSTEM_HDF5"] = True - self._cmake.definitions["ITK_USE_SYSTEM_ICU"] = True - self._cmake.definitions["ITK_USE_SYSTEM_JPEG"] = True - self._cmake.definitions["ITK_USE_SYSTEM_PNG"] = True - self._cmake.definitions["ITK_USE_SYSTEM_TIFF"] = True - self._cmake.definitions["ITK_USE_SYSTEM_ZLIB"] = True + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + #call find_package on top level + tc.cache_variables["CMAKE_PROJECT_ITK_INCLUDE"] = os.path.join(self.source_folder, "conan_cmake_project_include.cmake") + tc.variables["BUILD_EXAMPLES"] = False + tc.variables["BUILD_TESTING"] = False + tc.variables["BUILD_DOCUMENTATION"] = False + tc.variables["ITK_SKIP_PATH_LENGTH_CHECKS"] = True + + tc.variables["ITK_USE_SYSTEM_LIBRARIES"] = True + tc.variables["ITK_USE_SYSTEM_DCMTK"] = True + tc.variables["ITK_USE_SYSTEM_DOUBLECONVERSION"] = True + tc.variables["ITK_USE_SYSTEM_EIGEN"] = True + tc.variables["ITK_USE_SYSTEM_FFTW"] = True + tc.variables["ITK_USE_SYSTEM_GDCM"] = True + tc.variables["ITK_USE_SYSTEM_HDF5"] = True + tc.variables["ITK_USE_SYSTEM_ICU"] = True + tc.variables["ITK_USE_SYSTEM_JPEG"] = True + tc.variables["ITK_USE_SYSTEM_PNG"] = True + tc.variables["ITK_USE_SYSTEM_TIFF"] = True + tc.variables["ITK_USE_SYSTEM_ZLIB"] = True # FIXME: Missing Kwiml recipe - self._cmake.definitions["ITK_USE_SYSTEM_KWIML"] = False + tc.variables["ITK_USE_SYSTEM_KWIML"] = False # FIXME: Missing VXL recipe - self._cmake.definitions["ITK_USE_SYSTEM_VXL"] = False - self._cmake.definitions["GDCM_USE_SYSTEM_OPENJPEG"] = True - - self._cmake.definitions["ITK_BUILD_DEFAULT_MODULES"] = False - self._cmake.definitions["Module_ITKDeprecated"] = False - self._cmake.definitions["Module_ITKMINC"] = False - self._cmake.definitions["Module_ITKIOMINC"] = False - - self._cmake.definitions["Module_ITKVideoBridgeOpenCV"] = False - - self._cmake.definitions["Module_ITKDCMTK"] = True - self._cmake.definitions["Module_ITKIODCMTK"] = True - self._cmake.definitions["Module_ITKIOHDF5"] = True - self._cmake.definitions["Module_ITKIOTransformHDF5"] = False - self._cmake.definitions["Module_ITKAnisotropicSmoothing"] = True - self._cmake.definitions["Module_ITKAntiAlias"] = True - self._cmake.definitions["Module_ITKBiasCorrection"] = True - self._cmake.definitions["Module_ITKBinaryMathematicalMorphology"] = True - self._cmake.definitions["Module_ITKBioCell"] = True - self._cmake.definitions["Module_ITKClassifiers"] = True - self._cmake.definitions["Module_ITKColormap"] = True - self._cmake.definitions["Module_ITKConnectedComponents"] = True - self._cmake.definitions["Module_ITKConvolution"] = True - self._cmake.definitions["Module_ITKCurvatureFlow"] = True - self._cmake.definitions["Module_ITKDeconvolution"] = True - self._cmake.definitions["Module_ITKDeformableMesh"] = True - self._cmake.definitions["Module_ITKDenoising"] = True - self._cmake.definitions["Module_ITKDiffusionTensorImage"] = True - self._cmake.definitions["Module_ITKDisplacementField"] = True - self._cmake.definitions["Module_ITKDistanceMap"] = True - self._cmake.definitions["Module_ITKEigen"] = True - self._cmake.definitions["Module_ITKFEM"] = True - self._cmake.definitions["Module_ITKFEMRegistration"] = True - self._cmake.definitions["Module_ITKFFT"] = True - self._cmake.definitions["Module_ITKFastMarching"] = True - self._cmake.definitions["Module_ITKGIFTI"] = True - self._cmake.definitions["Module_ITKGPUAnisotropicSmoothing"] = True - self._cmake.definitions["Module_ITKGPUImageFilterBase"] = True - self._cmake.definitions["Module_ITKGPUPDEDeformableRegistration"] = True - self._cmake.definitions["Module_ITKGPURegistrationCommon"] = True - self._cmake.definitions["Module_ITKGPUSmoothing"] = True - self._cmake.definitions["Module_ITKGPUThresholding"] = True - self._cmake.definitions["Module_ITKIOCSV"] = True - self._cmake.definitions["Module_ITKIOGE"] = True - self._cmake.definitions["Module_ITKIOIPL"] = True - self._cmake.definitions["Module_ITKIOMesh"] = True - self._cmake.definitions["Module_ITKIOPhilipsREC"] = True - self._cmake.definitions["Module_ITKIORAW"] = True - self._cmake.definitions["Module_ITKIOSiemens"] = True - self._cmake.definitions["Module_ITKIOSpatialObjects"] = True - self._cmake.definitions["Module_ITKIOTransformBase"] = True - self._cmake.definitions["Module_ITKIOTransformInsightLegacy"] = True - self._cmake.definitions["Module_ITKIOTransformMatlab"] = True - self._cmake.definitions["Module_ITKIOXML"] = True - self._cmake.definitions["Module_ITKImageCompare"] = True - self._cmake.definitions["Module_ITKImageCompose"] = True - self._cmake.definitions["Module_ITKImageFeature"] = True - self._cmake.definitions["Module_ITKImageFusion"] = True - self._cmake.definitions["Module_ITKImageGradient"] = True - self._cmake.definitions["Module_ITKImageGrid"] = True - self._cmake.definitions["Module_ITKImageIntensity"] = True - self._cmake.definitions["Module_ITKImageLabel"] = True - self._cmake.definitions["Module_ITKImageSources"] = True - self._cmake.definitions["Module_ITKImageStatistics"] = True - self._cmake.definitions["Module_ITKIntegratedTest"] = True - self._cmake.definitions["Module_ITKKLMRegionGrowing"] = True - self._cmake.definitions["Module_ITKLabelMap"] = True - self._cmake.definitions["Module_ITKLabelVoting"] = True - self._cmake.definitions["Module_ITKLevelSets"] = True - self._cmake.definitions["Module_ITKLevelSetsv4"] = True - self._cmake.definitions["Module_ITKMarkovRandomFieldsClassifiers"] = True - self._cmake.definitions["Module_ITKMathematicalMorphology"] = True - self._cmake.definitions["Module_ITKMetricsv4"] = True - self._cmake.definitions["Module_ITKNarrowBand"] = True - self._cmake.definitions["Module_ITKNeuralNetworks"] = True - self._cmake.definitions["Module_ITKOptimizers"] = True - self._cmake.definitions["Module_ITKOptimizersv4"] = True - self._cmake.definitions["Module_ITKPDEDeformableRegistration"] = True - self._cmake.definitions["Module_ITKPath"] = True - self._cmake.definitions["Module_ITKPolynomials"] = True - self._cmake.definitions["Module_ITKQuadEdgeMeshFiltering"] = True - self._cmake.definitions["Module_ITKRegionGrowing"] = True - self._cmake.definitions["Module_ITKRegistrationCommon"] = True - self._cmake.definitions["Module_ITKRegistrationMethodsv4"] = True - self._cmake.definitions["Module_ITKReview"] = True - self._cmake.definitions["Module_ITKSignedDistanceFunction"] = True - self._cmake.definitions["Module_ITKSmoothing"] = True - self._cmake.definitions["Module_ITKSpatialFunction"] = True - self._cmake.definitions["Module_ITKTBB"] = True - self._cmake.definitions["Module_ITKThresholding"] = True - self._cmake.definitions["Module_ITKVideoCore"] = True - self._cmake.definitions["Module_ITKVideoFiltering"] = True - self._cmake.definitions["Module_ITKVideoIO"] = False - self._cmake.definitions["Module_ITKVoronoi"] = True - self._cmake.definitions["Module_ITKWatersheds"] = True - self._cmake.definitions["Module_ITKDICOMParser"] = True - - self._cmake.definitions["Module_ITKVTK"] = False - self._cmake.definitions["Module_ITKVtkGlue"] = False + tc.variables["ITK_USE_SYSTEM_VXL"] = False + tc.variables["GDCM_USE_SYSTEM_OPENJPEG"] = True + + tc.variables["ITK_BUILD_DEFAULT_MODULES"] = False + tc.variables["Module_ITKDeprecated"] = False + tc.variables["Module_ITKMINC"] = False + tc.variables["Module_ITKIOMINC"] = False + + tc.variables["Module_ITKVideoBridgeOpenCV"] = False + + #todo: enable after fixing dcmtk compatibility with openssl on Windows + tc.variables["Module_ITKDCMTK"] = False + tc.variables["Module_ITKIODCMTK"] = False + + tc.variables["Module_ITKIOHDF5"] = True + tc.variables["Module_ITKIOTransformHDF5"] = False + tc.variables["Module_ITKAnisotropicSmoothing"] = True + tc.variables["Module_ITKAntiAlias"] = True + tc.variables["Module_ITKBiasCorrection"] = True + tc.variables["Module_ITKBinaryMathematicalMorphology"] = True + tc.variables["Module_ITKBioCell"] = True + tc.variables["Module_ITKClassifiers"] = True + tc.variables["Module_ITKColormap"] = True + tc.variables["Module_ITKConnectedComponents"] = True + tc.variables["Module_ITKConvolution"] = True + tc.variables["Module_ITKCurvatureFlow"] = True + tc.variables["Module_ITKDeconvolution"] = True + tc.variables["Module_ITKDeformableMesh"] = True + tc.variables["Module_ITKDenoising"] = True + tc.variables["Module_ITKDiffusionTensorImage"] = True + tc.variables["Module_ITKDisplacementField"] = True + tc.variables["Module_ITKDistanceMap"] = True + tc.variables["Module_ITKEigen"] = True + tc.variables["Module_ITKFEM"] = True + tc.variables["Module_ITKFEMRegistration"] = True + tc.variables["Module_ITKFFT"] = True + tc.variables["Module_ITKFastMarching"] = True + tc.variables["Module_ITKGIFTI"] = True + tc.variables["Module_ITKGPUAnisotropicSmoothing"] = True + tc.variables["Module_ITKGPUImageFilterBase"] = True + tc.variables["Module_ITKGPUPDEDeformableRegistration"] = True + tc.variables["Module_ITKGPURegistrationCommon"] = True + tc.variables["Module_ITKGPUSmoothing"] = True + tc.variables["Module_ITKGPUThresholding"] = True + tc.variables["Module_ITKIOCSV"] = True + tc.variables["Module_ITKIOGE"] = True + tc.variables["Module_ITKIOIPL"] = True + tc.variables["Module_ITKIOMesh"] = True + tc.variables["Module_ITKIOPhilipsREC"] = True + tc.variables["Module_ITKIORAW"] = True + tc.variables["Module_ITKIOSiemens"] = True + tc.variables["Module_ITKIOSpatialObjects"] = True + tc.variables["Module_ITKIOTransformBase"] = True + tc.variables["Module_ITKIOTransformInsightLegacy"] = True + tc.variables["Module_ITKIOTransformMatlab"] = True + tc.variables["Module_ITKIOXML"] = True + tc.variables["Module_ITKImageCompare"] = True + tc.variables["Module_ITKImageCompose"] = True + tc.variables["Module_ITKImageFeature"] = True + tc.variables["Module_ITKImageFusion"] = True + tc.variables["Module_ITKImageGradient"] = True + tc.variables["Module_ITKImageGrid"] = True + tc.variables["Module_ITKImageIntensity"] = True + tc.variables["Module_ITKImageLabel"] = True + tc.variables["Module_ITKImageSources"] = True + tc.variables["Module_ITKImageStatistics"] = True + tc.variables["Module_ITKIntegratedTest"] = True + tc.variables["Module_ITKKLMRegionGrowing"] = True + tc.variables["Module_ITKLabelMap"] = True + tc.variables["Module_ITKLabelVoting"] = True + tc.variables["Module_ITKLevelSets"] = True + tc.variables["Module_ITKLevelSetsv4"] = True + tc.variables["Module_ITKMarkovRandomFieldsClassifiers"] = True + tc.variables["Module_ITKMathematicalMorphology"] = True + tc.variables["Module_ITKMetricsv4"] = True + tc.variables["Module_ITKNarrowBand"] = True + tc.variables["Module_ITKNeuralNetworks"] = True + tc.variables["Module_ITKOptimizers"] = True + tc.variables["Module_ITKOptimizersv4"] = True + tc.variables["Module_ITKPDEDeformableRegistration"] = True + tc.variables["Module_ITKPath"] = True + tc.variables["Module_ITKPolynomials"] = True + tc.variables["Module_ITKQuadEdgeMeshFiltering"] = True + tc.variables["Module_ITKRegionGrowing"] = True + tc.variables["Module_ITKRegistrationCommon"] = True + tc.variables["Module_ITKRegistrationMethodsv4"] = True + tc.variables["Module_ITKReview"] = True + tc.variables["Module_ITKSignedDistanceFunction"] = True + tc.variables["Module_ITKSmoothing"] = True + tc.variables["Module_ITKSpatialFunction"] = True + tc.variables["Module_ITKTBB"] = True + tc.variables["Module_ITKThresholding"] = True + tc.variables["Module_ITKVideoCore"] = True + tc.variables["Module_ITKVideoFiltering"] = True + tc.variables["Module_ITKVideoIO"] = False + tc.variables["Module_ITKVoronoi"] = True + tc.variables["Module_ITKWatersheds"] = True + tc.variables["Module_ITKDICOMParser"] = True + + tc.variables["Module_ITKVTK"] = False + tc.variables["Module_ITKVtkGlue"] = False # Disabled on Linux (link errors) - self._cmake.definitions["Module_ITKLevelSetsv4Visualization"] = False + tc.variables["Module_ITKLevelSetsv4Visualization"] = False # Disabled because Vxl vidl is not built anymore - self._cmake.definitions["Module_ITKVideoBridgeVXL"] = False + tc.variables["Module_ITKVideoBridgeVXL"] = False - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + tc.generate() + + tc = CMakeDeps(self) + tc.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + #The CMake policy CMP0091 must be NEW, but is '' + replace_in_file(self, + os.path.join(self.source_folder, "Modules", "ThirdParty", "VNL", "src", "vxl", "config", "cmake", "config", "VXLIntrospectionConfig.cmake"), + "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}", + "-DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}") def build(self): self._patch_sources() - 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() - cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.rmdir(os.path.join(self.package_folder, "share")) - tools.rmdir(os.path.join(self.package_folder, self._cmake_module_dir, "Modules")) - # Do not remove UseITK.cmake and *.h.in files - for cmake_file in glob.glob(os.path.join(self.package_folder, self._cmake_module_dir, "*.cmake")): - if os.path.basename(cmake_file) != "UseITK.cmake": - os.remove(cmake_file) - - self._create_cmake_module_alias_targets( - os.path.join(self.package_folder, self._module_file_rel_path), - {target:"ITK::{}".format(target) for target in self._itk_components.keys()}, - ) - - @staticmethod - def _create_cmake_module_alias_targets(module_file, targets): - content = "" - for alias, aliased in targets.items(): - content += textwrap.dedent("""\ - if(TARGET {aliased} AND NOT TARGET {alias}) - add_library({alias} INTERFACE IMPORTED) - set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) - endif() - """.format(alias=alias, aliased=aliased)) - tools.save(module_file, content) - @property - def _module_file_rel_path(self): - return os.path.join(self._cmake_module_dir, "conan-official-{}-targets.cmake".format(self.name)) + def _itk_subdir(self): + v = Version(self.version) + return f"ITK-{v.major}.{v.minor}" @property def _cmake_module_dir(self): return os.path.join("lib", "cmake", self._itk_subdir) @property - def _itk_subdir(self): - v = tools.Version(self.version) - return "ITK-{}.{}".format(v.major, v.minor) + def _module_file_rel_path(self): + return os.path.join(self._cmake_module_dir, f"conan-official-{self.name}-targets.cmake") @property def _itk_components(self): def libm(): return ["m"] if self.settings.os in ["Linux", "FreeBSD"] else [] + def libdl(): + return ["dl"] if self.settings.os in ["Linux", "FreeBSD"] else [] return { - "itksys": {}, + "itksys": {"system_libs": libdl()}, "itkvcl": {"system_libs": libm()}, "itkv3p_netlib": {"system_libs": libm()}, "itkvnl": {"requires": ["itkvcl"]}, @@ -386,7 +360,8 @@ def libm(): "ITKIOBMP": {"requires": ["ITKIOImageBase"]}, "ITKIOBioRad": {"requires": ["ITKIOImageBase"]}, "ITKIOCSV": {"requires": ["ITKIOImageBase"]}, - "ITKIODCMTK": {"requires": ["ITKIOImageBase", "dcmtk::dcmtk", "icu::icu"]}, + #todo: enable after fixing dcmtk compatibility with openssl on Windows + #"ITKIODCMTK": {"requires": ["ITKIOImageBase", "dcmtk::dcmtk"]}, "ITKIOGDCM": {"requires": ["ITKCommon", "ITKIOImageBase", "gdcm::gdcmDICT", "gdcm::gdcmMSFF"]}, "ITKIOIPL": {"requires": ["ITKIOImageBase"]}, "ITKIOGE": {"requires": ["ITKIOIPL", "ITKIOImageBase"]}, @@ -477,32 +452,58 @@ def libm(): "ITKVideoCore": {"requires": ["ITKCommon"]}, } + def _create_cmake_module_alias_targets(self): + targets = {target:f"ITK::{target}" for target in self._itk_components.keys()} + content = "" + for alias, aliased in targets.items(): + content += textwrap.dedent(f"""\ + if(TARGET {aliased} AND NOT TARGET {alias}) + add_library({alias} INTERFACE IMPORTED) + set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) + endif() + """) + save(self, os.path.join(self.package_folder, self._module_file_rel_path), content) + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, self._cmake_module_dir, "Modules")) + # Do not remove UseITK.cmake and *.h.in files + for cmake_file in glob.glob(os.path.join(self.package_folder, self._cmake_module_dir, "*.cmake")): + if os.path.basename(cmake_file) != "UseITK.cmake": + os.remove(cmake_file) + self._create_cmake_module_alias_targets() + def package_info(self): self.cpp_info.set_property("cmake_file_name", "ITK") self.cpp_info.set_property("cmake_build_modules", [os.path.join(self._cmake_module_dir, "UseITK.cmake")]) - itk_version = tools.Version(self.version) - lib_suffix = "-{}.{}".format(itk_version.major, itk_version.minor) + itk_version = Version(self.version) + lib_suffix = f"-{itk_version.major}.{itk_version.minor}" for name, values in self._itk_components.items(): is_header_only = values.get("header_only", False) system_libs = values.get("system_libs", []) requires = values.get("requires", []) self.cpp_info.components[name].set_property("cmake_target_name", name) + self.cpp_info.components[name].set_property("cmake_target_aliases", [f"ITK::{name}"]) self.cpp_info.components[name].builddirs.append(self._cmake_module_dir) self.cpp_info.components[name].includedirs.append(os.path.join("include", self._itk_subdir)) if not is_header_only: - self.cpp_info.components[name].libs = ["{}{}".format(name, lib_suffix)] + self.cpp_info.components[name].libs = [f"{name}{lib_suffix}"] self.cpp_info.components[name].system_libs = system_libs self.cpp_info.components[name].requires = requires # TODO: to remove in conan v2 once cmake_find_package* generators removed - self.cpp_info.components[name].names["cmake_find_package"] = name - self.cpp_info.components[name].names["cmake_find_package_multi"] = name - self.cpp_info.components[name].build_modules.append(os.path.join(self._cmake_module_dir, "UseITK.cmake")) - self.cpp_info.components[name].build_modules["cmake_find_package"].append(self._module_file_rel_path) - self.cpp_info.components[name].build_modules["cmake_find_package_multi"].append(self._module_file_rel_path) + for generator in ["cmake_find_package", "cmake_find_package_multi"]: + self.cpp_info.components[name].names[generator] = name + self.cpp_info.components[name].build_modules[generator].append(self._module_file_rel_path) + self.cpp_info.components[name].build_modules[generator].append(os.path.join(self._cmake_module_dir, "UseITK.cmake")) # TODO: to remove in conan v2 once cmake_find_package* generators removed - self.cpp_info.names["cmake_find_package"] = "ITK" - self.cpp_info.names["cmake_find_package_multi"] = "ITK" + for generator in ["cmake_find_package", "cmake_find_package_multi"]: + self.cpp_info.names[generator] = "ITK" diff --git a/recipes/itk/all/test_package/CMakeLists.txt b/recipes/itk/all/test_package/CMakeLists.txt index f9c2acebbb0bb..ad9e58069124d 100644 --- a/recipes/itk/all/test_package/CMakeLists.txt +++ b/recipes/itk/all/test_package/CMakeLists.txt @@ -1,12 +1,11 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +project(test_package CXX) find_package(ITK REQUIRED CONFIG) -find_package(HDF5 COMPONENTS CXX) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ITKCommon hdf5::hdf5_cpp) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) +target_link_libraries(${PROJECT_NAME} PRIVATE ITKCommon) +#itksys is already linked through dependencies of ITKCommon but we also want to check name alias +target_link_libraries(${PROJECT_NAME} PRIVATE ITK::itksys) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/itk/all/test_package/conanfile.py b/recipes/itk/all/test_package/conanfile.py index 38f4483872d47..ef5d7042163ec 100644 --- a/recipes/itk/all/test_package/conanfile.py +++ b/recipes/itk/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/itk/all/test_package/test_package.cpp b/recipes/itk/all/test_package/test_package.cpp index ef775457ccc9c..56077cb584102 100644 --- a/recipes/itk/all/test_package/test_package.cpp +++ b/recipes/itk/all/test_package/test_package.cpp @@ -1,8 +1,5 @@ #include "itkLightObject.h" -#include -#include - #include class Test : public itk::LightObject { @@ -12,12 +9,9 @@ class Test : public itk::LightObject { const char *GetNameOfClass() { return "Test"; } }; -int main(int, char **) try { - //Test::Pointer test = Test::New(); - //std::cout << test->GetNameOfClass() << std::endl; - return 0; -} catch(const H5::DataSpaceIException &e) { - std::cerr << "CAUGHT\n"; - e.printErrorStack(); +int main(int, char **) +{ + Test::Pointer test = Test::New(); + std::cout << test->GetNameOfClass() << std::endl; return 0; } diff --git a/recipes/itk/all/test_v1_package/CMakeLists.txt b/recipes/itk/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/itk/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/itk/all/test_v1_package/conanfile.py b/recipes/itk/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..5a05af3c2dfd2 --- /dev/null +++ b/recipes/itk/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +from conans import ConanFile, CMake +from conan.tools.build import cross_building +import os + + +class TestPackageV1Conan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 9be5d7923cee7aa97900a8376302ec49b261a726 Mon Sep 17 00:00:00 2001 From: Esteban Dugueperoux <43169544+EstebanDugueperoux2@users.noreply.github.com> Date: Tue, 22 Aug 2023 16:09:49 +0200 Subject: [PATCH 358/637] (#18389) Add pcl PointCloudLibrary package * Add pcl PointCloudLibrary package Inspired from https://github.com/conan-io/conan-center-index/pull/1891 * pcl: misc recipe tweaks * Update recipes/pcl/all/conanfile.py Co-authored-by: Martin Valgur * pcl: Further fixes to Conan targets use in CMake * pcl: Fix buggy OpenNI detection if libusb missing * pcl: Fix PCL CMake config breaking OpenGL detection * pcl: Fix _add_component() bugs * pcl: add TODOs for missing Conan packages * pcl: set_property("cmake_find_mode", "both") * pcl: more accurate modelling of PCL components * pcl: tidy description * Enable opengl event if with_vtk is false - Enable opengl event if with_vtk is false as done in PCL CMakeLists.txt * Revert "Enable opengl event if with_vtk is false" This reverts commit c4be26d44c9f2fd6ed4bd323714ff6bf2e67ed0d. * Enable opengl only if with_vtk==True * test is_msvc() method * test is_msvc_static_runtime * pcl: make components optional, add full dependency info * pcl: fixes to the component system * pcl: set OpenGL_GL_PREFERENCE=GLVND * pcl: fix _extra_libs handling * pcl: fix CUDA support * pcl: add all VTK system package variants * pcl: add missing transitive_headers=True based on installed header includes * pcl: add ws2_32 dep on Windows * Restore is_msvc_static_runtime import * pcl: fix Conan v1 issue * pcl: new add_build_type_postfix option, fix library naming on Windows * Take into account @maksim-petukhov remark * Take into account @valgur remark * Take into account maksim-petukhov remark * Set instantiate_only_core_point_types option at True * pcl: restore zlib dependency * pcl: adjust precompile_only_core_point_types name, add comment Based on https://github.com/PointCloudLibrary/pcl/blob/3ed96c246e5c873713ec670b895469d09149a552/cmake/pcl_options.cmake#L49 * Add rm to prevent PDBs files install --------- Co-authored-by: Martin Valgur --- recipes/pcl/all/conandata.yml | 19 + recipes/pcl/all/conanfile.py | 579 ++++++++++++++++++ ...n3-Eigen-target-in-pcl_common-target.patch | 25 + ...FixAboutMemoryConsumptionDuringBuild.patch | 38 ++ .../0001-cmake_use_conan_targets.patch | 52 ++ .../all/patches/0001-fix-FindOpenNI-bug.patch | 32 + recipes/pcl/all/test_package/CMakeLists.txt | 10 + recipes/pcl/all/test_package/conanfile.py | 27 + recipes/pcl/all/test_package/test_package.cpp | 73 +++ recipes/pcl/config.yml | 3 + 10 files changed, 858 insertions(+) create mode 100644 recipes/pcl/all/conandata.yml create mode 100644 recipes/pcl/all/conanfile.py create mode 100644 recipes/pcl/all/patches/0001-Add-Eigen3-Eigen-target-in-pcl_common-target.patch create mode 100644 recipes/pcl/all/patches/0001-ReportFixAboutMemoryConsumptionDuringBuild.patch create mode 100644 recipes/pcl/all/patches/0001-cmake_use_conan_targets.patch create mode 100644 recipes/pcl/all/patches/0001-fix-FindOpenNI-bug.patch create mode 100644 recipes/pcl/all/test_package/CMakeLists.txt create mode 100644 recipes/pcl/all/test_package/conanfile.py create mode 100644 recipes/pcl/all/test_package/test_package.cpp create mode 100644 recipes/pcl/config.yml diff --git a/recipes/pcl/all/conandata.yml b/recipes/pcl/all/conandata.yml new file mode 100644 index 0000000000000..6eea92ef4a761 --- /dev/null +++ b/recipes/pcl/all/conandata.yml @@ -0,0 +1,19 @@ +sources: + "1.13.1": + url: https://github.com/PointCloudLibrary/pcl/archive/refs/tags/pcl-1.13.1.tar.gz + sha256: 8ab98a9db371d822de0859084a375a74bdc7f31c96d674147710cf4101b79621 +patches: + "1.13.1": + - patch_file: "patches/0001-cmake_use_conan_targets.patch" + patch_description: "Update PCL CMake files to work with Conan" + patch_type: "conan" + - patch_file: "patches/0001-fix-FindOpenNI-bug.patch" + patch_description: "Fix a libusb detection bug in FindOpenNI.cmake" + patch_type: "bugfix" + - patch_file: "patches/0001-Add-Eigen3-Eigen-target-in-pcl_common-target.patch" + patch_description: "Add Eigen3::Eigen target to pcl_common target" + patch_type: "conan" + - patch_file: "patches/0001-ReportFixAboutMemoryConsumptionDuringBuild.patch" + patch_description: "MovingLeastSquares: reduce the number of instantiations to reduce compile time" + patch_source: "https://github.com/PointCloudLibrary/pcl/pull/5764" + patch_type: "conan" diff --git a/recipes/pcl/all/conanfile.py b/recipes/pcl/all/conanfile.py new file mode 100644 index 0000000000000..c957981fea188 --- /dev/null +++ b/recipes/pcl/all/conanfile.py @@ -0,0 +1,579 @@ +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 apply_conandata_patches, export_conandata_patches, get, copy, rmdir, rm +from conan.tools.gnu import PkgConfigDeps +from conan.tools.scm import Version +from conan.tools.system import package_manager +import os + +required_conan_version = ">=1.53.0" + +class PclConan(ConanFile): + name = "pcl" + description = ("The Point Cloud Library (PCL) is a standalone, large-scale, " + "open project for 2D/3D image and point cloud processing.") + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/PointCloudLibrary/pcl" + topics = ("computer vision", "point cloud", "pointcloud", "3d", "pcd", "ply", "stl", "ifs", "vtk") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + # Enable/disable individual components + "2d": [True, False], + "features": [True, False], + "filters": [True, False], + "geometry": [True, False], + "io": [True, False], + "kdtree": [True, False], + "keypoints": [True, False], + "ml": [True, False], + "octree": [True, False], + "outofcore": [True, False], + "people": [True, False], + "recognition": [True, False], + "registration": [True, False], + "sample_consensus": [True, False], + "search": [True, False], + "segmentation": [True, False], + "simulation": [True, False], + "stereo": [True, False], + "surface": [True, False], + "tracking": [True, False], + "visualization": [True, False], + "cuda_common": [True, False], + "cuda_features": [True, False], + "cuda_io": [True, False], + "cuda_sample_consensus": [True, False], + "cuda_segmentation": [True, False], + "gpu_containers": [True, False], + "gpu_features": [True, False], + "gpu_kinfu": [True, False], + "gpu_kinfu_large_scale": [True, False], + "gpu_octree": [True, False], + "gpu_people": [True, False], + "gpu_segmentation": [True, False], + "gpu_surface": [True, False], + "gpu_tracking": [True, False], + "gpu_utils": [True, False], + "apps": [True, False], + "tools": [True, False], + # Optional external dependencies. + # Only used if the corresponding component is enabled. + "with_cuda": [True, False], + "with_flann": [True, False], + "with_libusb": [True, False], + "with_opencv": [True, False], + "with_opengl": [True, False], + "with_openmp": [True, False], + "with_pcap": [True, False], + "with_png": [True, False], + "with_qhull": [True, False], + "with_qt": [True, False], + "with_vtk": [True, False], + # TODO: + # "with_davidsdk": [True, False], + # "with_dssdk": [True, False], + # "with_ensenso": [True, False], + # "with_fzapi": [True, False], + # "with_metslib": [True, False], + # "with_openni": [True, False], + # "with_openni2": [True, False], + # "with_rssdk": [True, False], + # "with_rssdk2": [True, False], + # "with_qvtk": [True, False], + # Precompile for a minimal set of point types only instead of all (e.g., pcl::PointXYZ instead of PCL_XYZ_POINT_TYPES) + "precompile_only_core_point_types": [True, False], + # Whether to append a ''/d/rd/s postfix to executables on Windows depending on the build type + "add_build_type_postfix": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + # Enable/disable individual components + "2d": True, + "features": True, + "filters": True, + "geometry": True, + "io": True, + "kdtree": True, + "keypoints": True, + "ml": True, + "octree": True, + "outofcore": False, + "people": False, + "recognition": True, + "registration": True, + "sample_consensus": True, + "search": True, + "segmentation": True, + "simulation": False, + "stereo": True, + "surface": True, + "tracking": True, + # Visualization is currently disabled by default due to missing VTK package + "visualization": False, + # GPU components are disabled by default + "cuda_common": False, + "cuda_features": False, + "cuda_io": False, + "cuda_sample_consensus": False, + "cuda_segmentation": False, + "gpu_containers": False, + "gpu_features": False, + "gpu_kinfu": False, + "gpu_kinfu_large_scale": False, + "gpu_octree": False, + "gpu_people": False, + "gpu_segmentation": False, + "gpu_surface": False, + "gpu_tracking": False, + "gpu_utils": False, + "apps": False, + "tools": False, + # Optional external dependencies + "with_cuda": False, + "with_flann": True, + "with_libusb": True, + "with_opencv": True, + "with_opengl": True, + "with_openmp": False, + "with_pcap": True, + "with_png": True, + "with_qhull": True, + "with_qt": True, + "with_vtk": False, + # Enabled to avoid excessive memory usage during compilation in CCI + "precompile_only_core_point_types": True, + "add_build_type_postfix": False, + } + + short_paths = True + + # The component details have been extracted from their CMakeLists.txt files using + # https://gist.github.com/valgur/e54e39b6a8931b58cc1776515104c828 + @property + def _external_deps(self): + return { + "common": ["boost", "eigen"], + "cuda_common": ["cuda"], + "cuda_features": ["cuda"], + "cuda_io": ["cuda", "openni"], + "cuda_sample_consensus": ["cuda"], + "cuda_segmentation": ["cuda"], + "gpu_containers": ["cuda"], + "gpu_features": ["cuda"], + "gpu_kinfu": ["cuda"], + "gpu_kinfu_large_scale": ["cuda"], + "gpu_octree": ["cuda"], + "gpu_people": ["cuda"], + "gpu_segmentation": ["cuda"], + "gpu_surface": ["cuda"], + "gpu_tracking": ["cuda"], + "gpu_utils": ["cuda"], + "io": ["zlib"], + "people": ["vtk"], + "surface": ["zlib"], + "visualization": ["vtk"], + } + + @property + def _external_optional_deps(self): + return { + "2d": ["vtk"], + "io": ["davidsdk", "dssdk", "ensenso", "fzapi", "libusb", "openni", "openni2", "pcap", "png", "rssdk", "rssdk2", "vtk"], + "kdtree": ["flann"], + "people": ["openni"], + "recognition": ["metslib"], + "search": ["flann"], + "simulation": ["opengl"], + "surface": ["qhull", "vtk"], + "visualization": ["davidsdk", "dssdk", "ensenso", "opengl", "openni", "openni2", "qvtk", "rssdk"], + "apps": ["cuda", "libusb", "opengl", "openni", "png", "qhull", "qt", "qvtk", "vtk"], + "tools": ["cuda", "davidsdk", "dssdk", "ensenso", "opencv", "opengl", "openni", "openni2", "qhull", "rssdk", "vtk"], + } + + def _ext_dep_to_conan_target(self, dep): + if not self._is_enabled(dep): + return [] + return { + "boost": ["boost::boost"], + "cuda": [], + "davidsdk": [], + "dssdk": [], + "eigen": ["eigen::eigen"], + "ensenso": [], + "flann": ["flann::flann"], + "fzapi": [], + "libusb": ["libusb::libusb"], + "metslib": [], + "opencv": ["opencv::opencv"], + "opengl": ["opengl::opengl", "freeglut::freeglut", "glew::glew", "glu::glu"], + "openni": [], + "openni2": [], + "pcap": ["libpcap::libpcap"], + "png": ["libpng::libpng"], + "qhull": ["qhull::qhull"], + "qt": ["qt::qt"], + "qvtk": [], + "rssdk": [], + "rssdk2": [], + "vtk": [], + "zlib": ["zlib::zlib"], + }[dep] + + @property + def _internal_deps(self): + return { + "2d": ["common", "filters"], + "common": [], + "cuda_common": [], + "cuda_features": ["common", "cuda_common", "io"], + "cuda_io": ["common", "cuda_common", "io"], + "cuda_sample_consensus": ["common", "cuda_common", "io"], + "cuda_segmentation": ["common", "cuda_common", "io"], + "features": ["2d", "common", "filters", "kdtree", "octree", "search"], + "filters": ["common", "kdtree", "octree", "sample_consensus", "search"], + "geometry": ["common"], + "gpu_containers": ["common"], + "gpu_features": ["common", "geometry", "gpu_containers", "gpu_octree", "gpu_utils"], + "gpu_kinfu": ["common", "geometry", "gpu_containers", "io", "search"], + "gpu_kinfu_large_scale": ["common", "features", "filters", "geometry", "gpu_containers", + "gpu_utils", "io", "kdtree", "octree", "search", "surface"], + "gpu_octree": ["common", "gpu_containers", "gpu_utils"], + "gpu_people": ["common", "features", "filters", "geometry", "gpu_containers", + "gpu_utils", "io", "kdtree", "octree", "search", "segmentation", + "surface", "visualization"], + "gpu_segmentation": ["common", "gpu_containers", "gpu_octree", "gpu_utils"], + "gpu_surface": ["common", "geometry", "gpu_containers", "gpu_utils"], + "gpu_tracking": ["common", "filters", "gpu_containers", "gpu_octree", + "gpu_utils", "kdtree", "octree", "search", "tracking"], + "gpu_utils": ["common", "gpu_containers"], + "io": ["common", "octree"], + "kdtree": ["common"], + "keypoints": ["common", "features", "filters", "kdtree", "octree", "search"], + "ml": ["common"], + "octree": ["common"], + "outofcore": ["common", "filters", "io", "octree", "visualization"], + "people": ["common", "filters", "geometry", "io", "kdtree", "octree", + "sample_consensus", "search", "segmentation", "visualization"], + "recognition": ["common", "features", "filters", "io", "kdtree", "ml", + "octree", "registration", "sample_consensus", "search"], + "registration": ["common", "features", "filters", "kdtree", "octree", + "sample_consensus", "search"], + "sample_consensus": ["common", "search"], + "search": ["common", "kdtree", "octree"], + "segmentation": ["common", "features", "filters", "geometry", "kdtree", + "ml", "octree", "sample_consensus", "search"], + "simulation": ["common", "features", "filters", "geometry", "io", + "kdtree", "octree", "search", "surface", "visualization"], + "stereo": ["common", "io"], + "surface": ["common", "kdtree", "octree", "search"], + "tracking": ["common", "filters", "kdtree", "octree", "search"], + "visualization": ["common", "geometry", "io", "kdtree", "octree", "search"], + } + + @property + def _internal_optional_deps(self): + return { + "apps": ["2d", "common", "cuda_common", "cuda_features", "cuda_io", + "cuda_sample_consensus", "cuda_segmentation", "features", "filters", + "geometry", "io", "kdtree", "keypoints", "ml", "octree", "recognition", + "registration", "sample_consensus", "search", "segmentation", "stereo", + "surface", "tracking", "visualization"], + "tools": ["features", "filters", "geometry", "gpu_kinfu", "gpu_kinfu_large_scale", + "io", "kdtree", "keypoints", "ml", "octree", "recognition", "registration", + "sample_consensus", "search", "segmentation", "surface", "visualization"], + } + + def _is_header_only(self, component): + return component in {"2d", "cuda_common", "geometry"} + + @property + def _extra_libs(self): + return {"io": ["pcl_io_ply"]} + + def _enabled_components(self, opts=None): + opts = opts or self.options + return {c for c in self._internal_deps if opts.get_safe(c)} | {"common"} + + def _disabled_components(self, opts=None): + opts = opts or self.options + return {c for c in self._internal_deps if not opts.get_safe(c)} - {"common"} + + def _used_ext_deps(self, opts): + all_deps = set() + for component in self._enabled_components(opts): + all_deps.update(self._external_deps.get(component, [])) + all_deps.update(self._external_optional_deps.get(component, [])) + return all_deps + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "7", + "apple-clang": "10", + "msvc": "191", + "Visual Studio": "15", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def system_requirements(self): + if self._is_enabled("vtk"): + # TODO: add vtk/system package? + # https://repology.org/project/vtk/versions + package_manager.Apt(self).install(["libvtk9-dev"], update=True, check=True) + package_manager.Dnf(self).install(["vtk-devel"], update=True, check=True) + package_manager.Yum(self).install(["vtk-devel"], update=True, check=True) + package_manager.PacMan(self).install(["vtk"], update=True, check=True) + package_manager.Zypper(self).install(["vtk"], update=True, check=True) + package_manager.Pkg(self).install(["vtk9"], update=True, check=True) + package_manager.Brew(self).install(["vtk"], update=True, check=True) + if self.settings.os == "Windows": + self.output.warning("VTK must be installed manually on Windows.") + + def _is_enabled(self, dep): + always_available = ["boost", "eigen", "zlib"] + is_available = self.options.get_safe(f"with_{dep}") or dep in always_available + is_used = dep in self._used_ext_deps(self.options) + return is_available and is_used + + def requirements(self): + self.requires("boost/1.82.0", transitive_headers=True) + self.requires("eigen/3.4.0", transitive_headers=True) + if self._is_enabled("flann"): + self.requires("flann/1.9.2", transitive_headers=True) + if self._is_enabled("png"): + self.requires("libpng/1.6.40") + if self._is_enabled("qhull"): + self.requires("qhull/8.0.1", transitive_headers=True) + if self._is_enabled("qt"): + self.requires("qt/6.5.1") + if self._is_enabled("libusb"): + self.requires("libusb/1.0.26", transitive_headers=True) + if self._is_enabled("pcap"): + self.requires("libpcap/1.10.4") + if self._is_enabled("opengl"): + # OpenGL is only used if VTK is available + self.requires("opengl/system", transitive_headers=True) + self.requires("freeglut/3.4.0", transitive_headers=True) + self.requires("glew/2.2.0", transitive_headers=True) + self.requires("glu/system", transitive_headers=True) + if self._is_enabled("opencv"): + self.requires("opencv/4.5.5", transitive_headers=True) + if self._is_enabled("zlib"): + self.requires("zlib/1.2.13") + # TODO: + # self.requires("vtk/9.x.x", transitive_headers=True) + # self.requires("openni/x.x.x", transitive_headers=True) + # self.requires("openni2/x.x.x", transitive_headers=True) + # self.requires("ensenso/x.x.x", transitive_headers=True) + # self.requires("davidsdk/x.x.x", transitive_headers=True) + # self.requires("dssdk/x.x.x", transitive_headers=True) + # self.requires("rssdk/x.x.x", transitive_headers=True) + # self.requires("metslib/x.x.x", transitive_headers=True) + # self.requires("openmp/system", transitive_headers=True) + # self.requires("opennurbs/x.x.x", transitive_headers=True) + # self.requires("poisson4/x.x.x", transitive_headers=True) + + def package_id(self): + used_deps = self._used_ext_deps(self.info.options) + # Disable options that have no effect + all_opts = [opt for opt, value in self.info.options.items()] + for opt in all_opts: + if opt.startswith("with_") and opt.split("_", 1)[1] not in used_deps: + setattr(self.info.options, opt, False) + + def validate(self): + enabled_components = self._enabled_components() + for component in sorted(enabled_components): + for dep in self._external_deps.get(component, []): + if not self._is_enabled(dep): + raise ConanInvalidConfiguration( + f"'with_{dep}=True' is required when '{component}' is enabled." + ) + for dep in self._internal_deps[component]: + if dep not in enabled_components: + raise ConanInvalidConfiguration( + f"'{dep}=True' is required when '{component}' is enabled." + ) + + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["PCL_SHARED_LIBS"] = self.options.shared + tc.cache_variables["WITH_LIBUSB"] = self._is_enabled("libusb") + tc.cache_variables["WITH_OPENGL"] = self._is_enabled("opengl") + tc.cache_variables["WITH_OPENMP"] = self._is_enabled("openmp") + tc.cache_variables["WITH_PCAP"] = self._is_enabled("pcap") + tc.cache_variables["WITH_PNG"] = self._is_enabled("png") + tc.cache_variables["WITH_QHULL"] = self._is_enabled("qhull") + tc.cache_variables["WITH_QT"] = self._is_enabled("qt") + tc.cache_variables["WITH_VTK"] = self._is_enabled("vtk") + tc.cache_variables["WITH_CUDA"] = self._is_enabled("cuda") + tc.cache_variables["BUILD_CUDA"] = self._is_enabled("cuda") + tc.cache_variables["BUILD_GPU"] = self._is_enabled("cuda") + tc.cache_variables["WITH_SYSTEM_ZLIB"] = True + tc.cache_variables["PCL_ONLY_CORE_POINT_TYPES"] = self.options.precompile_only_core_point_types + # The default False setting breaks OpenGL detection in CMake + tc.cache_variables["PCL_ALLOW_BOTH_SHARED_AND_STATIC_DEPENDENCIES"] = True + tc.variables["OpenGL_GL_PREFERENCE"] = "GLVND" + + if not self.options.add_build_type_postfix: + tc.cache_variables["CMAKE_DEBUG_POSTFIX"] = "" + tc.cache_variables["CMAKE_RELEASE_POSTFIX"] = "" + tc.cache_variables["CMAKE_RELWITHDEBINFO_POSTFIX"] = "" + tc.cache_variables["CMAKE_MINSIZEREL_POSTFIX"] = "" + + tc.cache_variables["BUILD_tools"] = self.options.tools + tc.cache_variables["BUILD_apps"] = self.options.apps + tc.cache_variables["BUILD_examples"] = False + enabled = sorted(self._enabled_components()) + disabled = sorted(self._disabled_components()) + self.output.info("Enabled components: " + ", ".join(enabled)) + self.output.info("Disabled components: " + ", ".join(disabled)) + for comp in enabled: + tc.cache_variables[f"BUILD_{comp}"] = True + for comp in disabled: + tc.cache_variables[f"BUILD_{comp}"] = False + + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("eigen", "cmake_file_name", "EIGEN") + deps.set_property("flann", "cmake_file_name", "FLANN") + deps.set_property("flann", "cmake_target_name", "FLANN::FLANN") + deps.set_property("libpcap", "cmake_file_name", "PCAP") + deps.set_property("qhull", "cmake_file_name", "QHULL") + deps.set_property("qhull", "cmake_target_name", "QHULL::QHULL") + deps.generate() + + deps = PkgConfigDeps(self) + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + for mod in ["Eigen", "FLANN", "GLEW", "Pcap", "Qhull", "libusb"]: + os.remove(os.path.join(self.source_folder, "cmake", "Modules", f"Find{mod}.cmake")) + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.txt", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "cmake")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + # Remove MSVC runtime libraries + for dll_pattern_to_remove in ["concrt*.dll", "msvcp*.dll", "vcruntime*.dll"]: + rm(self, dll_pattern_to_remove, os.path.join(self.package_folder, "bin")) + + @property + def _version_suffix(self): + semver = Version(self.version) + return f"{semver.major}.{semver.minor}" + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "PCL") + self.cpp_info.set_property("cmake_target_name", "PCL::PCL") + self.cpp_info.set_property("cmake_find_mode", "both") + + for name in sorted(self._enabled_components()): + component = self.cpp_info.components[name] + component.names["cmake_find_package"] = name + component.names["cmake_find_package_multi"] = name + component.set_property("cmake_file_name", name) + component.set_property("cmake_module_file_name", name) + component.set_property("cmake_target_name", f"PCL::{name}") + component.set_property("pkg_config_name", f"pcl_{name}-{self._version_suffix}") + component.includedirs = [os.path.join("include", f"pcl-{self._version_suffix}")] + if not self._is_header_only(name): + component.libs = [f"pcl_{name}"] + component.libs += self._extra_libs.get(name, []) + component.requires += self._internal_deps[name] + for opt_dep in self._internal_optional_deps.get(name, []): + if self.options.get_safe(opt_dep): + component.requires.append(opt_dep) + for dep in self._external_deps.get(name, []) + self._external_optional_deps.get(name, []): + component.requires += self._ext_dep_to_conan_target(dep) + self.output.info(f"Component {name} requires: {component.requires}") + + if self.options.apps: + component = self.cpp_info.components["apps"] + component.libs = [] + component.includedirs = [] + component.requires = self._internal_optional_deps["apps"] + for dep in self._external_optional_deps["apps"]: + component.requires += self._ext_dep_to_conan_target(dep) + + if self.options.tools: + component = self.cpp_info.components["tools"] + component.libs = [] + component.includedirs = [] + component.requires = self._internal_optional_deps["tools"] + for dep in self._external_optional_deps["tools"]: + component.requires += self._ext_dep_to_conan_target(dep) + + common = self.cpp_info.components["common"] + if not self.options.shared: + if self.settings.os in ["Linux", "FreeBSD"]: + common.system_libs.append("pthread") + if self.options.with_openmp: + if self.settings.os == "Linux": + if self.settings.compiler == "gcc": + common.sharedlinkflags.append("-fopenmp") + common.exelinkflags.append("-fopenmp") + elif self.settings.os == "Windows": + if self.settings.compiler == "msvc": + common.system_libs.append("delayimp") + elif self.settings.compiler == "gcc": + common.system_libs.append("gomp") + if self.settings.os == "Windows": + common.system_libs.append("ws2_32") + + # TODO: Legacy, to be removed on Conan 2.0 + self.cpp_info.names["cmake_find_package"] = "PCL" + self.cpp_info.names["cmake_find_package_multi"] = "PCL" diff --git a/recipes/pcl/all/patches/0001-Add-Eigen3-Eigen-target-in-pcl_common-target.patch b/recipes/pcl/all/patches/0001-Add-Eigen3-Eigen-target-in-pcl_common-target.patch new file mode 100644 index 0000000000000..5dfeedf59e5f4 --- /dev/null +++ b/recipes/pcl/all/patches/0001-Add-Eigen3-Eigen-target-in-pcl_common-target.patch @@ -0,0 +1,25 @@ +From a975f68d2e399a1563fe0d66b2c048978f0282d1 Mon Sep 17 00:00:00 2001 +From: Esteban DUGUEPEROUX +Date: Mon, 7 Aug 2023 23:50:12 +0200 +Subject: [PATCH] Add Eigen3::Eigen target in pcl_common target + +--- + common/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt +index 48e1a202e..e0ced5241 100644 +--- a/common/CMakeLists.txt ++++ b/common/CMakeLists.txt +@@ -179,7 +179,7 @@ target_include_directories(${LIB_NAME} PUBLIC + $ + ) + +-target_link_libraries(${LIB_NAME} Boost::boost) ++target_link_libraries(${LIB_NAME} Boost::boost Eigen3::Eigen) + + if(MSVC AND NOT (MSVC_VERSION LESS 1915)) + # MSVC resolved a byte alignment issue in compiler version 15.9 +-- +2.41.0 + diff --git a/recipes/pcl/all/patches/0001-ReportFixAboutMemoryConsumptionDuringBuild.patch b/recipes/pcl/all/patches/0001-ReportFixAboutMemoryConsumptionDuringBuild.patch new file mode 100644 index 0000000000000..35fba73e8b067 --- /dev/null +++ b/recipes/pcl/all/patches/0001-ReportFixAboutMemoryConsumptionDuringBuild.patch @@ -0,0 +1,38 @@ +From 0bc2f2cc369f7d013ee5c29075188c4e26ea6f87 Mon Sep 17 00:00:00 2001 +From: Markus Vieth +Date: Sat, 15 Jul 2023 15:49:25 +0200 +Subject: [PATCH] MovingLeastSquares: reduce the number of instantiations to + reduce compile time PCL_XYZ_POINT_TYPES currently contains 18 types, so + previously, MLS was instantiated for 18*18=324 different type combinations. + However, among those were instantiations which are likely used by nobody + (like `pcl::MovingLeastSquares`). With + these changes, MLS is only instantiated 6*6+(18-6)=48 times. The most common + type combinations should be covered, but if someone uses an uncommon + combinations, they have to add `#define PCL_NO_PRECOMPILE` before including + `pcl/surface/mls.h` to avoid linker errors. + +--- + surface/src/mls.cpp | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/surface/src/mls.cpp b/surface/src/mls.cpp +index ba2fd655300..c948f4d19e1 100644 +--- a/surface/src/mls.cpp ++++ b/surface/src/mls.cpp +@@ -80,6 +80,15 @@ pcl::MLSResult::calculatePrincipalCurvatures (const double u, const double v) co + PCL_INSTANTIATE_PRODUCT(MovingLeastSquares, ((pcl::PointXYZ)(pcl::PointXYZI)(pcl::PointXYZRGB)(pcl::PointXYZRGBA)(pcl::PointXYZRGBNormal)(pcl::PointNormal)) + ((pcl::PointXYZ)(pcl::PointXYZI)(pcl::PointXYZRGB)(pcl::PointXYZRGBA)(pcl::PointXYZRGBNormal)(pcl::PointNormal))) + #else +- PCL_INSTANTIATE_PRODUCT(MovingLeastSquares, (PCL_XYZ_POINT_TYPES)(PCL_XYZ_POINT_TYPES)) ++ // PCL_INSTANTIATE_PRODUCT(MovingLeastSquares, (PCL_XYZ_POINT_TYPES)(PCL_XYZ_POINT_TYPES)) ++ // All instantiations that are available with PCL_ONLY_CORE_POINT_TYPES, plus instantiations for all XYZ types where PointInT and PointOutT are the same ++ #define PCL_INSTANTIATE_MovingLeastSquaresSameInAndOut(T) template class PCL_EXPORTS pcl::MovingLeastSquares; ++ PCL_INSTANTIATE(MovingLeastSquaresSameInAndOut, PCL_XYZ_POINT_TYPES) ++ PCL_INSTANTIATE_PRODUCT(MovingLeastSquares, ((pcl::PointXYZ))((pcl::PointXYZI)(pcl::PointXYZRGB)(pcl::PointXYZRGBA)(pcl::PointXYZRGBNormal)(pcl::PointNormal))) ++ PCL_INSTANTIATE_PRODUCT(MovingLeastSquares, ((pcl::PointXYZI))((pcl::PointXYZ)(pcl::PointXYZRGB)(pcl::PointXYZRGBA)(pcl::PointXYZRGBNormal)(pcl::PointNormal))) ++ PCL_INSTANTIATE_PRODUCT(MovingLeastSquares, ((pcl::PointXYZRGB))((pcl::PointXYZ)(pcl::PointXYZI)(pcl::PointXYZRGBA)(pcl::PointXYZRGBNormal)(pcl::PointNormal))) ++ PCL_INSTANTIATE_PRODUCT(MovingLeastSquares, ((pcl::PointXYZRGBA))((pcl::PointXYZ)(pcl::PointXYZI)(pcl::PointXYZRGB)(pcl::PointXYZRGBNormal)(pcl::PointNormal))) ++ PCL_INSTANTIATE_PRODUCT(MovingLeastSquares, ((pcl::PointXYZRGBNormal))((pcl::PointXYZ)(pcl::PointXYZI)(pcl::PointXYZRGB)(pcl::PointXYZRGBA)(pcl::PointNormal))) ++ PCL_INSTANTIATE_PRODUCT(MovingLeastSquares, ((pcl::PointNormal))((pcl::PointXYZ)(pcl::PointXYZI)(pcl::PointXYZRGB)(pcl::PointXYZRGBA)(pcl::PointXYZRGBNormal))) + #endif + #endif // PCL_NO_PRECOMPILE diff --git a/recipes/pcl/all/patches/0001-cmake_use_conan_targets.patch b/recipes/pcl/all/patches/0001-cmake_use_conan_targets.patch new file mode 100644 index 0000000000000..5461a0bfed49e --- /dev/null +++ b/recipes/pcl/all/patches/0001-cmake_use_conan_targets.patch @@ -0,0 +1,52 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -297,7 +297,7 @@ + # OpenMP (optional) + option(WITH_OPENMP "Build with parallelization using OpenMP" TRUE) + if(WITH_OPENMP) +- find_package(OpenMP COMPONENTS C CXX) ++ find_package(OpenMP REQUIRED COMPONENTS C CXX) + endif() + if(OpenMP_FOUND) + string(APPEND CMAKE_C_FLAGS " ${OpenMP_C_FLAGS}") +@@ -319,11 +319,11 @@ + find_package(Threads REQUIRED) + + # Eigen (required) +-find_package(Eigen 3.3 REQUIRED) ++find_package(EIGEN REQUIRED CONFIG) + include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS}) + + # FLANN (required) +-find_package(FLANN 1.9.1 REQUIRED) ++find_package(FLANN CONFIG) + if(NOT (${FLANN_LIBRARY_TYPE} MATCHES ${PCL_FLANN_REQUIRED_TYPE}) AND NOT (${PCL_FLANN_REQUIRED_TYPE} MATCHES "DONTCARE")) + message(FATAL_ERROR "Flann was selected with ${PCL_FLANN_REQUIRED_TYPE} but found as ${FLANN_LIBRARY_TYPE}") + endif() +@@ -359,7 +359,7 @@ + # LibPNG + option(WITH_PNG "PNG file support" TRUE) + if(WITH_PNG) +- find_package(PNG) ++ find_package(PNG REQUIRED CONFIG) + if(PNG_FOUND) + set(HAVE_PNG ON) + include_directories(SYSTEM "${PNG_INCLUDE_DIR}") +@@ -369,7 +369,7 @@ + # Qhull + option(WITH_QHULL "Include convex-hull operations" TRUE) + if(WITH_QHULL) +- find_package(Qhull) ++ find_package(QHULL REQUIRED CONFIG) + if(NOT (${QHULL_LIBRARY_TYPE} MATCHES ${PCL_QHULL_REQUIRED_TYPE}) AND NOT (${PCL_QHULL_REQUIRED_TYPE} MATCHES "DONTCARE")) + message(FATAL_ERROR "Qhull was selected with ${PCL_QHULL_REQUIRED_TYPE} but found as ${QHULL_LIBRARY_TYPE}") + endif() +@@ -404,7 +404,7 @@ + #Find PCAP + option(WITH_PCAP "pcap file capabilities in Velodyne HDL driver" TRUE) + if(WITH_PCAP) +- find_package(Pcap) ++ find_package(PCAP REQUIRED CONFIG) + endif() + + # OpenGL and GLUT diff --git a/recipes/pcl/all/patches/0001-fix-FindOpenNI-bug.patch b/recipes/pcl/all/patches/0001-fix-FindOpenNI-bug.patch new file mode 100644 index 0000000000000..34cf4a671e285 --- /dev/null +++ b/recipes/pcl/all/patches/0001-fix-FindOpenNI-bug.patch @@ -0,0 +1,32 @@ +--- cmake/Modules/FindOpenNI.cmake ++++ cmake/Modules/FindOpenNI.cmake +@@ -52,7 +52,12 @@ + + # Libraries + if(NOT WIN32) +- find_package(libusb REQUIRED) ++ find_package(libusb QUIET) ++ if (NOT libusb_FOUND) ++ message(WARNING "Found OpenNI library, but required libusb is not available") ++ set(OPENNI_FOUND FALSE) ++ return() ++ endif() + set(OPENNI_LIBRARIES ${OPENNI_LIBRARY} libusb::libusb) + else() + set(OPENNI_LIBRARIES ${OPENNI_LIBRARY}) +--- cmake/Modules/FindOpenNI2.cmake ++++ cmake/Modules/FindOpenNI2.cmake +@@ -42,7 +42,12 @@ + + # Libraries + if(NOT WIN32) +- find_package(libusb REQUIRED) ++ find_package(libusb QUIET) ++ if (NOT libusb_FOUND) ++ message(WARNING "Found OpenNI2 library, but required libusb is not available") ++ set(OPENNI2_FOUND FALSE) ++ return() ++ endif() + set(OPENNI2_LIBRARIES ${OPENNI2_LIBRARY} libusb::libusb) + else() + set(OPENNI2_LIBRARIES ${OPENNI2_LIBRARY}) diff --git a/recipes/pcl/all/test_package/CMakeLists.txt b/recipes/pcl/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..57794a612df2a --- /dev/null +++ b/recipes/pcl/all/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package CXX) + +find_package(PCL REQUIRED surface CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) + +target_link_libraries(${PROJECT_NAME} PRIVATE PCL::filters) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/pcl/all/test_package/conanfile.py b/recipes/pcl/all/test_package/conanfile.py new file mode 100644 index 0000000000000..02eb5ce439fb4 --- /dev/null +++ b/recipes/pcl/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +# It will become the standard on Conan 2.x +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/pcl/all/test_package/test_package.cpp b/recipes/pcl/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..cca717d08eb8f --- /dev/null +++ b/recipes/pcl/all/test_package/test_package.cpp @@ -0,0 +1,73 @@ +// Copied from https://github.com/PointCloudLibrary/pcl/blob/pcl-1.13.1/examples/filters/example_extract_indices.cpp +/* + * Software License Agreement (BSD License) + * + * Point Cloud Library (PCL) - www.pointclouds.org + * Copyright (c) 2009-2011, Willow Garage, Inc. + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * $Id: example_ExtractIndices.cpp 4117 2012-01-31 17:56:02Z aichim $ + * + */ + +#include + +#include + +int +main (int, char**) +{ + using PointType = pcl::PointXYZ; + using CloudType = pcl::PointCloud; + CloudType::Ptr cloud (new CloudType); + cloud->is_dense = false; + PointType p; + for (unsigned int i = 0; i < 5; ++i) + { + p.x = p.y = p.z = static_cast (i); + cloud->push_back (p); + } + + std::cout << "Cloud has " << cloud->size () << " points." << std::endl; + + pcl::PointIndices indices; + indices.indices.push_back (0); + indices.indices.push_back (2); + + pcl::ExtractIndices extract_indices; + extract_indices.setIndices (pcl::make_shared (indices)); + extract_indices.setInputCloud (cloud); + pcl::PointCloud::Ptr output (new pcl::PointCloud); + extract_indices.filter (*output); + + std::cout << "Output has " << output->size () << " points." << std::endl; + return (0); +} diff --git a/recipes/pcl/config.yml b/recipes/pcl/config.yml new file mode 100644 index 0000000000000..aac1819cc10c0 --- /dev/null +++ b/recipes/pcl/config.yml @@ -0,0 +1,3 @@ +versions: + "1.13.1": + folder: all From 31978b690b3dca0ee0ddb59d6bf5afe19ba839d9 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Tue, 22 Aug 2023 16:42:22 +0200 Subject: [PATCH 359/637] (#19334) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 09348eebe130c..0732b71137914 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -96,6 +96,7 @@ required_for_references: - boost - boost-ext-ut - boost-leaf +- boostdep - box2d - breakpad - brigand @@ -637,6 +638,7 @@ required_for_references: - libx264 - libx265 - libxcrypt +- libxft - libxls - libxlsxwriter - libxml2 @@ -854,6 +856,7 @@ required_for_references: - picobench - picojson - picosha2 +- pipes - pixman - pkgconf - platform.delegates From 407df7256d184ed32c64a11885ad230f256c3b2f Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 22 Aug 2023 18:08:21 +0300 Subject: [PATCH 360/637] (#18814) fltk: migrate to Conan v2 * fltk: migrate to Conan v2 * fltk: restore VirtualRunEnv in test_package * fltk: bump deps * fltk: add missing macOS system frameworks * Remove incorrect system framework * Remove opengl32 framework dep --- recipes/fltk/all/CMakeLists.txt | 7 - recipes/fltk/all/conandata.yml | 9 +- recipes/fltk/all/conanfile.py | 128 +++++++++--------- recipes/fltk/all/test_package/CMakeLists.txt | 7 +- recipes/fltk/all/test_package/conanfile.py | 20 ++- .../fltk/all/test_v1_package/CMakeLists.txt | 8 ++ recipes/fltk/all/test_v1_package/conanfile.py | 16 +++ 7 files changed, 105 insertions(+), 90 deletions(-) delete mode 100644 recipes/fltk/all/CMakeLists.txt create mode 100644 recipes/fltk/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/fltk/all/test_v1_package/conanfile.py diff --git a/recipes/fltk/all/CMakeLists.txt b/recipes/fltk/all/CMakeLists.txt deleted file mode 100644 index 60dd71d7363c3..0000000000000 --- a/recipes/fltk/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8) -project(cmake_wrapper) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) - -add_subdirectory(source_subfolder) diff --git a/recipes/fltk/all/conandata.yml b/recipes/fltk/all/conandata.yml index 1b3f085545004..0f349ed128921 100644 --- a/recipes/fltk/all/conandata.yml +++ b/recipes/fltk/all/conandata.yml @@ -5,9 +5,6 @@ sources: patches: "1.3.8": - - base_path: "source_subfolder" - patch_file: "patches/1.3.8-0001-remove-fluid.patch" - - base_path: "source_subfolder" - patch_file: "patches/1.3.8-0002-fix-resources.patch" - - base_path: "source_subfolder" - patch_file: "patches/1.3.8-0003-build-static-only-on-static.patch" + - patch_file: "patches/1.3.8-0001-remove-fluid.patch" + - patch_file: "patches/1.3.8-0002-fix-resources.patch" + - patch_file: "patches/1.3.8-0003-build-static-only-on-static.patch" diff --git a/recipes/fltk/all/conanfile.py b/recipes/fltk/all/conanfile.py index 0533063aab585..a7feaec5a6e94 100644 --- a/recipes/fltk/all/conanfile.py +++ b/recipes/fltk/all/conanfile.py @@ -1,19 +1,22 @@ import os -import conan.tools.files as tools from conan import ConanFile -from conans import CMake +from conan.tools.apple import is_apple_os +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, rm, rmdir -required_conan_version = ">=1.50.0" +required_conan_version = ">=1.53.0" class FltkConan(ConanFile): name = "fltk" description = "Fast Light Toolkit is a cross-platform C++ GUI toolkit" - topics = ("fltk", "gui") - homepage = "https://www.fltk.org" - url = "https://github.com/conan-io/conan-center-index" license = "LGPL-2.0-custom" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.fltk.org" + topics = ("gui",) + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -21,31 +24,25 @@ class FltkConan(ConanFile): "with_gl": [True, False], "with_threads": [True, False], "with_gdiplus": [True, False], - "abi_version": "ANY" + "abi_version": ["ANY"], } default_options = { "shared": False, "fPIC": True, "with_gl": True, "with_threads": True, - "with_gdiplus": True + "with_gdiplus": True, } - generators = "cmake", "cmake_find_package_multi" - - @property - def _source_subfolder(self): - return "source_subfolder" def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC else: - del self.options.with_gdiplus + self.options.rm_safe("with_gdiplus") + if self.options.abi_version == None: _version_token = self.version.split(".") _version_major = int(_version_token[0]) @@ -56,84 +53,81 @@ def config_options(self): _version_minor = int(_version_token[1]) _version_patch = 0 self.options.abi_version = str( - int(_version_major) * 10000 + - int(_version_minor) * 100 + - int(_version_patch) + int(_version_major) * 10000 + int(_version_minor) * 100 + int(_version_patch) ) 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("zlib/1.2.12") - self.requires("libjpeg/9d") - self.requires("libpng/1.6.37") - if self.settings.os == "Linux": + self.requires("zlib/1.2.13") + self.requires("libjpeg/9e") + self.requires("libpng/1.6.40") + if self.settings.os in ["Linux", "FreeBSD"]: self.requires("opengl/system") self.requires("glu/system") - self.requires("fontconfig/2.13.93") + self.requires("fontconfig/2.14.2") self.requires("xorg/system") def source(self): - tools.get(self, **self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions['OPTION_BUILD_SHARED_LIBS'] = self.options.shared - cmake.definitions['FLTK_BUILD_TEST'] = False - cmake.definitions['FLTK_BUILD_EXAMPLES'] = False - cmake.definitions['OPTION_USE_GL'] = self.options.with_gl - cmake.definitions['OPTION_USE_THREADS'] = self.options.with_threads - cmake.definitions['OPTION_BUILD_HTML_DOCUMENTATION'] = False - cmake.definitions['OPTION_BUILD_PDF_DOCUMENTATION'] = False + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["OPTION_BUILD_SHARED_LIBS"] = self.options.shared + tc.variables["FLTK_BUILD_TEST"] = False + tc.variables["FLTK_BUILD_EXAMPLES"] = False + tc.variables["OPTION_USE_GL"] = self.options.with_gl + tc.variables["OPTION_USE_THREADS"] = self.options.with_threads + tc.variables["OPTION_BUILD_HTML_DOCUMENTATION"] = False + tc.variables["OPTION_BUILD_PDF_DOCUMENTATION"] = False if self.options.abi_version: - cmake.definitions['OPTION_ABI_VERSION'] = self.options.abi_version - cmake.configure() - return cmake + tc.variables["OPTION_ABI_VERSION"] = self.options.abi_version + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(self, **patch) - - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() - tools.rmdir(self, os.path.join(self.package_folder, "share")) - tools.rmdir(self, os.path.join(self.package_folder, "FLTK.framework")) - tools.rmdir(self, os.path.join(self.package_folder, "CMake")) - tools.rm(self, "fltk-config*", os.path.join(self.package_folder, "bin")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "FLTK.framework")) + rmdir(self, os.path.join(self.package_folder, "CMake")) + rm(self, "fltk-config*", os.path.join(self.package_folder, "bin")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "fltk") self.cpp_info.set_property("cmake_target_name", "fltk::fltk") - - self.cpp_info.names["cmake_find_package"] = "fltk" - self.cpp_info.names["cmake_find_package_multi"] = "fltk" + self.cpp_info.libs = collect_libs(self) if self.options.shared and self.settings.os == "Windows": self.cpp_info.defines.append("FL_DLL") - self.cpp_info.libs = tools.collect_libs(self) if self.settings.os in ("Linux", "FreeBSD"): if self.options.with_threads: - self.cpp_info.system_libs.extend(['pthread', 'dl']) + self.cpp_info.system_libs.extend(["pthread", "dl"]) if self.options.with_gl: - self.cpp_info.system_libs.extend(['GL', 'GLU']) - if self.settings.os == "Macos": - self.cpp_info.frameworks = ['Cocoa', 'OpenGL', 'IOKit', 'Carbon', 'CoreFoundation', 'CoreVideo'] - if self.settings.os == "Windows": - self.cpp_info.system_libs = [ - "gdi32", - "imm32", - "msimg32", - "ole32", - "oleaut32", - "uuid", + self.cpp_info.system_libs.extend(["GL", "GLU"]) + if is_apple_os(self): + self.cpp_info.frameworks = [ + "AppKit", "ApplicationServices", "Carbon", "Cocoa", "CoreFoundation", "CoreGraphics", + "CoreText", "CoreVideo", "Foundation", "IOKit", "OpenGL", ] + if self.settings.os == "Windows": + self.cpp_info.system_libs = ["gdi32", "imm32", "msimg32", "ole32", "oleaut32", "uuid"] if self.options.get_safe("with_gdiplus"): self.cpp_info.system_libs.append("gdiplus") + + # TODO: to remove in conan v2 once legacy generators removed + self.cpp_info.names["cmake_find_package"] = "fltk" + self.cpp_info.names["cmake_find_package_multi"] = "fltk" diff --git a/recipes/fltk/all/test_package/CMakeLists.txt b/recipes/fltk/all/test_package/CMakeLists.txt index a163bc26a443b..cf30c297c5531 100644 --- a/recipes/fltk/all/test_package/CMakeLists.txt +++ b/recipes/fltk/all/test_package/CMakeLists.txt @@ -1,8 +1,5 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) find_package(fltk REQUIRED CONFIG) diff --git a/recipes/fltk/all/test_package/conanfile.py b/recipes/fltk/all/test_package/conanfile.py index a500b98343c74..ef5d7042163ec 100644 --- a/recipes/fltk/all/test_package/conanfile.py +++ b/recipes/fltk/all/test_package/conanfile.py @@ -1,9 +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) @@ -11,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/fltk/all/test_v1_package/CMakeLists.txt b/recipes/fltk/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/fltk/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/fltk/all/test_v1_package/conanfile.py b/recipes/fltk/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..a500b98343c74 --- /dev/null +++ b/recipes/fltk/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 7f826fd40c7aebbc248d4d5b2495a69245cbf154 Mon Sep 17 00:00:00 2001 From: Holger Detering Date: Tue, 22 Aug 2023 17:49:01 +0200 Subject: [PATCH 361/637] (#19066) aws-c-cal: add version 0.6.1 * aws-c-cal: add version 0.6.1 * cleanup: remove test_v1_package folder * Revert "cleanup: remove test_v1_package folder" This reverts commit f3d4ca5e4f19312285ddf339f5d85d736f633e5c. --- recipes/aws-c-cal/all/conandata.yml | 8 ++++++ recipes/aws-c-cal/all/conanfile.py | 4 ++- .../0002-apple-corefoundation-0.6.1.patch | 26 +++++++++++++++++++ recipes/aws-c-cal/config.yml | 2 ++ 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.1.patch diff --git a/recipes/aws-c-cal/all/conandata.yml b/recipes/aws-c-cal/all/conandata.yml index e1b848e4dfa2d..c1c97333e9288 100644 --- a/recipes/aws-c-cal/all/conandata.yml +++ b/recipes/aws-c-cal/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.6.1": + url: "https://github.com/awslabs/aws-c-cal/archive/v0.6.1.tar.gz" + sha256: "52df95150a8548ac35a0e4b6f59fbdebff27e4124c0b7e5eaa969ed3ba62fc82" "0.5.20": url: "https://github.com/awslabs/aws-c-cal/archive/v0.5.20.tar.gz" sha256: "acc352359bd06f8597415c366cf4ec4f00d0b0da92d637039a73323dd55b6cd0" @@ -18,6 +21,11 @@ sources: url: "https://github.com/awslabs/aws-c-cal/archive/v0.5.11.tar.gz" sha256: "ef46e121b2231a0b19afce8af4b32d77501df4d470e926990918456636cd83c0" patches: + "0.6.1": + - patch_file: "patches/0002-apple-corefoundation-0.6.1.patch" + patch_description: "Link to CoreFoundation on Apple" + patch_type: "backport" + patch_source: "https://github.com/awslabs/aws-c-cal/pull/126" "0.5.20": - patch_file: "patches/0002-apple-corefoundation-0.5.13.patch" patch_description: "Link to CoreFoundation on Apple" diff --git a/recipes/aws-c-cal/all/conanfile.py b/recipes/aws-c-cal/all/conanfile.py index bb8fb82e75aab..e6dc85b56045f 100644 --- a/recipes/aws-c-cal/all/conanfile.py +++ b/recipes/aws-c-cal/all/conanfile.py @@ -53,8 +53,10 @@ def requirements(self): # without it for conan v2 (we would have to required aws-c-common in test package, but we can't know # which version to require in test package) self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) - else: + elif Version(self.version) <= "0.5.20": self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) + else: + self.requires("aws-c-common/0.9.0", transitive_headers=True, transitive_libs=True) if self._needs_openssl: self.requires("openssl/[>=1.1 <4]") diff --git a/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.1.patch b/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.1.patch new file mode 100644 index 0000000000000..616d8257a2980 --- /dev/null +++ b/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.1.patch @@ -0,0 +1,26 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -84,7 +84,12 @@ elseif (APPLE) + message(FATAL_ERROR "Security Framework not found") + endif () + +- list(APPEND PLATFORM_LIBS "-framework Security") ++ find_library(COREFOUNDATION_LIB CoreFoundation) ++ if(NOT COREFOUNDATION_LIB) ++ message(FATAL_ERROR "CoreFoundation Framework not found") ++ endif() ++ ++ list(APPEND PLATFORM_LIBS "-framework Security -framework CoreFoundation") + endif() + else () + if (NOT BYO_CRYPTO) +--- a/source/darwin/securityframework_ecc.c ++++ b/source/darwin/securityframework_ecc.c +@@ -7,6 +7,7 @@ + #include + #include + ++#include + #include + #include + diff --git a/recipes/aws-c-cal/config.yml b/recipes/aws-c-cal/config.yml index f969df4acc583..7fb368557bdce 100644 --- a/recipes/aws-c-cal/config.yml +++ b/recipes/aws-c-cal/config.yml @@ -1,4 +1,6 @@ versions: + "0.6.1": + folder: all "0.5.20": folder: all "0.5.19": From 8d1e68463b5bf691ec6e8c36cb5c42f23fc4258c Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 22 Aug 2023 19:31:23 +0300 Subject: [PATCH 362/637] (#19267) rpclib: migrate to Conan v2 --- recipes/rpclib/all/CMakeLists.txt | 9 -- recipes/rpclib/all/conanfile.py | 103 +++++++++++------- .../rpclib/all/test_package/CMakeLists.txt | 7 +- recipes/rpclib/all/test_package/conanfile.py | 21 +++- .../rpclib/all/test_v1_package/CMakeLists.txt | 8 ++ .../rpclib/all/test_v1_package/conanfile.py | 15 +++ 6 files changed, 104 insertions(+), 59 deletions(-) delete mode 100644 recipes/rpclib/all/CMakeLists.txt create mode 100644 recipes/rpclib/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/rpclib/all/test_v1_package/conanfile.py diff --git a/recipes/rpclib/all/CMakeLists.txt b/recipes/rpclib/all/CMakeLists.txt deleted file mode 100644 index de7e444eb2469..0000000000000 --- a/recipes/rpclib/all/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 3.4) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) - -conan_basic_setup() -set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - -add_subdirectory("source_subfolder") diff --git a/recipes/rpclib/all/conanfile.py b/recipes/rpclib/all/conanfile.py index 30a8488efd8a1..f7ea155c14f7c 100644 --- a/recipes/rpclib/all/conanfile.py +++ b/recipes/rpclib/all/conanfile.py @@ -1,37 +1,51 @@ -from conans import ConanFile, tools, CMake -from conan.tools.microsoft import msvc_runtime_flag import os -required_conan_version = ">=1.43.0" +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, export_conandata_patches, get, rmdir, rename, mkdir +from conan.tools.microsoft import is_msvc_static_runtime +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" class rpclibConan(ConanFile): name = "rpclib" description = "A modern C++ msgpack-RPC server and client library." license = "MIT" - topics = ("rpc", "ipc", "rpc-server") - homepage = "https://github.com/rpclib/rpclib/" url = "https://github.com/conan-io/conan-center-index" - exports_sources = ["CMakeLists.txt", "patches/*"] - generators = "cmake" + homepage = "https://github.com/rpclib/rpclib/" + topics = ("rpc", "ipc", "rpc-server") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], - "fPIC": [True, False] + "fPIC": [True, False], } default_options = { "shared": False, - "fPIC": True + "fPIC": True, } - _cmake = None @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 { + "Visual Studio": "15", + "msvc": "14.1", + "gcc": "5", + "clang": "5", + "apple-clang": "5.1", + } + + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -39,49 +53,58 @@ def config_options(self): 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 validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def source(self): - tools.get(**self.conan_data["sources"][self.version], - strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + if is_msvc_static_runtime(self): + tc.variables["RPCLIB_MSVC_STATIC_RUNTIME"] = True + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = self.options.shared + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - if "MT" in str(msvc_runtime_flag(self)): - self._cmake.definitions["RPCLIB_MSVC_STATIC_RUNTIME"] = True - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake - def package(self): - self.copy("LICENSE.md", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE.md", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + if self.settings.os == "Windows" and self.options.shared: + mkdir(self, self.package_path / "bin") + for dll in (self.package_path / "lib").glob("*.dll"): + rename(self, dll, self.package_path / "bin" / dll.name) def package_info(self): self.cpp_info.set_property("cmake_file_name", "rpclib") self.cpp_info.set_property("cmake_target_name", "rpclib::rpc") self.cpp_info.set_property("pkg_config_name", "rpclib") - # Fix for installing dll to lib folder - # - Default CMAKE installs the dll to the lib folder - # causing the test_package to fail - if self.settings.os in ["Windows"]: - if self.options.shared: - self.cpp_info.components["_rpc"].bindirs.append( - os.path.join(self.package_folder, "lib")) - # TODO: Remove after Conan 2.0 self.cpp_info.components["_rpc"].names["cmake_find_package"] = "rpc" self.cpp_info.components["_rpc"].names["cmake_find_package_multi"] = "rpc" self.cpp_info.components["_rpc"].libs = ["rpc"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["_rpc"].system_libs = ["pthread"] - self.cpp_info.names["pkg_config"] = "librpc" diff --git a/recipes/rpclib/all/test_package/CMakeLists.txt b/recipes/rpclib/all/test_package/CMakeLists.txt index e585430312fe0..81dbfad0943b6 100644 --- a/recipes/rpclib/all/test_package/CMakeLists.txt +++ b/recipes/rpclib/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1.3) +cmake_minimum_required(VERSION 3.15) project(PackageTest CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(rpclib CONFIG REQUIRED) +find_package(rpclib REQUIRED CONFIG) add_executable(example example.cpp) set_target_properties(example PROPERTIES CXX_STANDARD 14) diff --git a/recipes/rpclib/all/test_package/conanfile.py b/recipes/rpclib/all/test_package/conanfile.py index 67c12602a84f3..8d52b7021efe1 100644 --- a/recipes/rpclib/all/test_package/conanfile.py +++ b/recipes/rpclib/all/test_package/conanfile.py @@ -1,9 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -11,5 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - self.run( os.path.join("bin", "example"), run_environment=True ) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "example") + self.run(bin_path, env="conanrun") diff --git a/recipes/rpclib/all/test_v1_package/CMakeLists.txt b/recipes/rpclib/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/rpclib/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/rpclib/all/test_v1_package/conanfile.py b/recipes/rpclib/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..67c12602a84f3 --- /dev/null +++ b/recipes/rpclib/all/test_v1_package/conanfile.py @@ -0,0 +1,15 @@ +import os +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + self.run( os.path.join("bin", "example"), run_environment=True ) From ff06bf6a60038ad7d76e20fc66587cf51956d8f1 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 22 Aug 2023 20:13:16 +0300 Subject: [PATCH 363/637] (#19268) duktape: migrate to Conan v2 * duktape: migrate to Conan v2 * duktape: fix shared Windows builds --- recipes/duktape/all/CMakeLists.txt | 14 +--- recipes/duktape/all/conanfile.py | 81 ++++++++++--------- .../duktape/all/test_package/CMakeLists.txt | 8 +- recipes/duktape/all/test_package/conanfile.py | 21 +++-- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../duktape/all/test_v1_package/conanfile.py | 17 ++++ 6 files changed, 88 insertions(+), 61 deletions(-) create mode 100644 recipes/duktape/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/duktape/all/test_v1_package/conanfile.py diff --git a/recipes/duktape/all/CMakeLists.txt b/recipes/duktape/all/CMakeLists.txt index 76bab4dba57c0..cc4f8cfa2df77 100644 --- a/recipes/duktape/all/CMakeLists.txt +++ b/recipes/duktape/all/CMakeLists.txt @@ -1,12 +1,8 @@ -cmake_minimum_required(VERSION 2.8.12) - +cmake_minimum_required(VERSION 3.12) project(duktape C) -include(conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) - -file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder/src/*.c) -file(GLOB HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder/src/*.h) +file(GLOB SOURCES ${CMAKE_CURRENT_LIST_DIR}/src/src/*.c) +file(GLOB HEADERS ${CMAKE_CURRENT_LIST_DIR}/src/src/*.h) add_library(duktape ${SOURCES} ${HEADERS}) set_target_properties(duktape PROPERTIES PUBLIC_HEADER "${HEADERS}") @@ -14,10 +10,8 @@ if (UNIX AND NOT APPLE AND NOT ANDROID) target_link_libraries(duktape m) endif() +include(GNUInstallDirs) install( TARGETS duktape - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib PUBLIC_HEADER DESTINATION include ) diff --git a/recipes/duktape/all/conanfile.py b/recipes/duktape/all/conanfile.py index 3e582932bd595..588a96a8c0f57 100644 --- a/recipes/duktape/all/conanfile.py +++ b/recipes/duktape/all/conanfile.py @@ -1,29 +1,33 @@ import os -from conans import CMake, ConanFile, tools -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get + +required_conan_version = ">=1.53.0" + class DuktapeConan(ConanFile): name = "duktape" - license = "MIT" description = "Duktape is an embeddable Javascript engine, with a focus on portability and compact footprint." - topics = ("javascript", "engine", "embeddable", "compact") + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://duktape.org" - exports_sources = ["CMakeLists.txt"] - generators = "cmake" + topics = ("javascript", "engine", "embeddable", "compact") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" - options = {"shared": [True, False], "fPIC": [True, False]} + options = { + "shared": [True, False], + "fPIC": [True, False], + } default_options = { "shared": False, "fPIC": True, } - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" + 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": @@ -31,44 +35,41 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.configure() - return self._cmake + def generate(self): + tc = CMakeToolchain(self) + if self.settings.os == "Windows" and self.options.shared: + # Duktape has a configure script with a number of options. + # However, it requires python 2 and PyYAML package + # which is quite an unusual combination to have. + # The most crucial option is --dll which enables + # DUK_F_DLL_BUILD and the following defines. + tc.preprocessor_definitions["DUK_EXTERNAL_DECL"] = "extern __declspec(dllexport)" + tc.preprocessor_definitions["DUK_EXTERNAL"] = "__declspec(dllexport)" + tc.generate() def build(self): - # Duktape has configure script with a number of options. - # However it requires python 2 and PyYAML package - # which is quite an unusual combination to have. - # The most crucial option is --dll which just flips this define. - if self.settings.os == "Windows" and self.options.shared: - tools.replace_in_file( - os.path.join(self._source_subfolder, "src", "duk_config.h"), - "#undef DUK_F_DLL_BUILD", - "#define DUK_F_DLL_BUILD", - ) - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure(build_script_folder=self.export_sources_folder) cmake.build() def package(self): - self.copy("LICENSE.txt", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE.txt", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): self.cpp_info.libs = ["duktape"] - if not self.options.shared and str(self.settings.os) in ( - "Linux", - "FreeBSD", - "SunOS", - ): + if not self.options.shared and self.settings.os in ("Linux", "FreeBSD", "SunOS"): self.cpp_info.system_libs = ["m"] diff --git a/recipes/duktape/all/test_package/CMakeLists.txt b/recipes/duktape/all/test_package/CMakeLists.txt index 526e8d40c66a2..e6adea9e794dd 100644 --- a/recipes/duktape/all/test_package/CMakeLists.txt +++ b/recipes/duktape/all/test_package/CMakeLists.txt @@ -1,9 +1,7 @@ -cmake_minimum_required(VERSION 3.1) - +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +find_package(duktape REQUIRED CONFIG) add_executable(${CMAKE_PROJECT_NAME} test_package.c) -target_link_libraries(${CMAKE_PROJECT_NAME} CONAN_PKG::duktape) +target_link_libraries(${CMAKE_PROJECT_NAME} duktape::duktape) diff --git a/recipes/duktape/all/test_package/conanfile.py b/recipes/duktape/all/test_package/conanfile.py index ca9da95670911..ef5d7042163ec 100644 --- a/recipes/duktape/all/test_package/conanfile.py +++ b/recipes/duktape/all/test_package/conanfile.py @@ -1,11 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import CMake, ConanFile, tools - class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -13,5 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - self.run(os.path.join("bin", "test_package"), 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/duktape/all/test_v1_package/CMakeLists.txt b/recipes/duktape/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/duktape/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/duktape/all/test_v1_package/conanfile.py b/recipes/duktape/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..d47b5097e761e --- /dev/null +++ b/recipes/duktape/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os + +from conans import CMake, ConanFile, tools + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + self.run(os.path.join("bin", "test_package"), run_environment=True) From 1c06fbdc6cf1dfb08664e56168fa3ac988f40410 Mon Sep 17 00:00:00 2001 From: Guillaume Egles Date: Tue, 22 Aug 2023 10:42:25 -0700 Subject: [PATCH 364/637] (#19280) lyra: clean up package_info & old versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lyra: clean up package_info * lyra: clean up old versions * Update recipes/lyra/all/conanfile.py * Keep a few more minor versions around --------- Co-authored-by: Rubén Rincón Blanco --- recipes/lyra/all/conandata.yml | 36 +++++++------------ recipes/lyra/all/conanfile.py | 2 +- .../lyra/all/test_v1_package/CMakeLists.txt | 11 ------ recipes/lyra/all/test_v1_package/conanfile.py | 17 --------- .../lyra/all/test_v1_package/test_package.cpp | 6 ---- recipes/lyra/config.yml | 16 +++------ 6 files changed, 17 insertions(+), 71 deletions(-) delete mode 100644 recipes/lyra/all/test_v1_package/CMakeLists.txt delete mode 100644 recipes/lyra/all/test_v1_package/conanfile.py delete mode 100644 recipes/lyra/all/test_v1_package/test_package.cpp diff --git a/recipes/lyra/all/conandata.yml b/recipes/lyra/all/conandata.yml index f6627e78699fe..8d693ef2d527d 100644 --- a/recipes/lyra/all/conandata.yml +++ b/recipes/lyra/all/conandata.yml @@ -1,28 +1,16 @@ sources: - "1.0.0": - sha256: ede5446cdd2b74a8cbaa12b998e820d0a1489574649bd76e7e67e69cb841ae22 - url: https://github.com/bfgroup/Lyra/archive/lyra-1.0.tar.gz - "1.1.0": - sha256: c2d70a926f698fb7decb99c7215bb55ab770100f9574c290998bf91416bd8217 - url: https://github.com/bfgroup/Lyra/archive/1.1.tar.gz - "1.2.0": - sha256: 3134fb6d170ba78d139068232b12ca9948082fafc54a3373193c8b8d6e760cd9 - url: https://github.com/bfgroup/Lyra/archive/1.2.tar.gz - "1.3.0": - sha256: 1e9757b850d1afc14413ceb9eb47af5693f6f03a0f1231617fac39df8534db2b - url: https://github.com/bfgroup/Lyra/archive/1.3.tar.gz - "1.4.0": - sha256: 86cc0c4978312582393e196d534011a1f186db9e3e09ba34fd250c2a59ebf814 - url: https://github.com/bfgroup/Lyra/archive/1.4.tar.gz - "1.5.0": - sha256: 5a251ba8c1082875a6655cdcd11c3a7771cd9c40011f1b0e5ac8636054f27dfd - url: https://github.com/bfgroup/Lyra/archive/1.5.tar.gz - "1.5.1": - sha256: 11ccdfc6f776b9a2ebe987d9b4e492981f88f3642546fd1c2e1115741863cae0 - url: https://github.com/bfgroup/Lyra/archive/1.5.1.tar.gz - "1.6.0": - sha256: 919e92a9c02fea3f365a3a7bdccd8b306311a28a7f2044dac8e7651106d7b644 - url: https://github.com/bfgroup/Lyra/archive/1.6.tar.gz "1.6.1": sha256: a93f247ed89eba11ca36eb24c4f8ba7be636bf24e74aaaa8e1066e0954bec7e3 url: https://github.com/bfgroup/Lyra/archive/1.6.1.tar.gz + "1.6.0": + sha256: 919e92a9c02fea3f365a3a7bdccd8b306311a28a7f2044dac8e7651106d7b644 + url: https://github.com/bfgroup/Lyra/archive/1.6.tar.gz + "1.5.1": + sha256: 11ccdfc6f776b9a2ebe987d9b4e492981f88f3642546fd1c2e1115741863cae0 + url: https://github.com/bfgroup/Lyra/archive/1.5.1.tar.gz + "1.4.0": + sha256: 86cc0c4978312582393e196d534011a1f186db9e3e09ba34fd250c2a59ebf814 + url: https://github.com/bfgroup/Lyra/archive/1.4.tar.gz + "1.3.0": + sha256: 1e9757b850d1afc14413ceb9eb47af5693f6f03a0f1231617fac39df8534db2b + url: https://github.com/bfgroup/Lyra/archive/1.3.tar.gz diff --git a/recipes/lyra/all/conanfile.py b/recipes/lyra/all/conanfile.py index f549011151d40..676ec9b46357a 100644 --- a/recipes/lyra/all/conanfile.py +++ b/recipes/lyra/all/conanfile.py @@ -47,7 +47,6 @@ def package(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "lyra") self.cpp_info.set_property("cmake_target_name", "bfg::lyra") - # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.components["_lyra"].set_property( "cmake_target_name", "bfg::lyra") @@ -58,3 +57,4 @@ def package_info(self): self.cpp_info.components["_lyra"].names["cmake_find_package"] = "lyra" self.cpp_info.components["_lyra"].names["cmake_find_package_multi"] = "lyra" self.cpp_info.components["_lyra"].libdirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/lyra/all/test_v1_package/CMakeLists.txt b/recipes/lyra/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index b200e21129c40..0000000000000 --- a/recipes/lyra/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package CXX) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(lyra REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} bfg::lyra) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/lyra/all/test_v1_package/conanfile.py b/recipes/lyra/all/test_v1_package/conanfile.py deleted file mode 100644 index 49a3a66ea5bad..0000000000000 --- a/recipes/lyra/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/lyra/all/test_v1_package/test_package.cpp b/recipes/lyra/all/test_v1_package/test_package.cpp deleted file mode 100644 index 5298875e31c6a..0000000000000 --- a/recipes/lyra/all/test_v1_package/test_package.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(int argc, const char** argv) -{ - auto cli = lyra::cli_parser(); -} diff --git a/recipes/lyra/config.yml b/recipes/lyra/config.yml index 425271e9a388e..839c2a460a6e7 100644 --- a/recipes/lyra/config.yml +++ b/recipes/lyra/config.yml @@ -1,19 +1,11 @@ versions: - "1.0.0": - folder: all - "1.1.0": - folder: all - "1.2.0": - folder: all - "1.3.0": - folder: all - "1.4.0": + "1.6.1": folder: all - "1.5.0": + "1.6.0": folder: all "1.5.1": folder: all - "1.6.0": + "1.4.0": folder: all - "1.6.1": + "1.3.0": folder: all From a80eba1b1c125aaa3b81d660a933da2765e0e061 Mon Sep 17 00:00:00 2001 From: Guillaume Egles Date: Tue, 22 Aug 2023 10:55:21 -0700 Subject: [PATCH 365/637] (#19283) spdlog: make sure libdirs is empty when header_only=True --- recipes/spdlog/all/conanfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/spdlog/all/conanfile.py b/recipes/spdlog/all/conanfile.py index f2653d49db073..8b194e1f8f481 100644 --- a/recipes/spdlog/all/conanfile.py +++ b/recipes/spdlog/all/conanfile.py @@ -142,7 +142,9 @@ def package_info(self): self.cpp_info.components["libspdlog"].defines.append("SPDLOG_FMT_EXTERNAL") self.cpp_info.components["libspdlog"].requires = ["fmt::fmt"] - if not self.options.header_only: + if self.options.header_only: + self.cpp_info.components["libspdlog"].libdirs = [] + else: suffix = "d" if self.settings.build_type == "Debug" else "" self.cpp_info.components["libspdlog"].libs = [f"spdlog{suffix}"] self.cpp_info.components["libspdlog"].defines.append("SPDLOG_COMPILED_LIB") From e29a9253e65efe9d598c2b3336048a0f02fc04a7 Mon Sep 17 00:00:00 2001 From: Ivo Hedtke Date: Tue, 22 Aug 2023 20:55:01 +0200 Subject: [PATCH 366/637] (#19290) [OGDF] enable shared build on Windows * [OGDF] enable shared build on Windows * Drop unused imports --- recipes/ogdf/all/conanfile.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/recipes/ogdf/all/conanfile.py b/recipes/ogdf/all/conanfile.py index e47d024478deb..84c6c4df651b5 100644 --- a/recipes/ogdf/all/conanfile.py +++ b/recipes/ogdf/all/conanfile.py @@ -1,9 +1,7 @@ from conan import ConanFile from conan.tools.apple import fix_apple_shared_install_name from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.errors import ConanInvalidConfiguration from conan.tools.files import copy, get, replace_in_file, rmdir -from conan.tools.microsoft import is_msvc from os.path import join required_conan_version = ">=1.53.0" @@ -26,10 +24,6 @@ class OGDFConan(ConanFile): "fPIC": True, } - def validate(self): - if is_msvc(self) and self.options.shared: - raise ConanInvalidConfiguration(f"{self.ref} can not be built as shared on Visual Studio and msvc.") - def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -85,12 +79,13 @@ def package(self): copy(self, pattern="LICENSE*.txt", src=self.source_folder, dst=join(self.package_folder, "licenses")) copy(self, pattern="*.h", src=join(self.source_folder, "include"), dst=join(self.package_folder, "include")) copy(self, pattern="*.h", src=join(self.build_folder, "include"), dst=join(self.package_folder, "include")) + copy(self, pattern="*.lib", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) if self.options.shared: copy(self, pattern="*.so*", src=self.build_folder, dst=join(self.package_folder, "lib")) copy(self, pattern="*.dylib*", src=self.build_folder, dst=join(self.package_folder, "lib")) + copy(self, pattern="*.dll", src=self.build_folder, dst=join(self.package_folder, "bin"), keep_path=False) else: copy(self, pattern="*.a", src=self.build_folder, dst=join(self.package_folder, "lib")) - copy(self, pattern="*.lib", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) fix_apple_shared_install_name(self) def package_info(self): From 57a5c1c55dd4047267f9cb57e71e3e774b456fdf Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 22 Aug 2023 22:31:02 +0300 Subject: [PATCH 367/637] (#19322) pupnp: fix invalid use of self.options[] self.options[] returns a `PackageOptions` object instead of a `PackageOption` one like attribute access or .get_safe() does. --- recipes/pupnp/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/pupnp/all/conanfile.py b/recipes/pupnp/all/conanfile.py index b3ee88419c46c..ec9c1261d9bac 100644 --- a/recipes/pupnp/all/conanfile.py +++ b/recipes/pupnp/all/conanfile.py @@ -96,7 +96,7 @@ def generate(self): features["samples"] = False features["blocking_tcp_connections"] = self.options["blocking-tcp"] for opt in ("ipv6", "reuseaddr", "webserver", "client", "device", "largefile", "tools", "debug"): - features[opt] = self.options[opt] + features[opt] = self.options.get_safe(opt) for feature, enabled in features.items(): what = "enable" if enabled else "disable" tc.configure_args.append(f"--{what}-{feature}") From acd1a15c65d2a1807d17bdd58754027a63994e18 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 23 Aug 2023 05:36:30 +0900 Subject: [PATCH 368/637] (#19328) drogon: add version 1.8.5, update dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * drogon: add version 1.8.5, update dependencies * Update recipes/drogon/all/conandata.yml --------- Co-authored-by: Rubén Rincón Blanco --- recipes/drogon/all/conandata.yml | 10 +++ recipes/drogon/all/conanfile.py | 10 +-- .../1.8.5-0001-remove-shared-libs.patch | 12 ++++ .../1.8.5-0002-find-cci-packages.patch | 71 +++++++++++++++++++ recipes/drogon/config.yml | 2 + 5 files changed, 100 insertions(+), 5 deletions(-) create mode 100644 recipes/drogon/all/patches/1.8.5-0001-remove-shared-libs.patch create mode 100644 recipes/drogon/all/patches/1.8.5-0002-find-cci-packages.patch diff --git a/recipes/drogon/all/conandata.yml b/recipes/drogon/all/conandata.yml index dd03c6b133f92..5ff1403cfce78 100644 --- a/recipes/drogon/all/conandata.yml +++ b/recipes/drogon/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.8.5": + url: "https://github.com/drogonframework/drogon/archive/v1.8.5.tar.gz" + sha256: "9469f99408c114bc1e89945a3a8dab4640ea6d8cb06e7d42f06c1dfda3f71d2a" "1.8.4": url: "https://github.com/drogonframework/drogon/archive/v1.8.4.tar.gz" sha256: "6f2f59ead0f0c37b0aac4bc889cbaedf3c2540f3020e892596c72f0a4d887a18" @@ -15,6 +18,13 @@ sources: url: "https://github.com/drogonframework/drogon/archive/refs/tags/v1.7.5.tar.gz" sha256: "e2af7c55dcabafef16f26f5b3242692f5a2b54c19b7b626840bf9132d24766f6" patches: + "1.8.5": + - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" + patch_description: "remove shared libs option" + patch_type: "conan" + - patch_file: "patches/1.8.5-0002-find-cci-packages.patch" + patch_description: "Fix jsoncpp cmake target name" + patch_type: "conan" "1.8.4": - patch_file: "patches/1.8.4-0001-remove-shared-libs.patch" patch_description: "remove shared libs option" diff --git a/recipes/drogon/all/conanfile.py b/recipes/drogon/all/conanfile.py index 0b84047ab4ed5..033ced85d2135 100644 --- a/recipes/drogon/all/conanfile.py +++ b/recipes/drogon/all/conanfile.py @@ -108,7 +108,7 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} requires boost on C++14") def requirements(self): - self.requires("trantor/1.5.11", transitive_headers=True, transitive_libs=True) + self.requires("trantor/1.5.12", transitive_headers=True, transitive_libs=True) self.requires("jsoncpp/1.9.5", transitive_headers=True, transitive_libs=True) self.requires("openssl/[>=1.1 <4]") self.requires("zlib/1.2.13") @@ -117,17 +117,17 @@ def requirements(self): if self.options.with_profile: self.requires("coz/cci.20210322") if self.options.with_boost: - self.requires("boost/1.82.0", transitive_headers=True) + self.requires("boost/1.83.0", transitive_headers=True) if self.options.with_brotli: self.requires("brotli/1.0.9") if self.options.get_safe("with_postgres"): - self.requires("libpq/14.7") + self.requires("libpq/15.4") if self.options.get_safe("with_mysql"): - self.requires("libmysqlclient/8.0.31") + self.requires("libmysqlclient/8.1.0") if self.options.get_safe("with_sqlite"): self.requires("sqlite3/3.42.0") if self.options.get_safe("with_redis"): - self.requires("hiredis/1.1.0") + self.requires("hiredis/1.2.0") if self.options.with_yaml_cpp: self.requires("yaml-cpp/0.7.0") diff --git a/recipes/drogon/all/patches/1.8.5-0001-remove-shared-libs.patch b/recipes/drogon/all/patches/1.8.5-0001-remove-shared-libs.patch new file mode 100644 index 0000000000000..9920eee534139 --- /dev/null +++ b/recipes/drogon/all/patches/1.8.5-0001-remove-shared-libs.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index db95642..e3e7fcf 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,7 +8,6 @@ option(BUILD_CTL "Build drogon_ctl" ON) + option(BUILD_EXAMPLES "Build examples" ON) + option(BUILD_ORM "Build orm" ON) + option(COZ_PROFILING "Use coz for profiling" OFF) +-option(BUILD_SHARED_LIBS "Build drogon as a shared lib" OFF) + option(BUILD_DOC "Build Doxygen documentation" OFF) + option(BUILD_BROTLI "Build Brotli" ON) + option(BUILD_YAML_CONFIG "Build yaml config" ON) diff --git a/recipes/drogon/all/patches/1.8.5-0002-find-cci-packages.patch b/recipes/drogon/all/patches/1.8.5-0002-find-cci-packages.patch new file mode 100644 index 0000000000000..c0d5c051d80a7 --- /dev/null +++ b/recipes/drogon/all/patches/1.8.5-0002-find-cci-packages.patch @@ -0,0 +1,71 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e3e7fcf..b82cb66 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -198,9 +198,9 @@ else() + endif() + + # jsoncpp +-find_package(Jsoncpp REQUIRED) +-target_link_libraries(${PROJECT_NAME} PUBLIC Jsoncpp_lib) +-list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${JSONCPP_INCLUDE_DIRS}) ++find_package(jsoncpp REQUIRED) ++target_link_libraries(${PROJECT_NAME} PUBLIC jsoncpp_lib) ++list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${jsoncpp_INCLUDE_DIRS}) + + # yamlcpp + if(BUILD_YAML_CONFIG) +@@ -217,7 +217,7 @@ if(BUILD_YAML_CONFIG) + endif() + else() + message(STATUS "yaml-cpp found ") +- target_link_libraries(${PROJECT_NAME} PUBLIC ${YAML_CPP_LIBRARIES}) ++ target_link_libraries(${PROJECT_NAME} PUBLIC yaml-cpp) + target_compile_definitions(${PROJECT_NAME} PUBLIC HAS_YAML_CPP) + endif() + else() +@@ -442,7 +442,7 @@ if (BUILD_SQLITE) + find_package(SQLite3 QUIET) + find_package(unofficial-sqlite3 QUIET) + if (SQLite3_FOUND) +- target_link_libraries(${PROJECT_NAME} PRIVATE SQLite3_lib) ++ target_link_libraries(${PROJECT_NAME} PRIVATE SQLite::SQLite3) + set(DROGON_FOUND_SQLite3 TRUE) + elseif (unofficial-sqlite3_FOUND) + target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::sqlite3::sqlite3) +@@ -465,10 +465,10 @@ if (BUILD_SQLITE) + endif (BUILD_SQLITE) + + if (BUILD_REDIS) +- find_package(Hiredis) +- if (Hiredis_FOUND) ++ find_package(hiredis) ++ if (hiredis_FOUND) + add_definitions(-DUSE_REDIS) +- target_link_libraries(${PROJECT_NAME} PRIVATE Hiredis_lib) ++ target_link_libraries(${PROJECT_NAME} PRIVATE hiredis::hiredis) + set(DROGON_SOURCES + ${DROGON_SOURCES} + nosql_lib/redis/src/RedisClientImpl.cc +@@ -488,10 +488,10 @@ if (BUILD_REDIS) + nosql_lib/redis/src/SubscribeContext.h + nosql_lib/redis/src/RedisSubscriberImpl.h) + +- endif (Hiredis_FOUND) ++ endif () + endif (BUILD_REDIS) + +-if (NOT Hiredis_FOUND) ++if (NOT hiredis_FOUND) + set(DROGON_SOURCES + ${DROGON_SOURCES} + lib/src/RedisClientSkipped.cc +@@ -500,7 +500,7 @@ if (NOT Hiredis_FOUND) + set(private_headers + ${private_headers} + lib/src/RedisClientManager.h) +-endif (NOT Hiredis_FOUND) ++endif () + + if (BUILD_TESTING) + add_subdirectory(nosql_lib/redis/tests) diff --git a/recipes/drogon/config.yml b/recipes/drogon/config.yml index 7b7f0bad90e21..bf708bafce8a9 100644 --- a/recipes/drogon/config.yml +++ b/recipes/drogon/config.yml @@ -1,4 +1,6 @@ versions: + "1.8.5": + folder: "all" "1.8.4": folder: "all" "1.8.3": From f7030b437a9cd0f315eb2df1e5bcb63deed9e8ae Mon Sep 17 00:00:00 2001 From: fcorso2016 <35567462+fcorso2016@users.noreply.github.com> Date: Tue, 22 Aug 2023 17:26:43 -0400 Subject: [PATCH 369/637] (#18391) Fix issue with building shared on windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix issue with building shared on windows * Properly disable static registration * Make disabling static registration an option * Update recipes/onnxruntime/all/conanfile.py Co-authored-by: Pau Farré * Update recipes/onnxruntime/all/conanfile.py Co-authored-by: Pau Farré * Update recipes/onnxruntime/all/conanfile.py Co-authored-by: Pau Farré --------- Co-authored-by: Pau Farré --- recipes/onnxruntime/all/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/onnxruntime/all/conanfile.py b/recipes/onnxruntime/all/conanfile.py index d9a55a421eb6f..c69e32a34aa82 100644 --- a/recipes/onnxruntime/all/conanfile.py +++ b/recipes/onnxruntime/all/conanfile.py @@ -119,7 +119,8 @@ def generate(self): # disable downloading dependencies to ensure conan ones are used tc.variables["FETCHCONTENT_FULLY_DISCONNECTED"] = True if self.version >= Version("1.15.0") and self.options.shared: - tc.variables["Python_EXECUTABLE"] = sys.executable + # Need to replace windows path seperators with linux path seperators to keep CMake from crashing + tc.variables["Python_EXECUTABLE"] = sys.executable.replace("\\", "/") tc.variables["onnxruntime_BUILD_SHARED_LIB"] = self.options.shared tc.variables["onnxruntime_USE_FULL_PROTOBUF"] = not self.dependencies["protobuf"].options.lite From b2bb5da964f3e4c517f8bf56b1ee26711dc3e322 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 23 Aug 2023 07:13:39 +0900 Subject: [PATCH 370/637] (#19331) sophus: update fmt/10.1.0, delete with_fmt in 1.0.0 --- recipes/sophus/all/conanfile.py | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/recipes/sophus/all/conanfile.py b/recipes/sophus/all/conanfile.py index 7fa9bd18760cf..ef703f320333f 100644 --- a/recipes/sophus/all/conanfile.py +++ b/recipes/sophus/all/conanfile.py @@ -10,11 +10,10 @@ class SophusConan(ConanFile): name = "sophus" description = "C++ implementation of Lie Groups using Eigen." - topics = ("eigen", "numerical", "math") + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://strasdat.github.io/Sophus/" - license = "MIT" - no_copy_source = True + topics = ("eigen", "numerical", "math", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" options = { @@ -23,23 +22,28 @@ class SophusConan(ConanFile): default_options = { "with_fmt": True, } + no_copy_source = True + + def configure(self): + if Version(self.version) < "1.22.4": + del self.options.with_fmt + + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): self.requires("eigen/3.4.0", transitive_headers=True) - if self.options.with_fmt and Version(self.version) >= Version("1.22.10"): - self.requires("fmt/9.1.0", transitive_headers=True) - elif self.options.with_fmt and Version(self.version) >= Version("1.22.4"): - self.requires("fmt/8.1.1", transitive_headers=True) + if self.options.get_safe("with_fmt"): + if Version(self.version) >= "1.22.10": + self.requires("fmt/10.1.0", transitive_headers=True) + else: + self.requires("fmt/8.1.1", transitive_headers=True) def package_id(self): self.info.clear() - def layout(self): - basic_layout(self, src_folder="src") - def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): copy(self, "LICENSE.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) @@ -51,10 +55,8 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "Sophus::Sophus") self.cpp_info.set_property("pkg_config_name", "sophus") self.cpp_info.bindirs = [] - self.cpp_info.frameworkdirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] - if not self.options.with_fmt: + if self.options.get_safe("with_fmt") == False: self.cpp_info.defines.append("SOPHUS_USE_BASIC_LOGGING=1") # TODO: to remove in conan v2 once cmake_find_package* generator removed From c8a640996a5589f883de0c792abca10de837534c Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Wed, 23 Aug 2023 00:50:03 +0200 Subject: [PATCH 371/637] (#19333) [rtmidi] Add patch descriptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rubén Rincón Blanco --- recipes/rtmidi/all/conandata.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/recipes/rtmidi/all/conandata.yml b/recipes/rtmidi/all/conandata.yml index 9413bb8e98246..7f688e03dcce4 100644 --- a/recipes/rtmidi/all/conandata.yml +++ b/recipes/rtmidi/all/conandata.yml @@ -11,7 +11,14 @@ sources: patches: "4.0.0": - patch_file: "patches/4.0.0-0001-add-a-separate-licence-file-0b5d67c.patch" + patch_description: "Add a separate LICENCE file" + patch_source: "https://github.com/thestk/rtmidi/commit/0b5d67c" + patch_type: "conan" - patch_file: "patches/4.0.0-0002-rtmidiconfig-install-location-da51f21.patch" + patch_description: "Install rtmidiconfig in the correct location" + patch_source: "https://github.com/conan-io/conan-center-index/issues/252" + patch_type: "conan" - patch_file: "patches/4.0.0-0003-relocatable-macos.patch" patch_description: "Relocatable shared lib on macOS" + patch_source: "https://github.com/thestk/rtmidi/pull/211" patch_type: "conan" From 72cbd4efacab4439ae603ae4523cb907506fcadd Mon Sep 17 00:00:00 2001 From: igormironchik Date: Wed, 23 Aug 2023 02:31:55 +0300 Subject: [PATCH 372/637] (#19337) md4qt: bump version --- recipes/md4qt/all/conandata.yml | 3 +++ recipes/md4qt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index b2befced4887a..00fa1030957d5 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.11": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.11.tar.gz" + sha256: "990979474bcbb924efb1c046581589e11889d502e5ad24b9779c131c4f3d9941" "2.0.10": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.10.tar.gz" sha256: "efcb7c97999ce2d78aba67041a61dda45feb54113e5b21851b0532fdcbc460a8" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index 20cb1b119cc18..e8eabfb453af9 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.11": + folder: all "2.0.10": folder: all "2.0.9": From 89d182643244d1a9ffe8bc89d51038111d181aec Mon Sep 17 00:00:00 2001 From: krabbstek Date: Wed, 23 Aug 2023 02:18:30 +0200 Subject: [PATCH 373/637] (#19343) Added SDL version 2.28.2 --- recipes/sdl/all/conandata.yml | 3 +++ recipes/sdl/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/sdl/all/conandata.yml b/recipes/sdl/all/conandata.yml index 9aefd68806154..e6726e853f758 100644 --- a/recipes/sdl/all/conandata.yml +++ b/recipes/sdl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.28.2": + url: "https://www.libsdl.org/release/SDL2-2.28.2.tar.gz" + sha256: "64b1102fa22093515b02ef33dd8739dee1ba57e9dbba6a092942b8bbed1a1c5e" "2.26.5": url: "https://www.libsdl.org/release/SDL2-2.26.5.tar.gz" sha256: "ad8fea3da1be64c83c45b1d363a6b4ba8fd60f5bde3b23ec73855709ec5eabf7" diff --git a/recipes/sdl/config.yml b/recipes/sdl/config.yml index 960f4e5e4f3c0..31a6d05fcb201 100644 --- a/recipes/sdl/config.yml +++ b/recipes/sdl/config.yml @@ -1,4 +1,6 @@ versions: + "2.28.2": + folder: all "2.26.5": folder: all "2.26.1": From 7d5424036f3d1a1047430ec4c823bf1b8bb71a12 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 23 Aug 2023 09:51:41 +0900 Subject: [PATCH 374/637] (#19353) glaze: add version 1.3.6 --- recipes/glaze/all/conandata.yml | 3 +++ recipes/glaze/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index ca57858e477ea..b43003828dbc6 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.6": + url: "https://github.com/stephenberry/glaze/archive/v1.3.6.tar.gz" + sha256: "c339f036a96fef72f9b8542d6a1e2ecb4bd3fa5d3d09a206da5e844765d2b6c3" "1.3.5": url: "https://github.com/stephenberry/glaze/archive/v1.3.5.tar.gz" sha256: "de5d59cb7f31193d45f67f25d8ced1499df50c0d926a1461432b87f2b2368817" diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index ae1392b97f20d..a37f70afd642a 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.6": + folder: all "1.3.5": folder: all "1.3.2": From b1c8af235ffdad135793a0ade9f4ab58e73a9af2 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 23 Aug 2023 10:10:55 +0900 Subject: [PATCH 375/637] (#19354) trantor: add version 1.5.13 --- recipes/trantor/all/conandata.yml | 7 +++++++ recipes/trantor/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/trantor/all/conandata.yml b/recipes/trantor/all/conandata.yml index 336360051b220..2c3c3f7c60a56 100644 --- a/recipes/trantor/all/conandata.yml +++ b/recipes/trantor/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.5.13": + url: "https://github.com/an-tao/trantor/archive/v1.5.13.tar.gz" + sha256: "36f02302bff3ffa8d2b1bff29f451d7a11d215a43963fb95aa543b555de2f9bf" "1.5.12": url: "https://github.com/an-tao/trantor/archive/v1.5.12.tar.gz" sha256: "3389a2ace83fdc0df7e3e7f9cd9fa9b774f8054889a13a73777c71e2d8e2f364" @@ -21,6 +24,10 @@ sources: url: "https://github.com/an-tao/trantor/archive/refs/tags/v1.5.5.tar.gz" sha256: "5a549c6efebe7ecba73a944cfba4a9713130704d4ccc82af534a2e108b9a0e71" patches: + "1.5.13": + - patch_file: "patches/1.5.12-0001-disable-werror.patch" + patch_description: "disable -Werror for gcc5" + patch_type: "portability" "1.5.12": - patch_file: "patches/1.5.12-0001-disable-werror.patch" patch_description: "disable -Werror for gcc5" diff --git a/recipes/trantor/config.yml b/recipes/trantor/config.yml index ceb70d2417086..51f47024c02e3 100644 --- a/recipes/trantor/config.yml +++ b/recipes/trantor/config.yml @@ -1,4 +1,6 @@ versions: + "1.5.13": + folder: "all" "1.5.12": folder: "all" "1.5.11": From d30aabdf32d608da0c940be2e86082fcb6047ec3 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 23 Aug 2023 12:54:10 +0900 Subject: [PATCH 376/637] (#19357) simdjson: add version 3.2.3 --- recipes/simdjson/all/conandata.yml | 3 +++ recipes/simdjson/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/simdjson/all/conandata.yml b/recipes/simdjson/all/conandata.yml index 4dd45c1bc80bc..c81b28e0ad2e3 100644 --- a/recipes/simdjson/all/conandata.yml +++ b/recipes/simdjson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.2.3": + url: "https://github.com/simdjson/simdjson/archive/v3.2.3.tar.gz" + sha256: "ab72701b8560c4f93a5de525657b3bf34094f99a1e63bd9db3195d1bcb90aa09" "3.2.2": url: "https://github.com/simdjson/simdjson/archive/v3.2.2.tar.gz" sha256: "13a702536e051db612cdca82bf8585f2c69d9c6fd156ef291b170f13202c1b4c" diff --git a/recipes/simdjson/config.yml b/recipes/simdjson/config.yml index cda9ed23f089a..78febe4d556f0 100644 --- a/recipes/simdjson/config.yml +++ b/recipes/simdjson/config.yml @@ -1,4 +1,6 @@ versions: + "3.2.3": + folder: all "3.2.2": folder: all "3.2.1": From e1bb3cd9759e10882bedbbdd7438234fc322798c Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 23 Aug 2023 13:37:52 +0900 Subject: [PATCH 377/637] (#19358) cpp-httplib: add version 0.14.0 --- recipes/cpp-httplib/all/conandata.yml | 3 +++ recipes/cpp-httplib/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/cpp-httplib/all/conandata.yml b/recipes/cpp-httplib/all/conandata.yml index 448d3a594468d..cf312a0b54c1d 100644 --- a/recipes/cpp-httplib/all/conandata.yml +++ b/recipes/cpp-httplib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.14.0": + url: "https://github.com/yhirose/cpp-httplib/archive/v0.14.0.tar.gz" + sha256: "3a92248ef8cf2c32ad07f910b8e3052ff2427022b2adb871cf326fb620d2438e" "0.13.3": url: "https://github.com/yhirose/cpp-httplib/archive/v0.13.3.tar.gz" sha256: "2a4503f9f2015f6878baef54cd94b01849cc3ed19dfe95f2c9775655bea8b73f" diff --git a/recipes/cpp-httplib/config.yml b/recipes/cpp-httplib/config.yml index 8e636ccafe3a6..3a4d3cd3226a9 100644 --- a/recipes/cpp-httplib/config.yml +++ b/recipes/cpp-httplib/config.yml @@ -1,4 +1,6 @@ versions: + "0.14.0": + folder: all "0.13.3": folder: all "0.13.1": From 3ce53911176ae5973050a490512fd2ac683278b9 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 23 Aug 2023 16:15:49 +0900 Subject: [PATCH 378/637] (#19359) drogon: update trantor/1.5.13 --- recipes/drogon/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/drogon/all/conanfile.py b/recipes/drogon/all/conanfile.py index 033ced85d2135..fc1a2251f569c 100644 --- a/recipes/drogon/all/conanfile.py +++ b/recipes/drogon/all/conanfile.py @@ -108,7 +108,7 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} requires boost on C++14") def requirements(self): - self.requires("trantor/1.5.12", transitive_headers=True, transitive_libs=True) + self.requires("trantor/1.5.13", transitive_headers=True, transitive_libs=True) self.requires("jsoncpp/1.9.5", transitive_headers=True, transitive_libs=True) self.requires("openssl/[>=1.1 <4]") self.requires("zlib/1.2.13") From b44aacecdda035222774f4e241610bdedbd31dc2 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Wed, 23 Aug 2023 10:03:55 +0200 Subject: [PATCH 379/637] (#19360) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 0732b71137914..670a5cceabe10 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -241,6 +241,7 @@ required_for_references: - dirent - discount - djinni-generator +- dlib - dlpack - docopt.cpp - doctest @@ -444,6 +445,7 @@ required_for_references: - iqa - irrxml - iso8601lib +- itk - itlib - ittapi - ixwebsocket @@ -760,6 +762,7 @@ required_for_references: - neargye-semver - netcdf - nettle +- newmat - nextsilicon-cpp-subprocess - nfrechette-acl - ninja @@ -819,6 +822,7 @@ required_for_references: - openmvg - openssl - opensubdiv +- opentdf-client - opentelemetry-cpp - opentelemetry-proto - opentracing-cpp From cf4f29933e574d8dcf5b9616be5940f325be6884 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Wed, 23 Aug 2023 12:20:58 +0200 Subject: [PATCH 380/637] (#19362) dbus 1.15.8 --- recipes/dbus/1.x.x/conandata.yml | 3 +++ recipes/dbus/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/dbus/1.x.x/conandata.yml b/recipes/dbus/1.x.x/conandata.yml index 3dc58977ca2ea..04a0982deff4b 100644 --- a/recipes/dbus/1.x.x/conandata.yml +++ b/recipes/dbus/1.x.x/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.15.8": + url: "https://dbus.freedesktop.org/releases/dbus/dbus-1.15.8.tar.xz" + sha256: "84fc597e6ec82f05dc18a7d12c17046f95bad7be99fc03c15bc254c4701ed204" "1.15.6": url: "https://dbus.freedesktop.org/releases/dbus/dbus-1.15.6.tar.xz" sha256: "f97f5845f9c4a5a1fb3df67dfa9e16b5a3fd545d348d6dc850cb7ccc9942bd8c" diff --git a/recipes/dbus/config.yml b/recipes/dbus/config.yml index 53bb57eb6cadc..a6d5fb2e5d5f7 100644 --- a/recipes/dbus/config.yml +++ b/recipes/dbus/config.yml @@ -1,4 +1,6 @@ versions: + "1.15.8": + folder: 1.x.x "1.15.6": folder: 1.x.x "1.15.2": From 8f6a100c7f292bcbb9e47cbb6c65e4395055a654 Mon Sep 17 00:00:00 2001 From: Guillaume Egles Date: Wed, 23 Aug 2023 04:18:18 -0700 Subject: [PATCH 381/637] (#19348) date: make sure libdirs is empty when `header-only=True` --- recipes/date/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/date/all/conanfile.py b/recipes/date/all/conanfile.py index 74e5999eba368..16a2a092edd68 100644 --- a/recipes/date/all/conanfile.py +++ b/recipes/date/all/conanfile.py @@ -138,3 +138,4 @@ def package_info(self): self.cpp_info.components["date-tz"].defines.extend(defines) else: self.cpp_info.defines.append("DATE_HEADER_ONLY") + self.cpp_info.libdirs = [] From cc5f14bd4f5e76d07665c369786d7260335d0c51 Mon Sep 17 00:00:00 2001 From: Holger Detering Date: Wed, 23 Aug 2023 13:49:30 +0200 Subject: [PATCH 382/637] (#18933) caf: add version 0.19.2 * caf: add version 0.19.2 * caf: fix build for gcc 13 only necessary caf version < 0.19 * caf: test_v1_package no longer required * add version 0.19.2 to config.yml * Revert "caf: test_v1_package no longer required" This reverts commit 27bf600a3234c7f0fe754c9e5f2e63dbca355225. --- recipes/caf/all/conandata.yml | 24 +++++++++++++++++++ recipes/caf/all/conanfile.py | 6 ++++- .../all/patches/0001-fix-gcc-13-include.patch | 21 ++++++++++++++++ recipes/caf/config.yml | 2 ++ 4 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 recipes/caf/all/patches/0001-fix-gcc-13-include.patch diff --git a/recipes/caf/all/conandata.yml b/recipes/caf/all/conandata.yml index 71354ad6bae80..260be0caef66d 100644 --- a/recipes/caf/all/conandata.yml +++ b/recipes/caf/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.19.2": + url: "https://github.com/actor-framework/actor-framework/archive/0.19.2.tar.gz" + sha256: "aa3fcc494424e0e20b177125458a6a6ed39c751a3d3d5193054e88bdf8a146d2" "0.18.6": url: "https://github.com/actor-framework/actor-framework/archive/0.18.6.tar.gz" sha256: "c2ead63a0322d992fea8813a7f7d15b4d16cbb8bbe026722f2616a79109b91cc" @@ -11,3 +14,24 @@ sources: "0.18.0": url: "https://github.com/actor-framework/actor-framework/archive/0.18.0.tar.gz" sha256: "df765fa78861e67d44e2587c0ac0c1c662d8c93fe5ffc8757f552fc7ac15941f" +patches: + "0.18.6": + - patch_file: "patches/0001-fix-gcc-13-include.patch" + patch_description: "add missing include to support gcc 13" + patch_type: "bugfix" + patch_source: "https://github.com/actor-framework/actor-framework/commit/c2ee99c" + "0.18.5": + - patch_file: "patches/0001-fix-gcc-13-include.patch" + patch_description: "add missing include to support gcc 13" + patch_type: "bugfix" + patch_source: "https://github.com/actor-framework/actor-framework/commit/c2ee99c" + "0.18.2": + - patch_file: "patches/0001-fix-gcc-13-include.patch" + patch_description: "add missing include to support gcc 13" + patch_type: "bugfix" + patch_source: "https://github.com/actor-framework/actor-framework/commit/c2ee99c" + "0.18.0": + - patch_file: "patches/0001-fix-gcc-13-include.patch" + patch_description: "add missing include to support gcc 13" + patch_type: "bugfix" + patch_source: "https://github.com/actor-framework/actor-framework/commit/c2ee99c" diff --git a/recipes/caf/all/conanfile.py b/recipes/caf/all/conanfile.py index 7a5cb98c5ded6..08713d4f8b3b0 100644 --- a/recipes/caf/all/conanfile.py +++ b/recipes/caf/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd, valid_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, rmdir +from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rmdir from conan.tools.scm import Version import os @@ -47,6 +47,9 @@ def _minimum_compilers_version(self): "apple-clang": "10", } + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -97,6 +100,7 @@ def generate(self): deps.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/caf/all/patches/0001-fix-gcc-13-include.patch b/recipes/caf/all/patches/0001-fix-gcc-13-include.patch new file mode 100644 index 0000000000000..3ad9d6d3ba42f --- /dev/null +++ b/recipes/caf/all/patches/0001-fix-gcc-13-include.patch @@ -0,0 +1,21 @@ +--- a/libcaf_core/caf/detail/ripemd_160.hpp ++++ b/libcaf_core/caf/detail/ripemd_160.hpp +@@ -42,6 +42,7 @@ + + #include + #include ++#include + + #include "caf/detail/core_export.hpp" + +--- a/libcaf_core/caf/telemetry/metric_type.hpp ++++ b/libcaf_core/caf/telemetry/metric_type.hpp +@@ -4,6 +4,8 @@ + + #pragma once + ++#include ++ + namespace caf::telemetry { + + enum class metric_type : uint8_t { diff --git a/recipes/caf/config.yml b/recipes/caf/config.yml index 1e73f6993a454..9d2f0ee39c464 100644 --- a/recipes/caf/config.yml +++ b/recipes/caf/config.yml @@ -1,4 +1,6 @@ versions: + "0.19.2": + folder: all "0.18.6": folder: all "0.18.5": From aee3869b4fad1a371e3268e47a0eeefeb6fc52ab Mon Sep 17 00:00:00 2001 From: Holger Detering Date: Wed, 23 Aug 2023 14:34:20 +0200 Subject: [PATCH 383/637] (#19341) aws-c-io: add version 0.13.32 --- recipes/aws-c-io/all/conandata.yml | 3 +++ recipes/aws-c-io/all/conanfile.py | 5 ++++- recipes/aws-c-io/config.yml | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/recipes/aws-c-io/all/conandata.yml b/recipes/aws-c-io/all/conandata.yml index 4a9102a6ede26..0d0d5af78f68c 100644 --- a/recipes/aws-c-io/all/conandata.yml +++ b/recipes/aws-c-io/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.13.32": + url: "https://github.com/awslabs/aws-c-io/archive/v0.13.32.tar.gz" + sha256: "2a6b18c544d014ca4f55cb96002dbbc1e52a2120541c809fa974cb0838ea72cc" "0.13.4": url: "https://github.com/awslabs/aws-c-io/archive/v0.13.4.tar.gz" sha256: "133bd0aa46caa2041962cd4f6d076209686ce2934af82f86d1a258df4cbdce8b" diff --git a/recipes/aws-c-io/all/conanfile.py b/recipes/aws-c-io/all/conanfile.py index 20a04052e80c5..eaf12a0cfcd8d 100644 --- a/recipes/aws-c-io/all/conanfile.py +++ b/recipes/aws-c-io/all/conanfile.py @@ -45,9 +45,12 @@ def requirements(self): if Version(self.version) <= "0.10.9": self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) self.requires("aws-c-cal/0.5.11") - else: + elif Version(self.version) <= "0.13.4": self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) self.requires("aws-c-cal/0.5.13") + else: + self.requires("aws-c-common/0.9.0", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.6.1", transitive_headers=True) if self.settings.os in ["Linux", "FreeBSD", "Android"]: self.requires("s2n/1.3.31") diff --git a/recipes/aws-c-io/config.yml b/recipes/aws-c-io/config.yml index 6dca88e3f0554..febe94b14a0b3 100644 --- a/recipes/aws-c-io/config.yml +++ b/recipes/aws-c-io/config.yml @@ -1,4 +1,6 @@ versions: + "0.13.32": + folder: all "0.13.4": folder: all "0.11.2": From 6b82acd7b519147cf54cd21c27b4492677618915 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 23 Aug 2023 22:43:56 +0900 Subject: [PATCH 384/637] (#19355) perfetto: add version 37.0, remove older versions, add package_type * perfetto: add version 37.0, remove older versions, add package_type * remove versions in config.yml --- recipes/perfetto/all/conandata.yml | 34 ++----------------- recipes/perfetto/all/conanfile.py | 10 +++--- ...ging-when-PERFETTO_DISABLE_LOG-activ.patch | 14 -------- ...ging-when-PERFETTO_DISABLE_LOG-activ.patch | 14 -------- ...ging-when-PERFETTO_DISABLE_LOG-activ.patch | 14 -------- ...-MSVC-Fix-narrowing-conversion-error.patch | 13 ------- recipes/perfetto/config.yml | 16 ++------- 7 files changed, 9 insertions(+), 106 deletions(-) delete mode 100644 recipes/perfetto/all/patches/v20.1/0001-Fix-perfetto-logging-when-PERFETTO_DISABLE_LOG-activ.patch delete mode 100644 recipes/perfetto/all/patches/v21.x/0001-Fix-perfetto-logging-when-PERFETTO_DISABLE_LOG-activ.patch delete mode 100644 recipes/perfetto/all/patches/v22.x/0001-Fix-perfetto-logging-when-PERFETTO_DISABLE_LOG-activ.patch delete mode 100644 recipes/perfetto/all/patches/v25.0/0001-MSVC-Fix-narrowing-conversion-error.patch diff --git a/recipes/perfetto/all/conandata.yml b/recipes/perfetto/all/conandata.yml index 9a9ac089dcd8f..455f1bec30e97 100644 --- a/recipes/perfetto/all/conandata.yml +++ b/recipes/perfetto/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "37.0": + url: "https://github.com/google/perfetto/archive/refs/tags/v37.0.tar.gz" + sha256: "39d7b3635834398828cfd189bd61afb0657ca2a3a08efbfd9866bfbcd440810b" "35.0": url: "https://github.com/google/perfetto/archive/refs/tags/v35.0.tar.gz" sha256: "224b6552e60ad0fc7c1447bdf719ddd9ceceaf2b6773b71541c21df5890f4166" @@ -23,27 +26,6 @@ sources: "26.1": url: "https://github.com/google/perfetto/archive/refs/tags/v26.1.tar.gz" sha256: "cce387e82e2a137fce2eba927f80f20407764b77637a1a92b9b24065a500ce6d" - "25.0": - url: "https://github.com/google/perfetto/archive/refs/tags/v25.0.tar.gz" - sha256: "73a4b895df9222ddb231b8d903099d6da08cd079f27983f540e89156fa88ba67" - "24.2": - url: "https://github.com/google/perfetto/archive/refs/tags/v24.2.tar.gz" - sha256: "b296d0a939e694fd2e73ed6c6418b774b5ef6809ddf60988989416e5cbf90b41" - "23.0": - url: "https://github.com/google/perfetto/archive/refs/tags/v23.0.tar.gz" - sha256: "9d2955736ce9d234e0f5153acfefea8facfa762c9167024902ea98f9010207aa" - "22.1": - url: "https://github.com/google/perfetto/archive/refs/tags/v22.1.tar.gz" - sha256: "013ba743019a1ca04627f7ce8bf424b60ed7f0f57e232eff719ae879be4c90fd" - "22.0": - url: "https://github.com/google/perfetto/archive/refs/tags/v22.0.tar.gz" - sha256: "c62e9059a566136665b0c69e1f9901fc747b1eca813cd59a76e941bc2772340c" - "21.0": - url: "https://github.com/google/perfetto/archive/refs/tags/v21.0.tar.gz" - sha256: "8ce7d7c3dd8a2edd6d37092eb139e11bbf9c7e33a9964bab96c0505def6e1ad4" - "20.1": - url: "https://github.com/google/perfetto/archive/refs/tags/v20.1.tar.gz" - sha256: "d681bb76e2b73e6ba46db53c1502f31f4f16c36cd6e91d4ae839a3b44272f646" patches: "31.0": - patch_file: "patches/v31.0/0001-tracing-fix-compile-on-MSVC.patch" @@ -51,13 +33,3 @@ patches: patch_type: "backport" patch_source: "https://android-review.googlesource.com/c/platform/external/perfetto/+/2355222" sha256: "ad253a9bba3941bd8d1f206422d60eb1c06cb6d75d60eff5b5b8ae0f2ec7e15c" - "25.0": - - patch_file: "patches/v25.0/0001-MSVC-Fix-narrowing-conversion-error.patch" - "22.1": - - patch_file: "patches/v22.x/0001-Fix-perfetto-logging-when-PERFETTO_DISABLE_LOG-activ.patch" - "22.0": - - patch_file: "patches/v22.x/0001-Fix-perfetto-logging-when-PERFETTO_DISABLE_LOG-activ.patch" - "21.0": - - patch_file: "patches/v21.x/0001-Fix-perfetto-logging-when-PERFETTO_DISABLE_LOG-activ.patch" - "20.1": - - patch_file: "patches/v20.1/0001-Fix-perfetto-logging-when-PERFETTO_DISABLE_LOG-activ.patch" diff --git a/recipes/perfetto/all/conanfile.py b/recipes/perfetto/all/conanfile.py index 44d0edf055cd6..6c9cecd7c62ef 100644 --- a/recipes/perfetto/all/conanfile.py +++ b/recipes/perfetto/all/conanfile.py @@ -12,11 +12,12 @@ class PerfettoConan(ConanFile): name = "perfetto" + description = "Performance instrumentation and tracing for Android, Linux and Chrome" license = "Apache-2.0" - homepage = "https://perfetto.dev" url = "https://github.com/conan-io/conan-center-index" - description = "Performance instrumentation and tracing for Android, Linux and Chrome" + homepage = "https://perfetto.dev" topics = ("linux", "profiling", "tracing") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -28,7 +29,6 @@ class PerfettoConan(ConanFile): "fPIC": True, "disable_logging": False, } - short_paths = True @property @@ -78,8 +78,7 @@ def loose_lt_semver(v1, v2): ) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) @@ -107,4 +106,3 @@ def package_info(self): self.cpp_info.system_libs.append("ws2_32") if is_msvc(self): self.cpp_info.cxxflags.append("/Zc:__cplusplus") - diff --git a/recipes/perfetto/all/patches/v20.1/0001-Fix-perfetto-logging-when-PERFETTO_DISABLE_LOG-activ.patch b/recipes/perfetto/all/patches/v20.1/0001-Fix-perfetto-logging-when-PERFETTO_DISABLE_LOG-activ.patch deleted file mode 100644 index 27f4b089cd4fd..0000000000000 --- a/recipes/perfetto/all/patches/v20.1/0001-Fix-perfetto-logging-when-PERFETTO_DISABLE_LOG-activ.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/sdk/perfetto.h b/sdk/perfetto.h -index a362342d0..d5fb9e997 100644 ---- a/sdk/perfetto.h -+++ b/sdk/perfetto.h -@@ -580,7 +580,8 @@ PERFETTO_EXPORT void LogMessage(LogLev, - __LINE__, ##__VA_ARGS__); \ - } while (0) - #elif defined(PERFETTO_DISABLE_LOG) --#define PERFETTO_XLOG(...) ::perfetto::base::ignore_result(__VA_ARGS__) -+#define PERFETTO_XLOG(level, fmt, ...) ::perfetto::base::ignore_result(level, \ -+ fmt, ##__VA_ARGS__) - #else - #define PERFETTO_XLOG(level, fmt, ...) \ - ::perfetto::base::LogMessage(level, ::perfetto::base::Basename(__FILE__), \ diff --git a/recipes/perfetto/all/patches/v21.x/0001-Fix-perfetto-logging-when-PERFETTO_DISABLE_LOG-activ.patch b/recipes/perfetto/all/patches/v21.x/0001-Fix-perfetto-logging-when-PERFETTO_DISABLE_LOG-activ.patch deleted file mode 100644 index 56e86bb66c9e9..0000000000000 --- a/recipes/perfetto/all/patches/v21.x/0001-Fix-perfetto-logging-when-PERFETTO_DISABLE_LOG-activ.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/sdk/perfetto.h b/sdk/perfetto.h -index 4509cbda5..7cd41d570 100644 ---- a/sdk/perfetto.h -+++ b/sdk/perfetto.h -@@ -622,7 +622,8 @@ inline void MaybeSerializeLastLogsForCrashReporting() {} - __LINE__, ##__VA_ARGS__); \ - } while (0) - #elif defined(PERFETTO_DISABLE_LOG) --#define PERFETTO_XLOG(...) ::perfetto::base::ignore_result(__VA_ARGS__) -+#define PERFETTO_XLOG(level, fmt, ...) ::perfetto::base::ignore_result(level, \ -+ fmt, ##__VA_ARGS__) - #else - #define PERFETTO_XLOG(level, fmt, ...) \ - ::perfetto::base::LogMessage(level, ::perfetto::base::Basename(__FILE__), \ diff --git a/recipes/perfetto/all/patches/v22.x/0001-Fix-perfetto-logging-when-PERFETTO_DISABLE_LOG-activ.patch b/recipes/perfetto/all/patches/v22.x/0001-Fix-perfetto-logging-when-PERFETTO_DISABLE_LOG-activ.patch deleted file mode 100644 index 5e4004e7ada01..0000000000000 --- a/recipes/perfetto/all/patches/v22.x/0001-Fix-perfetto-logging-when-PERFETTO_DISABLE_LOG-activ.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/sdk/perfetto.h b/sdk/perfetto.h -index f88ac9728..a242b37a4 100644 ---- a/sdk/perfetto.h -+++ b/sdk/perfetto.h -@@ -623,7 +623,8 @@ inline void MaybeSerializeLastLogsForCrashReporting() {} - __LINE__, ##__VA_ARGS__); \ - } while (0) - #elif defined(PERFETTO_DISABLE_LOG) --#define PERFETTO_XLOG(...) ::perfetto::base::ignore_result(__VA_ARGS__) -+#define PERFETTO_XLOG(level, fmt, ...) ::perfetto::base::ignore_result(level, \ -+ fmt, ##__VA_ARGS__) - #else - #define PERFETTO_XLOG(level, fmt, ...) \ - ::perfetto::base::LogMessage(level, ::perfetto::base::Basename(__FILE__), \ diff --git a/recipes/perfetto/all/patches/v25.0/0001-MSVC-Fix-narrowing-conversion-error.patch b/recipes/perfetto/all/patches/v25.0/0001-MSVC-Fix-narrowing-conversion-error.patch deleted file mode 100644 index d109447e2946e..0000000000000 --- a/recipes/perfetto/all/patches/v25.0/0001-MSVC-Fix-narrowing-conversion-error.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/sdk/perfetto.h b/sdk/perfetto.h -index 677e0e2..df0de12 100644 ---- a/sdk/perfetto.h -+++ b/sdk/perfetto.h -@@ -16140,7 +16140,7 @@ template <> - struct TraceTimestampTraits { - static inline TraceTimestamp ConvertTimestampToTraceTimeNs( - const uint64_t& timestamp) { -- return {internal::TrackEventInternal::GetClockId(), timestamp}; -+ return {static_cast(internal::TrackEventInternal::GetClockId()), timestamp}; - } - }; - diff --git a/recipes/perfetto/config.yml b/recipes/perfetto/config.yml index bd944a09e558e..aecfcbd517f2d 100644 --- a/recipes/perfetto/config.yml +++ b/recipes/perfetto/config.yml @@ -1,4 +1,6 @@ versions: + "37.0": + folder: all "35.0": folder: all "34.0": @@ -15,17 +17,3 @@ versions: folder: all "26.1": folder: all - "25.0": - folder: all - "24.2": - folder: all - "23.0": - folder: all - "22.1": - folder: all - "22.0": - folder: all - "21.0": - folder: all - "20.1": - folder: all From ae4e9b06c9d94e8f42e570fd00c1b3b17a692a2a Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 24 Aug 2023 00:22:12 +0900 Subject: [PATCH 385/637] (#19356) cimg: add version 3.2.6, fix requires --- recipes/cimg/all/conandata.yml | 3 +++ recipes/cimg/all/conanfile.py | 10 ++-------- recipes/cimg/config.yml | 2 ++ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/recipes/cimg/all/conandata.yml b/recipes/cimg/all/conandata.yml index c4ba41f9e21b5..7139132fb19a9 100644 --- a/recipes/cimg/all/conandata.yml +++ b/recipes/cimg/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.2.6": + url: "https://cimg.eu/files/CImg_3.2.6.zip" + sha256: "8da3aa995027231bb18f97bb986e12788ef464b3ab8a34151650bf1217baeda7" "3.2.5": url: "https://cimg.eu/files/CImg_3.2.5.zip" sha256: "3ab9f25cd7e5f7256dde67b4ea78ead05834bee0db9160c89668a388ba141cd9" diff --git a/recipes/cimg/all/conanfile.py b/recipes/cimg/all/conanfile.py index cbed93e0b8d51..01ef66f480f65 100644 --- a/recipes/cimg/all/conanfile.py +++ b/recipes/cimg/all/conanfile.py @@ -68,17 +68,11 @@ def requirements(self): if self.options.enable_jpeg: self.requires("libjpeg/9e") if self.options.enable_openexr: - if self.options.enable_opencv: - self.requires("openexr/3.1.7") - else: - self.requires("openexr/3.1.7") + self.requires("openexr/3.1.9") if self.options.enable_png: self.requires("libpng/1.6.40") if self.options.enable_tiff: - if self.options.enable_opencv: - self.requires("libtiff/4.5.1") - else: - self.requires("libtiff/4.5.1") + self.requires("libtiff/4.5.1") if self.options.enable_ffmpeg: if self.options.enable_opencv: self.requires("ffmpeg/4.4") diff --git a/recipes/cimg/config.yml b/recipes/cimg/config.yml index b39649938fc2e..a0c4dfee0ab1c 100644 --- a/recipes/cimg/config.yml +++ b/recipes/cimg/config.yml @@ -1,4 +1,6 @@ versions: + "3.2.6": + folder: all "3.2.5": folder: all "3.2.0": From 861d4c7f737342efcb26e94673db0c5e7be9c468 Mon Sep 17 00:00:00 2001 From: Nicolai Grodzitski Date: Wed, 23 Aug 2023 17:47:51 +0200 Subject: [PATCH 386/637] (#18215) [SObjectizer] Add version 5.8.0 and support Conan 2.x * Add SObjectizer 5.8.0 * Refresh for Conan V2 Also use different compiler version requirements for v5.8.0. * FIx typo in test_v1_package * Adding msvc * Use warning properly * Review updates * Remove CMakelists.txt wrapper Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries --- recipes/sobjectizer/all/CMakeLists.txt | 7 -- recipes/sobjectizer/all/conandata.yml | 3 + recipes/sobjectizer/all/conanfile.py | 93 ++++++++++--------- .../all/test_package/CMakeLists.txt | 3 - .../sobjectizer/all/test_package/conanfile.py | 19 +++- .../all/test_v1_package/CMakeLists.txt | 15 +++ .../all/test_v1_package/conanfile.py | 16 ++++ recipes/sobjectizer/config.yml | 2 + 8 files changed, 101 insertions(+), 57 deletions(-) delete mode 100644 recipes/sobjectizer/all/CMakeLists.txt create mode 100644 recipes/sobjectizer/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/sobjectizer/all/test_v1_package/conanfile.py diff --git a/recipes/sobjectizer/all/CMakeLists.txt b/recipes/sobjectizer/all/CMakeLists.txt deleted file mode 100644 index 20ac539cce862..0000000000000 --- a/recipes/sobjectizer/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) - -add_subdirectory(source_subfolder/dev/so_5) diff --git a/recipes/sobjectizer/all/conandata.yml b/recipes/sobjectizer/all/conandata.yml index b8c5263a27c95..6518ae7fc9919 100644 --- a/recipes/sobjectizer/all/conandata.yml +++ b/recipes/sobjectizer/all/conandata.yml @@ -33,3 +33,6 @@ sources: "5.7.5": url: "https://github.com/Stiffstream/sobjectizer/archive/v.5.7.5.tar.gz" sha256: "282b7c72f6a6ee30b9c08b5339c3e327452903e1b246a163a7c8e57b3e37932f" + "5.8.0": + url: "https://github.com/Stiffstream/sobjectizer/archive/v.5.8.0.tar.gz" + sha256: "de2b4ae0e817a108dae6d6787c79ed84c33bd447842b5fdcb780f6697b4c2d49" diff --git a/recipes/sobjectizer/all/conanfile.py b/recipes/sobjectizer/all/conanfile.py index 6ebed35c1f830..6dfd80e4c926f 100644 --- a/recipes/sobjectizer/all/conanfile.py +++ b/recipes/sobjectizer/all/conanfile.py @@ -1,8 +1,12 @@ -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, CMakeToolchain, CMakeDeps, cmake_layout +from conan.tools.files import get, copy, rmdir, collect_libs +from conan.tools.scm import Version import os -required_conan_version = ">=1.43.0" +required_conan_version = ">=1.53.0" class SobjectizerConan(ConanFile): @@ -27,80 +31,85 @@ class SobjectizerConan(ConanFile): "fPIC": True, } - exports_sources = ["CMakeLists.txt"] - generators = "cmake" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: - del self.options.fPIC - - def validate(self): - minimal_cpp_standard = "17" - if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, minimal_cpp_standard) - minimal_version = { + self.options.rm_safe("fPIC") + + def _compiler_support_lut(self): + if self.version >= Version("5.8.0"): + # Since v5.8.0 requirements to compilers were updated: + return { + "gcc": "10", + "clang": "11", + "apple-clang": "13", + "Visual Studio": "17", + "msvc": "192" + } + + return { "gcc": "7", "clang": "6", "apple-clang": "10", - "Visual Studio": "15" + "Visual Studio": "15", + "msvc": "191" } + + def validate(self): + minimal_cpp_standard = "17" + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, minimal_cpp_standard) + minimal_version = self._compiler_support_lut() + compiler = str(self.settings.compiler) if compiler not in minimal_version: - self.output.warn( + self.output.warning( "%s recipe lacks information about the %s compiler standard version support" % (self.name, compiler)) - self.output.warn( + self.output.warning( "%s requires a compiler that supports at least C++%s" % (self.name, minimal_cpp_standard)) return - version = tools.Version(self.settings.compiler.version) + version = Version(self.settings.compiler.version) if version < minimal_version[compiler]: raise ConanInvalidConfiguration("%s requires a compiler that supports at least C++%s" % (self.name, minimal_cpp_standard)) - def _configure_cmake(self): - if self._cmake: - return self._cmake + def generate(self): + tc = CMakeToolchain(self) + tc.variables["SOBJECTIZER_BUILD_SHARED"] = self.options.shared + tc.variables["SOBJECTIZER_BUILD_STATIC"] = not self.options.shared + tc.variables["SOBJECTIZER_INSTALL"] = True + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0091"] = "NEW" + tc.generate() - self._cmake = CMake(self) - self._cmake.definitions["SOBJECTIZER_BUILD_SHARED"] = self.options.shared - self._cmake.definitions["SOBJECTIZER_BUILD_STATIC"] = not self.options.shared - self._cmake.definitions["SOBJECTIZER_INSTALL"] = True + cmake_deps = CMakeDeps(self) + cmake_deps.generate() - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + def layout(self): + cmake_layout(self, src_folder="src") def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, "dev", "so_5")) cmake.build() def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - cmake = self._configure_cmake() + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() - self.copy("license*", src=self._source_subfolder, dst="licenses", ignore_case=True, keep_path=False) - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): cmake_target = "SharedLib" if self.options.shared else "StaticLib" self.cpp_info.set_property("cmake_file_name", "sobjectizer") self.cpp_info.set_property("cmake_target_name", "sobjectizer::{}".format(cmake_target)) # TODO: back to global scope in conan v2 once cmake_find_package* generators removed - self.cpp_info.components["_sobjectizer"].libs = tools.collect_libs(self) + self.cpp_info.components["_sobjectizer"].libs = collect_libs(self) if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["_sobjectizer"].system_libs = ["pthread", "m"] if not self.options.shared: diff --git a/recipes/sobjectizer/all/test_package/CMakeLists.txt b/recipes/sobjectizer/all/test_package/CMakeLists.txt index 9a72279fda74f..38c12b1dc72ca 100644 --- a/recipes/sobjectizer/all/test_package/CMakeLists.txt +++ b/recipes/sobjectizer/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ cmake_minimum_required(VERSION 3.8) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(sobjectizer REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/sobjectizer/all/test_package/conanfile.py b/recipes/sobjectizer/all/test_package/conanfile.py index 38f4483872d47..a9fb96656f203 100644 --- a/recipes/sobjectizer/all/test_package/conanfile.py +++ b/recipes/sobjectizer/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.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/sobjectizer/all/test_v1_package/CMakeLists.txt b/recipes/sobjectizer/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..c960a336839f6 --- /dev/null +++ b/recipes/sobjectizer/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package CXX) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +find_package(sobjectizer REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +if(TARGET sobjectizer::SharedLib) + target_link_libraries(${PROJECT_NAME} sobjectizer::SharedLib) +else() + target_link_libraries(${PROJECT_NAME} sobjectizer::StaticLib) +endif() diff --git a/recipes/sobjectizer/all/test_v1_package/conanfile.py b/recipes/sobjectizer/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..9b63bd176646b --- /dev/null +++ b/recipes/sobjectizer/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + self.run(os.path.join("bin", "test_package"), run_environment=True) diff --git a/recipes/sobjectizer/config.yml b/recipes/sobjectizer/config.yml index 31292d0fc4747..ecd4ce4a44c0f 100644 --- a/recipes/sobjectizer/config.yml +++ b/recipes/sobjectizer/config.yml @@ -21,3 +21,5 @@ versions: folder: all "5.7.5": folder: all + "5.8.0": + folder: all From 18b52712b13739bc34cafcbebbc7d5caaa0c8516 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Wed, 23 Aug 2023 18:51:55 +0200 Subject: [PATCH 387/637] (#19364) glib: add version 2.77.2 Generated and committed by [Conan Center Bot](https://github.com/qchateau/conan-center-bot) Find more updatable recipes in the [GitHub Pages](https://qchateau.github.io/conan-center-bot/) Co-authored-by: Quentin Chateau via Conan Center Bot --- recipes/glib/all/conandata.yml | 3 +++ recipes/glib/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/glib/all/conandata.yml b/recipes/glib/all/conandata.yml index 861fdaf023395..0dd31b0d40a5b 100644 --- a/recipes/glib/all/conandata.yml +++ b/recipes/glib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.77.2": + url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.2.tar.xz" + sha256: "16279739e4d30ec47be3e82909f5aeaaa41a8206bae3bead10a23fb2deff02a6" "2.77.1": url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.1.tar.xz" sha256: "dce8d0c9e916d8c81a64436bd4ee4d6515a52dd3d157c994e1cdb9b3d6300a03" diff --git a/recipes/glib/config.yml b/recipes/glib/config.yml index f86b157199163..808c4e2fcb441 100644 --- a/recipes/glib/config.yml +++ b/recipes/glib/config.yml @@ -1,4 +1,6 @@ versions: + "2.77.2": + folder: all "2.77.1": folder: all "2.77.0": From 4adbf0e5da9409b1a34dd3e07f65f42323bcad97 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 24 Aug 2023 17:39:35 +0900 Subject: [PATCH 388/637] (#19376) lexbor: add version 2.3.0 --- recipes/lexbor/all/conandata.yml | 3 +++ recipes/lexbor/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/lexbor/all/conandata.yml b/recipes/lexbor/all/conandata.yml index ae25e89b70b28..ea023ab0ff4cf 100644 --- a/recipes/lexbor/all/conandata.yml +++ b/recipes/lexbor/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.3.0": + url: "https://github.com/lexbor/lexbor/archive/v2.3.0.zip" + sha256: "5ebdaca76715d737ba5ce5cb782c743caabccdf918854c19c1d5a9a3dd5f19e9" "2.2.0": url: "https://github.com/lexbor/lexbor/archive/v2.2.0.zip" sha256: "837d75e253c9dc157e20246984d7357a7288e2bd2a2b53f371ac047fec3b88e9" diff --git a/recipes/lexbor/config.yml b/recipes/lexbor/config.yml index ca654973c9512..1da7c205b6ff2 100644 --- a/recipes/lexbor/config.yml +++ b/recipes/lexbor/config.yml @@ -1,4 +1,6 @@ versions: + "2.3.0": + folder: "all" "2.2.0": folder: "all" "2.1.0": From 92729dbb536cc53c50611f5e825367f502f5092d Mon Sep 17 00:00:00 2001 From: Guillaume Egles Date: Thu, 24 Aug 2023 02:41:25 -0700 Subject: [PATCH 389/637] (#19351) boost: make sure libdirs is empty with header-only=True and used via `boost::boost` target --- recipes/boost/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index d6c700ab42217..d24854dcb4b47 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -1491,6 +1491,8 @@ def package_info(self): self.cpp_info.components["_boost_cmake"].set_property("cmake_target_name", "Boost::boost") self.cpp_info.components["_boost_cmake"].names["cmake_find_package"] = "boost" self.cpp_info.components["_boost_cmake"].names["cmake_find_package_multi"] = "boost" + if self.options.header_only: + self.cpp_info.components["_boost_cmake"].libdirs = [] if not self.options.header_only: self.cpp_info.components["_libboost"].requires = ["headers"] From e2aecf90dc48f54ff7b90646a898ff808b0405e3 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Thu, 24 Aug 2023 13:03:42 +0200 Subject: [PATCH 390/637] (#19375) [bot] Update list of references (prod-v2/ListPackages) --- .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 670a5cceabe10..ff746e7be2df1 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -256,6 +256,7 @@ required_for_references: - drwav - dtl - duckdb +- duktape - eabase - earcut - eastl @@ -314,6 +315,7 @@ required_for_references: - flatbush - flecs - flex +- fltk - fmt - fmtlog - fontconfig @@ -845,6 +847,7 @@ required_for_references: - pbtools - pcapplusplus - pcg-cpp +- pcl - pcre - pcre2 - pdfgen @@ -953,6 +956,7 @@ required_for_references: - rmm - roaring - robin-hood-hashing +- rpclib - rply - rtklib - rtm @@ -1003,6 +1007,7 @@ required_for_references: - sml - snappy - snowhouse +- sobjectizer - soci - sofa - sokol From 3d79d70864cf5fd3b46fcf26df9db113ac8ad7a8 Mon Sep 17 00:00:00 2001 From: igormironchik Date: Thu, 24 Aug 2023 16:49:04 +0300 Subject: [PATCH 391/637] (#19383) md4qt: bump version --- recipes/md4qt/all/conandata.yml | 3 +++ recipes/md4qt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index 00fa1030957d5..1edae9a58ce1d 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.12": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.12.tar.gz" + sha256: "07c89e37c624da036008acac88115b5aee6440f9e9f326139f256f34022f9a20" "2.0.11": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.11.tar.gz" sha256: "990979474bcbb924efb1c046581589e11889d502e5ad24b9779c131c4f3d9941" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index e8eabfb453af9..4852bb383cf44 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.12": + folder: all "2.0.11": folder: all "2.0.10": From cb1c70233f261942310025c6c0e33ec6e38d9573 Mon Sep 17 00:00:00 2001 From: Klaus Holst Jacobsen <48069914+klausholstjacobsen@users.noreply.github.com> Date: Thu, 24 Aug 2023 18:03:25 +0200 Subject: [PATCH 392/637] (#18968) rsync/3.2.7: Added package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * rsync: Added rsync package * Update recipes/rsync/all/conanfile.py * Update recipes/rsync/all/conanfile.py Co-authored-by: Uilian Ries * Update recipes/rsync/all/conanfile.py Co-authored-by: Uilian Ries * Update recipes/rsync/all/conanfile.py Co-authored-by: Uilian Ries * Update recipes/rsync/all/conanfile.py Co-authored-by: Uilian Ries * Update recipes/rsync/all/test_package/conanfile.py Co-authored-by: Uilian Ries * Update recipes/rsync/all/conanfile.py Co-authored-by: Uilian Ries * Remove unused import from test package --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: Uilian Ries --- recipes/rsync/all/conandata.yml | 4 + recipes/rsync/all/conanfile.py | 114 ++++++++++++++++++++ recipes/rsync/all/test_package/conanfile.py | 17 +++ recipes/rsync/config.yml | 3 + 4 files changed, 138 insertions(+) create mode 100644 recipes/rsync/all/conandata.yml create mode 100644 recipes/rsync/all/conanfile.py create mode 100644 recipes/rsync/all/test_package/conanfile.py create mode 100644 recipes/rsync/config.yml diff --git a/recipes/rsync/all/conandata.yml b/recipes/rsync/all/conandata.yml new file mode 100644 index 0000000000000..a7d6fc86710c8 --- /dev/null +++ b/recipes/rsync/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "3.2.7": + url: "https://download.samba.org/pub/rsync/src/rsync-3.2.7.tar.gz" + sha256: "4e7d9d3f6ed10878c58c5fb724a67dacf4b6aac7340b13e488fb2dc41346f2bb" diff --git a/recipes/rsync/all/conanfile.py b/recipes/rsync/all/conanfile.py new file mode 100644 index 0000000000000..959c1c6253bb0 --- /dev/null +++ b/recipes/rsync/all/conanfile.py @@ -0,0 +1,114 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.files import copy, get, rmdir +from conan.tools.layout import basic_layout +from conan.tools.apple import is_apple_os +import os + +required_conan_version = ">=1.60.0" + +class RsyncConan(ConanFile): + name = "rsync" + description = "rsync is an open source utility that provides fast incremental file transfer" + topics = ("backup", "transferring", "file-transfer", "ssh", "compression") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://rsync.samba.org/" + license = ("GPL-3.0", "LGPL-3.0") + package_type = "application" + settings = "os", "arch", "compiler", "build_type" + + options = { + "with_zlib": [True, False], + "with_openssl": [True, False], + "with_zstd": [True, False], + "with_xxhash": [True, False], + "with_lz4": [True, False], + "enable_acl": [True, False] + } + default_options = { + "with_zlib": True, + "with_openssl": True, + "with_zstd": True, + "with_xxhash": True, + "with_lz4": True, + "enable_acl": False + } + + def configure(self): + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package_id(self): + del self.info.settings.compiler + + def requirements(self): + if self.options.with_openssl: + self.requires("openssl/[>=1.1 <4]") + + if self.options.with_zlib: + self.requires("zlib/1.2.13") + + if self.options.with_zstd: + self.requires("zstd/1.5.5") + + if self.options.with_lz4: + self.requires("lz4/1.9.2") + + if self.options.with_xxhash: + self.requires("xxhash/0.8.1") + + def validate(self): + if self.settings.os == "Windows": + raise ConanInvalidConfiguration(f"{self.ref} is not supported on Windows.") + + if is_apple_os(self): + raise ConanInvalidConfiguration(f"{self.ref} is not supported on Apple systems.") + + def generate(self): + ad = AutotoolsDeps(self) + ad.generate() + + yes_no = lambda v: "yes" if v else "no" + tc = AutotoolsToolchain(self) + tc.configure_args.extend([ + f"--enable-acl-support={yes_no(self.options.enable_acl)}", + f"--with-included-zlib={yes_no(not self.options.with_zlib)}", + "--disable-openssl" if not self.options.with_openssl else "--enable-openssl", + f"--with-zstd={yes_no(self.options.with_zstd)}", + f"--with-lz4={yes_no(self.options.with_lz4)}", + f"--with-xxhash={yes_no(self.options.with_xxhash)}", + + "--enable-manpages=no", + ]) + + if self.settings.os == "Neutrino": + tc.extra_defines.append("MAKEDEV_TAKES_3_ARGS") + + tc.generate() + + def build(self): + autotools = Autotools(self) + autotools.configure() + autotools.make() + + def package(self): + autotools = Autotools(self) + autotools.install() + + rmdir(self, os.path.join(self.package_folder, "share")) + copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"), ignore_case=True) + + def package_info(self): + self.cpp_info.includedirs = [] + self.cpp_info.libdirs = [] + + # TODO: Remove after dropping Conan 1.x from ConanCenterIndex + bindir = os.path.join(self.package_folder, "bin") + self.runenv_info.prepend_path("PATH", bindir) diff --git a/recipes/rsync/all/test_package/conanfile.py b/recipes/rsync/all/test_package/conanfile.py new file mode 100644 index 0000000000000..92140298fe340 --- /dev/null +++ b/recipes/rsync/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conan import ConanFile +from conan.tools.build import can_run + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def test(self): + if not can_run(self): + return + + self.run("rsync --version", env="conanrun") diff --git a/recipes/rsync/config.yml b/recipes/rsync/config.yml new file mode 100644 index 0000000000000..115b04e9ac779 --- /dev/null +++ b/recipes/rsync/config.yml @@ -0,0 +1,3 @@ +versions: + "3.2.7": + folder: all From d11dc8ce9da2ac37455be30e3a026c62469286bf Mon Sep 17 00:00:00 2001 From: Fernando Pelliccioni Date: Thu, 24 Aug 2023 19:21:56 +0200 Subject: [PATCH 393/637] (#19346) GMP: bump version * bump GMP version * fix * add patch file for 6.3.x * fix patches --- recipes/gmp/all/conandata.yml | 12 ++++++++++-- ...ch => 6.x.x-0001-fix-MSVC-next-prime-error.patch} | 0 recipes/gmp/config.yml | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) rename recipes/gmp/all/patches/{6.2.x-0001-fix-MSVC-next-prime-error.patch => 6.x.x-0001-fix-MSVC-next-prime-error.patch} (100%) diff --git a/recipes/gmp/all/conandata.yml b/recipes/gmp/all/conandata.yml index 3c3f2645e9c31..71709fecc31aa 100644 --- a/recipes/gmp/all/conandata.yml +++ b/recipes/gmp/all/conandata.yml @@ -1,4 +1,9 @@ sources: + "6.3.0": + url: + - "https://ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.bz2" + - "https://gmplib.org/download/gmp/gmp-6.3.0.tar.bz2" + sha256: "ac28211a7cfb609bae2e2c8d6058d66c8fe96434f740cf6fe2e47b000d1c20cb" "6.2.1": url: - "https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.bz2" @@ -11,12 +16,15 @@ sources: url: "https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2" sha256: "5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2" patches: + "6.3.0": + - patch_file: "patches/0001-msvc-dumpbin-yasm-wrapper.patch" + - patch_file: "patches/6.x.x-0001-fix-MSVC-next-prime-error.patch" "6.2.1": - patch_file: "patches/0001-msvc-dumpbin-yasm-wrapper.patch" - - patch_file: "patches/6.2.x-0001-fix-MSVC-next-prime-error.patch" + - patch_file: "patches/6.x.x-0001-fix-MSVC-next-prime-error.patch" "6.2.0": - patch_file: "patches/0001-msvc-dumpbin-yasm-wrapper.patch" - - patch_file: "patches/6.2.x-0001-fix-MSVC-next-prime-error.patch" + - patch_file: "patches/6.x.x-0001-fix-MSVC-next-prime-error.patch" "6.1.2": - patch_file: "patches/0001-msvc-dumpbin-yasm-wrapper.patch" - patch_file: "patches/6.1.x-0001-fix-MSVC-next-prime-error.patch" diff --git a/recipes/gmp/all/patches/6.2.x-0001-fix-MSVC-next-prime-error.patch b/recipes/gmp/all/patches/6.x.x-0001-fix-MSVC-next-prime-error.patch similarity index 100% rename from recipes/gmp/all/patches/6.2.x-0001-fix-MSVC-next-prime-error.patch rename to recipes/gmp/all/patches/6.x.x-0001-fix-MSVC-next-prime-error.patch diff --git a/recipes/gmp/config.yml b/recipes/gmp/config.yml index 7beafba5ffe63..4be5637d7da8f 100644 --- a/recipes/gmp/config.yml +++ b/recipes/gmp/config.yml @@ -1,4 +1,6 @@ versions: + "6.3.0": + folder: all "6.2.1": folder: all "6.2.0": From f4342e54445f68c1a94ce2f3676d6a9570e0845e Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Thu, 24 Aug 2023 20:05:10 +0200 Subject: [PATCH 394/637] (#19365) qt6: remove multimedia plugins they are legacy from qt5, but never existed in qt6: https://github.com/qt/qtmultimedia/commit/805b10624ced9b97283e94594a5c7db4c10c63c4 https://github.com/qt/qtmultimedia/commit/98148969b112f82d2b49e77950ea5f6d8b37b8b2 https://github.com/qt/qtmultimedia/commit/aa441d63a1ed0843f4632da2d0a97a7b8bb24b43 https://github.com/qt/qtmultimedia/commit/f16dbe174cee73308cae2aae512fe837e07e0f55 https://github.com/qt/qtmultimedia/commit/58e74015c5239f269a1f0a59eabe43e92c47acd5 fixes https://github.com/conan-io/conan-center-index/issues/19146 --- recipes/qt/6.x.x/conanfile.py | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/recipes/qt/6.x.x/conanfile.py b/recipes/qt/6.x.x/conanfile.py index 70ddeb3bf605a..3edb49f690ce4 100644 --- a/recipes/qt/6.x.x/conanfile.py +++ b/recipes/qt/6.x.x/conanfile.py @@ -1205,24 +1205,8 @@ def _create_plugin(pluginname, libname, plugintype, requires): _create_module("MultimediaWidgets", ["Multimedia", "Widgets", "Gui"]) if self.options.qtdeclarative and qt_quick_enabled: _create_module("MultimediaQuick", ["Multimedia", "Quick"]) - _create_plugin("QM3uPlaylistPlugin", "qtmultimedia_m3u", "playlistformats", []) if self.options.with_gstreamer: - _create_module("MultimediaGstTools", ["Multimedia", "MultimediaWidgets", "Gui", "gst-plugins-base::gst-plugins-base"]) - _create_plugin("QGstreamerAudioDecoderServicePlugin", "gstaudiodecoder", "mediaservice", []) - _create_plugin("QGstreamerCaptureServicePlugin", "gstmediacapture", "mediaservice", []) - _create_plugin("QGstreamerPlayerServicePlugin", "gstmediaplayer", "mediaservice", []) - if self.settings.os == "Linux": - _create_plugin("CameraBinServicePlugin", "gstcamerabin", "mediaservice", []) - _create_plugin("QAlsaPlugin", "qtaudio_alsa", "audio", []) - if self.settings.os == "Windows": - _create_plugin("AudioCaptureServicePlugin", "qtmedia_audioengine", "mediaservice", []) - _create_plugin("DSServicePlugin", "dsengine", "mediaservice", []) - _create_plugin("QWindowsAudioPlugin", "qtaudio_windows", "audio", []) - if self.settings.os == "Macos": - _create_plugin("AudioCaptureServicePlugin", "qtmedia_audioengine", "mediaservice", []) - _create_plugin("AVFMediaPlayerServicePlugin", "qavfmediaplayer", "mediaservice", []) - _create_plugin("AVFServicePlugin", "qavfcamera", "mediaservice", []) - _create_plugin("CoreAudioPlugin", "qtaudio_coreaudio", "audio", []) + _create_plugin("QGstreamerMediaPlugin", "gstreamermediaplugin", "multimedia", ["gst-plugins-base::gst-plugins-base"]) if self.options.get_safe("qtpositioning"): _create_module("Positioning", []) From a38ae8e0bb84b4ed361fa8fa06ddee57f8546c65 Mon Sep 17 00:00:00 2001 From: igormironchik Date: Thu, 24 Aug 2023 21:31:04 +0300 Subject: [PATCH 395/637] (#19396) md4qt: bump version --- recipes/md4qt/all/conandata.yml | 3 +++ recipes/md4qt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index 1edae9a58ce1d..a7f8c97edc459 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.13": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.13.tar.gz" + sha256: "4e6cdcd54c5ce1e1ed9a97bd18ac5aeb7c15bb303193b4261058aef724fe9a41" "2.0.12": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.12.tar.gz" sha256: "07c89e37c624da036008acac88115b5aee6440f9e9f326139f256f34022f9a20" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index 4852bb383cf44..3a7084f75ff20 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.13": + folder: all "2.0.12": folder: all "2.0.11": From debe3d293daad963a4c7acb68eec70828f1bcfd2 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 25 Aug 2023 03:48:19 +0900 Subject: [PATCH 396/637] (#19395) sqlite3: add version 3.43.0 --- recipes/sqlite3/all/conandata.yml | 3 +++ recipes/sqlite3/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/sqlite3/all/conandata.yml b/recipes/sqlite3/all/conandata.yml index efde056fcf092..7d17c799d5f24 100644 --- a/recipes/sqlite3/all/conandata.yml +++ b/recipes/sqlite3/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.43.0": + url: "https://sqlite.org/2023/sqlite-amalgamation-3430000.zip" + sha256: "bb5849ae4d7129c09d20596379a0b3f7b1ac59cf9998eba5ef283ea9b6c000a5" "3.42.0": url: "https://sqlite.org/2023/sqlite-amalgamation-3420000.zip" sha256: "1cc824d0f5e675829fa37018318fda833ea56f7e9de2b41eddd9f7643b5ec29e" diff --git a/recipes/sqlite3/config.yml b/recipes/sqlite3/config.yml index 50ef72c5285ab..f5a78a2be1eed 100644 --- a/recipes/sqlite3/config.yml +++ b/recipes/sqlite3/config.yml @@ -1,4 +1,6 @@ versions: + "3.43.0": + folder: all "3.42.0": folder: all "3.41.2": From 6445bc697a77f4dd5b3cc7254b1b7d2d05c98dcd Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Thu, 24 Aug 2023 22:19:19 +0200 Subject: [PATCH 397/637] (#17117) aws-c-s3: add missing interface definition if shared + modernize more for conan v2 * add AWS_S3_USE_IMPORT_EXPORT interface definition if shared * modernize more * more elegant way to define target for legacy generators * aws-c-common, aws-c-auth & aws-c-io are public dependencies * aws-c-s3: add direct dependency on aws-c-cal * aws-c-s3: fix requirement on aws-c-cal * aws-c-s3: drop older version --------- Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> --- recipes/aws-c-s3/all/conandata.yml | 3 - recipes/aws-c-s3/all/conanfile.py | 83 ++++++++++--------- .../all/test_v1_package/CMakeLists.txt | 8 +- recipes/aws-c-s3/config.yml | 2 - 4 files changed, 47 insertions(+), 49 deletions(-) diff --git a/recipes/aws-c-s3/all/conandata.yml b/recipes/aws-c-s3/all/conandata.yml index af6e82a742aa6..776d2c58fad6a 100644 --- a/recipes/aws-c-s3/all/conandata.yml +++ b/recipes/aws-c-s3/all/conandata.yml @@ -11,6 +11,3 @@ sources: "0.1.27": url: "https://github.com/awslabs/aws-c-s3/archive/v0.1.27.tar.gz" sha256: "8fccbf967c3b29f0feaa1ba3de158b7ead805c3b4302c45b7cad3429f045920c" - "0.1.19": - url: "https://github.com/awslabs/aws-c-s3/archive/v0.1.19.tar.gz" - sha256: "30e17e31eed18e8d621cd3d3978b2e6eeeee5557bfc3a9d701d0d3e1c4a8a74d" diff --git a/recipes/aws-c-s3/all/conanfile.py b/recipes/aws-c-s3/all/conanfile.py index 131627214ba79..4854a0ec7c6d5 100644 --- a/recipes/aws-c-s3/all/conanfile.py +++ b/recipes/aws-c-s3/all/conanfile.py @@ -1,18 +1,21 @@ from conan import ConanFile -from conan.tools.files import get, copy, rmdir -from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import get, copy, rmdir, save +from conan.tools.scm import Version import os +import textwrap + +required_conan_version = ">=1.53.0" -required_conan_version = ">=1.47.0" class AwsCS3(ConanFile): name = "aws-c-s3" description = "C99 implementation of the S3 client" - license = "Apache-2.0", + license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/awslabs/aws-c-s3" topics = ("aws", "amazon", "cloud", "s3") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -29,37 +32,29 @@ def config_options(self): def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass - try: - del self.settings.compiler.libcxx - except Exception: - pass - try: - del self.settings.compiler.cppstd - except Exception: - pass + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("aws-c-common/0.8.2") + self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.5.13") if Version(self.version) < "0.1.49": - self.requires("aws-c-io/0.10.20") + self.requires("aws-c-auth/0.6.11", transitive_headers=True) self.requires("aws-c-http/0.6.13") - self.requires("aws-c-auth/0.6.11") + self.requires("aws-c-io/0.10.20", transitive_headers=True) else: - self.requires("aws-c-io/0.13.4") + self.requires("aws-c-auth/0.6.17", transitive_headers=True) self.requires("aws-c-http/0.6.22") - self.requires("aws-c-auth/0.6.17") + self.requires("aws-c-io/0.13.4", transitive_headers=True) if Version(self.version) >= "0.1.36": self.requires("aws-checksums/0.1.13") def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) @@ -80,24 +75,34 @@ def package(self): cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "aws-c-s3")) + # TODO: to remove in conan v2 once legacy generators removed + self._create_cmake_module_alias_targets( + os.path.join(self.package_folder, self._module_file_rel_path), + {"AWS::aws-c-s3": "aws-c-s3::aws-c-s3"} + ) + + def _create_cmake_module_alias_targets(self, module_file, targets): + content = "" + for alias, aliased in targets.items(): + content += textwrap.dedent(f"""\ + if(TARGET {aliased} AND NOT TARGET {alias}) + add_library({alias} INTERFACE IMPORTED) + set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) + endif() + """) + save(self, module_file, content) + + @property + def _module_file_rel_path(self): + return os.path.join("lib", "cmake", f"conan-official-{self.name}-targets.cmake") + def package_info(self): self.cpp_info.set_property("cmake_file_name", "aws-c-s3") self.cpp_info.set_property("cmake_target_name", "AWS::aws-c-s3") + self.cpp_info.libs = ["aws-c-s3"] + if self.options.shared: + self.cpp_info.defines.append("AWS_S3_USE_IMPORT_EXPORT") - self.cpp_info.filenames["cmake_find_package"] = "aws-c-s3" - self.cpp_info.filenames["cmake_find_package_multi"] = "aws-c-s3" - self.cpp_info.names["cmake_find_package"] = "AWS" - self.cpp_info.names["cmake_find_package_multi"] = "AWS" - self.cpp_info.components["aws-c-s3-lib"].names["cmake_find_package"] = "aws-c-s3" - self.cpp_info.components["aws-c-s3-lib"].names["cmake_find_package_multi"] = "aws-c-s3" - self.cpp_info.components["aws-c-s3-lib"].set_property("cmake_target_name", "AWS::aws-c-s3") - - self.cpp_info.components["aws-c-s3-lib"].libs = ["aws-c-s3"] - self.cpp_info.components["aws-c-s3-lib"].requires = [ - "aws-c-common::aws-c-common-lib", - "aws-c-io::aws-c-io-lib", - "aws-c-http::aws-c-http-lib", - "aws-c-auth::aws-c-auth-lib" - ] - if Version(self.version) >= "0.1.36": - self.cpp_info.components["aws-c-s3-lib"].requires.append("aws-checksums::aws-checksums-lib") + # TODO: to remove in conan v2 once cmake_find_package* generators removed + self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] + self.cpp_info.build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] diff --git a/recipes/aws-c-s3/all/test_v1_package/CMakeLists.txt b/recipes/aws-c-s3/all/test_v1_package/CMakeLists.txt index 0778b2e2c7246..0d20897301b68 100644 --- a/recipes/aws-c-s3/all/test_v1_package/CMakeLists.txt +++ b/recipes/aws-c-s3/all/test_v1_package/CMakeLists.txt @@ -1,10 +1,8 @@ cmake_minimum_required(VERSION 3.1) -project(test_package LANGUAGES C) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(aws-c-s3 REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE AWS::aws-c-s3) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/aws-c-s3/config.yml b/recipes/aws-c-s3/config.yml index 182095498622b..9a2f6a3845f5c 100644 --- a/recipes/aws-c-s3/config.yml +++ b/recipes/aws-c-s3/config.yml @@ -7,5 +7,3 @@ versions: folder: all "0.1.27": folder: all - "0.1.19": - folder: all From fa9d7398a23b8f3bc5e026c6318a92c82f1b06cd Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Thu, 24 Aug 2023 22:58:57 +0200 Subject: [PATCH 398/637] (#19388) libsecret/all: bump deps * libsecret/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * libsecret/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * libsecret/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * libsecret/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * libsecret/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * libsecret/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * libsecret/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) --- recipes/libsecret/all/conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/libsecret/all/conanfile.py b/recipes/libsecret/all/conanfile.py index 2988bdf94bf2c..d8c295c9287a3 100644 --- a/recipes/libsecret/all/conanfile.py +++ b/recipes/libsecret/all/conanfile.py @@ -53,7 +53,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("glib/2.76.0", transitive_headers=True, transitive_libs=True) + self.requires("glib/2.77.2", transitive_headers=True, transitive_libs=True) if self._use_gcrypt: self.requires("libgcrypt/1.8.4") @@ -64,9 +64,9 @@ def validate(self): ) def build_requirements(self): - self.tool_requires("meson/1.0.0") + self.tool_requires("meson/1.2.1") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/1.9.3") + self.tool_requires("pkgconf/1.9.5") self.tool_requires("glib/") if self.settings.os == "Macos": From a7996c0fd3839233a31bd1cc22f1bb43aed648b6 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Thu, 24 Aug 2023 23:37:32 +0200 Subject: [PATCH 399/637] (#19403) libselinux/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) --- recipes/libselinux/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libselinux/all/conanfile.py b/recipes/libselinux/all/conanfile.py index b584e1b1696aa..b6e6523df6453 100644 --- a/recipes/libselinux/all/conanfile.py +++ b/recipes/libselinux/all/conanfile.py @@ -54,7 +54,7 @@ def validate(self): def build_requirements(self): self.tool_requires("flex/2.6.4") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/1.9.3") + self.tool_requires("pkgconf/1.9.5") def source(self): for download in self.conan_data["sources"][self.version]: From 8734f9aa0ae2f50062661f34b032f431bbae24d5 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Fri, 25 Aug 2023 00:19:12 +0200 Subject: [PATCH 400/637] (#19390) glibmm/all: bump deps * glibmm/all/: bump deps * glibmm/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * glibmm/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * glibmm/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * glibmm/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * glibmm/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * glibmm/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * glibmm/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * glibmm/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * unbump libsigcpp --- recipes/glibmm/all/conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/glibmm/all/conanfile.py b/recipes/glibmm/all/conanfile.py index df88638f61d35..e1e08552bf5e9 100644 --- a/recipes/glibmm/all/conanfile.py +++ b/recipes/glibmm/all/conanfile.py @@ -75,7 +75,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("glib/2.76.0") + self.requires("glib/2.77.2") if self._abi_version == "2.68": self.requires("libsigcpp/3.0.7") else: @@ -97,9 +97,9 @@ def validate(self): raise ConanInvalidConfiguration("Linking shared glib with the MSVC static runtime is not supported") def build_requirements(self): - self.tool_requires("meson/1.0.0") + self.tool_requires("meson/1.2.1") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/1.9.3") + self.tool_requires("pkgconf/1.9.5") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 8f1a7c79b9bdf62bbb46071e36a9f5c0af27e2a3 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Fri, 25 Aug 2023 00:56:41 +0200 Subject: [PATCH 401/637] (#19392) pulseaudio/alll: bump deps * pulseaudio/all/: bump deps * pulseaudio/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * pulseaudio/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * pulseaudio/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * pulseaudio/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * pulseaudio/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * pulseaudio/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * pulseaudio/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * pulseaudio/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) --- recipes/pulseaudio/all/conanfile.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/pulseaudio/all/conanfile.py b/recipes/pulseaudio/all/conanfile.py index 84e7c6bf375e7..f1b1de05bf967 100644 --- a/recipes/pulseaudio/all/conanfile.py +++ b/recipes/pulseaudio/all/conanfile.py @@ -58,13 +58,13 @@ def layout(self): def requirements(self): self.requires("libiconv/1.17") - self.requires("libsndfile/1.2.0") - self.requires("libcap/2.66") + self.requires("libsndfile/1.2.2") + self.requires("libcap/2.68") self.requires("libtool/2.4.7") if self.options.with_alsa: self.requires("libalsa/1.2.7.2") if self.options.with_glib: - self.requires("glib/2.76.1") + self.requires("glib/2.77.2") if self.options.get_safe("with_fftw"): self.requires("fftw/3.3.10") if self.options.with_x11: @@ -72,7 +72,7 @@ def requirements(self): if self.options.with_openssl: self.requires("openssl/[>=1.1 <4]") if self.options.with_dbus: - self.requires("dbus/1.15.2") + self.requires("dbus/1.15.8") def validate(self): if self.settings.os != "Linux": @@ -90,7 +90,7 @@ def build_requirements(self): self.tool_requires("gettext/0.21") self.tool_requires("libtool/2.4.7") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/1.9.3") + self.tool_requires("pkgconf/1.9.5") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 4c28c55d2e6591434e75b423ad7f5533c0693631 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Fri, 25 Aug 2023 01:49:42 +0200 Subject: [PATCH 402/637] (#19382) [bot] Update authorized users list (2023-08-24) --- .c3i/authorized_users.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index fcf61aaa08fd3..b68f4b3ff0398 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1216,3 +1216,4 @@ authorized_users: - adattatri - jwfallawuiuc - tgurriet +- mgfernan From c81c3dff91bd05112ff7e71725ab6f28817a9777 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 25 Aug 2023 02:02:58 +0200 Subject: [PATCH 403/637] (#19394) [nasm] Configure assembler compiler by cpp_info Signed-off-by: Uilian Ries --- recipes/nasm/all/conanfile.py | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/recipes/nasm/all/conanfile.py b/recipes/nasm/all/conanfile.py index 25d5fec8b82ba..f570e673ace4d 100644 --- a/recipes/nasm/all/conanfile.py +++ b/recipes/nasm/all/conanfile.py @@ -17,7 +17,7 @@ class NASMConan(ConanFile): homepage = "http://www.nasm.us" description = "The Netwide Assembler, NASM, is an 80x86 and x86-64 assembler" license = "BSD-2-Clause" - topics = ("nasm", "installer", "assembler") + topics = ("asm", "installer", "assembler",) settings = "os", "arch", "compiler", "build_type" @@ -25,6 +25,20 @@ class NASMConan(ConanFile): def _settings_build(self): return getattr(self, "settings_build", self.settings) + @property + def _nasm(self): + suffix = "w.exe" if is_msvc(self) else "" + return os.path.join(self.package_folder, "bin", f"nasm{suffix}") + + @property + def _ndisasm(self): + suffix = "w.exe" if is_msvc(self) else "" + return os.path.join(self.package_folder, "bin", f"ndisasm{suffix}") + + def _chmod_plus_x(self, filename): + if os.name == "posix": + os.chmod(filename, os.stat(filename).st_mode | 0o111) + def export_sources(self): export_conandata_patches(self) @@ -94,10 +108,21 @@ def package(self): autotools = Autotools(self) autotools.install() rmdir(self, os.path.join(self.package_folder, "share")) + self._chmod_plus_x(self._nasm) + self._chmod_plus_x(self._ndisasm) def package_info(self): self.cpp_info.libdirs = [] self.cpp_info.includedirs = [] + compiler_executables = {"asm": self._nasm} + self.conf_info.update("tools.build:compiler_executables", compiler_executables) + self.buildenv_info.define_path("NASM", self._nasm) + self.buildenv_info.define_path("NDISASM", self._ndisasm) + self.buildenv_info.define_path("AS", self._nasm) + # TODO: Legacy, to be removed on Conan 2.0 self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) + self.env_info.NASM = self._nasm + self.env_info.NDISASM = self._ndisasm + self.env_info.AS = self._nasm From 57acb4c8623cce7c97ebe393f706c8d4e0dbe289 Mon Sep 17 00:00:00 2001 From: Holger Detering Date: Fri, 25 Aug 2023 02:49:11 +0200 Subject: [PATCH 404/637] (#19368) aws-c-event-stream: add version 0.3.1 --- recipes/aws-c-event-stream/all/conandata.yml | 3 +++ recipes/aws-c-event-stream/all/conanfile.py | 12 +++++++++--- recipes/aws-c-event-stream/config.yml | 2 ++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/recipes/aws-c-event-stream/all/conandata.yml b/recipes/aws-c-event-stream/all/conandata.yml index 61428e916296b..4c8f01cd490cb 100644 --- a/recipes/aws-c-event-stream/all/conandata.yml +++ b/recipes/aws-c-event-stream/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.3.1": + url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.3.1.tar.gz" + sha256: "bdbc420efc2572689fb167ac288e982a01224876eb79d80e2411fad4c43e9dc0" "0.2.15": url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.2.15.tar.gz" sha256: "4ff2ada07ede3c6afa4b8e6e20de541e717038307f29b38c27efa7c4d875ee26" diff --git a/recipes/aws-c-event-stream/all/conanfile.py b/recipes/aws-c-event-stream/all/conanfile.py index 2d51b3c4c313f..d88a017a7e6ba 100644 --- a/recipes/aws-c-event-stream/all/conanfile.py +++ b/recipes/aws-c-event-stream/all/conanfile.py @@ -43,13 +43,19 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - self.requires("aws-checksums/0.1.13") + if Version(self.version) < "0.3.1": + self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) + self.requires("aws-checksums/0.1.13") + else: + self.requires("aws-c-common/0.9.0", transitive_headers=True, transitive_libs=True) + self.requires("aws-checksums/0.1.17") if Version(self.version) >= "0.2": if Version(self.version) < "0.2.11": self.requires("aws-c-io/0.10.20") - else: + elif Version(self.version) < "0.3.1": self.requires("aws-c-io/0.13.4") + else: + self.requires("aws-c-io/0.13.32") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-event-stream/config.yml b/recipes/aws-c-event-stream/config.yml index 96ac653286f12..4a2530c32b47b 100644 --- a/recipes/aws-c-event-stream/config.yml +++ b/recipes/aws-c-event-stream/config.yml @@ -1,4 +1,6 @@ versions: + "0.3.1": + folder: all "0.2.15": folder: all "0.2.12": From 779dc12c83d2a20a24f487e7530dc8092d2eb6f3 Mon Sep 17 00:00:00 2001 From: Marian Klymov Date: Fri, 25 Aug 2023 05:05:11 +0300 Subject: [PATCH 405/637] (#19018) utfcpp: add utf8::cpp alias * utfcpp: add utf8::cpp alias * fix build module for v1 * Get rid of alias for CMake < 3.18 --- recipes/utfcpp/all/conanfile.py | 11 ++++++----- recipes/utfcpp/all/test_package/CMakeLists.txt | 2 ++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/recipes/utfcpp/all/conanfile.py b/recipes/utfcpp/all/conanfile.py index 34e0685b4ddb2..247b54396ade2 100644 --- a/recipes/utfcpp/all/conanfile.py +++ b/recipes/utfcpp/all/conanfile.py @@ -38,7 +38,8 @@ def package(self): # TODO: to remove in conan v2 once cmake_find_package* generators removed self._create_cmake_module_alias_targets( os.path.join(self.package_folder, self._module_file_rel_path), - {"utf8cpp": "utf8cpp::utf8cpp"}, + {"utf8cpp": "utf8cpp::utf8cpp", + "utf8::cpp": "utf8cpp::utf8cpp"}, ) def _create_cmake_module_alias_targets(self, module_file, targets): @@ -59,12 +60,12 @@ def _module_file_rel_path(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "utf8cpp") self.cpp_info.set_property("cmake_target_name", "utf8cpp") + self.cpp_info.set_property("cmake_target_aliases", ["utf8::cpp"]) self.cpp_info.includedirs.append(os.path.join("include", "utf8cpp")) self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] # TODO: to remove in conan v2 once cmake_find_package* generators removed - self.cpp_info.names["cmake_find_package"] = "utf8cpp" - self.cpp_info.names["cmake_find_package_multi"] = "utf8cpp" - self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] - self.cpp_info.build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] + for generator in ["cmake_find_package", "cmake_find_package_multi"]: + self.cpp_info.names[generator] = "utf8cpp" + self.cpp_info.build_modules[generator] = [self._module_file_rel_path] diff --git a/recipes/utfcpp/all/test_package/CMakeLists.txt b/recipes/utfcpp/all/test_package/CMakeLists.txt index fe794ae36be57..7624c13618914 100644 --- a/recipes/utfcpp/all/test_package/CMakeLists.txt +++ b/recipes/utfcpp/all/test_package/CMakeLists.txt @@ -5,4 +5,6 @@ find_package(utf8cpp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE utf8cpp) +#check alias +target_link_libraries(${PROJECT_NAME} PRIVATE utf8::cpp) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) From 56d92fb9f5ef7678d296c2b12900bfd684e327ea Mon Sep 17 00:00:00 2001 From: Guillaume Egles Date: Thu, 24 Aug 2023 22:38:43 -0700 Subject: [PATCH 406/637] (#19345) expected-lite: make sure libdirs is empty for this header-only library --- recipes/expected-lite/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/expected-lite/all/conanfile.py b/recipes/expected-lite/all/conanfile.py index d5786a1bd1873..591dbe00d1ead 100644 --- a/recipes/expected-lite/all/conanfile.py +++ b/recipes/expected-lite/all/conanfile.py @@ -52,3 +52,4 @@ def package_info(self): self.cpp_info.components["expectedlite"].names["cmake_find_package"] = "expected-lite" self.cpp_info.components["expectedlite"].names["cmake_find_package_multi"] = "expected-lite" self.cpp_info.components["expectedlite"].set_property("cmake_target_name", "nonstd::expected-lite") + self.cpp_info.components["expectedlite"].libdirs = [] From 29309eb45e2f3c9365c54342d65743562e32603d Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 25 Aug 2023 15:19:34 +0900 Subject: [PATCH 407/637] (#19377) simdutf: add version 3.2.17 --- recipes/simdutf/all/conandata.yml | 7 ++++++ .../all/patches/3.2.17-0001-fix-cmake.patch | 22 +++++++++++++++++++ recipes/simdutf/config.yml | 2 ++ 3 files changed, 31 insertions(+) create mode 100644 recipes/simdutf/all/patches/3.2.17-0001-fix-cmake.patch diff --git a/recipes/simdutf/all/conandata.yml b/recipes/simdutf/all/conandata.yml index a0fbb53596197..7b21b415ea007 100644 --- a/recipes/simdutf/all/conandata.yml +++ b/recipes/simdutf/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.2.17": + url: "https://github.com/simdutf/simdutf/archive/v3.2.17.tar.gz" + sha256: "c24e3eec1e08522a09b33e603352e574f26d367a7701bf069a65881f64acd519" "3.2.15": url: "https://github.com/simdutf/simdutf/archive/v3.2.15.tar.gz" sha256: "c26d2e2e9124e1c20335d3880d74c8b0d74a5e247ba82ef82d15df4ccc413bcd" @@ -30,6 +33,10 @@ sources: url: "https://github.com/simdutf/simdutf/archive/v1.0.1.tar.gz" sha256: "e7832ba58fb95fe00de76dbbb2f17d844a7ad02a6f5e3e9e5ce9520e820049a0" patches: + "3.2.17": + - patch_file: "patches/3.2.17-0001-fix-cmake.patch" + patch_description: "remove static build, enable rpath on macOS" + patch_type: "conan" "3.2.15": - patch_file: "patches/3.2.14-0001-fix-cmake.patch" patch_description: "remove static build, enable rpath on macOS" diff --git a/recipes/simdutf/all/patches/3.2.17-0001-fix-cmake.patch b/recipes/simdutf/all/patches/3.2.17-0001-fix-cmake.patch new file mode 100644 index 0000000000000..6f1f0aa23c231 --- /dev/null +++ b/recipes/simdutf/all/patches/3.2.17-0001-fix-cmake.patch @@ -0,0 +1,22 @@ +diff --git a/cmake/simdutf-flags.cmake b/cmake/simdutf-flags.cmake +index d1e9bcd..2ff37c0 100644 +--- a/cmake/simdutf-flags.cmake ++++ b/cmake/simdutf-flags.cmake +@@ -22,4 +22,3 @@ set(SIMDUTF_CXX_STANDARD 11 CACHE STRING "the C++ standard to use for simdutf") + set(CMAKE_CXX_STANDARD ${SIMDUTF_CXX_STANDARD}) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) +-set(CMAKE_MACOSX_RPATH OFF) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index ed6be55..0b649c6 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -3,7 +3,7 @@ target_include_directories(simdutf-include-source INTERFACE $/simdutf.cpp) + target_link_libraries(simdutf-source INTERFACE simdutf-include-source) +-add_library(simdutf STATIC simdutf.cpp) ++add_library(simdutf simdutf.cpp) + target_include_directories(simdutf PRIVATE $ ) + target_include_directories(simdutf PUBLIC "$") + diff --git a/recipes/simdutf/config.yml b/recipes/simdutf/config.yml index 997781983cc10..809aaef06ef29 100644 --- a/recipes/simdutf/config.yml +++ b/recipes/simdutf/config.yml @@ -1,4 +1,6 @@ versions: + "3.2.17": + folder: all "3.2.15": folder: all "3.2.14": From 4af9a10888afe03d29f5c2378b7045e683d260f1 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 25 Aug 2023 15:39:28 +0900 Subject: [PATCH 408/637] (#19409) gperftools: add version 2.12.0 --- recipes/gperftools/all/conandata.yml | 3 +++ recipes/gperftools/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/gperftools/all/conandata.yml b/recipes/gperftools/all/conandata.yml index 439e56462f63f..9b61f5954a26d 100644 --- a/recipes/gperftools/all/conandata.yml +++ b/recipes/gperftools/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.12.0": + url: "https://github.com/gperftools/gperftools/releases/download/gperftools-2.12/gperftools-2.12.tar.gz" + sha256: "fb611b56871a3d9c92ab0cc41f9c807e8dfa81a54a4a9de7f30e838756b5c7c6" "2.11.0": url: "https://github.com/gperftools/gperftools/releases/download/gperftools-2.11/gperftools-2.11.tar.gz" sha256: "8ffda10e7c500fea23df182d7adddbf378a203c681515ad913c28a64b87e24dc" diff --git a/recipes/gperftools/config.yml b/recipes/gperftools/config.yml index caf3d64443304..901ed44b80295 100644 --- a/recipes/gperftools/config.yml +++ b/recipes/gperftools/config.yml @@ -1,4 +1,6 @@ versions: + "2.12.0": + folder: all "2.11.0": folder: all "2.10.0": From ca82fe3535e6642dbf6671e90d7cc58bf11ab3b3 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Fri, 25 Aug 2023 13:59:15 +0200 Subject: [PATCH 409/637] (#19413) libmount: fixup license files --- recipes/libmount/all/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/libmount/all/conanfile.py b/recipes/libmount/all/conanfile.py index 04bcc9f5b860f..b9ec541d71963 100644 --- a/recipes/libmount/all/conanfile.py +++ b/recipes/libmount/all/conanfile.py @@ -61,7 +61,8 @@ def build(self): autotools.make() def package(self): - copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "COPYING", src=os.path.join(self.source_folder, "libmount"), dst=os.path.join(self.package_folder, "licenses")) + copy(self, "COPYING.LGPL-2.1-or-later", src=os.path.join(self.source_folder, "Documentation", "licenses"), dst=os.path.join(self.package_folder, "licenses")) autotools = Autotools(self) autotools.install() rmdir(self, os.path.join(self.package_folder, "sbin")) From fca6afcc18519a6679c16a3b8916e5efacecc3b8 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 25 Aug 2023 21:36:13 +0900 Subject: [PATCH 410/637] (#19151) yaml-cpp: add version 0.8.0 * yaml-cpp: add version 0.8.0 * support static build on msvc --- recipes/yaml-cpp/all/conandata.yml | 9 +++++++++ recipes/yaml-cpp/all/conanfile.py | 5 ++++- recipes/yaml-cpp/config.yml | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/recipes/yaml-cpp/all/conandata.yml b/recipes/yaml-cpp/all/conandata.yml index 59546f980c76e..542de368538ce 100644 --- a/recipes/yaml-cpp/all/conandata.yml +++ b/recipes/yaml-cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.8.0": + url: "https://github.com/jbeder/yaml-cpp/archive/refs/tags/0.8.0.tar.gz" + sha256: "fbe74bbdcee21d656715688706da3c8becfd946d92cd44705cc6098bb23b3a16" "0.7.0": url: "https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.7.0.tar.gz" sha256: "43e6a9fcb146ad871515f0d0873947e5d497a1c9c60c58cb102a97b47208b7c3" @@ -8,4 +11,10 @@ sources: patches: "0.7.0": - patch_file: "patches/0001-install-0.7.0.patch" + patch_description: "trigger installation through add_subdirectory from another CMakeLists.txt" + patch_type: "conan" + patch_source: "https://github.com/jbeder/yaml-cpp/pull/847" - patch_file: "patches/0002-libcxx-and-gcc.patch" + patch_description: "Adds assert to enable compilation with libcxx + gcc" + patch_type: "portability" + patch_source: "https://github.com/jbeder/yaml-cpp/pull/947" diff --git a/recipes/yaml-cpp/all/conanfile.py b/recipes/yaml-cpp/all/conanfile.py index 1b66ae0cdf060..5b5671d6ceeee 100644 --- a/recipes/yaml-cpp/all/conanfile.py +++ b/recipes/yaml-cpp/all/conanfile.py @@ -4,6 +4,7 @@ from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, rmdir, save from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.scm import Version import os import textwrap @@ -110,8 +111,10 @@ def package_info(self): self.cpp_info.system_libs.append("m") if is_msvc(self): self.cpp_info.defines.append("_NOEXCEPT=noexcept") - if self.options.shared: + if Version(self.version) < "0.8.0" and self.options.shared: self.cpp_info.defines.append("YAML_CPP_DLL") + if Version(self.version) >= "0.8.0" and not self.options.shared: + self.cpp_info.defines.append("YAML_CPP_STATIC_DEFINE") # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] diff --git a/recipes/yaml-cpp/config.yml b/recipes/yaml-cpp/config.yml index ecd70890a4473..3ad5266d60fe2 100644 --- a/recipes/yaml-cpp/config.yml +++ b/recipes/yaml-cpp/config.yml @@ -1,4 +1,6 @@ versions: + "0.8.0": + folder: all "0.7.0": folder: all "0.6.3": From 241a271eb365ce007109ca27776ddc8e522489f1 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Fri, 25 Aug 2023 15:43:10 +0200 Subject: [PATCH 411/637] (#19387) keychain/all: bump deps * keychain/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * keychain/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * keychain/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * keychain/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * keychain/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) --- recipes/keychain/all/conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/keychain/all/conanfile.py b/recipes/keychain/all/conanfile.py index 216336cf7d368..102f9369ebd89 100644 --- a/recipes/keychain/all/conanfile.py +++ b/recipes/keychain/all/conanfile.py @@ -33,12 +33,12 @@ def validate(self): def requirements(self): if self.settings.os == "Linux": - self.requires("libsecret/0.20.4") - self.requires("glib/2.76.0") + self.requires("libsecret/0.20.5") + self.requires("glib/2.77.2") def build_requirements(self): if self.settings.os == "Linux": - self.tool_requires("pkgconf/1.7.3") + self.tool_requires("pkgconf/1.9.5") def layout(self): cmake_layout(self, src_folder="src") From 76883247305bc86e10aebe6f55a9b2775771c185 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Fri, 25 Aug 2023 16:04:10 +0200 Subject: [PATCH 412/637] (#19389) libverto/all: bump deps * libverto/all/: bump deps * libverto/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * libverto/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * libverto/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * libverto/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * libverto/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) --- recipes/libverto/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/libverto/all/conanfile.py b/recipes/libverto/all/conanfile.py index a35c9bf481ff4..e1a3593480924 100644 --- a/recipes/libverto/all/conanfile.py +++ b/recipes/libverto/all/conanfile.py @@ -75,7 +75,7 @@ def layout(self): def requirements(self): if self.options.with_glib: - self.requires("glib/2.76.0") + self.requires("glib/2.77.2") if self.options.with_libevent: self.requires("libevent/2.1.12") if self.options.with_libev: @@ -109,7 +109,7 @@ def validate(self): def build_requirements(self): if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/1.9.3") + self.tool_requires("pkgconf/1.9.5") self.tool_requires("libtool/2.4.7") if self._settings_build.os == "Windows": self.win_bash = True From 227d6d18921b31119734da4bdc0059969b131174 Mon Sep 17 00:00:00 2001 From: Thomas Steiner <47025493+steinerthomas@users.noreply.github.com> Date: Fri, 25 Aug 2023 16:56:48 +0200 Subject: [PATCH 413/637] (#19414) xmlsec: bump libxml2 to 2.11.4 * xmlsec: bump libxml2 to 2.11.4 * test_package 2.11.4 --- recipes/xmlsec/all/conanfile.py | 2 +- recipes/xmlsec/all/test_package/conanfile.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/xmlsec/all/conanfile.py b/recipes/xmlsec/all/conanfile.py index 6cbfca0ca36ca..146dd548ccbb5 100644 --- a/recipes/xmlsec/all/conanfile.py +++ b/recipes/xmlsec/all/conanfile.py @@ -60,7 +60,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("libxml2/2.10.4", transitive_headers=True) + self.requires("libxml2/2.11.4", transitive_headers=True) if self.options.with_openssl: self.requires("openssl/[>=1.1 <4]", transitive_headers=True) if self.options.with_xslt: diff --git a/recipes/xmlsec/all/test_package/conanfile.py b/recipes/xmlsec/all/test_package/conanfile.py index e977f9247d9e3..b846bc292a759 100644 --- a/recipes/xmlsec/all/test_package/conanfile.py +++ b/recipes/xmlsec/all/test_package/conanfile.py @@ -14,7 +14,7 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) - self.requires("libxml2/2.10.4") + self.requires("libxml2/2.11.4") def generate(self): tc = CMakeToolchain(self) From eec8b0073a02776872ff04f803b46a691a14ff1a Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 25 Aug 2023 18:05:43 +0200 Subject: [PATCH 414/637] (#19380) [fix] Arrow: Make it conan v2 comaptible, refactor auto options and add 12.0.1 version * arrow: add version 12.0.1, with dirty workaround for conan v2 * [fix] Arrow: Make it conan v2 comaptible, refactor auto options and add 12.0.1 * remove prints --------- Co-authored-by: toge --- recipes/arrow/all/conandata.yml | 3 + recipes/arrow/all/conanfile.py | 236 +++++++++++++++----------------- recipes/arrow/config.yml | 2 + 3 files changed, 119 insertions(+), 122 deletions(-) diff --git a/recipes/arrow/all/conandata.yml b/recipes/arrow/all/conandata.yml index 772cdfef9c3c2..256a5f614578c 100644 --- a/recipes/arrow/all/conandata.yml +++ b/recipes/arrow/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "12.0.1": + url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-12.0.1/apache-arrow-12.0.1.tar.gz?action=download" + sha256: "3481c411393aa15c75e88d93cf8315faf7f43e180fe0790128d3840d417de858" "12.0.0": url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-12.0.0/apache-arrow-12.0.0.tar.gz?action=download" sha256: "ddd8347882775e53af7d0965a1902b7d8fcd0a030fd14f783d4f85e821352d52" diff --git a/recipes/arrow/all/conanfile.py b/recipes/arrow/all/conanfile.py index 50780c591a6e7..abed7f510dbed 100644 --- a/recipes/arrow/all/conanfile.py +++ b/recipes/arrow/all/conanfile.py @@ -49,8 +49,9 @@ class ArrowConan(ConanFile): "with_glog": ["auto", True, False], "with_grpc": ["auto", True, False], "with_jemalloc": ["auto", True, False], - "with_mimalloc": ["auto", True, False], + "with_mimalloc": [True, False], "with_json": [True, False], + "with_thrift": ["auto", True, False], "with_llvm": ["auto", True, False], "with_openssl": ["auto", True, False], "with_opentelemetry": [True, False], @@ -99,6 +100,7 @@ class ArrowConan(ConanFile): "with_glog": "auto", "with_grpc": "auto", "with_json": False, + "with_thrift": "auto", "with_llvm": "auto", "with_openssl": "auto", "with_opentelemetry": False, @@ -155,6 +157,22 @@ def config_options(self): if Version(self.version) < "8.0.0": del self.options.substrait + self.options.parquet = self._parquet() + self.options.compute = self._compute() + self.options.dataset_modules = self._dataset_modules() + self.options.with_boost = self._with_boost() + self.options.with_flight_rpc = self._with_flight_rpc() + self.options.with_gflags = self._with_gflags() + self.options.with_glog = self._with_glog() + self.options.with_grpc = self._with_grpc() + self.options.with_jemalloc = self._with_jemalloc() + self.options.with_thrift = self._with_thrift() + self.options.with_llvm = self._with_llvm() + self.options.with_openssl = self._with_openssl() + self.options.with_protobuf = self._with_protobuf() + self.options.with_re2 = self._with_re2() + self.options.with_utf8proc = self._with_utf8proc() + def configure(self): if self.options.shared: self.options.rm_safe("fPIC") @@ -162,32 +180,32 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") - def _compute(self, required=False): - if required or self.options.compute == "auto": + def _compute(self): + if self.options.compute == "auto": return bool(self._parquet() or self._dataset_modules()) or bool(self.options.get_safe("substrait", False)) else: return bool(self.options.compute) - def _parquet(self, required=False): - if required or self.options.parquet == "auto": + def _parquet(self): + if self.options.parquet == "auto": return bool(self.options.get_safe("substrait", False)) else: return bool(self.options.parquet) - def _dataset_modules(self, required=False): - if required or self.options.dataset_modules == "auto": + def _dataset_modules(self): + if self.options.dataset_modules == "auto": return bool(self.options.get_safe("substrait", False)) else: return bool(self.options.dataset_modules) - def _with_jemalloc(self, required=False): - if required or self.options.with_jemalloc == "auto": + def _with_jemalloc(self): + if self.options.with_jemalloc == "auto": return bool("BSD" in str(self.settings.os)) else: return bool(self.options.with_jemalloc) - def _with_re2(self, required=False): - if required or self.options.with_re2 == "auto": + def _with_re2(self): + if self.options.with_re2 == "auto": if self.options.gandiva or self.options.parquet: return True if Version(self) >= "7.0.0" and (self._compute() or self._dataset_modules()): @@ -196,38 +214,38 @@ def _with_re2(self, required=False): else: return bool(self.options.with_re2) - def _with_protobuf(self, required=False): - if required or self.options.with_protobuf == "auto": + def _with_protobuf(self): + if self.options.with_protobuf == "auto": return bool(self.options.gandiva or self._with_flight_rpc() or self.options.with_orc or self.options.get_safe("substrait", False)) else: return bool(self.options.with_protobuf) - def _with_flight_rpc(self, required=False): - if required or self.options.with_flight_rpc == "auto": + def _with_flight_rpc(self): + if self.options.with_flight_rpc == "auto": return bool(self.options.get_safe("with_flight_sql", False)) else: return bool(self.options.with_flight_rpc) - def _with_gflags(self, required=False): - if required or self.options.with_gflags == "auto": + def _with_gflags(self): + if self.options.with_gflags == "auto": return bool(self._with_glog() or self._with_grpc()) else: return bool(self.options.with_gflags) - def _with_glog(self, required=False): - if required or self.options.with_glog == "auto": + def _with_glog(self): + if self.options.with_glog == "auto": return False else: return bool(self.options.with_glog) - def _with_grpc(self, required=False): - if required or self.options.with_grpc == "auto": + def _with_grpc(self): + if self.options.with_grpc == "auto": return self._with_flight_rpc() else: return bool(self.options.with_grpc) - def _with_boost(self, required=False): - if required or self.options.with_boost == "auto": + def _with_boost(self): + if self.options.with_boost == "auto": if self.options.gandiva: return True version = Version(self.version) @@ -241,29 +259,31 @@ def _with_boost(self, required=False): else: return bool(self.options.with_boost) - def _with_thrift(self, required=False): - # No self.options.with_thift exists - return bool(required or self._parquet()) + def _with_thrift(self): + if self.options.with_thrift == "auto": + return bool(self._parquet()) + else: + return bool(self.options.with_thrift) - def _with_utf8proc(self, required=False): - if required or self.options.with_utf8proc == "auto": + def _with_utf8proc(self): + if self.options.with_utf8proc == "auto": return bool(self._compute() or self.options.gandiva) else: return bool(self.options.with_utf8proc) - def _with_llvm(self, required=False): - if required or self.options.with_llvm == "auto": + def _with_llvm(self): + if self.options.with_llvm == "auto": return bool(self.options.gandiva) else: return bool(self.options.with_llvm) - def _with_openssl(self, required=False): - if required or self.options.with_openssl == "auto": + def _with_openssl(self): + if self.options.with_openssl == "auto": return bool(self.options.encryption or self._with_flight_rpc() or self.options.with_s3) else: return bool(self.options.with_openssl) - def _with_rapidjson(self): + def _requires_rapidjson(self): if self.options.with_json: return True if Version(self.version) >= "7.0.0" and self.options.encryption: @@ -271,29 +291,29 @@ def _with_rapidjson(self): return False def requirements(self): - if self._with_thrift(): + if self.options.with_thrift: self.requires("thrift/0.17.0") - if self._with_protobuf(): + if self.options.with_protobuf: self.requires("protobuf/3.21.9") - if self._with_jemalloc(): + if self.options.with_jemalloc: self.requires("jemalloc/5.3.0") if self.options.with_mimalloc: self.requires("mimalloc/1.7.6") - if self._with_boost(): + if self.options.with_boost: self.requires("boost/1.81.0") - if self._with_gflags(): + if self.options.with_gflags: self.requires("gflags/2.2.2") - if self._with_glog(): + if self.options.with_glog: self.requires("glog/0.6.0") if self.options.get_safe("with_gcs"): self.requires("google-cloud-cpp/1.40.1") - if self._with_grpc(): + if self.options.with_grpc: self.requires("grpc/1.50.0") - if self._with_rapidjson(): + if self._requires_rapidjson(): self.requires("rapidjson/1.1.0") - if self._with_llvm(): + if self.options.with_llvm: self.requires("llvm-core/13.0.0") - if self._with_openssl(): + if self.options.with_openssl: # aws-sdk-cpp requires openssl/1.1.1. it uses deprecated functions in openssl/3.0.0 if self.options.with_s3: self.requires("openssl/1.1.1t") @@ -319,24 +339,20 @@ def requirements(self): self.requires("zlib/1.2.13") if self.options.with_zstd: self.requires("zstd/1.5.2") - if self._with_re2(): + if self.options.with_re2: self.requires("re2/20220601") - if self._with_utf8proc(): + if self.options.with_utf8proc: self.requires("utf8proc/2.8.0") if self.options.with_backtrace: self.requires("libbacktrace/cci.20210118") - def package_id(self): - self.info.options.with_gflags = self._with_gflags() - self.info.options.with_protobuf = self._with_protobuf() - self.info.options.with_re2 = self._with_re2() - self.info.options.with_jemalloc = self._with_jemalloc() - self.info.options.with_openssl = self._with_openssl() - self.info.options.with_boost = self._with_boost() - self.info.options.with_glog = self._with_glog() - self.info.options.with_grpc = self._with_grpc() - def validate(self): + # validate options with 'auto' as default value + auto_options = ["parquet", "compute", "dataset_modules", "with_boost", "with_flight_rpc", "with_gflags", "with_glog", + "with_grpc", "with_jemalloc", "with_thrift", "with_llvm", "with_openssl", "with_protobuf", "with_re2", "with_utf8proc"] + for option in auto_options: + assert "auto" not in str(self.options.get_safe(option)), f"Option '{option}' contains 'auto' value, wich is not allowed. Generally the final value should be True/False" + if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) @@ -346,32 +362,8 @@ def validate(self): f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) - if self.options.compute == False and not self._compute(True): - raise ConanInvalidConfiguration("compute options is required (or choose auto)") - if self.options.parquet == False and self._parquet(True): - raise ConanInvalidConfiguration("parquet options is required (or choose auto)") - if self.options.dataset_modules == False and self._dataset_modules(True): - raise ConanInvalidConfiguration("dataset_modules options is required (or choose auto)") if self.options.get_safe("skyhook", False): raise ConanInvalidConfiguration("CCI has no librados recipe (yet)") - if self.options.with_jemalloc == False and self._with_jemalloc(True): - raise ConanInvalidConfiguration("with_jemalloc option is required (or choose auto)") - if self.options.with_re2 == False and self._with_re2(True): - raise ConanInvalidConfiguration("with_re2 option is required (or choose auto)") - if self.options.with_protobuf == False and self._with_protobuf(True): - raise ConanInvalidConfiguration("with_protobuf option is required (or choose auto)") - if self.options.with_gflags == False and self._with_gflags(True): - raise ConanInvalidConfiguration("with_gflags options is required (or choose auto)") - if self.options.with_flight_rpc == False and self._with_flight_rpc(True): - raise ConanInvalidConfiguration("with_flight_rpc options is required (or choose auto)") - if self.options.with_grpc == False and self._with_grpc(True): - raise ConanInvalidConfiguration("with_grpc options is required (or choose auto)") - if self.options.with_boost == False and self._with_boost(True): - raise ConanInvalidConfiguration("with_boost options is required (or choose auto)") - if self.options.with_openssl == False and self._with_openssl(True): - raise ConanInvalidConfiguration("with_openssl options is required (or choose auto)") - if self.options.with_llvm == False and self._with_llvm(True): - raise ConanInvalidConfiguration("with_llvm options is required (or choose auto)") if self.options.with_cuda: raise ConanInvalidConfiguration("CCI has no cuda recipe (yet)") if self.options.with_orc: @@ -379,7 +371,7 @@ def validate(self): if self.options.with_s3 and not self.dependencies["aws-sdk-cpp"].options.config: raise ConanInvalidConfiguration("arrow:with_s3 requires aws-sdk-cpp:config is True.") - if self.options.shared and self._with_jemalloc(): + if self.options.shared and self.options.with_jemalloc: if self.dependencies["jemalloc"].options.enable_cxx: raise ConanInvalidConfiguration("jemmalloc.enable_cxx of a static jemalloc must be disabled") @@ -404,10 +396,10 @@ def generate(self): tc.variables["ARROW_DEPENDENCY_SOURCE"] = "SYSTEM" tc.variables["ARROW_PACKAGE_KIND"] = "conan" # See https://github.com/conan-io/conan-center-index/pull/14903/files#r1057938314 for details tc.variables["ARROW_GANDIVA"] = bool(self.options.gandiva) - tc.variables["ARROW_PARQUET"] = self._parquet() + tc.variables["ARROW_PARQUET"] = self.options.parquet tc.variables["ARROW_SUBSTRAIT"] = bool(self.options.get_safe("substrait", False)) tc.variables["ARROW_ACERO"] = bool(self.options.acero) - tc.variables["ARROW_DATASET"] = self._dataset_modules() + tc.variables["ARROW_DATASET"] = self.options.dataset_modules tc.variables["ARROW_FILESYSTEM"] = bool(self.options.filesystem_layer) tc.variables["PARQUET_REQUIRE_ENCRYPTION"] = bool(self.options.encryption) tc.variables["ARROW_HDFS"] = bool(self.options.hdfs_bridgs) @@ -415,12 +407,12 @@ def generate(self): tc.variables["ARROW_BUILD_SHARED"] = bool(self.options.shared) tc.variables["ARROW_BUILD_STATIC"] = not bool(self.options.shared) tc.variables["ARROW_NO_DEPRECATED_API"] = not bool(self.options.deprecated) - tc.variables["ARROW_FLIGHT"] = self._with_flight_rpc() + tc.variables["ARROW_FLIGHT"] = self.options.with_flight_rpc tc.variables["ARROW_FLIGHT_SQL"] = bool(self.options.get_safe("with_flight_sql", False)) - tc.variables["ARROW_COMPUTE"] = self._compute() + tc.variables["ARROW_COMPUTE"] = self.options.compute tc.variables["ARROW_CSV"] = bool(self.options.with_csv) tc.variables["ARROW_CUDA"] = bool(self.options.with_cuda) - tc.variables["ARROW_JEMALLOC"] = self._with_jemalloc() + tc.variables["ARROW_JEMALLOC"] = self.options.with_jemalloc tc.variables["jemalloc_SOURCE"] = "SYSTEM" tc.variables["ARROW_MIMALLOC"] = bool(self.options.with_mimalloc) tc.variables["ARROW_JSON"] = bool(self.options.with_json) @@ -428,13 +420,13 @@ def generate(self): tc.variables["ARROW_GCS"] = bool(self.options.get_safe("with_gcs", False)) tc.variables["BOOST_SOURCE"] = "SYSTEM" tc.variables["Protobuf_SOURCE"] = "SYSTEM" - if self._with_protobuf(): + if self.options.with_protobuf: tc.variables["ARROW_PROTOBUF_USE_SHARED"] = bool(self.dependencies["protobuf"].options.shared) tc.variables["gRPC_SOURCE"] = "SYSTEM" - if self._with_grpc(): + if self.options.with_grpc: tc.variables["ARROW_GRPC_USE_SHARED"] = bool(self.dependencies["grpc"].options.shared) - tc.variables["ARROW_USE_GLOG"] = self._with_glog() + tc.variables["ARROW_USE_GLOG"] = self.options.with_glog tc.variables["GLOG_SOURCE"] = "SYSTEM" tc.variables["ARROW_WITH_BACKTRACE"] = bool(self.options.with_backtrace) tc.variables["ARROW_WITH_BROTLI"] = bool(self.options.with_brotli) @@ -442,7 +434,7 @@ def generate(self): if self.options.with_brotli: tc.variables["ARROW_BROTLI_USE_SHARED"] = bool(self.dependencies["brotli"].options.shared) tc.variables["gflags_SOURCE"] = "SYSTEM" - if self._with_gflags(): + if self.options.with_gflags: tc.variables["ARROW_GFLAGS_USE_SHARED"] = bool(self.dependencies["gflags"].options.shared) tc.variables["ARROW_WITH_BZ2"] = bool(self.options.with_bz2) tc.variables["BZip2_SOURCE"] = "SYSTEM" @@ -471,16 +463,16 @@ def generate(self): if self.options.with_zstd: tc.variables["ARROW_ZSTD_USE_SHARED"] = bool(self.dependencies["zstd"].options.shared) tc.variables["ORC_SOURCE"] = "SYSTEM" - tc.variables["ARROW_WITH_THRIFT"] = self._with_thrift() + tc.variables["ARROW_WITH_THRIFT"] = bool(self.options.with_thrift) tc.variables["Thrift_SOURCE"] = "SYSTEM" - if self._with_thrift(): + if self.options.with_thrift: tc.variables["THRIFT_VERSION"] = bool(self.dependencies["thrift"].ref.version) # a recent thrift does not require boost tc.variables["ARROW_THRIFT_USE_SHARED"] = bool(self.dependencies["thrift"].options.shared) - tc.variables["ARROW_USE_OPENSSL"] = self._with_openssl() - if self._with_openssl(): + tc.variables["ARROW_USE_OPENSSL"] = self.options.with_openssl + if self.options.with_openssl: tc.variables["OPENSSL_ROOT_DIR"] = self.dependencies["openssl"].package_folder.replace("\\", "/") tc.variables["ARROW_OPENSSL_USE_SHARED"] = bool(self.dependencies["openssl"].options.shared) - if self._with_boost(): + if self.options.with_boost: tc.variables["ARROW_USE_BOOST"] = True tc.variables["ARROW_BOOST_USE_SHARED"] = bool(self.dependencies["boost"].options.shared) tc.variables["ARROW_S3"] = bool(self.options.with_s3) @@ -493,15 +485,15 @@ def generate(self): tc.variables["ARROW_ENABLE_TIMING_TESTS"] = False tc.variables["ARROW_BUILD_BENCHMARKS"] = False tc.variables["LLVM_SOURCE"] = "SYSTEM" - tc.variables["ARROW_WITH_UTF8PROC"] = self._with_utf8proc() - tc.variables["ARROW_BOOST_REQUIRED"] = self._with_boost() + tc.variables["ARROW_WITH_UTF8PROC"] = self.options.with_utf8proc + tc.variables["ARROW_BOOST_REQUIRED"] = self.options.with_boost tc.variables["utf8proc_SOURCE"] = "SYSTEM" - if self._with_utf8proc(): + if self.options.with_utf8proc: tc.variables["ARROW_UTF8PROC_USE_SHARED"] = bool(self.dependencies["utf8proc"].options.shared) tc.variables["BUILD_WARNING_LEVEL"] = "PRODUCTION" if is_msvc(self): tc.variables["ARROW_USE_STATIC_CRT"] = is_msvc_static_runtime(self) - if self._with_llvm(): + if self.options.with_llvm: tc.variables["LLVM_DIR"] = self.dependencies["llvm-core"].package_folder.replace("\\", "/") tc.generate() @@ -559,7 +551,7 @@ def package_info(self): if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["libarrow"].system_libs = ["pthread", "m", "dl", "rt"] - if self._parquet(): + if self.options.parquet: self.cpp_info.components["libparquet"].set_property("pkg_config_name", "parquet") self.cpp_info.components["libparquet"].libs = [f"parquet{suffix}"] self.cpp_info.components["libparquet"].requires = ["libarrow"] @@ -588,7 +580,7 @@ def package_info(self): if not self.options.shared: self.cpp_info.components["libgandiva"].defines = ["GANDIVA_STATIC"] - if self._with_flight_rpc(): + if self.options.with_flight_rpc: self.cpp_info.components["libarrow_flight"].set_property("pkg_config_name", "flight_rpc") self.cpp_info.components["libarrow_flight"].libs = [f"arrow_flight{suffix}"] self.cpp_info.components["libarrow_flight"].requires = ["libarrow"] @@ -598,54 +590,54 @@ def package_info(self): self.cpp_info.components["libarrow_flight_sql"].libs = [f"arrow_flight_sql{suffix}"] self.cpp_info.components["libarrow_flight_sql"].requires = ["libarrow", "libarrow_flight"] - if self._dataset_modules(): + if self.options.dataset_modules: self.cpp_info.components["dataset"].libs = ["arrow_dataset"] - if self._parquet(): + if self.options.parquet: self.cpp_info.components["dataset"].requires = ["libparquet"] - if self.options.cli and (self.options.with_cuda or self._with_flight_rpc() or self._parquet()): + if self.options.cli and (self.options.with_cuda or self.options.with_flight_rpc or self.options.parquet): binpath = os.path.join(self.package_folder, "bin") self.output.info(f"Appending PATH env var: {binpath}") self.env_info.PATH.append(binpath) - if self._with_boost(): + if self.options.with_boost: if self.options.gandiva: # FIXME: only filesystem component is used self.cpp_info.components["libgandiva"].requires.append("boost::boost") - if self._parquet() and self.settings.compiler == "gcc" and self.settings.compiler.version < Version("4.9"): + if self.options.parquet and self.settings.compiler == "gcc" and self.settings.compiler.version < Version("4.9"): self.cpp_info.components["libparquet"].requires.append("boost::boost") if Version(self.version) >= "2.0": # FIXME: only headers components is used self.cpp_info.components["libarrow"].requires.append("boost::boost") - if self._with_openssl(): + if self.options.with_openssl: self.cpp_info.components["libarrow"].requires.append("openssl::openssl") - if self._with_gflags(): + if self.options.with_gflags: self.cpp_info.components["libarrow"].requires.append("gflags::gflags") - if self._with_glog(): + if self.options.with_glog: self.cpp_info.components["libarrow"].requires.append("glog::glog") - if self._with_jemalloc(): + if self.options.with_jemalloc: self.cpp_info.components["libarrow"].requires.append("jemalloc::jemalloc") if self.options.with_mimalloc: self.cpp_info.components["libarrow"].requires.append("mimalloc::mimalloc") - if self._with_re2(): + if self.options.with_re2: if self.options.gandiva: self.cpp_info.components["libgandiva"].requires.append("re2::re2") - if self._parquet(): + if self.options.parquet: self.cpp_info.components["libparquet"].requires.append("re2::re2") self.cpp_info.components["libarrow"].requires.append("re2::re2") - if self._with_llvm(): + if self.options.with_llvm: self.cpp_info.components["libgandiva"].requires.append("llvm-core::llvm-core") - if self._with_protobuf(): + if self.options.with_protobuf: self.cpp_info.components["libarrow"].requires.append("protobuf::protobuf") - if self._with_utf8proc(): + if self.options.with_utf8proc: self.cpp_info.components["libarrow"].requires.append("utf8proc::utf8proc") - if self._with_thrift(): + if self.options.with_thrift: self.cpp_info.components["libarrow"].requires.append("thrift::thrift") if self.options.with_backtrace: self.cpp_info.components["libarrow"].requires.append("libbacktrace::libbacktrace") if self.options.with_cuda: self.cpp_info.components["libarrow"].requires.append("cuda::cuda") - if self._with_rapidjson(): + if self._requires_rapidjson(): self.cpp_info.components["libarrow"].requires.append("rapidjson::rapidjson") if self.options.with_s3: self.cpp_info.components["libarrow"].requires.append("aws-sdk-cpp::s3") @@ -669,11 +661,11 @@ def package_info(self): self.cpp_info.components["libarrow"].requires.append("zlib::zlib") if self.options.with_zstd: self.cpp_info.components["libarrow"].requires.append("zstd::zstd") - if self._with_boost(): + if self.options.with_boost: self.cpp_info.components["libarrow"].requires.append("boost::boost") - if self._with_grpc(): + if self.options.with_grpc: self.cpp_info.components["libarrow"].requires.append("grpc::grpc") - if self._with_flight_rpc(): + if self.options.with_flight_rpc: self.cpp_info.components["libarrow_flight"].requires.append("protobuf::protobuf") # TODO: to remove in conan v2 @@ -681,7 +673,7 @@ def package_info(self): self.cpp_info.filenames["cmake_find_package_multi"] = "Arrow" self.cpp_info.components["libarrow"].names["cmake_find_package"] = "arrow" self.cpp_info.components["libarrow"].names["cmake_find_package_multi"] = "arrow" - if self._parquet(): + if self.options.parquet: self.cpp_info.components["libparquet"].names["cmake_find_package"] = "parquet" self.cpp_info.components["libparquet"].names["cmake_find_package_multi"] = "parquet" if self.options.get_safe("substrait"): @@ -690,11 +682,11 @@ def package_info(self): if self.options.gandiva: self.cpp_info.components["libgandiva"].names["cmake_find_package"] = "gandiva" self.cpp_info.components["libgandiva"].names["cmake_find_package_multi"] = "gandiva" - if self._with_flight_rpc(): + if self.options.with_flight_rpc: self.cpp_info.components["libarrow_flight"].names["cmake_find_package"] = "flight_rpc" self.cpp_info.components["libarrow_flight"].names["cmake_find_package_multi"] = "flight_rpc" if self.options.get_safe("with_flight_sql"): self.cpp_info.components["libarrow_flight_sql"].names["cmake_find_package"] = "flight_sql" self.cpp_info.components["libarrow_flight_sql"].names["cmake_find_package_multi"] = "flight_sql" - if self.options.cli and (self.options.with_cuda or self._with_flight_rpc() or self._parquet()): + if self.options.cli and (self.options.with_cuda or self.options.with_flight_rpc or self.options.parquet): self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) diff --git a/recipes/arrow/config.yml b/recipes/arrow/config.yml index 06c575d489c3c..b6c86580b3492 100644 --- a/recipes/arrow/config.yml +++ b/recipes/arrow/config.yml @@ -1,4 +1,6 @@ versions: + "12.0.1": + folder: all "12.0.0": folder: all "11.0.0": From 1cd0a41952b3197b7cf00be2dd6733d94d48153f Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 26 Aug 2023 08:50:16 +0900 Subject: [PATCH 415/637] (#19422) simple-yaml: update dependencies --- recipes/simple-yaml/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/simple-yaml/all/conanfile.py b/recipes/simple-yaml/all/conanfile.py index 9573f235455af..afb2abee08c4c 100644 --- a/recipes/simple-yaml/all/conanfile.py +++ b/recipes/simple-yaml/all/conanfile.py @@ -47,10 +47,10 @@ def layout(self): def requirements(self): self.requires("pretty-name/1.0.0") - self.requires("yaml-cpp/0.7.0") + self.requires("yaml-cpp/0.8.0") self.requires("source_location/0.2.1") if self.options.enable_enum: - self.requires("magic_enum/0.7.3") + self.requires("magic_enum/0.9.3") def package_id(self): self.info.clear() From dd9babe8e5133e61da59d1135c8f49990fa9f93e Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 26 Aug 2023 12:49:00 +0900 Subject: [PATCH 416/637] (#19425) serdepp: update dependencies --- recipes/serdepp/all/conanfile.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/recipes/serdepp/all/conanfile.py b/recipes/serdepp/all/conanfile.py index 3a9cae70272de..db1294b2b4673 100644 --- a/recipes/serdepp/all/conanfile.py +++ b/recipes/serdepp/all/conanfile.py @@ -53,18 +53,18 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("nameof/0.10.1") - self.requires("magic_enum/0.7.3") + self.requires("nameof/0.10.3") + self.requires("magic_enum/0.9.3") if self.options.with_toml11: - self.requires("toml11/3.7.0") + self.requires("toml11/3.7.1") if self.options.with_yamlcpp: - self.requires("yaml-cpp/0.7.0") + self.requires("yaml-cpp/0.8.0") if self.options.with_rapidjson: self.requires("rapidjson/1.1.0") if self.options.with_fmt: - self.requires("fmt/8.1.1") + self.requires("fmt/10.1.0") if self.options.with_nlohmann_json: - self.requires("nlohmann_json/3.10.5") + self.requires("nlohmann_json/3.11.2") def package_id(self): self.info.clear() From ae698505364ceaf2c6c95af963040d6c80fd65da Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 26 Aug 2023 13:30:34 +0900 Subject: [PATCH 417/637] (#19424) s2n: add version 1.3.50 --- recipes/s2n/all/conandata.yml | 3 +++ recipes/s2n/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/s2n/all/conandata.yml b/recipes/s2n/all/conandata.yml index 26760a8527f22..4ada91d8a20e6 100644 --- a/recipes/s2n/all/conandata.yml +++ b/recipes/s2n/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.50": + url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.3.50.tar.gz" + sha256: "19c9a7e9e0ce14aae3fc0c55995759f4eadd5b55f5353de69f82c62ccb3693f8" "1.3.49": url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.3.49.tar.gz" sha256: "2bc7b170a750a435ad02ab8e696c3ad6e9bb7a585c02899472793f87670184dd" diff --git a/recipes/s2n/config.yml b/recipes/s2n/config.yml index 7c0e248cb28f0..e02cebf4f0c06 100644 --- a/recipes/s2n/config.yml +++ b/recipes/s2n/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.50": + folder: all "1.3.49": folder: all "1.3.31": From c8ed1c2b5c5524fd04a22ef3a4987c2343808c8b Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 26 Aug 2023 10:46:30 +0300 Subject: [PATCH 418/637] (#18717) rectanglebinpack: migrate to Conan v2, correct license * rectanglebinpack: migrate to Conan v2 * rectanglebinpack: restore VirtualRunEnv in test_package * Make license more specific Co-authored-by: Uilian Ries --------- Co-authored-by: Uilian Ries --- recipes/rectanglebinpack/all/CMakeLists.txt | 9 -- recipes/rectanglebinpack/all/conandata.yml | 3 - recipes/rectanglebinpack/all/conanfile.py | 89 +++++++++++-------- .../all/test_package/CMakeLists.txt | 9 +- .../all/test_package/conanfile.py | 21 +++-- .../all/test_package/test_package.cpp | 55 ++++++------ .../all/test_v1_package/CMakeLists.txt | 8 ++ .../all/test_v1_package/conanfile.py | 17 ++++ 8 files changed, 121 insertions(+), 90 deletions(-) delete mode 100644 recipes/rectanglebinpack/all/CMakeLists.txt create mode 100644 recipes/rectanglebinpack/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/rectanglebinpack/all/test_v1_package/conanfile.py diff --git a/recipes/rectanglebinpack/all/CMakeLists.txt b/recipes/rectanglebinpack/all/CMakeLists.txt deleted file mode 100644 index eab353d687736..0000000000000 --- a/recipes/rectanglebinpack/all/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - -add_subdirectory("source_subfolder") diff --git a/recipes/rectanglebinpack/all/conandata.yml b/recipes/rectanglebinpack/all/conandata.yml index 076654555cbc6..e93b6ba1b6012 100644 --- a/recipes/rectanglebinpack/all/conandata.yml +++ b/recipes/rectanglebinpack/all/conandata.yml @@ -2,9 +2,6 @@ sources: "cci.20210901": - url: "https://github.com/juj/RectangleBinPack/archive/a40fcaf3871da57b0f6a080655b3387374840877.zip" sha256: "88cec105ca8d90d09e9e81f9862caa0cc1cdb851560fb701555eb58b29515748" - - url: "https://unlicense.org/UNLICENSE" - sha256: "7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c" patches: "cci.20210901": - patch_file: "patches/0001_fix_win32_build.patch" - base_path: "source_subfolder" diff --git a/recipes/rectanglebinpack/all/conanfile.py b/recipes/rectanglebinpack/all/conanfile.py index c7332f9531164..f77182eff1815 100644 --- a/recipes/rectanglebinpack/all/conanfile.py +++ b/recipes/rectanglebinpack/all/conanfile.py @@ -1,19 +1,23 @@ -from conans import ConanFile, CMake, tools import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, load, save + +required_conan_version = ">=1.53.0" class RectangleBinPackConan(ConanFile): name = "rectanglebinpack" - license = "Unlicense" + description = "The code can be used to solve the problem of packing a set of 2D rectangles into a larger bin." + license = "LicenseRef-rectanglebinpack-public-domain" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/juj/RectangleBinPack" - description = "The code can be used to solve the problem of packing a set of 2D rectangles into a larger bin." topics = ("rectangle", "packing", "bin") - exports_sources = ["CMakeLists.txt", "patches/**"] - generators = "cmake" - settings = "os", "compiler", "build_type", "arch" + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -23,15 +27,8 @@ class RectangleBinPackConan(ConanFile): "fPIC": True, } - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -39,40 +36,58 @@ def config_options(self): 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 validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 11) + check_min_cppstd(self, 11) def source(self): - tools.get(**self.conan_data["sources"][self.version][0], - strip_root=True, destination=self._source_subfolder) - tools.download(filename="LICENSE", **self.conan_data["sources"][self.version][1]) + get(self, **self.conan_data["sources"][self.version][0], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = self.options.shared + tc.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + def _extract_license(self): + readme_content = load(self, os.path.join(self.source_folder, "Readme.txt"), encoding="latin-1") + license_content = "\n".join(readme_content.splitlines()[-4:]) + save(self, os.path.join(self.package_folder, "licenses", "LICENSE"), license_content) def package(self): - self.copy("LICENSE", dst="licenses") - self.copy("*.h", dst=os.path.join("include", self.name), src=self._source_subfolder, excludes="old/**") - self.copy("*.dll", dst="bin", keep_path=False) - self.copy("*.lib", dst="lib", keep_path=False) - self.copy("*.so", dst="lib", keep_path=False) - self.copy("*.dylib", dst="lib", keep_path=False) - self.copy("*.a", dst="lib", keep_path=False) + self._extract_license() + copy(self, "*.h", + dst=os.path.join(self.package_folder, "include", self.name), + src=self.source_folder, + excludes="old/**") + copy(self, "*.dll", + dst=os.path.join(self.package_folder, "bin"), + src=self.build_folder, + keep_path=False) + for pattern in ["*.lib", "*.so", "*.dylib", "*.a"]: + copy(self, pattern, + dst=os.path.join(self.package_folder, "lib"), + src=self.build_folder, + keep_path=False) def package_info(self): self.cpp_info.libs = ["RectangleBinPack"] + self.cpp_info.set_property("cmake_file_name", "RectangleBinPack") + self.cpp_info.set_property("cmake_target_name", "RectangleBinPack::RectangleBinPack") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m"] + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.names["cmake_find_package"] = "RectangleBinPack" self.cpp_info.names["cmake_find_package_multi"] = "RectangleBinPack" diff --git a/recipes/rectanglebinpack/all/test_package/CMakeLists.txt b/recipes/rectanglebinpack/all/test_package/CMakeLists.txt index 2d0f2eeb0d746..4147475a867bb 100644 --- a/recipes/rectanglebinpack/all/test_package/CMakeLists.txt +++ b/recipes/rectanglebinpack/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.4) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(RectangleBinPack REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE RectangleBinPack::RectangleBinPack) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/rectanglebinpack/all/test_package/conanfile.py b/recipes/rectanglebinpack/all/test_package/conanfile.py index 16ec9f68ef974..ef5d7042163ec 100644 --- a/recipes/rectanglebinpack/all/test_package/conanfile.py +++ b/recipes/rectanglebinpack/all/test_package/conanfile.py @@ -1,10 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -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/rectanglebinpack/all/test_package/test_package.cpp b/recipes/rectanglebinpack/all/test_package/test_package.cpp index b5c67148547b0..7a8bca93d7839 100644 --- a/recipes/rectanglebinpack/all/test_package/test_package.cpp +++ b/recipes/rectanglebinpack/all/test_package/test_package.cpp @@ -5,43 +5,38 @@ #include #include -#include #include +#include using namespace rbp; -bool AreDisjoint(const Rect &a, const Rect &b) -{ - return a.x >= b.x + b.width || a.x + a.width <= b.x || - a.y >= b.y + b.height || a.y + a.height <= b.y; +bool AreDisjoint(const Rect &a, const Rect &b) { + return a.x >= b.x + b.width || a.x + a.width <= b.x || a.y >= b.y + b.height || + a.y + a.height <= b.y; } -bool AllRectsDisjoint(std::vector &packed) -{ - for(size_t i = 0; i < packed.size(); ++i) - for(size_t j = i+1; j < packed.size(); ++j) - { - if (!AreDisjoint(packed[i], packed[j])) - return false; - } - return true; +bool AllRectsDisjoint(std::vector &packed) { + for (size_t i = 0; i < packed.size(); ++i) + for (size_t j = i + 1; j < packed.size(); ++j) { + if (!AreDisjoint(packed[i], packed[j])) + return false; + } + return true; } -int main() -{ - MaxRectsBinPack pack(256, 256, true); +int main() { + MaxRectsBinPack pack(256, 256, true); - std::vector packed; - srand(12412); - for(int i = 1; i < 128; ++i) - { - int a = (rand() % 128) + 1; - int b = (rand() % 128) + 1; - Rect r = pack.Insert(a, b, MaxRectsBinPack::RectBestShortSideFit); - if (!r.width) - break; - packed.push_back(r); - } - printf("Packed %d rectangles. All rects disjoint: %s. Occupancy: %f\n", - (int)packed.size(), AllRectsDisjoint(packed) ? "yes" : "NO!", pack.Occupancy()); + std::vector packed; + srand(12412); + for (int i = 1; i < 128; ++i) { + int a = (rand() % 128) + 1; + int b = (rand() % 128) + 1; + Rect r = pack.Insert(a, b, MaxRectsBinPack::RectBestShortSideFit); + if (!r.width) + break; + packed.push_back(r); + } + printf("Packed %d rectangles. All rects disjoint: %s. Occupancy: %f\n", (int)packed.size(), + AllRectsDisjoint(packed) ? "yes" : "NO!", pack.Occupancy()); } diff --git a/recipes/rectanglebinpack/all/test_v1_package/CMakeLists.txt b/recipes/rectanglebinpack/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/rectanglebinpack/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/rectanglebinpack/all/test_v1_package/conanfile.py b/recipes/rectanglebinpack/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..90eb89e3f2f46 --- /dev/null +++ b/recipes/rectanglebinpack/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 923fae70e06055ebd2a1724adb48e06ed9eb080a Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Sat, 26 Aug 2023 11:02:07 +0200 Subject: [PATCH 419/637] (#19420) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index ff746e7be2df1..2a4a0fc59737a 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -61,6 +61,7 @@ required_for_references: - aws-c-http - aws-c-io - aws-c-mqtt +- aws-c-s3 - aws-c-sdkutils - aws-checksums - aws-kvs-pic @@ -958,6 +959,7 @@ required_for_references: - robin-hood-hashing - rpclib - rply +- rsync - rtklib - rtm - rtmidi From 181e238807021704d2f7df56f99f4b81ca7d8a80 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Sat, 26 Aug 2023 12:13:05 +0200 Subject: [PATCH 420/637] (#19427) onnx: add version 1.14.1 --- recipes/onnx/all/conandata.yml | 3 +++ recipes/onnx/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/onnx/all/conandata.yml b/recipes/onnx/all/conandata.yml index 7a261fa84daf5..5f05c1310659a 100644 --- a/recipes/onnx/all/conandata.yml +++ b/recipes/onnx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.14.1": + url: "https://github.com/onnx/onnx/archive/v1.14.1.tar.gz" + sha256: "e296f8867951fa6e71417a18f2e550a730550f8829bd35e947b4df5e3e777aa1" "1.14.0": url: "https://github.com/onnx/onnx/archive/v1.14.0.tar.gz" sha256: "1b02ad523f79d83f9678c749d5a3f63f0bcd0934550d5e0d7b895f9a29320003" diff --git a/recipes/onnx/config.yml b/recipes/onnx/config.yml index 553b17a4b40e9..cfdc9b9959f82 100644 --- a/recipes/onnx/config.yml +++ b/recipes/onnx/config.yml @@ -1,4 +1,6 @@ versions: + "1.14.1": + folder: all "1.14.0": folder: all "1.13.1": From 66f230451e6430f10a4af43243cf06b0e9fa5c11 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 26 Aug 2023 13:49:56 +0300 Subject: [PATCH 421/637] (#18926) hdf4: migrate to Conan v2 * hdf4: migrate to Conan v2 * hdf4: fix missing link_libraries() * hdf4: bump deps * hdf4: add Linux system libs --- recipes/hdf4/all/CMakeLists.txt | 7 - recipes/hdf4/all/conandata.yml | 2 - recipes/hdf4/all/conanfile.py | 158 ++++++++++-------- recipes/hdf4/all/test_package/CMakeLists.txt | 13 +- recipes/hdf4/all/test_package/conanfile.py | 26 ++- recipes/hdf4/all/test_package/test_package.c | 10 +- .../hdf4/all/test_v1_package/CMakeLists.txt | 8 + recipes/hdf4/all/test_v1_package/conanfile.py | 24 +++ 8 files changed, 146 insertions(+), 102 deletions(-) delete mode 100644 recipes/hdf4/all/CMakeLists.txt create mode 100644 recipes/hdf4/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/hdf4/all/test_v1_package/conanfile.py diff --git a/recipes/hdf4/all/CMakeLists.txt b/recipes/hdf4/all/CMakeLists.txt deleted file mode 100644 index 217b9530b904d..0000000000000 --- a/recipes/hdf4/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8.11) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/hdf4/all/conandata.yml b/recipes/hdf4/all/conandata.yml index c28edc581baba..b74cc986517d2 100644 --- a/recipes/hdf4/all/conandata.yml +++ b/recipes/hdf4/all/conandata.yml @@ -5,6 +5,4 @@ sources: patches: "4.2.15": - patch_file: "patches/fix-export-macro.patch" - base_path: "source_subfolder" - patch_file: "patches/fix-missing-unistd-include.patch" - base_path: "source_subfolder" diff --git a/recipes/hdf4/all/conanfile.py b/recipes/hdf4/all/conanfile.py index 6e61dd7455655..f3f6af54d2d43 100644 --- a/recipes/hdf4/all/conanfile.py +++ b/recipes/hdf4/all/conanfile.py @@ -1,20 +1,22 @@ +import os + from conan import ConanFile from conan.tools.build import cross_building -from conan.tools.files import get, rmdir -from conans import CMake, tools -import os +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save -required_conan_version = ">=1.33.0" +required_conan_version = ">=1.53.0" class Hdf4Conan(ConanFile): name = "hdf4" description = "HDF4 is a data model, library, and file format for storing and managing data." license = "BSD-3-Clause" - topics = ("conan", "hdf4", "hdf", "data") - homepage = "https://portal.hdfgroup.org/display/HDF4/HDF4" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://portal.hdfgroup.org/display/HDF4/HDF4" + topics = ("hdf", "data") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -31,17 +33,8 @@ class Hdf4Conan(ConanFile): "szip_encoding": False, } - exports_sources = ["CMakeLists.txt", "patches/**"] - generators = "cmake", "cmake_find_package" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -49,16 +42,19 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") if not bool(self.options.szip_support): del self.options.szip_encoding + def layout(self): + cmake_layout(self, src_folder="src") + def requirements(self): self.requires("zlib/1.2.13") if self.options.jpegturbo: - self.requires("libjpeg-turbo/2.1.5") + self.requires("libjpeg-turbo/3.0.0") else: self.requires("libjpeg/9e") if self.options.szip_support == "with_libaec": @@ -67,78 +63,108 @@ def requirements(self): self.requires("szip/2.1.1") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["HDF4_EXTERNALLY_CONFIGURED"] = True + tc.cache_variables["HDF4_EXTERNAL_LIB_PREFIX"] = "" + tc.cache_variables["HDF4_NO_PACKAGES"] = True + tc.cache_variables["ONLY_SHARED_LIBS"] = self.options.shared + tc.cache_variables["HDF4_ENABLE_COVERAGE"] = False + tc.cache_variables["HDF4_ENABLE_DEPRECATED_SYMBOLS"] = True + tc.cache_variables["HDF4_ENABLE_JPEG_LIB_SUPPORT"] = True # HDF can't compile without libjpeg or libjpeg-turbo + tc.cache_variables["HDF4_ENABLE_Z_LIB_SUPPORT"] = True # HDF can't compile without zlib + tc.cache_variables["HDF4_ENABLE_SZIP_SUPPORT"] = bool(self.options.szip_support) + tc.cache_variables["HDF4_ENABLE_SZIP_ENCODING"] = self.options.get_safe("szip_encoding") or False + tc.cache_variables["HDF4_PACKAGE_EXTLIBS"] = False + tc.cache_variables["HDF4_BUILD_XDR_LIB"] = True + tc.cache_variables["BUILD_TESTING"] = False + tc.cache_variables["HDF4_INSTALL_INCLUDE_DIR"] = os.path.join(self.package_folder, "include", "hdf4").replace("\\", "/") + tc.cache_variables["HDF4_BUILD_FORTRAN"] = False + tc.cache_variables["HDF4_BUILD_UTILS"] = False + tc.cache_variables["HDF4_BUILD_TOOLS"] = False + tc.cache_variables["HDF4_BUILD_EXAMPLES"] = False + tc.cache_variables["HDF4_BUILD_JAVA"] = False + if cross_building(self): + tc.cache_variables["H4_PRINTF_LL_TEST_RUN"] = "0" + tc.cache_variables["H4_PRINTF_LL_TEST_RUN__TRYRUN_OUTPUT"] = "" + tc.generate() + + deps = CMakeDeps(self) + if self.options.szip_support == "with_szip": + deps.set_property("szip", "cmake_file_name", "SZIP") + deps.set_property("szip", "cmake_target_name", "SZIP::SZIP") + elif self.options.szip_support == "with_libaec": + deps.set_property("libaec", "cmake_file_name", "SZIP") + deps.set_property("libaec", "cmake_target_name", "SZIP::SZIP") + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + libs = ["JPEG::JPEG", "ZLIB::ZLIB"] + if self.options.szip_support: + libs.append("SZIP::SZIP") + save(self, os.path.join(self.source_folder, "CMakeFilters.cmake"), + "\nlink_libraries({})".format(" ".join(libs)), append=True) def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + self._patch_sources() + cmake = CMake(self) + cmake.configure() cmake.build() - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["HDF4_EXTERNALLY_CONFIGURED"] = True - self._cmake.definitions["HDF4_EXTERNAL_LIB_PREFIX"] = "" - self._cmake.definitions["HDF4_NO_PACKAGES"] = True - self._cmake.definitions["ONLY_SHARED_LIBS"] = self.options.shared - self._cmake.definitions["HDF4_ENABLE_COVERAGE"] = False - self._cmake.definitions["HDF4_ENABLE_DEPRECATED_SYMBOLS"] = True - self._cmake.definitions["HDF4_ENABLE_JPEG_LIB_SUPPORT"] = True # HDF can't compile without libjpeg or libjpeg-turbo - self._cmake.definitions["HDF4_ENABLE_Z_LIB_SUPPORT"] = True # HDF can't compile without zlib - self._cmake.definitions["HDF4_ENABLE_SZIP_SUPPORT"] = bool(self.options.szip_support) - self._cmake.definitions["HDF4_ENABLE_SZIP_ENCODING"] = self.options.get_safe("szip_encoding") or False - self._cmake.definitions["HDF4_PACKAGE_EXTLIBS"] = False - self._cmake.definitions["HDF4_BUILD_XDR_LIB"] = True - self._cmake.definitions["BUILD_TESTING"] = False - self._cmake.definitions["HDF4_INSTALL_INCLUDE_DIR"] = os.path.join(self.package_folder, "include", "hdf4") - self._cmake.definitions["HDF4_BUILD_FORTRAN"] = False - self._cmake.definitions["HDF4_BUILD_UTILS"] = False - self._cmake.definitions["HDF4_BUILD_TOOLS"] = False - self._cmake.definitions["HDF4_BUILD_EXAMPLES"] = False - self._cmake.definitions["HDF4_BUILD_JAVA"] = False - if cross_building(self): - self._cmake.definitions["H4_PRINTF_LL_TEST_RUN"] = "0" - self._cmake.definitions["H4_PRINTF_LL_TEST_RUN__TRYRUN_OUTPUT"] = "" - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake - def package(self): - self.copy("COPYING", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) os.remove(os.path.join(self.package_folder, "lib", "libhdf4.settings")) + def _get_decorated_lib(self, name): + libname = name + if self.settings.os == "Windows" and self.settings.compiler != "gcc" and not self.options.shared: + libname = "lib" + libname + if self.settings.build_type == "Debug": + libname += "_D" if self.settings.os == "Windows" else "_debug" + return libname + def package_info(self): - self.cpp_info.names["pkg_config"] = "hdf" + self.cpp_info.set_property("pkg_config_name", "hdf") unofficial_includedir = os.path.join(self.package_folder, "include", "hdf4") + target_suffix = "shared" if self.options.shared else "static" + # xdr - xdr_cmake = "xdr-shared" if self.options.shared else "xdr-static" + xdr_cmake = f"xdr-{target_suffix}" + self.cpp_info.components["xdr"].set_property("cmake_target_name", f"hdf4::{xdr_cmake}") self.cpp_info.components["xdr"].names["cmake_find_package"] = xdr_cmake self.cpp_info.components["xdr"].names["cmake_find_package_multi"] = xdr_cmake self.cpp_info.components["xdr"].includedirs.append(unofficial_includedir) self.cpp_info.components["xdr"].libs = [self._get_decorated_lib("xdr")] if self.settings.os == "Windows": self.cpp_info.components["xdr"].system_libs.append("ws2_32") + # hdf - hdf_cmake = "hdf-shared" if self.options.shared else "hdf-static" + hdf_cmake = f"hdf-{target_suffix}" + self.cpp_info.components["hdf"].set_property("cmake_target_name", f"hdf4::{hdf_cmake}") self.cpp_info.components["hdf"].names["cmake_find_package"] = hdf_cmake self.cpp_info.components["hdf"].names["cmake_find_package_multi"] = hdf_cmake self.cpp_info.components["hdf"].includedirs.append(unofficial_includedir) self.cpp_info.components["hdf"].libs = [self._get_decorated_lib("hdf")] self.cpp_info.components["hdf"].requires = [ "zlib::zlib", - "libjpeg-turbo::libjpeg-turbo" if self.options.jpegturbo else "libjpeg::libjpeg" + "libjpeg-turbo::libjpeg-turbo" if self.options.jpegturbo else "libjpeg::libjpeg", ] if self.options.szip_support == "with_libaec": self.cpp_info.components["hdf"].requires.append("libaec::libaec") elif self.options.szip_support == "with_szip": self.cpp_info.components["hdf"].requires.append("szip::szip") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["hdf"].system_libs = ["m", "dl"] + # mfhdf - mfhdf_cmake = "mfhdf-shared" if self.options.shared else "mfhdf-static" + mfhdf_cmake = f"mfhdf-{target_suffix}" + self.cpp_info.components["mfhdf"].set_property("cmake_target_name", f"hdf4::{mfhdf_cmake}") self.cpp_info.components["mfhdf"].names["cmake_find_package"] = mfhdf_cmake self.cpp_info.components["mfhdf"].names["cmake_find_package_multi"] = mfhdf_cmake self.cpp_info.components["mfhdf"].includedirs.append(unofficial_includedir) @@ -149,11 +175,3 @@ def package_info(self): self.cpp_info.components["xdr"].defines.append("H4_BUILT_AS_DYNAMIC_LIB=1") self.cpp_info.components["hdf"].defines.append("H4_BUILT_AS_DYNAMIC_LIB=1") self.cpp_info.components["mfhdf"].defines.append("H4_BUILT_AS_DYNAMIC_LIB=1") - - def _get_decorated_lib(self, name): - libname = name - if self.settings.os == "Windows" and self.settings.compiler != "gcc" and not self.options.shared: - libname = "lib" + libname - if self.settings.build_type == "Debug": - libname += "_D" if self.settings.os == "Windows" else "_debug" - return libname diff --git a/recipes/hdf4/all/test_package/CMakeLists.txt b/recipes/hdf4/all/test_package/CMakeLists.txt index a6de4b1271021..546a9e09d090d 100644 --- a/recipes/hdf4/all/test_package/CMakeLists.txt +++ b/recipes/hdf4/all/test_package/CMakeLists.txt @@ -1,14 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(hdf4 REQUIRED) +find_package(hdf4 REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -if(TARGET hdf4::hdf-shared) - target_link_libraries(${PROJECT_NAME} hdf4::hdf-shared) -else() - target_link_libraries(${PROJECT_NAME} hdf4::hdf-static) -endif() +target_link_libraries(${PROJECT_NAME} hdf4::hdf4) diff --git a/recipes/hdf4/all/test_package/conanfile.py b/recipes/hdf4/all/test_package/conanfile.py index 612db2552bfca..7d51739a368b2 100644 --- a/recipes/hdf4/all/test_package/conanfile.py +++ b/recipes/hdf4/all/test_package/conanfile.py @@ -1,17 +1,27 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.apple import is_apple_os +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) def build_requirements(self): - if self.settings.os == "Macos" and self.settings.arch == "armv8": + if is_apple_os(self) and self.settings.arch == "armv8": # Attempting to use @rpath without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being # set. This could be because you are using a Mac OS X version less than 10.5 # or because CMake's platform configuration is corrupt. - self.build_requires("cmake/3.20.1") + self.tool_requires("cmake/[>=3.20]") + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -19,6 +29,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/hdf4/all/test_package/test_package.c b/recipes/hdf4/all/test_package/test_package.c index 4efcf0be4d7a7..2e268465bf9bd 100644 --- a/recipes/hdf4/all/test_package/test_package.c +++ b/recipes/hdf4/all/test_package/test_package.c @@ -49,12 +49,12 @@ int main() { file_desc_id = ANcreatef(an_id, AN_FILE_DESC); /* - * Write the annotation to the file description. + * Write the annotation to the file description. */ status_32 = ANwriteann(file_desc_id, FILE_DESC_TXT, (int32) strlen(FILE_DESC_TXT)); /* - * Create a vgroup in the V interface. Note that the vgroup's ref number + * Create a vgroup in the V interface. Note that the vgroup's ref number * is set to -1 for creating and the access mode is "w" for writing. */ status_n = Vstart(file_id); @@ -63,13 +63,13 @@ int main() { /* * Obtain the tag and ref number of the vgroup for subsequent - * references. + * references. */ vgroup_tag = (uint16) VQuerytag(vgroup_id); vgroup_ref = (uint16) VQueryref(vgroup_id); /* - * Create the data label for the vgroup identified by its tag + * Create the data label for the vgroup identified by its tag * and ref number. */ data_label_id = ANcreate(an_id, vgroup_tag, vgroup_ref, AN_DATA_LABEL); @@ -80,7 +80,7 @@ int main() { status_32 = ANwriteann(data_label_id, DATA_LABEL_TXT, (int32) strlen(DATA_LABEL_TXT)); /* - * Create the data description for the vgroup identified by its tag + * Create the data description for the vgroup identified by its tag * and ref number. */ data_desc_id = ANcreate(an_id, vgroup_tag, vgroup_ref, AN_DATA_DESC); diff --git a/recipes/hdf4/all/test_v1_package/CMakeLists.txt b/recipes/hdf4/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/hdf4/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/hdf4/all/test_v1_package/conanfile.py b/recipes/hdf4/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..2d700055b1faf --- /dev/null +++ b/recipes/hdf4/all/test_v1_package/conanfile.py @@ -0,0 +1,24 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build_requirements(self): + if self.settings.os == "Macos" and self.settings.arch == "armv8": + # Attempting to use @rpath without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being + # set. This could be because you are using a Mac OS X version less than 10.5 + # or because CMake's platform configuration is corrupt. + self.build_requires("cmake/[>=3.20]") + + def build(self): + 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) From 43bf55233b75b0c2e187eb671a10be0b078cb93e Mon Sep 17 00:00:00 2001 From: Klaus Holst Jacobsen <48069914+klausholstjacobsen@users.noreply.github.com> Date: Sat, 26 Aug 2023 13:30:43 +0200 Subject: [PATCH 422/637] (#19030) openpam/20190224: Added openpam recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * openpam: Added openpam recipe * Update recipes/openpam/all/conanfile.py Co-authored-by: Uilian Ries * Update recipes/openpam/all/test_package/test_package.c Co-authored-by: Uilian Ries * Update recipes/openpam/all/conandata.yml Co-authored-by: Uilian Ries * Update recipes/openpam/all/conanfile.py Co-authored-by: Uilian Ries * Update recipes/openpam/all/conanfile.py Co-authored-by: Uilian Ries * Update recipes/openpam/all/conanfile.py Co-authored-by: Uilian Ries * Update recipes/openpam/all/conanfile.py Co-authored-by: Uilian Ries * Fix GitHub commit suggestion dupe --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: Uilian Ries --- recipes/openpam/all/conandata.yml | 4 + recipes/openpam/all/conanfile.py | 73 +++++++++++++++++++ .../openpam/all/test_package/CMakeLists.txt | 7 ++ recipes/openpam/all/test_package/conanfile.py | 27 +++++++ .../openpam/all/test_package/test_package.c | 22 ++++++ recipes/openpam/config.yml | 3 + 6 files changed, 136 insertions(+) create mode 100644 recipes/openpam/all/conandata.yml create mode 100644 recipes/openpam/all/conanfile.py create mode 100644 recipes/openpam/all/test_package/CMakeLists.txt create mode 100644 recipes/openpam/all/test_package/conanfile.py create mode 100644 recipes/openpam/all/test_package/test_package.c create mode 100644 recipes/openpam/config.yml diff --git a/recipes/openpam/all/conandata.yml b/recipes/openpam/all/conandata.yml new file mode 100644 index 0000000000000..06219b641cc81 --- /dev/null +++ b/recipes/openpam/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "20190224": + url: "https://sourceforge.net/projects/openpam/files/openpam/Tabebuia/openpam-20190224.tar.gz" + sha256: "31f871f16b6868aef9c849f39aff6c52227977e09eee22b00fb8b7435ddf7105" diff --git a/recipes/openpam/all/conanfile.py b/recipes/openpam/all/conanfile.py new file mode 100644 index 0000000000000..b8d2328964b48 --- /dev/null +++ b/recipes/openpam/all/conanfile.py @@ -0,0 +1,73 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get, rmdir, rm +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout +import os + + +required_conan_version = ">=1.54.0" + +class PackageConan(ConanFile): + name = "openpam" + description = "OpenPAM library" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://openpam.org/" + topics = ("pam") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) + + if self.settings.os not in ["Linux", "FreeBSD", "Neutrino"]: + raise ConanInvalidConfiguration(f"{self.ref} is not supported on {self.settings.os}.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True, filename=f"openpam-{self.version}.tar.gz") + + def generate(self): + tc = AutotoolsToolchain(self) + tc.generate() + + def build(self): + autotools = Autotools(self) + autotools.configure() + autotools.make() + + def package(self): + autotools = Autotools(self) + autotools.install() + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"), ignore_case=True) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + + def package_info(self): + self.cpp_info.libs = ["pam"] + self.cpp_info.system_libs = ["dl"] diff --git a/recipes/openpam/all/test_package/CMakeLists.txt b/recipes/openpam/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..d03b89e820ddd --- /dev/null +++ b/recipes/openpam/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(openpam REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE openpam::openpam) diff --git a/recipes/openpam/all/test_package/conanfile.py b/recipes/openpam/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a808db45f245 --- /dev/null +++ b/recipes/openpam/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +# It will become the standard on Conan 2.x +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/openpam/all/test_package/test_package.c b/recipes/openpam/all/test_package/test_package.c new file mode 100644 index 0000000000000..50dff63a6c03a --- /dev/null +++ b/recipes/openpam/all/test_package/test_package.c @@ -0,0 +1,22 @@ +#include +#include +#include +#include +#include +#include + + +int main(void) { + pam_handle_t* pamh; + struct pam_conv pamc; + const char *user; + + int rv = pam_start("yes", user, &pamc, &pamh); + + if(rv == PAM_SUCCESS) { + pam_end(pamh, PAM_SUCCESS); + } + + return EXIT_SUCCESS; +} + diff --git a/recipes/openpam/config.yml b/recipes/openpam/config.yml new file mode 100644 index 0000000000000..1dd1dcdfcdd6f --- /dev/null +++ b/recipes/openpam/config.yml @@ -0,0 +1,3 @@ +versions: + "20190224": + folder: all From 5cd5c4483f79b327c24646129ad95e2cb1cbd3d2 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Sat, 26 Aug 2023 16:14:57 +0400 Subject: [PATCH 423/637] (#19352) opencl-clhpp-headers: align versions with opencl-headers --- recipes/opencl-clhpp-headers/all/conandata.yml | 18 ++++++++++++++++++ .../all/test_package/CMakeLists.txt | 4 ++++ .../all/test_package/test_package.cpp | 4 ++++ recipes/opencl-clhpp-headers/config.yml | 12 ++++++++++++ 4 files changed, 38 insertions(+) diff --git a/recipes/opencl-clhpp-headers/all/conandata.yml b/recipes/opencl-clhpp-headers/all/conandata.yml index e4e17b97c1724..8181b741f827c 100644 --- a/recipes/opencl-clhpp-headers/all/conandata.yml +++ b/recipes/opencl-clhpp-headers/all/conandata.yml @@ -11,3 +11,21 @@ sources: "2022.05.18": url: "https://github.com/KhronosGroup/OpenCL-CLHPP/archive/refs/tags/v2022.05.18.tar.gz" sha256: "d29affd740c5037b4499790613f5af0718ffc88c325e793b73cb35b7592fc0f7" + "2022.01.04": + url: "https://github.com/KhronosGroup/OpenCL-CLHPP/archive/refs/tags/v2.0.16.tar.gz" + sha256: "869456032e60787eed9fceaeaf6c6cb4452bc0ff97e0f5a271510145a1c8f4d4" + "2021.06.30": + url: "https://github.com/KhronosGroup/OpenCL-CLHPP/archive/refs/tags/v2.0.15.tar.gz" + sha256: "0175806508abc699586fc9a9387e01eb37bf812ca534e3b493ff3091ec2a9246" + "2021.04.29": + url: "https://github.com/KhronosGroup/OpenCL-CLHPP/archive/refs/tags/v2.0.14.tar.gz" + sha256: "c8821a7638e57a2c4052631c941af720b581edda634db6ab0b59924c958d69b6" + "2020.12.18": + url: "https://github.com/KhronosGroup/OpenCL-CLHPP/archive/refs/tags/v2.0.13.tar.gz" + sha256: "8ff0d0cd94d728edd30c876db546bf13e370ee7863629b4b9b5e2ef8e130d23c" + "2020.06.16": + url: "https://github.com/KhronosGroup/OpenCL-CLHPP/archive/refs/tags/v2.0.12.tar.gz" + sha256: "20b28709ce74d3602f1a946d78a2024c1f6b0ef51358b9686612669897a58719" + "2020.03.13": + url: "https://github.com/KhronosGroup/OpenCL-CLHPP/archive/refs/tags/v2.0.11.tar.gz" + sha256: "ffc2ca08cf4ae90ee55f14ea3735ccc388f454f4422b69498b2e9b93a1d45181" diff --git a/recipes/opencl-clhpp-headers/all/test_package/CMakeLists.txt b/recipes/opencl-clhpp-headers/all/test_package/CMakeLists.txt index 3a0c8417853f5..733d421e88716 100644 --- a/recipes/opencl-clhpp-headers/all/test_package/CMakeLists.txt +++ b/recipes/opencl-clhpp-headers/all/test_package/CMakeLists.txt @@ -8,3 +8,7 @@ find_package(OpenCLHeadersCpp REQUIRED CONFIG) add_library(${PROJECT_NAME} OBJECT test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE OpenCL::HeadersCpp) + +if(OpenCLHeadersCpp_VERSION VERSION_GREATER 2020.06.16) + target_compile_definitions(${PROJECT_NAME} PRIVATE USE_OPENCL_HPP) +endif() diff --git a/recipes/opencl-clhpp-headers/all/test_package/test_package.cpp b/recipes/opencl-clhpp-headers/all/test_package/test_package.cpp index 24cf50fffbbe2..a1e2c103aae1a 100644 --- a/recipes/opencl-clhpp-headers/all/test_package/test_package.cpp +++ b/recipes/opencl-clhpp-headers/all/test_package/test_package.cpp @@ -1,7 +1,11 @@ #define CL_HPP_MINIMUM_OPENCL_VERSION 120 #define CL_HPP_TARGET_OPENCL_VERSION 120 +#ifdef USE_OPENCL_HPP #include +#else +#include +#endif #include #include diff --git a/recipes/opencl-clhpp-headers/config.yml b/recipes/opencl-clhpp-headers/config.yml index 691c70a050912..2bf575fcc9451 100644 --- a/recipes/opencl-clhpp-headers/config.yml +++ b/recipes/opencl-clhpp-headers/config.yml @@ -7,3 +7,15 @@ versions: folder: all "2022.05.18": folder: all + "2022.01.04": + folder: all + "2021.06.30": + folder: all + "2021.04.29": + folder: all + "2020.12.18": + folder: all + "2020.06.16": + folder: all + "2020.03.13": + folder: all From 6859d07b802ca2bb983364ed3db0946f58a31147 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 26 Aug 2023 21:52:05 +0900 Subject: [PATCH 424/637] (#19404) libzip: add version 1.10.1, rearrange patch files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * libzip: add version 1.10.1, rearrange patch files * Fix yaml list syntax --------- Co-authored-by: Rubén Rincón Blanco --- recipes/libzip/all/conandata.yml | 60 ++++++++++++++----- recipes/libzip/all/conanfile.py | 38 +----------- .../patches/1.10.1-0002-remove-rpath.patch | 13 ++++ ... => 1.7.3-0001-cmake-install-bundle.patch} | 0 .../all/patches/1.7.3-0002-remove-rpath.patch | 13 ++++ .../all/patches/1.8.0-0002-remove-rpath.patch | 13 ++++ .../patches/1.8.0-0003-fix-zstd-name.patch | 33 ++++++++++ .../all/patches/1.9.2-0002-remove-rpath.patch | 13 ++++ .../patches/1.9.2-0003-fix-zstd-name.patch | 33 ++++++++++ recipes/libzip/config.yml | 2 + 10 files changed, 167 insertions(+), 51 deletions(-) create mode 100644 recipes/libzip/all/patches/1.10.1-0002-remove-rpath.patch rename recipes/libzip/all/patches/{0001-cmake-install-bundle.patch => 1.7.3-0001-cmake-install-bundle.patch} (100%) create mode 100644 recipes/libzip/all/patches/1.7.3-0002-remove-rpath.patch create mode 100644 recipes/libzip/all/patches/1.8.0-0002-remove-rpath.patch create mode 100644 recipes/libzip/all/patches/1.8.0-0003-fix-zstd-name.patch create mode 100644 recipes/libzip/all/patches/1.9.2-0002-remove-rpath.patch create mode 100644 recipes/libzip/all/patches/1.9.2-0003-fix-zstd-name.patch diff --git a/recipes/libzip/all/conandata.yml b/recipes/libzip/all/conandata.yml index 567f243d79a98..0dcb786c62874 100644 --- a/recipes/libzip/all/conandata.yml +++ b/recipes/libzip/all/conandata.yml @@ -1,26 +1,56 @@ sources: + "1.10.1": + url: + - "https://libzip.org/download/libzip-1.10.1.tar.gz" + - "https://github.com/nih-at/libzip/releases/download/v1.10.1/libzip-1.10.1.tar.gz" + sha256: "9669ae5dfe3ac5b3897536dc8466a874c8cf2c0e3b1fdd08d75b273884299363" "1.9.2": - url: [ - "https://libzip.org/download/libzip-1.9.2.tar.gz", - "https://github.com/nih-at/libzip/releases/download/v1.9.2/libzip-1.9.2.tar.gz", - ] + url: + - "https://libzip.org/download/libzip-1.9.2.tar.gz" + - "https://github.com/nih-at/libzip/releases/download/v1.9.2/libzip-1.9.2.tar.gz" sha256: "fd6a7f745de3d69cf5603edc9cb33d2890f0198e415255d0987a0cf10d824c6f" "1.8.0": - url: [ - "https://libzip.org/download/libzip-1.8.0.tar.gz", - "https://github.com/nih-at/libzip/releases/download/v1.8.0/libzip-1.8.0.tar.gz", - ] + url: + - "https://libzip.org/download/libzip-1.8.0.tar.gz" + - "https://github.com/nih-at/libzip/releases/download/v1.8.0/libzip-1.8.0.tar.gz" sha256: "30ee55868c0a698d3c600492f2bea4eb62c53849bcf696d21af5eb65f3f3839e" "1.7.3": - url: [ - "https://libzip.org/download/libzip-1.7.3.tar.gz", - "https://github.com/nih-at/libzip/releases/download/v1.7.3/libzip-1.7.3.tar.gz", - ] + url: + - "https://libzip.org/download/libzip-1.7.3.tar.gz" + - "https://github.com/nih-at/libzip/releases/download/v1.7.3/libzip-1.7.3.tar.gz" sha256: "0e2276c550c5a310d4ebf3a2c3dfc43fb3b4602a072ff625842ad4f3238cb9cc" patches: + "1.10.1": + - patch_file: "patches/1.7.3-0001-cmake-install-bundle.patch" + patch_description: "fix installation path of utilities" + patch_type: "conan" + - patch_file: "patches/1.10.1-0002-remove-rpath.patch" + patch_description: "remove rpath feature" + patch_type: "conan" "1.9.2": - - patch_file: "patches/0001-cmake-install-bundle.patch" + - patch_file: "patches/1.7.3-0001-cmake-install-bundle.patch" + patch_description: "fix installation path of utilities" + patch_type: "conan" + - patch_file: "patches/1.9.2-0002-remove-rpath.patch" + patch_description: "remove rpath feature" + patch_type: "conan" + - patch_file: "patches/1.9.2-0003-fix-zstd-name.patch" + patch_description: "fix zstd name" + patch_type: "portability" "1.8.0": - - patch_file: "patches/0001-cmake-install-bundle.patch" + - patch_file: "patches/1.7.3-0001-cmake-install-bundle.patch" + patch_description: "fix installation path of utilities" + patch_type: "conan" + - patch_file: "patches/1.8.0-0002-remove-rpath.patch" + patch_description: "remove rpath feature" + patch_type: "conan" + - patch_file: "patches/1.8.0-0003-fix-zstd-name.patch" + patch_description: "fix zstd name" + patch_type: "portability" "1.7.3": - - patch_file: "patches/0001-cmake-install-bundle.patch" + - patch_file: "patches/1.7.3-0001-cmake-install-bundle.patch" + patch_description: "fix installation path of utilities" + patch_type: "conan" + - patch_file: "patches/1.7.3-0002-remove-rpath.patch" + patch_description: "remove rpath feature" + patch_type: "conan" diff --git a/recipes/libzip/all/conanfile.py b/recipes/libzip/all/conanfile.py index 466b104bf29b9..ef5f90cd053cb 100644 --- a/recipes/libzip/all/conanfile.py +++ b/recipes/libzip/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.scm import Version import os @@ -105,42 +105,8 @@ def generate(self): deps = CMakeDeps(self) deps.generate() - def _patch_sources(self): - apply_conandata_patches(self) - - top_cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") - # Honor zstd enabled - if self._has_zstd_support: - def zstd_find_package_pattern(version): - if version >= "1.9.2": - return "find_package(Zstd 1.3.6)" - else: - return "find_package(Zstd)" - lib_cmakelists = os.path.join(self.source_folder, "lib", "CMakeLists.txt") - replace_in_file(self, top_cmakelists, zstd_find_package_pattern(Version(self.version)), "find_package(zstd)") - replace_in_file(self, top_cmakelists, "Zstd_FOUND", "zstd_FOUND") - replace_in_file( - self, - lib_cmakelists, - "Zstd::Zstd", - "$,zstd::libzstd_shared,zstd::libzstd_static>", - ) - # Do not pollute rpath of installed binaries - replace_in_file( - self, - top_cmakelists, - "set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})", - "", - ) - replace_in_file( - self, - top_cmakelists, - "set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)", - "", - ) - def build(self): - self._patch_sources() + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/libzip/all/patches/1.10.1-0002-remove-rpath.patch b/recipes/libzip/all/patches/1.10.1-0002-remove-rpath.patch new file mode 100644 index 0000000000000..6385883376739 --- /dev/null +++ b/recipes/libzip/all/patches/1.10.1-0002-remove-rpath.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b2e7724..d33fbd8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -285,7 +285,7 @@ if(WIN32) + endif(WIN32) + + # rpath handling: use rpath in installed binaries +-if(NOT CMAKE_SYSTEM_NAME MATCHES Linux) ++if(0) + set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + endif() diff --git a/recipes/libzip/all/patches/0001-cmake-install-bundle.patch b/recipes/libzip/all/patches/1.7.3-0001-cmake-install-bundle.patch similarity index 100% rename from recipes/libzip/all/patches/0001-cmake-install-bundle.patch rename to recipes/libzip/all/patches/1.7.3-0001-cmake-install-bundle.patch diff --git a/recipes/libzip/all/patches/1.7.3-0002-remove-rpath.patch b/recipes/libzip/all/patches/1.7.3-0002-remove-rpath.patch new file mode 100644 index 0000000000000..2682986aa602f --- /dev/null +++ b/recipes/libzip/all/patches/1.7.3-0002-remove-rpath.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 017f7cf..e9dd8d9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -237,7 +237,7 @@ if(WIN32) + endif(WIN32) + + # rpath handling: use rpath in installed binaries +-if(NOT CMAKE_SYSTEM_NAME MATCHES Linux) ++if(0) + set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + endif() diff --git a/recipes/libzip/all/patches/1.8.0-0002-remove-rpath.patch b/recipes/libzip/all/patches/1.8.0-0002-remove-rpath.patch new file mode 100644 index 0000000000000..511a8497170f9 --- /dev/null +++ b/recipes/libzip/all/patches/1.8.0-0002-remove-rpath.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 93b46a6..577865f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -237,7 +237,7 @@ if(WIN32) + endif(WIN32) + + # rpath handling: use rpath in installed binaries +-if(NOT CMAKE_SYSTEM_NAME MATCHES Linux) ++if(0) + set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + endif() diff --git a/recipes/libzip/all/patches/1.8.0-0003-fix-zstd-name.patch b/recipes/libzip/all/patches/1.8.0-0003-fix-zstd-name.patch new file mode 100644 index 0000000000000..d3a2faebb601a --- /dev/null +++ b/recipes/libzip/all/patches/1.8.0-0003-fix-zstd-name.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 93b46a6..577865f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -196,12 +196,12 @@ if(ENABLE_LZMA) + endif(ENABLE_LZMA) + + if(ENABLE_ZSTD) +- find_package(Zstd) +- if(Zstd_FOUND) ++ find_package(zstd) ++ if(zstd_FOUND) + set(HAVE_LIBZSTD 1) + else() + message(WARNING "-- zstd library not found; zstandard support disabled") +- endif(Zstd_FOUND) ++ endif(zstd_FOUND) + endif(ENABLE_ZSTD) + + if (COMMONCRYPTO_FOUND) +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 1069cec..c0148b9 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -148,7 +148,7 @@ endif() + + if(HAVE_LIBZSTD) + target_sources(zip PRIVATE zip_algorithm_zstd.c) +- target_link_libraries(zip PRIVATE Zstd::Zstd) ++ target_link_libraries(zip PRIVATE $,zstd::libzstd_shared,zstd::libzstd_static>) + endif() + + if(HAVE_COMMONCRYPTO) diff --git a/recipes/libzip/all/patches/1.9.2-0002-remove-rpath.patch b/recipes/libzip/all/patches/1.9.2-0002-remove-rpath.patch new file mode 100644 index 0000000000000..24aeef7d82680 --- /dev/null +++ b/recipes/libzip/all/patches/1.9.2-0002-remove-rpath.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d00a4f9..bc45784 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -238,7 +238,7 @@ if(WIN32) + endif(WIN32) + + # rpath handling: use rpath in installed binaries +-if(NOT CMAKE_SYSTEM_NAME MATCHES Linux) ++if(0) + set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + endif() diff --git a/recipes/libzip/all/patches/1.9.2-0003-fix-zstd-name.patch b/recipes/libzip/all/patches/1.9.2-0003-fix-zstd-name.patch new file mode 100644 index 0000000000000..bbc20c6fe9ebe --- /dev/null +++ b/recipes/libzip/all/patches/1.9.2-0003-fix-zstd-name.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d00a4f9..bc45784 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -197,12 +197,12 @@ if(ENABLE_LZMA) + endif(ENABLE_LZMA) + + if(ENABLE_ZSTD) +- find_package(Zstd 1.3.6) +- if(Zstd_FOUND) ++ find_package(zstd) ++ if(zstd_FOUND) + set(HAVE_LIBZSTD 1) + else() + message(WARNING "-- zstd library not found; zstandard support disabled") +- endif(Zstd_FOUND) ++ endif(zstd_FOUND) + endif(ENABLE_ZSTD) + + if (COMMONCRYPTO_FOUND) +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 1213fa0..b6446cb 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -147,7 +147,7 @@ endif() + + if(HAVE_LIBZSTD) + target_sources(zip PRIVATE zip_algorithm_zstd.c) +- target_link_libraries(zip PRIVATE Zstd::Zstd) ++ target_link_libraries(zip PRIVATE $,zstd::libzstd_shared,zstd::libzstd_static>) + endif() + + if(HAVE_COMMONCRYPTO) diff --git a/recipes/libzip/config.yml b/recipes/libzip/config.yml index 63ddbcf63ff11..614d36cf38cf3 100644 --- a/recipes/libzip/config.yml +++ b/recipes/libzip/config.yml @@ -1,4 +1,6 @@ versions: + "1.10.1": + folder: all "1.9.2": folder: all "1.8.0": From c8ba536460d7378d221a71753d124b94f5d4daea Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 26 Aug 2023 22:30:41 +0900 Subject: [PATCH 425/637] (#19192) spdlog: update fmt/10.1.0 * spdlog: update fmt/10.1.0 * update fmt for 1.12.0 only --- recipes/spdlog/all/conanfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/spdlog/all/conanfile.py b/recipes/spdlog/all/conanfile.py index 8b194e1f8f481..b24d1adfcb1ba 100644 --- a/recipes/spdlog/all/conanfile.py +++ b/recipes/spdlog/all/conanfile.py @@ -56,7 +56,9 @@ def requirements(self): self_version = Version(self.version) fmt_version = "7.1.3" - if self_version >= "1.11.0": + if self_version >= "1.12.0": + fmt_version = "10.1.0" + elif self_version >= "1.11.0": fmt_version = "10.0.0" elif self_version >= "1.10.0": fmt_version = "8.1.1" From 157bdb74954b6253a20e89bb99bad51425c3c41e Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 27 Aug 2023 01:34:52 +0900 Subject: [PATCH 426/637] (#19433) ada: add version 2.6.2 --- 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 97acb278526f5..c93cb42b88d24 100644 --- a/recipes/ada/all/conandata.yml +++ b/recipes/ada/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.6.2": + url: "https://github.com/ada-url/ada/archive/v2.6.2.tar.gz" + sha256: "425b8696a28a22d19ee7aa4516c26fc8ae3ab574870a9a74ef58ba8a345b822e" "2.6.0": url: "https://github.com/ada-url/ada/archive/v2.6.0.tar.gz" sha256: "09551bfbd92853e59d731e5f44a88a690425fd2906977ad03a6a1059615a02a5" diff --git a/recipes/ada/config.yml b/recipes/ada/config.yml index aa9794668e545..cecfcc53ea282 100644 --- a/recipes/ada/config.yml +++ b/recipes/ada/config.yml @@ -1,4 +1,6 @@ versions: + "2.6.2": + folder: all "2.6.0": folder: all "2.5.1": From 9af64bba64456ea4329203a3ee47d5477d3bad17 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 27 Aug 2023 02:13:02 +0900 Subject: [PATCH 427/637] (#19435) gegles-spdlog_setup: update fmt/10.1.0 --- recipes/gegles-spdlog_setup/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/gegles-spdlog_setup/all/conanfile.py b/recipes/gegles-spdlog_setup/all/conanfile.py index 7d53c34d32dd2..9385009e7bf43 100644 --- a/recipes/gegles-spdlog_setup/all/conanfile.py +++ b/recipes/gegles-spdlog_setup/all/conanfile.py @@ -40,7 +40,7 @@ def layout(self): def requirements(self): self.requires("cpptoml/0.1.1") self.requires("spdlog/1.12.0") - self.requires("fmt/10.0.0") + self.requires("fmt/10.1.0") def package_id(self): self.info.clear() From 511b65d069c6e781c23e266e32a6941adc749d34 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 27 Aug 2023 02:53:48 +0900 Subject: [PATCH 428/637] (#19436) seadex-essentials: update dependencies --- recipes/seadex-essentials/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/seadex-essentials/all/conanfile.py b/recipes/seadex-essentials/all/conanfile.py index a316b2670766b..118460968da91 100644 --- a/recipes/seadex-essentials/all/conanfile.py +++ b/recipes/seadex-essentials/all/conanfile.py @@ -51,9 +51,9 @@ def configure(self): def requirements(self): # Headers are exposed https://github.com/SeadexGmbH/essentials/blob/622a07dc1530f5668f5dde0ce18007d420c371cd/essentials/include/essentials/log/log_level.hpp#L15 - self.requires("spdlog/1.11.0", transitive_headers=True) + self.requires("spdlog/1.12.0", transitive_headers=True) # Exposes headers and symbols https://github.com/SeadexGmbH/essentials/blob/622a07dc1530f5668f5dde0ce18007d420c371cd/essentials/include/essentials/type_wrapper.hpp#L282 - self.requires("fmt/10.0.0", transitive_headers=True, transitive_libs=True) + self.requires("fmt/10.1.0", transitive_headers=True, transitive_libs=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 820f6c9c6d0a245b584e9e93ad565f2d005ae1fd Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 27 Aug 2023 03:31:50 +0900 Subject: [PATCH 429/637] (#19431) aws-c-io: update s2n/1.3.50 --- recipes/aws-c-io/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/aws-c-io/all/conanfile.py b/recipes/aws-c-io/all/conanfile.py index eaf12a0cfcd8d..73f6dfc98f678 100644 --- a/recipes/aws-c-io/all/conanfile.py +++ b/recipes/aws-c-io/all/conanfile.py @@ -53,7 +53,7 @@ def requirements(self): self.requires("aws-c-cal/0.6.1", transitive_headers=True) if self.settings.os in ["Linux", "FreeBSD", "Android"]: - self.requires("s2n/1.3.31") + self.requires("s2n/1.3.50") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 58a55c311329a4492a5a192b7069d7e4f910be8b Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 27 Aug 2023 13:31:30 +0900 Subject: [PATCH 430/637] (#19440) etl: add version 20.38.0 --- 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 048eb0ba5716e..aaf305dbf4ff2 100644 --- a/recipes/etl/all/conandata.yml +++ b/recipes/etl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "20.38.0": + url: "https://github.com/ETLCPP/etl/archive/20.38.0.tar.gz" + sha256: "7e29ce81a2a2d5826286502a2ad5bde1f4b591d2c9e0ef7ccc335e75445223cd" "20.37.3": url: "https://github.com/ETLCPP/etl/archive/20.37.3.tar.gz" sha256: "fbdf60c770772cd96d1eb25bdf56e4f45f23bf4029e18ef1f2af1f2056b9ea41" diff --git a/recipes/etl/config.yml b/recipes/etl/config.yml index aa2b1c54bb8bd..f57d0b4090ca8 100644 --- a/recipes/etl/config.yml +++ b/recipes/etl/config.yml @@ -1,4 +1,6 @@ versions: + "20.38.0": + folder: all "20.37.3": folder: all "20.37.2": From 8152b06c55f0f82426cdbaf084339da0a5731e28 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 27 Aug 2023 15:12:02 +0900 Subject: [PATCH 431/637] (#19442) implot: add version 0.16 --- recipes/implot/all/conandata.yml | 3 +++ recipes/implot/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/implot/all/conandata.yml b/recipes/implot/all/conandata.yml index a9c9c08b5ed78..5aa143a53a498 100644 --- a/recipes/implot/all/conandata.yml +++ b/recipes/implot/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.16": + url: "https://github.com/epezent/implot/archive/v0.16.tar.gz" + sha256: "961df327d8a756304d1b0a67316eebdb1111d13d559f0d3415114ec0eb30abd1" "0.15": url: "https://github.com/epezent/implot/archive/v0.15.tar.gz" sha256: "4c20f22fbfbe4ad055f3d344581918d62cde72070b233dad75419a4334f82146" diff --git a/recipes/implot/config.yml b/recipes/implot/config.yml index 5c3099f028cc2..60016fd219bda 100644 --- a/recipes/implot/config.yml +++ b/recipes/implot/config.yml @@ -1,4 +1,6 @@ versions: + "0.16": + folder: "all" "0.15": folder: "all" "0.14": From 0d6f514395f546af3eadfd3782f349582c37adcb Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 27 Aug 2023 16:53:08 +0900 Subject: [PATCH 432/637] (#19444) gsl-lite: add version 0.41.0 --- recipes/gsl-lite/all/conandata.yml | 3 +++ recipes/gsl-lite/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/gsl-lite/all/conandata.yml b/recipes/gsl-lite/all/conandata.yml index 010ad6b469c3c..cc6eafeeee69d 100644 --- a/recipes/gsl-lite/all/conandata.yml +++ b/recipes/gsl-lite/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.41.0": + url: "https://github.com/gsl-lite/gsl-lite/archive/v0.41.0.tar.gz" + sha256: "4682d8a60260321b92555760be3b9caab60e2a71f95eddbdfb91e557ee93302a" "0.40.0": url: "https://github.com/gsl-lite/gsl-lite/archive/v0.40.0.tar.gz" sha256: "65af4ec8a1050dac4f1ca4622881bb02a9c3978a9baec289fb56e25412d6cac7" diff --git a/recipes/gsl-lite/config.yml b/recipes/gsl-lite/config.yml index d21a23d317e33..cec66ae3b5e02 100644 --- a/recipes/gsl-lite/config.yml +++ b/recipes/gsl-lite/config.yml @@ -1,4 +1,6 @@ versions: + "0.41.0": + folder: all "0.40.0": folder: all "0.39.0": From ec6cf3f86cd1033be2cfcb17344bedce661f4a53 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 27 Aug 2023 22:12:39 +0900 Subject: [PATCH 433/637] (#19446) cassandra-cpp-driver: add version 2.17.0 --- recipes/cassandra-cpp-driver/all/conandata.yml | 17 +++++++++++++++++ recipes/cassandra-cpp-driver/config.yml | 2 ++ 2 files changed, 19 insertions(+) diff --git a/recipes/cassandra-cpp-driver/all/conandata.yml b/recipes/cassandra-cpp-driver/all/conandata.yml index 35b0bd34f38b7..148e40f2a763f 100644 --- a/recipes/cassandra-cpp-driver/all/conandata.yml +++ b/recipes/cassandra-cpp-driver/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.17.0": + url: "https://github.com/datastax/cpp-driver/archive/2.17.0.tar.gz" + sha256: "075af6a6920b0a8b12e37b8e5aa335b0c7919334aa1b451642668e6e37c5372f" "2.16.2": url: "https://github.com/datastax/cpp-driver/archive/2.16.2.tar.gz" sha256: "de60751bd575b5364c2c5a17a24a40f3058264ea2ee6fef19de126ae550febc9" @@ -6,6 +9,20 @@ sources: url: "https://github.com/datastax/cpp-driver/archive/2.15.3.tar.gz" sha256: "eccb53c5151621c3b647fc83781a542cfb93e76687b4178ebce418fc4c817293" patches: + "2.17.0": + - patch_file: "patches/2.16.2/fix-cmake.patch" + patch_description: "use cci package" + patch_type: "conan" + - patch_file: "patches/2.15.3/fix-rapidjson.patch" + patch_description: "fix include path for cci package" + patch_type: "conan" + - patch_file: "patches/2.15.3/fix-atomic.patch" + patch_description: "Adapt MemoryOrder definition for C++ 20" + patch_type: "portability" + patch_source: "https://github.com/datastax/cpp-driver/pull/533" + - patch_file: "patches/2.15.3/remove-attribute-for-msvc.patch" + patch_description: "remove attribute for msvc" + patch_type: "portability" "2.16.2": - patch_file: "patches/2.16.2/fix-cmake.patch" patch_description: "use cci package" diff --git a/recipes/cassandra-cpp-driver/config.yml b/recipes/cassandra-cpp-driver/config.yml index fa0680a1da5b5..7062b1458afe2 100644 --- a/recipes/cassandra-cpp-driver/config.yml +++ b/recipes/cassandra-cpp-driver/config.yml @@ -1,4 +1,6 @@ versions: + "2.17.0": + folder: all "2.16.2": folder: all "2.15.3": From 3eb225b9e5397dd67c883fcbe05b329faa227101 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 28 Aug 2023 00:53:49 +0900 Subject: [PATCH 434/637] (#19450) maddy: add version 1.3.0 --- recipes/maddy/all/conandata.yml | 3 +++ recipes/maddy/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/maddy/all/conandata.yml b/recipes/maddy/all/conandata.yml index dfa40b0be6206..b4bf9474c36c1 100644 --- a/recipes/maddy/all/conandata.yml +++ b/recipes/maddy/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.0": + url: "https://github.com/progsource/maddy/archive/refs/tags/1.3.0.tar.gz" + sha256: "561681f8c8d2b998c153cda734107a0bc1dea4bb0df69fd813922da63fa9f3e7" "1.2.1": url: "https://github.com/progsource/maddy/archive/refs/tags/1.2.1.tar.gz" sha256: "b6058bce7ca32506969633ee7a4042e75b07464489f1c44be00913543cd687ef" diff --git a/recipes/maddy/config.yml b/recipes/maddy/config.yml index 12b8a7bf45a5b..90c91d00495eb 100644 --- a/recipes/maddy/config.yml +++ b/recipes/maddy/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.0": + folder: all "1.2.1": folder: all "1.1.2": From 230ab447b90a136dca3b2bf45875b39c62136103 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 28 Aug 2023 02:10:57 +0900 Subject: [PATCH 435/637] (#19451) capnproto: add version 1.0.1 --- recipes/capnproto/all/conandata.yml | 7 +++++++ recipes/capnproto/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/capnproto/all/conandata.yml b/recipes/capnproto/all/conandata.yml index 64808b6c7cee4..e635b41da8f05 100644 --- a/recipes/capnproto/all/conandata.yml +++ b/recipes/capnproto/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.1": + url: "https://github.com/capnproto/capnproto/archive/v1.0.1.tar.gz" + sha256: "5bdb16f6b389a9e29b04214b9bae1759e8b7fe2b45049d7e3f1f286ba050a200" "1.0.0": url: "https://github.com/capnproto/capnproto/archive/v1.0.0.tar.gz" sha256: "bcd44dde78055313a7786cb6ab020cbef19b9045b53857f90cce101c9453f715" @@ -24,6 +27,10 @@ sources: url: "https://github.com/capnproto/capnproto/archive/v0.7.0.tar.gz" sha256: "76c7114a3d142ad08b7208b3964a26e72a6320ee81331d3f0b87569fc9c47a28" patches: + "1.0.1": + - patch_file: "patches/0015-disable-tests-for-1.0.0.patch" + patch_description: "disable test build" + patch_type: "conan" "1.0.0": - patch_file: "patches/0015-disable-tests-for-1.0.0.patch" patch_description: "disable test build" diff --git a/recipes/capnproto/config.yml b/recipes/capnproto/config.yml index fe4f6cbbb70b3..887e41e533af8 100644 --- a/recipes/capnproto/config.yml +++ b/recipes/capnproto/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.1": + folder: all "1.0.0": folder: all "0.10.4": From ea188dba2a282d4099161aba9e54b79f03f8de92 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 28 Aug 2023 11:03:04 +0200 Subject: [PATCH 436/637] (#19453) [bot] Update list of references (prod-v2/ListPackages) --- .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 2a4a0fc59737a..afef60a60fac7 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -36,6 +36,7 @@ required_for_references: - args-parser - argtable2 - argtable3 +- arrow - arsenalgear - artery-font-format - asio @@ -406,6 +407,7 @@ required_for_references: - harfbuzz - hash-library - hazelcast-cpp-client +- hdf4 - hdf5 - hdrhistogram-c - heatshrink @@ -795,6 +797,7 @@ required_for_references: - ogdf - ogg - ois +- onedpl - onetbb - oniguruma - onnx @@ -823,6 +826,7 @@ required_for_references: - openjpeg - openmesh - openmvg +- openpam - openssl - opensubdiv - opentdf-client @@ -945,6 +949,7 @@ required_for_references: - readosm - recastnavigation - reckless +- rectanglebinpack - rectpack2d - redis-plus-plus - refl-cpp From 7c3eaecd37e074784b19539ee1a9495a912c54c2 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Mon, 28 Aug 2023 11:51:40 +0200 Subject: [PATCH 437/637] (#19416) [openapi-generator] Add version 7.0.0 * [openapi-generator] Add version 7.0.0 * Revert old version removal --- recipes/openapi-generator/all/conandata.yml | 3 +++ recipes/openapi-generator/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/openapi-generator/all/conandata.yml b/recipes/openapi-generator/all/conandata.yml index b429533e05e27..9624e0bf21d4b 100644 --- a/recipes/openapi-generator/all/conandata.yml +++ b/recipes/openapi-generator/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "7.0.0": + url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.0/openapi-generator-cli-7.0.0.jar" + sha256: "80e8e9d71bdbdf513b8c65cf7d3fc2fe3d88aaeb4e39a2c6e20831f00032c775" "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/config.yml b/recipes/openapi-generator/config.yml index 805a487d9c79b..fc03893757ba9 100644 --- a/recipes/openapi-generator/config.yml +++ b/recipes/openapi-generator/config.yml @@ -1,4 +1,6 @@ versions: + "7.0.0": + folder: all "6.6.0": folder: all "6.5.0": From 4e520dae17d2b9ceefcde43e550f89f4a452a3bc Mon Sep 17 00:00:00 2001 From: Ivo Hedtke Date: Mon, 28 Aug 2023 15:13:23 +0200 Subject: [PATCH 438/637] (#19458) [scippp] Remove obsolete exports_sources from recipe --- recipes/scippp/all/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/scippp/all/conanfile.py b/recipes/scippp/all/conanfile.py index 72d7e95e14f56..1301e60281e0e 100644 --- a/recipes/scippp/all/conanfile.py +++ b/recipes/scippp/all/conanfile.py @@ -12,7 +12,6 @@ class ScipPlusPlus(ConanFile): name = "scippp" settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps" - exports_sources = "CMakeLists.txt", "source/*", "include/*" description = "SCIP++ is a C++ wrapper for SCIP's C interface" package_type = "library" topics = ("mip", "solver", "linear", "programming") From 78304f761c5ea658f9a258614aaa0e65b7e7fb3c Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 29 Aug 2023 01:11:46 +0900 Subject: [PATCH 439/637] (#19468) blend2d: add version 0.10.5 --- recipes/blend2d/all/conandata.yml | 7 +++++++ recipes/blend2d/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/blend2d/all/conandata.yml b/recipes/blend2d/all/conandata.yml index 81cc43bbe5bf8..70d8d5d6571cb 100644 --- a/recipes/blend2d/all/conandata.yml +++ b/recipes/blend2d/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.10.5": + url: "https://blend2d.com/download/blend2d-0.10.5.tar.xz" + sha256: "fff5a7b1a6b16c986f3d02052a9a030f138fbae3a9c16bf07915416515d6b9cd" "0.10.4": url: "https://blend2d.com/download/blend2d-0.10.4.tar.xz" sha256: "6363e5c13c1c9e4709f949585a6af772ee13a16f75b0084f91b3918dece2fff3" @@ -18,6 +21,10 @@ sources: url: "https://blend2d.com/download/blend2d-beta17.zip" sha256: "06ee8fb0bea281d09291e498900093139426501a1a7f09dba0ec801dd340635e" patches: + "0.10.5": + - patch_file: "patches/0.10-0001-disable-embed-asmjit.patch" + patch_description: "use asmjit cci package" + patch_type: "conan" "0.10.4": - patch_file: "patches/0.10-0001-disable-embed-asmjit.patch" patch_description: "use asmjit cci package" diff --git a/recipes/blend2d/config.yml b/recipes/blend2d/config.yml index abc5bb6a7611e..741838b7d4752 100644 --- a/recipes/blend2d/config.yml +++ b/recipes/blend2d/config.yml @@ -1,4 +1,6 @@ versions: + "0.10.5": + folder: all "0.10.4": folder: all "0.10": From 864f915dc9c9440774b3692607fef720eabbbb12 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 29 Aug 2023 02:11:04 +0900 Subject: [PATCH 440/637] (#19467) fmt: add version 10.1.1 --- recipes/fmt/all/conandata.yml | 3 +++ recipes/fmt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/fmt/all/conandata.yml b/recipes/fmt/all/conandata.yml index 0ab235a8e96fa..1ddc76ef1e667 100644 --- a/recipes/fmt/all/conandata.yml +++ b/recipes/fmt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "10.1.1": + url: "https://github.com/fmtlib/fmt/releases/download/10.1.1/fmt-10.1.1.zip" + sha256: "b84e58a310c9b50196cda48d5678d5fa0849bca19e5fdba6b684f0ee93ed9d1b" "10.1.0": url: "https://github.com/fmtlib/fmt/releases/download/10.1.0/fmt-10.1.0.zip" sha256: "d725fa83a8b57a3cedf238828fa6b167f963041e8f9f7327649bddc68ae316f4" diff --git a/recipes/fmt/config.yml b/recipes/fmt/config.yml index 94b218a304025..74db66d3ff403 100644 --- a/recipes/fmt/config.yml +++ b/recipes/fmt/config.yml @@ -1,4 +1,6 @@ versions: + "10.1.1": + folder: all "10.1.0": folder: all "10.0.0": From cb68eb8f93017379dd195c31ccb188754c024e7d Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Tue, 29 Aug 2023 04:48:31 +0400 Subject: [PATCH 441/637] (#19174) onetbb: fixed hwloc setting on Windows --- recipes/onetbb/all/conanfile.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/recipes/onetbb/all/conanfile.py b/recipes/onetbb/all/conanfile.py index fa6e990f3c829..c06d17f237a24 100644 --- a/recipes/onetbb/all/conanfile.py +++ b/recipes/onetbb/all/conanfile.py @@ -126,18 +126,22 @@ def generate(self): if Version(self.version) >= "2021.6.0" and self.options.get_safe("tbbproxy"): toolchain.variables["TBBMALLOC_PROXY_BUILD"] = self.options.tbbproxy toolchain.variables["TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH"] = not self._tbbbind_build - if self._tbbbind_build: - deps = PkgConfigDeps(self) - deps.generate() if self._tbbbind_explicit_hwloc: - hwloc_package_folder = self.dependencies["hwloc"].package_folder.replace("\\", "/") + hwloc_package_folder = self.dependencies["hwloc"].package_folder hwloc_lib_name = "hwloc.lib" if self.settings.os == "Windows" else "libhwloc.so" - toolchain.variables[f"CMAKE_HWLOC_{self._tbbbind_hwloc_version}_LIBRARY_PATH"] = os.path.join(hwloc_package_folder, "lib", hwloc_lib_name) - toolchain.variables[f"CMAKE_HWLOC_{self._tbbbind_hwloc_version}_INCLUDE_PATH"] = os.path.join(hwloc_package_folder, "include") + toolchain.variables[f"CMAKE_HWLOC_{self._tbbbind_hwloc_version}_LIBRARY_PATH"] = \ + os.path.join(hwloc_package_folder, "lib", hwloc_lib_name).replace("\\", "/") + toolchain.variables[f"CMAKE_HWLOC_{self._tbbbind_hwloc_version}_INCLUDE_PATH"] = \ + os.path.join(hwloc_package_folder, "include").replace("\\", "/") if self.settings.os == "Windows": - toolchain.variables[f"CMAKE_HWLOC_{self._tbbbind_hwloc_version}_DLL_PATH"] = os.path.join(hwloc_package_folder, "bin", "hwloc.dll") + toolchain.variables[f"CMAKE_HWLOC_{self._tbbbind_hwloc_version}_DLL_PATH"] = \ + os.path.join(hwloc_package_folder, "bin", "hwloc.dll").replace("\\", "/") toolchain.generate() + if self._tbbbind_build: + deps = PkgConfigDeps(self) + deps.generate() + def build(self): apply_conandata_patches(self) cmake = CMake(self) From f8266ff8f0b648960512afb302f09bd46e577f9d Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 29 Aug 2023 12:52:33 +0900 Subject: [PATCH 442/637] (#19471) ada: add version 2.6.4 --- 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 c93cb42b88d24..1ffb1049ac57f 100644 --- a/recipes/ada/all/conandata.yml +++ b/recipes/ada/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.6.4": + url: "https://github.com/ada-url/ada/archive/v2.6.4.tar.gz" + sha256: "5b488e9a7a700de5d40a749c96c4339bcc9c425e5f5406a0887b13e70bd90907" "2.6.2": url: "https://github.com/ada-url/ada/archive/v2.6.2.tar.gz" sha256: "425b8696a28a22d19ee7aa4516c26fc8ae3ab574870a9a74ef58ba8a345b822e" diff --git a/recipes/ada/config.yml b/recipes/ada/config.yml index cecfcc53ea282..4b6a02c6d6d42 100644 --- a/recipes/ada/config.yml +++ b/recipes/ada/config.yml @@ -1,4 +1,6 @@ versions: + "2.6.4": + folder: all "2.6.2": folder: all "2.6.0": From 4f8e2b225adbeec4b4bbc9989b0762cf8887bafe Mon Sep 17 00:00:00 2001 From: qwqbot Date: Tue, 29 Aug 2023 14:52:47 +0800 Subject: [PATCH 443/637] (#19473) msgpack-cxx: update boost/1.83 --- recipes/msgpack-cxx/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/msgpack-cxx/all/conanfile.py b/recipes/msgpack-cxx/all/conanfile.py index 0431bac108f83..b2bcb90b0a576 100644 --- a/recipes/msgpack-cxx/all/conanfile.py +++ b/recipes/msgpack-cxx/all/conanfile.py @@ -34,7 +34,7 @@ def layout(self): def requirements(self): if self.options.get_safe("use_boost", True): - self.requires("boost/1.82.0") + self.requires("boost/1.83.0") def package_id(self): self.info.clear() From 522a8f740a09a37a75ec02adf55b54b16cacb7a5 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Tue, 29 Aug 2023 11:33:25 +0400 Subject: [PATCH 444/637] (#19349) opencl-icd-loader: add OpenCL C++ headers as transitive dependency --- recipes/opencl-icd-loader/all/conanfile.py | 1 + recipes/opencl-icd-loader/all/test_package/test_package.c | 1 + 2 files changed, 2 insertions(+) diff --git a/recipes/opencl-icd-loader/all/conanfile.py b/recipes/opencl-icd-loader/all/conanfile.py index b7187e1a134cc..ae7aae3d17794 100644 --- a/recipes/opencl-icd-loader/all/conanfile.py +++ b/recipes/opencl-icd-loader/all/conanfile.py @@ -48,6 +48,7 @@ def layout(self): def requirements(self): self.requires(f"opencl-headers/{self.version}", transitive_headers=True) + self.requires(f"opencl-clhpp-headers/{self.version}", transitive_headers=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/opencl-icd-loader/all/test_package/test_package.c b/recipes/opencl-icd-loader/all/test_package/test_package.c index 4c923ce588658..42b334ba331d4 100644 --- a/recipes/opencl-icd-loader/all/test_package/test_package.c +++ b/recipes/opencl-icd-loader/all/test_package/test_package.c @@ -1,3 +1,4 @@ +#define CL_TARGET_OPENCL_VERSION 120 #include int main() { From 969b025d3622285f1a6199edc0d4953f2bf5c63c Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 29 Aug 2023 11:04:23 +0200 Subject: [PATCH 445/637] (#19465) arrow: bump version of boost dependency --- recipes/arrow/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/arrow/all/conanfile.py b/recipes/arrow/all/conanfile.py index abed7f510dbed..cf876a25b3191 100644 --- a/recipes/arrow/all/conanfile.py +++ b/recipes/arrow/all/conanfile.py @@ -300,7 +300,7 @@ def requirements(self): if self.options.with_mimalloc: self.requires("mimalloc/1.7.6") if self.options.with_boost: - self.requires("boost/1.81.0") + self.requires("boost/1.82.0") if self.options.with_gflags: self.requires("gflags/2.2.2") if self.options.with_glog: From 3e44e653008f1575f228a6bf0cfd62db99dccece Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 29 Aug 2023 19:15:23 +0900 Subject: [PATCH 446/637] (#19457) zlib-ng: fix `with_optim` default value --- recipes/zlib-ng/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/zlib-ng/all/conanfile.py b/recipes/zlib-ng/all/conanfile.py index 2c536695c6f5e..853a0a0f6a309 100644 --- a/recipes/zlib-ng/all/conanfile.py +++ b/recipes/zlib-ng/all/conanfile.py @@ -34,7 +34,7 @@ class ZlibNgConan(ConanFile): "fPIC": True, "zlib_compat": False, "with_gzfileop": True, - "with_optim": False, + "with_optim": True, "with_new_strategies": True, "with_native_instructions": False, "with_reduced_mem": False, From c521d7b9fa8817850da0f8e575c0c883676b8ffb Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Tue, 29 Aug 2023 15:34:36 +0400 Subject: [PATCH 447/637] (#19452) onetbb: added pkgconf build dependency to find hwloc --- recipes/onetbb/all/conanfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/onetbb/all/conanfile.py b/recipes/onetbb/all/conanfile.py index c06d17f237a24..bfc433ac09750 100644 --- a/recipes/onetbb/all/conanfile.py +++ b/recipes/onetbb/all/conanfile.py @@ -89,6 +89,10 @@ def requirements(self): if self._tbbbind_build: self.requires("hwloc/2.9.1") + def build_requirements(self): + if not self._tbbbind_explicit_hwloc and not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.build_requires("pkgconf/1.9.3") + def layout(self): cmake_layout(self, src_folder="src") From b31af640bf50bebe1dd1b97531730ba79fbc280c Mon Sep 17 00:00:00 2001 From: Anton Date: Tue, 29 Aug 2023 12:34:07 +0000 Subject: [PATCH 448/637] (#19475) aggeom-agg: add version 2.7.1 --- recipes/aggeom-agg/all/conandata.yml | 3 +++ recipes/aggeom-agg/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/aggeom-agg/all/conandata.yml b/recipes/aggeom-agg/all/conandata.yml index 8b26697b0ef0d..9203b7fc5e424 100644 --- a/recipes/aggeom-agg/all/conandata.yml +++ b/recipes/aggeom-agg/all/conandata.yml @@ -2,3 +2,6 @@ sources: "2.6.1": url: "https://github.com/aggeom/agg-2.6/archive/refs/tags/agg-2.6.1.tar.gz" sha256: 685966f880f1c2aae19479b60525fafba8cbd88e4c62d1947767780df8f6a3d0 + "2.7.1": + url: "https://github.com/aggeom/agg-2.6/archive/refs/tags/agg-2.7.1.tar.gz" + sha256: 2174e55d7169502293e86f728d8698b5198dc7e42fbbda39e4d34c1411d1ac7a diff --git a/recipes/aggeom-agg/config.yml b/recipes/aggeom-agg/config.yml index cfb13334b8b03..54947af157488 100644 --- a/recipes/aggeom-agg/config.yml +++ b/recipes/aggeom-agg/config.yml @@ -1,3 +1,5 @@ versions: "2.6.1": folder: "all" + "2.7.1": + folder: "all" From cbd88a14d8d56d85bd275a715f73490de15cc183 Mon Sep 17 00:00:00 2001 From: igormironchik Date: Tue, 29 Aug 2023 22:53:12 +0300 Subject: [PATCH 449/637] (#19484) md4qt: bump version --- recipes/md4qt/all/conandata.yml | 3 +++ recipes/md4qt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index a7f8c97edc459..f39e87f6d648d 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.14": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.14.tar.gz" + sha256: "b230f1a99a2a5f4f1f32748d52062276294b34d8254d4128193632e3a8ffaa4e" "2.0.13": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.13.tar.gz" sha256: "4e6cdcd54c5ce1e1ed9a97bd18ac5aeb7c15bb303193b4261058aef724fe9a41" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index 3a7084f75ff20..8252adb029767 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.14": + folder: all "2.0.13": folder: all "2.0.12": From 683a9c3ab4cf0ff4df4d6eb29e027947d5923925 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 30 Aug 2023 07:33:09 +0900 Subject: [PATCH 450/637] (#19443) wasm-micro-runtime: add version 1.2.3 * wasm-micro-runtime: add version 1.2.3 * disable strip-all on apple-clang * disable strip on apple-clang * revert BUILD_SHARED_LIBS --- recipes/wasm-micro-runtime/all/conandata.yml | 7 ++ .../all/patches/1.2.3-0001-fix-cmake.patch | 88 +++++++++++++++++++ recipes/wasm-micro-runtime/config.yml | 2 + 3 files changed, 97 insertions(+) create mode 100644 recipes/wasm-micro-runtime/all/patches/1.2.3-0001-fix-cmake.patch diff --git a/recipes/wasm-micro-runtime/all/conandata.yml b/recipes/wasm-micro-runtime/all/conandata.yml index e6acc34530782..507fb63f45893 100644 --- a/recipes/wasm-micro-runtime/all/conandata.yml +++ b/recipes/wasm-micro-runtime/all/conandata.yml @@ -1,8 +1,15 @@ sources: + "1.2.3": + url: "https://github.com/bytecodealliance/wasm-micro-runtime/archive/refs/tags/WAMR-1.2.3.tar.gz" + sha256: "85057f788630dc1b8c371f5443cc192627175003a8ea63c491beaff29a338346" "1.2.2": url: "https://github.com/bytecodealliance/wasm-micro-runtime/archive/refs/tags/WAMR-1.2.2.tar.gz" sha256: "d328fc1e19c54cfdb4248b861de54b62977b9b85c0a40eaaeb9cd9b628c0c788" patches: + "1.2.3": + - patch_file: "patches/1.2.3-0001-fix-cmake.patch" + patch_description: "separate static and shasred build" + patch_type: "conan" "1.2.2": - patch_file: "patches/1.2.2-0001-fix-cmake.patch" patch_description: "separate static and shasred build" diff --git a/recipes/wasm-micro-runtime/all/patches/1.2.3-0001-fix-cmake.patch b/recipes/wasm-micro-runtime/all/patches/1.2.3-0001-fix-cmake.patch new file mode 100644 index 0000000000000..b67b2a33b5dea --- /dev/null +++ b/recipes/wasm-micro-runtime/all/patches/1.2.3-0001-fix-cmake.patch @@ -0,0 +1,88 @@ +diff --git a/a/CMakeLists.txt b/b/CMakeLists.txt +index fbea261..9f9892a 100644 +--- a/a/CMakeLists.txt ++++ b/b/CMakeLists.txt +@@ -108,17 +108,12 @@ endif () + set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + + # Set the strip command based on the system (GNU or Clang) +-if (CMAKE_STRIP) ++if (NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang" AND CMAKE_STRIP) + set (CMAKE_STRIP_FLAGS "--strip-all") + endif () + + include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake) + +-set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat -Wformat-security -Wshadow -Wno-unused-parameter") +-# set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wsign-conversion") +- +-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wformat -Wformat-security -Wno-unused") +- + if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") + if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") +@@ -135,11 +130,15 @@ endif () + + include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake) + ++if (NOT BUILD_SHARED_LIBS) + # STATIC LIBRARY + add_library(iwasm_static STATIC ${WAMR_RUNTIME_LIB_SOURCE}) + set_target_properties (iwasm_static PROPERTIES OUTPUT_NAME vmlib) + target_include_directories(iwasm_static INTERFACE ${WAMR_ROOT_DIR}/core/iwasm/include) +-target_link_libraries (iwasm_static INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl -lpthread) ++target_link_libraries (iwasm_static INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS}) ++if(NOT MSVC) ++ target_link_libraries (iwasm_static INTERFACE -lm -ldl -lpthread) ++endif() + if (WAMR_BUILD_WASM_CACHE EQUAL 1) + target_link_libraries(iwasm_static INTERFACE boringssl_crypto) + endif () +@@ -147,19 +146,22 @@ endif () + install (TARGETS iwasm_static ARCHIVE DESTINATION lib) + + # If it's a Release build, strip the static library +-if (CMAKE_STRIP AND CMAKE_BUILD_TYPE STREQUAL "Release") ++if (0) + # Strip static library + message (STATUS "Stripping static library after build!") + add_custom_command (TARGET iwasm_static POST_BUILD + COMMAND ${CMAKE_STRIP} ${CMAKE_STRIP_FLAGS} $ + ) + endif () +- ++else() + # SHARED LIBRARY + add_library (iwasm_shared SHARED ${WAMR_RUNTIME_LIB_SOURCE}) + set_target_properties (iwasm_shared PROPERTIES OUTPUT_NAME iwasm) + target_include_directories(iwasm_shared INTERFACE ${WAMR_ROOT_DIR}/core/iwasm/include) +-target_link_libraries (iwasm_shared INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl -lpthread) ++target_link_libraries (iwasm_shared INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS}) ++if(NOT MSVC) ++ target_link_libraries (iwasm_shared INTERFACE -lm -ldl -lpthread) ++endif() + if (WAMR_BUILD_WASM_CACHE EQUAL 1) + target_link_libraries(iwasm_shared INTERFACE boringssl_crypto) + endif () +@@ -169,7 +171,7 @@ if (MINGW) + endif () + + install (TARGETS iwasm_shared LIBRARY DESTINATION lib) +- ++endif() + # HEADERS + install (FILES + ${WAMR_ROOT_DIR}/core/iwasm/include/wasm_c_api.h +@@ -177,6 +179,7 @@ install (FILES + ${WAMR_ROOT_DIR}/core/iwasm/include/lib_export.h + DESTINATION include) + ++if (NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang" AND BUILD_SHARED_LIBS) + # If it's a Release build, strip the shared library + if (CMAKE_STRIP AND CMAKE_BUILD_TYPE STREQUAL "Release") + # Strip shared library +@@ -185,3 +188,4 @@ if (CMAKE_STRIP AND CMAKE_BUILD_TYPE STREQUAL "Release") + COMMAND ${CMAKE_STRIP} ${CMAKE_STRIP_FLAGS} $ + ) + endif () ++endif () diff --git a/recipes/wasm-micro-runtime/config.yml b/recipes/wasm-micro-runtime/config.yml index af40d9653a378..6d9f399765e2d 100644 --- a/recipes/wasm-micro-runtime/config.yml +++ b/recipes/wasm-micro-runtime/config.yml @@ -1,3 +1,5 @@ versions: + "1.2.3": + folder: all "1.2.2": folder: all From 2301b5f6bfc45d9aa5a236c506f26ed1f3ac7681 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 30 Aug 2023 07:32:49 +0200 Subject: [PATCH 451/637] (#19487) sqlpp11: fix import of Version --- recipes/sqlpp11/all/conanfile.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/recipes/sqlpp11/all/conanfile.py b/recipes/sqlpp11/all/conanfile.py index 9ada1d6896ced..9b3a725b38559 100644 --- a/recipes/sqlpp11/all/conanfile.py +++ b/recipes/sqlpp11/all/conanfile.py @@ -1,9 +1,9 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd -from conan.tools.layout import basic_layout from conan.tools.files import get, copy -from conan import Version +from conan.tools.layout import basic_layout +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -20,7 +20,6 @@ class Sqlpp11Conan(ConanFile): settings = "os", "arch", "compiler", "build_type" no_copy_source = True - @property def _min_cppstd(self): return 11 if Version(self.version) < "0.61" else 14 @@ -66,6 +65,4 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "sqlpp11::sqlpp11") # TODO: to remove in conan v2 once cmake_find_package_* generators removed - bindir = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bindir)) - self.env_info.PATH.append(bindir) + self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) From 57b28df83c2281b4feef8e91e018d21fb6d477a6 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 30 Aug 2023 08:09:05 +0200 Subject: [PATCH 452/637] (#19489) lefticus-tools: fix import of Version + add a layout * fix import of Version * add a layout --- recipes/lefticus-tools/all/conanfile.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/recipes/lefticus-tools/all/conanfile.py b/recipes/lefticus-tools/all/conanfile.py index b9179faa1d97b..d3dbf33094acc 100644 --- a/recipes/lefticus-tools/all/conanfile.py +++ b/recipes/lefticus-tools/all/conanfile.py @@ -1,9 +1,10 @@ from conan import ConanFile -from conan.tools.files import get, copy +from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc, check_min_vs -from conan.errors import ConanInvalidConfiguration -from conan import Version +from conan.tools.scm import Version import os @@ -33,6 +34,9 @@ def _compilers_minimum_version(self): "apple-clang": "14", } + def layout(self): + basic_layout(self, src_folder="src") + def package_id(self): self.info.clear() From 1ad58e78a920a8695776fbdf8697f03f1608e8d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Wed, 30 Aug 2023 08:30:10 +0200 Subject: [PATCH 453/637] (#19462) arrow: add version 13.0.0 * arrow: add version 13.0.0 * arrow: update minimum cmake version and patch cmake to use required version from conan * arrow: suggested fix adding build_requirements for CMake 3.16 * Revert back cmake_minimum_required --- recipes/arrow/all/conandata.yml | 3 +++ recipes/arrow/all/conanfile.py | 3 +++ recipes/arrow/config.yml | 2 ++ 3 files changed, 8 insertions(+) diff --git a/recipes/arrow/all/conandata.yml b/recipes/arrow/all/conandata.yml index 256a5f614578c..5dcac7a820434 100644 --- a/recipes/arrow/all/conandata.yml +++ b/recipes/arrow/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "13.0.0": + url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-13.0.0/apache-arrow-13.0.0.tar.gz?action=download" + sha256: "35dfda191262a756be934eef8afee8d09762cad25021daa626eb249e251ac9e6" "12.0.1": url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-12.0.1/apache-arrow-12.0.1.tar.gz?action=download" sha256: "3481c411393aa15c75e88d93cf8315faf7f43e180fe0790128d3840d417de858" diff --git a/recipes/arrow/all/conanfile.py b/recipes/arrow/all/conanfile.py index cf876a25b3191..a7f22fcf6ecee 100644 --- a/recipes/arrow/all/conanfile.py +++ b/recipes/arrow/all/conanfile.py @@ -527,6 +527,9 @@ def build(self): cmake.configure(build_script_folder=os.path.join(self.source_folder, "cpp")) cmake.build() + def build_requirements(self): + self.tool_requires("cmake/[>=3.16 <4]") + def package(self): copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy(self, pattern="NOTICE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) diff --git a/recipes/arrow/config.yml b/recipes/arrow/config.yml index b6c86580b3492..7a1c1ea27e611 100644 --- a/recipes/arrow/config.yml +++ b/recipes/arrow/config.yml @@ -1,4 +1,6 @@ versions: + "13.0.0": + folder: all "12.0.1": folder: all "12.0.0": From a855d2677574777603fc69d3ab68317e6dcf4678 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Wed, 30 Aug 2023 09:31:14 +0200 Subject: [PATCH 454/637] (#19445) wil: add version 1.0.230824.2 --- recipes/wil/all/conandata.yml | 3 +++ recipes/wil/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/wil/all/conandata.yml b/recipes/wil/all/conandata.yml index 9253a5b752cf3..0c0fd9c9b3f6e 100644 --- a/recipes/wil/all/conandata.yml +++ b/recipes/wil/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.230824.2": + url: "https://github.com/microsoft/wil/archive/refs/tags/v1.0.230824.2.tar.gz" + sha256: "15c6f90653fe91d2ab3c0c010735aee629c80519b4237611344f2e623f06aad2" "1.0.230629.1": url: "https://github.com/microsoft/wil/archive/refs/tags/v1.0.230629.1.tar.gz" sha256: "c0d9ad1f295e181aa28d7c9b219e7d530e6bc4b7533317be50e7eae760c8d63f" diff --git a/recipes/wil/config.yml b/recipes/wil/config.yml index 00c073f03a7a2..98a5d552e5d6c 100644 --- a/recipes/wil/config.yml +++ b/recipes/wil/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.230824.2": + folder: "all" "1.0.230629.1": folder: "all" "1.0.230411.1": From 792994b96816fe0a918c58cda3f1e2d603bd1949 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 30 Aug 2023 09:43:24 +0200 Subject: [PATCH 455/637] (#19455) nodejs: remove compiler from package id + add package_type * remove compiler from package id * add package_type --- recipes/nodejs/all/conanfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/nodejs/all/conanfile.py b/recipes/nodejs/all/conanfile.py index d08325293889a..c098d4eea4705 100644 --- a/recipes/nodejs/all/conanfile.py +++ b/recipes/nodejs/all/conanfile.py @@ -16,6 +16,7 @@ class NodejsConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://nodejs.org" license = "MIT" + package_type = "application" settings = "os", "arch", "compiler" no_copy_source = True short_paths = True @@ -40,6 +41,9 @@ def _glibc_version(self): self.run(cmd, buff) return str(re.search(r'GLIBC (\d{1,3}.\d{1,3})', buff.getvalue()).group(1)) + def package_id(self): + del self.info.settings.compiler + def validate(self): if not self.version in self.conan_data["sources"] or \ not str(self.settings.os) in self.conan_data["sources"][self.version] or \ From 54e66f87e71bc54dbed7cbd0b667b44ef45fe72a Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 30 Aug 2023 16:56:44 +0900 Subject: [PATCH 456/637] (#19456) sqlitecpp: add version 3.3.1, add package_type * sqlitecpp: add version 3.3.1, update sqlite3, add package_type * revert sqlite3 --- recipes/sqlitecpp/all/conandata.yml | 3 +++ recipes/sqlitecpp/all/conanfile.py | 10 +++++----- recipes/sqlitecpp/config.yml | 2 ++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/recipes/sqlitecpp/all/conandata.yml b/recipes/sqlitecpp/all/conandata.yml index 9f7fc37611e76..a10675f041108 100644 --- a/recipes/sqlitecpp/all/conandata.yml +++ b/recipes/sqlitecpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.3.1": + url: "https://github.com/SRombauts/SQLiteCpp/archive/3.3.1.tar.gz" + sha256: "71f990f9fb4b004533b6859ce40729af823b87fe691dd99ca084a7fd40db54b9" "3.3.0": url: "https://github.com/SRombauts/SQLiteCpp/archive/3.3.0.tar.gz" sha256: "4a37dd63cf91235ea2ef4494054700c144b3f96e93a330ef61ed53d106353e9c" diff --git a/recipes/sqlitecpp/all/conanfile.py b/recipes/sqlitecpp/all/conanfile.py index 3cb33ddd1e3dd..836b5676e62e1 100644 --- a/recipes/sqlitecpp/all/conanfile.py +++ b/recipes/sqlitecpp/all/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.files import copy, get, apply_conandata_patches, replace_in_file, rmdir, save +from conan.tools.files import copy, get, apply_conandata_patches, export_conandata_patches, replace_in_file, rmdir, save from conan.tools.scm import Version from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout @@ -14,10 +14,11 @@ class SQLiteCppConan(ConanFile): name = "sqlitecpp" description = "SQLiteCpp is a smart and easy to use C++ sqlite3 wrapper" - topics = ("sqlite", "sqlite3", "data-base") + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/SRombauts/SQLiteCpp" - license = "MIT" + topics = ("sqlite", "sqlite3", "data-base") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -31,8 +32,7 @@ class SQLiteCppConan(ConanFile): } def export_sources(self): - for p in self.conan_data.get("patches", {}).get(self.version, []): - copy(self, p["patch_file"], self.recipe_folder, self.export_sources_folder) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": diff --git a/recipes/sqlitecpp/config.yml b/recipes/sqlitecpp/config.yml index 71f5731f373e2..b3381f7005ac8 100644 --- a/recipes/sqlitecpp/config.yml +++ b/recipes/sqlitecpp/config.yml @@ -1,4 +1,6 @@ versions: + "3.3.1": + folder: all "3.3.0": folder: all "3.2.1": From b4f1ebf63d1ddf693ec857a89b3aafa9a3948abe Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 30 Aug 2023 11:46:28 +0300 Subject: [PATCH 457/637] (#18656) kcp: migrate to Conan v2 * kcp: migrate to Conan v2 * kcp: simplify patches * kcp: fix shared builds on Windows * kcp: fix_apple_shared_install_name() --- recipes/kcp/all/CMakeLists.txt | 11 --- recipes/kcp/all/conandata.yml | 7 -- recipes/kcp/all/conanfile.py | 77 ++++++++++--------- .../0001-kcp-remove-add_library-STATIC.patch | 18 ----- recipes/kcp/all/test_package/CMakeLists.txt | 5 +- recipes/kcp/all/test_package/conanfile.py | 20 +++-- .../kcp/all/test_v1_package/CMakeLists.txt | 8 ++ recipes/kcp/all/test_v1_package/conanfile.py | 16 ++++ 8 files changed, 82 insertions(+), 80 deletions(-) delete mode 100644 recipes/kcp/all/CMakeLists.txt delete mode 100644 recipes/kcp/all/patches/0001-kcp-remove-add_library-STATIC.patch create mode 100644 recipes/kcp/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/kcp/all/test_v1_package/conanfile.py diff --git a/recipes/kcp/all/CMakeLists.txt b/recipes/kcp/all/CMakeLists.txt deleted file mode 100644 index 0feb437e18418..0000000000000 --- a/recipes/kcp/all/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.4.0) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -if(WIN32 AND BUILD_SHARED_LIBS) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) -endif() - -add_subdirectory(source_subfolder) diff --git a/recipes/kcp/all/conandata.yml b/recipes/kcp/all/conandata.yml index da8ca059669a3..4ecaaa44cfb1c 100644 --- a/recipes/kcp/all/conandata.yml +++ b/recipes/kcp/all/conandata.yml @@ -5,10 +5,3 @@ sources: "1.7": url: "https://github.com/skywind3000/kcp/archive/1.7.tar.gz" sha256: "b4d26994d95599ab0c44e1f93002f9fda275094a879d66c192d79d596529199e" -patches: - "1.5": - - patch_file: "patches/0001-kcp-remove-add_library-STATIC.patch" - base_path: "source_subfolder" - "1.7": - - patch_file: "patches/0001-kcp-remove-add_library-STATIC.patch" - base_path: "source_subfolder" diff --git a/recipes/kcp/all/conanfile.py b/recipes/kcp/all/conanfile.py index ea23c3a999a55..0146b7ee7c3cc 100644 --- a/recipes/kcp/all/conanfile.py +++ b/recipes/kcp/all/conanfile.py @@ -1,17 +1,23 @@ -from conans import ConanFile, CMake, tools import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, export_conandata_patches, get, rmdir, replace_in_file + +required_conan_version = ">=1.53.0" class KcpConan(ConanFile): name = "kcp" description = "A Fast and Reliable ARQ Protocol" - topics = ("conan", "kcp", "ARQ", "TCP", "protocol") - homepage = "https://github.com/skywind3000/kcp" - url = "https://github.com/conan-io/conan-center-index" license = "MIT" - exports_sources = "CMakeLists.txt", "patches/**" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/skywind3000/kcp" + topics = ("ARQ", "TCP", "protocol") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -20,18 +26,9 @@ class KcpConan(ConanFile): "shared": False, "fPIC": True, } - settings = "os", "arch", "compiler", "build_type" - generators = "cmake" - - _cmake = None - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -39,36 +36,46 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["BUILD_TESTING"] = False - self._cmake.configure() - return self._cmake + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.variables["BUILD_TESTING"] = False + tc.generate() + tc = CMakeDeps(self) + tc.generate() def _patch_sources(self): - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) + # Fix shared builds on Windows + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + " STATIC", "") + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "ARCHIVE DESTINATION", + "RUNTIME DESTINATION bin\nARCHIVE DESTINATION") def build(self): self._patch_sources() - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") - cmake = self._configure_cmake() + copy(self, "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, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + fix_apple_shared_install_name(self) def package_info(self): self.cpp_info.libs = ["kcp"] diff --git a/recipes/kcp/all/patches/0001-kcp-remove-add_library-STATIC.patch b/recipes/kcp/all/patches/0001-kcp-remove-add_library-STATIC.patch deleted file mode 100644 index b8c9f32e1e658..0000000000000 --- a/recipes/kcp/all/patches/0001-kcp-remove-add_library-STATIC.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -5,12 +5,14 @@ - include(CTest) - include(GNUInstallDirs) - --add_library(kcp STATIC ikcp.c) -+add_library(kcp ikcp.c) - - install(FILES ikcp.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - - install(TARGETS kcp - EXPORT kcp-targets -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - ) diff --git a/recipes/kcp/all/test_package/CMakeLists.txt b/recipes/kcp/all/test_package/CMakeLists.txt index d5b08913be93b..b15d2eca4c2a3 100644 --- a/recipes/kcp/all/test_package/CMakeLists.txt +++ b/recipes/kcp/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(kcp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/kcp/all/test_package/conanfile.py b/recipes/kcp/all/test_package/conanfile.py index f8eeed898d7bd..ef5d7042163ec 100644 --- a/recipes/kcp/all/test_package/conanfile.py +++ b/recipes/kcp/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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -12,5 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - self.run(os.path.join("bin", "test_package"), 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/kcp/all/test_v1_package/CMakeLists.txt b/recipes/kcp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/kcp/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/kcp/all/test_v1_package/conanfile.py b/recipes/kcp/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..f8eeed898d7bd --- /dev/null +++ b/recipes/kcp/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + self.run(os.path.join("bin", "test_package"), run_environment=True) From 41e8aed293abe8910fc78a80dd27578bf0ac3952 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Wed, 30 Aug 2023 11:22:21 +0200 Subject: [PATCH 458/637] (#19464) [bot] Update authorized users list (2023-08-28) --- .c3i/authorized_users.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index b68f4b3ff0398..40eb28806b2ca 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1217,3 +1217,8 @@ authorized_users: - jwfallawuiuc - tgurriet - mgfernan +- chrisc66 +- KevDi +- XVilka +- DoomHammer +- cschreib From 26d01f8360943a73f7a1e32e3b94e09454fd65a5 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 30 Aug 2023 11:43:58 +0200 Subject: [PATCH 459/637] (#17120) aws-crt-cpp: add missing interface definition if shared * add AWS_CRT_CPP_USE_IMPORT_EXPORT interface definition if shared * more elegant way to define target for legacy generators * add missing transitive headers * aws-c-common is a public dependency * fix traits --- recipes/aws-crt-cpp/all/conanfile.py | 70 ++++++++++++++++------------ 1 file changed, 40 insertions(+), 30 deletions(-) diff --git a/recipes/aws-crt-cpp/all/conanfile.py b/recipes/aws-crt-cpp/all/conanfile.py index 0b0f3153a2863..97c0f616bb653 100644 --- a/recipes/aws-crt-cpp/all/conanfile.py +++ b/recipes/aws-crt-cpp/all/conanfile.py @@ -1,10 +1,11 @@ from conan import ConanFile -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, save from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout import os +import textwrap required_conan_version = ">=1.53.0" @@ -46,22 +47,23 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("aws-c-common/0.8.2") + self.requires("aws-c-cal/0.5.13", transitive_headers=True) + self.requires("aws-c-common/0.8.2", transitive_headers=True) self.requires("aws-checksums/0.1.13") if Version(self.version) < "0.17.29": - self.requires("aws-c-io/0.10.20") - self.requires("aws-c-http/0.6.13") - self.requires("aws-c-auth/0.6.11") - self.requires("aws-c-s3/0.1.37") - self.requires("aws-c-mqtt/0.7.10") + self.requires("aws-c-auth/0.6.11", transitive_headers=True) self.requires("aws-c-event-stream/0.2.7") + self.requires("aws-c-http/0.6.13", transitive_headers=True) + self.requires("aws-c-io/0.10.20", transitive_headers=True) + self.requires("aws-c-mqtt/0.7.10", transitive_headers=True) + self.requires("aws-c-s3/0.1.37") else: - self.requires("aws-c-io/0.13.4") - self.requires("aws-c-http/0.6.22") - self.requires("aws-c-auth/0.6.17") - self.requires("aws-c-s3/0.1.49") - self.requires("aws-c-mqtt/0.7.12") + self.requires("aws-c-auth/0.6.17", transitive_headers=True) self.requires("aws-c-event-stream/0.2.15") + self.requires("aws-c-http/0.6.22", transitive_headers=True) + self.requires("aws-c-io/0.13.4", transitive_headers=True) + self.requires("aws-c-mqtt/0.7.12", transitive_headers=True) + self.requires("aws-c-s3/0.1.49") def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -91,26 +93,34 @@ def package(self): cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "aws-crt-cpp")) + # TODO: to remove in conan v2 once legacy generators removed + self._create_cmake_module_alias_targets( + os.path.join(self.package_folder, self._module_file_rel_path), + {"AWS::aws-crt-cpp": "aws-crt-cpp::aws-crt-cpp"} + ) + + def _create_cmake_module_alias_targets(self, module_file, targets): + content = "" + for alias, aliased in targets.items(): + content += textwrap.dedent(f"""\ + if(TARGET {aliased} AND NOT TARGET {alias}) + add_library({alias} INTERFACE IMPORTED) + set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) + endif() + """) + save(self, module_file, content) + + @property + def _module_file_rel_path(self): + return os.path.join("lib", "cmake", f"conan-official-{self.name}-targets.cmake") + def package_info(self): self.cpp_info.set_property("cmake_file_name", "aws-crt-cpp") self.cpp_info.set_property("cmake_target_name", "AWS::aws-crt-cpp") - - self.cpp_info.components["aws-crt-cpp-lib"].names["cmake_find_package"] = "aws-crt-cpp" - self.cpp_info.components["aws-crt-cpp-lib"].names["cmake_find_package_multi"] = "aws-crt-cpp" - self.cpp_info.components["aws-crt-cpp-lib"].libs = ["aws-crt-cpp"] - self.cpp_info.components["aws-crt-cpp-lib"].requires = [ - "aws-c-event-stream::aws-c-event-stream-lib", - "aws-c-common::aws-c-common-lib", - "aws-c-io::aws-c-io-lib", - "aws-c-http::aws-c-http-lib", - "aws-c-auth::aws-c-auth-lib", - "aws-c-mqtt::aws-c-mqtt-lib", - "aws-c-s3::aws-c-s3-lib", - "aws-checksums::aws-checksums-lib" - ] + self.cpp_info.libs = ["aws-crt-cpp"] + if self.options.shared: + self.cpp_info.defines.append("AWS_CRT_CPP_USE_IMPORT_EXPORT") # TODO: to remove in conan v2 once cmake_find_package_* generators removed - self.cpp_info.filenames["cmake_find_package"] = "aws-crt-cpp" - self.cpp_info.filenames["cmake_find_package_multi"] = "aws-crt-cpp" - self.cpp_info.names["cmake_find_package"] = "AWS" - self.cpp_info.names["cmake_find_package_multi"] = "AWS" + self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] + self.cpp_info.build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] From 11bbd4feea4bd305b8149c9e8f4854b7f1025cd2 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 30 Aug 2023 19:12:57 +0900 Subject: [PATCH 460/637] (#19432) xlsxio: update dependencies --- recipes/xlsxio/all/conanfile.py | 4 ++-- recipes/xlsxio/all/patches/0234_cmake.patch | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/xlsxio/all/conanfile.py b/recipes/xlsxio/all/conanfile.py index 55de1430b90bd..b5d3c01dc87ce 100644 --- a/recipes/xlsxio/all/conanfile.py +++ b/recipes/xlsxio/all/conanfile.py @@ -58,9 +58,9 @@ def layout(self): def requirements(self): if self.options.with_libzip: - self.requires("libzip/1.9.2") + self.requires("libzip/1.10.1") elif Version(self.version) >= "0.2.34" and self.options.with_minizip_ng : - self.requires("minizip-ng/3.0.8") + self.requires("minizip-ng/4.0.1") else: self.requires("minizip/1.2.13") self.requires("expat/2.5.0") diff --git a/recipes/xlsxio/all/patches/0234_cmake.patch b/recipes/xlsxio/all/patches/0234_cmake.patch index 0000f8397c5c4..ea858da988ead 100644 --- a/recipes/xlsxio/all/patches/0234_cmake.patch +++ b/recipes/xlsxio/all/patches/0234_cmake.patch @@ -29,7 +29,7 @@ index bf4e9bf..f0d6a0e 100644 - FIND_PACKAGE(minizip${MINIZIP_NG_SUFFIX} REQUIRED) - SET(ANYZIP_INCLUDE_DIRS "${minizip-ng_DIR}/../../../include/minizip${MINIZIP_NG_SUFFIX}") - SET(ANYZIP_LIBRARIES minizip${MINIZIP_NG_SUFFIX}) -+ FIND_PACKAGE(minizip 3 REQUIRED) ++ FIND_PACKAGE(minizip REQUIRED) + IF(minizip_INCLUDE_DIRS) + SET(ANYZIP_INCLUDE_DIRS ${minizip_INCLUDE_DIRS}) + SET(ANYZIP_LIBRARIES ${minizip_LIBRARIES}) From 609bb042ec8bceda1cebb72559d18a0153e5138b Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 30 Aug 2023 19:53:21 +0900 Subject: [PATCH 461/637] (#19434) c-blosc2: add version 2.10.2, update dependencies * c-blosc2: add version 2.10.2, update dependencies * rmdir lib/cmake * rmdir cmake --- recipes/c-blosc2/all/conandata.yml | 7 + recipes/c-blosc2/all/conanfile.py | 4 +- .../all/patches/2.10.2-0001-fix-cmake.patch | 139 ++++++++++++++++++ recipes/c-blosc2/config.yml | 2 + 4 files changed, 151 insertions(+), 1 deletion(-) create mode 100644 recipes/c-blosc2/all/patches/2.10.2-0001-fix-cmake.patch diff --git a/recipes/c-blosc2/all/conandata.yml b/recipes/c-blosc2/all/conandata.yml index 09b337eb1d3e7..974c48eeac698 100644 --- a/recipes/c-blosc2/all/conandata.yml +++ b/recipes/c-blosc2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.10.2": + url: "https://github.com/Blosc/c-blosc2/archive/v2.10.2.tar.gz" + sha256: "069785bc14c006c7dab40ea0c620bdf3eb8752663fd55c706d145bceabc2a31d" "2.10.0": url: "https://github.com/Blosc/c-blosc2/archive/v2.10.0.tar.gz" sha256: "cb7f7c0c62af78982140ecff21a2f3ca9ce6a0a1c02e314fcdce1a98da0fe231" @@ -24,6 +27,10 @@ sources: url: "https://github.com/Blosc/c-blosc2/archive/refs/tags/v2.2.0.tar.gz" sha256: "66f9977de26d6bc9ea1c0e623d873c3225e4fff709aa09b3335fd09d41d57c0e" patches: + "2.10.2": + - patch_file: "patches/2.10.2-0001-fix-cmake.patch" + patch_description: "use cci package" + patch_type: "conan" "2.10.0": - patch_file: "patches/2.10.0-0001-fix-cmake.patch" patch_description: "use cci package" diff --git a/recipes/c-blosc2/all/conanfile.py b/recipes/c-blosc2/all/conanfile.py index 3d06cc9c0ee52..9cfb0264ed537 100644 --- a/recipes/c-blosc2/all/conanfile.py +++ b/recipes/c-blosc2/all/conanfile.py @@ -67,7 +67,7 @@ def requirements(self): if self.options.with_lz4: self.requires("lz4/1.9.4") if self.options.with_zlib in ["zlib-ng", "zlib-ng-compat"]: - self.requires("zlib-ng/2.1.2") + self.requires("zlib-ng/2.1.3") elif self.options.with_zlib == "zlib": self.requires("zlib/1.2.13") if self.options.with_zstd: @@ -132,6 +132,8 @@ def package(self): cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "cmake")) # Remove MS runtime files for dll_pattern_to_remove in ["concrt*.dll", "msvcp*.dll", "vcruntime*.dll"]: diff --git a/recipes/c-blosc2/all/patches/2.10.2-0001-fix-cmake.patch b/recipes/c-blosc2/all/patches/2.10.2-0001-fix-cmake.patch new file mode 100644 index 0000000000000..b530262f17fda --- /dev/null +++ b/recipes/c-blosc2/all/patches/2.10.2-0001-fix-cmake.patch @@ -0,0 +1,139 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4b4fc6a..79d61da 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -152,26 +152,26 @@ if(BUILD_LITE) + endif() + + if(PREFER_EXTERNAL_LZ4) +- find_package(LZ4) ++ find_package(lz4) + else() + message(STATUS "Using LZ4 internal sources.") + endif() + + if(NOT DEACTIVATE_ZLIB) + if(PREFER_EXTERNAL_ZLIB) +- find_package(ZLIB_NG) +- if(ZLIB_NG_FOUND) ++ find_package(zlib_ng) ++ if(zlib_ng_FOUND) + set(HAVE_ZLIB_NG TRUE) + else() + find_package(ZLIB) + endif() + +- if(NOT (ZLIB_NG_FOUND OR ZLIB_FOUND)) ++ if(NOT (zlib_ng_FOUND OR ZLIB_FOUND)) + message(STATUS "No ZLIB found. Using ZLIB-NG internal sources.") + endif() + endif() + +- if(NOT (ZLIB_NG_FOUND OR ZLIB_FOUND)) ++ if(0) + message(STATUS "Using ZLIB-NG internal sources for ZLIB support.") + set(HAVE_ZLIB_NG TRUE) + add_definitions(-DZLIB_COMPAT) +@@ -192,8 +192,8 @@ endif() + + if(NOT DEACTIVATE_ZSTD) + if(PREFER_EXTERNAL_ZSTD) +- find_package(ZSTD) +- if(NOT ZSTD_FOUND) ++ find_package(zstd) ++ if(NOT zstd_FOUND) + message(STATUS "No ZSTD library found. Using internal sources.") + endif() + else() +diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt +index b44b710..681705e 100644 +--- a/blosc/CMakeLists.txt ++++ b/blosc/CMakeLists.txt +@@ -79,15 +79,15 @@ set(INTERNAL_LIBS ${PROJECT_SOURCE_DIR}/internal-complibs) + # link dependencies + # "link" dependent targets via target_link_libraries (preferred) and + # manually add includes / libs for others +-if(LZ4_FOUND) ++if(lz4_FOUND) + if(BUILD_SHARED) +- target_include_directories(blosc2_shared PUBLIC ${LZ4_INCLUDE_DIR}) ++ target_include_directories(blosc2_shared PUBLIC ${lz4_INCLUDE_DIR}) + endif() + if(BUILD_STATIC) +- target_include_directories(blosc2_static PUBLIC ${LZ4_INCLUDE_DIR}) ++ target_include_directories(blosc2_static PUBLIC ${lz4_INCLUDE_DIR}) + endif() + if(BUILD_TESTS) +- target_include_directories(blosc_testing PUBLIC ${LZ4_INCLUDE_DIR}) ++ target_include_directories(blosc_testing PUBLIC ${lz4_INCLUDE_DIR}) + endif() + else() + set(LZ4_LOCAL_DIR ${INTERNAL_LIBS}/lz4-1.9.4) +@@ -138,18 +138,18 @@ if(NOT DEACTIVATE_ZLIB) + endif() + + if(NOT DEACTIVATE_ZSTD) +- if(ZSTD_FOUND) ++ if(zstd_FOUND) + if(BUILD_SHARED) +- target_include_directories(blosc2_shared PUBLIC ${ZSTD_INCLUDE_DIR}) +- target_link_libraries(blosc2_shared PUBLIC ${ZSTD_LIBRARY}) ++ target_include_directories(blosc2_shared PUBLIC ${zstd_INCLUDE_DIR}) ++ target_link_libraries(blosc2_shared PUBLIC ${zstd_LIBRARY}) + endif() + if(BUILD_STATIC) +- target_include_directories(blosc2_static PUBLIC ${ZSTD_INCLUDE_DIR}) +- target_link_libraries(blosc2_static PUBLIC ${ZSTD_LIBRARY}) ++ target_include_directories(blosc2_static PUBLIC ${zstd_INCLUDE_DIR}) ++ target_link_libraries(blosc2_static PUBLIC ${zstd_LIBRARY}) + endif() + if(BUILD_TESTS) +- target_include_directories(blosc_testing PUBLIC ${ZSTD_INCLUDE_DIR}) +- target_link_libraries(blosc_testing PUBLIC ${ZSTD_LIBRARY}) ++ target_include_directories(blosc_testing PUBLIC ${zstd_INCLUDE_DIR}) ++ target_link_libraries(blosc_testing PUBLIC ${zstd_LIBRARY}) + endif() + else() + set(ZSTD_LOCAL_DIR ${INTERNAL_LIBS}/zstd-1.5.5) +@@ -190,8 +190,8 @@ else() + set(LIBS ${LIBS} ${CMAKE_DL_LIBS}) + endif() + +-if(LZ4_FOUND) +- set(LIBS ${LIBS} ${LZ4_LIBRARY}) ++if(lz4_FOUND) ++ set(LIBS ${LIBS} ${lz4_LIBRARIES}) + else() + file(GLOB LZ4_FILES ${LZ4_LOCAL_DIR}/*.c) + list(APPEND SOURCES ${LZ4_FILES}) +@@ -199,8 +199,8 @@ else() + endif() + + if(NOT DEACTIVATE_ZLIB) +- if(ZLIB_NG_FOUND) +- set(LIBS ${LIBS} ${ZLIB_NG_LIBRARY}) ++ if(zlib_ng_FOUND) ++ set(LIBS ${LIBS} ${zlib_ng_LIBRARIES}) + elseif(ZLIB_FOUND) + set(LIBS ${LIBS} ${ZLIB_LIBRARIES}) + else() +@@ -212,8 +212,8 @@ if(NOT DEACTIVATE_ZLIB) + endif() + + if(NOT DEACTIVATE_ZSTD) +- if(ZSTD_FOUND) +- set(LIBS ${LIBS} ${ZSTD_LIBRARY}) ++ if(zstd_FOUND) ++ set(LIBS ${LIBS} ${zstd_LIBRARIES}) + else() + # Enable assembly code only when not using MSVC *and* x86 is there + if((NOT MSVC) AND COMPILER_SUPPORT_SSE2) # if SSE2 is here, this is an x86 platform +@@ -268,7 +268,7 @@ list(APPEND SOURCES + blosc/directories.c + blosc/blosc2-stdio.c + blosc/b2nd.c +- blosc/b2nd_utils.c ++ blosc/b2nd_utils.c + ) + if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL arm64) + if(COMPILER_SUPPORT_SSE2) diff --git a/recipes/c-blosc2/config.yml b/recipes/c-blosc2/config.yml index 94edc65e4565a..42ffc68cfe344 100644 --- a/recipes/c-blosc2/config.yml +++ b/recipes/c-blosc2/config.yml @@ -1,4 +1,6 @@ versions: + "2.10.2": + folder: all "2.10.0": folder: all "2.8.0": From 2b2cfd77dc31982370a89f21528623f38ab0f30e Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 30 Aug 2023 20:58:56 +0900 Subject: [PATCH 462/637] (#19437) drogon: add version 1.8.6, fix compilation error on 1.8.5 with yaml-cpp --- recipes/drogon/all/conandata.yml | 10 +++ recipes/drogon/all/conanfile.py | 8 ++- .../1.8.5-0002-find-cci-packages.patch | 16 ++--- .../1.8.6-0002-find-cci-packages.patch | 71 +++++++++++++++++++ recipes/drogon/config.yml | 2 + 5 files changed, 96 insertions(+), 11 deletions(-) create mode 100644 recipes/drogon/all/patches/1.8.6-0002-find-cci-packages.patch diff --git a/recipes/drogon/all/conandata.yml b/recipes/drogon/all/conandata.yml index 5ff1403cfce78..d62ebab92171a 100644 --- a/recipes/drogon/all/conandata.yml +++ b/recipes/drogon/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.8.6": + url: "https://github.com/drogonframework/drogon/archive/v1.8.6.tar.gz" + sha256: "ff02979f28047e97e19e36d1f363b3052b8122975fa8a379305d746dfe5fb004" "1.8.5": url: "https://github.com/drogonframework/drogon/archive/v1.8.5.tar.gz" sha256: "9469f99408c114bc1e89945a3a8dab4640ea6d8cb06e7d42f06c1dfda3f71d2a" @@ -18,6 +21,13 @@ sources: url: "https://github.com/drogonframework/drogon/archive/refs/tags/v1.7.5.tar.gz" sha256: "e2af7c55dcabafef16f26f5b3242692f5a2b54c19b7b626840bf9132d24766f6" patches: + "1.8.6": + - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" + patch_description: "remove shared libs option" + patch_type: "conan" + - patch_file: "patches/1.8.6-0002-find-cci-packages.patch" + patch_description: "Fix jsoncpp cmake target name" + patch_type: "conan" "1.8.5": - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" patch_description: "remove shared libs option" diff --git a/recipes/drogon/all/conanfile.py b/recipes/drogon/all/conanfile.py index fc1a2251f569c..1cde167ffc5cc 100644 --- a/recipes/drogon/all/conanfile.py +++ b/recipes/drogon/all/conanfile.py @@ -57,6 +57,8 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "1.8.4": + del self.options.with_yaml_cpp def configure(self): if self.options.shared: @@ -128,8 +130,8 @@ def requirements(self): self.requires("sqlite3/3.42.0") if self.options.get_safe("with_redis"): self.requires("hiredis/1.2.0") - if self.options.with_yaml_cpp: - self.requires("yaml-cpp/0.7.0") + if self.options.get_safe("with_yaml_cpp", False): + self.requires("yaml-cpp/0.8.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -146,7 +148,7 @@ def generate(self): tc.variables["BUILD_DROGON_SHARED"] = self.options.shared tc.variables["BUILD_DOC"] = False tc.variables["BUILD_BROTLI"] = self.options.with_brotli - tc.variables["BUILD_YAML_CONFIG"] = self.options.with_yaml_cpp + tc.variables["BUILD_YAML_CONFIG"] = self.options.get_safe("with_yaml_cpp", False) tc.variables["BUILD_POSTGRESQL"] = self.options.get_safe("with_postgres", False) tc.variables["BUILD_POSTGRESQL_BATCH"] = self.options.get_safe("with_postgres_batch", False) tc.variables["BUILD_MYSQL"] = self.options.get_safe("with_mysql", False) diff --git a/recipes/drogon/all/patches/1.8.5-0002-find-cci-packages.patch b/recipes/drogon/all/patches/1.8.5-0002-find-cci-packages.patch index c0d5c051d80a7..8bf9e60842f93 100644 --- a/recipes/drogon/all/patches/1.8.5-0002-find-cci-packages.patch +++ b/recipes/drogon/all/patches/1.8.5-0002-find-cci-packages.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index e3e7fcf..b82cb66 100755 +index e3e7fcf..d1032da 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,9 +198,9 @@ else() @@ -15,15 +15,15 @@ index e3e7fcf..b82cb66 100755 # yamlcpp if(BUILD_YAML_CONFIG) -@@ -217,7 +217,7 @@ if(BUILD_YAML_CONFIG) +@@ -212,7 +212,7 @@ if(BUILD_YAML_CONFIG) + message(STATUS "yaml-cpp not used") + else() + message(STATUS "yaml-cpp found ") +- target_link_libraries(${PROJECT_NAME} PUBLIC ${YAML_CPP_LINK_LIBRARY}) ++ target_link_libraries(${PROJECT_NAME} PUBLIC yaml-cpp) + target_compile_definitions(${PROJECT_NAME} PUBLIC HAS_YAML_CPP) endif() else() - message(STATUS "yaml-cpp found ") -- target_link_libraries(${PROJECT_NAME} PUBLIC ${YAML_CPP_LIBRARIES}) -+ target_link_libraries(${PROJECT_NAME} PUBLIC yaml-cpp) - target_compile_definitions(${PROJECT_NAME} PUBLIC HAS_YAML_CPP) - endif() - else() @@ -442,7 +442,7 @@ if (BUILD_SQLITE) find_package(SQLite3 QUIET) find_package(unofficial-sqlite3 QUIET) diff --git a/recipes/drogon/all/patches/1.8.6-0002-find-cci-packages.patch b/recipes/drogon/all/patches/1.8.6-0002-find-cci-packages.patch new file mode 100644 index 0000000000000..3da404b88ccc2 --- /dev/null +++ b/recipes/drogon/all/patches/1.8.6-0002-find-cci-packages.patch @@ -0,0 +1,71 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a3ba35a..26fed2a 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -198,9 +198,9 @@ else() + endif() + + # jsoncpp +-find_package(Jsoncpp REQUIRED) +-target_link_libraries(${PROJECT_NAME} PUBLIC Jsoncpp_lib) +-list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${JSONCPP_INCLUDE_DIRS}) ++find_package(jsoncpp REQUIRED) ++target_link_libraries(${PROJECT_NAME} PUBLIC jsoncpp_lib) ++list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${jsoncpp_INCLUDE_DIRS}) + + # yamlcpp + if(BUILD_YAML_CONFIG) +@@ -212,7 +212,7 @@ if(BUILD_YAML_CONFIG) + message(STATUS "yaml-cpp not used") + else() + message(STATUS "yaml-cpp found ") +- target_link_libraries(${PROJECT_NAME} PUBLIC ${YAML_CPP_LINK_LIBRARY}) ++ target_link_libraries(${PROJECT_NAME} PUBLIC yaml-cpp) + target_compile_definitions(${PROJECT_NAME} PUBLIC HAS_YAML_CPP) + endif() + else() +@@ -444,7 +444,7 @@ if (BUILD_SQLITE) + find_package(SQLite3 QUIET) + find_package(unofficial-sqlite3 QUIET) + if (SQLite3_FOUND) +- target_link_libraries(${PROJECT_NAME} PRIVATE SQLite3_lib) ++ target_link_libraries(${PROJECT_NAME} PRIVATE SQLite::SQLite3) + set(DROGON_FOUND_SQLite3 TRUE) + elseif (unofficial-sqlite3_FOUND) + target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::sqlite3::sqlite3) +@@ -467,10 +467,10 @@ if (BUILD_SQLITE) + endif (BUILD_SQLITE) + + if (BUILD_REDIS) +- find_package(Hiredis) +- if (Hiredis_FOUND) ++ find_package(hiredis) ++ if (hiredis_FOUND) + add_definitions(-DUSE_REDIS) +- target_link_libraries(${PROJECT_NAME} PRIVATE Hiredis_lib) ++ target_link_libraries(${PROJECT_NAME} PRIVATE hiredis::hiredis) + set(DROGON_SOURCES + ${DROGON_SOURCES} + nosql_lib/redis/src/RedisClientImpl.cc +@@ -490,10 +490,10 @@ if (BUILD_REDIS) + nosql_lib/redis/src/SubscribeContext.h + nosql_lib/redis/src/RedisSubscriberImpl.h) + +- endif (Hiredis_FOUND) ++ endif () + endif (BUILD_REDIS) + +-if (NOT Hiredis_FOUND) ++if (NOT hiredis_FOUND) + set(DROGON_SOURCES + ${DROGON_SOURCES} + lib/src/RedisClientSkipped.cc +@@ -502,7 +502,7 @@ if (NOT Hiredis_FOUND) + set(private_headers + ${private_headers} + lib/src/RedisClientManager.h) +-endif (NOT Hiredis_FOUND) ++endif () + + if (BUILD_TESTING) + add_subdirectory(nosql_lib/redis/tests) diff --git a/recipes/drogon/config.yml b/recipes/drogon/config.yml index bf708bafce8a9..62f17e07b2e95 100644 --- a/recipes/drogon/config.yml +++ b/recipes/drogon/config.yml @@ -1,4 +1,6 @@ versions: + "1.8.6": + folder: "all" "1.8.5": folder: "all" "1.8.4": From 9080ff11d6f8014b4a508fb919d3ef6f9c29dd35 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 30 Aug 2023 21:51:49 +0900 Subject: [PATCH 463/637] (#19441) dbg-macro: add version 0.5.0 --- recipes/dbg-macro/all/conandata.yml | 7 +++++-- recipes/dbg-macro/all/conanfile.py | 26 ++++++++++++++++---------- recipes/dbg-macro/config.yml | 2 ++ 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/recipes/dbg-macro/all/conandata.yml b/recipes/dbg-macro/all/conandata.yml index 695393e722d3f..4beffe08cb1f1 100644 --- a/recipes/dbg-macro/all/conandata.yml +++ b/recipes/dbg-macro/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.5.0": + url: "https://github.com/sharkdp/dbg-macro/archive/v0.5.0.tar.gz" + sha256: "dac4907aadf39dbd9eac279a214c59ad30af6c0c3d585688242f73cb1a9ce243" "0.4.0": - sha256: e44a1206fbfd1d3dc8ad649f387df479d288b08c80cf2f1239ccb4e26148d781 - url: https://github.com/sharkdp/dbg-macro/archive/v0.4.0.tar.gz + url: "https://github.com/sharkdp/dbg-macro/archive/v0.4.0.tar.gz" + sha256: "e44a1206fbfd1d3dc8ad649f387df479d288b08c80cf2f1239ccb4e26148d781" diff --git a/recipes/dbg-macro/all/conanfile.py b/recipes/dbg-macro/all/conanfile.py index 5955544e24b0d..c4b00757159da 100644 --- a/recipes/dbg-macro/all/conanfile.py +++ b/recipes/dbg-macro/all/conanfile.py @@ -9,7 +9,6 @@ required_conan_version = ">=1.52.0" - class DbgMacroConan(ConanFile): name = "dbg-macro" description = "A dbg(...) macro for C++" @@ -17,11 +16,20 @@ class DbgMacroConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/sharkdp/dbg-macro" topics = ("debugging", "macro", "pretty-printing", "header-only") - package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + } + def layout(self): basic_layout(self, src_folder="src") @@ -30,15 +38,13 @@ def package_id(self): def validate(self): if self.settings.compiler.get_safe('cppstd'): - check_min_cppstd(self, 17) - - min_versions = { - "gcc": 8 - } + check_min_cppstd(self, self._min_cppstd) - compiler = self.settings.compiler - if str(compiler) in min_versions and Version(compiler.version) < min_versions[str(compiler)]: - raise ConanInvalidConfiguration("dbg-macro requires C++17 which your compiler does not support.") + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/dbg-macro/config.yml b/recipes/dbg-macro/config.yml index da269653d6e6b..49f293dbf1971 100644 --- a/recipes/dbg-macro/config.yml +++ b/recipes/dbg-macro/config.yml @@ -1,3 +1,5 @@ versions: + "0.5.0": + folder: "all" "0.4.0": folder: "all" From 71967a0558009446af91f15deba61d5180c13a1b Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 30 Aug 2023 22:10:20 +0900 Subject: [PATCH 464/637] (#19449) clickhouse-cpp: enable `with_openssl` options * clickhouse-cpp: enable `enable_benchmark` and `with_openssl` options * remove `enable_benchmark` option * remove patches * remove patch functions --- recipes/clickhouse-cpp/all/conanfile.py | 69 +++++++++---------- .../all/test_package/CMakeLists.txt | 5 +- 2 files changed, 33 insertions(+), 41 deletions(-) diff --git a/recipes/clickhouse-cpp/all/conanfile.py b/recipes/clickhouse-cpp/all/conanfile.py index 442d24123399e..df83d233feb8a 100644 --- a/recipes/clickhouse-cpp/all/conanfile.py +++ b/recipes/clickhouse-cpp/all/conanfile.py @@ -10,39 +10,24 @@ class ClickHouseCppConan(ConanFile): name = "clickhouse-cpp" - homepage = "https://github.com/ClickHouse/clickhouse-cpp" - url = "https://github.com/conan-io/conan-center-index" description = "ClickHouse C++ API" license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ClickHouse/clickhouse-cpp" topics = ("database", "db", "clickhouse") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], - "enable_benchmark": [True, False], - "with_openssl": [True, False] + "with_openssl": [True, False], } default_options = { "shared": False, "fPIC": True, - "enable_benchmark": False, - "with_openssl": False + "with_openssl": False, } - def requirements(self): - - self.requires("lz4/1.9.4") - - self.requires("abseil/20230125.3", transitive_headers=True) - - self.requires("cityhash/cci.20130801") - if self.options.with_openssl: - self.requires("openssl/[>=1.1 <4]") - - def build_requirements(self): - if self.options.enable_benchmark: - self.requires("benchmark/1.8.0") - @property def _min_cppstd(self): return "17" @@ -58,17 +43,9 @@ def _compilers_minimum_version(self): @property def _requires_compiler_rt(self): - return self.settings.compiler == "clang" and (( self.settings.compiler.libcxx in ["libstdc++", "libstdc++11"] and not self.options.shared) or self.settings.compiler.libcxx == "libc++" ) - - def validate(self): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, self._min_cppstd) - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration(f"{self.ref} requires C++17, which your compiler does not support.") - if self.settings.os == "Windows" and self.options.shared: - raise ConanInvalidConfiguration("f{self.ref} does not support shared library on Windows.") - # look at https://github.com/ClickHouse/clickhouse-cpp/pull/226 + return self.settings.compiler == "clang" and \ + ((self.settings.compiler.libcxx in ["libstdc++", "libstdc++11"] and not self.options.shared) or \ + self.settings.compiler.libcxx == "libc++") def config_options(self): if self.settings.os == "Windows": @@ -81,15 +58,30 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") + def requirements(self): + self.requires("lz4/1.9.4") + self.requires("abseil/20230125.3", transitive_headers=True) + self.requires("cityhash/cci.20130801") + if self.options.with_openssl: + self.requires("openssl/[>=1.1 <4]") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") + if self.settings.os == "Windows" and self.options.shared: + raise ConanInvalidConfiguration(f"{self.ref} does not support shared library on Windows.") + # look at https://github.com/ClickHouse/clickhouse-cpp/pull/226 + def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) - tc.variables["BUILD_BENCHMARK"] = self.options.enable_benchmark tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared - tc.variables["WITH_OPENSSL"] = self.options.with_openssl + tc.cache_variables["WITH_OPENSSL"] = self.options.with_openssl tc.cache_variables["WITH_SYSTEM_ABSEIL"] = True tc.cache_variables["WITH_SYSTEM_LZ4"] = True tc.cache_variables["WITH_SYSTEM_CITYHASH"] = True @@ -118,10 +110,11 @@ def package_info(self): self.cpp_info.sharedlinkflags = ldflags self.cpp_info.system_libs.append("gcc_s") + if self.settings.os == 'Windows': + self.cpp_info.system_libs = ['ws2_32', 'wsock32'] + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "clickhouse-cpp" self.cpp_info.filenames["cmake_find_package_multi"] = "clickhouse-cpp" self.cpp_info.names["cmake_find_package"] = "clickhouse-cpp-lib" self.cpp_info.names["cmake_find_package_multi"] = "clickhouse-cpp-lib" - - if self.settings.os == 'Windows': - self.cpp_info.system_libs = ['ws2_32', 'wsock32'] diff --git a/recipes/clickhouse-cpp/all/test_package/CMakeLists.txt b/recipes/clickhouse-cpp/all/test_package/CMakeLists.txt index b042c5663ae08..ede8071f6e744 100644 --- a/recipes/clickhouse-cpp/all/test_package/CMakeLists.txt +++ b/recipes/clickhouse-cpp/all/test_package/CMakeLists.txt @@ -4,6 +4,5 @@ project(test_package LANGUAGES CXX) find_package(clickhouse-cpp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE clickhouse-cpp-lib::clickhouse-cpp-lib ) - -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) +target_link_libraries(${PROJECT_NAME} PRIVATE clickhouse-cpp-lib::clickhouse-cpp-lib) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) From 2c90241e93734b102aa7aeefd761463620cef99e Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 30 Aug 2023 22:53:49 +0900 Subject: [PATCH 465/637] (#19481) libheif: add version 1.16.2, update dependencies * libheif: add version 1.16.2, update dependencies * revert CXX STANDARD for 1.16.2 --- recipes/libheif/all/conandata.yml | 5 ++ recipes/libheif/all/conanfile.py | 7 +-- .../all/patches/0001-cmake_1.16.2.patch | 48 +++++++++++++++++++ recipes/libheif/config.yml | 2 + 4 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 recipes/libheif/all/patches/0001-cmake_1.16.2.patch diff --git a/recipes/libheif/all/conandata.yml b/recipes/libheif/all/conandata.yml index c5668b6d3c93a..3ec98d8c37e22 100644 --- a/recipes/libheif/all/conandata.yml +++ b/recipes/libheif/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.16.2": + url: "https://github.com/strukturag/libheif/releases/download/v1.16.2/libheif-1.16.2.tar.gz" + sha256: "7f97e4205c0bd9f9b8560536c8bd2e841d1c9a6d610401eb3eb87ed9cdfe78ea" "1.13.0": url: "https://github.com/strukturag/libheif/releases/download/v1.13.0/libheif-1.13.0.tar.gz" sha256: "c20ae01bace39e89298f6352f1ff4a54b415b33b9743902da798e8a1e51d7ca1" @@ -12,6 +15,8 @@ sources: url: "https://github.com/strukturag/libheif/releases/download/v1.9.1/libheif-1.9.1.tar.gz" sha256: "5f65ca2bd2510eed4e13bdca123131c64067e9dd809213d7aef4dc5e37948bca" patches: + "1.16.2": + - patch_file: "patches/0001-cmake_1.16.2.patch" "1.13.0": - patch_file: "patches/0001-cmake_1.13.0.patch" "1.12.0": diff --git a/recipes/libheif/all/conanfile.py b/recipes/libheif/all/conanfile.py index 55d521d49ca38..912d662dba19e 100644 --- a/recipes/libheif/all/conanfile.py +++ b/recipes/libheif/all/conanfile.py @@ -50,13 +50,13 @@ def layout(self): def requirements(self): if self.options.with_libde265: - self.requires("libde265/1.0.9") + self.requires("libde265/1.0.12") if self.options.with_x265: self.requires("libx265/3.4") if self.options.with_libaomav1: - self.requires("libaom-av1/3.5.0") + self.requires("libaom-av1/3.6.1") if self.options.with_dav1d: - self.requires("dav1d/1.0.0") + self.requires("dav1d/1.2.1") def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -73,6 +73,7 @@ def generate(self): tc.variables["WITH_RAV1E"] = False tc.variables["WITH_DAV1D"] = self.options.with_dav1d tc.variables["WITH_EXAMPLES"] = False + tc.variables["WITH_GDK_PIXBUF"] = False tc.generate() deps = CMakeDeps(self) deps.generate() diff --git a/recipes/libheif/all/patches/0001-cmake_1.16.2.patch b/recipes/libheif/all/patches/0001-cmake_1.16.2.patch new file mode 100644 index 0000000000000..2743295160550 --- /dev/null +++ b/recipes/libheif/all/patches/0001-cmake_1.16.2.patch @@ -0,0 +1,48 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index de15948..589eab5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,7 +41,7 @@ set(CMAKE_CXX_EXTENSIONS OFF) + + set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) + +-set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++# set(CMAKE_POSITION_INDEPENDENT_CODE ON) + + # Create the compile command database for clang by default + set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +@@ -54,7 +54,7 @@ if (has_potentially_evaluated_expression) + add_definitions(-Wno-error=potentially-evaluated-expression) + endif() + +-LIST (APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules") ++# LIST (APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules") + + option(ENABLE_PLUGIN_LOADING "Support loading of plugins" ON) + set(PLUGIN_DIRECTORY "${CMAKE_INSTALL_FULL_LIBDIR}/libheif" CACHE STRING "Plugin install directory") +@@ -88,11 +88,11 @@ macro(plugin_option variableName packageName displayName displayType defaultPlug + unset(msg) + endmacro() + +-plugin_option(LIBDE265 LIBDE265 "libde265" "HEIC decoder" OFF) +-plugin_option(X265 X265 "x265" "HEIC encoder" OFF) +-plugin_option(DAV1D DAV1D "Dav1d" "AVIF decoder" OFF) +-plugin_option(AOM_ENCODER AOM "aom" "AVIF encoder" OFF) +-plugin_option(AOM_DECODER AOM "aom" "AVIF decoder" OFF) ++plugin_option(LIBDE265 libde265 "libde265" "HEIC decoder" OFF) ++plugin_option(X265 libx265 "x265" "HEIC encoder" OFF) ++plugin_option(DAV1D dav1d "Dav1d" "AVIF decoder" OFF) ++plugin_option(AOM_ENCODER libaom-av1 "aom" "AVIF encoder" OFF) ++plugin_option(AOM_DECODER libaom-av1 "aom" "AVIF decoder" OFF) + plugin_option(SvtEnc SvtEnc "Svt-av1" "AVIF encoder" ON) + plugin_option(RAV1E RAV1E "Rav1e" "AVIF encoder" ON) + +@@ -219,7 +219,7 @@ if (WITH_GDK_PIXBUF) + add_subdirectory (gdk-pixbuf) + endif() + +-add_subdirectory (gnome) ++#add_subdirectory (gnome) + + + # --- packaging (source code) diff --git a/recipes/libheif/config.yml b/recipes/libheif/config.yml index 1b1bac20e2e23..887a8fb56ade3 100644 --- a/recipes/libheif/config.yml +++ b/recipes/libheif/config.yml @@ -1,4 +1,6 @@ versions: + "1.16.2": + folder: all "1.13.0": folder: all "1.12.0": From afc52e7200b8f6ac9830c740f70294f15230f7ad Mon Sep 17 00:00:00 2001 From: trns1997 <17682846+trns1997@users.noreply.github.com> Date: Wed, 30 Aug 2023 16:52:38 +0200 Subject: [PATCH 466/637] (#19482) kickcat: add version v2-alpha4 --- recipes/kickcat/all/conandata.yml | 3 +++ recipes/kickcat/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/kickcat/all/conandata.yml b/recipes/kickcat/all/conandata.yml index 19c0f19034aff..f0a390ebfac91 100644 --- a/recipes/kickcat/all/conandata.yml +++ b/recipes/kickcat/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "v2-alpha4": + url: "https://github.com/Siviuze/KickCAT/archive/refs/tags/v2-alpha4.zip" + sha256: "483a374f77808cb35823652eb37c5ab864a3f12a1c3a957d3315c319ca0ec528" "v2-alpha3": url: "https://github.com/Siviuze/KickCAT/archive/refs/tags/v2-alpha3.zip" sha256: "dadd8518c3232162b7455fdcd837578120ece5a42c3bc2701147a68cbee60da4" diff --git a/recipes/kickcat/config.yml b/recipes/kickcat/config.yml index 7990d533925c9..e031f21fd364a 100644 --- a/recipes/kickcat/config.yml +++ b/recipes/kickcat/config.yml @@ -1,3 +1,5 @@ versions: + "v2-alpha4": + folder: all "v2-alpha3": folder: all From fc909b33f7976b7e3eead23c8a1f473452c48f63 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 30 Aug 2023 17:32:13 +0200 Subject: [PATCH 467/637] (#19486) fruit: fix import of Version + add package_type + bump boost + remove deprecated option use_boost * fix import of Version * add package_type * bump boost * remove deprecated option use_boost * sort versions --- recipes/fruit/all/conanfile.py | 27 ++++++++++++--------------- recipes/fruit/config.yml | 8 ++++---- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/recipes/fruit/all/conanfile.py b/recipes/fruit/all/conanfile.py index 39e570bb06b3a..9ad222d0dcc88 100644 --- a/recipes/fruit/all/conanfile.py +++ b/recipes/fruit/all/conanfile.py @@ -3,11 +3,12 @@ import tarfile from fnmatch import fnmatch -from conan import ConanFile, Version +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 apply_conandata_patches, copy, download, export_conandata_patches, get +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -19,16 +20,18 @@ class FruitConan(ConanFile): homepage = "https://github.com/google/fruit" license = "Apache-2.0" topics = ("injection", "framework") - settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], - "use_boost": [True, False, "deprecated"], - "with_boost": [True, False], - "fPIC": [True, False]} + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_boost": [True, False], + } default_options = { "shared": False, - "use_boost": "deprecated", + "fPIC": True, "with_boost": True, - "fPIC": True} + } def export_sources(self): export_conandata_patches(self) @@ -37,22 +40,16 @@ def config_options(self): if self.settings.os == "Windows": self.options.rm_safe("fPIC") - def package_id(self): - del self.info.options.use_boost - def configure(self): if self.options.shared: self.options.rm_safe("fPIC") - if self.options.use_boost != "deprecated": - self.output.warn("use_boost option is deprecated, use the option with_boost instead.") - self.options.with_boost = self.options.use_boost def layout(self): cmake_layout(self, src_folder="src") def requirements(self): if self.options.with_boost: - self.requires("boost/1.80.0") + self.requires("boost/1.83.0") def validate(self): if self.settings.compiler.cppstd: diff --git a/recipes/fruit/config.yml b/recipes/fruit/config.yml index 684a4c74b2542..63afa5b5e5a82 100644 --- a/recipes/fruit/config.yml +++ b/recipes/fruit/config.yml @@ -1,11 +1,11 @@ versions: - "3.4.0": + "3.7.1": folder: all - "3.5.0": + "3.7.0": folder: all "3.6.0": folder: all - "3.7.0": + "3.5.0": folder: all - "3.7.1": + "3.4.0": folder: all From b4168bed9731b447500fe699bdea89c09bc94ee6 Mon Sep 17 00:00:00 2001 From: igormironchik Date: Wed, 30 Aug 2023 19:11:47 +0300 Subject: [PATCH 468/637] (#19492) md4qt: bump version --- recipes/md4qt/all/conandata.yml | 3 +++ recipes/md4qt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index f39e87f6d648d..08359be96706f 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.15": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.15.tar.gz" + sha256: "53c4a65bb178afde91ae2360072f65a44ae7572a25912a3fe96aeaa6ac86ef27" "2.0.14": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.14.tar.gz" sha256: "b230f1a99a2a5f4f1f32748d52062276294b34d8254d4128193632e3a8ffaa4e" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index 8252adb029767..f9a27817ba435 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.15": + folder: all "2.0.14": folder: all "2.0.13": From da682703bcf8c3c0e8d9f2fe0b4989fc64c8a973 Mon Sep 17 00:00:00 2001 From: Sergey Bobrenok Date: Thu, 31 Aug 2023 01:12:33 +0300 Subject: [PATCH 469/637] (#19507) libcap/2.69: Bump version --- recipes/libcap/all/conandata.yml | 10 ++++++++++ recipes/libcap/config.yml | 2 ++ 2 files changed, 12 insertions(+) diff --git a/recipes/libcap/all/conandata.yml b/recipes/libcap/all/conandata.yml index 5d119b718f418..16d2439fd2b12 100644 --- a/recipes/libcap/all/conandata.yml +++ b/recipes/libcap/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.69": + url: "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.69.tar.xz" + sha256: "f311f8f3dad84699d0566d1d6f7ec943a9298b28f714cae3c931dfd57492d7eb" "2.68": url: "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.68.tar.xz" sha256: "90be3b6d41be5f81ae4b03ec76012b0d27c829293684f6c05b65d5f9cce724b2" @@ -30,6 +33,13 @@ sources: url: "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.45.tar.xz" sha256: "d66639f765c0e10557666b00f519caf0bd07a95f867dddaee131cd284fac3286" patches: + "2.69": + - patch_file: "patches/2.57/0001-libcap-Remove-hardcoded-fPIC.patch" + patch_description: "allow to configure fPIC option from conan recipe" + patch_type: "conan" + - patch_file: "patches/2.57/0002-Make.Rules-Make-compile-tools-configurable.patch" + patch_description: "allow to override compiler via environment variables" + patch_type: "conan" "2.68": - patch_file: "patches/2.57/0001-libcap-Remove-hardcoded-fPIC.patch" patch_description: "allow to configure fPIC option from conan recipe" diff --git a/recipes/libcap/config.yml b/recipes/libcap/config.yml index 24a13cbb3bd22..9ca623681ce66 100644 --- a/recipes/libcap/config.yml +++ b/recipes/libcap/config.yml @@ -1,4 +1,6 @@ versions: + "2.69": + folder: all "2.68": folder: all "2.66": From 907b07884a22f3e41d17755c4332f450f0f3c168 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Thu, 31 Aug 2023 09:59:15 +0200 Subject: [PATCH 470/637] (#19503) ccache: add version 4.8.3 --- recipes/ccache/all/conandata.yml | 7 +++++++ recipes/ccache/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/ccache/all/conandata.yml b/recipes/ccache/all/conandata.yml index 1eab23f47e9eb..ca431f6e0685b 100644 --- a/recipes/ccache/all/conandata.yml +++ b/recipes/ccache/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.8.3": + url: "https://github.com/ccache/ccache/releases/download/v4.8.3/ccache-4.8.3.tar.xz" + sha256: "e47374c810b248cfca3665ee1d86c7c763ffd68d9944bc422d9c1872611f2b11" "4.8.2": url: "https://github.com/ccache/ccache/releases/download/v4.8.2/ccache-4.8.2.tar.xz" sha256: "3d3fb3f888a5b16c4fa7ee5214cca76348afd6130e8443de5f6f2424f2076a49" @@ -12,6 +15,10 @@ sources: url: "https://github.com/ccache/ccache/releases/download/v4.7.4/ccache-4.7.4.tar.xz" sha256: "df0c64d15d3efaf0b4f6837dd6b1467e40eeaaa807db25ce79c3a08a46a84e36" patches: + "4.8.3": + - patch_file: "patches/4.8-cmake-msvc-runtime.patch" + patch_description: "fixup MSVC runtime" + patch_type: "conan" "4.8.2": - patch_file: "patches/4.8-cmake-msvc-runtime.patch" patch_description: "fixup MSVC runtime" diff --git a/recipes/ccache/config.yml b/recipes/ccache/config.yml index a08cbff67b811..98dd3df9a94de 100644 --- a/recipes/ccache/config.yml +++ b/recipes/ccache/config.yml @@ -1,4 +1,6 @@ versions: + "4.8.3": + folder: all "4.8.2": folder: all "4.8.1": From 71d7e4baa5ce4af619876ad45011a80d0d76631c Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 31 Aug 2023 18:33:02 +0900 Subject: [PATCH 471/637] (#19405) glaze: add version 1.4.0, remove older versions with patch file --- recipes/glaze/all/conandata.yml | 14 ++-------- recipes/glaze/all/conanfile.py | 22 ++------------- .../patches/0.2.0-0001-use-cci-frozen.patch | 28 ------------------- recipes/glaze/all/test_package/CMakeLists.txt | 3 -- recipes/glaze/config.yml | 6 ++-- 5 files changed, 8 insertions(+), 65 deletions(-) delete mode 100644 recipes/glaze/all/patches/0.2.0-0001-use-cci-frozen.patch diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index b43003828dbc6..31bad0f747ccc 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.0": + url: "https://github.com/stephenberry/glaze/archive/v1.4.0.tar.gz" + sha256: "301c831e2476529bfa1ea24d87011186da91644830bdf57e1ed99bc7f6326989" "1.3.6": url: "https://github.com/stephenberry/glaze/archive/v1.3.6.tar.gz" sha256: "c339f036a96fef72f9b8542d6a1e2ecb4bd3fa5d3d09a206da5e844765d2b6c3" @@ -23,14 +26,3 @@ sources: "1.1.2": url: "https://github.com/stephenberry/glaze/archive/v1.1.2.tar.gz" sha256: "ee22d55b7f40d63f510a41f22765cb24e9e70d312978bad4eb9c94c7ba2fe58c" - "0.3.6": - url: "https://github.com/stephenberry/glaze/archive/v0.3.6.tar.gz" - sha256: "bc87d4fd458f0634a146d6f4c902a952b66c3f718c3e20f680b99066224b51a1" - "0.2.2": - url: "https://github.com/stephenberry/glaze/archive/v0.2.2.tar.gz" - sha256: "d0d2edcc546b0ebb4bedaeedfb4a54aa678a6fdffa6b20dd6b252ef6325a9e75" -patches: - "0.2.2": - - patch_file: "patches/0.2.0-0001-use-cci-frozen.patch" - patch_description: "use cci's frozen" - patch_type: "conan" diff --git a/recipes/glaze/all/conanfile.py b/recipes/glaze/all/conanfile.py index 41a166e34e3ca..7d6155afba73c 100644 --- a/recipes/glaze/all/conanfile.py +++ b/recipes/glaze/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import get, copy, export_conandata_patches, apply_conandata_patches +from conan.tools.files import get, copy from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.layout import basic_layout @@ -17,6 +17,7 @@ class GlazeConan(ConanFile): topics = ("json", "memory", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" + no_copy_source = True @property def _min_cppstd(self): @@ -28,26 +29,13 @@ def _compilers_minimum_version(self): "Visual Studio": "17" if Version(self.version) >= "1.3.3" else "16", "msvc": "193" if Version(self.version) >= "1.3.3" else "192", "gcc": "12", - "clang": "12" if Version(self.version) > "1.0.0" else "13", + "clang": "12", "apple-clang": "13.1", } - def export_sources(self): - export_conandata_patches(self) - def layout(self): basic_layout(self, src_folder="src") - def requirements(self): - if Version(self.version) < "0.2.4": - self.requires("fmt/10.0.0") - self.requires("frozen/1.1.1") - self.requires("nanorange/cci.20200706") - if Version(self.version) < "0.2.3": - self.requires("fast_float/5.2.0") - if "0.1.5" <= Version(self.version) < "0.2.3": - self.requires("dragonbox/1.1.3") - def package_id(self): self.info.clear() @@ -64,15 +52,11 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - apply_conandata_patches(self) - def package(self): copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy( self, pattern="*.hpp", - excludes="glaze/frozen/*.hpp" if Version(self.version) < "0.2.4" else "", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include"), ) diff --git a/recipes/glaze/all/patches/0.2.0-0001-use-cci-frozen.patch b/recipes/glaze/all/patches/0.2.0-0001-use-cci-frozen.patch deleted file mode 100644 index 01b0c786fa02b..0000000000000 --- a/recipes/glaze/all/patches/0.2.0-0001-use-cci-frozen.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/include/glaze/core/common.hpp b/include/glaze/core/common.hpp -index aed6ce6..6cf4ace 100644 ---- a/include/glaze/core/common.hpp -+++ b/include/glaze/core/common.hpp -@@ -12,8 +12,8 @@ - #include - #include - --#include "glaze/frozen/string.hpp" --#include "glaze/frozen/unordered_map.hpp" -+#include "frozen/string.h" -+#include "frozen/unordered_map.h" - - #include "glaze/core/context.hpp" - #include "glaze/core/meta.hpp" -diff --git a/include/glaze/util/hash_map.hpp b/include/glaze/util/hash_map.hpp -index eaaec57..ae75ee2 100644 ---- a/include/glaze/util/hash_map.hpp -+++ b/include/glaze/util/hash_map.hpp -@@ -4,7 +4,7 @@ - #include - #include - --#include "glaze/frozen/random.hpp" -+#include "frozen/random.h" - #include "glaze/util/string_cmp.hpp" - - namespace glz diff --git a/recipes/glaze/all/test_package/CMakeLists.txt b/recipes/glaze/all/test_package/CMakeLists.txt index 11ef3b807bd40..4811c5114c3c2 100644 --- a/recipes/glaze/all/test_package/CMakeLists.txt +++ b/recipes/glaze/all/test_package/CMakeLists.txt @@ -6,6 +6,3 @@ find_package(glaze REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE glaze::glaze) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) -if(glaze_VERSION VERSION_LESS "1.0.0") - target_compile_definitions(${PROJECT_NAME} PRIVATE GLAZE_USE_EXCEPTION) -endif() diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index a37f70afd642a..c479b0a04fbd0 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.0": + folder: all "1.3.6": folder: all "1.3.5": @@ -15,7 +17,3 @@ versions: folder: all "1.1.2": folder: all - "0.3.6": - folder: all - "0.2.2": - folder: all From 3b17e69bb4e5601a850b6e006e44775e690bac33 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Thu, 31 Aug 2023 13:13:23 +0200 Subject: [PATCH 472/637] (#19428) onnx/all: bump protobuf & remove old versions * onnx/all: bump protobuf * onnx: remove older versions * recipe simplification following old versions removal * fix build requirement * use for tool_requires("protobuf/") --- recipes/onnx/all/conandata.yml | 22 ---------------- recipes/onnx/all/conanfile.py | 19 ++++---------- ...-fix-concurrent-proto3-remove-1.11.0.patch | 11 -------- ...1-fix-concurrent-proto3-remove-1.8.1.patch | 11 -------- ...1-fix-concurrent-proto3-remove-1.9.0.patch | 11 -------- ...002-msvc-no-warnings-as-errors-1.8.1.patch | 26 ------------------- ...002-msvc-no-warnings-as-errors-1.9.0.patch | 26 ------------------- recipes/onnx/config.yml | 8 ------ 8 files changed, 5 insertions(+), 129 deletions(-) delete mode 100644 recipes/onnx/all/patches/0001-fix-concurrent-proto3-remove-1.11.0.patch delete mode 100644 recipes/onnx/all/patches/0001-fix-concurrent-proto3-remove-1.8.1.patch delete mode 100644 recipes/onnx/all/patches/0001-fix-concurrent-proto3-remove-1.9.0.patch delete mode 100644 recipes/onnx/all/patches/0002-msvc-no-warnings-as-errors-1.8.1.patch delete mode 100644 recipes/onnx/all/patches/0002-msvc-no-warnings-as-errors-1.9.0.patch diff --git a/recipes/onnx/all/conandata.yml b/recipes/onnx/all/conandata.yml index 5f05c1310659a..c1a55ff6669fd 100644 --- a/recipes/onnx/all/conandata.yml +++ b/recipes/onnx/all/conandata.yml @@ -11,28 +11,6 @@ sources: "1.12.0": url: "https://github.com/onnx/onnx/archive/refs/tags/v1.12.0.tar.gz" sha256: "052ad3d5dad358a33606e0fc89483f8150bb0655c99b12a43aa58b5b7f0cc507" - "1.11.0": - url: "https://github.com/onnx/onnx/archive/refs/tags/v1.11.0.tar.gz" - sha256: "a20f2d9df805b16ac75ab4da0a230d3d1c304127d719e5c66a4e6df514e7f6c0" - "1.10.2": - url: "https://github.com/onnx/onnx/archive/refs/tags/v1.10.2.tar.gz" - sha256: "520b3aa34272cc215e2eb41385f58adf01750d88858d4722563edca8410c5dc9" - "1.9.0": - url: "https://github.com/onnx/onnx/archive/v1.9.0.tar.gz" - sha256: "61d459a5f30604cabec352574119a6685dfd43bfa757cfbff52be9471d5b8ea0" - "1.8.1": - url: "https://github.com/onnx/onnx/archive/v1.8.1.tar.gz" - sha256: "0054c7eeed97e8ee43921c3f944b0450782a081d910a14b3b6e662bc87065192" patches: "1.12.0": - patch_file: "patches/0001-fix-concurrent-proto3-remove-1.12.0.patch" - "1.11.0": - - patch_file: "patches/0001-fix-concurrent-proto3-remove-1.11.0.patch" - "1.10.2": - - patch_file: "patches/0001-fix-concurrent-proto3-remove-1.9.0.patch" - "1.9.0": - - patch_file: "patches/0001-fix-concurrent-proto3-remove-1.9.0.patch" - - patch_file: "patches/0002-msvc-no-warnings-as-errors-1.9.0.patch" - "1.8.1": - - patch_file: "patches/0001-fix-concurrent-proto3-remove-1.8.1.patch" - - patch_file: "patches/0002-msvc-no-warnings-as-errors-1.8.1.patch" diff --git a/recipes/onnx/all/conanfile.py b/recipes/onnx/all/conanfile.py index ddc3a6ff03194..7d2738dc5a86a 100644 --- a/recipes/onnx/all/conanfile.py +++ b/recipes/onnx/all/conanfile.py @@ -10,7 +10,7 @@ import os import textwrap -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.60.0 <2.0 || >=2.0.6" class OnnxConan(ConanFile): @@ -40,19 +40,12 @@ def _min_cppstd(self): return 17 return 11 - @property - def _protobuf_version(self): - # onnx < 1.9.0 doesn't support protobuf >= 3.18 - return "3.21.9" if Version(self.version) >= "1.9.0" else "3.17.1" - def export_sources(self): export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if Version(self.version) < "1.9.0": - del self.options.disable_static_registration def configure(self): if self.options.shared: @@ -62,7 +55,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires(f"protobuf/{self._protobuf_version}", run=not cross_building(self), transitive_headers=True, transitive_libs=True) + self.requires("protobuf/3.21.12", run=not cross_building(self), transitive_headers=True, transitive_libs=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -72,7 +65,7 @@ def validate(self): def build_requirements(self): if hasattr(self, "settings_build") and cross_building(self): - self.tool_requires(f"protobuf/{self._protobuf_version}") + self.tool_requires("protobuf/") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -99,8 +92,7 @@ def generate(self): tc.variables["ONNX_VERIFY_PROTO3"] = Version(self.dependencies.host["protobuf"].ref.version).major == "3" if is_msvc(self): tc.variables["ONNX_USE_MSVC_STATIC_RUNTIME"] = is_msvc_static_runtime(self) - if Version(self.version) >= "1.9.0": - tc.variables["ONNX_DISABLE_STATIC_REGISTRATION"] = self.options.get_safe('disable_static_registration') + tc.variables["ONNX_DISABLE_STATIC_REGISTRATION"] = self.options.get_safe('disable_static_registration') tc.generate() deps = CMakeDeps(self) deps.generate() @@ -177,8 +169,7 @@ def _onnx_components(self): } } ) - if Version(self.version) >= "1.11.0": - components["libonnx"]["defines"].append("__STDC_FORMAT_MACROS") + components["libonnx"]["defines"].append("__STDC_FORMAT_MACROS") return components def package_info(self): diff --git a/recipes/onnx/all/patches/0001-fix-concurrent-proto3-remove-1.11.0.patch b/recipes/onnx/all/patches/0001-fix-concurrent-proto3-remove-1.11.0.patch deleted file mode 100644 index 5ecbd144c4919..0000000000000 --- a/recipes/onnx/all/patches/0001-fix-concurrent-proto3-remove-1.11.0.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/onnx/gen_proto.py -+++ b/onnx/gen_proto.py -@@ -165,7 +165,7 @@ def convert(stem, package_name, output, do_onnx_ml=False, lite=False, protoc_pat - porto3_dir = os.path.dirname(proto3) - base_dir = os.path.dirname(porto3_dir) - gen_proto3_code(protoc_path, proto3, base_dir, base_dir, base_dir) -- pb3_files = glob.glob(os.path.join(porto3_dir, '*.proto3.*')) -+ pb3_files = glob.glob(os.path.join(porto3_dir, '{}.proto3.*'.format(proto_base))) - for pb3_file in pb3_files: - print("Removing {}".format(pb3_file)) - os.remove(pb3_file) diff --git a/recipes/onnx/all/patches/0001-fix-concurrent-proto3-remove-1.8.1.patch b/recipes/onnx/all/patches/0001-fix-concurrent-proto3-remove-1.8.1.patch deleted file mode 100644 index 2d1317c302c93..0000000000000 --- a/recipes/onnx/all/patches/0001-fix-concurrent-proto3-remove-1.8.1.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/onnx/gen_proto.py -+++ b/onnx/gen_proto.py -@@ -166,7 +166,7 @@ def convert(stem, package_name, output, do_onnx_ml=False, lite=False, protoc_pat - porto3_dir = os.path.dirname(proto3) - base_dir = os.path.dirname(porto3_dir) - gen_proto3_code(protoc_path, proto3, base_dir, base_dir, base_dir) -- pb3_files = glob.glob(os.path.join(porto3_dir, '*.proto3.*')) -+ pb3_files = glob.glob(os.path.join(porto3_dir, '{}.proto3.*'.format(proto_base))) - for pb3_file in pb3_files: - print("Removing {}".format(pb3_file)) - os.remove(pb3_file) diff --git a/recipes/onnx/all/patches/0001-fix-concurrent-proto3-remove-1.9.0.patch b/recipes/onnx/all/patches/0001-fix-concurrent-proto3-remove-1.9.0.patch deleted file mode 100644 index 181c708c8d374..0000000000000 --- a/recipes/onnx/all/patches/0001-fix-concurrent-proto3-remove-1.9.0.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/onnx/gen_proto.py -+++ b/onnx/gen_proto.py -@@ -169,7 +169,7 @@ def convert(stem, package_name, output, do_onnx_ml=False, lite=False, protoc_pat - porto3_dir = os.path.dirname(proto3) - base_dir = os.path.dirname(porto3_dir) - gen_proto3_code(protoc_path, proto3, base_dir, base_dir, base_dir) -- pb3_files = glob.glob(os.path.join(porto3_dir, '*.proto3.*')) -+ pb3_files = glob.glob(os.path.join(porto3_dir, '{}.proto3.*'.format(proto_base))) - for pb3_file in pb3_files: - print("Removing {}".format(pb3_file)) - os.remove(pb3_file) diff --git a/recipes/onnx/all/patches/0002-msvc-no-warnings-as-errors-1.8.1.patch b/recipes/onnx/all/patches/0002-msvc-no-warnings-as-errors-1.8.1.patch deleted file mode 100644 index b701fb66947d1..0000000000000 --- a/recipes/onnx/all/patches/0002-msvc-no-warnings-as-errors-1.8.1.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -454,7 +454,6 @@ if(BUILD_ONNX_PYTHON) - target_link_libraries(onnx_cpp2py_export PRIVATE ${PYTHON_LIBRARIES}) - target_compile_options(onnx_cpp2py_export - PRIVATE /MP -- /WX - /wd4800 # disable warning type' : forcing - # value to bool 'true' or 'false' - # (performance warning) -@@ -514,7 +513,6 @@ endif() - if(MSVC) - target_compile_options(onnx_proto - PRIVATE /MP -- /WX - /wd4800 # disable warning type' : forcing value - # to bool 'true' or 'false' - # (performance warning) -@@ -532,7 +530,6 @@ if(MSVC) - ${EXTRA_FLAGS}) - target_compile_options(onnx - PRIVATE /MP -- /WX - /wd4800 # disable warning type' : forcing value - # to bool 'true' or 'false' - # (performance warning) diff --git a/recipes/onnx/all/patches/0002-msvc-no-warnings-as-errors-1.9.0.patch b/recipes/onnx/all/patches/0002-msvc-no-warnings-as-errors-1.9.0.patch deleted file mode 100644 index 1ff241f73aca7..0000000000000 --- a/recipes/onnx/all/patches/0002-msvc-no-warnings-as-errors-1.9.0.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -485,7 +485,6 @@ if(BUILD_ONNX_PYTHON) - target_link_libraries(onnx_cpp2py_export PRIVATE ${PYTHON_LIBRARIES}) - target_compile_options(onnx_cpp2py_export - PRIVATE /MP -- /WX - /wd4800 # disable warning type' : forcing - # value to bool 'true' or 'false' - # (performance warning) -@@ -545,7 +544,6 @@ endif() - if(MSVC) - target_compile_options(onnx_proto - PRIVATE /MP -- /WX - /wd4800 # disable warning type' : forcing value - # to bool 'true' or 'false' - # (performance warning) -@@ -563,7 +561,6 @@ if(MSVC) - ${EXTRA_FLAGS}) - target_compile_options(onnx - PRIVATE /MP -- /WX - /wd4800 # disable warning type' : forcing value - # to bool 'true' or 'false' - # (performance warning) diff --git a/recipes/onnx/config.yml b/recipes/onnx/config.yml index cfdc9b9959f82..ae05002493f07 100644 --- a/recipes/onnx/config.yml +++ b/recipes/onnx/config.yml @@ -7,11 +7,3 @@ versions: folder: all "1.12.0": folder: all - "1.11.0": - folder: all - "1.10.2": - folder: all - "1.9.0": - folder: all - "1.8.1": - folder: all From 3ee01afa020ef3db07ad93b4eea41fbb6410d2cb Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Thu, 31 Aug 2023 15:18:59 +0200 Subject: [PATCH 473/637] (#19513) nss 3.93 --- recipes/nss/all/conandata.yml | 3 +++ recipes/nss/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/nss/all/conandata.yml b/recipes/nss/all/conandata.yml index a7c913155a824..f10905ebbaa04 100644 --- a/recipes/nss/all/conandata.yml +++ b/recipes/nss/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.93": + url: "https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_93_RTM/src/nss-3.93.tar.gz" + sha256: "15f54bb72048eb105f8c0e936a04b899e74c3db9a19bbc1e00acee2af9476a8a" "3.92": url: "https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_92_RTM/src/nss-3.92.tar.gz" sha256: "3db192d6e882039af02ae7eaf3217ed114bb7ad83414c646772ab8021e24a254" diff --git a/recipes/nss/config.yml b/recipes/nss/config.yml index 467e717cc1ff4..82fff1e6a41ec 100644 --- a/recipes/nss/config.yml +++ b/recipes/nss/config.yml @@ -1,4 +1,6 @@ versions: + "3.93": + folder: all "3.92": folder: all "3.91": From 63cc96210e0f21c714e8189fca29378f9e09e17c Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Thu, 31 Aug 2023 20:52:31 +0400 Subject: [PATCH 474/637] (#19525) onetbb: added 2021.10.0 version --- recipes/onetbb/all/conandata.yml | 3 +++ recipes/onetbb/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/onetbb/all/conandata.yml b/recipes/onetbb/all/conandata.yml index 880145b4a46b0..4839476518f75 100644 --- a/recipes/onetbb/all/conandata.yml +++ b/recipes/onetbb/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2021.10.0": + url: "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.10.0.tar.gz" + sha256: "487023a955e5a3cc6d3a0d5f89179f9b6c0ae7222613a7185b0227ba0c83700b" "2021.9.0": url: "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.9.0.tar.gz" sha256: "1ce48f34dada7837f510735ff1172f6e2c261b09460e3bf773b49791d247d24e" diff --git a/recipes/onetbb/config.yml b/recipes/onetbb/config.yml index 7a33bda288759..39b3726474302 100644 --- a/recipes/onetbb/config.yml +++ b/recipes/onetbb/config.yml @@ -1,4 +1,6 @@ versions: + "2021.10.0": + folder: all "2021.9.0": folder: all "2021.8.0": From 344b9e54f9460f7c9a00c59ddd6c532c41aed351 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 31 Aug 2023 20:10:27 +0200 Subject: [PATCH 475/637] (#19037) [libnice] Fix cmake_layout import error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix import error Signed-off-by: Uilian Ries * use version range for openssl Signed-off-by: Uilian Ries * Revert "use version range for openssl" This reverts commit f9d9f380e59762da7907c7be5925e94b3aedd078. * nice/agent.h exposes glib-object.h Signed-off-by: Uilian Ries * add transitive libs Signed-off-by: Uilian Ries * add fix_apple_shared_install_name Signed-off-by: Uilian Ries * Update recipes/libnice/all/conanfile.py * Update recipes/libnice/all/conanfile.py * Update recipes/libnice/all/conanfile.py * libnice requires Conan 1.60.0 or higher * Update recipes/libnice/all/conanfile.py * Update recipes/libnice/all/conanfile.py --------- Signed-off-by: Uilian Ries Co-authored-by: Rubén Rincón Blanco --- recipes/libnice/all/conanfile.py | 15 +++++++++------ recipes/libnice/all/test_package/conanfile.py | 3 +-- recipes/libnice/all/test_v1_package/conanfile.py | 6 ++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/recipes/libnice/all/conanfile.py b/recipes/libnice/all/conanfile.py index 5fd9fcdbbc036..22dc5eaaf2efa 100644 --- a/recipes/libnice/all/conanfile.py +++ b/recipes/libnice/all/conanfile.py @@ -5,8 +5,10 @@ from conan.tools.layout import basic_layout from conan.tools.gnu import PkgConfigDeps from conan.tools.microsoft import is_msvc_static_runtime +from conan.tools.apple import fix_apple_shared_install_name from conan.errors import ConanInvalidConfiguration +required_conan_version = ">=1.60.0 <2 || >=2.0.6" class LibniceConan(ConanFile): name = "libnice" @@ -59,16 +61,16 @@ def validate(self): "-o glib/*:shared=True with static runtime is not supported") def requirements(self): - self.requires("glib/2.75.2") + self.requires("glib/2.77.2", transitive_headers=True, transitive_libs=True) if self.options.crypto_library == "openssl": - self.requires("openssl/1.1.1t") + self.requires("openssl/[>=1.1 <4]") if self.options.with_gstreamer: - self.requires("gstreamer/1.19.2") + self.requires("gstreamer/1.22.3") def build_requirements(self): - self.tool_requires("meson/1.0.0") - self.tool_requires("pkgconf/1.9.3") - self.tool_requires("glib/2.75.2") # for glib-mkenums + self.tool_requires("meson/1.2.1") + self.tool_requires("pkgconf/1.9.5") + self.tool_requires("glib/") # for glib-mkenums if self.options.with_introspection: self.tool_requires("gobject-introspection/1.72.0") @@ -107,6 +109,7 @@ def package(self): if not self.options.shared: with chdir(self, os.path.join(self.package_folder, "lib")): rename(self, "libnice.a", "nice.lib") + fix_apple_shared_install_name(self) def package_info(self): self.cpp_info.libs = ["nice"] diff --git a/recipes/libnice/all/test_package/conanfile.py b/recipes/libnice/all/test_package/conanfile.py index 22dd4e9d14ebe..a91756abf0bec 100644 --- a/recipes/libnice/all/test_package/conanfile.py +++ b/recipes/libnice/all/test_package/conanfile.py @@ -1,7 +1,6 @@ import os from conan import ConanFile -from conan.tools.cmake import CMake -from conan.tools.layout import cmake_layout +from conan.tools.cmake import CMake, cmake_layout from conan.tools.build import can_run diff --git a/recipes/libnice/all/test_v1_package/conanfile.py b/recipes/libnice/all/test_v1_package/conanfile.py index 8c9580d2d52b2..ecf464197e0a5 100644 --- a/recipes/libnice/all/test_v1_package/conanfile.py +++ b/recipes/libnice/all/test_v1_package/conanfile.py @@ -1,7 +1,5 @@ import os -from conan import ConanFile -from conans import CMake -from conan.tools.build import can_run +from conans import ConanFile, CMake, tools class LibniceTestConan(ConanFile): @@ -14,6 +12,6 @@ def build(self): cmake.build() def test(self): - if can_run(self): + if not tools.cross_building(self): bin_path = os.path.join("bin", "example") self.run(bin_path, run_environment=True) From 0bfa426a615560baae2438f83b79811644e9f0db Mon Sep 17 00:00:00 2001 From: Sergey Bobrenok Date: Fri, 1 Sep 2023 01:50:57 +0300 Subject: [PATCH 476/637] (#19537) sdbus-cpp/1.3.0: Bump version --- recipes/sdbus-cpp/all/conandata.yml | 3 +++ recipes/sdbus-cpp/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/sdbus-cpp/all/conandata.yml b/recipes/sdbus-cpp/all/conandata.yml index 4c4e5beb4bad0..97d55c77fac39 100644 --- a/recipes/sdbus-cpp/all/conandata.yml +++ b/recipes/sdbus-cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.0": + url: "https://github.com/Kistler-Group/sdbus-cpp/archive/v1.3.0.tar.gz" + sha256: "d44f59abdd64d8f1ca3af7db58bc6518cb081fc9ff16285c3d75a68f5c073d10" "1.2.0": url: "https://github.com/Kistler-Group/sdbus-cpp/archive/v1.2.0.tar.gz" sha256: "7f7231904abb6a996b8c18ddc5fb50078ef5dff5191649abf9f127aff41d24e9" diff --git a/recipes/sdbus-cpp/config.yml b/recipes/sdbus-cpp/config.yml index 027c0dc56075d..a48eafa88431d 100644 --- a/recipes/sdbus-cpp/config.yml +++ b/recipes/sdbus-cpp/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.0": + folder: all "1.2.0": folder: all "1.1.0": From c90396a0fc843d4da82f73fe85307b572ed62107 Mon Sep 17 00:00:00 2001 From: igormironchik Date: Fri, 1 Sep 2023 09:35:17 +0300 Subject: [PATCH 477/637] (#19542) md4qt: bump version --- recipes/md4qt/all/conandata.yml | 3 +++ recipes/md4qt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index 08359be96706f..7275b589730d9 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.16": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.16.tar.gz" + sha256: "9da7cd02883c2f4d4a2371cda4c195ebc02f57bb673ef948b88a256f3db55724" "2.0.15": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.15.tar.gz" sha256: "53c4a65bb178afde91ae2360072f65a44ae7572a25912a3fe96aeaa6ac86ef27" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index f9a27817ba435..e6e6297a34720 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.16": + folder: all "2.0.15": folder: all "2.0.14": From 8eea987f350f638ae0ed9067b19598a39bcf8e4a Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:03:14 +0200 Subject: [PATCH 478/637] (#19534) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index afef60a60fac7..cc3af6a6bc8c2 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -65,6 +65,7 @@ required_for_references: - aws-c-s3 - aws-c-sdkutils - aws-checksums +- aws-crt-cpp - aws-kvs-pic - aws-libfabric - b2 @@ -478,6 +479,7 @@ required_for_references: - kainjow-mustache - kaitai_struct_cpp_stl_runtime - kangaru +- kcp - kdbindings - keychain - khrplatform From d70ff0b99ce2850d8f32ccaa123018d7ca05e5da Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Fri, 1 Sep 2023 11:22:55 +0200 Subject: [PATCH 479/637] (#19539) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index cc3af6a6bc8c2..f2268ad3f7dbb 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -583,6 +583,7 @@ required_for_references: - libnfnetlink - libnfs - libnghttp2 +- libnice - libnl - libnoise - libnop From d0f0b6178f9466e3b0ebbefd094dc00ee4133159 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 2 Sep 2023 03:33:05 +0900 Subject: [PATCH 480/637] (#19550) highway: add version 1.0.7 --- recipes/highway/all/conandata.yml | 3 +++ recipes/highway/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/highway/all/conandata.yml b/recipes/highway/all/conandata.yml index 0f97a2fe01fc8..710781f517c65 100644 --- a/recipes/highway/all/conandata.yml +++ b/recipes/highway/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.7": + url: "https://github.com/google/highway/archive/1.0.7.tar.gz" + sha256: "5434488108186c170a5e2fca5e3c9b6ef59a1caa4d520b008a9b8be6b8abe6c5" "1.0.6": url: "https://github.com/google/highway/archive/1.0.6.tar.gz" sha256: "d89664a045a41d822146e787bceeefbf648cc228ce354f347b18f2b419e57207" diff --git a/recipes/highway/config.yml b/recipes/highway/config.yml index e978e314cb0cd..51114d87501db 100644 --- a/recipes/highway/config.yml +++ b/recipes/highway/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.7": + folder: all "1.0.6": folder: all "1.0.5": From cdeed60c0851827e35ff74eba0d4def4ed9145b6 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Fri, 1 Sep 2023 21:12:07 +0200 Subject: [PATCH 481/637] (#19527) pkgconf 2.0.2 --- recipes/pkgconf/all/conandata.yml | 5 +++++ recipes/pkgconf/config.yml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/recipes/pkgconf/all/conandata.yml b/recipes/pkgconf/all/conandata.yml index 9d79648be05d0..cf574fc35a1d5 100644 --- a/recipes/pkgconf/all/conandata.yml +++ b/recipes/pkgconf/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.2": + url: "https://distfiles.ariadne.space/pkgconf/pkgconf-2.0.2.tar.xz" + sha256: "ea5a25ef8f251eb5377ec0e21c75fb61894433cfbdbf0b2559ba33e4c2664401" "1.9.5": url: "https://distfiles.ariadne.space/pkgconf/pkgconf-1.9.5.tar.xz" sha256: "1ac1656debb27497563036f7bffc281490f83f9b8457c0d60bcfb638fb6b6171" @@ -12,6 +15,8 @@ sources: url: "https://distfiles.ariadne.space/pkgconf/pkgconf-1.7.3.tar.xz" sha256: "b846aea51cf696c3392a0ae58bef93e2e72f8e7073ca6ad1ed8b01c85871f9c0" patches: + "2.0.2": + - patch_file: "patches/1.9.3-0003-PKG_CONF_PATH-allow-colon+semicolon-separator.patch" "1.9.5": - patch_file: "patches/1.9.3-0003-PKG_CONF_PATH-allow-colon+semicolon-separator.patch" "1.9.3": diff --git a/recipes/pkgconf/config.yml b/recipes/pkgconf/config.yml index 04e2163e1ba77..e17ebc77d55fa 100644 --- a/recipes/pkgconf/config.yml +++ b/recipes/pkgconf/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.2": + folder: "all" "1.9.5": folder: "all" "1.9.3": From ee72892861189d3158ee3bd3278c93ec36ef6a7b Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Sat, 2 Sep 2023 00:13:19 +0200 Subject: [PATCH 482/637] (#19543) graphene/all: bump deps * graphene/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * graphene/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * graphene/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * graphene/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * graphene/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * graphene/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * graphene/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * graphene/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * Update conanfile.py --- recipes/graphene/all/conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/graphene/all/conanfile.py b/recipes/graphene/all/conanfile.py index 39254a6f16cdf..46dfcff7c1fdf 100644 --- a/recipes/graphene/all/conanfile.py +++ b/recipes/graphene/all/conanfile.py @@ -51,7 +51,7 @@ def layout(self): def requirements(self): if self.options.with_glib: - self.requires("glib/2.76.2") + self.requires("glib/2.77.0") def validate(self): if self.settings.compiler == "gcc": @@ -70,9 +70,9 @@ def validate(self): ) def build_requirements(self): - self.tool_requires("meson/1.1.0") + self.tool_requires("meson/1.2.1") if not self.conf.get("tools.gnu:pkg_config", default=False): - self.tool_requires("pkgconf/1.9.3") + self.tool_requires("pkgconf/1.9.5") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 51edc2a31cc01b8071be8ee7f81483dad41003fe Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Sat, 2 Sep 2023 00:49:21 +0200 Subject: [PATCH 483/637] (#19528) glib 2.77.3 --- recipes/glib/all/conandata.yml | 3 +++ recipes/glib/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/glib/all/conandata.yml b/recipes/glib/all/conandata.yml index 0dd31b0d40a5b..ec38114b48cbc 100644 --- a/recipes/glib/all/conandata.yml +++ b/recipes/glib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.77.3": + url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.3.tar.xz" + sha256: "1753f963bb680b28a83d6e2095f63d0d4b94244675bcd2603850b2ebc1ac6a61" "2.77.2": url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.2.tar.xz" sha256: "16279739e4d30ec47be3e82909f5aeaaa41a8206bae3bead10a23fb2deff02a6" diff --git a/recipes/glib/config.yml b/recipes/glib/config.yml index 808c4e2fcb441..1a21f71ff2289 100644 --- a/recipes/glib/config.yml +++ b/recipes/glib/config.yml @@ -1,4 +1,6 @@ versions: + "2.77.3": + folder: all "2.77.2": folder: all "2.77.1": From 22e6c43eeee9635c2093991235b34a3a36ef1f2a Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Sat, 2 Sep 2023 08:42:37 +0200 Subject: [PATCH 484/637] (#19555) Add changelog 01 Sep 2023 Signed-off-by: Uilian Ries --- docs/changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/changelog.md b/docs/changelog.md index 3cf79f8d61327..8eadac2df6139 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,9 @@ # Changelog +### 01-Sep-2023 - 19:58 CEST + +- [fix] Use Unix separators for Windows folder path when creating CI workspace + ### 17-Aug-2023 - 11:42 CEST - [fix] Fix type error when catching generic exceptions in Jenkins From 4ffb55b871c1f839b7074e56836bded563b523d7 Mon Sep 17 00:00:00 2001 From: Guillaume Egles Date: Sat, 2 Sep 2023 00:11:55 -0700 Subject: [PATCH 485/637] (#19536) cmake: add 3.27.4 --- recipes/cmake/binary/conandata.yml | 19 +++++++++++++++++++ recipes/cmake/config.yml | 2 ++ 2 files changed, 21 insertions(+) diff --git a/recipes/cmake/binary/conandata.yml b/recipes/cmake/binary/conandata.yml index a778631e96cba..afcf32ce81461 100644 --- a/recipes/cmake/binary/conandata.yml +++ b/recipes/cmake/binary/conandata.yml @@ -1,4 +1,23 @@ sources: + "3.27.4": + Linux: + armv8: + url: "https://cmake.org/files/v3.27/cmake-3.27.4-linux-aarch64.tar.gz" + sha256: "45538d394bd4ef2a423fa78dff5cad16bcf437a4a6dc655e999177170632b039" + x86_64: + url: "https://cmake.org/files/v3.27/cmake-3.27.4-linux-x86_64.tar.gz" + sha256: "186c53121cf6ef4e48b51e88690e6ef84f268611064a42e5a2e829c3d6b2efde" + Macos: + universal: + url: "https://cmake.org/files/v3.27/cmake-3.27.4-macos10.10-universal.tar.gz" + sha256: "1fa092bad6daf9715c6d72ff766813fd3423427696042a74f2208a2b4704ac1c" + Windows: + armv8: + url: "https://cmake.org/files/v3.27/cmake-3.27.4-windows-arm64.zip" + sha256: "6c1df7ad85ed902ad615cd0c05bca0d3c9c3f67b3980ca9dd2e39b0821d50937" + x86_64: + url: "https://cmake.org/files/v3.27/cmake-3.27.4-windows-x86_64.zip" + sha256: "e5e060756444d0b2070328a8821c1ceb62bd6d267aae61bfff06f96c7ec943a6" "3.27.1": Linux: armv8: diff --git a/recipes/cmake/config.yml b/recipes/cmake/config.yml index 4a1e12b81255f..94869f2ceea82 100644 --- a/recipes/cmake/config.yml +++ b/recipes/cmake/config.yml @@ -1,4 +1,6 @@ versions: + "3.27.4": + folder: "binary" "3.27.1": folder: "binary" "3.27.0": From 7bdd38b95d62a670113f718fa055ae83e3bfb0d9 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 2 Sep 2023 22:31:47 +0900 Subject: [PATCH 486/637] (#19559) c-blosc: add version 1.21.5 --- recipes/c-blosc/all/conandata.yml | 7 +++++++ recipes/c-blosc/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/c-blosc/all/conandata.yml b/recipes/c-blosc/all/conandata.yml index d2e82d3ed6ffb..a47eb694abb4a 100644 --- a/recipes/c-blosc/all/conandata.yml +++ b/recipes/c-blosc/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.21.5": + url: "https://github.com/Blosc/c-blosc/archive/v1.21.5.tar.gz" + sha256: "32e61961bbf81ffea6ff30e9d70fca36c86178afd3e3cfa13376adec8c687509" "1.21.4": url: "https://github.com/Blosc/c-blosc/archive/v1.21.4.tar.gz" sha256: "e72bd03827b8564bbb3dc3ea0d0e689b4863871ce3861d946f2efd7a186ecf3e" @@ -27,6 +30,10 @@ sources: url: "https://github.com/Blosc/c-blosc/archive/v1.17.1.tar.gz" sha256: "19a6948b579c27e8ac440b4f077f99fc90e7292b1d9cb896bec0fd781d68fba2" patches: + "1.21.5": + - patch_file: "patches/cmake-dependencies-1.21.4+.patch" + patch_description: "use cci package" + patch_type: "conan" "1.21.4": - patch_file: "patches/cmake-dependencies-1.21.4+.patch" patch_description: "use cci package" diff --git a/recipes/c-blosc/config.yml b/recipes/c-blosc/config.yml index 0bea6e6e853db..cd2301b24b5b4 100644 --- a/recipes/c-blosc/config.yml +++ b/recipes/c-blosc/config.yml @@ -1,4 +1,6 @@ versions: + "1.21.5": + folder: all "1.21.4": folder: all "1.21.3": From 15218ee2780caf319ec91365bb553a69f43af55d Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Sat, 2 Sep 2023 17:02:48 +0200 Subject: [PATCH 487/637] (#19522) [docs] Change conan v2 feedback message * change conan v2 feedback message Signed-off-by: Uilian Ries * ping conan-io/barbarians Signed-off-by: Uilian Ries * Update .c3i/config_v2.yml Co-authored-by: Daniel --------- Signed-off-by: Uilian Ries Co-authored-by: Daniel --- .c3i/config_v2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.c3i/config_v2.yml b/.c3i/config_v2.yml index 1f13510578fc9..6ce21e93668a5 100644 --- a/.c3i/config_v2.yml +++ b/.c3i/config_v2.yml @@ -46,9 +46,9 @@ tasks: update_labels: false user_feedback: title: "Conan v2 pipeline" - description: "> **Note**: Conan v2 builds may be required once they are on the [v2 ready](https://github.com/conan-io/conan-center-index/blob/master/.c3i/conan_v2_ready_references.yml) list" + description: "> **Note**: Conan v2 builds are now mandatory. Please read our [discussion](https://github.com/conan-io/conan-center-index/discussions/19104) about it." regression: "> **Regression**: Conan v2 builds are mandatory and they are required for the PR to be merged, because this recipe worked with Conan v2 previously." - text_on_failure: "The v2 pipeline failed. Please, review the errors and note this will be required for pull requests to be merged in the near future." + text_on_failure: "The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping `@conan-io/barbarians` on the PR and we will help you." collapse_on_success: false collapse_on_failure: true list_packages: From db455b53940290448d0be430bae93b7becbb0b76 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Sat, 2 Sep 2023 19:42:18 +0200 Subject: [PATCH 488/637] (#19560) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index f2268ad3f7dbb..7b84a12bb8b2a 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -278,6 +278,7 @@ required_for_references: - elfio - embree3 - emio +- emsdk - enet - enhex-generic_serialization - enhex-strong_type From 831edb42d4fc14e024ee4ad2f22bf7f0f4a5143a Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Sat, 2 Sep 2023 20:02:27 +0200 Subject: [PATCH 489/637] (#19459) [docs] Add section about Docker images used by CCI Signed-off-by: Uilian Ries --- docs/developing_recipes_locally.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/developing_recipes_locally.md b/docs/developing_recipes_locally.md index e34902537f2b6..9c54954e8a98d 100644 --- a/docs/developing_recipes_locally.md +++ b/docs/developing_recipes_locally.md @@ -221,6 +221,29 @@ If you are working with packages that have system dependencies that are managed docker run -e CONAN_SYSREQUIRES_MODE=enabled conanio/gcc11-ubuntu16.04 conan install fmt/9.0.0@ -if build --build missing -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=yes ``` +#### Docker build images used by ConanCenterIndex + +The Conan Center Index uses [Conan Docker Tools](https://github.com/conan-io/conan-docker-tools/) to build packages in a variety of environments. All images are hosted in [Docker Hub](https://hub.docker.com/u/conanio). The relation of the images with the build configurations is available according to the Conan configuration, as `node_labels.Linux`, for instance: + + +```yaml +node_labels: + Linux: + x86_64: + "gcc": + default: "linux_gcc_${compiler.version}" + "11": "linux_gcc_${compiler.version}_ubuntu16.04" + "clang": + default: "linux_clang_${compiler.version}_ubuntu16.04" + "11": "linux_clang_${compiler.version}" +``` + +The configuration files are located in the folder [../.c3i](../.c3i). Currently are the files [config_v1.yml](../.c3i/config_v1.yml) and [config_v2.yml](../.c3i/config_v2.yml). The configuration file `config_v1.yml` is used by the Conan 1.0 client, while `config_v2.yml` is used by the Conan 2.0 client. + +The label `linux` refers to any Docker image, while `gcc_${compiler.version}` refers to GCC + a compiler version. For example, `linux_gcc_10` refers to the image `conanio/gcc10`. +The suffix `_ubuntu16.04` refers to the base image used by the Docker image, in this case, `ubuntu16.04`. So, `"11": "linux_gcc_${compiler.version}_ubuntu16.04"` means that the image `conanio/gcc11-ubuntu16.04`. Thus, all GCC versions use `conanio/gcc`, except for the GCC 11, which uses `conanio/gcc11-ubuntu16.04`. The same applies to Clang. + + ## Using Conan 2.0 Everything you need to know about the methods, commands line, outputs can be found in the From b4f452f78601b76c244ebcb6729a018d48014908 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 3 Sep 2023 03:23:12 +0900 Subject: [PATCH 490/637] (#16273) hyperscan: add version 5.4.2 * hyperscan: add version 5.4.1 * update 5.4.2 * workround dependencies error * update boost * disable -Werror flag * disable unit on msvc in 5.4.2 * disable build examples * update boost/1.83.0 --- recipes/hyperscan/all/conandata.yml | 14 +- recipes/hyperscan/all/conanfile.py | 4 +- ...cmake.patch => 5.4.0-0001-fix-cmake.patch} | 13 +- ...h => 5.4.0-0002-use-ue2-make_unique.patch} | 0 .../all/patches/5.4.2-0001-fix-cmake.patch | 282 ++++++ .../5.4.2-0002-use-ue2-make_unique.patch | 875 ++++++++++++++++++ .../hyperscan/all/test_package/conanfile.py | 6 +- recipes/hyperscan/config.yml | 2 + 8 files changed, 1191 insertions(+), 5 deletions(-) rename recipes/hyperscan/all/patches/{0001-fix-cmake.patch => 5.4.0-0001-fix-cmake.patch} (96%) rename recipes/hyperscan/all/patches/{0002-use-ue2-make_unique.patch => 5.4.0-0002-use-ue2-make_unique.patch} (100%) create mode 100644 recipes/hyperscan/all/patches/5.4.2-0001-fix-cmake.patch create mode 100644 recipes/hyperscan/all/patches/5.4.2-0002-use-ue2-make_unique.patch diff --git a/recipes/hyperscan/all/conandata.yml b/recipes/hyperscan/all/conandata.yml index b46d4ac06c616..e3925c18673ce 100644 --- a/recipes/hyperscan/all/conandata.yml +++ b/recipes/hyperscan/all/conandata.yml @@ -1,12 +1,22 @@ sources: + "5.4.2": + url: "https://github.com/intel/hyperscan/archive/v5.4.2.tar.gz" + sha256: "32b0f24b3113bbc46b6bfaa05cf7cf45840b6b59333d078cc1f624e4c40b2b99" "5.4.0": url: "https://github.com/intel/hyperscan/archive/v5.4.0.tar.gz" sha256: "e51aba39af47e3901062852e5004d127fa7763b5dbbc16bcca4265243ffa106f" patches: + "5.4.2": + - patch_file: "patches/5.4.2-0001-fix-cmake.patch" + patch_description: "modify cmake files to build with conan" + patch_type: "conan" + - patch_file: "patches/5.4.2-0002-use-ue2-make_unique.patch" + patch_description: "add ue2:: prefix to make_unique for name collision" + patch_type: "portability" "5.4.0": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/5.4.0-0001-fix-cmake.patch" patch_description: "modify cmake files to build with conan" patch_type: "conan" - - patch_file: "patches/0002-use-ue2-make_unique.patch" + - patch_file: "patches/5.4.0-0002-use-ue2-make_unique.patch" patch_description: "add ue2:: prefix to make_unique for name collision" patch_type: "portability" diff --git a/recipes/hyperscan/all/conanfile.py b/recipes/hyperscan/all/conanfile.py index 5e30dac82fb95..8ccc3f01da959 100644 --- a/recipes/hyperscan/all/conanfile.py +++ b/recipes/hyperscan/all/conanfile.py @@ -16,6 +16,7 @@ class HyperscanConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.hyperscan.io" topics = ("regex", "regular expressions") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -57,7 +58,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.81.0") + self.requires("boost/1.83.0") if self.options.build_chimera: self.requires("pcre/8.45") @@ -88,6 +89,7 @@ def generate(self): tc.variables["BUILD_AVX512"] = self.options.build_avx512 tc.variables["FAT_RUNTIME"] = self.options.fat_runtime tc.variables["BUILD_CHIMERA"] = self.options.build_chimera + tc.variables["BUILD_EXAMPLES"] = False if self.options.dump_support != "auto": tc.variables["DUMP_SUPPORT"] = self.options.dump_support tc.generate() diff --git a/recipes/hyperscan/all/patches/0001-fix-cmake.patch b/recipes/hyperscan/all/patches/5.4.0-0001-fix-cmake.patch similarity index 96% rename from recipes/hyperscan/all/patches/0001-fix-cmake.patch rename to recipes/hyperscan/all/patches/5.4.0-0001-fix-cmake.patch index 872966c197543..ab66becd930f5 100644 --- a/recipes/hyperscan/all/patches/0001-fix-cmake.patch +++ b/recipes/hyperscan/all/patches/5.4.0-0001-fix-cmake.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8bc6077..0fbed25 100644 +index 8bc6077..2dfdf29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ set (HS_MINOR_VERSION 4) @@ -40,6 +40,17 @@ index 8bc6077..0fbed25 100644 OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE) else () +@@ -242,8 +242,8 @@ else() + if (NOT RELEASE_BUILD) + # -Werror is most useful during development, don't potentially break + # release builds +- set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Werror") +- set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Werror") ++ #set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Werror") ++ #set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Werror") + endif() + + if (DISABLE_ASSERTS) @@ -326,7 +326,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux") message (STATUS "Building the fat runtime requires the Unix Makefiles generator, or Ninja with CMake v3.0 or higher") set (FAT_RUNTIME_REQUISITES FALSE) diff --git a/recipes/hyperscan/all/patches/0002-use-ue2-make_unique.patch b/recipes/hyperscan/all/patches/5.4.0-0002-use-ue2-make_unique.patch similarity index 100% rename from recipes/hyperscan/all/patches/0002-use-ue2-make_unique.patch rename to recipes/hyperscan/all/patches/5.4.0-0002-use-ue2-make_unique.patch diff --git a/recipes/hyperscan/all/patches/5.4.2-0001-fix-cmake.patch b/recipes/hyperscan/all/patches/5.4.2-0001-fix-cmake.patch new file mode 100644 index 0000000000000..87c26ae4533b6 --- /dev/null +++ b/recipes/hyperscan/all/patches/5.4.2-0001-fix-cmake.patch @@ -0,0 +1,282 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7757916..6f05b5b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,7 +6,7 @@ set (HS_MINOR_VERSION 4) + set (HS_PATCH_VERSION 2) + set (HS_VERSION ${HS_MAJOR_VERSION}.${HS_MINOR_VERSION}.${HS_PATCH_VERSION}) + +-set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) ++list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") + include(CheckCCompilerFlag) + include(CheckCXXCompilerFlag) + include(CheckCXXSymbolExists) +@@ -17,8 +17,8 @@ INCLUDE (CheckLibraryExists) + INCLUDE (CheckSymbolExists) + include (CMakeDependentOption) + include (GNUInstallDirs) +-include (${CMAKE_MODULE_PATH}/platform.cmake) +-include (${CMAKE_MODULE_PATH}/ragel.cmake) ++include (platform) ++include (ragel) + + find_package(PkgConfig QUIET) + +@@ -69,7 +69,7 @@ include_directories(${PROJECT_SOURCE_DIR}/src) + include_directories(${PROJECT_BINARY_DIR}) + include_directories(SYSTEM include) + +-include (${CMAKE_MODULE_PATH}/boost.cmake) ++include (boost) + + # -- make this work? set(python_ADDITIONAL_VERSIONS 2.7 2.6) + find_package(PythonInterp) +@@ -84,7 +84,7 @@ endif() + # allow for reproducible builds - python for portability + if (DEFINED ENV{SOURCE_DATE_EPOCH}) + execute_process( +- COMMAND "${PYTHON}" "${CMAKE_MODULE_PATH}/formatdate.py" "$ENV{SOURCE_DATE_EPOCH}" ++ COMMAND "${PYTHON}" "${PROJECT_SOURCE_DIR}/cmake/formatdate.py" "$ENV{SOURCE_DATE_EPOCH}" + OUTPUT_VARIABLE BUILD_DATE + OUTPUT_STRIP_TRAILING_WHITESPACE) + else () +@@ -242,8 +242,8 @@ else() + if (NOT RELEASE_BUILD) + # -Werror is most useful during development, don't potentially break + # release builds +- set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Werror") +- set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Werror") ++ #set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Werror") ++ #set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Werror") + endif() + + if (DISABLE_ASSERTS) +@@ -326,7 +326,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux") + message (STATUS "Building the fat runtime requires the Unix Makefiles generator, or Ninja with CMake v3.0 or higher") + set (FAT_RUNTIME_REQUISITES FALSE) + else() +- include (${CMAKE_MODULE_PATH}/attrib.cmake) ++ include (attrib) + if (NOT HAS_C_ATTR_IFUNC) + message(STATUS "Compiler does not support ifunc attribute, cannot build fat runtime") + set (FAT_RUNTIME_REQUISITES FALSE) +@@ -337,7 +337,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux") + CMAKE_DEPENDENT_OPTION(FAT_RUNTIME "Build a library that supports multiple microarchitectures" ${RELEASE_BUILD} "FAT_RUNTIME_REQUISITES" OFF) + endif () + +-include (${CMAKE_MODULE_PATH}/arch.cmake) ++include (arch) + + # testing a builtin takes a little more work + CHECK_C_SOURCE_COMPILES("void *aa_test(void *x) { return __builtin_assume_aligned(x, 16);}\nint main(void) { return 0; }" HAVE_CC_BUILTIN_ASSUME_ALIGNED) +@@ -477,7 +477,6 @@ else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + endif() + +-add_subdirectory(util) + add_subdirectory(doc/dev-reference) + + if (NOT WIN32) +@@ -486,7 +485,7 @@ if (NOT WIN32) + set(PCRE_REQUIRED_MAJOR_VERSION 8) + set(PCRE_REQUIRED_MINOR_VERSION 41) + set(PCRE_REQUIRED_VERSION ${PCRE_REQUIRED_MAJOR_VERSION}.${PCRE_REQUIRED_MINOR_VERSION}) +-include (${CMAKE_MODULE_PATH}/pcre.cmake) ++include (pcre) + if (NOT CORRECT_PCRE_VERSION) + message(STATUS "PCRE ${PCRE_REQUIRED_VERSION} or above not found") + endif() +@@ -496,17 +495,19 @@ if (CORRECT_PCRE_VERSION AND PCRE_BUILD_SOURCE AND BUILD_STATIC_LIBS) + set(BUILD_CHIMERA TRUE) + endif() + ++if(0) + add_subdirectory(unit) + if (EXISTS ${CMAKE_SOURCE_DIR}/tools/CMakeLists.txt) + add_subdirectory(tools) + endif() +-if (EXISTS ${CMAKE_SOURCE_DIR}/chimera/CMakeLists.txt AND BUILD_CHIMERA) ++endif() ++if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/chimera/CMakeLists.txt AND BUILD_CHIMERA) + add_subdirectory(chimera) + endif() + endif() + + # do substitutions +-configure_file(${CMAKE_MODULE_PATH}/config.h.in ${PROJECT_BINARY_DIR}/config.h) ++configure_file(${PROJECT_SOURCE_DIR}/cmake/config.h.in ${PROJECT_BINARY_DIR}/config.h) + configure_file(src/hs_version.h.in ${PROJECT_BINARY_DIR}/hs_version.h) + + if (NOT WIN32) +@@ -519,7 +520,7 @@ if (NOT WIN32) + endforeach() + + configure_file(libhs.pc.in libhs.pc @ONLY) # only replace @ quoted vars +- install(FILES ${CMAKE_BINARY_DIR}/libhs.pc ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libhs.pc + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + endif() + +@@ -538,7 +539,7 @@ if (WIN32) + set(PCRE_REQUIRED_MAJOR_VERSION 8) + set(PCRE_REQUIRED_MINOR_VERSION 41) + set(PCRE_REQUIRED_VERSION ${PCRE_REQUIRED_MAJOR_VERSION}.${PCRE_REQUIRED_MINOR_VERSION}) +-include (${CMAKE_MODULE_PATH}/pcre.cmake) ++include (pcre) + if (NOT CORRECT_PCRE_VERSION) + message(STATUS "PCRE ${PCRE_REQUIRED_VERSION} or above not found") + endif() +@@ -548,10 +549,12 @@ if (CORRECT_PCRE_VERSION AND PCRE_BUILD_SOURCE AND BUILD_STATIC_LIBS) + set(BUILD_CHIMERA TRUE) + endif() + ++if(0) + add_subdirectory(unit) + if (EXISTS ${CMAKE_SOURCE_DIR}/tools/CMakeLists.txt) + add_subdirectory(tools) + endif() ++endif() + if (EXISTS ${CMAKE_SOURCE_DIR}/chimera/CMakeLists.txt AND BUILD_CHIMERA) + add_subdirectory(chimera) + endif() +@@ -562,14 +565,14 @@ set(RAGEL_C_FLAGS "-Wno-unused") + endif() + + set_source_files_properties( +- ${CMAKE_BINARY_DIR}/src/parser/Parser.cpp ++ ${CMAKE_CURRENT_BINARY_DIR}/src/parser/Parser.cpp + PROPERTIES + COMPILE_FLAGS "${RAGEL_C_FLAGS}") + + ragelmaker(src/parser/Parser.rl) + + set_source_files_properties( +- ${CMAKE_BINARY_DIR}/src/parser/control_verbs.cpp ++ ${CMAKE_CURRENT_BINARY_DIR}/src/parser/control_verbs.cpp + PROPERTIES + COMPILE_FLAGS "${RAGEL_C_FLAGS}") + +@@ -1230,28 +1233,28 @@ else (FAT_RUNTIME) + list(APPEND RUNTIME_LIBS $) + set_target_properties(hs_exec_core2 PROPERTIES + COMPILE_FLAGS "-march=core2" +- RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} core2 ${CMAKE_MODULE_PATH}/keep.syms.in" ++ RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} core2 ${PROJECT_SOURCE_DIR}/cmake/keep.syms.in" + ) + + add_library(hs_exec_corei7 OBJECT ${hs_exec_SRCS}) + list(APPEND RUNTIME_LIBS $) + set_target_properties(hs_exec_corei7 PROPERTIES + COMPILE_FLAGS "-march=corei7" +- RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} corei7 ${CMAKE_MODULE_PATH}/keep.syms.in" ++ RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} corei7 ${PROJECT_SOURCE_DIR}/cmake/keep.syms.in" + ) + + add_library(hs_exec_avx2 OBJECT ${hs_exec_SRCS} ${hs_exec_avx2_SRCS}) + list(APPEND RUNTIME_LIBS $) + set_target_properties(hs_exec_avx2 PROPERTIES + COMPILE_FLAGS "-march=core-avx2" +- RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} avx2 ${CMAKE_MODULE_PATH}/keep.syms.in" ++ RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} avx2 ${PROJECT_SOURCE_DIR}/cmake/keep.syms.in" + ) + if (BUILD_AVX512) + add_library(hs_exec_avx512 OBJECT ${hs_exec_SRCS} ${hs_exec_avx2_SRCS}) + list(APPEND RUNTIME_LIBS $) + set_target_properties(hs_exec_avx512 PROPERTIES + COMPILE_FLAGS "${SKYLAKE_FLAG}" +- RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} avx512 ${CMAKE_MODULE_PATH}/keep.syms.in" ++ RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} avx512 ${PROJECT_SOURCE_DIR}/cmake/keep.syms.in" + ) + endif (BUILD_AVX512) + if (BUILD_AVX512VBMI) +@@ -1259,7 +1262,7 @@ else (FAT_RUNTIME) + list(APPEND RUNTIME_LIBS $) + set_target_properties(hs_exec_avx512vbmi PROPERTIES + COMPILE_FLAGS "${ICELAKE_FLAG}" +- RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} avx512vbmi ${CMAKE_MODULE_PATH}/keep.syms.in" ++ RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} avx512vbmi ${PROJECT_SOURCE_DIR}/cmake/keep.syms.in" + ) + endif (BUILD_AVX512VBMI) + +@@ -1294,14 +1297,14 @@ else (FAT_RUNTIME) + set_target_properties(hs_exec_shared_core2 PROPERTIES + COMPILE_FLAGS "-march=core2" + POSITION_INDEPENDENT_CODE TRUE +- RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} core2 ${CMAKE_MODULE_PATH}/keep.syms.in" ++ RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} core2 ${PROJECT_SOURCE_DIR}/cmake/keep.syms.in" + ) + add_library(hs_exec_shared_corei7 OBJECT ${hs_exec_SRCS}) + list(APPEND RUNTIME_SHLIBS $) + set_target_properties(hs_exec_shared_corei7 PROPERTIES + COMPILE_FLAGS "-march=corei7" + POSITION_INDEPENDENT_CODE TRUE +- RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} corei7 ${CMAKE_MODULE_PATH}/keep.syms.in" ++ RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} corei7 ${PROJECT_SOURCE_DIR}/cmake/keep.syms.in" + ) + add_library(hs_exec_shared_avx2 OBJECT ${hs_exec_SRCS} ${hs_exec_avx2_SRCS}) + list(APPEND RUNTIME_SHLIBS $) +@@ -1317,7 +1320,7 @@ else (FAT_RUNTIME) + set_target_properties(hs_exec_shared_avx512 PROPERTIES + COMPILE_FLAGS "${SKYLAKE_FLAG}" + POSITION_INDEPENDENT_CODE TRUE +- RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} avx512 ${CMAKE_MODULE_PATH}/keep.syms.in" ++ RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} avx512 ${PROJECT_SOURCE_DIR}/cmake/keep.syms.in" + ) + endif (BUILD_AVX512) + if (BUILD_AVX512VBMI) +@@ -1326,7 +1329,7 @@ else (FAT_RUNTIME) + set_target_properties(hs_exec_shared_avx512vbmi PROPERTIES + COMPILE_FLAGS "${ICELAKE_FLAG}" + POSITION_INDEPENDENT_CODE TRUE +- RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} avx512vbmi ${CMAKE_MODULE_PATH}/keep.syms.in" ++ RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} avx512vbmi ${PROJECT_SOURCE_DIR}/cmake/keep.syms.in" + ) + endif (BUILD_AVX512VBMI) + add_library(hs_exec_common_shared OBJECT +diff --git a/chimera/ch_database.h b/chimera/ch_database.h +index 28bde86..33cda9d 100644 +--- a/chimera/ch_database.h ++++ b/chimera/ch_database.h +@@ -38,7 +38,6 @@ extern "C" + { + #endif + +-#define PCRE_STATIC + #include + + #include "ch_compile.h" // for CH_MODE_ flags +diff --git a/cmake/pcre.cmake b/cmake/pcre.cmake +index e0acda5..0f9e8ac 100644 +--- a/cmake/pcre.cmake ++++ b/cmake/pcre.cmake +@@ -50,14 +50,10 @@ if (PCRE_BUILD_SOURCE) + set(PCRE_INCLUDE_DIRS ${PCRE_SOURCE} ${PROJECT_BINARY_DIR}/pcre) + set(PCRE_LDFLAGS -L"${LIBDIR}" -lpcre) + else () +- # pkgconf should save us +- find_package(PkgConfig) +- pkg_check_modules(PCRE libpcre>=${PCRE_REQUIRED_VERSION}) +- if (PCRE_FOUND) ++ # conan should save us ++ find_package(pcre) ++ if(pcre_FOUND AND (pcre_VERSION VERSION_GREATER_EQUAL PCRE_REQUIRED_VERSION)) + set(CORRECT_PCRE_VERSION TRUE) +- message(STATUS "PCRE version ${PCRE_REQUIRED_VERSION} or above") +- else () +- message(STATUS "PCRE version ${PCRE_REQUIRED_VERSION} or above not found") +- return () +- endif () ++ set(PCRE_LDFLAGS "pcre::pcre") ++ endif() + endif (PCRE_BUILD_SOURCE) +diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt +index 6ca3fd8..73c299d 100644 +--- a/tools/CMakeLists.txt ++++ b/tools/CMakeLists.txt +@@ -1,3 +1,6 @@ ++# Tools are not installed ++return () ++ + find_package(Threads) + + # remove some warnings diff --git a/recipes/hyperscan/all/patches/5.4.2-0002-use-ue2-make_unique.patch b/recipes/hyperscan/all/patches/5.4.2-0002-use-ue2-make_unique.patch new file mode 100644 index 0000000000000..7c24368a9f0e1 --- /dev/null +++ b/recipes/hyperscan/all/patches/5.4.2-0002-use-ue2-make_unique.patch @@ -0,0 +1,875 @@ +diff --git a/src/nfa/castlecompile.cpp b/src/nfa/castlecompile.cpp +index 5884ebb..1af6cd2 100644 +--- a/src/nfa/castlecompile.cpp ++++ b/src/nfa/castlecompile.cpp +@@ -281,7 +281,7 @@ vector> checkExclusion(u32 &streamStateSize, + size_t total = 0; + while (lower < trigSize) { + vector vertices; +- unique_ptr cg = make_unique(); ++ unique_ptr cg = ue2::make_unique(); + + vector> min_reset_dist; + size_t upper = min(lower + CLIQUE_GRAPH_MAX_SIZE, trigSize); +diff --git a/src/nfagraph/ng_equivalence.cpp b/src/nfagraph/ng_equivalence.cpp +index a42a0ac..9b1f072 100644 +--- a/src/nfagraph/ng_equivalence.cpp ++++ b/src/nfagraph/ng_equivalence.cpp +@@ -269,7 +269,7 @@ vector> getVertexInfos(const NGHolder &g) { + vertex_map.resize(num_verts); + + for (auto v : vertices_range(g)) { +- infos.push_back(make_unique(v, g)); ++ infos.push_back(ue2::make_unique(v, g)); + vertex_map[g[v].index] = infos.back().get(); + } + +@@ -516,7 +516,7 @@ void mergeClass(vector> &infos, NGHolder &g, + g[new_v].reports.clear(); /* populated as we pull in succs */ + + // store this vertex in our global vertex list +- infos.push_back(make_unique(new_v, g)); ++ infos.push_back(ue2::make_unique(new_v, g)); + VertexInfo *new_vertex_info = infos.back().get(); + + NFAVertex new_v_eod = NGHolder::null_vertex(); +@@ -525,7 +525,7 @@ void mergeClass(vector> &infos, NGHolder &g, + if (require_separate_eod_vertex(cur_class_vertices, g)) { + new_v_eod = clone_vertex(g, old_v); + g[new_v_eod].reports.clear(); +- infos.push_back(make_unique(new_v_eod, g)); ++ infos.push_back(ue2::make_unique(new_v_eod, g)); + new_vertex_info_eod = infos.back().get(); + } + +diff --git a/src/nfagraph/ng_violet.cpp b/src/nfagraph/ng_violet.cpp +index ba6b350..106b900 100644 +--- a/src/nfagraph/ng_violet.cpp ++++ b/src/nfagraph/ng_violet.cpp +@@ -375,7 +375,7 @@ void getSimpleRoseLiterals(const NGHolder &g, bool seeking_anchored, + + DEBUG_PRINTF("candidate is a candidate\n"); + scores[v] = score; +- lit_info[v] = make_unique(v, s, anchored); ++ lit_info[v] = ue2::make_unique(v, s, anchored); + } + + /* try to filter out cases where appending some characters produces worse +@@ -531,7 +531,7 @@ void getRegionRoseLiterals(const NGHolder &g, bool seeking_anchored, + } + + DEBUG_PRINTF("candidate is a candidate\n"); +- lits->push_back(make_unique(vv, s, anchored)); ++ lits->push_back(ue2::make_unique(vv, s, anchored)); + } + } + +@@ -1848,7 +1848,7 @@ static + unique_ptr make_chain(u32 count) { + assert(count); + +- auto rv = make_unique(NFA_INFIX); ++ auto rv = ue2::make_unique(NFA_INFIX); + + NGHolder &h = *rv; + +diff --git a/src/rose/rose_build_add.cpp b/src/rose/rose_build_add.cpp +index aa043fa..f680dbb 100644 +--- a/src/rose/rose_build_add.cpp ++++ b/src/rose/rose_build_add.cpp +@@ -1802,7 +1802,7 @@ bool RoseBuildImpl::addOutfix(const NGHolder &h, const raw_som_dfa &haig) { + + bool RoseBuildImpl::addOutfix(const raw_puff &rp) { + if (!mpv_outfix) { +- mpv_outfix = make_unique(MpvProto()); ++ mpv_outfix = ue2::make_unique(MpvProto()); + } + + auto *mpv = mpv_outfix->mpv(); +@@ -1827,7 +1827,7 @@ bool RoseBuildImpl::addOutfix(const raw_puff &rp) { + bool RoseBuildImpl::addChainTail(const raw_puff &rp, u32 *queue_out, + u32 *event_out) { + if (!mpv_outfix) { +- mpv_outfix = make_unique(MpvProto()); ++ mpv_outfix = ue2::make_unique(MpvProto()); + } + + auto *mpv = mpv_outfix->mpv(); +diff --git a/src/rose/rose_build_anchored.cpp b/src/rose/rose_build_anchored.cpp +index 8ea07c9..1f918bb 100644 +--- a/src/rose/rose_build_anchored.cpp ++++ b/src/rose/rose_build_anchored.cpp +@@ -249,7 +249,7 @@ unique_ptr populate_holder(const simple_anchored_info &sai, + const flat_set &exit_ids) { + DEBUG_PRINTF("populating holder for ^.{%u,%u}%s\n", sai.min_bound, + sai.max_bound, dumpString(sai.literal).c_str()); +- auto h_ptr = make_unique(); ++ auto h_ptr = ue2::make_unique(); + NGHolder &h = *h_ptr; + auto ends = addDotsToGraph(h, h.start, sai.min_bound, sai.max_bound, + CharReach::dot()); +diff --git a/src/rose/rose_build_exclusive.cpp b/src/rose/rose_build_exclusive.cpp +index 6a5a710..966c908 100644 +--- a/src/rose/rose_build_exclusive.cpp ++++ b/src/rose/rose_build_exclusive.cpp +@@ -280,7 +280,7 @@ void findCliques(const map> &exclusiveGroups, + } + // Construct the exclusivity graph + map vertex_map; +- unique_ptr cg = make_unique(); ++ unique_ptr cg = ue2::make_unique(); + + // Add vertices representing infixes/suffixes + for (const auto &e : exclusiveGroups) { +diff --git a/src/rose/rose_build_program.cpp b/src/rose/rose_build_program.cpp +index 96c95db..81d605b 100644 +--- a/src/rose/rose_build_program.cpp ++++ b/src/rose/rose_build_program.cpp +@@ -95,7 +95,7 @@ OffsetMap makeOffsetMap(const RoseProgram &program, u32 *total_len) { + } + + RoseProgram::RoseProgram() { +- prog.push_back(make_unique()); ++ prog.push_back(ue2::make_unique()); + } + + RoseProgram::~RoseProgram() = default; +@@ -297,28 +297,28 @@ void addEnginesEodProgram(u32 eodNfaIterOffset, RoseProgram &program) { + } + + RoseProgram block; +- block.add_before_end(make_unique(eodNfaIterOffset)); ++ block.add_before_end(ue2::make_unique(eodNfaIterOffset)); + program.add_block(move(block)); + } + + void addSuffixesEodProgram(RoseProgram &program) { + RoseProgram block; +- block.add_before_end(make_unique()); ++ block.add_before_end(ue2::make_unique()); + program.add_block(move(block)); + } + + void addMatcherEodProgram(RoseProgram &program) { + RoseProgram block; +- block.add_before_end(make_unique()); ++ block.add_before_end(ue2::make_unique()); + program.add_block(move(block)); + } + + void addFlushCombinationProgram(RoseProgram &program) { +- program.add_before_end(make_unique()); ++ program.add_before_end(ue2::make_unique()); + } + + void addLastFlushCombinationProgram(RoseProgram &program) { +- program.add_before_end(make_unique()); ++ program.add_before_end(ue2::make_unique()); + } + + static +@@ -342,11 +342,11 @@ void makeRoleCheckLeftfix(const RoseBuildImpl &build, + + unique_ptr ri; + if (is_prefix) { +- ri = make_unique(lni.queue, build.g[v].left.lag, ++ ri = ue2::make_unique(lni.queue, build.g[v].left.lag, + build.g[v].left.leftfix_report, + end_inst); + } else { +- ri = make_unique(lni.queue, build.g[v].left.lag, ++ ri = ue2::make_unique(lni.queue, build.g[v].left.lag, + build.g[v].left.leftfix_report, + end_inst); + } +@@ -384,7 +384,7 @@ void makeAnchoredLiteralDelay(const RoseBuildImpl &build, + u32 anch_id = prog_build.anchored_programs.at(lit_id); + + const auto *end_inst = program.end_instruction(); +- auto ri = make_unique(groups, anch_id, end_inst); ++ auto ri = ue2::make_unique(groups, anch_id, end_inst); + program.add_before_end(move(ri)); + } + +@@ -393,7 +393,7 @@ void makeDedupe(const ReportManager &rm, const Report &report, + RoseProgram &program) { + const auto *end_inst = program.end_instruction(); + auto ri = +- make_unique(report.quashSom, rm.getDkey(report), ++ ue2::make_unique(report.quashSom, rm.getDkey(report), + report.offsetAdjust, end_inst); + program.add_before_end(move(ri)); + } +@@ -402,7 +402,7 @@ static + void makeDedupeSom(const ReportManager &rm, const Report &report, + RoseProgram &program) { + const auto *end_inst = program.end_instruction(); +- auto ri = make_unique(report.quashSom, ++ auto ri = ue2::make_unique(report.quashSom, + rm.getDkey(report), + report.offsetAdjust, end_inst); + program.add_before_end(move(ri)); +@@ -428,7 +428,7 @@ void makeCatchup(const ReportManager &rm, bool needs_catchup, + return; + } + +- program.add_before_end(make_unique()); ++ program.add_before_end(ue2::make_unique()); + } + + static +@@ -511,12 +511,12 @@ void addLogicalSetRequired(const Report &report, ReportManager &rm, + return; + } + // set matching status of current lkey +- auto risl = make_unique(report.lkey, ++ auto risl = ue2::make_unique(report.lkey, + report.offsetAdjust); + program.add_before_end(move(risl)); + // set current lkey's corresponding ckeys active, pending to check + for (auto ckey : rm.getRelateCKeys(report.lkey)) { +- auto risc = make_unique(ckey); ++ auto risc = ue2::make_unique(ckey); + program.add_before_end(move(risc)); + } + } +@@ -532,7 +532,7 @@ void makeReport(const RoseBuildImpl &build, const ReportID id, + + // Handle min/max offset checks. + if (report.minOffset > 0 || report.maxOffset < MAX_OFFSET) { +- auto ri = make_unique(report.minOffset, ++ auto ri = ue2::make_unique(report.minOffset, + report.maxOffset, end_inst); + report_block.add_before_end(move(ri)); + } +@@ -540,7 +540,7 @@ void makeReport(const RoseBuildImpl &build, const ReportID id, + // If this report has an exhaustion key, we can check it in the program + // rather than waiting until we're in the callback adaptor. + if (report.ekey != INVALID_EKEY) { +- auto ri = make_unique(report.ekey, end_inst); ++ auto ri = ue2::make_unique(report.ekey, end_inst); + report_block.add_before_end(move(ri)); + } + +@@ -548,7 +548,7 @@ void makeReport(const RoseBuildImpl &build, const ReportID id, + // calculated. + if (isExternalSomReport(report) && + report.type != EXTERNAL_CALLBACK_SOM_PASS) { +- auto ri = make_unique(); ++ auto ri = ue2::make_unique(); + writeSomOperation(report, &ri->som); + report_block.add_before_end(move(ri)); + } +@@ -556,13 +556,13 @@ void makeReport(const RoseBuildImpl &build, const ReportID id, + // Min length constraint. + if (report.minLength > 0) { + assert(build.hasSom); +- auto ri = make_unique( ++ auto ri = ue2::make_unique( + report.offsetAdjust, report.minLength, end_inst); + report_block.add_before_end(move(ri)); + } + + if (report.quashSom) { +- report_block.add_before_end(make_unique()); ++ report_block.add_before_end(ue2::make_unique()); + } + + switch (report.type) { +@@ -578,7 +578,7 @@ void makeReport(const RoseBuildImpl &build, const ReportID id, + if (needs_dedupe) { + if (!report.quiet) { + report_block.add_before_end( +- make_unique( ++ ue2::make_unique( + report.quashSom, build.rm.getDkey(report), + report.onmatch, report.offsetAdjust, end_inst)); + } else { +@@ -587,7 +587,7 @@ void makeReport(const RoseBuildImpl &build, const ReportID id, + } else { + if (!report.quiet) { + report_block.add_before_end( +- make_unique( ++ ue2::make_unique( + report.onmatch, report.offsetAdjust)); + } + } +@@ -597,28 +597,28 @@ void makeReport(const RoseBuildImpl &build, const ReportID id, + } + if (!report.quiet) { + report_block.add_before_end( +- make_unique( ++ ue2::make_unique( + report.onmatch, report.offsetAdjust, report.ekey)); + } else { + report_block.add_before_end( +- make_unique(report.ekey)); ++ ue2::make_unique(report.ekey)); + } + } + } else { // has_som + makeDedupeSom(build.rm, report, report_block); + if (report.ekey == INVALID_EKEY) { + if (!report.quiet) { +- report_block.add_before_end(make_unique( ++ report_block.add_before_end(ue2::make_unique( + report.onmatch, report.offsetAdjust)); + } + } else { + if (!report.quiet) { + report_block.add_before_end( +- make_unique( ++ ue2::make_unique( + report.onmatch, report.offsetAdjust, report.ekey)); + } else { + report_block.add_before_end( +- make_unique(report.ekey)); ++ ue2::make_unique(report.ekey)); + } + } + } +@@ -639,17 +639,17 @@ void makeReport(const RoseBuildImpl &build, const ReportID id, + addFlushCombinationProgram(report_block); + } + if (has_som) { +- auto ri = make_unique(); ++ auto ri = ue2::make_unique(); + writeSomOperation(report, &ri->som); + report_block.add_before_end(move(ri)); + } else { +- auto ri = make_unique(); ++ auto ri = ue2::make_unique(); + writeSomOperation(report, &ri->som); + report_block.add_before_end(move(ri)); + } + break; + case INTERNAL_ROSE_CHAIN: { +- report_block.add_before_end(make_unique( ++ report_block.add_before_end(ue2::make_unique( + report.onmatch, report.topSquashDistance)); + break; + } +@@ -663,17 +663,17 @@ void makeReport(const RoseBuildImpl &build, const ReportID id, + makeDedupeSom(build.rm, report, report_block); + if (report.ekey == INVALID_EKEY) { + if (!report.quiet) { +- report_block.add_before_end(make_unique( ++ report_block.add_before_end(ue2::make_unique( + report.onmatch, report.offsetAdjust)); + } + } else { + if (!report.quiet) { + report_block.add_before_end( +- make_unique( ++ ue2::make_unique( + report.onmatch, report.offsetAdjust, report.ekey)); + } else { + report_block.add_before_end( +- make_unique(report.ekey)); ++ ue2::make_unique(report.ekey)); + } + } + addLogicalSetRequired(report, build.rm, report_block); +@@ -685,17 +685,17 @@ void makeReport(const RoseBuildImpl &build, const ReportID id, + makeDedupeSom(build.rm, report, report_block); + if (report.ekey == INVALID_EKEY) { + if (!report.quiet) { +- report_block.add_before_end(make_unique( ++ report_block.add_before_end(ue2::make_unique( + report.onmatch, report.offsetAdjust)); + } + } else { + if (!report.quiet) { + report_block.add_before_end( +- make_unique( ++ ue2::make_unique( + report.onmatch, report.offsetAdjust, report.ekey)); + } else { + report_block.add_before_end( +- make_unique(report.ekey)); ++ ue2::make_unique(report.ekey)); + } + } + addLogicalSetRequired(report, build.rm, report_block); +@@ -722,11 +722,11 @@ void makeRoleReports(const RoseBuildImpl &build, + assert(contains(leftfix_info, v)); + const left_build_info &lni = leftfix_info.at(v); + program.add_before_end( +- make_unique(lni.queue, g[v].left.lag)); ++ ue2::make_unique(lni.queue, g[v].left.lag)); + report_som = true; + } else if (g[v].som_adjust) { + program.add_before_end( +- make_unique(g[v].som_adjust)); ++ ue2::make_unique(g[v].som_adjust)); + report_som = true; + } + +@@ -748,7 +748,7 @@ void makeRoleSetState(const unordered_map &roleStateIndices, + if (it == end(roleStateIndices)) { + return; + } +- program.add_before_end(make_unique(it->second)); ++ program.add_before_end(ue2::make_unique(it->second)); + } + + static +@@ -772,7 +772,7 @@ void makePushDelayedInstructions(const RoseLiteralMap &literals, + }); + + for (const auto &ri : delay_instructions) { +- program.add_before_end(make_unique(ri)); ++ program.add_before_end(ue2::make_unique(ri)); + } + } + +@@ -801,10 +801,10 @@ void makeCheckLiteralInstruction(const rose_literal_id &lit, + const auto *end_inst = program.end_instruction(); + unique_ptr ri; + if (lit.s.any_nocase()) { +- ri = make_unique(lit.s.get_string(), ++ ri = ue2::make_unique(lit.s.get_string(), + end_inst); + } else { +- ri = make_unique(lit.s.get_string(), ++ ri = ue2::make_unique(lit.s.get_string(), + end_inst); + } + program.add_before_end(move(ri)); +@@ -820,10 +820,10 @@ void makeCheckLiteralInstruction(const rose_literal_id &lit, + const auto *end_inst = program.end_instruction(); + unique_ptr ri; + if (lit.s.any_nocase()) { +- ri = make_unique(lit.s.get_string(), ++ ri = ue2::make_unique(lit.s.get_string(), + end_inst); + } else { +- ri = make_unique(lit.s.get_string(), end_inst); ++ ri = ue2::make_unique(lit.s.get_string(), end_inst); + } + program.add_before_end(move(ri)); + } +@@ -840,7 +840,7 @@ void makeRoleCheckNotHandled(ProgramBuild &prog_build, RoseVertex v, + } + + const auto *end_inst = program.end_instruction(); +- auto ri = make_unique(handled_key, end_inst); ++ auto ri = ue2::make_unique(handled_key, end_inst); + program.add_before_end(move(ri)); + } + +@@ -889,7 +889,7 @@ void makeRoleCheckBounds(const RoseBuildImpl &build, RoseVertex v, + + const auto *end_inst = program.end_instruction(); + program.add_before_end( +- make_unique(min_bound, max_bound, end_inst)); ++ ue2::make_unique(min_bound, max_bound, end_inst)); + } + + static +@@ -924,7 +924,7 @@ void makeRoleGroups(const RoseGraph &g, ProgramBuild &prog_build, + return; + } + +- program.add_before_end(make_unique(groups)); ++ program.add_before_end(ue2::make_unique(groups)); + } + + static +@@ -968,7 +968,7 @@ bool makeRoleByte(const vector &look, RoseProgram &program) { + s32 checkbyte_offset = verify_s32(entry.offset); + DEBUG_PRINTF("CHECK BYTE offset=%d\n", checkbyte_offset); + const auto *end_inst = program.end_instruction(); +- auto ri = make_unique(andmask_u8, cmpmask_u8, flip, ++ auto ri = ue2::make_unique(andmask_u8, cmpmask_u8, flip, + checkbyte_offset, end_inst); + program.add_before_end(move(ri)); + return true; +@@ -1000,7 +1000,7 @@ bool makeRoleMask(const vector &look, RoseProgram &program) { + DEBUG_PRINTF("CHECK MASK and_mask=%llx cmp_mask=%llx\n", + and_mask, cmp_mask); + const auto *end_inst = program.end_instruction(); +- auto ri = make_unique(and_mask, cmp_mask, neg_mask, ++ auto ri = ue2::make_unique(and_mask, cmp_mask, neg_mask, + base_offset, end_inst); + program.add_before_end(move(ri)); + return true; +@@ -1055,7 +1055,7 @@ bool makeRoleMask32(const vector &look, + DEBUG_PRINTF("base_offset %d\n", base_offset); + + const auto *end_inst = program.end_instruction(); +- auto ri = make_unique(and_mask, cmp_mask, neg_mask, ++ auto ri = ue2::make_unique(and_mask, cmp_mask, neg_mask, + base_offset, end_inst); + program.add_before_end(move(ri)); + return true; +@@ -1098,7 +1098,7 @@ bool makeRoleMask64(const vector &look, + DEBUG_PRINTF("base_offset %d\n", base_offset); + + const auto *end_inst = program.end_instruction(); +- auto ri = make_unique(and_mask, cmp_mask, neg_mask, ++ auto ri = ue2::make_unique(and_mask, cmp_mask, neg_mask, + base_offset, end_inst); + program.add_before_end(move(ri)); + return true; +@@ -1235,7 +1235,7 @@ makeCheckShufti16x8(u32 offset_range, u8 bucket_idx, + copy(hi_mask.begin(), hi_mask.begin() + 16, nib_mask.begin() + 16); + copy(bucket_select_mask.begin(), bucket_select_mask.begin() + 16, + bucket_select_mask_16.begin()); +- return make_unique ++ return ue2::make_unique + (nib_mask, bucket_select_mask_16, + neg_mask & 0xffff, base_offset, end_inst); + } +@@ -1255,7 +1255,7 @@ makeCheckShufti32x8(u32 offset_range, u8 bucket_idx, + array lo_mask_16; + copy(hi_mask.begin(), hi_mask.begin() + 16, hi_mask_16.begin()); + copy(lo_mask.begin(), lo_mask.begin() + 16, lo_mask_16.begin()); +- return make_unique ++ return ue2::make_unique + (hi_mask_16, lo_mask_16, bucket_select_mask, + neg_mask, base_offset, end_inst); + } +@@ -1277,7 +1277,7 @@ makeCheckShufti16x16(u32 offset_range, u8 bucket_idx, + bucket_select_mask_32.begin()); + copy(bucket_select_mask_hi.begin(), bucket_select_mask_hi.begin() + 16, + bucket_select_mask_32.begin() + 16); +- return make_unique ++ return ue2::make_unique + (hi_mask, lo_mask, bucket_select_mask_32, + neg_mask & 0xffff, base_offset, end_inst); + } +@@ -1294,7 +1294,7 @@ makeCheckShufti32x16(u32 offset_range, u8 bucket_idx, + return nullptr; + } + +- return make_unique ++ return ue2::make_unique + (hi_mask, lo_mask, bucket_select_mask_hi, + bucket_select_mask_lo, neg_mask, base_offset, end_inst); + } +@@ -1321,7 +1321,7 @@ makeCheckShufti64x8(u32 offset_range, u8 bucket_idx, + copy(lo_mask.begin(), lo_mask.begin() + 16, lo_mask_64.begin() + 32); + copy(lo_mask.begin(), lo_mask.begin() + 16, lo_mask_64.begin() + 48); + +- return make_unique ++ return ue2::make_unique + (hi_mask_64, lo_mask_64, bucket_select_mask, + neg_mask, base_offset, end_inst); + } +@@ -1361,7 +1361,7 @@ makeCheckShufti64x16(u32 offset_range, u8 bucket_idx, + copy(lo_mask.begin() + 16, lo_mask.begin() + 32, lo_mask_2.begin() + 32); + copy(lo_mask.begin() + 16, lo_mask.begin() + 32, lo_mask_2.begin() + 48); + +- return make_unique ++ return ue2::make_unique + (hi_mask_1, hi_mask_2, lo_mask_1, lo_mask_2, bucket_select_mask_hi, + bucket_select_mask_lo, neg_mask, base_offset, end_inst); + } +@@ -1486,7 +1486,7 @@ void makeLookaroundInstruction(const vector &look, + if (look.size() == 1) { + s8 offset = look.begin()->offset; + const CharReach &reach = look.begin()->reach; +- auto ri = make_unique(offset, reach, ++ auto ri = ue2::make_unique(offset, reach, + program.end_instruction()); + program.add_before_end(move(ri)); + return; +@@ -1508,7 +1508,7 @@ void makeLookaroundInstruction(const vector &look, + return; + } + +- auto ri = make_unique(look, ++ auto ri = ue2::make_unique(look, + program.end_instruction()); + program.add_before_end(move(ri)); + } +@@ -1584,7 +1584,7 @@ void makeCheckLitEarlyInstruction(const RoseBuildImpl &build, u32 lit_id, + + DEBUG_PRINTF("adding lit early check, min_offset=%u\n", min_offset); + const auto *end = prog.end_instruction(); +- prog.add_before_end(make_unique(min_offset, end)); ++ prog.add_before_end(ue2::make_unique(min_offset, end)); + } + + static +@@ -1595,7 +1595,7 @@ void makeGroupCheckInstruction(const RoseBuildImpl &build, u32 lit_id, + if (!info.group_mask) { + return; + } +- prog.add_before_end(make_unique(info.group_mask)); ++ prog.add_before_end(ue2::make_unique(info.group_mask)); + } + + static +@@ -1762,7 +1762,7 @@ bool makeRoleMultipathShufti(const vector> &multi_look, + copy(begin(lo_mask), begin(lo_mask) + 16, nib_mask.begin()); + copy(begin(hi_mask), begin(hi_mask) + 16, nib_mask.begin() + 16); + +- auto ri = make_unique ++ auto ri = ue2::make_unique + (nib_mask, bucket_select_lo, data_select_mask, hi_bits_mask, + lo_bits_mask, neg_mask, base_offset, last_start, end_inst); + program.add_before_end(move(ri)); +@@ -1771,20 +1771,20 @@ bool makeRoleMultipathShufti(const vector> &multi_look, + assert(!(hi_bits_mask & ~0xffffffffULL)); + assert(!(lo_bits_mask & ~0xffffffffULL)); + if (bit_index <= 8) { +- auto ri = make_unique ++ auto ri = ue2::make_unique + (hi_mask, lo_mask, bucket_select_lo, data_select_mask, + hi_bits_mask, lo_bits_mask, neg_mask, base_offset, + last_start, end_inst); + program.add_before_end(move(ri)); + } else { +- auto ri = make_unique ++ auto ri = ue2::make_unique + (hi_mask, lo_mask, bucket_select_hi, bucket_select_lo, + data_select_mask, hi_bits_mask, lo_bits_mask, neg_mask, + base_offset, last_start, end_inst); + program.add_before_end(move(ri)); + } + } else { +- auto ri = make_unique ++ auto ri = ue2::make_unique + (hi_mask, lo_mask, bucket_select_lo, data_select_mask, + hi_bits_mask, lo_bits_mask, neg_mask, base_offset, + last_start, end_inst); +@@ -1856,7 +1856,7 @@ void makeRoleMultipathLookaround(const vector> &multi_look, + ordered_look.emplace_back(multi_entry); + } + +- auto ri = make_unique(move(ordered_look), ++ auto ri = ue2::make_unique(move(ordered_look), + last_start, start_mask, + program.end_instruction()); + program.add_before_end(move(ri)); +@@ -1932,7 +1932,7 @@ void makeRoleSuffix(const RoseBuildImpl &build, + event = MQE_TOP; + } + +- prog.add_before_end(make_unique(queue, event)); ++ prog.add_before_end(ue2::make_unique(queue, event)); + } + + static +@@ -1945,7 +1945,7 @@ void addInfixTriggerInstructions(vector triggers, + }); + for (const auto &ti : triggers) { + prog.add_before_end( +- make_unique(ti.cancel, ti.queue, ti.event)); ++ ue2::make_unique(ti.cancel, ti.queue, ti.event)); + } + } + +@@ -2039,7 +2039,7 @@ static + void addCheckOnlyEodInstruction(RoseProgram &prog) { + DEBUG_PRINTF("only at eod\n"); + const auto *end_inst = prog.end_instruction(); +- prog.add_before_end(make_unique(end_inst)); ++ prog.add_before_end(ue2::make_unique(end_inst)); + } + + static +@@ -2164,7 +2164,7 @@ void makeGroupSquashInstruction(const RoseBuildImpl &build, u32 lit_id, + DEBUG_PRINTF("squashes 0x%llx\n", info.group_mask); + assert(info.group_mask); + /* Note: group_mask is negated. */ +- prog.add_before_end(make_unique(~info.group_mask)); ++ prog.add_before_end(ue2::make_unique(~info.group_mask)); + } + + namespace { +@@ -2209,7 +2209,7 @@ RoseProgram assembleProgramBlocks(vector &&blocks_in) { + * only set if a state has been. */ + if (!prog.empty() && reads_work_done_flag(block)) { + RoseProgram clear_block; +- clear_block.add_before_end(make_unique()); ++ clear_block.add_before_end(ue2::make_unique()); + prog.add_block(move(clear_block)); + } + +@@ -2369,7 +2369,7 @@ void makeCatchupMpv(const ReportManager &rm, bool needs_mpv_catchup, + return; + } + +- program.add_before_end(make_unique()); ++ program.add_before_end(ue2::make_unique()); + } + + RoseProgram makeReportProgram(const RoseBuildImpl &build, +@@ -2402,7 +2402,7 @@ RoseProgram makeBoundaryProgram(const RoseBuildImpl &build, + void addIncludedJumpProgram(RoseProgram &program, u32 child_offset, + u8 squash) { + RoseProgram block; +- block.add_before_end(make_unique(child_offset, ++ block.add_before_end(ue2::make_unique(child_offset, + squash)); + program.add_block(move(block)); + } +@@ -2413,7 +2413,7 @@ void addPredBlockSingle(u32 pred_state, RoseProgram &pred_block, + // Prepend an instruction to check the pred state is on. + const auto *end_inst = pred_block.end_instruction(); + pred_block.insert(begin(pred_block), +- make_unique(pred_state, end_inst)); ++ ue2::make_unique(pred_state, end_inst)); + program.add_block(move(pred_block)); + } + +@@ -2428,7 +2428,7 @@ void addPredBlocksAny(map &pred_blocks, u32 num_states, + } + + const RoseInstruction *end_inst = sparse_program.end_instruction(); +- auto ri = make_unique(num_states, keys, end_inst); ++ auto ri = ue2::make_unique(num_states, keys, end_inst); + sparse_program.add_before_end(move(ri)); + + RoseProgram &block = pred_blocks.begin()->second; +@@ -2451,14 +2451,14 @@ void addPredBlocksMulti(map &pred_blocks, + vector> jump_table; + + // BEGIN instruction. +- auto ri_begin = make_unique(num_states, end_inst); ++ auto ri_begin = ue2::make_unique(num_states, end_inst); + RoseInstrSparseIterBegin *begin_inst = ri_begin.get(); + sparse_program.add_before_end(move(ri_begin)); + + // NEXT instructions, one per pred program. + u32 prev_key = pred_blocks.begin()->first; + for (auto it = next(begin(pred_blocks)); it != end(pred_blocks); ++it) { +- auto ri = make_unique(prev_key, begin_inst, ++ auto ri = ue2::make_unique(prev_key, begin_inst, + end_inst); + sparse_program.add_before_end(move(ri)); + prev_key = it->first; +@@ -2539,7 +2539,7 @@ void applyFinalSpecialisation(RoseProgram &program) { + auto it = next(program.rbegin()); + if (auto *ri = dynamic_cast(it->get())) { + DEBUG_PRINTF("replacing REPORT with FINAL_REPORT\n"); +- program.replace(it, make_unique( ++ program.replace(it, ue2::make_unique( + ri->onmatch, ri->offset_adjust)); + } + } +diff --git a/src/rose/rose_in_util.cpp b/src/rose/rose_in_util.cpp +index 9fe47c2..6fa56d1 100644 +--- a/src/rose/rose_in_util.cpp ++++ b/src/rose/rose_in_util.cpp +@@ -93,7 +93,7 @@ private: + + unique_ptr cloneRoseGraph(const RoseInGraph &ig) { + assert(hasCorrectlyNumberedVertices(ig)); +- unique_ptr out = make_unique(); ++ unique_ptr out = ue2::make_unique(); + + unordered_map> graph_map; + unordered_map> haig_map; +diff --git a/src/smallwrite/smallwrite_build.cpp b/src/smallwrite/smallwrite_build.cpp +index ea89669..fc4e5cb 100644 +--- a/src/smallwrite/smallwrite_build.cpp ++++ b/src/smallwrite/smallwrite_build.cpp +@@ -680,7 +680,7 @@ unique_ptr buildDfa(LitTrie &trie, bool nocase) { + // Construct DFA states in BFS order. + const auto state_ids = makeStateMap(trie, ordering); + +- auto rdfa = make_unique(NFA_OUTFIX); ++ auto rdfa = ue2::make_unique(NFA_OUTFIX); + + // Calculate alphabet. + array unalpha; +diff --git a/tools/hsbench/main.cpp b/tools/hsbench/main.cpp +index 22becbd..4c671c0 100644 +--- a/tools/hsbench/main.cpp ++++ b/tools/hsbench/main.cpp +@@ -1043,7 +1043,7 @@ void runBenchmark(const Engine &db, + int HS_CDECL main(int argc, char *argv[]) { + unique_ptr grey; + #if !defined(RELEASE_BUILD) +- grey = make_unique(); ++ grey = ue2::make_unique(); + #endif + setlocale(LC_ALL, ""); // use the user's locale + +diff --git a/tools/hscheck/main.cpp b/tools/hscheck/main.cpp +index 197087b..bdecab8 100644 +--- a/tools/hscheck/main.cpp ++++ b/tools/hscheck/main.cpp +@@ -664,7 +664,7 @@ int HS_CDECL main(int argc, char **argv) { + num_of_threads = max(1u, std::thread::hardware_concurrency()); + + #if !defined(RELEASE_BUILD) +- g_grey = make_unique(); ++ g_grey = ue2::make_unique(); + #endif + processArgs(argc, argv, g_grey); + +diff --git a/tools/hscollider/GraphTruth.cpp b/tools/hscollider/GraphTruth.cpp +index 0b67b11..e43beb1 100644 +--- a/tools/hscollider/GraphTruth.cpp ++++ b/tools/hscollider/GraphTruth.cpp +@@ -134,7 +134,7 @@ void CNGInfo::compile() { + auto pl = ue2::make_unique(); + pl->parseLogicalCombination(id, re.c_str(), ~0U, 0, ~0ULL); + pl->logicalKeyRenumber(); +- cng = make_unique(move(pl)); ++ cng = ue2::make_unique(move(pl)); + return; + } + +@@ -193,7 +193,7 @@ void CNGInfo::compile() { + } + } + +- cng = make_unique(move(g), move(rm)); ++ cng = ue2::make_unique(move(g), move(rm)); + } catch (CompileError &e) { + throw NGCompileFailure(e.reason); + } catch (NGUnsupportedFailure &e) { +@@ -257,7 +257,7 @@ unique_ptr GraphTruth::preprocess(unsigned id, + } + } + +- auto cngi = make_unique(id, m_expr); ++ auto cngi = ue2::make_unique(id, m_expr); + cngi->utf8 = hs_flags & HS_FLAG_UTF8; + cngi->highlander = highlander; + cngi->prefilter = prefilter; +diff --git a/tools/hscollider/GroundTruth.cpp b/tools/hscollider/GroundTruth.cpp +index a267306..d9293dc 100644 +--- a/tools/hscollider/GroundTruth.cpp ++++ b/tools/hscollider/GroundTruth.cpp +@@ -331,7 +331,7 @@ GroundTruth::compile(unsigned id, bool no_callouts) { + int errloc = 0; + int errcode = 0; + +- unique_ptr compiled = make_unique(); ++ unique_ptr compiled = ue2::make_unique(); + compiled->utf8 = flags & PCRE_UTF8; + compiled->highlander = highlander; + compiled->prefilter = prefilter; +diff --git a/tools/hscollider/main.cpp b/tools/hscollider/main.cpp +index afa6ef5..c85526e 100644 +--- a/tools/hscollider/main.cpp ++++ b/tools/hscollider/main.cpp +@@ -1606,7 +1606,7 @@ void generateTests(CorporaSource &corpora_src, const ExpressionMap &exprMap, + max_generator_queue_len); + vector> generators; + for (size_t i = 0; i < numGeneratorThreads; i++) { +- auto c = make_unique(i, testq, corpq, corpora_src); ++ auto c = ue2::make_unique(i, testq, corpq, corpora_src); + c->start(); + generators.push_back(move(c)); + } +diff --git a/util/ng_corpus_generator.cpp b/util/ng_corpus_generator.cpp +index f796cd4..1613082 100644 +--- a/util/ng_corpus_generator.cpp ++++ b/util/ng_corpus_generator.cpp +@@ -200,7 +200,7 @@ void findPaths(const NGHolder &g, CorpusProperties &cProps, + if (boost::next(ai) == ae) { + new_path = std::move(p); + } else { +- new_path = make_unique(*p); ++ new_path = ue2::make_unique(*p); + } + + new_path->push_back(v); diff --git a/recipes/hyperscan/all/test_package/conanfile.py b/recipes/hyperscan/all/test_package/conanfile.py index f5c91753bcba3..5e1749b052fcf 100644 --- a/recipes/hyperscan/all/test_package/conanfile.py +++ b/recipes/hyperscan/all/test_package/conanfile.py @@ -9,6 +9,8 @@ class TestPackageConan(ConanFile): generators = "CMakeDeps", "VirtualRunEnv" test_type = "explicit" + _with_chimera = False + def layout(self): cmake_layout(self) @@ -20,6 +22,8 @@ def generate(self): tc.variables["BUILD_CHIMERA"] = self.dependencies["hyperscan"].options.build_chimera tc.generate() + self._with_chimera = self.dependencies["hyperscan"].options.build_chimera + def build(self): cmake = CMake(self) cmake.configure() @@ -30,6 +34,6 @@ def test(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "hs_example") self.run(bin_path, env="conanrun") - if self.options["hyperscan"].build_chimera: + if self._with_chimera: bin_path = os.path.join(self.cpp.build.bindirs[0], "ch_example") self.run(bin_path, env="conanrun") diff --git a/recipes/hyperscan/config.yml b/recipes/hyperscan/config.yml index d02161efd202b..4915e863cdb5a 100644 --- a/recipes/hyperscan/config.yml +++ b/recipes/hyperscan/config.yml @@ -1,3 +1,5 @@ versions: + "5.4.2": + folder: all "5.4.0": folder: all From 4c7939bc4f74883779b8a6a3b6e5472c70140744 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 2 Sep 2023 22:06:20 +0300 Subject: [PATCH 491/637] (#18663) enkits: migrate to Conan v2 * enkits: migrate to Conan v2 * enkits: restore VirtualRunEnv in test_package * enkits: add m --- recipes/enkits/all/CMakeLists.txt | 7 -- recipes/enkits/all/conandata.yml | 10 --- recipes/enkits/all/conanfile.py | 74 ++++++++++--------- .../patches/cmake-install-lib-location.patch | 5 -- .../enkits/all/test_package/CMakeLists.txt | 9 +-- recipes/enkits/all/test_package/conanfile.py | 22 ++++-- .../enkits/all/test_v1_package/CMakeLists.txt | 8 ++ .../enkits/all/test_v1_package/conanfile.py | 16 ++++ 8 files changed, 85 insertions(+), 66 deletions(-) delete mode 100644 recipes/enkits/all/CMakeLists.txt delete mode 100644 recipes/enkits/all/patches/cmake-install-lib-location.patch create mode 100644 recipes/enkits/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/enkits/all/test_v1_package/conanfile.py diff --git a/recipes/enkits/all/CMakeLists.txt b/recipes/enkits/all/CMakeLists.txt deleted file mode 100644 index c986d294c7547..0000000000000 --- a/recipes/enkits/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/enkits/all/conandata.yml b/recipes/enkits/all/conandata.yml index 9604c7fcf2b72..197355c129edc 100644 --- a/recipes/enkits/all/conandata.yml +++ b/recipes/enkits/all/conandata.yml @@ -8,13 +8,3 @@ sources: "1.8": url: "https://github.com/dougbinks/enkiTS/archive/v1.8.zip" sha256: "b96d8d439502d52f9dc419539b12b588df10750f4631ad5518586f7048cdfaef" -patches: - "1.11": - - patch_file: "patches/cmake-install-lib-location.patch" - base_path: "source_subfolder" - "1.10": - - patch_file: "patches/cmake-install-lib-location.patch" - base_path: "source_subfolder" - "1.8": - - patch_file: "patches/cmake-install-lib-location.patch" - base_path: "source_subfolder" diff --git a/recipes/enkits/all/conanfile.py b/recipes/enkits/all/conanfile.py index 3a8bf5c9e920b..6149fad91345f 100644 --- a/recipes/enkits/all/conanfile.py +++ b/recipes/enkits/all/conanfile.py @@ -1,18 +1,22 @@ import os -from conans import ConanFile, CMake, tools + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, export_conandata_patches, get, replace_in_file + +required_conan_version = ">=1.53.0" + class EnkiTSConan(ConanFile): name = "enkits" description = "A permissively licensed C and C++ Task Scheduler for creating parallel programs." - topics = ("conan", "c", "thread", "multithreading", "scheduling", "enkits", "gamedev") + license = "Zlib" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/dougbinks/enkiTS" - license = "Zlib" - settings = "os", "arch", "compiler", "build_type" - - exports_sources = "CMakeLists.txt", "patches/*" - generators = "cmake" + topics = ("c", "thread", "multithreading", "scheduling", "gamedev") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -22,11 +26,8 @@ class EnkiTSConan(ConanFile): "fPIC": True, } - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -34,37 +35,44 @@ def config_options(self): 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 source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = "enkiTS-" + self.version - os.rename(extracted_dir, self._source_subfolder) - - def _configure_cmake(self): - if not self._cmake: - self._cmake = CMake(self) - self._cmake.definitions["ENKITS_INSTALL"] = True - self._cmake.definitions["ENKITS_BUILD_EXAMPLES"] = False - self._cmake.definitions["ENKITS_BUILD_SHARED"] = self.options.shared - self._cmake.configure() - return self._cmake + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["ENKITS_INSTALL"] = True + tc.variables["ENKITS_BUILD_EXAMPLES"] = False + tc.variables["ENKITS_BUILD_SHARED"] = self.options.shared + tc.generate() + + def _patch_sources(self): + replace_in_file( + self, + os.path.join(self.source_folder, "CMakeLists.txt"), + 'install(TARGETS enkiTS DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/enkiTS")', + "install(TARGETS enkiTS ARCHIVE LIBRARY RUNTIME)", + ) def build(self): - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) - cmake = self._configure_cmake() + self._patch_sources() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy(pattern="License.txt", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "License.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): self.cpp_info.libs = ["enkiTS"] - + if self.options.shared: self.cpp_info.defines.append("ENKITS_DLL=1") - if self.settings.os == "Linux": - self.cpp_info.system_libs = ["pthread"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m", "pthread"] diff --git a/recipes/enkits/all/patches/cmake-install-lib-location.patch b/recipes/enkits/all/patches/cmake-install-lib-location.patch deleted file mode 100644 index 0a43979813c18..0000000000000 --- a/recipes/enkits/all/patches/cmake-install-lib-location.patch +++ /dev/null @@ -1,5 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -63,1 +63,1 @@ -- install(TARGETS enkiTS DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/enkiTS") -+ install(TARGETS enkiTS ARCHIVE LIBRARY RUNTIME) diff --git a/recipes/enkits/all/test_package/CMakeLists.txt b/recipes/enkits/all/test_package/CMakeLists.txt index 33ae887aa6aea..2c29974d55284 100644 --- a/recipes/enkits/all/test_package/CMakeLists.txt +++ b/recipes/enkits/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(enkits REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE enkits::enkits) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/enkits/all/test_package/conanfile.py b/recipes/enkits/all/test_package/conanfile.py index 32e9e0cb58ab6..ef5d7042163ec 100644 --- a/recipes/enkits/all/test_package/conanfile.py +++ b/recipes/enkits/all/test_package/conanfile.py @@ -1,9 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -11,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/enkits/all/test_v1_package/CMakeLists.txt b/recipes/enkits/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/enkits/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/enkits/all/test_v1_package/conanfile.py b/recipes/enkits/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..910ae60d10438 --- /dev/null +++ b/recipes/enkits/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +import os +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From e1aa944277a1546bf918ff4eb2e2e364ac539b38 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 2 Sep 2023 22:48:42 +0300 Subject: [PATCH 492/637] (#18688) qdbm: migrate to Conan v2 * qdbm: migrate to Conan v2 * qdbm: move DLLs from lib to bin * qdbm: restore VirtualRunEnv in test_package --- recipes/qdbm/all/CMakeLists.txt | 15 +--- recipes/qdbm/all/conandata.yml | 2 +- recipes/qdbm/all/conanfile.py | 73 ++++++++++--------- recipes/qdbm/all/test_package/CMakeLists.txt | 5 +- recipes/qdbm/all/test_package/conanfile.py | 22 ++++-- recipes/qdbm/all/test_package/test_package.c | 10 +-- .../qdbm/all/test_v1_package/CMakeLists.txt | 8 ++ recipes/qdbm/all/test_v1_package/conanfile.py | 18 +++++ 8 files changed, 88 insertions(+), 65 deletions(-) create mode 100644 recipes/qdbm/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/qdbm/all/test_v1_package/conanfile.py diff --git a/recipes/qdbm/all/CMakeLists.txt b/recipes/qdbm/all/CMakeLists.txt index 39427c2f3ccc3..1f080a697bce5 100644 --- a/recipes/qdbm/all/CMakeLists.txt +++ b/recipes/qdbm/all/CMakeLists.txt @@ -1,11 +1,7 @@ -cmake_minimum_required(VERSION 3.1) - +cmake_minimum_required(VERSION 3.12) project(qdbm_wrapper VERSION "${CONAN_qdbm_VERSION}" LANGUAGES C) -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup(TARGETS KEEP_RPATHS) - -set(QDBM_SRC_DIR ${PROJECT_SOURCE_DIR}/source_subfolder) +set(QDBM_SRC_DIR ${CMAKE_CURRENT_LIST_DIR}/src) # ---- Dependencies ---- @@ -65,12 +61,7 @@ set_target_properties( include(GNUInstallDirs) -install( - TARGETS qdbm - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" -) +install(TARGETS qdbm) install( FILES diff --git a/recipes/qdbm/all/conandata.yml b/recipes/qdbm/all/conandata.yml index c04a6ca2954e6..bd41a3e5c73fa 100644 --- a/recipes/qdbm/all/conandata.yml +++ b/recipes/qdbm/all/conandata.yml @@ -1,4 +1,4 @@ sources: "1.8.78": sha256: "b466fe730d751e4bfc5900d1f37b0fb955f2826ac456e70012785e012cdcb73e" - url: http://fallabs.com/qdbm/qdbm-1.8.78.tar.gz + url: "https://dbmx.net/qdbm/qdbm-1.8.78.tar.gz" diff --git a/recipes/qdbm/all/conanfile.py b/recipes/qdbm/all/conanfile.py index 476d0ec62783b..4341f35ed3bb7 100644 --- a/recipes/qdbm/all/conanfile.py +++ b/recipes/qdbm/all/conanfile.py @@ -1,17 +1,22 @@ -from conans import ConanFile, CMake, tools -import functools +import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rename + +required_conan_version = ">=1.53.0" class QDBMConan(ConanFile): name = "qdbm" description = "QDBM is a library of routines for managing a database." - url = "https://github.com/conan-io/conan-center-index" - homepage = "http://fallabs.com/qdbm/" - topics = ("qdbm", "database", "db") license = "LGPL-2.1-or-later" - settings = ("os", "arch", "compiler", "build_type") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://dbmx.net/qdbm/" + topics = ("database", "db") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -27,53 +32,53 @@ class QDBMConan(ConanFile): "with_zlib": True, } - generators = "cmake", "cmake_find_package" - exports_sources = "CMakeLists.txt" - - @property - def _source_subfolder(self): - return "source_subfolder" + 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 - del self.options.with_pthread + self.options.rm_safe("with_pthread") def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): if self.options.with_iconv: - self.requires("libiconv/1.16") + self.requires("libiconv/1.17") if self.options.with_zlib: - self.requires("zlib/1.2.12") + self.requires("zlib/1.2.13") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["CONAN_qdbm_VERSION"] = self.version - cmake.definitions["MYICONV"] = self.options.with_iconv - cmake.definitions["MYZLIB"] = self.options.with_zlib - cmake.definitions["MYPTHREAD"] = self.options\ - .get_safe("with_pthread", False) - cmake.configure() - return cmake + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CONAN_qdbm_VERSION"] = self.version + tc.variables["MYICONV"] = self.options.with_iconv + tc.variables["MYZLIB"] = self.options.with_zlib + tc.variables["MYPTHREAD"] = self.options.get_safe("with_pthread", False) + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure(build_script_folder=self.export_sources_folder) cmake.build() def package(self): - self.copy("COPYING", src=self._source_subfolder, dst="licenses") - cmake = self._configure_cmake() + copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() + for dll in (self.package_path / "lib").glob("*.dll"): + rename(self, dll, self.package_path / "bin" / dll.name) def package_info(self): self.cpp_info.libs = ["qdbm"] diff --git a/recipes/qdbm/all/test_package/CMakeLists.txt b/recipes/qdbm/all/test_package/CMakeLists.txt index ea1c210104fb1..5c076c42369f7 100644 --- a/recipes/qdbm/all/test_package/CMakeLists.txt +++ b/recipes/qdbm/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup(TARGETS KEEP_RPATHS) - find_package(qdbm REQUIRED CONFIG) add_executable(test_package test_package.c) diff --git a/recipes/qdbm/all/test_package/conanfile.py b/recipes/qdbm/all/test_package/conanfile.py index ec80e0c5cc134..ef5d7042163ec 100644 --- a/recipes/qdbm/all/test_package/conanfile.py +++ b/recipes/qdbm/all/test_package/conanfile.py @@ -1,11 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools - class TestPackageConan(ConanFile): - settings = ("os", "compiler", "build_type", "arch") - generators = ("cmake", "cmake_find_package_multi") + 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) @@ -13,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/qdbm/all/test_package/test_package.c b/recipes/qdbm/all/test_package/test_package.c index 68bad9e85cf15..3d79beba62257 100644 --- a/recipes/qdbm/all/test_package/test_package.c +++ b/recipes/qdbm/all/test_package/test_package.c @@ -1,12 +1,8 @@ #include #include -int main(int argc, char const* argv[]) +int main() { - (void)argc; - (void)argv; - - cbfree(NULL); - - return 0; + cbfree(NULL); + return 0; } diff --git a/recipes/qdbm/all/test_v1_package/CMakeLists.txt b/recipes/qdbm/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/qdbm/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/qdbm/all/test_v1_package/conanfile.py b/recipes/qdbm/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..ec80e0c5cc134 --- /dev/null +++ b/recipes/qdbm/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = ("os", "compiler", "build_type", "arch") + generators = ("cmake", "cmake_find_package_multi") + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 4a14a01b3dcf5ab0877370c567c5801eece7580d Mon Sep 17 00:00:00 2001 From: Klaus Holst Jacobsen <48069914+klausholstjacobsen@users.noreply.github.com> Date: Sat, 2 Sep 2023 22:30:04 +0200 Subject: [PATCH 493/637] (#18906) lzip/*: Updated recipe for conan 2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lzip: Updated recipe for conan 2.0 * Minor edits --------- Co-authored-by: Rubén Rincón Blanco --- recipes/lzip/all/conandata.yml | 27 +++-- recipes/lzip/all/conanfile.py | 109 ++++++------------ .../all/patches/1.21-0001-any-compiler.patch | 81 +++++++++---- .../all/patches/1.22-0001-any-compiler.patch | 88 +++++++++++--- .../all/patches/1.23-0001-any-compiler.patch | 78 +++++++++++++ recipes/lzip/all/test_package/conanfile.py | 68 +++++++---- recipes/lzip/config.yml | 2 + 7 files changed, 310 insertions(+), 143 deletions(-) create mode 100644 recipes/lzip/all/patches/1.23-0001-any-compiler.patch diff --git a/recipes/lzip/all/conandata.yml b/recipes/lzip/all/conandata.yml index 2b81d53f9b8e1..f3b143bd6541b 100644 --- a/recipes/lzip/all/conandata.yml +++ b/recipes/lzip/all/conandata.yml @@ -1,20 +1,23 @@ sources: + "1.23": + url: + - "http://download.savannah.gnu.org/releases/lzip/lzip-1.23.tar.gz" + - "https://download-mirror.savannah.gnu.org/releases/lzip/lzip-1.23.tar.gz" + sha256: "4792c047ddf15ef29d55ba8e68a1a21e0cb7692d87ecdf7204419864582f280d" "1.22": - url: [ - "http://download.savannah.gnu.org/releases/lzip/lzip-1.22.tar.gz", - "https://download-mirror.savannah.gnu.org/releases/lzip/lzip-1.22.tar.gz", - ] + url: + - "http://download.savannah.gnu.org/releases/lzip/lzip-1.22.tar.gz" + - "https://download-mirror.savannah.gnu.org/releases/lzip/lzip-1.22.tar.gz" sha256: "c3342d42e67139c165b8b128d033b5c96893a13ac5f25933190315214e87a948" "1.21": - url: [ - "http://download.savannah.gnu.org/releases/lzip/lzip-1.21.tar.gz", - "https://download-mirror.savannah.gnu.org/releases/lzip/lzip-1.21.tar.gz", - ] + url: + - "http://download.savannah.gnu.org/releases/lzip/lzip-1.21.tar.gz" + - "https://download-mirror.savannah.gnu.org/releases/lzip/lzip-1.21.tar.gz" sha256: "e48b5039d3164d670791f9c5dbaa832bf2df080cb1fbb4f33aa7b3300b670d8b" patches: + "1.23": + - patch_file: "patches/1.23-0001-any-compiler.patch" "1.22": - - base_path: "source_subfolder" - patch_file: "patches/1.22-0001-any-compiler.patch" + - patch_file: "patches/1.22-0001-any-compiler.patch" "1.21": - - base_path: "source_subfolder" - patch_file: "patches/1.21-0001-any-compiler.patch" + - patch_file: "patches/1.21-0001-any-compiler.patch" diff --git a/recipes/lzip/all/conanfile.py b/recipes/lzip/all/conanfile.py index 96c8fbac3cb58..3a29086521b1e 100644 --- a/recipes/lzip/all/conanfile.py +++ b/recipes/lzip/all/conanfile.py @@ -1,102 +1,59 @@ -from conans import AutoToolsBuildEnvironment, CMake, ConanFile, tools -from conans.errors import ConanInvalidConfiguration -import contextlib +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.files import copy, get, replace_in_file, rmdir, patch, apply_conandata_patches, export_conandata_patches +from conan.tools.layout import basic_layout import os -import textwrap -required_conan_version = ">=1.33.0" +required_conan_version = ">=1.53.0" class LzipConan(ConanFile): name = "lzip" description = "Lzip is a lossless data compressor with a user interface similar to the one of gzip or bzip2" - topics = ("lzip", "compressor", "lzma") license = "GPL-v2-or-later" - homepage = "https://www.nongnu.org/lzip/" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.nongnu.org/lzip/" + topics = ("compressor", "lzma") + package_type = "application" settings = "os", "arch", "compiler", "build_type" - exports_sources = "patches/**" - - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _settings_build(self): - return getattr(self, "settings_build", self.settings) + def export_sources(self): + export_conandata_patches(self) - def build_requirements(self): - if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): - self.build_requires("msys2/cci.latest") + def layout(self): + basic_layout(self, src_folder="src") def validate(self): - if self.settings.compiler == "Visual Studio": - raise ConanInvalidConfiguration("Visual Studio is not supported") + if self.settings.os == "Windows" and self.settings.compiler != "gcc": + raise ConanInvalidConfiguration("Only gcc supported for windows builds") def package_id(self): del self.info.settings.compiler - - def _detect_compilers(self): - tools.rmdir("detectdir") - tools.mkdir("detectdir") - with tools.chdir("detectdir"): - tools.save("CMakeLists.txt", textwrap.dedent("""\ - cmake_minimum_required(VERSION 2.8) - project(test C CXX) - message(STATUS "CC=${CMAKE_C_COMPILER}") - message(STATUS "CXX=${CMAKE_CXX_COMPILER}") - file(WRITE cc.txt "${CMAKE_C_COMPILER}") - file(WRITE cxx.txt "${CMAKE_CXX_COMPILER}") - """)) - CMake(self).configure(source_folder="detectdir", build_folder="detectdir") - cc = tools.load("cc.txt").strip() - cxx = tools.load("cxx.txt").strip() - return cc, cxx + del self.info.settings.build_type def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - @contextlib.contextmanager - def _build_context(self): - env = {} - cc, cxx = self._detect_compilers() - if not tools.get_env("CC"): - env["CC"] = cc - if not tools.get_env("CXX"): - env["CXX"] = cxx - with tools.environment_append(env): - yield + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - conf_args = [ - ] - self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) - return self._autotools + def generate(self): + tc = AutotoolsToolchain(self) + tc.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - with self._build_context(): - autotools = self._configure_autotools() - autotools.make() + apply_conandata_patches(self) - def package(self): - self.copy("COPYING", src=self._source_subfolder, dst="licenses") - with self._build_context(): - autotools = self._configure_autotools() - with tools.environment_append({"CONAN_CPU_COUNT": "1"}): - autotools.install() + autotools = Autotools(self) + autotools.configure() + autotools.make() - tools.rmdir(os.path.join(self.package_folder, "share")) + def package(self): + copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) + autotools.install(target="install-bin") def package_info(self): - bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) - self.env_info.PATH.append(bin_path) + self.cpp_info.includedirs = [] + self.cpp_info.libdirs = [] + + bindir = os.path.join(self.package_folder, "bin") + self.runenv_info.prepend_path("PATH", bindir) diff --git a/recipes/lzip/all/patches/1.21-0001-any-compiler.patch b/recipes/lzip/all/patches/1.21-0001-any-compiler.patch index 68dcb6f524644..594395a65c8c3 100644 --- a/recipes/lzip/all/patches/1.21-0001-any-compiler.patch +++ b/recipes/lzip/all/patches/1.21-0001-any-compiler.patch @@ -1,25 +1,66 @@ ---- configure -+++ configure -@@ -21,7 +21,7 @@ +--- configure 2018-12-31 23:47:09.000000000 +0100 ++++ configure 2023-08-20 17:40:14.170994800 +0200 +@@ -9,6 +9,7 @@ + pkgversion=1.21 + progname=lzip + srctrigger=doc/${pkgname}.texi ++extension= + + # clear some things potentially inherited from environment. + LC_ALL=C +@@ -20,7 +21,7 @@ + datarootdir='$(prefix)/share' infodir='$(datarootdir)/info' mandir='$(datarootdir)/man' -CXX=g++ --CPPFLAGS= --CXXFLAGS='-Wall -W -O2' --LDFLAGS= -+#CXX=g++ -+#CPPFLAGS= -+#CXXFLAGS='-Wall -W -O2' -+#LDFLAGS= ++CXX="${CXX:-g++}" + CPPFLAGS= + CXXFLAGS='-Wall -W -O2' + LDFLAGS= +@@ -118,6 +119,19 @@ + fi + done + ++rm -f dummy* ++cat << EOT > dummy.c ++int main(int argc, char ** argv) { ++ return 0; ++} ++EOT ++ ++${CXX} -o dummy dummy.c ++ ++if [ -f dummy.exe ] ; then ++ extension=".exe" ++fi ++ + # Find the source files, if location was not specified. + srcdirtext= + if [ -z "${srcdir}" ] ; then +@@ -158,6 +172,7 @@ + echo "creating Makefile" + echo "VPATH = ${srcdir}" + echo "prefix = ${prefix}" ++echo "executable extension = ${extension}" + echo "exec_prefix = ${exec_prefix}" + echo "bindir = ${bindir}" + echo "datarootdir = ${datarootdir}" +@@ -179,6 +194,7 @@ + pkgname = ${pkgname} + pkgversion = ${pkgversion} + progname = ${progname} ++extension = ${extension} + VPATH = ${srcdir} + prefix = ${prefix} + exec_prefix = ${exec_prefix} +--- Makefile.in 2018-03-21 13:21:16.000000000 +0100 ++++ Makefile.in 2023-08-20 17:32:44.011055100 +0200 +@@ -64,7 +64,7 @@ -@@ -28,8 +28,8 @@ - # checking whether we are using GNU C++. - /bin/sh -c "${CXX} --version" > /dev/null 2>&1 || - { -- CXX=c++ -- CXXFLAGS=-O2 -+ echo "hello" # CXX=c++ -+ echo "hello" # CXXFLAGS=-O2 - } + install-bin : all + if [ ! -d "$(DESTDIR)$(bindir)" ] ; then $(INSTALL_DIR) "$(DESTDIR)$(bindir)" ; fi +- $(INSTALL_PROGRAM) ./$(progname) "$(DESTDIR)$(bindir)/$(progname)" ++ $(INSTALL_PROGRAM) ./$(progname)$(extension) "$(DESTDIR)$(bindir)/$(progname)$(extension)" - # Loop over all args + install-bin-strip : all + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install-bin diff --git a/recipes/lzip/all/patches/1.22-0001-any-compiler.patch b/recipes/lzip/all/patches/1.22-0001-any-compiler.patch index 50311f5627b8c..9388ec1d5dc3d 100644 --- a/recipes/lzip/all/patches/1.22-0001-any-compiler.patch +++ b/recipes/lzip/all/patches/1.22-0001-any-compiler.patch @@ -1,18 +1,78 @@ ---- configure -+++ configure -@@ -24,7 +24,7 @@ +--- configure 2021-01-01 14:06:33.000000000 +0100 ++++ configure 2023-08-20 17:48:10.569541300 +0200 +@@ -9,6 +9,7 @@ + pkgversion=1.22 + progname=lzip + srctrigger=doc/${pkgname}.texi ++extension= + + # clear some things potentially inherited from environment. + LC_ALL=C +@@ -23,7 +24,7 @@ + build=no check=no installdir= -CXX=g++ --CPPFLAGS= --CXXFLAGS='-Wall -W -O2' --LDFLAGS= -+#CXX=g++ -+#CPPFLAGS= -+#CXXFLAGS='-Wall -W -O2' -+#LDFLAGS= ++CXX="${CXX:-g++}" + CPPFLAGS= + CXXFLAGS='-Wall -W -O2' + LDFLAGS= +@@ -125,6 +126,19 @@ + fi + done + ++rm -f dummy* ++cat << EOT > dummy.c ++int main(int argc, char ** argv) { ++ return 0; ++} ++EOT ++ ++${CXX} -o dummy dummy.c ++ ++if [ -f dummy.exe ] ; then ++ extension=".exe" ++fi ++ + # Find the source files, if location was not specified. + srcdirtext= + if [ -z "${srcdir}" ] ; then +@@ -161,9 +175,9 @@ + "${srcdir}/testsuite/check.sh" "${srcdir}/testsuite" ${pkgversion} || exit 1 + fi + if [ -n "${installdir}" ] ; then +- echo "installing ${progname} in ${installdir}" ++ echo "installing ${progname}${extension} in ${installdir}" + [ -d "${installdir}" ] || mkdir -p "${installdir}" || exit 1 +- cp -fp ${progname} "${installdir}/${progname}" || exit 1 ++ cp -fp "${progname}${extension}" "${installdir}/${progname}${extension}" || exit 1 + fi + exit 0 + fi +@@ -188,6 +202,7 @@ + echo "creating Makefile" + echo "VPATH = ${srcdir}" + echo "prefix = ${prefix}" ++echo "executable extension = ${extension}" + echo "exec_prefix = ${exec_prefix}" + echo "bindir = ${bindir}" + echo "datarootdir = ${datarootdir}" +@@ -209,6 +224,7 @@ + pkgname = ${pkgname} + pkgversion = ${pkgversion} + progname = ${progname} ++extension = ${extension} + VPATH = ${srcdir} + prefix = ${prefix} + exec_prefix = ${exec_prefix} +--- Makefile.in 2020-05-02 00:06:48.000000000 +0200 ++++ Makefile.in 2023-08-20 17:46:52.265608300 +0200 +@@ -64,7 +64,7 @@ + + install-bin : all + if [ ! -d "$(DESTDIR)$(bindir)" ] ; then $(INSTALL_DIR) "$(DESTDIR)$(bindir)" ; fi +- $(INSTALL_PROGRAM) ./$(progname) "$(DESTDIR)$(bindir)/$(progname)" ++ $(INSTALL_PROGRAM) ./$(progname)$(extension) "$(DESTDIR)$(bindir)/$(progname)$(extension)" -@@ -31,2 +31,2 @@ - # checking whether we are using GNU C++. --/bin/sh -c "${CXX} --version" > /dev/null 2>&1 || { CXX=c++ ; CXXFLAGS=-O2 ; } -+# /bin/sh -c "${CXX} --version" > /dev/null 2>&1 || { CXX=c++ ; CXXFLAGS=-O2 ; } + install-bin-strip : all + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install-bin diff --git a/recipes/lzip/all/patches/1.23-0001-any-compiler.patch b/recipes/lzip/all/patches/1.23-0001-any-compiler.patch new file mode 100644 index 0000000000000..ad4c3f5cc843d --- /dev/null +++ b/recipes/lzip/all/patches/1.23-0001-any-compiler.patch @@ -0,0 +1,78 @@ +--- configure 2022-01-22 01:11:01.000000000 +0100 ++++ configure 2023-08-20 17:51:18.537172800 +0200 +@@ -9,6 +9,7 @@ + pkgversion=1.23 + progname=lzip + srctrigger=doc/${pkgname}.texi ++extension= + + # clear some things potentially inherited from environment. + LC_ALL=C +@@ -23,7 +24,7 @@ + build=no + check=no + installdir= +-CXX=g++ ++CXX="${CXX:-g++}" + CPPFLAGS= + CXXFLAGS='-Wall -W -O2' + LDFLAGS= +@@ -125,6 +126,19 @@ + fi + done + ++rm -f dummy* ++cat << EOT > dummy.c ++int main(int argc, char ** argv) { ++ return 0; ++} ++EOT ++ ++${CXX} -o dummy dummy.c ++ ++if [ -f dummy.exe ] ; then ++ extension=".exe" ++fi ++ + # Find the source files, if location was not specified. + srcdirtext= + if [ -z "${srcdir}" ] ; then +@@ -161,9 +175,9 @@ + "${srcdir}/testsuite/check.sh" "${srcdir}/testsuite" ${pkgversion} || exit 1 + fi + if [ -n "${installdir}" ] ; then +- echo "installing ${progname} in ${installdir}" ++ echo "installing ${progname}${extension} in ${installdir}" + [ -d "${installdir}" ] || mkdir -p "${installdir}" || exit 1 +- cp -fp ${progname} "${installdir}/${progname}" || exit 1 ++ cp -fp "${progname}${extension}" "${installdir}/${progname}${extension}" || exit 1 + fi + exit 0 + fi +@@ -188,6 +202,7 @@ + echo "creating Makefile" + echo "VPATH = ${srcdir}" + echo "prefix = ${prefix}" ++echo "executable extension = ${extension}" + echo "exec_prefix = ${exec_prefix}" + echo "bindir = ${bindir}" + echo "datarootdir = ${datarootdir}" +@@ -209,6 +224,7 @@ + pkgname = ${pkgname} + pkgversion = ${pkgversion} + progname = ${progname} ++extension = ${extension} + VPATH = ${srcdir} + prefix = ${prefix} + exec_prefix = ${exec_prefix} +--- Makefile.in 2021-10-07 01:01:07.000000000 +0200 ++++ Makefile.in 2023-08-20 17:18:35.382705100 +0200 +@@ -64,7 +64,7 @@ + + install-bin : all + if [ ! -d "$(DESTDIR)$(bindir)" ] ; then $(INSTALL_DIR) "$(DESTDIR)$(bindir)" ; fi +- $(INSTALL_PROGRAM) ./$(progname) "$(DESTDIR)$(bindir)/$(progname)" ++ $(INSTALL_PROGRAM) ./$(progname)$(extension) "$(DESTDIR)$(bindir)/$(progname)$(extension)" + + install-bin-strip : all + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install-bin diff --git a/recipes/lzip/all/test_package/conanfile.py b/recipes/lzip/all/test_package/conanfile.py index 84ae9d8826de5..16e19ad7002bc 100644 --- a/recipes/lzip/all/test_package/conanfile.py +++ b/recipes/lzip/all/test_package/conanfile.py @@ -1,27 +1,53 @@ -from conans import ConanFile, tools -from conans.errors import ConanException +from conan import ConanFile +from conan.errors import ConanException +from conan.tools.build import can_run +from conan.tools.files import rm, save, check_sha256 import os -import shutil - +from io import StringIO class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" + generators = "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) def test(self): - if not tools.cross_building(self, skip_x64_x86=True): - lzip = os.path.join(self.deps_cpp_info["lzip"].bin_paths[0], "lzip") - self.run("{} --version".format(lzip)) - - shutil.copy(os.path.join(self.source_folder, "conanfile.py"), - "conanfile.py") - - sha256_original = tools.sha256sum("conanfile.py") - self.run("{} conanfile.py".format(lzip), run_environment=True) - if not os.path.exists("conanfile.py.lz"): - raise ConanException("conanfile.py.lz does not exist") - if os.path.exists("conanfile.py"): - raise ConanException("copied conanfile.py should not exist anymore") - - self.run("{} -d conanfile.py.lz".format(lzip), run_environment=True) - if tools.sha256sum("conanfile.py") != sha256_original: - raise ConanException("sha256 from extracted conanfile.py does not match original") + if not can_run(self): + return + + cmd_output = StringIO() + self.run(f"lzip --version", cmd_output, env="conanrun") + + #Create input test file + input_file_sha256 = "6a7ef9d581b577bbe8415d69ccc2549287eb99b5d856a213df742f8b89986a6a" + input_file = "input.txt" + if os.path.exists(input_file): + rm(self, input_file, ".") + + save(self, input_file, "Klaus is king!") + + #Ensure output test file does not exist + output_file = input_file + ".lz" + if os.path.exists(output_file): + rm(self, output_file, ".") + + #Zip the input file + self.run(f"lzip {input_file}", env="conanrun") + if not os.path.exists(f"{output_file}"): + raise ConanException(f"{output_file} does not exist") + + if os.path.exists(f"{input_file}"): + raise ConanException(f"{input_file} does exist") + + #Unzip the input file + self.run(f"lzip -d {output_file}", env="conanrun") + if os.path.exists(f"{output_file}"): + raise ConanException(f"{output_file} does not exist") + + if not os.path.exists(f"{input_file}"): + raise ConanException(f"{input_file} does exist") + + #Compare checksum of unzipped file with expected value + check_sha256(self, input_file, input_file_sha256) diff --git a/recipes/lzip/config.yml b/recipes/lzip/config.yml index e027a6bc18156..fe52638d1ec86 100644 --- a/recipes/lzip/config.yml +++ b/recipes/lzip/config.yml @@ -1,4 +1,6 @@ versions: + "1.23": + folder: "all" "1.22": folder: "all" "1.21": From e3d536544449d8edb7babc92ebf57692cbfc79bd Mon Sep 17 00:00:00 2001 From: qwqbot Date: Sun, 3 Sep 2023 04:50:28 +0800 Subject: [PATCH 494/637] (#19022) intx: fix minimum compiler required to clang13 & gcc11 --- recipes/intx/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/intx/all/conanfile.py b/recipes/intx/all/conanfile.py index 7d3e3dcf60652..fcbc0174dcfbb 100644 --- a/recipes/intx/all/conanfile.py +++ b/recipes/intx/all/conanfile.py @@ -30,8 +30,8 @@ def _compilers_minimum_version(self): return { "Visual Studio": "16", "msvc": "192", - "gcc": "12", - "clang": "15", + "gcc": "11", + "clang": "13", "apple-clang": "14.1", } From d54e8f10241a0ea73f993bf1227a45be262c601b Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 3 Sep 2023 06:14:27 +0900 Subject: [PATCH 495/637] (#19515) octo-logger-cpp: support conan v2, update fmt/10.1.1, add package_type --- recipes/octo-logger-cpp/all/conandata.yml | 12 ++--- recipes/octo-logger-cpp/all/conanfile.py | 52 ++++++++++--------- .../all/test_package/CMakeLists.txt | 8 +-- .../all/test_package/conanfile.py | 18 +++---- recipes/octo-logger-cpp/config.yml | 4 +- 5 files changed, 49 insertions(+), 45 deletions(-) diff --git a/recipes/octo-logger-cpp/all/conandata.yml b/recipes/octo-logger-cpp/all/conandata.yml index 035fe6943e202..29be2c16d0289 100644 --- a/recipes/octo-logger-cpp/all/conandata.yml +++ b/recipes/octo-logger-cpp/all/conandata.yml @@ -1,10 +1,10 @@ sources: - "1.1.0": - sha256: 69057ab2f0ba0754dc6dce1f27c6f1fd9ad1e97c828779a801273bb3e9123e4e - url: https://github.com/ofiriluz/octo-logger-cpp/archive/refs/tags/v1.1.0.tar.gz - "1.2.0": - sha256: 54381d6dbc80c6be6d8b9e087a4b55fae6ff5d07c3c2399bc7e1c94252260bf2 - url: https://github.com/ofiriluz/octo-logger-cpp/archive/refs/tags/v1.2.0.tar.gz "1.4.0": url: "https://github.com/ofiriluz/octo-logger-cpp/archive/v1.4.0.tar.gz" sha256: "6aacbab0e57917a935e0f9741e52a57ecac21785ba49aaafec5775030208a153" + "1.2.0": + url: "https://github.com/ofiriluz/octo-logger-cpp/archive/refs/tags/v1.2.0.tar.gz" + sha256: "54381d6dbc80c6be6d8b9e087a4b55fae6ff5d07c3c2399bc7e1c94252260bf2" + "1.1.0": + url: "https://github.com/ofiriluz/octo-logger-cpp/archive/refs/tags/v1.1.0.tar.gz" + sha256: "69057ab2f0ba0754dc6dce1f27c6f1fd9ad1e97c828779a801273bb3e9123e4e" diff --git a/recipes/octo-logger-cpp/all/conanfile.py b/recipes/octo-logger-cpp/all/conanfile.py index cdb8df5c161d2..042c94eec1f92 100644 --- a/recipes/octo-logger-cpp/all/conanfile.py +++ b/recipes/octo-logger-cpp/all/conanfile.py @@ -4,6 +4,7 @@ from conan.tools.build import check_min_cppstd from conan.errors import ConanInvalidConfiguration from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc import os required_conan_version = ">=1.50.0" @@ -11,19 +12,24 @@ class OctoLoggerCPPConan(ConanFile): name = "octo-logger-cpp" + description = "CPP Stream based logging library" license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/ofiriluz/octo-logger-cpp" - description = "Octo logger library" - topics = ("logging", "cpp") - settings = "os", "compiler", "build_type", "arch" + topics = ("logging", "stream", "syslog", "cloudwatch") + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" options = { - "with_aws": [True, False] + "with_aws": [True, False], } default_options = { - "with_aws": False + "with_aws": False, } + @property + def _min_cppstd(self): + return 17 + @property def _compilers_minimum_version(self): return { @@ -56,37 +62,32 @@ def layout(self): cmake_layout(self, src_folder="src") def validate(self): - if self.info.settings.compiler.cppstd: - check_min_cppstd(self, "17") - + if self.info.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.info.settings.compiler), False) if minimum_version and Version(self.info.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration( - f"{self.name} requires C++17, which your compiler does not support." + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) - else: - self.output.warn(f"{self.name} requires C++17. Your compiler is unknown. Assuming it supports C++17.") if self.settings.compiler == "clang" and self.settings.compiler.get_safe("libcxx") == "libc++": - raise ConanInvalidConfiguration(f"{self.name} does not support clang with libc++. Use libstdc++ instead.") - if self.settings.compiler == "Visual Studio" and self.settings.compiler.runtime in ["MTd", "MT"]: - raise ConanInvalidConfiguration(f"{self.name} does not support MSVC MT/MTd configurations, only MD/MDd is supported") + raise ConanInvalidConfiguration(f"{self.ref} does not support clang with libc++. Use libstdc++ instead.") + if is_msvc(self) and self.settings.compiler.runtime in ["MTd", "MT"]: + raise ConanInvalidConfiguration(f"{self.ref} does not support MSVC MT/MTd configurations, only MD/MDd is supported") if self.options.get_safe("with_aws"): if not self.dependencies["aws-sdk-cpp"].options.logs: - raise ConanInvalidConfiguration(f"{self.name} requires the option aws-sdk-cpp:logs=True") - + raise ConanInvalidConfiguration(f"{self.ref} requires the option aws-sdk-cpp:logs=True") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def requirements(self): - self.requires("fmt/9.0.0") + self.requires("fmt/10.1.1", transitive_headers=True) if self.options.get_safe("with_aws"): self.requires("nlohmann_json/3.11.2") self.requires("aws-sdk-cpp/1.9.234") def build_requirements(self): - self.build_requires("cmake/3.24.0") + self.tool_requires("cmake/[>=3.16 <4]") def build(self): cmake = CMake(self) @@ -99,16 +100,19 @@ def package(self): cmake.install() def package_info(self): + self.cpp_info.libs = ["octo-logger-cpp"] + self.cpp_info.set_property("cmake_file_name", "octo-logger-cpp") self.cpp_info.set_property("cmake_target_name", "octo::octo-logger-cpp") self.cpp_info.set_property("pkg_config_name", "octo-logger-cpp") - self.cpp_info.libs = ["octo-logger-cpp"] - self.cpp_info.names["cmake_find_package"] = "octo-logger-cpp" - self.cpp_info.names["cmake_find_package_multi"] = "octo-logger-cpp" - self.cpp_info.names["pkg_config"] = "octo-logger-cpp" self.cpp_info.requires = ["fmt::fmt"] if self.options.get_safe("with_aws"): self.cpp_info.requires.extend([ "nlohmann_json::nlohmann_json", "aws-sdk-cpp::monitoring" ]) + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.names["cmake_find_package"] = "octo-logger-cpp" + self.cpp_info.names["cmake_find_package_multi"] = "octo-logger-cpp" + self.cpp_info.names["pkg_config"] = "octo-logger-cpp" diff --git a/recipes/octo-logger-cpp/all/test_package/CMakeLists.txt b/recipes/octo-logger-cpp/all/test_package/CMakeLists.txt index 4cdb390261544..f7d178a90b8ee 100644 --- a/recipes/octo-logger-cpp/all/test_package/CMakeLists.txt +++ b/recipes/octo-logger-cpp/all/test_package/CMakeLists.txt @@ -1,8 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package CXX) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) find_package(octo-logger-cpp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} octo::octo-logger-cpp) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) +target_link_libraries(${PROJECT_NAME} PRIVATE octo::octo-logger-cpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/octo-logger-cpp/all/test_package/conanfile.py b/recipes/octo-logger-cpp/all/test_package/conanfile.py index 696c343fa84f4..ef5d7042163ec 100644 --- a/recipes/octo-logger-cpp/all/test_package/conanfile.py +++ b/recipes/octo-logger-cpp/all/test_package/conanfile.py @@ -1,17 +1,16 @@ -from conans import ConanFile -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan import ConanFile from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -required_conan_version = ">=1.43.0" class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "CMakeDeps", "VirtualRunEnv" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" - def generate(self): - tc = CMakeToolchain(self) - tc.generate() + def requirements(self): + self.requires(self.tested_reference_str) def layout(self): cmake_layout(self) @@ -23,4 +22,5 @@ def build(self): def test(self): if can_run(self): - self.run(os.path.join(self.cpp.build.bindirs[0], "test_package"), env="conanrun") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/octo-logger-cpp/config.yml b/recipes/octo-logger-cpp/config.yml index 14adddf7ca35b..1f90fb4ad7af4 100644 --- a/recipes/octo-logger-cpp/config.yml +++ b/recipes/octo-logger-cpp/config.yml @@ -1,7 +1,7 @@ versions: - "1.1.0": + "1.4.0": folder: "all" "1.2.0": folder: "all" - "1.4.0": + "1.1.0": folder: "all" From bdecf1312630e8e7f4376fffa6c151d29777af55 Mon Sep 17 00:00:00 2001 From: Maksim Petukhov <6967052+maksim-petukhov@users.noreply.github.com> Date: Sat, 2 Sep 2023 23:50:53 +0200 Subject: [PATCH 496/637] (#19524) earcut: fix target name --- recipes/earcut/all/conanfile.py | 10 ++++++++++ recipes/earcut/all/test_package/CMakeLists.txt | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/recipes/earcut/all/conanfile.py b/recipes/earcut/all/conanfile.py index 23791142acadb..9ff1959d206ff 100644 --- a/recipes/earcut/all/conanfile.py +++ b/recipes/earcut/all/conanfile.py @@ -68,5 +68,15 @@ def package(self): copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "earcut_hpp") + self.cpp_info.set_property("cmake_target_name", "earcut_hpp::earcut_hpp") + + # TODO: to remove in conan v2 once cmake_find_package* generators removed + self.cpp_info.filenames["cmake_find_package"] = "earcut_hpp" + self.cpp_info.filenames["cmake_find_package_multi"] = "earcut_hpp" + self.cpp_info.names["cmake_find_package"] = "earcut_hpp" + self.cpp_info.names["cmake_find_package_multi"] = "earcut_hpp" + def package_id(self): self.info.clear() diff --git a/recipes/earcut/all/test_package/CMakeLists.txt b/recipes/earcut/all/test_package/CMakeLists.txt index 4a460cc9a3c99..a6d943d926668 100644 --- a/recipes/earcut/all/test_package/CMakeLists.txt +++ b/recipes/earcut/all/test_package/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.1) project(test_package LANGUAGES CXX) -find_package(earcut REQUIRED CONFIG) +find_package(earcut_hpp REQUIRED CONFIG) add_executable(${PROJECT_NAME} example.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE earcut::earcut) +target_link_libraries(${PROJECT_NAME} PRIVATE earcut_hpp::earcut_hpp) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) From 5c8c6f60ab2926e9efc776c7802bb2e61b892233 Mon Sep 17 00:00:00 2001 From: Maksim Petukhov <6967052+maksim-petukhov@users.noreply.github.com> Date: Sun, 3 Sep 2023 00:30:26 +0200 Subject: [PATCH 497/637] (#19526) troldal-zippy: fix "package requires C++17 support. The current compiler Visual Studio 16 does not support it", add msvc compiler support, bump deps --- recipes/troldal-zippy/all/conanfile.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/recipes/troldal-zippy/all/conanfile.py b/recipes/troldal-zippy/all/conanfile.py index c1f661d53497d..999217a8ec5a5 100644 --- a/recipes/troldal-zippy/all/conanfile.py +++ b/recipes/troldal-zippy/all/conanfile.py @@ -4,6 +4,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +from conan.tools.microsoft import check_min_vs, is_msvc from conan.tools.layout import basic_layout from conan.tools.scm import Version @@ -29,7 +30,6 @@ def _minimum_cpp_standard(self): @property def _minimum_compilers_version(self): return { - "Visual Studio": "17", "gcc": "7", "clang": "6", "apple-clang": "10", @@ -42,7 +42,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("miniz/2.2.0") + self.requires("miniz/3.0.2") def package_id(self): self.info.clear() @@ -50,15 +50,18 @@ def package_id(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._minimum_cpp_standard) - min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) - if not min_version: - self.output.warning(f"{self.name} recipe lacks information about the {self.settings.compiler} compiler support.") + if is_msvc(self): + check_min_vs(self, "192") else: - if Version(self.settings.compiler.version) < min_version: - raise ConanInvalidConfiguration( - f"{self.name} requires C++{self._minimum_cpp_standard} support. The current compiler" - f" {self.settings.compiler} {self.settings.compiler.version} does not support it." - ) + min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) + if not min_version: + self.output.warning(f"{self.name} recipe lacks information about the {self.settings.compiler} compiler support.") + else: + if Version(self.settings.compiler.version) < min_version: + raise ConanInvalidConfiguration( + f"{self.name} requires C++{self._minimum_cpp_standard} support. The current compiler" + f" {self.settings.compiler} {self.settings.compiler.version} does not support it." + ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From b7593c5619972d3afe6bac396d2d9fc8c16bc66b Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 3 Sep 2023 07:52:15 +0900 Subject: [PATCH 498/637] (#19540) brotli: add version 1.1.0, add patch description * brotli: add version 1.1.0, add patch desscription * remove CMAKE_MACOS_RPATH --- recipes/brotli/all/conandata.yml | 23 +++++++++++---- recipes/brotli/all/conanfile.py | 8 +++--- ...t-props.patch => 1.0.7-target-props.patch} | 0 ...t-props.patch => 1.0.9-target-props.patch} | 0 .../all/patches/1.1.0-target-props.patch | 28 +++++++++++++++++++ .../brotli/all/test_package/CMakeLists.txt | 2 +- recipes/brotli/config.yml | 2 ++ 7 files changed, 52 insertions(+), 11 deletions(-) rename recipes/brotli/all/patches/{0001-target-props.patch => 1.0.7-target-props.patch} (100%) rename recipes/brotli/all/patches/{0002-target-props.patch => 1.0.9-target-props.patch} (100%) create mode 100644 recipes/brotli/all/patches/1.1.0-target-props.patch diff --git a/recipes/brotli/all/conandata.yml b/recipes/brotli/all/conandata.yml index c664dae35678e..35c9587456f43 100644 --- a/recipes/brotli/all/conandata.yml +++ b/recipes/brotli/all/conandata.yml @@ -1,12 +1,23 @@ sources: + "1.1.0": + url: "https://github.com/google/brotli/archive/v1.1.0.tar.gz" + sha256: "e720a6ca29428b803f4ad165371771f5398faba397edf6778837a18599ea13ff" "1.0.9": - url: https://github.com/google/brotli/archive/v1.0.9.tar.gz - sha256: f9e8d81d0405ba66d181529af42a3354f838c939095ff99930da6aa9cdf6fe46 + url: "https://github.com/google/brotli/archive/v1.0.9.tar.gz" + sha256: "f9e8d81d0405ba66d181529af42a3354f838c939095ff99930da6aa9cdf6fe46" "1.0.7": - url: https://github.com/google/brotli/archive/v1.0.7.tar.gz - sha256: 4c61bfb0faca87219ea587326c467b95acb25555b53d1a421ffa3c8a9296ee2c + url: "https://github.com/google/brotli/archive/v1.0.7.tar.gz" + sha256: "4c61bfb0faca87219ea587326c467b95acb25555b53d1a421ffa3c8a9296ee2c" patches: + "1.1.0": + - patch_file: "patches/1.1.0-target-props.patch" + patch_description: "add target properties, disable command build" + patch_type: "conan" "1.0.9": - - patch_file: "patches/0002-target-props.patch" + - patch_file: "patches/1.0.9-target-props.patch" + patch_description: "add target properties, disable command build, separate shared and static build" + patch_type: "conan" "1.0.7": - - patch_file: "patches/0001-target-props.patch" + - patch_file: "patches/1.0.7-target-props.patch" + patch_description: "add target properties, disable command build, separate shared and static build" + patch_type: "conan" diff --git a/recipes/brotli/all/conanfile.py b/recipes/brotli/all/conanfile.py index 5ba9ac6bd939f..7e93d9903056d 100644 --- a/recipes/brotli/all/conanfile.py +++ b/recipes/brotli/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -9,11 +10,10 @@ class BrotliConan(ConanFile): name = "brotli" description = "Brotli compression format" - topics = ("brotli", "compression") + license = "MIT", url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/google/brotli" - license = "MIT", - + topics = ("brotli", "compression") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -125,6 +125,6 @@ def package_info(self): def _get_decorated_lib(self, name): libname = name - if not self.options.shared: + if Version(self.version) < "1.1.0" and not self.options.shared: libname += "-static" return libname diff --git a/recipes/brotli/all/patches/0001-target-props.patch b/recipes/brotli/all/patches/1.0.7-target-props.patch similarity index 100% rename from recipes/brotli/all/patches/0001-target-props.patch rename to recipes/brotli/all/patches/1.0.7-target-props.patch diff --git a/recipes/brotli/all/patches/0002-target-props.patch b/recipes/brotli/all/patches/1.0.9-target-props.patch similarity index 100% rename from recipes/brotli/all/patches/0002-target-props.patch rename to recipes/brotli/all/patches/1.0.9-target-props.patch diff --git a/recipes/brotli/all/patches/1.1.0-target-props.patch b/recipes/brotli/all/patches/1.1.0-target-props.patch new file mode 100644 index 0000000000000..df1e483759f2e --- /dev/null +++ b/recipes/brotli/all/patches/1.1.0-target-props.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 61378cd..4de317b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -112,7 +112,6 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + add_definitions(-DOS_FREEBSD) + elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + add_definitions(-DOS_MACOSX) +- set(CMAKE_MACOS_RPATH TRUE) + set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib") + endif() + +@@ -171,14 +170,10 @@ endif() + # Build the brotli executable + add_executable(brotli c/tools/brotli.c) + target_link_libraries(brotli ${BROTLI_LIBRARIES}) ++set_target_properties(brotli PROPERTIES EXCLUDE_FROM_ALL ON EXCLUDE_FROM_DEFAULT ON) + + # Installation + if(NOT BROTLI_BUNDLED_MODE) +- install( +- TARGETS brotli +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" +- ) +- + install( + TARGETS ${BROTLI_LIBRARIES_CORE} + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" diff --git a/recipes/brotli/all/test_package/CMakeLists.txt b/recipes/brotli/all/test_package/CMakeLists.txt index 8339b11b6d1f4..00f09fcd40122 100644 --- a/recipes/brotli/all/test_package/CMakeLists.txt +++ b/recipes/brotli/all/test_package/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.1) -project(test_package) +project(test_package LANGUAGES CXX) find_package(brotli REQUIRED CONFIG) diff --git a/recipes/brotli/config.yml b/recipes/brotli/config.yml index 39d54f0009ed0..f4b59633d9f83 100644 --- a/recipes/brotli/config.yml +++ b/recipes/brotli/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.0": + folder: all "1.0.9": folder: all "1.0.7": From d2c3d2b28ecc95cb5684437d259051dab8133329 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 3 Sep 2023 08:32:14 +0900 Subject: [PATCH 499/637] (#19558) mcap: update zstd/1.5.5, add package_type --- recipes/mcap/all/conanfile.py | 3 ++- recipes/mcap/all/test_package/conanfile.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes/mcap/all/conanfile.py b/recipes/mcap/all/conanfile.py index 0ea0db2622ab8..1089c7a6c48f9 100644 --- a/recipes/mcap/all/conanfile.py +++ b/recipes/mcap/all/conanfile.py @@ -19,6 +19,7 @@ class McapConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/foxglove/mcap" topics = ("serialization", "deserialization", "recording", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" @property @@ -48,7 +49,7 @@ def layout(self): def requirements(self): self.requires("lz4/1.9.4") - self.requires("zstd/1.5.4") + self.requires("zstd/1.5.5") if Version(self.version) < "0.1.1": self.requires("fmt/9.1.0") diff --git a/recipes/mcap/all/test_package/conanfile.py b/recipes/mcap/all/test_package/conanfile.py index 615cc1d54ffcc..8749556609d86 100644 --- a/recipes/mcap/all/test_package/conanfile.py +++ b/recipes/mcap/all/test_package/conanfile.py @@ -7,7 +7,8 @@ class TestPackageConan(ConanFile): settings = ("os", "arch", "compiler", "build_type") generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" - + test_type = "explicit" + def layout(self): cmake_layout(self) From b08dd4c49f5ea899071dbddc3792348c924b4a9d Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 3 Sep 2023 09:12:32 +0900 Subject: [PATCH 500/637] (#19562) mppp: update dependencies --- recipes/mppp/all/conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/mppp/all/conanfile.py b/recipes/mppp/all/conanfile.py index 7fed2f8affb27..42fab736847a0 100644 --- a/recipes/mppp/all/conanfile.py +++ b/recipes/mppp/all/conanfile.py @@ -61,15 +61,15 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("gmp/6.2.1", transitive_headers=True) + self.requires("gmp/6.3.0", transitive_headers=True) if self.options.with_mpfr: self.requires("mpfr/4.2.0") if self.options.with_mpc: self.requires("mpc/1.2.0") if self.options.with_boost: - self.requires("boost/1.82.0") + self.requires("boost/1.83.0") if self.options.get_safe("with_fmt"): - self.requires("fmt/10.1.0", transitive_headers=True) + self.requires("fmt/10.1.1", transitive_headers=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): From a1c3440d91756aa54d2fde7586290def5b31ac28 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 3 Sep 2023 09:50:19 +0900 Subject: [PATCH 501/637] (#19564) arsenalgear: update boost/1.8.30 --- recipes/arsenalgear/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/arsenalgear/all/conanfile.py b/recipes/arsenalgear/all/conanfile.py index 2eafb85d1f49a..3c60d7e171cb3 100644 --- a/recipes/arsenalgear/all/conanfile.py +++ b/recipes/arsenalgear/all/conanfile.py @@ -57,7 +57,7 @@ def layout(self): def requirements(self): if Version(self.version) < "2.0.0": - self.requires("boost/1.82.0") + self.requires("boost/1.83.0") if self.settings.os in ["Linux", "Macos"]: # exprtk is used in public header of arsenalgear # https://github.com/JustWhit3/arsenalgear-cpp/blob/v1.2.2/include/math.hpp From 58eef0a36742cb9a4b947922d6e1417e5e7cab87 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 3 Sep 2023 16:10:43 +0900 Subject: [PATCH 502/637] (#19567) jinja2cpp: update dependencies --- recipes/jinja2cpp/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/jinja2cpp/all/conanfile.py b/recipes/jinja2cpp/all/conanfile.py index c40b675dc715a..8026c45b97a60 100644 --- a/recipes/jinja2cpp/all/conanfile.py +++ b/recipes/jinja2cpp/all/conanfile.py @@ -56,7 +56,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.82.0") + self.requires("boost/1.83.0") self.requires("expected-lite/0.6.3", transitive_headers=True) self.requires("optional-lite/3.5.0", transitive_headers=True) self.requires("rapidjson/cci.20220822") @@ -66,7 +66,7 @@ def requirements(self): self.requires("fmt/6.2.1") # not compatible with fmt >= 7.0.0 else: self.requires("nlohmann_json/3.11.2") - self.requires("fmt/10.1.0") + self.requires("fmt/10.1.1") def validate(self): if self.settings.compiler.get_safe("cppstd"): From d5e031e94160466e6199738e2117e9c4465c03b4 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 3 Sep 2023 16:53:57 +0900 Subject: [PATCH 503/637] (#19569) websocketpp: update dependencies --- recipes/websocketpp/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/websocketpp/all/conanfile.py b/recipes/websocketpp/all/conanfile.py index 2e4962181cae1..fc666b73d6c25 100644 --- a/recipes/websocketpp/all/conanfile.py +++ b/recipes/websocketpp/all/conanfile.py @@ -40,9 +40,9 @@ def requirements(self): self.requires("zlib/1.2.13", transitive_headers=True, transitive_libs=True) if self.options.asio == "standalone": - self.requires("asio/1.27.0", transitive_headers=True) + self.requires("asio/1.28.1", transitive_headers=True) elif self.options.asio == "boost": - self.requires("boost/1.81.0", transitive_headers=True) + self.requires("boost/1.83.0", transitive_headers=True) def package_id(self): self.info.clear() From 9007c80031d40f6269cb021d60cc5457a416a23b Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 4 Sep 2023 00:14:33 +0900 Subject: [PATCH 504/637] (#19572) cpprestsdk: update boost/1.83.0 --- recipes/cpprestsdk/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cpprestsdk/all/conanfile.py b/recipes/cpprestsdk/all/conanfile.py index 9f8dbc8d6fec8..0383ff59b8cac 100644 --- a/recipes/cpprestsdk/all/conanfile.py +++ b/recipes/cpprestsdk/all/conanfile.py @@ -57,7 +57,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.81.0") + self.requires("boost/1.83.0") self.requires("openssl/[>=1.1 <4]") if self.options.with_compression: self.requires("zlib/1.2.13") From c43245e4b3203b35febaf424010ecdb71711acc7 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 4 Sep 2023 01:33:36 +0900 Subject: [PATCH 505/637] (#19575) fakeit: update dependencies --- recipes/fakeit/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/fakeit/all/conanfile.py b/recipes/fakeit/all/conanfile.py index 790c00d882ca3..3676955b84f0f 100644 --- a/recipes/fakeit/all/conanfile.py +++ b/recipes/fakeit/all/conanfile.py @@ -34,11 +34,11 @@ def layout(self): def requirements(self): if self.options.integration == "boost": - self.requires("boost/1.82.0") + self.requires("boost/1.83.0") elif self.options.integration == "catch": self.requires("catch2/3.4.0") elif self.options.integration == "gtest": - self.requires("gtest/1.13.0") + self.requires("gtest/1.14.0") elif self.options.integration == "qtest": self.requires("qt/6.3.0") elif self.options.integration == "standalone": From 993c0b5cbd66263ce736423acb97a8e5190276f7 Mon Sep 17 00:00:00 2001 From: Maksim Petukhov <6967052+maksim-petukhov@users.noreply.github.com> Date: Mon, 4 Sep 2023 10:07:22 +0200 Subject: [PATCH 506/637] (#18219) libarchive: fix msvc build and bump deps * fix * fix msvc build patch * backport fix msvc build patch --- recipes/libarchive/all/conandata.yml | 5 +- recipes/libarchive/all/conanfile.py | 7 +- .../all/patches/0001-3.6.2-zlib-winapi.patch | 9 +- .../all/patches/0003-3.4.0-cmake.patch | 41 +++++ .../all/patches/0003-3.4.3-cmake.patch | 49 ++++++ .../all/patches/0003-3.5.1-cmake.patch | 142 ++++++++++++++++++ .../all/patches/0003-3.5.2-cmake.patch | 41 +++++ .../all/patches/0003-3.6.0-cmake.patch | 41 +++++ .../all/patches/0003-3.6.2-cmake.patch | 41 +++-- .../0005-3.6.2-try-compile-cmakedeps.patch | 20 ++- .../all/patches/0006-fix-msvc-build.patch | 48 ++++++ 11 files changed, 411 insertions(+), 33 deletions(-) create mode 100644 recipes/libarchive/all/patches/0003-3.5.1-cmake.patch create mode 100644 recipes/libarchive/all/patches/0006-fix-msvc-build.patch diff --git a/recipes/libarchive/all/conandata.yml b/recipes/libarchive/all/conandata.yml index 9a164839a427b..3853b8ec0aa66 100644 --- a/recipes/libarchive/all/conandata.yml +++ b/recipes/libarchive/all/conandata.yml @@ -31,6 +31,9 @@ patches: - patch_file: "patches/0005-3.6.2-try-compile-cmakedeps.patch" patch_description: "Patch try_compile check to work with imported CMake targets from Conan packages" patch_type: "conan" + - patch_file: "patches/0006-fix-msvc-build.patch" + patch_description: "Fix MSVC build" + patch_type: "conan" "3.6.1": - patch_file: "patches/0001-3.6.0-zlib-winapi.patch" patch_description: "Remove broken ZLIB WINAPI check" @@ -62,7 +65,7 @@ patches: - patch_file: "patches/0001-3.4.3-zlib-winapi.patch" patch_description: "Remove broken ZLIB WINAPI check" patch_type: "portability" - - patch_file: "patches/0003-3.4.3-cmake.patch" + - patch_file: "patches/0003-3.5.1-cmake.patch" patch_description: "Make CMake cooperate with Conan" patch_type: "conan" "3.4.3": diff --git a/recipes/libarchive/all/conanfile.py b/recipes/libarchive/all/conanfile.py index 7b3f2cc70c9d0..c6970f8d631a8 100644 --- a/recipes/libarchive/all/conanfile.py +++ b/recipes/libarchive/all/conanfile.py @@ -85,13 +85,13 @@ def requirements(self): if self.options.with_bzip2: self.requires("bzip2/1.0.8") if self.options.with_libxml2: - self.requires("libxml2/2.10.4") + self.requires("libxml2/2.11.4") if self.options.with_expat: self.requires("expat/2.5.0") if self.options.with_iconv: self.requires("libiconv/1.17") if self.options.with_pcreposix: - self.requires("pcre/8.45") + self.requires("pcre/10.42") if self.options.with_nettle: self.requires("nettle/3.8.1") if self.options.with_openssl: @@ -154,6 +154,9 @@ def generate(self): if Version(self.version) >= "3.4.2": tc.variables["ENABLE_MBEDTLS"] = self.options.with_mbedtls tc.variables["ENABLE_XATTR"] = self.options.with_xattr + # TODO: Remove after fixing https://github.com/conan-io/conan/issues/12012 + if is_msvc(self): + tc.cache_variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = str(self.settings.build_type) tc.generate() def build(self): diff --git a/recipes/libarchive/all/patches/0001-3.6.2-zlib-winapi.patch b/recipes/libarchive/all/patches/0001-3.6.2-zlib-winapi.patch index 62dd3ef819875..9e88323972df9 100644 --- a/recipes/libarchive/all/patches/0001-3.6.2-zlib-winapi.patch +++ b/recipes/libarchive/all/patches/0001-3.6.2-zlib-winapi.patch @@ -2,7 +2,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 713e3bc..2315da5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -430,14 +430,7 @@ IF(ZLIB_FOUND) +@@ -430,14 +430,14 @@ IF(ZLIB_FOUND) INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) IF(WIN32 AND NOT CYGWIN) @@ -14,6 +14,13 @@ index 713e3bc..2315da5 100644 - RUNS - "#include \nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }" - ZLIB_WINAPI) ++ ++ ++ ++ ++ ++ ++ + set(ZLIB_WINAPI yes) IF(ZLIB_WINAPI) ADD_DEFINITIONS(-DZLIB_WINAPI) diff --git a/recipes/libarchive/all/patches/0003-3.4.0-cmake.patch b/recipes/libarchive/all/patches/0003-3.4.0-cmake.patch index 7b724f1fba164..7b34085f1a3a2 100644 --- a/recipes/libarchive/all/patches/0003-3.4.0-cmake.patch +++ b/recipes/libarchive/all/patches/0003-3.4.0-cmake.patch @@ -56,6 +56,47 @@ index 4ffd0930..01e8592c 100644 FIND_PACKAGE(OpenSSL) IF(OPENSSL_FOUND) SET(HAVE_LIBCRYPTO 1) +@@ -1316,7 +1316,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R) + CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) + CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) +-CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) ++set(HAVE_MEMMOVE 1) + CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) + CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) + CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) +@@ -1348,11 +1348,11 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) + CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) + CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) +-CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) +-CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) +-CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) ++set(HAVE_WCRTOMB 1) ++set(HAVE_WCSCMP 1) ++set(HAVE_WCSCPY 1) ++set(HAVE_WCSLEN 1) ++set(HAVE_WCTOMB 1) + CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S) + CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) + CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) +@@ -1364,10 +1364,10 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH) + CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) + CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R) + CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME) +-CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) +-CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) +-CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) +-CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) ++set(HAVE_VPRINTF 1) ++set(HAVE_WMEMCMP 1) ++set(HAVE_WMEMCPY 1) ++set(HAVE_WMEMMOVE 1) + + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt index ec775bb4..8ef2d620 100644 --- a/libarchive/CMakeLists.txt diff --git a/recipes/libarchive/all/patches/0003-3.4.3-cmake.patch b/recipes/libarchive/all/patches/0003-3.4.3-cmake.patch index 5c46b58290b77..45a9561474f8e 100644 --- a/recipes/libarchive/all/patches/0003-3.4.3-cmake.patch +++ b/recipes/libarchive/all/patches/0003-3.4.3-cmake.patch @@ -56,6 +56,55 @@ index 6013d9e6..125b1cb3 100644 FIND_PACKAGE(OpenSSL) IF(OPENSSL_FOUND) SET(HAVE_LIBCRYPTO 1) +@@ -1349,7 +1349,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R) + CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) + CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) +-CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) ++set(HAVE_MEMMOVE 1) + CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) + CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) + CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) +@@ -1371,6 +1371,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(strchr HAVE_STRCHR) + CHECK_FUNCTION_EXISTS_GLIBC(strdup HAVE_STRDUP) + CHECK_FUNCTION_EXISTS_GLIBC(strerror HAVE_STRERROR) + CHECK_FUNCTION_EXISTS_GLIBC(strncpy_s HAVE_STRNCPY_S) ++CHECK_FUNCTION_EXISTS_GLIBC(strnlen HAVE_STRNLEN) + CHECK_FUNCTION_EXISTS_GLIBC(strrchr HAVE_STRRCHR) + CHECK_FUNCTION_EXISTS_GLIBC(symlink HAVE_SYMLINK) + CHECK_FUNCTION_EXISTS_GLIBC(timegm HAVE_TIMEGM) +@@ -1381,11 +1382,11 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) + CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) + CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) +-CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) +-CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) +-CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) ++set(HAVE_WCRTOMB 1) ++set(HAVE_WCSCMP 1) ++set(HAVE_WCSCPY 1) ++set(HAVE_WCSLEN 1) ++set(HAVE_WCTOMB 1) + CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S) + CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) + CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) +@@ -1398,10 +1399,10 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH) + CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) + CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R) + CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME) +-CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) +-CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) +-CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) +-CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) ++set(HAVE_VPRINTF 1) ++set(HAVE_WMEMCMP 1) ++set(HAVE_WMEMCPY 1) ++set(HAVE_WMEMMOVE 1) + + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt index 9389bbc9..76e0b5c7 100644 --- a/libarchive/CMakeLists.txt diff --git a/recipes/libarchive/all/patches/0003-3.5.1-cmake.patch b/recipes/libarchive/all/patches/0003-3.5.1-cmake.patch new file mode 100644 index 0000000000000..181a183093fc3 --- /dev/null +++ b/recipes/libarchive/all/patches/0003-3.5.1-cmake.patch @@ -0,0 +1,142 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 256b966e..30c42967 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,7 +6,7 @@ endif() + # + PROJECT(libarchive C) + # +-SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") ++list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") + if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin) + endif() +@@ -418,7 +418,7 @@ IF(ZLIB_FOUND) + SET(HAVE_LIBZ 1) + SET(HAVE_ZLIB_H 1) + INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) +- LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) ++ LIST(APPEND ADDITIONAL_LIBS ZLIB::ZLIB) + IF(WIN32 AND NOT CYGWIN) + set(ZLIB_WINAPI yes) + IF(ZLIB_WINAPI) +@@ -480,7 +480,7 @@ IF(LIBLZMA_FOUND) + SET(HAVE_LIBLZMA 1) + SET(HAVE_LZMA_H 1) + CMAKE_PUSH_CHECK_STATE() +- SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR}) ++ SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIRS}) + SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) + INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS}) + LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES}) +@@ -497,7 +497,7 @@ IF(LIBLZMA_FOUND) + ELSE(LIBLZMA_FOUND) + # LZMA not found and will not be used. + ENDIF(LIBLZMA_FOUND) +-MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIR) ++MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIRS) + MARK_AS_ADVANCED(CLEAR LIBLZMA_LIBRARY) + + # +@@ -567,7 +567,7 @@ IF(ENABLE_LZ4) + ENDIF (LZ4_INCLUDE_DIR) + + FIND_PATH(LZ4_INCLUDE_DIR lz4.h) +- FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4) ++ FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4 lz4_static liblz4_static) + INCLUDE(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) + ELSE(ENABLE_LZ4) +@@ -783,7 +783,7 @@ ENDIF(ENABLE_NETTLE) + # Find OpenSSL + # (Except on Mac, where OpenSSL is deprecated.) + # +-IF(ENABLE_OPENSSL AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") ++IF(ENABLE_OPENSSL) + FIND_PACKAGE(OpenSSL) + IF(OPENSSL_FOUND) + SET(HAVE_LIBCRYPTO 1) +@@ -1349,7 +1349,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R) + CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) + CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) +-CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) ++set(HAVE_MEMMOVE 1) + CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) + CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) + CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) +@@ -1382,11 +1382,11 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) + CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) + CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) +-CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) +-CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) +-CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) ++set(HAVE_WCRTOMB 1) ++set(HAVE_WCSCMP 1) ++set(HAVE_WCSCPY 1) ++set(HAVE_WCSLEN 1) ++set(HAVE_WCTOMB 1) + CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S) + CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) + CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) +@@ -1399,10 +1399,10 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH) + CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) + CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R) + CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME) +-CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) +-CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) +-CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) +-CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) ++set(HAVE_VPRINTF 1) ++set(HAVE_WMEMCMP 1) ++set(HAVE_WMEMCPY 1) ++set(HAVE_WMEMMOVE 1) + + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + +diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt +index 9389bbc9..76e0b5c7 100644 +--- a/libarchive/CMakeLists.txt ++++ b/libarchive/CMakeLists.txt +@@ -236,11 +236,15 @@ ELSEIF(ARCHIVE_ACL_SUNOS) + ENDIF() + + # Libarchive is a shared library ++if (BUILD_SHARED_LIBS) ++ + ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS}) + TARGET_INCLUDE_DIRECTORIES(archive PUBLIC .) + TARGET_LINK_LIBRARIES(archive ${ADDITIONAL_LIBS}) + SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION}) + ++else() ++ + # archive_static is a static library + ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS}) + TARGET_LINK_LIBRARIES(archive_static ${ADDITIONAL_LIBS}) +@@ -250,13 +254,21 @@ SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS + IF(NOT WIN32 OR CYGWIN) + SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive) + ENDIF(NOT WIN32 OR CYGWIN) ++endif() + + IF(ENABLE_INSTALL) + # How to install the libraries +- INSTALL(TARGETS archive archive_static ++ if (BUILD_SHARED_LIBS) ++ INSTALL(TARGETS archive ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++ else() ++ INSTALL(TARGETS archive_static + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) ++ endif() + INSTALL_MAN(${libarchive_MANS}) + INSTALL(FILES ${include_HEADERS} DESTINATION include) + ENDIF() diff --git a/recipes/libarchive/all/patches/0003-3.5.2-cmake.patch b/recipes/libarchive/all/patches/0003-3.5.2-cmake.patch index 5584b5f1606bc..46955b7f8f7ce 100644 --- a/recipes/libarchive/all/patches/0003-3.5.2-cmake.patch +++ b/recipes/libarchive/all/patches/0003-3.5.2-cmake.patch @@ -56,6 +56,47 @@ index e0359b51..3927a742 100644 FIND_PACKAGE(OpenSSL) IF(OPENSSL_FOUND) SET(HAVE_LIBCRYPTO 1) +@@ -1350,7 +1350,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R) + CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) + CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) +-CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) ++set(HAVE_MEMMOVE 1) + CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) + CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) + CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) +@@ -1383,11 +1383,11 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) + CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) + CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) +-CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) +-CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) +-CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) ++set(HAVE_WCRTOMB 1) ++set(HAVE_WCSCMP 1) ++set(HAVE_WCSCPY 1) ++set(HAVE_WCSLEN 1) ++set(HAVE_WCTOMB 1) + CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S) + CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) + CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) +@@ -1400,10 +1400,10 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH) + CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) + CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R) + CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME) +-CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) +-CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) +-CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) +-CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) ++set(HAVE_VPRINTF 1) ++set(HAVE_WMEMCMP 1) ++set(HAVE_WMEMCPY 1) ++set(HAVE_WMEMMOVE 1) + + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt index e1d76a51..792b26b3 100644 --- a/libarchive/CMakeLists.txt diff --git a/recipes/libarchive/all/patches/0003-3.6.0-cmake.patch b/recipes/libarchive/all/patches/0003-3.6.0-cmake.patch index 436c8194e3e4d..3c89010df2aba 100644 --- a/recipes/libarchive/all/patches/0003-3.6.0-cmake.patch +++ b/recipes/libarchive/all/patches/0003-3.6.0-cmake.patch @@ -56,6 +56,47 @@ index 646e5ce7..9bca273f 100644 FIND_PACKAGE(OpenSSL) IF(OPENSSL_FOUND) SET(HAVE_LIBCRYPTO 1) +@@ -1357,7 +1357,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R) + CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) + CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) +-CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) ++set(HAVE_MEMMOVE 1) + CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) + CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) + CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) +@@ -1390,11 +1390,11 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) + CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) + CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) +-CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) +-CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) +-CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) ++set(HAVE_WCRTOMB 1) ++set(HAVE_WCSCMP 1) ++set(HAVE_WCSCPY 1) ++set(HAVE_WCSLEN 1) ++set(HAVE_WCTOMB 1) + CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S) + CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) + CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) +@@ -1407,10 +1407,10 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH) + CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) + CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R) + CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME) +-CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) +-CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) +-CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) +-CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) ++set(HAVE_VPRINTF 1) ++set(HAVE_WMEMCMP 1) ++set(HAVE_WMEMCPY 1) ++set(HAVE_WMEMMOVE 1) + + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt index e1d76a51..713c6496 100644 --- a/libarchive/CMakeLists.txt diff --git a/recipes/libarchive/all/patches/0003-3.6.2-cmake.patch b/recipes/libarchive/all/patches/0003-3.6.2-cmake.patch index 80d49396aac87..aca2961950d2d 100644 --- a/recipes/libarchive/all/patches/0003-3.6.2-cmake.patch +++ b/recipes/libarchive/all/patches/0003-3.6.2-cmake.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2315da5..1d8de96 100644 +index a4a9284a..f5dbccac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ endif() @@ -18,9 +18,9 @@ index 2315da5..1d8de96 100644 - LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) + LIST(APPEND ADDITIONAL_LIBS ZLIB::ZLIB) IF(WIN32 AND NOT CYGWIN) - set(ZLIB_WINAPI yes) - IF(ZLIB_WINAPI) -@@ -490,7 +490,7 @@ IF(LIBLZMA_FOUND) + + +@@ -497,7 +497,7 @@ IF(LIBLZMA_FOUND) SET(HAVE_LIBLZMA 1) SET(HAVE_LZMA_H 1) CMAKE_PUSH_CHECK_STATE() @@ -29,7 +29,7 @@ index 2315da5..1d8de96 100644 SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS}) LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES}) -@@ -507,7 +507,7 @@ IF(LIBLZMA_FOUND) +@@ -514,7 +514,7 @@ IF(LIBLZMA_FOUND) ELSE(LIBLZMA_FOUND) # LZMA not found and will not be used. ENDIF(LIBLZMA_FOUND) @@ -38,7 +38,7 @@ index 2315da5..1d8de96 100644 MARK_AS_ADVANCED(CLEAR LIBLZMA_LIBRARY) # -@@ -577,7 +577,7 @@ IF(ENABLE_LZ4) +@@ -584,7 +584,7 @@ IF(ENABLE_LZ4) ENDIF (LZ4_INCLUDE_DIR) FIND_PATH(LZ4_INCLUDE_DIR lz4.h) @@ -47,7 +47,7 @@ index 2315da5..1d8de96 100644 INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) ELSE(ENABLE_LZ4) -@@ -799,7 +799,7 @@ ENDIF(ENABLE_NETTLE) +@@ -806,7 +806,7 @@ ENDIF(ENABLE_NETTLE) # Find OpenSSL # (Except on Mac, where OpenSSL is deprecated.) # @@ -57,46 +57,41 @@ index 2315da5..1d8de96 100644 IF(OPENSSL_FOUND) SET(HAVE_LIBCRYPTO 1) diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt -index ff7ade0..1438819 100644 +index ff7ade00..8c867130 100644 --- a/libarchive/CMakeLists.txt +++ b/libarchive/CMakeLists.txt -@@ -243,11 +243,14 @@ ELSEIF(ARCHIVE_ACL_SUNOS) +@@ -242,13 +242,13 @@ ELSEIF(ARCHIVE_ACL_SUNOS) + LIST(APPEND libarchive_SOURCES archive_disk_acl_sunos.c) ENDIF() - # Libarchive is a shared library +-# Libarchive is a shared library +if (BUILD_SHARED_LIBS) ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS}) TARGET_INCLUDE_DIRECTORIES(archive PUBLIC .) TARGET_LINK_LIBRARIES(archive ${ADDITIONAL_LIBS}) SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION}) +-# archive_static is a static library +else() -+ - # archive_static is a static library ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS}) TARGET_LINK_LIBRARIES(archive_static ${ADDITIONAL_LIBS}) -@@ -257,13 +260,21 @@ SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS + SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS +@@ -257,13 +257,13 @@ SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS IF(NOT WIN32 OR CYGWIN) SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive) ENDIF(NOT WIN32 OR CYGWIN) +- +endif() - IF(ENABLE_INSTALL) - # How to install the libraries +- # How to install the libraries - INSTALL(TARGETS archive archive_static - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) + if (BUILD_SHARED_LIBS) -+ INSTALL(TARGETS archive -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib) ++ INSTALL(TARGETS archive RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) + else() -+ INSTALL(TARGETS archive_static -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib) ++ INSTALL(TARGETS archive_static RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) + endif() INSTALL_MAN(${libarchive_MANS}) INSTALL(FILES ${include_HEADERS} DESTINATION include) diff --git a/recipes/libarchive/all/patches/0005-3.6.2-try-compile-cmakedeps.patch b/recipes/libarchive/all/patches/0005-3.6.2-try-compile-cmakedeps.patch index 4bca48088c19b..69e42f1f5678b 100644 --- a/recipes/libarchive/all/patches/0005-3.6.2-try-compile-cmakedeps.patch +++ b/recipes/libarchive/all/patches/0005-3.6.2-try-compile-cmakedeps.patch @@ -1,27 +1,35 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1d8de96f..d54975b7 100644 +index f5dbccac..ea7ff16a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -829,6 +829,8 @@ ENDIF(NOT OPENSSL_FOUND) +@@ -830,12 +830,11 @@ IF(NOT OPENSSL_FOUND) + ENDIF(NOT OPENSSL_FOUND) + + # +-# How to prove that CRYPTO functions, which have several names on various +-# platforms, just see if archive_digest.c can compile and link against +-# required libraries. # MACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) - FOREACH(ALGORITHM ${ALGORITHMS}) +- FOREACH(ALGORITHM ${ALGORITHMS}) ++ FOREACH(ALGORITHM ${ALGORITHMS}) + include(CMakePushCheckState) + cmake_push_check_state() IF(NOT ARCHIVE_CRYPTO_${ALGORITHM}) STRING(TOLOWER "${ALGORITHM}" lower_algorithm) STRING(TOUPPER "${ALGORITHM}" algorithm) -@@ -849,8 +851,7 @@ MACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) +@@ -856,8 +855,8 @@ MACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) IF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) SET(TRY_CRYPTO_REQUIRED_INCLUDES "${TRY_CRYPTO_REQUIRED_INCLUDES};${OPENSSL_INCLUDE_DIR}") - SET(TRY_CRYPTO_REQUIRED_LIBS - "-DLINK_LIBRARIES:STRING=${OPENSSL_LIBRARIES}") -+ set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES}) ++ set(CMAKE_REQUIRED_LIBRARIES ++ ${OPENSSL_LIBRARIES}) ELSEIF("${IMPLEMENTATION}" MATCHES "^MBEDTLS$" AND MBEDTLS_FOUND) SET(TRY_CRYPTO_REQUIRED_INCLUDES "${TRY_CRYPTO_REQUIRED_INCLUDES};${MBEDTLS_INCLUDE_DIRS}") -@@ -927,6 +928,7 @@ main(int argc, char **argv) +@@ -934,6 +933,7 @@ main(int argc, char **argv) ENDIF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) ENDIF (ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}) ENDIF(NOT ARCHIVE_CRYPTO_${ALGORITHM}) diff --git a/recipes/libarchive/all/patches/0006-fix-msvc-build.patch b/recipes/libarchive/all/patches/0006-fix-msvc-build.patch new file mode 100644 index 0000000000000..c0903cf80cf94 --- /dev/null +++ b/recipes/libarchive/all/patches/0006-fix-msvc-build.patch @@ -0,0 +1,48 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 713e3bc5..9bc36214 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1374,7 +1374,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R) + CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) + CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) +-CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) ++set(HAVE_MEMMOVE 1) + CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) + CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) + CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) +@@ -1407,11 +1407,11 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) + CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) + CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) +-CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) +-CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) +-CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) ++set(HAVE_WCRTOMB 1) ++set(HAVE_WCSCMP 1) ++set(HAVE_WCSCPY 1) ++set(HAVE_WCSLEN 1) ++set(HAVE_WCTOMB 1) + CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S) + CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) + CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) +@@ -1424,10 +1424,10 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH) + CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) + CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R) + CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME) +-CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) +-CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) +-CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) +-CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) ++set(HAVE_VPRINTF 1) ++set(HAVE_WMEMCMP 1) ++set(HAVE_WMEMCPY 1) ++set(HAVE_WMEMMOVE 1) + + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + +-- +2.33.0.windows.1 + From 831f49bbe136439335aa1f909dc7e3a01e1514c6 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 4 Sep 2023 10:43:00 +0200 Subject: [PATCH 507/637] (#19570) [bot] Update list of references (prod-v2/ListPackages) --- .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 7b84a12bb8b2a..2c10e53b02cca 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -282,6 +282,7 @@ required_for_references: - enet - enhex-generic_serialization - enhex-strong_type +- enkits - entityx - entt - enum-flags @@ -428,6 +429,7 @@ required_for_references: - http_parser - hunspell - hwloc +- hyperscan - icecream-cpp - icu - id3v2lib @@ -682,6 +684,7 @@ required_for_references: - lz4 - lzfse - lzham +- lzip - lzma_sdk - lzo - m4 @@ -795,6 +798,7 @@ required_for_references: - objectbox - objectbox-generator - observer-ptr-lite +- octo-logger-cpp - octomap - odbc - ode @@ -920,6 +924,7 @@ required_for_references: - pybind11_json - pystring - qcbor +- qdbm - qhull - qpdf - qpoases From 75a1eaf261645aace885188aae97a8df76936fb4 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 4 Sep 2023 12:06:24 +0300 Subject: [PATCH 508/637] (#17575) embag: add new recipe * embag: add new recipe * embag: set min cxx_standard to 11 * embag: add missing 'm' system lib * embag: bump min c++ std to 14 * embag: fix a portability bug * embag: drop test_v1_package * embag: transitive_libs not required for boost * embag: get rid of patch, add review suggestion * embag: revert to using a patch Otherwise would need to add /Zc:__cplusplus to exported cxxflags. * embag: get rid of the patch --- recipes/embag/all/CMakeLists.txt | 33 +++++++ recipes/embag/all/conandata.yml | 4 + recipes/embag/all/conanfile.py | 91 +++++++++++++++++++ recipes/embag/all/test_package/CMakeLists.txt | 8 ++ recipes/embag/all/test_package/conanfile.py | 26 ++++++ .../embag/all/test_package/test_package.cpp | 18 ++++ recipes/embag/config.yml | 3 + 7 files changed, 183 insertions(+) create mode 100644 recipes/embag/all/CMakeLists.txt create mode 100644 recipes/embag/all/conandata.yml create mode 100644 recipes/embag/all/conanfile.py create mode 100644 recipes/embag/all/test_package/CMakeLists.txt create mode 100644 recipes/embag/all/test_package/conanfile.py create mode 100644 recipes/embag/all/test_package/test_package.cpp create mode 100644 recipes/embag/config.yml diff --git a/recipes/embag/all/CMakeLists.txt b/recipes/embag/all/CMakeLists.txt new file mode 100644 index 0000000000000..6638694bdd2b6 --- /dev/null +++ b/recipes/embag/all/CMakeLists.txt @@ -0,0 +1,33 @@ +cmake_minimum_required(VERSION 3.15) +project(embag LANGUAGES CXX) + +find_package(Boost REQUIRED COMPONENTS iostreams headers) +find_package(lz4 REQUIRED CONFIG) +find_package(BZip2 REQUIRED CONFIG) + +file(GLOB_RECURSE embag_SOURCES "lib/*.cc") +add_library(embag ${embag_SOURCES}) +set_target_properties(embag PROPERTIES + # embag does not export any symbols otherwise + WINDOWS_EXPORT_ALL_SYMBOLS ON +) +target_compile_features(embag PUBLIC cxx_std_14) +target_link_libraries(embag PUBLIC + Boost::iostreams + Boost::headers + lz4::lz4 + BZip2::BZip2 +) + +if (MSVC) + # For a #if __cplusplus < 201402L check in lib/util.h + target_compile_options(embag PRIVATE /Zc:__cplusplus) +endif() + +install(TARGETS embag) +install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib/ + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/embag + FILES_MATCHING + PATTERN "*.h" + PATTERN "*.hpp" +) diff --git a/recipes/embag/all/conandata.yml b/recipes/embag/all/conandata.yml new file mode 100644 index 0000000000000..6df20cbf9a5ef --- /dev/null +++ b/recipes/embag/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.0.42": + url: "https://github.com/embarktrucks/embag/archive/refs/tags/0.0.42.tar.gz" + sha256: "60b22ba9355528040046b7e2c3ee968798ad5773a9eb7a1d13cf33dc47e2adec" diff --git a/recipes/embag/all/conanfile.py b/recipes/embag/all/conanfile.py new file mode 100644 index 0000000000000..3d3e19b6eb19b --- /dev/null +++ b/recipes/embag/all/conanfile.py @@ -0,0 +1,91 @@ +import os + +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 get, copy, rm +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.53.0" + + +class EmbagConan(ConanFile): + name = "embag" + description = "Schema and dependency free ROS bag reader" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/embarktrucks/embag" + topics = ("rosbag", "ros", "robotics") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 14 + + def export_sources(self): + copy(self, "CMakeLists.txt", + src=self.recipe_folder, + dst=os.path.join(self.export_sources_folder, "src")) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + # INFO: embag.h includes boost/variant.hpp + self.requires("boost/1.82.0", transitive_headers=True) + # INFO: decompression.h includes lz4frame.h + self.requires("lz4/1.9.4", transitive_headers=True) + # INFO: ros_bag_types.h includes bzlib.h + self.requires("bzip2/1.0.8", transitive_headers=True) + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) + cmake.install() + rm(self, "*.pdb", self.package_folder, recursive=True) + + def package_info(self): + self.cpp_info.libs = ["embag"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m"] + if is_msvc(self): + # For a #if __cplusplus < 201402L check in lib/util.h, which is a public header + self.cpp_info.cxxflags.append("/Zc:__cplusplus") diff --git a/recipes/embag/all/test_package/CMakeLists.txt b/recipes/embag/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..27b09cd59a901 --- /dev/null +++ b/recipes/embag/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(embag REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE embag::embag) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/embag/all/test_package/conanfile.py b/recipes/embag/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/embag/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/embag/all/test_package/test_package.cpp b/recipes/embag/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..c8563d402b2b7 --- /dev/null +++ b/recipes/embag/all/test_package/test_package.cpp @@ -0,0 +1,18 @@ +#include +#include + +#include + +int main() { + Embag::View view{}; + // Do not load any bag file for testing + // view.addBag("xyz.bag"); + const auto start_time = view.getStartTime(); + const auto end_time = view.getEndTime(); + std::cout << "Start time is " << start_time.secs + start_time.nsecs * 1e-9 << std::endl; + std::cout << "End time is " << end_time.secs + end_time.nsecs * 1e-9 << std::endl; + for (const auto &message : view.getMessages()) { + message->print(); + } + return EXIT_SUCCESS; +} diff --git a/recipes/embag/config.yml b/recipes/embag/config.yml new file mode 100644 index 0000000000000..97f7bce9d3b04 --- /dev/null +++ b/recipes/embag/config.yml @@ -0,0 +1,3 @@ +versions: + "0.0.42": + folder: all From 83323f29d132234f89093d1a82c4c1152a149f93 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 4 Sep 2023 11:42:34 +0200 Subject: [PATCH 509/637] (#19580) [bot] Update list of references (prod-v2/ListPackages) From d267231eae08809383946e93f5126bc81140e779 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 4 Sep 2023 12:04:22 +0200 Subject: [PATCH 510/637] (#19514) [onetbb] Bump dependencies Signed-off-by: Uilian Ries --- recipes/onetbb/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/onetbb/all/conanfile.py b/recipes/onetbb/all/conanfile.py index bfc433ac09750..742e204c36a4f 100644 --- a/recipes/onetbb/all/conanfile.py +++ b/recipes/onetbb/all/conanfile.py @@ -87,11 +87,11 @@ def configure(self): def requirements(self): if self._tbbbind_build: - self.requires("hwloc/2.9.1") + self.requires("hwloc/2.9.2") def build_requirements(self): if not self._tbbbind_explicit_hwloc and not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.build_requires("pkgconf/1.9.3") + self.build_requires("pkgconf/1.9.5") def layout(self): cmake_layout(self, src_folder="src") From 7ad5865d7093db9c2a950b285b21313504992c1e Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 4 Sep 2023 19:54:58 +0900 Subject: [PATCH 511/637] (#19410) wt: update dependencies Co-authored-by: Carlos Zoido --- recipes/wt/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py index 630f87115fd10..23c11c902b6f8 100644 --- a/recipes/wt/all/conanfile.py +++ b/recipes/wt/all/conanfile.py @@ -102,9 +102,9 @@ def requirements(self): if self.options.with_ssl: self.requires("openssl/[>=1.1 <4]") if self.options.get_safe("with_sqlite"): - self.requires("sqlite3/3.42.0") + self.requires("sqlite3/3.43.0") if self.options.get_safe("with_mysql"): - self.requires("libmysqlclient/8.0.34", transitive_headers=True, transitive_libs=True) + self.requires("libmysqlclient/8.1.0", transitive_headers=True, transitive_libs=True) if self.options.get_safe("with_postgres"): self.requires("libpq/15.4", transitive_headers=True, transitive_libs=True) if self.options.get_safe("with_mssql") and self.settings.os != "Windows": From 418edacc791b0d90012e0742b96c5f7aa26da1e5 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 4 Sep 2023 20:53:49 +0900 Subject: [PATCH 512/637] (#19574) cubicinterpolation: update dependencies, remove unused file --- recipes/cubicinterpolation/all/CMakeLists.txt | 7 ------- recipes/cubicinterpolation/all/conanfile.py | 15 ++++++--------- .../all/test_package/CMakeLists.txt | 6 +++--- recipes/cubicinterpolation/config.yml | 2 +- 4 files changed, 10 insertions(+), 20 deletions(-) delete mode 100644 recipes/cubicinterpolation/all/CMakeLists.txt diff --git a/recipes/cubicinterpolation/all/CMakeLists.txt b/recipes/cubicinterpolation/all/CMakeLists.txt deleted file mode 100644 index 0ed622c3eb5d7..0000000000000 --- a/recipes/cubicinterpolation/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_RPATH) - -add_subdirectory("source_subfolder") diff --git a/recipes/cubicinterpolation/all/conanfile.py b/recipes/cubicinterpolation/all/conanfile.py index 722cbaa5424a1..2525795c99b74 100644 --- a/recipes/cubicinterpolation/all/conanfile.py +++ b/recipes/cubicinterpolation/all/conanfile.py @@ -11,10 +11,10 @@ class CubicInterpolationConan(ConanFile): name = "cubicinterpolation" - homepage = "https://github.com/MaxSac/cubic_interpolation" + description = "Leightweight interpolation library based on boost and eigen." license = "MIT" + homepage = "https://github.com/MaxSac/cubic_interpolation" url = "https://github.com/conan-io/conan-center-index" - description = "Leightweight interpolation library based on boost and eigen." topics = ("interpolation", "splines", "cubic", "bicubic", "boost", "eigen3") package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -27,8 +27,6 @@ class CubicInterpolationConan(ConanFile): "fPIC": True, } - _cmake = None - def export_sources(self): export_conandata_patches(self) @@ -45,15 +43,14 @@ def layout(self): def requirements(self): # TODO: update boost dependency as soon as we deprecate conan1.x (see discussion in #11207) - self.requires("boost/1.75.0") - self.requires("eigen/3.3.9") + self.requires("boost/1.83.0") + self.requires("eigen/3.4.0") @property def _required_boost_components(self): return ["filesystem", "math", "serialization"] def validate(self): - miss_boost_required_comp = any(getattr(self.dependencies["boost"].options, f"without_{boost_comp}", True) for boost_comp in self._required_boost_components) if self.dependencies["boost"].options.header_only or miss_boost_required_comp: raise ConanInvalidConfiguration( @@ -64,7 +61,7 @@ def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, "14") - if not check_min_vs(self, 192, raise_invalid=False): + if not check_min_vs(self, 192, raise_invalid=False): raise ConanInvalidConfiguration(f"{self.ref} currently Visual Studio < 2019 not yet supported in this recipe. Contributions are welcome") if is_msvc(self) and self.options.shared: @@ -74,7 +71,7 @@ def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): - tc = CMakeToolchain(self) + tc = CMakeToolchain(self) tc.variables["BUILD_EXAMPLE"] = False tc.variables["BUILD_DOCUMENTATION"] = False tc.generate() diff --git a/recipes/cubicinterpolation/all/test_package/CMakeLists.txt b/recipes/cubicinterpolation/all/test_package/CMakeLists.txt index b98fa443a5368..0ce4681457d9e 100644 --- a/recipes/cubicinterpolation/all/test_package/CMakeLists.txt +++ b/recipes/cubicinterpolation/all/test_package/CMakeLists.txt @@ -1,8 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.8) project(test_package LANGUAGES CXX) find_package(CubicInterpolation REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} CubicInterpolation::CubicInterpolation) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) +target_link_libraries(${PROJECT_NAME} PRIVATE CubicInterpolation::CubicInterpolation) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/cubicinterpolation/config.yml b/recipes/cubicinterpolation/config.yml index 5185d65a2df90..5c83127c63d75 100644 --- a/recipes/cubicinterpolation/config.yml +++ b/recipes/cubicinterpolation/config.yml @@ -1,6 +1,6 @@ versions: "0.1.5": - folder: all + folder: all "0.1.4": folder: all "0.1.3": From 0b0d82d651416b828d31fcd116c61d6e459a667a Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 4 Sep 2023 22:12:17 +0900 Subject: [PATCH 513/637] (#19556) luau: add version 0.593, remove older versions, make static-library --- recipes/luau/all/conandata.yml | 59 +------------------ recipes/luau/all/conanfile.py | 34 ++--------- .../all/patches/0.536-0001-fix-cmake.patch | 23 -------- .../all/patches/0.552-0001-fix-cmake.patch | 23 -------- .../all/patches/0.568-0001-fix-cmake.patch | 35 ----------- .../all/patches/0.572-0001-fix-cmake.patch | 23 -------- recipes/luau/config.yml | 8 +-- 7 files changed, 10 insertions(+), 195 deletions(-) delete mode 100644 recipes/luau/all/patches/0.536-0001-fix-cmake.patch delete mode 100644 recipes/luau/all/patches/0.552-0001-fix-cmake.patch delete mode 100644 recipes/luau/all/patches/0.568-0001-fix-cmake.patch delete mode 100644 recipes/luau/all/patches/0.572-0001-fix-cmake.patch diff --git a/recipes/luau/all/conandata.yml b/recipes/luau/all/conandata.yml index ce7fa7f71284a..8561d42700a29 100644 --- a/recipes/luau/all/conandata.yml +++ b/recipes/luau/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.593": + url: "https://github.com/Roblox/luau/archive/0.593.tar.gz" + sha256: "1cbe4390ef71bb0f2210853978c900974aa02fab73de92b6e18e7bb10dd0e3c1" "0.589": url: "https://github.com/Roblox/luau/archive/0.589.tar.gz" sha256: "dc4489de52dbf29cd3d04d78c1112f812e04a03b68d57585749260ba791e65ed" @@ -20,68 +23,12 @@ sources: "0.558": url: "https://github.com/Roblox/luau/archive/0.558.tar.gz" sha256: "3484adddb18872700e033f5917af44d90c266f9e0fff2fac21aec1061f472a06" - "0.556": - url: "https://github.com/Roblox/luau/archive/0.556.tar.gz" - sha256: "dc72f91f4e866a2b25f7608e062c91c84e92a2e5611026e9789f127c3caf39f6" - "0.552": - url: "https://github.com/Roblox/luau/archive/0.552.tar.gz" - sha256: "c638aee88010197d7e6f22e592fa12360e38a69f54ed91980b11ac0f89676db5" - "0.548": - url: "https://github.com/Roblox/luau/archive/0.548.tar.gz" - sha256: "1ec0aa919955aaa2d88dbef115801681d3b4dbfa7a276435a03d20230918659c" patches: - "0.589": - - patch_file: "patches/0.572-0001-fix-cmake.patch" - patch_description: "enable shared build" - patch_type: "portability" - "0.582": - - patch_file: "patches/0.572-0001-fix-cmake.patch" - patch_description: "enable shared build" - patch_type: "portability" - "0.577": - - patch_file: "patches/0.572-0001-fix-cmake.patch" - patch_description: "enable shared build" - patch_type: "portability" - "0.572": - - patch_file: "patches/0.572-0001-fix-cmake.patch" - patch_description: "enable shared build" - patch_type: "portability" - "0.568": - - patch_file: "patches/0.568-0001-fix-cmake.patch" - patch_description: "enable shared build" - patch_type: "portability" "0.563": - - patch_file: "patches/0.552-0001-fix-cmake.patch" - patch_description: "enable shared build" - patch_type: "portability" - patch_file: "patches/0.536-0002-rename-lerp.patch" patch_description: "rename lerp function to avoid name conflict" patch_type: "portability" "0.558": - - patch_file: "patches/0.552-0001-fix-cmake.patch" - patch_description: "enable shared build" - patch_type: "portability" - - patch_file: "patches/0.536-0002-rename-lerp.patch" - patch_description: "rename lerp function to avoid name conflict" - patch_type: "portability" - "0.556": - - patch_file: "patches/0.552-0001-fix-cmake.patch" - patch_description: "enable shared build" - patch_type: "portability" - - patch_file: "patches/0.536-0002-rename-lerp.patch" - patch_description: "rename lerp function to avoid name conflict" - patch_type: "portability" - "0.552": - - patch_file: "patches/0.552-0001-fix-cmake.patch" - patch_description: "enable shared build" - patch_type: "portability" - - patch_file: "patches/0.536-0002-rename-lerp.patch" - patch_description: "rename lerp function to avoid name conflict" - patch_type: "portability" - "0.548": - - patch_file: "patches/0.536-0001-fix-cmake.patch" - patch_description: "enable shared build" - patch_type: "portability" - patch_file: "patches/0.536-0002-rename-lerp.patch" patch_description: "rename lerp function to avoid name conflict" patch_type: "portability" diff --git a/recipes/luau/all/conanfile.py b/recipes/luau/all/conanfile.py index fe153e150679e..643eab7b93170 100644 --- a/recipes/luau/all/conanfile.py +++ b/recipes/luau/all/conanfile.py @@ -1,7 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.microsoft import is_msvc -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, replace_in_file +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout @@ -17,18 +16,14 @@ class LuauConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://luau-lang.org/" topics = ("lua", "scripting", "typed", "embed") - package_type = "library" + package_type = "static-library" settings = "os", "arch", "compiler", "build_type" options = { - "shared": [False, True], - "fPIC": [True, False], "with_cli": [True, False], "with_web": [True, False], "native_code_gen": [True, False], } default_options = { - "shared": False, - "fPIC": True, "with_cli": False, "with_web": False, "native_code_gen": False, @@ -41,7 +36,7 @@ def _minimum_cpp_standard(self): @property def _compilers_minimum_version(self): return { - "gcc": "8" if Version(self.version) < "0.549" else "9", + "gcc": "9", "clang": "7", "apple-clang": "12", "Visual Studio": "15", @@ -52,16 +47,6 @@ def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) export_conandata_patches(self) - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - if Version(self.version) < "0.549": - del self.options.native_code_gen - def layout(self): cmake_layout(self, src_folder="src") @@ -74,9 +59,6 @@ def validate(self): f"{self.ref} requires C++{self._minimum_cpp_standard}, which your compiler does not support." ) - if is_msvc(self) and self.options.shared: - raise ConanInvalidConfiguration(f"{self.ref} does not support shared build in MSVC") - def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -87,17 +69,12 @@ def generate(self): tc.variables["LUAU_BUILD_WEB"] = self.options.with_web tc.variables["LUAU_WERROR"] = False tc.variables["LUAU_STATIC_CRT"] = False - if Version(self.version) >= "0.549": - tc.variables["LUAU_NATIVE"] = self.options.native_code_gen + tc.variables["LUAU_NATIVE"] = self.options.native_code_gen tc.variables["LUAU_SRC_DIR"] = self.source_folder.replace("\\", "/") tc.generate() def _patch_sources(self): apply_conandata_patches(self) - if Version(self.version) >= "0.548" and self.options.shared: - replace_in_file(self, os.path.join(self.source_folder, "VM", "include", "luaconf.h"), - "#define LUAI_FUNC __attribute__((visibility(\"hidden\"))) extern", - "#define LUAI_FUNC extern") def build(self): self._patch_sources() @@ -139,8 +116,7 @@ def package_info(self): self.cpp_info.components["CodeGen"].libs = ["Luau.CodeGen"] self.cpp_info.components["CodeGen"].set_property("cmake_target_name", "Luau::CodeGen") self.cpp_info.components["CodeGen"].requires = ["Ast"] - if Version(self.version) >= "0.548": - self.cpp_info.components["CodeGen"].requires.append("VM") + self.cpp_info.components["CodeGen"].requires.append("VM") if self.options.with_cli: bin_path = os.path.join(self.package_folder, "bin") diff --git a/recipes/luau/all/patches/0.536-0001-fix-cmake.patch b/recipes/luau/all/patches/0.536-0001-fix-cmake.patch deleted file mode 100644 index 00dcf66617205..0000000000000 --- a/recipes/luau/all/patches/0.536-0001-fix-cmake.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9200634..c1cca12 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -21,12 +21,12 @@ endif() - - project(Luau LANGUAGES CXX C) - add_library(Luau.Common INTERFACE) --add_library(Luau.Ast STATIC) --add_library(Luau.Compiler STATIC) --add_library(Luau.Analysis STATIC) --add_library(Luau.CodeGen STATIC) --add_library(Luau.VM STATIC) --add_library(isocline STATIC) -+add_library(Luau.Ast) -+add_library(Luau.Compiler) -+add_library(Luau.Analysis) -+add_library(Luau.CodeGen) -+add_library(Luau.VM) -+add_library(isocline) - - if(LUAU_BUILD_CLI) - add_executable(Luau.Repl.CLI) diff --git a/recipes/luau/all/patches/0.552-0001-fix-cmake.patch b/recipes/luau/all/patches/0.552-0001-fix-cmake.patch deleted file mode 100644 index aaff66adb45b9..0000000000000 --- a/recipes/luau/all/patches/0.552-0001-fix-cmake.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 05d701e..4c73783 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -22,12 +22,12 @@ endif() - - project(Luau LANGUAGES CXX C) - add_library(Luau.Common INTERFACE) --add_library(Luau.Ast STATIC) --add_library(Luau.Compiler STATIC) --add_library(Luau.Analysis STATIC) --add_library(Luau.CodeGen STATIC) --add_library(Luau.VM STATIC) --add_library(isocline STATIC) -+add_library(Luau.Ast) -+add_library(Luau.Compiler) -+add_library(Luau.Analysis) -+add_library(Luau.CodeGen) -+add_library(Luau.VM) -+add_library(isocline) - - if(LUAU_BUILD_CLI) - add_executable(Luau.Repl.CLI) diff --git a/recipes/luau/all/patches/0.568-0001-fix-cmake.patch b/recipes/luau/all/patches/0.568-0001-fix-cmake.patch deleted file mode 100644 index 9901376bd09ea..0000000000000 --- a/recipes/luau/all/patches/0.568-0001-fix-cmake.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6e15e5f..63be1e1 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -24,12 +24,12 @@ endif() - - project(Luau LANGUAGES CXX C) - add_library(Luau.Common INTERFACE) --add_library(Luau.Ast STATIC) --add_library(Luau.Compiler STATIC) --add_library(Luau.Analysis STATIC) --add_library(Luau.CodeGen STATIC) --add_library(Luau.VM STATIC) --add_library(isocline STATIC) -+add_library(Luau.Ast) -+add_library(Luau.Compiler) -+add_library(Luau.Analysis) -+add_library(Luau.CodeGen) -+add_library(Luau.VM) -+add_library(isocline) - - if(LUAU_BUILD_CLI) - add_executable(Luau.Repl.CLI) -diff --git a/Sources.cmake b/Sources.cmake -index 6e0a32e..53d77c6 100644 ---- a/Sources.cmake -+++ b/Sources.cmake -@@ -84,6 +84,7 @@ target_sources(Luau.CodeGen PRIVATE - CodeGen/src/CodeBlockUnwind.cpp - CodeGen/src/CodeGen.cpp - CodeGen/src/CodeGenUtils.cpp -+ CodeGen/src/CodeGenA64.cpp - CodeGen/src/CodeGenX64.cpp - CodeGen/src/EmitBuiltinsX64.cpp - CodeGen/src/EmitCommonX64.cpp diff --git a/recipes/luau/all/patches/0.572-0001-fix-cmake.patch b/recipes/luau/all/patches/0.572-0001-fix-cmake.patch deleted file mode 100644 index 24acb8d334fb9..0000000000000 --- a/recipes/luau/all/patches/0.572-0001-fix-cmake.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6e15e5f..63be1e1 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -24,12 +24,12 @@ endif() - - project(Luau LANGUAGES CXX C) - add_library(Luau.Common INTERFACE) --add_library(Luau.Ast STATIC) --add_library(Luau.Compiler STATIC) --add_library(Luau.Analysis STATIC) --add_library(Luau.CodeGen STATIC) --add_library(Luau.VM STATIC) --add_library(isocline STATIC) -+add_library(Luau.Ast) -+add_library(Luau.Compiler) -+add_library(Luau.Analysis) -+add_library(Luau.CodeGen) -+add_library(Luau.VM) -+add_library(isocline) - - if(LUAU_BUILD_CLI) - add_executable(Luau.Repl.CLI) diff --git a/recipes/luau/config.yml b/recipes/luau/config.yml index da348c9822453..ce328e7495578 100644 --- a/recipes/luau/config.yml +++ b/recipes/luau/config.yml @@ -1,4 +1,6 @@ versions: + "0.593": + folder: all "0.589": folder: all "0.582": @@ -13,9 +15,3 @@ versions: folder: all "0.558": folder: all - "0.556": - folder: all - "0.552": - folder: all - "0.548": - folder: all From 3e931f9307ad58d37ff8340a69ed70bc9fcac083 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 4 Sep 2023 16:22:18 +0200 Subject: [PATCH 514/637] (#19523) [config] Conan v2 ready references is no longer required * Conan v2 ready references is no longer required Signed-off-by: Uilian Ries * Revert "Conan v2 ready references is no longer required" This reverts commit e9200c64730bedb150ec9a56ee1eb81f8191a634. * Remove regression validation Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries Co-authored-by: Daniel --- .c3i/config_v1.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.c3i/config_v1.yml b/.c3i/config_v1.yml index c28c0345e0824..bc6adc07ba370 100644 --- a/.c3i/config_v1.yml +++ b/.c3i/config_v1.yml @@ -41,7 +41,6 @@ tasks: - name: "license/cla" - name: "continuous-integration/jenkins/pr-merge" - name: "c3i/conan-v2/pr-merge" - required_for_references: "conan_v2_ready_references.yml" build_single_reference: package_id_cache_type: "none" timeout_minutes: 600 From 2b82a559fdbe0887d0c54808f5993b68ee56f5ed Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 4 Sep 2023 23:51:22 +0900 Subject: [PATCH 515/637] (#19274) zlib: add version 1.3, add patch_descriptions * zlib: add version 1.3 * remove patch file for xcode12 --- recipes/zlib/all/conandata.yml | 22 ++++- .../0002-gzguts-xcode12-compile-fix.patch | 27 ------ .../0003-gzguts-fix-widechar-condition.patch | 4 +- .../zlib/all/patches/1.3/0001-fix-cmake.patch | 92 +++++++++++++++++++ .../1.3/0002-gzguts-xcode12-compile-fix.patch | 15 +++ recipes/zlib/config.yml | 2 + 6 files changed, 129 insertions(+), 33 deletions(-) delete mode 100644 recipes/zlib/all/patches/1.2.x/0002-gzguts-xcode12-compile-fix.patch create mode 100644 recipes/zlib/all/patches/1.3/0001-fix-cmake.patch create mode 100644 recipes/zlib/all/patches/1.3/0002-gzguts-xcode12-compile-fix.patch diff --git a/recipes/zlib/all/conandata.yml b/recipes/zlib/all/conandata.yml index 4da75436b4d71..bcebfb9b13b6d 100644 --- a/recipes/zlib/all/conandata.yml +++ b/recipes/zlib/all/conandata.yml @@ -1,4 +1,9 @@ sources: + "1.3": + url: + - "https://zlib.net/fossils/zlib-1.3.tar.gz" + - "https://github.com/madler/zlib/releases/download/v1.3/zlib-1.3.tar.gz" + sha256: "ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e" "1.2.13": url: - "https://zlib.net/fossils/zlib-1.2.13.tar.gz" @@ -11,12 +16,18 @@ sources: url: "https://zlib.net/fossils/zlib-1.2.11.tar.gz" sha256: "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1" patches: + "1.3": + - patch_file: "patches/1.3/0001-fix-cmake.patch" + patch_description: "separate static/shared builds, disable debug suffix, disable building examples" + patch_type: "conan" "1.2.13": - patch_file: "patches/1.2.13/0001-Fix-cmake.patch" - - patch_file: "patches/1.2.x/0002-gzguts-xcode12-compile-fix.patch" + patch_description: "separate static/shared builds, disable debug suffix, disable building examples" + patch_type: "conan" "1.2.12": - patch_file: "patches/1.2.x/0001-fix-cmake.patch" - - patch_file: "patches/1.2.x/0002-gzguts-xcode12-compile-fix.patch" + patch_description: "separate static/shared builds, disable debug suffix, disable building examples" + patch_type: "conan" - patch_file: "patches/1.2.x/0004-Fix-a-bug-when-getting-a-gzip-header-extra-field-wit.patch" patch_description: "CVE-2022-37434: Fix a bug when getting a gzip header extra field with inflate()" patch_type: "vulnerability" @@ -29,6 +40,9 @@ patches: sha256: "cdd69eb3251728b1875c8ecae6427b50aa750b4045ef984ab79b6c07b7e6dd3a" "1.2.11": - patch_file: "patches/1.2.x/0001-fix-cmake.patch" - - patch_file: "patches/1.2.x/0002-gzguts-xcode12-compile-fix.patch" - # https://github.com/madler/zlib/issues/268 + patch_description: "separate static/shared builds, disable debug suffix, disable building examples" + patch_type: "conan" - patch_file: "patches/1.2.x/0003-gzguts-fix-widechar-condition.patch" + patch_description: "fix condition for WIDECHAR usage" + patch_type: "portability" + patch_source: "https://github.com/madler/zlib/issues/268" diff --git a/recipes/zlib/all/patches/1.2.x/0002-gzguts-xcode12-compile-fix.patch b/recipes/zlib/all/patches/1.2.x/0002-gzguts-xcode12-compile-fix.patch deleted file mode 100644 index 3f81a6f53a248..0000000000000 --- a/recipes/zlib/all/patches/1.2.x/0002-gzguts-xcode12-compile-fix.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 4ff188d490445fe7bad629a94d5bf4b641d4ab8d Mon Sep 17 00:00:00 2001 -From: Tim Blechmann -Date: Thu, 2 Jul 2020 12:04:38 +0800 -Subject: [PATCH] xcode12 compile fix - ---- - gzguts.h | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/gzguts.h b/gzguts.h -index 990a4d2..c78cb40 100644 ---- a/gzguts.h -+++ b/gzguts.h -@@ -26,6 +26,10 @@ - # include - #endif - -+#ifdef __APPLE__ -+#include -+#endif -+ - #ifndef _POSIX_SOURCE - # define _POSIX_SOURCE - #endif --- -2.27.0 - diff --git a/recipes/zlib/all/patches/1.2.x/0003-gzguts-fix-widechar-condition.patch b/recipes/zlib/all/patches/1.2.x/0003-gzguts-fix-widechar-condition.patch index 56b3fbe76ce8e..3de4978c30661 100644 --- a/recipes/zlib/all/patches/1.2.x/0003-gzguts-fix-widechar-condition.patch +++ b/recipes/zlib/all/patches/1.2.x/0003-gzguts-fix-widechar-condition.patch @@ -1,8 +1,8 @@ diff --git a/gzguts.h b/gzguts.h -index c78cb40..4e9ec4f 100644 +index 990a4d2..6378d46 100644 --- a/gzguts.h +++ b/gzguts.h -@@ -43,7 +43,7 @@ +@@ -39,7 +39,7 @@ # include #endif diff --git a/recipes/zlib/all/patches/1.3/0001-fix-cmake.patch b/recipes/zlib/all/patches/1.3/0001-fix-cmake.patch new file mode 100644 index 0000000000000..b2aa69d0684cf --- /dev/null +++ b/recipes/zlib/all/patches/1.3/0001-fix-cmake.patch @@ -0,0 +1,92 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7f1b69f..618ea02 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -57,7 +57,6 @@ endif() + check_include_file(unistd.h Z_HAVE_UNISTD_H) + + if(MSVC) +- set(CMAKE_DEBUG_POSTFIX "d") + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +@@ -120,7 +119,7 @@ set(ZLIB_SRCS + zutil.c + ) + +-if(NOT MINGW) ++if(MSVC) + set(ZLIB_DLL_SRCS + win32/zlib1.rc # If present will override custom build rule below. + ) +@@ -131,7 +130,7 @@ file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents) + string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*" + "\\1" ZLIB_FULL_VERSION ${_zlib_h_contents}) + +-if(MINGW) ++if(WIN32 AND NOT MSVC) + # This gets us DLL resource information when compiling on MinGW. + if(NOT CMAKE_RC_COMPILER) + set(CMAKE_RC_COMPILER windres.exe) +@@ -145,12 +144,16 @@ if(MINGW) + -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj + -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc) + set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) +-endif(MINGW) ++endif() + ++if(BUILD_SHARED_LIBS) + add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) + add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) + set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) + set_target_properties(zlib PROPERTIES SOVERSION 1) ++else() ++add_library(zlib STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) ++endif() + + if(NOT CYGWIN) + # This property causes shared libraries on Linux to have the full version +@@ -163,19 +166,24 @@ if(NOT CYGWIN) + set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION}) + endif() + +-if(UNIX) ++if(WIN32 AND NOT MINGW) ++ if(BUILD_SHARED_LIBS) ++ set_target_properties(zlib PROPERTIES ARCHIVE_OUTPUT_NAME zdll) ++ endif() ++else() + # On unix-like platforms the library is almost always called libz +- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) ++ set_target_properties(zlib PROPERTIES OUTPUT_NAME z) + if(NOT APPLE) + set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") + endif() +-elseif(BUILD_SHARED_LIBS AND WIN32) ++endif() ++if(BUILD_SHARED_LIBS AND WIN32) + # Creates zlib1.dll when building shared library version +- set_target_properties(zlib PROPERTIES SUFFIX "1.dll") ++ set_target_properties(zlib PROPERTIES PREFIX "" RUNTIME_OUTPUT_NAME "zlib1") + endif() + + if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) +- install(TARGETS zlib zlibstatic ++ install(TARGETS zlib + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ) +@@ -193,7 +201,7 @@ endif() + #============================================================================ + # Example binaries + #============================================================================ +- ++if(0) + add_executable(example test/example.c) + target_link_libraries(example zlib) + add_test(example example) +@@ -211,3 +219,4 @@ if(HAVE_OFF64_T) + target_link_libraries(minigzip64 zlib) + set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") + endif() ++endif() diff --git a/recipes/zlib/all/patches/1.3/0002-gzguts-xcode12-compile-fix.patch b/recipes/zlib/all/patches/1.3/0002-gzguts-xcode12-compile-fix.patch new file mode 100644 index 0000000000000..d299f4962fa59 --- /dev/null +++ b/recipes/zlib/all/patches/1.3/0002-gzguts-xcode12-compile-fix.patch @@ -0,0 +1,15 @@ +diff --git a/gzguts.h b/gzguts.h +index f937504..c4654b5 100644 +--- a/gzguts.h ++++ b/gzguts.h +@@ -25,6 +25,10 @@ + # include + #endif + ++#ifdef __APPLE__ ++#include ++#endif ++ + #ifndef _POSIX_SOURCE + # define _POSIX_SOURCE + #endif diff --git a/recipes/zlib/config.yml b/recipes/zlib/config.yml index 351c06f68201f..132003f7c53b5 100644 --- a/recipes/zlib/config.yml +++ b/recipes/zlib/config.yml @@ -1,4 +1,6 @@ versions: + "1.3": + folder: all "1.2.13": folder: all "1.2.12": From 6767d0248fbf27488a8d30fa3e547d9603227556 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 5 Sep 2023 13:10:37 +0900 Subject: [PATCH 516/637] (#19531) benchmark: add version 1.8.3 --- recipes/benchmark/all/conandata.yml | 3 +++ recipes/benchmark/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/benchmark/all/conandata.yml b/recipes/benchmark/all/conandata.yml index 91541bdc04e27..8a3c24a77b927 100644 --- a/recipes/benchmark/all/conandata.yml +++ b/recipes/benchmark/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.8.3": + url: "https://github.com/google/benchmark/archive/refs/tags/v1.8.3.tar.gz" + sha256: "6bc180a57d23d4d9515519f92b0c83d61b05b5bab188961f36ac7b06b0d9e9ce" "1.8.2": url: "https://github.com/google/benchmark/archive/refs/tags/v1.8.2.tar.gz" sha256: "2aab2980d0376137f969d92848fbb68216abb07633034534fc8c65cc4e7a0e93" diff --git a/recipes/benchmark/config.yml b/recipes/benchmark/config.yml index b76259067bc58..f3ed1f1e95743 100644 --- a/recipes/benchmark/config.yml +++ b/recipes/benchmark/config.yml @@ -1,4 +1,6 @@ versions: + "1.8.3": + folder: all "1.8.2": folder: all "1.8.1": From 5d928297d5ea3491713728af5b441c5a7bc49e2c Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 5 Sep 2023 16:53:21 +0900 Subject: [PATCH 517/637] (#19563) mpfr: add version 4.2.1, update dependenies --- recipes/mpfr/all/conandata.yml | 19 +++++++++++++------ recipes/mpfr/all/conanfile.py | 8 ++++---- recipes/mpfr/all/test_package/conanfile.py | 1 + recipes/mpfr/config.yml | 2 ++ 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/recipes/mpfr/all/conandata.yml b/recipes/mpfr/all/conandata.yml index 53fa206c24da1..bdecd0395c37d 100644 --- a/recipes/mpfr/all/conandata.yml +++ b/recipes/mpfr/all/conandata.yml @@ -1,14 +1,21 @@ sources: + "4.2.1": + url: "https://ftp.gnu.org/gnu/mpfr/mpfr-4.2.1.tar.gz" + sha256: "116715552bd966c85b417c424db1bbdf639f53836eb361549d1f8d6ded5cb4c6" "4.2.0": - sha256: f1cc1c6bb14d18f0c61cc416e083f5e697b6e0e3cf9630b9b33e8e483fc960f0 - url: https://ftp.gnu.org/gnu/mpfr/mpfr-4.2.0.tar.gz + url: "https://ftp.gnu.org/gnu/mpfr/mpfr-4.2.0.tar.gz" + sha256: "f1cc1c6bb14d18f0c61cc416e083f5e697b6e0e3cf9630b9b33e8e483fc960f0" "4.1.0": - sha256: 3127fe813218f3a1f0adf4e8899de23df33b4cf4b4b3831a5314f78e65ffa2d6 - url: https://ftp.gnu.org/gnu/mpfr/mpfr-4.1.0.tar.gz + url: "https://ftp.gnu.org/gnu/mpfr/mpfr-4.1.0.tar.gz" + sha256: "3127fe813218f3a1f0adf4e8899de23df33b4cf4b4b3831a5314f78e65ffa2d6" "4.0.2": - sha256: ae26cace63a498f07047a784cd3b0e4d010b44d2b193bab82af693de57a19a78 - url: https://ftp.gnu.org/gnu/mpfr/mpfr-4.0.2.tar.gz + url: "https://ftp.gnu.org/gnu/mpfr/mpfr-4.0.2.tar.gz" + sha256: "ae26cace63a498f07047a784cd3b0e4d010b44d2b193bab82af693de57a19a78" patches: + "4.2.1": + - patch_file: "patches/4.2.0-0002-windows-header-dll.patch" + patch_description: "Windows header DLL" + patch_type: "portability" "4.2.0": - patch_file: "patches/4.2.0-0002-windows-header-dll.patch" patch_description: "Windows header DLL" diff --git a/recipes/mpfr/all/conanfile.py b/recipes/mpfr/all/conanfile.py index 0356da09ec7fb..e163c514a2dea 100644 --- a/recipes/mpfr/all/conanfile.py +++ b/recipes/mpfr/all/conanfile.py @@ -17,13 +17,13 @@ class MpfrConan(ConanFile): name = "mpfr" - package_type = "library" description = "The MPFR library is a C library for multiple-precision floating-point computations with " \ "correct rounding" - topics = ("mpfr", "multiprecision", "math", "mathematics") + license = "LGPL-3.0-or-later" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.mpfr.org/" - license = "LGPL-3.0-or-later" + topics = ("multiprecision", "math", "mathematics") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -54,7 +54,7 @@ def configure(self): def requirements(self): if self.options.exact_int == "gmp": - self.requires("gmp/6.2.1", transitive_headers=True) + self.requires("gmp/6.3.0", transitive_headers=True) elif self.options.exact_int == "mpir": self.requires("mpir/3.0.0") diff --git a/recipes/mpfr/all/test_package/conanfile.py b/recipes/mpfr/all/test_package/conanfile.py index c56e8a6249e69..a63e741acf671 100644 --- a/recipes/mpfr/all/test_package/conanfile.py +++ b/recipes/mpfr/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def layout(self): cmake_layout(self) diff --git a/recipes/mpfr/config.yml b/recipes/mpfr/config.yml index 217c84a76cc94..f3d9d2b90378d 100644 --- a/recipes/mpfr/config.yml +++ b/recipes/mpfr/config.yml @@ -1,4 +1,6 @@ versions: + "4.2.1": + folder: all "4.2.0": folder: all "4.1.0": From a1a5972f3e9ece3ec748c4866508ff2138d48cce Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 5 Sep 2023 11:28:52 +0300 Subject: [PATCH 518/637] (#18765) llvm-openmp: migrate to Conan v2 * llvm-openmp: migrate to Conan v2 * llvm-openmp: export missing CFLAGS * llvm-openmp: restore VirtualRunEnv in test_package * llvm-openmp: fix test_v1_package --- recipes/llvm-openmp/all/CMakeLists.txt | 7 - recipes/llvm-openmp/all/conandata.yml | 7 - recipes/llvm-openmp/all/conanfile.py | 134 +++++++++--------- .../all/test_package/CMakeLists.txt | 14 +- .../llvm-openmp/all/test_package/conanfile.py | 22 ++- .../all/test_package/test_package.c | 25 ++++ .../all/test_package/test_package.cpp | 3 +- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../all/test_v1_package/conanfile.py | 18 +++ 9 files changed, 146 insertions(+), 92 deletions(-) delete mode 100644 recipes/llvm-openmp/all/CMakeLists.txt create mode 100644 recipes/llvm-openmp/all/test_package/test_package.c create mode 100644 recipes/llvm-openmp/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/llvm-openmp/all/test_v1_package/conanfile.py diff --git a/recipes/llvm-openmp/all/CMakeLists.txt b/recipes/llvm-openmp/all/CMakeLists.txt deleted file mode 100644 index 61f3d3b039e2b..0000000000000 --- a/recipes/llvm-openmp/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/llvm-openmp/all/conandata.yml b/recipes/llvm-openmp/all/conandata.yml index 499e8f40e5c34..eebc958f499eb 100644 --- a/recipes/llvm-openmp/all/conandata.yml +++ b/recipes/llvm-openmp/all/conandata.yml @@ -17,20 +17,13 @@ sources: patches: "12.0.1": - patch_file: "patches/0001-disable-build-testing_12.0.1.patch" - base_path: "source_subfolder" - patch_file: "patches/0002-disable-omp-target_12.0.1.patch" - base_path: "source_subfolder" "11.1.0": - patch_file: "patches/0001-disable-build-testing_11.1.0.patch" - base_path: "source_subfolder" - patch_file: "patches/0003-fix-armv8-build_11.1.0.patch" - base_path: "source_subfolder" "10.0.0": - patch_file: "patches/0001-disable-build-testing_10.0.0.patch" - base_path: "source_subfolder" "9.0.1": - patch_file: "patches/0001-disable-build-testing.patch" - base_path: "source_subfolder" "8.0.1": - patch_file: "patches/0001-disable-build-testing.patch" - base_path: "source_subfolder" diff --git a/recipes/llvm-openmp/all/conanfile.py b/recipes/llvm-openmp/all/conanfile.py index 4f1ee354a647e..11666c28d78a0 100644 --- a/recipes/llvm-openmp/all/conanfile.py +++ b/recipes/llvm-openmp/all/conanfile.py @@ -1,10 +1,14 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os -import functools import textwrap -required_conan_version = ">=1.43.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, replace_in_file, save +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" class LLVMOpenMpConan(ConanFile): @@ -16,81 +20,83 @@ class LLVMOpenMpConan(ConanFile): "in Fortran and C/C++ programs. This is the LLVM " "implementation.") license = "Apache-2.0 WITH LLVM-exception" - topics = ("conan", "llvm", "openmp", "parallelism") - homepage = "https://github.com/llvm/llvm-project/tree/master/openmp" url = "https://github.com/conan-io/conan-center-index" - settings = "os", "arch", "compiler", "build_type" - options = {"shared": [True, False], - "fPIC": [True, False]} - default_options = {"shared": False, - "fPIC": True} - generators = "cmake" + homepage = "https://github.com/llvm/llvm-project/tree/master/openmp" + topics = ("llvm", "openmp", "parallelism") - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def _supports_compiler(self): - supported_compilers_by_os = \ - {"Linux": ["clang", "gcc", "intel"], - "Macos": ["apple-clang", "clang", "gcc", "intel"], - "Windows": ["intel"]} + supported_compilers_by_os = { + "Linux": ["clang", "gcc", "intel-cc"], + "Macos": ["apple-clang", "clang", "gcc", "intel-cc"], + "Windows": ["intel-cc"], + } the_compiler, the_os = self.settings.compiler.value, self.settings.os.value return the_compiler in supported_compilers_by_os.get(the_os, []) def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") if not self._supports_compiler(): raise ConanInvalidConfiguration("llvm-openmp doesn't support compiler: {} on OS: {}.". format(self.settings.compiler, self.settings.os)) + + def layout(self): + cmake_layout(self, src_folder="src") + def validate(self): if ( - tools.Version(self.version) <= "10.0.0" - and self.settings.os == "Macos" + Version(self.version) <= "10.0.0" + and is_apple_os(self) and self.settings.arch == "armv8" ): raise ConanInvalidConfiguration("ARM v8 not supported") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = "openmp-{}.src".format(self.version) - os.rename(extracted_dir, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) + def generate(self): + tc = CMakeToolchain(self) + tc.variables["OPENMP_STANDALONE_BUILD"] = True + tc.variables["LIBOMP_ENABLE_SHARED"] = self.options.shared + if self.settings.os in ["Linux", "FreeBSD"]: + tc.variables["OPENMP_ENABLE_LIBOMPTARGET"] = self.options.shared + tc.generate() - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["OPENMP_STANDALONE_BUILD"] = True - cmake.definitions["LIBOMP_ENABLE_SHARED"] = self.options.shared - if self.settings.os == "Linux": - cmake.definitions["OPENMP_ENABLE_LIBOMPTARGET"] = self.options.shared - cmake.configure() - return cmake + def _patch_sources(self): + apply_conandata_patches(self) + replace_in_file(self,os.path.join(self.source_folder, "runtime", "CMakeLists.txt"), + "add_subdirectory(test)", "") def build(self): self._patch_sources() - tools.replace_in_file(os.path.join(self._source_subfolder, "runtime/CMakeLists.txt"), - "add_subdirectory(test)", "") - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy(pattern="LICENSE.txt", src=self._source_subfolder, dst="licenses") - cmake = self._configure_cmake() + copy(self, "LICENSE.txt", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() # TODO: to remove in conan v2 once cmake_find_package* generators removed @@ -98,44 +104,44 @@ def package(self): os.path.join(self.package_folder, self._module_file_rel_path), { "OpenMP::OpenMP_C": "OpenMP::OpenMP", - "OpenMP::OpenMP_CXX": "OpenMP::OpenMP" - } + "OpenMP::OpenMP_CXX": "OpenMP::OpenMP", + }, ) - @staticmethod - def _create_cmake_module_alias_targets(module_file, targets): + def _create_cmake_module_alias_targets(self, module_file, targets): content = "" for alias, aliased in targets.items(): - content += textwrap.dedent("""\ + content += textwrap.dedent(f"""\ if(TARGET {aliased} AND NOT TARGET {alias}) add_library({alias} INTERFACE IMPORTED) set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) endif() - """.format(alias=alias, aliased=aliased)) - tools.save(module_file, content) + """) + save(self, module_file, content) @property def _module_file_rel_path(self): - return os.path.join("lib", "cmake", "conan-official-{}-targets.cmake".format(self.name)) + return os.path.join("lib", "cmake", f"conan-official-{self.name}-targets.cmake") def package_info(self): self.cpp_info.set_property("cmake_file_name", "OpenMP") self.cpp_info.set_property("cmake_target_name", "OpenMP::OpenMP") self.cpp_info.set_property("cmake_target_aliases", ["OpenMP::OpenMP_C", "OpenMP::OpenMP_CXX"]) + if self.settings.compiler in ("clang", "apple-clang"): + self.cpp_info.cxxflags = ["-Xpreprocessor", "-fopenmp"] + elif self.settings.compiler == "gcc": + self.cpp_info.cxxflags = ["-fopenmp"] + elif self.settings.compiler == "intel-cc": + self.cpp_info.cxxflags = ["/Qopenmp"] if self.settings.os == "Windows" else ["-Qopenmp"] + self.cpp_info.cflags = self.cpp_info.cxxflags + self.cpp_info.libs = ["omp"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["dl", "m", "pthread", "rt"] + # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.names["cmake_find_package"] = "OpenMP" self.cpp_info.names["cmake_find_package_multi"] = "OpenMP" - self.cpp_info.builddirs.append(os.path.join(self.package_folder, 'lib', 'cmake')) + self.cpp_info.builddirs.append(os.path.join(self.package_folder, "lib", "cmake")) self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] - - if self.settings.compiler in ("clang", "apple-clang"): - self.cpp_info.cxxflags = ["-Xpreprocessor", "-fopenmp"] - elif self.settings.compiler == 'gcc': - self.cpp_info.cxxflags = ["-fopenmp"] - elif self.settings.compiler == 'intel': - self.cpp_info.cxxflags = ["/Qopenmp"] if self.settings.os == 'Windows' else ["-Qopenmp"] - self.cpp_info.libs = tools.collect_libs(self) - if self.settings.os == "Linux": - self.cpp_info.system_libs = ["dl", "m", "pthread", "rt"] diff --git a/recipes/llvm-openmp/all/test_package/CMakeLists.txt b/recipes/llvm-openmp/all/test_package/CMakeLists.txt index 2d9a8574cc4d4..491aa7ec1f5d3 100644 --- a/recipes/llvm-openmp/all/test_package/CMakeLists.txt +++ b/recipes/llvm-openmp/all/test_package/CMakeLists.txt @@ -1,10 +1,10 @@ -cmake_minimum_required(VERSION 3.1) -project(PackageTest CXX) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.15) +project(PackageTest CXX C) find_package(OpenMP CONFIG REQUIRED) -add_executable(test_package test_package.cpp) -target_link_libraries(test_package OpenMP::OpenMP_CXX) +add_executable(test_package_cxx test_package.cpp) +target_link_libraries(test_package_cxx OpenMP::OpenMP_CXX) + +add_executable(test_package_c test_package.c) +target_link_libraries(test_package_c OpenMP::OpenMP_C) diff --git a/recipes/llvm-openmp/all/test_package/conanfile.py b/recipes/llvm-openmp/all/test_package/conanfile.py index 5ac3af772bdc0..b9c17185d658e 100644 --- a/recipes/llvm-openmp/all/test_package/conanfile.py +++ b/recipes/llvm-openmp/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 LLVMOpenMpTestConan(ConanFile): +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,7 @@ 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): + for executable in ["test_package_cxx", "test_package_c"]: + bin_path = os.path.join(self.cpp.build.bindir, executable) + self.run(bin_path, env="conanrun") diff --git a/recipes/llvm-openmp/all/test_package/test_package.c b/recipes/llvm-openmp/all/test_package/test_package.c new file mode 100644 index 0000000000000..103d724f00fcd --- /dev/null +++ b/recipes/llvm-openmp/all/test_package/test_package.c @@ -0,0 +1,25 @@ +#include + +#include + +int main() +{ + int num_threads = omp_get_num_procs(); + if (num_threads < 5) + num_threads = 5; + omp_set_num_threads(num_threads); + int actual_number; + #pragma omp parallel + { + #pragma omp single + { + actual_number = omp_get_num_threads(); + } + } + if(actual_number != num_threads){ + printf("Something went wrong. Expecting %d threads but found %d.\n", num_threads, actual_number); + printf("There are probably missing compiler flags.\n"); + return 1; + } + return 0; +} diff --git a/recipes/llvm-openmp/all/test_package/test_package.cpp b/recipes/llvm-openmp/all/test_package/test_package.cpp index f6316471238aa..b602ec5a096c9 100644 --- a/recipes/llvm-openmp/all/test_package/test_package.cpp +++ b/recipes/llvm-openmp/all/test_package/test_package.cpp @@ -1,4 +1,5 @@ #include + #include int main() @@ -15,7 +16,7 @@ int main() } if(actual_number != num_threads){ std::cout << "Something went wrong. Expecting " << num_threads << " threads but found " << actual_number << ".\n"; - std::cout << "There are probably missing compiler flags.\n" ; + std::cout << "There are probably missing compiler flags.\n"; return 1; } return 0; diff --git a/recipes/llvm-openmp/all/test_v1_package/CMakeLists.txt b/recipes/llvm-openmp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/llvm-openmp/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/llvm-openmp/all/test_v1_package/conanfile.py b/recipes/llvm-openmp/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..b6e98e149af12 --- /dev/null +++ b/recipes/llvm-openmp/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +from conans import ConanFile, CMake, tools +import os + + +class LLVMOpenMpTestConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + for executable in ["test_package_cxx", "test_package_c"]: + bin_path = os.path.join("bin", executable) + self.run(bin_path, run_environment=True) From 1a4f91c08e57a891c1a604b2afbd68740397634d Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 5 Sep 2023 18:11:21 +0900 Subject: [PATCH 519/637] (#19577) csvmonkey: update boost/1.83.0, add package_type --- recipes/csvmonkey/all/conanfile.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/csvmonkey/all/conanfile.py b/recipes/csvmonkey/all/conanfile.py index 49542ed86e55c..821a19ed46096 100644 --- a/recipes/csvmonkey/all/conanfile.py +++ b/recipes/csvmonkey/all/conanfile.py @@ -14,7 +14,8 @@ class CSVMONEKYConan(ConanFile): license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/dw/csvmonkey/" - topics = ("csv-parser", "header-only", "vectorized") + topics = ("csv-parser", "header-only", "vectorized", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" options = { "with_spirit": [True, False], @@ -33,7 +34,7 @@ def layout(self): def requirements(self): if self.options.with_spirit: - self.requires("boost/1.81.0") + self.requires("boost/1.83.0") def package_id(self): self.info.clear() From a75c478ec82baa8f264eee9376a856177e96706b Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Tue, 5 Sep 2023 11:42:29 +0200 Subject: [PATCH 520/637] (#19594) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 2c10e53b02cca..5cf53d60ba1e6 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -276,6 +276,7 @@ required_for_references: - egl-headers - eigen - elfio +- embag - embree3 - emio - emsdk From 3d1b277af3d27a68813f4c2243bb152ecefe09b0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 12:03:10 +0200 Subject: [PATCH 521/637] (#19561) [docs] Regenerate tables of contents Co-authored-by: conan-center-bot --- docs/developing_recipes_locally.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/developing_recipes_locally.md b/docs/developing_recipes_locally.md index 9c54954e8a98d..f80ba1e6286cb 100644 --- a/docs/developing_recipes_locally.md +++ b/docs/developing_recipes_locally.md @@ -22,6 +22,7 @@ This file is intended to provide all the commands you need to run in order to be * [Yamlschema](#yamlschema) * [Testing the different `test__package`](#testing-the-different-test__package) * [Testing more environments](#testing-more-environments) + * [Docker build images used by ConanCenterIndex](#docker-build-images-used-by-conancenterindex) * [Using Conan 2.0](#using-conan-20) * [Installing Conan 2.0 beta](#installing-conan-20-beta) * [Trying it out](#trying-it-out) From ae63c81bc9f773dd84cd55e7c6f86faa06e679d7 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 5 Sep 2023 12:22:37 +0200 Subject: [PATCH 522/637] (#19597) [changelog] Add changelog 31-August-2023 --- docs/changelog.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 8eadac2df6139..1511b584ab7db 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -2,22 +2,30 @@ ### 01-Sep-2023 - 19:58 CEST -- [fix] Use Unix separators for Windows folder path when creating CI workspace +- [fix] Use Unix separators for Windows folder path when creating CI workspace. -### 17-Aug-2023 - 11:42 CEST +### 31-August-2023 - 12:57 CEST + +- [feature] Support specific PR number for Automatic Merge. +- [feature] Use temporary folder for build workspace. +- [fix] Rename BuildSingleReference folder to bsr to overcome Windows long path. +- [fix] Remove graph info from logs to avoid long loading. +- [fix] Remove deprecated search index for Conan Center. + +### 17-August-2023 - 11:42 CEST - [fix] Fix type error when catching generic exceptions in Jenkins - [fix] Bump dependencies no longer allow version range - [feature] Show recipe revision on the pull-request summary table -### 04-Aug-2023 - 10:26 CEST +### 04-August-2023 - 10:26 CEST - [feature] Enable Conan 2.0.8 - [feature] Enable Conan 1.60.2 - [feature] Update Jenkins server version - [hotfix] Better error management when having CI build timeout -### 19-Jul-2023 - 09:45 CEST +### 19-July-2023 - 09:45 CEST - [fix] Fix message processing if no message is passed. - [fix] Fix automatic merge priority to follow the correct PR order. From cca52d3da5d991bb3253b9adad43b05b8bfab287 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 5 Sep 2023 15:29:55 +0300 Subject: [PATCH 523/637] (#18751) uchardet: migrate to Conan v2 * uchardet: migrate to Conan v2 * uchardet: add fix_apple_shared_install_name() * uchardet: move DLLs from lib to bin * uchardet: restore VirtualRunEnv in test_package --- recipes/uchardet/all/CMakeLists.txt | 7 -- recipes/uchardet/all/conanfile.py | 103 ++++++++++-------- .../uchardet/all/test_package/CMakeLists.txt | 6 +- .../uchardet/all/test_package/conanfile.py | 19 +++- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../uchardet/all/test_v1_package/conanfile.py | 17 +++ 6 files changed, 96 insertions(+), 64 deletions(-) delete mode 100644 recipes/uchardet/all/CMakeLists.txt create mode 100644 recipes/uchardet/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/uchardet/all/test_v1_package/conanfile.py diff --git a/recipes/uchardet/all/CMakeLists.txt b/recipes/uchardet/all/CMakeLists.txt deleted file mode 100644 index a17cdee90b035..0000000000000 --- a/recipes/uchardet/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12) -project(cmake_wrapper) - -include("conanbuildinfo.cmake") -conan_basic_setup(KEEP_RPATH) - -add_subdirectory("source_subfolder") diff --git a/recipes/uchardet/all/conanfile.py b/recipes/uchardet/all/conanfile.py index bb92e982496c4..6163692ad75f8 100644 --- a/recipes/uchardet/all/conanfile.py +++ b/recipes/uchardet/all/conanfile.py @@ -1,18 +1,27 @@ -from conans import ConanFile, CMake, tools import os -import functools -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, replace_in_file, rmdir, rename + +required_conan_version = ">=1.53.0" class UchardetConan(ConanFile): name = "uchardet" + description = ( + "uchardet is an encoding detector library, which takes a " + "sequence of bytes in an unknown character encoding and " + "attempts to determine the encoding of the text. " + "Returned encoding names are iconv-compatible." + ) + license = "MPL-1.1" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/freedesktop/uchardet" - description = "uchardet is an encoding detector library, which takes a sequence of bytes in an unknown character encoding and attempts to determine the encoding of the text. Returned encoding names are iconv-compatible." - topics = "encoding", "detector" - license = "MPL-1.1" + topics = ("encoding", "detector") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -25,79 +34,77 @@ class UchardetConan(ConanFile): "check_sse2": True, } - exports_sources = ["CMakeLists.txt"] - generators = "cmake", "cmake_find_package" - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - @property def _settings_build(self): return getattr(self, "settings_build", self.settings) def config_options(self): if self._settings_build not in ("x86", "x86_64"): - del self.options.check_sse2 + self.options.rm_safe("check_sse2") 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 source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CHECK_SSE2"] = self.options.get_safe("check_sse2", False) + tc.variables["BUILD_BINARY"] = False + tc.variables["BUILD_STATIC"] = not self.options.shared + tc.generate() def _patch_sources(self): # the following fixes that apply to uchardet version 0.0.7 # fix broken cmake - tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), + replace_in_file( + self, + os.path.join(self.source_folder, "CMakeLists.txt"), "${CMAKE_BINARY_DIR}", - "${CMAKE_CURRENT_BINARY_DIR}") + "${CMAKE_CURRENT_BINARY_DIR}", + ) # fix problem with mac os - tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), - 'string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} TARGET_ARCHITECTURE)', - 'string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" TARGET_ARCHITECTURE)') + replace_in_file( + self, + os.path.join(self.source_folder, "CMakeLists.txt"), + "string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} TARGET_ARCHITECTURE)", + 'string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" TARGET_ARCHITECTURE)', + ) # disable building tests - tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), + replace_in_file( + self, + os.path.join(self.source_folder, "CMakeLists.txt"), "add_subdirectory(test)", - "#add_subdirectory(test)") - - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["CHECK_SSE2"] = self.options.get_safe("check_sse2", False) - cmake.definitions["BUILD_BINARY"] = False - cmake.definitions["BUILD_STATIC"] = False # disable building static libraries when self.options.shared is True - cmake.configure(build_folder=self._build_subfolder) - return cmake + "#add_subdirectory(test)", + ) def build(self): self._patch_sources() - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("COPYING", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "COPYING", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.rmdir(os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + fix_apple_shared_install_name(self) + for dll in (self.package_path / "lib").glob("*.dll"): + rename(self, dll, self.package_path / "bin" / dll.name) def package_info(self): - self.cpp_info.set_property("cmake_file_name", "uchardet") - self.cpp_info.set_property("cmake_target_name", "uchardet") self.cpp_info.set_property("pkg_config_name", "libuchardet") - - self.cpp_info.names["cmake_find_package"] = "uchardet" - self.cpp_info.names["cmake_find_package_multi"] = "uchardet" - self.cpp_info.names["pkgconfig"] = "libuchardet" self.cpp_info.libs = ["uchardet"] if self.options.shared: self.cpp_info.defines.append("UCHARDET_SHARED") diff --git a/recipes/uchardet/all/test_package/CMakeLists.txt b/recipes/uchardet/all/test_package/CMakeLists.txt index a726e6f66a3bd..6dbcda3f32f3c 100644 --- a/recipes/uchardet/all/test_package/CMakeLists.txt +++ b/recipes/uchardet/all/test_package/CMakeLists.txt @@ -1,12 +1,10 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) + set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(uchardet REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/uchardet/all/test_package/conanfile.py b/recipes/uchardet/all/test_package/conanfile.py index 38f4483872d47..ef5d7042163ec 100644 --- a/recipes/uchardet/all/test_package/conanfile.py +++ b/recipes/uchardet/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/uchardet/all/test_v1_package/CMakeLists.txt b/recipes/uchardet/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/uchardet/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/uchardet/all/test_v1_package/conanfile.py b/recipes/uchardet/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..38f4483872d47 --- /dev/null +++ b/recipes/uchardet/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 3d711235cc40263dcbc41b32857aa686a88b54f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Tue, 5 Sep 2023 17:42:37 +0200 Subject: [PATCH 524/637] (#19588) [docs] Add `zlib` and `libcurl` to the list of allowed version ranges * Add zlib and sqlite3 to the list of allowed verison ranges * Sqlite3 -> libcurl * Swap 2.1 for 1.2, oops --- docs/adding_packages/dependencies.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/adding_packages/dependencies.md b/docs/adding_packages/dependencies.md index a45c6c0f3c31c..c421b0a9d9f67 100644 --- a/docs/adding_packages/dependencies.md +++ b/docs/adding_packages/dependencies.md @@ -174,15 +174,18 @@ for consumer, we do impose some limits on Conan features to provide a smoother f * [`python_requires`](https://docs.conan.io/1/reference/conanfile/other.html#python-requires) are not allowed. ### Version Ranges - + Version ranges are a useful Conan feature, [documentation here](https://docs.conan.io/2/tutorial/versioning/version_ranges.html). With the introduction of Conan 2.0, we are currently working to allow the use of version ranges and are allowing this for a handful of dependencies. Currently, these are: * OpenSSL: `[>=1.1 <4]` for libraries known to be compatible with OpenSSL 1.x and 3.x -* CMake: `[>3.XX <4]`, where `3.XX` is the minimum version of CMake required by the relevant build scripts. +* CMake: `[>3.XX <4]`, where `3.XX` is the minimum version of CMake required by the relevant build scripts +* Zlib: `[>=1.X.Y <2]`, where `1.X.Y` is the minimum version of Zlib required, starting from `1.2.10` +* Libcurl: `[>=X.YY <9]`, where `X.YY` is the minimum version of Libcurl required, starting from `7.78` + -> **Warning**: With Conan 1.x, [version ranges](https://docs.conan.io/1/versioning/version_ranges.html) adhere to a much more strict sematic version spec, +> **Warning**: With Conan 1.x, [version ranges](https://docs.conan.io/1/versioning/version_ranges.html) adhere to a much more strict sematic version spec, > OpenSSL 1.1.x does not follow this so the client will not resolve to that range and will pick a 3.x version. In order to select a lower version you > can user the defunct `--require-override openssl/1.1.1t@` from the command line, or override from the recipe with `self.requires(openssl/1.1.1t, override=True)` > to ensure a lower version is picked. From 697552e8c3b2e5de83cab85cb83a03005d41886d Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Wed, 6 Sep 2023 09:42:41 +0200 Subject: [PATCH 525/637] (#19585) [bot] Update authorized users list (2023-09-04) --- .c3i/authorized_users.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 40eb28806b2ca..56fdf9df94977 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1222,3 +1222,7 @@ authorized_users: - XVilka - DoomHammer - cschreib +- AleksandraVolosevich-TomTom +- p-groarke +- Kalixio +- temap From 226788690ace823b25b1c4581f5e95d9cc116d59 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 6 Sep 2023 17:14:03 +0900 Subject: [PATCH 526/637] (#19541) glaze: add version 1.4.1 * glaze: add version 1.4.1 * support LICENCE file name modification * use wildcard on copying license file Co-authored-by: Uilian Ries --------- Co-authored-by: Uilian Ries --- recipes/glaze/all/conandata.yml | 3 +++ recipes/glaze/all/conanfile.py | 2 +- recipes/glaze/config.yml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index 31bad0f747ccc..98ea7dc8d1150 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.1": + url: "https://github.com/stephenberry/glaze/archive/v1.4.1.tar.gz" + sha256: "fae4188004d383f79225db26e41060aaae9a3eff92da7637aa467749e9590ee6" "1.4.0": url: "https://github.com/stephenberry/glaze/archive/v1.4.0.tar.gz" sha256: "301c831e2476529bfa1ea24d87011186da91644830bdf57e1ed99bc7f6326989" diff --git a/recipes/glaze/all/conanfile.py b/recipes/glaze/all/conanfile.py index 7d6155afba73c..e7b18eb1c3589 100644 --- a/recipes/glaze/all/conanfile.py +++ b/recipes/glaze/all/conanfile.py @@ -53,7 +53,7 @@ def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, pattern="LICENSE*", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy( self, pattern="*.hpp", diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index c479b0a04fbd0..73f9b337cba86 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.1": + folder: all "1.4.0": folder: all "1.3.6": From baef5725b50e3bc7fbab413416f19ceffa381dd4 Mon Sep 17 00:00:00 2001 From: xyz1001 Date: Wed, 6 Sep 2023 16:51:31 +0800 Subject: [PATCH 527/637] (#19583) fix TRACY_ONLY_IPV4 not work and add new option * fix TRACY_ONLY_IPV4 not work * tracy: add new option for version greater than 0.9 --- recipes/tracy/all/conanfile.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/recipes/tracy/all/conanfile.py b/recipes/tracy/all/conanfile.py index bdb852b534295..a056814ff0165 100644 --- a/recipes/tracy/all/conanfile.py +++ b/recipes/tracy/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import copy, get, rmdir +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -25,7 +26,7 @@ class TracyConan(ConanFile): "no_callstack_inlines": ([True, False], False), "only_localhost": ([True, False], False), "no_broadcast": ([True, False], False), - "only_ipv": ([True, False], False), + "only_ipv4": ([True, False], False), "no_code_transfer": ([True, False], False), "no_context_switch": ([True, False], False), "no_exit": ([True, False], False), @@ -35,6 +36,10 @@ class TracyConan(ConanFile): "no_frame_image": ([True, False], False), "no_system_tracing": ([True, False], False), "delayed_init": ([True, False], False), + "manual_lifetime": ([True, False], False), + "fibers": ([True, False], False), + "no_crash_handler": ([True, False], False), + "timer_fallback": ([True, False], False), } options = { "shared": [True, False], @@ -51,6 +56,17 @@ def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "0.9": + self.options.rm_safe("manual_lifetime") + self.options.rm_safe("fibers") + self.options.rm_safe("no_crash_handler") + self.options.rm_safe("timer_fallback") + + del self._tracy_options["manual_lifetime"] + del self._tracy_options["fibers"] + del self._tracy_options["no_crash_handler"] + del self._tracy_options["timer_fallback"] + def configure(self): if self.options.shared: self.options.rm_safe("fPIC") From 87aa601c9f69609c171b8e292e1ff4510044b2ae Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Wed, 6 Sep 2023 11:22:24 +0200 Subject: [PATCH 528/637] (#19613) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 5cf53d60ba1e6..7491fb37d05f1 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -668,6 +668,7 @@ required_for_references: - linux-syscall-support - litehtml - llhttp +- llvm-openmp - lmdb - lodepng - log.c @@ -1115,6 +1116,7 @@ required_for_references: - type_safe - tz - ua-nodeset +- uchardet - uni-algo - unicorn - unity From 8b49cbc1ff3983ea12e0d8aa29964e94c0fafbd7 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 6 Sep 2023 18:54:22 +0900 Subject: [PATCH 529/637] (#19587) libnghttp2: add version 1.56.0, update boost/1.83.0, remove older versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * libnghttp2: add version 1.56.0, update boost/1.83.0 * remove older versions --------- Co-authored-by: Rubén Rincón Blanco --- recipes/libnghttp2/all/conandata.yml | 15 +++------------ recipes/libnghttp2/all/conanfile.py | 8 +++----- recipes/libnghttp2/config.yml | 6 ++---- 3 files changed, 8 insertions(+), 21 deletions(-) diff --git a/recipes/libnghttp2/all/conandata.yml b/recipes/libnghttp2/all/conandata.yml index 16a85daa58280..241b93e58b1d3 100644 --- a/recipes/libnghttp2/all/conandata.yml +++ b/recipes/libnghttp2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.56.0": + url: "https://github.com/nghttp2/nghttp2/archive/v1.56.0.tar.gz" + sha256: "63dd705b524eec3c843b8e4e24914600a30c2804a113e8e5baeeb9695d09590a" "1.55.1": url: "https://github.com/nghttp2/nghttp2/archive/v1.55.1.tar.gz" sha256: "b89dece5bc3382b82c22db8dc8d1e062258cb7af8e4ad55278fa7149645a588d" @@ -23,12 +26,6 @@ sources: "1.48.0": url: "https://github.com/nghttp2/nghttp2/releases/download/v1.48.0/nghttp2-1.48.0.tar.xz" sha256: "47d8f30ee4f1bc621566d10362ca1b3ac83a335c63da7144947c806772d016e4" - "1.47.0": - url: "https://github.com/nghttp2/nghttp2/releases/download/v1.47.0/nghttp2-1.47.0.tar.xz" - sha256: "68271951324554c34501b85190f22f2221056db69f493afc3bbac8e7be21e7cc" - "1.46.0": - url: "https://github.com/nghttp2/nghttp2/releases/download/v1.46.0/nghttp2-1.46.0.tar.xz" - sha256: "1a68cc4a5732afb735baf50aaac3cb3a6771e49f744bd5db6c49ab5042f12a43" patches: "1.49.0": - patch_file: "patches/fix-findJemalloc.cmake" @@ -36,9 +33,3 @@ patches: "1.48.0": - patch_file: "patches/fix-findJemalloc.cmake" - patch_file: "patches/fix-findLibevent.cmake" - "1.47.0": - - patch_file: "patches/fix-findJemalloc.cmake" - - patch_file: "patches/fix-findLibevent.cmake" - "1.46.0": - - patch_file: "patches/fix-findJemalloc.cmake" - - patch_file: "patches/fix-findLibevent.cmake" diff --git a/recipes/libnghttp2/all/conanfile.py b/recipes/libnghttp2/all/conanfile.py index b7976951f311e..00a7398f66246 100644 --- a/recipes/libnghttp2/all/conanfile.py +++ b/recipes/libnghttp2/all/conanfile.py @@ -15,10 +15,10 @@ class Nghttp2Conan(ConanFile): name = "libnghttp2" description = "HTTP/2 C Library and tools" - topics = ("http", "http2") + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://nghttp2.org" - license = "MIT" + topics = ("http", "http2") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -73,7 +73,7 @@ def requirements(self): if self.options.with_hpack: self.requires("jansson/2.14") if self.options.get_safe("with_asio"): - self.requires("boost/1.82.0") + self.requires("boost/1.83.0") def validate(self): if self.options.get_safe("with_asio") and is_msvc(self): @@ -97,8 +97,6 @@ def generate(self): # disable unneeded auto-picked dependencies tc.variables["WITH_LIBXML2"] = False tc.variables["WITH_JEMALLOC"] = self.options.get_safe("with_jemalloc", False) - if Version(self.version) < "1.47.0": - tc.variables["WITH_SPDYLAY"] = False if Version(self.version) < "1.52.0": tc.variables["ENABLE_ASIO_LIB"] = self.options.with_asio if is_apple_os(self): diff --git a/recipes/libnghttp2/config.yml b/recipes/libnghttp2/config.yml index 80c7ccd82ad1f..1bcc72d765fd2 100644 --- a/recipes/libnghttp2/config.yml +++ b/recipes/libnghttp2/config.yml @@ -1,4 +1,6 @@ versions: + "1.56.0": + folder: all "1.55.1": folder: all "1.55.0": @@ -15,7 +17,3 @@ versions: folder: all "1.48.0": folder: all - "1.47.0": - folder: all - "1.46.0": - folder: all From 4abe94c7417ecf564bf673ef63867581d9b04aef Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 6 Sep 2023 19:53:33 +0900 Subject: [PATCH 530/637] (#19590) dacap-clip: add version 1.6, add package_type --- recipes/dacap-clip/all/conandata.yml | 3 +++ recipes/dacap-clip/all/conanfile.py | 17 ++++++++--------- .../dacap-clip/all/test_package/CMakeLists.txt | 4 ++-- recipes/dacap-clip/config.yml | 2 ++ 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/recipes/dacap-clip/all/conandata.yml b/recipes/dacap-clip/all/conandata.yml index daa1ee060995e..19103af57600d 100644 --- a/recipes/dacap-clip/all/conandata.yml +++ b/recipes/dacap-clip/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.6": + url: "https://github.com/dacap/clip/archive/refs/tags/v1.6.tar.gz" + sha256: "fc37319775ec1b6a75475b46696f5014418d90676359b96b894f646241dcbb7e" "1.5": url: "https://github.com/dacap/clip/archive/refs/tags/v1.5.tar.gz" sha256: "8f6f8a427075a09011fafbb75bfdbf1213e4492a13cff4a70975aab361c99382" diff --git a/recipes/dacap-clip/all/conanfile.py b/recipes/dacap-clip/all/conanfile.py index e2bd672a9b3d1..c4021d403c55f 100644 --- a/recipes/dacap-clip/all/conanfile.py +++ b/recipes/dacap-clip/all/conanfile.py @@ -8,7 +8,7 @@ from conan.tools.apple import is_apple_os from conan.tools.build import check_min_cppstd -required_conan_version = ">=1.51.3" +required_conan_version = ">=1.53.0" class DacapClipConan(ConanFile): name = "dacap-clip" @@ -17,6 +17,7 @@ class DacapClipConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/dacap/clip/" topics = ("clipboard", "copy", "paste") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -29,8 +30,9 @@ class DacapClipConan(ConanFile): "with_png": True, } - def export_sources(self): - copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) + @property + def _min_cppstd(self): + return 11 def config_options(self): if self.settings.os == "Windows": @@ -38,10 +40,7 @@ def config_options(self): def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") if self.settings.os not in ["Linux", "FreeBSD"]: del self.options.with_png @@ -56,12 +55,12 @@ def requirements(self): def validate(self): if self.info.settings.compiler.cppstd: - check_min_cppstd(self, 11) + check_min_cppstd(self, self._min_cppstd) if is_msvc(self) and self.info.settings.build_type == "Debug" and self.info.options.shared == True: raise ConanInvalidConfiguration(f"{self.ref} doesn't support MSVC debug shared build (now).") def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True, destination=self.source_folder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): toolchain = CMakeToolchain(self) diff --git a/recipes/dacap-clip/all/test_package/CMakeLists.txt b/recipes/dacap-clip/all/test_package/CMakeLists.txt index 63e11b22a301b..3913723472269 100644 --- a/recipes/dacap-clip/all/test_package/CMakeLists.txt +++ b/recipes/dacap-clip/all/test_package/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.8) -project(test_package CXX) +project(test_package LANGUAGES CXX) find_package(clip REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} clip::clip) +target_link_libraries(${PROJECT_NAME} PRIVATE clip::clip) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/dacap-clip/config.yml b/recipes/dacap-clip/config.yml index 84f49b2850870..68f5d1fe1295a 100644 --- a/recipes/dacap-clip/config.yml +++ b/recipes/dacap-clip/config.yml @@ -1,3 +1,5 @@ versions: + "1.6": + folder: "all" "1.5": folder: "all" From 7e6490b82ccd324d4856c8ca617dbc151436ca3c Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 6 Sep 2023 20:31:22 +0900 Subject: [PATCH 531/637] (#19595) libtins: add version 4.5, update boost --- recipes/libtins/all/conandata.yml | 3 +++ recipes/libtins/all/conanfile.py | 4 ++-- recipes/libtins/all/test_package/CMakeLists.txt | 2 +- recipes/libtins/config.yml | 2 ++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/recipes/libtins/all/conandata.yml b/recipes/libtins/all/conandata.yml index d565c818eeabe..ee42178c90b26 100644 --- a/recipes/libtins/all/conandata.yml +++ b/recipes/libtins/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.5": + url: "https://github.com/mfontanini/libtins/archive/v4.5.tar.gz" + sha256: "6ff5fe1ada10daef8538743dccb9c9b3e19d05d028ffdc24838e62ff3fc55841" "4.4": url: "https://github.com/mfontanini/libtins/archive/v4.4.tar.gz" sha256: "ff0121b4ec070407e29720c801b7e1a972042300d37560a62c57abadc9635634" diff --git a/recipes/libtins/all/conanfile.py b/recipes/libtins/all/conanfile.py index 7bca8b98f2ebb..d5656f7267688 100644 --- a/recipes/libtins/all/conanfile.py +++ b/recipes/libtins/all/conanfile.py @@ -3,7 +3,7 @@ from conan import ConanFile from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, replace_in_file, rm, rmdir +from conan.tools.files import copy, get, rm, rmdir required_conan_version = ">=1.53.0" @@ -63,7 +63,7 @@ def requirements(self): # Used in two public headers: # - https://github.com/mfontanini/libtins/blob/v4.4/include/tins/tcp_ip/ack_tracker.h#L38 # - https://github.com/mfontanini/libtins/blob/v4.4/include/tins/tcp_ip/stream.h#L48 - self.requires("boost/1.81.0", transitive_headers=True) + self.requires("boost/1.83.0", transitive_headers=True) if self.options.with_wpa2: self.requires("openssl/[>=1.1 <4]") diff --git a/recipes/libtins/all/test_package/CMakeLists.txt b/recipes/libtins/all/test_package/CMakeLists.txt index 94a84063fcb9f..9df74f0fcf532 100644 --- a/recipes/libtins/all/test_package/CMakeLists.txt +++ b/recipes/libtins/all/test_package/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.15) -project(test_package CXX) +project(test_package LANGUAGES CXX) find_package(libtins REQUIRED CONFIG) diff --git a/recipes/libtins/config.yml b/recipes/libtins/config.yml index ce55c187fafe1..a962f30c14fe9 100644 --- a/recipes/libtins/config.yml +++ b/recipes/libtins/config.yml @@ -1,4 +1,6 @@ versions: + "4.5": + folder: all "4.4": folder: all "4.3": From a558cc01d606fbdcc89d6a80c49463cead05cd82 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 6 Sep 2023 15:06:07 +0300 Subject: [PATCH 532/637] (#18196) avahi: add package_type, set cmake_target_name, pkg_config_name * avahi: add package_type, set cmake_target_name, pkg_config_name * avahi: restore test_v1_package * avahi: bump deps * avahi: remove redundant cmake_target_name for components * avahi: improve os detection * avahi: bump deps * fix conan 2 --------- Co-authored-by: ericLemanissier --- recipes/avahi/all/conanfile.py | 46 ++++++++++--------- recipes/avahi/all/test_package/CMakeLists.txt | 2 +- .../avahi/all/test_v1_package/CMakeLists.txt | 2 +- 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/recipes/avahi/all/conanfile.py b/recipes/avahi/all/conanfile.py index 828f628b5ac41..a5da3d9b034e3 100644 --- a/recipes/avahi/all/conanfile.py +++ b/recipes/avahi/all/conanfile.py @@ -1,7 +1,8 @@ import os from conan import ConanFile -from conan.tools.env import Environment, VirtualBuildEnv +from conan.tools.build import can_run +from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv from conan.tools.files import copy, get, rmdir, rm from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain, PkgConfigDeps from conan.tools.layout import basic_layout @@ -19,42 +20,43 @@ class AvahiConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/lathiat/avahi" license = "LGPL-2.1-only" - settings = "os", "arch", "compiler", "build_type" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], - "fPIC": [True, False] + "fPIC": [True, False], } default_options = { "shared": False, - "fPIC": True + "fPIC": True, } + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("glib/2.75.2") + self.requires("glib/2.77.1") self.requires("expat/2.5.0") self.requires("libdaemon/0.14") - self.requires("dbus/1.15.2") - self.requires("gdbm/1.19") + self.requires("dbus/1.15.6") + self.requires("gdbm/1.23") self.requires("libevent/2.1.12") - def build_requirements(self): - self.tool_requires("glib/2.75.2") - if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/1.9.3") - def validate(self): - if self.settings.os != "Linux": + if self.settings.os not in ["Linux", "FreeBSD"]: raise ConanInvalidConfiguration(f"{self.ref} only supports Linux.") - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - self.settings.rm_safe("compiler.cppstd") - self.settings.rm_safe("compiler.libcxx") + def build_requirements(self): + self.tool_requires("glib/") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/1.9.5") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -62,6 +64,8 @@ def source(self): def generate(self): virtual_build_env = VirtualBuildEnv(self) virtual_build_env.generate() + if can_run(self): + VirtualRunEnv(self).generate(scope="build") tc = AutotoolsToolchain(self) tc.configure_args.append("--enable-compat-libdns_sd") tc.configure_args.append("--disable-gtk3") @@ -70,7 +74,7 @@ def generate(self): tc.configure_args.append("--disable-python") tc.configure_args.append("--disable-qt5") tc.configure_args.append("--with-systemdsystemunitdir=/lib/systemd/system") - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: tc.configure_args.append("ac_cv_func_setproctitle=no") tc.generate() AutotoolsDeps(self).generate() @@ -98,9 +102,9 @@ def package(self): def package_info(self): for lib in ("client", "common", "core", "glib", "gobject", "libevent", "compat-libdns_sd"): avahi_lib = f"avahi-{lib}" + self.cpp_info.components[lib].set_property("pkg_config_name", avahi_lib) self.cpp_info.components[lib].names["cmake_find_package"] = lib self.cpp_info.components[lib].names["cmake_find_package_multi"] = lib - self.cpp_info.components[lib].names["pkg_config"] = avahi_lib self.cpp_info.components[lib].libs = [avahi_lib] self.cpp_info.components[lib].includedirs = [os.path.join("include", avahi_lib)] self.cpp_info.components["compat-libdns_sd"].libs = ["dns_sd"] @@ -115,9 +119,9 @@ def package_info(self): for app in ("autoipd", "browse", "daemon", "dnsconfd", "publish", "resolve", "set-host-name"): avahi_app = f"avahi-{app}" + self.cpp_info.components[app].set_property("pkg_config_name", avahi_app) self.cpp_info.components[app].names["cmake_find_package"] = app self.cpp_info.components[app].names["cmake_find_package_multi"] = app - self.cpp_info.components[app].names["pkg_config"] = avahi_app self.cpp_info.components["autoipd"].requires = ["libdaemon::libdaemon"] self.cpp_info.components["browse"].requires = ["client", "gdbm::gdbm"] diff --git a/recipes/avahi/all/test_package/CMakeLists.txt b/recipes/avahi/all/test_package/CMakeLists.txt index fce015c3405a9..a844c8e02eaa3 100644 --- a/recipes/avahi/all/test_package/CMakeLists.txt +++ b/recipes/avahi/all/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES C) find_package(Avahi CONFIG REQUIRED) diff --git a/recipes/avahi/all/test_v1_package/CMakeLists.txt b/recipes/avahi/all/test_v1_package/CMakeLists.txt index 925ecbe19e448..91630d79f4abb 100644 --- a/recipes/avahi/all/test_v1_package/CMakeLists.txt +++ b/recipes/avahi/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) From a1f99f3aa7308ff4f94a44780c40237c2d106851 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 6 Sep 2023 15:27:46 +0300 Subject: [PATCH 533/637] (#18691) libb2: migrate to Conan v2 * libb2: migrate to Conan v2 * libb2: move DLLs from lib to bin * libb2: restore VirtualRunEnv in test_package --- recipes/libb2/all/CMakeLists.txt | 52 +++++----- recipes/libb2/all/conanfile.py | 96 +++++++++++-------- recipes/libb2/all/test_package/CMakeLists.txt | 7 +- recipes/libb2/all/test_package/conanfile.py | 24 +++-- .../libb2/all/test_v1_package/CMakeLists.txt | 8 ++ .../libb2/all/test_v1_package/conanfile.py | 16 ++++ 6 files changed, 126 insertions(+), 77 deletions(-) create mode 100644 recipes/libb2/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/libb2/all/test_v1_package/conanfile.py diff --git a/recipes/libb2/all/CMakeLists.txt b/recipes/libb2/all/CMakeLists.txt index ba9b7e9e27948..ff47fce826321 100644 --- a/recipes/libb2/all/CMakeLists.txt +++ b/recipes/libb2/all/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.12) project(b2 C) -include("conanbuildinfo.cmake") -conan_basic_setup() - if(WIN32 AND BUILD_SHARED_LIBS AND MSVC) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) endif() @@ -11,38 +8,37 @@ endif() option(USE_SSE "Optimized for speed on CPUs supporting SSE2, SSSE3, SSE4.1, AVX, or XOP" OFF) option(USE_NEON "Optimiced for arm CPUs" OFF) +set(src ${CMAKE_CURRENT_LIST_DIR}/src) + if (USE_NEON) message(STATUS "Using neon sources") - set(SOURCE_FILES source_subfolder/neon/blake2b-neon.c - source_subfolder/neon/blake2bp.c - source_subfolder/neon/blake2s-neon.c - source_subfolder/neon/blake2xb.c - source_subfolder/neon/blake2sp.c - source_subfolder/neon/blake2xs.c) + set(SOURCE_FILES ${src}/neon/blake2b-neon.c + ${src}/neon/blake2bp.c + ${src}/neon/blake2s-neon.c + ${src}/neon/blake2xb.c + ${src}/neon/blake2sp.c + ${src}/neon/blake2xs.c) elseif (USE_SSE) message(STATUS "Using sse sources") - set(SOURCE_FILES source_subfolder/sse/blake2b.c - source_subfolder/sse/blake2bp.c - source_subfolder/sse/blake2s.c - source_subfolder/sse/blake2sp.c - source_subfolder/sse/blake2xb.c - source_subfolder/sse/blake2xs.c) + set(SOURCE_FILES ${src}/sse/blake2b.c + ${src}/sse/blake2bp.c + ${src}/sse/blake2s.c + ${src}/sse/blake2sp.c + ${src}/sse/blake2xb.c + ${src}/sse/blake2xs.c) else () message(STATUS "Using ref sources") - set(SOURCE_FILES source_subfolder/ref/blake2bp-ref.c - source_subfolder/ref/blake2b-ref.c - source_subfolder/ref/blake2sp-ref.c - source_subfolder/ref/blake2s-ref.c - source_subfolder/ref/blake2xb-ref.c - source_subfolder/ref/blake2xs-ref.c) + set(SOURCE_FILES ${src}/ref/blake2bp-ref.c + ${src}/ref/blake2b-ref.c + ${src}/ref/blake2sp-ref.c + ${src}/ref/blake2s-ref.c + ${src}/ref/blake2xb-ref.c + ${src}/ref/blake2xs-ref.c) endif() add_library(${CMAKE_PROJECT_NAME} ${SOURCE_FILES}) -set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES PUBLIC_HEADER source_subfolder/ref/blake2.h) +set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES PUBLIC_HEADER ${src}/ref/blake2.h) +include(GNUInstallDirs) install(TARGETS ${CMAKE_PROJECT_NAME} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libb2 - ) + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libb2) diff --git a/recipes/libb2/all/conanfile.py b/recipes/libb2/all/conanfile.py index 88ad67891d73b..faf2474da04c4 100644 --- a/recipes/libb2/all/conanfile.py +++ b/recipes/libb2/all/conanfile.py @@ -1,65 +1,85 @@ import os -import glob -from conans import ConanFile, tools, CMake -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, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rename + +required_conan_version = ">=1.53.0" + class libb2Conan(ConanFile): name = "libb2" + description = ( + "libb2 is a library that implements the BLAKE2 cryptographic hash function, which is faster than MD5, " + "SHA-1, SHA-2, and SHA-3, yet is at least as secure as the latest standard SHA-3" + ) license = ["CC0-1.0", "OpenSSL", "APSL-2.0"] url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/BLAKE2/BLAKE2" - description = ("libb2 is a library that implemets the BLAKE2 cryptographic hash function, which is faster than MD5, \ - SHA-1, SHA-2, and SHA-3, yet is at least as secure as the latest standard SHA-3") + topics = ("blake2", "hash") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" - topics = ("conan", "blake2", "hash") - exports_sources = ["CMakeLists.txt"] - generators = ["cmake"] - options = {"fPIC": [True, False], "shared": [True, False], "use_sse": [True, False], "use_neon": [True, False]} - default_options = {"fPIC": True, "shared": False, "use_sse": False, "use_neon": False} - _cmake = None + options = { + "shared": [True, False], + "fPIC": [True, False], + "use_sse": [True, False], + "use_neon": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "use_sse": False, + "use_neon": False, + } - @property - def _source_subfolder(self): - return "source_subfolder" + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) - @property - def _build_subfolder(self): - return "build_subfolder" + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC def configure(self): - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) if self.options.use_neon and not "arm" in self.settings.arch: raise ConanInvalidConfiguration("Neon sources only supported on arm-based CPUs") if self.options.use_neon and self.options.use_sse: raise ConanInvalidConfiguration("Neon and SSE can not be used together.") - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = glob.glob("BLAKE2-*")[0] - os.rename(extracted_dir, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _configure_cmake(self): - if not self._cmake: - self._cmake = CMake(self) - self._cmake.definitions["USE_SSE"] = self.options.use_sse - self._cmake.definitions["USE_NEON"] = self.options.use_neon - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + def generate(self): + tc = CMakeToolchain(self) + tc.variables["USE_SSE"] = self.options.use_sse + tc.variables["USE_NEON"] = self.options.use_neon + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure(build_script_folder=self.export_sources_folder) cmake.build() def package(self): - self.copy("COPYING", src=self._source_subfolder, dst="licenses") - cmake = self._configure_cmake() + copy(self, "COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() + for dll in (self.package_path / "lib").glob("*.dll"): + rename(self, dll, self.package_path / "bin" / dll.name) def package_info(self): - self.cpp_info.libs = tools.collect_libs(self) - self.cpp_info.includedirs = ["include", os.path.join("include","libb2")] + self.cpp_info.libs = ["b2"] + self.cpp_info.includedirs = ["include", os.path.join("include", "libb2")] diff --git a/recipes/libb2/all/test_package/CMakeLists.txt b/recipes/libb2/all/test_package/CMakeLists.txt index 6aab347eddf53..a422f3ac0c116 100644 --- a/recipes/libb2/all/test_package/CMakeLists.txt +++ b/recipes/libb2/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(PackageTest CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(libb2 REQUIRED CONFIG) add_executable(example example.cpp) -target_link_libraries(example ${CONAN_LIBS}) +target_link_libraries(example libb2::libb2) set_property(TARGET example PROPERTY CXX_STANDARD 11) diff --git a/recipes/libb2/all/test_package/conanfile.py b/recipes/libb2/all/test_package/conanfile.py index 0383b1729b064..8d52b7021efe1 100644 --- a/recipes/libb2/all/test_package/conanfile.py +++ b/recipes/libb2/all/test_package/conanfile.py @@ -1,9 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools -class blake2TestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + +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) @@ -11,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "example") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "example") + self.run(bin_path, env="conanrun") diff --git a/recipes/libb2/all/test_v1_package/CMakeLists.txt b/recipes/libb2/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libb2/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libb2/all/test_v1_package/conanfile.py b/recipes/libb2/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..24ecc57793dc6 --- /dev/null +++ b/recipes/libb2/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +import os +from conans import ConanFile, CMake, tools + +class blake2TestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "example") + self.run(bin_path, run_environment=True) From 39bad72319fefa39fb1b7b8d1db201a12ffb241c Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 6 Sep 2023 15:05:24 +0200 Subject: [PATCH 534/637] (#17125) aws-sdk-cpp: conan v2 support * conan v2 support * use rm_safe to delete s3-crt option * use cache_variables * use preprocessor_definitions * aws-c-event-stream is always a direct dependency * disable warnings as errors * aws-checksums is a direct dependency * restore compatible versions of dependencies * restore cmake_minimum_required to satisfy stupid hook * fix build_modules * fix requires in package_info() * fix pulseaudio detection * Add missing transitive headers, fix cmake modules * use version range for openssl * bump libcurl * add version range for libcurl --------- Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> --- recipes/aws-sdk-cpp/all/CMakeLists.txt | 11 - recipes/aws-sdk-cpp/all/conandata.yml | 38 ++-- recipes/aws-sdk-cpp/all/conanfile.py | 203 ++++++++++-------- ...30-0004-improve-pulseaudio-detection.patch | 2 +- .../all/test_package/CMakeLists.txt | 11 +- .../aws-sdk-cpp-plugin/CMakeLists.txt | 4 +- .../aws-sdk-cpp/all/test_package/conanfile.py | 19 +- .../all/test_v1_package/CMakeLists.txt | 8 + .../all/test_v1_package/conanfile.py | 17 ++ 9 files changed, 171 insertions(+), 142 deletions(-) delete mode 100644 recipes/aws-sdk-cpp/all/CMakeLists.txt create mode 100644 recipes/aws-sdk-cpp/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/aws-sdk-cpp/all/test_v1_package/conanfile.py diff --git a/recipes/aws-sdk-cpp/all/CMakeLists.txt b/recipes/aws-sdk-cpp/all/CMakeLists.txt deleted file mode 100644 index d19ff91050d95..0000000000000 --- a/recipes/aws-sdk-cpp/all/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -if(MSVC) - add_definitions(-D_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING) -endif() - -add_subdirectory(source_subfolder) diff --git a/recipes/aws-sdk-cpp/all/conandata.yml b/recipes/aws-sdk-cpp/all/conandata.yml index 8abd96ad2e0be..5818aef791db0 100644 --- a/recipes/aws-sdk-cpp/all/conandata.yml +++ b/recipes/aws-sdk-cpp/all/conandata.yml @@ -10,29 +10,19 @@ sources: sha256: "5dd09baa28d3f6f4fb03fbba1a4269724d79bcca3d47752cd3e15caf97276bda" patches: "1.9.234": - - base_path: source_subfolder - patch_file: patches/1.9.234-0001-issue-1816.patch - - base_path: source_subfolder - patch_file: patches/1.9.234-0002-disable-sort-links.patch - - base_path: source_subfolder - patch_file: patches/1.9.100-0002-aws-plugin-conf.patch + - patch_file: patches/1.9.234-0001-issue-1816.patch + - patch_file: patches/1.9.234-0002-disable-sort-links.patch + - patch_file: patches/1.9.100-0002-aws-plugin-conf.patch + - patch_file: patches/1.8.130-0004-improve-pulseaudio-detection.patch "1.9.100": - - base_path: source_subfolder - patch_file: patches/1.9.100-0001-disable-sort-links.patch - - base_path: source_subfolder - patch_file: patches/1.9.100-0002-aws-plugin-conf.patch - - base_path: source_subfolder - patch_file: patches/1.9.100-0003-issue-1816.patch + - patch_file: patches/1.9.100-0001-disable-sort-links.patch + - patch_file: patches/1.9.100-0002-aws-plugin-conf.patch + - patch_file: patches/1.9.100-0003-issue-1816.patch + - patch_file: patches/1.8.130-0004-improve-pulseaudio-detection.patch "1.8.130": - - base_path: source_subfolder - patch_file: patches/1.8.130-0001-disable-sort-links.patch - - base_path: source_subfolder - patch_file: patches/1.8.130-0002-force-archive-directory-to-library-directory.patch - - base_path: source_subfolder - patch_file: patches/1.8.130-0003-disable-cmake-install-rpath-use-link-path.patch - - base_path: source_subfolder - patch_file: patches/1.8.130-0004-improve-pulseaudio-detection.patch - - base_path: source_subfolder - patch_file: patches/1.8.130-0005-aws-plugin-conf.patch - - base_path: source_subfolder - patch_file: patches/1.8.130-0006-issue-1816.patch + - patch_file: patches/1.8.130-0001-disable-sort-links.patch + - patch_file: patches/1.8.130-0002-force-archive-directory-to-library-directory.patch + - patch_file: patches/1.8.130-0003-disable-cmake-install-rpath-use-link-path.patch + - patch_file: patches/1.8.130-0004-improve-pulseaudio-detection.patch + - patch_file: patches/1.8.130-0005-aws-plugin-conf.patch + - patch_file: patches/1.8.130-0006-issue-1816.patch diff --git a/recipes/aws-sdk-cpp/all/conanfile.py b/recipes/aws-sdk-cpp/all/conanfile.py index 91c2066868882..678d3e32eb8c9 100644 --- a/recipes/aws-sdk-cpp/all/conanfile.py +++ b/recipes/aws-sdk-cpp/all/conanfile.py @@ -1,11 +1,14 @@ import os -from conan.tools.files import rename -from conan.tools.microsoft import msvc_runtime_flag -from conans import CMake, ConanFile, tools -from conans.errors import ConanInvalidConfiguration +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building, stdcpp_library +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rename, replace_in_file, rm, rmdir +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.scm import Version -required_conan_version = ">=1.43.0" +required_conan_version = ">=1.54.0" class AwsSdkCppConan(ConanFile): @@ -15,7 +18,7 @@ class AwsSdkCppConan(ConanFile): homepage = "https://github.com/aws/aws-sdk-cpp" description = "AWS SDK for C++" topics = ("aws", "cpp", "cross-platform", "amazon", "cloud") - + package_type = "library" settings = "os", "arch", "compiler", "build_type" _sdks = ( "access-management", @@ -304,17 +307,7 @@ class AwsSdkCppConan(ConanFile): default_options["transfer"] = True default_options["text-to-speech"] = True - generators = "cmake", "cmake_find_package" short_paths = True - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _is_msvc(self): - return str(self.settings.compiler) in ["Visual Studio", "msvc"] @property def _internal_requirements(self): @@ -329,35 +322,36 @@ def _internal_requirements(self): @property def _use_aws_crt_cpp(self): - return tools.Version(self.version) >= "1.9" + return Version(self.version) >= "1.9" def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if tools.Version(self.version) < "1.9": - delattr(self.options, "s3-crt") + if Version(self.version) < "1.9": + self.options.rm_safe("s3-crt") 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("aws-c-common/0.6.19") + self.requires("aws-c-common/0.8.2") + self.requires("aws-c-event-stream/0.2.7") + self.requires("aws-checksums/0.1.13") if self._use_aws_crt_cpp: self.requires("aws-c-cal/0.5.13") self.requires("aws-c-http/0.6.13") self.requires("aws-c-io/0.10.20") - self.requires("aws-crt-cpp/0.17.23") - else: - self.requires("aws-c-event-stream/0.2.7") + self.requires("aws-crt-cpp/0.17.23", transitive_headers=True) if self.settings.os != "Windows": - self.requires("openssl/1.1.1n") - self.requires("libcurl/7.80.0") + self.requires("openssl/[>=1.1 <4]") + self.requires("libcurl/[>=7.78.0 <9]") if self.settings.os in ["Linux", "FreeBSD"]: if self.options.get_safe("text-to-speech"): self.requires("pulseaudio/14.2") @@ -365,21 +359,21 @@ def requirements(self): def validate(self): if (self.options.shared and self.settings.compiler == "gcc" - and tools.Version(self.settings.compiler.version) < "6.0"): + and Version(self.settings.compiler.version) < "6.0"): raise ConanInvalidConfiguration( "Doesn't support gcc5 / shared. " "See https://github.com/conan-io/conan-center-index/pull/4401#issuecomment-802631744" ) - if (tools.Version(self.version) < "1.9.234" + if (Version(self.version) < "1.9.234" and self.settings.compiler == "gcc" - and tools.Version(self.settings.compiler.version) >= "11.0" + and Version(self.settings.compiler.version) >= "11.0" and self.settings.build_type == "Release"): raise ConanInvalidConfiguration( "Versions prior to 1.9.234 don't support release builds on >= gcc 11 " "See https://github.com/aws/aws-sdk-cpp/issues/1505" ) if self._use_aws_crt_cpp: - if self._is_msvc and "MT" in msvc_runtime_flag(self): + if is_msvc(self) and is_msvc_static_runtime(self): raise ConanInvalidConfiguration("Static runtime is not working for more recent releases") else: if self.settings.os == "Macos" and self.settings.arch == "armv8": @@ -390,48 +384,60 @@ def validate(self): def package_id(self): for hl_comp in self._internal_requirements.keys(): - if getattr(self.options, hl_comp): + if getattr(self.info.options, hl_comp): for internal_requirement in self._internal_requirements[hl_comp]: setattr(self.info.options, internal_requirement, True) def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) + def generate(self): + tc = CMakeToolchain(self) + # All option() are defined before project() in upstream CMakeLists, + # therefore we must use cache_variables build_only = ["core"] for sdk in self._sdks: if self.options.get_safe(sdk): build_only.append(sdk) - self._cmake.definitions["BUILD_ONLY"] = ";".join(build_only) + tc.cache_variables["BUILD_ONLY"] = ";".join(build_only) - self._cmake.definitions["ENABLE_UNITY_BUILD"] = True - self._cmake.definitions["ENABLE_TESTING"] = False - self._cmake.definitions["AUTORUN_UNIT_TESTS"] = False - self._cmake.definitions["BUILD_DEPS"] = False + tc.cache_variables["ENABLE_UNITY_BUILD"] = True + tc.cache_variables["ENABLE_TESTING"] = False + tc.cache_variables["AUTORUN_UNIT_TESTS"] = False + tc.cache_variables["BUILD_DEPS"] = False if self.settings.os != "Windows": - self._cmake.definitions["ENABLE_OPENSSL_ENCRYPTION"] = True - - self._cmake.definitions["MINIMIZE_SIZE"] = self.options.min_size - if self._is_msvc and not self._use_aws_crt_cpp: - self._cmake.definitions["FORCE_SHARED_CRT"] = "MD" in msvc_runtime_flag(self) - - if tools.cross_building(self): - self._cmake.definitions["CURL_HAS_H2_EXITCODE"] = "0" - self._cmake.definitions["CURL_HAS_H2_EXITCODE__TRYRUN_OUTPUT"] = "" - self._cmake.definitions["CURL_HAS_TLS_PROXY_EXITCODE"] = "0" - self._cmake.definitions["CURL_HAS_TLS_PROXY_EXITCODE__TRYRUN_OUTPUT"] = "" - self._cmake.configure() - return self._cmake + tc.cache_variables["ENABLE_OPENSSL_ENCRYPTION"] = True + + tc.cache_variables["MINIMIZE_SIZE"] = self.options.min_size + if is_msvc(self) and not self._use_aws_crt_cpp: + tc.cache_variables["FORCE_SHARED_CRT"] = not is_msvc_static_runtime(self) + + if cross_building(self): + tc.cache_variables["CURL_HAS_H2_EXITCODE"] = "0" + tc.cache_variables["CURL_HAS_H2_EXITCODE__TRYRUN_OUTPUT"] = "" + tc.cache_variables["CURL_HAS_TLS_PROXY_EXITCODE"] = "0" + tc.cache_variables["CURL_HAS_TLS_PROXY_EXITCODE__TRYRUN_OUTPUT"] = "" + if is_msvc(self): + tc.preprocessor_definitions["_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING"] = "1" + tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + # Disable warnings as errors + replace_in_file( + self, os.path.join(self.source_folder, "cmake", "compiler_settings.cmake"), + 'list(APPEND AWS_COMPILER_WARNINGS "-Wall" "-Werror" "-pedantic" "-Wextra")', "", + ) def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + self._patch_sources() + cmake = CMake(self) + cmake.configure() cmake.build() @property @@ -449,44 +455,56 @@ def _create_project_cmake_module(self): "toolchains/pkg-config.pc.in", "aws-cpp-sdk-core/include/aws/core/VersionConfig.h" ]: - self.copy(file, src=self._source_subfolder, dst=self._res_folder) - tools.replace_in_file(os.path.join(self.package_folder, self._res_folder, file), "CMAKE_CURRENT_SOURCE_DIR", "AWS_NATIVE_SDK_ROOT", strict=False) + copy(self, file, src=self.source_folder, dst=os.path.join(self.package_folder, self._res_folder)) + replace_in_file( + self, os.path.join(self.package_folder, self._res_folder, file), + "CMAKE_CURRENT_SOURCE_DIR", "AWS_NATIVE_SDK_ROOT", + strict=False, + ) # avoid getting error from hook - with tools.chdir(os.path.join(self.package_folder, self._res_folder)): - rename(self, os.path.join("toolchains", "cmakeProjectConfig.cmake"), os.path.join("toolchains", "cmakeProjectConf.cmake")) - tools.replace_in_file(os.path.join("cmake", "utilities.cmake"), "cmakeProjectConfig.cmake", "cmakeProjectConf.cmake") + rename(self, os.path.join(self.package_folder, self._res_folder, "toolchains", "cmakeProjectConfig.cmake"), + os.path.join(self.package_folder, self._res_folder, "toolchains", "cmakeProjectConf.cmake")) + replace_in_file( + self, os.path.join(self.package_folder, self._res_folder, "cmake", "utilities.cmake"), + "cmakeProjectConfig.cmake", "cmakeProjectConf.cmake", + ) def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() - if self._is_msvc: - self.copy(pattern="*.lib", dst="lib", keep_path=False) - tools.remove_files_by_mask(os.path.join(self.package_folder, "bin"), "*.lib") + if is_msvc(self): + copy(self, "*.lib", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) + rm(self, "*.lib", os.path.join(self.package_folder, "bin")) - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) self._create_project_cmake_module() def package_info(self): self.cpp_info.set_property("cmake_file_name", "AWSSDK") + sdk_plugin_conf = os.path.join(self._res_folder, "cmake", "sdk_plugin_conf.cmake") + self.cpp_info.set_property("cmake_build_modules", [sdk_plugin_conf]) + # core component self.cpp_info.components["core"].set_property("cmake_target_name", "AWS::aws-sdk-cpp-core") self.cpp_info.components["core"].set_property("pkg_config_name", "aws-sdk-cpp-core") self.cpp_info.components["core"].libs = ["aws-cpp-sdk-core"] - self.cpp_info.components["core"].requires = ["aws-c-common::aws-c-common-lib"] + self.cpp_info.components["core"].requires = [ + "aws-c-common::aws-c-common", + "aws-c-event-stream::aws-c-event-stream", + "aws-checksums::aws-checksums", + ] if self._use_aws_crt_cpp: self.cpp_info.components["core"].requires.extend([ - "aws-c-cal::aws-c-cal-lib", - "aws-c-http::aws-c-http-lib", - "aws-c-io::aws-c-io-lib", - "aws-crt-cpp::aws-crt-cpp-lib", + "aws-c-cal::aws-c-cal", + "aws-c-http::aws-c-http", + "aws-c-io::aws-c-io", + "aws-crt-cpp::aws-crt-cpp", ]) - else: - self.cpp_info.components["core"].requires.append("aws-c-event-stream::aws-c-event-stream-lib") # other components enabled_sdks = [sdk for sdk in self._sdks if self.options.get_safe(sdk)] @@ -500,8 +518,8 @@ def package_info(self): # TODO: there is no way to properly emulate COMPONENTS names for # find_package(AWSSDK COMPONENTS ) in set_property() # right now: see https://github.com/conan-io/conan/issues/10258 - self.cpp_info.components[sdk].set_property("cmake_target_name", "AWS::aws-sdk-cpp-{}".format(sdk)) - self.cpp_info.components[sdk].set_property("pkg_config_name", "aws-sdk-cpp-{}".format(sdk)) + self.cpp_info.components[sdk].set_property("cmake_target_name", f"AWS::aws-sdk-cpp-{sdk}") + self.cpp_info.components[sdk].set_property("pkg_config_name", f"aws-sdk-cpp-{sdk}") self.cpp_info.components[sdk].requires = ["core"] if sdk in self._internal_requirements: self.cpp_info.components[sdk].requires.extend(self._internal_requirements[sdk]) @@ -510,7 +528,7 @@ def package_info(self): # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.components[sdk].names["cmake_find_package"] = "aws-sdk-cpp-" + sdk self.cpp_info.components[sdk].names["cmake_find_package_multi"] = "aws-sdk-cpp-" + sdk - component_alias = "aws-sdk-cpp-{}_alias".format(sdk) # to emulate COMPONENTS names for find_package() + component_alias = f"aws-sdk-cpp-{sdk}_alias" # to emulate COMPONENTS names for find_package() self.cpp_info.components[component_alias].names["cmake_find_package"] = sdk self.cpp_info.components[component_alias].names["cmake_find_package_multi"] = sdk self.cpp_info.components[component_alias].requires = [sdk] @@ -534,9 +552,14 @@ def package_info(self): if self.options.get_safe("text-to-speech"): self.cpp_info.components["text-to-speech"].frameworks.append("CoreAudio") - lib_stdcpp = tools.stdcpp_library(self) - if lib_stdcpp: - self.cpp_info.components["core"].system_libs.append(lib_stdcpp) + libcxx = stdcpp_library(self) + if libcxx: + self.cpp_info.components["core"].system_libs.append(libcxx) + + self.cpp_info.components["plugin_scripts"].requires = ["core"] + self.cpp_info.components["plugin_scripts"].builddirs.extend([ + os.path.join(self._res_folder, "cmake"), + os.path.join(self._res_folder, "toolchains")]) # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "AWSSDK" @@ -545,9 +568,5 @@ def package_info(self): self.cpp_info.names["cmake_find_package_multi"] = "AWS" self.cpp_info.components["core"].names["cmake_find_package"] = "aws-sdk-cpp-core" self.cpp_info.components["core"].names["cmake_find_package_multi"] = "aws-sdk-cpp-core" - - self.cpp_info.components["plugin_scripts"].requires = ["core"] - self.cpp_info.components["plugin_scripts"].builddirs.extend([ - os.path.join(self._res_folder, "cmake"), - os.path.join(self._res_folder, "toolchains")]) - self.cpp_info.components["plugin_scripts"].build_modules.append(os.path.join(self._res_folder, "cmake", "sdk_plugin_conf.cmake")) + self.cpp_info.components["plugin_scripts"].build_modules["cmake_find_package"] = [sdk_plugin_conf] + self.cpp_info.components["plugin_scripts"].build_modules["cmake_find_package_multi"] = [sdk_plugin_conf] diff --git a/recipes/aws-sdk-cpp/all/patches/1.8.130-0004-improve-pulseaudio-detection.patch b/recipes/aws-sdk-cpp/all/patches/1.8.130-0004-improve-pulseaudio-detection.patch index 5a47717a4552a..9930b981211f6 100644 --- a/recipes/aws-sdk-cpp/all/patches/1.8.130-0004-improve-pulseaudio-detection.patch +++ b/recipes/aws-sdk-cpp/all/patches/1.8.130-0004-improve-pulseaudio-detection.patch @@ -24,7 +24,7 @@ index b1054515d5..d1a34ddfc5 100644 message(STATUS "Pulse audio header files have been detected, included pulse audio as a possible sound driver implementation.") add_definitions("-DPULSE") - set(PLATFORM_LIBS ${PLATFORM_LIBS} pulse pulse-simple) -+ set(PLATFORM_LIBS ${PLATFORM_LIBS} "CONAN_PKG::pulseaudio") ++ set(PLATFORM_LIBS ${PLATFORM_LIBS} "pulseaudio::pulseaudio") else() message(WARNING "We've detected that you are building on linux, but the header files for pulseaudio are not available.\ If you are providing your own audio implementation or you will not be using the text-to-speech library, this is fine.\ diff --git a/recipes/aws-sdk-cpp/all/test_package/CMakeLists.txt b/recipes/aws-sdk-cpp/all/test_package/CMakeLists.txt index efb9a3d957583..dda85fd047b73 100644 --- a/recipes/aws-sdk-cpp/all/test_package/CMakeLists.txt +++ b/recipes/aws-sdk-cpp/all/test_package/CMakeLists.txt @@ -1,13 +1,10 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package CXX) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) find_package(AWSSDK REQUIRED CONFIG) add_subdirectory(aws-sdk-cpp-plugin) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} aws-sdk-cpp-plugin) -set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) +target_link_libraries(${PROJECT_NAME} PRIVATE aws-sdk-cpp-plugin) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/aws-sdk-cpp/all/test_package/aws-sdk-cpp-plugin/CMakeLists.txt b/recipes/aws-sdk-cpp/all/test_package/aws-sdk-cpp-plugin/CMakeLists.txt index dddf745d2e408..37d0edc6941d9 100644 --- a/recipes/aws-sdk-cpp/all/test_package/aws-sdk-cpp-plugin/CMakeLists.txt +++ b/recipes/aws-sdk-cpp/all/test_package/aws-sdk-cpp-plugin/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.8) add_project(aws-sdk-cpp-plugin "C++ AWS SDK plugin" AWS::aws-sdk-cpp-s3) @@ -8,7 +8,7 @@ include(GenerateExportHeader) generate_export_header(${PROJECT_NAME} BASE_NAME aws_sdk_cpp_plugin) target_include_directories(${PROJECT_NAME} PUBLIC $ $) target_link_libraries(${PROJECT_NAME} PUBLIC ${PROJECT_LIBS}) -set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) setup_install() diff --git a/recipes/aws-sdk-cpp/all/test_package/conanfile.py b/recipes/aws-sdk-cpp/all/test_package/conanfile.py index 38f4483872d47..e845ae751a301 100644 --- a/recipes/aws-sdk-cpp/all/test_package/conanfile.py +++ b/recipes/aws-sdk-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 layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - 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.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/aws-sdk-cpp/all/test_v1_package/CMakeLists.txt b/recipes/aws-sdk-cpp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..0d20897301b68 --- /dev/null +++ b/recipes/aws-sdk-cpp/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/aws-sdk-cpp/all/test_v1_package/conanfile.py b/recipes/aws-sdk-cpp/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..38f4483872d47 --- /dev/null +++ b/recipes/aws-sdk-cpp/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 0faff79b5d05f12b62bc8a1f98e7b0db2740258b Mon Sep 17 00:00:00 2001 From: whalien Date: Wed, 6 Sep 2023 21:47:46 +0800 Subject: [PATCH 535/637] (#18702) feat: update tree-sitter-c to conan v2 * feat: update tree-sitter-c to conan v2 * fix: update grammar lib to dynamic lib * fix: self review * fix: update package_type to lib * fix: add static lib recipe --------- Co-authored-by: Carlos Zoido --- recipes/tree-sitter-c/all/CMakeLists.txt | 19 ++++--- recipes/tree-sitter-c/all/conandata.yml | 3 + recipes/tree-sitter-c/all/conanfile.py | 57 ++++++++++--------- .../all/test_package/CMakeLists.txt | 3 - .../all/test_package/conanfile.py | 20 +++++-- recipes/tree-sitter-c/config.yml | 2 + 6 files changed, 62 insertions(+), 42 deletions(-) diff --git a/recipes/tree-sitter-c/all/CMakeLists.txt b/recipes/tree-sitter-c/all/CMakeLists.txt index 2d76c83c9cbd4..0500a39a48fb9 100644 --- a/recipes/tree-sitter-c/all/CMakeLists.txt +++ b/recipes/tree-sitter-c/all/CMakeLists.txt @@ -1,9 +1,6 @@ cmake_minimum_required(VERSION 3.0) project(tree-sitter-c C) -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(tree-sitter REQUIRED CONFIG) include(GenerateExportHeader) @@ -12,11 +9,19 @@ file(WRITE api.h [[ #include #include "tree_sitter_c_export.h" -TREE_SITTER_C_EXPORT const TSLanguage *tree_sitter_c(void); +#ifdef __cplusplus +extern "C" { +#endif + +const TSLanguage *tree_sitter_c(void); + +#ifdef __cplusplus +} +#endif ]]) add_library(${PROJECT_NAME} - source_subfolder/src/parser.c + src/src/parser.c ) target_link_libraries(${PROJECT_NAME} PUBLIC @@ -24,8 +29,8 @@ target_link_libraries(${PROJECT_NAME} ) target_include_directories(${PROJECT_NAME} PRIVATE - $ - $ + $ + $ ) set_target_properties(${PROJECT_NAME} PROPERTIES diff --git a/recipes/tree-sitter-c/all/conandata.yml b/recipes/tree-sitter-c/all/conandata.yml index fe7f567397167..f225285a8fae5 100644 --- a/recipes/tree-sitter-c/all/conandata.yml +++ b/recipes/tree-sitter-c/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.20.3": + url: "https://github.com/tree-sitter/tree-sitter-c/archive/refs/tags/v0.20.3.tar.gz" + sha256: "8c72a765230324f2b64e9ed66e027daf1a2ed24dde5fbf21398ad8ff7fca2a2d" "0.20.2": url: "https://github.com/tree-sitter/tree-sitter-c/archive/v0.20.2.tar.gz" sha256: "af66fde03feb0df4faf03750102a0d265b007e5d957057b6b293c13116a70af2" diff --git a/recipes/tree-sitter-c/all/conanfile.py b/recipes/tree-sitter-c/all/conanfile.py index 84ab13ea08213..87e43c96d6c62 100644 --- a/recipes/tree-sitter-c/all/conanfile.py +++ b/recipes/tree-sitter-c/all/conanfile.py @@ -1,8 +1,10 @@ -from conans import CMake, ConanFile, tools -import functools +from conan import ConanFile +from conan.tools.cmake import CMake +from conan.tools.files import get, replace_in_file, copy +from conan.tools.layout import basic_layout import os -required_conan_version = ">=1.33.0" +required_conan_version = ">=1.53.0" class TreeSitterCConan(ConanFile): @@ -13,21 +15,22 @@ class TreeSitterCConan(ConanFile): homepage = "https://github.com/tree-sitter/tree-sitter-c" license = "MIT" settings = "os", "arch", "compiler", "build_type" + package_type = "library" + generators = "CMakeToolchain", "CMakeDeps" options = { - "fPIC": [True, False], "shared": [True, False], + "fPIC": [True, False], } default_options = { - "fPIC": True, "shared": False, + "fPIC": True, } - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeToolchain", "CMakeDeps" exports_sources = "CMakeLists.txt" - @property - def _source_subfolder(self): - return "source_subfolder" + def layout(self): + basic_layout(self, src_folder="src") def config_options(self): if self.settings.os == "Windows": @@ -35,38 +38,38 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd - - def requirements(self): - self.requires("tree-sitter/0.20.0") + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.configure() - return cmake + def requirements(self): + self.requires("tree-sitter/0.20.8", transitive_headers=True, transitive_libs=True) def _patch_sources(self): if not self.options.shared: - tools.replace_in_file( - os.path.join(self._source_subfolder, "src", "parser.c"), + replace_in_file( + self, + os.path.join(self.source_folder, "src", "parser.c"), "__declspec(dllexport)", "" ) 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("LICENSE", src=self._source_subfolder, dst="licenses") - cmake = self._configure_cmake() + copy( + self, + "LICENSE", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses"), + ) + cmake = CMake(self) cmake.install() def package_info(self): diff --git a/recipes/tree-sitter-c/all/test_package/CMakeLists.txt b/recipes/tree-sitter-c/all/test_package/CMakeLists.txt index 48140fe26ab46..177a777e8ddf7 100644 --- a/recipes/tree-sitter-c/all/test_package/CMakeLists.txt +++ b/recipes/tree-sitter-c/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ cmake_minimum_required(VERSION 3.1) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(tree-sitter-c REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) diff --git a/recipes/tree-sitter-c/all/test_package/conanfile.py b/recipes/tree-sitter-c/all/test_package/conanfile.py index 38f4483872d47..fc47f4cefd612 100644 --- a/recipes/tree-sitter-c/all/test_package/conanfile.py +++ b/recipes/tree-sitter-c/all/test_package/conanfile.py @@ -1,10 +1,20 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout + import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) def build(self): cmake = CMake(self) @@ -12,6 +22,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): + cmd = os.path.join(self.cpp.build.bindir, "test_package") + self.run(cmd, env="conanrun") diff --git a/recipes/tree-sitter-c/config.yml b/recipes/tree-sitter-c/config.yml index 8304408636b4b..7070a273f171a 100644 --- a/recipes/tree-sitter-c/config.yml +++ b/recipes/tree-sitter-c/config.yml @@ -1,4 +1,6 @@ versions: + "0.20.3": + folder: all "0.20.2": folder: all "0.20.1": From 0252c5088755a2087accd5722a335105310ef346 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 6 Sep 2023 23:35:27 +0900 Subject: [PATCH 536/637] (#19538) re2: add version 2023-09-01 --- recipes/re2/all/conandata.yml | 3 +++ recipes/re2/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/re2/all/conandata.yml b/recipes/re2/all/conandata.yml index 9b52a871bf261..f87d569bda02a 100644 --- a/recipes/re2/all/conandata.yml +++ b/recipes/re2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "20230901": + url: "https://github.com/google/re2/releases/download/2023-09-01/re2-2023-09-01.tar.gz" + sha256: "5bb6875ae1cd1e9fedde98018c346db7260655f86fdb8837e3075103acd3649b" "20230801": url: "https://github.com/google/re2/releases/download/2023-08-01/re2-2023-08-01.tar.gz" sha256: "d82d0efe2389949244445e7a6ac9a10fccc3d6a3d267ec4652991a51291647b0" diff --git a/recipes/re2/config.yml b/recipes/re2/config.yml index fb1f7527256cf..d57588459f0b8 100644 --- a/recipes/re2/config.yml +++ b/recipes/re2/config.yml @@ -1,4 +1,6 @@ versions: + "20230901": + folder: all "20230801": folder: all "20230701": From 50a2b912cde7bb5c98a7dfc217e412afd3917653 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 6 Sep 2023 17:46:37 +0200 Subject: [PATCH 537/637] (#19614) [imagl] Migrate to Conan 2.x and fix JSON error in CI * Updating imagl recipe for conan 2.0 * adding src_folder parameter to cmake_layout to please linter * Back to minimum conan 1.59 * Inspired by zlib recipe and now it passes v1 hooks. * Do not use validate_build(), but validate() instead * Applying jwillikers suggestions. * Final endline added * add cmake_find_package_multi generator as jwillikers suggests it. Co-authored-by: Jordan Williams * Removing base_path from patches and a useless _cmake member of ImaglConan class * -Switch to github URLs since my GitLab instance is temporarily down -Change license name to uppercase * update deps Signed-off-by: Uilian Ries * private target Signed-off-by: Uilian Ries * revert conandata.yml Signed-off-by: Uilian Ries * remove 0.1.0 version Signed-off-by: Uilian Ries * Keep Woazim as true author * change homepage to GH url Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries Co-authored-by: Benjamin ALBOUY-KISSI Co-authored-by: Woazim <54191598+Woazim@users.noreply.github.com> Co-authored-by: Jordan Williams Co-authored-by: Daniel --- recipes/imagl/all/CMakeLists.txt | 7 -- recipes/imagl/all/conandata.yml | 28 +++-- recipes/imagl/all/conanfile.py | 118 ++++++++---------- recipes/imagl/all/test_package/CMakeLists.txt | 9 +- recipes/imagl/all/test_package/conanfile.py | 19 ++- .../imagl/all/test_v1_package/CMakeLists.txt | 8 ++ .../imagl/all/test_v1_package/conanfile.py | 17 +++ 7 files changed, 111 insertions(+), 95 deletions(-) delete mode 100644 recipes/imagl/all/CMakeLists.txt create mode 100644 recipes/imagl/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/imagl/all/test_v1_package/conanfile.py diff --git a/recipes/imagl/all/CMakeLists.txt b/recipes/imagl/all/CMakeLists.txt deleted file mode 100644 index 434aea21733de..0000000000000 --- a/recipes/imagl/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include("conanbuildinfo.cmake") -conan_basic_setup(TARGETS) - -add_subdirectory(source_subfolder) diff --git a/recipes/imagl/all/conandata.yml b/recipes/imagl/all/conandata.yml index 4c28973c33e6b..338c8a935d27e 100644 --- a/recipes/imagl/all/conandata.yml +++ b/recipes/imagl/all/conandata.yml @@ -1,26 +1,30 @@ sources: "0.1.0": - url: "https://gitlab-lepuy.iut-clermont.uca.fr/opengl/imagl/-/archive/v0.1.0/imagl-v0.1.0.tar.gz" - sha256: "9dcfba4c2efa8d44bf4cc9edd324794865dd6d6331467d3c69f5c5574db3844e" + url: "https://github.com/Woazim/imaGL/archive/refs/tags/v0.1.0.tar.gz" + sha256: "070d155f61c3036be67683dcec7bef57d5407f5aa7ca35487358b55fd2762ef8" "0.1.1": - url: "https://gitlab-lepuy.iut-clermont.uca.fr/opengl/imagl/-/archive/v0.1.1/imagl-v0.1.1.tar.gz" - sha256: "4a7502cc733431af6423246fe5144e2eddb984454a66cca51742c852980ac862" + url: "https://github.com/Woazim/imaGL/archive/refs/tags/v0.1.1.tar.gz" + sha256: "25c1df00dfd1741b013044de9407f30f58ca64d155d862db740518ed8667f3ec" "0.1.2": - url: "https://gitlab-lepuy.iut-clermont.uca.fr/opengl/imagl/-/archive/v0.1.2/imagl-v0.1.2.tar.gz" - sha256: "d1edf74e00f969a47dc56e4400b805600d6997270339d49e91b7c6112a2cb37e" + url: "https://github.com/Woazim/imaGL/archive/refs/tags/v0.1.2.tar.gz" + sha256: "03296707f4c6b5a03cd4d6670c7444c0660d22ca09de981e57fcb75111fd16a5" "0.2.1": - url: "https://gitlab-lepuy.iut-clermont.uca.fr/opengl/imagl/-/archive/v0.2.1/imagl-v0.2.1.tar.gz" - sha256: "5a68cdeff4338e411695cca16c4230567de298f8efee2a9fadcc6fa644a70248" + url: "https://github.com/Woazim/imaGL/archive/refs/tags/v0.2.1.tar.gz" + sha256: "b0109b1d0cadf3054ad959ed4a0420b61202f8143f5a7ad766c1e449603d30d8" patches: "0.1.0": - patch_file: "patches/0001-no-unmanaged-conan-0.1.x.patch" - base_path: "source_subfolder" + patch_description: "No unmanaged conan: update CMakeLists.txt remove call to conan" + patch_type: conan "0.1.1": - patch_file: "patches/0001-no-unmanaged-conan-0.1.x.patch" - base_path: "source_subfolder" + patch_description: "No unmanaged conan: update CMakeLists.txt remove call to conan" + patch_type: conan "0.1.2": - patch_file: "patches/0001-no-unmanaged-conan-0.1.x.patch" - base_path: "source_subfolder" + patch_description: "No unmanaged conan: update CMakeLists.txt remove call to conan" + patch_type: conan "0.2.1": - patch_file: "patches/0001-no-unmanaged-conan-0.2.1.patch" - base_path: "source_subfolder" + patch_description: "No unmanaged conan: update CMakeLists.txt remove call to conan" + patch_type: conan diff --git a/recipes/imagl/all/conanfile.py b/recipes/imagl/all/conanfile.py index a8994d4c2ba67..e756a56a2d548 100644 --- a/recipes/imagl/all/conanfile.py +++ b/recipes/imagl/all/conanfile.py @@ -1,12 +1,18 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration +from conan import ConanFile +from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps +from conan.tools.scm import Version +from conan.tools.build import check_min_cppstd +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy +from conan.tools.microsoft import is_msvc, check_min_vs +from conan.errors import ConanInvalidConfiguration +import os -required_conan_version = ">=1.33.0" +required_conan_version = ">=1.53.0" class ImaglConan(ConanFile): name = "imagl" - license = "GPL-3.0-or-later" + license = "LGPL-3.0-only" homepage = "https://github.com/Woazim/imaGL" url = "https://github.com/conan-io/conan-center-index" description = "A lightweight library to load image for OpenGL application." @@ -24,108 +30,88 @@ class ImaglConan(ConanFile): "with_png": True, "with_jpeg": True, } - generators = "cmake" - exports_sources = ["CMakeLists.txt", "patches/**"] - _cmake = None @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" + def _min_cppstd(self): + return 20 @property def _compilers_minimum_version(self): - minimum_versions = { + return { "gcc": "9", - "Visual Studio": "16.2", - "msvc": "19.22", "clang": "10", "apple-clang": "11" } - if tools.Version(self.version) <= "0.1.1" or tools.Version(self.version) == "0.2.0": - minimum_versions["Visual Studio"] = "16.5" - minimum_versions["msvc"] = "19.25" - return minimum_versions @property def _supports_jpeg(self): - return tools.Version(self.version) >= "0.2.0" + return Version(self.version) >= "0.2.0" + + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": - del self.options.fPIC + self.options.rm_safe("fPIC") if not self._supports_jpeg: - del self.options.with_jpeg + self.options.rm_safe("with_jpeg") 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): if self.options.with_png: - self.requires("libpng/1.6.37") + self.requires("libpng/1.6.40") if self._supports_jpeg and self.options.with_jpeg: - self.requires("libjpeg/9d") + self.requires("libjpeg/9e") def validate(self): if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, 20) - - def lazy_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] - - #Special check for clang that can only be linked to libc++ - if self.settings.compiler == "clang" and self.settings.compiler.libcxx != "libc++": + check_min_cppstd(self, self._min_cppstd) + check_min_vs(self, 192) + if not is_msvc(self): + 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." + ) + + # INFO: Special check for clang that can only be linked to libc++ + if self.settings.compiler == "clang" and self.settings.get_safe("compiler.libcxx") != "libc++": raise ConanInvalidConfiguration("imagl requires some C++20 features, which are available in libc++ for clang compiler.") - compiler_version = str(self.settings.compiler.version) - - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if not minimum_version: - self.output.warn("imaGL requires C++20. Your compiler is unknown. Assuming it supports C++20.") - elif lazy_lt_semver(compiler_version, minimum_version): - raise ConanInvalidConfiguration("imaGL requires some C++20 features, which your {} {} compiler does not support.".format(str(self.settings.compiler), compiler_version)) - else: - print("Your compiler is {} {} and is compatible.".format(str(self.settings.compiler), compiler_version)) def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - - self._cmake = CMake(self) - - self._cmake.definitions["STATIC_LIB"] = not self.options.shared - self._cmake.definitions["SUPPORT_PNG"] = self.options.with_png + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + deps = CMakeDeps(self) + deps.generate() + tc = CMakeToolchain(self) + tc.variables["STATIC_LIB"] = not self.options.shared + tc.variables["SUPPORT_PNG"] = self.options.with_png if self._supports_jpeg: - self._cmake.definitions["SUPPORT_JPEG"] = self.options.with_jpeg - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + tc.variables["SUPPORT_JPEG"] = self.options.with_jpeg + tc.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + apply_conandata_patches(self) + 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() def package_info(self): debug_suffix = "d" if self.settings.build_type == "Debug" else "" static_suffix = "" if self.options.shared else "s" - self.cpp_info.libs = ["imaGL{}{}".format(debug_suffix, static_suffix)] + self.cpp_info.libs = [f"imaGL{debug_suffix}{static_suffix}"] if not self.options.shared: self.cpp_info.defines = ["IMAGL_STATIC=1"] - diff --git a/recipes/imagl/all/test_package/CMakeLists.txt b/recipes/imagl/all/test_package/CMakeLists.txt index 15d229320021c..ba0d23b2326bb 100644 --- a/recipes/imagl/all/test_package/CMakeLists.txt +++ b/recipes/imagl/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(PackageTest CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(imagl CONFIG REQUIRED) add_executable(example example.cpp) -target_link_libraries(example ${CONAN_LIBS}) -set_target_properties(example PROPERTIES CXX_STANDARD 20 CXX_STANDARD_REQUIRED ON) +target_link_libraries(example PRIVATE imagl::imagl) +target_compile_features(example PRIVATE cxx_std_20) diff --git a/recipes/imagl/all/test_package/conanfile.py b/recipes/imagl/all/test_package/conanfile.py index 156e2a8976e7c..0d267f1fe3b58 100644 --- a/recipes/imagl/all/test_package/conanfile.py +++ b/recipes/imagl/all/test_package/conanfile.py @@ -1,10 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools class ImaglTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "example") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "example") + self.run(bin_path, env="conanrun") diff --git a/recipes/imagl/all/test_v1_package/CMakeLists.txt b/recipes/imagl/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/imagl/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/imagl/all/test_v1_package/conanfile.py b/recipes/imagl/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..923bd771c14e7 --- /dev/null +++ b/recipes/imagl/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os +from conans import ConanFile, CMake, tools + + +class ImaglTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "example") + self.run(bin_path, run_environment=True) From 182af3038d67b37586390ae8d1c4f3f60ae5c9e6 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 6 Sep 2023 19:52:45 +0300 Subject: [PATCH 538/637] (#19252) libsixel: migrate to Conan v2 * libsixel: migrate to Conan v2 * libsixel: bump deps * libsixel: remove incorrect library files * libsixel: fix_apple_shared_install_name() --- recipes/libsixel/all/conanfile.py | 107 ++++++++++-------- .../libsixel/all/test_package/CMakeLists.txt | 5 +- .../libsixel/all/test_package/conanfile.py | 21 +++- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../libsixel/all/test_v1_package/conanfile.py | 17 +++ 5 files changed, 102 insertions(+), 56 deletions(-) create mode 100644 recipes/libsixel/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/libsixel/all/test_v1_package/conanfile.py diff --git a/recipes/libsixel/all/conanfile.py b/recipes/libsixel/all/conanfile.py index 8748a8a951d30..5b731a76e5de8 100644 --- a/recipes/libsixel/all/conanfile.py +++ b/recipes/libsixel/all/conanfile.py @@ -1,18 +1,28 @@ import os -import functools -from conans import ConanFile, Meson, tools -from conans.errors import ConanInvalidConfiguration + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.build import cross_building +from conan.tools.files import copy, get, rmdir, rm +from conan.tools.gnu import PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.meson import MesonToolchain, Meson from conan.tools.microsoft import is_msvc -required_conan_version = ">=1.33.0" +required_conan_version = ">=1.53.0" + class LibSixelConan(ConanFile): name = "libsixel" - description = "A SIXEL encoder/decoder implementation derived from kmiya's sixel (https://github.com/saitoha/sixel)." - topics = ("sixel") + description = ("A SIXEL encoder/decoder implementation derived from kmiya's sixel" + " (https://github.com/saitoha/sixel).") license = "MIT" - homepage = "https://github.com/libsixel/libsixel" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/libsixel/libsixel" + topics = "sixel" + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -32,75 +42,80 @@ class LibSixelConan(ConanFile): "with_jpeg": True, "with_png": True, } - generators = "cmake", "pkg_config" - - @property - def _source_subfolder(self): - return "source_subfolder" def config_options(self): - if self.settings.os == 'Windows': + if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.cppstd - del self.settings.compiler.libcxx - - def validate(self): - if hasattr(self, "settings_build") and tools.cross_building(self): - raise ConanInvalidConfiguration("Cross-building not implemented") - if is_msvc(self): - raise ConanInvalidConfiguration("{}/{} does not support Visual Studio".format(self.name, self.version)) + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") - def build_requirements(self): - self.build_requires("meson/0.62.2") - self.build_requires("pkgconf/1.7.4") + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): if self.options.with_curl: - self.requires("libcurl/7.83.1") + self.requires("libcurl/8.2.0") if self.options.with_gd: - self.requires("libgd/2.3.2") + self.requires("libgd/2.3.3") if self.options.with_gdk_pixbuf2: - self.requires("gdk-pixbuf/2.42.6") + self.requires("gdk-pixbuf/2.42.10") if self.options.with_jpeg: - self.requires("libjpeg/9d") + self.requires("libjpeg/9e") if self.options.with_png: - self.requires("libpng/1.6.37") + self.requires("libpng/1.6.40") + + def validate(self): + if hasattr(self, "settings_build") and cross_building(self): + raise ConanInvalidConfiguration("Cross-building not implemented") + if is_msvc(self): + raise ConanInvalidConfiguration(f"{self.ref} does not support Visual Studio") + + def build_requirements(self): + self.tool_requires("meson/1.2.0") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/1.9.5") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - @functools.lru_cache(1) - def _configure_meson(self): - meson = Meson(self) - defs = { + def generate(self): + tc = MesonToolchain(self) + tc.project_options = { "libcurl": "enabled" if self.options.with_curl else "disabled", "gd": "enabled" if self.options.with_gd else "disabled", "gdk-pixbuf2": "enabled" if self.options.with_gdk_pixbuf2 else "disabled", "img2sixel": "disabled", "sixel2png": "disabled", "python2": "disabled", + "libdir": "lib", } - meson.configure( - defs=defs, - source_folder=self._source_subfolder, - ) - return meson + tc.generate() + tc = PkgConfigDeps(self) + tc.generate() def build(self): - meson = self._configure_meson() + meson = Meson(self) + meson.configure() meson.build() def package(self): - self.copy("LICENSE*", dst="licenses", src=self._source_subfolder) - meson = self._configure_meson() + copy(self, "LICENSE*", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + meson = Meson(self) meson.install() - tools.rmdir(os.path.join(self.package_folder, "share")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + fix_apple_shared_install_name(self) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + if self.options.shared: + rm(self, "*.a", os.path.join(self.package_folder, "lib")) + rm(self, "*.lib", os.path.join(self.package_folder, "lib")) + else: + rm(self, "*.dll", os.path.join(self.package_folder, "bin")) + rm(self, "*.so*", os.path.join(self.package_folder, "lib")) + rm(self, "*.dylib", os.path.join(self.package_folder, "lib")) def package_info(self): self.cpp_info.libs = ["sixel"] diff --git a/recipes/libsixel/all/test_package/CMakeLists.txt b/recipes/libsixel/all/test_package/CMakeLists.txt index 199ae95ae65fc..9bb9b6871d67d 100644 --- a/recipes/libsixel/all/test_package/CMakeLists.txt +++ b/recipes/libsixel/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(libsixel REQUIRED CONFIG) add_executable(${PROJECT_NAME} ${PROJECT_NAME}.c) diff --git a/recipes/libsixel/all/test_package/conanfile.py b/recipes/libsixel/all/test_package/conanfile.py index e556cc050d509..ef5d7042163ec 100644 --- a/recipes/libsixel/all/test_package/conanfile.py +++ b/recipes/libsixel/all/test_package/conanfile.py @@ -1,10 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools -class TestConan(ConanFile): +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/libsixel/all/test_v1_package/CMakeLists.txt b/recipes/libsixel/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libsixel/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libsixel/all/test_v1_package/conanfile.py b/recipes/libsixel/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..e556cc050d509 --- /dev/null +++ b/recipes/libsixel/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 826e03f0adae39187c8658abad3520b04fd23b88 Mon Sep 17 00:00:00 2001 From: temap Date: Wed, 6 Sep 2023 20:55:01 +0300 Subject: [PATCH 539/637] (#19493) linux-headers-generic: add version 5.15.128 --- recipes/linux-headers-generic/all/conandata.yml | 3 +++ recipes/linux-headers-generic/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/linux-headers-generic/all/conandata.yml b/recipes/linux-headers-generic/all/conandata.yml index ecc5fdb03690f..3086bd648e6c6 100644 --- a/recipes/linux-headers-generic/all/conandata.yml +++ b/recipes/linux-headers-generic/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.15.128": + url: "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.128.tar.gz" + sha256: "4ce1331bb3877bc92581ec5faff76d63d19e7b1fa174acdda1f5cba4a8f2abf7" "5.14.9": url: "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.14.9.tar.gz" sha256: "b5cd37e6d193c8f6a98e41ce6f9d97260d178e0a3cfc43d7ff684f67c6c25f29" diff --git a/recipes/linux-headers-generic/config.yml b/recipes/linux-headers-generic/config.yml index a8d9d5e7bbfa8..d4c808d80cdc5 100644 --- a/recipes/linux-headers-generic/config.yml +++ b/recipes/linux-headers-generic/config.yml @@ -1,4 +1,6 @@ versions: + "5.15.128": + folder: all "5.14.9": folder: all "5.13.9": From 1b8825365f000babd8535f47d6ec9704beb472df Mon Sep 17 00:00:00 2001 From: temap Date: Wed, 6 Sep 2023 21:36:56 +0300 Subject: [PATCH 540/637] (#19495) xmlsec: add version 1.2.33 --- recipes/xmlsec/all/conandata.yml | 3 +++ recipes/xmlsec/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/xmlsec/all/conandata.yml b/recipes/xmlsec/all/conandata.yml index 46664dc0decc9..d74fd9230c88c 100644 --- a/recipes/xmlsec/all/conandata.yml +++ b/recipes/xmlsec/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.33": + url: "https://www.aleksey.com/xmlsec/download/older-releases/xmlsec1-1.2.33.tar.gz" + sha256: "26041d35a20a245ed5a2fb9ee075f10825664d274220cb5190340fa87a4d0931" "1.2.32": url: "https://www.aleksey.com/xmlsec/download/older-releases/xmlsec1-1.2.32.tar.gz" sha256: "e383702853236004e5b08e424b8afe9b53fe9f31aaa7a5382f39d9533eb7c043" diff --git a/recipes/xmlsec/config.yml b/recipes/xmlsec/config.yml index be77378a24392..3853f0ae48f16 100644 --- a/recipes/xmlsec/config.yml +++ b/recipes/xmlsec/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.33": + folder: all "1.2.32": folder: all "1.2.31": From 2771cb36f381a93e1409b41b941fc9492debb80b Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 6 Sep 2023 21:39:03 +0200 Subject: [PATCH 541/637] (#19500) autoconf: less verbose package_info() --- recipes/autoconf/all/conanfile.py | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/recipes/autoconf/all/conanfile.py b/recipes/autoconf/all/conanfile.py index e8f1925de206c..6030c1664be5b 100644 --- a/recipes/autoconf/all/conanfile.py +++ b/recipes/autoconf/all/conanfile.py @@ -108,29 +108,14 @@ def package_info(self): # TODO: These variables can be removed since the scripts now locate the resources # relative to themselves. dataroot_path = os.path.join(self.package_folder, "res", "autoconf") - self.output.info(f"Defining AC_MACRODIR environment variable: {dataroot_path}") self.buildenv_info.define_path("AC_MACRODIR", dataroot_path) - - self.output.info(f"Defining autom4te_perllibdir environment variable: {dataroot_path}") self.buildenv_info.define_path("autom4te_perllibdir", dataroot_path) bin_path = os.path.join(self.package_folder, "bin") - - autoconf_bin = os.path.join(bin_path, "autoconf") - self.output.info(f"Defining AUTOCONF environment variable: {autoconf_bin}") - self.buildenv_info.define_path("AUTOCONF", autoconf_bin) - - autoreconf_bin = os.path.join(bin_path, "autoreconf") - self.output.info(f"Defining AUTORECONF environment variable: {autoreconf_bin}") - self.buildenv_info.define_path("AUTORECONF", autoreconf_bin) - - autoheader_bin = os.path.join(bin_path, "autoheader") - self.output.info(f"Defining AUTOHEADER environment variable: {autoheader_bin}") - self.buildenv_info.define_path("AUTOHEADER", autoheader_bin) - - autom4te_bin = os.path.join(bin_path, "autom4te") - self.output.info(f"Defining AUTOM4TE environment variable: {autom4te_bin}") - self.buildenv_info.define_path("AUTOM4TE", autom4te_bin) + self.buildenv_info.define_path("AUTOCONF", os.path.join(bin_path, "autoconf")) + self.buildenv_info.define_path("AUTORECONF", os.path.join(bin_path, "autoreconf")) + self.buildenv_info.define_path("AUTOHEADER", os.path.join(bin_path, "autoheader")) + self.buildenv_info.define_path("AUTOM4TE", os.path.join(bin_path, "autom4te")) # TODO: to remove in conan v2 self.env_info.PATH.append(bin_path) From b2242f628686844f0cd979fd27a2eb96396f908c Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 7 Sep 2023 05:13:20 +0900 Subject: [PATCH 542/637] (#19566) octo-encryption-cpp: support conan v2, add package_type, relax openssl and cmake versions * octo-encryption-cpp: support conan v2, add package_type, relax openssl and cmake versions * make openssl transitive_headers --- recipes/octo-encryption-cpp/all/conandata.yml | 4 +- recipes/octo-encryption-cpp/all/conanfile.py | 64 ++++++++++--------- .../all/test_package/CMakeLists.txt | 8 +-- .../all/test_package/conanfile.py | 20 +++--- 4 files changed, 49 insertions(+), 47 deletions(-) diff --git a/recipes/octo-encryption-cpp/all/conandata.yml b/recipes/octo-encryption-cpp/all/conandata.yml index 1e42247500f04..d2c6c293649c6 100644 --- a/recipes/octo-encryption-cpp/all/conandata.yml +++ b/recipes/octo-encryption-cpp/all/conandata.yml @@ -1,4 +1,4 @@ sources: "1.1.0": - sha256: f595eb6c44187e8f5f047fc7bd6747ba0d50ad99f526fe87c16fdba9c77b513d - url: https://github.com/ofiriluz/octo-encryption-cpp/archive/refs/tags/v1.1.0.tar.gz + url: "https://github.com/ofiriluz/octo-encryption-cpp/archive/refs/tags/v1.1.0.tar.gz" + sha256: "f595eb6c44187e8f5f047fc7bd6747ba0d50ad99f526fe87c16fdba9c77b513d" diff --git a/recipes/octo-encryption-cpp/all/conanfile.py b/recipes/octo-encryption-cpp/all/conanfile.py index 991faa27ffc84..263f2034b1a24 100644 --- a/recipes/octo-encryption-cpp/all/conanfile.py +++ b/recipes/octo-encryption-cpp/all/conanfile.py @@ -4,19 +4,24 @@ from conan.tools.build import check_min_cppstd from conan.errors import ConanInvalidConfiguration from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc_static_runtime import os -required_conan_version = ">=1.50.0" - +required_conan_version = ">=1.53.0" class OctoEncryptionCPPConan(ConanFile): name = "octo-encryption-cpp" + description = "Octo encryption library" license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/ofiriluz/octo-encryption-cpp" - description = "Octo encryption library" topics = ("cryptography", "cpp") - settings = "os", "compiler", "build_type", "arch" + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" + + @property + def _min_cppstd(self): + return 17 @property def _compilers_minimum_version(self): @@ -25,45 +30,41 @@ def _compilers_minimum_version(self): "clang": "9", "apple-clang": "11", "Visual Studio": "16", - "msvc": "1923", + "msvc": "192", } - def generate(self): - tc = CMakeToolchain(self) - tc.variables["DISABLE_TESTS"] = True - tc.variables["DISABLE_EXAMPLES"] = True - tc.generate() - cd = CMakeDeps(self) - cd.generate() - def layout(self): cmake_layout(self, src_folder="src") - def validate(self): - if self.info.settings.compiler.cppstd: - check_min_cppstd(self, "17") + def requirements(self): + self.requires("openssl/[>=1.1 <4]", transitive_headers=True) + def validate(self): + if self.info.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.info.settings.compiler), False) if minimum_version and Version(self.info.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration( - f"{self.name} requires C++17, which your compiler does not support." + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) - else: - self.output.warn(f"{self.name} requires C++17. Your compiler is unknown. Assuming it supports C++17.") if self.settings.compiler == "clang" and self.settings.compiler.get_safe("libcxx") == "libc++": raise ConanInvalidConfiguration(f"{self.name} does not support clang with libc++. Use libstdc++ instead.") - if self.settings.compiler == "Visual Studio" and self.settings.compiler.runtime in ["MTd", "MT"]: - raise ConanInvalidConfiguration(f"{self.name} does not support MSVC MT/MTd configurations, only MD/MDd is supported") + if is_msvc_static_runtime(self): + raise ConanInvalidConfiguration(f"{self.ref} does not support MSVC MT/MTd configurations, only MD/MDd is supported") - def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + def build_requirements(self): + self.tool_requires("cmake/[>=3.16 <4]") - def requirements(self): - self.requires("openssl/1.1.1q") + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build_requirements(self): - self.build_requires("cmake/3.24.0") + def generate(self): + tc = CMakeToolchain(self) + tc.variables["DISABLE_TESTS"] = True + tc.variables["DISABLE_EXAMPLES"] = True + tc.generate() + cd = CMakeDeps(self) + cd.generate() def build(self): cmake = CMake(self) @@ -76,11 +77,14 @@ def package(self): cmake.install() def package_info(self): + self.cpp_info.libs = ["octo-encryption-cpp"] + self.cpp_info.set_property("cmake_file_name", "octo-encryption-cpp") self.cpp_info.set_property("cmake_target_name", "octo::octo-encryption-cpp") self.cpp_info.set_property("pkg_config_name", "octo-encryption-cpp") - self.cpp_info.libs = ["octo-encryption-cpp"] + self.cpp_info.requires = ["openssl::openssl"] + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.names["cmake_find_package"] = "octo-encryption-cpp" self.cpp_info.names["cmake_find_package_multi"] = "octo-encryption-cpp" self.cpp_info.names["pkg_config"] = "octo-encryption-cpp" - self.cpp_info.requires = ["openssl::openssl"] diff --git a/recipes/octo-encryption-cpp/all/test_package/CMakeLists.txt b/recipes/octo-encryption-cpp/all/test_package/CMakeLists.txt index a07fac747020c..bd49d24ed139e 100644 --- a/recipes/octo-encryption-cpp/all/test_package/CMakeLists.txt +++ b/recipes/octo-encryption-cpp/all/test_package/CMakeLists.txt @@ -1,8 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package CXX) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) find_package(octo-encryption-cpp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} octo::octo-encryption-cpp) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) +target_link_libraries(${PROJECT_NAME} PRIVATE octo::octo-encryption-cpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/octo-encryption-cpp/all/test_package/conanfile.py b/recipes/octo-encryption-cpp/all/test_package/conanfile.py index 62e07ce5add59..ef5d7042163ec 100644 --- a/recipes/octo-encryption-cpp/all/test_package/conanfile.py +++ b/recipes/octo-encryption-cpp/all/test_package/conanfile.py @@ -1,19 +1,16 @@ -from conans import ConanFile -from conan.tools.cmake import CMake, CMakeToolchain +from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout +from conan.tools.cmake import cmake_layout, CMake import os -required_conan_version = ">=1.43.0" - class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "CMakeDeps", "VirtualRunEnv" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" - def generate(self): - tc = CMakeToolchain(self) - tc.generate() + def requirements(self): + self.requires(self.tested_reference_str) def layout(self): cmake_layout(self) @@ -25,4 +22,5 @@ def build(self): def test(self): if can_run(self): - self.run(os.path.join(self.cpp.build.bindirs[0], "test_package"), env="conanrun") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") From cb4d2464ee5dfc4f3d85b4d3c4984bafd80bdff7 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 7 Sep 2023 05:52:10 +0900 Subject: [PATCH 543/637] (#19568) cppitertools: support conan v2 more, update boost --- recipes/cppitertools/all/conandata.yml | 4 +- recipes/cppitertools/all/conanfile.py | 82 ++++++++++--------- .../all/test_package/CMakeLists.txt | 12 +-- .../all/test_package/conanfile.py | 1 + 4 files changed, 53 insertions(+), 46 deletions(-) diff --git a/recipes/cppitertools/all/conandata.yml b/recipes/cppitertools/all/conandata.yml index b8a68ed038695..0337148504871 100644 --- a/recipes/cppitertools/all/conandata.yml +++ b/recipes/cppitertools/all/conandata.yml @@ -1,4 +1,4 @@ sources: "2.1": - url: https://github.com/ryanhaining/cppitertools/archive/v2.1.tar.gz - sha256: f7bcd4531e37083609bb92c3f0ae03b56e7197002d0dc9c695104dcef445f2ab + url: "https://github.com/ryanhaining/cppitertools/archive/v2.1.tar.gz" + sha256: "f7bcd4531e37083609bb92c3f0ae03b56e7197002d0dc9c695104dcef445f2ab" diff --git a/recipes/cppitertools/all/conanfile.py b/recipes/cppitertools/all/conanfile.py index 15118a8925b22..d59270a8f393a 100644 --- a/recipes/cppitertools/all/conanfile.py +++ b/recipes/cppitertools/all/conanfile.py @@ -1,69 +1,75 @@ import os from conan import ConanFile from conan.tools.build import check_min_cppstd -from conan.tools.files import get, copy, rename +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout from conan.tools.scm import Version from conan.errors import ConanInvalidConfiguration -required_conan_version = ">=1.50.0" +required_conan_version = ">=1.53.0" class CppItertoolsConan(ConanFile): name = "cppitertools" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/ryanhaining/cppitertools" description = "Implementation of python itertools and builtin iteration functions for C++17" - topics = ("cpp17", "iter", "itertools") license = "BSD-2-Clause" - no_copy_source = True - + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ryanhaining/cppitertools" + topics = ("cpp17", "iter", "itertools", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" - options = {'zip_longest': [True, False]} - default_options = {'zip_longest': False} + options = { + 'zip_longest': [True, False], + } + default_options = { + 'zip_longest': False, + } + no_copy_source = True @property - def _source_subfolder(self): - return "source_subfolder" - - def source(self): - get(self, **self.conan_data["sources"][self.version]) - extracted_dir = self.name + "-" + self.version - rename(self, extracted_dir, self._source_subfolder) - - def validate(self): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 17) + def _min_cppstd(self): + return 17 - minimal_version = { + @property + def _compilers_minimum_version(self): + return { "Visual Studio": "15", "msvc": "191", "gcc": "7", "clang": "5.0", "apple-clang": "9.1" } - compiler = str(self.settings.compiler) - compiler_version = Version(self.settings.compiler.version) - - if compiler not in minimal_version: - self.output.info("{} requires a compiler that supports at least C++17".format(self.name)) - return - # Exclude compilers not supported by cppitertools - if compiler_version < minimal_version[compiler]: - raise ConanInvalidConfiguration("{} requires a compiler that supports at least C++17. {} {} is not".format( - self.name, compiler, Version(self.settings.compiler.version.value))) + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): if self.options.zip_longest: - self.requires('boost/1.75.0') + self.requires('boost/1.83.0') + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - copy(self, "*.hpp", src=os.path.join(self.source_folder, self._source_subfolder), dst=os.path.join(self.package_folder,"include", "cppitertools"), excludes=('examples/**', 'test/**')) - copy(self, "LICENSE.md", src=os.path.join(self.source_folder, self._source_subfolder), dst=os.path.join(self.package_folder,"licenses")) + copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "*.hpp", src=self.source_folder, dst=os.path.join(self.package_folder, "include", "cppitertools"), excludes=('examples/**', 'test/**')) + def package_info(self): - self.cpp_info.set_property("cmake_file_name", "cppitertools") - self.cpp_info.set_property("cmake_target_name", "cppitertools::cppitertools") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - def package_id(self): - self.info.clear() + + self.cpp_info.set_property("cmake_file_name", "cppitertools") + self.cpp_info.set_property("cmake_target_name", "cppitertools::cppitertools") + diff --git a/recipes/cppitertools/all/test_package/CMakeLists.txt b/recipes/cppitertools/all/test_package/CMakeLists.txt index 39161129005c3..18b263b57ca6f 100644 --- a/recipes/cppitertools/all/test_package/CMakeLists.txt +++ b/recipes/cppitertools/all/test_package/CMakeLists.txt @@ -1,14 +1,14 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package CXX) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) find_package(cppitertools REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} cppitertools::cppitertools) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) +target_link_libraries(${PROJECT_NAME} PRIVATE cppitertools::cppitertools) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) if(ZIP_LONGEST) add_executable(test_zip_longest test_zip_longest.cpp) - target_link_libraries(test_zip_longest cppitertools::cppitertools) - set_property(TARGET test_zip_longest PROPERTY CXX_STANDARD 17) + target_link_libraries(test_zip_longest PRIVATE cppitertools::cppitertools) + target_compile_features(test_zip_longest PRIVATE cxx_std_17) endif() diff --git a/recipes/cppitertools/all/test_package/conanfile.py b/recipes/cppitertools/all/test_package/conanfile.py index 758d48b5853ba..fac50abb3d577 100644 --- a/recipes/cppitertools/all/test_package/conanfile.py +++ b/recipes/cppitertools/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" + test_type = "explicit" def generate(self): tc = CMakeToolchain(self) From 8e5020b457ae9c2e8ee3d246468d2543156c85b5 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 6 Sep 2023 23:15:45 +0200 Subject: [PATCH 544/637] (#19610) freetype: bump brotli, restore fixed version of libpng, and proper version range for zlib --- recipes/freetype/all/conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/freetype/all/conanfile.py b/recipes/freetype/all/conanfile.py index 5073e3cf9b655..1415f8ffb0446 100644 --- a/recipes/freetype/all/conanfile.py +++ b/recipes/freetype/all/conanfile.py @@ -64,13 +64,13 @@ def layout(self): def requirements(self): if self.options.with_png: - self.requires("libpng/[>=1.6 <1.7]") + self.requires("libpng/1.6.40") if self.options.with_zlib: - self.requires("zlib/[>=1.2 <1.3]") + self.requires("zlib/[>=1.2.10 <2]") if self.options.with_bzip2: self.requires("bzip2/1.0.8") if self.options.get_safe("with_brotli"): - self.requires("brotli/1.0.9") + self.requires("brotli/1.1.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From c1788389e9c867623a87763fbad3b986697aa5a4 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 7 Sep 2023 06:51:34 +0900 Subject: [PATCH 545/637] (#19622) daw_header_libraries: add version 2.96.1 --- recipes/daw_header_libraries/all/conandata.yml | 3 +++ recipes/daw_header_libraries/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/daw_header_libraries/all/conandata.yml b/recipes/daw_header_libraries/all/conandata.yml index 76073e7c9033b..f07d3ecdd0bdb 100644 --- a/recipes/daw_header_libraries/all/conandata.yml +++ b/recipes/daw_header_libraries/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.96.1": + url: "https://github.com/beached/header_libraries/archive/v2.96.1.tar.gz" + sha256: "2a9a5c33baa9e3adc1d82fa13a56522638af13cc39372a0c1c8f5c5d984f1464" "2.95.0": url: "https://github.com/beached/header_libraries/archive/v2.95.0.tar.gz" sha256: "8799c06f0587b202fd6049d95e70b04675acbfdbf6e86ac3bbd061cbb9d42b54" diff --git a/recipes/daw_header_libraries/config.yml b/recipes/daw_header_libraries/config.yml index 6a27257347e52..e5da3ea85fe21 100644 --- a/recipes/daw_header_libraries/config.yml +++ b/recipes/daw_header_libraries/config.yml @@ -1,4 +1,6 @@ versions: + "2.96.1": + folder: all "2.95.0": folder: all "2.93.1": From 9393765500d77219be327a7578da3c386a60ad72 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 7 Sep 2023 11:04:31 +0300 Subject: [PATCH 546/637] (#18180) aravis: add package_type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * aravis: add package_type * aravis: restore test_v1_package * aravis: use is_apple_os() * aravis: bump deps * aravis: add transitive_headers=True, bump deps * User hsot version for glib * Apply suggestions from code review Co-authored-by: ericLemanissier --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: ericLemanissier --- recipes/aravis/all/conanfile.py | 26 ++++++++++--------- .../aravis/all/test_package/CMakeLists.txt | 2 +- .../aravis/all/test_package/test_package.c | 5 ++-- .../aravis/all/test_v1_package/CMakeLists.txt | 6 ++--- 4 files changed, 20 insertions(+), 19 deletions(-) diff --git a/recipes/aravis/all/conanfile.py b/recipes/aravis/all/conanfile.py index aaa8cad5fb1b4..6ccff17b4bf8e 100644 --- a/recipes/aravis/all/conanfile.py +++ b/recipes/aravis/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.apple import fix_apple_shared_install_name, is_apple_os from conan.tools.build import cross_building from conan.tools.env import VirtualBuildEnv, VirtualRunEnv from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, rename, rm, rmdir @@ -12,16 +12,18 @@ import os import glob -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.56.0 <2 || >=2.0.6" class AravisConan(ConanFile): name = "aravis" + description = "A vision library for genicam based cameras." license = "LGPL-2.1-or-later" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/AravisProject/aravis" - description = "A vision library for genicam based cameras." topics = ("usb", "camera") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -48,7 +50,7 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if self.settings.os != "Linux": + if self.settings.os not in ["Linux", "FreeBSD"]: del self.options.packet_socket def configure(self): @@ -63,13 +65,14 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("glib/2.75.2") - self.requires("libxml2/2.10.3") + # glib-object.h and gio/gio.h are used in several public headers + self.requires("glib/2.77.2", transitive_headers=True) + self.requires("libxml2/2.11.4") self.requires("zlib/1.2.13") if self.options.usb: self.requires("libusb/1.0.26") if self.options.gst_plugin: - self.requires("gstreamer/1.19.2") + self.requires("gstreamer/1.22.3") self.requires("gst-plugins-base/1.19.2") def validate(self): @@ -77,18 +80,17 @@ def validate(self): raise ConanInvalidConfiguration("Static runtime is not supported on Windows due to GLib issues") if self.options.shared and not self.dependencies["glib"].options.shared: raise ConanInvalidConfiguration("Shared Aravis cannot link to static GLib") - if self.settings.os == "Macos" and self.dependencies["glib"].options.shared: + if is_apple_os(self) and self.dependencies["glib"].options.shared: raise ConanInvalidConfiguration( "macOS builds are disabled when glib is shared until " "conan-io/conan#7324 gets merged to fix macOS SIP issue #8443" ) def build_requirements(self): - self.tool_requires("meson/1.0.0") - if hasattr(self, "settings_build") and cross_building(self): - self.tool_requires("glib/2.75.2") + self.tool_requires("meson/1.2.1") + self.tool_requires("glib/") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/1.9.3") + self.tool_requires("pkgconf/1.9.5") if self.options.introspection: self.tool_requires("gobject-introspection/1.72.0") diff --git a/recipes/aravis/all/test_package/CMakeLists.txt b/recipes/aravis/all/test_package/CMakeLists.txt index 8a5d8c220194f..f8a36c47767ce 100644 --- a/recipes/aravis/all/test_package/CMakeLists.txt +++ b/recipes/aravis/all/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES C) find_package(aravis REQUIRED CONFIG) diff --git a/recipes/aravis/all/test_package/test_package.c b/recipes/aravis/all/test_package/test_package.c index 9a63b9ea3a864..762afa0db71a7 100644 --- a/recipes/aravis/all/test_package/test_package.c +++ b/recipes/aravis/all/test_package/test_package.c @@ -1,9 +1,8 @@ #include -#include #include +#include -int main(int argc, char **argv) -{ +int main() { printf("Enumerating Aravis interfaces:\n"); unsigned int if_count = arv_get_n_interfaces(); for (unsigned int if_index = 0; if_index < if_count; if_index++) { diff --git a/recipes/aravis/all/test_v1_package/CMakeLists.txt b/recipes/aravis/all/test_v1_package/CMakeLists.txt index 0d20897301b68..91630d79f4abb 100644 --- a/recipes/aravis/all/test_v1_package/CMakeLists.txt +++ b/recipes/aravis/all/test_v1_package/CMakeLists.txt @@ -1,8 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) From 43313ebbdd30ba8b09ca3066bc0fa606b9431893 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Thu, 7 Sep 2023 10:30:52 +0200 Subject: [PATCH 547/637] (#19438) onnxruntime/all: bump deps * onnxruntime/all: bump onnx * bump protobuf * bump wil * remove Protobuf patch --- recipes/onnxruntime/all/conanfile.py | 6 +++--- .../all/patches/1.15.1-0001-cmake-dependencies.patch | 9 --------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/recipes/onnxruntime/all/conanfile.py b/recipes/onnxruntime/all/conanfile.py index c69e32a34aa82..dc0f2dce95435 100644 --- a/recipes/onnxruntime/all/conanfile.py +++ b/recipes/onnxruntime/all/conanfile.py @@ -68,12 +68,12 @@ def _onnx_version(self): version = Version(self.version) return { "1.14": "1.13.1", - "1.15": "1.14.0", + "1.15": "1.14.1", }[f"{version.major}.{version.minor}"] def requirements(self): self.requires("abseil/20230125.3") - self.requires("protobuf/3.21.9") + self.requires("protobuf/3.21.12") self.requires("date/3.0.1") self.requires("re2/20230801") self.requires(f"onnx/{self._onnx_version}") @@ -87,7 +87,7 @@ def requirements(self): if self.settings.os != "Windows": self.requires("nsync/1.26.0") else: - self.requires("wil/1.0.230629.1") + self.requires("wil/1.0.230824.2") if self.options.with_xnnpack: self.requires("xnnpack/cci.20220801") diff --git a/recipes/onnxruntime/all/patches/1.15.1-0001-cmake-dependencies.patch b/recipes/onnxruntime/all/patches/1.15.1-0001-cmake-dependencies.patch index bee9115bc809e..4ebc87b3a4ddc 100644 --- a/recipes/onnxruntime/all/patches/1.15.1-0001-cmake-dependencies.patch +++ b/recipes/onnxruntime/all/patches/1.15.1-0001-cmake-dependencies.patch @@ -30,15 +30,6 @@ diff --git a/cmake/external/onnxruntime_external_deps.cmake b/cmake/external/onn index 9effd1a2db..a059c28e36 100644 --- a/cmake/external/onnxruntime_external_deps.cmake +++ b/cmake/external/onnxruntime_external_deps.cmake -@@ -152,7 +152,7 @@ FetchContent_Declare( - URL ${DEP_URL_protobuf} - URL_HASH SHA1=${DEP_SHA1_protobuf} - PATCH_COMMAND ${ONNXRUNTIME_PROTOBUF_PATCH_COMMAND} -- FIND_PACKAGE_ARGS 3.21.12 NAMES Protobuf -+ FIND_PACKAGE_ARGS NAMES Protobuf - ) - set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests" FORCE) - if (CMAKE_SYSTEM_NAME STREQUAL "Android") @@ -173,6 +173,7 @@ FetchContent_Declare( date URL ${DEP_URL_date} From 5c257277231e50416ff7aea644fdfaa639b11f92 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Thu, 7 Sep 2023 11:32:50 +0200 Subject: [PATCH 548/637] (#19557) gdk-pixbuf: bump glib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gdk-pixbuf: bump glib * Update conanfile.py * Remove old glib workaround * Bump libpng --------- Co-authored-by: Rubén Rincón Blanco --- recipes/gdk-pixbuf/all/conanfile.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/recipes/gdk-pixbuf/all/conanfile.py b/recipes/gdk-pixbuf/all/conanfile.py index fe76b0dd2bad4..4f44d797427e7 100644 --- a/recipes/gdk-pixbuf/all/conanfile.py +++ b/recipes/gdk-pixbuf/all/conanfile.py @@ -12,13 +12,13 @@ import os -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.56.0 <2 || >=2.0.6" class GdkPixbufConan(ConanFile): name = "gdk-pixbuf" description = "toolkit for image loading and pixel buffer manipulation" - topics = ("gdk-pixbuf", "image") + topics = ("image") url = "https://github.com/conan-io/conan-center-index" homepage = "https://developer.gnome.org/gdk-pixbuf/" license = "LGPL-2.1-or-later" @@ -63,9 +63,9 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("glib/2.76.0", transitive_headers=True, transitive_libs=True, run=can_run(self)) + self.requires("glib/2.77.0", transitive_headers=True, transitive_libs=True) if self.options.with_libpng: - self.requires("libpng/1.6.39") + self.requires("libpng/1.6.40") if self.options.with_libtiff: self.requires("libtiff/4.4.0") if self.options.with_libjpeg == "libjpeg-turbo": @@ -93,8 +93,7 @@ def build_requirements(self): self.tool_requires("meson/1.0.0") if not self.conf.get("tools.gnu:pkg_config", check_type=str): self.tool_requires("pkgconf/1.9.3") - if not can_run(self): - self.tool_requires("glib/2.76.0") + self.tool_requires("glib/") if self.options.with_introspection: self.tool_requires("gobject-introspection/1.72.0") From 211cb331e24e6f7e6226f9acf441264d28d5ec77 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 7 Sep 2023 19:15:55 +0900 Subject: [PATCH 549/637] (#19616) wasmer: add version 4.2.0 --- recipes/wasmer/all/conandata.yml | 27 +++++++++++++++++++++++++++ recipes/wasmer/config.yml | 2 ++ 2 files changed, 29 insertions(+) diff --git a/recipes/wasmer/all/conandata.yml b/recipes/wasmer/all/conandata.yml index 9f36767ca9925..8b03fa42930cd 100644 --- a/recipes/wasmer/all/conandata.yml +++ b/recipes/wasmer/all/conandata.yml @@ -1,4 +1,31 @@ sources: + "4.2.0": + Windows: + "x86_64": + "Visual Studio": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.0/wasmer-windows-amd64.tar.gz" + sha256: "f2eeff46e6974f06d1ee3dc64515a2fbd9f0897575ce7e8ed5c6e3b4353ded24" + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.0/wasmer-windows-gnu64.tar.gz" + sha256: "13374b1d781a2aec2cb981f8c38ad0935476c7d508b993bc48f684a13e283943" + Linux: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.0/wasmer-linux-amd64.tar.gz" + sha256: "3ea947b1accb6247aa90d914331132827c49a422d2dba8459e2f0cf02c1acf80" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.0/wasmer-linux-aarch64.tar.gz" + sha256: "681fe6ad3e7f139d3d2ed8cfbf6ceb4d54098c32da9663bbf849e6429d6e8f1c" + Macos: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.0/wasmer-darwin-amd64.tar.gz" + sha256: "4d629eafe6d7249b276691cb0f834d7d00cf89953700628abe06a224f76b7d79" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.0/wasmer-darwin-arm64.tar.gz" + sha256: "ab928c3717c2597f484868d5d97baabe939bffeb1ba38f348bcda9c828022069" "4.1.1": Windows: "x86_64": diff --git a/recipes/wasmer/config.yml b/recipes/wasmer/config.yml index bac9dd3778328..1f9b03131e570 100644 --- a/recipes/wasmer/config.yml +++ b/recipes/wasmer/config.yml @@ -1,4 +1,6 @@ versions: + "4.2.0": + folder: "all" "4.1.1": folder: "all" "4.0.0": From d7b63348552d3e26fb2b581f9ed8923fe2a6ded3 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 7 Sep 2023 19:53:11 +0900 Subject: [PATCH 550/637] (#19623) zmqpp: support conan v2 more, add patch description * zmqpp: support conan v2 more, add patch description * make zeromq transitive_libs Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com> --------- Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com> --- recipes/zmqpp/all/conandata.yml | 6 ++++++ recipes/zmqpp/all/conanfile.py | 26 +++++++++++++------------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/recipes/zmqpp/all/conandata.yml b/recipes/zmqpp/all/conandata.yml index b8b843edf38c8..4bc0fe616e574 100644 --- a/recipes/zmqpp/all/conandata.yml +++ b/recipes/zmqpp/all/conandata.yml @@ -5,5 +5,11 @@ sources: patches: "4.2.0": - patch_file: "patches/0001-fix-cmake.patch" + patch_description: "use cci's zeromq, separate shared and static build" + patch_type: "conan" - patch_file: "patches/0002-missing-includes.patch" + patch_description: "include missing includes" + patch_type: "portability" - patch_file: "patches/0003-Allow-building-with-Werror-undef.patch" + patch_description: "fix WIN32 detection" + patch_type: "portability" diff --git a/recipes/zmqpp/all/conanfile.py b/recipes/zmqpp/all/conanfile.py index 8d4bf7d455227..a4ed7a7549f25 100644 --- a/recipes/zmqpp/all/conanfile.py +++ b/recipes/zmqpp/all/conanfile.py @@ -4,20 +4,20 @@ from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get import os -required_conan_version = ">=1.52.0" +required_conan_version = ">=1.53.0" class ZmqppConan(ConanFile): name = "zmqpp" - homepage = "https://github.com/zeromq/zmqpp" - license = "MPL-2.0" - url = "https://github.com/conan-io/conan-center-index" description = ( "This C++ binding for 0mq/zmq is a 'high-level' library that hides " "most of the c-style interface core 0mq provides." ) + license = "MPL-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/zeromq/zmqpp" topics = ("zmq", "0mq", "zeromq", "message-queue", "asynchronous") - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -28,6 +28,10 @@ class ZmqppConan(ConanFile): "fPIC": True, } + @property + def _min_cppstd(self): + return 11 + def export_sources(self): export_conandata_patches(self) @@ -37,24 +41,20 @@ def config_options(self): def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("zeromq/4.3.4") + self.requires("zeromq/4.3.4", transitive_headers=True, transitive_libs=True) def validate(self): if self.info.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) + check_min_cppstd(self, self._min_cppstd) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) From 96d8d9952ca43b1ff87159019908ca7851616b47 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 7 Sep 2023 20:37:25 +0900 Subject: [PATCH 551/637] (#19635) wasmtime: add version 12.0.1 --- recipes/wasmtime/all/conandata.yml | 30 ++++++++++++++++++++++++++++++ recipes/wasmtime/config.yml | 2 ++ 2 files changed, 32 insertions(+) diff --git a/recipes/wasmtime/all/conandata.yml b/recipes/wasmtime/all/conandata.yml index e337fecbbe977..59e975128a2ee 100644 --- a/recipes/wasmtime/all/conandata.yml +++ b/recipes/wasmtime/all/conandata.yml @@ -1,4 +1,34 @@ sources: + "12.0.1": + Windows: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.1/wasmtime-v12.0.1-x86_64-windows-c-api.zip" + sha256: "e5da4752260ffd38e28cc56fc1db6f3cec65f9bf352b5e9757a92873e5a6f408" + MinGW: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.1/wasmtime-v12.0.1-x86_64-mingw-c-api.zip" + sha256: "7b7a6c7d3e2603ec51837c28ec5c9306d599d44b707d052faa5102c691e07685" + Linux: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.1/wasmtime-v12.0.1-x86_64-linux-c-api.tar.xz" + sha256: "7f09952cba8e92ff3bd18ad59b847fb353a6cd6c9069b38c1b9763610616347f" + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.1/wasmtime-v12.0.1-aarch64-linux-c-api.tar.xz" + sha256: "fd7080f59413aca47e473e2f2517fbd75ef16d963925a7333c09d0621c81b449" + "s390x": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.1/wasmtime-v12.0.1-s390x-linux-c-api.tar.xz" + sha256: "4482d42cf683f5ee4213fcb1c69f0b5fa7b4d948186d26ae6f647cc92ac4e779" + Macos: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.1/wasmtime-v12.0.1-x86_64-macos-c-api.tar.xz" + sha256: "89059ed138cb59c8c1f9008053da848d3d9e15c5edfe1a3f2f2d7c0c5bbf9597" + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.1/wasmtime-v12.0.1-aarch64-macos-c-api.tar.xz" + sha256: "8dca391f22cf53ae4b19a689e3a2cce87541bb4575a98d2f402f36402be419f7" + Android: + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.1/wasmtime-v12.0.1-aarch64-linux-c-api.tar.xz" + sha256: "fd7080f59413aca47e473e2f2517fbd75ef16d963925a7333c09d0621c81b449" "9.0.1": Windows: "x86_64": diff --git a/recipes/wasmtime/config.yml b/recipes/wasmtime/config.yml index dbe6065513d63..de77d1db49a4f 100644 --- a/recipes/wasmtime/config.yml +++ b/recipes/wasmtime/config.yml @@ -1,4 +1,6 @@ versions: + "12.0.1": + folder: all "9.0.1": folder: all "7.0.0": From 47aa07a40037dea99836ec706b49d069ae16998c Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 7 Sep 2023 21:13:14 +0900 Subject: [PATCH 552/637] (#19636) octo-keygen-cpp: update dependencies, add package_type --- recipes/octo-keygen-cpp/all/conandata.yml | 4 +- recipes/octo-keygen-cpp/all/conanfile.py | 72 ++++++++++--------- .../all/test_package/CMakeLists.txt | 8 +-- .../all/test_package/conanfile.py | 8 +-- .../all/test_package/test_package.cpp | 18 ----- 5 files changed, 48 insertions(+), 62 deletions(-) diff --git a/recipes/octo-keygen-cpp/all/conandata.yml b/recipes/octo-keygen-cpp/all/conandata.yml index 1915a524b0e38..2fde3196d3682 100644 --- a/recipes/octo-keygen-cpp/all/conandata.yml +++ b/recipes/octo-keygen-cpp/all/conandata.yml @@ -1,4 +1,4 @@ sources: "1.0.0": - sha256: c4c60b4defed781d164e8fcc002c98df6fef0166ac2a18c7919dbbda22accecf - url: https://github.com/ofiriluz/octo-keygen-cpp/archive/refs/tags/v1.0.0.tar.gz + url: "https://github.com/ofiriluz/octo-keygen-cpp/archive/refs/tags/v1.0.0.tar.gz" + sha256: "c4c60b4defed781d164e8fcc002c98df6fef0166ac2a18c7919dbbda22accecf" diff --git a/recipes/octo-keygen-cpp/all/conanfile.py b/recipes/octo-keygen-cpp/all/conanfile.py index 52e5634af7ecf..b9e37112cb2f5 100644 --- a/recipes/octo-keygen-cpp/all/conanfile.py +++ b/recipes/octo-keygen-cpp/all/conanfile.py @@ -2,8 +2,9 @@ from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout from conan.tools.files import get, copy from conan.tools.build import check_min_cppstd -from conan.errors import ConanInvalidConfiguration from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc_static_runtime +from conan.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.50.0" @@ -11,12 +12,17 @@ class OctoKeygenCPPConan(ConanFile): name = "octo-keygen-cpp" + description = "Key generation / certificate generation using openssl for CPP" license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/ofiriluz/octo-keygen-cpp" - description = "Octo keygen library" topics = ("pki", "keypair", "certificates", "cpp") - settings = "os", "compiler", "build_type", "arch" + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" + + @property + def _min_cppstd(self): + return 17 @property def _compilers_minimum_version(self): @@ -25,47 +31,43 @@ def _compilers_minimum_version(self): "clang": "9", "apple-clang": "11", "Visual Studio": "16", - "msvc": "1923", + "msvc": "192", } - def generate(self): - tc = CMakeToolchain(self) - tc.variables["DISABLE_TESTS"] = True - tc.generate() - cd = CMakeDeps(self) - cd.generate() - def layout(self): cmake_layout(self, src_folder="src") - def validate(self): - if self.info.settings.compiler.cppstd: - check_min_cppstd(self, "17") + def requirements(self): + self.requires("octo-logger-cpp/1.1.0", transitive_headers=True) + self.requires("octo-encryption-cpp/1.1.0", transitive_headers=True) + self.requires("fmt/10.1.1") + self.requires("openssl/[>=1.1 <4]") + def validate(self): + if self.info.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.info.settings.compiler), False) if minimum_version and Version(self.info.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration( - f"{self.name} requires C++17, which your compiler does not support." + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) - else: - self.output.warn(f"{self.name} requires C++17. Your compiler is unknown. Assuming it supports C++17.") if self.settings.compiler == "clang" and self.settings.compiler.get_safe("libcxx") == "libc++": - raise ConanInvalidConfiguration(f"{self.name} does not support clang with libc++. Use libstdc++ instead.") - if self.settings.compiler == "Visual Studio" and self.settings.compiler.runtime in ["MTd", "MT"]: - raise ConanInvalidConfiguration(f"{self.name} does not support MSVC MT/MTd configurations, only MD/MDd is supported") + raise ConanInvalidConfiguration(f"{self.ref} does not support clang with libc++. Use libstdc++ instead.") + if is_msvc_static_runtime(self): + raise ConanInvalidConfiguration(f"{self.ref} does not support MSVC MT/MTd configurations, only MD/MDd is supported") - def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + def build_requirements(self): + self.tool_requires("cmake/[>=3.16 <4]") - def requirements(self): - self.requires("octo-logger-cpp/1.1.0") - self.requires("octo-encryption-cpp/1.1.0") - self.requires("fmt/9.0.0") - self.requires("openssl/1.1.1q") + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build_requirements(self): - self.tool_requires("cmake/3.24.0") + def generate(self): + tc = CMakeToolchain(self) + tc.variables["DISABLE_TESTS"] = True + tc.generate() + cd = CMakeDeps(self) + cd.generate() def build(self): cmake = CMake(self) @@ -78,16 +80,18 @@ def package(self): cmake.install() def package_info(self): + self.cpp_info.libs = ["octo-keygen-cpp"] self.cpp_info.set_property("cmake_file_name", "octo-keygen-cpp") self.cpp_info.set_property("cmake_target_name", "octo::octo-keygen-cpp") self.cpp_info.set_property("pkg_config_name", "octo-keygen-cpp") - self.cpp_info.libs = ["octo-keygen-cpp"] - self.cpp_info.names["cmake_find_package"] = "octo-keygen-cpp" - self.cpp_info.names["cmake_find_package_multi"] = "octo-keygen-cpp" - self.cpp_info.names["pkg_config"] = "octo-keygen-cpp" self.cpp_info.requires = [ "fmt::fmt", "openssl::openssl", "octo-logger-cpp::octo-logger-cpp", "octo-encryption-cpp::octo-encryption-cpp" ] + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.names["cmake_find_package"] = "octo-keygen-cpp" + self.cpp_info.names["cmake_find_package_multi"] = "octo-keygen-cpp" + self.cpp_info.names["pkg_config"] = "octo-keygen-cpp" diff --git a/recipes/octo-keygen-cpp/all/test_package/CMakeLists.txt b/recipes/octo-keygen-cpp/all/test_package/CMakeLists.txt index 7a68c9f36c4bf..ec355db2143f3 100644 --- a/recipes/octo-keygen-cpp/all/test_package/CMakeLists.txt +++ b/recipes/octo-keygen-cpp/all/test_package/CMakeLists.txt @@ -1,8 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package CXX) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) find_package(octo-keygen-cpp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} octo::octo-keygen-cpp) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) +target_link_libraries(${PROJECT_NAME} PRIVATE octo::octo-keygen-cpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/octo-keygen-cpp/all/test_package/conanfile.py b/recipes/octo-keygen-cpp/all/test_package/conanfile.py index 6f1d3245dd7e8..bb7197d60a7c5 100644 --- a/recipes/octo-keygen-cpp/all/test_package/conanfile.py +++ b/recipes/octo-keygen-cpp/all/test_package/conanfile.py @@ -7,11 +7,11 @@ class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "CMakeDeps", "VirtualRunEnv" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" - def generate(self): - tc = CMakeToolchain(self) - tc.generate() + def requirements(self): + self.requires(self.tested_reference_str) def layout(self): cmake_layout(self) diff --git a/recipes/octo-keygen-cpp/all/test_package/test_package.cpp b/recipes/octo-keygen-cpp/all/test_package/test_package.cpp index 98222f149cce9..418c7b3cdcaa5 100644 --- a/recipes/octo-keygen-cpp/all/test_package/test_package.cpp +++ b/recipes/octo-keygen-cpp/all/test_package/test_package.cpp @@ -13,7 +13,6 @@ #include "octo-keygen-cpp/openssl/ssl-keypair.hpp" #include "octo-keygen-cpp/openssl/ssl-keypair-certificate-chain.hpp" #include "octo-keygen-cpp/openssl/ssl-keypair-certificate.hpp" -#include #include #include @@ -87,16 +86,6 @@ constexpr auto TARGET_CERT = "-----BEGIN CERTIFICATE-----\n" int main(int argc, char** argv) { - octo::logger::Logger logger("PSKeygen"); - std::shared_ptr config = - std::make_shared(); - octo::logger::SinkConfig console_writer_sink("Console", octo::logger::SinkConfig::SinkType::CONSOLE_SINK); - config->add_sink(console_writer_sink); - octo::logger::Manager::instance() - .editable_channel("PSKeygen") - .set_log_level(octo::logger::Log::LogLevel::DEBUG); - octo::logger::Manager::instance().configure(config); - auto ca = octo::keygen::ssl::SSLKeypairCertificateChain::load_certificate_chain( std::make_unique(ROOTCA) ); @@ -106,18 +95,11 @@ int main(int argc, char** argv) auto chain = octo::keygen::ssl::SSLKeypairCertificateChain::load_certificate_chain( std::make_unique(SUBCA) ); - logger.info() << "IS CA = " << ca->is_any_ca(); - logger.info() << "IS VALID CERT = " << ca->is_valid_chain(target.get(), - chain.get()); octo::keygen::KeygenPtr ssl_key_gen = std::make_shared(); octo::keygen::KeygenOptions ssl_opts; octo::keygen::KeypairPtr ssl_key_pair = ssl_key_gen->generate_keypair(ssl_opts); - logger.info() << "\n" << ssl_key_pair->private_key(); - logger.info() << "\n" << ssl_key_pair->public_key(); octo::keygen::KeygenOptions ssl_sign_opts; octo::keygen::KeypairCertificatePtr ssl_cert = ssl_key_gen->sign_key_pair(ssl_key_pair, ssl_sign_opts); - logger.info() << "\n" << ssl_cert->certificate(); - logger.info() << "\n" << ssl_cert->pretty_print_certificate_info(); } From bd5ac37105e41eec9963f65ad8b39fad49b6c7ac Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 7 Sep 2023 19:31:04 +0300 Subject: [PATCH 553/637] (#18733) tinkerforge-bindings: migrate to Conan v2 * tinkerforge-bindings: migrate to Conan v2 * tinkerforge-bindings: restore VirtualRunEnv in test_package --- .../tinkerforge-bindings/all/CMakeLists.txt | 11 +-- recipes/tinkerforge-bindings/all/conanfile.py | 74 ++++++++++--------- .../all/test_package/CMakeLists.txt | 7 +- .../all/test_package/conanfile.py | 18 ++++- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../all/test_v1_package/conanfile.py | 16 ++++ 6 files changed, 82 insertions(+), 52 deletions(-) create mode 100644 recipes/tinkerforge-bindings/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/tinkerforge-bindings/all/test_v1_package/conanfile.py diff --git a/recipes/tinkerforge-bindings/all/CMakeLists.txt b/recipes/tinkerforge-bindings/all/CMakeLists.txt index 2ea059e4508ba..9c3750e3fa826 100644 --- a/recipes/tinkerforge-bindings/all/CMakeLists.txt +++ b/recipes/tinkerforge-bindings/all/CMakeLists.txt @@ -1,11 +1,10 @@ cmake_minimum_required(VERSION 3.4) project(tinkerforge_bindings) -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +set(SOURCES_DIR ${CMAKE_CURRENT_LIST_DIR}/src) -file(GLOB SOURCES ${CMAKE_SOURCE_DIR}/source_subfolder/source/*.c) -file(GLOB HEADERS ${CMAKE_SOURCE_DIR}/source_subfolder/source/*.h) +file(GLOB SOURCES ${SOURCES_DIR}/source/*.c) +file(GLOB HEADERS ${SOURCES_DIR}/source/*.h) if(WIN32 AND BUILD_SHARED_LIBS) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) @@ -17,10 +16,8 @@ if(MSVC) target_link_libraries(${PROJECT_NAME} PRIVATE ws2_32 advapi32) endif() +include(GNUInstallDirs) set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${HEADERS}") install(TARGETS ${PROJECT_NAME} - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib - RUNTIME DESTINATION bin PUBLIC_HEADER DESTINATION include ) diff --git a/recipes/tinkerforge-bindings/all/conanfile.py b/recipes/tinkerforge-bindings/all/conanfile.py index fb57c7fccf3f7..f287887f2f3ea 100644 --- a/recipes/tinkerforge-bindings/all/conanfile.py +++ b/recipes/tinkerforge-bindings/all/conanfile.py @@ -1,17 +1,23 @@ -from conans import ConanFile, tools, CMake -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.43.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get +from conan.tools.microsoft import is_msvc_static_runtime + +required_conan_version = ">=1.53.0" + class TinkerforgeBindingsConan(ConanFile): name = "tinkerforge-bindings" + description = "API bindings to control Tinkerforge's Bricks and Bricklets" + license = "CC0 1.0 Universal" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.tinkerforge.com/" - license = "CC0 1.0 Universal" - description = "API bindings to control Tinkerforge's Bricks and Bricklets" - topics = "iot", "maker", "bindings" + topics = ("iot", "maker", "bindings") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -22,19 +28,8 @@ class TinkerforgeBindingsConan(ConanFile): "fPIC": True, } - _cmake = None - generators = "cmake" - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - def export_sources(self): - self.copy("CMakeLists.txt") + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) def config_options(self): if self.settings.os == "Windows": @@ -42,40 +37,41 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def validate(self): - if self.settings.compiler == "Visual Studio" and self.options.shared and "MT" in self.settings.compiler.runtime: + if self.options.shared and is_msvc_static_runtime(self): raise ConanInvalidConfiguration("Static runtime + shared is failing to link") def source(self): - tools.get(**self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=False) + get(self, **self.conan_data["sources"][self.version], strip_root=False) - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + def generate(self): + tc = CMakeToolchain(self) + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure(build_script_folder=self.source_path.parent) cmake.build() def package(self): - self.copy("license.txt", src=self._source_subfolder, dst="licenses") - cmake = self._configure_cmake() + copy(self, "license.txt", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): + self.cpp_info.set_property("cmake_file_name", "tinkerforge-bindings") self.cpp_info.set_property("cmake_target_name", "tinkerforge::bindings") - self.cpp_info.names["cmake_find_package"] = "tinkerforge" - self.cpp_info.names["cmake_find_package_multi"] = "tinkerforge" - self.cpp_info.filenames["cmake_find_package"] = "tinkerforge-bindings" - self.cpp_info.filenames["cmake_find_package_multi"] = "tinkerforge-bindings" + self.cpp_info.components["_bindings"].set_property("cmake_target_name", "bindings") self.cpp_info.components["_bindings"].names["cmake_find_package"] = "bindings" self.cpp_info.components["_bindings"].names["cmake_find_package_multi"] = "bindings" self.cpp_info.components["_bindings"].libs = ["tinkerforge_bindings"] @@ -84,3 +80,9 @@ def package_info(self): self.cpp_info.components["_bindings"].system_libs = ["pthread"] elif self.settings.os == "Windows": self.cpp_info.components["_bindings"].system_libs = ["advapi32", "ws2_32"] + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.names["cmake_find_package"] = "tinkerforge" + self.cpp_info.names["cmake_find_package_multi"] = "tinkerforge" + self.cpp_info.filenames["cmake_find_package"] = "tinkerforge-bindings" + self.cpp_info.filenames["cmake_find_package_multi"] = "tinkerforge-bindings" diff --git a/recipes/tinkerforge-bindings/all/test_package/CMakeLists.txt b/recipes/tinkerforge-bindings/all/test_package/CMakeLists.txt index b831e148cc9c0..4be380621fecd 100644 --- a/recipes/tinkerforge-bindings/all/test_package/CMakeLists.txt +++ b/recipes/tinkerforge-bindings/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(tinkerforge-bindings REQUIRED) +find_package(tinkerforge-bindings REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} tinkerforge::bindings) diff --git a/recipes/tinkerforge-bindings/all/test_package/conanfile.py b/recipes/tinkerforge-bindings/all/test_package/conanfile.py index 0245c9a8028a3..ef5d7042163ec 100644 --- a/recipes/tinkerforge-bindings/all/test_package/conanfile.py +++ b/recipes/tinkerforge-bindings/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" + 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,5 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - self.run(os.path.join("bin", "test_package"), 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/tinkerforge-bindings/all/test_v1_package/CMakeLists.txt b/recipes/tinkerforge-bindings/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/tinkerforge-bindings/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/tinkerforge-bindings/all/test_v1_package/conanfile.py b/recipes/tinkerforge-bindings/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..9b63bd176646b --- /dev/null +++ b/recipes/tinkerforge-bindings/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + self.run(os.path.join("bin", "test_package"), run_environment=True) From d55139ac069a4b9b5e708ce18930392757239c9b Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Fri, 8 Sep 2023 08:35:20 +0200 Subject: [PATCH 554/637] (#19638) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 7491fb37d05f1..72b011e53dd5d 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -68,6 +68,7 @@ required_for_references: - aws-crt-cpp - aws-kvs-pic - aws-libfabric +- aws-sdk-cpp - b2 - b64 - backport-cpp @@ -511,6 +512,7 @@ required_for_references: - libatomic_ops - libattr - libavif +- libb2 - libbacktrace - libbigwig - libbsd @@ -1107,8 +1109,10 @@ required_for_references: - tllist - tlx - toml11 +- tracy - trantor - tree-sitter +- tree-sitter-c - troldal-zippy - trompeloeil - tsl-hopscotch-map From 9ea2d2cf40fdc97564b5cd556a314a0529e05e53 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 8 Sep 2023 11:25:31 +0300 Subject: [PATCH 555/637] (#18708) lightpcapng: migrate to Conan v2 * lightpcapng: migrate to Conan v2 * lightpcapng: restore VirtualRunEnv in test_package * lightpcapng: bump deps --------- Co-authored-by: Carlos Zoido --- recipes/lightpcapng/all/CMakeLists.txt | 8 -- recipes/lightpcapng/all/conanfile.py | 78 ++++++++++--------- .../all/test_package/CMakeLists.txt | 9 +-- .../lightpcapng/all/test_package/conanfile.py | 21 +++-- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../all/test_v1_package/conanfile.py | 17 ++++ 6 files changed, 83 insertions(+), 58 deletions(-) delete mode 100644 recipes/lightpcapng/all/CMakeLists.txt create mode 100644 recipes/lightpcapng/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/lightpcapng/all/test_v1_package/conanfile.py diff --git a/recipes/lightpcapng/all/CMakeLists.txt b/recipes/lightpcapng/all/CMakeLists.txt deleted file mode 100644 index 5cfb924ad4de7..0000000000000 --- a/recipes/lightpcapng/all/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory(source_subfolder) - diff --git a/recipes/lightpcapng/all/conanfile.py b/recipes/lightpcapng/all/conanfile.py index ea6e74e5ca99f..3625228ec2534 100644 --- a/recipes/lightpcapng/all/conanfile.py +++ b/recipes/lightpcapng/all/conanfile.py @@ -1,15 +1,21 @@ -from conans import ConanFile, CMake, tools import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get + +required_conan_version = ">=1.53.0" + class LightPcapNgConan(ConanFile): name = "lightpcapng" - homepage = "https://github.com/Technica-Engineering/LightPcapNg" description = "Library for general-purpose tracing based on PCAPNG file format" - topics = ("pcapng", "pcap") - url = "https://github.com/conan-io/conan-center-index" license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/Technica-Engineering/LightPcapNg" + topics = ("pcapng", "pcap") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -21,17 +27,6 @@ class LightPcapNgConan(ConanFile): "fPIC": True, "with_zstd": True, } - generators = "cmake", "cmake_paths", "cmake_find_package" - exports_sources = "CMakeLists.txt" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" def config_options(self): if self.settings.os == "Windows": @@ -40,43 +35,50 @@ def config_options(self): def configure(self): if self.options.with_zstd: self.options["zstd"].shared = self.options.shared - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") 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): if self.options.with_zstd: - self.requires("zstd/1.4.5") + self.requires("zstd/1.5.5") def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["LIGHT_USE_ZSTD"] = self.options.with_zstd + tc.variables["BUILD_TESTING"] = False + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["LIGHT_USE_ZSTD"] = self.options.with_zstd - self._cmake.definitions["BUILD_TESTING"] = False - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake - def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): - self.cpp_info.names["cmake_find_package"] = "light_pcapng" - self.cpp_info.names["cmake_find_package_multi"] = "light_pcapng" - self.cpp_info.components["liblight_pcapng"].names["cmake_find_package"] = "light_pcapng" - self.cpp_info.components["liblight_pcapng"].names["cmake_find_package_multi"] = "light_pcapng" + self.cpp_info.set_property("cmake_file_name", "light_pcapng") + self.cpp_info.set_property("cmake_target_name", "light_pcapng::light_pcapng") self.cpp_info.components["liblight_pcapng"].libs = ["light_pcapng"] - if self.options.with_zstd: self.cpp_info.components["liblight_pcapng"].requires = ["zstd::zstd"] + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.names["cmake_find_package"] = "light_pcapng" + self.cpp_info.names["cmake_find_package_multi"] = "light_pcapng" + self.cpp_info.components["liblight_pcapng"].names["cmake_find_package"] = "light_pcapng" + self.cpp_info.components["liblight_pcapng"].names["cmake_find_package_multi"] = "light_pcapng" diff --git a/recipes/lightpcapng/all/test_package/CMakeLists.txt b/recipes/lightpcapng/all/test_package/CMakeLists.txt index 8927c32d3f4ef..f7eaac4f3f950 100644 --- a/recipes/lightpcapng/all/test_package/CMakeLists.txt +++ b/recipes/lightpcapng/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(light_pcapng REQUIRED) +find_package(light_pcapng REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} light_pcapng::light_pcapng) diff --git a/recipes/lightpcapng/all/test_package/conanfile.py b/recipes/lightpcapng/all/test_package/conanfile.py index 3da371b660e0a..ef5d7042163ec 100644 --- a/recipes/lightpcapng/all/test_package/conanfile.py +++ b/recipes/lightpcapng/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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -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/lightpcapng/all/test_v1_package/CMakeLists.txt b/recipes/lightpcapng/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/lightpcapng/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/lightpcapng/all/test_v1_package/conanfile.py b/recipes/lightpcapng/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/lightpcapng/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + 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) From ff7a8905859446d2fbd05daabfe4dd1c248a6844 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Fri, 8 Sep 2023 12:07:14 +0200 Subject: [PATCH 556/637] (#19670) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 72b011e53dd5d..5cb7b12693718 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -26,6 +26,7 @@ required_for_references: - apr - apr-util - apriltag +- aravis - archicad-apidevkit - arcus - arduinojson @@ -437,6 +438,7 @@ required_for_references: - id3v2lib - iir1 - im95able-rea +- imagl - imake - imath - imgui @@ -617,6 +619,7 @@ required_for_references: - libserial - libsgp4 - libsigcpp +- libsixel - libslz - libsmacker - libsndfile @@ -802,6 +805,8 @@ required_for_references: - objectbox - objectbox-generator - observer-ptr-lite +- octo-encryption-cpp +- octo-keygen-cpp - octo-logger-cpp - octomap - odbc @@ -1212,6 +1217,7 @@ required_for_references: - zlib - zlib-ng - zmarok-semver +- zmqpp - zookeeper-client-c - zpp_bits - zstd From c85da474374847cd263be2699c35586e1cdbb971 Mon Sep 17 00:00:00 2001 From: Carlos Zoido Date: Fri, 8 Sep 2023 12:57:39 +0200 Subject: [PATCH 557/637] (#19617) Some improvements for tree-sitter-c recipe --- recipes/tree-sitter-c/all/CMakeLists.txt | 5 ++--- recipes/tree-sitter-c/all/conanfile.py | 21 +++++++++++++++------ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/recipes/tree-sitter-c/all/CMakeLists.txt b/recipes/tree-sitter-c/all/CMakeLists.txt index 0500a39a48fb9..a028ec4e4627c 100644 --- a/recipes/tree-sitter-c/all/CMakeLists.txt +++ b/recipes/tree-sitter-c/all/CMakeLists.txt @@ -21,7 +21,7 @@ const TSLanguage *tree_sitter_c(void); ]]) add_library(${PROJECT_NAME} - src/src/parser.c + src/parser.c ) target_link_libraries(${PROJECT_NAME} PUBLIC @@ -29,8 +29,7 @@ target_link_libraries(${PROJECT_NAME} ) target_include_directories(${PROJECT_NAME} PRIVATE - $ - $ + $ ) set_target_properties(${PROJECT_NAME} PROPERTIES diff --git a/recipes/tree-sitter-c/all/conanfile.py b/recipes/tree-sitter-c/all/conanfile.py index 87e43c96d6c62..9f73c2c805dce 100644 --- a/recipes/tree-sitter-c/all/conanfile.py +++ b/recipes/tree-sitter-c/all/conanfile.py @@ -1,7 +1,6 @@ from conan import ConanFile -from conan.tools.cmake import CMake +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import get, replace_in_file, copy -from conan.tools.layout import basic_layout import os required_conan_version = ">=1.53.0" @@ -16,7 +15,7 @@ class TreeSitterCConan(ConanFile): license = "MIT" settings = "os", "arch", "compiler", "build_type" package_type = "library" - generators = "CMakeToolchain", "CMakeDeps" + options = { "shared": [True, False], "fPIC": [True, False], @@ -26,11 +25,21 @@ class TreeSitterCConan(ConanFile): "fPIC": True, } - generators = "CMakeToolchain", "CMakeDeps" + exports_sources = "CMakeLists.txt" def layout(self): - basic_layout(self, src_folder="src") + cmake_layout(self, src_folder="src") + + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=(self.export_sources_folder + "/src")) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["TREE_SITTER_C_SRC_DIR"] = self.source_folder.replace("\\", "/") + tc.generate() + deps = CMakeDeps(self) + deps.generate() def config_options(self): if self.settings.os == "Windows": @@ -59,7 +68,7 @@ def _patch_sources(self): def build(self): self._patch_sources() cmake = CMake(self) - cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + cmake.configure() cmake.build() def package(self): From 57211c1fbbcd2e218f58cbda694dbce9cbce0cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Fri, 8 Sep 2023 13:05:27 +0200 Subject: [PATCH 558/637] Change Zlib ranges docu (#19676) * Typo * better wording * Remove spaces --- docs/adding_packages/dependencies.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/adding_packages/dependencies.md b/docs/adding_packages/dependencies.md index c421b0a9d9f67..a69f895483ed0 100644 --- a/docs/adding_packages/dependencies.md +++ b/docs/adding_packages/dependencies.md @@ -181,9 +181,12 @@ Currently, these are: * OpenSSL: `[>=1.1 <4]` for libraries known to be compatible with OpenSSL 1.x and 3.x * CMake: `[>3.XX <4]`, where `3.XX` is the minimum version of CMake required by the relevant build scripts -* Zlib: `[>=1.X.Y <2]`, where `1.X.Y` is the minimum version of Zlib required, starting from `1.2.10` * Libcurl: `[>=X.YY <9]`, where `X.YY` is the minimum version of Libcurl required, starting from `7.78` +> **Note**: You might also see Zlib ranges in some PR by CCI maintainers. +> We're adding them little by little to avoid missing binaries and conflict errors. +> Please do not open PRs moving Zlib to ranges for now, we'll update this page when PRs are free to add new ranges. + > **Warning**: With Conan 1.x, [version ranges](https://docs.conan.io/1/versioning/version_ranges.html) adhere to a much more strict sematic version spec, > OpenSSL 1.1.x does not follow this so the client will not resolve to that range and will pick a 3.x version. In order to select a lower version you From df0e278ed9029f9ceca67af767271ecc2f477070 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 8 Sep 2023 14:41:43 +0300 Subject: [PATCH 559/637] (#18738) tidy-html5: migrate to Conan v2 * tidy-html5: migrate to Conan v2 * tidy-html5: restore VirtualRunEnv in test_package * tidy-html5: set correct license ID https://spdx.org/licenses/HTMLTIDY.html --- recipes/tidy-html5/all/CMakeLists.txt | 7 -- recipes/tidy-html5/all/conandata.yml | 1 - recipes/tidy-html5/all/conanfile.py | 96 ++++++++++--------- .../all/test_package/CMakeLists.txt | 7 +- .../tidy-html5/all/test_package/conanfile.py | 21 ++-- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../all/test_v1_package/conanfile.py | 17 ++++ 7 files changed, 92 insertions(+), 65 deletions(-) delete mode 100644 recipes/tidy-html5/all/CMakeLists.txt create mode 100644 recipes/tidy-html5/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/tidy-html5/all/test_v1_package/conanfile.py diff --git a/recipes/tidy-html5/all/CMakeLists.txt b/recipes/tidy-html5/all/CMakeLists.txt deleted file mode 100644 index e5cb637716b89..0000000000000 --- a/recipes/tidy-html5/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include("conanbuildinfo.cmake") -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/tidy-html5/all/conandata.yml b/recipes/tidy-html5/all/conandata.yml index dbfb937f0f3c2..56deb76dc5c66 100644 --- a/recipes/tidy-html5/all/conandata.yml +++ b/recipes/tidy-html5/all/conandata.yml @@ -5,4 +5,3 @@ sources: patches: "5.8.0": - patch_file: "patches/0001-robust-install-pdb.patch" - base_path: "source_subfolder" diff --git a/recipes/tidy-html5/all/conanfile.py b/recipes/tidy-html5/all/conanfile.py index c7d99c3c56b67..cc182cadf26f4 100644 --- a/recipes/tidy-html5/all/conanfile.py +++ b/recipes/tidy-html5/all/conanfile.py @@ -1,17 +1,22 @@ -from conans import ConanFile, CMake, tools import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.53.0" class TidyHtml5Conan(ConanFile): name = "tidy-html5" - license = "W3C" + description = "The granddaddy of HTML tools, with support for modern standards" + license = "HTMLTIDY" url = "https://github.com/conan-io/conan-center-index" homepage = "http://www.html-tidy.org" - description = "The granddaddy of HTML tools, with support for modern standards" topics = ("html", "parser", "xml", "tools") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -24,17 +29,8 @@ class TidyHtml5Conan(ConanFile): "support_localizations": True, } - exports_sources = ["CMakeLists.txt", "patches/**"] - generators = "cmake" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -42,51 +38,57 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _configure_cmake(self): - if self._cmake: - return self._cmake - cmake = CMake(self) - cmake.definitions['BUILD_TAB2SPACE'] = False - cmake.definitions['BUILD_SAMPLE_CODE'] = False - cmake.definitions['TIDY_COMPAT_HEADERS'] = False - cmake.definitions['SUPPORT_CONSOLE_APP'] = False - cmake.definitions['SUPPORT_LOCALIZATIONS'] = self.options.support_localizations - cmake.definitions['ENABLE_DEBUG_LOG'] = False - cmake.definitions['ENABLE_ALLOC_DEBUG'] = False - cmake.definitions['ENABLE_MEMORY_DEBUG'] = False - cmake.definitions['BUILD_SHARED_LIB'] = self.options.shared - cmake.configure(build_folder=self._build_subfolder) - self._cmake = cmake - return self._cmake + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_TAB2SPACE"] = False + tc.variables["BUILD_SAMPLE_CODE"] = False + tc.variables["TIDY_COMPAT_HEADERS"] = False + tc.variables["SUPPORT_CONSOLE_APP"] = False + tc.variables["SUPPORT_LOCALIZATIONS"] = self.options.support_localizations + tc.variables["ENABLE_DEBUG_LOG"] = False + tc.variables["ENABLE_ALLOC_DEBUG"] = False + tc.variables["ENABLE_MEMORY_DEBUG"] = False + tc.variables["BUILD_SHARED_LIB"] = self.options.shared + tc.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("COPYING", dst="licenses", src=self._source_subfolder) - self.copy("LICENSE.md", dst="licenses", src=os.path.join(self._source_subfolder, 'README')) - cmake = self._configure_cmake() + copy(self, "COPYING", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + copy(self, "LICENSE.md", + dst=os.path.join(self.package_folder, "licenses"), + src=os.path.join(self.source_folder, "README")) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.pdb") + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib"), recursive=True) if self.options.shared: to_remove = "*tidy_static*" if self.settings.os == "Windows" else "*.a" - tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), to_remove) + rm(self, to_remove, os.path.join(self.package_folder, "lib"), recursive=True) def package_info(self): - self.cpp_info.names["pkg_config"] = "tidy" - suffix = "_static" if self.settings.os == "Windows" and not self.options.shared else "" - suffix += "d" if self.settings.compiler == "Visual Studio" and self.settings.build_type == "Debug" else "" + self.cpp_info.set_property("pkg_config_name", "tidy") + suffix = "" + if self.settings.os == "Windows" and not self.options.shared: + suffix = "_static" + if is_msvc(self) and self.settings.build_type == "Debug": + suffix += "d" self.cpp_info.libs = ["tidy" + suffix] if self.settings.os == "Windows" and not self.options.shared: self.cpp_info.defines.append("TIDY_STATIC") diff --git a/recipes/tidy-html5/all/test_package/CMakeLists.txt b/recipes/tidy-html5/all/test_package/CMakeLists.txt index 7b9b613cbb24a..e21ed1c05b78f 100644 --- a/recipes/tidy-html5/all/test_package/CMakeLists.txt +++ b/recipes/tidy-html5/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(tidy-html5 REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE tidy-html5::tidy-html5) diff --git a/recipes/tidy-html5/all/test_package/conanfile.py b/recipes/tidy-html5/all/test_package/conanfile.py index bd7165a553cf4..ef5d7042163ec 100644 --- a/recipes/tidy-html5/all/test_package/conanfile.py +++ b/recipes/tidy-html5/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", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/tidy-html5/all/test_v1_package/CMakeLists.txt b/recipes/tidy-html5/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/tidy-html5/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/tidy-html5/all/test_v1_package/conanfile.py b/recipes/tidy-html5/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..7e2dfe859bb27 --- /dev/null +++ b/recipes/tidy-html5/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From b2f903b863a13b8d575c723a14f6066ad317b827 Mon Sep 17 00:00:00 2001 From: Klaus Holst Jacobsen <48069914+klausholstjacobsen@users.noreply.github.com> Date: Fri, 8 Sep 2023 16:53:30 +0200 Subject: [PATCH 560/637] (#19023) dsp-filters/20170309: Added dsp-filters recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * dsp-filters: Added dsp-filters recipe * Copying proper package files also on windows * MAde recipe msvc compliant * Added missing final endline * Added "m" system lib * Cleanup * Update recipes/dsp-filters/all/conandata.yml * Update recipes/dsp-filters/all/conandata.yml * Update recipes/dsp-filters/config.yml --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: Carlos Zoido --- recipes/dsp-filters/all/conandata.yml | 12 +++ recipes/dsp-filters/all/conanfile.py | 74 +++++++++++++++++++ .../0001-remove-explicit-cmake-options.patch | 14 ++++ .../0002-remove-msvc-cmake-flags.patch | 14 ++++ .../all/test_package/CMakeLists.txt | 7 ++ .../dsp-filters/all/test_package/conanfile.py | 29 ++++++++ .../all/test_package/test_package.cpp | 11 +++ recipes/dsp-filters/config.yml | 3 + 8 files changed, 164 insertions(+) create mode 100644 recipes/dsp-filters/all/conandata.yml create mode 100644 recipes/dsp-filters/all/conanfile.py create mode 100644 recipes/dsp-filters/all/patches/0001-remove-explicit-cmake-options.patch create mode 100644 recipes/dsp-filters/all/patches/0002-remove-msvc-cmake-flags.patch create mode 100644 recipes/dsp-filters/all/test_package/CMakeLists.txt create mode 100644 recipes/dsp-filters/all/test_package/conanfile.py create mode 100644 recipes/dsp-filters/all/test_package/test_package.cpp create mode 100644 recipes/dsp-filters/config.yml diff --git a/recipes/dsp-filters/all/conandata.yml b/recipes/dsp-filters/all/conandata.yml new file mode 100644 index 0000000000000..17f324a8e1446 --- /dev/null +++ b/recipes/dsp-filters/all/conandata.yml @@ -0,0 +1,12 @@ +sources: + "cci.20170309": + url: "https://github.com/vinniefalco/DSPFilters/archive/acc49170e79a94fcb9c04b8a2116e9f8dffd1c7d.tar.gz" + sha256: "330c3960e55b8cdbf041d8ec4790a21a326dc331e43bf14c144ae5d88a47d53d" +patches: + "cci.20170309": + - patch_file: "patches/0001-remove-explicit-cmake-options.patch" + patch_description: "Remove explicit STATIC and FPIC options in CMakeLists.txt" + patch_type: "conan" + - patch_file: "patches/0002-remove-msvc-cmake-flags.patch" + patch_description: "Remove MY_FLAGS options in CMakeLists.txt" + patch_type: "conan" diff --git a/recipes/dsp-filters/all/conanfile.py b/recipes/dsp-filters/all/conanfile.py new file mode 100644 index 0000000000000..d4ef17870d051 --- /dev/null +++ b/recipes/dsp-filters/all/conanfile.py @@ -0,0 +1,74 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout +from conan.tools.files import copy, get, apply_conandata_patches, export_conandata_patches, rename +from conan.tools.microsoft import is_msvc +import os + +required_conan_version = ">=1.53.0" + +class DSPFiltersConan(ConanFile): + name = "dsp-filters" + description = "Set of DSP filters" + topics = ("dsp", "filters") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/vinniefalco/DSPFilters" + license = "MIT" + settings = "os", "arch", "compiler", "build_type" + package_type = "library" + + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def validate(self): + # in case it does not work in another configuration, it should validated here too + if is_msvc(self) and self.options.shared: + raise ConanInvalidConfiguration(f"{self.ref} can not be built as shared on Visual Studio and msvc.") + + def export_sources(self): + export_conandata_patches(self) + + def layout(self): + cmake_layout(self, src_folder="src") + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + def build(self): + apply_conandata_patches(self) + + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, "shared")) + cmake.build() + + def package(self): + copy(self, "lib*", src=os.path.join(self.build_folder, "DSPFilters"), dst=os.path.join(self.package_folder, "lib"), keep_path=False) + copy(self, "DSPFilters.lib", src=os.path.join(self.build_folder, "DSPFilters", f"{self.settings.build_type}"), dst=os.path.join(self.package_folder, "lib"), keep_path=False) + + copy(self, "*.h", src=os.path.join(self.source_folder, "shared", "DSPFilters", "include"), dst=os.path.join(self.package_folder, "include")) + copy(self, "README.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + rename(self, src=os.path.join(self.package_folder, "licenses", "README.md"), dst=os.path.join(self.package_folder, "licenses", "license")) + + def package_info(self): + self.cpp_info.libs = ["DSPFilters"] + + if self.settings.os in ["Linux", "FreeBSD", "Neutrino"]: + self.cpp_info.system_libs.extend(["m"]) diff --git a/recipes/dsp-filters/all/patches/0001-remove-explicit-cmake-options.patch b/recipes/dsp-filters/all/patches/0001-remove-explicit-cmake-options.patch new file mode 100644 index 0000000000000..cece818ce0db2 --- /dev/null +++ b/recipes/dsp-filters/all/patches/0001-remove-explicit-cmake-options.patch @@ -0,0 +1,14 @@ +--- shared/DSPFilters/CMakeLists.txt 2017-03-09 13:40:27.000000000 +0100 ++++ shared/DSPFilters/CMakeLists.txt 2023-08-03 09:10:56.248123716 +0200 +@@ -4,10 +4,8 @@ + + aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/source SOURCE_LIB) + +-add_library(${PROJECT_NAME} STATIC ${SOURCE_LIB}) ++add_library(${PROJECT_NAME} ${SOURCE_LIB}) + + target_include_directories(${PROJECT_NAME} + PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) + +-set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON) +- diff --git a/recipes/dsp-filters/all/patches/0002-remove-msvc-cmake-flags.patch b/recipes/dsp-filters/all/patches/0002-remove-msvc-cmake-flags.patch new file mode 100644 index 0000000000000..e16d647a99e9c --- /dev/null +++ b/recipes/dsp-filters/all/patches/0002-remove-msvc-cmake-flags.patch @@ -0,0 +1,14 @@ +--- shared/CMakeLists.txt 2023-08-28 13:14:13.868202500 +0200 ++++ shared/CMakeLists.txt 2023-08-28 13:14:42.827596800 +0200 +@@ -8,11 +8,6 @@ + set(CMAKE_BUILD_TYPE Release) + + if((${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)) +- set(MYFLAGS "/O2 /WX- /MT") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MYFLAGS}") +- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MYFLAGS}") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MYFLAGS}") +- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${MYFLAGS}") + include(CheckSymbolExists) + check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF) + if(NOT HAVE_SNPRINTF) diff --git a/recipes/dsp-filters/all/test_package/CMakeLists.txt b/recipes/dsp-filters/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..f823007a47a74 --- /dev/null +++ b/recipes/dsp-filters/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.14.0) +project(test_package LANGUAGES CXX) + +find_package(dsp-filters REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE dsp-filters::dsp-filters) diff --git a/recipes/dsp-filters/all/test_package/conanfile.py b/recipes/dsp-filters/all/test_package/conanfile.py new file mode 100644 index 0000000000000..922d35b61f37a --- /dev/null +++ b/recipes/dsp-filters/all/test_package/conanfile.py @@ -0,0 +1,29 @@ +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 not can_run(self): + return + + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/dsp-filters/all/test_package/test_package.cpp b/recipes/dsp-filters/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..10690f2821e16 --- /dev/null +++ b/recipes/dsp-filters/all/test_package/test_package.cpp @@ -0,0 +1,11 @@ +#include + +#include + +int main() { + Dsp::SimpleFilter, 1> f; + f.setup(1, 100, 1000); + f.reset(); + + return 0; +} diff --git a/recipes/dsp-filters/config.yml b/recipes/dsp-filters/config.yml new file mode 100644 index 0000000000000..d7e185cf9c964 --- /dev/null +++ b/recipes/dsp-filters/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20170309": + folder: all From 41b2eead38891495043f0f5d3a16b92135718bd2 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 9 Sep 2023 01:41:43 +0900 Subject: [PATCH 561/637] (#19602) mpc: add version 1.3.1, update dependencies, fix homepage * mpc: add version 1.3.1, update dependenies * just beautification --- recipes/mpc/all/conandata.yml | 11 ++++--- recipes/mpc/all/conanfile.py | 33 ++++++++++++--------- recipes/mpc/all/test_package/CMakeLists.txt | 2 +- recipes/mpc/all/test_package/conanfile.py | 3 +- recipes/mpc/config.yml | 2 ++ 5 files changed, 31 insertions(+), 20 deletions(-) diff --git a/recipes/mpc/all/conandata.yml b/recipes/mpc/all/conandata.yml index cd8f83a739d7d..8f24801eccbac 100644 --- a/recipes/mpc/all/conandata.yml +++ b/recipes/mpc/all/conandata.yml @@ -1,10 +1,13 @@ sources: + "1.3.1": + url: "https://ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz" + sha256: "ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8" "1.2.0": - url: https://ftp.gnu.org/gnu/mpc/mpc-1.2.0.tar.gz - sha256: e90f2d99553a9c19911abdb4305bf8217106a957e3994436428572c8dfe8fda6 + url: "https://ftp.gnu.org/gnu/mpc/mpc-1.2.0.tar.gz" + sha256: "e90f2d99553a9c19911abdb4305bf8217106a957e3994436428572c8dfe8fda6" "1.1.0": - url: https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz - sha256: 6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e + url: "https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz" + sha256: "6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e" patches: "1.2.0": - patch_file: "patches/1.2.0-0001-asin-missing-limits.patch" diff --git a/recipes/mpc/all/conanfile.py b/recipes/mpc/all/conanfile.py index f996155628e5c..820b8fd1588b8 100644 --- a/recipes/mpc/all/conanfile.py +++ b/recipes/mpc/all/conanfile.py @@ -14,16 +14,22 @@ class MpcConan(ConanFile): name = "mpc" - package_type = "library" description = "GNU MPC is a C library for the arithmetic of complex numbers with arbitrarily high precision " \ "and correct rounding of the result" - topics = ("conan", "mpc", "multiprecision", "math", "mathematics") - url = "https://github.com/conan-io/conan-center-index" - homepage = "http://www.multiprecision.org/mpc/home.html" license = "LGPL-3.0-or-later" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.multiprecision.org/" + topics = ("multiprecision", "math", "mathematics") settings = "os", "arch", "compiler", "build_type" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} + package_type = "library" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } def export_sources(self): export_conandata_patches(self) @@ -38,14 +44,17 @@ def configure(self): self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") + def layout(self): + basic_layout(self, src_folder="src") + def requirements(self): - self.requires("gmp/6.2.1", transitive_headers=True) - self.requires("mpfr/4.1.0", transitive_headers=True) + self.requires("gmp/6.3.0", transitive_headers=True) + self.requires("mpfr/4.2.0", transitive_headers=True) def validate(self): # FIXME: add msvc support, upstream has a makefile.vc if is_msvc(self): - raise ConanInvalidConfiguration("mpc can be built with msvc, but it's not supported yet in this recipe.") + raise ConanInvalidConfiguration(f"{self.ref} can be built with msvc, but it's not supported yet in this recipe.") @property def _settings_build(self): @@ -57,12 +66,8 @@ def build_requirements(self): if not self.conf.get("tools.microsoft.bash:path", check_type=str): self.tool_requires("msys2/cci.latest") - def layout(self): - basic_layout(self, src_folder="src") - def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): env = VirtualBuildEnv(self) diff --git a/recipes/mpc/all/test_package/CMakeLists.txt b/recipes/mpc/all/test_package/CMakeLists.txt index 5167a095daebe..3a407d4714c49 100644 --- a/recipes/mpc/all/test_package/CMakeLists.txt +++ b/recipes/mpc/all/test_package/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.1) -project(test_package C) +project(test_package LANGUAGES C) find_package(mpc REQUIRED CONFIG) diff --git a/recipes/mpc/all/test_package/conanfile.py b/recipes/mpc/all/test_package/conanfile.py index da190011b6b6d..45240bc874229 100644 --- a/recipes/mpc/all/test_package/conanfile.py +++ b/recipes/mpc/all/test_package/conanfile.py @@ -5,8 +5,9 @@ class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" + settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def layout(self): cmake_layout(self) diff --git a/recipes/mpc/config.yml b/recipes/mpc/config.yml index d07c95e596619..ad477c94d0d7a 100644 --- a/recipes/mpc/config.yml +++ b/recipes/mpc/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.1": + folder: all "1.2.0": folder: all "1.1.0": From e8e47a3792f7b174f097fb03eadbea20d4067f0d Mon Sep 17 00:00:00 2001 From: Ivo Hedtke Date: Fri, 8 Sep 2023 20:41:18 +0200 Subject: [PATCH 562/637] (#19615) [SoPlex] bump version to 6.0.4 * [soplex] bump version to 6.0.4 * Drop test package for conan v1 * Bump dependency versions * Require zlib only when boost is not used * Revert "Require zlib only when boost is not used" This reverts commit 9cbda13e0cffb2cb9d9068279db4135fe5e59878. * Enable shared mode on Windows * Add package type --- recipes/soplex/all/conandata.yml | 3 +++ recipes/soplex/all/conanfile.py | 15 ++++++++------- .../soplex/all/test_v1_package/CMakeLists.txt | 9 --------- .../soplex/all/test_v1_package/conanfile.py | 18 ------------------ recipes/soplex/config.yml | 2 ++ 5 files changed, 13 insertions(+), 34 deletions(-) delete mode 100644 recipes/soplex/all/test_v1_package/CMakeLists.txt delete mode 100644 recipes/soplex/all/test_v1_package/conanfile.py diff --git a/recipes/soplex/all/conandata.yml b/recipes/soplex/all/conandata.yml index eaf5ac83b4427..b034a63a75693 100644 --- a/recipes/soplex/all/conandata.yml +++ b/recipes/soplex/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "6.0.4": + url: "https://github.com/scipopt/soplex/archive/refs/tags/release-604.tar.gz" + sha256: "691f5b593cb85c2586522d5de5a5a7692958d22ff1ddffb4fc395f4696590b6f" "6.0.3": url: "https://github.com/scipopt/soplex/archive/refs/tags/release-603.tar.gz" sha256: "2bdf9adc9ac6ad48f98056679b7b852e626ac4aaaf277e7d4ce17794ed1097be" diff --git a/recipes/soplex/all/conanfile.py b/recipes/soplex/all/conanfile.py index d1ea6917fd3ef..5e4c8355aefd4 100644 --- a/recipes/soplex/all/conanfile.py +++ b/recipes/soplex/all/conanfile.py @@ -19,6 +19,7 @@ class SoPlexConan(ConanFile): homepage = "https://soplex.zib.de" topics = ("simplex", "solver", "linear", "programming") settings = "os", "arch", "compiler", "build_type" + package_type = "library" options = { "shared": [True, False], "fPIC": [True, False], @@ -62,8 +63,6 @@ def validate(self): raise ConanInvalidConfiguration( f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) - if is_msvc(self) and self.options.shared: - raise ConanInvalidConfiguration(f"{self.ref} can not be built as shared on Visual Studio and msvc.") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -77,13 +76,14 @@ def configure(self): self.options.rm_safe("fPIC") def requirements(self): - self.requires("zlib/1.2.13", transitive_headers=True) + # transitive libs as anything using soplex requires gzread, gzwrite, gzclose, gzopen + self.requires("zlib/1.2.13", transitive_headers=True, transitive_libs=True) if self.options.with_gmp: # transitive libs as anything using soplex requires __gmpz_init_set_si # see https://github.com/conan-io/conan-center-index/pull/16017#issuecomment-1495688452 - self.requires("gmp/6.2.1", transitive_headers=True, transitive_libs=True) + self.requires("gmp/6.3.0", transitive_headers=True, transitive_libs=True) if self.options.with_boost: - self.requires("boost/1.81.0", transitive_headers=True) # also update Boost_VERSION_MACRO below! + self.requires("boost/1.83.0", transitive_headers=True) # also update Boost_VERSION_MACRO below! def layout(self): cmake_layout(self, src_folder="src") @@ -92,7 +92,7 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["GMP"] = self.options.with_gmp tc.variables["BOOST"] = self.options.with_boost - tc.variables["Boost_VERSION_MACRO"] = "108100" + tc.variables["Boost_VERSION_MACRO"] = "108300" if self.options.with_gmp: tc.cache_variables["GMP_INCLUDE_DIRS"] = ";".join(self.dependencies["gmp"].cpp_info.includedirs) tc.cache_variables["GMP_LIBRARIES"] = "gmp::gmp" @@ -113,12 +113,13 @@ def package(self): copy(self, pattern="*.h", src=join(self.source_folder, "src", "soplex"), dst=join(self.package_folder, "include", "soplex")) copy(self, pattern="*.hpp", src=join(self.source_folder, "src", "soplex"), dst=join(self.package_folder, "include", "soplex")) copy(self, pattern="*.h", src=join(self.build_folder, "soplex"), dst=join(self.package_folder, "include", "soplex")) + copy(self, pattern="*.lib", src=join(self.build_folder, "lib"), dst=join(self.package_folder, "lib"), keep_path=False) if self.options.shared: copy(self, pattern="*.so*", src=join(self.build_folder, "lib"), dst=join(self.package_folder, "lib")) + copy(self, pattern="*.dll", src=join(self.build_folder, "bin"), dst=join(self.package_folder, "bin")) copy(self, pattern="*.dylib*", src=join(self.build_folder, "lib"), dst=join(self.package_folder, "lib")) else: copy(self, pattern="*.a", src=join(self.build_folder, "lib"), dst=join(self.package_folder, "lib")) - copy(self, pattern="*.lib", src=join(self.build_folder, "lib"), dst=join(self.package_folder, "lib"), keep_path=False) fix_apple_shared_install_name(self) def package_info(self): diff --git a/recipes/soplex/all/test_v1_package/CMakeLists.txt b/recipes/soplex/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 8bf82de500d9f..0000000000000 --- a/recipes/soplex/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package CXX) -set(CMAKE_CXX_STANDARD 14) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/soplex/all/test_v1_package/conanfile.py b/recipes/soplex/all/test_v1_package/conanfile.py deleted file mode 100644 index 5a05af3c2dfd2..0000000000000 --- a/recipes/soplex/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,18 +0,0 @@ -from conans import ConanFile, CMake -from conan.tools.build import cross_building -import os - - -class TestPackageV1Conan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/soplex/config.yml b/recipes/soplex/config.yml index bce376a5fec90..73bcf839da618 100644 --- a/recipes/soplex/config.yml +++ b/recipes/soplex/config.yml @@ -1,3 +1,5 @@ versions: + "6.0.4": + folder: all "6.0.3": folder: all From 3ed05fcc0e2d97a58422aa4eddc76d8fd249bd36 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Fri, 8 Sep 2023 21:57:49 +0200 Subject: [PATCH 563/637] (#19645) fontconfig/meson: bump deps * fontconfig/meson: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * fontconfig/meson: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * fontconfig/meson: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * fontconfig/meson: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericlemanissier.github.io/conan-center-index-bump-deps/) * Update conanfile.py --- recipes/fontconfig/meson/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/fontconfig/meson/conanfile.py b/recipes/fontconfig/meson/conanfile.py index f037cbc5601ca..4ae32ba159e75 100644 --- a/recipes/fontconfig/meson/conanfile.py +++ b/recipes/fontconfig/meson/conanfile.py @@ -56,9 +56,9 @@ def requirements(self): def build_requirements(self): self.tool_requires("gperf/3.1") - self.tool_requires("meson/1.1.1") + self.tool_requires("meson/1.2.1") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/1.9.3") + self.tool_requires("pkgconf/2.0.2") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 7ab44287b4ec4f0f7c7e19e793c50ed12b4e41c7 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 9 Sep 2023 23:35:07 +0900 Subject: [PATCH 564/637] (#19680) zpp_bits: add version 4.4.19 --- recipes/zpp_bits/all/conandata.yml | 3 +++ recipes/zpp_bits/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/zpp_bits/all/conandata.yml b/recipes/zpp_bits/all/conandata.yml index aa294b864983d..199c85b5f2f5a 100644 --- a/recipes/zpp_bits/all/conandata.yml +++ b/recipes/zpp_bits/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.4.19": + url: "https://github.com/eyalz800/zpp_bits/archive/v4.4.19.tar.gz" + sha256: "1d8f92e616d61cd54cb2582280cc5a28e4457d8d9cfc331137859f8ef29ff637" "4.4.18": url: "https://github.com/eyalz800/zpp_bits/archive/v4.4.18.tar.gz" sha256: "c81a221a3d857218d990aa39f420f4cb5cdbe906672d22286b871355068bc14b" diff --git a/recipes/zpp_bits/config.yml b/recipes/zpp_bits/config.yml index e6e42fa0160a3..e2021292dbcd6 100644 --- a/recipes/zpp_bits/config.yml +++ b/recipes/zpp_bits/config.yml @@ -1,4 +1,6 @@ versions: + "4.4.19": + folder: all "4.4.18": folder: all "4.4.17": From 8d98dc016574d84efaa0ffd8d78f44f6aa56d8e0 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 10 Sep 2023 04:54:10 +0900 Subject: [PATCH 565/637] (#19657) imgui: add version 1.89.9/1.89.9-docking --- recipes/imgui/all/conandata.yml | 6 ++++++ recipes/imgui/config.yml | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/recipes/imgui/all/conandata.yml b/recipes/imgui/all/conandata.yml index 18b830b59f364..58720d3d51f67 100644 --- a/recipes/imgui/all/conandata.yml +++ b/recipes/imgui/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.89.9": + url: "https://github.com/ocornut/imgui/archive/v1.89.9.tar.gz" + sha256: "1acc27a778b71d859878121a3f7b287cd81c29d720893d2b2bf74455bf9d52d6" + "1.89.9-docking": + url: "https://github.com/ocornut/imgui/archive/v1.89.9-docking.tar.gz" + sha256: "2481489ce9091239b3cab8a330d0409ffdd9ee607ad1f3fe3a0b0b751c27a8eb" "1.89.8": url: "https://github.com/ocornut/imgui/archive/v1.89.8.tar.gz" sha256: "6680ccc32430009a8204291b1268b2367d964bd6d1b08a4e0358a017eb8e8c9e" diff --git a/recipes/imgui/config.yml b/recipes/imgui/config.yml index d3d7aaa4e4a68..138b61745517a 100644 --- a/recipes/imgui/config.yml +++ b/recipes/imgui/config.yml @@ -1,4 +1,8 @@ versions: + "1.89.9": + folder: all + "1.89.9-docking": + folder: all "1.89.8": folder: all "1.89.8-docking": From d5815e1bd2f7b516550ed6f91b4a081617bf36d6 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 10 Sep 2023 07:31:12 +0900 Subject: [PATCH 566/637] (#19701) quill: update fmt/10.1.1 --- recipes/quill/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/quill/all/conanfile.py b/recipes/quill/all/conanfile.py index ef58c5e9a36f9..311710c99f8c5 100644 --- a/recipes/quill/all/conanfile.py +++ b/recipes/quill/all/conanfile.py @@ -69,7 +69,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("fmt/10.1.0", transitive_headers=True) + self.requires("fmt/10.1.1", transitive_headers=True) def validate(self): supported_archs = ["x86", "x86_64", "armv6", "armv7", "armv7hf", "armv8"] From 798d8843a358106bd1e2988cb4cdca17816fa744 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 10 Sep 2023 15:13:51 +0900 Subject: [PATCH 567/637] (#19699) soci: update dependencies --- recipes/soci/all/conanfile.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/soci/all/conanfile.py b/recipes/soci/all/conanfile.py index 6b15a39df0e5f..d800bb3ba6042 100644 --- a/recipes/soci/all/conanfile.py +++ b/recipes/soci/all/conanfile.py @@ -62,15 +62,15 @@ def configure(self): def requirements(self): if self.options.with_sqlite3: - self.requires("sqlite3/3.41.1") + self.requires("sqlite3/3.43.0") if self.options.with_odbc and self.settings.os != "Windows": self.requires("odbc/2.3.11") if self.options.with_mysql: - self.requires("libmysqlclient/8.0.31") + self.requires("libmysqlclient/8.1.0") if self.options.with_postgresql: - self.requires("libpq/14.7") + self.requires("libpq/15.4") if self.options.with_boost: - self.requires("boost/1.81.0") + self.requires("boost/1.83.0") @property def _minimum_compilers_version(self): From e8284b595811b8acd8f827a8831a547a45e9a157 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 10 Sep 2023 16:33:46 +0900 Subject: [PATCH 568/637] (#19705) visit_struct: update boost/1.83.0 --- recipes/visit_struct/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/visit_struct/all/conanfile.py b/recipes/visit_struct/all/conanfile.py index b4d861bfec980..7cb8d11207ec2 100644 --- a/recipes/visit_struct/all/conanfile.py +++ b/recipes/visit_struct/all/conanfile.py @@ -34,7 +34,7 @@ def layout(self): def requirements(self): if self.options.with_boost_fusion or self.options.with_boost_hana: - self.requires("boost/1.81.0") + self.requires("boost/1.83.0") def package_id(self): self.info.clear() From 5370d7eb6f353f5e935d421674710ca10091cf97 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 10 Sep 2023 17:32:49 +0900 Subject: [PATCH 569/637] (#19707) samurai: add version 0.6.0 --- recipes/samurai/all/conandata.yml | 3 +++ recipes/samurai/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/samurai/all/conandata.yml b/recipes/samurai/all/conandata.yml index d10010d1fa9f9..ea3efb8533667 100644 --- a/recipes/samurai/all/conandata.yml +++ b/recipes/samurai/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.6.0": + url: "https://github.com/hpc-maths/samurai/archive/v0.6.0.tar.gz" + sha256: "bab96adac8e1553b79678a22de2248bec67c7c205b5fd35e9e1aaccaca41286e" "0.3.0": url: "https://github.com/hpc-maths/samurai/archive/v0.3.0.tar.gz" sha256: "5e6313d92fa2cd23941192c74014749acfcfbcfd5fdc1601cb3c9f4d151c7f4e" diff --git a/recipes/samurai/config.yml b/recipes/samurai/config.yml index 0e8084dbaff4b..570ab7165280c 100644 --- a/recipes/samurai/config.yml +++ b/recipes/samurai/config.yml @@ -1,4 +1,6 @@ versions: + "0.6.0": + folder: all "0.3.0": folder: all "0.2.0": From d77771c2300e9c6a2d6861d7d4efe0b2040381d3 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 10 Sep 2023 17:53:17 +0900 Subject: [PATCH 570/637] (#19708) restinio: update fmt/10.1.1 --- recipes/restinio/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/restinio/all/conanfile.py b/recipes/restinio/all/conanfile.py index 076732d0bd175..f9c52830c3a32 100644 --- a/recipes/restinio/all/conanfile.py +++ b/recipes/restinio/all/conanfile.py @@ -38,7 +38,7 @@ def layout(self): def requirements(self): self.requires("http_parser/2.9.4") - self.requires("fmt/10.1.0") + self.requires("fmt/10.1.1") self.requires("expected-lite/0.6.3") self.requires("optional-lite/3.5.0") self.requires("string-view-lite/1.7.0") From d63b1dedb3573e99cd09abe2ff08f0b52366f2eb Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 10 Sep 2023 18:31:19 +0900 Subject: [PATCH 571/637] (#19706) usockets: update boost/1.83.0 --- recipes/usockets/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/usockets/all/conanfile.py b/recipes/usockets/all/conanfile.py index 4f69ddfc963bf..d7b3860e4e166 100644 --- a/recipes/usockets/all/conanfile.py +++ b/recipes/usockets/all/conanfile.py @@ -127,7 +127,7 @@ def requirements(self): elif self.options.eventloop == "gcd": self.requires("libdispatch/5.3.2") elif self.options.eventloop == "boost": - self.requires("boost/1.82.0") + self.requires("boost/1.83.0") def build_requirements(self): if self._settings_build.os == "Windows" and not self._uses_msbuild: From e704a5db80a784d4074655b6b1c669032db2bfd1 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 10 Sep 2023 21:16:17 +0900 Subject: [PATCH 572/637] (#19710) seadex-genesis: update fmt/10.1.0 --- recipes/seadex-genesis/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/seadex-genesis/all/conanfile.py b/recipes/seadex-genesis/all/conanfile.py index 55649339605a9..2328e60870392 100644 --- a/recipes/seadex-genesis/all/conanfile.py +++ b/recipes/seadex-genesis/all/conanfile.py @@ -50,7 +50,7 @@ def configure(self): def requirements(self): # Exposes headers and symbols: https://github.com/SeadexGmbH/genesis/blob/master/genesis/source/version.cpp - self.requires("fmt/10.0.0", transitive_headers=True, transitive_libs=True) + self.requires("fmt/10.1.0", transitive_headers=True, transitive_libs=True) self.requires("seadex-essentials/2.1.3", transitive_headers=True, transitive_libs=True) def source(self): From d2edf960219b55227508985eea6fa504c805e493 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 10 Sep 2023 22:33:30 +0900 Subject: [PATCH 573/637] (#19711) highfive: update dependencies --- recipes/highfive/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/highfive/all/conanfile.py b/recipes/highfive/all/conanfile.py index ebce29b0f3b16..acad7b94ba402 100644 --- a/recipes/highfive/all/conanfile.py +++ b/recipes/highfive/all/conanfile.py @@ -34,9 +34,9 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("hdf5/1.14.0") + self.requires("hdf5/1.14.1") if self.options.with_boost: - self.requires("boost/1.81.0") + self.requires("boost/1.83.0") if self.options.with_eigen: self.requires("eigen/3.4.0") if self.options.with_xtensor: From 98d412baac50854ff57d3bc6a88e3997ee96ad6d Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 10 Sep 2023 23:13:16 +0900 Subject: [PATCH 574/637] (#19712) xtensor: update dependencies --- recipes/xtensor/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/xtensor/all/conanfile.py b/recipes/xtensor/all/conanfile.py index 9bcb5c8f335ae..91b15e6e0415a 100644 --- a/recipes/xtensor/all/conanfile.py +++ b/recipes/xtensor/all/conanfile.py @@ -57,9 +57,9 @@ def requirements(self): if Version(self.version) < "0.24.0": self.requires("xsimd/7.5.0") else: - self.requires("xsimd/10.0.0") + self.requires("xsimd/11.1.0") if self.options.tbb: - self.requires("onetbb/2021.7.0") + self.requires("onetbb/2021.10.0") def package_id(self): self.info.clear() From 30e8e7b87c96e0f6f273a05d8983a7097ebc5cec Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 10 Sep 2023 23:56:56 +0900 Subject: [PATCH 575/637] (#19715) daw_utf_range: update daw_header_libraries/2.96.1 --- recipes/daw_utf_range/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/daw_utf_range/all/conanfile.py b/recipes/daw_utf_range/all/conanfile.py index 77684e08bfd01..23fff04d5723f 100644 --- a/recipes/daw_utf_range/all/conanfile.py +++ b/recipes/daw_utf_range/all/conanfile.py @@ -38,7 +38,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("daw_header_libraries/2.95.0") + self.requires("daw_header_libraries/2.96.1") def package_id(self): self.info.clear() From bb2269f13533d94660ee444d39f246f1d468b5e3 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 10 Sep 2023 19:46:31 +0300 Subject: [PATCH 576/637] (#18193) audiofile: add package_type, add v1.1.1 * audiofile: add package_type * audiofile: add missing include in test_package * audiofile: add v1.1.1 * audiofile: add a check for GCC * audiofile: set correct C++ standard for v1.1.1 * audiofile: add proper compiler versions check --- recipes/audiofile/all/conandata.yml | 3 ++ recipes/audiofile/all/conanfile.py | 47 +++++++++++++++---- .../audiofile/all/test_package/CMakeLists.txt | 7 ++- .../all/test_package/test_package.cpp | 3 ++ .../all/test_v1_package/CMakeLists.txt | 11 ++--- recipes/audiofile/config.yml | 2 + 6 files changed, 55 insertions(+), 18 deletions(-) diff --git a/recipes/audiofile/all/conandata.yml b/recipes/audiofile/all/conandata.yml index 042cc12d06dd1..288d8a5ec4d8c 100644 --- a/recipes/audiofile/all/conandata.yml +++ b/recipes/audiofile/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.1": + url: "https://github.com/adamstark/AudioFile/archive/1.1.1.tar.gz" + sha256: "664f9d5fbbf1ff6c603ae054a35224f12e9856a1d8680be567909015ccaac328" "1.1.0": url: "https://github.com/adamstark/AudioFile/archive/1.1.0.tar.gz" sha256: "7546e39ca17ac09c653f46bfecce4a9936fae3784209ad53094915c78792a327" diff --git a/recipes/audiofile/all/conanfile.py b/recipes/audiofile/all/conanfile.py index 0d083108cea08..c9bd8f69c8aa3 100644 --- a/recipes/audiofile/all/conanfile.py +++ b/recipes/audiofile/all/conanfile.py @@ -1,4 +1,5 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.files import copy, get from conan.tools.layout import basic_layout @@ -11,34 +12,60 @@ class AudiofileConan(ConanFile): name = "audiofile" description = "A simple C++11 library for reading and writing audio files." - topics = ("audiofile", "audio", "file-format", "wav", "aif") license = "MIT" - homepage = "https://github.com/adamstark/AudioFile" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/adamstark/AudioFile" + topics = ("audio", "file-format", "wav", "aif", "header-only") + + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True + @property + def _min_cppstd(self): + # v1.1.1 uses is_signed_v + return 11 if Version(self.version) < "1.1.1" else 17 + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "7", + "clang": "6", + "apple-clang": "10", + } + def configure(self): if Version(self.version) < "1.1.0": self.license = "GPL-3.0-or-later" + 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 layout(self): - basic_layout(self, src_folder="src") + check_min_cppstd(self, self._min_cppstd) + if self._min_cppstd > 11: + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - copy(self, "AudioFile.h", src=self.source_folder, dst=os.path.join(self.package_folder, "include")) + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + copy(self, "AudioFile.h", + dst=os.path.join(self.package_folder, "include"), + src=self.source_folder) def package_info(self): self.cpp_info.bindirs = [] diff --git a/recipes/audiofile/all/test_package/CMakeLists.txt b/recipes/audiofile/all/test_package/CMakeLists.txt index 6f7178f4a8927..fab8ac8a0b20c 100644 --- a/recipes/audiofile/all/test_package/CMakeLists.txt +++ b/recipes/audiofile/all/test_package/CMakeLists.txt @@ -5,4 +5,9 @@ find_package(audiofile REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE audiofile::audiofile) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) + +if (audiofile_VERSION VERSION_GREATER_EQUAL "1.1.1") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +endif() diff --git a/recipes/audiofile/all/test_package/test_package.cpp b/recipes/audiofile/all/test_package/test_package.cpp index 6943fcec35d57..d95bc64031cda 100644 --- a/recipes/audiofile/all/test_package/test_package.cpp +++ b/recipes/audiofile/all/test_package/test_package.cpp @@ -1,3 +1,6 @@ +// workaround for a missing include in v1.0.9 and earlier +#include + #include #include diff --git a/recipes/audiofile/all/test_v1_package/CMakeLists.txt b/recipes/audiofile/all/test_v1_package/CMakeLists.txt index 60fb00c9f3f14..91630d79f4abb 100644 --- a/recipes/audiofile/all/test_v1_package/CMakeLists.txt +++ b/recipes/audiofile/all/test_v1_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) +cmake_minimum_required(VERSION 3.15) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(audiofile REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE audiofile::audiofile) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/audiofile/config.yml b/recipes/audiofile/config.yml index 5fc24e2e9c188..1b65530cbacc9 100644 --- a/recipes/audiofile/config.yml +++ b/recipes/audiofile/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.1": + folder: all "1.1.0": folder: all "1.0.9": From e12cac43e306ffa21e26a3f6cf6114a1759ca721 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 10 Sep 2023 20:28:43 +0300 Subject: [PATCH 577/637] (#18942) libnetfilter_queue: migrate to Conan v2 * libnetfilter_queue: migrate to Conan v2 * libnetfilter_queue: bump deps * libnetfilter_queue: add missing PkgConfigDeps, transitive_headers * libnetfilter_queue: add tool_requires("pkgconf/1.9.5") * libnetfilter_queue: add transitive_libs for libmnl Should not be necessary, but the CI failure does not make much sense either. * Update recipes/libnetfilter_queue/all/conanfile.py Co-authored-by: Uilian Ries --------- Co-authored-by: Uilian Ries --- recipes/libnetfilter_queue/all/conanfile.py | 106 +++---- .../all/test_package/CMakeLists.txt | 9 +- .../all/test_package/conanfile.py | 22 +- .../all/test_package/example.c | 258 +++++++++--------- .../all/test_v1_package/CMakeLists.txt | 8 + .../all/test_v1_package/conanfile.py | 18 ++ 6 files changed, 232 insertions(+), 189 deletions(-) create mode 100644 recipes/libnetfilter_queue/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/libnetfilter_queue/all/test_v1_package/conanfile.py diff --git a/recipes/libnetfilter_queue/all/conanfile.py b/recipes/libnetfilter_queue/all/conanfile.py index 56576ded262ce..73bddfa9c2d3a 100644 --- a/recipes/libnetfilter_queue/all/conanfile.py +++ b/recipes/libnetfilter_queue/all/conanfile.py @@ -1,69 +1,83 @@ import os -from conans import ConanFile, tools, AutoToolsBuildEnvironment -from conans.errors import ConanInvalidConfiguration -required_conan_version = ">=1.29.1" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import copy, get, rm, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain, PkgConfigDeps +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.53.0" + class Libnetfilter_queueConan(ConanFile): name = "libnetfilter_queue" + description = ("userspace library that provides an API to packets" + " that have been queued by the kernel packet filter") license = "GPL-2.0-or-later" url = "https://github.com/conan-io/conan-center-index" homepage = "https://netfilter.org/projects/libnetfilter_queue/index.html" - description = "userspace library that provides an API to packets that have been queued by the kernel packet filter" - topics = ("libnetfilter_queue", "netfilter") - settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} - generators = "pkg_config" - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" + topics = "netfilter" - def requirements(self): - self.requires("libmnl/1.0.4") - self.requires("libnfnetlink/1.0.1") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } - def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = self.name + "-" + self.version - os.rename(extracted_dir, self._source_subfolder) + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC - def configure(self): + def validate(self): if self.settings.os != "Linux": - raise ConanInvalidConfiguration("libnetfilter_queue is only supported on Linux") - if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self) - conf_args = [] + raise ConanInvalidConfiguration(f"{self.ref} is only supported on Linux.") + + def configure(self): if self.options.shared: - conf_args.extend(["--enable-shared", "--disable-static"]) - else: - conf_args.extend(["--disable-shared", "--enable-static"]) - self._autotools.configure(configure_dir=self._source_subfolder, args=conf_args) - return self._autotools + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("libmnl/1.0.4", transitive_headers=True, transitive_libs=True) + self.requires("libnfnetlink/1.0.2", transitive_headers=True) + + def build_requirements(self): + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/1.9.5") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) + tc.generate() + deps = PkgConfigDeps(self) + deps.generate() def build(self): - autotools = self._configure_autotools() + autotools = Autotools(self) + autotools.configure() autotools.make() def package(self): - self.copy("COPYING", dst="licenses", src=self._source_subfolder) - autotools = self._configure_autotools() + copy(self, "COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + autotools = Autotools(self) autotools.install() - tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.la") - tools.rmdir(os.path.join(self.package_folder, "share")) - tools.rmdir(os.path.join(self.package_folder, "etc")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + rm(self, "*.la", self.package_folder, recursive=True) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "etc")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): self.cpp_info.libs = ["netfilter_queue"] - self.cpp_info.names["pkg_config"] = "libnetfilter_queue" + self.cpp_info.set_property("pkg_config_name", "libnetfilter_queue") diff --git a/recipes/libnetfilter_queue/all/test_package/CMakeLists.txt b/recipes/libnetfilter_queue/all/test_package/CMakeLists.txt index 4dbc40cd2c4d9..58e2406eaac64 100644 --- a/recipes/libnetfilter_queue/all/test_package/CMakeLists.txt +++ b/recipes/libnetfilter_queue/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.10) -project(PackageTest) +cmake_minimum_required(VERSION 3.15) +project(PackageTest LANGUAGES C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(libnetfilter_queue REQUIRED CONFIG) add_executable(example example.c) -target_link_libraries(example ${CONAN_LIBS}) +target_link_libraries(example libnetfilter_queue::libnetfilter_queue) diff --git a/recipes/libnetfilter_queue/all/test_package/conanfile.py b/recipes/libnetfilter_queue/all/test_package/conanfile.py index 1097433829a7c..cf3b9d75009a7 100644 --- a/recipes/libnetfilter_queue/all/test_package/conanfile.py +++ b/recipes/libnetfilter_queue/all/test_package/conanfile.py @@ -1,11 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" -class Libnetfilter_queueTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "example") - self.run("{} {}".format(bin_path, 0), run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "example") + self.run(f"{bin_path} 0", env="conanrun") diff --git a/recipes/libnetfilter_queue/all/test_package/example.c b/recipes/libnetfilter_queue/all/test_package/example.c index f229443f228aa..6260070d87080 100644 --- a/recipes/libnetfilter_queue/all/test_package/example.c +++ b/recipes/libnetfilter_queue/all/test_package/example.c @@ -1,17 +1,17 @@ +#include #include #include #include -#include #include #include -#include +#include #include #include #include -#include #include +#include #include @@ -20,153 +20,149 @@ static struct mnl_socket *nl; -static void -nfq_send_verdict(int queue_num, uint32_t id) -{ - char buf[MNL_SOCKET_BUFFER_SIZE]; - struct nlmsghdr *nlh; - struct nlattr *nest; +static void nfq_send_verdict(int queue_num, uint32_t id) { + char buf[MNL_SOCKET_BUFFER_SIZE]; + struct nlmsghdr *nlh; + struct nlattr *nest; - nlh = nfq_nlmsg_put(buf, NFQNL_MSG_VERDICT, queue_num); - nfq_nlmsg_verdict_put(nlh, id, NF_ACCEPT); + nlh = nfq_nlmsg_put(buf, NFQNL_MSG_VERDICT, queue_num); + nfq_nlmsg_verdict_put(nlh, id, NF_ACCEPT); - /* example to set the connmark. First, start NFQA_CT section: */ - nest = mnl_attr_nest_start(nlh, NFQA_CT); + /* example to set the connmark. First, start NFQA_CT section: */ + nest = mnl_attr_nest_start(nlh, NFQA_CT); - /* then, add the connmark attribute: */ - mnl_attr_put_u32(nlh, CTA_MARK, htonl(42)); - /* more conntrack attributes, e.g. CTA_LABELS could be set here */ + /* then, add the connmark attribute: */ + mnl_attr_put_u32(nlh, CTA_MARK, htonl(42)); + /* more conntrack attributes, e.g. CTA_LABELS could be set here */ - /* end conntrack section */ - mnl_attr_nest_end(nlh, nest); + /* end conntrack section */ + mnl_attr_nest_end(nlh, nest); - if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) { - perror("mnl_socket_send"); - exit(EXIT_FAILURE); - } + if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) { + perror("mnl_socket_send"); + exit(EXIT_FAILURE); + } } -static int queue_cb(const struct nlmsghdr *nlh, void *data) -{ - struct nfqnl_msg_packet_hdr *ph = NULL; - struct nlattr *attr[NFQA_MAX+1] = {}; - uint32_t id = 0, skbinfo; - struct nfgenmsg *nfg; - uint16_t plen; +static int queue_cb(const struct nlmsghdr *nlh, void *data) { + struct nfqnl_msg_packet_hdr *ph = NULL; + struct nlattr *attr[NFQA_MAX + 1] = {}; + uint32_t id = 0, skbinfo; + struct nfgenmsg *nfg; + uint16_t plen; - if (nfq_nlmsg_parse(nlh, attr) < 0) { - perror("problems parsing"); - return MNL_CB_ERROR; - } + if (nfq_nlmsg_parse(nlh, attr) < 0) { + perror("problems parsing"); + return MNL_CB_ERROR; + } - nfg = mnl_nlmsg_get_payload(nlh); + nfg = mnl_nlmsg_get_payload(nlh); - if (attr[NFQA_PACKET_HDR] == NULL) { - fputs("metaheader not set\n", stderr); - return MNL_CB_ERROR; - } + if (attr[NFQA_PACKET_HDR] == NULL) { + fputs("metaheader not set\n", stderr); + return MNL_CB_ERROR; + } - ph = mnl_attr_get_payload(attr[NFQA_PACKET_HDR]); + ph = mnl_attr_get_payload(attr[NFQA_PACKET_HDR]); - plen = mnl_attr_get_payload_len(attr[NFQA_PAYLOAD]); - /* void *payload = mnl_attr_get_payload(attr[NFQA_PAYLOAD]); */ + plen = mnl_attr_get_payload_len(attr[NFQA_PAYLOAD]); + /* void *payload = mnl_attr_get_payload(attr[NFQA_PAYLOAD]); */ - skbinfo = attr[NFQA_SKB_INFO] ? ntohl(mnl_attr_get_u32(attr[NFQA_SKB_INFO])) : 0; + skbinfo = attr[NFQA_SKB_INFO] ? ntohl(mnl_attr_get_u32(attr[NFQA_SKB_INFO])) : 0; - if (attr[NFQA_CAP_LEN]) { - uint32_t orig_len = ntohl(mnl_attr_get_u32(attr[NFQA_CAP_LEN])); - if (orig_len != plen) - printf("truncated "); - } + if (attr[NFQA_CAP_LEN]) { + uint32_t orig_len = ntohl(mnl_attr_get_u32(attr[NFQA_CAP_LEN])); + if (orig_len != plen) + printf("truncated "); + } - if (skbinfo & NFQA_SKB_GSO) - printf("GSO "); + if (skbinfo & NFQA_SKB_GSO) + printf("GSO "); - id = ntohl(ph->packet_id); - printf("packet received (id=%u hw=0x%04x hook=%u, payload len %u", - id, ntohs(ph->hw_protocol), ph->hook, plen); + id = ntohl(ph->packet_id); + printf("packet received (id=%u hw=0x%04x hook=%u, payload len %u", id, ntohs(ph->hw_protocol), + ph->hook, plen); - /* - * ip/tcp checksums are not yet valid, e.g. due to GRO/GSO. - * The application should behave as if the checksums are correct. - * - * If these packets are later forwarded/sent out, the checksums will - * be corrected by kernel/hardware. - */ - if (skbinfo & NFQA_SKB_CSUMNOTREADY) - printf(", checksum not ready"); - puts(")"); + /* + * ip/tcp checksums are not yet valid, e.g. due to GRO/GSO. + * The application should behave as if the checksums are correct. + * + * If these packets are later forwarded/sent out, the checksums will + * be corrected by kernel/hardware. + */ + if (skbinfo & NFQA_SKB_CSUMNOTREADY) + printf(", checksum not ready"); + puts(")"); - nfq_send_verdict(ntohs(nfg->res_id), id); + nfq_send_verdict(ntohs(nfg->res_id), id); - return MNL_CB_OK; + return MNL_CB_OK; } -int main(int argc, char *argv[]) -{ - char *buf; - /* largest possible packet payload, plus netlink data overhead: */ - size_t sizeof_buf = 0xffff + (MNL_SOCKET_BUFFER_SIZE/2); - struct nlmsghdr *nlh; - int ret; - unsigned int portid, queue_num; - - if (argc != 2) { - printf("Usage: %s [queue_num]\n", argv[0]); - exit(EXIT_FAILURE); - } - queue_num = atoi(argv[1]); - - nl = mnl_socket_open(NETLINK_NETFILTER); - if (nl == NULL) { - perror("mnl_socket_open"); - exit(EXIT_FAILURE); - } - - if (mnl_socket_bind(nl, 0, MNL_SOCKET_AUTOPID) < 0) { - perror("mnl_socket_bind"); - exit(EXIT_FAILURE); - } - portid = mnl_socket_get_portid(nl); - - buf = malloc(sizeof_buf); - if (!buf) { - perror("allocate receive buffer"); - exit(EXIT_FAILURE); - } - - nlh = nfq_nlmsg_put(buf, NFQNL_MSG_CONFIG, queue_num); - nfq_nlmsg_cfg_put_cmd(nlh, AF_INET, NFQNL_CFG_CMD_BIND); - - if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) { - perror("mnl_socket_send"); - exit(EXIT_FAILURE); - } - - nlh = nfq_nlmsg_put(buf, NFQNL_MSG_CONFIG, queue_num); - nfq_nlmsg_cfg_put_params(nlh, NFQNL_COPY_PACKET, 0xffff); - - mnl_attr_put_u32(nlh, NFQA_CFG_FLAGS, htonl(NFQA_CFG_F_GSO)); - mnl_attr_put_u32(nlh, NFQA_CFG_MASK, htonl(NFQA_CFG_F_GSO)); - - if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) { - perror("mnl_socket_send"); - exit(EXIT_FAILURE); - } - - /* ENOBUFS is signalled to userspace when packets were lost - * on kernel side. In most cases, userspace isn't interested - * in this information, so turn it off. - */ - ret = 1; - mnl_socket_setsockopt(nl, NETLINK_NO_ENOBUFS, &ret, sizeof(int)); - ret = mnl_socket_recvfrom(nl, buf, sizeof_buf); - if (ret == -1) { - perror("mnl_socket_recvfrom"); - exit(EXIT_FAILURE); - } - - mnl_socket_close(nl); - - return 0; +int main(int argc, char *argv[]) { + char *buf; + /* largest possible packet payload, plus netlink data overhead: */ + size_t sizeof_buf = 0xffff + (MNL_SOCKET_BUFFER_SIZE / 2); + struct nlmsghdr *nlh; + int ret; + unsigned int portid, queue_num; + + if (argc != 2) { + printf("Usage: %s [queue_num]\n", argv[0]); + exit(EXIT_FAILURE); + } + queue_num = atoi(argv[1]); + + nl = mnl_socket_open(NETLINK_NETFILTER); + if (nl == NULL) { + perror("mnl_socket_open"); + exit(EXIT_FAILURE); + } + + if (mnl_socket_bind(nl, 0, MNL_SOCKET_AUTOPID) < 0) { + perror("mnl_socket_bind"); + exit(EXIT_FAILURE); + } + portid = mnl_socket_get_portid(nl); + + buf = malloc(sizeof_buf); + if (!buf) { + perror("allocate receive buffer"); + exit(EXIT_FAILURE); + } + + nlh = nfq_nlmsg_put(buf, NFQNL_MSG_CONFIG, queue_num); + nfq_nlmsg_cfg_put_cmd(nlh, AF_INET, NFQNL_CFG_CMD_BIND); + + if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) { + perror("mnl_socket_send"); + exit(EXIT_FAILURE); + } + + nlh = nfq_nlmsg_put(buf, NFQNL_MSG_CONFIG, queue_num); + nfq_nlmsg_cfg_put_params(nlh, NFQNL_COPY_PACKET, 0xffff); + + mnl_attr_put_u32(nlh, NFQA_CFG_FLAGS, htonl(NFQA_CFG_F_GSO)); + mnl_attr_put_u32(nlh, NFQA_CFG_MASK, htonl(NFQA_CFG_F_GSO)); + + if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) { + perror("mnl_socket_send"); + exit(EXIT_FAILURE); + } + + /* ENOBUFS is signalled to userspace when packets were lost + * on kernel side. In most cases, userspace isn't interested + * in this information, so turn it off. + */ + ret = 1; + mnl_socket_setsockopt(nl, NETLINK_NO_ENOBUFS, &ret, sizeof(int)); + ret = mnl_socket_recvfrom(nl, buf, sizeof_buf); + if (ret == -1) { + perror("mnl_socket_recvfrom"); + exit(EXIT_FAILURE); + } + + mnl_socket_close(nl); + + return 0; } diff --git a/recipes/libnetfilter_queue/all/test_v1_package/CMakeLists.txt b/recipes/libnetfilter_queue/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libnetfilter_queue/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libnetfilter_queue/all/test_v1_package/conanfile.py b/recipes/libnetfilter_queue/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..528904ad9f959 --- /dev/null +++ b/recipes/libnetfilter_queue/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class Libnetfilter_queueTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "example") + self.run("{} {}".format(bin_path, 0), run_environment=True) From 5f690e214ae4b3a431a28b5f16979cda96f3b61b Mon Sep 17 00:00:00 2001 From: qwqbot Date: Mon, 11 Sep 2023 02:11:22 +0800 Subject: [PATCH 578/637] (#19028) add evmc * add evmc * Fix current build in CCI Signed-off-by: Uilian Ries * fix cmake tool_requires --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries --- recipes/evmc/all/conandata.yml | 4 + recipes/evmc/all/conanfile.py | 81 +++++++++++++++++++ recipes/evmc/all/test_package/CMakeLists.txt | 8 ++ recipes/evmc/all/test_package/conanfile.py | 26 ++++++ .../evmc/all/test_package/test_package.cpp | 19 +++++ recipes/evmc/config.yml | 3 + 6 files changed, 141 insertions(+) create mode 100644 recipes/evmc/all/conandata.yml create mode 100644 recipes/evmc/all/conanfile.py create mode 100644 recipes/evmc/all/test_package/CMakeLists.txt create mode 100644 recipes/evmc/all/test_package/conanfile.py create mode 100644 recipes/evmc/all/test_package/test_package.cpp create mode 100644 recipes/evmc/config.yml diff --git a/recipes/evmc/all/conandata.yml b/recipes/evmc/all/conandata.yml new file mode 100644 index 0000000000000..6c98b724e418c --- /dev/null +++ b/recipes/evmc/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "10.1.1": + url: "https://github.com/ethereum/evmc/archive/v10.1.1.tar.gz" + sha256: "314a18635b2727a5129a7da3e4e15bd2fd76ee0c5ae19f21391b7a94e79cf459" diff --git a/recipes/evmc/all/conanfile.py b/recipes/evmc/all/conanfile.py new file mode 100644 index 0000000000000..13c6e5da4cc78 --- /dev/null +++ b/recipes/evmc/all/conanfile.py @@ -0,0 +1,81 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout +from conan.tools.files import get, copy, rmdir +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.54.0" + + +class EVMCConan(ConanFile): + name = "evmc" + description = "EVMC – Ethereum Client-VM Connector API" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ethereum/evmc" + topics = ("ethereum", "wasm", "evm") + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" + tool_requires = "cmake/[>=3.16.2 <4]" + options = {"fPIC": [True, False]} + default_options = {"fPIC": True} + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "8", + "clang": "9", + "apple-clang": "10", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def layout(self): + cmake_layout(self, src_folder="src") + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["EVMC_INSTALL"] = True + tc.variables["EVMC_TESTING"] = False + tc.variables["EVMC_JAVA"] = False + tc.variables["EVMC_TESTING"] = False + tc.variables["EVMC_EXAMPLES"] = False + tc.variables["EVMC_TOOLS"] = False + tc.variables["HUNTER_ENABLED"] = False + tc.generate() + + def validate(self): + if self.settings.get_safe("compiler.cppstd"): + check_min_cppstd(self, self._min_cppstd) + + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.libs = ["evmc-instructions", "evmc-loader", "tooling"] diff --git a/recipes/evmc/all/test_package/CMakeLists.txt b/recipes/evmc/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..d3cab735f84a2 --- /dev/null +++ b/recipes/evmc/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.12) +project(test_package LANGUAGES CXX) + +find_package(evmc REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE evmc::evmc) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/evmc/all/test_package/conanfile.py b/recipes/evmc/all/test_package/conanfile.py new file mode 100644 index 0000000000000..a9fb96656f203 --- /dev/null +++ b/recipes/evmc/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/evmc/all/test_package/test_package.cpp b/recipes/evmc/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..2810a6cfce945 --- /dev/null +++ b/recipes/evmc/all/test_package/test_package.cpp @@ -0,0 +1,19 @@ +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int main() { + const auto table = evmc_get_instruction_names_table(EVMC_BYZANTIUM); + std::cout << "HEX 0x80: " << evmc::hex(0x80) << std::endl; + + return EXIT_SUCCESS; +} diff --git a/recipes/evmc/config.yml b/recipes/evmc/config.yml new file mode 100644 index 0000000000000..a29f6d72c69f6 --- /dev/null +++ b/recipes/evmc/config.yml @@ -0,0 +1,3 @@ +versions: + "10.1.1": + folder: all From 433e3972c4ab4256c0ea150a4727b34fb3aa9445 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 11 Sep 2023 03:49:33 +0900 Subject: [PATCH 579/637] (#19447) libzippp: add version 6.1-1.9.2 * libzippp: add version 6.1-1.9.2 * fix patch version check * add build_require for 6.1 * always require cmake * improve version check for applying patch --- recipes/libzippp/all/conandata.yml | 3 +++ recipes/libzippp/all/conanfile.py | 11 ++++++++--- recipes/libzippp/config.yml | 2 ++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/recipes/libzippp/all/conandata.yml b/recipes/libzippp/all/conandata.yml index f31401deb346d..90151532c90b5 100644 --- a/recipes/libzippp/all/conandata.yml +++ b/recipes/libzippp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "6.1-1.9.2": + url: "https://github.com/ctabin/libzippp/archive/libzippp-v6.1-1.9.2.tar.gz" + sha256: "3796f174780f23938749da493cf4cbc4c55f84a568ec395f2c256dfe10129305" "6.0-1.9.2": url: "https://github.com/ctabin/libzippp/archive/libzippp-v6.0-1.9.2.tar.gz" sha256: "f9aef9811802a18e69cd50527381d70c2e0f0d8a839f1d41914f6234f5964fc3" diff --git a/recipes/libzippp/all/conanfile.py b/recipes/libzippp/all/conanfile.py index e0c0670ea25f1..9699cb890e5fc 100644 --- a/recipes/libzippp/all/conanfile.py +++ b/recipes/libzippp/all/conanfile.py @@ -64,6 +64,9 @@ def validate(self): if self.settings.compiler == "clang" and self.settings.compiler.get_safe("libcxx") == "libc++": raise ConanInvalidConfiguration(f"{self.ref} does not support clang with libc++. Use libstdc++ instead.") + def build_requirements(self): + self.tool_requires("cmake/[>=3.16 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -74,15 +77,17 @@ def generate(self): tc.variables["LIBZIPPP_INSTALL_HEADERS"] = True tc.variables["LIBZIPPP_BUILD_TESTS"] = False tc.variables["LIBZIPPP_ENABLE_ENCRYPTION"] = self.options.with_encryption + tc.variables["LIBZIPPP_CMAKE_CONFIG_MODE"] = True tc.generate() deps = CMakeDeps(self) deps.generate() def _patch_source(self): - replace_in_file(self, os.path.join(self.source_folder, 'CMakeLists.txt'), - 'find_package(LIBZIP MODULE REQUIRED)', - 'find_package(libzip REQUIRED CONFIG)') + if Version(self.version) <= "6.0": + replace_in_file(self, os.path.join(self.source_folder, 'CMakeLists.txt'), + 'find_package(LIBZIP MODULE REQUIRED)', + 'find_package(libzip REQUIRED CONFIG)') def build(self): self._patch_source() diff --git a/recipes/libzippp/config.yml b/recipes/libzippp/config.yml index 4ba054a3032a9..f715620c8ae87 100644 --- a/recipes/libzippp/config.yml +++ b/recipes/libzippp/config.yml @@ -1,4 +1,6 @@ versions: + "6.1-1.9.2": + folder: all "6.0-1.9.2": folder: all "5.0-1.8.0": From 1af2c17b53a2f7b27d720f7ec6ce32133482fac3 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 11 Sep 2023 04:30:35 +0900 Subject: [PATCH 580/637] (#19656) ada: add version 2.6.7, remove older versions --- recipes/ada/all/conandata.yml | 21 +++------------------ recipes/ada/all/conanfile.py | 8 ++------ recipes/ada/config.yml | 14 ++------------ 3 files changed, 7 insertions(+), 36 deletions(-) diff --git a/recipes/ada/all/conandata.yml b/recipes/ada/all/conandata.yml index 1ffb1049ac57f..0d566dbc80ea8 100644 --- a/recipes/ada/all/conandata.yml +++ b/recipes/ada/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.6.7": + url: "https://github.com/ada-url/ada/archive/v2.6.7.tar.gz" + sha256: "882a0aa6e19174b60b2fa00ee75d35a31ecd5158fb97d0e4e719ba21bb07acb9" "2.6.4": url: "https://github.com/ada-url/ada/archive/v2.6.4.tar.gz" sha256: "5b488e9a7a700de5d40a749c96c4339bcc9c425e5f5406a0887b13e70bd90907" @@ -17,21 +20,3 @@ sources: "2.4.2": url: "https://github.com/ada-url/ada/archive/v2.4.2.tar.gz" sha256: "d865ab8828c14fc1e2217ca9f5d7918d50775175b2873faf2fbda0085e0623d2" - "2.4.1": - url: "https://github.com/ada-url/ada/archive/refs/tags/v2.4.1.tar.gz" - sha256: "e9359937e7aeb8e5889515c0a9e22cd5da50e9b053038eb092135a0e64888fe7" - "2.4.0": - url: "https://github.com/ada-url/ada/archive/refs/tags/v2.4.0.tar.gz" - sha256: "14624f1dfd966fee85272688064714172ff70e6e304a1e1850f352a07e4c6dc7" - "2.3.1": - url: "https://github.com/ada-url/ada/archive/refs/tags/v2.3.1.tar.gz" - sha256: "298992ec0958979090566c7835ea60c14f5330d6372ee092ef6eee1d2e6ac079" - "2.3.0": - url: "https://github.com/ada-url/ada/archive/refs/tags/v2.3.0.tar.gz" - sha256: "932a93f6a745775343ebdbaafca295e07b9513f6aaeb738f9e85dcb397925e33" - "2.2.0": - url: "https://github.com/ada-url/ada/archive/refs/tags/v2.2.0.tar.gz" - sha256: "40a6b3fe0d5c62936c081e8403790ec05d5afe3d0909eece894efcfef7e678ee" - "2.0.0": - url: "https://github.com/ada-url/ada/archive/refs/tags/v2.0.0.tar.gz" - sha256: "a18272e1c5d6580f62a333df88149e3810ffedcb61b3fb06c480a5b52e458b5e" diff --git a/recipes/ada/all/conanfile.py b/recipes/ada/all/conanfile.py index 76d787b5a14b7..4954905b8f7de 100644 --- a/recipes/ada/all/conanfile.py +++ b/recipes/ada/all/conanfile.py @@ -45,9 +45,6 @@ def config_options(self): del self.options.fPIC def configure(self): - if Version(self.version) <= "2.0.0": - self.options.rm_safe("shared") - self.package_type = "static-library" if self.options.get_safe("shared"): self.options.rm_safe("fPIC") @@ -55,7 +52,7 @@ def layout(self): cmake_layout(self, src_folder="src") def validate(self): - if self.settings.compiler.cppstd: + if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version and Version(self.settings.compiler.version) < minimum_version: @@ -77,8 +74,7 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_TESTING"] = False - if Version(self.version) >= "2.4.2": - tc.variables["ADA_TOOLS"] = False + tc.variables["ADA_TOOLS"] = False tc.generate() deps = CMakeDeps(self) diff --git a/recipes/ada/config.yml b/recipes/ada/config.yml index 4b6a02c6d6d42..2c76fe7baba05 100644 --- a/recipes/ada/config.yml +++ b/recipes/ada/config.yml @@ -1,4 +1,6 @@ versions: + "2.6.7": + folder: all "2.6.4": folder: all "2.6.2": @@ -11,15 +13,3 @@ versions: folder: all "2.4.2": folder: all - "2.4.1": - folder: all - "2.4.0": - folder: all - "2.3.1": - folder: all - "2.3.0": - folder: all - "2.2.0": - folder: all - "2.0.0": - folder: all From 9d1f315e0aeeed69257b0afb40150bd6aa4f4997 Mon Sep 17 00:00:00 2001 From: Roberto Rossini <71787608+robomics@users.noreply.github.com> Date: Sun, 10 Sep 2023 22:31:30 +0200 Subject: [PATCH 581/637] (#19719) xz_utils: add v5.4.4 --- recipes/xz_utils/all/conandata.yml | 3 +++ recipes/xz_utils/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/xz_utils/all/conandata.yml b/recipes/xz_utils/all/conandata.yml index da0e232cb7e1a..458ec76199721 100644 --- a/recipes/xz_utils/all/conandata.yml +++ b/recipes/xz_utils/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.4.4": + url: "https://tukaani.org/xz/xz-5.4.4.tar.gz" + sha256: "aae39544e254cfd27e942d35a048d592959bd7a79f9a624afb0498bb5613bdf8" "5.4.2": url: "https://tukaani.org/xz/xz-5.4.2.tar.gz" sha256: "87947679abcf77cc509d8d1b474218fd16b72281e2797360e909deaee1ac9d05" diff --git a/recipes/xz_utils/config.yml b/recipes/xz_utils/config.yml index 326a90e52c837..88aa46f065b92 100644 --- a/recipes/xz_utils/config.yml +++ b/recipes/xz_utils/config.yml @@ -1,4 +1,6 @@ versions: + "5.4.4": + folder: all "5.4.2": folder: all "5.4.0": From 1eabd5381d40da1063d547fa7beb86c1f7eae220 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshev Date: Mon, 11 Sep 2023 00:10:19 +0300 Subject: [PATCH 582/637] (#19723) libavif: bump deps --- recipes/libavif/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/libavif/all/conanfile.py b/recipes/libavif/all/conanfile.py index dc46d0267dd99..247dc536d3759 100644 --- a/recipes/libavif/all/conanfile.py +++ b/recipes/libavif/all/conanfile.py @@ -47,10 +47,10 @@ def _has_dav1d(self): return self.options.with_decoder == "dav1d" def requirements(self): - self.requires("libaom-av1/3.5.0") + self.requires("libaom-av1/3.6.1") self.requires("libyuv/1854") if self._has_dav1d: - self.requires("dav1d/1.0.0") + self.requires("dav1d/1.2.1") def source(self): get(self, **self.conan_data["sources"][self.version], From 60c425654521662c515163e591cbf0410827a355 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 11 Sep 2023 11:32:32 +0900 Subject: [PATCH 583/637] (#19720) samurai: update dependencies --- recipes/samurai/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/samurai/all/conanfile.py b/recipes/samurai/all/conanfile.py index 3c3caf72355d3..8e629d1289dfb 100644 --- a/recipes/samurai/all/conanfile.py +++ b/recipes/samurai/all/conanfile.py @@ -40,10 +40,10 @@ def layout(self): def requirements(self): self.requires("cli11/2.3.2") - self.requires("fmt/9.1.0") + self.requires("fmt/10.1.1") self.requires("highfive/2.7.1") self.requires("pugixml/1.13") - self.requires("xsimd/10.0.0") + self.requires("xsimd/11.1.0") self.requires("xtensor/0.24.3") def package_id(self): From a941b237a6444e5ce706edb01fff1955ebb212a3 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 11 Sep 2023 13:06:18 +0900 Subject: [PATCH 584/637] (#18580) functions-framework-cpp: add version 1.2.0, support conan v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * functions-framework-cpp: add version 1.2.0, support conan v2 * Update recipes/functions-framework-cpp/all/conanfile.py * add patches for compilation errors * remove unused function * update boost/1.83.0 --------- Co-authored-by: Rubén Rincón Blanco --- .../all/CMakeLists.txt | 7 -- .../functions-framework-cpp/all/conandata.yml | 18 ++- .../functions-framework-cpp/all/conanfile.py | 108 ++++++++---------- ...ch => 1.0.0-0001-dont-skip-namelink.patch} | 0 .../1.0.0-0002-find-nlohmann_json.patch | 22 ++++ .../1.2.0-0001-dont-skip-namelink.patch | 12 ++ .../1.2.0-0002-find-nlohmann_json.patch | 22 ++++ .../all/test_package/CMakeLists.txt | 7 +- .../all/test_package/conanfile.py | 19 ++- recipes/functions-framework-cpp/config.yml | 2 + 10 files changed, 140 insertions(+), 77 deletions(-) delete mode 100644 recipes/functions-framework-cpp/all/CMakeLists.txt rename recipes/functions-framework-cpp/all/patches/{0001-dont-skip-namelink.patch => 1.0.0-0001-dont-skip-namelink.patch} (100%) create mode 100644 recipes/functions-framework-cpp/all/patches/1.0.0-0002-find-nlohmann_json.patch create mode 100644 recipes/functions-framework-cpp/all/patches/1.2.0-0001-dont-skip-namelink.patch create mode 100644 recipes/functions-framework-cpp/all/patches/1.2.0-0002-find-nlohmann_json.patch diff --git a/recipes/functions-framework-cpp/all/CMakeLists.txt b/recipes/functions-framework-cpp/all/CMakeLists.txt deleted file mode 100644 index c921d02a0d877..0000000000000 --- a/recipes/functions-framework-cpp/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.4) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/functions-framework-cpp/all/conandata.yml b/recipes/functions-framework-cpp/all/conandata.yml index c01327cda0d09..0f463b674b8cc 100644 --- a/recipes/functions-framework-cpp/all/conandata.yml +++ b/recipes/functions-framework-cpp/all/conandata.yml @@ -1,8 +1,22 @@ sources: + "1.2.0": + url: "https://github.com/GoogleCloudPlatform/functions-framework-cpp/archive/refs/tags/v1.2.0.tar.gz" + sha256: "729e24ef58a03b563e48d8006d63972b16a22bcf93bf2b49f40c3b219032b64b" "1.0.0": url: "https://github.com/GoogleCloudPlatform/functions-framework-cpp/archive/refs/tags/v1.0.0.tar.gz" sha256: "005f2fbe3b8be9f6f0bf7a4a5d218a23b0f62d854a5e84c56872dd3a4d2820f7" patches: + "1.2.0": + - patch_file: "patches/1.2.0-0001-dont-skip-namelink.patch" + patch_description: "disable NAMELINK_SKIP" + patch_type: "portability" + - patch_file: "patches/1.2.0-0002-find-nlohmann_json.patch" + patch_description: "use cci's nlohmann_json" + patch_type: "conan" "1.0.0": - - patch_file: "patches/0001-dont-skip-namelink.patch" - base_path: "source_subfolder" + - patch_file: "patches/1.0.0-0001-dont-skip-namelink.patch" + patch_description: "disable NAMELINK_SKIP" + patch_type: "portability" + - patch_file: "patches/1.0.0-0002-find-nlohmann_json.patch" + patch_description: "use cci's nlohmann_json" + patch_type: "conan" diff --git a/recipes/functions-framework-cpp/all/conanfile.py b/recipes/functions-framework-cpp/all/conanfile.py index 96389274771c4..859f3f1596a4e 100644 --- a/recipes/functions-framework-cpp/all/conanfile.py +++ b/recipes/functions-framework-cpp/all/conanfile.py @@ -1,19 +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.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir +from conan.tools.build import check_min_cppstd, cross_building +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout import os -required_conan_version = ">=1.43.0" - +required_conan_version = ">=1.53.0" class FunctionsFrameworkCppConan(ConanFile): name = "functions-framework-cpp" description = "An open source FaaS (Functions as a Service) framework" license = "Apache-2.0" - topics = ("google", "cloud", "functions-as-a-service", "faas-framework") - homepage = "https://github.com/GoogleCloudPlatform/functions-framework-cpp" url = "https://github.com/conan-io/conan-center-index" - + homepage = "https://github.com/GoogleCloudPlatform/functions-framework-cpp" + topics = ("google", "cloud", "functions-as-a-service", "faas-framework") settings = "os", "arch", "compiler", "build_type" + package_type = "library" options = { "shared": [True, False], "fPIC": [True, False], @@ -22,23 +25,24 @@ class FunctionsFrameworkCppConan(ConanFile): "shared": False, "fPIC": True, } - - generators = "cmake", "cmake_find_package_multi", "cmake_find_package" short_paths = True - _cmake = None @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 17 @property - def _is_msvc(self): - return str(self.settings.compiler) in ["Visual Studio", "msvc"] + def _compilers_minimum_version(self): + return { + "gcc": "9", + "Visual Studio": "15.7", + "msvc": "190", + "clang": "7", + "apple-clang": "11", + } def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -46,21 +50,15 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") - def requirements(self): - self.requires("abseil/20211102.0") - self.requires("boost/1.78.0") - self.requires("nlohmann_json/3.10.5") + def layout(self): + cmake_layout(self, src_folder="src") - @property - def _compilers_minimum_version(self): - return { - "gcc": "9", - "Visual Studio": "15.7", - "clang": "7", - "apple-clang": "11", - } + def requirements(self): + self.requires("abseil/20230125.3") + self.requires("boost/1.83.0") + self.requires("nlohmann_json/3.11.2", transitive_headers=True) @property def _required_boost_components(self): @@ -68,10 +66,10 @@ def _required_boost_components(self): def validate(self): miss_boost_required_comp = \ - any(getattr(self.options["boost"], + any(getattr(self.dependencies["boost"].options, "without_{}".format(boost_comp), True) for boost_comp in self._required_boost_components) - if self.options["boost"].header_only or miss_boost_required_comp: + if self.dependencies["boost"].options.header_only or miss_boost_required_comp: raise ConanInvalidConfiguration( "{0} requires non-header-only boost with these components: {1}".format( self.name, ", ".join(self._required_boost_components) @@ -79,7 +77,7 @@ def validate(self): ) if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 17) + check_min_cppstd(self, self._min_cppstd) def loose_lt_semver(v1, v2): lv1 = [int(v) for v in v1.split(".")] @@ -90,46 +88,40 @@ def loose_lt_semver(v1, v2): minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version and loose_lt_semver(str(self.settings.compiler.version), minimum_version): raise ConanInvalidConfiguration( - "{} requires C++17, which your compiler does not support.".format(self.name) + "{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) - if self._is_msvc and self.options.shared: + if is_msvc(self) and self.options.shared: raise ConanInvalidConfiguration("Fails to build for Visual Studio as a DLL") - if hasattr(self, "settings_build") and tools.cross_building(self): + if hasattr(self, "settings_build") and cross_building(self): raise ConanInvalidConfiguration( "Recipe not prepared for cross-building (yet)" ) def source(self): - tools.get( - **self.conan_data["sources"][self.version], - destination=self._source_subfolder, - strip_root=True - ) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["BUILD_TESTING"] = False - self._cmake.definitions["FUNCTIONS_FRAMEWORK_CPP_TEST_EXAMPLES"] = False - - self._cmake.configure() - return self._cmake + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["BUILD_TESTING"] = False + tc.variables["FUNCTIONS_FRAMEWORK_CPP_TEST_EXAMPLES"] = 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() + apply_conandata_patches(self) + 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, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "functions_framework_cpp") diff --git a/recipes/functions-framework-cpp/all/patches/0001-dont-skip-namelink.patch b/recipes/functions-framework-cpp/all/patches/1.0.0-0001-dont-skip-namelink.patch similarity index 100% rename from recipes/functions-framework-cpp/all/patches/0001-dont-skip-namelink.patch rename to recipes/functions-framework-cpp/all/patches/1.0.0-0001-dont-skip-namelink.patch diff --git a/recipes/functions-framework-cpp/all/patches/1.0.0-0002-find-nlohmann_json.patch b/recipes/functions-framework-cpp/all/patches/1.0.0-0002-find-nlohmann_json.patch new file mode 100644 index 0000000000000..869e28e535811 --- /dev/null +++ b/recipes/functions-framework-cpp/all/patches/1.0.0-0002-find-nlohmann_json.patch @@ -0,0 +1,22 @@ +diff --git a/google/cloud/functions/CMakeLists.txt b/google/cloud/functions/CMakeLists.txt +index f7cac3a..38f7449 100644 +--- a/google/cloud/functions/CMakeLists.txt ++++ b/google/cloud/functions/CMakeLists.txt +@@ -23,6 +23,7 @@ configure_file(internal/version_info.h.in + find_package(absl REQUIRED) + find_package(Boost REQUIRED COMPONENTS program_options) + find_package(Threads REQUIRED) ++find_package(nlohmann_json REQUIRED) + + add_library( + functions_framework_cpp # cmake-format: sort +@@ -76,7 +77,8 @@ target_include_directories(functions_framework_cpp SYSTEM + PUBLIC $) + target_link_libraries( + functions_framework_cpp PUBLIC absl::time Boost::headers +- Boost::program_options Threads::Threads) ++ Boost::program_options Threads::Threads ++ nlohmann_json::nlohmann_json) + target_compile_definitions(functions_framework_cpp + PUBLIC BOOST_BEAST_USE_STD_STRING_VIEW) + set_target_properties( diff --git a/recipes/functions-framework-cpp/all/patches/1.2.0-0001-dont-skip-namelink.patch b/recipes/functions-framework-cpp/all/patches/1.2.0-0001-dont-skip-namelink.patch new file mode 100644 index 0000000000000..661786756beb5 --- /dev/null +++ b/recipes/functions-framework-cpp/all/patches/1.2.0-0001-dont-skip-namelink.patch @@ -0,0 +1,12 @@ +diff --git a/google/cloud/functions/CMakeLists.txt b/google/cloud/functions/CMakeLists.txt +index 2b9506b..609c238 100644 +--- a/google/cloud/functions/CMakeLists.txt ++++ b/google/cloud/functions/CMakeLists.txt +@@ -137,7 +137,6 @@ install( + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + COMPONENT runtime +- NAMELINK_SKIP + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + COMPONENT development + NAMELINK_COMPONENT development diff --git a/recipes/functions-framework-cpp/all/patches/1.2.0-0002-find-nlohmann_json.patch b/recipes/functions-framework-cpp/all/patches/1.2.0-0002-find-nlohmann_json.patch new file mode 100644 index 0000000000000..974fed8146e70 --- /dev/null +++ b/recipes/functions-framework-cpp/all/patches/1.2.0-0002-find-nlohmann_json.patch @@ -0,0 +1,22 @@ +diff --git a/google/cloud/functions/CMakeLists.txt b/google/cloud/functions/CMakeLists.txt +index 2b9506b..ab3aaaa 100644 +--- a/google/cloud/functions/CMakeLists.txt ++++ b/google/cloud/functions/CMakeLists.txt +@@ -23,6 +23,7 @@ configure_file(internal/version_info.h.in + find_package(absl REQUIRED) + find_package(Boost REQUIRED COMPONENTS program_options) + find_package(Threads REQUIRED) ++find_package(nlohmann_json REQUIRED) + + add_library( + functions_framework_cpp # cmake-format: sort +@@ -80,7 +81,8 @@ target_include_directories(functions_framework_cpp SYSTEM + PUBLIC $) + target_link_libraries( + functions_framework_cpp PUBLIC absl::time Boost::headers +- Boost::program_options Threads::Threads) ++ Boost::program_options Threads::Threads ++ nlohmann_json::nlohmann_json) + target_compile_definitions(functions_framework_cpp + PUBLIC BOOST_BEAST_USE_STD_STRING_VIEW) + set_target_properties( diff --git a/recipes/functions-framework-cpp/all/test_package/CMakeLists.txt b/recipes/functions-framework-cpp/all/test_package/CMakeLists.txt index d4b4a2212f334..5126c69942f53 100644 --- a/recipes/functions-framework-cpp/all/test_package/CMakeLists.txt +++ b/recipes/functions-framework-cpp/all/test_package/CMakeLists.txt @@ -1,11 +1,8 @@ cmake_minimum_required(VERSION 3.8) -project(test_package CXX) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +project(test_package LANGUAGES CXX) find_package(functions_framework_cpp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} functions-framework-cpp::framework) +target_link_libraries(${PROJECT_NAME} PRIVATE functions-framework-cpp::framework) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/functions-framework-cpp/all/test_package/conanfile.py b/recipes/functions-framework-cpp/all/test_package/conanfile.py index 38f4483872d47..ef5d7042163ec 100644 --- a/recipes/functions-framework-cpp/all/test_package/conanfile.py +++ b/recipes/functions-framework-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/functions-framework-cpp/config.yml b/recipes/functions-framework-cpp/config.yml index c7f13630776fb..45091dac1186f 100644 --- a/recipes/functions-framework-cpp/config.yml +++ b/recipes/functions-framework-cpp/config.yml @@ -1,3 +1,5 @@ versions: + "1.2.0": + folder: "all" "1.0.0": folder: "all" From d6c62a425b77b3681520bc5466373ba8c9ca0912 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 11 Sep 2023 13:48:42 +0900 Subject: [PATCH 585/637] (#18845) geos: add version 3.12.0 * geos: add version 3.12.0 * 3.12.0 requires C++14 * add patch to solve compilation error on msvc * fix patch_type * Fix Windows build by passing build type Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries --- recipes/geos/all/conandata.yml | 9 +++++ recipes/geos/all/conanfile.py | 33 +++++++++++++++++-- .../all/patches/3.12.0-0001-fix-cmake.patch | 31 +++++++++++++++++ recipes/geos/config.yml | 2 ++ 4 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 recipes/geos/all/patches/3.12.0-0001-fix-cmake.patch diff --git a/recipes/geos/all/conandata.yml b/recipes/geos/all/conandata.yml index dce86864c12ad..cce81a5d0af84 100644 --- a/recipes/geos/all/conandata.yml +++ b/recipes/geos/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.12.0": + url: "https://github.com/libgeos/geos/releases/download/3.12.0/geos-3.12.0.tar.bz2" + sha256: "d96db96011259178a35555a0f6d6e75a739e52a495a6b2aa5efb3d75390fbc39" "3.11.2": url: "https://github.com/libgeos/geos/releases/download/3.11.2/geos-3.11.2.tar.bz2" sha256: "b1f077669481c5a3e62affc49e96eb06f281987a5d36fdab225217e5b825e4cc" @@ -14,3 +17,9 @@ sources: "3.10.2": url: "https://download.osgeo.org/geos/geos-3.10.2.tar.bz2" sha256: "50bbc599ac386b4c2b3962dcc411f0040a61f204aaef4eba7225ecdd0cf45715" +patches: + "3.12.0": + - patch_file: "patches/3.12.0-0001-fix-cmake.patch" + patch_description: "Fix CMake on Windows with Visual Studio" + patch_type: "official" + patch_source: "https://github.com/libgeos/geos/pull/945" diff --git a/recipes/geos/all/conanfile.py b/recipes/geos/all/conanfile.py index 7238296e0a1c1..5bfc63783c7e5 100644 --- a/recipes/geos/all/conanfile.py +++ b/recipes/geos/all/conanfile.py @@ -1,7 +1,8 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd, stdcpp_library from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, rmdir +from conan.tools.files import copy, get, rmdir, export_conandata_patches, apply_conandata_patches from conan.tools.scm import Version import os @@ -30,10 +31,29 @@ class GeosConan(ConanFile): "utils": True, } + @property + def _min_cppstd(self): + return "14" if Version(self.version) >= "3.12.0" else "11" + + @property + def _compilers_minimum_version(self): + return { + "14": { + "gcc": "6", + "clang": "5", + "apple-clang": "10", + "Visual Studio": "15", + "msvc": "191", + }, + }.get(self._min_cppstd, {}) + @property def _has_inline_option(self): return Version(self.version) < "3.11.0" + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -48,8 +68,13 @@ def layout(self): cmake_layout(self, src_folder="src") def validate(self): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -62,6 +87,7 @@ def generate(self): tc.cache_variables["BUILD_BENCHMARKS"] = False else: tc.variables["BUILD_BENCHMARKS"] = False + tc.cache_variables["CMAKE_BUILD_TYPE"] = str(self.settings.build_type) if self._has_inline_option: tc.variables["DISABLE_GEOS_INLINE"] = not self.options.inline tc.variables["BUILD_TESTING"] = False @@ -71,6 +97,7 @@ def generate(self): tc.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/geos/all/patches/3.12.0-0001-fix-cmake.patch b/recipes/geos/all/patches/3.12.0-0001-fix-cmake.patch new file mode 100644 index 0000000000000..d0abdd50a8211 --- /dev/null +++ b/recipes/geos/all/patches/3.12.0-0001-fix-cmake.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7a2906c..cdab138 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -114,8 +114,12 @@ endif() + + # Make sure we know our build type + if(NOT CMAKE_BUILD_TYPE) +- set(CMAKE_BUILD_TYPE ${DEFAULT_BUILD_TYPE}) +- message(STATUS "GEOS: Using default build type: ${CMAKE_BUILD_TYPE}") ++ get_property(_is_multi_config_generator GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) ++ if (NOT _is_multi_config_generator) ++ set(CMAKE_BUILD_TYPE ${DEFAULT_BUILD_TYPE}) ++ message(STATUS "GEOS: Using default build type: ${CMAKE_BUILD_TYPE}") ++ endif() ++ unset(_is_multi_config_generator) + else() + message(STATUS "GEOS: Build type: ${CMAKE_BUILD_TYPE}") + endif() +@@ -186,6 +190,11 @@ set(CMAKE_CXX_FLAGS_ASAN "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address -fno-omit- + set(CMAKE_EXE_LINKER_FLAGS_ASAN "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fsanitize=address") + set(CMAKE_SHARED_LINKER_FLAGS_ASAN "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -fsanitize=address") + ++get_property(_cmake_build_type_is_cache CACHE CMAKE_BUILD_TYPE PROPERTY TYPE) ++if (_cmake_build_type_is_cache) ++ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "ASAN") ++endif() ++unset(_cmake_build_type_is_cache) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "ASAN") + + #----------------------------------------------------------------------------- diff --git a/recipes/geos/config.yml b/recipes/geos/config.yml index aad029ca82e11..bbc8ab7daf85c 100644 --- a/recipes/geos/config.yml +++ b/recipes/geos/config.yml @@ -1,4 +1,6 @@ versions: + "3.12.0": + folder: all "3.11.2": folder: all "3.11.1": From 4198a051b0f4e7004e896a614a378f5debd2c296 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 11 Sep 2023 08:27:42 +0300 Subject: [PATCH 586/637] (#18855) corrade: migrate to Conan v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * corrade: migrate to Conan v2 * disable VS2022, simplify test_package * allow vs2022 * corrade: fix conandata.yml patch attributes * corrade: auto-load all exported CMake module files * corrade: get rid of vs_ide_version() * Fix linter error --------- Co-authored-by: memsharded Co-authored-by: Rubén Rincón Blanco --- recipes/corrade/all/CMakeLists.txt | 7 - recipes/corrade/all/conandata.yml | 9 +- recipes/corrade/all/conanfile.py | 160 ++++++++++-------- .../corrade/all/test_package/CMakeLists.txt | 11 +- recipes/corrade/all/test_package/conanfile.py | 39 +++-- .../corrade/all/test_package/test_package.cpp | 6 +- 6 files changed, 120 insertions(+), 112 deletions(-) delete mode 100644 recipes/corrade/all/CMakeLists.txt diff --git a/recipes/corrade/all/CMakeLists.txt b/recipes/corrade/all/CMakeLists.txt deleted file mode 100644 index 61f3d3b039e2b..0000000000000 --- a/recipes/corrade/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/corrade/all/conandata.yml b/recipes/corrade/all/conandata.yml index 4b0cd1b7fd3fb..82a5660e74950 100644 --- a/recipes/corrade/all/conandata.yml +++ b/recipes/corrade/all/conandata.yml @@ -7,8 +7,7 @@ sources: url: https://github.com/mosra/corrade/archive/v2019.10.tar.gz patches: "2020.06": - - base_path: "source_subfolder" - patch_file: "patches/2020.06/0001-emscripten-toolchain.patch" - # patch_type: "portability" - # description: "Remove unnecessary dependency on UseEmscripten" - # source: "https://github.com/mosra/corrade/issues/104" + - patch_file: "patches/2020.06/0001-emscripten-toolchain.patch" + patch_type: "portability" + patch_description: "Remove unnecessary dependency on UseEmscripten" + patch_source: "https://github.com/mosra/corrade/issues/104" diff --git a/recipes/corrade/all/conanfile.py b/recipes/corrade/all/conanfile.py index dcff18b711642..347781614d5e3 100644 --- a/recipes/corrade/all/conanfile.py +++ b/recipes/corrade/all/conanfile.py @@ -1,21 +1,24 @@ -from conan.tools.microsoft import is_msvc -from conan.tools.microsoft.visual import vs_ide_version -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration -import functools import os -required_conan_version = ">=1.45.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.microsoft import is_msvc, check_min_vs + +required_conan_version = ">=1.52.0" class CorradeConan(ConanFile): name = "corrade" description = "Corrade is a multiplatform utility library written in C++11/C++14." - topics = ("corrade", "magnum", "filesystem", "console", "environment", "os") + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://magnum.graphics/corrade" - license = "MIT" + topics = ("magnum", "filesystem", "console", "environment", "os") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -38,22 +41,9 @@ class CorradeConan(ConanFile): "with_utility": True, } - generators = "cmake" - short_paths = True - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - def export_sources(self): - self.copy("CMakeLists.txt") - self.copy("cmake/*") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + copy(self, "cmake/*", src=self.recipe_folder, dst=self.export_sources_folder) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -61,79 +51,96 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") - def validate(self): - if is_msvc(self) and tools.Version(vs_ide_version(self)) < 14: - raise ConanInvalidConfiguration("Corrade requires Visual Studio version 14 or greater") + def layout(self): + cmake_layout(self, src_folder="src") - if not self.options.with_utility and (self.options.with_testsuite or self.options.with_interconnect or self.options.with_pluginmanager): - raise ConanInvalidConfiguration("Component 'utility' is required for 'test_suite', 'interconnect' and 'plugin_manager'") + def validate(self): + check_min_vs(self, 190) + if not self.options.with_utility and ( + self.options.with_testsuite or self.options.with_interconnect or self.options.with_pluginmanager + ): + raise ConanInvalidConfiguration( + "Component 'utility' is required for 'test_suite', 'interconnect' and 'plugin_manager'" + ) def build_requirements(self): - if hasattr(self, "settings_build") and tools.cross_building(self, skip_x64_x86=True): - self.build_requires("corrade/{}".format(self.version)) + if hasattr(self, "settings_build") and cross_building(self, skip_x64_x86=True): + self.tool_requires(f"corrade/{self.version}") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["BUILD_STATIC"] = not self.options.shared - cmake.definitions["BUILD_STATIC_PIC"] = self.options.get_safe("fPIC", False) + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_STATIC"] = not self.options.shared + tc.variables["BUILD_STATIC_PIC"] = self.options.get_safe("fPIC", False) - cmake.definitions["BUILD_DEPRECATED"] = self.options.build_deprecated - cmake.definitions["WITH_INTERCONNECT"] = self.options.with_interconnect - cmake.definitions["WITH_MAIN"] = self.options.with_main - cmake.definitions["WITH_PLUGINMANAGER"] = self.options.with_pluginmanager - cmake.definitions["WITH_TESTSUITE"] = self.options.with_testsuite - cmake.definitions["WITH_UTILITY"] = self.options.with_utility - cmake.definitions["WITH_RC"] = self.options.with_utility + tc.variables["BUILD_DEPRECATED"] = self.options.build_deprecated + tc.variables["WITH_INTERCONNECT"] = self.options.with_interconnect + tc.variables["WITH_MAIN"] = self.options.with_main + tc.variables["WITH_PLUGINMANAGER"] = self.options.with_pluginmanager + tc.variables["WITH_TESTSUITE"] = self.options.with_testsuite + tc.variables["WITH_UTILITY"] = self.options.with_utility + tc.variables["WITH_RC"] = self.options.with_utility # Corrade uses suffix on the resulting "lib"-folder when running cmake.install() # Set it explicitly to empty, else Corrade might set it implicitly (eg. to "64") - cmake.definitions["LIB_SUFFIX"] = "" + tc.variables["LIB_SUFFIX"] = "" if is_msvc(self): - cmake.definitions["MSVC2015_COMPATIBILITY"] = vs_ide_version(self) == "14" - cmake.definitions["MSVC2017_COMPATIBILITY"] = vs_ide_version(self) == "15" - cmake.definitions["MSVC2019_COMPATIBILITY"] = vs_ide_version(self) == "16" + if check_min_vs(self, 193, raise_invalid=False): + tc.variables["MSVC2019_COMPATIBILITY"] = True + elif check_min_vs(self, 192, raise_invalid=False): + tc.variables["MSVC2017_COMPATIBILITY"] = True + elif check_min_vs(self, 191, raise_invalid=False): + tc.variables["MSVC2015_COMPATIBILITY"] = True - cmake.configure(build_folder=self._build_subfolder) - - return cmake + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("COPYING", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() - share_cmake = os.path.join(self.package_folder, "share", "cmake", "Corrade") - self.copy("UseCorrade.cmake", src=share_cmake, dst=os.path.join(self.package_folder, "lib", "cmake")) - self.copy("CorradeLibSuffix.cmake", src=share_cmake, dst=os.path.join(self.package_folder, "lib", "cmake")) - self.copy("*.cmake", src=os.path.join(self.source_folder, "cmake"), dst=os.path.join("lib", "cmake")) - tools.rmdir(os.path.join(self.package_folder, "share")) + copy(self, "UseCorrade.cmake", + src=share_cmake, + dst=os.path.join(self.package_folder, "lib", "cmake")) + copy(self, "CorradeLibSuffix.cmake", + src=share_cmake, + dst=os.path.join(self.package_folder, "lib", "cmake")) + copy(self, "*.cmake", + src=os.path.join(self.export_sources_folder, "cmake"), + dst=os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): self.cpp_info.set_property("cmake_find_mode", "both") self.cpp_info.set_property("cmake_file_name", "Corrade") - self.cpp_info.names["cmake_find_package"] = "Corrade" - self.cpp_info.names["cmake_find_package_multi"] = "Corrade" + self.cpp_info.set_property("cmake_target_name", "Corrade::Corrade") suffix = "-d" if self.settings.build_type == "Debug" else "" - # The FindCorrade.cmake file provided by the library populates some extra stuff - self.cpp_info.set_property("cmake_build_modules", [os.path.join("lib", "cmake", "conan-corrade-vars.cmake")]) - self.cpp_info.components["_corrade"].build_modules.append(os.path.join("lib", "cmake", "conan-corrade-vars.cmake")) + cmake_modules = [ + # Reproduces the variables and calls performed by the FindCorrade.cmake provided by the library + os.path.join("lib", "cmake", "conan-corrade-vars.cmake"), + # Autodetects LIB_SUFFIX (either "64" or "") + os.path.join("lib", "cmake", "CorradeLibSuffix.cmake"), + # Exports build flags and macros + os.path.join("lib", "cmake", "UseCorrade.cmake"), + ] + self.cpp_info.set_property("cmake_build_modules", cmake_modules) + self.cpp_info.components["_corrade"].build_modules["cmake_find_package"] = cmake_modules + self.cpp_info.components["_corrade"].build_modules["cmake_find_package_multi"] = cmake_modules if self.options.with_main: self.cpp_info.components["main"].set_property("cmake_target_name", "Corrade::Main") @@ -153,10 +160,10 @@ def package_info(self): self.cpp_info.components["utility"].requires = ["_corrade"] # This one is statically linked into utility - #self.cpp_info.components["containers"].set_property("cmake_target_name", "Corrade::Containers") - #self.cpp_info.components["containers"].names["cmake_find_package"] = "Containers" - #self.cpp_info.components["containers"].names["cmake_find_package_multi"] = "Containers" - #self.cpp_info.components["containers"].libs = ["CorradeContainers" + suffix] + # self.cpp_info.components["containers"].set_property("cmake_target_name", "Corrade::Containers") + # self.cpp_info.components["containers"].names["cmake_find_package"] = "Containers" + # self.cpp_info.components["containers"].names["cmake_find_package_multi"] = "Containers" + # self.cpp_info.components["containers"].libs = ["CorradeContainers" + suffix] if self.options.with_interconnect: self.cpp_info.components["interconnect"].set_property("cmake_target_name", "Corrade::Interconnect") @@ -181,9 +188,12 @@ def package_info(self): if self.options.with_utility: bindir = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bindir)) + self.output.info(f"Appending PATH environment variable: {bindir}") self.env_info.PATH.append(bindir) # pkg_config: Add more explicit naming to generated files (avoid filesystem collision). - for key, cmp in self.cpp_info.components.items(): - self.cpp_info.components[key].names["pkg_config"] = "{}_{}".format(self.name, key) + for key, component in self.cpp_info.components.items(): + component.set_property("pkg_config_name", f"{self.name}_{key}") + + self.cpp_info.names["cmake_find_package"] = "Corrade" + self.cpp_info.names["cmake_find_package_multi"] = "Corrade" diff --git a/recipes/corrade/all/test_package/CMakeLists.txt b/recipes/corrade/all/test_package/CMakeLists.txt index e4c1f34b721de..94206f42ad33e 100644 --- a/recipes/corrade/all/test_package/CMakeLists.txt +++ b/recipes/corrade/all/test_package/CMakeLists.txt @@ -1,14 +1,11 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(Corrade REQUIRED) +find_package(Corrade REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} Corrade::Main) -if(VERSION_2019_10) +if(VERSION_2019_10) target_compile_definitions(${PROJECT_NAME} PRIVATE VERSION_2019_10) endif() if(WITH_UTILITY) diff --git a/recipes/corrade/all/test_package/conanfile.py b/recipes/corrade/all/test_package/conanfile.py index be914f107e121..9c0893a63e85b 100644 --- a/recipes/corrade/all/test_package/conanfile.py +++ b/recipes/corrade/all/test_package/conanfile.py @@ -1,28 +1,37 @@ -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, CMakeToolchain import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["WITH_UTILITY"] = self.dependencies["corrade"].options.with_utility + if self.dependencies["corrade"].ref.version == "2019.10": + tc.variables["VERSION_2019_10"] = True + tc.generate() def build(self): cmake = CMake(self) - cmake.definitions["WITH_UTILITY"] = self.options["corrade"].with_utility - if self.deps_cpp_info["corrade"].version == "2019.10": - cmake.definitions["VERSION_2019_10"] = True 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.options["corrade"].with_utility: - # Run corrade-rc - self.run("corrade-rc --help", run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") if self.settings.os == "Emscripten": - bin_path = os.path.join("bin", "test_package.js") - self.run("node {}".format(bin_path), run_environment=True) + bin_path = os.path.join(self.cpp.build.bindir, "test_package.js") + self.run(f"node {bin_path}", env="conanrun") diff --git a/recipes/corrade/all/test_package/test_package.cpp b/recipes/corrade/all/test_package/test_package.cpp index 8f5dc321a44de..c0e1a6d7932b2 100644 --- a/recipes/corrade/all/test_package/test_package.cpp +++ b/recipes/corrade/all/test_package/test_package.cpp @@ -1,5 +1,4 @@ -#include -#include // Here it is 'nothing' +#include // Here it is 'nothing' #ifndef VERSION_2019_10 #include @@ -9,10 +8,11 @@ #include #endif +#include int main() { std::cout << "Test package for Corrade\n"; - + #ifndef VERSION_2019_10 std::cout << "Corrade " << CORRADE_VERSION_YEAR << "." << CORRADE_VERSION_MONTH << std::endl; #endif From 6d1f113d24fbc10e844e095b07fb832266b7b17d Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 11 Sep 2023 15:50:13 +0900 Subject: [PATCH 587/637] (#19716) hictk: update dependencies --- recipes/hictk/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/hictk/all/conanfile.py b/recipes/hictk/all/conanfile.py index cf1428272f465..8f5dc0a67cf84 100644 --- a/recipes/hictk/all/conanfile.py +++ b/recipes/hictk/all/conanfile.py @@ -42,8 +42,8 @@ def requirements(self): self.requires("fast_float/5.2.0", transitive_headers=True) if self.options.with_eigen: self.requires("eigen/3.4.0", transitive_headers=True) - self.requires("fmt/10.0.0", transitive_headers=True) - self.requires("hdf5/1.14.0", transitive_headers=True) + self.requires("fmt/10.1.0", transitive_headers=True) + self.requires("hdf5/1.14.1", transitive_headers=True) self.requires("highfive/2.7.1", transitive_headers=True) self.requires("libdeflate/1.18", transitive_headers=True) self.requires("parallel-hashmap/1.3.11", transitive_headers=True) From c57bf4b3a49c65734083af94b559692f26edecc2 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 11 Sep 2023 09:23:01 +0200 Subject: [PATCH 588/637] (#19727) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 5cb7b12693718..52d413af7f3cc 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -259,6 +259,7 @@ required_for_references: - drmp3 - drogon - drwav +- dsp-filters - dtl - duckdb - duktape @@ -668,6 +669,7 @@ required_for_references: - libzip - libzippp - lief +- lightpcapng - linmath.h - linux-headers-generic - linux-syscall-support @@ -1099,16 +1101,28 @@ required_for_references: - threadpool - thrift - thrust +- tidy-html5 - timsort +- tinkerforge-bindings +- tiny-aes-c +- tiny-bignum-c - tiny-dnn +- tiny-regex-c +- tiny-utf8 +- tinycbor - tinycthread - tinycthreadpool - tinydir - tinyexif +- tinyexr - tinygltf - tinymidi +- tinyobjloader +- tinyply +- tinyspline - tinyxml - tinyxml2 +- tl - tl-expected - tl-function-ref - tllist From 3aeb2ae80ba27ab067bc267f3b4347fc1ba2d878 Mon Sep 17 00:00:00 2001 From: Maksim Petukhov <6967052+maksim-petukhov@users.noreply.github.com> Date: Mon, 11 Sep 2023 11:10:43 +0200 Subject: [PATCH 589/637] (#18149) exiv2: add version 0.28.0, add win_unicode option for 0.27.x * init * fix * get_safe * fix sig * fix the fix * exiv2-xmp is an object library in 0.28 * fix linkage * component requires * indent * min std, min compiler version, extend fix * bump inih, better cppstd and compiler version check * fix * add c++17 compiler feature to test_package * endline * check max cppstd for versions older than 0.28.0 * linter linter again conan_version * fix build * Update recipes/exiv2/all/conanfile.py Co-authored-by: Matthieu Darbois * bump libpng version * add win_unicode option --------- Co-authored-by: Matthieu Darbois --- recipes/exiv2/all/conandata.yml | 8 ++ recipes/exiv2/all/conanfile.py | 77 ++++++++++++++++--- .../exiv2/all/patches/0001-link-0.28.0.patch | 22 ++++++ .../all/patches/0004-find-expat-0.28.0.patch | 16 ++++ recipes/exiv2/all/test_package/CMakeLists.txt | 4 + recipes/exiv2/config.yml | 2 + 6 files changed, 120 insertions(+), 9 deletions(-) create mode 100644 recipes/exiv2/all/patches/0001-link-0.28.0.patch create mode 100644 recipes/exiv2/all/patches/0004-find-expat-0.28.0.patch diff --git a/recipes/exiv2/all/conandata.yml b/recipes/exiv2/all/conandata.yml index 63e5ef9836649..981b0a2937754 100644 --- a/recipes/exiv2/all/conandata.yml +++ b/recipes/exiv2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.28.0": + url: "https://github.com/Exiv2/exiv2/releases/download/v0.28.0/exiv2-0.28.0-Source.tar.gz" + sha256: "89af3b5ef7277753ef7a7b5374ae017c6b9e304db3b688f1948e73e103491f3d" "0.27.5": url: "https://github.com/Exiv2/exiv2/releases/download/v0.27.5/exiv2-0.27.5-Source.tar.gz" sha256: "35a58618ab236a901ca4928b0ad8b31007ebdc0386d904409d825024e45ea6e2" @@ -6,6 +9,11 @@ sources: url: "https://github.com/Exiv2/exiv2/releases/download/v0.27.4/exiv2-0.27.4-Source.tar.gz" sha256: "84366dba7c162af9a7603bcd6c16f40fe0e9af294ba2fd2f66ffffb9fbec904e" patches: + "0.28.0": + - patch_file: "patches/0001-link-0.28.0.patch" + - patch_file: "patches/0004-find-expat-0.28.0.patch" + patch_description: "enforce usage of FindEXPAT.cmake" + patch_type: "conan" "0.27.5": - patch_file: "patches/0001-link-0.27.5.patch" - patch_file: "patches/0003-fix-ios.patch" diff --git a/recipes/exiv2/all/conanfile.py b/recipes/exiv2/all/conanfile.py index 34ee99761cacc..b5c3445fd34da 100644 --- a/recipes/exiv2/all/conanfile.py +++ b/recipes/exiv2/all/conanfile.py @@ -1,9 +1,12 @@ -from conan import ConanFile +from conan import ConanFile, conan_version from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout, CMakeDeps from conan.tools.files import get, copy, rmdir, save, export_conandata_patches, apply_conandata_patches -from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime, check_min_vs +from conan.tools.scm import Version import os +import sys import textwrap required_conan_version = ">=1.53.0" @@ -26,6 +29,9 @@ class Exiv2Conan(ConanFile): "with_png": [True, False], "with_xmp": [False, "bundled", "external"], "with_curl": [True, False], + "with_brotli": [True, False], + "with_inih": [True, False], + "win_unicode": [True, False], } default_options = { "shared": False, @@ -33,6 +39,9 @@ class Exiv2Conan(ConanFile): "with_png": True, "with_xmp": "bundled", "with_curl": False, + "with_brotli": True, + "with_inih": True, + "win_unicode": False, } provides = [] @@ -43,6 +52,14 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) >= "0.28.0": + del self.options.win_unicode + else: + del self.options.with_brotli + del self.options.with_inih + + if self.settings.os == "Windows": + self.options.win_unicode = True def configure(self): if self.options.shared: @@ -58,14 +75,43 @@ def layout(self): def requirements(self): self.requires("libiconv/1.17") if self.options.with_png: - self.requires("libpng/1.6.39") + self.requires("libpng/1.6.40") self.requires("zlib/1.2.13") if self.options.with_xmp == "bundled": self.requires("expat/2.5.0") if self.options.with_curl: - self.requires("libcurl/7.87.0") + self.requires("libcurl/8.2.1") + if self.options.get_safe("with_brotli"): + self.requires("brotli/1.0.9") + if self.options.get_safe("with_inih"): + self.requires("inih/57") def validate(self): + if Version(self.version) >= "0.28.0": + min_cppstd = 17 + + if self.settings.compiler.cppstd: + check_min_cppstd(self, min_cppstd) + check_min_vs(self, 191) + + compilers_minimum_version = { + "gcc": "8", + "clang": "5", + "apple-clang": "10", + } + if not is_msvc(self): + minimum_version = compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.info.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{min_cppstd}, which your compiler does not fully support." + ) + elif conan_version.major == 2: + # FIXME: linter complains, but function is there + # https://docs.conan.io/2.0/reference/tools/build.html?highlight=check_min_cppstd#conan-tools-build-check-max-cppstd + check_max_cppstd = getattr(sys.modules['conan.tools.build'], 'check_max_cppstd') + # https://github.com/Exiv2/exiv2/tree/v0.27.7#217-building-with-c11-and-other-compilers + check_max_cppstd(self, 14) + if self.options.with_xmp == "external": raise ConanInvalidConfiguration("adobe-xmp-toolkit is not available on cci (yet)") @@ -84,6 +130,12 @@ def generate(self): tc.variables["EXIV2_ENABLE_WEBREADY"] = self.options.with_curl tc.variables["EXIV2_ENABLE_CURL"] = self.options.with_curl tc.variables["EXIV2_ENABLE_SSH"] = False + if Version(self.version) >= "0.28.0": + tc.variables["EXIV2_ENABLE_BMFF"] = self.options.with_brotli + tc.variables["EXIV2_ENABLE_BROTLI"] = self.options.with_brotli + tc.variables["EXIV2_ENABLE_INIH"] = self.options.with_inih + else: + tc.variables["EXIV2_ENABLE_WIN_UNICODE"] = self.options.win_unicode tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" if is_msvc(self): @@ -145,6 +197,10 @@ def package_info(self): self.cpp_info.components["exiv2lib"].requires.extend(["libpng::libpng", "zlib::zlib"]) if self.options.with_curl: self.cpp_info.components["exiv2lib"].requires.append("libcurl::libcurl") + if self.options.get_safe("with_brotli"): + self.cpp_info.components["exiv2lib"].requires.extend(["brotli::brotlidec", "brotli::brotlienc"]) + if self.options.get_safe("with_inih"): + self.cpp_info.components["exiv2lib"].requires.append("inih::inireader") if self.settings.os in ("FreeBSD", "Linux"): self.cpp_info.components["exiv2lib"].system_libs.extend(["pthread"]) @@ -154,14 +210,17 @@ def package_info(self): # component exiv2-xmp if self.options.with_xmp == "bundled": - self.cpp_info.components["exiv2-xmp"].set_property("cmake_target_name", "exiv2-xmp") - self.cpp_info.components["exiv2-xmp"].libs = ["exiv2-xmp"] - self.cpp_info.components["exiv2-xmp"].requires = [ "expat::expat" ] - self.cpp_info.components["exiv2lib"].requires.append("exiv2-xmp") + if Version(self.version) < "0.28.0": + self.cpp_info.components["exiv2-xmp"].set_property("cmake_target_name", "exiv2-xmp") + self.cpp_info.components["exiv2-xmp"].libs = ["exiv2-xmp"] + self.cpp_info.components["exiv2-xmp"].requires = [ "expat::expat" ] + self.cpp_info.components["exiv2lib"].requires.append("exiv2-xmp") + else: + self.cpp_info.components["exiv2lib"].requires.append("expat::expat") # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.components["exiv2lib"].build_modules["cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components["exiv2lib"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] - if self.options.with_xmp == "bundled": + if self.options.with_xmp == "bundled" and Version(self.version) < "0.28.0": self.cpp_info.components["exiv2-xmp"].build_modules["cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components["exiv2-xmp"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] diff --git a/recipes/exiv2/all/patches/0001-link-0.28.0.patch b/recipes/exiv2/all/patches/0001-link-0.28.0.patch new file mode 100644 index 0000000000000..0c0e5fa28d40c --- /dev/null +++ b/recipes/exiv2/all/patches/0001-link-0.28.0.patch @@ -0,0 +1,22 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 41a672e8..93370b5e 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -170,10 +170,10 @@ if (MSVC) + set_target_properties(exiv2lib PROPERTIES LINK_FLAGS "/ignore:4099") + endif() + +-set_target_properties( exiv2lib_int PROPERTIES +- POSITION_INDEPENDENT_CODE ON +- COMPILE_DEFINITIONS exiv2lib_EXPORTS +-) ++ ++ ++ ++ + + # NOTE: Cannot use target_link_libraries on OBJECT libraries with old versions of CMake + target_include_directories(exiv2lib_int PRIVATE ${ZLIB_INCLUDE_DIR}) +-- +2.33.0.windows.1 + diff --git a/recipes/exiv2/all/patches/0004-find-expat-0.28.0.patch b/recipes/exiv2/all/patches/0004-find-expat-0.28.0.patch new file mode 100644 index 0000000000000..07fb4804513c7 --- /dev/null +++ b/recipes/exiv2/all/patches/0004-find-expat-0.28.0.patch @@ -0,0 +1,16 @@ +diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake +index 1075c303..d8b580d4 100644 +--- a/cmake/findDependencies.cmake ++++ b/cmake/findDependencies.cmake +@@ -60,7 +60,7 @@ if (EXIV2_ENABLE_XMP AND EXIV2_ENABLE_EXTERNAL_XMP) + message(FATAL_ERROR "EXIV2_ENABLE_XMP AND EXIV2_ENABLE_EXTERNAL_XMP are mutually exclusive. You can only choose one of them") + else() + if (EXIV2_ENABLE_XMP) +- find_package(EXPAT REQUIRED) ++ find_package(EXPAT REQUIRED MODULE) + elseif (EXIV2_ENABLE_EXTERNAL_XMP) + find_package(XmpSdk REQUIRED) + endif () +-- +2.33.0.windows.1 + diff --git a/recipes/exiv2/all/test_package/CMakeLists.txt b/recipes/exiv2/all/test_package/CMakeLists.txt index 3bd4318c428ba..69bbd22508c9b 100644 --- a/recipes/exiv2/all/test_package/CMakeLists.txt +++ b/recipes/exiv2/all/test_package/CMakeLists.txt @@ -5,3 +5,7 @@ find_package(exiv2 REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} exiv2lib) + +if(${exiv2_VERSION} VERSION_GREATER_EQUAL "0.28.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +endif() diff --git a/recipes/exiv2/config.yml b/recipes/exiv2/config.yml index 470d3a327a30b..01a5aa663306e 100644 --- a/recipes/exiv2/config.yml +++ b/recipes/exiv2/config.yml @@ -1,4 +1,6 @@ versions: + "0.28.0": + folder: all "0.27.5": folder: all "0.27.4": From dbe2569e1c94bbbec622cae27f6f132b3420ffef Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 11 Sep 2023 19:34:12 +0900 Subject: [PATCH 590/637] (#19624) libcurl: update dependencies * libcurl: update dependencies * change zlib version range Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com> --------- Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com> --- recipes/libcurl/all/conanfile.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index 85bc4477130be..40176f8f84e3b 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -185,13 +185,13 @@ def requirements(self): elif self.options.with_ssl == "wolfssl": self.requires("wolfssl/5.6.3") if self.options.with_nghttp2: - self.requires("libnghttp2/1.55.1") + self.requires("libnghttp2/1.56.0") if self.options.with_libssh2: self.requires("libssh2/1.11.0") if self.options.with_zlib: - self.requires("zlib/1.2.13") + self.requires("zlib/[>=1.2.10 <2]") if self.options.with_brotli: - self.requires("brotli/1.0.9") + self.requires("brotli/1.1.0") if self.options.with_zstd: self.requires("zstd/1.5.5") if self.options.with_c_ares: @@ -216,7 +216,7 @@ def build_requirements(self): else: self.tool_requires("libtool/2.4.7") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/1.9.3") + self.tool_requires("pkgconf/2.0.2") if self.settings.os in [ "tvOS", "watchOS" ]: self.tool_requires("gnu-config/cci.20210814") if self._settings_build.os == "Windows": From 2ceceb8c47fb39c79f7294411860fb39f4684313 Mon Sep 17 00:00:00 2001 From: Ivo Hedtke Date: Mon, 11 Sep 2023 14:25:30 +0200 Subject: [PATCH 591/637] (#19187) [highs] Enable shared build on Windows * [highs] Enable shared build on Windows and drop v1 test package * Re-add the required_conan_version line --- recipes/highs/all/conanfile.py | 7 ++----- .../highs/all/test_v1_package/CMakeLists.txt | 9 --------- recipes/highs/all/test_v1_package/conanfile.py | 18 ------------------ 3 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 recipes/highs/all/test_v1_package/CMakeLists.txt delete mode 100644 recipes/highs/all/test_v1_package/conanfile.py diff --git a/recipes/highs/all/conanfile.py b/recipes/highs/all/conanfile.py index a45cfe7de91d8..8758bb90904fe 100644 --- a/recipes/highs/all/conanfile.py +++ b/recipes/highs/all/conanfile.py @@ -1,7 +1,6 @@ from conan import ConanFile from conan.tools.apple import fix_apple_shared_install_name from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.errors import ConanInvalidConfiguration from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get from conan.tools.microsoft import is_msvc from conan.tools.scm import Version @@ -27,10 +26,6 @@ class HiGHSConan(ConanFile): "fPIC": True, } - def validate(self): - if is_msvc(self) and self.options.shared: - raise ConanInvalidConfiguration(f"{self.ref} can not be built as shared on Visual Studio and msvc.") - def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -75,6 +70,8 @@ def package(self): if self.options.shared: copy(self, pattern="*.so*", src=join(self.build_folder, "lib"), dst=join(self.package_folder, "lib")) copy(self, pattern="*.dylib*", src=join(self.build_folder, "lib"), dst=join(self.package_folder, "lib")) + copy(self, pattern="*.lib", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) + copy(self, pattern="*.dll", src=self.build_folder, dst=join(self.package_folder, "bin"), keep_path=False) else: copy(self, pattern="*.a", src=join(self.build_folder, "lib"), dst=join(self.package_folder, "lib")) if Version(self.version) >= Version("1.5.3"): diff --git a/recipes/highs/all/test_v1_package/CMakeLists.txt b/recipes/highs/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 36b48f96d1078..0000000000000 --- a/recipes/highs/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package CXX) -set(CMAKE_CXX_STANDARD 11) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/highs/all/test_v1_package/conanfile.py b/recipes/highs/all/test_v1_package/conanfile.py deleted file mode 100644 index 5a05af3c2dfd2..0000000000000 --- a/recipes/highs/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,18 +0,0 @@ -from conans import ConanFile, CMake -from conan.tools.build import cross_building -import os - - -class TestPackageV1Conan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) From 32c59bc7a56e7b0ba7e710497746e6a3a7396bbd Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Mon, 11 Sep 2023 17:24:01 +0400 Subject: [PATCH 592/637] (#19693) ade: 0.1.2c --- recipes/ade/all/conandata.yml | 3 +++ recipes/ade/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/ade/all/conandata.yml b/recipes/ade/all/conandata.yml index 954c10dfe2c1d..668f432538437 100644 --- a/recipes/ade/all/conandata.yml +++ b/recipes/ade/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.1.2c": + url: "https://github.com/opencv/ade/archive/refs/tags/v0.1.2c.tar.gz" + sha256: "1387891c707c6e5c76448ea09e2df2e8bce1645c11f262c10b3f3ebec88749c2" "0.1.2a": url: "https://github.com/opencv/ade/archive/refs/tags/v0.1.2a.tar.gz" sha256: "c022a688b0554017e46e1cbdeb0105e625ca090fc3755c15df8c4451a304e084" diff --git a/recipes/ade/config.yml b/recipes/ade/config.yml index cbf2f373fb630..373f3e14c45ff 100644 --- a/recipes/ade/config.yml +++ b/recipes/ade/config.yml @@ -1,4 +1,6 @@ versions: + "0.1.2c": + folder: "all" "0.1.2a": folder: "all" "0.1.1f": From 46c64a6ce06c8bc97ffdff8a96ef694069103fc4 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 11 Sep 2023 23:43:34 +0900 Subject: [PATCH 593/637] (#19728) daw_json_link: add version 3.20.1, update dependencies --- recipes/daw_json_link/all/conandata.yml | 3 +++ recipes/daw_json_link/all/conanfile.py | 2 +- recipes/daw_json_link/config.yml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/daw_json_link/all/conandata.yml b/recipes/daw_json_link/all/conandata.yml index c72c7afca8769..a5b0b4f48353b 100644 --- a/recipes/daw_json_link/all/conandata.yml +++ b/recipes/daw_json_link/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.20.1": + url: "https://github.com/beached/daw_json_link/archive/refs/tags/v3.20.1.tar.gz" + sha256: "046638bc4437d138cc8bdc882027d318ca3e267f33d1b419c5bdecb45b595a47" "3.19.0": url: "https://github.com/beached/daw_json_link/archive/refs/tags/v3.19.0.tar.gz" sha256: "85c2f6a84878925eb692c53b321b9b237481969c8caa3a9324b78540096a3559" diff --git a/recipes/daw_json_link/all/conanfile.py b/recipes/daw_json_link/all/conanfile.py index 7a1455d0e9bda..a22aa6b41c06b 100644 --- a/recipes/daw_json_link/all/conanfile.py +++ b/recipes/daw_json_link/all/conanfile.py @@ -39,7 +39,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("daw_header_libraries/2.93.1") + self.requires("daw_header_libraries/2.96.1") self.requires("daw_utf_range/2.2.3") def package_id(self): diff --git a/recipes/daw_json_link/config.yml b/recipes/daw_json_link/config.yml index b1d3c03d35507..97a23d5d14600 100644 --- a/recipes/daw_json_link/config.yml +++ b/recipes/daw_json_link/config.yml @@ -1,4 +1,6 @@ versions: + "3.20.1": + folder: "all" "3.19.0": folder: "all" "3.17.2": From 28cb271f9b1b22c79c8c57d943e40e97a90a723d Mon Sep 17 00:00:00 2001 From: Sneder89 <45610045+Sneder89@users.noreply.github.com> Date: Mon, 11 Sep 2023 22:38:09 +0200 Subject: [PATCH 594/637] (#19729) add cppcheck 2.12.0 * add cppcheck 2.12.0 * remove old versions --- recipes/cppcheck/all/conandata.yml | 30 +++++-------------- .../0004-pcre-debuglib-name-2.12.patch | 11 +++++++ recipes/cppcheck/config.yml | 6 ++-- 3 files changed, 20 insertions(+), 27 deletions(-) create mode 100644 recipes/cppcheck/all/patches/0004-pcre-debuglib-name-2.12.patch diff --git a/recipes/cppcheck/all/conandata.yml b/recipes/cppcheck/all/conandata.yml index 35bee8612638b..43f1aa2fd39be 100644 --- a/recipes/cppcheck/all/conandata.yml +++ b/recipes/cppcheck/all/conandata.yml @@ -1,35 +1,29 @@ sources: + "2.12": + url: "https://github.com/danmar/cppcheck/archive/2.12.0.tar.gz" + sha256: "7d67776118aee9a4f0214f993a4baa4a168b2dbb10c14b6ec5baf2ca147565b8" "2.11.1": url: "https://github.com/danmar/cppcheck/archive/2.11.1.tar.gz" sha256: "fef6ef868d562d49136f158e1d0f7a38237e7e1c0a91d9189bdd465f1fe54316" "2.10.3": url: "https://github.com/danmar/cppcheck/archive/2.10.3.tar.gz" sha256: "8aae5e116daeaaf5d19f3efa61b91c06f161cb97412a1d1af6e1e20686e48967" - "2.10": - url: "https://github.com/danmar/cppcheck/archive/2.10.tar.gz" - sha256: "785dcbf711048dfe43ae920b6eff2eeebb4a096e88188a40e173ca4c030f57c3" "2.9.3": url: "https://github.com/danmar/cppcheck/archive/2.9.3.tar.gz" sha256: "46319ca73e33e4b2bd91981a76a0d4f184cd3f86b62dc18e8938eabacd3ad2e3" - "2.9.2": - url: "https://github.com/danmar/cppcheck/archive/2.9.2.tar.gz" - sha256: "93920d24d4442856bf7916ee0e3fc31308bc23948e7029b4fd332e01cac63c3e" "2.8.2": url: "https://github.com/danmar/cppcheck/archive/2.8.2.tar.gz" sha256: "30ba99ab54089c44b83f02e2453da046a7edff5237950d4A0eb1eba4afcb4f45" patches: - "2.11.1": - - patch_file: "patches/0003-pcre-debuglib-name.patch" + "2.12": + - patch_file: "patches/0004-pcre-debuglib-name-2.12.patch" patch_description: "Consider the Debug suffix for Windows" patch_type: "portability" - "2.10.3": - - patch_file: "patches/0001-cli-remove-dmake-cmake-2.10.patch" - patch_description: "Remove dmake tool from target ALL" - patch_type: "portability" + "2.11.1": - patch_file: "patches/0003-pcre-debuglib-name.patch" patch_description: "Consider the Debug suffix for Windows" patch_type: "portability" - "2.10": + "2.10.3": - patch_file: "patches/0001-cli-remove-dmake-cmake-2.10.patch" patch_description: "Remove dmake tool from target ALL" patch_type: "portability" @@ -46,16 +40,6 @@ patches: - patch_file: "patches/0003-pcre-debuglib-name.patch" patch_description: "Consider the Debug suffix for Windows" patch_type: "portability" - "2.9.2": - - patch_file: "patches/0001-cli-remove-dmake-cmake.patch" - patch_description: "Remove dmake tool from target ALL" - patch_type: "portability" - - patch_file: "patches/0002-htmlreport-python3.patch" - patch_description: "Use Python 3 in Shebang Header" - patch_type: "portability" - - patch_file: "patches/0003-pcre-debuglib-name.patch" - patch_description: "Consider the Debug suffix for Windows" - patch_type: "portability" "2.8.2": - patch_file: "patches/0001-cli-remove-dmake-cmake-2.8.patch" patch_description: "Remove dmake tool from target ALL" diff --git a/recipes/cppcheck/all/patches/0004-pcre-debuglib-name-2.12.patch b/recipes/cppcheck/all/patches/0004-pcre-debuglib-name-2.12.patch new file mode 100644 index 0000000000000..7f30a7cb1d7d4 --- /dev/null +++ b/recipes/cppcheck/all/patches/0004-pcre-debuglib-name-2.12.patch @@ -0,0 +1,11 @@ +--- a/cmake/findDependencies.cmake 2023-09-09 15:10:31.000000000 +0200 ++++ b/cmake/findDependencies.cmake 2023-09-11 08:44:40.220863900 +0200 +@@ -31,7 +31,7 @@ + + if (HAVE_RULES) + find_path(PCRE_INCLUDE pcre.h) +- find_library(PCRE_LIBRARY pcre) ++ find_library(PCRE_LIBRARY NAMES pcre pcred) + if (NOT PCRE_LIBRARY OR NOT PCRE_INCLUDE) + message(FATAL_ERROR "pcre dependency for RULES has not been found") + endif() diff --git a/recipes/cppcheck/config.yml b/recipes/cppcheck/config.yml index 6325a54f72873..c685c09841807 100644 --- a/recipes/cppcheck/config.yml +++ b/recipes/cppcheck/config.yml @@ -1,13 +1,11 @@ versions: + "2.12": + folder: all "2.11.1": folder: all "2.10.3": folder: all - "2.10": - folder: all "2.9.3": folder: all - "2.9.2": - folder: all "2.8.2": folder: all From a41491de3ae804b29d8146eb0381aa392be4733e Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Tue, 12 Sep 2023 00:28:40 +0200 Subject: [PATCH 595/637] (#19730) glib: add version 2.78.0 Generated and committed by [Conan Center Bot](https://github.com/qchateau/conan-center-bot) Find more updatable recipes in the [GitHub Pages](https://qchateau.github.io/conan-center-bot/) Co-authored-by: Quentin Chateau via Conan Center Bot --- recipes/glib/all/conandata.yml | 3 +++ recipes/glib/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/glib/all/conandata.yml b/recipes/glib/all/conandata.yml index ec38114b48cbc..b749d7ac74580 100644 --- a/recipes/glib/all/conandata.yml +++ b/recipes/glib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.78.0": + url: "https://download.gnome.org/sources/glib/2.78/glib-2.78.0.tar.xz" + sha256: "44eaab8b720877ce303c5540b657b126f12dc94972d9880b52959f43fb537b30" "2.77.3": url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.3.tar.xz" sha256: "1753f963bb680b28a83d6e2095f63d0d4b94244675bcd2603850b2ebc1ac6a61" diff --git a/recipes/glib/config.yml b/recipes/glib/config.yml index 1a21f71ff2289..87471ca63de5f 100644 --- a/recipes/glib/config.yml +++ b/recipes/glib/config.yml @@ -1,4 +1,6 @@ versions: + "2.78.0": + folder: all "2.77.3": folder: all "2.77.2": From fc07677f477551d5ee1078e49eb611f01f4c8048 Mon Sep 17 00:00:00 2001 From: Roberto Rossini <71787608+robomics@users.noreply.github.com> Date: Tue, 12 Sep 2023 02:49:35 +0200 Subject: [PATCH 596/637] (#19731) hictk: add v0.0.2 --- recipes/hictk/all/conandata.yml | 3 +++ recipes/hictk/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/hictk/all/conandata.yml b/recipes/hictk/all/conandata.yml index b46596ee0372e..accdbdc6e5b48 100644 --- a/recipes/hictk/all/conandata.yml +++ b/recipes/hictk/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.0.2": + url: "https://github.com/paulsengroup/hictk/archive/refs/tags/v0.0.2.tar.gz" + sha256: "7716711ecb33247d8f79f6768ebbdcf55e51e9b6f962245747b33d0967431427" "0.0.1": url: "https://github.com/paulsengroup/hictk/archive/refs/tags/v0.0.1.tar.gz" sha256: "460985413c3b2e80121f7697c6c824a91955a38051de770d7eb946ddafa88460" diff --git a/recipes/hictk/config.yml b/recipes/hictk/config.yml index f6f5b5679b9d4..05473f80b3130 100644 --- a/recipes/hictk/config.yml +++ b/recipes/hictk/config.yml @@ -1,3 +1,5 @@ versions: + "0.0.2": + folder: all "0.0.1": folder: all From c993c77724307f87f7eb87aefdcafb11132e8084 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 12 Sep 2023 15:21:31 +0900 Subject: [PATCH 597/637] (#19407) sqlite_orm: update sqlite3/3.43.0 --- recipes/sqlite_orm/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/sqlite_orm/all/conanfile.py b/recipes/sqlite_orm/all/conanfile.py index 90bb95e386b2e..343f40bded77d 100644 --- a/recipes/sqlite_orm/all/conanfile.py +++ b/recipes/sqlite_orm/all/conanfile.py @@ -39,7 +39,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("sqlite3/3.41.1", transitive_headers=True, transitive_libs=True) + self.requires("sqlite3/3.43.0", transitive_headers=True, transitive_libs=True) def package_id(self): self.info.clear() From e5a0a38cdbeac3e7d7d90e1231d08d3391897cb2 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 12 Sep 2023 09:50:58 +0200 Subject: [PATCH 598/637] (#19737) pkgconf: add version 2.0.3 --- recipes/pkgconf/all/conandata.yml | 5 +++++ recipes/pkgconf/config.yml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/recipes/pkgconf/all/conandata.yml b/recipes/pkgconf/all/conandata.yml index cf574fc35a1d5..30195c0bf1274 100644 --- a/recipes/pkgconf/all/conandata.yml +++ b/recipes/pkgconf/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.3": + url: "https://distfiles.ariadne.space/pkgconf/pkgconf-2.0.3.tar.xz" + sha256: "cabdf3c474529854f7ccce8573c5ac68ad34a7e621037535cbc3981f6b23836c" "2.0.2": url: "https://distfiles.ariadne.space/pkgconf/pkgconf-2.0.2.tar.xz" sha256: "ea5a25ef8f251eb5377ec0e21c75fb61894433cfbdbf0b2559ba33e4c2664401" @@ -15,6 +18,8 @@ sources: url: "https://distfiles.ariadne.space/pkgconf/pkgconf-1.7.3.tar.xz" sha256: "b846aea51cf696c3392a0ae58bef93e2e72f8e7073ca6ad1ed8b01c85871f9c0" patches: + "2.0.3": + - patch_file: "patches/1.9.3-0003-PKG_CONF_PATH-allow-colon+semicolon-separator.patch" "2.0.2": - patch_file: "patches/1.9.3-0003-PKG_CONF_PATH-allow-colon+semicolon-separator.patch" "1.9.5": diff --git a/recipes/pkgconf/config.yml b/recipes/pkgconf/config.yml index e17ebc77d55fa..0ccc580d4eb3c 100644 --- a/recipes/pkgconf/config.yml +++ b/recipes/pkgconf/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.3": + folder: "all" "2.0.2": folder: "all" "1.9.5": From 2b6e60603b632763987b72db0655cd1c623a41c3 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Tue, 12 Sep 2023 10:41:59 +0200 Subject: [PATCH 599/637] (#19505) arrow: do not add build requires to cmake before arrow 13.0.0 --- recipes/arrow/all/conanfile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/arrow/all/conanfile.py b/recipes/arrow/all/conanfile.py index a7f22fcf6ecee..2edf070a224e0 100644 --- a/recipes/arrow/all/conanfile.py +++ b/recipes/arrow/all/conanfile.py @@ -378,6 +378,10 @@ def validate(self): if Version(self.version) < "6.0.0" and self.options.get_safe("simd_level") == "default": raise ConanInvalidConfiguration(f"In {self.ref}, simd_level options is not supported `default` value.") + def build_requirements(self): + if Version(self.version) >= "13.0.0": + self.tool_requires("cmake/[>=3.16 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], filename=f"apache-arrow-{self.version}.tar.gz", strip_root=True) @@ -527,9 +531,6 @@ def build(self): cmake.configure(build_script_folder=os.path.join(self.source_folder, "cpp")) cmake.build() - def build_requirements(self): - self.tool_requires("cmake/[>=3.16 <4]") - def package(self): copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy(self, pattern="NOTICE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) From 0111017d8b9c32d8192f8c3da036c162f1091be1 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 12 Sep 2023 17:58:41 +0900 Subject: [PATCH 600/637] (#19740) sqlite3: add version 3.43.1 --- recipes/sqlite3/all/conandata.yml | 3 +++ recipes/sqlite3/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/sqlite3/all/conandata.yml b/recipes/sqlite3/all/conandata.yml index 7d17c799d5f24..464fb1e4a0924 100644 --- a/recipes/sqlite3/all/conandata.yml +++ b/recipes/sqlite3/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.43.1": + url: "https://sqlite.org/2023/sqlite-amalgamation-3430100.zip" + sha256: "7e634bbd4b2870a83dc7c1e3cc02e4d30b8555cd7db7b332f24e0c447fd0dd16" "3.43.0": url: "https://sqlite.org/2023/sqlite-amalgamation-3430000.zip" sha256: "bb5849ae4d7129c09d20596379a0b3f7b1ac59cf9998eba5ef283ea9b6c000a5" diff --git a/recipes/sqlite3/config.yml b/recipes/sqlite3/config.yml index f5a78a2be1eed..fcd4427a99ec3 100644 --- a/recipes/sqlite3/config.yml +++ b/recipes/sqlite3/config.yml @@ -1,4 +1,6 @@ versions: + "3.43.1": + folder: all "3.43.0": folder: all "3.42.0": From 997c76a25a3cf020f1197f948f99ac04024a98b7 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Tue, 12 Sep 2023 11:28:40 +0200 Subject: [PATCH 601/637] (#19733) [bot] Update authorized users list (2023-09-11) --- .c3i/authorized_users.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 56fdf9df94977..345b797f06831 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1226,3 +1226,5 @@ authorized_users: - p-groarke - Kalixio - temap +- vient +- bryce-cahill From 29f50b38626d426f70dc394610f229ddf66e890d Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Tue, 12 Sep 2023 12:07:08 +0200 Subject: [PATCH 602/637] (#19754) [bot] Update list of references (prod-v2/ListPackages) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rubén Rincón Blanco --- .c3i/conan_v2_ready_references.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 52d413af7f3cc..81f7ccff089c4 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -176,6 +176,7 @@ required_for_references: - concurrentqueue - console_bridge - continuable +- corrade - cotila - cpp-httplib - cpp-ipc @@ -295,6 +296,7 @@ required_for_references: - etc2comp - eternal - etl +- evmc - exiv2 - expat - expected-lite @@ -346,6 +348,7 @@ required_for_references: - ftxui - function2 - functionalplus +- functions-framework-cpp - fusepp - fxdiv - g3log @@ -589,6 +592,7 @@ required_for_references: - libmysqlclient - libnabo - libnet +- libnetfilter_queue - libnfnetlink - libnfs - libnghttp2 @@ -1125,10 +1129,15 @@ required_for_references: - tl - tl-expected - tl-function-ref +- tl-optional - tllist - tlx +- tmx +- tmxlite +- tng - toml11 - tracy +- transwarp - trantor - tree-sitter - tree-sitter-c From f0efbaf03ad111a63a6a381bc0caa0a405e11a6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Tue, 12 Sep 2023 12:23:45 +0200 Subject: [PATCH 603/637] (#19685) Bump libspng's zlib requirement to [>=1.2.11 <2] range --- recipes/libspng/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libspng/all/conanfile.py b/recipes/libspng/all/conanfile.py index b9d182dd24f28..f151ee813b219 100644 --- a/recipes/libspng/all/conanfile.py +++ b/recipes/libspng/all/conanfile.py @@ -47,7 +47,7 @@ def requirements(self): if self.options.with_miniz: self.requires("miniz/3.0.2") else: - self.requires("zlib/1.2.13") + self.requires("zlib/[>=1.2.11 <2]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 30cc2e1abcbc36a1f010a048543385727d2eef3f Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 12 Sep 2023 14:12:12 +0300 Subject: [PATCH 604/637] (#18596) functionalplus: add package_type --- recipes/functionalplus/all/conanfile.py | 40 ++++++++++++++----------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/recipes/functionalplus/all/conanfile.py b/recipes/functionalplus/all/conanfile.py index e87d42e53ba37..53628cdcaf152 100644 --- a/recipes/functionalplus/all/conanfile.py +++ b/recipes/functionalplus/all/conanfile.py @@ -3,6 +3,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.files import copy, get from conan.tools.layout import basic_layout +from conan.tools.scm import Version import os required_conan_version = ">=1.50.0" @@ -12,12 +13,18 @@ class FunctionalPlusConan(ConanFile): name = "functionalplus" description = "Functional Programming Library for C++." license = "BSL-1.0" - topics = ("functionalplus", "fplus", "functional programming") + topics = ("fplus", "functional programming", "header-only") homepage = "https://github.com/Dobiasd/FunctionalPlus" url = "https://github.com/conan-io/conan-center-index" + + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True + @property + def _min_cppstd(self): + return 14 + @property def _compilers_minimum_version(self): return { @@ -28,36 +35,35 @@ def _compilers_minimum_version(self): "apple-clang": "9", } + 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, 14) - - 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) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and loose_lt_semver(str(self.settings.compiler.version), minimum_version): - raise ConanInvalidConfiguration("functionalplus requires C++14, which your compiler does not support.") - - def layout(self): - basic_layout(self, src_folder="src") + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass def package(self): - copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - copy(self, "*", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + copy(self, "LICENSE", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses")) + copy(self, "*", + src=os.path.join(self.source_folder, "include"), + dst=os.path.join(self.package_folder, "include")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "FunctionalPlus") From 0fda4efdbb40f7598964a46cb9d3713c4ed46aa7 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Tue, 12 Sep 2023 13:59:30 +0200 Subject: [PATCH 605/637] (#19667) pcre: use version range for zlib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * use version range for zlib * typo * Update recipes/pcre/all/conanfile.py --------- Co-authored-by: Rubén Rincón Blanco --- recipes/pcre/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/pcre/all/conanfile.py b/recipes/pcre/all/conanfile.py index 8d0c74976c81b..ca51bc38829c6 100644 --- a/recipes/pcre/all/conanfile.py +++ b/recipes/pcre/all/conanfile.py @@ -75,7 +75,7 @@ def requirements(self): if self.options.get_safe("with_bzip2"): self.requires("bzip2/1.0.8") if self.options.get_safe("with_zlib"): - self.requires("zlib/1.2.13") + self.requires("zlib/[>=1.2.11 <2]") def validate(self): if not self.options.build_pcre_8 and not self.options.build_pcre_16 and not self.options.build_pcre_32: From d7a1fe9b9d9b4f597e32378a8e05adee034ea6bc Mon Sep 17 00:00:00 2001 From: Dmitry Baryshev Date: Tue, 12 Sep 2023 16:11:25 +0300 Subject: [PATCH 606/637] (#19732) sail: Remove Windows SDK hack and try to rebuild V2 [closes #19591] * libavif: bump deps * sail: remove Windows SDK workaround hack --- recipes/sail/all/conanfile.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/recipes/sail/all/conanfile.py b/recipes/sail/all/conanfile.py index fb389e804f131..31e7177ae090e 100644 --- a/recipes/sail/all/conanfile.py +++ b/recipes/sail/all/conanfile.py @@ -104,11 +104,6 @@ def generate(self): # TODO: Remove after fixing https://github.com/conan-io/conan/issues/12012 if is_msvc(self): tc.cache_variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = str(self.settings.build_type) - # TODO: Remove after fixing https://github.com/conan-io/conan-center-index/issues/13159 - # C3I workaround to force CMake to choose the highest version of - # the windows SDK available in the system - if is_msvc(self) and not self.conf.get("tools.cmake.cmaketoolchain:system_version"): - tc.variables["CMAKE_SYSTEM_VERSION"] = "10.0" tc.generate() deps = CMakeDeps(self) From d9066ea9ed9869e56ee98b280981d628fa5c29b6 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 12 Sep 2023 23:07:46 +0900 Subject: [PATCH 607/637] (#19755) gperftools: add version 2.13.0 --- recipes/gperftools/all/conandata.yml | 3 +++ recipes/gperftools/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/gperftools/all/conandata.yml b/recipes/gperftools/all/conandata.yml index 9b61f5954a26d..b141978957b85 100644 --- a/recipes/gperftools/all/conandata.yml +++ b/recipes/gperftools/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.13.0": + url: "https://github.com/gperftools/gperftools/releases/download/gperftools-2.13/gperftools-2.13.tar.gz" + sha256: "4882c5ece69f8691e51ffd6486df7d79dbf43b0c909d84d3c0883e30d27323e7" "2.12.0": url: "https://github.com/gperftools/gperftools/releases/download/gperftools-2.12/gperftools-2.12.tar.gz" sha256: "fb611b56871a3d9c92ab0cc41f9c807e8dfa81a54a4a9de7f30e838756b5c7c6" diff --git a/recipes/gperftools/config.yml b/recipes/gperftools/config.yml index 901ed44b80295..65392d0c25ec5 100644 --- a/recipes/gperftools/config.yml +++ b/recipes/gperftools/config.yml @@ -1,4 +1,6 @@ versions: + "2.13.0": + folder: all "2.12.0": folder: all "2.11.0": From 9dd70b13c0d218c1c94a74e9e61ec3dbade80c43 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Thu, 14 Sep 2023 22:21:49 +0200 Subject: [PATCH 608/637] (#19779) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 81f7ccff089c4..8b4cb97448cab 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -1143,12 +1143,21 @@ required_for_references: - tree-sitter-c - troldal-zippy - trompeloeil +- tscns +- tsil +- tsl-array-hash +- tsl-hat-trie - tsl-hopscotch-map +- tsl-ordered-map +- tsl-robin-map +- tsl-sparse-map +- tuplet - turtle - type_safe - tz - ua-nodeset - uchardet +- uncrustify - uni-algo - unicorn - unity From 2cb5af2a1389c9712844ab88a0c9d2596715f511 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Thu, 14 Sep 2023 23:22:40 +0200 Subject: [PATCH 609/637] (#19807) [bot] Update authorized users list (2023-09-14) --- .c3i/authorized_users.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 345b797f06831..212a9101efacf 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1228,3 +1228,6 @@ authorized_users: - temap - vient - bryce-cahill +- alfred-sa +- leducp +- mrjoel From 927ea98d0f8228bbc787d73dfcf15c875dccf8a1 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 15 Sep 2023 01:07:44 +0300 Subject: [PATCH 610/637] (#18263) platform.equality: migrate to Conan v2 * platform.equality: migrate to Conan v2 * platform.equality: restore test_v1_package * platform.equality: add cmake_find_package_multi generator to test_v1_package * platform.equality: fix missing includes * platform.equality: require libstdc++ * platform.equality: restore VirtualRunEnv in test_package --- recipes/platform.equality/all/conanfile.py | 75 +++++++++++-------- .../all/test_package/CMakeLists.txt | 9 +-- .../all/test_package/conanfile.py | 21 ++++-- .../all/test_package/test_package.cpp | 7 ++ .../all/test_v1_package/CMakeLists.txt | 8 ++ .../all/test_v1_package/conanfile.py | 17 +++++ 6 files changed, 94 insertions(+), 43 deletions(-) create mode 100644 recipes/platform.equality/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/platform.equality/all/test_v1_package/conanfile.py diff --git a/recipes/platform.equality/all/conanfile.py b/recipes/platform.equality/all/conanfile.py index ce4633881f0af..8aa89e267366d 100644 --- a/recipes/platform.equality/all/conanfile.py +++ b/recipes/platform.equality/all/conanfile.py @@ -1,28 +1,37 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" class PlatformInterfacesConan(ConanFile): name = "platform.equality" + description = ( + "platform.delegates is one of the libraries of the LinksPlatform modular framework, " + "which uses innovations from the C++20 standard, for slow parody any typing dictionary and others." + ) license = "LGPL-3.0-or-later" - homepage = "https://github.com/linksplatform/Equality" url = "https://github.com/conan-io/conan-center-index" - description = "platform.delegates is one of the libraries of the LinksPlatform modular framework, " \ - "which uses innovations from the C++20 standard, for slow parody any typing dictionary and others." + homepage = "https://github.com/linksplatform/Equality" topics = ("linksplatform", "cpp20", "equality", "ranges", "any", "header-only") - settings = "compiler" + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True @property - def _source_subfolder(self): - return "source_subfolder" + def _minimum_cpp_standard(self): + return 20 @property def _internal_cpp_subfolder(self): - return os.path.join(self._source_subfolder, "cpp", "Platform.Equality") + return os.path.join(self.source_folder, "cpp", "Platform.Equality") @property def _compilers_minimum_version(self): @@ -30,37 +39,39 @@ def _compilers_minimum_version(self): "gcc": "10", "Visual Studio": "16", "clang": "11", - "apple-clang": "11" + "apple-clang": "11", } - @property - def _minimum_cpp_standard(self): - return 20 + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() def validate(self): - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler)) + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._minimum_cpp_standard) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler)) if not minimum_version: - self.output.warn("{} recipe lacks information about the {} compiler support.".format( - self.name, self.settings.compiler)) - - elif tools.Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration("platform.equality/{} " - "requires C++{} with {}, " - "which is not supported " - "by {} {}.".format( - self.version, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler, - self.settings.compiler.version)) + self.output.warning(f"{self.name} recipe lacks information about the {self.settings.compiler} compiler support.") + elif Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._minimum_cpp_standard} with {self.settings.compiler}, " + f"which is not supported by {self.settings.compiler} {self.settings.compiler.version}." + ) - if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, self._minimum_cpp_standard) + if self.settings.compiler in ["clang", "apple-clang"] and not str(self.settings.compiler.libcxx).startswith("libstdc++"): + # ranges library from libc++ is not compatible with platform.equality + raise ConanInvalidConfiguration(f"{self.ref} requires libstdc++ with {self.settings.compiler}.") def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy("*.h", dst="include", src=self._internal_cpp_subfolder) - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + copy(self, "*.h", dst=os.path.join(self.package_folder, "include"), src=self._internal_cpp_subfolder) + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - def package_id(self): - self.info.header_only() + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/platform.equality/all/test_package/CMakeLists.txt b/recipes/platform.equality/all/test_package/CMakeLists.txt index c6c4cb78292be..5821e9140a6f1 100644 --- a/recipes/platform.equality/all/test_package/CMakeLists.txt +++ b/recipes/platform.equality/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(platform.equality REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE platform.equality::platform.equality) set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 20) diff --git a/recipes/platform.equality/all/test_package/conanfile.py b/recipes/platform.equality/all/test_package/conanfile.py index d4128b0450777..ef5d7042163ec 100644 --- a/recipes/platform.equality/all/test_package/conanfile.py +++ b/recipes/platform.equality/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", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -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/platform.equality/all/test_package/test_package.cpp b/recipes/platform.equality/all/test_package/test_package.cpp index fa88538c2fc86..ae61402c8fcd8 100644 --- a/recipes/platform.equality/all/test_package/test_package.cpp +++ b/recipes/platform.equality/all/test_package/test_package.cpp @@ -1,3 +1,10 @@ +// Workaround for missing includes in platform.equality +#include +#include +#include +#include +#include + #include #include diff --git a/recipes/platform.equality/all/test_v1_package/CMakeLists.txt b/recipes/platform.equality/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/platform.equality/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/platform.equality/all/test_v1_package/conanfile.py b/recipes/platform.equality/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/platform.equality/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + 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) From 1f8e6201da7cb5a2dbb2cdb2b3775021067323fb Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 15 Sep 2023 01:24:18 +0300 Subject: [PATCH 611/637] (#18270) redboltz-mqtt_cpp: migrate to Conan v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * redboltz-mqtt_cpp: migrate to Conan v2 * redboltz-mqtt_cpp: restore test_v1_package * redboltz-mqtt_cpp: restore VirtualRunEnv in test_package * redboltz-mqtt_cpp: bump deps * Update recipes/redboltz-mqtt_cpp/all/conanfile.py * Update recipes/redboltz-mqtt_cpp/all/conanfile.py --------- Co-authored-by: Francisco Ramírez --- recipes/redboltz-mqtt_cpp/all/conanfile.py | 62 ++++++++++++------- .../all/test_package/CMakeLists.txt | 6 +- .../all/test_package/conanfile.py | 19 ++++-- .../all/test_package/test_package.cpp | 2 +- .../all/test_v1_package/CMakeLists.txt | 8 +++ .../all/test_v1_package/conanfile.py | 17 +++++ 6 files changed, 80 insertions(+), 34 deletions(-) create mode 100644 recipes/redboltz-mqtt_cpp/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/redboltz-mqtt_cpp/all/test_v1_package/conanfile.py diff --git a/recipes/redboltz-mqtt_cpp/all/conanfile.py b/recipes/redboltz-mqtt_cpp/all/conanfile.py index 8fdf7f70084cf..5ca0f086f35bf 100644 --- a/recipes/redboltz-mqtt_cpp/all/conanfile.py +++ b/recipes/redboltz-mqtt_cpp/all/conanfile.py @@ -1,8 +1,14 @@ -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.43.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + class MqttCPPConan(ConanFile): name = "redboltz-mqtt_cpp" @@ -10,20 +16,15 @@ class MqttCPPConan(ConanFile): license = "BSL-1.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/redboltz/mqtt_cpp" - topics = ("mqtt", "boost", "asio") + topics = ("mqtt", "boost", "asio", "header-only") + + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" - generators = "cmake" no_copy_source = True @property - def _source_subfolder(self): - return "source_subfolder" - - def requirements(self): - self.requires("boost/1.79.0") - - def package_id(self): - self.info.header_only() + def _min_cppstd(self): + return 14 @property def _compilers_minimum_version(self): @@ -33,27 +34,42 @@ def _compilers_minimum_version(self): "clang": "5", "apple-clang": "10", } - + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("boost/1.83.0") + + def package_id(self): + self.info.clear() + def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 14) + check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version: - if tools.Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration("{} requires C++14, which your compiler does not support.".format(self.name)) + if Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.name} requires C++14, which your compiler does not support.") else: - self.output.warn("{} requires C++14. Your compiler is unknown. Assuming it supports C++14.".format(self.name)) - + self.output.warning(f"{self.name} requires C++14. Your compiler is unknown. Assuming it supports C++14.") + def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy(pattern="LICENSE_1_0.txt", dst="licenses", src=self._source_subfolder) - self.copy(pattern="*.hpp", dst="include", src=os.path.join(self._source_subfolder, "include")) + copy(self, "LICENSE_1_0.txt", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + copy(self, "*.hpp", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include")) def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.set_property("cmake_file_name", "mqtt_cpp") self.cpp_info.set_property("cmake_target_name", "mqtt_cpp::mqtt_cpp") diff --git a/recipes/redboltz-mqtt_cpp/all/test_package/CMakeLists.txt b/recipes/redboltz-mqtt_cpp/all/test_package/CMakeLists.txt index d57b3a725b42c..bb306edeaaa9c 100644 --- a/recipes/redboltz-mqtt_cpp/all/test_package/CMakeLists.txt +++ b/recipes/redboltz-mqtt_cpp/all/test_package/CMakeLists.txt @@ -1,10 +1,6 @@ -cmake_minimum_required(VERSION 3.8) - +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(mqtt_cpp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/redboltz-mqtt_cpp/all/test_package/conanfile.py b/recipes/redboltz-mqtt_cpp/all/test_package/conanfile.py index 38f4483872d47..ef5d7042163ec 100644 --- a/recipes/redboltz-mqtt_cpp/all/test_package/conanfile.py +++ b/recipes/redboltz-mqtt_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/redboltz-mqtt_cpp/all/test_package/test_package.cpp b/recipes/redboltz-mqtt_cpp/all/test_package/test_package.cpp index 65e10348b409b..a75d73b3ececd 100644 --- a/recipes/redboltz-mqtt_cpp/all/test_package/test_package.cpp +++ b/recipes/redboltz-mqtt_cpp/all/test_package/test_package.cpp @@ -6,7 +6,7 @@ int main() { boost::asio::io_context ioc; auto c = MQTT_NS::make_async_client(ioc, "localhost", "40000"); - + c->set_client_id("test_package"); c->set_clean_session(true); diff --git a/recipes/redboltz-mqtt_cpp/all/test_v1_package/CMakeLists.txt b/recipes/redboltz-mqtt_cpp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/redboltz-mqtt_cpp/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/redboltz-mqtt_cpp/all/test_v1_package/conanfile.py b/recipes/redboltz-mqtt_cpp/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..38f4483872d47 --- /dev/null +++ b/recipes/redboltz-mqtt_cpp/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From b4c659f991c1460d7fc2f28ac2650df73e172dbb Mon Sep 17 00:00:00 2001 From: Dovydas Girdvainis Date: Fri, 15 Sep 2023 00:49:44 +0200 Subject: [PATCH 612/637] (#18914) Package/open62541 v1.3.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add v1.3.6 sources * update deps/ua-nodeset submodule * fix submodule source setup * fix check for msvc compiler * use conan v2 copy mechanism * do not add plugin, posix, win32 include dirs for single_header configurations * cleanup max_clang_version version formatting * fix nodeset path for test_package * retrigger CI/CD pipeline Signed-off-by: Dovydas Girdvainis * Simplify test_package, add package_type, fix licenses, openssl version range & conan fixes * Fix policy * Revert test_package.c --------- Signed-off-by: Dovydas Girdvainis Co-authored-by: Rubén Rincón Co-authored-by: Rubén Rincón Blanco --- recipes/open62541/all/conandata.yml | 3 + recipes/open62541/all/conanfile.py | 74 +++++++++---------- recipes/open62541/all/submoduledata.yml | 5 ++ .../open62541/all/test_package/conanfile.py | 6 +- recipes/open62541/config.yml | 2 + 5 files changed, 47 insertions(+), 43 deletions(-) diff --git a/recipes/open62541/all/conandata.yml b/recipes/open62541/all/conandata.yml index d458e6add2e68..e50e7d9a28e65 100644 --- a/recipes/open62541/all/conandata.yml +++ b/recipes/open62541/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.6": + url: "https://github.com/open62541/open62541/archive/v1.3.6.tar.gz" + sha256: "0751ce6273908b1e571f36591665f3d5b9451514c2478ea5f6b4b466d7da6b02" "1.3.4": url: "https://github.com/open62541/open62541/archive/v1.3.4.tar.gz" sha256: "3489cfa2f98c52df252adc8e641a9e59cb675bdfd5ef413b0d947e667cddd16d" diff --git a/recipes/open62541/all/conanfile.py b/recipes/open62541/all/conanfile.py index 25dd98cf850ff..a620f7d0b2c63 100644 --- a/recipes/open62541/all/conanfile.py +++ b/recipes/open62541/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain, CMakeDeps from conan.tools.scm import Version -from conan.tools.files import apply_conandata_patches, collect_libs, export_conandata_patches, rename, rm, rmdir, get +from conan.tools.files import apply_conandata_patches, collect_libs, export_conandata_patches, copy, rm, rmdir, get from conan.errors import ConanInvalidConfiguration import glob import os @@ -12,7 +12,7 @@ class Open62541Conan(ConanFile): name = "open62541" - license = "MPLv2" + license = ("MPL-2.0", "CC0-1.0") homepage = "https://open62541.org/" url = "https://github.com/conan-io/conan-center-index" description = "open62541 is an open source and free implementation of OPC UA " \ @@ -24,10 +24,11 @@ class Open62541Conan(ConanFile): "All platform-specific functionality is implemented via exchangeable " \ "plugins. Plugin implementations are provided for the major operating systems." topics = ( - "opc ua", "open62541", "sdk", "server/client", "c", "iec-62541", + "opc ua", "sdk", "server/client", "c", "iec-62541", "industrial automation", "tsn", "time sensitive networks", "publish-subscirbe", "pubsub" ) + package_type = "library" settings = "os", "compiler", "build_type", "arch" options = { "fPIC": [True, False], @@ -181,7 +182,7 @@ def requirements(self): if self.options.encryption == "mbedtls": self.requires("mbedtls/2.25.0") elif self.options.encryption == "openssl": - self.requires("openssl/1.1.1s") + self.requires("openssl/[>=1.1 <4]") if self.options.web_socket: self.requires("libwebsockets/4.3.2") if self.options.discovery == "With Multicast" or "multicast" in str(self.options.discovery): @@ -214,9 +215,7 @@ def validate(self): raise ConanInvalidConfiguration( "Lower Open62541 versions than 1.1.0 are not cpp compatible due to -fpermisive flags") - # FIXME: correct clang versions condition - max_clang_version = "8" if Version( - self.version) < "1.1.0" else "9" + max_clang_version = "8" if Version(self.version) < "1.1.0" else "9" if self.settings.compiler == "clang" and Version(self.settings.compiler.version) > max_clang_version: raise ConanInvalidConfiguration( "Open62541 supports Clang up to {} compiler version".format(max_clang_version)) @@ -244,19 +243,13 @@ def source(self): with open(submodule_filename, 'r') as submodule_stream: submodules_data = yaml.safe_load(submodule_stream) for path, submodule in submodules_data["submodules"][self.version].items(): - filename = os.path.basename(submodule["url"]) - archive_name = submodule["archive_pattern"].format( - version=os.path.splitext(filename.replace('v', ''))[0]) - - submodule_data = { - "url": submodule["url"], - "sha256": submodule["sha256"] - } - - get(self, **submodule_data) - submodule_source = os.path.join(self.source_folder, path) - rmdir(self, submodule_source) - rename(self, archive_name, submodule_source) + archive_name = os.path.splitext( + os.path.basename(submodule["url"]))[0] + get(self, url=submodule["url"], + sha256=submodule["sha256"], + destination=path, + filename=archive_name, + strip_root=True) def _get_log_level(self): return { @@ -356,11 +349,11 @@ def generate(self): tc.variables["UA_ENABLE_STATUSCODE_DESCRIPTIONS"] = self.options.readable_statuscodes tc.variables["UA_ENABLE_HARDENING"] = self.options.hardening - if self.settings.compiler == "Visual Studio" and self.options.shared == True: + if self.settings.compiler == "msvc" and self.options.shared == True: tc.variables["UA_MSVC_FORCE_STATIC_CRT"] = True tc.variables["UA_COMPILE_AS_CXX"] = self.options.cpp_compatible - + # Honor BUILD_SHARED_LIBS from conan_toolchain (see https://github.com/conan-io/conan/issues/11840) tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" @@ -371,8 +364,7 @@ def generate(self): def _patch_sources(self): apply_conandata_patches(self) if Version(self.version) >= "1.3.1": - os.unlink(os.path.join(self.source_folder, - "tools", "cmake", "FindPython3.cmake")) + os.unlink(os.path.join(self.source_folder, "tools", "cmake", "FindPython3.cmake")) def build(self): self._patch_sources() @@ -393,8 +385,9 @@ def _module_file_rel_path(self): return os.path.join(self._module_subfolder, "open62541Macros.cmake") def package(self): - self.copy("LICENSE", dst="licenses", src=self.source_folder) - self.copy("LICENSE-CC0", dst="licenses", src=self.source_folder) + licenses_dir = os.path.join(self.package_folder, "licenses") + copy(self, "LICENSE", src=self.source_folder, dst=licenses_dir) + copy(self, "LICENSE-CC0", src=self.source_folder, dst=licenses_dir) cmake = CMake(self) cmake.install() @@ -408,10 +401,9 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "share")) - self.copy("generate_*.py", src=self._tools_subfolder, - dst=os.path.join("res", "tools")) - self.copy("nodeset_compiler/*", src=self._tools_subfolder, - dst=os.path.join("res", "tools")) + tools_dir = os.path.join(self.package_folder, "res", "tools") + copy(self, "generate_*.py", src=self._tools_subfolder, dst=tools_dir) + copy(self, "nodeset_compiler/*", src=self._tools_subfolder, dst=tools_dir) @staticmethod def _chmod_plus_x(filename): @@ -423,10 +415,7 @@ def package_info(self): self.cpp_info.names["cmake_find_package_multi"] = "open62541" self.cpp_info.names["pkg_config"] = "open62541" self.cpp_info.libs = collect_libs(self) - self.cpp_info.includedirs = [ - "include", - os.path.join("include", "open62541", "plugin") - ] + self.cpp_info.includedirs = ["include"] # required for creating custom servers from ua-nodeset self.conf_info.define("user.open62541:tools_dir", os.path.join( @@ -439,14 +428,19 @@ def package_info(self): if self.options.single_header: self.cpp_info.defines.append("UA_ENABLE_AMALGAMATION") - if self.settings.os == "Windows": - self.cpp_info.system_libs.append("ws2_32") - self.cpp_info.includedirs.append( - os.path.join("include", "open62541", "win32")) else: self.cpp_info.includedirs.append( - os.path.join("include", "open62541", "posix")) - if self.settings.os in ("Linux", "FreeBSD"): + os.path.join("include", "open62541", "plugin")) + if self.settings.os == "Windows": + self.cpp_info.includedirs.append( + os.path.join("include", "open62541", "win32")) + else: + self.cpp_info.includedirs.append( + os.path.join("include", "open62541", "posix")) + + if self.settings.os == "Windows": + self.cpp_info.system_libs.append("ws2_32") + elif self.settings.os in ("Linux", "FreeBSD"): self.cpp_info.system_libs.extend(["pthread", "m", "rt"]) self.cpp_info.builddirs.append(self._module_subfolder) diff --git a/recipes/open62541/all/submoduledata.yml b/recipes/open62541/all/submoduledata.yml index 19278804be705..5a2a7e3ff90b7 100644 --- a/recipes/open62541/all/submoduledata.yml +++ b/recipes/open62541/all/submoduledata.yml @@ -49,3 +49,8 @@ submodules: sha256: a2bcc1cda0154091ecbed25b8c40436c5b75d11bb38df28b35a2ceedb331d562 url: https://github.com/OPCFoundation/UA-Nodeset/archive/Errata-1.04.5.zip archive_pattern: "UA-Nodeset-{version}" + "1.3.6": + deps/ua-nodeset: + sha256: 032c93e3f7c335bbb2d2d699804a804c9cdce2a2ecc3fe7cde552f2130982c26 + url: https://github.com/OPCFoundation/UA-Nodeset/archive/Glass=1.0.0-2022-01-01.zip + archive_pattern: "UA-Nodeset-{version}" diff --git a/recipes/open62541/all/test_package/conanfile.py b/recipes/open62541/all/test_package/conanfile.py index 52782cf8480cf..c1fe645c77cc3 100644 --- a/recipes/open62541/all/test_package/conanfile.py +++ b/recipes/open62541/all/test_package/conanfile.py @@ -7,7 +7,7 @@ # It will become the standard on Conan 2.x class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + generators = "CMakeDeps", "VirtualRunEnv" test_type = "explicit" def requirements(self): @@ -19,8 +19,8 @@ def layout(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["open62541_NODESET_DIR"] = self.deps_user_info["ua-nodeset"].nodeset_dir.replace( - "\\", "/") # ua-nodeset path needs to be sanitized for windows systems + tc.variables["open62541_NODESET_DIR"] = self.dependencies["ua-nodeset"].conf_info.get( + "user.ua-nodeset:nodeset_dir").replace("\\", "/") # sanitize path for windows systems tc.variables["open62541_TOOLS_DIR"] = self.dependencies["open62541"].conf_info.get( "user.open62541:tools_dir") tc.generate() diff --git a/recipes/open62541/config.yml b/recipes/open62541/config.yml index 76c7748700110..a82ee371e80a5 100644 --- a/recipes/open62541/config.yml +++ b/recipes/open62541/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.6": + folder: all "1.3.4": folder: all "1.3.1": From 90e3ab49607d0f3ddaa9d5e53d87e367c45dbd69 Mon Sep 17 00:00:00 2001 From: qwqbot Date: Fri, 15 Sep 2023 07:29:25 +0800 Subject: [PATCH 613/637] (#19472) spdlog: update fmt/10.1.1 --- recipes/spdlog/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/spdlog/all/conanfile.py b/recipes/spdlog/all/conanfile.py index b24d1adfcb1ba..85bd609950223 100644 --- a/recipes/spdlog/all/conanfile.py +++ b/recipes/spdlog/all/conanfile.py @@ -57,7 +57,7 @@ def requirements(self): fmt_version = "7.1.3" if self_version >= "1.12.0": - fmt_version = "10.1.0" + fmt_version = "10.1.1" elif self_version >= "1.11.0": fmt_version = "10.0.0" elif self_version >= "1.10.0": From cd2b27a2706b7925a90b7a1aa79621973543cc62 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 15 Sep 2023 02:13:29 +0200 Subject: [PATCH 614/637] (#19664) openexr 3.x: use version range for zlib + add package_type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * use version range for zlib * add package_type * sort methods by order of execution * Update recipes/openexr/3.x/conanfile.py --------- Co-authored-by: Rubén Rincón Blanco --- recipes/openexr/3.x/conanfile.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/openexr/3.x/conanfile.py b/recipes/openexr/3.x/conanfile.py index 34ca44936ccbe..8d58713defa5c 100644 --- a/recipes/openexr/3.x/conanfile.py +++ b/recipes/openexr/3.x/conanfile.py @@ -16,7 +16,7 @@ class OpenEXRConan(ConanFile): license = "BSD-3-Clause" homepage = "https://github.com/AcademySoftwareFoundation/openexr" url = "https://github.com/conan-io/conan-center-index" - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -38,8 +38,11 @@ def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + def layout(self): + cmake_layout(self, src_folder="src") + def requirements(self): - self.requires("zlib/1.2.13") + self.requires("zlib/[>=1.2.11 <2]") # Note: OpenEXR and Imath are versioned independently. self.requires("imath/3.1.9", transitive_headers=True) @@ -47,9 +50,6 @@ def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, 11) - def layout(self): - cmake_layout(self, src_folder="src") - def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 20a0a9cc364fee3f5e0a65c2fac103c62f9164ca Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 15 Sep 2023 02:56:56 +0200 Subject: [PATCH 615/637] (#19666) openexr 2.x: use version range for zlib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * use version range for zlib * Update recipes/openexr/2.x/conanfile.py --------- Co-authored-by: Rubén Rincón Blanco --- recipes/openexr/2.x/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/openexr/2.x/conanfile.py b/recipes/openexr/2.x/conanfile.py index a68e5d8d7ad88..b23f21238a92e 100644 --- a/recipes/openexr/2.x/conanfile.py +++ b/recipes/openexr/2.x/conanfile.py @@ -38,7 +38,7 @@ def configure(self): self.options.rm_safe("fPIC") def requirements(self): - self.requires("zlib/1.2.13") + self.requires("zlib/[>=1.2.11 <2]") def validate(self): if Version(self.version) < "2.5.0" and hasattr(self, "settings_build") and cross_building(self): From 97f207a298ef1e3272c379ba9801652cba1d8604 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 15 Sep 2023 03:54:28 +0200 Subject: [PATCH 616/637] (#19669) minizip: use version range for zlib + add package_type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * use version range for zlib * add package_type * Update recipes/minizip/all/conanfile.py --------- Co-authored-by: Rubén Rincón Blanco --- recipes/minizip/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/minizip/all/conanfile.py b/recipes/minizip/all/conanfile.py index e4316426a6e9c..cec7c823f0429 100644 --- a/recipes/minizip/all/conanfile.py +++ b/recipes/minizip/all/conanfile.py @@ -13,7 +13,7 @@ class MinizipConan(ConanFile): license = "Zlib" description = "An experimental package to read and write files in .zip format, written on top of zlib" topics = ("zip", "compression", "inflate") - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -46,7 +46,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("zlib/1.2.13", transitive_headers=True) + self.requires("zlib/[>=1.2.11 <2]", transitive_headers=True) if self.options.bzip2: self.requires("bzip2/1.0.8", transitive_headers=True) From 8b1252b00ce99af379e87340bc14d2e57159949f Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 15 Sep 2023 11:28:58 +0900 Subject: [PATCH 617/637] (#19760) dirent: add version 1.24 --- recipes/dirent/all/conandata.yml | 3 +++ recipes/dirent/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/dirent/all/conandata.yml b/recipes/dirent/all/conandata.yml index 41d2c31a73c7a..30637c5892d6d 100644 --- a/recipes/dirent/all/conandata.yml +++ b/recipes/dirent/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.24": + url: "https://github.com/tronkko/dirent/archive/1.24.tar.gz" + sha256: "37009127a65bb1ddc47d06c097321f87f45ca2e998b2ec3bf2e0b2b19649d6f9" "1.23.2": url: "https://github.com/tronkko/dirent/archive/1.23.2.tar.gz" sha256: "f72d39e3c39610b6901e391b140aa69b51e0eb99216939ed5e547b5dad03afb1" diff --git a/recipes/dirent/config.yml b/recipes/dirent/config.yml index 6086eb1e0524d..bb0674fda16d8 100644 --- a/recipes/dirent/config.yml +++ b/recipes/dirent/config.yml @@ -1,3 +1,5 @@ versions: + "1.24": + folder: all "1.23.2": folder: all From 220cc0262dd825b684e0f6d893b7f8aac715c4d5 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Fri, 15 Sep 2023 04:49:33 +0200 Subject: [PATCH 618/637] (#19765) openssl: add version 1.1.1w --- recipes/openssl/1.x.x/conandata.yml | 10 ++++++++++ recipes/openssl/config.yml | 2 ++ 2 files changed, 12 insertions(+) diff --git a/recipes/openssl/1.x.x/conandata.yml b/recipes/openssl/1.x.x/conandata.yml index 14abde7996026..b4e34f1c74cae 100644 --- a/recipes/openssl/1.x.x/conandata.yml +++ b/recipes/openssl/1.x.x/conandata.yml @@ -27,6 +27,12 @@ sources: - "https://www.openssl.org/source/openssl-1.1.1v.tar.gz" - "https://www.openssl.org/source/old/1.1.1/openssl-1.1.1v.tar.gz" - "https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1v/openssl-1.1.1v.tar.gz" + 1.1.1w: + sha256: cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8 + url: + - "https://www.openssl.org/source/openssl-1.1.1w.tar.gz" + - "https://www.openssl.org/source/old/1.1.1/openssl-1.1.1w.tar.gz" + - "https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz" patches: 1.0.2u: - patch_file: patches/1.0.2u-darwin-arm64.patch @@ -44,3 +50,7 @@ patches: - patch_file: patches/1.1.1-tvos-watchos.patch patch_description: "TVOS and WatchOS don't like fork()" patch_type: "portability" + 1.1.1w: + - patch_file: patches/1.1.1-tvos-watchos.patch + patch_description: "TVOS and WatchOS don't like fork()" + patch_type: "portability" diff --git a/recipes/openssl/config.yml b/recipes/openssl/config.yml index add37f9129c6c..67834781567eb 100644 --- a/recipes/openssl/config.yml +++ b/recipes/openssl/config.yml @@ -15,6 +15,8 @@ versions: folder: "3.x.x" # 1.1.1x releases + 1.1.1w: + folder: "1.x.x" 1.1.1v: folder: "1.x.x" 1.1.1u: From 5d576ffd98e5db1a6726656ab82150a7adc7efa4 Mon Sep 17 00:00:00 2001 From: Beartama <8091245+uyha@users.noreply.github.com> Date: Fri, 15 Sep 2023 05:29:52 +0200 Subject: [PATCH 619/637] (#19777) sml: add version 1.1.9 --- recipes/sml/all/conandata.yml | 3 +++ recipes/sml/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/sml/all/conandata.yml b/recipes/sml/all/conandata.yml index 3c49eae151250..39d52a814e37c 100644 --- a/recipes/sml/all/conandata.yml +++ b/recipes/sml/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.9": + url: "https://github.com/boost-ext/sml/archive/refs/tags/v1.1.9.tar.gz" + sha256: "c5ebffcf791ca0b89fd49a410b720432de748a31b7e0c9e5bd5c567d11c8c477" "1.1.8": url: "https://github.com/boost-ext/sml/archive/refs/tags/v1.1.8.tar.gz" sha256: "d2626b2fd249fa0788ca364a2f8dcb4762dd72195f86d43370e4cad4c02262c5" diff --git a/recipes/sml/config.yml b/recipes/sml/config.yml index 5ebc9beff7190..aff831fd45b0a 100644 --- a/recipes/sml/config.yml +++ b/recipes/sml/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.9": + folder: all "1.1.8": folder: all "1.1.6": From fcf123c0e0416eacd0edfbb333f4ebcd235fa608 Mon Sep 17 00:00:00 2001 From: Andrei Malashkin Date: Fri, 15 Sep 2023 05:51:06 +0200 Subject: [PATCH 620/637] (#19778) add make/4.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add make/4.4 * add missing entry in config.yml --------- Co-authored-by: Rubén Rincón Blanco --- recipes/make/all/conandata.yml | 5 +++++ recipes/make/config.yml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/recipes/make/all/conandata.yml b/recipes/make/all/conandata.yml index fb6e6264363e7..d11432dff7294 100644 --- a/recipes/make/all/conandata.yml +++ b/recipes/make/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.4": + url: "http://ftpmirror.gnu.org/gnu/make/make-4.4.tar.gz" + sha256: "581f4d4e872da74b3941c874215898a7d35802f03732bdccee1d4a7979105d18" "4.3": url: "http://ftpmirror.gnu.org/gnu/make/make-4.3.tar.gz" sha256: "e05fdde47c5f7ca45cb697e973894ff4f5d79e13b750ed57d7b66d8defc78e19" @@ -6,6 +9,8 @@ sources: url: "http://ftpmirror.gnu.org/gnu/make/make-4.2.1.tar.bz2" sha256: "d6e262bf3601b42d2b1e4ef8310029e1dcf20083c5446b4b7aa67081fdffc589" patches: + "4.4": + - patch_file: "patches/4.3-0001-clang.patch" "4.3": - patch_file: "patches/4.3-0001-clang.patch" "4.2.1": diff --git a/recipes/make/config.yml b/recipes/make/config.yml index 0260fd9e5313f..34673d1418b17 100644 --- a/recipes/make/config.yml +++ b/recipes/make/config.yml @@ -1,4 +1,6 @@ versions: + "4.4": + folder: all "4.3": folder: all "4.2.1": From f5516efa03caf412c8336f6251a576cbbb5a17c1 Mon Sep 17 00:00:00 2001 From: chausner <15180557+chausner@users.noreply.github.com> Date: Fri, 15 Sep 2023 06:10:49 +0200 Subject: [PATCH 621/637] (#19792) Add drwav 0.13.12 Co-authored-by: chausner --- recipes/drwav/all/conandata.yml | 4 ++++ recipes/drwav/config.yml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/recipes/drwav/all/conandata.yml b/recipes/drwav/all/conandata.yml index 449e35d180bee..cfc31466349bc 100644 --- a/recipes/drwav/all/conandata.yml +++ b/recipes/drwav/all/conandata.yml @@ -1,4 +1,8 @@ sources: + # NOTE: https://github.com/mackron/dr_libs/blob/d35a3bc5efd02455d98cbe12b94647136f09b42d/dr_wav.h#L3 + "0.13.12": + url: https://github.com/mackron/dr_libs/archive/d35a3bc5efd02455d98cbe12b94647136f09b42d.zip + sha256: "4886462b8ed26f12b8bceccb80f1447075ed5e73240089f2a78e0c32b444b370" # NOTE: https://github.com/mackron/dr_libs/blob/4f6da71ed357ade92dc91f00e6be7301ec9a82a3/dr_wav.h#L3 "0.13.7": url: https://github.com/mackron/dr_libs/archive/4f6da71ed357ade92dc91f00e6be7301ec9a82a3.zip diff --git a/recipes/drwav/config.yml b/recipes/drwav/config.yml index 6c8f065f79d49..b1c16872231f4 100644 --- a/recipes/drwav/config.yml +++ b/recipes/drwav/config.yml @@ -1,4 +1,6 @@ versions: + "0.13.12": + folder: all "0.13.7": folder: all "0.13.6": From ea3e909c38d644c8c1d74f4d0bcea4014c2af816 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Fri, 15 Sep 2023 06:49:36 +0200 Subject: [PATCH 622/637] (#19806) libsodium 1.0.19 --- recipes/libsodium/all/conandata.yml | 3 +++ recipes/libsodium/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/libsodium/all/conandata.yml b/recipes/libsodium/all/conandata.yml index d0974216f8865..c399471111c38 100644 --- a/recipes/libsodium/all/conandata.yml +++ b/recipes/libsodium/all/conandata.yml @@ -1,6 +1,9 @@ # To update the version on CCI, add a new cci.date entry from the stable branch: # https://github.com/jedisct1/libsodium/commits/stable sources: + "1.0.19": + url: "https://github.com/jedisct1/libsodium/releases/download/1.0.19-RELEASE/libsodium-1.0.19.tar.gz" + sha256: "018d79fe0a045cca07331d37bd0cb57b2e838c51bc48fd837a1472e50068bbea" "1.0.18": url: "https://github.com/jedisct1/libsodium/releases/download/1.0.18-RELEASE/libsodium-1.0.18.tar.gz" sha256: "6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1" diff --git a/recipes/libsodium/config.yml b/recipes/libsodium/config.yml index 819e72ce10826..4dfbbb5c3d410 100644 --- a/recipes/libsodium/config.yml +++ b/recipes/libsodium/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.19": + folder: all "1.0.18": folder: all "cci.20220430": From 115a67a748b7d67f4ef4ef7d54fcfa0d88a7da2a Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Fri, 15 Sep 2023 07:29:16 +0200 Subject: [PATCH 623/637] (#19819) libwebp: add version 1.3.2 --- recipes/libwebp/all/conandata.yml | 7 +++++++ recipes/libwebp/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/libwebp/all/conandata.yml b/recipes/libwebp/all/conandata.yml index b036ea65e6055..47f77300daa6a 100644 --- a/recipes/libwebp/all/conandata.yml +++ b/recipes/libwebp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.2": + url: "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.3.2.tar.gz" + sha256: "2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4" "1.3.1": url: "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.3.1.tar.gz" sha256: "b3779627c2dfd31e3d8c4485962c2efe17785ef975e2be5c8c0c9e6cd3c4ef66" @@ -27,6 +30,10 @@ sources: url: "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.3.tar.gz" sha256: "e20a07865c8697bba00aebccc6f54912d6bc333bb4d604e6b07491c1a226b34f" patches: + "1.3.2": + - patch_file: "patches/1.3.1-0001-fix-cmake.patch" + patch_description: "disable PIC, disable prefix library name on MSVC" + patch_type: "conan" "1.3.1": - patch_file: "patches/1.3.1-0001-fix-cmake.patch" patch_description: "disable PIC, disable prefix library name on MSVC" diff --git a/recipes/libwebp/config.yml b/recipes/libwebp/config.yml index 3bf80d4385ecd..5efe9c8c34aa9 100644 --- a/recipes/libwebp/config.yml +++ b/recipes/libwebp/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.2": + folder: all "1.3.1": folder: all "1.3.0": From 27d562866a062cc4e4c3d05973780f8d24003d22 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Fri, 15 Sep 2023 09:30:34 +0200 Subject: [PATCH 624/637] (#19821) libtiff: add version 4.6.0 --- recipes/libtiff/all/conandata.yml | 7 +++++++ recipes/libtiff/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/libtiff/all/conandata.yml b/recipes/libtiff/all/conandata.yml index cc7431489956e..96a6b01214da4 100644 --- a/recipes/libtiff/all/conandata.yml +++ b/recipes/libtiff/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.6.0": + url: "http://download.osgeo.org/libtiff/tiff-4.6.0.tar.gz" + sha256: "88b3979e6d5c7e32b50d7ec72fb15af724f6ab2cbf7e10880c360a77e4b5d99a" "4.5.1": url: "http://download.osgeo.org/libtiff/tiff-4.5.1.tar.gz" sha256: "d7f38b6788e4a8f5da7940c5ac9424f494d8a79eba53d555f4a507167dca5e2b" @@ -12,6 +15,10 @@ sources: url: "http://download.osgeo.org/libtiff/tiff-4.3.0.tar.gz" sha256: "0e46e5acb087ce7d1ac53cf4f56a09b221537fc86dfc5daaad1c2e89e1b37ac8" patches: + "4.6.0": + - patch_file: "patches/4.5.1-0001-cmake-dependencies.patch" + patch_description: "CMake: robust handling of dependencies" + patch_type: "conan" "4.5.1": - patch_file: "patches/4.5.1-0001-cmake-dependencies.patch" patch_description: "CMake: robust handling of dependencies" diff --git a/recipes/libtiff/config.yml b/recipes/libtiff/config.yml index 961a315dc8eb6..d9523166c1893 100644 --- a/recipes/libtiff/config.yml +++ b/recipes/libtiff/config.yml @@ -1,4 +1,6 @@ versions: + "4.6.0": + folder: all "4.5.1": folder: all "4.5.0": From 24e585d73100d52feeb52203b3ed47701fb5e2ab Mon Sep 17 00:00:00 2001 From: FireWolf <10460478+0xFireWolf@users.noreply.github.com> Date: Fri, 15 Sep 2023 01:09:18 -0700 Subject: [PATCH 625/637] (#19826) antlr4-cppruntime: Add version 4.13.1. --- recipes/antlr4-cppruntime/all/conandata.yml | 3 +++ recipes/antlr4-cppruntime/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/antlr4-cppruntime/all/conandata.yml b/recipes/antlr4-cppruntime/all/conandata.yml index 28bc286ec79b5..f6974e320b559 100644 --- a/recipes/antlr4-cppruntime/all/conandata.yml +++ b/recipes/antlr4-cppruntime/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.13.1": + url: "https://github.com/antlr/antlr4/archive/refs/tags/4.13.1.tar.gz" + sha256: "da20d487524d7f0a8b13f73a8dc326de7fc2e5775f5a49693c0a4e59c6b1410c" "4.13.0": url: "https://github.com/antlr/antlr4/archive/refs/tags/4.13.0.tar.gz" sha256: "b7082b539256e6de5137a7d57afe89493dce234a3ce686dbae709ef6cf2d2c81" diff --git a/recipes/antlr4-cppruntime/config.yml b/recipes/antlr4-cppruntime/config.yml index 62ba72dbb3e3f..05c77e20051f9 100644 --- a/recipes/antlr4-cppruntime/config.yml +++ b/recipes/antlr4-cppruntime/config.yml @@ -1,4 +1,6 @@ versions: + "4.13.1": + folder: all "4.13.0": folder: all "4.12.0": From 30a9f2eb1e4bf454b408712318b9c13376552a95 Mon Sep 17 00:00:00 2001 From: Samuel Dowling Date: Fri, 15 Sep 2023 19:33:33 +0930 Subject: [PATCH 626/637] (#17427) [tk] Migrate tk to conan 2.0 * [tk] Migrate tk to conan 2.0 * Move to modern conan implementation * Transition most file modifications to patches * [tk] Formatting and linting fixes * Apply black * Sort imports * Remove unused imports * Prefer fstrings over format where possible * [tk] Ensure license is exported with package * [tk] Fix typo in runenv vars retrieval * [tk] Fix NMake builds * Fix patch to appropriately remove TCL variables and handle the rules directory * Move build logic into the _build_nmake method rather than generate so that the values can be passed directly to the command line. * Fix windows lib name in package_info * [tk] Add dynamic runtime compatibility * [tk] Conditionally use AutotoolsDeps Only use AutotoolsDeps on linux where there are dependencies not passed directly to the library. This resolves an issue on Macos where configure failed to determine whether it was cross building when the AutotoolsDeps generator was used. * [tk] Invalidate Macos M1 builds * [tk] Modify validate to remove macos crossbuilds rather than M1 builds Co-authored-by: Matthieu Darbois --------- Co-authored-by: Matthieu Darbois --- recipes/tk/all/conandata.yml | 12 + recipes/tk/all/conanfile.py | 327 ++++++++++-------- .../0001-Add-unix-conan-compatibility.patch | 80 +++++ ...0002-Add-windows-conan-compatibility.patch | 145 ++++++++ .../all/patches/0003-Patch-tkConfig.sh.patch | 89 +++++ recipes/tk/all/test_package/CMakeLists.txt | 11 +- recipes/tk/all/test_package/conanfile.py | 21 +- .../all/test_package/{ => src}/test_package.c | 1 + recipes/tk/all/test_v1_package/CMakeLists.txt | 8 + recipes/tk/all/test_v1_package/conanfile.py | 17 + 10 files changed, 551 insertions(+), 160 deletions(-) create mode 100644 recipes/tk/all/patches/0001-Add-unix-conan-compatibility.patch create mode 100644 recipes/tk/all/patches/0002-Add-windows-conan-compatibility.patch create mode 100644 recipes/tk/all/patches/0003-Patch-tkConfig.sh.patch rename recipes/tk/all/test_package/{ => src}/test_package.c (92%) create mode 100644 recipes/tk/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/tk/all/test_v1_package/conanfile.py diff --git a/recipes/tk/all/conandata.yml b/recipes/tk/all/conandata.yml index 8cbbcf9134e3c..7e9e03ca25a75 100644 --- a/recipes/tk/all/conandata.yml +++ b/recipes/tk/all/conandata.yml @@ -2,3 +2,15 @@ sources: "8.6.10": url: "https://prdownloads.sourceforge.net/tcl/tk8.6.10-src.tar.gz" sha256: "63df418a859d0a463347f95ded5cd88a3dd3aaa1ceecaeee362194bc30f3e386" + +patches: + "8.6.10": + - patch_file: "patches/0001-Add-unix-conan-compatibility.patch" + patch_description: "Add unix conan compatibility" + patch_type: "conan" + - patch_file: "patches/0002-Add-windows-conan-compatibility.patch" + patch_description: "Add windows conan compatibility" + patch_type: "conan" + - patch_file: "patches/0003-Patch-tkConfig.sh.patch" + patch_description: "Remove TK_BUILD_* and TK_SRC_DIR from tkConfig.sh for portability" + patch_type: "portability" diff --git a/recipes/tk/all/conanfile.py b/recipes/tk/all/conanfile.py index 97130833734db..2c3e88ddc0d5b 100644 --- a/recipes/tk/all/conanfile.py +++ b/recipes/tk/all/conanfile.py @@ -1,8 +1,26 @@ -from conans import ConanFile, AutoToolsBuildEnvironment, tools -from conans.errors import ConanException, ConanInvalidConfiguration, ConanExceptionInUserConanfileMethod import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanException, ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.build import cross_building +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import ( + apply_conandata_patches, + chdir, + copy, + export_conandata_patches, + get, + replace_in_file, + rmdir, +) +from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import NMakeDeps, NMakeToolchain, is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.55.0" + class TkConan(ConanFile): name = "tk" @@ -12,6 +30,7 @@ class TkConan(ConanFile): license = "TCL" url = "https://github.com/conan-io/conan-center-index" settings = "os", "compiler", "build_type", "arch" + package_type = "library" options = { "shared": [True, False], "fPIC": [True, False], @@ -21,24 +40,23 @@ class TkConan(ConanFile): "fPIC": True, } - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": - del self.options.fPIC + self.options.rm_safe("fPIC") def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") def requirements(self): - self.requires("tcl/{}".format(self.version)) + self.requires( + f"tcl/{self.version}", transitive_headers=True, transitive_libs=True + ) if self.settings.os == "Linux": self.requires("fontconfig/2.13.93") self.requires("xorg/system") @@ -48,66 +66,84 @@ def _settings_build(self): return getattr(self, "settings_build", self.settings) def build_requirements(self): - if self.settings.compiler != "Visual Studio": - if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): + if not is_msvc(self): + if ( + self._settings_build.os == "Windows" + and not self.conf.get("tools.microsoft.bash:path") + and not self.conf.get("tools.microsoft.bash:subsystem") + ): self.build_requires("msys2/cci.latest") def validate(self): - if self.options["tcl"].shared != self.options.shared: - raise ConanInvalidConfiguration("The shared option of tcl and tk must have the same value") - - def source(self): - tools.get(**self.conan_data["sources"][self.version], - strip_root=True, destination=self._source_subfolder) - - def _patch_sources(self): - for build_system in ("unix", "win", ): - config_dir = self._get_configure_folder(build_system) - - if build_system != "win": - # When disabling 64-bit support (in 32-bit), this test must be 0 in order to use "long long" for 64-bit ints - # (${tcl_type_64bit} can be either "__int64" or "long long") - tools.replace_in_file(os.path.join(config_dir, "configure"), - "(sizeof(${tcl_type_64bit})==sizeof(long))", - "(sizeof(${tcl_type_64bit})!=sizeof(long))") - - makefile_in = os.path.join(config_dir, "Makefile.in") - # Avoid clearing CFLAGS and LDFLAGS in the makefile - # tools.replace_in_file(makefile_in, "\nCFLAGS{}".format(" " if (build_system == "win" and name == "tcl") else "\t"), "\n#CFLAGS\t") - tools.replace_in_file(makefile_in, "\nLDFLAGS\t", "\n#LDFLAGS\t") - tools.replace_in_file(makefile_in, "${CFLAGS}", "${CFLAGS} ${CPPFLAGS}") - - rules_ext_vc = os.path.join(self.source_folder, self._source_subfolder, "win", "rules-ext.vc") - tools.replace_in_file(rules_ext_vc, - "\n_RULESDIR = ", - "\n_RULESDIR = .\n#_RULESDIR = ") - rules_vc = os.path.join(self.source_folder, self._source_subfolder, "win", "rules.vc") - tools.replace_in_file(rules_vc, - r"$(_TCLDIR)\generic", - r"$(_TCLDIR)\include") - tools.replace_in_file(rules_vc, - "\nTCLSTUBLIB", - "\n#TCLSTUBLIB") - tools.replace_in_file(rules_vc, - "\nTCLIMPLIB", - "\n#TCLIMPLIB") + if self.dependencies["tcl"].options.shared != self.options.shared: + raise ConanInvalidConfiguration( + "The shared option of tcl and tk must have the same value" + ) + if self.settings.os == "Macos" and cross_building(self): + raise ConanInvalidConfiguration("The tk conan recipe does not currently support Macos cross-builds. A contribution to add this functionality would be welcome.") - win_makefile_in = os.path.join(self._get_configure_folder("win"), "Makefile.in") - tools.replace_in_file(win_makefile_in, "\nTCL_GENERIC_DIR", "\n#TCL_GENERIC_DIR") + def layout(self): + basic_layout(self, src_folder="src") - win_rules_vc = os.path.join(self._source_subfolder, "win", "rules.vc") - tools.replace_in_file(win_rules_vc, - "\ncwarn = $(cwarn) -WX", - "\n# cwarn = $(cwarn) -WX") - # disable whole program optimization to be portable across different MSVC versions. - # See conan-io/conan-center-index#4811 conan-io/conan-center-index#4094 - tools.replace_in_file( - win_rules_vc, - "OPTIMIZATIONS = $(OPTIMIZATIONS) -GL", - "# OPTIMIZATIONS = $(OPTIMIZATIONS) -GL") + def source(self): + get( + self, + **self.conan_data["sources"][self.version], + strip_root=True, + destination=self.source_folder, + ) + + def generate(self): + buildenv = VirtualBuildEnv(self) + buildenv.generate() + + if is_msvc(self): + tc = NMakeToolchain(self) + tc.generate() + + deps = NMakeDeps(self) + deps.generate() + else: + # Inject runenv variables into buildenv + # This is required because tcl needs to be available when configure tries to + # run a test executable + if not cross_building(self): + runenv = VirtualRunEnv(self) + runenv.generate(scope="build") + + yes_no = lambda v: "yes" if v else "no" + tc = AutotoolsToolchain(self) + tc.configure_args.append("--enable-threads") + tc.configure_args.append( + f"--enable-symbols={yes_no(self.settings.build_type == 'Debug')}" + ) + tc.configure_args.append( + f"--enable-64bit={yes_no(self.settings.arch == 'x86_64')}" + ) + tc.configure_args.append(f"--enable-aqua={yes_no(is_apple_os(self))}") + tc.configure_args.append( + f"--with-tcl={os.path.join(self.dependencies['tcl'].package_folder, 'lib')}" + ) + tc.configure_args.append(f"--with-x={yes_no(self.settings.os == 'Linux')}") + tc.make_args.append( + f"TCL_GENERIC_DIR={os.path.join(self.dependencies['tcl'].package_folder, 'include')}" + ) + if self.settings.os == "Windows": + tc.extra_defines.extend( + [ + "UNICODE", + "_UNICODE", + "_ATL_XP_TARGETING", + ] + ) + tc.generate() + + if self.settings.os == "Linux": + deps = AutotoolsDeps(self) + deps.generate() def _get_default_build_system(self): - if tools.is_apple_os(self.settings.os): + if is_apple_os(self): return "macosx" elif self.settings.os in ("Linux", "FreeBSD"): return "unix" @@ -120,8 +156,8 @@ def _get_configure_folder(self, build_system=None): if build_system is None: build_system = self._get_default_build_system() if build_system not in ["win", "unix", "macosx"]: - raise ConanExceptionInUserConanfileMethod("Invalid build system: {}".format(build_system)) - return os.path.join(self.source_folder, self._source_subfolder, build_system) + raise ConanException(f"Invalid build system: {build_system}") + return os.path.join(self.source_folder, build_system) def _build_nmake(self, target="release"): # https://core.tcl.tk/tips/doc/trunk/tip/477.md @@ -130,7 +166,7 @@ def _build_nmake(self, target="release"): opts.append("static") if self.settings.build_type == "Debug": opts.append("symbols") - if "MD" in str(self.settings.compiler.runtime): + if "dynamic" in str(self.settings.compiler.runtime) or "MD" in str(self.settings.compiler.runtime): opts.append("msvcrt") else: opts.append("nomsvcrt") @@ -138,121 +174,116 @@ def _build_nmake(self, target="release"): opts.append("unchecked") # https://core.tcl.tk/tk/tktview?name=3d34589aa0 # https://wiki.tcl-lang.org/page/Building+with+Visual+Studio+2017 - tcl_lib_path = os.path.join(self.deps_cpp_info["tcl"].rootpath, "lib") + tcl_lib_path = os.path.join(self.dependencies["tcl"].package_folder, "lib") tclimplib, tclstublib = None, None for lib in os.listdir(tcl_lib_path): if not lib.endswith(".lib"): continue if lib.startswith("tcl{}".format("".join(self.version.split(".")[:2]))): tclimplib = os.path.join(tcl_lib_path, lib) - elif lib.startswith("tclstub{}".format("".join(self.version.split(".")[:2]))): + elif lib.startswith( + "tclstub{}".format("".join(self.version.split(".")[:2])) + ): tclstublib = os.path.join(tcl_lib_path, lib) if tclimplib is None or tclstublib is None: raise ConanException("tcl dependency misses tcl and/or tclstub library") - with tools.vcvars(self.settings): - tcldir = self.deps_cpp_info["tcl"].rootpath.replace("/", "\\\\") + + flags = { + "INSTALLDIR": self.package_folder, + "OPTS": ",".join(opts), + "TCLDIR": self.dependencies["tcl"].package_folder, + "TCL_LIBRARY": self.dependencies["tcl"].runenv_info.vars(self).get("TCL_LIBRARY"), + "TCLIMPLIB": tclimplib, + "TCLSTUBLIB": tclstublib, + } + config_dir = self._get_configure_folder("win") + with chdir(self, config_dir): self.run( - """nmake -nologo -f "{cfgdir}/makefile.vc" INSTALLDIR="{pkgdir}" OPTS={opts} TCLDIR="{tcldir}" TCL_LIBRARY="{tcl_library}" TCLIMPLIB="{tclimplib}" TCLSTUBLIB="{tclstublib}" {target}""".format( - cfgdir=self._get_configure_folder("win"), - pkgdir=self.package_folder, - opts=",".join(opts), - tcldir=tcldir, - tclstublib=tclstublib, - tclimplib=tclimplib, - tcl_library=self.deps_env_info['tcl'].TCL_LIBRARY.replace("\\", "/"), - target=target, - ), cwd=self._get_configure_folder("win"), + f"""nmake -nologo -f makefile.vc {' '.join([f'{k}="{v}"' for k, v in flags.items()])} {target}""", + env="conanbuild", ) - def _configure_autotools(self): - tcl_root = self.deps_cpp_info["tcl"].rootpath - make_args = ["TCL_GENERIC_DIR={}".format(os.path.join(tcl_root, "include")).replace("\\", "/")] - if self._autotools: - return self._autotools, make_args - - tclConfigShFolder = os.path.join(tcl_root, "lib").replace("\\", "/") - - self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - yes_no = lambda v: "yes" if v else "no" - conf_args = [ - "--with-tcl={}".format(tools.unix_path(tclConfigShFolder)), - "--enable-threads", - "--enable-shared={}".format(yes_no(self.options.shared)), - "--enable-symbols={}".format(yes_no(self.settings.build_type == "Debug")), - "--enable-64bit={}".format(yes_no(self.settings.arch == "x86_64")), - "--with-x={}".format(yes_no(self.settings.os == "Linux")), - "--enable-aqua={}".format(yes_no(tools.is_apple_os(self.settings.os))), - ] - - if self.settings.os == "Windows": - self._autotools.defines.extend(["UNICODE", "_UNICODE", "_ATL_XP_TARGETING", ]) - self._autotools.libs = [] - self._autotools.configure(configure_dir=self._get_configure_folder(), args=conf_args) - return self._autotools, make_args - def build(self): - self._patch_sources() - - if self.settings.compiler == "Visual Studio": + apply_conandata_patches(self) + if is_msvc(self): self._build_nmake() else: - autotools, make_args = self._configure_autotools() - autotools.make(args=make_args) + autotools = Autotools(self) + autotools.configure(build_script_folder=self._get_configure_folder()) + autotools.make() def package(self): - self.copy(pattern="license.terms", src=self._source_subfolder, dst="licenses") - if self.settings.compiler == "Visual Studio": + copy( + self, + pattern="license.terms", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses"), + ) + if is_msvc(self): self._build_nmake("install") else: - with tools.chdir(self.build_folder): - autotools, make_args = self._configure_autotools() - autotools.install(args=make_args) - autotools.make(target="install-private-headers", args=make_args) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.rmdir(os.path.join(self.package_folder, "man")) - tools.rmdir(os.path.join(self.package_folder, "share")) + with chdir(self, self.build_folder): + autotools = Autotools(self) + autotools.install() + # DESTDIR is only default initialized for target="install" + autotools.make( + target="install-private-headers", + args=[f"DESTDIR={self.package_folder}"], + ) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "man")) + rmdir(self, os.path.join(self.package_folder, "share")) - # FIXME: move to patch tkConfigShPath = os.path.join(self.package_folder, "lib", "tkConfig.sh") if os.path.exists(tkConfigShPath): - pkg_path = os.path.join(self.package_folder).replace('\\', '/') - tools.replace_in_file(tkConfigShPath, - pkg_path, - "${TK_ROOT}") - tools.replace_in_file(tkConfigShPath, - "\nTK_BUILD_", - "\n#TK_BUILD_") - tools.replace_in_file(tkConfigShPath, - "\nTK_SRC_DIR", - "\n#TK_SRC_DIR") + # This can only be modified after build since the value being replaced is a result + # of variable substitution in tkConfig.sh.in + replace_in_file(self, tkConfigShPath, "//", "${TK_ROOT}/") def package_info(self): - if self.settings.compiler == "Visual Studio": - tk_version = tools.Version(self.version) - lib_infix = "{}{}".format(tk_version.major, tk_version.minor) + tk_version = Version(self.version) + lib_infix = f"{tk_version.major}.{tk_version.minor}" + if is_msvc(self): + lib_infix = f"{tk_version.major}{tk_version.minor}" tk_suffix = "t{}{}{}".format( "" if self.options.shared else "s", "g" if self.settings.build_type == "Debug" else "", - "x" if "MD" in str(self.settings.compiler.runtime) and not self.options.shared else "", + "x" if ("dynamic" in str(self.settings.compiler.runtime) or "MD" in str(self.settings.compiler.runtime)) and not self.options.shared else "", ) else: - tk_version = tools.Version(self.version) - lib_infix = "{}.{}".format(tk_version.major, tk_version.minor) tk_suffix = "" - self.cpp_info.libs = ["tk{}{}".format(lib_infix, tk_suffix), "tkstub{}".format(lib_infix)] + self.cpp_info.libs = [f"tk{lib_infix}{tk_suffix}", f"tkstub{lib_infix}"] if self.settings.os == "Macos": self.cpp_info.frameworks = ["CoreFoundation", "Cocoa", "Carbon", "IOKit"] elif self.settings.os == "Windows": self.cpp_info.system_libs = [ - "netapi32", "kernel32", "user32", "advapi32", "userenv","ws2_32", "gdi32", - "comdlg32", "imm32", "comctl32", "shell32", "uuid", "ole32", "oleaut32" + "netapi32", + "kernel32", + "user32", + "advapi32", + "userenv", + "ws2_32", + "gdi32", + "comdlg32", + "imm32", + "comctl32", + "shell32", + "uuid", + "ole32", + "oleaut32", ] - tk_library = os.path.join(self.package_folder, "lib", "{}{}".format(self.name, ".".join(self.version.split(".")[:2]))).replace("\\", "/") - self.output.info("Setting TK_LIBRARY environment variable: {}".format(tk_library)) + tk_library = os.path.join( + self.package_folder, + "lib", + f"{self.name}{tk_version.major}.{tk_version.minor}", + ).replace("\\", "/") + self.output.info(f"Setting TK_LIBRARY environment variable: {tk_library}") self.env_info.TK_LIBRARY = tk_library + self.runenv_info.define("TK_LIBRARY", tk_library) - tcl_root = self.package_folder.replace("\\", "/") - self.output.info("Setting TCL_ROOT environment variable: {}".format(tcl_root)) - self.env_info.TCL_ROOT = tcl_root + tk_root = self.package_folder.replace("\\", "/") + self.output.info(f"Setting TK_ROOT environment variable: {tk_root}") + self.env_info.TK_ROOT = tk_root + self.runenv_info.define("TK_ROOT", tk_root) diff --git a/recipes/tk/all/patches/0001-Add-unix-conan-compatibility.patch b/recipes/tk/all/patches/0001-Add-unix-conan-compatibility.patch new file mode 100644 index 0000000000000..6fa4dea2761c6 --- /dev/null +++ b/recipes/tk/all/patches/0001-Add-unix-conan-compatibility.patch @@ -0,0 +1,80 @@ +Subject: [PATCH] Add unix conan compatibility + +--- + unix/Makefile.in | 11 +++++------ + unix/configure | 2 +- + 2 files changed, 6 insertions(+), 7 deletions(-) + +diff --git a/unix/Makefile.in b/unix/Makefile.in +index c6f8c25d7..7bc4a22ba 100644 +--- a/unix/Makefile.in ++++ b/unix/Makefile.in +@@ -143,7 +143,6 @@ CFLAGS = @CFLAGS_DEFAULT@ @CFLAGS@ + # Flags to pass to the linker + LDFLAGS_DEBUG = @LDFLAGS_DEBUG@ + LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@ +-LDFLAGS = @LDFLAGS_DEFAULT@ @LDFLAGS@ + + # A "-I" switch that can be used when compiling to make all of the + # X11 include files accessible (the configure script will try to +@@ -328,7 +327,7 @@ MAN_FLAGS = @MAN_FLAGS@ + + CC = @CC@ + +-CC_SWITCHES_NO_STUBS = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ ++CC_SWITCHES_NO_STUBS = ${CFLAGS} ${CPPFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ + -I${UNIX_DIR} -I${GENERIC_DIR} -I${BMAP_DIR} -I${TCL_GENERIC_DIR} \ + -I${TCL_PLATFORM_DIR} ${@TK_WINDOWINGSYSTEM@_INCLUDES} ${AC_FLAGS} \ + ${PROTO_FLAGS} ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} \ +@@ -338,7 +337,7 @@ CC_SWITCHES = $(CC_SWITCHES_NO_STUBS) @TCL_STUB_FLAGS@ + + APP_CC_SWITCHES = $(CC_SWITCHES_NO_STUBS) @EXTRA_APP_CC_SWITCHES@ + +-DEPEND_SWITCHES = ${CFLAGS} -I${UNIX_DIR} -I${GENERIC_DIR} -I${BMAP_DIR} \ ++DEPEND_SWITCHES = ${CFLAGS} ${CPPFLAGS} -I${UNIX_DIR} -I${GENERIC_DIR} -I${BMAP_DIR} \ + -I${TCL_GENERIC_DIR} -I${TCL_PLATFORM_DIR} ${@TK_WINDOWINGSYSTEM@_INCLUDES} \ + ${AC_FLAGS} ${PROTO_FLAGS} ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} \ + ${KEYSYM_FLAGS} @EXTRA_CC_SWITCHES@ +@@ -620,7 +619,7 @@ objs: ${OBJS} + + + ${WISH_EXE}: $(TK_STUB_LIB_FILE) $(WISH_OBJS) $(TK_LIB_FILE) @APP_RSRC_FILE@ +- ${CC} ${CFLAGS} ${LDFLAGS} $(WISH_OBJS) @TK_BUILD_LIB_SPEC@ \ ++ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} $(WISH_OBJS) @TK_BUILD_LIB_SPEC@ \ + $(WISH_LIBS) $(CC_SEARCH_FLAGS) -o ${WISH_EXE} + + # Resetting the LIB_RUNTIME_DIR below is required so that +@@ -633,7 +632,7 @@ $(TKTEST_EXE): $(TKTEST_OBJS) $(TK_LIB_FILE) + $(MAKE) tktest-real LIB_RUNTIME_DIR="`pwd`:$(TCL_BIN_DIR)" + + tktest-real: ${TK_STUB_LIB_FILE} +- ${CC} ${CFLAGS} ${LDFLAGS} $(TKTEST_OBJS) ${TK_STUB_LIB_FILE} ${TCL_STUB_LIB_SPEC} @TK_BUILD_LIB_SPEC@ \ ++ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} $(TKTEST_OBJS) ${TK_STUB_LIB_FILE} ${TCL_STUB_LIB_SPEC} @TK_BUILD_LIB_SPEC@ \ + $(WISH_LIBS) $(CC_SEARCH_FLAGS) -o $(TKTEST_EXE) + + # # FIXME: This xttest rule seems to be broken in a number of ways. It should +@@ -641,7 +640,7 @@ tktest-real: ${TK_STUB_LIB_FILE} + # # tktest, and it is not clear where this test.o object file comes from. + # + # xttest: test.o tkTest.o tkSquare.o $(TK_LIB_FILE) ${TK_STUB_LIB_FILE} +-# ${CC} ${CFLAGS} ${LDFLAGS} test.o tkTest.o tkSquare.o \ ++# ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.o tkTest.o tkSquare.o \ + # @TK_BUILD_LIB_SPEC@ ${TK_STUB_LIB_FILE} ${TCL_STUB_LIB_SPEC} \ + # $(WISH_LIBS) $(LD_SEARCH_FLAGS) -lXt -o xttest + +diff --git a/unix/configure b/unix/configure +index fb0f5a3d9..77256a740 100755 +--- a/unix/configure ++++ b/unix/configure +@@ -7279,7 +7279,7 @@ int + main () + { + switch (0) { +- case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ; ++ case 1: case (sizeof(${tcl_type_64bit})!=sizeof(long)): ; + } + ; + return 0; +-- +2.40.0 + diff --git a/recipes/tk/all/patches/0002-Add-windows-conan-compatibility.patch b/recipes/tk/all/patches/0002-Add-windows-conan-compatibility.patch new file mode 100644 index 0000000000000..bd293b31a745e --- /dev/null +++ b/recipes/tk/all/patches/0002-Add-windows-conan-compatibility.patch @@ -0,0 +1,145 @@ +Subject: [PATCH] Add windows conan compatibility + +* Disable whole program optimization to be portable across different MSVC + versions. See conan-io/conan-center-index#4811 and + conan-io/conan-center-index#4094. +--- + win/rules-ext.vc | 8 ++++---- + win/rules.vc | 23 +++++++---------------- + 2 files changed, 11 insertions(+), 20 deletions(-) + +diff --git a/win/rules-ext.vc b/win/rules-ext.vc +index 58c70fa26..e7f953b4c 100644 +--- a/win/rules-ext.vc ++++ b/win/rules-ext.vc +@@ -37,7 +37,7 @@ macro to the name of the project makefile. + # First locate the Tcl directory that we are working with. + !ifdef TCLDIR + +-_RULESDIR = $(TCLDIR:/=\) ++_RULESDIR = . + + !else + +@@ -49,7 +49,7 @@ _RULESDIR=$(INSTALLDIR:/=\) + # Locate Tcl sources + !if [echo _RULESDIR = \> nmakehlp.out] \ + || [nmakehlp -L generic\tcl.h >> nmakehlp.out] +-_RULESDIR = ..\..\tcl ++_RULESDIR = . + !else + !include nmakehlp.out + !endif +@@ -61,9 +61,9 @@ _RULESDIR = ..\..\tcl + # Now look for the targets.vc file under the Tcl root. Note we check this + # file and not rules.vc because the latter also exists on older systems. + !if exist("$(_RULESDIR)\lib\nmake\targets.vc") # Building against installed Tcl +-_RULESDIR = $(_RULESDIR)\lib\nmake ++_RULESDIR = . + !elseif exist("$(_RULESDIR)\win\targets.vc") # Building against Tcl sources +-_RULESDIR = $(_RULESDIR)\win ++_RULESDIR = . + !else + # If we have not located Tcl's targets file, most likely we are compiling + # against an older version of Tcl and so must use our own support files. +diff --git a/win/rules.vc b/win/rules.vc +index cf80c9122..fe4a95dc9 100644 +--- a/win/rules.vc ++++ b/win/rules.vc +@@ -262,7 +262,7 @@ TCLINSTALL = 0 # Tk always builds against Tcl source, not an installed Tcl + !endif # TCLDIR == "" + + _TCLDIR = $(TCLDIR:/=\) +-_TCL_H = $(_TCLDIR)\generic\tcl.h ++_TCL_H = $(_TCLDIR)\include\tcl.h + !if !exist("$(_TCL_H)") + !error Could not locate tcl.h. Please set the TCLDIR macro to point to the Tcl *source* directory. + !endif +@@ -283,9 +283,9 @@ _TCLDIR = $(TCLDIR:/=\) + !if exist("$(_TCLDIR)\include\tcl.h") # Case 2(c) with TCLDIR defined + TCLINSTALL = 1 + _TCL_H = $(_TCLDIR)\include\tcl.h +-!elseif exist("$(_TCLDIR)\generic\tcl.h") # Case 2(d) with TCLDIR defined ++!elseif exist("$(_TCLDIR)\include\tcl.h") # Case 2(d) with TCLDIR defined + TCLINSTALL = 0 +-_TCL_H = $(_TCLDIR)\generic\tcl.h ++_TCL_H = $(_TCLDIR)\include\tcl.h + !endif + + !else # # Case 2(c) for extensions with TCLDIR undefined +@@ -311,7 +311,7 @@ _TCL_H = $(_TCLDIR)\include\tcl.h + !include nmakehlp.out + TCLINSTALL = 0 + TCLDIR = $(_TCLDIR) +-_TCL_H = $(_TCLDIR)\generic\tcl.h ++_TCL_H = $(_TCLDIR)\include\tcl.h + + !endif # exist(...) && ! $(NEED_TCL_SOURCE) + +@@ -619,7 +619,7 @@ OPTIMIZATIONS = $(OPTIMIZATIONS) -GS + # generated libraries only usable by the specific VC++ version that + # created it. Requires /LTCG linker option + !if [nmakehlp -c -GL] +-OPTIMIZATIONS = $(OPTIMIZATIONS) -GL ++ + CC_GL_OPT_ENABLED = 1 + !else + # In newer compilers -GL and -YX are incompatible. +@@ -1085,12 +1085,9 @@ STUBPREFIX = $(PROJECT)stub + + TCLSHNAME = $(PROJECT)sh$(VERSION)$(SUFX).exe + TCLSH = $(OUT_DIR)\$(TCLSHNAME) +-TCLIMPLIB = $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib + TCLLIBNAME = $(PROJECT)$(VERSION)$(SUFX).$(EXT) + TCLLIB = $(OUT_DIR)\$(TCLLIBNAME) + +-TCLSTUBLIBNAME = $(STUBPREFIX)$(VERSION).lib +-TCLSTUBLIB = $(OUT_DIR)\$(TCLSTUBLIBNAME) + TCL_INCLUDES = -I"$(WIN_DIR)" -I"$(GENERICDIR)" + + !else # ! $(DOING_TCL) +@@ -1105,12 +1102,9 @@ TCLSH = $(_TCLDIR)\bin\tclsh$(TCL_VERSION)$(SUFX:t=).exe + TCLSH = $(_TCLDIR)\bin\tclsh$(TCL_VERSION)t$(SUFX:t=).exe + !endif + +-TCLSTUBLIB = $(_TCLDIR)\lib\tclstub$(TCL_VERSION).lib +-TCLIMPLIB = $(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX:t=).lib + # When building extensions, may be linking against Tcl that does not add + # "t" suffix (e.g. 8.5 or 8.7). If lib not found check for that possibility. + !if !exist("$(TCLIMPLIB)") +-TCLIMPLIB = $(_TCLDIR)\lib\tcl$(TCL_VERSION)t$(SUFX:t=).lib + !endif + TCL_LIBRARY = $(_TCLDIR)\lib + TCLREGLIB = $(_TCLDIR)\lib\tclreg13$(SUFX:t=).lib +@@ -1124,18 +1118,15 @@ TCLSH = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)$(SUFX:t=).exe + !if !exist($(TCLSH)) + TCLSH = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)t$(SUFX:t=).exe + !endif +-TCLSTUBLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub$(TCL_VERSION).lib +-TCLIMPLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX:t=).lib + # When building extensions, may be linking against Tcl that does not add + # "t" suffix (e.g. 8.5 or 8.7). If lib not found check for that possibility. + !if !exist("$(TCLIMPLIB)") +-TCLIMPLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)t$(SUFX:t=).lib + !endif + TCL_LIBRARY = $(_TCLDIR)\library + TCLREGLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclreg13$(SUFX:t=).lib + TCLDDELIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde14$(SUFX:t=).lib + TCLTOOLSDIR = $(_TCLDIR)\tools +-TCL_INCLUDES = -I"$(_TCLDIR)\generic" -I"$(_TCLDIR)\win" ++TCL_INCLUDES = -I"$(_TCLDIR)\include" -I"$(_TCLDIR)\win" + + !endif # TCLINSTALL + +@@ -1393,7 +1384,7 @@ carch = + + !if $(DEBUG) + # Turn warnings into errors +-cwarn = $(cwarn) -WX ++ + !endif + + INCLUDES = $(TCL_INCLUDES) $(TK_INCLUDES) $(PRJ_INCLUDES) +-- +2.40.0 + diff --git a/recipes/tk/all/patches/0003-Patch-tkConfig.sh.patch b/recipes/tk/all/patches/0003-Patch-tkConfig.sh.patch new file mode 100644 index 0000000000000..ecabe8916794b --- /dev/null +++ b/recipes/tk/all/patches/0003-Patch-tkConfig.sh.patch @@ -0,0 +1,89 @@ +Subject: [PATCH] Patch tkConfig.sh to remove TK_BUILD_ directories and + TK_SRC_DIR + +--- + unix/tkConfig.sh.in | 8 ++++---- + win/tkConfig.sh.in | 8 ++++---- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/unix/tkConfig.sh.in b/unix/tkConfig.sh.in +index bb85ad0a2..e564ec1f9 100644 +--- a/unix/tkConfig.sh.in ++++ b/unix/tkConfig.sh.in +@@ -53,7 +53,7 @@ TK_LIB_FLAG='@TK_LIB_FLAG@' + + # String to pass to linker to pick up the Tk library from its + # build directory. +-TK_BUILD_LIB_SPEC='@TK_BUILD_LIB_SPEC@' ++#TK_BUILD_LIB_SPEC='@TK_BUILD_LIB_SPEC@' + + # String to pass to linker to pick up the Tk library from its + # installed directory. +@@ -69,7 +69,7 @@ TK_INCLUDE_SPEC='@TK_INCLUDE_SPEC@' + # different place than the directory containing the source files, this + # points to the location of the sources, not the location where Tk was + # compiled. +-TK_SRC_DIR='@TK_SRC_DIR@' ++#TK_SRC_DIR='@TK_SRC_DIR@' + + # Needed if you want to make a 'fat' shared library library + # containing tk objects or link a different wish. +@@ -84,14 +84,14 @@ TK_STUB_LIB_FLAG='@TK_STUB_LIB_FLAG@' + + # String to pass to linker to pick up the Tk stub library from its + # build directory. +-TK_BUILD_STUB_LIB_SPEC='@TK_BUILD_STUB_LIB_SPEC@' ++#TK_BUILD_STUB_LIB_SPEC='@TK_BUILD_STUB_LIB_SPEC@' + + # String to pass to linker to pick up the Tk stub library from its + # installed directory. + TK_STUB_LIB_SPEC='@TK_STUB_LIB_SPEC@' + + # Path to the Tk stub library in the build directory. +-TK_BUILD_STUB_LIB_PATH='@TK_BUILD_STUB_LIB_PATH@' ++#TK_BUILD_STUB_LIB_PATH='@TK_BUILD_STUB_LIB_PATH@' + + # Path to the Tk stub library in the install directory. + TK_STUB_LIB_PATH='@TK_STUB_LIB_PATH@' +diff --git a/win/tkConfig.sh.in b/win/tkConfig.sh.in +index c511312f0..d5330b829 100644 +--- a/win/tkConfig.sh.in ++++ b/win/tkConfig.sh.in +@@ -47,7 +47,7 @@ TK_LIB_FLAG='@TK_LIB_FLAG@' + + # String to pass to linker to pick up the Tk library from its + # build directory. +-TK_BUILD_LIB_SPEC='@TK_BUILD_LIB_SPEC@' ++#TK_BUILD_LIB_SPEC='@TK_BUILD_LIB_SPEC@' + + # String to pass to linker to pick up the Tk library from its + # installed directory. +@@ -59,7 +59,7 @@ TK_LIB_SPEC='@TK_LIB_SPEC@' + # different place than the directory containing the source files, this + # points to the location of the sources, not the location where Tk was + # compiled. +-TK_SRC_DIR='@TK_SRC_DIR@' ++#TK_SRC_DIR='@TK_SRC_DIR@' + + # Needed if you want to make a 'fat' shared library library + # containing tk objects or link a different wish. +@@ -74,14 +74,14 @@ TK_STUB_LIB_FLAG='@TK_STUB_LIB_FLAG@' + + # String to pass to linker to pick up the Tk stub library from its + # build directory. +-TK_BUILD_STUB_LIB_SPEC='@TK_BUILD_STUB_LIB_SPEC@' ++#TK_BUILD_STUB_LIB_SPEC='@TK_BUILD_STUB_LIB_SPEC@' + + # String to pass to linker to pick up the Tk stub library from its + # installed directory. + TK_STUB_LIB_SPEC='@TK_STUB_LIB_SPEC@' + + # Path to the Tk stub library in the build directory. +-TK_BUILD_STUB_LIB_PATH='@TK_BUILD_STUB_LIB_PATH@' ++#TK_BUILD_STUB_LIB_PATH='@TK_BUILD_STUB_LIB_PATH@' + + # Path to the Tk stub library in the install directory. + TK_STUB_LIB_PATH='@TK_STUB_LIB_PATH@' +-- +2.40.0 + diff --git a/recipes/tk/all/test_package/CMakeLists.txt b/recipes/tk/all/test_package/CMakeLists.txt index 7672a2d37cdd9..5cec06aa08035 100644 --- a/recipes/tk/all/test_package/CMakeLists.txt +++ b/recipes/tk/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(PackageTest C) -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup() +find_package(tk CONFIG REQUIRED) -add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +add_executable(example src/test_package.c) +target_link_libraries(example tk::tk) diff --git a/recipes/tk/all/test_package/conanfile.py b/recipes/tk/all/test_package/conanfile.py index a7a94271504b6..91a8fc7a09b42 100644 --- a/recipes/tk/all/test_package/conanfile.py +++ b/recipes/tk/all/test_package/conanfile.py @@ -1,17 +1,26 @@ -from conans import ConanFile, CMake, tools import os +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run -class TclTestConan(ConanFile): + +class fooTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + generators = "CMakeDeps", "CMakeToolchain" + + def requirements(self): + self.requires(self.tested_reference_str) def build(self): cmake = CMake(self) cmake.configure() cmake.build() + def layout(self): + cmake_layout(self) + def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + cmd = os.path.join(self.cpp.build.bindir, "example") + self.run(cmd, env="conanrun") diff --git a/recipes/tk/all/test_package/test_package.c b/recipes/tk/all/test_package/src/test_package.c similarity index 92% rename from recipes/tk/all/test_package/test_package.c rename to recipes/tk/all/test_package/src/test_package.c index 601b2c8c2b4fc..9a62551dccab6 100644 --- a/recipes/tk/all/test_package/test_package.c +++ b/recipes/tk/all/test_package/src/test_package.c @@ -19,5 +19,6 @@ int main (int argc ,char *argv[]) { } Tcl_Finalize(); + fprintf(stderr, "Test package success.\n"); return EXIT_SUCCESS; } diff --git a/recipes/tk/all/test_v1_package/CMakeLists.txt b/recipes/tk/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..0fe0f8ae90d2e --- /dev/null +++ b/recipes/tk/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package) + +include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") +conan_basic_setup() + +add_executable(${PROJECT_NAME} ../test_package/src/test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/tk/all/test_v1_package/conanfile.py b/recipes/tk/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..a7a94271504b6 --- /dev/null +++ b/recipes/tk/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TclTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From e1714d77f166e217ac1a4ca8ac1050a0dd1261c0 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 15 Sep 2023 15:09:31 +0200 Subject: [PATCH 627/637] (#19824) spectra: add package_type --- recipes/spectra/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/spectra/all/conanfile.py b/recipes/spectra/all/conanfile.py index 084f85d8c4950..7f108912c8a5c 100644 --- a/recipes/spectra/all/conanfile.py +++ b/recipes/spectra/all/conanfile.py @@ -15,6 +15,7 @@ class SpectraConan(ConanFile): topics = ("eigenvalue", "header-only") homepage = "https://spectralib.org" url = "https://github.com/conan-io/conan-center-index" + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -33,8 +34,7 @@ def validate(self): check_min_cppstd(self, 11) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass From 8b8c8d5a39610f33ba5215e1167d164528eb4c5f Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 15 Sep 2023 15:27:53 +0200 Subject: [PATCH 628/637] (#19825) taocpp-taopq: add package_type + fix traits of dependencies * add package_type * fix traits of libpq * bump libpq * Apply suggestions from code review --- recipes/taocpp-taopq/all/conanfile.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/taocpp-taopq/all/conanfile.py b/recipes/taocpp-taopq/all/conanfile.py index 4cf5de4b29231..7ea861e1070ea 100644 --- a/recipes/taocpp-taopq/all/conanfile.py +++ b/recipes/taocpp-taopq/all/conanfile.py @@ -16,7 +16,7 @@ class TaoCPPTaopqConan(ConanFile): homepage = "https://github.com/taocpp/taopq" description = "C++ client library for PostgreSQL" topics = ("cpp17", "postgresql", "libpq", "data-base", "sql") - + package_type = "library" settings = "os", "arch", "build_type", "compiler" options = { "shared": [True, False], @@ -53,7 +53,8 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("libpq/14.5") + # libpq-fe.h is included by many public headers of taocpp-taopq, and also uses some symbols of the lib (see https://github.com/conan-io/conan-center-index/pull/19825#issuecomment-1720996359) + self.requires("libpq/15.4", transitive_headers=True, transitive_libs=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): From a393a65c58bcec7318265e6fbf9a2ce84dd85c37 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 15 Sep 2023 16:18:11 +0200 Subject: [PATCH 629/637] (#19828) tscns: add package_type * add package_type * simplify test_v1_package * format imports --- recipes/tscns/all/conanfile.py | 10 ++++++---- recipes/tscns/all/test_v1_package/CMakeLists.txt | 11 ++++------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/recipes/tscns/all/conanfile.py b/recipes/tscns/all/conanfile.py index f9a1b573dbe33..c1b715cc27747 100644 --- a/recipes/tscns/all/conanfile.py +++ b/recipes/tscns/all/conanfile.py @@ -1,13 +1,14 @@ +import os + from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy from conan.tools.build import check_min_cppstd +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get from conan.tools.layout import basic_layout -import os - required_conan_version = ">=1.52.0" + class TscnsConan(ConanFile): name = "tscns" description = "A low overhead nanosecond clock based on x86 TSC" @@ -15,6 +16,7 @@ class TscnsConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/MengRao/tscns/" topics = ("timestamp", "x86_64", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" @property @@ -37,7 +39,7 @@ def validate(self): check_min_cppstd(self, self._min_cppstd) def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): apply_conandata_patches(self) diff --git a/recipes/tscns/all/test_v1_package/CMakeLists.txt b/recipes/tscns/all/test_v1_package/CMakeLists.txt index eebfbab4ba7b5..0d20897301b68 100644 --- a/recipes/tscns/all/test_v1_package/CMakeLists.txt +++ b/recipes/tscns/all/test_v1_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) +cmake_minimum_required(VERSION 3.1) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(tscns REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE tscns::tscns) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) From be4645021bd7d50b19d1c853984a73e4c2ecd7f5 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 15 Sep 2023 16:52:07 +0200 Subject: [PATCH 630/637] (#19829) tsl-array-hash: add package_type * add package_type * cleanup --- recipes/tsl-array-hash/all/conanfile.py | 6 ++---- .../tsl-array-hash/all/test_v1_package/CMakeLists.txt | 11 ++++------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/recipes/tsl-array-hash/all/conanfile.py b/recipes/tsl-array-hash/all/conanfile.py index 8c6297fe62672..4e37fe94c1699 100644 --- a/recipes/tsl-array-hash/all/conanfile.py +++ b/recipes/tsl-array-hash/all/conanfile.py @@ -14,6 +14,7 @@ class TslArrayHashConan(ConanFile): topics = ("string", "structure", "hash map", "hash set") homepage = "https://github.com/Tessil/array-hash" url = "https://github.com/conan-io/conan-center-index" + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -28,8 +29,7 @@ def validate(self): check_min_cppstd(self, 11) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass @@ -43,7 +43,6 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "tsl::array_hash") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.filenames["cmake_find_package"] = "tsl-array-hash" @@ -55,4 +54,3 @@ def package_info(self): self.cpp_info.components["array_hash"].set_property("cmake_target_name", "tsl::array_hash") self.cpp_info.components["array_hash"].bindirs = [] self.cpp_info.components["array_hash"].libdirs = [] - self.cpp_info.components["array_hash"].resdirs = [] diff --git a/recipes/tsl-array-hash/all/test_v1_package/CMakeLists.txt b/recipes/tsl-array-hash/all/test_v1_package/CMakeLists.txt index 15d716d7a9505..0d20897301b68 100644 --- a/recipes/tsl-array-hash/all/test_v1_package/CMakeLists.txt +++ b/recipes/tsl-array-hash/all/test_v1_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) +cmake_minimum_required(VERSION 3.1) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(tsl-array-hash REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE tsl::array_hash) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) From f2b8ca0fe191cd5e0a07ef8d7b7b96eef0aaf078 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 15 Sep 2023 17:10:50 +0200 Subject: [PATCH 631/637] (#19830) tsl-hat-trie: add package_type * add package_type & fix traits * Update recipes/tsl-hat-trie/all/conanfile.py --- recipes/tsl-hat-trie/all/conanfile.py | 7 ++----- .../tsl-hat-trie/all/test_v1_package/CMakeLists.txt | 11 ++++------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/recipes/tsl-hat-trie/all/conanfile.py b/recipes/tsl-hat-trie/all/conanfile.py index fbce5d32f1f2b..0c2749d1da56d 100644 --- a/recipes/tsl-hat-trie/all/conanfile.py +++ b/recipes/tsl-hat-trie/all/conanfile.py @@ -14,7 +14,7 @@ class TslHatTrieConan(ConanFile): topics = ("string", "trie", "structure", "hash map", "hash set") homepage = "https://github.com/Tessil/hat-trie" url = "https://github.com/conan-io/conan-center-index" - + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" def layout(self): @@ -31,8 +31,7 @@ def validate(self): check_min_cppstd(self, 11) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): rmdir(self, os.path.join(self.source_folder, "include", "tsl", "array-hash")) @@ -48,7 +47,6 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "tsl::hat_trie") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.filenames["cmake_find_package"] = "tsl-hat-trie" @@ -61,4 +59,3 @@ def package_info(self): self.cpp_info.components["hat_trie"].set_property("cmake_target_name", "tsl::hat_trie") self.cpp_info.components["hat_trie"].bindirs = [] self.cpp_info.components["hat_trie"].libdirs = [] - self.cpp_info.components["hat_trie"].resdirs = [] diff --git a/recipes/tsl-hat-trie/all/test_v1_package/CMakeLists.txt b/recipes/tsl-hat-trie/all/test_v1_package/CMakeLists.txt index 6a1b5a8c7df69..0d20897301b68 100644 --- a/recipes/tsl-hat-trie/all/test_v1_package/CMakeLists.txt +++ b/recipes/tsl-hat-trie/all/test_v1_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) +cmake_minimum_required(VERSION 3.1) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(tsl-hat-trie REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE tsl::hat_trie) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) From ba7b4f90e45e0dc4747f28a1211111e5f48d8698 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 15 Sep 2023 17:30:18 +0200 Subject: [PATCH 632/637] (#19831) tsl-ordered-map: add package_type --- recipes/tsl-ordered-map/all/conanfile.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/recipes/tsl-ordered-map/all/conanfile.py b/recipes/tsl-ordered-map/all/conanfile.py index d13b78edda147..9883b71a12ac3 100644 --- a/recipes/tsl-ordered-map/all/conanfile.py +++ b/recipes/tsl-ordered-map/all/conanfile.py @@ -14,6 +14,7 @@ class TslOrderedMapConan(ConanFile): topics = ("ordered-map", "structure", "hash map", "hash set") homepage = "https://github.com/Tessil/ordered-map" url = "https://github.com/conan-io/conan-center-index" + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -28,8 +29,7 @@ def validate(self): check_min_cppstd(self, 11) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass @@ -43,7 +43,6 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "tsl::ordered_map") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.filenames["cmake_find_package"] = "tsl-ordered-map" @@ -55,4 +54,3 @@ def package_info(self): self.cpp_info.components["ordered_map"].set_property("cmake_target_name", "tsl::ordered_map") self.cpp_info.components["ordered_map"].bindirs = [] self.cpp_info.components["ordered_map"].libdirs = [] - self.cpp_info.components["ordered_map"].resdirs = [] From 53f1515d319a20eebaf7a9baa487f1adeeb19044 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 15 Sep 2023 18:03:43 +0200 Subject: [PATCH 633/637] (#19835) tsl-robin-map: add package_type --- recipes/tsl-robin-map/all/conanfile.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/recipes/tsl-robin-map/all/conanfile.py b/recipes/tsl-robin-map/all/conanfile.py index 60cfac70c1a0d..14ac380eaf691 100644 --- a/recipes/tsl-robin-map/all/conanfile.py +++ b/recipes/tsl-robin-map/all/conanfile.py @@ -14,6 +14,7 @@ class TslRobinMapConan(ConanFile): topics = ("robin-map", "structure", "hash map", "hash set") homepage = "https://github.com/Tessil/robin-map" url = "https://github.com/conan-io/conan-center-index" + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -28,8 +29,7 @@ def validate(self): check_min_cppstd(self, 11) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass @@ -43,7 +43,6 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "tsl::robin_map") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.filenames["cmake_find_package"] = "tsl-robin-map" @@ -55,4 +54,3 @@ def package_info(self): self.cpp_info.components["robin_map"].set_property("cmake_target_name", "tsl::robin_map") self.cpp_info.components["robin_map"].bindirs = [] self.cpp_info.components["robin_map"].libdirs = [] - self.cpp_info.components["robin_map"].resdirs = [] From 582901326991e324ad3d5020437a493c347ca0f0 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 15 Sep 2023 19:21:37 +0200 Subject: [PATCH 634/637] (#19502) gettext: less verbose `package_info()` + add a layout + fix win_bash logic when `tools.microsoft.bash:path` is set * less verbose package_info() * add a layout * fix win_bash logic when tools.microsoft.bash:path is set --- recipes/gettext/all/conanfile.py | 38 +++++++++++++++----------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/recipes/gettext/all/conanfile.py b/recipes/gettext/all/conanfile.py index 72a7afc2b30cc..433bf975c1087 100644 --- a/recipes/gettext/all/conanfile.py +++ b/recipes/gettext/all/conanfile.py @@ -5,6 +5,7 @@ from conan.tools.env import Environment, VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.gnu import AutotoolsToolchain, Autotools +from conan.tools.layout import basic_layout from conan.tools.microsoft import check_min_vs, is_msvc, unix_path, unix_path_package_info_legacy from conan.tools.scm import Version @@ -31,26 +32,29 @@ def configure(self): self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") + def layout(self): + basic_layout(self, src_folder="src") + def requirements(self): self.requires("libiconv/1.17") - def build_requirements(self): - if self._settings_build.os == "Windows" and not self.conf.get("tools.microsoft.bash:path", check_type=str): - self.win_bash = True - self.tool_requires("msys2/cci.latest") - if is_msvc(self): - self.build_requires("automake/1.16.5") + def package_id(self): + del self.info.settings.compiler def validate(self): if Version(self.version) < "0.21" and is_msvc(self): raise ConanInvalidConfiguration("MSVC builds of gettext for versions < 0.21 are not supported.") # FIXME: it used to be possible. What changed? - def package_id(self): - del self.info.settings.compiler + def build_requirements(self): + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + if is_msvc(self): + self.build_requires("automake/1.16.5") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): env = VirtualBuildEnv(self) @@ -118,9 +122,9 @@ def build(self): def package(self): autotools = Autotools(self) autotools.install() - + copy(self, pattern="COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - + rmdir(self, os.path.join(self.package_folder, "lib")) rmdir(self, os.path.join(self.package_folder, "include")) rmdir(self, os.path.join(self.package_folder, "share", "doc")) @@ -135,14 +139,8 @@ def package_info(self): autopoint = os.path.join(self.package_folder, "bin", "autopoint") self.buildenv_info.append_path("ACLOCAL_PATH", aclocal) self.buildenv_info.define_path("AUTOPOINT", autopoint) - - # TODO: the following can be removed when the recipe supports Conan >= 2.0 only - bindir = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bindir)) - self.env_info.PATH.append(bindir) - self.output.info("Appending AUTOMAKE_CONAN_INCLUDES environment variable: {}".format(aclocal)) + # TODO: the following can be removed when the recipe supports Conan >= 2.0 only + self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) self.env_info.AUTOMAKE_CONAN_INCLUDES.append(unix_path_package_info_legacy(self, aclocal)) - - self.output.info("Setting AUTOPOINT environment variable: {}".format(autopoint)) self.env_info.AUTOPOINT = unix_path_package_info_legacy(self, autopoint) From f982651f23c296c391b367bd829f801a03174725 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 16 Sep 2023 03:09:25 +0900 Subject: [PATCH 635/637] (#19836) wasmtime: add version 12.0.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * wasmtime: add version 12.0.2 * Update recipes/wasmtime/config.yml --------- Co-authored-by: Rubén Rincón Blanco --- recipes/wasmtime/all/conandata.yml | 30 ++++++++++++++++++++++++++++++ recipes/wasmtime/config.yml | 2 ++ 2 files changed, 32 insertions(+) diff --git a/recipes/wasmtime/all/conandata.yml b/recipes/wasmtime/all/conandata.yml index 59e975128a2ee..c449ffc3965a6 100644 --- a/recipes/wasmtime/all/conandata.yml +++ b/recipes/wasmtime/all/conandata.yml @@ -1,4 +1,34 @@ sources: + "12.0.2": + Windows: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-x86_64-windows-c-api.zip" + sha256: "ad589d69722f0fdf0b6900fe1c708194575c487776504c44a5283c2960c03a92" + MinGW: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-x86_64-mingw-c-api.zip" + sha256: "773737d9072aed6efdbb6c8137561bd3d5e271008e6741687fa504ec384d0799" + Linux: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-x86_64-linux-c-api.tar.xz" + sha256: "9e02cd4201d74c68a236664f883873335c7427e820ce4a44c47c1cc98ec9e553" + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-aarch64-linux-c-api.tar.xz" + sha256: "daf6ca147b288cf915978f064853f403ca163b52806ae0a52ddd5bd91a5a2507" + "s390x": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-s390x-linux-c-api.tar.xz" + sha256: "65e75ffe34ced6710b56da071e9eb734eabdad69be07f3e6baae27e6b1a95d41" + Macos: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-x86_64-macos-c-api.tar.xz" + sha256: "35a0d3590afb147f9b312820df87189a9a376cc5bddc2d90b8d7e57b412c7dc6" + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-aarch64-macos-c-api.tar.xz" + sha256: "6b8a13fbe6c5440b30632a1f9178df1cdc07bbf34633a105666e506bc8db941d" + Android: + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-aarch64-linux-c-api.tar.xz" + sha256: "daf6ca147b288cf915978f064853f403ca163b52806ae0a52ddd5bd91a5a2507" "12.0.1": Windows: "x86_64": diff --git a/recipes/wasmtime/config.yml b/recipes/wasmtime/config.yml index de77d1db49a4f..e5ce53b819caa 100644 --- a/recipes/wasmtime/config.yml +++ b/recipes/wasmtime/config.yml @@ -1,4 +1,6 @@ versions: + "12.0.2": + folder: all "12.0.1": folder: all "9.0.1": From 1d7d94e2d4f825f4ca27d41059e57829c2afc52f Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 15 Sep 2023 21:00:33 +0200 Subject: [PATCH 636/637] (#19838) tsl-sparse-map: add package_type * add package_type * simplify test_v1_package --- recipes/tsl-sparse-map/all/conanfile.py | 6 ++---- .../tsl-sparse-map/all/test_v1_package/CMakeLists.txt | 11 ++++------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/recipes/tsl-sparse-map/all/conanfile.py b/recipes/tsl-sparse-map/all/conanfile.py index 4168882cba1a3..9afa37e182a6b 100644 --- a/recipes/tsl-sparse-map/all/conanfile.py +++ b/recipes/tsl-sparse-map/all/conanfile.py @@ -14,6 +14,7 @@ class TslSparseMapConan(ConanFile): topics = ("sparse-map", "structure", "hash map", "hash set") homepage = "https://github.com/Tessil/sparse-map" url = "https://github.com/conan-io/conan-center-index" + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -28,8 +29,7 @@ def validate(self): check_min_cppstd(self, 11) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass @@ -43,7 +43,6 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "tsl::sparse_map") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.filenames["cmake_find_package"] = "tsl-sparse-map" @@ -55,4 +54,3 @@ def package_info(self): self.cpp_info.components["sparse_map"].set_property("cmake_target_name", "tsl::sparse_map") self.cpp_info.components["sparse_map"].bindirs = [] self.cpp_info.components["sparse_map"].libdirs = [] - self.cpp_info.components["sparse_map"].resdirs = [] diff --git a/recipes/tsl-sparse-map/all/test_v1_package/CMakeLists.txt b/recipes/tsl-sparse-map/all/test_v1_package/CMakeLists.txt index 3e681dedd0cd4..0d20897301b68 100644 --- a/recipes/tsl-sparse-map/all/test_v1_package/CMakeLists.txt +++ b/recipes/tsl-sparse-map/all/test_v1_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) +cmake_minimum_required(VERSION 3.1) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(tsl-sparse-map REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE tsl::sparse_map) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) From 9b64f858db8532669138eb02ae3d836a64aefed6 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 15 Sep 2023 21:33:34 +0200 Subject: [PATCH 637/637] (#19839) tuplet: add package_type --- recipes/tuplet/all/conanfile.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/tuplet/all/conanfile.py b/recipes/tuplet/all/conanfile.py index e4ef08ece551c..b8e4521ac3319 100644 --- a/recipes/tuplet/all/conanfile.py +++ b/recipes/tuplet/all/conanfile.py @@ -16,6 +16,7 @@ class TupletConan(ConanFile): homepage = "https://github.com/codeinred/tuplet" description = "A fast, simple tuple implementation that implements tuple as an aggregate" topics = ("tuple", "trivially-copyable", "modern-cpp") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -41,6 +42,9 @@ def _compilers_minimum_version(self): "apple-clang": "12" } + def layout(self): + basic_layout(self, src_folder="src") + def package_id(self): self.info.clear() @@ -62,12 +66,8 @@ def loose_lt_semver(v1, v2): raise ConanInvalidConfiguration( f"{self.ref} requires C++{self._min_cppstd} which your compiler ({compiler}-{version}) does not support") - def layout(self): - basic_layout(self, src_folder="src") - def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass