From c9cc47961fdcbbad009a47c227dadd57fd63ee7b Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 29 Oct 2023 02:06:56 +0900 Subject: [PATCH 01/34] (#20809) simdjson: add version 3.5.0 --- 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 7fb086ae208174..56fbdddd5d8d24 100644 --- a/recipes/simdjson/all/conandata.yml +++ b/recipes/simdjson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.5.0": + url: "https://github.com/simdjson/simdjson/archive/v3.5.0.tar.gz" + sha256: "942c9462b3c046e12b898cbf5e198f31a377ab40bb2bde5be98440d1f9212ee0" "3.3.0": url: "https://github.com/simdjson/simdjson/archive/v3.3.0.tar.gz" sha256: "a8c9feff2f19c3ff281d42f0b6b4b18f02236513b99229756fa9a1b14787a58a" diff --git a/recipes/simdjson/config.yml b/recipes/simdjson/config.yml index 6e192862adaada..cb5bc532f22a94 100644 --- a/recipes/simdjson/config.yml +++ b/recipes/simdjson/config.yml @@ -1,4 +1,6 @@ versions: + "3.5.0": + folder: all "3.3.0": folder: all "3.2.3": From 42ff5893441352c847d27d28a27336f82b03deee Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 29 Oct 2023 03:07:30 +0900 Subject: [PATCH 02/34] (#20808) highfive: update xtensor/0.24.6 --- recipes/highfive/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/highfive/all/conanfile.py b/recipes/highfive/all/conanfile.py index acad7b94ba402d..6057d00c5e0a9b 100644 --- a/recipes/highfive/all/conanfile.py +++ b/recipes/highfive/all/conanfile.py @@ -40,7 +40,7 @@ def requirements(self): if self.options.with_eigen: self.requires("eigen/3.4.0") if self.options.with_xtensor: - self.requires("xtensor/0.24.3") + self.requires("xtensor/0.24.6") if self.options.with_opencv: self.requires("opencv/4.5.5") From 216cf123db65da4d112f0f142325fe61f891d9cd Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 29 Oct 2023 11:16:58 +0900 Subject: [PATCH 03/34] (#20814) ada: add version 2.7.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 f881ad719a6c1a..c1ec0862fe264c 100644 --- a/recipes/ada/all/conandata.yml +++ b/recipes/ada/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.7.2": + url: "https://github.com/ada-url/ada/archive/v2.7.2.tar.gz" + sha256: "4dea9dd6a46695547da2dac3dc7254d32187cd35d3170179c0cdc0900090c025" "2.7.0": url: "https://github.com/ada-url/ada/archive/v2.7.0.tar.gz" sha256: "08646b8a41cd6367b282aab2c87c82e5ce4876078a0cbe0799af7e51e4358591" diff --git a/recipes/ada/config.yml b/recipes/ada/config.yml index 24235209b6d9f1..34d24384888699 100644 --- a/recipes/ada/config.yml +++ b/recipes/ada/config.yml @@ -1,4 +1,6 @@ versions: + "2.7.2": + folder: all "2.7.0": folder: all "2.6.10": From a4a9a6a37d78ceff9b532c7bcd54704513f59026 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 29 Oct 2023 11:46:46 +0900 Subject: [PATCH 04/34] (#20815) etl: add version 20.38.6 --- 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 63dae1f2c04ea2..b8a091482c8eff 100644 --- a/recipes/etl/all/conandata.yml +++ b/recipes/etl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "20.38.6": + url: "https://github.com/ETLCPP/etl/archive/20.38.6.tar.gz" + sha256: "95515f2229fe75393d18ee95548998a06e65a02acd5eedae5808dd34f8201462" "20.38.4": url: "https://github.com/ETLCPP/etl/archive/20.38.4.tar.gz" sha256: "4074583bacac17e7944030f099d18a4ea3591d5d58b8d8b85c1b7f080a3e9610" diff --git a/recipes/etl/config.yml b/recipes/etl/config.yml index 26484c5252d35a..31df60b3dd01f2 100644 --- a/recipes/etl/config.yml +++ b/recipes/etl/config.yml @@ -1,4 +1,6 @@ versions: + "20.38.6": + folder: all "20.38.4": folder: all "20.38.3": From 6d97ef636f4822e14bf82a057a471fc95cda3f7a Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 29 Oct 2023 12:16:28 +0900 Subject: [PATCH 05/34] (#20818) utfcpp: add version 4.0.1 --- 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 eb203bb4304de0..f78d79ff038b93 100644 --- a/recipes/utfcpp/all/conandata.yml +++ b/recipes/utfcpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.0.1": + url: "https://github.com/nemtrif/utfcpp/archive/v4.0.1.tar.gz" + sha256: "9014342a716258da00b97bf8c201a2edc4d72d2025cd8d62f0650ac627038f95" "4.0.0": url: "https://github.com/nemtrif/utfcpp/archive/v4.0.0.tar.gz" sha256: "ac44d9652aa2ee64d405c1705718f26b385337a9b8cf20bf2b2aac6435a16c1e" diff --git a/recipes/utfcpp/config.yml b/recipes/utfcpp/config.yml index 764dd2cbd11ba8..eabfdbf69a0cc3 100644 --- a/recipes/utfcpp/config.yml +++ b/recipes/utfcpp/config.yml @@ -1,4 +1,6 @@ versions: + "4.0.1": + folder: all "4.0.0": folder: all "3.2.5": From 9ec8cd3396a55a1c57d483468e09680e61ded066 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 29 Oct 2023 13:26:39 +0900 Subject: [PATCH 06/34] (#20820) jsoncons: add version 0.171.1 --- recipes/jsoncons/all/conandata.yml | 3 +++ recipes/jsoncons/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/jsoncons/all/conandata.yml b/recipes/jsoncons/all/conandata.yml index ee163c0bae4778..7c01d444fb0911 100644 --- a/recipes/jsoncons/all/conandata.yml +++ b/recipes/jsoncons/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.171.1": + url: "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.171.1.tar.gz" + sha256: "e84d71bcf7c78f21de8bbd88a8da6f6afa458f562f6b846ef51f1aa5697ad904" "0.171.0": url: "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.171.0.tar.gz" sha256: "0be840e984e30e70747c01e55669bbd4c49737cffc5852ccc5625dfe3dd38530" diff --git a/recipes/jsoncons/config.yml b/recipes/jsoncons/config.yml index 9830af3e7e5e02..f6d765635e5ebd 100644 --- a/recipes/jsoncons/config.yml +++ b/recipes/jsoncons/config.yml @@ -1,4 +1,6 @@ versions: + "0.171.1": + folder: "all" "0.171.0": folder: "all" "0.170.2": From 2776276761469d57ce7b6e9a52d083d3edf4e901 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 29 Oct 2023 14:37:03 +0900 Subject: [PATCH 07/34] (#20821) miniaudio: add version 0.11.18 --- recipes/miniaudio/all/conandata.yml | 3 +++ recipes/miniaudio/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/miniaudio/all/conandata.yml b/recipes/miniaudio/all/conandata.yml index f2557191152c72..44320f99355f11 100644 --- a/recipes/miniaudio/all/conandata.yml +++ b/recipes/miniaudio/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.11.18": + url: "https://github.com/mackron/miniaudio/archive/0.11.18.tar.gz" + sha256: "85ca916266d809b39902e180a6d16f82caea9c2ea1cea6d374413641b7ba48c3" "0.11.17": url: "https://github.com/mackron/miniaudio/archive/0.11.17.tar.gz" sha256: "4b139065f7068588b73d507d24e865060e942eb731f988ee5a8f1828155b9480" diff --git a/recipes/miniaudio/config.yml b/recipes/miniaudio/config.yml index b40e9165e25a04..314177c344ff64 100644 --- a/recipes/miniaudio/config.yml +++ b/recipes/miniaudio/config.yml @@ -1,4 +1,6 @@ versions: + "0.11.18": + folder: all "0.11.17": folder: all "0.11.16": From ca9c53d2297887caa681be113d0fbdd63f894cc9 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 29 Oct 2023 15:06:29 +0900 Subject: [PATCH 08/34] (#20822) s2n: add version 1.3.55 --- 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 e8314a2d5ee351..de2f57abb815c9 100644 --- a/recipes/s2n/all/conandata.yml +++ b/recipes/s2n/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.55": + url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.3.55.tar.gz" + sha256: "3b4d51d08326757440a7a134dd4d73c904b700d64837aa7fec0aca908b70fd9b" "1.3.52": url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.3.52.tar.gz" sha256: "c8ae02ae427763dcffe10d211ed7a2433803affd9aa5836951ef972c53db0120" diff --git a/recipes/s2n/config.yml b/recipes/s2n/config.yml index c5300cb2421564..794b8718cbfe93 100644 --- a/recipes/s2n/config.yml +++ b/recipes/s2n/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.55": + folder: all "1.3.52": folder: all "1.3.50": From 8ee8273755a2d10052c7cd332260d3f1b8d3bdd8 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 30 Oct 2023 04:02:13 +0900 Subject: [PATCH 09/34] (#20829) asio: add version 1.28.2 --- 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 d8865c47b5bf0d..9f0189b8cd3f0c 100644 --- a/recipes/asio/all/conandata.yml +++ b/recipes/asio/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.28.2": + url: "https://github.com/chriskohlhoff/asio/archive/asio-1-28-2.tar.gz" + sha256: "5705a0e403017eba276625107160498518838064a6dd7fd8b00b2e30c0ffbdee" "1.28.1": url: "https://github.com/chriskohlhoff/asio/archive/asio-1-28-1.tar.gz" sha256: "5ff6111ec8cbe73a168d997c547f562713aa7bd004c5c02326f0e9d579a5f2ce" diff --git a/recipes/asio/config.yml b/recipes/asio/config.yml index 33c8893e89fa5b..7bf4410d24d456 100644 --- a/recipes/asio/config.yml +++ b/recipes/asio/config.yml @@ -1,4 +1,6 @@ versions: + "1.28.2": + folder: all "1.28.1": folder: all "1.28.0": From 99e3c4946e88558ae75a65c58be41699c9f8fb64 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 30 Oct 2023 04:36:43 +0900 Subject: [PATCH 10/34] (#20828) cassandra-cpp-driver: add version 2.17.1 --- 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 148e40f2a763f6..169437d0e897cf 100644 --- a/recipes/cassandra-cpp-driver/all/conandata.yml +++ b/recipes/cassandra-cpp-driver/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.17.1": + url: "https://github.com/datastax/cpp-driver/archive/2.17.1.tar.gz" + sha256: "53b4123aad59b39f2da0eb0ce7fe0e92559f7bba0770b2e958254f17bffcd7cf" "2.17.0": url: "https://github.com/datastax/cpp-driver/archive/2.17.0.tar.gz" sha256: "075af6a6920b0a8b12e37b8e5aa335b0c7919334aa1b451642668e6e37c5372f" @@ -9,6 +12,20 @@ sources: url: "https://github.com/datastax/cpp-driver/archive/2.15.3.tar.gz" sha256: "eccb53c5151621c3b647fc83781a542cfb93e76687b4178ebce418fc4c817293" patches: + "2.17.1": + - 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.17.0": - 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 7062b1458afe22..c8b1c8ef4703a6 100644 --- a/recipes/cassandra-cpp-driver/config.yml +++ b/recipes/cassandra-cpp-driver/config.yml @@ -1,4 +1,6 @@ versions: + "2.17.1": + folder: all "2.17.0": folder: all "2.16.2": From 845a32c24ab8c75436230230ddc20614736b7928 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 30 Oct 2023 11:53:40 +0200 Subject: [PATCH 11/34] (#18863) cryptopp-pem: migrate to Conan v2 * cryptopp-pem: migrate to Conan v2 * cryptopp-pem: restore VirtualRunEnv in test_package * cryptopp-pem: transitive_libs=True * cryptopp-pem: fix_apple_shared_install_name() * license fixes from 20221 * cryptopp-pem: fix license download * cryptopp-pem: adjust cryptopp includes only in public headers * cryptopp-pem: upgrade cryptopp dependency to the latest one * use cryptopp same version * raise ConanInvalidConfiguration --------- Co-authored-by: czoido --- recipes/cryptopp-pem/all/CMakeLists.txt | 11 -- recipes/cryptopp-pem/all/conandata.yml | 5 - recipes/cryptopp-pem/all/conanfile.py | 158 +++++++++--------- .../use-cryptopp-include-from-conan.patch | 133 --------------- .../all/test_package/CMakeLists.txt | 7 +- .../all/test_package/conanfile.py | 19 ++- .../all/test_v1_package/CMakeLists.txt | 8 + .../all/test_v1_package/conanfile.py | 17 ++ 8 files changed, 125 insertions(+), 233 deletions(-) delete mode 100644 recipes/cryptopp-pem/all/CMakeLists.txt create mode 100644 recipes/cryptopp-pem/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/cryptopp-pem/all/test_v1_package/conanfile.py diff --git a/recipes/cryptopp-pem/all/CMakeLists.txt b/recipes/cryptopp-pem/all/CMakeLists.txt deleted file mode 100644 index f36a181c680d32..00000000000000 --- a/recipes/cryptopp-pem/all/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -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() - -add_subdirectory(source_subfolder) diff --git a/recipes/cryptopp-pem/all/conandata.yml b/recipes/cryptopp-pem/all/conandata.yml index 47bad604295539..d25975ebafd938 100644 --- a/recipes/cryptopp-pem/all/conandata.yml +++ b/recipes/cryptopp-pem/all/conandata.yml @@ -9,12 +9,7 @@ sources: patches: "8.2.0": - patch_file: "patches/fix-cmake.patch" - base_path: "source_subfolder" - patch_file: "patches/rename-output-library.patch" - base_path: "source_subfolder" - patch_file: "patches/link-to-cryptopp.patch" - base_path: "source_subfolder" - patch_file: "patches/remove-cryptopp-sources-from-cmake.patch" - base_path: "source_subfolder" - patch_file: "patches/use-cryptopp-include-from-conan.patch" - base_path: "source_subfolder" diff --git a/recipes/cryptopp-pem/all/conanfile.py b/recipes/cryptopp-pem/all/conanfile.py index 12b7d953de0b62..b4e39431490764 100644 --- a/recipes/cryptopp-pem/all/conanfile.py +++ b/recipes/cryptopp-pem/all/conanfile.py @@ -1,20 +1,30 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os import shutil import textwrap -required_conan_version = ">=1.43.0" +from conan import ConanFile +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.microsoft import is_msvc +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, collect_libs, export_conandata_patches, get, replace_in_file, rmdir, save, download, load +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" class CryptoPPPEMConan(ConanFile): name = "cryptopp-pem" + description = ("The PEM Pack is a partial implementation of message encryption " + "which allows you to read and write PEM encoded keys and parameters, " + "including encrypted private keys.") + # TODO: Fix license syntax, this is not proper spdx terminology + license = "DocumentRef-README.md:LicenseRef-Cryptopp-Pem-PublicDomain" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.cryptopp.com/wiki/PEM_Pack" - license = "Unlicense" - description = "The PEM Pack is a partial implementation of message encryption which allows you to read and write PEM encoded keys and parameters, including encrypted private keys." topics = ("cryptopp", "crypto", "cryptographic", "security", "PEM") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -25,21 +35,8 @@ class CryptoPPPEMConan(ConanFile): "fPIC": True, } - generators = "cmake", "cmake_find_package" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - 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": @@ -47,66 +44,81 @@ 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(f"cryptopp/{self.version}", transitive_headers=True, transitive_libs=True) + + def validate(self): + if is_msvc(self) and self.options.shared: + raise ConanInvalidConfiguration(f"{self.ref} does not support shared library on Windows.") + # look at https://github.com/conan-io/conan-center-index/pull/18863#issuecomment-1779940892 def source(self): - suffix = "CRYPTOPP_{}".format(self.version.replace(".", "_")) + suffix = f"CRYPTOPP_{self.version.replace('.', '_')}" # Get sources - tools.get(**self.conan_data["sources"][self.version]["source"], - strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version]["source"], strip_root=True) # Get CMakeLists - tools.get(**self.conan_data["sources"][self.version]["cmake"]) + get(self, **self.conan_data["sources"][self.version]["cmake"]) src_folder = os.path.join(self.source_folder, "cryptopp-cmake-" + suffix) - dst_folder = os.path.join(self.source_folder, self._source_subfolder) - shutil.move(os.path.join(src_folder, "CMakeLists.txt"), os.path.join(dst_folder, "CMakeLists.txt")) - shutil.move(os.path.join(src_folder, "cryptopp-config.cmake"), os.path.join(dst_folder, "cryptopp-config.cmake")) - tools.rmdir(src_folder) - - # Get license - tools.download("https://unlicense.org/UNLICENSE", "UNLICENSE", sha256="7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c") + shutil.move(os.path.join(src_folder, "CMakeLists.txt"), os.path.join(self.source_folder, "CMakeLists.txt")) + shutil.move(os.path.join(src_folder, "cryptopp-config.cmake"), os.path.join(self.source_folder, "cryptopp-config.cmake")) + rmdir(self, src_folder) + # LICENSE not packaged with release tar + download(self, "https://raw.githubusercontent.com/noloader/cryptopp-pem/0cfc1a8590f2395cd5b976be0e95e10de9a15a92/README.md", + os.path.join(self.source_folder, "LICENSE"), + sha256="efa5140027e396a3844f9f48d65e014c9a710939ac02e22d32c33a51e1750eef") + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.variables["BUILD_STATIC"] = not self.options.shared + tc.variables["BUILD_SHARED"] = self.options.shared + tc.variables["BUILD_TESTING"] = False + tc.variables["BUILD_DOCUMENTATION"] = False + tc.variables["USE_INTERMEDIATE_OBJECTS_TARGET"] = False + tc.variables["DISABLE_ASM"] = True + if self.settings.os == "Android": + tc.variables["CRYPTOPP_NATIVE_ARCH"] = True + if is_apple_os(self) and self.settings.arch == "armv8" and Version(self.version) <= "8.4.0": + tc.variables["CMAKE_CXX_FLAGS"] = "-march=armv8-a" + tc.generate() + + # cryptopp-pem expects cryptopp headers to be without a cryptopp/ prefix + cryptopp_info = self.dependencies["cryptopp"].cpp_info.components["libcryptopp"] + cryptopp_info.includedirs.append(os.path.join(self.dependencies["cryptopp"].package_folder, "include", "cryptopp")) + deps = CMakeDeps(self) + deps.generate() def _patch_sources(self): if self.settings.os == "Android" and "ANDROID_NDK_HOME" in os.environ: - shutil.copyfile(os.path.join(tools.get_env("ANDROID_NDK_HOME"), "sources", "android", "cpufeatures", "cpu-features.h"), - os.path.join(self._source_subfolder, "cpu-features.h")) - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) + shutil.copyfile( + os.path.join(os.environ.get("ANDROID_NDK_HOME"), "sources", "android", "cpufeatures", "cpu-features.h"), + os.path.join(self.source_folder, "cpu-features.h")) + apply_conandata_patches(self) # Honor fPIC option - tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), - "SET(CMAKE_POSITION_INDEPENDENT_CODE 1)", "") - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["BUILD_STATIC"] = not self.options.shared - self._cmake.definitions["BUILD_SHARED"] = self.options.shared - self._cmake.definitions["BUILD_TESTING"] = False - self._cmake.definitions["BUILD_DOCUMENTATION"] = False - self._cmake.definitions["USE_INTERMEDIATE_OBJECTS_TARGET"] = False - self._cmake.definitions["DISABLE_ASM"] = True - if self.settings.os == "Android": - self._cmake.definitions["CRYPTOPP_NATIVE_ARCH"] = True - if self.settings.os == "Macos" and self.settings.arch == "armv8" and tools.Version(self.version) <= "8.4.0": - self._cmake.definitions["CMAKE_CXX_FLAGS"] = "-march=armv8-a" - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake - - def requirements(self): - self.requires("cryptopp/" + self.version) + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "SET(CMAKE_POSITION_INDEPENDENT_CODE 1)", "") - def build(self): + def build(self): self._patch_sources() - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() + def _extract_license(self): + readme = load(self, os.path.join(self.source_folder, "LICENSE"),) + return readme[readme.find("## License"):] + def package(self): - self.copy(pattern="UNLICENSE", dst="licenses") - cmake = self._configure_cmake() + save(self, os.path.join(self.package_folder, "licenses", "LICENSE"), self._extract_license()) + 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")) # 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), @@ -115,31 +127,30 @@ def package(self): "cryptopp-pem-static": "cryptopp-pem::cryptopp-pem-static" } ) + fix_apple_shared_install_name(self) - @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): cmake_target = "cryptopp-pem-shared" if self.options.shared else "cryptopp-pem-static" - self.cpp_info.set_property("cmake_file_name", "cryptopp-pem") - self.cpp_info.set_property("cmake_target_name", cmake_target) + self.cpp_info.set_property("cmake_target_aliases", [cmake_target]) self.cpp_info.set_property("pkg_config_name", "libcryptopp-pem") # TODO: back to global scope once cmake_find_package* generators removed - self.cpp_info.components["libcryptopp-pem"].libs = tools.collect_libs(self) + self.cpp_info.components["libcryptopp-pem"].libs = collect_libs(self) if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["libcryptopp-pem"].system_libs = ["pthread", "m"] elif self.settings.os == "SunOS": @@ -148,7 +159,6 @@ def package_info(self): self.cpp_info.components["libcryptopp-pem"].system_libs = ["ws2_32"] # TODO: to remove in conan v2 once cmake_find_package* & pkg_config generators removed - self.cpp_info.names["pkg_config"] = "libcryptopp-pem" self.cpp_info.components["libcryptopp-pem"].names["cmake_find_package"] = cmake_target self.cpp_info.components["libcryptopp-pem"].names["cmake_find_package_multi"] = cmake_target self.cpp_info.components["libcryptopp-pem"].build_modules["cmake_find_package"] = [self._module_file_rel_path] @@ -156,6 +166,4 @@ def package_info(self): self.cpp_info.components["libcryptopp-pem"].set_property("cmake_target_name", cmake_target) self.cpp_info.components["libcryptopp-pem"].set_property("pkg_config_name", "libcryptopp-pem") - self.cpp_info.components["libcryptopp-pem"].requires = [ - "cryptopp::cryptopp", - ] + self.cpp_info.components["libcryptopp-pem"].requires = ["cryptopp::cryptopp"] diff --git a/recipes/cryptopp-pem/all/patches/use-cryptopp-include-from-conan.patch b/recipes/cryptopp-pem/all/patches/use-cryptopp-include-from-conan.patch index e7c0d678e73638..3ca6e7dc9287cb 100644 --- a/recipes/cryptopp-pem/all/patches/use-cryptopp-include-from-conan.patch +++ b/recipes/cryptopp-pem/all/patches/use-cryptopp-include-from-conan.patch @@ -21,23 +21,6 @@ NAMESPACE_BEGIN(CryptoPP) ---- a/pem_common.cpp -+++ b/pem_common.cpp -@@ -6,10 +6,10 @@ - // http://www.cryptopp.com/wiki/PEM_Pack - /////////////////////////////////////////////////////////////////////////// - --#include "cryptlib.h" --#include "secblock.h" --#include "base64.h" --#include "osrng.h" -+#include -+#include -+#include -+#include - - #include - #include --- a/pem_common.h +++ b/pem_common.h @@ -10,9 +10,10 @@ @@ -54,119 +37,3 @@ #include "pem.h" #include ---- a/pem_read.cpp -+++ b/pem_read.cpp -@@ -10,27 +10,27 @@ - #include - #include - --#include "cryptlib.h" --#include "secblock.h" --#include "nbtheory.h" --#include "gfpcrypt.h" --#include "camellia.h" --#include "smartptr.h" --#include "filters.h" --#include "base64.h" --#include "queue.h" --#include "modes.h" --#include "asn.h" --#include "aes.h" --#include "idea.h" --#include "hex.h" -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include - - #include "pem.h" - #include "pem_common.h" - - #define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1 --#include "des.h" --#include "md5.h" -+#include -+#include - - ////////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////////// ---- a/pem_test.cxx -+++ b/pem_test.cxx -@@ -4,13 +4,14 @@ - #include - #include - --#include "cryptlib.h" --#include "integer.h" --#include "eccrypto.h" --#include "osrng.h" --#include "files.h" --#include "rsa.h" --#include "dsa.h" -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ - #include "pem.h" - - int main(int argc, char* argv[]) ---- a/pem_write.cpp -+++ b/pem_write.cpp -@@ -10,27 +10,27 @@ - #include - #include - --#include "cryptlib.h" --#include "secblock.h" --#include "camellia.h" --#include "smartptr.h" --#include "filters.h" --#include "base64.h" --#include "files.h" --#include "queue.h" --#include "modes.h" --#include "osrng.h" --#include "asn.h" --#include "aes.h" --#include "idea.h" --#include "hex.h" -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include - - #include "pem.h" - #include "pem_common.h" - - #define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1 --#include "des.h" --#include "md5.h" -+#include -+#include - - ////////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////////// diff --git a/recipes/cryptopp-pem/all/test_package/CMakeLists.txt b/recipes/cryptopp-pem/all/test_package/CMakeLists.txt index f9ceeed7804cbd..fdb362acfd0cf5 100644 --- a/recipes/cryptopp-pem/all/test_package/CMakeLists.txt +++ b/recipes/cryptopp-pem/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(TARGETS) +find_package(cryptopp-pem REQUIRED CONFIG) find_package(cryptopp-pem) diff --git a/recipes/cryptopp-pem/all/test_package/conanfile.py b/recipes/cryptopp-pem/all/test_package/conanfile.py index 19e6a0c06e3d81..ef5d7042163ecc 100644 --- a/recipes/cryptopp-pem/all/test_package/conanfile.py +++ b/recipes/cryptopp-pem/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,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/cryptopp-pem/all/test_v1_package/CMakeLists.txt b/recipes/cryptopp-pem/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/cryptopp-pem/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/cryptopp-pem/all/test_v1_package/conanfile.py b/recipes/cryptopp-pem/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..38f4483872d47f --- /dev/null +++ b/recipes/cryptopp-pem/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 c1228638aec2b1ad1749dc6754f52d13a058c125 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Mon, 30 Oct 2023 11:07:29 +0100 Subject: [PATCH 12/34] (#20834) glib: add version 2.78.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 2288ee67fc7c68..941a0f3c6d91ba 100644 --- a/recipes/glib/all/conandata.yml +++ b/recipes/glib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.78.1": + url: "https://download.gnome.org/sources/glib/2.78/glib-2.78.1.tar.xz" + sha256: "915bc3d0f8507d650ead3832e2f8fb670fce59aac4d7754a7dab6f1e6fed78b2" "2.78.0": url: "https://download.gnome.org/sources/glib/2.78/glib-2.78.0.tar.xz" sha256: "44eaab8b720877ce303c5540b657b126f12dc94972d9880b52959f43fb537b30" diff --git a/recipes/glib/config.yml b/recipes/glib/config.yml index da0b056644c24d..e77e0bdfd8b196 100644 --- a/recipes/glib/config.yml +++ b/recipes/glib/config.yml @@ -1,4 +1,6 @@ versions: + "2.78.1": + folder: all "2.78.0": folder: all "2.77.3": From 5cdd2ac7bb836dc557f74f73fe97a65d630e26ce Mon Sep 17 00:00:00 2001 From: Carlos O'Ryan Date: Mon, 30 Oct 2023 08:04:52 -0400 Subject: [PATCH 13/34] (#20721) [google-cloud-cpp] bump requirements and other fixes * [google-cloud-cpp] bump requirements and other fixes Several requirements need version bumps. Where possible I chose version ranges over pinning specific versions. I had to backport fixes for MSVC. I am only guessing, but it seems the toolchain changed in the CI system and now spelling `||` as `or` results in build errors. I also disabled `-Werror` because the code in `v2.5.0` has warnings with newer toolchains. This is to be expected, and that is why the project no longer enables `-Werror` by default. * Require host version for gRPC * Starting with v2.12.0 we need a different fix on macOS * Address review comments --- recipes/google-cloud-cpp/2.x/conandata.yml | 4 ++ recipes/google-cloud-cpp/2.x/conanfile.py | 32 ++++++++----- .../006-cannot-use-or-with-windows.patch | 45 +++++++++++++++++++ 3 files changed, 69 insertions(+), 12 deletions(-) create mode 100644 recipes/google-cloud-cpp/2.x/patches/2.5.0/006-cannot-use-or-with-windows.patch diff --git a/recipes/google-cloud-cpp/2.x/conandata.yml b/recipes/google-cloud-cpp/2.x/conandata.yml index d9339e05c5ec41..f9eb9c4dbc523f 100644 --- a/recipes/google-cloud-cpp/2.x/conandata.yml +++ b/recipes/google-cloud-cpp/2.x/conandata.yml @@ -22,6 +22,10 @@ patches: patch_source: https://github.com/googleapis/google-cloud-cpp/pull/10636 patch_description: "Fix problems with INTERFACE proto libraries" patch_type: backport + - patch_file: "patches/2.5.0/006-cannot-use-or-with-windows.patch" + patch_source: https://github.com/googleapis/google-cloud-cpp/pull/10612 + patch_description: "MSVC does not like `or` spelling for `||`" + patch_type: backport "2.12.0": - patch_file: "patches/2.12.0/001-use-conan-msvc-runtime.patch" patch_description: "Let Conan select the MSVC runtime" diff --git a/recipes/google-cloud-cpp/2.x/conanfile.py b/recipes/google-cloud-cpp/2.x/conanfile.py index 810fc35bc2f60a..a3283204d6ead4 100644 --- a/recipes/google-cloud-cpp/2.x/conanfile.py +++ b/recipes/google-cloud-cpp/2.x/conanfile.py @@ -138,23 +138,26 @@ def source(self): get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) def requirements(self): - self.requires("protobuf/3.21.9", transitive_headers=True) - self.requires("grpc/1.50.1", transitive_headers=True) - self.requires("nlohmann_json/3.10.0") - self.requires("crc32c/1.1.1") - self.requires("abseil/20220623.0", transitive_headers=True) - self.requires("libcurl/7.88.1") + # These must remain pinned in conan index. + self.requires("protobuf/3.21.12", transitive_headers=True) + self.requires("abseil/20230125.3", transitive_headers=True) + self.requires("grpc/1.54.3", transitive_headers=True) + self.requires("nlohmann_json/3.11.2") + self.requires("crc32c/1.1.2") + # The rest require less pinning. + self.requires("libcurl/[>=7.78 <9]") self.requires("openssl/[>=1.1 <4]") - self.requires("zlib/1.2.13") + self.requires("zlib/[>=1.2.11 <2]") def build_requirements(self): - # For the grpc-cpp-plugin executable - self.tool_requires("grpc/1.50.1") + # For the `grpc-cpp-plugin` executable, and indirectly `protoc` + self.tool_requires("grpc/") def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_TESTING"] = False tc.variables["GOOGLE_CLOUD_CPP_ENABLE_MACOS_OPENSSL_CHECK"] = False + tc.variables["GOOGLE_CLOUD_CPP_ENABLE_WERROR"] = False tc.variables["GOOGLE_CLOUD_CPP_ENABLE"] = ",".join(self._components()) tc.generate() VirtualRunEnv(self).generate(scope="build") @@ -170,9 +173,14 @@ def _patch_sources(self): # https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/RuntimeProtections/RuntimeProtections.html settings_build = getattr(self, "settings_build", self.settings) if settings_build.os == "Macos": - replace_in_file(self, os.path.join(self.source_folder, "cmake/CompileProtos.cmake"), - "$", - '${CMAKE_COMMAND} -E env "DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}" $') + if Version(self.version) < '2.12.0': + replace_in_file(self, os.path.join(self.source_folder, "cmake/CompileProtos.cmake"), + "$", + '${CMAKE_COMMAND} -E env "DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}" $') + else: + replace_in_file(self, os.path.join(self.source_folder, "cmake/CompileProtos.cmake"), + "${Protobuf_PROTOC_EXECUTABLE} ARGS", + '${CMAKE_COMMAND} -E env "DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}" ${Protobuf_PROTOC_EXECUTABLE}') def build(self): self._patch_sources() diff --git a/recipes/google-cloud-cpp/2.x/patches/2.5.0/006-cannot-use-or-with-windows.patch b/recipes/google-cloud-cpp/2.x/patches/2.5.0/006-cannot-use-or-with-windows.patch new file mode 100644 index 00000000000000..ef18553443bdaf --- /dev/null +++ b/recipes/google-cloud-cpp/2.x/patches/2.5.0/006-cannot-use-or-with-windows.patch @@ -0,0 +1,45 @@ +diff --git a/google/cloud/internal/oauth2_compute_engine_credentials.cc b/google/cloud/internal/oauth2_compute_engine_credentials.cc +index 9cb45a6..5c6b45d 100644 +--- a/google/cloud/internal/oauth2_compute_engine_credentials.cc ++++ b/google/cloud/internal/oauth2_compute_engine_credentials.cc +@@ -68,8 +68,8 @@ StatusOr ParseComputeEngineRefreshResponse( + auto payload = rest_internal::ReadAll(std::move(response).ExtractPayload()); + if (!payload.ok()) return payload.status(); + auto access_token = nlohmann::json::parse(*payload, nullptr, false); +- if (access_token.is_discarded() || access_token.count("access_token") == 0 or +- access_token.count("expires_in") == 0 or ++ if (access_token.is_discarded() || access_token.count("access_token") == 0 || ++ access_token.count("expires_in") == 0 || + access_token.count("token_type") == 0) { + auto error_payload = + *payload + +diff --git a/google/cloud/storage/oauth2/compute_engine_credentials.cc b/google/cloud/storage/oauth2/compute_engine_credentials.cc +index 365273a..92e631c 100644 +--- a/google/cloud/storage/oauth2/compute_engine_credentials.cc ++++ b/google/cloud/storage/oauth2/compute_engine_credentials.cc +@@ -36,8 +36,8 @@ ParseComputeEngineRefreshResponse( + // Response should have the attributes "access_token", "expires_in", and + // "token_type". + auto access_token = nlohmann::json::parse(response.payload, nullptr, false); +- if (!access_token.is_object() || access_token.count("access_token") == 0 or +- access_token.count("expires_in") == 0 or ++ if (!access_token.is_object() || access_token.count("access_token") == 0 || ++ access_token.count("expires_in") == 0 || + access_token.count("token_type") == 0) { + auto payload = + response.payload + +diff --git a/google/cloud/storage/oauth2/service_account_credentials.cc b/google/cloud/storage/oauth2/service_account_credentials.cc +index 4c600db..34c4e72 100644 +--- a/google/cloud/storage/oauth2/service_account_credentials.cc ++++ b/google/cloud/storage/oauth2/service_account_credentials.cc +@@ -85,8 +85,8 @@ ParseServiceAccountRefreshResponse( + storage::internal::HttpResponse const& response, + std::chrono::system_clock::time_point now) { + auto access_token = nlohmann::json::parse(response.payload, nullptr, false); +- if (access_token.is_discarded() || access_token.count("access_token") == 0 or +- access_token.count("expires_in") == 0 or ++ if (access_token.is_discarded() || access_token.count("access_token") == 0 || ++ access_token.count("expires_in") == 0 || + access_token.count("token_type") == 0) { + auto payload = + response.payload + From f414367ef4a2b65d06a086f4233dab5e3730a4eb Mon Sep 17 00:00:00 2001 From: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com> Date: Mon, 30 Oct 2023 08:26:05 -0400 Subject: [PATCH 14/34] (#20284) cpptrace: Add recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Try to add cpptrace * Update recipes/cpptrace/all/conanfile.py Co-authored-by: Rubén Rincón Blanco * Update recipes/cpptrace/all/conanfile.py Co-authored-by: Rubén Rincón Blanco * Update recipes/cpptrace/all/conanfile.py Co-authored-by: Rubén Rincón Blanco * Lint fixes * Ruben comments * fixes * Fixes * Update recipes/cpptrace/all/conanfile.py * Add period to end of description * Update * Apply suggestions from code review * Apply suggestions from code review * Build static library properly * oops * Try introducing some patches * Move CPPTRACE_STATIC to generate method * Fix -Wnonnull-compare issue * A couple additional patches, should fix gcc 5 * Try to use find_package for zlib * Quick fixes * Patch should now apply * Update zlib findpackage * Update zlib handling * Update zlib handling again * Update description * Bump to v0.2.1 and remove accumulated patch file * Add patch * Try to fix build * Try to fix windows shared test * Handle dll placement better * Use libdwarf from conan * Cleanup and fixes for conan * Add bug fix patch_source * Removed unused import --------- Co-authored-by: Rubén Rincón Blanco --- recipes/cpptrace/all/conandata.yml | 15 +++ recipes/cpptrace/all/conanfile.py | 107 ++++++++++++++++++ .../all/patches/0.2.1/0001-to_uintptr.patch | 13 +++ .../patches/0.2.1/0002-conan-libdwarf.patch | 62 ++++++++++ .../cpptrace/all/test_package/CMakeLists.txt | 10 ++ .../cpptrace/all/test_package/conanfile.py | 26 +++++ .../all/test_package/test_package.cpp | 9 ++ recipes/cpptrace/config.yml | 4 + 8 files changed, 246 insertions(+) create mode 100644 recipes/cpptrace/all/conandata.yml create mode 100644 recipes/cpptrace/all/conanfile.py create mode 100644 recipes/cpptrace/all/patches/0.2.1/0001-to_uintptr.patch create mode 100644 recipes/cpptrace/all/patches/0.2.1/0002-conan-libdwarf.patch create mode 100644 recipes/cpptrace/all/test_package/CMakeLists.txt create mode 100644 recipes/cpptrace/all/test_package/conanfile.py create mode 100644 recipes/cpptrace/all/test_package/test_package.cpp create mode 100644 recipes/cpptrace/config.yml diff --git a/recipes/cpptrace/all/conandata.yml b/recipes/cpptrace/all/conandata.yml new file mode 100644 index 00000000000000..df698c75da843d --- /dev/null +++ b/recipes/cpptrace/all/conandata.yml @@ -0,0 +1,15 @@ +sources: + # Newer versions at the top + "0.2.1": + url: + - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.2.1.tar.gz" + sha256: "3184f404c61b6b8ba6fe7c64fc40d1c3d6d87df59bcacf1845d846101bc22f9a" +patches: + "0.2.1": + - patch_file: "patches/0.2.1/0001-to_uintptr.patch" + patch_type: "bugfix" + patch_source: "https://github.com/jeremy-rifkin/cpptrace/commit/bda3e2b169796f2e9c7e751b27306aac6b4a7c26" + patch_description: "Fix for to_uintptr" + - patch_file: "patches/0.2.1/0002-conan-libdwarf.patch" + patch_type: "conan" + patch_description: "Tweaks to use libdwarf provided by conan" diff --git a/recipes/cpptrace/all/conanfile.py b/recipes/cpptrace/all/conanfile.py new file mode 100644 index 00000000000000..be00c8ea4cc5a8 --- /dev/null +++ b/recipes/cpptrace/all/conanfile.py @@ -0,0 +1,107 @@ +from conan import ConanFile +from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc +from conan.tools.files import get, copy, rm, rmdir +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 +import os + +required_conan_version = ">=1.53.0" + +class CpptraceConan(ConanFile): + name = "cpptrace" + description = "Simple, portable, and self-contained stacktrace library for C++11 and newer " + license = ("MIT", "LGPL-2.1-only", "BSD-2-Clause-Views") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/jeremy-rifkin/cpptrace" + topics = ("stacktrace", "backtrace", "stack-trace", "back-trace", "trace", "utilities", "error-handling") + 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 11 + + 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("libdwarf/0.8.0") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + check_min_vs(self, 191) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def export_sources(self): + export_conandata_patches(self) + + def generate(self): + tc = CMakeToolchain(self) + if is_msvc(self): + tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self) + if not self.options.shared: + tc.variables["CPPTRACE_STATIC"] = True + tc.variables["CPPTRACE_USE_SYSTEM_LIBDWARF"] = True + 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, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + + if self.settings.os == "Windows" and self.options.shared: + copy(self, "*.dll", src=self.build_folder, dst=os.path.join(self.package_folder, "bin"), keep_path=False) + + 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, "share")) + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + + def package_info(self): + self.cpp_info.libs = ["cpptrace"] + + self.cpp_info.set_property("cmake_module_file_name", "cpptrace") + self.cpp_info.set_property("cmake_module_target_name", "cpptrace") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + self.cpp_info.system_libs.append("pthread") + self.cpp_info.system_libs.append("dl") + if self.settings.os == "Windows": + self.cpp_info.system_libs.append("dbghelp") + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.filenames["cmake_find_package"] = "CPPTRACE" + self.cpp_info.filenames["cmake_find_package_multi"] = "cpptrace" + self.cpp_info.names["cmake_find_package"] = "CPPTRACE" + self.cpp_info.names["cmake_find_package_multi"] = "cpptrace" diff --git a/recipes/cpptrace/all/patches/0.2.1/0001-to_uintptr.patch b/recipes/cpptrace/all/patches/0.2.1/0001-to_uintptr.patch new file mode 100644 index 00000000000000..5268df0edea762 --- /dev/null +++ b/recipes/cpptrace/all/patches/0.2.1/0001-to_uintptr.patch @@ -0,0 +1,13 @@ +diff --git src/platform/utils.hpp src/platform/utils.hpp +index 51395fe..7853960 100644 +--- src/platform/utils.hpp ++++ src/platform/utils.hpp +@@ -334,7 +334,7 @@ namespace detail { + return static_cast(t); + } + template +- unsigned long long to_uintptr(T t) { ++ uintptr_t to_uintptr(T t) { + return static_cast(t); + } + diff --git a/recipes/cpptrace/all/patches/0.2.1/0002-conan-libdwarf.patch b/recipes/cpptrace/all/patches/0.2.1/0002-conan-libdwarf.patch new file mode 100644 index 00000000000000..70f3a48f3de5a7 --- /dev/null +++ b/recipes/cpptrace/all/patches/0.2.1/0002-conan-libdwarf.patch @@ -0,0 +1,62 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ce5dbcf..085a1aa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -218,7 +218,6 @@ + add_library(cpptrace STATIC ${sources} include/cpptrace/cpptrace.hpp) + else() + add_library(cpptrace SHARED ${sources} include/cpptrace/cpptrace.hpp) +- set_property(TARGET cpptrace PROPERTY POSITION_INDEPENDENT_CODE ON) + endif() + + target_include_directories( +@@ -298,7 +298,7 @@ + target_compile_definitions(cpptrace PUBLIC CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF) + if(CPPTRACE_USE_SYSTEM_LIBDWARF) + find_package(libdwarf REQUIRED) +- target_link_libraries(cpptrace PRIVATE libdwarf) ++ target_link_libraries(cpptrace PRIVATE libdwarf::libdwarf) + else() + add_subdirectory(bundled/libdwarf) + target_link_libraries(cpptrace PRIVATE dwarf) +@@ -379,7 +379,7 @@ + include(CMakePackageConfigHelpers) + + if(CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF) +- set(CPPTRACE_STATIC_EXPORT_TARGETS cpptrace dwarf) ++ set(CPPTRACE_STATIC_EXPORT_TARGETS cpptrace) + else() + set(CPPTRACE_STATIC_EXPORT_TARGETS cpptrace) + endif() + +diff --git a/src/symbols/symbols_with_libdwarf.cpp b/src/symbols/symbols_with_libdwarf.cpp +index ce5dbcf..085a1aa 100644 +--- a/src/symbols/symbols_with_libdwarf.cpp ++++ b/src/symbols/symbols_with_libdwarf.cpp +@@ -20,8 +20,8 @@ + #include + #include + +-#include +-#include ++#include ++#include + + // It's been tricky to piece together how to handle all this dwarf stuff. Some resources I've used are + // https://www.prevanders.net/libdwarf.pdf + +diff --git a/src/platform/dwarf.hpp b/src/platform/dwarf.hpp +index ce5dbcf..085a1aa 100644 +--- a/src/platform/dwarf.hpp ++++ b/src/platform/dwarf.hpp +@@ -9,8 +9,8 @@ + #include + #include + +-#include +-#include ++#include ++#include + + namespace cpptrace { + namespace detail { diff --git a/recipes/cpptrace/all/test_package/CMakeLists.txt b/recipes/cpptrace/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..413751877cee83 --- /dev/null +++ b/recipes/cpptrace/all/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package CXX) + +find_package(cpptrace REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) + +target_link_libraries(${PROJECT_NAME} PRIVATE cpptrace::cpptrace) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/cpptrace/all/test_package/conanfile.py b/recipes/cpptrace/all/test_package/conanfile.py new file mode 100644 index 00000000000000..1e7a9ff877d531 --- /dev/null +++ b/recipes/cpptrace/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 + +# 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/cpptrace/all/test_package/test_package.cpp b/recipes/cpptrace/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..27e7cbc21a5cbf --- /dev/null +++ b/recipes/cpptrace/all/test_package/test_package.cpp @@ -0,0 +1,9 @@ +#include +#include +#include "cpptrace/cpptrace.hpp" + +int main() { + cpptrace::generate_trace().print(); + + return EXIT_SUCCESS; +} diff --git a/recipes/cpptrace/config.yml b/recipes/cpptrace/config.yml new file mode 100644 index 00000000000000..c9540bd54bac58 --- /dev/null +++ b/recipes/cpptrace/config.yml @@ -0,0 +1,4 @@ +versions: + # Newer versions at the top + "0.2.1": + folder: all From f13df22bdae1c400388b01c0f492b2cbf0a08d8d Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Mon, 30 Oct 2023 13:48:37 +0100 Subject: [PATCH 15/34] (#20830) openssl: add 3.0.12 & 3.1.4 --- recipes/openssl/3.x.x/conandata.yml | 10 ++++++++++ recipes/openssl/config.yml | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/recipes/openssl/3.x.x/conandata.yml b/recipes/openssl/3.x.x/conandata.yml index a0341deb6e128f..4dc7c65bc721cd 100644 --- a/recipes/openssl/3.x.x/conandata.yml +++ b/recipes/openssl/3.x.x/conandata.yml @@ -1,4 +1,9 @@ sources: + 3.1.4: + url: + - "https://www.openssl.org/source/openssl-3.1.4.tar.gz" + - "https://github.com/openssl/openssl/releases/download/openssl-3.1.4/openssl-3.1.4.tar.gz" + sha256: 840af5366ab9b522bde525826be3ef0fb0af81c6a9ebd84caa600fea1731eee3 3.1.3: url: - "https://www.openssl.org/source/openssl-3.1.3.tar.gz" @@ -14,6 +19,11 @@ sources: - "https://www.openssl.org/source/openssl-3.1.1.tar.gz" - "https://github.com/openssl/openssl/releases/download/openssl-3.1.1/openssl-3.1.1.tar.gz" sha256: b3aa61334233b852b63ddb048df181177c2c659eb9d4376008118f9c08d07674 + 3.0.12: + url: + - "https://www.openssl.org/source/openssl-3.0.12.tar.gz" + - "https://github.com/openssl/openssl/releases/download/openssl-3.0.12/openssl-3.0.12.tar.gz" + sha256: f93c9e8edde5e9166119de31755fc87b4aa34863662f67ddfcba14d0b6b69b61 3.0.11: url: - "https://www.openssl.org/source/openssl-3.0.11.tar.gz" diff --git a/recipes/openssl/config.yml b/recipes/openssl/config.yml index e02abd41066dc7..a33ff6a80ee4dc 100644 --- a/recipes/openssl/config.yml +++ b/recipes/openssl/config.yml @@ -1,5 +1,7 @@ versions: # 3.1.x releases + 3.1.4: + folder: "3.x.x" 3.1.3: folder: "3.x.x" 3.1.2: @@ -7,6 +9,8 @@ versions: 3.1.1: folder: "3.x.x" # 3.0.x releases + 3.0.12: + folder: "3.x.x" 3.0.11: folder: "3.x.x" # 1.1.1x releases From c5b1ea6dfae54d57033a061fde958d66dc7402b3 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Mon, 30 Oct 2023 14:03:14 +0100 Subject: [PATCH 16/34] (#17925) [qt/6.x.x] Fix conan toolchain * [qt/6.5.1] Add version * [qt/6.x.x] Add qt_add_qml_module to test_package * Add conan_qt_qt6_policies.cmake to Qt6Qml cmake package * Add qtdeclarative to default component * Revert "Add qtdeclarative to default component" This reverts commit a7fc4b3870e31a490132c25ca19f2588cb1877d6. * Revert "[qt/6.x.x] Add qt_add_qml_module to test_package" This reverts commit 55d7fb13fc8a1284c9fba9321daf34ee4a53cf30. * Set QT6_IS_SHARED_LIBS_BUILD * Put conan_qt_qt6_variables in Qt6Core instead of Qt6Qml * Add macdeployqt target * Append Qt6CoreConfigExtras.cmake to build_modules_list instead of creating conan_qt_qt6_variables.cmake * Remove merge conflict markers from conandata.yml * Fix linter warnings --- recipes/qt/6.x.x/conanfile.py | 16 +++++++++++++--- recipes/qt/6.x.x/test_package/conanfile.py | 1 - 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/recipes/qt/6.x.x/conanfile.py b/recipes/qt/6.x.x/conanfile.py index f6306f010b09aa..cd60c2ee9d0e56 100644 --- a/recipes/qt/6.x.x/conanfile.py +++ b/recipes/qt/6.x.x/conanfile.py @@ -222,7 +222,7 @@ def _enablemodule(mod): for module in self._get_module_tree: if getattr(self.options, module): _enablemodule(module) - + # disable all modules which are: # - not explicitely enabled by the consumer and # - not required by a module explicitely enabled by the consumer @@ -806,10 +806,12 @@ def package(self): targets.append("qvkgen") if self.options.widgets: targets.append("uic") + if self._settings_build.os == "Macos" and self.settings.os != "iOS": + targets.extend(["macdeployqt"]) + if self.settings.os == "Windows": + targets.extend(["windeployqt"]) if self.options.qttools: targets.extend(["qhelpgenerator", "qtattributionsscanner"]) - if self.settings.os == "Windows": - targets.extend(["windeployqt"]) targets.extend(["lconvert", "lprodump", "lrelease", "lrelease-pro", "lupdate", "lupdate-pro"]) if self.options.qtshadertools: targets.append("qsb") @@ -874,6 +876,9 @@ def _create_private_module(module, dependencies): if self.options.qtdeclarative: _create_private_module("Qml", ["CorePrivate", "Qml"]) + save(self, os.path.join(self.package_folder, "lib", "cmake", "Qt6Qml", "conan_qt_qt6_policies.cmake"), textwrap.dedent("""\ + set(QT_KNOWN_POLICY_QTP0001 TRUE) + """)) if self.settings.os in ["Windows", "iOS"]: contents = textwrap.dedent("""\ @@ -1376,6 +1381,9 @@ def _create_plugin(pluginname, libname, plugintype, requires): build_modules_list = [] + if self.options.qtdeclarative: + build_modules_list.append(os.path.join(self.package_folder, "lib", "cmake", "Qt6Qml", "conan_qt_qt6_policies.cmake")) + def _add_build_modules_for_component(component): for req in self.cpp_info.components[component].requires: if "::" in req: # not a qt component @@ -1386,4 +1394,6 @@ def _add_build_modules_for_component(component): for c in self.cpp_info.components: _add_build_modules_for_component(c) + build_modules_list.append(os.path.join(self.package_folder, "lib", "cmake", "Qt6Core", "Qt6CoreConfigExtras.cmake")) + self.cpp_info.set_property("cmake_build_modules", build_modules_list) diff --git a/recipes/qt/6.x.x/test_package/conanfile.py b/recipes/qt/6.x.x/test_package/conanfile.py index 3321de8f782393..1153f37c5a8771 100644 --- a/recipes/qt/6.x.x/test_package/conanfile.py +++ b/recipes/qt/6.x.x/test_package/conanfile.py @@ -1,5 +1,4 @@ import os -import textwrap from conan import ConanFile from conan.tools.build import can_run From aa58c1f205dc1aa91892b106ee75abb521069fd7 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Mon, 30 Oct 2023 14:27:52 +0100 Subject: [PATCH 17/34] (#20727) opencv/3.x: bump deps, remove old version --- recipes/opencv/3.x/conandata.yml | 9 --------- recipes/opencv/3.x/conanfile.py | 16 +--------------- .../3.x/patches/3.4.12-0001-find-openexr.patch | 18 ------------------ recipes/opencv/config.yml | 2 -- 4 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 recipes/opencv/3.x/patches/3.4.12-0001-find-openexr.patch diff --git a/recipes/opencv/3.x/conandata.yml b/recipes/opencv/3.x/conandata.yml index e0e79edab327a9..fb7fa44fa31ae1 100644 --- a/recipes/opencv/3.x/conandata.yml +++ b/recipes/opencv/3.x/conandata.yml @@ -4,17 +4,8 @@ sources: sha256: "1353eec67849aadb20df71d8bae18b83708e18fc5da080fe5efeabb1e99b2ee8" - url: "https://github.com/opencv/opencv_contrib/archive/refs/tags/3.4.17.tar.gz" sha256: "2b4d3e91a5767a1ae4f4e2a71b0a93c9ec744755763653a650e40ace8f7b9a1b" - "3.4.12": - - url: "https://github.com/opencv/opencv/archive/3.4.12.tar.gz" - sha256: "c8919dfb5ead6be67534bf794cb0925534311f1cd5c6680f8164ad1813c88d13" - - url: "https://github.com/opencv/opencv_contrib/archive/3.4.12.tar.gz" - sha256: "b207024589674dd2efc7c25740ef192ee4f3e0783e773e2d49a198c37e3e7570" patches: "3.4.17": - patch_file: "patches/3.4.17-0001-find-openexr.patch" patch_description: "Robust discovery & injection of OpenEXR" patch_type: "conan" - "3.4.12": - - patch_file: "patches/3.4.12-0001-find-openexr.patch" - patch_description: "Robust discovery & injection of OpenEXR" - patch_type: "conan" diff --git a/recipes/opencv/3.x/conanfile.py b/recipes/opencv/3.x/conanfile.py index c6f183e44df5c8..94f59dc50fb8e1 100644 --- a/recipes/opencv/3.x/conanfile.py +++ b/recipes/opencv/3.x/conanfile.py @@ -134,26 +134,12 @@ def _patch_sources(self): replace_in_file(self, os.path.join(self.source_folder, "modules", "imgcodecs", "CMakeLists.txt"), "JASPER_", "Jasper_") # Cleanup RPATH - if Version(self.version) < "3.4.8": - install_layout_file = os.path.join(self.source_folder, "CMakeLists.txt") - else: - install_layout_file = os.path.join(self.source_folder, "cmake", "OpenCVInstallLayout.cmake") + install_layout_file = os.path.join(self.source_folder, "cmake", "OpenCVInstallLayout.cmake") replace_in_file(self, install_layout_file, "ocv_update(CMAKE_INSTALL_RPATH \"${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH}\")", "") replace_in_file(self, install_layout_file, "set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)", "") - if self.options.contrib and Version(self.version) <= "3.4.12": - sfm_cmake = os.path.join(self._contrib_folder, "modules", "sfm", "CMakeLists.txt") - search = " find_package(Glog QUIET)\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): tc = CMakeToolchain(self) tc.variables["OPENCV_CONFIG_INSTALL_PATH"] = "cmake" diff --git a/recipes/opencv/3.x/patches/3.4.12-0001-find-openexr.patch b/recipes/opencv/3.x/patches/3.4.12-0001-find-openexr.patch deleted file mode 100644 index 757789eca25bb7..00000000000000 --- a/recipes/opencv/3.x/patches/3.4.12-0001-find-openexr.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/cmake/OpenCVFindOpenEXR.cmake -+++ b/cmake/OpenCVFindOpenEXR.cmake -@@ -8,6 +8,15 @@ - # OPENEXR_INCLUDE_PATHS = OpenEXR include directories. - # OPENEXR_LIBRARIES = libraries that are needed to use OpenEXR. - # -+find_package(OpenEXR REQUIRED) -+if(TARGET OpenEXR::OpenEXR) -+ set(OPENEXR_LIBRARIES OpenEXR::OpenEXR) -+else() -+ set(OPENEXR_LIBRARIES openexr::openexr) -+endif() -+set(OPENEXR_FOUND TRUE) -+set(OPENEXR_VERSION ${OpenEXR_VERSION}) -+return() - - SET(OPENEXR_LIBRARIES "") - SET(OPENEXR_LIBSEARCH_SUFFIXES "") diff --git a/recipes/opencv/config.yml b/recipes/opencv/config.yml index 9eaf5dfd20e1b8..89ac415345456a 100644 --- a/recipes/opencv/config.yml +++ b/recipes/opencv/config.yml @@ -7,7 +7,5 @@ versions: folder: "4.x" "3.4.17": folder: "3.x" - "3.4.12": - folder: "3.x" "2.4.13.7": folder: "2.x" From cec383a85f5eca37bb440801d58bfbf01a0bcfef Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 30 Oct 2023 14:49:57 +0100 Subject: [PATCH 18/34] (#20833) yaml-cpp: fix interface definition for windows + provide `yaml-cpp::yaml-cpp` imported target * fix interface definition for windows YAML_CPP_DLL (<0.8.0) or YAML_CPP_STATIC_DEFINE (>=0.8.0) must be defined when appropriate on windows, noy only for msvc compiler * define YAML_CPP_STATIC_DEFINE if shared since 0.8.0 irrespective of os * also provide `yaml-cpp::yaml-cpp` imported target it's the new upstream target name since 0.8.0 --- recipes/yaml-cpp/all/conanfile.py | 9 ++++++--- recipes/yaml-cpp/all/test_package/CMakeLists.txt | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/recipes/yaml-cpp/all/conanfile.py b/recipes/yaml-cpp/all/conanfile.py index 5b5671d6ceeee4..29c95c5649accc 100644 --- a/recipes/yaml-cpp/all/conanfile.py +++ b/recipes/yaml-cpp/all/conanfile.py @@ -104,16 +104,19 @@ def _module_file_rel_path(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "yaml-cpp") - self.cpp_info.set_property("cmake_target_name", "yaml-cpp") + self.cpp_info.set_property("cmake_target_name", "yaml-cpp::yaml-cpp") + self.cpp_info.set_property("cmake_target_aliases", ["yaml-cpp"]) # CMake imported target before 0.8.0 self.cpp_info.set_property("pkg_config_name", "yaml-cpp") self.cpp_info.libs = collect_libs(self) if self.settings.os in ("Linux", "FreeBSD"): self.cpp_info.system_libs.append("m") if is_msvc(self): self.cpp_info.defines.append("_NOEXCEPT=noexcept") - if Version(self.version) < "0.8.0" and self.options.shared: + if Version(self.version) < "0.8.0": + if self.settings.os == "Windows" and self.options.shared: self.cpp_info.defines.append("YAML_CPP_DLL") - if Version(self.version) >= "0.8.0" and not self.options.shared: + else: + if 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 diff --git a/recipes/yaml-cpp/all/test_package/CMakeLists.txt b/recipes/yaml-cpp/all/test_package/CMakeLists.txt index 1872344e829cbc..293d6d71bbc1c7 100644 --- a/recipes/yaml-cpp/all/test_package/CMakeLists.txt +++ b/recipes/yaml-cpp/all/test_package/CMakeLists.txt @@ -4,5 +4,5 @@ project(test_package LANGUAGES CXX) find_package(yaml-cpp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE yaml-cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE yaml-cpp::yaml-cpp) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) From 66d5c2eab40bb1913c14cbc1bfc0ebe63e33c023 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 30 Oct 2023 23:30:40 +0900 Subject: [PATCH 19/34] (#20807) samurai: add version 0.8.0, update dependenies * samurai: add version 0.8.0, update dependenies * update xtensor --- recipes/samurai/all/conandata.yml | 3 +++ recipes/samurai/all/conanfile.py | 6 ++---- recipes/samurai/all/test_package/conanfile.py | 1 - recipes/samurai/config.yml | 2 ++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/recipes/samurai/all/conandata.yml b/recipes/samurai/all/conandata.yml index 6907e16b729a67..ee0badb79a35b3 100644 --- a/recipes/samurai/all/conandata.yml +++ b/recipes/samurai/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.8.0": + url: "https://github.com/hpc-maths/samurai/archive/v0.8.0.tar.gz" + sha256: "c20c4cdcc7c5a29d6f44369d5b1addee4237b8282b5cce88be4113367d90d82d" "0.7.0": url: "https://github.com/hpc-maths/samurai/archive/v0.7.0.tar.gz" sha256: "159dea32bdce95ddc6bc62c202e60754407d4e5e910d0a382c2030410fe2e729" diff --git a/recipes/samurai/all/conanfile.py b/recipes/samurai/all/conanfile.py index 8e629d1289dfbe..9bbf83edd69852 100644 --- a/recipes/samurai/all/conanfile.py +++ b/recipes/samurai/all/conanfile.py @@ -42,9 +42,9 @@ def requirements(self): self.requires("cli11/2.3.2") self.requires("fmt/10.1.1") self.requires("highfive/2.7.1") - self.requires("pugixml/1.13") + self.requires("pugixml/1.14") self.requires("xsimd/11.1.0") - self.requires("xtensor/0.24.3") + self.requires("xtensor/0.24.6") def package_id(self): self.info.clear() @@ -61,7 +61,6 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - # Copy all files to the package folder def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy( @@ -72,6 +71,5 @@ def package(self): ) def package_info(self): - # Folders not used for header-only self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] diff --git a/recipes/samurai/all/test_package/conanfile.py b/recipes/samurai/all/test_package/conanfile.py index 0a808db45f2453..3a91c9439218e3 100644 --- a/recipes/samurai/all/test_package/conanfile.py +++ b/recipes/samurai/all/test_package/conanfile.py @@ -4,7 +4,6 @@ import os -# It will become the standard on Conan 2.x class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" diff --git a/recipes/samurai/config.yml b/recipes/samurai/config.yml index 3ab2f5cec43d3e..3cb0f24be34a77 100644 --- a/recipes/samurai/config.yml +++ b/recipes/samurai/config.yml @@ -1,4 +1,6 @@ versions: + "0.8.0": + folder: all "0.7.0": folder: all "0.6.0": From 174de6ddebd06843381686b273a51c39ec668da6 Mon Sep 17 00:00:00 2001 From: Chris Collins Date: Tue, 31 Oct 2023 01:43:13 +1100 Subject: [PATCH 20/34] (#16738) cglm: update for conan 2.0 and add ver 0.8.9 * cglm: update for conan 2.0 and add ver 0.8.9 * chore: modernize more * chore: fix type * fixed removal shared option --------- Co-authored-by: Chris Mc Co-authored-by: memsharded --- recipes/cglm/all/CMakeLists.txt | 7 -- recipes/cglm/all/conandata.yml | 3 + recipes/cglm/all/conanfile.py | 73 ++++++++----------- recipes/cglm/all/test_package/CMakeLists.txt | 3 - recipes/cglm/all/test_package/conanfile.py | 19 +++-- .../cglm/all/test_v1_package/CMakeLists.txt | 8 ++ recipes/cglm/all/test_v1_package/conanfile.py | 18 +++++ recipes/cglm/config.yml | 2 + 8 files changed, 75 insertions(+), 58 deletions(-) delete mode 100644 recipes/cglm/all/CMakeLists.txt create mode 100644 recipes/cglm/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/cglm/all/test_v1_package/conanfile.py diff --git a/recipes/cglm/all/CMakeLists.txt b/recipes/cglm/all/CMakeLists.txt deleted file mode 100644 index 3a14ce35d533b8..00000000000000 --- a/recipes/cglm/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper C) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory("source_subfolder") diff --git a/recipes/cglm/all/conandata.yml b/recipes/cglm/all/conandata.yml index d63882c55fca8d..bef9a23cc03a14 100644 --- a/recipes/cglm/all/conandata.yml +++ b/recipes/cglm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.8.9": + url: "https://github.com/recp/cglm/archive/refs/tags/v0.8.9.tar.gz" + sha256: "9561c998eb2a86dca5f8596b5cd290d76f56b7735c8a2486c585c43c196ceedd" "0.8.5": url: "https://github.com/recp/cglm/archive/refs/tags/v0.8.5.tar.gz" sha256: "baefa21342d228a83c90708459a745d5aa9b0ebb381555eea42db1f37fdf7a5a" diff --git a/recipes/cglm/all/conanfile.py b/recipes/cglm/all/conanfile.py index 023c54a31f51b3..a65e71aed7e4f9 100644 --- a/recipes/cglm/all/conanfile.py +++ b/recipes/cglm/all/conanfile.py @@ -1,7 +1,9 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps +from conan.tools.files import get, patch, rmdir, copy import os -required_conan_version = ">=1.29.1" +required_conan_version = ">=1.50.0" class CglmConan(ConanFile): @@ -13,7 +15,6 @@ class CglmConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" settings = "os", "arch", "compiler", "build_type" exports_sources = ("CMakeLists.txt", ) - generators = "cmake" options = { "shared": [True, False], "fPIC": [True, False], @@ -25,65 +26,51 @@ class CglmConan(ConanFile): "header_only": False, } - _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 - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + if self.options.get_safe("shared") or self.options.header_only: + self.options.rm_safe("fPIC") if self.options.header_only: - del self.settings.arch - del self.settings.build_type - del self.settings.compiler - del self.settings.os + self.options.rm_safe("shared") + self.settings.compiler.rm_safe("libcxx") + self.settings.compiler.rm_safe("cppstd") - def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + def package_id(self): + if self.info.options.header_only: + self.info.clear() - 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.definitions["CGLM_STATIC"] = not self.options.shared - self._cmake.definitions["CGLM_SHARED"] = self.options.shared - self._cmake.definitions["CGLM_USE_TEST"] = False - self._cmake.configure() - return self._cmake + def generate(self): + if not self.options.header_only: + tc = CMakeToolchain(self) + tc.cache_variables["CGLM_STATIC"] = not self.options.shared + tc.cache_variables["CGLM_SHARED"] = self.options.shared + tc.cache_variables["CGLM_USE_TEST"] = 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) - if not self.options.header_only: - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") - + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) if self.options.header_only: - self.copy("*", src=os.path.join(self._source_subfolder, "include"), dst="include") + copy(self, "*", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) else: - cmake = self._configure_cmake() + 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", "cglm") diff --git a/recipes/cglm/all/test_package/CMakeLists.txt b/recipes/cglm/all/test_package/CMakeLists.txt index 511cf63c2b9e2a..61fe76d5a3a4b9 100644 --- a/recipes/cglm/all/test_package/CMakeLists.txt +++ b/recipes/cglm/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(cglm REQUIRED) add_executable(test_package test_package.c) diff --git a/recipes/cglm/all/test_package/conanfile.py b/recipes/cglm/all/test_package/conanfile.py index 38f4483872d47f..d60b533632ddd0 100644 --- a/recipes/cglm/all/test_package/conanfile.py +++ b/recipes/cglm/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", "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/cglm/all/test_v1_package/CMakeLists.txt b/recipes/cglm/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..2f6b1a2f7ec79d --- /dev/null +++ b/recipes/cglm/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package C) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/cglm/all/test_v1_package/conanfile.py b/recipes/cglm/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..5a05af3c2dfd2f --- /dev/null +++ b/recipes/cglm/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/cglm/config.yml b/recipes/cglm/config.yml index dacc103c54543e..4fbae8510daaf1 100644 --- a/recipes/cglm/config.yml +++ b/recipes/cglm/config.yml @@ -1,3 +1,5 @@ versions: + "0.8.9": + folder: all "0.8.5": folder: all From 1d0dfa89a70bd0b0b820a38cc369e6c2ebf2b150 Mon Sep 17 00:00:00 2001 From: Simon Jackson Date: Mon, 30 Oct 2023 15:07:54 +0000 Subject: [PATCH 21/34] (#20792) libwebm: Update to 1.0.0.31 to fix C++20 builds. --- recipes/libwebm/all/conandata.yml | 2 ++ recipes/libwebm/all/test_package/conanfile.py | 14 +++++++++++--- recipes/libwebm/all/test_package/test_package.cpp | 6 ++++++ recipes/libwebm/config.yml | 2 ++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/recipes/libwebm/all/conandata.yml b/recipes/libwebm/all/conandata.yml index d6b7a70fca5c64..18c5b099c2c71c 100644 --- a/recipes/libwebm/all/conandata.yml +++ b/recipes/libwebm/all/conandata.yml @@ -1,3 +1,5 @@ sources: + '1.0.0.31': + url: 'https://chromium.googlesource.com/webm/libwebm/+archive/libwebm-1.0.0.31.tar.gz' '1.0.0.30': url: 'https://chromium.googlesource.com/webm/libwebm/+archive/libwebm-1.0.0.30.tar.gz' diff --git a/recipes/libwebm/all/test_package/conanfile.py b/recipes/libwebm/all/test_package/conanfile.py index 0a6bc68712d901..b02549cdf82ed9 100644 --- a/recipes/libwebm/all/test_package/conanfile.py +++ b/recipes/libwebm/all/test_package/conanfile.py @@ -1,12 +1,11 @@ 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 +14,15 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) + def generate(self): + tc = CMakeToolchain(self) + # Later versions of the library use prefixed headers, 1.0.0.30 is the only + # version supported by this recipe that does not. + if self.dependencies[self.tested_reference_str].ref.version == "1.0.0.30": + tc.preprocessor_definitions["UNPREFIXED_HEADERS"] = "1" + + tc.generate() + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/libwebm/all/test_package/test_package.cpp b/recipes/libwebm/all/test_package/test_package.cpp index 4d44f2363caf22..07d201d6d4f515 100644 --- a/recipes/libwebm/all/test_package/test_package.cpp +++ b/recipes/libwebm/all/test_package/test_package.cpp @@ -1,7 +1,13 @@ #include #include + +#ifdef UNPREFIXED_HEADERS #include #include +#else +#include +#include +#endif // UNPREFIXED_HEADERS int main(void) { int32_t major, minor, build, revision; diff --git a/recipes/libwebm/config.yml b/recipes/libwebm/config.yml index d9683e805a917d..71746ecdc81bd8 100644 --- a/recipes/libwebm/config.yml +++ b/recipes/libwebm/config.yml @@ -1,3 +1,5 @@ versions: + '1.0.0.31': + folder: all '1.0.0.30': folder: all From 83d7893bfc824f1582f857d3e9b391b9d086e912 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 31 Oct 2023 00:27:43 +0900 Subject: [PATCH 22/34] (#20802) cairo: add version 1.18.0, update meson * cairo: add version 1.18.0 * drop with_opengl option --- recipes/cairo/config.yml | 2 ++ recipes/cairo/meson/conandata.yml | 3 +++ recipes/cairo/meson/conanfile.py | 25 +++++++++++++------------ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/recipes/cairo/config.yml b/recipes/cairo/config.yml index 248b8521fe8ea3..5fabe3a0b232af 100644 --- a/recipes/cairo/config.yml +++ b/recipes/cairo/config.yml @@ -1,4 +1,6 @@ versions: + "1.18.0": + folder: meson "1.17.6": folder: meson "1.17.4": diff --git a/recipes/cairo/meson/conandata.yml b/recipes/cairo/meson/conandata.yml index da5f9312509754..08cc67a383ec6d 100644 --- a/recipes/cairo/meson/conandata.yml +++ b/recipes/cairo/meson/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.18.0": + sha256: "abf8fba4d510086a492783c3e0828e90b32734738fd80906595617d229d02bab" + url: "https://gitlab.freedesktop.org/cairo/cairo/-/archive/1.18.0/cairo-1.18.0.tar.bz2" "1.17.6": sha256: "90496d135c9ef7612c98f8ee358390cdec0825534573778a896ea021155599d2" url: "https://gitlab.freedesktop.org/cairo/cairo/-/archive/1.17.6/cairo-1.17.6.tar.bz2" diff --git a/recipes/cairo/meson/conanfile.py b/recipes/cairo/meson/conanfile.py index 84d1dc2823d84c..72a90c376844a4 100644 --- a/recipes/cairo/meson/conanfile.py +++ b/recipes/cairo/meson/conanfile.py @@ -80,7 +80,7 @@ def config_options(self): del self.options.with_xlib_xrender del self.options.with_xcb del self.options.with_symbol_lookup - if self.settings.os in ["Macos", "Windows"]: + if self.settings.os in ["Macos", "Windows"] or Version(self.version) >= "1.18.0": del self.options.with_opengl def configure(self): @@ -135,7 +135,7 @@ def validate(self): ) def build_requirements(self): - self.tool_requires("meson/1.2.2") + self.tool_requires("meson/1.2.3") if not self.conf.get("tools.gnu:pkg_config", check_type=str): self.tool_requires("pkgconf/2.0.3") @@ -164,16 +164,17 @@ def is_enabled(value): else: options["xcb"] = "disabled" options["xlib"] = "disabled" - if self.options.get_safe("with_opengl") == "desktop": - options["gl-backend"] = "gl" - elif self.options.get_safe("with_opengl") == "gles2": - options["gl-backend"] = "glesv2" - elif self.options.get_safe("with_opengl") == "gles3": - options["gl-backend"] = "glesv3" - else: - options["gl-backend"] = "disabled" - options["glesv2"] = is_enabled(self.options.get_safe("with_opengl") == "gles2") - options["glesv3"] = is_enabled(self.options.get_safe("with_opengl") == "gles3") + if Version(self.version) < "1.18.0": + if self.options.get_safe("with_opengl") == "desktop": + options["gl-backend"] = "gl" + elif self.options.get_safe("with_opengl") == "gles2": + options["gl-backend"] = "glesv2" + elif self.options.get_safe("with_opengl") == "gles3": + options["gl-backend"] = "glesv3" + else: + options["gl-backend"] = "disabled" + options["glesv2"] = is_enabled(self.options.get_safe("with_opengl") == "gles2") + options["glesv3"] = is_enabled(self.options.get_safe("with_opengl") == "gles3") options["tee"] = is_enabled(self.options.tee) options["symbol-lookup"] = is_enabled(self.options.get_safe("with_symbol_lookup")) From e17d030307433d5f398b37c65edc044086fa8e08 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 31 Oct 2023 00:47:47 +0900 Subject: [PATCH 23/34] (#20804) itlib: add version 1.10.0, remove older versions --- recipes/itlib/all/conandata.yml | 18 +++--------------- recipes/itlib/config.yml | 12 ++---------- 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/recipes/itlib/all/conandata.yml b/recipes/itlib/all/conandata.yml index 55fc01342577f4..3f5420a88ffc25 100644 --- a/recipes/itlib/all/conandata.yml +++ b/recipes/itlib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.10.0": + url: "https://github.com/iboB/itlib/archive/v1.10.0.tar.gz" + sha256: "a97b98514aa7194241383b537c368a01d4a56e05316a94551cd183a986caa9c7" "1.9.2": url: "https://github.com/iboB/itlib/archive/v1.9.2.tar.gz" sha256: "70627c57edff91dfae219e101c0672560f65567272e889f461069c8ea506bef1" @@ -20,18 +23,3 @@ sources: "1.8.0": url: "https://github.com/iboB/itlib/archive/v1.8.0.tar.gz" sha256: "70b6493b0cc3a720ffd48e98e3f009e8d94003380800bf07e61f167e813a9add" - "1.7.0": - url: "https://github.com/iboB/itlib/archive/v1.7.0.tar.gz" - sha256: "9a27138cfa8554eb69436bb1afacfafc5a3888b6e05f9124b2d20da7ab55b723" - "1.6.3": - url: "https://github.com/iboB/itlib/archive/v1.6.3.tar.gz" - sha256: "d2e320d9218269c421407d6df819ca0bfae3ea5bc897b341b9babaedc0b7103f" - "1.5.2": - url: "https://github.com/iboB/itlib/archive/v1.5.2.tar.gz" - sha256: "9ebff09fcdc873d2b01d8a2d0de2a7d7bd11844ef632f80ec5041f78bdc6ddec" - "1.4.5": - url: "https://github.com/iboB/itlib/archive/v1.4.5.tar.gz" - sha256: "f1d3533014433316475b6196cd2b1890bb42db1ae3059616538788712e1a33aa" - "1.3.0": - url: "https://github.com/iboB/itlib/archive/v1.3.0.tar.gz" - sha256: "d3af2ea3cf0dae63fe1e186af79562e584bfb86bf02f358cab9675662fb9b5ef" diff --git a/recipes/itlib/config.yml b/recipes/itlib/config.yml index fa9e9daa2fe0e7..b9ca7db67bf085 100644 --- a/recipes/itlib/config.yml +++ b/recipes/itlib/config.yml @@ -1,4 +1,6 @@ versions: + "1.10.0": + folder: all "1.9.2": folder: all "1.9.1": @@ -13,13 +15,3 @@ versions: folder: all "1.8.0": folder: all - "1.7.0": - folder: all - "1.6.3": - folder: all - "1.5.2": - folder: all - "1.4.5": - folder: all - "1.3.0": - folder: all From 3d8d69f37b223bb91b4705294c050f3a663b1605 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 30 Oct 2023 17:01:47 +0100 Subject: [PATCH 24/34] (#20835) [bot] Update authorized users list (2023-10-30) --- .c3i/authorized_users.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index df103c0b32535f..d1282ef8ebb565 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1252,3 +1252,8 @@ authorized_users: - Subash-Lamichhane - rezvee6 - SpiffGreen +- hegyizs +- kkloberdanz +- martin-olivier +- lucaskdc +- fnadeau From 666c4acf20bca7dbc61c8459e09097894a586bd4 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 31 Oct 2023 01:17:14 +0900 Subject: [PATCH 25/34] (#20686) crossguid: add recipe * crossguid: add recipe * link CoreFoundation * export all symbols * make transitive --- recipes/crossguid/all/conandata.yml | 9 ++ recipes/crossguid/all/conanfile.py | 84 +++++++++++++++++++ .../all/patches/0001-add-installer.patch | 41 +++++++++ .../crossguid/all/test_package/CMakeLists.txt | 8 ++ .../crossguid/all/test_package/conanfile.py | 26 ++++++ .../all/test_package/test_package.cpp | 11 +++ recipes/crossguid/config.yml | 3 + 7 files changed, 182 insertions(+) create mode 100644 recipes/crossguid/all/conandata.yml create mode 100644 recipes/crossguid/all/conanfile.py create mode 100644 recipes/crossguid/all/patches/0001-add-installer.patch create mode 100644 recipes/crossguid/all/test_package/CMakeLists.txt create mode 100644 recipes/crossguid/all/test_package/conanfile.py create mode 100644 recipes/crossguid/all/test_package/test_package.cpp create mode 100644 recipes/crossguid/config.yml diff --git a/recipes/crossguid/all/conandata.yml b/recipes/crossguid/all/conandata.yml new file mode 100644 index 00000000000000..2fdb90ed9775b8 --- /dev/null +++ b/recipes/crossguid/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "0.2.2": + url: "https://github.com/graeme-hill/crossguid/archive/refs/tags/v0.2.2.tar.gz" + sha256: "48321928473c682b0cdc7e17bbd3390f79f4b98ab22fef3b81a852dda81fd195" +patches: + "0.2.2": + - patch_file: "patches/0001-add-installer.patch" + patch_description: "add installer definition" + patch_type: "conan" diff --git a/recipes/crossguid/all/conanfile.py b/recipes/crossguid/all/conanfile.py new file mode 100644 index 00000000000000..d47019a908277a --- /dev/null +++ b/recipes/crossguid/all/conanfile.py @@ -0,0 +1,84 @@ +from conan import ConanFile +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.apple import is_apple_os +import os + +required_conan_version = ">=1.53.0" + +class CrossGUIDConan(ConanFile): + name = "crossguid" + description = "Lightweight cross platform C++ GUID/UUID library" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/graeme-hill/crossguid" + topics = ("guid", "uuid") + 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 11 + + 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): + if self.settings.os == "Linux": + self.requires("libuuid/1.0.3", transitive_headers=True, transitive_libs=True) + + 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 generate(self): + tc = CMakeToolchain(self) + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.variables["XG_TESTS"] = False + tc.generate() + dpes = CMakeDeps(self) + dpes.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 = ["xg"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + if self.settings.os == "Android": + self.cpp_info.defines.append("GUID_ANDROID") + if is_apple_os(self): + self.cpp_info.frameworks.append("CoreFoundation") diff --git a/recipes/crossguid/all/patches/0001-add-installer.patch b/recipes/crossguid/all/patches/0001-add-installer.patch new file mode 100644 index 00000000000000..76e6912e18f32d --- /dev/null +++ b/recipes/crossguid/all/patches/0001-add-installer.patch @@ -0,0 +1,41 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 761dbc6..b5ddd74 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -27,13 +27,32 @@ elseif(APPLE) + elseif(ANDROID) + target_compile_definitions(xg PRIVATE GUID_ANDROID) + else() +- find_package(Libuuid REQUIRED) +- if (NOT LIBUUID_FOUND) ++ find_package(libuuid REQUIRED) ++ if (NOT libuuid_FOUND) + message(FATAL_ERROR + "You might need to run 'sudo apt-get install uuid-dev' or similar") + endif() +- include_directories(${LIBUUID_INCLUDE_DIR}) +- target_link_libraries(xg ${LIBUUID_LIBRARY}) ++ include_directories(${libuuid_INCLUDE_DIR}) ++ target_link_libraries(xg ${libuuid_LIBRARY}) + add_definitions(-DGUID_LIBUUID) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic") + endif() ++ ++include(GNUInstallDirs) ++ ++set(CROSSGUID_INC_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}") ++set(CROSSGUID_RUNTIME_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}") ++set(CROSSGUID_LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}") ++set(CROSSGUID_ARCHIVE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}") ++set(CROSSGUID_FRAMEWORK_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}") ++ ++# Install target ++install(TARGETS xg EXPORT crossguidTargets ++ RUNTIME DESTINATION ${CROSSGUID_RUNTIME_INSTALL_DIR} ++ LIBRARY DESTINATION ${CROSSGUID_LIBRARY_INSTALL_DIR} ++ ARCHIVE DESTINATION ${CROSSGUID_ARCHIVE_INSTALL_DIR} ++ FRAMEWORK DESTINATION ${CROSSGUID_FRAMEWORK_INSTALL_DIR}) ++ ++# Install headers ++install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/Guid.hpp" ++ DESTINATION ${CROSSGUID_INC_INSTALL_DIR}) diff --git a/recipes/crossguid/all/test_package/CMakeLists.txt b/recipes/crossguid/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..d1140285930251 --- /dev/null +++ b/recipes/crossguid/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(crossguid REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE crossguid::crossguid) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/crossguid/all/test_package/conanfile.py b/recipes/crossguid/all/test_package/conanfile.py new file mode 100644 index 00000000000000..a9fb96656f2039 --- /dev/null +++ b/recipes/crossguid/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/crossguid/all/test_package/test_package.cpp b/recipes/crossguid/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..1fcc33b8fd5e86 --- /dev/null +++ b/recipes/crossguid/all/test_package/test_package.cpp @@ -0,0 +1,11 @@ +#include + +#include "Guid.hpp" + +int main(void) { + auto const g = xg::newGuid(); + + std::cout << "Here is a guid: " << g << std::endl; + + return 0; +} diff --git a/recipes/crossguid/config.yml b/recipes/crossguid/config.yml new file mode 100644 index 00000000000000..cd4b8da537c38c --- /dev/null +++ b/recipes/crossguid/config.yml @@ -0,0 +1,3 @@ +versions: + "0.2.2": + folder: all From b7fdc6b7196ef75101b41fc7d560bb685f438266 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 31 Oct 2023 01:38:38 +0900 Subject: [PATCH 26/34] (#20805) libnghttp2: add version 1.58.0, update dependencies, remove older versions --- recipes/libnghttp2/all/conandata.yml | 16 +++------------- recipes/libnghttp2/all/conanfile.py | 10 +++------- .../all/patches/fix-findJemalloc.cmake | 14 -------------- .../all/patches/fix-findLibevent.cmake | 11 ----------- recipes/libnghttp2/config.yml | 6 ++---- 5 files changed, 8 insertions(+), 49 deletions(-) delete mode 100644 recipes/libnghttp2/all/patches/fix-findJemalloc.cmake delete mode 100644 recipes/libnghttp2/all/patches/fix-findLibevent.cmake diff --git a/recipes/libnghttp2/all/conandata.yml b/recipes/libnghttp2/all/conandata.yml index da61b35ff41f8a..a883c4b7d535a5 100644 --- a/recipes/libnghttp2/all/conandata.yml +++ b/recipes/libnghttp2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.58.0": + url: "https://github.com/nghttp2/nghttp2/archive/v1.58.0.tar.gz" + sha256: "7da19947b33a07ddcf97b9791331bfee8a8545e6b394275a9971f43cae9d636b" "1.57.0": url: "https://github.com/nghttp2/nghttp2/archive/v1.57.0.tar.gz" sha256: "3c0b4e023dddf2afa087aa4409f7dbe03c099b4c63655e7545a607035085848a" @@ -23,16 +26,3 @@ sources: "1.50.0": url: "https://github.com/nghttp2/nghttp2/releases/download/v1.50.0/nghttp2-1.50.0.tar.xz" sha256: "af24007e34c18c782393a1dc3685f8fd5b50283e90a9191d25488eb50aa2c825" - "1.49.0": - url: "https://github.com/nghttp2/nghttp2/releases/download/v1.49.0/nghttp2-1.49.0.tar.xz" - sha256: "b0cfd492bbf0b131c472e8f6501c9f4ee82b51b68130f47b278c0b7c9848a66e" - "1.48.0": - url: "https://github.com/nghttp2/nghttp2/releases/download/v1.48.0/nghttp2-1.48.0.tar.xz" - sha256: "47d8f30ee4f1bc621566d10362ca1b3ac83a335c63da7144947c806772d016e4" -patches: - "1.49.0": - - patch_file: "patches/fix-findJemalloc.cmake" - - patch_file: "patches/fix-findLibevent.cmake" - "1.48.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 3f994abf9ab852..ac841e13b7b864 100644 --- a/recipes/libnghttp2/all/conanfile.py +++ b/recipes/libnghttp2/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout -from conan.tools.files import export_conandata_patches, apply_conandata_patches, get, save, replace_in_file, rmdir, copy +from conan.tools.files import get, save, replace_in_file, rmdir, copy from conan.tools.gnu import PkgConfigDeps from conan.tools.microsoft import is_msvc from conan.tools.scm import Version @@ -38,9 +38,6 @@ class Nghttp2Conan(ConanFile): "with_asio": False, } - def export_sources(self): - export_conandata_patches(self) - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -63,10 +60,10 @@ def requirements(self): if self.options.with_app or self.options.get_safe("with_asio"): self.requires("openssl/[>=1.1 <4]") if self.options.with_app: - self.requires("c-ares/1.19.1") + self.requires("c-ares/1.20.1") self.requires("libev/4.33") self.requires("libevent/2.1.12") - self.requires("libxml2/2.11.4") + self.requires("libxml2/2.11.5") self.requires("zlib/[>=1.2.11 <2]") if self.options.with_jemalloc: self.requires("jemalloc/5.3.0") @@ -110,7 +107,6 @@ def generate(self): tc.generate() def _patch_sources(self): - apply_conandata_patches(self) if not self.options.shared: # easier to patch here rather than have patch 'nghttp_static_include_directories' for each version save(self, os.path.join(self.source_folder, "lib", "CMakeLists.txt"), diff --git a/recipes/libnghttp2/all/patches/fix-findJemalloc.cmake b/recipes/libnghttp2/all/patches/fix-findJemalloc.cmake deleted file mode 100644 index f072d3a7f8d5ae..00000000000000 --- a/recipes/libnghttp2/all/patches/fix-findJemalloc.cmake +++ /dev/null @@ -1,14 +0,0 @@ ---- cmake/FindJemalloc.cmake -+++ cmake/FindJemalloc.cmake -@@ -10,10 +10,10 @@ - find_path(JEMALLOC_INCLUDE_DIR - NAMES jemalloc/jemalloc.h - HINTS ${PC_JEMALLOC_INCLUDE_DIRS} - ) - find_library(JEMALLOC_LIBRARY -- NAMES jemalloc -+ NAMES jemalloc jemalloc_s jemalloc_pic - HINTS ${PC_JEMALLOC_LIBRARY_DIRS} - ) - - if(JEMALLOC_INCLUDE_DIR) diff --git a/recipes/libnghttp2/all/patches/fix-findLibevent.cmake b/recipes/libnghttp2/all/patches/fix-findLibevent.cmake deleted file mode 100644 index b58cd730c3bff7..00000000000000 --- a/recipes/libnghttp2/all/patches/fix-findLibevent.cmake +++ /dev/null @@ -1,11 +0,0 @@ ---- cmake/FindLibevent.cmake -+++ cmake/FindLibevent.cmake -@@ -35,7 +35,7 @@ - ) - - if(LIBEVENT_INCLUDE_DIR) -- set(_version_regex "^#define[ \t]+_EVENT_VERSION[ \t]+\"([^\"]+)\".*") -+ set(_version_regex "^#define[ \t]+EVENT__VERSION[ \t]+\"([^\"]+)\".*") - if(EXISTS "${LIBEVENT_INCLUDE_DIR}/event2/event-config.h") - # Libevent 2.0 - file(STRINGS "${LIBEVENT_INCLUDE_DIR}/event2/event-config.h" diff --git a/recipes/libnghttp2/config.yml b/recipes/libnghttp2/config.yml index 4a36922d02f025..9868faae8fd3c2 100644 --- a/recipes/libnghttp2/config.yml +++ b/recipes/libnghttp2/config.yml @@ -1,4 +1,6 @@ versions: + "1.58.0": + folder: all "1.57.0": folder: all "1.56.0": @@ -15,7 +17,3 @@ versions: folder: all "1.50.0": folder: all - "1.49.0": - folder: all - "1.48.0": - folder: all From ab46555537e060cf7f994c81e09248d2fde7d757 Mon Sep 17 00:00:00 2001 From: Klaus Holst Jacobsen <48069914+klausholstjacobsen@users.noreply.github.com> Date: Mon, 30 Oct 2023 18:18:19 +0100 Subject: [PATCH 27/34] (#20799) libarchive: patch to include getopt.h when required * libarchive: patch to include getopt.h when required * Update recipes/libarchive/all/conandata.yml Co-authored-by: Jordan Williams --------- Co-authored-by: Jordan Williams --- recipes/libarchive/all/conandata.yml | 4 ++++ .../all/patches/0007-3.7.1-include-getopt.patch | 13 +++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 recipes/libarchive/all/patches/0007-3.7.1-include-getopt.patch diff --git a/recipes/libarchive/all/conandata.yml b/recipes/libarchive/all/conandata.yml index 7a29ca28110b50..d6397b39df999f 100644 --- a/recipes/libarchive/all/conandata.yml +++ b/recipes/libarchive/all/conandata.yml @@ -25,6 +25,10 @@ sources: sha256: "8643d50ed40c759f5412a3af4e353cffbce4fdf3b5cf321cb72cacf06b2d825e" patches: "3.7.1": + - patch_file: "patches/0007-3.7.1-include-getopt.patch" + patch_description: "include getopt.h if HAVE_GETOPT_OPTRESET is defined" + patch_type: "portability" + patch_source: "https://github.com/libarchive/libarchive/pull/2007" - patch_file: "patches/0001-3.7.1-zlib-winapi.patch" patch_description: "Remove broken ZLIB WINAPI check" patch_type: "portability" diff --git a/recipes/libarchive/all/patches/0007-3.7.1-include-getopt.patch b/recipes/libarchive/all/patches/0007-3.7.1-include-getopt.patch new file mode 100644 index 00000000000000..6db790a6cd811f --- /dev/null +++ b/recipes/libarchive/all/patches/0007-3.7.1-include-getopt.patch @@ -0,0 +1,13 @@ +--- unzip/bsdunzip.c 2023-07-29 19:27:43.000000000 +0200 ++++ unzip/bsdunzip.c 2023-10-28 13:19:27.181106700 +0200 +@@ -78,6 +78,10 @@ + #include + #endif + #endif ++#ifdef HAVE_GETOPT_OPTRESET ++#include ++#endif ++ + + #include + #include From f0da61a71de380af4f21b32f3b08dbf2d02940c4 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Mon, 30 Oct 2023 18:49:11 +0100 Subject: [PATCH 28/34] (#20790) openssl: add no_autoload_config option --- recipes/openssl/3.x.x/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/openssl/3.x.x/conanfile.py b/recipes/openssl/3.x.x/conanfile.py index 35f6fcf1604db3..c9d0f55fd43887 100644 --- a/recipes/openssl/3.x.x/conanfile.py +++ b/recipes/openssl/3.x.x/conanfile.py @@ -30,6 +30,7 @@ class OpenSSLConan(ConanFile): "capieng_dialog": [True, False], "enable_capieng": [True, False], "no_aria": [True, False], + "no_autoload_config": [True, False], "no_asm": [True, False], "no_async": [True, False], "no_blake2": [True, False], From 49e9e08cc68385d189c6c59950f8e3676068f076 Mon Sep 17 00:00:00 2001 From: tbeu Date: Mon, 30 Oct 2023 19:27:35 +0100 Subject: [PATCH 29/34] (#20796) matio: Add version 1.5.24 --- recipes/matio/all/conandata.yml | 6 ++++++ recipes/matio/config.yml | 2 ++ 2 files changed, 8 insertions(+) diff --git a/recipes/matio/all/conandata.yml b/recipes/matio/all/conandata.yml index fec43221cc62a9..0850bf3d72ee4b 100644 --- a/recipes/matio/all/conandata.yml +++ b/recipes/matio/all/conandata.yml @@ -11,6 +11,9 @@ sources: "1.5.23": url: "https://downloads.sourceforge.net/project/matio/matio/1.5.23/matio-1.5.23.tar.gz" sha256: "9f91eae661df46ea53c311a1b2dcff72051095b023c612d7cbfc09406c9f4d6e" + "1.5.24": + url: "https://downloads.sourceforge.net/project/matio/matio/1.5.24/matio-1.5.24.tar.gz" + sha256: "5106ebed5b40d02a2bb968b57bef8876701c566e039e6ebe134bab779c436f7c" patches: "1.5.18": - patch_file: "patches/require-cmake-3.10.patch" @@ -28,3 +31,6 @@ patches: "1.5.23": - patch_file: "patches/require-cmake-3.10.patch" - patch_file: "patches/cmake-install-bundle.patch" + "1.5.24": + - patch_file: "patches/require-cmake-3.10.patch" + - patch_file: "patches/cmake-install-bundle.patch" diff --git a/recipes/matio/config.yml b/recipes/matio/config.yml index 5ec8ba010e8ecf..32213bb4d952d6 100644 --- a/recipes/matio/config.yml +++ b/recipes/matio/config.yml @@ -7,3 +7,5 @@ versions: folder: all "1.5.23": folder: all + "1.5.24": + folder: all From 9b815d611efe338cc2d362a82e88ff9ec689e0d0 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 31 Oct 2023 03:48:30 +0900 Subject: [PATCH 30/34] (#20806) librdkafka: add version 2.3.0, make libcurl version ranges --- recipes/librdkafka/all/conandata.yml | 10 ++++++++ recipes/librdkafka/all/conanfile.py | 2 +- ...y-targets-and-result-variables-2-3-0.patch | 24 +++++++++++++++++++ recipes/librdkafka/config.yml | 2 ++ 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 recipes/librdkafka/all/patches/0002-Change-library-targets-and-result-variables-2-3-0.patch diff --git a/recipes/librdkafka/all/conandata.yml b/recipes/librdkafka/all/conandata.yml index a03c452b453607..bf7c468b0c4c11 100644 --- a/recipes/librdkafka/all/conandata.yml +++ b/recipes/librdkafka/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.3.0": + url: "https://github.com/edenhill/librdkafka/archive/v2.3.0.tar.gz" + sha256: "2d49c35c77eeb3d42fa61c43757fcbb6a206daa560247154e60642bcdcc14d12" "2.2.0": url: "https://github.com/edenhill/librdkafka/archive/v2.2.0.tar.gz" sha256: "af9a820cbecbc64115629471df7c7cecd40403b6c34bfdbb9223152677a47226" @@ -9,6 +12,13 @@ sources: url: "https://github.com/edenhill/librdkafka/archive/v1.9.2.tar.gz" sha256: "3fba157a9f80a0889c982acdd44608be8a46142270a389008b22d921be1198ad" patches: + "2.3.0": + - patch_file: patches/0001-Change-library-names-1-9-1.patch + patch_description: "find_package conan packages" + patch_type: "conan" + - patch_file: patches/0002-Change-library-targets-and-result-variables-2-3-0.patch + patch_description: "refer conan package names" + patch_type: "conan" "2.2.0": - patch_file: patches/0001-Change-library-names-1-9-1.patch patch_description: "find_package conan packages" diff --git a/recipes/librdkafka/all/conanfile.py b/recipes/librdkafka/all/conanfile.py index a3942c7cffef19..2e958843569aa0 100644 --- a/recipes/librdkafka/all/conanfile.py +++ b/recipes/librdkafka/all/conanfile.py @@ -71,7 +71,7 @@ def requirements(self): if self._depends_on_cyrus_sasl: self.requires("cyrus-sasl/2.1.27") if self.options.curl: - self.requires("libcurl/8.2.1") + self.requires("libcurl/[>=7.78.0 <9]") def build_requirements(self): if self._depends_on_cyrus_sasl: diff --git a/recipes/librdkafka/all/patches/0002-Change-library-targets-and-result-variables-2-3-0.patch b/recipes/librdkafka/all/patches/0002-Change-library-targets-and-result-variables-2-3-0.patch new file mode 100644 index 00000000000000..169e5bb94d3b20 --- /dev/null +++ b/recipes/librdkafka/all/patches/0002-Change-library-targets-and-result-variables-2-3-0.patch @@ -0,0 +1,24 @@ +iff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index cbcff50..38ad38e 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -215,9 +215,7 @@ if(WITH_ZLIB) + endif() + + if(WITH_ZSTD) +- target_link_libraries(rdkafka PRIVATE ${ZSTD_LIBRARY}) +- target_include_directories(rdkafka PRIVATE ${ZSTD_INCLUDE_DIR}) +- message(STATUS "Found ZSTD: ${ZSTD_LIBRARY}") ++ target_link_libraries(rdkafka PRIVATE $,zstd::libzstd_shared,zstd::libzstd_static>) + endif() + + if(WITH_SSL) +@@ -257,7 +255,7 @@ endif() + + if(WITH_LZ4_EXT) + target_include_directories(rdkafka PRIVATE ${LZ4_INCLUDE_DIRS}) +- target_link_libraries(rdkafka PUBLIC LZ4::LZ4) ++ target_link_libraries(rdkafka PUBLIC lz4::lz4) + endif() + + if(WIN32) diff --git a/recipes/librdkafka/config.yml b/recipes/librdkafka/config.yml index 6b21185a713a77..edafdb9b6c2ac0 100644 --- a/recipes/librdkafka/config.yml +++ b/recipes/librdkafka/config.yml @@ -1,4 +1,6 @@ versions: + "2.3.0": + folder: all "2.2.0": folder: all "2.0.2": From a120e75513be243dbc9c85bd694233986e3732ed Mon Sep 17 00:00:00 2001 From: technoyes <76265781+technoyes@users.noreply.github.com> Date: Mon, 30 Oct 2023 20:16:54 +0100 Subject: [PATCH 31/34] (#20800) iconfontcppheaders: create package * iconfontcppheaders: create package * Clean up package according to czoido's great feedback --------- Co-authored-by: Carlos Zoido --- recipes/iconfontcppheaders/all/conandata.yml | 4 ++ recipes/iconfontcppheaders/all/conanfile.py | 38 +++++++++++++++++++ .../all/test_package/CMakeLists.txt | 7 ++++ .../all/test_package/conanfile.py | 26 +++++++++++++ .../all/test_package/test_package.cpp | 8 ++++ recipes/iconfontcppheaders/config.yml | 3 ++ 6 files changed, 86 insertions(+) create mode 100644 recipes/iconfontcppheaders/all/conandata.yml create mode 100644 recipes/iconfontcppheaders/all/conanfile.py create mode 100644 recipes/iconfontcppheaders/all/test_package/CMakeLists.txt create mode 100644 recipes/iconfontcppheaders/all/test_package/conanfile.py create mode 100644 recipes/iconfontcppheaders/all/test_package/test_package.cpp create mode 100644 recipes/iconfontcppheaders/config.yml diff --git a/recipes/iconfontcppheaders/all/conandata.yml b/recipes/iconfontcppheaders/all/conandata.yml new file mode 100644 index 00000000000000..ff2972012bdc3b --- /dev/null +++ b/recipes/iconfontcppheaders/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20231026": + sha256: b65a0256820ce24541247eeb22843968164acc40786c017392e53c5aa5a58996 + url: https://github.com/juliettef/IconFontCppHeaders/archive/b1700cdf6ca2f78f8d27321dfecdafd7c2d8ef08/main.zip diff --git a/recipes/iconfontcppheaders/all/conanfile.py b/recipes/iconfontcppheaders/all/conanfile.py new file mode 100644 index 00000000000000..ba1e590ee75f08 --- /dev/null +++ b/recipes/iconfontcppheaders/all/conanfile.py @@ -0,0 +1,38 @@ +import os + +from conan import ConanFile +from conan.tools.layout import basic_layout +from conan.tools.files import copy, get + +required_conan_version = ">=1.52.0" + + +class FireHppConan(ConanFile): + name = "iconfontcppheaders" + description = "Headers for icon fonts Font Awesome, Fork Awesome, Google Material Design, Kenney game icons, Fontaudio, Codicons, Pictogrammers Material Design icons." + license = "Zlib" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/juliettef/IconFontCppHeaders" + topics = ("icons", "fonts", "icon-fonts", "header-only") + no_copy_source = True + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain" + + 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) + + def package(self): + copy(self, "licence.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*.h", self.source_folder, os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/iconfontcppheaders/all/test_package/CMakeLists.txt b/recipes/iconfontcppheaders/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..edfa602f53039b --- /dev/null +++ b/recipes/iconfontcppheaders/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1.2) +project(test_package CXX) + +find_package(iconfontcppheaders REQUIRED CONFIG) + +add_executable(${CMAKE_PROJECT_NAME} test_package.cpp) +target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE iconfontcppheaders::iconfontcppheaders) diff --git a/recipes/iconfontcppheaders/all/test_package/conanfile.py b/recipes/iconfontcppheaders/all/test_package/conanfile.py new file mode 100644 index 00000000000000..a2ac5bf6805ee3 --- /dev/null +++ b/recipes/iconfontcppheaders/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" + 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): + cmd = os.path.join(self.cpp.build.bindir, "test_package") + self.run(cmd, env="conanrun") diff --git a/recipes/iconfontcppheaders/all/test_package/test_package.cpp b/recipes/iconfontcppheaders/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..99ac9eb113bd74 --- /dev/null +++ b/recipes/iconfontcppheaders/all/test_package/test_package.cpp @@ -0,0 +1,8 @@ +#include +#include + +int main() { + std::cout << FONT_ICON_FILE_NAME_FAR << std::endl + << FONT_ICON_FILE_NAME_FAS << std::endl; + return 0; +} diff --git a/recipes/iconfontcppheaders/config.yml b/recipes/iconfontcppheaders/config.yml new file mode 100644 index 00000000000000..8269ec2c3a4ef0 --- /dev/null +++ b/recipes/iconfontcppheaders/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20231026": + folder: all From 5953b1a25210651bfcf27c99822609ef63d4ae1d Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 30 Oct 2023 21:45:12 +0200 Subject: [PATCH 32/34] (#18892) nspr: migrate to Conan v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * nspr: migrate to Conan v2 * nspr: disable cross-building * use unix_path_package_info_legacy and raise min conan ver --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: czoido --- recipes/nspr/all/conanfile.py | 184 +++++++++--------- recipes/nspr/all/test_package/CMakeLists.txt | 5 +- recipes/nspr/all/test_package/conanfile.py | 26 ++- .../nspr/all/test_v1_package/CMakeLists.txt | 8 + recipes/nspr/all/test_v1_package/conanfile.py | 27 +++ 5 files changed, 146 insertions(+), 104 deletions(-) create mode 100644 recipes/nspr/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/nspr/all/test_v1_package/conanfile.py diff --git a/recipes/nspr/all/conanfile.py b/recipes/nspr/all/conanfile.py index b0ce8c9099e1bb..fe56b4bbdf4f7d 100644 --- a/recipes/nspr/all/conanfile.py +++ b/recipes/nspr/all/conanfile.py @@ -1,24 +1,30 @@ -from conan.tools.microsoft import msvc_runtime_flag -from conan.tools.files import rename, get, rmdir, chdir, replace_in_file -from conan.tools.scm import Version +import os +import shutil + from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conans import tools, AutoToolsBuildEnvironment -import contextlib -import functools -import os +from conan.tools.apple import is_apple_os +from conan.tools.build import cross_building +from conan.tools.env import Environment +from conan.tools.files import chdir, copy, get, rename, replace_in_file, rmdir, mkdir +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime, msvc_runtime_flag, unix_path_package_info_legacy +from conan.tools.scm import Version -required_conan_version = ">=1.47.0" +required_conan_version = ">=1.57.0" class NsprConan(ConanFile): name = "nspr" - homepage = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR" - description = "Netscape Portable Runtime (NSPR) provides a platform-neutral API for system level and libc-like functions." - topics = ("nspr", "libc") - url = "https://github.com/conan-io/conan-center-index" + description = ("Netscape Portable Runtime (NSPR) provides a platform-neutral API" + " for system level and libc-like functions.") license = "MPL-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR" + topics = ("libc",) + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -33,14 +39,6 @@ class NsprConan(ConanFile): "win32_target": "winnt", } - @property - def _is_msvc(self): - return str(self.settings.compiler) in ["Visual Studio", "msvc"] - - @property - def _source_subfolder(self): - return "source_subfolder" - @property def _settings_build(self): return getattr(self, "settings_build", self.settings) @@ -49,128 +47,129 @@ def config_options(self): if self.settings.os == "Windows": del self.options.fPIC else: - del self.options.win32_target + self.options.rm_safe("win32_target") 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): + basic_layout(self, src_folder="src") def validate(self): # https://bugzilla.mozilla.org/show_bug.cgi?id=1658671 if Version(self.version) < "4.29": - if self.settings.os == "Macos" and self.settings.arch == "armv8": + if is_apple_os(self) and self.settings.arch == "armv8": raise ConanInvalidConfiguration("NSPR does not support mac M1 before 4.29") + if cross_building(self): + raise ConanInvalidConfiguration("Cross-building is not supported") def build_requirements(self): if self._settings_build.os == "Windows": - self.build_requires("mozilla-build/3.3") - if not tools.get_env("CONAN_BASH_PATH"): - self.build_requires("msys2/cci.latest") + self.tool_requires("mozilla-build/3.3") + 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="tmp", strip_root=True) - rename(self, os.path.join("tmp", "nspr"), self._source_subfolder) - rmdir(self, "tmp") - - @contextlib.contextmanager - def _build_context(self): - if self._is_msvc: - with tools.vcvars(self): - with tools.environment_append({"CC": "cl", "CXX": "cl", "LD": "link"}): - yield - else: - yield + with chdir(self, self.export_sources_folder): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + rmdir(self, self.source_folder) + rename(self, "nspr", self.source_folder) - @functools.lru_cache(1) - def _configure_autotools(self): - autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + def generate(self): + tc = AutotoolsToolchain(self) yes_no = lambda v: "yes" if v else "no" - conf_args = [ + tc.configure_args += [ "--with-mozilla={}".format(yes_no(self.options.with_mozilla)), "--enable-64bit={}".format(yes_no(self.settings.arch in ("armv8", "x86_64", "mips64", "ppc64", "ppc64le"))), "--enable-strip={}".format(yes_no(self.settings.build_type not in ("Debug", "RelWithDebInfo"))), "--enable-debug={}".format(yes_no(self.settings.build_type == "Debug")), - "--datarootdir={}".format(tools.unix_path(os.path.join(self.package_folder, "res"))), + "--datarootdir=${prefix}/res", "--disable-cplus", ] - if self._is_msvc: - conf_args.extend([ + if is_msvc(self): + tc.configure_args += [ "{}-pc-mingw32".format("x86_64" if self.settings.arch == "x86_64" else "x86"), - "--enable-static-rtl={}".format(yes_no("MT" in msvc_runtime_flag(self))), + "--enable-static-rtl={}".format(yes_no(is_msvc_static_runtime(self))), "--enable-debug-rtl={}".format(yes_no("d" in msvc_runtime_flag(self))), - ]) + ] elif self.settings.os == "Android": - conf_args.extend([ - "--with-android-ndk={}".format(tools.get_env(["NDK_ROOT"])), + tc.configure_args += [ + "--with-android-ndk={}".format(os.environ.get("NDK_ROOT", "")), "--with-android-version={}".format(self.settings.os.api_level), - "--with-android-platform={}".format(tools.get_env("ANDROID_PLATFORM")), - "--with-android-toolchain={}".format(tools.get_env("ANDROID_TOOLCHAIN")), - ]) + "--with-android-platform={}".format(os.environ.get("ANDROID_PLATFORM")), + "--with-android-toolchain={}".format(os.environ.get("ANDROID_TOOLCHAIN")), + ] elif self.settings.os == "Windows": - conf_args.append("--enable-win32-target={}".format(self.options.win32_target)) - env = autotools.vars - if self.settings.os == "Macos": - if self.settings.arch == "armv8": - # conan adds `-arch`, which conflicts with nspr's apple silicon support - env["CFLAGS"] = env["CFLAGS"].replace("-arch arm64", "") - env["CXXFLAGS"] = env["CXXFLAGS"].replace("-arch arm64", "") - - autotools.configure(args=conf_args, vars=env) - return autotools + tc.configure_args.append("--enable-win32-target={}".format(self.options.win32_target)) + if is_apple_os(self) and self.settings.arch == "armv8": + # conan adds `-arch`, which conflicts with nspr's apple silicon support + tc.cflags.remove("-arch arm64") + tc.cxxflags.remove("-arch arm64") + tc.generate() + + if is_msvc(self): + env = Environment() + env.define("CC", "cl") + env.define("CXX", "cl") + env.define("LD", "link") + env.vars(self).save_script("conanbuild_msvc") def build(self): - with chdir(self, self._source_subfolder): + with chdir(self, self.source_folder): # relocatable shared libs on macOS - replace_in_file(self, - "configure", - "-install_name @executable_path/", - "-install_name @rpath/" - ) - with self._build_context(): - autotools = self._configure_autotools() - autotools.make() + replace_in_file(self, "configure", "-install_name @executable_path/", "-install_name @rpath/") + autotools = Autotools(self) + autotools.configure() + autotools.make() def package(self): - self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) - with chdir(self, self._source_subfolder): - with self._build_context(): - autotools = self._configure_autotools() - autotools.install() + copy(self, "LICENSE", + 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, "bin")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "share")) + if os.path.exists(os.path.join(self.package_folder, "include", "nspr.h")): + with chdir(self, self.package_folder): + rename(self, "include", "nspr") + mkdir(self, "include") + shutil.move("nspr", "include") if self.settings.os == "Windows": if self.options.shared: os.mkdir(os.path.join(self.package_folder, "bin")) for lib in self._library_names: - libsuffix = "lib" if self._is_msvc else "a" - libprefix = "" if self._is_msvc else "lib" + libsuffix = "lib" if is_msvc(self) else "a" + libprefix = "" if is_msvc(self) else "lib" if self.options.shared: os.unlink(os.path.join(self.package_folder, "lib", f"{libprefix}{lib}_s.{libsuffix}")) - rename(self, os.path.join(self.package_folder, "lib", f"{lib}.dll"), - os.path.join(self.package_folder, "bin", f"{lib}.dll")) + rename(self, + os.path.join(self.package_folder, "lib", f"{lib}.dll"), + os.path.join(self.package_folder, "bin", f"{lib}.dll")) else: os.unlink(os.path.join(self.package_folder, "lib", f"{libprefix}{lib}.{libsuffix}")) os.unlink(os.path.join(self.package_folder, "lib", f"{lib}.dll")) if not self.options.shared: replace_in_file(self, os.path.join(self.package_folder, "include", "nspr", "prtypes.h"), - "#define NSPR_API(__type) PR_IMPORT(__type)", - "#define NSPR_API(__type) extern __type") + "#define NSPR_API(__type) PR_IMPORT(__type)", + "#define NSPR_API(__type) extern __type") replace_in_file(self, os.path.join(self.package_folder, "include", "nspr", "prtypes.h"), - "#define NSPR_DATA_API(__type) PR_IMPORT_DATA(__type)", - "#define NSPR_DATA_API(__type) extern __type") + "#define NSPR_DATA_API(__type) PR_IMPORT_DATA(__type)", + "#define NSPR_DATA_API(__type) extern __type") else: - shared_ext = "dylib" if self.settings.os == "Macos" else "so" + shared_ext = "dylib" if is_apple_os(self) else "so" for lib in self._library_names: if self.options.shared: os.unlink(os.path.join(self.package_folder, "lib", f"lib{lib}.a")) else: os.unlink(os.path.join(self.package_folder, "lib", f"lib{lib}.{shared_ext}")) - if self._is_msvc: + if is_msvc(self): if self.settings.build_type == "Debug": for lib in self._library_names: os.unlink(os.path.join(self.package_folder, "lib", f"{lib}.pdb")) @@ -200,8 +199,9 @@ def package_info(self): elif self.settings.os == "Windows": self.cpp_info.system_libs.extend(["winmm", "ws2_32"]) - aclocal = tools.unix_path(os.path.join(self.package_folder, "res", "aclocal")) + self.cpp_info.resdirs = ["res"] + + # TODO: the following can be removed when the recipe supports Conan >= 2.0 only + aclocal = unix_path_package_info_legacy(self, os.path.join(self.package_folder, "res", "aclocal")) self.output.info(f"Appending AUTOMAKE_CONAN_INCLUDES environment variable: {aclocal}") self.env_info.AUTOMAKE_CONAN_INCLUDES.append(aclocal) - - self.cpp_info.resdirs = ["res"] diff --git a/recipes/nspr/all/test_package/CMakeLists.txt b/recipes/nspr/all/test_package/CMakeLists.txt index e8bb34d55a6376..898448a11de583 100644 --- a/recipes/nspr/all/test_package/CMakeLists.txt +++ b/recipes/nspr/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(nspr REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) diff --git a/recipes/nspr/all/test_package/conanfile.py b/recipes/nspr/all/test_package/conanfile.py index ab912e4e61df1a..d6a48b7c16ccf6 100644 --- a/recipes/nspr/all/test_package/conanfile.py +++ b/recipes/nspr/all/test_package/conanfile.py @@ -1,19 +1,29 @@ -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_multi" + 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": # Workaround for CMake bug with error message: # Attempting to use @rpath without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being # set. This could be because you are using a Mac OS X version less than 10.5 # or because CMake's platform configuration is corrupt. # FIXME: Remove once CMake on macOS/M1 CI runners is upgraded. - self.build_requires("cmake/3.22.0") + self.tool_requires("cmake/3.22.0") + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -21,6 +31,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/nspr/all/test_v1_package/CMakeLists.txt b/recipes/nspr/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/nspr/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/nspr/all/test_v1_package/conanfile.py b/recipes/nspr/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..9f6cd40d88fedb --- /dev/null +++ b/recipes/nspr/all/test_v1_package/conanfile.py @@ -0,0 +1,27 @@ +from conan.tools.apple import is_apple_os +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 is_apple_os(self) and self.settings.arch == "armv8": + # Workaround for CMake bug with error message: + # Attempting to use @rpath without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being + # set. This could be because you are using a Mac OS X version less than 10.5 + # or because CMake's platform configuration is corrupt. + # FIXME: Remove once CMake on macOS/M1 CI runners is upgraded. + self.build_requires("cmake/3.22.0") + + def build(self): + cmake = CMake(self) + cmake.configure() + 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 02b627ba5d7113b906c51e707a21ecbc531ccf76 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 30 Oct 2023 22:01:39 +0100 Subject: [PATCH 33/34] (#20845) [bot] Update list of references (prod-v2/ListPackages) --- .c3i/conan_v2_ready_references.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index ac0e9f9b7afa5e..d1830a7101b4e2 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -6,6 +6,7 @@ required_for_references: - aaplus - abseil - absent +- acado - access_private - acl - ada @@ -259,6 +260,7 @@ required_for_references: - deco - di - dice-template-library +- directx-headers - dirent - discount - djinni-generator @@ -305,6 +307,7 @@ required_for_references: - enhex-generic_serialization - enhex-strong_type - enkits +- ensmallen - entityx - entt - enum-flags @@ -312,6 +315,7 @@ required_for_references: - erkir - etc2comp - eternal +- ethash - etl - evmc - exiv2 @@ -873,6 +877,7 @@ required_for_references: - ode - ogdf - ogg +- ohnet - ois - onedpl - onetbb @@ -912,6 +917,7 @@ required_for_references: - opentelemetry-cpp - opentelemetry-proto - opentracing-cpp +- openvino - openxlsx - optional-lite - opus @@ -920,6 +926,7 @@ required_for_references: - osqp - out_ptr - outcome +- ozz-animation - p-ranav-glob - paho-mqtt-c - paho-mqtt-cpp @@ -1007,6 +1014,7 @@ required_for_references: - qpoases - qr-code-generator - qt +- qtawesome - quantlib - quaternions - quazip @@ -1091,11 +1099,13 @@ required_for_references: - seqan3 - serd - serdepp +- serf - serial - sfml - shapelib - shield - si +- signals-light - sigslot - simde - simdjson @@ -1140,6 +1150,7 @@ required_for_references: - status-value-lite - stb - stc +- stdgpu - stduuid - stlab - strawberryperl @@ -1297,6 +1308,7 @@ required_for_references: - wglext - whereami - whisper-cpp +- wide-integer - wil - wildmidi - winflexbison @@ -1363,4 +1375,5 @@ required_for_references: - zug - zulu-openjdk - zxing-cpp +- zyre - zziplib From 1517581337a950bc97e992b507bba5510ff0e67e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Tue, 31 Oct 2023 09:39:45 +0100 Subject: [PATCH 34/34] Bump osgearth's zlib requirement to [>=1.2.11 <2] range (#20654) --- recipes/osgearth/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/osgearth/all/conanfile.py b/recipes/osgearth/all/conanfile.py index 611835c64bf484..e916db567410d7 100644 --- a/recipes/osgearth/all/conanfile.py +++ b/recipes/osgearth/all/conanfile.py @@ -109,7 +109,7 @@ def requirements(self): self.requires("lerc/2.2") self.requires("rapidjson/1.1.0") - self.requires("zlib/1.2.13") # override + self.requires("zlib/[>=1.2.11 <2]") # override self.requires("libtiff/4.5.1") # override self.requires("libpng/1.6.40") # override