diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 50a877da3fb5c..a038b886512ea 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1388,3 +1388,33 @@ authorized_users: - fpoirotte - cuppajoeman - vsbogd +- Nevermore1994 +- maciejjablonsky +- luc-c +- willprice +- pasbi +- liuzicheng1987 +- guyutongxue +- ciclark +- John-LittleBearLabs +- jasal82 +- philipp-m-w +- nine +- OMGtechy +- sabapathi20 +- seekstar +- dcoburnMEDITECH +- mattangus +- arnaudmathias +- hankhsu1996 +- stephematician +- awest03 +- sun-mir +- fhamonic +- simbahebinbo +- alessiosacco +- Blackflame576 +- Bakul-Gaur +- itsmejoeeey +- JustCallMeRay +- shun2wang diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 0dedc986c45ca..bb5fb884995cf 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -43,6 +43,7 @@ required_for_references: - args-parser - argtable2 - argtable3 +- argz - armadillo - arrow - arsenalgear @@ -83,6 +84,7 @@ required_for_references: - aws-libfabric - aws-sdk-cpp - azure-sdk-for-cpp +- azure-storage-cpp - b2 - b64 - backport-cpp @@ -92,6 +94,7 @@ required_for_references: - bandit - base64 - basu +- battery-embed - bazel - bdwgc - bear @@ -179,6 +182,7 @@ required_for_references: - chipmunk2d - choc - chunkio +- cigi-ccl - cimg - circularbuffer - cista @@ -209,6 +213,7 @@ required_for_references: - coin-osi - coin-utils - commata +- compute_library - concurrencpp - concurrentqueue - console_bridge @@ -278,6 +283,7 @@ required_for_references: - cuda-samples - cunit - cute_headers +- cutlass - cvplot - cwalk - cxxgraph @@ -411,6 +417,7 @@ required_for_references: - fftw - fire-hpp - fixed-containers +- fixed_math - flac - flann - flatbuffers @@ -426,6 +433,7 @@ required_for_references: - fmi3 - fmt - fmtlog +- folly - fontconfig - foonathan-lexy - foonathan-memory @@ -453,6 +461,7 @@ required_for_references: - fusepp - fxdiv - g3log +- gaia-ecs - gainput - gamenetworkingsockets - gamma @@ -468,6 +477,7 @@ required_for_references: - geographiclib - geos - geotrans +- getdns - getopt-for-visual-studio - gettext - gf-complete @@ -498,6 +508,7 @@ required_for_references: - gnu-config - gnulib - gnutls +- gobject-introspection - godot-cpp - godot_headers - googleapis @@ -585,6 +596,7 @@ required_for_references: - inversify-cpp - iowow - ipaddress +- iphreeqc - iqa - irrxml - isa-l @@ -653,6 +665,7 @@ required_for_references: - lest - leveldb - lexbor +- libaec - libaesgm - libaio - libalsa @@ -708,6 +721,7 @@ required_for_references: - libevdev - libevent - libexif +- libfabric - libfdk_aac - libffi - libfork @@ -754,6 +768,7 @@ required_for_references: - libmd - libmediainfo - libmemcached +- libmeshb - libmetalink - libmicrohttpd - libmikmod @@ -783,7 +798,9 @@ required_for_references: - libpcap - libpciaccess - libpfm4 +- libphonenumber - libpng +- libpointmatcher - libpq - libpqxx - libproperties @@ -953,6 +970,7 @@ required_for_references: - mimalloc - mingw-builds - mingw-w64 +- minhook - mini - miniaudio - minicoro @@ -1011,6 +1029,7 @@ required_for_references: - nasm - ncurses - neargye-semver +- net-snmp - netcdf - nettle - newmat @@ -1095,6 +1114,7 @@ required_for_references: - openjpeg - openldap - openmesh +- openmpi - openmvg - openpam - openscenegraph @@ -1189,6 +1209,7 @@ required_for_references: - poppler-data - popt - portable-file-dialogs +- poselib - poshlib - pprint - pranav-csv2 @@ -1259,6 +1280,7 @@ required_for_references: - readerwriterqueue - readline - readosm +- rebound - recastnavigation - reckless - rectanglebinpack @@ -1314,6 +1336,7 @@ required_for_references: - sdf - sdl - sdl_image +- sdl_mixer - sdl_net - sdl_ttf - seadex-essentials @@ -1344,6 +1367,7 @@ required_for_references: - simfil - simple-websocket-server - simple-yaml +- simple_enum - sioclient - sjson-cpp - skyr-url @@ -1591,6 +1615,7 @@ required_for_references: - wslay - wt - wtl +- wxwidgets - wyhash - xapian-core - xbyak diff --git a/.c3i/waitlist_users.yml b/.c3i/waitlist_users.yml index 7976423523961..4be8317a18a4b 100644 --- a/.c3i/waitlist_users.yml +++ b/.c3i/waitlist_users.yml @@ -6,3 +6,7 @@ waitlist_users: - synaptics-lspintzyk - wer14 - connor-i-clark +- NeXuS4Developer +- sabapathim +- pixelsoba +- liss-h diff --git a/.github/workflows/linter-yaml.yml b/.github/workflows/linter-yaml.yml index d7d4050e8071d..4e0fb288a25ec 100644 --- a/.github/workflows/linter-yaml.yml +++ b/.github/workflows/linter-yaml.yml @@ -91,7 +91,7 @@ jobs: done echo "::remove-matcher owner=yamllint_matcher::" - for file in ${{ steps.changed_files_conandata.outputs.all_changed_files }}; do + for file in ${{ steps.changed_files_config.outputs.all_changed_files }}; do python3 linter/config_yaml_linter.py ${file} done diff --git a/docs/adding_packages/dependencies.md b/docs/adding_packages/dependencies.md index 4135ca7f24965..3a93fcb8bad12 100644 --- a/docs/adding_packages/dependencies.md +++ b/docs/adding_packages/dependencies.md @@ -196,7 +196,7 @@ version range only when a requirement for a newer version is needed. * qt5: `[~5.15]`, if your library depends on qt5, only the 5.15 minor version is allowed * qt6: `[>=6.x <7]`, where 6.x is the lower bound of your needed qt6 version * c-ares: `[>=1.27 <2]` -* zstd: `[^1.5]` it's equivalent to `[>=1.5 <1.6]` +* zstd: `[~1.5]` it's equivalent to `[>=1.5 <1.6]` * ninja: `[>=1.10.2 <2]` * meson: `[>=1.2.3 <2]` * pkgconf: `[>=2.2 <3]` diff --git a/recipes/7bitdi/all/conandata.yml b/recipes/7bitdi/all/conandata.yml index 46ec1df1a2623..ad96c33d43330 100644 --- a/recipes/7bitdi/all/conandata.yml +++ b/recipes/7bitdi/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.4.0": + url: "https://github.com/7bitcoder/7bitDI/archive/refs/tags/v3.4.0.tar.gz" + sha256: "8381102f5966a5d83cf590b8fa45904d055d74ec90822628240786ab100fb929" "3.3.0": url: "https://github.com/7bitcoder/7bitDI/archive/refs/tags/v3.3.0.tar.gz" sha256: "b9ddb2fc263c79cb414544e97d44dcc8cd1e1a91b38129d96b7051728a4583b9" diff --git a/recipes/7bitdi/all/conanfile.py b/recipes/7bitdi/all/conanfile.py index 9a614d07b3d74..6709e44476413 100644 --- a/recipes/7bitdi/all/conanfile.py +++ b/recipes/7bitdi/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd -from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import get, copy, rmdir from conan.tools.scm import Version import os diff --git a/recipes/7bitdi/config.yml b/recipes/7bitdi/config.yml index 37a63b9d3b41b..3fbfbf1ec3bc5 100644 --- a/recipes/7bitdi/config.yml +++ b/recipes/7bitdi/config.yml @@ -1,4 +1,6 @@ versions: + "3.4.0": + folder: all "3.3.0": folder: all "3.2.0": diff --git a/recipes/abseil/all/conandata.yml b/recipes/abseil/all/conandata.yml index b213e4b527e01..fa078f9fc7138 100644 --- a/recipes/abseil/all/conandata.yml +++ b/recipes/abseil/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "20240722.0": + url: "https://github.com/abseil/abseil-cpp/archive/20240722.0.tar.gz" + sha256: "f50e5ac311a81382da7fa75b97310e4b9006474f9560ac46f54a9967f07d4ae3" "20240116.2": url: "https://github.com/abseil/abseil-cpp/archive/20240116.2.tar.gz" sha256: "733726b8c3a6d39a4120d7e45ea8b41a434cdacde401cba500f14236c49b39dc" @@ -18,6 +21,11 @@ sources: url: "https://github.com/abseil/abseil-cpp/archive/20211102.0.tar.gz" sha256: "dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4" patches: + "20240722.0": + - patch_file: "patches/0003-absl-string-libm-20240116.patch" + patch_description: "link libm to absl string" + patch_type: "portability" + patch_source: "https://github.com/abseil/abseil-cpp/issues/1100" "20240116.2": - patch_file: "patches/0003-absl-string-libm-20240116.patch" patch_description: "link libm to absl string" diff --git a/recipes/abseil/all/conanfile.py b/recipes/abseil/all/conanfile.py index 6c10812e38452..55ae607eb9d58 100644 --- a/recipes/abseil/all/conanfile.py +++ b/recipes/abseil/all/conanfile.py @@ -74,6 +74,11 @@ def validate(self): # upstream tries its best to export symbols, but it's broken for the moment raise ConanInvalidConfiguration(f"{self.ref} shared not availabe for Visual Studio, please use version 20230802.1 or newer") + def build_requirements(self): + # https://github.com/abseil/abseil-cpp/blob/20240722.0/CMakeLists.txt#L19 + if Version(self.version) >= "20240722.0": + self.tool_requires("cmake/[>=3.16 <4]") + def layout(self): cmake_layout(self, src_folder="src") diff --git a/recipes/abseil/config.yml b/recipes/abseil/config.yml index 0af2b7beb4451..d29c717557868 100644 --- a/recipes/abseil/config.yml +++ b/recipes/abseil/config.yml @@ -1,4 +1,6 @@ versions: + "20240722.0": + folder: all "20240116.2": folder: all "20240116.1": diff --git a/recipes/ada/all/conandata.yml b/recipes/ada/all/conandata.yml index 4302d6278da6c..d02f03916e176 100644 --- a/recipes/ada/all/conandata.yml +++ b/recipes/ada/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.9.2": + url: "https://github.com/ada-url/ada/archive/v2.9.2.tar.gz" + sha256: "f41575ad7eec833afd9f6a0d6101ee7dc2f947fdf19ae8f1b54a71d59f4ba5ec" + "2.9.1": + url: "https://github.com/ada-url/ada/archive/v2.9.1.tar.gz" + sha256: "64eb3d91db941645d1b68ac8d1cbb7b534fbe446b66c1da11e384e17fca975e7" "2.9.0": url: "https://github.com/ada-url/ada/archive/v2.9.0.tar.gz" sha256: "8b992f0ce9134cb4eafb74b164d2ce2cb3af1900902162713b0e0c5ab0b6acd8" diff --git a/recipes/ada/config.yml b/recipes/ada/config.yml index 6c8f8963de719..29ab8232ac483 100644 --- a/recipes/ada/config.yml +++ b/recipes/ada/config.yml @@ -1,4 +1,8 @@ versions: + "2.9.2": + folder: all + "2.9.1": + folder: all "2.9.0": folder: all "2.8.0": diff --git a/recipes/amgcl/all/conandata.yml b/recipes/amgcl/all/conandata.yml index cbd774ff5f231..2059663ce0b33 100644 --- a/recipes/amgcl/all/conandata.yml +++ b/recipes/amgcl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.4": + url: "https://github.com/ddemidov/amgcl/archive/1.4.4.tar.gz" + sha256: "02fd5418e14d669422f65fc739ce72bf9516ced2d8942574d4b8caa05dda9d8c" "1.4.3": url: "https://github.com/ddemidov/amgcl/archive/1.4.3.tar.gz" sha256: "e920d5767814ce697d707d1f359a16c9b9eb79eba28fe19e14c18c2a505fe0ad" diff --git a/recipes/amgcl/all/conanfile.py b/recipes/amgcl/all/conanfile.py index d2ddd6171e66f..e04106ab75c2b 100644 --- a/recipes/amgcl/all/conanfile.py +++ b/recipes/amgcl/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.files import copy, get from conan.tools.layout import basic_layout +from conan.tools.scm import Version import os required_conan_version = ">=1.51.1" @@ -20,12 +21,19 @@ class AmgclConan(ConanFile): package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True + options = { 'with_boost': [True, False] } + default_options = { 'with_boost': True } + + def config_options(self): + if Version(self.version) < "1.4.4": + del self.options.with_boost def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.81.0") + if self.options.get_safe("with_boost"): + self.requires("boost/1.85.0") def package_id(self): self.info.clear() @@ -37,9 +45,6 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - pass - def package(self): copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "*", src=os.path.join(self.source_folder, "amgcl"), diff --git a/recipes/amgcl/config.yml b/recipes/amgcl/config.yml index 1d12970eb4fba..02bed7da76340 100644 --- a/recipes/amgcl/config.yml +++ b/recipes/amgcl/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.4": + folder: all "1.4.3": folder: all "1.4.2": diff --git a/recipes/angelscript/all/conandata.yml b/recipes/angelscript/all/conandata.yml index edfe7e005b855..a5590460838fe 100644 --- a/recipes/angelscript/all/conandata.yml +++ b/recipes/angelscript/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.37.0": + url: "https://www.angelcode.com/angelscript/sdk/files/angelscript_2.37.0.zip" + sha256: "0c52d1688016a0b2484e9ca549471c4e295df060770c57840144c64815f54f10" "2.36.1": url: "https://www.angelcode.com/angelscript/sdk/files/angelscript_2.36.1.zip" sha256: "58bb749af9c7e386304705f4e6e627ae41dfe03e0b6a73c3d0d2e017c4fc948f" diff --git a/recipes/angelscript/all/conanfile.py b/recipes/angelscript/all/conanfile.py index 88cdd729c8bf1..0a17df3020929 100644 --- a/recipes/angelscript/all/conanfile.py +++ b/recipes/angelscript/all/conanfile.py @@ -10,13 +10,13 @@ class AngelScriptConan(ConanFile): name = "angelscript" - license = "Zlib" - homepage = "http://www.angelcode.com/angelscript" - url = "https://github.com/conan-io/conan-center-index" description = ( "An extremely flexible cross-platform scripting library designed to " "allow applications to extend their functionality through external scripts." ) + license = "Zlib" + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://www.angelcode.com/angelscript" topics = ("angelcode", "embedded", "scripting", "language", "compiler", "interpreter") package_type = "library" @@ -90,7 +90,7 @@ def package_info(self): # TODO: back to global scope in conan v2 once cmake_find_package* generators removed self.cpp_info.components["_angelscript"].libs = [f"angelscript{postfix}"] if self.settings.os in ("Linux", "FreeBSD", "SunOS"): - self.cpp_info.components["_angelscript"].system_libs.append("pthread") + self.cpp_info.components["_angelscript"].system_libs.extend(["m", "pthread"]) # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.names["cmake_find_package"] = "Angelscript" diff --git a/recipes/angelscript/config.yml b/recipes/angelscript/config.yml index f3cbb4fedf454..621b347e7a383 100644 --- a/recipes/angelscript/config.yml +++ b/recipes/angelscript/config.yml @@ -1,4 +1,6 @@ versions: + "2.37.0": + folder: all "2.36.1": folder: all "2.36.0": diff --git a/recipes/argz/all/conandata.yml b/recipes/argz/all/conandata.yml new file mode 100644 index 0000000000000..a8b111b9078ce --- /dev/null +++ b/recipes/argz/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.2.1": + url: "https://github.com/stephenberry/argz/archive/refs/tags/v0.2.1.tar.gz" + sha256: "1a9d85ef7e4722f81ce426c2cf8ceaa0a10cc42e7762cdf2465ae6484ece9c7e" diff --git a/recipes/argz/all/conanfile.py b/recipes/argz/all/conanfile.py new file mode 100644 index 0000000000000..1d0b4e30fd7e6 --- /dev/null +++ b/recipes/argz/all/conanfile.py @@ -0,0 +1,70 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.52.0" + + +class ArgzConan(ConanFile): + name = "argz" + description = "A light weight C++ in memory argument parser" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/stephenberry/argz" + topics = ("argument", "parser", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "11", + "clang": "12", + "apple-clang": "14", + "Visual Studio": "16", + "msvc": "192", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + self.cpp_info.set_property("cmake_file_name", "argz") + self.cpp_info.set_property("cmake_target_name", "argz::argz") diff --git a/recipes/argz/all/test_package/CMakeLists.txt b/recipes/argz/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..8904da5a62a1d --- /dev/null +++ b/recipes/argz/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(argz REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE argz::argz) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/argz/all/test_package/conanfile.py b/recipes/argz/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/argz/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/argz/all/test_package/test_package.cpp b/recipes/argz/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..8e6558ac798fa --- /dev/null +++ b/recipes/argz/all/test_package/test_package.cpp @@ -0,0 +1,28 @@ +#include + +int main(int argc, char* argv[]) { + constexpr std::string_view version = "1.2.3"; + argz::about about{ "My program description", version }; + + std::string input{}; + std::string study{}; + int number = 123; + bool boolean = true; + std::optional number_opt{}; + argz::options opts{ + { { "input", 'i' }, input, "the input file"}, + { { "study", 's' }, study, "a study file"}, + { { "number" }, number, "input an int"}, + { { "boolean" }, boolean, "a boolean" }, + { { "number_opt" }, number_opt, "input an int"} + }; + + try { + argz::parse(about, opts, argc, argv); + } + catch (const std::exception& e) { + std::cerr << e.what() << '\n'; + } + + return 0; +} diff --git a/recipes/argz/config.yml b/recipes/argz/config.yml new file mode 100644 index 0000000000000..f975c1e3261f7 --- /dev/null +++ b/recipes/argz/config.yml @@ -0,0 +1,3 @@ +versions: + "0.2.1": + folder: all diff --git a/recipes/arrow/all/conanfile.py b/recipes/arrow/all/conanfile.py index 8080af297b81b..1af7642b14652 100644 --- a/recipes/arrow/all/conanfile.py +++ b/recipes/arrow/all/conanfile.py @@ -170,7 +170,7 @@ def requirements(self): if self.options.with_mimalloc: self.requires("mimalloc/1.7.6") if self.options.with_boost: - self.requires("boost/1.84.0") + self.requires("boost/1.85.0") if self.options.with_gflags: self.requires("gflags/2.2.2") if self.options.with_glog: @@ -579,7 +579,8 @@ def package_info(self): if self._requires_rapidjson(): self.cpp_info.components["libarrow"].requires.append("rapidjson::rapidjson") if self.options.with_s3: - self.cpp_info.components["libarrow"].requires.append("aws-sdk-cpp::s3") + # https://github.com/apache/arrow/blob/6b268f62a8a172249ef35f093009c740c32e1f36/cpp/src/arrow/CMakeLists.txt#L98 + self.cpp_info.components["libarrow"].requires.extend([f"aws-sdk-cpp::{x}" for x in ["cognito-identity", "core", "identity-management", "s3", "sts"]]) if self.options.get_safe("with_gcs"): self.cpp_info.components["libarrow"].requires.append("google-cloud-cpp::storage") if self.options.with_orc: diff --git a/recipes/asio/all/conandata.yml b/recipes/asio/all/conandata.yml index 2701f5013ce40..bf7c7ab528f44 100644 --- a/recipes/asio/all/conandata.yml +++ b/recipes/asio/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.31.0": + url: "https://github.com/chriskohlhoff/asio/archive/asio-1-31-0.tar.gz" + sha256: "530540f973498c2d297771af1bc852f69b27509bbb56bc7ac3309c928373286f" "1.30.2": url: "https://github.com/chriskohlhoff/asio/archive/asio-1-30-2.tar.gz" sha256: "755bd7f85a4b269c67ae0ea254907c078d408cce8e1a352ad2ed664d233780e8" diff --git a/recipes/asio/config.yml b/recipes/asio/config.yml index 1655f339efad7..0f4a1ba23b387 100644 --- a/recipes/asio/config.yml +++ b/recipes/asio/config.yml @@ -1,4 +1,6 @@ versions: + "1.31.0": + folder: all "1.30.2": folder: all "1.30.1": diff --git a/recipes/assimp/5.x/conandata.yml b/recipes/assimp/5.x/conandata.yml index 503614eeac72a..e267d49bf4f17 100644 --- a/recipes/assimp/5.x/conandata.yml +++ b/recipes/assimp/5.x/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.4.2": + url: "https://github.com/assimp/assimp/archive/refs/tags/v5.4.2.tar.gz" + sha256: "7414861a7b038e407b510e8b8c9e58d5bf8ca76c9dfe07a01d20af388ec5086a" "5.4.1": url: "https://github.com/assimp/assimp/archive/refs/tags/v5.4.1.tar.gz" sha256: "a1bf71c4eb851ca336bba301730cd072b366403e98e3739d6a024f6313b8f954" diff --git a/recipes/assimp/config.yml b/recipes/assimp/config.yml index e3725a7b77888..e0bd8dc212a2c 100644 --- a/recipes/assimp/config.yml +++ b/recipes/assimp/config.yml @@ -1,4 +1,6 @@ versions: + "5.4.2": + folder: "5.x" "5.4.1": folder: "5.x" "5.3.1": diff --git a/recipes/aws-c-auth/all/conandata.yml b/recipes/aws-c-auth/all/conandata.yml index 027010126b13f..be2876a831b62 100644 --- a/recipes/aws-c-auth/all/conandata.yml +++ b/recipes/aws-c-auth/all/conandata.yml @@ -1,28 +1,7 @@ sources: - "0.7.8": - url: "https://github.com/awslabs/aws-c-auth/archive/v0.7.8.tar.gz" - sha256: "5db8ab91262b5c055e3634f2c9dc2bc1a3285c2dd5513fdcafcb3e79468dc7de" - "0.7.7": - url: "https://github.com/awslabs/aws-c-auth/archive/v0.7.7.tar.gz" - sha256: "ea3c9e75b59b36aaf9147deec655d1669f197745bbe914cd3b8e234740be29ba" - "0.6.17": - url: "https://github.com/awslabs/aws-c-auth/archive/v0.6.17.tar.gz" - sha256: "b43678ad3a779c9c7fccf8f931c162eaaf4d5d64d2955ac1fcfd32e538545c0f" - "0.6.11": - url: "https://github.com/awslabs/aws-c-auth/archive/v0.6.11.tar.gz" - sha256: "d8a0d373cf8b0ff148a014ae2ba24c51f2e7a598b5b0cf3a6e64482c1cd37f90" - "0.6.8": - url: "https://github.com/awslabs/aws-c-auth/archive/v0.6.8.tar.gz" - sha256: "48b1c0008265ea8e7d7b653b34640ce8111e00d6e0e3f4855f3fba71e1ac5704" + "0.7.16": + url: "https://github.com/awslabs/aws-c-auth/archive/v0.7.16.tar.gz" + sha256: "7ee5afe05482f750dd0406b8b5b55dafb446fc21288f98c0b4118d62795003ba" "0.6.4": url: "https://github.com/awslabs/aws-c-auth/archive/v0.6.4.tar.gz" sha256: "119cec67e85b01af8c01b11d962c610d8e9b183cde96fee77db669cccaa19ac9" - "0.6.0": - url: "https://github.com/awslabs/aws-c-auth/archive/v0.6.0.tar.gz" - sha256: "5f5fff63110c3e8f619385ca563f77886bc101d3e054987eecbb87586e27b651" -patches: - "0.6.17": - - patch_file: "patches/0.6.17-0001-fix-macro-usage.patch" - patch_description: "Fix inconsistent usage of macros" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-auth/pull/181" diff --git a/recipes/aws-c-auth/all/conanfile.py b/recipes/aws-c-auth/all/conanfile.py index edc82083e9c0b..924a52fe64d4d 100644 --- a/recipes/aws-c-auth/all/conanfile.py +++ b/recipes/aws-c-auth/all/conanfile.py @@ -47,23 +47,17 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) <= "0.6.17": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.5.13") - if Version(self.version) < "0.6.17": - self.requires("aws-c-io/0.10.20", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-http/0.6.13", transitive_headers=True) - else: - self.requires("aws-c-io/0.13.4", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-http/0.6.22", transitive_headers=True) - if Version(self.version) >= "0.6.5": - self.requires("aws-c-sdkutils/0.1.3", transitive_headers=True) - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.6.9") - self.requires("aws-c-io/0.13.35", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-http/0.7.14", transitive_headers=True) - self.requires("aws-c-sdkutils/0.1.12", transitive_headers=True) + if self.version == "0.7.16": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.6.14") + self.requires("aws-c-io/0.14.7", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-http/0.8.1", transitive_headers=True) + self.requires("aws-c-sdkutils/0.1.15", transitive_headers=True) + if self.version == "0.6.4": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.5.12") + self.requires("aws-c-io/0.10.9", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-http/0.6.7", transitive_headers=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-auth/all/patches/0.6.17-0001-fix-macro-usage.patch b/recipes/aws-c-auth/all/patches/0.6.17-0001-fix-macro-usage.patch deleted file mode 100644 index bed12b1bd563b..0000000000000 --- a/recipes/aws-c-auth/all/patches/0.6.17-0001-fix-macro-usage.patch +++ /dev/null @@ -1,132 +0,0 @@ -diff --git a/source/aws_signing.c b/source/aws_signing.c -index 940d7be..ecc1144 100644 ---- a/source/aws_signing.c -+++ b/source/aws_signing.c -@@ -2500,7 +2500,7 @@ int aws_verify_sigv4a_signing( - aws_credentials_release(signing_state->config.credentials); - signing_state->config.credentials = ecc_credentials; - if (signing_state->config.credentials == NULL) { -- AWS_LOGF_ERROR(AWS_LS_AUTH_SIGNING, "Unable to create ECC from provided credentials") -+ AWS_LOGF_ERROR(AWS_LS_AUTH_SIGNING, "Unable to create ECC from provided credentials"); - goto done; - } - } -diff --git a/source/credentials_provider_process.c b/source/credentials_provider_process.c -index 655df86..29f99d0 100644 ---- a/source/credentials_provider_process.c -+++ b/source/credentials_provider_process.c -@@ -187,7 +187,7 @@ static struct aws_string *s_get_command(struct aws_allocator *allocator, struct - if (!command_buf.len) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Failed to resolve credentials_process command during process credentials provider initialization.") -+ "Failed to resolve credentials_process command during process credentials provider initialization."); - goto on_finish; - } - -@@ -202,7 +202,7 @@ static struct aws_string *s_get_command(struct aws_allocator *allocator, struct - - AWS_LOGF_DEBUG( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Successfully loaded credentials_process command for process credentials provider.") -+ "Successfully loaded credentials_process command for process credentials provider."); - - on_finish: - aws_string_destroy(profile_name); -diff --git a/source/credentials_provider_sts_web_identity.c b/source/credentials_provider_sts_web_identity.c -index cb03cb5..c3e4697 100644 ---- a/source/credentials_provider_sts_web_identity.c -+++ b/source/credentials_provider_sts_web_identity.c -@@ -231,7 +231,7 @@ static bool s_parse_retryable_error_from_response(struct aws_allocator *allocato - if (xml_parser == NULL) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Failed to init xml parser for sts web identity credentials provider to parse error information.") -+ "Failed to init xml parser for sts web identity credentials provider to parse error information."); - return false; - } - bool get_retryable_error = false; -@@ -330,14 +330,14 @@ static struct aws_credentials *s_parse_credentials_from_response( - if (xml_parser == NULL) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Failed to init xml parser for sts web identity credentials provider to parse error information.") -+ "Failed to init xml parser for sts web identity credentials provider to parse error information."); - return NULL; - } - uint64_t now = UINT64_MAX; - if (aws_sys_clock_get_ticks(&now) != AWS_OP_SUCCESS) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Failed to get sys clock for sts web identity credentials provider to parse error information.") -+ "Failed to get sys clock for sts web identity credentials provider to parse error information."); - goto on_finish; - } - uint64_t now_seconds = aws_timestamp_convert(now, AWS_TIMESTAMP_NANOS, AWS_TIMESTAMP_SECS, NULL); -@@ -998,7 +998,7 @@ static struct sts_web_identity_parameters *s_parameters_new(struct aws_allocator - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, - "Failed to resolve either region, role arn or token file path during sts web identity provider " -- "initialization.") -+ "initialization."); - goto on_finish; - - } else { -@@ -1021,7 +1021,7 @@ static struct sts_web_identity_parameters *s_parameters_new(struct aws_allocator - aws_byte_buf_init_copy_from_cursor(¶meters->role_arn, allocator, aws_byte_cursor_from_string(role_arn))) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Failed to resolve role arn during sts web identity provider initialization.") -+ "Failed to resolve role arn during sts web identity provider initialization."); - goto on_finish; - } - -@@ -1031,7 +1031,7 @@ static struct sts_web_identity_parameters *s_parameters_new(struct aws_allocator - ¶meters->token_file_path, allocator, aws_byte_cursor_from_string(token_file_path))) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Failed to resolve token file path during sts web identity provider initialization.") -+ "Failed to resolve token file path during sts web identity provider initialization."); - goto on_finish; - } - -@@ -1047,7 +1047,7 @@ static struct sts_web_identity_parameters *s_parameters_new(struct aws_allocator - - AWS_LOGF_DEBUG( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Successfully loaded all required parameters for sts web identity credentials provider.") -+ "Successfully loaded all required parameters for sts web identity credentials provider."); - success = true; - - on_finish: -diff --git a/source/credentials_utils.c b/source/credentials_utils.c -index 061e26b..2cb61d6 100644 ---- a/source/credentials_utils.c -+++ b/source/credentials_utils.c -@@ -98,7 +98,7 @@ static bool s_parse_expiration_value_from_json_object( - - if (expiration_cursor.len == 0) { - AWS_LOGF_INFO( -- AWS_LS_AUTH_CREDENTIALS_PROVIDER, "Parsed a credentials json document with empty expiration.") -+ AWS_LS_AUTH_CREDENTIALS_PROVIDER, "Parsed a credentials json document with empty expiration."); - return false; - } - -@@ -211,7 +211,7 @@ struct aws_credentials *aws_parse_credentials_from_aws_json_object( - if (access_key_id_cursor.len == 0 || secrete_access_key_cursor.len == 0) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Parsed an unexpected credentials json document, either access key, secret key is empty.") -+ "Parsed an unexpected credentials json document, either access key, secret key is empty."); - goto done; - } - -@@ -222,7 +222,7 @@ struct aws_credentials *aws_parse_credentials_from_aws_json_object( - aws_json_value_get_string(token, &session_token_cursor); - if (options->token_required && session_token_cursor.len == 0) { - AWS_LOGF_ERROR( -- AWS_LS_AUTH_CREDENTIALS_PROVIDER, "Parsed an unexpected credentials json document with empty token.") -+ AWS_LS_AUTH_CREDENTIALS_PROVIDER, "Parsed an unexpected credentials json document with empty token."); - goto done; - } - } diff --git a/recipes/aws-c-auth/config.yml b/recipes/aws-c-auth/config.yml index 8edcc1ff10f28..485e385b44014 100644 --- a/recipes/aws-c-auth/config.yml +++ b/recipes/aws-c-auth/config.yml @@ -1,15 +1,5 @@ versions: - "0.7.8": - folder: all - "0.7.7": - folder: all - "0.6.17": - folder: all - "0.6.11": - folder: all - "0.6.8": + "0.7.16": folder: all "0.6.4": folder: all - "0.6.0": - folder: all diff --git a/recipes/aws-c-cal/all/conandata.yml b/recipes/aws-c-cal/all/conandata.yml index 0bf0d966b7d3a..e4a0abfc8c668 100644 --- a/recipes/aws-c-cal/all/conandata.yml +++ b/recipes/aws-c-cal/all/conandata.yml @@ -1,56 +1,11 @@ sources: - "0.6.9": - url: "https://github.com/awslabs/aws-c-cal/archive/v0.6.9.tar.gz" - sha256: "46defd807034ca9d873cc1459bc60f0bb4662029f7120db1af464421907fb480" - "0.6.1": - url: "https://github.com/awslabs/aws-c-cal/archive/v0.6.1.tar.gz" - sha256: "52df95150a8548ac35a0e4b6f59fbdebff27e4124c0b7e5eaa969ed3ba62fc82" - "0.5.20": - url: "https://github.com/awslabs/aws-c-cal/archive/v0.5.20.tar.gz" - sha256: "acc352359bd06f8597415c366cf4ec4f00d0b0da92d637039a73323dd55b6cd0" - "0.5.19": - url: "https://github.com/awslabs/aws-c-cal/archive/refs/tags/v0.5.19.tar.gz" - sha256: "23452ab7960c480f1ec0a96ac55bde32d7d27c4a664baeadc248923b19c12086" - "0.5.17": - url: "https://github.com/awslabs/aws-c-cal/archive/v0.5.17.tar.gz" - sha256: "40297da04443d4ee2988d1c5fb0dc4a156d0e4cfaf80e6a1df1867452566d540" - "0.5.13": - url: "https://github.com/awslabs/aws-c-cal/archive/v0.5.13.tar.gz" - sha256: "3aba3954877ea5271ce68361f3bd9c155b422b1149eed403874f6493285ca04d" + "0.6.14": + url: "https://github.com/awslabs/aws-c-cal/archive/v0.6.14.tar.gz" + sha256: "2326304b15bec45b212f6b738020c21afa41f9da295936687e103f9f2efb7b5e" "0.5.12": url: "https://github.com/awslabs/aws-c-cal/archive/v0.5.12.tar.gz" sha256: "350c29a288d5d498bd6574fca659cffc9453bf62691fbde5788399716c2bd132" patches: - "0.6.9": - - patch_file: "patches/0002-apple-corefoundation-0.6.9.patch" - patch_description: "Link to CoreFoundation on Apple" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-cal/pull/126" - "0.6.1": - - patch_file: "patches/0002-apple-corefoundation-0.6.1.patch" - patch_description: "Link to CoreFoundation on Apple" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-cal/pull/126" - "0.5.20": - - patch_file: "patches/0002-apple-corefoundation-0.5.13.patch" - patch_description: "Link to CoreFoundation on Apple" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-cal/pull/126" - "0.5.19": - - patch_file: "patches/0002-apple-corefoundation-0.5.13.patch" - patch_description: "Link to CoreFoundation on Apple" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-cal/pull/126" - "0.5.17": - - patch_file: "patches/0002-apple-corefoundation-0.5.13.patch" - patch_description: "Link to CoreFoundation on Apple" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-cal/pull/126" - "0.5.13": - - patch_file: "patches/0002-apple-corefoundation-0.5.13.patch" - patch_description: "Link to CoreFoundation on Apple" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-cal/pull/126" "0.5.12": - patch_file: "patches/0001-use-openssl-cmake-imported-target.patch" - patch_file: "patches/0002-apple-corefoundation-0.5.11.patch" diff --git a/recipes/aws-c-cal/all/conanfile.py b/recipes/aws-c-cal/all/conanfile.py index 82f0949981b96..c0ea74e4902c8 100644 --- a/recipes/aws-c-cal/all/conanfile.py +++ b/recipes/aws-c-cal/all/conanfile.py @@ -48,13 +48,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) <= "0.5.20": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - elif Version(self.version) <= "0.6.1": - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) - else: - # [>=0.9.7] - self.requires("aws-c-common/0.9.12", transitive_headers=True, transitive_libs=True) + if self.version == "0.6.14": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + if self.version == "0.5.12": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) if self._needs_openssl: self.requires("openssl/[>=1.1 <4]") diff --git a/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.5.13.patch b/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.5.13.patch deleted file mode 100644 index 422624b80de7e..0000000000000 --- a/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.5.13.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -78,7 +78,12 @@ elseif (APPLE) - message(FATAL_ERROR "Security Framework not found") - endif () - -- list(APPEND PLATFORM_LIBS "-framework Security") -+ find_library(COREFOUNDATION_LIB CoreFoundation) -+ if(NOT COREFOUNDATION_LIB) -+ message(FATAL_ERROR "CoreFoundation Framework not found") -+ endif() -+ -+ list(APPEND PLATFORM_LIBS "-framework Security -framework CoreFoundation") - endif() - else () - if (NOT BYO_CRYPTO) ---- a/source/darwin/securityframework_ecc.c -+++ b/source/darwin/securityframework_ecc.c -@@ -7,6 +7,7 @@ - #include - #include - -+#include - #include - #include - diff --git a/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.1.patch b/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.1.patch deleted file mode 100644 index 616d8257a2980..0000000000000 --- a/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.1.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -84,7 +84,12 @@ elseif (APPLE) - message(FATAL_ERROR "Security Framework not found") - endif () - -- list(APPEND PLATFORM_LIBS "-framework Security") -+ find_library(COREFOUNDATION_LIB CoreFoundation) -+ if(NOT COREFOUNDATION_LIB) -+ message(FATAL_ERROR "CoreFoundation Framework not found") -+ endif() -+ -+ list(APPEND PLATFORM_LIBS "-framework Security -framework CoreFoundation") - endif() - else () - if (NOT BYO_CRYPTO) ---- a/source/darwin/securityframework_ecc.c -+++ b/source/darwin/securityframework_ecc.c -@@ -7,6 +7,7 @@ - #include - #include - -+#include - #include - #include - diff --git a/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.9.patch b/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.9.patch deleted file mode 100644 index 1059e3dd42f14..0000000000000 --- a/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.9.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d57a3fd..7d1d5f2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -79,7 +79,11 @@ elseif (APPLE) - message(FATAL_ERROR "Security Framework not found") - endif () - -- list(APPEND PLATFORM_LIBS "-framework Security") -+ find_library(COREFOUNDATION_LIB CoreFoundation) -+ if(NOT COREFOUNDATION_LIB) -+ message(FATAL_ERROR "CoreFoundation Framework not found") -+ endif() -+ list(APPEND PLATFORM_LIBS "-framework Security -framework CoreFoundation") - endif() - else () - if (NOT BYO_CRYPTO) -diff --git a/source/darwin/securityframework_ecc.c b/source/darwin/securityframework_ecc.c -index adedadd..d34531e 100644 ---- a/source/darwin/securityframework_ecc.c -+++ b/source/darwin/securityframework_ecc.c -@@ -6,7 +6,7 @@ - - #include - #include -- -+#include - #include - #include - diff --git a/recipes/aws-c-cal/config.yml b/recipes/aws-c-cal/config.yml index f62f1684b8f2a..05b13d1c5771c 100644 --- a/recipes/aws-c-cal/config.yml +++ b/recipes/aws-c-cal/config.yml @@ -1,15 +1,5 @@ versions: - "0.6.9": - folder: all - "0.6.1": - folder: all - "0.5.20": - folder: all - "0.5.19": - folder: all - "0.5.17": - folder: all - "0.5.13": + "0.6.14": folder: all "0.5.12": folder: all diff --git a/recipes/aws-c-common/all/conandata.yml b/recipes/aws-c-common/all/conandata.yml index 0b34391746ed3..615dbce394f02 100644 --- a/recipes/aws-c-common/all/conandata.yml +++ b/recipes/aws-c-common/all/conandata.yml @@ -1,36 +1,7 @@ sources: - "0.9.12": - url: "https://github.com/awslabs/aws-c-common/archive/v0.9.12.tar.gz" - sha256: "10ef8f5629fb6ac24aa4893f3bb9a8480997e96a58c81043e019bf6b149f4332" - "0.9.6": - url: "https://github.com/awslabs/aws-c-common/archive/v0.9.6.tar.gz" - sha256: "5c30cc066a7f05fb8e4728f93aeed0e0e2698197a6df76237ac4e1200977d090" - "0.9.3": - url: "https://github.com/awslabs/aws-c-common/archive/v0.9.3.tar.gz" - sha256: "389eaac7f64d7d5a91ca3decad6810429eb5a65bbba54798b9beffcb4d1d1ed6" - "0.9.0": - url: "https://github.com/awslabs/aws-c-common/archive/v0.9.0.tar.gz" - sha256: "9b62ab1dcece3107810ea4f4511fe8e1e010a83cb0cb502b6ec685ce752a7b0c" - "0.8.23": - url: "https://github.com/awslabs/aws-c-common/archive/v0.8.23.tar.gz" - sha256: "67455d8149c74b1db3e4dd68db47dc7372de02dd78fbc620f9c7f0270d9d6018" - "0.8.2": - url: "https://github.com/awslabs/aws-c-common/archive/v0.8.2.tar.gz" - sha256: "36edc6e486c43bbb34059dde227e872c0d41ab54f0b3609d38f188cfbbc6d1f8" - "0.7.5": - url: "https://github.com/awslabs/aws-c-common/archive/v0.7.5.tar.gz" - sha256: "e34fd3d3d32e3597f572205aaabbe995e162f4015e14c7328987b596bd25812c" - "0.6.20": - url: "https://github.com/awslabs/aws-c-common/archive/v0.6.20.tar.gz" - sha256: "6eb0b806c78b36a32eec9bcba8d2833e3973491a29d46fe3d11edc3f8d3e7f73" - "0.4.25": - url: "https://github.com/awslabs/aws-c-common/archive/v0.4.25.tar.gz" - sha256: "f85a8f74e42bd983a4615654457f8037876bc6b8dbf890e368bb516cbc2e9844" -patches: - "0.4.25": - - patch_file: "patches/0001-disable-fPIC.patch" - patch_description: "Don't enable position independent code (will be handled by conan)" - patch_type: "conan" - - patch_file: "patches/0002-no-warnings-as-errors.patch" - patch_description: "Don't make all warnings into errors" - patch_type: "portability" + "0.9.15": + url: "https://github.com/awslabs/aws-c-common/archive/v0.9.15.tar.gz" + sha256: "8f36c7a6a5d2e17365759d15591f800d3e76dcaa34a226389b92647cbd92393a" + "0.6.11": + url: "https://github.com/awslabs/aws-c-common/archive/v0.6.11.tar.gz" + sha256: "86159bd1128eee2813f705c275d319e14d1b77017fab46f6ca5dafcc66edaea9" diff --git a/recipes/aws-c-common/all/conanfile.py b/recipes/aws-c-common/all/conanfile.py index 4c7af96e0f6da..f3f589547f059 100644 --- a/recipes/aws-c-common/all/conanfile.py +++ b/recipes/aws-c-common/all/conanfile.py @@ -41,8 +41,6 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if Version(self.version) < "0.6.11": - del self.options.cpu_extensions def configure(self): if self.options.shared: @@ -64,8 +62,7 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_TESTING"] = False tc.variables["AWS_ENABLE_LTO"] = False - if Version(self.version) >= "0.6.0": - tc.variables["AWS_WARNINGS_ARE_ERRORS"] = False + tc.variables["AWS_WARNINGS_ARE_ERRORS"] = False if is_msvc(self): tc.variables["STATIC_CRT"] = is_msvc_static_runtime(self) tc.variables["USE_CPU_EXTENSIONS"] = self.options.get_safe("cpu_extensions", False) diff --git a/recipes/aws-c-common/all/patches/0001-disable-fPIC.patch b/recipes/aws-c-common/all/patches/0001-disable-fPIC.patch deleted file mode 100644 index 1c3c5cada4202..0000000000000 --- a/recipes/aws-c-common/all/patches/0001-disable-fPIC.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- cmake/AwsCFlags.cmake -+++ cmake/AwsCFlags.cmake -@@ -62,8 +62,8 @@ - # Warning disables always go last to avoid future flags re-enabling them - list(APPEND AWS_C_FLAGS -Wno-long-long) - -- # Always enable position independent code, since this code will always end up in a shared lib -- list(APPEND AWS_C_FLAGS -fPIC) -+ # Don't always set fPIC as conan will handle position independent code. -+ # list(APPEND AWS_C_FLAGS -fPIC) - - if (LEGACY_COMPILER_SUPPORT) - list(APPEND AWS_C_FLAGS -Wno-strict-aliasing) diff --git a/recipes/aws-c-common/all/patches/0002-no-warnings-as-errors.patch b/recipes/aws-c-common/all/patches/0002-no-warnings-as-errors.patch deleted file mode 100644 index 8abe45bd0a3d6..0000000000000 --- a/recipes/aws-c-common/all/patches/0002-no-warnings-as-errors.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/cmake/AwsCFlags.cmake -+++ b/cmake/AwsCFlags.cmake -@@ -34,7 +34,7 @@ function(aws_set_common_properties target) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" PARENT_SCOPE) - endif() - -- list(APPEND AWS_C_FLAGS /W4 /WX /MP) -+ list(APPEND AWS_C_FLAGS /W4 /MP) - # /volatile:iso relaxes some implicit memory barriers that MSVC normally applies for volatile accesses - # Since we want to be compatible with user builds using /volatile:iso, use it for the tests. - list(APPEND AWS_C_FLAGS /volatile:iso) -@@ -49,7 +49,7 @@ function(aws_set_common_properties target) - list(APPEND AWS_C_FLAGS "${_FLAGS}") - - else() -- list(APPEND AWS_C_FLAGS -Wall -Werror -Wstrict-prototypes) -+ list(APPEND AWS_C_FLAGS -Wall -Wstrict-prototypes) - - if(NOT SET_PROPERTIES_NO_WEXTRA) - list(APPEND AWS_C_FLAGS -Wextra) diff --git a/recipes/aws-c-common/config.yml b/recipes/aws-c-common/config.yml index 0ba98edce43a1..e7b9215f4c431 100644 --- a/recipes/aws-c-common/config.yml +++ b/recipes/aws-c-common/config.yml @@ -1,19 +1,5 @@ versions: - "0.9.12": + "0.9.15": folder: all - "0.9.6": - folder: all - "0.9.3": - folder: all - "0.9.0": - folder: all - "0.8.23": - folder: all - "0.8.2": - folder: all - "0.7.5": - folder: all - "0.6.20": - folder: all - "0.4.25": + "0.6.11": folder: all diff --git a/recipes/aws-c-compression/all/conandata.yml b/recipes/aws-c-compression/all/conandata.yml index d936f5ef9af18..1bbf0a0f551fb 100644 --- a/recipes/aws-c-compression/all/conandata.yml +++ b/recipes/aws-c-compression/all/conandata.yml @@ -1,13 +1,7 @@ sources: - "0.2.17": - url: "https://github.com/awslabs/aws-c-compression/archive/v0.2.17.tar.gz" - sha256: "703d1671e395ea26f8b0b70d678ed471421685a89e127f8aa125e2b2ecedb0e0" - "0.2.15": - url: "https://github.com/awslabs/aws-c-compression/archive/v0.2.15.tar.gz" - sha256: "11d58a229e2961b2b36493155a981dea2c8a0bc0d113b0073deb8c3189cfa04e" + "0.2.18": + url: "https://github.com/awslabs/aws-c-compression/archive/v0.2.18.tar.gz" + sha256: "517c361f3b7fffca08efd5ad251a20489794f056eab0dfffacc6d5b341df8e86" "0.2.14": url: "https://github.com/awslabs/aws-c-compression/archive/v0.2.14.tar.gz" sha256: "8737863ced57d92f5a0bdde554bf0fe70eaa76aae118fec09a6c361dfc55d0d5" - "0.2.13": - url: "https://github.com/awslabs/aws-c-compression/archive/v0.2.13.tar.gz" - sha256: "6b6ebb223408b48a8b2c74ba7042ff61e5333dc900acd67c40ca1cd4b382c137" diff --git a/recipes/aws-c-compression/all/conanfile.py b/recipes/aws-c-compression/all/conanfile.py index a6b8eb1260a1b..eda11edf4e93e 100644 --- a/recipes/aws-c-compression/all/conanfile.py +++ b/recipes/aws-c-compression/all/conanfile.py @@ -40,10 +40,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) <= "0.2.15": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) + if self.version == "0.2.18": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + if self.version == "0.2.14": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-compression/config.yml b/recipes/aws-c-compression/config.yml index aae181600c27e..ddebab3901e18 100644 --- a/recipes/aws-c-compression/config.yml +++ b/recipes/aws-c-compression/config.yml @@ -1,9 +1,5 @@ versions: - "0.2.17": - folder: all - "0.2.15": + "0.2.18": folder: all "0.2.14": folder: all - "0.2.13": - folder: all diff --git a/recipes/aws-c-event-stream/all/conandata.yml b/recipes/aws-c-event-stream/all/conandata.yml index 6f473b8334656..63e6c5f58778f 100644 --- a/recipes/aws-c-event-stream/all/conandata.yml +++ b/recipes/aws-c-event-stream/all/conandata.yml @@ -1,20 +1,7 @@ sources: - "0.3.2": - url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.3.2.tar.gz" - sha256: "3134b35a45e9f9d974c2b78ee44fd2ea0aebc04df80236b80692aa63bee2092e" - "0.3.1": - url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.3.1.tar.gz" - sha256: "bdbc420efc2572689fb167ac288e982a01224876eb79d80e2411fad4c43e9dc0" - "0.2.20": - url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.2.20.tar.gz" - sha256: "a1384c1f63c82a0a0bc64c3e1bc2a672c75614940b71418d96de9e057e31aafd" - "0.2.15": - url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.2.15.tar.gz" - sha256: "4ff2ada07ede3c6afa4b8e6e20de541e717038307f29b38c27efa7c4d875ee26" - "0.1.5": - url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.1.5.tar.gz" - sha256: "f1b423a487b5d6dca118bfc0d0c6cc596dc476b282258a3228e73a8f730422d4" -patches: - "0.1.5": - - patch_file: "patches/0001-disable-tests-bin.patch" - - patch_file: "patches/0002-use-PROJECT_SOURCE_DIR.patch" + "0.4.2": + url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.4.2.tar.gz" + sha256: "c98b8fa05c2ca10aacfce7327b92a84669c2da95ccb8e7d7b3e3285fcec8beee" + "0.2.7": + url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.2.7.tar.gz" + sha256: "bb5c94cdff70c1985fb0b5f30d81756cedb5a3c3075d37f7e1e2b34e2a33c8c0" diff --git a/recipes/aws-c-event-stream/all/conanfile.py b/recipes/aws-c-event-stream/all/conanfile.py index e7d1df562c48b..7fc076d11b4af 100644 --- a/recipes/aws-c-event-stream/all/conanfile.py +++ b/recipes/aws-c-event-stream/all/conanfile.py @@ -43,19 +43,14 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) < "0.3.1": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - self.requires("aws-checksums/0.1.13") - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) - self.requires("aws-checksums/0.1.17") - if Version(self.version) >= "0.2": - if Version(self.version) < "0.2.11": - self.requires("aws-c-io/0.10.20") - elif Version(self.version) < "0.3.1": - self.requires("aws-c-io/0.13.4") - else: - self.requires("aws-c-io/0.13.35") + if self.version == "0.4.2": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + self.requires("aws-checksums/0.1.18") + self.requires("aws-c-io/0.14.7") + if self.version == "0.2.7": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) + self.requires("aws-checksums/0.1.12") + self.requires("aws-c-io/0.10.9") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-event-stream/all/patches/0001-disable-tests-bin.patch b/recipes/aws-c-event-stream/all/patches/0001-disable-tests-bin.patch deleted file mode 100644 index 21eae44486c93..0000000000000 --- a/recipes/aws-c-event-stream/all/patches/0001-disable-tests-bin.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -112,14 +112,18 @@ - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" - DESTINATION "${LIBRARY_DIRECTORY}/${CMAKE_PROJECT_NAME}/cmake/" - COMPONENT Development) - - --include(CTest) --enable_testing() --add_subdirectory(tests) -+if(BUILD_TESTING) -+ include(CTest) -+ enable_testing() -+ add_subdirectory(tests) -+endif() - - if(NOT MSVC) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) - endif() - --add_subdirectory(bin) -+if(BUILD_BINARIES) -+ add_subdirectory(bin) -+endif() diff --git a/recipes/aws-c-event-stream/all/patches/0002-use-PROJECT_SOURCE_DIR.patch b/recipes/aws-c-event-stream/all/patches/0002-use-PROJECT_SOURCE_DIR.patch deleted file mode 100644 index f2b60bb0f9a1d..0000000000000 --- a/recipes/aws-c-event-stream/all/patches/0002-use-PROJECT_SOURCE_DIR.patch +++ /dev/null @@ -1,61 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -70,25 +70,25 @@ - ${AWS_EVENT_STREAM_SRC} - ) - --add_library(${CMAKE_PROJECT_NAME} ${EVENT_STREAM_SRC}) --aws_set_common_properties(${CMAKE_PROJECT_NAME}) --aws_add_sanitizers(${CMAKE_PROJECT_NAME}) --aws_prepare_symbol_visibility_args(${CMAKE_PROJECT_NAME} "AWS_EVENT_STREAM") -+add_library(${PROJECT_NAME} ${EVENT_STREAM_SRC}) -+aws_set_common_properties(${PROJECT_NAME}) -+aws_add_sanitizers(${PROJECT_NAME}) -+aws_prepare_symbol_visibility_args(${PROJECT_NAME} "AWS_EVENT_STREAM") - --target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC -+target_include_directories(${PROJECT_NAME} PUBLIC - $ - $) - - --set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES VERSION 1.0.0) --set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES SOVERSION 0unstable) -+set_target_properties(${PROJECT_NAME} PROPERTIES VERSION 1.0.0) -+set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 0unstable) - - find_package(aws-c-common REQUIRED) - find_package(aws-checksums REQUIRED) - --target_link_libraries(${CMAKE_PROJECT_NAME} PUBLIC AWS::aws-c-common AWS::aws-checksums) -+target_link_libraries(${PROJECT_NAME} PUBLIC AWS::aws-c-common AWS::aws-checksums) - --aws_prepare_shared_lib_exports(${CMAKE_PROJECT_NAME}) -+aws_prepare_shared_lib_exports(${PROJECT_NAME}) - - install(FILES ${AWS_EVENT_STREAM_HEADERS} - DESTINATION "include/aws/event-stream" -@@ -100,17 +100,17 @@ - set (TARGET_DIR "static") - endif() - --install(EXPORT "${CMAKE_PROJECT_NAME}-targets" -- DESTINATION "${LIBRARY_DIRECTORY}/${CMAKE_PROJECT_NAME}/cmake/${TARGET_DIR}/" -+install(EXPORT "${PROJECT_NAME}-targets" -+ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}/" - NAMESPACE AWS:: - COMPONENT Development) - --configure_file("cmake/${CMAKE_PROJECT_NAME}-config.cmake" -- "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" -+configure_file("cmake/${PROJECT_NAME}-config.cmake" -+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" - @ONLY) - --install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" -- DESTINATION "${LIBRARY_DIRECTORY}/${CMAKE_PROJECT_NAME}/cmake/" -+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" -+ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/" - COMPONENT Development) - - diff --git a/recipes/aws-c-event-stream/all/test_package/test_package.c b/recipes/aws-c-event-stream/all/test_package/test_package.c index 1b923438da34f..2cb953a451bf1 100644 --- a/recipes/aws-c-event-stream/all/test_package/test_package.c +++ b/recipes/aws-c-event-stream/all/test_package/test_package.c @@ -15,7 +15,7 @@ int main() { int res = aws_event_stream_message_init(&message, allocator, NULL, NULL); if (res != 0) { - fprintf(stderr, "Failed to init messag\n"); + fprintf(stderr, "Failed to init message\n"); } if (sizeof(expected_data) != aws_event_stream_message_total_length(&message)) { @@ -31,5 +31,7 @@ int main() { } } + aws_event_stream_message_clean_up(&message); + return EXIT_SUCCESS; } diff --git a/recipes/aws-c-event-stream/config.yml b/recipes/aws-c-event-stream/config.yml index 98f41919c3397..015334b5552b6 100644 --- a/recipes/aws-c-event-stream/config.yml +++ b/recipes/aws-c-event-stream/config.yml @@ -1,11 +1,5 @@ versions: - "0.3.2": + "0.4.2": folder: all - "0.3.1": - folder: all - "0.2.20": - folder: all - "0.2.15": - folder: all - "0.1.5": + "0.2.7": folder: all diff --git a/recipes/aws-c-http/all/conandata.yml b/recipes/aws-c-http/all/conandata.yml index 6ee734ea998ca..515176a226691 100644 --- a/recipes/aws-c-http/all/conandata.yml +++ b/recipes/aws-c-http/all/conandata.yml @@ -2,21 +2,6 @@ sources: "0.8.1": url: "https://github.com/awslabs/aws-c-http/archive/v0.8.1.tar.gz" sha256: "83fb47e2d7956469bb328f16dea96663e96f8f20dc60dc4e9676b82804588530" - "0.7.14": - url: "https://github.com/awslabs/aws-c-http/archive/v0.7.14.tar.gz" - sha256: "afb935395c93427ac0853d6363900a71816a0508f18c86e84da0e6ebe7271429" - "0.6.22": - url: "https://github.com/awslabs/aws-c-http/archive/v0.6.22.tar.gz" - sha256: "a178fd04bd1618469cd21afc5b84cbe436d1f9d9e036fefbd3a8f00356da4d4c" - "0.6.13": - url: "https://github.com/awslabs/aws-c-http/archive/v0.6.13.tar.gz" - sha256: "8c69f8fc58b7073039e598383da3e1fd9b23f392cb992dbe769a7b80f342dbaf" - "0.6.10": - url: "https://github.com/awslabs/aws-c-http/archive/v0.6.10.tar.gz" - sha256: "4413faf2b8f6a83c898bb535cf83542fa548d7ecc1acf681dc79b7959a07231a" "0.6.7": url: "https://github.com/awslabs/aws-c-http/archive/v0.6.7.tar.gz" sha256: "2244d1e26ce5b5f40f96e570b1c4332a07c645ef744644d5b90b089d3695ec3b" - "0.6.5": - url: "https://github.com/awslabs/aws-c-http/archive/v0.6.5.tar.gz" - sha256: "9cb82f1cfe1342f4bbd58f51b74beaeb6a544fb6792c48f9b0d3967619b33221" diff --git a/recipes/aws-c-http/all/conanfile.py b/recipes/aws-c-http/all/conanfile.py index f9311547cb20c..2c2aed337ab03 100644 --- a/recipes/aws-c-http/all/conanfile.py +++ b/recipes/aws-c-http/all/conanfile.py @@ -40,19 +40,15 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) <= "0.6.22": - self.requires("aws-c-compression/0.2.15") - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - else: - self.requires("aws-c-compression/0.2.17") - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) - - if Version(self.version) <= "0.6.13": - self.requires("aws-c-io/0.10.20", transitive_headers=True, transitive_libs=True) - elif Version(self.version) <= "0.6.22": - self.requires("aws-c-io/0.13.4", transitive_headers=True, transitive_libs=True) - else: - self.requires("aws-c-io/0.13.35", transitive_headers=True, transitive_libs=True) + if self.version == "0.8.1": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-compression/0.2.18") + self.requires("aws-c-cal/0.6.14") + self.requires("aws-c-io/0.14.7", transitive_headers=True, transitive_libs=True) + if self.version == "0.6.7": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-compression/0.2.14") + self.requires("aws-c-io/0.10.9", transitive_headers=True, transitive_libs=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-http/config.yml b/recipes/aws-c-http/config.yml index 9ef90600a046d..b4cfbdf31c4fc 100644 --- a/recipes/aws-c-http/config.yml +++ b/recipes/aws-c-http/config.yml @@ -1,15 +1,5 @@ versions: "0.8.1": folder: all - "0.7.14": - folder: all - "0.6.22": - folder: all - "0.6.13": - folder: all - "0.6.10": - folder: all "0.6.7": folder: all - "0.6.5": - folder: all diff --git a/recipes/aws-c-io/all/conandata.yml b/recipes/aws-c-io/all/conandata.yml index 1e15f1d87d7c3..60d48a7600965 100644 --- a/recipes/aws-c-io/all/conandata.yml +++ b/recipes/aws-c-io/all/conandata.yml @@ -1,19 +1,7 @@ sources: - "0.13.35": - url: "https://github.com/awslabs/aws-c-io/archive/v0.13.35.tar.gz" - sha256: "a9232dbbb3324de36a280859a4ea84dd2b75e47961805f1cffe0f3a7e1831711" - "0.13.32": - url: "https://github.com/awslabs/aws-c-io/archive/v0.13.32.tar.gz" - sha256: "2a6b18c544d014ca4f55cb96002dbbc1e52a2120541c809fa974cb0838ea72cc" - "0.13.4": - url: "https://github.com/awslabs/aws-c-io/archive/v0.13.4.tar.gz" - sha256: "133bd0aa46caa2041962cd4f6d076209686ce2934af82f86d1a258df4cbdce8b" - "0.11.2": - url: "https://github.com/awslabs/aws-c-io/archive/v0.11.2.tar.gz" - sha256: "b60270d23b6e2f4a5d80e64ca6538ba114cd6044b53752964c940f87e59bf0d9" - "0.10.20": - url: "https://github.com/awslabs/aws-c-io/archive/v0.10.20.tar.gz" - sha256: "293248ef96166826370223865bff2537bea5e08f6913919884c53add8238ba97" - "0.10.13": - url: "https://github.com/awslabs/aws-c-io/archive/v0.10.13.tar.gz" - sha256: "ee34a93190e35a5c372ba73661dd69c48986e051a4b26dedb62bc5aa78f1660f" + "0.14.7": + url: "https://github.com/awslabs/aws-c-io/archive/v0.14.7.tar.gz" + sha256: "ecf1f660d7d43913aa8a416be6a2027101ce87c3b241344342d608335b4df7d4" + "0.10.9": + url: "https://github.com/awslabs/aws-c-io/archive/v0.10.9.tar.gz" + sha256: "c64464152abe8b7e23f10bc026ed54a15eaf0ec0aae625d28e2caf4489090327" diff --git a/recipes/aws-c-io/all/conanfile.py b/recipes/aws-c-io/all/conanfile.py index 36c3965b9abd8..a0bc513a7bf85 100644 --- a/recipes/aws-c-io/all/conanfile.py +++ b/recipes/aws-c-io/all/conanfile.py @@ -1,7 +1,6 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import get, copy, rmdir, save -from conan.tools.scm import Version import os import textwrap @@ -40,17 +39,16 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - # the versions of aws-c-common and aws-c-io are tied since aws-c-common/0.6.12 and aws-c-io/0.10.10 - # Please refer https://github.com/conan-io/conan-center-index/issues/7763 - if Version(self.version) <= "0.13.4": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.5.13") - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.6.9", transitive_headers=True, transitive_libs=True) - - if self.settings.os in ["Linux", "FreeBSD", "Android"]: - self.requires("s2n/1.3.55") + if self.version == "0.14.7": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.6.14") + if self.settings.os in ["Linux", "FreeBSD", "Android"]: + self.requires("s2n/1.4.1") + if self.version == "0.10.9": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.5.12") + if self.settings.os in ["Linux", "FreeBSD", "Android"]: + self.requires("s2n/1.3.55") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-io/config.yml b/recipes/aws-c-io/config.yml index 8a602cc8c0e60..659ff80091e7d 100644 --- a/recipes/aws-c-io/config.yml +++ b/recipes/aws-c-io/config.yml @@ -1,13 +1,5 @@ versions: - "0.13.35": + "0.14.7": folder: all - "0.13.32": - folder: all - "0.13.4": - folder: all - "0.11.2": - folder: all - "0.10.20": - folder: all - "0.10.13": + "0.10.9": folder: all diff --git a/recipes/aws-c-mqtt/all/conandata.yml b/recipes/aws-c-mqtt/all/conandata.yml index 275052c56df7c..d212e8cf3426a 100644 --- a/recipes/aws-c-mqtt/all/conandata.yml +++ b/recipes/aws-c-mqtt/all/conandata.yml @@ -1,19 +1,7 @@ sources: - "0.9.10": - url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.9.10.tar.gz" - sha256: "a8f92cb045e2c1e0b7e87e5c43ca373eb020014b5d3ebd75ed67ffff430d9ab6" - "0.8.12": - url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.8.12.tar.gz" - sha256: "df02de478ab1806bb57bcb78e5faa21b567716dcb64f8a52ae90a2b84f43cba1" - "0.7.12": - url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.7.12.tar.gz" - sha256: "cf80f1b4f37aa8a6b8698315fae32cbf2bd944b67784f07b5762f392f18e64df" - "0.7.10": - url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.7.10.tar.gz" - sha256: "95667477e17bc99d49a1d6674d7fb98f9a0379b6966cb2ed4863152e959d9e8f" - "0.7.9": - url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.7.9.tar.gz" - sha256: "8556ae7c2b30ebb4ccb61becb120a848ea33315f7cf85436ebe5f21b75ab09c4" - "0.7.6": - url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.7.6.tar.gz" - sha256: "a02c0525f7ddcdc058cd9f507b2f3a8be0383fc946920ed32c9d780cc29703ac" + "0.10.3": + url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.10.3.tar.gz" + sha256: "bb938d794b0757d669b5877526363dc6f6f0e43869ca19fc196ffd0f7a35f5b9" + "0.7.8": + url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.7.8.tar.gz" + sha256: "bf5ed63706f3f1aed86a878462fac78e5f045dfc34567bfb86c38f8b9d9d51ef" diff --git a/recipes/aws-c-mqtt/all/conanfile.py b/recipes/aws-c-mqtt/all/conanfile.py index 4740c4414b3ba..1405aeca68d5a 100644 --- a/recipes/aws-c-mqtt/all/conanfile.py +++ b/recipes/aws-c-mqtt/all/conanfile.py @@ -41,16 +41,16 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) <= "0.7.12": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.5.13") - self.requires("aws-c-io/0.10.20", transitive_headers=True) - self.requires("aws-c-http/0.6.13") - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.6.9") - self.requires("aws-c-io/0.13.35", transitive_headers=True) - self.requires("aws-c-http/0.7.14") + if self.version == "0.10.3": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.6.14") + self.requires("aws-c-io/0.14.7", transitive_headers=True) + self.requires("aws-c-http/0.8.1") + if self.version == "0.7.8": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.5.12") + self.requires("aws-c-io/0.10.9", transitive_headers=True) + self.requires("aws-c-http/0.6.7") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-mqtt/config.yml b/recipes/aws-c-mqtt/config.yml index 788eeccfb0963..a54bded63fa25 100644 --- a/recipes/aws-c-mqtt/config.yml +++ b/recipes/aws-c-mqtt/config.yml @@ -1,13 +1,5 @@ versions: - "0.9.10": + "0.10.3": folder: all - "0.8.12": - folder: all - "0.7.12": - folder: all - "0.7.10": - folder: all - "0.7.9": - folder: all - "0.7.6": + "0.7.8": folder: all diff --git a/recipes/aws-c-s3/all/conandata.yml b/recipes/aws-c-s3/all/conandata.yml index 2433ee657645c..bacf4d1932974 100644 --- a/recipes/aws-c-s3/all/conandata.yml +++ b/recipes/aws-c-s3/all/conandata.yml @@ -1,19 +1,7 @@ sources: - "0.4.5": - url: "https://github.com/awslabs/aws-c-s3/archive/v0.4.5.tar.gz" - sha256: "c9b588f5761ae6754dab2b51124784be78887f054856f02e44b6e51c25873055" - "0.3.24": - url: "https://github.com/awslabs/aws-c-s3/archive/v0.3.24.tar.gz" - sha256: "09803db4af98bba0af263434e2de432cdccdb3ab709411abba8e05d34840f815" - "0.1.49": - url: "https://github.com/awslabs/aws-c-s3/archive/v0.1.49.tar.gz" - sha256: "71acbba41a02477a6c352172da561bc2138bf239b936490c773d7aaa83afc9ab" - "0.1.37": - url: "https://github.com/awslabs/aws-c-s3/archive/v0.1.37.tar.gz" - sha256: "2c35100c1739300e438d47f49aaa2c374001416a79fe3c6f27d79371fb2ac90b" - "0.1.29": - url: "https://github.com/awslabs/aws-c-s3/archive/v0.1.29.tar.gz" - sha256: "bcbc38d091ad994fec2789bffd1d99e157c5e29a60685e836f028006e531bc60" - "0.1.27": - url: "https://github.com/awslabs/aws-c-s3/archive/v0.1.27.tar.gz" - sha256: "8fccbf967c3b29f0feaa1ba3de158b7ead805c3b4302c45b7cad3429f045920c" + "0.5.5": + url: "https://github.com/awslabs/aws-c-s3/archive/v0.5.5.tar.gz" + sha256: "81d3913826953cb634ef1183a0c241d5e117419a877b625d69d7e1e54bbe5219" + "0.1.26": + url: "https://github.com/awslabs/aws-c-s3/archive/v0.1.26.tar.gz" + sha256: "68467095ce2c523caa9ecac27453cd83f4c195c33c6ab8c8b0fa6534565d19bf" diff --git a/recipes/aws-c-s3/all/conanfile.py b/recipes/aws-c-s3/all/conanfile.py index 1813ec30adc8a..957de6e997292 100644 --- a/recipes/aws-c-s3/all/conanfile.py +++ b/recipes/aws-c-s3/all/conanfile.py @@ -40,28 +40,19 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) < "0.3.24": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.5.13") - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.6.9") - if Version(self.version) < "0.1.49": - self.requires("aws-c-auth/0.6.11", transitive_headers=True) - self.requires("aws-c-http/0.6.13") - self.requires("aws-c-io/0.10.20", transitive_headers=True) - elif Version(self.version) < "0.3.24": - self.requires("aws-c-auth/0.6.17", transitive_headers=True) - self.requires("aws-c-http/0.6.22") - self.requires("aws-c-io/0.13.4", transitive_headers=True) - else: - self.requires("aws-c-auth/0.7.8", transitive_headers=True) - self.requires("aws-c-http/0.7.14") - self.requires("aws-c-io/0.13.35", transitive_headers=True) - if Version(self.version) >= "0.3.24": - self.requires("aws-checksums/0.1.17") - elif Version(self.version) >= "0.1.36": - self.requires("aws-checksums/0.1.13") + if self.version == "0.5.5": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.6.14") + self.requires("aws-c-auth/0.7.16", transitive_headers=True) + self.requires("aws-c-http/0.8.1") + self.requires("aws-c-io/0.14.7", transitive_headers=True) + self.requires("aws-checksums/0.1.18") + if self.version == "0.1.26": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.5.12") + self.requires("aws-c-auth/0.6.4", transitive_headers=True) + self.requires("aws-c-http/0.6.7") + self.requires("aws-c-io/0.10.9", transitive_headers=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-s3/config.yml b/recipes/aws-c-s3/config.yml index 9dc59a14978b9..31b0a063a88bd 100644 --- a/recipes/aws-c-s3/config.yml +++ b/recipes/aws-c-s3/config.yml @@ -1,13 +1,5 @@ versions: - "0.4.5": + "0.5.5": folder: all - "0.3.24": - folder: all - "0.1.49": - folder: all - "0.1.37": - folder: all - "0.1.29": - folder: all - "0.1.27": + "0.1.26": folder: all diff --git a/recipes/aws-c-sdkutils/all/conandata.yml b/recipes/aws-c-sdkutils/all/conandata.yml index 4f2cc09884562..36557b2156d5c 100644 --- a/recipes/aws-c-sdkutils/all/conandata.yml +++ b/recipes/aws-c-sdkutils/all/conandata.yml @@ -1,13 +1,4 @@ sources: - "0.1.12": - url: "https://github.com/awslabs/aws-c-sdkutils/archive/v0.1.12.tar.gz" - sha256: "c876c3ce2918f1181c24829f599c8f06e29733f0bd6556d4c4fb523390561316" - "0.1.3": - url: "https://github.com/awslabs/aws-c-sdkutils/archive/v0.1.3.tar.gz" - sha256: "13d99c0877424a8fad40f312762968012dd54ec60a4438fb601ee65ff8b2484b" - "0.1.2": - url: "https://github.com/awslabs/aws-c-sdkutils/archive/refs/tags/v0.1.2.tar.gz" - sha256: "d654670c145212ed3ce0699a988b9f83ebf3e7c44ed74d4d0772dc95ad46b38e" - "0.1.1": - url: "https://github.com/awslabs/aws-c-sdkutils/archive/refs/tags/v0.1.1.tar.gz" - sha256: "201a5f694c912c952f50abab54fa0e576db75ddf6e8710c589896038ff9673f7" + "0.1.15": + url: "https://github.com/awslabs/aws-c-sdkutils/archive/v0.1.15.tar.gz" + sha256: "15fa30b8b0a357128388f2f40ab0ba3df63742fd333cc2f89cb91a9169f03bdc" diff --git a/recipes/aws-c-sdkutils/all/conanfile.py b/recipes/aws-c-sdkutils/all/conanfile.py index e2bfcefef6878..1aca7b380c09d 100644 --- a/recipes/aws-c-sdkutils/all/conanfile.py +++ b/recipes/aws-c-sdkutils/all/conanfile.py @@ -40,10 +40,8 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) <= "0.1.3": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) + if self.version == "0.1.15": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-sdkutils/config.yml b/recipes/aws-c-sdkutils/config.yml index c2aa05a42982f..d90a2c03c7832 100644 --- a/recipes/aws-c-sdkutils/config.yml +++ b/recipes/aws-c-sdkutils/config.yml @@ -1,9 +1,3 @@ versions: - "0.1.12": - folder: all - "0.1.3": - folder: all - "0.1.2": - folder: all - "0.1.1": + "0.1.15": folder: all diff --git a/recipes/aws-checksums/all/conandata.yml b/recipes/aws-checksums/all/conandata.yml index 989708680b889..19b138c8eb788 100644 --- a/recipes/aws-checksums/all/conandata.yml +++ b/recipes/aws-checksums/all/conandata.yml @@ -1,27 +1,7 @@ sources: - "0.1.17": - url: "https://github.com/awslabs/aws-checksums/archive/v0.1.17.tar.gz" - sha256: "83c1fbae826631361a529e9565e64a942c412baaec6b705ae5da3f056b97b958" - "0.1.13": - url: "https://github.com/awslabs/aws-checksums/archive/v0.1.13.tar.gz" - sha256: "0f897686f1963253c5069a0e495b85c31635ba146cd3ac38cc2ea31eaf54694d" + "0.1.18": + url: "https://github.com/awslabs/aws-checksums/archive/v0.1.18.tar.gz" + sha256: "bdba9d0a8b8330a89c6b8cbc00b9aa14f403d3449b37ff2e0d96d62a7301b2ee" "0.1.12": url: "https://github.com/awslabs/aws-checksums/archive/v0.1.12.tar.gz" sha256: "394723034b81cc7cd528401775bc7aca2b12c7471c92350c80a0e2fb9d2909fe" - "0.1.11": - url: "https://github.com/awslabs/aws-checksums/archive/v0.1.11.tar.gz" - sha256: "9312e305428655bcea1f81524c3a8f617ce5299b903187047078929e850fb6d4" - "0.1.5": - url: "https://github.com/awslabs/aws-checksums/archive/v0.1.5.tar.gz" - sha256: "6e6bed6f75cf54006b6bafb01b3b96df19605572131a2260fddaf0e87949ced0" -patches: - "0.1.5": - - patch_file: "patches/0001-use-PROJECT_SOURCE_DIR.patch" - patch_description: "use PROJECT_NAME instead of CMAKE_PROJECT_NAME" - patch_type: "conan" - - patch_file: "patches/0002-disable-overriding-fPIC.patch" - patch_description: "disable overriding -fPIC" - patch_type: "conan" - - patch_file: "patches/0003-disable-building-tests.patch" - patch_description: "build no tests" - patch_type: "conan" diff --git a/recipes/aws-checksums/all/conanfile.py b/recipes/aws-checksums/all/conanfile.py index e2711f6d5488f..135cd94267f12 100644 --- a/recipes/aws-checksums/all/conanfile.py +++ b/recipes/aws-checksums/all/conanfile.py @@ -46,10 +46,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) < "0.1.17": - self.requires("aws-c-common/0.8.2") - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True) + if self.version == "0.1.18": + self.requires("aws-c-common/0.9.15", transitive_headers=True) + if self.version == "0.1.12": + self.requires("aws-c-common/0.6.11", transitive_headers=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -62,7 +62,6 @@ def generate(self): deps.generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/aws-checksums/all/patches/0001-use-PROJECT_SOURCE_DIR.patch b/recipes/aws-checksums/all/patches/0001-use-PROJECT_SOURCE_DIR.patch deleted file mode 100644 index 9a309a9f74658..0000000000000 --- a/recipes/aws-checksums/all/patches/0001-use-PROJECT_SOURCE_DIR.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -98,7 +98,7 @@ - target_compile_definitions(aws-checksums PRIVATE "-DDEBUG_BUILD") - endif() - --target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC -+target_include_directories(${PROJECT_NAME} PUBLIC - $ - $) - -@@ -129,7 +129,7 @@ - endif() - - install(FILES ${AWS_CHECKSUMS_HEADERS} DESTINATION "include/aws/checksums") --aws_prepare_shared_lib_exports(${CMAKE_PROJECT_NAME}) -+aws_prepare_shared_lib_exports(${PROJECT_NAME}) - - if (BUILD_SHARED_LIBS) - set (TARGET_DIR "shared") -@@ -137,14 +137,14 @@ - set (TARGET_DIR "static") - endif() - --install(EXPORT "${CMAKE_PROJECT_NAME}-targets" -- DESTINATION "${LIBRARY_DIRECTORY}/${CMAKE_PROJECT_NAME}/cmake/${TARGET_DIR}/" -+install(EXPORT "${PROJECT_NAME}-targets" -+ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}/" - NAMESPACE AWS::) - --configure_file("cmake/${CMAKE_PROJECT_NAME}-config.cmake" -- "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" -+configure_file("cmake/${PROJECT_NAME}-config.cmake" -+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" - @ONLY) - --install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" -- DESTINATION "${LIBRARY_DIRECTORY}/${CMAKE_PROJECT_NAME}/cmake/") -+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" -+ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/") - diff --git a/recipes/aws-checksums/all/patches/0002-disable-overriding-fPIC.patch b/recipes/aws-checksums/all/patches/0002-disable-overriding-fPIC.patch deleted file mode 100644 index 31249bcf0671b..0000000000000 --- a/recipes/aws-checksums/all/patches/0002-disable-overriding-fPIC.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -83,9 +83,9 @@ - target_compile_definitions(aws-checksums PRIVATE "-DAWS_CHECKSUMS_EXPORTS") - endif() - --if(NOT MSVC) -- target_compile_options(aws-checksums PRIVATE -fPIC) --endif() -+#if(NOT MSVC) -+# target_compile_options(aws-checksums PRIVATE -fPIC) -+#endif() - - if(BUILD_JNI_BINDINGS) - find_package(JNI) diff --git a/recipes/aws-checksums/all/patches/0003-disable-building-tests.patch b/recipes/aws-checksums/all/patches/0003-disable-building-tests.patch deleted file mode 100644 index f62f7e4733e64..0000000000000 --- a/recipes/aws-checksums/all/patches/0003-disable-building-tests.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -109,7 +109,7 @@ - file(GLOB TESTS ${TEST_HDRS} ${TEST_SRC}) - - include_directories(${CMAKE_CURRENT_SOURCE_DIR}/tests) --add_executable(aws-checksums-tests ${TESTS}) -+add_executable(aws-checksums-tests EXCLUDE_FROM_ALL ${TESTS}) - target_compile_options(aws-checksums-tests PRIVATE ${_FLAGS}) - target_link_libraries(aws-checksums-tests aws-checksums) - set_target_properties(aws-checksums-tests PROPERTIES LINKER_LANGUAGE C) diff --git a/recipes/aws-checksums/config.yml b/recipes/aws-checksums/config.yml index efe23bdebe7e1..932ab94596844 100644 --- a/recipes/aws-checksums/config.yml +++ b/recipes/aws-checksums/config.yml @@ -1,11 +1,5 @@ versions: - "0.1.17": - folder: all - "0.1.13": + "0.1.18": folder: all "0.1.12": folder: all - "0.1.11": - folder: all - "0.1.5": - folder: all diff --git a/recipes/aws-crt-cpp/all/conandata.yml b/recipes/aws-crt-cpp/all/conandata.yml index 9126f56004fa0..a6902dfc92a08 100644 --- a/recipes/aws-crt-cpp/all/conandata.yml +++ b/recipes/aws-crt-cpp/all/conandata.yml @@ -1,29 +1,13 @@ sources: - "0.24.1": - url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.24.1.tar.gz" - sha256: "c627fbc76fc31332801e29872203a11ce0234b7c17e75811277aa913f1550d6f" - "0.17.23": - url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.17.23.tar.gz" - sha256: "28061c3efa493519cfae46e4ea96389f03a81eeec7613d7da861dd8c5f4f6598" - "0.17.12": - url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.17.12.tar.gz" - sha256: "acdd8b83198c5a471f92702bc4101828fe55361005764143704c39acd6f80ffc" - "0.14.3": - url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.14.3.tar.gz" - sha256: "3ea16c43e691bab0c373ba1ad072f6535390c516ebda658dfaf4d074d920e0fb" + "0.26.9": + url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.26.9.tar.gz" + sha256: "5b5760d34fbbfcc971f561296e828de4c788750472fd9bd3ac20068a083620f2" + "0.17.1a": + url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.17.1a.tar.gz" + sha256: "64053c8237e350cfbec24984a3696aaf914bfa64e6200ef19bebe9cf5bb0692b" patches: - "0.24.1": - - patch_file: "patches/0.24.1-fix-cast-error.patch" - patch_description: "fix const cast error" - patch_type: "portability" - - patch_file: "patches/0.24.1-disable-sanitizers.patch" - patch_description: "disable sanitizers" - patch_type: "conan" - "0.17.23": - - patch_file: "patches/0.17.23-fix-cast-error.patch" - patch_description: "fix const cast error" - patch_type: "portability" - "0.17.12": - - patch_file: "patches/0.17.12-fix-cast-error.patch" - patch_description: "fix const cast error" - patch_type: "portability" + "0.17.1a": + - patch_file: "patches/0.17.23-fix-cpp20-windows.patch" + patch_description: "Fixes cpp 20 builds for windows." + patch_type: "bugfix" + patch_source: "https://github.com/awslabs/aws-crt-cpp/pull/364" diff --git a/recipes/aws-crt-cpp/all/conanfile.py b/recipes/aws-crt-cpp/all/conanfile.py index 459770aa822b1..92652a3ebbf87 100644 --- a/recipes/aws-crt-cpp/all/conanfile.py +++ b/recipes/aws-crt-cpp/all/conanfile.py @@ -48,29 +48,31 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) < "0.24.1": - self.requires("aws-c-cal/0.5.13", transitive_headers=True) - self.requires("aws-c-common/0.8.2", transitive_headers=True) - self.requires("aws-checksums/0.1.13") - else: - self.requires("aws-c-cal/0.6.9", transitive_headers=True) - self.requires("aws-c-common/0.9.6", transitive_headers=True) - self.requires("aws-checksums/0.1.17") - if Version(self.version) < "0.17.29": - self.requires("aws-c-auth/0.6.11", transitive_headers=True) + if self.version == "0.26.9": + # From add_subdirectory() calls in https://github.com/awslabs/aws-crt-cpp/blob/v0.26.9/CMakeLists.txt + self.requires("aws-c-common/0.9.15") + self.requires("aws-c-sdkutils/0.1.15") + self.requires("aws-c-io/0.14.7", transitive_headers=True) + self.requires("aws-c-cal/0.6.14") + self.requires("aws-c-compression/0.2.18") + self.requires("aws-c-http/0.8.1", transitive_headers=True) + self.requires("aws-c-auth/0.7.16", transitive_headers=True) + self.requires("aws-c-mqtt/0.10.3", transitive_headers=True) + self.requires("aws-checksums/0.1.18") + self.requires("aws-c-event-stream/0.4.2") + self.requires("aws-c-s3/0.5.5") + if self.version == "0.17.1a": + # From add_subdirectory() calls in https://github.com/awslabs/aws-crt-cpp/blob/v0.17.1a/CMakeLists.txt#L95 + self.requires("aws-c-http/0.6.7", transitive_headers=True) + self.requires("aws-c-mqtt/0.7.8", transitive_headers=True) + self.requires("aws-c-cal/0.5.12") + self.requires("aws-c-compression/0.2.14") + self.requires("aws-c-auth/0.6.4", transitive_headers=True) + self.requires("aws-c-common/0.6.11") + self.requires("aws-c-io/0.10.9", transitive_headers=True) + self.requires("aws-checksums/0.1.12") self.requires("aws-c-event-stream/0.2.7") - self.requires("aws-c-http/0.6.13", transitive_headers=True) - self.requires("aws-c-io/0.10.20", transitive_headers=True) - self.requires("aws-c-mqtt/0.7.10", transitive_headers=True) - self.requires("aws-c-s3/0.1.37") - else: - self.requires("aws-c-auth/0.7.8", transitive_headers=True) - self.requires("aws-c-event-stream/0.3.1") - self.requires("aws-c-http/0.7.14", transitive_headers=True) - self.requires("aws-c-io/0.13.35", transitive_headers=True) - self.requires("aws-c-mqtt/0.9.10", transitive_headers=True) - self.requires("aws-c-s3/0.3.24") - self.requires("aws-c-sdkutils/0.1.12") + self.requires("aws-c-s3/0.1.26") def validate(self): if self.settings.compiler.get_safe("cppstd"): diff --git a/recipes/aws-crt-cpp/all/patches/0.17.12-fix-cast-error.patch b/recipes/aws-crt-cpp/all/patches/0.17.12-fix-cast-error.patch deleted file mode 100644 index be886c030a52c..0000000000000 --- a/recipes/aws-crt-cpp/all/patches/0.17.12-fix-cast-error.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/source/io/TlsOptions.cpp b/source/io/TlsOptions.cpp -index 9f9f8cf..e9913ef 100644 ---- a/source/io/TlsOptions.cpp -+++ b/source/io/TlsOptions.cpp -@@ -216,7 +216,7 @@ namespace Aws - - if (m_slotId) - { -- options.slot_id = &(*m_slotId); -+ options.slot_id = const_cast(&(*m_slotId)); - } - - if (m_userPin) diff --git a/recipes/aws-crt-cpp/all/patches/0.17.23-fix-cast-error.patch b/recipes/aws-crt-cpp/all/patches/0.17.23-fix-cast-error.patch deleted file mode 100644 index 676d3a87fbac2..0000000000000 --- a/recipes/aws-crt-cpp/all/patches/0.17.23-fix-cast-error.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/source/io/TlsOptions.cpp b/source/io/TlsOptions.cpp -index 3018e4c..eb5e129 100644 ---- a/source/io/TlsOptions.cpp -+++ b/source/io/TlsOptions.cpp -@@ -213,7 +213,7 @@ namespace Aws - - if (m_slotId) - { -- options.slot_id = &(*m_slotId); -+ options.slot_id = const_cast(&(*m_slotId)); - } - - if (m_userPin) diff --git a/recipes/aws-crt-cpp/all/patches/0.17.23-fix-cpp20-windows.patch b/recipes/aws-crt-cpp/all/patches/0.17.23-fix-cpp20-windows.patch new file mode 100644 index 0000000000000..9f32e19e32b8b --- /dev/null +++ b/recipes/aws-crt-cpp/all/patches/0.17.23-fix-cpp20-windows.patch @@ -0,0 +1,28 @@ +From 3216ce53fa7f276ae4407a450cafafa9e809fea1 Mon Sep 17 00:00:00 2001 +From: Sam Bisciglia +Date: Tue, 12 Apr 2022 14:42:26 -0400 +Subject: [PATCH] Fixes cpp 20 builds for windows. (#364) + +--- +diff --git a/include/aws/crt/StringView.h b/include/aws/crt/StringView.h +index a0fec83..dc2f05b 100644 +--- a/include/aws/crt/StringView.h ++++ b/include/aws/crt/StringView.h +@@ -15,7 +15,7 @@ + #include + #include + +-#if __cplusplus >= 201703L || (defined(_MSC_LANG) && _MSC_LANG >= 201703L) ++#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) + # include + #endif + +@@ -53,7 +53,7 @@ namespace Aws + + basic_string_view &operator=(const basic_string_view &) noexcept = default; + +-#if __cplusplus >= 201703L || (defined(_MSC_LANG) && _MSC_LANG >= 201703L) ++#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) + constexpr basic_string_view(const std::basic_string_view &other) noexcept + : m_size(other.size()), m_data(other.data()) + { diff --git a/recipes/aws-crt-cpp/all/patches/0.24.1-disable-sanitizers.patch b/recipes/aws-crt-cpp/all/patches/0.24.1-disable-sanitizers.patch deleted file mode 100644 index bb37fbe98b61a..0000000000000 --- a/recipes/aws-crt-cpp/all/patches/0.24.1-disable-sanitizers.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- CMakeLists.txt.orig 2024-02-23 17:49:55 -+++ CMakeLists.txt 2024-02-23 17:50:20 -@@ -314,7 +314,7 @@ - aws_use_package(aws-c-event-stream) - aws_use_package(aws-c-s3) - --aws_add_sanitizers(${PROJECT_NAME}) -+#aws_add_sanitizers(${PROJECT_NAME}) - - target_link_libraries(${PROJECT_NAME} PUBLIC ${DEP_AWS_LIBS}) - diff --git a/recipes/aws-crt-cpp/all/patches/0.24.1-fix-cast-error.patch b/recipes/aws-crt-cpp/all/patches/0.24.1-fix-cast-error.patch deleted file mode 100644 index 78b3163f7e6d5..0000000000000 --- a/recipes/aws-crt-cpp/all/patches/0.24.1-fix-cast-error.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/source/io/TlsOptions.cpp b/source/io/TlsOptions.cpp -index 6077912..74a55c9 100644 ---- a/source/io/TlsOptions.cpp -+++ b/source/io/TlsOptions.cpp -@@ -219,7 +219,7 @@ namespace Aws - - if (m_slotId) - { -- options.slot_id = &(*m_slotId); -+ options.slot_id = const_cast(&(*m_slotId)); - } - - if (m_userPin) diff --git a/recipes/aws-crt-cpp/config.yml b/recipes/aws-crt-cpp/config.yml index 20f59bce0267f..b1a11f4753b30 100644 --- a/recipes/aws-crt-cpp/config.yml +++ b/recipes/aws-crt-cpp/config.yml @@ -1,9 +1,5 @@ versions: - "0.24.1": + "0.26.9": folder: all - "0.17.23": - folder: all - "0.17.12": - folder: all - "0.14.3": + "0.17.1a": folder: all diff --git a/recipes/aws-lambda-cpp/all/conanfile.py b/recipes/aws-lambda-cpp/all/conanfile.py index 0b0de62c879d3..849efb9333447 100644 --- a/recipes/aws-lambda-cpp/all/conanfile.py +++ b/recipes/aws-lambda-cpp/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile -from conan.errors import ConanInvalidConfiguration -from conan.tools.files import get, copy, rmdir +from conan.errors import ConanInvalidConfiguration, ConanException +from conan.tools.files import get, copy, rmdir, load, save, rename from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.scm import Version @@ -72,16 +72,29 @@ def build(self): cmake.configure() cmake.build() + def _extract_cmake_module(self): + cmake_module = load(self, os.path.join(self.source_folder, "cmake", "aws-lambda-runtime-config.cmake")) + start = "set(AWS_LAMBDA_PACKAGING_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/packager)" + start_index = cmake_module.find(start) + if start_index == -1: + raise ConanException("Could not extract aws_lambda_package_target from aws-lambda-runtime-config.cmake file.") + return cmake_module[start_index:] + def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) cmake = CMake(self) cmake.install() + + save(self, os.path.join(self.package_folder, "lib", "cmake", "aws_lambda_package_target.cmake"), self._extract_cmake_module()) + rename(self, os.path.join(self.package_folder, "lib", "aws-lambda-runtime", "cmake", "packager"), os.path.join(self.package_folder, "lib", "cmake", "packager")) rmdir(self, os.path.join(self.package_folder, "lib", "aws-lambda-runtime")) def package_info(self): self.cpp_info.libs = ["aws-lambda-runtime"] + self.cpp_info.builddirs.append(os.path.join("lib", "cmake")) self.cpp_info.set_property("cmake_file_name", "aws-lambda-runtime") self.cpp_info.set_property("cmake_target_name", "AWS::aws-lambda-runtime") + self.cpp_info.set_property("cmake_build_modules", [os.path.join("lib", "cmake", "aws_lambda_package_target.cmake")]) self.cpp_info.system_libs.append("m") diff --git a/recipes/aws-lambda-cpp/all/test_package/CMakeLists.txt b/recipes/aws-lambda-cpp/all/test_package/CMakeLists.txt index 073c5e204a51e..1821ed75da1ec 100644 --- a/recipes/aws-lambda-cpp/all/test_package/CMakeLists.txt +++ b/recipes/aws-lambda-cpp/all/test_package/CMakeLists.txt @@ -6,3 +6,7 @@ find_package(aws-lambda-runtime REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE AWS::aws-lambda-runtime) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) + +if(NOT COMMAND aws_lambda_package_target) + message(FATAL_ERROR "aws_lambda_package_target should have been defined as part of find_package(aws-lambda-runtime)") +endif() diff --git a/recipes/aws-sdk-cpp/all/conandata.yml b/recipes/aws-sdk-cpp/all/conandata.yml index 5818aef791db0..e0488a5541cdd 100644 --- a/recipes/aws-sdk-cpp/all/conandata.yml +++ b/recipes/aws-sdk-cpp/all/conandata.yml @@ -2,27 +2,9 @@ sources: "1.9.234": url: "https://github.com/aws/aws-sdk-cpp/archive/1.9.234.tar.gz" sha256: "52e36cf568fe0b2a0fc82a9333c0b31ba843db16670f4ccbb7b9fd142f1b00a5" - "1.9.100": - url: "https://github.com/aws/aws-sdk-cpp/archive/1.9.100.tar.gz" - sha256: "f0930d14ec92b9ddf1e3c966d9a3fe70d2a01b80e79e3e76da78d108bb81e5c4" - "1.8.130": - url: "https://github.com/aws/aws-sdk-cpp/archive/1.8.130.tar.gz" - sha256: "5dd09baa28d3f6f4fb03fbba1a4269724d79bcca3d47752cd3e15caf97276bda" patches: "1.9.234": - patch_file: patches/1.9.234-0001-issue-1816.patch - patch_file: patches/1.9.234-0002-disable-sort-links.patch - patch_file: patches/1.9.100-0002-aws-plugin-conf.patch - patch_file: patches/1.8.130-0004-improve-pulseaudio-detection.patch - "1.9.100": - - patch_file: patches/1.9.100-0001-disable-sort-links.patch - - patch_file: patches/1.9.100-0002-aws-plugin-conf.patch - - patch_file: patches/1.9.100-0003-issue-1816.patch - - patch_file: patches/1.8.130-0004-improve-pulseaudio-detection.patch - "1.8.130": - - patch_file: patches/1.8.130-0001-disable-sort-links.patch - - patch_file: patches/1.8.130-0002-force-archive-directory-to-library-directory.patch - - patch_file: patches/1.8.130-0003-disable-cmake-install-rpath-use-link-path.patch - - patch_file: patches/1.8.130-0004-improve-pulseaudio-detection.patch - - patch_file: patches/1.8.130-0005-aws-plugin-conf.patch - - patch_file: patches/1.8.130-0006-issue-1816.patch diff --git a/recipes/aws-sdk-cpp/all/conanfile.py b/recipes/aws-sdk-cpp/all/conanfile.py index 678d3e32eb8c9..b122f2d6fdd0e 100644 --- a/recipes/aws-sdk-cpp/all/conanfile.py +++ b/recipes/aws-sdk-cpp/all/conanfile.py @@ -320,18 +320,12 @@ def _internal_requirements(self): "transfer": ["s3"], } - @property - def _use_aws_crt_cpp(self): - return Version(self.version) >= "1.9" - def export_sources(self): export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if Version(self.version) < "1.9": - self.options.rm_safe("s3-crt") def configure(self): if self.options.shared: @@ -341,14 +335,26 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("aws-c-common/0.8.2") - self.requires("aws-c-event-stream/0.2.7") - self.requires("aws-checksums/0.1.13") - if self._use_aws_crt_cpp: - self.requires("aws-c-cal/0.5.13") - self.requires("aws-c-http/0.6.13") - self.requires("aws-c-io/0.10.20") - self.requires("aws-crt-cpp/0.17.23", transitive_headers=True) + if self.version == "1.11.352": + self.requires("aws-c-common/0.9.15") + self.requires("aws-c-event-stream/0.4.2") + self.requires("aws-checksums/0.1.18") + self.requires("aws-c-cal/0.6.14") + self.requires("aws-c-http/0.8.1") + self.requires("aws-c-io/0.14.7") + self.requires("aws-crt-cpp/0.26.9", transitive_headers=True) + if self.options.get_safe("s3-crt"): + self.requires("aws-c-s3/0.5.5") + if self.version == "1.9.234": + self.requires("aws-c-common/0.6.11") + self.requires("aws-c-event-stream/0.2.7") + self.requires("aws-checksums/0.1.12") + self.requires("aws-c-cal/0.5.12") + self.requires("aws-c-http/0.6.7") + self.requires("aws-c-io/0.10.9") + self.requires("aws-crt-cpp/0.17.1a", transitive_headers=True) + if self.options.get_safe("s3-crt"): + self.requires("aws-c-s3/0.1.26") if self.settings.os != "Windows": self.requires("openssl/[>=1.1 <4]") self.requires("libcurl/[>=7.78.0 <9]") @@ -364,17 +370,8 @@ def validate(self): "Doesn't support gcc5 / shared. " "See https://github.com/conan-io/conan-center-index/pull/4401#issuecomment-802631744" ) - if (Version(self.version) < "1.9.234" - and self.settings.compiler == "gcc" - and Version(self.settings.compiler.version) >= "11.0" - and self.settings.build_type == "Release"): - raise ConanInvalidConfiguration( - "Versions prior to 1.9.234 don't support release builds on >= gcc 11 " - "See https://github.com/aws/aws-sdk-cpp/issues/1505" - ) - if self._use_aws_crt_cpp: - if is_msvc(self) and is_msvc_static_runtime(self): - raise ConanInvalidConfiguration("Static runtime is not working for more recent releases") + if is_msvc(self) and is_msvc_static_runtime(self): + raise ConanInvalidConfiguration("Static runtime is not working for more recent releases") else: if self.settings.os == "Macos" and self.settings.arch == "armv8": raise ConanInvalidConfiguration( @@ -410,7 +407,7 @@ def generate(self): tc.cache_variables["ENABLE_OPENSSL_ENCRYPTION"] = True tc.cache_variables["MINIMIZE_SIZE"] = self.options.min_size - if is_msvc(self) and not self._use_aws_crt_cpp: + if is_msvc(self): tc.cache_variables["FORCE_SHARED_CRT"] = not is_msvc_static_runtime(self) if cross_building(self): @@ -429,10 +426,11 @@ def generate(self): def _patch_sources(self): apply_conandata_patches(self) # Disable warnings as errors - replace_in_file( - self, os.path.join(self.source_folder, "cmake", "compiler_settings.cmake"), - 'list(APPEND AWS_COMPILER_WARNINGS "-Wall" "-Werror" "-pedantic" "-Wextra")', "", - ) + if self.version == "1.9.234": + replace_in_file( + self, os.path.join(self.source_folder, "cmake", "compiler_settings.cmake"), + 'list(APPEND AWS_COMPILER_WARNINGS "-Wall" "-Werror" "-pedantic" "-Wextra")', "", + ) def build(self): self._patch_sources() @@ -498,13 +496,12 @@ def package_info(self): "aws-c-event-stream::aws-c-event-stream", "aws-checksums::aws-checksums", ] - if self._use_aws_crt_cpp: - self.cpp_info.components["core"].requires.extend([ - "aws-c-cal::aws-c-cal", - "aws-c-http::aws-c-http", - "aws-c-io::aws-c-io", - "aws-crt-cpp::aws-crt-cpp", - ]) + self.cpp_info.components["core"].requires.extend([ + "aws-c-cal::aws-c-cal", + "aws-c-http::aws-c-http", + "aws-c-io::aws-c-io", + "aws-crt-cpp::aws-crt-cpp", + ]) # other components enabled_sdks = [sdk for sdk in self._sdks if self.options.get_safe(sdk)] @@ -548,6 +545,9 @@ def package_info(self): if self.options.get_safe("text-to-speech"): self.cpp_info.components["text-to-speech"].requires.append("pulseaudio::pulseaudio") + if self.options.get_safe("s3-crt"): + self.cpp_info.components["s3-crt"].requires.append("aws-c-s3::aws-c-s3") + if self.settings.os == "Macos": if self.options.get_safe("text-to-speech"): self.cpp_info.components["text-to-speech"].frameworks.append("CoreAudio") diff --git a/recipes/aws-sdk-cpp/all/patches/1.8.130-0001-disable-sort-links.patch b/recipes/aws-sdk-cpp/all/patches/1.8.130-0001-disable-sort-links.patch deleted file mode 100644 index bd8fbce5589dc..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.8.130-0001-disable-sort-links.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/sdks.cmake b/cmake/sdks.cmake -index 975281faaa..ebedbcc6e5 100644 ---- a/cmake/sdks.cmake -+++ b/cmake/sdks.cmake -@@ -236,7 +236,7 @@ function(add_sdks) - - # the catch-all config needs to list all the targets in a dependency-sorted order - include(dependencies) -- sort_links(EXPORTS) -+ # sort_links(EXPORTS) - - # make an everything config by just including all the individual configs - file(WRITE ${CMAKE_BINARY_DIR}/aws-sdk-cpp-config.cmake "") diff --git a/recipes/aws-sdk-cpp/all/patches/1.8.130-0002-force-archive-directory-to-library-directory.patch b/recipes/aws-sdk-cpp/all/patches/1.8.130-0002-force-archive-directory-to-library-directory.patch deleted file mode 100644 index ae9310e5bb684..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.8.130-0002-force-archive-directory-to-library-directory.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a653e38628..6761052856 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -295,11 +295,7 @@ if (CMAKE_INSTALL_INCLUDEDIR) - set(INCLUDE_DIRECTORY "${CMAKE_INSTALL_INCLUDEDIR}") - endif() - --if(BUILD_SHARED_LIBS) -- set(ARCHIVE_DIRECTORY "${BINARY_DIRECTORY}") --else() -- set(ARCHIVE_DIRECTORY "${LIBRARY_DIRECTORY}") --endif() -+set(ARCHIVE_DIRECTORY "${LIBRARY_DIRECTORY}") - - if (ENABLE_ADDRESS_SANITIZER) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -g -fno-omit-frame-pointer") diff --git a/recipes/aws-sdk-cpp/all/patches/1.8.130-0003-disable-cmake-install-rpath-use-link-path.patch b/recipes/aws-sdk-cpp/all/patches/1.8.130-0003-disable-cmake-install-rpath-use-link-path.patch deleted file mode 100644 index 6f85ba392127f..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.8.130-0003-disable-cmake-install-rpath-use-link-path.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a653e38628..4aac800fde 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -142,7 +142,7 @@ else() - endif() - - # Add Linker search paths to RPATH so as to fix the problem where some linkers can't find cross-compiled dependent libraries in customer paths when linking executables. --set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true) -+# set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true) - - # build third-party targets - if (BUILD_DEPS) diff --git a/recipes/aws-sdk-cpp/all/patches/1.8.130-0005-aws-plugin-conf.patch b/recipes/aws-sdk-cpp/all/patches/1.8.130-0005-aws-plugin-conf.patch deleted file mode 100644 index b3eccfe69cc45..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.8.130-0005-aws-plugin-conf.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit 1179cb040d6b9292d30eb7d444298cd286f9f574 -Author: dvirtz -Date: Tue Nov 16 21:38:45 2021 +0200 - - add a file to configure SDK plugins - -diff --git a/cmake/sdk_plugin_conf.cmake b/cmake/sdk_plugin_conf.cmake -new file mode 100644 -index 0000000000..474ead75bd ---- /dev/null -+++ b/cmake/sdk_plugin_conf.cmake -@@ -0,0 +1,32 @@ -+get_filename_component(AWS_NATIVE_SDK_ROOT ${CMAKE_CURRENT_LIST_DIR} DIRECTORY) -+set(SIMPLE_INSTALL TRUE) -+ -+if (CMAKE_INSTALL_BINDIR) -+ set(BINARY_DIRECTORY "${CMAKE_INSTALL_BINDIR}") -+endif() -+ -+if (CMAKE_INSTALL_LIBDIR) -+ set(LIBRARY_DIRECTORY "${CMAKE_INSTALL_LIBDIR}") -+endif() -+ -+if (CMAKE_INSTALL_INCLUDEDIR) -+ set(INCLUDE_DIRECTORY "${CMAKE_INSTALL_INCLUDEDIR}") -+endif() -+ -+if(BUILD_SHARED_LIBS) -+ set(ARCHIVE_DIRECTORY "${BINARY_DIRECTORY}") -+else() -+ set(ARCHIVE_DIRECTORY "${LIBRARY_DIRECTORY}") -+endif() -+ -+if(DEFINED CMAKE_CXX_STANDARD) -+ set(STANDARD_DEFAULT ${CMAKE_CXX_STANDARD}) -+else() -+ set(STANDARD_DEFAULT "11") -+endif() -+set(CPP_STANDARD ${STANDARD_DEFAULT} CACHE STRING "Flag to upgrade the C++ standard used. The default is 11. The minimum is 11.") -+ -+include(CMakePackageConfigHelpers) -+include(initialize_project_version) -+include(utilities) -+include(compiler_settings) diff --git a/recipes/aws-sdk-cpp/all/patches/1.8.130-0006-issue-1816.patch b/recipes/aws-sdk-cpp/all/patches/1.8.130-0006-issue-1816.patch deleted file mode 100644 index 6abce1b705a47..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.8.130-0006-issue-1816.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp -index c633f3fabe..abb1ab7332 100644 ---- aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp -+++ aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp -@@ -146,7 +146,6 @@ namespace Aws - AWS_LOGSTREAM_TRACE(CLASS_TAG, "Audio retrieved from Polly. " << result.GetContentType() << " with " - << result.GetRequestCharacters() << " characters syntesized"); - -- std::streamsize amountRead(0); - unsigned char buffer[BUFF_SIZE]; - - std::lock_guard m(m_driverLock); -@@ -159,7 +158,6 @@ namespace Aws - AWS_LOGSTREAM_TRACE(CLASS_TAG, "Writing " << read << " bytes to device."); - - successfullyPlayed = m_activeDriver->WriteBufferToDevice(buffer, (std::size_t)read); -- amountRead += read; - played = successfullyPlayed; - } - diff --git a/recipes/aws-sdk-cpp/all/patches/1.9.100-0001-disable-sort-links.patch b/recipes/aws-sdk-cpp/all/patches/1.9.100-0001-disable-sort-links.patch deleted file mode 100644 index 6e93f7675b327..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.9.100-0001-disable-sort-links.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/sdks.cmake b/cmake/sdks.cmake -index 0ec9981ddf..d86a9f4874 100644 ---- a/cmake/sdks.cmake -+++ b/cmake/sdks.cmake -@@ -250,7 +250,7 @@ function(add_sdks) - - # the catch-all config needs to list all the targets in a dependency-sorted order - include(dependencies) -- sort_links(EXPORTS) -+ #sort_links(EXPORTS) - - # make an everything config by just including all the individual configs - file(WRITE ${CMAKE_BINARY_DIR}/aws-sdk-cpp-config.cmake "") diff --git a/recipes/aws-sdk-cpp/all/patches/1.9.100-0003-issue-1816.patch b/recipes/aws-sdk-cpp/all/patches/1.9.100-0003-issue-1816.patch deleted file mode 100644 index 6abce1b705a47..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.9.100-0003-issue-1816.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp -index c633f3fabe..abb1ab7332 100644 ---- aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp -+++ aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp -@@ -146,7 +146,6 @@ namespace Aws - AWS_LOGSTREAM_TRACE(CLASS_TAG, "Audio retrieved from Polly. " << result.GetContentType() << " with " - << result.GetRequestCharacters() << " characters syntesized"); - -- std::streamsize amountRead(0); - unsigned char buffer[BUFF_SIZE]; - - std::lock_guard m(m_driverLock); -@@ -159,7 +158,6 @@ namespace Aws - AWS_LOGSTREAM_TRACE(CLASS_TAG, "Writing " << read << " bytes to device."); - - successfullyPlayed = m_activeDriver->WriteBufferToDevice(buffer, (std::size_t)read); -- amountRead += read; - played = successfullyPlayed; - } - diff --git a/recipes/aws-sdk-cpp/config.yml b/recipes/aws-sdk-cpp/config.yml index 3af57130465e4..aeb73ff8f53ec 100644 --- a/recipes/aws-sdk-cpp/config.yml +++ b/recipes/aws-sdk-cpp/config.yml @@ -1,7 +1,3 @@ versions: "1.9.234": folder: "all" - "1.9.100": - folder: "all" - "1.8.130": - folder: "all" diff --git a/recipes/azure-storage-cpp/all/CMakeLists.txt b/recipes/azure-storage-cpp/all/CMakeLists.txt index 82ba25e8c2576..3d130cd5365bf 100644 --- a/recipes/azure-storage-cpp/all/CMakeLists.txt +++ b/recipes/azure-storage-cpp/all/CMakeLists.txt @@ -1,7 +1,16 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.15) project(cmake_wrapper) -include(conanbuildinfo.cmake) -conan_basic_setup() +find_package(cpprestsdk REQUIRED) +find_package(OpenSSL REQUIRED) +find_package(LibXml2 REQUIRED) +find_package(UUID QUIET) -add_subdirectory("source_subfolder/Microsoft.WindowsAzure.Storage") +add_subdirectory(src/Microsoft.WindowsAzure.Storage) + +target_link_libraries(azurestorage + cpprestsdk::cpprestsdk + OpenSSL::SSL + LibXml2::LibXml2 + $ +) diff --git a/recipes/azure-storage-cpp/all/conandata.yml b/recipes/azure-storage-cpp/all/conandata.yml index ccef8ba8c5bd6..5ce9572d0f722 100644 --- a/recipes/azure-storage-cpp/all/conandata.yml +++ b/recipes/azure-storage-cpp/all/conandata.yml @@ -4,5 +4,7 @@ sources: sha256: "446a821d115949f6511b7eb01e6a0e4f014b17bfeba0f3dc33a51750a9d5eca5" patches: "7.5.0": - - base_path: source_subfolder - patch_file: patches/0001-cmake-fixes.patch + - patch_file: "patches/fix-cpp17-incompatibility.patch" + patch_description: "Fix a minor C++17 incompatibility in util.cpp" + patch_type: "portability" + patch_source: "https://patch-diff.githubusercontent.com/raw/Azure/azure-storage-cpp/pull/366" diff --git a/recipes/azure-storage-cpp/all/conanfile.py b/recipes/azure-storage-cpp/all/conanfile.py index 92f05a255ac83..abe044bfc3367 100644 --- a/recipes/azure-storage-cpp/all/conanfile.py +++ b/recipes/azure-storage-cpp/all/conanfile.py @@ -1,19 +1,27 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.build import check_min_cppstd, valid_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, replace_in_file, export_conandata_patches, apply_conandata_patches +from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" + class AzureStorageCppConan(ConanFile): name = "azure-storage-cpp" + description = "Microsoft Azure Storage Client Library for C++" license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/Azure/azure-storage-cpp" - description = "Microsoft Azure Storage Client Library for C++" topics = ("azure", "cpp", "cross-platform", "microsoft", "cloud") - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" - exports_sources = ["CMakeLists.txt", "patches/**"] + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -22,16 +30,6 @@ class AzureStorageCppConan(ConanFile): "shared": False, "fPIC": True, } - short_paths = True - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" @property def _minimum_cpp_standard(self): @@ -40,41 +38,16 @@ def _minimum_cpp_standard(self): @property def _minimum_compiler_version(self): return { - "gcc": "5", + "gcc": "6", "Visual Studio": "14", + "msvc": "190", "clang": "3.4", "apple-clang": "5.1", } - def requirements(self): - self.requires("cpprestsdk/2.10.18") - if self.settings.os != "Windows": - self.requires("boost/1.76.0") - self.requires("libxml2/2.9.10") - self.requires("util-linux-libuuid/2.39") - if self.settings.os == "Macos": - self.requires("libgettext/0.20.1") - - def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - - self._cmake.definitions["CMAKE_FIND_FRAMEWORK"] = "LAST" - self._cmake.definitions["BUILD_TESTS"] = False - self._cmake.definitions["BUILD_SAMPLES"] = False - if not self.settings.compiler.cppstd: - self._cmake.definitions["CMAKE_CXX_STANDARD"] = self._minimum_cpp_standard - - if self.settings.os == "Macos": - self._cmake.definitions["GETTEXT_LIB_DIR"] = self.deps_cpp_info["libgettext"].lib_paths[0] - - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -82,42 +55,100 @@ 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("cpprestsdk/2.10.19", transitive_headers=True, transitive_libs=True) + self.requires("libxml2/[>=2.12.5 <3]", transitive_headers=True, transitive_libs=True) + if self.settings.os != "Windows": + # Boost.Asio is used in a public header here: + # https://github.com/Azure/azure-storage-cpp/blob/v7.5.0/Microsoft.WindowsAzure.Storage/includes/wascore/timer_handler.h#L27 + self.requires("boost/1.83.0", transitive_headers=True, transitive_libs=True) + self.requires("util-linux-libuuid/2.39.2", transitive_headers=True, transitive_libs=True) + self.requires("openssl/[>=1.1 <4]") + if is_apple_os(self): + self.requires("libgettext/0.22") def validate(self): if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, self._minimum_cpp_standard) + check_min_cppstd(self, self._minimum_cpp_standard) min_version = self._minimum_compiler_version.get(str(self.settings.compiler)) if not min_version: - self.output.warn("{} recipe lacks information about the {} compiler support.".format( - self.name, self.settings.compiler)) + self.output.warning( + f"{self.name} recipe lacks information about the {self.settings.compiler} compiler support." + ) else: - if tools.Version(self.settings.compiler.version) < min_version: - raise ConanInvalidConfiguration("{} requires C++{} support. The current compiler {} {} does not support it.".format( - self.name, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler.version)) + if Version(self.settings.compiler.version) < min_version: + raise ConanInvalidConfiguration( + f"{self.name} requires C++{self._minimum_cpp_standard} support. The current compiler" + f" {self.settings.compiler} {self.settings.compiler.version} does not support it." + ) # FIXME: Visual Studio 2015 & 2017 are supported but CI of CCI lacks several Win SDK components # https://github.com/conan-io/conan-center-index/issues/4195 - if self.settings.compiler == "Visual Studio" and tools.Version(self.settings.compiler.version) < "16": + if not check_min_vs(self, 192, raise_invalid=False): raise ConanInvalidConfiguration("Visual Studio < 2019 not yet supported in this recipe") - if self.settings.compiler == "Visual Studio" and self.options.shared and "MT" in self.settings.compiler.runtime: + if self.options.shared and is_msvc_static_runtime(self): raise ConanInvalidConfiguration("Visual Studio build for shared library with MT runtime is not supported") + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CMAKE_FIND_FRAMEWORK"] = "LAST" + tc.variables["BUILD_TESTS"] = False + tc.variables["BUILD_SAMPLES"] = False + if is_apple_os(self): + tc.variables["GETTEXT_LIB_DIR"] = self.dependencies["libgettext"].cpp_info.libdir + if not valid_min_cppstd(self, self._minimum_cpp_standard): + tc.variables["CMAKE_CXX_STANDARD"] = self._minimum_cpp_standard + # Allow non-cache_variables to be used + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + # Relocatable shared libs on macOS + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("util-linux-libuuid", "cmake_file_name", "UUID") + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + cmakelists_path = os.path.join(self.source_folder, "Microsoft.WindowsAzure.Storage", "CMakeLists.txt") + # Do not force C++11 and libc++ + replace_in_file(self, cmakelists_path, "-std=c++11", "") + replace_in_file(self, cmakelists_path, "-stdlib=libc++", "") + # Let Conan handle the Boost defines + replace_in_file(self, cmakelists_path, "add_definitions(-DBOOST_LOG_DYN_LINK)", "") + def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + self._patch_sources() + cmake = CMake(self) + cmake.configure(build_script_folder=self.source_path.parent) cmake.build() def package(self): - self.copy("LICENSE.txt", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE.txt", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): - - self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Windows": + # https://github.com/Azure/azure-storage-cpp/blob/v7.5.0/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt#L100 + self.cpp_info.libs = ["wastorage"] + # https://github.com/Azure/azure-storage-cpp/blob/v7.5.0/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt#L90 self.cpp_info.system_libs = ["ws2_32", "rpcrt4", "xmllite", "bcrypt"] - if not self.options.shared: - self.cpp_info.defines = ["_NO_WASTORAGE_API"] + if is_msvc(self): + # https://github.com/Azure/azure-storage-cpp/blob/v7.5.0/Microsoft.WindowsAzure.Storage/CMakeLists.txt#L116-L120 + if self.options.shared: + self.cpp_info.defines = ["WASTORAGE_DLL", "_USRDLL"] + else: + self.cpp_info.defines = ["_NO_WASTORAGE_API"] + else: + self.cpp_info.libs = ["azurestorage"] diff --git a/recipes/azure-storage-cpp/all/patches/0001-cmake-fixes.patch b/recipes/azure-storage-cpp/all/patches/0001-cmake-fixes.patch deleted file mode 100644 index c775329eb84fe..0000000000000 --- a/recipes/azure-storage-cpp/all/patches/0001-cmake-fixes.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -index ac9e65d..f5988f6 100644 ---- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt -+++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -@@ -46,9 +46,9 @@ if(UNIX) - find_package(OpenSSL 1.0.0 REQUIRED) - - -- find_package(UUID REQUIRED) -- find_package(Casablanca REQUIRED) -- find_package(LibXML2 REQUIRED) -+ find_package(libuuid REQUIRED) -+ find_package(cpprestsdk REQUIRED) -+ find_package(LibXml2 REQUIRED) - - if(BUILD_TESTS) - find_package(UnitTest++ REQUIRED) -@@ -57,7 +57,7 @@ if(UNIX) - - elseif(WIN32) - message("-- Setting WIN32 options") -- find_package(Casablanca REQUIRED) -+ find_package(cpprestsdk REQUIRED) - add_definitions(-DUNICODE -D_UNICODE -D_WIN32) - else() - message("-- Unsupported Build Platform.") -@@ -85,13 +85,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") - - set(LD_FLAGS "${LD_FLAGS} -Wl,-z,defs") - -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") - - set(STRICT_CXX_FLAGS ${WARNINGS} "-Werror -pedantic") - -- if (BUILD_SHARED_LIBS) -- add_definitions(-DBOOST_LOG_DYN_LINK) -- endif() - add_definitions(-D_TURN_OFF_PLATFORM_STRING) - elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - message("-- Setting clang options") -@@ -100,14 +97,11 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - set(OSX_SUPPRESSIONS "-Wno-overloaded-virtual -Wno-sign-conversion -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-char-subscripts -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated -Wno-unused-value -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-unused-function -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-reorder -Wno-unused-local-typedefs") - set(WARNINGS "${WARNINGS} ${OSX_SUPPRESSIONS}") - -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration") - set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") - set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11") - -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing") -- if (BUILD_SHARED_LIBS) -- add_definitions(-DBOOST_LOG_DYN_LINK) -- endif() -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") - add_definitions(-D_TURN_OFF_PLATFORM_STRING) - elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - message("-- Setting MSVC options") -@@ -142,11 +136,11 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) - - set(AZURESTORAGE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/includes) --set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${LibXML2_INCLUDE_DIR}) -+set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${cpprestsdk_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${OpenSSL_INCLUDE_DIRS} ${libuuid_INCLUDE_DIRS} ${LibXml2_INCLUDE_DIR}) - - - set(AZURESTORAGE_LIBRARY azurestorage) --set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARY} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${UUID_LIBRARIES} ${LibXML2_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) -+set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${cpprestsdk_LIBRARIES} ${Boost_LIBRARIES} ${OpenSSL_LIBRARIES} ${libuuid_LIBRARIES} ${LibXml2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) - - # Set version numbers centralized - set (AZURESTORAGE_VERSION_MAJOR 7) diff --git a/recipes/azure-storage-cpp/all/patches/fix-cpp17-incompatibility.patch b/recipes/azure-storage-cpp/all/patches/fix-cpp17-incompatibility.patch new file mode 100644 index 0000000000000..23af9f8243be8 --- /dev/null +++ b/recipes/azure-storage-cpp/all/patches/fix-cpp17-incompatibility.patch @@ -0,0 +1,51 @@ +From b81d6349d3f6c05741978bab9b07372150c85137 Mon Sep 17 00:00:00 2001 +From: Adam Mensel +Date: Mon, 31 Aug 2020 19:44:24 -0600 +Subject: [PATCH 1/2] Use lambdas instead of std::fun_ptr, to get free C++17 + compatibility. + +--- + Microsoft.WindowsAzure.Storage/src/util.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Microsoft.WindowsAzure.Storage/src/util.cpp b/Microsoft.WindowsAzure.Storage/src/util.cpp +index cf0a3116..2d0d540c 100644 +--- a/Microsoft.WindowsAzure.Storage/src/util.cpp ++++ b/Microsoft.WindowsAzure.Storage/src/util.cpp +@@ -334,8 +334,8 @@ namespace azure { namespace storage { namespace core { + + utility::string_t str_trim_starting_trailing_whitespaces(const utility::string_t& str) + { +- auto non_space_begin = std::find_if(str.begin(), str.end(), std::not1(std::ptr_fun(isspace))); +- auto non_space_end = std::find_if(str.rbegin(), str.rend(), std::not1(std::ptr_fun(isspace))).base(); ++ auto non_space_begin = std::find_if(str.begin(), str.end(), [](char c) { return !std::isspace(c); }); ++ auto non_space_end = std::find_if(str.rbegin(), str.rend(), [](char c) { return !std::isspace(c); }).base(); + return utility::string_t(non_space_begin, non_space_end); + } + + +From b71db982b9f7065494c950c558f7e30b89026a89 Mon Sep 17 00:00:00 2001 +From: Adam Mensel +Date: Mon, 31 Aug 2020 23:02:29 -0600 +Subject: [PATCH 2/2] Keep the exact same logic as before, but still using a + lambda instead of std::fun_ptr. + +--- + Microsoft.WindowsAzure.Storage/src/util.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Microsoft.WindowsAzure.Storage/src/util.cpp b/Microsoft.WindowsAzure.Storage/src/util.cpp +index 2d0d540c..c2a3d7d4 100644 +--- a/Microsoft.WindowsAzure.Storage/src/util.cpp ++++ b/Microsoft.WindowsAzure.Storage/src/util.cpp +@@ -334,8 +334,8 @@ namespace azure { namespace storage { namespace core { + + utility::string_t str_trim_starting_trailing_whitespaces(const utility::string_t& str) + { +- auto non_space_begin = std::find_if(str.begin(), str.end(), [](char c) { return !std::isspace(c); }); +- auto non_space_end = std::find_if(str.rbegin(), str.rend(), [](char c) { return !std::isspace(c); }).base(); ++ auto non_space_begin = std::find_if(str.begin(), str.end(), [](int c) { return !isspace(c); }); ++ auto non_space_end = std::find_if(str.rbegin(), str.rend(), [](int c) { return !isspace(c); }).base(); + return utility::string_t(non_space_begin, non_space_end); + } + diff --git a/recipes/azure-storage-cpp/all/test_package/CMakeLists.txt b/recipes/azure-storage-cpp/all/test_package/CMakeLists.txt index 1c789ba4ceba1..b3dc1a61ac7d2 100644 --- a/recipes/azure-storage-cpp/all/test_package/CMakeLists.txt +++ b/recipes/azure-storage-cpp/all/test_package/CMakeLists.txt @@ -1,12 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(PackageTest CXX) -set(CMAKE_CXX_STANDARD 11) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - find_package(azure-storage-cpp REQUIRED CONFIG) add_executable(example example.cpp) target_link_libraries(example azure-storage-cpp::azure-storage-cpp) +target_compile_features(example PRIVATE cxx_std_11) diff --git a/recipes/azure-storage-cpp/all/test_package/conanfile.py b/recipes/azure-storage-cpp/all/test_package/conanfile.py index 33fb4c0ecc216..8d52b7021efe1 100644 --- a/recipes/azure-storage-cpp/all/test_package/conanfile.py +++ b/recipes/azure-storage-cpp/all/test_package/conanfile.py @@ -1,11 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" -class AwsSdkCppTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "example") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "example") + self.run(bin_path, env="conanrun") diff --git a/recipes/azure-storage-cpp/all/test_v1_package/CMakeLists.txt b/recipes/azure-storage-cpp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/azure-storage-cpp/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/azure-storage-cpp/all/test_v1_package/conanfile.py b/recipes/azure-storage-cpp/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..33fb4c0ecc216 --- /dev/null +++ b/recipes/azure-storage-cpp/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class AwsSdkCppTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "example") + self.run(bin_path, run_environment=True) diff --git a/recipes/battery-embed/all/conandata.yml b/recipes/battery-embed/all/conandata.yml new file mode 100644 index 0000000000000..b94490b90ffc3 --- /dev/null +++ b/recipes/battery-embed/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.2.19": + url: "https://github.com/batterycenter/embed/archive/refs/tags/v1.2.19.tar.gz" + sha256: "d472655b6eec215cd7cd20411f3596f22f597ea6a82fbbc5a5d7271e102b610e" diff --git a/recipes/battery-embed/all/conanfile.py b/recipes/battery-embed/all/conanfile.py new file mode 100644 index 0000000000000..42b1dc0f23c98 --- /dev/null +++ b/recipes/battery-embed/all/conanfile.py @@ -0,0 +1,74 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.cmake import cmake_layout +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.53.0" + +class BatteryEmbedConan(ConanFile): + name = "battery-embed" + description = "A CMake/C++20 library to embed resource files at compile time" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/batterycenter/embed" + topics = ("embed") + package_type = "build-scripts" + settings = "os", "arch", "compiler", "build_type" + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "11", + "clang": "12", + "apple-clang": "13", + "Visual Studio": "16", + "msvc": "192", + } + + def export_sources(self): + copy(self, "embed.cmake", src=self.recipe_folder, dst=self.export_sources_folder) + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def package_id(self): + del self.info.settings.arch + del self.info.settings.compiler + del self.info.settings.build_type + del self.info.settings.os + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + copy(self, "embed.cmake", os.path.join(self.source_folder, os.pardir), self.recipe_folder) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "embed.cmake", self.recipe_folder, os.path.join(self.package_folder, "lib", "cmake")) + copy(self, "CMakeLists.txt", self.source_folder, os.path.join(self.package_folder, "lib", "cmake", "battery-embed")) + + def package_info(self): + self.cpp_info.libdirs = [] + self.cpp_info.bindirs = [] + self.cpp_info.includedirs = [] + + self.cpp_info.set_property("cmake_target_name", "battery::embed") + self.cpp_info.builddirs.append(os.path.join("lib", "cmake")) + self.cpp_info.set_property("cmake_build_modules", [os.path.join("lib", "cmake", "embed.cmake")]) diff --git a/recipes/battery-embed/all/embed.cmake b/recipes/battery-embed/all/embed.cmake new file mode 100644 index 0000000000000..59fe1f00e55a0 --- /dev/null +++ b/recipes/battery-embed/all/embed.cmake @@ -0,0 +1,4 @@ +# cmake proxy module +cmake_minimum_required(VERSION 3.21) + +add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/battery-embed battery-embed-build) diff --git a/recipes/battery-embed/all/test_package/CMakeLists.txt b/recipes/battery-embed/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..b5eb771902175 --- /dev/null +++ b/recipes/battery-embed/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(battery-embed REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) + +b_embed(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/battery-embed/all/test_package/conanfile.py b/recipes/battery-embed/all/test_package/conanfile.py new file mode 100644 index 0000000000000..065416112515f --- /dev/null +++ b/recipes/battery-embed/all/test_package/conanfile.py @@ -0,0 +1,29 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build_requirements(self): + self.tool_requires("cmake/[>=3.21 <4]") + + 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/battery-embed/all/test_package/test_package.cpp b/recipes/battery-embed/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..feb15d322e7f2 --- /dev/null +++ b/recipes/battery-embed/all/test_package/test_package.cpp @@ -0,0 +1,8 @@ +#include + +#include "battery/embed.hpp" + +int main(void) { + std::cout << b::embed<"test_package.cpp">() << std::endl; + return EXIT_SUCCESS; +} diff --git a/recipes/battery-embed/config.yml b/recipes/battery-embed/config.yml new file mode 100644 index 0000000000000..a18e338f675d9 --- /dev/null +++ b/recipes/battery-embed/config.yml @@ -0,0 +1,3 @@ +versions: + "1.2.19": + folder: all diff --git a/recipes/bdwgc/all/conandata.yml b/recipes/bdwgc/all/conandata.yml index d463c9bb2301b..3e842ffa56b67 100644 --- a/recipes/bdwgc/all/conandata.yml +++ b/recipes/bdwgc/all/conandata.yml @@ -14,6 +14,9 @@ sources: "8.2.6": url: "https://github.com/ivmai/bdwgc/releases/download/v8.2.6/gc-8.2.6.tar.gz" sha256: "b9183fe49d4c44c7327992f626f8eaa1d8b14de140f243edb1c9dcff7719a7fc" + "8.2.8": + url: "https://github.com/ivmai/bdwgc/releases/download/v8.2.8/gc-8.2.8.tar.gz" + sha256: "7649020621cb26325e1fb5c8742590d92fb48ce5c259b502faf7d9fb5dabb160" patches: "8.0.4": - patch_file: "patches/update-cmake-8_0_4.patch" @@ -25,3 +28,5 @@ patches: - patch_file: "patches/update-cmake-8_2_4.patch" "8.2.6": - patch_file: "patches/update-cmake-8_2_6.patch" + "8.2.8": + - patch_file: "patches/update-cmake-8_2_6.patch" diff --git a/recipes/bdwgc/config.yml b/recipes/bdwgc/config.yml index c736cacb36944..2171a77e5a1a9 100644 --- a/recipes/bdwgc/config.yml +++ b/recipes/bdwgc/config.yml @@ -9,3 +9,5 @@ versions: folder: all "8.2.6": folder: all + "8.2.8": + folder: all diff --git a/recipes/behaviortree.cpp/all/conandata.yml b/recipes/behaviortree.cpp/all/conandata.yml index 25beb0006c60f..38e09ddf41730 100644 --- a/recipes/behaviortree.cpp/all/conandata.yml +++ b/recipes/behaviortree.cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.6.2": + url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/4.6.2.tar.gz" + sha256: "b0e7e53b27feae894e2df3f3faadfdd49f2108ebccfb1bd7cc0d405ffc56cecd" "4.6.1": url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/4.6.1.tar.gz" sha256: "a4e0dd92b200eedfbc6a16bebe613aeeb84b685416211b68fd097d21254f324b" @@ -17,3 +20,8 @@ sources: "3.7.0": url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/3.7.0.tar.gz" sha256: "ab0d8ac1a0df4dd43cf45da8a784bab7fdedf711bd0e227f7ed071f79b0c7b5c" +patches: + "4.6.2": + - patch_file: "patches/001-minitrace.patch" + patch_description: "Consume minitrace from Conan" + patch_type: "conan" diff --git a/recipes/behaviortree.cpp/all/conanfile.py b/recipes/behaviortree.cpp/all/conanfile.py index 219b2a799c6c6..df11b679e6fcb 100644 --- a/recipes/behaviortree.cpp/all/conanfile.py +++ b/recipes/behaviortree.cpp/all/conanfile.py @@ -5,6 +5,7 @@ from conan.tools.build import check_min_cppstd, cross_building from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import export_conandata_patches, apply_conandata_patches import os @@ -74,6 +75,7 @@ def _minimum_compilers_version(self): } def export_sources(self): + export_conandata_patches(self) copy(self, "conan_deps.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): @@ -216,6 +218,7 @@ def generate(self): deps.generate() def _patch_sources(self): + apply_conandata_patches(self) cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") # Let Conan handle -fPIC replace_in_file(self, cmakelists, "set(CMAKE_POSITION_INDEPENDENT_CODE ON)\n", "") @@ -226,7 +229,9 @@ def _patch_sources(self): # Unvendor minitrace if self._with_minitrace: rmdir(self, os.path.join(self.source_folder, "3rdparty", "minitrace")) - replace_in_file(self, cmakelists, "3rdparty/minitrace/minitrace.cpp", "") + if Version(self.version) < "4.6.2": + # INFO: Version 4.6.2 removed minitrace via patch file 001-minitrace.patch + replace_in_file(self, cmakelists, "3rdparty/minitrace/minitrace.cpp", "") replace_in_file(self, os.path.join(self.source_folder, "src", "loggers", "bt_minitrace_logger.cpp"), "minitrace/minitrace.h", "minitrace.h") # Unvendor tinyxml2 diff --git a/recipes/behaviortree.cpp/all/patches/001-minitrace.patch b/recipes/behaviortree.cpp/all/patches/001-minitrace.patch new file mode 100644 index 0000000000000..734c4e7f4c8b5 --- /dev/null +++ b/recipes/behaviortree.cpp/all/patches/001-minitrace.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9b6d1eb..fd0e84f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -39,6 +39,7 @@ endif() + + #---- Find other packages ---- + find_package(Threads REQUIRED) ++find_package(minitrace REQUIRED) + + + set(BEHAVIOR_TREE_LIBRARY ${PROJECT_NAME}) +@@ -80,10 +81,6 @@ endif() + + add_subdirectory(3rdparty/lexy) + +-add_library(minitrace STATIC 3rdparty/minitrace/minitrace.cpp) +-target_compile_definitions(minitrace PRIVATE MTR_ENABLED=True) +-set_property(TARGET minitrace PROPERTY POSITION_INDEPENDENT_CODE ON) +- + list(APPEND BT_SOURCE + src/action_node.cpp + src/basic_types.cpp +@@ -166,7 +163,7 @@ target_link_libraries(${BTCPP_LIBRARY} + Threads::Threads + ${CMAKE_DL_LIBS} + $ +- minitrace ++ minitrace::minitrace + PUBLIC + ${BTCPP_EXTRA_LIBRARIES} + ) diff --git a/recipes/behaviortree.cpp/config.yml b/recipes/behaviortree.cpp/config.yml index 6056a1ddad488..12e603c7e2db2 100644 --- a/recipes/behaviortree.cpp/config.yml +++ b/recipes/behaviortree.cpp/config.yml @@ -1,4 +1,6 @@ versions: + "4.6.2": + folder: all "4.6.1": folder: all "4.6.0": diff --git a/recipes/benchmark/all/conandata.yml b/recipes/benchmark/all/conandata.yml index 102609d9c75c2..fac51279a430d 100644 --- a/recipes/benchmark/all/conandata.yml +++ b/recipes/benchmark/all/conandata.yml @@ -1,4 +1,11 @@ sources: + "1.9.0": + url: "https://github.com/google/benchmark/archive/refs/tags/v1.9.0.tar.gz" + sha256: "35a77f46cc782b16fac8d3b107fbfbb37dcd645f7c28eee19f3b8e0758b48994" + "1.8.5": + url: "https://github.com/google/benchmark/archive/refs/tags/v1.8.5.tar.gz" + sha256: "d26789a2b46d8808a48a4556ee58ccc7c497fcd4c0af9b90197674a81e04798a" + # keep 1.8.4, the last release for c++11 "1.8.4": url: "https://github.com/google/benchmark/archive/refs/tags/v1.8.4.tar.gz" sha256: "3e7059b6b11fb1bbe28e33e02519398ca94c1818874ebed18e504dc6f709be45" diff --git a/recipes/benchmark/all/conanfile.py b/recipes/benchmark/all/conanfile.py index 65bfbc736fc66..ff99379d8d400 100644 --- a/recipes/benchmark/all/conanfile.py +++ b/recipes/benchmark/all/conanfile.py @@ -1,8 +1,8 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.build import cross_building +from conan.tools.build import cross_building, check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, rmdir +from conan.tools.files import copy, get, rmdir, replace_in_file from conan.tools.microsoft import is_msvc, check_min_vs from conan.tools.scm import Version import os @@ -35,6 +35,26 @@ class BenchmarkConan(ConanFile): "enable_libpfm": False, } + @property + def _min_cppstd(self): + if Version(self.version) >= "1.8.5": + return 14 + if is_msvc(self): + return 14 + return 11 + + @property + def _compilers_minimum_version(self): + return { + "14": { + "apple-clang": "10", + "clang": "7", + "gcc": "7", + "msvc": "191", + "Visual Studio": "15", + } + }.get(self._min_cppstd, {}) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -49,6 +69,14 @@ def layout(self): cmake_layout(self, src_folder="src") def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + check_min_vs(self, "190") if Version(self.version) < "1.7.0" and is_msvc(self) and self.options.shared: raise ConanInvalidConfiguration(f"{self.ref} doesn't support msvc shared builds") @@ -71,6 +99,8 @@ def generate(self): tc.variables["BENCHMARK_ENABLE_LTO"] = self.options.enable_lto tc.variables["BENCHMARK_ENABLE_EXCEPTIONS"] = self.options.enable_exceptions tc.variables["BENCHMARK_ENABLE_LIBPFM"] = self.options.get_safe("enable_libpfm", False) + if not self.settings.compiler.cppstd: + tc.cache_variables["CMAKE_CXX_STANDARD"] = self._min_cppstd if Version(self.version) >= "1.6.1": tc.variables["BENCHMARK_ENABLE_WERROR"] = False tc.variables["BENCHMARK_FORCE_WERROR"] = False @@ -83,8 +113,17 @@ def generate(self): else: tc.variables["BENCHMARK_USE_LIBCXX"] = False tc.generate() + + def _patch_sources(self): + if Version(self.version) > "1.7.0": + replace_in_file(self, + os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_CXX_STANDARD", + "#" + ) def build(self): + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/benchmark/config.yml b/recipes/benchmark/config.yml index 13430070c7797..f5694a4c32d21 100644 --- a/recipes/benchmark/config.yml +++ b/recipes/benchmark/config.yml @@ -1,4 +1,8 @@ versions: + "1.9.0": + folder: all + "1.8.5": + folder: all "1.8.4": folder: all "1.8.3": diff --git a/recipes/bitsery/all/conandata.yml b/recipes/bitsery/all/conandata.yml index 5af8798ccd4e5..fd5e93d076949 100644 --- a/recipes/bitsery/all/conandata.yml +++ b/recipes/bitsery/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.2.4": + url: "https://github.com/fraillt/bitsery/archive/v5.2.4.tar.gz" + sha256: "ff741a3fee5420b31af31c7a8cefbcc3aaaf6f7f8c3ac49aa020f99b21d96020" "5.2.3": url: "https://github.com/fraillt/bitsery/archive/v5.2.3.tar.gz" sha256: "896d82ab4ccea9899ff2098aa69ad6d25e524ee1d4c747ce3232d0afe3cd05a5" diff --git a/recipes/bitsery/all/conanfile.py b/recipes/bitsery/all/conanfile.py index 2e0ffa53b2c89..26bcf9c123505 100644 --- a/recipes/bitsery/all/conanfile.py +++ b/recipes/bitsery/all/conanfile.py @@ -13,10 +13,10 @@ class BitseryConan(ConanFile): "Header only C++ binary serialization library. It is designed around " "the networking requirements for real-time data delivery, especially for games." ) - topics = ("serialization", "binary", "header-only") + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/fraillt/bitsery" - license = "MIT" + topics = ("serialization", "binary", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True diff --git a/recipes/bitsery/config.yml b/recipes/bitsery/config.yml index 383bfb1cfff8d..ef54c243e956f 100644 --- a/recipes/bitsery/config.yml +++ b/recipes/bitsery/config.yml @@ -1,4 +1,6 @@ versions: + "5.2.4": + folder: all "5.2.3": folder: all "5.2.2": diff --git a/recipes/boost-ext-ut/all/conandata.yml b/recipes/boost-ext-ut/all/conandata.yml index 6a4836cd7d3f2..81761a3dd0a75 100644 --- a/recipes/boost-ext-ut/all/conandata.yml +++ b/recipes/boost-ext-ut/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.0": + url: "https://github.com/boost-ext/ut/archive/v2.1.0.tar.gz" + sha256: "1c9c35c039ad3a9795a278447db6da0a4ec1a1d223bf7d64687ad28f673b7ae8" "2.0.1": url: "https://github.com/boost-ext/ut/archive/v2.0.1.tar.gz" sha256: "1e43be17045a881c95cedc843d72fe9c1e53239b02ed179c1e39e041ebcd7dad" diff --git a/recipes/boost-ext-ut/all/conanfile.py b/recipes/boost-ext-ut/all/conanfile.py index a73d7aef01853..87082efe83c5e 100644 --- a/recipes/boost-ext-ut/all/conanfile.py +++ b/recipes/boost-ext-ut/all/conanfile.py @@ -52,6 +52,11 @@ def layout(self): cmake_layout(self, src_folder="src") def validate(self): + if (Version(self.version) == "2.1.0" and self.settings.os == "Linux" and self.settings.compiler == "clang" and + 12 <= Version(self.settings.compiler.version) <= 16 and "libstdc++" in self.settings.compiler.libcxx): + # https://github.com/boost-ext/ut/issues/637 + raise ConanInvalidConfiguration(f"{self.ref} does support Clang + libstdc++. Use -s compiler.libcxx=libc++ or Clang >16.") + if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._minimum_cpp_standard) if Version(self.version) <= "1.1.8" and is_msvc(self): diff --git a/recipes/boost-ext-ut/config.yml b/recipes/boost-ext-ut/config.yml index c1e4e8bebed11..61e709f7dc6a2 100644 --- a/recipes/boost-ext-ut/config.yml +++ b/recipes/boost-ext-ut/config.yml @@ -1,4 +1,6 @@ versions: + "2.1.0": + folder: "all" "2.0.1": folder: "all" "2.0.0": diff --git a/recipes/boost/all/conandata.yml b/recipes/boost/all/conandata.yml index b60976ce52867..9a49b404141c2 100644 --- a/recipes/boost/all/conandata.yml +++ b/recipes/boost/all/conandata.yml @@ -1,4 +1,9 @@ sources: + "1.86.0": + url: + - "https://boostorg.jfrog.io/artifactory/main/release/1.86.0/source/boost_1_86_0.tar.bz2" + - "https://sourceforge.net/projects/boost/files/boost/1.86.0/boost_1_86_0.tar.bz2" + sha256: "1bed88e40401b2cb7a1f76d4bab499e352fa4d0c5f31c0dbae64e24d34d7513b" "1.85.0": url: - "https://boostorg.jfrog.io/artifactory/main/release/1.85.0/source/boost_1_85_0.tar.bz2" @@ -73,6 +78,10 @@ sources: url: "https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2" sha256: "d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee" patches: + "1.86.0": + - patch_file: "patches/1.82.0-locale-iconv-library-option.patch" + patch_description: "Optional flag to specify iconv from either libc of libiconv" + patch_type: "conan" "1.85.0": - patch_file: "patches/1.82.0-locale-iconv-library-option.patch" patch_description: "Optional flag to specify iconv from either libc of libiconv" diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index 7e39d21f295c8..1300dc4480ac6 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanException, ConanInvalidConfiguration from conan.tools.apple import is_apple_os, to_apple_arch, XCRun -from conan.tools.build import build_jobs, check_min_cppstd, cross_building, valid_min_cppstd, supported_cppstd +from conan.tools.build import build_jobs, cross_building, valid_min_cppstd, supported_cppstd from conan.tools.env import VirtualBuildEnv from conan.tools.files import ( apply_conandata_patches, chdir, collect_libs, copy, export_conandata_patches, @@ -82,7 +82,7 @@ class BoostConan(ConanFile): "filesystem_no_deprecated": [True, False], "filesystem_use_std_fs": [True, False], "filesystem_version": [None, "3", "4"], - "layout": ["system", "versioned", "tagged", "b2-default"], + "layout": ["system", "versioned", "tagged"], "magic_autolink": [True, False], # enables BOOST_ALL_NO_LIB "diagnostic_definitions": [True, False], # enables BOOST_LIB_DIAGNOSTIC "python_executable": [None, "ANY"], # system default python installation is used, if None @@ -432,6 +432,8 @@ def config_options(self): self.options.without_url = True if Version(self.version) >= "1.85.0" and not self._has_cppstd_14_supported: self.options.without_math = True + if Version(self.version) >= "1.86.0" and not self._has_cppstd_14_supported: + self.options.without_graph = True # iconv is off by default on Windows and Solaris if self._is_windows_platform or self.settings.os == "SunOS": @@ -457,6 +459,14 @@ def disable_math(): except ConanException: pass + def disable_graph(): + super_modules = self._all_super_modules("graph") + for smod in super_modules: + try: + setattr(self.options, f"without_{smod}", True) + except ConanException: + pass + if Version(self.version) >= "1.76.0": # Starting from 1.76.0, Boost.Math requires a c++11 capable compiler # ==> disable it by default for older compilers or c++ standards @@ -565,6 +575,18 @@ def disable_cobalt(): elif not self._has_cppstd_14_supported: disable_math() + if Version(self.version) >= "1.86.0": + # Boost 1.86.0 updated more components that require C++14 and C++17 + # https://www.boost.org/users/history/version_1_86_0.html + if self.settings.compiler.get_safe("cppstd"): + if not valid_min_cppstd(self, 14): + disable_graph() + else: + min_compiler_version = self._min_compiler_version_default_cxx14 + if min_compiler_version is None: + self.output.warning("Assuming the compiler supports c++14 by default") + elif not self._has_cppstd_14_supported: + disable_graph() @property def _configure_options(self): @@ -587,8 +609,12 @@ def _stacktrace_addr2line_available(self): @property def _stacktrace_from_exception_available(self): - if Version(self.version) >= "1.85.0": + if Version(self.version) == "1.85.0": + # https://github.com/boostorg/stacktrace/blob/boost-1.85.0/build/Jamfile.v2#L143 return not self.options.header_only and not self.options.without_stacktrace and self.settings.os != "Windows" + elif Version(self.version) >= "1.86.0": + # https://github.com/boostorg/stacktrace/blob/boost-1.86.0/build/Jamfile.v2#L148 + return not self.options.header_only and not self.options.without_stacktrace and self.settings.arch == "x86_64" def configure(self): if self.options.header_only: @@ -625,9 +651,6 @@ def configure(self): if self.options.get_safe("without_stacktrace", True): self.options.rm_safe("with_stacktrace_backtrace") - if self.options.layout == "b2-default": - self.options.layout = "versioned" if self.settings.os == "Windows" else "system" - if self.options.without_fiber: self.options.rm_safe("numa") @@ -1894,7 +1917,9 @@ def filter_transform_module_libraries(names): continue if name in ("boost_math_c99l", "boost_math_tr1l") and str(self.settings.arch).startswith("ppc"): continue - if name in ("boost_stacktrace_addr2line", "boost_stacktrace_backtrace", "boost_stacktrace_basic", "boost_stacktrace_from_exception",) and self.settings.os == "Windows": + if name in ("boost_stacktrace_addr2line", "boost_stacktrace_backtrace", "boost_stacktrace_basic") and self.settings.os == "Windows": + continue + if name == "boost_stacktrace_from_exception" and not self._stacktrace_from_exception_available: continue if name == "boost_stacktrace_addr2line" and not self._stacktrace_addr2line_available: continue diff --git a/recipes/boost/all/dependencies/dependencies-1.86.0.yml b/recipes/boost/all/dependencies/dependencies-1.86.0.yml new file mode 100644 index 0000000000000..e1e1e40afaac1 --- /dev/null +++ b/recipes/boost/all/dependencies/dependencies-1.86.0.yml @@ -0,0 +1,291 @@ +configure_options: +- atomic +- charconv +- chrono +- cobalt +- container +- context +- contract +- coroutine +- date_time +- exception +- fiber +- filesystem +- graph +- graph_parallel +- iostreams +- json +- locale +- log +- math +- mpi +- nowide +- program_options +- python +- random +- regex +- serialization +- stacktrace +- system +- test +- thread +- timer +- type_erasure +- url +- wave +dependencies: + atomic: [] + charconv: [] + chrono: + - system + cobalt: + - container + - system + container: [] + context: [] + contract: + - exception + - thread + coroutine: + - context + - exception + - system + date_time: [] + exception: [] + fiber: + - context + - filesystem + fiber_numa: + - fiber + filesystem: + - atomic + - system + graph: + - math + - random + - regex + - serialization + graph_parallel: + - filesystem + - graph + - mpi + - random + - serialization + iostreams: + - random + - regex + json: + - container + - system + locale: + - thread + log: + - atomic + - date_time + - exception + - filesystem + - random + - regex + - system + - thread + log_setup: + - log + math: [] + math_c99: + - math + math_c99f: + - math + math_c99l: + - math + math_tr1: + - math + math_tr1f: + - math + math_tr1l: + - math + mpi: + - graph + - serialization + mpi_python: + - mpi + - python + nowide: + - filesystem + numpy: + - python + prg_exec_monitor: + - test + program_options: [] + python: [] + random: + - system + regex: [] + serialization: [] + stacktrace: [] + stacktrace_addr2line: + - stacktrace + stacktrace_backtrace: + - stacktrace + stacktrace_basic: + - stacktrace + stacktrace_noop: + - stacktrace + stacktrace_windbg: + - stacktrace + stacktrace_windbg_cached: + - stacktrace + stacktrace_from_exception: + - stacktrace + system: [] + test: + - exception + test_exec_monitor: + - test + thread: + - atomic + - chrono + - container + - date_time + - exception + - system + timer: [] + type_erasure: + - thread + unit_test_framework: + - prg_exec_monitor + - test + - test_exec_monitor + url: + - system + wave: + - filesystem + - serialization + wserialization: + - serialization +libs: + atomic: + - boost_atomic + charconv: + - boost_charconv + chrono: + - boost_chrono + cobalt: + - boost_cobalt + container: + - boost_container + context: + - boost_context + contract: + - boost_contract + coroutine: + - boost_coroutine + date_time: + - boost_date_time + exception: + - boost_exception + fiber: + - boost_fiber + fiber_numa: + - boost_fiber_numa + filesystem: + - boost_filesystem + graph: + - boost_graph + graph_parallel: + - boost_graph_parallel + iostreams: + - boost_iostreams + json: + - boost_json + locale: + - boost_locale + log: + - boost_log + log_setup: + - boost_log_setup + math: [] + math_c99: + - boost_math_c99 + math_c99f: + - boost_math_c99f + math_c99l: + - boost_math_c99l + math_tr1: + - boost_math_tr1 + math_tr1f: + - boost_math_tr1f + math_tr1l: + - boost_math_tr1l + mpi: + - boost_mpi + mpi_python: + - boost_mpi_python + nowide: + - boost_nowide + numpy: + - boost_numpy{py_major}{py_minor} + prg_exec_monitor: + - boost_prg_exec_monitor + program_options: + - boost_program_options + python: + - boost_python{py_major}{py_minor} + random: + - boost_random + regex: + - boost_regex + serialization: + - boost_serialization + stacktrace: [] + stacktrace_addr2line: + - boost_stacktrace_addr2line + stacktrace_backtrace: + - boost_stacktrace_backtrace + stacktrace_basic: + - boost_stacktrace_basic + stacktrace_from_exception: + - boost_stacktrace_from_exception + stacktrace_noop: + - boost_stacktrace_noop + stacktrace_windbg: + - boost_stacktrace_windbg + stacktrace_windbg_cached: + - boost_stacktrace_windbg_cached + system: + - boost_system + test: [] + test_exec_monitor: + - boost_test_exec_monitor + thread: + - boost_thread + timer: + - boost_timer + type_erasure: + - boost_type_erasure + unit_test_framework: + - boost_unit_test_framework + url: + - boost_url + wave: + - boost_wave + wserialization: + - boost_wserialization +requirements: + iostreams: + - bzip2 + - lzma + - zlib + - zstd + locale: + - iconv + - icu + python: + - python + regex: + - icu + stacktrace: + - backtrace +static_only: +- boost_exception +- boost_test_exec_monitor +version: 1.86.0 diff --git a/recipes/boost/config.yml b/recipes/boost/config.yml index 3363c84d6a537..2cac249885115 100644 --- a/recipes/boost/config.yml +++ b/recipes/boost/config.yml @@ -1,4 +1,6 @@ versions: + "1.86.0": + folder: all "1.85.0": folder: all "1.84.0": diff --git a/recipes/box2d/2.4.x/conandata.yml b/recipes/box2d/2.4.x/conandata.yml deleted file mode 100644 index c7372e2a8f037..0000000000000 --- a/recipes/box2d/2.4.x/conandata.yml +++ /dev/null @@ -1,10 +0,0 @@ -sources: - "2.4.0": - url: "https://github.com/erincatto/Box2D/archive/v2.4.0.zip" - sha256: "6aebbc54c93e367c97e382a57ba12546731dcde51526964c2ab97dec2050f8b9" - "2.4.1": - url: "https://github.com/erincatto/box2d/archive/refs/tags/v2.4.1.tar.gz" - sha256: "d6b4650ff897ee1ead27cf77a5933ea197cbeef6705638dd181adc2e816b23c2" -patches: - "2.4.0": - - patch_file: "patches/0001-install-and-allow-shared.patch" diff --git a/recipes/box2d/2.4.x/conanfile.py b/recipes/box2d/2.4.x/conanfile.py deleted file mode 100644 index cc297963ae36d..0000000000000 --- a/recipes/box2d/2.4.x/conanfile.py +++ /dev/null @@ -1,71 +0,0 @@ -import os -from conan import ConanFile -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, rm, rmdir, copy -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.scm import Version - -required_conan_version = ">=1.53.0" - - -class Box2dConan(ConanFile): - name = "box2d" - license = "Zlib" - description = "Box2D is a 2D physics engine for games" - homepage = "http://box2d.org/" - url = "https://github.com/conan-io/conan-center-index" - topics = ("physics-engine", "graphic", "2d", "collision") - package_type = "library" - settings = "os", "compiler", "build_type", "arch" - options = { - "shared": [True, False], - "fPIC": [True, False] - } - default_options = { - "shared": False, - "fPIC": True - } - - def export_sources(self): - export_conandata_patches(self) - - def config_options(self): - if self.settings.os == "Windows": - self.options.rm_safe("fPIC") - - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - - def layout(self): - cmake_layout(self, src_folder="src") - - def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) - - def generate(self): - tc = CMakeToolchain(self) - tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" - tc.variables["BOX2D_BUILD_TESTBED"] = False - tc.variables["BOX2D_BUILD_UNIT_TESTS"] = False - tc.generate() - - def build(self): - apply_conandata_patches(self) - cmake = CMake(self) - cmake.configure() - cmake.build() - - def package(self): - copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - cmake = CMake(self) - cmake.configure() - cmake.install() - rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - rm(self, "*.pdb", self.package_folder, recursive=True) - - def package_info(self): - self.cpp_info.names["cmake_find_package"] = "box2d" - self.cpp_info.names["cmake_find_package_multi"] = "box2d" - self.cpp_info.libs = ["box2d"] - if Version(self.version) >= "2.4.1" and self.options.shared: - self.cpp_info.defines.append("B2_SHARED") diff --git a/recipes/box2d/2.4.x/test_package/CMakeLists.txt b/recipes/box2d/2.4.x/test_package/CMakeLists.txt deleted file mode 100644 index fb4d8d7f5888a..0000000000000 --- a/recipes/box2d/2.4.x/test_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -find_package(box2d REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} box2d::box2d) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/box2d/2.4.x/test_package/test_package.cpp b/recipes/box2d/2.4.x/test_package/test_package.cpp deleted file mode 100644 index 7dfa813bc1d2e..0000000000000 --- a/recipes/box2d/2.4.x/test_package/test_package.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include "box2d/box2d.h" - -int main(void) { - b2Vec2 gravity(0.0f, -10.0f); - b2World world(gravity); - - b2BodyDef groundBodyDef; - groundBodyDef.position.Set(0.0f, -10.0f); - - b2Body* groundBody = world.CreateBody(&groundBodyDef); - b2PolygonShape groundBox; - groundBox.SetAsBox(50.0f, 10.0f); - - return 0; -} diff --git a/recipes/box2d/2.4.x/test_v1_package/CMakeLists.txt b/recipes/box2d/2.4.x/test_v1_package/CMakeLists.txt deleted file mode 100644 index 373fb5bb61846..0000000000000 --- a/recipes/box2d/2.4.x/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(box2d REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} box2d::box2d) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/box2d/2.4.x/test_v1_package/test_package.cpp b/recipes/box2d/2.4.x/test_v1_package/test_package.cpp deleted file mode 100644 index 7dfa813bc1d2e..0000000000000 --- a/recipes/box2d/2.4.x/test_v1_package/test_package.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include "box2d/box2d.h" - -int main(void) { - b2Vec2 gravity(0.0f, -10.0f); - b2World world(gravity); - - b2BodyDef groundBodyDef; - groundBodyDef.position.Set(0.0f, -10.0f); - - b2Body* groundBody = world.CreateBody(&groundBodyDef); - b2PolygonShape groundBox; - groundBox.SetAsBox(50.0f, 10.0f); - - return 0; -} diff --git a/recipes/box2d/all/conandata.yml b/recipes/box2d/all/conandata.yml index 857c8f5d17268..8a363f08c6689 100644 --- a/recipes/box2d/all/conandata.yml +++ b/recipes/box2d/all/conandata.yml @@ -1,4 +1,15 @@ sources: - "2.3.1": - url: "https://github.com/erincatto/Box2D/archive/v2.3.1.zip" - sha256: "8ddd947400c59bcf09774bd75787e6253098a0bd337f5c61dae38b91aea678cf" + "2.4.2": + url: "https://github.com/erincatto/box2d/archive/refs/tags/v2.4.2.tar.gz" + sha256: "85b9b104d256c985e6e244b4227d447897fac429071cc114e5cc819dae848852" + "2.4.1": + url: "https://github.com/erincatto/box2d/archive/refs/tags/v2.4.1.tar.gz" + sha256: "d6b4650ff897ee1ead27cf77a5933ea197cbeef6705638dd181adc2e816b23c2" + "2.4.0": + url: "https://github.com/erincatto/Box2D/archive/v2.4.0.zip" + sha256: "6aebbc54c93e367c97e382a57ba12546731dcde51526964c2ab97dec2050f8b9" +patches: + "2.4.0": + - patch_file: "patches/0001-install-and-allow-shared.patch" + patch_description: "add install, allow shared build" + patch_type: "conan" diff --git a/recipes/box2d/all/conanfile.py b/recipes/box2d/all/conanfile.py index e5adde1f2b06a..cdd4fd6ee5dc9 100644 --- a/recipes/box2d/all/conanfile.py +++ b/recipes/box2d/all/conanfile.py @@ -1,68 +1,73 @@ import os -from conan import ConanFile, tools -from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout +from conan import ConanFile +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, rm, rmdir, copy +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.scm import Version -required_conan_version = ">=1.46.0" +required_conan_version = ">=1.53.0" class Box2dConan(ConanFile): name = "box2d" - license = "Zlib" description = "Box2D is a 2D physics engine for games" - topics = ("physics", "engine", "game development") - homepage = "http://box2d.org/" + license = "Zlib" url = "https://github.com/conan-io/conan-center-index" - settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], - "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True,} + homepage = "http://box2d.org/" + topics = ("physics-engine", "graphic", "2d", "collision") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False] + } + default_options = { + "shared": False, + "fPIC": True + } + + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") def layout(self): - cmake_layout(self, src_folder="Box2D") + cmake_layout(self, src_folder="src") def source(self): - tools.files.get(self, - **self.conan_data["sources"][self.version], - strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) - tc.variables["BOX2D_BUILD_SHARED"] = self.options.shared - tc.variables["BOX2D_BUILD_STATIC"] = not self.options.shared - if self.settings.os == "Windows" and self.options.shared: - tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True - tc.variables["BOX2D_BUILD_EXAMPLES"] = False + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.variables["BOX2D_BUILD_TESTBED"] = False + tc.variables["BOX2D_BUILD_UNIT_TESTS"] = False tc.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) - cmake.configure(build_script_folder="Box2D") + cmake.configure() cmake.build() def package(self): - tools.files.copy(self, "License.txt", src=os.path.join(self.source_folder, "Box2D"), dst=os.path.join(self.package_folder,"licenses")) - tools.files.copy(self, os.path.join("Box2D", "*.h"), src=os.path.join(self.source_folder, "Box2D"), dst=os.path.join(self.package_folder, "include")) - tools.files.copy(self, "*.lib", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) - tools.files.copy(self, "*.dll", src=self.build_folder, dst=os.path.join(self.package_folder, "bin"), keep_path=False) - tools.files.copy(self, "*.so*", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) - tools.files.copy(self, "*.dylib", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) - tools.files.copy(self, "*.a", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.configure() + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rm(self, "*.pdb", self.package_folder, recursive=True) def package_info(self): - self.cpp_info.libs = ["Box2D"] - if self.settings.os in ("FreeBSD", "Linux"): - self.cpp_info.system_libs = ["m"] + self.cpp_info.names["cmake_find_package"] = "box2d" + self.cpp_info.names["cmake_find_package_multi"] = "box2d" + self.cpp_info.libs = ["box2d"] + if Version(self.version) >= "2.4.1" and self.options.shared: + self.cpp_info.defines.append("B2_SHARED") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/box2d/2.4.x/patches/0001-install-and-allow-shared.patch b/recipes/box2d/all/patches/0001-install-and-allow-shared.patch similarity index 100% rename from recipes/box2d/2.4.x/patches/0001-install-and-allow-shared.patch rename to recipes/box2d/all/patches/0001-install-and-allow-shared.patch diff --git a/recipes/box2d/all/test_package/CMakeLists.txt b/recipes/box2d/all/test_package/CMakeLists.txt index 22c1118333f4f..985bafbcaa4c7 100644 --- a/recipes/box2d/all/test_package/CMakeLists.txt +++ b/recipes/box2d/all/test_package/CMakeLists.txt @@ -1,7 +1,8 @@ -cmake_minimum_required(VERSION 3.4) -project(test_package) +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES CXX) -find_package(box2d) +find_package(box2d REQUIRED CONFIG) -add_executable(test_package test_package.cpp) -target_link_libraries(test_package box2d::box2d) +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE box2d::box2d) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/box2d/all/test_package/conanfile.py b/recipes/box2d/all/test_package/conanfile.py index a3a0294a68898..d1ce1a2cbc477 100644 --- a/recipes/box2d/all/test_package/conanfile.py +++ b/recipes/box2d/all/test_package/conanfile.py @@ -1,11 +1,13 @@ import os -from conan import ConanFile, tools +from conan import ConanFile +from conan.tools.build import can_run from conan.tools.cmake import CMake, cmake_layout class Box2DTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" def layout(self): cmake_layout(self) @@ -19,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.build.cross_building(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/box2d/all/test_package/test_package.cpp b/recipes/box2d/all/test_package/test_package.cpp index 045f0bf063169..31112b0dcea5a 100644 --- a/recipes/box2d/all/test_package/test_package.cpp +++ b/recipes/box2d/all/test_package/test_package.cpp @@ -1,88 +1,15 @@ -#include -#include +#include "box2d/box2d.h" -#include - -// This is a simple example of building and running a simulation -// using Box2D. Here we create a large ground box and a small dynamic -// box. -// There are no graphics for this example. Box2D is meant to be used -// with your rendering engine in your game engine. -int main(int argc, char **argv) -{ - B2_NOT_USED(argc); - B2_NOT_USED(argv); - - // Define the gravity vector. +int main(void) { b2Vec2 gravity(0.0f, -10.0f); - - // Construct a world object, which will hold and simulate the rigid bodies. b2World world(gravity); - // Define the ground body. b2BodyDef groundBodyDef; groundBodyDef.position.Set(0.0f, -10.0f); - // Call the body factory which allocates memory for the ground body - // from a pool and creates the ground box shape (also from a pool). - // The body is also added to the world. - b2Body *groundBody = world.CreateBody(&groundBodyDef); - - // Define the ground box shape. + b2Body* groundBody = world.CreateBody(&groundBodyDef); b2PolygonShape groundBox; - - // The extents are the half-widths of the box. groundBox.SetAsBox(50.0f, 10.0f); - // Add the ground fixture to the ground body. - groundBody->CreateFixture(&groundBox, 0.0f); - - // Define the dynamic body. We set its position and call the body factory. - b2BodyDef bodyDef; - bodyDef.type = b2_dynamicBody; - bodyDef.position.Set(0.0f, 4.0f); - b2Body *body = world.CreateBody(&bodyDef); - - // Define another box shape for our dynamic body. - b2PolygonShape dynamicBox; - dynamicBox.SetAsBox(1.0f, 1.0f); - - // Define the dynamic body fixture. - b2FixtureDef fixtureDef; - fixtureDef.shape = &dynamicBox; - - // Set the box density to be non-zero, so it will be dynamic. - fixtureDef.density = 1.0f; - - // Override the default friction. - fixtureDef.friction = 0.3f; - - // Add the shape to the body. - body->CreateFixture(&fixtureDef); - - // Prepare for simulation. Typically we use a time step of 1/60 of a - // second (60Hz) and 10 iterations. This provides a high quality simulation - // in most game scenarios. - float32 timeStep = 1.0f / 60.0f; - int32 velocityIterations = 6; - int32 positionIterations = 2; - - // This is our little game loop. - for (int32 i = 0; i < 60; ++i) - { - // Instruct the world to perform a single step of simulation. - // It is generally best to keep the time step and iterations fixed. - world.Step(timeStep, velocityIterations, positionIterations); - - // Now print the position and angle of the body. - b2Vec2 position = body->GetPosition(); - float32 angle = body->GetAngle(); - - printf("%4.2f %4.2f %4.2f\n", position.x, position.y, angle); - } - - // When the world destructor is called, all bodies and joints are freed. This can - // create orphaned pointers, so be careful about your world management. - return 0; } diff --git a/recipes/box2d/all/test_v1_package/CMakeLists.txt b/recipes/box2d/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 458981ad5eb24..0000000000000 --- a/recipes/box2d/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.4) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -add_executable(test_package ../test_package/test_package.cpp) -target_link_libraries(test_package ${CONAN_LIBS}) diff --git a/recipes/box2d/config.yml b/recipes/box2d/config.yml index 1922ed59d887d..d0f0027e07e5c 100644 --- a/recipes/box2d/config.yml +++ b/recipes/box2d/config.yml @@ -1,7 +1,7 @@ versions: - "2.3.1": + "2.4.2": folder: "all" - "2.4.0": - folder: "2.4.x" "2.4.1": - folder: "2.4.x" + folder: "all" + "2.4.0": + folder: "all" diff --git a/recipes/bzip2/all/conanfile.py b/recipes/bzip2/all/conanfile.py index 2a39045a8299d..ce77ac1450e7d 100644 --- a/recipes/bzip2/all/conanfile.py +++ b/recipes/bzip2/all/conanfile.py @@ -12,7 +12,7 @@ class Bzip2Conan(ConanFile): name = "bzip2" url = "https://github.com/conan-io/conan-center-index" homepage = "https://sourceware.org/bzip2" - license = "bzip2-1.0.8" + license = "bzip2-1.0.6" description = "bzip2 is a free and open-source file compression program that uses the Burrows Wheeler algorithm." topics = ("data-compressor", "file-compression") package_type = "library" diff --git a/recipes/c-ares/all/conandata.yml b/recipes/c-ares/all/conandata.yml index 67e69235450f7..a67dccf1e1ee5 100644 --- a/recipes/c-ares/all/conandata.yml +++ b/recipes/c-ares/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.33.1": + url: "https://github.com/c-ares/c-ares/releases/download/v1.33.1/c-ares-1.33.1.tar.gz" + sha256: "06869824094745872fa26efd4c48e622b9bd82a89ef0ce693dc682a23604f415" + "1.33.0": + url: "https://github.com/c-ares/c-ares/releases/download/v1.33.0/c-ares-1.33.0.tar.gz" + sha256: "3e41df2f172041eb4ecb754a464c11ccc5046b2a1c8b1d6a40dac45d3a3b2346" "1.32.3": url: "https://github.com/c-ares/c-ares/releases/download/v1.32.3/c-ares-1.32.3.tar.gz" sha256: "5f02cc809aac3f6cc5edc1fac6c4423fd5616d7406ce47b904c24adf0ff2cd0f" @@ -31,3 +37,9 @@ sources: "1.19.1": url: "https://github.com/c-ares/c-ares/releases/download/cares-1_19_1/c-ares-1.19.1.tar.gz" sha256: "321700399b72ed0e037d0074c629e7741f6b2ec2dda92956abe3e9671d3e268e" +patches: + "1.33.0": + - patch_file: "patches/1.33.0-0001-fix-tcp-fastopen.patch" + patch_description: "fix compilation error for TCP_FASTOPEN_CONNECT" + patch_type: "portability" + patch_source: "https://github.com/c-ares/c-ares/commit/4abdf7de3678d98f474bd2abeedea741f6c50231" diff --git a/recipes/c-ares/all/conanfile.py b/recipes/c-ares/all/conanfile.py index 635628761aed5..e4428917c336f 100644 --- a/recipes/c-ares/all/conanfile.py +++ b/recipes/c-ares/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.tools.apple import is_apple_os from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import collect_libs, copy, get, rm, rmdir +from conan.tools.files import collect_libs, copy, get, rm, rmdir, apply_conandata_patches, export_conandata_patches from conan.tools.scm import Version import os @@ -28,6 +28,9 @@ class CAresConan(ConanFile): "tools": True, } + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -54,6 +57,7 @@ def generate(self): tc.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/c-ares/all/patches/1.33.0-0001-fix-tcp-fastopen.patch b/recipes/c-ares/all/patches/1.33.0-0001-fix-tcp-fastopen.patch new file mode 100644 index 0000000000000..a5aff6174105f --- /dev/null +++ b/recipes/c-ares/all/patches/1.33.0-0001-fix-tcp-fastopen.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib/ares__socket.c b/src/lib/ares__socket.c +index 2e360ef..86e281f 100644 +--- a/src/lib/ares__socket.c ++++ b/src/lib/ares__socket.c +@@ -56,7 +56,7 @@ + #include + #include + +-#if defined(__linux__) && defined(MSG_FASTOPEN) ++#if defined(__linux__) && defined(TCP_FASTOPEN_CONNECT) + # define TFO_SUPPORTED 1 + # define TFO_SKIP_CONNECT 0 + # define TFO_USE_SENDTO 0 diff --git a/recipes/c-ares/config.yml b/recipes/c-ares/config.yml index fd77325df168c..16fb0dfe22209 100644 --- a/recipes/c-ares/config.yml +++ b/recipes/c-ares/config.yml @@ -1,4 +1,8 @@ versions: + "1.33.1": + folder: all + "1.33.0": + folder: all "1.32.3": folder: all "1.32.2": diff --git a/recipes/c4core/all/conandata.yml b/recipes/c4core/all/conandata.yml index 742894bf86081..8abc810fc0588 100644 --- a/recipes/c4core/all/conandata.yml +++ b/recipes/c4core/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.2.2": + url: "https://github.com/biojppm/c4core/releases/download/v0.2.2/c4core-0.2.2-src.tgz" + sha256: "beea43a5bdc64616d897cc0af728f408e35e2d75a8bb6014e6e25e90e0484578" "0.2.1": url: "https://github.com/biojppm/c4core/releases/download/v0.2.1/c4core-0.2.1-src.tgz" sha256: "6447896444c59002af58c8543d0bc64184b9a5c5992c8fc09d6d71935d039f89" @@ -18,6 +21,10 @@ sources: url: "https://github.com/biojppm/c4core/releases/download/v0.1.8/c4core-0.1.8-src.tgz" sha256: "95c0663192c6bff7a098b50afcb05d22a34dd0fd8e6be2e1b61edad2b9675fde" patches: + "0.2.2": + - patch_file: "patches/0.2.2-0001-make-fast_float-external.patch" + patch_description: "use cci's fast_float recipe" + patch_type: "conan" "0.2.1": - patch_file: "patches/0.2.0-0001-make-fast_float-external.patch" patch_description: "use cci's fast_float recipe" diff --git a/recipes/c4core/all/patches/0.2.2-0001-make-fast_float-external.patch b/recipes/c4core/all/patches/0.2.2-0001-make-fast_float-external.patch new file mode 100644 index 0000000000000..159c3bcb4195b --- /dev/null +++ b/recipes/c4core/all/patches/0.2.2-0001-make-fast_float-external.patch @@ -0,0 +1,38 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 79451c5..c93511a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -76,7 +76,7 @@ set(C4CORE_SRC_FILES + if(C4CORE_WITH_FASTFLOAT) + list(APPEND C4CORE_SRC_FILES + c4/ext/fast_float.hpp +- c4/ext/fast_float_all.h ++# c4/ext/fast_float_all.h + ) + endif() + set(C4CORE_AMALGAMATED ${C4CORE_SRC_DIR}/../src_singleheader/c4/c4core_all.hpp) +@@ -95,7 +95,10 @@ c4_add_library(c4core + SOURCE_ROOT ${C4CORE_SRC_DIR} + SOURCES ${C4CORE_SRC_FILES} + ) +-if(NOT C4CORE_WITH_FASTFLOAT) ++if(C4CORE_WITH_FASTFLOAT) ++ find_package(FastFloat REQUIRED CONFIG) ++ target_link_libraries(c4core PUBLIC "FastFloat::fast_float") ++else() + target_compile_definitions(c4core PUBLIC -DC4CORE_NO_FAST_FLOAT) + endif() + if(C4CORE_NO_DEBUG_BREAK) +diff --git a/src/c4/ext/fast_float.hpp b/src/c4/ext/fast_float.hpp +index 4bf3c0d..b6a3a77 100644 +--- a/src/c4/ext/fast_float.hpp ++++ b/src/c4/ext/fast_float.hpp +@@ -20,7 +20,7 @@ + # pragma GCC diagnostic ignored "-Wold-style-cast" + #endif + +-#include "c4/ext/fast_float_all.h" ++#include "fast_float/fast_float.h" + + #ifdef _MSC_VER + # pragma warning(pop) diff --git a/recipes/c4core/config.yml b/recipes/c4core/config.yml index afc5fb74fc180..6368871bf45ae 100644 --- a/recipes/c4core/config.yml +++ b/recipes/c4core/config.yml @@ -1,4 +1,6 @@ versions: + "0.2.2": + folder: all "0.2.1": folder: all "0.2.0": diff --git a/recipes/catch2/3.x.x/conandata.yml b/recipes/catch2/3.x.x/conandata.yml index bd54e7086e964..f13e63f80f8cb 100644 --- a/recipes/catch2/3.x.x/conandata.yml +++ b/recipes/catch2/3.x.x/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.7.0": + url: "https://github.com/catchorg/Catch2/archive/v3.7.0.tar.gz" + sha256: "5b10cd536fa3818112a82820ce0787bd9f2a906c618429e7c4dea639983c8e88" "3.6.0": url: "https://github.com/catchorg/Catch2/archive/v3.6.0.tar.gz" sha256: "485932259a75c7c6b72d4b874242c489ea5155d17efa345eb8cc72159f49f356" diff --git a/recipes/catch2/config.yml b/recipes/catch2/config.yml index 51d1bba3d03b7..a1edebfb1f349 100644 --- a/recipes/catch2/config.yml +++ b/recipes/catch2/config.yml @@ -1,4 +1,6 @@ versions: + "3.7.0": + folder: 3.x.x "3.6.0": folder: 3.x.x "3.5.4": diff --git a/recipes/cctag/all/conandata.yml b/recipes/cctag/all/conandata.yml index 1f24a6339e1f2..85f3e81e772c2 100644 --- a/recipes/cctag/all/conandata.yml +++ b/recipes/cctag/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.4": + url: "https://github.com/alicevision/CCTag/archive/refs/tags/v1.0.4.tar.gz" + sha256: "f4ced6138419f4ad09d62d4373738c172586c91068faff8bf08c2caa5e76d516" "1.0.3": url: "https://github.com/alicevision/CCTag/archive/refs/tags/v1.0.3.tar.gz" sha256: "25396b03c4aa3c1be241a2a8518a29511cb4fff695caa5126203fbba8e8e444d" diff --git a/recipes/cctag/all/conanfile.py b/recipes/cctag/all/conanfile.py index 8d249cbcf72c9..617a9b8ecd704 100644 --- a/recipes/cctag/all/conanfile.py +++ b/recipes/cctag/all/conanfile.py @@ -59,7 +59,9 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.84.0", transitive_headers=True, transitive_libs=True) + # boost/1.85.0 not compatible because of "error: 'numeric' is not a namespace-name" error + boost_version = "1.85.0" if Version(self.version) >= "1.0.4" else "1.84.0" + self.requires(f"boost/{boost_version}", transitive_headers=True, transitive_libs=True) self.requires("eigen/3.4.0", transitive_headers=True) if Version(self.version) >= "1.0.3": self.requires("onetbb/2021.10.0") @@ -126,8 +128,10 @@ def _patch_sources(self): replace_in_file(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"), "${OpenCV_LIBS}", "opencv_core opencv_videoio opencv_imgproc opencv_imgcodecs") - # Remove very old CUDA compute capabilities - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + # From https://github.com/alicevision/CCTag/pull/210/files CCTAG_CUDA_CC_LIST_INIT0 variable doesn't exists anymore in favor of a chooseCudaCC() cmake function + if Version(self.version) < "1.0.4": + # Remove very old CUDA compute capabilities + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "set(CCTAG_CUDA_CC_LIST_INIT0 3.5 3.7 5.0 5.2)", "set(CCTAG_CUDA_CC_LIST_INIT0 5.0 5.2)") diff --git a/recipes/cctag/config.yml b/recipes/cctag/config.yml index 2350f098ddd20..20e7cbd11f28a 100644 --- a/recipes/cctag/config.yml +++ b/recipes/cctag/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.4": + folder: all "1.0.3": folder: all "1.0.1": diff --git a/recipes/chipmunk2d/all/conandata.yml b/recipes/chipmunk2d/all/conandata.yml index 0fcc6c23d2ed4..41e39beaf8dc2 100644 --- a/recipes/chipmunk2d/all/conandata.yml +++ b/recipes/chipmunk2d/all/conandata.yml @@ -2,3 +2,10 @@ sources: "7.0.3": url: "https://chipmunk-physics.net/release/Chipmunk-7.x/Chipmunk-7.0.3.tgz" sha256: "048b0c9eff91c27bab8a54c65ad348cebd5a982ac56978e8f63667afbb63491a" + +patches: + "7.0.3": + - patch_file: "patches/0001-remove-sysctl-linux-win.patch" + patch_type: bugfix + patch_source: https://github.com/slembcke/Chipmunk2D/pull/175 + patch_description: "Needed to build with glib > 2.30" diff --git a/recipes/chipmunk2d/all/conanfile.py b/recipes/chipmunk2d/all/conanfile.py index 785d8d95d890d..53afb4be1c99c 100644 --- a/recipes/chipmunk2d/all/conanfile.py +++ b/recipes/chipmunk2d/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, replace_in_file +from conan.tools.files import copy, get, replace_in_file, apply_conandata_patches, export_conandata_patches import os required_conan_version = ">=1.53.0" @@ -52,9 +52,13 @@ def generate(self): tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True tc.generate() + def export_sources(self): + export_conandata_patches(self) + def _patch_sources(self): # The finite-math-only optimization has no effect and can cause linking errors # when linked against glibc >= 2.31 + apply_conandata_patches(self) replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "-ffast-math", "-ffast-math -fno-finite-math-only") diff --git a/recipes/chipmunk2d/all/patches/0001-remove-sysctl-linux-win.patch b/recipes/chipmunk2d/all/patches/0001-remove-sysctl-linux-win.patch new file mode 100644 index 0000000000000..8b123a7652b29 --- /dev/null +++ b/recipes/chipmunk2d/all/patches/0001-remove-sysctl-linux-win.patch @@ -0,0 +1,16 @@ +--- a/src/cpHastySpace.c ++++ b/src/cpHastySpace.c +@@ -7,8 +7,12 @@ + //TODO: Move all the thread stuff to another file + + //#include +-#ifndef _WIN32 ++ ++#ifdef __APPLE__ + #include ++#endif ++ ++#ifndef _WIN32 + #include + #else + #ifndef WIN32_LEAN_AND_MEAN diff --git a/recipes/cigi-ccl/all/conandata.yml b/recipes/cigi-ccl/all/conandata.yml new file mode 100644 index 0000000000000..f77d32f6993f8 --- /dev/null +++ b/recipes/cigi-ccl/all/conandata.yml @@ -0,0 +1,5 @@ +sources: + "4.0.6a": + url: + - "https://master.dl.sourceforge.net/project/cigi/CIGI%20Class%20Library%20%28CCL%29/CCL%20Version%204.0.6a/ccl_4_0%20rev6a.zip" + sha256: "a55099c0418c663e572109bd62ed2f7b411c51af7b404212988e36360e8a13cc" diff --git a/recipes/cigi-ccl/all/conanfile.py b/recipes/cigi-ccl/all/conanfile.py new file mode 100644 index 0000000000000..5237537049f2f --- /dev/null +++ b/recipes/cigi-ccl/all/conanfile.py @@ -0,0 +1,102 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.apple import is_apple_os +import os + +required_conan_version = ">=1.53.0" + +class CigiClConan(ConanFile): + name = "cigi-ccl" + description = "Industry standard communication with compliant image generators" + license = "LGPL-2.1-only" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://cigi.sourceforge.io/product_ccl.php" + topics = ("simulation", "interface engines", "data visualization") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if is_apple_os(self): + # CigiOutgoingMsg.cpp:196:38: error: use of undeclared identifier 'PTHREAD_MUTEX_RECURSIVE_NP' + raise ConanInvalidConfiguration(f"{self.settings.os} Conan recipe is not supported on Apple. Contributions are welcome.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + + if is_msvc(self): + tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self) + + tc.generate() + + def _patch_sources(self): + cmake_lists_fixes = { + # This old CMakeLists.txt had PROJECT() before CMAKE_MINIMUM_REQUIRED(); this order must be inverted + "CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7)": "", + "PROJECT(ccl)": "CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7)\nPROJECT(ccl)", + # Using backslash for path is being interpreted as invalid escape sequence in newer versions of CMake + "Header Files\\": "Header Files/", + "Source Files\\": "Source Files/", + # Incorrectly tries to install both the static and shared targets + "INSTALL(TARGETS cigicl-static cigicl-shared": f"INSTALL(TARGETS {'cigicl-shared' if self.options.shared else 'cigicl-static'}" + } + + for old, new in cmake_lists_fixes.items(): + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), old, new) + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + if self.options.shared: + cmake.build(target="cigicl-shared") + else: + cmake.build(target="cigicl-static") + + def package(self): + cmake = CMake(self) + cmake.install() + + copy(self, "license.html", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + + def package_info(self): + self.cpp_info.set_property("pkg_config_name", "cigicl") + build_type_suffix = "" + if self.settings.build_type == "Debug" and self.settings.os == "Windows": + build_type_suffix = "D" + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["pthread", "m"]) + + if self.options.shared: + self.cpp_info.libs = ["ccl_dll" + build_type_suffix] + self.cpp_info.defines = ["CCL_DLL"] + else: + self.cpp_info.libs = ["ccl_lib" + build_type_suffix] diff --git a/recipes/cigi-ccl/all/test_package/CMakeLists.txt b/recipes/cigi-ccl/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..9ff9e1c44f12c --- /dev/null +++ b/recipes/cigi-ccl/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES CXX) + +find_package(cigi-ccl REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) + +target_link_libraries(${PROJECT_NAME} PRIVATE cigi-ccl::cigi-ccl) diff --git a/recipes/cigi-ccl/all/test_package/conanfile.py b/recipes/cigi-ccl/all/test_package/conanfile.py new file mode 100644 index 0000000000000..f5cf204295e19 --- /dev/null +++ b/recipes/cigi-ccl/all/test_package/conanfile.py @@ -0,0 +1,25 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + 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/cigi-ccl/all/test_package/test_package.cpp b/recipes/cigi-ccl/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..9a4a0a228de16 --- /dev/null +++ b/recipes/cigi-ccl/all/test_package/test_package.cpp @@ -0,0 +1,7 @@ +#include + +int main(void) { + CigiOutgoingMsg message; + message.CreateBuffer(); + return 0; +} diff --git a/recipes/cigi-ccl/config.yml b/recipes/cigi-ccl/config.yml new file mode 100644 index 0000000000000..f73e93e2624ef --- /dev/null +++ b/recipes/cigi-ccl/config.yml @@ -0,0 +1,3 @@ +versions: + "4.0.6a": + folder: all diff --git a/recipes/clipper2/all/conandata.yml b/recipes/clipper2/all/conandata.yml index 317fd4373a1de..5d1e76ef64605 100644 --- a/recipes/clipper2/all/conandata.yml +++ b/recipes/clipper2/all/conandata.yml @@ -1,7 +1,10 @@ sources: + "1.4.0": + url: "https://github.com/AngusJohnson/Clipper2/archive/refs/tags/Clipper2_1.4.0.tar.gz" + sha256: "b83f71bb6a338f4f82116089c5ae867dbc43a2d651b5441380970dd966edd959" "1.3.0": - url: "https://github.com/AngusJohnson/Clipper2/archive/refs/tags/Cliper2_1.3.0.tar.gz" - sha256: "f7e1a706f5f786ed1be8ae969ce15ca569ce36d8de1c3d3f3dacfb3ce0c493e8" + url: "https://github.com/AngusJohnson/Clipper2/archive/refs/tags/Clipper2_1.3.0.tar.gz" + sha256: "8e537ec320e140afaa8fba1f23120416693cc1d71b0f76ad801d24b88b5e0b3c" "1.2.4": url: "https://github.com/AngusJohnson/Clipper2/archive/refs/tags/Clipper2_1.2.4.tar.gz" sha256: "a013d391c25c5f665cdb5cbd75cdd842dcc28f6e1bd098454beb359f6f212f33" diff --git a/recipes/clipper2/all/conanfile.py b/recipes/clipper2/all/conanfile.py index fe88fd67b3e80..c01db389a4cf8 100644 --- a/recipes/clipper2/all/conanfile.py +++ b/recipes/clipper2/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import get, copy, rmdir, export_conandata_patches, apply_conandata_patches +from conan.tools.files import get, copy, rmdir, export_conandata_patches, apply_conandata_patches, replace_in_file from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout @@ -21,11 +21,15 @@ class Clipper2Conan(ConanFile): "shared": [True, False], "fPIC": [True, False], "usingz": ["ON", "OFF", "ONLY"], + "with_max_precision": ["ANY"], + "with_hi_precision": [True, False], } default_options = { "shared": False, "fPIC": True, "usingz": "ON", + "with_max_precision": 8, + "with_hi_precision": False, } @property @@ -48,6 +52,10 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "1.2.4": + del self.options.with_max_precision + if Version(self.version) < "1.4.0": + del self.options.with_hi_precision def configure(self): if self.options.shared: @@ -75,10 +83,18 @@ def generate(self): tc.variables["CLIPPER2_EXAMPLES"] = False tc.variables["CLIPPER2_TESTS"] = False tc.variables["CLIPPER2_USINGZ"] = self.options.usingz + if "with_hi_precision" in self.options: + tc.variables["CLIPPER2_HI_PRECISION"] = self.options.with_hi_precision + if "with_max_precision" in self.options: + tc.variables["CLIPPER2_MAX_PRECISION"] = self.options.with_max_precision tc.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + replace_in_file(self, os.path.join(self.source_folder, "CPP", "CMakeLists.txt"), "-Werror", "") def build(self): - apply_conandata_patches(self) + self._patch_sources() cmake = CMake(self) cmake.configure(build_script_folder=os.path.join(self.source_folder, "CPP")) cmake.build() @@ -89,6 +105,7 @@ def package(self): cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): if self.options.usingz != "ONLY": diff --git a/recipes/clipper2/config.yml b/recipes/clipper2/config.yml index 49b239cf22a6f..4c35529540bb1 100644 --- a/recipes/clipper2/config.yml +++ b/recipes/clipper2/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.0": + folder: all "1.3.0": folder: all "1.2.4": diff --git a/recipes/compute_library/all/conandata.yml b/recipes/compute_library/all/conandata.yml new file mode 100644 index 0000000000000..3b952c4dbb5e0 --- /dev/null +++ b/recipes/compute_library/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "23.08": + url: "https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v23.08.tar.gz" + sha256: "62f514a555409d4401e5250b290cdf8cf1676e4eb775e5bd61ea6a740a8ce24f" + "23.02.1": + url: "https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v23.02.1.tar.gz" + sha256: "c3a443e26539f866969242e690cf0651ef629149741ee18732f954c734da6763" diff --git a/recipes/compute_library/all/conanfile.py b/recipes/compute_library/all/conanfile.py new file mode 100644 index 0000000000000..6becfaaa8f1bb --- /dev/null +++ b/recipes/compute_library/all/conanfile.py @@ -0,0 +1,149 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import get, copy, rm, chdir +from conan.tools.build import check_min_cppstd, cross_building, build_jobs +from conan.tools.scm import Version +from conan.tools.env import VirtualBuildEnv +from conan.tools.gnu import AutotoolsDeps, AutotoolsToolchain +from conan.tools.layout import basic_layout +import os + + +required_conan_version = ">=1.53.0" + + +class ComputeLibraryConan(ConanFile): + name = "compute_library" + description = "The Compute Library is a set of computer vision and machine learning functions optimized for both Arm CPUs and GPUs using SIMD technologies" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ARM-software/ComputeLibrary" + topics = ("android", "linux", "machine-learning", "arm", "computer-vision", "neural-network") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "enable_openmp": [True, False], + "enable_opencl": [True, False], + "enable_neon": [True, False], + "enable_multi_isa": [True, False], + } + default_options = { + "shared": False, + "enable_openmp": False, + "enable_opencl": True, + "enable_neon": True, + "enable_multi_isa": False, + } + + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "6", + "clang": "5", + "apple-clang": "5.1", + } + + def config_options(self): + # INFO: Neon option is reserved to arm architecture + if "arm" not in str(self.settings.arch): + del self.options.enable_neon + # INFO: OpenMP option only works with g++, according to the documentation + if self.settings.compiler == "clang": + del self.options.enable_openmp + # INFO: OpenCL fails to build with MacOS + if self.settings.os == "Macos": + del self.options.enable_opencl + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + basic_layout(self, src_folder="src") + + def build_requirements(self): + self.tool_requires("scons/4.3.0") + + def requirements(self): + if self.options.get_safe("enable_opencl"): + self.requires("opencl-headers/2023.04.17") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") + # INFO: https://github.com/ARM-software/ComputeLibrary#supported-systems + supported_os = ["Android", "Linux", "OpenBSD", "Macos", "Tizen", "Windows"] + if str(self.settings.os) not in supported_os: + raise ConanInvalidConfiguration(f"{self.ref} does not support {self.settings.os}. It is only supported on {supported_os}.") + if self.settings.os == "Windows": + if cross_building(self): + # INFO: https://arm-software.github.io/ComputeLibrary/latest/how_to_build.xhtml#S1_6_windows_host + raise ConanInvalidConfiguration(f"Using scons directly from the Windows command line is known to cause problems. Please, try native native build on Windows ARM or cross-build on Linux Ubuntu.") + if "arm" in str(self.settings.arch): + # INFO: https://arm-software.github.io/ComputeLibrary/latest/how_to_build.xhtml#S1_6_3_WoA + self.output.warn("Native builds on Windows are experimental and some features from the library interacting with the OS are missing.") + if "x86" in str(self.settings.arch): + raise ConanInvalidConfiguration(f"{self.ref} does not support native builds on Windows x86/x86_64. It is only supported on Windows ARM.") + if "arm" not in str(self.settings.arch) and "x86" not in str(self.settings.arch): + # INFO: https://github.com/ARM-software/ComputeLibrary#supported-architecturestechnologies + raise ConanInvalidConfiguration(f"{self.ref} does not support {self.settings.arch}. It is only supported on arm and x86.") + if "x86" in str(self.settings.arch) and self.settings.os != "Macos" and not self.options.get_safe("enable_opencl", False): + raise ConanInvalidConfiguration(f"{self.ref} can be built for x86_64 targets only with enable_neon=False and enable_opencl=True.") + if self.settings.os == "Linux" and self.settings.compiler == "clang": + # INFO: https://arm-software.github.io/ComputeLibrary/latest/how_to_build.xhtml#S1_2_linux + raise ConanInvalidConfiguration(f"{self.ref} does not support Linux with clang. It is only supported on Linux with gcc.") + if "armv8" not in str(self.settings.arch) and self.options.enable_multi_isa: + raise ConanInvalidConfiguration(f"{self.ref} does not support multi_isa option for {self.settings.arch}. It is only supported on armv8.") + if self.settings.arch == "armv8" and self.settings_build.arch == "x86_64" and self.settings.os == "Macos" and self.settings.compiler == "apple-clang": + raise ConanInvalidConfiguration(f"Mac Intel is not supported for armv8-a. Please, use Mac M1 as native build.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) + tc.generate() + tc = AutotoolsDeps(self) + tc.generate() + tc = VirtualBuildEnv(self) + tc.generate(scope="build") + + def build(self): + # INFO: Using scons to build the library we don't have control over shared/static and install step, it is done all together always + # INFO: https://arm-software.github.io/ComputeLibrary/latest/how_to_build.xhtml + yes_no = lambda v: "1" if v else "0" + debug = yes_no(self.settings.build_type == "Debug") + build_os = str(self.settings.os).lower() + arch = {"armv8": "armv8a", "x86": "x86_32", "armv7": "armv7a", "armv7hf": "armv7a-hf"}.get(str(self.settings.arch), str(self.settings.arch)) + neon = yes_no(self.options.get_safe("enable_neon")) + opencl = yes_no(self.options.get_safe("enable_opencl", False)) + openmp = yes_no(self.options.get_safe("enable_openmp")) + multi_isa = yes_no(self.options.enable_multi_isa) + build = "cross_compile" if cross_building(self) else "native" + with chdir(self, self.source_folder): + self.run(f"scons Werror=0 validation_tests=0 examples=0 gemm_tuner=0 multi_isa={multi_isa} openmp={openmp} debug={debug} neon={neon} opencl={opencl} os={build_os} arch={arch} build={build} build_dir={self.build_folder} install_dir={self.package_folder} -j{build_jobs(self)} toolchain_prefix=''", env="conanbuild") + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + # INFO: Artifacts are installed during build step, so we just need to remove what we don't want + rm(self, "*.bazel", self.package_folder, recursive=True) + rm(self, "*.cpp", self.package_folder, recursive=True) + if self.options.shared: + rm(self, "*.a", os.path.join(self.package_folder, "lib")) + else: + rm(self, "*.so*", os.path.join(self.package_folder, "lib")) + rm(self, "*.dylib*", os.path.join(self.package_folder, "lib")) + + def package_info(self): + suffix = "" if self.options.shared else "-static" + self.cpp_info.libs = [f"arm_compute{suffix}", f"arm_compute_core{suffix}", f"arm_compute_graph{suffix}"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m", "pthread"] diff --git a/recipes/compute_library/all/test_package/CMakeLists.txt b/recipes/compute_library/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..4c1184efde1e9 --- /dev/null +++ b/recipes/compute_library/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) + +find_package(compute_library REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE compute_library::compute_library) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/compute_library/all/test_package/conanfile.py b/recipes/compute_library/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/compute_library/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/compute_library/all/test_package/test_package.cpp b/recipes/compute_library/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..2457b9908b8ac --- /dev/null +++ b/recipes/compute_library/all/test_package/test_package.cpp @@ -0,0 +1,11 @@ +#include +#include +#include "arm_compute/core/Version.h" + + +int main(void) { + std::cout << "ComputeLibrary information:" << std::endl; + std::cout << arm_compute::build_information() << std::endl; + + return EXIT_SUCCESS; +} diff --git a/recipes/compute_library/config.yml b/recipes/compute_library/config.yml new file mode 100644 index 0000000000000..118236bce990b --- /dev/null +++ b/recipes/compute_library/config.yml @@ -0,0 +1,5 @@ +versions: + "23.08": + folder: all + "23.02.1": + folder: all diff --git a/recipes/cpp-channel/all/conandata.yml b/recipes/cpp-channel/all/conandata.yml index 8e45b89578701..ed231f8fb8014 100644 --- a/recipes/cpp-channel/all/conandata.yml +++ b/recipes/cpp-channel/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.8.3": + url: "https://github.com/andreiavrammsd/cpp-channel/archive/refs/tags/v0.8.3.tar.gz" + sha256: "49539a9e387797bd91d1713588f7c88beef98d69919bfb7b0712ed060527567a" "0.8.2": url: "https://github.com/andreiavrammsd/cpp-channel/archive/refs/tags/v0.8.2.tar.gz" sha256: "7666ec6ef275029593dc97bf35057761bc049298d71597a640da1e659c39a667" diff --git a/recipes/cpp-channel/config.yml b/recipes/cpp-channel/config.yml index bed1cdd9bb5b1..eda9ea75e51a5 100644 --- a/recipes/cpp-channel/config.yml +++ b/recipes/cpp-channel/config.yml @@ -1,3 +1,5 @@ versions: + "0.8.3": + folder: all "0.8.2": folder: all diff --git a/recipes/cpp-dump/all/conandata.yml b/recipes/cpp-dump/all/conandata.yml index e2ca2bfcf8c91..adaa64a423425 100644 --- a/recipes/cpp-dump/all/conandata.yml +++ b/recipes/cpp-dump/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.7.0": + url: "https://github.com/philip82148/cpp-dump/archive/refs/tags/v0.7.0.tar.gz" + sha256: "b27a0854a405aa10619f341f66e26a6c39dca1ad41a26dd4fa6d86ad6752c4f8" "0.6.0": url: "https://github.com/philip82148/cpp-dump/archive/refs/tags/v0.6.0.tar.gz" sha256: "22bc5fafa22ac7c1e99db8824fdabec4af6baabed0c8b7cc80a0205dfb550414" diff --git a/recipes/cpp-dump/all/conanfile.py b/recipes/cpp-dump/all/conanfile.py index b9f479f3b52af..36c04e6dd12c9 100644 --- a/recipes/cpp-dump/all/conanfile.py +++ b/recipes/cpp-dump/all/conanfile.py @@ -55,18 +55,32 @@ def source(self): def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - copy( - self, - pattern="dump.hpp", - dst=os.path.join(self.package_folder, "include"), - src=self.source_folder, - ) - copy( - self, - pattern="*.hpp", - dst=os.path.join(self.package_folder, "include", "hpp"), - src=os.path.join(self.source_folder, "hpp"), - ) + if Version(self.version) < "0.7.0": + copy( + self, + pattern="dump.hpp", + dst=os.path.join(self.package_folder, "include"), + src=self.source_folder, + ) + copy( + self, + pattern="*.hpp", + dst=os.path.join(self.package_folder, "include", "hpp"), + src=os.path.join(self.source_folder, "hpp"), + ) + else: + copy( + self, + pattern="*dump.hpp", + dst=os.path.join(self.package_folder, "include"), + src=self.source_folder, + ) + copy( + self, + pattern="*.hpp", + dst=os.path.join(self.package_folder, "include", "cpp-dump"), + src=os.path.join(self.source_folder, "cpp-dump"), + ) def package_info(self): self.cpp_info.bindirs = [] diff --git a/recipes/cpp-dump/config.yml b/recipes/cpp-dump/config.yml index 33d7618432d30..d61439bae1bc3 100644 --- a/recipes/cpp-dump/config.yml +++ b/recipes/cpp-dump/config.yml @@ -1,4 +1,6 @@ versions: + "0.7.0": + folder: all "0.6.0": folder: all "0.5.0": diff --git a/recipes/cpp-httplib/all/conandata.yml b/recipes/cpp-httplib/all/conandata.yml index 8ff6cdba110e7..d3693f4478c4c 100644 --- a/recipes/cpp-httplib/all/conandata.yml +++ b/recipes/cpp-httplib/all/conandata.yml @@ -1,34 +1,29 @@ sources: + "0.17.3": + url: "https://github.com/yhirose/cpp-httplib/archive/v0.17.3.tar.gz" + sha256: "95bd6dba4241656c59d6f0854d408d14c220f7c71e673319ee27d30aee741aaa" + "0.17.1": + url: "https://github.com/yhirose/cpp-httplib/archive/v0.17.1.tar.gz" + sha256: "044c5a233da242e981d9543dd136a5945e0549c5641a0373934db88bbd192f41" + "0.16.3": + url: "https://github.com/yhirose/cpp-httplib/archive/v0.16.3.tar.gz" + sha256: "c1742fc7179aaae2a67ad9bba0740b7e9ffaf4f5e62feef53101ecdef1478716" "0.16.0": url: "https://github.com/yhirose/cpp-httplib/archive/v0.16.0.tar.gz" sha256: "c125022eb85eaa12235518dc4638be93b62c3216d0f87b655af7b17b71b38851" "0.15.3": url: "https://github.com/yhirose/cpp-httplib/archive/v0.15.3.tar.gz" sha256: "2121bbf38871bb2aafb5f7f2b9b94705366170909f434428352187cb0216124e" - "0.15.2": - url: "https://github.com/yhirose/cpp-httplib/archive/v0.15.2.tar.gz" - sha256: "4afbcf4203249d2cbcb698e46e1f6fb61b479013a84844d6bb1c044e233cab6a" - "0.15.1": - url: "https://github.com/yhirose/cpp-httplib/archive/v0.15.1.tar.gz" - sha256: "8d6a4a40ee8fd3f553b7e895882e60e674bd910883fc1857587dbbabee3cdb91" "0.14.3": url: "https://github.com/yhirose/cpp-httplib/archive/v0.14.3.tar.gz" sha256: "dcf6486d9030937636d8a4f820ca9531808fd7edb283893dddbaa05f99357e63" - "0.14.2": - url: "https://github.com/yhirose/cpp-httplib/archive/v0.14.2.tar.gz" - sha256: "dbcf5590e8ed35c6745c2ad659a5ebec92f05187d1506eec24449d6db95e5084" + # keep 0.14.1 for enjincppsdk and microservice-essentials "0.14.1": url: "https://github.com/yhirose/cpp-httplib/archive/v0.14.1.tar.gz" sha256: "2d4fb5544da643e5d0a82585555d8b7502b4137eb321a4abbb075e21d2f00e96" - "0.14.0": - url: "https://github.com/yhirose/cpp-httplib/archive/v0.14.0.tar.gz" - sha256: "3a92248ef8cf2c32ad07f910b8e3052ff2427022b2adb871cf326fb620d2438e" "0.13.3": url: "https://github.com/yhirose/cpp-httplib/archive/v0.13.3.tar.gz" sha256: "2a4503f9f2015f6878baef54cd94b01849cc3ed19dfe95f2c9775655bea8b73f" - "0.13.1": - url: "https://github.com/yhirose/cpp-httplib/archive/v0.13.1.tar.gz" - sha256: "9b837d290b61e3f0c4239da0b23bbf14c382922e2bf2a9bac21c1e3feabe1ff9" "0.12.6": url: "https://github.com/yhirose/cpp-httplib/archive/v0.12.6.tar.gz" sha256: "24bc594a9efcc08a5a6f3928e848d046d411a88b07bcd6f7f3851227a1f0133e" diff --git a/recipes/cpp-httplib/all/conanfile.py b/recipes/cpp-httplib/all/conanfile.py index 7ecbe0a2931e5..4e28d01766a72 100644 --- a/recipes/cpp-httplib/all/conanfile.py +++ b/recipes/cpp-httplib/all/conanfile.py @@ -11,8 +11,8 @@ class CpphttplibConan(ConanFile): name = "cpp-httplib" description = "A C++11 single-file header-only cross platform HTTP/HTTPS library." license = "MIT" - homepage = "https://github.com/yhirose/cpp-httplib" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/yhirose/cpp-httplib" topics = ("http", "https", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" @@ -49,9 +49,6 @@ def layout(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - pass - def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "httplib.h", src=self.source_folder, dst=os.path.join(self.package_folder, "include", "httplib")) diff --git a/recipes/cpp-httplib/all/test_package/conanfile.py b/recipes/cpp-httplib/all/test_package/conanfile.py index d120a992c06a6..8a5bb47f50c4c 100644 --- a/recipes/cpp-httplib/all/test_package/conanfile.py +++ b/recipes/cpp-httplib/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/cpp-httplib/config.yml b/recipes/cpp-httplib/config.yml index d7f8c6163badb..992888a540248 100644 --- a/recipes/cpp-httplib/config.yml +++ b/recipes/cpp-httplib/config.yml @@ -1,24 +1,20 @@ versions: - "0.16.0": + "0.17.3": folder: all - "0.15.3": + "0.17.1": folder: all - "0.15.2": + "0.16.3": folder: all - "0.15.1": + "0.16.0": folder: all - "0.14.3": + "0.15.3": folder: all - "0.14.2": + "0.14.3": folder: all "0.14.1": folder: all - "0.14.0": - folder: all "0.13.3": folder: all - "0.13.1": - folder: all "0.12.6": folder: all "0.11.4": diff --git a/recipes/cpp-peglib/1.x.x/conandata.yml b/recipes/cpp-peglib/1.x.x/conandata.yml index 7aa81fd5b52ff..8c4317d3da7ef 100644 --- a/recipes/cpp-peglib/1.x.x/conandata.yml +++ b/recipes/cpp-peglib/1.x.x/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.9.0": + url: "https://github.com/yhirose/cpp-peglib/archive/v1.9.0.tar.gz" + sha256: "6f4f0956ea2f44fd1c5882f8adc5782451ba9d227c467d214196390ddedb024c" "1.8.8": url: "https://github.com/yhirose/cpp-peglib/archive/v1.8.8.tar.gz" sha256: "3019d8084a146562fe2fd4c71e3226ac6e3994e8cee21cab27b3cd5a86bcef34" diff --git a/recipes/cpp-peglib/config.yml b/recipes/cpp-peglib/config.yml index 81349971ce40f..a8b6a2fd0565c 100644 --- a/recipes/cpp-peglib/config.yml +++ b/recipes/cpp-peglib/config.yml @@ -1,4 +1,6 @@ versions: + "1.9.0": + folder: "1.x.x" "1.8.8": folder: "1.x.x" "1.8.7": diff --git a/recipes/cpp-yyjson/all/conandata.yml b/recipes/cpp-yyjson/all/conandata.yml index a6c03b5fc9f4d..acb24326f9a42 100644 --- a/recipes/cpp-yyjson/all/conandata.yml +++ b/recipes/cpp-yyjson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.6.0": + url: "https://github.com/yosh-matsuda/cpp-yyjson/archive/refs/tags/v0.6.0.tar.gz" + sha256: "e146e5e2de023a83ffafba52320506bd25512e6ae9d13ee7836110f659253914" "0.5.0": url: "https://github.com/yosh-matsuda/cpp-yyjson/archive/refs/tags/v0.5.0.tar.gz" sha256: "c1d44460c9ca3c21d5cfaea882ffaca83565c24984c5d17322e0b74a84ececfc" diff --git a/recipes/cpp-yyjson/all/conanfile.py b/recipes/cpp-yyjson/all/conanfile.py index b65b4445b46dd..1e453082ca159 100644 --- a/recipes/cpp-yyjson/all/conanfile.py +++ b/recipes/cpp-yyjson/all/conanfile.py @@ -38,7 +38,10 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("yyjson/0.9.0") + if Version(self.version) < "0.6.0": + self.requires("yyjson/0.9.0") + else: + self.requires("yyjson/0.10.0") self.requires("fmt/10.2.1") self.requires("nameof/0.10.4") diff --git a/recipes/cpp-yyjson/config.yml b/recipes/cpp-yyjson/config.yml index ca7b2c3985d5e..33d7618432d30 100644 --- a/recipes/cpp-yyjson/config.yml +++ b/recipes/cpp-yyjson/config.yml @@ -1,3 +1,5 @@ versions: + "0.6.0": + folder: all "0.5.0": folder: all diff --git a/recipes/cppcheck/all/conandata.yml b/recipes/cppcheck/all/conandata.yml index a93642627eb02..8d322ee34302a 100644 --- a/recipes/cppcheck/all/conandata.yml +++ b/recipes/cppcheck/all/conandata.yml @@ -1,16 +1,13 @@ sources: + "2.15.0": + url: "https://github.com/danmar/cppcheck/archive/2.15.0.tar.gz" + sha256: "98bcc40ac8062635b492fb096d7815376a176ae26749d6c708083f4637f7c0bb" "2.14.2": url: "https://github.com/danmar/cppcheck/archive/2.14.2.tar.gz" sha256: "9c3acea5f489336bd83a8ea33917a9a04a80c56d874bf270287e7de27acf2d00" - "2.14.1": - url: "https://github.com/danmar/cppcheck/archive/2.14.1.tar.gz" - sha256: "22d1403fbc3158f35b5216d7b0a50bbaf0c80bf6663933a71f65cc4fc307ff3d" "2.13.4": url: "https://github.com/danmar/cppcheck/archive/2.13.4.tar.gz" sha256: "d6ea064ebab76c6aa000795440479767d8d814dd29405918df4c1bbfcd6cb86c" - "2.13.3": - url: "https://github.com/danmar/cppcheck/archive/2.13.3.tar.gz" - sha256: "ac8c526d19496038c09bf4781bd804ab1f7aaadee4c3b699629830d24742dd81" "2.12.1": url: "https://github.com/danmar/cppcheck/archive/2.12.1.tar.gz" sha256: "2a3d4ba1179419612183ab3d6aed6d3b18be75e98cd6f138ea8e2020905dced2" diff --git a/recipes/cppcheck/config.yml b/recipes/cppcheck/config.yml index 23cb6f096c9de..494b8f5cd4792 100644 --- a/recipes/cppcheck/config.yml +++ b/recipes/cppcheck/config.yml @@ -1,12 +1,10 @@ versions: - "2.14.2": + "2.15.0": folder: all - "2.14.1": + "2.14.2": folder: all "2.13.4": folder: all - "2.13.3": - folder: all "2.12.1": folder: all "2.11.1": diff --git a/recipes/cpptrace/all/conandata.yml b/recipes/cpptrace/all/conandata.yml index 8d3de77ad0a97..626503503c52b 100644 --- a/recipes/cpptrace/all/conandata.yml +++ b/recipes/cpptrace/all/conandata.yml @@ -1,5 +1,9 @@ sources: # Newer versions at the top + "0.7.0": + url: + - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.7.0.tar.gz" + sha256: "b5c1fbd162f32b8995d9b1fefb1b57fac8b1a0e790f897b81cdafe3625d12001" "0.6.3": url: - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.6.3.tar.gz" diff --git a/recipes/cpptrace/all/conanfile.py b/recipes/cpptrace/all/conanfile.py index fe0556f21f1b2..6fcf6290cb18d 100644 --- a/recipes/cpptrace/all/conanfile.py +++ b/recipes/cpptrace/all/conanfile.py @@ -76,6 +76,7 @@ def generate(self): tc.variables["CPPTRACE_USE_SYSTEM_LIBDWARF"] = True if self.options.unwind == "libunwind": tc.variables["CPPTRACE_UNWIND_WITH_LIBUNWIND"] = True + tc.cache_variables["CPPTRACE_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True) tc.generate() tc = CMakeDeps(self) tc.generate() diff --git a/recipes/cpptrace/config.yml b/recipes/cpptrace/config.yml index e38d73d503e6f..f2ab2fae68218 100644 --- a/recipes/cpptrace/config.yml +++ b/recipes/cpptrace/config.yml @@ -1,5 +1,7 @@ versions: # Newer versions at the top + "0.7.0": + folder: all "0.6.3": folder: all "0.6.2": diff --git a/recipes/croncpp/all/conandata.yml b/recipes/croncpp/all/conandata.yml index 7f25de8a50772..30cf4b9d03ad4 100644 --- a/recipes/croncpp/all/conandata.yml +++ b/recipes/croncpp/all/conandata.yml @@ -1,4 +1,4 @@ sources: - "cci.20220503": - url: "https://github.com/mariusbancila/croncpp/archive/5c28f410db1af9507ef8469c9796a7070e5e8e2e.tar.gz" - sha256: "cabc480c78ebf12b11bd9fcd705a7ecb1c85ac88a8c9debe8de67f30abd808a8" + "2023.03.30": + url: "https://github.com/mariusbancila/croncpp/archive/refs/tags/v2023.03.30.tar.gz" + sha256: "0731b7f900a670c009585eb5e9639722aeff6531dbbd5bfc9ce895459733837e" diff --git a/recipes/croncpp/all/conanfile.py b/recipes/croncpp/all/conanfile.py index ffab100ea6a29..7c51f39f65111 100644 --- a/recipes/croncpp/all/conanfile.py +++ b/recipes/croncpp/all/conanfile.py @@ -1,9 +1,8 @@ -import os - from conan import ConanFile from conan.tools.build import check_min_cppstd -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, rmdir +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +import os required_conan_version = ">=1.52.0" @@ -25,7 +24,7 @@ def _min_cppstd(self): return 11 def layout(self): - cmake_layout(self, src_folder="src") + basic_layout(self, src_folder="src") def package_id(self): self.info.clear() @@ -37,21 +36,18 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def generate(self): - tc = CMakeToolchain(self) - tc.generate() - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - def package(self): - copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - cmake = CMake(self) - cmake.install() - rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.h", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] + + self.cpp_info.set_property("cmake_file_name", "croncpp") + self.cpp_info.set_property("cmake_target_name","croncpp::croncpp") diff --git a/recipes/croncpp/config.yml b/recipes/croncpp/config.yml index 162ec03638ac6..858a21517c5cd 100644 --- a/recipes/croncpp/config.yml +++ b/recipes/croncpp/config.yml @@ -1,3 +1,3 @@ versions: - "cci.20220503": + "2023.03.30": folder: "all" diff --git a/recipes/cutlass/all/conandata.yml b/recipes/cutlass/all/conandata.yml new file mode 100644 index 0000000000000..f561ee26f3a67 --- /dev/null +++ b/recipes/cutlass/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "3.5.0": + url: "https://github.com/NVIDIA/cutlass/archive/refs/tags/v3.5.0.tar.gz" + sha256: "ef6af8526e3ad04f9827f35ee57eec555d09447f70a0ad0cf684a2e426ccbcb6" diff --git a/recipes/cutlass/all/conanfile.py b/recipes/cutlass/all/conanfile.py new file mode 100644 index 0000000000000..9422f11539b20 --- /dev/null +++ b/recipes/cutlass/all/conanfile.py @@ -0,0 +1,105 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rmdir, replace_in_file +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + + +class CutlassConan(ConanFile): + name = "cutlass" + description = "CUTLASS: CUDA Templates for Linear Algebra Subroutines" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/project/package" + topics = ("linear-algebra", "gpu", "cuda", "deep-learning", "nvidia", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + # TODO: add header_only=False option + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "7", + "apple-clang": "7", + "msvc": "192", + "Visual Studio": "16", + } + + def layout(self): + cmake_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def build_requirements(self): + self.tool_requires("cmake/[>=3.19 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + # Install via CMake to ensure headers are configured correctly + tc = CMakeToolchain(self) + tc.cache_variables["CMAKE_SUPPRESS_REGENERATION"] = True + tc.cache_variables["CUTLASS_REVISION"]=f"v{self.version}" + tc.cache_variables["CUTLASS_NATIVE_CUDA"] = False + tc.cache_variables["CUTLASS_ENABLE_HEADERS_ONLY"] = True + tc.cache_variables["CUTLASS_ENABLE_TOOLS"] = False + tc.cache_variables["CUTLASS_ENABLE_LIBRARY"] = False + tc.cache_variables["CUTLASS_ENABLE_PROFILER"] = False + tc.cache_variables["CUTLASS_ENABLE_PERFORMANCE"] = False + tc.cache_variables["CUTLASS_ENABLE_TESTS"] = False + tc.cache_variables["CUTLASS_ENABLE_GTEST_UNIT_TESTS"] = False + tc.cache_variables["CUTLASS_ENABLE_CUBLAS"] = False + tc.cache_variables["CUTLASS_ENABLE_CUDNN"] = False + tc.generate() + VirtualBuildEnv(self).generate() + + def _patch_sources(self): + # Don't look for CUDA, we're only installing the headers + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "include(${CMAKE_CURRENT_SOURCE_DIR}/CUDA.cmake)", + """ + if(NOT CUTLASS_ENABLE_HEADERS_ONLY) + include(${CMAKE_CURRENT_SOURCE_DIR}/CUDA.cmake) + endif()""") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "test")) + + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "NvidiaCutlass") + self.cpp_info.set_property("cmake_target_name", "nvidia::cutlass::cutlass") + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/cutlass/all/test_package/CMakeLists.txt b/recipes/cutlass/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..a4872b3ed37c7 --- /dev/null +++ b/recipes/cutlass/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(NvidiaCutlass REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE nvidia::cutlass::cutlass) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/cutlass/all/test_package/conanfile.py b/recipes/cutlass/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/cutlass/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/cutlass/all/test_package/test_package.cpp b/recipes/cutlass/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..9e74847cbedd3 --- /dev/null +++ b/recipes/cutlass/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include + +#include + +int main() { + std::cout << "CUTLASS version: " << + cutlass::getVersionMajor() << "." << + cutlass::getVersionMinor() << "." << + cutlass::getVersionPatch() << std::endl; +} diff --git a/recipes/cutlass/config.yml b/recipes/cutlass/config.yml new file mode 100644 index 0000000000000..4ab92d6cac50e --- /dev/null +++ b/recipes/cutlass/config.yml @@ -0,0 +1,3 @@ +versions: + "3.5.0": + folder: all diff --git a/recipes/dataframe/all/conandata.yml b/recipes/dataframe/all/conandata.yml index 8c70c0dff65c4..76e42aa109c01 100644 --- a/recipes/dataframe/all/conandata.yml +++ b/recipes/dataframe/all/conandata.yml @@ -1,7 +1,7 @@ sources: "3.2.0": url: "https://github.com/hosseinmoein/DataFrame/archive/refs/tags/3.2.0.tar.gz" - sha256: "ca0c27cddf7a77da008d4b85e620e65baf5fcdf107f5e523ec38e7c55d778f7e" + sha256: "44c513ef7956976738c2ca37384a220c5383e95fc363ad933541c6f3eef9d294" "3.1.0": url: "https://github.com/hosseinmoein/DataFrame/archive/refs/tags/3.1.0.tar.gz" sha256: "09280a81f17d87d171062210c904c1acd94b1cdcf4c040eaa16cc9d224d526d4" diff --git a/recipes/date/all/conanfile.py b/recipes/date/all/conanfile.py index 315ca73f8ae1f..50c70b315563a 100644 --- a/recipes/date/all/conanfile.py +++ b/recipes/date/all/conanfile.py @@ -91,20 +91,13 @@ def build(self): def package(self): copy(self, "LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - if self.options.header_only: - src = os.path.join(self.source_folder, "include", "date") - dst = os.path.join(self.package_folder, "include", "date") - copy(self, "date.h", dst=dst, src=src) - copy(self, "tz.h", dst=dst, src=src) - copy(self, "ptz.h", dst=dst, src=src) - copy(self, "iso_week.h", dst=dst, src=src) - copy(self, "julian.h", dst=dst, src=src) - copy(self, "islamic.h", dst=dst, src=src) - else: + if not self.options.header_only: cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) rmdir(self, os.path.join(self.package_folder, "CMake")) + copy(self, "*.h", dst=os.path.join(self.package_folder, "include", "date"), + src=os.path.join(self.source_folder, "include", "date")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "date") @@ -120,18 +113,13 @@ def package_info(self): lib_name = "{}tz".format("date-" if Version(self.version) >= "3.0.0" else "") self.cpp_info.components["date-tz"].libs = [lib_name] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["date-tz"].system_libs.append("pthread") - self.cpp_info.components["date-tz"].system_libs.append("m") + self.cpp_info.components["date-tz"].system_libs.extend(["m", "pthread"]) if not self.options.use_system_tz_db: self.cpp_info.components["date-tz"].requires.append("libcurl::libcurl") - if self.options.use_system_tz_db and not self.settings.os == "Windows": - use_os_tzdb = 1 - else: - use_os_tzdb = 0 - - defines = ["USE_OS_TZDB={}".format(use_os_tzdb)] + use_os_tzdb = 1 if self.options.use_system_tz_db and not self.settings.os == "Windows" else 0 + defines = [f"USE_OS_TZDB={use_os_tzdb}"] if self.settings.os == "Windows" and self.options.shared: defines.append("DATE_USE_DLL=1") diff --git a/recipes/daw_header_libraries/all/conandata.yml b/recipes/daw_header_libraries/all/conandata.yml index 7a91f0409f234..d625fa7c5a1cb 100644 --- a/recipes/daw_header_libraries/all/conandata.yml +++ b/recipes/daw_header_libraries/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "2.110.0": + url: "https://github.com/beached/header_libraries/archive/v2.110.0.tar.gz" + sha256: "6515bb7a130656adff9f1f17d6be69dbd7c40dbcebbe418e9d0cf15bbc71bffc" + "2.107.0": + url: "https://github.com/beached/header_libraries/archive/v2.107.0.tar.gz" + sha256: "b84f7666d004da466d0035e9f475797395e90b6e8f23e000816b45aa13d4fc35" + "2.106.2": + url: "https://github.com/beached/header_libraries/archive/v2.106.2.tar.gz" + sha256: "33609d83aec5a6081efebf871627b7a8bddc2b7f0eb8d4ac14756d403d29d089" "2.106.1": url: "https://github.com/beached/header_libraries/archive/v2.106.1.tar.gz" sha256: "393815fbf249ca1220a216899cae3d2672ca193f9db228a0b99925a9b0f90854" diff --git a/recipes/daw_header_libraries/all/test_package/CMakeLists.txt b/recipes/daw_header_libraries/all/test_package/CMakeLists.txt index 817fb2a992dc4..2474980662644 100644 --- a/recipes/daw_header_libraries/all/test_package/CMakeLists.txt +++ b/recipes/daw_header_libraries/all/test_package/CMakeLists.txt @@ -4,6 +4,10 @@ project(test_package LANGUAGES CXX) find_package(daw-header-libraries REQUIRED CONFIG) -add_executable(${PROJECT_NAME} test_package.cpp) +if(daw-header-libraries_VERSION VERSION_LESS "2.109.0") + add_executable(${PROJECT_NAME} test_package_old.cpp) +else() + add_executable(${PROJECT_NAME} test_package.cpp) +endif() target_link_libraries(${PROJECT_NAME} PRIVATE daw::daw-header-libraries) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/daw_header_libraries/all/test_package/test_package.cpp b/recipes/daw_header_libraries/all/test_package/test_package.cpp index 7b47a51d28ef5..63fa16b601f2d 100644 --- a/recipes/daw_header_libraries/all/test_package/test_package.cpp +++ b/recipes/daw_header_libraries/all/test_package/test_package.cpp @@ -1,7 +1,7 @@ -#include "daw/daw_carray.h" +#include "daw/daw_bounded_array.h" int main() { - daw::carray t = { 1, 2, 3, 4, 5, 6 }; + daw::array t = { 1, 2, 3, 4, 5, 6 }; auto val = t[3]; diff --git a/recipes/daw_header_libraries/all/test_package/test_package_old.cpp b/recipes/daw_header_libraries/all/test_package/test_package_old.cpp new file mode 100644 index 0000000000000..7b47a51d28ef5 --- /dev/null +++ b/recipes/daw_header_libraries/all/test_package/test_package_old.cpp @@ -0,0 +1,9 @@ +#include "daw/daw_carray.h" + +int main() { + daw::carray t = { 1, 2, 3, 4, 5, 6 }; + + auto val = t[3]; + + return 0; +} diff --git a/recipes/daw_header_libraries/config.yml b/recipes/daw_header_libraries/config.yml index 2d8e64c1e7c3e..5a75a14b1e758 100644 --- a/recipes/daw_header_libraries/config.yml +++ b/recipes/daw_header_libraries/config.yml @@ -1,4 +1,10 @@ versions: + "2.110.0": + folder: all + "2.107.0": + folder: all + "2.106.2": + folder: all "2.106.1": folder: all "2.106.0": diff --git a/recipes/dice-template-library/all/conandata.yml b/recipes/dice-template-library/all/conandata.yml index e5d11350e20d2..580b85f394958 100644 --- a/recipes/dice-template-library/all/conandata.yml +++ b/recipes/dice-template-library/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.9.0": + url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v1.9.0.tar.gz" + sha256: "ca82a61bd445e0eaf69e68fc4a96d037c8b2ea36ff7762042dbb6f47a89f99e9" + "1.8.0": + url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v1.8.0.tar.gz" + sha256: "cb20717cb596b156b098146d043caa158618e055b8edbeb4d3245cd11e1c8276" "1.6.0": url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v1.6.0.tar.gz" sha256: "4eb176930beb05dba183d4a48fd9e9716676fe92f0a98a8f527cb8791b0d64fd" diff --git a/recipes/dice-template-library/config.yml b/recipes/dice-template-library/config.yml index 84543460d120f..37901e90b8f3b 100644 --- a/recipes/dice-template-library/config.yml +++ b/recipes/dice-template-library/config.yml @@ -1,4 +1,8 @@ versions: + "1.9.0": + folder: all + "1.8.0": + folder: all "1.6.0": folder: all "1.5.0": diff --git a/recipes/directx-headers/all/conandata.yml b/recipes/directx-headers/all/conandata.yml index 6289c24e10856..ad2d7265cac43 100644 --- a/recipes/directx-headers/all/conandata.yml +++ b/recipes/directx-headers/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.614.0": + url: "https://github.com/microsoft/DirectX-Headers/archive/refs/tags/v1.614.0.tar.gz" + sha256: "1cd54449799501a4ad129a4c7ccf0c026bbb699f937ba299d92de3aacd29c5be" "1.610.2": url: "https://github.com/microsoft/DirectX-Headers/archive/refs/tags/v1.610.2.tar.gz" sha256: "59492497e99bd3c23f8f8aa8a709f4d7b5bc5bd5057efa8c568bbad40015a8b2" diff --git a/recipes/directx-headers/config.yml b/recipes/directx-headers/config.yml index 15678ab870488..5129440c45004 100644 --- a/recipes/directx-headers/config.yml +++ b/recipes/directx-headers/config.yml @@ -1,3 +1,5 @@ versions: + "1.614.0": + folder: all "1.610.2": folder: all diff --git a/recipes/drogon/all/conandata.yml b/recipes/drogon/all/conandata.yml index 1918973ce4360..bca73571212af 100644 --- a/recipes/drogon/all/conandata.yml +++ b/recipes/drogon/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.9.6": + url: "https://github.com/drogonframework/drogon/archive/v1.9.6.tar.gz" + sha256: "a81d0ea0e87b0214aa56f7fa7bb851011efe606af67891a0945825104505a08a" "1.9.5": url: "https://github.com/drogonframework/drogon/archive/v1.9.5.tar.gz" sha256: "ec17882835abeb0672db29cb36ab0c5523f144d5d8ff177861b8f5865803eaae" @@ -20,16 +23,14 @@ sources: "1.8.7": url: "https://github.com/drogonframework/drogon/archive/v1.8.7.tar.gz" sha256: "d2d80d35becd69bf80d74bf09b69425193f1b7be3926bd44f3ac7b951e54465d" - "1.8.6": - url: "https://github.com/drogonframework/drogon/archive/v1.8.6.tar.gz" - sha256: "ff02979f28047e97e19e36d1f363b3052b8122975fa8a379305d746dfe5fb004" - "1.8.5": - url: "https://github.com/drogonframework/drogon/archive/v1.8.5.tar.gz" - sha256: "9469f99408c114bc1e89945a3a8dab4640ea6d8cb06e7d42f06c1dfda3f71d2a" - "1.8.4": - url: "https://github.com/drogonframework/drogon/archive/v1.8.4.tar.gz" - sha256: "6f2f59ead0f0c37b0aac4bc889cbaedf3c2540f3020e892596c72f0a4d887a18" patches: + "1.9.6": + - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" + patch_description: "remove shared libs option" + patch_type: "conan" + - patch_file: "patches/1.9.6-0002-find-cci-packages.patch" + patch_description: "Fix jsoncpp cmake target name" + patch_type: "conan" "1.9.5": - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" patch_description: "remove shared libs option" @@ -79,34 +80,3 @@ patches: - patch_file: "patches/1.8.6-0002-find-cci-packages.patch" patch_description: "Fix jsoncpp cmake target name" patch_type: "conan" - "1.8.6": - - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" - patch_description: "remove shared libs option" - patch_type: "conan" - - patch_file: "patches/1.8.6-0002-find-cci-packages.patch" - patch_description: "Fix jsoncpp cmake target name" - patch_type: "conan" - "1.8.5": - - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" - patch_description: "remove shared libs option" - patch_type: "conan" - - patch_file: "patches/1.8.5-0002-find-cci-packages.patch" - patch_description: "Fix jsoncpp cmake target name" - patch_type: "conan" - "1.8.4": - - patch_file: "patches/1.8.4-0001-remove-shared-libs.patch" - patch_description: "remove shared libs option" - patch_type: "conan" - - patch_file: "patches/1.8.4-0002-find-package-jsoncpp.patch" - patch_description: "Fix jsoncpp cmake target name" - patch_type: "conan" - - patch_file: "patches/1.8.4-0003-find-package-sqlite.patch" - patch_description: "Fix sqlite cmake target name" - patch_type: "conan" - - patch_file: "patches/1.8.4-0004-find-package-yaml-cpp.patch" - patch_description: "Fix yaml-cpp cmake target name" - patch_type: "conan" - - patch_file: "patches/1.8.2-0004-support-gcc13.patch" - patch_description: "Fix compilation error on gcc13 with C++17" - patch_type: "portability" - patch_source: "https://github.com/drogonframework/drogon/pull/1563/" diff --git a/recipes/drogon/all/patches/1.8.2-0004-support-gcc13.patch b/recipes/drogon/all/patches/1.8.2-0004-support-gcc13.patch deleted file mode 100644 index 477d23fb1fd63..0000000000000 --- a/recipes/drogon/all/patches/1.8.2-0004-support-gcc13.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/lib/inc/drogon/RateLimiter.h b/lib/inc/drogon/RateLimiter.h -index 3b8706b..dece795 100644 ---- a/lib/inc/drogon/RateLimiter.h -+++ b/lib/inc/drogon/RateLimiter.h -@@ -3,6 +3,7 @@ - #include - #include - #include -+#include - - namespace drogon - { diff --git a/recipes/drogon/all/patches/1.8.4-0001-remove-shared-libs.patch b/recipes/drogon/all/patches/1.8.4-0001-remove-shared-libs.patch deleted file mode 100644 index f51304849a04f..0000000000000 --- a/recipes/drogon/all/patches/1.8.4-0001-remove-shared-libs.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4406362..c346e60 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -16,7 +16,6 @@ option(BUILD_CTL "Build drogon_ctl" ${BUILD_PROGRAMS}) - option(BUILD_EXAMPLES "Build examples" ${BUILD_PROGRAMS}) - option(BUILD_ORM "Build orm" ON) - option(COZ_PROFILING "Use coz for profiling" OFF) --option(BUILD_SHARED_LIBS "Build drogon as a shared lib" OFF) - option(BUILD_DOC "Build Doxygen documentation" OFF) - option(BUILD_BROTLI "Build Brotli" ON) - option(BUILD_YAML_CONFIG "Build yaml config" ON) diff --git a/recipes/drogon/all/patches/1.8.4-0002-find-package-jsoncpp.patch b/recipes/drogon/all/patches/1.8.4-0002-find-package-jsoncpp.patch deleted file mode 100644 index 362fa96c66cc6..0000000000000 --- a/recipes/drogon/all/patches/1.8.4-0002-find-package-jsoncpp.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c346e60..e561e5c 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -206,9 +206,9 @@ else() - endif() - - # jsoncpp --find_package(Jsoncpp REQUIRED) --target_link_libraries(${PROJECT_NAME} PUBLIC Jsoncpp_lib) --list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${JSONCPP_INCLUDE_DIRS}) -+find_package(jsoncpp REQUIRED) -+target_link_libraries(${PROJECT_NAME} PUBLIC jsoncpp_lib) -+list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${jsoncpp_INCLUDE_DIRS}) - - # yamlcpp - if(BUILD_YAML_CONFIG) diff --git a/recipes/drogon/all/patches/1.8.4-0003-find-package-sqlite.patch b/recipes/drogon/all/patches/1.8.4-0003-find-package-sqlite.patch deleted file mode 100644 index 6f97d35a4d314..0000000000000 --- a/recipes/drogon/all/patches/1.8.4-0003-find-package-sqlite.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e561e5c..993b21a 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -437,7 +437,7 @@ if (BUILD_SQLITE) - find_package(SQLite3 QUIET) - find_package(unofficial-sqlite3 QUIET) - if (SQLite3_FOUND) -- target_link_libraries(${PROJECT_NAME} PRIVATE SQLite3_lib) -+ target_link_libraries(${PROJECT_NAME} PRIVATE SQLite::SQLite3) - set(DROGON_FOUND_SQLite3 TRUE) - elseif (unofficial-sqlite3_FOUND) - target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::sqlite3::sqlite3) diff --git a/recipes/drogon/all/patches/1.8.4-0004-find-package-yaml-cpp.patch b/recipes/drogon/all/patches/1.8.4-0004-find-package-yaml-cpp.patch deleted file mode 100644 index a9fca7863aea7..0000000000000 --- a/recipes/drogon/all/patches/1.8.4-0004-find-package-yaml-cpp.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 44063629..c18c86db 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -215,7 +215,7 @@ if(BUILD_YAML_CONFIG) - find_package(yaml-cpp QUIET) - if(yaml-cpp_FOUND) - message(STATUS "yaml-cpp found") -- target_link_libraries(${PROJECT_NAME} PUBLIC ${YAML_CPP_LIBRARIES}) -+ target_link_libraries(${PROJECT_NAME} PUBLIC yaml-cpp) - target_compile_definitions(${PROJECT_NAME} PUBLIC HAS_YAML_CPP) - else() - message(STATUS "yaml-cpp not used") diff --git a/recipes/drogon/all/patches/1.8.5-0002-find-cci-packages.patch b/recipes/drogon/all/patches/1.9.6-0002-find-cci-packages.patch similarity index 89% rename from recipes/drogon/all/patches/1.8.5-0002-find-cci-packages.patch rename to recipes/drogon/all/patches/1.9.6-0002-find-cci-packages.patch index 8bf9e60842f93..1e82fc39d8876 100644 --- a/recipes/drogon/all/patches/1.8.5-0002-find-cci-packages.patch +++ b/recipes/drogon/all/patches/1.9.6-0002-find-cci-packages.patch @@ -1,9 +1,9 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index e3e7fcf..d1032da 100755 +index 11c96b2..441b2c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -198,9 +198,9 @@ else() - endif() +@@ -180,9 +180,9 @@ endif() + # jsoncpp -find_package(Jsoncpp REQUIRED) @@ -15,7 +15,7 @@ index e3e7fcf..d1032da 100755 # yamlcpp if(BUILD_YAML_CONFIG) -@@ -212,7 +212,7 @@ if(BUILD_YAML_CONFIG) +@@ -194,7 +194,7 @@ if(BUILD_YAML_CONFIG) message(STATUS "yaml-cpp not used") else() message(STATUS "yaml-cpp found ") @@ -24,7 +24,7 @@ index e3e7fcf..d1032da 100755 target_compile_definitions(${PROJECT_NAME} PUBLIC HAS_YAML_CPP) endif() else() -@@ -442,7 +442,7 @@ if (BUILD_SQLITE) +@@ -432,7 +432,7 @@ if (BUILD_SQLITE) find_package(SQLite3 QUIET) find_package(unofficial-sqlite3 QUIET) if (SQLite3_FOUND) @@ -33,7 +33,7 @@ index e3e7fcf..d1032da 100755 set(DROGON_FOUND_SQLite3 TRUE) elseif (unofficial-sqlite3_FOUND) target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::sqlite3::sqlite3) -@@ -465,10 +465,10 @@ if (BUILD_SQLITE) +@@ -455,10 +455,10 @@ if (BUILD_SQLITE) endif (BUILD_SQLITE) if (BUILD_REDIS) @@ -47,7 +47,7 @@ index e3e7fcf..d1032da 100755 set(DROGON_SOURCES ${DROGON_SOURCES} nosql_lib/redis/src/RedisClientImpl.cc -@@ -488,10 +488,10 @@ if (BUILD_REDIS) +@@ -478,10 +478,10 @@ if (BUILD_REDIS) nosql_lib/redis/src/SubscribeContext.h nosql_lib/redis/src/RedisSubscriberImpl.h) @@ -60,7 +60,7 @@ index e3e7fcf..d1032da 100755 set(DROGON_SOURCES ${DROGON_SOURCES} lib/src/RedisClientSkipped.cc -@@ -500,7 +500,7 @@ if (NOT Hiredis_FOUND) +@@ -490,7 +490,7 @@ if (NOT Hiredis_FOUND) set(private_headers ${private_headers} lib/src/RedisClientManager.h) diff --git a/recipes/drogon/config.yml b/recipes/drogon/config.yml index ad963339f39e6..4fe7e87fc8cfb 100644 --- a/recipes/drogon/config.yml +++ b/recipes/drogon/config.yml @@ -1,4 +1,6 @@ versions: + "1.9.6": + folder: "all" "1.9.5": folder: "all" "1.9.4": @@ -13,9 +15,3 @@ versions: folder: "all" "1.8.7": folder: "all" - "1.8.6": - folder: "all" - "1.8.5": - folder: "all" - "1.8.4": - folder: "all" diff --git a/recipes/entt/3.x.x/conandata.yml b/recipes/entt/3.x.x/conandata.yml index 47adab23698d5..a45ca1a3e9ade 100644 --- a/recipes/entt/3.x.x/conandata.yml +++ b/recipes/entt/3.x.x/conandata.yml @@ -1,7 +1,7 @@ sources: - "3.13.0": - url: "https://github.com/skypjack/entt/archive/refs/tags/v3.13.0.tar.gz" - sha256: "dc0ab3ee136a1fe7f92df8898ff215dff1fe4d05d81b60144c7c0468446540a9" + "3.13.2": + url: "https://github.com/skypjack/entt/archive/refs/tags/v3.13.2.tar.gz" + sha256: "cb556aa543d01177b62de41321759e02d96078948dda72705b3d7fe68af88489" "3.12.2": url: "https://github.com/skypjack/entt/archive/refs/tags/v3.12.2.tar.gz" sha256: "3F3E43988218DAECC0530CCAF45E960F7F7416E1FCF2C69799160C18B6A2FEE3" diff --git a/recipes/entt/config.yml b/recipes/entt/config.yml index 10a22d0efa93f..c49da489cfd20 100644 --- a/recipes/entt/config.yml +++ b/recipes/entt/config.yml @@ -1,5 +1,5 @@ versions: - "3.13.0": + "3.13.2": folder: 3.x.x "3.12.2": folder: 3.x.x diff --git a/recipes/etl/all/conandata.yml b/recipes/etl/all/conandata.yml index d43f353b12095..ad1ca82dd2b02 100644 --- a/recipes/etl/all/conandata.yml +++ b/recipes/etl/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "20.39.4": + url: "https://github.com/ETLCPP/etl/archive/20.39.4.tar.gz" + sha256: "ce1222ed12fb39ae7a6160f8c33da61534d6b4c4d0d36be622910bbd545f5ee7" + "20.39.3": + url: "https://github.com/ETLCPP/etl/archive/20.39.3.tar.gz" + sha256: "1d596bc47d17959ced8b4586e0ae22348c903df6ab00f47ef900d854ef5e30c8" "20.38.17": url: "https://github.com/ETLCPP/etl/archive/20.38.17.tar.gz" sha256: "5b490aca3faad3796a48bf0980e74f2a67953967fad3c051a6d4981051cb0b9a" @@ -20,24 +26,3 @@ sources: "20.38.10": url: "https://github.com/ETLCPP/etl/archive/20.38.10.tar.gz" sha256: "562f9b5d9e6786350b09d87be9c5f030073e34d7bf0a975de3e91476ddd471a3" - "20.38.7": - url: "https://github.com/ETLCPP/etl/archive/20.38.7.tar.gz" - sha256: "65cfc033bacab452af05a36bd53b8cdc2bdfd1492b2adc5bb51d2f00e451491f" - "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" - "20.38.3": - url: "https://github.com/ETLCPP/etl/archive/20.38.3.tar.gz" - sha256: "7d2f384dfa9a50c8e066b716524016d2b62e753b0b75fed09a2b7e2c260759d2" - "20.38.0": - url: "https://github.com/ETLCPP/etl/archive/20.38.0.tar.gz" - sha256: "7e29ce81a2a2d5826286502a2ad5bde1f4b591d2c9e0ef7ccc335e75445223cd" - "20.37.3": - url: "https://github.com/ETLCPP/etl/archive/20.37.3.tar.gz" - sha256: "fbdf60c770772cd96d1eb25bdf56e4f45f23bf4029e18ef1f2af1f2056b9ea41" - "20.36.0": - url: "https://github.com/ETLCPP/etl/archive/20.36.0.tar.gz" - sha256: "bcab607d619008c7e3942ecc9cb429e17deb553c81bc5f1fd013fbc1e17f1344" diff --git a/recipes/etl/config.yml b/recipes/etl/config.yml index e0622751730c6..084ac6d8aaecd 100644 --- a/recipes/etl/config.yml +++ b/recipes/etl/config.yml @@ -1,4 +1,8 @@ versions: + "20.39.4": + folder: all + "20.39.3": + folder: all "20.38.17": folder: all "20.38.16": @@ -13,17 +17,3 @@ versions: folder: all "20.38.10": folder: all - "20.38.7": - folder: all - "20.38.6": - folder: all - "20.38.4": - folder: all - "20.38.3": - folder: all - "20.38.0": - folder: all - "20.37.3": - folder: all - "20.36.0": - folder: all diff --git a/recipes/expat/all/conandata.yml b/recipes/expat/all/conandata.yml index f010a588a6317..70a835971e10a 100644 --- a/recipes/expat/all/conandata.yml +++ b/recipes/expat/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.6.3": + url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_3/expat-2.6.3.tar.xz" + sha256: "274db254a6979bde5aad404763a704956940e465843f2a9bd9ed7af22e2c0efc" "2.6.2": url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_2/expat-2.6.2.tar.xz" sha256: "ee14b4c5d8908b1bec37ad937607eab183d4d9806a08adee472c3c3121d27364" diff --git a/recipes/expat/config.yml b/recipes/expat/config.yml index ee86cf4cc73ee..14651d18d6467 100644 --- a/recipes/expat/config.yml +++ b/recipes/expat/config.yml @@ -1,4 +1,6 @@ versions: + "2.6.3": + folder: all "2.6.2": folder: all "2.6.0": diff --git a/recipes/faker-cxx/all/conandata.yml b/recipes/faker-cxx/all/conandata.yml index 7125cc87621a1..33704b20363da 100644 --- a/recipes/faker-cxx/all/conandata.yml +++ b/recipes/faker-cxx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.0.0": + url: "https://github.com/cieslarmichal/faker-cxx/archive/refs/tags/v3.0.0.tar.gz" + sha256: "63d6846376593e05da690136cabe8e7bf42ddcdd4edad3ae9b48696f86d80468" "2.0.0": url: "https://github.com/cieslarmichal/faker-cxx/archive/refs/tags/v2.0.0.tar.gz" sha256: "8a7f5441f4453af868444675878a2d9a74918c1595caa65d537d3ea327e46a49" diff --git a/recipes/faker-cxx/all/test_package/CMakeLists.txt b/recipes/faker-cxx/all/test_package/CMakeLists.txt index 23e8286ff283c..2485457ffc81e 100644 --- a/recipes/faker-cxx/all/test_package/CMakeLists.txt +++ b/recipes/faker-cxx/all/test_package/CMakeLists.txt @@ -6,3 +6,6 @@ find_package(faker-cxx REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE faker-cxx::faker-cxx) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) +if(faker-cxx_VERSION VERSION_LESS "3.0.0") + target_compile_definitions(${PROJECT_NAME} PRIVATE FAKER_CXX_2) +endif() diff --git a/recipes/faker-cxx/all/test_package/test_package.cpp b/recipes/faker-cxx/all/test_package/test_package.cpp index ed71cb953c909..7251d095e5300 100644 --- a/recipes/faker-cxx/all/test_package/test_package.cpp +++ b/recipes/faker-cxx/all/test_package/test_package.cpp @@ -1,7 +1,13 @@ #include -#include "faker-cxx/Internet.h" -#include "faker-cxx/String.h" -#include "faker-cxx/Date.h" +#ifdef FAKER_CXX_2 + #include "faker-cxx/Internet.h" + #include "faker-cxx/String.h" + #include "faker-cxx/Date.h" +#else + #include "faker-cxx/internet.h" + #include "faker-cxx/string.h" + #include "faker-cxx/date.h" +#endif int main() { diff --git a/recipes/faker-cxx/config.yml b/recipes/faker-cxx/config.yml index d77ad03cbf510..70df618778342 100644 --- a/recipes/faker-cxx/config.yml +++ b/recipes/faker-cxx/config.yml @@ -1,3 +1,5 @@ versions: + "3.0.0": + folder: all "2.0.0": folder: all diff --git a/recipes/fast-cdr/all/conandata.yml b/recipes/fast-cdr/all/conandata.yml index f1fb4fa51912e..0e16ebb10baa2 100644 --- a/recipes/fast-cdr/all/conandata.yml +++ b/recipes/fast-cdr/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.2.3": + url: "https://github.com/eProsima/Fast-CDR/archive/v2.2.3.tar.gz" + sha256: "2501ef0930727d3b3ac1819672a6df8631a58fbcf7f005947046c2de46e8da69" "2.2.0": url: "https://github.com/eProsima/Fast-CDR/archive/v2.2.0.tar.gz" sha256: "8a75ee3aed59f495e95208050920d2c2146df92f073809505a3bd29011c21f20" diff --git a/recipes/fast-cdr/config.yml b/recipes/fast-cdr/config.yml index c6c63a5158e6b..f92947a12e733 100644 --- a/recipes/fast-cdr/config.yml +++ b/recipes/fast-cdr/config.yml @@ -1,4 +1,6 @@ versions: + "2.2.3": + folder: all "2.2.0": folder: all "2.1.0": diff --git a/recipes/fast-dds/all/conandata.yml b/recipes/fast-dds/all/conandata.yml index 9e3502b8efbdc..f53bf9511da8b 100644 --- a/recipes/fast-dds/all/conandata.yml +++ b/recipes/fast-dds/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.14.3": + url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.14.3.tar.gz" + sha256: "292e4170e4689d878eb5ddd38661134a704a1541402a4f564353190e4aadd23d" "2.14.0": url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.14.0.tar.gz" sha256: "a6f12bce6b77f265cab81abde5dc2e08133be9a55bc29e573c84571d44eddbc2" @@ -15,6 +18,10 @@ sources: url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.3.4.tar.gz" sha256: "b1b2322de0ca55a16495666e3fbda8aca32b888bbfaecda29f2ffc4b072ef7ac" patches: + "2.14.3": + - patch_file: "patches/2.13.3-0001-fix-find-asio-and-tinyxml2.patch" + patch_type: "conan" + patch_description: "Fixup find asio and tinyxml2" "2.14.0": - patch_file: "patches/2.13.3-0001-fix-find-asio-and-tinyxml2.patch" patch_type: "conan" diff --git a/recipes/fast-dds/config.yml b/recipes/fast-dds/config.yml index 29bc2c57212d7..101b2295a806a 100644 --- a/recipes/fast-dds/config.yml +++ b/recipes/fast-dds/config.yml @@ -1,4 +1,6 @@ versions: + "2.14.3": + folder: all "2.14.0": folder: all "2.13.3": diff --git a/recipes/fast_float/all/conandata.yml b/recipes/fast_float/all/conandata.yml index ae2caf93865a3..a71f0d864046f 100644 --- a/recipes/fast_float/all/conandata.yml +++ b/recipes/fast_float/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "6.1.5": + url: "https://github.com/fastfloat/fast_float/archive/v6.1.5.tar.gz" + sha256: "597126ff5edc3ee59d502c210ded229401a30dafecb96a513135e9719fcad55f" + "6.1.4": + url: "https://github.com/fastfloat/fast_float/archive/v6.1.4.tar.gz" + sha256: "12cb6d250824160ca16bcb9d51f0ca7693d0d10cb444f34f1093bc02acfce704" "6.1.3": url: "https://github.com/fastfloat/fast_float/archive/v6.1.3.tar.gz" sha256: "7dd99cc2ff44e07dc2a42bed0c6b8c4a8ee4e3b1c330f77073b6cfdb48724c8e" diff --git a/recipes/fast_float/all/conanfile.py b/recipes/fast_float/all/conanfile.py index ec98c563d0552..e53918364ffe6 100644 --- a/recipes/fast_float/all/conanfile.py +++ b/recipes/fast_float/all/conanfile.py @@ -11,9 +11,9 @@ class FastFloatConan(ConanFile): description = "Fast and exact implementation of the C++ from_chars " \ "functions for float and double types." license = ("Apache-2.0", "MIT", "BSL-1.0") - topics = ("conversion", "from_chars", "header-only") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/fastfloat/fast_float" + topics = ("conversion", "from_chars", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True diff --git a/recipes/fast_float/all/test_package/conanfile.py b/recipes/fast_float/all/test_package/conanfile.py index d120a992c06a6..8a5bb47f50c4c 100644 --- a/recipes/fast_float/all/test_package/conanfile.py +++ b/recipes/fast_float/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/fast_float/config.yml b/recipes/fast_float/config.yml index 308dbf8194407..58f7867f85a24 100644 --- a/recipes/fast_float/config.yml +++ b/recipes/fast_float/config.yml @@ -1,4 +1,8 @@ versions: + "6.1.5": + folder: all + "6.1.4": + folder: all "6.1.3": folder: all "6.1.1": diff --git a/recipes/fast_io/all/conandata.yml b/recipes/fast_io/all/conandata.yml index a32bf70cd25f3..849d1ed038071 100644 --- a/recipes/fast_io/all/conandata.yml +++ b/recipes/fast_io/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20240729": + url: "https://github.com/cppfastio/fast_io/archive/44617e9368b64047fabd00cd98b037c1c2fc7fb2.tar.gz" + sha256: "077692f72f2a7e3fed44fa5b37613d058657738c2592addfcb6559cf1ae30716" "cci.20240219": url: "https://github.com/cppfastio/fast_io/archive/316afccde333721b059a761b25217084e84a9ca0.tar.gz" sha256: "9feab7802957c8069b2a112f97bfb885d503ff5d7f433197f47636f40a20188a" diff --git a/recipes/fast_io/config.yml b/recipes/fast_io/config.yml index 957c6f90fa002..7559ae4709057 100644 --- a/recipes/fast_io/config.yml +++ b/recipes/fast_io/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20240729": + folder: all "cci.20240219": folder: all diff --git a/recipes/ffmpeg/all/conandata.yml b/recipes/ffmpeg/all/conandata.yml index 72d6f47cd55d3..0c31b9c82f58e 100644 --- a/recipes/ffmpeg/all/conandata.yml +++ b/recipes/ffmpeg/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "7.0.1": + url: "https://ffmpeg.org//releases/ffmpeg-7.0.1.tar.bz2" + sha256: "5e77e84b6434d656106fafe3bceccc77176449014f3eba24d33db3fbd0939dc9" "6.1.1": url: "http://ffmpeg.org/releases/ffmpeg-6.1.1.tar.bz2" sha256: "5e3133939a61ef64ac9b47ffd29a5ea6e337a4023ef0ad972094b4da844e3a20" @@ -35,13 +38,25 @@ patches: patch_description: "Compatibility with vulkan >= 1.3.239" patch_type: "portability" patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/eb0455d64690eed0068e5cb202f72ecdf899837c" + - patch_file: "patches/5.1-0004-fix-binutils.patch" + patch_description: "Compatibility with binutils >= 2.41" + patch_type: "portability" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/effadce6c756247ea8bae32dc13bb3e6f464f0eb" "5.0.3": - patch_file: "patches/5.0-0001-fix-hwcontext_vulkan.patch" patch_description: "Compatibility with vulkan >= 1.3.239" patch_type: "portability" patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/eb0455d64690eed0068e5cb202f72ecdf899837c" + - patch_file: "patches/5.1-0004-fix-binutils.patch" + patch_description: "Compatibility with binutils >= 2.41" + patch_type: "portability" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/effadce6c756247ea8bae32dc13bb3e6f464f0eb" "4.4.4": - patch_file: "patches/4.4-0001-fix-aom_codec_av1_dx_algo.patch" patch_description: "Compatibility with shared libaom" patch_type: "portability" patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d92fdc714496d43234733c315894abe0beeb3529" + - patch_file: "patches/5.1-0004-fix-binutils.patch" + patch_description: "Compatibility with binutils >= 2.41" + patch_type: "portability" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/effadce6c756247ea8bae32dc13bb3e6f464f0eb" \ No newline at end of file diff --git a/recipes/ffmpeg/all/conanfile.py b/recipes/ffmpeg/all/conanfile.py index 6e07ad722a2f4..3867ed6aa0b52 100644 --- a/recipes/ffmpeg/all/conanfile.py +++ b/recipes/ffmpeg/all/conanfile.py @@ -5,7 +5,7 @@ from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv from conan.tools.files import ( apply_conandata_patches, chdir, copy, export_conandata_patches, get, rename, - replace_in_file, rm, rmdir + replace_in_file, rm, rmdir, save, load ) from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain, PkgConfigDeps from conan.tools.layout import basic_layout @@ -74,6 +74,10 @@ class FFMpegConan(ConanFile): "with_libsvtav1": [True, False], "with_libaom": [True, False], "with_libdav1d": [True, False], + "with_libdrm": [True, False], + "with_jni": [True, False], + "with_mediacodec": [True, False], + "with_xlib": [True, False], "disable_everything": [True, False], "disable_all_encoders": [True, False], "disable_encoders": [None, "ANY"], @@ -154,6 +158,10 @@ class FFMpegConan(ConanFile): "with_libsvtav1": True, "with_libaom": True, "with_libdav1d": True, + "with_libdrm": False, + "with_jni": False, + "with_mediacodec": False, + "with_xlib": True, "disable_everything": False, "disable_all_encoders": False, "disable_encoders": None, @@ -190,8 +198,6 @@ class FFMpegConan(ConanFile): "disable_filters": None, "enable_filters": None, } - # Fix for mslink: Argument list too long - short_paths = True @property def _settings_build(self): @@ -227,6 +233,8 @@ def _dependencies(self): "with_libsvtav1": ["avcodec"], "with_libaom": ["avcodec"], "with_libdav1d": ["avcodec"], + "with_mediacodec": ["with_jni"], + "with_xlib": ["avdevice"], } @property @@ -239,13 +247,15 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if not self.settings.os in ["Linux", "FreeBSD"]: + if self.settings.os not in ["Linux", "FreeBSD"]: del self.options.with_vaapi del self.options.with_vdpau del self.options.with_vulkan del self.options.with_xcb del self.options.with_libalsa del self.options.with_pulse + del self.options.with_xlib + del self.options.with_libdrm if self.settings.os != "Macos": del self.options.with_appkit if self.settings.os not in ["Macos", "iOS", "tvOS"]: @@ -254,8 +264,13 @@ def config_options(self): del self.options.with_videotoolbox if not is_apple_os(self): del self.options.with_avfoundation + if not self.settings.os == "Android": + del self.options.with_jni + del self.options.with_mediacodec if not self._version_supports_libsvtav1: self.options.rm_safe("with_libsvtav1") + if self.settings.os == "Android": + del self.options.with_libfdk_aac def configure(self): if self.options.shared: @@ -280,7 +295,7 @@ def requirements(self): if self.options.with_openjpeg: self.requires("openjpeg/2.5.2") if self.options.with_openh264: - self.requires("openh264/2.3.1") + self.requires("openh264/2.4.1") if self.options.with_vorbis: self.requires("vorbis/1.3.7") if self.options.with_opus: @@ -290,14 +305,14 @@ def requirements(self): if self.options.with_sdl: self.requires("sdl/2.28.5") if self.options.with_libx264: - self.requires("libx264/cci.20220602") + self.requires("libx264/cci.20240224") if self.options.with_libx265: self.requires("libx265/3.4") if self.options.with_libvpx: - self.requires("libvpx/1.13.1") + self.requires("libvpx/1.14.1") if self.options.with_libmp3lame: self.requires("libmp3lame/3.100") - if self.options.with_libfdk_aac: + if self.options.get_safe("with_libfdk_aac"): self.requires("libfdk_aac/2.0.3") if self.options.with_libwebp: self.requires("libwebp/1.3.2") @@ -305,7 +320,7 @@ def requirements(self): self.requires("openssl/[>=1.1 <4]") if self.options.get_safe("with_libalsa"): self.requires("libalsa/1.2.10") - if self.options.get_safe("with_xcb") or self.options.get_safe("with_vaapi"): + if self.options.get_safe("with_xcb") or self.options.get_safe("with_xlib"): self.requires("xorg/system") if self.options.get_safe("with_pulse"): self.requires("pulseaudio/14.2") @@ -316,11 +331,13 @@ def requirements(self): if self.options.get_safe("with_vulkan"): self.requires("vulkan-loader/1.3.243.0") if self.options.get_safe("with_libsvtav1"): - self.requires("libsvtav1/1.6.0") + self.requires("libsvtav1/2.1.0") if self.options.with_libaom: self.requires("libaom-av1/3.6.1") if self.options.get_safe("with_libdav1d"): - self.requires("dav1d/1.2.1") + self.requires("dav1d/1.4.3") + if self.options.get_safe("with_libdrm"): + self.requires("libdrm/2.4.119") def validate(self): if self.options.with_ssl == "securetransport" and not is_apple_os(self): @@ -337,13 +354,25 @@ def validate(self): raise ConanInvalidConfiguration("FFmpeg '{}' option requires '{}' option to be enabled".format( dependency, "' or '".join(features))) - if conan_version.major == 1 and is_msvc(self) and self.options.shared: + if Version(self.version) >= "6.1" and conan_version.major == 1 and is_msvc(self) and self.options.shared: # Linking fails with "Argument list too long" for some reason on Conan v1 raise ConanInvalidConfiguration("MSVC shared build is not supported for Conan v1") + if Version(self.version) == "7.0.1" and self.settings.build_type == "Debug": + # FIXME: FFMpeg fails to build in Debug mode with the following error: + # ld: libavcodec/libavcodec.a(vvcdsp_init.o): in function `ff_vvc_put_pixels2_8_sse4': + # src/libavcodec/x86/vvc/vvcdsp_init.c:69: undefined reference to `ff_h2656_put_pixels2_8_sse4' + # May be related https://github.com/ffvvc/FFmpeg/issues/234 + raise ConanInvalidConfiguration(f"{self.ref} Conan recipe does not support build_type=Debug. Contributions are welcome to fix this issue.") + def build_requirements(self): if self.settings.arch in ("x86", "x86_64"): - self.tool_requires("yasm/1.3.0") + if Version(self.version) >= "7.0": + # INFO: FFmpeg 7.0+ added avcodec vvc_mc.asm which fails to assemble with yasm 1.3.0 + # src/libavcodec/x86/vvc/vvc_mc.asm:55: error: operand 1: expression is not simple or relocatable + self.tool_requires("nasm/2.16.01") + else: + self.tool_requires("yasm/1.3.0") if not self.conf.get("tools.gnu:pkg_config", check_type=str): self.tool_requires("pkgconf/2.1.0") if self._settings_build.os == "Windows": @@ -391,11 +420,10 @@ def _patch_sources(self): "#define X264_API_IMPORTS 1", "") if self.options.with_ssl == "openssl": # https://trac.ffmpeg.org/ticket/5675 - openssl_libraries = " ".join( - [f"-l{lib}" for lib in self.dependencies["openssl"].cpp_info.aggregated_components().libs]) + openssl_libs = load(self, os.path.join(self.build_folder, "openssl_libs.list")) replace_in_file(self, os.path.join(self.source_folder, "configure"), "check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||", - f"check_lib openssl openssl/ssl.h OPENSSL_init_ssl {openssl_libraries} || ") + f"check_lib openssl openssl/ssl.h OPENSSL_init_ssl {openssl_libs} || ") replace_in_file(self, os.path.join(self.source_folder, "configure"), "echo libx264.lib", "echo x264.lib") @@ -479,13 +507,14 @@ def opt_append_disable_if_set(args, what, v): opt_enable_disable("libx265", self.options.with_libx265), opt_enable_disable("libvpx", self.options.with_libvpx), opt_enable_disable("libmp3lame", self.options.with_libmp3lame), - opt_enable_disable("libfdk-aac", self.options.with_libfdk_aac), + opt_enable_disable("libfdk-aac", self.options.get_safe("with_libfdk_aac")), opt_enable_disable("libwebp", self.options.with_libwebp), opt_enable_disable("libaom", self.options.with_libaom), opt_enable_disable("openssl", self.options.with_ssl == "openssl"), opt_enable_disable("alsa", self.options.get_safe("with_libalsa")), opt_enable_disable("libpulse", self.options.get_safe("with_pulse")), opt_enable_disable("vaapi", self.options.get_safe("with_vaapi")), + opt_enable_disable("libdrm", self.options.get_safe("with_libdrm")), opt_enable_disable("vdpau", self.options.get_safe("with_vdpau")), opt_enable_disable("libxcb", self.options.get_safe("with_xcb")), opt_enable_disable("libxcb-shm", self.options.get_safe("with_xcb")), @@ -499,10 +528,13 @@ def opt_append_disable_if_set(args, what, v): opt_enable_disable("securetransport", self.options.with_ssl == "securetransport"), opt_enable_disable("vulkan", self.options.get_safe("with_vulkan")), opt_enable_disable("libdav1d", self.options.get_safe("with_libdav1d")), + opt_enable_disable("jni", self.options.get_safe("with_jni")), + opt_enable_disable("mediacodec", self.options.get_safe("with_mediacodec")), + opt_enable_disable("xlib", self.options.get_safe("with_xlib")), "--disable-cuda", # FIXME: CUDA support "--disable-cuvid", # FIXME: CUVID support # Licenses - opt_enable_disable("nonfree", self.options.with_libfdk_aac or (self.options.with_ssl and ( + opt_enable_disable("nonfree", self.options.get_safe("with_libfdk_aac") or (self.options.with_ssl and ( self.options.with_libx264 or self.options.with_libx265 or self.options.postproc))), opt_enable_disable("gpl", self.options.with_libx264 or self.options.with_libx265 or self.options.postproc) ] @@ -669,6 +701,10 @@ def opt_append_disable_if_set(args, what, v): deps = PkgConfigDeps(self) deps.generate() + if self.options.with_ssl == "openssl": + openssl_libs = " ".join([f"-l{lib}" for lib in self.dependencies["openssl"].cpp_info.aggregated_components().libs]) + save(self, os.path.join(self.build_folder, "openssl_libs.list"), openssl_libs) + def _split_and_format_options_string(self, flag_name, options_list): if not options_list: return [] @@ -810,6 +846,8 @@ def _add_component(name, dependencies): avdevice.requires.append("libalsa::libalsa") if self.options.get_safe("with_xcb"): avdevice.requires.extend(["xorg::xcb", "xorg::xcb-shm", "xorg::xcb-xfixes", "xorg::xcb-shape", "xorg::xv", "xorg::xext"]) + if self.options.get_safe("with_xlib"): + avdevice.requires.extend(["xorg::x11", "xorg::xext", "xorg::xv"]) if self.options.get_safe("with_pulse"): avdevice.requires.append("pulseaudio::pulseaudio") if self.options.get_safe("with_appkit"): @@ -818,6 +856,8 @@ def _add_component(name, dependencies): avdevice.frameworks.append("AVFoundation") if self.options.get_safe("with_audiotoolbox"): avdevice.frameworks.append("CoreAudio") + if self.settings.os == "Android" and not self.options.shared: + avdevice.system_libs.extend(["android", "camera2ndk", "mediandk"]) if self.options.avcodec: if self.options.with_zlib: @@ -842,7 +882,7 @@ def _add_component(name, dependencies): avcodec.requires.append("libvpx::libvpx") if self.options.with_libmp3lame: avcodec.requires.append("libmp3lame::libmp3lame") - if self.options.with_libfdk_aac: + if self.options.get_safe("with_libfdk_aac"): avcodec.requires.append("libfdk_aac::libfdk_aac") if self.options.with_libwebp: avcodec.requires.append("libwebp::libwebp") @@ -879,11 +919,18 @@ def _add_component(name, dependencies): if Version(self.version) >= "5.0" and is_apple_os(self): avfilter.frameworks.append("Metal") + if self.options.get_safe("with_libdrm"): + avutil.requires.append("libdrm::libdrm_libdrm") if self.options.get_safe("with_vaapi"): - avutil.requires.extend(["vaapi::vaapi", "xorg::x11"]) + avutil.requires.append("vaapi::vaapi") + if self.options.get_safe("with_xcb"): + avutil.requires.append("xorg::x11") if self.options.get_safe("with_vdpau"): avutil.requires.append("vdpau::vdpau") + if self.options.with_ssl == "openssl": + avutil.requires.append("openssl::ssl") + if self.options.get_safe("with_vulkan"): avutil.requires.append("vulkan-loader::vulkan-loader") diff --git a/recipes/ffmpeg/all/patches/5.1-0004-fix-binutils.patch b/recipes/ffmpeg/all/patches/5.1-0004-fix-binutils.patch new file mode 100644 index 0000000000000..53a596d0ee7d4 --- /dev/null +++ b/recipes/ffmpeg/all/patches/5.1-0004-fix-binutils.patch @@ -0,0 +1,73 @@ +From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= +Date: Sun, 16 Jul 2023 18:18:02 +0300 +Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift + instructions within inline assembly + +Fixes assembling with binutil as >= 2.41 + +Signed-off-by: James Almer +--- + libavcodec/x86/mathops.h | 26 +++++++++++++++++++++++--- + 1 file changed, 23 insertions(+), 3 deletions(-) + +diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h +index 6298f5ed1983b..ca7e2dffc1076 100644 +--- a/libavcodec/x86/mathops.h ++++ b/libavcodec/x86/mathops.h +@@ -35,12 +35,20 @@ + static av_always_inline av_const int MULL(int a, int b, unsigned shift) + { + int rt, dummy; ++ if (__builtin_constant_p(shift)) + __asm__ ( + "imull %3 \n\t" + "shrdl %4, %%edx, %%eax \n\t" + :"=a"(rt), "=d"(dummy) +- :"a"(a), "rm"(b), "ci"((uint8_t)shift) ++ :"a"(a), "rm"(b), "i"(shift & 0x1F) + ); ++ else ++ __asm__ ( ++ "imull %3 \n\t" ++ "shrdl %4, %%edx, %%eax \n\t" ++ :"=a"(rt), "=d"(dummy) ++ :"a"(a), "rm"(b), "c"((uint8_t)shift) ++ ); + return rt; + } + +@@ -113,19 +121,31 @@ __asm__ volatile(\ + // avoid +32 for shift optimization (gcc should do that ...) + #define NEG_SSR32 NEG_SSR32 + static inline int32_t NEG_SSR32( int32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("sarl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("sarl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + + #define NEG_USR32 NEG_USR32 + static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("shrl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("shrl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + diff --git a/recipes/ffmpeg/config.yml b/recipes/ffmpeg/config.yml index 7c2f1e0428fcb..024586b060fe7 100644 --- a/recipes/ffmpeg/config.yml +++ b/recipes/ffmpeg/config.yml @@ -1,4 +1,6 @@ versions: + "7.0.1": + folder: "all" "6.1.1": folder: "all" "6.1": diff --git a/recipes/fixed_math/all/conandata.yml b/recipes/fixed_math/all/conandata.yml new file mode 100644 index 0000000000000..3e20dff4a8b77 --- /dev/null +++ b/recipes/fixed_math/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.2": + url: "https://github.com/arturbac/fixed_math/archive/refs/tags/v1.0.2.tar.gz" + sha256: "6c87217286e3b93ce5e1fff0bbbb08a9751d04f416cd76ddd5ddd37a8c6772cf" diff --git a/recipes/fixed_math/all/conanfile.py b/recipes/fixed_math/all/conanfile.py new file mode 100644 index 0000000000000..21e92751973d1 --- /dev/null +++ b/recipes/fixed_math/all/conanfile.py @@ -0,0 +1,138 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir +from conan.tools.scm import Version +from conan.tools.layout import basic_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.microsoft import is_msvc +import os + +required_conan_version = ">=1.53.0" + +class FixedMathConan(ConanFile): + name = "fixed_math" + description = "A High-Performance C++17 Library for Fixed-Point 48.16 Arithmetic" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/arturbac/fixed_math/" + topics = ("mathematics", "fixed-point") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "header_only": [True, False], + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "header_only": False, + "shared": False, + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "10", # fixed_math requires __has_builtin + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + } + + def config_options(self): + if self.settings.os == "Windows": + self.package_type = "static-library" + del self.options.fPIC + + def configure(self): + if self.settings.os == "Windows": + self.options.rm_safe("shared") + if self.options.header_only: + self.options.rm_safe("shared") + self.options.rm_safe("fPIC") + self.package_type = "header-library" + elif self.options.get_safe("shared"): + self.options.rm_safe("fPIC") + + def layout(self): + if self.options.header_only: + basic_layout(self, src_folder="src") + else: + cmake_layout(self, src_folder="src") + + def package_id(self): + if self.info.options.header_only: + self.info.clear() + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def build_requirements(self): + if not self.options.header_only: + self.tool_requires("cmake/[>=3.21 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + if self.options.header_only: + return + tc = CMakeToolchain(self) + if is_msvc(self): + tc.variables["CMAKE_CXX_FLAGS"] = "/Zc:__cplusplus" + tc.generate() + venv = VirtualBuildEnv(self) + venv.generate(scope="build") + + def build(self): + if not self.options.header_only: + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENCE", self.source_folder, os.path.join(self.package_folder, "licenses")) + if not self.options.header_only: + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + else: + copy( + self, + "*.h", + os.path.join(self.source_folder, "fixed_lib", "include", "fixedmath"), + os.path.join(self.package_folder, "include", "fixed_math"), + ) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "fixed_lib", "include", "fixedmath"), + os.path.join(self.package_folder, "include", "fixed_math"), + ) + + def package_info(self): + if self.options.header_only: + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + else: + self.cpp_info.libs = ["fixed_math"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + + self.cpp_info.set_property("cmake_file_name", "fixed_math") + self.cpp_info.set_property("cmake_target_name", "fixed_math::fixed_math") + + if is_msvc(self): + self.cpp_info.cxxflags.append("/Zc:__cplusplus") diff --git a/recipes/fixed_math/all/test_package/CMakeLists.txt b/recipes/fixed_math/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..d63966d4ccdd2 --- /dev/null +++ b/recipes/fixed_math/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(fixed_math REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE fixed_math::fixed_math) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/fixed_math/all/test_package/conanfile.py b/recipes/fixed_math/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/fixed_math/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/fixed_math/all/test_package/test_package.cpp b/recipes/fixed_math/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..fe7f675d4cade --- /dev/null +++ b/recipes/fixed_math/all/test_package/test_package.cpp @@ -0,0 +1,39 @@ +#include + +#include "fixed_math/fixed_math.hpp" +#include "fixed_math/iostream.h" + +using fixedmath::fixed_t; +using fixedmath::operator ""_fix; + +//fixed and all functionality is constexpr so You can declare constants see features [1] +inline constexpr fixed_t foo_constant{ fixedmath::tan( 15 * fixedmath::phi/180) }; + +constexpr fixed_t my_function( fixed_t value ) { + using namespace fixedmath; + return foo_constant + sin(value) / (1.41_fix - 2*cos(value) / 4); +} + +int main() { + // converting to/from fixed_t + // construction from other arithmetic types is explicit + fixed_t val { 3.14 }; + + //- there is no implicit assignment from other types + float some_float{val}; + fixed_t some_fixed{some_float}; + + some_fixed = fixed_t{some_float}; + + //- converting to other arithmetic types coud be done with static cast and is explicit + double some_double { static_cast(some_fixed) }; + + // for constant values postfix operator _fix may be used + some_fixed = some_float * 2.45_fix; //operation with float is promoted to fixed_t + some_double = 4.15 * some_fixed; //operation with double is promoted to double + + std::cout << some_fixed << '\n'; + std::cout << some_double << '\n'; + + return 0; +} diff --git a/recipes/fixed_math/config.yml b/recipes/fixed_math/config.yml new file mode 100644 index 0000000000000..8457ca9a4a8cd --- /dev/null +++ b/recipes/fixed_math/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.2": + folder: all diff --git a/recipes/folly/all/CMakeLists.txt b/recipes/folly/all/CMakeLists.txt deleted file mode 100644 index 61f3d3b039e2b..0000000000000 --- a/recipes/folly/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) - -add_subdirectory("source_subfolder") diff --git a/recipes/folly/all/conan_deps.cmake b/recipes/folly/all/conan_deps.cmake new file mode 100644 index 0000000000000..075e362b62636 --- /dev/null +++ b/recipes/folly/all/conan_deps.cmake @@ -0,0 +1,45 @@ +cmake_minimum_required(VERSION 3.17) +# Set the dependency flags expected by https://github.com/facebook/folly/blob/v2023.12.18.00/CMake/folly-deps.cmake + +macro(custom_find_package package_name variable_prefix) + find_package(${package_name} REQUIRED CONFIG ${ARGN}) + list(APPEND FROM FOUND VERSION VERSION_STRING INCLUDE_DIRS INCLUDE_DIR INCLUDE_DIR LIBRARIES LIBRARIES LIBRARIES DEFINITIONS) + list(APPEND TO FOUND VERSION VERSION_STRING INCLUDE_DIRS INCLUDE_DIR INCLUDE LIB LIBRARY LIBRARIES DEFINITIONS) + + foreach (from_substr to_substr IN ZIP_LISTS FROM TO) + set(src_var ${package_name}_${from_substr}) + set(dst_var ${variable_prefix}_${to_substr}) + if (NOT DEFINED ${src_var}) + continue() + endif() + if ((DEFINED ${dst_var}) AND ("${${dst_var}}" STREQUAL "${${src_var}}")) + # if they're equal, skip + continue() + endif() + message(DEBUG "custom_find_package definining ${dst_var} with ${src_var} contents: ${${src_var}}") + set(${dst_var} ${${src_var}}) + endforeach() +endmacro() + +custom_find_package(BZip2 BZIP2) +custom_find_package(DoubleConversion DOUBLE_CONVERSION REQUIRED) +custom_find_package(Gflags LIBGFLAGS) +custom_find_package(Glog GLOG) +custom_find_package(LZ4 LZ4) +custom_find_package(LibEvent LIBEVENT REQUIRED) +custom_find_package(LibLZMA LIBLZMA) +custom_find_package(Libsodium LIBSODIUM) +custom_find_package(OpenSSL OPENSSL REQUIRED) +custom_find_package(Snappy SNAPPY) +custom_find_package(ZLIB ZLIB) +custom_find_package(Zstd ZSTD) +custom_find_package(fmt FMT REQUIRED) + +if (NOT MSVC) + custom_find_package(LibDwarf LIBDWARF) +endif() +if (UNIX AND NOT APPLE) + custom_find_package(LibUring LIBURING) + custom_find_package(LibUnwind LIBUNWIND) + custom_find_package(Libiberty LIBIBERTY) +endif() \ No newline at end of file diff --git a/recipes/folly/all/conandata.yml b/recipes/folly/all/conandata.yml index 8fcc8945ab40d..a21030554ee04 100644 --- a/recipes/folly/all/conandata.yml +++ b/recipes/folly/all/conandata.yml @@ -1,56 +1,4 @@ sources: - "2019.10.21.00": - url: "https://github.com/facebook/folly/archive/v2019.10.21.00.tar.gz" - sha256: "6efcc2b2090691a9fe3d339c433d102d6399bbdc6dc4893080d59f15f648f393" - "2020.08.10.00": - url: "https://github.com/facebook/folly/archive/v2020.08.10.00.tar.gz" - sha256: "e81140d04a4e89e3f848e528466a9b3d3ae37d7eeb9e65467fca50d70918eef6" - "2022.01.31.00": - url: "https://github.com/facebook/folly/archive/v2022.01.31.00.tar.gz" - sha256: "d764b9a7832d967bb7cfea4bcda15d650315aa4d559fde1da2a52b015cd88b9c" -patches: - "2019.10.21.00": - - patch_file: "patches/0001-find-packages.patch" - base_path: "source_subfolder" - - patch_file: "patches/0002-compiler-flags.patch" - base_path: "source_subfolder" - - patch_file: "patches/0003-boost-shared-ptr.patch" - base_path: "source_subfolder" - - patch_file: "patches/0004-disable-posix-names.patch" - base_path: "source_subfolder" - - patch_file: "patches/0005-include-atomic.patch" - base_path: "source_subfolder" - - patch_file: "patches/0006-duplicate-hash.patch" - base_path: "source_subfolder" - - patch_file: "patches/0007-allow-builtins.patch" - base_path: "source_subfolder" - - patch_file: "patches/0013-include-bit.patch" - base_path: "source_subfolder" - - patch_file: "patches/0020-include-ssizet.patch" - base_path: "source_subfolder" - "2020.08.10.00": - - patch_file: "patches/0008-find-packages.patch" - base_path: "source_subfolder" - - patch_file: "patches/0009-ill-formed-atomic-copy.patch" - base_path: "source_subfolder" - - patch_file: "patches/0010-duplicate-hash.patch" - base_path: "source_subfolder" - - patch_file: "patches/0011-disable-logger-example.patch" - base_path: "source_subfolder" - - patch_file: "patches/0012-compiler-flags.patch" - base_path: "source_subfolder" - - patch_file: "patches/0014-find-librt.patch" - base_path: "source_subfolder" - - patch_file: "patches/0015-benchmark-format-macros.patch" - base_path: "source_subfolder" - "2022.01.31.00": - - patch_file: "patches/0016-find-packages.patch" - base_path: "source_subfolder" - - patch_file: "patches/0017-compiler-flags.patch" - base_path: "source_subfolder" - - patch_file: "patches/0018-find-glog.patch" - base_path: "source_subfolder" - - patch_file: "patches/0019-exclude-example.patch" - base_path: "source_subfolder" - - patch_file: "patches/0022-fix-windows-minmax.patch" - base_path: "source_subfolder" + "2024.08.12.00": + url: "https://github.com/facebook/folly/releases/download/v2024.08.12.00/folly-v2024.08.12.00.tar.gz" + sha256: "18d7be721721db547cb9c5dd5cc50df05cd88b0a8e683e3126ec6f9ce2c41c4d" diff --git a/recipes/folly/all/conanfile.py b/recipes/folly/all/conanfile.py index 06dc6965155a7..7b2eee5c31d02 100755 --- a/recipes/folly/all/conanfile.py +++ b/recipes/folly/all/conanfile.py @@ -1,14 +1,16 @@ -from conan.tools.microsoft import is_msvc, msvc_runtime_flag -from conan.tools.build import can_run -from conan.tools.scm import Version -from conan.tools import files from conan import ConanFile -from conans import CMake, tools from conan.errors import ConanInvalidConfiguration -import functools +from conan.tools.apple import is_apple_os +from conan.tools.build import check_min_cppstd, cross_building +from conan.tools.env import VirtualBuildEnv +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import get, copy, rmdir, replace_in_file, save, rm +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.scm import Version import os -required_conan_version = ">=1.45.0" + +required_conan_version = ">=1.54.0" class FollyConan(ConanFile): @@ -19,278 +21,263 @@ class FollyConan(ConanFile): homepage = "https://github.com/facebook/folly" license = "Apache-2.0" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], - "use_sse4_2" : [True, False], } default_options = { "shared": False, "fPIC": True, - "use_sse4_2" : False } - generators = "cmake", "cmake_find_package" - @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 17 @property - def _minimum_cpp_standard(self): - return 17 if Version(self.version) >= "2022.01.31.00" else 14 - - @property - def _minimum_compilers_version(self): + def _compilers_minimum_version(self): + # https://github.com/facebook/folly/blob/v2024.07.08.00/folly/Portability.h return { - "Visual Studio": "15", - "gcc": "5", - "clang": "6", - "apple-clang": "8", - } if self._minimum_cpp_standard == 14 else { - "gcc": "7", + "gcc": "10", + "clang": "10", + "apple-clang": "14", + "msvc": "192", "Visual Studio": "16", - "clang": "6", - "apple-clang": "10", } def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) - + copy(self, "conan_deps.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if str(self.settings.arch) not in ['x86', 'x86_64']: - del self.options.use_sse4_2 - def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + if is_msvc(self): + # Folly does not support shared library on Windows: https://github.com/facebook/folly/issues/962 + self.package_type = "static-library" + del self.options.shared + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.78.0") + self.requires("boost/1.85.0", transitive_headers=True, transitive_libs=True) self.requires("bzip2/1.0.8") - self.requires("double-conversion/3.2.0") + self.requires("double-conversion/3.3.0", transitive_headers=True, transitive_libs=True) self.requires("gflags/2.2.2") - self.requires("glog/0.4.0") - self.requires("libevent/2.1.12") - self.requires("openssl/1.1.1q") - self.requires("lz4/1.9.3") - self.requires("snappy/1.1.9") - self.requires("zlib/1.2.12") - self.requires("zstd/1.5.2") + self.requires("glog/0.7.1", transitive_headers=True, transitive_libs=True) + self.requires("libevent/2.1.12", transitive_headers=True, transitive_libs=True) + self.requires("openssl/[>=1.1 <4]") + self.requires("lz4/1.10.0", transitive_libs=True) + self.requires("snappy/1.2.1") + self.requires("zlib/[>=1.2.11 <2]") + self.requires("zstd/1.5.5", transitive_libs=True) if not is_msvc(self): - self.requires("libdwarf/20191104") - self.requires("libsodium/1.0.18") - self.requires("xz_utils/5.2.5") - # FIXME: Causing compilation issues on clang: self.requires("jemalloc/5.2.1") - if self.settings.os == "Linux": + self.requires("libdwarf/0.9.1") + self.requires("libsodium/1.0.19") + self.requires("xz_utils/[>=5.4.5 <6]") + if self.settings.os in ["Linux", "FreeBSD"]: self.requires("libiberty/9.1.0") - self.requires("libunwind/1.5.0") - if Version(self.version) >= "2020.08.10.00": - self.requires("fmt/7.1.3") + self.requires("libunwind/1.8.0") + if self.settings.os == "Linux": + self.requires("liburing/2.6") + # INFO: Folly does not support fmt 11 on MSVC: https://github.com/facebook/folly/issues/2250 + self.requires("fmt/10.2.1", transitive_headers=True, transitive_libs=True) + + def build_requirements(self): + # INFO: Required due ZIP_LISTS CMake feature in conan_deps.cmake + self.tool_requires("cmake/[>=3.17 <4]") @property def _required_boost_components(self): return ["context", "filesystem", "program_options", "regex", "system", "thread"] + @property + def _required_boost_conan_components(self): + return [f"boost::{comp}" for comp in self._required_boost_components] + + @property + def _required_boost_cmake_targets(self): + return [f"Boost::{comp}" for comp in self._required_boost_components] + def validate(self): - if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, self._minimum_cpp_standard) - min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) - if not min_version: - self.output.warn("{} recipe lacks information about the {} compiler support.".format(self.name, self.settings.compiler)) - else: - if Version(self.settings.compiler.version) < min_version: - raise ConanInvalidConfiguration("{} requires C++{} support. The current compiler {} {} does not support it.".format( - self.name, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler.version)) - - if Version(self.version) < "2022.01.31.00" and self.settings.os != "Linux": - raise ConanInvalidConfiguration("Conan support for non-Linux platforms starts with Folly version 2022.01.31.00") - - if self.settings.os == "Macos" and self.settings.arch != "x86_64": - raise ConanInvalidConfiguration("Conan currently requires a 64bit target architecture for Folly on Macos") + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") if self.settings.os == "Windows" and self.settings.arch != "x86_64": - raise ConanInvalidConfiguration("Folly requires a 64bit target architecture on Windows") - - if self.settings.os in ["Macos", "Windows"] and self.options.shared: - raise ConanInvalidConfiguration("Folly could not be built on {} as shared library".format(self.settings.os)) + raise ConanInvalidConfiguration(f"{self.ref} Folly requires a 64bit target architecture on Windows.") - if Version(self.version) == "2020.08.10.00" and self.settings.compiler == "clang" and self.options.shared: - raise ConanInvalidConfiguration("Folly could not be built by clang as a shared library") + if self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "14.0": + # https://github.com/facebook/folly/issues/2266 + raise ConanInvalidConfiguration(f"{self.ref} could not be built by apple-clang < 14.0. Use apple-clang >= 14.0") - if self.options["boost"].header_only: - raise ConanInvalidConfiguration("Folly could not be built with a header only Boost") + boost = self.dependencies["boost"] + if boost.options.header_only: + raise ConanInvalidConfiguration(f"{self.ref} could not be built with a header only Boost. Use -o 'boost/*:header_only=False'") - miss_boost_required_comp = any(getattr(self.options["boost"], "without_{}".format(boost_comp), True) for boost_comp in self._required_boost_components) + miss_boost_required_comp = any(getattr(boost.options, f"without_{boost_comp}", True) for boost_comp in self._required_boost_components) if miss_boost_required_comp: - raise ConanInvalidConfiguration("Folly requires these boost components: {}".format(", ".join(self._required_boost_components))) - - min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) - if not min_version: - self.output.warn("{} recipe lacks information about the {} compiler support.".format(self.name, self.settings.compiler)) - else: - if Version(self.settings.compiler.version) < min_version: - raise ConanInvalidConfiguration("{} requires C++{} support. The current compiler {} {} does not support it.".format( - self.name, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler.version)) - - if self.options.get_safe("use_sse4_2") and str(self.settings.arch) not in ['x86', 'x86_64']: - raise ConanInvalidConfiguration(f"{self.ref} can use the option use_sse4_2 only on x86 and x86_64 archs.") - - # FIXME: Freeze max. CMake version at 3.16.2 to fix the Linux build - def build_requirements(self): - self.build_requires("cmake/3.16.9") + required_components = ", ".join(self._required_boost_components) + raise ConanInvalidConfiguration(f"{self.ref} requires these Boost components: {required_components}. Try with '-o boost/*:without_{required_components}=False'") def source(self): - files.get(self, **self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=False) + + def _cppstd_flag_value(self, cppstd): + if is_msvc(self): + prefix = "c" + year = str(cppstd) + if year > "17": + year = "latest" + return f"{prefix}++{year}" + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = CMakeToolchain(self) + tc.variables["CMAKE_PROJECT_folly_INCLUDE"] = "conan_deps.cmake" + # Folly fails to check Gflags: https://github.com/conan-io/conan/issues/12012 + tc.variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = str(self.settings.build_type) + + if is_apple_os(self) and cross_building(self): + # INFO: Folly fails to configure Mac M1 -> Mac Intel: + # CMake Error: try_run() invoked in cross-compiling mode, please set the following cache variables appropriately: HAVE_VSNPRINTF_ERRORS_EXITCODE (advanced) + for var in ["FOLLY_HAVE_UNALIGNED_ACCESS", "FOLLY_HAVE_LINUX_VDSO", "FOLLY_HAVE_WCHAR_SUPPORT", "HAVE_VSNPRINTF_ERRORS"]: + tc.cache_variables[f"{var}_EXITCODE"] = 0 + + # Folly is not respecting this from the helper https://github.com/conan-io/conan-center-index/pull/15726/files#r1097068754 + tc.cache_variables["CMAKE_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True) + # Relocatable shared lib on Macos + if is_apple_os(self): + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" + # Honor BUILD_SHARED_LIBS from conan_toolchain (see https://github.com/conan-io/conan/issues/11840) + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + # Honor Boost_ROOT set by boost recipe + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0074"] = "NEW" + + + # 2019.10.21.00 -> either MSVC_ flags or CXX_STD + if is_msvc(self): + cxx_std_value = self._cppstd_flag_value(self.settings.get_safe("compiler.cppstd", self._min_cppstd)) + tc.cache_variables["MSVC_LANGUAGE_VERSION"] = cxx_std_value + tc.cache_variables["MSVC_ENABLE_ALL_WARNINGS"] = False + tc.cache_variables["MSVC_USE_STATIC_RUNTIME"] = is_msvc_static_runtime(self) + tc.preprocessor_definitions["NOMINMAX"] = "" + + if not self.dependencies["boost"].options.header_only: + tc.cache_variables["BOOST_LINK_STATIC"] = not self.dependencies["boost"].options.shared + + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0074"] = "NEW" # Honor Boost_ROOT set by boost recipe + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("boost", "cmake_file_name", "Boost") + deps.set_property("bzip2", "cmake_file_name", "BZip2") + deps.set_property("double-conversion", "cmake_file_name", "DoubleConversion") + deps.set_property("fmt", "cmake_file_name", "fmt") + deps.set_property("gflags", "cmake_file_name", "Gflags") + deps.set_property("glog", "cmake_file_name", "Glog") + deps.set_property("libdwarf", "cmake_file_name", "LibDwarf") + deps.set_property("libevent", "cmake_file_name", "LibEvent") + deps.set_property("libiberty", "cmake_file_name", "Libiberty") + deps.set_property("libsodium", "cmake_file_name", "Libsodium") + deps.set_property("libunwind", "cmake_file_name", "LibUnwind") + deps.set_property("liburing", "cmake_file_name", "LibUring") + deps.set_property("lz4", "cmake_file_name", "LZ4") + deps.set_property("openssl", "cmake_file_name", "OpenSSL") + deps.set_property("snappy", "cmake_file_name", "Snappy") + deps.set_property("xz_utils", "cmake_file_name", "LibLZMA") + deps.set_property("zlib", "cmake_file_name", "ZLIB") + deps.set_property("zstd", "cmake_file_name", "Zstd") + deps.generate() + + def _patch_sources(self): + # Make sure will consume Conan dependencies + folly_deps = os.path.join(self.source_folder, "CMake", "folly-deps.cmake") + replace_in_file(self, folly_deps, " MODULE", " REQUIRED CONFIG") + replace_in_file(self, folly_deps, "${Boost_LIBRARIES}", f"{' '.join(self._required_boost_cmake_targets)}") + replace_in_file(self, folly_deps, "OpenSSL 1.1.1", "OpenSSL") + # Disable example + save(self, os.path.join(self.source_folder, "folly", "logging", "example", "CMakeLists.txt"), "") + # Disable custom find modules to use Conan CMakeDeps instead + rm(self, "Find*.cmake", os.path.join(self.source_folder, "CMake")) + rm(self, "Find*.cmake", os.path.join(self.source_folder, "build", "fbcode_builder", "CMake")) + # Skip generating .pc file to avoid Windows errors when trying to compile with pkg-config + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "gen_pkgconfig_vars(FOLLY_PKGCONFIG folly_deps)", "") - @functools.lru_cache(1) - def _configure_cmake(self): + def build(self): + self._patch_sources() cmake = CMake(self) - if can_run(self): - cmake.definitions["FOLLY_HAVE_UNALIGNED_ACCESS_EXITCODE"] = "0" - cmake.definitions["FOLLY_HAVE_UNALIGNED_ACCESS_EXITCODE__TRYRUN_OUTPUT"] = "" - cmake.definitions["FOLLY_HAVE_LINUX_VDSO_EXITCODE"] = "0" - cmake.definitions["FOLLY_HAVE_LINUX_VDSO_EXITCODE__TRYRUN_OUTPUT"] = "" - cmake.definitions["FOLLY_HAVE_WCHAR_SUPPORT_EXITCODE"] = "0" - cmake.definitions["FOLLY_HAVE_WCHAR_SUPPORT_EXITCODE__TRYRUN_OUTPUT"] = "" - cmake.definitions["HAVE_VSNPRINTF_ERRORS_EXITCODE"] = "0" - cmake.definitions["HAVE_VSNPRINTF_ERRORS_EXITCODE__TRYRUN_OUTPUT"] = "" - - if self.options.get_safe("use_sse4_2") and str(self.settings.arch) in ['x86', 'x86_64']: - # in folly, if simd >=sse4.2, we also needs -mfma flag to avoid compiling error. - if not is_msvc(self): - cmake.definitions["CMAKE_C_FLAGS"] = "-mfma" - cmake.definitions["CMAKE_CXX_FLAGS"] = "-mfma" - else: - cmake.definitions["CMAKE_C_FLAGS"] = "/arch:FMA" - cmake.definitions["CMAKE_CXX_FLAGS"] = "/arch:FMA" - - cmake.definitions["CMAKE_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True) - - cxx_std_flag = tools.cppstd_flag(self.settings) - cxx_std_value = cxx_std_flag.split('=')[1] if cxx_std_flag else "c++{}".format(self._minimum_cpp_standard) - cmake.definitions["CXX_STD"] = cxx_std_value - if is_msvc: - cmake.definitions["MSVC_LANGUAGE_VERSION"] = cxx_std_value - cmake.definitions["MSVC_ENABLE_ALL_WARNINGS"] = False - cmake.definitions["MSVC_USE_STATIC_RUNTIME"] = "MT" in msvc_runtime_flag(self) cmake.configure() - return cmake - - - def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() cmake.build() def package(self): - self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() - files.rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - files.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, "lib", "pkgconfig")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "folly") - self.cpp_info.set_property("cmake_target_name", "Folly::folly") + self.cpp_info.set_property("cmake_target_name", "folly::folly") self.cpp_info.set_property("pkg_config_name", "libfolly") - # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed - if Version(self.version) == "2019.10.21.00": - self.cpp_info.components["libfolly"].libs = [ - "follybenchmark", - "folly_test_util", - "folly" - ] - elif Version(self.version) >= "2020.08.10.00": - if self.settings.os == "Linux": - self.cpp_info.components["libfolly"].libs = [ - "folly_exception_counter", - "folly_exception_tracer", - "folly_exception_tracer_base", - "folly_test_util", - "follybenchmark", - "folly" - ] - else: - self.cpp_info.components["libfolly"].libs = [ - "folly_test_util", - "follybenchmark", - "folly" - ] - - self.cpp_info.components["libfolly"].requires = [ - "boost::boost", - "bzip2::bzip2", + self.cpp_info.components["libfolly"].set_property("cmake_target_name", "Folly::folly") + self.cpp_info.components["libfolly"].set_property("pkg_config_name", "libfolly") + self.cpp_info.components["libfolly"].libs = ["folly"] + self.cpp_info.components["libfolly"].requires = ["fmt::fmt"] + self._required_boost_conan_components + [ "double-conversion::double-conversion", "gflags::gflags", "glog::glog", "libevent::libevent", "lz4::lz4", "openssl::openssl", + "bzip2::bzip2", "snappy::snappy", "zlib::zlib", "zstd::zstd", "libsodium::libsodium", - "xz_utils::xz_utils" + "xz_utils::xz_utils", ] if not is_msvc(self): self.cpp_info.components["libfolly"].requires.append("libdwarf::libdwarf") - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["libfolly"].requires.extend(["libiberty::libiberty", "libunwind::libunwind"]) + if self.settings.os == "Linux": + self.cpp_info.components["libfolly"].requires.append("liburing::liburing") self.cpp_info.components["libfolly"].system_libs.extend(["pthread", "dl", "rt"]) - - if Version(self.version) >= "2020.08.10.00": - self.cpp_info.components["libfolly"].requires.append("fmt::fmt") - if self.settings.os == "Linux": - self.cpp_info.components["libfolly"].defines.extend(["FOLLY_HAVE_ELF", "FOLLY_HAVE_DWARF"]) - + self.cpp_info.components["libfolly"].defines.extend(["FOLLY_HAVE_ELF", "FOLLY_HAVE_DWARF"]) elif self.settings.os == "Windows": self.cpp_info.components["libfolly"].system_libs.extend(["ws2_32", "iphlpapi", "crypt32"]) - if (self.settings.os == "Linux" and self.settings.compiler == "clang" and - self.settings.compiler.libcxx == "libstdc++") or \ - (self.settings.os == "Macos" and self.settings.compiler == "apple-clang" and - Version(self.settings.compiler.version.value) == "9.0" and self.settings.compiler.libcxx == "libc++"): + if self.settings.get_safe("compiler.libcxx") == "libstdc++" or \ + (self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version.value) == "9.0" and \ + self.settings.get_safe("compiler.libcxx") == "libc++"): self.cpp_info.components["libfolly"].system_libs.append("atomic") - if self.settings.os == "Macos" and self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version.value) >= "11.0": + if self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version.value) >= "11.0": self.cpp_info.components["libfolly"].system_libs.append("c++abi") - if self.options.get_safe("use_sse4_2") and str(self.settings.arch) in ['x86', 'x86_64']: - self.cpp_info.components["libfolly"].defines = ["FOLLY_SSE=4", "FOLLY_SSE_MINOR=2"] - - # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed - self.cpp_info.filenames["cmake_find_package"] = "folly" - self.cpp_info.filenames["cmake_find_package_multi"] = "folly" - self.cpp_info.names["cmake_find_package"] = "Folly" - self.cpp_info.names["cmake_find_package_multi"] = "Folly" - self.cpp_info.names["pkg_config"] = "libfolly" - self.cpp_info.components["libfolly"].names["cmake_find_package"] = "folly" - self.cpp_info.components["libfolly"].names["cmake_find_package_multi"] = "folly" - self.cpp_info.components["libfolly"].set_property("cmake_target_name", "Folly::folly") - self.cpp_info.components["libfolly"].set_property("pkg_config_name", "libfolly") - - if Version(self.version) >= "2019.10.21.00": - self.cpp_info.components["follybenchmark"].set_property("cmake_target_name", "Folly::follybenchmark") - self.cpp_info.components["follybenchmark"].set_property("pkg_config_name", "libfollybenchmark") - self.cpp_info.components["follybenchmark"].libs = ["follybenchmark"] - self.cpp_info.components["follybenchmark"].requires = ["libfolly"] + self.cpp_info.components["follybenchmark"].set_property("cmake_target_name", "Folly::follybenchmark") + self.cpp_info.components["follybenchmark"].set_property("pkg_config_name", "libfollybenchmark") + self.cpp_info.components["follybenchmark"].libs = ["follybenchmark"] + self.cpp_info.components["follybenchmark"].requires = ["libfolly"] - self.cpp_info.components["folly_test_util"].set_property("cmake_target_name", "Folly::folly_test_util") - self.cpp_info.components["folly_test_util"].set_property("pkg_config_name", "libfolly_test_util") - self.cpp_info.components["folly_test_util"].libs = ["folly_test_util"] - self.cpp_info.components["folly_test_util"].requires = ["libfolly"] + self.cpp_info.components["folly_test_util"].set_property("cmake_target_name", "Folly::folly_test_util") + self.cpp_info.components["folly_test_util"].set_property("pkg_config_name", "libfolly_test_util") + self.cpp_info.components["folly_test_util"].libs = ["folly_test_util"] + self.cpp_info.components["folly_test_util"].requires = ["libfolly"] - if Version(self.version) >= "2020.08.10.00" and self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["folly_exception_tracer_base"].set_property("cmake_target_name", "Folly::folly_exception_tracer_base") self.cpp_info.components["folly_exception_tracer_base"].set_property("pkg_config_name", "libfolly_exception_tracer_base") self.cpp_info.components["folly_exception_tracer_base"].libs = ["folly_exception_tracer_base"] @@ -305,3 +292,26 @@ def package_info(self): self.cpp_info.components["folly_exception_counter"].set_property("pkg_config_name", "libfolly_exception_counter") self.cpp_info.components["folly_exception_counter"].libs = ["folly_exception_counter"] self.cpp_info.components["folly_exception_counter"].requires = ["folly_exception_tracer"] + + # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed + self.cpp_info.filenames["cmake_find_package"] = "folly" + self.cpp_info.filenames["cmake_find_package_multi"] = "folly" + self.cpp_info.names["cmake_find_package"] = "Folly" + self.cpp_info.names["cmake_find_package_multi"] = "Folly" + self.cpp_info.components["libfolly"].names["cmake_find_package"] = "folly" + self.cpp_info.components["libfolly"].names["cmake_find_package_multi"] = "folly" + + # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed + self.cpp_info.components["follybenchmark"].names["cmake_find_package"] = "follybenchmark" + self.cpp_info.components["follybenchmark"].names["cmake_find_package_multi"] = "follybenchmark" + self.cpp_info.components["folly_test_util"].names["cmake_find_package"] = "folly_test_util" + self.cpp_info.components["folly_test_util"].names["cmake_find_package_multi"] = "folly_test_util" + + if self.settings.os in ["Linux", "FreeBSD"]: + # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed + self.cpp_info.components["folly_exception_tracer_base"].names["cmake_find_package"] = "folly_exception_tracer_base" + self.cpp_info.components["folly_exception_tracer_base"].names["cmake_find_package_multi"] = "folly_exception_tracer_base" + self.cpp_info.components["folly_exception_tracer"].names["cmake_find_package"] = "folly_exception_tracer" + self.cpp_info.components["folly_exception_tracer"].names["cmake_find_package_multi"] = "folly_exception_tracer" + self.cpp_info.components["folly_exception_counter"].names["cmake_find_package"] = "folly_exception_counter" + self.cpp_info.components["folly_exception_counter"].names["cmake_find_package_multi"] = "folly_exception_counter" diff --git a/recipes/folly/all/patches/0001-find-packages.patch b/recipes/folly/all/patches/0001-find-packages.patch deleted file mode 100644 index 4cee77cd34c1c..0000000000000 --- a/recipes/folly/all/patches/0001-find-packages.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff --git a/CMake/FindLibsodium.cmake b/CMake/FindLibsodium.cmake -index 18d4d0c..2b3cd2a 100644 ---- a/CMake/FindLibsodium.cmake -+++ b/CMake/FindLibsodium.cmake -@@ -15,7 +15,7 @@ - find_path(LIBSODIUM_INCLUDE_DIR NAMES sodium.h) - mark_as_advanced(LIBSODIUM_INCLUDE_DIR) - --find_library(LIBSODIUM_LIBRARY NAMES sodium) -+find_library(LIBSODIUM_LIBRARY NAMES sodium libsodium PATHS ${CONAN_LIBSODIUM_ROOT}) - mark_as_advanced(LIBSODIUM_LIBRARY) - - include(FindPackageHandleStandardArgs) -diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake -index 048e1cd..da3ab8e 100644 ---- a/CMake/folly-deps.cmake -+++ b/CMake/folly-deps.cmake -@@ -36,19 +36,19 @@ find_package(DoubleConversion MODULE REQUIRED) - list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) - --find_package(Gflags MODULE) --set(FOLLY_HAVE_LIBGFLAGS ${LIBGFLAGS_FOUND}) --list(APPEND FOLLY_LINK_LIBRARIES ${LIBGFLAGS_LIBRARY}) --list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBGFLAGS_INCLUDE_DIR}) --list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBGFLAGS_LIBRARY}) --list(APPEND CMAKE_REQUIRED_INCLUDES ${LIBGFLAGS_INCLUDE_DIR}) -- --find_package(Glog MODULE) -+find_package(gflags MODULE REQUIRED) -+set(FOLLY_HAVE_LIBGFLAGS ${GFLAGS_FOUND}) -+list(APPEND FOLLY_LINK_LIBRARIES ${CONAN_LIBS_GFLAGS}) -+list(APPEND FOLLY_INCLUDE_DIRECTORIES ${CONAN_INCLUDE_DIRS_GFLAGS}) -+list(APPEND CMAKE_REQUIRED_LIBRARIES ${gflags_LIBRARY}) -+list(APPEND CMAKE_REQUIRED_INCLUDES ${gflags_INCLUDE_DIR}) -+ -+find_package(glog MODULE) - set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND}) - list(APPEND FOLLY_LINK_LIBRARIES ${GLOG_LIBRARY}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR}) - --find_package(LibEvent MODULE REQUIRED) -+find_package(Libevent MODULE REQUIRED) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBEVENT_LIB}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBEVENT_INCLUDE_DIR}) - -diff --git a/build/fbcode_builder/CMake/FindGflags.cmake b/build/fbcode_builder/CMake/FindGflags.cmake -index 246ceac..385605e 100644 ---- a/build/fbcode_builder/CMake/FindGflags.cmake -+++ b/build/fbcode_builder/CMake/FindGflags.cmake -@@ -48,8 +48,13 @@ if (gflags_FOUND) - else() - FIND_PATH(LIBGFLAGS_INCLUDE_DIR gflags/gflags.h) - -- FIND_LIBRARY(LIBGFLAGS_LIBRARY_DEBUG NAMES gflagsd gflags_staticd) -- FIND_LIBRARY(LIBGFLAGS_LIBRARY_RELEASE NAMES gflags gflags_static) -+ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") -+ FIND_LIBRARY(LIBGFLAGS_LIBRARY_DEBUG NAMES gflagsd gflags_nothreads_staticd gflags_nothreads_static_debug PATHS ${CONAN_GFLAGS_ROOT}) -+ FIND_LIBRARY(LIBGFLAGS_LIBRARY_RELEASE NAMES gflags gflags_nothreads_static PATHS ${CONAN_GFLAGS_ROOT}) -+ else() -+ FIND_LIBRARY(LIBGFLAGS_LIBRARY_DEBUG NAMES gflags gflags_nothreads_debug PATHS ${CONAN_GFLAGS_ROOT}) -+ FIND_LIBRARY(LIBGFLAGS_LIBRARY_RELEASE NAMES gflags_nothreads gflags PATHS ${CONAN_GFLAGS_ROOT}) -+ endif() - - INCLUDE(SelectLibraryConfigurations) - SELECT_LIBRARY_CONFIGURATIONS(LIBGFLAGS) -diff --git a/build/fbcode_builder/CMake/FindGlog.cmake b/build/fbcode_builder/CMake/FindGlog.cmake -index a589b2e..15aef75 100644 ---- a/build/fbcode_builder/CMake/FindGlog.cmake -+++ b/build/fbcode_builder/CMake/FindGlog.cmake -@@ -8,8 +8,7 @@ - - include(FindPackageHandleStandardArgs) - --find_library(GLOG_LIBRARY glog -- PATHS ${GLOG_LIBRARYDIR}) -+find_library(GLOG_LIBRARY glog glogd PATHS ${CONAN_GLOG_ROOT}) - - find_path(GLOG_INCLUDE_DIR glog/logging.h - PATHS ${GLOG_INCLUDEDIR}) -diff --git a/build/fbcode_builder/CMake/FindLibEvent.cmake b/build/fbcode_builder/CMake/FindLibEvent.cmake -index dd11ebd..9ef0807 100644 ---- a/build/fbcode_builder/CMake/FindLibEvent.cmake -+++ b/build/fbcode_builder/CMake/FindLibEvent.cmake -@@ -50,7 +50,7 @@ if (TARGET event) - endif() - else() - find_path(LIBEVENT_INCLUDE_DIR event.h PATHS ${LibEvent_INCLUDE_PATHS}) -- find_library(LIBEVENT_LIB NAMES event PATHS ${LibEvent_LIB_PATHS}) -+ find_library(LIBEVENT_LIB NAMES event libevent PATHS ${CONAN_LIBEVENT_ROOT}) - - if (LIBEVENT_LIB AND LIBEVENT_INCLUDE_DIR) - set(LibEvent_FOUND TRUE) diff --git a/recipes/folly/all/patches/0002-compiler-flags.patch b/recipes/folly/all/patches/0002-compiler-flags.patch deleted file mode 100644 index b9213ff6d4895..0000000000000 --- a/recipes/folly/all/patches/0002-compiler-flags.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/CMake/FollyCompilerUnix.cmake b/CMake/FollyCompilerUnix.cmake -index 7fba75f..019d30f 100644 ---- a/CMake/FollyCompilerUnix.cmake -+++ b/CMake/FollyCompilerUnix.cmake -@@ -28,9 +28,9 @@ set( - ) - mark_as_advanced(CXX_STD) - --set(CMAKE_CXX_FLAGS_COMMON "-g -Wall -Wextra") -+set(CMAKE_CXX_FLAGS_COMMON "-Wall -Wextra") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_COMMON}") --set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON} -O3") -+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON}") - - # Note that CMAKE_REQUIRED_FLAGS must be a string, not a list - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=${CXX_STD}") -@@ -44,7 +44,6 @@ function(apply_folly_compile_options_to_target THETARGET) - ) - target_compile_options(${THETARGET} - PRIVATE -- -g - -std=${CXX_STD} - -finput-charset=UTF-8 - -fsigned-char diff --git a/recipes/folly/all/patches/0003-boost-shared-ptr.patch b/recipes/folly/all/patches/0003-boost-shared-ptr.patch deleted file mode 100644 index 7608d6b2e9e2b..0000000000000 --- a/recipes/folly/all/patches/0003-boost-shared-ptr.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/folly/portability/PThread.cpp b/folly/portability/PThread.cpp -index f8cd6d4..0908668 100644 ---- a/folly/portability/PThread.cpp -+++ b/folly/portability/PThread.cpp -@@ -18,7 +18,9 @@ - - #if !FOLLY_HAVE_PTHREAD && defined(_WIN32) - #include // @manual -- -+#include -+#include -+#include - #include - - #include -@@ -683,7 +685,7 @@ int pthread_setspecific(pthread_key_t key, const void* value) { - // function, which we don't want to do. - boost::detail::set_tss_data( - realKey, -- boost::shared_ptr(), -+ 0,0, - const_cast(value), - false); - return 0; diff --git a/recipes/folly/all/patches/0004-disable-posix-names.patch b/recipes/folly/all/patches/0004-disable-posix-names.patch deleted file mode 100644 index 9efd4e24140e1..0000000000000 --- a/recipes/folly/all/patches/0004-disable-posix-names.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/folly/portability/Windows.h b/folly/portability/Windows.h -index f7990ca..b22fac5 100644 ---- a/folly/portability/Windows.h -+++ b/folly/portability/Windows.h -@@ -26,16 +26,12 @@ - // These have to be this way because we define our own versions - // of close(), because the normal Windows versions don't handle - // sockets at all. --#ifndef __STDC__ --/* nolint */ --#define __STDC__ 1 --#include // @manual nolint --#include // @manual nolint --#undef __STDC__ --#else --#include // @manual nolint --#include // @manual nolint --#endif -+#include -+#pragma push_macro("_CRT_INTERNAL_NONSTDC_NAMES") -+#define _CRT_INTERNAL_NONSTDC_NAMES 0 -+#include -+#include -+#pragma pop_macro("_CRT_INTERNAL_NONSTDC_NAMES") - - #if defined(min) || defined(max) - #error Windows.h needs to be included by this header, or else NOMINMAX needs \ diff --git a/recipes/folly/all/patches/0005-include-atomic.patch b/recipes/folly/all/patches/0005-include-atomic.patch deleted file mode 100644 index 0eb9382e49a9d..0000000000000 --- a/recipes/folly/all/patches/0005-include-atomic.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/folly/portability/PThread.cpp b/folly/portability/PThread.cpp -index 2891c4c..7c98975 100644 ---- a/folly/portability/PThread.cpp -+++ b/folly/portability/PThread.cpp -@@ -30,6 +30,7 @@ - #include - #include - #include -+#include - - #include - #include diff --git a/recipes/folly/all/patches/0006-duplicate-hash.patch b/recipes/folly/all/patches/0006-duplicate-hash.patch deleted file mode 100644 index f8905d003157e..0000000000000 --- a/recipes/folly/all/patches/0006-duplicate-hash.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/folly/hash/Hash.h b/folly/hash/Hash.h -index 33fa553..4266cf1 100644 ---- a/folly/hash/Hash.h -+++ b/folly/hash/Hash.h -@@ -730,7 +730,7 @@ struct TupleHasher<0, Ts...> { - - // Custom hash functions. - namespace std { --#if FOLLY_SUPPLY_MISSING_INT128_TRAITS -+#if 0 - template <> - struct hash<__int128> : folly::detail::integral_hasher<__int128> {}; - diff --git a/recipes/folly/all/patches/0007-allow-builtins.patch b/recipes/folly/all/patches/0007-allow-builtins.patch deleted file mode 100644 index de09722f02acc..0000000000000 --- a/recipes/folly/all/patches/0007-allow-builtins.patch +++ /dev/null @@ -1,128 +0,0 @@ -diff --git a/folly/portability/Builtins.h b/folly/portability/Builtins.h -index 971cb8819..e68de4456 100644 ---- a/folly/portability/Builtins.h -+++ b/folly/portability/Builtins.h -@@ -41,7 +41,6 @@ FOLLY_ALWAYS_INLINE void __builtin___clear_cache(char* begin, char* end) { - } - } - --#if !defined(_MSC_VER) || (_MSC_VER < 1923) - FOLLY_ALWAYS_INLINE int __builtin_clz(unsigned int x) { - unsigned long index; - return int(_BitScanReverse(&index, (unsigned long)x) ? 31 - index : 32); -@@ -93,7 +92,6 @@ FOLLY_ALWAYS_INLINE int __builtin_ctzll(unsigned long long x) { - return int(_BitScanForward64(&index, x) ? index : 64); - } - #endif --#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) - - FOLLY_ALWAYS_INLINE int __builtin_ffs(int x) { - unsigned long index; -@@ -119,15 +117,12 @@ FOLLY_ALWAYS_INLINE int __builtin_popcount(unsigned int x) { - return int(__popcnt(x)); - } - --#if !defined(_MSC_VER) || (_MSC_VER < 1923) - FOLLY_ALWAYS_INLINE int __builtin_popcountl(unsigned long x) { - static_assert(sizeof(x) == 4, ""); - return int(__popcnt(x)); - } --#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) - #endif - --#if !defined(_MSC_VER) || (_MSC_VER < 1923) - #if defined(_M_IX86) - FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { - return int(__popcnt((unsigned int)(x >> 32))) + -@@ -138,7 +133,6 @@ FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { - return int(__popcnt64(x)); - } - #endif --#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) - - FOLLY_ALWAYS_INLINE void* __builtin_return_address(unsigned int frame) { - // I really hope frame is zero... --- - -diff --git a/folly/portability/Builtins.h b/folly/portability/Builtins.h -index e68de4456..30caf4003 100644 ---- a/folly/portability/Builtins.h -+++ b/folly/portability/Builtins.h -@@ -16,7 +16,7 @@ - - #pragma once - --#if defined(_WIN32) && !defined(__clang__) -+#if defined(_WIN32) && !defined(__MINGW32__) && !defined(__clang__) - #include - #include - #include --- -see https://github.com/facebook/folly/issues/1412 -diff --git a/folly/portability/Builtins.h b/folly/portability/Builtins.h -index 30caf4003..e8ef97266 100644 ---- a/folly/portability/Builtins.h -+++ b/folly/portability/Builtins.h -@@ -22,6 +22,14 @@ - #include - #include - -+// MSVC had added support for __builtin_clz etc. in 16.3 (1923) but it will be -+// removed in 16.8 (1928). -+#if (_MSC_VER >= 1923) && (_MSC_VER < 1928) -+#define FOLLY_DETAILFOLLY_DETAIL_MSC_BUILTIN_SUPPORT 1 -+#else -+#define FOLLY_DETAILFOLLY_DETAIL_MSC_BUILTIN_SUPPORT 0 -+#endif -+ - namespace folly { - namespace portability { - namespace detail { -@@ -41,6 +49,7 @@ FOLLY_ALWAYS_INLINE void __builtin___clear_cache(char* begin, char* end) { - } - } - -+#if !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) - FOLLY_ALWAYS_INLINE int __builtin_clz(unsigned int x) { - unsigned long index; - return int(_BitScanReverse(&index, (unsigned long)x) ? 31 - index : 32); -@@ -92,6 +101,7 @@ FOLLY_ALWAYS_INLINE int __builtin_ctzll(unsigned long long x) { - return int(_BitScanForward64(&index, x) ? index : 64); - } - #endif -+#endif // !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) - - FOLLY_ALWAYS_INLINE int __builtin_ffs(int x) { - unsigned long index; -@@ -117,12 +127,15 @@ FOLLY_ALWAYS_INLINE int __builtin_popcount(unsigned int x) { - return int(__popcnt(x)); - } - -+#if !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) - FOLLY_ALWAYS_INLINE int __builtin_popcountl(unsigned long x) { - static_assert(sizeof(x) == 4, ""); - return int(__popcnt(x)); - } -+#endif // !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) - #endif - -+#if !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) - #if defined(_M_IX86) - FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { - return int(__popcnt((unsigned int)(x >> 32))) + -@@ -133,6 +146,7 @@ FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { - return int(__popcnt64(x)); - } - #endif -+#endif // !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) - - FOLLY_ALWAYS_INLINE void* __builtin_return_address(unsigned int frame) { - // I really hope frame is zero... -@@ -141,3 +155,5 @@ FOLLY_ALWAYS_INLINE void* __builtin_return_address(unsigned int frame) { - return _ReturnAddress(); - } - #endif -+ -+#undef FOLLY_DETAIL_MSC_BUILTIN_SUPPORT --- - diff --git a/recipes/folly/all/patches/0008-find-packages.patch b/recipes/folly/all/patches/0008-find-packages.patch deleted file mode 100644 index 3329a68425e3b..0000000000000 --- a/recipes/folly/all/patches/0008-find-packages.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake -index 3169b972d52..23dc6d509b1 100644 ---- a/CMake/folly-deps.cmake -+++ b/CMake/folly-deps.cmake -@@ -46,11 +46,11 @@ find_package(Boost 1.51.0 MODULE - list(APPEND FOLLY_LINK_LIBRARIES ${Boost_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS}) - --find_package(DoubleConversion MODULE REQUIRED) -+find_package(double-conversion MODULE REQUIRED) - list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) - --find_package(Gflags MODULE) -+find_package(gflags MODULE) - set(FOLLY_HAVE_LIBGFLAGS ${LIBGFLAGS_FOUND}) - if(LIBGFLAGS_FOUND) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBGFLAGS_LIBRARY}) -@@ -59,12 +59,12 @@ if(LIBGFLAGS_FOUND) - list(APPEND CMAKE_REQUIRED_INCLUDES ${LIBGFLAGS_INCLUDE_DIR}) - endif() - --find_package(Glog MODULE) -+find_package(glog MODULE) - set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND}) - list(APPEND FOLLY_LINK_LIBRARIES ${GLOG_LIBRARY}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR}) - --find_package(LibEvent MODULE REQUIRED) -+find_package(Libevent MODULE REQUIRED) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBEVENT_LIB}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBEVENT_INCLUDE_DIR}) - -@@ -96,14 +96,14 @@ if (LIBLZMA_FOUND) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBLZMA_LIBRARIES}) - endif() - --find_package(LZ4 MODULE) -+find_package(lz4 MODULE) - set(FOLLY_HAVE_LIBLZ4 ${LZ4_FOUND}) - if (LZ4_FOUND) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LZ4_INCLUDE_DIR}) - list(APPEND FOLLY_LINK_LIBRARIES ${LZ4_LIBRARY}) - endif() - --find_package(Zstd MODULE) -+find_package(zstd MODULE) - set(FOLLY_HAVE_LIBZSTD ${ZSTD_FOUND}) - if(ZSTD_FOUND) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${ZSTD_INCLUDE_DIR}) -@@ -117,11 +117,11 @@ if (SNAPPY_FOUND) - list(APPEND FOLLY_LINK_LIBRARIES ${SNAPPY_LIBRARY}) - endif() - --find_package(LibDwarf) -+find_package(libdwarf) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBDWARF_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBDWARF_INCLUDE_DIRS}) - --find_package(Libiberty) -+find_package(libiberty) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBIBERTY_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBIBERTY_INCLUDE_DIRS}) - -@@ -133,7 +133,7 @@ find_package(LibUring) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBURING_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBURING_INCLUDE_DIRS}) - --find_package(Libsodium) -+find_package(libsodium) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBSODIUM_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBSODIUM_INCLUDE_DIRS}) - diff --git a/recipes/folly/all/patches/0009-ill-formed-atomic-copy.patch b/recipes/folly/all/patches/0009-ill-formed-atomic-copy.patch deleted file mode 100644 index 58f95224f3873..0000000000000 --- a/recipes/folly/all/patches/0009-ill-formed-atomic-copy.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/folly/fibers/SemaphoreBase.cpp b/folly/fibers/SemaphoreBase.cpp -index 06e9ecc7111..77e2da75c18 100644 ---- a/folly/fibers/SemaphoreBase.cpp -+++ b/folly/fibers/SemaphoreBase.cpp -@@ -170,7 +170,7 @@ namespace { - class FutureWaiter final : public fibers::Baton::Waiter { - public: - explicit FutureWaiter(int64_t tokens) -- : semaphoreWaiter(SemaphoreBase::Waiter(tokens)) { -+ : semaphoreWaiter(tokens) { - semaphoreWaiter.baton.setWaiter(*this); - } - diff --git a/recipes/folly/all/patches/0010-duplicate-hash.patch b/recipes/folly/all/patches/0010-duplicate-hash.patch deleted file mode 100644 index 69268c6acf6f6..0000000000000 --- a/recipes/folly/all/patches/0010-duplicate-hash.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/folly/hash/Hash.h b/folly/hash/Hash.h -index a8a50e8e8dc..d7a3da8e61f 100644 ---- a/folly/hash/Hash.h -+++ b/folly/hash/Hash.h -@@ -733,7 +733,7 @@ struct TupleHasher<0, Ts...> { - - // Custom hash functions. - namespace std { --#if FOLLY_SUPPLY_MISSING_INT128_TRAITS -+#if 0 - template <> - struct hash<__int128> : folly::detail::integral_hasher<__int128> {}; - diff --git a/recipes/folly/all/patches/0011-disable-logger-example.patch b/recipes/folly/all/patches/0011-disable-logger-example.patch deleted file mode 100644 index fa20905367fb1..0000000000000 --- a/recipes/folly/all/patches/0011-disable-logger-example.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/folly/CMakeLists.txt b/folly/CMakeLists.txt -index 08de7daf20f..cdc1f03bf46 100644 ---- a/folly/CMakeLists.txt -+++ b/folly/CMakeLists.txt -@@ -27,7 +27,6 @@ install( - ) - - add_subdirectory(experimental/exception_tracer) --add_subdirectory(logging/example) - - if (PYTHON_EXTENSIONS) - # Create tree of symbolic links in structure required for successful diff --git a/recipes/folly/all/patches/0012-compiler-flags.patch b/recipes/folly/all/patches/0012-compiler-flags.patch deleted file mode 100644 index 358500a1800cd..0000000000000 --- a/recipes/folly/all/patches/0012-compiler-flags.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/CMake/FollyCompilerUnix.cmake b/CMake/FollyCompilerUnix.cmake -index 8dcaf141a3a..200fe8d3798 100644 ---- a/CMake/FollyCompilerUnix.cmake -+++ b/CMake/FollyCompilerUnix.cmake -@@ -28,9 +28,9 @@ set( - ) - mark_as_advanced(CXX_STD) - --set(CMAKE_CXX_FLAGS_COMMON "-g -Wall -Wextra") -+set(CMAKE_CXX_FLAGS_COMMON "-Wall -Wextra") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_COMMON}") --set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON} -O3") -+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON}") - - # Note that CMAKE_REQUIRED_FLAGS must be a string, not a list - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=${CXX_STD}") -@@ -43,7 +43,6 @@ function(apply_folly_compile_options_to_target THETARGET) - ) - target_compile_options(${THETARGET} - PRIVATE -- -g - -std=${CXX_STD} - -finput-charset=UTF-8 - -fsigned-char diff --git a/recipes/folly/all/patches/0013-include-bit.patch b/recipes/folly/all/patches/0013-include-bit.patch deleted file mode 100644 index 1a8ac249a146b..0000000000000 --- a/recipes/folly/all/patches/0013-include-bit.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/folly/lang/Bits.h -+++ b/folly/lang/Bits.h -@@ -64,6 +64,10 @@ - #include - #include - -+#if __has_include() && __cpp_lib_bit_cast -+#include -+#endif -+ - namespace folly { - - #if __cpp_lib_bit_cast diff --git a/recipes/folly/all/patches/0014-find-librt.patch b/recipes/folly/all/patches/0014-find-librt.patch deleted file mode 100644 index 90a1f0f7b9ada..0000000000000 --- a/recipes/folly/all/patches/0014-find-librt.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/CMake/FollyConfigChecks.cmake b/CMake/FollyConfigChecks.cmake -index 6b8b308c7..908d72d51 100644 ---- a/CMake/FollyConfigChecks.cmake -+++ b/CMake/FollyConfigChecks.cmake -@@ -83,6 +83,13 @@ string(REGEX REPLACE - CMAKE_REQUIRED_FLAGS - "${CMAKE_REQUIRED_FLAGS}") - -+if (CMAKE_SYSTEM_NAME STREQUAL "Linux") -+ find_library(LIBRT rt) -+ if (LIBRT) -+ list(APPEND CMAKE_REQUIRED_LIBRARIES "rt") -+ endif() -+endif() -+ - check_symbol_exists(pthread_atfork pthread.h FOLLY_HAVE_PTHREAD_ATFORK) - - # Unfortunately check_symbol_exists() does not work for memrchr(): diff --git a/recipes/folly/all/patches/0015-benchmark-format-macros.patch b/recipes/folly/all/patches/0015-benchmark-format-macros.patch deleted file mode 100644 index 14f8b2088a1b3..0000000000000 --- a/recipes/folly/all/patches/0015-benchmark-format-macros.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/folly/Benchmark.cpp b/folly/Benchmark.cpp -index 389ee46a1..390b7674b 100644 ---- a/folly/Benchmark.cpp -+++ b/folly/Benchmark.cpp -@@ -16,6 +16,10 @@ - - // @author Andrei Alexandrescu (andrei.alexandrescu@fb.com) - -+#ifndef __STDC_FORMAT_MACROS -+#define __STDC_FORMAT_MACROS 1 -+#endif -+ - #include - - #include diff --git a/recipes/folly/all/patches/0016-find-packages.patch b/recipes/folly/all/patches/0016-find-packages.patch deleted file mode 100644 index c6cd14fad52c9..0000000000000 --- a/recipes/folly/all/patches/0016-find-packages.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake -index 9c9d9ea60..e78611542 100644 ---- a/CMake/folly-deps.cmake -+++ b/CMake/folly-deps.cmake -@@ -48,25 +48,25 @@ find_package(Boost 1.51.0 MODULE - list(APPEND FOLLY_LINK_LIBRARIES ${Boost_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS}) - --find_package(DoubleConversion MODULE REQUIRED) -+find_package(double-conversion MODULE REQUIRED) - list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) - --find_package(Gflags MODULE) --set(FOLLY_HAVE_LIBGFLAGS ${LIBGFLAGS_FOUND}) --if(LIBGFLAGS_FOUND) -- list(APPEND FOLLY_LINK_LIBRARIES ${LIBGFLAGS_LIBRARY}) -- list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBGFLAGS_INCLUDE_DIR}) -- set(FOLLY_LIBGFLAGS_LIBRARY ${LIBGFLAGS_LIBRARY}) -- set(FOLLY_LIBGFLAGS_INCLUDE ${LIBGFLAGS_INCLUDE_DIR}) -+find_package(gflags MODULE) -+set(FOLLY_HAVE_LIBGFLAGS ${gflags_FOUND}) -+if(gflags_FOUND) -+ list(APPEND FOLLY_LINK_LIBRARIES ${gflags_LIBRARIES}) -+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${gflags_INCLUDE_DIRS}) -+ set(FOLLY_LIBGFLAGS_LIBRARY ${gflags_LIBRARIES}) -+ set(FOLLY_LIBGFLAGS_INCLUDE ${gflags_INCLUDE_DIRS}) - endif() - --find_package(Glog MODULE) -+find_package(glog MODULE) - set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND}) - list(APPEND FOLLY_LINK_LIBRARIES ${GLOG_LIBRARY}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR}) - --find_package(LibEvent MODULE REQUIRED) -+find_package(Libevent MODULE REQUIRED) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBEVENT_LIB}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBEVENT_INCLUDE_DIR}) - -@@ -104,14 +104,14 @@ if (LIBLZMA_FOUND) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBLZMA_LIBRARIES}) - endif() - --find_package(LZ4 MODULE) -+find_package(lz4 MODULE) - set(FOLLY_HAVE_LIBLZ4 ${LZ4_FOUND}) - if (LZ4_FOUND) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LZ4_INCLUDE_DIR}) - list(APPEND FOLLY_LINK_LIBRARIES ${LZ4_LIBRARY}) - endif() - --find_package(Zstd MODULE) -+find_package(zstd MODULE) - set(FOLLY_HAVE_LIBZSTD ${ZSTD_FOUND}) - if(ZSTD_FOUND) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${ZSTD_INCLUDE_DIR}) -@@ -125,11 +125,11 @@ if (SNAPPY_FOUND) - list(APPEND FOLLY_LINK_LIBRARIES ${SNAPPY_LIBRARY}) - endif() - --find_package(LibDwarf) -+find_package(libdwarf) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBDWARF_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBDWARF_INCLUDE_DIRS}) - --find_package(Libiberty) -+find_package(libiberty) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBIBERTY_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBIBERTY_INCLUDE_DIRS}) - -@@ -141,7 +141,7 @@ find_package(LibUring) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBURING_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBURING_INCLUDE_DIRS}) - --find_package(Libsodium) -+find_package(libsodium) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBSODIUM_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBSODIUM_INCLUDE_DIRS}) - diff --git a/recipes/folly/all/patches/0017-compiler-flags.patch b/recipes/folly/all/patches/0017-compiler-flags.patch deleted file mode 100644 index 1290e801ba4ba..0000000000000 --- a/recipes/folly/all/patches/0017-compiler-flags.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/CMake/FollyCompilerUnix.cmake b/CMake/FollyCompilerUnix.cmake -index 8dcaf14..200fe8d 100644 ---- a/CMake/FollyCompilerUnix.cmake -+++ b/CMake/FollyCompilerUnix.cmake -@@ -28,9 +28,9 @@ set( - ) - mark_as_advanced(CXX_STD) - --set(CMAKE_CXX_FLAGS_COMMON "-g -Wall -Wextra") -+set(CMAKE_CXX_FLAGS_COMMON "-Wall -Wextra") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_COMMON}") --set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON} -O3") -+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON}") - - # Note that CMAKE_REQUIRED_FLAGS must be a string, not a list - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=${CXX_STD}") -@@ -43,7 +43,6 @@ function(apply_folly_compile_options_to_target THETARGET) - ) - target_compile_options(${THETARGET} - PRIVATE -- -g - -std=${CXX_STD} - -finput-charset=UTF-8 - -fsigned-char diff --git a/recipes/folly/all/patches/0018-find-glog.patch b/recipes/folly/all/patches/0018-find-glog.patch deleted file mode 100644 index b2d17ad455a7b..0000000000000 --- a/recipes/folly/all/patches/0018-find-glog.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/build/fbcode_builder/CMake/FindGlog.cmake b/build/fbcode_builder/CMake/FindGlog.cmake -index 752647c..aa2fa1c 100644 ---- a/build/fbcode_builder/CMake/FindGlog.cmake -+++ b/build/fbcode_builder/CMake/FindGlog.cmake -@@ -10,9 +10,9 @@ include(FindPackageHandleStandardArgs) - include(SelectLibraryConfigurations) - - find_library(GLOG_LIBRARY_RELEASE glog -- PATHS ${GLOG_LIBRARYDIR}) -+ PATHS ${CONAN_GLOG_ROOT}) - find_library(GLOG_LIBRARY_DEBUG glogd -- PATHS ${GLOG_LIBRARYDIR}) -+ PATHS ${CONAN_GLOG_ROOT}) - - find_path(GLOG_INCLUDE_DIR glog/logging.h - PATHS ${GLOG_INCLUDEDIR}) diff --git a/recipes/folly/all/patches/0019-exclude-example.patch b/recipes/folly/all/patches/0019-exclude-example.patch deleted file mode 100644 index d2afb310ff8a0..0000000000000 --- a/recipes/folly/all/patches/0019-exclude-example.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/folly/CMakeLists.txt b/folly/CMakeLists.txt -index 883f27c..2d2086f 100644 ---- a/folly/CMakeLists.txt -+++ b/folly/CMakeLists.txt -@@ -28,7 +28,6 @@ install( - ) - - add_subdirectory(experimental/exception_tracer) --add_subdirectory(logging/example) - - if (PYTHON_EXTENSIONS) - # Create tree of symbolic links in structure required for successful diff --git a/recipes/folly/all/patches/0020-include-ssizet.patch b/recipes/folly/all/patches/0020-include-ssizet.patch deleted file mode 100644 index 0575fecd13e84..0000000000000 --- a/recipes/folly/all/patches/0020-include-ssizet.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/folly/executors/ExecutorWithPriority.h b/folly/executors/ExecutorWithPriority.h -index b95a6c4..18b8110 100644 ---- a/folly/executors/ExecutorWithPriority.h -+++ b/folly/executors/ExecutorWithPriority.h -@@ -18,6 +18,7 @@ - - #include - #include -+#include - - namespace folly { - diff --git a/recipes/folly/all/patches/0021-typedef-clockid.patch b/recipes/folly/all/patches/0021-typedef-clockid.patch deleted file mode 100644 index fb46c057d58ce..0000000000000 --- a/recipes/folly/all/patches/0021-typedef-clockid.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/folly/portability/Time.h b/folly/portability/Time.h -index 994a09e5d70..e4f0d101ca9 100644 ---- a/folly/portability/Time.h -+++ b/folly/portability/Time.h -@@ -49,7 +49,6 @@ - #define CLOCK_PROCESS_CPUTIME_ID 2 - #define CLOCK_THREAD_CPUTIME_ID 3 - --typedef uint8_t clockid_t; - extern "C" int clock_gettime(clockid_t clk_id, struct timespec* ts); - extern "C" int clock_getres(clockid_t clk_id, struct timespec* ts); - #endif diff --git a/recipes/folly/all/patches/0022-fix-windows-minmax.patch b/recipes/folly/all/patches/0022-fix-windows-minmax.patch deleted file mode 100644 index 1fc69a43a83e5..0000000000000 --- a/recipes/folly/all/patches/0022-fix-windows-minmax.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMake/FollyCompilerMSVC.cmake b/CMake/FollyCompilerMSVC.cmake -index ec2ce1a1d..16deda71c 100644 ---- a/CMake/FollyCompilerMSVC.cmake -+++ b/CMake/FollyCompilerMSVC.cmake -@@ -289,6 +289,7 @@ function(apply_folly_compile_options_to_target THETARGET) - # And the extra defines: - target_compile_definitions(${THETARGET} - PUBLIC -+ NOMINMAX - _CRT_NONSTDC_NO_WARNINGS # Don't deprecate posix names of functions. - _CRT_SECURE_NO_WARNINGS # Don't deprecate the non _s versions of various standard library functions, because safety is for chumps. - _SCL_SECURE_NO_WARNINGS # Don't deprecate the non _s versions of various standard library functions, because safety is for chumps. diff --git a/recipes/folly/all/test_package/CMakeLists.txt b/recipes/folly/all/test_package/CMakeLists.txt index 6a9df4ea0b752..82796f7de6547 100644 --- a/recipes/folly/all/test_package/CMakeLists.txt +++ b/recipes/folly/all/test_package/CMakeLists.txt @@ -4,13 +4,5 @@ project(test_package CXX) find_package(folly REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} - Folly::folly - Folly::follybenchmark) - - -if (${FOLLY_VERSION} VERSION_LESS "2021.07.20.00") - set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) -else() - set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) -endif() +target_link_libraries(${PROJECT_NAME} PRIVATE Folly::folly) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/folly/all/test_package/conanfile.py b/recipes/folly/all/test_package/conanfile.py index 63889d5258fa5..7aa104bd186ed 100644 --- a/recipes/folly/all/test_package/conanfile.py +++ b/recipes/folly/all/test_package/conanfile.py @@ -1,21 +1,19 @@ import os from conan import ConanFile -from conan.tools.cmake import CMake, CMakeToolchain +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout -required_conan_version = ">=1.43.0" class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) def generate(self): tc = CMakeToolchain(self) - tc.variables["FOLLY_VERSION"] = self.dependencies["folly"].ref.version tc.generate() def layout(self): @@ -28,4 +26,4 @@ def build(self): def test(self): if can_run(self): - self.run(os.path.join(self.cpp.build.bindirs[0], "test_package"), env="conanrun") + self.run(os.path.join(self.cpp.build.bindir, "test_package"), env="conanrun") diff --git a/recipes/folly/all/test_package/test_package.cpp b/recipes/folly/all/test_package/test_package.cpp index cc522b8b0280d..247e44f76e0fd 100644 --- a/recipes/folly/all/test_package/test_package.cpp +++ b/recipes/folly/all/test_package/test_package.cpp @@ -1,29 +1,12 @@ #include #include -#include + #include -#include -#include -#include -#include -#if FOLLY_HAVE_ELF -#include -#endif +#include -static void print_uri(const folly::fbstring& value) { - const folly::Uri uri(value); - std::cout << "The authority from " << value << " is " << uri.authority() << std::endl; -} int main() { - folly::ThreadedExecutor executor; - folly::Promise promise; - folly::Future future = promise.getSemiFuture().via(&executor); - folly::Future unit = std::move(future).thenValue(print_uri); - promise.setValue("https://github.com/bincrafters"); - std::move(unit).get(); -#if FOLLY_HAVE_ELF - folly::symbolizer::ElfFile elffile; -#endif + folly::fbstring address{"127.0.0.1"}; + folly::IPAddress::validate(address); return EXIT_SUCCESS; } diff --git a/recipes/folly/all/test_v1_package/CMakeLists.txt b/recipes/folly/all/test_v1_package/CMakeLists.txt index f8cc697ab67d2..c2866c350e271 100644 --- a/recipes/folly/all/test_v1_package/CMakeLists.txt +++ b/recipes/folly/all/test_v1_package/CMakeLists.txt @@ -4,14 +4,5 @@ project(test_package CXX) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(folly CONFIG REQUIRED) - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} Folly::folly) - - -if (${FOLLY_VERSION} VERSION_LESS "2021.07.20.00") - set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) -else() - set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) -endif() +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/folly/all/test_v1_package/conanfile.py b/recipes/folly/all/test_v1_package/conanfile.py index 8b8cfae4c1882..49a3a66ea5bad 100644 --- a/recipes/folly/all/test_v1_package/conanfile.py +++ b/recipes/folly/all/test_v1_package/conanfile.py @@ -8,11 +8,10 @@ class TestPackageConan(ConanFile): def build(self): cmake = CMake(self) - cmake.definitions["FOLLY_VERSION"] = self.deps_cpp_info["folly"].version cmake.configure() cmake.build() def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - self.run(command=bin_path, run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/folly/all/test_v1_package/test_package.cpp b/recipes/folly/all/test_v1_package/test_package.cpp deleted file mode 100644 index cc522b8b0280d..0000000000000 --- a/recipes/folly/all/test_v1_package/test_package.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#if FOLLY_HAVE_ELF -#include -#endif - -static void print_uri(const folly::fbstring& value) { - const folly::Uri uri(value); - std::cout << "The authority from " << value << " is " << uri.authority() << std::endl; -} - -int main() { - folly::ThreadedExecutor executor; - folly::Promise promise; - folly::Future future = promise.getSemiFuture().via(&executor); - folly::Future unit = std::move(future).thenValue(print_uri); - promise.setValue("https://github.com/bincrafters"); - std::move(unit).get(); -#if FOLLY_HAVE_ELF - folly::symbolizer::ElfFile elffile; -#endif - return EXIT_SUCCESS; -} diff --git a/recipes/folly/config.yml b/recipes/folly/config.yml index 6a14a274c3fe9..e799fbeee0433 100644 --- a/recipes/folly/config.yml +++ b/recipes/folly/config.yml @@ -1,7 +1,3 @@ versions: - "2019.10.21.00": - folder: all - "2020.08.10.00": - folder: all - "2022.01.31.00": - folder: all + "2024.08.12.00": + folder: all diff --git a/recipes/foxglove-websocket/all/conandata.yml b/recipes/foxglove-websocket/all/conandata.yml index 697b11f6c928c..82e61d0221936 100644 --- a/recipes/foxglove-websocket/all/conandata.yml +++ b/recipes/foxglove-websocket/all/conandata.yml @@ -1,4 +1,7 @@ sources: + 1.3.0: + url: https://github.com/foxglove/ws-protocol/archive/refs/tags/releases/cpp/v1.3.0.tar.gz + sha256: 5c1d4cda60a89bf635ef0150e8cd2f4da569f92beb8ac8555795ed7fd47f2a21 1.2.0: url: https://github.com/foxglove/ws-protocol/archive/refs/tags/releases/cpp/v1.2.0.tar.gz sha256: 0471d3932500ed6acd87a99cd76e048366c82f2527c1631afcee4f8ab71c4ab7 diff --git a/recipes/foxglove-websocket/config.yml b/recipes/foxglove-websocket/config.yml index 6f923ecb4a132..6431a1556fee0 100644 --- a/recipes/foxglove-websocket/config.yml +++ b/recipes/foxglove-websocket/config.yml @@ -1,4 +1,6 @@ versions: + 1.3.0: + folder: all 1.2.0: folder: all 1.1.0: diff --git a/recipes/frozen/all/conandata.yml b/recipes/frozen/all/conandata.yml index 4d9b977925cb2..cf0083d308f87 100644 --- a/recipes/frozen/all/conandata.yml +++ b/recipes/frozen/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.0": + url: "https://github.com/serge-sans-paille/frozen/archive/1.2.0.tar.gz" + sha256: "ed8339c017d7c5fe019ac2c642477f435278f0dc643c1d69d3f3b1e95915e823" "1.1.1": url: "https://github.com/serge-sans-paille/frozen/archive/1.1.1.tar.gz" sha256: "f7c7075750e8fceeac081e9ef01944f221b36d9725beac8681cbd2838d26be45" diff --git a/recipes/frozen/config.yml b/recipes/frozen/config.yml index 9234b604d8ed1..188555eba6e58 100644 --- a/recipes/frozen/config.yml +++ b/recipes/frozen/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.0": + folder: all "1.1.1": folder: all "1.0.1": diff --git a/recipes/functionalplus/all/conandata.yml b/recipes/functionalplus/all/conandata.yml index 995124a2aca90..ce67a8c16c149 100644 --- a/recipes/functionalplus/all/conandata.yml +++ b/recipes/functionalplus/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.2.25": + url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.25.tar.gz" + sha256: "9b5e24bbc92f43b977dc83efbc173bcf07dbe07f8718fc2670093655b56fcee3" "0.2.24": url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.24.tar.gz" sha256: "446c63ac3f2045e7587f694501882a3d7c7b962b70bcc08deacf5777bdaaff8c" diff --git a/recipes/functionalplus/config.yml b/recipes/functionalplus/config.yml index 13685d2ebceaf..1aa00fc767fdd 100644 --- a/recipes/functionalplus/config.yml +++ b/recipes/functionalplus/config.yml @@ -1,4 +1,6 @@ versions: + "0.2.25": + folder: all "0.2.24": folder: all "0.2.23": diff --git a/recipes/gaia-ecs/all/conandata.yml b/recipes/gaia-ecs/all/conandata.yml new file mode 100644 index 0000000000000..0f7a267f7719c --- /dev/null +++ b/recipes/gaia-ecs/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.8.6": + url: "https://github.com/richardbiely/gaia-ecs/archive/refs/tags/v0.8.6.tar.gz" + sha256: "9CAC0AC6F2FB19DFFF07D097F5DC0A97FF1CA4AEC3405219CB2D2A03601AB03F" diff --git a/recipes/gaia-ecs/all/conanfile.py b/recipes/gaia-ecs/all/conanfile.py new file mode 100644 index 0000000000000..ad8069272b4bb --- /dev/null +++ b/recipes/gaia-ecs/all/conanfile.py @@ -0,0 +1,74 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.scm import Version +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.52.0" + + +class GaiaConan(ConanFile): + name = "gaia-ecs" + description = "A simple and powerful entity component system (ECS) written in C++17 " + topics = ("gamedev", "performance", "entity", "ecs") + homepage = "https://github.com/richardbiely/gaia-ecs" + url = "https://github.com/conan-io/conan-center-index" + license = "MIT" + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + + @property + def _min_cppstd(self): + return "17" + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "10", + "clang": "7.0", + "apple-clang": "10.0", + "intel-cc": "2021.2" + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + pass + + def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "*", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + + def package_info(self): + if self.settings.os in ["FreeBSD", "Linux"]: + self.cpp_info.system_libs = ["pthread"] + + self.cpp_info.set_property("cmake_file_name", "gaia") + self.cpp_info.set_property("cmake_target_name", "gaia::gaia") + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + # TODO: remove when v1 support drops + self.cpp_info.names["cmake_find_package"] = "gaia" + self.cpp_info.names["cmake_find_package_multi"] = "gaia" diff --git a/recipes/gaia-ecs/all/test_package/CMakeLists.txt b/recipes/gaia-ecs/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..d9ccb13290576 --- /dev/null +++ b/recipes/gaia-ecs/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(gaia REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE gaia::gaia) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/gaia-ecs/all/test_package/conanfile.py b/recipes/gaia-ecs/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/gaia-ecs/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/gaia-ecs/all/test_package/test_package.cpp b/recipes/gaia-ecs/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..105e808a6373e --- /dev/null +++ b/recipes/gaia-ecs/all/test_package/test_package.cpp @@ -0,0 +1,9 @@ +#include + +int main() +{ + gaia::ecs::World w; + gaia::ecs::Entity e = w.add(); + (void) w.valid(e); + return 0; +} diff --git a/recipes/gaia-ecs/config.yml b/recipes/gaia-ecs/config.yml new file mode 100644 index 0000000000000..5169c9c9c27e4 --- /dev/null +++ b/recipes/gaia-ecs/config.yml @@ -0,0 +1,3 @@ +versions: + "0.8.6": + folder: all diff --git a/recipes/gdk-pixbuf/all/conanfile.py b/recipes/gdk-pixbuf/all/conanfile.py index cbbd71f4d5295..edcf9d96b7ad2 100644 --- a/recipes/gdk-pixbuf/all/conanfile.py +++ b/recipes/gdk-pixbuf/all/conanfile.py @@ -63,17 +63,17 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("glib/2.78.1", transitive_headers=True, transitive_libs=True) + self.requires("glib/2.78.3", transitive_headers=True, transitive_libs=True) if self.options.with_libpng: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.options.with_libtiff: self.requires("libtiff/4.6.0") if self.options.with_libjpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.1") + self.requires("libjpeg-turbo/3.0.2") elif self.options.with_libjpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_libjpeg == "mozjpeg": - self.requires("mozjpeg/4.1.3") + self.requires("mozjpeg/4.1.5") def validate(self): if self.options.shared and not self.dependencies["glib"].options.shared: @@ -86,12 +86,12 @@ def validate(self): ) def build_requirements(self): - self.tool_requires("meson/1.2.3") + self.tool_requires("meson/[>=1.2.3 <2]") # FIXME: unify libgettext and gettext?? # INFO: gettext provides msgfmt, which is required to build the .mo files - self.tool_requires("gettext/0.21") + self.tool_requires("gettext/0.22.5") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/[>=2.2 <3]") self.tool_requires("glib/") if self.options.with_introspection: self.tool_requires("gobject-introspection/1.72.0") @@ -123,8 +123,6 @@ def generate(self): "man": "false", "installed_tests": "false" }) - if Version(self.version) < "2.42.0": - tc.project_options["gir"] = "false" if Version(self.version) >= "2.42.8": tc.project_options.update({ diff --git a/recipes/geographiclib/all/conandata.yml b/recipes/geographiclib/all/conandata.yml index 1f35984a98249..6f7b35b699b25 100644 --- a/recipes/geographiclib/all/conandata.yml +++ b/recipes/geographiclib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.4": + url: "https://github.com/geographiclib/geographiclib/archive/refs/tags/v2.4.tar.gz" + sha256: "aa7edc6d86fcc297be6e6d6d53ddb6e622a46ef36fe9317335cac91bf471b5a9" "2.3": url: "https://github.com/geographiclib/geographiclib/archive/refs/tags/v2.3.tar.gz" sha256: "18131077061ef8be14064f073f6dba2897a138519733803af807f861a01976c1" diff --git a/recipes/geographiclib/all/conanfile.py b/recipes/geographiclib/all/conanfile.py index 9f1c405b1f7f1..62fa23933a44e 100644 --- a/recipes/geographiclib/all/conanfile.py +++ b/recipes/geographiclib/all/conanfile.py @@ -2,6 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv from conan.tools.files import ( apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir, collect_libs @@ -35,6 +36,35 @@ class GeographiclibConan(ConanFile): "tools": True, } + @property + def _min_cppstd(self): + if Version(self.version) >= "2.4": + return 14 + if Version(self.version) >= "1.51": + return 11 + return None + + @property + def _compilers_minimum_version(self): + if self._min_cppstd == 11: + # Minimum compiler version having C++11 math functions + return { + "apple-clang": "3.3", + "gcc": "4.9", + "clang": "6", + "Visual Studio": "14", # guess + "msvc": "190", + } + elif self._min_cppstd == 14: + return { + "gcc": "7", + "clang": "6", + "Visual Studio": "16", + "msvc": "192", + "apple-clang": "14", + } + return {} + def export_sources(self): export_conandata_patches(self) @@ -49,36 +79,28 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") - @property - def _compilers_minimum_version(self): - # Minimum compiler version having C++11 math functions - return { - "apple-clang": "3.3", - "gcc": "4.9", - "clang": "6", - "Visual Studio": "14", # guess - "msvc": "190", - } - def validate(self): - if Version(self.version) >= "1.51": - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) + if self.settings.compiler.get_safe("cppstd") and self._min_cppstd: + check_min_cppstd(self, self._min_cppstd) - def loose_lt_semver(v1, v2): - return all(int(p1) < int(p2) for p1, p2 in zip(str(v1).split("."), str(v2).split("."))) + def loose_lt_semver(v1, v2): + return all(int(p1) < int(p2) for p1, p2 in zip(str(v1).split("."), str(v2).split("."))) - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and loose_lt_semver(str(self.settings.compiler.version), minimum_version): - raise ConanInvalidConfiguration( - f"{self.ref} requires C++11 math functions, which your compiler does not support." - ) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and loose_lt_semver(str(self.settings.compiler.version), minimum_version): + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) if self.options.precision not in ["float", "double"]: # FIXME: add support for extended, quadruple and variable precisions # (may require external libs: boost multiprecision for quadruple, mpfr for variable) raise ConanInvalidConfiguration("extended, quadruple and variable precisions not yet supported in this recipe") + def build_requirements(self): + if Version(self.version) >= "2.4": + self.tool_requires("cmake/[>=3.16 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -98,6 +120,8 @@ def generate(self): tc.variables["GEOGRAPHICLIB_PRECISION"] = self._cmake_option_precision tc.generate() + VirtualBuildEnv(self).generate() + def _patch_sources(self): apply_conandata_patches(self) cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") diff --git a/recipes/geographiclib/config.yml b/recipes/geographiclib/config.yml index 23b0bc998f804..2557b05844a79 100644 --- a/recipes/geographiclib/config.yml +++ b/recipes/geographiclib/config.yml @@ -1,4 +1,6 @@ versions: + "2.4": + folder: all "2.3": folder: all "1.52": diff --git a/recipes/geos/all/conandata.yml b/recipes/geos/all/conandata.yml index cce81a5d0af84..32c3f79cfd503 100644 --- a/recipes/geos/all/conandata.yml +++ b/recipes/geos/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.12.2": + url: "https://github.com/libgeos/geos/releases/download/3.12.2/geos-3.12.2.tar.bz2" + sha256: "34c7770bf0090ee88488af98767d08e779f124fa33437e0aabec8abd4609fec6" "3.12.0": url: "https://github.com/libgeos/geos/releases/download/3.12.0/geos-3.12.0.tar.bz2" sha256: "d96db96011259178a35555a0f6d6e75a739e52a495a6b2aa5efb3d75390fbc39" @@ -17,9 +20,3 @@ sources: "3.10.2": url: "https://download.osgeo.org/geos/geos-3.10.2.tar.bz2" sha256: "50bbc599ac386b4c2b3962dcc411f0040a61f204aaef4eba7225ecdd0cf45715" -patches: - "3.12.0": - - patch_file: "patches/3.12.0-0001-fix-cmake.patch" - patch_description: "Fix CMake on Windows with Visual Studio" - patch_type: "official" - patch_source: "https://github.com/libgeos/geos/pull/945" diff --git a/recipes/geos/all/conanfile.py b/recipes/geos/all/conanfile.py index 5bfc63783c7e5..ebf8ae42c76d7 100644 --- a/recipes/geos/all/conanfile.py +++ b/recipes/geos/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd, stdcpp_library from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, rmdir, export_conandata_patches, apply_conandata_patches +from conan.tools.files import copy, get, rmdir, replace_in_file from conan.tools.scm import Version import os @@ -11,10 +11,10 @@ class GeosConan(ConanFile): name = "geos" - description = "C++11 library for performing operations on two-dimensional vector geometries" + description = "GEOS is a C++ library for performing operations on two-dimensional vector geometries." license = "LGPL-2.1" topics = ("osgeo", "geometry", "topology", "geospatial") - homepage = "https://trac.osgeo.org/geos" + homepage = "https://libgeos.org/" url = "https://github.com/conan-io/conan-center-index" package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -51,9 +51,6 @@ def _compilers_minimum_version(self): def _has_inline_option(self): return Version(self.version) < "3.11.0" - def export_sources(self): - export_conandata_patches(self) - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -96,8 +93,15 @@ def generate(self): tc.variables["BUILD_GEOSOP"] = self.options.utils tc.generate() + def _patch_sources(self): + # Avoid setting CMAKE_BUILD_TYPE default when multi-config generators are used. + # https://github.com/libgeos/geos/pull/945 + if Version(self.version) <= "3.12.1": + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_BUILD_TYPE ${DEFAULT_BUILD_TYPE})", "") + def build(self): - apply_conandata_patches(self) + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/geos/all/patches/3.12.0-0001-fix-cmake.patch b/recipes/geos/all/patches/3.12.0-0001-fix-cmake.patch deleted file mode 100644 index d0abdd50a8211..0000000000000 --- a/recipes/geos/all/patches/3.12.0-0001-fix-cmake.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7a2906c..cdab138 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -114,8 +114,12 @@ endif() - - # Make sure we know our build type - if(NOT CMAKE_BUILD_TYPE) -- set(CMAKE_BUILD_TYPE ${DEFAULT_BUILD_TYPE}) -- message(STATUS "GEOS: Using default build type: ${CMAKE_BUILD_TYPE}") -+ get_property(_is_multi_config_generator GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) -+ if (NOT _is_multi_config_generator) -+ set(CMAKE_BUILD_TYPE ${DEFAULT_BUILD_TYPE}) -+ message(STATUS "GEOS: Using default build type: ${CMAKE_BUILD_TYPE}") -+ endif() -+ unset(_is_multi_config_generator) - else() - message(STATUS "GEOS: Build type: ${CMAKE_BUILD_TYPE}") - endif() -@@ -186,6 +190,11 @@ set(CMAKE_CXX_FLAGS_ASAN "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address -fno-omit- - set(CMAKE_EXE_LINKER_FLAGS_ASAN "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fsanitize=address") - set(CMAKE_SHARED_LINKER_FLAGS_ASAN "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -fsanitize=address") - -+get_property(_cmake_build_type_is_cache CACHE CMAKE_BUILD_TYPE PROPERTY TYPE) -+if (_cmake_build_type_is_cache) -+ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "ASAN") -+endif() -+unset(_cmake_build_type_is_cache) - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "ASAN") - - #----------------------------------------------------------------------------- diff --git a/recipes/geos/config.yml b/recipes/geos/config.yml index bbc8ab7daf85c..8d3308284cb94 100644 --- a/recipes/geos/config.yml +++ b/recipes/geos/config.yml @@ -1,4 +1,6 @@ versions: + "3.12.2": + folder: all "3.12.0": folder: all "3.11.2": diff --git a/recipes/getdns/all/CMakeLists.txt b/recipes/getdns/all/CMakeLists.txt deleted file mode 100644 index f96c6dd4ed727..0000000000000 --- a/recipes/getdns/all/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -if(WIN32) - set(CMAKE_REQUIRED_LIBRARIES ws2_32) -endif() - -add_subdirectory(source_subfolder) diff --git a/recipes/getdns/all/conan_deps.cmake b/recipes/getdns/all/conan_deps.cmake new file mode 100644 index 0000000000000..0925ccf84a265 --- /dev/null +++ b/recipes/getdns/all/conan_deps.cmake @@ -0,0 +1,29 @@ +cmake_minimum_required(VERSION 3.15) +project(cmake_wrapper) + +# Wrapper for find_package() that sets variables in the format expected by the project +macro(custom_find_package name) + find_package(${name} REQUIRED CONFIG + # Allow only Conan packages + NO_DEFAULT_PATH + PATHS ${CMAKE_PREFIX_PATH} + ) + string(TOUPPER ${name} name_upper) + set(${name_upper}_FOUND TRUE) + set(${name_upper}_INCLUDE_DIR ${${name}_INCLUDE_DIR}) + set(${name_upper}_LIBRARIES ${${name}_LIBRARIES}) +endmacro() + +custom_find_package(OpenSSL) +if(BUILD_LIBEV) + custom_find_package(Libev) +endif() +if(BUILD_LIBEVENT2) + custom_find_package(Libevent2) +endif() +if(BUILD_LIBUV) + custom_find_package(Libuv) +endif() +if(USE_LIBIDN2) + custom_find_package(Libidn2) +endif() diff --git a/recipes/getdns/all/conandata.yml b/recipes/getdns/all/conandata.yml index 63656d1d51254..a97e641f541f4 100644 --- a/recipes/getdns/all/conandata.yml +++ b/recipes/getdns/all/conandata.yml @@ -1,14 +1,11 @@ sources: - "1.6.0": - url: "https://getdnsapi.net/dist/getdns-1.6.0.tar.gz" - sha256: "40e5737471a3902ba8304b0fd63aa7c95802f66ebbc6eae53c487c8e8a380f4a" + "1.7.3": + url: "https://getdnsapi.net/dist/getdns-1.7.3.tar.gz" + sha256: "f1404ca250f02e37a118aa00cf0ec2cbe11896e060c6d369c6761baea7d55a2c" patches: - "1.6.0": - - patch_file: "patches/1.6.0-0001-install-runtimes.patch" - base_path: "source_subfolder" + "1.7.3": - patch_file: "patches/1.6.0-0002-fix-exports-extension-libraries.patch" - base_path: "source_subfolder" - - patch_file: "patches/1.6.0-0003-let-find-modules-use-pkgconfig.patch" - base_path: "source_subfolder" - - patch_file: "patches/1.6.0-0004-dont-install-symlinked-license.patch" - base_path: "source_subfolder" + - patch_file: "patches/1.7.3-fix-windows-build.patch" + patch_description: "Fix Windows build" + patch_source: "https://github.com/getdnsapi/getdns/pull/538" + patch_type: "portability" diff --git a/recipes/getdns/all/conanfile.py b/recipes/getdns/all/conanfile.py index a1d7aed1728a6..33e5e1ab9e6c1 100644 --- a/recipes/getdns/all/conanfile.py +++ b/recipes/getdns/all/conanfile.py @@ -1,24 +1,28 @@ -from conans import CMake, ConanFile, tools -from conans.errors import ConanInvalidConfiguration -import glob import os +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, rm +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.53.0" + class GetDnsConan(ConanFile): name = "getdns" description = "A modern asynchronous DNS API" - topics = "conan", "getdns", "asynchronous", "event" license = "BSD-3-Clause" - homepage = "https://getdnsapi.net/" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://getdnsapi.net/" + topics = ("dns", "asynchronous", "event") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" - exports_sources = "CMakeLists.txt", "patches/**" options = { "shared": [True, False], "fPIC": [True, False], - "tls": [False, "gnutls"], - "stub_only": ["auto", True, False], - "with_libev": ["auto", True, False], + "with_libev": [True, False], "with_libevent": [True, False], "with_libuv": [True, False], "with_libidn2": [True, False], @@ -26,36 +30,15 @@ class GetDnsConan(ConanFile): default_options = { "shared": False, "fPIC": True, - "stub_only": "auto", - "tls": False, - "with_libev": "auto", + "with_libev": True, "with_libevent": True, "with_libuv": True, - "with_libidn2": True, + "with_libidn2": True } - generators = "cmake", "pkg_config", "cmake_find_package" - - _cmake = None - - @property - def _with_libev(self): - if self.options.with_libev == "auto": - return self.settings.os != "Windows" - else: - return self.options.with_libev - - @property - def _stub_only(self): - if self.options.stub_only == "auto": - # FIXME: uncomment the next line when libunbound is available - # return self.settings.os == "Windows" - return True - else: - return self.options.stub_only - - @property - def _source_subfolder(self): - return "source_subfolder" + + def export_sources(self): + export_conandata_patches(self) + copy(self, "conan_deps.cmake", src=self.recipe_folder, dst=os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": @@ -63,108 +46,119 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("openssl/1.1.1j") - if self._with_libev: + self.requires("openssl/[>=1.1 <4]") + if self.options.with_libev: self.requires("libev/4.33") if self.options.with_libevent: self.requires("libevent/2.1.12") if self.options.with_libuv: - self.requires("libuv/1.41.0") + self.requires("libuv/1.48.0") if self.options.with_libidn2: self.requires("libidn2/2.3.0") - if self.options.tls == "gnutls": - self.requires("nettle/3.6") - # FIXME: missing gnutls recipe - raise ConanInvalidConfiguration("gnutls is not (yet) available on cci") - if not self._stub_only: - # FIXME: missing libunbound recipe - raise ConanInvalidConfiguration("libunbound is not (yet) available on cci") def build_requirements(self): - self.build_requires("pkgconf/1.7.3") + self.tool_requires("cmake/[>=3.20 <4]") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - os.rename("getdns-{}".format(self.version), self._source_subfolder) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["OPENSSL_USE_STATIC_LIBS"] = not self.options["openssl"].shared - self._cmake.definitions["ENABLE_SHARED"] = self.options.shared - self._cmake.definitions["ENABLE_STATIC"] = not self.options.shared - self._cmake.definitions["ENABLE_STUB_ONLY"] = self._stub_only - self._cmake.definitions["BUILD_LIBEV"] = self._with_libev - self._cmake.definitions["BUILD_LIBEVENT2"] = self.options.with_libevent - self._cmake.definitions["BUILD_LIBUV"] = self.options.with_libuv - self._cmake.definitions["USE_LIBIDN2"] = self.options.with_libidn2 - self._cmake.definitions["USE_GNUTLS"] = self.options.tls == "gnutls" - self._cmake.definitions["BUILD_TESTING"] = False - - self._cmake.configure() - return self._cmake + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + VirtualBuildEnv(self).generate() + + tc = CMakeToolchain(self) + tc.variables["CMAKE_PROJECT_getdns_INCLUDE"] = "conan_deps.cmake" + tc.variables["OPENSSL_USE_STATIC_LIBS"] = not self.dependencies["openssl"].options.shared + tc.variables["ENABLE_SHARED"] = self.options.shared + tc.variables["ENABLE_STATIC"] = not self.options.shared + # INFO: Disabling stub-only requires libunbound + tc.variables["ENABLE_STUB_ONLY"] = True + tc.variables["BUILD_LIBEV"] = self.options.with_libev + tc.variables["BUILD_LIBEVENT2"] = self.options.with_libevent + tc.variables["BUILD_LIBUV"] = self.options.with_libuv + tc.variables["USE_LIBIDN2"] = self.options.with_libidn2 + # INFO: GnuTLS requires libdane support and is not supported by MSVC + tc.variables["USE_GNUTLS"] = False + # Force use of internal strptime when cross-compiling + tc.variables["FORCE_COMPAT_STRPTIME"] = True + tc.variables["BUILD_TESTING"] = False + # To fix OpenSSL try_compile() checks + # https://github.com/conan-io/conan/issues/12180 + tc.variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = str(self.settings.build_type) + if self.settings.compiler in ["clang", "apple-clang"]: + # INFO: https://github.com/getdnsapi/getdns/issues/544 + # TODO: Change to extra_clfags when CCI only uses Conan 2.x + tc.blocks["cmake_flags_init"].template += '\nstring(APPEND CMAKE_C_FLAGS_INIT " -Wno-incompatible-function-pointer-types")' + if self.options.with_libidn2 and is_msvc(self): + # INFO: getdns_static.lib(convert.c.obj): error LNK2019: unresolved external symbol __imp_idn2_lookup_u8 + tc.preprocessor_definitions.update({it: 1 for it in self.dependencies["libidn2"].cpp_info.defines}) + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("libev", "cmake_file_name", "Libev") + deps.set_property("libev", "cmake_target_name", "Libev::Libev") + deps.set_property("libevent", "cmake_file_name", "Libevent2") + deps.set_property("libevent::core", "cmake_target_name", "Libevent2::Libevent_core") + deps.set_property("libidn2", "cmake_file_name", "Libidn2") + deps.set_property("libidn2", "cmake_target_name", "Libidn2::Libidn2") + deps.set_property("libuv", "cmake_file_name", "Libuv") + deps.set_property("libuv", "cmake_target_name", "Libuv::Libuv") + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + rm(self, "Find*.cmake", os.path.join(self.source_folder, "cmake", "modules")) def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - # Use FindOpenSSL.cmake to let check_function_exists succeed - # Remove other cmake modules as they use FindPkgConfig - for fn in glob.glob("Find*cmake"): - if "OpenSSL" not in fn: - os.unlink(fn) - cmake = self._configure_cmake() + self._patch_sources() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("COPYING", src=self._source_subfolder, dst="licenses") - cmake = self._configure_cmake() + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.rmdir(os.path.join(self.package_folder, "share")) - - def package_id(self): - self.info.options.stub_only = self._stub_only - self.info.options.with_libev = self._with_libev + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): libsuffix = "" - if self.settings.compiler == "Visual Studio" and not self.options.shared: + if is_msvc(self) and not self.options.shared: libsuffix = "_static" - self.cpp_info.components["libgetdns"].libs = ["getdns" + libsuffix] self.cpp_info.components["libgetdns"].includedirs.append(os.path.join("include", "getdns")) - self.cpp_info.components["libgetdns"].names["pkg_config"]= "getdns" + self.cpp_info.components["libgetdns"].set_property("pkg_config_name", "getdns") self.cpp_info.components["libgetdns"].requires = ["openssl::openssl"] if self.options.with_libidn2: self.cpp_info.components["libgetdns"].requires.append("libidn2::libidn2") - if self.options.with_libidn2: - self.cpp_info.components["libgetdns"].requires.append("libidn2::libidn2") - if self.options.tls == "gnutls": - self.cpp_info.components["libgetdns"].requires.extend(["nettle::nettle", "gnutls::gnutls"]) + if self.settings.os == "Windows": + self.cpp_info.components["libgetdns"].system_libs.extend(["ws2_32", "crypt32", "gdi32", "iphlpapi", "psapi", "userenv"]) if self.options.with_libevent: - self.cpp_info.components["dns_ex_event"].libs = ["getdns_ex_event" + libsuffix] - self.cpp_info.components["dns_ex_event"].requires= ["libgetdns", "libevent::libevent"] - self.cpp_info.components["dns_ex_event"].names["pkg_config"]= "getdns_ext_event" + self.cpp_info.components["dns_ext_event"].libs = ["getdns_ext_event" + libsuffix] + self.cpp_info.components["dns_ext_event"].requires = ["libgetdns", "libevent::libevent"] + self.cpp_info.components["dns_ext_event"].set_property("pkg_config_name", "getdns_ext_event") - if self._with_libev: - self.cpp_info.components["dns_ex_ev"].libs = ["getdns_ex_ev" + libsuffix] - self.cpp_info.components["dns_ex_ev"].requires = ["libgetdns", "libev::libev"] - self.cpp_info.components["dns_ex_ev"].names["pkg_config"]= "getdns_ext_ev" + if self.options.with_libev: + self.cpp_info.components["dns_ext_ev"].libs = ["getdns_ext_ev" + libsuffix] + self.cpp_info.components["dns_ext_ev"].requires = ["libgetdns", "libev::libev"] + self.cpp_info.components["dns_ext_ev"].set_property("pkg_config_name", "getdns_ext_ev") if self.options.with_libuv: - self.cpp_info.components["dns_ex_uv"].libs = ["getdns_ex_uv" + libsuffix] - self.cpp_info.components["dns_ex_uv"].requires = ["libgetdns", "libuv::libuv"] - self.cpp_info.components["dns_ex_uv"].names["pkg_config"]= "getdns_ext_uv" + self.cpp_info.components["dns_ext_uv"].libs = ["getdns_ext_uv" + libsuffix] + self.cpp_info.components["dns_ext_uv"].requires = ["libgetdns", "libuv::libuv"] + self.cpp_info.components["dns_ext_uv"].set_property("pkg_config_name", "getdns_ext_uv") + # TODO: Remove after dropping support for Conan 1.x in ConanCenterIndex bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) self.env_info.PATH.append(bin_path) diff --git a/recipes/getdns/all/patches/1.6.0-0001-install-runtimes.patch b/recipes/getdns/all/patches/1.6.0-0001-install-runtimes.patch deleted file mode 100644 index de23061cc40af..0000000000000 --- a/recipes/getdns/all/patches/1.6.0-0001-install-runtimes.patch +++ /dev/null @@ -1,33 +0,0 @@ -Based on https://github.com/getdnsapi/getdns/pull/477 - ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -1055,22 +1055,22 @@ - endif () - endif () - if (ENABLE_SHARED) -- install(TARGETS getdns_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -+ install(TARGETS getdns_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - if (USE_LIBEV) -- install(TARGETS getdns_ex_ev_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -+ install(TARGETS getdns_ex_ev_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif () - if (USE_LIBEVENT2) -- install(TARGETS getdns_ex_event_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -+ install(TARGETS getdns_ex_event_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif () - if (USE_LIBUV) -- install(TARGETS getdns_ex_uv_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -+ install(TARGETS getdns_ex_uv_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif () - endif () - if (BUILD_GETDNS_QUERY) -- install(TARGETS getdns_query RUNTIME DESTINATION bin) -+ install(TARGETS getdns_query RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif () - if (BUILD_GETDNS_SERVER_MON) -- install(TARGETS getdns_server_mon RUNTIME DESTINATION bin) -+ install(TARGETS getdns_server_mon RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif () - - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/getdns DESTINATION include) diff --git a/recipes/getdns/all/patches/1.6.0-0003-let-find-modules-use-pkgconfig.patch b/recipes/getdns/all/patches/1.6.0-0003-let-find-modules-use-pkgconfig.patch deleted file mode 100644 index 9e446cae01b2a..0000000000000 --- a/recipes/getdns/all/patches/1.6.0-0003-let-find-modules-use-pkgconfig.patch +++ /dev/null @@ -1,641 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -659,9 +659,9 @@ - target_include_directories(getdns_objects PRIVATE src/ssl_dane) - set(USE_DANESSL 1) - endif () --if (Libidn_FOUND) -- target_include_directories(getdns_objects PRIVATE ${LIBIDN_INCLUDE_DIR}) --endif () -+#if (Libidn_FOUND) -+# target_include_directories(getdns_objects PRIVATE ${LIBIDN_INCLUDE_DIR}) -+#endif () - if (Libidn2_FOUND) - target_include_directories(getdns_objects PRIVATE ${LIBIDN2_INCLUDE_DIR}) - endif () -@@ -695,9 +695,9 @@ - if (Libunbound_FOUND) - target_link_libraries(getdns PUBLIC Libunbound::Libunbound) - endif () -- if (Libidn_FOUND) -- target_link_libraries(getdns PUBLIC Libidn::Libidn) -- endif () -+# if (Libidn_FOUND) -+# target_link_libraries(getdns PUBLIC Libidn::Libidn) -+# endif () - if (Libidn2_FOUND) - target_link_libraries(getdns PUBLIC Libidn2::Libidn2) - endif () ---- cmake/modules/FindGnuTLS.cmake -+++ cmake/modules/FindGnuTLS.cmake -@@ -30,51 +30,65 @@ - - #]=======================================================================] - --find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h -- HINTS -- "${GNUTLS_DIR}" -- "${GNUTLS_DIR}/include" --) -- --find_library(GNUTLS_LIBRARY NAMES gnutls libgnutls -- HINTS -- "${GNUTLS_DIR}" -- "${GNUTLS_DIR}/lib" --) -- --find_library(GNUTLS_DANE_LIBRARY NAMES gnutls-dane libgnutls-dane -- HINTS -- "${GNUTLS_DIR}" -- "${GNUTLS_DIR}/lib" --) -- --set(GNUTLS_LIBRARIES "") -- --if (GNUTLS_INCLUDE_DIR AND GNUTLS_LIBRARY AND GNUTLS_DANE_LIBRARY) -- if (NOT TARGET GnuTLS::GnuTLS) -- add_library(GnuTLS::GnuTLS UNKNOWN IMPORTED) -- set_target_properties(GnuTLS::GnuTLS PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${GNUTLS_LIBRARY}" -- ) -- endif () -- if (NOT TARGET GnuTLS::Dane) -- add_library(GnuTLS::Dane UNKNOWN IMPORTED) -- set_target_properties(GnuTLS::Dane PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${GNUTLS_DANE_LIBRARY}" -- ) -- endif () -- -- if (NOT GNUTLS_VERSION AND GNUTLS_INCLUDE_DIR) -- file(STRINGS "${GNUTLS_INCLUDE_DIR}/gnutls/gnutls.h" GNUTLS_VER_H REGEX "^#define GNUTLS_VERSION_(MAJOR|MINOR|PATCH) ") -- string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*_PATCH ([0-9]+).*$" "\\1.\\2.\\3c" GNUTLS_VERSION "${GNUTLS_VER_H}") -- endif () -+include(FindPkgConfig) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PkgGnuTLS IMPORTED_TARGET GLOBAL QUIET gnutls) -+ pkg_check_modules(PkgGnuTLSDane IMPORTED_TARGET GLOBAL QUIET gnutls-dane) - endif() - --list(APPEND GNUTLS_LIBRARIES "${GNUTLS_LIBRARY}" "${GNUTLS_DANE_LIBRARY}") -+if(PkgGnuTLS_FOUND AND PkgGnuTLSDane_FOUND) -+ set(GNUTLS_INCLUDE_DIR ${PkgGnuTLS_INCLUDE_DIRS} $PkgGnuTLSDane_INCLUDE_DIRS}) -+ set(NETTLE_LIBRARIES ${PkgGnuTLS_LIBRARIES} ${PkgGnuTLSDane_LIBRARIES}) -+ set(NETTLE_VERSION ${PkgGnuTLS_VERSION}) -+ add_library(GnuTLS::GnuTLS ALIAS PkgConfig::PkgGnuTLS) -+ add_library(GnuTLS::Dane ALIAS PkgConfig::PkgGnuTLSDane) -+else() -+ find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h -+ HINTS -+ "${GNUTLS_DIR}" -+ "${GNUTLS_DIR}/include" -+ ) -+ -+ find_library(GNUTLS_LIBRARY NAMES gnutls libgnutls -+ HINTS -+ "${GNUTLS_DIR}" -+ "${GNUTLS_DIR}/lib" -+ ) -+ -+ find_library(GNUTLS_DANE_LIBRARY NAMES gnutls-dane libgnutls-dane -+ HINTS -+ "${GNUTLS_DIR}" -+ "${GNUTLS_DIR}/lib" -+ ) -+ -+ set(GNUTLS_LIBRARIES "") -+ -+ if (GNUTLS_INCLUDE_DIR AND GNUTLS_LIBRARY AND GNUTLS_DANE_LIBRARY) -+ if (NOT TARGET GnuTLS::GnuTLS) -+ add_library(GnuTLS::GnuTLS UNKNOWN IMPORTED) -+ set_target_properties(GnuTLS::GnuTLS PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${GNUTLS_LIBRARY}" -+ ) -+ endif () -+ if (NOT TARGET GnuTLS::Dane) -+ add_library(GnuTLS::Dane UNKNOWN IMPORTED) -+ set_target_properties(GnuTLS::Dane PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${GNUTLS_DANE_LIBRARY}" -+ ) -+ endif () -+ -+ if (NOT GNUTLS_VERSION AND GNUTLS_INCLUDE_DIR) -+ file(STRINGS "${GNUTLS_INCLUDE_DIR}/gnutls/gnutls.h" GNUTLS_VER_H REGEX "^#define GNUTLS_VERSION_(MAJOR|MINOR|PATCH) ") -+ string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*_PATCH ([0-9]+).*$" "\\1.\\2.\\3c" GNUTLS_VERSION "${GNUTLS_VER_H}") -+ endif () -+ endif() -+ -+ list(APPEND GNUTLS_LIBRARIES "${GNUTLS_LIBRARY}" "${GNUTLS_DANE_LIBRARY}") -+endif() - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(GnuTLS ---- cmake/modules/FindLibevent2.cmake -+++ cmake/modules/FindLibevent2.cmake -@@ -28,37 +28,49 @@ - - #]=======================================================================] - --find_path(LIBEVENT2_INCLUDE_DIR event2/event.h -- HINTS -- "${LIBEVENT2_DIR}" -- "${LIBEVENT2_DIR}/include" --) -- --find_library(LIBEVENT2_LIBRARY NAMES event_core libevent_core -- HINTS -- "${LIBEVENT2_DIR}" -- "${LIBEVENT2_DIR}/lib" --) -- --set(LIBEVENT2_LIBRARIES "") -- --if (LIBEVENT2_INCLUDE_DIR AND LIBEVENT2_LIBRARY) -- if (NOT TARGET Libevent2::Libevent_core) -- add_library(Libevent2::Libevent_core UNKNOWN IMPORTED) -- set_target_properties(Libevent2::Libevent_core PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${LIBEVENT2_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${LIBEVENT2_LIBRARY}" -- ) -- endif () -- -- if (NOT LIBEVENT2_VERSION AND LIBEVENT2_INCLUDE_DIR AND EXISTS "${LIBEVENT2_INCLUDE_DIR}/event2/event.h") -- file(STRINGS "${LIBEVENT2_INCLUDE_DIR}/event2/event-config.h" LIBEVENT2_H REGEX "^#define _?EVENT_+VERSION ") -- string(REGEX REPLACE "^.*EVENT_+VERSION \"([^\"]+)\".*$" "\\1" LIBEVENT2_VERSION "${LIBEVENT2_H}") -- endif () -+include(FindPkgConfig) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PkgLibevent IMPORTED_TARGET GLOBAL QUIET libevent>=2) - endif() - --list(APPEND LIBEVENT2_LIBRARIES "${LIBEVENT2_LIBRARY}") -+if(PkgLibevent_FOUND) -+ set(LIBEVENT2_INCLUDE_DIR ${PkgLibevent_INCLUDE_DIRS}) -+ set(LIBEVENT2_LIBRARIES ${PkgLibevent_LIBRARIES}) -+ set(LIBEVENT2_VERSION ${PkgLibevent_VERSION}) -+ add_library(Libevent2::Libevent_core ALIAS PkgConfig::PkgLibevent) -+else() -+ find_path(LIBEVENT2_INCLUDE_DIR event2/event.h -+ HINTS -+ "${LIBEVENT2_DIR}" -+ "${LIBEVENT2_DIR}/include" -+ ) -+ -+ find_library(LIBEVENT2_LIBRARY NAMES event_core libevent_core -+ HINTS -+ "${LIBEVENT2_DIR}" -+ "${LIBEVENT2_DIR}/lib" -+ ) -+ -+ set(LIBEVENT2_LIBRARIES "") -+ -+ if (LIBEVENT2_INCLUDE_DIR AND LIBEVENT2_LIBRARY) -+ if (NOT TARGET Libevent2::Libevent_core) -+ add_library(Libevent2::Libevent_core UNKNOWN IMPORTED) -+ set_target_properties(Libevent2::Libevent_core PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${LIBEVENT2_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${LIBEVENT2_LIBRARY}" -+ ) -+ endif () -+ -+ if (NOT LIBEVENT2_VERSION AND LIBEVENT2_INCLUDE_DIR AND EXISTS "${LIBEVENT2_INCLUDE_DIR}/event2/event.h") -+ file(STRINGS "${LIBEVENT2_INCLUDE_DIR}/event2/event-config.h" LIBEVENT2_H REGEX "^#define _?EVENT_+VERSION ") -+ string(REGEX REPLACE "^.*EVENT_+VERSION \"([^\"]+)\".*$" "\\1" LIBEVENT2_VERSION "${LIBEVENT2_H}") -+ endif () -+ endif() -+ -+ list(APPEND LIBEVENT2_LIBRARIES "${LIBEVENT2_LIBRARY}") -+endif() - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Libevent2 ---- cmake/modules/FindLibidn2.cmake -+++ cmake/modules/FindLibidn2.cmake -@@ -28,37 +28,49 @@ - - #]=======================================================================] - --find_path(LIBIDN2_INCLUDE_DIR idn2.h -- HINTS -- "${LIBIDN2_DIR}" -- "${LIBIDN2_DIR}/include" --) -- --find_library(LIBIDN2_LIBRARY NAMES idn2 libidn2 -- HINTS -- "${LIBIDN2_DIR}" -- "${LIBIDN2_DIR}/lib" --) -- --set(LIBIDN2_LIBRARIES "") -- --if (LIBIDN2_INCLUDE_DIR AND LIBIDN2_LIBRARY) -- if (NOT TARGET Libidn2::Libidn2) -- add_library(Libidn2::Libidn2 UNKNOWN IMPORTED) -- set_target_properties(Libidn2::Libidn2 PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${LIBIDN2_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${LIBIDN2_LIBRARY}" -+include(FindPkgConfig) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PkgLibIdn2 IMPORTED_TARGET GLOBAL libidn2) -+endif() -+ -+if(PkgLibIdn2_FOUND) -+ set(LIBIDN2_INCLUDE_DIR ${PkgLibIdn2_INCLUDE_DIRS}) -+ set(LIBIDN2_LIBRARIES ${PkgLibIdn2_LIBRARIES}) -+ set(LIBIDN2_VERSION ${PkgLibIdn2_VERSION}) -+ add_library(Libidn2::Libidn2 ALIAS PkgConfig::PkgLibIdn2) -+else() -+ find_path(LIBIDN2_INCLUDE_DIR idn2.h -+ HINTS -+ "${LIBIDN2_DIR}" -+ "${LIBIDN2_DIR}/include" -+ ) -+ -+ find_library(LIBIDN2_LIBRARY NAMES idn2 libidn2 -+ HINTS -+ "${LIBIDN2_DIR}" -+ "${LIBIDN2_DIR}/lib" -+ ) -+ -+ set(LIBIDN2_LIBRARIES "") -+ -+ if (LIBIDN2_INCLUDE_DIR AND LIBIDN2_LIBRARY) -+ if (NOT TARGET Libidn2::Libidn2) -+ add_library(Libidn2::Libidn2 UNKNOWN IMPORTED) -+ set_target_properties(Libidn2::Libidn2 PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${LIBIDN2_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${LIBIDN2_LIBRARY}" - ) -- endif () -+ endif () - -- if (NOT LIBIDN2_VERSION AND LIBIDN2_INCLUDE_DIR AND EXISTS "${LIBIDN2_INCLUDE_DIR}/unbound.h") -- file(STRINGS "${LIBIDN2_INCLUDE_DIR}/idn2.h" LIBIDN2_H REGEX "^#define IDN2_VERSION ") -- string(REGEX REPLACE "^.*IDN2_VERSION \"([0-9.]+)\".*$" "\\1" LIBIDN2_VERSION "${LIBIDN2_H}") -- endif () --endif() -+ if (NOT LIBIDN2_VERSION AND LIBIDN2_INCLUDE_DIR AND EXISTS "${LIBIDN2_INCLUDE_DIR}/unbound.h") -+ file(STRINGS "${LIBIDN2_INCLUDE_DIR}/idn2.h" LIBIDN2_H REGEX "^#define IDN2_VERSION ") -+ string(REGEX REPLACE "^.*IDN2_VERSION \"([0-9.]+)\".*$" "\\1" LIBIDN2_VERSION "${LIBIDN2_H}") -+ endif () - --list(APPEND LIBIDN2_LIBRARIES "${LIBIDN2_LIBRARY}") -+ list(APPEND LIBIDN2_LIBRARIES "${LIBIDN2_LIBRARY}") -+ endif() -+endif() - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Libidn2 ---- cmake/modules/FindLibunbound.cmake -+++ cmake/modules/FindLibunbound.cmake -@@ -28,58 +28,70 @@ - - #]=======================================================================] - --find_path(LIBUNBOUND_INCLUDE_DIR unbound.h -- HINTS -- "${LIBUNBOUND_DIR}" -- "${LIBUNBOUND_DIR}/include" --) -- --find_library(LIBUNBOUND_LIBRARY NAMES unbound -- HINTS -- "${LIBUNBOUND_DIR}" -- "${LIBUNBOUND_DIR}/lib" --) -- --set(LIBUNBOUND_LIBRARIES "") -- --if (UNIX) -- find_package(Threads REQUIRED) -- find_package(OpenSSL REQUIRED) -- -- list(APPEND LIBUNBOUND_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}") -- list(APPEND LIBUNBOUND_LIBRARIES "${OPENSSL_LIBRARIES}") -+include(FindPkgConfig) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PkgLibunbound IMPORTED_TARGET GLOBAL QUIET libunbound) - endif() - --if (LIBUNBOUND_INCLUDE_DIR AND LIBUNBOUND_LIBRARY) -- if (NOT TARGET Libunbound::Libunbound) -- add_library(Libunbound::Libunbound UNKNOWN IMPORTED) -- set_target_properties(Libunbound::Libunbound PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${LIBUNBOUND_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${LIBUNBOUND_LIBRARY}" -- ) -- -- if(UNIX AND TARGET Threads::Threads) -- set_property(TARGET Libunbound::Libunbound APPEND PROPERTY -- INTERFACE_LINK_LIBRARIES Threads::Threads) -- endif () -- if(UNIX AND TARGET OpenSSL::SSL) -- set_property(TARGET Libunbound::Libunbound APPEND PROPERTY -- INTERFACE_LINK_LIBRARIES OpenSSL::SSL) -+if(PkgLibunbound_FOUND) -+ set(LIBUNBOUND_INCLUDE_DIR ${PkgLibunbound_INCLUDE_DIRS}) -+ set(LIBUNBOUND_LIBRARIES ${PkgLibunbound_LIBRARIES}) -+ set(LIBUNBOUND_VERSION ${PkgLibunbound_VERSION}) -+ add_library(Libunbound::Libunbound ALIAS PkgConfig::PkgLibunbound) -+else() -+ find_path(LIBUNBOUND_INCLUDE_DIR unbound.h -+ HINTS -+ "${LIBUNBOUND_DIR}" -+ "${LIBUNBOUND_DIR}/include" -+ ) -+ -+ find_library(LIBUNBOUND_LIBRARY NAMES unbound -+ HINTS -+ "${LIBUNBOUND_DIR}" -+ "${LIBUNBOUND_DIR}/lib" -+ ) -+ -+ set(LIBUNBOUND_LIBRARIES "") -+ -+ if (UNIX) -+ find_package(Threads REQUIRED) -+ find_package(OpenSSL REQUIRED) -+ -+ list(APPEND LIBUNBOUND_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}") -+ list(APPEND LIBUNBOUND_LIBRARIES "${OPENSSL_LIBRARIES}") -+ endif() -+ -+ if (LIBUNBOUND_INCLUDE_DIR AND LIBUNBOUND_LIBRARY) -+ if (NOT TARGET Libunbound::Libunbound) -+ add_library(Libunbound::Libunbound UNKNOWN IMPORTED) -+ set_target_properties(Libunbound::Libunbound PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${LIBUNBOUND_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${LIBUNBOUND_LIBRARY}" -+ ) -+ -+ if(UNIX AND TARGET Threads::Threads) -+ set_property(TARGET Libunbound::Libunbound APPEND PROPERTY -+ INTERFACE_LINK_LIBRARIES Threads::Threads) -+ endif () -+ if(UNIX AND TARGET OpenSSL::SSL) -+ set_property(TARGET Libunbound::Libunbound APPEND PROPERTY -+ INTERFACE_LINK_LIBRARIES OpenSSL::SSL) -+ endif () -+ if(UNIX AND TARGET OpenSSL::Crypto) -+ set_property(TARGET Libunbound::Libunbound APPEND PROPERTY -+ INTERFACE_LINK_LIBRARIES OpenSSL::Crypto) -+ endif () - endif () -- if(UNIX AND TARGET OpenSSL::Crypto) -- set_property(TARGET Libunbound::Libunbound APPEND PROPERTY -- INTERFACE_LINK_LIBRARIES OpenSSL::Crypto) -+ -+ if (NOT LIBUNBOUND_VERSION AND LIBUNBOUND_INCLUDE_DIR AND EXISTS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h") -+ file(STRINGS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h" LIBUNBOUND_H REGEX "^#define UNBOUND_VERSION_M[A-Z]+") -+ string(REGEX REPLACE "^.*MAJOR ([0-9]+).*MINOR ([0-9]+).*MICRO ([0-9]+).*$" "\\1.\\2.\\3" LIBUNBOUND_VERSION "${LIBUNBOUND_H}") - endif () -- endif () -- -- if (NOT LIBUNBOUND_VERSION AND LIBUNBOUND_INCLUDE_DIR AND EXISTS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h") -- file(STRINGS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h" LIBUNBOUND_H REGEX "^#define UNBOUND_VERSION_M[A-Z]+") -- string(REGEX REPLACE "^.*MAJOR ([0-9]+).*MINOR ([0-9]+).*MICRO ([0-9]+).*$" "\\1.\\2.\\3" LIBUNBOUND_VERSION "${LIBUNBOUND_H}") -- endif () --endif() -- --list(APPEND LIBUNBOUND_LIBRARIES "${LIBUNBOUND_LIBRARY}") -+ endif() -+ -+ list(APPEND LIBUNBOUND_LIBRARIES "${LIBUNBOUND_LIBRARY}") -+endif - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Libunbound ---- cmake/modules/FindLibuv.cmake -+++ cmake/modules/FindLibuv.cmake -@@ -28,42 +28,54 @@ - - #]=======================================================================] - --find_path(LIBUV_INCLUDE_DIR uv.h -- HINTS -- "${LIBUV_DIR}" -- "${LIBUV_DIR}/include" --) -- --find_library(LIBUV_LIBRARY NAMES uv libuv -- HINTS -- "${LIBUV_DIR}" -- "${LIBUV_DIR}/lib" --) -- --set(LIBUV_LIBRARIES "") -- --if (LIBUV_INCLUDE_DIR AND LIBUV_LIBRARY) -- if (NOT TARGET Libuv::Libuv) -- add_library(Libuv::Libuv UNKNOWN IMPORTED) -- set_target_properties(Libuv::Libuv PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${LIBUV_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${LIBUV_LIBRARY}" -- ) -- endif () -+include(FindPkgConfig) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PkgLibuv IMPORTED_TARGET GLOBAL QUIET libuv) -+endif() - -- if (NOT LIBUV_VERSION AND LIBUV_INCLUDE_DIR) -- if (EXISTS "${LIBUV_INCLUDE_DIR}/uv-version.h") -- file(STRINGS "${LIBUV_INCLUDE_DIR}/uv-version.h" LIBUV_VER_H REGEX "^#define UV_VERSION_(MAJOR|MINOR|PATCH) ") -- elseif (EXISTS "${LIBUV_INCLUDE_DIR}/uv/version.h") -- file(STRINGS "${LIBUV_INCLUDE_DIR}/uv/version.h" LIBUV_VER_H REGEX "^#define UV_VERSION_(MAJOR|MINOR|PATCH) ") -+if(PkgLibuv_FOUND) -+ set(LIBUV_INCLUDE_DIR ${PkgLibuv_INCLUDE_DIRS}) -+ set(LIBUV_LIBRARIES ${PkgLibuv_LIBRARIES}) -+ set(LIBUV_VERSION ${PkgLibuv_VERSION}) -+ add_library(Libuv::Libuv ALIAS PkgConfig::PkgLibuv) -+else() -+ find_path(LIBUV_INCLUDE_DIR uv.h -+ HINTS -+ "${LIBUV_DIR}" -+ "${LIBUV_DIR}/include" -+ ) -+ -+ find_library(LIBUV_LIBRARY NAMES uv libuv -+ HINTS -+ "${LIBUV_DIR}" -+ "${LIBUV_DIR}/lib" -+ ) -+ -+ set(LIBUV_LIBRARIES "") -+ -+ if (LIBUV_INCLUDE_DIR AND LIBUV_LIBRARY) -+ if (NOT TARGET Libuv::Libuv) -+ add_library(Libuv::Libuv UNKNOWN IMPORTED) -+ set_target_properties(Libuv::Libuv PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${LIBUV_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${LIBUV_LIBRARY}" -+ ) - endif () -- string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*_PATCH ([0-9]+).*$" "\\1.\\2.\\3" LIBUV_VERSION "${LIBUV_VER_H}") -- endif () -+ -+ if (NOT LIBUV_VERSION AND LIBUV_INCLUDE_DIR) -+ if (EXISTS "${LIBUV_INCLUDE_DIR}/uv-version.h") -+ file(STRINGS "${LIBUV_INCLUDE_DIR}/uv-version.h" LIBUV_VER_H REGEX "^#define UV_VERSION_(MAJOR|MINOR|PATCH) ") -+ elseif (EXISTS "${LIBUV_INCLUDE_DIR}/uv/version.h") -+ file(STRINGS "${LIBUV_INCLUDE_DIR}/uv/version.h" LIBUV_VER_H REGEX "^#define UV_VERSION_(MAJOR|MINOR|PATCH) ") -+ endif () -+ string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*_PATCH ([0-9]+).*$" "\\1.\\2.\\3" LIBUV_VERSION "${LIBUV_VER_H}") -+ endif () -+ endif() -+ -+ list(APPEND LIBUV_LIBRARIES "${LIBUV_LIBRARY}") - endif() - --list(APPEND LIBUV_LIBRARIES "${LIBUV_LIBRARY}") -- - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Libuv - REQUIRED_VARS LIBUV_LIBRARIES LIBUV_INCLUDE_DIR ---- cmake/modules/FindNettle.cmake -+++ cmake/modules/FindNettle.cmake -@@ -30,62 +30,76 @@ - - #]=======================================================================] - --find_path(NETTLE_INCLUDE_DIR nettle/version.h -- HINTS -- "${NETTLE_DIR}" -- "${NETTLE_DIR}/include" --) -- --find_library(NETTLE_LIBRARY NAMES nettle libnettle -- HINTS -- "${NETTLE_DIR}" -- "${NETTLE_DIR}/lib" --) -- --find_library(HOGWEED_LIBRARY NAMES hogweed libhogweed -- HINTS -- "${NETTLE_DIR}" -- "${NETTLE_DIR}/lib" --) -- --set(NETTLE_LIBRARIES "") -- --# May need gmp library on Unix. --if (UNIX) -- find_library(NETTLE_GMP_LIBRARY gmp) -- -- if (NETTLE_GMP_LIBRARY) -- list(APPEND NETTLE_LIBRARIES "${NETTLE_GMP_LIBRARY}") -- endif () --endif () -- --if (NETTLE_INCLUDE_DIR AND NETTLE_LIBRARY AND HOGWEED_LIBRARY) -- if (NOT TARGET Nettle::Nettle) -- add_library(Nettle::Nettle UNKNOWN IMPORTED) -- set_target_properties(Nettle::Nettle PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${NETTLE_INCLUDE_DIR}" -- INTERFACE_LINK_LIBRARIES "${NETTLE_LIBRARIES}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${NETTLE_LIBRARY}" -- ) -- endif () -- if (NOT TARGET Nettle::Hogweed) -- add_library(Nettle::Hogweed UNKNOWN IMPORTED) -- set_target_properties(Nettle::Hogweed PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${NETTLE_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${HOGWEED_LIBRARY}" -- ) -- endif () -+include(FindPkgConfig) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PkgNettle IMPORTED_TARGET GLOBAL nettle) -+ pkg_check_modules(PkgHogweed IMPORTED_TARGET GLOBAL QUIET hogweed) -+endif() - -- if (NOT NETTLE_VERSION AND NETTLE_INCLUDE_DIR) -- file(STRINGS "${NETTLE_INCLUDE_DIR}/nettle/version.h" NETTLE_VER_H REGEX "^#define NETTLE_VERSION_(MAJOR|MINOR) ") -- string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*$" "\\1.\\2" NETTLE_VERSION "${NETTLE_VER_H}") -+if(PkgNettle_FOUND AND PkHogweed_FOUND) -+ set(NETTLE_INCLUDE_DIR ${PkgNettle_INCLUDE_DIRS} ${PkgHogweed_INCLUDE_DIRS}) -+ set(NETTLE_LIBRARIES ${PkgNettle_LIBRARIES} ${PkgHogweed_LIBRARIES}) -+ set(NETTLE_VERSION ${PkgNettle_VERSION}) -+ add_library(Nettle::Nettle ALIAS PkgConfig::PkgNettle) -+ add_library(Nettle::Hogweed ALIAS PkgConfig::PkgHogweed) -+else() -+ find_path(NETTLE_INCLUDE_DIR nettle/version.h -+ HINTS -+ "${NETTLE_DIR}" -+ "${NETTLE_DIR}/include" -+ ) -+ -+ find_library(NETTLE_LIBRARY NAMES nettle libnettle -+ HINTS -+ "${NETTLE_DIR}" -+ "${NETTLE_DIR}/lib" -+ ) -+ -+ find_library(HOGWEED_LIBRARY NAMES hogweed libhogweed -+ HINTS -+ "${NETTLE_DIR}" -+ "${NETTLE_DIR}/lib" -+ ) -+ -+ set(NETTLE_LIBRARIES "") -+ -+ # May need gmp library on Unix. -+ if (UNIX) -+ find_library(NETTLE_GMP_LIBRARY gmp) -+ -+ if (NETTLE_GMP_LIBRARY) -+ list(APPEND NETTLE_LIBRARIES "${NETTLE_GMP_LIBRARY}") -+ endif () - endif () -+ -+ if (NETTLE_INCLUDE_DIR AND NETTLE_LIBRARY AND HOGWEED_LIBRARY) -+ if (NOT TARGET Nettle::Nettle) -+ add_library(Nettle::Nettle UNKNOWN IMPORTED) -+ set_target_properties(Nettle::Nettle PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${NETTLE_INCLUDE_DIR}" -+ INTERFACE_LINK_LIBRARIES "${NETTLE_LIBRARIES}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${NETTLE_LIBRARY}" -+ ) -+ endif () -+ if (NOT TARGET Nettle::Hogweed) -+ add_library(Nettle::Hogweed UNKNOWN IMPORTED) -+ set_target_properties(Nettle::Hogweed PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${NETTLE_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${HOGWEED_LIBRARY}" -+ ) -+ endif () -+ -+ if (NOT NETTLE_VERSION AND NETTLE_INCLUDE_DIR) -+ file(STRINGS "${NETTLE_INCLUDE_DIR}/nettle/version.h" NETTLE_VER_H REGEX "^#define NETTLE_VERSION_(MAJOR|MINOR) ") -+ string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*$" "\\1.\\2" NETTLE_VERSION "${NETTLE_VER_H}") -+ endif () -+ endif() -+ -+ list(APPEND NETTLE_LIBRARIES "${NETTLE_LIBRARY}" "${HOGWEED_LIBRARY}") - endif() - --list(APPEND NETTLE_LIBRARIES "${NETTLE_LIBRARY}" "${HOGWEED_LIBRARY}") -- - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Nettle - REQUIRED_VARS NETTLE_LIBRARIES NETTLE_INCLUDE_DIR diff --git a/recipes/getdns/all/patches/1.6.0-0004-dont-install-symlinked-license.patch b/recipes/getdns/all/patches/1.6.0-0004-dont-install-symlinked-license.patch deleted file mode 100644 index fadb8d2d20e5f..0000000000000 --- a/recipes/getdns/all/patches/1.6.0-0004-dont-install-symlinked-license.patch +++ /dev/null @@ -1,16 +0,0 @@ -Avoids weird issue on c3i Windows builders: - - CMake Error at source_subfolder/cmake_install.cmake:104 (file): - file INSTALL cannot read symlink - "C:/J/w/cci_PR-2903@2/.conan/data/getdns/1.6.0/_/_/build/dd6d0e14f162a68e24ee52fee674d130eac57dea/source_subfolder/COPYING" - to duplicate at - "C:/J/w/cci_PR-2903@2/.conan/data/getdns/1.6.0/_/_/package/dd6d0e14f162a68e24ee52fee674d130eac57dea/share/doc/getdns/COPYING": - File exists. - Call Stack (most recent call first): - - ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -1080,1 +1080,1 @@ --install(FILES AUTHORS ChangeLog COPYING LICENSE NEWS README.md DESTINATION ${docdir}) -+install(FILES AUTHORS ChangeLog NEWS README.md DESTINATION ${docdir}) diff --git a/recipes/getdns/all/patches/1.7.3-fix-windows-build.patch b/recipes/getdns/all/patches/1.7.3-fix-windows-build.patch new file mode 100644 index 0000000000000..dc0f91e105f96 --- /dev/null +++ b/recipes/getdns/all/patches/1.7.3-fix-windows-build.patch @@ -0,0 +1,121 @@ +From bfd53d3cc3afbf199fa27f74bf4b35c1ad955c2e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rados=C5=82aw=20Szkodzi=C5=84ski?= +Date: Tue, 3 Jan 2023 14:14:07 +0100 +Subject: [PATCH] Fix Windows build + +Fixes all found instances of missing APIs and headers on Windows. +--- + src/anchor.c | 12 ++++++++++++ + src/compat/mkstemp.c | 6 +++--- + src/gldns/parse.c | 2 +- + src/gldns/parseutil.c | 2 ++ + src/stub.c | 5 +++++ + 5 files changed, 23 insertions(+), 4 deletions(-) + +diff --git a/src/anchor.c b/src/anchor.c +index f50c4a3d1..fc357b649 100644 +--- a/src/anchor.c ++++ b/src/anchor.c +@@ -551,7 +551,11 @@ static void tas_rinse(getdns_context *context, tas_connection *a) + GETDNS_CLEAR_EVENT(a->loop, &a->event); + a->event.ev = NULL; + if (a->fd >= 0) ++#ifdef USE_WINSOCK ++ closesocket(a->fd); ++#else + close(a->fd); ++#endif + a->fd = -1; + if (a->xml.data) + GETDNS_FREE(context->mf, a->xml.data); +@@ -662,7 +666,11 @@ static void tas_reconnect_cb(void *userarg) + , "Waiting for second document timeout. Reconnecting...\n"); + + GETDNS_CLEAR_EVENT(a->loop, &a->event); ++#ifdef USE_WINSOCK ++ closesocket(a->fd); ++#else + close(a->fd); ++#endif + a->fd = -1; + if (a->state == TAS_READ_PS7_HDR) { + a->state = TAS_RETRY; +@@ -778,7 +786,11 @@ static void tas_read_cb(void *userarg) + if (n == 0) { + DEBUG_ANCHOR("Connection closed\n"); + GETDNS_CLEAR_EVENT(a->loop, &a->event); ++#ifdef USE_WINSOCK ++ closesocket(a->fd); ++#else + close(a->fd); ++#endif + a->fd = -1; + if (a->state == TAS_READ_PS7_HDR) { + a->state = TAS_RETRY; +diff --git a/src/compat/mkstemp.c b/src/compat/mkstemp.c +index 49d3e919a..86d1dfd67 100644 +--- a/src/compat/mkstemp.c ++++ b/src/compat/mkstemp.c +@@ -30,14 +30,14 @@ + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +-#include +-#include + #include ++#include + #include ++#include + + int mkstemp(char *template) + { + if (_mktemp_s(template, strlen(template) + 1) != 0) + return -1; +- return open(template, _O_CREAT | _O_EXCL | _O_RDWR, _S_IWRITE | _S_IREAD); ++ return _open(template, _O_CREAT | _O_EXCL | _O_RDWR, _S_IWRITE | _S_IREAD); + } +diff --git a/src/gldns/parse.c b/src/gldns/parse.c +index 367fa80f3..c107c0df9 100644 +--- a/src/gldns/parse.c ++++ b/src/gldns/parse.c +@@ -13,7 +13,7 @@ + #include "gldns/gbuffer.h" + + #include +-#include ++#include + + gldns_lookup_table gldns_directive_types[] = { + { GLDNS_DIR_TTL, "$TTL" }, +diff --git a/src/gldns/parseutil.c b/src/gldns/parseutil.c +index 293496a90..1e4367898 100644 +--- a/src/gldns/parseutil.c ++++ b/src/gldns/parseutil.c +@@ -14,7 +14,9 @@ + + #include "config.h" + #include "gldns/parseutil.h" ++#ifdef HAVE_SYS_TIME_H + #include ++#endif + #include + #include + +diff --git a/src/stub.c b/src/stub.c +index ee3193126..ab393885d 100644 +--- a/src/stub.c ++++ b/src/stub.c +@@ -903,8 +903,13 @@ stub_tcp_write(int fd, getdns_tcp_state *tcp, getdns_network_req *netreq) + just fall back to a 'normal' write. */ + if (written == -1 + && _getdns_socketerror() == _getdns_EISCONN) ++#ifdef USE_WINSOCK ++ written = send(fd, (const char *)(netreq->query - 2) ++ , pkt_len + 2, 0); ++#else + written = write(fd, netreq->query - 2 + , pkt_len + 2); ++#endif + } else + written = send(fd, (const char *)(netreq->query - 2) + , pkt_len + 2, 0); diff --git a/recipes/getdns/all/test_package/CMakeLists.txt b/recipes/getdns/all/test_package/CMakeLists.txt index 3a403dc404b41..e78d760c7b17a 100644 --- a/recipes/getdns/all/test_package/CMakeLists.txt +++ b/recipes/getdns/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup() +find_package(getdns REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE getdns::getdns) diff --git a/recipes/getdns/all/test_package/conanfile.py b/recipes/getdns/all/test_package/conanfile.py index bd7165a553cf4..ef5d7042163ec 100644 --- a/recipes/getdns/all/test_package/conanfile.py +++ b/recipes/getdns/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/getdns/all/test_package/test_package.c b/recipes/getdns/all/test_package/test_package.c index c55c14f559026..b60140d92b44b 100644 --- a/recipes/getdns/all/test_package/test_package.c +++ b/recipes/getdns/all/test_package/test_package.c @@ -1,26 +1,10 @@ #include "getdns.h" -#include #include -#define CHECK(V) if ((V) != GETDNS_RETURN_GOOD) { \ - fprintf(stderr, "Fail: " #V "!\n"); \ - return 1; \ -} - -int main() -{ - getdns_context *context; - CHECK(getdns_context_create(&context, 1)); - getdns_dict *info = getdns_context_get_api_information(context); - if (info == NULL) { - fprintf(stderr, "Could not get api information\n"); - return 1; - } - char *txt = getdns_pretty_print_dict(info); - printf("%s\n", txt); - free(txt); - getdns_dict_destroy(info); +int main() { + getdns_context *context = NULL; + getdns_context_create(&context, 0); getdns_context_destroy(context); - return 0; + return EXIT_SUCCESS; } diff --git a/recipes/getdns/all/test_v1_package/CMakeLists.txt b/recipes/getdns/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/getdns/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/box2d/2.4.x/test_v1_package/conanfile.py b/recipes/getdns/all/test_v1_package/conanfile.py similarity index 92% rename from recipes/box2d/2.4.x/test_v1_package/conanfile.py rename to recipes/getdns/all/test_v1_package/conanfile.py index 7513484720425..7e2dfe859bb27 100644 --- a/recipes/box2d/2.4.x/test_v1_package/conanfile.py +++ b/recipes/getdns/all/test_v1_package/conanfile.py @@ -1,8 +1,8 @@ -import os from conans import ConanFile, CMake, tools +import os -class Box2DTestConan(ConanFile): +class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake", "cmake_find_package_multi" diff --git a/recipes/getdns/config.yml b/recipes/getdns/config.yml index 10acb3ad5b1e8..e14fae48c780f 100644 --- a/recipes/getdns/config.yml +++ b/recipes/getdns/config.yml @@ -1,3 +1,3 @@ versions: - "1.6.0": + "1.7.3": folder: "all" diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index 449f9025ed1c6..c11e5e4c425da 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,16 @@ sources: + "3.3.4": + url: "https://github.com/stephenberry/glaze/archive/v3.3.4.tar.gz" + sha256: "7fe31c14e7ede69d937aa8f126894fef11ebf3156f25cb95446d3d6d38e9da9c" + "3.3.2": + url: "https://github.com/stephenberry/glaze/archive/v3.3.2.tar.gz" + sha256: "e492d3f662c3c096ce7abac86780af6c84f74c4f19b29223ad92fccc054aafad" + "3.3.1": + url: "https://github.com/stephenberry/glaze/archive/v3.3.1.tar.gz" + sha256: "edb16f7b75bf9a7c86a704c006a9859474e1d49467f8ddeabdc8c3a3d5a982a2" + "3.1.9": + url: "https://github.com/stephenberry/glaze/archive/v3.1.9.tar.gz" + sha256: "adfce5acc9d3d88525c006a525e8f21d2a4bb628b5f7022720625f052d88a73d" "3.1.7": url: "https://github.com/stephenberry/glaze/archive/v3.1.7.tar.gz" sha256: "388483bb3dfa1fe25c1dfec24f0afd1651e0303833cfa1b7f51020a2569e992a" diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index fa97242180e6b..6dffeb3a2ef50 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,12 @@ versions: + "3.3.4": + folder: all + "3.3.2": + folder: all + "3.3.1": + folder: all + "3.1.9": + folder: all "3.1.7": folder: all "2.9.5": diff --git a/recipes/gobject-introspection/all/conandata.yml b/recipes/gobject-introspection/all/conandata.yml index 47eccc41d1faf..4203b61eacd08 100644 --- a/recipes/gobject-introspection/all/conandata.yml +++ b/recipes/gobject-introspection/all/conandata.yml @@ -1,19 +1,7 @@ sources: + "1.78.1": + url: "https://download.gnome.org/sources/gobject-introspection/1.78/gobject-introspection-1.78.1.tar.xz" + sha256: "bd7babd99af7258e76819e45ba4a6bc399608fe762d83fde3cac033c50841bb4" "1.72.0": - sha256: "02fe8e590861d88f83060dd39cda5ccaa60b2da1d21d0f95499301b186beaabc" url: "https://download.gnome.org/sources/gobject-introspection/1.72/gobject-introspection-1.72.0.tar.xz" - "1.70.0": - url: "https://download.gnome.org/sources/gobject-introspection/1.70/gobject-introspection-1.70.0.tar.xz" - sha256: "902b4906e3102d17aa2fcb6dad1c19971c70f2a82a159ddc4a94df73a3cafc4a" - "1.69.0": - url: "https://download.gnome.org/sources/gobject-introspection/1.69/gobject-introspection-1.69.0.tar.xz" - sha256: "c668cbe4a3aad7539e2cf669ab576ce7fbadac6890472f4095ca215dbbebee99" - "1.68.0": - url: "https://download.gnome.org/sources/gobject-introspection/1.68/gobject-introspection-1.68.0.tar.xz" - sha256: "d229242481a201b84a0c66716de1752bca41db4133672cfcfb37c93eb6e54a27" - "1.67.1": - url: "https://download.gnome.org/sources/gobject-introspection/1.67/gobject-introspection-1.67.1.tar.xz" - sha256: "9635184d668794609f9fe661c5bde11c106385d26c3babe291c24e3655987e47" - "1.66.1": - url: "https://download.gnome.org/sources/gobject-introspection/1.66/gobject-introspection-1.66.1.tar.xz" - sha256: "dd44a55ee5f426ea22b6b89624708f9e8d53f5cc94e5485c15c87cb30e06161d" + sha256: "02fe8e590861d88f83060dd39cda5ccaa60b2da1d21d0f95499301b186beaabc" diff --git a/recipes/gobject-introspection/all/conanfile.py b/recipes/gobject-introspection/all/conanfile.py index 4e30ffbb5f86f..74c5c3b60e338 100644 --- a/recipes/gobject-introspection/all/conanfile.py +++ b/recipes/gobject-introspection/all/conanfile.py @@ -1,129 +1,188 @@ -from conans import ConanFile, tools, Meson, VisualStudioBuildEnvironment -from conans.errors import ConanInvalidConfiguration import os -import shutil -import glob -required_conan_version = ">=1.36.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import copy, get, replace_in_file, rm, rmdir +from conan.tools.gnu import PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.meson import MesonToolchain, Meson +from conan.tools.env import Environment +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.scm import Version +from conan import conan_version + +required_conan_version = ">=1.60.0 <2.0 || >=2.0.5" + class GobjectIntrospectionConan(ConanFile): name = "gobject-introspection" - description = "GObject introspection is a middleware layer between C libraries (using GObject) and language bindings" - topics = ("conan", "gobject-instrospection") + description = ("GObject introspection is a middleware layer between " + "C libraries (using GObject) and language bindings") + license = "LGPL-2.1-or-later" url = "https://github.com/conan-io/conan-center-index" homepage = "https://gitlab.gnome.org/GNOME/gobject-introspection" - license = "LGPL-2.1" - settings = "os", "arch", "compiler", "build_type" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} - _source_subfolder = "source_subfolder" - _build_subfolder = "build_subfolder" - generators = "pkg_config" + topics = ("gobject-instrospection",) - @property - def _is_msvc(self): - return self.settings.compiler == "Visual Studio" - - def configure(self): - if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + package_type = "shared-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "fPIC": [True, False], + "build_introspection_data": [True, False], + } + default_options = { + "fPIC": True, + "build_introspection_data": True, + } + short_paths = True def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if self.settings.os == "Windows": - raise ConanInvalidConfiguration("%s recipe does not support windows. Contributions are welcome!" % self.name) + if self.settings.os in ["Windows", "Macos"] or cross_building(self): + # FIXME: tools/g-ir-scanner fails to load glib + self.options.build_introspection_data = False + + def configure(self): + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + if self.options.get_safe("build_introspection_data"): + # INFO: g-ir-scanner looks for dynamic glib and gobject libraries when running + self.options["glib"].shared = True + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + # https://gitlab.gnome.org/GNOME/gobject-introspection/-/blob/1.76.1/meson.build?ref_type=tags#L127-131 + self.requires("glib/2.78.3", transitive_headers=True, transitive_libs=True) + # ffi.h is exposed by public header gobject-introspection-1.0/girffi.h + self.requires("libffi/3.4.4", transitive_headers=True) + + def validate(self): + if self.settings.os == "Windows" and self.settings.build_type == "Debug": + # fatal error LNK1104: cannot open file 'python37_d.lib' + raise ConanInvalidConfiguration( + f"{self.ref} debug build on Windows is disabled due to debug version of Python libs likely not being available. Contributions to fix this are welcome.") + if self.options.build_introspection_data and not self.dependencies["glib"].options.shared: + # FIXME: tools/g-ir-scanner fails to load glib + # tools/g-ir-scanner --output=gir/GLib-2.0.gir ... + # ERROR: can't resolve libraries to shared libraries: glib-2.0, gobject-2.0 + raise ConanInvalidConfiguration(f"{self.ref} requires shared glib to be built as shared. Use -o 'glib/*:shared=True'.") + if self.options.build_introspection_data and self.settings.os in ["Windows", "Macos"]: + # FIXME: tools/g-ir-scanner', '--output=gir/GLib-2.0.gir' ... ERROR: can't resolve libraries to shared libraries: glib-2.0, gobject-2.0 + # FIXME: g-ir-scanner fails to find libgnuintl + # giscanner/_giscanner.cpython-37m-darwin.so, 0x0002): Library not loaded: /lib/libgnuintl.8.dylib + raise ConanInvalidConfiguration(f"{self.ref} fails to run g-ir-scanner due glib loaded as shared. Use -o 'glib/*:shared=False'. Contributions to fix this are welcome.") + if self.options.build_introspection_data and cross_building(self): + raise ConanInvalidConfiguration(f"{self.ref} build_introspection_data is not supported when cross-building. Use '&:build_introspection_data=False'.") def build_requirements(self): - if tools.Version(self.version) >= "1.71.0": - self.build_requires("meson/0.62.2") - else: - # https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/414 - self.build_requires("meson/0.59.3") - self.build_requires("pkgconf/1.7.4") + self.tool_requires("meson/[>=1.2.3 <2]") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/[>=2.2 <3]") if self.settings.os == "Windows": - self.build_requires("winflexbison/2.5.24") + self.tool_requires("winflexbison/2.5.25") else: - self.build_requires("flex/2.6.4") - self.build_requires("bison/3.7.6") - - def requirements(self): - self.requires("glib/2.73.0") + self.tool_requires("flex/2.6.4") + self.tool_requires("bison/3.8.2") + self.tool_requires("glib/") def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) - - def _configure_meson(self): - meson = Meson(self) - defs = dict() - defs["build_introspection_data"] = self.options["glib"].shared - defs["datadir"] = os.path.join(self.package_folder, "res") - - meson.configure( - source_folder=self._source_subfolder, - args=["--wrap-mode=nofallback"], - build_folder=self._build_subfolder, - defs=defs, - ) - return meson + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + tc = MesonToolchain(self) + if cross_building(self): + tc.project_options["gi_cross_use_prebuilt_gi"] = "false" + tc.project_options["build_introspection_data"] = self.options.build_introspection_data + tc.project_options["datadir"] = "res" + tc.generate() + deps = PkgConfigDeps(self) + deps.generate() + # INFO: g-ir-scanner uses PKG_CONFIG_PATH directly instead of pkg-config Meson module + env = Environment() + env.define_path("PKG_CONFIG_PATH", self.generators_folder) + envvars = env.vars(self) + envvars.save_script("pkg_config_env") + + def _patch_sources(self): + # Disable tests + replace_in_file(self, os.path.join(self.source_folder, "meson.build"), + "subdir('tests')", + "#subdir('tests')") + # Look for data files in res/ instead of share/ + replace_in_file(self, os.path.join(self.source_folder, "tools", "g-ir-tool-template.in"), + "os.path.join(filedir, '..', 'share')", + "os.path.join(filedir, '..', 'res')") + if Version(conan_version) < "2": + # INFO: Conan 1.x generates PkgConfigDeps with libdir1 and includedir1 variables only for glib due its modules + replace_in_file(self, os.path.join(self.source_folder, "gir", "meson.build"), + "glib_dep.get_variable(pkgconfig: 'libdir')", + "glib_dep.get_variable(pkgconfig: 'libdir1')") + replace_in_file(self, os.path.join(self.source_folder, "gir", "meson.build"), + "join_paths(glib_dep.get_variable(pkgconfig: 'includedir'), 'glib-2.0')", + "join_paths(glib_dep.get_variable(pkgconfig: 'includedir1'), 'glib-2.0')") + # gir/meson.build expects the gio-unix-2.0 includedir to be passed as a build flag. + # Patch this for glib from Conan. + replace_in_file(self, os.path.join(self.source_folder, "gir", "meson.build"), + "join_paths(giounix_dep.get_variable(pkgconfig: 'includedir'), 'gio-unix-2.0')", + "giounix_dep.get_variable(pkgconfig: 'includedir1')") + else: + # gir/meson.build expects the gio-unix-2.0 includedir to be passed as a build flag. + # Patch this for glib from Conan. + replace_in_file(self, os.path.join(self.source_folder, "gir", "meson.build"), + "join_paths(giounix_dep.get_variable(pkgconfig: 'includedir'), 'gio-unix-2.0')", + "giounix_dep.get_variable(pkgconfig: 'includedir')") def build(self): - tools.replace_in_file( - os.path.join(self._source_subfolder, "meson.build"), - "subdir('tests')", - "#subdir('tests')", - ) - tools.replace_in_file( - os.path.join(self._source_subfolder, "meson.build"), - "if meson.version().version_compare('>=0.54.0')", - "if false", - ) - - with tools.environment_append( - VisualStudioBuildEnvironment(self).vars - if self._is_msvc - else {"PKG_CONFIG_PATH": self.build_folder} - ): - meson = self._configure_meson() - meson.build() + self._patch_sources() + meson = Meson(self) + meson.configure() + meson.build() def package(self): - self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder) - with tools.environment_append( - VisualStudioBuildEnvironment(self).vars - ) if self._is_msvc else tools.no_op(): - meson = self._configure_meson() - meson.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.rmdir(os.path.join(self.package_folder, "share")) - for pdb_file in glob.glob(os.path.join(self.package_folder, "bin", "*.pdb")): - os.unlink(pdb_file) + copy(self, "COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + meson = Meson(self) + meson.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.pdb", self.package_folder, recursive=True) + fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.names["pkg_config"] = "gobject-introspection-1.0" + self.cpp_info.set_property("pkg_config_name", "gobject-introspection-1.0") self.cpp_info.libs = ["girepository-1.0"] - self.cpp_info.includedirs.append( - os.path.join("include", "gobject-introspection-1.0") - ) - - bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH env var with: {}".format(bin_path)) - self.env_info.PATH.append(bin_path) + self.cpp_info.includedirs.append(os.path.join("include", "gobject-introspection-1.0")) exe_ext = ".exe" if self.settings.os == "Windows" else "" pkgconfig_variables = { - 'datadir': '${prefix}/res', - 'bindir': '${prefix}/bin', - 'g_ir_scanner': '${bindir}/g-ir-scanner', - 'g_ir_compiler': '${bindir}/g-ir-compiler%s' % exe_ext, - 'g_ir_generate': '${bindir}/g-ir-generate%s' % exe_ext, - 'gidatadir': '${datadir}/gobject-introspection-1.0', - 'girdir': '${datadir}/gir-1.0', - 'typelibdir': '${libdir}/girepository-1.0', + "datadir": "${prefix}/res", + "bindir": "${prefix}/bin", + "libdir": "${prefix}/lib", + "g_ir_scanner": "${bindir}/g-ir-scanner", + "g_ir_compiler": "${bindir}/g-ir-compiler%s" % exe_ext, + "g_ir_generate": "${bindir}/g-ir-generate%s" % exe_ext, + "gidatadir": "${datadir}/gobject-introspection-1.0", + "girdir": "${datadir}/gir-1.0", + "typelibdir": "${libdir}/girepository-1.0", } self.cpp_info.set_property( "pkg_config_custom_content", - "\n".join("%s=%s" % (key, value) for key,value in pkgconfig_variables.items())) + "\n".join(f"{key}={value}" for key, value in pkgconfig_variables.items()), + ) + self.buildenv_info.define_path("GI_GIR_PATH", os.path.join(self.package_folder, "res", "gir-1.0")) + self.buildenv_info.define_path("GI_TYPELIB_PATH", os.path.join(self.package_folder, "lib", "girepository-1.0")) + + # TODO: remove in conan v2 + bin_path = os.path.join(self.package_folder, "bin") + self.env_info.PATH.append(bin_path) + self.env_info.GI_GIR_PATH = os.path.join(self.package_folder, "res", "gir-1.0") + self.env_info.GI_TYPELIB_PATH = os.path.join(self.package_folder, "lib", "girepository-1.0") diff --git a/recipes/gobject-introspection/all/test_package/CMakeLists.txt b/recipes/gobject-introspection/all/test_package/CMakeLists.txt index 7b9b613cbb24a..228388b92ebea 100644 --- a/recipes/gobject-introspection/all/test_package/CMakeLists.txt +++ b/recipes/gobject-introspection/all/test_package/CMakeLists.txt @@ -1,8 +1,12 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(gobject-introspection REQUIRED CONFIG) -add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +add_executable(test_basic test_basic.c) +target_link_libraries(test_basic PRIVATE gobject-introspection::gobject-introspection) + +if(GLIB_INTROSPECTION_DATA_AVAILABLE) + add_executable(test_girepository test_girepository.c) + target_link_libraries(test_girepository PRIVATE gobject-introspection::gobject-introspection) +endif() diff --git a/recipes/gobject-introspection/all/test_package/conanfile.py b/recipes/gobject-introspection/all/test_package/conanfile.py index 32d4b65e5f11e..ec823a4f6e977 100644 --- a/recipes/gobject-introspection/all/test_package/conanfile.py +++ b/recipes/gobject-introspection/all/test_package/conanfile.py @@ -1,26 +1,57 @@ -from conans import ConanFile, CMake, tools import os +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain +from conan.tools.files import save, load +from conan.tools.apple import is_apple_os + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package", "pkg_config" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" - def build(self): - if self.settings.os != 'Windows': - with tools.environment_append({'PKG_CONFIG_PATH': "."}): - pkg_config = tools.PkgConfig("gobject-introspection-1.0") - for tool in ["g_ir_compiler", "g_ir_generate", "g_ir_scanner"]: - self.run('%s --version' % pkg_config.variables[tool], run_environment=True) - self.run('g-ir-annotation-tool --version', run_environment=True) - self.run('g-ir-inspect -h', run_environment=True) + def requirements(self): + self.requires(self.tested_reference_str, run=True) + + def layout(self): + cmake_layout(self) + def generate(self): + introspection_data = self.dependencies["glib"].options.shared and not is_apple_os(self) + tc = CMakeToolchain(self) + tc.variables["GLIB_INTROSPECTION_DATA_AVAILABLE"] = introspection_data + tc.generate() + save(self, os.path.join(self.build_folder, "gobject_introspection_data"), str(introspection_data)) + save(self, os.path.join(self.build_folder, "gobject_introspection_bin"), + self.dependencies["gobject-introspection"].cpp_info.bindirs[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) + if can_run(self): + if self.settings.os != "Windows": + gobject_introspection_bin = load(self, os.path.join(self.build_folder, "gobject_introspection_bin")) + gobject_introspection_data = load(self, os.path.join(self.build_folder, "gobject_introspection_data")) == "True" + for tool in ["g-ir-compiler", "g-ir-generate", "g-ir-scanner", "g-ir-annotation-tool"]: + if not gobject_introspection_data and tool in ["g-ir-scanner", "g-ir-annotation-tool"]: + continue + tool_path = os.path.join(gobject_introspection_bin, tool) + if os.path.exists(tool_path): + self.run(f"{tool_path} --version", env="conanrun") + else: + raise Exception(f"Tool {tool} not found in {gobject_introspection_bin}") + tool_path = os.path.join(gobject_introspection_bin, "g-ir-inspect") + if os.path.exists(tool_path): + self.run(f"{tool_path} -h", env="conanrun") + + bin_path = os.path.join(self.cpp.build.bindir, "test_basic") + self.run(bin_path, env="conanrun") + bin_path = os.path.join(self.cpp.build.bindir, "test_girepository") + if os.path.exists(bin_path): + self.run(bin_path, env="conanrun") diff --git a/recipes/gobject-introspection/all/test_package/test_package.c b/recipes/gobject-introspection/all/test_package/test_basic.c similarity index 77% rename from recipes/gobject-introspection/all/test_package/test_package.c rename to recipes/gobject-introspection/all/test_package/test_basic.c index c1b18cd52e49e..44d8cd552ebdd 100644 --- a/recipes/gobject-introspection/all/test_package/test_package.c +++ b/recipes/gobject-introspection/all/test_package/test_basic.c @@ -1,12 +1,12 @@ +#include #include #include "girepository.h" -int main(int argc, char **argv) -{ +int main(void) { printf("gobject introspection version %d.%d.%d\n", gi_get_major_version(), gi_get_minor_version(), gi_get_micro_version()); - return 0; + return EXIT_SUCCESS; } diff --git a/recipes/gobject-introspection/all/test_package/test_girepository.c b/recipes/gobject-introspection/all/test_package/test_girepository.c new file mode 100644 index 0000000000000..d6994f8155c80 --- /dev/null +++ b/recipes/gobject-introspection/all/test_package/test_girepository.c @@ -0,0 +1,7 @@ +#include +#include "girepository.h" + +int main() { + GIRepository* repository = g_irepository_get_default(); + return EXIT_SUCCESS; +} diff --git a/recipes/gobject-introspection/all/test_v1_package/CMakeLists.txt b/recipes/gobject-introspection/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/gobject-introspection/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/gobject-introspection/all/test_v1_package/conanfile.py b/recipes/gobject-introspection/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..52695b0ce44eb --- /dev/null +++ b/recipes/gobject-introspection/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_basic") + self.run(bin_path, run_environment=True) diff --git a/recipes/gobject-introspection/config.yml b/recipes/gobject-introspection/config.yml index 06afabf3f5bc4..42a826aff4ed3 100644 --- a/recipes/gobject-introspection/config.yml +++ b/recipes/gobject-introspection/config.yml @@ -1,13 +1,5 @@ versions: - "1.72.0": - folder: all - "1.70.0": - folder: all - "1.69.0": + "1.78.1": folder: all - "1.68.0": - folder: all - "1.67.1": - folder: all - "1.66.1": + "1.72.0": folder: all diff --git a/recipes/google-cloud-cpp/2.x/components_2_12_0.py b/recipes/google-cloud-cpp/2.x/components_2_28_0.py similarity index 68% rename from recipes/google-cloud-cpp/2.x/components_2_12_0.py rename to recipes/google-cloud-cpp/2.x/components_2_28_0.py index 943f3345fcb41..dafa862192730 100644 --- a/recipes/google-cloud-cpp/2.x/components_2_12_0.py +++ b/recipes/google-cloud-cpp/2.x/components_2_28_0.py @@ -1,81 +1,100 @@ -# Automatically generated by /usr/local/google/home/coryan/cci-develop/recipes/google-cloud-cpp/2.x/extract_dependencies.py DO NOT EDIT +# Automatically generated by /usr/local/google/home/dbolduc/code/git/conan-center-index/recipes/google-cloud-cpp/2.x/extract_dependencies.py DO NOT EDIT DEPENDENCIES = { "accessapproval_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], "accesscontextmanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], "advisorynotifications_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "aiplatform_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_interval_protos', 'type_money_protos'], + "aiplatform_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_interval_protos', 'type_money_protos'], "alloydb_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], "apigateway_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "apigeeconnect_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], "apikeys_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "appengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_type_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "appengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "apphub_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "artifactregistry_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], "asset_protos": ['accesscontextmanager_protos', 'api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'osconfig_protos', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos', 'type_dayofweek_protos', 'type_expr_protos', 'type_timeofday_protos'], "assuredworkloads_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "automl_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "backupdr_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "baremetalsolution_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "batch_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "batch_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "beyondcorp_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "cloud_bigquery_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_error_details_protos', 'rpc_status_protos', 'type_expr_protos'], - "bigtable_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "bigquery_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_error_details_protos', 'rpc_status_protos', 'type_expr_protos'], + "bigtable_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_expr_protos'], "billing_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_date_protos', 'type_expr_protos', 'type_money_protos'], "binaryauthorization_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grafeas_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], "certificatemanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "channel_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos', 'type_decimal_protos', 'type_money_protos', 'type_postal_address_protos'], - "cloudbuild_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "cloudbuild_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "cloudcontrolspartner_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'type_interval_protos'], + "cloudquotas_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "commerce_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "cloud_common_common_protos": ['api_field_behavior_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], "composer_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], - "confidentialcomputing_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "confidentialcomputing_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "config_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "connectors_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "contactcenterinsights_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "container_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos'], "containeranalysis_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grafeas_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], "contentwarehouse_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'documentai_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_color_protos', 'type_date_protos', 'type_datetime_protos', 'type_expr_protos', 'type_interval_protos', 'type_money_protos', 'type_postal_address_protos'], "datacatalog_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "datafusion_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "datamigration_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], "dataplex_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "dataproc_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "dataproc_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_interval_protos'], + "datastore_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], "datastream_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "deploy_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], - "cloud_dialogflow_v2_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], + "developerconnect_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "dialogflow_cx_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], + "dialogflow_es_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], + "discoveryengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], "dlp_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], "documentai_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_color_protos', 'type_date_protos', 'type_datetime_protos', 'type_money_protos', 'type_postal_address_protos'], "domains_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_money_protos', 'type_postal_address_protos'], "edgecontainer_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "edgenetwork_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "essentialcontacts_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], "eventarc_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos'], "filestore_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'cloud_common_common_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "functions_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "gameservices_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "gkebackup_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "gkebackup_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], "gkehub_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "gkemulticloud_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "gkemulticloud_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], "grafeas_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], - "iam_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "iam_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], + "iam_v2_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], "iap_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], "ids_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "iot_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "kms_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "kms_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "language_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "logging_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_type_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "logging_type_type_protos": ['grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "logging_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "logging_type_protos": ['grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], "managedidentities_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "managedkafka_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "memcache_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], - "monitoring_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_calendar_period_protos'], + "metastore_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos'], + "migrationcenter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_money_protos'], + "monitoring_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_calendar_period_protos', 'type_interval_protos'], + "netapp_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "networkconnectivity_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "networkmanagement_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "networkservices_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "networkmanagement_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "networksecurity_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "networkservices_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "notebooks_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "optimization_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], "orgpolicy_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'type_expr_protos'], "osconfig_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], "oslogin_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "policytroubleshooter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], + "policysimulator_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_expr_protos'], + "policytroubleshooter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'iam_v2_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], "privateca_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "privilegedaccessmanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "profiler_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "publicca_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], "pubsub_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "recaptchaenterprise_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "rapidmigrationassessment_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "recaptchaenterprise_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], "recommender_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'type_money_protos'], "redis_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], "resourcemanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], @@ -84,30 +103,36 @@ "run_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], "scheduler_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], "secretmanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], - "securitycenter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "servicecontrol_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_type_protos', 'protobuf::libprotobuf', 'rpc_context_attribute_context_protos', 'rpc_status_protos'], + "securesourcemanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "securitycenter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "securitycentermanagement_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "servicecontrol_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_protos', 'protobuf::libprotobuf', 'rpc_context_attribute_context_protos', 'rpc_status_protos'], "servicedirectory_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], - "servicemanagement_protos": ['api_annotations_protos', 'api_auth_protos', 'api_backend_protos', 'api_billing_protos', 'api_client_protos', 'api_config_change_protos', 'api_context_protos', 'api_control_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_log_protos', 'api_logging_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_quota_protos', 'api_resource_protos', 'api_service_protos', 'api_source_info_protos', 'api_system_parameter_protos', 'api_usage_protos', 'api_visibility_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "serviceusage_protos": ['api_annotations_protos', 'api_auth_protos', 'api_client_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_quota_protos', 'api_usage_protos', 'api_visibility_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "servicehealth_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "servicemanagement_protos": ['api_annotations_protos', 'api_auth_protos', 'api_backend_protos', 'api_billing_protos', 'api_client_protos', 'api_config_change_protos', 'api_context_protos', 'api_control_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_log_protos', 'api_logging_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_policy_protos', 'api_quota_protos', 'api_resource_protos', 'api_service_protos', 'api_source_info_protos', 'api_system_parameter_protos', 'api_usage_protos', 'api_visibility_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "serviceusage_protos": ['api_annotations_protos', 'api_auth_protos', 'api_client_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_quota_protos', 'api_resource_protos', 'api_usage_protos', 'api_visibility_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "shell_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "spanner_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "cloud_speech_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "speech_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "sql_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "storage_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_date_protos', 'type_expr_protos'], + "storagecontrol_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "storageinsights_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos'], "storagetransfer_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos', 'type_date_protos', 'type_timeofday_protos'], "support_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "talent_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos', 'type_money_protos', 'type_postal_address_protos', 'type_timeofday_protos'], "tasks_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "cloud_texttospeech_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "telcoautomation_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "texttospeech_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "timeseriesinsights_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], "tpu_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "devtools_cloudtrace_v2_trace_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], - "translate_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "video_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_datetime_protos'], + "trace_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "translate_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "video_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_datetime_protos'], "videointelligence_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "vision_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_color_protos', 'type_latlng_protos'], "vmmigration_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_error_details_protos', 'rpc_status_protos'], - "vmwareengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "vmwareengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "vpcaccess_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "webrisk_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "websecurityscanner_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], @@ -127,7 +152,13 @@ "api_quota_protos": ['api_annotations_protos'], "api_service_protos": ['api_annotations_protos', 'api_auth_protos', 'api_backend_protos', 'api_billing_protos', 'api_client_protos', 'api_context_protos', 'api_control_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_http_protos', 'api_label_protos', 'api_log_protos', 'api_logging_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_quota_protos', 'api_resource_protos', 'api_source_info_protos', 'api_system_parameter_protos', 'api_usage_protos'], "api_usage_protos": ['api_annotations_protos', 'api_visibility_protos'], - "devtools_cloudtrace_v2_tracing_protos": ['api_client_protos', 'api_field_behavior_protos', 'devtools_cloudtrace_v2_trace_protos', 'devtools_cloudtrace_v2_trace_protos', 'rpc_status_protos'], + "iam_credentials_v1_common_protos": ['api_field_behavior_protos', 'api_resource_protos'], + "iam_credentials_v1_iamcredentials_protos": ['api_annotations_protos', 'api_client_protos', 'iam_credentials_v1_common_protos'], + "iam_v1_iam_policy_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_resource_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos'], + "iam_v1_options_protos": ['api_annotations_protos'], + "iam_v1_policy_protos": ['api_annotations_protos', 'type_expr_protos'], + "cloud_extended_operations_protos": ["protobuf::libprotobuf"], + "compute_protos": ["cloud_extended_operations_protos", "protobuf::libprotobuf"], } PROTO_COMPONENTS = { @@ -148,6 +179,7 @@ "api_documentation_protos", "api_endpoint_protos", "api_field_behavior_protos", + "api_field_info_protos", "api_http_protos", "api_httpbody_protos", "api_label_protos", @@ -157,6 +189,7 @@ "api_metric_protos", "api_monitored_resource_protos", "api_monitoring_protos", + "api_policy_protos", "api_quota_protos", "api_resource_protos", "api_routing_protos", @@ -169,81 +202,99 @@ "apigeeconnect_protos", "apikeys_protos", "appengine_protos", + "apphub_protos", "artifactregistry_protos", "asset_protos", "assuredworkloads_protos", "automl_protos", + "backupdr_protos", "baremetalsolution_protos", "batch_protos", "beyondcorp_protos", + "bigquery_protos", "bigtable_protos", "billing_protos", "binaryauthorization_protos", "certificatemanager_protos", "channel_protos", - "cloud_bigquery_protos", "cloud_common_common_protos", - "cloud_dialogflow_v2_protos", - "cloud_speech_protos", - "cloud_texttospeech_protos", + "cloud_extended_operations_protos", "cloudbuild_protos", + "cloudcontrolspartner_protos", + "cloudquotas_protos", + "commerce_protos", "composer_protos", + "compute_protos", "confidentialcomputing_protos", + "config_protos", "connectors_protos", "contactcenterinsights_protos", "container_protos", "containeranalysis_protos", "contentwarehouse_protos", "datacatalog_protos", + "datafusion_protos", "datamigration_protos", "dataplex_protos", "dataproc_protos", + "datastore_protos", "datastream_protos", "deploy_protos", - "devtools_cloudtrace_v2_trace_protos", - "devtools_cloudtrace_v2_tracing_protos", - "devtools_source_v1_source_context_protos", + "developerconnect_protos", "dialogflow_cx_protos", + "dialogflow_es_protos", + "discoveryengine_protos", "dlp_protos", "documentai_protos", "domains_protos", "edgecontainer_protos", + "edgenetwork_protos", "essentialcontacts_protos", "eventarc_protos", "filestore_protos", "functions_protos", - "gameservices_protos", "gkebackup_protos", "gkehub_protos", "gkemulticloud_protos", "grafeas_protos", + "iam_credentials_v1_common_protos", + "iam_credentials_v1_iamcredentials_protos", "iam_protos", "iam_v1_iam_policy_protos", "iam_v1_options_protos", "iam_v1_policy_protos", + "iam_v2_protos", "iap_protos", "ids_protos", - "iot_protos", "kms_protos", "language_protos", "logging_protos", - "logging_type_type_protos", + "logging_type_protos", "longrunning_operations_protos", "managedidentities_protos", + "managedkafka_protos", "memcache_protos", + "metastore_protos", + "migrationcenter_protos", "monitoring_protos", + "netapp_protos", "networkconnectivity_protos", "networkmanagement_protos", + "networksecurity_protos", "networkservices_protos", "notebooks_protos", "optimization_protos", "orgpolicy_protos", "osconfig_protos", "oslogin_protos", + "policysimulator_protos", "policytroubleshooter_protos", "privateca_protos", + "privilegedaccessmanager_protos", "profiler_protos", + "publicca_protos", "pubsub_protos", + "rapidmigrationassessment_protos", "recaptchaenterprise_protos", "recommender_protos", "redis_protos", @@ -257,21 +308,30 @@ "run_protos", "scheduler_protos", "secretmanager_protos", + "securesourcemanager_protos", "securitycenter_protos", + "securitycentermanagement_protos", "servicecontrol_protos", "servicedirectory_protos", + "servicehealth_protos", "servicemanagement_protos", "serviceusage_protos", "shell_protos", "spanner_protos", + "speech_protos", + "sql_protos", "storage_protos", + "storagecontrol_protos", "storageinsights_protos", "storagetransfer_protos", "support_protos", "talent_protos", "tasks_protos", + "telcoautomation_protos", + "texttospeech_protos", "timeseriesinsights_protos", "tpu_protos", + "trace_protos", "translate_protos", "type_calendar_period_protos", "type_color_protos", @@ -307,10 +367,12 @@ "apigeeconnect", "apikeys", "appengine", + "apphub", "artifactregistry", "asset", "assuredworkloads", "automl", + "backupdr", "baremetalsolution", "batch", "beyondcorp", @@ -321,55 +383,149 @@ "certificatemanager", "channel", "cloudbuild", + "cloudcontrolspartner", + "cloudquotas", + "commerce", "composer", + "compute_accelerator_types", + "compute_addresses", + "compute_autoscalers", + "compute_backend_buckets", + "compute_backend_services", + "compute_disk_types", + "compute_disks", + "compute_external_vpn_gateways", + "compute_firewall_policies", + "compute_firewalls", + "compute_forwarding_rules", + "compute_global_addresses", + "compute_global_forwarding_rules", + "compute_global_network_endpoint_groups", + "compute_global_operations", + "compute_global_organization_operations", + "compute_global_public_delegated_prefixes", + "compute_health_checks", + "compute_http_health_checks", + "compute_https_health_checks", + "compute_image_family_views", + "compute_images", + "compute_instance_group_managers", + "compute_instance_groups", + "compute_instance_templates", + "compute_instances", + "compute_interconnect_attachments", + "compute_interconnect_locations", + "compute_interconnects", + "compute_license_codes", + "compute_licenses", + "compute_machine_images", + "compute_machine_types", + "compute_network_attachments", + "compute_network_edge_security_services", + "compute_network_endpoint_groups", + "compute_network_firewall_policies", + "compute_networks", + "compute_node_groups", + "compute_node_templates", + "compute_node_types", + "compute_packet_mirrorings", + "compute_projects", + "compute_public_advertised_prefixes", + "compute_public_delegated_prefixes", + "compute_region_autoscalers", + "compute_region_backend_services", + "compute_region_commitments", + "compute_region_disk_types", + "compute_region_disks", + "compute_region_health_check_services", + "compute_region_health_checks", + "compute_region_instance_group_managers", + "compute_region_instance_groups", + "compute_region_instance_templates", + "compute_region_instances", + "compute_region_network_endpoint_groups", + "compute_region_network_firewall_policies", + "compute_region_notification_endpoints", + "compute_region_operations", + "compute_region_security_policies", + "compute_region_ssl_certificates", + "compute_ssl_policies", + "compute_subnetworks", + "compute_target_grpc_proxies", + "compute_target_http_proxies", + "compute_target_https_proxies", + "compute_target_instances", + "compute_target_pools", + "compute_target_ssl_proxies", + "compute_target_tcp_proxies", + "compute_target_vpn_gateways", + "compute_url_maps", + "compute_vpn_gateways", + "compute_vpn_tunnels", + "compute_zone_operations", + "compute_zones", "confidentialcomputing", + "config", "connectors", "contactcenterinsights", "container", "containeranalysis", "contentwarehouse", "datacatalog", + "datafusion", "datamigration", "dataplex", "dataproc", + "datastore", "datastream", "deploy", + "developerconnect", "dialogflow_cx", "dialogflow_es", + "discoveryengine", "dlp", "documentai", "domains", "edgecontainer", + "edgenetwork", "essentialcontacts", "eventarc", "filestore", "functions", - "gameservices", "gkebackup", "gkehub", "gkemulticloud", "iam", "iap", "ids", - "iot", "kms", "language", "logging", "managedidentities", + "managedkafka", "memcache", + "metastore", + "migrationcenter", "monitoring", + "netapp", "networkconnectivity", "networkmanagement", + "networksecurity", "networkservices", "notebooks", + "oauth2", "optimization", "orgpolicy", "osconfig", "oslogin", + "policysimulator", "policytroubleshooter", "privateca", + "privilegedaccessmanager", "profiler", + "publicca", "pubsub", + "rapidmigrationassessment", "recaptchaenterprise", "recommender", "redis", @@ -379,20 +535,26 @@ "run", "scheduler", "secretmanager", + "securesourcemanager", "securitycenter", + "securitycentermanagement", "servicecontrol", "servicedirectory", + "servicehealth", "servicemanagement", "serviceusage", "shell", "spanner", "speech", + "sql", "storage", + "storagecontrol", "storageinsights", "storagetransfer", "support", "talent", "tasks", + "telcoautomation", "texttospeech", "timeseriesinsights", "tpu", diff --git a/recipes/google-cloud-cpp/2.x/conandata.yml b/recipes/google-cloud-cpp/2.x/conandata.yml index 79eb43c2b932d..65a9e8f5f8351 100644 --- a/recipes/google-cloud-cpp/2.x/conandata.yml +++ b/recipes/google-cloud-cpp/2.x/conandata.yml @@ -1,18 +1,14 @@ sources: - "2.12.0": - url: "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.12.0.tar.gz" - sha256: "8cda870803925c62de8716a765e03eb9d34249977e5cdb7d0d20367e997a55e2" "2.15.1": url: "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.15.1.tar.gz" sha256: "47a5c6beff48625fa1b65b1ddc575247def80c88d29062c66d463172280d3959" "2.19.0": url: "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.19.0.tar.gz" sha256: "63f009092afd900cb812050bcecf607e37d762ac911e0bcbf4af9a432da91890" + "2.28.0": + url: "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.28.0.tar.gz" + sha256: "1d51910cb4419f6100d8b9df6bccd33477d09f50e378f12b06dae0f137ed7bc6" patches: - "2.12.0": - - patch_file: "patches/2.12.0/001-use-conan-msvc-runtime.patch" - patch_description: "Let Conan select the MSVC runtime" - patch_type: conan "2.15.1": - patch_file: "patches/2.15.1/001-use-conan-msvc-runtime.patch" patch_description: "Let Conan select the MSVC runtime" @@ -24,3 +20,7 @@ patches: - patch_file: "patches/2.19.0/002-add-find-package-threads.patch" patch_description: "Missing find_package() in CMake files" patch_type: conan + "2.28.0": + - patch_file: "patches/2.28.0/001-add-find-package-threads.patch" + patch_description: "Missing find_package() in CMake files" + patch_type: conan diff --git a/recipes/google-cloud-cpp/2.x/conanfile.py b/recipes/google-cloud-cpp/2.x/conanfile.py index 18e1843526a3c..bf23faefd5366 100644 --- a/recipes/google-cloud-cpp/2.x/conanfile.py +++ b/recipes/google-cloud-cpp/2.x/conanfile.py @@ -19,9 +19,9 @@ # script will be used to generate a new file with the component dependency # information. The expectation is that maintaining this script will be easier # than writing long lists of dependencies by hand. -import components_2_12_0 import components_2_15_1 import components_2_19_0 +import components_2_28_0 required_conan_version = ">=1.56.0" @@ -45,27 +45,27 @@ class GoogleCloudCppConan(ConanFile): settings = "os", "arch", "compiler", "build_type" options = {"shared": [True, False], "fPIC": [True, False]} default_options = {"shared": False, "fPIC": True} - exports = ["components_2_12_0.py", - "components_2_15_1.py", + exports = ["components_2_15_1.py", "components_2_19_0.py", + "components_2_28_0.py", ] short_paths = True _GA_COMPONENTS = { - '2.12.0': components_2_12_0.COMPONENTS, '2.15.1': components_2_15_1.COMPONENTS, '2.19.0': components_2_19_0.COMPONENTS, + '2.28.0': components_2_28_0.COMPONENTS, } _PROTO_COMPONENTS = { - '2.12.0': components_2_12_0.PROTO_COMPONENTS, '2.15.1': components_2_15_1.PROTO_COMPONENTS, '2.19.0': components_2_19_0.PROTO_COMPONENTS, + '2.28.0': components_2_28_0.PROTO_COMPONENTS, } _PROTO_COMPONENT_DEPENDENCIES = { - "2.12.0": components_2_12_0.DEPENDENCIES, "2.15.1": components_2_15_1.DEPENDENCIES, "2.19.0": components_2_19_0.DEPENDENCIES, + "2.28.0": components_2_28_0.DEPENDENCIES, } # Some components require custom dependency definitions. _REQUIRES_CUSTOM_DEPENDENCIES = { @@ -150,7 +150,7 @@ def source(self): def requirements(self): # 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("abseil/[>=20230125.3 <=20230802.1]", transitive_headers=True) self.requires("grpc/1.54.3", transitive_headers=True) self.requires("nlohmann_json/3.11.3") self.requires("crc32c/1.1.2") @@ -167,6 +167,7 @@ def build_requirements(self): def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_TESTING"] = False + tc.variables["GOOGLE_CLOUD_CPP_WITH_MOCKS"] = 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()) @@ -186,14 +187,9 @@ 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": - 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} ARGS') + 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} ARGS') def build(self): self._patch_sources() @@ -214,9 +210,6 @@ def _generate_proto_requires(self, component): 'asset', 'channel', 'storagetransfer', - # TODO - certificatemanager crashes the gRPC code generator. Add it back - # after gRPC >= 1.53.x - 'certificatemanager', } def _components(self): @@ -228,6 +221,8 @@ def _components(self): if self.settings.os == "Android": result.remove('accesscontextmanager') result.remove('talent') + if self.settings.os == "Windows" and Version(self.version) >= '2.28.0': + result.remove('securitycenter') return result def _proto_components(self): @@ -239,11 +234,14 @@ def _proto_components(self): if self.settings.os == "Android": result.remove('accesscontextmanager_protos') result.remove('talent_protos') - if Version(self.version) >= '2.15.1': - # This was converted to an interface library starting on 2.15.1 + if Version(self.version) <= '2.19.0': + # Handling of these proto libraries was simplified in the 2.28.0 + # `conanfile.py`. We prefer not to regenerate the old + # `components_*.py` files, so we manually skip the protos in here. result.remove('logging_type_type_protos') - # These were removed (as they are not used) starting on 2.15.1 result.remove('devtools_source_v1_source_context_protos') + if self.settings.os == "Windows" and Version(self.version) >= '2.28.0': + result.remove('securitycenter_protos') return result def package(self): @@ -293,21 +291,13 @@ def package_info(self): # A small number of gRPC-generated stubs are used directly in the common components # shared by all gRPC-based libraries. These must be defined without reference to `grpc_utils`. - if Version(self.version) >= '2.15.1': - GRPC_UTILS_REQUIRED_PROTOS = { - "iam_credentials_v1_iamcredentials_protos", - "iam_v1_policy_protos", - "longrunning_operations_protos", - "rpc_error_details_protos", - "rpc_status_protos", - } - else: - GRPC_UTILS_REQUIRED_PROTOS = { - "iam_protos", - "longrunning_operations_protos", - "rpc_error_details_protos", - "rpc_status_protos", - } + GRPC_UTILS_REQUIRED_PROTOS = { + "iam_credentials_v1_iamcredentials_protos", + "iam_v1_policy_protos", + "longrunning_operations_protos", + "rpc_error_details_protos", + "rpc_status_protos", + } for component in GRPC_UTILS_REQUIRED_PROTOS: self._add_proto_component(component) @@ -316,48 +306,31 @@ def package_info(self): self.cpp_info.components["grpc_utils"].names["pkg_config"] = "google_cloud_cpp_grpc_utils" for component in self._proto_components(): - if Version(self.version) >= '2.15.1' and component == 'storage_protos': - # Starting with v2.15.1 the `storage_protos` are compiled only - # when needed. They are not used in Conan because they are only - # needed for an experimental library, supporting an allow-listed - # service. + if component == 'storage_protos': + # The `storage_protos` are compiled only when needed. They are + # not used in Conan because they are only needed for an + # experimental library, supporting an allow-listed service. continue if component not in GRPC_UTILS_REQUIRED_PROTOS: self._add_proto_component(component) # Interface libraries for backwards compatibility - if Version(self.version) < '2.15.1': - self.cpp_info.components["dialogflow_es_protos"].requires = ["cloud_dialogflow_v2_protos"] - self.cpp_info.components["logging_type_protos"].requires = ["logging_type_type_protos"] - self.cpp_info.components["speech_protos"].requires = ["cloud_speech_protos"] - self.cpp_info.components["texttospeech_protos"].requires = ["cloud_texttospeech_protos"] - self.cpp_info.components["trace_protos"].requires = [ - "devtools_cloudtrace_v2_trace_protos", - "devtools_cloudtrace_v2_tracing_protos", - ] - self._add_grpc_component("bigquery", "cloud_bigquery_protos") - else: - self.cpp_info.components["cloud_bigquery_protos"].requires = ["bigquery_protos"] - self.cpp_info.components["cloud_dialogflow_v2_protos"].requires = ["dialogflow_es_protos"] - self.cpp_info.components["cloud_speech_protos"].requires = ["speech_protos"] - self.cpp_info.components["cloud_texttospeech_protos"].requires = ["texttospeech_protos"] - self.cpp_info.components["devtools_cloudtrace_v2_trace_protos"].requires = ["trace_protos"] - self.cpp_info.components["devtools_cloudtrace_v2_tracing_protos"].requires = ["trace_protos"] - self.cpp_info.components["logging_type_type_protos"].requires = ["logging_type_protos"] + self.cpp_info.components["cloud_bigquery_protos"].requires = ["bigquery_protos"] + self.cpp_info.components["cloud_dialogflow_v2_protos"].requires = ["dialogflow_es_protos"] + self.cpp_info.components["cloud_speech_protos"].requires = ["speech_protos"] + self.cpp_info.components["cloud_texttospeech_protos"].requires = ["texttospeech_protos"] + self.cpp_info.components["devtools_cloudtrace_v2_trace_protos"].requires = ["trace_protos"] + self.cpp_info.components["devtools_cloudtrace_v2_tracing_protos"].requires = ["trace_protos"] + self.cpp_info.components["logging_type_type_protos"].requires = ["logging_type_protos"] for component in self._components(): protos=f"{component}_protos" - # bigquery proto library predates the adoption of more consistent naming - if component == 'bigquery' and Version(self.version) < '2.15.1': - self._add_proto_component("cloud_bigquery_protos") - self._add_grpc_component(component, "cloud_bigquery_protos") - continue - if component == 'dialogflow_es' and Version(self.version) < '2.15.1': - self._add_proto_component("cloud_dialogflow_v2_protos") - self._add_grpc_component(component, "cloud_dialogflow_v2_protos") - continue # `compute` components do not depend on gRPC if component.startswith("compute_"): + # Individual compute proto libraries were replaced with a single + # `compute_protos` library. + if Version(self.version) >= '2.28.0': + protos = "compute_protos" self._add_compute_component(component, protos) continue # `storage` is the only component that does not depend on a matching `*_protos` library diff --git a/recipes/google-cloud-cpp/2.x/extract_dependencies.py b/recipes/google-cloud-cpp/2.x/extract_dependencies.py index 95720c57e7748..0235b7b50d130 100755 --- a/recipes/google-cloud-cpp/2.x/extract_dependencies.py +++ b/recipes/google-cloud-cpp/2.x/extract_dependencies.py @@ -25,6 +25,8 @@ # Used in _generate_proto_requires(): the *.deps files are generated from # Bazel and contain a few targets that do not exit (nor do they need to # exist) in CMake. +# +# This list maps onto google_cloud_cpp_load_protodeps()'s `targets_to_omit`. _PROTO_DEPS_REMOVED_TARGETS = { "cloud_kms_v1_kms_protos", "cloud_orgpolicy_v1_orgpolicy_protos", @@ -35,13 +37,15 @@ # Used in _generate_proto_requires(): the *.deps files are generated from # Bazel and contain a few targets that have incorrect names for CMake. +# +# This list maps onto google_cloud_cpp_load_protodeps()'s `targets_substitutions`. _PROTO_DEPS_REPLACED_TARGETS = { "grafeas_v1_grafeas_protos": "grafeas_protos", + "iam_v2_policy_protos": "iam_v2_protos", + "logging_type_type_protos": "logging_type_protos", "identity_accesscontextmanager_v1_accesscontextmanager_protos": "accesscontextmanager_protos", "cloud_osconfig_v1_osconfig_protos": "osconfig_protos", - "devtools_source_v1_source_protos": "devtools_source_v1_source_context_protos", "cloud_documentai_v1_documentai_protos": "documentai_protos", - "iam_v2_policy_protos": "iam_v2_protos", } # A few *.deps files use ad-hoc naming. @@ -77,7 +81,6 @@ "api_endpoint_protos", "api_launch_stage_protos", "api_documentation_protos", - "devtools_source_v1_source_context_protos", "type_color_protos", "api_distribution_protos", "api_config_change_protos", @@ -114,7 +117,7 @@ "pubsublite", } -# `google-cloud-cpp` managems these dependencies using CMake code. +# `google-cloud-cpp` manages these dependencies using CMake code. _HARD_CODED_DEPENDENCIES = { "api_annotations_protos": ["api_http_protos"], "api_auth_protos": ["api_annotations_protos"], @@ -264,15 +267,10 @@ def main(): proto_components.add(component) proto_components.update(deps) print(f' "{component}": {sorted(deps)},') - print(f' "compute_internal_protos": ["protobuf::libprotobuf"],') print(f' "cloud_extended_operations_protos": ["protobuf::libprotobuf"],') - proto_components.add("compute_internal_protos") + print(f' "compute_protos": ["cloud_extended_operations_protos", "protobuf::libprotobuf"],') proto_components.add("cloud_extended_operations_protos") - for component in sorted(components): - if not component.startswith("compute_"): - continue - proto_components.add(component + "_protos") - print(f' "{component}_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"],') + proto_components.add("compute_protos") print("}") proto_components = proto_components - _PROTO_DEPS_COMMON_REQUIRES names = ['"%s"' % c for c in proto_components] diff --git a/recipes/google-cloud-cpp/2.x/patches/2.12.0/001-use-conan-msvc-runtime.patch b/recipes/google-cloud-cpp/2.x/patches/2.12.0/001-use-conan-msvc-runtime.patch deleted file mode 100644 index bfefce3078428..0000000000000 --- a/recipes/google-cloud-cpp/2.x/patches/2.12.0/001-use-conan-msvc-runtime.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index faab325a..657abd4c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -53,7 +53,6 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - endif () - - list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) --include(SelectMSVCRuntime) - - option(GOOGLE_CLOUD_CPP_ENABLE_MACOS_OPENSSL_CHECK - "If enabled, check that the user has defined OPENSSL_ROOT_DIR on macOS" -diff --git a/cmake/GoogleCloudCppCommon.cmake b/cmake/GoogleCloudCppCommon.cmake -index b487a1bc..880c98fe 100644 ---- a/cmake/GoogleCloudCppCommon.cmake -+++ b/cmake/GoogleCloudCppCommon.cmake -@@ -17,9 +17,6 @@ - # Get the destination directories based on the GNU recommendations. - include(GNUInstallDirs) - --# Pick the right MSVC runtime libraries. --include(SelectMSVCRuntime) -- - # Enable Werror - include(EnableWerror) - -diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt -index 0cb7a9ae..d9016a0b 100644 ---- a/examples/CMakeLists.txt -+++ b/examples/CMakeLists.txt -@@ -14,9 +14,6 @@ - # limitations under the License. - # ~~~ - --# Pick the right MSVC runtime libraries. --include(SelectMSVCRuntime) -- - add_executable(gcs2cbt gcs2cbt.cc) - target_link_libraries(gcs2cbt google-cloud-cpp::bigtable - google-cloud-cpp::storage google-cloud-cpp::grpc_utils) -diff --git a/external/googleapis/CMakeLists.txt b/external/googleapis/CMakeLists.txt -index 03535ff8..2b05c214 100644 ---- a/external/googleapis/CMakeLists.txt -+++ b/external/googleapis/CMakeLists.txt -@@ -157,8 +157,6 @@ if (PROTO_INCLUDE_DIR) - list(INSERT PROTOBUF_IMPORT_DIRS 0 "${PROTO_INCLUDE_DIR}") - endif () - --include(SelectMSVCRuntime) -- - google_cloud_cpp_add_protos_property() - - function (external_googleapis_short_name var proto) diff --git a/recipes/google-cloud-cpp/2.x/patches/2.28.0/001-add-find-package-threads.patch b/recipes/google-cloud-cpp/2.x/patches/2.28.0/001-add-find-package-threads.patch new file mode 100644 index 0000000000000..00d1143424d10 --- /dev/null +++ b/recipes/google-cloud-cpp/2.x/patches/2.28.0/001-add-find-package-threads.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 96297b4a..f274a111 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -218,6 +218,7 @@ add_custom_target(google-cloud-cpp-protos) + add_custom_target(doxygen-docs) + add_custom_target(all-docfx) + ++find_package(Threads REQUIRED) + find_package(absl CONFIG REQUIRED) + if (GOOGLE_CLOUD_CPP_ENABLE_GRPC) + find_package(gRPC REQUIRED QUIET) diff --git a/recipes/google-cloud-cpp/config.yml b/recipes/google-cloud-cpp/config.yml index bb19be722c391..5960fb5919b52 100644 --- a/recipes/google-cloud-cpp/config.yml +++ b/recipes/google-cloud-cpp/config.yml @@ -9,9 +9,9 @@ versions: folder: "all" "1.40.1": folder: "all" - "2.12.0": - folder: "2.x" "2.15.1": folder: "2.x" "2.19.0": folder: "2.x" + "2.28.0": + folder: "2.x" diff --git a/recipes/grpc/all/conanfile.py b/recipes/grpc/all/conanfile.py index e8ae71aeb20b8..846221d92beaf 100644 --- a/recipes/grpc/all/conanfile.py +++ b/recipes/grpc/all/conanfile.py @@ -77,7 +77,7 @@ def _supports_libsystemd(self): def export(self): copy(self, f"target_info/grpc_{self.version}.yml", src=self.recipe_folder, dst=self.export_folder) - + def export_sources(self): copy(self, "conan_cmake_project_include.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) copy(self, f"cmake/{self._grpc_plugin_template}", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) @@ -101,12 +101,14 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - # abseil is public. See https://github.com/conan-io/conan-center-index/pull/17284#issuecomment-1526082638 + # abseil requires: + # transitive_headers=True because grpc headers include abseil headers + # transitive_libs=True because generated code (grpc_cpp_plugin) require symbols from abseil if Version(self.version) >= "1.62.0": self.requires("protobuf/5.27.0", transitive_headers=True) - self.requires("abseil/[>=20240116.1 <20240117.0]", transitive_headers=True) + self.requires("abseil/[>=20240116.1 <20240117.0]", transitive_headers=True, transitive_libs=True) else: - self.requires("abseil/[>=20230125.3 <=20230802.1]", transitive_headers=True) + self.requires("abseil/[>=20230125.3 <=20230802.1]", transitive_headers=True, transitive_libs=True) self.requires("protobuf/3.21.12", transitive_headers=True) self.requires("c-ares/[>=1.19.1 <2]") self.requires("openssl/[>=1.1 <4]") @@ -195,6 +197,9 @@ def generate(self): if self._supports_libsystemd: tc.cache_variables["gRPC_USE_SYSTEMD"] = self.options.with_libsystemd + + if Version(self.version) >= "1.62.0": + tc.cache_variables["gRPC_DOWNLOAD_ARCHIVES"] = False tc.generate() @@ -225,7 +230,7 @@ def _patch_sources(self): 'COMMAND ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=$:$ENV{LD_LIBRARY_PATH}" ${_gRPC_PROTOBUF_PROTOC_EXECUTABLE}') if self.settings.os == "Macos" and Version(self.version) >= "1.64": # See https://github.com/grpc/grpc/issues/36654#issuecomment-2228569158 - replace_in_file(self, cmakelists, "target_compile_features(upb_textformat_lib PUBLIC cxx_std_14)", + replace_in_file(self, cmakelists, "target_compile_features(upb_textformat_lib PUBLIC cxx_std_14)", """target_compile_features(upb_textformat_lib PUBLIC cxx_std_14) target_link_options(upb_textformat_lib PRIVATE -Wl,-undefined,dynamic_lookup) target_link_options(upb_json_lib PRIVATE -Wl,-undefined,dynamic_lookup) diff --git a/recipes/gstreamer/all/conandata.yml b/recipes/gstreamer/all/conandata.yml index b40d98596b59c..e9f1bbcb66bfb 100644 --- a/recipes/gstreamer/all/conandata.yml +++ b/recipes/gstreamer/all/conandata.yml @@ -1,10 +1,10 @@ sources: + "1.24.7": + url: "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.24.7.tar.xz" + sha256: "c0e75b124c52bb7a0c3dcdb734b2ad260ea7286a8745cf2ea629d4c849e6a958" "1.22.6": url: "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.22.6.tar.xz" sha256: "f500e6cfddff55908f937711fc26a0840de28a1e9ec49621c0b6f1adbd8f818e" - "1.22.3": - url: "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.22.3.tar.xz" - sha256: "9ffeab95053f9f6995eb3b3da225e88f21c129cd60da002d3f795db70d6d5974" "1.20.6": url: "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.20.6.tar.xz" sha256: "0545b030960680f71a95f9d39c95daae54b4d317d335e8f239d81138773c9b90" @@ -17,12 +17,6 @@ sources: "1.18.4": url: "https://gitlab.freedesktop.org/gstreamer/gstreamer/-/archive/1.18.4/gstreamer-1.18.4.tar.gz" sha256: "f0956c2056281f5909d030945a9896810e55084f29b6bcfc401b53e91ddf1c7f" - "1.18.3": - url: "https://gitlab.freedesktop.org/gstreamer/gstreamer/-/archive/1.18.3/gstreamer-1.18.3.tar.gz" - sha256: "d7e3917b5d3d9c3bd9bb70b7500314a5725377cff39bcd818df13c1fda0f60ba" - "1.18.0": - sha256: "f072da67b6dad9b4aecf2cb594aaaa66f86c22af9ba80503b90f957d47015ef8" - url: "https://gitlab.freedesktop.org/gstreamer/gstreamer/-/archive/1.18.0/gstreamer-1.18.0.tar.bz2" "1.16.2": - sha256: "dac037ab84d557f5d4e6e66e833f6bf8cf4f84671a311e0b2df99f9b30a9d693" url: "https://gitlab.freedesktop.org/gstreamer/gstreamer/-/archive/1.16.2/gstreamer-1.16.2.tar.bz2" + sha256: "dac037ab84d557f5d4e6e66e833f6bf8cf4f84671a311e0b2df99f9b30a9d693" diff --git a/recipes/gstreamer/all/conanfile.py b/recipes/gstreamer/all/conanfile.py index 5f3d9d604b6b9..71de230e0d57a 100644 --- a/recipes/gstreamer/all/conanfile.py +++ b/recipes/gstreamer/all/conanfile.py @@ -7,6 +7,7 @@ from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain from conan.tools.microsoft import is_msvc, check_min_vs +from conan.tools.scm import Version import glob import os @@ -63,13 +64,13 @@ def validate(self): raise ConanInvalidConfiguration("shared GStreamer cannot link to static GLib") def build_requirements(self): - self.tool_requires("meson/1.3.0") + self.tool_requires("meson/[>=1.2.3 <2]") # There used to be an issue with glib being shared by default but its dependencies being static # No longer the case, but see: https://github.com/conan-io/conan-center-index/pull/13400#issuecomment-1551565573 for context if not self._is_legacy_one_profile: self.tool_requires("glib/") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.1.0") + self.tool_requires("pkgconf/[>=2.2 <3]") if self.options.with_introspection: self.tool_requires("gobject-introspection/1.72.0") if self._settings_build.os == 'Windows': @@ -151,7 +152,7 @@ def package_info(self): self.cpp_info.components["gstreamer-1.0"].libs = ["gstreamer-1.0"] self.cpp_info.components["gstreamer-1.0"].includedirs = [os.path.join("include", "gstreamer-1.0")] if self.settings.os == "Linux": - self.cpp_info.components["gstreamer-1.0"].system_libs = ["m"] + self.cpp_info.components["gstreamer-1.0"].system_libs = ["m", "dl", "nsl"] self.cpp_info.components["gstreamer-1.0"].set_property("pkg_config_custom_content", pkgconfig_custom_content) self.cpp_info.components["gstreamer-base-1.0"].set_property("pkg_config_name", "gstreamer-base-1.0") @@ -173,6 +174,8 @@ def package_info(self): self.cpp_info.components["gstreamer-net-1.0"].set_property("pkg_config_name", "gstreamer-net-1.0") self.cpp_info.components["gstreamer-net-1.0"].names["pkg_config"] = "gstreamer-net-1.0" self.cpp_info.components["gstreamer-net-1.0"].requires = ["gstreamer-1.0", "glib::gio-2.0"] + if Version(self.version) >= "1.21.1" and self.settings.os != "Windows": + self.cpp_info.components["gstreamer-net-1.0"].requires.append("glib::gio-unix-2.0") self.cpp_info.components["gstreamer-net-1.0"].libs = ["gstnet-1.0"] self.cpp_info.components["gstreamer-net-1.0"].includedirs = [os.path.join("include", "gstreamer-1.0")] self.cpp_info.components["gstreamer-net-1.0"].set_property("pkg_config_custom_content", pkgconfig_custom_content) @@ -186,7 +189,7 @@ def package_info(self): self.cpp_info.components["gstreamer-check-1.0"].system_libs = ["rt", "m"] self.cpp_info.components["gstreamer-check-1.0"].set_property("pkg_config_custom_content", pkgconfig_custom_content) - # gstcoreelements and gstcoretracers are plugins which should be loaded dynamicaly, and not linked to directly + # gstcoreelements and gstcoretracers are plugins which should be loaded dynamically, and not linked to directly if not self.options.shared: self.cpp_info.components["gstcoreelements"].set_property("pkg_config_name", "gstcoreelements") self.cpp_info.components["gstcoreelements"].names["pkg_config"] = "gstcoreelements" diff --git a/recipes/gstreamer/config.yml b/recipes/gstreamer/config.yml index a3f838574c2f1..99cca4b40e56f 100644 --- a/recipes/gstreamer/config.yml +++ b/recipes/gstreamer/config.yml @@ -1,7 +1,7 @@ versions: - "1.22.6": + "1.24.7": folder: all - "1.22.3": + "1.22.6": folder: all "1.20.6": folder: all @@ -11,9 +11,5 @@ versions: folder: all "1.18.4": folder: all - "1.18.3": - folder: all - "1.18.0": - folder: all "1.16.2": folder: all diff --git a/recipes/hdf5/all/conanfile.py b/recipes/hdf5/all/conanfile.py index 5a2f1eb605129..578e4cc1795c2 100644 --- a/recipes/hdf5/all/conanfile.py +++ b/recipes/hdf5/all/conanfile.py @@ -17,7 +17,7 @@ class Hdf5Conan(ConanFile): description = "HDF5 is a data model, library, and file format for storing and managing data." license = "BSD-3-Clause" topics = "hdf", "data" - homepage = "https://portal.hdfgroup.org/display/HDF5/HDF5" + homepage = "https://www.hdfgroup.org/solutions/hdf5/" url = "https://github.com/conan-io/conan-center-index" package_type = "library" settings = "os", "arch", "compiler", "build_type" diff --git a/recipes/hwdata/all/conandata.yml b/recipes/hwdata/all/conandata.yml index e9aebcb14c2d1..4dd2a08c35c6b 100644 --- a/recipes/hwdata/all/conandata.yml +++ b/recipes/hwdata/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.385": + url: "https://github.com/vcrhonek/hwdata/archive/v0.385.tar.gz" + sha256: "577219d44d9686e8177f6291adbff7bacdd785ad4e8a8d0c4b2a14dbf850d6ac" "0.382": url: "https://github.com/vcrhonek/hwdata/archive/v0.382.tar.gz" sha256: "5e25457b562a5227eb77eac21d5e4344bd1183c7d62b41e7d3e780ae33e053c1" diff --git a/recipes/hwdata/config.yml b/recipes/hwdata/config.yml index f134cf723e787..329f229df7ce9 100644 --- a/recipes/hwdata/config.yml +++ b/recipes/hwdata/config.yml @@ -1,4 +1,6 @@ versions: + "0.385": + folder: all "0.382": folder: all "0.378": diff --git a/recipes/hwloc/all/conandata.yml b/recipes/hwloc/all/conandata.yml index 1f50c80dd4055..98b2b2bec0fbe 100644 --- a/recipes/hwloc/all/conandata.yml +++ b/recipes/hwloc/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.11.1": + url: "https://download.open-mpi.org/release/hwloc/v2.11/hwloc-2.11.1.tar.bz2" + sha256: "04cdfbffad225ce15f66184f0f4141327dabf288d10a8b84d13f517acb7870c6" "2.10.0": url: "https://download.open-mpi.org/release/hwloc/v2.10/hwloc-2.10.0.tar.bz2" sha256: "0305dd60c9de2fbe6519fe2a4e8fdc6d3db8de574a0ca7812b92e80c05ae1392" diff --git a/recipes/hwloc/config.yml b/recipes/hwloc/config.yml index 2da6ef856dca9..c94edb0b5eb63 100644 --- a/recipes/hwloc/config.yml +++ b/recipes/hwloc/config.yml @@ -1,4 +1,6 @@ versions: + "2.11.1": + folder: all "2.10.0": folder: all "2.9.3": diff --git a/recipes/imgui/all/conandata.yml b/recipes/imgui/all/conandata.yml index 13e8b4cdf2bb6..121bde17f2f83 100644 --- a/recipes/imgui/all/conandata.yml +++ b/recipes/imgui/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.91.0": + url: "https://github.com/ocornut/imgui/archive/v1.91.0.tar.gz" + sha256: "6e62c87252e6b3725ba478a1c04dc604aa0aaeec78fedcf4011f1e52548f4cc9" + "1.91.0-docking": + url: "https://github.com/ocornut/imgui/archive/v1.91.0-docking.tar.gz" + sha256: "b08a569eedcf2bf25e763e034754fdbe37dfcb035072310781c92fa6e6504bf7" "1.90.9": url: "https://github.com/ocornut/imgui/archive/v1.90.9.tar.gz" sha256: "04943919721e874ac75a2f45e6eb6c0224395034667bf508923388afda5a50bf" diff --git a/recipes/imgui/config.yml b/recipes/imgui/config.yml index a40371b3d6a3b..25bef8f3ff274 100644 --- a/recipes/imgui/config.yml +++ b/recipes/imgui/config.yml @@ -1,4 +1,8 @@ versions: + "1.91.0": + folder: all + "1.91.0-docking": + folder: all "1.90.9": folder: all "1.90.9-docking": diff --git a/recipes/intx/all/conandata.yml b/recipes/intx/all/conandata.yml index 82ca4023ed3e5..5e7cb7a5f366d 100644 --- a/recipes/intx/all/conandata.yml +++ b/recipes/intx/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.12.0": + url: "https://github.com/chfast/intx/archive/v0.12.0.tar.gz" + sha256: "d68ff5dde9a2f340c73be67888f3f72bb18a2ad30aa16cd663ec3bc611afc9b4" + "0.11.0": + url: "https://github.com/chfast/intx/archive/v0.11.0.tar.gz" + sha256: "bff2a78e3a9a3b9bbabf50500feae65bc0ec50a2364f4a83768277d6eba7a844" "0.10.1": url: "https://github.com/chfast/intx/archive/v0.10.1.tar.gz" sha256: "4663073458b5e0564e92058e5aa1a7ce88634fc72827191856b17bd7335de29b" diff --git a/recipes/intx/all/conanfile.py b/recipes/intx/all/conanfile.py index fcbc0174dcfbb..813526a90e8a3 100644 --- a/recipes/intx/all/conanfile.py +++ b/recipes/intx/all/conanfile.py @@ -17,14 +17,12 @@ class IntxConan(ConanFile): topics = ("evm", "biginteger", "arbitrary-precision", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" + no_copy_source = True @property def _min_cppstd(self): return 20 - def layout(self): - basic_layout(self, src_folder="src") - @property def _compilers_minimum_version(self): return { @@ -35,13 +33,15 @@ def _compilers_minimum_version(self): "apple-clang": "14.1", } + def layout(self): + basic_layout(self, src_folder="src") + def package_id(self): self.info.clear() def validate(self): - if self.settings.get_safe("compiler.cppstd"): + if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version and Version(self.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration( @@ -63,3 +63,6 @@ def package(self): def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] + + self.cpp_info.set_property("cmake_file_name", "intx") + self.cpp_info.set_property("cmake_target_name", "intx::intx") diff --git a/recipes/intx/config.yml b/recipes/intx/config.yml index 36cf695df0df6..85ca9aa067b7a 100644 --- a/recipes/intx/config.yml +++ b/recipes/intx/config.yml @@ -1,3 +1,7 @@ versions: + "0.12.0": + folder: all + "0.11.0": + folder: all "0.10.1": folder: all diff --git a/recipes/iphreeqc/all/conandata.yml b/recipes/iphreeqc/all/conandata.yml new file mode 100644 index 0000000000000..a249b379218dd --- /dev/null +++ b/recipes/iphreeqc/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "3.8.1": + url: "https://github.com/usgs-coupled/iphreeqc/releases/download/v3.8.1/iphreeqc-3.8.1-16963.tar.gz" + sha256: "15c47959a25e6c8b5d0c47214ea0c3f3626257dacc24a89d0f9c9635186c375c" +patches: + "3.8.1": + - patch_file: "patches/3.8.1-0001-dont-build-examples-doc-database.patch" + patch_description: "Don't build examples, doc and database" + patch_type: "conan" diff --git a/recipes/iphreeqc/all/conanfile.py b/recipes/iphreeqc/all/conanfile.py new file mode 100644 index 0000000000000..84c2b765e8d90 --- /dev/null +++ b/recipes/iphreeqc/all/conanfile.py @@ -0,0 +1,101 @@ +from conan import ConanFile +from conan.tools.build import stdcpp_library +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.microsoft import msvc_runtime_flag +import os + +required_conan_version = ">=1.54.0" + + +class IphreeqcConan(ConanFile): + name = "iphreeqc" + description = ( + "Library implementing the geochemical model PHREEQC. It is capable of " + "simulating a wide range of equilibrium reactions between water and " + "minerals, ion exchangers, surface complexes, solid solutions, and gases." + ) + license = "FSFUL" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.usgs.gov/software/phreeqc-version-3" + topics = ("geochemistry", "modeling") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _is_cl_like(self): + return self.settings.compiler.get_safe("runtime") is not None + + @property + def _is_cl_like_static_runtime(self): + return self._is_cl_like and "MT" in msvc_runtime_flag(self) + + 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 build_requirements(self): + self.tool_requires("cmake/[>=3.20 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + if self._is_cl_like: + tc.variables["IPHREEQC_STATIC_RUNTIME"] = self._is_cl_like_static_runtime + tc.variables["IPHREEQC_ENABLE_MODULE"] = False + tc.variables["IPHREEQC_FORTRAN_TESTING"] = False + tc.variables["BUILD_CLR_LIBS"] = False + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "INSTALL", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "src")) + rmdir(self, os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "IPhreeqc") + self.cpp_info.set_property("cmake_target_name", "IPhreeqc::IPhreeqc") + postfix = "" + if self.settings.build_type == "Debug": + postfix += "d" + elif self.settings.build_type == "MinSizeRel": + postfix += "msr" + elif self.settings.build_type == "RelWithDebInfo": + postfix += "rwd" + self.cpp_info.libs = [f"IPhreeqc{postfix}"] + self.cpp_info.defines.append("IPHREEQC_NO_FORTRAN_MODULE") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + if not self.options.shared: + libcxx = stdcpp_library(self) + if libcxx: + self.cpp_info.system_libs.append(libcxx) diff --git a/recipes/iphreeqc/all/patches/3.8.1-0001-dont-build-examples-doc-database.patch b/recipes/iphreeqc/all/patches/3.8.1-0001-dont-build-examples-doc-database.patch new file mode 100644 index 0000000000000..3704fa470a6a6 --- /dev/null +++ b/recipes/iphreeqc/all/patches/3.8.1-0001-dont-build-examples-doc-database.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -400,7 +400,7 @@ endif() + + include (CTest) + +-if (STANDALONE_BUILD) ++if (0) + + add_subdirectory(database) + add_subdirectory(doc) diff --git a/recipes/iphreeqc/all/test_package/CMakeLists.txt b/recipes/iphreeqc/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..13618cfaf693e --- /dev/null +++ b/recipes/iphreeqc/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(IPhreeqc REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE IPhreeqc::IPhreeqc) diff --git a/recipes/iphreeqc/all/test_package/conanfile.py b/recipes/iphreeqc/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/iphreeqc/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/iphreeqc/all/test_package/test_package.c b/recipes/iphreeqc/all/test_package/test_package.c new file mode 100644 index 0000000000000..f29ed23c37243 --- /dev/null +++ b/recipes/iphreeqc/all/test_package/test_package.c @@ -0,0 +1,8 @@ +#include + +int main() +{ + int id = CreateIPhreeqc(); + DestroyIPhreeqc(id); + return 0; +} diff --git a/recipes/iphreeqc/config.yml b/recipes/iphreeqc/config.yml new file mode 100644 index 0000000000000..f3cf585c380d6 --- /dev/null +++ b/recipes/iphreeqc/config.yml @@ -0,0 +1,3 @@ +versions: + "3.8.1": + folder: all diff --git a/recipes/itk/all/conanfile.py b/recipes/itk/all/conanfile.py index c9a9ded1e49f4..61b826eb365a1 100644 --- a/recipes/itk/all/conanfile.py +++ b/recipes/itk/all/conanfile.py @@ -69,14 +69,14 @@ def requirements(self): #self.requires("dcmtk/3.6.7") self.requires("double-conversion/3.3.0") self.requires("eigen/3.4.0") - self.requires("expat/2.5.0") + self.requires("expat/[>=2.6.2 <3]") self.requires("fftw/3.3.10") - self.requires("gdcm/3.0.21") - self.requires("hdf5/1.14.1") + self.requires("gdcm/3.0.23") + self.requires("hdf5/1.14.3") self.requires("libjpeg/9e") - self.requires("libpng/1.6.40") - self.requires("libtiff/4.5.1") - self.requires("openjpeg/2.5.0") + self.requires("libpng/[>=1.6 <2]") + self.requires("libtiff/4.6.0") + self.requires("openjpeg/2.5.2") self.requires("onetbb/2021.9.0") self.requires("zlib/[>=1.2.11 <2]") @@ -93,6 +93,9 @@ def validate(self): raise ConanInvalidConfiguration( f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) + if Version(self.version) < "5.2" and self.settings.os == "Macos": + raise ConanInvalidConfiguration(f"{self.ref} fails to compile in {self.settings.os}, fixed in 5.2.0") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/itlib/all/conandata.yml b/recipes/itlib/all/conandata.yml index 3ed398c5a2d7b..0e171d0bc94a0 100644 --- a/recipes/itlib/all/conandata.yml +++ b/recipes/itlib/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.11.3": + url: "https://github.com/iboB/itlib/archive/v1.11.3.tar.gz" + sha256: "38999b3c4c2425ac3700529457fb2683d6fa5853752747c3afb97b2e688255b8" + "1.11.2": + url: "https://github.com/iboB/itlib/archive/v1.11.2.tar.gz" + sha256: "bbf734f6084af77a1e886e54e4efadab491ada242f5858afa561353db6a0a03f" "1.11.1": url: "https://github.com/iboB/itlib/archive/v1.11.1.tar.gz" sha256: "2c60e02660ea63dfb7a39237e29b30a066670cef228d22e8d0908e1fff2fa7f1" diff --git a/recipes/itlib/config.yml b/recipes/itlib/config.yml index 63c4029aead7b..e096818e5b805 100644 --- a/recipes/itlib/config.yml +++ b/recipes/itlib/config.yml @@ -1,4 +1,8 @@ versions: + "1.11.3": + folder: all + "1.11.2": + folder: all "1.11.1": folder: all "1.10.3": diff --git a/recipes/jsoncons/all/conandata.yml b/recipes/jsoncons/all/conandata.yml index aca299f96976a..488712d110383 100644 --- a/recipes/jsoncons/all/conandata.yml +++ b/recipes/jsoncons/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.177.0": + url: "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.177.0.tar.gz" + sha256: "a381d58489f143a3a515484f4ad6e32ae4d977033e1a455fecf8cdc4e2c9a49e" "0.176.0": url: "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.176.0.tar.gz" sha256: "2eb50b5cbe204265fef96c052511ed6e3b8808935c6e2c8d28e0aba7b08fda33" diff --git a/recipes/jsoncons/config.yml b/recipes/jsoncons/config.yml index 6025c4b0dd2aa..57cfc555c3f95 100644 --- a/recipes/jsoncons/config.yml +++ b/recipes/jsoncons/config.yml @@ -1,4 +1,6 @@ versions: + "0.177.0": + folder: "all" "0.176.0": folder: "all" "0.175.0": diff --git a/recipes/jsonifier/all/conandata.yml b/recipes/jsonifier/all/conandata.yml index b2b7a5da8d77b..d326552c7b2a5 100644 --- a/recipes/jsonifier/all/conandata.yml +++ b/recipes/jsonifier/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.9.97": + url: "https://github.com/RealTimeChris/Jsonifier/archive/refs/tags/v0.9.97.tar.gz" + sha256: "68828c982a994862b02bcee562ee4e6d7cc461013ac3d4dcb98c0f1581049924" "0.9.96": url: "https://github.com/RealTimeChris/Jsonifier/archive/refs/tags/v0.9.96.tar.gz" sha256: "9f2658282f53680be0121091adacc8f82b2de5b95c31bc6eadb98802c0aa59f0" diff --git a/recipes/jsonifier/config.yml b/recipes/jsonifier/config.yml index 4072492ec419c..f8a1d2a6df61b 100644 --- a/recipes/jsonifier/config.yml +++ b/recipes/jsonifier/config.yml @@ -1,4 +1,6 @@ versions: + "0.9.97": + folder: all "0.9.96": folder: all "0.9.95": diff --git a/recipes/jwt-cpp/all/conanfile.py b/recipes/jwt-cpp/all/conanfile.py index 1e09b3d6625c7..9a7ee532d7797 100644 --- a/recipes/jwt-cpp/all/conanfile.py +++ b/recipes/jwt-cpp/all/conanfile.py @@ -16,9 +16,12 @@ class JwtCppConan(ConanFile): package_type = "header-library" settings = "os", "arch", "compiler", "build_type" + options = { "with_picojson": [True, False] } + default_options = { "with_picojson" : False } + @property - def _supports_generic_json(self): - return Version(self.version) >= "0.5.0" + def _with_picojson(self): + return Version(self.version) < "0.5.0" or self.options.with_picojson def export_sources(self): export_conandata_patches(self) @@ -28,7 +31,7 @@ def layout(self): def requirements(self): self.requires("openssl/[>=1.1 <4]") - if not self._supports_generic_json: + if self._with_picojson: self.requires("picojson/1.3.0") def package_id(self): @@ -48,9 +51,11 @@ def package(self): def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - + self.cpp_info.requires = ["openssl::openssl"] + if self._with_picojson: + self.cpp_info.requires.append("picojson::picojson") + else: + self.cpp_info.defines.append("JWT_DISABLE_PICOJSON") self.cpp_info.set_property("cmake_file_name", "jwt-cpp") self.cpp_info.set_property("cmake_target_name", "jwt-cpp::jwt-cpp") - if self._supports_generic_json: - self.cpp_info.defines.append("JWT_DISABLE_PICOJSON") diff --git a/recipes/keychain/all/conandata.yml b/recipes/keychain/all/conandata.yml index 1c93eb4e4837d..f10687c09e1bc 100644 --- a/recipes/keychain/all/conandata.yml +++ b/recipes/keychain/all/conandata.yml @@ -1,10 +1,10 @@ sources: - "1.2.0": - url: "https://github.com/hrantzsch/keychain/archive/v1.2.0.tar.gz" - sha256: "82cc66a7fa12af43f3e2efeb378bacb0a514056617e369430f252da2392acaae" - "1.2.1": - url: "https://github.com/hrantzsch/keychain/archive/v1.2.1.tar.gz" - sha256: "725cc30da0451403713dee648edd06686fdc31b5041e75e3350e6056c78de076" "1.3.0": url: "https://github.com/hrantzsch/keychain/archive/refs/tags/v1.3.0.tar.gz" sha256: "0e2eb3c6ca2c62253f7d28a478d0cb3eeb4b9656b33d2946e1a294361f72809c" + "1.2.1": + url: "https://github.com/hrantzsch/keychain/archive/v1.2.1.tar.gz" + sha256: "725cc30da0451403713dee648edd06686fdc31b5041e75e3350e6056c78de076" + "1.2.0": + url: "https://github.com/hrantzsch/keychain/archive/v1.2.0.tar.gz" + sha256: "82cc66a7fa12af43f3e2efeb378bacb0a514056617e369430f252da2392acaae" diff --git a/recipes/keychain/all/conanfile.py b/recipes/keychain/all/conanfile.py index 64b3ee8743d71..5a1130d8d16d6 100644 --- a/recipes/keychain/all/conanfile.py +++ b/recipes/keychain/all/conanfile.py @@ -1,53 +1,59 @@ +import os + from conan import ConanFile from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import collect_libs, copy, get, replace_in_file from conan.tools.gnu import PkgConfigDeps -import os - class KeychainConan(ConanFile): name = "keychain" + description = ( + "A cross-platform wrapper for the operating system's credential storage" + ) + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/hrantzsch/keychain" - description = "A cross-platform wrapper for the operating system's credential storage" topics = ("keychain", "security", "credentials", "password", "cpp11") - url = "https://github.com/conan-io/conan-center-index" - license = "MIT" package_type = "library" settings = "os", "arch", "compiler", "build_type" - options = {'shared': [False, True], 'fPIC': [False, True]} + options = {"shared": [False, True], "fPIC": [False, True]} default_options = {"shared": False, "fPIC": True} def config_options(self): - if self.settings.os == 'Windows': + if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: self.options.rm_safe("fPIC") - def validate(self): - if self.settings.get_safe("compiler.cppstd"): - check_min_cppstd(self, 11) + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): if self.settings.os == "Linux": self.requires("libsecret/0.20.5") - self.requires("glib/2.78.1") + self.requires("glib/2.78.3") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) def build_requirements(self): if self.settings.os == "Linux": self.tool_requires("pkgconf/2.0.3") - def layout(self): - cmake_layout(self, src_folder="src") - def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) # Ensure .dll is installed on Windows - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), - "TARGETS ${PROJECT_NAME}", "TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin") + replace_in_file( + self, + os.path.join(self.source_folder, "CMakeLists.txt"), + "TARGETS ${PROJECT_NAME}", + "TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin", + ) def generate(self): tc = CMakeToolchain(self) @@ -64,14 +70,21 @@ def build(self): cmake.build() def package(self): - copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder, + ) cmake = CMake(self) cmake.install() def package_info(self): self.cpp_info.libs = collect_libs(self) - if self.settings.os == 'Macos': - self.cpp_info.frameworks = ['Security', 'CoreFoundation'] + if self.settings.os == "Macos": + self.cpp_info.frameworks = ["Security", "CoreFoundation"] if self.settings.os == "Windows": - self.cpp_info.system_libs = ['crypt32'] + self.cpp_info.system_libs = ["crypt32"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m"] diff --git a/recipes/keychain/config.yml b/recipes/keychain/config.yml index fd230ff5e48d0..21c776e737e77 100644 --- a/recipes/keychain/config.yml +++ b/recipes/keychain/config.yml @@ -1,7 +1,7 @@ versions: - "1.2.0": + "1.3.0": folder: all "1.2.1": folder: all - "1.3.0": + "1.2.0": folder: all diff --git a/recipes/libalsa/all/conandata.yml b/recipes/libalsa/all/conandata.yml index c612ddb389783..3c307f42aa636 100644 --- a/recipes/libalsa/all/conandata.yml +++ b/recipes/libalsa/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.12": + url: "https://github.com/alsa-project/alsa-lib/archive/v1.2.12.tar.gz" + sha256: "f067dbba9376e5bbbb417b77751d2a9f2f277c54fb3a2b5c023cc2c7dfb4e3c1" "1.2.10": url: "https://github.com/alsa-project/alsa-lib/archive/v1.2.10.tar.gz" sha256: "f55749847fd98274501f4691a2d847e89280c07d40a43cdac43d6443f69fc939" diff --git a/recipes/libalsa/all/conanfile.py b/recipes/libalsa/all/conanfile.py index 8c3046d892f5a..eff1547ac38a9 100644 --- a/recipes/libalsa/all/conanfile.py +++ b/recipes/libalsa/all/conanfile.py @@ -12,12 +12,12 @@ class LibalsaConan(ConanFile): name = "libalsa" + description = "Library of ALSA: The Advanced Linux Sound Architecture, that provides audio " \ + "and MIDI functionality to the Linux operating system" license = "LGPL-2.1-or-later" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/alsa-project/alsa-lib" topics = ("alsa", "sound", "audio", "midi") - description = "Library of ALSA: The Advanced Linux Sound Architecture, that provides audio " \ - "and MIDI functionality to the Linux operating system" package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { diff --git a/recipes/libalsa/config.yml b/recipes/libalsa/config.yml index ce651c2f0d63a..a734abbf480ed 100644 --- a/recipes/libalsa/config.yml +++ b/recipes/libalsa/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.12": + folder: all "1.2.10": folder: all "1.2.7.2": diff --git a/recipes/libaom-av1/all/conandata.yml b/recipes/libaom-av1/all/conandata.yml index bb3a5a205cc9f..a094fca193ea9 100644 --- a/recipes/libaom-av1/all/conandata.yml +++ b/recipes/libaom-av1/all/conandata.yml @@ -1,34 +1,25 @@ sources: + "3.8.0": + url: "https://storage.googleapis.com/aom-releases/libaom-3.8.0.tar.gz" + sha256: "a768d3e54c7f00cd38b01208d1ae52d671be410cfc387ff7881ea71c855f3600" "3.6.1": url: "https://storage.googleapis.com/aom-releases/libaom-3.6.1.tar.gz" sha256: "42b862f58b3d00bd3902d2dc469526574f5b012e5b178e6a9652845a113d6887" - "3.6.0": - url: "https://storage.googleapis.com/aom-releases/libaom-3.6.0.tar.gz" - sha256: "a4a6c0fab685da743b796662a928fcdf7ae60594edc306efb73e78a17ea6cde6" "3.5.0": url: "https://storage.googleapis.com/aom-releases/libaom-3.5.0.tar.gz" sha256: "d37dbee372e2430a7efde813984ae6d78bdf1fc4080ebe32457c9115408b0738" "3.4.0": url: "https://storage.googleapis.com/aom-releases/libaom-3.4.0.tar.gz" sha256: "bd754b58c3fa69f3ffd29da77de591bd9c26970e3b18537951336d6c0252e354" - "3.3.0": - url: "https://storage.googleapis.com/aom-releases/libaom-3.3.0.tar.gz" - sha256: "1dafde32bc2237bf0570294661ae61db30e818840f77dc4e90d1ebf5a6286664" - "3.1.2": - url: "https://storage.googleapis.com/aom-releases/libaom-3.1.2.tar.gz" - sha256: "a295eb3779657fad7d34217091ee4c6257d02580a82012231afef72792330075" - "3.1.1": - url: "https://storage.googleapis.com/aom-releases/libaom-3.1.1.tar.gz" - sha256: "7cd5e8e469268c37241df93fe61557ea0dc46980ca21b37e786e92a3d0729276" "2.0.1": url: "https://storage.googleapis.com/aom-releases/libaom-2.0.1.tar.gz" sha256: "a0cff299621e2ef885aba219c498fa39a7d9a7ddf47585a118fd66c64ad1b312" patches: - "3.6.1": - - patch_file: "patches/0001-3.4.0-fix-install.patch" + "3.8.0": + - patch_file: "patches/0001-3.8.0-fix-install.patch" patch_type: conan patch_description: Install just aom library without aom_static. - "3.6.0": + "3.6.1": - patch_file: "patches/0001-3.4.0-fix-install.patch" patch_type: conan patch_description: Install just aom library without aom_static. @@ -40,18 +31,6 @@ patches: - patch_file: "patches/0001-3.4.0-fix-install.patch" patch_type: conan patch_description: Install just aom library without aom_static. - "3.3.0": - - patch_file: "patches/0001-3.3.0-fix-install.patch" - patch_type: conan - patch_description: Install just aom library without aom_static. - "3.1.2": - - patch_file: "patches/0001-3.1.1-fix-install.patch" - patch_type: conan - patch_description: Install just aom library without aom_static. - "3.1.1": - - patch_file: "patches/0001-3.1.1-fix-install.patch" - patch_type: conan - patch_description: Install just aom library without aom_static. "2.0.1": - patch_file: "patches/0001-2.0.1-fix-install.patch" patch_type: conan diff --git a/recipes/libaom-av1/all/conanfile.py b/recipes/libaom-av1/all/conanfile.py index 714ea1c7238dd..26d670c71d8c3 100644 --- a/recipes/libaom-av1/all/conanfile.py +++ b/recipes/libaom-av1/all/conanfile.py @@ -52,7 +52,7 @@ def build_requirements(self): if self.options.get_safe("assembly", False): self.tool_requires("nasm/2.15.05") if self._settings_build.os == "Windows": - self.tool_requires("strawberryperl/5.30.0.1") + self.tool_requires("strawberryperl/5.32.1.1") def layout(self): cmake_layout(self, src_folder="src") @@ -94,6 +94,9 @@ def package(self): def package_info(self): self.cpp_info.set_property("pkg_config_name", "aom") - self.cpp_info.libs = ["aom"] + lib = "aom" + if Version(self.version) >= "3.8.0" and self.settings.os == "Windows" and self.options.shared: + lib = "aom_dll" + self.cpp_info.libs = [lib] if self.settings.os in ("FreeBSD", "Linux"): self.cpp_info.system_libs = ["pthread", "m"] diff --git a/recipes/libaom-av1/all/patches/0001-3.1.1-fix-install.patch b/recipes/libaom-av1/all/patches/0001-3.1.1-fix-install.patch deleted file mode 100644 index af10132d05fe7..0000000000000 --- a/recipes/libaom-av1/all/patches/0001-3.1.1-fix-install.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- a/build/cmake/aom_install.cmake -+++ b/build/cmake/aom_install.cmake -@@ -26,7 +26,7 @@ endif() - # Note: aom.pc generation uses GNUInstallDirs: - # https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html - macro(setup_aom_install_targets) -- if(NOT (MSVC OR XCODE)) -+ if(1) - include("GNUInstallDirs") - set(AOM_PKG_CONFIG_FILE "${AOM_CONFIG_DIR}/aom.pc") - -@@ -76,7 +76,8 @@ macro(setup_aom_install_targets) - endif() - - if(BUILD_SHARED_LIBS) -- set(AOM_INSTALL_LIBS aom aom_static) -+ set_target_properties(aom_static PROPERTIES OUTPUT_NAME aom_static) -+ set(AOM_INSTALL_LIBS aom) - else() - set(AOM_INSTALL_LIBS aom) - endif() -@@ -88,8 +89,10 @@ macro(setup_aom_install_targets) - install( - FILES "${AOM_PKG_CONFIG_FILE}" - DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig") -- install(TARGETS ${AOM_INSTALL_LIBS} DESTINATION -- "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") -+ install(TARGETS ${AOM_INSTALL_LIBS} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - - if(ENABLE_EXAMPLES) - install(TARGETS ${AOM_INSTALL_BINS} DESTINATION diff --git a/recipes/libaom-av1/all/patches/0001-3.3.0-fix-install.patch b/recipes/libaom-av1/all/patches/0001-3.8.0-fix-install.patch similarity index 77% rename from recipes/libaom-av1/all/patches/0001-3.3.0-fix-install.patch rename to recipes/libaom-av1/all/patches/0001-3.8.0-fix-install.patch index 0dc76d16fc7f5..1bb2cbdc3adb3 100644 --- a/recipes/libaom-av1/all/patches/0001-3.3.0-fix-install.patch +++ b/recipes/libaom-av1/all/patches/0001-3.8.0-fix-install.patch @@ -1,6 +1,6 @@ ---- a/build/cmake/aom_install.cmake -+++ b/build/cmake/aom_install.cmake -@@ -27,7 +27,7 @@ endif() +--- build/cmake/aom_install.cmake ++++ build/cmake/aom_install.cmake +@@ -27,7 +27,7 @@ # Note: aom.pc generation uses GNUInstallDirs: # https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html macro(setup_aom_install_targets) @@ -9,7 +9,7 @@ include("GNUInstallDirs") set(AOM_PKG_CONFIG_FILE "${AOM_CONFIG_DIR}/aom.pc") -@@ -77,7 +77,8 @@ macro(setup_aom_install_targets) +@@ -79,7 +79,8 @@ endif() if(BUILD_SHARED_LIBS) diff --git a/recipes/libaom-av1/config.yml b/recipes/libaom-av1/config.yml index 2ac5e2242b2d4..45dfabb3e4ed1 100644 --- a/recipes/libaom-av1/config.yml +++ b/recipes/libaom-av1/config.yml @@ -1,17 +1,11 @@ versions: - "3.6.1": + "3.8.0": folder: all - "3.6.0": + "3.6.1": folder: all "3.5.0": folder: all "3.4.0": folder: all - "3.3.0": - folder: all - "3.1.2": - folder: all - "3.1.1": - folder: all "2.0.1": folder: all diff --git a/recipes/libavif/all/conandata.yml b/recipes/libavif/all/conandata.yml index fcc0c8b59fca8..7d4af07ae59e6 100644 --- a/recipes/libavif/all/conandata.yml +++ b/recipes/libavif/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.1": + url: "https://github.com/AOMediaCodec/libavif/archive/refs/tags/v1.1.1.tar.gz" + sha256: "914662e16245e062ed73f90112fbb4548241300843a7772d8d441bb6859de45b" "1.1.0": url: "https://github.com/AOMediaCodec/libavif/archive/refs/tags/v1.1.0.tar.gz" sha256: "edb31951005d7a143be1724f24825809599a4832073add50eaf987733defb5c8" @@ -21,6 +24,10 @@ sources: url: "https://github.com/AOMediaCodec/libavif/archive/refs/tags/v0.9.3.tar.gz" sha256: "bcd9a1f57f982a9615eb7e2faf87236dc88eb1d0c886f3471c7440ead605060d" patches: + "1.1.1": + - patch_file: patches/1.1.1-0001-disable-developer-only-codepaths.patch + patch_description: "disable compiler options for develop" + patch_type: "portability" "1.1.0": - patch_file: patches/1.1.0-0001-disable-developer-only-codepaths.patch patch_description: "disable compiler options for develop" diff --git a/recipes/libavif/all/patches/1.1.1-0001-disable-developer-only-codepaths.patch b/recipes/libavif/all/patches/1.1.1-0001-disable-developer-only-codepaths.patch new file mode 100644 index 0000000000000..00825d66fdb2c --- /dev/null +++ b/recipes/libavif/all/patches/1.1.1-0001-disable-developer-only-codepaths.patch @@ -0,0 +1,38 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index baf5964..dc3704e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -147,13 +147,13 @@ option(AVIF_LOCAL_FUZZTEST + + # Whether the libavif library uses c++ indirectly (e.g. through linking to libyuv). + set(AVIF_LIB_USE_CXX OFF) +- ++if(0) + if(APPLE) + set(XCRUN xcrun) + else() + set(XCRUN) + endif() +- ++endif() + # This is also needed to get shared libraries (e.g. pixbufloader-avif) to compile against a static libavif. + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + if(BUILD_SHARED_LIBS) +@@ -269,7 +269,7 @@ if(AVIF_ENABLE_EXPERIMENTAL_GAIN_MAP) + check_avif_option(AVIF_LIBXML2 TARGET LibXml2::LibXml2 PKG_NAME LibXml2) + endif() + # --------------------------------------------------------------------------------------- +- ++if(0) + # Enable all warnings + include(CheckCCompilerFlag) + if(MSVC) +@@ -310,7 +310,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "GNU") + else() + message(FATAL_ERROR "libavif: Unknown compiler, bailing out") + endif() +- ++endif() + if(AVIF_ENABLE_WERROR) + # Warnings as errors + if(MSVC) diff --git a/recipes/libavif/config.yml b/recipes/libavif/config.yml index 7cb403e14cb9a..d8cfe5a49c15a 100644 --- a/recipes/libavif/config.yml +++ b/recipes/libavif/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.1": + folder: all "1.1.0": folder: all "1.0.4": diff --git a/recipes/libbacktrace/all/conandata.yml b/recipes/libbacktrace/all/conandata.yml index 56d79ce7402eb..7aec17549ec3c 100644 --- a/recipes/libbacktrace/all/conandata.yml +++ b/recipes/libbacktrace/all/conandata.yml @@ -1,8 +1,22 @@ sources: + "cci.20240730": + url: "https://github.com/ianlancetaylor/libbacktrace/archive/0dd27b95f9f2c11b4a89db5f185a888af912838e.tar.gz" + sha256: "dfbc52012846c57759eaaa5131c329c43f77695c808b3e1847ec2dacce238c35" "cci.20210118": url: "https://github.com/ianlancetaylor/libbacktrace/archive/dedbe13fda00253fe5d4f2fb812c909729ed5937.tar.gz" sha256: "dc8c167f48f3de5ae318c528b26b72f300edb6e33744e55394674fd4b7cdd21d" patches: + "cci.20240730": + - patch_file: "patches/cci.20240719-0001-pointer-arithmetic.patch" + patch_description: "casting pointer types for pointer arithmetics" + patch_type: "portability" + - patch_file: "patches/0002-msvc-unistd-alternative.patch" + patch_description: "support msvc for codes using unistd.h" + patch_type: "portability" "cci.20210118": - patch_file: "patches/0001-pointer-arithmetic.patch" + patch_description: "casting pointer types for pointer arithmetics" + patch_type: "portability" - patch_file: "patches/0002-msvc-unistd-alternative.patch" + patch_description: "support msvc for codes using unistd.h" + patch_type: "portability" diff --git a/recipes/libbacktrace/all/conanfile.py b/recipes/libbacktrace/all/conanfile.py index 2fa71b8e36228..fd0cc977d3ab2 100644 --- a/recipes/libbacktrace/all/conanfile.py +++ b/recipes/libbacktrace/all/conanfile.py @@ -14,9 +14,9 @@ class LibbacktraceConan(ConanFile): name = "libbacktrace" description = "A C library that may be linked into a C/C++ program to produce symbolic backtraces." + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/ianlancetaylor/libbacktrace" - license = "BSD-3-Clause" topics = ("backtrace", "stack-trace") package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -52,7 +52,7 @@ def layout(self): def validate(self): check_min_vs(self, "180") if is_msvc(self) and self.options.shared: - raise ConanInvalidConfiguration("libbacktrace shared is not supported with Visual Studio") + raise ConanInvalidConfiguration(f"{self.ref} shared is not supported with Visual Studio") def build_requirements(self): if self._settings_build.os == "Windows": diff --git a/recipes/libbacktrace/all/patches/cci.20240719-0001-pointer-arithmetic.patch b/recipes/libbacktrace/all/patches/cci.20240719-0001-pointer-arithmetic.patch new file mode 100644 index 0000000000000..dbf4fb3485b67 --- /dev/null +++ b/recipes/libbacktrace/all/patches/cci.20240719-0001-pointer-arithmetic.patch @@ -0,0 +1,31 @@ +diff --git a/pecoff.c b/pecoff.c +index 636e1b1..975e417 100644 +--- a/pecoff.c ++++ b/pecoff.c +@@ -704,7 +704,7 @@ coff_add (struct backtrace_state *state, int descriptor, + magic_ok = memcmp (magic, "PE\0", 4) == 0; + fhdr_off += 4; + +- memcpy (&fhdr, fhdr_view.data + 4, sizeof fhdr); ++ memcpy (&fhdr, (char*)fhdr_view.data + 4, sizeof fhdr); + } + else + { +@@ -738,7 +738,7 @@ coff_add (struct backtrace_state *state, int descriptor, + sects_view_valid = 1; + opt_hdr = (const b_coff_optional_header *) sects_view.data; + sects = (const b_coff_section_header *) +- (sects_view.data + fhdr.size_of_optional_header); ++ ((b_coff_optional_header *)sects_view.data + fhdr.size_of_optional_header); + + is_64 = 0; + memset (&image_base, 0, sizeof image_base); +@@ -781,7 +781,7 @@ coff_add (struct backtrace_state *state, int descriptor, + goto fail; + syms_view_valid = 1; + +- str_size = coff_read4 (syms_view.data + syms_size); ++ str_size = coff_read4 ((const unsigned char *)((char *)syms_view.data + syms_size)); + + str_off = syms_off + syms_size; + diff --git a/recipes/libbacktrace/config.yml b/recipes/libbacktrace/config.yml index bc0e7ddecd921..952bd0433d7d5 100644 --- a/recipes/libbacktrace/config.yml +++ b/recipes/libbacktrace/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20240730": + folder: all "cci.20210118": folder: all diff --git a/recipes/libcap/all/conandata.yml b/recipes/libcap/all/conandata.yml index 16d2439fd2b12..213e20579f77b 100644 --- a/recipes/libcap/all/conandata.yml +++ b/recipes/libcap/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.70": + url: "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.70.tar.xz" + sha256: "23a6ef8aadaf1e3e875f633bb2d116cfef8952dba7bc7c569b13458e1952b30f" "2.69": url: "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.69.tar.xz" sha256: "f311f8f3dad84699d0566d1d6f7ec943a9298b28f714cae3c931dfd57492d7eb" @@ -33,6 +36,13 @@ sources: url: "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.45.tar.xz" sha256: "d66639f765c0e10557666b00f519caf0bd07a95f867dddaee131cd284fac3286" patches: + "2.70": + - patch_file: "patches/2.57/0001-libcap-Remove-hardcoded-fPIC.patch" + patch_description: "allow to configure fPIC option from conan recipe" + patch_type: "conan" + - patch_file: "patches/2.57/0002-Make.Rules-Make-compile-tools-configurable.patch" + patch_description: "allow to override compiler via environment variables" + patch_type: "conan" "2.69": - patch_file: "patches/2.57/0001-libcap-Remove-hardcoded-fPIC.patch" patch_description: "allow to configure fPIC option from conan recipe" diff --git a/recipes/libcap/config.yml b/recipes/libcap/config.yml index 9ca623681ce66..e8abe4aef997c 100644 --- a/recipes/libcap/config.yml +++ b/recipes/libcap/config.yml @@ -1,4 +1,6 @@ versions: + "2.70": + folder: all "2.69": folder: all "2.68": diff --git a/recipes/libcoro/all/conandata.yml b/recipes/libcoro/all/conandata.yml index 4568b8acd6407..08d3f083c5782 100644 --- a/recipes/libcoro/all/conandata.yml +++ b/recipes/libcoro/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.12.1": + url: "https://github.com/jbaldwin/libcoro/archive/refs/tags/v0.12.1.tar.gz" + sha256: "2cb6f45fc73dad6008cc930d92939785684835e03b12df422b98fcab9e393add" "0.12": url: "https://github.com/jbaldwin/libcoro/archive/refs/tags/v0.12.tar.gz" sha256: "9a89f329e12fda7d6425523fb2cbd1ebaf41e0e1d41e210d93ad4f3a196333a2" diff --git a/recipes/libcoro/config.yml b/recipes/libcoro/config.yml index 2dd41938c3d09..3e368a245af64 100644 --- a/recipes/libcoro/config.yml +++ b/recipes/libcoro/config.yml @@ -1,4 +1,6 @@ versions: + "0.12.1": + folder: all "0.12": folder: all "0.11.1": diff --git a/recipes/libcurl/all/conandata.yml b/recipes/libcurl/all/conandata.yml index 612b8f0180798..b90b6d33233cb 100644 --- a/recipes/libcurl/all/conandata.yml +++ b/recipes/libcurl/all/conandata.yml @@ -1,4 +1,9 @@ sources: + "8.9.1": + url: + - "https://curl.se/download/curl-8.9.1.tar.xz" + - "https://github.com/curl/curl/releases/download/curl-8_9_1/curl-8.9.1.tar.xz" + sha256: "f292f6cc051d5bbabf725ef85d432dfeacc8711dd717ea97612ae590643801e5" "8.8.0": url: - "https://curl.se/download/curl-8.8.0.tar.xz" diff --git a/recipes/libcurl/config.yml b/recipes/libcurl/config.yml index 74fce7bdf4ef1..30551059764ab 100644 --- a/recipes/libcurl/config.yml +++ b/recipes/libcurl/config.yml @@ -1,4 +1,6 @@ versions: + "8.9.1": + folder: all "8.8.0": folder: all "8.6.0": diff --git a/recipes/libdeflate/all/conandata.yml b/recipes/libdeflate/all/conandata.yml index 96cfe2bce2928..21a642dd647d6 100644 --- a/recipes/libdeflate/all/conandata.yml +++ b/recipes/libdeflate/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.21": + url: "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.21.tar.gz" + sha256: "50827d312c0413fbd41b0628590cd54d9ad7ebf88360cba7c0e70027942dbd01" "1.20": url: "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.20.tar.gz" sha256: "ed1454166ced78913ff3809870a4005b7170a6fd30767dc478a09b96847b9c2a" diff --git a/recipes/libdeflate/config.yml b/recipes/libdeflate/config.yml index 1214fb379a2c9..6cfddb7e0e6f2 100644 --- a/recipes/libdeflate/config.yml +++ b/recipes/libdeflate/config.yml @@ -1,4 +1,6 @@ versions: + "1.21": + folder: "all" "1.20": folder: "all" "1.19": diff --git a/recipes/libdivide/all/conandata.yml b/recipes/libdivide/all/conandata.yml index 6b1811615bec8..1cbb0260b35e7 100644 --- a/recipes/libdivide/all/conandata.yml +++ b/recipes/libdivide/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.1": + url: "https://github.com/ridiculousfish/libdivide/archive/refs/tags/v5.1.tar.gz" + sha256: "fec2e4141878c58eb92cfcd478accc3b7f34b39491c1e638566f083d378cc7d4" "5.0": url: "https://github.com/ridiculousfish/libdivide/archive/refs/tags/5.0.tar.gz" sha256: "01ffdf90bc475e42170741d381eb9cfb631d9d7ddac7337368bcd80df8c98356" diff --git a/recipes/libdivide/config.yml b/recipes/libdivide/config.yml index c374cc0645132..042bc67b62f0b 100644 --- a/recipes/libdivide/config.yml +++ b/recipes/libdivide/config.yml @@ -1,4 +1,6 @@ versions: + "5.1": + folder: all "5.0": folder: all "3.0": diff --git a/recipes/libfabric/all/conandata.yml b/recipes/libfabric/all/conandata.yml index 1eedb4da16c00..1488ae656448e 100644 --- a/recipes/libfabric/all/conandata.yml +++ b/recipes/libfabric/all/conandata.yml @@ -1,4 +1,4 @@ sources: - "1.12.1": - url: https://github.com/ofiwg/libfabric/releases/download/v1.12.1/libfabric-1.12.1.tar.bz2 - sha256: db3c8e0a495e6e9da6a7436adab905468aedfbd4579ee3da5232a5c111ba642c + "1.21.0": + url: "https://github.com/ofiwg/libfabric/releases/download/v1.21.0/libfabric-1.21.0.tar.bz2" + sha256: "0c1b7b830d9147f661e5d7f359250b85b5a9885c330464cd3b5e5d35b86551c7" diff --git a/recipes/libfabric/all/conanfile.py b/recipes/libfabric/all/conanfile.py index 96dbea392e3a6..9d5b8417f1cbd 100644 --- a/recipes/libfabric/all/conanfile.py +++ b/recipes/libfabric/all/conanfile.py @@ -1,99 +1,195 @@ -from conans import ConanFile, AutoToolsBuildEnvironment, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.35.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import copy, get, rm, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.53.0" + class LibfabricConan(ConanFile): name = "libfabric" - description = "Open Fabric Interfaces" - topics = ("fabric", "communication", "framework", "service") + description = ("Libfabric, also known as Open Fabrics Interfaces (OFI), " + "defines a communication API for high-performance parallel and distributed applications.") + license = ("BSD-2-Clause", "GPL-2.0-or-later") url = "https://github.com/conan-io/conan-center-index" homepage = "http://libfabric.org" - license = "BSD-2-Clause", "GPL-2.0-or-later" + topics = ("fabric", "communication", "framework", "service") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" - _providers = ['gni', 'psm', 'psm2', 'psm3', 'rxm', 'sockets', 'tcp', 'udp', 'usnic', 'verbs', 'bgq'] + _providers = [ + "dmabuf_peer_mem", + "efa", + "hook_debug", + "hook_hmem", + "mrail", + "perf", + "profile", + "rxd", + "rxm", + "shm", + "sm2", + "sockets", + "tcp", + "trace", + "ucx", + "udp", + "usnic", + "verbs", + ] options = { - **{ p: "ANY" for p in _providers }, - **{ - "shared": [True, False], - "fPIC": [True, False], - "with_libnl": "ANY", - "with_bgq_progress": [None, "auto", "manual"], - "with_bgq_mr": [None, "basic", "scalable"] - } + "shared": [True, False], + "fPIC": [True, False], + **{ p: [None, "ANY"] for p in _providers }, } default_options = { - **{ p: "auto" for p in _providers }, - **{ - "shared": False, - "fPIC": True, - "with_libnl": None, - "with_bgq_progress": None, - "with_bgq_mr": None - } + "shared": False, + "fPIC": True, + "dmabuf_peer_mem": "yes", + "efa": "yes", + "hook_debug": "yes", + "hook_hmem": "yes", + "mrail": "yes", + "perf": "no", + "profile": "yes", + "rxd": "yes", + "rxm": "yes", + "shm": "yes", + "sm2": "yes", + "sockets": "yes", + "tcp": "yes", + "trace": "yes", + "ucx": "no", + "udp": "yes", + "usnic": "no", + "verbs": "yes" } - @property - def _source_subfolder(self): - return "source_subfolder" - - _autotools = None - def config_options(self): - if self.settings.os == 'Windows': - del self.options.fPIC + if is_apple_os(self): + # Requires libnl, which is not available on macOS + del self.options.usnic + # Require Linux-specific process_vm_readv syscall + del self.options.shm + del self.options.sm2 + # rdma-core is not available on macOS + del self.options.efa + del self.options.verbs def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def _is_enabled(self, opt): + return str(self.options.get_safe(opt)) == "yes" or str(self.options.get_safe(opt)).startswith("dl") + + def requirements(self): + if self._is_enabled("usnic"): + self.requires("libnl/3.8.0") + if self._is_enabled("efa") or self._is_enabled("usnic") or self._is_enabled("verbs"): + self.requires("rdma-core/52.0") + + def layout(self): + basic_layout(self, src_folder="src") def validate(self): - if self.settings.os not in ["Linux", "FreeBSD", "Macos"]: - raise ConanInvalidConfiguration("libfabric only builds on Linux, Macos, and FreeBSD.") - for p in self._providers: - if self.options.get_safe(p) not in ["auto", "yes", "no", "dl"] and not os.path.isdir(str(self.options.get_safe(p))): - raise ConanInvalidConfiguration("Option {} can only be one of 'auto', 'yes', 'no', 'dl' or a directory path") - if self.options.get_safe('with_libnl') and not os.path.isdir(str(self.options.with_libnl)): - raise ConanInvalidConfiguration("Value of with_libnl must be an existing directory") + if self.settings.os == "Windows": + # FIXME: libfabric provides msbuild project files. + raise ConanInvalidConfiguration(f"{self.ref} Conan recipes is not supported on Windows. Contributions are welcome.") + + for provider in self._providers: + provider = str(self.options.get_safe(provider)) + if provider.lower() not in ["yes", "no", "dl", "none"] and \ + not os.path.isdir(provider) and \ + (not provider.startswith("dl:") and not os.path.isdir(provider[3:])): + raise ConanInvalidConfiguration(f"{self.ref} provider option '{provider}' is not valid. It must be 'yes', 'no', 'dl', 'dl:' or a directory path.") + + if self._is_enabled("verbs"): + if not self.dependencies["rdma-core"].options.build_librdmacm: + raise ConanInvalidConfiguration(f"{self.ref} '-o rdma-core/*:build_librdmacm=True' is required when '-o &:verbs=True'") + + def build_requirements(self): + # Used in ./configure tests and build + self.tool_requires("libtool/2.4.7") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self) - args = [] + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) for p in self._providers: - args.append('--enable-{}={}'.format(p, self.options.get_safe(p))) - if self.options.with_libnl: - args.append('--with-libnl={}'.format(self.options.with_libnl)) - if self.options.with_bgq_progress: - args.append('--with-bgq-progress={}'.format(self.options.with_bgq_progress)) - if self.options.with_bgq_mr: - args.append('--with-bgq-mr={}'.format(self.options.with_bgq_mr)) - self._autotools.configure(args=args, configure_dir=self._source_subfolder) - return self._autotools + if p == "verbs" and self.options.get_safe(p, "no") != "no": + path = self.dependencies["rdma-core"].package_folder + if self.options.get_safe("verbs") == "dl": + tc.configure_args.append(f"--enable-verbs=dl:{path}") + else: + tc.configure_args.append(f"--enable-verbs={path}") + else: + tc.configure_args.append(f"--enable-{p}={self.options.get_safe(p, 'no')}") + if self.settings.build_type == "Debug": + tc.configure_args.append("--enable-debug") + tc.configure_args.append(f"--with-bgq-progress=no") + tc.configure_args.append(f"--with-bgq-mr=no") + tc.configure_args.append("--with-cassin-headers=no") + tc.configure_args.append("--with-cuda=no") # TODO + tc.configure_args.append("--with-curl=no") # TODO + tc.configure_args.append("--with-cxi-uapi-headers=no") + tc.configure_args.append("--with-dsa=no") + tc.configure_args.append("--with-gdrcopy=no") + tc.configure_args.append("--with-json-c=no") # TODO + if self._is_enabled("usnic"): + tc.configure_args.append(f"--with-libnl={self.dependencies['libnl'].package_folder}") + else: + tc.configure_args.append("--with-libnl=no") + tc.configure_args.append("--with-lttng=no") + tc.configure_args.append("--with-neuron=no") + tc.configure_args.append(f"--with-numa=no") + tc.configure_args.append("--with-psm2-src=no") + tc.configure_args.append("--with-psm3-rv=no") + tc.configure_args.append("--with-rocr=no") + tc.configure_args.append("--with-synapseai=no") + tc.configure_args.append("--with-uring=no") # TODO + tc.configure_args.append("--with-ze=no") + tc.configure_args.append("-enable-psm=no") + tc.configure_args.append("--enable-psm2=no") + tc.configure_args.append("--enable-psm3=no") + tc.configure_args.append("--enable-xpmem=no") + tc.configure_args.append("--enable-cxi=no") + tc.configure_args.append("--enable-opx=no") + tc.configure_args.append("--enable-bgq=no") + tc.generate() + + deps = AutotoolsDeps(self) + deps.generate() + + VirtualBuildEnv(self).generate() + VirtualRunEnv(self).generate(scope="build") def build(self): - autotools = self._configure_autotools() + autotools = Autotools(self) + autotools.configure() autotools.make() def package(self): - self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder) - autotools = self._configure_autotools() + copy(self, "COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + autotools = Autotools(self) autotools.install() - - tools.rmdir(os.path.join(self.package_folder, "share")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.la") + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rm(self, "*.la", self.package_folder, recursive=True) + fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.names["pkg_config"] = "libfabric" - self.cpp_info.libs = self.collect_libs() + self.cpp_info.set_property("pkg_config_name", "libfabric") + self.cpp_info.libs = ["fabric"] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs = ["pthread", "m"] + self.cpp_info.system_libs = ["pthread", "m", "rt", "dl"] + if self.settings.compiler in ["gcc", "clang"]: + self.cpp_info.system_libs.append("atomic") diff --git a/recipes/libfabric/all/test_package/CMakeLists.txt b/recipes/libfabric/all/test_package/CMakeLists.txt index 196188113685c..09b7943e0c2de 100644 --- a/recipes/libfabric/all/test_package/CMakeLists.txt +++ b/recipes/libfabric/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(libfabric REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE libfabric::libfabric) diff --git a/recipes/libfabric/all/test_package/conanfile.py b/recipes/libfabric/all/test_package/conanfile.py index bd7165a553cf4..ef5d7042163ec 100644 --- a/recipes/libfabric/all/test_package/conanfile.py +++ b/recipes/libfabric/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libfabric/all/test_v1_package/CMakeLists.txt b/recipes/libfabric/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libfabric/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/box2d/all/test_v1_package/conanfile.py b/recipes/libfabric/all/test_v1_package/conanfile.py similarity index 81% rename from recipes/box2d/all/test_v1_package/conanfile.py rename to recipes/libfabric/all/test_v1_package/conanfile.py index 133228fb54665..7e2dfe859bb27 100644 --- a/recipes/box2d/all/test_v1_package/conanfile.py +++ b/recipes/libfabric/all/test_v1_package/conanfile.py @@ -1,10 +1,10 @@ -import os from conans import ConanFile, CMake, tools +import os -class Box2DTestConan(ConanFile): +class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + generators = "cmake", "cmake_find_package_multi" def build(self): cmake = CMake(self) diff --git a/recipes/libfabric/config.yml b/recipes/libfabric/config.yml index daa3a213a56fa..09d8df06c28ff 100644 --- a/recipes/libfabric/config.yml +++ b/recipes/libfabric/config.yml @@ -1,3 +1,3 @@ versions: - "1.12.1": + "1.21.0": folder: all diff --git a/recipes/libheif/all/conandata.yml b/recipes/libheif/all/conandata.yml index e7a2fc9ba8c25..bd315fb8684b3 100644 --- a/recipes/libheif/all/conandata.yml +++ b/recipes/libheif/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.18.2": + url: "https://github.com/strukturag/libheif/releases/download/v1.18.2/libheif-1.18.2.tar.gz" + sha256: "c4002a622bec9f519f29d84bfdc6024e33fd67953a5fb4dc2c2f11f67d5e45bf" + "1.18.1": + url: "https://github.com/strukturag/libheif/releases/download/v1.18.1/libheif-1.18.1.tar.gz" + sha256: "8702564b0f288707ea72b260b3bf4ba9bf7abfa7dac01353def3a86acd6bbb76" "1.16.2": url: "https://github.com/strukturag/libheif/releases/download/v1.16.2/libheif-1.16.2.tar.gz" sha256: "7f97e4205c0bd9f9b8560536c8bd2e841d1c9a6d610401eb3eb87ed9cdfe78ea" @@ -15,6 +21,8 @@ sources: url: "https://github.com/strukturag/libheif/releases/download/v1.9.1/libheif-1.9.1.tar.gz" sha256: "5f65ca2bd2510eed4e13bdca123131c64067e9dd809213d7aef4dc5e37948bca" patches: + "1.18.1": + - patch_file: "patches/0001-cmake_1.18.1.patch" "1.16.2": - patch_file: "patches/0001-cmake_1.16.2.patch" - patch_file: "patches/0002-plugins_cmake_1.16.2.patch" diff --git a/recipes/libheif/all/conanfile.py b/recipes/libheif/all/conanfile.py index 912d662dba19e..c13632c993b86 100644 --- a/recipes/libheif/all/conanfile.py +++ b/recipes/libheif/all/conanfile.py @@ -2,6 +2,8 @@ from conan.tools.build import check_min_cppstd, stdcpp_library from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.scm import Version +from conan.tools.env import VirtualBuildEnv import os required_conan_version = ">=1.54.0" @@ -10,11 +12,10 @@ class LibheifConan(ConanFile): name = "libheif" description = "libheif is an HEIF and AVIF file format decoder and encoder." - topics = ("heif", "codec", "video") + license = ("LGPL-3.0-only", "GPL-3.0-or-later", "MIT") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/strukturag/libheif" - license = ("LGPL-3.0-only", "GPL-3.0-or-later", "MIT") - + topics = ("heif", "codec", "video") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -24,6 +25,8 @@ class LibheifConan(ConanFile): "with_x265": [True, False], "with_libaomav1": [True, False], "with_dav1d": [True, False], + "with_jpeg": [True, False], + "with_openjpeg": [True, False], } default_options = { "shared": False, @@ -32,6 +35,8 @@ class LibheifConan(ConanFile): "with_x265": False, "with_libaomav1": False, "with_dav1d": False, + "with_jpeg": False, + "with_openjpeg": False, } def export_sources(self): @@ -40,6 +45,9 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "1.17.0": + del self.options.with_jpeg + del self.options.with_openjpeg def configure(self): if self.options.shared: @@ -57,26 +65,47 @@ def requirements(self): self.requires("libaom-av1/3.6.1") if self.options.with_dav1d: self.requires("dav1d/1.2.1") + if self.options.get_safe("with_jpeg"): + self.requires("libjpeg/9f") + if self.options.get_safe("with_openjpeg"): + self.requires("openjpeg/2.5.2") def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) + def build_requirements(self): + if Version(self.version) >= "1.18.0": + self.tool_requires("cmake/[>=3.16 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) + tc.variables["WITH_LIBSHARPYUV"] = False tc.variables["WITH_LIBDE265"] = self.options.with_libde265 tc.variables["WITH_X265"] = self.options.with_x265 tc.variables["WITH_AOM"] = self.options.with_libaomav1 + tc.variables["WITH_AOM_DECODER"] = self.options.with_libaomav1 + tc.variables["WITH_AOM_ENCODER"] = self.options.with_libaomav1 tc.variables["WITH_RAV1E"] = False tc.variables["WITH_DAV1D"] = self.options.with_dav1d tc.variables["WITH_EXAMPLES"] = False tc.variables["WITH_GDK_PIXBUF"] = False + tc.variables["BUILD_TESTING"] = False + tc.variables["WITH_JPEG_DECODER"] = self.options.get_safe("with_jpeg", False) + tc.variables["WITH_JPEG_ENCODER"] = self.options.get_safe("with_jpeg", False) + tc.variables["WITH_OpenJPEG_DECODER"] = self.options.get_safe("with_openjpeg", False) + tc.variables["WITH_OpenJPEG_ENCODER"] = self.options.get_safe("with_openjpeg", False) tc.generate() deps = CMakeDeps(self) + if Version(self.version) >= "1.18.0": + deps.set_property("libde265", "cmake_file_name", "LIBDE265") deps.generate() + if Version(self.version) >= "1.18.0": + venv = VirtualBuildEnv(self) + venv.generate(scope="build") def build(self): apply_conandata_patches(self) @@ -101,6 +130,8 @@ def package_info(self): self.cpp_info.components["heif"].defines = ["LIBHEIF_STATIC_BUILD"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["heif"].system_libs.extend(["m", "pthread"]) + if Version(self.version) >= "1.18.0": + self.cpp_info.components["heif"].system_libs.append("dl") if not self.options.shared: libcxx = stdcpp_library(self) if libcxx: @@ -118,3 +149,7 @@ def package_info(self): self.cpp_info.components["heif"].requires.append("libaom-av1::libaom-av1") if self.options.with_dav1d: self.cpp_info.components["heif"].requires.append("dav1d::dav1d") + if self.options.get_safe("with_jpeg"): + self.cpp_info.components["heif"].requires.append("libjpeg::libjpeg") + if self.options.get_safe("with_openjpeg"): + self.cpp_info.components["heif"].requires.append("openjpeg::openjpeg") diff --git a/recipes/libheif/all/patches/0001-cmake_1.18.1.patch b/recipes/libheif/all/patches/0001-cmake_1.18.1.patch new file mode 100644 index 0000000000000..271d7b71513e3 --- /dev/null +++ b/recipes/libheif/all/patches/0001-cmake_1.18.1.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 12c4039..2ea1805 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -47,7 +47,7 @@ set(CMAKE_CXX_EXTENSIONS OFF) + + set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) + +-set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++# set(CMAKE_POSITION_INDEPENDENT_CODE ON) + + # Create the compile command database for clang by default + set(CMAKE_EXPORT_COMPILE_COMMANDS ON) diff --git a/recipes/libheif/config.yml b/recipes/libheif/config.yml index 887a8fb56ade3..7943f16d5196d 100644 --- a/recipes/libheif/config.yml +++ b/recipes/libheif/config.yml @@ -1,4 +1,8 @@ versions: + "1.18.2": + folder: all + "1.18.1": + folder: all "1.16.2": folder: all "1.13.0": diff --git a/recipes/libinterpolate/all/conandata.yml b/recipes/libinterpolate/all/conandata.yml index 7d38fb0462c3a..a64f016c933a3 100644 --- a/recipes/libinterpolate/all/conandata.yml +++ b/recipes/libinterpolate/all/conandata.yml @@ -1,13 +1,17 @@ sources: - "2.6.2": + "2.7": url: - - "https://github.com/CD3/libInterpolate/archive/refs/tags/2.6.2.tar.gz" - sha256: "42f40c9b77fda6e0c52ed39b522458456e89fb4981d63f812aa158c6f4be8ab0" + - "https://github.com/CD3/libInterpolate/archive/refs/tags/2.7.tar.gz" + sha256: "a502a00d6aee13e9b8ae9af6fafbcb783d5380835e353a0fc85a586ca7e31e43" + "2.6.4": + url: + - "https://github.com/CD3/libInterpolate/archive/refs/tags/2.6.4.tar.gz" + sha256: "231a39fcc87ffc3e03936f7a21abc78ef309c2f1de79bd3ae72c24d78352d666" "2.6.3": url: - "https://github.com/CD3/libInterpolate/archive/refs/tags/2.6.3.tar.gz" sha256: "bb2f253c27594b4e56ed9349630086665f529100eac2cd3cba63d198c3a84ff9" - "2.6.4": + "2.6.2": url: - - "https://github.com/CD3/libInterpolate/archive/refs/tags/2.6.4.tar.gz" - sha256: "231a39fcc87ffc3e03936f7a21abc78ef309c2f1de79bd3ae72c24d78352d666" + - "https://github.com/CD3/libInterpolate/archive/refs/tags/2.6.2.tar.gz" + sha256: "42f40c9b77fda6e0c52ed39b522458456e89fb4981d63f812aa158c6f4be8ab0" diff --git a/recipes/libinterpolate/all/test_package/conanfile.py b/recipes/libinterpolate/all/test_package/conanfile.py index 48499fa0989d9..e845ae751a301 100644 --- a/recipes/libinterpolate/all/test_package/conanfile.py +++ b/recipes/libinterpolate/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/libinterpolate/config.yml b/recipes/libinterpolate/config.yml index 2f31497672d43..45546f7415b6d 100644 --- a/recipes/libinterpolate/config.yml +++ b/recipes/libinterpolate/config.yml @@ -1,7 +1,9 @@ versions: - "2.6.2": + "2.7": + folder: all + "2.6.4": folder: all "2.6.3": folder: all - "2.6.4": + "2.6.2": folder: all diff --git a/recipes/libjxl/all/conandata.yml b/recipes/libjxl/all/conandata.yml index a7d688f285681..bfe21c7baaca3 100644 --- a/recipes/libjxl/all/conandata.yml +++ b/recipes/libjxl/all/conandata.yml @@ -8,6 +8,3 @@ sources: "0.8.2": url: "https://github.com/libjxl/libjxl/archive/v0.8.2.zip" sha256: "1f2ccc06f07c4f6cf4aa6c7763ba0598f12a7544d597f02beb07f615eb08ccf0" - "0.6.1": - url: "https://github.com/libjxl/libjxl/archive/v0.6.1.zip" - sha256: "3e4877daef07724aa6f490bf80c45ada804f35fe3cce59c27e89c5ae3099535a" diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 1f4b5564868a0..e7c69a5172e12 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -63,10 +63,7 @@ def layout(self): def requirements(self): self.requires("brotli/1.1.0") - if Version(self.version) >= "0.7": - self.requires("highway/1.1.0") - else: - self.requires("highway/0.12.2") + self.requires("highway/1.1.0") self.requires("lcms/2.16") if self.options.with_tcmalloc: self.requires("gperftools/2.15") @@ -74,9 +71,6 @@ def requirements(self): def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, 11) - if self.version == "0.6.1" and is_msvc(self) and self.options.shared: - # Fails with a missing DLL error in test_package - raise ConanInvalidConfiguration(f"{self.ref} does not support shared builds with MSVC") def build_requirements(self): # Require newer CMake, which allows INCLUDE_DIRECTORIES to be set on INTERFACE targets @@ -92,7 +86,7 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["CMAKE_PROJECT_LIBJXL_INCLUDE"] = "conan_deps.cmake" tc.variables["BUILD_TESTING"] = False - tc.variables["JPEGXL_STATIC"] = not self.options.shared # applies to tools only + tc.variables["JPEGXL_STATIC"] = False tc.variables["JPEGXL_BUNDLE_LIBPNG"] = False tc.variables["JPEGXL_ENABLE_BENCHMARK"] = False tc.variables["JPEGXL_ENABLE_DOXYGEN"] = False @@ -161,14 +155,6 @@ def _patch_sources(self): fpic = "ON" if self.options.get_safe("fPIC", True) else "OFF" replace_in_file(self, path, "POSITION_INDEPENDENT_CODE ON", f"POSITION_INDEPENDENT_CODE {fpic}") - if Version(self.version) < "0.7": - replace_in_file(self, os.path.join(self.source_folder, "lib", "jxl.cmake"), - " DESTINATION ${CMAKE_INSTALL_LIBDIR}", - " RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib") - if self.settings.compiler not in ["gcc", "clang"]: - replace_in_file(self, os.path.join(self.source_folder, "lib", "jxl.cmake"), - "-Wl,--exclude-libs=ALL", "") - def build(self): self._patch_sources() cmake = CMake(self) diff --git a/recipes/libjxl/config.yml b/recipes/libjxl/config.yml index efc7447d06943..040248cefb07f 100644 --- a/recipes/libjxl/config.yml +++ b/recipes/libjxl/config.yml @@ -5,5 +5,3 @@ versions: folder: all "0.8.2": folder: all - "0.6.1": - folder: all diff --git a/recipes/libmeshb/all/conandata.yml b/recipes/libmeshb/all/conandata.yml new file mode 100644 index 0000000000000..dd9233505c3f3 --- /dev/null +++ b/recipes/libmeshb/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "7.80": + url: "https://github.com/LoicMarechal/libMeshb/archive/refs/tags/v7.80.tar.gz" + sha256: "3026e84fa7c5c14428b1e0d1484038b0cf24921814e9cd0b6e0f13a34b0f1248" diff --git a/recipes/libmeshb/all/conanfile.py b/recipes/libmeshb/all/conanfile.py new file mode 100644 index 0000000000000..4f0284a48ab3d --- /dev/null +++ b/recipes/libmeshb/all/conanfile.py @@ -0,0 +1,81 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, replace_in_file, rmdir +import os + +required_conan_version = ">=1.53.0" + +class LibmeshbConan(ConanFile): + name = "libmeshb" + description = "A library to handle the *.meshb file format." + license = "MPL-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/LoicMarechal/libMeshb" + topics = ("3d", "mesh", "geometry") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_gmf_asio": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "with_gmf_asio": False + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + del self.options.with_gmf_asio + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def configure(self): + # Windows shared build doesn't seems supported because code doesn't include dllexport + # See https://www.kitware.com/create-dlls-on-windows-without-declspec-using-new-cmake-export-all-feature/ + if self.settings.os == "Windows": + del self.options.shared + self.package_type = "static-library" + if self.options.get_safe("shared"): + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["WITH_GMF_AIO"] = self.options.get_safe("with_gmf_asio", False) + tc.generate() + + def _patch_sources(self): + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "add_subdirectory (examples)", "") + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "install (FILES LICENSE.txt copyright.txt DESTINATION share/libMeshb)", "") + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "install (DIRECTORY sample_meshes DESTINATION share/libMeshb)", "") + replace_in_file(self, os.path.join(self.source_folder, "sources/CMakeLists.txt"), "install(DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/ DESTINATION include)", "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "libMeshb") + self.cpp_info.set_property("cmake_target_name", "libMeshb::Meshb.7") + self.cpp_info.libs = ["Meshb.7"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("rt") + self.cpp_info.system_libs.append("m") \ No newline at end of file diff --git a/recipes/libmeshb/all/test_package/CMakeLists.txt b/recipes/libmeshb/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..5cc1c2f79e98d --- /dev/null +++ b/recipes/libmeshb/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES C) + +find_package(libMeshb REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE libMeshb::Meshb.7) diff --git a/recipes/libmeshb/all/test_package/conanfile.py b/recipes/libmeshb/all/test_package/conanfile.py new file mode 100644 index 0000000000000..f5cf204295e19 --- /dev/null +++ b/recipes/libmeshb/all/test_package/conanfile.py @@ -0,0 +1,25 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + 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/libmeshb/all/test_package/test_package.c b/recipes/libmeshb/all/test_package/test_package.c new file mode 100644 index 0000000000000..ab27c830995fa --- /dev/null +++ b/recipes/libmeshb/all/test_package/test_package.c @@ -0,0 +1,7 @@ +#include + +int main() { + int ver, dim; + int64_t LibIdx = GmfOpenMesh("/dev/null", GmfRead, &ver, &dim); + return 0; +} diff --git a/recipes/libmeshb/config.yml b/recipes/libmeshb/config.yml new file mode 100644 index 0000000000000..d51cd95e8905e --- /dev/null +++ b/recipes/libmeshb/config.yml @@ -0,0 +1,3 @@ +versions: + "7.80": + folder: all diff --git a/recipes/libpointmatcher/all/conandata.yml b/recipes/libpointmatcher/all/conandata.yml index 448e7fdb12dff..90e42a2d1fa6b 100644 --- a/recipes/libpointmatcher/all/conandata.yml +++ b/recipes/libpointmatcher/all/conandata.yml @@ -1,9 +1,13 @@ sources: - "1.3.1": - url: "https://github.com/ethz-asl/libpointmatcher/archive/refs/tags/1.3.1.tar.gz" - sha256: "82f93d2e7689efeef8837b8e969919b51c51ad4a1d1fa921c4dd8df4811378ab" + "1.4.3": + url: "https://github.com/ethz-asl/libpointmatcher/archive/refs/tags/1.4.3.tar.gz" + sha256: "7f8f56d4e561206fb5720ece6fecf6d27e9fd214d4dd326d228fddbea8289cda" patches: - "1.3.1": - - patch_file: "patches/1.3.1-0001-fix-cmake.patch" + "1.4.3": + - patch_file: "patches/1.4.3-0001-fix-cmake.patch" patch_description: "Fix upstream CMakeLists" patch_type: "conan" + - patch_file: "patches/1.4.3-0002-fix-const-error.patch" + patch_description: "Fix ScalarType const_cast compile error" + patch_type: "bugfix" + patch_source: "https://github.com/norlab-ulaval/libpointmatcher/pull/580" diff --git a/recipes/libpointmatcher/all/conanfile.py b/recipes/libpointmatcher/all/conanfile.py index b189d68d9c79e..a55b2ee1013f1 100644 --- a/recipes/libpointmatcher/all/conanfile.py +++ b/recipes/libpointmatcher/all/conanfile.py @@ -1,15 +1,21 @@ +import os + from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir -import os +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version required_conan_version = ">=1.53.0" class LibpointmatcherConan(ConanFile): name = "libpointmatcher" - description = "An Iterative Closest Point (ICP) library for 2D and 3D mapping in Robotics" + description = ( + "An Iterative Closest Point (ICP) library for 2D and 3D mapping in Robotics" + ) license = "BSD-3-Clause" topics = ("robotics", "lidar", "point-cloud") homepage = "https://github.com/ethz-asl/libpointmatcher" @@ -26,10 +32,22 @@ class LibpointmatcherConan(ConanFile): "fPIC": True, "with_openmp": False, } + short_paths = True @property def _min_cppstd(self): - return "11" + return "17" + + @property + def _compilers_minimum_version(self): + # https://github.com/norlab-ulaval/libpointmatcher/blob/1.4.3/CMakeLists.txt#L240 + return { + "gcc": "9", + "clang": "5", + "apple-clang": "7", + "msvc": "190", + "Visual Studio": "14", + } def export_sources(self): export_conandata_patches(self) @@ -41,19 +59,28 @@ def config_options(self): def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + if is_msvc(self): + # Only static for msvc + del self.options.shared + self.package_type = "static-library" def layout(self): cmake_layout(self, src_folder="src") def requirements(self): self.requires("boost/1.81.0", transitive_headers=True) - # FIXME: eigen 3.4.0 is not compatible yet (see https://github.com/ethz-asl/libpointmatcher/issues/496) - self.requires("eigen/3.3.9", transitive_headers=True) + self.requires("eigen/3.4.0", transitive_headers=True) self.requires("libnabo/1.0.7") + self.requires("yaml-cpp/0.7.0", transitive_headers=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -62,9 +89,12 @@ def generate(self): tc = CMakeToolchain(self) tc.cache_variables["USE_OPEN_MP"] = self.options.with_openmp tc.cache_variables["USE_OPEN_CL"] = False - tc.cache_variables["SHARED_LIBS"] = self.options.shared - # TODO: to unvendor, but libpointmatcher depends on legacy API of yaml-cpp (0.3.x) - tc.variables["USE_SYSTEM_YAML_CPP"] = False + tc.cache_variables["SHARED_LIBS"] = self.options.get_safe("shared") + tc.cache_variables["BUILD_EXAMPLES"] = False + tc.cache_variables["BUILD_EVALUATIONS"] = False + tc.cache_variables["BUILD_TESTS"] = False + if not self.settings.compiler.cppstd: + tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd tc.generate() deps = CMakeDeps(self) deps.generate() @@ -76,8 +106,12 @@ def build(self): cmake.build() def package(self): - copy(self, "copyright", src=os.path.join(self.source_folder, "debian"), - dst=os.path.join(self.package_folder, "licenses")) + copy( + self, + "copyright", + src=os.path.join(self.source_folder, "debian"), + dst=os.path.join(self.package_folder, "licenses"), + ) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "share")) @@ -85,4 +119,8 @@ def package(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "libpointmatcher") self.cpp_info.set_property("pkg_config_name", "libpointmatcher") - self.cpp_info.libs = ["pointmatcher"] + sufix = "d" if self.settings.build_type == "Debug" else "" + self.cpp_info.libs = [f"pointmatcher{sufix}"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["pthread", "m", "rt"] diff --git a/recipes/libpointmatcher/all/patches/1.3.1-0001-fix-cmake.patch b/recipes/libpointmatcher/all/patches/1.3.1-0001-fix-cmake.patch deleted file mode 100644 index bec21dac0c243..0000000000000 --- a/recipes/libpointmatcher/all/patches/1.3.1-0001-fix-cmake.patch +++ /dev/null @@ -1,208 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,4 +1,4 @@ --cmake_minimum_required(VERSION 2.8.11) -+cmake_minimum_required(VERSION 3.15) - - include(CheckSymbolExists) - -@@ -46,6 +46,7 @@ if( BUILD_32 ) - endif( BUILD_32 ) - - # Ensure proper build type -+if(0) - if (NOT CMAKE_BUILD_TYPE) - message("-- No build type specified; defaulting to CMAKE_BUILD_TYPE=Release.") - set(CMAKE_BUILD_TYPE Release CACHE STRING -@@ -65,12 +66,14 @@ endif (NOT CMAKE_BUILD_TYPE) - if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") - add_definitions(-O3) - endif(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") -+endif() - - # For Windows - if( MSVC ) - add_definitions( /D _VARIADIC_MAX=10 ) # VS2012 does not support tuples correctly yet - add_definitions( /D _USE_MATH_DEFINES) # defines M_PI for Visual Studio - add_definitions( /D _ENABLE_EXTENDED_ALIGNED_STORAGE) # this variable must be defined with VS2017 to acknowledge alignment changes of aligned_storage -+ add_compile_options(/bigobj) - endif() - - #======================= installation ===================================== -@@ -120,19 +123,16 @@ if (Boost_MINOR_VERSION GREATER 47) - find_package(Boost COMPONENTS thread filesystem system program_options date_time chrono REQUIRED) - endif (Boost_MINOR_VERSION GREATER 47) - include_directories(${Boost_INCLUDE_DIRS}) --set(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${Boost_LIBRARIES}) -+set(EXTERNAL_LIBS ${EXTERNAL_LIBS} Boost::headers Boost::thread Boost::filesystem Boost::system Boost::program_options Boost::date_time Boost::chrono) - - - #-------------------- - # DEPENDENCY: eigen 3 - #-------------------- --find_path(EIGEN_INCLUDE_DIR Eigen/Core -- /usr/local/include/eigen3 -- /usr/include/eigen3 --) -+find_package(Eigen3 REQUIRED CONFIG) -+set(EXTERNAL_LIBS ${EXTERNAL_LIBS} Eigen3::Eigen ) - - # Suppress Eigen's warning by adding it to the system's library --include_directories(SYSTEM "${EIGEN_INCLUDE_DIR}") - - #TODO: this should be a more standard way - #find_package(Eigen3 REQUIRED) -@@ -143,10 +143,9 @@ include_directories(SYSTEM "${EIGEN_INCLUDE_DIR}") - #-------------------- - # DEPENDENCY: nabo - #-------------------- --find_package(libnabo REQUIRED PATHS ${LIBNABO_INSTALL_DIR}) -+find_package(libnabo REQUIRED CONFIG) - #include(libnaboConfig) --include_directories(${libnabo_INCLUDE_DIRS}) --set(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${libnabo_LIBRARIES}) -+set(EXTERNAL_LIBS ${EXTERNAL_LIBS} libnabo::nabo) - message(STATUS "libnabo found, version ${libnabo_VERSION} (include=${libnabo_INCLUDE_DIRS} libs=${libnabo_LIBRARIES})") - - #-------------------- -@@ -215,8 +214,7 @@ else(USE_SYSTEM_YAML_CPP) - #get_property(yaml-cpp-pm_INCLUDE TARGET yaml-cpp-pm PROPERTY INCLUDE_DIRECTORIES) - #include_directories(${yaml-cpp-pm_INCLUDE}) - -- get_property(yaml-cpp-pm_LIB TARGET yaml-cpp-pm PROPERTY LOCATION) -- set (EXTERNAL_LIBS ${EXTERNAL_LIBS} ${yaml-cpp-pm_LIB} ) -+ set (EXTERNAL_LIBS ${EXTERNAL_LIBS} yaml-cpp-pm ) - set (EXTRA_DEPS ${EXTRA_DEPS} yaml-cpp-pm) - set(yamlcpp_FOUND) - -@@ -241,6 +239,7 @@ endif (POSIX_TIMERS AND NOT APPLE) - #========================== libpointmatcher itself ============================== - - # Check the compiler version as we need full C++11 support. -+if(0) - if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - # using Clang - if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.3") -@@ -276,6 +275,7 @@ if (CMAKE_VERSION VERSION_LESS "3.1") - else () - set (CMAKE_CXX_STANDARD 11) - endif () -+endif() - - # SOURCE - -@@ -350,12 +350,12 @@ file(GLOB_RECURSE POINTMATCHER_HEADERS "pointmatcher/*.h") - - # MacOS and Windows deal with shared/dynamic library differently. For - # simplicity, we only authorize static library in those cases. --if(APPLE OR WIN32) -+if(0) - - add_library(pointmatcher ${POINTMATCHER_SRC} ${POINTMATCHER_HEADERS} ) - install(TARGETS pointmatcher ARCHIVE DESTINATION ${INSTALL_LIB_DIR}) - --else(APPLE OR WIN32) -+else() - set(SHARED_LIBS "true" CACHE BOOL "To build shared (true) or static (false) library") - - if (SHARED_LIBS) -@@ -369,14 +369,15 @@ else(APPLE OR WIN32) - add_library(pointmatcher ${POINTMATCHER_SRC} ${POINTMATCHER_HEADERS} ) - install(TARGETS pointmatcher ARCHIVE DESTINATION ${INSTALL_LIB_DIR}) - endif(SHARED_LIBS) --endif(APPLE OR WIN32) -+ set_target_properties(pointmatcher PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) -+ target_compile_features(pointmatcher PUBLIC cxx_std_11) -+endif() - - target_include_directories(pointmatcher PRIVATE ${CMAKE_SOURCE_DIR}/pointmatcher) - target_include_directories(pointmatcher PRIVATE ${CMAKE_SOURCE_DIR}/pointmatcher/DataPointsFilters) - target_include_directories(pointmatcher PRIVATE ${CMAKE_SOURCE_DIR}/pointmatcher/DataPointsFilters/utils) - - # link all libraries to libpointmatcher --add_definitions(-Wall) - #target_link_libraries(pointmatcher ${yaml-cpp_LIBRARIES} ${libnabo_LIBRARIES}) - target_link_libraries(pointmatcher ${EXTERNAL_LIBS}) - -@@ -432,11 +433,8 @@ endif(GENERATE_API_DOC) - #=============== trigger other makefile ====================== - - # Example programs --add_subdirectory(examples) - # Evaluation programs --add_subdirectory(evaluations) - # Unit testing --add_subdirectory(utest) - - - #=================== allow find_package() ========================= -@@ -451,6 +449,7 @@ add_subdirectory(utest) - # 1- local build # - - # Register the local build in case one doesn't use "make install" -+if(0) - export(PACKAGE libpointmatcher) - - # Create variable for the local build tree -@@ -537,3 +536,4 @@ configure_file( - - add_custom_target(uninstall - COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) -+endif() ---- a/contrib/CMakeLists.txt -+++ b/contrib/CMakeLists.txt -@@ -1,8 +1,6 @@ - # External libraries packed with libpointmatcher - - # GTest --include_directories(${CMAKE_CURRENT_SOURCE_DIR}) --add_library(gtest gtest/gtest-all.cc) - - # Wrapped yaml-cpp - if(NOT USE_SYSTEM_YAML_CPP) ---- a/contrib/yaml-cpp-pm/CMakeLists.txt -+++ b/contrib/yaml-cpp-pm/CMakeLists.txt -@@ -19,7 +19,6 @@ set(YAML_CPP_BUILD_CONTRIB OFF) - # --> General - # see http://www.cmake.org/cmake/help/cmake2.6docs.html#variable:BUILD_SHARED_LIBS - # http://www.cmake.org/cmake/help/cmake2.6docs.html#command:add_library --set(BUILD_SHARED_LIBS OFF) - - # --> Apple - option(APPLE_UNIVERSAL_BIN "Apple: Build universal binary" OFF) -@@ -55,7 +54,6 @@ endif() - - if(WIN32) - if(BUILD_SHARED_LIBS) -- add_definitions(-D${PROJECT_NAME}_DLL) # use or build Windows DLL - endif() - if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "C:/") -@@ -63,7 +61,7 @@ if(WIN32) - endif() - - # GCC / Clang specialities --if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") -+if(0) - ### General stuff - if(WIN32) - set(CMAKE_SHARED_LIBRARY_PREFIX "") # DLLs do not have a "lib" prefix -@@ -105,7 +103,7 @@ endif() - ### - ### Library - ### --add_library(yaml-cpp-pm -+add_library(yaml-cpp-pm OBJECT - ${sources} - ${public_headers} - ${private_headers} -@@ -113,6 +111,9 @@ add_library(yaml-cpp-pm - ${contrib_public_headers} - ${contrib_private_headers} - ) -+if(BUILD_SHARED_LIBS) -+ set_target_properties(yaml-cpp-pm PROPERTIES POSITION_INDEPENDENT_CODE ON) -+endif() - - set_target_properties(yaml-cpp-pm PROPERTIES - VERSION "${YAML_CPP_VERSION}" diff --git a/recipes/libpointmatcher/all/patches/1.4.3-0001-fix-cmake.patch b/recipes/libpointmatcher/all/patches/1.4.3-0001-fix-cmake.patch new file mode 100644 index 0000000000000..50590958948df --- /dev/null +++ b/recipes/libpointmatcher/all/patches/1.4.3-0001-fix-cmake.patch @@ -0,0 +1,109 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0acebe3..b17f3d5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.10.2) ++cmake_minimum_required(VERSION 3.15) + + include(GNUInstallDirs) # populate CMAKE_INSTALL_{LIB,BIN}DIR + include(CheckSymbolExists) +@@ -9,8 +9,6 @@ include(CMakePackageConfigHelpers) + # Project details / setup + #======================== + +-set(CMAKE_POSITION_INDEPENDENT_CODE ON) # add -fPIC as required +- + # Extract version from header, done first to satisfy CMP0048, + # see `cmake --help-policy CMP0048` for more information. + file( +@@ -51,6 +49,7 @@ if( BUILD_32 ) + endif() + + # Ensure proper build type ++if(0) + if (NOT CMAKE_BUILD_TYPE) + message("-- No build type specified; defaulting to CMAKE_BUILD_TYPE=Release.") + set(CMAKE_BUILD_TYPE Release CACHE STRING +@@ -64,6 +63,7 @@ else () + message("\n=================================================================================") + endif () + endif () ++endif() + + + #================= extra building definitions ============================== +@@ -110,9 +110,6 @@ endforeach() + # initially + set(EXTERNAL_LIBS "") + +-# compile local version of gtest +-add_subdirectory(contrib) +- + #--------------------------- + # DEPENDENCY: POSIX Threads + #--------------------------- +@@ -134,22 +131,10 @@ endif () + #-------------------- + # DEPENDENCY: eigen 3 + #-------------------- +-find_path(EIGEN_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library +- HINTS ENV EIGEN3_INC_DIR +- ENV EIGEN3_DIR +- PATHS Eigen/Core +- /usr/local/include +- /usr/include +- PATH_SUFFIXES include eigen3 eigen +- DOC "Directory containing the Eigen3 header files" +-) + + # Suppress Eigen's warning by adding it to the system's library +-include_directories(SYSTEM "${EIGEN_INCLUDE_DIR}") +- +-#TODO: this should be a more standard way +-#find_package(Eigen3 REQUIRED) +-#message("-- eigen3 , version ${EIGEN_VERSION}") ++find_package(Eigen3 REQUIRED) ++set(EXTERNAL_LIBS ${EXTERNAL_LIBS} Eigen3::Eigen ) + + + +@@ -158,7 +143,7 @@ include_directories(SYSTEM "${EIGEN_INCLUDE_DIR}") + #-------------------- + if (NOT TARGET nabo) + # Find libnabo: +- find_package(libnabo REQUIRED PATHS ${LIBNABO_INSTALL_DIR}) ++ find_package(libnabo REQUIRED PATHS) + if (TARGET libnabo::nabo) + set(libnabo_LIBRARIES libnabo::nabo) + message(STATUS "libnabo found, version ${libnabo_VERSION} (Config mode, libs=${libnabo_LIBRARIES})") +@@ -238,6 +223,7 @@ check_symbol_exists(_POSIX_TIMERS "unistd.h;time.h" POSIX_TIMERS) + #========================== libpointmatcher itself ============================== + + # Check the compiler version as we need full C++17 support. ++if(0) + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + # using Clang + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5") +@@ -273,6 +259,7 @@ if (CMAKE_VERSION VERSION_LESS "3.8") + else () + set (CMAKE_CXX_STANDARD 17) + endif () ++endif () + + # SOURCE + +@@ -483,7 +470,7 @@ endif() + # include_directories(${libpointmatcher_INCLUDE_DIRS}) + # target_link_libraries(executableName ${libpointmatcher_LIBRARIES}) + # ... +- ++if(0) + # 1- local build # + + # Install cmake config module +@@ -574,3 +561,4 @@ if (NOT TARGET uninstall) + add_custom_target(uninstall + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) + endif() ++endif() diff --git a/recipes/libpointmatcher/all/patches/1.4.3-0002-fix-const-error.patch b/recipes/libpointmatcher/all/patches/1.4.3-0002-fix-const-error.patch new file mode 100644 index 0000000000000..1dd09a84875d2 --- /dev/null +++ b/recipes/libpointmatcher/all/patches/1.4.3-0002-fix-const-error.patch @@ -0,0 +1,13 @@ +diff --git a/pointmatcher/PointCloudGenerator.cpp b/pointmatcher/PointCloudGenerator.cpp +index d084dd2..739995b 100644 +--- a/pointmatcher/PointCloudGenerator.cpp ++++ b/pointmatcher/PointCloudGenerator.cpp +@@ -170,7 +170,7 @@ typename PointMatcher::DataPoints PointMatcher::PointCloudGenerator::gener + { + // Sample random values of theta and phi. + const ScalarType phi{ 2.0f * pi * uniformDistribution(randomNumberGenerator) }; +- const ScalarType radiusSample{ radius * sqrt(uniformDistribution(randomNumberGenerator)) }; ++ const ScalarType radiusSample{ static_cast(radius * sqrt(uniformDistribution(randomNumberGenerator))) }; + + // Pre-compute values, such as sine and cosine of phi and theta. + const ScalarType sinPhi{ std::sin(phi) }; diff --git a/recipes/libpointmatcher/config.yml b/recipes/libpointmatcher/config.yml index 59334d5077368..91b545dcd8ee8 100644 --- a/recipes/libpointmatcher/config.yml +++ b/recipes/libpointmatcher/config.yml @@ -1,3 +1,3 @@ versions: - "1.3.1": + "1.4.3": folder: all diff --git a/recipes/libpqxx/all/conandata.yml b/recipes/libpqxx/all/conandata.yml index 0a09eba2c892d..50ce1231a555d 100644 --- a/recipes/libpqxx/all/conandata.yml +++ b/recipes/libpqxx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "7.9.2": + url: "https://github.com/jtv/libpqxx/archive/refs/tags/7.9.2.tar.gz" + sha256: "e37d5774c39f6c802e32d7f418e88b8e530404fb54758516e884fc0ebdee6da4" "7.9.1": url: "https://github.com/jtv/libpqxx/archive/refs/tags/7.9.1.tar.gz" sha256: "4fafd63009b1d6c2b64b8c184c04ae4d1f7aa99d8585154832d28012bae5b0b6" @@ -30,6 +33,10 @@ sources: url: "https://github.com/jtv/libpqxx/archive/6.4.8.tar.gz" sha256: "3f7aba951822e01f1b9f9f353702954773323dd9f9dc376ffb57cb6bbd9a7a2f" patches: + "7.9.2": + - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" "7.9.1": - patch_file: "patches/0001-cmake-fix-module.patch" patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." diff --git a/recipes/libpqxx/config.yml b/recipes/libpqxx/config.yml index f6402ea576565..5c0e478232496 100644 --- a/recipes/libpqxx/config.yml +++ b/recipes/libpqxx/config.yml @@ -1,4 +1,6 @@ versions: + "7.9.2": + folder: all "7.9.1": folder: all "7.9.0": diff --git a/recipes/libqasm/all/conandata.yml b/recipes/libqasm/all/conandata.yml index 8ef190015c47b..11f0ecaaf3931 100644 --- a/recipes/libqasm/all/conandata.yml +++ b/recipes/libqasm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.6.7": + url: "https://github.com/QuTech-Delft/libqasm/archive/refs/tags/0.6.7.tar.gz" + sha256: "3e85be4f433b178b89e32bc738bd4f69266cd1c4ad0ed12b5367381ac6e44eb2" "0.6.6": url: "https://github.com/QuTech-Delft/libqasm/archive/refs/tags/0.6.6.tar.gz" sha256: "b3a2d1670f8865ce22bcc62c6a696ee7e0764a7b76901a4f082efa2287e0cbad" diff --git a/recipes/libqasm/all/conanfile.py b/recipes/libqasm/all/conanfile.py index 4eeedc606ece2..142f8f4210203 100644 --- a/recipes/libqasm/all/conanfile.py +++ b/recipes/libqasm/all/conanfile.py @@ -70,7 +70,7 @@ def build_requirements(self): if self.settings.arch == "wasm": self.tool_requires("emsdk/3.1.50") if self._should_build_test: - self.test_requires("gtest/1.14.0") + self.test_requires("gtest/1.15.0") if self.options.build_python: self.tool_requires("cpython/3.12.2") @@ -86,9 +86,13 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} requires antlr4-cppruntime to be built with the same shared option value.") def requirements(self): - self.requires("fmt/10.2.1", transitive_headers=True) + if Version(self.version) < "0.6.7": + self.requires("fmt/10.2.1", transitive_headers=True) + self.requires("tree-gen/1.0.7", transitive_headers=True, transitive_libs=True) + else: + self.requires("fmt/11.0.2", transitive_headers=True) + self.requires("tree-gen/1.0.8", transitive_headers=True, transitive_libs=True) self.requires("range-v3/0.12.0", transitive_headers=True) - self.requires("tree-gen/1.0.7", transitive_headers=True, transitive_libs=True) if not self.settings.arch == "wasm": self.requires("antlr4-cppruntime/4.13.1", transitive_headers=True) diff --git a/recipes/libqasm/config.yml b/recipes/libqasm/config.yml index 9948b2cad2840..70cd514abf1d8 100644 --- a/recipes/libqasm/config.yml +++ b/recipes/libqasm/config.yml @@ -1,4 +1,6 @@ versions: + "0.6.7": + folder: all "0.6.6": folder: all "0.6.5": diff --git a/recipes/librdkafka/all/conandata.yml b/recipes/librdkafka/all/conandata.yml index 5b70b2f07d19f..8eee4feaf9f9f 100644 --- a/recipes/librdkafka/all/conandata.yml +++ b/recipes/librdkafka/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.5.3": + url: "https://github.com/edenhill/librdkafka/archive/v2.5.3.tar.gz" + sha256: "eaa1213fdddf9c43e28834d9a832d9dd732377d35121e42f875966305f52b8ff" + "2.5.0": + url: "https://github.com/edenhill/librdkafka/archive/v2.5.0.tar.gz" + sha256: "3dc62de731fd516dfb1032861d9a580d4d0b5b0856beb0f185d06df8e6c26259" "2.4.0": url: "https://github.com/edenhill/librdkafka/archive/v2.4.0.tar.gz" sha256: "d645e47d961db47f1ead29652606a502bdd2a880c85c1e060e94eea040f1a19a" @@ -15,6 +21,24 @@ sources: url: "https://github.com/edenhill/librdkafka/archive/v1.9.2.tar.gz" sha256: "3fba157a9f80a0889c982acdd44608be8a46142270a389008b22d921be1198ad" patches: + "2.5.3": + - 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-5-0.patch + patch_description: "refer conan package names" + patch_type: "conan" + "2.5.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-5-0.patch + patch_description: "refer conan package names" + patch_type: "conan" + - patch_file: patches/0003-add-forward-declaration-2-5-0.patch + patch_description: "add forward declarations to fix compilation without ssl" + patch_type: "official" + patch_source: "https://github.com/confluentinc/librdkafka/pull/4794/" "2.4.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 90bfc657a8ab8..d7bc2435f6766 100644 --- a/recipes/librdkafka/all/conanfile.py +++ b/recipes/librdkafka/all/conanfile.py @@ -3,6 +3,8 @@ from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.gnu import PkgConfigDeps +from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc import os required_conan_version = ">=1.55.0" @@ -29,6 +31,7 @@ class LibrdkafkaConan(ConanFile): "ssl": [True, False], "sasl": [True, False], "curl": [True, False], + "syslog": [True, False], } default_options = { "shared": False, @@ -39,6 +42,7 @@ class LibrdkafkaConan(ConanFile): "ssl": False, "sasl": False, "curl": False, + "syslog": False, } @property @@ -51,6 +55,8 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if is_msvc(self): + del self.options.syslog def configure(self): if self.options.shared: @@ -98,6 +104,8 @@ def generate(self): tc.variables["WITH_SASL"] = self.options.sasl tc.variables["ENABLE_LZ4_EXT"] = True tc.variables["WITH_CURL"] = self.options.curl + tc.variables["WITH_SNAPPY"] = True + tc.preprocessor_definitions["WITH_SYSLOG"] = "1" if self.options.get_safe("syslog") else "0" tc.generate() cd = CMakeDeps(self) diff --git a/recipes/librdkafka/all/patches/0002-Change-library-targets-and-result-variables-2-5-0.patch b/recipes/librdkafka/all/patches/0002-Change-library-targets-and-result-variables-2-5-0.patch new file mode 100644 index 0000000000000..a862544f4da08 --- /dev/null +++ b/recipes/librdkafka/all/patches/0002-Change-library-targets-and-result-variables-2-5-0.patch @@ -0,0 +1,26 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index bbe63cf..44df7d1 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -224,9 +224,9 @@ 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>) ++# target_include_directories(rdkafka PRIVATE ${ZSTD_INCLUDE_DIR}) ++# message(STATUS "Found ZSTD: ${ZSTD_LIBRARY}") + endif() + + if(WITH_SSL) +@@ -266,7 +266,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/all/patches/0003-add-forward-declaration-2-5-0.patch b/recipes/librdkafka/all/patches/0003-add-forward-declaration-2-5-0.patch new file mode 100644 index 0000000000000..dbaef7d2d154f --- /dev/null +++ b/recipes/librdkafka/all/patches/0003-add-forward-declaration-2-5-0.patch @@ -0,0 +1,13 @@ +diff --git a/src/rdkafka_op.h b/src/rdkafka_op.h +index d79121e..d410a2b 100644 +--- a/src/rdkafka_op.h ++++ b/src/rdkafka_op.h +@@ -39,7 +39,7 @@ + typedef struct rd_kafka_q_s rd_kafka_q_t; + typedef struct rd_kafka_toppar_s rd_kafka_toppar_t; + typedef struct rd_kafka_op_s rd_kafka_op_t; +- ++typedef struct rd_kafka_broker_s rd_kafka_broker_t; + /* One-off reply queue + reply version. + * All APIs that take a rd_kafka_replyq_t makes a copy of the + * struct as-is and grabs hold of the existing .q refcount. diff --git a/recipes/librdkafka/config.yml b/recipes/librdkafka/config.yml index d9d5e85da2bcf..eeb9c91785a59 100644 --- a/recipes/librdkafka/config.yml +++ b/recipes/librdkafka/config.yml @@ -1,4 +1,8 @@ versions: + "2.5.3": + folder: all + "2.5.0": + folder: all "2.4.0": folder: all "2.3.0": diff --git a/recipes/libsvtav1/all/conandata.yml b/recipes/libsvtav1/all/conandata.yml index 6f34d5b9aab65..cef6d3411b8ae 100644 --- a/recipes/libsvtav1/all/conandata.yml +++ b/recipes/libsvtav1/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.2": + url: "https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v2.1.2/SVT-AV1-v2.1.2.tar.gz" + sha256: "65e90af18f31f8c8d2e9febf909a7d61f36172536abb25a7089f152210847cd9" "2.1.0": url: "https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v2.1.0/SVT-AV1-v2.1.0.tar.gz" sha256: "72a076807544f3b269518ab11656f77358284da7782cece497781ab64ed4cb8a" @@ -8,15 +11,6 @@ sources: "1.6.0": url: https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.6.0/SVT-AV1-v1.6.0.tar.bz2 sha256: c6b49111a2d4c5113f1ada0c2f716d94bd4a8db704623d453066826401ecdab5 - "1.4.1": - url: https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.4.1/SVT-AV1-v1.4.1.tar.bz2 - sha256: 0e988582f315fe76c909accf5e7f81b975c5bd2b850ee760d8e9fac297f70b5d - "1.3.0": - url: https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.bz2 - sha256: f85fd13ef16880550e425797bdfdf1b0ba310c21d6b343f74ea79dd2fbb2336e - "1.2.1": - url: https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.2.1/SVT-AV1-v1.2.1.tar.bz2 - sha256: 805827daa8aedec4f1362b959f377075e2a811680bfc76b6f4fbf2ef4e7101d4 patches: "1.7.0": - patch_file: "patches/external-cpuinfo-1.7.0.patch" @@ -28,30 +22,3 @@ patches: patch_type: "portability" patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2178 patch_description: "Allow compiling with external cpuinfo" - "1.4.1": - - patch_file: "patches/llvm-clang-macos.patch" - patch_type: "portability" - patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2087 - patch_description: "Allow statically compiling on macos with llvm-clang" - - patch_file: "patches/external-cpuinfo-1.4.1.patch" - patch_type: "portability" - patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2178 - patch_description: "Allow compiling with external cpuinfo" - "1.3.0": - - patch_file: "patches/llvm-clang-macos.patch" - patch_type: "portability" - patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2087 - patch_description: "Allow statically compiling on macos with llvm-clang" - - patch_file: "patches/external-cpuinfo-1.3.0.patch" - patch_type: "portability" - patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2178 - patch_description: "Allow compiling with external cpuinfo" - "1.2.1": - - patch_file: "patches/llvm-clang-macos.patch" - patch_type: "portability" - patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2087 - patch_description: "Allow statically compiling on macos with llvm-clang" - - patch_file: "patches/external-cpuinfo-1.2.1.patch" - patch_type: "portability" - patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2178 - patch_description: "Allow compiling with external cpuinfo" diff --git a/recipes/libsvtav1/all/conanfile.py b/recipes/libsvtav1/all/conanfile.py index 93ab47914aaa4..4e96d05b0f57b 100644 --- a/recipes/libsvtav1/all/conanfile.py +++ b/recipes/libsvtav1/all/conanfile.py @@ -3,8 +3,9 @@ from conan.tools.cmake import cmake_layout, CMakeToolchain, CMakeDeps, CMake from conan.tools.files import copy, get, rmdir, apply_conandata_patches, export_conandata_patches from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.54.0" class SVTAV1Conan(ConanFile): @@ -39,6 +40,9 @@ def config_options(self): self.options.rm_safe("fPIC") if Version(self.version) < "2.0.0": del self.options.minimal_build + if Version(self.version) >= "2.1.1": + # https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/c949fe4f14fe288a9b2b47aa3e61335422a83645/CHANGELOG.md#211---2024-06-25 + del self.options.build_decoder def configure(self): if self.options.shared: @@ -50,11 +54,17 @@ def layout(self): def requirements(self): self.requires("cpuinfo/cci.20231129") + def validate(self): + # https://gitlab.com/AOMediaCodec/SVT-AV1/-/issues/2081 + # https://gitlab.com/AOMediaCodec/SVT-AV1/-/commit/800a81b09db1cf8c9c289ecf6f70381d7888b98c + if Version(self.version) < "1.9.0" and self.settings.os == "Android": + raise ConanInvalidConfiguration(f"{self.ref} does not support Android before version 1.9.0.") + def build_requirements(self): if Version(self.version) >= "1.3.0": self.tool_requires("cmake/[>=3.16 <4]") if self.settings.arch in ("x86", "x86_64"): - self.tool_requires("nasm/2.15.05") + self.tool_requires("nasm/2.16.01") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -62,7 +72,8 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_APPS"] = False - tc.variables["BUILD_DEC"] = self.options.build_decoder + if Version(self.version) < "2.1.1": + tc.variables["BUILD_DEC"] = self.options.build_decoder tc.variables["BUILD_ENC"] = self.options.build_encoder tc.variables["USE_EXTERNAL_CPUINFO"] = True if self.settings.arch in ("x86", "x86_64"): @@ -94,7 +105,7 @@ def package_info(self): self.cpp_info.components["encoder"].requires = ["cpuinfo::cpuinfo"] if self.settings.os in ("FreeBSD", "Linux"): self.cpp_info.components["encoder"].system_libs = ["pthread", "dl", "m"] - if self.options.build_decoder: + if self.options.get_safe("build_decoder"): self.cpp_info.components["decoder"].libs = ["SvtAv1Dec"] self.cpp_info.components["decoder"].includedirs = ["include/svt-av1"] self.cpp_info.components["decoder"].set_property("pkg_config_name", "SvtAv1Dec") diff --git a/recipes/libsvtav1/all/patches/external-cpuinfo-1.2.1.patch b/recipes/libsvtav1/all/patches/external-cpuinfo-1.2.1.patch deleted file mode 100644 index 8e74085d78f88..0000000000000 --- a/recipes/libsvtav1/all/patches/external-cpuinfo-1.2.1.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9c8615541bd0a1db44ec36a761f30bd4dbb26cfb..6245acfe3e05098be57e8b1ad00126455b74e223 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -41,6 +41,11 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) - endif() - - option(COMPILE_C_ONLY "Compile only C code with no simds (autodetect, default off for x86)" OFF) -+option(USE_EXTERNAL_CPUINFO "Consume system cpuinfo library only" OFF) -+ -+if(USE_EXTERNAL_CPUINFO) -+ find_package(cpuinfo CONFIG REQUIRED) -+endif() - - include(CheckCSourceCompiles) - -@@ -542,7 +547,7 @@ endif() - - add_subdirectory(third_party/fastfeat) - --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(NOT USE_EXTERNAL_CPUINFO AND NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - add_subdirectory(third_party/cpuinfo) - endif() - -diff --git a/Source/Lib/Encoder/CMakeLists.txt b/Source/Lib/Encoder/CMakeLists.txt -index fa3e11c137638b8949faf00683233188653ddd4e..d4e8880309a9dac9e909b817e01cef31da4531b5 100644 ---- a/Source/Lib/Encoder/CMakeLists.txt -+++ b/Source/Lib/Encoder/CMakeLists.txt -@@ -131,7 +131,9 @@ set_target_properties(SvtAv1Enc PROPERTIES VERSION ${ENC_VERSION}) - set_target_properties(SvtAv1Enc PROPERTIES SOVERSION ${ENC_VERSION_MAJOR}) - set_target_properties(SvtAv1Enc PROPERTIES C_VISIBILITY_PRESET hidden) - target_link_libraries(SvtAv1Enc PUBLIC ${PLATFORM_LIBS}) --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(USE_EXTERNAL_CPUINFO) -+ target_link_libraries(SvtAv1Enc PRIVATE cpuinfo::cpuinfo) -+elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - target_link_libraries(SvtAv1Enc PRIVATE cpuinfo_public) - endif() - -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index 99a0bcfd62ac7f5f268d3527d0f65c688a44eb6c..d5a3ca47f948663a56dd731e457a4922677e1f78 100644 ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -85,7 +85,7 @@ set(lib_list - $ - $ - $ -- cpuinfo_public -+ $,cpuinfo::cpuinfo,cpuinfo_public> - gtest_all) - if(UNIX) - # App Source Files -diff --git a/Source/Lib/Decoder/CMakeLists.txt b/Source/Lib/Decoder/CMakeLists.txt -index ca7e51f2c2c1ec12695a0c1dd5ef90bc259edb1d..bdac723c418f619ceee2dbd7a52d9fc4ac395dc8 100644 ---- a/Source/Lib/Decoder/CMakeLists.txt -+++ b/Source/Lib/Decoder/CMakeLists.txt -@@ -100,7 +100,9 @@ set_target_properties(SvtAv1Dec PROPERTIES SOVERSION ${DEC_VERSION_MAJOR}) - set_target_properties(SvtAv1Dec PROPERTIES C_VISIBILITY_PRESET hidden) - add_dependencies(SvtAv1Dec EbVersionHeaderGen) - target_link_libraries(SvtAv1Dec PUBLIC ${PLATFORM_LIBS}) --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(USE_EXTERNAL_CPUINFO) -+ target_link_libraries(SvtAv1Dec PRIVATE cpuinfo::cpuinfo) -+elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - target_link_libraries(SvtAv1Dec PRIVATE cpuinfo_public) - endif() - diff --git a/recipes/libsvtav1/all/patches/external-cpuinfo-1.3.0.patch b/recipes/libsvtav1/all/patches/external-cpuinfo-1.3.0.patch deleted file mode 100644 index 8540fba08ffe5..0000000000000 --- a/recipes/libsvtav1/all/patches/external-cpuinfo-1.3.0.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index f98c8675acc06b3c998f29fcc712ac8befcda129..f464ead3ea55bacd71451a24252cbaf33194292c 100644 ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -151,7 +151,7 @@ set(lib_list - $ - $ - $ -- cpuinfo_public -+ $,cpuinfo::cpuinfo,cpuinfo_public> - gtest_all) - if(UNIX) - # App Source Files -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2c7c8d67f6ce94e74b685a3494b0430b60f80105..f7f0dbe1f480060aebd5ccd9b62969ab4a69449a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -41,6 +41,11 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) - endif() - - option(COMPILE_C_ONLY "Compile only C code with no simds (autodetect, default off for x86)" OFF) -+option(USE_EXTERNAL_CPUINFO "Consume system cpuinfo library only" OFF) -+ -+if(USE_EXTERNAL_CPUINFO) -+ find_package(cpuinfo CONFIG REQUIRED) -+endif() - - include(CheckCSourceCompiles) - -@@ -542,7 +547,7 @@ endif() - - add_subdirectory(third_party/fastfeat) - --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(NOT USE_EXTERNAL_CPUINFO AND NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - add_subdirectory(third_party/cpuinfo) - endif() - -diff --git a/Source/Lib/Encoder/CMakeLists.txt b/Source/Lib/Encoder/CMakeLists.txt -index 2991364b7d12dd846ff981c86306d9d2b46cc934..0c0ee78b869c0c875eb36fce4706b6fd3f1c9b7c 100644 ---- a/Source/Lib/Encoder/CMakeLists.txt -+++ b/Source/Lib/Encoder/CMakeLists.txt -@@ -129,7 +129,9 @@ set_target_properties(SvtAv1Enc PROPERTIES VERSION ${ENC_VERSION}) - set_target_properties(SvtAv1Enc PROPERTIES SOVERSION ${ENC_VERSION_MAJOR}) - set_target_properties(SvtAv1Enc PROPERTIES C_VISIBILITY_PRESET hidden) - target_link_libraries(SvtAv1Enc PUBLIC ${PLATFORM_LIBS}) --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(USE_EXTERNAL_CPUINFO) -+ target_link_libraries(SvtAv1Enc PRIVATE cpuinfo::cpuinfo) -+elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - target_link_libraries(SvtAv1Enc PRIVATE cpuinfo_public) - endif() - -diff --git a/Source/Lib/Decoder/CMakeLists.txt b/Source/Lib/Decoder/CMakeLists.txt -index 0f220a78a6db783ef2b5d6dd6cc182766c4362a3..8fb88f1c958fa965bc8f9ed9c1d563ee3858baee 100644 ---- a/Source/Lib/Decoder/CMakeLists.txt -+++ b/Source/Lib/Decoder/CMakeLists.txt -@@ -147,7 +147,9 @@ set_target_properties(SvtAv1Dec PROPERTIES SOVERSION ${DEC_VERSION_MAJOR}) - set_target_properties(SvtAv1Dec PROPERTIES C_VISIBILITY_PRESET hidden) - add_dependencies(SvtAv1Dec EbVersionHeaderGen) - target_link_libraries(SvtAv1Dec PUBLIC ${PLATFORM_LIBS}) --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(USE_EXTERNAL_CPUINFO) -+ target_link_libraries(SvtAv1Dec PRIVATE cpuinfo::cpuinfo) -+elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - target_link_libraries(SvtAv1Dec PRIVATE cpuinfo_public) - endif() - diff --git a/recipes/libsvtav1/all/patches/external-cpuinfo-1.4.1.patch b/recipes/libsvtav1/all/patches/external-cpuinfo-1.4.1.patch deleted file mode 100644 index 6673e558c5c3e..0000000000000 --- a/recipes/libsvtav1/all/patches/external-cpuinfo-1.4.1.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index f98c8675acc06b3c998f29fcc712ac8befcda129..f464ead3ea55bacd71451a24252cbaf33194292c 100644 ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -151,7 +151,7 @@ set(lib_list - $ - $ - $ -- cpuinfo_public -+ $,cpuinfo::cpuinfo,cpuinfo_public> - gtest_all) - if(UNIX) - # App Source Files -diff --git a/Source/Lib/Decoder/CMakeLists.txt b/Source/Lib/Decoder/CMakeLists.txt -index 0f220a78a6db783ef2b5d6dd6cc182766c4362a3..8fb88f1c958fa965bc8f9ed9c1d563ee3858baee 100644 ---- a/Source/Lib/Decoder/CMakeLists.txt -+++ b/Source/Lib/Decoder/CMakeLists.txt -@@ -147,7 +147,9 @@ set_target_properties(SvtAv1Dec PROPERTIES SOVERSION ${DEC_VERSION_MAJOR}) - set_target_properties(SvtAv1Dec PROPERTIES C_VISIBILITY_PRESET hidden) - add_dependencies(SvtAv1Dec EbVersionHeaderGen) - target_link_libraries(SvtAv1Dec PUBLIC ${PLATFORM_LIBS}) --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(USE_EXTERNAL_CPUINFO) -+ target_link_libraries(SvtAv1Dec PRIVATE cpuinfo::cpuinfo) -+elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - target_link_libraries(SvtAv1Dec PRIVATE cpuinfo_public) - endif() - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 48953de55693cd1f51a7260b84d4e9da1e463cd5..9899442e29eb5e8d3675de68ebfa296a9045f917 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -41,6 +41,11 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) - endif() - - option(COMPILE_C_ONLY "Compile only C code with no simds (autodetect, default off for x86)" OFF) -+option(USE_EXTERNAL_CPUINFO "Consume system cpuinfo library only" OFF) -+ -+if(USE_EXTERNAL_CPUINFO) -+ find_package(cpuinfo CONFIG REQUIRED) -+endif() - - include(CheckCSourceCompiles) - -@@ -590,7 +595,7 @@ endif() - - add_subdirectory(third_party/fastfeat) - --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(NOT USE_EXTERNAL_CPUINFO AND NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - add_subdirectory(third_party/cpuinfo) - endif() - -diff --git a/Source/Lib/Encoder/CMakeLists.txt b/Source/Lib/Encoder/CMakeLists.txt -index 12badfd32963989a0e6a7e181321c9a6b527706b..6ed1ca0cce8f13c536899fc16d6eaa3458f7de8c 100644 ---- a/Source/Lib/Encoder/CMakeLists.txt -+++ b/Source/Lib/Encoder/CMakeLists.txt -@@ -129,7 +129,9 @@ set_target_properties(SvtAv1Enc PROPERTIES VERSION ${ENC_VERSION}) - set_target_properties(SvtAv1Enc PROPERTIES SOVERSION ${ENC_VERSION_MAJOR}) - set_target_properties(SvtAv1Enc PROPERTIES C_VISIBILITY_PRESET hidden) - target_link_libraries(SvtAv1Enc PUBLIC ${PLATFORM_LIBS}) --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(USE_EXTERNAL_CPUINFO) -+ target_link_libraries(SvtAv1Enc PRIVATE cpuinfo::cpuinfo) -+elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - target_link_libraries(SvtAv1Enc PRIVATE cpuinfo_public) - endif() - diff --git a/recipes/libsvtav1/all/test_package/CMakeLists.txt b/recipes/libsvtav1/all/test_package/CMakeLists.txt index c3bbcf04d632f..9a816703844c2 100644 --- a/recipes/libsvtav1/all/test_package/CMakeLists.txt +++ b/recipes/libsvtav1/all/test_package/CMakeLists.txt @@ -1,8 +1,11 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) find_package(libsvtav1 REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE libsvtav1::encoder) -target_link_libraries(${PROJECT_NAME} PRIVATE libsvtav1::decoder) +if (TARGET libsvtav1::decoder) + target_link_libraries(${PROJECT_NAME} PRIVATE libsvtav1::decoder) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_DECODER) +endif() diff --git a/recipes/libsvtav1/all/test_package/test_package.cpp b/recipes/libsvtav1/all/test_package/test_package.cpp index cb808440d268e..bb98a869a2556 100644 --- a/recipes/libsvtav1/all/test_package/test_package.cpp +++ b/recipes/libsvtav1/all/test_package/test_package.cpp @@ -1,5 +1,7 @@ #include "EbSvtAv1Enc.h" -#include "EbSvtAv1Dec.h" +#ifdef HAVE_DECODER +# include "EbSvtAv1Dec.h" +#endif #include diff --git a/recipes/libsvtav1/config.yml b/recipes/libsvtav1/config.yml index efc6420082e04..510ab3b3cd3f2 100644 --- a/recipes/libsvtav1/config.yml +++ b/recipes/libsvtav1/config.yml @@ -1,13 +1,9 @@ versions: + "2.1.2": + folder: all "2.1.0": folder: all "1.7.0": folder: all "1.6.0": folder: all - "1.4.1": - folder: all - "1.3.0": - folder: all - "1.2.1": - folder: all diff --git a/recipes/libsystemd/all/conandata.yml b/recipes/libsystemd/all/conandata.yml index 28098a76fd075..ebdc4097aca58 100644 --- a/recipes/libsystemd/all/conandata.yml +++ b/recipes/libsystemd/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "255.10": + url: "https://github.com/systemd/systemd-stable/archive/v255.10.tar.gz" + sha256: "1747b848e68223597abb90ca2758b25230ac4c19e252e9ec77c8518750f621ed" "255.7": url: "https://github.com/systemd/systemd-stable/archive/v255.7.tar.gz" sha256: "da29f2490c192ca743511098b1d15e385b1b5e7744979661dc30514c1ac61f0e" @@ -18,6 +21,10 @@ sources: url: "https://github.com/systemd/systemd-stable/archive/v253.6.tar.gz" sha256: "a0aebcfaa2e001a4d846691631d1722c4cfa1a175e4ea62db6edca0ea3cf1e3e" patches: + "255.10": + - patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch" + patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" + patch_type: "conan" "255.7": - patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch" patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" diff --git a/recipes/libsystemd/config.yml b/recipes/libsystemd/config.yml index 9218790a9e1ee..f9ba7f3698786 100644 --- a/recipes/libsystemd/config.yml +++ b/recipes/libsystemd/config.yml @@ -1,4 +1,6 @@ versions: + "255.10": + folder: all "255.7": folder: all "255.2": diff --git a/recipes/liburing/all/conandata.yml b/recipes/liburing/all/conandata.yml index f516fa5c32370..c4fd823c644aa 100644 --- a/recipes/liburing/all/conandata.yml +++ b/recipes/liburing/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.7": + url: "https://github.com/axboe/liburing/archive/liburing-2.7.tar.gz" + sha256: "56202ad443c50e684dde3692819be3b91bbe003e1c14bf5abfa11973669978c1" "2.6": url: "https://github.com/axboe/liburing/archive/liburing-2.6.tar.gz" sha256: "682f06733e6db6402c1f904cbbe12b94942a49effc872c9e01db3d7b180917cc" @@ -24,6 +27,10 @@ sources: url: "https://github.com/axboe/liburing/archive/liburing-0.7.tar.gz" sha256: "8e2842cfe947f3a443af301bdd6d034455536c38a455c7a700d0c1ad165a7543" patches: + "2.7": + - patch_file: "patches/liburing-2.4-disable_samples_and_tests.patch" + patch_description: "Disable tests and samples as it might not work while cross-compiling" + patch_type: "conan" "2.6": - patch_file: "patches/liburing-2.4-disable_samples_and_tests.patch" patch_description: "Disable tests and samples as it might not work while cross-compiling" diff --git a/recipes/liburing/all/patches/liburing-2.4-disable_samples_and_tests.patch b/recipes/liburing/all/patches/liburing-2.4-disable_samples_and_tests.patch index f3b6165682fd2..beb6f175e2861 100644 --- a/recipes/liburing/all/patches/liburing-2.4-disable_samples_and_tests.patch +++ b/recipes/liburing/all/patches/liburing-2.4-disable_samples_and_tests.patch @@ -2,12 +2,11 @@ diff --git a/Makefile b/Makefile index 73d021c..74aa8d7 100644 --- a/Makefile +++ b/Makefile -@@ -8,8 +8,6 @@ default: all +@@ -8,6 +8,4 @@ default: all all: @$(MAKE) -C src - @$(MAKE) -C test - @$(MAKE) -C examples - .PHONY: all install default clean test - .PHONY: FORCE cscope + \ No newline at end of file diff --git a/recipes/liburing/config.yml b/recipes/liburing/config.yml index 72a1f513df458..d8d4acd12f991 100644 --- a/recipes/liburing/config.yml +++ b/recipes/liburing/config.yml @@ -1,4 +1,6 @@ versions: + "2.7": + folder: all "2.6": folder: all "2.5": diff --git a/recipes/libvpx/all/conandata.yml b/recipes/libvpx/all/conandata.yml index a3d16e2c79679..556d9f33bcae4 100644 --- a/recipes/libvpx/all/conandata.yml +++ b/recipes/libvpx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.14.1": + url: "https://github.com/webmproject/libvpx/archive/refs/tags/v1.14.1.tar.gz" + sha256: "901747254d80a7937c933d03bd7c5d41e8e6c883e0665fadcb172542167c7977" "1.14.0": url: "https://github.com/webmproject/libvpx/archive/refs/tags/v1.14.0.tar.gz" sha256: "5f21d2db27071c8a46f1725928a10227ae45c5cd1cad3727e4aafbe476e321fa" @@ -11,9 +14,6 @@ sources: "1.10.0": url: "https://github.com/webmproject/libvpx/archive/refs/tags/v1.10.0.tar.gz" sha256: "85803ccbdbdd7a3b03d930187cb055f1353596969c1f92ebec2db839fa4f834a" - "1.9.0": - url: "https://github.com/webmproject/libvpx/archive/refs/tags/v1.9.0.tar.gz" - sha256: "d279c10e4b9316bf11a570ba16c3d55791e1ad6faa4404c67422eb631782c80a" patches: "1.11.0": - patch_file: "patches/0001-extended-support-1.10.0.patch" @@ -25,12 +25,3 @@ patches: patch_type: "portability" patch_description: "Add support for more compilers" patch_source: "https://github.com/webmproject/libvpx/commit/cafe7cc1f10cfea74edb2ded7c3df2d69fcf1eee" - "1.9.0": - - patch_file: "patches/0001-extended-support-1.9.0.patch" - patch_type: "portability" - patch_description: "Add support for more compilers" - patch_source: "https://github.com/webmproject/libvpx/commit/cafe7cc1f10cfea74edb2ded7c3df2d69fcf1eee" - - patch_file: "patches/0002-msvc_conan_build.patch" - patch_type: "portability" - patch_description: "Add support for more compilers" - patch_source: "https://github.com/webmproject/libvpx/commit/04086a30664d2a3e89d6a6e4e1c18f1a82c8f958" diff --git a/recipes/libvpx/all/conanfile.py b/recipes/libvpx/all/conanfile.py index 3752a16f55fa7..babc16fe80346 100644 --- a/recipes/libvpx/all/conanfile.py +++ b/recipes/libvpx/all/conanfile.py @@ -60,6 +60,9 @@ def configure(self): self.package_type = "static-library" if self.options.get_safe("shared"): self.options.rm_safe("fPIC") + if self.settings.os == "Android": + del self.options.shared + self.package_type = "static-library" def layout(self): basic_layout(self, src_folder="src") diff --git a/recipes/libvpx/all/patches/0001-extended-support-1.9.0.patch b/recipes/libvpx/all/patches/0001-extended-support-1.9.0.patch deleted file mode 100644 index 7e10a765c149c..0000000000000 --- a/recipes/libvpx/all/patches/0001-extended-support-1.9.0.patch +++ /dev/null @@ -1,58 +0,0 @@ ---- a/build/make/gen_msvs_sln.sh -+++ b/build/make/gen_msvs_sln.sh -@@ -219,6 +219,7 @@ for opt in "$@"; do - 14) vs_year=2015 ;; - 15) vs_year=2017 ;; - 16) vs_year=2019 ;; -+ 17) vs_year=2022 ;; - *) die Unrecognized Visual Studio Version in $opt ;; - esac - ;; -@@ -232,7 +233,7 @@ done - outfile=${outfile:-/dev/stdout} - mkoutfile=${mkoutfile:-/dev/stdout} - case "${vs_ver}" in -- 1[4-6]) -+ 1[4-7]) - # VS has used Format Version 12.00 continuously since vs11. - sln_vers="12.00" - sln_vers_str="Visual Studio ${vs_year}" ---- a/build/make/gen_msvs_vcxproj.sh -+++ b/build/make/gen_msvs_vcxproj.sh -@@ -168,7 +168,7 @@ for opt in "$@"; do - --ver=*) - vs_ver="$optval" - case "$optval" in -- 1[4-6]) -+ 1[4-7]) - ;; - *) die Unrecognized Visual Studio Version in $opt - ;; -@@ -342,6 +342,9 @@ generate_vcxproj() { - if [ "$vs_ver" = "16" ]; then - tag_content PlatformToolset v142 - fi -+ if [ "$vs_ver" = "17" ]; then -+ tag_content PlatformToolset v143 -+ fi - tag_content CharacterSet Unicode - if [ "$config" = "Release" ]; then - tag_content WholeProgramOptimization true ---- a/configure -+++ b/configure -@@ -138,6 +138,7 @@ all_platforms="${all_platforms} x86-win32-gcc" - all_platforms="${all_platforms} x86-win32-vs14" - all_platforms="${all_platforms} x86-win32-vs15" - all_platforms="${all_platforms} x86-win32-vs16" -+all_platforms="${all_platforms} x86-win32-vs17" - all_platforms="${all_platforms} x86_64-android-gcc" - all_platforms="${all_platforms} x86_64-darwin9-gcc" - all_platforms="${all_platforms} x86_64-darwin10-gcc" -@@ -158,6 +159,7 @@ all_platforms="${all_platforms} x86_64-win64-gcc" - all_platforms="${all_platforms} x86_64-win64-vs14" - all_platforms="${all_platforms} x86_64-win64-vs15" - all_platforms="${all_platforms} x86_64-win64-vs16" -+all_platforms="${all_platforms} x86_64-win64-vs17" - all_platforms="${all_platforms} generic-gnu" - - # all_targets is a list of all targets that can be configured diff --git a/recipes/libvpx/all/patches/0002-msvc_conan_build.patch b/recipes/libvpx/all/patches/0002-msvc_conan_build.patch deleted file mode 100644 index 28885c1c83394..0000000000000 --- a/recipes/libvpx/all/patches/0002-msvc_conan_build.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/build/make/msvs_common.sh b/build/make/msvs_common.sh -index 27ddf7f..da462ec 100644 ---- a/build/make/msvs_common.sh -+++ b/build/make/msvs_common.sh -@@ -9,7 +9,7 @@ - ## be found in the AUTHORS file in the root of the source tree. - ## - --if [ "$(uname -o 2>/dev/null)" = "Cygwin" ] \ -+if [ "$(uname -o 2>/dev/null)" = "Cygwin" ] || [ "$(uname -o 2>/dev/null)" = "Msys" ]\ - && cygpath --help >/dev/null 2>&1; then - FIXPATH='cygpath -m' - else diff --git a/recipes/libvpx/config.yml b/recipes/libvpx/config.yml index e7a6e4fc3010b..33ef774be6ba3 100644 --- a/recipes/libvpx/config.yml +++ b/recipes/libvpx/config.yml @@ -1,4 +1,6 @@ versions: + "1.14.1": + folder: all "1.14.0": folder: all "1.13.1": @@ -7,5 +9,3 @@ versions: folder: all "1.10.0": folder: all - "1.9.0": - folder: all diff --git a/recipes/libxlsxwriter/all/conandata.yml b/recipes/libxlsxwriter/all/conandata.yml index 2cd855a6df663..da8b13009453a 100644 --- a/recipes/libxlsxwriter/all/conandata.yml +++ b/recipes/libxlsxwriter/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.8": + url: "https://github.com/jmcnamara/libxlsxwriter/archive/v1.1.8.tar.gz" + sha256: "122c98353e5b69284a1cd782be7ae67bdefde2146f8197ef89a1aaf886058e86" "1.1.7": url: "https://github.com/jmcnamara/libxlsxwriter/archive/RELEASE_1.1.7.tar.gz" sha256: "1f378e25d8bb5be258d3e04d3d24b8c23ff21bf206e6e206661844a96ca25eda" @@ -15,6 +18,10 @@ sources: url: "https://github.com/jmcnamara/libxlsxwriter/archive/RELEASE_1.0.0.tar.gz" sha256: "8b353379333c323d14a9d265cd2491d3a6c0032c8d6ec2141f10b82ab66a087c" patches: + "1.1.8": + - patch_file: "patches/1.1.7-0001-fix-cmake.patch" + patch_description: "Fix CMake: robust dependencies discovery & avoid some hardcoded flags" + patch_type: "conan" "1.1.7": - patch_file: "patches/1.1.7-0001-fix-cmake.patch" patch_description: "Fix CMake: robust dependencies discovery & avoid some hardcoded flags" diff --git a/recipes/libxlsxwriter/all/conanfile.py b/recipes/libxlsxwriter/all/conanfile.py index 1c65ddbb9e247..0435ae0e28bb1 100644 --- a/recipes/libxlsxwriter/all/conanfile.py +++ b/recipes/libxlsxwriter/all/conanfile.py @@ -11,11 +11,11 @@ class LibxlsxwriterConan(ConanFile): name = "libxlsxwriter" + description = "A C library for creating Excel XLSX files" license = "BSD-2-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/jmcnamara/libxlsxwriter" topics = ("excel", "xlsx") - description = "A C library for creating Excel XLSX files" package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -65,8 +65,7 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.name}:md5=openssl is not suppported in {self.ref}") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/libxlsxwriter/config.yml b/recipes/libxlsxwriter/config.yml index 5eb935f412b85..d944ed1b5f8d7 100644 --- a/recipes/libxlsxwriter/config.yml +++ b/recipes/libxlsxwriter/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.8": + folder: "all" "1.1.7": folder: "all" "1.1.5": diff --git a/recipes/libxshmfence/all/conandata.yml b/recipes/libxshmfence/all/conandata.yml index 8c16f251fa486..21938ecba1296 100644 --- a/recipes/libxshmfence/all/conandata.yml +++ b/recipes/libxshmfence/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.2": + url: "https://www.x.org/archive/individual/lib/libxshmfence-1.3.2.tar.gz" + sha256: "e93a85099604beb244ee756dcaf70e18b08701c1ca84c4de0126cd71bd6c8181" "1.3": - url: "https://www.x.org/archive//individual/lib/libxshmfence-1.3.tar.gz" + url: "https://www.x.org/archive/individual/lib/libxshmfence-1.3.tar.gz" sha256: "7eb3d46ad91bab444f121d475b11b39273142d090f7e9ac43e6a87f4ff5f902c" diff --git a/recipes/libxshmfence/config.yml b/recipes/libxshmfence/config.yml index d2eb4ed4a511f..5fbc1fce7e8d6 100644 --- a/recipes/libxshmfence/config.yml +++ b/recipes/libxshmfence/config.yml @@ -1,3 +1,5 @@ versions: + "1.3.2": + folder: all "1.3": folder: all diff --git a/recipes/libyuv/all/conandata.yml b/recipes/libyuv/all/conandata.yml index 3b9b5764537d0..f89be505198c3 100644 --- a/recipes/libyuv/all/conandata.yml +++ b/recipes/libyuv/all/conandata.yml @@ -1,6 +1,8 @@ # Versions from LIBYUV_VERSION definition in include/libyuv/version.h # Pay attention to package commits incrementing this definition sources: + "1892": + url: "https://chromium.googlesource.com/libyuv/libyuv/+archive/4cd90347e78ff76755df2107009e900374aee9cd.tar.gz" "1880": url: "https://chromium.googlesource.com/libyuv/libyuv/+archive/fb6341d326846fbbe669ad5173e520f66b339621.tar.gz" "1854": @@ -12,6 +14,13 @@ sources: "1768": url: "https://chromium.googlesource.com/libyuv/libyuv/+archive/dfaf7534e0e536f7e5ef8ddd7326797bd09b8622.tar.gz" patches: + "1892": + - patch_file: "patches/1892-0001-fix-cmake.patch" + patch_description: "Fix CMake to be more robust & predictable" + patch_type: "conan" + - patch_file: "patches/1892-0001-check-arm-sve.patch" + patch_description: "Check if -march=armv9-a+sve2 is supported" + patch_type: "conan" "1880": - patch_file: "patches/1880-0001-fix-cmake.patch" patch_description: "Fix CMake to be more robust & predictable" diff --git a/recipes/libyuv/all/conanfile.py b/recipes/libyuv/all/conanfile.py index 4d851737efc1b..2452cb8e27058 100644 --- a/recipes/libyuv/all/conanfile.py +++ b/recipes/libyuv/all/conanfile.py @@ -1,7 +1,8 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -50,9 +51,9 @@ def requirements(self): if self.options.with_jpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_jpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.1") + self.requires("libjpeg-turbo/[>=3.0.3 <4]") elif self.options.with_jpeg == "mozjpeg": - self.requires("mozjpeg/4.1.3") + self.requires("mozjpeg/4.1.5") def source(self): get(self, **self.conan_data["sources"][self.version]) @@ -65,8 +66,21 @@ def generate(self): deps = CMakeDeps(self) deps.generate() - def build(self): + def _patch_sources(self): apply_conandata_patches(self) + + # remove default CMAKE_POSITION_INDEPENDENT_CODE if not requested + use_fpic = self.options.get_safe("fPIC") or self.options.get_safe("shared") + if Version(self.version) >= "1892" and not use_fpic: + replace_in_file( + self, + os.path.join(self.source_folder, "CMakeLists.txt"), + "SET(CMAKE_POSITION_INDEPENDENT_CODE ON)", + "", + ) + + def build(self): + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/libyuv/all/patches/1892-0001-check-arm-sve.patch b/recipes/libyuv/all/patches/1892-0001-check-arm-sve.patch new file mode 100644 index 0000000000000..c5fe4176018fc --- /dev/null +++ b/recipes/libyuv/all/patches/1892-0001-check-arm-sve.patch @@ -0,0 +1,48 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -107,25 +107,38 @@ if(NOT MSVC) + TARGET_COMPILE_OPTIONS(${ly_lib_name}_neon64 PRIVATE -march=armv8-a+dotprod+i8mm) + LIST(APPEND ly_lib_parts $) + +- # Enable AArch64 SVE kernels. +- ADD_LIBRARY(${ly_lib_name}_sve OBJECT +- ${ly_src_dir}/row_sve.cc) +- TARGET_COMPILE_OPTIONS(${ly_lib_name}_sve PRIVATE -march=armv9-a+sve2) +- LIST(APPEND ly_lib_parts $) +- + set(OLD_CMAKE_REQURED_FLAGS ${CMAKE_REQUIRED_FLAGS}) + set(OLD_CMAKE_TRY_COMPILE_TARGET_TYPE ${CMAKE_TRY_COMPILE_TARGET_TYPE}) +- set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -march=armv9-a+sme") ++ ++ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQURED_FLAGS} -march=armv9-a+sve2") + set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) ++ # Check whether the compiler can compile SVE functions; this fails ++ # with Clang for macOS. ++ check_c_source_compiles(" ++int main(void) { return 0; } ++ " CAN_COMPILE_SVE) ++ ++ set(CMAKE_REQUIRED_FLAGS "${OLD_CMAKE_REQURED_FLAGS} -march=armv9-a+sme") + # Check whether the compiler can compile SME functions; this fails + # with Clang for Windows. + check_c_source_compiles(" + __arm_locally_streaming void func(void) { } + int main(void) { return 0; } + " CAN_COMPILE_SME) ++ + set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQURED_FLAGS}) + set(CMAKE_TRY_COMPILE_TARGET_TYPE ${OLD_CMAKE_TRY_COMPILE_TARGET_TYPE}) + ++ # Enable AArch64 SVE kernels. ++ if (CAN_COMPILE_SVE) ++ ADD_LIBRARY(${ly_lib_name}_sve OBJECT ++ ${ly_src_dir}/row_sve.cc) ++ TARGET_COMPILE_OPTIONS(${ly_lib_name}_sve PRIVATE -march=armv9-a+sve2) ++ LIST(APPEND ly_lib_parts $) ++ else() ++ ADD_DEFINITIONS(-DLIBYUV_DISABLE_SVE) ++ endif() ++ + if (CAN_COMPILE_SME) + # Enable AArch64 SME kernels. + ADD_LIBRARY(${ly_lib_name}_sme OBJECT diff --git a/recipes/libyuv/all/patches/1892-0001-fix-cmake.patch b/recipes/libyuv/all/patches/1892-0001-fix-cmake.patch new file mode 100644 index 0000000000000..9c6d556910436 --- /dev/null +++ b/recipes/libyuv/all/patches/1892-0001-fix-cmake.patch @@ -0,0 +1,67 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,8 +4,8 @@ + + include(CheckCSourceCompiles) + ++CMAKE_MINIMUM_REQUIRED( VERSION 3.8 ) + PROJECT ( YUV C CXX ) # "C" is required even for C++ projects +-CMAKE_MINIMUM_REQUIRED( VERSION 2.8.12 ) + OPTION( UNIT_TEST "Built unit tests" OFF ) + + SET ( ly_base_dir ${PROJECT_SOURCE_DIR} ) +@@ -139,15 +139,10 @@ int main(void) { return 0; } + endif() + + # this creates the static library (.a) +-ADD_LIBRARY( ${ly_lib_static} STATIC ${ly_lib_parts}) ++ADD_LIBRARY( ${ly_lib_static} ${ly_lib_parts}) ++target_compile_features(${ly_lib_static} PUBLIC cxx_std_11) + + # this creates the shared library (.so) +-ADD_LIBRARY( ${ly_lib_shared} SHARED ${ly_lib_parts}) +-SET_TARGET_PROPERTIES( ${ly_lib_shared} PROPERTIES OUTPUT_NAME "${ly_lib_name}" ) +-SET_TARGET_PROPERTIES( ${ly_lib_shared} PROPERTIES PREFIX "lib" ) +-if(WIN32) +- SET_TARGET_PROPERTIES( ${ly_lib_shared} PROPERTIES IMPORT_PREFIX "lib" ) +-endif() + + # this creates the cpuid tool + ADD_EXECUTABLE ( cpuid ${ly_base_dir}/util/cpuid.c ) +@@ -160,12 +155,18 @@ TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} ) + # this creates the yuvconstants tool + ADD_EXECUTABLE ( yuvconstants ${ly_base_dir}/util/yuvconstants.c ) + TARGET_LINK_LIBRARIES ( yuvconstants ${ly_lib_static} ) ++include(CheckFunctionExists) ++check_function_exists(round HAVE_MATH_SYSTEM) ++if(NOT HAVE_MATH_SYSTEM) ++ target_link_libraries(yuvconstants m) ++endif() + +-find_package ( JPEG ) +-if (JPEG_FOUND) +- include_directories( ${JPEG_INCLUDE_DIR} ) +- target_link_libraries( ${ly_lib_shared} ${JPEG_LIBRARY} ) +- add_definitions( -DHAVE_JPEG ) ++option(LIBYUV_WITH_JPEG "Build libyuv with jpeg" ON) ++if (LIBYUV_WITH_JPEG) ++ find_package(JPEG REQUIRED) ++ target_link_libraries(${ly_lib_static} JPEG::JPEG ) ++ target_compile_definitions(${ly_lib_static} PRIVATE HAVE_JPEG) ++ target_compile_definitions(yuvconvert PRIVATE HAVE_JPEG) + endif() + + if(UNIT_TEST) +@@ -211,10 +212,8 @@ endif() + + + # install the conversion tool, .so, .a, and all the header files +-INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert DESTINATION bin ) +-INSTALL ( TARGETS ${ly_lib_static} DESTINATION lib ) +-INSTALL ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) ++INSTALL ( TARGETS yuvconvert yuvconstants DESTINATION bin) ++INSTALL ( TARGETS ${ly_lib_static} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) + INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include ) + + # create the .deb and .rpm packages using cpack +-INCLUDE ( CM_linux_packages.cmake ) diff --git a/recipes/libyuv/config.yml b/recipes/libyuv/config.yml index fe46d8f150b2c..9b10304af3038 100644 --- a/recipes/libyuv/config.yml +++ b/recipes/libyuv/config.yml @@ -1,4 +1,6 @@ versions: + "1892": + folder: all "1880": folder: all "1854": diff --git a/recipes/llama-cpp/all/cmake/llama-cpp-cuda-static.cmake b/recipes/llama-cpp/all/cmake/llama-cpp-cuda-static.cmake new file mode 100644 index 0000000000000..2e9b341b77e42 --- /dev/null +++ b/recipes/llama-cpp/all/cmake/llama-cpp-cuda-static.cmake @@ -0,0 +1,7 @@ +find_dependency(CUDAToolkit REQUIRED) +if (WIN32) + # As of 12.3.1 CUDA Toolkit for Windows does not offer a static cublas library + target_link_libraries(llama-cpp::common INTERFACE CUDA::cudart_static CUDA::cublas CUDA::cublasLt CUDA::cuda_driver) +else () + target_link_libraries(llama-cpp::common INTERFACE CUDA::cudart_static CUDA::cublas_static CUDA::cublasLt_static CUDA::cuda_driver) +endif() diff --git a/recipes/llama-cpp/all/conandata.yml b/recipes/llama-cpp/all/conandata.yml old mode 100644 new mode 100755 index 83cccb6e8a1a6..f31f9bb9e4c75 --- a/recipes/llama-cpp/all/conandata.yml +++ b/recipes/llama-cpp/all/conandata.yml @@ -1,7 +1,12 @@ sources: + "b3542": + url: "https://github.com/ggerganov/llama.cpp/archive/refs/tags/b3542.tar.gz" + sha256: "6f8b23d930400fce5708d2c85022ef33f1083af8f6ac395abefadacee0942e78" "b3040": url: "https://github.com/ggerganov/llama.cpp/archive/refs/tags/b3040.tar.gz" sha256: "020e040139660eb40113503bb1057d5387677d249b990e008e04821532f7cd62" - "b2038": - url: "https://github.com/ggerganov/llama.cpp/archive/refs/tags/b2038.tar.gz" - sha256: "a55bc75f5c76624cabfd9ea5e045f76597411231cb6fc231f2a0bff6287ab13b" +patches: + "b3542": + - patch_file: "patches/b3542-001-curl-patch-targets.patch" + "b3040": + - patch_file: "patches/b3040-001-curl-patch-targets.patch" diff --git a/recipes/llama-cpp/all/conanfile.py b/recipes/llama-cpp/all/conanfile.py old mode 100644 new mode 100755 index b39564c4e0974..06fe2b68724c2 --- a/recipes/llama-cpp/all/conanfile.py +++ b/recipes/llama-cpp/all/conanfile.py @@ -5,7 +5,7 @@ from conan.tools.apple import is_apple_os from conan.tools.build import check_min_cppstd, cross_building from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, rmdir +from conan.tools.files import copy, get, rmdir, apply_conandata_patches, export_conandata_patches from conan.tools.scm import Version @@ -20,16 +20,22 @@ class LlamaCppConan(ConanFile): homepage = "https://github.com/ggerganov/llama.cpp" license = "MIT" settings = "os", "arch", "compiler", "build_type" + package_type = "library" + options = { "shared": [True, False], "fPIC": [True, False], + "with_examples": [True, False], + "with_cuda": [True, False], + "with_curl": [True, False], } default_options = { "shared": False, "fPIC": True, + "with_examples": False, + "with_cuda": False, + "with_curl": False, } - - package_type = "library" @property def _min_cppstd(self): @@ -41,6 +47,10 @@ def _compilers_minimum_version(self): "gcc": "8" } + def export_sources(self): + export_conandata_patches(self) + copy(self, "cmake/*", dst=self.export_sources_folder, src=self.recipe_folder) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -61,6 +71,10 @@ def validate(self): def layout(self): cmake_layout(self, src_folder="src") + def requirements(self): + if self.options.with_curl: + self.requires("libcurl/[>=7.78 <9]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -71,13 +85,16 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["LLAMA_STANDALONE"] = False tc.variables["LLAMA_BUILD_TESTS"] = False - tc.variables["LLAMA_BUILD_EXAMPLES"] = False + tc.variables["LLAMA_BUILD_EXAMPLES"] = self.options.get_safe("with_examples") + tc.variables["LLAMA_CURL"] = self.options.get_safe("with_curl") tc.variables["BUILD_SHARED_LIBS"] = bool(self.options.shared) + tc.variables["GGML_CUDA"] = self.options.get_safe("with_cuda") if hasattr(self, "settings_build") and cross_building(self): tc.variables["LLAMA_NATIVE"] = False tc.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() @@ -87,6 +104,7 @@ def package(self): cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) copy(self, "*", os.path.join(self.source_folder, "models"), os.path.join(self.package_folder, "res", "models")) copy(self, "*.h*", os.path.join(self.source_folder, "common"), os.path.join(self.package_folder, "include", "common")) copy(self, "*common*.lib", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) @@ -94,19 +112,25 @@ def package(self): copy(self, "*common*.so", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) copy(self, "*common*.dylib", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) copy(self, "*common*.a", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) - + copy(self, "*.cmake", src=os.path.join(self.export_sources_folder, "cmake"), dst=os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): + self.cpp_info.components["common"].includedirs = [os.path.join("include", "common")] + self.cpp_info.components["common"].libs = ["common"] + self.cpp_info.components["common"].libdirs = ["lib"] + if self.version >= Version("b3240"): + self.cpp_info.components["common"].libs.append("ggml") + self.cpp_info.components["llama"].libs = ["llama"] self.cpp_info.components["llama"].resdirs = ["res"] self.cpp_info.components["llama"].libdirs = ["lib"] + if self.options.with_cuda and not self.options.shared: + self.cpp_info.builddirs.append(os.path.join("lib", "cmake")) + module_path = os.path.join("lib", "cmake", "llama-cpp-cuda-static.cmake") + self.cpp_info.set_property("cmake_build_modules", [module_path]) + if is_apple_os(self): - self.cpp_info.components["llama"].frameworks.extend(["Foundation", "Accelerate", "Metal"]) + self.cpp_info.components["common"].frameworks.extend(["Foundation", "Accelerate", "Metal"]) elif self.settings.os in ("Linux", "FreeBSD"): - self.cpp_info.components["llama"].system_libs.extend(["dl", "m", "pthread"]) - - self.cpp_info.components["common"].requires.append("llama") - self.cpp_info.components["common"].includedirs = [os.path.join("include", "common")] - self.cpp_info.components["common"].libs = ["common"] - + self.cpp_info.components["common"].system_libs.extend(["dl", "m", "pthread", "gomp"]) diff --git a/recipes/llama-cpp/all/patches/b3040-001-curl-patch-targets.patch b/recipes/llama-cpp/all/patches/b3040-001-curl-patch-targets.patch new file mode 100755 index 0000000000000..454fe46b32c1f --- /dev/null +++ b/recipes/llama-cpp/all/patches/b3040-001-curl-patch-targets.patch @@ -0,0 +1,15 @@ +diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt +index 0ec8d6d8..647ef30b 100644 +--- a/common/CMakeLists.txt ++++ b/common/CMakeLists.txt +@@ -77,9 +77,7 @@ set(LLAMA_COMMON_EXTRA_LIBS build_info) + if (LLAMA_CURL) + find_package(CURL REQUIRED) + add_definitions(-DLLAMA_USE_CURL) +- include_directories(${CURL_INCLUDE_DIRS}) +- find_library(CURL_LIBRARY curl REQUIRED) +- set(LLAMA_COMMON_EXTRA_LIBS ${LLAMA_COMMON_EXTRA_LIBS} ${CURL_LIBRARY}) ++ list(APPEND LLAMA_COMMON_EXTRA_LIBS CURL::libcurl) + endif () + + target_include_directories(${TARGET} PUBLIC .) diff --git a/recipes/llama-cpp/all/patches/b3542-001-curl-patch-targets.patch b/recipes/llama-cpp/all/patches/b3542-001-curl-patch-targets.patch new file mode 100755 index 0000000000000..dcb0f491566b5 --- /dev/null +++ b/recipes/llama-cpp/all/patches/b3542-001-curl-patch-targets.patch @@ -0,0 +1,26 @@ +diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt +index 761971d6..3afd9759 100644 +--- a/common/CMakeLists.txt ++++ b/common/CMakeLists.txt +@@ -66,7 +66,7 @@ add_library(${TARGET} STATIC + train.cpp + ngram-cache.h + ngram-cache.cpp +- ) ++) + + if (BUILD_SHARED_LIBS) + set_target_properties(${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON) +@@ -78,10 +78,8 @@ set(LLAMA_COMMON_EXTRA_LIBS build_info) + if (LLAMA_CURL) + find_package(CURL REQUIRED) + add_definitions(-DLLAMA_USE_CURL) +- include_directories(${CURL_INCLUDE_DIRS}) +- find_library(CURL_LIBRARY curl REQUIRED) +- set(LLAMA_COMMON_EXTRA_LIBS ${LLAMA_COMMON_EXTRA_LIBS} ${CURL_LIBRARY}) +-endif () ++ list(APPEND LLAMA_COMMON_EXTRA_LIBS CURL::libcurl) ++endif() + + target_include_directories(${TARGET} PUBLIC .) + target_compile_features (${TARGET} PUBLIC cxx_std_11) diff --git a/recipes/llama-cpp/all/test_package/CMakeLists.txt b/recipes/llama-cpp/all/test_package/CMakeLists.txt old mode 100644 new mode 100755 index ebff8cc0707b3..fa2157e90aaa3 --- a/recipes/llama-cpp/all/test_package/CMakeLists.txt +++ b/recipes/llama-cpp/all/test_package/CMakeLists.txt @@ -7,8 +7,3 @@ find_package(llama-cpp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE llama-cpp::llama llama-cpp::common) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) - -add_custom_command(TARGET test_package POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_directory - ${llama-cpp_INCLUDE_DIR}/../res/models - ${CMAKE_CURRENT_BINARY_DIR}/models) diff --git a/recipes/llama-cpp/config.yml b/recipes/llama-cpp/config.yml index 9893609aaeaea..80c3c72b8c4f3 100644 --- a/recipes/llama-cpp/config.yml +++ b/recipes/llama-cpp/config.yml @@ -1,5 +1,5 @@ versions: - "b3040": + "b3542": folder: "all" - "b2038": + "b3040": folder: "all" diff --git a/recipes/luajit/all/conandata.yml b/recipes/luajit/all/conandata.yml index 1e7abff8db36b..0617a7db6d602 100644 --- a/recipes/luajit/all/conandata.yml +++ b/recipes/luajit/all/conandata.yml @@ -1,10 +1,11 @@ +# INFO: Upstream moved to rolling releases and removed all tarballs. +# The Github mirror (https://github.com/LuaJIT/LuaJIT) does not match the checksums and have missing header files. +# Conan will consume the backup sources from the Conan Center Artifactory instead, which are the original tarballs (same checksums). +# Read the issue https://github.com/conan-io/conan-center-index/issues/25032 for more information. sources: "2.1.0-beta3": - url: "https://luajit.org/download/LuaJIT-2.1.0-beta3.tar.gz" + url: "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/1ad2e34b111c802f9d0cdf019e986909123237a28c746b21295b63c9e785d9c3" sha256: "1ad2e34b111c802f9d0cdf019e986909123237a28c746b21295b63c9e785d9c3" - "2.0.5": - url: "http://luajit.org/download/LuaJIT-2.0.5.tar.gz" - sha256: "874b1f8297c697821f561f9b73b57ffd419ed8f4278c82e05b48806d30c1e979" patches: "2.1.0-beta3": - patch_file: "patches/2.1.0-beta3-0001-remove-mac-deploy.patch" diff --git a/recipes/luajit/all/conanfile.py b/recipes/luajit/all/conanfile.py index 47079e98290b1..1a87a46c223ac 100644 --- a/recipes/luajit/all/conanfile.py +++ b/recipes/luajit/all/conanfile.py @@ -48,7 +48,8 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} is not supported by Mac M1. Please, try any version >=2.1") def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + filename = f"LuaJIT-{self.version}.tar.gz" + get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, filename=filename, strip_root=True) def generate(self): if is_msvc(self): diff --git a/recipes/luajit/config.yml b/recipes/luajit/config.yml index f13e8f0f1a9ec..72c6723e528aa 100644 --- a/recipes/luajit/config.yml +++ b/recipes/luajit/config.yml @@ -1,5 +1,3 @@ versions: "2.1.0-beta3": folder: "all" - "2.0.5": - folder: "all" diff --git a/recipes/luau/all/conandata.yml b/recipes/luau/all/conandata.yml index 7e3584bc700c7..ef6921854b73e 100644 --- a/recipes/luau/all/conandata.yml +++ b/recipes/luau/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.640": + url: "https://github.com/Roblox/luau/archive/0.640.tar.gz" + sha256: "63ada3e4c8c17e5aff8964b16951bfd1b567329dd81c11ae1144b6e95f354762" "0.635": url: "https://github.com/Roblox/luau/archive/0.635.tar.gz" sha256: "b2ec66070bb53ab9c26e41608dd75c9672c942cf0738c4b965c5eb956a954910" diff --git a/recipes/luau/config.yml b/recipes/luau/config.yml index 3b3066260406f..a2ceac414c46b 100644 --- a/recipes/luau/config.yml +++ b/recipes/luau/config.yml @@ -1,4 +1,6 @@ versions: + "0.640": + folder: all "0.635": folder: all "0.630": diff --git a/recipes/magic_enum/all/conandata.yml b/recipes/magic_enum/all/conandata.yml index 37be348e4f658..e3dccd6201a11 100644 --- a/recipes/magic_enum/all/conandata.yml +++ b/recipes/magic_enum/all/conandata.yml @@ -1,7 +1,7 @@ sources: "0.9.6": url: "https://github.com/Neargye/magic_enum/archive/v0.9.6.tar.gz" - sha256: "814791ff32218dc869845af7eb89f898ebbcfa18e8d81aa4d682d18961e13731" + sha256: "fcda8295256a2084f1f98a63b3d2c66b3d7140eea008e1ef94ea015b2f6d3034" "0.9.5": url: "https://github.com/Neargye/magic_enum/archive/v0.9.5.tar.gz" sha256: "44ad80db5a72f5047e01d90e18315751d9ac90c0ab42cbea7a6f9ec66a4cd679" diff --git a/recipes/magic_enum/all/conanfile.py b/recipes/magic_enum/all/conanfile.py index 5d4edee82bb6d..9b0f3868a9d81 100644 --- a/recipes/magic_enum/all/conanfile.py +++ b/recipes/magic_enum/all/conanfile.py @@ -1,8 +1,8 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd -from conan.tools.files import copy, get -from conan.tools.layout import basic_layout +from conan.tools.files import copy, get, mkdir, rmdir +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.scm import Version import os @@ -39,7 +39,7 @@ def _compilers_minimum_version(self): } def layout(self): - basic_layout(self, src_folder="src") + cmake_layout(self, src_folder="src") def package_id(self): self.info.clear() @@ -56,12 +56,25 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + def build(self): - pass + cmake = CMake(self) + cmake.configure() + cmake.build() def package(self): - copy(self, "*", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + cmake = CMake(self) + cmake.install() + if Version(self.version) >= "0.9.4" and Version(self.version) <= "0.9.6": + mkdir(self, os.path.join(self.package_folder, "include/magic_enum")) + copy(self, "*", src=os.path.join(self.package_folder, "include"), dst=os.path.join(self.package_folder, "include/magic_enum")) copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "magic_enum") diff --git a/recipes/magic_enum/all/test_package/CMakeLists.txt b/recipes/magic_enum/all/test_package/CMakeLists.txt index f5917740f5800..c185d76435a4f 100644 --- a/recipes/magic_enum/all/test_package/CMakeLists.txt +++ b/recipes/magic_enum/all/test_package/CMakeLists.txt @@ -6,7 +6,3 @@ find_package(magic_enum REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE magic_enum::magic_enum) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) - -if(magic_enum_VERSION VERSION_GREATER_EQUAL "0.9.4") - target_compile_definitions(${PROJECT_NAME} PRIVATE MAGIC_ENUM_INCLUDE_WITH_FOLDER) -endif() diff --git a/recipes/magic_enum/all/test_package/test_package.cpp b/recipes/magic_enum/all/test_package/test_package.cpp index 208a3dd5fc806..fcb911e1f966e 100644 --- a/recipes/magic_enum/all/test_package/test_package.cpp +++ b/recipes/magic_enum/all/test_package/test_package.cpp @@ -1,8 +1,4 @@ -#ifdef MAGIC_ENUM_INCLUDE_WITH_FOLDER -# include -#else -# include -#endif +#include #include #include diff --git a/recipes/mariadb-connector-c/all/conandata.yml b/recipes/mariadb-connector-c/all/conandata.yml index df3894df1372a..599405bd8a89f 100644 --- a/recipes/mariadb-connector-c/all/conandata.yml +++ b/recipes/mariadb-connector-c/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.3.8": + url: "https://downloads.mariadb.com/Connectors/c/connector-c-3.3.8/mariadb-connector-c-3.3.8-src.tar.gz" + sha256: "f9f076b4aa9fb22cc94b24f82c80f9ef063805ecd6533a2eb5d5060cf93833e8" "3.3.3": url: "https://downloads.mariadb.com/Connectors/c/connector-c-3.3.3/mariadb-connector-c-3.3.3-src.tar.gz" sha256: "d77630e2376fe08185b5354621c877b0a203a6b186a0694574d37b764aeb2874" @@ -12,16 +15,17 @@ sources: url: "https://downloads.mariadb.com/Connectors/c/connector-c-3.1.11/mariadb-connector-c-3.1.11-src.tar.gz" sha256: "3e6f6c399493fe90efdc21a3fe70c30434b7480e8195642a959f1dd7a0fa5b0f" patches: - "3.3.3": - - patch_file: "patches/3.3.3-0002-find-package-zstd.patch" - patch_description: "Use ZSTD cmake file from Conan" + "3.3.8": + - patch_file: "patches/3.3.8-0001-fix-install-and-static-or-shared.patch" + patch_description: "fix install path, separate static/shared build" patch_type: "conan" + - patch_file: "patches/3.1.11-0004-include-mysqld_error-header.patch" + patch_description: "always include mysqld_error.h" + patch_type: "portability" + "3.3.3": - patch_file: "patches/3.3.3-0001-fix-install-and-static-or-shared.patch" patch_description: "fix install path, separate static/shared build" patch_type: "conan" - - patch_file: "patches/3.1.19-0002-remove-wx-flag.patch" - patch_description: "remove WX flags in MSVC" - patch_type: "conan" - patch_file: "patches/3.1.11-0003-include-order-windows-winsock2.patch" patch_description: "fix include order for windows winsock2" patch_type: "portability" @@ -32,9 +36,6 @@ patches: - patch_file: "patches/3.1.19-0001-fix-install-and-static-or-shared.patch" patch_description: "fix install path, separate static/shared build" patch_type: "conan" - - patch_file: "patches/3.1.19-0002-remove-wx-flag.patch" - patch_description: "remove WX flags in MSVC" - patch_type: "conan" - patch_file: "patches/3.1.11-0003-include-order-windows-winsock2.patch" patch_description: "fix include order for windows winsock2" patch_type: "portability" diff --git a/recipes/mariadb-connector-c/all/conanfile.py b/recipes/mariadb-connector-c/all/conanfile.py index 576fa5d4f935e..28811d8017067 100644 --- a/recipes/mariadb-connector-c/all/conanfile.py +++ b/recipes/mariadb-connector-c/all/conanfile.py @@ -92,6 +92,7 @@ def generate(self): tc.variables["INSTALL_BINDIR"] = "bin" tc.variables["INSTALL_LIBDIR"] = "lib" tc.variables["INSTALL_PLUGINDIR"] = os.path.join("lib", "plugin").replace("\\", "/") + tc.variables["ZLIB_LIBRARY"] = "ZLIB::ZLIB" # To install relocatable shared libs on Macos tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" tc.generate() @@ -104,7 +105,7 @@ def _patch_sources(self): apply_conandata_patches(self) root_cmake = os.path.join(self.source_folder, "CMakeLists.txt") - replace_in_file(self, root_cmake, "${ZLIB_LIBRARY}", "${ZLIB_LIBRARIES}") + libmariadb_cmake = os.path.join(self.source_folder, "libmariadb", "CMakeLists.txt") replace_in_file(self, root_cmake, "SET(SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})", @@ -113,6 +114,14 @@ def _patch_sources(self): replace_in_file(self, root_cmake, "${CURL_LIBRARIES}", "CURL::libcurl") plugins_io_cmake = os.path.join(self.source_folder, "plugins", "io", "CMakeLists.txt") replace_in_file(self, plugins_io_cmake, "${CURL_LIBRARIES}", "CURL::libcurl") + if Version(self.version) >= "3.3.6": + replace_in_file(self, root_cmake, "${WARNING_AS_ERROR}", "") + elif Version(self.version) >= "3.1.18": + replace_in_file(self, root_cmake, " -WX", "") + if Version(self.version) >= "3.3": + replace_in_file(self, root_cmake, + "INCLUDE(${CC_SOURCE_DIR}/cmake/FindZStd.cmake)", + "find_package(ZSTD REQUIRED CONFIG)") def build(self): self._patch_sources() diff --git a/recipes/mariadb-connector-c/all/patches/3.1.19-0002-remove-wx-flag.patch b/recipes/mariadb-connector-c/all/patches/3.1.19-0002-remove-wx-flag.patch deleted file mode 100644 index 4dde44415f18b..0000000000000 --- a/recipes/mariadb-connector-c/all/patches/3.1.19-0002-remove-wx-flag.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f3b6cbd..f3e8993 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -100,7 +100,7 @@ IF(MSVC) - ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN) - IF (MSVC) - # Treat warnings as errors -- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -WX") -+ # SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -WX") - SET(CONFIG_TYPES "DEBUG" "RELEASE" "RELWITHDEBINFO") - FOREACH(BUILD_TYPE ${CONFIG_TYPES}) - FOREACH(COMPILER CXX C) diff --git a/recipes/mariadb-connector-c/all/patches/3.3.3-0001-fix-install-and-static-or-shared.patch b/recipes/mariadb-connector-c/all/patches/3.3.3-0001-fix-install-and-static-or-shared.patch index 8a6f9ad7f1f55..31844dd32529b 100644 --- a/recipes/mariadb-connector-c/all/patches/3.3.3-0001-fix-install-and-static-or-shared.patch +++ b/recipes/mariadb-connector-c/all/patches/3.3.3-0001-fix-install-and-static-or-shared.patch @@ -2,15 +2,6 @@ diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt index 070fdc9..77584e6 100644 --- a/libmariadb/CMakeLists.txt +++ b/libmariadb/CMakeLists.txt -@@ -288,7 +288,7 @@ SET(MARIADB_NONBLOCK_SYMBOLS - - # handle static plugins - SET(LIBMARIADB_SOURCES ${LIBMARIADB_SOURCES} ${LIBMARIADB_PLUGIN_SOURCES}) --SET(SYSTEM_LIBS ${SYSTEM_LIBS} ${LIBMARIADB_PLUGIN_LIBS} ${ZSTD_LIBRARY} ${ZLIB_LIBRARY}) -+SET(SYSTEM_LIBS ${SYSTEM_LIBS} ${LIBMARIADB_PLUGIN_LIBS} ${ZSTD_LIBRARY} ZLIB::ZLIB) - MESSAGE(STATUS "SYSTEM_LIBS: ${SYSTEM_LIBS}") - INCLUDE_DIRECTORIES(${LIBMARIADB_PLUGIN_INCLUDES}) - ADD_DEFINITIONS(${LIBMARIADB_PLUGIN_DEFS}) @@ -404,7 +404,7 @@ ELSE() ENDIF() diff --git a/recipes/mariadb-connector-c/all/patches/3.3.3-0002-find-package-zstd.patch b/recipes/mariadb-connector-c/all/patches/3.3.3-0002-find-package-zstd.patch deleted file mode 100644 index 19168ffa68018..0000000000000 --- a/recipes/mariadb-connector-c/all/patches/3.3.3-0002-find-package-zstd.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f3b6cbd..5a60394 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -221,7 +221,7 @@ INCLUDE(${CC_SOURCE_DIR}/cmake/SearchLibrary.cmake) - - # Compression plugins: ZSTD, ZLIB - --INCLUDE(${CC_SOURCE_DIR}/cmake/FindZStd.cmake) -+find_package(ZSTD REQUIRED CONFIG) - - IF(WITH_EXTERNAL_ZLIB) - IF(NOT ZLIB_FOUND) diff --git a/recipes/mariadb-connector-c/all/patches/3.3.8-0001-fix-install-and-static-or-shared.patch b/recipes/mariadb-connector-c/all/patches/3.3.8-0001-fix-install-and-static-or-shared.patch new file mode 100644 index 0000000000000..0dfadf76c0436 --- /dev/null +++ b/recipes/mariadb-connector-c/all/patches/3.3.8-0001-fix-install-and-static-or-shared.patch @@ -0,0 +1,117 @@ +--- libmariadb/CMakeLists.txt ++++ libmariadb/CMakeLists.txt +@@ -414,7 +414,7 @@ + ENDIF() + + +-IF(CMAKE_VERSION VERSION_GREATER 2.8.7) ++IF(FALSE) + # CREATE OBJECT LIBRARY + ADD_LIBRARY(mariadb_obj OBJECT ${LIBMARIADB_SOURCES}) + IF(UNIX) +@@ -443,21 +443,24 @@ + "FILE_DESCRIPTION:Dynamic lib for client/server communication") + ENDIF() + ++IF(NOT BUILD_SHARED_LIBS) + ADD_LIBRARY(mariadbclient STATIC ${MARIADB_OBJECTS} ${EMPTY_FILE}) + TARGET_LINK_LIBRARIES(mariadbclient ${SYSTEM_LIBS} ${CRYPTO_LIBS}) +- ++ELSE() + IF(UNIX) + ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE}) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}") + ELSE() +- ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} mariadbclient.def) ++ ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE} mariadbclient.def) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINKER_LANGUAGE C) + ENDIF() + + TARGET_LINK_LIBRARIES(libmariadb LINK_PRIVATE ${SYSTEM_LIBS} ${CRYPTO_LIBS}) + + SIGN_TARGET(libmariadb) +- ++ENDIF() ++ ++IF(BUILD_SHARED_LIBS) + IF(CMAKE_SYSTEM_NAME MATCHES "Linux" OR + CMAKE_SYSTEM_NAME MATCHES "kFreeBSD" OR + CMAKE_SYSTEM_NAME MATCHES "GNU") +@@ -466,11 +469,14 @@ + ENDIF() + SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINK_FLAGS "${CC_BINARY_DIR}/libmariadb/mariadbclient.def") + ENDIF() +- ++ELSE() + SET_TARGET_PROPERTIES(mariadbclient PROPERTIES IMPORTED_INTERFACE_LINK_LIBRARIES "${SYSTEM_LIBS}") ++ENDIF() ++IF(BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES IMPORTED_INTERFACE_LINK_LIBRARIES "${SYSTEM_LIBS}") + + SET_TARGET_PROPERTIES(libmariadb PROPERTIES PREFIX "") ++ENDIF() + + # + # Installation +@@ -490,11 +496,15 @@ + ENDIF() + ENDIF() + ++IF(NOT BUILD_SHARED_LIBS) + create_symlink(libmariadb${CMAKE_STATIC_LIBRARY_SUFFIX} mariadbclient ${INSTALL_LIBDIR}) +- ++ENDIF() ++ ++IF(BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES VERSION + ${CPACK_PACKAGE_VERSION_MAJOR} + SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}) ++ELSE() + + IF(NOT WIN32) + SET_TARGET_PROPERTIES(mariadbclient PROPERTIES OUTPUT_NAME "${LIBMARIADB_STATIC_NAME}") +@@ -502,20 +512,33 @@ + + INSTALL(TARGETS mariadbclient + COMPONENT Development +- DESTINATION ${INSTALL_LIBDIR}) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ENDIF() ++ ++IF(BUILD_SHARED_LIBS) + IF(WIN32) + INSTALL(TARGETS libmariadb + COMPONENT SharedLibraries +- DESTINATION ${INSTALL_LIBDIR}) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ELSE() + # in cmake 3.12+ we can use + #INSTALL(TARGETS libmariadb LIBRARY DESTINATION ${INSTALL_LIBDIR} + # COMPONENT SharedLibraries NAMELINK_COMPONENT Development) + # but as long as we build on CentOS 7 with its cmake 2.8.12.2 we have to use +-INSTALL(TARGETS libmariadb LIBRARY DESTINATION ${INSTALL_LIBDIR} +- COMPONENT SharedLibraries NAMELINK_SKIP) +-INSTALL(TARGETS libmariadb LIBRARY DESTINATION ${INSTALL_LIBDIR} +- COMPONENT Development NAMELINK_ONLY) ++INSTALL(TARGETS libmariadb LIBRARY ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ COMPONENT SharedLibraries) ++INSTALL(TARGETS libmariadb LIBRARY ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ COMPONENT Development) + ENDIF() + + IF(MSVC) +@@ -524,3 +547,4 @@ + CONFIGURATIONS Debug RelWithDebInfo + COMPONENT Development) + ENDIF() ++ENDIF() diff --git a/recipes/mariadb-connector-c/config.yml b/recipes/mariadb-connector-c/config.yml index c4757604b999d..4b9cbb0316174 100644 --- a/recipes/mariadb-connector-c/config.yml +++ b/recipes/mariadb-connector-c/config.yml @@ -1,4 +1,6 @@ versions: + "3.3.8": + folder: all "3.3.3": folder: all "3.1.19": diff --git a/recipes/mbedtls/all/conandata.yml b/recipes/mbedtls/all/conandata.yml index 59921058d7fdf..6f725eee986a6 100644 --- a/recipes/mbedtls/all/conandata.yml +++ b/recipes/mbedtls/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.6.1": + url: "https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-3.6.1/mbedtls-3.6.1.tar.bz2" + sha256: "fc8bef0991b43629b7e5319de6f34f13359011105e08e3e16eed3a9fe6ffd3a3" "3.6.0": url: "https://github.com/Mbed-TLS/mbedtls/releases/download/v3.6.0/mbedtls-3.6.0.tar.bz2" sha256: "3ecf94fcfdaacafb757786a01b7538a61750ebd85c4b024f56ff8ba1490fcd38" diff --git a/recipes/mbedtls/all/conanfile.py b/recipes/mbedtls/all/conanfile.py index 4ccbcab9405bc..d2eb38dbb504c 100644 --- a/recipes/mbedtls/all/conanfile.py +++ b/recipes/mbedtls/all/conanfile.py @@ -15,10 +15,10 @@ class MBedTLSConan(ConanFile): "mbed TLS makes it trivially easy for developers to include " "cryptographic and SSL/TLS capabilities in their (embedded) products" ) - topics = ("polarssl", "tls", "security") + license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://tls.mbed.org" - license = "Apache-2.0" + topics = ("polarssl", "tls", "security") package_type = "library" settings = "os", "arch", "compiler", "build_type" diff --git a/recipes/mbedtls/config.yml b/recipes/mbedtls/config.yml index b30565c2258dc..8637037975a2e 100644 --- a/recipes/mbedtls/config.yml +++ b/recipes/mbedtls/config.yml @@ -1,4 +1,6 @@ versions: + "3.6.1": + folder: all "3.6.0": folder: all "3.5.2": diff --git a/recipes/meson/all/conandata.yml b/recipes/meson/all/conandata.yml index ff346a78a0f7d..1be722fba90a3 100644 --- a/recipes/meson/all/conandata.yml +++ b/recipes/meson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.5.1": + url: "https://github.com/mesonbuild/meson/archive/1.5.1.tar.gz" + sha256: "55f6acd5bf72c14d4aa5a781993633f84a1d117bdf2c2057735902ced9b81390" "1.5.0": url: "https://github.com/mesonbuild/meson/archive/1.5.0.tar.gz" sha256: "781913826fb6f478eb7d77e1942ab3df39444e4c90e9a3523737e215171db469" diff --git a/recipes/meson/all/conanfile.py b/recipes/meson/all/conanfile.py index f11560d3a45d0..788b38338e98b 100644 --- a/recipes/meson/all/conanfile.py +++ b/recipes/meson/all/conanfile.py @@ -11,12 +11,12 @@ class MesonConan(ConanFile): name = "meson" - package_type = "application" - description = "Meson is a project to create the best possible next-generation build system" - topics = ("meson", "mesonbuild", "build-system") + description = "a project to create the best possible next-generation build system" + license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/mesonbuild/meson" - license = "Apache-2.0" + topics = ("mesonbuild", "build-system") + package_type = "application" no_copy_source = True def layout(self): @@ -24,17 +24,15 @@ def layout(self): def requirements(self): if self.conf.get("tools.meson.mesontoolchain:backend", default="ninja", check_type=str) == "ninja": - self.requires("ninja/1.11.1") + # Meson requires >=1.8.2 as of 1.5 + # https://github.com/mesonbuild/meson/blob/b6b634ad33e5ca9ad4a9d6139dba4244847cc0e8/mesonbuild/backend/ninjabackend.py#L625 + self.requires("ninja/[>=1.10.2 <2]") def package_id(self): self.info.clear() def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) - - def build(self): - pass + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) diff --git a/recipes/meson/config.yml b/recipes/meson/config.yml index ef65493e12e2f..9b74b18776ede 100644 --- a/recipes/meson/config.yml +++ b/recipes/meson/config.yml @@ -1,4 +1,6 @@ versions: + "1.5.1": + folder: all "1.5.0": folder: all "1.4.1": diff --git a/recipes/mgclient/all/conandata.yml b/recipes/mgclient/all/conandata.yml index a07869d5875d5..d3dddbce027d5 100644 --- a/recipes/mgclient/all/conandata.yml +++ b/recipes/mgclient/all/conandata.yml @@ -1,8 +1,15 @@ sources: + "1.4.3": + url: "https://github.com/memgraph/mgclient/archive/refs/tags/v1.4.3.tar.gz" + sha256: "f446b469532cd5154b8fb986ac57ca9880763e34c77e564d2c4c948989b0244e" "1.4.2": url: "https://github.com/memgraph/mgclient/archive/refs/tags/v1.4.2.tar.gz" sha256: "aa89422636b1e25b8f9f34453f331e15d32a5957a9b2381c3598fc3644dbc043" patches: + "1.4.3": + - patch_file: "patches/1.4.2-0001-static-shared.build.patch" + patch_description: "make static and shared build separated" + patch_type: "conan" "1.4.2": - patch_file: "patches/1.4.2-0001-static-shared.build.patch" patch_description: "make static and shared build separated" diff --git a/recipes/mgclient/config.yml b/recipes/mgclient/config.yml index ba127d382373b..af4203f05155e 100644 --- a/recipes/mgclient/config.yml +++ b/recipes/mgclient/config.yml @@ -1,3 +1,5 @@ versions: + "1.4.3": + folder: all "1.4.2": folder: all diff --git a/recipes/mini/all/conandata.yml b/recipes/mini/all/conandata.yml index da5a086ee7d80..5c54e75793e6e 100644 --- a/recipes/mini/all/conandata.yml +++ b/recipes/mini/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.9.16": + url: "https://github.com/metayeti/mINI/archive/refs/tags/0.9.16.tar.gz" + sha256: "ce20e12b1e3bcd79d6eaa47bf8d4bb319e843dfa3585e069e73d581bdf0a81ec" "0.9.15": url: "https://github.com/metayeti/mINI/archive/refs/tags/0.9.15.tar.gz" sha256: "241e105ab074827ab8b40582aa7b04c6191f84b244603969965c0874ad4f942c" diff --git a/recipes/mini/config.yml b/recipes/mini/config.yml index 0382c3dda0836..8e233bb2eb4ca 100644 --- a/recipes/mini/config.yml +++ b/recipes/mini/config.yml @@ -1,3 +1,5 @@ versions: + "0.9.16": + folder: all "0.9.15": folder: all diff --git a/recipes/mlpack/all/conandata.yml b/recipes/mlpack/all/conandata.yml index 1b7e9d933c958..13e81aa865d9c 100644 --- a/recipes/mlpack/all/conandata.yml +++ b/recipes/mlpack/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.4.0": + url: "https://github.com/mlpack/mlpack/archive/refs/tags/4.4.0.tar.gz" + sha256: "61c604026d05af26c244b0e47024698bbf150dfcc9d77b64057941d7d64d6cf6" "4.3.0": url: "https://github.com/mlpack/mlpack/archive/refs/tags/4.3.0.tar.gz" sha256: "08cd54f711fde66fc3b6c9db89dc26776f9abf1a6256c77cfa3556e2a56f1a3d" diff --git a/recipes/mlpack/all/conanfile.py b/recipes/mlpack/all/conanfile.py index bf8304a813b40..a09b0e5a3296c 100644 --- a/recipes/mlpack/all/conanfile.py +++ b/recipes/mlpack/all/conanfile.py @@ -24,6 +24,8 @@ class MlpackConan(ConanFile): @property def _min_cppstd(self): + if Version(self.version) >= "4.4.0": + return 17 if is_msvc(self): return 17 return 14 @@ -82,23 +84,6 @@ def package(self): excludes=["mlpack/bindings/*", "mlpack/tests/*", "mlpack/CMakeLists.txt"]) self._configure_headers() - @property - def _openmp_flags(self): - # Based on https://github.com/Kitware/CMake/blob/v3.28.1/Modules/FindOpenMP.cmake#L104-L135 - if self.settings.compiler == "clang": - return ["-fopenmp=libomp"] - elif self.settings.compiler == "apple-clang": - return ["-Xclang", "-fopenmp"] - elif self.settings.compiler == "gcc": - return ["-fopenmp"] - elif self.settings.compiler == "intel-cc": - return ["-Qopenmp"] - elif self.settings.compiler == "sun-cc": - return ["-xopenmp"] - elif is_msvc(self): - return ["-openmp:llvm"] - return None - def package_info(self): self.cpp_info.set_property("cmake_file_name", "mlpack") self.cpp_info.set_property("cmake_target_name", "mlpack::mlpack") @@ -113,12 +98,22 @@ def package_info(self): if self.settings.get_safe("compiler.libcxx") in ["libstdc++", "libstdc++11"]: self.cpp_info.system_libs.append("atomic") - self.cpp_info.cflags = self._openmp_flags - self.cpp_info.cxxflags = self._openmp_flags - + # FIXME: Review this flags assignment. LLVM-OpenMP is already defining these ones. + # Do we want to depend on llvm-openmp? Only for apple-clang? + # For more info, see this comment https://github.com/conan-io/conan-center-index/pull/22353#issuecomment-2214593855 + flags = [] + # Based on https://github.com/Kitware/CMake/blob/v3.28.1/Modules/FindOpenMP.cmake#L104-L135 + if self.settings.compiler == "clang": + flags = ["-fopenmp=libomp"] + elif self.settings.compiler == "gcc": + flags = ["-fopenmp"] + if self.settings.os == "Windows": + flags.append("-Wa,-mbig-obj") + elif self.settings.compiler == "sun-cc": + flags = ["-xopenmp"] + elif is_msvc(self): # https://github.com/mlpack/mlpack/blob/4.3.0/CMakeLists.txt#L164-L175 - if is_msvc(self): - self.cpp_info.cxxflags.extend(["/bigobj", "/Zm200", "/Zc:__cplusplus"]) - elif self.settings.os == "Windows" and self.settings.compiler == "gcc": - self.cpp_info.cflags.append("-Wa,-mbig-obj") - self.cpp_info.cxxflags.append("-Wa,-mbig-obj") + flags = ["-openmp:llvm", "/bigobj", "/Zm200", "/Zc:__cplusplus"] + if flags: + self.cpp_info.cflags = flags + self.cpp_info.cxxflags = flags diff --git a/recipes/mlpack/all/test_package/CMakeLists.txt b/recipes/mlpack/all/test_package/CMakeLists.txt index 8bdbe35c75acf..a68462fb67d65 100644 --- a/recipes/mlpack/all/test_package/CMakeLists.txt +++ b/recipes/mlpack/all/test_package/CMakeLists.txt @@ -5,7 +5,7 @@ find_package(mlpack REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE mlpack::mlpack) -if(MSVC) +if(MSVC OR mlpack_VERSION VERSION_GREATER_EQUAL 4.4.0) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) else() target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/mlpack/config.yml b/recipes/mlpack/config.yml index fefa3b794940e..e9bbd51f309ab 100644 --- a/recipes/mlpack/config.yml +++ b/recipes/mlpack/config.yml @@ -1,3 +1,5 @@ versions: + "4.4.0": + folder: all "4.3.0": folder: all diff --git a/recipes/mold/all/conandata.yml b/recipes/mold/all/conandata.yml index 76bdbbd4a2351..2c5f346939e24 100644 --- a/recipes/mold/all/conandata.yml +++ b/recipes/mold/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.33.0": + url: "https://github.com/rui314/mold/archive/refs/tags/v2.33.0.tar.gz" + sha256: "37b3aacbd9b6accf581b92ba1a98ca418672ae330b78fe56ae542c2dcb10a155" "2.32.1": url: "https://github.com/rui314/mold/archive/refs/tags/v2.32.1.tar.gz" sha256: "f3c9a527d884c635834fe7d79b3de959b00783bf9446280ea274d996f0335825" diff --git a/recipes/mold/all/conanfile.py b/recipes/mold/all/conanfile.py index 68b6db435177a..c604d73299327 100644 --- a/recipes/mold/all/conanfile.py +++ b/recipes/mold/all/conanfile.py @@ -45,7 +45,7 @@ def requirements(self): self.requires("mimalloc/2.1.2") if Version(self.version) < "2.2.0": # Newer versions use vendored-in BLAKE3 - self.requires("openssl/[>=1.1 <4]") + self.requires("openssl/[>=1.1 <4]") def package_id(self): del self.info.settings.compiler @@ -65,6 +65,8 @@ def validate(self): raise ConanInvalidConfiguration("Clang version 12 or higher required") if self.settings.compiler == "apple-clang" and "armv8" == self.settings.arch : raise ConanInvalidConfiguration(f'{self.name} is still not supported by Mac M1.') + if Version(self.version) == "2.33.0" and self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "14": + raise ConanInvalidConfiguration(f'{self.ref} doesn\'t support Apple-Clang < 14.') def build_requirements(self): self.tool_requires("cmake/[>=3.18.0 <4]") diff --git a/recipes/mold/config.yml b/recipes/mold/config.yml index 096044e3278b2..e7c236baf0d22 100644 --- a/recipes/mold/config.yml +++ b/recipes/mold/config.yml @@ -1,4 +1,6 @@ versions: + "2.33.0": + folder: all "2.32.1": folder: all "2.32.0": diff --git a/recipes/mongo-c-driver/all/conandata.yml b/recipes/mongo-c-driver/all/conandata.yml index 2f74d581142e4..ad753c1d37bdd 100644 --- a/recipes/mongo-c-driver/all/conandata.yml +++ b/recipes/mongo-c-driver/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.27.6": + url: "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/1.27.6.tar.gz" + sha256: "7dee166dd106e3074582dd107f62815aa29311520149cda52efb69590b2cae7a" + "1.27.5": + url: "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/1.27.5.tar.gz" + sha256: "b90dab0856448c5919c1e04fe8d5a4d80d57779ccf8cf08e3981314a5961973d" + "1.27.4": + url: "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/1.27.4.tar.gz" + sha256: "37898440ebfd6fedfdb9cbbff7b0c5813f7e157b584a881538f124d086f880df" "1.27.3": url: "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/1.27.3.tar.gz" sha256: "2593048270f8426c3dc60f0a3c22c3da92ae00a3ef284da7e662a1348ca1685c" diff --git a/recipes/mongo-c-driver/all/conanfile.py b/recipes/mongo-c-driver/all/conanfile.py index cdbc84b964e85..d3e733eb6de05 100644 --- a/recipes/mongo-c-driver/all/conanfile.py +++ b/recipes/mongo-c-driver/all/conanfile.py @@ -76,7 +76,7 @@ def requirements(self): if self.options.with_zlib: self.requires("zlib/[>=1.2.11 <2]") if self.options.with_zstd: - self.requires("zstd/1.5.5") + self.requires("zstd/[^1.5]") if self.options.with_icu: self.requires("icu/74.2") diff --git a/recipes/mongo-c-driver/config.yml b/recipes/mongo-c-driver/config.yml index e4d32528df309..544d212a2ed90 100644 --- a/recipes/mongo-c-driver/config.yml +++ b/recipes/mongo-c-driver/config.yml @@ -1,4 +1,10 @@ versions: + "1.27.6": + folder: all + "1.27.5": + folder: all + "1.27.4": + folder: all "1.27.3": folder: all "1.27.2": diff --git a/recipes/msdf-atlas-gen/all/conandata.yml b/recipes/msdf-atlas-gen/all/conandata.yml index 1c3664b5df564..3ce2299e54ce1 100644 --- a/recipes/msdf-atlas-gen/all/conandata.yml +++ b/recipes/msdf-atlas-gen/all/conandata.yml @@ -1,9 +1,16 @@ sources: + "1.3": + url: "https://github.com/Chlumsky/msdf-atlas-gen/archive/refs/tags/v1.3.tar.gz" + sha256: "5d3d58e8bc92836baf23ce3a80ef79cc4c2d022fb86b7f160b11cc06cd62fe78" "1.2.2": url: "https://github.com/Chlumsky/msdf-atlas-gen/archive/refs/tags/v1.2.2.tar.gz" sha256: "7D2EA46F66E21AB9A205BF7703D520F209B9A035EE13CBB266A3B8322F62FA28" patches: + "1.3": + - patch_file: "patches/1.3.0-0001-fix-cmake.patch" + patch_description: "Fix CMakeLists.txt to get libraries from Conan and install in bin dir" + patch_type: "conan" "1.2.2": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/1.2.2-0001-fix-cmake.patch" patch_description: "Fix CMakeLists.txt to get libraries from Conan and install in bin dir" patch_type: "conan" diff --git a/recipes/msdf-atlas-gen/all/conanfile.py b/recipes/msdf-atlas-gen/all/conanfile.py index 51daed7b1f501..d26eb8ef19f91 100644 --- a/recipes/msdf-atlas-gen/all/conanfile.py +++ b/recipes/msdf-atlas-gen/all/conanfile.py @@ -1,27 +1,27 @@ +import os + from conan import ConanFile -from conan.tools.files import get, copy, apply_conandata_patches, export_conandata_patches +from conan.tools.files import get, copy, apply_conandata_patches, export_conandata_patches, rmdir from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -import os - +from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc required_conan_version = ">=1.53.0" class MsdfAtlasGenConan(ConanFile): name = "msdf-atlas-gen" + description = "MSDF font atlas generator" license = "MIT" - homepage = "https://github.com/Chlumsky/msdf-atlas-gen" url = "https://github.com/conan-io/conan-center-index" - description = "MSDF font atlas generator" + homepage = "https://github.com/Chlumsky/msdf-atlas-gen" topics = ("msdf-atlas-gen", "msdf", "font", "atlas") - settings = "os", "arch", "compiler", "build_type" package_type = "application" + settings = "os", "arch", "compiler", "build_type" - def requirements(self): - self.requires("artery-font-format/1.0") - self.requires("msdfgen/1.9.1") - self.requires("lodepng/cci.20200615") + def export_sources(self): + export_conandata_patches(self) def layout(self): cmake_layout(self, src_folder="src") @@ -30,25 +30,41 @@ def validate_build(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) + def requirements(self): + if Version(self.version) < "1.3": + self.requires("msdfgen/1.9.1") + self.requires("artery-font-format/1.0") + self.requires("lodepng/cci.20200615") + else: + self.requires("msdfgen/1.12") + self.requires("artery-font-format/1.1") + self.requires("libpng/[>=1.6 <2]") + def package_id(self): del self.info.settings.compiler del self.info.settings.build_type - def export_sources(self): - export_conandata_patches(self) - def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - apply_conandata_patches(self) def generate(self): tc = CMakeToolchain(self) - tc.variables["MSDF_ATLAS_GEN_BUILD_STANDALONE"] = True + tc.cache_variables["MSDF_ATLAS_GEN_BUILD_STANDALONE"] = True + tc.cache_variables["MSDF_ATLAS_USE_VCPKG"] = False + tc.cache_variables["MSDF_ATLAS_USE_SKIA"] = False + tc.cache_variables["MSDF_ATLAS_NO_ARTERY_FONT"] = False + tc.cache_variables["MSDF_ATLAS_MSDFGEN_EXTERNAL"] = True + tc.cache_variables["MSDF_ATLAS_INSTALL"] = True + if Version(self.version) >= "1.3": + tc.preprocessor_definitions["MSDFGEN_USE_LIBPNG"] = 1 + if is_msvc(self): + tc.cache_variables["MSDF_ATLAS_DYNAMIC_RUNTIME"] = "dynamic" in str(self.settings.compiler.runtime) or "MD" in str(self.settings.compiler.runtime) tc.generate() tc = CMakeDeps(self) tc.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() @@ -57,6 +73,7 @@ def package(self): copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) cmake = CMake(self) cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): self.cpp_info.frameworkdirs = [] diff --git a/recipes/msdf-atlas-gen/all/patches/0001-fix-cmake.patch b/recipes/msdf-atlas-gen/all/patches/1.2.2-0001-fix-cmake.patch similarity index 71% rename from recipes/msdf-atlas-gen/all/patches/0001-fix-cmake.patch rename to recipes/msdf-atlas-gen/all/patches/1.2.2-0001-fix-cmake.patch index 356c6a09fe8be..f4f985352e174 100644 --- a/recipes/msdf-atlas-gen/all/patches/0001-fix-cmake.patch +++ b/recipes/msdf-atlas-gen/all/patches/1.2.2-0001-fix-cmake.patch @@ -1,19 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b1ec605..6b6277a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -7,9 +7,11 @@ +@@ -7,10 +7,11 @@ set(MSDFGEN_BUILD_MSDFGEN_STANDALONE OFF CACHE BOOL "Build the msdfgen standalon set(MSDFGEN_USE_OPENMP OFF CACHE INTERNAL "Build with OpenMP support for multithreaded code (disabled for atlas gen)" FORCE) set(MSDFGEN_USE_CPP11 ON CACHE INTERNAL "Build with C++11 enabled (always enabled for atlas gen)" FORCE) set(MSDFGEN_INSTALL OFF CACHE BOOL "Generate installation target for msdfgen") -add_subdirectory(msdfgen) - -+ +- ++# add_subdirectory(msdfgen) find_package(Threads REQUIRED) +- +find_package(msdfgen REQUIRED) +find_package(artery-font-format REQUIRED) - ++find_package(lodepng REQUIRED CONFIG) file(GLOB_RECURSE msdf-atlas-gen_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "msdf-atlas-gen/*.h" -@@ -24,19 +26,12 @@ + "msdf-atlas-gen/*.hpp" +@@ -24,19 +25,19 @@ file(GLOB_RECURSE msdf-atlas-gen_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} add_library(msdf-atlas-gen ${msdf-atlas-gen_SOURCES} ${msdf-atlas-gen_HEADERS}) add_library(msdf-atlas-gen::msdf-atlas-gen ALIAS msdf-atlas-gen) set_target_properties(msdf-atlas-gen PROPERTIES PUBLIC_HEADER "${msdf-atlas-gen_HEADERS}") @@ -24,17 +28,24 @@ - ${CMAKE_CURRENT_SOURCE_DIR}/msdfgen/include # for lodepng.h - ${CMAKE_CURRENT_SOURCE_DIR}/artery-font-format -) ++# target_include_directories(msdf-atlas-gen ++# INTERFACE ++# $ ++# PRIVATE ++# ${CMAKE_CURRENT_SOURCE_DIR}/msdfgen/include # for lodepng.h ++# ${CMAKE_CURRENT_SOURCE_DIR}/artery-font-format ++# ) if (MSVC) target_compile_definitions(msdf-atlas-gen PUBLIC _CRT_SECURE_NO_WARNINGS) endif() target_compile_features(msdf-atlas-gen PUBLIC cxx_std_11) -target_link_libraries(msdf-atlas-gen PUBLIC Threads::Threads msdfgen::msdfgen msdfgen::msdfgen-ext) -+target_link_libraries(msdf-atlas-gen PUBLIC Threads::Threads msdfgen::msdfgen msdfgen::msdfgen-ext artery-font-format::artery-font-format) ++target_link_libraries(msdf-atlas-gen PUBLIC Threads::Threads msdfgen::msdfgen msdfgen::msdfgen-ext artery-font-format::artery-font-format lodepng::lodepng) # TODO make these public in msdfgen so that this doesn't have to be repeated here if(FREETYPE_WITH_PNG) -@@ -58,3 +53,5 @@ +@@ -58,3 +59,5 @@ if(MSDF_ATLAS_GEN_BUILD_STANDALONE) target_compile_features(msdf-atlas-gen-standalone PUBLIC cxx_std_11) target_link_libraries(msdf-atlas-gen-standalone PUBLIC msdf-atlas-gen::msdf-atlas-gen) endif() diff --git a/recipes/msdf-atlas-gen/all/patches/1.3.0-0001-fix-cmake.patch b/recipes/msdf-atlas-gen/all/patches/1.3.0-0001-fix-cmake.patch new file mode 100644 index 0000000000000..80d3825982383 --- /dev/null +++ b/recipes/msdf-atlas-gen/all/patches/1.3.0-0001-fix-cmake.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5b7f6db..1936ca5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -109,7 +109,8 @@ target_include_directories(msdf-atlas-gen INTERFACE + if(MSDF_ATLAS_NO_ARTERY_FONT) + target_compile_definitions(msdf-atlas-gen PUBLIC MSDF_ATLAS_NO_ARTERY_FONT) + else() +- target_include_directories(msdf-atlas-gen PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/artery-font-format) ++ find_package(artery-font-format REQUIRED CONFIG) ++ target_link_libraries(msdf-atlas-gen PRIVATE artery-font-format::artery-font-format) + endif() + set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT msdf-atlas-gen) + +@@ -118,7 +119,7 @@ target_link_libraries(msdf-atlas-gen PRIVATE Threads::Threads) + if(NOT MSDFGEN_DISABLE_PNG) + target_link_libraries(msdf-atlas-gen PRIVATE PNG::PNG) + endif() +-target_link_libraries(msdf-atlas-gen PUBLIC msdfgen::msdfgen) ++target_link_libraries(msdf-atlas-gen PUBLIC msdfgen::msdfgen msdfgen::msdfgen-ext) + + if(BUILD_SHARED_LIBS AND WIN32) + target_compile_definitions(msdf-atlas-gen PRIVATE "MSDF_ATLAS_PUBLIC=__declspec(dllexport)") diff --git a/recipes/msdf-atlas-gen/config.yml b/recipes/msdf-atlas-gen/config.yml index af40d9653a378..297a337077654 100644 --- a/recipes/msdf-atlas-gen/config.yml +++ b/recipes/msdf-atlas-gen/config.yml @@ -1,3 +1,5 @@ versions: + "1.3": + folder: all "1.2.2": folder: all diff --git a/recipes/net-snmp/all/conandata.yml b/recipes/net-snmp/all/conandata.yml index 269a227ecf9b0..9ad5ce20f2145 100644 --- a/recipes/net-snmp/all/conandata.yml +++ b/recipes/net-snmp/all/conandata.yml @@ -1,14 +1,13 @@ sources: - "5.9.1": - sha256: "75b59d67e871aaaa31c8cef89ba7d06972782b97736b7e8c3399f36b50a8816f" - url: https://sourceforge.net/projects/net-snmp/files/net-snmp/5.9.1/net-snmp-5.9.1.zip/download + "5.9.4": + url: "https://sourceforge.net/projects/net-snmp/files/net-snmp/5.9.4/net-snmp-5.9.4.zip/download" + sha256: "ceea0c876f23b87731de2073e6a3a683ea610c66a5a67b5cabf4986b7813c22b" patches: - "5.9.1": + "5.9.4": - patch_file: patches/0001-fix-openssl-linking-msvc.patch - base_path: "" + patch_description: "Use Conan OpenSSL when linking on Windows" + patch_source: "https://github.com/net-snmp/net-snmp/commit/99332c80b68248cb60023d12297135dc9c6c8abf" - patch_file: patches/0002-install-only-libnetsnmp.patch - base_path: "" + patch_description: "Avoid install extra helper libraries" - patch_file: patches/0003-fix-perl-scripts-msvc.patch - base_path: "" - - patch_file: patches/0004-fix-apple-arm64-build.patch - base_path: "" + patch_description: "Avoid injecting extra flags when running perl" diff --git a/recipes/net-snmp/all/conanfile.py b/recipes/net-snmp/all/conanfile.py index cf81f5bab247a..68f4965c95152 100644 --- a/recipes/net-snmp/all/conanfile.py +++ b/recipes/net-snmp/all/conanfile.py @@ -1,11 +1,17 @@ -import functools import os import stat -from conans import AutoToolsBuildEnvironment, ConanFile, tools -from conans.errors import ConanInvalidConfiguration +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building +from conan.tools.env import VirtualRunEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir, chdir +from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain, PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, msvc_runtime_flag, NMakeToolchain +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name -required_conan_version = ">=1.43.0" +required_conan_version = ">=1.53.0" class NetSnmpConan(ConanFile): @@ -15,10 +21,12 @@ class NetSnmpConan(ConanFile): "for monitoring the health and welfare of network equipment " "(eg. routers), computer equipment and even devices like UPSs." ) + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "http://www.net-snmp.org/" topics = "snmp" - license = "BSD-3-Clause" + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -30,21 +38,9 @@ class NetSnmpConan(ConanFile): "fPIC": True, "with_ipv6": True, } - requires = "openssl/1.1.1m" - exports_sources = "patches/*" - @property - def _is_msvc(self): - return self.settings.compiler in ("Visual Studio", "msvc") - - def validate(self): - if self.settings.os == "Windows" and not self._is_msvc: - raise ConanInvalidConfiguration( - "net-snmp is setup to build only with MSVC on Windows" - ) - - def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True) + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -52,145 +48,174 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("openssl/[>=1.1 <4]") + self.requires("pcre/8.45") + self.requires("zlib/[>=1.2.11 <2]") + + def validate(self): + if is_msvc(self) and self.options.shared: + # FIXME: Linker errors against third-party dependencies: + # snmp_openssl.obj : error LNK2019: unresolved external symbol CRYPTO_free referenced in function _extract_oname + raise ConanInvalidConfiguration(f"{self.ref} fails when building as shared library, use -o '&:shared=False'. Contributions are welcome!") def build_requirements(self): - if self._is_msvc: - self.build_requires("strawberryperl/5.30.0.1") + if is_msvc(self): + self.tool_requires("strawberryperl/5.32.1.1") + else: + self.tool_requires("gnu-config/cci.20210814") + self.tool_requires("autoconf/2.71") + self.tool_requires("automake/1.16.5") + self.tool_requires("libtool/2.4.7") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.2.0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) @property def _is_debug(self): return self.settings.build_type == "Debug" + def generate(self): + if is_msvc(self): + tc = NMakeToolchain(self) + tc.generate() + # Workaround for "unresolved external symbol" errors during shared build + env = VirtualRunEnv(self) + env.generate(scope="build") + else: + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + tc = AutotoolsToolchain(self) + debug_flag = "enable" if self._is_debug else "disable" + ipv6_flag = "enable" if self.options.with_ipv6 else "disable" + openssl_path = self.dependencies["openssl"].package_folder + zlib_path = self.dependencies["zlib"].package_folder + tc.configure_args += [ + f"--with-openssl={openssl_path}", + f"--with-zlib={zlib_path}", + f"--{debug_flag}-debugging", + f"--{ipv6_flag}-ipv6", + "--with-defaults", + "--without-rpm", + "--without-pcre", + "--disable-agent", + "--disable-applications", + "--disable-manuals", + "--disable-scripts", + "--disable-mibs", + "--disable-embedded-perl", + ] + if self.settings.os in ["Linux"]: + tc.extra_ldflags.append("-ldl") + tc.extra_ldflags.append("-lpthread") + tc.generate() + + deps = AutotoolsDeps(self) + deps.generate() + + deps = PkgConfigDeps(self) + deps.generate() + def _patch_msvc(self): - ssl_info = self.deps_cpp_info["openssl"] - openssl_root = ssl_info.rootpath.replace("\\", "/") + ssl_info = self.dependencies["openssl"] + openssl_root = ssl_info.package_folder.replace("\\", "/") search_replace = [ - ( - r'$default_openssldir . "\\include"', - f"'{openssl_root}/include'" - ), + (r'$default_openssldir . "\\include"', f"'{openssl_root}/include'"), (r'$default_openssldir . "\\lib\\VC"', f"'{openssl_root}/lib'"), - ("$openssl = false", "$openssl = true") + ("$openssl = false", "$openssl = true"), ] if self._is_debug: search_replace.append(("$debug = false", "$debug = true")) if self.options.shared: - search_replace.append(( - "$link_dynamic = false", - "$link_dynamic = true" - )) + search_replace.append(("$link_dynamic = false", "$link_dynamic = true")) if self.options.with_ipv6: search_replace.append(("$b_ipv6 = false", "$b_ipv6 = true")) for search, replace in search_replace: - tools.replace_in_file("win32\\build.pl", search, replace) - runtime = self.settings.compiler.runtime - tools.replace_in_file("win32\\Configure", '"/runtime', f'"/{runtime}') + replace_in_file(self, "build.pl", search, replace) + replace_in_file(self, "Configure", '"/runtime', f'"/{msvc_runtime_flag(self)}') link_lines = "\n".join( f'# pragma comment(lib, "{lib}.lib")' - for lib in ssl_info.libs + ssl_info.system_libs + for lib in ssl_info.cpp_info.libs + ssl_info.cpp_info.system_libs ) - config = r"win32\net-snmp\net-snmp-config.h.in" - tools.replace_in_file(config, "/* Conan: system_libs */", link_lines) - - def _build_msvc(self): - if self.should_configure: - self._patch_msvc() - self.run("perl build.pl", cwd="win32") - if self.should_build: - with tools.vcvars(self): - self.run("nmake /nologo libsnmp", cwd="win32") - - @functools.lru_cache(1) - def _configure_autotools(self): - disabled_link_type = "static" if self.options.shared else "shared" - debug_flag = "enable" if self._is_debug else "disable" - ipv6_flag = "enable" if self.options.with_ipv6 else "disable" - ssl_path = self.deps_cpp_info["openssl"].rootpath - args = [ - "--with-defaults", - "--without-rpm", - "--without-pcre", - "--disable-agent", - "--disable-applications", - "--disable-manuals", - "--disable-scripts", - "--disable-mibs", - "--disable-embedded-perl", - f"--disable-{disabled_link_type}", - f"--{debug_flag}-debugging", - f"--{ipv6_flag}-ipv6", - f"--with-openssl={ssl_path}", - ] - autotools = AutoToolsBuildEnvironment(self) - autotools.libs = [] - autotools.configure(args=args) - return autotools + config = r"net-snmp\net-snmp-config.h.in" + replace_in_file(self, config, "/* Conan: system_libs */", link_lines) def _patch_unix(self): - tools.replace_in_file( - "configure", - "-install_name \\$rpath/", - "-install_name @rpath/" - ) - crypto_libs = self.deps_cpp_info["openssl"].system_libs + for gnu_config in [ + self.conf.get("user.gnu-config:config_guess", check_type=str), + self.conf.get("user.gnu-config:config_sub", check_type=str), + ]: + if gnu_config: + copy(self, os.path.basename(gnu_config), src=os.path.dirname(gnu_config), dst=self.source_folder) + configure_path = os.path.join(self.source_folder, "configure") + replace_in_file(self, configure_path, + "-install_name \\$rpath/", + "-install_name @rpath/") + crypto_libs = self.dependencies["openssl"].cpp_info.system_libs if len(crypto_libs) != 0: crypto_link_flags = " -l".join(crypto_libs) - tools.replace_in_file( - "configure", + replace_in_file(self, configure_path, 'LIBCRYPTO="-l${CRYPTO}"', - 'LIBCRYPTO="-l${CRYPTO} -l%s"' % (crypto_link_flags,) - ) - tools.replace_in_file( - "configure", - 'LIBS="-lcrypto $LIBS"', - f'LIBS="-lcrypto -l{crypto_link_flags} $LIBS"' - ) + 'LIBCRYPTO="-l${CRYPTO} -l%s"' % (crypto_link_flags,)) + replace_in_file(self, configure_path, + 'LIBS="-lcrypto $LIBS"', + f'LIBS="-lcrypto -l{crypto_link_flags} $LIBS"') def build(self): - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) - if self._is_msvc: - self._build_msvc() + apply_conandata_patches(self) + if is_msvc(self): + with chdir(self, os.path.join(self.source_folder, "win32")): + self._patch_msvc() + self.run("perl build.pl") + self.run("nmake /nologo libsnmp") else: self._patch_unix() - os.chmod("configure", os.stat("configure").st_mode | stat.S_IEXEC) - self._configure_autotools()\ - .make(target="snmplib", args=["NOAUTODEPS=1"]) - - def _package_msvc(self): - cfg = "debug" if self._is_debug else "release" - self.copy("netsnmp.dll", "bin", fr"win32\bin\{cfg}") - self.copy("netsnmp.lib", "lib", fr"win32\lib\{cfg}") - self.copy("include/net-snmp/*.h") - for directory in ["", "agent/", "library/"]: - self.copy(f"net-snmp/{directory}*.h", "include", "win32") - self.copy("COPYING", "licenses") - - def _remove(self, path): - if os.path.isdir(path): - tools.rmdir(path) - else: - os.remove(path) - - def _package_unix(self): - self._configure_autotools().install(args=["NOAUTODEPS=1"]) - tools.remove_files_by_mask(self.package_folder, "README") - tools.rmdir(os.path.join(self.package_folder, "bin")) - lib_dir = os.path.join(self.package_folder, "lib") - for entry in os.listdir(lib_dir): - if not entry.startswith("libnetsnmp.") or entry.endswith(".la"): - self._remove(os.path.join(lib_dir, entry)) - self.copy("COPYING", "licenses") + configure_path = os.path.join(self.source_folder, "configure") + os.chmod(configure_path, os.stat(configure_path).st_mode | stat.S_IEXEC) + autotools = Autotools(self) + autotools.autoreconf() + autotools.configure() + autotools.make(target="snmplib", args=["NOAUTODEPS=1"]) def package(self): - if self._is_msvc: - self._package_msvc() + copy(self, "COPYING", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + if is_msvc(self): + cfg = "debug" if self._is_debug else "release" + copy(self, "netsnmp.lib", + dst=os.path.join(self.package_folder, "lib"), + src=os.path.join(self.source_folder, rf"win32\lib\{cfg}")) + copy(self, "include/net-snmp/*.h", + dst=self.package_folder, + src=self.source_folder) + for directory in ["", "agent/", "library/"]: + copy(self, f"net-snmp/{directory}*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "win32")) else: - self._package_unix() + autotools = Autotools(self) + #only install with -j1 as parallel install will break dependencies. Probably a bug in the dependencies + #install specific targets instead of just everything as it will try to do perl stuff on you host machine + autotools.install(args=["-j1"], target="installsubdirs installlibs installprogs installheaders") + rm(self, "README", self.package_folder, recursive=True) + rmdir(self, os.path.join(self.package_folder, "bin")) + rm(self, "*.la", self.package_folder, recursive=True) + fix_apple_shared_install_name(self) def package_info(self): self.cpp_info.libs = ["netsnmp"] - self.cpp_info.requires = ["openssl::openssl"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["rt", "pthread", "m"]) + if is_apple_os(self): + self.cpp_info.frameworks.extend(["CoreFoundation", "DiskArbitration", "IOKit"]) diff --git a/recipes/net-snmp/all/patches/0003-fix-perl-scripts-msvc.patch b/recipes/net-snmp/all/patches/0003-fix-perl-scripts-msvc.patch index 992914c1a489c..5d1776394ec89 100644 --- a/recipes/net-snmp/all/patches/0003-fix-perl-scripts-msvc.patch +++ b/recipes/net-snmp/all/patches/0003-fix-perl-scripts-msvc.patch @@ -9,24 +9,25 @@ my $debug = false; my $configOpts; my $link_dynamic = false; -@@ -44,15 +44,7 @@ +@@ -44,7 +44,7 @@ # Path of this script (source tree path + "win32"). my $current_pwd = dirname(abs_path($0)); -if (!defined($ENV{MSVCDir}) && !defined($ENV{VCINSTALLDIR}) && -- !defined($ENV{TARGET_CPU})) { -- print "\nPlease run VCVARS32.BAT first to set up the Visual Studio build\n" . -- "environment.\n\n"; -- system("pause"); -- exit; --} -- ++if (0 && + !defined($ENV{TARGET_CPU})) { + print "\nPlease run VCVARS32.BAT first to set up the Visual Studio build\n" . + "environment.\n\n"; +@@ -52,7 +52,7 @@ + exit; + } + -while (1) { +while (0) { print "\n\nNet-SNMP build and install options\n"; print "==================================\n\n"; print "1. OpenSSL support: " . ($openssl ? "enabled" : "disabled"). "\n"; -@@ -192,6 +184,8 @@ +@@ -188,6 +188,8 @@ print "Running Configure...\n"; system("perl Configure $configOpts --linktype=$linktype --prefix=\"$install_base\"" . ($logging ? " > configure.out 2>&1" : "")) == 0 || die ($logging ? "Build error (see configure.out)" : "Build error (see above)"); @@ -35,6 +36,7 @@ print "Cleaning...\n"; system("nmake /nologo clean" . ($logging ? " > clean.out 2>&1" : "")) == 0 || die ($logging ? "Build error (see clean.out)" : "Build error (see above)"); + --- win32/Configure +++ win32/Configure @@ -6,7 +6,6 @@ @@ -45,16 +47,16 @@ use Getopt::Long; my $version = "unknown"; -@@ -190,8 +189,6 @@ +@@ -190,7 +189,6 @@ my $perl_inc = $opensslincdir ? "/I $opensslincdir" : ""; -my $perl_cflags = ExtUtils::Embed::ccopts(); -- - my %makefile_subs = ( - "app" => [ "^APPS=", "APPS=" . join(" ", @apps) ], - "apc" => [ "^APPS_CLEAN=", "APPS_CLEAN=" . join(" ", @apps_clean)], -@@ -205,29 +202,23 @@ + # Do not use $perl_cflags if these come from a Perl executable built with gcc. +-$perl_cflags = "" if $perl_cflags =~ / -pipe/; ++ + +@@ -207,29 +205,24 @@ "sdk" => [ "^SDK=", $sdk == 1 ? "SDK=true" : "SDK=false" ], "pin" => [ "^PERL_DEFINE=","PERL_DEFINE=$perl_define" ], "pdf" => [ "^PERL_INC=", "PERL_INC=$perl_inc" ], @@ -62,7 +64,7 @@ + "pcf" => [ "^PERL_CFLAGS=","PERL_CFLAGS=" ], "cfl" => [ "^CFLAGS=", "CFLAGS=$perl_define " . "/D WIN32_LEAN_AND_MEAN " . -- "/EHsc " . + "/EHsc " . - "/FD " . - "/FR\$(INTDIR)\\ " . "/Fd\$(INTDIR)\\\$(PROGNAME).pdb " . @@ -89,7 +91,7 @@ ], "rsc" => [ "^RSCFLAGS=", "RSCFLAGS=/l 0x409 " . ($config eq "release" ? "/d NDEBUG" : -@@ -308,9 +299,3 @@ +@@ -310,9 +303,3 @@ print " Blumenthal AES: " . ($blumenthal_aes ? "enabled" : "disabled") . "\n"; print " IPv6 transport: " . ($b_ipv6 == 1 ? "enabled" : "disabled") . "\n"; print " winExtDLL agent: " . ($b_winextdll == 1 ? "enabled" : "disabled") . "\n"; diff --git a/recipes/net-snmp/all/patches/0004-fix-apple-arm64-build.patch b/recipes/net-snmp/all/patches/0004-fix-apple-arm64-build.patch deleted file mode 100644 index 018c49021fc87..0000000000000 --- a/recipes/net-snmp/all/patches/0004-fix-apple-arm64-build.patch +++ /dev/null @@ -1,17 +0,0 @@ -Upstream suggests the just hardcode this value: -https://github.com/net-snmp/net-snmp/issues/295#issuecomment-1002631231 - ---- config.sub -+++ config.sub -@@ -120,6 +120,11 @@ - exit 1;; - esac - -+if [ "$1" = aarch64-apple-darwin ]; then -+ echo arm-apple-darwin -+ exit 0 -+fi -+ - # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` diff --git a/recipes/net-snmp/all/test_package/CMakeLists.txt b/recipes/net-snmp/all/test_package/CMakeLists.txt index bed2bf477f616..21569fa32fd1f 100644 --- a/recipes/net-snmp/all/test_package/CMakeLists.txt +++ b/recipes/net-snmp/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup(TARGETS KEEP_RPATHS) - find_package(net-snmp REQUIRED CONFIG) add_executable(test_package test_package.c) diff --git a/recipes/net-snmp/all/test_package/conanfile.py b/recipes/net-snmp/all/test_package/conanfile.py index 56657365795bd..ef5d7042163ec 100644 --- a/recipes/net-snmp/all/test_package/conanfile.py +++ b/recipes/net-snmp/all/test_package/conanfile.py @@ -1,19 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools - class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) - def build_requirements(self): - if self.settings.os == "Macos" and self.settings.arch == "armv8": - # Attempting to use @rpath without - # CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being set. This could be - # because you are using a Mac OS X version less than 10.5 or - # because CMake's platform configuration is corrupt. - self.build_requires("cmake/3.20.1") + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -21,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/net-snmp/all/test_package/test_package.c b/recipes/net-snmp/all/test_package/test_package.c index db6d49e73a2f8..dbe79814204fe 100644 --- a/recipes/net-snmp/all/test_package/test_package.c +++ b/recipes/net-snmp/all/test_package/test_package.c @@ -2,12 +2,8 @@ #include #include -int main(int argc, char const* argv[]) +int main() { - (void)argc; - (void)argv; - netsnmp_free(NULL); - return 0; } diff --git a/recipes/net-snmp/all/test_v1_package/CMakeLists.txt b/recipes/net-snmp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/net-snmp/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/net-snmp/all/test_v1_package/conanfile.py b/recipes/net-snmp/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..a8c92dea63335 --- /dev/null +++ b/recipes/net-snmp/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/net-snmp/config.yml b/recipes/net-snmp/config.yml index f15097f7b11ab..be87e4ef2a874 100644 --- a/recipes/net-snmp/config.yml +++ b/recipes/net-snmp/config.yml @@ -1,3 +1,3 @@ versions: - "5.9.1": + "5.9.4": folder: all diff --git a/recipes/nghttp3/all/conandata.yml b/recipes/nghttp3/all/conandata.yml index 44b63e4bfe7f1..b52e9aae32e70 100644 --- a/recipes/nghttp3/all/conandata.yml +++ b/recipes/nghttp3/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.5.0": + url: "https://github.com/ngtcp2/nghttp3/releases/download/v1.5.0/nghttp3-1.5.0.tar.bz2" + sha256: "4d89a3b84dbe2c6e0fe1367a2082f23b3c6e3279536e2436aed1a3785f6716c5" "1.4.0": url: "https://github.com/ngtcp2/nghttp3/releases/download/v1.4.0/nghttp3-1.4.0.tar.bz2" sha256: "bf8fbb4242cff0feb10b3e0d02545a8ad9a71d932f877a57a592bfde62a26019" diff --git a/recipes/nghttp3/config.yml b/recipes/nghttp3/config.yml index f9cd212790c2d..53ac3abeac23c 100644 --- a/recipes/nghttp3/config.yml +++ b/recipes/nghttp3/config.yml @@ -1,4 +1,6 @@ versions: + "1.5.0": + folder: all "1.4.0": folder: all "1.3.0": diff --git a/recipes/ninja/all/conanfile.py b/recipes/ninja/all/conanfile.py index 6fede8df5ba1b..5e97a00b8feff 100644 --- a/recipes/ninja/all/conanfile.py +++ b/recipes/ninja/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile, conan_version from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get +from conan.tools.files import copy, get, replace_in_file from conan.tools.scm import Version import os @@ -25,6 +25,10 @@ def package_id(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") + + #prevent re2c (which is optional and not needed) from being used + replace_in_file(self, cmakelists, "if(RE2C)", "if(FALSE)") def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/nodejs/all/conandata.yml b/recipes/nodejs/all/conandata.yml index 56a1be535ef41..da170c70c328b 100644 --- a/recipes/nodejs/all/conandata.yml +++ b/recipes/nodejs/all/conandata.yml @@ -1,52 +1,51 @@ sources: - "12.14.1": - Windows: - "x86_64": - url: "https://nodejs.org/dist/v12.14.1/node-v12.14.1-win-x64.zip" - sha256: "1f96ccce3ba045ecea3f458e189500adb90b8bc1a34de5d82fc10a5bf66ce7e3" - Linux: - "x86_64": - url: "https://nodejs.org/dist/v12.14.1/node-v12.14.1-linux-x64.tar.xz" - sha256: "07cfcaa0aa9d0fcb6e99725408d9e0b07be03b844701588e3ab5dbc395b98e1b" - Macos: - "x86_64": - url: "https://nodejs.org/dist/v12.14.1/node-v12.14.1-darwin-x64.tar.gz" - sha256: "0be10a28737527a1e5e3784d3ad844d742fe8b0718acd701fd48f718fd3af78f" - "13.6.0": + "20.16.0": Windows: "x86_64": - url: "https://nodejs.org/dist/v13.6.0/node-v13.6.0-win-x64.zip" - sha256: "7fe37b34a4673a071bea52fcaf913ec422cf6fd79fd025bfb22de42ccc77f386" + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-win-x64.zip" + sha256: "4e88373ac5ae859ad4d50cc3c5fa86eb3178d089b72e64c4dbe6eeac5d7b5979" + "armv8": + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-win-arm64.zip" + sha256: "af5a85ea299fcebd34c3c726a47a926e73171f9b657a6eaa796c011597241bf8" Linux: "x86_64": - url: "https://nodejs.org/dist/v13.6.0/node-v13.6.0-linux-x64.tar.xz" - sha256: "00f01315a867da16d1638f7a02966c608e344ac6c5b7d04d1fdae3138fa9d798" + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-linux-x64.tar.xz" + sha256: "c30af7dfea46de7d8b9b370fa33b8b15440bc93f0a686af8601bbb48b82f16c0" + "armv7": + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-linux-armv7l.tar.xz" + sha256: "a23a49029e8c7788c701eb3ace553260b7676a5a2ea9965ba92e4817008fbefe" + "armv8": + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-linux-arm64.tar.xz" + sha256: "1d9929e72f692179f884cd676b2dfabd879cb77defa7869dc8cfc802619277fb" Macos: "x86_64": - url: "https://nodejs.org/dist/v13.6.0/node-v13.6.0-darwin-x64.tar.gz" - sha256: "da13adb864777b322dda7af20410a9b0c63aa69de4b5574008d1e6910768bf69" - "16.3.0": + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-darwin-x64.tar.gz" + sha256: "e18942cd706e4d69a4845ddacee2f1c17a72e853a229e3d2623d2edeb7efde72" + "armv8": + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-darwin-arm64.tar.gz" + sha256: "fc7355e778b181575153b7dea4879e8021776eeb376c43c50f65893d2ea70aa3" + "18.15.0": Windows: "x86_64": - url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-win-x64.zip" - sha256: "3352e58d3603cf58964409d07f39f3816285317d638ddb0a0bf3af5deb2ff364" + url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-win-x64.zip" + sha256: "118fbcae58bc8c53cbe97a10c019734ed90685da8dda98aa0b0f4aeead42a647" Linux: "x86_64": - url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-x64.tar.xz" - sha256: "5347ece975747e4d9768d4ed3f8b2220c955ac01f8a695347cd7f71ff5efa318" + url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-x64.tar.xz" + sha256: "c8c5fa53ce0c0f248e45983e86368e0b1daf84b77e88b310f769c3cfc12682ef" "armv7": - url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-armv7l.tar.xz" - sha256: "c8817e30fb910476ec1f223de7eedd31f3d157ddf2003a3083d7f5662180e4de" + url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-armv7l.tar.xz" + sha256: "baad3cdf1365f46bf837635554b10bc3e320799e69ac26e07df1fcde0c1738c7" "armv8": - url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-arm64.tar.xz" - sha256: "67dd97e41aad1bc11736e99cba119525b4f3472b132c46730ba8cf03f7076e23" + url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-arm64.tar.xz" + sha256: "98ea6ed0a1ae55334ab2c03c34d5e52c6dc3dee8f236c0afc08ab1c964506633" Macos: "x86_64": - url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-darwin-x64.tar.gz" - sha256: "3e075bcfb6130dda84bfd04633cb228ec71e72d9a844c57efb7cfff130b4be89" + url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-darwin-x64.tar.gz" + sha256: "76add174d2d3f98da08907412e82add7352b8cb6f639324d352a65c084b99c7e" "armv8": - url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-darwin-arm64.tar.gz" - sha256: "aeac294dbe54a4dfd222eedfbae704b185c40702254810e2c5917f6dbc80e017" + url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-darwin-arm64.tar.gz" + sha256: "bd302a689c3c34e2b61d86b97de66d26a335881a17af09b6a0a4bb1019df56e4" "16.20.2": Windows: "x86_64": @@ -69,25 +68,51 @@ sources: "armv8": url: "https://nodejs.org/dist/v16.20.2/node-v16.20.2-darwin-arm64.tar.gz" sha256: "6a5c4108475871362d742b988566f3fe307f6a67ce14634eb3fbceb4f9eea88c" - "18.15.0": + "16.3.0": Windows: "x86_64": - url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-win-x64.zip" - sha256: "118fbcae58bc8c53cbe97a10c019734ed90685da8dda98aa0b0f4aeead42a647" + url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-win-x64.zip" + sha256: "3352e58d3603cf58964409d07f39f3816285317d638ddb0a0bf3af5deb2ff364" Linux: "x86_64": - url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-x64.tar.xz" - sha256: "c8c5fa53ce0c0f248e45983e86368e0b1daf84b77e88b310f769c3cfc12682ef" + url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-x64.tar.xz" + sha256: "5347ece975747e4d9768d4ed3f8b2220c955ac01f8a695347cd7f71ff5efa318" "armv7": - url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-armv7l.tar.xz" - sha256: "baad3cdf1365f46bf837635554b10bc3e320799e69ac26e07df1fcde0c1738c7" + url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-armv7l.tar.xz" + sha256: "c8817e30fb910476ec1f223de7eedd31f3d157ddf2003a3083d7f5662180e4de" "armv8": - url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-arm64.tar.xz" - sha256: "98ea6ed0a1ae55334ab2c03c34d5e52c6dc3dee8f236c0afc08ab1c964506633" + url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-arm64.tar.xz" + sha256: "67dd97e41aad1bc11736e99cba119525b4f3472b132c46730ba8cf03f7076e23" Macos: "x86_64": - url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-darwin-x64.tar.gz" - sha256: "76add174d2d3f98da08907412e82add7352b8cb6f639324d352a65c084b99c7e" + url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-darwin-x64.tar.gz" + sha256: "3e075bcfb6130dda84bfd04633cb228ec71e72d9a844c57efb7cfff130b4be89" "armv8": - url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-darwin-arm64.tar.gz" - sha256: "bd302a689c3c34e2b61d86b97de66d26a335881a17af09b6a0a4bb1019df56e4" + url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-darwin-arm64.tar.gz" + sha256: "aeac294dbe54a4dfd222eedfbae704b185c40702254810e2c5917f6dbc80e017" + "13.6.0": + Windows: + "x86_64": + url: "https://nodejs.org/dist/v13.6.0/node-v13.6.0-win-x64.zip" + sha256: "7fe37b34a4673a071bea52fcaf913ec422cf6fd79fd025bfb22de42ccc77f386" + Linux: + "x86_64": + url: "https://nodejs.org/dist/v13.6.0/node-v13.6.0-linux-x64.tar.xz" + sha256: "00f01315a867da16d1638f7a02966c608e344ac6c5b7d04d1fdae3138fa9d798" + Macos: + "x86_64": + url: "https://nodejs.org/dist/v13.6.0/node-v13.6.0-darwin-x64.tar.gz" + sha256: "da13adb864777b322dda7af20410a9b0c63aa69de4b5574008d1e6910768bf69" + "12.14.1": + Windows: + "x86_64": + url: "https://nodejs.org/dist/v12.14.1/node-v12.14.1-win-x64.zip" + sha256: "1f96ccce3ba045ecea3f458e189500adb90b8bc1a34de5d82fc10a5bf66ce7e3" + Linux: + "x86_64": + url: "https://nodejs.org/dist/v12.14.1/node-v12.14.1-linux-x64.tar.xz" + sha256: "07cfcaa0aa9d0fcb6e99725408d9e0b07be03b844701588e3ab5dbc395b98e1b" + Macos: + "x86_64": + url: "https://nodejs.org/dist/v12.14.1/node-v12.14.1-darwin-x64.tar.gz" + sha256: "0be10a28737527a1e5e3784d3ad844d742fe8b0718acd701fd48f718fd3af78f" diff --git a/recipes/nodejs/config.yml b/recipes/nodejs/config.yml index 78cc638a90e4d..7f37f049d8acc 100644 --- a/recipes/nodejs/config.yml +++ b/recipes/nodejs/config.yml @@ -1,11 +1,13 @@ versions: - "12.14.1": + "20.16.0": folder: all - "13.6.0": + "18.15.0": + folder: all + "16.20.2": folder: all "16.3.0": folder: all - "16.20.2": + "13.6.0": folder: all - "18.15.0": + "12.14.1": folder: all diff --git a/recipes/ohpipeline/all/conandata.yml b/recipes/ohpipeline/all/conandata.yml index 3d9d1c4c370e7..a9fa8d1a7bd8f 100644 --- a/recipes/ohpipeline/all/conandata.yml +++ b/recipes/ohpipeline/all/conandata.yml @@ -11,8 +11,8 @@ sources: url: "https://github.com/openhome/ohPipeline/archive/refs/tags/ohMediaPlayer_1.155.1133.tar.gz" sha256: "507bdf70fc6b9bf8e4605546a5c7ae99abbe537cce4b74b3e091764323939fae" cmake: - url: "https://raw.githubusercontent.com/merakiacoustic/ohPipeline/ohMediaPlayer_1.155.1133_meraki1/CMakeLists.txt" - sha256: "6f73357f1c9a2a8dfc48db39b74c10102df34e86ae68985ff0cecf95748ba89c" + url: "https://raw.githubusercontent.com/merakiacoustic/ohPipeline/ohMediaPlayer_1.155.1133_meraki2/CMakeLists.txt" + sha256: "0f8701552c2b3331edeedde4c3a1b8120dc419d493f6a2e05b21c9045729d6ff" patches: "1.139.1000": - patch_file: "patches/0001-missing-include.patch" diff --git a/recipes/onnx/all/conandata.yml b/recipes/onnx/all/conandata.yml index 0ac824c98a00d..a143774132c75 100644 --- a/recipes/onnx/all/conandata.yml +++ b/recipes/onnx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.16.2": + url: "https://github.com/onnx/onnx/archive/v1.16.2.tar.gz" + sha256: "84fc1c3d6133417f8a13af6643ed50983c91dacde5ffba16cc8bb39b22c2acbb" "1.16.1": url: "https://github.com/onnx/onnx/archive/v1.16.1.tar.gz" sha256: "0e6aa2c0a59bb2d90858ad0040ea1807117cc2f05b97702170f18e6cd6b66fb3" diff --git a/recipes/onnx/all/conanfile.py b/recipes/onnx/all/conanfile.py index 02c220e3798ce..0032d4c6de8cd 100644 --- a/recipes/onnx/all/conanfile.py +++ b/recipes/onnx/all/conanfile.py @@ -32,7 +32,7 @@ class OnnxConan(ConanFile): default_options = { "shared": False, "fPIC": True, - "disable_static_registration": False, + "disable_static_registration": True, } @property diff --git a/recipes/onnx/config.yml b/recipes/onnx/config.yml index 9f508d50a4d4b..62dc832f13021 100644 --- a/recipes/onnx/config.yml +++ b/recipes/onnx/config.yml @@ -1,4 +1,6 @@ versions: + "1.16.2": + folder: all "1.16.1": folder: all "1.16.0": diff --git a/recipes/onnxruntime/all/cmake/onnxruntime_external_deps.cmake b/recipes/onnxruntime/all/cmake/onnxruntime_external_deps.cmake new file mode 100644 index 0000000000000..8cacf5636fe36 --- /dev/null +++ b/recipes/onnxruntime/all/cmake/onnxruntime_external_deps.cmake @@ -0,0 +1,112 @@ +# Replacement for https://github.com/microsoft/onnxruntime/blob/v1.16.1/cmake/external/onnxruntime_external_deps.cmake + +if(NOT onnxruntime_DISABLE_ABSEIL) + find_package(absl REQUIRED CONFIG) + list(APPEND onnxruntime_EXTERNAL_LIBRARIES abseil::abseil) + include_directories(${absl_INCLUDE_DIRS}) +endif() + +find_package(re2 REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES re2::re2) + +#flatbuffers 1.11.0 does not have flatbuffers::IsOutRange, therefore we require 1.12.0+ +find_package(Flatbuffers REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES flatbuffers::flatbuffers) + +find_package(Protobuf REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES protobuf::libprotobuf) +set(ONNX_CUSTOM_PROTOC_EXECUTABLE protoc) +set(PROTOC_EXECUTABLE protoc) + +find_package(date REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES date::date) +include_directories(${date_INCLUDE_DIRS}) +add_library(date_interface INTERFACE) + +find_package(Boost REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES Boost::mp11) + +find_package(nlohmann_json REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES nlohmann_json::nlohmann_json) + +find_package(cpuinfo REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES cpuinfo::cpuinfo) +if (TARGET cpuinfo::clog) + list(APPEND onnxruntime_EXTERNAL_LIBRARIES cpuinfo::clog) +endif() +set(CPUINFO_SUPPORTED ${cpuinfo_FOUND}) +# Add a dummy targets for onnxruntime CMakelists.txt to depend on +add_library(clog INTERFACE) +add_library(cpuinfo INTERFACE) + +if (NOT WIN32) + find_package(nsync REQUIRED CONFIG) + list(APPEND onnxruntime_EXTERNAL_LIBRARIES nsync::nsync_cpp) + include_directories(${nsync_INCLUDE_DIRS}) + add_library(nsync_cpp INTERFACE) +endif() + +find_package(Microsoft.GSL 4.0 REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES Microsoft.GSL::GSL) +include_directories(${Microsoft.GSL_INCLUDE_DIRS}) + +find_package(safeint REQUIRED CONFIG) +include_directories(${safeint_INCLUDE_DIRS}) +add_library(safeint_interface INTERFACE) + +find_package(ONNX REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES onnx onnx_proto) + +find_package(Eigen3 REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES Eigen3::Eigen) +set(eigen_INCLUDE_DIRS ${Eigen3_INCLUDE_DIRS}) + +if(WIN32) + find_package(wil REQUIRED CONFIG) + list(APPEND onnxruntime_EXTERNAL_LIBRARIES WIL::WIL) + include_directories(${wil_INCLUDE_DIRS}) +endif() + +# XNNPACK EP +if (onnxruntime_USE_XNNPACK) + if (onnxruntime_DISABLE_CONTRIB_OPS) + message(FATAL_ERROR "XNNPACK EP requires the internal NHWC contrib ops to be available " + "but onnxruntime_DISABLE_CONTRIB_OPS is ON") + endif() + find_package(xnnpack REQUIRED CONFIG) + list(APPEND onnxruntime_EXTERNAL_LIBRARIES xnnpack::xnnpack) + add_library(XNNPACK INTERFACE) +endif() + +if (onnxruntime_USE_MIMALLOC) + find_package(mimalloc REQUIRED CONFIG) + add_definitions(-DUSE_MIMALLOC) +endif() + +# The source code of onnx_proto is generated, we must build this lib first before starting to compile the other source code that uses ONNX protobuf types. +# The other libs do not have the problem. All the sources are already there. We can compile them in any order. +set(onnxruntime_EXTERNAL_DEPENDENCIES + onnx_proto + flatbuffers::flatbuffers +) + +if (onnxruntime_RUN_ONNX_TESTS) + add_definitions(-DORT_RUN_EXTERNAL_ONNX_TESTS) +endif() + +if(onnxruntime_ENABLE_ATEN) + message("Aten fallback is enabled.") + find_package(dlpack REQUIRED CONFIG) +endif() + +if(onnxruntime_ENABLE_TRAINING OR (onnxruntime_ENABLE_TRAINING_APIS AND onnxruntime_BUILD_UNIT_TESTS)) + find_package(cxxopts REQUIRED CONFIG) +endif() + +if(onnxruntime_USE_SNPE) + include(external/find_snpe.cmake) + list(APPEND onnxruntime_EXTERNAL_LIBRARIES ${SNPE_NN_LIBS}) +endif() + +file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} ORT_BINARY_DIR) +file(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR} ORT_SOURCE_DIR) diff --git a/recipes/onnxruntime/all/conandata.yml b/recipes/onnxruntime/all/conandata.yml index b051b06768621..5ad665fd49f79 100644 --- a/recipes/onnxruntime/all/conandata.yml +++ b/recipes/onnxruntime/all/conandata.yml @@ -1,16 +1,13 @@ sources: + "1.18.1": + url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.18.1.tar.gz" + sha256: "480ff5d2450ff18d02db48908c9c0c6a602993942cb47866b8effe32d0469a2c" + "1.17.3": + url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.17.3.tar.gz" + sha256: "4112f6552c17216311be013b9a2621a3c1a17ed9e1268a1142599b6a494517c2" "1.16.3": url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.16.3.tar.gz" sha256: "d26b8a7eed1df4440aa3d8eac5049980cbe585514ccedfda809712051a4b1721" - "1.16.2": - url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.16.2.tar.gz" - sha256: "609a9d31fd9445eb2e737cbb6420100fa7d4e1180b594c1a62505b26f730bfd5" - "1.16.1": - url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.16.1.tar.gz" - sha256: "197c6ce4f2de9176402fb8a634c390e757b729ff48a30e8038a0f7d71ff1f1ae" - "1.16.0": - url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.16.0.tar.gz" - sha256: "3a4e57d454bce4349e11e2262fc47728a78b86ef1e0754514bbbc7d709e0a80d" "1.15.1": url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.15.1.tar.gz" sha256: "93a9b6f148639938ccbaa48d0f641d8f33312fdfcc69ee9466e11362b43917c4" @@ -18,49 +15,46 @@ sources: url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.14.1.tar.gz" sha256: "f998352b131bb89fa7dd1f1d87ddbafe647dfaddd11929b6b5168b3f4ef857de" patches: - "1.16.3": - - patch_file: "patches/1.16.0-0001-cmake-dependencies.patch" - patch_description: "CMake: ensure conan dependencies are used" - patch_type: "conan" - - patch_file: "patches/1.14.1-0004-abseil-no-string-view.patch" - patch_description: "allow to build with abseil built without c++17 support" + "1.18.1": + - patch_file: "patches/1.17.3-0002-missing-include.patch" + patch_description: "add missing '' include when abseil is built without c++17 support" patch_type: "portability" - "1.16.2": - - patch_file: "patches/1.16.0-0001-cmake-dependencies.patch" - patch_description: "CMake: ensure conan dependencies are used" - patch_type: "conan" - - patch_file: "patches/1.14.1-0004-abseil-no-string-view.patch" + - patch_file: "patches/1.18.0-0004-abseil-no-string-view.patch" patch_description: "allow to build with abseil built without c++17 support" patch_type: "portability" - "1.16.1": - - patch_file: "patches/1.16.0-0001-cmake-dependencies.patch" - patch_description: "CMake: ensure conan dependencies are used" - patch_type: "conan" + - patch_file: "patches/1.18.1-0005-fix-cutlass-cuda-provider.patch" + patch_description: "use cutlass from Conan" + patch_type: "portability" + "1.17.3": + - patch_file: "patches/1.17.3-0001-patch-macos-cpp20-date-compat.patch" + patch_description: "allow to build with macos c++20 support" + patch_type: "portability" + patch_source: "https://github.com/microsoft/onnxruntime/commit/7303a90f4916dcf6f66236d40b8917344c27420a.patch" + - patch_file: "patches/1.17.3-0002-missing-include.patch" + patch_description: "add missing '' include when abseil is built without c++17 support" + patch_type: "portability" - patch_file: "patches/1.14.1-0004-abseil-no-string-view.patch" patch_description: "allow to build with abseil built without c++17 support" patch_type: "portability" - "1.16.0": - - patch_file: "patches/1.16.0-0001-cmake-dependencies.patch" - patch_description: "CMake: ensure conan dependencies are used" - patch_type: "conan" + - patch_file: "patches/1.17.3-0003-fix-cutlass-cuda-provider.patch" + patch_description: "use cutlass from Conan" + patch_type: "portability" + "1.16.3": - patch_file: "patches/1.14.1-0004-abseil-no-string-view.patch" patch_description: "allow to build with abseil built without c++17 support" patch_type: "portability" "1.15.1": - - patch_file: "patches/1.15.1-0001-cmake-dependencies.patch" - patch_description: "CMake: ensure conan dependencies are used" - patch_type: "conan" - patch_file: "patches/1.14.1-0004-abseil-no-string-view.patch" patch_description: "allow to build with abseil built without c++17 support" patch_type: "portability" + - patch_file: "patches/1.15.1-0002-fix-attention-15983.patch" + patch_description: "Fix attention.cc" + patch_source: "https://github.com/microsoft/onnxruntime/pull/15983" + patch_type: "backport" "1.14.1": - patch_file: "patches/1.14.1-0001-cmake-dependencies.patch" patch_description: "CMake: ensure conan dependencies are used (upstreamed future versions)" patch_type: "conan" - patch_source: "https://github.com/microsoft/onnxruntime/pull/15323" - - patch_file: "patches/1.14.1-0002-cmake-dependencies.patch" - patch_description: "CMake: ensure conan dependencies are used" - patch_type: "conan" - patch_file: "patches/1.14.1-0003-amx-gas-version.patch" patch_description: "Check GNU AS supports AMX before enabling it" patch_type: "portability" @@ -72,3 +66,12 @@ patches: patch_description: "Ensures the forward compatibility with the newest versions of re2 library." patch_type: "portability" patch_source: "https://github.com/microsoft/onnxruntime/commit/126e7bf15fa4af8621814b82a3f7bd0d786f0239.patch" + +# ONNX versions are based on the minor version used at +# https://github.com/microsoft/onnxruntime/tree/main/cmake/external +onnx_version_map: + "1.18.1": "1.16.2" + "1.17.3": "1.15.0" + "1.16.3": "1.14.1" + "1.15.1": "1.14.1" + "1.14.1": "1.13.1" diff --git a/recipes/onnxruntime/all/conanfile.py b/recipes/onnxruntime/all/conanfile.py index 45cbfde117d6f..ce3b31cb93581 100644 --- a/recipes/onnxruntime/all/conanfile.py +++ b/recipes/onnxruntime/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, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, replace_in_file from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.env import VirtualBuildEnv @@ -27,16 +27,20 @@ class OnnxRuntimeConan(ConanFile): "shared": [True, False], "fPIC": [True, False], "with_xnnpack": [True, False], + "with_cuda": [True, False], } default_options = { "shared": False, "fPIC": True, "with_xnnpack": False, + "with_cuda": False, } short_paths = True @property def _min_cppstd(self): + if is_apple_os(self) and Version(self.version) >= "1.17.0": + return 20 # https://github.com/microsoft/onnxruntime/blob/8f5c79cb63f09ef1302e85081093a3fe4da1bc7d/cmake/CMakeLists.txt#L43-L47 return 17 @property @@ -59,6 +63,7 @@ def _compilers_minimum_version(self): def export_sources(self): export_conandata_patches(self) + copy(self, "cmake/*", src=self.recipe_folder, dst=self.export_sources_folder) def config_options(self): if self.settings.os == "Windows": @@ -67,38 +72,46 @@ def config_options(self): def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + # onnxruntime forces this to be True + # https://github.com/microsoft/onnxruntime/blob/be76e1e1b8e2914e448d12a0cc683c00014c0490/cmake/external/onnxruntime_external_deps.cmake#L542 + self.options["onnx"].disable_static_registration = True def layout(self): cmake_layout(self, src_folder="src") - @property - def _onnx_version(self): - version = Version(self.version) - return { - "1.14": "1.13.1", - "1.15": "1.14.1", - "1.16": "1.14.1", - }[f"{version.major}.{version.minor}"] - def requirements(self): - self.requires("abseil/20230802.1") + required_onnx_version = self.conan_data["onnx_version_map"][self.version] + self.requires(f"onnx/{required_onnx_version}") + self.requires("abseil/20240116.1") self.requires("protobuf/3.21.12") self.requires("date/3.0.1") - self.requires("re2/20230901") - self.requires(f"onnx/{self._onnx_version}") - self.requires("flatbuffers/1.12.0") - self.requires("boost/1.83.0", headers=True, libs=False, run=False) # for mp11, header only, no need for libraries to link/run + self.requires("re2/20231101") + if Version(self.version) >= "1.18": + self.requires("flatbuffers/23.5.26") + else: + # v1.* is required, newer versions are not compatible + self.requires("flatbuffers/1.12.0") + # using 1.84.0+ fails on CCI as it prevents the cpp 17 version to be picked up when building with cpp 20 + self.requires("boost/1.83.0", headers=True, libs=False) # for mp11, header only, no need for libraries self.requires("safeint/3.0.28") self.requires("nlohmann_json/3.11.3") self.requires("eigen/3.4.0") self.requires("ms-gsl/4.0.0") - self.requires("cpuinfo/cci.20220618") + if Version(self.version) >= "1.17.0": + self.requires("cpuinfo/cci.20231129") + else: + self.requires("cpuinfo/cci.20220618") # Newer versions are not compatible if self.settings.os != "Windows": self.requires("nsync/1.26.0") else: - self.requires("wil/1.0.231216.1") + self.requires("wil/1.0.240803.1") if self.options.with_xnnpack: - self.requires("xnnpack/cci.20220801") + if Version(self.version) >= "1.17.0": + self.requires("xnnpack/cci.20230715") + else: + self.requires("xnnpack/cci.20220801") + if self.options.with_cuda: + self.requires("cutlass/3.5.0") def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -108,17 +121,23 @@ def validate(self): raise ConanInvalidConfiguration( f"{self.ref} requires minimum compiler version {minimum_version}." ) + if not self.dependencies["onnx"].options.disable_static_registration: + raise ConanInvalidConfiguration( + f"{self.ref} requires onnx compiled with `-o onnx:disable_static_registration=True`." + ) def validate_build(self): if self.version >= Version("1.15.0") and self.options.shared and sys.version_info[:2] < (3, 8): # https://github.com/microsoft/onnxruntime/blob/638146b79ea52598ece514704d3f592c10fab2f1/cmake/CMakeLists.txt#LL500C12-L500C12 raise ConanInvalidConfiguration( - f"{self.ref} requires python 3.8+ to be built as shared." + f"{self.ref} requires Python 3.8+ to be built as shared." ) + if self.settings.os == "Windows" and self.dependencies["abseil"].options.shared: + raise ConanInvalidConfiguration("Using abseil shared on Windows leads to link errors.") def build_requirements(self): - # Required by upstream https://github.com/microsoft/onnxruntime/blob/v1.14.1/cmake/CMakeLists.txt#L5 - self.tool_requires("cmake/[>=3.24 <4]") + # Required by upstream https://github.com/microsoft/onnxruntime/blob/v1.16.1/cmake/CMakeLists.txt#L5 + self.tool_requires("cmake/[>=3.26 <4]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -128,102 +147,60 @@ def generate(self): # disable downloading dependencies to ensure conan ones are used tc.variables["FETCHCONTENT_FULLY_DISCONNECTED"] = True if self.version >= Version("1.15.0") and self.options.shared: - # Need to replace windows path seperators with linux path seperators to keep CMake from crashing + # Need to replace windows path separators with linux path separators to keep CMake from crashing tc.variables["Python_EXECUTABLE"] = sys.executable.replace("\\", "/") tc.variables["onnxruntime_BUILD_SHARED_LIB"] = self.options.shared tc.variables["onnxruntime_USE_FULL_PROTOBUF"] = not self.dependencies["protobuf"].options.lite tc.variables["onnxruntime_USE_XNNPACK"] = self.options.with_xnnpack + tc.variables["onnxruntime_USE_CUDA"] = self.options.with_cuda tc.variables["onnxruntime_BUILD_UNIT_TESTS"] = False - tc.variables["onnxruntime_RUN_ONNX_TESTS"] = False - tc.variables["onnxruntime_GENERATE_TEST_REPORTS"] = False - tc.variables["onnxruntime_USE_MIMALLOC"] = False - tc.variables["onnxruntime_ENABLE_PYTHON"] = False - tc.variables["onnxruntime_BUILD_CSHARP"] = False - tc.variables["onnxruntime_BUILD_JAVA"] = False - tc.variables["onnxruntime_BUILD_NODEJS"] = False - tc.variables["onnxruntime_BUILD_OBJC"] = False - tc.variables["onnxruntime_BUILD_APPLE_FRAMEWORK"] = False - tc.variables["onnxruntime_USE_DNNL"] = False - tc.variables["onnxruntime_USE_NNAPI_BUILTIN"] = False - tc.variables["onnxruntime_USE_RKNPU"] = False - tc.variables["onnxruntime_USE_LLVM"] = False - tc.variables["onnxruntime_ENABLE_MICROSOFT_INTERNAL"] = False - tc.variables["onnxruntime_USE_VITISAI"] = False - tc.variables["onnxruntime_USE_TENSORRT"] = False - tc.variables["onnxruntime_SKIP_AND_PERFORM_FILTERED_TENSORRT_TESTS"] = True - tc.variables["onnxruntime_USE_TENSORRT_BUILTIN_PARSER"] = False - tc.variables["onnxruntime_TENSORRT_PLACEHOLDER_BUILDER"] = False - tc.variables["onnxruntime_USE_TVM"] = False - tc.variables["onnxruntime_TVM_CUDA_RUNTIME"] = False - tc.variables["onnxruntime_TVM_USE_HASH"] = False - tc.variables["onnxruntime_CROSS_COMPILING"] = False tc.variables["onnxruntime_DISABLE_CONTRIB_OPS"] = False - tc.variables["onnxruntime_DISABLE_ML_OPS"] = False + tc.variables["onnxruntime_USE_FLASH_ATTENTION"] = False tc.variables["onnxruntime_DISABLE_RTTI"] = False tc.variables["onnxruntime_DISABLE_EXCEPTIONS"] = False - tc.variables["onnxruntime_MINIMAL_BUILD"] = False - tc.variables["onnxruntime_EXTENDED_MINIMAL_BUILD"] = False - tc.variables["onnxruntime_MINIMAL_BUILD_CUSTOM_OPS"] = False - tc.variables["onnxruntime_REDUCED_OPS_BUILD"] = False - tc.variables["onnxruntime_ENABLE_LANGUAGE_INTEROP_OPS"] = False - tc.variables["onnxruntime_USE_DML"] = False - tc.variables["onnxruntime_USE_WINML"] = False - tc.variables["onnxruntime_BUILD_MS_EXPERIMENTAL_OPS"] = False - tc.variables["onnxruntime_USE_TELEMETRY"] = False - tc.variables["onnxruntime_ENABLE_LTO"] = False - tc.variables["onnxruntime_USE_ACL"] = False - tc.variables["onnxruntime_USE_ACL_1902"] = False - tc.variables["onnxruntime_USE_ACL_1905"] = False - tc.variables["onnxruntime_USE_ACL_1908"] = False - tc.variables["onnxruntime_USE_ACL_2002"] = False - tc.variables["onnxruntime_USE_ARMNN"] = False + tc.variables["onnxruntime_ARMNN_RELU_USE_CPU"] = False tc.variables["onnxruntime_ARMNN_BN_USE_CPU"] = False - tc.variables["onnxruntime_ENABLE_NVTX_PROFILE"] = False - tc.variables["onnxruntime_ENABLE_TRAINING"] = False - tc.variables["onnxruntime_ENABLE_TRAINING_OPS"] = False - tc.variables["onnxruntime_ENABLE_TRAINING_APIS"] = False tc.variables["onnxruntime_ENABLE_CPU_FP16_OPS"] = False - tc.variables["onnxruntime_USE_NCCL"] = False - tc.variables["onnxruntime_BUILD_BENCHMARKS"] = False - tc.variables["onnxruntime_USE_ROCM"] = False - tc.variables["onnxruntime_GCOV_COVERAGE"] = False - tc.variables["onnxruntime_USE_MPI"] = False - tc.variables["onnxruntime_ENABLE_MEMORY_PROFILE"] = False - tc.variables["onnxruntime_ENABLE_CUDA_LINE_NUMBER_INFO"] = False - tc.variables["onnxruntime_BUILD_WEBASSEMBLY"] = False - tc.variables["onnxruntime_BUILD_WEBASSEMBLY_STATIC_LIB"] = False - tc.variables["onnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_CATCHING"] = False - tc.variables["onnxruntime_ENABLE_WEBASSEMBLY_API_EXCEPTION_CATCHING"] = False - tc.variables["onnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_THROWING"] = False - tc.variables["onnxruntime_ENABLE_WEBASSEMBLY_THREADS"] = False - tc.variables["onnxruntime_ENABLE_WEBASSEMBLY_DEBUG_INFO"] = False - tc.variables["onnxruntime_ENABLE_WEBASSEMBLY_PROFILING"] = False tc.variables["onnxruntime_ENABLE_EAGER_MODE"] = False tc.variables["onnxruntime_ENABLE_LAZY_TENSOR"] = False - tc.variables["onnxruntime_ENABLE_EXTERNAL_CUSTOM_OP_SCHEMAS"] = False - tc.variables["onnxruntime_ENABLE_CUDA_PROFILING"] = False - tc.variables["onnxruntime_ENABLE_ROCM_PROFILING"] = False - tc.variables["onnxruntime_USE_CANN"] = False - tc.generate() - deps = CMakeDeps(self) - if self.dependencies["flatbuffers"].options.shared: - deps.set_property("flatbuffers", "cmake_target_name", "flatbuffers::flatbuffers") + if Version(self.version) >= "1.17": + tc.variables["onnxruntime_ENABLE_CUDA_EP_INTERNAL_TESTS"] = False + tc.variables["onnxruntime_USE_NEURAL_SPEED"] = False + tc.variables["onnxruntime_USE_MEMORY_EFFICIENT_ATTENTION"] = False - deps.set_property("boost::headers", "cmake_target_name", "Boost::mp11") - deps.set_property("date", "cmake_target_name", "date_interface") - deps.set_property("safeint", "cmake_target_name", "safeint_interface") - deps.set_property("xnnpack", "cmake_target_name", "XNNPACK") + # Disable a warning that gets converted to an error + tc.preprocessor_definitions["_SILENCE_ALL_CXX23_DEPRECATION_WARNINGS"] = "1" + tc.generate() + deps = CMakeDeps(self) + deps.set_property("boost::headers", "cmake_target_name", "Boost::mp11") + deps.set_property("flatbuffers", "cmake_target_name", "flatbuffers::flatbuffers") deps.generate() + vbe = VirtualBuildEnv(self) vbe.generate(scope="build") - def build(self): + def _patch_sources(self): apply_conandata_patches(self) + copy(self, "onnxruntime_external_deps.cmake", + src=os.path.join(self.export_sources_folder, "cmake"), + dst=os.path.join(self.source_folder, "cmake", "external")) + # Avoid parsing of git commit info + if Version(self.version) >= "15.0": + replace_in_file(self, os.path.join(self.source_folder, "cmake", "CMakeLists.txt"), + "if (Git_FOUND)", "if (FALSE)") + if Version(self.version) >= "1.17": + # https://github.com/microsoft/onnxruntime/commit/5bfca1dc576720627f3af8f65e25af408271079b + replace_in_file(self, os.path.join(self.source_folder, "cmake", "onnxruntime_providers_cuda.cmake"), + 'option(onnxruntime_NVCC_THREADS "Number of threads that NVCC can use for compilation." 1)', + 'set(onnxruntime_NVCC_THREADS "1" CACHE STRING "Number of threads that NVCC can use for compilation.")') + + def build(self): + self._patch_sources() cmake = CMake(self) # https://github.com/microsoft/onnxruntime/blob/v1.14.1/cmake/CMakeLists.txt#L792 # onnxruntime is builds its targets with COMPILE_WARNING_AS_ERROR ON @@ -293,6 +270,8 @@ def package_info(self): self.cpp_info.requires.append("wil::wil") if self.options.with_xnnpack: self.cpp_info.requires.append("xnnpack::xnnpack") + if self.options.with_cuda: + self.cpp_info.requires.append("cutlass::cutlass") # https://github.com/microsoft/onnxruntime/blob/v1.16.0/cmake/CMakeLists.txt#L1759-L1763 self.cpp_info.set_property("cmake_file_name", "onnxruntime") diff --git a/recipes/onnxruntime/all/patches/1.14.1-0001-cmake-dependencies.patch b/recipes/onnxruntime/all/patches/1.14.1-0001-cmake-dependencies.patch index 4af8aa88fe662..f2d83eacd7844 100644 --- a/recipes/onnxruntime/all/patches/1.14.1-0001-cmake-dependencies.patch +++ b/recipes/onnxruntime/all/patches/1.14.1-0001-cmake-dependencies.patch @@ -1,72 +1,3 @@ ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt -@@ -753,7 +753,7 @@ endif() - - function(onnxruntime_set_compile_flags target_name) - if (CPUINFO_SUPPORTED) -- onnxruntime_add_include_to_target(${target_name} cpuinfo) -+ onnxruntime_add_include_to_target(${target_name} cpuinfo::cpuinfo) - endif() - if(onnxruntime_ENABLE_EAGER_MODE) - target_compile_definitions(${target_name} PRIVATE ENABLE_EAGER_MODE) -@@ -837,7 +837,7 @@ function(onnxruntime_set_compile_flags target_name) - target_compile_options(${target_name} PRIVATE "-Wno-unused-parameter") - endif() - target_compile_definitions(${target_name} PUBLIC -DNSYNC_ATOMIC_CPP11) -- target_include_directories(${target_name} PRIVATE "${google_nsync_SOURCE_DIR}/public") -+ onnxruntime_add_include_to_target(${target_name} nsync::nsync_cpp) - endif() - foreach(ORT_FLAG ${ORT_PROVIDER_FLAGS}) - target_compile_definitions(${target_name} PRIVATE ${ORT_FLAG}) -@@ -1461,7 +1461,7 @@ if (WIN32) - list(APPEND onnxruntime_EXTERNAL_LIBRARIES ${SYS_PATH_LIB}) - list(APPEND onnxruntime_EXTERNAL_LIBRARIES debug Dbghelp) - else() -- list(APPEND onnxruntime_EXTERNAL_LIBRARIES nsync_cpp) -+ list(APPEND onnxruntime_EXTERNAL_LIBRARIES nsync::nsync_cpp) - list(APPEND onnxruntime_EXTERNAL_LIBRARIES ${CMAKE_DL_LIBS} Threads::Threads) - endif() - ---- a/cmake/external/onnxruntime_external_deps.cmake -+++ b/cmake/external/onnxruntime_external_deps.cmake -@@ -237,7 +237,10 @@ if (NOT WIN32) - #nsync tests failed on Mac Build - set(NSYNC_ENABLE_TESTS OFF CACHE BOOL "" FORCE) - onnxruntime_fetchcontent_makeavailable(google_nsync) -- set(nsync_SOURCE_DIR ${google_nsync_SOURCE_DIR}) -+ if(google_nsync_SOURCE_DIR) -+ add_library(nsync::nsync_cpp ALIAS nsync_cpp) -+ target_include_directories(nsync_cpp PUBLIC ${google_nsync_SOURCE_DIR}/public) -+ endif() - endif() - - if(onnxruntime_USE_CUDA) -@@ -361,6 +364,12 @@ FetchContent_Declare( - - if (CPUINFO_SUPPORTED) - onnxruntime_fetchcontent_makeavailable(pytorch_cpuinfo) -+ if(pytorch_cpuinfo_SOURCE_DIR) -+ # shouldn't need to define these aliases after we use a version of cpuinfo with this commit: -+ # https://github.com/pytorch/cpuinfo/commit/082deffc80ce517f81dc2f3aebe6ba671fcd09c9 -+ add_library(cpuinfo::cpuinfo ALIAS cpuinfo) -+ add_library(cpuinfo::clog ALIAS clog) -+ endif() - endif() - - ---- a/cmake/onnxruntime_common.cmake -+++ b/cmake/onnxruntime_common.cmake -@@ -194,8 +194,8 @@ if (ARM64 OR ARM OR X86 OR X64 OR X86_64) - # Using it mainly in ARM with Android. - # Its functionality in detecting x86 cpu features are lacking, so is support for Windows. - if (CPUINFO_SUPPORTED) -- onnxruntime_add_include_to_target(onnxruntime_common cpuinfo) -- list(APPEND onnxruntime_EXTERNAL_LIBRARIES cpuinfo clog) -+ onnxruntime_add_include_to_target(onnxruntime_common cpuinfo::cpuinfo) -+ list(APPEND onnxruntime_EXTERNAL_LIBRARIES cpuinfo::cpuinfo cpuinfo::clog) - endif() - endif() - endif() --- a/cmake/onnxruntime_flatbuffers.cmake +++ b/cmake/onnxruntime_flatbuffers.cmake @@ -9,7 +9,7 @@ file(GLOB onnxruntime_flatbuffers_srcs CONFIGURE_DEPENDS @@ -78,170 +9,3 @@ if(onnxruntime_ENABLE_INSTRUMENT) target_compile_definitions(onnxruntime_flatbuffers PUBLIC ONNXRUNTIME_ENABLE_INSTRUMENT) endif() ---- a/cmake/onnxruntime_providers.cmake -+++ b/cmake/onnxruntime_providers.cmake -@@ -539,10 +539,10 @@ if (onnxruntime_USE_CUDA) - - if(APPLE) - set_property(TARGET onnxruntime_providers_cuda APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker -exported_symbols_list ${ONNXRUNTIME_ROOT}/core/providers/cuda/exported_symbols.lst") -- target_link_libraries(onnxruntime_providers_cuda PRIVATE nsync_cpp) -+ target_link_libraries(onnxruntime_providers_cuda PRIVATE nsync::nsync_cpp) - elseif(UNIX) - set_property(TARGET onnxruntime_providers_cuda APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker --version-script=${ONNXRUNTIME_ROOT}/core/providers/cuda/version_script.lds -Xlinker --gc-sections") -- target_link_libraries(onnxruntime_providers_cuda PRIVATE nsync_cpp) -+ target_link_libraries(onnxruntime_providers_cuda PRIVATE nsync::nsync_cpp) - elseif(WIN32) - set_property(TARGET onnxruntime_providers_cuda APPEND_STRING PROPERTY LINK_FLAGS "-DEF:${ONNXRUNTIME_ROOT}/core/providers/cuda/symbols.def") - else() -@@ -595,10 +595,10 @@ if (onnxruntime_USE_DNNL) - INSTALL_RPATH "@loader_path" - BUILD_WITH_INSTALL_RPATH TRUE - INSTALL_RPATH_USE_LINK_PATH FALSE) -- target_link_libraries(onnxruntime_providers_dnnl PRIVATE nsync_cpp) -+ target_link_libraries(onnxruntime_providers_dnnl PRIVATE nsync::nsync_cpp) - elseif(UNIX) - set_property(TARGET onnxruntime_providers_dnnl APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker --version-script=${ONNXRUNTIME_ROOT}/core/providers/dnnl/version_script.lds -Xlinker --gc-sections -Xlinker -rpath=\$ORIGIN") -- target_link_libraries(onnxruntime_providers_dnnl PRIVATE nsync_cpp) -+ target_link_libraries(onnxruntime_providers_dnnl PRIVATE nsync::nsync_cpp) - elseif(WIN32) - set_property(TARGET onnxruntime_providers_dnnl APPEND_STRING PROPERTY LINK_FLAGS "-DEF:${ONNXRUNTIME_ROOT}/core/providers/dnnl/symbols.def") - else() -@@ -728,11 +728,11 @@ if (onnxruntime_USE_TENSORRT) - - if(APPLE) - set_property(TARGET onnxruntime_providers_tensorrt APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker -exported_symbols_list ${ONNXRUNTIME_ROOT}/core/providers/tensorrt/exported_symbols.lst") -- target_link_libraries(onnxruntime_providers_tensorrt PRIVATE nsync_cpp) -+ target_link_libraries(onnxruntime_providers_tensorrt PRIVATE nsync::nsync_cpp) - elseif(UNIX) - set_property(TARGET onnxruntime_providers_tensorrt APPEND_STRING PROPERTY COMPILE_FLAGS "-Wno-deprecated-declarations") - set_property(TARGET onnxruntime_providers_tensorrt APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker --version-script=${ONNXRUNTIME_ROOT}/core/providers/tensorrt/version_script.lds -Xlinker --gc-sections") -- target_link_libraries(onnxruntime_providers_tensorrt PRIVATE nsync_cpp stdc++fs) -+ target_link_libraries(onnxruntime_providers_tensorrt PRIVATE nsync::nsync_cpp stdc++fs) - elseif(WIN32) - set_property(TARGET onnxruntime_providers_tensorrt APPEND_STRING PROPERTY LINK_FLAGS "-DEF:${ONNXRUNTIME_ROOT}/core/providers/tensorrt/symbols.def") - else() -@@ -1224,7 +1224,7 @@ if (onnxruntime_USE_MIGRAPHX) - target_compile_options(onnxruntime_providers_migraphx PRIVATE -Wno-error=sign-compare) - set_property(TARGET onnxruntime_providers_migraphx APPEND_STRING PROPERTY COMPILE_FLAGS "-Wno-deprecated-declarations") - set_property(TARGET onnxruntime_providers_migraphx APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker --version-script=${ONNXRUNTIME_ROOT}/core/providers/migraphx/version_script.lds -Xlinker --gc-sections") -- target_link_libraries(onnxruntime_providers_migraphx PRIVATE nsync_cpp stdc++fs) -+ target_link_libraries(onnxruntime_providers_migraphx PRIVATE nsync::nsync_cpp stdc++fs) - - include(CheckLibraryExists) - check_library_exists(migraphx::c "migraphx_program_run_async" "/opt/rocm/migraphx/lib" HAS_STREAM_SYNC) -@@ -1461,7 +1461,7 @@ if (onnxruntime_USE_ROCM) - - if(UNIX) - set_property(TARGET onnxruntime_providers_rocm APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker --version-script=${ONNXRUNTIME_ROOT}/core/providers/rocm/version_script.lds -Xlinker --gc-sections") -- target_link_libraries(onnxruntime_providers_rocm PRIVATE nsync_cpp) -+ target_link_libraries(onnxruntime_providers_rocm PRIVATE nsync::nsync_cpp) - else() - message(FATAL_ERROR "onnxruntime_providers_rocm unknown platform, need to specify shared library exports for it") - endif() -@@ -1597,7 +1597,7 @@ if (onnxruntime_USE_CANN) - onnxruntime_add_include_to_target(onnxruntime_providers_cann onnxruntime_common onnxruntime_framework onnx onnx_proto ${PROTOBUF_LIB} flatbuffers::flatbuffers Boost::mp11 safeint_interface) - - add_dependencies(onnxruntime_providers_cann onnxruntime_providers_shared ${onnxruntime_EXTERNAL_DEPENDENCIES}) -- target_link_libraries(onnxruntime_providers_cann PRIVATE ascendcl acl_op_compiler fmk_onnx_parser nsync_cpp ${ABSEIL_LIBS} ${ONNXRUNTIME_PROVIDERS_SHARED}) -+ target_link_libraries(onnxruntime_providers_cann PRIVATE ascendcl acl_op_compiler fmk_onnx_parser nsync::nsync_cpp ${ABSEIL_LIBS} ${ONNXRUNTIME_PROVIDERS_SHARED}) - target_link_directories(onnxruntime_providers_cann PRIVATE ${onnxruntime_CANN_HOME}/lib64) - target_include_directories(onnxruntime_providers_cann PRIVATE ${ONNXRUNTIME_ROOT} ${CMAKE_CURRENT_BINARY_DIR} ${eigen_INCLUDE_DIRS} ${onnxruntime_CANN_HOME} ${onnxruntime_CANN_HOME}/include) - -@@ -1619,7 +1619,7 @@ if (onnxruntime_USE_AZURE) - source_group(TREE ${ONNXRUNTIME_ROOT}/core FILES ${onnxruntime_providers_azure_src}) - onnxruntime_add_static_library(onnxruntime_providers_azure ${onnxruntime_providers_azure_src}) - add_dependencies(onnxruntime_providers_azure ${onnxruntime_EXTERNAL_DEPENDENCIES}) -- onnxruntime_add_include_to_target(onnxruntime_providers_azure onnxruntime_common onnxruntime_framework onnx onnx_proto ${PROTOBUF_LIB} flatbuffers Boost::mp11) -+ onnxruntime_add_include_to_target(onnxruntime_providers_azure onnxruntime_common onnxruntime_framework onnx onnx_proto ${PROTOBUF_LIB} flatbuffers::flatbuffers Boost::mp11) - target_link_libraries(onnxruntime_providers_azure PRIVATE onnx onnxruntime_common onnxruntime_framework) - set_target_properties(onnxruntime_providers_azure PROPERTIES FOLDER "ONNXRuntime") - set_target_properties(onnxruntime_providers_azure PROPERTIES LINKER_LANGUAGE CXX) ---- a/cmake/onnxruntime_unittests.cmake -+++ b/cmake/onnxruntime_unittests.cmake -@@ -631,8 +631,8 @@ if(MSVC) - "$<$>:/wd6326>") - else() - target_compile_definitions(onnxruntime_test_utils PUBLIC -DNSYNC_ATOMIC_CPP11) -- target_include_directories(onnxruntime_test_utils PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT} -- ${nsync_SOURCE_DIR}/public) -+ target_include_directories(onnxruntime_test_utils PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT}) -+ onnxruntime_add_include_to_target(onnxruntime_test_utils nsync::nsync_cpp) - endif() - if (onnxruntime_USE_NCCL) - target_include_directories(onnxruntime_test_utils PRIVATE ${NCCL_INCLUDE_DIRS}) -@@ -665,8 +665,8 @@ if(MSVC) - "$<$>:/utf-8>") - else() - target_compile_definitions(onnx_test_runner_common PUBLIC -DNSYNC_ATOMIC_CPP11) -- target_include_directories(onnx_test_runner_common PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT} -- ${nsync_SOURCE_DIR}/public) -+ target_include_directories(onnx_test_runner_common PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT}) -+ onnxruntime_add_include_to_target(onnx_test_runner_common nsync::nsync_cpp) - endif() - if (MSVC AND NOT CMAKE_SIZEOF_VOID_P EQUAL 8) - #TODO: fix the warnings, they are dangerous -@@ -995,7 +995,7 @@ if (NOT onnxruntime_ENABLE_TRAINING_TORCH_INTEROP) - # "Global initializer calls a non-constexpr function." BENCHMARK_CAPTURE macro needs this. - target_compile_options(onnxruntime_mlas_benchmark PRIVATE /wd26426) - else() -- target_link_libraries(onnxruntime_mlas_benchmark PRIVATE nsync_cpp ${CMAKE_DL_LIBS}) -+ target_link_libraries(onnxruntime_mlas_benchmark PRIVATE nsync::nsync_cpp ${CMAKE_DL_LIBS}) - endif() - if (CPUINFO_SUPPORTED AND NOT onnxruntime_BUILD_WEBASSEMBLY) - target_link_libraries(onnxruntime_mlas_benchmark PRIVATE cpuinfo) -@@ -1053,7 +1053,7 @@ if(onnxruntime_ENABLE_EAGER_MODE) - list(APPEND onnxruntime_eager_mode_libs onnxruntime_training tensorboard) - endif() - IF(NOT WIN32) -- list(APPEND onnxruntime_eager_mode_libs nsync_cpp) -+ list(APPEND onnxruntime_eager_mode_libs nsync::nsync_cpp) - endif() - target_link_libraries(onnxruntime_eager_mode_test PRIVATE ${onnxruntime_eager_mode_libs} Threads::Threads ${onnxruntime_EXTERNAL_LIBRARIES}) - if (onnxruntime_ENABLE_TRAINING_TORCH_INTEROP) -@@ -1113,7 +1113,7 @@ if (NOT onnxruntime_ENABLE_TRAINING_TORCH_INTEROP) - ${onnxruntime_EXTERNAL_LIBRARIES} - ${GETOPT_LIB_WIDE} ${SYS_PATH_LIB} ${CMAKE_DL_LIBS}) - if(NOT WIN32) -- list(APPEND onnxruntime_perf_test_libs nsync_cpp) -+ list(APPEND onnxruntime_perf_test_libs nsync::nsync_cpp) - if(onnxruntime_USE_SNPE) - list(APPEND onnxruntime_perf_test_libs onnxruntime_providers_snpe) - endif() -@@ -1157,7 +1157,7 @@ if (NOT onnxruntime_ENABLE_TRAINING_TORCH_INTEROP) - # test inference using shared lib - set(onnxruntime_shared_lib_test_LIBS onnxruntime_mocked_allocator onnxruntime_test_utils onnxruntime_common onnx_proto) - if(NOT WIN32) -- list(APPEND onnxruntime_shared_lib_test_LIBS nsync_cpp) -+ list(APPEND onnxruntime_shared_lib_test_LIBS nsync::nsync_cpp) - if(onnxruntime_USE_SNPE) - list(APPEND onnxruntime_shared_lib_test_LIBS onnxruntime_providers_snpe) - endif() -@@ -1279,7 +1279,7 @@ if (NOT onnxruntime_ENABLE_TRAINING_TORCH_INTEROP) - target_link_libraries(onnxruntime_mlas_test PRIVATE cpuinfo) - endif() - if(NOT WIN32) -- target_link_libraries(onnxruntime_mlas_test PRIVATE nsync_cpp ${CMAKE_DL_LIBS}) -+ target_link_libraries(onnxruntime_mlas_test PRIVATE nsync::nsync_cpp ${CMAKE_DL_LIBS}) - endif() - if (CMAKE_SYSTEM_NAME STREQUAL "Android") - target_link_libraries(onnxruntime_mlas_test PRIVATE ${android_shared_libs}) ---- a/cmake/onnxruntime_webassembly.cmake -+++ b/cmake/onnxruntime_webassembly.cmake -@@ -97,7 +97,7 @@ target_compile_options(onnx PRIVATE -Wno-unused-parameter -Wno-unused-variable) - - if (onnxruntime_BUILD_WEBASSEMBLY_STATIC_LIB) - bundle_static_library(onnxruntime_webassembly -- nsync_cpp -+ nsync::nsync_cpp - ${PROTOBUF_LIB} - onnx - onnx_proto -@@ -172,7 +172,7 @@ else() - endif() - - target_link_libraries(onnxruntime_webassembly PRIVATE -- nsync_cpp -+ nsync::nsync_cpp - ${PROTOBUF_LIB} - onnx - onnx_proto diff --git a/recipes/onnxruntime/all/patches/1.14.1-0002-cmake-dependencies.patch b/recipes/onnxruntime/all/patches/1.14.1-0002-cmake-dependencies.patch deleted file mode 100644 index 6dbbfc4af9df4..0000000000000 --- a/recipes/onnxruntime/all/patches/1.14.1-0002-cmake-dependencies.patch +++ /dev/null @@ -1,166 +0,0 @@ -diff --git a/cmake/external/abseil-cpp.cmake b/cmake/external/abseil-cpp.cmake -index 54d2f9c5c1..3195ef15a0 100644 ---- a/cmake/external/abseil-cpp.cmake -+++ b/cmake/external/abseil-cpp.cmake -@@ -22,6 +22,7 @@ FetchContent_Declare( - URL ${DEP_URL_abseil_cpp} - URL_HASH SHA1=${DEP_SHA1_abseil_cpp} - PATCH_COMMAND ${ABSL_PATCH_COMMAND} -+ FIND_PACKAGE_ARGS REQUIRED CONFIG NAMES absl - ) - - onnxruntime_fetchcontent_makeavailable(abseil_cpp) -diff --git a/cmake/external/eigen.cmake b/cmake/external/eigen.cmake -index 266dd534af..3c7cb77891 100644 ---- a/cmake/external/eigen.cmake -+++ b/cmake/external/eigen.cmake -@@ -14,8 +14,11 @@ else () - FetchContent_Declare( - eigen - URL https://gitlab.com/libeigen/eigen/-/archive/d10b27fe37736d2944630ecd7557cefa95cf87c9/eigen-d10b27fe37736d2944630ecd7557cefa95cf87c9.zip -+ FIND_PACKAGE_ARGS REQUIRED CONFIG NAMES Eigen3 - ) - endif() -- FetchContent_Populate(eigen) -- set(eigen_INCLUDE_DIRS "${eigen_SOURCE_DIR}") -+ # FetchContent_Populate(eigen) -+ # set(eigen_INCLUDE_DIRS "${eigen_SOURCE_DIR}") -+ onnxruntime_fetchcontent_makeavailable(eigen) -+ get_target_property(eigen_INCLUDE_DIRS Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES) - endif() -diff --git a/cmake/external/onnxruntime_external_deps.cmake b/cmake/external/onnxruntime_external_deps.cmake -index f85336e8bb..b051ff0be1 100644 ---- a/cmake/external/onnxruntime_external_deps.cmake -+++ b/cmake/external/onnxruntime_external_deps.cmake -@@ -97,7 +97,7 @@ FetchContent_Declare( - flatbuffers - URL ${DEP_URL_flatbuffers} - URL_HASH SHA1=${DEP_SHA1_flatbuffers} -- FIND_PACKAGE_ARGS 1.12.0...<2.0.0 NAMES Flatbuffers -+ FIND_PACKAGE_ARGS NAMES flatbuffers - ) - - #Here we support two build mode: -@@ -136,6 +136,7 @@ FetchContent_Declare( - date - URL ${DEP_URL_date} - URL_HASH SHA1=${DEP_SHA1_date} -+ FIND_PACKAGE_ARGS NAMES date - ) - onnxruntime_fetchcontent_makeavailable(date) - -@@ -145,6 +146,7 @@ FetchContent_Declare( - mp11 - URL ${DEP_URL_mp11} - URL_HASH SHA1=${DEP_SHA1_mp11} -+ FIND_PACKAGE_ARGS NAMES Boost - ) - - set(JSON_BuildTests OFF CACHE INTERNAL "") -@@ -263,6 +265,7 @@ FetchContent_Declare( - safeint - URL ${DEP_URL_safeint} - URL_HASH SHA1=${DEP_SHA1_safeint} -+ FIND_PACKAGE_ARGS NAMES safeint - ) - - # The next line will generate an error message "fatal: not a git repository", but it is ok. It is from flatbuffers -@@ -359,6 +362,7 @@ FetchContent_Declare( - URL ${DEP_URL_onnx} - URL_HASH SHA1=${DEP_SHA1_onnx} - PATCH_COMMAND ${ONNXRUNTIME_ONNX_PATCH_COMMAND} -+ FIND_PACKAGE_ARGS NAMES onnx ONNX - ) - - -@@ -386,8 +390,6 @@ endif() - set(GSL_TARGET "Microsoft.GSL::GSL") - set(GSL_INCLUDE_DIR "$") - --add_library(safeint_interface INTERFACE) --target_include_directories(safeint_interface INTERFACE ${safeint_SOURCE_DIR}) - - # XNNPACK EP - if (onnxruntime_USE_XNNPACK) -@@ -416,9 +418,9 @@ set(onnxruntime_EXTERNAL_LIBRARIES ${onnxruntime_EXTERNAL_LIBRARIES_XNNPACK} WIL - # The other libs do not have the problem. All the sources are already there. We can compile them in any order. - set(onnxruntime_EXTERNAL_DEPENDENCIES onnx_proto flatbuffers::flatbuffers) - --target_compile_definitions(onnx PUBLIC $ PRIVATE "__ONNX_DISABLE_STATIC_REGISTRATION") -+# target_compile_definitions(onnx PUBLIC $ PRIVATE "__ONNX_DISABLE_STATIC_REGISTRATION") - if (NOT onnxruntime_USE_FULL_PROTOBUF) -- target_compile_definitions(onnx PUBLIC "__ONNX_NO_DOC_STRINGS") -+ # target_compile_definitions(onnx PUBLIC "__ONNX_NO_DOC_STRINGS") - endif() - - if (onnxruntime_RUN_ONNX_TESTS) -diff --git a/cmake/external/wil.cmake b/cmake/external/wil.cmake -index d38535c4a1..8b181871f9 100644 ---- a/cmake/external/wil.cmake -+++ b/cmake/external/wil.cmake -@@ -11,12 +11,18 @@ FetchContent_Declare( - ) - #We can not use FetchContent_MakeAvailable(microsoft_wil) at here, since their cmake file - #always executes install command without conditions. --FetchContent_Populate(microsoft_wil) --if(NOT wil_FOUND) -+#FetchContent_Populate(microsoft_wil) -+#if(NOT wil_FOUND) -+# add_library(WIL INTERFACE) -+# add_library(WIL::WIL ALIAS WIL) -+# -+# # The interface's include directory. -+# target_include_directories(WIL INTERFACE -+# $) -+#endif() -+if(WIN32) -+ FetchContent_MakeAvailable(microsoft_wil) -+else() - add_library(WIL INTERFACE) - add_library(WIL::WIL ALIAS WIL) -- -- # The interface's include directory. -- target_include_directories(WIL INTERFACE -- $) --endif() -\ No newline at end of file -+endif() -diff --git a/cmake/external/xnnpack.cmake b/cmake/external/xnnpack.cmake -index 1fc2c6ccdc..a2c28957f9 100644 ---- a/cmake/external/xnnpack.cmake -+++ b/cmake/external/xnnpack.cmake -@@ -25,12 +25,15 @@ set(FXDIV_SOURCE_DIR ${fxdiv_SOURCE_DIR}) - - FetchContent_Declare(pthreadpool URL ${DEP_URL_pthreadpool} URL_HASH SHA1=${DEP_SHA1_pthreadpool}) - onnxruntime_fetchcontent_makeavailable(pthreadpool) --FetchContent_Declare(googlexnnpack URL ${DEP_URL_googlexnnpack} URL_HASH SHA1=${DEP_SHA1_googlexnnpack} --PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/xnnpack/AddEmscriptenAndIosSupport.patch) -+FetchContent_Declare( -+ googlexnnpack -+ URL ${DEP_URL_googlexnnpack} -+ URL_HASH SHA1=${DEP_SHA1_googlexnnpack} -+ PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/xnnpack/AddEmscriptenAndIosSupport.patch -+ FIND_PACKAGE_ARGS NAMES xnnpack -+) - - onnxruntime_fetchcontent_makeavailable(googlexnnpack) --set(XNNPACK_DIR ${googlexnnpack_SOURCE_DIR}) --set(XNNPACK_INCLUDE_DIR ${XNNPACK_DIR}/include) - - set(onnxruntime_EXTERNAL_LIBRARIES_XNNPACK XNNPACK pthreadpool) - -diff --git a/cmake/onnxruntime_providers.cmake b/cmake/onnxruntime_providers.cmake -index 7a99bac233..bbf1955494 100644 ---- a/cmake/onnxruntime_providers.cmake -+++ b/cmake/onnxruntime_providers.cmake -@@ -1561,10 +1561,6 @@ if (onnxruntime_USE_XNNPACK) - add_dependencies(onnxruntime_providers_xnnpack onnx ${onnxruntime_EXTERNAL_DEPENDENCIES}) - set_target_properties(onnxruntime_providers_xnnpack PROPERTIES FOLDER "ONNXRuntime") - -- install(DIRECTORY ${ONNXRUNTIME_INCLUDE_DIR}/core/providers/xnnpack -- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/onnxruntime/core/providers -- ) -- - set_target_properties(onnxruntime_providers_xnnpack PROPERTIES LINKER_LANGUAGE CXX) - - if (NOT onnxruntime_BUILD_SHARED_LIB) diff --git a/recipes/onnxruntime/all/patches/1.15.1-0001-cmake-dependencies.patch b/recipes/onnxruntime/all/patches/1.15.1-0001-cmake-dependencies.patch deleted file mode 100644 index 4ebc87b3a4ddc..0000000000000 --- a/recipes/onnxruntime/all/patches/1.15.1-0001-cmake-dependencies.patch +++ /dev/null @@ -1,150 +0,0 @@ -diff --git a/cmake/external/abseil-cpp.cmake b/cmake/external/abseil-cpp.cmake -index 54d2f9c5c1..3195ef15a0 100644 ---- a/cmake/external/abseil-cpp.cmake -+++ b/cmake/external/abseil-cpp.cmake -@@ -22,6 +22,7 @@ FetchContent_Declare( - URL ${DEP_URL_abseil_cpp} - URL_HASH SHA1=${DEP_SHA1_abseil_cpp} - PATCH_COMMAND ${ABSL_PATCH_COMMAND} -+ FIND_PACKAGE_ARGS REQUIRED CONFIG NAMES absl - ) - - onnxruntime_fetchcontent_makeavailable(abseil_cpp) -diff --git a/cmake/external/eigen.cmake b/cmake/external/eigen.cmake -index 266dd534af..12b1792862 100644 ---- a/cmake/external/eigen.cmake -+++ b/cmake/external/eigen.cmake -@@ -14,8 +14,9 @@ else () - FetchContent_Declare( - eigen - URL https://gitlab.com/libeigen/eigen/-/archive/d10b27fe37736d2944630ecd7557cefa95cf87c9/eigen-d10b27fe37736d2944630ecd7557cefa95cf87c9.zip -+ FIND_PACKAGE_ARGS REQUIRED CONFIG NAMES Eigen3 - ) - endif() -- FetchContent_Populate(eigen) -- set(eigen_INCLUDE_DIRS "${eigen_SOURCE_DIR}") -+ onnxruntime_fetchcontent_makeavailable(eigen) -+ get_target_property(eigen_INCLUDE_DIRS Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES) - endif() -diff --git a/cmake/external/onnxruntime_external_deps.cmake b/cmake/external/onnxruntime_external_deps.cmake -index 9effd1a2db..a059c28e36 100644 ---- a/cmake/external/onnxruntime_external_deps.cmake -+++ b/cmake/external/onnxruntime_external_deps.cmake -@@ -173,6 +173,7 @@ FetchContent_Declare( - date - URL ${DEP_URL_date} - URL_HASH SHA1=${DEP_SHA1_date} -+ FIND_PACKAGE_ARGS NAMES date - ) - onnxruntime_fetchcontent_makeavailable(date) - -@@ -182,6 +183,7 @@ FetchContent_Declare( - mp11 - URL ${DEP_URL_mp11} - URL_HASH SHA1=${DEP_SHA1_mp11} -+ FIND_PACKAGE_ARGS NAMES Boost - ) - - set(JSON_BuildTests OFF CACHE INTERNAL "") -@@ -300,6 +302,7 @@ FetchContent_Declare( - safeint - URL ${DEP_URL_safeint} - URL_HASH SHA1=${DEP_SHA1_safeint} -+ FIND_PACKAGE_ARGS NAMES safeint - ) - - # The next line will generate an error message "fatal: not a git repository", but it is ok. It is from flatbuffers -@@ -396,6 +399,7 @@ FetchContent_Declare( - URL ${DEP_URL_onnx} - URL_HASH SHA1=${DEP_SHA1_onnx} - PATCH_COMMAND ${ONNXRUNTIME_ONNX_PATCH_COMMAND} -+ FIND_PACKAGE_ARGS NAMES onnx ONNX - ) - - -@@ -423,9 +427,6 @@ endif() - set(GSL_TARGET "Microsoft.GSL::GSL") - set(GSL_INCLUDE_DIR "$") - --add_library(safeint_interface INTERFACE) --target_include_directories(safeint_interface INTERFACE ${safeint_SOURCE_DIR}) -- - # XNNPACK EP - if (onnxruntime_USE_XNNPACK) - if (onnxruntime_DISABLE_CONTRIB_OPS) -@@ -453,9 +454,9 @@ set(onnxruntime_EXTERNAL_LIBRARIES ${onnxruntime_EXTERNAL_LIBRARIES_XNNPACK} WIL - # The other libs do not have the problem. All the sources are already there. We can compile them in any order. - set(onnxruntime_EXTERNAL_DEPENDENCIES onnx_proto flatbuffers::flatbuffers) - --target_compile_definitions(onnx PUBLIC $ PRIVATE "__ONNX_DISABLE_STATIC_REGISTRATION") -+# target_compile_definitions(onnx PUBLIC $ PRIVATE "__ONNX_DISABLE_STATIC_REGISTRATION") - if (NOT onnxruntime_USE_FULL_PROTOBUF) -- target_compile_definitions(onnx PUBLIC "__ONNX_NO_DOC_STRINGS") -+ # target_compile_definitions(onnx PUBLIC "__ONNX_NO_DOC_STRINGS") - endif() - - if (onnxruntime_RUN_ONNX_TESTS) -diff --git a/cmake/external/wil.cmake b/cmake/external/wil.cmake -index d38535c4a1..02d6dbd85d 100644 ---- a/cmake/external/wil.cmake -+++ b/cmake/external/wil.cmake -@@ -9,14 +9,10 @@ FetchContent_Declare( - URL_HASH SHA1=${DEP_SHA1_microsoft_wil} - FIND_PACKAGE_ARGS NAMES wil - ) --#We can not use FetchContent_MakeAvailable(microsoft_wil) at here, since their cmake file --#always executes install command without conditions. --FetchContent_Populate(microsoft_wil) --if(NOT wil_FOUND) -+ -+if(WIN32) -+ FetchContent_MakeAvailable(microsoft_wil) -+else() - add_library(WIL INTERFACE) - add_library(WIL::WIL ALIAS WIL) -- -- # The interface's include directory. -- target_include_directories(WIL INTERFACE -- $) --endif() -\ No newline at end of file -+endif() -diff --git a/cmake/external/xnnpack.cmake b/cmake/external/xnnpack.cmake -index 1fc2c6ccdc..a2c28957f9 100644 ---- a/cmake/external/xnnpack.cmake -+++ b/cmake/external/xnnpack.cmake -@@ -25,12 +25,15 @@ set(FXDIV_SOURCE_DIR ${fxdiv_SOURCE_DIR}) - - FetchContent_Declare(pthreadpool URL ${DEP_URL_pthreadpool} URL_HASH SHA1=${DEP_SHA1_pthreadpool}) - onnxruntime_fetchcontent_makeavailable(pthreadpool) --FetchContent_Declare(googlexnnpack URL ${DEP_URL_googlexnnpack} URL_HASH SHA1=${DEP_SHA1_googlexnnpack} --PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/xnnpack/AddEmscriptenAndIosSupport.patch) -+FetchContent_Declare( -+ googlexnnpack -+ URL ${DEP_URL_googlexnnpack} -+ URL_HASH SHA1=${DEP_SHA1_googlexnnpack} -+ PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/xnnpack/AddEmscriptenAndIosSupport.patch -+ FIND_PACKAGE_ARGS NAMES xnnpack -+) - - onnxruntime_fetchcontent_makeavailable(googlexnnpack) --set(XNNPACK_DIR ${googlexnnpack_SOURCE_DIR}) --set(XNNPACK_INCLUDE_DIR ${XNNPACK_DIR}/include) - - set(onnxruntime_EXTERNAL_LIBRARIES_XNNPACK XNNPACK pthreadpool) - -diff --git a/cmake/onnxruntime_providers.cmake b/cmake/onnxruntime_providers.cmake -index 0daa1b8a3d..1f25467a8c 100644 ---- a/cmake/onnxruntime_providers.cmake -+++ b/cmake/onnxruntime_providers.cmake -@@ -1711,10 +1711,6 @@ if (onnxruntime_USE_XNNPACK) - add_dependencies(onnxruntime_providers_xnnpack onnx ${onnxruntime_EXTERNAL_DEPENDENCIES}) - set_target_properties(onnxruntime_providers_xnnpack PROPERTIES FOLDER "ONNXRuntime") - -- install(DIRECTORY ${ONNXRUNTIME_INCLUDE_DIR}/core/providers/xnnpack -- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/onnxruntime/core/providers -- ) -- - set_target_properties(onnxruntime_providers_xnnpack PROPERTIES LINKER_LANGUAGE CXX) - - if (NOT onnxruntime_BUILD_SHARED_LIB) diff --git a/recipes/onnxruntime/all/patches/1.15.1-0002-fix-attention-15983.patch b/recipes/onnxruntime/all/patches/1.15.1-0002-fix-attention-15983.patch new file mode 100644 index 0000000000000..512fe43577ad8 --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.15.1-0002-fix-attention-15983.patch @@ -0,0 +1,11 @@ +--- a/onnxruntime/contrib_ops/cuda/bert/attention.cc ++++ b/onnxruntime/contrib_ops/cuda/bert/attention.cc +@@ -164,7 +164,7 @@ + has_memory_efficient_attention(sm, sizeof(T) == 2); + #else + constexpr bool use_memory_efficient_attention = false; +- ORT_UNUSED_VARIABLE(is_mask_1d_key_seq_len_start); ++ ORT_UNUSED_PARAMETER(is_mask_1d_key_seq_len_start); + #endif + + cublasHandle_t cublas = GetCublasHandle(context); diff --git a/recipes/onnxruntime/all/patches/1.16.0-0001-cmake-dependencies.patch b/recipes/onnxruntime/all/patches/1.16.0-0001-cmake-dependencies.patch deleted file mode 100644 index dacb2b9b27a86..0000000000000 --- a/recipes/onnxruntime/all/patches/1.16.0-0001-cmake-dependencies.patch +++ /dev/null @@ -1,129 +0,0 @@ -From a30759bc61768883302290d34efd6d0a5e09dc9f Mon Sep 17 00:00:00 2001 -From: mayeut -Date: Thu, 21 Sep 2023 23:20:46 +0200 -Subject: [PATCH] CMake: ensure conan dependencies are used - ---- - cmake/external/eigen.cmake | 5 +++-- - cmake/external/onnxruntime_external_deps.cmake | 15 ++++++++------- - cmake/external/xnnpack.cmake | 11 +++++++---- - cmake/onnxruntime_mlas.cmake | 2 +- - 4 files changed, 19 insertions(+), 14 deletions(-) - -diff --git a/cmake/external/eigen.cmake b/cmake/external/eigen.cmake -index c0f7ddc50e..a47de64cbd 100644 ---- a/cmake/external/eigen.cmake -+++ b/cmake/external/eigen.cmake -@@ -16,8 +16,9 @@ else () - eigen - URL ${DEP_URL_eigen} - URL_HASH SHA1=${DEP_SHA1_eigen} -+ FIND_PACKAGE_ARGS REQUIRED CONFIG NAMES Eigen3 - ) - endif() -- FetchContent_Populate(eigen) -- set(eigen_INCLUDE_DIRS "${eigen_SOURCE_DIR}") -+ onnxruntime_fetchcontent_makeavailable(eigen) -+ get_target_property(eigen_INCLUDE_DIRS Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES) - endif() -diff --git a/cmake/external/onnxruntime_external_deps.cmake b/cmake/external/onnxruntime_external_deps.cmake -index 8e412c7847..0e2482d7de 100644 ---- a/cmake/external/onnxruntime_external_deps.cmake -+++ b/cmake/external/onnxruntime_external_deps.cmake -@@ -187,6 +187,7 @@ FetchContent_Declare( - date - URL ${DEP_URL_date} - URL_HASH SHA1=${DEP_SHA1_date} -+ FIND_PACKAGE_ARGS NAMES date - ) - onnxruntime_fetchcontent_makeavailable(date) - -@@ -196,6 +197,7 @@ FetchContent_Declare( - mp11 - URL ${DEP_URL_mp11} - URL_HASH SHA1=${DEP_SHA1_mp11} -+ FIND_PACKAGE_ARGS NAMES Boost - ) - - set(JSON_BuildTests OFF CACHE INTERNAL "") -@@ -314,6 +316,7 @@ FetchContent_Declare( - safeint - URL ${DEP_URL_safeint} - URL_HASH SHA1=${DEP_SHA1_safeint} -+ FIND_PACKAGE_ARGS NAMES safeint - ) - - # The next line will generate an error message "fatal: not a git repository", but it is ok. It is from flatbuffers -@@ -410,6 +413,7 @@ FetchContent_Declare( - URL ${DEP_URL_onnx} - URL_HASH SHA1=${DEP_SHA1_onnx} - PATCH_COMMAND ${ONNXRUNTIME_ONNX_PATCH_COMMAND} -+ FIND_PACKAGE_ARGS NAMES ONNX - ) - - -@@ -437,9 +441,6 @@ endif() - set(GSL_TARGET "Microsoft.GSL::GSL") - set(GSL_INCLUDE_DIR "$") - --add_library(safeint_interface INTERFACE) --target_include_directories(safeint_interface INTERFACE ${safeint_SOURCE_DIR}) -- - # XNNPACK EP - if (onnxruntime_USE_XNNPACK) - if (onnxruntime_DISABLE_CONTRIB_OPS) -@@ -467,10 +468,10 @@ set(onnxruntime_EXTERNAL_LIBRARIES ${onnxruntime_EXTERNAL_LIBRARIES_XNNPACK} ${W - # The other libs do not have the problem. All the sources are already there. We can compile them in any order. - set(onnxruntime_EXTERNAL_DEPENDENCIES onnx_proto flatbuffers::flatbuffers) - --target_compile_definitions(onnx PUBLIC $ PRIVATE "__ONNX_DISABLE_STATIC_REGISTRATION") --if (NOT onnxruntime_USE_FULL_PROTOBUF) -- target_compile_definitions(onnx PUBLIC "__ONNX_NO_DOC_STRINGS") --endif() -+# target_compile_definitions(onnx PUBLIC $ PRIVATE "__ONNX_DISABLE_STATIC_REGISTRATION") -+# if (NOT onnxruntime_USE_FULL_PROTOBUF) -+# target_compile_definitions(onnx PUBLIC "__ONNX_NO_DOC_STRINGS") -+# endif() - - if (onnxruntime_RUN_ONNX_TESTS) - add_definitions(-DORT_RUN_EXTERNAL_ONNX_TESTS) -diff --git a/cmake/external/xnnpack.cmake b/cmake/external/xnnpack.cmake -index 7455584f1a..85d8177f45 100644 ---- a/cmake/external/xnnpack.cmake -+++ b/cmake/external/xnnpack.cmake -@@ -25,12 +25,15 @@ set(FXDIV_SOURCE_DIR ${fxdiv_SOURCE_DIR}) - - FetchContent_Declare(pthreadpool URL ${DEP_URL_pthreadpool} URL_HASH SHA1=${DEP_SHA1_pthreadpool}) - onnxruntime_fetchcontent_makeavailable(pthreadpool) --FetchContent_Declare(googlexnnpack URL ${DEP_URL_googlexnnpack} URL_HASH SHA1=${DEP_SHA1_googlexnnpack} --PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/xnnpack/AddEmscriptenAndIosSupport.patch) -+FetchContent_Declare( -+ googlexnnpack -+ URL ${DEP_URL_googlexnnpack} -+ URL_HASH SHA1=${DEP_SHA1_googlexnnpack} -+ PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/xnnpack/AddEmscriptenAndIosSupport.patch -+ FIND_PACKAGE_ARGS NAMES xnnpack -+) - - onnxruntime_fetchcontent_makeavailable(googlexnnpack) --set(XNNPACK_DIR ${googlexnnpack_SOURCE_DIR}) --set(XNNPACK_INCLUDE_DIR ${XNNPACK_DIR}/include) - - set(onnxruntime_EXTERNAL_LIBRARIES_XNNPACK XNNPACK pthreadpool) - -diff --git a/cmake/onnxruntime_mlas.cmake b/cmake/onnxruntime_mlas.cmake -index e0ccc504d7..819ffba884 100644 ---- a/cmake/onnxruntime_mlas.cmake -+++ b/cmake/onnxruntime_mlas.cmake -@@ -609,7 +609,7 @@ if (NOT onnxruntime_ORT_MINIMAL_BUILD) - - target_link_libraries(onnxruntime_mlas_q4dq PRIVATE ${ONNXRUNTIME_MLAS_LIBS} onnxruntime_common) - if (CPUINFO_SUPPORTED AND NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") -- target_link_libraries(onnxruntime_mlas_q4dq PRIVATE cpuinfo) -+ target_link_libraries(onnxruntime_mlas_q4dq PRIVATE cpuinfo::cpuinfo) - endif() - if(NOT WIN32) - target_link_libraries(onnxruntime_mlas_q4dq PRIVATE nsync::nsync_cpp ${CMAKE_DL_LIBS}) --- -2.39.2 (Apple Git-143) - diff --git a/recipes/onnxruntime/all/patches/1.17.3-0001-patch-macos-cpp20-date-compat.patch b/recipes/onnxruntime/all/patches/1.17.3-0001-patch-macos-cpp20-date-compat.patch new file mode 100644 index 0000000000000..4f206c34e7538 --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.17.3-0001-patch-macos-cpp20-date-compat.patch @@ -0,0 +1,142 @@ +From 7303a90f4916dcf6f66236d40b8917344c27420a Mon Sep 17 00:00:00 2001 +From: Andrew Fantino <15876180+afantino951@users.noreply.github.com> +Date: Tue, 2 Apr 2024 22:10:25 -0700 +Subject: [PATCH] Fix build errors from date/date.h C++20 compatibility + (#20139) + +### Description +For C++ standards >= 20, use `std::chrono::operator<<` in place of +`date::operator<<` to fix ambiguous operator compile error. + +### Motivation and Context +The external dependency HowardHinnant/date has a conflict with +std::chrono for >=C++20. +Solves #20137 +--- + cmake/onnxruntime_common.cmake | 2 +- + include/onnxruntime/core/common/logging/logging.h | 11 +++++++++++ + onnxruntime/core/common/logging/sinks/ostream_sink.cc | 3 +-- + .../core/platform/apple/logging/apple_log_sink.mm | 2 +- + onnxruntime/test/common/logging/helpers.h | 3 +-- + onnxruntime/test/util/include/test/capturing_sink.h | 4 +--- + 6 files changed, 16 insertions(+), 9 deletions(-) + +diff --git a/cmake/onnxruntime_common.cmake b/cmake/onnxruntime_common.cmake +index fb56e3f3445d..69d8f5fa138c 100644 +--- a/cmake/onnxruntime_common.cmake ++++ b/cmake/onnxruntime_common.cmake +@@ -129,7 +129,7 @@ target_include_directories(onnxruntime_common + ${OPTIONAL_LITE_INCLUDE_DIR}) + + +-target_link_libraries(onnxruntime_common PUBLIC safeint_interface ${GSL_TARGET} ${ABSEIL_LIBS}) ++target_link_libraries(onnxruntime_common PUBLIC safeint_interface ${GSL_TARGET} ${ABSEIL_LIBS} date::date) + + add_dependencies(onnxruntime_common ${onnxruntime_EXTERNAL_DEPENDENCIES}) + +diff --git a/include/onnxruntime/core/common/logging/logging.h b/include/onnxruntime/core/common/logging/logging.h +index 2b9912ea7738..f62053a5e44a 100644 +--- a/include/onnxruntime/core/common/logging/logging.h ++++ b/include/onnxruntime/core/common/logging/logging.h +@@ -18,6 +18,8 @@ + + #include "core/common/logging/macros.h" + ++#include "date/date.h" ++ + /* + + Logging overview and expected usage: +@@ -56,6 +58,15 @@ namespace logging { + + using Timestamp = std::chrono::time_point; + ++// TODO: When other compilers support std::chrono::operator<<, update this. ++// TODO: Check support for other compilers' version before enable C++20 for other compilers. ++// Xcode added support for C++20's std::chrono::operator<< in SDK version 14.4. ++#if __cplusplus >= 202002L && __MAC_OS_X_VERSION_MAX_ALLOWED >= 140400L ++namespace timestamp_ns = std::chrono; ++#else ++namespace timestamp_ns = ::date; ++#endif ++ + #ifndef NDEBUG + ORT_ATTRIBUTE_UNUSED static bool vlog_enabled = true; // Set directly based on your needs. + #else +diff --git a/onnxruntime/core/common/logging/sinks/ostream_sink.cc b/onnxruntime/core/common/logging/sinks/ostream_sink.cc +index 0db3d8709d48..a120138d1d15 100644 +--- a/onnxruntime/core/common/logging/sinks/ostream_sink.cc ++++ b/onnxruntime/core/common/logging/sinks/ostream_sink.cc +@@ -2,7 +2,6 @@ + // Licensed under the MIT License. + + #include "core/common/logging/sinks/ostream_sink.h" +-#include "date/date.h" + + namespace onnxruntime { + namespace logging { +@@ -24,7 +23,7 @@ struct Color { + + void OStreamSink::SendImpl(const Timestamp& timestamp, const std::string& logger_id, const Capture& message) { + // operator for formatting of timestamp in ISO8601 format including microseconds +- using date::operator<<; ++ using timestamp_ns::operator<<; + + // Two options as there may be multiple calls attempting to write to the same sink at once: + // 1) Use mutex to synchronize access to the stream. +diff --git a/onnxruntime/core/platform/apple/logging/apple_log_sink.mm b/onnxruntime/core/platform/apple/logging/apple_log_sink.mm +index 8dbd8eecd0e7..78614ffd2819 100644 +--- a/onnxruntime/core/platform/apple/logging/apple_log_sink.mm ++++ b/onnxruntime/core/platform/apple/logging/apple_log_sink.mm +@@ -13,7 +13,7 @@ + namespace logging { + + void AppleLogSink::SendImpl(const Timestamp& timestamp, const std::string& logger_id, const Capture& message) { +- using date::operator<<; ++ using timestamp_ns::operator<<; + std::ostringstream msg; + msg << timestamp << " [" << message.SeverityPrefix() << ":" << message.Category() << ":" << logger_id << ", " + << message.Location().ToString() << "] " << message.Message(); +diff --git a/onnxruntime/test/common/logging/helpers.h b/onnxruntime/test/common/logging/helpers.h +index c8d027022850..7fd03b72e53a 100644 +--- a/onnxruntime/test/common/logging/helpers.h ++++ b/onnxruntime/test/common/logging/helpers.h +@@ -5,7 +5,6 @@ + + #include + +-#include "date/date.h" + #include "gmock/gmock.h" + #include "gtest/gtest.h" + +@@ -30,7 +29,7 @@ class MockSink : public ::onnxruntime::logging::ISink { + #endif + + ACTION(PrintArgs) { +- using date::operator<<; ++ using onnxruntime::logging::timestamp_ns::operator<<; + + // const Timestamp ×tamp, const std::string &logger_id, const Message &message + // arg0 arg1 arg2 +diff --git a/onnxruntime/test/util/include/test/capturing_sink.h b/onnxruntime/test/util/include/test/capturing_sink.h +index 39788947602d..7d978d1bd1e5 100644 +--- a/onnxruntime/test/util/include/test/capturing_sink.h ++++ b/onnxruntime/test/util/include/test/capturing_sink.h +@@ -6,8 +6,6 @@ + #include "core/common/logging/logging.h" + #include "core/common/logging/isink.h" + +-#include "date/date.h" +- + namespace onnxruntime { + namespace test { + +@@ -17,7 +15,7 @@ class CapturingSink : public logging::ISink { + public: + void SendImpl(const Timestamp& timestamp, const std::string& logger_id, const Capture& message) override { + // operator for formatting of timestamp in ISO8601 format including microseconds +- using date::operator<<; ++ using timestamp_ns::operator<<; + std::ostringstream msg; + + msg << timestamp << " [" << message.SeverityPrefix() << ":" << message.Category() << ":" << logger_id << ", " diff --git a/recipes/onnxruntime/all/patches/1.17.3-0002-missing-include.patch b/recipes/onnxruntime/all/patches/1.17.3-0002-missing-include.patch new file mode 100644 index 0000000000000..d3555681e4af9 --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.17.3-0002-missing-include.patch @@ -0,0 +1,12 @@ +diff --git a/include/onnxruntime/core/graph/graph.h b/include/onnxruntime/core/graph/graph.h +index 22827d43b2..f9e5fd56d3 100644 +--- a/include/onnxruntime/core/graph/graph.h ++++ b/include/onnxruntime/core/graph/graph.h +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/recipes/onnxruntime/all/patches/1.17.3-0003-fix-cutlass-cuda-provider.patch b/recipes/onnxruntime/all/patches/1.17.3-0003-fix-cutlass-cuda-provider.patch new file mode 100644 index 0000000000000..8ea3d51071e51 --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.17.3-0003-fix-cutlass-cuda-provider.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/onnxruntime_providers_cuda.cmake b/cmake/onnxruntime_providers_cuda.cmake +index b5c3100865..129c4f19f6 100644 +--- a/cmake/onnxruntime_providers_cuda.cmake ++++ b/cmake/onnxruntime_providers_cuda.cmake +@@ -180,8 +180,8 @@ + target_link_libraries(${target} PRIVATE CUDA::cuda_driver) + endif() + +- include(cutlass) +- target_include_directories(${target} PRIVATE ${cutlass_SOURCE_DIR}/include ${cutlass_SOURCE_DIR}/examples) ++ find_package(NvidiaCutlass) ++ target_link_libraries(${target} PRIVATE nvidia::cutlass::cutlass) + + target_include_directories(${target} PRIVATE ${ONNXRUNTIME_ROOT} ${CMAKE_CURRENT_BINARY_DIR} ${eigen_INCLUDE_DIRS} ${TVM_INCLUDES} + PUBLIC ${CUDAToolkit_INCLUDE_DIRS}) diff --git a/recipes/onnxruntime/all/patches/1.18.0-0004-abseil-no-string-view.patch b/recipes/onnxruntime/all/patches/1.18.0-0004-abseil-no-string-view.patch new file mode 100644 index 0000000000000..329024e7245ef --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.18.0-0004-abseil-no-string-view.patch @@ -0,0 +1,22 @@ +--- a/onnxruntime/core/framework/kernel_type_str_resolver.cc ++++ b/onnxruntime/core/framework/kernel_type_str_resolver.cc +@@ -46,7 +46,7 @@ + ORT_RETURN_IF(op_it == op_kernel_type_str_map_.end(), "Failed to find op_id: ", op_id); + const auto& type_str_map = op_it->second; + +-#ifdef DISABLE_ABSEIL ++#ifndef ABSL_USES_STD_STRING_VIEW + // TODO(edgchen1) maybe we can use transparent hash/eq to enable lookup with string_view + const auto type_str_it = type_str_map.find(std::string(kernel_type_str)); + #else +--- a/onnxruntime/core/framework/ort_value_name_idx_map.h ++++ b/onnxruntime/core/framework/ort_value_name_idx_map.h +@@ -33,7 +33,7 @@ class OrtValueNameIdxMap { + common::Status GetIdx(std::string_view name, int& idx) const { + idx = -1; + +-#ifdef DISABLE_ABSEIL ++#ifndef ABSL_USES_STD_STRING_VIEW + auto it = map_.find(std::string(name)); + #else + auto it = map_.find(name); diff --git a/recipes/onnxruntime/all/patches/1.18.1-0005-fix-cutlass-cuda-provider.patch b/recipes/onnxruntime/all/patches/1.18.1-0005-fix-cutlass-cuda-provider.patch new file mode 100644 index 0000000000000..3024bfb1f7bb6 --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.18.1-0005-fix-cutlass-cuda-provider.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/onnxruntime_providers_cuda.cmake b/cmake/onnxruntime_providers_cuda.cmake +index 1346a9ce96..f40661d4bd 100644 +--- a/cmake/onnxruntime_providers_cuda.cmake ++++ b/cmake/onnxruntime_providers_cuda.cmake +@@ -211,8 +211,8 @@ + target_link_libraries(${target} PRIVATE CUDA::cuda_driver) + endif() + +- include(cutlass) +- target_include_directories(${target} PRIVATE ${cutlass_SOURCE_DIR}/include ${cutlass_SOURCE_DIR}/examples ${cutlass_SOURCE_DIR}/tools/util/include) ++ find_package(NvidiaCutlass) ++ target_link_libraries(${target} PRIVATE nvidia::cutlass::cutlass) + + target_include_directories(${target} PRIVATE ${ONNXRUNTIME_ROOT} ${CMAKE_CURRENT_BINARY_DIR} ${eigen_INCLUDE_DIRS} ${TVM_INCLUDES} + PUBLIC ${CUDAToolkit_INCLUDE_DIRS}) diff --git a/recipes/onnxruntime/all/test_package/CMakeLists.txt b/recipes/onnxruntime/all/test_package/CMakeLists.txt index b5d8ccbfcd52c..483ebf5ead1ee 100644 --- a/recipes/onnxruntime/all/test_package/CMakeLists.txt +++ b/recipes/onnxruntime/all/test_package/CMakeLists.txt @@ -5,5 +5,8 @@ project(test_package CXX) find_package(onnxruntime REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) +if(WITH_CUDA) + target_compile_definitions(${PROJECT_NAME} PRIVATE WITH_CUDA) +endif() target_link_libraries(${PROJECT_NAME} PRIVATE onnxruntime::onnxruntime) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/onnxruntime/all/test_package/conanfile.py b/recipes/onnxruntime/all/test_package/conanfile.py index 18016812d8c7e..17284808fb050 100644 --- a/recipes/onnxruntime/all/test_package/conanfile.py +++ b/recipes/onnxruntime/all/test_package/conanfile.py @@ -1,13 +1,14 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain +from conan.tools.files import copy import os # It will become the standard on Conan 2.x class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + generators = "CMakeDeps", "VirtualRunEnv" test_type = "explicit" def requirements(self): @@ -15,6 +16,15 @@ def requirements(self): def layout(self): cmake_layout(self, src_folder=".") + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["WITH_CUDA"] = self.dependencies["onnxruntime"].options.with_cuda + tc.generate() + if self.settings.os == "Windows": + # on windows the system dll C:\WINDOWS\system32\onnxruntime.dll may be loaded instead even if the conan lib is first in the PATH, see https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order + for bindir in self.dependencies[self.tested_reference_str].cpp_info.bindirs: + copy(self, "*.dll", bindir, os.path.join(self.build_folder, str(self.settings.build_type))) def build(self): cmake = CMake(self) @@ -23,5 +33,5 @@ def build(self): def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") self.run(bin_path, env="conanrun") diff --git a/recipes/onnxruntime/all/test_package/test_package.cpp b/recipes/onnxruntime/all/test_package/test_package.cpp index a9cc6b11cef74..09281241c4ad8 100644 --- a/recipes/onnxruntime/all/test_package/test_package.cpp +++ b/recipes/onnxruntime/all/test_package/test_package.cpp @@ -2,8 +2,22 @@ #include #include +#ifdef WITH_CUDA +#include +#endif + int main() { const auto& api = Ort::GetApi(); - std::cout << OrtGetApiBase()->GetVersionString() << std::endl; + std::cout << "Version: " << OrtGetApiBase()->GetVersionString() << std::endl; + std::cout << "Providers: " << std::endl; + for(const auto& provider: Ort::GetAvailableProviders()) + std::cout << provider << ", " << std::endl; + +#ifdef WITH_CUDA + Ort::SessionOptions session_options; + OrtSessionOptionsAppendExecutionProvider_CUDA(session_options, 1); + std::cout << "with cuda!" << std::endl; +#endif + return 0; } diff --git a/recipes/onnxruntime/all/test_v1_package/CMakeLists.txt b/recipes/onnxruntime/all/test_v1_package/CMakeLists.txt index 0d20897301b68..691d35acd08dc 100644 --- a/recipes/onnxruntime/all/test_v1_package/CMakeLists.txt +++ b/recipes/onnxruntime/all/test_v1_package/CMakeLists.txt @@ -4,5 +4,19 @@ 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) +find_package(onnxruntime REQUIRED CONFIG) +add_executable(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/../test_package/test_package.cpp) +if(WITH_CUDA) + target_compile_definitions(${PROJECT_NAME} PRIVATE WITH_CUDA) +endif() + +target_link_libraries(${PROJECT_NAME} PRIVATE onnxruntime::onnxruntime) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) + +if(WIN32 AND DEFINED CONAN_BIN_DIRS_ONNXRUNTIME AND EXISTS ${CONAN_BIN_DIRS_ONNXRUNTIME}) + add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory + ${CONAN_BIN_DIRS_ONNXRUNTIME} + $ + ) +endif() diff --git a/recipes/onnxruntime/config.yml b/recipes/onnxruntime/config.yml index 7dfea6fd99cd4..497cb76cea1d7 100644 --- a/recipes/onnxruntime/config.yml +++ b/recipes/onnxruntime/config.yml @@ -1,11 +1,9 @@ versions: - "1.16.3": - folder: all - "1.16.2": + "1.18.1": folder: all - "1.16.1": + "1.17.3": folder: all - "1.16.0": + "1.16.3": folder: all "1.15.1": folder: all diff --git a/recipes/openapi-generator/all/conandata.yml b/recipes/openapi-generator/all/conandata.yml index d977cc57e49bd..94d684c5ba1bc 100644 --- a/recipes/openapi-generator/all/conandata.yml +++ b/recipes/openapi-generator/all/conandata.yml @@ -1,13 +1,13 @@ sources: + "7.8.0": + url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.8.0/openapi-generator-cli-7.8.0.jar" + sha256: "d1879cf42da31f8cf61cf68798b8ef2418af0c6bd93a5c1870e1ff543fbb9365" "7.5.0": url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.5.0/openapi-generator-cli-7.5.0.jar" sha256: "47ebbd1beddaf7dfbee523e7b87623c6ec1b1d42960fbe15f6cad2f6426c69bf" "7.4.0": url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.4.0/openapi-generator-cli-7.4.0.jar" sha256: "e42769a98fef5634bee0f921e4b90786a6b3292aa11fe8d2f84c045ac435ab29" - "7.3.0": - url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.3.0/openapi-generator-cli-7.3.0.jar" - sha256: "879c15340a75a19a7e720efc242c3223e0e4207b0694d6d1cea5c7dd87cf1cce" "6.6.0": url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.6.0/openapi-generator-cli-6.6.0.jar" sha256: "9718ff7844e89462c75dcd9b20a35136f6db257bfe1b874db1e3002e99de4609" diff --git a/recipes/openapi-generator/config.yml b/recipes/openapi-generator/config.yml index fd40653d9c013..f7485451c5674 100644 --- a/recipes/openapi-generator/config.yml +++ b/recipes/openapi-generator/config.yml @@ -1,9 +1,9 @@ versions: + "7.8.0": + folder: all "7.5.0": folder: all "7.4.0": folder: all - "7.3.0": - folder: all "6.6.0": folder: all diff --git a/recipes/opencv/4.x/conanfile.py b/recipes/opencv/4.x/conanfile.py index 04d8d1d48cfcc..491ff108378e7 100644 --- a/recipes/opencv/4.x/conanfile.py +++ b/recipes/opencv/4.x/conanfile.py @@ -191,15 +191,15 @@ class OpenCVConan(ConanFile): "with_jpeg": "libjpeg", "with_png": True, "with_tiff": True, - "with_jpeg2000": "jasper", + "with_jpeg2000": "openjpeg", "with_openexr": True, "with_webp": True, "with_gdal": False, "with_gdcm": False, - "with_imgcodec_hdr": False, - "with_imgcodec_pfm": False, - "with_imgcodec_pxm": False, - "with_imgcodec_sunraster": False, + "with_imgcodec_hdr": True, + "with_imgcodec_pfm": True, + "with_imgcodec_pxm": True, + "with_imgcodec_sunraster": True, "with_msmf": True, "with_msmf_dxva": True, # objdetect module options @@ -319,10 +319,13 @@ def config_options(self): else: del self.options.with_ffmpeg - if "arm" not in self.settings.arch: - del self.options.neon if not self._has_with_jpeg2000_option: del self.options.with_jpeg2000 + elif Version(self.version) < "4.3.0": + self.options.with_jpeg2000 = "jasper" + + if "arm" not in self.settings.arch: + del self.options.neon if not self._has_with_tiff_option: del self.options.with_tiff if not self._has_superres_option: @@ -1212,6 +1215,9 @@ def validate(self): raise ConanInvalidConfiguration( "viz module can't be enabled yet. It requires VTK which is not available in conan-center." ) + if self.options.get_safe("with_jpeg2000") == "openjpeg" and Version(self.version) < "4.3.0": + raise ConanInvalidConfiguration("openjpeg is not available for OpenCV before 4.3.0") + def build_requirements(self): if self.options.get_safe("with_protobuf"): diff --git a/recipes/openh264/all/conandata.yml b/recipes/openh264/all/conandata.yml index bae40a3d0b27c..952b7e0034b6e 100644 --- a/recipes/openh264/all/conandata.yml +++ b/recipes/openh264/all/conandata.yml @@ -8,38 +8,3 @@ sources: "2.1.1": url: "https://github.com/cisco/openh264/archive/v2.1.1.tar.gz" sha256: "af173e90fce65f80722fa894e1af0d6b07572292e76de7b65273df4c0a8be678" - "1.7.0": - url: "https://github.com/cisco/openh264/archive/v1.7.0.tar.gz" - sha256: "9c07c38d7de00046c9c52b12c76a2af7648b70d05bd5460c8b67f6895738653f" -patches: - "2.4.1": - - patch_file: "patches/2.4.1-0001-platform-android.mk.patch" - patch_description: "Android Fix" - patch_type: "portability" - "2.3.1": - - patch_file: "patches/2.3.1-0001-platform-android.mk.patch" - patch_description: "Android Fix" - patch_type: "portability" - - patch_file: "patches/2.3.1-0002-macos-relocatable-shared.patch" - patch_description: "Macos relocatable shared fix" - patch_type: "portability" - "2.1.1": - - patch_file: "patches/2.1.1-0001-platform-android.mk.patch" - patch_description: "Android Fix" - patch_type: "portability" - - patch_file: "patches/2.1.1-0002-macos-relocatable-shared.patch" - patch_description: "Macos relocatable shared fix" - patch_type: "portability" - - patch_file: "patches/1.7.0-0004-mingw-override-CC-CXX-AR-from-env.patch" - patch_description: "Mingw Override CC CXX AR from env Fix" - patch_type: "portability" - "1.7.0": - - patch_file: "patches/1.7.0-0001-platform-android.mk.patch" - patch_description: "Android Fix" - patch_type: "portability" - - patch_file: "patches/1.7.0-0002-macos-relocatable-shared.patch" - patch_description: "Macos relocatable shared fix" - patch_type: "portability" - - patch_file: "patches/1.7.0-0004-mingw-override-CC-CXX-AR-from-env.patch" - patch_description: "Mingw Override CC CXX AR from env Fix" - patch_type: "portability" diff --git a/recipes/openh264/all/conanfile.py b/recipes/openh264/all/conanfile.py index 00cb4e7604b28..5b20e84d4fa4c 100644 --- a/recipes/openh264/all/conanfile.py +++ b/recipes/openh264/all/conanfile.py @@ -1,16 +1,18 @@ from conan import ConanFile from conan.tools.build import stdcpp_library from conan.tools.env import VirtualBuildEnv -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, replace_in_file, chdir -from conan.tools.gnu import Autotools, AutotoolsToolchain -from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.files import copy, get, rmdir, rm, rename, replace_in_file from conan.tools.layout import basic_layout -from conan.tools.microsoft import check_min_vs, is_msvc, unix_path, msvc_runtime_flag +from conan.tools.microsoft import is_msvc +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.scm import Version +from conan.tools.meson import Meson, MesonToolchain +from conan.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.57.0" +required_conan_version = ">=1.54.0" class OpenH264Conan(ConanFile): @@ -31,16 +33,13 @@ class OpenH264Conan(ConanFile): "fPIC": True, } - @property - def _settings_build(self): - return getattr(self, "settings_build", self.settings) - @property def _is_clang_cl(self): return self.settings.os == 'Windows' and self.settings.compiler == 'clang' - def export_sources(self): - export_conandata_patches(self) + @property + def _preserve_dll_name(self): + return (is_msvc(self) or self._is_clang_cl) and Version(self.version) <= "2.4.1" and self.options.shared def config_options(self): if self.settings.os == "Windows": @@ -54,137 +53,80 @@ def layout(self): basic_layout(self, src_folder="src") def build_requirements(self): - if self.settings.arch in ("x86", "x86_64"): - self.tool_requires("nasm/2.15.05") - if self._settings_build.os == "Windows": - self.win_bash = True - if not self.conf.get("tools.microsoft.bash:path", default=False, check_type=str): - self.tool_requires("msys2/cci.latest") - if is_msvc(self): - self.tool_requires("automake/1.16.5") + self.tool_requires("meson/1.4.1") + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/2.2.0") + if self.settings.arch in ["x86", "x86_64"]: + self.tool_requires("nasm/2.16.01") + + def validate(self): + if Version(self.version) <= "2.1.1" and self.settings.os in ["Android", "Macos"]: + # INFO: ../src/meson.build:86:2: ERROR: Problem encountered: FIXME: Unhandled system android + # INFO: ../src/meson.build:86:2: ERROR: Problem encountered: FIXME: Unhandled system darwin + raise ConanInvalidConfiguration(f"{self.ref} does not support {self.settings.os}. Try a newer version.") def source(self): get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) - def _patch_sources(self): - if is_msvc(self): - replace_in_file(self, os.path.join(self.source_folder, "build", "platform-msvc.mk"), - "CFLAGS_OPT += -MT", - f"CFLAGS_OPT += -{msvc_runtime_flag(self)}") - replace_in_file(self, os.path.join(self.source_folder, "build", "platform-msvc.mk"), - "CFLAGS_DEBUG += -MTd -Gm", - f"CFLAGS_DEBUG += -{msvc_runtime_flag(self)} -Gm") - if self.settings.os == "Android": - replace_in_file(self, os.path.join(self.source_folder, "codec", "build", "android", "dec", "jni", "Application.mk"), - "APP_STL := stlport_shared", - f"APP_STL := {self.settings.compiler.libcxx}") - replace_in_file(self, os.path.join(self.source_folder, "codec", "build", "android", "dec", "jni", "Application.mk"), - "APP_PLATFORM := android-12", - f"APP_PLATFORM := {self._android_target}") - - @property - def _library_filename(self): - prefix = "" if (is_msvc(self) or self._is_clang_cl) else "lib" - if self.options.shared: - if is_apple_os(self): - suffix = ".dylib" - elif self.settings.os == "Windows": - suffix = ".dll" - else: - suffix = ".so" - else: - if is_msvc(self) or self._is_clang_cl: - suffix = ".lib" - else: - suffix = ".a" - return prefix + "openh264" + suffix - - @property - def _make_arch(self): - return { - "armv7": "arm", - "armv8": "arm64", - "x86": "i386", - }.get(str(self.settings.arch), str(self.settings.arch)) - - @property - def _android_target(self): - return f"android-{self.settings.os.api_level}" - - @property - def _make_args(self): - prefix = unix_path(self, os.path.abspath(self.package_folder)) - args = [ - f"ARCH={self._make_arch}", - f"PREFIX={prefix}" - ] - - if is_msvc(self) or self._is_clang_cl: - args.append("OS=msvc") - else: - if self.settings.os == "Windows": - args.append("OS=mingw_nt") - if self.settings.os == "Android": - libcxx = str(self.settings.compiler.libcxx) - stl_lib = f'$(NDKROOT)/sources/cxx-stl/llvm-libc++/libs/$(APP_ABI)/lib{"c++_static.a" if libcxx == "c++_static" else "c++_shared.so"}' \ - + "$(NDKROOT)/sources/cxx-stl/llvm-libc++/libs/$(APP_ABI)/libc++abi.a" - ndk_home = self.conf.get("tools.android:ndk_path") - args.extend([ - f"NDKLEVEL={self.settings.os.api_level}", - f"STL_LIB={stl_lib}", - "OS=android", - f"NDKROOT={ndk_home}", # not NDK_ROOT here - f"TARGET={self._android_target}", - "CCASFLAGS=$(CFLAGS) -fno-integrated-as", - ]) - - return args - def generate(self): env = VirtualBuildEnv(self) env.generate() - tc = AutotoolsToolchain(self) - tc.make_args.extend(self._make_args) - - if is_msvc(self): - tc.extra_cxxflags.append("-nologo") - if check_min_vs(self, "180", raise_invalid=False): - # https://github.com/conan-io/conan/issues/6514 - tc.extra_cxxflags.append("-FS") - # not needed during and after 2.3.1 - elif self.settings.compiler in ("apple-clang",): - if self.settings.arch in ("armv8",): - tc.extra_ldflags.append("-arch arm64") + tc = MesonToolchain(self) + tc.project_options["tests"] = "disabled" tc.generate() + def _patch_sources(self): + if self._preserve_dll_name: + # INFO: When generating with Meson, the library name is openh264-7.dll. This change preserves the old name openh264.dll + replace_in_file(self, os.path.join(self.source_folder, "meson.build"), "soversion: major_version,", "soversion: '',") + def build(self): - apply_conandata_patches(self) self._patch_sources() - autotools = Autotools(self) - with chdir(self, self.source_folder): - autotools.make(target=self._library_filename) + meson = Meson(self) + meson.configure() + meson.build() def package(self): - copy(self, pattern="LICENSE", dst=os.path.join( - self.package_folder, "licenses"), src=self.source_folder) - autotools = Autotools(self) - with chdir(self, self.source_folder): - autotools.make( - target=f'install-{"shared" if self.options.shared else "static-lib"}') + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + meson = Meson(self) + meson.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + # INFO: Version 2.1.1 installs both static and shared libraries using same target name + if Version(self.version) <= "2.1.1": + if self.options.shared: + rm(self, "*.a", os.path.join(self.package_folder, "lib")) + else: + rm(self, "*.so*", os.path.join(self.package_folder, "lib")) + rm(self, "*.dylib*", os.path.join(self.package_folder, "lib")) + rm(self, "*.dll", os.path.join(self.package_folder, "bin")) + rm(self, "openh264.lib", os.path.join(self.package_folder, "lib")) + + if is_msvc(self) or self._is_clang_cl: + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + if self._preserve_dll_name: + # INFO: Preserve same old library name as when building with Make on Windows but using Meson + rename(self, os.path.join(self.package_folder, "lib", "openh264.lib"), + os.path.join(self.package_folder, "lib", "openh264_dll.lib")) + else: + rename(self, os.path.join(self.package_folder, "lib", "libopenh264.a"), + os.path.join(self.package_folder, "lib", "openh264.lib")) fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.set_property("pkg_config_name", "openh264") - suffix = "_dll" if ( - is_msvc(self) or self._is_clang_cl) and self.options.shared else "" + suffix = "_dll" if self._preserve_dll_name else "" self.cpp_info.libs = [f"openh264{suffix}"] if self.settings.os in ("FreeBSD", "Linux"): self.cpp_info.system_libs.extend(["m", "pthread"]) if self.settings.os == "Android": self.cpp_info.system_libs.append("m") - libcxx = stdcpp_library(self) - if libcxx: - self.cpp_info.system_libs.append(libcxx) + if not self.options.shared: + libcxx = stdcpp_library(self) + if libcxx: + if self.settings.os == "Android" and libcxx == "c++_static": + # INFO: When builing for Android, need to link against c++abi too. Otherwise will get linkage errors: + # ld.lld: error: undefined symbol: operator new(unsigned long) + # >>> referenced by welsEncoderExt.cpp + self.cpp_info.system_libs.append("c++abi") + self.cpp_info.system_libs.append(libcxx) diff --git a/recipes/openh264/all/patches/1.7.0-0001-platform-android.mk.patch b/recipes/openh264/all/patches/1.7.0-0001-platform-android.mk.patch deleted file mode 100644 index 512d9a7cdfe3f..0000000000000 --- a/recipes/openh264/all/patches/1.7.0-0001-platform-android.mk.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- build/platform-android.mk -+++ build/platform-android.mk -@@ -38,23 +38,12 @@ - - TOOLCHAINPREFIX = $(shell NDK_PROJECT_PATH=$(SRC_PATH)/codec/build/android/dec make --no-print-dir -f $(NDKROOT)/build/core/build-local.mk DUMP_TOOLCHAIN_PREFIX APP_ABI=$(APP_ABI)) - --SYSROOT = $(NDKROOT)/platforms/android-$(NDKLEVEL)/arch-$(ARCH) --CXX = $(TOOLCHAINPREFIX)g++ --CC = $(TOOLCHAINPREFIX)gcc --AR = $(TOOLCHAINPREFIX)ar --CFLAGS += -DANDROID_NDK -fpic --sysroot=$(SYSROOT) -MMD -MP -+CFLAGS += -DANDROID_NDK -fpic -MMD -MP - CXXFLAGS += -fno-rtti -fno-exceptions --LDFLAGS += --sysroot=$(SYSROOT) - SHLDFLAGS = -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,-soname,lib$(PROJECT_NAME).so - --ifneq ($(CXX),$(wildcard $(CXX))) --ifneq ($(CXX).exe,$(wildcard $(CXX).exe)) --$(error Compiler not found, bad NDKROOT or ARCH?) --endif --endif -- - STL_INCLUDES = \ -- -I$(NDKROOT)/sources/cxx-stl/stlport/stlport -+ -I$(NDKROOT)/sources/cxx-stl/llvm-libc++/include - STL_LIB = \ - $(NDKROOT)/sources/cxx-stl/stlport/libs/$(APP_ABI)/libstlport_static.a - diff --git a/recipes/openh264/all/patches/1.7.0-0002-macos-relocatable-shared.patch b/recipes/openh264/all/patches/1.7.0-0002-macos-relocatable-shared.patch deleted file mode 100644 index dc10d42f2255e..0000000000000 --- a/recipes/openh264/all/patches/1.7.0-0002-macos-relocatable-shared.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/build/platform-darwin.mk -+++ b/build/platform-darwin.mk -@@ -7,7 +7,7 @@ CURRENT_VERSION := 1.7.0 - COMPATIBILITY_VERSION := 1.7.0 - SHLDFLAGS = -dynamiclib -twolevel_namespace -undefined dynamic_lookup \ - -fno-common -headerpad_max_install_names -install_name \ -- $(SHAREDLIB_DIR)/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) -+ @rpath/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) - SHARED = -dynamiclib - SHARED += -current_version $(CURRENT_VERSION) -compatibility_version $(COMPATIBILITY_VERSION) - CFLAGS += -Wall -fPIC -MMD -MP diff --git a/recipes/openh264/all/patches/1.7.0-0004-mingw-override-CC-CXX-AR-from-env.patch b/recipes/openh264/all/patches/1.7.0-0004-mingw-override-CC-CXX-AR-from-env.patch deleted file mode 100644 index fd092924362ea..0000000000000 --- a/recipes/openh264/all/patches/1.7.0-0004-mingw-override-CC-CXX-AR-from-env.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- build/platform-mingw_nt.mk -+++ build/platform-mingw_nt.mk -@@ -13,3 +13,3 @@ --CC = x86_64-w64-mingw32-gcc --CXX = x86_64-w64-mingw32-g++ --AR = x86_64-w64-mingw32-ar -+CC ?= x86_64-w64-mingw32-gcc -+CXX ?= x86_64-w64-mingw32-g++ -+AR ?= x86_64-w64-mingw32-ar diff --git a/recipes/openh264/all/patches/2.1.1-0001-platform-android.mk.patch b/recipes/openh264/all/patches/2.1.1-0001-platform-android.mk.patch deleted file mode 100644 index 2fbaccb65a3c9..0000000000000 --- a/recipes/openh264/all/patches/2.1.1-0001-platform-android.mk.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- build/platform-android.mk -+++ build/platform-android.mk -@@ -40,14 +40,9 @@ - TOOLCHAIN_NAME = $(shell NDK_TOOLCHAIN_VERSION= NDK_PROJECT_PATH=$(SRC_PATH)/codec/build/android/dec make --no-print-dir -f $(NDKROOT)/build/core/build-local.mk DUMP_TOOLCHAIN_NAME APP_ABI=$(APP_ABI)) - GCC_TOOLCHAIN_PATH = $(shell dirname $(TOOLCHAINPREFIX) | xargs dirname ) - --SYSROOT = $(NDKROOT)/platforms/android-$(NDKLEVEL)/arch-$(ARCH) --CXX = $(TOOLCHAINPREFIX)g++ --CC = $(TOOLCHAINPREFIX)gcc --AR = $(TOOLCHAINPREFIX)ar --CFLAGS += -DANDROID_NDK -fpic --sysroot=$(SYSROOT) -MMD -MP -fstack-protector-all -+CFLAGS += -DANDROID_NDK -fpic -MMD -MP -fstack-protector-all - CFLAGS += -isystem $(NDKROOT)/sysroot/usr/include -isystem $(NDKROOT)/sysroot/usr/include/$(TOOLCHAIN_NAME) -D__ANDROID_API__=$(NDKLEVEL) - CXXFLAGS += -fno-rtti -fno-exceptions --LDFLAGS += --sysroot=$(SYSROOT) - SHLDFLAGS = -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,-soname,lib$(PROJECT_NAME).so - UTSHLDFLAGS = -Wl,-soname,libut.so - diff --git a/recipes/openh264/all/patches/2.1.1-0002-macos-relocatable-shared.patch b/recipes/openh264/all/patches/2.1.1-0002-macos-relocatable-shared.patch deleted file mode 100644 index ae1867902a4ea..0000000000000 --- a/recipes/openh264/all/patches/2.1.1-0002-macos-relocatable-shared.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/build/platform-darwin.mk -+++ b/build/platform-darwin.mk -@@ -7,7 +7,7 @@ CURRENT_VERSION := 2.1.1 - COMPATIBILITY_VERSION := 2.1.0 - SHLDFLAGS = -dynamiclib -twolevel_namespace -undefined dynamic_lookup \ - -fno-common -headerpad_max_install_names -install_name \ -- $(SHAREDLIB_DIR)/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) -+ @rpath/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) - SHARED = -dynamiclib - SHARED += -current_version $(CURRENT_VERSION) -compatibility_version $(COMPATIBILITY_VERSION) - CFLAGS += -Wall -fPIC -MMD -MP -fstack-protector-all diff --git a/recipes/openh264/all/patches/2.3.1-0001-platform-android.mk.patch b/recipes/openh264/all/patches/2.3.1-0001-platform-android.mk.patch deleted file mode 100644 index 7b4564ae8dded..0000000000000 --- a/recipes/openh264/all/patches/2.3.1-0001-platform-android.mk.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- build/platform-android.mk -+++ build/platform-android.mk -@@ -40,14 +40,9 @@ - TOOLCHAIN_NAME = $(shell NDK_TOOLCHAIN_VERSION= NDK_PROJECT_PATH=$(SRC_PATH)/codec/build/android/dec make --no-print-dir -f $(NDKROOT)/build/core/build-local.mk DUMP_TOOLCHAIN_NAME APP_ABI=$(APP_ABI)) - GCC_TOOLCHAIN_PATH = $(shell dirname $(TOOLCHAINPREFIX) | xargs dirname ) - --SYSROOT = $(NDKROOT)/platforms/android-$(NDKLEVEL)/arch-$(ARCH) --CXX = $(TOOLCHAINPREFIX)g++ --CC = $(TOOLCHAINPREFIX)gcc --AR = $(TOOLCHAINPREFIX)ar --CFLAGS += -DANDROID_NDK -fpic --sysroot=$(SYSROOT) -MMD -MP -+CFLAGS += -DANDROID_NDK -fpic -MMD -MP - ifeq ($(USE_STACK_PROTECTOR), Yes) - CFLAGS += -fstack-protector-all - endif - CFLAGS += -isystem $(NDKROOT)/sysroot/usr/include -isystem $(NDKROOT)/sysroot/usr/include/$(TOOLCHAIN_NAME) -D__ANDROID_API__=$(NDKLEVEL) - CXXFLAGS += -fno-rtti -fno-exceptions --LDFLAGS += --sysroot=$(SYSROOT) - SHLDFLAGS = -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,-soname,lib$(PROJECT_NAME).so - UTSHLDFLAGS = -Wl,-soname,libut.so - diff --git a/recipes/openh264/all/patches/2.3.1-0002-macos-relocatable-shared.patch b/recipes/openh264/all/patches/2.3.1-0002-macos-relocatable-shared.patch deleted file mode 100644 index 7b9b27ea4570a..0000000000000 --- a/recipes/openh264/all/patches/2.3.1-0002-macos-relocatable-shared.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/build/platform-darwin.mk -+++ b/build/platform-darwin.mk -@@ -7,7 +7,7 @@ CURRENT_VERSION := 2.3.1 - COMPATIBILITY_VERSION := 2.3.1 - SHLDFLAGS = -dynamiclib -twolevel_namespace -undefined dynamic_lookup \ - -fno-common -headerpad_max_install_names -install_name \ -- $(SHAREDLIB_DIR)/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) -+ @rpath/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) - SHARED = -dynamiclib - SHARED += -current_version $(CURRENT_VERSION) -compatibility_version $(COMPATIBILITY_VERSION) - CFLAGS += -Wall -fPIC -MMD -MP -stdlib=libc++ diff --git a/recipes/openh264/all/patches/2.4.1-0001-platform-android.mk.patch b/recipes/openh264/all/patches/2.4.1-0001-platform-android.mk.patch deleted file mode 100644 index 36191dbc4b074..0000000000000 --- a/recipes/openh264/all/patches/2.4.1-0001-platform-android.mk.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/build/platform-darwin.mk b/build/platform-darwin.mk -index 4c7dac6..f15fdb9 100644 ---- a/build/platform-darwin.mk -+++ b/build/platform-darwin.mk -@@ -7,7 +7,7 @@ CURRENT_VERSION := 2.4.1 - COMPATIBILITY_VERSION := 2.4.0 - SHLDFLAGS = -dynamiclib -twolevel_namespace -undefined dynamic_lookup \ - -fno-common -headerpad_max_install_names -install_name \ -- $(SHAREDLIB_DIR)/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) -+ @rpath/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) - SHARED = -dynamiclib - SHARED += -current_version $(CURRENT_VERSION) -compatibility_version $(COMPATIBILITY_VERSION) - CFLAGS += -Wall -fPIC -MMD -MP diff --git a/recipes/openh264/all/test_package/conanfile.py b/recipes/openh264/all/test_package/conanfile.py index 1a1d9c4ff58f1..e845ae751a301 100644 --- a/recipes/openh264/all/test_package/conanfile.py +++ b/recipes/openh264/all/test_package/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.build import cross_building +from conan.tools.build import can_run from conan.tools.cmake import cmake_layout, CMake import os @@ -21,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not cross_building(self, skip_x64_x86=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/openh264/config.yml b/recipes/openh264/config.yml index 6c0919f84307e..db64052e6d83c 100644 --- a/recipes/openh264/config.yml +++ b/recipes/openh264/config.yml @@ -5,5 +5,3 @@ versions: folder: all "2.1.1": folder: all - "1.7.0": - folder: all diff --git a/recipes/openimageio/all/conandata.yml b/recipes/openimageio/all/conandata.yml index b5f547e360340..7a399cb02ec7e 100644 --- a/recipes/openimageio/all/conandata.yml +++ b/recipes/openimageio/all/conandata.yml @@ -17,6 +17,9 @@ sources: "2.5.13.1": url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.13.1.tar.gz" sha256: "0fbaec6c15215e11cf4545128c4d64eaa97b461cb9b5fb8a76f9a7d35c99e3df" + "2.5.14.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.14.0.tar.gz" + sha256: "0e74372c658f083820872311d126867f10d59b526a856672746de7b2c772034d" patches: "2.4.7.1": - patch_file: "patches/2.4.7.1-cmake-targets.patch" @@ -45,3 +48,7 @@ patches: - patch_file: "patches/2.5.12.0-cmake-targets.patch" patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" patch_type: "conan" + "2.5.14.0": + - patch_file: "patches/2.5.14.0-cmake-targets.patch" + patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" + patch_type: "conan" diff --git a/recipes/openimageio/all/conanfile.py b/recipes/openimageio/all/conanfile.py index 6794e7f732e57..9c644aaaec97b 100644 --- a/recipes/openimageio/all/conanfile.py +++ b/recipes/openimageio/all/conanfile.py @@ -120,7 +120,7 @@ def requirements(self): if self.options.with_raw: self.requires("libraw/0.21.2") if self.options.with_openjpeg: - self.requires("openjpeg/2.5.0") + self.requires("openjpeg/2.5.2") if self.options.with_openvdb: self.requires("openvdb/8.0.1") if self.options.with_ptex: diff --git a/recipes/openimageio/all/patches/2.5.14.0-cmake-targets.patch b/recipes/openimageio/all/patches/2.5.14.0-cmake-targets.patch new file mode 100644 index 0000000000000..859c8562899a5 --- /dev/null +++ b/recipes/openimageio/all/patches/2.5.14.0-cmake-targets.patch @@ -0,0 +1,521 @@ +diff --git CMakeLists.txt CMakeLists.txt +index 3ff009229..d38941db0 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -154,7 +154,7 @@ endif () + add_definitions (-DOIIO_INTERNAL=1) + + list (APPEND CMAKE_MODULE_PATH +- "${PROJECT_SOURCE_DIR}/src/cmake/modules" ++ #"${PROJECT_SOURCE_DIR}/src/cmake/modules" + "${PROJECT_SOURCE_DIR}/src/cmake") + + include (GNUInstallDirs) +@@ -233,7 +233,7 @@ if (OIIO_BUILD_TOOLS AND NOT BUILD_OIIOUTIL_ONLY) + add_subdirectory (src/iinfo) + add_subdirectory (src/maketx) + add_subdirectory (src/oiiotool) +- add_subdirectory (src/testtex) ++ #add_subdirectory (src/testtex) + add_subdirectory (src/iv) + endif () + +diff --git src/cmake/externalpackages.cmake src/cmake/externalpackages.cmake +index fe581e723..ab2fbb7f5 100644 +--- src/cmake/externalpackages.cmake ++++ src/cmake/externalpackages.cmake +@@ -48,14 +48,14 @@ if (NOT DEFINED Boost_USE_STATIC_LIBS) + set (Boost_USE_STATIC_LIBS "${LINKSTATIC}") + endif () + +-if (MSVC) +- # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: +- if (NOT Boost_USE_STATIC_LIBS) +- add_definitions (-DBOOST_ALL_DYN_LINK=1) +- endif () +-endif () +- +-set (Boost_COMPONENTS thread) ++#if (MSVC) ++# # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: ++# if (NOT Boost_USE_STATIC_LIBS) ++# add_definitions (-DBOOST_ALL_DYN_LINK=1) ++# endif () ++#endif () ++ ++set (Boost_COMPONENTS filesystem system thread container) + if (NOT USE_STD_FILESYSTEM) + list (APPEND Boost_COMPONENTS filesystem) + endif () +@@ -111,9 +111,9 @@ checked_find_package (OpenEXR REQUIRED + # building against Imath/OpenEXR 3.x when there is still a system-level + # install version of 2.x. + include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) +-if (MSVC AND NOT LINKSTATIC) +- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? +-endif () ++#if (MSVC AND NOT LINKSTATIC) ++# add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? ++#endif () + if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.0) + set (OIIO_USING_IMATH 3) + else () +@@ -140,11 +140,15 @@ set (OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH OFF CACHE BOOL + "Exclude find_dependency(Imath) from the exported OpenImageIOConfig.cmake") + + # JPEG -- prefer JPEG-Turbo to regular libjpeg +-checked_find_package (libjpeg-turbo +- VERSION_MIN 2.1 +- DEFINITIONS -DUSE_JPEG_TURBO=1) +-if (NOT TARGET libjpeg-turbo::jpeg) # Try to find the non-turbo version ++if (USE_JPEGTURBO) ++ checked_find_package (libjpeg-turbo REQUIRED ++ DEFINITIONS -DUSE_JPEG_TURBO=1 ++ PRINT libjpeg-turbo_INCLUDES libjpeg-turbo_LIBRARIES) ++ add_library(JPEG::JPEG ALIAS libjpeg-turbo::libjpeg-turbo) ++elseif (USE_JPEG) # Try to find the non-turbo version + checked_find_package (JPEG REQUIRED) ++else () ++ message(FATAL_ERROR "JPEG library was not found!") + endif () + + # Pugixml setup. Normally we just use the version bundled with oiio, but +@@ -160,7 +164,7 @@ else () + endif() + + # From pythonutils.cmake +-find_python() ++#find_python() + if (USE_PYTHON) + checked_find_package (pybind11 REQUIRED VERSION_MIN 2.4.2) + endif () +@@ -170,111 +174,107 @@ endif () + # Dependencies for optional formats and features. If these are not found, + # we will continue building, but the related functionality will be disabled. + +-checked_find_package (PNG) ++if (USE_LIBPNG) ++ checked_find_package (PNG REQUIRED) ++endif() + +-checked_find_package (BZip2) # Used by ffmpeg and freetype +-if (NOT BZIP2_FOUND) +- set (BZIP2_LIBRARIES "") # TODO: why does it break without this? +-endif () ++if (USE_FREETYPE) ++ checked_find_package (Freetype REQUIRED ++ DEFINITIONS -DUSE_FREETYPE=1 ) ++endif() + +-checked_find_package (Freetype +- DEFINITIONS -DUSE_FREETYPE=1 ) +- +-checked_find_package (OpenColorIO +- DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 +- # PREFER_CONFIG +- ) +-if (OpenColorIO_FOUND) +- option (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS +- "For deveoper debugging/testing ONLY! Disable OCIO 2.2 builtin configs." OFF) +- if (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS OR "$ENV{OIIO_DISABLE_BUILTIN_OCIO_CONFIGS}") +- add_compile_definitions(OIIO_DISABLE_BUILTIN_OCIO_CONFIGS) +- endif () +-else () +- set (OpenColorIO_FOUND 0) ++if (USE_OPENCOLORIO) ++ checked_find_package (OpenColorIO REQUIRED ++ DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 ++ # PREFER_CONFIG ++ ) + endif () + +-checked_find_package (OpenCV 3.0 +- DEFINITIONS -DUSE_OPENCV=1) ++if (USE_OPENCV) ++ checked_find_package (OpenCV REQUIRED 3.0 ++ DEFINITIONS -DUSE_OPENCV=1) ++endif() + + # Intel TBB +-set (TBB_USE_DEBUG_BUILD OFF) +-checked_find_package (TBB 2017 +- SETVARIABLES OIIO_TBB +- PREFER_CONFIG) ++if (USE_TBB)# Intel TBB ++ set (TBB_USE_DEBUG_BUILD OFF) ++ checked_find_package (TBB 2017 REQUIRED ++ SETVARIABLES OIIO_TBB ++ PREFER_CONFIG) ++endif() + + # DCMTK is used to read DICOM images +-checked_find_package (DCMTK VERSION_MIN 3.6.1 +- PREFER_CONFIG) ++if (USE_DCMTK) ++ checked_find_package (DCMTK REQUIRED VERSION_MIN 3.6.1) # For DICOM images ++endif() + +-checked_find_package (FFmpeg VERSION_MIN 3.0) +-checked_find_package (GIF +- VERSION_MIN 4 +- RECOMMEND_MIN 5.0 +- RECOMMEND_MIN_REASON "for stability and thread safety") ++if (USE_FFMPEG) ++ checked_find_package (ffmpeg REQUIRED VERSION_MIN 3.0) ++endif() ++if (USE_GIF) ++ checked_find_package (GIF REQUIRED ++ VERSION_MIN 4 ++ RECOMMEND_MIN 5.0 ++ RECOMMEND_MIN_REASON "for stability and thread safety") ++endif() + + # For HEIF/HEIC/AVIF formats +-checked_find_package (Libheif VERSION_MIN 1.3 +- RECOMMEND_MIN 1.16 +- RECOMMEND_MIN_REASON "for orientation support") +-if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) +- message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") +- set (Libheif_FOUND 0) +-endif () ++if (USE_LIBHEIF) ++ checked_find_package (libheif REQUIRED VERSION_MIN 1.3 ++ RECOMMEND_MIN 1.7 ++ RECOMMEND_MIN_REASON "for AVIF support") ++endif() + +-checked_find_package (LibRaw +- VERSION_MIN 0.18 +- PRINT LibRaw_r_LIBRARIES) +-if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) +- message (STATUS "${ColorYellow}WARNING When building for C++17, LibRaw should be 0.20 or higher (found ${LibRaw_VERSION}). You may get errors, depending on the compiler.${ColorReset}") +- # Currently, we issue the above warning and let them take their chances. +- # If we wish to disable the LibRaw<0.20/C++17 combination that may fail, +- # just uncomment the following two lines. +- # set (LibRaw_FOUND 0) +- # set (LIBRAW_FOUND 0) +-endif () ++if (USE_LIBRAW) ++ checked_find_package (LibRaw REQUIRED ++ RECOMMEND_MIN 0.18 ++ RECOMMEND_MIN_REASON "for ACES support and better camera metadata" ++ PRINT LibRaw_r_LIBRARIES) ++endif() + +-checked_find_package (OpenJPEG VERSION_MIN 2.0 +- RECOMMEND_MIN 2.2 +- RECOMMEND_MIN_REASON "for multithreading support") +-# Note: Recent OpenJPEG versions have exported cmake configs, but we don't +-# find them reliable at all, so we stick to our FindOpenJPEG.cmake module. +- +-checked_find_package (OpenVDB +- VERSION_MIN 5.0 +- DEPS TBB +- DEFINITIONS -DUSE_OPENVDB=1) +-if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 10.1 AND CMAKE_CXX_STANDARD VERSION_LESS 17) +- message (WARNING "${ColorYellow}OpenVDB >= 10.1 (we found ${OpenVDB_VERSION}) can only be used when we build with C++17 or higher. Disabling OpenVDB support.${ColorReset}") +- set (OpenVDB_FOUND 0) +- add_compile_definitions(DISABLE_OPENVDB=1) +-endif () ++if (USE_OPENJPEG) ++ checked_find_package (OpenJPEG REQUIRED ++ VERSION_MIN 2.0 ++ RECOMMEND_MIN 2.2 ++ RECOMMEND_MIN_REASON "for multithreading support") ++ # Note: Recent OpenJPEG versions have exported cmake configs, but we don't ++ # find them reliable at all, so we stick to our FindOpenJPEG.cmake module. ++endif() + +-checked_find_package (Ptex PREFER_CONFIG) +-if (NOT Ptex_FOUND OR NOT Ptex_VERSION) +- # Fallback for inadequate Ptex exported configs. This will eventually +- # disappear when we can 100% trust Ptex's exports. +- unset (Ptex_FOUND) +- checked_find_package (Ptex) +-endif () ++if (USE_OPENVDB) ++ checked_find_package (OpenVDB REQUIRED ++ VERSION_MIN 5.0 ++ DEPS TBB ++ DEFINITIONS -DUSE_OPENVDB=1) ++ # Upstream contains a version check to ensure that CXX 17 or newer is used with ++ # OpenVDB >= 10.1. This is ensured by the conanfile for openvdb ++endif() + +-checked_find_package (WebP) +-# Note: When WebP 1.1 (released late 2019) is our minimum, we can use their +-# exported configs and remove our FindWebP.cmake module. ++if (USE_PTEX) ++ checked_find_package (ptex REQUIRED PREFER_CONFIG) ++endif() ++ ++if (USE_LIBWEBP) ++ checked_find_package (WebP REQUIRED) ++endif() + + option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) +-checked_find_package (R3DSDK NO_RECORD_NOTFOUND) # RED camera ++if (USE_R3DSDK) ++ checked_find_package (R3DSDK REQUIRED) # RED camera ++endif () + + set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target") +-checked_find_package (Nuke NO_RECORD_NOTFOUND) ++if (USE_NUKE) ++ checked_find_package (Nuke REQUIRED) ++endif () + + + # Qt -- used for iv + option (USE_QT "Use Qt if found" ON) +-if (USE_QT) +- checked_find_package (OpenGL) # used for iv ++if (USE_OPENGL) ++ checked_find_package (OpenGL REQUIRED) # used for iv + endif () +-if (USE_QT AND OPENGL_FOUND) ++if (USE_QT AND USE_OPENGL) + checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets) + if (NOT Qt6_FOUND) + checked_find_package (Qt5 COMPONENTS Core Gui Widgets OpenGL) +@@ -298,13 +298,13 @@ macro (find_or_download_robin_map) + # for an installed version. Still prefer a copy that seems to be + # locally installed in this tree. + if (NOT BUILD_ROBINMAP_FORCE) +- find_package (Robinmap QUIET) ++ find_package (tsl-robin-map REQUIRED) + endif () + # If an external copy wasn't found and we requested that missing + # packages be built, or we we are forcing a local copy to be built, then + # download and build it. + # Download the headers from github +- if ((BUILD_MISSING_ROBINMAP AND NOT ROBINMAP_FOUND) OR BUILD_ROBINMAP_FORCE) ++ if ((BUILD_MISSING_ROBINMAP AND NOT tsl-robin-map_FOUND) OR BUILD_ROBINMAP_FORCE) + message (STATUS "Downloading local Tessil/robin-map") + set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map") + set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map") +@@ -322,7 +322,7 @@ macro (find_or_download_robin_map) + endif () + set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}/include") + endif () +- checked_find_package (Robinmap REQUIRED) ++ checked_find_package (tsl-robin-map REQUIRED) + endmacro() + + find_or_download_robin_map () +@@ -341,7 +341,7 @@ macro (find_or_download_fmt) + # for an installed version. Still prefer a copy that seems to be + # locally installed in this tree. + if (NOT BUILD_FMT_FORCE) +- find_package (fmt QUIET) ++ find_package (fmt REQUIRED) + endif () + # If an external copy wasn't found and we requested that missing + # packages be built, or we we are forcing a local copy to be built, then +@@ -376,7 +376,7 @@ macro (find_or_download_fmt) + set (fmt_VERSION "${FMT_VERSION_MAJOR}.${FMT_VERSION_MINOR}.${FMT_VERSION_PATCH}") + list (APPEND CFP_ALL_BUILD_DEPS_FOUND "${pkgname} ${${pkgname}_VERSION}") + else () +- get_target_property(FMT_INCLUDE_DIR fmt::fmt-header-only INTERFACE_INCLUDE_DIRECTORIES) ++ get_target_property(FMT_INCLUDE_DIR fmt::fmt INTERFACE_INCLUDE_DIRECTORIES) + set (OIIO_USING_FMT_LOCAL FALSE) + checked_find_package (fmt REQUIRED + VERSION_MIN 7.0) +diff --git src/ffmpeg.imageio/CMakeLists.txt src/ffmpeg.imageio/CMakeLists.txt +index 8e47a8443..900d23101 100644 +--- src/ffmpeg.imageio/CMakeLists.txt ++++ src/ffmpeg.imageio/CMakeLists.txt +@@ -2,7 +2,7 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (FFmpeg_FOUND) ++if (USE_FFMPEG) + if (LINKSTATIC) + set (_static_suffixes .lib .a) + set (_static_libraries_found 0) +@@ -26,11 +26,9 @@ if (FFmpeg_FOUND) + endif() + + add_oiio_plugin (ffmpeginput.cpp +- INCLUDE_DIRS ${FFMPEG_INCLUDES} +- LINK_LIBRARIES ${FFMPEG_LIBRARIES} +- ${BZIP2_LIBRARIES} ++ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale + DEFINITIONS "-DUSE_FFMPEG" +- "-DOIIO_FFMPEG_VERSION=\"${FFMPEG_VERSION}\"") ++ "-DOIIO_FFMPEG_VERSION=\"${ffmpeg_VERSION}\"") + else() + message (STATUS "FFmpeg not found: ffmpeg plugin will not be built") + endif() +diff --git src/heif.imageio/CMakeLists.txt src/heif.imageio/CMakeLists.txt +index 5b6c30a85..e5bc55ef1 100644 +--- src/heif.imageio/CMakeLists.txt ++++ src/heif.imageio/CMakeLists.txt +@@ -2,32 +2,31 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Libheif_FOUND) +- if (LINKSTATIC) +- set (_static_suffixes .lib .a) +- set (_static_libraries_found 0) ++if (USE_LIBHEIF) ++ # if (LINKSTATIC) ++ # set (_static_suffixes .lib .a) ++ # set (_static_libraries_found 0) + +- foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) +- get_filename_component (_ext ${_libeheif_library} LAST_EXT) +- list (FIND _static_suffixes ${_ext} _index) +- if (${_index} GREATER -1) +- MATH (EXPR _static_libraries_found "${static_libraries_found}+1") +- endif() +- endforeach() ++ # foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) ++ # get_filename_component (_ext ${_libeheif_library} LAST_EXT) ++ # list (FIND _static_suffixes ${_ext} _index) ++ # if (${_index} GREATER -1) ++ # MATH (EXPR _static_libraries_found "${static_libraries_found}+1") ++ # endif() ++ # endforeach() + +- if (${_static_libraries_found} GREATER 0) +- message (STATUS "${ColorYellow}") +- message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") +- message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") +- message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") +- message (STATUS "dynamically-linked libheif.") +- message ("${ColorReset}") +- endif() +- endif() ++ # if (${_static_libraries_found} GREATER 0) ++ # message (STATUS "${ColorYellow}") ++ # message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") ++ # message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") ++ # message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") ++ # message (STATUS "dynamically-linked libheif.") ++ # message ("${ColorReset}") ++ # endif() ++ # endif() + + add_oiio_plugin (heifinput.cpp heifoutput.cpp +- INCLUDE_DIRS ${LIBHEIF_INCLUDES} +- LINK_LIBRARIES ${LIBHEIF_LIBRARIES} ++ LINK_LIBRARIES libheif::heif + DEFINITIONS "-DUSE_HEIF=1") + else () + message (WARNING "heif plugin will not be built") +diff --git src/include/CMakeLists.txt src/include/CMakeLists.txt +index 18b7632a3..c558c4780 100644 +--- src/include/CMakeLists.txt ++++ src/include/CMakeLists.txt +@@ -64,7 +64,8 @@ install (FILES ${detail_headers} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/detail + COMPONENT developer) + +-if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) ++if (0) # Don't try to copy fmt libraries to target install folder ++ set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") + set (fmt_headers_base_names) + foreach (header_name core.h format-inl.h format.h ostream.h printf.h + std.h base.h chrono.h) +diff --git src/jpeg2000.imageio/CMakeLists.txt src/jpeg2000.imageio/CMakeLists.txt +index 560e8d486..24348fe66 100644 +--- src/jpeg2000.imageio/CMakeLists.txt ++++ src/jpeg2000.imageio/CMakeLists.txt +@@ -2,10 +2,9 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (OPENJPEG_FOUND) ++if (USE_OPENJPEG) + add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp +- INCLUDE_DIRS ${OPENJPEG_INCLUDES} +- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} ++ LINK_LIBRARIES openjp2 + DEFINITIONS "-DUSE_OPENJPEG") + else() + message (WARNING "Jpeg-2000 plugin will not be built") +diff --git src/libOpenImageIO/CMakeLists.txt src/libOpenImageIO/CMakeLists.txt +index aeb7b7f93..9a32e4cf2 100644 +--- src/libOpenImageIO/CMakeLists.txt ++++ src/libOpenImageIO/CMakeLists.txt +@@ -154,19 +154,27 @@ target_link_libraries (OpenImageIO + ${OPENIMAGEIO_IMATH_TARGETS} + PRIVATE + ${OPENIMAGEIO_OPENEXR_TARGETS} +- ${OpenCV_LIBRARIES} + ${format_plugin_libs} # Add all the target link libraries from the plugins + $ + $ + $ + $ +- $ + ${BZIP2_LIBRARIES} + ZLIB::ZLIB +- $ ++ tsl::robin_map ++ Boost::filesystem Boost::thread Boost::system Boost::container + ${CMAKE_DL_LIBS} + ) + ++if (USE_OPENCV) ++ target_link_libraries (OpenImageIO PRIVATE opencv::opencv_core ++ opencv::opencv_imgproc ++ opencv::opencv_videoio) ++endif () ++if (USE_FREETYPE) ++ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) ++endif() ++ + if (WIN32) + target_link_libraries (OpenImageIO PRIVATE psapi) + endif() +diff --git src/libutil/CMakeLists.txt src/libutil/CMakeLists.txt +index f873b3eed..cf5d4e74c 100644 +--- src/libutil/CMakeLists.txt ++++ src/libutil/CMakeLists.txt +@@ -20,20 +20,13 @@ target_link_libraries (OpenImageIO_Util + ${GCC_ATOMIC_LIBRARIES} + ${OPENIMAGEIO_IMATH_DEPENDENCY_VISIBILITY} + ${OPENIMAGEIO_IMATH_TARGETS} ++ fmt::fmt + PRIVATE +- $ +- $ ++ Boost::filesystem Boost::thread Boost::system + $ + ${CMAKE_DL_LIBS} + ) + +-if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) +- add_dependencies(OpenImageIO_Util fmt_internal_target) +-else () +- target_link_libraries (OpenImageIO_Util +- PUBLIC fmt::fmt-header-only) +-endif () +- + if (WIN32) + add_definitions(-DWIN32_LEAN_AND_MEAN -DNOMINMAX -DNOGDI -DVC_EXTRALEAN) + target_link_libraries (OpenImageIO_Util PRIVATE psapi) +diff --git src/ptex.imageio/CMakeLists.txt src/ptex.imageio/CMakeLists.txt +index 16634fedb..82060ac29 100644 +--- src/ptex.imageio/CMakeLists.txt ++++ src/ptex.imageio/CMakeLists.txt +@@ -2,12 +2,9 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Ptex_FOUND) +- set(ptex_target Ptex::Ptex_dynamic) +- if (TARGET Ptex::Ptex_static AND (NOT TARGET Ptex::Ptex_dynamic OR LINKSTATIC)) +- set(ptex_target Ptex::Ptex_static) +- endif() ++if (USE_PTEX) + add_oiio_plugin (ptexinput.cpp +- LINK_LIBRARIES ${ptex_target} ZLIB::ZLIB ++ LINK_LIBRARIES ${ptex_LIBRARIES} ZLIB::ZLIB ++ INCLUDE_DIRS ${ptex_INCLUDE_DIRS} + DEFINITIONS "-DUSE_PTEX") + endif () diff --git a/recipes/openimageio/config.yml b/recipes/openimageio/config.yml index 4aae3708205a1..66bdf8b724be0 100644 --- a/recipes/openimageio/config.yml +++ b/recipes/openimageio/config.yml @@ -11,3 +11,5 @@ versions: folder: all "2.5.13.1": folder: all + "2.5.14.0": + folder: all diff --git a/recipes/openjdk/all/conanfile.py b/recipes/openjdk/all/conanfile.py index 33d8977b70cc4..6e6220a975840 100644 --- a/recipes/openjdk/all/conanfile.py +++ b/recipes/openjdk/all/conanfile.py @@ -16,6 +16,8 @@ class OpenJDK(ConanFile): license = "GPL-2.0-only WITH Classpath-exception-2.0", "GPL-2.0-only WITH OpenJDK-assembly-exception-1.0" topics = ("java", "jdk", "openjdk") settings = "os", "arch", "compiler", "build_type" + upload_policy = "skip" + build_policy = "missing" def package_id(self): del self.info.settings.compiler @@ -23,7 +25,7 @@ def package_id(self): def configure(self): self.settings.rm_safe("os.version") - + def validate(self): if Version(self.version) < "19.0.2" and self.settings.arch != "x86_64": raise ConanInvalidConfiguration("Unsupported Architecture. This package currently only supports x86_64.") diff --git a/recipes/openmesh/all/conandata.yml b/recipes/openmesh/all/conandata.yml index a2b42f64b8c89..118a4fc6160df 100644 --- a/recipes/openmesh/all/conandata.yml +++ b/recipes/openmesh/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "11.0": + url: "https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/11.0/OpenMesh-11.0.0.tar.bz2" + sha256: "9d22e65bdd6a125ac2043350a019ec4346ea83922cafdf47e125a03c16f6fa07" "10.0": url: "https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/10.0/OpenMesh-10.0.0.tar.bz2" sha256: "af22520a474bb6a3b355eb0867449c6b995126f97632d1ee5ff9c7ebd322fedb" @@ -9,6 +12,8 @@ sources: url: "https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/8.1/OpenMesh-8.1.tar.gz" sha256: "0953777f483d47ea9fa00c329838443a7a09dde8be77bf7de188001cb9e768a7" patches: + "11.0": + - patch_file: "patches/cmake-install_9.0.patch" "10.0": - patch_file: "patches/cmake-install_9.0.patch" - patch_file: "patches/restore-cxx11-compatibility.patch" diff --git a/recipes/openmesh/config.yml b/recipes/openmesh/config.yml index a5f8255a5ed2a..bc3b698019ee1 100644 --- a/recipes/openmesh/config.yml +++ b/recipes/openmesh/config.yml @@ -1,4 +1,6 @@ versions: + "11.0": + folder: all "10.0": folder: all "9.0": diff --git a/recipes/openmpi/all/conandata.yml b/recipes/openmpi/all/conandata.yml index 4580e17ba76a3..7211bc311a719 100644 --- a/recipes/openmpi/all/conandata.yml +++ b/recipes/openmpi/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.1.6": + url: "https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.6.tar.bz2" + sha256: "f740994485516deb63b5311af122c265179f5328a0d857a567b85db00b11e415" "4.1.0": - sha256: 73866fb77090819b6a8c85cb8539638d37d6877455825b74e289d647a39fd5b5 - url: https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.0.tar.bz2 + url: "https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.0.tar.bz2" + sha256: "73866fb77090819b6a8c85cb8539638d37d6877455825b74e289d647a39fd5b5" diff --git a/recipes/openmpi/all/conanfile.py b/recipes/openmpi/all/conanfile.py index 26cc0e027159c..785217bcba3dc 100644 --- a/recipes/openmpi/all/conanfile.py +++ b/recipes/openmpi/all/conanfile.py @@ -1,97 +1,259 @@ -from conans import ConanFile, tools, AutoToolsBuildEnvironment -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.29.1" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.env import VirtualRunEnv +from conan.tools.files import copy, get, rm, rmdir, save, replace_in_file +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout +from conan.tools.microsoft import unix_path + +required_conan_version = ">=1.53.0" class OpenMPIConan(ConanFile): name = "openmpi" - homepage = "https://www.open-mpi.org" - url = "https://github.com/conan-io/conan-center-index" - topics = ("conan", "mpi", "openmpi") description = "A High Performance Message Passing Library" license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.open-mpi.org" + topics = ("mpi", "openmpi") + provides = "mpi" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], - "fortran": ["yes", "mpifh", "usempi", "usempi80", "no"] + "fortran": ["yes", "mpifh", "usempi", "usempi80", "no"], + "enable_cxx": [True, False], + "enable_cxx_exceptions": [True, False], + "with_verbs": [True, False], } default_options = { "shared": False, "fPIC": True, - "fortran": "no" + "fortran": "no", + "enable_cxx": False, + "enable_cxx_exceptions": False, + "with_verbs": False, } - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + if not self.options.enable_cxx: + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + del self.options.enable_cxx_exceptions + if is_apple_os(self): + # Unavailable due to dependency on libnl + del self.options.with_verbs + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + # OpenMPI public headers don't include anything besides stddef.h. + # transitive_headers=True is not needed for any dependencies. + self.requires("hwloc/2.10.0") + self.requires("zlib/[>=1.2.11 <2]") + if self.settings.os == "Linux": + self.requires("libnl/3.8.0") + if self.options.get_safe("with_verbs"): + self.requires("rdma-core/52.0") + + def validate(self): if self.settings.os == "Windows": + # Requires Cygwin or WSL raise ConanInvalidConfiguration("OpenMPI doesn't support Windows") - def requirements(self): - # FIXME : self.requires("libevent/2.1.12") - try to use libevent from conan - self.requires("zlib/1.2.11") + if self.version == "4.1.0" and is_apple_os(self) and self.settings.arch == "armv8": + # INFO: https://github.com/open-mpi/ompi/issues/8410 + raise ConanInvalidConfiguration(f"{self.ref} is not supported in Mac M1. Use a newer version.") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = self.name + "-" + self.version - os.rename(extracted_dir, self._source_subfolder) - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self) - args = ["--disable-wrapper-rpath", "--disable-wrapper-runpath"] - if self.settings.build_type == "Debug": - args.append("--enable-debug") - if self.options.shared: - args.extend(["--enable-shared", "--disable-static"]) - else: - args.extend(["--enable-static", "--disable-shared"]) - args.append("--with-pic" if self.options.get_safe("fPIC", True) else "--without-pic") - args.append("--enable-mpi-fortran={}".format(str(self.options.fortran))) - args.append("--with-zlib={}".format(self.deps_cpp_info["zlib"].rootpath)) - args.append("--with-zlib-libdir={}".format(self.deps_cpp_info["zlib"].lib_paths[0])) - args.append("--datarootdir=${prefix}/res") - self._autotools.configure(args=args) - return self._autotools + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + def root(pkg): + return unix_path(self, self.dependencies[pkg].package_folder) + + def yes_no(v): + return "yes" if v else "no" + + tc = AutotoolsToolchain(self) + tc.configure_args += [ + f"--enable-mpi-fortran={self.options.fortran}", + f"--enable-mpi-cxx={yes_no(self.options.enable_cxx)}", + f"--enable-cxx-exceptions={yes_no(self.options.get_safe('enable_cxx_exceptions'))}", + f"--with-hwloc={root('hwloc')}", + f"--with-libnl={root('libnl') if not is_apple_os(self) else 'no'}", + f"--with-verbs={root('rdma-core') if self.options.get_safe('with_verbs') else 'no'}", + f"--with-zlib={root('zlib')}", + "--with-pic" if self.options.get_safe("fPIC", True) else "--without-pic", + "--disable-wrapper-rpath", + "--disable-wrapper-runpath", + "--exec-prefix=/", + "--datarootdir=${prefix}/res", + # Disable other external libraries explicitly + "--with-alps=no", # ALPS + "--with-cuda=no", # CUDA + "--with-fca=no", # FCA + "--with-gpfs=no", # Gpfs + "--with-hcoll=no", # hcoll + "--with-ime=no", # IME + "--with-lsf=no", # LSF + "--with-lustre=no", # Lustre + "--with-memkind=no", # memkind + "--with-moab=no", # Moab + "--with-mxm=no", # Mellanox MXM + "--with-ofi=no", # libfabric, TODO: enable once libfabric is available + "--with-pmi=no", # PMI + "--with-pmix=internal", # PMIx + "--with-portals4=no", # Portals4 + "--with-psm2=no", # PSM2 + "--with-psm=no", # PSM + "--with-pvfs2=no", # Pvfs2 + "--with-treematch=no", # TreeMatch + "--with-ucx=no", # UCX + "--with-valgrind=no", # Valgrind + "--with-x=no", # X11 + "--with-xpmem=no", # XPMEM + ] + if is_apple_os(self): + if self.settings.arch == "armv8": + tc.configure_args.append("--host=aarch64-apple-darwin") + tc.extra_ldflags.append("-arch arm64") + # macOS has no libnl + tc.configure_args.append("--enable-mca-no-build=reachable-netlink") + # libtool's libltdl is not really needed, OpenMPI provides its own equivalent. + # Not adding it as it fails to be detected by ./configure in some cases. + # https://github.com/open-mpi/ompi/blob/v4.1.6/opal/mca/dl/dl.h#L20-L25 + tc.configure_args.append("--with-libltdl=no") + tc.generate() + + deps = AutotoolsDeps(self) + deps.generate() + + # Needed for ./configure to find libhwloc.so and libibnetdisc.so + VirtualRunEnv(self).generate(scope="build") + + # TODO: might want to enable reproducible builds by setting + # $SOURCE_DATE_EPOCH, $USER and $HOSTNAME + + def _patch_sources(self): + # Not needed and fails with v5.0 due to additional Python dependencies + save(self, os.path.join(self.source_folder, "docs", "Makefile.in"), "all:\ninstall:\n") + # Workaround for trying to include VERSION from source dir due to a case-insensitive filesystem on macOS + # Based on https://github.com/macports/macports-ports/blob/22dded99ae76a287f04a9685bbc820ecaa397fea/science/openmpi/files/patch-configure.diff + replace_in_file(self, os.path.join(self.source_folder, "configure"), + "-I$(top_srcdir) ", "-idirafter$(top_srcdir) ") def build(self): - with tools.chdir(self._source_subfolder): - autotools = self._configure_autotools() - autotools.make() + self._patch_sources() + autotools = Autotools(self) + autotools.configure() + autotools.make() def package(self): - self.copy(pattern="LICENSE", src=self._source_subfolder, dst="licenses") - with tools.chdir(self._source_subfolder): - autotools = self._configure_autotools() - autotools.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.rmdir(os.path.join(self.package_folder, "share")) - tools.rmdir(os.path.join(self.package_folder, "etc")) - tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.la") + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) + autotools.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "etc")) + rmdir(self, os.path.join(self.package_folder, "res", "man")) + rm(self, "*.la", self.package_folder, recursive=True) + fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.libs = ['mpi', 'open-rte', 'open-pal'] + # Based on https://cmake.org/cmake/help/latest/module/FindMPI.html#variables-for-using-mpi + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "MPI") + # TODO: Use None when available as Conan feature. + self.cpp_info.set_property("pkg_config_name", "_ompi-do-not-use") + # TODO: export a .cmake module to correctly set all variables set by CMake's FindMPI.cmake + + requires = [ + "hwloc::hwloc", + "zlib::zlib", + ] if self.settings.os == "Linux": - self.cpp_info.system_libs = ["dl", "pthread", "rt", "util"] + requires.append("libnl::libnl") + if self.options.get_safe("with_verbs"): + requires.extend(["rdma-core::libibverbs", "rdma-core::librdmacm"]) + + # The components are modelled based on OpenMPI's pkg-config files - self.output.info("Creating MPI_HOME environment variable: {}".format(self.package_folder)) + # Run-time environment library + self.cpp_info.components["orte"].set_property("pkg_config_name", "orte") + self.cpp_info.components["orte"].libs = ["open-rte", "open-pal"] + self.cpp_info.components["orte"].includedirs.append(os.path.join("include", "openmpi")) + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["orte"].system_libs = ["dl", "pthread", "rt", "util"] + self.cpp_info.components["orte"].cflags = ["-pthread"] + if self.options.get_safe("enable_cxx_exceptions"): + self.cpp_info.components["orte"].cflags.append("-fexceptions") + self.cpp_info.components["orte"].requires = requires + + self.cpp_info.components["ompi"].set_property("pkg_config_name", "ompi") + self.cpp_info.components["ompi"].libs = ["mpi"] + self.cpp_info.components["ompi"].requires = ["orte"] + + self.cpp_info.components["ompi-c"].set_property("pkg_config_name", "ompi-c") + self.cpp_info.components["ompi-c"].set_property("cmake_target_name", "MPI::MPI_C") + self.cpp_info.components["ompi-c"].requires = ["ompi"] + + self.cpp_info.components["ompitrace"].set_property("pkg_config_name", "ompitrace") + self.cpp_info.components["ompitrace"].libs = ["ompitrace"] + self.cpp_info.components["ompitrace"].requires = ["ompi"] + + if self.options.enable_cxx: + self.cpp_info.components["ompi-cxx"].set_property("pkg_config_name", "ompi-cxx") + self.cpp_info.components["ompi-cxx"].set_property("cmake_target_name", "MPI::MPI_CXX") + self.cpp_info.components["ompi-cxx"].libs = ["mpi_cxx"] + self.cpp_info.components["ompi-cxx"].requires = ["ompi"] + + if self.options.fortran != "no": + self.cpp_info.components["ompi-fort"].set_property("pkg_config_name", "ompi-fort") + self.cpp_info.components["ompi-fort"].set_property("cmake_target_name", "MPI::MPI_Fortran") + self.cpp_info.components["ompi-fort"].libs = ["mpi_mpifh"] + self.cpp_info.components["ompi-fort"].requires = ["ompi"] + # Aliases + self.cpp_info.components["ompi-f77"].set_property("pkg_config_name", "ompi-f77") + self.cpp_info.components["ompi-f77"].requires = ["ompi-fort"] + self.cpp_info.components["ompi-f90"].set_property("pkg_config_name", "ompi-f90") + self.cpp_info.components["ompi-f90"].requires = ["ompi-fort"] + + bin_folder = os.path.join(self.package_folder, "bin") + # Prepend to PATH to avoid a conflict with system MPI + self.runenv_info.prepend_path("PATH", bin_folder) + self.runenv_info.define_path("MPI_BIN", bin_folder) + self.runenv_info.define_path("MPI_HOME", self.package_folder) + self.runenv_info.define_path("OPAL_PREFIX", self.package_folder) + self.runenv_info.define_path("OPAL_EXEC_PREFIX", self.package_folder) + self.runenv_info.define_path("OPAL_LIBDIR", os.path.join(self.package_folder, "lib")) + self.runenv_info.define_path("OPAL_DATADIR", os.path.join(self.package_folder, "res")) + self.runenv_info.define_path("OPAL_DATAROOTDIR", os.path.join(self.package_folder, "res")) + + # TODO: Legacy, to be removed on Conan 2.0 + self.env_info.PATH.append(bin_folder) + self.env_info.MPI_BIN = bin_folder self.env_info.MPI_HOME = self.package_folder - self.output.info("Creating OPAL_PREFIX environment variable: {}".format(self.package_folder)) self.env_info.OPAL_PREFIX = self.package_folder - mpi_bin = os.path.join(self.package_folder, 'bin') - self.output.info("Creating MPI_BIN environment variable: {}".format(mpi_bin)) - self.env_info.MPI_BIN = mpi_bin - self.output.info("Appending PATH environment variable: {}".format(mpi_bin)) - self.env_info.PATH.append(mpi_bin) + self.env_info.OPAL_EXEC_PREFIX = self.package_folder + self.env_info.OPAL_LIBDIR = os.path.join(self.package_folder, "lib") + self.env_info.OPAL_DATADIR = os.path.join(self.package_folder, "res") + self.env_info.OPAL_DATAROOTDIR = os.path.join(self.package_folder, "res") + + self.cpp_info.names["cmake_find_package"] = "MPI" + self.cpp_info.names["cmake_find_package_multi"] = "MPI" + self.cpp_info.components["ompi-c"].names["cmake_find_package"] = "MPI_C" + if self.options.enable_cxx: + self.cpp_info.components["ompi-cxx"].names["cmake_find_package"] = "MPI_CXX" + if self.options.fortran != "no": + self.cpp_info.components["ompi-fort"].names["cmake_find_package"] = "MPI_Fortran" diff --git a/recipes/openmpi/all/test_package/CMakeLists.txt b/recipes/openmpi/all/test_package/CMakeLists.txt index d61f3c4bef33a..a166065f8b662 100644 --- a/recipes/openmpi/all/test_package/CMakeLists.txt +++ b/recipes/openmpi/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(MPI REQUIRED CONFIG) -find_package(MPI REQUIRED) - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE MPI::MPI_C) diff --git a/recipes/openmpi/all/test_package/conanfile.py b/recipes/openmpi/all/test_package/conanfile.py index c63b947b1cb95..09ff6fcc3cc71 100644 --- a/recipes/openmpi/all/test_package/conanfile.py +++ b/recipes/openmpi/all/test_package/conanfile.py @@ -1,10 +1,20 @@ -from conans import ConanFile, CMake, tools import os +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,7 +22,7 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - mpiexec = os.path.join(os.environ['MPI_BIN'], 'mpiexec') - command = '%s -mca plm_rsh_agent yes -np 2 %s' % (mpiexec, os.path.join("bin", "test_package")) - self.run(command, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + command = f"mpiexec -mca plm_rsh_agent yes {bin_path}" + self.run(command, env="conanrun") diff --git a/recipes/openmpi/all/test_package/test_package.c b/recipes/openmpi/all/test_package/test_package.c new file mode 100644 index 0000000000000..540ba2f9beacc --- /dev/null +++ b/recipes/openmpi/all/test_package/test_package.c @@ -0,0 +1,13 @@ +#include +#include + +#include + +int main(int argc, char* argv[]) +{ + char version[MPI_MAX_LIBRARY_VERSION_STRING] = {0}; + int len = 0; + MPI_Get_library_version(version, &len); + printf("MPI version: %s\n", version); + return EXIT_SUCCESS; +} diff --git a/recipes/openmpi/all/test_package/test_package.cpp b/recipes/openmpi/all/test_package/test_package.cpp deleted file mode 100644 index d6fa9065fdf2a..0000000000000 --- a/recipes/openmpi/all/test_package/test_package.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include - -int main(int argc, char* argv[]) -{ - MPI_Init(&argc, &argv); - - int rank; - MPI_Comm_rank(MPI_COMM_WORLD, &rank); - if (rank == 0) { - int value = 17; - int result = MPI_Send(&value, 1, MPI_INT, 1, 0, MPI_COMM_WORLD); - if (result == MPI_SUCCESS) - std::cout << "Rank 0 OK!" << std::endl; - } else if (rank == 1) { - int value; - int result = MPI_Recv(&value, 1, MPI_INT, 0, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE); - if (result == MPI_SUCCESS && value == 17) - std::cout << "Rank 1 OK!" << std::endl; - } - MPI_Finalize(); - return 0; -} diff --git a/recipes/openmpi/config.yml b/recipes/openmpi/config.yml index 702888c159594..b6ed9888d0176 100644 --- a/recipes/openmpi/config.yml +++ b/recipes/openmpi/config.yml @@ -1,3 +1,5 @@ versions: + "4.1.6": + folder: all "4.1.0": folder: all diff --git a/recipes/openslide/all/conandata.yml b/recipes/openslide/all/conandata.yml new file mode 100644 index 0000000000000..ca29cdf478653 --- /dev/null +++ b/recipes/openslide/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "4.0.0": + url: "https://github.com/openslide/openslide/releases/download/v4.0.0/openslide-4.0.0.tar.xz" + sha256: "cc227c44316abb65fb28f1c967706eb7254f91dbfab31e9ae6a48db6cf4ae562" +patches: + "4.0.0": + - patch_file: "patches/0001-no-openslide-poison.patch" + patch_description: "Fix 'error__use__openslide_fclose_instead' compilation error" + patch_type: "backport" + patch_source: "https://github.com/openslide/openslide/commit/048865a3b61e9bc2b61219168d434b61e784d355" diff --git a/recipes/openslide/all/conanfile.py b/recipes/openslide/all/conanfile.py new file mode 100644 index 0000000000000..0557d9913ef70 --- /dev/null +++ b/recipes/openslide/all/conanfile.py @@ -0,0 +1,138 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rm, rmdir, export_conandata_patches, apply_conandata_patches +from conan.tools.gnu import PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson, MesonToolchain +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.53.0" + + +class OpenSlideConan(ConanFile): + name = "openslide" + description = "OpenSlide is a C library for reading whole slide image files (also known as virtual slides)" + license = "LGPL-2.1" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://openslide.org/" + topics = ("image", "pathology", "whole-slide-imaging", "slide-image", + # supported formats + "bif", "dicom", "dcm", "mrxs", "ndpi", "scn", "svs", "svslide", "tiff", "vms", "vmu") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "jpeg": ["libjpeg", "libjpeg-turbo", "mozjpeg"], + } + default_options = { + "shared": False, + "fPIC": True, + "jpeg": "libjpeg", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("cairo/1.18.0") + self.requires("gdk-pixbuf/2.42.10") + self.requires("glib/2.78.3") + self.requires("libdicom/1.0.5") + self.requires("libpng/[>=1.6 <2]") + self.requires("libtiff/4.6.0") + self.requires("libxml2/[>=2.12.5 <3]") + self.requires("openjpeg/2.5.2") + self.requires("sqlite3/3.45.3") + self.requires("zlib/[>=1.2.11 <2]") + if self.options.jpeg == "libjpeg": + self.requires("libjpeg/9e") + elif self.options.jpeg == "libjpeg-turbo": + self.requires("libjpeg-turbo/3.0.2") + elif self.options.jpeg == "mozjpeg": + self.requires("mozjpeg/4.1.5") + + def validate(self): + if is_msvc(self): + raise ConanInvalidConfiguration("OpenSlide requires GNU C extensions support and is not compatible with MSVC") + + def build_requirements(self): + self.tool_requires("meson/[>=1.2.3 <2]") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/[>=2.2 <3]") + self.tool_requires("glib/") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + venv = VirtualBuildEnv(self) + venv.generate() + tc = MesonToolchain(self) + tc.project_options["test"] = "disabled" + tc.project_options["doc"] = "disabled" + tc.generate() + deps = PkgConfigDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + meson = Meson(self) + meson.configure() + meson.build() + + def package(self): + copy(self, "COPYING.LESSER", self.source_folder, os.path.join(self.package_folder, "licenses")) + meson = Meson(self) + meson.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + fix_apple_shared_install_name(self) + + def package_info(self): + self.cpp_info.libs = ["openslide"] + self.cpp_info.includedirs.append(os.path.join("include", "openslide")) + + if self.settings.os == "Macos": + self.cpp_info.frameworks = ["CoreText"] + + self.cpp_info.requires = [ + "cairo::cairo_", + "gdk-pixbuf::gdk-pixbuf", + "glib::gio-2.0", + "glib::glib-2.0", + "glib::gobject-2.0", + "libdicom::libdicom", + "libpng::libpng", + "libtiff::libtiff", + "libxml2::libxml2", + "openjpeg::openjpeg", + "sqlite3::sqlite3", + "zlib::zlib", + ] + if self.options.jpeg == "libjpeg": + self.cpp_info.requires.append("libjpeg::libjpeg") + elif self.options.jpeg == "libjpeg-turbo": + self.cpp_info.requires.append("libjpeg-turbo::jpeg") + elif self.options.jpeg == "mozjpeg": + self.cpp_info.requires.append("mozjpeg::libjpeg") diff --git a/recipes/openslide/all/patches/0001-no-openslide-poison.patch b/recipes/openslide/all/patches/0001-no-openslide-poison.patch new file mode 100644 index 0000000000000..00a38642d6421 --- /dev/null +++ b/recipes/openslide/all/patches/0001-no-openslide-poison.patch @@ -0,0 +1,308 @@ +From 048865a3b61e9bc2b61219168d434b61e784d355 Mon Sep 17 00:00:00 2001 +From: Benjamin Gilbert +Date: Mon, 12 Feb 2024 20:44:45 +0900 +Subject: [PATCH] Replace _OPENSLIDE_POISON() with pre-commit check + +Preprocessor macros are somewhat clunky as a way to prevent use of +forbidden functions. Now that we have pre-commit checks, use those +instead. Allow forbidden function calls in wrapper implementations by +ignoring call sites with "ci-allow" in a comment on the same line. + +Signed-off-by: Benjamin Gilbert +--- + .pre-commit-config.yaml | 29 +++++++++++++++++++++++++++++ + src/openslide-decode-sqlite.c | 10 +++------- + src/openslide-decode-tiff.c | 8 ++------ + src/openslide-file.c | 20 +++++++------------- + src/openslide-jdatasrc.c | 2 +- + src/openslide-private.h | 27 --------------------------- + src/openslide-util.c | 4 +--- + src/openslide-vendor-synthetic.c | 7 +++---- + 8 files changed, 46 insertions(+), 61 deletions(-) + +diff --git a/src/openslide-decode-sqlite.c b/src/openslide-decode-sqlite.c +index f75083df5..119b71b5a 100644 +--- a/src/openslide-decode-sqlite.c ++++ b/src/openslide-decode-sqlite.c +@@ -44,7 +44,6 @@ static int profile_callback(unsigned trace_type G_GNUC_UNUSED, + return 0; + } + +-#undef sqlite3_open_v2 + static sqlite3 *do_open(const char *filename, int flags, GError **err) { + sqlite3 *db; + +@@ -55,7 +54,7 @@ static sqlite3 *do_open(const char *filename, int flags, GError **err) { + return NULL; + } + +- ret = sqlite3_open_v2(filename, &db, flags, NULL); ++ ret = sqlite3_open_v2(filename, &db, flags, NULL); // ci-allow + + if (ret) { + if (db) { +@@ -76,7 +75,6 @@ static sqlite3 *do_open(const char *filename, int flags, GError **err) { + + return db; + } +-#define sqlite3_open_v2 _OPENSLIDE_POISON(_openslide_sqlite_open) + + sqlite3 *_openslide_sqlite_open(const char *filename, GError **err) { + // ":" filename prefix is reserved. +@@ -131,12 +129,10 @@ void _openslide_sqlite_propagate_stmt_error(sqlite3_stmt *stmt, GError **err) { + _openslide_sqlite_propagate_error(sqlite3_db_handle(stmt), err); + } + +-#undef sqlite3_close + void _openslide_sqlite_close(sqlite3 *db) { +- // sqlite3_close() failures indicate a leaked resource, probably a ++ // sqlite3_close failures indicate a leaked resource, probably a + // prepared statement. +- if (sqlite3_close(db)) { ++ if (sqlite3_close(db)) { // ci-allow + g_warning("SQLite error: %s", sqlite3_errmsg(db)); + } + } +-#define sqlite3_close _OPENSLIDE_POISON(_openslide_sqlite_close) +diff --git a/src/openslide-decode-tiff.c b/src/openslide-decode-tiff.c +index 0af196479..ed294f18f 100644 +--- a/src/openslide-decode-tiff.c ++++ b/src/openslide-decode-tiff.c +@@ -74,7 +74,6 @@ struct associated_image { + result = tmp; \ + } while (0) + +-#undef TIFFSetDirectory + bool _openslide_tiff_set_dir(TIFF *tiff, + tdir_t dir, + GError **err) { +@@ -82,14 +81,13 @@ bool _openslide_tiff_set_dir(TIFF *tiff, + // avoid libtiff unnecessarily rereading directory contents + return true; + } +- if (!TIFFSetDirectory(tiff, dir)) { ++ if (!TIFFSetDirectory(tiff, dir)) { // ci-allow + g_set_error(err, OPENSLIDE_ERROR, OPENSLIDE_ERROR_FAILED, + "Cannot set TIFF directory %d", dir); + return false; + } + return true; + } +-#define TIFFSetDirectory _OPENSLIDE_POISON(_openslide_tiff_set_dir) + + bool _openslide_tiff_level_init(TIFF *tiff, + tdir_t dir, +@@ -587,7 +585,6 @@ static toff_t tiff_do_size(thandle_t th) { + return hdl->size; + } + +-#undef TIFFClientOpen + static TIFF *tiff_open(struct _openslide_tiffcache *tc, GError **err) { + // open + g_autoptr(_openslide_file) f = _openslide_fopen(tc->filename, err); +@@ -646,7 +643,7 @@ static TIFF *tiff_open(struct _openslide_tiffcache *tc, GError **err) { + + // TIFFOpen + // mode: m disables mmap to avoid sigbus and other mmap fragility +- TIFF *tiff = TIFFClientOpen(tc->filename, "rm", hdl, ++ TIFF *tiff = TIFFClientOpen(tc->filename, "rm", hdl, // ci-allow + tiff_do_read, tiff_do_write, tiff_do_seek, + tiff_do_close, tiff_do_size, NULL, NULL); + if (tiff == NULL) { +@@ -656,7 +653,6 @@ static TIFF *tiff_open(struct _openslide_tiffcache *tc, GError **err) { + } + return tiff; + } +-#define TIFFClientOpen _OPENSLIDE_POISON(_openslide_tiffcache_get) + + struct _openslide_tiffcache *_openslide_tiffcache_create(const char *filename) { + struct _openslide_tiffcache *tc = g_new0(struct _openslide_tiffcache, 1); +diff --git a/src/openslide-file.c b/src/openslide-file.c +index 2763f3807..9eb9b1039 100644 +--- a/src/openslide-file.c ++++ b/src/openslide-file.c +@@ -22,7 +22,6 @@ + + #include + +-#define NO_POISON_FSEEKO + #include "openslide-private.h" + + #include +@@ -44,13 +43,8 @@ struct _openslide_dir { + GDir *dir; + }; + +-#undef fopen +-#undef fread +-#undef fclose +-#undef g_file_test +- + static void wrap_fclose(FILE *fp) { +- fclose(fp); ++ fclose(fp); // ci-allow + } + G_DEFINE_AUTOPTR_CLEANUP_FUNC(FILE, wrap_fclose) + +@@ -87,7 +81,7 @@ static FILE *do_fopen(const char *path, const char *mode, GError **err) { + io_error(err, "Couldn't open %s", path); + } + #else +- f = fopen(path, mode); ++ f = fopen(path, mode); // ci-allow + if (f == NULL) { + io_error(err, "Couldn't open %s", path); + } +@@ -132,7 +126,7 @@ size_t _openslide_fread(struct _openslide_file *file, void *buf, size_t size) { + char *bufp = buf; + size_t total = 0; + while (total < size) { +- size_t count = fread(bufp + total, 1, size - total, file->fp); ++ size_t count = fread(bufp + total, 1, size - total, file->fp); // ci-allow + if (count == 0) { + return total; + } +@@ -143,7 +137,7 @@ size_t _openslide_fread(struct _openslide_file *file, void *buf, size_t size) { + + bool _openslide_fseek(struct _openslide_file *file, off_t offset, int whence, + GError **err) { +- if (fseeko(file->fp, offset, whence)) { ++ if (fseeko(file->fp, offset, whence)) { // ci-allow + g_set_error(err, G_FILE_ERROR, g_file_error_from_errno(errno), + "%s", g_strerror(errno)); + return false; +@@ -152,7 +146,7 @@ bool _openslide_fseek(struct _openslide_file *file, off_t offset, int whence, + } + + off_t _openslide_ftell(struct _openslide_file *file, GError **err) { +- off_t ret = ftello(file->fp); ++ off_t ret = ftello(file->fp); // ci-allow + if (ret == -1) { + g_set_error(err, G_FILE_ERROR, g_file_error_from_errno(errno), + "%s", g_strerror(errno)); +@@ -179,12 +173,12 @@ off_t _openslide_fsize(struct _openslide_file *file, GError **err) { + } + + void _openslide_fclose(struct _openslide_file *file) { +- fclose(file->fp); ++ fclose(file->fp); // ci-allow + g_free(file); + } + + bool _openslide_fexists(const char *path, GError **err G_GNUC_UNUSED) { +- return g_file_test(path, G_FILE_TEST_EXISTS); ++ return g_file_test(path, G_FILE_TEST_EXISTS); // ci-allow + } + + struct _openslide_dir *_openslide_dir_open(const char *dirname, GError **err) { +diff --git a/src/openslide-jdatasrc.c b/src/openslide-jdatasrc.c +index 2ad068818..4de54eddf 100644 +--- a/src/openslide-jdatasrc.c ++++ b/src/openslide-jdatasrc.c +@@ -158,7 +158,7 @@ static void skip_input_data (j_decompress_ptr cinfo, long num_bytes) + { + struct jpeg_source_mgr * src = cinfo->src; + +- /* Just a dumb implementation for now. Could use fseek() except ++ /* Just a dumb implementation for now. Could use fseek except + * it doesn't work on pipes. Not clear that being smart is worth + * any trouble anyway --- large skips are infrequent. + */ +diff --git a/src/openslide-private.h b/src/openslide-private.h +index 5ae36939b..ed08f5ed7 100644 +--- a/src/openslide-private.h ++++ b/src/openslide-private.h +@@ -383,33 +383,6 @@ extern const int32_t _openslide_G_Cb[256]; + extern const int32_t _openslide_G_Cr[256]; + extern const int16_t _openslide_B_Cb[256]; + +-/* Prevent use of dangerous functions and functions with mandatory wrappers. +- Every @p replacement must be unique to avoid conflicting-type errors. */ +-#define _OPENSLIDE_POISON(replacement) error__use_ ## replacement ## _instead +-#define fopen _OPENSLIDE_POISON(_openslide_fopen) +-#define fread _OPENSLIDE_POISON(_openslide_fread) +-#define fseek _OPENSLIDE_POISON(_openslide_fseek) +-#define ftell _OPENSLIDE_POISON(_openslide_ftell) +-#define fclose _OPENSLIDE_POISON(_openslide_fclose) +-#define g_file_test _OPENSLIDE_POISON(_openslide_fexists) +-#define strtod _OPENSLIDE_POISON(_openslide_parse_double) +-#define g_ascii_strtod _OPENSLIDE_POISON(_openslide_parse_double_) +-#define sqlite3_open _OPENSLIDE_POISON(_openslide_sqlite_open) +-#define sqlite3_open_v2 _OPENSLIDE_POISON(_openslide_sqlite_open_) +-#define sqlite3_close _OPENSLIDE_POISON(_openslide_sqlite_close) +-#define TIFFClientOpen _OPENSLIDE_POISON(_openslide_tiffcache_get) +-#define TIFFFdOpen _OPENSLIDE_POISON(_openslide_tiffcache_get_) +-#define TIFFOpen _OPENSLIDE_POISON(_openslide_tiffcache_get__) +-#define TIFFSetDirectory _OPENSLIDE_POISON(_openslide_tiff_set_dir) +- +-#ifndef NO_POISON_FSEEKO +-// openslide-file.c needs the original macros +-#undef fseeko +-#undef ftello +-#define fseeko _OPENSLIDE_POISON(_openslide_fseek_) +-#define ftello _OPENSLIDE_POISON(_openslide_ftell_) +-#endif +- + #ifdef _WIN32 + // Prevent windows.h from defining the IN/OUT macro + #define _NO_W32_PSEUDO_MODIFIERS +diff --git a/src/openslide-util.c b/src/openslide-util.c +index 719953274..b85f9afa3 100644 +--- a/src/openslide-util.c ++++ b/src/openslide-util.c +@@ -170,7 +170,6 @@ void *_openslide_inflate_buffer(const void *src, int64_t src_len, + return g_steal_pointer(&dst); + } + +-#undef g_ascii_strtod + double _openslide_parse_double(const char *value) { + // Canonicalize comma to decimal point, since the locale of the + // originating system sometimes leaks into slide files. +@@ -180,14 +179,13 @@ double _openslide_parse_double(const char *value) { + + char *endptr; + errno = 0; +- double result = g_ascii_strtod(canonical, &endptr); ++ double result = g_ascii_strtod(canonical, &endptr); // ci-allow + // fail on overflow/underflow + if (canonical[0] == 0 || endptr[0] != 0 || errno == ERANGE) { + return NAN; + } + return result; + } +-#define g_ascii_strtod _OPENSLIDE_POISON(_openslide_parse_double) + + char *_openslide_format_double(double d) { + char buf[G_ASCII_DTOSTR_BUF_SIZE]; +diff --git a/src/openslide-vendor-synthetic.c b/src/openslide-vendor-synthetic.c +index e3a440569..79938a597 100644 +--- a/src/openslide-vendor-synthetic.c ++++ b/src/openslide-vendor-synthetic.c +@@ -204,7 +204,6 @@ static toff_t mem_tiff_size(thandle_t th) { + return mem->size; + } + +-#undef TIFFClientOpen + static bool decode_tiff(const void *data, uint32_t len, + uint32_t *dest, GError **err) { + // there's no reason for OpenSlide as a whole to support reading entire +@@ -216,8 +215,9 @@ static bool decode_tiff(const void *data, uint32_t len, + }; + // mode: m disables mmap to avoid sigbus and other mmap fragility + g_autoptr(TIFF) tiff = +- TIFFClientOpen("tiff", "rm", &mem, mem_tiff_read, mem_tiff_write, +- mem_tiff_seek, mem_tiff_close, mem_tiff_size, NULL, NULL); ++ TIFFClientOpen("tiff", "rm", &mem, mem_tiff_read, // ci-allow ++ mem_tiff_write, mem_tiff_seek, mem_tiff_close, ++ mem_tiff_size, NULL, NULL); + if (tiff == NULL) { + g_set_error(err, OPENSLIDE_ERROR, OPENSLIDE_ERROR_FAILED, + "Couldn't open TIFF"); +@@ -238,7 +238,6 @@ static bool decode_tiff(const void *data, uint32_t len, + + return _openslide_tiff_read_tile(&tiffl, tiff, dest, 0, 0, err); + } +-#define TIFFClientOpen _OPENSLIDE_POISON(_openslide_tiffcache_get) + + static bool decode_xml(const void *data, uint32_t len, + uint32_t *dest, GError **err) { diff --git a/recipes/openslide/all/test_package/conanfile.py b/recipes/openslide/all/test_package/conanfile.py new file mode 100644 index 0000000000000..2e3df45816e5a --- /dev/null +++ b/recipes/openslide/all/test_package/conanfile.py @@ -0,0 +1,32 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "PkgConfigDeps", "MesonToolchain", "VirtualRunEnv", "VirtualBuildEnv" + test_type = "explicit" + + def layout(self): + basic_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build_requirements(self): + self.tool_requires("meson/1.2.3") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.0.3") + + def build(self): + meson = Meson(self) + meson.configure() + meson.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/openslide/all/test_package/meson.build b/recipes/openslide/all/test_package/meson.build new file mode 100644 index 0000000000000..b22a34bfa7460 --- /dev/null +++ b/recipes/openslide/all/test_package/meson.build @@ -0,0 +1,5 @@ +project('test_package', 'c') +package_dep = dependency('openslide') +executable('test_package', + sources : ['test_package.c'], + dependencies : [package_dep]) diff --git a/recipes/openslide/all/test_package/test_package.c b/recipes/openslide/all/test_package/test_package.c new file mode 100644 index 0000000000000..ea806b718030d --- /dev/null +++ b/recipes/openslide/all/test_package/test_package.c @@ -0,0 +1,7 @@ +#include +#include + +int main() { + printf("OpenSlide version: %s\n", openslide_get_version()); + return 0; +} diff --git a/recipes/openslide/config.yml b/recipes/openslide/config.yml new file mode 100644 index 0000000000000..d2be8f453d7c0 --- /dev/null +++ b/recipes/openslide/config.yml @@ -0,0 +1,3 @@ +versions: + "4.0.0": + folder: all diff --git a/recipes/openssl/3.x.x/conandata.yml b/recipes/openssl/3.x.x/conandata.yml index 0e6fcf58a8a23..2d9a9b8cb4c8e 100644 --- a/recipes/openssl/3.x.x/conandata.yml +++ b/recipes/openssl/3.x.x/conandata.yml @@ -1,4 +1,7 @@ sources: + 3.3.1: + url: "https://github.com/openssl/openssl/releases/download/openssl-3.3.1/openssl-3.3.1.tar.gz" + sha256: 777cd596284c883375a2a7a11bf5d2786fc5413255efab20c50d6ffe6d020b7e 3.2.2: url: "https://github.com/openssl/openssl/releases/download/openssl-3.2.2/openssl-3.2.2.tar.gz" sha256: 197149c18d9e9f292c43f0400acaba12e5f52cacfe050f3d199277ea738ec2e7 diff --git a/recipes/openssl/3.x.x/conanfile.py b/recipes/openssl/3.x.x/conanfile.py index 6b88374a14b20..91c611c18115c 100644 --- a/recipes/openssl/3.x.x/conanfile.py +++ b/recipes/openssl/3.x.x/conanfile.py @@ -6,6 +6,7 @@ from conan.tools.gnu import AutotoolsToolchain from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc, msvc_runtime_flag, unix_path +from conan.tools.scm import Version import fnmatch import os @@ -515,6 +516,10 @@ def _make(self): # When `--prefix=/`, the scripts derive `\` without escaping, which # causes issues on Windows replace_in_file(self, "Makefile", "INSTALLTOP_dir=\\", "INSTALLTOP_dir=\\\\") + if Version(self.version) >= "3.3.0": + # replace backslashes in paths with forward slashes + mkinstallvars_pl = os.path.join(self.source_folder, "util", "mkinstallvars.pl") + replace_in_file(self, mkinstallvars_pl, "$ENV{$k} = $v;", """$v =~ s|\\\\|/|g; $ENV{$k} = $v;""") self._run_make() def _make_install(self): diff --git a/recipes/openssl/config.yml b/recipes/openssl/config.yml index 1ab48b68f1e65..474c4c3f3696f 100644 --- a/recipes/openssl/config.yml +++ b/recipes/openssl/config.yml @@ -1,4 +1,6 @@ versions: + "3.3.1": + folder: "3.x.x" "3.2.2": folder: "3.x.x" "3.2.1": diff --git a/recipes/opentelemetry-cpp/all/conanfile.py b/recipes/opentelemetry-cpp/all/conanfile.py index 60940dcfcab3b..7d46d7427d052 100644 --- a/recipes/opentelemetry-cpp/all/conanfile.py +++ b/recipes/opentelemetry-cpp/all/conanfile.py @@ -110,7 +110,7 @@ def requirements(self): self.requires("ms-gsl/4.0.0") if self.options.with_abseil: - self.requires("abseil/20230125.3", transitive_headers=True) + self.requires("abseil/20230802.1", transitive_headers=True) if self.options.with_otlp_grpc or self.options.with_otlp_http: self.requires("protobuf/3.21.12", transitive_headers=True, transitive_libs=True) @@ -137,7 +137,7 @@ def requirements(self): if self.options.get_safe("with_jaeger"): self.requires("thrift/0.17.0") - self.requires("boost/1.84.0") + self.requires("boost/1.85.0") @property def _required_boost_components(self): diff --git a/recipes/openvino/all/conandata.yml b/recipes/openvino/all/conandata.yml index 90b6177bbef9d..e7a253f3fb89e 100644 --- a/recipes/openvino/all/conandata.yml +++ b/recipes/openvino/all/conandata.yml @@ -1,4 +1,20 @@ sources: + "2024.3.0": + "openvino": + url: "https://github.com/openvinotoolkit/openvino/archive/refs/tags/2024.3.0.tar.gz" + sha256: "53fccad05279d0975eca84ec75517a7c360be9b0f7bcd822da29a7949c12ce70" + "arm_compute": + url: "https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v24.06.tar.gz" + sha256: "68e24589905638e406a98ad48236097ab30112f2849b35e196b7b1efb0ce74e6" + "onednn_cpu": + url: "https://github.com/openvinotoolkit/oneDNN/archive/f0f8defe2dff5058391f2a66e775e20b5de33b08.tar.gz" + sha256: "13bee5b8522177f297e095e3eba5948c1a7ee7a816d19d5a59ce0f717f82cedc" + "mlas": + url: "https://github.com/openvinotoolkit/mlas/archive/d1bc25ec4660cddd87804fcf03b2411b5dfb2e94.tar.gz" + sha256: "0a44fbfd4b13e8609d66ddac4b11a27c90c1074cde5244c91ad197901666004c" + "onednn_gpu": + url: "https://github.com/oneapi-src/oneDNN/archive/7ab8ee9adda866d675edeee7a3a6a29b2d0a1572.tar.gz" + sha256: "66363988363744e49fff55f4fcdb72318ff3f35fba6da68302c1662c837c22ac" "2024.2.0": "openvino": url: "https://github.com/openvinotoolkit/openvino/archive/refs/tags/2024.2.0.tar.gz" diff --git a/recipes/openvino/all/conanfile.py b/recipes/openvino/all/conanfile.py index 362f2e5a309dd..0a4c1e9f4440b 100644 --- a/recipes/openvino/all/conanfile.py +++ b/recipes/openvino/all/conanfile.py @@ -270,10 +270,9 @@ def validate_build(self): if self.settings.os == "Emscripten": raise ConanInvalidConfiguration(f"{self.ref} does not support Emscripten") - # TODO: resolve it later, since it is not critical for now - # Conan Center CI fails with our of memory error when building OpenVINO - if self.settings.build_type == "Debug": - raise ConanInvalidConfiguration(f"{self.ref} does not support Debug build type") + # Failing on Conan Center CI due to memory usage + if os.getenv("CONAN_CENTER_BUILD_SERVICE") and self.settings.build_type == "Debug": + raise ConanInvalidConfiguration(f"{self.ref} does not support Debug build type on Conan Center CI") def validate(self): if self.options.get_safe("enable_gpu") and not self.options.shared and self.options.enable_cpu: diff --git a/recipes/openvino/all/dependencies/dependencies-2024.3.0.yml b/recipes/openvino/all/dependencies/dependencies-2024.3.0.yml new file mode 100644 index 0000000000000..f99604741682a --- /dev/null +++ b/recipes/openvino/all/dependencies/dependencies-2024.3.0.yml @@ -0,0 +1 @@ +onnx: "1.15.0" diff --git a/recipes/openvino/config.yml b/recipes/openvino/config.yml index 2c38fc9d0cd69..6e20b31cea112 100644 --- a/recipes/openvino/config.yml +++ b/recipes/openvino/config.yml @@ -1,4 +1,6 @@ versions: + "2024.3.0": + folder: "all" "2024.2.0": folder: "all" "2024.1.0": diff --git a/recipes/pdf-writer/all/conandata.yml b/recipes/pdf-writer/all/conandata.yml index 6325de8b17065..0d800cc7a7750 100644 --- a/recipes/pdf-writer/all/conandata.yml +++ b/recipes/pdf-writer/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.6.7": + url: "https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.6.7.tar.gz" + sha256: "735c65d4685c5156f0876635f3bc1565700d0f648fbb1f384e46d186796c8bae" "4.6.6": url: "https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.6.6.tar.gz" sha256: "8343820313e553052df68c75fe2bf35353da2719106e81eb2a8b026ff96c7d7c" @@ -18,6 +21,10 @@ sources: url: "https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.5.12.tar.gz" sha256: "40fcbaa66fc46fcb588ceda119ba8839ff6d2c886191ac5e68ed702475c7336e" patches: + "4.6.7": + - patch_file: "patches/4.6.6-0001-fix-cmake.patch" + patch_description: "disable cpack" + patch_type: "conan" "4.6.6": - patch_file: "patches/4.6.6-0001-fix-cmake.patch" patch_description: "disable cpack" diff --git a/recipes/pdf-writer/config.yml b/recipes/pdf-writer/config.yml index 422e112234c81..36e4d583c87ad 100644 --- a/recipes/pdf-writer/config.yml +++ b/recipes/pdf-writer/config.yml @@ -1,4 +1,6 @@ versions: + "4.6.7": + folder: all "4.6.6": folder: all "4.6.4": diff --git a/recipes/perfetto/all/conandata.yml b/recipes/perfetto/all/conandata.yml index e5a1529e55186..ba5f88c572d8d 100644 --- a/recipes/perfetto/all/conandata.yml +++ b/recipes/perfetto/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "47.0": + url: "https://github.com/google/perfetto/archive/refs/tags/v47.0.tar.gz" + sha256: "9bbd38a0f074038bde6ccbcf5f2ff32587eb60faec254932268ecb6f17f18186" "45.0": url: "https://github.com/google/perfetto/archive/refs/tags/v45.0.tar.gz" sha256: "dcb815fb54370fa20a657552288016cb66e7a98237c1a1d47e7645a4325ac75e" diff --git a/recipes/perfetto/config.yml b/recipes/perfetto/config.yml index fd321949678ec..3e962804da06e 100644 --- a/recipes/perfetto/config.yml +++ b/recipes/perfetto/config.yml @@ -1,4 +1,6 @@ versions: + "47.0": + folder: all "45.0": folder: all "44.0": diff --git a/recipes/plutovg/all/conandata.yml b/recipes/plutovg/all/conandata.yml index 6ca1f29254c5b..fa45839bc7646 100644 --- a/recipes/plutovg/all/conandata.yml +++ b/recipes/plutovg/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.0.4": + url: "https://github.com/sammycage/plutovg/archive/refs/tags/v0.0.4.tar.gz" + sha256: "6d7c6ad1ef3cf0085e0a375b770590a8cea79d4754b732e892635639c5546076" "0.0.1": url: "https://github.com/sammycage/plutovg/archive/refs/tags/v0.0.1.tar.gz" sha256: "593653d226dd54dc322bc0874c19bd0a80314b5471ae4da6b9cd9e12211e3261" diff --git a/recipes/plutovg/config.yml b/recipes/plutovg/config.yml index f6f5b5679b9d4..e1a4f8d935403 100644 --- a/recipes/plutovg/config.yml +++ b/recipes/plutovg/config.yml @@ -1,3 +1,5 @@ versions: + "0.0.4": + folder: all "0.0.1": folder: all diff --git a/recipes/podofo/all/conandata.yml b/recipes/podofo/all/conandata.yml index 2735fdd5d425b..016e63cd90df6 100644 --- a/recipes/podofo/all/conandata.yml +++ b/recipes/podofo/all/conandata.yml @@ -2,15 +2,8 @@ sources: "0.9.7": url: "https://netcologne.dl.sourceforge.net/project/podofo/podofo/0.9.7/podofo-0.9.7.tar.gz" sha256: "7cf2e716daaef89647c54ffcd08940492fd40c385ef040ce7529396bfadc1eb8" - "0.9.6": - url: "https://netcologne.dl.sourceforge.net/project/podofo/podofo/0.9.6/podofo-0.9.6.tar.gz" - sha256: "e9163650955ab8e4b9532e7aa43b841bac45701f7b0f9b793a98c8ca3ef14072" patches: "0.9.7": - patch_file: "patches/0001-fix-cmake-0.9.7.patch" patch_description: "Link to conan libs and allow to build the tools without the tests and the examples" patch_type: "conan" - "0.9.6": - - patch_file: "patches/0001-fix-cmake-0.9.6.patch" - patch_description: "Link to conan libs and allow to build the tools without the tests and the examples" - patch_type: "conan" diff --git a/recipes/podofo/all/conanfile.py b/recipes/podofo/all/conanfile.py index 87fbb60fe26b7..365ade4380f35 100644 --- a/recipes/podofo/all/conanfile.py +++ b/recipes/podofo/all/conanfile.py @@ -1,4 +1,4 @@ -from conan import ConanFile +from conan import ConanFile, conan_version from conan.tools.build import check_min_cppstd, valid_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir @@ -62,26 +62,33 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("freetype/2.13.0") + self.requires("freetype/2.13.2") self.requires("zlib/[>=1.2.11 <2]") if self.settings.os != "Windows": - self.requires("fontconfig/2.14.2") + self.requires("fontconfig/2.15.0") if self.options.with_openssl: - self.requires("openssl/1.1.1u") + self.requires("openssl/[>=1.1 <4]") if self.options.with_libidn: self.requires("libidn/1.36") if self.options.with_jpeg: self.requires("libjpeg/9e") if self.options.with_tiff: - self.requires("libtiff/4.5.1") + self.requires("libtiff/4.6.0") if self.options.with_png: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.options.with_unistring: self.requires("libunistring/0.9.10") def validate(self): if self.info.settings.compiler.get_safe("cppstd") and Version(self.version) >= "0.9.7": check_min_cppstd(self, 11) + if conan_version.major >= 2 and Version(self.version) < "0.9.7": + # FIXME: linter complains, but function is there + # https://docs.conan.io/2.0/reference/tools/build.html?highlight=check_min_cppstd#conan-tools-build-check-max-cppstd + import sys + check_max_cppstd = getattr(sys.modules['conan.tools.build'], 'check_max_cppstd') + # INFO: error: no template named 'auto_ptr' in namespace 'std'. Removed in C++17. + check_max_cppstd(self, 14) def source(self): get(self, **self.conan_data["sources"][self.version], diff --git a/recipes/podofo/config.yml b/recipes/podofo/config.yml index ca2128b57488a..a6cc81e2fb933 100644 --- a/recipes/podofo/config.yml +++ b/recipes/podofo/config.yml @@ -1,5 +1,3 @@ versions: "0.9.7": folder: all - "0.9.6": - folder: all diff --git a/recipes/popt/1.19/conanfile.py b/recipes/popt/1.19/conanfile.py index a8a39dc69c064..77c06c30fce86 100755 --- a/recipes/popt/1.19/conanfile.py +++ b/recipes/popt/1.19/conanfile.py @@ -35,7 +35,7 @@ def config_options(self): def requirements(self): if self.settings.os == "Neutrino": - self.requires("libiconv/1.15") + self.requires("libiconv/1.17") def configure(self): if self.options.shared: diff --git a/recipes/poselib/all/conandata.yml b/recipes/poselib/all/conandata.yml new file mode 100644 index 0000000000000..32b5efa0b3081 --- /dev/null +++ b/recipes/poselib/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "2.0.4": + url: "https://github.com/PoseLib/PoseLib/archive/refs/tags/v2.0.4.tar.gz" + sha256: "caa0c1c9b882f6e36b5ced6f781406ed97d4c1f0f61aa31345ebe54633d67c16" + "2.0.3": + url: "https://github.com/PoseLib/PoseLib/archive/refs/tags/v2.0.3.tar.gz" + sha256: "ec52fe738a803e53c4cedc27f393a38b2dced63da6c73148e98965b338ca0efc" diff --git a/recipes/poselib/all/conanfile.py b/recipes/poselib/all/conanfile.py new file mode 100644 index 0000000000000..0282ec6f8bfdb --- /dev/null +++ b/recipes/poselib/all/conanfile.py @@ -0,0 +1,110 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" + + +class PoselibConan(ConanFile): + name = "poselib" + description = "PoseLib: minimal solvers for calibrated camera pose estimation" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/PoseLib/PoseLib" + topics = ("pose", "camera", "estimation", "solver") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "6", + "apple-clang": "10", + "msvc": "192", + "Visual Studio": "16", + } + + 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("eigen/3.4.0", transitive_headers=True, transitive_libs=True) + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + if self.settings.os == "Windows" and self.options.shared: + raise ConanInvalidConfiguration( + f"{self.ref} does not export symbols on Windows for a shared library build." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["MARCH_NATIVE"] = False + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def _patch_sources(self): + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") + replace_in_file(self, cmakelists, "-march=native -Wall -Werror -fPIC", "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "PoseLib") + self.cpp_info.set_property("cmake_target_name", "PoseLib::PoseLib") + + suffix = "d" if self.settings.build_type == "Debug" else "" + self.cpp_info.libs = ["PoseLib" + suffix] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/poselib/all/test_package/CMakeLists.txt b/recipes/poselib/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..ea7248e1ec70c --- /dev/null +++ b/recipes/poselib/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(PoseLib REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE PoseLib::PoseLib) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/poselib/all/test_package/conanfile.py b/recipes/poselib/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/poselib/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/poselib/all/test_package/test_package.cpp b/recipes/poselib/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..613b02cd52fa4 --- /dev/null +++ b/recipes/poselib/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include + +#include + +int main() { + std::vector x1(10, Eigen::Vector3d{}); + std::vector x2(10, Eigen::Vector3d{}); + Eigen::Matrix3d h; + int res = poselib::homography_4pt(x1, x2, &h); +} diff --git a/recipes/poselib/config.yml b/recipes/poselib/config.yml new file mode 100644 index 0000000000000..7776ab2d30335 --- /dev/null +++ b/recipes/poselib/config.yml @@ -0,0 +1,5 @@ +versions: + "2.0.4": + folder: all + "2.0.3": + folder: all diff --git a/recipes/premake/5.x/conanfile.py b/recipes/premake/5.x/conanfile.py index d4fa461153f3c..0a761c061731a 100644 --- a/recipes/premake/5.x/conanfile.py +++ b/recipes/premake/5.x/conanfile.py @@ -3,7 +3,7 @@ import re import shutil -from conan import ConanFile, conan_version +from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import cross_building from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, replace_in_file @@ -55,10 +55,6 @@ def requirements(self): def validate(self): if hasattr(self, "settings_build") and cross_building(self, skip_x64_x86=True): raise ConanInvalidConfiguration("Cross-building not implemented") - if conan_version.major == 1 and self.settings.build_type == "Debug": - # This configuration fails without any error messages in C3I. - # https://c3i.jfrog.io/artifactory/misc/logs/pr/18844/15-linux-clang/premake/5.0.0-alpha15/ - raise ConanInvalidConfiguration("Debug build not supported with Conan 1.x") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/premake/5.x/test_package/conanfile.py b/recipes/premake/5.x/test_package/conanfile.py index d2d508976967c..0cbf9e48678a6 100644 --- a/recipes/premake/5.x/test_package/conanfile.py +++ b/recipes/premake/5.x/test_package/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.cmake import cmake_layout +from conan.tools.build import can_run class TestPackageConan(ConanFile): @@ -10,8 +10,6 @@ class TestPackageConan(ConanFile): def build_requirements(self): self.tool_requires(self.tested_reference_str) - def layout(self): - cmake_layout(self) - def test(self): - self.run("premake5 --version") + if can_run(self): + self.run("premake5 --version") diff --git a/recipes/prometheus-cpp/all/conandata.yml b/recipes/prometheus-cpp/all/conandata.yml index a1e0c249c424c..0aa86dd0d07dd 100644 --- a/recipes/prometheus-cpp/all/conandata.yml +++ b/recipes/prometheus-cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.4": + url: "https://github.com/jupp0r/prometheus-cpp/archive/v1.2.4.tar.gz" + sha256: "48dbad454d314b836cc667ec4def93ec4a6e4255fc8387c20cacb3b8b6faee30" "1.1.0": url: "https://github.com/jupp0r/prometheus-cpp/archive/v1.1.0.tar.gz" sha256: "397544fe91e183029120b4eebcfab24ed9ec833d15850aae78fd5db19062d13a" diff --git a/recipes/prometheus-cpp/all/conanfile.py b/recipes/prometheus-cpp/all/conanfile.py index 10a8edf3a1e5e..09bc0c369ee74 100644 --- a/recipes/prometheus-cpp/all/conanfile.py +++ b/recipes/prometheus-cpp/all/conanfile.py @@ -4,7 +4,6 @@ from conan.tools.build import check_min_cppstd, valid_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.scm import Version -from conan.tools.microsoft import is_msvc, check_min_vs import os @@ -36,15 +35,19 @@ class PrometheusCppConan(ConanFile): @property def _min_cppstd(self): - return 11 if Version(self.version) < "1.1.0" else 14 + return "14" if Version(self.version) == "1.1.0" else "11" @property def _compilers_minimum_version(self): return { - "gcc": "7", - "clang": "7", - "apple-clang": "10", - } + "14": { + "gcc": "7", + "clang": "7", + "apple-clang": "10", + "Visual Studio": "15", + "msvc": "191", + }, + }.get(self._min_cppstd, {}) def export_sources(self): export_conandata_patches(self) @@ -73,18 +76,14 @@ def requirements(self): def validate(self): if self.info.settings.compiler.cppstd: check_min_cppstd(self, self._min_cppstd) - if Version(self.version) < "1.1.0": - return - check_min_vs(self, 191) - if not is_msvc(self): - minimum_version = self._compilers_minimum_version.get(str(self.info.settings.compiler), False) - if minimum_version and Version(self.info.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration( - f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." - ) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/prometheus-cpp/all/test_package/CMakeLists.txt b/recipes/prometheus-cpp/all/test_package/CMakeLists.txt index 0df7da5ba0a1f..f9aa39a0fc4fd 100644 --- a/recipes/prometheus-cpp/all/test_package/CMakeLists.txt +++ b/recipes/prometheus-cpp/all/test_package/CMakeLists.txt @@ -5,8 +5,8 @@ find_package(prometheus-cpp CONFIG REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE prometheus-cpp::push prometheus-cpp::pull) -if(${prometheus-cpp_VERSION} VERSION_LESS "1.1.0") - target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) -else() +if(${prometheus-cpp_VERSION} VERSION_EQUAL "1.1.0") target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) endif() diff --git a/recipes/prometheus-cpp/config.yml b/recipes/prometheus-cpp/config.yml index 3bfa3902dafa5..11d3240cb85c5 100644 --- a/recipes/prometheus-cpp/config.yml +++ b/recipes/prometheus-cpp/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.4": + folder: all "1.1.0": folder: all "1.0.1": diff --git a/recipes/pybind11/all/conandata.yml b/recipes/pybind11/all/conandata.yml index c44f76e084fcf..5ff5ec72e5c37 100644 --- a/recipes/pybind11/all/conandata.yml +++ b/recipes/pybind11/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "2.13.5": + url: "https://github.com/pybind/pybind11/archive/v2.13.5.tar.gz" + sha256: "b1e209c42b3a9ed74da3e0b25a4f4cd478d89d5efbb48f04b277df427faf6252" + "2.13.4": + url: "https://github.com/pybind/pybind11/archive/v2.13.4.tar.gz" + sha256: "efc901aa0aab439a3fea6efeaf930b5a349fb06394bf845c64ce15a9cf8f0240" + "2.13.2": + url: "https://github.com/pybind/pybind11/archive/v2.13.2.tar.gz" + sha256: "50eebef369d28f07ce1fe1797f38149e5928817be8e539239f2aadfd95b227f3" "2.13.1": url: "https://github.com/pybind/pybind11/archive/v2.13.1.tar.gz" sha256: "51631e88960a8856f9c497027f55c9f2f9115cafb08c0005439838a05ba17bfc" diff --git a/recipes/pybind11/config.yml b/recipes/pybind11/config.yml index 975b39f3ad740..2aa582761dc4a 100644 --- a/recipes/pybind11/config.yml +++ b/recipes/pybind11/config.yml @@ -1,4 +1,10 @@ versions: + "2.13.5": + folder: all + "2.13.4": + folder: all + "2.13.2": + folder: all "2.13.1": folder: all "2.12.0": diff --git a/recipes/qcbor/all/conandata.yml b/recipes/qcbor/all/conandata.yml index 50bed9fddeba6..4df224b3ac475 100644 --- a/recipes/qcbor/all/conandata.yml +++ b/recipes/qcbor/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.1": + url: "https://github.com/laurencelundblade/QCBOR/archive/refs/tags/v1.4.1.tar.gz" + sha256: "c7ef031b60b23bf8ede47c66c9713982bba2608668b144280a65665bfcc94470" "1.3": url: "https://github.com/laurencelundblade/QCBOR/archive/refs/tags/v1.3.tar.gz" sha256: "5acd3f3e7b19aad074813736a8776e71859d57c4dec9bfb85cd1dc6c219c8033" @@ -12,6 +15,10 @@ sources: url: "https://github.com/laurencelundblade/QCBOR/archive/refs/tags/v1.0.tar.gz" sha256: "961a46eb5a599cc040bfce4f4fade4427e046f1748f37ba4ebbc097fb9cdf1d3" patches: + "1.4.1": + - patch_file: "patches/1.4.1-0001-fix-cmake.patch" + patch_description: "disable fix fPIC and add installation" + patch_type: "conan" "1.3": - patch_file: "patches/1.2-0001-fix-cmake.patch" patch_description: "disable fix fPIC and add installation" diff --git a/recipes/qcbor/all/conanfile.py b/recipes/qcbor/all/conanfile.py index 7d87de4445169..6c8cca49e3526 100644 --- a/recipes/qcbor/all/conanfile.py +++ b/recipes/qcbor/all/conanfile.py @@ -15,6 +15,7 @@ class QCBORConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/laurencelundblade/QCBOR" topics = ("serialization", "cbor", "rfc-7049", "rfc-8949") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -38,20 +39,23 @@ def config_options(self): del self.options.disable_float def configure(self): - if self.options.shared: + if self.settings.os == "Windows": + self.package_type = "static-library" + del self.options.shared + if self.options.get_safe("shared"): self.options.rm_safe("fPIC") self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") - def layout(self): cmake_layout(self, src_folder="src") def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) + tc.variables["BUILD_QCBOR_TEST"] = False if Version(self.version) >= "1.2": tc.variables["QCBOR_OPT_DISABLE_FLOAT_HW_USE"] = self.options.disable_float in ["HW_USE", "PREFERRED", "ALL"] tc.variables["QCBOR_OPT_DISABLE_FLOAT_PREFERRED"] = self.options.disable_float in ["PREFERRED", "ALL"] diff --git a/recipes/qcbor/all/patches/1.0-0001-fix-cmake.patch b/recipes/qcbor/all/patches/1.0-0001-fix-cmake.patch index d5f6fcb7e4dba..87fc6cae3601f 100644 --- a/recipes/qcbor/all/patches/1.0-0001-fix-cmake.patch +++ b/recipes/qcbor/all/patches/1.0-0001-fix-cmake.patch @@ -2,14 +2,10 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a5bcd0..744662e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -17,3 +17,18 @@ set(SOURCE +@@ -17,3 +17,14 @@ set(SOURCE ) add_library(qcbor ${SOURCE}) -+set_target_properties(qcbor PROPERTIES -+ WINDOWS_EXPORT_ALL_SYMBOLS ON -+) -+ +find_library(LIBM m) +target_link_libraries(qcbor PRIVATE $<$:${LIBM}>) + diff --git a/recipes/qcbor/all/patches/1.1-0001-fix-cmake.patch b/recipes/qcbor/all/patches/1.1-0001-fix-cmake.patch index e5969488c2420..ca95e01302dce 100644 --- a/recipes/qcbor/all/patches/1.1-0001-fix-cmake.patch +++ b/recipes/qcbor/all/patches/1.1-0001-fix-cmake.patch @@ -2,15 +2,10 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index f0b67b9..4b00b8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -17,3 +17,19 @@ set(SOURCE +@@ -17,3 +17,14 @@ set(SOURCE add_library(qcbor ${SOURCE}) target_include_directories(qcbor PUBLIC inc) -+ -+set_target_properties(qcbor PROPERTIES -+ WINDOWS_EXPORT_ALL_SYMBOLS ON -+) -+ +find_library(LIBM m) +target_link_libraries(qcbor PRIVATE $<$:${LIBM}>) + diff --git a/recipes/qcbor/all/patches/1.2-0001-fix-cmake.patch b/recipes/qcbor/all/patches/1.2-0001-fix-cmake.patch index 8b659e24ca0a3..f50844b0bec9a 100644 --- a/recipes/qcbor/all/patches/1.2-0001-fix-cmake.patch +++ b/recipes/qcbor/all/patches/1.2-0001-fix-cmake.patch @@ -2,7 +2,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 486946c..4234a59 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -58,10 +58,14 @@ target_compile_definitions(qcbor +@@ -58,10 +58,10 @@ target_compile_definitions(qcbor $<$:USEFULBUF_DISABLE_ALL_FLOAT> ) @@ -11,14 +11,10 @@ index 486946c..4234a59 100644 target_compile_options(qcbor PRIVATE -Os -fPIC) endif() -+set_target_properties(qcbor PROPERTIES -+ WINDOWS_EXPORT_ALL_SYMBOLS ON -+) -+ # The math library is needed for floating-point support. # To avoid need for it #define QCBOR_DISABLE_FLOAT_HW_USE if (CMAKE_C_COMPILER_ID STREQUAL "GNU") -@@ -75,3 +79,12 @@ endif() +@@ -75,3 +75,12 @@ endif() if (NOT BUILD_QCBOR_TEST STREQUAL "OFF") add_subdirectory(test) endif() diff --git a/recipes/qcbor/all/patches/1.4.1-0001-fix-cmake.patch b/recipes/qcbor/all/patches/1.4.1-0001-fix-cmake.patch new file mode 100644 index 0000000000000..81b3950d82ca7 --- /dev/null +++ b/recipes/qcbor/all/patches/1.4.1-0001-fix-cmake.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e4aa83f..4878a31 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,10 +58,10 @@ target_compile_definitions(qcbor + $<$:USEFULBUF_DISABLE_ALL_FLOAT> + ) + +-if (BUILD_SHARED_LIBS) ++if (0) + target_compile_options(qcbor PRIVATE -Os -fPIC) + endif() + + # The math library is needed for floating-point support. + # To avoid need for it #define QCBOR_DISABLE_FLOAT_HW_USE + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") +@@ -88,6 +88,9 @@ set_target_properties( + include(GNUInstallDirs) + install( + TARGETS qcbor ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/qcbor" + ) + diff --git a/recipes/qcbor/config.yml b/recipes/qcbor/config.yml index 2bbd629f9a807..92a8a4234a53e 100644 --- a/recipes/qcbor/config.yml +++ b/recipes/qcbor/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.1": + folder: all "1.3": folder: all "1.2": diff --git a/recipes/qt/5.x.x/conandata.yml b/recipes/qt/5.x.x/conandata.yml index b12be53bf6b58..16b0489abd752 100644 --- a/recipes/qt/5.x.x/conandata.yml +++ b/recipes/qt/5.x.x/conandata.yml @@ -32,6 +32,9 @@ patches: "patch_file": "patches/fix-macdeployqt.diff" - "base_path": "qt5/qtwebengine/src/3rdparty" "patch_file": "patches/0001-Find-fontconfig-using-pkg-config.patch" + - "base_path": "qt5/qtwebengine/src/3rdparty" + "patch_file": "patches/Fix-errors-and-warnings-for-perfetto.patch" + "patch_description": "Fix qtwebengine build issues for vs 2022 (backport QTBUG-117073)" - "base_path": "qt5/qtbase" "patch_file": "patches/android-openssl.diff" - "base_path": "qt5/qtbase" @@ -45,3 +48,20 @@ patches: "patch_file": "patches/5.15.12-fix-macos-cpp-lib-memory-resource.patch" "patch_source": "https://codereview.qt-project.org/c/qt/qtbase/+/482392" "patch_type": "portability" + - "base_path": "qt5/qtwebengine" + "patch_description": "qtwebengine don't use rpath-link on macOS" + "patch_file": "patches/5.15.14-macos-qtwebengine-rpath-link.patch" + - "base_path": "qt5/qtlocation" + "patch_description": "qtlocation missing utility header" + "patch_file": "patches/5.15.14-macos-qtlocation-utility-header.patch" + - "base_path": "qt5/qtwebengine/src/3rdparty" + "patch_description": "qtwebengine fix missing headers" + "patch_file": "patches/5.15.14-qtwebengine-missing-deps.patch" + - "base_path": "qt5/qtwebengine/src/3rdparty" + "patch_description": "macos fix chromium build in newer macos SDKs" + "patch_file": "patches/5.15.14-macos-chromium-newer-sdks.patch" + - "patch_file": "patches/ffmpeg-x86-optimization.patch" + "base_path": "qt5/qtwebengine" + "patch_description": "Fix build error with binutils >= 2.41" + "patch_type": "portability" + "patch_source": "https://packages.ubuntu.com/source/focal-updates/qtwebengine-opensource-src" diff --git a/recipes/qt/5.x.x/conanfile.py b/recipes/qt/5.x.x/conanfile.py index dfe46275f3a61..0ad50b6ce723c 100644 --- a/recipes/qt/5.x.x/conanfile.py +++ b/recipes/qt/5.x.x/conanfile.py @@ -1,4 +1,4 @@ -from conan import ConanFile +from conan import ConanFile, conan_version from conan.errors import ConanException, ConanInvalidConfiguration from conan.tools.android import android_abi from conan.tools.apple import is_apple_os @@ -123,9 +123,10 @@ class QtConan(ConanFile): "sysroot": None, "config": None, "multiconfiguration": False, - "essential_modules": not os.getenv('CONAN_CENTER_BUILD_SERVICE') } - default_options.update({f"{status}_modules": False for status in _module_statuses if status != "essential"}) + # essential_modules, addon_modules, deprecated_modules, preview_modules: + # these are only provided for convenience, set to False by default + default_options.update({f"{status}_modules": False for status in _module_statuses}) no_copy_source = True short_paths = True @@ -207,6 +208,10 @@ def config_options(self): if self.settings.os != "Android": del self.options.android_sdk + def _debug_output(self, message): + if Version(conan_version) >= "2": + self.output.debug(message) + def configure(self): # if self.settings.os != "Linux": # self.options.with_libiconv = False # QTBUG-84708 @@ -249,25 +254,50 @@ def configure(self): for m in submodules_tree: assert m in ["qtbase", "qtqa", "qtrepotools"] or m in self._submodules, "module %s is not present in recipe options : (%s)" % (m, ",".join(self._submodules)) - for m in self._submodules: - if m not in submodules_tree: - delattr(self.options, m) + for module in self._submodules: + if module not in submodules_tree: + self._debug_output(f"qt5: removing {module} from options as it is not an option for this version, or it is ignored or obsolete") + self.options.rm_safe(module) + + # Requested modules: + # - any module for non-removed options that have 'True' value + # - any enabled via `xxx_modules` that does not have a 'False' value + # Note that at this point, the submodule options dont have a value unless one is given externally + # to the recipe (e.g. via the command line, a profile, or a consumer) + requested_modules = set([module for module in self._submodules if self.options.get_safe(module)]) + for module in [m for m in self._submodules if m in submodules_tree]: + status = submodules_tree[module]['status'] + is_disabled = self.options.get_safe(module) == False + if self.options.get_safe(f"{status}_modules"): + if not is_disabled: + requested_modules.add(module) + else: + self.output.warning(f"qt5: {module} requested because {status}_modules=True" + f" but it has been explicitly disabled with {module}=False") - def _enablemodule(mod): - if mod != "qtbase": - setattr(self.options, mod, True) - for req in submodules_tree[mod]["depends"]: - _enablemodule(req) + self.output.info(f"qt5: requested modules {list(requested_modules)}") - for module in self._submodules: - if self.options.get_safe(module): - _enablemodule(module) - else: - if module in submodules_tree: - for status in self._module_statuses: - if getattr(self.options, f"{status}_modules") and submodules_tree[module]['status'] == status: - _enablemodule(module) - break + required_modules = {} + for module in requested_modules: + deps = submodules_tree[module]["depends"] + for dep in deps: + required_modules.setdefault(dep,[]).append(module) + + required_but_disabled = [m for m in required_modules.keys() if self.options.get_safe(m) == False] + if required_modules: + self._debug_output(f"qt5: required_modules modules {list(required_modules.keys())}") + if required_but_disabled: + required_by = set() + for m in required_but_disabled: + required_by.update(required_modules[m]) + raise ConanInvalidConfiguration(f"Modules {required_but_disabled} are explicitly disabled, " + f"but are required by {list(required_by)}, enabled by other options") + + enabled_modules = requested_modules.union(set(required_modules.keys())) + enabled_modules.discard("qtbase") + + for module in list(enabled_modules): + setattr(self.options, module, True) for module in self._submodules: if module in self.options and not self.options.get_safe(module): @@ -283,6 +313,16 @@ def _enablemodule(mod): if self.options.qtwebengine: self.options.with_fontconfig = True + for status in self._module_statuses: + # These are convenience only, should not affect package_id + option_name = f"{status}_modules" + self._debug_output(f"qt5 removing convenience option: {option_name}," + f" see individual module options") + self.options.rm_safe(option_name) + + for option in self.options.items(): + self._debug_output(f"qt5 option {option[0]}={option[1]}") + def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, "11") @@ -438,8 +478,6 @@ def package_id(self): self.info.settings.compiler.runtime_type = "Release/Debug" if self.info.settings.os == "Android": del self.info.options.android_sdk - for status in self._module_statuses: - delattr(self.info.options, f"{status}_modules") def build_requirements(self): if self._settings_build.os == "Windows" and is_msvc(self): @@ -821,6 +859,13 @@ def _getenvpath(var): # see https://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-rpathdir args += [f"QMAKE_RPATHDIR+=\"{libpath}\""] + if self.settings.compiler == "apple-clang" and self.options.qtmultimedia: + # XCode 14.3 finally removes std::unary_function, so compilation fails + # when using newer SDKs when using C++17 or higher. + # This macro re-enables them. Should be safe to pass this macro even + # in earlier versions, as it would have no effect. + args += ['QMAKE_CXXFLAGS+="-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION=1"'] + if self.options.qtwebengine and self.settings.os in ["Linux", "FreeBSD"]: args += ["-qt-webengine-ffmpeg", "-system-webengine-opus", diff --git a/recipes/qt/5.x.x/patches/5.15.14-macos-chromium-newer-sdks.patch b/recipes/qt/5.x.x/patches/5.15.14-macos-chromium-newer-sdks.patch new file mode 100644 index 0000000000000..cb5ec1fca2189 --- /dev/null +++ b/recipes/qt/5.x.x/patches/5.15.14-macos-chromium-newer-sdks.patch @@ -0,0 +1,13 @@ +diff --git a/chromium/base/strings/utf_string_conversions.cc b/chromium/base/strings/utf_string_conversions.cc +index 12ed1f3e0..004ac6855 100644 +--- a/chromium/base/strings/utf_string_conversions.cc ++++ b/chromium/base/strings/utf_string_conversions.cc +@@ -15,7 +15,7 @@ + #include "base/third_party/icu/icu_utf.h" + #include "build/build_config.h" + +-#if defined(OS_MAC) ++#if defined(OS_MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 120300 + namespace std { + inline namespace __1 { + template class basic_string; diff --git a/recipes/qt/5.x.x/patches/5.15.14-macos-qtlocation-utility-header.patch b/recipes/qt/5.x.x/patches/5.15.14-macos-qtlocation-utility-header.patch new file mode 100644 index 0000000000000..000965fda4346 --- /dev/null +++ b/recipes/qt/5.x.x/patches/5.15.14-macos-qtlocation-utility-header.patch @@ -0,0 +1,13 @@ +diff --git a/src/3rdparty/mapbox-gl-native/include/mbgl/util/unique_any.hpp b/src/3rdparty/mapbox-gl-native/include/mbgl/util/unique_any.hpp +index c7dc8b38e..d9e3709b1 100644 +--- a/src/3rdparty/mapbox-gl-native/include/mbgl/util/unique_any.hpp ++++ b/src/3rdparty/mapbox-gl-native/include/mbgl/util/unique_any.hpp +@@ -3,6 +3,8 @@ + #include + #include + #include ++#include ++ + namespace mbgl { + namespace util { + \ No newline at end of file diff --git a/recipes/qt/5.x.x/patches/5.15.14-macos-qtwebengine-rpath-link.patch b/recipes/qt/5.x.x/patches/5.15.14-macos-qtwebengine-rpath-link.patch new file mode 100644 index 0000000000000..2fb28c93ca411 --- /dev/null +++ b/recipes/qt/5.x.x/patches/5.15.14-macos-qtwebengine-rpath-link.patch @@ -0,0 +1,13 @@ +diff --git a/mkspecs/features/gn_generator.prf b/mkspecs/features/gn_generator.prf +index 306e58db1..a42059e82 100644 +--- a/mkspecs/features/gn_generator.prf ++++ b/mkspecs/features/gn_generator.prf +@@ -166,7 +166,7 @@ for (flag, GN_FLAGS): GN_CONTENTS += " \"$$flag\"," + unix:!macos: GN_CONTENTS += " \"-Wl,-rpath=$${rpath}\"," + } + } +-!isEmpty(QMAKE_RPATHLINKDIR): GN_CONTENTS += " \"-Wl,-rpath-link=$${QMAKE_RPATHLINKDIR}\"," ++!isEmpty(QMAKE_LFLAGS_RPATHLINK):!isEmpty(QMAKE_RPATHLINKDIR): GN_CONTENTS += " \"-Wl,-rpath-link=$${QMAKE_RPATHLINKDIR}\"," + GN_CONTENTS += " ]" + + GN_CONTENTS += " lib_dirs = [" diff --git a/recipes/qt/5.x.x/patches/5.15.14-qtwebengine-missing-deps.patch b/recipes/qt/5.x.x/patches/5.15.14-qtwebengine-missing-deps.patch new file mode 100644 index 0000000000000..fafd46513f4b8 --- /dev/null +++ b/recipes/qt/5.x.x/patches/5.15.14-qtwebengine-missing-deps.patch @@ -0,0 +1,12 @@ +diff --git a/chromium/content/public/browser/BUILD.gn b/chromium/content/public/browser/BUILD.gn +index 7cf82a4..0e0dda2 100644 +--- a/chromium/content/public/browser/BUILD.gn ++++ b/chromium/content/public/browser/BUILD.gn +@@ -469,6 +469,7 @@ jumbo_source_set("browser_sources") { + "//build:chromeos_buildflags", + "//cc", + "//components/viz/host", ++ "//components/spellcheck:buildflags", + "//content/browser", # Must not be public_deps! + "//device/fido", + "//gpu", diff --git a/recipes/qt/5.x.x/patches/Fix-errors-and-warnings-for-perfetto.patch b/recipes/qt/5.x.x/patches/Fix-errors-and-warnings-for-perfetto.patch new file mode 100644 index 0000000000000..abd82e1674e40 --- /dev/null +++ b/recipes/qt/5.x.x/patches/Fix-errors-and-warnings-for-perfetto.patch @@ -0,0 +1,101 @@ +From 851cd7c7a079fa5da63770c49724036e8338e813 Mon Sep 17 00:00:00 2001 +From: Michal Klocek +Date: Wed, 20 Sep 2023 07:45:29 +0200 +Subject: [PATCH] Fix errors and warnings for perfetto +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf8 +Content-Transfer-Encoding: 8bit + +It seems newest msvc compiler does not like perfetto circualar queue +const iterator, which ends in issues with std::swap of std::sort. +Make sure it is non const. + +Fix warnings. + +Deals with: "error C2672: 'swap': no matching overloaded function +found." + +Fixes: QTBUG-117073 +Change-Id: I02901e61a1bb8863d72ca02a0ccd841e54309d6e +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/505412 +Reviewed-by: Martin Negyokru +Reviewed-by: Michael Brüning +--- + .../perfetto/include/perfetto/ext/base/circular_queue.h | 9 ++------- + .../third_party/perfetto/src/trace_processor/storage/metadata.h | 2 ++ + .../third_party/perfetto/src/trace_processor/storage/stats.h | 2 ++ + .../perfetto/src/trace_processor/tables/macros_internal.h | 2 ++ + 4 files changed, 8 insertions(+), 7 deletions(-) + +diff --git a/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h b/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h +index 18ca7702614..ec46e69f817 100644 +--- a/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h ++++ b/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h +@@ -67,19 +67,14 @@ class CircularQueue { + ignore_result(generation); + } + +- T* operator->() { ++ T* operator->() const { + #if PERFETTO_DCHECK_IS_ON() + PERFETTO_DCHECK(generation_ == queue_->generation()); + #endif + return queue_->Get(pos_); + } + +- const T* operator->() const { +- return const_cast::Iterator*>(this)->operator->(); +- } +- +- T& operator*() { return *(operator->()); } +- const T& operator*() const { return *(operator->()); } ++ T& operator*() const { return *(operator->()); } + + value_type& operator[](difference_type i) { return *(*this + i); } + +diff --git a/chromium/third_party/perfetto/src/trace_processor/storage/metadata.h b/chromium/third_party/perfetto/src/trace_processor/storage/metadata.h +index 4796ae4edcd..30e534b216b 100644 +--- a/chromium/third_party/perfetto/src/trace_processor/storage/metadata.h ++++ b/chromium/third_party/perfetto/src/trace_processor/storage/metadata.h +@@ -59,8 +59,10 @@ namespace metadata { + F(kMulti, "multi") + // clang-format + ++#if PERFETTO_BUILDFLAG(PERFETTO_COMPILER_GCC) + // Ignore GCC warning about a missing argument for a variadic macro parameter. + #pragma GCC system_header ++#endif + + #define PERFETTO_TP_META_TYPE_ENUM(varname, ...) varname + enum class KeyType : size_t { +diff --git a/chromium/third_party/perfetto/src/trace_processor/storage/stats.h b/chromium/third_party/perfetto/src/trace_processor/storage/stats.h +index 7f14803244e..30b56c62544 100644 +--- a/chromium/third_party/perfetto/src/trace_processor/storage/stats.h ++++ b/chromium/third_party/perfetto/src/trace_processor/storage/stats.h +@@ -189,7 +189,9 @@ enum Source { + }; + + // Ignore GCC warning about a missing argument for a variadic macro parameter. ++#if PERFETTO_BUILDFLAG(PERFETTO_COMPILER_GCC) + #pragma GCC system_header ++#endif + + // Declares an enum of literals (one for each stat). The enum values of each + // literal corresponds to the string index in the arrays below. +diff --git a/chromium/third_party/perfetto/src/trace_processor/tables/macros_internal.h b/chromium/third_party/perfetto/src/trace_processor/tables/macros_internal.h +index 875efd62e0d..1ca5068cc32 100644 +--- a/chromium/third_party/perfetto/src/trace_processor/tables/macros_internal.h ++++ b/chromium/third_party/perfetto/src/trace_processor/tables/macros_internal.h +@@ -140,7 +140,9 @@ class MacroTable : public Table { + } // namespace macros_internal + + // Ignore GCC warning about a missing argument for a variadic macro parameter. ++#if PERFETTO_BUILDFLAG(PERFETTO_COMPILER_GCC) + #pragma GCC system_header ++#endif + + // Basic helper macros. + #define PERFETTO_TP_NOOP(...) +-- +2.16.3 + diff --git a/recipes/qt/5.x.x/patches/ffmpeg-x86-optimization.patch b/recipes/qt/5.x.x/patches/ffmpeg-x86-optimization.patch new file mode 100644 index 0000000000000..cff8df9a43395 --- /dev/null +++ b/recipes/qt/5.x.x/patches/ffmpeg-x86-optimization.patch @@ -0,0 +1,64 @@ +Description: avcodec/x86/mathops: clip constants used with shift instructions within inline assembly + Fixes assembling with gas from binutils >= 2.41. +Origin: upstream, https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/effadce6c756247e +Bug: https://bugs.debian.org/1038132 +Last-Update: 2023-07-21 + +--- a/src/3rdparty/chromium/third_party/ffmpeg/libavcodec/x86/mathops.h ++++ b/src/3rdparty/chromium/third_party/ffmpeg/libavcodec/x86/mathops.h +@@ -35,12 +35,20 @@ + static av_always_inline av_const int MULL(int a, int b, unsigned shift) + { + int rt, dummy; ++ if (__builtin_constant_p(shift)) + __asm__ ( + "imull %3 \n\t" + "shrdl %4, %%edx, %%eax \n\t" + :"=a"(rt), "=d"(dummy) +- :"a"(a), "rm"(b), "ci"((uint8_t)shift) ++ :"a"(a), "rm"(b), "i"(shift & 0x1F) + ); ++ else ++ __asm__ ( ++ "imull %3 \n\t" ++ "shrdl %4, %%edx, %%eax \n\t" ++ :"=a"(rt), "=d"(dummy) ++ :"a"(a), "rm"(b), "c"((uint8_t)shift) ++ ); + return rt; + } + +@@ -113,19 +121,31 @@ __asm__ volatile(\ + // avoid +32 for shift optimization (gcc should do that ...) + #define NEG_SSR32 NEG_SSR32 + static inline int32_t NEG_SSR32( int32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("sarl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("sarl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + + #define NEG_USR32 NEG_USR32 + static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("shrl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("shrl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + diff --git a/recipes/qt/6.x.x/conanfile.py b/recipes/qt/6.x.x/conanfile.py index 15b0c62488f23..508b43c683f44 100644 --- a/recipes/qt/6.x.x/conanfile.py +++ b/recipes/qt/6.x.x/conanfile.py @@ -4,7 +4,7 @@ import platform import textwrap -from conan import ConanFile +from conan import ConanFile, conan_version from conan.tools.apple import is_apple_os from conan.tools.build import cross_building, check_min_cppstd, default_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout @@ -122,9 +122,10 @@ class QtConan(ConanFile): "sysroot": None, "multiconfiguration": False, "disabled_features": "", - "essential_modules": not os.getenv('CONAN_CENTER_BUILD_SERVICE') } - default_options.update({f"{status}_modules": False for status in _module_statuses if status != "essential"}) + # essential_modules, addon_modules, deprecated_modules, preview_modules: + # these are only provided for convenience, set to False by default + default_options.update({f"{status}_modules": False for status in _module_statuses}) short_paths = True @@ -182,9 +183,10 @@ def config_options(self): if self.settings.os != "Linux": self.options.qtwayland = False - for m in self._submodules: - if m not in self._get_module_tree: - delattr(self.options, m) + for submodule in self._submodules: + if submodule not in self._get_module_tree: + self._debug_output(f"Qt6: Removing {submodule} option as it is not in the module tree for this version, or is marked as obsolete or ignore") + self.options.rm_safe(submodule) @property def _minimum_compilers_version(self): @@ -197,6 +199,10 @@ def _minimum_compilers_version(self): "apple-clang": "12" if Version(self.version) >= "6.5.0" else "11" } + def _debug_output(self, message): + if Version(conan_version) >= "2": + self.output.debug(message) + def configure(self): if not self.options.gui: del self.options.opengl @@ -213,28 +219,48 @@ def configure(self): if self.options.multiconfiguration: del self.settings.build_type - def _enablemodule(mod): - if mod != "qtbase": - setattr(self.options, mod, True) - for req in self._get_module_tree[mod]["depends"]: - _enablemodule(req) - - # enable all modules which are - # - required by a module explicitely enabled by the consumer - for module_name, module in self._get_module_tree.items(): - if getattr(self.options, module_name): - _enablemodule(module_name) - else: - for status in self._module_statuses: - if getattr(self.options, f"{status}_modules") and module['status'] == status: - _enablemodule(module_name) - break - - # disable all modules which are: - # - not explicitely enabled by the consumer and - # - not required by a module explicitely enabled by the consumer - for module in self._get_module_tree: - if getattr(self.options, module).value is None: + # Requested modules: + # - any module for non-removed options that have 'True' value + # - any enabled via `xxx_modules` that does not have a 'False' value + # Note that at this point, the submodule options dont have a value unless one is given externally + # to the recipe (e.g. via the command line, a profile, or a consumer) + requested_modules = set([module for module in self._submodules if self.options.get_safe(module)]) + for module in [m for m in self._submodules if m in self._get_module_tree]: + status = self._get_module_tree[module]['status'] + is_disabled = self.options.get_safe(module) == False + if self.options.get_safe(f"{status}_modules"): + if not is_disabled: + requested_modules.add(module) + else: + self.output.warning(f"qt6: {module} requested because {status}_modules=True" + f" but it has been explicitly disabled with {module}=False") + + self.output.info(f"qt6: requested modules {list(requested_modules)}") + + required_modules = {} + for module in requested_modules: + deps = self._get_module_tree[module]["depends"] + for dep in deps: + required_modules.setdefault(dep,[]).append(module) + + required_but_disabled = [m for m in required_modules.keys() if self.options.get_safe(m) == False] + if required_modules: + self._debug_output(f"qt6: required_modules modules {list(required_modules.keys())}") + if required_but_disabled: + required_by = set() + for m in required_but_disabled: + required_by.update(required_modules[m]) + raise ConanInvalidConfiguration(f"Modules {required_but_disabled} are explicitly disabled, " + f"but are required by {list(required_by)}, enabled by other options") + + enabled_modules = requested_modules.union(set(required_modules.keys())) + enabled_modules.discard("qtbase") + + for module in list(enabled_modules): + setattr(self.options, module, True) + + for module in self._submodules: + if module in self.options and not self.options.get_safe(module): setattr(self.options, module, False) if not self.options.get_safe("qtmultimedia"): @@ -247,6 +273,16 @@ def _enablemodule(mod): if self.options.get_safe("qtwebengine"): self.options.with_fontconfig = True + for status in self._module_statuses: + # These are convenience only, should not affect package_id + option_name = f"{status}_modules" + self._debug_output(f"qt6 removing convenience option: {option_name}," + f" see individual module options") + self.options.rm_safe(option_name) + + for option in self.options.items(): + self._debug_output(f"qt6 option: {option}") + def validate(self): if os.getenv('CONAN_CENTER_BUILD_SERVICE') is not None: if self.info.settings.compiler == "gcc" and Version(self.info.settings.compiler.version) >= "11" or \ @@ -268,9 +304,6 @@ def validate(self): if Version(self.version) >= "6.6.1" and self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "13.1": raise ConanInvalidConfiguration("apple-clang >= 13.1 is required by qt >= 6.6.1 cf QTBUG-119490") - if self.settings.os == "Macos" and self.dependencies["double-conversion"].options.shared: - raise ConanInvalidConfiguration("Test recipe fails because of Macos' SIP. Contributions are welcome.") - if self.options.get_safe("qtwebengine"): if not self.options.shared: raise ConanInvalidConfiguration("Static builds of Qt WebEngine are not supported") @@ -330,7 +363,12 @@ def requirements(self): if self.options.with_pcre2: self.requires("pcre2/10.42") if self.options.get_safe("with_vulkan"): - self.requires("vulkan-loader/1.3.268.0") + # Note: the versions of vulkan-loader and moltenvk + # must be exactly part of the same Vulkan SDK version + # do not update either without checking both + # require exactly the same version of vulkan-headers + self.requires("vulkan-loader/1.3.239.0") + self.requires("vulkan-headers/1.3.239.0", transitive_headers=True) if is_apple_os(self): self.requires("moltenvk/1.2.2") if self.options.with_glib: @@ -524,6 +562,9 @@ def generate(self): if not self.options.with_zstd: tc.variables["CMAKE_DISABLE_FIND_PACKAGE_WrapZSTD"] = "ON" + if not self.options.get_safe("with_vulkan"): + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_WrapVulkanHeaders"] = "ON" + # Prevent finding LibClang from the system # this is needed by the QDoc tool inside Qt Tools # See: https://github.com/conan-io/conan-center-index/issues/24729#issuecomment-2255291495 @@ -649,8 +690,6 @@ def package_id(self): self.info.settings.compiler.runtime_type = "Release/Debug" if self.info.settings.os == "Android": del self.info.options.android_sdk - for status in self._module_statuses: - delattr(self.info.options, f"{status}_modules") def source(self): destination = self.source_folder @@ -687,6 +726,13 @@ def source(self): "qt_auto_detect_vcpkg()", "# qt_auto_detect_vcpkg()") + # Handle locating moltenvk headers when vulkan is enabled on macOS + replace_in_file(self, os.path.join(self.source_folder, "qtbase", "cmake", "FindWrapVulkanHeaders.cmake"), + "if(APPLE)", "if(APPLE)\n" + " find_package(moltenvk REQUIRED QUIET)\n" + " target_include_directories(WrapVulkanHeaders::WrapVulkanHeaders INTERFACE ${moltenvk_INCLUDE_DIR})" + ) + def _xplatform(self): if self.settings.os == "Linux": if self.settings.compiler == "gcc": @@ -808,8 +854,6 @@ def package(self): if self.settings.os == "Macos": save(self, ".qmake.stash", "") save(self, ".qmake.super", "") - copy(self, "Info.plist.app.in", src=os.path.join(self.package_folder, "lib", "cmake", "Qt6", "macos"), - dst=os.path.join(self.package_folder, "res", "macos")) cmake = CMake(self) cmake.install() copy(self, "*LICENSE*", self.source_folder, os.path.join(self.package_folder, "licenses"), @@ -845,7 +889,7 @@ def package(self): filecontents += f"set(QT_VERSION_MINOR {ver.minor})\n" filecontents += f"set(QT_VERSION_PATCH {ver.patch})\n" if self.settings.os == "Macos": - filecontents += f'set(__qt_internal_cmake_apple_support_files_path "${{CMAKE_CURRENT_LIST_DIR}}/../../../res/macos")\n' + filecontents += 'set(__qt_internal_cmake_apple_support_files_path "${CMAKE_CURRENT_LIST_DIR}/../../../lib/cmake/Qt6/macos")\n' targets = ["moc", "rcc", "tracegen", "cmake_automoc_parser", "qlalr", "qmake"] if self.options.with_dbus: targets.extend(["qdbuscpp2xml", "qdbusxml2cpp"]) @@ -1084,6 +1128,7 @@ def _create_plugin(pluginname, libname, plugintype, requires): gui_reqs.append("opengl::opengl") if self.options.get_safe("with_vulkan", False): gui_reqs.append("vulkan-loader::vulkan-loader") + gui_reqs.append("vulkan-headers::vulkan-headers") if is_apple_os(self): gui_reqs.append("moltenvk::moltenvk") if self.options.with_harfbuzz: diff --git a/recipes/qt/6.x.x/test_package/CMakeLists.txt b/recipes/qt/6.x.x/test_package/CMakeLists.txt index 89a6d714d6406..45e4bb9ec9ab7 100644 --- a/recipes/qt/6.x.x/test_package/CMakeLists.txt +++ b/recipes/qt/6.x.x/test_package/CMakeLists.txt @@ -7,3 +7,12 @@ add_executable(${PROJECT_NAME} test_package.cpp greeter.h example.qrc) target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Core Qt6::Network Qt6::Sql Qt6::Concurrent Qt6::Xml Qt6::Widgets) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) set_target_properties(${PROJECT_NAME} PROPERTIES AUTOMOC ON AUTORCC ON) + +# Only running this Qt macros in macOS +if (APPLE) + # Related to https://github.com/conan-io/conan-center-index/issues/20574 + qt_standard_project_setup() + qt_add_executable(test_macos_bundle MACOSX_BUNDLE test_macos_bundle.cpp) + target_link_libraries(test_macos_bundle PRIVATE Qt6::Core) + target_compile_features(test_macos_bundle PRIVATE cxx_std_17) +endif() diff --git a/recipes/qt/6.x.x/test_package/conanfile.py b/recipes/qt/6.x.x/test_package/conanfile.py index 01ccf4f452670..11efc3f08b07a 100644 --- a/recipes/qt/6.x.x/test_package/conanfile.py +++ b/recipes/qt/6.x.x/test_package/conanfile.py @@ -41,3 +41,7 @@ def test(self): copy(self, "qt.conf", src=self.generators_folder, dst=os.path.join(self.cpp.build.bindirs[0])) bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") self.run(bin_path, env="conanrun") + # Related to https://github.com/conan-io/conan-center-index/issues/20574 + if self.settings.os == "Macos": + bin_macos_path = os.path.join(self.cpp.build.bindirs[0], "test_macos_bundle.app", "Contents", "MacOS", "test_macos_bundle") + self.run(bin_macos_path, env="conanrun") diff --git a/recipes/qt/6.x.x/test_package/test_macos_bundle.cpp b/recipes/qt/6.x.x/test_package/test_macos_bundle.cpp new file mode 100644 index 0000000000000..fb10bbf49cdff --- /dev/null +++ b/recipes/qt/6.x.x/test_package/test_macos_bundle.cpp @@ -0,0 +1,7 @@ +#include + +int main(int argc, char *argv[]) +{ + QCoreApplication app(argc, argv); + return 0; + } diff --git a/recipes/quill/all/conandata.yml b/recipes/quill/all/conandata.yml index 3e08beff90722..39843805b4dcf 100644 --- a/recipes/quill/all/conandata.yml +++ b/recipes/quill/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "7.1.0": + url: "https://github.com/odygrd/quill/releases/download/v7.1.0/quill-7.1.0.zip" + sha256: "3edd1e142ae1a5b6d548c8af5bcf4339bf5889e49ade0806a4269c9587b954ae" + "6.1.0": + url: "https://github.com/odygrd/quill/releases/download/v6.1.0/quill-6.1.0.zip" + sha256: "114bea9d3e4f1ef06a3c48c4e5554a1a3cba182731495e229f2d28f8aef04467" "6.0.0": url: "https://github.com/odygrd/quill/releases/download/v6.0.0/quill-6.0.0.zip" sha256: "912de8486ce781d06e3f03c4267d112a0c7f20f93f0470f6ac66a52774c08283" diff --git a/recipes/quill/all/conanfile.py b/recipes/quill/all/conanfile.py index 6bf090b4a0669..bb47bc324e691 100644 --- a/recipes/quill/all/conanfile.py +++ b/recipes/quill/all/conanfile.py @@ -70,13 +70,20 @@ def build(self): def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - copy( - self, - "*.h", - os.path.join(self.source_folder, "quill", "include"), - os.path.join(self.package_folder, "include"), - ) - + if Version(self.version) < "7.0.0": + copy( + self, + "*.h", + os.path.join(self.source_folder, "quill", "include"), + os.path.join(self.package_folder, "include"), + ) + else: + copy( + self, + "*.h", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) def package_info(self): self.cpp_info.bindirs = [] diff --git a/recipes/quill/all/test_package/CMakeLists.txt b/recipes/quill/all/test_package/CMakeLists.txt index 4d5e7a7566fab..a6b5b0e801c6c 100644 --- a/recipes/quill/all/test_package/CMakeLists.txt +++ b/recipes/quill/all/test_package/CMakeLists.txt @@ -8,4 +8,3 @@ add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE quill::quill) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) target_compile_definitions(${PROJECT_NAME} PRIVATE QUILL_FILE_HANDLERS_API_V3_3) - diff --git a/recipes/quill/all/test_package/test_package.cpp b/recipes/quill/all/test_package/test_package.cpp index 3c984618a5cd0..f3e9e28471bde 100644 --- a/recipes/quill/all/test_package/test_package.cpp +++ b/recipes/quill/all/test_package/test_package.cpp @@ -41,19 +41,5 @@ int main() LOG_INFO(logger, "Positional arguments {1} {2} {0} ", "too", "are", "supported"); LOG_INFO(logger, "Support for precision {:.4f}", 1.23456); - // To log with a different format to the same sink, just create another logger - auto console_sink_2 = quill::Frontend::get_sink("sink_id_1"); // get the created sink - quill::Logger* logger_2 = quill::Frontend::create_or_get_logger( - "logger_2", std::move(console_sink_2), "%(time) %(log_level:<9) %(logger:<12) %(message)"); - - logger_2->set_log_level(quill::LogLevel::TraceL3); - - LOG_TRACE_L3(logger_2, "This is a log trace l3 example {}", 1); - LOG_TRACE_L2(logger_2, "This is a log trace l2 example {} {}", 2, 2.3); - LOG_TRACE_L1(logger_2, "This is a log trace l1 {} example", "string"); - LOG_DEBUG(logger_2, "This is a log debug example {}", 4); - LOG_INFO(logger_2, "This is a log info example {}", sizeof(std::string)); - LOG_WARNING(logger_2, "This is a log warning example {}", sizeof(std::string)); - LOG_ERROR(logger_2, "This is a log error example {}", sizeof(std::string)); - LOG_CRITICAL(logger_2, "This is a log critical example {}", sizeof(std::string)); + return 0; } diff --git a/recipes/quill/config.yml b/recipes/quill/config.yml index 9b11652fad543..7abb554e88e04 100644 --- a/recipes/quill/config.yml +++ b/recipes/quill/config.yml @@ -1,4 +1,8 @@ versions: + "7.1.0": + folder: "all" + "6.1.0": + folder: "all" "6.0.0": folder: "all" "4.5.0": diff --git a/recipes/rapidyaml/all/conandata.yml b/recipes/rapidyaml/all/conandata.yml index 70ade977aaed0..42ba70633e2ac 100644 --- a/recipes/rapidyaml/all/conandata.yml +++ b/recipes/rapidyaml/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.7.1": + url: "https://github.com/biojppm/rapidyaml/releases/download/v0.7.1/rapidyaml-0.7.1-src.tgz" + sha256: "9f7c0df2117c09ea409afef38f27605f79f4455dd73b6b9d6afaed099a627c8a" "0.7.0": url: "https://github.com/biojppm/rapidyaml/releases/download/v0.7.0/rapidyaml-0.7.0-src.tgz" sha256: "ef9f89b68de711c561720f1e70d1594e953356a07d297d36b8ccd3ded0589715" @@ -15,6 +18,10 @@ sources: url: "https://github.com/biojppm/rapidyaml/releases/download/v0.3.0/rapidyaml-0.3.0-src.tgz" sha256: "38854b8359eaf42cc27352f4b7321f509f6775445a3e2746cc8cd1e468a52aa9" patches: + "0.7.1": + - patch_file: "patches/0.7.1-001-remove-internal-c4core.patch" + patch_description: "disable using internal c4core" + patch_type: "conan" "0.7.0": - patch_file: "patches/0.7.0-001-remove-internal-c4core.patch" patch_description: "disable using internal c4core" diff --git a/recipes/rapidyaml/all/patches/0.7.1-001-remove-internal-c4core.patch b/recipes/rapidyaml/all/patches/0.7.1-001-remove-internal-c4core.patch new file mode 100644 index 0000000000000..e110ab49f9654 --- /dev/null +++ b/recipes/rapidyaml/all/patches/0.7.1-001-remove-internal-c4core.patch @@ -0,0 +1,50 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c3841a2..affaa56 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,7 +6,7 @@ project(ryml + LANGUAGES CXX) + include(./compat.cmake) + +-c4_project(VERSION 0.7.1 STANDALONE ++c4_project(VERSION 0.7.1 + AUTHOR "Joao Paulo Magalhaes ") + + +@@ -27,11 +27,11 @@ option(RYML_INSTALL "Enable install target" ON) + + #------------------------------------------------------- + +-c4_require_subproject(c4core INCORPORATE +- SUBDIRECTORY ${RYML_EXT_DIR}/c4core +- OVERRIDE C4CORE_INSTALL ${RYML_INSTALL} +-) +- ++# c4_require_subproject(c4core INCORPORATE ++# SUBDIRECTORY ${RYML_EXT_DIR}/c4core ++# OVERRIDE C4CORE_INSTALL ${RYML_INSTALL} ++# ) ++find_package(c4core REQUIRED CONFIG) + c4_add_library(ryml + SOURCES + ryml.hpp +@@ -77,8 +77,8 @@ c4_add_library(ryml + INC_DIRS + $ + $ +- LIBS c4core +- INCORPORATE c4core ++ LIBS c4core::c4core ++# INCORPORATE c4core + ) + + if(RYML_WITH_TAB_TOKENS) +@@ -113,7 +113,7 @@ endif() + + if(RYML_INSTALL) + c4_install_target(ryml) +- c4_install_exports(DEPENDENCIES c4core) ++# c4_install_exports(DEPENDENCIES c4core) + c4_pack_project() + endif() + diff --git a/recipes/rapidyaml/config.yml b/recipes/rapidyaml/config.yml index 23d421955a48a..5345cf4f908f1 100644 --- a/recipes/rapidyaml/config.yml +++ b/recipes/rapidyaml/config.yml @@ -1,4 +1,6 @@ versions: + "0.7.1": + folder: all "0.7.0": folder: all "0.5.0": diff --git a/recipes/rdma-core/all/conandata.yml b/recipes/rdma-core/all/conandata.yml index 30eaf3a7cd31f..2871466545995 100644 --- a/recipes/rdma-core/all/conandata.yml +++ b/recipes/rdma-core/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "52.0": + url: "https://github.com/linux-rdma/rdma-core/releases/download/v52.0/rdma-core-52.0.tar.gz" + sha256: "1f0ce5f2462c982b20d21156707076278807a7adf4d10e9142f3be4bec1b2b83" "51.0": url: "https://github.com/linux-rdma/rdma-core/releases/download/v51.0/rdma-core-51.0.tar.gz" sha256: "0a4a55b1351356c2750f26ec9010e8c7370402a13c95799cb8b447cf0134dd61" diff --git a/recipes/rdma-core/all/conanfile.py b/recipes/rdma-core/all/conanfile.py index c2a42528f2835..b7c0f7ab5ef82 100644 --- a/recipes/rdma-core/all/conanfile.py +++ b/recipes/rdma-core/all/conanfile.py @@ -36,8 +36,8 @@ class PackageConan(ConanFile): "build_libibnetdisc": True, "build_libmana": True, "build_libmlx4": True, - "build_libmlx5": False, - "build_librdmacm": False, + "build_libmlx5": True, + "build_librdmacm": True, } def configure(self): @@ -49,8 +49,7 @@ def layout(self): def requirements(self): self.requires("libnl/3.8.0") - if self.settings.os in ["Linux", "FreeBSD"]: - self.requires("libudev/system") + self.requires("libudev/system") def validate(self): if self.settings.os not in ["Linux", "FreeBSD"]: @@ -73,6 +72,11 @@ def generate(self): # tc.variables["ENABLE_STATIC"] = not self.options.shared tc.variables["NO_PYVERBS"] = True tc.variables["NO_MAN_PAGES"] = True + # Otherwise get set to ${install_prefix}/car/run and the paths in + # https://github.com/linux-rdma/rdma-core/blob/v52.0/buildlib/config.h.in + # can exceed the 108-character limit for socket paths on Linux + if "CMAKE_INSTALL_RUNDIR" not in self.conf.get("tools.cmake.cmaketoolchain:extra_variables", check_type=dict, default={}): + tc.variables["CMAKE_INSTALL_RUNDIR"] = "/var/run" tc.generate() deps = CMakeDeps(self) deps.generate() diff --git a/recipes/rdma-core/config.yml b/recipes/rdma-core/config.yml index bc069e4d0ced3..4e3149e77dd3c 100644 --- a/recipes/rdma-core/config.yml +++ b/recipes/rdma-core/config.yml @@ -1,4 +1,6 @@ versions: + "52.0": + folder: all "51.0": folder: all "49.0": diff --git a/recipes/rebound/all/conandata.yml b/recipes/rebound/all/conandata.yml new file mode 100644 index 0000000000000..9c806c1b5b5a5 --- /dev/null +++ b/recipes/rebound/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "4.4.1": + url: "https://github.com/hannorein/rebound/archive/refs/tags/4.4.1.tar.gz" + sha256: "0ae7bdf20750cd0a83c4905a66c3cde211f09ac732ffb4cba9887e68aba5273b" +patches: + "4.4.1": + - patch_file: "patches/0001-4.4.1-stdio-legacy-fix.patch" + patch_description: "Link to legacy_stdio only when MSVC" + patch_type: "backport" + patch_source: "https://github.com/hannorein/rebound/pull/777" diff --git a/recipes/rebound/all/conanfile.py b/recipes/rebound/all/conanfile.py new file mode 100644 index 0000000000000..eb8767e10950a --- /dev/null +++ b/recipes/rebound/all/conanfile.py @@ -0,0 +1,78 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.build import cross_building +from conan.tools.files import chdir, copy, get, rm, rmdir, export_conandata_patches, apply_conandata_patches +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout +import os + + +required_conan_version = ">=1.54.0" + + +class ReboundConan(ConanFile): + name = "rebound" + description = "REBOUND is an N-body integrator, i.e. a software package that can integrate the motion of particles under the influence of gravity." + license = "GPL-3.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/hannorein/rebound" + topics = ("physics", "simulation", "n-body", "gravity", "integrator") + package_type = "shared-library" + # Scripts always compile with optimizations enabled + settings = "os", "arch", "compiler" + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def export_sources(self): + export_conandata_patches(self) + + def configure(self): + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + basic_layout(self, src_folder="src") + + def validate(self): + if self.settings.os in ["Windows", "Macos"]: + raise ConanInvalidConfiguration(f"{self.ref} recipe does not support {self.settings.os}, contributions welcomed!") + + def validate_build(self): + if cross_building(self): + raise ConanInvalidConfiguration(f"{self.ref} cross-building is not supported yet, contributions welcomed!") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) + tc.generate() + + def build(self): + apply_conandata_patches(self) + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.make(target="librebound") + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "librebound.so", os.path.join(self.source_folder, "src"), os.path.join(self.package_folder, "lib")) + + copy(self, "*.h", os.path.join(self.source_folder, "src"), os.path.join(self.package_folder, "include")) + + # some files extensions and folders are not allowed. Please, read the FAQs to get informed. + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + + # In shared lib/executable files, autotools set install_name (macOS) to lib dir absolute path instead of @rpath, it's not relocatable, so fix it + fix_apple_shared_install_name(self) + + def package_info(self): + self.cpp_info.libs = ["rebound"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("pthread") diff --git a/recipes/rebound/all/patches/0001-4.4.1-stdio-legacy-fix.patch b/recipes/rebound/all/patches/0001-4.4.1-stdio-legacy-fix.patch new file mode 100644 index 0000000000000..9fe5511878c30 --- /dev/null +++ b/recipes/rebound/all/patches/0001-4.4.1-stdio-legacy-fix.patch @@ -0,0 +1,24 @@ +From e775c5c070093facb17a732c3b509bfe0ca8ade7 Mon Sep 17 00:00:00 2001 +From: Uilian Ries +Date: Tue, 18 Jun 2024 11:39:22 +0200 +Subject: [PATCH] Link to legacy_stdio only when MSVC + +Signed-off-by: Uilian Ries +--- + src/rebound.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/rebound.c b/src/rebound.c +index 18267206b..40afe76f4 100644 +--- a/src/rebound.c ++++ b/src/rebound.c +@@ -23,7 +23,9 @@ + * + */ + #define _NO_CRT_STDIO_INLINE // WIN32 to use _vsprintf_s ++#if defined(_WIN32) && defined(_MSC_VER) + #pragma comment(lib, "legacy_stdio_definitions.lib") ++#endif + #include + #include + #include // for offsetof() diff --git a/recipes/rebound/all/test_package/CMakeLists.txt b/recipes/rebound/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..f16f7cf26d671 --- /dev/null +++ b/recipes/rebound/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(rebound REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE rebound::rebound) diff --git a/recipes/rebound/all/test_package/conanfile.py b/recipes/rebound/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a808db45f245 --- /dev/null +++ b/recipes/rebound/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +# It will become the standard on Conan 2.x +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/rebound/all/test_package/test_package.c b/recipes/rebound/all/test_package/test_package.c new file mode 100644 index 0000000000000..1cf6ab75b9e69 --- /dev/null +++ b/recipes/rebound/all/test_package/test_package.c @@ -0,0 +1,31 @@ +#include "rebound.h" +#include +#include + + +// Simplified from the simplest.c example in the REBOUND source code. +int main(int argc, char* argv[]) { + struct reb_simulation* r = reb_simulation_create(); + + reb_simulation_add_fmt(r, "m", 1.); // Central object + reb_simulation_add_fmt(r, "m a e", 1e-3, 1., 0.1); // Jupiter mass planet + reb_simulation_add_fmt(r, "a e", 1.4, 0.1); // Massless test particle + + // First integrate for 1 time units. + reb_simulation_integrate(r, 1.); + + // Then output some coordinates and orbital elements. + for (int i=0; iN; i++){ + struct reb_particle p = r->particles[i]; + printf("%f %f %f\n", p.x, p.y, p.z); + } + struct reb_particle primary = r->particles[0]; + for (int i=1; iN; i++){ + struct reb_particle p = r->particles[i]; + struct reb_orbit o = reb_orbit_from_particle(r->G, p, primary); + printf("%f %f %f\n", o.a, o.e, o.f); + } + + // Cleanup + reb_simulation_free(r); +} diff --git a/recipes/rebound/config.yml b/recipes/rebound/config.yml new file mode 100644 index 0000000000000..695144f0acbc9 --- /dev/null +++ b/recipes/rebound/config.yml @@ -0,0 +1,3 @@ +versions: + "4.4.1": + folder: "all" diff --git a/recipes/roaring/all/conandata.yml b/recipes/roaring/all/conandata.yml index 610e2569247a2..cc860b4e0343e 100644 --- a/recipes/roaring/all/conandata.yml +++ b/recipes/roaring/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "4.1.2": + url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.1.2.tar.gz" + sha256: "dd9e9d9a28dcf9ba1622fb4a3a7b4d7f5e12732bb35e99a7cb028b7512731a7b" + "4.1.1": + url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.1.1.tar.gz" + sha256: "42804cc2bb5c9279ec4fcaa56d2d6b389da934634abcce8dbc4e4c1d60e1468d" "4.1.0": url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.1.0.tar.gz" sha256: "0596c6e22bcccb56f38260142b435f1f72aef7721fa370fd9f2b88380245fc1d" diff --git a/recipes/roaring/config.yml b/recipes/roaring/config.yml index 4c7b26e41f0a9..6265b94ca9cbf 100644 --- a/recipes/roaring/config.yml +++ b/recipes/roaring/config.yml @@ -1,4 +1,8 @@ versions: + "4.1.2": + folder: all + "4.1.1": + folder: all "4.1.0": folder: all "4.0.0": diff --git a/recipes/rocksdb/all/conandata.yml b/recipes/rocksdb/all/conandata.yml index ed28eb0b6337f..074302cce72fd 100644 --- a/recipes/rocksdb/all/conandata.yml +++ b/recipes/rocksdb/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "9.5.2": + url: "https://github.com/facebook/rocksdb/archive/refs/tags/v9.5.2.tar.gz" + sha256: "B20780586D3DF4A3C5BCBDE341A2C1946B03D18237960BDA5BC5E9538F42AF40" "9.4.0": url: "https://github.com/facebook/rocksdb/archive/refs/tags/v9.4.0.tar.gz" sha256: "1f829976aa24b8ba432e156f52c9e0f0bd89c46dc0cc5a9a628ea70571c1551c" diff --git a/recipes/rocksdb/config.yml b/recipes/rocksdb/config.yml index a2441c8c55d86..8044f69736f9c 100644 --- a/recipes/rocksdb/config.yml +++ b/recipes/rocksdb/config.yml @@ -1,4 +1,6 @@ versions: + "9.5.2": + folder: all "9.4.0": folder: all "9.2.1": diff --git a/recipes/s2n/all/conandata.yml b/recipes/s2n/all/conandata.yml index 5b8f0f1c01b2c..b9eb147f98b56 100644 --- a/recipes/s2n/all/conandata.yml +++ b/recipes/s2n/all/conandata.yml @@ -1,7 +1,16 @@ sources: + "1.5.2": + url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.5.2.tar.gz" + sha256: "896d9f8f8e9bd2fdcb9a21b18aede4f7afc65bde279afabc60abf97fa5069dd1" + "1.5.1": + url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.5.1.tar.gz" + sha256: "d79710d6ef089097a3b84fc1e5cec2f08d1ec46e93b1d400df59fcfc859e15a3" + "1.5.0": + url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.5.0.tar.gz" + sha256: "5e86d97d8f24653ef3dff3abe6165169f0ba59cdf52b5264987125bba070174d" "1.4.16": - url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.4.1.tar.gz" - sha256: "d8c1d8e1142441412434feacb4947ce6430a244dcd8f58921af79b29bd901731" + url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.4.16.tar.gz" + sha256: "84fdbaa894c722bf13cac87b8579f494c1c2d66de642e5e6104638fddea76ad9" "1.4.13": url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.4.13.tar.gz" sha256: "8b0b36697963d6752e5a1b49e28e393605990d348edf1aef6f39c33164d45edb" diff --git a/recipes/s2n/all/conanfile.py b/recipes/s2n/all/conanfile.py index 34d4cbcae2b9f..a112b40965f87 100644 --- a/recipes/s2n/all/conanfile.py +++ b/recipes/s2n/all/conanfile.py @@ -11,10 +11,10 @@ class S2nConan(ConanFile): name = "s2n" description = "An implementation of the TLS/SSL protocols" - topics = ("aws", "amazon", "cloud", ) + license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/aws/s2n-tls" - license = "Apache-2.0" + topics = ("aws", "amazon", "cloud", ) package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { diff --git a/recipes/s2n/config.yml b/recipes/s2n/config.yml index c02d8ff3f44d9..760e55c793225 100644 --- a/recipes/s2n/config.yml +++ b/recipes/s2n/config.yml @@ -1,4 +1,10 @@ versions: + "1.5.2": + folder: all + "1.5.1": + folder: all + "1.5.0": + folder: all "1.4.16": folder: all "1.4.13": diff --git a/recipes/samurai/all/conandata.yml b/recipes/samurai/all/conandata.yml index a3cf7b7eb4b88..39739edcf25df 100644 --- a/recipes/samurai/all/conandata.yml +++ b/recipes/samurai/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.16.0": + url: "https://github.com/hpc-maths/samurai/archive/v0.16.0.tar.gz" + sha256: "61616de42557e5cd5e9483103fd640f94f3235354e42a22a0ec76520196059a5" "0.13.0": url: "https://github.com/hpc-maths/samurai/archive/v0.13.0.tar.gz" sha256: "f38e379218b1206fc5c5e157ee5e80687721a896f70b892623d9f30280529448" diff --git a/recipes/samurai/config.yml b/recipes/samurai/config.yml index e6692765cde8a..87628f14bd6dd 100644 --- a/recipes/samurai/config.yml +++ b/recipes/samurai/config.yml @@ -1,4 +1,6 @@ versions: + "0.16.0": + folder: all "0.13.0": folder: all "0.9.0": diff --git a/recipes/sdbus-cpp/all/conandata.yml b/recipes/sdbus-cpp/all/conandata.yml index c7ec57d1ada42..ad223afb6b24c 100644 --- a/recipes/sdbus-cpp/all/conandata.yml +++ b/recipes/sdbus-cpp/all/conandata.yml @@ -35,3 +35,6 @@ patches: patch_description: "fix build error by adding missing headers" patch_type: "bugfix" patch_source: "https://github.com/Kistler-Group/sdbus-cpp/commit/fb008445b15b452f461c34667f4991f5ce06e481" + "2.0.0": + - patch_file: "patches/0003-fix-expat-casing-and-library-linkage.patch" + patch_type: "conan" diff --git a/recipes/sdbus-cpp/all/conanfile.py b/recipes/sdbus-cpp/all/conanfile.py index 4f55c042c482c..7733d1b0759bc 100644 --- a/recipes/sdbus-cpp/all/conanfile.py +++ b/recipes/sdbus-cpp/all/conanfile.py @@ -106,7 +106,10 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["BUILD_CODE_GEN"] = self.options.with_code_gen + if Version(self.version) >= "2.0.0": + tc.variables["SDBUSCPP_BUILD_CODEGEN"] = self.options.with_code_gen + else: + tc.variables["BUILD_CODE_GEN"] = self.options.with_code_gen tc.variables["BUILD_DOC"] = False tc.variables["BUILD_TESTS"] = False tc.variables["BUILD_LIBSYSTEMD"] = False diff --git a/recipes/sdbus-cpp/all/patches/0003-fix-expat-casing-and-library-linkage.patch b/recipes/sdbus-cpp/all/patches/0003-fix-expat-casing-and-library-linkage.patch new file mode 100644 index 0000000000000..6fcd6cd1fd255 --- /dev/null +++ b/recipes/sdbus-cpp/all/patches/0003-fix-expat-casing-and-library-linkage.patch @@ -0,0 +1,22 @@ +diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt +index c025e36..ef3f6ce 100644 +--- a/tools/CMakeLists.txt ++++ b/tools/CMakeLists.txt +@@ -12,7 +12,7 @@ include(GNUInstallDirs) + # PERFORMING CHECKS + #------------------------------- + +-find_package(EXPAT REQUIRED) ++find_package(expat REQUIRED) + + #------------------------------- + # SOURCE FILES CONFIGURATION +@@ -42,7 +42,7 @@ set(CMAKE_CXX_STANDARD 14) + #---------------------------------- + + add_executable(sdbus-c++-xml2cpp ${SDBUSCPP_XML2CPP_SRCS}) +-target_link_libraries (sdbus-c++-xml2cpp ${EXPAT_LIBRARIES}) ++target_link_libraries (sdbus-c++-xml2cpp expat::expat) + target_include_directories(sdbus-c++-xml2cpp PRIVATE ${EXPAT_INCLUDE_DIRS}) + + #---------------------------------- diff --git a/recipes/sdl/all/conandata.yml b/recipes/sdl/all/conandata.yml index f49cb33505aab..9c6746b76929a 100644 --- a/recipes/sdl/all/conandata.yml +++ b/recipes/sdl/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.30.7": + url: "https://www.libsdl.org/release/SDL2-2.30.7.tar.gz" + sha256: "2508c80438cd5ff3bbeb8fe36b8f3ce7805018ff30303010b61b03bb83ab9694" + "2.30.6": + url: "https://www.libsdl.org/release/SDL2-2.30.6.tar.gz" + sha256: "c6ef64ca18a19d13df6eb22df9aff19fb0db65610a74cc81dae33a82235cacd4" "2.30.5": url: "https://www.libsdl.org/release/SDL2-2.30.5.tar.gz" sha256: "f374f3fa29c37dfcc20822d4a7d7dc57e58924d1a5f2ad511bfab4c8193de63b" diff --git a/recipes/sdl/all/conanfile.py b/recipes/sdl/all/conanfile.py index cd55e0ceb1b78..5a843281891dc 100644 --- a/recipes/sdl/all/conanfile.py +++ b/recipes/sdl/all/conanfile.py @@ -15,10 +15,10 @@ class SDLConan(ConanFile): name = "sdl" description = "Access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL, Direct3D and Vulkan" - topics = ("sdl2", "audio", "keyboard", "graphics", "opengl") + license = "Zlib" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.libsdl.org" - license = "Zlib" + topics = ("sdl2", "audio", "keyboard", "graphics", "opengl") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -186,8 +186,7 @@ def build_requirements(self): self.build_requires("wayland/1.22.0") # Provides wayland-scanner def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True, - destination=self.source_folder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def _patch_sources(self): apply_conandata_patches(self) @@ -217,6 +216,8 @@ def _patch_sources(self): "find_program(WAYLAND_SCANNER NAMES wayland-scanner REQUIRED)", 'find_program(WAYLAND_SCANNER NAMES wayland-scanner REQUIRED PATHS "${WAYLAND_BIN_DIR}" NO_DEFAULT_PATH)', ) + if Version(self.version) >= "2.30.6" and not self.options.shared: + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "list(APPEND targets SDL2-static)", "set(targets SDL2-static)") def define_toolchain(self): tc = CMakeToolchain(self) diff --git a/recipes/sdl/all/test_package/conanfile.py b/recipes/sdl/all/test_package/conanfile.py index 956346bb80854..c21bd201e65b8 100644 --- a/recipes/sdl/all/test_package/conanfile.py +++ b/recipes/sdl/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", "VirtualRunEnv" diff --git a/recipes/sdl/config.yml b/recipes/sdl/config.yml index bb02b66ecf2da..70833b6fd8399 100644 --- a/recipes/sdl/config.yml +++ b/recipes/sdl/config.yml @@ -1,4 +1,8 @@ versions: + "2.30.7": + folder: all + "2.30.6": + folder: all "2.30.5": folder: all "2.30.4": diff --git a/recipes/sdl_mixer/all/CMakeLists.txt b/recipes/sdl_mixer/all/CMakeLists.txt index fa206e6c5d5c7..2dfb3ecfdb114 100644 --- a/recipes/sdl_mixer/all/CMakeLists.txt +++ b/recipes/sdl_mixer/all/CMakeLists.txt @@ -1,19 +1,13 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.15) project(sdl2_mixer) -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - include(CheckTypeSize) macro(add_music_option type) option(${type} "${type} music support" OFF) message(STATUS "${type} ${${type}}") - if(${${type}}) + if(${type}) add_definitions("-DMUSIC_${type}") - if(${${type}_DYNAMIC}) - add_definitions("-D${type}_DYNAMIC") - endif() endif() endmacro() @@ -30,73 +24,78 @@ add_music_option(MID_NATIVE) add_music_option(MID_FLUIDSYNTH) add_music_option(MID_TINYMIDI) -if(${MID_NATIVE}) - -set(NATIVE_MIDI_SOURCES -source_subfolder/native_midi/native_midi_common.c -source_subfolder/native_midi/native_midi_common.h -source_subfolder/native_midi/native_midi_haiku.cpp -source_subfolder/native_midi/native_midi_mac.c -source_subfolder/native_midi/native_midi_macosx.c -source_subfolder/native_midi/native_midi_win32.c -) - -set(NATIVE_MIDI_HEADERS -source_subfolder/native_midi/native_midi.h -) - +if(MIDI_NATIVE) + set(NATIVE_MIDI_SOURCES + src/native_midi/native_midi_common.c + src/native_midi/native_midi_common.h + src/native_midi/native_midi_haiku.cpp + src/native_midi/native_midi_mac.c + src/native_midi/native_midi_macosx.c + src/native_midi/native_midi_win32.c + ) + + set(NATIVE_MIDI_HEADERS + src/native_midi/native_midi.h + ) endif() set(SOURCES -source_subfolder/effect_position.c -source_subfolder/effect_stereoreverse.c -source_subfolder/effects_internal.c -source_subfolder/load_aiff.c -source_subfolder/load_voc.c -source_subfolder/mixer.c -source_subfolder/music.c -source_subfolder/music_cmd.c -source_subfolder/music_flac.c -source_subfolder/music_fluidsynth.c -source_subfolder/music_mad.c -source_subfolder/music_mikmod.c -source_subfolder/music_modplug.c -source_subfolder/music_mpg123.c -source_subfolder/music_nativemidi.c -source_subfolder/music_ogg.c -source_subfolder/music_opus.c -source_subfolder/music_timidity.c -source_subfolder/music_wav.c -${NATIVE_MIDI_SOURCES} + src/effect_position.c + src/effect_stereoreverse.c + src/effects_internal.c + src/load_aiff.c + src/load_voc.c + src/mixer.c + src/music.c + src/music_cmd.c + src/music_flac.c + src/music_fluidsynth.c + src/music_mad.c + src/music_mikmod.c + src/music_modplug.c + src/music_mpg123.c + src/music_nativemidi.c + src/music_ogg.c + src/music_opus.c + src/music_timidity.c + src/music_wav.c + ${NATIVE_MIDI_SOURCES} ) set(HEADERS -source_subfolder/effects_internal.h -source_subfolder/load_aiff.h -source_subfolder/load_voc.h -source_subfolder/mixer.h -source_subfolder/music.h -source_subfolder/music_cmd.h -source_subfolder/music_flac.h -source_subfolder/music_fluidsynth.h -source_subfolder/music_mad.h -source_subfolder/music_mikmod.h -source_subfolder/music_modplug.h -source_subfolder/music_mpg123.h -source_subfolder/music_nativemidi.h -source_subfolder/music_ogg.h -source_subfolder/music_opus.h -source_subfolder/music_timidity.h -source_subfolder/music_wav.h -${NATIVE_MIDI_HEADERS} + src/effects_internal.h + src/load_aiff.h + src/load_voc.h + src/mixer.h + src/music.h + src/music_cmd.h + src/music_flac.h + src/music_fluidsynth.h + src/music_mad.h + src/music_mikmod.h + src/music_modplug.h + src/music_mpg123.h + src/music_nativemidi.h + src/music_ogg.h + src/music_opus.h + src/music_timidity.h + src/music_wav.h + ${NATIVE_MIDI_HEADERS} ) add_library(${PROJECT_NAME} ${SOURCES} ${HEADERS}) -target_include_directories(${PROJECT_NAME} PRIVATE "source_subfolder") +target_include_directories(${PROJECT_NAME} PRIVATE "src") -if(${MID_NATIVE}) - target_include_directories(${PROJECT_NAME} PRIVATE "source_subfolder/native_midi") +if(MIDI_NATIVE) + target_include_directories(${PROJECT_NAME} PRIVATE "src/native_midi") + if(APPLE) + # https://github.com/libsdl-org/SDL_mixer/blob/release-2.0.4/configure.in#L380 + target_link_libraries(${PROJECT_NAME} PRIVATE "-framework AudioToolbox" "-framework AudioUnit" "-framework CoreServices") + elseif(WIN32) + # https://github.com/libsdl-org/SDL_mixer/blob/release-2.0.4/configure.in#L376 + target_link_libraries(${PROJECT_NAME} PRIVATE winmm) + endif() endif() find_package(SDL2 CONFIG REQUIRED) @@ -146,9 +145,9 @@ if(MID_TINYMIDI) target_link_libraries(${PROJECT_NAME} PRIVATE tinymidi::tinymidi) endif() -set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER source_subfolder/SDL_mixer.h) +set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER src/SDL_mixer.h) -if(${BUILD_SHARED_LIBS}) +if(BUILD_SHARED_LIBS) target_compile_definitions(${PROJECT_NAME} PRIVATE DLL_EXPORT) endif() @@ -160,8 +159,8 @@ if(SSIZE_T STREQUAL "") endif() install(TARGETS ${PROJECT_NAME} - ARCHIVE DESTINATION "lib" - LIBRARY DESTINATION "lib" - RUNTIME DESTINATION "bin" - PUBLIC_HEADER DESTINATION "include/SDL2" + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin + PUBLIC_HEADER DESTINATION include/SDL2 ) diff --git a/recipes/sdl_mixer/all/conanfile.py b/recipes/sdl_mixer/all/conanfile.py index 7139d07a2b4ea..d2133052c545d 100644 --- a/recipes/sdl_mixer/all/conanfile.py +++ b/recipes/sdl_mixer/all/conanfile.py @@ -1,144 +1,155 @@ -from conans import CMake, tools +import os + from conan import ConanFile +from conan.tools.apple import is_apple_os +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy from conan.tools.files import get, rmdir -import os -import functools + +required_conan_version = ">=1.57.0" class SDLMixerConan(ConanFile): name = "sdl_mixer" description = "SDL_mixer is a sample multi-channel audio mixer library" - topics = ("sdl_mixer", "sdl2", "sdl", "mixer", "audio", "multimedia", "sound", "music") + license = "Zlib" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.libsdl.org/projects/SDL_mixer/" - license = "Zlib" - exports_sources = ["CMakeLists.txt"] - generators = "cmake", "cmake_find_package_multi" + topics = ("sdl2", "sdl", "mixer", "audio", "multimedia", "sound", "music") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" - options = {"shared": [True, False], - "fPIC": [True, False], - "cmd": [True, False], - "wav": [True, False], - "flac": [True, False], - "mpg123": [True, False], - "mad": [True, False], - "ogg": [True, False], - "opus": [True, False], - "mikmod": [True, False], - "modplug": [True, False], - "fluidsynth": [True, False], - "nativemidi": [True, False], - "tinymidi": [True, False]} - default_options = {"shared": False, - "fPIC": True, - "cmd": False, # needs sys/wait.h - "wav": True, - "flac": True, - "mpg123": True, - "mad": True, - "ogg": True, - "opus": True, - "mikmod": True, - "modplug": True, - "fluidsynth": False, # TODO: add fluidsynth to Conan Center - "nativemidi": True, - "tinymidi": True} - _source_subfolder = "source_subfolder" - _build_subfolder = "build_subfolder" + options = { + "shared": [True, False], + "fPIC": [True, False], + "cmd": [True, False], + "wav": [True, False], + "flac": [True, False], + "mpg123": [True, False], + "mad": [True, False], + "ogg": [True, False], + "opus": [True, False], + "mikmod": [True, False], + "modplug": [True, False], + "nativemidi": [True, False], + "tinymidi": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "cmd": False, + "wav": True, + "flac": True, + "mpg123": True, + "mad": True, + "ogg": True, + "opus": True, + "mikmod": True, + "modplug": True, + "nativemidi": True, + "tinymidi": True, + } + + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if self.settings.os != "Linux": - del self.options.tinymidi + if self.settings.os in ["Linux", "FreeBSD"]: + self.options.rm_safe("nativemidi") else: - del self.options.nativemidi + self.options.rm_safe("tinymidi") def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("sdl/2.0.20") + self.requires("sdl/2.30.5", transitive_headers=True, transitive_libs=True) if self.options.flac: - self.requires("flac/1.3.3") + self.requires("flac/1.4.2") if self.options.mpg123: - self.requires("mpg123/1.29.3") + self.requires("mpg123/1.31.2") if self.options.mad: self.requires("libmad/0.15.1b") if self.options.ogg: self.requires("ogg/1.3.5") self.requires("vorbis/1.3.7") if self.options.opus: - self.requires("openssl/1.1.1q") - self.requires("opus/1.3.1") + self.requires("openssl/[>=1.1 <4]") + self.requires("opus/1.4") self.requires("opusfile/0.12") if self.options.mikmod: self.requires("libmikmod/3.3.11.1") if self.options.modplug: self.requires("libmodplug/0.8.9.0") - if self.options.fluidsynth: - self.requires("fluidsynth/2.2") # TODO: this package is missing on the conan-center-index - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: if self.options.tinymidi: self.requires("tinymidi/cci.20130325") def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + rmdir(self, os.path.join(self.source_folder, "external")) - rmdir(self, os.path.join(self._source_subfolder, "external")) - - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["CMD"] = self.options.cmd - cmake.definitions["WAV"] = self.options.wav - cmake.definitions["FLAC"] = self.options.flac - cmake.definitions["MP3_MPG123"] = self.options.mpg123 - cmake.definitions["MP3_MAD"] = self.options.mad - cmake.definitions["OGG"] = self.options.ogg - cmake.definitions["OPUS"] = self.options.opus - cmake.definitions["MOD_MIKMOD"] = self.options.mikmod - cmake.definitions["MOD_MODPLUG"] = self.options.modplug - cmake.definitions["MID_FLUIDSYNTH"] = self.options.fluidsynth - if self.settings.os == "Linux": - cmake.definitions["MID_TINYMIDI"] = self.options.tinymidi - cmake.definitions["MID_NATIVE"] = False + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CMD"] = self.options.cmd + tc.variables["WAV"] = self.options.wav + tc.variables["FLAC"] = self.options.flac + tc.variables["MP3_MPG123"] = self.options.mpg123 + tc.variables["MP3_MAD"] = self.options.mad + tc.variables["OGG"] = self.options.ogg + tc.variables["OPUS"] = self.options.opus + tc.variables["MOD_MIKMOD"] = self.options.mikmod + tc.variables["MOD_MODPLUG"] = self.options.modplug + tc.variables["MID_FLUIDSYNTH"] = False + if self.settings.os in ["Linux", "FreeBSD"]: + tc.variables["MID_TINYMIDI"] = self.options.tinymidi + tc.variables["MIDI_NATIVE"] = False else: - cmake.definitions["MID_TINYMIDI"] = False - cmake.definitions["MID_NATIVE"] = self.options.nativemidi - - cmake.definitions["FLAC_DYNAMIC"] = self.options["flac"].shared if self.options.flac else False - cmake.definitions["MP3_MPG123_DYNAMIC"] = self.options["mpg123"].shared if self.options.mpg123 else False - cmake.definitions["OGG_DYNAMIC"] = self.options["ogg"].shared if self.options.ogg else False - cmake.definitions["OPUS_DYNAMIC"] = self.options["opus"].shared if self.options.opus else False - cmake.definitions["MOD_MIKMOD_DYNAMIC"] = self.options["libmikmod"].shared if self.options.mikmod else False - cmake.definitions["MOD_MODPLUG_DYNAMIC"] = self.options["libmodplug"].shared if self.options.modplug else False - - cmake.configure(build_folder=self._build_subfolder) - - return cmake + tc.variables["MID_TINYMIDI"] = False + tc.variables["MIDI_NATIVE"] = self.options.nativemidi + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure(build_script_folder=self.source_path.parent) cmake.build() def package(self): - self.copy(pattern="COPYING.txt", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "COPYING.txt", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): - self.cpp_info.set_property("pkg_config_name", "SDL2_mixer") self.cpp_info.set_property("cmake_file_name", "SDL2_mixer") self.cpp_info.set_property("cmake_target_name", "SDL2_mixer::SDL2_mixer") self.cpp_info.set_property("pkg_config_name", "SDL2_mixer") + self.cpp_info.libs = ["SDL2_mixer"] self.cpp_info.includedirs.append(os.path.join("include", "SDL2")) + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m"] + + if self.options.get_safe("nativemidi"): + if is_apple_os(self): + # https://github.com/libsdl-org/SDL_mixer/blob/release-2.0.4/configure.in#L380 + self.cpp_info.frameworks.extend(["AudioToolbox", "AudioUnit", "CoreServices"]) + elif self.settings.os == "Windows": + # https://github.com/libsdl-org/SDL_mixer/blob/release-2.0.4/configure.in#L376 + self.cpp_info.system_libs.extend(["winmm"]) self.cpp_info.names["cmake_find_package"] = "SDL2_mixer" self.cpp_info.names["cmake_find_package_multi"] = "SDL2_mixer" diff --git a/recipes/sdl_mixer/all/test_package/CMakeLists.txt b/recipes/sdl_mixer/all/test_package/CMakeLists.txt index cbb6dbc11043a..d1c846300657f 100644 --- a/recipes/sdl_mixer/all/test_package/CMakeLists.txt +++ b/recipes/sdl_mixer/all/test_package/CMakeLists.txt @@ -1,11 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES C) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(SDL2_mixer CONFIG REQUIRED) +find_package(SDL2_mixer REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} PRIVATE SDL2_mixer::SDL2_mixer) diff --git a/recipes/sdl_mixer/all/test_package/conanfile.py b/recipes/sdl_mixer/all/test_package/conanfile.py index 49a3a66ea5bad..ef5d7042163ec 100644 --- a/recipes/sdl_mixer/all/test_package/conanfile.py +++ b/recipes/sdl_mixer/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/sdl_mixer/all/test_v1_package/CMakeLists.txt b/recipes/sdl_mixer/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/sdl_mixer/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/sdl_mixer/all/test_v1_package/conanfile.py b/recipes/sdl_mixer/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/sdl_mixer/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/sentry-native/all/conandata.yml b/recipes/sentry-native/all/conandata.yml index 9e305b2ec5e67..12d9363d69381 100644 --- a/recipes/sentry-native/all/conandata.yml +++ b/recipes/sentry-native/all/conandata.yml @@ -1,13 +1,13 @@ sources: + "0.7.8": + url: "https://github.com/getsentry/sentry-native/releases/download/0.7.8/sentry-native.zip" + sha256: "7cfde453866edf4ae7991f4300fc08a5cb4e6d679d31011ff93b4cfe5e3e5d8a" "0.7.6": url: "https://github.com/getsentry/sentry-native/releases/download/0.7.6/sentry-native.zip" sha256: "42180ad933a3a2bd86a1649ed0f1a41df20e783ce17c5cb1f86775f7caf06bc1" "0.7.5": url: "https://github.com/getsentry/sentry-native/releases/download/0.7.5/sentry-native.zip" sha256: "d9f1b44753fae3e9462aa1e6fd3021cb0ff2f51c1a1fa02b34510e3bc311f429" - "0.7.4": - url: "https://github.com/getsentry/sentry-native/releases/download/0.7.4/sentry-native.zip" - sha256: "9d17961d91c845ad8eb6f5106b2f5930f24a6e64077d7432013d4b379a8db7ac" "0.6.6": url: "https://github.com/getsentry/sentry-native/releases/download/0.6.6/sentry-native.zip" sha256: "7a98467c0b2571380a3afc5e681cb13aa406a709529be12d74610b0015ccde0c" diff --git a/recipes/sentry-native/all/conanfile.py b/recipes/sentry-native/all/conanfile.py index 2f31f5efdc35b..569658beb597f 100644 --- a/recipes/sentry-native/all/conanfile.py +++ b/recipes/sentry-native/all/conanfile.py @@ -1,3 +1,5 @@ +import os + from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os @@ -5,9 +7,7 @@ from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv from conan.tools.files import copy, get, rm, rmdir -from conan.tools.microsoft import is_msvc from conan.tools.scm import Version -import os required_conan_version = ">=1.55.0" @@ -35,7 +35,7 @@ class SentryNativeConan(ConanFile): "with_crashpad": ["google", "sentry"], "crashpad_with_tls": ["openssl", False], "with_breakpad": ["google", "sentry"], - "wer" : [True, False], + "wer": [True, False], } default_options = { "shared": False, @@ -46,15 +46,28 @@ class SentryNativeConan(ConanFile): "with_crashpad": "sentry", "crashpad_with_tls": "openssl", "with_breakpad": "sentry", - "wer": False + "wer": False, } @property def _min_cppstd(self): - return "17" + if Version(self.version) >= "0.7.8" and self.options.get_safe("with_crashpad") == "sentry": + return "20" + else: + return "17" @property def _minimum_compilers_version(self): + if Version(self.version) >= "0.7.8" and self.options.get_safe("with_crashpad") == "sentry": + # Sentry-native 0.7.8 requires C++20: Concepts and bit_cast + # https://github.com/chromium/mini_chromium/blob/e49947ad445c4ed4bc1bb4ed60bbe0fe17efe6ec/base/numerics/byte_conversions.h#L88 + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "11", + "clang": "14", + "apple-clang": "14", + } minimum_gcc_version = "5" if self.options.get_safe("backend") == "breakpad" or self.options.get_safe("backend") == "crashpad": minimum_gcc_version = "7" diff --git a/recipes/sentry-native/config.yml b/recipes/sentry-native/config.yml index 5e508311ba38c..4abee834d6ecf 100644 --- a/recipes/sentry-native/config.yml +++ b/recipes/sentry-native/config.yml @@ -1,10 +1,10 @@ versions: + "0.7.8": + folder: all "0.7.6": folder: all "0.7.5": folder: all - "0.7.4": - folder: all "0.6.6": folder: all "0.5.4": diff --git a/recipes/sfl/all/conandata.yml b/recipes/sfl/all/conandata.yml index 915488f13fa26..93608ba5ad222 100644 --- a/recipes/sfl/all/conandata.yml +++ b/recipes/sfl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.8.0": + url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.8.0.tar.gz" + sha256: "bb473a8e0b46ecff957c06112593b9a4104e0d1ec8e9d5840ff33c20ad3a243e" "1.7.0": url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.7.0.tar.gz" sha256: "9e09bacc51cfb085c4a6030f90cbea45685de608900d6b7b3c0a9f4971682652" diff --git a/recipes/sfl/config.yml b/recipes/sfl/config.yml index 1001b75a17a81..e2decd2fe802d 100644 --- a/recipes/sfl/config.yml +++ b/recipes/sfl/config.yml @@ -1,4 +1,6 @@ versions: + "1.8.0": + folder: "all" "1.7.0": folder: "all" "1.6.0": diff --git a/recipes/shaderc/all/conandata.yml b/recipes/shaderc/all/conandata.yml index f866b68a84277..25858ddef7954 100644 --- a/recipes/shaderc/all/conandata.yml +++ b/recipes/shaderc/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2024.1": + url: "https://github.com/google/shaderc/archive/refs/tags/v2024.1.tar.gz" + sha256: "eb3b5f0c16313d34f208d90c2fa1e588a23283eed63b101edd5422be6165d528" "2023.6": url: "https://github.com/google/shaderc/archive/refs/tags/v2023.6.tar.gz" sha256: "e40fd4a87a56f6610e223122179f086d5c4f11a7e0e2aa461f0325c3a0acc6ae" @@ -6,6 +9,16 @@ sources: url: "https://github.com/google/shaderc/archive/v2021.1.tar.gz" sha256: "047113bc4628da164a3cb845efc20d442728873f6054a68ab56d04a053f2c32b" patches: + "2024.1": + - patch_file: "patches/2023.6/use-conan-dependencies.patch" + patch_description: "Replace third_party with Conan dependencies" + patch_type: "conan" + - patch_file: "patches/2021.1/adapt-update_build_version.py.patch" + patch_description: "Adapt update_build_version.py for Conan" + patch_type: "conan" + - patch_file: "patches/2021.1/install-shaderc_util.patch" + patch_description: "install() shaderc_util" + patch_type: "conan" "2023.6": - patch_file: "patches/2023.6/use-conan-dependencies.patch" patch_description: "Replace third_party with Conan dependencies" @@ -26,3 +39,9 @@ patches: - patch_file: "patches/2021.1/install-shaderc_util.patch" patch_description: "install() shaderc_util" patch_type: "conan" +siprv_mapping: + # TODO: bump me once newer versions are available on CCI + "2024.1": "1.3.261.1" + # "2023.6": "1.3.261.1" + "2023.6": "1.3.239.0" + "2021.1": "1.3.224.0" diff --git a/recipes/shaderc/all/conanfile.py b/recipes/shaderc/all/conanfile.py index 80efeb3ed4b4e..309b53f6cb235 100644 --- a/recipes/shaderc/all/conanfile.py +++ b/recipes/shaderc/all/conanfile.py @@ -6,6 +6,7 @@ from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.apple import fix_apple_shared_install_name required_conan_version = ">=1.53.0" @@ -45,12 +46,7 @@ def layout(self): @property def _spirv_version(self): - return { - # TODO: bump me once newer versions are available on CCI - # "2023.6": "1.3.261.1", - "2023.6": "1.3.239.0", - "2021.1": "1.3.224.0", - }[str(self.version)] + return self.conan_data.get("siprv_mapping")[self.version] def requirements(self): # transitive_headers=True is not required for any of the dependencies @@ -104,6 +100,7 @@ def package(self): copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) cmake = CMake(self) cmake.install() + fix_apple_shared_install_name(self) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): diff --git a/recipes/shaderc/config.yml b/recipes/shaderc/config.yml index 272340ffeadfd..7b4ff24649925 100644 --- a/recipes/shaderc/config.yml +++ b/recipes/shaderc/config.yml @@ -1,4 +1,6 @@ versions: + "2024.1": + folder: all "2023.6": folder: all "2021.1": diff --git a/recipes/shapelib/all/conandata.yml b/recipes/shapelib/all/conandata.yml index 1c122519c5ede..b4cae11fb3a97 100644 --- a/recipes/shapelib/all/conandata.yml +++ b/recipes/shapelib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.6.1": + url: "https://github.com/OSGeo/shapelib/archive/v1.6.1.tar.gz" + sha256: "72a30ed408edee0dc9eaa81255e634af6706f9192b5ed5b536013f1cc4b327c4" "1.6.0": url: "https://github.com/OSGeo/shapelib/archive/v1.6.0.tar.gz" sha256: "0bfd1eab9616ca3c420a5ad674b0d07c7c5018620d6ab6ae43917daa18ff0d1e" diff --git a/recipes/shapelib/all/conanfile.py b/recipes/shapelib/all/conanfile.py index e4deabe7afba9..56012aa251125 100644 --- a/recipes/shapelib/all/conanfile.py +++ b/recipes/shapelib/all/conanfile.py @@ -63,6 +63,7 @@ def package(self): cmake.install() rm(self, "*.exe", os.path.join(self.package_folder, "bin")) rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "shapelib") diff --git a/recipes/shapelib/config.yml b/recipes/shapelib/config.yml index 04ffd79e144a1..7da8bd84259cd 100644 --- a/recipes/shapelib/config.yml +++ b/recipes/shapelib/config.yml @@ -1,4 +1,6 @@ versions: + "1.6.1": + folder: all "1.6.0": folder: all "1.5.0": diff --git a/recipes/simdjson/all/conandata.yml b/recipes/simdjson/all/conandata.yml index b9b9a0dfe167a..ce05f59a5be18 100644 --- a/recipes/simdjson/all/conandata.yml +++ b/recipes/simdjson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.10.0": + url: "https://github.com/simdjson/simdjson/archive/v3.10.0.tar.gz" + sha256: "9c30552f1dd0ee3d0832bb1c6b7b97d813b18d5ef294c10dcb6fc242e5947de8" "3.9.3": url: "https://github.com/simdjson/simdjson/archive/v3.9.3.tar.gz" sha256: "2e3d10abcde543d3dd8eba9297522cafdcebdd1db4f51b28f3bc95bf1d6ad23c" diff --git a/recipes/simdjson/config.yml b/recipes/simdjson/config.yml index a10abda6a7a1a..884caaae676a0 100644 --- a/recipes/simdjson/config.yml +++ b/recipes/simdjson/config.yml @@ -1,4 +1,6 @@ versions: + "3.10.0": + folder: all "3.9.3": folder: all "3.9.2": diff --git a/recipes/simdutf/all/conandata.yml b/recipes/simdutf/all/conandata.yml index fe77b0830484e..b7901ec89c9c1 100644 --- a/recipes/simdutf/all/conandata.yml +++ b/recipes/simdutf/all/conandata.yml @@ -1,4 +1,22 @@ sources: + "5.5.0": + url: "https://github.com/simdutf/simdutf/archive/v5.5.0.tar.gz" + sha256: "47090a770b8eecf610ac4d1fafadde60bb7ba3c9d576d2a3a545aba989a3d749" + "5.4.15": + url: "https://github.com/simdutf/simdutf/archive/v5.4.15.tar.gz" + sha256: "188a9516ee208659cab9a1e5063c1b8385d63d171c2381e9ce18af97936d9879" + "5.3.7": + url: "https://github.com/simdutf/simdutf/archive/v5.3.7.tar.gz" + sha256: "731fb29c8c0b05c77b0a29dc37ab8eabe09533f000864a7c55e1ed2e1d33d1e7" + "5.3.5": + url: "https://github.com/simdutf/simdutf/archive/v5.3.5.tar.gz" + sha256: "e6706d7fc68f6e1541414dcf45abe6190d591505d08bff3cc53f55642568f28d" + "5.3.2": + url: "https://github.com/simdutf/simdutf/archive/v5.3.2.tar.gz" + sha256: "3c146fb80d775b869ae9b132f41981dc3266f616f589b5f45045d6a22fdabdca" + "5.3.1": + url: "https://github.com/simdutf/simdutf/archive/v5.3.1.tar.gz" + sha256: "373e1e66a1c245817f0aa08ae8693b71d1703f9355d364e0d9d002929738ddcc" "5.2.8": url: "https://github.com/simdutf/simdutf/archive/v5.2.8.tar.gz" sha256: "2706f1bef85a6d8598f82defd3848f1c5100e2e065c5d416d993118b53ea8d77" @@ -17,20 +35,7 @@ sources: "4.0.9": url: "https://github.com/simdutf/simdutf/archive/v4.0.9.tar.gz" sha256: "599E6558FC8D06F8346E5F210564F8B18751C93D83BCE1A40A0E6A326C57B61E" + # 4.0.5 is required by scnlib "4.0.5": url: "https://github.com/simdutf/simdutf/archive/v4.0.5.tar.gz" sha256: "040d80ff4321f89ea9739ccc7f468ece9c4bc2630f3d4762b6d829000d2ec625" - "4.0.4": - url: "https://github.com/simdutf/simdutf/archive/v4.0.4.tar.gz" - sha256: "fd24bab9754e24f42e6cd2c9d336accb2674c306f9221c00fb095fe95cfe9247" - "4.0.3": - url: "https://github.com/simdutf/simdutf/archive/v4.0.3.tar.gz" - sha256: "00429eca296f00d9b93939d2561538bad601602ad02fd01ba9ad366268773751" - "3.2.17": - url: "https://github.com/simdutf/simdutf/archive/v3.2.17.tar.gz" - sha256: "c24e3eec1e08522a09b33e603352e574f26d367a7701bf069a65881f64acd519" -patches: - "3.2.17": - - patch_file: "patches/3.2.17-0001-fix-cmake.patch" - patch_description: "remove static build, enable rpath on macOS" - patch_type: "conan" diff --git a/recipes/simdutf/all/conanfile.py b/recipes/simdutf/all/conanfile.py index 69d83bcb2ced4..7f4c06e0624c0 100644 --- a/recipes/simdutf/all/conanfile.py +++ b/recipes/simdutf/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir +from conan.tools.files import get, copy, rmdir from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.scm import Version @@ -31,9 +31,6 @@ class SimdutfConan(ConanFile): 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 @@ -48,13 +45,11 @@ def layout(self): def validate(self): if self.info.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) - ## simdutf >= 4.0.0 requires _mm_storeu_si64 - if Version(self.version) >= "4.0.0": - if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "9.0": - raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc < 9.") - if self.settings.compiler == "gcc" and self.settings.build_type == "Debug" and \ - Version(self.settings.compiler.version) < "10.0": - raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc < 10 with debug build") + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "9.0": + raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc < 9.") + if self.settings.compiler == "gcc" and self.settings.build_type == "Debug" and \ + Version(self.settings.compiler.version) < "10.0": + raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc < 10 with debug build") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -71,7 +66,6 @@ def generate(self): deps.generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/simdutf/all/patches/3.2.17-0001-fix-cmake.patch b/recipes/simdutf/all/patches/3.2.17-0001-fix-cmake.patch deleted file mode 100644 index 6f1f0aa23c231..0000000000000 --- a/recipes/simdutf/all/patches/3.2.17-0001-fix-cmake.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/cmake/simdutf-flags.cmake b/cmake/simdutf-flags.cmake -index d1e9bcd..2ff37c0 100644 ---- a/cmake/simdutf-flags.cmake -+++ b/cmake/simdutf-flags.cmake -@@ -22,4 +22,3 @@ set(SIMDUTF_CXX_STANDARD 11 CACHE STRING "the C++ standard to use for simdutf") - set(CMAKE_CXX_STANDARD ${SIMDUTF_CXX_STANDARD}) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) --set(CMAKE_MACOSX_RPATH OFF) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index ed6be55..0b649c6 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -3,7 +3,7 @@ target_include_directories(simdutf-include-source INTERFACE $/simdutf.cpp) - target_link_libraries(simdutf-source INTERFACE simdutf-include-source) --add_library(simdutf STATIC simdutf.cpp) -+add_library(simdutf simdutf.cpp) - target_include_directories(simdutf PRIVATE $ ) - target_include_directories(simdutf PUBLIC "$") - diff --git a/recipes/simdutf/config.yml b/recipes/simdutf/config.yml index 5931b0efb2f62..f002a2c442833 100644 --- a/recipes/simdutf/config.yml +++ b/recipes/simdutf/config.yml @@ -1,4 +1,16 @@ versions: + "5.5.0": + folder: all + "5.4.15": + folder: all + "5.3.7": + folder: all + "5.3.5": + folder: all + "5.3.2": + folder: all + "5.3.1": + folder: all "5.2.8": folder: all "5.2.6": @@ -13,9 +25,3 @@ versions: folder: all "4.0.5": folder: all - "4.0.4": - folder: all - "4.0.3": - folder: all - "3.2.17": - folder: all diff --git a/recipes/simfil/all/conandata.yml b/recipes/simfil/all/conandata.yml index c2d8a566521d4..d5a01b392c11c 100644 --- a/recipes/simfil/all/conandata.yml +++ b/recipes/simfil/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.3.2": + url: "https://github.com/Klebert-Engineering/simfil/archive/refs/tags/v0.3.2.tar.gz" + sha256: "b8357db1d46058bb5b02eee4945801fc96cf06736c15195235a4b35da72e2ac2" + "0.3.1": + url: "https://github.com/Klebert-Engineering/simfil/archive/refs/tags/v0.3.1.tar.gz" + sha256: "caddee2e338041ae5ec56c6a92f14e79ee3d5a0f7eaf327d6b8418fe06dd484e" "0.3.0": url: "https://github.com/Klebert-Engineering/simfil/archive/refs/tags/v0.3.0.tar.gz" sha256: "dea7b063f3f062772fcb49b368954814fc04d66c55db327a53ea008d698cd171" diff --git a/recipes/simfil/all/conanfile.py b/recipes/simfil/all/conanfile.py index 66a16c329cfe6..55dad5c2c07b1 100644 --- a/recipes/simfil/all/conanfile.py +++ b/recipes/simfil/all/conanfile.py @@ -65,7 +65,7 @@ def requirements(self): self.requires("fmt/10.0.0", transitive_headers=True) self.requires("bitsery/5.2.3", transitive_headers=True) if self.options.with_json: - self.requires("nlohmann_json/3.11.2") + self.requires("nlohmann_json/3.11.2", transitive_headers=True) def config_options(self): if self.settings.os == "Windows": @@ -102,3 +102,5 @@ def package(self): def package_info(self): self.cpp_info.libs = ["simfil"] + if self.options.with_json: + self.cpp_info.defines = ["SIMFIL_WITH_MODEL_JSON=1"] diff --git a/recipes/simfil/config.yml b/recipes/simfil/config.yml index 56576fba93cde..1dab437cf32dd 100644 --- a/recipes/simfil/config.yml +++ b/recipes/simfil/config.yml @@ -1,4 +1,8 @@ versions: + "0.3.2": + folder: all + "0.3.1": + folder: all "0.3.0": folder: all "0.2.1": diff --git a/recipes/simple_enum/all/conandata.yml b/recipes/simple_enum/all/conandata.yml new file mode 100644 index 0000000000000..6c936b9324135 --- /dev/null +++ b/recipes/simple_enum/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.8.0": + url: "https://github.com/arturbac/simple_enum/archive/refs/tags/v0.8.0.tar.gz" + sha256: "b32e723ddb29b6cb2ab93f2376157ee6fd7a4f3c170edddb6a3fb7186068e6ee" diff --git a/recipes/simple_enum/all/conanfile.py b/recipes/simple_enum/all/conanfile.py new file mode 100644 index 0000000000000..6be80c9e19d4d --- /dev/null +++ b/recipes/simple_enum/all/conanfile.py @@ -0,0 +1,74 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, export_conandata_patches, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.52.0" + +class SimpleEnumConan(ConanFile): + name = "simple_enum" + description = "An Fast, Intuitive and Type-Safe C++ Enumeration Support Library" + license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/arturbac/simple_enum" + topics = ("serialization", "type-safe", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "11", + "clang": "12", + "apple-clang": "14", # apple-clang/13 doesn't support std::convertible_to + "Visual Studio": "16", + "msvc": "192", + } + + def export_sources(self): + export_conandata_patches(self) + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + copy( + self, + "*.h", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/simple_enum/all/test_package/CMakeLists.txt b/recipes/simple_enum/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..6835a49d78e83 --- /dev/null +++ b/recipes/simple_enum/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(simple_enum REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE simple_enum::simple_enum) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/simple_enum/all/test_package/conanfile.py b/recipes/simple_enum/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/simple_enum/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/simple_enum/all/test_package/test_package.cpp b/recipes/simple_enum/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..694699608c7ba --- /dev/null +++ b/recipes/simple_enum/all/test_package/test_package.cpp @@ -0,0 +1,8 @@ +#include + +int main() { + enum struct enum_bounded { v1 = 1, v2, v3, first = v1, last = v3 }; + static_assert(simple_enum::enum_name(enum_bounded::v2) == "v2"); + + return 0; +} diff --git a/recipes/simple_enum/config.yml b/recipes/simple_enum/config.yml new file mode 100644 index 0000000000000..675f954f2770e --- /dev/null +++ b/recipes/simple_enum/config.yml @@ -0,0 +1,3 @@ +versions: + "0.8.0": + folder: all diff --git a/recipes/spy/all/conandata.yml b/recipes/spy/all/conandata.yml index a03c066af9192..a6f3a70ed4537 100644 --- a/recipes/spy/all/conandata.yml +++ b/recipes/spy/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/jfalcou/spy/archive/1.1.0.tar.gz" + sha256: "35e15dfe7bebcb03fb28c249d2c2c4ed302dadafbfd5f81e71c31b95d1e3b2dd" "1.0.0": url: "https://github.com/jfalcou/spy/archive/1.0.0.tar.gz" sha256: "ae2f508460b3b21436a652e281e1cf44370da5871a9d13086daa04a9e2bd7d1b" diff --git a/recipes/spy/all/conanfile.py b/recipes/spy/all/conanfile.py index 4e3adabd43a05..5d68cfa807921 100644 --- a/recipes/spy/all/conanfile.py +++ b/recipes/spy/all/conanfile.py @@ -10,11 +10,12 @@ class SpyConan(ConanFile): name = "spy" + description = "C++ 17 for constexpr-proof detection and classification of informations about OS, compiler, etc..." license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://jfalcou.github.io/spy/" - description = "C++ 17 for constexpr-proof detection and classification of informations about OS, compiler, etc..." - topics = ("c++17", "config", "metaprogramming") + topics = ("config", "metaprogramming", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -27,6 +28,7 @@ def _compilers_minimum_version(self): return { "gcc": "7.4", "Visual Studio": "15.7", + "msvc": "191", "clang": "6", "apple-clang": "10", } @@ -54,11 +56,7 @@ def layout(self): basic_layout(self, src_folder="src") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) - - def build(self): - pass + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) @@ -66,6 +64,4 @@ def package(self): def package_info(self): self.cpp_info.bindirs = [] - self.cpp_info.frameworkdirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] diff --git a/recipes/spy/all/test_package/conanfile.py b/recipes/spy/all/test_package/conanfile.py index d120a992c06a6..8a5bb47f50c4c 100644 --- a/recipes/spy/all/test_package/conanfile.py +++ b/recipes/spy/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/spy/config.yml b/recipes/spy/config.yml index 1d92b70b7b274..cab874d2d97fa 100644 --- a/recipes/spy/config.yml +++ b/recipes/spy/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.0": + folder: all "1.0.0": folder: all "0.0.4": diff --git a/recipes/sqlcipher/all/conandata.yml b/recipes/sqlcipher/all/conandata.yml index 3d9822ef95d64..5d877e92e6fb1 100644 --- a/recipes/sqlcipher/all/conandata.yml +++ b/recipes/sqlcipher/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.6.1": + url: "https://github.com/sqlcipher/sqlcipher/archive/v4.6.1.zip" + sha256: "93a7475183d47e2d33f85aefa7518e8730796f103612d36ae191ae56209104e0" "4.6.0": url: "https://github.com/sqlcipher/sqlcipher/archive/v4.6.0.zip" sha256: "2d41ba2bf09c74a488f546551f65f0fa8517413307a0509dd2c87d66df6bff95" @@ -27,6 +30,10 @@ sources: url: "https://github.com/sqlcipher/sqlcipher/archive/v4.3.0.zip" sha256: "41e1408465488e9c478ca5b7c5f8410405a10caa73b82db60ac115a76c563c05" patches: + "4.6.1": + - patch_file: patches/Makefile.in-v4.6.1.patch + - patch_file: patches/Makefile.msc-v4.6.1.patch + - patch_file: patches/fix_configure-v4.5.7.patch "4.6.0": - patch_file: patches/Makefile.in-v4.5.7.patch - patch_file: patches/Makefile.msc-v4.5.7.patch diff --git a/recipes/sqlcipher/all/patches/Makefile.in-v4.5.7.patch b/recipes/sqlcipher/all/patches/Makefile.in-v4.5.7.patch index 63b0b52972962..8c0ff8f52c2da 100644 --- a/recipes/sqlcipher/all/patches/Makefile.in-v4.5.7.patch +++ b/recipes/sqlcipher/all/patches/Makefile.in-v4.5.7.patch @@ -12,15 +12,6 @@ index ce2617c..77242fc 100644 Makefile: $(TOP)/Makefile.in ./config.status -@@ -1367,7 +1366,7 @@ fulltestonly: $(TESTPROGS) fuzztest - # Fuzz testing - # - # WARNING: When the "fuzztest" target is run by the testrunner.tcl script, --# it does not actually run this code. Instead, it schedules equivalent -+# it does not actually run this code. Instead, it schedules equivalent - # commands. Therefore, if this target is updated, then code in - # testrunner_data.tcl (search for "trd_fuzztest_data") must also be updated. - # @@ -1579,9 +1578,8 @@ lib_install: libsqlcipher.la $(INSTALL) -d $(DESTDIR)$(libdir) $(LTINSTALL) libsqlcipher.la $(DESTDIR)$(libdir) @@ -32,12 +23,3 @@ index ce2617c..77242fc 100644 $(INSTALL) -d $(DESTDIR)$(includedir) $(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(includedir) $(INSTALL) -m 0644 $(TOP)/src/sqlite3ext.h $(DESTDIR)$(includedir) -@@ -1596,7 +1594,7 @@ tcl_install: lib_install libtclsqlite3.la pkgIndex.tcl - rm -f $(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.a - $(INSTALL) -m 0644 pkgIndex.tcl $(DESTDIR)$(TCLLIBDIR) - --clean: -+clean: - rm -f *.lo *.la *.o sqlcipher$(TEXE) libsqlcipher.la - rm -f sqlite3.h opcodes.* - rm -rf .libs .deps diff --git a/recipes/sqlcipher/all/patches/Makefile.in-v4.6.1.patch b/recipes/sqlcipher/all/patches/Makefile.in-v4.6.1.patch new file mode 100644 index 0000000000000..318c717c81e5a --- /dev/null +++ b/recipes/sqlcipher/all/patches/Makefile.in-v4.6.1.patch @@ -0,0 +1,27 @@ +diff --git a/Makefile.in b/Makefile.in +index 8431c25..2c1d4fd 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -676,8 +676,8 @@ SQLITE3_SHELL_TARGET = $(SQLITE3_SHELL_TARGET_@HAVE_WASI_SDK@) + # This is the default Makefile target. The objects listed here + # are what get build when you type just "make" with no arguments. + # +-all: sqlite3.h libsqlcipher.la $(SQLITE3_SHELL_TARGET) \ +- $(HAVE_TCL:1=libtclsqlite3.la) ++all: sqlite3.h libsqlcipher.la ++ + + Makefile: $(TOP)/Makefile.in + ./config.status +@@ -1578,9 +1578,9 @@ lib_install: libsqlcipher.la + $(INSTALL) -d $(DESTDIR)$(libdir) + $(LTINSTALL) libsqlcipher.la $(DESTDIR)$(libdir) + +-install: sqlcipher$(TEXE) lib_install sqlite3.h sqlcipher.pc ${HAVE_TCL:1=tcl_install} ++install: lib_install sqlite3.h sqlcipher.pc + $(INSTALL) -d $(DESTDIR)$(bindir) +- $(LTINSTALL) sqlcipher$(TEXE) $(DESTDIR)$(bindir) ++# $(LTINSTALL) sqlcipher$(TEXE) $(DESTDIR)$(bindir) + $(INSTALL) -d $(DESTDIR)$(includedir) + $(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(includedir) + $(INSTALL) -m 0644 $(TOP)/src/sqlite3ext.h $(DESTDIR)$(includedir) diff --git a/recipes/sqlcipher/all/patches/Makefile.msc-v4.6.1.patch b/recipes/sqlcipher/all/patches/Makefile.msc-v4.6.1.patch new file mode 100644 index 0000000000000..7edea48493167 --- /dev/null +++ b/recipes/sqlcipher/all/patches/Makefile.msc-v4.6.1.patch @@ -0,0 +1,160 @@ +diff --git a/Makefile.msc b/Makefile.msc +index d46cee1..899ce6a 100644 +--- a/Makefile.msc ++++ b/Makefile.msc +@@ -306,9 +306,9 @@ SQLITE3H = sqlite3.h + # + !IFNDEF SQLITE3DLL + !IF $(FOR_WIN10)!=0 +-SQLITE3DLL = winsqlite3.dll ++SQLITE3DLL = sqlcipher.dll + !ELSE +-SQLITE3DLL = sqlite3.dll ++SQLITE3DLL = sqlcipher.dll + !ENDIF + !ENDIF + +@@ -316,9 +316,9 @@ SQLITE3DLL = sqlite3.dll + # + !IFNDEF SQLITE3LIB + !IF $(FOR_WIN10)!=0 +-SQLITE3LIB = winsqlite3.lib ++SQLITE3LIB = sqlcipher.lib + !ELSE +-SQLITE3LIB = sqlite3.lib ++SQLITE3LIB = sqlcipher.lib + !ENDIF + !ENDIF + +@@ -703,7 +703,7 @@ SHELL_CORE_SRC = $(SQLITE3C) + SHELL_CORE_DEP = $(SQLITE3DLL) + # <> + !ELSEIF $(USE_AMALGAMATION)==0 +-SHELL_CORE_DEP = libsqlite3.lib ++SHELL_CORE_DEP = sqlcipher.lib + # <> + !ELSE + SHELL_CORE_DEP = +@@ -726,7 +726,7 @@ TESTFIXTURE_DEP = zlib $(TESTFIXTURE_DEP) + SHELL_CORE_LIB = $(SQLITE3LIB) + # <> + !ELSEIF $(USE_AMALGAMATION)==0 +-SHELL_CORE_LIB = libsqlite3.lib ++SHELL_CORE_LIB = sqlcipher.lib + # <> + !ELSE + SHELL_CORE_LIB = +@@ -761,8 +761,9 @@ RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP + # C compiler options for the Windows 10 platform (needs MSVC 2015). + # + !IF $(FOR_WIN10)!=0 +-TCC = $(TCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE +-BCC = $(BCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE ++# /d2guard4 requires /guard:cf to be present as well, but it doesn't work with /Zi (Debug builds) ++TCC = $(TCC) -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE ++BCC = $(BCC) -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE + !ENDIF + + # Also, we need to dynamically link to the correct MSVC runtime +@@ -1046,8 +1047,9 @@ TLIBS = + # default to file, 2 to default to memory, and 3 to force temporary + # tables to always be in memory. + # +-TCC = $(TCC) -DSQLITE_TEMP_STORE=1 +-RCC = $(RCC) -DSQLITE_TEMP_STORE=1 ++# Allow overriding the value ++TCC = $(TCC) -DSQLITE_TEMP_STORE=$(SQLITE_TEMP_STORE) ++RCC = $(RCC) -DSQLITE_TEMP_STORE=$(SQLITE_TEMP_STORE) + + # Enable/disable loadable extensions, and other optional features + # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*). +@@ -1213,14 +1215,15 @@ LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)" + !ENDIF + LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE + LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib +-LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib ++# Remove /NODEFAULTLIB:kernel32.lib, required by OpenSSL + !ENDIF + + # When compiling for UWP or the Windows 10 platform, some extra linker + # options are also required. + # + !IF $(FOR_UWP)!=0 || $(FOR_WIN10)!=0 +-LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib ++# Remove /NODEFAULTLIB:kernel32.lib, required by OpenSSL ++LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE + LTLINKOPTS = $(LTLINKOPTS) mincore.lib + !IFDEF PSDKLIBPATH + LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)" +@@ -1275,7 +1278,7 @@ LTLIBS = $(LTLIBS) $(LIBICU) + # + LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \ + backup.lo bitvec.lo btmutex.lo btree.lo build.lo \ +- callback.lo complete.lo ctime.lo \ ++ callback.lo complete.lo crypto.lo crypto_impl.lo crypto_openssl.lo ctime.lo \ + date.lo dbpage.lo dbstat.lo delete.lo \ + expr.lo fault.lo fkey.lo \ + fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \ +@@ -1786,7 +1789,7 @@ ALL_TCL_TARGETS = + # This is the default Makefile target. The objects listed here + # are what get build when you type just "make" with no arguments. + # +-core: dll libsqlite3.lib shell ++core: dll sqlcipher.lib shell + + # Targets that require the Tcl library. + # +@@ -1805,11 +1808,12 @@ dll: $(SQLITE3DLL) + shell: $(SQLITE3EXE) + + # <> +-libsqlite3.lib: $(LIBOBJ) +- $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS) ++# LTLIBPATHS is required to find the openssl/libressl libs ++sqlcipher.lib: $(LIBOBJ) ++ $(LTLIB) $(LTLIBPATHS) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS) + +-libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib +- $(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS) ++libtclsqlite3.lib: tclsqlite.lo sqlcipher.lib ++ $(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo sqlcipher.lib $(LIBTCLSTUB) $(TLIBS) + + tclsqlite3.def: tclsqlite.lo + echo EXPORTS > tclsqlite3.def +@@ -1831,9 +1835,9 @@ $(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP) + $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS) + + # <> +-sqlite3.def: libsqlite3.lib ++sqlite3.def: sqlcipher.lib + echo EXPORTS > sqlite3.def +- dumpbin /all libsqlite3.lib \ ++ dumpbin /all sqlcipher.lib \ + | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3(?:session|changeset|changegroup|rebaser|rbu)?_[^@]*)(?:@\d+)?$$" \1 \ + | sort >> sqlite3.def + # <> +@@ -2020,6 +2024,15 @@ callback.lo: $(TOP)\src\callback.c $(HDR) + complete.lo: $(TOP)\src\complete.c $(HDR) + $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\complete.c + ++crypto.lo: $(TOP)\src\crypto.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto.c ++ ++crypto_impl.lo: $(TOP)\src\crypto_impl.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto_impl.c ++ ++crypto_openssl.lo: $(TOP)\src\crypto_openssl.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto_openssl.c ++ + ctime.lo: $(TOP)\src\ctime.c $(HDR) + $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\ctime.c + +@@ -2444,7 +2457,7 @@ sqlite3rbu.lo: $(TOP)\ext\rbu\sqlite3rbu.c $(HDR) $(EXTHDR) + # Rules to build the 'testfixture' application. + # + # If using the amalgamation, use sqlite3.c directly to build the test +-# fixture. Otherwise link against libsqlite3.lib. (This distinction is ++# fixture. Otherwise link against sqlcipher.lib. (This distinction is + # necessary because the test fixture requires non-API symbols which are + # hidden when the library is built via the amalgamation). + # diff --git a/recipes/sqlcipher/config.yml b/recipes/sqlcipher/config.yml index 05e71e5640551..b3abcbf305759 100644 --- a/recipes/sqlcipher/config.yml +++ b/recipes/sqlcipher/config.yml @@ -1,4 +1,6 @@ versions: + "4.6.1": + folder: all "4.6.0": folder: all "4.5.7": diff --git a/recipes/sqlite3/all/conandata.yml b/recipes/sqlite3/all/conandata.yml index ac208fb3cac3a..cc14778b41f4c 100644 --- a/recipes/sqlite3/all/conandata.yml +++ b/recipes/sqlite3/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.46.1": + url: "https://sqlite.org/2024/sqlite-amalgamation-3460100.zip" + sha256: "77823cb110929c2bcb0f5d48e4833b5c59a8a6e40cdea3936b99e199dbbe5784" "3.46.0": url: "https://sqlite.org/2024/sqlite-amalgamation-3460000.zip" sha256: "712a7d09d2a22652fb06a49af516e051979a3984adb067da86760e60ed51a7f5" diff --git a/recipes/sqlite3/config.yml b/recipes/sqlite3/config.yml index 8482b7cd3dae3..379a6a6a50b9a 100644 --- a/recipes/sqlite3/config.yml +++ b/recipes/sqlite3/config.yml @@ -1,4 +1,6 @@ versions: + "3.46.1": + folder: all "3.46.0": folder: all "3.45.3": diff --git a/recipes/sqlite_orm/all/conandata.yml b/recipes/sqlite_orm/all/conandata.yml index b99589eb8062e..a5275f45fe034 100644 --- a/recipes/sqlite_orm/all/conandata.yml +++ b/recipes/sqlite_orm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.9": + url: "https://github.com/fnc12/sqlite_orm/archive/refs/tags/v1.9.tar.gz" + sha256: "a2fa433e24f6873a9e8cd9dd7e49d2d12640b458f3f6f941163cf60f6673b8a2" "1.8.2": url: "https://github.com/fnc12/sqlite_orm/archive/refs/tags/v1.8.2.tar.gz" sha256: "56e0c7729800637a8061658d0fdad4424d2cdde77b063d23cc1b76aa20339072" diff --git a/recipes/sqlite_orm/all/conanfile.py b/recipes/sqlite_orm/all/conanfile.py index 056b8b5414928..4c411ee943206 100644 --- a/recipes/sqlite_orm/all/conanfile.py +++ b/recipes/sqlite_orm/all/conanfile.py @@ -3,6 +3,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get from conan.tools.layout import basic_layout +from conan.tools.scm import Version import os required_conan_version = ">=1.52.0" @@ -12,9 +13,9 @@ class SqliteOrmConan(ConanFile): name = "sqlite_orm" description = "SQLite ORM light header only library for modern C++." license = "BSD-3-Clause" - topics = ("sqlite", "sql", "database", "orm") - homepage = "https://github.com/fnc12/sqlite_orm" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/fnc12/sqlite_orm" + topics = ("sqlite", "sql", "database", "orm", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" @@ -25,7 +26,7 @@ def _min_cppstd(self): @property def _compilers_minimum_version(self): return { - "gcc": "5", + "gcc": "5" if Version(self.version) < "1.9" else "8", "Visual Studio": "14", "msvc": "190", "clang": "3.4", diff --git a/recipes/sqlite_orm/config.yml b/recipes/sqlite_orm/config.yml index ab20df18e03f0..62ef26b962237 100644 --- a/recipes/sqlite_orm/config.yml +++ b/recipes/sqlite_orm/config.yml @@ -1,4 +1,6 @@ versions: + "1.9": + folder: all "1.8.2": folder: all "1.8.1": diff --git a/recipes/sqlitecpp/all/conandata.yml b/recipes/sqlitecpp/all/conandata.yml index a10675f041108..d52b243030764 100644 --- a/recipes/sqlitecpp/all/conandata.yml +++ b/recipes/sqlitecpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.3.2": + url: "https://github.com/SRombauts/SQLiteCpp/archive/3.3.2.tar.gz" + sha256: "5aa8eda130d0689bd5ed9b2074714c2dbc610f710483c61ba6cf944cebfe03af" "3.3.1": url: "https://github.com/SRombauts/SQLiteCpp/archive/3.3.1.tar.gz" sha256: "71f990f9fb4b004533b6859ce40729af823b87fe691dd99ca084a7fd40db54b9" diff --git a/recipes/sqlitecpp/config.yml b/recipes/sqlitecpp/config.yml index b3381f7005ac8..98605ec73a785 100644 --- a/recipes/sqlitecpp/config.yml +++ b/recipes/sqlitecpp/config.yml @@ -1,4 +1,6 @@ versions: + "3.3.2": + folder: all "3.3.1": folder: all "3.3.0": diff --git a/recipes/status-code/all/conandata.yml b/recipes/status-code/all/conandata.yml index 49b0985bc39b6..70939803c28aa 100644 --- a/recipes/status-code/all/conandata.yml +++ b/recipes/status-code/all/conandata.yml @@ -2,3 +2,6 @@ sources: "cci.20220616": url: "https://github.com/ned14/status-code/archive/38e1e862386cb38d577664fd681ef829b0e03fba.tar.gz" sha256: "faf112df1633a1ee1f58c8b056130154b7c0dbf12e7f006a04dc376500d271c3" + "cci.20240614": + url: "https://github.com/ned14/status-code/archive/a6689afceb19ed127ec4a828dcf1597102e6c02d.tar.gz" + sha256: "f9725675f9d124d2223f9554f11a7f9dcb4893ea2b8a73bd3f7b182f23ba26ca" diff --git a/recipes/status-code/all/conanfile.py b/recipes/status-code/all/conanfile.py index ba9f0306e38c0..9e9d6e1e369a2 100644 --- a/recipes/status-code/all/conanfile.py +++ b/recipes/status-code/all/conanfile.py @@ -53,3 +53,7 @@ def package_info(self): # See https://github.com/ned14/status-code/blob/38e1e862386cb38d577664fd681ef829b0e03fba/CMakeLists.txt#L126 self.cpp_info.set_property("cmake_file_name", "status-code") self.cpp_info.set_property("cmake_target_name", "status-code::hl") + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.components["hl"].names["cmake_find_package"] = "hl" + self.cpp_info.components["hl"].names["cmake_find_package_multi"] = "hl" diff --git a/recipes/status-code/all/test_package/test_package.cpp b/recipes/status-code/all/test_package/test_package.cpp index a2a617bc7f941..ac3726f0591c8 100644 --- a/recipes/status-code/all/test_package/test_package.cpp +++ b/recipes/status-code/all/test_package/test_package.cpp @@ -1,4 +1,8 @@ -#include +#if __has_include() +# include +#else +# include +#endif int main() { system_error2::system_code sc; diff --git a/recipes/status-code/all/test_v1_package/CMakeLists.txt b/recipes/status-code/all/test_v1_package/CMakeLists.txt index 378dd67690afd..54d2c07bb9d41 100644 --- a/recipes/status-code/all/test_v1_package/CMakeLists.txt +++ b/recipes/status-code/all/test_v1_package/CMakeLists.txt @@ -4,9 +4,5 @@ project(test_package LANGUAGES CXX) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -# Just a workaround to not supprt the deprecated generators while passing the 1.x hooks -find_package(status-code CONFIG REQUIRED) -add_library(status-code::hl ALIAS status-code::status-code) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/status-code/config.yml b/recipes/status-code/config.yml index 484ac289f9edf..9cd6d00352fb6 100644 --- a/recipes/status-code/config.yml +++ b/recipes/status-code/config.yml @@ -1,3 +1,5 @@ versions: "cci.20220616": folder: all + "cci.20240614": + folder: all diff --git a/recipes/stringzilla/all/conandata.yml b/recipes/stringzilla/all/conandata.yml index 9a0f2b597bc71..b44cb110d34b4 100644 --- a/recipes/stringzilla/all/conandata.yml +++ b/recipes/stringzilla/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "3.9.3": + url: "https://github.com/ashvardanian/StringZilla/archive/refs/tags/v3.9.3.tar.gz" + sha256: "7d24a2fc0e426a85eac0a2be965f64e0eee794d89a895c2b5dcb614b038af580" + "3.9.0": + url: "https://github.com/ashvardanian/StringZilla/archive/refs/tags/v3.9.0.tar.gz" + sha256: "26d282b7d5ba307de7fa80c41821526babf6c6cb8e808253af8bff7664275d5c" "3.8.4": url: "https://github.com/ashvardanian/StringZilla/archive/refs/tags/v3.8.4.tar.gz" sha256: "4132957633d28ce2651e587f2ab736cdf174e61b8ab1bcef453b21d40a2d872e" diff --git a/recipes/stringzilla/config.yml b/recipes/stringzilla/config.yml index 1873ea240511d..7b1e1a9b0e3f3 100644 --- a/recipes/stringzilla/config.yml +++ b/recipes/stringzilla/config.yml @@ -1,4 +1,8 @@ versions: + "3.9.3": + folder: all + "3.9.0": + folder: all "3.8.4": folder: all "2.0.4": diff --git a/recipes/swig/all/conandata.yml b/recipes/swig/all/conandata.yml index 5daf69357f98b..dbb625e2ee27c 100644 --- a/recipes/swig/all/conandata.yml +++ b/recipes/swig/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.2.1": + url: "https://github.com/swig/swig/archive/refs/tags/v4.2.1.tar.gz" + sha256: "8895878b9215612e73611203dc8f5232c626e4d07ffc4532922f375518f067ca" "4.1.1": url: "https://github.com/swig/swig/archive/refs/tags/v4.1.1.tar.gz" sha256: "4d97f9528dda8ced8b762e405dff2da38cc4603ef5f868f7287c94872f693265" @@ -12,6 +15,13 @@ sources: url: "https://github.com/swig/swig/archive/rel-4.0.1.tar.gz" sha256: "2eaf6fb89d071d1be280bf995c63360b3729860c0da64948123b5d7e4cfb6cb7" patches: + "4.2.1": + - patch_file: "patches/0001-4.2.1-swig-linux-library-path.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" + - patch_file: "patches/0002-4.2.1-do-not-define-SWIG_LIB_WIN_UNIX.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" "4.1.1": - patch_file: "patches/0001-4.1.0-swig-linux-library-path.patch" patch_type: "portability" diff --git a/recipes/swig/all/conanfile.py b/recipes/swig/all/conanfile.py index d1ed51bb5b937..fc0ddef14c147 100644 --- a/recipes/swig/all/conanfile.py +++ b/recipes/swig/all/conanfile.py @@ -62,10 +62,17 @@ def build_requirements(self): self.tool_requires("msys2/cci.latest") if is_msvc(self): self.tool_requires("cccl/1.3") - if is_msvc(self): - self.tool_requires("winflexbison/2.5.25") + if Version(self.version) >= "4.2": + if is_msvc(self): + # bison 3.8.2 is not ready for msvc + self.tool_requires("bison/3.7.6") + else: + self.tool_requires("bison/3.8.2") else: - self.tool_requires("bison/3.8.2") + if is_msvc(self): + self.tool_requires("winflexbison/2.5.25") + else: + self.tool_requires("bison/3.8.2") self.tool_requires("automake/1.16.5") def source(self): diff --git a/recipes/swig/all/patches/0001-4.2.1-swig-linux-library-path.patch b/recipes/swig/all/patches/0001-4.2.1-swig-linux-library-path.patch new file mode 100644 index 0000000000000..f3c40eb7eab79 --- /dev/null +++ b/recipes/swig/all/patches/0001-4.2.1-swig-linux-library-path.patch @@ -0,0 +1,51 @@ +--- Source/Modules/main.cxx ++++ Source/Modules/main.cxx +@@ -861,6 +861,32 @@ + + static void SWIG_exit_handler(int status); + ++#if defined(HAVE_UNISTD_H) && !defined(_WIN32) ++#include ++#include ++#include ++ ++static String *get_exe_path(void) { ++ Dl_info info; ++ if (dladdr("main", &info)) { ++ char realp_buffer[PATH_MAX]; ++ char* res = NULL; ++ ++ res = realpath(info.dli_fname, realp_buffer); ++ if (!res) { ++ return NewString(SWIG_LIB); ++ } ++ ++ const char* dir = dirname(realp_buffer); ++ char dest_buf[PATH_MAX]; ++ strcpy(dest_buf, dir); ++ strcat(dest_buf, "/swiglib"); ++ return NewStringWithSize(dest_buf, strlen(dest_buf)); ++ } ++ return NewString(SWIG_LIB); ++} ++#endif ++ + int SWIG_main(int argc, char *argv[], const TargetLanguageModule *tlm) { + char *c; + +@@ -900,12 +926,14 @@ + char *p; + if (!(GetModuleFileName(0, buf, MAX_PATH) == 0 || (p = strrchr(buf, '\\')) == 0)) { + *(p + 1) = '\0'; +- SwigLib = NewStringf("%sLib", buf); // Native windows installation path ++ SwigLib = NewStringf("%sswiglib", buf); // Native windows installation path + } else { + SwigLib = NewStringf(""); // Unexpected error + } + if (Len(SWIG_LIB_WIN_UNIX) > 0) + SwigLibWinUnix = NewString(SWIG_LIB_WIN_UNIX); // Unix installation path using a drive letter (for msys/mingw) ++#elif defined(HAVE_UNISTD_H) && !defined(_WIN32) ++ SwigLib = get_exe_path(); + #else + SwigLib = NewString(SWIG_LIB); + #endif diff --git a/recipes/swig/all/patches/0002-4.2.1-do-not-define-SWIG_LIB_WIN_UNIX.patch b/recipes/swig/all/patches/0002-4.2.1-do-not-define-SWIG_LIB_WIN_UNIX.patch new file mode 100644 index 0000000000000..a58da257a1aef --- /dev/null +++ b/recipes/swig/all/patches/0002-4.2.1-do-not-define-SWIG_LIB_WIN_UNIX.patch @@ -0,0 +1,11 @@ +--- configure.ac ++++ configure.ac +@@ -2803,7 +2803,7 @@ + *-*-cygwin*) SWIG_LIB_WIN_UNIX=`cygpath --mixed "$SWIG_LIB"`;; + *) SWIG_LIB_WIN_UNIX="";; + esac +-AC_DEFINE_UNQUOTED(SWIG_LIB_WIN_UNIX, ["$SWIG_LIB_WIN_UNIX"], [Directory for SWIG system-independent libraries (Unix install on native Windows)]) ++AC_DEFINE_UNQUOTED(SWIG_LIB_WIN_UNIX, [""], [Directory for SWIG system-independent libraries (Unix install on native Windows)]) + + SWIG_LIB_PREINST=$ABS_SRCDIR/Lib + AC_SUBST(SWIG_LIB_PREINST) diff --git a/recipes/swig/config.yml b/recipes/swig/config.yml index e4181f963c4e1..5a11eaadfdc07 100644 --- a/recipes/swig/config.yml +++ b/recipes/swig/config.yml @@ -1,4 +1,6 @@ versions: + "4.2.1": + folder: "all" "4.1.1": folder: "all" "4.1.0": diff --git a/recipes/systemc/all/conanfile.py b/recipes/systemc/all/conanfile.py index 60fb8e631adf2..a6161b53eeb5f 100644 --- a/recipes/systemc/all/conanfile.py +++ b/recipes/systemc/all/conanfile.py @@ -1,10 +1,9 @@ -from conan import ConanFile, conan_version +from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.microsoft import is_msvc -from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -70,15 +69,6 @@ def validate(self): "Building SystemC as a shared library on Windows is currently not supported" ) - if ( - conan_version.major == 1 - and self.settings.compiler == "gcc" - and Version(self.settings.compiler.version) <= "5" - ): - raise ConanInvalidConfiguration( - f"GCC {self.settings.compiler.version} is not supported by SystemC on Conan v1" - ) - def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/tensorflow-lite/all/conandata.yml b/recipes/tensorflow-lite/all/conandata.yml index c5076017657c5..ab25e5805cf91 100644 --- a/recipes/tensorflow-lite/all/conandata.yml +++ b/recipes/tensorflow-lite/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.15.0": + url: "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.15.0.tar.gz" + sha256: "9cec5acb0ecf2d47b16891f8bc5bc6fbfdffe1700bdadc0d9ebe27ea34f0c220" "2.12.0": url: "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.12.0.tar.gz" sha256: "c030cb1905bff1d2446615992aad8d8d85cbe90c4fb625cee458c63bf466bc8e" @@ -6,6 +9,17 @@ sources: url: "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.10.0.tar.gz" sha256: "b5a1bb04c84b6fe1538377e5a1f649bb5d5f0b2e3625a3c526ff3a8af88633e8" patches: + "2.15.0": + - patch_file: "patches/2.15.0-0001-disable-fetch-content.patch" + patch_description: "Fail if the CMake build script tries to fetch external dependencies" + patch_type: "conan" + - patch_file: "patches/2.15.0-0002-windows-mmap.patch" + patch_description: "Disable mmap on Windows." + patch_type: "bugfix" + patch_source: "https://github.com/tensorflow/tensorflow/pull/62636" + - patch_file: "patches/2.15.0-0003-use-cci-dependencies.patch" + patch_description: "Dependency compatibility: Patch CMakeLists.txt, updating package names, target names, etc" + patch_type: "conan" "2.12.0": - patch_file: "patches/2.12.0-0001-remove_simple_memory_arena_debug_dump.patch" patch_description: "Shared build fails on Windows with error LNK2005. Resolve the conflict by removing the conflicting implementation for now." @@ -16,6 +30,10 @@ patches: - patch_file: "patches/2.12.0-0003-use-cci-dependencies.patch" patch_description: "Dependency compatibility: Patch CMakeLists.txt, updating package names, target names, etc" patch_type: "conan" + - patch_file: "patches/2.12.0-0004-use-add-stdint-for-int-types.patch" + patch_description: "Add stdint.h for int types in internal::Spectrogram" + patch_type: "bugfix" + patch_source: "https://github.com/tensorflow/tensorflow/pull/60299" "2.10.0": - patch_file: "patches/2.10.0-0001-remove_simple_memory_arena_debug_dump.patch" patch_description: "Shared build fails on Windows with error LNK2005. Resolve the conflict by removing the conflicting implementation for now." @@ -25,3 +43,7 @@ patches: - patch_file: "patches/2.10.0-0003-use-cci-dependencies.patch" patch_description: "Dependency compatibility: Patch CMakeLists.txt, updating package names, target names, etc" patch_type: "conan" + - patch_file: "patches/2.10.0-0004-use-add-stdint-for-int-types.patch" + patch_description: "Add stdint.h for int types in internal::Spectrogram" + patch_type: "bugfix" + patch_source: "https://github.com/tensorflow/tensorflow/pull/60299" diff --git a/recipes/tensorflow-lite/all/conanfile.py b/recipes/tensorflow-lite/all/conanfile.py index 1fe43f9524e5d..dd383c7b99b3e 100644 --- a/recipes/tensorflow-lite/all/conanfile.py +++ b/recipes/tensorflow-lite/all/conanfile.py @@ -81,9 +81,12 @@ def requirements(self): self.requires("eigen/3.4.0") self.requires("farmhash/cci.20190513") self.requires("fft/cci.20061228") - self.requires("flatbuffers/23.3.3", transitive_headers=True) + if Version(self.version) < "2.15.0": + self.requires("flatbuffers/23.3.3", transitive_headers=True) + else: + self.requires("flatbuffers/23.5.26", transitive_headers=True) self.requires("gemmlowp/cci.20210928") - self.requires("ruy/cci.20220628") + self.requires("ruy/cci.20231129") if self.settings.arch in ("x86", "x86_64"): self.requires("intel-neon2sse/cci.20210225") if self.options.with_xnnpack: @@ -123,6 +126,7 @@ def generate(self): "TFLITE_ENABLE_XNNPACK": self.options.with_xnnpack, "TFLITE_ENABLE_MMAP": self.options.get_safe("with_mmap", False), "FETCHCONTENT_FULLY_DISCONNECTED": True, + "SYSTEM_PTHREADPOOL": True, "clog_POPULATED": True, }) if self.settings.arch == "armv8": @@ -158,9 +162,9 @@ def package(self): copy(self, "LICENSE", self.source_folder, join(self.package_folder, "licenses")) copy(self, "*.h", join(self.source_folder, "tensorflow", "lite"), join(self.package_folder, "include", "tensorflow", "lite")) copy(self, "version.h", join(self.source_folder, "tensorflow", "core", "public"), join(self.package_folder, "include", "tensorflow", "core", "public")) - copy(self, "*.a", self.build_folder, join(self.package_folder, "lib")) - copy(self, "*.so", self.build_folder, join(self.package_folder, "lib")) - copy(self, "*.dylib", self.build_folder, join(self.package_folder, "lib")) + copy(self, "*.a", self.build_folder, join(self.package_folder, "lib"), keep_path=False) + copy(self, "*.so", self.build_folder, join(self.package_folder, "lib"), keep_path=False) + copy(self, "*.dylib", self.build_folder, join(self.package_folder, "lib"), keep_path=False) copy(self, "*.lib", self.build_folder, join(self.package_folder, "lib"), keep_path=False) copy(self, "*.dll", self.build_folder, join(self.package_folder, "bin"), keep_path=False) self._create_cmake_module_alias_target(self, join(self.package_folder, self._module_file)) diff --git a/recipes/tensorflow-lite/all/patches/2.10.0-0004-use-add-stdint-for-int-types.patch b/recipes/tensorflow-lite/all/patches/2.10.0-0004-use-add-stdint-for-int-types.patch new file mode 100644 index 0000000000000..b57b09d18bd58 --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.10.0-0004-use-add-stdint-for-int-types.patch @@ -0,0 +1,12 @@ +diff --git a/tensorflow/lite/kernels/internal/spectrogram.cc b/tensorflow/lite/kernels/internal/spectrogram.cc +index a832962a..919eebeb 100644 +--- a/tensorflow/lite/kernels/internal/spectrogram.cc ++++ b/tensorflow/lite/kernels/internal/spectrogram.cc +@@ -17,6 +17,7 @@ limitations under the License. + + #include + #include ++#include + + #include "third_party/fft2d/fft.h" + diff --git a/recipes/tensorflow-lite/all/patches/2.12.0-0004-use-add-stdint-for-int-types.patch b/recipes/tensorflow-lite/all/patches/2.12.0-0004-use-add-stdint-for-int-types.patch new file mode 100644 index 0000000000000..b57b09d18bd58 --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.12.0-0004-use-add-stdint-for-int-types.patch @@ -0,0 +1,12 @@ +diff --git a/tensorflow/lite/kernels/internal/spectrogram.cc b/tensorflow/lite/kernels/internal/spectrogram.cc +index a832962a..919eebeb 100644 +--- a/tensorflow/lite/kernels/internal/spectrogram.cc ++++ b/tensorflow/lite/kernels/internal/spectrogram.cc +@@ -17,6 +17,7 @@ limitations under the License. + + #include + #include ++#include + + #include "third_party/fft2d/fft.h" + diff --git a/recipes/tensorflow-lite/all/patches/2.15.0-0001-disable-fetch-content.patch b/recipes/tensorflow-lite/all/patches/2.15.0-0001-disable-fetch-content.patch new file mode 100644 index 0000000000000..adc6f0561afef --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.15.0-0001-disable-fetch-content.patch @@ -0,0 +1,12 @@ +diff --git a/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake b/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake +index 9ed95109ba9..4ddf322b95f 100644 +--- a/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake ++++ b/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake +@@ -244,6 +244,7 @@ endfunction() + # All content names passed to this method are added to the global property + # OVERRIDABLE_FETCH_CONTENT_LIST. + function(OverridableFetchContent_Declare CONTENT_NAME) ++ message(FATAL_ERROR "OverridableFetchContent_Declare called by ${CONTENT_NAME}! Failing build.") + set(OVERRIDABLE_ARGS + GIT_REPOSITORY + GIT_TAG diff --git a/recipes/tensorflow-lite/all/patches/2.15.0-0002-windows-mmap.patch b/recipes/tensorflow-lite/all/patches/2.15.0-0002-windows-mmap.patch new file mode 100644 index 0000000000000..1305e34c37c6d --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.15.0-0002-windows-mmap.patch @@ -0,0 +1,20 @@ +commit 77056b1ab930c36c8066446615577be4d121e3ea +Author: talyz +Date: Thu Dec 14 11:43:16 2023 +0100 + + cmake: Disable the use of mmap on Windows + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index 83bc7629004..0958ed1b9ce 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -202,7 +202,8 @@ if(CMAKE_SYSTEM_NAME MATCHES "Windows") + # Use NOMINMAX to disable the min / max macros in windows.h as they break + # use of std::min std::max. + # Use NOGDI to ERROR macro which breaks TensorFlow logging. +- list(APPEND TFLITE_TARGET_PRIVATE_OPTIONS "-DNOMINMAX" "-DNOGDI") ++ # Disable mmap, which is not available on Windows. ++ list(APPEND TFLITE_TARGET_PRIVATE_OPTIONS "-DNOMINMAX" "-DNOGDI" "-DTFLITE_MMAP_DISABLED") + # lite/kernels/conv.cc has more than 64k sections so enable /bigobj to + # support compilation with MSVC2015. + if(MSVC) diff --git a/recipes/tensorflow-lite/all/patches/2.15.0-0003-use-cci-dependencies.patch b/recipes/tensorflow-lite/all/patches/2.15.0-0003-use-cci-dependencies.patch new file mode 100644 index 0000000000000..2c7c5965e2927 --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.15.0-0003-use-cci-dependencies.patch @@ -0,0 +1,68 @@ +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index 0958ed1b9ce..13d06f12ca6 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -147,7 +147,7 @@ set(TFLITE_TARGET_DEPENDENCIES "") + find_package(absl REQUIRED) + find_package(Eigen3 REQUIRED) + find_package(farmhash REQUIRED) +-find_package(fft2d REQUIRED) ++find_package(fft REQUIRED) + find_package(FlatBuffers REQUIRED) + find_package(gemmlowp REQUIRED) + if (NOT CMAKE_SYSTEM_PROCESSOR OR CMAKE_SYSTEM_PROCESSOR MATCHES "x86") +@@ -155,7 +155,6 @@ if (NOT CMAKE_SYSTEM_PROCESSOR OR CMAKE_SYSTEM_PROCESSOR MATCHES "x86") + list(APPEND TFLITE_TARGET_DEPENDENCIES NEON_2_SSE::NEON_2_SSE) + endif() + find_package(cpuinfo REQUIRED) #CPUINFO is used by XNNPACK and RUY library +-find_package(ml_dtypes REQUIRED) + find_package(ruy REQUIRED) + # Include TSL, which is in tensorflow/third_party + include_directories( +@@ -183,6 +182,11 @@ if(NOT SYSTEM_PTHREADPOOL AND NOT TARGET pthreadpool) + "${PTHREADPOOL_SOURCE_DIR}" + "${CMAKE_BINARY_DIR}/pthreadpool") + endif() ++if(TARGET flatbuffers::flatbuffers_shared) ++ set(FLATBUFFERS_TARGET flatbuffers::flatbuffers_shared) ++else() ++ set(FLATBUFFERS_TARGET flatbuffers::flatbuffers) ++endif() + set(TF_TARGET_PRIVATE_OPTIONS "") + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang$") + # TensorFlow uses a heap of deprecated proto fields so surpress these +@@ -483,13 +487,13 @@ else() + endif() + if(TFLITE_ENABLE_XNNPACK) + find_package(fp16_headers REQUIRED) +- find_package(XNNPACK REQUIRED) ++ find_package(xnnpack REQUIRED) + populate_tflite_source_vars("delegates/xnnpack" + TFLITE_DELEGATES_XNNPACK_SRCS + FILTER ".*(_test|_tester)\\.(cc|h)" + ) + list(APPEND TFLITE_TARGET_DEPENDENCIES +- XNNPACK ++ xnnpack::xnnpack + ) + list(APPEND TFLITE_TARGET_PUBLIC_OPTIONS "-DTFLITE_BUILD_WITH_XNNPACK_DELEGATE") + endif() +@@ -633,13 +637,12 @@ target_link_libraries(tensorflow-lite + absl::strings + absl::synchronization + absl::variant +- farmhash +- fft2d_fftsg2d +- flatbuffers::flatbuffers +- gemmlowp::gemmlowp +- ml_dtypes ++ farmhash::farmhash ++ fft::fft ++ ${FLATBUFFERS_TARGET} ++ gemmlowp::eight_bit_int_gemm + ruy::ruy +- pthreadpool ++ pthreadpool::pthreadpool + ${CMAKE_DL_LIBS} + ${TFLITE_TARGET_DEPENDENCIES} + ) diff --git a/recipes/tensorflow-lite/config.yml b/recipes/tensorflow-lite/config.yml index cabc9e91cd30c..7e71186249830 100644 --- a/recipes/tensorflow-lite/config.yml +++ b/recipes/tensorflow-lite/config.yml @@ -1,4 +1,6 @@ versions: + "2.15.0": + folder: all "2.12.0": folder: all "2.10.0": diff --git a/recipes/tgbot/all/conandata.yml b/recipes/tgbot/all/conandata.yml index 1279fcb4b2148..c1de261e9fcc7 100644 --- a/recipes/tgbot/all/conandata.yml +++ b/recipes/tgbot/all/conandata.yml @@ -1,4 +1,8 @@ sources: + "1.8": + url: "https://github.com/reo7sp/tgbot-cpp/archive/v1.8.tar.gz" + sha256: "43ff1a359b8db026e58e517703e616accaae33e01ebc7e87613632b7e4653467" + # This is the last version for C++11. "1.7.2": url: "https://github.com/reo7sp/tgbot-cpp/archive/v1.7.2.tar.gz" sha256: "3a41c25c5e4b60bda3f278550a380f1c7c382fd50ea1ab1801edc837d1535462" diff --git a/recipes/tgbot/all/conanfile.py b/recipes/tgbot/all/conanfile.py index 1fb99e68206f6..9d54fa2902dee 100644 --- a/recipes/tgbot/all/conanfile.py +++ b/recipes/tgbot/all/conanfile.py @@ -5,7 +5,8 @@ from conan.tools.apple import fix_apple_shared_install_name from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, replace_in_file +from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -29,6 +30,32 @@ class TgbotConan(ConanFile): "fPIC": True, } + @property + def _min_cppstd(self): + # tgbot requiroes C++17 since 1.7.3 + return "14" if Version(self.version) < "1.7.3" else "17" + + @property + def _compilers_minimum_version(self): + return { + "17": { + # tgbot/>= 1.7.3 require C++17 filesystem + "gcc": "9", + "clang": "9", + "apple-clang": "13", + "Visual Studio": "16", + "msvc": "192", + }, + "14": { + "gcc": "5", + "clang": "3", + "apple-clang": "10", + "Visual Studio": "15", + "msvc": "191", + } + }.get(self._min_cppstd, {}) + + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -53,7 +80,13 @@ def _required_boost_components(self): def validate(self): if self.settings.compiler.cppstd: - check_min_cppstd(self, 11) + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + miss_boost_required_comp = any( self.dependencies["boost"].options.get_safe(f"without_{boost_comp}", True) for boost_comp in self._required_boost_components @@ -70,6 +103,8 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["ENABLE_TESTS"] = False + if not self.settings.compiler.cppstd: + tc.cache_variables["CMAKE_CXX_STANDARD"] = self._min_cppstd tc.generate() tc = CMakeDeps(self) tc.generate() @@ -82,6 +117,11 @@ def _patch_sources(self): "set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON)", "", ) + # Don't force CMAKE_CXX_STANDARD + replace_in_file(self, + os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_CXX_STANDARD", + "#") def build(self): self._patch_sources() @@ -96,7 +136,11 @@ def package(self): dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) fix_apple_shared_install_name(self) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): self.cpp_info.libs = ["TgBot"] self.cpp_info.defines = ["HAVE_CURL=1"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/tgbot/all/test_package/CMakeLists.txt b/recipes/tgbot/all/test_package/CMakeLists.txt index ebe398c29035c..766207d11a696 100644 --- a/recipes/tgbot/all/test_package/CMakeLists.txt +++ b/recipes/tgbot/all/test_package/CMakeLists.txt @@ -1,8 +1,12 @@ cmake_minimum_required(VERSION 3.15) -project(test_package CXX) +project(test_package LANGUAGES CXX) find_package(tgbot REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) -target_link_libraries(${PROJECT_NAME} tgbot::tgbot) +target_link_libraries(${PROJECT_NAME} PRIVATE tgbot::tgbot) +if(tvbot_VERSION VERSION_LESS "1.7.3") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +endif() diff --git a/recipes/tgbot/config.yml b/recipes/tgbot/config.yml index 02741b3fbce3e..e9249e18493da 100644 --- a/recipes/tgbot/config.yml +++ b/recipes/tgbot/config.yml @@ -1,4 +1,6 @@ versions: + "1.8": + folder: all "1.7.2": folder: all "1.5": diff --git a/recipes/thorvg/all/conandata.yml b/recipes/thorvg/all/conandata.yml index 8d7b19a192cd6..54a4d7a98be69 100644 --- a/recipes/thorvg/all/conandata.yml +++ b/recipes/thorvg/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.14.6": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.14.6.tar.gz" + sha256: "13d7778968ce10f4f7dd1ea1f66861d4ee8ff22f669566992b4ac00e050496cf" + "0.14.5": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.14.5.tar.gz" + sha256: "a007c548e39b0fad5d66ce9cf71244d3d219d9188fd80ccc049a5fa1b7f7aac2" "0.14.4": url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.14.4.tar.gz" sha256: "0adabdb61395d9ad126c49ac80aa9c971ad7a37268a77a9712790a556df32838" diff --git a/recipes/thorvg/config.yml b/recipes/thorvg/config.yml index 62dcfcddca37d..d575fd184ff22 100644 --- a/recipes/thorvg/config.yml +++ b/recipes/thorvg/config.yml @@ -1,4 +1,8 @@ versions: + "0.14.6": + folder: all + "0.14.5": + folder: all "0.14.4": folder: all "0.14.2": diff --git a/recipes/thrift/all/conanfile.py b/recipes/thrift/all/conanfile.py index 4239d05bfd5e2..97debbded3cd9 100644 --- a/recipes/thrift/all/conanfile.py +++ b/recipes/thrift/all/conanfile.py @@ -175,7 +175,6 @@ def package_info(self): self.cpp_info.components["libthrift"].set_property("pkg_config_name", "thrift") self.cpp_info.components["libthrift"].libs = [f"thrift{libsuffix}"] if self.settings.os == "Windows": - self.cpp_info.components["libthrift"].defines.append("NOMINMAX") if Version(self.version) >= "0.15.0": self.cpp_info.components["libthrift"].system_libs.append("shlwapi") elif self.settings.os in ["Linux", "FreeBSD"]: diff --git a/recipes/toml11/all/conandata.yml b/recipes/toml11/all/conandata.yml index 86dbccc43bd11..20b0be495cd07 100644 --- a/recipes/toml11/all/conandata.yml +++ b/recipes/toml11/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.2.0": + url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v4.2.0.tar.gz" + sha256: "9287971cd4a1a3992ef37e7b95a3972d1ae56410e7f8e3f300727ab1d6c79c2c" "4.1.0": url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v4.1.0.tar.gz" sha256: "fb4c02cc708ae28e6fc3496514e3625e4b6738ed4ce40897710ca4d7a29de4f7" @@ -11,27 +14,3 @@ sources: "3.8.1": url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v3.8.1.tar.gz" sha256: "6a3d20080ecca5ea42102c078d3415bef80920f6c4ea2258e87572876af77849" - "3.8.0": - url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v3.8.0.tar.gz" - sha256: "36ce64b09f9151b57ba1970f12a591006fcae17b751ba011314c1f5518e77bc7" - "3.7.1": - url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v3.7.1.tar.gz" - sha256: "afeaa9aa0416d4b6b2cd3897ca55d9317084103077b32a852247d8efd4cf6068" - "3.7.0": - url: "https://github.com/ToruNiina/toml11/archive/v3.7.0.tar.gz" - sha256: "a0b6bec77c0e418eea7d270a4437510884f2fe8f61e7ab121729624f04c4b58e" - "3.6.1": - url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v3.6.1.tar.gz" - sha256: "ca4c390ed8da0d77ae6eca30e70ab0bf5cc92adfc1bc2f71a2066bc5656d8d96" - "3.6.0": - url: "https://github.com/ToruNiina/toml11/archive/v3.6.0.tar.gz" - sha256: "39e8d651db346ae8c7e3b39d6338a37232b9af3bba36ade45b241bf105c2226c" - "3.5.0": - url: "https://github.com/ToruNiina/toml11/archive/v3.5.0.tar.gz" - sha256: "fc613874c6e80dc740134a7353cf23c7f834b59cd601af84ab535ee16a53b1c3" - "3.4.0": - url: "https://github.com/ToruNiina/toml11/archive/v3.4.0.tar.gz" - sha256: "bc6d733efd9216af8c119d8ac64a805578c79cc82b813e4d1d880ca128bd154d" - "3.1.0": - url: "https://github.com/ToruNiina/toml11/archive/v3.1.0.tar.gz" - sha256: "3a118f32e5343998f37be9807c72fd11c3168fe12a5b1abfdc0f1e60de6380a4" diff --git a/recipes/toml11/config.yml b/recipes/toml11/config.yml index 111b726b75323..43dd6c9456dcb 100644 --- a/recipes/toml11/config.yml +++ b/recipes/toml11/config.yml @@ -1,4 +1,6 @@ versions: + "4.2.0": + folder: all "4.1.0": folder: all "4.0.3": @@ -7,19 +9,3 @@ versions: folder: all "3.8.1": folder: all - "3.8.0": - folder: all - "3.7.1": - folder: all - "3.7.0": - folder: all - "3.6.1": - folder: all - "3.6.0": - folder: all - "3.5.0": - folder: all - "3.4.0": - folder: all - "3.1.0": - folder: all diff --git a/recipes/tracy/all/conanfile.py b/recipes/tracy/all/conanfile.py index df60f29fb3584..dd2a2bdace141 100644 --- a/recipes/tracy/all/conanfile.py +++ b/recipes/tracy/all/conanfile.py @@ -3,6 +3,7 @@ from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import copy, get, rmdir from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.53.0" @@ -41,6 +42,9 @@ class TracyConan(ConanFile): "fibers": ([True, False], False), "no_crash_handler": ([True, False], False), "timer_fallback": ([True, False], False), + "libunwind_backtrace": ([True, False], False), + "symbol_offline_resolve": ([True, False], False), + "libbacktrace_elf_dynload_support": ([True, False], False), } options = { "shared": [True, False], @@ -68,6 +72,15 @@ def config_options(self): del self._tracy_options["no_crash_handler"] del self._tracy_options["timer_fallback"] + if Version(self.version) < "0.11.0": + self.options.rm_safe("libunwind_backtrace") + self.options.rm_safe("symbol_offline_resolve") + self.options.rm_safe("libbacktrace_elf_dynload_support") + + del self._tracy_options["libunwind_backtrace"] + del self._tracy_options["symbol_offline_resolve"] + del self._tracy_options["libbacktrace_elf_dynload_support"] + def configure(self): if self.options.shared: self.options.rm_safe("fPIC") @@ -79,6 +92,10 @@ def validate(self): if self.info.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) + # libunwind_backtrace is not supported in 0.11.0. https://github.com/wolfpld/tracy/pull/841 + if Version(self.version) == "0.11.0" and self.options.get_safe("libunwind_backtrace"): + raise ConanInvalidConfiguration(f"libunwind_backtrace is not supported in {self.ref}") + def source(self): get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) @@ -114,10 +131,17 @@ def package_info(self): self.cpp_info.components["tracyclient"].defines.append( "TRACY_IMPORTS") if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["tracyclient"].system_libs.append( - "pthread") + self.cpp_info.components["tracyclient"].system_libs.extend([ + "pthread", + "m" + ]) if self.settings.os == "Linux": self.cpp_info.components["tracyclient"].system_libs.append("dl") + if self.settings.os == "Windows": + self.cpp_info.components["tracyclient"].system_libs.extend([ + "dbghelp", + "ws2_32" + ]) # Tracy CMake adds options set to ON as public for opt in self._tracy_options.keys(): diff --git a/recipes/trantor/all/conandata.yml b/recipes/trantor/all/conandata.yml index 62488c1cd1518..ad57e8dec42a5 100644 --- a/recipes/trantor/all/conandata.yml +++ b/recipes/trantor/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.5.20": + url: "https://github.com/an-tao/trantor/archive/v1.5.20.tar.gz" + sha256: "4d3b98c228aafde1001cff581cf8d1a4a9f71f7b2a85a28978b560aefc21c038" "1.5.19": url: "https://github.com/an-tao/trantor/archive/v1.5.19.tar.gz" sha256: "a2f55a98fd4b0737ba0e2cd77d2f237253e607b2047071be04a9ea76587bb608" @@ -14,22 +17,11 @@ sources: "1.5.13": url: "https://github.com/an-tao/trantor/archive/v1.5.13.tar.gz" sha256: "36f02302bff3ffa8d2b1bff29f451d7a11d215a43963fb95aa543b555de2f9bf" - "1.5.12": - url: "https://github.com/an-tao/trantor/archive/v1.5.12.tar.gz" - sha256: "3389a2ace83fdc0df7e3e7f9cd9fa9b774f8054889a13a73777c71e2d8e2f364" - "1.5.11": - url: "https://github.com/an-tao/trantor/archive/v1.5.11.tar.gz" - sha256: "3cff9653380f65acaa6ffa191620a2783e866a4552c3408a6919759ce4cfc1dc" - "1.5.10": - url: "https://github.com/an-tao/trantor/archive/v1.5.10.tar.gz" - sha256: "2d47775b3091a1a103bea46f5da017dc03c39883f8d717cf6ba24bdcdf01a15d" - "1.5.8": - url: "https://github.com/an-tao/trantor/archive/v1.5.8.tar.gz" - sha256: "705ec0176681be5c99fcc7af37416ece9d65ff4d907bca764cb11471b104fbf8" - "1.5.7": - url: "https://github.com/an-tao/trantor/archive/v1.5.7.tar.gz" - sha256: "42576563afbf1e58c7d68f758cf3fca4d193496d4e3f82c80069d8389a7839d5" patches: + "1.5.20": + - patch_file: "patches/1.5.19-0001-disable-werror.patch" + patch_description: "disable -Werror for gcc5" + patch_type: "portability" "1.5.19": - patch_file: "patches/1.5.19-0001-disable-werror.patch" patch_description: "disable -Werror for gcc5" @@ -50,27 +42,3 @@ patches: - patch_file: "patches/1.5.12-0001-disable-werror.patch" patch_description: "disable -Werror for gcc5" patch_type: "portability" - "1.5.12": - - patch_file: "patches/1.5.12-0001-disable-werror.patch" - patch_description: "disable -Werror for gcc5" - patch_type: "portability" - "1.5.11": - - patch_file: "patches/1.5.6-0001-include-cstdint.patch" - patch_description: "include cstdint for uint8_t, intmax_t" - patch_type: "portability" - patch_source: "https://github.com/an-tao/trantor/commit/e8e3887435dcfb310263c588743be1b3746193be" - "1.5.10": - - patch_file: "patches/1.5.6-0001-include-cstdint.patch" - patch_description: "include cstdint for uint8_t, intmax_t" - patch_type: "portability" - patch_source: "https://github.com/an-tao/trantor/commit/e8e3887435dcfb310263c588743be1b3746193be" - "1.5.8": - - patch_file: "patches/1.5.6-0001-include-cstdint.patch" - patch_description: "include cstdint for uint8_t, intmax_t" - patch_type: "portability" - patch_source: "https://github.com/an-tao/trantor/commit/e8e3887435dcfb310263c588743be1b3746193be" - "1.5.7": - - patch_file: "patches/1.5.6-0001-include-cstdint.patch" - patch_description: "include cstdint for uint8_t, intmax_t" - patch_type: "portability" - patch_source: "https://github.com/an-tao/trantor/commit/e8e3887435dcfb310263c588743be1b3746193be" diff --git a/recipes/trantor/all/conanfile.py b/recipes/trantor/all/conanfile.py index 7b8288e622c8a..0f9e11378b1a8 100644 --- a/recipes/trantor/all/conanfile.py +++ b/recipes/trantor/all/conanfile.py @@ -93,8 +93,7 @@ def source(self): def generate(self): tc = CMakeToolchain(self) # TODO: support other tls providers - if Version(self.version) >= "1.5.12": - tc.variables["TRANTOR_USE_TLS"] = "openssl" + tc.variables["TRANTOR_USE_TLS"] = "openssl" tc.variables["BUILD_C-ARES"] = self.options.with_c_ares tc.variables["USE_SPDLOG"] = self.options.get_safe("with_spdlog") tc.generate() diff --git a/recipes/trantor/all/patches/1.5.6-0001-include-cstdint.patch b/recipes/trantor/all/patches/1.5.6-0001-include-cstdint.patch deleted file mode 100644 index f910402545ffa..0000000000000 --- a/recipes/trantor/all/patches/1.5.6-0001-include-cstdint.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/trantor/utils/MsgBuffer.h b/trantor/utils/MsgBuffer.h -index 29817f6..f1d677e 100644 ---- a/trantor/utils/MsgBuffer.h -+++ b/trantor/utils/MsgBuffer.h -@@ -18,6 +18,7 @@ - #include - #include - #include -+#include - #include - #include - #include -diff --git a/trantor/utils/Utilities.cc b/trantor/utils/Utilities.cc -index 978dac8..0611e20 100644 ---- a/trantor/utils/Utilities.cc -+++ b/trantor/utils/Utilities.cc -@@ -25,6 +25,7 @@ - #include - #endif // __cplusplus - #endif // _WIN32 -+#include - - namespace trantor - { diff --git a/recipes/trantor/config.yml b/recipes/trantor/config.yml index a5621cf2bc6f8..1d9afbed435a0 100644 --- a/recipes/trantor/config.yml +++ b/recipes/trantor/config.yml @@ -1,4 +1,6 @@ versions: + "1.5.20": + folder: "all" "1.5.19": folder: "all" "1.5.16": @@ -9,13 +11,3 @@ versions: folder: "all" "1.5.13": folder: "all" - "1.5.12": - folder: "all" - "1.5.11": - folder: "all" - "1.5.10": - folder: "all" - "1.5.8": - folder: "all" - "1.5.7": - folder: "all" diff --git a/recipes/tree-gen/all/conandata.yml b/recipes/tree-gen/all/conandata.yml index 71aa893da1723..2ecf4e1d6e143 100644 --- a/recipes/tree-gen/all/conandata.yml +++ b/recipes/tree-gen/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.8": + url: "https://github.com/QuTech-Delft/tree-gen/archive/refs/tags/1.0.8.tar.gz" + sha256: "a840f1da2fa377d2d791885d83b95dc15f081b308208d3497c395721488a4130" "1.0.7": url: "https://github.com/QuTech-Delft/tree-gen/archive/refs/tags/1.0.7.tar.gz" sha256: "bd27c88d789efe1d187846d3b819fbaa1ba3a520d6d4181d1216c4a2e73e4e85" diff --git a/recipes/tree-gen/all/conanfile.py b/recipes/tree-gen/all/conanfile.py index e2afb05918b37..7c2572f700bf5 100644 --- a/recipes/tree-gen/all/conanfile.py +++ b/recipes/tree-gen/all/conanfile.py @@ -60,7 +60,7 @@ def layout(self): def build_requirements(self): if self._should_build_test: - self.test_requires("gtest/1.14.0") + self.test_requires("gtest/1.15.0") self.tool_requires("m4/1.4.19") if self.settings.os == "Windows": self.tool_requires("winflexbison/2.5.24") @@ -76,7 +76,10 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") def requirements(self): - self.requires("fmt/10.2.1", transitive_headers=True) + if Version(self.version) < "1.0.8": + self.requires("fmt/10.2.1", transitive_headers=True) + else: + self.requires("fmt/11.0.2", transitive_headers=True) self.requires("range-v3/0.12.0", transitive_headers=True) def source(self): diff --git a/recipes/tree-gen/config.yml b/recipes/tree-gen/config.yml index 4028d61266d40..89fc823a7d6b8 100644 --- a/recipes/tree-gen/config.yml +++ b/recipes/tree-gen/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.8": + folder: all "1.0.7": folder: all "1.0.6": diff --git a/recipes/tree-sitter/all/conandata.yml b/recipes/tree-sitter/all/conandata.yml index 3ddeeffd1d3bc..fcc659c5b1ecb 100644 --- a/recipes/tree-sitter/all/conandata.yml +++ b/recipes/tree-sitter/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.23.0": + url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.23.0.tar.gz" + sha256: "6403b361b0014999e96f61b9c84d6950d42f0c7d6e806be79382e0232e48a11b" "0.22.6": url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.22.6.tar.gz" sha256: "e2b687f74358ab6404730b7fb1a1ced7ddb3780202d37595ecd7b20a8f41861f" diff --git a/recipes/tree-sitter/all/conanfile.py b/recipes/tree-sitter/all/conanfile.py index a0c425765146a..a3ccebe4f64da 100644 --- a/recipes/tree-sitter/all/conanfile.py +++ b/recipes/tree-sitter/all/conanfile.py @@ -10,10 +10,10 @@ class TreeSitterConan(ConanFile): name = "tree-sitter" description = "Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited." - topics = ("parser", "incremental", "rust") + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://tree-sitter.github.io/tree-sitter" - license = "MIT" + topics = ("parser", "incremental", "rust") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { diff --git a/recipes/tree-sitter/config.yml b/recipes/tree-sitter/config.yml index 7357ec5c57b73..27314a988e804 100644 --- a/recipes/tree-sitter/config.yml +++ b/recipes/tree-sitter/config.yml @@ -1,4 +1,6 @@ versions: + "0.23.0": + folder: all "0.22.6": folder: all "0.22.5": diff --git a/recipes/utfcpp/all/conandata.yml b/recipes/utfcpp/all/conandata.yml index 03f2a95423481..d1a732d445794 100644 --- a/recipes/utfcpp/all/conandata.yml +++ b/recipes/utfcpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.0.5": + url: "https://github.com/nemtrif/utfcpp/archive/v4.0.5.tar.gz" + sha256: "ffc668a310e77607d393f3c18b32715f223da1eac4c4d6e0579a11df8e6b59cf" "4.0.4": url: "https://github.com/nemtrif/utfcpp/archive/v4.0.4.tar.gz" sha256: "7c8a403d0c575d52473c8644cd9eb46c6ba028d2549bc3e0cdc2d45f5cfd78a0" @@ -11,27 +14,9 @@ sources: "3.2.5": url: "https://github.com/nemtrif/utfcpp/archive/v3.2.5.tar.gz" sha256: "14fd1b3c466814cb4c40771b7f207b61d2c7a0aa6a5e620ca05c00df27f25afd" - "3.2.4": - url: "https://github.com/nemtrif/utfcpp/archive/refs/tags/v3.2.4.tar.gz" - sha256: "fde21a4c519eed25f095a1cd8490167409cc70d7b5e9c38756142e588ccb7c7e" "3.2.3": url: "https://github.com/nemtrif/utfcpp/archive/v3.2.3.tar.gz" sha256: "3ba9b0dbbff08767bdffe8f03b10e596ca351228862722e4c9d4d126d2865250" - "3.2.2": - url: "https://github.com/nemtrif/utfcpp/archive/v3.2.2.tar.gz" - sha256: "6f81e7cb2be2a6a9109a8a0cb7dc39ec947f1bcdb5dfa4a660e11a23face19f5" - "3.2.1": - url: "https://github.com/nemtrif/utfcpp/archive/refs/tags/v3.2.1.tar.gz" - sha256: "8d6aa7d77ad0abb35bb6139cb9a33597ac4c5b33da6a004ae42429b8598c9605" - "3.2": - url: "https://github.com/nemtrif/utfcpp/archive/v3.2.tar.gz" - sha256: "cd4f9a66d23dc385bd7ea11bc0abfda8ea1ad1dcf5cd6d3a27bc551e86436364" "3.1.2": url: "https://github.com/nemtrif/utfcpp/archive/v3.1.2.tar.gz" sha256: "fea3bfa39fb8bd7368077ea5e1e0db9a8951f7e6fb6d9400b00ab3d92b807c6d" - "3.1.1": - url: "https://github.com/nemtrif/utfcpp/archive/v3.1.1.tar.gz" - sha256: "33496a4c3cc2de80e9809c4997052331af5fb32079f43ab4d667cd48c3a36e88" - "3.1": - url: "https://github.com/nemtrif/utfcpp/archive/v3.1.tar.gz" - sha256: "ab531c3fd5d275150430bfaca01d7d15e017a188183be932322f2f651506b096" diff --git a/recipes/utfcpp/all/conanfile.py b/recipes/utfcpp/all/conanfile.py index 247b54396ade2..23b9e402630b2 100644 --- a/recipes/utfcpp/all/conanfile.py +++ b/recipes/utfcpp/all/conanfile.py @@ -9,27 +9,24 @@ class UtfCppConan(ConanFile): name = "utfcpp" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/nemtrif/utfcpp" description = "UTF-8 with C++ in a Portable Way" - topics = ("utf", "utf8", "unicode", "text") license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/nemtrif/utfcpp" + topics = ("utf", "utf8", "unicode", "text", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True - def package_id(self): - self.info.clear() - def layout(self): basic_layout(self, src_folder="src") + def package_id(self): + self.info.clear() + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - pass - def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "*.h", src=os.path.join(self.source_folder, "source"), diff --git a/recipes/utfcpp/all/test_package/conanfile.py b/recipes/utfcpp/all/test_package/conanfile.py index d120a992c06a6..8a5bb47f50c4c 100644 --- a/recipes/utfcpp/all/test_package/conanfile.py +++ b/recipes/utfcpp/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/utfcpp/config.yml b/recipes/utfcpp/config.yml index 46e4658742975..93af14ff8ed78 100644 --- a/recipes/utfcpp/config.yml +++ b/recipes/utfcpp/config.yml @@ -1,4 +1,6 @@ versions: + "4.0.5": + folder: all "4.0.4": folder: all "4.0.1": @@ -7,19 +9,7 @@ versions: folder: all "3.2.5": folder: all - "3.2.4": - folder: all "3.2.3": folder: all - "3.2.2": - folder: all - "3.2.1": - folder: all - "3.2": - folder: all "3.1.2": folder: all - "3.1.1": - folder: all - "3.1": - folder: all diff --git a/recipes/uwebsockets/all/conandata.yml b/recipes/uwebsockets/all/conandata.yml index 8013b9756dcc5..ed6be06ed604c 100644 --- a/recipes/uwebsockets/all/conandata.yml +++ b/recipes/uwebsockets/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "20.65.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.65.0.tar.gz" + sha256: "e261f7c124b3b9e217fc766d6e51d4fdc4b227aa52c7a0ca5952a9e65cea4213" "20.64.0": url: "https://github.com/uNetworking/uWebSockets/archive/v20.64.0.tar.gz" sha256: "bb81fa773dcbd6bc738904ad496554fd131a33269570e0e86fa09213d82ba9ef" diff --git a/recipes/uwebsockets/config.yml b/recipes/uwebsockets/config.yml index 421b89636665b..f22f342dc70d3 100644 --- a/recipes/uwebsockets/config.yml +++ b/recipes/uwebsockets/config.yml @@ -1,4 +1,6 @@ versions: + "20.65.0": + folder: all "20.64.0": folder: all "20.63.0": diff --git a/recipes/valijson/all/conandata.yml b/recipes/valijson/all/conandata.yml index 9c69d92d45720..3db6eca065b46 100644 --- a/recipes/valijson/all/conandata.yml +++ b/recipes/valijson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.3": + url: "https://github.com/tristanpenman/valijson/archive/v1.0.3.tar.gz" + sha256: "0fbd3cd2312b441c6373ee116e9a162c400f9e3cd79f6b32665cdd22fa11ac3f" "1.0.2": url: "https://github.com/tristanpenman/valijson/archive/v1.0.2.tar.gz" sha256: "35d86e54fc727f1265226434dc996e33000a570f833537a25c8b702b0b824431" diff --git a/recipes/valijson/config.yml b/recipes/valijson/config.yml index 2244034e46866..b8be269bc2d5e 100644 --- a/recipes/valijson/config.yml +++ b/recipes/valijson/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.3": + folder: "all" "1.0.2": folder: "all" "1.0.1": diff --git a/recipes/vulkan-headers/all/conandata.yml b/recipes/vulkan-headers/all/conandata.yml index a2e54aa68230e..707195d109331 100644 --- a/recipes/vulkan-headers/all/conandata.yml +++ b/recipes/vulkan-headers/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.290.0": + url: "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.3.290.0.tar.gz" + sha256: "5b186e1492d97c44102fe858fb9f222b55524a8b6da940a8795c9e326ae6d722" "1.3.268.0": url: "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.3.268.0.tar.gz" sha256: "94993cbe2b1a604c0d5d9ea37a767e1aba4d771d2bfd4ddceefd66243095164f" diff --git a/recipes/vulkan-headers/config.yml b/recipes/vulkan-headers/config.yml index 34a8efbe22307..dc699b4e5ec0f 100644 --- a/recipes/vulkan-headers/config.yml +++ b/recipes/vulkan-headers/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.290.0": + folder: all "1.3.268.0": folder: all "1.3.261.1": diff --git a/recipes/vulkan-loader/all/conandata.yml b/recipes/vulkan-loader/all/conandata.yml index b31ce6fd5b07a..ad7d56b8cab7b 100644 --- a/recipes/vulkan-loader/all/conandata.yml +++ b/recipes/vulkan-loader/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.290.0": + url: "https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/v1.3.290.tar.gz" + sha256: "a1f0d80c4ee448d4fa37d1d4a4c4cf1d6d0f5873d3ca6dffe2a9498e6e654142" "1.3.268.0": url: "https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/vulkan-sdk-1.3.268.0.tar.gz" sha256: "404fa621f1ab2731bcc68bcbff64d8c6de322faad2d87f9198641bd37255fd39" diff --git a/recipes/vulkan-loader/all/conanfile.py b/recipes/vulkan-loader/all/conanfile.py index d1e31f8184d88..27aeb7d2928a6 100644 --- a/recipes/vulkan-loader/all/conanfile.py +++ b/recipes/vulkan-loader/all/conanfile.py @@ -132,12 +132,13 @@ def _patch_sources(self): "if(${configuration} MATCHES \"/MD\")", "if(FALSE)") else: - replace_in_file( - self, - cmakelists, - "set(TESTS_STANDARD_CXX_PROPERTIES ${LOADER_STANDARD_CXX_PROPERTIES} MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$:Debug>DLL\")", - "set(TESTS_STANDARD_CXX_PROPERTIES ${LOADER_STANDARD_CXX_PROPERTIES})", - ) + if Version(self.version) < "1.3.275": + replace_in_file( + self, + cmakelists, + "set(TESTS_STANDARD_CXX_PROPERTIES ${LOADER_STANDARD_CXX_PROPERTIES} MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$:Debug>DLL\")", + "set(TESTS_STANDARD_CXX_PROPERTIES ${LOADER_STANDARD_CXX_PROPERTIES})", + ) replace_in_file( self, cmakelists, diff --git a/recipes/vulkan-loader/config.yml b/recipes/vulkan-loader/config.yml index a9f30cdd286b9..0254c0a572bb2 100644 --- a/recipes/vulkan-loader/config.yml +++ b/recipes/vulkan-loader/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.290.0": + folder: all "1.3.268.0": folder: all "1.3.250.0": diff --git a/recipes/wil/all/conandata.yml b/recipes/wil/all/conandata.yml index 50c0114259eca..4dda604c7c75a 100644 --- a/recipes/wil/all/conandata.yml +++ b/recipes/wil/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.240803.1": + url: "https://github.com/microsoft/wil/archive/refs/tags/v1.0.240803.1.tar.gz" + sha256: "39910ab105c6df345e4018a2b61dfbc909a8816c971a3d2cebbefa1f8c481cc6" "1.0.240122.1": url: "https://github.com/microsoft/wil/archive/refs/tags/v1.0.240122.1.tar.gz" sha256: "e599f2843c01b9e4827e46f11d3651180675c8ecdbba8bdae735f533672989d3" diff --git a/recipes/wil/config.yml b/recipes/wil/config.yml index f3a417272a35c..67c36e1a1f315 100644 --- a/recipes/wil/config.yml +++ b/recipes/wil/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.240803.1": + folder: "all" "1.0.240122.1": folder: "all" "1.0.231216.1": diff --git a/recipes/wiringpi/all/conandata.yml b/recipes/wiringpi/all/conandata.yml index 9b3f6dc4c04db..213d5e40f0cce 100644 --- a/recipes/wiringpi/all/conandata.yml +++ b/recipes/wiringpi/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.8": + url: "https://github.com/WiringPi/WiringPi/archive/refs/tags/3.8.tar.gz" + sha256: "6159764d3d036486f0a110cd5393b1413c1f334d464b7337117fece59ea04bc9" "3.6": url: "https://github.com/WiringPi/WiringPi/archive/refs/tags/3.6.tar.gz" sha256: "bec180a14ccd2d6b4eb5248d6553593511e7881348f56f8c98515a6d5d5444ee" diff --git a/recipes/wiringpi/config.yml b/recipes/wiringpi/config.yml index 64b1ec70829ae..7e735c5b7dd32 100644 --- a/recipes/wiringpi/config.yml +++ b/recipes/wiringpi/config.yml @@ -1,4 +1,6 @@ versions: + "3.8": + folder: "all" "3.6": folder: "all" "3.4": diff --git a/recipes/wxwidgets/all/conandata.yml b/recipes/wxwidgets/all/conandata.yml new file mode 100644 index 0000000000000..0b2357cd4a254 --- /dev/null +++ b/recipes/wxwidgets/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "3.2.6": + url: "https://github.com/wxWidgets/wxWidgets/archive/v3.2.6.tar.gz" + sha256: "46372b2dbf976521e1d7cca22afc3d3542d171a488b391444cf89aba87ea7d16" + "3.2.5": + url: "https://github.com/wxWidgets/wxWidgets/archive/v3.2.5.tar.gz" + sha256: "c3a54d1c5dc3feefc2893c28923fd722c990c572253d5ad353eec99386ba11eb" diff --git a/recipes/wxwidgets/all/conanfile.py b/recipes/wxwidgets/all/conanfile.py new file mode 100644 index 0000000000000..59a1e6e30d3ee --- /dev/null +++ b/recipes/wxwidgets/all/conanfile.py @@ -0,0 +1,477 @@ +from conan import ConanFile +from conan.tools.apple import is_apple_os +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version +from conan.tools.system import package_manager +from conan.errors import ConanInvalidConfiguration +import os + +required_conan_version = ">=1.60.0 <2.0 || >=2.0.6" + + +class wxWidgetsConan(ConanFile): + name = "wxwidgets" + description = "wxWidgets is a C++ library that lets developers create applications for Windows, macOS, " \ + "Linux and other platforms with a single code base." + topics = ("wxwidgets", "gui", "ui") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.wxwidgets.org" + license = "wxWidgets" + settings = "os", "arch", "compiler", "build_type" + + options = {"shared": [True, False], + "fPIC": [True, False], + "jpeg": ["libjpeg", "libjpeg-turbo", "mozjpeg"], + "secretstore": [True, False], + "aui": [True, False], + "opengl": [True, False], + "html": [True, False], + "mediactrl": [True, False], + "propgrid": [True, False], + "debugreport": [True, False], + "ribbon": [True, False], + "richtext": [True, False], + "sockets": [True, False], + "stc": [True, False], + "webview": [True, False], + "xml": [True, False], + "xrc": [True, False], + "cairo": [True, False], + "help": [True, False], + "html_help": [True, False], + "url": [True, False], + "protocol": [True, False], + "fs_inet": [True, False], + "custom_enables": ["ANY"], # comma splitted list + "custom_disables": ["ANY"]} + default_options = { + "shared": False, + "fPIC": True, + "jpeg": "libjpeg", + "secretstore": True, + "aui": True, + "opengl": True, + "html": True, + "mediactrl": False, + "propgrid": True, + "debugreport": True, + "ribbon": True, + "richtext": True, + "sockets": True, + "stc": True, + # WebKitGTK for GTK2 is not available as a system dependency on modern distros. + # When gtk/system defaults to GTK3, turn this back on. + "webview": False, + "xml": True, + "xrc": True, + "cairo": True, + "help": True, + "html_help": True, + "url": True, + "protocol": True, + "fs_inet": True, + "custom_enables": "", + "custom_disables": "" + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + self.options.rm_safe("fPIC") + if self.settings.os != "Linux": + self.options.rm_safe("secretstore") + self.options.rm_safe("cairo") + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + @property + def _gtk_version(self): + return f"gtk{self.dependencies['gtk'].options.version}" + + def system_requirements(self): + apt = package_manager.Apt(self) + packages = [] + if self.options.get_safe("secretstore"): + packages.append("libsecret-1-dev") + if self.options.webview: + if self._gtk_version == "gtk2": + packages.extend(["libsoup2.4-dev", + "libwebkitgtk-dev"]) + else: + packages.extend(["libsoup3.0-dev", + "libwebkit2gtk-4.0-dev"]) + if self.options.get_safe("cairo"): + packages.append("libcairo2-dev") + apt.install(packages) + + yum = package_manager.Yum(self) + packages = [] + if self.options.get_safe("secretstore"): + packages.append("libsecret-devel") + if self.options.webview: + packages.extend(["libsoup3-devel", + "webkit2gtk4.1-devel"]) + if self.options.get_safe("cairo"): + packages.append("cairo-devel") + yum.install(packages) + + def build_requirements(self): + self.tool_requires("ninja/1.11.1") + self.tool_requires("cmake/[>=3.17]") + + # TODO: add support for gtk non system version when it's ready for Conan 2 + def requirements(self): + if self.settings.os == "Linux": + self.requires("xorg/system") + self.requires("gtk/system") + if self.options.get_safe("opengl", default=False): + self.requires("opengl/system") + self.requires("xkbcommon/1.6.0", options={"with_x11": True}) + # TODO: Does not work right now + # if self.options.get_safe("cairo"): + # self.requires("cairo/1.18.0") + if self.options.mediactrl: + self.requires("gstreamer/1.22.3") + self.requires("gst-plugins-base/1.19.2") + self.requires("libcurl/[>=7.78.0 <9]") + + if self.options.jpeg == "libjpeg": + self.requires("libjpeg/9e") + elif self.options.jpeg == "libjpeg-turbo": + self.requires("libjpeg-turbo/3.0.2") + elif self.options.jpeg == "mozjpeg": + self.requires("mozjpeg/4.1.5") + + self.requires("libpng/[>=1.6 <2]") + self.requires("libtiff/4.6.0") + self.requires("zlib/[>=1.2.11 <2]") + self.requires("expat/[>=2.6.2 <3]") + self.requires("pcre2/10.42") + self.requires("nanosvg/cci.20231025") + + def validate(self): + if self.settings.os == "Linux": + if not self.dependencies.direct_host["xkbcommon"].options.with_x11: + raise ConanInvalidConfiguration("The 'with_x11' option for the 'xkbcommon' package must be enabled") + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def _patch_sources(self): + apply_conandata_patches(self) + # Don't change library names when cross-compiling + replace_in_file(self, os.path.join(self.source_folder, "build", "cmake", "functions.cmake"), + 'set(cross_target "-${CMAKE_SYSTEM_NAME}")', + 'set(cross_target)') + # Don't override Conan's toolchain + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "CMAKE_OSX_DEPLOYMENT_TARGET", + "CMAKE_OSX_DEPLOYMENT_TARGET_IGNORED") + # Fix for strcpy_s (fix upstream?) + if is_apple_os(self): + cmake_version = "3.0" + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + f'cmake_minimum_required(VERSION {cmake_version})', + f'cmake_minimum_required(VERSION {cmake_version})\nadd_definitions(-D__STDC_WANT_LIB_EXT1__)') + + def generate(self): + tc = CMakeToolchain(self) + + # generic build options + tc.variables["wxBUILD_SHARED"] = self.options.shared + tc.variables["wxBUILD_SAMPLES"] = "OFF" + tc.variables["wxBUILD_TESTS"] = "OFF" + tc.variables["wxBUILD_DEMOS"] = "OFF" + tc.variables["wxBUILD_INSTALL"] = True + if self.settings.compiler == "clang": + tc.variables["wxBUILD_PRECOMP"] = "OFF" + + # platform-specific options + if is_msvc(self): + tc.variables["wxBUILD_USE_STATIC_RUNTIME"] = "MT" in str(self.settings.compiler.runtime) + tc.variables["wxBUILD_MSVC_MULTIPROC"] = True + if self.settings.os == "Linux": + tc.variables["wxBUILD_TOOLKIT"] = self._gtk_version + tc.variables["wxUSE_CAIRO"] = self.options.cairo + # Disable some optional libraries that will otherwise lead to non-deterministic builds + if self.settings.os != "Windows": + tc.variables["wxUSE_LIBSDL"] = "OFF" + tc.variables["wxUSE_LIBICONV"] = "OFF" + tc.variables["wxUSE_LIBNOTIFY"] = "OFF" + tc.variables["wxUSE_LIBMSPACK"] = "OFF" + tc.variables["wxUSE_LIBGNOMEVFS"] = "OFF" + + tc.variables["wxUSE_LIBPNG"] = "sys" + tc.variables["wxUSE_LIBJPEG"] = "sys" + tc.variables["wxUSE_LIBTIFF"] = "sys" + tc.variables["wxUSE_ZLIB"] = "sys" + tc.variables["wxUSE_EXPAT"] = "sys" + tc.variables["wxUSE_REGEX"] = "sys" + tc.variables["wxUSE_NANOSVG"] = "sys" + + # wxWidgets features + tc.variables["wxUSE_SECRETSTORE"] = self.options.get_safe("secretstore") + + # wxWidgets libraries + tc.variables["wxUSE_AUI"] = self.options.aui + tc.variables["wxUSE_OPENGL"] = self.options.get_safe("opengl", default=False) + tc.variables["wxUSE_HTML"] = self.options.html + tc.variables["wxUSE_MEDIACTRL"] = self.options.mediactrl + tc.variables["wxUSE_PROPGRID"] = self.options.propgrid + tc.variables["wxUSE_DEBUGREPORT"] = self.options.debugreport + tc.variables["wxUSE_RIBBON"] = self.options.ribbon + tc.variables["wxUSE_RICHTEXT"] = self.options.richtext + tc.variables["wxUSE_SOCKETS"] = self.options.sockets + tc.variables["wxUSE_STC"] = self.options.stc + tc.variables["wxUSE_WEBVIEW"] = self.options.webview + tc.variables["wxUSE_XML"] = self.options.xml + tc.variables["wxUSE_XRC"] = self.options.xrc + tc.variables["wxUSE_HELP"] = self.options.help + tc.variables["wxUSE_WXHTML_HELP"] = self.options.html_help + tc.variables["wxUSE_URL"] = self.options.protocol + tc.variables["wxUSE_PROTOCOL"] = self.options.protocol + tc.variables["wxUSE_FS_INET"] = self.options.fs_inet + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + + for item in str(self.options.custom_enables).split(","): + if len(item) > 0: + tc.variables[item] = True + for item in str(self.options.custom_disables).split(","): + if len(item) > 0: + tc.variables[item] = False + + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("expat", "cmake_file_name", "EXPAT") + deps.set_property("expat", "cmake_target_name", "EXPAT") + deps.set_property("nanosvg", "cmake_file_name", "NanoSVG") + deps.set_property("nanosvg", "cmake_target_name", "NanoSVG::nanosvg") + deps.generate() + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="licence.txt", + src=os.path.join(self.source_folder, "docs"), + dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + # remove cmake files + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + # copy setup.h + copy(self, pattern="*setup.h", + src=os.path.join(self.build_folder, "lib"), + dst=os.path.join(self.package_folder, "include", "wx"), + keep_path=False) + + if self.settings.os == "Windows": + # copy wxrc.exe + copy(self, pattern="*", + src=os.path.join(self.build_folder, "bin"), + dst=os.path.join(self.package_folder, "bin"), + keep_path=False) + else: + # make relative symlink + bin_dir = os.path.join(self.package_folder, "bin") + for x in os.listdir(bin_dir): + filename = os.path.join(bin_dir, x) + if os.path.islink(filename): + target = os.readlink(filename) + if os.path.isabs(target): + rel = os.path.relpath(target, bin_dir) + os.remove(filename) + os.symlink(rel, filename) + + def package_info(self): + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "wxWidgets") + self.cpp_info.set_property("cmake_target_name", "wxWidgets::wxWidgets") + self.cpp_info.set_property("pkg_config_name", "wxwidgets") + + _version = Version(self.version) + version_suffix_major_minor = f"-{_version.major}.{_version.minor}" + + # wx no longer uses a debug suffix for non-windows platforms from 3.1.3 onwards + use_debug_suffix = False + if self.settings.build_type == "Debug" and self.settings.os == "Windows": + use_debug_suffix = True + + debug = "d" if use_debug_suffix else "" + + if self.settings.os == "Linux": + prefix = "wx_" + toolkit = self._gtk_version + version = "" + suffix = version_suffix_major_minor + elif self.settings.os == "Macos": + prefix = "wx_" + toolkit = "osx_cocoa" + version = "" + suffix = version_suffix_major_minor + elif self.settings.os == "Windows": + toolkit = "msw" + if is_msvc(self): + prefix = "wx" + version = f"{_version.major}{_version.minor}" + suffix = "" + else: + prefix = "wx_" + version = "" + suffix = version_suffix_major_minor + + def base_library_pattern(library): + return "{prefix}base{version}u{debug}_%s{suffix}" % library + + def library_pattern(library): + return "{prefix}{toolkit}{version}u{debug}_%s{suffix}" % library + + libs = [] + libs.append("{prefix}base{version}u{debug}{suffix}") + libs.append(library_pattern("core")) + libs.append(library_pattern("adv")) + if self.options.sockets: + libs.append(base_library_pattern("net")) + if self.options.xml: + libs.append(base_library_pattern("xml")) + if self.options.aui: + libs.append(library_pattern("aui")) + if self.options.get_safe("opengl", default=False): + libs.append(library_pattern("gl")) + if self.options.html: + libs.append(library_pattern("html")) + if self.options.mediactrl: + libs.append(library_pattern("media")) + if self.options.propgrid: + libs.append(library_pattern("propgrid")) + if self.options.debugreport: + libs.append(library_pattern("qa")) + if self.options.ribbon: + libs.append(library_pattern("ribbon")) + if self.options.richtext: + libs.append(library_pattern("richtext")) + if self.options.stc: + if not self.options.shared: + scintilla_suffix = "{debug}" if self.settings.os == "Windows" else "{suffix}" + libs.append("wxscintilla" + scintilla_suffix) + libs.append(library_pattern("stc")) + if self.options.webview: + libs.append(library_pattern("webview")) + if self.options.xrc: + libs.append(library_pattern("xrc")) + for lib in reversed(libs): + self.cpp_info.libs.append(lib.format(prefix=prefix, + toolkit=toolkit, + version=version, + debug=debug, + suffix=suffix)) + + self.cpp_info.defines.append("wxUSE_GUI=1") + if self.settings.build_type == "Debug": + self.cpp_info.defines.append("__WXDEBUG__") + if self.options.shared: + self.cpp_info.defines.append("WXUSINGDLL") + if self.settings.os == "Linux": + self.cpp_info.defines.append("__WXGTK__") + self.cpp_info.system_libs.extend(["dl", "pthread", "SM"]) + elif self.settings.os == "Macos": + self.cpp_info.defines.extend(["__WXMAC__", "__WXOSX__", "__WXOSX_COCOA__"]) + for framework in ["Carbon", + "Cocoa", + "AudioToolbox", + "OpenGL", + "AppKit", + "AVKit", + "AVFoundation", + "Foundation", + "IOKit", + "ApplicationServices", + "CoreFoundation", + "CoreText", + "CoreGraphics", + "CoreServices", + "CoreMedia", + "CFNetwork", + "Security", + "ImageIO", + "System", + "WebKit", + "QuartzCore"]: + self.cpp_info.frameworks.append(framework) + elif self.settings.os == "Windows": + # see cmake/init.cmake + compiler_prefix = {"Visual Studio": "vc", + "msvc": "vc", + "gcc": "gcc", + "clang": "clang"}.get(str(self.settings.compiler)) + + arch_suffix = "_x64" if self.settings.arch == "x86_64" else "" + lib_suffix = "_dll" if self.options.shared else "_lib" + libdir = f"{compiler_prefix}{arch_suffix}{lib_suffix}" + libdir = os.path.join("lib", libdir) + self.cpp_info.bindirs.append(libdir) + self.cpp_info.libdirs.append(libdir) + self.cpp_info.defines.append("__WXMSW__") + # disable annoying auto-linking + self.cpp_info.defines.extend(["wxNO_NET_LIB", + "wxNO_XML_LIB", + "wxNO_REGEX_LIB", + "wxNO_ZLIB_LIB", + "wxNO_JPEG_LIB", + "wxNO_PNG_LIB", + "wxNO_TIFF_LIB", + "wxNO_ADV_LIB", + "wxNO_HTML_LIB", + "wxNO_GL_LIB", + "wxNO_QA_LIB", + "wxNO_XRC_LIB", + "wxNO_AUI_LIB", + "wxNO_PROPGRID_LIB", + "wxNO_RIBBON_LIB", + "wxNO_RICHTEXT_LIB", + "wxNO_MEDIA_LIB", + "wxNO_STC_LIB", + "wxNO_WEBVIEW_LIB"]) + self.cpp_info.system_libs.extend(["kernel32", + "user32", + "gdi32", + "comdlg32", + "winspool", + "shell32", + "comctl32", + "ole32", + "oleaut32", + "imm32", + "uuid", + "wininet", + "rpcrt4", + "winmm", + "advapi32", + "msimg32", + "opengl32", + "ws2_32", + "wsock32"]) + # Link a few libraries that are needed when using gcc on windows + if self.settings.compiler == "gcc": + self.cpp_info.system_libs.extend(["uxtheme", + "version", + "shlwapi", + "oleacc"]) + if is_msvc(self): + self.cpp_info.includedirs.append(os.path.join("include", "msvc")) + else: + include_path = os.path.join("include", f"wx{version_suffix_major_minor}") + self.cpp_info.includedirs = [include_path] + self.cpp_info.includedirs diff --git a/recipes/wxwidgets/all/test_package/CMakeLists.txt b/recipes/wxwidgets/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..c4d40ad29eb0f --- /dev/null +++ b/recipes/wxwidgets/all/test_package/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package) + +find_package(wxWidgets REQUIRED) + +if(MSVC) + add_definitions("-DUNICODE") + add_definitions("-D_UNICODE") + add_definitions("-D_CRT_SECURE_NO_WARNINGS") +endif() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} wxWidgets::wxWidgets) diff --git a/recipes/box2d/2.4.x/test_package/conanfile.py b/recipes/wxwidgets/all/test_package/conanfile.py similarity index 85% rename from recipes/box2d/2.4.x/test_package/conanfile.py rename to recipes/wxwidgets/all/test_package/conanfile.py index d1ce1a2cbc477..91817d9f2df17 100644 --- a/recipes/box2d/2.4.x/test_package/conanfile.py +++ b/recipes/wxwidgets/all/test_package/conanfile.py @@ -1,12 +1,12 @@ -import os from conan import ConanFile from conan.tools.build import can_run from conan.tools.cmake import CMake, cmake_layout +import os -class Box2DTestConan(ConanFile): +class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" test_type = "explicit" def layout(self): diff --git a/recipes/wxwidgets/all/test_package/test_package.cpp b/recipes/wxwidgets/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..40a8f99c42fac --- /dev/null +++ b/recipes/wxwidgets/all/test_package/test_package.cpp @@ -0,0 +1,27 @@ +#include +#include +#include +#include +#if wxUSE_STC +#include +#endif + +int main() +{ + int argc = 0; + wxChar * argv[] = {NULL}; + if (!wxEntryStart(argc, argv)) { + std::cerr << "wxEntryStart failed!" << std::endl; + return EXIT_FAILURE; + } + wxVersionInfo vi = wxGetLibraryVersionInfo(); + std::cout << "wxWidgets version: "; + std::cout << vi.GetMajor() << "."; + std::cout << vi.GetMinor() << "."; + std::cout << vi.GetMicro() << std::endl; +#if wxUSE_STC + wxStyledTextCtrl * stc = new wxStyledTextCtrl(); +#endif + wxEntryCleanup(); + return EXIT_SUCCESS; +} diff --git a/recipes/wxwidgets/config.yml b/recipes/wxwidgets/config.yml new file mode 100644 index 0000000000000..f849d473251f2 --- /dev/null +++ b/recipes/wxwidgets/config.yml @@ -0,0 +1,5 @@ +versions: + "3.2.6": + folder: "all" + "3.2.5": + folder: "all" diff --git a/recipes/xbyak/all/conandata.yml b/recipes/xbyak/all/conandata.yml index ef1003499edb9..ea15bf45963b8 100644 --- a/recipes/xbyak/all/conandata.yml +++ b/recipes/xbyak/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "7.07.1": + url: "https://github.com/herumi/xbyak/archive/v7.07.1.tar.gz" + sha256: "9f2a1215ed0511e421895d57e2681981f9f9f8fb952655919a9cf859cfe474ae" "7.07": url: "https://github.com/herumi/xbyak/archive/v7.07.tar.gz" sha256: "7bd603fb8de9e605b86c1996a20111df66707c916a2ac0397424080cc0ad7bde" diff --git a/recipes/xbyak/all/test_package/conanfile.py b/recipes/xbyak/all/test_package/conanfile.py index d120a992c06a6..8a5bb47f50c4c 100644 --- a/recipes/xbyak/all/test_package/conanfile.py +++ b/recipes/xbyak/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/xbyak/config.yml b/recipes/xbyak/config.yml index 6b9a060b1e92a..6b2757b9d33b2 100644 --- a/recipes/xbyak/config.yml +++ b/recipes/xbyak/config.yml @@ -1,4 +1,6 @@ versions: + "7.07.1": + folder: all "7.07": folder: all "7.06": diff --git a/recipes/xerces-c/all/conandata.yml b/recipes/xerces-c/all/conandata.yml index 42c60fa48a45e..7c2baf54d287f 100644 --- a/recipes/xerces-c/all/conandata.yml +++ b/recipes/xerces-c/all/conandata.yml @@ -14,9 +14,17 @@ sources: patches: "3.2.5": - patch_file: "patches/0002-find-icu-programs.patch" + patch_description: "Find ICU programs on environment" + patch_type: "conan" "3.2.4": - patch_file: "patches/0002-find-icu-programs.patch" + patch_description: "Find ICU programs on environment" + patch_type: "conan" "3.2.3": - patch_file: "patches/0002-find-icu-programs.patch" + patch_description: "Find ICU programs on environment" + patch_type: "conan" "3.2.2": - patch_file: "patches/0002-find-icu-programs.patch" + patch_description: "Find ICU programs on environment" + patch_type: "conan" diff --git a/recipes/xerces-c/all/conanfile.py b/recipes/xerces-c/all/conanfile.py index 88a28ee036fe6..057e07e361250 100644 --- a/recipes/xerces-c/all/conanfile.py +++ b/recipes/xerces-c/all/conanfile.py @@ -131,6 +131,12 @@ def generate(self): # avoid picking up system dependency tc.variables["CMAKE_DISABLE_FIND_PACKAGE_CURL"] = self.options.get_safe("network_accessor") != "curl" tc.variables["CMAKE_DISABLE_FIND_PACKAGE_ICU"] = "icu" not in (self.options.transcoder, self.options.message_loader) + + # Fix compatibility with Clang on Windows + # https://issues.apache.org/jira/browse/XERCESC-2252 + if self.settings.os == "Windows" and self.settings.compiler == "clang": + tc.cache_variables["CMAKE_RC_FLAGS"] = "-C 1252" + tc.generate() deps = CMakeDeps(self) deps.generate() @@ -166,7 +172,7 @@ def package_info(self): if self.settings.os == "Macos": self.cpp_info.frameworks = ["CoreFoundation", "CoreServices"] elif self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs.append("pthread") + self.cpp_info.system_libs.extend(["pthread", "nsl"]) if Version(conan_version).major < 2: self.cpp_info.names["cmake_find_package"] = "XercesC" diff --git a/recipes/xorg/all/conanfile.py b/recipes/xorg/all/conanfile.py index 4b5a1dfb54844..18c7f048404e4 100644 --- a/recipes/xorg/all/conanfile.py +++ b/recipes/xorg/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.gnu import PkgConfig from conan.tools.system import package_manager from conan.errors import ConanInvalidConfiguration +from conan.tools.scm import Version required_conan_version = ">=1.50.0" @@ -73,8 +74,17 @@ def system_requirements(self): "libXScrnSaver", "xcb-util-wm", "xcb-util-image", "xcb-util-keysyms", "xcb-util-renderutil", "libxxf86vm", "libxv", "xkeyboard-config", "xcb-util", "xcb-util-cursor"], update=True, check=True) + if Version(conan_version) >= "2.0.10": + alpine = package_manager.Apk(self) + alpine.install(["libx11-dev", " libxcb-dev", "libfontenc-dev", "libice-dev", "libsm-dev", " libxau-dev", "libxaw-dev", + "libxcomposite-dev", "libxcursor-dev", "libxdamage-dev", "libxdmcp-dev", " libxext-dev", "libxfixes-dev", "libxi-dev", + "libxinerama-dev", "libxkbfile-dev", " libxmu-dev", "libxpm-dev", "libxrandr-dev", "libxrender-dev", "libxres-dev", + "libxscrnsaver-dev", "libxt-dev", "libxtst-dev", "libxv-dev", "libxxf86vm-dev", + "xcb-util-wm-dev", "xcb-util-image-dev", "xcb-util-keysyms-dev", "xcb-util-renderutil-dev", + "libxinerama-dev", "libxcb-dev", "xcb-util-dev", "xcb-util-cursor-dev"], update=True, check=True) + def package_info(self): - if conan_version.major >= 2: + if Version(conan_version) >= 2: self.cpp_info.bindirs = [] self.cpp_info.includedirs = [] self.cpp_info.libdirs = [] diff --git a/recipes/xz_utils/all/conanfile.py b/recipes/xz_utils/all/conanfile.py index 388fe0cf2e851..212eb51f593cc 100644 --- a/recipes/xz_utils/all/conanfile.py +++ b/recipes/xz_utils/all/conanfile.py @@ -50,6 +50,13 @@ def _effective_msbuild_type(self): @property def _msbuild_target(self): return "liblzma_dll" if self.options.shared else "liblzma" + + @property + def _use_msbuild(self): + assume_clang_cl = (self.settings.os == "Windows" + and self.settings.compiler == "clang" + and self.settings.get_safe("compiler.runtime") is not None) + return is_msvc(self) or assume_clang_cl def export_sources(self): export_conandata_patches(self) @@ -68,7 +75,7 @@ def layout(self): basic_layout(self, src_folder="src") def build_requirements(self): - if self._settings_build.os == "Windows" and not is_msvc(self): + if self._settings_build.os == "Windows" and not self._use_msbuild: self.win_bash = True if not self.conf.get("tools.microsoft.bash:path", check_type=str): self.tool_requires("msys2/cci.latest") @@ -77,7 +84,7 @@ def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): - if is_msvc(self): + if self._use_msbuild: tc = MSBuildToolchain(self) tc.configuration = self._effective_msbuild_type tc.generate() @@ -124,16 +131,24 @@ def _build_msvc(self): "", f"", ) + + if self.settings.arch == "armv8": + replace_in_file(self, vcxproj_file, "x64", "ARM64") + + solution_file = os.path.join(build_script_folder, "xz_win.sln") + if self.settings.arch == "armv8": + replace_in_file(self, solution_file, "x64", "ARM64") + #============================== msbuild = MSBuild(self) msbuild.build_type = self._effective_msbuild_type msbuild.platform = "Win32" if self.settings.arch == "x86" else msbuild.platform - msbuild.build(os.path.join(build_script_folder, "xz_win.sln"), targets=[self._msbuild_target]) + msbuild.build(os.path.join(build_script_folder, solution_file), targets=[self._msbuild_target]) def build(self): apply_conandata_patches(self) - if is_msvc(self): + if self._use_msbuild: self._build_msvc() else: autotools = Autotools(self) @@ -142,7 +157,7 @@ def build(self): def package(self): copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - if is_msvc(self): + if self._use_msbuild: inc_dir = os.path.join(self.source_folder, "src", "liblzma", "api") copy(self, "*.h", src=inc_dir, dst=os.path.join(self.package_folder, "include")) output_dir = os.path.join(self.source_folder, "windows") diff --git a/recipes/zulu-openjdk/all/conandata.yml b/recipes/zulu-openjdk/all/conandata.yml index 9e14b09c940cf..7333db337f861 100644 --- a/recipes/zulu-openjdk/all/conandata.yml +++ b/recipes/zulu-openjdk/all/conandata.yml @@ -1,4 +1,26 @@ sources: + "21.0.4": + "Windows": + "x86_64": + url: "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-win_x64.zip" + sha256: "d771dad10d3f0b440c3686d1f3d2b68b320802ac97b212d87671af3f2eef8848" + "armv8": + url: "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-win_aarch64.zip" + sha256: "9f873eccf030b1d3dc879ec1eb0ff5e11bf76002dc81c5c644c3462bf6c5146b" + "Linux": + "x86_64": + url: "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-linux_x64.tar.gz" + sha256: "318d0c2ed3c876fb7ea2c952945cdcf7decfb5264ca51aece159e635ac53d544" + "armv8": + url: "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-linux_aarch64.tar.gz" + sha256: "da3c2d7db33670bcf66532441aeb7f33dcf0d227c8dafe7ce35cee67f6829c4c" + "Macos": + "x86_64": + url: "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-macosx_x64.tar.gz" + sha256: "5ce75a6a247c7029b74c4ca7cf6f60fd2b2d68ce1e8956fb448d2984316b5fea" + "armv8": + url: "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-macosx_aarch64.tar.gz" + sha256: "bc2750f81a166cc6e9c30ae8aaba54f253a8c8ec9d8cfc04a555fe20712c7bff" "21.0.1": "Windows": "x86_64": diff --git a/recipes/zulu-openjdk/config.yml b/recipes/zulu-openjdk/config.yml index d9b1272d1abe9..39b0388632c08 100644 --- a/recipes/zulu-openjdk/config.yml +++ b/recipes/zulu-openjdk/config.yml @@ -1,4 +1,6 @@ versions: + "21.0.4": + folder: all "21.0.1": folder: all "17.0.9":