From c631a5e52194a89f17fdad0141aef295d650d807 Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 12 Feb 2024 17:57:37 +0300 Subject: [PATCH 001/405] (#16372) dnet: add 1.16.3 * Init libdnet * move to cmake * prepare for cmake * rename package * fix license * fix write header * fix libcxx and cppstd * bump to upstream * Apply suggestions from code review Co-authored-by: Martin Valgur * Remove test_v1_package, fix configure method --------- Co-authored-by: Martin Valgur Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> --- recipes/dnet/all/conandata.yml | 4 ++ recipes/dnet/all/conanfile.py | 70 ++++++++++++++++++++ recipes/dnet/all/test_package/CMakeLists.txt | 7 ++ recipes/dnet/all/test_package/conanfile.py | 26 ++++++++ recipes/dnet/all/test_package/test_package.c | 39 +++++++++++ recipes/dnet/config.yml | 3 + 6 files changed, 149 insertions(+) create mode 100644 recipes/dnet/all/conandata.yml create mode 100644 recipes/dnet/all/conanfile.py create mode 100644 recipes/dnet/all/test_package/CMakeLists.txt create mode 100644 recipes/dnet/all/test_package/conanfile.py create mode 100644 recipes/dnet/all/test_package/test_package.c create mode 100644 recipes/dnet/config.yml diff --git a/recipes/dnet/all/conandata.yml b/recipes/dnet/all/conandata.yml new file mode 100644 index 0000000000000..6e95e35e1a154 --- /dev/null +++ b/recipes/dnet/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.17.0": + url: "https://github.com/ofalk/libdnet/archive/refs/tags/libdnet-1.17.0.tar.gz" + sha256: "6be1ed0763151ede4c9665a403f1c9d974b2ffab2eacdb26b22078e461aae1dc" diff --git a/recipes/dnet/all/conanfile.py b/recipes/dnet/all/conanfile.py new file mode 100644 index 0000000000000..c8d803e208864 --- /dev/null +++ b/recipes/dnet/all/conanfile.py @@ -0,0 +1,70 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir +import os + + +required_conan_version = ">=1.56.0" + + +class dnetConan(ConanFile): + name = "dnet" + description = "Provides a simplified, portable interface to several low-level networking routines." + homepage = "https://github.com/ofalk/libdnet" + topics = ("dnet", "libdnet", "libdumbnet") + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + package_type = "library" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True + } + settings = "os", "arch", "compiler", "build_type" + + + def layout(self): + cmake_layout(self, src_folder="src") + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + # This is a pure C project + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self,"LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.configure() + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.libs.append("dnet") + self.cpp_info.includedirs.append(os.path.join("include", "dnet")) + + if self.settings.os == 'Windows': + self.cpp_info.system_libs = ['Iphlpapi', 'wsock32'] diff --git a/recipes/dnet/all/test_package/CMakeLists.txt b/recipes/dnet/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..d2b66a2eb9cdf --- /dev/null +++ b/recipes/dnet/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package C) + +find_package(dnet REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE dnet::dnet) diff --git a/recipes/dnet/all/test_package/conanfile.py b/recipes/dnet/all/test_package/conanfile.py new file mode 100644 index 0000000000000..dcfce1e159562 --- /dev/null +++ b/recipes/dnet/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run("{} {}".format(bin_path, "127.0.0.1"), env="conanrun") diff --git a/recipes/dnet/all/test_package/test_package.c b/recipes/dnet/all/test_package/test_package.c new file mode 100644 index 0000000000000..6102a898664e5 --- /dev/null +++ b/recipes/dnet/all/test_package/test_package.c @@ -0,0 +1,39 @@ +#include +#include +#include + +#include +#include +#include + +#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) +#include +#elif defined(_WIN32) +#include +#endif + +void addr_usage(void) +{ + fprintf(stderr, "Usage: dnet addr
...\n"); + exit(1); +} + +int main(int argc, char *argv[]) +{ + struct addr addr; + int c, len; + + if (argc == 1 || *(argv[1]) == '-') + addr_usage(); + + for (c = 1; c < argc; c++) { + if (addr_aton(argv[c], &addr) < 0) + addr_usage(); + + len = addr.addr_bits / 8; + + if (write(1, addr.addr_data8, len) != len) + err(1, "write"); + } + return 0; +} diff --git a/recipes/dnet/config.yml b/recipes/dnet/config.yml new file mode 100644 index 0000000000000..aad66aeff535b --- /dev/null +++ b/recipes/dnet/config.yml @@ -0,0 +1,3 @@ +versions: + "1.17.0": + folder: "all" From d4f8f3fc452a8be89cdc2900c9917a97e5851314 Mon Sep 17 00:00:00 2001 From: Philipp <57151725+philippun1@users.noreply.github.com> Date: Mon, 12 Feb 2024 16:30:09 +0100 Subject: [PATCH 002/405] (#22675) qt: update libpng/1.6.42 Co-authored-by: Uilian Ries --- recipes/qt/5.x.x/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/qt/5.x.x/conanfile.py b/recipes/qt/5.x.x/conanfile.py index ff873bf5ea419..8b1c566af5c7c 100644 --- a/recipes/qt/5.x.x/conanfile.py +++ b/recipes/qt/5.x.x/conanfile.py @@ -371,7 +371,7 @@ def requirements(self): else: self.requires("libjpeg/9e") if self.options.get_safe("with_libpng", False) and not self.options.multiconfiguration: - self.requires("libpng/1.6.40") + self.requires("libpng/1.6.42") if self.options.with_sqlite3 and not self.options.multiconfiguration: self.requires("sqlite3/3.45.0") if self.options.get_safe("with_mysql", False): From cc9c2eafb0f71e4f1bce172bd91b8f0d4a270cad Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 13 Feb 2024 01:09:10 +0900 Subject: [PATCH 003/405] (#22741) glaze: add version 2.0.9 --- recipes/glaze/all/conandata.yml | 3 +++ recipes/glaze/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index 247424073dd75..082ab5fde6a56 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.9": + url: "https://github.com/stephenberry/glaze/archive/v2.0.9.tar.gz" + sha256: "c1ffede3db5c74d2c46a3abe576985dc729c95df1b48ab575079427b55488bbd" "2.0.7": url: "https://github.com/stephenberry/glaze/archive/v2.0.7.tar.gz" sha256: "1bf981e72733fb5a02a91c9642d91fa39e4a1ebe42f81e8fc6a016c11ed762cb" diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index 67e6a0900ca46..5d09cdcfa69bd 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.9": + folder: all "2.0.7": folder: all "2.0.6": From 99fc90a31176bc52e6ebefb826d1d284f8d457c9 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 13 Feb 2024 01:29:53 +0900 Subject: [PATCH 004/405] (#22756) leveldb: update snappy/1.1.10 --- recipes/leveldb/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/leveldb/all/conanfile.py b/recipes/leveldb/all/conanfile.py index 25822de4f07a9..8886ea342497d 100644 --- a/recipes/leveldb/all/conanfile.py +++ b/recipes/leveldb/all/conanfile.py @@ -52,7 +52,7 @@ def requirements(self): # there is no "official" conan package yet; when that is available, we # can add similar with options for those if self.options.with_snappy: - self.requires("snappy/1.1.9") + self.requires("snappy/1.1.10") if self.options.with_crc32c: self.requires("crc32c/1.1.2") From 4cd206343279143418283690f95a77256143fee2 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Mon, 12 Feb 2024 18:10:02 +0100 Subject: [PATCH 005/405] (#22709) aws-c-auth: update dependencies Due to #21033, we'll have to raise the aws-c-io dependency here as well. --- recipes/aws-c-auth/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/aws-c-auth/all/conanfile.py b/recipes/aws-c-auth/all/conanfile.py index 0181ea2ac5e2c..edc82083e9c0b 100644 --- a/recipes/aws-c-auth/all/conanfile.py +++ b/recipes/aws-c-auth/all/conanfile.py @@ -61,7 +61,7 @@ def requirements(self): else: self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) self.requires("aws-c-cal/0.6.9") - self.requires("aws-c-io/0.13.32", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-io/0.13.35", transitive_headers=True, transitive_libs=True) self.requires("aws-c-http/0.7.14", transitive_headers=True) self.requires("aws-c-sdkutils/0.1.12", transitive_headers=True) From 11f8b5b175d9beaac1c4f0b8d293f39f29fc13fb Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 12 Feb 2024 18:22:58 +0000 Subject: [PATCH 006/405] (#22754) [bot] Update authorized users list (2024-02-12) Co-authored-by: conan-center-bot --- .c3i/authorized_users.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 4200ed3ec3c89..37b43973ce278 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1284,3 +1284,7 @@ authorized_users: - MelamudMichael - Rodarin - philippun1 +- Kaaml +- AlexanderBabansky +- matthiasbuhl +- cnicolaescu From f79bb63fc77a749aeb1cac56dda0e5c049094058 Mon Sep 17 00:00:00 2001 From: PeteAudinate <99274874+PeteAudinate@users.noreply.github.com> Date: Mon, 12 Feb 2024 18:49:09 +0000 Subject: [PATCH 007/405] (#22732) b2: Don't apply CXXFLAGS env var if it doesn't exist Without this cxxflags are set to "None" which causes a compile failure. --- recipes/b2/portable/conanfile.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/recipes/b2/portable/conanfile.py b/recipes/b2/portable/conanfile.py index f93460f8b28cf..eb45936017eef 100644 --- a/recipes/b2/portable/conanfile.py +++ b/recipes/b2/portable/conanfile.py @@ -159,13 +159,14 @@ def build(self): if self.options.use_cxx_env: envvars = VirtualBuildEnv(self).vars() - cxx = envvars.get("CXX") - if cxx: - command += f" --cxx={cxx}" - self._write_project_config(cxx) + cxx_env = envvars.get("CXX") + if cxx_env: + command += f" --cxx={cxx_env}" + self._write_project_config(cxx_env) cxxflags_env = envvars.get("CXXFLAGS") - cxxflags = f"{cxxflags} {cxxflags_env}" + if cxxflags_env: + cxxflags = f"{cxxflags} {cxxflags_env}" if cxxflags: command += f' --cxxflags="{cxxflags}"' From 9540705c64a0b4fb8a375f40b2f793b091826a30 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 13 Feb 2024 05:49:44 +0900 Subject: [PATCH 008/405] (#22755) uvw: add version 3.3.0 --- recipes/uvw/all/conandata.yml | 3 +++ recipes/uvw/all/conanfile.py | 1 + recipes/uvw/config.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/recipes/uvw/all/conandata.yml b/recipes/uvw/all/conandata.yml index 2ce44b1f85239..f88dde6763845 100644 --- a/recipes/uvw/all/conandata.yml +++ b/recipes/uvw/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.3.0": + url: "https://github.com/skypjack/uvw/archive/v3.3.0_libuv_v1.47.tar.gz" + sha256: "aabb17d3d8f0b3481b44e981c889dd4a2a6a3f1a96a4d01055e669f4b7d37d0e" "3.2.0": url: "https://github.com/skypjack/uvw/archive/v3.2.0_libuv_v1.46.tar.gz" sha256: "bd5aed741765950074b1ea2507291dce81e528abdf56c406991ad4a27d8d1714" diff --git a/recipes/uvw/all/conanfile.py b/recipes/uvw/all/conanfile.py index af145be3d5ce2..fc221de9ee0df 100644 --- a/recipes/uvw/all/conanfile.py +++ b/recipes/uvw/all/conanfile.py @@ -38,6 +38,7 @@ def _compilers_minimum_version(self): @property def _required_libuv_version(self): return { + "3.3.0": "1.47.0", "3.2.0": "1.46.0", "3.1.0": "1.45.0", "2.12.1": "1.44.2", diff --git a/recipes/uvw/config.yml b/recipes/uvw/config.yml index f7ecad1e5c9ed..7b4a0bac4b71c 100644 --- a/recipes/uvw/config.yml +++ b/recipes/uvw/config.yml @@ -1,4 +1,6 @@ versions: + "3.3.0": + folder: "all" "3.2.0": folder: "all" "3.1.0": From ad0b678359127ee31176de2881c505ffb903aceb Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 12 Feb 2024 22:47:20 +0000 Subject: [PATCH 009/405] (#22758) [bot] Update list of references (prod-v2/ListPackages) Co-authored-by: conan-center-bot --- .c3i/conan_v2_ready_references.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 8eeed5f74f09b..c8822abbf29a6 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -343,6 +343,7 @@ required_for_references: - erikzenker-hsm - erkir - etc2comp +- etcd-cpp-apiv3 - eternal - ethash - etl @@ -530,8 +531,10 @@ required_for_references: - indicators - indirect_value - influxdb-cpp +- influxdb-cxx - inih - inja +- intel-ipsec-mb - intel-neon2sse - intx - inversify-cpp @@ -801,6 +804,7 @@ required_for_references: - linux-syscall-support - litehtml - lksctp-tools +- llama-cpp - llhttp - llvm-openmp - lmdb @@ -831,6 +835,7 @@ required_for_references: - make - mapbox-geometry - mapbox-variant +- mapbox-wagyu - mariadb-connector-c - marisa - matchit @@ -859,6 +864,7 @@ required_for_references: - metall - metis - mfast +- mgclient - mgs - microprofile - microservice-essentials @@ -983,6 +989,7 @@ required_for_references: - opencore-amr - opencv - openddl-parser +- opendis6 - opene57 - openexr - openfbx From b7d0b6343d9648658d971b7468687e55b6cdfef1 Mon Sep 17 00:00:00 2001 From: Cristi N Date: Tue, 13 Feb 2024 09:50:35 +0100 Subject: [PATCH 010/405] (#22753) sqlite3: added `use_uri` option - which translates into `SQLITE_USE_URI` compile option --- recipes/sqlite3/all/CMakeLists.txt | 4 ++++ recipes/sqlite3/all/conanfile.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/recipes/sqlite3/all/CMakeLists.txt b/recipes/sqlite3/all/CMakeLists.txt index 1f1e60b9b2dcf..9d6257e47853f 100644 --- a/recipes/sqlite3/all/CMakeLists.txt +++ b/recipes/sqlite3/all/CMakeLists.txt @@ -17,6 +17,7 @@ option(ENABLE_RTREE "Enable support for the R*Tree index extension") option(ENABLE_UNLOCK_NOTIFY "Enable support for the unlock notify API") option(ENABLE_DEFAULT_SECURE_DELETE "Turns on secure deletion by default") option(USE_ALLOCA "The alloca() memory allocator will be used in a few situations where it is appropriate.") +option(USE_URI "This option causes the URI filename process logic to be enabled by default.") option(OMIT_LOAD_EXTENSION "Omits the entire extension loading mechanism from SQLite") option(OMIT_DEPRECATED "Omits deprecated interfaces and features") if(SQLITE3_VERSION VERSION_GREATER_EQUAL "3.35.0") @@ -93,6 +94,9 @@ endif() if(USE_ALLOCA) target_compile_definitions(${PROJECT_NAME} PRIVATE SQLITE_USE_ALLOCA) endif() +if(USE_URI) + target_compile_definitions(${PROJECT_NAME} PRIVATE SQLITE_USE_URI) +endif() if(OMIT_LOAD_EXTENSION) target_compile_definitions(${PROJECT_NAME} PRIVATE SQLITE_OMIT_LOAD_EXTENSION) endif() diff --git a/recipes/sqlite3/all/conanfile.py b/recipes/sqlite3/all/conanfile.py index eddf425a36988..8c9aee8f54806 100644 --- a/recipes/sqlite3/all/conanfile.py +++ b/recipes/sqlite3/all/conanfile.py @@ -35,6 +35,7 @@ class Sqlite3Conan(ConanFile): "enable_preupdate_hook": [True, False], "enable_rtree": [True, False], "use_alloca": [True, False], + "use_uri": [True, False], "omit_load_extension": [True, False], "omit_deprecated": [True, False], "enable_math_functions": [True, False], @@ -64,6 +65,7 @@ class Sqlite3Conan(ConanFile): "enable_preupdate_hook": False, "enable_rtree": True, "use_alloca": False, + "use_uri": False, "omit_load_extension": False, "omit_deprecated": False, "enable_math_functions": True, @@ -130,6 +132,7 @@ def generate(self): tc.variables["ENABLE_UNLOCK_NOTIFY"] = self.options.enable_unlock_notify tc.variables["ENABLE_DEFAULT_SECURE_DELETE"] = self.options.enable_default_secure_delete tc.variables["USE_ALLOCA"] = self.options.use_alloca + tc.variables["USE_URI"] = self.options.use_uri tc.variables["OMIT_LOAD_EXTENSION"] = self.options.omit_load_extension tc.variables["OMIT_DEPRECATED"] = self.options.omit_deprecated if self._has_enable_math_function_option: From 2472bc0fdd9da2f19710d337413db85ee603bb32 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 13 Feb 2024 18:27:56 +0900 Subject: [PATCH 011/405] (#22760) glaze: add version 2.1.0 --- recipes/glaze/all/conandata.yml | 3 +++ recipes/glaze/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index 082ab5fde6a56..4e699ca475415 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.0": + url: "https://github.com/stephenberry/glaze/archive/v2.1.0.tar.gz" + sha256: "b3bb4d886f17d266f37a6eec2c42b2e57e287918b20511297c4eb6b9960f0f8f" "2.0.9": url: "https://github.com/stephenberry/glaze/archive/v2.0.9.tar.gz" sha256: "c1ffede3db5c74d2c46a3abe576985dc729c95df1b48ab575079427b55488bbd" diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index 5d09cdcfa69bd..45dcbfc2283ba 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,6 @@ versions: + "2.1.0": + folder: all "2.0.9": folder: all "2.0.7": From c83402cd0166e66c662b1bbfafcfc130bdf5c8ce Mon Sep 17 00:00:00 2001 From: Johannes Wolf <519002+johannes-wolf@users.noreply.github.com> Date: Tue, 13 Feb 2024 11:47:57 +0100 Subject: [PATCH 012/405] (#22757) sfl: Add sfl version 1.2.3 * sfl: Add sfl conan package * sfl: Add sfl conan package --- recipes/sfl/all/conandata.yml | 4 ++ recipes/sfl/all/conanfile.py | 45 +++++++++++++++++++ recipes/sfl/all/test_package/CMakeLists.txt | 8 ++++ recipes/sfl/all/test_package/conanfile.py | 28 ++++++++++++ recipes/sfl/all/test_package/test_package.cpp | 23 ++++++++++ recipes/sfl/config.yml | 3 ++ 6 files changed, 111 insertions(+) create mode 100644 recipes/sfl/all/conandata.yml create mode 100644 recipes/sfl/all/conanfile.py create mode 100644 recipes/sfl/all/test_package/CMakeLists.txt create mode 100644 recipes/sfl/all/test_package/conanfile.py create mode 100644 recipes/sfl/all/test_package/test_package.cpp create mode 100644 recipes/sfl/config.yml diff --git a/recipes/sfl/all/conandata.yml b/recipes/sfl/all/conandata.yml new file mode 100644 index 0000000000000..78138456b199b --- /dev/null +++ b/recipes/sfl/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.2.3": + url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.2.3.tar.gz" + sha256: "6111a81b5dcad091c5c8a420d127c1bbfb06f8fbb7d915e6a30b4b7d2d67db71" diff --git a/recipes/sfl/all/conanfile.py b/recipes/sfl/all/conanfile.py new file mode 100644 index 0000000000000..ef6582dd3b15f --- /dev/null +++ b/recipes/sfl/all/conanfile.py @@ -0,0 +1,45 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +import os + + +required_conan_version = ">=1.62.0" + + +class SflConan(ConanFile): + name = "sfl" + description = "A header-only C++11 library that offers several new containers" + license = "Zlib" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/slavenf/sfl-library" + topics = ("containers", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 11 + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/sfl/all/test_package/CMakeLists.txt b/recipes/sfl/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..f8085bbcbe2d6 --- /dev/null +++ b/recipes/sfl/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(sfl REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE sfl::sfl) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/sfl/all/test_package/conanfile.py b/recipes/sfl/all/test_package/conanfile.py new file mode 100644 index 0000000000000..e62d4fe972ff2 --- /dev/null +++ b/recipes/sfl/all/test_package/conanfile.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python3 + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/sfl/all/test_package/test_package.cpp b/recipes/sfl/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..78ba6f47df1d5 --- /dev/null +++ b/recipes/sfl/all/test_package/test_package.cpp @@ -0,0 +1,23 @@ +#include + +#include "sfl/small_vector.hpp" +#include "sfl/small_flat_set.hpp" +#include "sfl/small_flat_map.hpp" +#include "sfl/small_flat_multiset.hpp" +#include "sfl/small_flat_multimap.hpp" +#include "sfl/small_unordered_flat_set.hpp" +#include "sfl/small_unordered_flat_map.hpp" +#include "sfl/small_unordered_flat_multiset.hpp" +#include "sfl/small_unordered_flat_multimap.hpp" +#include "sfl/compact_vector.hpp" +#include "sfl/segmented_vector.hpp" + +int main() { + sfl::small_vector v1; + v1.push_back(123); + + sfl::segmented_vector v2; + v2.push_back(123); + + return EXIT_SUCCESS; +} diff --git a/recipes/sfl/config.yml b/recipes/sfl/config.yml new file mode 100644 index 0000000000000..81ff4bc37c872 --- /dev/null +++ b/recipes/sfl/config.yml @@ -0,0 +1,3 @@ +versions: + "1.2.3": + folder: "all" From 1240f77542b77a9b245583162c8b63e980b2a59c Mon Sep 17 00:00:00 2001 From: igormironchik Date: Tue, 13 Feb 2024 14:48:12 +0300 Subject: [PATCH 013/405] (#22716) md4qt: bump version --- recipes/md4qt/all/conandata.yml | 3 +++ recipes/md4qt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index 16e0c43dea8d2..59b1267eb8b5a 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.7.1": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.1.tar.gz" + sha256: "054cbaa286cfd3ce2d4e5c178b303b80eb23ad5bd54541571d6c9afbd285986e" "2.7.0": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.0.tar.gz" sha256: "e5722b586fa6c6d126487056fa47f0d933b94413ac44b79f52573226eca04a07" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index 36c498e0d5bfd..3527c586022c3 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,6 @@ versions: + "2.7.1": + folder: all "2.7.0": folder: all "2.6.0": From 5daf02ff7bbafca2444af6c5b4d2c90d777b8176 Mon Sep 17 00:00:00 2001 From: igormironchik Date: Tue, 13 Feb 2024 17:28:09 +0300 Subject: [PATCH 014/405] (#22762) md4qt: bump version to 2.7.2 --- recipes/md4qt/all/conandata.yml | 3 +++ recipes/md4qt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index 59b1267eb8b5a..315e8aca50cf0 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.7.2": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.2.tar.gz" + sha256: "2d6b65db799fff944f2ecb8bb411f17687e41e0d5a17a37ad1c4bd22fe997d8b" "2.7.1": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.1.tar.gz" sha256: "054cbaa286cfd3ce2d4e5c178b303b80eb23ad5bd54541571d6c9afbd285986e" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index 3527c586022c3..e03897a5ac97e 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,6 @@ versions: + "2.7.2": + folder: all "2.7.1": folder: all "2.7.0": From 96c442996dfa00e8ca3bcc1407a4982c49440b27 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 13 Feb 2024 16:02:11 +0100 Subject: [PATCH 015/405] (#22763) [hiredis] Use cache variables to make work with Cmake Signed-off-by: Uilian Ries --- recipes/hiredis/all/conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/hiredis/all/conanfile.py b/recipes/hiredis/all/conanfile.py index 4973e6b1da136..f81b8f52adbcd 100644 --- a/recipes/hiredis/all/conanfile.py +++ b/recipes/hiredis/all/conanfile.py @@ -56,9 +56,9 @@ def generate(self): # Since 1.2.0, BUILD_SHARED_LIBS has been defined by option() if Version(self.version) >= "1.2.0": tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared - tc.variables["ENABLE_SSL"] = self.options.with_ssl - tc.variables["DISABLE_TESTS"] = True - tc.variables["ENABLE_EXAMPLES"] = False + tc.cache_variables["ENABLE_SSL"] = self.options.with_ssl + tc.cache_variables["DISABLE_TESTS"] = True + tc.cache_variables["ENABLE_EXAMPLES"] = False tc.generate() deps = CMakeDeps(self) deps.generate() From 37ed7f626150388f389b951994bd7a3477c40d45 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 13 Feb 2024 20:07:42 +0200 Subject: [PATCH 016/405] (#22295) physx: add v4.1.2, add package_type and no_copy_source=True MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * physx: add v4.1.2 * physx: set no_copy_source = True, package_type = "library" The source archive is more than 600 MB alone. * physx: fix test_package * physx: CMakeDeps is not needed * physx: use f-strings * Patch on source() method instead of build() due to no_copy_source=True We checked that the patches do not depend on the configuration --------- Co-authored-by: Rubén Rincón Blanco --- recipes/physx/4.x.x/conandata.yml | 13 ++++++++++ recipes/physx/4.x.x/conanfile.py | 25 ++++++++----------- recipes/physx/4.x.x/test_package/conanfile.py | 5 ++-- recipes/physx/config.yml | 2 ++ 4 files changed, 28 insertions(+), 17 deletions(-) diff --git a/recipes/physx/4.x.x/conandata.yml b/recipes/physx/4.x.x/conandata.yml index 6ce5c7aca0b19..3407713e50946 100644 --- a/recipes/physx/4.x.x/conandata.yml +++ b/recipes/physx/4.x.x/conandata.yml @@ -1,8 +1,21 @@ sources: + "4.1.2": + url: "https://github.com/NVIDIAGameWorks/PhysX/archive/a2c0428acab643e60618c681b501e86f7fd558cc.zip" + sha256: "d9c1939490a990277f8c773f288294cecb10e6fad8c820acad90fd4168b8ace3" "4.1.1": url: "https://github.com/NVIDIAGameWorks/PhysX/archive/ae80dede0546d652040ae6260a810e53e20a06fa.zip" sha256: "dd7db4c7879659658753029de57d04b18047ec04687b60f70335cde148a48d68" patches: + "4.1.2": + - patch_file: "patches/0003-PsWindowsInlineAoS-msvc142-bug-workaround.patch" + patch_description: "Workaround for a MSVC 142 bug on V3LoadA" + patch_type: "portability" + - patch_file: "patches/0004-Conan-PhysXGpu-name-workaround.patch" + patch_description: "Fix PhysXGpu library name" + patch_type: "conan" + - patch_file: "patches/0005-CMake-macos-ios-android-install-targets.patch" + patch_description: "Add installation targets for iOS, MacOS, Android" + patch_type: "portability" "4.1.1": - patch_file: "patches/0001-PsAllocator-include-typeinfo.patch" patch_description: "Fixed typeinfo inclusion for some VS versions" diff --git a/recipes/physx/4.x.x/conanfile.py b/recipes/physx/4.x.x/conanfile.py index 502ac7ccfc798..35264535f45b5 100644 --- a/recipes/physx/4.x.x/conanfile.py +++ b/recipes/physx/4.x.x/conanfile.py @@ -18,6 +18,7 @@ class PhysXConan(ConanFile): homepage = "https://github.com/NVIDIAGameWorks/PhysX" url = "https://github.com/conan-io/conan-center-index" + package_type = "library" settings = "os", "compiler", "arch", "build_type" options = { "shared": [True, False], @@ -35,8 +36,7 @@ class PhysXConan(ConanFile): } short_paths = True - - generators = "CMakeDeps" + no_copy_source = True def export_sources(self): export_conandata_patches(self) @@ -64,30 +64,28 @@ def validate(self): if self.settings.os == "Macos": if self.settings.arch not in ["x86", "x86_64"]: - raise ConanInvalidConfiguration("{} only supports x86 and x86_64 on macOS".format(self.name)) - + raise ConanInvalidConfiguration(f"{self.name} only supports x86 and x86_64 on macOS") + if valid_min_cppstd(self, 17): - raise ConanInvalidConfiguration("{} is not supported with C++ 17. Contributions are welcome.".format(self.name)) + raise ConanInvalidConfiguration(f"{self.name} is not supported with C++ 17. Contributions are welcome.") build_type = self.settings.build_type if build_type not in ["Debug", "RelWithDebInfo", "Release"]: raise ConanInvalidConfiguration("Current build_type is not supported") if self.settings.os == "Windows" and not is_msvc(self): - raise ConanInvalidConfiguration("{} only supports Visual Studio on Windows".format(self.name)) + raise ConanInvalidConfiguration(f"{self.name} only supports Visual Studio on Windows") if is_msvc(self): allowed_runtimes = ["MDd", "MTd"] if build_type == "Debug" else ["MD", "MT"] if msvc_runtime_flag(self) not in allowed_runtimes: raise ConanInvalidConfiguration( - "Visual Studio runtime {0} is required for {1} build type".format( - " or ".join(allowed_runtimes), - build_type, - ) + f"Visual Studio runtime {' or '.join(allowed_runtimes)} is required for {build_type} build type" ) def source(self): get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + self._patch_sources() def generate(self): tc = CMakeToolchain(self) @@ -141,8 +139,6 @@ def generate(self): tc.generate() def build(self): - self._patch_sources() - cmake = CMake(self) cmake.configure(build_script_folder=os.path.join(self.source_folder, "physx/compiler/public")) cmake.build(build_type=self._get_physx_build_type()) @@ -185,8 +181,7 @@ def _patch_sources(self): ): target, _ = os.path.splitext(os.path.basename(cmake_file)) replace_in_file(self, os.path.join(physx_source_cmake_dir, cmake_file), - "SET_TARGET_PROPERTIES({} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)".format(target), - "") + f"SET_TARGET_PROPERTIES({target} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)", "") # No error for compiler warnings replace_in_file(self, os.path.join(physx_source_cmake_dir, "windows", "CMakeLists.txt"), @@ -263,7 +258,7 @@ def _copy_external_bin(self): "pattern": "PhysXDevice*.dll", "vc_ver": {"180": "vc120", "190": "vc140", "191": "vc141"}.get(str(compiler_version), "vc142") }] - + package_dst_bin_dir = os.path.join(self.package_folder, "bin") for dll_info in dll_info_list: diff --git a/recipes/physx/4.x.x/test_package/conanfile.py b/recipes/physx/4.x.x/test_package/conanfile.py index 3bc1fe0a67f9f..ff6d00f1438e2 100644 --- a/recipes/physx/4.x.x/test_package/conanfile.py +++ b/recipes/physx/4.x.x/test_package/conanfile.py @@ -6,6 +6,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) @@ -15,7 +16,7 @@ def layout(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["TEST_SHARED_LIBRARY"] = True if "fPIC" not in self.options["physx"].fields else self.options["physx"].fPIC + tc.variables["TEST_SHARED_LIBRARY"] = self.dependencies["physx"].options.get_safe("fPIC", True) tc.generate() def build(self): @@ -25,5 +26,5 @@ def build(self): def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") self.run(bin_path, env="conanrun") diff --git a/recipes/physx/config.yml b/recipes/physx/config.yml index ff5afb6866457..f46b35cc99652 100644 --- a/recipes/physx/config.yml +++ b/recipes/physx/config.yml @@ -1,3 +1,5 @@ versions: + "4.1.2": + folder: "4.x.x" "4.1.1": folder: "4.x.x" From c9662ba806cbd111fbffc50b0560e743ad26b3f4 Mon Sep 17 00:00:00 2001 From: Kim Lindberger Date: Wed, 14 Feb 2024 12:09:27 +0100 Subject: [PATCH 017/405] (#21761) pthreadpool: Add cci.20231129 --- recipes/pthreadpool/all/conandata.yml | 3 +++ recipes/pthreadpool/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/pthreadpool/all/conandata.yml b/recipes/pthreadpool/all/conandata.yml index 4a1b5d58d8c57..5b276e0fd5b93 100644 --- a/recipes/pthreadpool/all/conandata.yml +++ b/recipes/pthreadpool/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20231129": + url: "https://github.com/Maratyszcza/pthreadpool/archive/4fe0e1e183925bf8cfa6aae24237e724a96479b8.zip" + sha256: "a4cf06de57bfdf8d7b537c61f1c3071bce74e57524fe053e0bbd2332feca7f95" "cci.20210218": url: "https://github.com/Maratyszcza/pthreadpool/archive/b4589998be9a0f794236cf46f1b5b232b2b15ca3.zip" sha256: "b09f79d1b609239861bce5ed4ba4fbcf04f36e2c31471276158c44e5e15fde95" diff --git a/recipes/pthreadpool/config.yml b/recipes/pthreadpool/config.yml index 888d588d579dc..cb37cf1973096 100644 --- a/recipes/pthreadpool/config.yml +++ b/recipes/pthreadpool/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20231129": + folder: all "cci.20210218": folder: all From c05d1e9fe8eef997d59346269594368c4c39824e Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 15 Feb 2024 01:47:05 +0900 Subject: [PATCH 018/405] (#19698) oatpp-sqlite: update sqlite3, use transitive_headers, use rm_safe * oatpp-sqlite: update sqlite3, use transitive_headers, use rm_safe * update sqlite3/3.43.1 * update dependencies Co-authored-by: Matthieu Darbois * update sqlite3 --------- Co-authored-by: Matthieu Darbois --- recipes/oatpp-sqlite/all/conanfile.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/recipes/oatpp-sqlite/all/conanfile.py b/recipes/oatpp-sqlite/all/conanfile.py index 75896ed5f3e71..5d2b46351ef5e 100644 --- a/recipes/oatpp-sqlite/all/conanfile.py +++ b/recipes/oatpp-sqlite/all/conanfile.py @@ -7,17 +7,17 @@ from conan.tools.scm import Version import os -required_conan_version = ">=1.51.1" +required_conan_version = ">=1.53.0" class OatppsqliteConan(ConanFile): name = "oatpp-sqlite" + description = "SQLite adapter for oatpp ORM." license = "Apache-2.0" - homepage = "https://github.com/oatpp/oatpp-sqlite" url = "https://github.com/conan-io/conan-center-index" - description = "oat++ SQLite library" + homepage = "https://github.com/oatpp/oatpp-sqlite" topics = ("oat++", "oatpp", "sqlite") - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -34,17 +34,14 @@ def config_options(self): def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires(f"oatpp/{self.version}") - self.requires("sqlite3/3.39.4") + self.requires(f"oatpp/{self.version}", transitive_headers=True) + self.requires("sqlite3/3.45.0") def validate(self): if self.info.settings.compiler.get_safe("cppstd"): @@ -57,8 +54,7 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} requires GCC >=5") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) From 02ff9d0d653fa0ca9c2cba9ce1c46bef0e79f176 Mon Sep 17 00:00:00 2001 From: Alexis Placet Date: Wed, 14 Feb 2024 18:11:09 +0100 Subject: [PATCH 019/405] (#22710) sqlcipher: Add 4.5.6 * sqlcipher: Add 4.5.6 * sqlcipher: Add 4.5.6 * sqlcipher: Fix topic case and add missing endline * sqlcipher: Fix license for version >4.5.6 * do not enforce cmake in test package Signed-off-by: Uilian Ries * sqlcipher: relax license filename to copy Co-authored-by: Uilian Ries * sqlcipher: Add option to enable column metadata * sqlcipher: do not enforce cmake in test package #2 --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries --- recipes/sqlcipher/all/conandata.yml | 7 + recipes/sqlcipher/all/conanfile.py | 11 +- .../all/patches/Makefile.in-v4.5.6.patch | 25 +++ .../all/patches/Makefile.msc-v4.5.6.patch | 161 ++++++++++++++++++ .../all/patches/fix_configure-v4.5.6.patch | 20 +++ .../sqlcipher/all/test_package/conanfile.py | 9 - .../all/test_v1_package/conanfile.py | 9 - recipes/sqlcipher/config.yml | 2 + 8 files changed, 223 insertions(+), 21 deletions(-) create mode 100644 recipes/sqlcipher/all/patches/Makefile.in-v4.5.6.patch create mode 100644 recipes/sqlcipher/all/patches/Makefile.msc-v4.5.6.patch create mode 100644 recipes/sqlcipher/all/patches/fix_configure-v4.5.6.patch diff --git a/recipes/sqlcipher/all/conandata.yml b/recipes/sqlcipher/all/conandata.yml index a6f870e23b894..b9d316e874757 100644 --- a/recipes/sqlcipher/all/conandata.yml +++ b/recipes/sqlcipher/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.5.6": + url: "https://github.com/sqlcipher/sqlcipher/archive/v4.5.6.zip" + sha256: "5d269166c33c39c4dc6fc14be4ac8cd78b022f8bd59b0775becf0c896331a539" "4.5.1": url: "https://github.com/sqlcipher/sqlcipher/archive/v4.5.1.zip" sha256: "08a1024b299b5527d5b5ed79f67957938b516567f68662e973c4bec1b843b28e" @@ -18,6 +21,10 @@ sources: url: "https://github.com/sqlcipher/sqlcipher/archive/v4.3.0.zip" sha256: "41e1408465488e9c478ca5b7c5f8410405a10caa73b82db60ac115a76c563c05" patches: + "4.5.6": + - patch_file: patches/Makefile.in-v4.5.6.patch + - patch_file: patches/Makefile.msc-v4.5.6.patch + - patch_file: patches/fix_configure-v4.5.6.patch "4.5.1": - patch_file: patches/Makefile.in-v4.5.1.patch - patch_file: patches/Makefile.msc-v4.5.1.patch diff --git a/recipes/sqlcipher/all/conanfile.py b/recipes/sqlcipher/all/conanfile.py index d61f784a9ae42..103c2ec526cd3 100644 --- a/recipes/sqlcipher/all/conanfile.py +++ b/recipes/sqlcipher/all/conanfile.py @@ -20,7 +20,7 @@ class SqlcipherConan(ConanFile): license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.zetetic.net/sqlcipher/" - topics = ("database", "encryption", "SQLite") + topics = ("database", "encryption", "sqlite") package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -30,6 +30,7 @@ class SqlcipherConan(ConanFile): "crypto_library": ["openssl", "libressl", "commoncrypto"], "with_largefile": [True, False], "temporary_store": ["always_file", "default_file", "default_memory", "always_memory"], + "enable_column_metadata": [True, False], } default_options = { "shared": False, @@ -37,6 +38,7 @@ class SqlcipherConan(ConanFile): "crypto_library": "openssl", "with_largefile": True, "temporary_store": "default_memory", + "enable_column_metadata": False, } @property @@ -114,7 +116,10 @@ def _generate_msvc(self): env.define("OPTS", f'-I{crypto_dep.includedir} -DSQLITE_HAS_CODEC') env.define("NO_TCL", "1") env.define("USE_AMALGAMATION", "1") - env.define("OPT_FEATURE_FLAGS", "-DSQLCIPHER_CRYPTO_OPENSSL") + opt_feature_flags = "-DSQLCIPHER_CRYPTO_OPENSSL" + if self.options.enable_column_metadata: + opt_feature_flags += " -DSQLITE_ENABLE_COLUMN_METADATA" + env.define("OPT_FEATURE_FLAGS", opt_feature_flags) env.define("SQLITE_TEMP_STORE", self._temp_store_nmake_value) env.define("TCLSH_CMD", self.dependencies.build['tcl'].runenv_info.vars(self)['TCLSH']) @@ -221,7 +226,7 @@ def build(self): autotools.make() def package(self): - copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "LICENSE*", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) if is_msvc(self): copy(self, "*.dll", dst=os.path.join(self.package_folder, "bin"), src=self.source_folder, keep_path=False) copy(self, "*.lib", dst=os.path.join(self.package_folder, "lib"), src=self.source_folder, keep_path=False) diff --git a/recipes/sqlcipher/all/patches/Makefile.in-v4.5.6.patch b/recipes/sqlcipher/all/patches/Makefile.in-v4.5.6.patch new file mode 100644 index 0000000000000..ea44332dff260 --- /dev/null +++ b/recipes/sqlcipher/all/patches/Makefile.in-v4.5.6.patch @@ -0,0 +1,25 @@ +diff --git a/Makefile.in b/Makefile.in +index 870c5d30..4dc5d292 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -672,8 +672,7 @@ SQLITE3_SHELL_TARGET = $(SQLITE3_SHELL_TARGET_@HAVE_WASI_SDK@) + # This is the default Makefile target. The objects listed here + # are what get build when you type just "make" with no arguments. + # +-all: sqlite3.h libsqlcipher.la $(SQLITE3_SHELL_TARGET) \ +- $(HAVE_TCL:1=libtclsqlite3.la) ++all: sqlite3.h libsqlcipher.la + + Makefile: $(TOP)/Makefile.in + ./config.status +@@ -1557,9 +1556,8 @@ lib_install: libsqlcipher.la + $(INSTALL) -d $(DESTDIR)$(libdir) + $(LTINSTALL) libsqlcipher.la $(DESTDIR)$(libdir) + +-install: sqlcipher$(TEXE) lib_install sqlite3.h sqlcipher.pc ${HAVE_TCL:1=tcl_install} ++install: lib_install sqlite3.h sqlcipher.pc + $(INSTALL) -d $(DESTDIR)$(bindir) +- $(LTINSTALL) sqlcipher$(TEXE) $(DESTDIR)$(bindir) + $(INSTALL) -d $(DESTDIR)$(includedir) + $(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(includedir) + $(INSTALL) -m 0644 $(TOP)/src/sqlite3ext.h $(DESTDIR)$(includedir) diff --git a/recipes/sqlcipher/all/patches/Makefile.msc-v4.5.6.patch b/recipes/sqlcipher/all/patches/Makefile.msc-v4.5.6.patch new file mode 100644 index 0000000000000..94b469d07e19d --- /dev/null +++ b/recipes/sqlcipher/all/patches/Makefile.msc-v4.5.6.patch @@ -0,0 +1,161 @@ +diff --git a/Makefile.msc b/Makefile.msc +index 85487315..e3c00752 100644 +--- a/Makefile.msc ++++ b/Makefile.msc +@@ -299,9 +299,9 @@ SQLITE3H = sqlite3.h + # + !IFNDEF SQLITE3DLL + !IF $(FOR_WIN10)!=0 +-SQLITE3DLL = winsqlite3.dll ++SQLITE3DLL = sqlcipher.dll + !ELSE +-SQLITE3DLL = sqlite3.dll ++SQLITE3DLL = sqlcipher.dll + !ENDIF + !ENDIF + +@@ -309,9 +309,9 @@ SQLITE3DLL = sqlite3.dll + # + !IFNDEF SQLITE3LIB + !IF $(FOR_WIN10)!=0 +-SQLITE3LIB = winsqlite3.lib ++SQLITE3LIB = sqlcipher.lib + !ELSE +-SQLITE3LIB = sqlite3.lib ++SQLITE3LIB = sqlcipher.lib + !ENDIF + !ENDIF + +@@ -696,7 +696,7 @@ SHELL_CORE_SRC = $(SQLITE3C) + SHELL_CORE_DEP = $(SQLITE3DLL) + # <> + !ELSEIF $(USE_AMALGAMATION)==0 +-SHELL_CORE_DEP = libsqlite3.lib ++SHELL_CORE_DEP = sqlcipher.lib + # <> + !ELSE + SHELL_CORE_DEP = +@@ -719,7 +719,7 @@ TESTFIXTURE_DEP = zlib $(TESTFIXTURE_DEP) + SHELL_CORE_LIB = $(SQLITE3LIB) + # <> + !ELSEIF $(USE_AMALGAMATION)==0 +-SHELL_CORE_LIB = libsqlite3.lib ++SHELL_CORE_LIB = sqlcipher.lib + # <> + !ELSE + SHELL_CORE_LIB = +@@ -754,8 +754,9 @@ RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP + # C compiler options for the Windows 10 platform (needs MSVC 2015). + # + !IF $(FOR_WIN10)!=0 +-TCC = $(TCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE +-BCC = $(BCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE ++# /d2guard4 requires /guard:cf to be present as well, but it doesn't work with /Zi (Debug builds) ++TCC = $(TCC) -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE ++BCC = $(BCC) -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE + !ENDIF + + # Also, we need to dynamically link to the correct MSVC runtime +@@ -1039,8 +1040,10 @@ TLIBS = + # default to file, 2 to default to memory, and 3 to force temporary + # tables to always be in memory. + # +-TCC = $(TCC) -DSQLITE_TEMP_STORE=1 +-RCC = $(RCC) -DSQLITE_TEMP_STORE=1 ++ ++# Allow overriding the value ++TCC = $(TCC) -DSQLITE_TEMP_STORE=$(SQLITE_TEMP_STORE) ++RCC = $(RCC) -DSQLITE_TEMP_STORE=$(SQLITE_TEMP_STORE) + + # Enable/disable loadable extensions, and other optional features + # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*). +@@ -1206,14 +1209,15 @@ LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)" + !ENDIF + LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE + LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib +-LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib ++# Remove /NODEFAULTLIB:kernel32.lib, required by OpenSSL + !ENDIF + + # When compiling for UWP or the Windows 10 platform, some extra linker + # options are also required. + # + !IF $(FOR_UWP)!=0 || $(FOR_WIN10)!=0 +-LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib ++# Remove /NODEFAULTLIB:kernel32.lib, required by OpenSSL ++LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE + LTLINKOPTS = $(LTLINKOPTS) mincore.lib + !IFDEF PSDKLIBPATH + LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)" +@@ -1268,7 +1272,7 @@ LTLIBS = $(LTLIBS) $(LIBICU) + # + LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \ + backup.lo bitvec.lo btmutex.lo btree.lo build.lo \ +- callback.lo complete.lo ctime.lo \ ++ callback.lo complete.lo crypto.lo crypto_impl.lo crypto_openssl.lo ctime.lo \ + date.lo dbpage.lo dbstat.lo delete.lo \ + expr.lo fault.lo fkey.lo \ + fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \ +@@ -1774,7 +1778,7 @@ ALL_TCL_TARGETS = + # This is the default Makefile target. The objects listed here + # are what get build when you type just "make" with no arguments. + # +-core: dll libsqlite3.lib shell ++core: dll sqlcipher.lib shell + + # Targets that require the Tcl library. + # +@@ -1793,11 +1797,12 @@ dll: $(SQLITE3DLL) + shell: $(SQLITE3EXE) + + # <> +-libsqlite3.lib: $(LIBOBJ) +- $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS) ++# LTLIBPATHS is required to find the openssl/libressl libs ++sqlcipher.lib: $(LIBOBJ) ++ $(LTLIB) $(LTLIBPATHS) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS) + +-libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib +- $(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS) ++libtclsqlite3.lib: tclsqlite.lo sqlcipher.lib ++ $(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo sqlcipher.lib $(LIBTCLSTUB) $(TLIBS) + + tclsqlite3.def: tclsqlite.lo + echo EXPORTS > tclsqlite3.def +@@ -1819,9 +1824,9 @@ $(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP) + $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS) + + # <> +-sqlite3.def: libsqlite3.lib ++sqlite3.def: sqlcipher.lib + echo EXPORTS > sqlite3.def +- dumpbin /all libsqlite3.lib \ ++ dumpbin /all sqlcipher.lib \ + | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3(?:session|changeset|changegroup|rebaser|rbu)?_[^@]*)(?:@\d+)?$$" \1 \ + | sort >> sqlite3.def + # <> +@@ -2008,6 +2013,15 @@ callback.lo: $(TOP)\src\callback.c $(HDR) + complete.lo: $(TOP)\src\complete.c $(HDR) + $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\complete.c + ++crypto.lo: $(TOP)\src\crypto.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto.c ++ ++crypto_impl.lo: $(TOP)\src\crypto_impl.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto_impl.c ++ ++crypto_openssl.lo: $(TOP)\src\crypto_openssl.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto_openssl.c ++ + ctime.lo: $(TOP)\src\ctime.c $(HDR) + $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\ctime.c + +@@ -2427,7 +2441,7 @@ sqlite3rbu.lo: $(TOP)\ext\rbu\sqlite3rbu.c $(HDR) $(EXTHDR) + # Rules to build the 'testfixture' application. + # + # If using the amalgamation, use sqlite3.c directly to build the test +-# fixture. Otherwise link against libsqlite3.lib. (This distinction is ++# fixture. Otherwise link against sqlcipher.lib. (This distinction is + # necessary because the test fixture requires non-API symbols which are + # hidden when the library is built via the amalgamation). + # diff --git a/recipes/sqlcipher/all/patches/fix_configure-v4.5.6.patch b/recipes/sqlcipher/all/patches/fix_configure-v4.5.6.patch new file mode 100644 index 0000000000000..92c3d8c91d58c --- /dev/null +++ b/recipes/sqlcipher/all/patches/fix_configure-v4.5.6.patch @@ -0,0 +1,20 @@ +diff --git a/configure b/configure +index a2909ce..9c25987 100755 +--- a/configure ++++ b/configure +@@ -12732,7 +12732,6 @@ then : + printf %s "(cached) " >&6 + else $as_nop + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lcrypto $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -12764,7 +12763,6 @@ if test "x$ac_cv_lib_crypto_HMAC_Init_ex" = xyes + then : + printf "%s\n" "#define HAVE_LIBCRYPTO 1" >>confdefs.h + +- LIBS="-lcrypto $LIBS" + + else $as_nop + as_fn_error $? "Library crypto not found. Install openssl!\"" "$LINENO" 5 diff --git a/recipes/sqlcipher/all/test_package/conanfile.py b/recipes/sqlcipher/all/test_package/conanfile.py index a2566c4cce099..f42142315949c 100644 --- a/recipes/sqlcipher/all/test_package/conanfile.py +++ b/recipes/sqlcipher/all/test_package/conanfile.py @@ -13,15 +13,6 @@ class TestPackageConan(ConanFile): def requirements(self): self.requires(self.tested_reference_str) - def build_requirements(self): - if is_apple_os(self) and self.settings.arch == "armv8": - # Workaround for CMake bug with error message: - # Attempting to use @rpath without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being - # set. This could be because you are using a Mac OS X version less than 10.5 - # or because CMake's platform configuration is corrupt. - # FIXME: Remove once CMake on macOS/M1 CI runners is upgraded. - self.tool_requires("cmake/[>=3.22]") - def layout(self): cmake_layout(self) diff --git a/recipes/sqlcipher/all/test_v1_package/conanfile.py b/recipes/sqlcipher/all/test_v1_package/conanfile.py index 84b7364551610..7bb57d9f4dc6a 100644 --- a/recipes/sqlcipher/all/test_v1_package/conanfile.py +++ b/recipes/sqlcipher/all/test_v1_package/conanfile.py @@ -7,15 +7,6 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "cmake", "cmake_find_package_multi" - def build_requirements(self): - if is_apple_os(self) and self.settings.arch == "armv8": - # Workaround for CMake bug with error message: - # Attempting to use @rpath without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being - # set. This could be because you are using a Mac OS X version less than 10.5 - # or because CMake's platform configuration is corrupt. - # FIXME: Remove once CMake on macOS/M1 CI runners is upgraded. - self.build_requires("cmake/3.22.0") - def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/sqlcipher/config.yml b/recipes/sqlcipher/config.yml index 939fca7342f84..e679e5bd0c0e9 100644 --- a/recipes/sqlcipher/config.yml +++ b/recipes/sqlcipher/config.yml @@ -1,4 +1,6 @@ versions: + "4.5.6": + folder: all "4.5.1": folder: all "4.5.0": From aeb46ba84eb9a31e36c57fbdec4f9587f076ae9b Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 15 Feb 2024 02:49:57 +0900 Subject: [PATCH 020/405] (#22731) jasper: add version 4.2.0, update dependencies --- recipes/jasper/all/conandata.yml | 7 +++++++ recipes/jasper/all/conanfile.py | 12 ++++++------ .../patches/4.2.0-0003-deterministic-libname.patch | 13 +++++++++++++ recipes/jasper/config.yml | 2 ++ 4 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 recipes/jasper/all/patches/4.2.0-0003-deterministic-libname.patch diff --git a/recipes/jasper/all/conandata.yml b/recipes/jasper/all/conandata.yml index 0873904e06da9..0996a2f915ff8 100644 --- a/recipes/jasper/all/conandata.yml +++ b/recipes/jasper/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.2.0": + url: "https://github.com/jasper-software/jasper/releases/download/version-4.2.0/jasper-4.2.0.tar.gz" + sha256: "69f0b08a0cc281a06eaf7feed510736854bbff9af89ab1d01b77382ad57ec957" "4.1.2": url: "https://github.com/jasper-software/jasper/releases/download/version-4.1.2/jasper-4.1.2.tar.gz" sha256: "22392e439b87c79aaf8689ec79a286a7147e811c4bee34edf3d0b239798d672b" @@ -18,6 +21,10 @@ sources: url: "https://github.com/jasper-software/jasper/releases/download/version-2.0.33/jasper-2.0.33.tar.gz" sha256: "28d28290cc2eaf70c8756d391ed8bcc8ab809a895b9a67ea6e89da23a611801a" patches: + "4.2.0": + - patch_file: "patches/4.2.0-0003-deterministic-libname.patch" + patch_description: "No generator dependent libname" + patch_type: "conan" "4.1.2": - patch_file: "patches/4.1.1-0001-skip-rpath.patch" patch_description: "Do not enforce rpath configuration" diff --git a/recipes/jasper/all/conanfile.py b/recipes/jasper/all/conanfile.py index 758b12ef086f4..29bbcb6c115d7 100644 --- a/recipes/jasper/all/conanfile.py +++ b/recipes/jasper/all/conanfile.py @@ -12,11 +12,11 @@ class JasperConan(ConanFile): name = "jasper" + description = "JasPer Image Processing/Coding Tool Kit" license = "JasPer-2.0" - homepage = "https://jasper-software.github.io/jasper" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://jasper-software.github.io/jasper" topics = ("toolkit", "coding", "jpeg", "images") - description = "JasPer Image Processing/Coding Tool Kit" package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -50,9 +50,9 @@ def requirements(self): if self.options.with_libjpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_libjpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.0") + self.requires("libjpeg-turbo/3.0.2") elif self.options.with_libjpeg == "mozjpeg": - self.requires("mozjpeg/4.1.1") + self.requires("mozjpeg/4.1.5") def build_requirements(self): if Version(self.version) >= "4.1.1": @@ -77,11 +77,11 @@ def generate(self): if Version(self.version) >= "3.0.0": tc.variables["JAS_ENABLE_LIBHEIF"] = False tc.variables["JAS_ENABLE_OPENGL"] = False - if cross_building(self): tc.cache_variables["JAS_CROSSCOMPILING"] = True tc.cache_variables["JAS_STDC_VERSION"] = "199901L" - + if Version(self.version) >= "4.2.0": + tc.variables["JAS_PACKAGING"] = True tc.generate() cmakedeps = CMakeDeps(self) diff --git a/recipes/jasper/all/patches/4.2.0-0003-deterministic-libname.patch b/recipes/jasper/all/patches/4.2.0-0003-deterministic-libname.patch new file mode 100644 index 0000000000000..ed1edf420e3b3 --- /dev/null +++ b/recipes/jasper/all/patches/4.2.0-0003-deterministic-libname.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c6925e4..8392edf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -274,7 +274,7 @@ message("JAS_MULTICONFIGURATION_GENERATOR ${JAS_MULTICONFIGURATION_GENERATOR}") + # If a multiconfiguration generator is used, ensure that various output + # files are not placed in subdirectories (such as Debug and Release) + # as this will cause the CTest test suite to fail. +-if(JAS_MULTICONFIGURATION_GENERATOR) ++if(0) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY .) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY .) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY .) diff --git a/recipes/jasper/config.yml b/recipes/jasper/config.yml index d3b9298f87c1c..2539649ff499b 100644 --- a/recipes/jasper/config.yml +++ b/recipes/jasper/config.yml @@ -1,4 +1,6 @@ versions: + "4.2.0": + folder: all "4.1.2": folder: all "4.1.1": From 3136377b8cd5ede828526dd7df84746c8100415c Mon Sep 17 00:00:00 2001 From: David Aceituno Date: Wed, 14 Feb 2024 19:29:06 +0100 Subject: [PATCH 021/405] (#22767) Update to h5pp/1.11.2 --- recipes/h5pp/all/conandata.yml | 3 +++ recipes/h5pp/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/h5pp/all/conandata.yml b/recipes/h5pp/all/conandata.yml index bf1850769d043..8a624a3c51a3b 100644 --- a/recipes/h5pp/all/conandata.yml +++ b/recipes/h5pp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.11.2": + url: "https://github.com/DavidAce/h5pp/archive/v1.11.2.tar.gz" + sha256: "5638bf699a92049910c80a7af3d6c8495f02253dd32ee0000bc35a29a9e61e9c" "1.11.1": url: "https://github.com/DavidAce/h5pp/archive/v1.11.1.tar.gz" sha256: "659d566dcb011e7a0f14f9fec9d6e6c783559eec3fd051de1e5cf44d95fd752b" diff --git a/recipes/h5pp/config.yml b/recipes/h5pp/config.yml index 6306850e1fb06..a489a477b18f9 100644 --- a/recipes/h5pp/config.yml +++ b/recipes/h5pp/config.yml @@ -17,3 +17,5 @@ versions: folder: "all" "1.11.1": folder: "all" + "1.11.2": + folder: "all" From e49bd288886175aa11ee8eb2799df544f3bb402d Mon Sep 17 00:00:00 2001 From: Ahajha <44127594+Ahajha@users.noreply.github.com> Date: Wed, 14 Feb 2024 23:47:55 -0500 Subject: [PATCH 022/405] (#22727) fontconfig: update expat * fontconfig: update expat * Revert expat on fontconfig<2.13.93 * Only revert expat on Mac * alphabetize * Simplify test package for <2.13.93 * Bump expat again * Re-add return value Co-authored-by: Uilian Ries --------- Co-authored-by: Uilian Ries --- recipes/fontconfig/all/conanfile.py | 2 +- .../all/test_package/test_package.c | 22 ++----------------- recipes/fontconfig/meson/conanfile.py | 2 +- 3 files changed, 4 insertions(+), 22 deletions(-) diff --git a/recipes/fontconfig/all/conanfile.py b/recipes/fontconfig/all/conanfile.py index ddc997bea245a..543e746cf6bf8 100644 --- a/recipes/fontconfig/all/conanfile.py +++ b/recipes/fontconfig/all/conanfile.py @@ -48,7 +48,7 @@ def layout(self): def requirements(self): self.requires("freetype/2.13.2") - self.requires("expat/2.5.0") + self.requires("expat/2.6.0") if self.settings.os == "Linux": self.requires("util-linux-libuuid/2.39.2") diff --git a/recipes/fontconfig/all/test_package/test_package.c b/recipes/fontconfig/all/test_package/test_package.c index 7703ab64bbdec..3d2556b9cca2e 100644 --- a/recipes/fontconfig/all/test_package/test_package.c +++ b/recipes/fontconfig/all/test_package/test_package.c @@ -1,24 +1,6 @@ #include -#include -#include int main() { - FcConfig* config = FcInitLoadConfigAndFonts(); - FcPattern* pat = FcNameParse((const FcChar8*)"Arial"); - FcConfigSubstitute(config, pat, FcMatchPattern); - FcDefaultSubstitute(pat); - char* fontFile; - FcResult result; - FcPattern* font = FcFontMatch(config, pat, &result); - if (font) { - FcChar8* file = NULL; - if (FcPatternGetString(font, FC_FILE, 0, &file) == FcResultMatch) { - fontFile = (char*)file; - printf("%s\n",fontFile); - } - } else { - printf("Ops! I can't find any font!\n"); - } - FcPatternDestroy(pat); - return EXIT_SUCCESS; + FcInit(); + return 0; } diff --git a/recipes/fontconfig/meson/conanfile.py b/recipes/fontconfig/meson/conanfile.py index 550cc9984a1bb..95e3579f0f549 100644 --- a/recipes/fontconfig/meson/conanfile.py +++ b/recipes/fontconfig/meson/conanfile.py @@ -50,7 +50,7 @@ def layout(self): def requirements(self): self.requires("freetype/2.13.2") - self.requires("expat/2.5.0") + self.requires("expat/2.6.0") if self.settings.os == "Linux": self.requires("util-linux-libuuid/2.39.2") From 20afa4f7c2e81bd5a1ea4474ddedec70053168d1 Mon Sep 17 00:00:00 2001 From: sean <43609023+spnda@users.noreply.github.com> Date: Thu, 15 Feb 2024 06:27:46 +0100 Subject: [PATCH 023/405] (#22738) [fastgltf] Update to 0.7.0 * [fastgltf] Update to 0.7.0 * use cppstd to configure c++20 Signed-off-by: Uilian Ries * configure only since 0.7.0 Signed-off-by: Uilian Ries * Get compiler.cppstd --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries --- recipes/fastgltf/all/conandata.yml | 3 +++ recipes/fastgltf/all/conanfile.py | 9 +++++++-- recipes/fastgltf/all/test_package/CMakeLists.txt | 4 +++- recipes/fastgltf/all/test_package/test_package.cpp | 4 +++- recipes/fastgltf/config.yml | 2 ++ 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/recipes/fastgltf/all/conandata.yml b/recipes/fastgltf/all/conandata.yml index 7785359a1abd0..42f9e0fde5669 100644 --- a/recipes/fastgltf/all/conandata.yml +++ b/recipes/fastgltf/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.7.0": + url: "https://github.com/spnda/fastgltf/archive/refs/tags/v0.7.0.tar.gz" + sha256: "1d0af69db938fd81dd34ea51f99e37f0023852c93befe63e23f9e55abd4a18ec" "0.6.1": url: "https://github.com/spnda/fastgltf/archive/refs/tags/v0.6.1.tar.gz" sha256: "5f10b153ec941f5e6465425f542d3864f586aca040b0b659cb9ae70d42369390" diff --git a/recipes/fastgltf/all/conanfile.py b/recipes/fastgltf/all/conanfile.py index 9eda29e2b49eb..507a972f624fe 100644 --- a/recipes/fastgltf/all/conanfile.py +++ b/recipes/fastgltf/all/conanfile.py @@ -83,13 +83,16 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["FASTGLTF_DOWNLOAD_SIMDJSON"] = False + if Version(self.version) <= "0.7.0": + tc.variables["FASTGLTF_DOWNLOAD_SIMDJSON"] = False if self.options.enable_small_vector: - tc.variables["FASTGLTF_USE_SMALL_VECTOR"] = True + tc.variables["FASTGLTF_USE_CUSTOM_SMALLVECTOR"] = True if self.options.get_safe("disable_custom_memory_pool"): tc.variables["FASTGLTF_DISABLE_CUSTOM_MEMORY_POOL"] = True if self.options.get_safe("use_64bit_float"): tc.variables["FASTGLTF_USE_64BIT_FLOAT"] = True + if Version(self.version) >= "0.7.0": + tc.variables["FASTGLTF_COMPILE_AS_CPP20"] = "20" in str(self.settings.get_safe("compiler.cppstd")) tc.generate() deps = CMakeDeps(self) deps.generate() @@ -108,3 +111,5 @@ def package(self): def package_info(self): self.cpp_info.libs = ["fastgltf"] + if "20" in str(self.settings.get_safe("compiler.cppstd")): + self.cpp_info.defines.append("FASTGLTF_CPP_20") diff --git a/recipes/fastgltf/all/test_package/CMakeLists.txt b/recipes/fastgltf/all/test_package/CMakeLists.txt index 7718a933cdc53..b4c6d8669be8e 100644 --- a/recipes/fastgltf/all/test_package/CMakeLists.txt +++ b/recipes/fastgltf/all/test_package/CMakeLists.txt @@ -6,6 +6,8 @@ find_package(fastgltf REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE fastgltf::fastgltf) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) -if(fastgltf_VERSION VERSION_GREATER_EQUAL "0.5.0") +if(fastgltf_VERSION VERSION_GREATER_EQUAL "0.7.0") + target_compile_definitions(${PROJECT_NAME} PRIVATE FASTGLTF_0_7_0_LATER) +elseif(fastgltf_VERSION VERSION_GREATER_EQUAL "0.5.0") target_compile_definitions(${PROJECT_NAME} PRIVATE FASTGLTF_0_5_0_LATER) endif() diff --git a/recipes/fastgltf/all/test_package/test_package.cpp b/recipes/fastgltf/all/test_package/test_package.cpp index 1e9f5938b4446..b076f02e4cb70 100644 --- a/recipes/fastgltf/all/test_package/test_package.cpp +++ b/recipes/fastgltf/all/test_package/test_package.cpp @@ -1,5 +1,7 @@ #include -#ifdef FASTGLTF_0_5_0_LATER +#if defined(FASTGLTF_0_7_0_LATER) +# include +#elif defined(FASTGLTF_0_5_0_LATER) # include #else # include diff --git a/recipes/fastgltf/config.yml b/recipes/fastgltf/config.yml index 355c180a5e90b..2ea713dd46d98 100644 --- a/recipes/fastgltf/config.yml +++ b/recipes/fastgltf/config.yml @@ -1,4 +1,6 @@ versions: + "0.7.0": + folder: all "0.6.1": folder: all "0.5.0": From e84eaeaf6bbe0d843dd144c7a0ee78c34b6794bf Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 16 Feb 2024 01:08:48 +0900 Subject: [PATCH 024/405] (#22773) scnlib: add version 2.0.1 --- recipes/scnlib/all/conandata.yml | 7 +++++++ recipes/scnlib/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/scnlib/all/conandata.yml b/recipes/scnlib/all/conandata.yml index 28c026a4701a3..959e4c6aa3f22 100644 --- a/recipes/scnlib/all/conandata.yml +++ b/recipes/scnlib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.1": + url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v2.0.1.tar.gz" + sha256: "f399d1b1f36f5d53a2d63fd2974797ab8f3f7e69c424d9661253830cb793b72e" "2.0.0": url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v2.0.0.tar.gz" sha256: "2a35356a3a7485fdf97f28cfbea52db077cf4e7bab0a5a0fc3b04e89630334cd" @@ -12,6 +15,10 @@ sources: url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v1.0.tar.gz" sha256: "5b8333e522206c2a74e57a9c9544c4fe4e7858cfe93e216905b463eaf91af5fe" patches: + "2.0.1": + - patch_file: "patches/2.0.0-0001-remove-re2-version.patch" + patch_description: "remove re2 version on find_package" + patch_type: "portability" "2.0.0": - patch_file: "patches/2.0.0-0001-remove-re2-version.patch" patch_description: "remove re2 version on find_package" diff --git a/recipes/scnlib/config.yml b/recipes/scnlib/config.yml index 8d8acc5534543..8c5c4f8a7d9ec 100644 --- a/recipes/scnlib/config.yml +++ b/recipes/scnlib/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.1": + folder: all "2.0.0": folder: all "1.1.3": From 2f62321e5f969fc78ae8f8849d49e3deb03f8aea Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 16 Feb 2024 01:33:19 +0900 Subject: [PATCH 025/405] (#22774) cxxopts: add version 3.2.0 --- recipes/cxxopts/all/conandata.yml | 3 +++ recipes/cxxopts/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/cxxopts/all/conandata.yml b/recipes/cxxopts/all/conandata.yml index ed4fef59dd9bc..607b321614b3b 100644 --- a/recipes/cxxopts/all/conandata.yml +++ b/recipes/cxxopts/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.2.0": + url: "https://github.com/jarro2783/cxxopts/archive/refs/tags/v3.2.0.tar.gz" + sha256: "9f43fa972532e5df6c5fd5ad0f5bac606cdec541ccaf1732463d8070bbb7f03b" "3.1.1": url: "https://github.com/jarro2783/cxxopts/archive/refs/tags/v3.1.1.tar.gz" sha256: "523175f792eb0ff04f9e653c90746c12655f10cb70f1d5e6d6d9491420298a08" diff --git a/recipes/cxxopts/config.yml b/recipes/cxxopts/config.yml index 60f4de8e82260..eeafb07402ec8 100644 --- a/recipes/cxxopts/config.yml +++ b/recipes/cxxopts/config.yml @@ -1,4 +1,6 @@ versions: + "3.2.0": + folder: all "3.1.1": folder: all "3.0.0": From 70e656dafa69928ec981b26989a596e793193a31 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 16 Feb 2024 03:10:10 +0900 Subject: [PATCH 026/405] (#22779) imgui: add version 1.90.3 --- recipes/imgui/all/conandata.yml | 6 ++++++ recipes/imgui/config.yml | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/recipes/imgui/all/conandata.yml b/recipes/imgui/all/conandata.yml index 326ffeb754602..467e04fdf9e0f 100644 --- a/recipes/imgui/all/conandata.yml +++ b/recipes/imgui/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.90.3": + url: "https://github.com/ocornut/imgui/archive/v1.90.3.tar.gz" + sha256: "40b302d01092c9393373b372fe07ea33ac69e9491893ebab3bf952b2c1f5fd23" + "1.90.3-docking": + url: "https://github.com/ocornut/imgui/archive/v1.90.3-docking.tar.gz" + sha256: "ebd1da0f76a95a7a690f8a0dfa119e1c6da4eee40383e582fb75374792be0891" "1.90.2": url: "https://github.com/ocornut/imgui/archive/v1.90.2.tar.gz" sha256: "452d1c11e5c4b4dfcca272915644a65f1c076498e8318b141ca75cd30470dd68" diff --git a/recipes/imgui/config.yml b/recipes/imgui/config.yml index 86b810236bae7..40705063b856e 100644 --- a/recipes/imgui/config.yml +++ b/recipes/imgui/config.yml @@ -1,4 +1,8 @@ versions: + "1.90.3": + folder: all + "1.90.3-docking": + folder: all "1.90.2": folder: all "1.90.2-docking": From 77e11053c4f860b1c718ddcfaac5d7e35eeb2509 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 16 Feb 2024 17:10:02 +0900 Subject: [PATCH 027/405] (#22780) objectbox: add version 0.21.0 --- recipes/objectbox/all/conandata.yml | 17 ++++-- ...make.patch => 0.17.0-0001-fix-cmake.patch} | 0 .../all/patches/0.21.0-0001-fix-cmake.patch | 54 +++++++++++++++++++ recipes/objectbox/config.yml | 2 + 4 files changed, 68 insertions(+), 5 deletions(-) rename recipes/objectbox/all/patches/{0001-fix-cmake.patch => 0.17.0-0001-fix-cmake.patch} (100%) create mode 100644 recipes/objectbox/all/patches/0.21.0-0001-fix-cmake.patch diff --git a/recipes/objectbox/all/conandata.yml b/recipes/objectbox/all/conandata.yml index b4ebf9918d7ba..ca8ae614b9798 100644 --- a/recipes/objectbox/all/conandata.yml +++ b/recipes/objectbox/all/conandata.yml @@ -1,6 +1,9 @@ sources: # The release tarball is invalid, so we need to get the tarball from the v0.20.0 commit. # https://github.com/objectbox/objectbox-c/issues/38 + "0.21.0": + url: "https://github.com/objectbox/objectbox-c/archive/720559838e78a9fe6252c93ed1a3d46a1025767f.tar.gz" + sha256: "a2e7aa1d455a9703c49661515e820b4b296b6f53da7ab6b467b78776a29b0b93" "0.20.0": url: "https://github.com/objectbox/objectbox-c/archive/7e4a5a3ed94aa486acf0737b354726b493fd204c.tar.gz" sha256: "cb6ec8b7ceaed7963ad582c4519d06ddc887294f0893b3f9bf89e7d0789ce216" @@ -17,23 +20,27 @@ sources: url: "https://github.com/objectbox/objectbox-c/archive/refs/tags/v0.17.0.tar.gz" sha256: "3b936b3352ae0c8ea3706cc0a1790d2714a415cdce16007c2caca367ead5af8d" patches: + "0.21.0": + - patch_file: "patches/0.21.0-0001-fix-cmake.patch" + patch_description: "add sync option, disable tests/examples, support max length of windows path" + patch_type: "conan" "0.20.0": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/0.17.0-0001-fix-cmake.patch" patch_description: "add sync option, disable tests/examples, support max length of windows path" patch_type: "conan" "0.19.0": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/0.17.0-0001-fix-cmake.patch" patch_description: "add sync option, disable tests/examples, support max length of windows path" patch_type: "conan" "0.18.1": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/0.17.0-0001-fix-cmake.patch" patch_description: "add sync option, disable tests/examples, support max length of windows path" patch_type: "conan" "0.18.0": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/0.17.0-0001-fix-cmake.patch" patch_description: "add sync option, disable tests/examples, support max length of windows path" patch_type: "conan" "0.17.0": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/0.17.0-0001-fix-cmake.patch" patch_description: "add sync option, disable tests/examples, support max length of windows path" patch_type: "conan" diff --git a/recipes/objectbox/all/patches/0001-fix-cmake.patch b/recipes/objectbox/all/patches/0.17.0-0001-fix-cmake.patch similarity index 100% rename from recipes/objectbox/all/patches/0001-fix-cmake.patch rename to recipes/objectbox/all/patches/0.17.0-0001-fix-cmake.patch diff --git a/recipes/objectbox/all/patches/0.21.0-0001-fix-cmake.patch b/recipes/objectbox/all/patches/0.21.0-0001-fix-cmake.patch new file mode 100644 index 0000000000000..c5c0e8e9c4a85 --- /dev/null +++ b/recipes/objectbox/all/patches/0.21.0-0001-fix-cmake.patch @@ -0,0 +1,54 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8e826e0..d6a2e18 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,8 +20,13 @@ else () + function(defineObjectBoxLibForURL VARIANT DL_URL) + include(FetchContent) + project(objectbox${VARIANT}-download) +- FetchContent_Declare(${PROJECT_NAME} URL ${DL_URL}) +- ++ FetchContent_Declare(${PROJECT_NAME} ++ URL ${DL_URL} ++ # workaround for max path length in Windows (260byte) ++ SUBBUILD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/sub ++ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tmp ++ ) ++ + FetchContent_Populate(${PROJECT_NAME}) + set(DL_DIR "${${PROJECT_NAME}_SOURCE_DIR}") + message(STATUS "Pre-compiled ObjectBox library is saved in ${DL_DIR}") +@@ -35,6 +40,22 @@ else () + IMPORTED_IMPLIB ${DL_DIR}/lib/${CMAKE_IMPORT_LIBRARY_PREFIX}objectbox${CMAKE_IMPORT_LIBRARY_SUFFIX} + INTERFACE_INCLUDE_DIRECTORIES "${objectbox_include_dirs}" + ) ++ if(EXISTS "${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_SHARED_LIBRARY_SUFFIX}") ++ install( ++ FILES ${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_SHARED_LIBRARY_SUFFIX} ++ DESTINATION $,${CMAKE_INSTALL_BINDIR},${CMAKE_INSTALL_LIBDIR}> ++ ) ++ endif() ++ if(EXISTS "${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_IMPORT_LIBRARY_SUFFIX}") ++ install( ++ FILES ${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_IMPORT_LIBRARY_SUFFIX} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ) ++ endif() ++ install( ++ DIRECTORY ${DL_DIR}/include/ ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ++ ) + endfunction() + + function(defineObjectBoxLib VARIANT) +@@ -80,7 +101,9 @@ else () + defineObjectBoxLibForURL("" "${DL_URL}") + else () + defineObjectBoxLib("") +- defineObjectBoxLib("-sync") ++ if(OBJECTBOX_WITH_SYNC) ++ defineObjectBoxLib("-sync") ++ endif() + endif () + endif () + diff --git a/recipes/objectbox/config.yml b/recipes/objectbox/config.yml index 2fdec99a504b8..455f77377fdff 100644 --- a/recipes/objectbox/config.yml +++ b/recipes/objectbox/config.yml @@ -1,4 +1,6 @@ versions: + "0.21.0": + folder: all "0.20.0": folder: all "0.19.0": From 8f62df835a07d1a4309b37922f5134b445f92994 Mon Sep 17 00:00:00 2001 From: Philippe Lieser Date: Fri, 16 Feb 2024 10:23:12 +0100 Subject: [PATCH 028/405] (#18079) Adding Botan 3.0.0 recipe and make it compatible with Conan 2.x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * adding Botan 3.0.0 recipe * updated to conan 2 * ci lint fix * ci lint fix * ci lint fix * replacing version check * some more fixes to be ready for 2.0 * fixes * Keep old test package for Conan 1.x * Order imports * Remove unused import * Fix packaging * Fix msvc build and test * Use Version helper in package_info * Small fixes * Don't add -fPIC for msvc * Fix msvc package info for Botan 3.0.0 * Add missing patch_description and patch_type * Revert back to "sources" name for src folder * Try fixing KB-H010 for Conan 1 * Remove base_path for patches and switch again to `src` for src folder * Don't import from conan.tools.microsoft.subsystems * Fix KB-H010 by using double quotes https://github.com/conan-io/hooks/issues/448 * Disable getentropy * Move layout method * Add check for minimal compiler version * Fix getting env variables * Remove some older Botan versions * Fix removal of old versions * Replace apple_deployment_target_flag with apple_min_version_flag * Disable getrandom * Set 11.2 as minimal GCC * Set C++ standard in test package according to Botan version * Add min version for apple-clang * Remove redundant cpp_info.names["pkg_config"] * Use leading _ for member variable extra_cxxflags * Readd comment * Further improvements * Support for the OpenSSL provider was removed in Botan 2.19.2 * Add support for tools.build:sysroot * add a patch to support getrandome() in glibc < 2.25 * add Botan 3.1.0 and 3.1.1 * add Botan 3.2.0 * Botan 2.x is not compatible with OpenSSL 3.x * pin to specific OpenSSL version (1.1.1s) * FIX: warnings KB-H043 and KB-H077 * don't explicitly disable getrandom/getentropy on Linux * Apply suggestions from code review Co-authored-by: Uilian Ries * add patch sources to patches * Apply suggestions from code review Co-authored-by: Uilian Ries * FIX: linter warnings * FIX: default of CXXFLAGS * update recipe's meta data * use self.dependencies['boost'].options * add -o disable_modules * Workaround to support glibc < 2.25 This can (and should) be removed once CCI's CI images are updated with a newer glibc. * Apply suggestions from code review Co-authored-by: Uilian Ries --------- Co-authored-by: Maaown (Leonard Viktor Pooch) Co-authored-by: memsharded Co-authored-by: Rubén Rincón Co-authored-by: Rene Meusel Co-authored-by: René Meusel Co-authored-by: Uilian Ries --- recipes/botan/all/conandata.yml | 69 +++-- recipes/botan/all/conanfile.py | 236 ++++++++++++------ ...kport-getrandom-via-syscall-to-3.0.0.patch | 24 ++ ...kport-getrandom-via-syscall-to-3.1.0.patch | 24 ++ recipes/botan/all/patches/dll-dir.patch | 13 - .../fix-unrecognized-linker-flag.patch | 17 -- .../all/patches/vs2015-install-fix.patch | 56 ----- recipes/botan/all/test_package/CMakeLists.txt | 12 +- recipes/botan/all/test_package/conanfile.py | 25 +- .../botan/all/test_v1_package/CMakeLists.txt | 15 ++ .../botan/all/test_v1_package/conanfile.py | 17 ++ .../all/test_v1_package/test_package.cpp | 7 + recipes/botan/config.yml | 28 +-- 13 files changed, 315 insertions(+), 228 deletions(-) create mode 100644 recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.0.0.patch create mode 100644 recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.1.0.patch delete mode 100644 recipes/botan/all/patches/dll-dir.patch delete mode 100644 recipes/botan/all/patches/fix-unrecognized-linker-flag.patch delete mode 100644 recipes/botan/all/patches/vs2015-install-fix.patch create mode 100644 recipes/botan/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/botan/all/test_v1_package/conanfile.py create mode 100644 recipes/botan/all/test_v1_package/test_package.cpp diff --git a/recipes/botan/all/conandata.yml b/recipes/botan/all/conandata.yml index b4fd5502f1bd3..8bc337e6d41ee 100644 --- a/recipes/botan/all/conandata.yml +++ b/recipes/botan/all/conandata.yml @@ -1,37 +1,7 @@ sources: - "2.12.1": - url: "https://github.com/randombit/botan/archive/2.12.1.tar.gz" - sha256: "61d27332f053b0b1169659dc0fceb7de7d16cade230df3a14dfaa2c091888b98" - "2.13.0": - url: "https://github.com/randombit/botan/archive/2.13.0.tar.gz" - sha256: "29a57d8efd6ab297eab67cbf489a5a423b06e120e0520aff2583074e8aea151c" - "2.14.0": - url: "https://github.com/randombit/botan/archive/2.14.0.tar.gz" - sha256: "38e34b8ef7652e811382744425b82da1b1a7fb5f14cc281a7d3a18543eaf72f7" - "2.15.0": - url: "https://github.com/randombit/botan/archive/2.15.0.tar.gz" - sha256: "9a86b1a8adbac37fdff9cf5745b3a313020c33579d8fc51cb996c47d3adf5585" - "2.16.0": - url: "https://github.com/randombit/botan/archive/2.16.0.tar.gz" - sha256: "8f448b97120e884d755b946045753876d688b01f48f5e6a1cf37aebd5afecbe5" - "2.17.0": - url: "https://github.com/randombit/botan/archive/2.17.0.tar.gz" - sha256: "32874e4e14bf11428e1bc4919e5ee174a68e2f480d37bc79ed015b2b5ef87fef" - "2.17.1": - url: "https://github.com/randombit/botan/archive/2.17.1.tar.gz" - sha256: "ca562c00e61663c418bd9fdc6c70bdeaedafba8bef328cb6046a1d6390d39a71" - "2.17.2": - url: "https://github.com/randombit/botan/archive/2.17.2.tar.gz" - sha256: "3d99da64573abab6d6e8036a45f8c567a57721c8f23850e05aadd84fc2e0075c" "2.17.3": url: "https://github.com/randombit/botan/archive/2.17.3.tar.gz" sha256: "544c62e43be0c60fff7ac8707ee99fe134c75bef06bded217d04f0a4b333519a" - "2.18.0": - url: "https://github.com/randombit/botan/archive/2.18.0.tar.gz" - sha256: "8556991402f9ecf5f84f1f2c4de20ca3fd14a5ebd775f065ea6676b36646a77d" - "2.18.1": - url: "https://github.com/randombit/botan/archive/2.18.1.tar.gz" - sha256: "4afebf2dbfa2f047d161437dcc544003d5822f47ceac97ada6a24948297bd3ed" "2.18.2": url: "https://github.com/randombit/botan/archive/2.18.2.tar.gz" sha256: "10ded69c4fd4ade9d87527b394787beefa190b4ecb65ed04535bdd00e088cd96" @@ -44,15 +14,36 @@ sources: "2.19.3": url: "https://github.com/randombit/botan/archive/2.19.3.tar.gz" sha256: "8f568bf74c2e476d92ac8a1cfc2ba8407ec038fe9458bd0a11e7da827a9b8199" + "3.0.0": + url: "https://github.com/randombit/botan/archive/3.0.0.tar.gz" + sha256: "8bafe2e965fa9ccf92ef5741165d735c9fbbe6376c373bbf5702495ad2dfb814" + "3.1.0": + url: "https://github.com/randombit/botan/archive/3.1.0.tar.gz" + sha256: "f3680ab11122e581ac08993f149bf519030c7be13b32f5ac1e6bef0a2e6bb88e" + "3.1.1": + url: "https://github.com/randombit/botan/archive/3.1.1.tar.gz" + sha256: "2d0af0c3a7140572f3f7f1a22865f9c5eadc102a7fa58f03314709b0bee26c11" + "3.2.0": + url: "https://github.com/randombit/botan/archive/3.2.0.tar.gz" + sha256: "95af4935d56973000bb6ff20bb54ae56083f8764d5a2c89826cac26ac6127330" patches: - "2.12.1": - - patch_file: "patches/dll-dir.patch" - base_path: "sources" - - patch_file: "patches/fix-unrecognized-linker-flag.patch" - base_path: "sources" - "2.17.2": - - patch_file: "patches/vs2015-install-fix.patch" - base_path: "sources" "2.18.2": - patch_file: "patches/fix-amalgamation-build.patch" - base_path: "sources" + patch_description: "Backport a fix for amalgamation build" + patch_type: "bugfix" + patch_source: "https://github.com/randombit/botan/pull/2835" + "3.0.0": + - patch_file: "patches/backport-getrandom-via-syscall-to-3.0.0.patch" + patch_description: "Backport a fix to support getrandom() with glibc < 2.25" + patch_type: "portability" + patch_source: "https://github.com/randombit/botan/pull/3688" + "3.1.0": + - patch_file: "patches/backport-getrandom-via-syscall-to-3.1.0.patch" + patch_description: "Backport a fix to support getrandom() with glibc < 2.25" + patch_type: "portability" + patch_source: "https://github.com/randombit/botan/pull/3688" + "3.1.1": + - patch_file: "patches/backport-getrandom-via-syscall-to-3.1.0.patch" + patch_description: "Backport a fix to support getrandom() with glibc < 2.25" + patch_type: "portability" + patch_source: "https://github.com/randombit/botan/pull/3688" diff --git a/recipes/botan/all/conanfile.py b/recipes/botan/all/conanfile.py index e8599f32dde75..ce2b978ddda1d 100644 --- a/recipes/botan/all/conanfile.py +++ b/recipes/botan/all/conanfile.py @@ -1,9 +1,21 @@ -from conan.tools.microsoft import is_msvc, msvc_runtime_flag -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration import os +import shutil +import platform -required_conan_version = ">=1.45.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name, XCRun +from conan.tools.build import build_jobs, check_min_cppstd +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get +from conan.tools.gnu import AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, msvc_runtime_flag, VCVars, check_min_vs +from conan.tools.microsoft import unix_path +from conan.tools.scm import Version + + +required_conan_version = ">=1.55" class BotanConan(ConanFile): @@ -11,9 +23,10 @@ class BotanConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/randombit/botan" license = "BSD-2-Clause" - description = "Botan is a cryptography library written in C++11." - topics = ("cryptography", "crypto", "C++11", "tls") + description = "Botan is a cryptography library written in modern C++." + topics = ("cryptography", "crypto", "c++11", "c++20", "tls") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -39,8 +52,9 @@ class BotanConan(ConanFile): "with_neon": [True, False], "with_armv8crypto": [True, False], "with_powercrypto": [True, False], - "enable_modules": "ANY", - "system_cert_bundle": "ANY", + "enable_modules": [None, "ANY"], + "disable_modules": [None, "ANY"], + "system_cert_bundle": [None, "ANY"], "module_policy": [None, "bsi", "modern", "nist"], } default_options = { @@ -68,10 +82,13 @@ class BotanConan(ConanFile): "with_armv8crypto": True, "with_powercrypto": True, "enable_modules": None, + "disable_modules": None, "system_cert_bundle": None, "module_policy": None, } + _extra_cxxflags = None + @property def _is_x86(self): return str(self.settings.arch) in ['x86', 'x86_64'] @@ -84,14 +101,8 @@ def _is_ppc(self): def _is_arm(self): return 'arm' in str(self.settings.arch) - @property - def _source_subfolder(self): - # Required to build at least 2.12.1 - return "sources" - def export_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) def config_options(self): if self.settings.os == 'Windows': @@ -117,84 +128,149 @@ def config_options(self): # --single-amalgamation option is no longer available # See also https://github.com/randombit/botan/pull/2246 - if tools.Version(self.version) >= '2.14.0': + if Version(self.version) >= '2.14.0': del self.options.single_amalgamation + # Support for the OpenSSL provider was removed in 2.19.2 + if Version(self.version) >= '2.19.2': + del self.options.with_openssl + def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") def requirements(self): if self.options.with_bzip2: self.requires("bzip2/1.0.8") - if self.options.with_openssl: - self.requires("openssl/1.1.1o") + if self.options.get_safe('with_openssl', False): + self.requires("openssl/[>=1.1 <3]") if self.options.with_zlib: - self.requires("zlib/1.2.12") + self.requires("zlib/[>=1.2.11 <2]") if self.options.with_sqlite3: self.requires("sqlite3/3.38.5") if self.options.with_boost: - self.requires("boost/1.79.0") + self.requires("boost/1.83.0") @property def _required_boost_components(self): return ['coroutine', 'system'] + @property + def _min_cppstd(self): + # From the same links as below + return 11 if Version(self.version) < "3.0.0" else 20 + + @property + def _compilers_minimum_version(self): + if Version(self.version).major < 3: + # From https://github.com/randombit/botan/blob/2.19.3/doc/support.rst + return { + "gcc": "4.8", + "clang": "3.5", + "Visual Studio": "14", + "msvc": "190", + } + else: + # From https://github.com/randombit/botan/blob/master/doc/support.rst + return { + "gcc": "11.2", + "clang": "14", + "apple-clang": "14", + "Visual Studio": "17", + "msvc": "193", + } + def validate(self): if self.options.with_boost: - miss_boost_required_comp = any(getattr(self.options['boost'], 'without_{}'.format(boost_comp), True) for boost_comp in self._required_boost_components) - if self.options['boost'].header_only or self.options['boost'].shared or self.options['boost'].magic_autolink or miss_boost_required_comp: - raise ConanInvalidConfiguration('{0} requires non-header-only static boost, without magic_autolink, and with these components: {1}'.format(self.name, ', '.join(self._required_boost_components))) + boost_opts = self.dependencies['boost'].options + miss_boost_required_comp = any(getattr(boost_opts, 'without_{}'.format(boost_comp), True) for boost_comp in self._required_boost_components) + if boost_opts.header_only or boost_opts.shared or boost_opts.magic_autolink or miss_boost_required_comp: + raise ConanInvalidConfiguration( + f"{self.name} requires non-header-only static boost, " + f"without magic_autolink, and with these components: {', '.join(self._required_boost_components)}") + if self.settings.get_safe("compiler.cppstd"): + check_min_cppstd(self, self._min_cppstd) compiler = self.settings.compiler - version = tools.Version(self.settings.compiler.version) + compiler_name = str(compiler) + compiler_version = Version(compiler.version) - if compiler == 'Visual Studio' and version < '14': - raise ConanInvalidConfiguration("Botan doesn't support MSVC < 14") + check_min_vs(self, self._compilers_minimum_version["msvc"]) + if not is_msvc(self): + minimum_version = self._compilers_minimum_version.get(compiler_name, False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + if not minimum_version: + self.output.warning(f"{self.name} recipe lacks information about the {compiler_name} compiler support.") - elif compiler == 'gcc' and version >= '5' and compiler.libcxx != 'libstdc++11': + if self.settings.compiler == 'gcc' and compiler_version >= "5" and self.settings.compiler.libcxx != 'libstdc++11': raise ConanInvalidConfiguration( 'Using Botan with GCC >= 5 on Linux requires "compiler.libcxx=libstdc++11"') - elif compiler == 'clang' and compiler.libcxx not in ['libstdc++11', 'libc++']: + if self.settings.compiler == 'clang' and self.settings.compiler.libcxx not in ['libstdc++11', 'libc++']: raise ConanInvalidConfiguration( 'Using Botan with Clang on Linux requires either "compiler.libcxx=libstdc++11" ' \ 'or "compiler.libcxx=libc++"') # Some older compilers cannot handle the amalgamated build anymore # See also https://github.com/randombit/botan/issues/2328 - if tools.Version(self.version) >= '2.14.0' and self.options.amalgamation: - if (compiler == 'apple-clang' and version < '10') or \ - (compiler == 'gcc' and version < '8') or \ - (compiler == 'clang' and version < '7'): + if Version(self.version) >= '2.14.0' and self.options.amalgamation: + if (self.settings.compiler == 'apple-clang' and compiler_version < '10') or \ + (self.settings.compiler == 'gcc' and compiler_version < '8') or \ + (self.settings.compiler == 'clang' and compiler_version < '7'): raise ConanInvalidConfiguration( - 'botan amalgamation is not supported for {}/{}'.format(compiler, version)) + f"botan amalgamation is not supported for {compiler}/{compiler_version}") if self.options.get_safe("single_amalgamation", False) and not self.options.amalgamation: raise ConanInvalidConfiguration("botan:single_amalgamation=True requires botan:amalgamation=True") + def layout(self): + basic_layout(self, src_folder="src") + def source(self): - tools.get(**self.conan_data['sources'][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + @property + def _cxxflags(self): + global_cxxflags = " ".join(self.conf.get("tools.build:cxxflags", default=[], check_type=list)) + env_cxxflags = VirtualBuildEnv(self).vars().get("CXXFLAGS", default="") + cxxflags = f"{env_cxxflags} {global_cxxflags}".strip() + return cxxflags if len(cxxflags) > 1 else None + + def generate(self): + if is_msvc(self): + ms = VCVars(self) + ms.generate() + + # This is to work around botan's configure script that *replaces* its + # standard (platform dependent) flags in presence of an environment + # variable ${CXXFLAGS}. Most notably, this would build botan with + # disabled compiler optimizations. + self._extra_cxxflags = self._cxxflags + self.buildenv.unset('CXXFLAGS') + VirtualBuildEnv(self).generate() def build(self): - for patch in self.conan_data.get('patches', {}).get(self.version, []): - tools.patch(**patch) - with tools.chdir(self._source_subfolder): + apply_conandata_patches(self) + with chdir(self, self.source_folder): self.run(self._configure_cmd) self.run(self._make_cmd) def package(self): - self.copy(pattern='license.txt', dst='licenses', src=self._source_subfolder) - with tools.chdir(self._source_subfolder): + copy(self, "license.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + with chdir(self, self.source_folder): + # Note: this will fail to properly consider the package_folder if a "conan build" followed by a "conan export-pkg" is executed self.run(self._make_install_cmd) + fix_apple_shared_install_name(self) def package_info(self): - major_version = tools.Version(self.version).major + major_version = Version(self.version).major self.cpp_info.set_property("pkg_config_name", f"botan-{major_version}") - self.cpp_info.names["pkg_config"] = f"botan-{major_version}" - self.cpp_info.libs = ["botan" if is_msvc(self) else f"botan-{major_version}"] + self.cpp_info.libs = ["botan" if is_msvc(self) and major_version < 3 else f"botan-{major_version}"] if self.settings.os == 'Linux': - self.cpp_info.system_libs.extend(['dl', 'rt', 'pthread']) + self.cpp_info.system_libs.extend(['dl', 'rt', 'pthread', 'm']) if self.settings.os == 'Macos': self.cpp_info.frameworks = ['Security', 'CoreFoundation'] if self.settings.os == 'Windows': @@ -220,10 +296,10 @@ def _botan_os(self): def _dependency_build_flags(self, dependency): # Since botan has a custom build system, we need to specifically inject # these build parameters so that it picks up the correct dependencies. - dep_cpp_info = self.deps_cpp_info[dependency] + dep_cpp_info = self.dependencies[dependency].cpp_info return \ - ['--with-external-includedir={}'.format(include_path) for include_path in dep_cpp_info.include_paths] + \ - ['--with-external-libdir={}'.format(lib_path) for lib_path in dep_cpp_info.lib_paths] + \ + ['--with-external-includedir={}'.format(include_path) for include_path in dep_cpp_info.includedirs] + \ + ['--with-external-libdir={}'.format(lib_path) for lib_path in dep_cpp_info.libdirs] + \ ['--define-build-macro={}'.format(define) for define in dep_cpp_info.defines] @property @@ -256,34 +332,27 @@ def _configure_cmd(self): elif self.settings.arch in ['x86_64']: botan_abi_flags.append('-arch x86_64') - if self.options.get_safe('fPIC', True): + if self.options.get_safe('fPIC', True) and not is_msvc(self): botan_extra_cxx_flags.append('-fPIC') - if tools.is_apple_os(self.settings.os): + if is_apple_os(self): if self.settings.get_safe('os.version'): # Required, see https://github.com/conan-io/conan-center-index/pull/3456 - macos_min_version = tools.apple_deployment_target_flag(self.settings.os, - self.settings.get_safe('os.version'), - self.settings.get_safe('os.sdk'), - self.settings.get_safe('os.subsystem'), - self.settings.get_safe('arch')) + macos_min_version = macos_min_version = AutotoolsToolchain(self).apple_min_version_flag botan_extra_cxx_flags.append(macos_min_version) - macos_sdk_path = '-isysroot {}'.format(tools.XCRun(self.settings).sdk_path) + macos_sdk_path = '-isysroot {}'.format(XCRun(self).sdk_path) botan_extra_cxx_flags.append(macos_sdk_path) - # This is to work around botan's configure script that *replaces* its - # standard (platform dependent) flags in presence of an environment - # variable ${CXXFLAGS}. Most notably, this would build botan with - # disabled compiler optimizations. - environment_cxxflags = tools.get_env('CXXFLAGS') - if environment_cxxflags: - del os.environ['CXXFLAGS'] - botan_extra_cxx_flags.append(environment_cxxflags) + if self._extra_cxxflags: + botan_extra_cxx_flags.append(self._extra_cxxflags) if self.options.enable_modules: build_flags.append('--minimized-build') build_flags.append('--enable-modules={}'.format(self.options.enable_modules)) + if self.options.disable_modules: + build_flags.append('--disable-modules={}'.format(self.options.disable_modules)) + if self.options.amalgamation: build_flags.append('--amalgamation') @@ -293,11 +362,14 @@ def _configure_cmd(self): if self.options.system_cert_bundle: build_flags.append('--system-cert-bundle={}'.format(self.options.system_cert_bundle)) + if self.conf.get("tools.build:sysroot"): + build_flags.append(f'--with-sysroot-dir={self.conf.get("tools.build:sysroot")}') + if self.options.with_bzip2: build_flags.append('--with-bzip2') build_flags.extend(self._dependency_build_flags('bzip2')) - if self.options.with_openssl: + if self.options.get_safe('with_openssl', False): build_flags.append('--with-openssl') build_flags.extend(self._dependency_build_flags('openssl')) @@ -375,11 +447,17 @@ def _configure_cmd(self): if is_msvc(self): build_flags.append(f"--msvc-runtime={msvc_runtime_flag(self)}") + if self._is_glibc_older_than_2_25_on_linux and Version(self.version) >= '3.0': + # INFO: Botan 3.0+ requires glibc >= 2.25. Disable features to make it backward compatible + # FIXME: CCI Docker images are running Ubuntu 16.04. Remove it after supporting later version. + self.output.warning("Disabling usage of getentropy(), getrandom(), and explicit_bzero() due to old glibc version") + build_flags.append('--without-os-features=getentropy,getrandom,explicit_bzero') + build_flags.append('--without-pkg-config') call_python = 'python' if self.settings.os == 'Windows' else '' - prefix = tools.unix_path(self.package_folder) if self._is_mingw_windows else self.package_folder + prefix = unix_path(self, self.package_folder) if self._is_mingw_windows else self.package_folder botan_abi = ' '.join(botan_abi_flags) if botan_abi_flags else ' ' botan_cxx_extras = ' '.join(botan_extra_cxx_flags) if botan_extra_cxx_flags else ' ' @@ -413,27 +491,23 @@ def _make_cmd(self): @property def _make_program(self): - return tools.get_env('CONAN_MAKE_PROGRAM', tools.which('make') or tools.which('mingw32-make')) + return self.conf.get("tools.gnu:make_program", os.getenv('CONAN_MAKE_PROGRAM', shutil.which('make') or shutil.which('mingw32-make'))) @property def _gnumake_cmd(self): make_ldflags = 'LDFLAGS=-lc++abi' if self._is_linux_clang_libcxx else '' - make_cmd = ('{ldflags}' ' {make}' ' -j{cpucount}').format( - ldflags=make_ldflags, make=self._make_program, cpucount=tools.cpu_count()) + make_cmd = f"{make_ldflags} {self._make_program} -j{build_jobs(self)}" return make_cmd @property def _nmake_cmd(self): - vcvars = tools.vcvars_command(self.settings) - make_cmd = vcvars + ' && nmake' - return make_cmd + return 'nmake' @property def _make_install_cmd(self): if is_msvc(self): - vcvars = tools.vcvars_command(self.settings) - make_install_cmd = vcvars + ' && nmake install' + make_install_cmd = '{make} install'.format(make=self._nmake_cmd) else: make_install_cmd = '{make} install'.format(make=self._make_program) return make_install_cmd @@ -445,3 +519,19 @@ def _is_linux_clang_libcxx(self): self.settings.compiler == 'clang' and self.settings.compiler.libcxx == 'libc++' ) + + @property + def _is_glibc_older_than_2_25_on_linux(self): + # FIXME: glibc below 2.25 lacks support for certain syscalls that botan assumes + # to be present. Once CCI updated their CI images and provides a newer + # glibc, we can (and should) remove this workaround. + # + # https://github.com/conan-io/conan-center-index/pull/18079#issuecomment-1919206949 + # https://github.com/conan-io/conan-center-index/pull/18079#issuecomment-1919486839 + + libver = platform.libc_ver() + return ( + self.settings.os == 'Linux' and + libver[0] == 'glibc' and + Version(libver[1]) < '2.25' + ) diff --git a/recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.0.0.patch b/recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.0.0.patch new file mode 100644 index 0000000000000..54f8088a3d1e3 --- /dev/null +++ b/recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.0.0.patch @@ -0,0 +1,24 @@ +diff --git a/src/lib/rng/system_rng/system_rng.cpp b/src/lib/rng/system_rng/system_rng.cpp +index 8a24ed9f6..45af0c507 100644 +--- a/src/lib/rng/system_rng/system_rng.cpp ++++ b/src/lib/rng/system_rng/system_rng.cpp +@@ -25,6 +25,7 @@ + #include + #elif defined(BOTAN_TARGET_OS_HAS_GETRANDOM) + #include ++ #include + #include + #elif defined(BOTAN_TARGET_OS_HAS_DEV_RANDOM) + #include +@@ -216,7 +217,11 @@ class System_RNG_Impl final : public RandomNumberGenerator + size_t len = output.size(); + while(len > 0) + { ++#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 25 ++ const ssize_t got = ::syscall(SYS_getrandom, buf, len, flags); ++#else + const ssize_t got = ::getrandom(buf, len, flags); ++#endif + + if(got < 0) + { diff --git a/recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.1.0.patch b/recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.1.0.patch new file mode 100644 index 0000000000000..dd376536584eb --- /dev/null +++ b/recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.1.0.patch @@ -0,0 +1,24 @@ +diff --git a/src/lib/rng/system_rng/system_rng.cpp b/src/lib/rng/system_rng/system_rng.cpp +index b42ea5543..dcff78931 100644 +--- a/src/lib/rng/system_rng/system_rng.cpp ++++ b/src/lib/rng/system_rng/system_rng.cpp +@@ -26,6 +26,7 @@ + #elif defined(BOTAN_TARGET_OS_HAS_GETRANDOM) + #include + #include ++ #include + #elif defined(BOTAN_TARGET_OS_HAS_DEV_RANDOM) + #include + #include +@@ -211,7 +212,11 @@ class System_RNG_Impl final : public RandomNumberGenerator { + uint8_t* buf = output.data(); + size_t len = output.size(); + while(len > 0) { ++ #if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 25 ++ const ssize_t got = ::syscall(SYS_getrandom, buf, len, flags); ++ #else + const ssize_t got = ::getrandom(buf, len, flags); ++ #endif + + if(got < 0) { + if(errno == EINTR) { diff --git a/recipes/botan/all/patches/dll-dir.patch b/recipes/botan/all/patches/dll-dir.patch deleted file mode 100644 index d0cda481f6695..0000000000000 --- a/recipes/botan/all/patches/dll-dir.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/scripts/install.py b/src/scripts/install.py -index 4cbce5a8e..ed6fe897f 100755 ---- a/src/scripts/install.py -+++ b/src/scripts/install.py -@@ -191,7 +191,7 @@ def main(args): - libname = cfg['libname'] - soname_base = libname + '.dll' - copy_executable(os.path.join(out_dir, soname_base), -- prepend_destdir(os.path.join(lib_dir, soname_base))) -+ prepend_destdir(os.path.join(bin_dir, soname_base))) - else: - soname_patch = cfg['soname_patch'] - soname_abi = cfg['soname_abi'] diff --git a/recipes/botan/all/patches/fix-unrecognized-linker-flag.patch b/recipes/botan/all/patches/fix-unrecognized-linker-flag.patch deleted file mode 100644 index d70cce86690b9..0000000000000 --- a/recipes/botan/all/patches/fix-unrecognized-linker-flag.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/configure.py b/configure.py -index 8b413db57..46331e78c 100755 ---- a/configure.py -+++ b/configure.py -@@ -2147,6 +2147,12 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch, - 'mod_list': sorted([m.basename for m in modules]) - } - -+ if cc.basename == 'msvc' and variables['cxx_abi_flags'] != '': -+ # MSVC linker doesn't support/need the ABI options, -+ # just transfer them over to just the compiler invocations -+ variables['cc_compile_flags'] = '%s %s' % (variables['cxx_abi_flags'], variables['cc_compile_flags']) -+ variables['cxx_abi_flags'] = '' -+ - variables['lib_flags'] = cc.gen_lib_flags(options, variables) - variables['cmake_lib_flags'] = cmake_escape(variables['lib_flags']) - diff --git a/recipes/botan/all/patches/vs2015-install-fix.patch b/recipes/botan/all/patches/vs2015-install-fix.patch deleted file mode 100644 index c53e1a6c17844..0000000000000 --- a/recipes/botan/all/patches/vs2015-install-fix.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 42317bbcc7fe715b0a9f066bb52ed3c59dcc257e Mon Sep 17 00:00:00 2001 -From: Hannes Rantzsch -Date: Tue, 1 Dec 2020 09:40:38 +0100 -Subject: [PATCH] Backport a fix for a build issue in VS 2015 - -See https://github.com/randombit/botan/pull/2526 for details ---- - configure.py | 2 +- - src/build-data/makefile.in | 10 +++++----- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/configure.py b/configure.py -index 88eeaa575..f7affad72 100755 ---- a/configure.py -+++ b/configure.py -@@ -1994,7 +1994,7 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch, - def choose_python_exe(): - exe = sys.executable - -- if exe[1] == ':': # Windows style paths -+ if options.os == 'mingw': # mingw doesn't handle the backslashes in the absolute path well - return exe.replace('\\', '/') - - return exe -diff --git a/src/build-data/makefile.in b/src/build-data/makefile.in -index 4d68ab1ec..b215bebb5 100644 ---- a/src/build-data/makefile.in -+++ b/src/build-data/makefile.in -@@ -48,19 +48,19 @@ docs: %{doc_stamp_file} - %{endif} - - %{doc_stamp_file}: %{doc_dir}/*.rst %{doc_dir}/api_ref/*.rst %{doc_dir}/dev_ref/*.rst -- $(PYTHON_EXE) $(SCRIPTS_DIR)/build_docs.py --build-dir="%{build_dir}" -+ "$(PYTHON_EXE)" "$(SCRIPTS_DIR)/build_docs.py" --build-dir="%{build_dir}" - - clean: -- $(PYTHON_EXE) $(SCRIPTS_DIR)/cleanup.py --build-dir="%{build_dir}" -+ "$(PYTHON_EXE)" "$(SCRIPTS_DIR)/cleanup.py" --build-dir="%{build_dir}" - - distclean: -- $(PYTHON_EXE) $(SCRIPTS_DIR)/cleanup.py --build-dir="%{build_dir}" --distclean -+ "$(PYTHON_EXE)" "$(SCRIPTS_DIR)/cleanup.py" --build-dir="%{build_dir}" --distclean - - install: %{install_targets} -- $(PYTHON_EXE) $(SCRIPTS_DIR)/install.py --prefix="%{prefix}" --build-dir="%{build_dir}" --bindir=%{bindir} --libdir=%{libdir} --docdir=%{docdir} --includedir=%{includedir} -+ "$(PYTHON_EXE)" "$(SCRIPTS_DIR)/install.py" --prefix="%{prefix}" --build-dir="%{build_dir}" --bindir="%{bindir}" --libdir="%{libdir}" --docdir="%{docdir}" --includedir="%{includedir}" - - check: tests -- $(PYTHON_EXE) $(SCRIPTS_DIR)/check.py --build-dir="%{build_dir}" -+ "$(PYTHON_EXE)" "$(SCRIPTS_DIR)/check.py" --build-dir="%{build_dir}" - - # Object Files - LIBOBJS = %{join lib_objs} --- -2.29.2 - diff --git a/recipes/botan/all/test_package/CMakeLists.txt b/recipes/botan/all/test_package/CMakeLists.txt index 5021b4e27691a..65e374a2711cc 100644 --- a/recipes/botan/all/test_package/CMakeLists.txt +++ b/recipes/botan/all/test_package/CMakeLists.txt @@ -1,11 +1,13 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +project(test_package CXX) find_package(botan REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} botan::botan) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) +if(botan_VERSION_STRING VERSION_LESS "3.0.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) +endif() diff --git a/recipes/botan/all/test_package/conanfile.py b/recipes/botan/all/test_package/conanfile.py index f4b0754b85efb..82bdc745af784 100644 --- a/recipes/botan/all/test_package/conanfile.py +++ b/recipes/botan/all/test_package/conanfile.py @@ -1,10 +1,25 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +from conan.tools.microsoft import is_msvc, VCVars import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def generate(self): + if is_msvc(self): + ms = VCVars(self) + ms.generate() def build(self): cmake = CMake(self) @@ -12,6 +27,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self, skip_x64_x86=True): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.build_folder, self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/botan/all/test_v1_package/CMakeLists.txt b/recipes/botan/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..50dcf4911579b --- /dev/null +++ b/recipes/botan/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +find_package(botan REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} botan::botan) +if(botan_VERSION_STRING VERSION_LESS "3.0.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) +endif() diff --git a/recipes/botan/all/test_v1_package/conanfile.py b/recipes/botan/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..f4b0754b85efb --- /dev/null +++ b/recipes/botan/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self, skip_x64_x86=True): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/botan/all/test_v1_package/test_package.cpp b/recipes/botan/all/test_v1_package/test_package.cpp new file mode 100644 index 0000000000000..d8ace17201cc0 --- /dev/null +++ b/recipes/botan/all/test_v1_package/test_package.cpp @@ -0,0 +1,7 @@ +#include + +int main() +{ + std::vector key = Botan::hex_decode("000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F"); + return 0; +} diff --git a/recipes/botan/config.yml b/recipes/botan/config.yml index 7fdc77ee53c3b..aada9ec401094 100644 --- a/recipes/botan/config.yml +++ b/recipes/botan/config.yml @@ -1,26 +1,6 @@ versions: - "2.12.1": - folder: all - "2.13.0": - folder: all - "2.14.0": - folder: all - "2.15.0": - folder: all - "2.16.0": - folder: all - "2.17.0": - folder: all - "2.17.1": - folder: all - "2.17.2": - folder: all "2.17.3": folder: all - "2.18.0": - folder: all - "2.18.1": - folder: all "2.18.2": folder: all "2.19.1": @@ -29,3 +9,11 @@ versions: folder: all "2.19.3": folder: all + "3.0.0": + folder: all + "3.1.0": + folder: all + "3.1.1": + folder: all + "3.2.0": + folder: all From 1c4fc7d6fa6af1e238c9f4a783d5c62fe7601108 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 16 Feb 2024 22:08:16 +0900 Subject: [PATCH 029/405] (#22691) libucl: add version 0.9.0 * libucl: add version 0.9.0 * link math lib * remove glib types --- recipes/libucl/all/conandata.yml | 14 +++ recipes/libucl/all/conanfile.py | 4 + ...0-cmake-add-install+use-find_package.patch | 119 ++++++++++++++++++ .../0006-0.9.0-remove-glib-types.patch | 32 +++++ recipes/libucl/config.yml | 2 + 5 files changed, 171 insertions(+) create mode 100644 recipes/libucl/all/patches/0002-0.9.0-cmake-add-install+use-find_package.patch create mode 100644 recipes/libucl/all/patches/0006-0.9.0-remove-glib-types.patch diff --git a/recipes/libucl/all/conandata.yml b/recipes/libucl/all/conandata.yml index 11db4b55879f9..656cf543d7403 100644 --- a/recipes/libucl/all/conandata.yml +++ b/recipes/libucl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.9.0": + url: "https://github.com/vstakhov/libucl/archive/refs/tags/0.9.0.tar.gz" + sha256: "87b233048bca7d307b14cffb882d3c198dc3fff96b19e0c3515428f027b3ebfe" "0.8.2": url: "https://github.com/vstakhov/libucl/archive/refs/tags/0.8.2.tar.gz" sha256: "d95a0e2151cc167a0f3e51864fea4e8977a0f4c473faa805269a347f7fb4e165" @@ -6,6 +9,17 @@ sources: url: "https://github.com/vstakhov/libucl/archive/refs/tags/0.8.1.tar.gz" sha256: "a6397e179672f0e8171a0f9a2cfc37e01432b357fd748b13f4394436689d24ef" patches: + "0.9.0": + - patch_file: "patches/0001-0.8.1-shared-win32.patch" + patch_description: "fix UCL_EXTERN definition for shared build on win32" + patch_type: "portability" + - patch_file: "patches/0002-0.9.0-cmake-add-install+use-find_package.patch" + patch_description: "improve installation, use cci package" + patch_type: "conan" + - patch_file: "patches/0006-0.9.0-remove-glib-types.patch" + patch_description: "remove glib types, use char and size_t instead." + patch_type: "portability" + patch_source: "https://github.com/vstakhov/libucl/pull/283" "0.8.2": - patch_file: "patches/0001-0.8.1-shared-win32.patch" patch_description: "fix UCL_EXTERN definition for shared build on win32" diff --git a/recipes/libucl/all/conanfile.py b/recipes/libucl/all/conanfile.py index f81b0da544841..30bc268f05071 100644 --- a/recipes/libucl/all/conanfile.py +++ b/recipes/libucl/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -90,3 +91,6 @@ def package_info(self): # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.names["pkg_config"] = "libucl" + + if Version(self.version) >= "0.9.0" and self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/libucl/all/patches/0002-0.9.0-cmake-add-install+use-find_package.patch b/recipes/libucl/all/patches/0002-0.9.0-cmake-add-install+use-find_package.patch new file mode 100644 index 0000000000000..139c3e606a3ba --- /dev/null +++ b/recipes/libucl/all/patches/0002-0.9.0-cmake-add-install+use-find_package.patch @@ -0,0 +1,119 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1e23994..c67a5b8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,12 +5,15 @@ SET(LIBUCL_VERSION_MAJOR 0) + SET(LIBUCL_VERSION_MINOR 9) + SET(LIBUCL_VERSION_PATCH 0) + +-SET(LIBUCL_VERSION +- "${LIBUCL_VERSION_MAJOR}.${LIBUCL_VERSION_MINOR}.${LIBUCL_VERSION_PATCH}") ++SET(LIBUCL_VERSION "${LIBUCL_VERSION_MAJOR}.${LIBUCL_VERSION_MINOR}.${LIBUCL_VERSION_PATCH}") + + INCLUDE(CheckCCompilerFlag) + INCLUDE(CheckCSourceCompiles) +-INCLUDE(FindOpenSSL) ++IF(ENABLE_URL_SIGN) ++ FIND_PACKAGE(OpenSSL REQUIRED) ++ SET(HAVE_OPENSSL 1) ++ ADD_DEFINITIONS(-DHAVE_OPENSSL) ++ENDIF(ENABLE_URL_SIGN) + INCLUDE(GNUInstallDirs) + + OPTION(ENABLE_URL_INCLUDE "Enable urls in ucl includes (requires libcurl or libfetch) [default: OFF]" OFF) +@@ -135,30 +138,10 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") + ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux") + + IF(ENABLE_URL_INCLUDE MATCHES "ON") +- FIND_LIBRARY(LIBFETCH_LIBRARY NAMES fetch PATHS PATH_SUFFIXES lib64 lib +- PATHS +- ~/Library/Frameworks +- /Library/Frameworks +- /usr/local +- /usr +- /sw +- /opt/local +- /opt/csw +- /opt +- DOC "Path where the libfetch library can be found") +- IF(LIBFETCH_LIBRARY) +- FIND_FILE(HAVE_FETCH_H NAMES fetch.h PATHS /usr/include +- /opt/include +- /usr/local/include +- DOC "Path to libfetch header") +- ELSE(LIBFETCH_LIBRARY) +- # Try to find libcurl +- FIND_PACKAGE(CURL) +- IF(NOT CURL_FOUND) +- MESSAGE(WARNING "Neither libcurl nor libfetch were found, no support of URL includes in configuration") +- ENDIF(NOT CURL_FOUND) +- ENDIF(LIBFETCH_LIBRARY) +-ENDIF(ENABLE_URL_INCLUDE MATCHES "ON") ++ FIND_PACKAGE(CURL REQUIRED) ++ ADD_DEFINITIONS(-DCURL_FOUND) ++ SET(CURL_LIBRARIES CURL::libcurl) ++ENDIF() + + set(SYNC_BUILTINS_TEST_SOURCE [====[ + int main() +@@ -249,35 +232,24 @@ TARGET_COMPILE_DEFINITIONS(ucl + ${UCL_COMPILE_DEFS} + ) + +-IF(ENABLE_LUA MATCHES "ON") +- IF(ENABLE_LUAJIT MATCHES "ON") +- FindLua(VERSION_MAJOR "5" VERSION_MINOR "1" ROOT "${LUA_ROOT}") +- IF(NOT LUA_FOUND) +- MESSAGE(FATAL_ERROR "Lua not found, lua support is required") +- ELSE(NOT LUA_FOUND) +- INCLUDE_DIRECTORIES("${LUA_INCLUDE_DIR}") +- ENDIF(NOT LUA_FOUND) +- ELSE(ENABLE_LUAJIT MATCHES "ON") +- FindLua(VERSION_MAJOR "5" VERSION_MINOR "2" ROOT "${LUA_ROOT}") +- IF(NOT LUA_FOUND) +- FindLua(VERSION_MAJOR "5" VERSION_MINOR "1" ROOT "${LUA_ROOT}") +- ENDIF(NOT LUA_FOUND) +- IF(NOT LUA_FOUND) +- MESSAGE(FATAL_ERROR "Lua not found, lua support is required") +- ELSE(NOT LUA_FOUND) +- INCLUDE_DIRECTORIES("${LUA_INCLUDE_DIR}") +- ENDIF(NOT LUA_FOUND) +- ENDIF(ENABLE_LUAJIT MATCHES "ON") ++IF(ENABLE_LUA OR ENABLE_LUAJIT) + SET(UCL_LUA_SRC lua/lua_ucl.c) + ADD_LIBRARY(lua-ucl ${LIB_TYPE} ${UCL_LUA_SRC}) + ADD_LIBRARY(ucl::lua ALIAS lua-ucl) ++ TARGET_LINK_LIBRARIES(lua-ucl ucl) + IF(ENABLE_LUAJIT MATCHES "ON") +- TARGET_LINK_LIBRARIES(lua-ucl "${LUAJIT_LIBRARY}") ++ TARGET_LINK_LIBRARIES(lua-ucl luajit::luajit) + ELSE(ENABLE_LUAJIT MATCHES "ON") +- TARGET_LINK_LIBRARIES(lua-ucl "${LUA_LIBRARY}") ++ TARGET_LINK_LIBRARIES(lua-ucl lua::lua) + ENDIF(ENABLE_LUAJIT MATCHES "ON") +- TARGET_LINK_LIBRARIES(lua-ucl ucl) + TARGET_INCLUDE_DIRECTORIES(lua-ucl PUBLIC include PRIVATE src uthash) ++ IF(ENABLE_LUA) ++ FIND_PACKAGE(lua REQUIRED CONFIG) ++ TARGET_LINK_LIBRARIES(lua-ucl lua::lua) ++ ELSEIF(ENABLE_LUAJIT) ++ FIND_PACKAGE(luajit REQUIRED CONFIG) ++ TARGET_LINK_LIBRARIES(lua-ucl luajit::luajit) ++ ENDIF() + SET_TARGET_PROPERTIES(lua-ucl PROPERTIES + VERSION ${LIBUCL_VERSION} + SOVERSION ${LIBUCL_VERSION_MAJOR} +@@ -306,8 +278,11 @@ ENDIF(UNIX) + SET_TARGET_PROPERTIES(ucl PROPERTIES + PUBLIC_HEADER "${UCLHDR}") + +-INSTALL(TARGETS ucl EXPORT uclConfig DESTINATION ${CMAKE_INSTALL_LIBDIR} +- PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++INSTALL(TARGETS ucl EXPORT uclConfig ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + + IF(ENABLE_UTILS MATCHES "ON") + ADD_SUBDIRECTORY(utils) diff --git a/recipes/libucl/all/patches/0006-0.9.0-remove-glib-types.patch b/recipes/libucl/all/patches/0006-0.9.0-remove-glib-types.patch new file mode 100644 index 0000000000000..f63df8c3abd20 --- /dev/null +++ b/recipes/libucl/all/patches/0006-0.9.0-remove-glib-types.patch @@ -0,0 +1,32 @@ +diff --git a/lua/lua_ucl.c b/lua/lua_ucl.c +index c2e39c4..d6be69e 100644 +--- a/lua/lua_ucl.c ++++ b/lua/lua_ucl.c +@@ -406,7 +406,6 @@ ucl_object_lua_fromtable (lua_State *L, int idx, ucl_string_flags_t flags) + + /* Table iterate */ + if (is_array) { +- int i; + + if (!is_implicit) { + top = ucl_object_typed_new (UCL_ARRAY); +@@ -416,7 +415,7 @@ ucl_object_lua_fromtable (lua_State *L, int idx, ucl_string_flags_t flags) + top = NULL; + } + +- for (i = 1; i <= max; i ++) { ++ for (size_t i = 1; i <= max; i ++) { + lua_pushinteger (L, i); + lua_gettable (L, idx); + +@@ -886,8 +885,8 @@ lua_ucl_parser_parse_text (lua_State *L) + t = lua_touserdata (L, 2); + } + else if (lua_type (L, 2) == LUA_TSTRING) { +- const gchar *s; +- gsize len; ++ const char *s; ++ size_t len; + static struct _rspamd_lua_text st_t; + + s = lua_tolstring (L, 2, &len); diff --git a/recipes/libucl/config.yml b/recipes/libucl/config.yml index 7a9cbb2ce8ecb..fa8c302279f91 100644 --- a/recipes/libucl/config.yml +++ b/recipes/libucl/config.yml @@ -1,4 +1,6 @@ versions: + "0.9.0": + folder: all "0.8.2": folder: all "0.8.1": From b87c2fc3fcaab40772c2af3e2bb7ba00abd54ef2 Mon Sep 17 00:00:00 2001 From: igormironchik Date: Sat, 17 Feb 2024 22:08:27 +0300 Subject: [PATCH 030/405] (#22782) md4qt: bump version to 2.7.3 --- recipes/md4qt/all/conandata.yml | 3 +++ recipes/md4qt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index 315e8aca50cf0..29dd0361a14fa 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.7.3": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.3.tar.gz" + sha256: "d464cd137a69218f88af1373b198610f1db6971c7aa56c6869219ffb34e6f0dd" "2.7.2": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.2.tar.gz" sha256: "2d6b65db799fff944f2ecb8bb411f17687e41e0d5a17a37ad1c4bd22fe997d8b" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index e03897a5ac97e..73bd1fd0bdc43 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,6 @@ versions: + "2.7.3": + folder: all "2.7.2": folder: all "2.7.1": From efe16266d5995ddbc24fd761c1afba58010454c7 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Sat, 17 Feb 2024 20:28:00 +0100 Subject: [PATCH 031/405] (#22783) ccache: add version 4.9.1 --- recipes/ccache/all/conandata.yml | 7 +++++++ recipes/ccache/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/ccache/all/conandata.yml b/recipes/ccache/all/conandata.yml index 57fc624c15481..5c1cbd2adcc93 100644 --- a/recipes/ccache/all/conandata.yml +++ b/recipes/ccache/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.9.1": + url: "https://github.com/ccache/ccache/releases/download/v4.9.1/ccache-4.9.1.tar.xz" + sha256: "4c03bc840699127d16c3f0e6112e3f40ce6a230d5873daa78c60a59c7ef59d25" "4.9": url: "https://github.com/ccache/ccache/releases/download/v4.9/ccache-4.9.tar.xz" sha256: "1ebc72324e3ab52af0b562bf54189d108e85eef6478d6304a345a3c2dc4018e0" @@ -18,6 +21,10 @@ sources: url: "https://github.com/ccache/ccache/releases/download/v4.7.4/ccache-4.7.4.tar.xz" sha256: "df0c64d15d3efaf0b4f6837dd6b1467e40eeaaa807db25ce79c3a08a46a84e36" patches: + "4.9.1": + - patch_file: "patches/4.9-cmake-msvc-runtime.patch" + patch_description: "fixup MSVC runtime" + patch_type: "conan" "4.9": - patch_file: "patches/4.9-cmake-msvc-runtime.patch" patch_description: "fixup MSVC runtime" diff --git a/recipes/ccache/config.yml b/recipes/ccache/config.yml index c2b3794787244..c3b3ce18a0b2b 100644 --- a/recipes/ccache/config.yml +++ b/recipes/ccache/config.yml @@ -1,4 +1,6 @@ versions: + "4.9.1": + folder: all "4.9": folder: all "4.8.3": From f0af52dfa9627cb4db2eddb598cfd88db55cbd80 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 18 Feb 2024 04:49:08 +0900 Subject: [PATCH 032/405] (#22798) ssp: add version 1.6.2 --- recipes/ssp/all/conandata.yml | 3 +++ recipes/ssp/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/ssp/all/conandata.yml b/recipes/ssp/all/conandata.yml index 72dce2c480ffe..7b9246ca69c3c 100644 --- a/recipes/ssp/all/conandata.yml +++ b/recipes/ssp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.6.2": + url: "https://github.com/red0124/ssp/archive/refs/tags/v1.6.2.tar.gz" + sha256: "6fa5ae1cd458eae3c1931e8cbcbd8d97956eda37db1388358456ca0743b48b7c" "1.6.1": url: "https://github.com/red0124/ssp/archive/refs/tags/v1.6.1.tar.gz" sha256: "4cdf75959b0a5fabd0b3e6ec1bad41d7c3f298d5b7f822d6e12b7e4d7dfcdd34" diff --git a/recipes/ssp/config.yml b/recipes/ssp/config.yml index bd3f43d241a52..8664a344402ec 100644 --- a/recipes/ssp/config.yml +++ b/recipes/ssp/config.yml @@ -1,3 +1,5 @@ versions: + "1.6.2": + folder: all "1.6.1": folder: all From 80a605249e29ca8357f75dfaf380aaf37abeb44a Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 18 Feb 2024 05:08:24 +0900 Subject: [PATCH 033/405] (#22800) rtm: add version 2.3.0 --- recipes/rtm/all/conandata.yml | 3 +++ recipes/rtm/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/rtm/all/conandata.yml b/recipes/rtm/all/conandata.yml index 41cc19013d6fa..e9ca9adc1569f 100644 --- a/recipes/rtm/all/conandata.yml +++ b/recipes/rtm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.3.0": + url: "https://github.com/nfrechette/rtm/archive/v2.3.0.tar.gz" + sha256: "2b5f2c3761bb52ae89802a574e9dc9949aec3b183f7e100b9b66a65adcc6f5ab" "2.2.1": url: "https://github.com/nfrechette/rtm/archive/v2.2.1.tar.gz" sha256: "678989368bc9859138db00719ad9e2f82b51acb0d8da6905426e4134223cee2a" diff --git a/recipes/rtm/config.yml b/recipes/rtm/config.yml index 3a396aa92fa44..92f533de05d77 100644 --- a/recipes/rtm/config.yml +++ b/recipes/rtm/config.yml @@ -1,4 +1,6 @@ versions: + "2.3.0": + folder: "all" "2.2.1": folder: "all" "2.2.0": From ce4acb537ef60008ee8007c25a33e83588d03b73 Mon Sep 17 00:00:00 2001 From: Cameron <54868046+crhowell3@users.noreply.github.com> Date: Mon, 19 Feb 2024 02:49:16 -0600 Subject: [PATCH 034/405] (#22794) opendis6: Set Minimum C++ Standard to 14 for RHEL 8 Support [CRITICAL] * Decreased min C++ standard to 14 for RHEL 8 support * Adjusted compiler list and test package CXX standard --- recipes/opendis6/all/conanfile.py | 8 ++++---- recipes/opendis6/all/test_package/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/opendis6/all/conanfile.py b/recipes/opendis6/all/conanfile.py index 7e3a9bc79f7cc..1d7c11b706f15 100644 --- a/recipes/opendis6/all/conanfile.py +++ b/recipes/opendis6/all/conanfile.py @@ -29,16 +29,16 @@ class OpenDis6Conan(ConanFile): @property def _min_cppstd(self): - return "17" + return "14" @property def _compilers_minimum_version(self): return { "Visual Studio": "15", "msvc": "191", - "gcc": "8.5", - "clang": "6", - "apple-clang": "14", + "gcc": "7", + "clang": "7", + "apple-clang": "10", } def config_options(self): diff --git a/recipes/opendis6/all/test_package/CMakeLists.txt b/recipes/opendis6/all/test_package/CMakeLists.txt index c3a404538b736..84b0c539e5ca0 100644 --- a/recipes/opendis6/all/test_package/CMakeLists.txt +++ b/recipes/opendis6/all/test_package/CMakeLists.txt @@ -5,4 +5,4 @@ find_package(OpenDIS CONFIG REQUIRED) add_executable(test_package_dis test_package.cpp) target_link_libraries(test_package_dis PRIVATE OpenDIS::OpenDIS6) -set_target_properties(test_package_dis PROPERTIES CXX_STANDARD 17) +set_target_properties(test_package_dis PROPERTIES CXX_STANDARD 14) From e6d41d3925c6116d1e11366215987ed88c206e2b Mon Sep 17 00:00:00 2001 From: Juan <35701596+juansblanco@users.noreply.github.com> Date: Mon, 19 Feb 2024 10:24:57 +0100 Subject: [PATCH 035/405] (#22793) [libgpg-error] Fix crosscompile errors --- recipes/libgpg-error/all/conanfile.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/recipes/libgpg-error/all/conanfile.py b/recipes/libgpg-error/all/conanfile.py index 630c80e0b9233..2ed23af2c2e5b 100644 --- a/recipes/libgpg-error/all/conanfile.py +++ b/recipes/libgpg-error/all/conanfile.py @@ -57,10 +57,6 @@ def generate(self): ]) if self.options.get_safe("fPIC", True): tc.configure_args.append("--with-pic") - host = None - if self.settings.os == "Linux" and self.settings.arch == "x86": - host = "i686-linux-gnu" - tc.update_configure_args({"--host": host}) tc.generate() def build(self): From 04f986643e7cf4a9b3a06e2ee7827f6949258aea Mon Sep 17 00:00:00 2001 From: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com> Date: Mon, 19 Feb 2024 05:48:10 -0600 Subject: [PATCH 036/405] (#22629) libdwarf: Add 0.9.0 and 0.9.1 * Add libdwarf 0.9.0 and 0.9.1 * Correction for the test package * Try to fix 0.9.0 * comment out remaining 0.9.1 references temporarily * Patch off_t * Try to get 0.9.1 good to go * Update recipes/libdwarf/all/conanfile.py Co-authored-by: Uilian Ries * Remove libdwarf 20191104 * Handle dwarfdump license * Update patches to use lowercasae zstd --------- Co-authored-by: Uilian Ries --- recipes/libdwarf/all/conandata.yml | 21 ++- recipes/libdwarf/all/conanfile.py | 41 ++-- .../all/patches/0.9.0-0001-fixes.patch | 105 +++++++++++ .../all/patches/0.9.1-0001-fixes.patch | 86 +++++++++ .../all/patches/20191104-0001-patch.patch | 178 ------------------ .../libdwarf/all/test_package/CMakeLists.txt | 4 +- .../libdwarf/all/test_package/test_package.c | 8 +- recipes/libdwarf/config.yml | 6 +- 8 files changed, 236 insertions(+), 213 deletions(-) create mode 100644 recipes/libdwarf/all/patches/0.9.0-0001-fixes.patch create mode 100644 recipes/libdwarf/all/patches/0.9.1-0001-fixes.patch delete mode 100644 recipes/libdwarf/all/patches/20191104-0001-patch.patch diff --git a/recipes/libdwarf/all/conandata.yml b/recipes/libdwarf/all/conandata.yml index 6abc97da6d65a..1a5e4c96d2caf 100644 --- a/recipes/libdwarf/all/conandata.yml +++ b/recipes/libdwarf/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.9.1": + url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.9.1.tar.gz" + sha256: "6da3f46a9f92b4e284c97c733851879d9b91b16642bede90c7614860a946824e" + "0.9.0": + url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.9.0.tar.gz" + sha256: "6d4c0ee8a869e68dfeb15c99b869cafca7a5f715ecfc699cbf4fd30729b33226" "0.8.0": url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.8.0.tar.gz" sha256: "8ef0dbfb0816b02aac97b87426689ebaa4efb8ec2ca2c759ea34c5e4678dff3f" @@ -8,10 +14,15 @@ sources: "0.5.0": url: "https://www.prevanders.net/libdwarf-0.5.0.tar.xz" sha256: "11fa822c60317fa00e1a01a2ac9e8388f6693e8662ab72d352c5f50c7e0112a9" - "20191104": - url: "https://www.prevanders.net/libdwarf-20191104.tar.gz" - sha256: "45f50a966314421b7dab525859853616df6c9680f0ccf2f44b030c505236eaba" patches: + "0.9.1": + - patch_file: "patches/0.9.1-0001-fixes.patch" + patch_description: "fix DW_API definition and cmake" + patch_type: "portability" + "0.9.0": + - patch_file: "patches/0.9.0-0001-fixes.patch" + patch_description: "fix DW_API definition and cmake" + patch_type: "portability" "0.8.0": - patch_file: "patches/0.8.0-0001-fixes.patch" patch_description: "fix DW_API definition and cmake" @@ -30,7 +41,3 @@ patches: - patch_file: "patches/0.5.0-0001-fix-DW_API.patch" patch_description: "fix DW_API definition" patch_type: "portability" - "20191104": - - patch_file: "patches/20191104-0001-patch.patch" - patch_description: "use cci package, remove lib64/bin64 install folders" - patch_type: "conan" diff --git a/recipes/libdwarf/all/conanfile.py b/recipes/libdwarf/all/conanfile.py index 0149255b7e4f0..8eab28c0da9ce 100644 --- a/recipes/libdwarf/all/conanfile.py +++ b/recipes/libdwarf/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, rename from conan.tools.build import cross_building from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -9,7 +10,7 @@ class LibdwarfConan(ConanFile): name = "libdwarf" description = "A library and a set of command-line tools for reading and writing DWARF2" - license = ("LGPL-2.1-only", "BSD-2-Clause-Views") + license = ("LGPL-2.1-only", "BSD-2-Clause-Views", "GPL-2.0-only") url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.prevanders.net/dwarf.html" topics = ("debug", "dwarf", "dwarf2", "elf") @@ -20,11 +21,13 @@ class LibdwarfConan(ConanFile): "shared": [True, False], "fPIC": [True, False], "with_dwarfgen": [True, False], + "with_dwarfdump": [True, False], } default_options = { "shared": False, "fPIC": True, "with_dwarfgen": False, + "with_dwarfdump": False, } def export_sources(self): @@ -41,15 +44,19 @@ def configure(self): self.settings.rm_safe("compiler.cppstd") if not self.options.with_dwarfgen: - self.license = "LGPL-2.1-only" + self.license = (l for l in self.license if l != "BSD-2-Clause-Views") + if not self.options.with_dwarfdump: + self.license = (l for l in self.license if l != "GPL-2.0-only") def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if self.options.with_dwarfgen or self.version == "20191104": + if self.options.with_dwarfgen: self.requires("libelf/0.8.13") self.requires("zlib/[>=1.2.11 <2]") + if Version(self.version) >= Version("0.9.0"): + self.requires("zstd/1.5.5") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -60,6 +67,7 @@ def generate(self): tc.variables["BUILD_NON_SHARED"] = not self.options.shared tc.variables["BUILD_SHARED"] = self.options.shared tc.variables["BUILD_DWARFGEN"] = self.options.with_dwarfgen + tc.variables["BUILD_DWARFDUMP"] = self.options.with_dwarfdump tc.variables["BUILD_DWARFEXAMPLE"] = False if cross_building(self): tc.variables["HAVE_UNUSED_ATTRIBUTE_EXITCODE"] = "0" @@ -76,20 +84,15 @@ def build(self): cmake.build() def package(self): - if self.version == "20191104": - copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "libdwarf")) - rename(self, os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "COPYING-libdwarf")) - if self.options.with_dwarfgen: - copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "dwarfgen")) - rename(self, os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "COPYING-dwarfgen")) - copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - else: - copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "src", "lib", "libdwarf")) - rename(self, os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "COPYING-libdwarf")) - if self.options.with_dwarfgen: - copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "src", "bin", "dwarfgen")) - rename(self, os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "COPYING-dwarfgen")) - copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "src", "lib", "libdwarf")) + rename(self, os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "COPYING-libdwarf")) + if self.options.with_dwarfgen: + copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "src", "bin", "dwarfgen")) + rename(self, os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "COPYING-dwarfgen")) + if self.options.with_dwarfdump: + copy(self, pattern="GPL.txt", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "src", "bin", "dwarfdump")) + rename(self, os.path.join(self.package_folder, "licenses", "GPL.txt"), os.path.join(self.package_folder, "licenses", "COPYING-dwarfdump")) + copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) cmake = CMake(self) cmake.install() @@ -103,6 +106,4 @@ def package_info(self): bindir = os.path.join(self.package_folder, "bin") self.output.info(f'Appending PATH environment variable: {bindir}') self.env_info.PATH.append(bindir) - - if self.version != "20191104": - self.cpp_info.libs.append("dwarfp") + self.cpp_info.libs.append("dwarfp") diff --git a/recipes/libdwarf/all/patches/0.9.0-0001-fixes.patch b/recipes/libdwarf/all/patches/0.9.0-0001-fixes.patch new file mode 100644 index 0000000000000..5c91298881e9c --- /dev/null +++ b/recipes/libdwarf/all/patches/0.9.0-0001-fixes.patch @@ -0,0 +1,105 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f444af27..5c9390d1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -181,14 +181,20 @@ endif() + + # Zlib and ZSTD need to be found otherwise disable it + find_package(ZLIB) +-find_package(ZSTD) +-if (ZLIB_FOUND AND ZSTD_FOUND ) ++find_package(zstd) ++if (ZLIB_FOUND AND zstd_FOUND ) + set(HAVE_ZLIB TRUE) + set(HAVE_ZLIB_H TRUE) + set(HAVE_ZSTD TRUE) + set(HAVE_ZSTD_H TRUE) + endif() + ++if(TARGET zstd::libzstd_shared) ++ set(ZSTD_LIB zstd::libzstd_shared) ++else() ++ set(ZSTD_LIB zstd::libzstd_static) ++endif() ++ + message(STATUS "CMAKE_SIZEOF_VOID_P ... " ${CMAKE_SIZEOF_VOID_P} ) + + # DW_FWALLXX are gnu C++ options. +diff --git a/src/bin/dwarfdump/CMakeLists.txt b/src/bin/dwarfdump/CMakeLists.txt +index 6d2c328b..bc105813 100644 +--- a/src/bin/dwarfdump/CMakeLists.txt ++++ b/src/bin/dwarfdump/CMakeLists.txt +@@ -68,7 +68,7 @@ target_compile_options(dwarfdump PRIVATE ${DW_FWALL}) + + target_link_libraries(dwarfdump PRIVATE dwarf) + +-if(${CMAKE_SIZEOF_VOID_P} EQUAL 8) ++if(0) + set(SUFFIX 64) + endif() + set(LIBDIR lib${SUFFIX}) +diff --git a/src/lib/libdwarf/CMakeLists.txt b/src/lib/libdwarf/CMakeLists.txt +index 4ad5c4fb..052208a1 100644 +--- a/src/lib/libdwarf/CMakeLists.txt ++++ b/src/lib/libdwarf/CMakeLists.txt +@@ -107,11 +107,10 @@ target_include_directories(dwarf PUBLIC + $ + $ + ) +-if(ZLIB_FOUND AND ZSTD_FOUND) +- target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ZSTD::ZSTD ) ++if(ZLIB_FOUND AND zstd_FOUND) ++ target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ${ZSTD_LIB} ) + endif() + +-set(SUFFIX $<$:64>) + set(LIBDIR lib${SUFFIX}) + set(BINDIR bin${SUFFIX}) + +@@ -120,7 +119,7 @@ install(TARGETS dwarf + LIBRARY DESTINATION ${LIBDIR} + ARCHIVE DESTINATION ${LIBDIR}) + +-configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY ) ++# configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY ) + + # The install has to be here, not in + # another CMakeLists.txt to make install work properly +@@ -145,6 +144,8 @@ install( + install( + FILES ${CMAKE_CURRENT_SOURCE_DIR}/dwarf.h + DESTINATION include/libdwarf) ++if(0) + install( FILES ${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc + DESTINATION lib/pkgconfig + ) ++endif() +diff --git a/src/lib/libdwarf/libdwarf.h b/src/lib/libdwarf/libdwarf.h +index ed3d1d0b..91f2fd8b 100644 +--- a/src/lib/libdwarf/libdwarf.h ++++ b/src/lib/libdwarf/libdwarf.h +@@ -51,7 +51,7 @@ + #endif /* DW_API */ + + #ifndef LIBDWARF_STATIC +-# if defined(_WIN32) || defined(__CYGWIN__) ++# if defined(LIBDWARF_SHARED) && (defined(_WIN32) || defined(__CYGWIN__)) + # ifdef LIBDWARF_BUILD + # define DW_API __declspec(dllexport) + # else /* !LIBDWARF_BUILD */ +diff --git a/src/lib/libdwarf/libdwarf_private.h b/src/lib/libdwarf/libdwarf_private.h +index b37ae994..7fa89256 100644 +--- a/src/lib/libdwarf/libdwarf_private.h ++++ b/src/lib/libdwarf/libdwarf_private.h +@@ -26,11 +26,7 @@ + #ifdef _MSC_VER /* Macro to select VS compiler */ + #include + typedef SSIZE_T ssize_t; +-#ifdef _WIN64 +-typedef long long off_t; +-#else + typedef long off_t; +-#endif + #endif /* _MSC_VER */ + + #ifndef TRUE diff --git a/recipes/libdwarf/all/patches/0.9.1-0001-fixes.patch b/recipes/libdwarf/all/patches/0.9.1-0001-fixes.patch new file mode 100644 index 0000000000000..c7952f7107937 --- /dev/null +++ b/recipes/libdwarf/all/patches/0.9.1-0001-fixes.patch @@ -0,0 +1,86 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 70839abd..972a2b9e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -188,14 +188,20 @@ if (ENABLE_DECOMPRESSION) + find_package(ZLIB) + endif() + if(NOT TARGET ZSTD::ZSTD) +- find_package(ZSTD) ++ find_package(zstd) + endif() +- if (ZLIB_FOUND AND ZSTD_FOUND ) ++ if (ZLIB_FOUND AND zstd_FOUND ) + set(HAVE_ZLIB TRUE) + set(HAVE_ZLIB_H TRUE) + set(HAVE_ZSTD TRUE) + set(HAVE_ZSTD_H TRUE) + endif() ++ find_package(zstd CONFIG REQUIRED) ++ if(TARGET zstd::libzstd_shared) ++ set(ZSTD_LIB zstd::libzstd_shared) ++ else() ++ set(ZSTD_LIB zstd::libzstd_static) ++ endif() + endif () + + message(STATUS "CMAKE_SIZEOF_VOID_P ... " ${CMAKE_SIZEOF_VOID_P} ) +diff --git a/src/lib/libdwarf/CMakeLists.txt b/src/lib/libdwarf/CMakeLists.txt +index 7500c9f4..ce1461fb 100644 +--- a/src/lib/libdwarf/CMakeLists.txt ++++ b/src/lib/libdwarf/CMakeLists.txt +@@ -104,8 +104,8 @@ target_include_directories(dwarf PUBLIC + $ + $ + ) +-if(ZLIB_FOUND AND ZSTD_FOUND) +- target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ZSTD::ZSTD ) ++if(ZLIB_FOUND AND zstd_FOUND) ++ target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ${ZSTD_LIB} ) + endif() + set_target_properties(dwarf PROPERTIES PUBLIC_HEADER "libdwarf.h;dwarf.h") + +@@ -116,7 +116,7 @@ install(TARGETS dwarf + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ) + +-configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY) ++# configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY) + + # The install has to be here, not in + # another CMakeLists.txt to make install work properly +@@ -131,4 +131,4 @@ install(EXPORT libdwarfTargets + NAMESPACE libdwarf:: + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libdwarf") + install(FILES cmake/libdwarf-config.cmake DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libdwarf") +-install(FILES "${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") ++# install(FILES "${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") +diff --git a/src/lib/libdwarf/libdwarf.h b/src/lib/libdwarf/libdwarf.h +index 380d2ef7..8c62ee7e 100644 +--- a/src/lib/libdwarf/libdwarf.h ++++ b/src/lib/libdwarf/libdwarf.h +@@ -51,7 +51,7 @@ + #endif /* DW_API */ + + #ifndef LIBDWARF_STATIC +-# if defined(_WIN32) || defined(__CYGWIN__) ++# if defined(LIBDWARF_SHARED) && (defined(_WIN32) || defined(__CYGWIN__)) + # ifdef LIBDWARF_BUILD + # define DW_API __declspec(dllexport) + # else /* !LIBDWARF_BUILD */ +diff --git a/src/lib/libdwarf/libdwarf_private.h b/src/lib/libdwarf/libdwarf_private.h +index b37ae994..7fa89256 100644 +--- a/src/lib/libdwarf/libdwarf_private.h ++++ b/src/lib/libdwarf/libdwarf_private.h +@@ -26,11 +26,7 @@ + #ifdef _MSC_VER /* Macro to select VS compiler */ + #include + typedef SSIZE_T ssize_t; +-#ifdef _WIN64 +-typedef long long off_t; +-#else + typedef long off_t; +-#endif + #endif /* _MSC_VER */ + + #ifndef TRUE diff --git a/recipes/libdwarf/all/patches/20191104-0001-patch.patch b/recipes/libdwarf/all/patches/20191104-0001-patch.patch deleted file mode 100644 index aadcac9dfe8fd..0000000000000 --- a/recipes/libdwarf/all/patches/20191104-0001-patch.patch +++ /dev/null @@ -1,178 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2607e56..3ca4ac5 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -73,9 +73,9 @@ check_include_file( "unistd.h" HAVE_UNISTD_H ) - check_include_file( "sgidefs.h" HAVE_SGIDEFS_H ) - check_include_file( "stdafx.h" HAVE_STDAFX_H ) - check_include_file( "Windows.h" HAVE_WINDOWS_H ) --check_include_file( "elf.h" HAVE_ELF_H ) --check_include_file( "libelf.h" HAVE_LIBELF_H ) --check_include_file( "libelf/libelf.h" HAVE_LIBELF_LIBELF_H) -+set(HAVE_ELF_H FALSE) -+set(HAVE_LIBELF_H FALSE) -+set(HAVE_LIBELF_LIBELF_H TRUE) - check_include_file( "alloca.h" HAVE_ALLOCA_H ) - check_include_file( "elfaccess.h" HAVE_ELFACCESS_H) - check_include_file( "sys/elf_386.h" HAVE_SYS_ELF_386_H ) -@@ -128,6 +128,8 @@ endif() - # It's not really setting the location of libelfheader, - # it is really # either elf.h, or if that is missing - # it is assuming elf.h data is in the supplied libelf. -+find_package(libelf REQUIRED CONFIG) -+find_package(ZLIB REQUIRED CONFIG) - - if(HAVE_ELF_H) - set(HAVE_LOCATION_OF_LIBELFHEADER "") -@@ -146,12 +148,13 @@ elseif(HAVE_LIBELF_LIBELF_H) - endif() - - if (HAVE_LIBELF_H OR HAVE_LIBELF_LIBELF_H) -- set (CMAKE_REQUIRED_LIBRARIES elf) -+ set (CMAKE_REQUIRED_DEFINITIONS -D__LIBELF64=1) - message(STATUS "libelf header ${PLAIN_JUST_LIBELF} checking for elf64_getehdr") - check_symbol_exists( elf64_getehdr ${PLAIN_JUST_LIBELF} HAVE_ELF64_GETEHDR) - message(STATUS "libelf header ${PLAIN_JUST_LIBELF} checking for elf64_getshdr") - check_symbol_exists( elf64_getshdr ${PLAIN_JUST_LIBELF} HAVE_ELF64_GETSHDR) - set (CMAKE_REQUIRED_LIBRARIES) -+ set (CMAKE_REQUIRED_DEFINITIONS) - endif() - - option(DWARF_WITH_LIBELF "Use libelf (default is YES)" TRUE) -@@ -166,6 +169,9 @@ if (DWARF_WITH_LIBELF) - message(STATUS "checking using HAVE_ELF_H ... ${HAVE_ELF_H}") - message(STATUS "checking using elf header ... ${HAVE_LOCATION_OF_LIBELFHEADER}") - message(STATUS "checking using libelf header ... ${JUST_LIBELF}") -+ -+ set (CMAKE_REQUIRED_DEFINITIONS -D__LIBELF64=1) -+ - check_c_source_compiles(" - #include ${HAVE_LOCATION_OF_LIBELFHEADER} - int main() -@@ -202,7 +208,7 @@ if (DWARF_WITH_LIBELF) - # to set HAVE_LIBELF_OFF64_OK at present. - check_c_source_compiles(" - #define _GNU_SOURCE 1 -- #include ${JUST_LIBELF} -+ #include <${JUST_LIBELF}> - int main() - { - off64_t p; p = 0; -@@ -210,7 +216,7 @@ if (DWARF_WITH_LIBELF) - }" HAVE_LIBELF_OFF64_OK) - - check_c_source_compiles(" -- #include ${JUST_LIBELF} -+ #include <${JUST_LIBELF}> - /* This must be at global scope */ - struct _Elf; - typedef struct _Elf Elf; -@@ -220,6 +226,10 @@ if (DWARF_WITH_LIBELF) - int i = 12; - return 0; - }" HAVE_STRUCT_UNDERSCORE_ELF) -+ -+ set (CMAKE_REQUIRED_LIBRARIES) -+ set (CMAKE_REQUIRED_DEFINITIONS) -+ - endif() - message(STATUS "Assuming struct Elf for the default libdwarf.h") - # Because cmake treats ; in an interesting way attempting -@@ -378,10 +388,9 @@ message(STATUS "Checking producer generates only 32bit... ${HAVE_STRICT_DWARF2_3 - - - # This references cmake/FindLibElf.cmake. See cmake documentation. --find_package(LibElf REQUIRED) - list(APPEND CMAKE_REQUIRED_INCLUDES ${LIBELF_INCLUDE_DIRS}) - --configure_file(config.h.in.cmake config.h) -+configure_file(${CMAKE_SOURCE_DIR}/config.h.in.cmake ${CMAKE_BINARY_DIR}/config.h) - - if(BUILD_NON_SHARED) - set(DWARF_TARGETS dwarf-static) -@@ -395,7 +404,6 @@ if(BUILD_SHARED) - endif() - - add_subdirectory(libdwarf) --add_subdirectory(dwarfdump) - if ( BUILD_DWARFGEN ) - if ( DWARF_WITH_LIBELF ) - add_subdirectory(dwarfgen) -diff --git a/dwarfdump/CMakeLists.txt b/dwarfdump/CMakeLists.txt -index b94f6c8..6bdb57f 100644 ---- a/dwarfdump/CMakeLists.txt -+++ b/dwarfdump/CMakeLists.txt -@@ -31,7 +31,7 @@ set_source_group(CONFIGURATION_FILES "Configuration Files" - ${CMAKE_SOURCE_DIR}/config.h.in.cmake - ${CMAKE_BINARY_DIR}/config.h) - --add_executable(dwarfdump ${SOURCES} ${HEADERS} ${CONFIGURATION_FILES}) -+add_executable(dwarfdump ${SOURCES} ${HEADERS} ${CONFIGURATION_FILES} ${libelf_LIBRARIES}) - - set_folder(dwarfdump dwarfdump) - -diff --git a/dwarfgen/CMakeLists.txt b/dwarfgen/CMakeLists.txt -index 488b820..5bde9eb 100644 ---- a/dwarfgen/CMakeLists.txt -+++ b/dwarfgen/CMakeLists.txt -@@ -20,16 +20,16 @@ set_folder(dwarfgen dwarfgen) - - target_compile_options(dwarfgen PRIVATE ${DW_FWALLXX}) - --target_link_libraries(dwarfgen PRIVATE ${dwarf-target} ${DW_FZLIB}) -+target_link_libraries(dwarfgen PRIVATE ${dwarf-target} ${DW_FZLIB} ${libelf_LIBRARIES}) - - set(SUFFIX $<$:64>) - set(LIBDIR lib${SUFFIX}) - set(BINDIR bin${SUFFIX}) - - install(TARGETS dwarfgen DESTINATION -- RUNTIME DESTINATION ${BINDIR} -- LIBRARY DESTINATION ${LIBDIR} -- ARCHIVE DESTINATION ${LIBDIR}) -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib) - - #install(FILES dwarfgen.conf DESTINATION lib) - -diff --git a/libdwarf/CMakeLists.txt b/libdwarf/CMakeLists.txt -index c610522..3a69533 100644 ---- a/libdwarf/CMakeLists.txt -+++ b/libdwarf/CMakeLists.txt -@@ -81,12 +81,9 @@ foreach(i RANGE ${targetCount}) - ${GENNAMES_OUTPUT} ${CONFIGURATION_FILES}) - - set_folder(${target} libdwarf) -- target_include_directories(${target} PUBLIC -- ${LIBELF_INCLUDE_DIRS}) -- target_compile_options(${target} PRIVATE ${DW_FWALL}) - msvc_posix(${target}) - -- target_link_libraries(${target} PUBLIC ${LIBELF_LIBRARIES}) -+ target_link_libraries(${target} PUBLIC ${libelf_LIBRARIES} ${ZLIB_LIBRARIES}) - - set_target_properties(${target} PROPERTIES OUTPUT_NAME dwarf) - -@@ -95,15 +92,14 @@ foreach(i RANGE ${targetCount}) - set(BINDIR bin${SUFFIX}) - - install(TARGETS ${target} -- RUNTIME DESTINATION ${BINDIR} -- LIBRARY DESTINATION ${LIBDIR} -- ARCHIVE DESTINATION ${LIBDIR}) -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib) - endforeach() - --if(UNIX AND BUILD_SHARED) -- target_link_libraries(dwarf-shared PUBLIC z) --endif() -- -+install(FILES ${CMAKE_BINARY_DIR}/libdwarf/libdwarf.h DESTINATION include) -+install(FILES dwarf.h DESTINATION include) -+ - if (DO_TESTING) - set_source_group(TESTLEB "Source Files" dwarf_leb_test.c - dwarf_leb.c pro_encode_nm.c ) diff --git a/recipes/libdwarf/all/test_package/CMakeLists.txt b/recipes/libdwarf/all/test_package/CMakeLists.txt index a2fbbf0a474e1..8abbd68a6f049 100644 --- a/recipes/libdwarf/all/test_package/CMakeLists.txt +++ b/recipes/libdwarf/all/test_package/CMakeLists.txt @@ -6,6 +6,6 @@ find_package(libdwarf REQUIRED) add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} PRIVATE libdwarf::libdwarf) -if(NOT libdwarf_VERSION MATCHES "^[0-9]*$") - target_compile_definitions(${PROJECT_NAME} PRIVATE "LIBDWARF_NEW_STRUCTURE") +if(${libdwarf_VERSION} VERSION_LESS "0.9.1") + target_compile_definitions(${PROJECT_NAME} PRIVATE "LIBDWARF_NESTED_INCLUDE") endif() diff --git a/recipes/libdwarf/all/test_package/test_package.c b/recipes/libdwarf/all/test_package/test_package.c index 27d0d196b5a8d..287828193ab29 100644 --- a/recipes/libdwarf/all/test_package/test_package.c +++ b/recipes/libdwarf/all/test_package/test_package.c @@ -3,12 +3,12 @@ #include #include -#ifndef LIBDWARF_NEW_STRUCTURE - #include "dwarf.h" - #include "libdwarf.h" -#else +#ifdef LIBDWARF_NESTED_INCLUDE #include "libdwarf/dwarf.h" #include "libdwarf/libdwarf.h" +#else + #include "dwarf.h" + #include "libdwarf.h" #endif void example1(Dwarf_Die somedie) { diff --git a/recipes/libdwarf/config.yml b/recipes/libdwarf/config.yml index 2bad80aa2207b..b5a49fc99b335 100644 --- a/recipes/libdwarf/config.yml +++ b/recipes/libdwarf/config.yml @@ -1,9 +1,11 @@ versions: + "0.9.1": + folder: all + "0.9.0": + folder: all "0.8.0": folder: all "0.7.0": folder: all "0.5.0": folder: all - "20191104": - folder: all From f4213db268522332ad65ca7b7b6e550ba9e872a2 Mon Sep 17 00:00:00 2001 From: Rob Baily Date: Mon, 19 Feb 2024 08:47:48 -0500 Subject: [PATCH 037/405] (#22673) cli: new recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * cli: new recipe * Ensure files have final endline * cli: new recipe * Ensure files have final endline * Remove share folder for package * Updated checks for minimum cpp and compiler versions * Add import for ConanInvalidConfiguration * Try Apple clang minimum version 12 * Try apple-clang compatibility at version 14 * Apply suggestions from code review Co-authored-by: Rubén Rincón Blanco * Set CMake generated names to lower case * add option for boost and asio Signed-off-by: Uilian Ries * Add test_package example using the with_asio option * Fix newline at end of file * Fix last line for example_complete.cpp * simplify recipe Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries Co-authored-by: Rubén Rincón Blanco Co-authored-by: Uilian Ries --- recipes/cli/all/conandata.yml | 4 ++ recipes/cli/all/conanfile.py | 64 +++++++++++++++++++ recipes/cli/all/test_package/CMakeLists.txt | 8 +++ recipes/cli/all/test_package/conanfile.py | 29 +++++++++ recipes/cli/all/test_package/test_package.cpp | 22 +++++++ recipes/cli/config.yml | 3 + 6 files changed, 130 insertions(+) create mode 100644 recipes/cli/all/conandata.yml create mode 100644 recipes/cli/all/conanfile.py create mode 100644 recipes/cli/all/test_package/CMakeLists.txt create mode 100644 recipes/cli/all/test_package/conanfile.py create mode 100644 recipes/cli/all/test_package/test_package.cpp create mode 100644 recipes/cli/config.yml diff --git a/recipes/cli/all/conandata.yml b/recipes/cli/all/conandata.yml new file mode 100644 index 0000000000000..10682c56d384f --- /dev/null +++ b/recipes/cli/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.1.0": + url: "https://github.com/daniele77/cli/archive/refs/tags/v2.1.0.tar.gz" + sha256: "dfc9fc7c72a6cdfdf852d89f151699b57460ff49775a8ff27d2a69477649acf9" diff --git a/recipes/cli/all/conanfile.py b/recipes/cli/all/conanfile.py new file mode 100644 index 0000000000000..d36d374460adf --- /dev/null +++ b/recipes/cli/all/conanfile.py @@ -0,0 +1,64 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +import os + +class CLIConan(ConanFile): + name = "cli" + description = "A library for interactive command line interfaces in modern C++" + license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/daniele77/cli" + topics = "cli-interface", "cpp14", "no-dependencies", "header-only" + package_type = "header-library" + settings = "os", "compiler", "build_type", "arch" + no_copy_source = True + + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "6", + "Visual Studio": "16", + "msvc": "192", + "apple-clang": "14", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + pass + + def package(self): + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("pthread") diff --git a/recipes/cli/all/test_package/CMakeLists.txt b/recipes/cli/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..532e9ff7fa4f7 --- /dev/null +++ b/recipes/cli/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) + +find_package(cli CONFIG REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} cli::cli) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/cli/all/test_package/conanfile.py b/recipes/cli/all/test_package/conanfile.py new file mode 100644 index 0000000000000..d55c28d73bebf --- /dev/null +++ b/recipes/cli/all/test_package/conanfile.py @@ -0,0 +1,29 @@ +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout, CMakeToolchain +from conan.tools.build import can_run + +class cliTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps" + + def requirements(self): + self.requires(self.tested_reference_str) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def layout(self): + cmake_layout(self) + + def test(self): + if can_run(self): + cmd = os.path.join(self.cpp.build.bindir, "test_package") + self.run(cmd, env="conanrun") diff --git a/recipes/cli/all/test_package/test_package.cpp b/recipes/cli/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..238aaf7e42157 --- /dev/null +++ b/recipes/cli/all/test_package/test_package.cpp @@ -0,0 +1,22 @@ +#include +#include + +using namespace cli; +using namespace std; + + +int main() +{ + auto rootMenu = make_unique< Menu >( "cli" ); + rootMenu -> Insert( + "hello", + [](std::ostream& out){ out << "Hello, world\n"; }, + "Print hello world" ); + + Cli cli( std::move(rootMenu) ); + cli.ExitAction( [](auto& out){ out << "Goodbye and thanks for all the fish.\n"; } ); + + CliFileSession input(cli); + + return 0; +} diff --git a/recipes/cli/config.yml b/recipes/cli/config.yml new file mode 100644 index 0000000000000..dfff490f9a9b6 --- /dev/null +++ b/recipes/cli/config.yml @@ -0,0 +1,3 @@ +versions: + "2.1.0": + folder: all From 64aba482ce1f61b7746b052373907c7d3a15aefd Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 19 Feb 2024 23:30:15 +0900 Subject: [PATCH 038/405] (#22764) libcoro: add version 0.11.1 * libcoro: add version 0.11 * relax compiler checks * update to version 0.11.1 Signed-off-by: Uilian Ries * require newer compilers Signed-off-by: Uilian Ries * update config Signed-off-by: Uilian Ries * Update recipes/libcoro/all/conanfile.py * fix library name on Windows Signed-off-by: Uilian Ries * some options are not available on Windows Signed-off-by: Uilian Ries * typo Signed-off-by: Uilian Ries * disable shared Signed-off-by: Uilian Ries * set CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS * revert CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS * manage shared option Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries --- recipes/libcoro/all/conandata.yml | 15 ++----- recipes/libcoro/all/conanfile.py | 42 +++++++++++++------ .../patches/0.10-0001-allow-shared-lib.patch | 13 ------ .../patches/0.7-0001-allow-shared-lib.patch | 9 ---- .../patches/0.8-0001-allow-shared-lib.patch | 13 ------ .../patches/0.9-0001-allow-shared-lib.patch | 13 ------ recipes/libcoro/config.yml | 2 + 7 files changed, 35 insertions(+), 72 deletions(-) delete mode 100644 recipes/libcoro/all/patches/0.10-0001-allow-shared-lib.patch delete mode 100644 recipes/libcoro/all/patches/0.7-0001-allow-shared-lib.patch delete mode 100644 recipes/libcoro/all/patches/0.8-0001-allow-shared-lib.patch delete mode 100644 recipes/libcoro/all/patches/0.9-0001-allow-shared-lib.patch diff --git a/recipes/libcoro/all/conandata.yml b/recipes/libcoro/all/conandata.yml index 2ae02b6941d0a..1587140b431f7 100644 --- a/recipes/libcoro/all/conandata.yml +++ b/recipes/libcoro/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.11.1": + url: "https://github.com/jbaldwin/libcoro/archive/refs/tags/v0.11.1.tar.gz" + sha256: "c7eb1bf133519ec0e0bc2e3e018ac4d1447a143e5e7385dab19204277d7c7671" "0.10": url: "https://github.com/jbaldwin/libcoro/archive/refs/tags/v0.10.tar.gz" sha256: "0e952e72012925b75910f80772f3642dac631644578dbbc0db4fee047badc745" @@ -13,17 +16,11 @@ sources: sha256: "ce1f3f1c4fa21b53d1cd195a29bd5a2313e53aa35637b402db04207d02316e51" patches: "0.10": - - patch_file: "patches/0.10-0001-allow-shared-lib.patch" - patch_type: "conan" - patch_description: "Allow to build the library as a shared library" - patch_file: "patches/0.10-0002-disable-git-config.patch" patch_type: "official" patch_description: "Comment out invocation of git config command" patch_source: "https://github.com/jbaldwin/libcoro/pull/234" "0.9": - - patch_file: "patches/0.9-0001-allow-shared-lib.patch" - patch_type: "conan" - patch_description: "Allow to build the library as a shared library" - patch_file: "patches/0.9-0002-disable-git-config.patch" patch_type: "conan" patch_description: "Comment out invocation of git config command" @@ -32,16 +29,10 @@ patches: patch_source: "https://github.com/jbaldwin/libcoro/pull/169" patch_description: "include std headers" "0.8": - - patch_file: "patches/0.8-0001-allow-shared-lib.patch" - patch_type: "conan" - patch_description: "Allow to build the library as a shared library" - patch_file: "patches/0.8-0002-disable-git-config.patch" patch_type: "conan" patch_description: "Comment out invocation of git config command" "0.7": - - patch_file: "patches/0.7-0001-allow-shared-lib.patch" - patch_type: "conan" - patch_description: "Allow to build the library as a shared library" - patch_file: "patches/0.7-0002-disable-git-config.patch" patch_type: "conan" patch_description: "Comment out invocation of git config command" diff --git a/recipes/libcoro/all/conanfile.py b/recipes/libcoro/all/conanfile.py index 7873b320afe48..60b120e4f9dc5 100644 --- a/recipes/libcoro/all/conanfile.py +++ b/recipes/libcoro/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd +from conan.tools.microsoft import is_msvc from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.scm import Version @@ -40,8 +41,12 @@ def _min_cppstd(self): @property def _minimum_compilers_version(self): return { - "gcc": "10.2.1", - } + "gcc": "10.2.1", + "clang": "16.0.0", + "apple-clang": "16", + "Visual Studio": "16", + "msvc": "192", + } def export_sources(self): export_conandata_patches(self) @@ -54,10 +59,15 @@ def config_options(self): if Version(self.version) < "0.9": del self.options.with_ssl del self.options.with_threading + if is_msvc(self) or self.settings.os == "Emscripten": + self.options.rm_safe("with_networking") + self.options.rm_safe("with_ssl") def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + if Version(self.version) < "0.11": + self.package_type = "static-library" def layout(self): cmake_layout(self, src_folder="src") @@ -71,10 +81,11 @@ def requirements(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) - if self.settings.os not in ["Linux", "FreeBSD", "Macos"]: - raise ConanInvalidConfiguration(f"{self.ref} is not supported on {self.settings.os}.") - if self.settings.compiler != "gcc": - raise ConanInvalidConfiguration(f"The Conan recipe {self.ref} only supports GCC for now. Contributions are welcome!") + if Version(self.version) < "0.10": + if self.settings.os not in ["Linux", "FreeBSD", "Macos"]: + raise ConanInvalidConfiguration(f"{self.ref} is not supported on {self.settings.os}.") + if self.settings.compiler != "gcc": + raise ConanInvalidConfiguration(f"The Conan recipe {self.ref} only supports GCC for now. Contributions are welcome!") minimum_version = self._minimum_compilers_version.get(str(self.settings.compiler), False) if minimum_version and Version(self.settings.compiler.version) < minimum_version: @@ -82,6 +93,9 @@ def validate(self): f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) + if Version(self.version) < "0.11" and self.options.shared: + raise ConanInvalidConfiguration(f"{self.ref} Only supports shared linking for versions >=0.11") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -91,10 +105,14 @@ def generate(self): tc.variables["LIBCORO_BUILD_EXAMPLES"] = False if Version(self.version) >= "0.8": tc.variables["LIBCORO_EXTERNAL_DEPENDENCIES"] = True - tc.variables["LIBCORO_FEATURE_NETWORKING"] = self.options.with_networking + tc.variables["LIBCORO_FEATURE_NETWORKING"] = self.options.get_safe("with_networking") if Version(self.version) >= "0.9": tc.variables["LIBCORO_FEATURE_THREADING"] = self.options.with_threading - tc.variables["LIBCORO_FEATURE_SSL"] = self.options.with_ssl + tc.variables["LIBCORO_FEATURE_SSL"] = self.options.get_safe("with_ssl", False) + if Version(self.version) >= "0.11": + tc.variables["LIBCORO_RUN_GITCONFIG"] = False + tc.variables["LIBCORO_BUILD_SHARED_LIBS"] = self.options.shared + tc.variables["LIBCORO_FEATURE_TLS"] = self.options.get_safe("with_ssl", False) tc.generate() deps = CMakeDeps(self) deps.generate() @@ -115,16 +133,16 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "libcoro") self.cpp_info.set_property("cmake_target_name", "libcoro::libcoro") if Version(self.version) >= "0.8": - self.cpp_info.libs = ["coro"] + self.cpp_info.libs = ["libcoro"] if is_msvc(self) else ["coro"] else: self.cpp_info.libs = ["libcoro"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["pthread", "m"] if Version(self.version) >= "0.9": - if self.options.with_networking: + if self.options.get_safe("with_networking"): self.cpp_info.defines.append("LIBCORO_FEATURE_NETWORKING") - if self.options.with_ssl: - self.cpp_info.defines.append("LIBCORO_FEATURE_SSL") + if self.options.get_safe("with_ssl"): + self.cpp_info.defines.extend(["LIBCORO_FEATURE_SSL", "LIBCORO_FEATURE_TLS"]) if self.options.with_threading: self.cpp_info.defines.append("LIBCORO_FEATURE_THREADING") diff --git a/recipes/libcoro/all/patches/0.10-0001-allow-shared-lib.patch b/recipes/libcoro/all/patches/0.10-0001-allow-shared-lib.patch deleted file mode 100644 index 8eb0ed04c1cfc..0000000000000 --- a/recipes/libcoro/all/patches/0.10-0001-allow-shared-lib.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b749c11..7398569 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -123,7 +123,7 @@ if(DEFINED EMSCRIPTEN) - add_link_options(-sEXIT_RUNTIME) - endif() - --add_library(${PROJECT_NAME} STATIC ${LIBCORO_SOURCE_FILES}) -+add_library(${PROJECT_NAME} ${LIBCORO_SOURCE_FILES}) - set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX PREFIX "") - target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20) - target_include_directories(${PROJECT_NAME} PUBLIC include) diff --git a/recipes/libcoro/all/patches/0.7-0001-allow-shared-lib.patch b/recipes/libcoro/all/patches/0.7-0001-allow-shared-lib.patch deleted file mode 100644 index 9c3ca8de19231..0000000000000 --- a/recipes/libcoro/all/patches/0.7-0001-allow-shared-lib.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -69,4 +69,4 @@ - ) - --add_library(${PROJECT_NAME} STATIC ${LIBCORO_SOURCE_FILES}) -+add_library(${PROJECT_NAME} ${LIBCORO_SOURCE_FILES}) - set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX) diff --git a/recipes/libcoro/all/patches/0.8-0001-allow-shared-lib.patch b/recipes/libcoro/all/patches/0.8-0001-allow-shared-lib.patch deleted file mode 100644 index 0481b258f7f9a..0000000000000 --- a/recipes/libcoro/all/patches/0.8-0001-allow-shared-lib.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f37206b..8221a5d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -91,7 +91,7 @@ if(LIBCORO_FEATURE_NETWORKING) - ) - endif() - --add_library(${PROJECT_NAME} STATIC ${LIBCORO_SOURCE_FILES}) -+add_library(${PROJECT_NAME} ${LIBCORO_SOURCE_FILES}) - set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX PREFIX "") - target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20) - target_include_directories(${PROJECT_NAME} PUBLIC inc) diff --git a/recipes/libcoro/all/patches/0.9-0001-allow-shared-lib.patch b/recipes/libcoro/all/patches/0.9-0001-allow-shared-lib.patch deleted file mode 100644 index 4838c6103aa0f..0000000000000 --- a/recipes/libcoro/all/patches/0.9-0001-allow-shared-lib.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ef0eea4..4c342e3 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -110,7 +110,7 @@ if(LIBCORO_FEATURE_NETWORKING) - endif() - endif() - --add_library(${PROJECT_NAME} STATIC ${LIBCORO_SOURCE_FILES}) -+add_library(${PROJECT_NAME} ${LIBCORO_SOURCE_FILES}) - set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX PREFIX "") - target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20) - target_include_directories(${PROJECT_NAME} PUBLIC inc) diff --git a/recipes/libcoro/config.yml b/recipes/libcoro/config.yml index 5808152f9189f..a682e35c6d452 100644 --- a/recipes/libcoro/config.yml +++ b/recipes/libcoro/config.yml @@ -1,4 +1,6 @@ versions: + "0.11.1": + folder: all "0.10": folder: all "0.9": From 539b155fd18e99d37e49aef333804e99a431d21a Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Mon, 19 Feb 2024 15:48:46 +0100 Subject: [PATCH 039/405] (#22777) aws-c-mqtt: update dependencies Due to #21033, we'll have to raise the aws-c-io dependency here as well. --- recipes/aws-c-mqtt/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/aws-c-mqtt/all/conanfile.py b/recipes/aws-c-mqtt/all/conanfile.py index d97246f605d3f..4740c4414b3ba 100644 --- a/recipes/aws-c-mqtt/all/conanfile.py +++ b/recipes/aws-c-mqtt/all/conanfile.py @@ -49,7 +49,7 @@ def requirements(self): else: self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) self.requires("aws-c-cal/0.6.9") - self.requires("aws-c-io/0.13.32", transitive_headers=True) + self.requires("aws-c-io/0.13.35", transitive_headers=True) self.requires("aws-c-http/0.7.14") def source(self): From 5ae630347b31512a7863704d4ee6b09ccbff35d8 Mon Sep 17 00:00:00 2001 From: Raziel Alphadios <64050682+RazielXYZ@users.noreply.github.com> Date: Mon, 19 Feb 2024 17:08:50 +0200 Subject: [PATCH 040/405] (#22810) safe: new recipe --- recipes/safe/all/conandata.yml | 4 ++ recipes/safe/all/conanfile.py | 48 +++++++++++++++++++ recipes/safe/all/test_package/CMakeLists.txt | 8 ++++ recipes/safe/all/test_package/conanfile.py | 26 ++++++++++ .../safe/all/test_package/test_package.cpp | 12 +++++ recipes/safe/config.yml | 3 ++ 6 files changed, 101 insertions(+) create mode 100644 recipes/safe/all/conandata.yml create mode 100644 recipes/safe/all/conanfile.py create mode 100644 recipes/safe/all/test_package/CMakeLists.txt create mode 100644 recipes/safe/all/test_package/conanfile.py create mode 100644 recipes/safe/all/test_package/test_package.cpp create mode 100644 recipes/safe/config.yml diff --git a/recipes/safe/all/conandata.yml b/recipes/safe/all/conandata.yml new file mode 100644 index 0000000000000..31c393ec6520f --- /dev/null +++ b/recipes/safe/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.1.1": + url: "https://github.com/LouisCharlesC/safe/archive/v1.1.1.tar.gz" + sha256: "A6E161EAFC32AA522CD2CE1A5F95A3DF963C51263053089FC8F7A9765D054F00" diff --git a/recipes/safe/all/conanfile.py b/recipes/safe/all/conanfile.py new file mode 100644 index 0000000000000..c7c9d401cf1af --- /dev/null +++ b/recipes/safe/all/conanfile.py @@ -0,0 +1,48 @@ +from conan import ConanFile +from conan.tools.files import get, copy +from conan.tools.build import check_min_cppstd +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.51.1" + +class SafeConan(ConanFile): + name = "safe" + description = "Header only read and write locks for mutexes" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/LouisCharlesC/safe" + topics = ("multi-threading ", "lock", "guard", "raii", "thread-safety", "mutexes", "lock-guard", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 11 + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.get_safe("compiler.cppstd"): + check_min_cppstd(self, self._min_cppstd) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/safe/all/test_package/CMakeLists.txt b/recipes/safe/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..13fdc6eda90ab --- /dev/null +++ b/recipes/safe/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.12) +project(test_package LANGUAGES CXX) + +find_package(safe REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE safe::safe) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/safe/all/test_package/conanfile.py b/recipes/safe/all/test_package/conanfile.py new file mode 100644 index 0000000000000..a9fb96656f203 --- /dev/null +++ b/recipes/safe/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/safe/all/test_package/test_package.cpp b/recipes/safe/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..9286960794fc7 --- /dev/null +++ b/recipes/safe/all/test_package/test_package.cpp @@ -0,0 +1,12 @@ +#include "safe/safe.h" + +int main(void) { + safe::Safe safeValue; + + { + safe::WriteAccess> value(safeValue); + *value = 5; + } + + return 0; +} diff --git a/recipes/safe/config.yml b/recipes/safe/config.yml new file mode 100644 index 0000000000000..60d31991f5141 --- /dev/null +++ b/recipes/safe/config.yml @@ -0,0 +1,3 @@ +versions: + "1.1.1": + folder: all From 59508120c81c4d9fed03dbd4a41d871000c1b0bf Mon Sep 17 00:00:00 2001 From: Toni Neubert Date: Mon, 19 Feb 2024 16:28:30 +0100 Subject: [PATCH 041/405] (#22813) emio: add version 0.7.0 * add version 0.7.0 * fix license renaming issue --- recipes/emio/all/conandata.yml | 3 +++ recipes/emio/all/conanfile.py | 2 +- recipes/emio/config.yml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/emio/all/conandata.yml b/recipes/emio/all/conandata.yml index 9c81336117348..a9c48f24eeb27 100644 --- a/recipes/emio/all/conandata.yml +++ b/recipes/emio/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.7.0": + url: "https://github.com/viatorus/emio/archive/0.7.0.tar.gz" + sha256: "1ef5304964eee109c13477f2d84822ee474612475049a377b59e33a5fe05d7eb" "0.6.1": url: "https://github.com/viatorus/emio/archive/0.6.1.tar.gz" sha256: "118bb67581d68b33d9764e016700014ad63b68520b5786c0d12036f33bcef0dc" diff --git a/recipes/emio/all/conanfile.py b/recipes/emio/all/conanfile.py index 8eb00bd9ec66b..7785d5a02da74 100644 --- a/recipes/emio/all/conanfile.py +++ b/recipes/emio/all/conanfile.py @@ -57,6 +57,6 @@ def source(self): destination=self.source_folder, strip_root=True) def package(self): - copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "LICENSE*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "*.hpp", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) diff --git a/recipes/emio/config.yml b/recipes/emio/config.yml index 01ed4761ab018..b957140535721 100644 --- a/recipes/emio/config.yml +++ b/recipes/emio/config.yml @@ -1,4 +1,6 @@ versions: + "0.7.0": + folder: all "0.6.1": folder: all "0.6.0": From 135dc5908869bf3b521bdd86bd1f66062e435e8f Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 19 Feb 2024 15:41:39 +0000 Subject: [PATCH 042/405] (#22819) [bot] Update authorized users list (2024-02-19) * Add/remove users to Access Request * Update .c3i/authorized_users.yml --------- Co-authored-by: conan-center-bot Co-authored-by: Uilian Ries --- .c3i/authorized_users.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 37b43973ce278..995fbb6e339b3 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1288,3 +1288,5 @@ authorized_users: - AlexanderBabansky - matthiasbuhl - cnicolaescu +- mmomtchev +- ChristianHeinigk From 25e0860a35cc17e929936431ba8e256008b9159b Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 19 Feb 2024 18:05:15 +0200 Subject: [PATCH 043/405] (#21153) isl: migrate to Conan v2 * isl: migrate to Conan v2 Based on changes by @System-Arch in #14916. * isl: remove unnecessary comments * isl: add v0.26, use .xz * isl: cross-building on macOS is broken * isl: fix_apple_shared_install_name() --- recipes/isl/all/conandata.yml | 21 ++- recipes/isl/all/conanfile.py | 153 +++++++++--------- .../0.24-0001-fix-ac_test_cflags.patch | 11 ++ recipes/isl/all/test_package/CMakeLists.txt | 5 +- recipes/isl/all/test_package/conanfile.py | 19 ++- .../isl/all/test_v1_package/CMakeLists.txt | 8 + recipes/isl/all/test_v1_package/conanfile.py | 17 ++ recipes/isl/config.yml | 6 +- 8 files changed, 142 insertions(+), 98 deletions(-) create mode 100644 recipes/isl/all/patches/0.24-0001-fix-ac_test_cflags.patch create mode 100644 recipes/isl/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/isl/all/test_v1_package/conanfile.py diff --git a/recipes/isl/all/conandata.yml b/recipes/isl/all/conandata.yml index cf2c5f3fb54ee..525debaa9344b 100644 --- a/recipes/isl/all/conandata.yml +++ b/recipes/isl/all/conandata.yml @@ -1,10 +1,15 @@ sources: + "0.26": + url: "https://libisl.sourceforge.io/isl-0.26.tar.xz" + sha256: "a0b5cb06d24f9fa9e77b55fabbe9a3c94a336190345c2555f9915bb38e976504" + "0.25": + url: "https://libisl.sourceforge.io/isl-0.25.tar.xz" + sha256: "be7b210647ccadf90a2f0b000fca11a4d40546374a850db67adb32fad4b230d9" "0.24": - url: "https://libisl.sourceforge.io/isl-0.24.tar.gz" - sha256: "26e6e4d60ad59b3fff9948eb36743f0c874e124e410ef5bab930d0f546bc580d" - "0.23": - url: "https://libisl.sourceforge.io/isl-0.23.tar.gz" - sha256: "19e77cb562ab3da5a37f263208d6f902ae3a9d52c756bf6eb1a6b2f8a74b883c" - "0.22": - url: "https://libisl.sourceforge.io/isl-0.22.tar.gz" - sha256: "d0c6714e4427d3eb964388afe526a8e0f69687da7e944f1ad66ffa639923be46" + url: "https://libisl.sourceforge.io/isl-0.24.tar.xz" + sha256: "043105cc544f416b48736fff8caf077fb0663a717d06b1113f16e391ac99ebad" +patches: + "0.24": + - patch_file: "patches/0.24-0001-fix-ac_test_cflags.patch" + patch_description: "Fix ac_test_CFLAGS logic error" + patch_type: "portability" diff --git a/recipes/isl/all/conanfile.py b/recipes/isl/all/conanfile.py index 139d5fc0036f3..bd3795141c531 100644 --- a/recipes/isl/all/conanfile.py +++ b/recipes/isl/all/conanfile.py @@ -1,9 +1,14 @@ -from conans import AutoToolsBuildEnvironment, ConanFile, tools -from conans.errors import ConanInvalidConfiguration -from contextlib import contextmanager +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.build import cross_building +from conan.tools.files import copy, get, rm, rmdir, apply_conandata_patches, export_conandata_patches +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, msvc_runtime_flag, check_min_vs, unix_path, is_msvc_static_runtime import os -required_conan_version = ">=1.33.0" +required_conan_version = ">=1.58.0" class IslConan(ConanFile): @@ -13,23 +18,24 @@ class IslConan(ConanFile): license = "MIT" homepage = "https://libisl.sourceforge.io" url = "https://github.com/conan-io/conan-center-index" + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], "with_int": ["gmp", "imath", "imath-32"], + "autogen": [True, False], } default_options = { "shared": False, "fPIC": True, "with_int": "gmp", + "autogen": False, } - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -37,97 +43,86 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") def validate(self): if self.settings.os == "Windows" and self.options.shared: raise ConanInvalidConfiguration("Cannot build shared isl library on Windows (due to libtool refusing to link to static/import libraries)") - if self.settings.os == "Macos" and self.settings.arch == "armv8": - raise ConanInvalidConfiguration("Apple M1 is not yet supported. Contributions are welcome") - if self.options.with_int != "gmp": - # FIXME: missing imath recipe - raise ConanInvalidConfiguration("imath is not (yet) available on cci") - if self.settings.compiler == "Visual Studio" and tools.Version(self.settings.compiler.version) < 16 and self.settings.compiler.runtime == "MDd": + if is_apple_os(self) and cross_building(self): + raise ConanInvalidConfiguration("Cross-building with Apple Clang is not supported yet") + if msvc_runtime_flag(self) == "MDd" and not check_min_vs(self, 192, raise_invalid=False): + # isl fails to link with this version of visual studio and MDd runtime: # gmp.lib(bdiv_dbm1c.obj) : fatal error LNK1318: Unexpected PDB error; OK (0) - raise ConanInvalidConfiguration("isl fails to link with this version of visual studio and MDd runtime") + raise ConanInvalidConfiguration("isl cannot be built with MDd runtime with MSVC < 192") def requirements(self): if self.options.with_int == "gmp": - self.requires("gmp/6.2.1") + self.requires("gmp/6.3.0") + elif self.options.with_int == "imath": + self.requires("imath/3.1.9") @property def _settings_build(self): return getattr(self, "settings_build", self.settings) def build_requirements(self): - if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): - self.build_requires("msys2/cci.latest") - if self.settings.compiler == "Visual Studio": - self.build_requires("automake/1.16.4") + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + if self.options.autogen: + self.tool_requires("autoconf/2.71") + self.tool_requires("automake/1.16.5") + self.tool_requires("libtool/2.4.7") + + def package_id(self): + del self.info.options.autogen + + def layout(self): + basic_layout(self, src_folder="src") def source(self): - tools.get(**self.conan_data["sources"][self.version], - strip_root=True, destination=self._source_subfolder) - - @contextmanager - def _build_context(self): - if self.settings.compiler == "Visual Studio": - with tools.vcvars(self.settings): - env = { - "AR": "{} lib".format(tools.unix_path(self.deps_user_info["automake"].ar_lib)), - "CC": "{} cl -nologo -{}".format(tools.unix_path(self.deps_user_info["automake"].compile), self.settings.compiler.runtime), - "CXX": "{} cl -nologo -{}".format(tools.unix_path(self.deps_user_info["automake"].compile), self.settings.compiler.runtime), - "NM": "dumpbin -symbols", - "OBJDUMP": ":", - "RANLIB": ":", - "STRIP": ":", - } - with tools.environment_append(env): - yield - else: - yield - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - self._autotools.libs = [] - yes_no = lambda v: "yes" if v else "no" - conf_args = [ - "--with-int={}".format(self.options.with_int), - "--enable-portable-binary", - "--enable-shared={}".format(yes_no(self.options.shared)), - "--enable-static={}".format(yes_no(not self.options.shared)), - ] + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) + tc.configure_args.append(f'--with-int={self.options.with_int}') + tc.configure_args.append("--enable-portable-binary") if self.options.with_int == "gmp": - conf_args.extend([ - "--with-gmp=system", - "--with-gmp-prefix={}".format(self.deps_cpp_info["gmp"].rootpath.replace("\\", "/")), - ]) - if self.settings.compiler == "Visual Studio": - if tools.Version(self.settings.compiler.version) >= 15: - self._autotools.flags.append("-Zf") - if tools.Version(self.settings.compiler.version) >= 12: - self._autotools.flags.append("-FS") - self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) - return self._autotools + tc.configure_args.append("--with-gmp=system") + tc.configure_args.append(f'--with-gmp-prefix={unix_path(self, self.dependencies["gmp"].package_folder)}') + if is_msvc(self): + if check_min_vs(self, 191, raise_invalid=False): + tc.extra_cflags = ["-Zf"] + if check_min_vs(self, 180, raise_invalid=False): + tc.extra_cflags = ["-FS"] + if is_msvc(self) and self.version == "0.24" and not is_msvc_static_runtime(self): + # Pass BUILD flags to avoid confusion with GCC and mixing of runtime variants + tc.configure_args += ['CC_FOR_BUILD=cl -nologo', f'CFLAGS_FOR_BUILD=-{msvc_runtime_flag(self)}'] + env = tc.environment() + if is_msvc(self): + env.define("CC", "cl -nologo") + env.define("CXX", "cl -nologo") + tc.generate(env) def build(self): - with self._build_context(): - autotools = self._configure_autotools() - autotools.make() + if self.options.autogen: + apply_conandata_patches(self) # Currently, the only patch is for the autogen use case + self.run("./autogen.sh", cwd=self.source_folder) + autotools = Autotools(self) + autotools.configure() + autotools.make() def package(self): - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") - with self._build_context(): - autotools = self._configure_autotools() - autotools.install() - - os.unlink(os.path.join(os.path.join(self.package_folder, "lib", "libisl.la"))) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) + autotools.install() + rm(self, "*.la", os.path.join(os.path.join(self.package_folder, "lib"))) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.names["pkg_config"] = "isl" + self.cpp_info.set_property("pkg_config_name", "isl") self.cpp_info.libs = ["isl"] diff --git a/recipes/isl/all/patches/0.24-0001-fix-ac_test_cflags.patch b/recipes/isl/all/patches/0.24-0001-fix-ac_test_cflags.patch new file mode 100644 index 0000000000000..ac347c50759b3 --- /dev/null +++ b/recipes/isl/all/patches/0.24-0001-fix-ac_test_cflags.patch @@ -0,0 +1,11 @@ +--- m4/ax_cc_maxopt.m4 ++++ m4/ax_cc_maxopt.m4 +@@ -65,7 +65,7 @@ + acx_maxopt_portable=$withval, acx_maxopt_portable=no) + + # Try to determine "good" native compiler flags if none specified via CFLAGS +-if test "$ac_test_CFLAGS" != "set"; then ++if test "x$ac_test_CFLAGS" = "x"; then + CFLAGS="" + case $ax_cv_c_compiler_vendor in + dec) CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host" diff --git a/recipes/isl/all/test_package/CMakeLists.txt b/recipes/isl/all/test_package/CMakeLists.txt index 3a403dc404b41..c40193c08604f 100644 --- a/recipes/isl/all/test_package/CMakeLists.txt +++ b/recipes/isl/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ cmake_minimum_required(VERSION 3.1) project(test_package C) -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup() +find_package(isl REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE isl::isl) diff --git a/recipes/isl/all/test_package/conanfile.py b/recipes/isl/all/test_package/conanfile.py index bd7165a553cf4..7b760066c7165 100644 --- a/recipes/isl/all/test_package/conanfile.py +++ b/recipes/isl/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import cross_building import os class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if not cross_building(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/isl/all/test_v1_package/CMakeLists.txt b/recipes/isl/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..33e5f24630032 --- /dev/null +++ b/recipes/isl/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package C) + +include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") +conan_basic_setup() + +add_executable(${PROJECT_NAME} ../test_package/test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/isl/all/test_v1_package/conanfile.py b/recipes/isl/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..bd7165a553cf4 --- /dev/null +++ b/recipes/isl/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/isl/config.yml b/recipes/isl/config.yml index e0fa5e44a1f96..ae426ef703a32 100644 --- a/recipes/isl/config.yml +++ b/recipes/isl/config.yml @@ -1,7 +1,7 @@ versions: - "0.24": + "0.26": folder: "all" - "0.23": + "0.25": folder: "all" - "0.22": + "0.24": folder: "all" From b7618e9570ef6410d13e3b67843074ac6c727895 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 20 Feb 2024 01:28:54 +0900 Subject: [PATCH 044/405] (#22799) sfl: add version 1.2.4 --- recipes/sfl/all/conandata.yml | 3 +++ recipes/sfl/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/sfl/all/conandata.yml b/recipes/sfl/all/conandata.yml index 78138456b199b..cc5806fe1937d 100644 --- a/recipes/sfl/all/conandata.yml +++ b/recipes/sfl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.4": + url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.2.4.tar.gz" + sha256: "e24d4adb1aff638e17ef49841881992a1020dc951e4e9721b81b76d44ef89f5b" "1.2.3": url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.2.3.tar.gz" sha256: "6111a81b5dcad091c5c8a420d127c1bbfb06f8fbb7d915e6a30b4b7d2d67db71" diff --git a/recipes/sfl/config.yml b/recipes/sfl/config.yml index 81ff4bc37c872..aec9153a51c8d 100644 --- a/recipes/sfl/config.yml +++ b/recipes/sfl/config.yml @@ -1,3 +1,5 @@ versions: + "1.2.4": + folder: "all" "1.2.3": folder: "all" From c723e367a32bdafd5b2dac5173578c0994365a3f Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 19 Feb 2024 17:49:29 +0100 Subject: [PATCH 045/405] (#22804) tinyply: do not remove fPIC option if static * do not remove fPIC option if static * add libm to system libs --- recipes/tinyply/all/conanfile.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/tinyply/all/conanfile.py b/recipes/tinyply/all/conanfile.py index cd8d6bcce424f..97b1320f978d5 100644 --- a/recipes/tinyply/all/conanfile.py +++ b/recipes/tinyply/all/conanfile.py @@ -31,7 +31,8 @@ def config_options(self): del self.options.fPIC def configure(self): - self.options.rm_safe("fPIC") + if self.options.shared: + self.options.rm_safe("fPIC") def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -73,3 +74,5 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "tinyply::tinyply") self.cpp_info.set_property("pkg_config_name", "tinyply") self.cpp_info.libs = collect_libs(self) + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") From 8f3188b13b7c9f110c31975355fe4793cf737cb7 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 20 Feb 2024 17:27:44 +0900 Subject: [PATCH 046/405] (#22825) daw_header_libraries: add version 2.101.0 --- recipes/daw_header_libraries/all/conandata.yml | 3 +++ recipes/daw_header_libraries/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/daw_header_libraries/all/conandata.yml b/recipes/daw_header_libraries/all/conandata.yml index e2ae0afea2244..da4d268e47a7d 100644 --- a/recipes/daw_header_libraries/all/conandata.yml +++ b/recipes/daw_header_libraries/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.101.0": + url: "https://github.com/beached/header_libraries/archive/v2.101.0.tar.gz" + sha256: "468b3a40b90295f1da8eb79ae5723909269c020e7e8bf3d93d3f4fac7c35195b" "2.98.5": url: "https://github.com/beached/header_libraries/archive/v2.98.5.tar.gz" sha256: "2d548a6f7a860917e2f743ee75e82733cbf0d3720b7296da023c5a17a9010c9a" diff --git a/recipes/daw_header_libraries/config.yml b/recipes/daw_header_libraries/config.yml index a97facd0bf9ff..209a906c305c7 100644 --- a/recipes/daw_header_libraries/config.yml +++ b/recipes/daw_header_libraries/config.yml @@ -1,4 +1,6 @@ versions: + "2.101.0": + folder: all "2.98.5": folder: all "2.97.0": From 106c11a55444e15822572a0f0c351087ade48b2d Mon Sep 17 00:00:00 2001 From: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com> Date: Tue, 20 Feb 2024 02:47:59 -0600 Subject: [PATCH 047/405] (#22655) cpptrace: Add v0.4.0 * Prepare for 0.4.0 * Set CPPTRACE_USE_EXTERNAL_ZSTD * Attempt to fix build issue * Try a printbug... * Ok I think actually fixed this time * Fix endline issue * rc2 * Fix test package * oops * Now ready to go I think * Use libdwarf 0.9.1 * Use exact versions * Patch zstd handling --- recipes/cpptrace/all/conandata.yml | 13 ++++ recipes/cpptrace/all/conanfile.py | 8 ++- .../patches/0.4.0/0001-libdwarf_path.patch | 12 ++++ .../all/patches/0.4.0/0002-zstd.patch | 72 +++++++++++++++++++ .../cpptrace/all/test_package/CMakeLists.txt | 4 ++ .../all/test_package/test_package.cpp | 8 +++ recipes/cpptrace/config.yml | 2 + 7 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 recipes/cpptrace/all/patches/0.4.0/0001-libdwarf_path.patch create mode 100644 recipes/cpptrace/all/patches/0.4.0/0002-zstd.patch diff --git a/recipes/cpptrace/all/conandata.yml b/recipes/cpptrace/all/conandata.yml index d032d0a5a873d..b9844d75c4190 100644 --- a/recipes/cpptrace/all/conandata.yml +++ b/recipes/cpptrace/all/conandata.yml @@ -1,5 +1,9 @@ sources: # Newer versions at the top + "0.4.0": + url: + - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.4.0.tar.gz" + sha256: "eef368f5bed2d85c976ea90b325e4c9bfc1b9618cbbfa15bf088adc8fa98ff89" "0.3.1": url: - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.3.1.tar.gz" @@ -13,6 +17,15 @@ sources: - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.2.1.tar.gz" sha256: "3184f404c61b6b8ba6fe7c64fc40d1c3d6d87df59bcacf1845d846101bc22f9a" patches: + "0.4.0": + - patch_file: "patches/0.4.0/0001-libdwarf_path.patch" + patch_type: "conan" + patch_source: "https://github.com/jeremy-rifkin/cpptrace/commit/a1624238000c794243e20801dc2b35b2f847d492" + patch_description: "Use new libdwarf header placement" + - patch_file: "patches/0.4.0/0002-zstd.patch" + patch_type: "conan" + patch_source: "https://github.com/jeremy-rifkin/cpptrace/commit/b7d14bc952111df973268c76133bb8ad99afdeb0" + patch_description: "Zstd is handled by libdwarf" "0.3.0": - patch_file: "patches/0.3.0/0001-cpptrace_export.patch" patch_type: "bugfix" diff --git a/recipes/cpptrace/all/conanfile.py b/recipes/cpptrace/all/conanfile.py index f96b276006f6d..f0aee2a68a632 100644 --- a/recipes/cpptrace/all/conanfile.py +++ b/recipes/cpptrace/all/conanfile.py @@ -43,7 +43,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("libdwarf/0.8.0") + if Version(self.version) >= Version("0.4.0"): + self.requires("libdwarf/0.9.1") + else: + self.requires("libdwarf/0.8.0") def validate(self): if self.settings.compiler.cppstd: @@ -105,6 +108,9 @@ def package_info(self): if self.settings.os == "Windows": self.cpp_info.system_libs.append("dbghelp") + if not self.options.shared: + self.cpp_info.defines.append("CPPTRACE_STATIC_DEFINE") + # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "CPPTRACE" self.cpp_info.filenames["cmake_find_package_multi"] = "cpptrace" diff --git a/recipes/cpptrace/all/patches/0.4.0/0001-libdwarf_path.patch b/recipes/cpptrace/all/patches/0.4.0/0001-libdwarf_path.patch new file mode 100644 index 0000000000000..4561234caabeb --- /dev/null +++ b/recipes/cpptrace/all/patches/0.4.0/0001-libdwarf_path.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e077cf8..2f848dd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -404,7 +404,6 @@ if(CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF) + endif() + if(CPPTRACE_CONAN) + target_link_libraries(${target_name} PRIVATE libdwarf::libdwarf) +- target_compile_definitions(${target_name} PRIVATE CPPTRACE_USE_NESTED_LIBDWARF_HEADER_PATH) + elseif(CPPTRACE_VCPKG) + target_link_libraries(${target_name} PRIVATE libdwarf::dwarf) + elseif(CPPTRACE_USE_EXTERNAL_LIBDWARF) diff --git a/recipes/cpptrace/all/patches/0.4.0/0002-zstd.patch b/recipes/cpptrace/all/patches/0.4.0/0002-zstd.patch new file mode 100644 index 0000000000000..97ccd388d4128 --- /dev/null +++ b/recipes/cpptrace/all/patches/0.4.0/0002-zstd.patch @@ -0,0 +1,72 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2f848dd..8f3ec74 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -338,40 +338,39 @@ endif() + + if(CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF) + target_compile_definitions(${target_name} PUBLIC CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF) +- # First, dependencies: Zstd and zlib (currently relying on system zlib) +- if(CPPTRACE_USE_EXTERNAL_ZSTD) +- find_package(zstd) +- else() +- include(FetchContent) +- cmake_policy(SET CMP0074 NEW) +- FetchContent_Declare( +- zstd +- GIT_REPOSITORY https://github.com/facebook/zstd.git +- GIT_TAG 63779c798237346c2b245c546c40b72a5a5913fe # v1.5.5 +- GIT_SHALLOW 1 +- SOURCE_SUBDIR build/cmake +- ) +- # FetchContent_MakeAvailable(zstd) +- FetchContent_GetProperties(zstd) +- if(NOT zstd_POPULATED) +- FetchContent_Populate(zstd) +- set(ZSTD_BUILD_PROGRAMS OFF) +- set(ZSTD_BUILD_CONTRIB OFF) +- set(ZSTD_BUILD_TESTS OFF) +- set(ZSTD_BUILD_STATIC ON) +- set(ZSTD_BUILD_SHARED OFF) +- set(ZSTD_LEGACY_SUPPORT OFF) +- add_subdirectory("${zstd_SOURCE_DIR}/build/cmake" "${zstd_BINARY_DIR}") +- endif() +- endif() +- # Libdwarf itself + if(CPPTRACE_USE_EXTERNAL_LIBDWARF) + find_package(libdwarf REQUIRED) + else() ++ include(FetchContent) ++ # First, dependencies: Zstd and zlib (currently relying on system zlib) ++ if(CPPTRACE_USE_EXTERNAL_ZSTD) ++ find_package(zstd) ++ else() ++ cmake_policy(SET CMP0074 NEW) ++ FetchContent_Declare( ++ zstd ++ GIT_REPOSITORY https://github.com/facebook/zstd.git ++ GIT_TAG 63779c798237346c2b245c546c40b72a5a5913fe # v1.5.5 ++ GIT_SHALLOW 1 ++ SOURCE_SUBDIR build/cmake ++ ) ++ # FetchContent_MakeAvailable(zstd) ++ FetchContent_GetProperties(zstd) ++ if(NOT zstd_POPULATED) ++ FetchContent_Populate(zstd) ++ set(ZSTD_BUILD_PROGRAMS OFF) ++ set(ZSTD_BUILD_CONTRIB OFF) ++ set(ZSTD_BUILD_TESTS OFF) ++ set(ZSTD_BUILD_STATIC ON) ++ set(ZSTD_BUILD_SHARED OFF) ++ set(ZSTD_LEGACY_SUPPORT OFF) ++ add_subdirectory("${zstd_SOURCE_DIR}/build/cmake" "${zstd_BINARY_DIR}") ++ endif() ++ endif() ++ # Libdwarf itself + set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) + # set(PIC_ALWAYS TRUE) + # set(BUILD_DWARFDUMP FALSE) +- include(FetchContent) + FetchContent_Declare( + libdwarf + # GIT_REPOSITORY https://github.com/davea42/libdwarf-code.git diff --git a/recipes/cpptrace/all/test_package/CMakeLists.txt b/recipes/cpptrace/all/test_package/CMakeLists.txt index 413751877cee8..b0651acbdbd44 100644 --- a/recipes/cpptrace/all/test_package/CMakeLists.txt +++ b/recipes/cpptrace/all/test_package/CMakeLists.txt @@ -8,3 +8,7 @@ add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE cpptrace::cpptrace) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) + +if(${cpptrace_VERSION} VERSION_GREATER_EQUAL "0.4.0") + target_compile_definitions(${PROJECT_NAME} PRIVATE CTRACE) +endif() diff --git a/recipes/cpptrace/all/test_package/test_package.cpp b/recipes/cpptrace/all/test_package/test_package.cpp index bc640e59ffc24..e663d6aea698f 100644 --- a/recipes/cpptrace/all/test_package/test_package.cpp +++ b/recipes/cpptrace/all/test_package/test_package.cpp @@ -1,9 +1,17 @@ #include #include +#include #include +#ifdef CTRACE +#include +#endif int main() { cpptrace::generate_trace().print(); + + #ifdef CTRACE + ctrace_stacktrace c_trace = ctrace_generate_trace(0, SIZE_MAX); + #endif return EXIT_SUCCESS; } diff --git a/recipes/cpptrace/config.yml b/recipes/cpptrace/config.yml index c4a25b816da1e..c04879bd49824 100644 --- a/recipes/cpptrace/config.yml +++ b/recipes/cpptrace/config.yml @@ -1,5 +1,7 @@ versions: # Newer versions at the top + "0.4.0": + folder: all "0.3.1": folder: all "0.3.0": From 86e9a819a672f9ed7490c111e9f7b1e83e626c29 Mon Sep 17 00:00:00 2001 From: tt4g <45120617+tt4g@users.noreply.github.com> Date: Tue, 20 Feb 2024 18:07:50 +0900 Subject: [PATCH 048/405] (#22814) libpqxx: add version 7.9.0 --- recipes/libpqxx/all/conandata.yml | 7 +++++++ recipes/libpqxx/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/libpqxx/all/conandata.yml b/recipes/libpqxx/all/conandata.yml index dcbdf0b15a551..4d1617ceb885b 100644 --- a/recipes/libpqxx/all/conandata.yml +++ b/recipes/libpqxx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "7.9.0": + url: "https://github.com/jtv/libpqxx/archive/refs/tags/7.9.0.tar.gz" + sha256: "a1fafd5f6455f6c66241fca1f35f5cb603251580b99f9a0cf1b5d0a586006f16" "7.8.1": url: "https://github.com/jtv/libpqxx/archive/refs/tags/7.8.1.tar.gz" sha256: "0f4c0762de45a415c9fd7357ce508666fa88b9a4a463f5fb76c235bc80dd6a84" @@ -24,6 +27,10 @@ sources: url: "https://github.com/jtv/libpqxx/archive/6.4.8.tar.gz" sha256: "3f7aba951822e01f1b9f9f353702954773323dd9f9dc376ffb57cb6bbd9a7a2f" patches: + "7.9.0": + - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" "7.8.1": - patch_file: "patches/0001-cmake-fix-module.patch" patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." diff --git a/recipes/libpqxx/config.yml b/recipes/libpqxx/config.yml index 9d72f7f742ccb..4c8b35797bd1a 100644 --- a/recipes/libpqxx/config.yml +++ b/recipes/libpqxx/config.yml @@ -1,4 +1,6 @@ versions: + "7.9.0": + folder: all "7.8.1": folder: all "7.8.0": From bcf400f4d7c42b564cec10cbd92aa37741ec154f Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 20 Feb 2024 18:27:45 +0900 Subject: [PATCH 049/405] (#22815) highway: add version 1.1.0 --- recipes/highway/all/conandata.yml | 3 +++ recipes/highway/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/highway/all/conandata.yml b/recipes/highway/all/conandata.yml index 710781f517c65..959f287f753da 100644 --- a/recipes/highway/all/conandata.yml +++ b/recipes/highway/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/google/highway/archive/1.1.0.tar.gz" + sha256: "354a8b4539b588e70b98ec70844273e3f2741302c4c377bcc4e81b3d1866f7c9" "1.0.7": url: "https://github.com/google/highway/archive/1.0.7.tar.gz" sha256: "5434488108186c170a5e2fca5e3c9b6ef59a1caa4d520b008a9b8be6b8abe6c5" diff --git a/recipes/highway/config.yml b/recipes/highway/config.yml index 51114d87501db..1af21a7852ddb 100644 --- a/recipes/highway/config.yml +++ b/recipes/highway/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.0": + folder: all "1.0.7": folder: all "1.0.6": From 516fc44ea0120b66c6ec50ea54888c3af70a6983 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 20 Feb 2024 18:47:53 +0900 Subject: [PATCH 050/405] (#22826) scnlib: add version 2.0.2 --- recipes/scnlib/all/conandata.yml | 7 +++++++ recipes/scnlib/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/scnlib/all/conandata.yml b/recipes/scnlib/all/conandata.yml index 959e4c6aa3f22..6655f8d077d01 100644 --- a/recipes/scnlib/all/conandata.yml +++ b/recipes/scnlib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.2": + url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v2.0.2.tar.gz" + sha256: "a485076b8710576cf05fbc086d39499d16804575c0660b0dfaeeaf7823660a17" "2.0.1": url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v2.0.1.tar.gz" sha256: "f399d1b1f36f5d53a2d63fd2974797ab8f3f7e69c424d9661253830cb793b72e" @@ -15,6 +18,10 @@ sources: url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v1.0.tar.gz" sha256: "5b8333e522206c2a74e57a9c9544c4fe4e7858cfe93e216905b463eaf91af5fe" patches: + "2.0.2": + - patch_file: "patches/2.0.0-0001-remove-re2-version.patch" + patch_description: "remove re2 version on find_package" + patch_type: "portability" "2.0.1": - patch_file: "patches/2.0.0-0001-remove-re2-version.patch" patch_description: "remove re2 version on find_package" diff --git a/recipes/scnlib/config.yml b/recipes/scnlib/config.yml index 8c5c4f8a7d9ec..9f31088bdf1c3 100644 --- a/recipes/scnlib/config.yml +++ b/recipes/scnlib/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.2": + folder: all "2.0.1": folder: all "2.0.0": From 99ebdafc60a6811e5ed63b7c5b4ac9ece9b37fec Mon Sep 17 00:00:00 2001 From: ViktarHasiul231862 <36881808+ViktarHasiul231862@users.noreply.github.com> Date: Tue, 20 Feb 2024 12:02:56 +0100 Subject: [PATCH 051/405] (#18009) Allow to set ENABLE_HARU and WT_RASTERIMAGE_IMPLEMENTATION * Allow to set ENABLE_HARU and WT_RASTERIMAGE_IMPLEMENTATION * add libharu to requirements * set HARU_PREFIX and haru package_info --- recipes/wt/all/conanfile.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py index fc0eb757303bd..f52c69a8dfbb5 100644 --- a/recipes/wt/all/conanfile.py +++ b/recipes/wt/all/conanfile.py @@ -32,6 +32,8 @@ class WtConan(ConanFile): "with_dbo": [True, False], "with_opengl": [True, False], "with_unwind": [True, False], + "with_haru": [True, False], + "raster_image": ["none", "Direct2D", "GraphicsMagick"], "no_std_locale": [True, False], "no_std_wstring": [True, False], "multi_threaded": [True, False], @@ -51,6 +53,8 @@ class WtConan(ConanFile): "with_dbo": True, "with_opengl": False, "with_unwind": True, + "with_haru": False, + "raster_image": "none", "no_std_locale": False, "no_std_wstring": False, "multi_threaded": True, @@ -112,7 +116,9 @@ def requirements(self): self.requires("odbc/2.3.11") if self.options.get_safe("with_unwind"): self.requires("libunwind/1.7.2") - + if self.options.with_haru: + self.requires("libharu/2.4.3") + def validate(self): miss_boost_required_comp = any(self.dependencies["boost"].options.get_safe(f"without_{boost_comp}", True) for boost_comp in self._required_boost_components) @@ -121,6 +127,8 @@ def validate(self): f"{self.ref} requires non header-only boost with these components: " f"{', '.join(self._required_boost_components)}" ) + if self.options.get_safe("raster_image", "none") == "Direct2D" and self.settings.os != "Windows": + raise ConanInvalidConfiguration("Direct2D is supported only on Windows.") # FIXME: https://redmine.emweb.be/issues/12073w if conan_version.major == 2 and Version(self.version) == "4.10.1" and is_msvc(self): @@ -178,7 +186,7 @@ def generate(self): tc.variables["BUILD_EXAMPLES"] = False tc.variables["BUILD_TESTS"] = False tc.variables["ENABLE_SSL"] = self.options.with_ssl - tc.variables["ENABLE_HARU"] = False + tc.variables["ENABLE_HARU"] = self.options.with_haru tc.variables["ENABLE_PANGO"] = False tc.variables["ENABLE_SQLITE"] = self.options.get_safe("with_sqlite", False) tc.variables["ENABLE_POSTGRES"] = self.options.get_safe("with_postgres", False) @@ -191,6 +199,7 @@ def generate(self): tc.variables["ENABLE_LIBWTDBO"] = self.options.with_dbo tc.variables["ENABLE_OPENGL"] = self.options.with_opengl tc.variables["ENABLE_UNWIND"] = self.options.get_safe("with_unwind", False) + tc.variables["WT_WRASTERIMAGE_IMPLEMENTATION"] = self.options.get_safe("raster_image", "none") tc.variables["WT_NO_STD_LOCALE"] = self.options.no_std_locale tc.variables["WT_NO_STD_WSTRING"] = self.options.no_std_wstring tc.variables["MULTI_THREADED"] = self.options.multi_threaded @@ -227,6 +236,8 @@ def generate(self): tc.variables["ODBC_LIBRARIES"] = self._cmakify_path_list(self._find_libraries("odbc")) tc.variables["ODBC_INCLUDE"] = self._cmakify_path_list(self.dependencies["odbc"].cpp_info.aggregated_components().includedirs) tc.variables["ODBC_FOUND"] = True + if self.options.with_haru: + tc.variables["HARU_PREFIX"] = self._cmakify_path_list(self.dependencies["libharu"].package_folder) if self.options.get_safe("with_unwind"): tc.variables["UNWIND_PREFIX"] = self._cmakify_path_list([self.dependencies["libunwind"].package_folder]) if self.settings.os == "Windows": @@ -306,6 +317,8 @@ def package_info(self): self.cpp_info.components["wtmain"].requires.append("openssl::openssl") if self.options.get_safe("with_unwind"): self.cpp_info.components["wtmain"].requires.append("libunwind::libunwind") + if self.options.with_haru: + self.cpp_info.components["wtmain"].requires.append("libharu::libharu") # wttest if self.options.with_test: From 3fd13921873e57fb64a6d17c5f607f7e76f444d2 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 20 Feb 2024 20:27:58 +0900 Subject: [PATCH 052/405] (#22729) uwebsockets: add version 20.60.0, remove older versions * uwebsockets: add version 20.59.0, remove older versions * add LANGUAGES in CMakeLists.txt * update 20.60.0 --- recipes/uwebsockets/all/conandata.yml | 18 +++--------------- recipes/uwebsockets/all/conanfile.py | 4 +--- .../all/test_package/CMakeLists.txt | 2 +- recipes/uwebsockets/config.yml | 12 ++---------- 4 files changed, 7 insertions(+), 29 deletions(-) diff --git a/recipes/uwebsockets/all/conandata.yml b/recipes/uwebsockets/all/conandata.yml index 45a3d889c4355..cb3f534499ced 100644 --- a/recipes/uwebsockets/all/conandata.yml +++ b/recipes/uwebsockets/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "20.60.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.60.0.tar.gz" + sha256: "eb72223768f93d40038181653ee5b59a53736448a6ff4e8924fd56b2fcdc00db" "20.58.0": url: "https://github.com/uNetworking/uWebSockets/archive/v20.58.0.tar.gz" sha256: "f71ca310cc5c39b12f56db1cf85727ee4d0f03fdf019a9e14ef4ba08addc6077" @@ -14,21 +17,6 @@ sources: "20.53.0": url: "https://github.com/uNetworking/uWebSockets/archive/v20.53.0.tar.gz" sha256: "324b857e787a472bd258aaa66f5ceeac6b01ebc41bbb423fff71559d72872783" - "20.51.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.51.0.tar.gz" - sha256: "6794e7895eb8cc182024a0ae482a581eaa82f55f7cca53ae88b30738449f3cb9" - "20.49.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.49.0.tar.gz" - sha256: "c596d6f63554a42397a86233aaa47883db1cad2a231ad8608dbaea165c0910b5" - "20.48.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.48.0.tar.gz" - sha256: "d7455bbbf9829b3960d0478dd36ed0eba82847c4fc801416aaf89ccb7f4dfb85" - "20.47.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.47.0.tar.gz" - sha256: "00641b7cd2ffadd2c505e2a83a2e32bf342f01c2538bf7470f655e707adde31a" - "20.45.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.45.0.tar.gz" - sha256: "db7599e9eac0c18b76740e7c391663652e0d7188b992a1a5a8dc28f347f483ec" "19.3.0": url: "https://github.com/uNetworking/uWebSockets/archive/v19.3.0.tar.gz" sha256: "6f709b4e5fe053a94a952da93c07c919b36bcb8c838c69067560ae85f97c5621" diff --git a/recipes/uwebsockets/all/conanfile.py b/recipes/uwebsockets/all/conanfile.py index 374ab9a0e5e74..27af62e1db549 100644 --- a/recipes/uwebsockets/all/conanfile.py +++ b/recipes/uwebsockets/all/conanfile.py @@ -56,9 +56,7 @@ def requirements(self): self.requires("libdeflate/1.19") if Version(self.version) > "20.17.0": - self.requires("usockets/0.8.6") - elif Version(self.version) >= "20.15.0": - self.requires("usockets/0.8.2") + self.requires("usockets/0.8.8") elif Version(self.version) >= "19.0.0": self.requires("usockets/0.8.1") else: diff --git a/recipes/uwebsockets/all/test_package/CMakeLists.txt b/recipes/uwebsockets/all/test_package/CMakeLists.txt index 38145240aeafa..4d46e640ceb5a 100644 --- a/recipes/uwebsockets/all/test_package/CMakeLists.txt +++ b/recipes/uwebsockets/all/test_package/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.8) -project(test_package) +project(test_package LANGUAGES CXX) find_package(uwebsockets REQUIRED CONFIG) diff --git a/recipes/uwebsockets/config.yml b/recipes/uwebsockets/config.yml index a0a20412a5302..fd6362a846ec1 100644 --- a/recipes/uwebsockets/config.yml +++ b/recipes/uwebsockets/config.yml @@ -1,4 +1,6 @@ versions: + "20.60.0": + folder: all "20.58.0": folder: all "20.57.0": @@ -9,16 +11,6 @@ versions: folder: all "20.53.0": folder: all - "20.51.0": - folder: all - "20.49.0": - folder: all - "20.48.0": - folder: all - "20.47.0": - folder: all - "20.45.0": - folder: all "19.3.0": folder: all "18.3.0": From a1c6c89490c59f5d1b7a7dec0ebf8fa125128283 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 20 Feb 2024 15:23:46 +0200 Subject: [PATCH 053/405] (#19298) gdal: migrate to Conan v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gdal: migrate to Conan v2 * gdal/post_3.5.0: bump deps * gdal/post_3.5.0: propagate libjpeg dependency option in graph * gdal/post_3.5.0: migrate to Conan v2, WIP * gdal/post_3.5.0: tidy * gdal/post_3.5.0: adapt ConanFindPackage.cmake to make use of deps.set_properties() for renames * gdal/post_3.5.0: drop v3.5.1 * gdal/post_3.5.0: fix external json-c not being used * gdal/post_3.5.0: update v3.7.0, replace gdal_target_link_libraries everywhere * gdal/post_3.5.0: always use zlib * gdal/post_3.5.0: fix OpenEXR, HDF4, Arrow support * gdal/post_3.5.0: more deps fixes * gdal/post_3.5.0: add libarchive support * gdal/post_3.5.0: add libjxl support * gdal/post_3.5.0: add lerc support * gdal/post_3.5.0: add basisu support * gdal/post_3.5.0: add LZMA support * gdal/post_3.5.0: add pdfium support * gdal/post_3.5.0: add rasterlite2 support * gdal/post_3.5.0: add missing GDAL_USE_*_INTERNAL vars * gdal/post_3.5.0: did not mean to enable rasterlite2 by default * gdal/post_3.5.0: fix rasterlite2 issue * gdal/post_3.5.0: add spatialite support * gdal/post_3.5.0: add external shapelib support * gdal/post_3.5.0: fix typo * gdal/post_3.5.0: make libtiff a required dependency GDAL always requires either an external or internal version of it, so might as well always use the non-vendored one. * gdal/post_3.5.0: make internal-only deps configurable, don't use external shapelib * gdal/post_3.5.0: ignore deprecated options in package_id * gdal/post_3.5.0: bump deps * gdal/post_3.5.0: merge and sort external/internal cmake settings * gdal/post_3.5.0: set GDAL_SET_INSTALL_RELATIVE_RPATH=True * gdal/post_3.5.0: add with_publicdecompwt option * gdal/post_3.5.0: set all recommended and required options to True * gdal/post_3.5.0: proj is not really an optional dependency * gdal/post_3.5.0: separate commercial libs in pkg list * gdal/post_3.5.0: add v3.7.1, simplify patches * gdal/post_3.5.0: downgrade libpq * gdal/post_3.5.0: configure all available GDAL_USE_* variables * gdal/post_3.5.0: prevent any accidental use of system libs * gdal/post_3.5.0: add QUIET to find_package2() * gdal/post_3.5.0: fix libjpeg-turbo support * gdal/post_3.5.0: fix jxl_threads support * gdal: bump deps * gdal: fix shared builds Reverted back to using gdal_target_link_libraries() and fixed a number of issues caused by recursive CMakeDeps targets. * gdal: use version ranges for libcurl and zlib * gdal: fix v5.3.2 patch * gdal: fix includes not being propagated correctly * gdal: Conan v1 issue * gdal: fix linter warnings * gdal: fix patch issue * gdal: bump to 3.7.2 * gdal/post_3.5.0: bump deps * gdal/post_3.5.0: add missing system libs * gdal: add v3.8.0, v3.7.3, v3.5.3, drop old versions * gdal: bump deps * gdal: disable pdfium * gdal: update config.yml * gdal: fix failing compilation checks on MSVC * gdal: downgrade sqlite3 for proj * gdal: fix hdf5 check * gdal: add brunsli support * gdal: add opencl support * gdal: add tiledb * gdal: add ecw support * gdal: bump sqlite3 dependency * gdal: fix brunsli option * gdal: fix gdal data not being packaged Fixes #15660. * gdal: bump deps * gdal: bump to v3.8.1 * gdal: improve patching * gdal: disable libiconv on macOS * gdal: drop ineffective libjpeg-turbo propagation * gdal: bump deps * gdal: add parquet support * gdal: avoid the use of cache_variables * gdal: configure ArrowDataset correctly * gdal: fix ArrowDataset support by version * gdal: fix arrow target name on 3.5 * gdal: disable arrow for v3.5 * gdal: bump to v3.8.2 * gdal: bump arrow * gdal: further mark proprietary deps as such * gdal: add libaec support * gdal: bump proj Co-authored-by: Matthieu Darbois * gdal: add a workaround for iconv() incompatibilities * gdal: fix v3.5.3 URL and related patch * gdal: re-enable libiconv for apple-clang * gdal: add short comments for deprecated options * gdal: libiconv patches can be avoided * gdal: revert 3.5.3 to v3.5.2 due to patching issues * gdal: split two unrelated patches * gdal: fix mistake in patch splitting * gdal: prevent the use of system libs better * gdal: simplify 2-allow-cycles-in-cmake-targets.patch * gdal: bump v3.5.2 -> v3.5.3 * gdal: drop unused import * gdal: bump 3.8.2 -> 3.8.3 * gdal: bump deps * gdal: enable Armadillo * gdal: bump deps * gdal: fix a v3.5.3 CMake bug * gdal: add CMAKE_TRY_COMPILE_CONFIGURATION for try_compile() * Add deprecation warning message * Do not set json-c include folder * fix missing if condition --------- Co-authored-by: Matthieu Darbois Co-authored-by: Rubén Rincón Blanco Co-authored-by: Uilian Ries --- recipes/gdal/config.yml | 6 +- recipes/gdal/post_3.5.0/CMakeLists.txt | 105 +- .../post_3.5.0/cmake/ConanFindPackage.cmake | 48 + recipes/gdal/post_3.5.0/conandata.yml | 57 +- recipes/gdal/post_3.5.0/conanfile.py | 1207 ++++++++--------- .../3.5.1/0-replace-find-package.patch | 266 ---- .../3.5.2/0-replace-find-package.patch | 266 ---- .../3.5.3/0-replace-find-package.patch | 74 + .../1-do-not-force-private-linking.patch | 20 + .../2-allow-cycles-in-cmake-targets.patch | 22 + .../3.7.0/0-replace-find-package.patch | 282 ---- .../3.7.3/0-replace-find-package.patch | 64 + .../1-do-not-force-private-linking.patch | 20 + .../3.8.1/0-replace-find-package.patch | 52 + .../post_3.5.0/test_package/CMakeLists.txt | 7 +- .../gdal/post_3.5.0/test_package/conanfile.py | 33 +- .../post_3.5.0/test_v1_package/CMakeLists.txt | 8 + .../post_3.5.0/test_v1_package/conanfile.py | 23 + 18 files changed, 960 insertions(+), 1600 deletions(-) create mode 100644 recipes/gdal/post_3.5.0/cmake/ConanFindPackage.cmake delete mode 100644 recipes/gdal/post_3.5.0/patches/3.5.1/0-replace-find-package.patch delete mode 100644 recipes/gdal/post_3.5.0/patches/3.5.2/0-replace-find-package.patch create mode 100644 recipes/gdal/post_3.5.0/patches/3.5.3/0-replace-find-package.patch create mode 100644 recipes/gdal/post_3.5.0/patches/3.5.3/1-do-not-force-private-linking.patch create mode 100644 recipes/gdal/post_3.5.0/patches/3.5.3/2-allow-cycles-in-cmake-targets.patch delete mode 100644 recipes/gdal/post_3.5.0/patches/3.7.0/0-replace-find-package.patch create mode 100644 recipes/gdal/post_3.5.0/patches/3.7.3/0-replace-find-package.patch create mode 100644 recipes/gdal/post_3.5.0/patches/3.7.3/1-do-not-force-private-linking.patch create mode 100644 recipes/gdal/post_3.5.0/patches/3.8.1/0-replace-find-package.patch create mode 100644 recipes/gdal/post_3.5.0/test_v1_package/CMakeLists.txt create mode 100644 recipes/gdal/post_3.5.0/test_v1_package/conanfile.py diff --git a/recipes/gdal/config.yml b/recipes/gdal/config.yml index a2ce278d92965..a7240af75cc2e 100644 --- a/recipes/gdal/config.yml +++ b/recipes/gdal/config.yml @@ -1,9 +1,9 @@ versions: - "3.7.0": + "3.8.3": folder: "post_3.5.0" - "3.5.2": + "3.7.3": folder: "post_3.5.0" - "3.5.1": + "3.5.3": folder: "post_3.5.0" "3.4.3": folder: "pre_3.5.0" diff --git a/recipes/gdal/post_3.5.0/CMakeLists.txt b/recipes/gdal/post_3.5.0/CMakeLists.txt index 7c7f67a48db89..1a526ad3ffa0e 100644 --- a/recipes/gdal/post_3.5.0/CMakeLists.txt +++ b/recipes/gdal/post_3.5.0/CMakeLists.txt @@ -1,50 +1,7 @@ cmake_minimum_required(VERSION 3.15) project(gdal_cmake_wrapper) -set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -include(CMakePushCheckState) - - -if (${GDAL_USE_POPPLER}) - find_package(poppler) - set(Poppler_VERSION_STRING ${poppler_VERSION}) - add_library(Poppler::Poppler ALIAS poppler::libpoppler) -endif() - -file(GLOB CONAN_GENERATED_CMAKE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/Find*.cmake") -foreach(CMAKE_FILE ${CONAN_GENERATED_CMAKE_FILES}) - include(${CMAKE_FILE}) -endforeach() - -if (${GDAL_USE_ARROW}) - find_package(Arrow REQUIRED) - add_library(arrow_shared ALIAS arrow::arrow) -endif() - -if (${GDAL_USE_CRYPTOPP}) - find_package(cryptopp REQUIRED) - add_library(CRYPTOPP::CRYPTOPP ALIAS ${TARGET_FOR_CRYPTOPP}) -endif() - -if (${GDAL_USE_DEFLATE}) - find_package(libdeflate REQUIRED) - add_library(Deflate::Deflate ALIAS ${TARGET_FOR_DEFLATE}) -endif() - -if (${GDAL_USE_LZ4}) - find_package(lz4 REQUIRED) - add_library(LZ4::LZ4 ALIAS lz4::lz4) -endif() - -if (${GDAL_USE_BLOSC}) - find_package(c-blosc REQUIRED) - add_library(Blosc::Blosc ALIAS c-blosc::c-blosc) -endif() - -if (${GDAL_USE_OPENEXR}) +if (GDAL_USE_OPENEXR) find_package(Imath REQUIRED) find_package(OpenEXR REQUIRED) add_library(OpenEXR::IlmImf ALIAS OpenEXR::IlmThread) @@ -56,62 +13,4 @@ if (${GDAL_USE_OPENEXR}) target_include_directories(OpenEXR::OpenEXR INTERFACE ${OpenEXR_INCLUDE_DIR}) endif() -if (${GDAL_USE_FREEXL}) - find_package(freexl REQUIRED) - add_library(FREEXL::freexl ALIAS freexl::freexl) -endif() - -if (${GDAL_USE_OPENJPEG}) - add_library(OPENJPEG::OpenJPEG ALIAS OpenJPEG::OpenJPEG) -endif() - -if (${GDAL_USE_GIF}) - find_package(GIF REQUIRED) -endif() - -if (${GDAL_USE_CFITSIO}) - find_package(cfitsio) - add_library(CFITSIO::CFITSIO ALIAS cfitsio::cfitsio) -endif() - -if (${GDAL_USE_SQLITE3}) - find_package(SQLite3) -endif() - -if (${GDAL_USE_LIBXML2}) - find_package(LibXml2) -endif() - -if (${GDAL_USE_POSTGRESQL}) - find_package(PostgreSQL) - add_library(PostgreSQL::PostgreSQL ALIAS PostgreSQL::pq) -endif() - -if (${GDAL_USE_HDF5}) - find_package(HDF5) - set(HDF5_C_LIBRARIES HDF5::C) -endif() - -if ("${GDAL_CONAN_PACKAGE_FOR_MYSQL}" STREQUAL "libmysqlclient") - find_package(mysql REQUIRED) -endif() -if ("${GDAL_CONAN_PACKAGE_FOR_MYSQL}" STREQUAL "mariadb-connector-c") - find_package(mariadb-connector-c REQUIRED) -endif() - -if (${GDAL_USE_ZLIB}) - find_package(ZLIB) -endif() - -if ("${GDAL_CONAN_PACKAGE_FOR_JPEG}" STREQUAL "libjpeg-turbo") - find_package(libjpeg-turbo REQUIRED) - add_library(JPEG::JPEG ALIAS ${TARGET_FOR_JPEG}) -endif() - -if (${GDAL_USE_PCRE2}) - find_package(PCRE2 REQUIRED) - add_library(PCRE2::PCRE2-8 ALIAS PCRE2::8BIT) -endif() - - -add_subdirectory("source_subfolder") +add_subdirectory(src) diff --git a/recipes/gdal/post_3.5.0/cmake/ConanFindPackage.cmake b/recipes/gdal/post_3.5.0/cmake/ConanFindPackage.cmake new file mode 100644 index 0000000000000..cc5455d748073 --- /dev/null +++ b/recipes/gdal/post_3.5.0/cmake/ConanFindPackage.cmake @@ -0,0 +1,48 @@ +function(define_find_package2 pkgname include_file library_name) +endfunction() +function(find_package2 pkgname) + # Remove args unsupported by find_package() + list(REMOVE_ITEM ARGN OUT_DEPENDENCY _find_dependency) + # Force CONFIG mode + list(REMOVE_ITEM ARGN MODULE NO_CONFIG NO_MODULE) + string(TOUPPER ${pkgname} key) + if(DEFINED GDAL_USE_${key} AND NOT GDAL_USE_${key}) + set(${pkgname}_FOUND) + set(${key}_FOUND) + return() + endif() + find_package(${pkgname} ${ARGN} + QUIET + CONFIG + GLOBAL + # Forbid the use of system libs entirely + NO_DEFAULT_PATH + PATHS ${CMAKE_PREFIX_PATH} + ) + # Add variables with upper-case package name in addition to the default ones + set(targets "") + foreach(lib ${${pkgname}_LIBRARIES}) + if(TARGET ${lib}) + list(APPEND targets ${lib}) + endif() + endforeach() + # Add upper-case variables + set(${key}_DEFINITIONS "${${pkgname}_DEFINITIONS}" CACHE STRING "") + set(${key}_FOUND ${${pkgname}_FOUND} CACHE BOOL "") + set(${key}_INCLUDE_DIR "${${pkgname}_INCLUDE_DIR}" CACHE STRING "") + set(${key}_INCLUDE_DIRS "${${pkgname}_INCLUDE_DIRS}" CACHE STRING "") + set(${key}_LIBRARIES "${${pkgname}_LIBRARIES}" CACHE STRING "") + set(${key}_LIBRARY "${${pkgname}_LIBRARIES}" CACHE STRING "") + set(${key}_TARGET "${targets}" CACHE STRING "") + set(${key}_VERSION ${${pkgname}_VERSION} CACHE BOOL "") + + # Add as cache vars for global visibility + set(${pkgname}_FOUND ${${pkgname}_FOUND} CACHE BOOL "") + set(${pkgname}_TARGET "${targets}" CACHE STRING "") + set(${pkgname}_VERSION ${${pkgname}_VERSION_STRING} CACHE BOOL "") + + message(STATUS "Found ${pkgname}: ${${pkgname}_FOUND}") + message(STATUS " ${key}_TARGET: ${${key}_TARGET}") + message(STATUS " ${key}_LIBRARIES: ${${key}_LIBRARIES}") + message(STATUS " ${key}_INCLUDE_DIRS: ${${key}_INCLUDE_DIRS}") +endfunction() diff --git a/recipes/gdal/post_3.5.0/conandata.yml b/recipes/gdal/post_3.5.0/conandata.yml index 6ac086393ccfd..159958b913d13 100644 --- a/recipes/gdal/post_3.5.0/conandata.yml +++ b/recipes/gdal/post_3.5.0/conandata.yml @@ -1,20 +1,41 @@ sources: - "3.7.0": - url: "https://github.com/OSGeo/gdal/releases/download/v3.7.0/gdal-3.7.0.tar.gz" - sha256: "5a806d759f403a15bbbf8a14ecc6947071afc5ab91e5abaef0d11d1d2d16bf94" - "3.5.2": - url: "https://github.com/OSGeo/gdal/releases/download/v3.5.2/gdal-3.5.2.tar.gz" - sha256: "fbd696e1b2a858fbd2eb3718db16b14ed9ba82521d3578770d480c74fe1146d2" - "3.5.1": - url: "https://github.com/OSGeo/gdal/releases/download/v3.5.1/gdal-3.5.1.tar.gz" - sha256: "7c4406ca010dc8632703a0a326f39e9db25d9f1f6ebaaeca64a963e3fac123d1" + "3.8.3": + url: "https://github.com/OSGeo/gdal/releases/download/v3.8.3/gdal-3.8.3.tar.gz" + sha256: "f7a30387a8239e9da26200f787a02136df2ee6473e86b36d05ad682761a049ea" + "3.7.3": + url: "https://github.com/OSGeo/gdal/releases/download/v3.7.3/gdal-3.7.3.tar.gz" + sha256: "f66161e10b8b89a8a541cd760cd36d490114ed3f020a26db1489a6154db5d2be" + "3.5.3": + url: "https://github.com/OSGeo/gdal/releases/download/v3.5.3/gdal-3.5.3.tar.gz" + sha256: "a9ea0300d17e35bab71df4f16e62bb2fb8081caf994ab3ee0502ce4cf0d4e593" patches: - "3.7.0": - - patch_file: "patches/3.7.0/0-replace-find-package.patch" - base_path: "source_subfolder" - "3.5.2": - - patch_file: "patches/3.5.2/0-replace-find-package.patch" - base_path: "source_subfolder" - "3.5.1": - - patch_file: "patches/3.5.1/0-replace-find-package.patch" - base_path: "source_subfolder" + "3.8.3": + - patch_file: "patches/3.8.1/0-replace-find-package.patch" + patch_description: "Use custom version of find_package() for Conan deps" + patch_type: "conan" + - patch_file: "patches/3.7.3/1-do-not-force-private-linking.patch" + patch_description: "Fix private linking not working for some Conan dependencies" + patch_type: "conan" + - patch_file: "patches/3.5.3/2-allow-cycles-in-cmake-targets.patch" + patch_description: "Fix CMake failure due to cyclical dependencies in CMakeDeps targets" + patch_type: "conan" + "3.7.3": + - patch_file: "patches/3.7.3/0-replace-find-package.patch" + patch_description: "Use custom version of find_package() for Conan deps" + patch_type: "conan" + - patch_file: "patches/3.7.3/1-do-not-force-private-linking.patch" + patch_description: "Fix private linking not working for some Conan dependencies" + patch_type: "conan" + - patch_file: "patches/3.5.3/2-allow-cycles-in-cmake-targets.patch" + patch_description: "Fix CMake failure due to cyclical dependencies in CMakeDeps targets" + patch_type: "conan" + "3.5.3": + - patch_file: "patches/3.5.3/0-replace-find-package.patch" + patch_description: "Use custom version of find_package() for Conan deps" + patch_type: "conan" + - patch_file: "patches/3.5.3/1-do-not-force-private-linking.patch" + patch_description: "Fix private linking not working for some Conan dependencies" + patch_type: "conan" + - patch_file: "patches/3.5.3/2-allow-cycles-in-cmake-targets.patch" + patch_description: "Fix CMake failure due to cyclical dependencies in CMakeDeps targets" + patch_type: "conan" diff --git a/recipes/gdal/post_3.5.0/conanfile.py b/recipes/gdal/post_3.5.0/conanfile.py index 3e0847981c026..49c2e7d3e5d6e 100644 --- a/recipes/gdal/post_3.5.0/conanfile.py +++ b/recipes/gdal/post_3.5.0/conanfile.py @@ -1,43 +1,42 @@ +import os + from conan import ConanFile -from conan.tools.apple import fix_apple_shared_install_name -from conan.tools.files import apply_conandata_patches, get, files from conan.errors import ConanInvalidConfiguration -from conans import CMake -import functools -import os +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, replace_in_file +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + class GdalConan(ConanFile): name = "gdal" description = "GDAL is an open source X/MIT licensed translator library " \ "for raster and vector geospatial data formats." license = "MIT" - topics = ("osgeo", "geospatial", "raster", "vector") - homepage = "https://github.com/OSGeo/gdal" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/OSGeo/gdal" + topics = ("osgeo", "geospatial", "raster", "vector") + package_type = "library" settings = "os", "arch", "compiler", "build_type" - - generators = "cmake", "cmake_find_package", "cmake_find_package_multi" - - # A list of gdal dependencies can be taken from cmake/helpers/CheckDependentLibraries.cmake - # within gdal sources with the command: - # grep -E '^[ \t]*gdal_check_package\(' cmake/helpers/CheckDependentLibraries.cmake \ - # | sed 's/[ \t]*gdal_check_package(\([a-zA-Z_0-9]\+\) "\(.*\)"\(.*\)/{ 'dep': \'\1\', 'descr': \'\2\' },/' \ - # | sort | uniq - options = { "shared": [True, False], "fPIC": [True, False], "tools": [True, False], "with_armadillo": [True, False], "with_arrow": [True, False], + "with_basisu": [True, False], "with_blosc": [True, False], + "with_brunsli": [True, False], "with_cfitsio": [True, False], # with_cypto option has been renamed with_openssl in version 3.5.1 - "with_crypto": [True, False, "deprecated"], + "with_crypto": ["deprecated", True, False], "with_cryptopp": [True, False], "with_curl": [True, False], "with_dds": [True, False], + "with_ecw": [True, False], "with_expat": [True, False], "with_exr": [True, False], "with_freexl": [True, False], @@ -47,48 +46,64 @@ class GdalConan(ConanFile): "with_hdf4": [True, False], "with_hdf5": [True, False], "with_heif": [True, False], + "with_jpeg": [False, "libjpeg", "libjpeg-turbo"], + "with_jxl": [True, False], "with_kea": [True, False], + "with_lerc": [True, False], + "with_libaec": [True, False], + "with_libarchive": [True, False], + "with_libcsf": [True, False], "with_libdeflate": [True, False], "with_libiconv": [True, False], - "with_jpeg": [None, "libjpeg", "libjpeg-turbo"], "with_libkml": [True, False], - "with_libtiff": [True, False], + "with_libtiff": ["deprecated", True, False], # always enabled + "with_lzma": [True, False], "with_lz4": [True, False], "with_mongocxx": [True, False], - "with_mysql": [None, "libmysqlclient", "mariadb-connector-c"], + "with_mysql": [False, "libmysqlclient", "mariadb-connector-c"], "with_netcdf": [True, False], "with_odbc": [True, False], + "with_opencad": [True, False], + "with_opencl": [True, False], "with_openjpeg": [True, False], "with_openssl": [True, False], "with_pcre": [True, False], "with_pcre2": [True, False], + # "with_pdfium": [True, False], "with_pg": [True, False], "with_png": [True, False], "with_podofo": [True, False], "with_poppler": [True, False], - "with_proj": [True, False], + "with_proj": ["deprecated", True, False], # always enabled + "with_publicdecompwt": [True, False], "with_qhull": [True, False], + "with_rasterlite2": [True, False], + "with_shapelib": [True, False], + "with_spatialite": [True, False], "with_sqlite3": [True, False], + "with_tiledb": [True, False], "with_webp": [True, False], "with_xerces": [True, False], "with_xml2": [True, False], - "with_zlib": [True, False], + "with_zlib": ["deprecated", True, False], # always enabled "with_zstd": [True, False], } - default_options = { "shared": False, "fPIC": True, "tools": False, "with_armadillo": False, - "with_arrow": False, + "with_arrow": True, + "with_basisu": False, "with_blosc": False, + "with_brunsli": False, "with_cfitsio": False, "with_crypto": "deprecated", "with_cryptopp": False, - "with_curl": False, + "with_curl": True, "with_dds": False, - "with_expat": False, + "with_ecw": False, + "with_expat": True, "with_exr": False, "with_freexl": False, "with_geos": True, @@ -97,215 +112,220 @@ class GdalConan(ConanFile): "with_hdf4": False, "with_hdf5": False, "with_heif": False, + "with_jpeg": "libjpeg", + "with_jxl": False, "with_kea": False, + "with_lerc": True, + "with_libaec": False, + "with_libarchive": False, + "with_libcsf": True, "with_libdeflate": True, "with_libiconv": True, - "with_jpeg": "libjpeg", "with_libkml": False, - "with_libtiff": True, + "with_libtiff": "deprecated", + "with_lzma": False, "with_lz4": False, "with_mongocxx": False, - "with_mysql": None, + "with_mysql": False, "with_netcdf": False, "with_odbc": False, + "with_opencad": False, + "with_opencl": True, "with_openjpeg": False, "with_openssl": False, "with_pcre": False, "with_pcre2": False, + # "with_pdfium": False, "with_pg": False, "with_png": True, "with_podofo": False, "with_poppler": False, - "with_proj": True, + "with_proj": "deprecated", + "with_publicdecompwt": False, "with_qhull": True, + "with_rasterlite2": False, + "with_shapelib": True, + "with_spatialite": False, "with_sqlite3": True, + "with_tiledb": False, "with_webp": False, "with_xerces": False, "with_xml2": False, - "with_zlib": True, + "with_zlib": "deprecated", "with_zstd": False, } - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build" - def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + export_conandata_patches(self) + copy(self, "*.cmake", + src=os.path.join(self.recipe_folder, "cmake"), + dst=os.path.join(self.export_sources_folder, "src", "cmake", "helpers")) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "3.7": + # Latest versions of Arrow are no longer compatible with GDAL 3.5 + self.options.with_arrow = False + if Version(self.version) < "3.8": + del self.options.with_libaec def configure(self): - if self.options.with_crypto != "deprecated": - self.output.error("with_crypto option is deprecated, use with_openssl instead.") - if self.options.shared: - try: - del self.options.fPIC - except: - pass + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("json-c/0.16") + self.requires("json-c/0.17") self.requires("libgeotiff/1.7.1") - + self.requires("libtiff/4.6.0") + self.requires("proj/9.3.1") + # Used in a public header here: + # https://github.com/OSGeo/gdal/blob/v3.7.1/port/cpl_minizip_ioapi.h#L26 + self.requires("zlib/[>=1.2.11 <2]", transitive_headers=True, transitive_libs=True) if self.options.with_armadillo: - self.requires("armadillo/10.7.3") - + self.requires("armadillo/12.6.4") if self.options.with_arrow: - self.requires("arrow/8.0.1") - + self.requires("arrow/14.0.2") + if self.options.with_basisu: + self.requires("libbasisu/1.15.0") if self.options.with_blosc: - self.requires("c-blosc/1.21.1") - + self.requires("c-blosc/1.21.5") + if self.options.with_brunsli: + self.requires("brunsli/cci.20231024") if self.options.with_cfitsio: - self.requires("cfitsio/4.1.0") - + self.requires("cfitsio/4.3.1") if self.options.with_cryptopp: - self.requires("cryptopp/8.7.0") - + self.requires("cryptopp/8.9.0") if self.options.with_curl: - self.requires("libcurl/8.2.0") - + self.requires("libcurl/[>=7.78 <9]") if self.options.with_dds: self.requires("crunch/cci.20190615") - + if self.options.with_ecw: + self.requires("libecwj2/3.3") if self.options.with_expat: self.requires("expat/2.5.0") - if self.options.with_exr: - self.requires("openexr/3.1.9") + self.requires("openexr/3.2.1") self.requires("imath/3.1.9") - if self.options.with_freexl: - self.requires("freexl/1.0.6") - + self.requires("freexl/2.0.0") if self.options.with_geos: - self.requires("geos/3.11.1") - + self.requires("geos/3.12.0") if self.options.with_gif: self.requires("giflib/5.2.1") - if self.options.with_gta: self.requires("libgta/1.2.1") - if self.options.with_hdf4: - self.requires("hdf4/4.2.15") - + self.requires("hdf4/4.2.16-2") if self.options.with_hdf5: - self.requires("hdf5/1.13.1") - + self.requires("hdf5/1.14.3") if self.options.with_heif: - self.requires("libheif/1.13.0") - + self.requires("libheif/1.16.2") if self.options.with_jpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_jpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/2.1.5") - + self.requires("libjpeg-turbo/3.0.1") + if self.options.with_jxl: + self.requires("libjxl/0.6.1") if self.options.with_kea: self.requires("kealib/1.4.14") - + if self.options.with_lerc: + self.requires("lerc/4.0.1") + if self.options.get_safe("with_libaec"): + self.requires("libaec/1.0.6") + if self.options.with_libarchive: + self.requires("libarchive/3.7.2") if self.options.with_libdeflate: - self.requires("libdeflate/1.18") - + self.requires("libdeflate/1.19") if self.options.with_libiconv: self.requires("libiconv/1.17") - if self.options.with_libkml: self.requires("libkml/1.3.0") - - if self.options.with_libtiff: - self.requires("libtiff/4.5.1") - + if self.options.with_lzma: + self.requires("xz_utils/5.4.5") if self.options.with_lz4: self.requires("lz4/1.9.4") - if self.options.with_mongocxx: - self.requires("mongo-cxx-driver/3.6.7") - + self.requires("mongo-cxx-driver/3.8.1") if self.options.with_mysql == "libmysqlclient": - self.requires("libmysqlclient/8.0.30") + self.requires("libmysqlclient/8.1.0") elif self.options.with_mysql == "mariadb-connector-c": - self.requires("mariadb-connector-c/3.1.12") - + self.requires("mariadb-connector-c/3.3.3") if self.options.with_netcdf: self.requires("netcdf/4.8.1") - if self.options.with_odbc: self.requires("odbc/2.3.11") - + if self.options.with_opencl: + self.requires("opencl-icd-loader/2023.12.14") if self.options.with_openjpeg: self.requires("openjpeg/2.5.0") - if self.options.with_openssl: - self.requires("openssl/1.1.1u") - + self.requires("openssl/[>=1.1 <4]") if self.options.with_pcre: self.requires("pcre/8.45") - if self.options.with_pcre2: self.requires("pcre2/10.42") - + # TODO: pdfium recipe needs to be compatible with https://github.com/rouault/pdfium_build_gdal_3_8 + # if self.options.with_pdfium: + # self.requires("pdfium/95.0.4629") if self.options.with_pg: - self.requires("libpq/14.5") - + # libpq 15+ is not supported + self.requires("libpq/14.9") if self.options.with_png: self.requires("libpng/1.6.40") - if self.options.with_podofo: self.requires("podofo/0.9.7") - if self.options.with_poppler: self.requires("poppler/21.07.0") - - if self.options.with_proj: - self.requires("proj/9.1.1") - if self.options.with_qhull: self.requires("qhull/8.0.1") - + if self.options.with_rasterlite2: + self.requires("librasterlite2/1.1.0-beta1") + if self.options.with_spatialite: + self.requires("libspatialite/5.0.1") if self.options.with_sqlite3: - self.requires("sqlite3/3.42.0") - + self.requires("sqlite3/3.44.2") + if self.options.with_tiledb: + self.requires("tiledb/2.17.4") if self.options.with_webp: - self.requires("libwebp/1.3.1") - + self.requires("libwebp/1.3.2") if self.options.with_xerces: - self.requires("xerces-c/3.2.3") - + self.requires("xerces-c/3.2.5") if self.options.with_xml2: - self.requires("libxml2/2.10.3") - - if self.options.with_zlib: - self.requires("zlib/1.2.13") - + self.requires("libxml2/2.12.3") if self.options.with_zstd: self.requires("zstd/1.5.5") + # Use of external shapelib is not recommended and is currently broken. + # https://github.com/OSGeo/gdal/issues/5711 + # if self.options.with_shapelib: + # self.requires("shapelib/1.6.0") def build_requirements(self): # https://github.com/conan-io/conan/issues/3482#issuecomment-662284561 self.tool_requires("cmake/[>=3.18 <4]") def package_id(self): + # Ignore deprecated options del self.info.options.with_crypto + del self.info.options.with_libtiff + del self.info.options.with_proj + del self.info.options.with_zlib def validate(self): - if self.options.get_safe("with_pcre") and self.options.get_safe("with_pcre2"): + for option in ["crypto", "zlib", "proj", "libtiff"]: + if self.options.get_safe(f"with_{option}") != "deprecated": + self.output.warning(f"{self.ref}:with_{option} option is deprecated. The {option} dependecy is always enabled now.") + if self.options.with_pcre and self.options.with_pcre2: raise ConanInvalidConfiguration("Enable either pcre or pcre2, not both") - if self.options.get_safe("with_sqlite3") and not self.options["sqlite3"].enable_column_metadata: + if self.options.with_sqlite3 and not self.dependencies["sqlite3"].options.enable_column_metadata: raise ConanInvalidConfiguration("gdql requires sqlite3:enable_column_metadata=True") - if self.options.get_safe("with_libtiff") and self.options["libtiff"].jpeg != self.options.get_safe("with_jpeg"): + if self.dependencies["libtiff"].options.jpeg != self.options.with_jpeg: msg = "libtiff:jpeg and gdal:with_jpeg must be set to the same value, either libjpeg or libjpeg-turbo." # For some reason, the ConanInvalidConfiguration message is not shown, only # ERROR: At least two recipes provides the same functionality: @@ -314,591 +334,488 @@ def validate(self): self.output.error(msg) raise ConanInvalidConfiguration(msg) - if self.options.get_safe("with_poppler") and self.options["poppler"].with_libjpeg != self.options.get_safe("with_jpeg"): + if self.options.with_poppler and self.dependencies["poppler"].options.with_libjpeg != self.options.with_jpeg: msg = "poppler:with_libjpeg and gdal:with_jpeg must be set to the same value, either libjpeg or libjpeg-turbo." self.output.error(msg) raise ConanInvalidConfiguration(msg) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - - if self.options.get_safe("fPIC", True): - cmake.definitions[ - "GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE"] = True - - cmake.definitions["BUILD_JAVA_BINDINGS"] = False - cmake.definitions["BUILD_CSHARP_BINDINGS"] = False - cmake.definitions["BUILD_PYTHON_BINDINGS"] = False - - cmake.definitions["BUILD_TESTING"] = False - cmake.definitions["GDAL_USE_ZLIB_INTERNAL"] = False - cmake.definitions["GDAL_USE_JSONC_INTERNAL"] = False - cmake.definitions["GDAL_USE_JPEG_INTERNAL"] = False - cmake.definitions["GDAL_USE_JPEG12_INTERNAL"] = False - cmake.definitions["GDAL_USE_TIFF_INTERNAL"] = False - cmake.definitions["GDAL_USE_GEOTIFF_INTERNAL"] = False - cmake.definitions["GDAL_USE_GIF_INTERNAL"] = False - cmake.definitions["GDAL_USE_PNG_INTERNAL"] = False - - cmake.definitions["GDAL_USE_LERC_INTERNAL"] = True - cmake.definitions["GDAL_USE_SHAPELIB_INTERNAL"] = True - - cmake.definitions["BUILD_APPS"] = self.options.tools - - cmake.definitions["SQLite3_HAS_COLUMN_METADATA"] = \ - self.options["sqlite3"].enable_column_metadata - - cmake.definitions["SQLite3_HAS_RTREE"] = self.options[ - "sqlite3"].enable_rtree - - cmake.definitions["GDAL_USE_JSONC"] = True - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_JSONC"] = "json-c" - - cmake.definitions["GDAL_USE_GEOTIFF"] = True - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_GEOTIFF"] = "libgeotiff" - cmake.definitions["TARGET_FOR_GEOTIFF"] = "GeoTIFF::GeoTIFF" - - cmake.definitions["GDAL_USE_ARMADILLO"] = self.options.with_armadillo - if self.options.with_armadillo: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_ARMADILLO"] = "armadillo" - cmake.definitions["TARGET_FOR_ARMADILLO"] = \ - self.dependencies["armadillo"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Armadillo_FOUND"] = False - - cmake.definitions["GDAL_USE_ARROW"] = self.options.with_arrow - if self.options.with_arrow: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_ARROW"] = "arrow" - cmake.definitions["TARGET_FOR_ARROW"] = \ - self.dependencies["arrow"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Arrow_FOUND"] = False - - cmake.definitions["GDAL_USE_BLOSC"] = self.options.with_blosc - if self.options.with_blosc: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_BLOSC"] = "c-blosc" - cmake.definitions["TARGET_FOR_BLOSC"] = \ - self.dependencies["c-blosc"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Blosc_FOUND"] = False - - cmake.definitions["GDAL_USE_CFITSIO"] = self.options.with_cfitsio - if self.options.with_cfitsio: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_CFITSIO"] = "cfitsio" - cmake.definitions["TARGET_FOR_CFITSIO"] = \ - self.dependencies["cfitsio"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["CFITSIO_FOUND"] = False - - cmake.definitions["GDAL_USE_CRYPTOPP"] = self.options.with_cryptopp - if self.options.with_cryptopp: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_CRYPTOPP"] = "cryptopp" - cmake.definitions["TARGET_FOR_CRYPTOPP"] = \ - self.dependencies["cryptopp"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["CryptoPP_FOUND"] = False - - cmake.definitions["GDAL_USE_CURL"] = self.options.with_curl - if self.options.with_curl: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_CURL"] = "libcurl" - cmake.definitions["TARGET_FOR_CURL"] = \ - self.dependencies["libcurl"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["CURL_FOUND"] = False - - cmake.definitions["GDAL_USE_CRNLIB"] = self.options.with_dds - if self.options.with_dds: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_CRNLIB"] = "crunch" - cmake.definitions["TARGET_FOR_CRNLIB"] = \ - self.dependencies["crunch"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Crnlib_FOUND"] = False - - cmake.definitions["GDAL_USE_EXPAT"] = self.options.with_expat - if self.options.with_expat: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_EXPAT"] = "expat" - cmake.definitions["TARGET_FOR_EXPAT"] = "EXPAT::EXPAT" - else: - cmake.definitions["EXPAT_FOUND"] = False - - cmake.definitions["GDAL_USE_OPENEXR"] = self.options.with_exr - if self.options.with_exr: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_OPENEXR"] = "openexr" - cmake.definitions["TARGET_FOR_OPENEXR"] = \ - self.dependencies["openexr"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["OpenEXR_FOUND"] = False - - cmake.definitions["GDAL_USE_FREEXL"] = self.options.with_freexl - if self.options.with_freexl: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_FREEXL"] = "freexl" - cmake.definitions["TARGET_FOR_FREEXL"] = "freexl::freexl" - else: - cmake.definitions["FreeXL_FOUND"] = False - - cmake.definitions["GDAL_USE_GEOS"] = self.options.with_geos - if self.options.with_geos: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_GEOS"] = "geos" - cmake.definitions["TARGET_FOR_GEOS"] = \ - self.dependencies["geos"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["GEOS_FOUND"] = False - - cmake.definitions["GDAL_USE_GIF"] = self.options.with_gif - if self.options.with_gif: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_GIF"] = "giflib" - cmake.definitions["TARGET_FOR_GIF"] = \ - self.dependencies["giflib"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["GIF_FOUND"] = False - - cmake.definitions["GDAL_USE_GTA"] = self.options.with_gta - if self.options.with_gta: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_GTA"] = "libgta" - cmake.definitions["TARGET_FOR_GTA"] = \ - self.dependencies["libgta"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["GTA_FOUND"] = False - - cmake.definitions["GDAL_USE_HDF4"] = self.options.with_hdf4 - if self.options.with_hdf4: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_HDF4"] = "hdf4" - cmake.definitions["TARGET_FOR_HDF4"] = \ - self.dependencies["hdf4"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["HDF4_FOUND"] = False - - cmake.definitions["GDAL_USE_HDF5"] = self.options.with_hdf5 - if self.options.with_hdf5: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_HDF5"] = "hdf5" - cmake.definitions["TARGET_FOR_HDF5"] = \ - self.dependencies["hdf5"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["HDF5_FOUND"] = False - - cmake.definitions["GDAL_USE_HEIF"] = self.options.with_heif - if self.options.with_heif: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_HEIF"] = "libheif" - cmake.definitions["TARGET_FOR_HEIF"] = \ - self.dependencies["libheif"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["HEIF_FOUND"] = False - - cmake.definitions["GDAL_USE_KEA"] = self.options.with_kea - if self.options.with_kea: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_KEA"] = "kealib" - cmake.definitions["TARGET_FOR_KEA"] = \ - self.dependencies["kealib"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["KEA_FOUND"] = False - - cmake.definitions["GDAL_USE_DEFLATE"] = self.options.with_libdeflate - if self.options.with_libdeflate: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_DEFLATE"] = "libdeflate" - cmake.definitions["TARGET_FOR_DEFLATE"] = \ - self.dependencies["libdeflate"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Deflate_FOUND"] = False - - cmake.definitions["GDAL_USE_ICONV"] = self.options.with_libiconv - if self.options.with_libiconv: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_ICONV"] = "libiconv" - cmake.definitions["TARGET_FOR_ICONV"] = \ - self.dependencies["libiconv"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Iconv_FOUND"] = False - - if self.options.with_jpeg == "libjpeg" or self.options.with_jpeg == "libjpeg-turbo": - print(f'self.options.with_jpeg: {self.options.with_jpeg}') - cmake.definitions["GDAL_USE_JPEG"] = True - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_JPEG"] = self.options.with_jpeg - cmake.definitions["TARGET_FOR_JPEG"] = ( - "JPEG::JPEG" if self.options.with_jpeg == "libjpeg" else - self.dependencies["libjpeg-turbo"].cpp_info.components["turbojpeg"] \ - .get_property("cmake_target_name")) - else: - cmake.definitions["JPEG_FOUND"] = False - - cmake.definitions["GDAL_USE_LIBKML"] = self.options.with_libkml - if self.options.with_libkml: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_LIBKML"] = "libkml" - cmake.definitions["TARGET_FOR_LIBKML"] = \ - self.dependencies["libkml"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["LibKML_FOUND"] = False - - cmake.definitions["GDAL_USE_TIFF"] = self.options.with_libtiff - if self.options.with_libtiff: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_TIFF"] = "libtiff" - cmake.definitions["TARGET_FOR_TIFF"] = \ - self.dependencies["libtiff"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["TIFF_FOUND"] = False - - cmake.definitions["GDAL_USE_LZ4"] = self.options.with_lz4 - if self.options.with_lz4: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_LZ4"] = "lz4" - cmake.definitions["TARGET_FOR_LZ4"] = \ - self.dependencies["lz4"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["LZ4_FOUND"] = False - - cmake.definitions["GDAL_USE_MONGOCXX"] = self.options.with_mongocxx - if self.options.with_mongocxx: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_MONGOCXX"] = "mongo-cxx-driver" - cmake.definitions["TARGET_FOR_MONGOCXX"] = \ - self.dependencies["mongo-cxx-driver"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["MONGOCXX_FOUND"] = False - - if self.options.with_mysql == "libmysqlclient" or self.options.with_mysql == "mariadb-connector-c": - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_MYSQL"] = str(self.options.with_mysql) - cmake.definitions["TARGET_FOR_MYSQL"] = \ - "mariadb-connector-c::mariadb-connector-c" \ - if self.options.with_mysql == "mariadb-connector-c" \ - else "libmysqlclient::libmysqlclient" - else: - cmake.definitions["MYSQL_FOUND"] = False - - cmake.definitions["GDAL_USE_NETCDF"] = self.options.with_netcdf - if self.options.with_netcdf: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_NETCDF"] = "netcdf" - cmake.definitions["TARGET_FOR_NETCDF"] = \ - self.dependencies["netcdf"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["NetCDF_FOUND"] = False - - cmake.definitions["GDAL_USE_ODBC"] = self.options.with_odbc - if self.options.with_odbc: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_ODBC"] = "odbc" - cmake.definitions["TARGET_FOR_ODBC"] = \ - self.dependencies["odbc"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["ODBC_FOUND"] = False - - cmake.definitions["GDAL_USE_OPENJPEG"] = self.options.with_openjpeg - if self.options.with_openjpeg: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_OPENJPEG"] = "openjpeg" - cmake.definitions["TARGET_FOR_OPENJPEG"] = \ - self.dependencies["openjpeg"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["OPENJPEG_FOUND"] = False - - cmake.definitions["GDAL_USE_OPENSSL"] = self.options.with_openssl - if self.options.with_openssl: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_OPENSSL"] = "openssl" - cmake.definitions["TARGET_FOR_OPENSSL"] = \ - self.dependencies["openssl"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["OpenSSL_FOUND"] = False - - cmake.definitions["GDAL_USE_PCRE"] = self.options.with_pcre - if self.options.with_pcre: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_PCRE"] = "pcre" - cmake.definitions["TARGET_FOR_PCRE"] = \ - self.dependencies["pcre"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["PCRE_FOUND"] = False - - cmake.definitions["GDAL_USE_PCRE2"] = self.options.with_pcre2 - if self.options.with_pcre2: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_PCRE2"] = "pcre2" - cmake.definitions["TARGET_FOR_PCRE2"] = \ - self.dependencies["pcre2"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["PCRE2_FOUND"] = False - - cmake.definitions["GDAL_USE_PDFIUM"] = False - cmake.definitions["PDFIUM_FOUND"] = False - - cmake.definitions["GDAL_USE_POSTGRESQL"] = self.options.with_pg - if self.options.with_pg: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_POSTGRESQL"] = "libpq" - cmake.definitions["TARGET_FOR_POSTGRESQL"] = \ - self.dependencies["libpq"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["PostgreSQL_FOUND"] = False - - cmake.definitions["GDAL_USE_PNG"] = self.options.with_png - if self.options.with_png: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_PNG"] = "libpng" - cmake.definitions["TARGET_FOR_PNG"] = \ - self.dependencies["libpng"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["PNG_FOUND"] = False - - cmake.definitions["GDAL_USE_PODOFO"] = self.options.with_podofo - if self.options.with_podofo: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_PODOFO"] = "podofo" - cmake.definitions["TARGET_FOR_PODOFO"] = \ - self.dependencies["podofo"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Podofo_FOUND"] = False - - cmake.definitions["GDAL_USE_POPPLER"] = self.options.with_poppler - if self.options.with_poppler: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_POPPLER"] = "poppler" - cmake.definitions["TARGET_FOR_POPPLER"] = \ - self.dependencies["poppler"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Poppler_FOUND"] = False - - cmake.definitions["GDAL_USE_PROJ"] = self.options.with_proj - if self.options.with_proj: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_PROJ"] = "proj" - cmake.definitions["TARGET_FOR_PROJ"] = \ - self.dependencies["proj"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["PROJ_FOUND"] = False - - cmake.definitions["GDAL_USE_QHULL"] = self.options.with_qhull - if self.options.with_qhull: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_QHULL"] = "qhull" - cmake.definitions["TARGET_FOR_QHULL"] = \ - self.dependencies["qhull"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["QHULL_FOUND"] = False - - cmake.definitions["GDAL_USE_SQLITE3"] = self.options.with_sqlite3 + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True) + tc.variables["GDAL_SET_INSTALL_RELATIVE_RPATH"] = True + + tc.variables["BUILD_JAVA_BINDINGS"] = False + tc.variables["BUILD_CSHARP_BINDINGS"] = False + tc.variables["BUILD_PYTHON_BINDINGS"] = False + tc.variables["BUILD_APPS"] = self.options.tools + tc.variables["BUILD_TESTING"] = False + + tc.variables["GDAL_USE_ARCHIVE"] = self.options.with_libarchive + tc.variables["GDAL_USE_ARMADILLO"] = self.options.with_armadillo + tc.variables["GDAL_USE_ARROW"] = self.options.with_arrow + tc.variables["GDAL_USE_ARROWDATASET"] = self.options.with_arrow and self.dependencies["arrow"].options.dataset_modules + tc.variables["GDAL_USE_BASISU"] = self.options.with_basisu + tc.variables["GDAL_USE_BLOSC"] = self.options.with_blosc + tc.variables["GDAL_USE_BRUNSLI"] = self.options.with_brunsli + tc.variables["GDAL_USE_CFITSIO"] = self.options.with_cfitsio + tc.variables["GDAL_USE_CRNLIB"] = self.options.with_dds + tc.variables["GDAL_USE_CRYPTOPP"] = self.options.with_cryptopp + tc.variables["GDAL_USE_CURL"] = self.options.with_curl + tc.variables["GDAL_USE_DEFLATE"] = self.options.with_libdeflate + tc.variables["GDAL_USE_ECW"] = self.options.with_ecw + tc.variables["GDAL_USE_EXPAT"] = self.options.with_expat + tc.variables["GDAL_USE_FILEGDB"] = False + tc.variables["GDAL_USE_FREEXL"] = self.options.with_freexl + tc.variables["GDAL_USE_FYBA"] = False + tc.variables["GDAL_USE_GEOS"] = self.options.with_geos + tc.variables["GDAL_USE_GEOTIFF"] = True + tc.variables["GDAL_USE_GEOTIFF_INTERNAL"] = False + tc.variables["GDAL_USE_GIF"] = self.options.with_gif + tc.variables["GDAL_USE_GIF_INTERNAL"] = False + tc.variables["GDAL_USE_GTA"] = self.options.with_gta + tc.variables["GDAL_USE_HDF4"] = self.options.with_hdf4 + tc.variables["GDAL_USE_HDF5"] = self.options.with_hdf5 + tc.variables["GDAL_USE_HDFS"] = False + tc.variables["GDAL_USE_HEIF"] = self.options.with_heif + tc.variables["GDAL_USE_ICONV"] = self.options.with_libiconv + tc.variables["GDAL_USE_IDB"] = False + tc.variables["GDAL_USE_JPEG"] = bool(self.options.with_jpeg) + tc.variables["GDAL_USE_JPEG_INTERNAL"] = False + tc.variables["GDAL_USE_JPEG12_INTERNAL"] = False + tc.variables["GDAL_USE_JSONC"] = True + tc.variables["GDAL_USE_JSONC_INTERNAL"] = False + tc.variables["GDAL_USE_JXL"] = self.options.with_jxl + tc.variables["GDAL_USE_JXL_THREADS"] = self.options.with_jxl + tc.variables["GDAL_USE_KDU"] = False + tc.variables["GDAL_USE_KEA"] = self.options.with_kea + tc.variables["GDAL_USE_LERC"] = self.options.with_lerc + tc.variables["GDAL_USE_LERC_INTERNAL"] = False + tc.variables["GDAL_USE_LIBAEC"] = self.options.get_safe("with_libaec", False) + tc.variables["GDAL_USE_LIBCSF"] = False + tc.variables["GDAL_USE_LIBCSF_INTERNAL"] = self.options.with_libcsf + tc.variables["GDAL_USE_LIBKML"] = self.options.with_libkml + tc.variables["GDAL_USE_LIBLZMA"] = self.options.with_lzma + tc.variables["GDAL_USE_LIBQB3"] = False + tc.variables["GDAL_USE_LIBXML2"] = self.options.with_xml2 + tc.variables["GDAL_USE_LURATECH"] = False + tc.variables["GDAL_USE_LZ4"] = self.options.with_lz4 + tc.variables["GDAL_USE_MONGOCXX"] = self.options.with_mongocxx + tc.variables["GDAL_USE_MRSID"] = False + tc.variables["GDAL_USE_MSSQL_NCLI"] = False + tc.variables["GDAL_USE_MSSQL_ODBC"] = False + tc.variables["GDAL_USE_MYSQL"] = bool(self.options.with_mysql) + tc.variables["GDAL_USE_NETCDF"] = self.options.with_netcdf + tc.variables["GDAL_USE_ODBC"] = self.options.with_odbc + tc.variables["GDAL_USE_ODBCCPP"] = False + tc.variables["GDAL_USE_OGDI"] = False + tc.variables["GDAL_USE_OPENCAD"] = False + tc.variables["GDAL_USE_OPENCAD_INTERNAL"] = self.options.with_opencad + tc.variables["GDAL_USE_OPENCL"] = self.options.with_opencl + tc.variables["GDAL_USE_OPENEXR"] = self.options.with_exr + tc.variables["GDAL_USE_OPENJPEG"] = self.options.with_openjpeg + tc.variables["GDAL_USE_OPENSSL"] = self.options.with_openssl + tc.variables["GDAL_USE_ORACLE"] = False + tc.variables["GDAL_USE_PARQUET"] = self.options.with_arrow and self.dependencies["arrow"].options.parquet + tc.variables["GDAL_USE_PCRE"] = self.options.with_pcre + tc.variables["GDAL_USE_PCRE2"] = self.options.with_pcre2 + tc.variables["GDAL_USE_PDFIUM"] = False # self.options.with_pdfium + tc.variables["GDAL_USE_PNG"] = self.options.with_png + tc.variables["GDAL_USE_PNG_INTERNAL"] = False + tc.variables["GDAL_USE_PODOFO"] = self.options.with_podofo + tc.variables["GDAL_USE_POPPLER"] = self.options.with_poppler + tc.variables["GDAL_USE_POSTGRESQL"] = self.options.with_pg + tc.variables["GDAL_USE_PUBLICDECOMPWT"] = self.options.with_publicdecompwt + tc.variables["GDAL_USE_QHULL"] = self.options.with_qhull + tc.variables["GDAL_USE_QHULL_INTERNAL"] = False + tc.variables["GDAL_USE_RASTERLITE2"] = self.options.with_rasterlite2 + tc.variables["GDAL_USE_SFCGAL"] = False + tc.variables["GDAL_USE_SHAPELIB"] = False + tc.variables["GDAL_USE_SHAPELIB_INTERNAL"] = self.options.with_shapelib + tc.variables["GDAL_USE_SPATIALITE"] = self.options.with_spatialite + tc.variables["GDAL_USE_SQLITE3"] = self.options.with_sqlite3 + tc.variables["GDAL_USE_TEIGHA"] = False + tc.variables["GDAL_USE_TIFF_INTERNAL"] = False + tc.variables["GDAL_USE_TILEDB"] = self.options.with_tiledb + tc.variables["GDAL_USE_WEBP"] = self.options.with_webp + tc.variables["GDAL_USE_XERCESC"] = self.options.with_xerces + tc.variables["GDAL_USE_ZLIB"] = True + tc.variables["GDAL_USE_ZLIB_INTERNAL"] = False + tc.variables["GDAL_USE_ZSTD"] = self.options.with_zstd + + tc.variables["Parquet_FOUND"] = self.options.with_arrow and self.dependencies["arrow"].options.parquet + tc.variables["ArrowDataset_FOUND"] = self.options.with_arrow and self.dependencies["arrow"].options.dataset_modules + + # General workaround for try_compile() tests in the project + # https://github.com/conan-io/conan/issues/12180 + tc.variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = self.settings.build_type + # https://github.com/OSGeo/gdal/blob/v3.8.1/cmake/modules/packages/FindSQLite3.cmake if self.options.with_sqlite3: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_SQLITE3"] = "sqlite3" - cmake.definitions["TARGET_FOR_SQLITE3"] = \ - self.dependencies["sqlite3"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["SQLite3_FOUND"] = False - - cmake.definitions["GDAL_USE_WEBP"] = self.options.with_webp - if self.options.with_webp: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_WEBP"] = "libwebp" - cmake.definitions["TARGET_FOR_WEBP"] = \ - self.dependencies["libwebp"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["WebP_FOUND"] = False - - cmake.definitions["GDAL_USE_XERCESC"] = self.options.with_xerces - if self.options.with_xerces: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_XERCESC"] = "xerces-c" - cmake.definitions["TARGET_FOR_XERCESC"] = \ - self.dependencies["xerces-c"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["XercesC_FOUND"] = False - - cmake.definitions["GDAL_USE_LIBXML2"] = self.options.with_xml2 - if self.options.with_xml2: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_LIBXML2"] = "libxml2" - cmake.definitions["TARGET_FOR_LIBXML2"] = \ - self.dependencies["libxml2"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["LibXml2_FOUND"] = False - - cmake.definitions["GDAL_USE_ZLIB"] = self.options.with_zlib - if self.options.with_zlib: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_ZLIB"] = "zlib" - cmake.definitions["TARGET_FOR_ZLIB"] = \ - self.dependencies["zlib"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["ZLIB_FOUND"] = False - - cmake.definitions["GDAL_USE_ZSTD"] = self.options.with_zstd - if self.options.with_zstd: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_ZSTD"] = "zstd" - cmake.definitions["TARGET_FOR_ZSTD"] = \ - self.dependencies["zstd"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["ZSTD_FOUND"] = False - - - for k, v in cmake.definitions.items(): - print(k, " = ", v) - - cmake.configure(build_folder=self._build_subfolder) - return cmake - - def build(self): + tc.variables["SQLite3_HAS_COLUMN_METADATA"] = self.dependencies["sqlite3"].options.enable_column_metadata + tc.variables["SQLite3_HAS_RTREE"] = self.dependencies["sqlite3"].options.enable_rtree + tc.variables["SQLite3_HAS_LOAD_EXTENSION"] = not self.dependencies["sqlite3"].options.omit_load_extension + tc.variables["SQLite3_HAS_PROGRESS_HANDLER"] = True + tc.variables["SQLite3_HAS_MUTEX_ALLOC"] = True + tc.preprocessor_definitions["SQLite3_HAS_COLUMN_METADATA"] = 1 if self.dependencies["sqlite3"].options.enable_column_metadata else 0 + tc.preprocessor_definitions["SQLite3_HAS_RTREE"] = 1 if self.dependencies["sqlite3"].options.enable_rtree else 0 + # https://github.com/OSGeo/gdal/blob/v3.8.0/cmake/helpers/CheckDependentLibraries.cmake#L419-L450 + tc.variables["HAVE_JPEGTURBO_DUAL_MODE_8_12"] = ( + self.options.with_jpeg == "libjpeg-turbo" and + bool(self.dependencies["libjpeg-turbo"].options.get_safe("enable12bit")) + ) + # https://github.com/OSGeo/gdal/blob/v3.8.0/port/CMakeLists.txt + tc.variables["BLOSC_HAS_BLOSC_CBUFFER_VALIDATE"] = ( + self.options.with_blosc and + Version(self.dependencies["c-blosc"].ref.version) >= "1.21.5" + ) + # https://github.com/OSGeo/gdal/blob/v3.8.0/frmts/hdf5/CMakeLists.txt#L61-L64 + tc.variables["GDAL_ENABLE_HDF5_GLOBAL_LOCK"] = ( + self.options.with_hdf5 and + bool(self.dependencies["hdf5"].options.get_safe("threadsafe")) + ) + # https://github.com/OSGeo/gdal/blob/v3.8.0/frmts/hdf4/CMakeLists.txt#L28-L46 + tc.variables["HDF4_HAS_MAXOPENFILES"] = ( + self.options.with_hdf4 and + Version(self.dependencies["hdf4"].ref.version) >= "4.2.5" + ) + # https://github.com/OSGeo/gdal/blob/4bb78aab3ae9ab5433042bc27239d1555cbe272e/cmake/helpers/CheckDependentLibraries.cmake#L301-L318 + # The detection fails for some reason + # Setting it to non-const is compatible with all platforms + tc.variables["_ICONV_SECOND_ARGUMENT_IS_NOT_CONST"] = True + tc.generate() + + + deps = CMakeDeps(self) + # https://gdal.org/development/building_from_source.html#cmake-package-dependent-options + # Based on `grep -hPIR '(gdal_check_package|find_package2)\(' ~/.conan2/p/b/gdal*/b/src/cmake | sort -u` + conan_to_cmake_pkg_name = { + "armadillo": "Armadillo", + "arrow": "Arrow", + "brunsli": "BRUNSLI", + "c-blosc": "Blosc", + "cfitsio": "CFITSIO", + "crunch": "Crnlib", + "cryptopp": "CryptoPP", + "expat": "EXPAT", + "freexl": "FreeXL", + # "fyba": "FYBA", + "geos": "GEOS", + "giflib": "GIF", + "hdf4": "HDF4", + "hdf5": "HDF5", + # "hdfs": "HDFS", + "json-c": "JSONC", + "kealib": "KEA", + "lerc": "LERC", + "libaec": "LIBAEC", + "libarchive": "ARCHIVE", + "libbasisu": "basisu", + # "libcsf": "LIBCSF", + "libcurl": "CURL", + "libdeflate": "Deflate", + "libecwj2": "ECW", + "libgeotiff": "GeoTIFF", + "libgta": "GTA", + "libheif": "HEIF", + "libiconv": "Iconv", + "libjpeg": "JPEG", + "libjpeg-turbo": "JPEG", + "libjxl": "JXL", + "libkml": "LibKML", + "libmysqlclient": "MySQL", + "libpng": "PNG", + "libpq": "PostgreSQL", + # "libqb3": "libQB3", + "librasterlite2": "RASTERLITE2", + "libspatialite": "SPATIALITE", + "libtiff": "TIFF", + "libwebp": "WebP", + "libxml2": "LibXml2", + "lz4": "LZ4", + "mariadb-connector-c": "MySQL", + "mongo-cxx-driver": "MONGOCXX", + "netcdf": "NetCDF", + "odbc": "ODBC", + # "odbccpp": "ODBCCPP", + # "ogdi": "OGDI", + # "opencad": "OpenCAD", + "opencl-icd-loader": "OpenCL", + "openexr": "OpenEXR", + "openjpeg": "OpenJPEG", + "openssl": "OpenSSL", + "pcre": "PCRE", + "pcre2": "PCRE2", + "pdfium": "PDFIUM", + "podofo": "Podofo", + "poppler": "Poppler", + "proj": "PROJ", + "qhull": "QHULL", + # "sfcgal": "SFCGAL", + "shapelib": "Shapelib", + "sqlite3": "SQLite3", + "tiledb": "TileDB", + "xerces-c": "XercesC", + "xz_utils": "LibLZMA", + "zlib": "ZLIB", + "zstd": "ZSTD", + # Closed-source/proprietary libraries + # "filegdb": "FileGDB", + # "idb": "IDB", + # "kdu": "KDU", + # "luratech": "LURATECH", + # "mrsid": "MRSID", + # "mssql_ncli": "MSSQL_NCLI", + # "mssql_odbc": "MSSQL_ODBC", + # "oracle": "Oracle", + # "rdb": "rdb", + # "teigha": "TEIGHA", + } + for conan_name, cmake_name in conan_to_cmake_pkg_name.items(): + deps.set_property(conan_name, "cmake_find_mode", "config") + deps.set_property(conan_name, "cmake_file_name", cmake_name) + + renamed_targets = { + "arrow::libarrow": "Arrow::arrow_shared" if Version(self.version) >= "3.7" else "arrow_shared", + "arrow::dataset": "ArrowDataset::arrow_dataset_shared", + "arrow::libparquet": "Parquet::parquet_shared", + "brunsli::brunslidec-c": "BRUNSLI::DECODE", + "brunsli::brunslienc-c": "BRUNSLI::ENCODE", + "c-blosc": "Blosc::Blosc", + "cfitsio": "CFITSIO::CFITSIO", + "crunch": "CRNLIB::Crnlib", + "cryptopp": "CRYPTOPP::CRYPTOPP", + "freexl": "FREEXL::freexl", + "geos": "GEOS::GEOS", + "hdf4": "HDF4::HDF4", + "hdfs": "HDFS::HDFS", + "kealib": "KEA::KEA", + "lerc": "LERC::LERC", + "libaec": "LIBAEC::LIBAEC", + "libarchive": "ARCHIVE::ARCHIVE", + "libbasisu": "basisu::basisu_lib", + "libdeflate": "Deflate::Deflate", + "libecwj2": "ECW::ECW_ALL", + "libgeotiff": "GEOTIFF::GEOTIFF", + "libheif": "HEIF::HEIF", + "libjxl::jxl": "JXL::JXL", + "libjxl::jxl_threads": "JXL_THREADS::JXL_THREADS", + "libjpeg": "JPEG::JPEG", + "libjpeg-turbo::jpeg": "JPEG::JPEG", + "libkml::kmldom": "LIBKML::DOM", + "libkml::kmlengine": "LIBKML::ENGINE", + "libkml": "LIBKML::LibKML", + "librasterlite2": "RASTERLITE2::RASTERLITE2", + "libspatialite": "SPATIALITE::SPATIALITE", + "libwebp": "WEBP::WebP", + "lz4": "LZ4::LZ4", + "mongo-cxx-driver::bsoncxx": "MONGOCXX::BSONCXX", + "mongo-cxx-driver::mongocxx": "MONGOCXX::MONGOCXX", + "netcds": "netCDF::netcdf", + "opencl-icd-loader": "OpenCL::OpenCL", + "openjpeg": "OPENJPEG::OpenJPEG", + "pcre": "PCRE::PCRE", + "pcre2::pcre2-8": "PCRE2::PCRE2-8", + "pdfium": "PDFIUM::PDFIUM", + "podofo": "PODOFO::Podofo", + "poppler": "Poppler::Poppler", + "shapelib": "SHAPELIB::shp", + "tiledb": "TileDB::tiledb_shared", + "xz_utils": "LibLZMA::LibLZMA", + "zstd": "ZSTD::zstd", + } + for component, new_target_name in renamed_targets.items(): + deps.set_property(component, "cmake_target_name", new_target_name) + + deps.generate() + + def _patch_sources(self): apply_conandata_patches(self) - cmake = self._configure_cmake() + # Fix Deflate::Deflate not being correctly propagated internally. + replace_in_file(self, os.path.join(self.source_folder, "port", "CMakeLists.txt"), + "PRIVATE Deflate::Deflate", + "PUBLIC Deflate::Deflate") + # Workaround for JXL_THREADS being provided by the JXL package on CCI. + replace_in_file(self, os.path.join(self.source_folder, "cmake", "helpers", "CheckDependentLibraries.cmake"), + "JXL_THREADS", "JXL", strict=False) + # Workaround for Parquet and ArrowDataset being provided by Arrow on CCI. + replace_in_file(self, os.path.join(self.source_folder, "cmake", "helpers", "CheckDependentLibraries.cmake"), + "gdal_check_package(Parquet", "# gdal_check_package(Parquet") + if Version(self.version) >= "3.6.0": + replace_in_file(self, os.path.join(self.source_folder, "cmake", "helpers", "CheckDependentLibraries.cmake"), + "gdal_check_package(ArrowDataset", "# gdal_check_package(ArrowDataset") + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure(build_script_folder=self.source_path.parent) cmake.build() def package(self): - self.copy("LICENSE.TXT", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE.TXT", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() - files.rmdir(self, os.path.join(self.package_folder, "share")) - files.rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - files.rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - fix_apple_shared_install_name(self) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + os.rename(os.path.join(self.package_folder, "share"), + os.path.join(self.package_folder, "res")) + rmdir(self, os.path.join(self.package_folder, "res", "bash-completion")) + rmdir(self, os.path.join(self.package_folder, "res", "man")) def package_info(self): - self.cpp_info.set_property("cmake_file_name", "GDAL") self.cpp_info.set_property("cmake_target_name", "GDAL::GDAL") self.cpp_info.set_property("cmake_find_mode", "both") self.cpp_info.set_property("pkg_config_name", "gdal") - self.cpp_info.names["cmake_find_package"] = "GDAL" - self.cpp_info.names["cmake_find_package_multi"] = "GDAL" - self.cpp_info.filenames["cmake_find_package"] = "GDAL" - self.cpp_info.filenames["cmake_find_package_multi"] = "GDAL" - + # https://github.com/OSGeo/gdal/blob/v3.7.2/gdal.cmake#L384-L392 + # FIXME: set the correct postfix for MinGW shared builds libname = "gdal" - if self.settings.os == "Windows": + if is_msvc(self): if self.settings.build_type == "Debug": libname += "d" - self.cpp_info.libs = [ libname ] - - self.cpp_info.requires.extend(['json-c::json-c']) - self.cpp_info.requires.extend(['libgeotiff::libgeotiff']) - + self.cpp_info.libs = [libname] + self.cpp_info.resdirs = ["res"] + + self.cpp_info.requires.extend(["json-c::json-c"]) + self.cpp_info.requires.extend(["libgeotiff::libgeotiff"]) + self.cpp_info.requires.extend(["libtiff::libtiff"]) + self.cpp_info.requires.extend(["proj::projlib"]) + self.cpp_info.requires.extend(["zlib::zlib"]) if self.options.with_armadillo: - self.cpp_info.requires.extend(['armadillo::armadillo']) - + self.cpp_info.requires.extend(["armadillo::armadillo"]) if self.options.with_arrow: - self.cpp_info.requires.extend(['arrow::libarrow']) - + self.cpp_info.requires.extend(["arrow::libarrow"]) + if self.dependencies["arrow"].options.parquet: + self.cpp_info.requires.extend(["arrow::libparquet"]) + if self.dependencies["arrow"].options.dataset_modules: + self.cpp_info.requires.extend(["arrow::dataset"]) + if self.options.with_basisu: + self.cpp_info.requires.extend(["libbasisu::libbasisu"]) + if self.options.with_brunsli: + self.cpp_info.requires.extend(["brunsli::brunsli"]) if self.options.with_blosc: - self.cpp_info.requires.extend(['c-blosc::c-blosc']) - + self.cpp_info.requires.extend(["c-blosc::c-blosc"]) if self.options.with_cfitsio: - self.cpp_info.requires.extend(['cfitsio::cfitsio']) - + self.cpp_info.requires.extend(["cfitsio::cfitsio"]) if self.options.with_cryptopp: - self.cpp_info.requires.extend(['cryptopp::libcryptopp']) - + self.cpp_info.requires.extend(["cryptopp::libcryptopp"]) if self.options.with_curl: - self.cpp_info.requires.extend(['libcurl::curl']) - + self.cpp_info.requires.extend(["libcurl::curl"]) if self.options.with_dds: - self.cpp_info.requires.extend(['crunch::crunch']) - + self.cpp_info.requires.extend(["crunch::crunch"]) + if self.options.with_ecw: + self.cpp_info.requires.extend(["libecwj2::libecwj2"]) if self.options.with_expat: - self.cpp_info.requires.extend(['expat::expat']) - + self.cpp_info.requires.extend(["expat::expat"]) if self.options.with_exr: - self.cpp_info.requires.extend(['openexr::openexr', 'imath::imath']) - + self.cpp_info.requires.extend(["openexr::openexr", "imath::imath"]) if self.options.with_freexl: - self.cpp_info.requires.extend(['freexl::freexl']) - + self.cpp_info.requires.extend(["freexl::freexl"]) if self.options.with_geos: - self.cpp_info.requires.extend(['geos::geos_c']) - + self.cpp_info.requires.extend(["geos::geos_c"]) if self.options.with_gif: - self.cpp_info.requires.extend(['giflib::giflib']) - + self.cpp_info.requires.extend(["giflib::giflib"]) if self.options.with_gta: - self.cpp_info.requires.extend(['libgta::libgta']) - + self.cpp_info.requires.extend(["libgta::libgta"]) if self.options.with_hdf4: - self.cpp_info.requires.extend(['hdf4::hdf4']) - + self.cpp_info.requires.extend(["hdf4::hdf4"]) if self.options.with_hdf5: - self.cpp_info.requires.extend(['hdf5::hdf5_c']) - + self.cpp_info.requires.extend(["hdf5::hdf5_c"]) if self.options.with_heif: - self.cpp_info.requires.extend(['libheif::libheif']) - + self.cpp_info.requires.extend(["libheif::libheif"]) + if self.options.with_jxl: + self.cpp_info.requires.extend(["libjxl::libjxl"]) if self.options.with_kea: - self.cpp_info.requires.extend(['kealib::kealib']) - + self.cpp_info.requires.extend(["kealib::kealib"]) + if self.options.with_lerc: + self.cpp_info.requires.extend(["lerc::lerc"]) + if self.options.get_safe("with_libaec"): + self.cpp_info.requires.extend(["libaec::libaec"]) + if self.options.with_libarchive: + self.cpp_info.requires.extend(["libarchive::libarchive"]) if self.options.with_libdeflate: - self.cpp_info.requires.extend(['libdeflate::libdeflate']) - + self.cpp_info.requires.extend(["libdeflate::libdeflate"]) if self.options.with_libiconv: - self.cpp_info.requires.extend(['libiconv::libiconv']) - + self.cpp_info.requires.extend(["libiconv::libiconv"]) if self.options.with_jpeg == "libjpeg": - self.cpp_info.requires.extend(['libjpeg::libjpeg']) + self.cpp_info.requires.extend(["libjpeg::libjpeg"]) elif self.options.with_jpeg == "libjpeg-turbo": - self.cpp_info.requires.extend(['libjpeg-turbo::turbojpeg']) - + self.cpp_info.requires.extend(["libjpeg-turbo::turbojpeg"]) if self.options.with_libkml: - self.cpp_info.requires.extend(['libkml::kmldom', 'libkml::kmlengine']) - - if self.options.with_libtiff: - self.cpp_info.requires.extend(['libtiff::libtiff']) - + self.cpp_info.requires.extend(["libkml::kmldom", "libkml::kmlengine"]) + if self.options.with_lzma: + self.cpp_info.requires.extend(["xz_utils::xz_utils"]) if self.options.with_lz4: - self.cpp_info.requires.extend(['lz4::lz4']) - + self.cpp_info.requires.extend(["lz4::lz4"]) if self.options.with_mongocxx: - self.cpp_info.requires.extend(['mongo-cxx-driver::mongo-cxx-driver']) - + self.cpp_info.requires.extend(["mongo-cxx-driver::mongo-cxx-driver"]) if self.options.with_mysql == "libmysqlclient": - self.cpp_info.requires.extend(['libmysqlclient::libmysqlclient']) + self.cpp_info.requires.extend(["libmysqlclient::libmysqlclient"]) elif self.options.with_mysql == "mariadb-connector-c": - self.cpp_info.requires.extend(['mariadb-connector-c::mariadb-connector-c']) - + self.cpp_info.requires.extend(["mariadb-connector-c::mariadb-connector-c"]) if self.options.with_netcdf: - self.cpp_info.requires.extend(['netcdf::netcdf']) - + self.cpp_info.requires.extend(["netcdf::netcdf"]) if self.options.with_odbc: - self.cpp_info.requires.extend(['odbc::odbc']) - + self.cpp_info.requires.extend(["odbc::odbc"]) + if self.options.with_opencl: + self.cpp_info.requires.extend(["opencl-icd-loader::opencl-icd-loader"]) if self.options.with_openjpeg: - self.cpp_info.requires.extend(['openjpeg::openjpeg']) - + self.cpp_info.requires.extend(["openjpeg::openjpeg"]) if self.options.with_openssl: - self.cpp_info.requires.extend(['openssl::ssl']) - + self.cpp_info.requires.extend(["openssl::ssl"]) if self.options.with_pcre: - self.cpp_info.requires.extend(['pcre::pcre']) - + self.cpp_info.requires.extend(["pcre::pcre"]) if self.options.with_pcre2: - self.cpp_info.requires.extend(['pcre2::pcre2-8']) - + self.cpp_info.requires.extend(["pcre2::pcre2-8"]) + # if self.options.with_pdfium: + # self.cpp_info.requires.extend(["pdfium::pdfium"]) if self.options.with_pg: - self.cpp_info.requires.extend(['libpq::pq']) - + self.cpp_info.requires.extend(["libpq::pq"]) if self.options.with_png: - self.cpp_info.requires.extend(['libpng::libpng']) - + self.cpp_info.requires.extend(["libpng::libpng"]) if self.options.with_podofo: - self.cpp_info.requires.extend(['podofo::podofo']) - + self.cpp_info.requires.extend(["podofo::podofo"]) if self.options.with_poppler: - self.cpp_info.requires.extend(['poppler::libpoppler']) - - if self.options.with_proj: - self.cpp_info.requires.extend(['proj::projlib']) - + self.cpp_info.requires.extend(["poppler::libpoppler"]) + if self.options.with_rasterlite2: + self.cpp_info.requires.extend(["librasterlite2::librasterlite2"]) if self.options.with_qhull: - self.cpp_info.requires.extend(['qhull::libqhull']) - + self.cpp_info.requires.extend(["qhull::libqhull"]) + if self.options.with_spatialite: + self.cpp_info.requires.extend(["libspatialite::libspatialite"]) if self.options.with_sqlite3: - self.cpp_info.requires.extend(['sqlite3::sqlite']) - + self.cpp_info.requires.extend(["sqlite3::sqlite"]) + if self.options.with_tiledb: + self.cpp_info.requires.extend(["tiledb::tiledb"]) if self.options.with_webp: - self.cpp_info.requires.extend(['libwebp::libwebp']) - + self.cpp_info.requires.extend(["libwebp::libwebp"]) if self.options.with_xerces: - self.cpp_info.requires.extend(['xerces-c::xerces-c']) - + self.cpp_info.requires.extend(["xerces-c::xerces-c"]) if self.options.with_xml2: - self.cpp_info.requires.extend(['libxml2::libxml2']) - - if self.options.with_zlib: - self.cpp_info.requires.extend(['zlib::zlib']) - + self.cpp_info.requires.extend(["libxml2::libxml2"]) if self.options.with_zstd: - self.cpp_info.requires.extend(['zstd::zstdlib']) + self.cpp_info.requires.extend(["zstd::zstdlib"]) + + # Based on https://github.com/OSGeo/gdal/blob/v3.7.2/port/CMakeLists.txt + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs += ["pthread"] + elif self.settings.os == "Windows": + if is_msvc(self): + self.cpp_info.system_libs += ["wbemuuid"] + if self.options.with_openssl: + self.cpp_info.system_libs += ["crypt32"] gdal_data_path = os.path.join(self.package_folder, "res", "gdal") - self.output.info( - "Prepending to GDAL_DATA environment variable: {}".format( - gdal_data_path)) - self.runenv_info.prepend_path("GDAL_DATA", gdal_data_path) - # TODO: to remove after conan v2, it allows to not break consumers still relying on virtualenv generator - self.env_info.GDAL_DATA = gdal_data_path + self.runenv_info.define_path("GDAL_DATA", gdal_data_path) if self.options.tools: - self.buildenv_info.prepend_path("GDAL_DATA", gdal_data_path) - bin_path = os.path.join(self.package_folder, "bin") - self.output.info( - "Appending PATH environment variable: {}".format(bin_path)) - self.env_info.PATH.append(bin_path) + self.buildenv_info.define_path("GDAL_DATA", gdal_data_path) + + # TODO: remove in conan v2 + self.cpp_info.names["cmake_find_package"] = "GDAL" + self.cpp_info.names["cmake_find_package_multi"] = "GDAL" + self.cpp_info.filenames["cmake_find_package"] = "GDAL" + self.cpp_info.filenames["cmake_find_package_multi"] = "GDAL" + self.env_info.GDAL_DATA = gdal_data_path diff --git a/recipes/gdal/post_3.5.0/patches/3.5.1/0-replace-find-package.patch b/recipes/gdal/post_3.5.0/patches/3.5.1/0-replace-find-package.patch deleted file mode 100644 index e790a586d8abd..0000000000000 --- a/recipes/gdal/post_3.5.0/patches/3.5.1/0-replace-find-package.patch +++ /dev/null @@ -1,266 +0,0 @@ -diff --git a/alg/CMakeLists.txt b/alg/CMakeLists.txt -index edf75158c7..4200309ca8 100644 ---- a/alg/CMakeLists.txt -+++ b/alg/CMakeLists.txt -@@ -72,7 +72,7 @@ if (GDAL_USE_OPENCL) - target_sources(alg PRIVATE gdalwarpkernel_opencl.h gdalwarpkernel_opencl.cpp) - endif () - --gdal_target_link_libraries(alg PRIVATE PROJ::proj) -+target_link_libraries(alg PUBLIC PROJ::proj) - - if (GDAL_USE_QHULL_INTERNAL) - target_compile_definitions(alg PRIVATE -DINTERNAL_QHULL) -diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt -index a49165d14a..91d6170067 100644 ---- a/apps/CMakeLists.txt -+++ b/apps/CMakeLists.txt -@@ -25,7 +25,7 @@ target_include_directories( - appslib PRIVATE $ $ - $ $) - --gdal_target_link_libraries(appslib PRIVATE PROJ::proj) -+target_link_libraries(appslib PUBLIC PROJ::proj) - - set_property(TARGET appslib PROPERTY POSITION_INDEPENDENT_CODE ${GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE}) - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16) -diff --git a/cmake/helpers/CheckDependentLibraries.cmake b/cmake/helpers/CheckDependentLibraries.cmake -index 7fa3b565c7..77a610f223 100644 ---- a/cmake/helpers/CheckDependentLibraries.cmake -+++ b/cmake/helpers/CheckDependentLibraries.cmake -@@ -11,7 +11,10 @@ Detect GDAL dependencies and set variable HAVE_* - include(CheckFunctionExists) - include(CMakeDependentOption) - include(FeatureSummary) --include(DefineFindPackage2) -+ -+# Conan recipes should rely on config files from generators so let's just disble GDAL's -+include(ConanFindPackage) -+ - include(CheckSymbolExists) - - option( -@@ -111,47 +114,7 @@ macro (gdal_check_package name purpose) - set(_find_dependency_args "") - find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) - if (NOT DEFINED ${key}_FOUND) -- set(_find_package_args) -- if (_GCP_VERSION) -- list(APPEND _find_package_args ${_GCP_VERSION}) -- endif () -- if (_GCP_CONFIG) -- list(APPEND _find_package_args CONFIG) -- endif () -- if (_GCP_COMPONENTS) -- list(APPEND _find_package_args COMPONENTS ${_GCP_COMPONENTS}) -- endif () -- if (_GCP_PATHS) -- list(APPEND _find_package_args PATHS ${_GCP_PATHS}) -- endif () -- if (_GCP_NAMES) -- set(GDAL_CHECK_PACKAGE_${name}_NAMES "${_GCP_NAMES}" CACHE STRING "Config file name for ${name}") -- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_NAMES) -- endif () -- if (_GCP_TARGETS) -- set(GDAL_CHECK_PACKAGE_${name}_TARGETS "${_GCP_TARGETS}" CACHE STRING "Target name candidates for ${name}") -- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_TARGETS) -- endif () -- if (GDAL_CHECK_PACKAGE_${name}_NAMES) -- find_package(${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} ${_find_package_args}) -- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS} REQUIRED) -- if (${name}_FOUND) -- get_filename_component(_find_dependency_args "${${name}_CONFIG}" NAME) -- string(REPLACE ";" " " _find_dependency_args "${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} CONFIGS ${_find_dependency_args} ${_find_package_args}") -- endif () -- endif () -- if (NOT ${name}_FOUND) -- find_package(${name} ${_find_package_args}) -- if (${name}_FOUND) -- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) -- elseif (${key}_FOUND) # Some find modules do not set _FOUND -- gdal_check_package_target(${key} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) -- set(${name}_FOUND "${key}_FOUND") -- endif () -- if (${name}_FOUND) -- string(REPLACE ";" " " _find_dependency_args "${name} ${_find_package_args}") -- endif() -- endif () -+ message(FATAL_ERROR "Conan recipes should rely on config files from generators so let's just disble GDAL's") - endif () - if (${key}_FOUND OR ${name}_FOUND) - set(HAVE_${key} ON) -@@ -321,14 +284,15 @@ if (GDAL_USE_CRYPTOPP) - endif () - - # First check with CMake config files (starting at version 8, due to issues with earlier ones), and then fallback to the FindPROJ module. --find_package(PROJ 9 CONFIG QUIET) --if (NOT PROJ_FOUND) -- find_package(PROJ 8 CONFIG QUIET) --endif() -+find_package2(PROJ) -+target_include_directories(PROJ::proj INTERFACE ${PROJ_INCLUDE_DIRS}) -+#if (NOT PROJ_FOUND) -+# find_package(proj 8 CONFIG QUIET) -+#endif() - if (PROJ_FOUND) - string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ ${PROJ_VERSION_MAJOR} CONFIG)\n") - else() -- find_package(PROJ 6.0 REQUIRED) -+ find_package(proj 6.0 REQUIRED) - string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ 6.0)\n") - endif () - -@@ -379,15 +343,10 @@ gdal_check_package(JSONC "json-c library (external)" CAN_DISABLE - TARGETS json-c::json-c JSONC::JSONC - ) - gdal_internal_library(JSONC REQUIRED) --if(TARGET json-c::json-c) -- get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) -- find_path(GDAL_JSON_INCLUDE_DIR NAMES json.h PATHS ${include_dirs} PATH_SUFFIXES json-c NO_DEFAULT_PATH) -- list(APPEND include_dirs "${GDAL_JSON_INCLUDE_DIR}") -- list(REMOVE_DUPLICATES include_dirs) -- set_target_properties(json-c::json-c PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${GDAL_JSON_INCLUDE_DIR}" -- ) --endif() -+get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) -+list(APPEND include_dirs "${JSONC_INCLUDE_DIRS}/json-c") -+set_target_properties(json-c::json-c PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${include_dirs}") -+message("Setting include for json-c: ${include_dirs}") - - gdal_check_package(OpenCAD "libopencad (external, used by OpenCAD driver)" CAN_DISABLE) - gdal_internal_library(OPENCAD) -@@ -482,7 +441,7 @@ if (GDAL_USE_RASTERLITE2) - endif () - cmake_dependent_option(GDAL_USE_RASTERLITE2 "Set ON to use Rasterlite2" ON HAVE_RASTERLITE2 OFF) - --find_package(LibKML COMPONENTS DOM ENGINE) -+find_package(LibKML COMPONENTS kmlengine kmldom kmlbase) - if (GDAL_USE_LIBKML) - if (NOT LibKML_FOUND) - message(FATAL_ERROR "Configured to use GDAL_USE_LIBKML, but not found") -diff --git a/cmake/helpers/ConanFindPackage.cmake b/cmake/helpers/ConanFindPackage.cmake -new file mode 100644 -index 0000000000..9dfa8193a3 ---- /dev/null -+++ b/cmake/helpers/ConanFindPackage.cmake -@@ -0,0 +1,43 @@ -+ -+function(define_find_package2 pkgname include_file library_name) -+endfunction() -+ -+function(find_package2 pkgname) -+ set(_options QUIET REQUIRED) -+ set(_oneValueArgs OUT_DEPENDENCY) -+ set(_multiValueArgs) -+ cmake_parse_arguments(arg "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) -+ if(arg_QUIET) -+ set(${pkgname}_FIND_QUIETLY TRUE) -+ endif() -+ if(arg_REQUIRED) -+ set(${pkgname}_FIND_REQUIRED TRUE) -+ endif() -+ -+ string(TOUPPER ${pkgname} key) -+ -+ set(docstring "Configured for conan package ${GDAL_CONAN_PACKAGE_FOR_${key}}") -+ if (DEFINED GDAL_CONAN_PACKAGE_FOR_${key}) -+ message("Using conan package ${GDAL_CONAN_PACKAGE_FOR_${key}} for dependency ${pkgname}") -+ set(conan_package ${GDAL_CONAN_PACKAGE_FOR_${key}}) -+ string(TOUPPER ${conan_package} conan_package_upper) -+ -+ set(${key}_INCLUDE_DIRS "${CONAN_INCLUDE_DIRS_${conan_package_upper}}" CACHE STRING ${docstring}) -+ if (NOT TARGET_FOR_${key}) -+ set(TARGET_FOR_${key} "${conan_package}::${conan_package}") -+ endif() -+ set(${key}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_INCLUDE_DIRS "CONAN_INCLUDE_DIRS_${conan_package_upper}" CACHE STRING ${docstring}) -+ set(${pkgname}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_FOUND TRUE CACHE BOOL ${docstring}) -+ -+ else () -+ message("dependency ${pkgname} has no conan package") -+ set(${key}_FOUND FALSE CACHE BOOL ${docstring}) -+ endif() -+ -+endfunction() -diff --git a/frmts/hfa/CMakeLists.txt b/frmts/hfa/CMakeLists.txt -index e5b7138e91..039cac7361 100644 ---- a/frmts/hfa/CMakeLists.txt -+++ b/frmts/hfa/CMakeLists.txt -@@ -15,7 +15,8 @@ add_gdal_driver( - hfa_overviews.cpp - BUILTIN) - gdal_standard_includes(gdal_HFA) --target_include_directories(gdal_HFA PRIVATE $) -+target_link_libraries(gdal_HFA INTERFACE PROJ::proj) -+target_include_directories(gdal_HFA PRIVATE ${PROJ_INCLUDE_DIRS}) - target_compile_definitions(gdal_HFA PRIVATE $) - - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) -diff --git a/gdal.cmake b/gdal.cmake -index ff1ca7e6f6..e98875f1b9 100644 ---- a/gdal.cmake -+++ b/gdal.cmake -@@ -795,25 +795,6 @@ if (NOT GDAL_ENABLE_MACOSX_FRAMEWORK) - ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake @ONLY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/gdal/) - -- # Generate gdal-config utility command and pkg-config module gdal.pc -- include(GdalGenerateConfig) -- gdal_generate_config( -- TARGET -- "${GDAL_LIB_TARGET_NAME}" -- GLOBAL_PROPERTY -- "gdal_private_link_libraries" -- GDAL_CONFIG -- "${PROJECT_BINARY_DIR}/apps/gdal-config" -- PKG_CONFIG -- "${CMAKE_CURRENT_BINARY_DIR}/gdal.pc") -- install( -- PROGRAMS ${PROJECT_BINARY_DIR}/apps/gdal-config -- DESTINATION ${CMAKE_INSTALL_BINDIR} -- COMPONENT applications) -- install( -- FILES ${CMAKE_CURRENT_BINARY_DIR}/gdal.pc -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig -- COMPONENT libraries) - endif () - - configure_file(${GDAL_CMAKE_TEMPLATE_PATH}/uninstall.cmake.in ${PROJECT_BINARY_DIR}/cmake_uninstall.cmake @ONLY) -diff --git a/ogr/CMakeLists.txt b/ogr/CMakeLists.txt -index 19ba4e12fe..87cd123c54 100644 ---- a/ogr/CMakeLists.txt -+++ b/ogr/CMakeLists.txt -@@ -88,12 +88,12 @@ endif () - - target_compile_definitions(ogr PRIVATE HAVE_MITAB) - --gdal_target_link_libraries(ogr PRIVATE PROJ::proj) -+target_link_libraries(ogr PUBLIC PROJ::proj) - - # External libs then - if (GDAL_USE_GEOS) - target_compile_definitions(ogr PRIVATE -DHAVE_GEOS=1) -- gdal_target_link_libraries(ogr PRIVATE ${GEOS_TARGET}) -+ target_link_libraries(ogr PUBLIC ${GEOS_TARGET}) - endif () - - if (GDAL_USE_SFCGAL) -diff --git a/ogr/ogr_proj_p.h b/ogr/ogr_proj_p.h -index 88928ad1ad..7cdd587db7 100644 ---- a/ogr/ogr_proj_p.h -+++ b/ogr/ogr_proj_p.h -@@ -29,7 +29,7 @@ - #ifndef OGR_PROJ_P_H_INCLUDED - #define OGR_PROJ_P_H_INCLUDED - --#include "proj.h" -+#include - - #include "cpl_mem_cache.h" - diff --git a/recipes/gdal/post_3.5.0/patches/3.5.2/0-replace-find-package.patch b/recipes/gdal/post_3.5.0/patches/3.5.2/0-replace-find-package.patch deleted file mode 100644 index b01b5b271034c..0000000000000 --- a/recipes/gdal/post_3.5.0/patches/3.5.2/0-replace-find-package.patch +++ /dev/null @@ -1,266 +0,0 @@ -diff --git a/alg/CMakeLists.txt b/alg/CMakeLists.txt -index edf75158c7..4200309ca8 100644 ---- a/alg/CMakeLists.txt -+++ b/alg/CMakeLists.txt -@@ -72,7 +72,7 @@ if (GDAL_USE_OPENCL) - target_sources(alg PRIVATE gdalwarpkernel_opencl.h gdalwarpkernel_opencl.cpp) - endif () - --gdal_target_link_libraries(alg PRIVATE PROJ::proj) -+target_link_libraries(alg PUBLIC PROJ::proj) - - if (GDAL_USE_QHULL_INTERNAL) - target_compile_definitions(alg PRIVATE -DINTERNAL_QHULL) -diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt -index 8b02cea456..ad4adbfc9e 100644 ---- a/apps/CMakeLists.txt -+++ b/apps/CMakeLists.txt -@@ -25,7 +25,7 @@ target_include_directories( - appslib PRIVATE $ $ - $ $) - --gdal_target_link_libraries(appslib PRIVATE PROJ::proj) -+target_link_libraries(appslib PUBLIC PROJ::proj) - - set_property(TARGET appslib PROPERTY POSITION_INDEPENDENT_CODE ${GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE}) - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16) -diff --git a/cmake/helpers/CheckDependentLibraries.cmake b/cmake/helpers/CheckDependentLibraries.cmake -index 0a66b44fec..152ff42ff7 100644 ---- a/cmake/helpers/CheckDependentLibraries.cmake -+++ b/cmake/helpers/CheckDependentLibraries.cmake -@@ -11,7 +11,10 @@ Detect GDAL dependencies and set variable HAVE_* - include(CheckFunctionExists) - include(CMakeDependentOption) - include(FeatureSummary) --include(DefineFindPackage2) -+ -+# Conan recipes should rely on config files from generators so let's just disble GDAL's -+include(ConanFindPackage) -+ - include(CheckSymbolExists) - - option( -@@ -111,47 +114,7 @@ macro (gdal_check_package name purpose) - set(_find_dependency_args "") - find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) - if (NOT DEFINED ${key}_FOUND) -- set(_find_package_args) -- if (_GCP_VERSION) -- list(APPEND _find_package_args ${_GCP_VERSION}) -- endif () -- if (_GCP_CONFIG) -- list(APPEND _find_package_args CONFIG) -- endif () -- if (_GCP_COMPONENTS) -- list(APPEND _find_package_args COMPONENTS ${_GCP_COMPONENTS}) -- endif () -- if (_GCP_PATHS) -- list(APPEND _find_package_args PATHS ${_GCP_PATHS}) -- endif () -- if (_GCP_NAMES) -- set(GDAL_CHECK_PACKAGE_${name}_NAMES "${_GCP_NAMES}" CACHE STRING "Config file name for ${name}") -- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_NAMES) -- endif () -- if (_GCP_TARGETS) -- set(GDAL_CHECK_PACKAGE_${name}_TARGETS "${_GCP_TARGETS}" CACHE STRING "Target name candidates for ${name}") -- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_TARGETS) -- endif () -- if (GDAL_CHECK_PACKAGE_${name}_NAMES) -- find_package(${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} ${_find_package_args}) -- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS} REQUIRED) -- if (${name}_FOUND) -- get_filename_component(_find_dependency_args "${${name}_CONFIG}" NAME) -- string(REPLACE ";" " " _find_dependency_args "${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} CONFIGS ${_find_dependency_args} ${_find_package_args}") -- endif () -- endif () -- if (NOT ${name}_FOUND) -- find_package(${name} ${_find_package_args}) -- if (${name}_FOUND) -- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) -- elseif (${key}_FOUND) # Some find modules do not set _FOUND -- gdal_check_package_target(${key} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) -- set(${name}_FOUND "${key}_FOUND") -- endif () -- if (${name}_FOUND) -- string(REPLACE ";" " " _find_dependency_args "${name} ${_find_package_args}") -- endif() -- endif () -+ message(FATAL_ERROR "Conan recipes should rely on config files from generators so let's just disble GDAL's") - endif () - if (${key}_FOUND OR ${name}_FOUND) - set(HAVE_${key} ON) -@@ -345,14 +308,15 @@ if (GDAL_USE_CRYPTOPP) - endif () - - # First check with CMake config files (starting at version 8, due to issues with earlier ones), and then fallback to the FindPROJ module. --find_package(PROJ 9 CONFIG QUIET) --if (NOT PROJ_FOUND) -- find_package(PROJ 8 CONFIG QUIET) --endif() -+find_package2(PROJ) -+target_include_directories(PROJ::proj INTERFACE ${PROJ_INCLUDE_DIRS}) -+#if (NOT PROJ_FOUND) -+# find_package(proj 8 CONFIG QUIET) -+#endif() - if (PROJ_FOUND) - string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ ${PROJ_VERSION_MAJOR} CONFIG)\n") - else() -- find_package(PROJ 6.0 REQUIRED) -+ find_package(proj 6.0 REQUIRED) - string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ 6.0)\n") - endif () - -@@ -412,15 +376,10 @@ gdal_check_package(JSONC "json-c library (external)" CAN_DISABLE - TARGETS json-c::json-c JSONC::JSONC - ) - gdal_internal_library(JSONC REQUIRED) --if(TARGET json-c::json-c) -- get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) -- find_path(GDAL_JSON_INCLUDE_DIR NAMES json.h PATHS ${include_dirs} PATH_SUFFIXES json-c NO_DEFAULT_PATH) -- list(APPEND include_dirs "${GDAL_JSON_INCLUDE_DIR}") -- list(REMOVE_DUPLICATES include_dirs) -- set_target_properties(json-c::json-c PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${GDAL_JSON_INCLUDE_DIR}" -- ) --endif() -+get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) -+list(APPEND include_dirs "${JSONC_INCLUDE_DIRS}/json-c") -+set_target_properties(json-c::json-c PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${include_dirs}") -+message("Setting include for json-c: ${include_dirs}") - - gdal_check_package(OpenCAD "libopencad (external, used by OpenCAD driver)" CAN_DISABLE) - gdal_internal_library(OPENCAD) -@@ -517,7 +476,7 @@ if (GDAL_USE_RASTERLITE2) - endif () - cmake_dependent_option(GDAL_USE_RASTERLITE2 "Set ON to use Rasterlite2" ON HAVE_RASTERLITE2 OFF) - --find_package(LibKML COMPONENTS DOM ENGINE) -+find_package(LibKML COMPONENTS kmlengine kmldom kmlbase) - if (GDAL_USE_LIBKML) - if (NOT LibKML_FOUND) - message(FATAL_ERROR "Configured to use GDAL_USE_LIBKML, but not found") -diff --git a/cmake/helpers/ConanFindPackage.cmake b/cmake/helpers/ConanFindPackage.cmake -new file mode 100644 -index 0000000000..9dfa8193a3 ---- /dev/null -+++ b/cmake/helpers/ConanFindPackage.cmake -@@ -0,0 +1,43 @@ -+ -+function(define_find_package2 pkgname include_file library_name) -+endfunction() -+ -+function(find_package2 pkgname) -+ set(_options QUIET REQUIRED) -+ set(_oneValueArgs OUT_DEPENDENCY) -+ set(_multiValueArgs) -+ cmake_parse_arguments(arg "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) -+ if(arg_QUIET) -+ set(${pkgname}_FIND_QUIETLY TRUE) -+ endif() -+ if(arg_REQUIRED) -+ set(${pkgname}_FIND_REQUIRED TRUE) -+ endif() -+ -+ string(TOUPPER ${pkgname} key) -+ -+ set(docstring "Configured for conan package ${GDAL_CONAN_PACKAGE_FOR_${key}}") -+ if (DEFINED GDAL_CONAN_PACKAGE_FOR_${key}) -+ message("Using conan package ${GDAL_CONAN_PACKAGE_FOR_${key}} for dependency ${pkgname}") -+ set(conan_package ${GDAL_CONAN_PACKAGE_FOR_${key}}) -+ string(TOUPPER ${conan_package} conan_package_upper) -+ -+ set(${key}_INCLUDE_DIRS "${CONAN_INCLUDE_DIRS_${conan_package_upper}}" CACHE STRING ${docstring}) -+ if (NOT TARGET_FOR_${key}) -+ set(TARGET_FOR_${key} "${conan_package}::${conan_package}") -+ endif() -+ set(${key}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_INCLUDE_DIRS "CONAN_INCLUDE_DIRS_${conan_package_upper}" CACHE STRING ${docstring}) -+ set(${pkgname}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_FOUND TRUE CACHE BOOL ${docstring}) -+ -+ else () -+ message("dependency ${pkgname} has no conan package") -+ set(${key}_FOUND FALSE CACHE BOOL ${docstring}) -+ endif() -+ -+endfunction() -diff --git a/frmts/hfa/CMakeLists.txt b/frmts/hfa/CMakeLists.txt -index e5b7138e91..039cac7361 100644 ---- a/frmts/hfa/CMakeLists.txt -+++ b/frmts/hfa/CMakeLists.txt -@@ -15,7 +15,8 @@ add_gdal_driver( - hfa_overviews.cpp - BUILTIN) - gdal_standard_includes(gdal_HFA) --target_include_directories(gdal_HFA PRIVATE $) -+target_link_libraries(gdal_HFA INTERFACE PROJ::proj) -+target_include_directories(gdal_HFA PRIVATE ${PROJ_INCLUDE_DIRS}) - target_compile_definitions(gdal_HFA PRIVATE $) - - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) -diff --git a/gdal.cmake b/gdal.cmake -index 4bae2e2760..7695df40c8 100644 ---- a/gdal.cmake -+++ b/gdal.cmake -@@ -787,25 +787,6 @@ if (NOT GDAL_ENABLE_MACOSX_FRAMEWORK) - ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake @ONLY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/gdal/) - -- # Generate gdal-config utility command and pkg-config module gdal.pc -- include(GdalGenerateConfig) -- gdal_generate_config( -- TARGET -- "${GDAL_LIB_TARGET_NAME}" -- GLOBAL_PROPERTY -- "gdal_private_link_libraries" -- GDAL_CONFIG -- "${PROJECT_BINARY_DIR}/apps/gdal-config" -- PKG_CONFIG -- "${CMAKE_CURRENT_BINARY_DIR}/gdal.pc") -- install( -- PROGRAMS ${PROJECT_BINARY_DIR}/apps/gdal-config -- DESTINATION ${CMAKE_INSTALL_BINDIR} -- COMPONENT applications) -- install( -- FILES ${CMAKE_CURRENT_BINARY_DIR}/gdal.pc -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig -- COMPONENT libraries) - endif () - - configure_file(${GDAL_CMAKE_TEMPLATE_PATH}/uninstall.cmake.in ${PROJECT_BINARY_DIR}/cmake_uninstall.cmake @ONLY) -diff --git a/ogr/CMakeLists.txt b/ogr/CMakeLists.txt -index 19ba4e12fe..87cd123c54 100644 ---- a/ogr/CMakeLists.txt -+++ b/ogr/CMakeLists.txt -@@ -88,12 +88,12 @@ endif () - - target_compile_definitions(ogr PRIVATE HAVE_MITAB) - --gdal_target_link_libraries(ogr PRIVATE PROJ::proj) -+target_link_libraries(ogr PUBLIC PROJ::proj) - - # External libs then - if (GDAL_USE_GEOS) - target_compile_definitions(ogr PRIVATE -DHAVE_GEOS=1) -- gdal_target_link_libraries(ogr PRIVATE ${GEOS_TARGET}) -+ target_link_libraries(ogr PUBLIC ${GEOS_TARGET}) - endif () - - if (GDAL_USE_SFCGAL) -diff --git a/ogr/ogr_proj_p.h b/ogr/ogr_proj_p.h -index 88928ad1ad..7cdd587db7 100644 ---- a/ogr/ogr_proj_p.h -+++ b/ogr/ogr_proj_p.h -@@ -29,7 +29,7 @@ - #ifndef OGR_PROJ_P_H_INCLUDED - #define OGR_PROJ_P_H_INCLUDED - --#include "proj.h" -+#include - - #include "cpl_mem_cache.h" - diff --git a/recipes/gdal/post_3.5.0/patches/3.5.3/0-replace-find-package.patch b/recipes/gdal/post_3.5.0/patches/3.5.3/0-replace-find-package.patch new file mode 100644 index 0000000000000..a13e4429270d1 --- /dev/null +++ b/recipes/gdal/post_3.5.0/patches/3.5.3/0-replace-find-package.patch @@ -0,0 +1,74 @@ +diff --git a/cmake/helpers/CheckDependentLibraries.cmake b/cmake/helpers/CheckDependentLibraries.cmake +--- a/cmake/helpers/CheckDependentLibraries.cmake ++++ b/cmake/helpers/CheckDependentLibraries.cmake +@@ -11,7 +11,7 @@ + include(CheckFunctionExists) + include(CMakeDependentOption) + include(FeatureSummary) +-include(DefineFindPackage2) ++include(ConanFindPackage) + include(CheckSymbolExists) + + option( +@@ -109,8 +109,8 @@ + string(TOUPPER ${name} key) + set(_find_dependency "") + set(_find_dependency_args "") +- find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) +- if (NOT DEFINED ${key}_FOUND) ++ find_package2(${name} QUIET) ++ if (FALSE) + set(_find_package_args) + if (_GCP_VERSION) + list(APPEND _find_package_args ${_GCP_VERSION}) +@@ -345,7 +345,7 @@ + endif () + + # First check with CMake config files (starting at version 8, due to issues with earlier ones), and then fallback to the FindPROJ module. +-find_package(PROJ 9 CONFIG QUIET) ++find_package2(PROJ 9 CONFIG REQUIRED) + if (NOT PROJ_FOUND) + find_package(PROJ 8 CONFIG QUIET) + endif() +@@ -411,8 +411,8 @@ + NAMES json-c + TARGETS json-c::json-c JSONC::JSONC + ) +-gdal_internal_library(JSONC REQUIRED) +-if(TARGET json-c::json-c) ++find_package2(JSONC REQUIRED) ++if(FALSE) + get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) + find_path(GDAL_JSON_INCLUDE_DIR NAMES json.h PATHS ${include_dirs} PATH_SUFFIXES json-c NO_DEFAULT_PATH) + list(APPEND include_dirs "${GDAL_JSON_INCLUDE_DIR}") +@@ -517,9 +517,9 @@ + endif () + cmake_dependent_option(GDAL_USE_RASTERLITE2 "Set ON to use Rasterlite2" ON HAVE_RASTERLITE2 OFF) + +-find_package(LibKML COMPONENTS DOM ENGINE) ++find_package2(LibKML COMPONENTS DOM ENGINE) + if (GDAL_USE_LIBKML) + if (NOT LibKML_FOUND) + message(FATAL_ERROR "Configured to use GDAL_USE_LIBKML, but not found") + endif () + endif () +@@ -540,8 +540,8 @@ + gdal_check_package(MRSID "MrSID raster SDK" CAN_DISABLE) + gdal_check_package(Armadillo "C++ library for linear algebra (used for TPS transformation)" CAN_DISABLE) + if (ARMADILLO_FOUND) +- # On Conda, the armadillo package has no dependency on lapack, but the later is required for successful linking. So +- # try to build & link a test program using Armadillo. ++ # On Conda, the armadillo package has no dependency on lapack, but the later is required for successful linking. So try to build & link a test program using Armadillo. ++ include(CMakePushCheckState) + cmake_push_check_state(RESET) + set(CMAKE_REQUIRED_INCLUDES "${ARMADILLO_INCLUDE_DIRS}") + set(CMAKE_REQUIRED_LIBRARIES "${ARMADILLO_LIBRARIES}") +@@ -646,7 +646,7 @@ + gdal_check_package(HEIF "HEIF >= 1.1" CAN_DISABLE) + + # OpenJPEG's cmake-CONFIG is broken, so call module explicitly +-find_package(OpenJPEG MODULE) ++find_package2(OpenJPEG MODULE) + if (GDAL_USE_OPENJPEG) + if (NOT OPENJPEG_FOUND) + message(FATAL_ERROR "Configured to use GDAL_USE_OPENJPEG, but not found") diff --git a/recipes/gdal/post_3.5.0/patches/3.5.3/1-do-not-force-private-linking.patch b/recipes/gdal/post_3.5.0/patches/3.5.3/1-do-not-force-private-linking.patch new file mode 100644 index 0000000000000..e45427d007600 --- /dev/null +++ b/recipes/gdal/post_3.5.0/patches/3.5.3/1-do-not-force-private-linking.patch @@ -0,0 +1,20 @@ +diff --git a/cmake/helpers/GdalDriverHelper.cmake b/cmake/helpers/GdalDriverHelper.cmake +--- a/cmake/helpers/GdalDriverHelper.cmake ++++ b/cmake/helpers/GdalDriverHelper.cmake +@@ -280,7 +280,7 @@ + set(_oneValueArgs) + set(_multiValueArgs PRIVATE) + cmake_parse_arguments(_DRIVER "" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) +- if (NOT _DRIVER_PRIVATE) ++ if (FALSE AND NOT _DRIVER_PRIVATE) + message(FATAL_ERROR "gdal_target_link_libraries(): PRIVATE is a mandatory argument.") + endif () + is_plugin(RES ${target}) +@@ -289,6 +289,7 @@ + else () + gdal_target_interfaces(${target} ${_DRIVER_PRIVATE}) + gdal_add_private_link_libraries(${_DRIVER_PRIVATE}) ++ target_link_libraries(${ARGV}) + endif () + endfunction() + diff --git a/recipes/gdal/post_3.5.0/patches/3.5.3/2-allow-cycles-in-cmake-targets.patch b/recipes/gdal/post_3.5.0/patches/3.5.3/2-allow-cycles-in-cmake-targets.patch new file mode 100644 index 0000000000000..31bc2e5a8587d --- /dev/null +++ b/recipes/gdal/post_3.5.0/patches/3.5.3/2-allow-cycles-in-cmake-targets.patch @@ -0,0 +1,22 @@ +diff --git a/cmake/helpers/GdalDriverHelper.cmake b/cmake/helpers/GdalDriverHelper.cmake +--- a/cmake/helpers/GdalDriverHelper.cmake ++++ b/cmake/helpers/GdalDriverHelper.cmake +@@ -249,6 +249,7 @@ + target_compile_options(${_TARGET} PRIVATE ${_res}) + endif () + get_property(_res TARGET ${_LIB} PROPERTY INTERFACE_LINK_LIBRARIES) ++ list(REMOVE_ITEM _res ${_LIB}) + if (_res) + gdal_target_interfaces(${_TARGET} ${_res}) + endif () +diff --git a/cmake/helpers/GdalGenerateConfig.cmake b/cmake/helpers/GdalGenerateConfig.cmake +--- a/cmake/helpers/GdalGenerateConfig.cmake ++++ b/cmake/helpers/GdalGenerateConfig.cmake +@@ -50,6 +50,7 @@ + if(TARGET "${_lib}") + get_target_property(_link_libraries ${_lib} INTERFACE_LINK_LIBRARIES) + get_target_property(_type ${_lib} TYPE) ++ list(REMOVE_ITEM _link_libraries ${_lib}) + if(_link_libraries AND NOT TYPE STREQUAL "SHARED_LIBRARY") + list(INSERT ARGN 0 ${_link_libraries}) + endif() diff --git a/recipes/gdal/post_3.5.0/patches/3.7.0/0-replace-find-package.patch b/recipes/gdal/post_3.5.0/patches/3.7.0/0-replace-find-package.patch deleted file mode 100644 index 34401a53eae6d..0000000000000 --- a/recipes/gdal/post_3.5.0/patches/3.7.0/0-replace-find-package.patch +++ /dev/null @@ -1,282 +0,0 @@ -diff -urN ./a/alg/CMakeLists.txt ./b/alg/CMakeLists.txt ---- ./a/alg/CMakeLists.txt 2023-05-02 08:47:11.000000000 -0500 -+++ ./b/alg/CMakeLists.txt 2023-06-06 16:47:02.784509800 -0500 -@@ -73,7 +73,7 @@ - target_sources(alg PRIVATE gdalwarpkernel_opencl.h gdalwarpkernel_opencl.cpp) - endif () - --gdal_target_link_libraries(alg PRIVATE PROJ::proj) -+target_link_libraries(alg PUBLIC PROJ::proj) - - if (GDAL_USE_QHULL_INTERNAL) - target_compile_definitions(alg PRIVATE -DINTERNAL_QHULL) -diff -urN ./a/apps/CMakeLists.txt ./b/apps/CMakeLists.txt ---- ./a/apps/CMakeLists.txt 2023-05-02 08:47:11.000000000 -0500 -+++ ./b/apps/CMakeLists.txt 2023-06-06 16:46:55.380690700 -0500 -@@ -26,7 +26,7 @@ - appslib PRIVATE $ $ - $ $) - --gdal_target_link_libraries(appslib PRIVATE PROJ::proj) -+target_link_libraries(appslib PUBLIC PROJ::proj) - - set_property(TARGET appslib PROPERTY POSITION_INDEPENDENT_CODE ${GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE}) - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16) -diff -urN ./a/cmake/helpers/CheckDependentLibraries.cmake ./b/cmake/helpers/CheckDependentLibraries.cmake ---- ./a/cmake/helpers/CheckDependentLibraries.cmake 2023-06-07 09:33:06.599777700 -0500 -+++ ./b/cmake/helpers/CheckDependentLibraries.cmake 2023-06-07 13:38:51.722872200 -0500 -@@ -11,7 +11,8 @@ - include(CheckFunctionExists) - include(CMakeDependentOption) - include(FeatureSummary) --include(DefineFindPackage2) -+#include(DefineFindPackage2) -+include(ConanFindPackage) - include(CheckSymbolExists) - - option( -@@ -109,51 +110,8 @@ - string(TOUPPER ${name} key) - set(_find_dependency "") - set(_find_dependency_args "") -- if(FIND_PACKAGE2_${name}_ENABLED) -- find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) -- else() -- set(_find_package_args) -- if (_GCP_VERSION) -- list(APPEND _find_package_args ${_GCP_VERSION}) -- endif () -- if (_GCP_CONFIG) -- list(APPEND _find_package_args CONFIG) -- endif () -- if (_GCP_COMPONENTS) -- list(APPEND _find_package_args COMPONENTS ${_GCP_COMPONENTS}) -- endif () -- if (_GCP_PATHS) -- list(APPEND _find_package_args PATHS ${_GCP_PATHS}) -- endif () -- if (_GCP_NAMES) -- set(GDAL_CHECK_PACKAGE_${name}_NAMES "${_GCP_NAMES}" CACHE STRING "Config file name for ${name}") -- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_NAMES) -- endif () -- if (_GCP_TARGETS) -- set(GDAL_CHECK_PACKAGE_${name}_TARGETS "${_GCP_TARGETS}" CACHE STRING "Target name candidates for ${name}") -- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_TARGETS) -- endif () -- if (GDAL_CHECK_PACKAGE_${name}_NAMES) -- find_package(${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} ${_find_package_args}) -- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS} REQUIRED) -- if (${name}_FOUND) -- get_filename_component(_find_dependency_args "${${name}_CONFIG}" NAME) -- string(REPLACE ";" " " _find_dependency_args "${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} CONFIGS ${_find_dependency_args} ${_find_package_args}") -- endif () -- endif () -- if (NOT ${name}_FOUND) -- find_package(${name} ${_find_package_args}) -- if (${name}_FOUND) -- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) -- elseif (${key}_FOUND) # Some find modules do not set _FOUND -- gdal_check_package_target(${key} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) -- set(${name}_FOUND "${key}_FOUND") -- endif () -- if (${name}_FOUND) -- string(REPLACE ";" " " _find_dependency_args "${name} ${_find_package_args}") -- endif() -- endif () -- endif () -+ -+ find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) - if (${key}_FOUND OR ${name}_FOUND) - if(_GCP_MINIMUM_VERSION) - -@@ -368,14 +326,12 @@ - endif () - - # First check with CMake config files (starting at version 8, due to issues with earlier ones), and then fallback to the FindPROJ module. --find_package(PROJ 9 CONFIG QUIET) --if (NOT PROJ_FOUND) -- find_package(PROJ 8 CONFIG QUIET) --endif() -+find_package2(PROJ) -+target_include_directories(PROJ::proj INTERFACE ${PROJ_INCLUDE_DIRS}) - if (PROJ_FOUND) - string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ ${PROJ_VERSION_MAJOR} CONFIG)\n") - else() -- find_package(PROJ 6.0 REQUIRED) -+ find_package(proj 6.0 REQUIRED) - string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ 6.0)\n") - endif () - -@@ -458,15 +414,10 @@ - TARGETS json-c::json-c JSONC::JSONC - ) - gdal_internal_library(JSONC REQUIRED) --if(TARGET json-c::json-c) -- get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) -- find_path(GDAL_JSON_INCLUDE_DIR NAMES json.h PATHS ${include_dirs} PATH_SUFFIXES json-c NO_DEFAULT_PATH) -- list(APPEND include_dirs "${GDAL_JSON_INCLUDE_DIR}") -- list(REMOVE_DUPLICATES include_dirs) -- set_target_properties(json-c::json-c PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${GDAL_JSON_INCLUDE_DIR}" -- ) --endif() -+get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) -+list(APPEND include_dirs "${JSONC_INCLUDE_DIRS}/json-c") -+set_target_properties(json-c::json-c PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${include_dirs}") -+message("Setting include for json-c: ${include_dirs}") - - gdal_check_package(OpenCAD "libopencad (external, used by OpenCAD driver)" CAN_DISABLE) - gdal_internal_library(OPENCAD) -@@ -527,6 +478,24 @@ - gdal_check_package(SQLite3 "Enable SQLite3 support (used by SQLite/Spatialite, GPKG, Rasterlite, MBTiles, etc.)" - CAN_DISABLE RECOMMENDED) - if (SQLite3_FOUND) -+ set(CMAKE_REQUIRED_INCLUDES ${SQLite3_INCLUDE_DIRS}) -+ check_symbol_exists(sqlite3_mutex_alloc sqlite3ext.h SQLite3_HAS_MUTEX_ALLOC) -+ check_symbol_exists(sqlite3_column_table_name sqlite3ext.h SQLite3_HAS_COLUMN_METADATA) -+ check_symbol_exists(sqlite3_rtree_query_callback sqlite3.h SQLite3_HAS_RTREE) -+ check_symbol_exists(sqlite3_load_extension sqlite3ext.h SQLite3_HAS_LOAD_EXTENSION) -+ # https://www.sqlite.org/compile.html recommends to build with -DSQLITE_OMIT_PROGRESS_CALLBACK -+ # "for applications that are able to use them"... This is sometimes wrongly -+ # understood as recommended in all situations. -+ check_symbol_exists(sqlite3_progress_handler sqlite3.h SQLite3_HAS_PROGRESS_HANDLER) -+ -+ #if(NOT TARGET SQLite::SQLite3) -+ # add_library(SQLite::SQLite3 UNKNOWN IMPORTED) -+ # set_target_properties(SQLite::SQLite3 PROPERTIES -+ # INTERFACE_INCLUDE_DIRECTORIES "${SQLite3_INCLUDE_DIRS}" -+ # IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ # IMPORTED_LOCATION "${SQLite3_LIBRARY}") -+ #endif() -+ - if (NOT DEFINED SQLite3_HAS_COLUMN_METADATA) - message(FATAL_ERROR "missing SQLite3_HAS_COLUMN_METADATA") - endif () -@@ -566,7 +535,7 @@ - gdal_check_package(SPATIALITE "Enable spatialite support for sqlite3" VERSION 4.1.2 CAN_DISABLE) - gdal_check_package(RASTERLITE2 "Enable RasterLite2 support for sqlite3" VERSION 1.1.0 CAN_DISABLE) - --find_package(LibKML COMPONENTS DOM ENGINE) -+find_package(LibKML COMPONENTS kmlengine kmldom kmlbase) - if (GDAL_USE_LIBKML) - if (NOT LibKML_FOUND) - message(FATAL_ERROR "Configured to use GDAL_USE_LIBKML, but not found") -diff -urN ./a/cmake/helpers/ConanFindPackage.cmake ./b/cmake/helpers/ConanFindPackage.cmake ---- ./a/cmake/helpers/ConanFindPackage.cmake 1969-12-31 18:00:00.000000000 -0600 -+++ ./b/cmake/helpers/ConanFindPackage.cmake 2023-06-06 16:26:55.800008000 -0500 -@@ -0,0 +1,43 @@ -+ -+function(define_find_package2 pkgname include_file library_name) -+endfunction() -+ -+function(find_package2 pkgname) -+ set(_options QUIET REQUIRED) -+ set(_oneValueArgs OUT_DEPENDENCY) -+ set(_multiValueArgs) -+ cmake_parse_arguments(arg "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) -+ if(arg_QUIET) -+ set(${pkgname}_FIND_QUIETLY TRUE) -+ endif() -+ if(arg_REQUIRED) -+ set(${pkgname}_FIND_REQUIRED TRUE) -+ endif() -+ -+ string(TOUPPER ${pkgname} key) -+ -+ set(docstring "Configured for conan package ${GDAL_CONAN_PACKAGE_FOR_${key}}") -+ if (DEFINED GDAL_CONAN_PACKAGE_FOR_${key}) -+ message("Using conan package ${GDAL_CONAN_PACKAGE_FOR_${key}} for dependency ${pkgname}") -+ set(conan_package ${GDAL_CONAN_PACKAGE_FOR_${key}}) -+ string(TOUPPER ${conan_package} conan_package_upper) -+ -+ set(${key}_INCLUDE_DIRS "${CONAN_INCLUDE_DIRS_${conan_package_upper}}" CACHE STRING ${docstring}) -+ if (NOT TARGET_FOR_${key}) -+ set(TARGET_FOR_${key} "${conan_package}::${conan_package}") -+ endif() -+ set(${key}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_INCLUDE_DIRS "CONAN_INCLUDE_DIRS_${conan_package_upper}" CACHE STRING ${docstring}) -+ set(${pkgname}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_FOUND TRUE CACHE BOOL ${docstring}) -+ -+ else () -+ message("dependency ${pkgname} has no conan package") -+ set(${key}_FOUND FALSE CACHE BOOL ${docstring}) -+ endif() -+ -+endfunction() -diff -urN ./a/frmts/hfa/CMakeLists.txt ./b/frmts/hfa/CMakeLists.txt ---- ./a/frmts/hfa/CMakeLists.txt 2023-05-02 08:47:11.000000000 -0500 -+++ ./b/frmts/hfa/CMakeLists.txt 2023-06-06 16:54:31.162043900 -0500 -@@ -15,7 +15,8 @@ - hfa_overviews.cpp - BUILTIN) - gdal_standard_includes(gdal_HFA) --target_include_directories(gdal_HFA PRIVATE $) -+target_link_libraries(gdal_HFA INTERFACE PROJ::proj) -+target_include_directories(gdal_HFA PRIVATE ${PROJ_INCLUDE_DIRS}) - target_compile_definitions(gdal_HFA PRIVATE $) - - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) -diff -urN ./a/gdal.cmake ./b/gdal.cmake ---- ./a/gdal.cmake 2023-05-02 08:47:12.000000000 -0500 -+++ ./b/gdal.cmake 2023-06-06 16:55:34.252830900 -0500 -@@ -859,25 +859,6 @@ - ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake @ONLY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/gdal/) - -- # Generate gdal-config utility command and pkg-config module gdal.pc -- include(GdalGenerateConfig) -- gdal_generate_config( -- TARGET -- "${GDAL_LIB_TARGET_NAME}" -- GLOBAL_PROPERTY -- "gdal_private_link_libraries" -- GDAL_CONFIG -- "${PROJECT_BINARY_DIR}/apps/gdal-config" -- PKG_CONFIG -- "${CMAKE_CURRENT_BINARY_DIR}/gdal.pc") -- install( -- PROGRAMS ${PROJECT_BINARY_DIR}/apps/gdal-config -- DESTINATION ${CMAKE_INSTALL_BINDIR} -- COMPONENT applications) -- install( -- FILES ${CMAKE_CURRENT_BINARY_DIR}/gdal.pc -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig -- COMPONENT libraries) - endif () - - configure_file(${GDAL_CMAKE_TEMPLATE_PATH}/uninstall.cmake.in ${PROJECT_BINARY_DIR}/cmake_uninstall.cmake @ONLY) -diff -urN ./a/ogr/CMakeLists.txt ./b/ogr/CMakeLists.txt ---- ./a/ogr/CMakeLists.txt 2023-05-02 08:47:12.000000000 -0500 -+++ ./b/ogr/CMakeLists.txt 2023-06-06 16:56:18.682151700 -0500 -@@ -89,12 +89,12 @@ - - target_compile_definitions(ogr PRIVATE HAVE_MITAB) - --gdal_target_link_libraries(ogr PRIVATE PROJ::proj) -+target_link_libraries(ogr PUBLIC PROJ::proj) - - # External libs then - if (GDAL_USE_GEOS) - target_compile_definitions(ogr PRIVATE -DHAVE_GEOS=1) -- gdal_target_link_libraries(ogr PRIVATE ${GEOS_TARGET}) -+ target_link_libraries(ogr PUBLIC ${GEOS_TARGET}) - endif () - - if (GDAL_USE_SFCGAL) -diff -urN ./a/ogr/ogr_proj_p.h ./b/ogr/ogr_proj_p.h ---- ./a/ogr/ogr_proj_p.h 2023-05-02 08:47:12.000000000 -0500 -+++ ./b/ogr/ogr_proj_p.h 2023-06-06 16:56:30.772908800 -0500 -@@ -29,7 +29,7 @@ - #ifndef OGR_PROJ_P_H_INCLUDED - #define OGR_PROJ_P_H_INCLUDED - --#include "proj.h" -+#include - - #include "cpl_mem_cache.h" - diff --git a/recipes/gdal/post_3.5.0/patches/3.7.3/0-replace-find-package.patch b/recipes/gdal/post_3.5.0/patches/3.7.3/0-replace-find-package.patch new file mode 100644 index 0000000000000..e25f0d63223d9 --- /dev/null +++ b/recipes/gdal/post_3.5.0/patches/3.7.3/0-replace-find-package.patch @@ -0,0 +1,64 @@ +diff -urN ./a/cmake/helpers/CheckDependentLibraries.cmake ./b/cmake/helpers/CheckDependentLibraries.cmake +--- ./a/cmake/helpers/CheckDependentLibraries.cmake ++++ ./b/cmake/helpers/CheckDependentLibraries.cmake +@@ -11,7 +11,7 @@ + include(CheckFunctionExists) + include(CMakeDependentOption) + include(FeatureSummary) +-include(DefineFindPackage2) ++include(ConanFindPackage) + include(CheckSymbolExists) + + option( +@@ -109,9 +109,8 @@ + string(TOUPPER ${name} key) + set(_find_dependency "") + set(_find_dependency_args "") +- if(FIND_PACKAGE2_${name}_ENABLED) +- find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) +- else() ++ find_package2(${name} QUIET) ++ if (FALSE) + set(_find_package_args) + if (_GCP_VERSION) + list(APPEND _find_package_args ${_GCP_VERSION}) +@@ -368,7 +367,7 @@ + endif () + + # First check with CMake config files (starting at version 8, due to issues with earlier ones), and then fallback to the FindPROJ module. +-find_package(PROJ 9 CONFIG QUIET) ++find_package2(PROJ 9 CONFIG REQUIRED) + if (NOT PROJ_FOUND) + find_package(PROJ 8 CONFIG QUIET) + endif() +@@ -457,8 +456,8 @@ + NAMES json-c + TARGETS json-c::json-c JSONC::JSONC + ) +-gdal_internal_library(JSONC REQUIRED) +-if(TARGET json-c::json-c) ++find_package2(JSONC REQUIRED) ++if(FALSE) + get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) + find_path(GDAL_JSON_INCLUDE_DIR NAMES json.h PATHS ${include_dirs} PATH_SUFFIXES json-c NO_DEFAULT_PATH) + list(APPEND include_dirs "${GDAL_JSON_INCLUDE_DIR}") +@@ -566,9 +565,9 @@ + gdal_check_package(SPATIALITE "Enable spatialite support for sqlite3" VERSION 4.1.2 CAN_DISABLE) + gdal_check_package(RASTERLITE2 "Enable RasterLite2 support for sqlite3" VERSION 1.1.0 CAN_DISABLE) + +-find_package(LibKML COMPONENTS DOM ENGINE) ++find_package2(LibKML COMPONENTS DOM ENGINE) + if (GDAL_USE_LIBKML) + if (NOT LibKML_FOUND) + message(FATAL_ERROR "Configured to use GDAL_USE_LIBKML, but not found") + endif () + endif () +@@ -733,7 +732,7 @@ + gdal_check_package(HEIF "HEIF >= 1.1" CAN_DISABLE) + + # OpenJPEG's cmake-CONFIG is broken, so call module explicitly +-find_package(OpenJPEG MODULE) ++find_package2(OpenJPEG MODULE) + if (GDAL_USE_OPENJPEG) + if (NOT OPENJPEG_FOUND) + message(FATAL_ERROR "Configured to use GDAL_USE_OPENJPEG, but not found") diff --git a/recipes/gdal/post_3.5.0/patches/3.7.3/1-do-not-force-private-linking.patch b/recipes/gdal/post_3.5.0/patches/3.7.3/1-do-not-force-private-linking.patch new file mode 100644 index 0000000000000..d5b761df32ded --- /dev/null +++ b/recipes/gdal/post_3.5.0/patches/3.7.3/1-do-not-force-private-linking.patch @@ -0,0 +1,20 @@ +diff --git a/cmake/helpers/GdalDriverHelper.cmake b/cmake/helpers/GdalDriverHelper.cmake +--- a/cmake/helpers/GdalDriverHelper.cmake ++++ b/cmake/helpers/GdalDriverHelper.cmake +@@ -280,7 +280,7 @@ + set(_oneValueArgs) + set(_multiValueArgs PRIVATE) + cmake_parse_arguments(_DRIVER "" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) +- if (NOT _DRIVER_PRIVATE) ++ if (FALSE AND NOT _DRIVER_PRIVATE) + message(FATAL_ERROR "gdal_target_link_libraries(): PRIVATE is a mandatory argument.") + endif () + is_plugin(RES ${target}) +@@ -297,6 +297,7 @@ + else () + gdal_target_interfaces(${target} ${_DRIVER_PRIVATE}) + gdal_add_private_link_libraries(${_DRIVER_PRIVATE}) ++ target_link_libraries(${ARGV}) + endif () + + # For debugging purposes diff --git a/recipes/gdal/post_3.5.0/patches/3.8.1/0-replace-find-package.patch b/recipes/gdal/post_3.5.0/patches/3.8.1/0-replace-find-package.patch new file mode 100644 index 0000000000000..c82d659742baf --- /dev/null +++ b/recipes/gdal/post_3.5.0/patches/3.8.1/0-replace-find-package.patch @@ -0,0 +1,52 @@ +--- cmake/helpers/CheckDependentLibraries.cmake ++++ cmake/helpers/CheckDependentLibraries.cmake +@@ -11,7 +11,7 @@ + include(CheckFunctionExists) + include(CMakeDependentOption) + include(FeatureSummary) +-include(DefineFindPackage2) ++include(ConanFindPackage) + include(CheckSymbolExists) + + option( +@@ -109,9 +109,8 @@ + string(TOUPPER ${name} key) + set(_find_dependency "") + set(_find_dependency_args "") +- if(FIND_PACKAGE2_${name}_ENABLED) +- find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) +- else() ++ find_package2(${name} QUIET) ++ if(FALSE) + set(_find_package_args) + if (_GCP_VERSION) + list(APPEND _find_package_args ${_GCP_VERSION}) +@@ -368,7 +367,7 @@ + endif () + + # First check with CMake config files (starting at version 8, due to issues with earlier ones), and then fallback to the FindPROJ module. +-find_package(PROJ 9 CONFIG QUIET) ++find_package2(PROJ 9 CONFIG REQUIRED) + if (NOT PROJ_FOUND) + find_package(PROJ 8 CONFIG QUIET) + endif() +@@ -457,8 +456,8 @@ + NAMES json-c + TARGETS json-c::json-c JSONC::JSONC + ) +-gdal_internal_library(JSONC REQUIRED) +-if(TARGET json-c::json-c) ++find_package2(JSONC REQUIRED) ++if(FALSE) + get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) + find_path(GDAL_JSON_INCLUDE_DIR NAMES json.h PATHS ${include_dirs} PATH_SUFFIXES json-c NO_DEFAULT_PATH) + list(APPEND include_dirs "${GDAL_JSON_INCLUDE_DIR}") +@@ -727,7 +726,7 @@ + gdal_check_package(HEIF "HEIF >= 1.1" CAN_DISABLE) + + # OpenJPEG's cmake-CONFIG is broken, so call module explicitly +-find_package(OpenJPEG MODULE) ++find_package2(OpenJPEG MODULE) + if (GDAL_USE_OPENJPEG) + if (NOT OPENJPEG_FOUND) + message(FATAL_ERROR "Configured to use GDAL_USE_OPENJPEG, but not found") diff --git a/recipes/gdal/post_3.5.0/test_package/CMakeLists.txt b/recipes/gdal/post_3.5.0/test_package/CMakeLists.txt index 861d8d69409b0..356b571fb9c63 100644 --- a/recipes/gdal/post_3.5.0/test_package/CMakeLists.txt +++ b/recipes/gdal/post_3.5.0/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(GDAL REQUIRED) +find_package(GDAL REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} GDAL::GDAL) diff --git a/recipes/gdal/post_3.5.0/test_package/conanfile.py b/recipes/gdal/post_3.5.0/test_package/conanfile.py index 9dced2ad9cf71..9ae9dd1c61f74 100644 --- a/recipes/gdal/post_3.5.0/test_package/conanfile.py +++ b/recipes/gdal/post_3.5.0/test_package/conanfile.py @@ -1,12 +1,20 @@ -from conan import ConanFile -from conan.tools.build import cross_building -from conans import CMake import os +from conan import ConanFile, conan_version +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -14,10 +22,11 @@ def build(self): cmake.build() def test(self): - if not cross_building(self): - if self.options["gdal"].tools: - self.run("gdal_translate --formats", run_environment=True) - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) - bin_path_c = os.path.join("bin", "test_package_c") - self.run(bin_path_c, run_environment=True) + if can_run(self): + gdal_options = self.options["gdal"] if conan_version < "2" else self.dependencies["gdal"].options + if gdal_options.tools: + self.run("gdal_translate --formats", env="conanrun") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") + bin_path_c = os.path.join(self.cpp.build.bindir, "test_package_c") + self.run(bin_path_c, env="conanrun") diff --git a/recipes/gdal/post_3.5.0/test_v1_package/CMakeLists.txt b/recipes/gdal/post_3.5.0/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..b21cc49efde95 --- /dev/null +++ b/recipes/gdal/post_3.5.0/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/gdal/post_3.5.0/test_v1_package/conanfile.py b/recipes/gdal/post_3.5.0/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..e5d5a707ca0b3 --- /dev/null +++ b/recipes/gdal/post_3.5.0/test_v1_package/conanfile.py @@ -0,0 +1,23 @@ +from conan import ConanFile +from conan.tools.build import cross_building +from conans import CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not cross_building(self): + if self.options["gdal"].tools: + self.run("gdal_translate --formats", run_environment=True) + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) + bin_path_c = os.path.join("bin", "test_package_c") + self.run(bin_path_c, run_environment=True) From 540fe700422c9d5effb6a3e6b6f84e71fcac59b9 Mon Sep 17 00:00:00 2001 From: Gareth Sylvester-Bradley <31761158+garethsb@users.noreply.github.com> Date: Tue, 20 Feb 2024 17:10:16 +0000 Subject: [PATCH 054/405] (#22812) [nmos-cpp] Bump dependencies to match upstream --- recipes/nmos-cpp/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/nmos-cpp/all/conanfile.py b/recipes/nmos-cpp/all/conanfile.py index 67cbae93e0a0b..d2bed5c1666e3 100644 --- a/recipes/nmos-cpp/all/conanfile.py +++ b/recipes/nmos-cpp/all/conanfile.py @@ -54,8 +54,8 @@ def requirements(self): self.requires("cpprestsdk/2.10.18", transitive_headers=True) self.requires("websocketpp/0.8.2") self.requires("openssl/[>=1.1 <4]") - self.requires("json-schema-validator/2.2.0") - self.requires("nlohmann_json/3.11.2") + self.requires("json-schema-validator/2.3.0") + self.requires("nlohmann_json/3.11.3") self.requires("zlib/[>=1.2.11 <2]") if self.options.get_safe("with_dnssd") == "mdnsresponder": From c2f3d1f999853d18cb9c4a1d134dc085f8377bb2 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 20 Feb 2024 19:41:47 +0100 Subject: [PATCH 055/405] (#22829) [config] Add Valgur as community reviewer Signed-off-by: Uilian Ries --- .c3i/reviewers.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.c3i/reviewers.yml b/.c3i/reviewers.yml index 3578b7dccdc68..a5e7a155eee13 100644 --- a/.c3i/reviewers.yml +++ b/.c3i/reviewers.yml @@ -87,3 +87,6 @@ reviewers: - user: "juansblanco" type: "team" request_reviews: false + - user: "valgur" + type: "community" + request_reviews: false From 579766920b3e3c8f9949895c8be18c8926c6774a Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 21 Feb 2024 06:29:22 +0900 Subject: [PATCH 056/405] (#22792) cctz: add version 2.4 * cctz: add version 2.4 * disable benchmark --- recipes/cctz/all/conandata.yml | 16 ++++++++++++++-- recipes/cctz/all/conanfile.py | 6 +++--- ...ion.patch => 2.3-0001-fix-installation.patch} | 0 ...patch => 2.3-0002-fix-frameworks-apple.patch} | 0 .../all/patches/2.4-0001-fix-installation.patch | 13 +++++++++++++ recipes/cctz/config.yml | 2 ++ 6 files changed, 32 insertions(+), 5 deletions(-) rename recipes/cctz/all/patches/{0001-fix-installation.patch => 2.3-0001-fix-installation.patch} (100%) rename recipes/cctz/all/patches/{0002-fix-frameworks-apple.patch => 2.3-0002-fix-frameworks-apple.patch} (100%) create mode 100644 recipes/cctz/all/patches/2.4-0001-fix-installation.patch diff --git a/recipes/cctz/all/conandata.yml b/recipes/cctz/all/conandata.yml index 112fd00e61958..79ee8c2ac2c09 100644 --- a/recipes/cctz/all/conandata.yml +++ b/recipes/cctz/all/conandata.yml @@ -1,8 +1,20 @@ sources: + "2.4": + url: "https://github.com/google/cctz/archive/v2.4.tar.gz" + sha256: "e1a00957d472044808a24a26f1ba020f36dc26949a69c214562d96b74093adb3" "2.3": url: "https://github.com/google/cctz/archive/v2.3.tar.gz" sha256: "8615b20d4e33e02a271c3b93a3b208e3d7d5d66880f5f6208b03426e448f32db" patches: + "2.4": + - patch_file: "patches/2.4-0001-fix-installation.patch" + patch_description: "fix install destination" + patch_type: "portability" "2.3": - - patch_file: "patches/0001-fix-installation.patch" - - patch_file: "patches/0002-fix-frameworks-apple.patch" + - patch_file: "patches/2.3-0001-fix-installation.patch" + patch_description: "fix install destination" + patch_type: "portability" + - patch_file: "patches/2.3-0002-fix-frameworks-apple.patch" + patch_description: "link CoreFoundation on macOS" + patch_type: "portability" + patch_source: "https://github.com/google/cctz/pull/97" diff --git a/recipes/cctz/all/conanfile.py b/recipes/cctz/all/conanfile.py index f4eb7ecd52b25..ebb60c3eb62b6 100644 --- a/recipes/cctz/all/conanfile.py +++ b/recipes/cctz/all/conanfile.py @@ -10,12 +10,11 @@ class CCTZConan(ConanFile): name = "cctz" + description = "C++ library for translating between absolute and civil times" + license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/google/cctz" - description = "C++ library for translating between absolute and civil times" topics = ("time", "timezones") - license = "Apache-2.0" - package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -54,6 +53,7 @@ def generate(self): tc.variables["BUILD_TOOLS"] = self.options.build_tools tc.variables["BUILD_EXAMPLES"] = False tc.variables["BUILD_TESTING"] = False + tc.variables["BUILD_BENCHMARK"] = False # For shared msvc tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True # Relocatable shared lib on Macos diff --git a/recipes/cctz/all/patches/0001-fix-installation.patch b/recipes/cctz/all/patches/2.3-0001-fix-installation.patch similarity index 100% rename from recipes/cctz/all/patches/0001-fix-installation.patch rename to recipes/cctz/all/patches/2.3-0001-fix-installation.patch diff --git a/recipes/cctz/all/patches/0002-fix-frameworks-apple.patch b/recipes/cctz/all/patches/2.3-0002-fix-frameworks-apple.patch similarity index 100% rename from recipes/cctz/all/patches/0002-fix-frameworks-apple.patch rename to recipes/cctz/all/patches/2.3-0002-fix-frameworks-apple.patch diff --git a/recipes/cctz/all/patches/2.4-0001-fix-installation.patch b/recipes/cctz/all/patches/2.4-0001-fix-installation.patch new file mode 100644 index 0000000000000..14cc64c0dac26 --- /dev/null +++ b/recipes/cctz/all/patches/2.4-0001-fix-installation.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 472f26f..553876c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -170,7 +170,7 @@ include(GNUInstallDirs) + install(TARGETS cctz + EXPORT ${PROJECT_NAME}-targets + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cctz +- RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) diff --git a/recipes/cctz/config.yml b/recipes/cctz/config.yml index 3b05bfcc11215..fc444f7e23a6d 100644 --- a/recipes/cctz/config.yml +++ b/recipes/cctz/config.yml @@ -1,3 +1,5 @@ versions: + "2.4": + folder: all "2.3": folder: all From 7c7cb1c44423b3d4a723a14911aac1641f415658 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 21 Feb 2024 00:43:33 +0100 Subject: [PATCH 057/405] (#22817) [boost] Hotfix: Detect cxxstd flag correctly * Detect cxxstd flag Signed-off-by: Uilian Ries * fix has cppstd 11 method Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries --- recipes/boost/all/conanfile.py | 66 ++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index 3b5363de53882..a8416e04190c4 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -161,6 +161,66 @@ def export(self): def export_sources(self): export_conandata_patches(self) + def _cppstd_flag(self, compiler_cppstd=None): + """Return the flag for the given C++ standard and compiler""" + # TODO: Replace it by Conan tool when available: https://github.com/conan-io/conan/issues/12603 + compiler = self.settings.get_safe("compiler") + compiler_version = self.settings.get_safe("compiler.version") + cppstd = self.settings.get_safe("compiler.cppstd") or compiler_cppstd + if not compiler or not compiler_version or not cppstd: + return "" + + def _cppstd_gcc(gcc_version, cppstd): + """Return the flag for the given C++ standard and GCC version""" + cppstd_flags = {} + cppstd_flags.setdefault("98", "98" if gcc_version >= "3.4" else None) + cppstd_flags.setdefault("11", "11" if gcc_version >= "4.7" else "0x" if gcc_version >= "4.3" else None) + cppstd_flags.setdefault("14", "14" if gcc_version >= "4.9" else "1y" if gcc_version >= "4.8" else None) + cppstd_flags.setdefault("17", "17" if gcc_version >= "5.2" else "1z" if gcc_version >= "5" else None) + cppstd_flags.setdefault("20", "2a" if gcc_version >= "8" else "20" if gcc_version >= "12" else None) + cppstd_flags.setdefault("23", "2b" if gcc_version >= "11" else None) + return cppstd_flags.get(cppstd.lstrip("gnu")) + + def _cppstd_clang(clang_version, cppstd): + """Return the flag for the given C++ standard and Clang version""" + cppstd_flags = {} + cppstd_flags.setdefault("98", "98" if clang_version >= "2.1" else None) + cppstd_flags.setdefault("11", "11" if clang_version >= "3.1" else "0x" if clang_version >= "2.1" else None) + cppstd_flags.setdefault("14", "14" if clang_version >= "3.5" else "1y" if clang_version >= "3.4" else None) + cppstd_flags.setdefault("17", "17" if clang_version >= "5" else "1z" if clang_version >= "3.5" else None) + cppstd_flags.setdefault("20", "2a" if clang_version >= "6" else "20" if clang_version >= "12" else None) + cppstd_flags.setdefault("23", "2b" if clang_version >= "13" else "23" if clang_version >= "17" else None) + return cppstd_flags.get(cppstd.lstrip("gnu")) + + + def _cppstd_apple_clang(clang_version, cppstd): + """Return the flag for the given C++ standard and Apple Clang version""" + cppstd_flags = {} + cppstd_flags.setdefault("98", "98" if clang_version >= "4.0" else None) + cppstd_flags.setdefault("11", "11" if clang_version >= "4.0" else None) + cppstd_flags.setdefault("14", "14" if clang_version >= "6.1" else "1y" if clang_version >= "5.1" else None) + cppstd_flags.setdefault("17", "17" if clang_version >= "9.1" else "1z" if clang_version >= "6.1" else None) + cppstd_flags.setdefault("20", "20" if clang_version >= "13.0" else "2a" if clang_version >= "10.0" else None) + cppstd_flags.setdefault("23", "2b" if clang_version >= "13.0" else None) + return cppstd_flags.get(cppstd.lstrip("gnu")) + + def _cppstd_msvc(visual_version, cppstd): + """Return the flag for the given C++ standard and MSVC version""" + cppstd_flags = {} + cppstd_flags.setdefault("98", "98") + cppstd_flags.setdefault("11", "11") + cppstd_flags.setdefault("14", "14" if visual_version >= "190" else None) + cppstd_flags.setdefault("17", "17" if visual_version >= "191" else "latest" if visual_version >= "190" else None) + cppstd_flags.setdefault("20", "20" if visual_version >= "192" else "latest" if visual_version >= "191" else None) + cppstd_flags.setdefault("23", "latest" if visual_version >= "193" else None) + return cppstd_flags.get(cppstd) + + func = {"gcc": _cppstd_gcc, "clang": _cppstd_clang, "apple-clang": _cppstd_apple_clang, "msvc": _cppstd_msvc}.get(compiler) + flag = cppstd + if func: + flag = func(Version(compiler_version), str(cppstd)) + return flag + @property def _min_compiler_version_default_cxx11(self): """ Minimum compiler version having c++ standard >= 11 @@ -183,6 +243,7 @@ def _min_compiler_version_default_cxx20(self): "msvc": 999, }.get(str(self.settings.compiler)) + @property def _has_cppstd_11_supported(self): cppstd = self.settings.compiler.get_safe("cppstd") if cppstd: @@ -1104,12 +1165,13 @@ def add_defines(library): safe_cppstd = self.settings.get_safe("compiler.cppstd") if safe_cppstd: - cppstd_version = safe_cppstd.replace("gnu", "") + cppstd_version = self._cppstd_flag(safe_cppstd) flags.append(f"cxxstd={cppstd_version}") if "gnu" in safe_cppstd: flags.append("cxxstd-dialect=gnu") elif self._has_cppstd_11_supported: - flags.append("cxxstd=11") + cppstd_version = self._cppstd_flag("11") + flags.append(f"cxxstd={cppstd_version}") # LDFLAGS link_flags = [] From bf4b77daebe9064a4bdb9781bf6d234979fd54ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Meusel?= Date: Wed, 21 Feb 2024 09:50:15 +0100 Subject: [PATCH 058/405] (#22836) botan: add version 2.19.4 --- recipes/botan/all/conandata.yml | 3 +++ recipes/botan/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/botan/all/conandata.yml b/recipes/botan/all/conandata.yml index 8bc337e6d41ee..ee8935ff07aeb 100644 --- a/recipes/botan/all/conandata.yml +++ b/recipes/botan/all/conandata.yml @@ -14,6 +14,9 @@ sources: "2.19.3": url: "https://github.com/randombit/botan/archive/2.19.3.tar.gz" sha256: "8f568bf74c2e476d92ac8a1cfc2ba8407ec038fe9458bd0a11e7da827a9b8199" + "2.19.4": + url: "https://github.com/randombit/botan/archive/2.19.4.tar.gz" + sha256: "5754a6b5ddc3c74b0cb8671531feea69d03a4f3b5bdafa5f75e4c73a1242e5b1" "3.0.0": url: "https://github.com/randombit/botan/archive/3.0.0.tar.gz" sha256: "8bafe2e965fa9ccf92ef5741165d735c9fbbe6376c373bbf5702495ad2dfb814" diff --git a/recipes/botan/config.yml b/recipes/botan/config.yml index aada9ec401094..d8302fc602e57 100644 --- a/recipes/botan/config.yml +++ b/recipes/botan/config.yml @@ -9,6 +9,8 @@ versions: folder: all "2.19.3": folder: all + "2.19.4": + folder: all "3.0.0": folder: all "3.1.0": From 2a0bbad518104bbae4b4df65d1cf48c767c5286f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Thu, 22 Feb 2024 10:24:10 +0100 Subject: [PATCH 059/405] (#22830) openexr: Backport libdeflate handling, remove unused options & remove website compilation * Backport openexr libdeflate * Check for version when disabling website subdirectory --- recipes/openexr/2.x/conandata.yml | 32 -------- .../patches/2.5.4-0001-cstdint-include.patch | 37 --------- recipes/openexr/3.x/conandata.yml | 12 +-- recipes/openexr/3.x/conanfile.py | 22 ++++- .../3.x/patches/3.2.1-find-libdeflate.patch | 82 +++++++++++++++++++ recipes/openexr/config.yml | 10 --- 6 files changed, 106 insertions(+), 89 deletions(-) delete mode 100644 recipes/openexr/2.x/patches/2.5.4-0001-cstdint-include.patch create mode 100644 recipes/openexr/3.x/patches/3.2.1-find-libdeflate.patch diff --git a/recipes/openexr/2.x/conandata.yml b/recipes/openexr/2.x/conandata.yml index 6cbbea809703f..6ab19656a3a57 100644 --- a/recipes/openexr/2.x/conandata.yml +++ b/recipes/openexr/2.x/conandata.yml @@ -5,18 +5,6 @@ sources: "2.5.7": url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.7.tar.gz" sha256: "36ecb2290cba6fc92b2ec9357f8dc0e364b4f9a90d727bf9a57c84760695272d" - "2.5.5": - url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.5.tar.gz" - sha256: "59e98361cb31456a9634378d0f653a2b9554b8900f233450f2396ff495ea76b3" - "2.5.4": - url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.4.tar.gz" - sha256: "dba19e9c6720c6f64fbc8b9d1867eaa75da6438109b941eefdc75ed141b6576d" - "2.5.3": - url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.3.tar.gz" - sha256: "6a6525e6e3907715c6a55887716d7e42d09b54d2457323fcee35a0376960bebf" - "2.5.2": - url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.2.tar.gz" - sha256: "5da8dff448d0c4a529e52c97daf238a461d01cd233944f75095668d6d7528761" "2.4.0": url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.4.0.tar.gz" sha256: "4904c5ea7914a58f60a5e2fbc397be67e7a25c380d7d07c1c31a3eefff1c92f1" @@ -26,26 +14,6 @@ patches: patch_description: "Add #include as required by newer gcc versions" patch_type: "portability" patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600" - "2.5.5": - - patch_file: "patches/2.5.7-0001-cstdint-include.patch" - patch_description: "Add #include as required by newer gcc versions" - patch_type: "portability" - patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600" - "2.5.4": - - patch_file: "patches/2.5.4-0001-cstdint-include.patch" - patch_description: "Add #include as required by newer gcc versions" - patch_type: "portability" - patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600" - "2.5.3": - - patch_file: "patches/2.5.4-0001-cstdint-include.patch" - patch_description: "Add #include as required by newer gcc versions" - patch_type: "portability" - patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600" - "2.5.2": - - patch_file: "patches/2.5.4-0001-cstdint-include.patch" - patch_description: "Add #include as required by newer gcc versions" - patch_type: "portability" - patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600" "2.4.0": - patch_file: "patches/2.4.0-0001-cstdint-include.patch" patch_description: "Add #include as required by newer gcc versions" diff --git a/recipes/openexr/2.x/patches/2.5.4-0001-cstdint-include.patch b/recipes/openexr/2.x/patches/2.5.4-0001-cstdint-include.patch deleted file mode 100644 index a30277a2740a5..0000000000000 --- a/recipes/openexr/2.x/patches/2.5.4-0001-cstdint-include.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git OpenEXR/IlmImf/ImfDwaCompressor.cpp OpenEXR/IlmImf/ImfDwaCompressor.cpp -index 59d1d5d..585a3e6 100644 ---- OpenEXR/IlmImf/ImfDwaCompressor.cpp -+++ OpenEXR/IlmImf/ImfDwaCompressor.cpp -@@ -158,6 +158,7 @@ - #include - - #include -+#include - - - // Windows specific addition to prevent the indirect import of the redefined min/max macros -diff --git OpenEXR/IlmImf/ImfHuf.cpp OpenEXR/IlmImf/ImfHuf.cpp -index 271849b..165fac5 100644 ---- OpenEXR/IlmImf/ImfHuf.cpp -+++ OpenEXR/IlmImf/ImfHuf.cpp -@@ -53,6 +53,7 @@ - #include - #include - #include -+#include - - - using namespace std; -diff --git OpenEXR/IlmImf/ImfMisc.cpp OpenEXR/IlmImf/ImfMisc.cpp -index d2c8478..0451a33 100644 ---- OpenEXR/IlmImf/ImfMisc.cpp -+++ OpenEXR/IlmImf/ImfMisc.cpp -@@ -54,6 +54,8 @@ - #include - #include "ImfNamespace.h" - -+#include -+ - OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - using IMATH_NAMESPACE::Box2i; diff --git a/recipes/openexr/3.x/conandata.yml b/recipes/openexr/3.x/conandata.yml index 2a41f1e247f6e..778602cf612b4 100644 --- a/recipes/openexr/3.x/conandata.yml +++ b/recipes/openexr/3.x/conandata.yml @@ -8,15 +8,16 @@ sources: "3.1.7": url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.1.7.tar.gz" sha256: "78dbca39115a1c526e6728588753955ee75fa7f5bb1a6e238bed5b6d66f91fd7" - "3.1.5": - url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.1.5.tar.gz" - sha256: "93925805c1fc4f8162b35f0ae109c4a75344e6decae5a240afdfce25f8a433ec" patches: "3.2.1": - patch_file: "patches/3.2.1-gcc5-bug-workaround.patch" patch_description: "Workaround for GCC 5 bug" patch_type: "portability" patch_source: "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336" + - patch_file: "patches/3.2.1-find-libdeflate.patch" + patch_description: "Use find_package for libdeflate" + patch_type: "backport" + patch_source: "https://github.com/AcademySoftwareFoundation/openexr/pull/1613" "3.1.9": - patch_file: "patches/3.1.4-gcc5-bug-workaround.patch" patch_description: "Workaround for GCC 5 bug" @@ -27,8 +28,3 @@ patches: patch_description: "Workaround for GCC 5 bug" patch_type: "portability" patch_source: "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336" - "3.1.5": - - patch_file: "patches/3.1.4-gcc5-bug-workaround.patch" - patch_description: "Workaround for GCC 5 bug" - patch_type: "portability" - patch_source: "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336" diff --git a/recipes/openexr/3.x/conanfile.py b/recipes/openexr/3.x/conanfile.py index 71838c85f0a04..0948ac5e19152 100644 --- a/recipes/openexr/3.x/conanfile.py +++ b/recipes/openexr/3.x/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rmdir +from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rmdir, replace_in_file from conan.tools.scm import Version import os @@ -31,6 +31,10 @@ class OpenEXRConan(ConanFile): def _min_cppstd(self): return 11 + @property + def _with_libdeflate(self): + return Version(self.version) >= "3.2" + def export_sources(self): export_conandata_patches(self) @@ -49,6 +53,8 @@ def requirements(self): self.requires("zlib/[>=1.2.11 <2]") # Note: OpenEXR and Imath are versioned independently. self.requires("imath/3.1.9", transitive_headers=True) + if self._with_libdeflate: + self.requires("libdeflate/1.19") def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -61,13 +67,23 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["OPENEXR_INSTALL_EXAMPLES"] = False tc.variables["BUILD_TESTING"] = False + tc.variables["BUILD_WEBSITE"] = False tc.variables["DOCS"] = False tc.generate() cd = CMakeDeps(self) cd.generate() - def build(self): + def _patch_sources(self): apply_conandata_patches(self) + + if Version(self.version) >= "3.2": + # Even with BUILD_WEBSITE, Website target is compiled in 3.2 + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "add_subdirectory(website/src)", + "# add_subdirectory(website/src)") + + def build(self): + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() @@ -138,6 +154,8 @@ def package_info(self): OpenEXRCore = self._add_component("OpenEXRCore") OpenEXRCore.libs = [f"OpenEXRCore{lib_suffix}"] OpenEXRCore.requires = [self._conan_comp("OpenEXRConfig"), "zlib::zlib"] + if self._with_libdeflate: + OpenEXRCore.requires.append("libdeflate::libdeflate") if self.settings.os in ["Linux", "FreeBSD"]: OpenEXRCore.system_libs = ["m"] diff --git a/recipes/openexr/3.x/patches/3.2.1-find-libdeflate.patch b/recipes/openexr/3.x/patches/3.2.1-find-libdeflate.patch new file mode 100644 index 0000000000000..713d06bd8b4c9 --- /dev/null +++ b/recipes/openexr/3.x/patches/3.2.1-find-libdeflate.patch @@ -0,0 +1,82 @@ +diff --git a/cmake/OpenEXR.pc.in b/cmake/OpenEXR.pc.in +index bce35c2..88ddc9a 100644 +--- a/cmake/OpenEXR.pc.in ++++ b/cmake/OpenEXR.pc.in +@@ -14,7 +14,7 @@ Name: OpenEXR + Description: OpenEXR image library + Version: @OPENEXR_VERSION@ + +-Libs: @exr_pthread_libs@ -L${libdir} -lOpenEXR${libsuffix} -lOpenEXRUtil${libsuffix} -lOpenEXRCore${libsuffix} -lIex${libsuffix} -lIlmThread${libsuffix} @EXR_DEFLATE_LDFLAGS@ ++Libs: @exr_pthread_libs@ -L${libdir} -lOpenEXR${libsuffix} -lOpenEXRUtil${libsuffix} -lOpenEXRCore${libsuffix} -lIex${libsuffix} -lIlmThread${libsuffix} + Cflags: -I${includedir} -I${OpenEXR_includedir} @exr_pthread_cflags@ + Requires: Imath +- ++Requires.private: @EXR_DEFLATE_PKGCONFIG_REQUIRES@ +diff --git a/cmake/OpenEXRSetup.cmake b/cmake/OpenEXRSetup.cmake +index ef5c6c0..0a7dabc 100644 +--- a/cmake/OpenEXRSetup.cmake ++++ b/cmake/OpenEXRSetup.cmake +@@ -160,15 +160,40 @@ set(OPENEXR_DEFLATE_TAG "v1.18" CACHE STRING "Tag to use for libdeflate source r + if(NOT OPENEXR_FORCE_INTERNAL_DEFLATE) + #TODO: ^^ Release should not clone from main, this is a place holder + set(CMAKE_IGNORE_PATH "${CMAKE_CURRENT_BINARY_DIR}/_deps/deflate-src/config;${CMAKE_CURRENT_BINARY_DIR}/_deps/deflate-build/config") +- include(FindPkgConfig) +- pkg_check_modules(deflate IMPORTED_TARGET GLOBAL libdeflate) +- set(CMAKE_IGNORE_PATH) +- if (deflate_FOUND) +- message(STATUS "Using libdeflate from ${deflate_LINK_LIBRARIES}") ++ # First try cmake config ++ find_package(libdeflate CONFIG QUIET) ++ if(libdeflate_FOUND) ++ if(TARGET libdeflate::libdeflate_shared) ++ set(EXR_DEFLATE_LIB libdeflate::libdeflate_shared) ++ else() ++ set(EXR_DEFLATE_LIB libdeflate::libdeflate_static) ++ endif() ++ set(EXR_DEFLATE_VERSION ${libdeflate_VERSION}) ++ message(STATUS "Using libdeflate from ${libdeflate_DIR}") ++ else() ++ # If not found, try pkgconfig ++ find_package(PkgConfig) ++ if(PKG_CONFIG_FOUND) ++ include(FindPkgConfig) ++ pkg_check_modules(deflate IMPORTED_TARGET GLOBAL libdeflate) ++ if(deflate_FOUND) ++ set(EXR_DEFLATE_LIB PkgConfig::deflate) ++ set(EXR_DEFLATE_VERSION ${deflate_VERSION}) ++ message(STATUS "Using libdeflate from ${deflate_LINK_LIBRARIES}") ++ endif() ++ endif() + endif() ++ set(CMAKE_IGNORE_PATH) + endif() + +-if(NOT TARGET PkgConfig::deflate AND NOT deflate_FOUND) ++if(EXR_DEFLATE_LIB) ++ # Using external library ++ set(EXR_DEFLATE_SOURCES) ++ set(EXR_DEFLATE_INCLUDE_DIR) ++ # For OpenEXR.pc.in for static build ++ set(EXR_DEFLATE_PKGCONFIG_REQUIRES "libdeflate >= ${EXR_DEFLATE_VERSION}") ++else() ++ # Using internal deflate + if(OPENEXR_FORCE_INTERNAL_DEFLATE) + message(STATUS "libdeflate forced internal, installing from ${OPENEXR_DEFLATE_REPO} (${OPENEXR_DEFLATE_TAG})") + else() +@@ -213,16 +238,6 @@ if(NOT TARGET PkgConfig::deflate AND NOT deflate_FOUND) + list(TRANSFORM EXR_DEFLATE_SOURCES PREPEND ${deflate_SOURCE_DIR}/) + set(EXR_DEFLATE_INCLUDE_DIR ${deflate_SOURCE_DIR}) + set(EXR_DEFLATE_LIB) +-else() +- set(EXR_DEFLATE_INCLUDE_DIR) +- set(EXR_DEFLATE_LIB ${deflate_LIBRARIES}) +- # set EXR_DEFATE_LDFLAGS for OpenEXR.pc.in for static build +- if (BUILD_SHARED_LIBS) +- set(EXR_DEFLATE_LDFLAGS "") +- else() +- set(EXR_DEFLATE_LDFLAGS "-l${deflate_LIBRARIES}") +- endif() +- set(EXR_DEFLATE_SOURCES) + endif() + + ####################################### diff --git a/recipes/openexr/config.yml b/recipes/openexr/config.yml index c5e2b53e89f02..79091d0404e1f 100644 --- a/recipes/openexr/config.yml +++ b/recipes/openexr/config.yml @@ -5,19 +5,9 @@ versions: folder: "3.x" "3.1.7": folder: "3.x" - "3.1.5": - folder: "3.x" "2.5.9": folder: "2.x" "2.5.7": folder: "2.x" - "2.5.5": - folder: "2.x" - "2.5.4": - folder: "2.x" - "2.5.3": - folder: "2.x" - "2.5.2": - folder: "2.x" "2.4.0": folder: "2.x" From a63015048da9c53f6bc45867f156f4e5a5e6a1b3 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 22 Feb 2024 18:49:28 +0900 Subject: [PATCH 060/405] (#22585) lua: add options with_tools, with_readline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rubén Rincón Blanco --- recipes/lua/all/CMakeLists.txt | 54 ++++++++++++++-------------------- recipes/lua/all/conanfile.py | 20 +++++++++++-- 2 files changed, 40 insertions(+), 34 deletions(-) diff --git a/recipes/lua/all/CMakeLists.txt b/recipes/lua/all/CMakeLists.txt index ed493a41f2982..e3f4b3962a3a1 100644 --- a/recipes/lua/all/CMakeLists.txt +++ b/recipes/lua/all/CMakeLists.txt @@ -63,46 +63,36 @@ IF (UNIX) ENDIF () ENDIF () +include(GNUInstallDirs) + INSTALL ( TARGETS lua - RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) -IF (NOT DEFINED SKIP_INSTALL_TOOLS) +IF (NOT SKIP_INSTALL_TOOLS) ADD_EXECUTABLE ( luac ${SRC_LUAC} ${SRC_LIBLUA} ) # compiler uses non-exported APIs, so must include sources directly. ADD_EXECUTABLE ( luai ${SRC_LUAI} ) # interpreter TARGET_LINK_LIBRARIES ( luai lua ) SET_TARGET_PROPERTIES ( luai PROPERTIES OUTPUT_NAME lua PDB_NAME luai ) - IF (UNIX) - IF (CMAKE_SYSTEM_NAME STREQUAL FreeBSD) - SET (_LIB_READLINE_NAME edit) - ELSE () - SET (_LIB_READLINE_NAME readline) - ENDIF () - FIND_LIBRARY (LIB_READLINE NAMES ${_LIB_READLINE_NAME}) - IF (LIB_READLINE) - TARGET_COMPILE_DEFINITIONS (luai PUBLIC -DLUA_USE_READLINE) - TARGET_LINK_LIBRARIES(luai ${LIB_READLINE}) - IF (_LIB_READLINE_NAME STREQUAL edit) - TARGET_INCLUDE_DIRECTORIES (luai PUBLIC /usr/include/edit) - ENDIF () - ENDIF () + IF (WITH_READLINE) + find_package(readline REQUIRED CONFIG) + TARGET_COMPILE_DEFINITIONS (luai PUBLIC -DLUA_USE_READLINE) + TARGET_LINK_LIBRARIES(luai readline::readline) ENDIF () - INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools/lua ) + INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) ENDIF () -IF (NOT DEFINED SKIP_INSTALL_HEADERS) - INSTALL( - FILES - ${SOURCE_DIR}/src/lualib.h - ${SOURCE_DIR}/src/lua.h - ${SOURCE_DIR}/src/luaconf.h - ${SOURCE_DIR}/src/lauxlib.h - DESTINATION include - ) - # If using C++, don't install extern "C" wrapper. - IF (NOT COMPILE_AS_CPP) - INSTALL(FILES ${SOURCE_DIR}/src/lua.hpp DESTINATION include) - ENDIF () +INSTALL( + FILES + ${SOURCE_DIR}/src/lualib.h + ${SOURCE_DIR}/src/lua.h + ${SOURCE_DIR}/src/luaconf.h + ${SOURCE_DIR}/src/lauxlib.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) +# If using C++, don't install extern "C" wrapper. +IF (NOT COMPILE_AS_CPP) + INSTALL(FILES ${SOURCE_DIR}/src/lua.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ENDIF () diff --git a/recipes/lua/all/conanfile.py b/recipes/lua/all/conanfile.py index 72ee3c59253a9..0214442bfcf23 100644 --- a/recipes/lua/all/conanfile.py +++ b/recipes/lua/all/conanfile.py @@ -1,7 +1,8 @@ import os from conan import ConanFile -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import get, copy, load, save, export_conandata_patches, apply_conandata_patches, collect_libs from conan.tools.apple import fix_apple_shared_install_name @@ -22,11 +23,15 @@ class LuaConan(ConanFile): "shared": [False, True], "fPIC": [True, False], "compile_as_cpp": [True, False], + "with_tools": [True, False], + "with_readline": [True, False], } default_options = { "shared": False, "fPIC": True, "compile_as_cpp": False, + "with_tools": False, + "with_readline": False, } def export_sources(self): @@ -47,15 +52,26 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") + def requirements(self): + if self.options.with_tools and self.options.with_readline: + self.requires("readline/8.2") + + def validate(self): + if not self.options.with_tools and self.options.with_readline: + raise ConanInvalidConfiguration(f"{self.ref} requires readline only with with_tools=True") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) tc.variables["LUA_SRC_DIR"] = self.source_folder.replace("\\", "/") - tc.variables["SKIP_INSTALL_TOOLS"] = True tc.variables["COMPILE_AS_CPP"] = self.options.compile_as_cpp + tc.variables["SKIP_INSTALL_TOOLS"] = not self.options.with_tools + tc.variables["WITH_READLINE"] = self.options.with_readline tc.generate() + deps = CMakeDeps(self) + deps.generate() def build(self): apply_conandata_patches(self) From 8caefc1795971b08f2b8067f306a6fb86ac315e1 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 22 Feb 2024 19:29:36 +0900 Subject: [PATCH 061/405] (#22785) glaze: add version 2.1.4 * glaze: add version 2.1.3 * update 2.1.4 * revert 2.1.3 for gcc 11 * drop 2.1.3, relax gcc version for 2.1.4 --- recipes/glaze/all/conandata.yml | 21 +++------------------ recipes/glaze/all/conanfile.py | 15 ++++++++++++--- recipes/glaze/config.yml | 14 ++------------ 3 files changed, 17 insertions(+), 33 deletions(-) diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index 4e699ca475415..eac1dcf403a4d 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.4": + url: "https://github.com/stephenberry/glaze/archive/v2.1.4.tar.gz" + sha256: "cbaba4dfbaaf342c8be8e6834cb79933b080ac89f3aa1470bc7a83197d9ebc1a" "2.1.0": url: "https://github.com/stephenberry/glaze/archive/v2.1.0.tar.gz" sha256: "b3bb4d886f17d266f37a6eec2c42b2e57e287918b20511297c4eb6b9960f0f8f" @@ -11,27 +14,9 @@ sources: "2.0.6": url: "https://github.com/stephenberry/glaze/archive/v2.0.6.tar.gz" sha256: "aa5d4921382e9781998ebbf6d36964556daa3367a2aef5ca814122502b450abc" - "2.0.5": - url: "https://github.com/stephenberry/glaze/archive/v2.0.5.tar.gz" - sha256: "a826c823dd125e25ecd29881775df5db07ccacd5358a04efba2b290eb6c945eb" - "2.0.3": - url: "https://github.com/stephenberry/glaze/archive/v2.0.3.tar.gz" - sha256: "7e155d2970329ff4a13fe1d4c4e4b63509405a984b4f37ef9f92b8756bb3c8ce" - "2.0.2": - url: "https://github.com/stephenberry/glaze/archive/v2.0.2.tar.gz" - sha256: "af65752fb523c82313bfbe9c04ab47e332d881154f06c63967b973ee51e5923d" - "2.0.1": - url: "https://github.com/stephenberry/glaze/archive/v2.0.1.tar.gz" - sha256: "0f515588189796696a802c88b0308b5386376d202c7ff1875683f38316f09c90" - "2.0.0": - url: "https://github.com/stephenberry/glaze/archive/v2.0.0.tar.gz" - sha256: "8553ade81a20b1a7c8398f95490ab540f34a78f226f7fe5555dfcbbaf216e108" "1.9.9": url: "https://github.com/stephenberry/glaze/archive/v1.9.9.tar.gz" sha256: "7e2605046742a89ec455887a5a0d6b3188ed5c14ea309c5eb9814848c26bedca" - "1.9.5": - url: "https://github.com/stephenberry/glaze/archive/v1.9.5.tar.gz" - sha256: "3800fa7283a1d4e5bd2c746fe9e268d2f8af76d3a75be7318b2084f38f529c7f" "1.8.5": url: "https://github.com/stephenberry/glaze/archive/v1.8.5.tar.gz" sha256: "5d876eed5689f1947ea4eafd9f13a4e0b527611a6b1857c79a5d598a856287b4" diff --git a/recipes/glaze/all/conanfile.py b/recipes/glaze/all/conanfile.py index f991920259f6a..4237860bf397f 100644 --- a/recipes/glaze/all/conanfile.py +++ b/recipes/glaze/all/conanfile.py @@ -25,13 +25,16 @@ def _min_cppstd(self): @property def _compilers_minimum_version(self): - return { + versions = { "Visual Studio": "17", "msvc": "193", - "gcc": "10" if Version(self.version) < "1.9.0" else "11", + "gcc": "10", "clang": "12", "apple-clang": "13.1", } + if Version(self.version) >= "1.9.0": + versions["gcc"] = "11" + return versions def layout(self): basic_layout(self, src_folder="src") @@ -40,7 +43,13 @@ def package_id(self): self.info.clear() def validate(self): - if self.settings.get_safe("compiler.cppstd"): + if Version(self.version) >= "2.1.4" and \ + self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "11.3": + raise ConanInvalidConfiguration( + f"{self.ref} doesn't support 11.0<=gcc<11.3 due to gcc bug. Please use gcc>=11.3 and set compiler.version.(ex. compiler.version=11.3)", + ) + + if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version and Version(self.settings.compiler.version) < minimum_version: diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index 45dcbfc2283ba..b7b45251fb8a4 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,6 @@ versions: + "2.1.4": + folder: all "2.1.0": folder: all "2.0.9": @@ -7,19 +9,7 @@ versions: folder: all "2.0.6": folder: all - "2.0.5": - folder: all - "2.0.3": - folder: all - "2.0.2": - folder: all - "2.0.1": - folder: all - "2.0.0": - folder: all "1.9.9": folder: all - "1.9.5": - folder: all "1.8.5": folder: all From b03197b110c6f59260089eec788b50bfd8cd10cd Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 22 Feb 2024 19:48:21 +0900 Subject: [PATCH 062/405] (#22797) pcre2: add version 10.43 * pcre2: add version 10.43 * pcre2: define PCRE2POSIX_SHARED --- recipes/pcre2/all/conandata.yml | 3 +++ recipes/pcre2/all/conanfile.py | 3 +++ recipes/pcre2/config.yml | 2 ++ 3 files changed, 8 insertions(+) diff --git a/recipes/pcre2/all/conandata.yml b/recipes/pcre2/all/conandata.yml index 344830544b429..6dadb108df617 100644 --- a/recipes/pcre2/all/conandata.yml +++ b/recipes/pcre2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "10.43": + url: "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.43/pcre2-10.43.tar.bz2" + sha256: "e2a53984ff0b07dfdb5ae4486bbb9b21cca8e7df2434096cc9bf1b728c350bcb" "10.42": url: "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.bz2" sha256: "8d36cd8cb6ea2a4c2bb358ff6411b0c788633a2a45dabbf1aeb4b701d1b5e840" diff --git a/recipes/pcre2/all/conanfile.py b/recipes/pcre2/all/conanfile.py index 14600c9abe85c..5c51abac704ec 100644 --- a/recipes/pcre2/all/conanfile.py +++ b/recipes/pcre2/all/conanfile.py @@ -149,6 +149,9 @@ def package_info(self): self.cpp_info.components["pcre2-posix"].set_property("pkg_config_name", "libpcre2-posix") self.cpp_info.components["pcre2-posix"].libs = [self._lib_name("pcre2-posix")] self.cpp_info.components["pcre2-posix"].requires = ["pcre2-8"] + if Version(self.version) >= "10.43" and is_msvc(self) and self.options.shared: + self.cpp_info.components["pcre2-posix"].defines.append("PCRE2POSIX_SHARED=1") + # pcre2-16 if self.options.build_pcre2_16: self.cpp_info.components["pcre2-16"].set_property("cmake_target_name", "PCRE2::16BIT") diff --git a/recipes/pcre2/config.yml b/recipes/pcre2/config.yml index f488a0ecff8cb..946dbc4632734 100644 --- a/recipes/pcre2/config.yml +++ b/recipes/pcre2/config.yml @@ -1,4 +1,6 @@ versions: + "10.43": + folder: all "10.42": folder: all "10.40": From f3042a11387d34897a671c179ea333aa984551e5 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 22 Feb 2024 20:28:04 +0900 Subject: [PATCH 063/405] (#22809) glog: add version 0.7.0 * glog: add version 0.7.0 * enable C++14 in test_package * update cmake build --- recipes/glog/all/conandata.yml | 15 +++++--- recipes/glog/all/conanfile.py | 40 +++++++++++++++++--- recipes/glog/all/test_package/CMakeLists.txt | 3 ++ recipes/glog/config.yml | 2 + 4 files changed, 49 insertions(+), 11 deletions(-) diff --git a/recipes/glog/all/conandata.yml b/recipes/glog/all/conandata.yml index 280f568cd746b..caa4c720569cf 100644 --- a/recipes/glog/all/conandata.yml +++ b/recipes/glog/all/conandata.yml @@ -1,13 +1,16 @@ sources: + "0.7.0": + url: "https://github.com/google/glog/archive/refs/tags/v0.7.0.tar.gz" + sha256: "375106b5976231b92e66879c1a92ce062923b9ae573c42b56ba28b112ee4cc11" "0.6.0": - sha256: 8a83bf982f37bb70825df71a9709fa90ea9f4447fb3c099e1d720a439d88bad6 - url: https://github.com/google/glog/archive/refs/tags/v0.6.0.tar.gz + url: "https://github.com/google/glog/archive/refs/tags/v0.6.0.tar.gz" + sha256: "8a83bf982f37bb70825df71a9709fa90ea9f4447fb3c099e1d720a439d88bad6" "0.5.0": - sha256: eede71f28371bf39aa69b45de23b329d37214016e2055269b3b5e7cfd40b59f5 - url: https://github.com/google/glog/archive/refs/tags/v0.5.0.tar.gz + url: "https://github.com/google/glog/archive/refs/tags/v0.5.0.tar.gz" + sha256: "eede71f28371bf39aa69b45de23b329d37214016e2055269b3b5e7cfd40b59f5" "0.4.0": - sha256: f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c - url: https://github.com/google/glog/archive/v0.4.0.tar.gz + url: "https://github.com/google/glog/archive/v0.4.0.tar.gz" + sha256: "f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c" patches: "0.5.0": - patch_file: "patches/0001-fix-msvc-snprintf.patch" diff --git a/recipes/glog/all/conanfile.py b/recipes/glog/all/conanfile.py index 7e06e74b5074e..3b6d58c7ef863 100644 --- a/recipes/glog/all/conanfile.py +++ b/recipes/glog/all/conanfile.py @@ -1,8 +1,10 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout, CMakeDeps from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir from conan.tools.scm import Version +from conan.tools.build import check_min_cppstd import os required_conan_version = ">=1.54.0" @@ -10,12 +12,11 @@ class GlogConan(ConanFile): name = "glog" + description = "Google logging library" + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/google/glog/" - description = "Google logging library" topics = ("logging",) - license = "BSD-3-Clause" - package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -33,6 +34,20 @@ class GlogConan(ConanFile): "with_unwind": True, } + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "7", + "msvc": "191", + "Visual Studio": "15", + } + def export_sources(self): export_conandata_patches(self) @@ -56,10 +71,23 @@ def requirements(self): self.requires("gflags/2.2.2", transitive_headers=True, transitive_libs=True) # 0.4.0 requires libunwind unconditionally if self.options.get_safe("with_unwind") or (Version(self.version) < "0.5.0" and self.settings.os in ["Linux", "FreeBSD"]): - self.requires("libunwind/1.7.2") + self.requires("libunwind/1.8.0", transitive_headers=True, transitive_libs=True) + + def validate(self): + if Version(self.version) < "0.7.0": + return + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def build_requirements(self): - if Version(self.version) >= "0.6.0": + if Version(self.version) >= "0.7.0": + self.tool_requires("cmake/[>=3.22 <4]") + elif Version(self.version) >= "0.6.0": self.tool_requires("cmake/[>=3.16 <4]") def source(self): @@ -129,3 +157,5 @@ def package_info(self): self.cpp_info.defines.append(f"GOOGLE_GLOG_DLL_DECL={decl}") if self.options.with_gflags and not self.options.shared: self.cpp_info.defines.extend(["GFLAGS_DLL_DECLARE_FLAG=", "GFLAGS_DLL_DEFINE_FLAG="]) + if Version(self.version) >= "0.7.0": + self.cpp_info.defines.extend(["GLOG_USE_GLOG_EXPORT="]) diff --git a/recipes/glog/all/test_package/CMakeLists.txt b/recipes/glog/all/test_package/CMakeLists.txt index 28603535e29e9..846b06b94b1ef 100644 --- a/recipes/glog/all/test_package/CMakeLists.txt +++ b/recipes/glog/all/test_package/CMakeLists.txt @@ -5,3 +5,6 @@ find_package(glog REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE glog::glog) +if (glog_VERSION VERSION_GREATER_EQUAL "0.7.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +endif() diff --git a/recipes/glog/config.yml b/recipes/glog/config.yml index babcbfb79d964..a0804c43130f1 100644 --- a/recipes/glog/config.yml +++ b/recipes/glog/config.yml @@ -1,4 +1,6 @@ versions: + "0.7.0": + folder: all "0.6.0": folder: all "0.5.0": From 07cd4a0157a18c382a968585d7d13521239b7ada Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 22 Feb 2024 20:53:57 +0900 Subject: [PATCH 064/405] (#22845) perfetto: add version 42.0 --- recipes/perfetto/all/conandata.yml | 3 +++ recipes/perfetto/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/perfetto/all/conandata.yml b/recipes/perfetto/all/conandata.yml index 7fcc5a39bf3d7..711d2732829d9 100644 --- a/recipes/perfetto/all/conandata.yml +++ b/recipes/perfetto/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "42.0": + url: "https://github.com/google/perfetto/archive/refs/tags/v42.0.tar.gz" + sha256: "1c474a0f16cc2f9da826fd3f9e44ffd77785c433e997cdaf0ee390ae3d64b53e" "41.0": url: "https://github.com/google/perfetto/archive/refs/tags/v41.0.tar.gz" sha256: "4c8fe8a609fcc77ca653ec85f387ab6c3a048fcd8df9275a1aa8087984b89db8" diff --git a/recipes/perfetto/config.yml b/recipes/perfetto/config.yml index 441b287e9826f..f2898b0745aac 100644 --- a/recipes/perfetto/config.yml +++ b/recipes/perfetto/config.yml @@ -1,4 +1,6 @@ versions: + "42.0": + folder: all "41.0": folder: all "40.0": From d82765c89d5903d2d50f40a5702183708e654c20 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Thu, 22 Feb 2024 12:04:02 +0000 Subject: [PATCH 065/405] (#22848) [bot] Update authorized users list (2024-02-22) Co-authored-by: conan-center-bot --- .c3i/authorized_users.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 995fbb6e339b3..e66b2974bcee6 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1290,3 +1290,5 @@ authorized_users: - cnicolaescu - mmomtchev - ChristianHeinigk +- metalMajor +- joergbrech From aa62958b41621487de635c57dccdb4978a4c63d4 Mon Sep 17 00:00:00 2001 From: Klaus Holst Jacobsen <48069914+klausholstjacobsen@users.noreply.github.com> Date: Thu, 22 Feb 2024 13:49:53 +0100 Subject: [PATCH 066/405] (#22847) zlib: Bad alternative url for zlib 1.3.1 --- recipes/zlib/all/conandata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/zlib/all/conandata.yml b/recipes/zlib/all/conandata.yml index 6af954549998d..e069fd42a135c 100644 --- a/recipes/zlib/all/conandata.yml +++ b/recipes/zlib/all/conandata.yml @@ -2,7 +2,7 @@ sources: "1.3.1": url: - "https://zlib.net/fossils/zlib-1.3.1.tar.gz" - - "https://github.com/madler/zlib/releases/download/v1.3/zlib-1.3.1.tar.gz" + - "https://github.com/madler/zlib/releases/download/v1.3.1/zlib-1.3.1.tar.gz" sha256: "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23" "1.3": url: From 50f06ffad2f50fa78fb70d07602724be95bc8647 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 23 Feb 2024 20:09:37 +0900 Subject: [PATCH 067/405] (#22867) imgui: add version 1.90.4 --- recipes/imgui/all/conandata.yml | 6 ++++++ recipes/imgui/config.yml | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/recipes/imgui/all/conandata.yml b/recipes/imgui/all/conandata.yml index 467e04fdf9e0f..e9eda4969aa9b 100644 --- a/recipes/imgui/all/conandata.yml +++ b/recipes/imgui/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.90.4": + url: "https://github.com/ocornut/imgui/archive/v1.90.4.tar.gz" + sha256: "5d9dc738af74efa357f2a9fc39fe4a28d29ef1dfc725dd2977ccf3f3194e996e" + "1.90.4-docking": + url: "https://github.com/ocornut/imgui/archive/v1.90.4-docking.tar.gz" + sha256: "91ac3c6fd83cc3bea38745af57665b13464ba235dc11373d0898ae6fe35a8a65" "1.90.3": url: "https://github.com/ocornut/imgui/archive/v1.90.3.tar.gz" sha256: "40b302d01092c9393373b372fe07ea33ac69e9491893ebab3bf952b2c1f5fd23" diff --git a/recipes/imgui/config.yml b/recipes/imgui/config.yml index 40705063b856e..9443d0df2e210 100644 --- a/recipes/imgui/config.yml +++ b/recipes/imgui/config.yml @@ -1,4 +1,8 @@ versions: + "1.90.4": + folder: all + "1.90.4-docking": + folder: all "1.90.3": folder: all "1.90.3-docking": From 3edb6d723ed5a8d1d7fe75a2eee251462845b569 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Fri, 23 Feb 2024 12:01:47 +0000 Subject: [PATCH 068/405] (#22871) [doc] Update supported platforms and configurations (2024-02-23) Co-authored-by: conan-center-bot --- docs/supported_platforms_and_configurations.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/supported_platforms_and_configurations.md b/docs/supported_platforms_and_configurations.md index f39ae2fe9c847..156a1c5f868d7 100644 --- a/docs/supported_platforms_and_configurations.md +++ b/docs/supported_platforms_and_configurations.md @@ -61,8 +61,8 @@ For more information see [conan-io/conan-docker-tools](https://github.com/conan- - Python: 3.7.13 - CMake: 3.15.7, 3.18.2 (same version expected after all use [new docker images](https://github.com/conan-io/conan-docker-tools/tree/master/modern)) - Compilers: - - GCC versions: 5, 7, 9, 10, 11 - - Clang versions: 12, 13 + - GCC versions: 5, 7, 9, 11 + - Clang versions: 13 - C++ Standard Library (`libcxx`): - GCC compiler: `libstdc++`, `libstdc++11` - Clang compiler: `libstdc++`, `libc++` @@ -76,11 +76,11 @@ For more information see [conan-io/conan-docker-tools](https://github.com/conan- - Python: 3.7.12 - CMake: 3.20.1 -- Compilers: Apple-clang versions 11.0.3, 12.0.5, 13.0.0 -- Macos SDK versions (for each apple-clang version respectively): 10.15, 11.3 -- Macos deployment target (`minos`): 10.15, 11.0, 11.3 +- Compilers: Apple-clang versions 13.0.0 +- Macos SDK versions (for each apple-clang version respectively): 11.3 +- Macos deployment target (`minos`): 11.0 - C++ Standard Library (`libcxx`): `libc++` -- Architectures: x86_64, armv8 +- Architectures: armv8 - Build types: Release, Debug - Options: - Shared, Static (option ``"shared": [True, False]`` in the recipe when available) From 687a20f705c9ad33b1409f7d81d35410155ee479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Meusel?= Date: Fri, 23 Feb 2024 14:48:10 +0100 Subject: [PATCH 069/405] (#22837) botan: add version 3.3.0 --- recipes/botan/all/conandata.yml | 3 +++ recipes/botan/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/botan/all/conandata.yml b/recipes/botan/all/conandata.yml index ee8935ff07aeb..67a7d6257434c 100644 --- a/recipes/botan/all/conandata.yml +++ b/recipes/botan/all/conandata.yml @@ -29,6 +29,9 @@ sources: "3.2.0": url: "https://github.com/randombit/botan/archive/3.2.0.tar.gz" sha256: "95af4935d56973000bb6ff20bb54ae56083f8764d5a2c89826cac26ac6127330" + "3.3.0": + url: "https://github.com/randombit/botan/archive/3.3.0.tar.gz" + sha256: "57fefda7b9ab6f8409329620cdaf26d2d7e962b6a10eb321d331e9ecb796f804" patches: "2.18.2": - patch_file: "patches/fix-amalgamation-build.patch" diff --git a/recipes/botan/config.yml b/recipes/botan/config.yml index d8302fc602e57..9230bceaba6c6 100644 --- a/recipes/botan/config.yml +++ b/recipes/botan/config.yml @@ -19,3 +19,5 @@ versions: folder: all "3.2.0": folder: all + "3.3.0": + folder: all From 23e4d972bbbc82c6c8508607f6231e6cacab5565 Mon Sep 17 00:00:00 2001 From: Tobias Hermann Date: Fri, 23 Feb 2024 15:10:26 +0100 Subject: [PATCH 070/405] (#22846) functionalplus: add version 0.2.23 --- recipes/functionalplus/all/conandata.yml | 3 +++ recipes/functionalplus/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/functionalplus/all/conandata.yml b/recipes/functionalplus/all/conandata.yml index 3d3543e65247e..a99f4612ba4db 100644 --- a/recipes/functionalplus/all/conandata.yml +++ b/recipes/functionalplus/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.2.23": + url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.23.tar.gz" + sha256: "5c2d28d2ba7d0cdeab9e31bbf2e7f8a9d6f2ff6111a54bfc11d1b05422096f19" "0.2.22": url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.22.tar.gz" sha256: "79378668dff6ffa8abc1abde2c2fe37dc6fe1ac040c55d5ee7886924fa6a1376" diff --git a/recipes/functionalplus/config.yml b/recipes/functionalplus/config.yml index a822e05fbaecb..ebd7ef7a33637 100644 --- a/recipes/functionalplus/config.yml +++ b/recipes/functionalplus/config.yml @@ -1,4 +1,6 @@ versions: + "0.2.23": + folder: all "0.2.22": folder: all "0.2.20-p0": From bf6feedd74034675837b71722dd3c0a04ab31f28 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 23 Feb 2024 23:29:00 +0900 Subject: [PATCH 071/405] (#22858) meson: add version 1.3.2 --- recipes/meson/all/conandata.yml | 3 +++ recipes/meson/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/meson/all/conandata.yml b/recipes/meson/all/conandata.yml index 28c305f4e6b32..775660b3d07c2 100644 --- a/recipes/meson/all/conandata.yml +++ b/recipes/meson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.2": + url: "https://github.com/mesonbuild/meson/archive/1.3.2.tar.gz" + sha256: "683082fb3c5cddf203b21d29bdf4c227e2f7964da5324a15e1a5f7db94322b4b" "1.3.1": url: "https://github.com/mesonbuild/meson/archive/1.3.1.tar.gz" sha256: "274c121edb859602eb4589d31d8791e980748bb19950fc6f611a21d76dc22cc6" diff --git a/recipes/meson/config.yml b/recipes/meson/config.yml index 391274cd2a1ed..0e150ef5dedd6 100644 --- a/recipes/meson/config.yml +++ b/recipes/meson/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.2": + folder: all "1.3.1": folder: all "1.3.0": From 3b5bcb8da34722aaccab993471f1201fffa6ddeb Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 23 Feb 2024 15:46:57 +0100 Subject: [PATCH 072/405] (#20449) dcmtk: fix compilation error `ambiguous overload for operator==` with some compilers * fix compilation error with some compilers * add patch_source * prefer to define missiong operator== --- recipes/dcmtk/all/conandata.yml | 8 ++++-- ...03-ambiguous-overload-operator-equal.patch | 26 +++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 recipes/dcmtk/all/patches/3.6.7-0003-ambiguous-overload-operator-equal.patch diff --git a/recipes/dcmtk/all/conandata.yml b/recipes/dcmtk/all/conandata.yml index 7ae433b2e0c08..fc800b08330e7 100644 --- a/recipes/dcmtk/all/conandata.yml +++ b/recipes/dcmtk/all/conandata.yml @@ -6,7 +6,11 @@ patches: "3.6.7": - patch_file: "patches/3.6.7-0001-cmake-robust-deps-handling.patch" patch_description: "CMake: robust discovery with find_package() and use imported targets" - patch_type: conan + patch_type: "conan" - patch_file: "patches/3.6.7-0002-cmake-check-openssl-symbol.patch" patch_description: "CMake: fix OpenSSL compatibility checks" - patch_type: conan + patch_type: "conan" + - patch_file: "patches/3.6.7-0003-ambiguous-overload-operator-equal.patch" + patch_description: "C++20: Fix ambiguous overload for operator== between DB_SerializedTagKey and DcmTagKey" + patch_type: "portability" + patch_source: "https://github.com/DCMTK/dcmtk/pull/88" diff --git a/recipes/dcmtk/all/patches/3.6.7-0003-ambiguous-overload-operator-equal.patch b/recipes/dcmtk/all/patches/3.6.7-0003-ambiguous-overload-operator-equal.patch new file mode 100644 index 0000000000000..d4b6242e861a2 --- /dev/null +++ b/recipes/dcmtk/all/patches/3.6.7-0003-ambiguous-overload-operator-equal.patch @@ -0,0 +1,26 @@ +--- a/dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h ++++ b/dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h +@@ -122,10 +122,22 @@ struct DCMTK_DCMQRDB_EXPORT DB_SerializedTagKey + inline DB_SerializedTagKey(const DcmTagKey& rhs) { *this = rhs; } + inline DB_SerializedTagKey& operator=(const DcmTagKey& tk) { key[0] = tk.getGroup(); key[1] = tk.getElement(); return *this; } + inline operator DcmTagKey() const { return DcmTagKey( key[0], key[1] ); } +- inline bool operator==(const DB_SerializedTagKey& rhs) const { return key[0] == rhs.key[0] && key[1] == rhs.key[1]; } + Uint16 key[2]; + }; + ++inline bool operator==(const DB_SerializedTagKey& lhs, const DB_SerializedTagKey& rhs) ++{ ++ return lhs.key[0] == rhs.key[0] && lhs.key[1] == rhs.key[1]; ++} ++inline bool operator==(const DB_SerializedTagKey& lhs, const DcmTagKey& rhs) ++{ ++ return lhs == DB_SerializedTagKey(rhs); ++} ++inline bool operator==(const DcmTagKey& lhs, const DB_SerializedTagKey& rhs) ++{ ++ return rhs == lhs; ++} ++ + /* ENSURE THAT DBVERSION IS INCREMENTED WHENEVER ONE OF THESE STRUCTS IS MODIFIED */ + + struct DCMTK_DCMQRDB_EXPORT DB_SerializedCharPtr From b715728a06dacea71ef37863aac4c6ed30966253 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Fri, 23 Feb 2024 16:26:57 +0100 Subject: [PATCH 073/405] (#21492) aws-c-s3: add version 0.3.24 --- recipes/aws-c-s3/all/conandata.yml | 3 +++ recipes/aws-c-s3/all/conanfile.py | 18 ++++++++++++++---- recipes/aws-c-s3/config.yml | 2 ++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/recipes/aws-c-s3/all/conandata.yml b/recipes/aws-c-s3/all/conandata.yml index 776d2c58fad6a..c1055bfac4946 100644 --- a/recipes/aws-c-s3/all/conandata.yml +++ b/recipes/aws-c-s3/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "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" diff --git a/recipes/aws-c-s3/all/conanfile.py b/recipes/aws-c-s3/all/conanfile.py index 4854a0ec7c6d5..1813ec30adc8a 100644 --- a/recipes/aws-c-s3/all/conanfile.py +++ b/recipes/aws-c-s3/all/conanfile.py @@ -40,17 +40,27 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.5.13") + 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) - else: + 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) - if Version(self.version) >= "0.1.36": + 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") def source(self): diff --git a/recipes/aws-c-s3/config.yml b/recipes/aws-c-s3/config.yml index 9a2f6a3845f5c..a038f7fe28821 100644 --- a/recipes/aws-c-s3/config.yml +++ b/recipes/aws-c-s3/config.yml @@ -1,4 +1,6 @@ versions: + "0.3.24": + folder: all "0.1.49": folder: all "0.1.37": From 27715fb0b6f4f103e0d1207599423fb2bc37b411 Mon Sep 17 00:00:00 2001 From: igormironchik Date: Fri, 23 Feb 2024 18:49:02 +0300 Subject: [PATCH 074/405] (#22859) md4qt: bump version to 2.7.4 --- recipes/md4qt/all/conandata.yml | 3 +++ recipes/md4qt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index 29dd0361a14fa..9b4b6bdb2cefd 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.7.4": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.4.tar.gz" + sha256: "adef8e96e71f13cb9f4450eee7bb02a43694682dc67519323f8e23f7bf10d0d1" "2.7.3": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.3.tar.gz" sha256: "d464cd137a69218f88af1373b198610f1db6971c7aa56c6869219ffb34e6f0dd" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index 73bd1fd0bdc43..51c0af2212d4c 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,6 @@ versions: + "2.7.4": + folder: all "2.7.3": folder: all "2.7.2": From a16e564c2fc09da3bed8a99fa8e656b8b787386e Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 24 Feb 2024 01:30:29 +0900 Subject: [PATCH 075/405] (#22868) libhal: add version 2.2.0 --- recipes/libhal/all/conandata.yml | 3 +++ recipes/libhal/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/libhal/all/conandata.yml b/recipes/libhal/all/conandata.yml index 5f30969947a89..c0ad6ccc7db62 100644 --- a/recipes/libhal/all/conandata.yml +++ b/recipes/libhal/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.2.0": + url: "https://github.com/libhal/libhal/archive/refs/tags/2.2.0.tar.gz" + sha256: "4a005cb45bd75662ca7d966a1a55f3570d2a0db01432e17eb1e9889ae7c90ee4" "2.0.2": url: "https://github.com/libhal/libhal/archive/refs/tags/2.0.2.tar.gz" sha256: "bb69fffbff58ac9a91f71636422d81a4426fe70c3b47ca9b07c87fb074c989dc" diff --git a/recipes/libhal/config.yml b/recipes/libhal/config.yml index 855e335e2fd53..a5b4b5f8dd9a9 100644 --- a/recipes/libhal/config.yml +++ b/recipes/libhal/config.yml @@ -1,4 +1,6 @@ versions: + "2.2.0": + folder: "all" "2.0.2": folder: "all" "2.0.1": From 665339d9271ac2f42763ac92f55fb23015dbbbc2 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 24 Feb 2024 01:52:32 +0900 Subject: [PATCH 076/405] (#22834) daw_utf_range: add version 2.2.4 --- recipes/daw_utf_range/all/conandata.yml | 7 +++++-- recipes/daw_utf_range/all/conanfile.py | 7 +++++-- recipes/daw_utf_range/config.yml | 2 ++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/recipes/daw_utf_range/all/conandata.yml b/recipes/daw_utf_range/all/conandata.yml index 179be6adbbd6e..274810345e204 100644 --- a/recipes/daw_utf_range/all/conandata.yml +++ b/recipes/daw_utf_range/all/conandata.yml @@ -1,10 +1,13 @@ sources: + "2.2.4": + url: "https://github.com/beached/utf_range/archive/v2.2.4.tar.gz" + sha256: "e6df85d6da445c16507e738d70c6313df2a70e64b739a05d6437b06a5f83b8b1" "2.2.3": url: "https://github.com/beached/utf_range/archive/v2.2.3.tar.gz" sha256: "cfa36285ffbdf8d4d08fbbe95d054e67ad845c064a92419ea68a770415ad7a98" "2.2.2": - url: "https://github.com/beached/utf_range/archive/refs/tags/v2.2.2.tar.gz" + url: "https://github.com/beached/utf_range/archive/v2.2.2.tar.gz" sha256: "5380ade7c7eb5c82a748211896fc7385eaec00d3215af1374aec8f0e326f91fd" "2.2.0": - url: "https://github.com/beached/utf_range/archive/refs/tags/v2.2.0.tar.gz" + url: "https://github.com/beached/utf_range/archive/v2.2.0.tar.gz" sha256: "00f60360736062403c8a7a94dd07c750366958f20d1864578faecf2e09d84265" diff --git a/recipes/daw_utf_range/all/conanfile.py b/recipes/daw_utf_range/all/conanfile.py index 0db5a7b2716bd..ad4fd8d98f0b6 100644 --- a/recipes/daw_utf_range/all/conanfile.py +++ b/recipes/daw_utf_range/all/conanfile.py @@ -15,7 +15,7 @@ class DawUtfRangeConan(ConanFile): license = "BSL-1.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/beached/utf_range/" - topics = ("utf", "validator", "iterator") + topics = ("utf", "validator", "iterator", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -38,7 +38,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("daw_header_libraries/2.97.0") + if Version(self.version) >= "2.2.4": + self.requires("daw_header_libraries/2.101.0") + else: + self.requires("daw_header_libraries/2.97.0") def package_id(self): self.info.clear() diff --git a/recipes/daw_utf_range/config.yml b/recipes/daw_utf_range/config.yml index 20edb7543cf05..0856bcef8b94d 100644 --- a/recipes/daw_utf_range/config.yml +++ b/recipes/daw_utf_range/config.yml @@ -1,4 +1,6 @@ versions: + "2.2.4": + folder: "all" "2.2.3": folder: "all" "2.2.2": From 228613980fd6451a399611bd3a524cd43c6cc47f Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Fri, 23 Feb 2024 18:29:51 +0100 Subject: [PATCH 077/405] (#22841) botan: remove no-op option * botan: remove no-op option * bump deps these options are disabled by default, so no risk of conflict on C3I --- recipes/botan/all/conanfile.py | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/recipes/botan/all/conanfile.py b/recipes/botan/all/conanfile.py index ce2b978ddda1d..d211b39ca041f 100644 --- a/recipes/botan/all/conanfile.py +++ b/recipes/botan/all/conanfile.py @@ -34,7 +34,6 @@ class BotanConan(ConanFile): "amalgamation": [True, False], "with_bzip2": [True, False], "with_openssl": [True, False], - "single_amalgamation": [True, False], "with_sqlite3": [True, False], "with_zlib": [True, False], "with_boost": [True, False], @@ -63,7 +62,6 @@ class BotanConan(ConanFile): "amalgamation": True, "with_bzip2": False, "with_openssl": False, - "single_amalgamation": False, "with_sqlite3": False, "with_zlib": False, "with_boost": False, @@ -126,11 +124,6 @@ def config_options(self): del self.options.with_altivec del self.options.with_powercrypto - # --single-amalgamation option is no longer available - # See also https://github.com/randombit/botan/pull/2246 - if Version(self.version) >= '2.14.0': - del self.options.single_amalgamation - # Support for the OpenSSL provider was removed in 2.19.2 if Version(self.version) >= '2.19.2': del self.options.with_openssl @@ -147,9 +140,9 @@ def requirements(self): if self.options.with_zlib: self.requires("zlib/[>=1.2.11 <2]") if self.options.with_sqlite3: - self.requires("sqlite3/3.38.5") + self.requires("sqlite3/3.45.1") if self.options.with_boost: - self.requires("boost/1.83.0") + self.requires("boost/1.84.0") @property def _required_boost_components(self): @@ -216,16 +209,13 @@ def validate(self): # Some older compilers cannot handle the amalgamated build anymore # See also https://github.com/randombit/botan/issues/2328 - if Version(self.version) >= '2.14.0' and self.options.amalgamation: + if self.options.amalgamation: if (self.settings.compiler == 'apple-clang' and compiler_version < '10') or \ (self.settings.compiler == 'gcc' and compiler_version < '8') or \ (self.settings.compiler == 'clang' and compiler_version < '7'): raise ConanInvalidConfiguration( f"botan amalgamation is not supported for {compiler}/{compiler_version}") - if self.options.get_safe("single_amalgamation", False) and not self.options.amalgamation: - raise ConanInvalidConfiguration("botan:single_amalgamation=True requires botan:amalgamation=True") - def layout(self): basic_layout(self, src_folder="src") @@ -356,9 +346,6 @@ def _configure_cmd(self): if self.options.amalgamation: build_flags.append('--amalgamation') - if self.options.get_safe('single_amalgamation'): - build_flags.append('--single-amalgamation-file') - if self.options.system_cert_bundle: build_flags.append('--system-cert-bundle={}'.format(self.options.system_cert_bundle)) From 642fa5c9cb797323fa1438aee2278fedbe73d4de Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 24 Feb 2024 04:29:47 +0900 Subject: [PATCH 078/405] (#22824) celero: add version 2.9.0, add patch descriptions * celero: add version 2.9.0, add patch descriptions * fix typo * require cmake >= 3.22 * remove cmake files * fix windows shared build * fix target position --- recipes/celero/all/conandata.yml | 25 ++++++++++++++ recipes/celero/all/conanfile.py | 12 ++++--- .../all/patches/0005-2.9.0-drop-runtime.patch | 33 +++++++++++++++++++ .../0006-2.9.0-fix-install-target.patch | 16 +++++++++ recipes/celero/config.yml | 2 ++ 5 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 recipes/celero/all/patches/0005-2.9.0-drop-runtime.patch create mode 100644 recipes/celero/all/patches/0006-2.9.0-fix-install-target.patch diff --git a/recipes/celero/all/conandata.yml b/recipes/celero/all/conandata.yml index 5c189657151ee..854be338c3c4d 100644 --- a/recipes/celero/all/conandata.yml +++ b/recipes/celero/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.9.0": + url: "https://github.com/DigitalInBlue/Celero/archive/v2.9.0.tar.gz" + sha256: "d59df84696e0dd58022d2c42837362c06eba6d1e29bac61f7b3143bc73d779e5" "2.8.2": url: "https://github.com/DigitalInBlue/Celero/archive/v2.8.2.tar.gz" sha256: "7d2131ba27ca5343b31f1e04777ed3e666e2ad7f785e79c960c872fc48cd5f88" @@ -6,11 +9,33 @@ sources: url: "https://github.com/DigitalInBlue/Celero/archive/v2.6.0.tar.gz" sha256: "a5b72da254f81d42369382ba3157229b6b32ebbb670a22b185f80db95535e66e" patches: + "2.9.0": + - patch_file: "patches/0005-2.9.0-drop-runtime.patch" + patch_description: "remove /MT /MD flags" + patch_type: "conan" + - patch_file: "patches/0006-2.9.0-fix-install-target.patch" + patch_description: "fix install target for Windows" + patch_type: "portability" "2.8.2": - patch_file: "patches/0004-2.8.2-missing-include.patch" + patch_description: "include memory header" + patch_type: "portability" + patch_source: "https://github.com/DigitalInBlue/Celero/pull/160" - patch_file: "patches/0005-drop-runtime.patch" + patch_description: "remove /MT /MD flags" + patch_type: "conan" "2.6.0": - patch_file: "patches/0001-cmake-install-pic-cxx-standard-sytem-libs.patch" + patch_description: "disable PIC, remove /std:c++14 flag, fix install path" + patch_type: "conan" - patch_file: "patches/0002-lowercase-include-system-libs-windows.patch" + patch_description: "lowercase include file names" + patch_type: "portability" - patch_file: "patches/0003-typo-declspec.patch" + patch_description: "fix typo declspec" + patch_type: "portability" + patch_source: "https://github.com/DigitalInBlue/Celero/pull/147" - patch_file: "patches/0004-2.6.0-missing-include.patch" + patch_description: "include memory header" + patch_type: "portability" + patch_source: "https://github.com/DigitalInBlue/Celero/pull/160" diff --git a/recipes/celero/all/conanfile.py b/recipes/celero/all/conanfile.py index d919314d7d0cb..b3f3afce2b69a 100644 --- a/recipes/celero/all/conanfile.py +++ b/recipes/celero/all/conanfile.py @@ -14,10 +14,9 @@ class CeleroConan(ConanFile): name = "celero" description = "C++ Benchmarking Library" license = "Apache-2.0" - topics = ("benchmark", "benchmark-tests", "measurements", "microbenchmarks") - homepage = "https://github.com/DigitalInBlue/Celero" url = "https://github.com/conan-io/conan-center-index" - + homepage = "https://github.com/DigitalInBlue/Celero" + topics = ("benchmark", "benchmark-tests", "measurements", "microbenchmarks") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -66,6 +65,10 @@ def validate(self): f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) + def build_requirements(self): + if Version(self.version) >= "2.9.0": + self.tool_requires("cmake/[>=3.22 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -90,6 +93,7 @@ def package(self): cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake", "celero")) # TODO: to remove in conan v2 once cmake_find_package_* generators removed self._create_cmake_module_alias_targets( @@ -119,7 +123,7 @@ def package_info(self): if not self.options.shared: self.cpp_info.defines = ["CELERO_STATIC"] if self.settings.os in ("FreeBSD", "Linux"): - self.cpp_info.system_libs = ["pthread"] + self.cpp_info.system_libs = ["pthread", "m"] elif self.settings.os == "Windows": self.cpp_info.system_libs = ["powrprof", "psapi"] diff --git a/recipes/celero/all/patches/0005-2.9.0-drop-runtime.patch b/recipes/celero/all/patches/0005-2.9.0-drop-runtime.patch new file mode 100644 index 0000000000000..8810f2aa3b2d3 --- /dev/null +++ b/recipes/celero/all/patches/0005-2.9.0-drop-runtime.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3f12ab9..73474a1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -66,17 +66,17 @@ macro(CeleroSetDefaultCompilerOptions) + target_compile_options(${PROJECT_NAME} PRIVATE /permissive-) + target_compile_options(${PROJECT_NAME} PRIVATE /MP) + +- if (NOT CELERO_COMPILE_DYNAMIC_LIBRARIES) +- if(VCPKG_CRT_LINKAGE) +- if(VCPKG_CRT_LINKAGE STREQUAL "static") +- target_compile_options(${PROJECT_NAME} PRIVATE /MT$<$:d>) +- else() +- target_compile_options(${PROJECT_NAME} PRIVATE /MD$<$:d>) +- endif() +- else() +- target_compile_options(${PROJECT_NAME} PRIVATE /MT$<$:d>) +- endif() +- endif() ++ # if (NOT CELERO_COMPILE_DYNAMIC_LIBRARIES) ++ # if(VCPKG_CRT_LINKAGE) ++ # if(VCPKG_CRT_LINKAGE STREQUAL "static") ++ # target_compile_options(${PROJECT_NAME} PRIVATE /MT$<$:d>) ++ # else() ++ # target_compile_options(${PROJECT_NAME} PRIVATE /MD$<$:d>) ++ # endif() ++ # else() ++ # target_compile_options(${PROJECT_NAME} PRIVATE /MT$<$:d>) ++ # endif() ++ # endif() + + if(CELERO_ENABLE_WARNINGS_AS_ERRORS) + target_compile_options(${PROJECT_NAME} PRIVATE /WX) diff --git a/recipes/celero/all/patches/0006-2.9.0-fix-install-target.patch b/recipes/celero/all/patches/0006-2.9.0-fix-install-target.patch new file mode 100644 index 0000000000000..b8f71eb1f7916 --- /dev/null +++ b/recipes/celero/all/patches/0006-2.9.0-fix-install-target.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3f12ab9..8c0c2e2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -274,8 +274,10 @@ install( + ) + install( + TARGETS celero +- DESTINATION ${CMAKE_INSTALL_LIBDIR} + EXPORT celero-targets ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + install( + EXPORT celero-targets diff --git a/recipes/celero/config.yml b/recipes/celero/config.yml index 3f32427faf7d1..0aacb0a653fc9 100644 --- a/recipes/celero/config.yml +++ b/recipes/celero/config.yml @@ -1,4 +1,6 @@ versions: + "2.9.0": + folder: all "2.8.2": folder: all "2.6.0": From cea2b0ce0ef73b9916d185333e306e67f81e4a68 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 24 Feb 2024 04:50:44 +0900 Subject: [PATCH 079/405] (#22856) dice-template-library: add version 1.3.0, support apple-clang --- recipes/dice-template-library/all/conandata.yml | 3 +++ recipes/dice-template-library/all/conanfile.py | 3 +-- recipes/dice-template-library/config.yml | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/recipes/dice-template-library/all/conandata.yml b/recipes/dice-template-library/all/conandata.yml index 59191b2c39484..8045d981c24de 100644 --- a/recipes/dice-template-library/all/conandata.yml +++ b/recipes/dice-template-library/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.0": + url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v1.3.0.tar.gz" + sha256: "2e61e95eeedf31f7041a6694c0789c5d1a5e3f9e4db87546cb83c9189808d4f5" "1.2.0": url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v1.2.0.tar.gz" sha256: "9b21793e158af3ee81ceec827a1a43a87e309e2f7bf0be8ace0f538a95f4865a" diff --git a/recipes/dice-template-library/all/conanfile.py b/recipes/dice-template-library/all/conanfile.py index 9b90b9971293f..c799a85eb10c5 100644 --- a/recipes/dice-template-library/all/conanfile.py +++ b/recipes/dice-template-library/all/conanfile.py @@ -33,6 +33,7 @@ def _compilers_minimum_version(self): return { "gcc": "10.2", "clang": "12", + "apple-clang": "14", } def layout(self): @@ -42,8 +43,6 @@ def package_id(self): self.info.clear() def validate(self): - if self.settings.compiler == "apple-clang": - raise ConanInvalidConfiguration("apple-clang is not supported because a full concept implementation is needed") if is_msvc(self): raise ConanInvalidConfiguration("MSVC is not supported because a full concept implementation is needed") diff --git a/recipes/dice-template-library/config.yml b/recipes/dice-template-library/config.yml index 569143d81f56c..13451667044d0 100644 --- a/recipes/dice-template-library/config.yml +++ b/recipes/dice-template-library/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.0": + folder: all "1.2.0": folder: all "1.1.0": From 9fce4eb98c4578ea0379886bfa6545a70e4455f6 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 24 Feb 2024 10:52:58 +0900 Subject: [PATCH 080/405] (#22869) tree-sitter: add version 0.21.0 * tree-sitter: add version 0.21.0 * use C11 on 0.21.0 --- recipes/tree-sitter/all/CMakeLists.txt | 19 ++++++++++++------- recipes/tree-sitter/all/conandata.yml | 3 +++ recipes/tree-sitter/all/conanfile.py | 10 +++++++--- .../all/test_package/CMakeLists.txt | 7 ++++++- recipes/tree-sitter/config.yml | 2 ++ 5 files changed, 30 insertions(+), 11 deletions(-) diff --git a/recipes/tree-sitter/all/CMakeLists.txt b/recipes/tree-sitter/all/CMakeLists.txt index 5f48ce80be466..25a592da8c101 100644 --- a/recipes/tree-sitter/all/CMakeLists.txt +++ b/recipes/tree-sitter/all/CMakeLists.txt @@ -1,26 +1,31 @@ cmake_minimum_required(VERSION 3.4) -project(tree-sitter C) +project(tree-sitter LANGUAGES C) # Use cmake script instead of Makefile to support MSVC + follow fPIC option -file(GLOB SOURCES RELATIVE "${PROJECT_SOURCE_DIR}" src/lib/src/*.c) -list(REMOVE_ITEM SOURCES src/lib/src/lib.c) +file(GLOB SOURCES ${TREE_SITTER_SRC_DIR}/lib/src/*.c) +list(REMOVE_ITEM SOURCES ${TREE_SITTER_SRC_DIR}/lib/src/lib.c) -file(GLOB HEADERS src/lib/include/tree_sitter/*.h) +file(GLOB HEADERS ${TREE_SITTER_SRC_DIR}/lib/include/tree_sitter/*.h) add_library(${PROJECT_NAME} ${SOURCES}) target_include_directories(${PROJECT_NAME} PRIVATE - $ - $ + $ + $ ) set_target_properties(${PROJECT_NAME} PROPERTIES - C_STANDARD 99 PUBLIC_HEADER "${HEADERS}" WINDOWS_EXPORT_ALL_SYMBOLS ON ) +if(TREE_SITTER_VERSION VERSION_LESS "0.21.0") + target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) +else() + target_compile_features(${PROJECT_NAME} PRIVATE c_std_11) +endif() + include(GNUInstallDirs) install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" diff --git a/recipes/tree-sitter/all/conandata.yml b/recipes/tree-sitter/all/conandata.yml index 43b71bcba5f69..e9e15c0a595de 100644 --- a/recipes/tree-sitter/all/conandata.yml +++ b/recipes/tree-sitter/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.21.0": + url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.21.0.tar.gz" + sha256: "6bb60e5b63c1dc18aba57a9e7b3ea775b4f9ceec44cc35dac4634d26db4eb69c" "0.20.8": url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.20.8.tar.gz" sha256: "6181ede0b7470bfca37e293e7d5dc1d16469b9485d13f13a605baec4a8b1f791" diff --git a/recipes/tree-sitter/all/conanfile.py b/recipes/tree-sitter/all/conanfile.py index db16033332a0c..a0c425765146a 100644 --- a/recipes/tree-sitter/all/conanfile.py +++ b/recipes/tree-sitter/all/conanfile.py @@ -1,7 +1,7 @@ import os from conan import ConanFile -from conan.tools.cmake import CMake, cmake_layout +from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout from conan.tools.files import get, copy required_conan_version = ">=1.53.0" @@ -24,8 +24,6 @@ class TreeSitterConan(ConanFile): "fPIC": True, "shared": False, } - - generators = "CMakeToolchain" exports_sources = "CMakeLists.txt" def config_options(self): @@ -44,6 +42,12 @@ def layout(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + def generate(self): + tc = CMakeToolchain(self) + tc.variables["TREE_SITTER_SRC_DIR"] = self.source_folder.replace("\\", "/") + tc.variables["TREE_SITTER_VERSION"] = str(self.version) + tc.generate() + def build(self): cmake = CMake(self) cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) diff --git a/recipes/tree-sitter/all/test_package/CMakeLists.txt b/recipes/tree-sitter/all/test_package/CMakeLists.txt index c0b053bd23a36..5946342aa2496 100644 --- a/recipes/tree-sitter/all/test_package/CMakeLists.txt +++ b/recipes/tree-sitter/all/test_package/CMakeLists.txt @@ -1,7 +1,12 @@ cmake_minimum_required(VERSION 3.1) -project(test_package C) +project(test_package LANGUAGES C) find_package(tree-sitter REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} tree-sitter::tree-sitter) +if(tree-sitter_VERSION VERSION_LESS "0.21.0") + target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) +else() + target_compile_features(${PROJECT_NAME} PRIVATE c_std_11) +endif() diff --git a/recipes/tree-sitter/config.yml b/recipes/tree-sitter/config.yml index 30720fc6f1016..62dc82320f3ad 100644 --- a/recipes/tree-sitter/config.yml +++ b/recipes/tree-sitter/config.yml @@ -1,4 +1,6 @@ versions: + "0.21.0": + folder: all "0.20.8": folder: all "0.20.6": From 1e82faa96f40bd93868142ac5b10ee29971ad6b0 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 24 Feb 2024 20:29:06 +0900 Subject: [PATCH 081/405] (#22857) glaze: add version 2.1.6, 2.1.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * glaze: add version 2.1.6 * update 2.1.7 * revert 2.1.6, drop support clang < 14 on 2.1.7 * Update recipes/glaze/all/conandata.yml --------- Co-authored-by: Rubén Rincón Blanco --- recipes/glaze/all/conandata.yml | 7 +++++++ recipes/glaze/all/conanfile.py | 3 ++- recipes/glaze/config.yml | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index eac1dcf403a4d..6736bccf09f67 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,11 @@ sources: + "2.1.7": + url: "https://github.com/stephenberry/glaze/archive/v2.1.7.tar.gz" + sha256: "e110bfc6494ca3a0616beaec214e61a53d4e0bd1489d8f1a45ca6f87594a3502" + # Keep 2.1.6 for now as 2.1.7 had some breaking changes + "2.1.6": + url: "https://github.com/stephenberry/glaze/archive/v2.1.6.tar.gz" + sha256: "5ae31b1a48a5b54b84e115a12195341bfbe39f03f92bb3bcad074f984380f72d" "2.1.4": url: "https://github.com/stephenberry/glaze/archive/v2.1.4.tar.gz" sha256: "cbaba4dfbaaf342c8be8e6834cb79933b080ac89f3aa1470bc7a83197d9ebc1a" diff --git a/recipes/glaze/all/conanfile.py b/recipes/glaze/all/conanfile.py index 4237860bf397f..b7b6a8eb1447b 100644 --- a/recipes/glaze/all/conanfile.py +++ b/recipes/glaze/all/conanfile.py @@ -29,7 +29,8 @@ def _compilers_minimum_version(self): "Visual Studio": "17", "msvc": "193", "gcc": "10", - "clang": "12", + # glaze >= 2.1.6 uses std::bit_cast which is supported by clang >= 14 + "clang": "12" if Version(self.version) < "2.1.6" else "14", "apple-clang": "13.1", } if Version(self.version) >= "1.9.0": diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index b7b45251fb8a4..e31effcfe238e 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,8 @@ versions: + "2.1.7": + folder: all + "2.1.6": + folder: all "2.1.4": folder: all "2.1.0": From c238545a5b6dc605bf321a8738bf68b927357569 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 26 Feb 2024 07:58:48 +0100 Subject: [PATCH 082/405] fix config validate infra entry (#22870) Signed-off-by: Uilian Ries --- .c3i/config_v1.yml | 2 +- .c3i/config_v2.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.c3i/config_v1.yml b/.c3i/config_v1.yml index 6bb2f823e1899..ae8f0a7b717cf 100644 --- a/.c3i/config_v1.yml +++ b/.c3i/config_v1.yml @@ -74,7 +74,7 @@ tasks: validate_infrastructure: macos_executors: 2 windows_executors: 4 - open_docs_pull-request: true + create_docs_pull-request: true # Profile configurations to build packages configurations: diff --git a/.c3i/config_v2.yml b/.c3i/config_v2.yml index 765cbc758a9e0..ce873ee6cf673 100644 --- a/.c3i/config_v2.yml +++ b/.c3i/config_v2.yml @@ -66,7 +66,7 @@ tasks: validate_infrastructure: macos_executors: 2 windows_executors: 4 - open_docs_pull-request: false + create_docs_pull-request: false configurations: - id: linux-gcc From 762c212e2e72629c3572e80c7b6fd981647c0b71 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 26 Feb 2024 09:04:33 +0100 Subject: [PATCH 083/405] (#21764) avoid meson creating pycache files, corrupt the package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rubén Rincón Blanco --- recipes/meson/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/meson/all/conanfile.py b/recipes/meson/all/conanfile.py index e2d65a1b60825..f11560d3a45d0 100644 --- a/recipes/meson/all/conanfile.py +++ b/recipes/meson/all/conanfile.py @@ -44,11 +44,13 @@ def package(self): # create wrapper scripts save(self, os.path.join(self.package_folder, "bin", "meson.cmd"), textwrap.dedent("""\ @echo off + set PYTHONDONTWRITEBYTECODE=1 CALL python %~dp0/meson.py %* """)) save(self, os.path.join(self.package_folder, "bin", "meson"), textwrap.dedent("""\ #!/usr/bin/env bash meson_dir=$(dirname "$0") + export PYTHONDONTWRITEBYTECODE=1 exec "$meson_dir/meson.py" "$@" """)) From 148835788c1fc8814de32c270acbd554a5a8c534 Mon Sep 17 00:00:00 2001 From: Roberto Rossini <71787608+robomics@users.noreply.github.com> Date: Mon, 26 Feb 2024 10:08:25 +0100 Subject: [PATCH 084/405] (#22893) hictk: add v0.0.9 --- recipes/hictk/all/conandata.yml | 3 +++ recipes/hictk/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/hictk/all/conandata.yml b/recipes/hictk/all/conandata.yml index c0ae183d99318..ef016828b80db 100644 --- a/recipes/hictk/all/conandata.yml +++ b/recipes/hictk/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.0.9": + url: "https://github.com/paulsengroup/hictk/archive/refs/tags/v0.0.9.tar.gz" + sha256: "c64cb07a057863baa199b9d344b27b8f15a1db458390ccf7b5cac0627308d8c8" "0.0.8": url: "https://github.com/paulsengroup/hictk/archive/refs/tags/v0.0.8.tar.gz" sha256: "4bdadf49cb053731ea31f50312c9e4fcbcdcbaf94c39715f7b325641629bed4b" diff --git a/recipes/hictk/config.yml b/recipes/hictk/config.yml index 460eb40585b0b..0677603a25aa5 100644 --- a/recipes/hictk/config.yml +++ b/recipes/hictk/config.yml @@ -1,4 +1,6 @@ versions: + "0.0.9": + folder: all "0.0.8": folder: all "0.0.3": From 5ce904c44cbc906a1d13a06e4d49c55d1a361cfe Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Mon, 26 Feb 2024 11:04:45 +0100 Subject: [PATCH 085/405] (#19950) OpenImageIO: conan 2 support, old version cleanup & version 2.4.17.0 & 2.5.6.0 added MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Convert OpenImageIO to build with conan 2.0 Initial conversion to Conan 2.0 based on existing Conan 1.0 receip. Updating to OIIO 2.4.15.0 additionally to include patches integrated since last version. * Fix ptex dependency linking/include directory * Update license info to Apache 2 * Convert OpenImageIO to build with conan 2.0 Initial conversion to Conan 2.0 based on existing Conan 1.0 receip. Updating to OIIO 2.4.15.0 additionally to include patches integrated since last version. * Fix ptex dependency linking/include directory * Update license info to Apache 2 * Small cleanup * Fix linter warning for new conanfile * Rename legacy back to all to keep existing files untouched * Update dependencies * Roll back opencolorio change * Bump WebP to 1.3.2 which includes an important security fix * Bump zlib requirement to range style * Cleanup * OpenColorIO version prepared in separate branch * Prepare for ffmpeg/6.0.1 * Try to add Conan v2 and adding latest 2.4.17.0 version * Fix config.yml * Fixed cmake targets patch * Cleanup old versions to reduce the number of needed changes to make everything work again * Apply changes to old and current patches to ensure correct Cmake target use * Fix build for 2.4.7.1 (locally now building with conan 1 and 2) * Fix linking to ensure that the conan fmt is used, build before due to system fmt * Add OpenImageIO 2.5.6.0 * Fix ffmpeg requirement for old OIIO version + bump openexr * Add version to config * Remove accidential blank line * Fix patches for correct libheif linking * Improve some includes and if-conditions * Small fixes in test package & patches * Add fmt required * Set fmt transitive * Set transitive * Transitive imath * OpenColorIO 2.3.1 & attempted fix for test package * Attempted fix for requires * Trying lower case imath requirement * Update recipes/openimageio/all/conanfile.py Impelment suggested change Co-authored-by: Esteban Dugueperoux <43169544+EstebanDugueperoux2@users.noreply.github.com> * Update recipes/openimageio/all/conanfile.py Try to fix windows build errors (aka unintentionally included VC library redistribution) Co-authored-by: Julien Marrec * Import rm * Fix license info * Fix test package path * Try to bypass windows path problem * Fix test path * Adapt test package to package template * Match freetype version of ffmpeg * Adapt to style comments for variable names * Remove old version that requires a missing ffmpeg build of version 4.4.4 * Try bumping all dependencies * Version range for libpng * Apply suggestions from code review Co-authored-by: Rubén Rincón Blanco * Remove testing option * Update recipes/openimageio/all/test_v1_package/CMakeLists.txt * Update recipes/openimageio/all/test_package/CMakeLists.txt --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: Uilian Ries Co-authored-by: Esteban Dugueperoux <43169544+EstebanDugueperoux2@users.noreply.github.com> Co-authored-by: Julien Marrec Co-authored-by: Rubén Rincón Blanco --- recipes/openimageio/all/CMakeLists.txt | 19 - recipes/openimageio/all/conandata.yml | 38 +- recipes/openimageio/all/conanfile.py | 284 ++++--- .../all/patches/2.2.18.0-cmake-targets.patch | 711 ------------------ .../all/patches/2.2.7.0-cmake-targets.patch | 673 ----------------- .../all/patches/2.3.7.2-cmake-targets.patch | 710 ----------------- .../all/patches/2.4.17.0-cmake-targets.patch | 456 +++++++++++ .../all/patches/2.4.7.1-cmake-targets.patch | 40 +- .../all/patches/2.5.6.0-cmake-targets.patch | 515 +++++++++++++ .../all/test_package/CMakeLists.txt | 11 +- .../openimageio/all/test_package/conanfile.py | 21 +- .../all/test_v1_package/CMakeLists.txt | 11 + .../all/test_v1_package/conanfile.py | 16 + .../all/test_v1_package/test_package.cpp | 9 + recipes/openimageio/config.yml | 8 +- 15 files changed, 1214 insertions(+), 2308 deletions(-) delete mode 100644 recipes/openimageio/all/CMakeLists.txt delete mode 100644 recipes/openimageio/all/patches/2.2.18.0-cmake-targets.patch delete mode 100644 recipes/openimageio/all/patches/2.2.7.0-cmake-targets.patch delete mode 100644 recipes/openimageio/all/patches/2.3.7.2-cmake-targets.patch create mode 100644 recipes/openimageio/all/patches/2.4.17.0-cmake-targets.patch create mode 100644 recipes/openimageio/all/patches/2.5.6.0-cmake-targets.patch create mode 100644 recipes/openimageio/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/openimageio/all/test_v1_package/conanfile.py create mode 100644 recipes/openimageio/all/test_v1_package/test_package.cpp diff --git a/recipes/openimageio/all/CMakeLists.txt b/recipes/openimageio/all/CMakeLists.txt deleted file mode 100644 index 62d9f71f06583..0000000000000 --- a/recipes/openimageio/all/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include("conanbuildinfo.cmake") -conan_basic_setup(KEEP_RPATHS) - -include_directories( - BEFORE - # OIIO uses CMAKE_BINARY_DIR, we need to set include dirs - # in order to be able to use add_subdirectory - "${CMAKE_BINARY_DIR}/source_subfolder/src/include" - "${CMAKE_BINARY_DIR}/source_subfolder/include" - # Same as above but for CMAKE_SOURCE_DIR - "${CMAKE_SOURCE_DIR}/source_subfolder/src/include" -) - -set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP YES) - -add_subdirectory(source_subfolder) diff --git a/recipes/openimageio/all/conandata.yml b/recipes/openimageio/all/conandata.yml index f652a05c49a38..9ae019a09b59e 100644 --- a/recipes/openimageio/all/conandata.yml +++ b/recipes/openimageio/all/conandata.yml @@ -1,32 +1,26 @@ sources: - "2.2.7.0": - url: "https://github.com/OpenImageIO/oiio/archive/Release-2.2.7.0.tar.gz" - sha256: "857ac83798d6d2bda5d4d11a90618ff19486da2e5a4c4ff022c5976b5746fe8c" - "2.2.18.0": - url: "https://github.com/OpenImageIO/oiio/archive/refs/tags/v2.2.18.0.tar.gz" - sha256: "72597619f09b60cc2afc18f378b40fbec62701112957f43cff162dd9a52a26ce" - "2.3.7.2": - url: "https://github.com/OpenImageIO/oiio/archive/refs/tags/v2.3.7.2.tar.gz" - sha256: "829c05d17610f1156c2a777310f4709b81f3a302fd11e3999ea4a865a5b4a5d3" "2.4.7.1": - url: "https://github.com/OpenImageIO/oiio/archive/refs/tags/v2.4.7.1.tar.gz" - sha256: "fd298f71e44c6776863db4b37c4a1388dba0d2eb37378afea95ab07a7cd6ecd4" + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.4.7.1.tar.gz" + sha256: "a3dc6fdb3693eb5f1e22191e41c05800a4944f3c76daffe90bd203f956180126" + "2.4.17.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.4.17.0.tar.gz" + sha256: "7fe81d8e5bce30cc4a212f020ac3cc4344e6b7c1c0842475e3a048515099c65c" + "2.5.6.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.6.0.tar.gz" + sha256: "bcfced40a25ef8576383b44d8bbe3732aa2b8efc7b8614482783d6f90378d307" patches: - "2.2.7.0": - - patch_file: "patches/2.2.7.0-cmake-targets.patch" - base_path: "source_subfolder" - "2.2.18.0": - - patch_file: "patches/2.2.18.0-cmake-targets.patch" - base_path: "source_subfolder" - "2.3.7.2": - - patch_file: "patches/2.3.7.2-cmake-targets.patch" - base_path: "source_subfolder" "2.4.7.1": - patch_file: "patches/2.4.7.1-cmake-targets.patch" - base_path: "source_subfolder" 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" - patch_file: "patches/2.4.7.1-fix-msvc2017.patch" - base_path: "source_subfolder" patch_description: "Fix compile error with MSVC 2017" patch_type: "official" + "2.4.17.0": + - patch_file: "patches/2.4.17.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.6.0": + - patch_file: "patches/2.5.6.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 f741a725420ff..16fa1a05a98b9 100644 --- a/recipes/openimageio/all/conanfile.py +++ b/recipes/openimageio/all/conanfile.py @@ -1,10 +1,10 @@ +from conan import ConanFile from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rm, rmdir from conan.tools.microsoft import is_msvc, is_msvc_static_runtime -from conan import ConanFile, Version -from conan.tools import files +from conan.tools.scm import Version from conan.errors import ConanInvalidConfiguration -from conans import CMake -import functools import os required_conan_version = ">=1.53.0" @@ -19,7 +19,7 @@ class OpenImageIOConan(ConanFile): "professional, large-scale animation and visual effects work for film." ) topics = ("vfx", "image", "picture") - license = "BSD-3-Clause" + license = "Apache-2.0", "BSD-3-Clause" homepage = "http://www.openimageio.org/" url = "https://github.com/conan-io/conan-center-index" @@ -65,21 +65,8 @@ class OpenImageIOConan(ConanFile): "with_libwebp": True, } - short_paths = True - generators = "cmake", "cmake_find_package" - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -87,236 +74,235 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") def requirements(self): # Required libraries - self.requires("zlib/1.2.13") - self.requires("boost/1.78.0") - self.requires("libtiff/4.5.1") - self.requires("openexr/2.5.7") + self.requires("zlib/[>=1.2.11 <2]") + self.requires("boost/1.84.0") + self.requires("libtiff/4.6.0") + self.requires("imath/3.1.9", transitive_headers=True) + self.requires("openexr/3.2.1") if self.options.with_libjpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_libjpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/2.1.5") - self.requires("pugixml/1.12.1") + self.requires("libjpeg-turbo/3.0.2") + self.requires("pugixml/1.14") self.requires("libsquish/1.15") - self.requires("tsl-robin-map/1.0.1") - self.requires("fmt/8.1.1") + self.requires("tsl-robin-map/1.2.1") + if Version(self.version) >= "2.4.17.0": + self.requires("fmt/10.2.1", transitive_headers=True) + else: + self.requires("fmt/9.1.0", transitive_headers=True) # Optional libraries if self.options.with_libpng: - self.requires("libpng/1.6.40") + self.requires("libpng/1.6.42") if self.options.with_freetype: - self.requires("freetype/2.13.0") + self.requires("freetype/2.13.2") if self.options.with_hdf5: - self.requires("hdf5/1.12.1") + self.requires("hdf5/1.14.3") if self.options.with_opencolorio: - if Version(self.version) < "2.3.7.2": - self.requires("opencolorio/1.1.1") - else: - self.requires("opencolorio/2.1.0") + self.requires("opencolorio/2.3.1") if self.options.with_opencv: - self.requires("opencv/4.5.5") + self.requires("opencv/4.8.1") if self.options.with_tbb: - self.requires("onetbb/2020.3") + self.requires("onetbb/2021.10.0") if self.options.with_dicom: - self.requires("dcmtk/3.6.6") + self.requires("dcmtk/3.6.7") if self.options.with_ffmpeg: - self.requires("ffmpeg/4.4") + self.requires("ffmpeg/6.1") # TODO: Field3D dependency if self.options.with_giflib: self.requires("giflib/5.2.1") if self.options.with_libheif: - self.requires("libheif/1.12.0") + self.requires("libheif/1.16.2") if self.options.with_raw: - self.requires("libraw/0.20.2") + self.requires("libraw/0.21.2") if self.options.with_openjpeg: self.requires("openjpeg/2.5.0") if self.options.with_openvdb: self.requires("openvdb/8.0.1") if self.options.with_ptex: - self.requires("ptex/2.4.0") + self.requires("ptex/2.4.2") if self.options.with_libwebp: - self.requires("libwebp/1.3.1") + self.requires("libwebp/1.3.2") # TODO: R3DSDK dependency # TODO: Nuke dependency def validate(self): - if self.settings.compiler.get_safe("cppstd"): - if Version(self.version) >= "2.3.0.0" or self.options.with_openvdb: - check_min_cppstd(self, 14) - else: - check_min_cppstd(self, 11) + if self.settings.compiler.cppstd: + check_min_cppstd(self, 14) if is_msvc(self) and is_msvc_static_runtime(self) and self.options.shared: raise ConanInvalidConfiguration( "Building shared library with static runtime is not supported!" ) - def source(self): - files.get( - self, - **self.conan_data["sources"][self.version], - strip_root=True, - destination=self._source_subfolder - ) + def layout(self): + cmake_layout(self, src_folder="src") - def _patch_sources(self): - files.apply_conandata_patches(self) + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) + def generate(self): + tc = CMakeToolchain(self) # CMake options - cmake.definitions["CMAKE_DEBUG_POSTFIX"] = "" # Needed for 2.3.x.x+ versions - cmake.definitions["OIIO_BUILD_TOOLS"] = True - cmake.definitions["OIIO_BUILD_TESTS"] = False - cmake.definitions["BUILD_DOCS"] = False - cmake.definitions["INSTALL_DOCS"] = False - cmake.definitions["INSTALL_FONTS"] = False - cmake.definitions["INSTALL_CMAKE_HELPER"] = False - cmake.definitions["EMBEDPLUGINS"] = True - cmake.definitions["USE_PYTHON"] = False - cmake.definitions["USE_EXTERNAL_PUGIXML"] = True + tc.variables["CMAKE_DEBUG_POSTFIX"] = "" # Needed for 2.3.x.x+ versions + tc.variables["OIIO_BUILD_TOOLS"] = True + tc.variables["OIIO_BUILD_TESTS"] = False + tc.variables["BUILD_DOCS"] = False + tc.variables["INSTALL_DOCS"] = False + tc.variables["INSTALL_FONTS"] = False + tc.variables["INSTALL_CMAKE_HELPER"] = False + tc.variables["EMBEDPLUGINS"] = True + tc.variables["USE_PYTHON"] = False + tc.variables["USE_EXTERNAL_PUGIXML"] = True + tc.variables["BUILD_MISSING_FMT"] = False + + # Conan is normally not used for testing, so fixing this option to not build the tests + tc.variables["BUILD_TESTING"] = False # OIIO CMake files are patched to check USE_* flags to require or not use dependencies - cmake.definitions["USE_JPEGTURBO"] = ( + tc.variables["USE_JPEGTURBO"] = ( self.options.with_libjpeg == "libjpeg-turbo" ) - cmake.definitions[ + tc.variables[ "USE_JPEG" ] = True # Needed for jpeg.imageio plugin, libjpeg/libjpeg-turbo selection still works - cmake.definitions["USE_HDF5"] = self.options.with_hdf5 - cmake.definitions["USE_OPENCOLORIO"] = self.options.with_opencolorio - cmake.definitions["USE_OPENCV"] = self.options.with_opencv - cmake.definitions["USE_TBB"] = self.options.with_tbb - cmake.definitions["USE_DCMTK"] = self.options.with_dicom - cmake.definitions["USE_FFMPEG"] = self.options.with_ffmpeg - cmake.definitions["USE_FIELD3D"] = False - cmake.definitions["USE_GIF"] = self.options.with_giflib - cmake.definitions["USE_LIBHEIF"] = self.options.with_libheif - cmake.definitions["USE_LIBRAW"] = self.options.with_raw - cmake.definitions["USE_OPENVDB"] = self.options.with_openvdb - cmake.definitions["USE_PTEX"] = self.options.with_ptex - cmake.definitions["USE_R3DSDK"] = False - cmake.definitions["USE_NUKE"] = False - cmake.definitions["USE_OPENGL"] = False - cmake.definitions["USE_QT"] = False - cmake.definitions["USE_LIBPNG"] = self.options.with_libpng - cmake.definitions["USE_FREETYPE"] = self.options.with_freetype - cmake.definitions["USE_LIBWEBP"] = self.options.with_libwebp - cmake.definitions["USE_OPENJPEG"] = self.options.with_openjpeg - - if self.options.with_openvdb: - cmake.definitions["CMAKE_CXX_STANDARD"] = 14 + tc.variables["USE_HDF5"] = self.options.with_hdf5 + tc.variables["USE_OPENCOLORIO"] = self.options.with_opencolorio + tc.variables["USE_OPENCV"] = self.options.with_opencv + tc.variables["USE_TBB"] = self.options.with_tbb + tc.variables["USE_DCMTK"] = self.options.with_dicom + tc.variables["USE_FFMPEG"] = self.options.with_ffmpeg + tc.variables["USE_FIELD3D"] = False + tc.variables["USE_GIF"] = self.options.with_giflib + tc.variables["USE_LIBHEIF"] = self.options.with_libheif + tc.variables["USE_LIBRAW"] = self.options.with_raw + tc.variables["USE_OPENVDB"] = self.options.with_openvdb + tc.variables["USE_PTEX"] = self.options.with_ptex + tc.variables["USE_R3DSDK"] = False + tc.variables["USE_NUKE"] = False + tc.variables["USE_OPENGL"] = False + tc.variables["USE_QT"] = False + tc.variables["USE_LIBPNG"] = self.options.with_libpng + tc.variables["USE_FREETYPE"] = self.options.with_freetype + tc.variables["USE_LIBWEBP"] = self.options.with_libwebp + tc.variables["USE_OPENJPEG"] = self.options.with_openjpeg - cmake.configure(build_folder=self._build_subfolder) - return cmake + tc.generate() + cd = CMakeDeps(self) + cd.generate() def build(self): - self._patch_sources() - - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - cmake = self._configure_cmake() + copy(self, "LICENSE*.md", 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, "share")) + if self.settings.os == "Windows": + for vc_file in ("concrt", "msvcp", "vcruntime"): + rm(self, f"{vc_file}*.dll", os.path.join(self.package_folder, "bin")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - files.rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - files.rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - files.rmdir(self, os.path.join(self.package_folder, "share")) + @staticmethod + def _conan_comp(name): + return f"openimageio_{name.lower()}" - self.copy("LICENSE.md", src=self._source_subfolder, dst="licenses") + def _add_component(self, name): + component = self.cpp_info.components[self._conan_comp(name)] + component.set_property("cmake_target_name", f"OpenImageIO::{name}") + component.names["cmake_find_package"] = name + component.names["cmake_find_package_multi"] = name + return component def package_info(self): self.cpp_info.set_property("cmake_file_name", "OpenImageIO") - self.cpp_info.set_property("cmake_target_name", "OpenImageIO::OpenImageIO") self.cpp_info.set_property("pkg_config_name", "OpenImageIO") - self.cpp_info.components["openimageio_util"].set_property( - "cmake_target_name", "OpenImageIO::OpenImageIO_Util" - ) - self.cpp_info.components["openimageio_util"].libs = ["OpenImageIO_Util"] - self.cpp_info.components["openimageio_util"].requires = [ + self.cpp_info.names["cmake_find_package"] = "OpenImageIO" + self.cpp_info.names["cmake_find_package_multi"] = "OpenImageIO" + + # OpenImageIO::OpenImageIO_Util + open_image_io_util = self._add_component("OpenImageIO_Util") + open_image_io_util.libs = ["OpenImageIO_Util"] + open_image_io_util.requires = [ "boost::filesystem", "boost::thread", "boost::system", "boost::regex", + "imath::imath", "openexr::openexr", ] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["openimageio_util"].system_libs.extend( + open_image_io_util.system_libs.extend( ["dl", "m", "pthread"] ) + if self.options.with_tbb: + open_image_io_util.requires.append("onetbb::onetbb") - self.cpp_info.components["main"].set_property( - "cmake_target_name", "OpenImageIO::OpenImageIO" - ) - self.cpp_info.components["main"].set_property("pkg_config_name", "OpenImageIO") - self.cpp_info.components["main"].libs = ["OpenImageIO"] - self.cpp_info.components["main"].requires = [ - "openimageio_util", + # OpenImageIO::OpenImageIO + open_image_io = self._add_component("OpenImageIO") + open_image_io.libs = ["OpenImageIO"] + open_image_io.requires = [ + "openimageio_openimageio_util", "zlib::zlib", "boost::thread", "boost::system", "boost::container", "boost::regex", "libtiff::libtiff", - "openexr::openexr", "pugixml::pugixml", "tsl-robin-map::tsl-robin-map", "libsquish::libsquish", "fmt::fmt", + "imath::imath", + "openexr::openexr", ] + if self.options.with_libjpeg == "libjpeg": - self.cpp_info.components["main"].requires.append("libjpeg::libjpeg") + open_image_io.requires.append("libjpeg::libjpeg") elif self.options.with_libjpeg == "libjpeg-turbo": - self.cpp_info.components["main"].requires.append( + open_image_io.requires.append( "libjpeg-turbo::libjpeg-turbo" ) if self.options.with_libpng: - self.cpp_info.components["main"].requires.append("libpng::libpng") + open_image_io.requires.append("libpng::libpng") if self.options.with_freetype: - self.cpp_info.components["main"].requires.append("freetype::freetype") + open_image_io.requires.append("freetype::freetype") if self.options.with_hdf5: - self.cpp_info.components["main"].requires.append("hdf5::hdf5") + open_image_io.requires.append("hdf5::hdf5") if self.options.with_opencolorio: - self.cpp_info.components["main"].requires.append("opencolorio::opencolorio") + open_image_io.requires.append("opencolorio::opencolorio") if self.options.with_opencv: - self.cpp_info.components["main"].requires.append("opencv::opencv") - if self.options.with_tbb: - self.cpp_info.components["openimageio_util"].requires.append("onetbb::onetbb") + open_image_io.requires.append("opencv::opencv") if self.options.with_dicom: - self.cpp_info.components["main"].requires.append("dcmtk::dcmtk") + open_image_io.requires.append("dcmtk::dcmtk") if self.options.with_ffmpeg: - self.cpp_info.components["main"].requires.append("ffmpeg::ffmpeg") + open_image_io.requires.append("ffmpeg::ffmpeg") if self.options.with_giflib: - self.cpp_info.components["main"].requires.append("giflib::giflib") + open_image_io.requires.append("giflib::giflib") if self.options.with_libheif: - self.cpp_info.components["main"].requires.append("libheif::libheif") + open_image_io.requires.append("libheif::libheif") if self.options.with_raw: - self.cpp_info.components["main"].requires.append("libraw::libraw") + open_image_io.requires.append("libraw::libraw") if self.options.with_openjpeg: - self.cpp_info.components["main"].requires.append("openjpeg::openjpeg") + open_image_io.requires.append("openjpeg::openjpeg") if self.options.with_openvdb: - self.cpp_info.components["main"].requires.append("openvdb::openvdb") + open_image_io.requires.append("openvdb::openvdb") if self.options.with_ptex: - self.cpp_info.components["main"].requires.append("ptex::ptex") + open_image_io.requires.append("ptex::ptex") if self.options.with_libwebp: - self.cpp_info.components["main"].requires.append("libwebp::libwebp") + open_image_io.requires.append("libwebp::libwebp") if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["main"].system_libs.extend(["dl", "m", "pthread"]) + open_image_io.system_libs.extend(["dl", "m", "pthread"]) if not self.options.shared: - self.cpp_info.components["main"].defines.append("OIIO_STATIC_DEFINE") - - # TODO: to remove in conan v2 once cmake_find_package* & pkg_config generators removed - self.cpp_info.names["cmake_find_package"] = "OpenImageIO" - self.cpp_info.names["cmake_find_package_multi"] = "OpenImageIO" - self.cpp_info.names["pkg_config"] = "OpenImageIO" - self.cpp_info.components["openimageio_util"].names[ - "cmake_find_package" - ] = "OpenImageIO_Util" - self.cpp_info.components["main"].names["cmake_find_package"] = "OpenImageIO" + open_image_io.defines.append("OIIO_STATIC_DEFINE") diff --git a/recipes/openimageio/all/patches/2.2.18.0-cmake-targets.patch b/recipes/openimageio/all/patches/2.2.18.0-cmake-targets.patch deleted file mode 100644 index 395bff8a6bd10..0000000000000 --- a/recipes/openimageio/all/patches/2.2.18.0-cmake-targets.patch +++ /dev/null @@ -1,711 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ccda926b..24b26b8f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -99,7 +99,7 @@ message(STATUS "Setting Namespace to: ${PROJ_NAMESPACE_V}") - - - list (APPEND CMAKE_MODULE_PATH -- "${PROJECT_SOURCE_DIR}/src/cmake/modules" -+ # "${PROJECT_SOURCE_DIR}/src/cmake/modules" - "${PROJECT_SOURCE_DIR}/src/cmake") - - include (GNUInstallDirs) -@@ -179,7 +179,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 a/src/cmake/compiler.cmake b/src/cmake/compiler.cmake -index 8747f506..503e2a55 100644 ---- a/src/cmake/compiler.cmake -+++ b/src/cmake/compiler.cmake -@@ -92,7 +92,7 @@ if (NOT MSVC) - add_compile_options ("-Wextra") - endif () - if (STOP_ON_WARNING OR DEFINED ENV{CI}) -- add_compile_options ("-Werror") -+ # add_compile_options ("-Werror") - # N.B. Force CI builds to use -Werror, even if STOP_ON_WARNING has - # been switched off by default, which we may do in release - # branches. -diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake -index 21e18b53..605d247a 100644 ---- a/src/cmake/externalpackages.cmake -+++ b/src/cmake/externalpackages.cmake -@@ -46,7 +46,7 @@ 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) -+ # add_definitions (-DBOOST_ALL_DYN_LINK=1) - endif () - endif () - -@@ -55,7 +55,7 @@ if (BOOST_CUSTOM) - # N.B. For a custom version, the caller had better set up the variables - # Boost_VERSION, Boost_INCLUDE_DIRS, Boost_LIBRARY_DIRS, Boost_LIBRARIES. - else () -- set (Boost_COMPONENTS filesystem system thread) -+ set (Boost_COMPONENTS filesystem system thread container) - if (NOT USE_STD_REGEX) - list (APPEND Boost_COMPONENTS regex) - endif () -@@ -106,16 +106,16 @@ checked_find_package (OpenEXR REQUIRED - # library. This shoudn't be necessary, except for the common case of people - # 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 (CMAKE_COMPILER_IS_CLANG AND OPENEXR_VERSION VERSION_LESS 2.3) -+# include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) -+if (CMAKE_COMPILER_IS_CLANG AND OpenEXR_VERSION VERSION_LESS 2.3) - # clang C++ >= 11 doesn't like 'register' keyword in old exr headers - add_compile_options (-Wno-deprecated-register) - endif () - if (MSVC AND NOT LINKSTATIC) -- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? -+ # add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? - endif () - --if (OPENEXR_VERSION VERSION_GREATER_EQUAL 2.5.99) -+if (OpenEXR_VERSION VERSION_GREATER_EQUAL 2.5.99) - set (OIIO_USING_IMATH 3) - else () - set (OIIO_USING_IMATH 2) -@@ -123,12 +123,15 @@ endif () - - - # JPEG -- prefer Turbo-JPEG to regular libjpeg --checked_find_package (JPEGTurbo -+if (USE_JPEGTURBO) -+ checked_find_package (libjpeg-turbo REQUIRED - DEFINITIONS -DUSE_JPEG_TURBO=1 -- PRINT JPEG_INCLUDES JPEG_INCLUDE_DIRS -- JPEG_LIBRARIES) --if (NOT JPEG_FOUND) # Try to find the non-turbo version -+ 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 -@@ -144,60 +147,83 @@ else () - endif() - - # From pythonutils.cmake --find_python() -+# find_python() - - - ########################################################################### - # 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) -- --checked_find_package (BZip2) # Used by ffmpeg and freetype --if (NOT BZIP2_FOUND) -- set (BZIP2_LIBRARIES "") # TODO: why does it break without this? -+if (USE_LIBPNG) -+ checked_find_package (PNG REQUIRED) - endif () - --checked_find_package (Freetype -+# 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 (HDF5 -+if (USE_HDF5) -+ checked_find_package (HDF5 REQUIRED - ISDEPOF Field3D) --checked_find_package (OpenColorIO -+endif () -+if (USE_OPENCOLORIO) -+ checked_find_package (OpenColorIO REQUIRED - DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1) --checked_find_package (OpenCV -+endif () -+if (USE_OPENCV) -+ checked_find_package (OpenCV REQUIRED - DEFINITIONS -DUSE_OPENCV=1) -+endif () - - # Intel TBB - set (TBB_USE_DEBUG_BUILD OFF) --checked_find_package (TBB 2017 -+if (USE_TBB) -+ checked_find_package (TBB 2017 REQUIRED - DEFINITIONS -DUSE_TBB=1 - PREFER_CONFIG) -+endif () - --checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images --checked_find_package (FFmpeg VERSION_MIN 2.6) --checked_find_package (Field3D -+if (USE_DCMTK) -+ checked_find_package (DCMTK REQUIRED VERSION_MIN 3.6.1) # For DICOM images -+endif () -+if (USE_FFMPEG) -+ checked_find_package (ffmpeg REQUIRED VERSION_MIN 2.6) -+endif () -+if (USE_FIELD3D) -+ checked_find_package (Field3D REQUIRED - DEPS HDF5 - DEFINITIONS -DUSE_FIELD3D=1) --checked_find_package (GIF -+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 -+if (USE_LIBHEIF) -+ checked_find_package (libheif REQUIRED VERSION_MIN 1.3 - RECOMMEND_MIN 1.7 - RECOMMEND_MIN_REASON "for AVIF support") --if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) -+endif () -+if (0) - message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") - set (Libheif_FOUND 0) - endif () - --checked_find_package (LibRaw -+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) --if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) -+ RECOMMEND_MIN_REASON "for ACES support and better camera metadata") -+endif () -+if (0) - 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, -@@ -206,12 +232,15 @@ if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VER - # set (LIBRAW_FOUND 0) - endif () - --checked_find_package (OpenJPEG VERSION_MIN 2.0) -- --checked_find_package (OpenVDB -+if (USE_OPENJPEG) -+ checked_find_package (OpenJPEG REQUIRED VERSION_MIN 2.0) -+endif () -+if (USE_OPENVDB) -+ checked_find_package (OpenVDB REQUIRED - VERSION_MIN 5.0 - DEPS TBB - DEFINITIONS -DUSE_OPENVDB=1) -+endif () - if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 8.0 - AND CMAKE_CXX_STANDARD VERSION_LESS 14) - set (OpenVDB_FOUND OFF) -@@ -225,23 +254,32 @@ if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 8.0 - message (STATUS "${ColorRed}Not using OpenVDB -- OpenVDB ${OpenVDB_VERSION} requires C++14 or later. ${ColorReset}") - endif () - --checked_find_package (Ptex PREFER_CONFIG) --if (NOT Ptex_FOUND OR NOT Ptex_VERSION) -+if (USE_PTEX) -+ checked_find_package (ptex REQUIRED PREFER_CONFIG) -+endif () -+if (0) - # 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 () -- --checked_find_package (WebP) -+if (USE_LIBWEBP) -+ checked_find_package (WebP REQUIRED) -+endif () - - option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) --checked_find_package (R3DSDK) # 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) -+if (USE_NUKE) -+ checked_find_package (Nuke REQUIRED) -+endif () - --checked_find_package (OpenGL) # used for iv -+if (USE_OPENGL) -+ checked_find_package (OpenGL REQUIRED) # used for iv -+endif () - - # Qt -- used for iv - set (qt5_modules Core Gui Widgets) -@@ -249,7 +287,9 @@ if (OPENGL_FOUND) - list (APPEND qt5_modules OpenGL) - endif () - option (USE_QT "Use Qt if found" ON) --checked_find_package (Qt5 COMPONENTS ${qt5_modules}) -+if (USE_QT) -+ checked_find_package (Qt5 REQUIRED COMPONENTS ${qt5_modules}) -+endif () - if (USE_QT AND NOT Qt5_FOUND AND APPLE) - message (STATUS " If you think you installed qt5 with Homebrew and it still doesn't work,") - message (STATUS " try: export PATH=/usr/local/opt/qt5/bin:$PATH") -@@ -270,13 +310,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") -@@ -294,7 +334,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() - - -@@ -304,7 +344,7 @@ endmacro() - option (USE_EMBEDDED_LIBSQUISH - "Force use of embedded Libsquish, even if external is found" OFF) - if (NOT USE_EMBEDDED_LIBSQUISH) -- checked_find_package (Libsquish) -+ checked_find_package (libsquish) - endif () - - -@@ -325,7 +365,7 @@ macro (find_or_download_fmt) - # 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. -- if ((BUILD_MISSING_FMT AND NOT FMT_FOUND) OR BUILD_FMT_FORCE) -+ if ((BUILD_MISSING_FMT AND NOT fmt_FOUND) OR BUILD_FMT_FORCE) - message (STATUS "Downloading local fmtlib/fmt") - set (FMT_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/fmt") - set (FMT_GIT_REPOSITORY "https://github.com/fmtlib/fmt") -diff --git a/src/dds.imageio/CMakeLists.txt b/src/dds.imageio/CMakeLists.txt -index d693453a..7ff6e9ce 100644 ---- a/src/dds.imageio/CMakeLists.txt -+++ b/src/dds.imageio/CMakeLists.txt -@@ -2,10 +2,10 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (Libsquish_FOUND) -+if (libsquish_FOUND) - # External libsquish was found -- use it - add_oiio_plugin (ddsinput.cpp -- LINK_LIBRARIES Libsquish::Libsquish -+ LINK_LIBRARIES libsquish::libsquish - ) - else () - # No external libsquish was found -- use the embedded version. -diff --git a/src/dicom.imageio/CMakeLists.txt b/src/dicom.imageio/CMakeLists.txt -index ddd72044..3603eaa3 100644 ---- a/src/dicom.imageio/CMakeLists.txt -+++ b/src/dicom.imageio/CMakeLists.txt -@@ -4,8 +4,8 @@ - - if (DCMTK_FOUND) - add_oiio_plugin (dicominput.cpp -- INCLUDE_DIRS ${DCMTK_INCLUDE_DIR} -- LINK_LIBRARIES ${DCMTK_LIBRARIES} -+ # INCLUDE_DIRS ${DCMTK_INCLUDE_DIR} -+ LINK_LIBRARIES DCMTK::DCMTK - DEFINITIONS "-DUSE_DCMTK=1") - else () - message (WARNING "DICOM plugin will not be built, no DCMTK") -diff --git a/src/ffmpeg.imageio/CMakeLists.txt b/src/ffmpeg.imageio/CMakeLists.txt -index 614b8843..0df87825 100644 ---- a/src/ffmpeg.imageio/CMakeLists.txt -+++ b/src/ffmpeg.imageio/CMakeLists.txt -@@ -2,13 +2,13 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (FFmpeg_FOUND) -+if (ffmpeg_FOUND) - add_oiio_plugin (ffmpeginput.cpp -- INCLUDE_DIRS ${FFMPEG_INCLUDES} -- LINK_LIBRARIES ${FFMPEG_LIBRARIES} -- ${BZIP2_LIBRARIES} -+ # INCLUDE_DIRS ${FFMPEG_INCLUDES} -+ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale -+ # ${BZIP2_LIBRARIES} - 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 a/src/gif.imageio/CMakeLists.txt b/src/gif.imageio/CMakeLists.txt -index c9e7392c..eda8b482 100644 ---- a/src/gif.imageio/CMakeLists.txt -+++ b/src/gif.imageio/CMakeLists.txt -@@ -4,8 +4,8 @@ - - if (GIF_FOUND) - add_oiio_plugin (gifinput.cpp gifoutput.cpp -- INCLUDE_DIRS ${GIF_INCLUDE_DIRS} -- LINK_LIBRARIES ${GIF_LIBRARIES} -+ # INCLUDE_DIRS ${GIF_INCLUDE_DIRS} -+ LINK_LIBRARIES GIF::GIF - DEFINITIONS "-DUSE_GIF") - else() - message (WARNING "GIF plugin will not be built") -diff --git a/src/heif.imageio/CMakeLists.txt b/src/heif.imageio/CMakeLists.txt -index fed80015..2593f585 100644 ---- a/src/heif.imageio/CMakeLists.txt -+++ b/src/heif.imageio/CMakeLists.txt -@@ -2,9 +2,9 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (Libheif_FOUND) -+if (libheif_FOUND) - add_oiio_plugin (heifinput.cpp heifoutput.cpp -- LINK_LIBRARIES Libheif::Libheif -+ LINK_LIBRARIES libheif::libheif - DEFINITIONS "-DUSE_HEIF=1") - else () - message (WARNING "heif plugin will not be built") -diff --git a/src/igrep/CMakeLists.txt b/src/igrep/CMakeLists.txt -index 3fde566a..adaac8bd 100644 ---- a/src/igrep/CMakeLists.txt -+++ b/src/igrep/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - fancy_add_executable (LINK_LIBRARIES OpenImageIO -- ${Boost_LIBRARIES} # because regex -+ Boost::regex # because regex - ) -diff --git a/src/iinfo/CMakeLists.txt b/src/iinfo/CMakeLists.txt -index 3fde566a..adaac8bd 100644 ---- a/src/iinfo/CMakeLists.txt -+++ b/src/iinfo/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - fancy_add_executable (LINK_LIBRARIES OpenImageIO -- ${Boost_LIBRARIES} # because regex -+ Boost::regex # because regex - ) -diff --git a/src/include/CMakeLists.txt b/src/include/CMakeLists.txt -index 1ea81b64..248e8a25 100644 ---- a/src/include/CMakeLists.txt -+++ b/src/include/CMakeLists.txt -@@ -56,17 +56,20 @@ install (FILES ${detail_headers} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/detail - COMPONENT developer) - -+set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") - set (fmt_headers - ${FMT_INCLUDES}/fmt/core.h - ${FMT_INCLUDES}/fmt/format-inl.h - ${FMT_INCLUDES}/fmt/format.h - ${FMT_INCLUDES}/fmt/ostream.h - ${FMT_INCLUDES}/fmt/printf.h ) -+if (0) - file (COPY ${fmt_headers} - DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) - install (FILES ${fmt_headers} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/detail/fmt - COMPONENT developer) -+endif () - - if (NOT USE_EXTERNAL_PUGIXML) - set (pugixml_headers -diff --git a/src/include/OpenImageIO/strutil.h b/src/include/OpenImageIO/strutil.h -index ed68af14..34b83220 100644 ---- a/src/include/OpenImageIO/strutil.h -+++ b/src/include/OpenImageIO/strutil.h -@@ -41,9 +41,9 @@ - #ifndef FMT_USE_GRISU - # define FMT_USE_GRISU 1 - #endif --#include "detail/fmt/ostream.h" --#include "detail/fmt/format.h" --#include "detail/fmt/printf.h" -+#include -+#include -+#include - #if OIIO_GNUC_VERSION >= 70000 - # pragma GCC diagnostic pop - #endif -diff --git a/src/jpeg.imageio/CMakeLists.txt b/src/jpeg.imageio/CMakeLists.txt -index 15d50cad..83830cd2 100644 ---- a/src/jpeg.imageio/CMakeLists.txt -+++ b/src/jpeg.imageio/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (jpeginput.cpp jpegoutput.cpp -- INCLUDE_DIRS ${JPEG_INCLUDE_DIRS} -- LINK_LIBRARIES ${JPEG_LIBRARIES}) -+ # INCLUDE_DIRS ${JPEG_INCLUDE_DIRS} -+ LINK_LIBRARIES JPEG::JPEG) -diff --git a/src/jpeg2000.imageio/CMakeLists.txt b/src/jpeg2000.imageio/CMakeLists.txt -index 575ed0b7..5644bcf3 100644 ---- a/src/jpeg2000.imageio/CMakeLists.txt -+++ b/src/jpeg2000.imageio/CMakeLists.txt -@@ -2,10 +2,10 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (OPENJPEG_FOUND) -+if (OpenJPEG_FOUND) - add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp -- INCLUDE_DIRS ${OPENJPEG_INCLUDES} -- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} -+ # INCLUDE_DIRS ${OPENJPEG_INCLUDES} -+ LINK_LIBRARIES OpenJPEG::OpenJPEG - DEFINITIONS "-DUSE_OPENJPEG") - else() - message (WARNING "Jpeg-2000 plugin will not be built") -diff --git a/src/libOpenImageIO/CMakeLists.txt b/src/libOpenImageIO/CMakeLists.txt -index 29923b60..77035aa7 100644 ---- a/src/libOpenImageIO/CMakeLists.txt -+++ b/src/libOpenImageIO/CMakeLists.txt -@@ -136,37 +136,42 @@ endif () - target_link_libraries (OpenImageIO - PUBLIC - # For OpenEXR/Imath 3.x: -- $<$:Imath::Imath> -- $<$:Imath::Half> -+ # $<$:Imath::Imath> -+ # $<$:Imath::Half> - # For OpenEXR >= 2.4/2.5 with reliable exported targets -- $<$:IlmBase::Imath> -- $<$:IlmBase::Half> -+ # $<$:IlmBase::Imath> -+ # $<$:IlmBase::Half> - # For OpenEXR <= 2.3: -- ${ILMBASE_LIBRARIES} -+ OpenEXR::OpenEXR - ${GCC_ATOMIC_LIBRARIES} - PRIVATE - # For OpenEXR/Imath 3.x: -- $<$:OpenEXR::OpenEXR> -+ # $<$:OpenEXR::OpenEXR> - # For OpenEXR >= 2.4/2.5 with reliable exported targets -- $<$:OpenEXR::IlmImf> -- $<$:IlmBase::IlmThread> -- $<$:IlmBase::Iex> -+ # $<$:OpenEXR::IlmImf> -+ # $<$:IlmBase::IlmThread> -+ # $<$:IlmBase::Iex> - # For OpenEXR <= 2.3: -- ${OPENEXR_LIBRARIES} -- ${OpenCV_LIBRARIES} -+ # ${OPENEXR_LIBRARIES} -+ # ${OpenCV_LIBRARIES} - ${SANITIZE_LIBRARIES} - ${format_plugin_libs} # Add all the target link libraries from the plugins -+ tsl::robin_map - $<$:OpenColorIO::OpenColorIO> -- $<$:OpenColorIO::OpenColorIOHeaders> -+ # $<$:OpenColorIO::OpenColorIOHeaders> - $<$:pugixml::pugixml> -- ${BZIP2_LIBRARIES} -+ # ${BZIP2_LIBRARIES} - ZLIB::ZLIB -- ${Boost_LIBRARIES} -+ Boost::filesystem Boost::thread Boost::system Boost::container - ${CMAKE_DL_LIBS} - ) - --if (FREETYPE_FOUND) -- target_link_libraries (OpenImageIO PRIVATE ${FREETYPE_LIBRARIES}) -+if (OpenCV_FOUND) -+ target_link_libraries (OpenImageIO PUBLIC opencv::opencv_core opencv::opencv_imgproc opencv::opencv_videoio) -+endif () -+ -+if (Freetype_FOUND) -+ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) - endif() - - if (WIN32) -diff --git a/src/libutil/CMakeLists.txt b/src/libutil/CMakeLists.txt -index 25d76e5c..c1950e81 100644 ---- a/src/libutil/CMakeLists.txt -+++ b/src/libutil/CMakeLists.txt -@@ -14,19 +14,19 @@ target_include_directories (OpenImageIO_Util - target_link_libraries (OpenImageIO_Util - PUBLIC - # For OpenEXR/Imath 3.x: -- $<$:Imath::Imath> -- $<$:Imath::Half> -+ # $<$:Imath::Imath> -+ # $<$:Imath::Half> - # For OpenEXR >= 2.4/2.5 with reliable exported targets -- $<$:IlmBase::Imath> -- $<$:IlmBase::Half> -- $<$:IlmBase::IlmThread> -- $<$:IlmBase::Iex> -+ # $<$:IlmBase::Imath> -+ # $<$:IlmBase::Half> -+ # $<$:IlmBase::IlmThread> -+ # $<$:IlmBase::Iex> - # For OpenEXR <= 2.3: -- ${ILMBASE_LIBRARIES} -+ OpenEXR::OpenEXR - ${GCC_ATOMIC_LIBRARIES} - PRIVATE - ${SANITIZE_LIBRARIES} -- ${Boost_LIBRARIES} -+ Boost::filesystem Boost::thread Boost::system Boost::regex - ${CMAKE_DL_LIBS} - ) - -diff --git a/src/oiiotool/CMakeLists.txt b/src/oiiotool/CMakeLists.txt -index e281d3f8..0fb1b425 100644 ---- a/src/oiiotool/CMakeLists.txt -+++ b/src/oiiotool/CMakeLists.txt -@@ -4,8 +4,8 @@ - - fancy_add_executable (LINK_LIBRARIES - OpenImageIO -- ${Boost_LIBRARIES} # because regex -- $<$:OpenEXR::OpenEXR> -- $<$:OpenEXR::IlmImf> -- ${OPENEXR_LIBRARIES} -+ Boost::regex # because regex -+ # $<$:OpenEXR::OpenEXR> -+ # $<$:OpenEXR::IlmImf> -+ OpenEXR::OpenEXR - ) -diff --git a/src/openexr.imageio/CMakeLists.txt b/src/openexr.imageio/CMakeLists.txt -index 30758836..1a4d2077 100644 ---- a/src/openexr.imageio/CMakeLists.txt -+++ b/src/openexr.imageio/CMakeLists.txt -@@ -3,6 +3,6 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (exrinput.cpp exroutput.cpp -- INCLUDE_DIRS ${OPENEXR_INCLUDES} ${IMATH_INCLUDE_DIR}/OpenEXR -- LINK_LIBRARIES ${OPENEXR_LIBRARIES}) -+ # INCLUDE_DIRS ${OPENEXR_INCLUDES} ${IMATH_INCLUDE_DIR}/OpenEXR -+ LINK_LIBRARIES OpenEXR::OpenEXR) - -diff --git a/src/openvdb.imageio/CMakeLists.txt b/src/openvdb.imageio/CMakeLists.txt -index 57a0f625..34866390 100644 ---- a/src/openvdb.imageio/CMakeLists.txt -+++ b/src/openvdb.imageio/CMakeLists.txt -@@ -2,8 +2,8 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (OpenVDB_FOUND) -+if (OpenVDB_FOUND AND TBB_FOUND) - add_oiio_plugin (openvdbinput.cpp -- INCLUDE_DIRS ${TBB_INCLUDE_DIRS} -- LINK_LIBRARIES OpenVDB::OpenVDB ${TBB_tbb_LIBRARY} ${BOOST_LIBRARIES}) -+ # INCLUDE_DIRS ${TBB_INCLUDE_DIRS} -+ LINK_LIBRARIES OpenVDB::OpenVDB TBB::TBB) - endif() -diff --git a/src/psd.imageio/CMakeLists.txt b/src/psd.imageio/CMakeLists.txt -index 48bf24fb..7e1d9257 100644 ---- a/src/psd.imageio/CMakeLists.txt -+++ b/src/psd.imageio/CMakeLists.txt -@@ -3,6 +3,6 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (psdinput.cpp jpeg_memory_src.cpp -- INCLUDE_DIRS ${JPEG_INCLUDE_DIR} -- LINK_LIBRARIES ${JPEG_LIBRARIES}) -+ # INCLUDE_DIRS ${JPEG_INCLUDE_DIR} -+ LINK_LIBRARIES JPEG::JPEG) - -diff --git a/src/ptex.imageio/CMakeLists.txt b/src/ptex.imageio/CMakeLists.txt -index 2f47527a..1c3c9800 100644 ---- a/src/ptex.imageio/CMakeLists.txt -+++ b/src/ptex.imageio/CMakeLists.txt -@@ -2,8 +2,8 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (Ptex_FOUND) -+if (PTex_FOUND) - add_oiio_plugin (ptexinput.cpp -- LINK_LIBRARIES Ptex::Ptex_dynamic ZLIB::ZLIB -+ LINK_LIBRARIES PTex::PTex ZLIB::ZLIB - DEFINITIONS "-DUSE_PTEX") - endif () -diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt -index d235fd9d..ae229e31 100644 ---- a/src/raw.imageio/CMakeLists.txt -+++ b/src/raw.imageio/CMakeLists.txt -@@ -2,11 +2,11 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (LIBRAW_FOUND) -+if (libraw_FOUND) - add_oiio_plugin (rawinput.cpp -- INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} -- LINK_LIBRARIES ${LibRaw_r_LIBRARIES} -- DEFINITIONS "-DUSE_LIBRAW=1" ${LibRaw_r_DEFINITIONS}) -+ # INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} -+ LINK_LIBRARIES libraw::libraw -+ DEFINITIONS "-DUSE_LIBRAW=1") - else () - message (WARNING "Raw plugin will not be built") - endif () -diff --git a/src/tiff.imageio/CMakeLists.txt b/src/tiff.imageio/CMakeLists.txt -index ab94d56d..05820e8f 100644 ---- a/src/tiff.imageio/CMakeLists.txt -+++ b/src/tiff.imageio/CMakeLists.txt -@@ -3,6 +3,6 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (tiffinput.cpp tiffoutput.cpp -- INCLUDE_DIRS ${TIFF_INCLUDE_DIR} -- LINK_LIBRARIES ${TIFF_LIBRARIES} ${JPEG_LIBRARIES} -+ # INCLUDE_DIRS ${TIFF_INCLUDE_DIR} -+ LINK_LIBRARIES TIFF::TIFF JPEG::JPEG - ZLIB::ZLIB) -diff --git a/src/webp.imageio/CMakeLists.txt b/src/webp.imageio/CMakeLists.txt -index 44462c49..78fe1a58 100644 ---- a/src/webp.imageio/CMakeLists.txt -+++ b/src/webp.imageio/CMakeLists.txt -@@ -4,7 +4,7 @@ - - if (WebP_FOUND) - add_oiio_plugin (webpinput.cpp webpoutput.cpp -- LINK_LIBRARIES WebP::WebP WebP::WebPDemux -+ LINK_LIBRARIES WebP::WebP - DEFINITIONS "-DUSE_WEBP=1") - else () - message (STATUS "WebP plugin will not be built") diff --git a/recipes/openimageio/all/patches/2.2.7.0-cmake-targets.patch b/recipes/openimageio/all/patches/2.2.7.0-cmake-targets.patch deleted file mode 100644 index 7e2a6e4da94b3..0000000000000 --- a/recipes/openimageio/all/patches/2.2.7.0-cmake-targets.patch +++ /dev/null @@ -1,673 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 447c6170..702fb50b 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -99,7 +99,7 @@ message(STATUS "Setting Namespace to: ${PROJ_NAMESPACE_V}") - - - list (APPEND CMAKE_MODULE_PATH -- "${PROJECT_SOURCE_DIR}/src/cmake/modules" -+ # "${PROJECT_SOURCE_DIR}/src/cmake/modules" - "${PROJECT_SOURCE_DIR}/src/cmake") - - include (GNUInstallDirs) -@@ -172,7 +172,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 a/src/cmake/compiler.cmake b/src/cmake/compiler.cmake -index 12a8e819..46c1d0f8 100644 ---- a/src/cmake/compiler.cmake -+++ b/src/cmake/compiler.cmake -@@ -88,7 +88,7 @@ if (NOT MSVC) - add_compile_options ("-Wextra") - endif () - if (STOP_ON_WARNING OR DEFINED ENV{CI}) -- add_compile_options ("-Werror") -+ # add_compile_options ("-Werror") - # N.B. Force CI builds (Travis defines $CI) to use -Werror, even if - # STOP_ON_WARNING has been switched off by default, which we may do - # in release branches. -diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake -index 03d521dc..9fe73388 100644 ---- a/src/cmake/externalpackages.cmake -+++ b/src/cmake/externalpackages.cmake -@@ -39,7 +39,7 @@ if (LINKSTATIC) - endif () - else () - if (MSVC) -- add_definitions (-DBOOST_ALL_DYN_LINK=1) -+ # add_definitions (-DBOOST_ALL_DYN_LINK=1) - endif () - endif () - if (BOOST_CUSTOM) -@@ -89,23 +89,27 @@ checked_find_package (OpenEXR 2.0 REQUIRED - RECOMMEND_MIN 2.2 - RECOMMEND_MIN_REASON "for DWA compression") - # We use Imath so commonly, may as well include it everywhere. --include_directories ("${OPENEXR_INCLUDES}" "${ILMBASE_INCLUDES}" -- "${ILMBASE_INCLUDES}/OpenEXR") --if (CMAKE_COMPILER_IS_CLANG AND OPENEXR_VERSION VERSION_LESS 2.3) -+# include_directories ("${OPENEXR_INCLUDES}" "${ILMBASE_INCLUDES}" -+# "${ILMBASE_INCLUDES}/OpenEXR") -+if (CMAKE_COMPILER_IS_CLANG AND OpenEXR_VERSION VERSION_LESS 2.3) - # clang C++ >= 11 doesn't like 'register' keyword in old exr headers - add_compile_options (-Wno-deprecated-register) - endif () - if (MSVC AND NOT LINKSTATIC) -- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? -+ # add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? - endif () - - - # JPEG -- prefer Turbo-JPEG to regular libjpeg --checked_find_package (JPEGTurbo -+if (USE_JPEGTURBO) -+ checked_find_package (libjpeg-turbo REQUIRED - DEFINITIONS -DUSE_JPEG_TURBO=1 -- PRINT JPEG_INCLUDES JPEG_LIBRARIES) --if (NOT JPEG_FOUND) # Try to find the non-turbo version -+ 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 -@@ -123,56 +127,93 @@ 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) -- --checked_find_package (BZip2) # Used by ffmpeg and freetype --if (NOT BZIP2_FOUND) -- set (BZIP2_LIBRARIES "") # TODO: why does it break without this? -+if (USE_LIBPNG) -+ checked_find_package (PNG REQUIRED) - endif () - --checked_find_package (Freetype -+# 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 (HDF5 -+if (USE_HDF5) -+ checked_find_package (HDF5 REQUIRED - ISDEPOF Field3D) --checked_find_package (OpenColorIO -+endif () -+if (USE_OPENCOLORIO) -+ checked_find_package (OpenColorIO REQUIRED - DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1) --checked_find_package (OpenCV -+endif () -+if (USE_OPENCV) -+ checked_find_package (OpenCV REQUIRED - DEFINITIONS -DUSE_OPENCV=1) -+endif () - - # Intel TBB - set (TBB_USE_DEBUG_BUILD OFF) --checked_find_package (TBB 2017 -+if (USE_TBB) -+ checked_find_package (TBB 2017 REQUIRED - DEFINITIONS -DUSE_TBB=1 - ISDEPOF OpenVDB) -+endif () - --checked_find_package (DCMTK 3.6.1) # For DICOM images --checked_find_package (FFmpeg 2.6) --checked_find_package (Field3D -+if (USE_DCMTK) -+ checked_find_package (DCMTK 3.6.1 REQUIRED) # For DICOM images -+endif () -+if (USE_FFMPEG) -+ checked_find_package (ffmpeg 2.6 REQUIRED) -+endif () -+if (USE_FIELD3D) -+ checked_find_package (Field3D REQUIRED - DEPS HDF5 - DEFINITIONS -DUSE_FIELD3D=1) --checked_find_package (GIF 4 -+endif () -+if (USE_GIF) -+ checked_find_package (GIF 4 REQUIRED - RECOMMEND_MIN 5.0 - RECOMMEND_MIN_REASON "for stability and thread safety") --checked_find_package (Libheif 1.3) # For HEIF/HEIC format --checked_find_package (LibRaw -- PRINT LibRaw_r_LIBRARIES -+endif () -+if (USE_LIBHEIF) -+ checked_find_package (libheif 1.3 REQUIRED) # For HEIF/HEIC format -+endif () -+if (USE_LIBRAW) -+ checked_find_package (libraw REQUIRED - RECOMMEND_MIN 0.18 - RECOMMEND_MIN_REASON "for ACES support") --checked_find_package (OpenJpeg 2.0) --checked_find_package (OpenVDB 5.0 -+endif () -+if (USE_OPENJPEG) -+ checked_find_package (OpenJPEG 2.0 REQUIRED) -+endif () -+if (USE_OPENVDB) -+ checked_find_package (OpenVDB 5.0 REQUIRED - DEPS TBB - DEFINITIONS -DUSE_OPENVDB=1) --checked_find_package (PTex) --checked_find_package (Webp) -+endif () -+if (USE_PTEX) -+ checked_find_package (ptex REQUIRED) -+endif () -+if (USE_LIBWEBP) -+ checked_find_package (WebP REQUIRED) -+endif () - - option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) --checked_find_package (R3DSDK) # 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) -+if (USE_NUKE) -+ checked_find_package (Nuke REQUIRED) -+endif () - --checked_find_package (OpenGL) # used for iv -+if (USE_OPENGL) -+ checked_find_package (OpenGL REQUIRED) # used for iv -+endif () - - # Qt -- used for iv - set (qt5_modules Core Gui Widgets) -@@ -180,7 +221,9 @@ if (OPENGL_FOUND) - list (APPEND qt5_modules OpenGL) - endif () - option (USE_QT "Use Qt if found" ON) --checked_find_package (Qt5 COMPONENTS ${qt5_modules}) -+if (USE_QT) -+ checked_find_package (Qt5 REQUIRED COMPONENTS ${qt5_modules}) -+endif () - if (USE_QT AND NOT Qt5_FOUND AND APPLE) - message (STATUS " If you think you installed qt5 with Homebrew and it still doesn't work,") - message (STATUS " try: export PATH=/usr/local/opt/qt5/bin:$PATH") -@@ -201,13 +244,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") -@@ -225,7 +268,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() - - -@@ -235,7 +278,7 @@ endmacro() - option (USE_EMBEDDED_LIBSQUISH - "Force use of embedded Libsquish, even if external is found" OFF) - if (NOT USE_EMBEDDED_LIBSQUISH) -- checked_find_package (Libsquish) -+ checked_find_package (libsquish REQUIRED) - endif () - - -@@ -251,12 +294,12 @@ 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 - # download and build it. -- if ((BUILD_MISSING_FMT AND NOT FMT_FOUND) OR BUILD_FMT_FORCE) -+ if ((BUILD_MISSING_FMT AND NOT fmt_FOUND) OR BUILD_FMT_FORCE) - message (STATUS "Downloading local fmtlib/fmt") - set (FMT_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/fmt") - set (FMT_GIT_REPOSITORY "https://github.com/fmtlib/fmt") -diff --git a/src/dds.imageio/CMakeLists.txt b/src/dds.imageio/CMakeLists.txt -index d693453a..7ff6e9ce 100644 ---- a/src/dds.imageio/CMakeLists.txt -+++ b/src/dds.imageio/CMakeLists.txt -@@ -2,10 +2,10 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (Libsquish_FOUND) -+if (libsquish_FOUND) - # External libsquish was found -- use it - add_oiio_plugin (ddsinput.cpp -- LINK_LIBRARIES Libsquish::Libsquish -+ LINK_LIBRARIES libsquish::libsquish - ) - else () - # No external libsquish was found -- use the embedded version. -diff --git a/src/dicom.imageio/CMakeLists.txt b/src/dicom.imageio/CMakeLists.txt -index ddd72044..3603eaa3 100644 ---- a/src/dicom.imageio/CMakeLists.txt -+++ b/src/dicom.imageio/CMakeLists.txt -@@ -4,8 +4,8 @@ - - if (DCMTK_FOUND) - add_oiio_plugin (dicominput.cpp -- INCLUDE_DIRS ${DCMTK_INCLUDE_DIR} -- LINK_LIBRARIES ${DCMTK_LIBRARIES} -+ # INCLUDE_DIRS ${DCMTK_INCLUDE_DIR} -+ LINK_LIBRARIES DCMTK::DCMTK - DEFINITIONS "-DUSE_DCMTK=1") - else () - message (WARNING "DICOM plugin will not be built, no DCMTK") -diff --git a/src/dpx.imageio/CMakeLists.txt b/src/dpx.imageio/CMakeLists.txt -index 858beb9d..dd169af4 100644 ---- a/src/dpx.imageio/CMakeLists.txt -+++ b/src/dpx.imageio/CMakeLists.txt -@@ -6,4 +6,4 @@ add_oiio_plugin (dpxinput.cpp dpxoutput.cpp - libdpx/DPX.cpp libdpx/OutStream.cpp libdpx/RunLengthEncoding.cpp - libdpx/Codec.cpp libdpx/Reader.cpp libdpx/Writer.cpp libdpx/DPXHeader.cpp - libdpx/ElementReadStream.cpp libdpx/InStream.cpp libdpx/DPXColorConverter.cpp -- LINK_LIBRARIES ${OPENEXR_LIBRARIES}) -+ LINK_LIBRARIES OpenEXR::OpenEXR) -diff --git a/src/ffmpeg.imageio/CMakeLists.txt b/src/ffmpeg.imageio/CMakeLists.txt -index 6cf07636..d3bb5f61 100644 ---- a/src/ffmpeg.imageio/CMakeLists.txt -+++ b/src/ffmpeg.imageio/CMakeLists.txt -@@ -11,11 +11,11 @@ if (NOT MSVC) - PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations") - endif() - --if (FFmpeg_FOUND) -+if (ffmpeg_FOUND) - add_oiio_plugin (ffmpeginput.cpp -- INCLUDE_DIRS ${FFMPEG_INCLUDES} -- LINK_LIBRARIES ${FFMPEG_LIBRARIES} -- ${BZIP2_LIBRARIES} -+ # INCLUDE_DIRS ${FFMPEG_INCLUDES} -+ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale -+ # ${BZIP2_LIBRARIES} - DEFINITIONS "-DUSE_FFMPEG") - else() - message (STATUS "FFmpeg not found: ffmpeg plugin will not be built") -diff --git a/src/gif.imageio/CMakeLists.txt b/src/gif.imageio/CMakeLists.txt -index c9e7392c..eda8b482 100644 ---- a/src/gif.imageio/CMakeLists.txt -+++ b/src/gif.imageio/CMakeLists.txt -@@ -4,8 +4,8 @@ - - if (GIF_FOUND) - add_oiio_plugin (gifinput.cpp gifoutput.cpp -- INCLUDE_DIRS ${GIF_INCLUDE_DIRS} -- LINK_LIBRARIES ${GIF_LIBRARIES} -+ # INCLUDE_DIRS ${GIF_INCLUDE_DIRS} -+ LINK_LIBRARIES GIF::GIF - DEFINITIONS "-DUSE_GIF") - else() - message (WARNING "GIF plugin will not be built") -diff --git a/src/heif.imageio/CMakeLists.txt b/src/heif.imageio/CMakeLists.txt -index fed80015..2593f585 100644 ---- a/src/heif.imageio/CMakeLists.txt -+++ b/src/heif.imageio/CMakeLists.txt -@@ -2,9 +2,9 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (Libheif_FOUND) -+if (libheif_FOUND) - add_oiio_plugin (heifinput.cpp heifoutput.cpp -- LINK_LIBRARIES Libheif::Libheif -+ LINK_LIBRARIES libheif::libheif - DEFINITIONS "-DUSE_HEIF=1") - else () - message (WARNING "heif plugin will not be built") -diff --git a/src/ico.imageio/CMakeLists.txt b/src/ico.imageio/CMakeLists.txt -index 5a46174d..a8919f63 100644 ---- a/src/ico.imageio/CMakeLists.txt -+++ b/src/ico.imageio/CMakeLists.txt -@@ -4,8 +4,8 @@ - - if (PNG_FOUND) - add_oiio_plugin (icoinput.cpp icooutput.cpp -- INCLUDE_DIRS ${PNG_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} -- LINK_LIBRARIES ${PNG_LIBRARIES} ${ZLIB_LIBRARIES}) -+ # INCLUDE_DIRS ${PNG_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} -+ LINK_LIBRARIES PNG::PNG ZLIB::ZLIB) - else () - message (WARNING "libpng not found, so ICO support will not work") - set (format_plugin_definitions ${format_plugin_definitions} DISABLE_ICO=1 PARENT_SCOPE) -diff --git a/src/igrep/CMakeLists.txt b/src/igrep/CMakeLists.txt -index 3fde566a..adaac8bd 100644 ---- a/src/igrep/CMakeLists.txt -+++ b/src/igrep/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - fancy_add_executable (LINK_LIBRARIES OpenImageIO -- ${Boost_LIBRARIES} # because regex -+ Boost::regex # because regex - ) -diff --git a/src/iinfo/CMakeLists.txt b/src/iinfo/CMakeLists.txt -index 3fde566a..adaac8bd 100644 ---- a/src/iinfo/CMakeLists.txt -+++ b/src/iinfo/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - fancy_add_executable (LINK_LIBRARIES OpenImageIO -- ${Boost_LIBRARIES} # because regex -+ Boost::regex # because regex - ) -diff --git a/src/include/CMakeLists.txt b/src/include/CMakeLists.txt -index a60b3b21..050911c8 100644 ---- a/src/include/CMakeLists.txt -+++ b/src/include/CMakeLists.txt -@@ -44,17 +44,20 @@ install (FILES ${public_headers} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} - COMPONENT developer) - -+set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") - set (fmt_headers - ${FMT_INCLUDES}/fmt/core.h - ${FMT_INCLUDES}/fmt/format-inl.h - ${FMT_INCLUDES}/fmt/format.h - ${FMT_INCLUDES}/fmt/ostream.h - ${FMT_INCLUDES}/fmt/printf.h ) -+if (0) - file (COPY ${fmt_headers} - DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) - install (FILES ${fmt_headers} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/detail/fmt - COMPONENT developer) -+endif () - - if (NOT USE_EXTERNAL_PUGIXML) - set (pugixml_headers -diff --git a/src/include/OpenImageIO/strutil.h b/src/include/OpenImageIO/strutil.h -index db356f03..003df7f8 100644 ---- a/src/include/OpenImageIO/strutil.h -+++ b/src/include/OpenImageIO/strutil.h -@@ -39,9 +39,9 @@ - #ifndef FMT_USE_GRISU - # define FMT_USE_GRISU 1 - #endif --#include "detail/fmt/ostream.h" --#include "detail/fmt/format.h" --#include "detail/fmt/printf.h" -+#include -+#include -+#include - #if OIIO_GNUC_VERSION >= 70000 - # pragma GCC diagnostic pop - #endif -diff --git a/src/jpeg.imageio/CMakeLists.txt b/src/jpeg.imageio/CMakeLists.txt -index 548faeb7..95e4feb5 100644 ---- a/src/jpeg.imageio/CMakeLists.txt -+++ b/src/jpeg.imageio/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (jpeginput.cpp jpegoutput.cpp -- INCLUDE_DIRS ${JPEG_INCLUDE_DIR} -- LINK_LIBRARIES ${JPEG_LIBRARIES}) -+ # INCLUDE_DIRS ${JPEG_INCLUDE_DIR} -+ LINK_LIBRARIES JPEG::JPEG) -diff --git a/src/jpeg2000.imageio/CMakeLists.txt b/src/jpeg2000.imageio/CMakeLists.txt -index 575ed0b7..5644bcf3 100644 ---- a/src/jpeg2000.imageio/CMakeLists.txt -+++ b/src/jpeg2000.imageio/CMakeLists.txt -@@ -2,10 +2,10 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (OPENJPEG_FOUND) -+if (OpenJPEG_FOUND) - add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp -- INCLUDE_DIRS ${OPENJPEG_INCLUDES} -- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} -+ # INCLUDE_DIRS ${OPENJPEG_INCLUDES} -+ LINK_LIBRARIES OpenJPEG::OpenJPEG - DEFINITIONS "-DUSE_OPENJPEG") - else() - message (WARNING "Jpeg-2000 plugin will not be built") -diff --git a/src/libOpenImageIO/CMakeLists.txt b/src/libOpenImageIO/CMakeLists.txt -index fe39cdd4..b877cc4d 100644 ---- a/src/libOpenImageIO/CMakeLists.txt -+++ b/src/libOpenImageIO/CMakeLists.txt -@@ -135,31 +135,33 @@ endif () - - target_link_libraries (OpenImageIO - PUBLIC -- ${ILMBASE_LIBRARIES} -- ${OPENEXR_LIBRARIES} -- ${OpenCV_LIBRARIES} -+ OpenEXR::OpenEXR -+ $<$:OpenColorIO::OpenColorIO> - ${GCC_ATOMIC_LIBRARIES} - PRIVATE - ${SANITIZE_LIBRARIES} - ${format_plugin_libs} # Add all the target link libraries from the plugins -- $<$:OpenColorIO::OpenColorIO> -- ${BZIP2_LIBRARIES} -- ${ZLIB_LIBRARIES} -- ${Boost_LIBRARIES} -+ tsl::robin_map -+ ZLIB::ZLIB -+ Boost::Boost - ${CMAKE_DL_LIBS} - ) - -+if (OpenCV_FOUND) -+ target_link_libraries (OpenImageIO PUBLIC opencv::opencv_core opencv::opencv_imgproc opencv::opencv_videoio) -+endif () -+ - if (USE_EXTERNAL_PUGIXML) -- if(TARGET pugixml) -- target_link_libraries (OpenImageIO PRIVATE pugixml) -+ if(pugixml_FOUND) -+ target_link_libraries (OpenImageIO PRIVATE pugixml::pugixml) - else() - target_include_directories (OpenImageIO PRIVATE ${PUGIXML_INCLUDES}) - target_link_libraries (OpenImageIO PRIVATE ${PUGIXML_LIBRARIES}) - endif() - endif() - --if (FREETYPE_FOUND) -- target_link_libraries (OpenImageIO PRIVATE ${FREETYPE_LIBRARIES}) -+if (Freetype_FOUND) -+ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) - endif() - - if (WIN32) -diff --git a/src/libutil/CMakeLists.txt b/src/libutil/CMakeLists.txt -index 083b077c..4cdd4e6b 100644 ---- a/src/libutil/CMakeLists.txt -+++ b/src/libutil/CMakeLists.txt -@@ -13,11 +13,11 @@ target_include_directories (OpenImageIO_Util - ) - target_link_libraries (OpenImageIO_Util - PUBLIC -- ${ILMBASE_LIBRARIES} -+ OpenEXR::OpenEXR - ${GCC_ATOMIC_LIBRARIES} - PRIVATE - ${SANITIZE_LIBRARIES} -- ${Boost_LIBRARIES} -+ Boost::Boost - ${CMAKE_DL_LIBS} - ) - -diff --git a/src/oiiotool/CMakeLists.txt b/src/oiiotool/CMakeLists.txt -index 3fde566a..adaac8bd 100644 ---- a/src/oiiotool/CMakeLists.txt -+++ b/src/oiiotool/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - fancy_add_executable (LINK_LIBRARIES OpenImageIO -- ${Boost_LIBRARIES} # because regex -+ Boost::regex # because regex - ) -diff --git a/src/openexr.imageio/CMakeLists.txt b/src/openexr.imageio/CMakeLists.txt -index 3226eb13..bf8e0358 100644 ---- a/src/openexr.imageio/CMakeLists.txt -+++ b/src/openexr.imageio/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (exrinput.cpp exroutput.cpp -- LINK_LIBRARIES ${OPENEXR_LIBRARIES}) -+ LINK_LIBRARIES OpenEXR::OpenEXR) - -diff --git a/src/openvdb.imageio/CMakeLists.txt b/src/openvdb.imageio/CMakeLists.txt -index 57a0f625..61dc2459 100644 ---- a/src/openvdb.imageio/CMakeLists.txt -+++ b/src/openvdb.imageio/CMakeLists.txt -@@ -2,8 +2,8 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (OpenVDB_FOUND) -+if (OpenVDB_FOUND AND TBB_FOUND) - add_oiio_plugin (openvdbinput.cpp -- INCLUDE_DIRS ${TBB_INCLUDE_DIRS} -- LINK_LIBRARIES OpenVDB::OpenVDB ${TBB_tbb_LIBRARY} ${BOOST_LIBRARIES}) -+ # INCLUDE_DIRS ${TBB_INCLUDE_DIRS} -+ LINK_LIBRARIES OpenVDB::OpenVDB TBB::TBB Boost::Boost) - endif() -diff --git a/src/png.imageio/CMakeLists.txt b/src/png.imageio/CMakeLists.txt -index be2724f2..ac16da21 100644 ---- a/src/png.imageio/CMakeLists.txt -+++ b/src/png.imageio/CMakeLists.txt -@@ -4,8 +4,8 @@ - - if (PNG_FOUND) - add_oiio_plugin (pnginput.cpp pngoutput.cpp -- INCLUDE_DIRS ${PNG_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} -- LINK_LIBRARIES ${PNG_LIBRARIES} ${ZLIB_LIBRARIES}) -+ # INCLUDE_DIRS ${PNG_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} -+ LINK_LIBRARIES PNG::PNG ZLIB::ZLIB) - else () - message (WARNING "libpng not found, so PNG support will not work") - set (format_plugin_definitions ${format_plugin_definitions} DISABLE_PNG=1 PARENT_SCOPE) -diff --git a/src/psd.imageio/CMakeLists.txt b/src/psd.imageio/CMakeLists.txt -index 48bf24fb..7e1d9257 100644 ---- a/src/psd.imageio/CMakeLists.txt -+++ b/src/psd.imageio/CMakeLists.txt -@@ -3,6 +3,6 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (psdinput.cpp jpeg_memory_src.cpp -- INCLUDE_DIRS ${JPEG_INCLUDE_DIR} -- LINK_LIBRARIES ${JPEG_LIBRARIES}) -+ # INCLUDE_DIRS ${JPEG_INCLUDE_DIR} -+ LINK_LIBRARIES JPEG::JPEG) - -diff --git a/src/ptex.imageio/CMakeLists.txt b/src/ptex.imageio/CMakeLists.txt -index 912081b1..6039fc58 100644 ---- a/src/ptex.imageio/CMakeLists.txt -+++ b/src/ptex.imageio/CMakeLists.txt -@@ -2,9 +2,9 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (PTEX_FOUND) -+if (PTex_FOUND) - add_oiio_plugin (ptexinput.cpp -- INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} ${PTEX_INCLUDE_DIR} -- LINK_LIBRARIES ${PTEX_LIBRARIES} ${ZLIB_LIBRARIES} -+ # INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} ${PTEX_INCLUDE_DIR} -+ LINK_LIBRARIES PTex::PTex ZLIB::ZLIB - DEFINITIONS "-DUSE_PTEX") - endif () -diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt -index 81a0ff54..ae229e31 100644 ---- a/src/raw.imageio/CMakeLists.txt -+++ b/src/raw.imageio/CMakeLists.txt -@@ -2,10 +2,10 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (LIBRAW_FOUND) -+if (libraw_FOUND) - add_oiio_plugin (rawinput.cpp -- INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} -- LINK_LIBRARIES ${LibRaw_r_LIBRARIES} -+ # INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} -+ LINK_LIBRARIES libraw::libraw - DEFINITIONS "-DUSE_LIBRAW=1") - else () - message (WARNING "Raw plugin will not be built") -diff --git a/src/tiff.imageio/CMakeLists.txt b/src/tiff.imageio/CMakeLists.txt -index f6d648c8..385607c9 100644 ---- a/src/tiff.imageio/CMakeLists.txt -+++ b/src/tiff.imageio/CMakeLists.txt -@@ -3,6 +3,6 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (tiffinput.cpp tiffoutput.cpp -- INCLUDE_DIRS ${TIFF_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS} -- LINK_LIBRARIES ${TIFF_LIBRARIES} ${JPEG_LIBRARIES} -- ${ZLIB_LIBRARIES}) -+ # INCLUDE_DIRS ${TIFF_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS} -+ LINK_LIBRARIES TIFF::TIFF JPEG::JPEG -+ ZLIB::ZLIB) -diff --git a/src/webp.imageio/CMakeLists.txt b/src/webp.imageio/CMakeLists.txt -index 9e01bd7f..78fe1a58 100644 ---- a/src/webp.imageio/CMakeLists.txt -+++ b/src/webp.imageio/CMakeLists.txt -@@ -2,9 +2,9 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (Webp_FOUND) -+if (WebP_FOUND) - add_oiio_plugin (webpinput.cpp webpoutput.cpp -- LINK_LIBRARIES Webp::Webp -+ LINK_LIBRARIES WebP::WebP - DEFINITIONS "-DUSE_WEBP=1") - else () - message (STATUS "WebP plugin will not be built") -diff --git a/src/zfile.imageio/CMakeLists.txt b/src/zfile.imageio/CMakeLists.txt -index 36a7ad99..c8fd99d3 100644 ---- a/src/zfile.imageio/CMakeLists.txt -+++ b/src/zfile.imageio/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (zfile.cpp -- INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} -- LINK_LIBRARIES ${ZLIB_LIBRARIES}) -+ # INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} -+ LINK_LIBRARIES ZLIB::ZLIB) diff --git a/recipes/openimageio/all/patches/2.3.7.2-cmake-targets.patch b/recipes/openimageio/all/patches/2.3.7.2-cmake-targets.patch deleted file mode 100644 index ba213765c8530..0000000000000 --- a/recipes/openimageio/all/patches/2.3.7.2-cmake-targets.patch +++ /dev/null @@ -1,710 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 54fe7d9c..97a1b8e4 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -111,7 +111,7 @@ message(STATUS "Setting Namespace to: ${PROJ_NAMESPACE_V}") - - - list (APPEND CMAKE_MODULE_PATH -- "${PROJECT_SOURCE_DIR}/src/cmake/modules" -+ # "${PROJECT_SOURCE_DIR}/src/cmake/modules" - "${PROJECT_SOURCE_DIR}/src/cmake") - - include (GNUInstallDirs) -@@ -191,7 +191,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 a/src/cmake/compiler.cmake b/src/cmake/compiler.cmake -index 2a513f58..13568140 100644 ---- a/src/cmake/compiler.cmake -+++ b/src/cmake/compiler.cmake -@@ -92,7 +92,7 @@ if (NOT MSVC) - add_compile_options ("-Wextra") - endif () - if (STOP_ON_WARNING OR DEFINED ENV{CI}) -- add_compile_options ("-Werror") -+ #add_compile_options ("-Werror") - # N.B. Force CI builds to use -Werror, even if STOP_ON_WARNING has - # been switched off by default, which we may do in release - # branches. -diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake -index 957abe34..885becbf 100644 ---- a/src/cmake/externalpackages.cmake -+++ b/src/cmake/externalpackages.cmake -@@ -46,7 +46,7 @@ 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) -+ # add_definitions (-DBOOST_ALL_DYN_LINK=1) - endif () - endif () - -@@ -55,7 +55,7 @@ if (BOOST_CUSTOM) - # N.B. For a custom version, the caller had better set up the variables - # Boost_VERSION, Boost_INCLUDE_DIRS, Boost_LIBRARY_DIRS, Boost_LIBRARIES. - else () -- set (Boost_COMPONENTS filesystem system thread) -+ set (Boost_COMPONENTS filesystem system thread container) - # The FindBoost.cmake interface is broken if it uses boost's installed - # cmake output (e.g. boost 1.70.0, cmake <= 3.14). Specifically it fails - # to set the expected variables printed below. So until that's fixed -@@ -103,16 +103,16 @@ checked_find_package (OpenEXR REQUIRED - # library. This shoudn't be necessary, except for the common case of people - # 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 (CMAKE_COMPILER_IS_CLANG AND OPENEXR_VERSION VERSION_LESS 2.3) -+# include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) -+if (CMAKE_COMPILER_IS_CLANG AND OpenEXR_VERSION VERSION_LESS 2.3) - # clang C++ >= 11 doesn't like 'register' keyword in old exr headers - add_compile_options (-Wno-deprecated-register) - endif () - if (MSVC AND NOT LINKSTATIC) -- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? -+ # add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? - endif () - --if (OPENEXR_VERSION VERSION_GREATER_EQUAL 2.5.99) -+if (OpenEXR_VERSION VERSION_GREATER_EQUAL 2.5.99) - set (OIIO_USING_IMATH 3) - else () - set (OIIO_USING_IMATH 2) -@@ -120,12 +120,15 @@ endif () - - - # JPEG -- prefer Turbo-JPEG to regular libjpeg --checked_find_package (JPEGTurbo -+if (USE_JPEGTURBO) -+ checked_find_package (libjpeg-turbo REQUIRED - DEFINITIONS -DUSE_JPEG_TURBO=1 -- PRINT JPEG_INCLUDES JPEG_INCLUDE_DIRS -- JPEG_LIBRARIES) --if (NOT JPEG_FOUND) # Try to find the non-turbo version -+ 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 -@@ -141,62 +144,85 @@ else () - endif() - - # From pythonutils.cmake --find_python() -+# find_python() - - - ########################################################################### - # 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) -- --checked_find_package (BZip2) # Used by ffmpeg and freetype --if (NOT BZIP2_FOUND) -- set (BZIP2_LIBRARIES "") # TODO: why does it break without this? -+if (USE_LIBPNG) -+ checked_find_package (PNG REQUIRED) - endif () - --checked_find_package (Freetype -+# 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 (HDF5 -+if (USE_HDF5) -+ checked_find_package (HDF5 REQUIRED - ISDEPOF Field3D) --checked_find_package (OpenColorIO -+endif () -+if (USE_OPENCOLORIO) -+ checked_find_package (OpenColorIO REQUIRED - DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 - # PREFER_CONFIG - ) --checked_find_package (OpenCV 3.0 -+endif () -+if (USE_OPENCV) -+ checked_find_package (OpenCV 3.0 REQUIRED - DEFINITIONS -DUSE_OPENCV=1) -+endif () - - # Intel TBB - set (TBB_USE_DEBUG_BUILD OFF) --checked_find_package (TBB 2017 -+if (USE_TBB) -+ checked_find_package (TBB 2017 REQUIRED - DEFINITIONS -DUSE_TBB=1 - PREFER_CONFIG) -+endif () - --checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images --checked_find_package (FFmpeg VERSION_MIN 3.0) --checked_find_package (Field3D -+if (USE_DCMTK) -+ checked_find_package (DCMTK REQUIRED VERSION_MIN 3.6.1) # For DICOM images -+endif () -+if (USE_FFMPEG) -+ checked_find_package (ffmpeg REQUIRED VERSION_MIN 3.0) -+endif () -+if (USE_FIELD3D) -+ checked_find_package (Field3D REQUIRED - DEPS HDF5 - DEFINITIONS -DUSE_FIELD3D=1) --checked_find_package (GIF -+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 -+if (USE_LIBHEIF) -+ checked_find_package (libheif REQUIRED VERSION_MIN 1.3 - RECOMMEND_MIN 1.7 - RECOMMEND_MIN_REASON "for AVIF support") --if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) -+endif () -+if (0) - message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") - set (Libheif_FOUND 0) - endif () - --checked_find_package (LibRaw -+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) --if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) -+ RECOMMEND_MIN_REASON "for ACES support and better camera metadata") -+endif () -+if (0) - 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, -@@ -205,30 +231,43 @@ if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VER - # set (LIBRAW_FOUND 0) - endif () - --checked_find_package (OpenJPEG VERSION_MIN 2.0) -- --checked_find_package (OpenVDB -+if (USE_OPENJPEG) -+ checked_find_package (OpenJPEG REQUIRED VERSION_MIN 2.0) -+endif () -+if (USE_OPENVDB) -+ checked_find_package (OpenVDB REQUIRED - VERSION_MIN 5.0 - DEPS TBB - DEFINITIONS -DUSE_OPENVDB=1) -+endif () - --checked_find_package (Ptex PREFER_CONFIG) --if (NOT Ptex_FOUND OR NOT Ptex_VERSION) -+if (USE_PTEX) -+ checked_find_package (ptex REQUIRED PREFER_CONFIG) -+endif () -+if (0) - # 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 () - --checked_find_package (WebP) -+if (USE_LIBWEBP) -+ checked_find_package (WebP REQUIRED) -+endif () - - option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) --checked_find_package (R3DSDK) # 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) -+if (USE_NUKE) -+ checked_find_package (Nuke REQUIRED) -+endif () - --checked_find_package (OpenGL) # used for iv -+if (USE_OPENGL) -+ checked_find_package (OpenGL REQUIRED) # used for iv -+endif () - - # Qt -- used for iv - set (qt5_modules Core Gui Widgets) -@@ -236,7 +275,9 @@ if (OPENGL_FOUND) - list (APPEND qt5_modules OpenGL) - endif () - option (USE_QT "Use Qt if found" ON) --checked_find_package (Qt5 COMPONENTS ${qt5_modules}) -+if (USE_QT) -+ checked_find_package (Qt5 REQUIRED COMPONENTS ${qt5_modules}) -+endif () - if (USE_QT AND NOT Qt5_FOUND AND APPLE) - message (STATUS " If you think you installed qt5 with Homebrew and it still doesn't work,") - message (STATUS " try: export PATH=/usr/local/opt/qt5/bin:$PATH") -@@ -257,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") -@@ -281,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() - - -@@ -291,7 +332,7 @@ endmacro() - option (USE_EMBEDDED_LIBSQUISH - "Force use of embedded Libsquish, even if external is found" OFF) - if (NOT USE_EMBEDDED_LIBSQUISH) -- checked_find_package (Libsquish) -+ checked_find_package (libsquish REQUIRED) - endif () - - -@@ -307,12 +348,12 @@ 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 - # download and build it. -- if ((BUILD_MISSING_FMT AND NOT FMT_FOUND) OR BUILD_FMT_FORCE) -+ if ((BUILD_MISSING_FMT AND NOT fmt_FOUND) OR BUILD_FMT_FORCE) - message (STATUS "Downloading local fmtlib/fmt") - set (FMT_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/fmt") - set (FMT_GIT_REPOSITORY "https://github.com/fmtlib/fmt") -diff --git a/src/dds.imageio/CMakeLists.txt b/src/dds.imageio/CMakeLists.txt -index d693453a..7ff6e9ce 100644 ---- a/src/dds.imageio/CMakeLists.txt -+++ b/src/dds.imageio/CMakeLists.txt -@@ -2,10 +2,10 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (Libsquish_FOUND) -+if (libsquish_FOUND) - # External libsquish was found -- use it - add_oiio_plugin (ddsinput.cpp -- LINK_LIBRARIES Libsquish::Libsquish -+ LINK_LIBRARIES libsquish::libsquish - ) - else () - # No external libsquish was found -- use the embedded version. -diff --git a/src/dicom.imageio/CMakeLists.txt b/src/dicom.imageio/CMakeLists.txt -index ddd72044..3603eaa3 100644 ---- a/src/dicom.imageio/CMakeLists.txt -+++ b/src/dicom.imageio/CMakeLists.txt -@@ -4,8 +4,8 @@ - - if (DCMTK_FOUND) - add_oiio_plugin (dicominput.cpp -- INCLUDE_DIRS ${DCMTK_INCLUDE_DIR} -- LINK_LIBRARIES ${DCMTK_LIBRARIES} -+ # INCLUDE_DIRS ${DCMTK_INCLUDE_DIR} -+ LINK_LIBRARIES DCMTK::DCMTK - DEFINITIONS "-DUSE_DCMTK=1") - else () - message (WARNING "DICOM plugin will not be built, no DCMTK") -diff --git a/src/ffmpeg.imageio/CMakeLists.txt b/src/ffmpeg.imageio/CMakeLists.txt -index 614b8843..0df87825 100644 ---- a/src/ffmpeg.imageio/CMakeLists.txt -+++ b/src/ffmpeg.imageio/CMakeLists.txt -@@ -2,13 +2,13 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (FFmpeg_FOUND) -+if (ffmpeg_FOUND) - add_oiio_plugin (ffmpeginput.cpp -- INCLUDE_DIRS ${FFMPEG_INCLUDES} -- LINK_LIBRARIES ${FFMPEG_LIBRARIES} -- ${BZIP2_LIBRARIES} -+ # INCLUDE_DIRS ${FFMPEG_INCLUDES} -+ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale -+ # ${BZIP2_LIBRARIES} - 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 a/src/gif.imageio/CMakeLists.txt b/src/gif.imageio/CMakeLists.txt -index c9e7392c..eda8b482 100644 ---- a/src/gif.imageio/CMakeLists.txt -+++ b/src/gif.imageio/CMakeLists.txt -@@ -4,8 +4,8 @@ - - if (GIF_FOUND) - add_oiio_plugin (gifinput.cpp gifoutput.cpp -- INCLUDE_DIRS ${GIF_INCLUDE_DIRS} -- LINK_LIBRARIES ${GIF_LIBRARIES} -+ # INCLUDE_DIRS ${GIF_INCLUDE_DIRS} -+ LINK_LIBRARIES GIF::GIF - DEFINITIONS "-DUSE_GIF") - else() - message (WARNING "GIF plugin will not be built") -diff --git a/src/heif.imageio/CMakeLists.txt b/src/heif.imageio/CMakeLists.txt -index fed80015..2593f585 100644 ---- a/src/heif.imageio/CMakeLists.txt -+++ b/src/heif.imageio/CMakeLists.txt -@@ -2,9 +2,9 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (Libheif_FOUND) -+if (libheif_FOUND) - add_oiio_plugin (heifinput.cpp heifoutput.cpp -- LINK_LIBRARIES Libheif::Libheif -+ LINK_LIBRARIES libheif::libheif - DEFINITIONS "-DUSE_HEIF=1") - else () - message (WARNING "heif plugin will not be built") -diff --git a/src/igrep/CMakeLists.txt b/src/igrep/CMakeLists.txt -index 3fde566a..49f063a8 100644 ---- a/src/igrep/CMakeLists.txt -+++ b/src/igrep/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - fancy_add_executable (LINK_LIBRARIES OpenImageIO -- ${Boost_LIBRARIES} # because regex -+ #${Boost_LIBRARIES} # because regex - ) -diff --git a/src/iinfo/CMakeLists.txt b/src/iinfo/CMakeLists.txt -index 3fde566a..49f063a8 100644 ---- a/src/iinfo/CMakeLists.txt -+++ b/src/iinfo/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - fancy_add_executable (LINK_LIBRARIES OpenImageIO -- ${Boost_LIBRARIES} # because regex -+ #${Boost_LIBRARIES} # because regex - ) -diff --git a/src/include/CMakeLists.txt b/src/include/CMakeLists.txt -index 1ea81b64..248e8a25 100644 ---- a/src/include/CMakeLists.txt -+++ b/src/include/CMakeLists.txt -@@ -56,17 +56,20 @@ install (FILES ${detail_headers} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/detail - COMPONENT developer) - -+set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") - set (fmt_headers - ${FMT_INCLUDES}/fmt/core.h - ${FMT_INCLUDES}/fmt/format-inl.h - ${FMT_INCLUDES}/fmt/format.h - ${FMT_INCLUDES}/fmt/ostream.h - ${FMT_INCLUDES}/fmt/printf.h ) -+if (0) - file (COPY ${fmt_headers} - DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) - install (FILES ${fmt_headers} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/detail/fmt - COMPONENT developer) -+endif () - - if (NOT USE_EXTERNAL_PUGIXML) - set (pugixml_headers -diff --git a/src/include/OpenImageIO/strutil.h b/src/include/OpenImageIO/strutil.h -index 030d80a9..d6e768a3 100644 ---- a/src/include/OpenImageIO/strutil.h -+++ b/src/include/OpenImageIO/strutil.h -@@ -41,9 +41,9 @@ - #ifndef FMT_USE_GRISU - # define FMT_USE_GRISU 1 - #endif --#include "detail/fmt/ostream.h" --#include "detail/fmt/format.h" --#include "detail/fmt/printf.h" -+#include -+#include -+#include - #if OIIO_GNUC_VERSION >= 70000 - # pragma GCC diagnostic pop - #endif -diff --git a/src/jpeg.imageio/CMakeLists.txt b/src/jpeg.imageio/CMakeLists.txt -index 15d50cad..83830cd2 100644 ---- a/src/jpeg.imageio/CMakeLists.txt -+++ b/src/jpeg.imageio/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (jpeginput.cpp jpegoutput.cpp -- INCLUDE_DIRS ${JPEG_INCLUDE_DIRS} -- LINK_LIBRARIES ${JPEG_LIBRARIES}) -+ # INCLUDE_DIRS ${JPEG_INCLUDE_DIRS} -+ LINK_LIBRARIES JPEG::JPEG) -diff --git a/src/jpeg2000.imageio/CMakeLists.txt b/src/jpeg2000.imageio/CMakeLists.txt -index 575ed0b7..5644bcf3 100644 ---- a/src/jpeg2000.imageio/CMakeLists.txt -+++ b/src/jpeg2000.imageio/CMakeLists.txt -@@ -2,10 +2,10 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (OPENJPEG_FOUND) -+if (OpenJPEG_FOUND) - add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp -- INCLUDE_DIRS ${OPENJPEG_INCLUDES} -- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} -+ # INCLUDE_DIRS ${OPENJPEG_INCLUDES} -+ LINK_LIBRARIES OpenJPEG::OpenJPEG - DEFINITIONS "-DUSE_OPENJPEG") - else() - message (WARNING "Jpeg-2000 plugin will not be built") -diff --git a/src/libOpenImageIO/CMakeLists.txt b/src/libOpenImageIO/CMakeLists.txt -index 1e34593d..103c89de 100644 ---- a/src/libOpenImageIO/CMakeLists.txt -+++ b/src/libOpenImageIO/CMakeLists.txt -@@ -123,37 +123,42 @@ target_link_libraries (OpenImageIO - PUBLIC - OpenImageIO_Util - # For OpenEXR/Imath 3.x: -- $<$:Imath::Imath> -- $<$:Imath::Half> -+ # $<$:Imath::Imath> -+ # $<$:Imath::Half> - # For OpenEXR >= 2.4/2.5 with reliable exported targets -- $<$:IlmBase::Imath> -- $<$:IlmBase::Half> -+ # $<$:IlmBase::Imath> -+ # $<$:IlmBase::Half> - # For OpenEXR <= 2.3: -- ${ILMBASE_LIBRARIES} -+ OpenEXR::OpenEXR - ${GCC_ATOMIC_LIBRARIES} - PRIVATE - # For OpenEXR/Imath 3.x: -- $<$:OpenEXR::OpenEXR> -+ # $<$:OpenEXR::OpenEXR> - # For OpenEXR >= 2.4/2.5 with reliable exported targets -- $<$:OpenEXR::IlmImf> -- $<$:IlmBase::IlmThread> -- $<$:IlmBase::Iex> -+ # $<$:OpenEXR::IlmImf> -+ # $<$:IlmBase::IlmThread> -+ # $<$:IlmBase::Iex> - # For OpenEXR <= 2.3: -- ${OPENEXR_LIBRARIES} -- ${OpenCV_LIBRARIES} -+ # ${OPENEXR_LIBRARIES} -+ # ${OpenCV_LIBRARIES} - ${SANITIZE_LIBRARIES} - ${format_plugin_libs} # Add all the target link libraries from the plugins -+ tsl::robin_map - $<$:OpenColorIO::OpenColorIO> -- $<$:OpenColorIO::OpenColorIOHeaders> -+ # $<$:OpenColorIO::OpenColorIOHeaders> - $<$:pugixml::pugixml> -- ${BZIP2_LIBRARIES} -+ # ${BZIP2_LIBRARIES} - ZLIB::ZLIB -- ${Boost_LIBRARIES} -+ Boost::filesystem Boost::thread Boost::system Boost::container - ${CMAKE_DL_LIBS} - ) - --if (FREETYPE_FOUND) -- target_link_libraries (OpenImageIO PRIVATE ${FREETYPE_LIBRARIES}) -+if (OpenCV_FOUND) -+ target_link_libraries (OpenImageIO PUBLIC opencv::opencv_core opencv::opencv_imgproc opencv::opencv_videoio) -+endif () -+ -+if (Freetype_FOUND) -+ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) - endif() - - if (WIN32) -diff --git a/src/libutil/CMakeLists.txt b/src/libutil/CMakeLists.txt -index 7de38836..3e1609ad 100644 ---- a/src/libutil/CMakeLists.txt -+++ b/src/libutil/CMakeLists.txt -@@ -14,19 +14,19 @@ target_include_directories (OpenImageIO_Util - target_link_libraries (OpenImageIO_Util - PUBLIC - # For OpenEXR/Imath 3.x: -- $<$:Imath::Imath> -- $<$:Imath::Half> -+ # $<$:Imath::Imath> -+ # $<$:Imath::Half> - # For OpenEXR >= 2.4/2.5 with reliable exported targets -- $<$:IlmBase::Imath> -- $<$:IlmBase::Half> -- $<$:IlmBase::IlmThread> -- $<$:IlmBase::Iex> -+ # $<$:IlmBase::Imath> -+ # $<$:IlmBase::Half> -+ # $<$:IlmBase::IlmThread> -+ # $<$:IlmBase::Iex> - # For OpenEXR <= 2.3: -- ${ILMBASE_LIBRARIES} -+ OpenEXR::OpenEXR - ${GCC_ATOMIC_LIBRARIES} - PRIVATE - ${SANITIZE_LIBRARIES} -- ${Boost_LIBRARIES} -+ Boost::filesystem Boost::thread Boost::system - ${CMAKE_DL_LIBS} - ) - -diff --git a/src/oiiotool/CMakeLists.txt b/src/oiiotool/CMakeLists.txt -index e281d3f8..4ee92aad 100644 ---- a/src/oiiotool/CMakeLists.txt -+++ b/src/oiiotool/CMakeLists.txt -@@ -4,8 +4,8 @@ - - fancy_add_executable (LINK_LIBRARIES - OpenImageIO -- ${Boost_LIBRARIES} # because regex -- $<$:OpenEXR::OpenEXR> -- $<$:OpenEXR::IlmImf> -- ${OPENEXR_LIBRARIES} -+ Boost::container -+ # $<$:OpenEXR::OpenEXR> -+ # $<$:OpenEXR::IlmImf> -+ OpenEXR::OpenEXR - ) -diff --git a/src/openexr.imageio/CMakeLists.txt b/src/openexr.imageio/CMakeLists.txt -index d4772880..9f5f8998 100644 ---- a/src/openexr.imageio/CMakeLists.txt -+++ b/src/openexr.imageio/CMakeLists.txt -@@ -12,7 +12,7 @@ if (OIIO_USE_EXR_C_API) - LINK_LIBRARIES OpenEXR::OpenEXRCore) - else() - add_oiio_plugin (exrinput.cpp exroutput.cpp -- INCLUDE_DIRS ${OPENEXR_INCLUDES} ${IMATH_INCLUDE_DIR}/OpenEXR -- LINK_LIBRARIES ${OPENEXR_LIBRARIES}) -+ #INCLUDE_DIRS ${OPENEXR_INCLUDES} ${IMATH_INCLUDE_DIR}/OpenEXR -+ LINK_LIBRARIES OpenEXR::OpenEXR) - endif() - -diff --git a/src/openvdb.imageio/CMakeLists.txt b/src/openvdb.imageio/CMakeLists.txt -index 57a0f625..986f9c21 100644 ---- a/src/openvdb.imageio/CMakeLists.txt -+++ b/src/openvdb.imageio/CMakeLists.txt -@@ -2,8 +2,8 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (OpenVDB_FOUND) -+if (OpenVDB_FOUND AND TBB_FOUND) - add_oiio_plugin (openvdbinput.cpp - INCLUDE_DIRS ${TBB_INCLUDE_DIRS} -- LINK_LIBRARIES OpenVDB::OpenVDB ${TBB_tbb_LIBRARY} ${BOOST_LIBRARIES}) -+ LINK_LIBRARIES OpenVDB::OpenVDB TBB::TBB) - endif() -diff --git a/src/psd.imageio/CMakeLists.txt b/src/psd.imageio/CMakeLists.txt -index 48bf24fb..a5acecfd 100644 ---- a/src/psd.imageio/CMakeLists.txt -+++ b/src/psd.imageio/CMakeLists.txt -@@ -3,6 +3,6 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (psdinput.cpp jpeg_memory_src.cpp -- INCLUDE_DIRS ${JPEG_INCLUDE_DIR} -- LINK_LIBRARIES ${JPEG_LIBRARIES}) -+ #INCLUDE_DIRS ${JPEG_INCLUDE_DIR} -+ LINK_LIBRARIES JPEG::JPEG) - -diff --git a/src/ptex.imageio/CMakeLists.txt b/src/ptex.imageio/CMakeLists.txt -index 2f47527a..1c3c9800 100644 ---- a/src/ptex.imageio/CMakeLists.txt -+++ b/src/ptex.imageio/CMakeLists.txt -@@ -2,8 +2,8 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (Ptex_FOUND) -+if (PTex_FOUND) - add_oiio_plugin (ptexinput.cpp -- LINK_LIBRARIES Ptex::Ptex_dynamic ZLIB::ZLIB -+ LINK_LIBRARIES PTex::PTex ZLIB::ZLIB - DEFINITIONS "-DUSE_PTEX") - endif () -diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt -index d235fd9d..6661a2a8 100644 ---- a/src/raw.imageio/CMakeLists.txt -+++ b/src/raw.imageio/CMakeLists.txt -@@ -4,9 +4,9 @@ - - if (LIBRAW_FOUND) - add_oiio_plugin (rawinput.cpp -- INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} -- LINK_LIBRARIES ${LibRaw_r_LIBRARIES} -- DEFINITIONS "-DUSE_LIBRAW=1" ${LibRaw_r_DEFINITIONS}) -+ #INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} -+ LINK_LIBRARIES libraw::libraw -+ DEFINITIONS "-DUSE_LIBRAW=1") - else () - message (WARNING "Raw plugin will not be built") - endif () -diff --git a/src/tiff.imageio/CMakeLists.txt b/src/tiff.imageio/CMakeLists.txt -index ab94d56d..99ee19ae 100644 ---- a/src/tiff.imageio/CMakeLists.txt -+++ b/src/tiff.imageio/CMakeLists.txt -@@ -3,6 +3,6 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (tiffinput.cpp tiffoutput.cpp -- INCLUDE_DIRS ${TIFF_INCLUDE_DIR} -- LINK_LIBRARIES ${TIFF_LIBRARIES} ${JPEG_LIBRARIES} -+ #INCLUDE_DIRS ${TIFF_INCLUDE_DIR} -+ LINK_LIBRARIES TIFF::TIFF JPEG::JPEG - ZLIB::ZLIB) -diff --git a/src/webp.imageio/CMakeLists.txt b/src/webp.imageio/CMakeLists.txt -index 44462c49..78fe1a58 100644 ---- a/src/webp.imageio/CMakeLists.txt -+++ b/src/webp.imageio/CMakeLists.txt -@@ -4,7 +4,7 @@ - - if (WebP_FOUND) - add_oiio_plugin (webpinput.cpp webpoutput.cpp -- LINK_LIBRARIES WebP::WebP WebP::WebPDemux -+ LINK_LIBRARIES WebP::WebP - DEFINITIONS "-DUSE_WEBP=1") - else () - message (STATUS "WebP plugin will not be built") diff --git a/recipes/openimageio/all/patches/2.4.17.0-cmake-targets.patch b/recipes/openimageio/all/patches/2.4.17.0-cmake-targets.patch new file mode 100644 index 0000000000000..dc76e283d97aa --- /dev/null +++ b/recipes/openimageio/all/patches/2.4.17.0-cmake-targets.patch @@ -0,0 +1,456 @@ +diff --git CMakeLists.txt CMakeLists.txt +index a5a6de1c5..f1801af5a 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -144,7 +144,7 @@ message(STATUS "Setting Namespace to: ${PROJ_NAMESPACE_V}") + 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) +@@ -224,7 +224,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 a4f895c07..f55da37cb 100644 +--- src/cmake/externalpackages.cmake ++++ src/cmake/externalpackages.cmake +@@ -45,14 +45,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 () +@@ -108,9 +108,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 () +@@ -141,12 +141,15 @@ set (OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH OFF CACHE BOOL + "Exclude find_dependency(Imath) from the exported OpenImageIOConfig.cmake") + + # JPEG -- prefer Turbo-JPEG to regular libjpeg +-checked_find_package (JPEGTurbo +- DEFINITIONS -DUSE_JPEG_TURBO=1 +- PRINT JPEG_INCLUDES JPEG_INCLUDE_DIRS +- JPEG_LIBRARIES JPEG_VERSION) +-if (NOT JPEG_FOUND) # Try to find the non-turbo version ++if (USE_JPEGTURBO) ++ checked_find_package (JPEGTurbo ++ 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 +@@ -162,106 +165,110 @@ else () + endif() + + # From pythonutils.cmake +-find_python() ++#find_python() + + + ########################################################################### + # 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) +- +-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_LIBPNG) ++ checked_find_package (PNG) ++endif() + +-checked_find_package (Freetype +- DEFINITIONS -DUSE_FREETYPE=1 ) ++if (USE_FREETYPE) ++ checked_find_package (Freetype ++ DEFINITIONS -DUSE_FREETYPE=1 ) ++endif() + +-checked_find_package (OpenColorIO +- DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 +- # PREFER_CONFIG +- ) +-if (NOT OpenColorIO_FOUND) +- set (OpenColorIO_FOUND 0) +-endif () +-checked_find_package (OpenCV 3.0 +- DEFINITIONS -DUSE_OPENCV=1) ++if (USE_OPENCOLORIO) ++ checked_find_package (OpenColorIO ++ DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 ++ # PREFER_CONFIG ++ ) ++ if (NOT OpenColorIO_FOUND) ++ set (OpenColorIO_FOUND 0) ++ endif () ++endif() ++if (USE_OPENCV) ++ checked_find_package (OpenCV 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) +- +-checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images +-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_TBB)# Intel TBB ++ set (TBB_USE_DEBUG_BUILD OFF) ++ checked_find_package (TBB 2017 ++ SETVARIABLES OIIO_TBB ++ PREFER_CONFIG) ++endif() ++if (USE_DCMTK) ++ checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images ++endif() ++if (USE_FFMPEG) ++ checked_find_package (ffmpeg VERSION_MIN 3.0) ++endif() ++if (USE_GIF) ++ checked_find_package (GIF ++ 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.7 +- RECOMMEND_MIN_REASON "for AVIF 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 () +- +-checked_find_package (LibRaw +- RECOMMEND_MIN 0.18 +- RECOMMEND_MIN_REASON "for ACES support and better camera metadata" +- 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_LIBHEIF) ++ checked_find_package (libheif REQUIRED VERSION_MIN 1.3 ++ RECOMMEND_MIN 1.7 ++ RECOMMEND_MIN_REASON "for AVIF support") ++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 (OpeVDB_FOUND 0) +-endif () ++if (USE_LIBRAW) ++ checked_find_package (LibRaw ++ RECOMMEND_MIN 0.18 ++ RECOMMEND_MIN_REASON "for ACES support and better camera metadata" ++ PRINT LibRaw_r_LIBRARIES) ++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_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() ++if (USE_OPENVDB) ++ checked_find_package (OpenVDB REQUIRED ++ VERSION_MIN 5.0 ++ DEPS TBB ++ DEFINITIONS -DUSE_OPENVDB=1) ++endif() + +-checked_find_package (WebP) ++if (USE_PTEX) ++ checked_find_package (ptex 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) # 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) ++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) +@@ -285,13 +291,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") +@@ -309,7 +315,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() + + +@@ -331,7 +337,7 @@ macro (find_or_download_fmt) + # 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. +- if ((BUILD_MISSING_FMT AND NOT FMT_FOUND) OR BUILD_FMT_FORCE) ++ if ((BUILD_MISSING_FMT AND NOT fmt_FOUND) OR BUILD_FMT_FORCE) + message (STATUS "Downloading local fmtlib/fmt") + set (FMT_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/fmt") + set (FMT_GIT_REPOSITORY "https://github.com/fmtlib/fmt") +diff --git src/ffmpeg.imageio/CMakeLists.txt src/ffmpeg.imageio/CMakeLists.txt +index 100d4d773..ec7e01884 100644 +--- src/ffmpeg.imageio/CMakeLists.txt ++++ src/ffmpeg.imageio/CMakeLists.txt +@@ -2,13 +2,11 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (FFmpeg_FOUND) ++if (USE_FFMPEG) + 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 eed740900..72aaaff86 100644 +--- src/heif.imageio/CMakeLists.txt ++++ src/heif.imageio/CMakeLists.txt +@@ -2,10 +2,10 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Libheif_FOUND) ++if (USE_LIBHEIF) + add_oiio_plugin (heifinput.cpp heifoutput.cpp +- INCLUDE_DIRS ${LIBHEIF_INCLUDES} +- LINK_LIBRARIES ${LIBHEIF_LIBRARIES} ++ #INCLUDE_DIRS ${LIBHEIF_INCLUDES} ++ 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 006cb65a7..2e2c2c2ea 100644 +--- src/include/CMakeLists.txt ++++ src/include/CMakeLists.txt +@@ -65,6 +65,7 @@ install (FILES ${detail_headers} + COMPONENT developer) + + if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) ++ set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") + set (fmt_headers + ${FMT_INCLUDES}/fmt/core.h + ${FMT_INCLUDES}/fmt/format-inl.h +@@ -74,8 +75,8 @@ if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) + if (fmt_VERSION VERSION_GREATER_EQUAL 90000) + list (APPEND fmt_headers ${FMT_INCLUDES}/fmt/std.h) + endif () +- file (COPY ${fmt_headers} +- DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) ++ # file (COPY ${fmt_headers} ++ # DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) + else () + set (fmt_headers + ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt/format.h +diff --git src/include/OpenImageIO/detail/fmt.h src/include/OpenImageIO/detail/fmt.h +index 31a986d31..9a7e5ce54 100644 +--- src/include/OpenImageIO/detail/fmt.h ++++ src/include/OpenImageIO/detail/fmt.h +@@ -55,9 +55,9 @@ OIIO_PRAGMA_WARNING_PUSH + # pragma GCC diagnostic ignored "-Wtautological-constant-compare" + #endif + +-#include +-#include +-#include ++#include ++#include ++#include + + OIIO_PRAGMA_WARNING_POP + +diff --git src/jpeg2000.imageio/CMakeLists.txt src/jpeg2000.imageio/CMakeLists.txt +index 560e8d486..94b5cd2dc 100644 +--- src/jpeg2000.imageio/CMakeLists.txt ++++ src/jpeg2000.imageio/CMakeLists.txt +@@ -4,8 +4,7 @@ + + if (OPENJPEG_FOUND) + 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 772b39ff2..898fb2be6 100644 +--- src/libOpenImageIO/CMakeLists.txt ++++ src/libOpenImageIO/CMakeLists.txt +@@ -141,12 +141,17 @@ target_link_libraries (OpenImageIO + $ + ${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 PUBLIC opencv::opencv_core opencv::opencv_imgproc opencv::opencv_videoio) ++endif () ++ +-if (FREETYPE_FOUND) +- target_link_libraries (OpenImageIO PRIVATE ${FREETYPE_LIBRARIES}) ++if (USE_FREETYPE) ++ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) + endif() + + if (WIN32) +diff --git src/libutil/CMakeLists.txt src/libutil/CMakeLists.txt +index 8933bfe5b..3970eb0c3 100644 +--- src/libutil/CMakeLists.txt ++++ src/libutil/CMakeLists.txt +@@ -20,8 +20,8 @@ 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} + ) +diff --git src/ptex.imageio/CMakeLists.txt src/ptex.imageio/CMakeLists.txt +index ed42f1c94..82d2b9770 100644 +--- src/ptex.imageio/CMakeLists.txt ++++ src/ptex.imageio/CMakeLists.txt +@@ -2,8 +2,9 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Ptex_FOUND) ++if (USE_PTEX) + add_oiio_plugin (ptexinput.cpp +- LINK_LIBRARIES Ptex::Ptex_dynamic ZLIB::ZLIB ++ LINK_LIBRARIES ${ptex_LIBRARIES} ZLIB::ZLIB ++ INCLUDE_DIRS ${ptex_INCLUDE_DIRS} + DEFINITIONS "-DUSE_PTEX") + endif () diff --git a/recipes/openimageio/all/patches/2.4.7.1-cmake-targets.patch b/recipes/openimageio/all/patches/2.4.7.1-cmake-targets.patch index c909b13a27c9e..c560e5020256a 100644 --- a/recipes/openimageio/all/patches/2.4.7.1-cmake-targets.patch +++ b/recipes/openimageio/all/patches/2.4.7.1-cmake-targets.patch @@ -155,7 +155,7 @@ index 48e871418..21f709b1d 100644 # For HEIF/HEIC/AVIF formats -checked_find_package (Libheif VERSION_MIN 1.3 +if (USE_LIBHEIF) -+checked_find_package (libheif VERSION_MIN 1.3 ++checked_find_package (libheif REQUIRED VERSION_MIN 1.3 RECOMMEND_MIN 1.7 RECOMMEND_MIN_REASON "for AVIF support") -if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) @@ -299,6 +299,24 @@ index 58402060e..5dea82369 100644 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 ece763a27..83abdea66 100644 +--- src/heif.imageio/CMakeLists.txt ++++ src/heif.imageio/CMakeLists.txt +@@ -2,10 +2,10 @@ + # SPDX-License-Identifier: BSD-3-Clause + # https://github.com/OpenImageIO/oiio + +-if (Libheif_FOUND) ++if (USE_LIBHEIF) + add_oiio_plugin (heifinput.cpp heifoutput.cpp +- INCLUDE_DIRS ${LIBHEIF_INCLUDES} +- LINK_LIBRARIES ${LIBHEIF_LIBRARIES} ++ #INCLUDE_DIRS ${LIBHEIF_INCLUDES} ++ LINK_LIBRARIES libheif::heif + DEFINITIONS "-DUSE_HEIF=1") + else () + message (WARNING "heif plugin will not be built") diff --git a/src/include/CMakeLists.txt b/src/include/CMakeLists.txt index 52b0936a6..611eadb4e 100644 --- a/src/include/CMakeLists.txt @@ -348,7 +366,7 @@ index 1f47269bf..85b90d66a 100644 add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp - INCLUDE_DIRS ${OPENJPEG_INCLUDES} - LINK_LIBRARIES ${OPENJPEG_LIBRARIES} -+ LINK_LIBRARIES OpenJPEG::OpenJPEG ++ LINK_LIBRARIES openjp2 DEFINITIONS "-DUSE_OPENJPEG") else() message (WARNING "Jpeg-2000 plugin will not be built") @@ -356,11 +374,12 @@ diff --git a/src/libOpenImageIO/CMakeLists.txt b/src/libOpenImageIO/CMakeLists.t index 456aab81a..eb5bb00fc 100644 --- a/src/libOpenImageIO/CMakeLists.txt +++ b/src/libOpenImageIO/CMakeLists.txt -@@ -141,10 +141,14 @@ target_link_libraries (OpenImageIO +@@ -141,12 +141,17 @@ target_link_libraries (OpenImageIO $ ${BZIP2_LIBRARIES} ZLIB::ZLIB - $ ++ tsl::robin_map + Boost::filesystem Boost::thread Boost::system Boost::container ${CMAKE_DL_LIBS} ) @@ -370,15 +389,21 @@ index 456aab81a..eb5bb00fc 100644 +endif () + if (FREETYPE_FOUND) - target_link_libraries (OpenImageIO PRIVATE ${FREETYPE_LIBRARIES}) +- target_link_libraries (OpenImageIO PRIVATE ${FREETYPE_LIBRARIES}) ++ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) endif() + + if (WIN32) diff --git a/src/libutil/CMakeLists.txt b/src/libutil/CMakeLists.txt index 09b9139d0..a2d39982e 100644 --- a/src/libutil/CMakeLists.txt +++ b/src/libutil/CMakeLists.txt -@@ -17,8 +17,7 @@ target_link_libraries (OpenImageIO_Util +@@ -15,8 +15,8 @@ target_link_libraries (OpenImageIO_Util + $ + ${GCC_ATOMIC_LIBRARIES} ${OPENIMAGEIO_IMATH_DEPENDENCY_VISIBILITY} ${OPENIMAGEIO_IMATH_TARGETS} ++ fmt::fmt PRIVATE - $ - $ @@ -390,7 +415,7 @@ diff --git a/src/ptex.imageio/CMakeLists.txt b/src/ptex.imageio/CMakeLists.txt index d7f0a9582..7cfce4a35 100644 --- a/src/ptex.imageio/CMakeLists.txt +++ b/src/ptex.imageio/CMakeLists.txt -@@ -2,8 +2,8 @@ +@@ -2,8 +2,9 @@ # SPDX-License-Identifier: BSD-3-Clause # https://github.com/OpenImageIO/oiio @@ -398,6 +423,7 @@ index d7f0a9582..7cfce4a35 100644 +if (ptex_FOUND) add_oiio_plugin (ptexinput.cpp - LINK_LIBRARIES Ptex::Ptex_dynamic ZLIB::ZLIB -+ LINK_LIBRARIES Ptex::Ptex ZLIB::ZLIB ++ LINK_LIBRARIES ${ptex_LIBRARIES} ZLIB::ZLIB ++ INCLUDE_DIRS ${ptex_INCLUDE_DIRS} DEFINITIONS "-DUSE_PTEX") endif () diff --git a/recipes/openimageio/all/patches/2.5.6.0-cmake-targets.patch b/recipes/openimageio/all/patches/2.5.6.0-cmake-targets.patch new file mode 100644 index 0000000000000..8563d86fcb7db --- /dev/null +++ b/recipes/openimageio/all/patches/2.5.6.0-cmake-targets.patch @@ -0,0 +1,515 @@ +diff --git CMakeLists.txt CMakeLists.txt +index 1ae61f6ae..5c4202395 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) +@@ -234,7 +234,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 3cfaedd57..f75fee7a3 100644 +--- src/cmake/externalpackages.cmake ++++ src/cmake/externalpackages.cmake +@@ -45,14 +45,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 () +@@ -108,9 +108,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 () +@@ -137,11 +137,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 (JPEGTurbo 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 +@@ -157,112 +161,110 @@ else () + endif() + + # From pythonutils.cmake +-find_python() ++#find_python() + + + ########################################################################### + # 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 ++ 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) ++if (USE_OPENCOLORIO) ++ checked_find_package (OpenColorIO ++ DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 ++ # PREFER_CONFIG ++ ) ++ if (NOT OpenColorIO_FOUND) ++ set (OpenColorIO_FOUND 0) + endif () +-else () +- set (OpenColorIO_FOUND 0) +-endif () +- +-checked_find_package (OpenCV 3.0 +- DEFINITIONS -DUSE_OPENCV=1) ++endif() ++if (USE_OPENCV) ++ checked_find_package (OpenCV 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) +- +-checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images +-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_TBB)# Intel TBB ++ set (TBB_USE_DEBUG_BUILD OFF) ++ checked_find_package (TBB 2017 ++ SETVARIABLES OIIO_TBB ++ PREFER_CONFIG) ++endif() ++if (USE_DCMTK) ++ checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images ++endif() ++if (USE_FFMPEG) ++ checked_find_package (ffmpeg VERSION_MIN 3.0) ++endif() ++if (USE_GIF) ++ checked_find_package (GIF ++ 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.7 +- RECOMMEND_MIN_REASON "for AVIF 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 () +- +-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_LIBHEIF) ++ checked_find_package (libheif REQUIRED VERSION_MIN 1.3 ++ RECOMMEND_MIN 1.7 ++ RECOMMEND_MIN_REASON "for AVIF support") ++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 (OpeVDB_FOUND 0) +-endif () ++if (USE_LIBRAW) ++ checked_find_package (LibRaw ++ RECOMMEND_MIN 0.18 ++ RECOMMEND_MIN_REASON "for ACES support and better camera metadata" ++ PRINT LibRaw_r_LIBRARIES) ++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_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() ++if (USE_OPENVDB) ++ checked_find_package (OpenVDB REQUIRED ++ VERSION_MIN 5.0 ++ DEPS TBB ++ DEFINITIONS -DUSE_OPENVDB=1) ++endif() + +-checked_find_package (WebP) ++if (USE_PTEX) ++ checked_find_package (ptex 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) # 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) ++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) +@@ -286,13 +288,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") +@@ -310,7 +312,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() + + +@@ -332,7 +334,7 @@ macro (find_or_download_fmt) + # 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. +- if ((BUILD_MISSING_FMT AND NOT FMT_FOUND) OR BUILD_FMT_FORCE) ++ if ((BUILD_MISSING_FMT AND NOT fmt_FOUND) OR BUILD_FMT_FORCE) + message (STATUS "Downloading local fmtlib/fmt") + set (FMT_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/fmt") + set (FMT_GIT_REPOSITORY "https://github.com/fmtlib/fmt") +diff --git src/ffmpeg.imageio/CMakeLists.txt src/ffmpeg.imageio/CMakeLists.txt +index 8e47a8443..e1a1987fe 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..17b0243a1 100644 +--- src/heif.imageio/CMakeLists.txt ++++ src/heif.imageio/CMakeLists.txt +@@ -2,32 +2,32 @@ + # 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} ++ #INCLUDE_DIRS ${LIBHEIF_INCLUDES} ++ 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 006cb65a7..a4ecf23c7 100644 +--- src/include/CMakeLists.txt ++++ src/include/CMakeLists.txt +@@ -65,6 +65,7 @@ install (FILES ${detail_headers} + COMPONENT developer) + + if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) ++ set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") + set (fmt_headers + ${FMT_INCLUDES}/fmt/core.h + ${FMT_INCLUDES}/fmt/format-inl.h +@@ -74,8 +75,8 @@ if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) + if (fmt_VERSION VERSION_GREATER_EQUAL 90000) + list (APPEND fmt_headers ${FMT_INCLUDES}/fmt/std.h) + endif () +- file (COPY ${fmt_headers} +- DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) ++ #file (COPY ${fmt_headers} ++ # DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) + else () + set (fmt_headers + ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt/format.h +diff --git src/include/OpenImageIO/detail/fmt.h src/include/OpenImageIO/detail/fmt.h +index b4f5e7da4..a990f83d4 100644 +--- src/include/OpenImageIO/detail/fmt.h ++++ src/include/OpenImageIO/detail/fmt.h +@@ -58,9 +58,9 @@ OIIO_PRAGMA_WARNING_PUSH + # pragma GCC diagnostic ignored "-Wtautological-constant-compare" + #endif + +-#include +-#include +-#include ++#include ++#include ++#include + + OIIO_PRAGMA_WARNING_POP + +diff --git src/jpeg2000.imageio/CMakeLists.txt src/jpeg2000.imageio/CMakeLists.txt +index 560e8d486..402d4adad 100644 +--- src/jpeg2000.imageio/CMakeLists.txt ++++ src/jpeg2000.imageio/CMakeLists.txt +@@ -4,8 +4,7 @@ + + if (OPENJPEG_FOUND) + 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 9972a7150..683a66238 100644 +--- src/libOpenImageIO/CMakeLists.txt ++++ src/libOpenImageIO/CMakeLists.txt +@@ -145,7 +145,6 @@ 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 + $ + $ +@@ -153,12 +152,19 @@ target_link_libraries (OpenImageIO + $ + ${BZIP2_LIBRARIES} + ZLIB::ZLIB +- $ ++ tsl::robin_map ++ Boost::filesystem Boost::thread Boost::system Boost::container + ${CMAKE_DL_LIBS} + ) + +-if (FREETYPE_FOUND) +- target_link_libraries (OpenImageIO PRIVATE ${FREETYPE_LIBRARIES}) ++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) +diff --git src/libutil/CMakeLists.txt src/libutil/CMakeLists.txt +index 10cc4b0c4..bb632d99a 100644 +--- src/libutil/CMakeLists.txt ++++ src/libutil/CMakeLists.txt +@@ -20,9 +20,9 @@ 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} + ) +diff --git src/ptex.imageio/CMakeLists.txt src/ptex.imageio/CMakeLists.txt +index ed42f1c94..82d2b9770 100644 +--- src/ptex.imageio/CMakeLists.txt ++++ src/ptex.imageio/CMakeLists.txt +@@ -2,8 +2,9 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Ptex_FOUND) ++if (USE_PTEX) + add_oiio_plugin (ptexinput.cpp +- LINK_LIBRARIES Ptex::Ptex_dynamic ZLIB::ZLIB ++ LINK_LIBRARIES ${ptex_LIBRARIES} ZLIB::ZLIB ++ INCLUDE_DIRS ${ptex_INCLUDE_DIRS} + DEFINITIONS "-DUSE_PTEX") + endif () diff --git a/recipes/openimageio/all/test_package/CMakeLists.txt b/recipes/openimageio/all/test_package/CMakeLists.txt index 1644784331f87..2b80f5af75658 100644 --- a/recipes/openimageio/all/test_package/CMakeLists.txt +++ b/recipes/openimageio/all/test_package/CMakeLists.txt @@ -1,10 +1,11 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(OpenImageIO REQUIRED CONFIG) +find_package(fmt REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} OpenImageIO::OpenImageIO) +target_link_libraries(${PROJECT_NAME} PRIVATE OpenImageIO::OpenImageIO + OpenImageIO::OpenImageIO_Util + fmt::fmt) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/openimageio/all/test_package/conanfile.py b/recipes/openimageio/all/test_package/conanfile.py index d51573f42b4f7..f4262a197701c 100644 --- a/recipes/openimageio/all/test_package/conanfile.py +++ b/recipes/openimageio/all/test_package/conanfile.py @@ -1,18 +1,25 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.cmake import cmake_layout, CMake +from conan.tools.build import can_run import os class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): - version = tools.Version(self.deps_cpp_info["openimageio"].version) cmake = CMake(self) - cmake.definitions["CMAKE_CXX_STANDARD"] = 14 if version >= "2.3.0.0" else 11 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 not can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/openimageio/all/test_v1_package/CMakeLists.txt b/recipes/openimageio/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..4f7b705df9ba0 --- /dev/null +++ b/recipes/openimageio/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package CXX) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +find_package(OpenImageIO REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} OpenImageIO::OpenImageIO) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/openimageio/all/test_v1_package/conanfile.py b/recipes/openimageio/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..1bf1c7e26255d --- /dev/null +++ b/recipes/openimageio/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/openimageio/all/test_v1_package/test_package.cpp b/recipes/openimageio/all/test_v1_package/test_package.cpp new file mode 100644 index 0000000000000..e1594d38c661d --- /dev/null +++ b/recipes/openimageio/all/test_v1_package/test_package.cpp @@ -0,0 +1,9 @@ +#include + +int main() +{ + std::cout << "OpenImageIO " << OIIO_VERSION_STRING << "\n"; + + std::string formats = OIIO::get_string_attribute("format_list"); + std::cout << "Supported formats:\n" << formats << "\n"; +} diff --git a/recipes/openimageio/config.yml b/recipes/openimageio/config.yml index 3937cac349aec..cd903dbdc9549 100644 --- a/recipes/openimageio/config.yml +++ b/recipes/openimageio/config.yml @@ -1,9 +1,7 @@ versions: - "2.2.7.0": - folder: all - "2.2.18.0": + "2.4.7.1": folder: all - "2.3.7.2": + "2.4.17.0": folder: all - "2.4.7.1": + "2.5.6.0": folder: all From 75c9983a947edbbdfc3c4994c5c28f7b9ba488f6 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Mon, 26 Feb 2024 11:28:15 +0100 Subject: [PATCH 086/405] (#22788) [wayland] Bump required dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [wayland] Bump required dependencies * stay on libxml/2.13.2 --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Co-authored-by: Francisco Ramírez --- recipes/wayland/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/wayland/all/conanfile.py b/recipes/wayland/all/conanfile.py index 7694702f24251..865c98752b9de 100644 --- a/recipes/wayland/all/conanfile.py +++ b/recipes/wayland/all/conanfile.py @@ -51,14 +51,14 @@ def requirements(self): self.requires("libffi/3.4.4") if self.options.enable_dtd_validation: self.requires("libxml2/2.12.3") - self.requires("expat/2.5.0") + self.requires("expat/2.6.0") def validate(self): if self.settings.os != "Linux": raise ConanInvalidConfiguration(f"{self.ref} only supports Linux") def build_requirements(self): - self.tool_requires("meson/1.3.0") + self.tool_requires("meson/1.3.1") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): self.tool_requires("pkgconf/2.1.0") if not can_run(self): From 2b2e98ec882b67429b84b90cf25b6f9d6a5a1812 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 26 Feb 2024 19:48:05 +0900 Subject: [PATCH 087/405] (#22880) glfw: add version 3.4 * glfw: add version 3.4 * fix version number --- recipes/glfw/all/conandata.yml | 3 +++ recipes/glfw/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/glfw/all/conandata.yml b/recipes/glfw/all/conandata.yml index bb5660da3ad7d..91c03ba3c213e 100644 --- a/recipes/glfw/all/conandata.yml +++ b/recipes/glfw/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.4": + url: "https://github.com/glfw/glfw/releases/download/3.4/glfw-3.4.zip" + sha256: "b5ec004b2712fd08e8861dc271428f048775200a2df719ccf575143ba749a3e9" "3.3.8": url: "https://github.com/glfw/glfw/releases/download/3.3.8/glfw-3.3.8.zip" sha256: "4d025083cc4a3dd1f91ab9b9ba4f5807193823e565a5bcf4be202669d9911ea6" diff --git a/recipes/glfw/config.yml b/recipes/glfw/config.yml index a0746c2e38c76..71269a07d6ef0 100644 --- a/recipes/glfw/config.yml +++ b/recipes/glfw/config.yml @@ -1,4 +1,6 @@ versions: + "3.4": + folder: all "3.3.8": folder: all "3.3.7": From c2f63df08695108aa2e1de5f84cb8cc39cb668bd Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 26 Feb 2024 20:09:38 +0900 Subject: [PATCH 088/405] (#22882) c-ares: add version 1.27.0 --- recipes/c-ares/all/conandata.yml | 3 +++ recipes/c-ares/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/c-ares/all/conandata.yml b/recipes/c-ares/all/conandata.yml index aa06bcbb6109d..3833dbb894ff0 100644 --- a/recipes/c-ares/all/conandata.yml +++ b/recipes/c-ares/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.27.0": + url: "https://github.com/c-ares/c-ares/releases/download/cares-1_27_0/c-ares-1.27.0.tar.gz" + sha256: "0a72be66959955c43e2af2fbd03418e82a2bd5464604ec9a62147e37aceb420b" "1.26.0": url: "https://github.com/c-ares/c-ares/releases/download/cares-1_26_0/c-ares-1.26.0.tar.gz" sha256: "bed58c4f02b009080ebda6c2467ba469722ac6aebbf4497dc44a83d8c6194e50" diff --git a/recipes/c-ares/config.yml b/recipes/c-ares/config.yml index 48280108ceb5c..75dbe67cad1ac 100644 --- a/recipes/c-ares/config.yml +++ b/recipes/c-ares/config.yml @@ -1,4 +1,6 @@ versions: + "1.27.0": + folder: all "1.26.0": folder: all "1.25.0": From 1d2526fbff2a71142a73e1c42e6580c28a6e3107 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 26 Feb 2024 20:30:00 +0900 Subject: [PATCH 089/405] (#22884) libpng: add version 1.6.43 --- recipes/libpng/all/conandata.yml | 3 +++ recipes/libpng/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/libpng/all/conandata.yml b/recipes/libpng/all/conandata.yml index 5e7c1a3b6a12f..9d660e1b52521 100644 --- a/recipes/libpng/all/conandata.yml +++ b/recipes/libpng/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.6.43": + url: "https://sourceforge.net/projects/libpng/files/libpng16/1.6.43/libpng-1.6.43.tar.xz" + sha256: "6a5ca0652392a2d7c9db2ae5b40210843c0bbc081cbd410825ab00cc59f14a6c" "1.6.42": url: "https://sourceforge.net/projects/libpng/files/libpng16/1.6.42/libpng-1.6.42.tar.xz" sha256: "c919dbc11f4c03b05aba3f8884d8eb7adfe3572ad228af972bb60057bdb48450" diff --git a/recipes/libpng/config.yml b/recipes/libpng/config.yml index 52cce5acae391..05a40beb2a7b3 100644 --- a/recipes/libpng/config.yml +++ b/recipes/libpng/config.yml @@ -1,4 +1,6 @@ versions: + "1.6.43": + folder: all "1.6.42": folder: all "1.6.41": From 2b729a1033e6615c538ca8a2b4eb4cc51ae53ca2 Mon Sep 17 00:00:00 2001 From: Guillaume MICHEL Date: Mon, 26 Feb 2024 13:10:29 +0100 Subject: [PATCH 090/405] (#22704) liburing: Fix cross-compilation and added version 2.5 --- recipes/liburing/all/conandata.yml | 30 +++++++++++++++++++ recipes/liburing/all/conanfile.py | 11 ++++++- ...buring-0.7-disable_samples_and_tests.patch | 13 ++++++++ ...buring-2.0-disable_samples_and_tests.patch | 13 ++++++++ ...buring-2.2-disable_samples_and_tests.patch | 13 ++++++++ ...buring-2.4-disable_samples_and_tests.patch | 13 ++++++++ recipes/liburing/config.yml | 2 ++ 7 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 recipes/liburing/all/patches/liburing-0.7-disable_samples_and_tests.patch create mode 100644 recipes/liburing/all/patches/liburing-2.0-disable_samples_and_tests.patch create mode 100644 recipes/liburing/all/patches/liburing-2.2-disable_samples_and_tests.patch create mode 100644 recipes/liburing/all/patches/liburing-2.4-disable_samples_and_tests.patch diff --git a/recipes/liburing/all/conandata.yml b/recipes/liburing/all/conandata.yml index c886933bedcfe..48e308169639a 100644 --- a/recipes/liburing/all/conandata.yml +++ b/recipes/liburing/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.5": + url: "https://github.com/axboe/liburing/archive/liburing-2.5.tar.gz" + sha256: "456f5f882165630f0dc7b75e8fd53bd01a955d5d4720729b4323097e6e9f2a98" "2.4": url: "https://github.com/axboe/liburing/archive/liburing-2.4.tar.gz" sha256: "2398ec82d967a6f903f3ae1fd4541c754472d3a85a584dc78c5da2fabc90706b" @@ -19,5 +22,32 @@ sources: sha256: "8e2842cfe947f3a443af301bdd6d034455536c38a455c7a700d0c1ad165a7543" patches: + "0.7": + - patch_file: "patches/liburing-0.7-disable_samples_and_tests.patch" + patch_description: "Disable tests and samples as it might not work while cross-compiling" + patch_type: "conan" + "2.0": + - patch_file: "patches/liburing-2.0-disable_samples_and_tests.patch" + patch_description: "Disable tests and samples as it might not work while cross-compiling" + patch_type: "conan" "2.1": - patch_file: "patches/0001-liburing-2.1-memfd-create.patch" + - patch_file: "patches/liburing-2.0-disable_samples_and_tests.patch" + patch_description: "Disable tests and samples as it might not work while cross-compiling" + patch_type: "conan" + "2.2": + - patch_file: "patches/liburing-2.2-disable_samples_and_tests.patch" + patch_description: "Disable tests and samples as it might not work while cross-compiling" + patch_type: "conan" + "2.3": + - patch_file: "patches/liburing-2.2-disable_samples_and_tests.patch" + patch_description: "Disable tests and samples as it might not work while cross-compiling" + patch_type: "conan" + "2.4": + - 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.5": + - 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" diff --git a/recipes/liburing/all/conanfile.py b/recipes/liburing/all/conanfile.py index b1e4b79034482..c90a304cde4c7 100644 --- a/recipes/liburing/all/conanfile.py +++ b/recipes/liburing/all/conanfile.py @@ -64,8 +64,17 @@ def source(self): def generate(self): tc = AutotoolsToolchain(self) + + if Version(self.version) >= "2.5": + if self.options.with_libc: + tc.configure_args.append("--use-libc") + elif Version(self.version) >= "2.2": + if not self.options.with_libc: + tc.configure_args.append("--nolibc") + tc.update_configure_args({ - "--nolibc": None if self.options.get_safe("with_libc", default=True) else "", + "--host": None, + "--build": None, "--enable-shared": None, "--disable-shared": None, "--enable-static": None, diff --git a/recipes/liburing/all/patches/liburing-0.7-disable_samples_and_tests.patch b/recipes/liburing/all/patches/liburing-0.7-disable_samples_and_tests.patch new file mode 100644 index 0000000000000..dc56cd825cb84 --- /dev/null +++ b/recipes/liburing/all/patches/liburing-0.7-disable_samples_and_tests.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index 948e004..d4cff97 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,8 +10,6 @@ default: all + + all: + @$(MAKE) -C src +- @$(MAKE) -C test +- @$(MAKE) -C examples + + partcheck: all + @echo "make partcheck => TODO add tests with out kernel support" diff --git a/recipes/liburing/all/patches/liburing-2.0-disable_samples_and_tests.patch b/recipes/liburing/all/patches/liburing-2.0-disable_samples_and_tests.patch new file mode 100644 index 0000000000000..4f4983d0c9070 --- /dev/null +++ b/recipes/liburing/all/patches/liburing-2.0-disable_samples_and_tests.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index 5d9c4dc..66ee81e 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,8 +10,6 @@ default: all + + all: + @$(MAKE) -C src +- @$(MAKE) -C test +- @$(MAKE) -C examples + + .PHONY: all install default clean test + .PHONY: FORCE cscope diff --git a/recipes/liburing/all/patches/liburing-2.2-disable_samples_and_tests.patch b/recipes/liburing/all/patches/liburing-2.2-disable_samples_and_tests.patch new file mode 100644 index 0000000000000..7faef951af755 --- /dev/null +++ b/recipes/liburing/all/patches/liburing-2.2-disable_samples_and_tests.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index 686be4f..28d0a7f 100644 +--- a/Makefile ++++ b/Makefile +@@ -8,8 +8,6 @@ default: all + + all: + @$(MAKE) -C src +- @$(MAKE) -C test +- @$(MAKE) -C examples + + .PHONY: all install default clean test + .PHONY: FORCE cscope 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 new file mode 100644 index 0000000000000..f3b6165682fd2 --- /dev/null +++ b/recipes/liburing/all/patches/liburing-2.4-disable_samples_and_tests.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index 73d021c..74aa8d7 100644 +--- a/Makefile ++++ b/Makefile +@@ -8,8 +8,6 @@ default: all + + all: + @$(MAKE) -C src +- @$(MAKE) -C test +- @$(MAKE) -C examples + + .PHONY: all install default clean test + .PHONY: FORCE cscope diff --git a/recipes/liburing/config.yml b/recipes/liburing/config.yml index 264b68e5678d7..d47042c99f1bb 100644 --- a/recipes/liburing/config.yml +++ b/recipes/liburing/config.yml @@ -1,4 +1,6 @@ versions: + "2.5": + folder: all "2.4": folder: all "2.3": From de3f951acc4aad1b4bf0b62fe6ca977ee472efce Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 26 Feb 2024 14:43:23 +0200 Subject: [PATCH 091/405] (#18265) libunifex: migrate to Conan v2 * libunifex: migrate to Conan v2, add v0.3.0 * libunifex: ensure liburing from the system is not used * libunifex: bump to v0.4.0 * libunifex: drop the incompatible custom version * libunifex: downgrade liburing * libunifex: disable liburing by default * libunifex: fix a MSVC build issue * libunifex: ensure cppstd is set * libunifex: allow cppstd to be overriden * libunifex: correct min VS version --- recipes/libunifex/all/CMakeLists.txt | 7 - recipes/libunifex/all/conandata.yml | 6 +- recipes/libunifex/all/conanfile.py | 153 +++++++++++------- .../libunifex/all/test_package/CMakeLists.txt | 13 +- .../libunifex/all/test_package/conanfile.py | 19 ++- .../all/test_v1_package/CMakeLists.txt | 8 + .../all/test_v1_package/conanfile.py | 17 ++ recipes/libunifex/config.yml | 4 +- 8 files changed, 144 insertions(+), 83 deletions(-) delete mode 100644 recipes/libunifex/all/CMakeLists.txt create mode 100644 recipes/libunifex/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/libunifex/all/test_v1_package/conanfile.py diff --git a/recipes/libunifex/all/CMakeLists.txt b/recipes/libunifex/all/CMakeLists.txt deleted file mode 100644 index 4beb13671fe5e..0000000000000 --- a/recipes/libunifex/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8) -project(cmake_wrapper) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/libunifex/all/conandata.yml b/recipes/libunifex/all/conandata.yml index 2eaea0e7a17a7..f0f7328af9c2a 100644 --- a/recipes/libunifex/all/conandata.yml +++ b/recipes/libunifex/all/conandata.yml @@ -1,4 +1,4 @@ sources: - "cci.20220430": - url: "https://github.com/facebookexperimental/libunifex/archive/c359fd8e7d97d91359cf4a6c1dbef99b0b1767b6.tar.gz" - sha256: "c306891967fa4cc1a22f3401581d35ceea41eb1dbdac3e6157ecf3defaa4b15d" + "0.4.0": + url: "https://github.com/facebookexperimental/libunifex/archive/refs/tags/v0.4.0.tar.gz" + sha256: "d5ce3b616e166da31e6b4284764a1feeba52aade868bcbffa94cfd86b402716e" diff --git a/recipes/libunifex/all/conanfile.py b/recipes/libunifex/all/conanfile.py index 49d7f959dc539..4bcd35d16f99c 100644 --- a/recipes/libunifex/all/conanfile.py +++ b/recipes/libunifex/all/conanfile.py @@ -1,110 +1,143 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration -import functools import os -required_conan_version = ">=1.43.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd, valid_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir, replace_in_file, export_conandata_patches, apply_conandata_patches +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.52.0" class LibunifexConan(ConanFile): name = "libunifex" + description = "A prototype implementation of the C++ sender/receiver async programming model" license = ("Apache-2.0", "LLVM-exception") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/facebookexperimental/libunifex" - description = "A prototype implementation of the C++ sender/receiver async programming model" topics = ("async", "cpp") + package_type = "static-library" settings = "os", "arch", "compiler", "build_type" - - generators = "cmake", "cmake_find_package_multi" - no_copy_source = True - exports_sources = ["CMakeLists.txt"] + options = { + "fPIC": [True, False], + "with_liburing": [True, False], + } + default_options = { + "fPIC": True, + "with_liburing": False, # Enabled by default in the project, but incompatible with the Linux version used in C3I + } @property - def _source_subfolder(self): - return "source_subfolder" + def _minimum_standard(self): + if is_msvc(self): + # Otherwise a forward declaration `extern const _schedule::_fn schedule;` + # conflicts with the implementation `inline constexpr _schedule::_fn schedule {};` + # https://github.com/facebookexperimental/libunifex/issues/591 + return 20 + return 17 @property def _compilers_minimum_version(self): return { "gcc": "9", - "Visual Studio": "16", "clang": "10", "apple-clang": "11", + "Visual Studio": "17", + "msvc": "193", } - @property - def _minimum_standard(self): - return "17" + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + if not self.settings.os == "Linux": + del self.options.with_liburing + + def layout(self): + cmake_layout(self, src_folder="src") - # FIXME: Add support for liburing - # def requirements(self): - # TODO: Make an option to opt-out of liburing for old kernel versions - # if self.settings.os == "Linux": - # self.requires("liburing/2.1") + def requirements(self): + if self.options.get_safe("with_liburing"): + self.requires("liburing/2.4", transitive_headers=True, transitive_libs=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd( - self, self._minimum_standard) + check_min_cppstd(self, self._minimum_standard) def lazy_lt_semver(v1, v2): - lv1 = [int(v) for v in v1.split(".")] - lv2 = [int(v) for v in v2.split(".")] - min_length = min(len(lv1), len(lv2)) - return lv1[:min_length] < lv2[:min_length] - - minimum_version = self._compilers_minimum_version.get( - str(self.settings.compiler), False) - if not minimum_version: - self.output.warn( - "{0} {1} requires C++{2}. Your compiler is unknown. Assuming it supports C++{2}." - .format(self.name, self.version, self._minimum_standard)) - elif lazy_lt_semver(str(self.settings.compiler.version), minimum_version): + 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 lazy_lt_semver(self.settings.compiler.version, minimum_version): raise ConanInvalidConfiguration( - "{} {} requires C++{}, which your compiler does not support." - .format(self.name, self.version, self._minimum_standard)) + f"{self.ref} requires C++{self._minimum_standard}, which your compiler does not support." + ) def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_TESTING"] = False + tc.variables["UNIFEX_BUILD_EXAMPLES"] = False + tc.variables["UNIFEX_NO_LIBURING"] = not self.options.get_safe("with_liburing", False) + if not valid_min_cppstd(self, self._minimum_standard): + tc.variables["CMAKE_CXX_STANDARD"] = self._minimum_standard + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + deps = CMakeDeps(self) + deps.set_property("liburing", "cmake_file_name", "LIBURING") + deps.generate() - @functools.lru_cache(1) - def _configure_cmake(self): + def build(self): + self._patch_sources() cmake = CMake(self) - cmake.definitions["BUILD_TESTING"] = "OFF" cmake.configure() - return cmake - - def build(self): - cmake = self._configure_cmake() cmake.build() + def _patch_sources(self): + apply_conandata_patches(self) + # Ensure liburing from the system is not used and that uuper-case variables are generated + required = "REQUIRED" if self.settings.os == "Linux" else "" + replace_in_file(self, os.path.join(self.source_folder, "cmake", "unifex_flags.cmake"), + "find_package(LibUring COMPONENTS)", + f"find_package(LIBURING {required} CONFIG NO_DEFAULT_PATH PATHS ${{CMAKE_PREFIX_PATH}})") + replace_in_file(self, os.path.join(self.source_folder, "cmake", "unifex_env.cmake"), "-Werror", "") + replace_in_file(self, os.path.join(self.source_folder, "cmake", "unifex_env.cmake"), "/WX", "") + # Allow cppstd to be overridden + replace_in_file(self, os.path.join(self.source_folder, "source", "CMakeLists.txt"), + "target_compile_features(unifex PUBLIC cxx_std_17)", "") + 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() - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.set_property("cmake_file_name", "unifex") self.cpp_info.set_property("cmake_target_name", "unifex::unifex") self.cpp_info.set_property("pkg_config_name", "unifex") + self.cpp_info.components["unifex"].libs = ["unifex"] + self.cpp_info.components["unifex"].set_property("cmake_target_name", "unifex::unifex") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["unifex"].system_libs = ["pthread"] + if self.options.get_safe("with_liburing"): + self.cpp_info.components["unifex"].requires.append("liburing::liburing") + # TODO: to remove in conan v2 once cmake_find_package_* generators removed - self.cpp_info.filenames["cmake_find_package"] = "unifex" - self.cpp_info.filenames["cmake_find_package_multi"] = "unifex" self.cpp_info.names["cmake_find_package"] = "unifex" self.cpp_info.names["cmake_find_package_multi"] = "unifex" - self.cpp_info.names["pkg_config"] = "unifex" self.cpp_info.components["unifex"].names["cmake_find_package"] = "unifex" self.cpp_info.components["unifex"].names["cmake_find_package_multi"] = "unifex" - self.cpp_info.components["unifex"].set_property( - "cmake_target_name", "unifex::unifex") - self.cpp_info.components["unifex"].libs = ["unifex"] - - if self.settings.os == "Linux": - self.cpp_info.components["unifex"].system_libs = ["pthread"] - # self.cpp_info.components["unifex"].requires.append( - # "liburing::liburing") diff --git a/recipes/libunifex/all/test_package/CMakeLists.txt b/recipes/libunifex/all/test_package/CMakeLists.txt index a487dfdf2b7ad..7c04e7b0b4280 100644 --- a/recipes/libunifex/all/test_package/CMakeLists.txt +++ b/recipes/libunifex/all/test_package/CMakeLists.txt @@ -1,11 +1,12 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) find_package(unifex REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE unifex::unifex) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) +if(MSVC) + set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 20) +else() + set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) +endif() diff --git a/recipes/libunifex/all/test_package/conanfile.py b/recipes/libunifex/all/test_package/conanfile.py index 38f4483872d47..ef5d7042163ec 100644 --- a/recipes/libunifex/all/test_package/conanfile.py +++ b/recipes/libunifex/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libunifex/all/test_v1_package/CMakeLists.txt b/recipes/libunifex/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libunifex/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/libunifex/all/test_v1_package/conanfile.py b/recipes/libunifex/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..38f4483872d47 --- /dev/null +++ b/recipes/libunifex/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/libunifex/config.yml b/recipes/libunifex/config.yml index 1bf3ed95d8368..af29e78bd9b25 100644 --- a/recipes/libunifex/config.yml +++ b/recipes/libunifex/config.yml @@ -1,3 +1,3 @@ versions: - "cci.20220430": - folder: "all" + "0.4.0": + folder: all From e7d129825e6e0044874eaceb725cc234790761db Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 26 Feb 2024 15:02:56 +0200 Subject: [PATCH 092/405] (#18721) sleef: migrate to Conan v2 * sleef: migrate to Conan v2 * sleef: add version cci.20210405 * sleef: fix shared option * sleef: rmdir dummy * sleef: armv8 cross-building is not supported * sleef: cross-compilation to x86_64 is not supported either * sleef: armv8 is not supported either * sleef: add v3.6, drop custom version * sleef: update options * sleef: use newer CMake * sleef: restore apple-clang checks for v3.5 * sleef: cross-building is still broken * Update recipes/sleef/all/conanfile.py Co-authored-by: Uilian Ries --------- Co-authored-by: Uilian Ries --- recipes/sleef/all/CMakeLists.txt | 7 - recipes/sleef/all/conandata.yml | 3 + recipes/sleef/all/conanfile.py | 135 ++++++++++-------- recipes/sleef/all/test_package/CMakeLists.txt | 7 +- recipes/sleef/all/test_package/conanfile.py | 19 ++- .../sleef/all/test_v1_package/CMakeLists.txt | 8 ++ .../sleef/all/test_v1_package/conanfile.py | 17 +++ recipes/sleef/config.yml | 2 + 8 files changed, 126 insertions(+), 72 deletions(-) delete mode 100644 recipes/sleef/all/CMakeLists.txt create mode 100644 recipes/sleef/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/sleef/all/test_v1_package/conanfile.py diff --git a/recipes/sleef/all/CMakeLists.txt b/recipes/sleef/all/CMakeLists.txt deleted file mode 100644 index bd3083b512cb9..0000000000000 --- a/recipes/sleef/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory(source_subfolder) diff --git a/recipes/sleef/all/conandata.yml b/recipes/sleef/all/conandata.yml index d1737a7a842cf..2cb4098c3fd69 100644 --- a/recipes/sleef/all/conandata.yml +++ b/recipes/sleef/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.6": + url: "https://github.com/shibatch/sleef/archive/3.6.tar.gz" + sha256: "de4f3d992cf2183a872cd397f517c1defcd3ee6cafa2ce5fa36963bd7e562446" "3.5.1": url: "https://github.com/shibatch/sleef/archive/3.5.1.tar.gz" sha256: "415ee9b1bcc5816989d3d4d92afd0cd3f9ee89cbd5a33eb008e69751e40438ab" diff --git a/recipes/sleef/all/conanfile.py b/recipes/sleef/all/conanfile.py index 0496b1b63c7cd..7cba3764e2337 100644 --- a/recipes/sleef/all/conanfile.py +++ b/recipes/sleef/all/conanfile.py @@ -1,19 +1,25 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.32.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rmdir +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" class SleefConan(ConanFile): name = "sleef" - description = "SLEEF is a library that implements vectorized versions " \ - "of C standard math functions." + description = "SLEEF is a library that implements vectorized versions of C standard math functions." license = "BSL-1.0" - topics = ("conan", "sleef", "vectorization", "simd") - homepage = "https://sleef.org" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://sleef.org" + topics = ("vectorization", "simd") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -24,75 +30,92 @@ class SleefConan(ConanFile): "fPIC": True, } - short_paths = True - - exports_sources = "CMakeLists.txt" - generators = "cmake" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def validate(self): if self.settings.os == "Windows" and self.options.shared: - raise ConanInvalidConfiguration("shared sleef not supported on Windows, it produces runtime errors") + raise ConanInvalidConfiguration( + "shared sleef not supported on Windows, it produces runtime errors" + ) + if self.settings.compiler == "apple-clang": + if cross_building(self): + # Fails with "No rule to make target `/bin/mkrename'" + # https://github.com/shibatch/sleef/issues/308 + raise ConanInvalidConfiguration(f"{self.ref} does not support cross-building with apple-clang") + if Version(self.version) < "3.6" and self.settings.arch == "armv8": + # clang: error: the clang compiler does not support '-march=armv7-a' + # clang: warning: argument unused during compilation: '-mfpu=vfpv4' [-Wunused-command-line-argument] + # clang: warning: argument unused during compilation: '-arch arm64' [-Wunused-command-line-argument] + # clang: warning: argument unused during compilation: '-mmacosx-version-min=11.0' [-Wunused-command-line-argument] + raise ConanInvalidConfiguration(f"{self.ref} does not support Mac M1. Please, use {self.name} version >=3.6.") + + def build_requirements(self): + if Version(self.version) >= "3.6": + self.tool_requires("cmake/[>=3.18 <4]") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - os.rename(self.name + "-" + self.version, self._source_subfolder) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["BUILD_STATIC_TEST_BINS"] = False - self._cmake.definitions["ENABLE_LTO"] = False - self._cmake.definitions["BUILD_LIBM"] = True - self._cmake.definitions["BUILD_DFT"] = False - self._cmake.definitions["BUILD_QUAD"] = False - self._cmake.definitions["BUILD_GNUABI_LIBS"] = False - self._cmake.definitions["BUILD_TESTS"] = False - self._cmake.definitions["BUILD_INLINE_HEADERS"] = False - self._cmake.definitions["SLEEF_TEST_ALL_IUT"] = False - self._cmake.definitions["SLEEF_SHOW_CONFIG"] = True - self._cmake.definitions["SLEEF_SHOW_ERROR_LOG"] = False - self._cmake.definitions["ENFORCE_TESTER"] = False - self._cmake.definitions["ENFORCE_TESTER3"] = False - self._cmake.definitions["ENABLE_ALTDIV"] = False - self._cmake.definitions["ENABLE_ALTSQRT"] = False - self._cmake.definitions["DISABLE_FFTW"] = True - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + VirtualBuildEnv(self).generate() + + tc = CMakeToolchain(self) + tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared + if Version(self.version) >= "3.6": + tc.cache_variables["SLEEF_BUILD_STATIC_TEST_BINS"] = False + tc.cache_variables["SLEEF_BUILD_LIBM"] = True + tc.cache_variables["SLEEF_BUILD_DFT"] = False + tc.cache_variables["SLEEF_BUILD_QUAD"] = False + tc.cache_variables["SLEEF_BUILD_GNUABI_LIBS"] = False + tc.cache_variables["SLEEF_BUILD_SCALAR_LIB"] = False + tc.cache_variables["SLEEF_BUILD_TESTS"] = False + tc.cache_variables["SLEEF_BUILD_INLINE_HEADERS"] = False + tc.cache_variables["SLEEF_SHOW_CONFIG"] = True + tc.cache_variables["SLEEF_SHOW_ERROR_LOG"] = False + tc.cache_variables["SLEEF_ENABLE_ALTDIV"] = False + tc.cache_variables["SLEEF_ENABLE_ALTSQRT"] = False + tc.cache_variables["SLEEF_DISABLE_FFTW"] = True + tc.cache_variables["SLEEF_DISABLE_MPFR"] = True + tc.cache_variables["SLEEF_DISABLE_SSL"] = True + tc.cache_variables["SLEEF_ENABLE_CUDA"] = False + tc.cache_variables["SLEEF_ENABLE_CXX"] = False + else: + tc.cache_variables["BUILD_DFT"] = False + tc.cache_variables["BUILD_GNUABI_LIBS"] = False + tc.cache_variables["BUILD_TESTS"] = False + tc.cache_variables["DISABLE_FFTW"] = True + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() 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() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + 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, "dummy")) def package_info(self): - self.cpp_info.names["pkg_config"] = "sleef" + self.cpp_info.set_property("pkg_config_name", "sleef") self.cpp_info.libs = ["sleef"] if self.settings.os == "Windows" and not self.options.shared: self.cpp_info.defines = ["SLEEF_STATIC_LIBS"] - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["m"] diff --git a/recipes/sleef/all/test_package/CMakeLists.txt b/recipes/sleef/all/test_package/CMakeLists.txt index 7b9b613cbb24a..a5f1ed24ef5f7 100644 --- a/recipes/sleef/all/test_package/CMakeLists.txt +++ b/recipes/sleef/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(sleef REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE sleef::sleef) diff --git a/recipes/sleef/all/test_package/conanfile.py b/recipes/sleef/all/test_package/conanfile.py index 5216332f39f5c..ef5d7042163ec 100644 --- a/recipes/sleef/all/test_package/conanfile.py +++ b/recipes/sleef/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def 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/sleef/all/test_v1_package/CMakeLists.txt b/recipes/sleef/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/sleef/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/sleef/all/test_v1_package/conanfile.py b/recipes/sleef/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..a9f777f7680ff --- /dev/null +++ b/recipes/sleef/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/sleef/config.yml b/recipes/sleef/config.yml index 2276d8a2cd6a8..3c718426b97bd 100644 --- a/recipes/sleef/config.yml +++ b/recipes/sleef/config.yml @@ -1,3 +1,5 @@ versions: + "3.6": + folder: all "3.5.1": folder: all From c2a91a2cb6c93c4ec6026cc5e65102ed681b3caa Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 26 Feb 2024 22:30:04 +0900 Subject: [PATCH 093/405] (#20388) fast_io: add recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fast_io: add recipe * Apple-Clang 13 has partial support for Concepts * drop support clang<11 * downgrade to cci.20230418 * Update to latest version * Fix config.yml * update version, fix test_package.cpp --------- Co-authored-by: Rubén Rincón Co-authored-by: Rubén Rincón Blanco --- recipes/fast_io/all/conandata.yml | 4 ++ recipes/fast_io/all/conanfile.py | 68 +++++++++++++++++++ .../fast_io/all/test_package/CMakeLists.txt | 8 +++ recipes/fast_io/all/test_package/conanfile.py | 25 +++++++ .../fast_io/all/test_package/test_package.cpp | 8 +++ recipes/fast_io/config.yml | 3 + 6 files changed, 116 insertions(+) create mode 100644 recipes/fast_io/all/conandata.yml create mode 100644 recipes/fast_io/all/conanfile.py create mode 100644 recipes/fast_io/all/test_package/CMakeLists.txt create mode 100644 recipes/fast_io/all/test_package/conanfile.py create mode 100644 recipes/fast_io/all/test_package/test_package.cpp create mode 100644 recipes/fast_io/config.yml diff --git a/recipes/fast_io/all/conandata.yml b/recipes/fast_io/all/conandata.yml new file mode 100644 index 0000000000000..a32bf70cd25f3 --- /dev/null +++ b/recipes/fast_io/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20240219": + url: "https://github.com/cppfastio/fast_io/archive/316afccde333721b059a761b25217084e84a9ca0.tar.gz" + sha256: "9feab7802957c8069b2a112f97bfb885d503ff5d7f433197f47636f40a20188a" diff --git a/recipes/fast_io/all/conanfile.py b/recipes/fast_io/all/conanfile.py new file mode 100644 index 0000000000000..32f435f8730b5 --- /dev/null +++ b/recipes/fast_io/all/conanfile.py @@ -0,0 +1,68 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.52.0" + + +class FastIoConan(ConanFile): + name = "fast_io" + description = "fast_io is a C++ io exception-safe RAII library based on C++ 20 Concepts. It is at least 10 times faster than cstdio than iostream." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/cppfastio/fast_io" + topics = ("cstdio", "iostream", "io", "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": "13", + "clang": "15", + # Apple-Clang 13 is not enough in this case, + # partial support for concepts + "apple-clang": "14", + "Visual Studio": "17", + "msvc": "193", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, pattern="license.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/fast_io/all/test_package/CMakeLists.txt b/recipes/fast_io/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..091f3e6ef74db --- /dev/null +++ b/recipes/fast_io/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.12) +project(test_package LANGUAGES CXX) + +find_package(fast_io REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE fast_io::fast_io) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/fast_io/all/test_package/conanfile.py b/recipes/fast_io/all/test_package/conanfile.py new file mode 100644 index 0000000000000..b9d7f11e89dcd --- /dev/null +++ b/recipes/fast_io/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 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/fast_io/all/test_package/test_package.cpp b/recipes/fast_io/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..0e163592d3756 --- /dev/null +++ b/recipes/fast_io/all/test_package/test_package.cpp @@ -0,0 +1,8 @@ +#include +#include "fast_io.h" + +int main() { + fast_io::io::print(4, " " ,4, "\n"); + + return 0; +} diff --git a/recipes/fast_io/config.yml b/recipes/fast_io/config.yml new file mode 100644 index 0000000000000..957c6f90fa002 --- /dev/null +++ b/recipes/fast_io/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20240219": + folder: all From 584c8d8815c8170b2f9f184edeb5e5c2c4374a0b Mon Sep 17 00:00:00 2001 From: "Lucas K. Dal Castel" Date: Mon, 26 Feb 2024 11:08:35 -0300 Subject: [PATCH 094/405] (#20851) freealut: add recipe * freealut: add recipe * freealut: [CR] - split patches * Simplify recipe without patches Signed-off-by: Uilian Ries * freealut: portability - make it build for Windows * freealut: Disable static lib build for macOS * remove openal-soft shared option enforcement Co-authored-by: Uilian Ries * remove openal-soft shared option default value Co-authored-by: Uilian Ries * fix comment * Add validation related to openal-soft in Windows freealut's cmake currently is using find_library instead of the package finders so it wouldn't get its public compile definitions. This causes al.h be preprocessed as a dynamic library. Since Windows symbols are different for dynamic and static methods they aren't found. * Add hint to build using openlal-soft as a shared lib in Windows. --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries --- recipes/freealut/all/conandata.yml | 4 + recipes/freealut/all/conanfile.py | 96 +++++++++++++++++++ .../freealut/all/test_package/CMakeLists.txt | 7 ++ .../freealut/all/test_package/conanfile.py | 26 +++++ .../freealut/all/test_package/test_package.c | 40 ++++++++ recipes/freealut/config.yml | 3 + 6 files changed, 176 insertions(+) create mode 100644 recipes/freealut/all/conandata.yml create mode 100644 recipes/freealut/all/conanfile.py create mode 100644 recipes/freealut/all/test_package/CMakeLists.txt create mode 100644 recipes/freealut/all/test_package/conanfile.py create mode 100644 recipes/freealut/all/test_package/test_package.c create mode 100644 recipes/freealut/config.yml diff --git a/recipes/freealut/all/conandata.yml b/recipes/freealut/all/conandata.yml new file mode 100644 index 0000000000000..4ac03e7d67b4e --- /dev/null +++ b/recipes/freealut/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.1.0": + url: "http://ftp.debian.org/debian/pool/main/f/freealut/freealut_1.1.0.orig.tar.gz" + sha256: "60d1ea8779471bb851b89b49ce44eecb78e46265be1a6e9320a28b100c8df44f" diff --git a/recipes/freealut/all/conanfile.py b/recipes/freealut/all/conanfile.py new file mode 100644 index 0000000000000..42eae88dfb458 --- /dev/null +++ b/recipes/freealut/all/conanfile.py @@ -0,0 +1,96 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rm, rmdir +from conan.errors import ConanInvalidConfiguration +import os + +required_conan_version = ">=1.54" + +class FreeAlutConan(ConanFile): + name = "freealut" + description = "freealut is a free implementation of OpenAL's ALUT standard." + topics = ("openal", "audio", "api") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://openal.org" + license = "LGPL-2.0-or-later" + 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": + self.options.rm_safe("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 validate(self): + # FIXME: freealut supports Windows and Macos, but the recipe needs some help to work. + if self.settings.os in ["Windows", "Macos"] and \ + not self.options.shared: + raise ConanInvalidConfiguration( + f"{self.ref} recipe is currently not prepared for Windows or Macos. Contributions are welcome." + ) + + # freealut's cmake currently is using find_library instead of the package finders so it wouldn't get its public compile definitions. + # This causes al.h to be preprocessed as a dynamic library. Since Windows symbols are different for dynamic and static methods they aren't found. + if self.settings.os == "Windows" and \ + not self.dependencies["openal-soft"].options.shared: + raise ConanInvalidConfiguration( + f"{self.ref} cmake is currently not prepared to use openal-soft as a static library on Windows. Add option openal-soft/*:shared=True." + ) + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("openal-soft/1.22.2", transitive_headers=True, transitive_libs=True) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeDeps(self) + tc.generate() + tc = CMakeToolchain(self) + # Honor BUILD_SHARED_LIBS from conan_toolchain (see https://github.com/conan-io/conan/issues/11840) + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0003"] = "NEW" + tc.variables["BUILD_STATIC"] = not self.options.shared + # INFO: CMakeDeps generates CamelCase variables + tc.variables["OPENAL_LIB_DIR"] = os.path.join(self.dependencies["openal-soft"].package_folder, "lib") + tc.variables["OPENAL_INCLUDE_DIR"] = os.path.join(self.dependencies["openal-soft"].package_folder, "include") + if self.settings.os == "Windows": + tc.variables["OPENAL_INCLUDE_DIR"] += ";" + os.path.join(self.dependencies["openal-soft"].package_folder, "include", "AL") + tc.variables["OPENAL_LIB_DIR"] = tc.variables["OPENAL_LIB_DIR"].replace("\\","/") + tc.variables["OPENAL_INCLUDE_DIR"] = tc.variables["OPENAL_INCLUDE_DIR"].replace("\\","/") + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "COPYING", 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", "pkgconfig")) + if not self.options.shared: + rm(self, "*.so*", os.path.join(self.package_folder, "lib")) + + def package_info(self): + self.cpp_info.libs = ['alut'] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m", "pthread"] + if self.options.shared: + self.cpp_info.defines.append("ALUT_BUILD_LIBRARY") diff --git a/recipes/freealut/all/test_package/CMakeLists.txt b/recipes/freealut/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..4ba52d1b57dea --- /dev/null +++ b/recipes/freealut/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(freealut REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE freealut::freealut) diff --git a/recipes/freealut/all/test_package/conanfile.py b/recipes/freealut/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/freealut/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/freealut/all/test_package/test_package.c b/recipes/freealut/all/test_package/test_package.c new file mode 100644 index 0000000000000..eebaa554d158e --- /dev/null +++ b/recipes/freealut/all/test_package/test_package.c @@ -0,0 +1,40 @@ +#include +#include +#include + +/* + This program checks that the version of OpenAL in the + library agrees with the header file we're compiled against. +*/ + +int +main (int argc, char **argv) +{ + ALboolean ok = AL_FALSE; + + alutInit (&argc, argv); + +#ifdef ALUT_API_MAJOR_VERSION + if (alutGetMajorVersion () != ALUT_API_MAJOR_VERSION || + alutGetMinorVersion () != ALUT_API_MINOR_VERSION) + { + fprintf (stderr, + "WARNING: The ALUT library is version %d.%d.x but says it's %d.%d.x!\n", + alutGetMajorVersion (), alutGetMinorVersion (), + ALUT_API_MAJOR_VERSION, ALUT_API_MINOR_VERSION); + } + else + { + fprintf (stderr, "The ALUT library is at version %d.%d.x.\n", + alutGetMajorVersion (), alutGetMinorVersion ()); + ok = AL_TRUE; + } +#else + fprintf (stderr, "WARNING: Your copy of is pre-1.0.0,\n"); + fprintf (stderr, "but you are running the ALUT test suite from ALUT\n"); + fprintf (stderr, "version 1.0.0 or later.\n"); +#endif + + alutExit (); + return ok ? EXIT_SUCCESS : EXIT_FAILURE; +} diff --git a/recipes/freealut/config.yml b/recipes/freealut/config.yml new file mode 100644 index 0000000000000..b5c0d3cb2d409 --- /dev/null +++ b/recipes/freealut/config.yml @@ -0,0 +1,3 @@ +versions: + "1.1.0": + folder: all From c87d051c801658a61874d2de6b34975c248cc9d9 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Mon, 26 Feb 2024 08:25:06 -0600 Subject: [PATCH 095/405] (#20905) freeglut: Add support for Wayland * freeglut: Add support for Wayland * Add patch for 3.2.2 * Use VirtualBuildEnv * Ensure that the GLES libraries are linked in from the libglvnd Conan package * Revert "Use VirtualBuildEnv" This reverts commit b32ddc8c4abd14d89cfa8b9f19967ea01cb5b8bf. * Drop v1 test packages * Bump CMake minimum required to 3.11 to enable policy CMP0072 * Bump the minimum required CMake version * Add a patch to include a missing function definition * Update patches to match the fixes merged upstream * Add patch to pick up the correct GLES libraries * Only allow the gles option on Linux and FreeBSD * Set default for get_safe * Default GLES as the upstream project does --- recipes/freeglut/all/conandata.yml | 36 +++++++ recipes/freeglut/all/conanfile.py | 101 ++++++++++++++++-- ...e-and-pkg_check_modules-to-find-more.patch | 94 ++++++++++++++++ ...defined-reference-to-glutCreateMenuU.patch | 25 +++++ ...-to-locate-GL-libraries-not-provided.patch | 65 +++++++++++ ...e-and-pkg_check_modules-to-find-more.patch | 94 ++++++++++++++++ ...-to-locate-GL-libraries-not-provided.patch | 65 +++++++++++ ...e-and-pkg_check_modules-to-find-more.patch | 100 +++++++++++++++++ ...-to-locate-GL-libraries-not-provided.patch | 65 +++++++++++ .../freeglut/all/test_package/CMakeLists.txt | 2 +- .../all/test_package_module/CMakeLists.txt | 2 +- .../all/test_v1_package/CMakeLists.txt | 8 -- .../freeglut/all/test_v1_package/conanfile.py | 22 ---- .../all/test_v1_package_module/CMakeLists.txt | 8 -- .../all/test_v1_package_module/conanfile.py | 22 ---- 15 files changed, 636 insertions(+), 73 deletions(-) create mode 100644 recipes/freeglut/all/patches/3.2.1-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch create mode 100644 recipes/freeglut/all/patches/3.2.1-0002-fixed-android-undefined-reference-to-glutCreateMenuU.patch create mode 100644 recipes/freeglut/all/patches/3.2.1-0003-Use-find_library-to-locate-GL-libraries-not-provided.patch create mode 100644 recipes/freeglut/all/patches/3.2.2-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch create mode 100644 recipes/freeglut/all/patches/3.2.2-0002-Use-find_library-to-locate-GL-libraries-not-provided.patch create mode 100644 recipes/freeglut/all/patches/3.4.0-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch create mode 100644 recipes/freeglut/all/patches/3.4.0-0002-Use-find_library-to-locate-GL-libraries-not-provided.patch delete mode 100644 recipes/freeglut/all/test_v1_package/CMakeLists.txt delete mode 100644 recipes/freeglut/all/test_v1_package/conanfile.py delete mode 100644 recipes/freeglut/all/test_v1_package_module/CMakeLists.txt delete mode 100644 recipes/freeglut/all/test_v1_package_module/conanfile.py diff --git a/recipes/freeglut/all/conandata.yml b/recipes/freeglut/all/conandata.yml index e132a04abbb80..7ae0b0d3b9c12 100644 --- a/recipes/freeglut/all/conandata.yml +++ b/recipes/freeglut/all/conandata.yml @@ -8,3 +8,39 @@ sources: "3.2.1": sha256: "d4000e02102acaf259998c870e25214739d1f16f67f99cb35e4f46841399da68" url: "https://github.com/FreeGLUTProject/freeglut/releases/download/v3.2.1/freeglut-3.2.1.tar.gz" +patches: + "3.4.0": + - patch_file: "patches/3.4.0-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch" + patch_description: "Use find_package and pkg_check_modules to find dependencies" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/147" + patch_type: "conan" + - patch_file: "patches/3.4.0-0002-Use-find_library-to-locate-GL-libraries-not-provided.patch" + patch_description: "Use find_library to locate GL libraries" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/148" + patch_type: "portability" + "3.2.2": + - patch_file: "patches/3.2.1-0002-fixed-android-undefined-reference-to-glutCreateMenuU.patch" + patch_description: "Add a missing function definition" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/122" + patch_type: "portability" + - patch_file: "patches/3.2.2-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch" + patch_description: "Use find_package and pkg_check_modules to find dependencies" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/147" + patch_type: "conan" + - patch_file: "patches/3.2.2-0002-Use-find_library-to-locate-GL-libraries-not-provided.patch" + patch_description: "Use find_library to locate GL libraries" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/148" + patch_type: "portability" + "3.2.1": + - patch_file: "patches/3.2.1-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch" + patch_description: "Use find_package and pkg_check_modules to find dependencies" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/147" + patch_type: "conan" + - patch_file: "patches/3.2.1-0002-fixed-android-undefined-reference-to-glutCreateMenuU.patch" + patch_description: "Add a missing function definition" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/122" + patch_type: "portability" + - patch_file: "patches/3.2.1-0003-Use-find_library-to-locate-GL-libraries-not-provided.patch" + patch_description: "Use find_library to locate GL libraries" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/148" + patch_type: "portability" diff --git a/recipes/freeglut/all/conanfile.py b/recipes/freeglut/all/conanfile.py index d8b38c56cfa8c..941d6703c1432 100644 --- a/recipes/freeglut/all/conanfile.py +++ b/recipes/freeglut/all/conanfile.py @@ -1,7 +1,8 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import collect_libs, copy, get, rmdir +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, rmdir +from conan.tools.gnu import PkgConfigDeps from conan.tools.scm import Version import os @@ -11,7 +12,7 @@ class freeglutConan(ConanFile): name = "freeglut" description = "Open-source alternative to the OpenGL Utility Toolkit (GLUT) library" - topics = ("opengl", "gl", "glut", "utility", "toolkit", "graphics") + topics = ("gl", "glut", "graphics," "opengl", "toolkit", "utility") url = "https://github.com/conan-io/conan-center-index" homepage = "http://freeglut.sourceforge.net" license = "X11" @@ -24,6 +25,8 @@ class freeglutConan(ConanFile): "print_errors_at_runtime": [True, False], "print_warnings_at_runtime": [True, False], "replace_glut": [True, False], + "with_wayland": [True, False], + } default_options = { "shared": False, @@ -32,11 +35,41 @@ class freeglutConan(ConanFile): "print_errors_at_runtime": True, "print_warnings_at_runtime": True, "replace_glut": True, + "with_wayland": True, } + @property + def _requires_libglvnd_egl(self): + return self._requires_libglvnd_gles or self.options.get_safe("with_wayland") + + @property + def _requires_libglvnd_gles(self): + return self._with_libglvnd and self.options.get_safe("gles") + + @property + def _requires_libglvnd_glx(self): + return self._with_libglvnd and not self.options.get_safe("gles") + + @property + def _with_libglvnd(self): + return self.settings.os in ["FreeBSD", "Linux"] + + @property + def _with_x11(self): + return self.settings.os in ["FreeBSD", "Linux"] and not self.options.get_safe("with_wayland") + + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": - del self.options.fPIC + self.options.rm_safe("fPIC") + if self.settings.os not in ["Android", "FreeBSD", "Linux"]: + self.options.rm_safe("gles") + else: + self.options.gles = self.settings.os == "Android" + if self.settings.os != "Linux": + self.options.rm_safe("with_wayland") def configure(self): if self.options.shared: @@ -44,13 +77,29 @@ def configure(self): self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") + if self._requires_libglvnd_egl: + self.options["libglvnd"].egl = True + if self._requires_libglvnd_gles: + self.options["libglvnd"].gles1 = True + self.options["libglvnd"].gles2 = True + if self._requires_libglvnd_glx: + self.options["libglvnd"].glx = True + if self.options.get_safe("with_wayland"): + self.options["xkbcommon"].with_wayland = True + def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("opengl/system") self.requires("glu/system") - if self.settings.os == "Linux": + if self._with_libglvnd: + self.requires("libglvnd/1.7.0") + else: + self.requires("opengl/system") + if self.options.get_safe("with_wayland"): + self.requires("wayland/1.22.0") + self.requires("xkbcommon/1.6.0") + if self._with_x11: self.requires("xorg/system") def validate(self): @@ -64,6 +113,17 @@ def validate(self): (self.settings.compiler == "clang" and Version(self.settings.compiler.version) >= "11.0"): # see https://github.com/dcnieho/FreeGLUT/issues/86 raise ConanInvalidConfiguration(f"{self.ref} does not support gcc >= 10 and clang >= 11") + if self._requires_libglvnd_egl and not self.dependencies["libglvnd"].options.egl: + raise ConanInvalidConfiguration(f"{self.ref} requires the egl option of libglvnd to be enabled when either the gles option or with_wayland option is enabled") + if self._requires_libglvnd_gles and not self.dependencies["libglvnd"].options.gles1: + raise ConanInvalidConfiguration(f"{self.ref} requires the gles1 option of libglvnd to be enabled when the gles option is enabled") + if self._requires_libglvnd_gles and not self.dependencies["libglvnd"].options.gles2: + raise ConanInvalidConfiguration(f"{self.ref} requires the gles2 option of libglvnd to be enabled when the gles option is enabled") + if self._requires_libglvnd_glx and not self.dependencies["libglvnd"].options.glx: + raise ConanInvalidConfiguration(f"{self.ref} requires the glx option of libglvnd to be enabled when the gles option is disabled") + if self.options.get_safe("with_wayland") and not self.dependencies["xkbcommon"].options.with_wayland: + raise ConanInvalidConfiguration(f"{self.ref} requires the with_wayland option of xkbcommon to be enabled when the with_wayland option is enabled") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -73,22 +133,28 @@ def generate(self): tc.variables["FREEGLUT_BUILD_DEMOS"] = False tc.variables["FREEGLUT_BUILD_STATIC_LIBS"] = not self.options.shared tc.variables["FREEGLUT_BUILD_SHARED_LIBS"] = self.options.shared - tc.variables["FREEGLUT_GLES"] = self.options.gles + tc.variables["FREEGLUT_GLES"] = self.options.get_safe("gles", False) tc.variables["FREEGLUT_PRINT_ERRORS"] = self.options.print_errors_at_runtime tc.variables["FREEGLUT_PRINT_WARNINGS"] = self.options.print_warnings_at_runtime + tc.variables["FREEGLUT_WAYLAND"] = self.options.get_safe("with_wayland", False) tc.variables["FREEGLUT_INSTALL_PDB"] = False tc.variables["INSTALL_PDB"] = False tc.variables["FREEGLUT_REPLACE_GLUT"] = self.options.replace_glut tc.preprocessor_definitions["FREEGLUT_LIB_PRAGMAS"] = "0" tc.generate() + cmake_deps = CMakeDeps(self) + cmake_deps.generate() + pkg_config_deps = PkgConfigDeps(self) + pkg_config_deps.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() def package(self): - copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) @@ -107,7 +173,7 @@ def package_info(self): # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed self.cpp_info.components["freeglut_"].libs = collect_libs(self) - if self.settings.os == "Linux": + if self.settings.os in ["FreeBSD", "Linux"]: self.cpp_info.components["freeglut_"].system_libs.extend(["pthread", "m", "dl", "rt"]) elif self.settings.os == "Windows": if not self.options.shared: @@ -124,6 +190,19 @@ def package_info(self): self.cpp_info.components["freeglut_"].names["cmake_find_package_multi"] = config_target self.cpp_info.components["freeglut_"].set_property("cmake_target_name", f"FreeGLUT::{config_target}") self.cpp_info.components["freeglut_"].set_property("pkg_config_name", pkg_config) - self.cpp_info.components["freeglut_"].requires.extend(["opengl::opengl", "glu::glu"]) - if self.settings.os == "Linux": + self.cpp_info.components["freeglut_"].requires.append("glu::glu") + if self._requires_libglvnd_egl: + self.cpp_info.components["freeglut_"].requires.append("libglvnd::egl") + if self._requires_libglvnd_gles: + self.cpp_info.components["freeglut_"].requires.append("libglvnd::gles1") + self.cpp_info.components["freeglut_"].requires.append("libglvnd::gles2") + if self._requires_libglvnd_glx: + self.cpp_info.components["freeglut_"].requires.append("libglvnd::gl") + if self._with_libglvnd: + self.cpp_info.components["freeglut_"].requires.append("libglvnd::opengl") + else: + self.cpp_info.components["freeglut_"].requires.append("opengl::opengl") + if self._with_x11: self.cpp_info.components["freeglut_"].requires.append("xorg::xorg") + if self.options.get_safe("with_wayland"): + self.cpp_info.components["freeglut_"].requires.extend(["wayland::wayland-client", "wayland::wayland-cursor", "wayland::wayland-egl", "xkbcommon::xkbcommon"]) diff --git a/recipes/freeglut/all/patches/3.2.1-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch b/recipes/freeglut/all/patches/3.2.1-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch new file mode 100644 index 0000000000000..9e1c3b9056866 --- /dev/null +++ b/recipes/freeglut/all/patches/3.2.1-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch @@ -0,0 +1,94 @@ +From 4c573afc0453f3572c494d22b4f3bad9a9ce4073 Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Tue, 7 Nov 2023 07:38:42 -0600 +Subject: [PATCH] Use find_package and pkg_check_modules to find more + dependencies + +This commit enhances the use of the FindOpenGL CMake module. +This requires CMake version 3.10 for the OpenGL::EGL imported target. +CMake 3.11 and later enable CMake policy CMP0072. +This prefers the GLVND libraries when available. + +Finds the Wayland and xkbcommon dependencies with pkg_check_modules. +This works with the pkg-config files provided by the upstream projects. +--- + CMakeLists.txt | 53 +++++++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 46 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6f403afa..a2a95c02 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,9 @@ +-CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0 FATAL_ERROR) +-PROJECT(freeglut) ++CMAKE_MINIMUM_REQUIRED(VERSION 3.1 FATAL_ERROR) ++PROJECT(freeglut LANGUAGES C) ++ ++if (POLICY CMP0072) ++ cmake_policy(SET CMP0072 NEW) ++endif() + + # for multiarch LIBDIR support (requires cmake>=2.8.8) + INCLUDE(GNUInstallDirs) +@@ -257,17 +261,52 @@ ENDIF() + # GLES1 and GLES2 libraries are compatible and can be co-linked. + IF(FREEGLUT_GLES) + LIST(APPEND PUBLIC_DEFINITIONS -DFREEGLUT_GLES) +- LIST(APPEND LIBS GLESv2 GLESv1_CM EGL) ++ if(NOT CMAKE_VERSION VERSION_LESS "3.27") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL GLES2 OpenGL) ++ LIST(APPEND LIBS GLESv1_CM OpenGL::EGL OpenGL::GLES2 OpenGL::OpenGL) ++ elseif(NOT CMAKE_VERSION VERSION_LESS "3.10") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL OpenGL) ++ LIST(APPEND LIBS GLESv2 GLESv1_CM OpenGL::EGL OpenGL::OpenGL) ++ else() ++ FIND_PACKAGE(OpenGL REQUIRED) ++ LIST(APPEND LIBS EGL GLESv2 GLESv1_CM) ++ endif() + ELSE() +- FIND_PACKAGE(OpenGL REQUIRED) +- LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) +- INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) ++ if(NOT CMAKE_VERSION VERSION_LESS "3.10") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS OpenGL) ++ LIST(APPEND LIBS OpenGL::GL) ++ else() ++ FIND_PACKAGE(OpenGL REQUIRED) ++ LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) ++ INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) ++ endif() + ENDIF() + + # For Wayland: compile with -DFREEGLUT_WAYLAND and pull EGL + IF(FREEGLUT_WAYLAND) + ADD_DEFINITIONS(-DFREEGLUT_WAYLAND) +- LIST(APPEND LIBS wayland-client wayland-cursor wayland-egl EGL xkbcommon) ++ INCLUDE(FindPkgConfig) ++ if(NOT CMAKE_VERSION VERSION_LESS "3.10") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL OpenGL) ++ LIST(APPEND LIBS OpenGL::EGL OpenGL::OpenGL) ++ else() ++ FIND_PACKAGE(OpenGL REQUIRED) ++ LIST(APPEND LIBS EGL) ++ endif() ++ if(NOT CMAKE_VERSION VERSION_LESS "3.6") ++ PKG_CHECK_MODULES(wayland-client REQUIRED IMPORTED_TARGET wayland-client) ++ PKG_CHECK_MODULES(wayland-cursor REQUIRED IMPORTED_TARGET wayland-cursor) ++ PKG_CHECK_MODULES(wayland-egl REQUIRED IMPORTED_TARGET wayland-egl) ++ PKG_CHECK_MODULES(xkbcommon REQUIRED IMPORTED_TARGET xkbcommon) ++ LIST(APPEND LIBS PkgConfig::wayland-client PkgConfig::wayland-cursor PkgConfig::wayland-egl PkgConfig::xkbcommon) ++ else() ++ PKG_CHECK_MODULES(wayland-client REQUIRED) ++ PKG_CHECK_MODULES(wayland-cursor REQUIRED) ++ PKG_CHECK_MODULES(wayland-egl REQUIRED) ++ PKG_CHECK_MODULES(xkbcommon REQUIRED) ++ LIST(APPEND LIBS ${wayland-client_LINK_LIBRARIES} ${wayland-cursor_LINK_LIBRARIES} ${wayland-egl_LINK_LIBRARIES} ${xkbcommon_LINK_LIBRARIES}) ++ INCLUDE_DIRECTORIES(${wayland-client_INCLUDE_DIRS} ${wayland-cursor_INCLUDE_DIRS} ${wayland-egl_INCLUDE_DIRS} ${xkbcommon_INCLUDE_DIRS}) ++ endif() + ENDIF() + + # lib m for math, not needed on windows +-- +2.41.0 + diff --git a/recipes/freeglut/all/patches/3.2.1-0002-fixed-android-undefined-reference-to-glutCreateMenuU.patch b/recipes/freeglut/all/patches/3.2.1-0002-fixed-android-undefined-reference-to-glutCreateMenuU.patch new file mode 100644 index 0000000000000..039c12be9d43d --- /dev/null +++ b/recipes/freeglut/all/patches/3.2.1-0002-fixed-android-undefined-reference-to-glutCreateMenuU.patch @@ -0,0 +1,25 @@ +From 782e63b2eacd47155864d0d1d9b70615418e3083 Mon Sep 17 00:00:00 2001 +From: Jonatha Gabriel +Date: Sun, 4 Sep 2022 23:25:23 -0300 +Subject: [PATCH] fixed android undefined reference to glutCreateMenuUcall + +--- + src/gles_stubs.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/gles_stubs.c b/src/gles_stubs.c +index bc87c0d8..63a19209 100644 +--- a/src/gles_stubs.c ++++ b/src/gles_stubs.c +@@ -18,6 +18,8 @@ GLboolean fgCheckActiveMenu ( SFG_Window *window, int button, GLboolean pressed, + return GL_FALSE; + } + ++int FGAPIENTRY glutCreateMenuUcall( FGCBMenuUC callback, FGCBUserData userData ) { return 0; } ++ + int glutCreateMenu( void (* callback)( int menu ) ) { return 0; } + void glutDestroyMenu( int menu ) {} + int glutGetMenu( void ) { return 0; } +-- +2.41.0 + diff --git a/recipes/freeglut/all/patches/3.2.1-0003-Use-find_library-to-locate-GL-libraries-not-provided.patch b/recipes/freeglut/all/patches/3.2.1-0003-Use-find_library-to-locate-GL-libraries-not-provided.patch new file mode 100644 index 0000000000000..2a08c1427e3f1 --- /dev/null +++ b/recipes/freeglut/all/patches/3.2.1-0003-Use-find_library-to-locate-GL-libraries-not-provided.patch @@ -0,0 +1,65 @@ +From 9564dbb645a4be08aff7b65ac35b56e185a7598c Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Tue, 7 Nov 2023 11:00:39 -0600 +Subject: [PATCH] Use find_library to locate GL libraries not provided by + FindOpenGL + +FindOpenGL is used to find the OpenGL libraries. +It doesn't find all of the necessary libraries, however. +These missing libraries have been added to the link line directly. +This is problematic when FindOpenGL is pointed at OpenGL libraries somewhere outside LD_LIBRARY_PATH and the system's default linker paths. +In such cases, the libraries won't be found at link time. + +CMake's find_library function can be used instead to add the libraries as this commit does. +This function can use the location of the GL libraries that were already found as a hint. +Furthermore, this allows consumers to use CMake cache variables to set the exact libraries to use if needed. +--- + CMakeLists.txt | 21 +++++++++++++++++---- + 1 file changed, 17 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a2a95c02..772e73f3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -263,13 +263,23 @@ IF(FREEGLUT_GLES) + LIST(APPEND PUBLIC_DEFINITIONS -DFREEGLUT_GLES) + if(NOT CMAKE_VERSION VERSION_LESS "3.27") + FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL GLES2 OpenGL) +- LIST(APPEND LIBS GLESv1_CM OpenGL::EGL OpenGL::GLES2 OpenGL::OpenGL) ++ CMAKE_PATH(GET OPENGL_gles2_LIBRARY PARENT_PATH _OPENGL_LIBDIR) ++ FIND_LIBRARY(GLES1_LIBRARY GLESv1_CM HINTS ${_OPENGL_LIBDIR} REQUIRED) ++ LIST(APPEND LIBS ${GLES1_LIBRARY} OpenGL::EGL OpenGL::GLES2 OpenGL::OpenGL) + elseif(NOT CMAKE_VERSION VERSION_LESS "3.10") + FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL OpenGL) +- LIST(APPEND LIBS GLESv2 GLESv1_CM OpenGL::EGL OpenGL::OpenGL) ++ GET_FILENAME_COMPONENT(_OPENGL_LIBDIR ${OPENGL_egl_LIBRARY} DIRECTORY) ++ FIND_LIBRARY(GLES1_LIBRARY GLESv1_CM HINTS ${_OPENGL_LIBDIR}) ++ FIND_LIBRARY(GLES2_LIBRARY GLESv2 HINTS ${_OPENGL_LIBDIR}) ++ LIST(APPEND LIBS ${GLES1_LIBRARY} ${GLES2_LIBRARY} OpenGL::EGL OpenGL::OpenGL) + else() + FIND_PACKAGE(OpenGL REQUIRED) +- LIST(APPEND LIBS EGL GLESv2 GLESv1_CM) ++ LIST(GET ${OPENGL_LIBRARIES} 0 _OPENGL_LIB) ++ GET_FILENAME_COMPONENT(_OPENGL_LIBDIR ${_OPENGL_LIB} DIRECTORY) ++ FIND_LIBRARY(EGL_LIBRARY EGL HINTS ${_OPENGL_LIBDIR}) ++ FIND_LIBRARY(GLES1_LIBRARY GLESv1_CM HINTS ${_OPENGL_LIBDIR}) ++ FIND_LIBRARY(GLES2_LIBRARY GLESv2 HINTS ${_OPENGL_LIBDIR}) ++ LIST(APPEND LIBS ${EGL_LIBRARY} ${GLES1_LIBRARY} ${GLES2_LIBRARY}) + endif() + ELSE() + if(NOT CMAKE_VERSION VERSION_LESS "3.10") +@@ -291,7 +301,10 @@ IF(FREEGLUT_WAYLAND) + LIST(APPEND LIBS OpenGL::EGL OpenGL::OpenGL) + else() + FIND_PACKAGE(OpenGL REQUIRED) +- LIST(APPEND LIBS EGL) ++ LIST(GET ${OPENGL_LIBRARIES} 0 _OPENGL_LIB) ++ GET_FILENAME_COMPONENT(_OPENGL_LIBDIR ${_OPENGL_LIB} DIRECTORY) ++ FIND_LIBRARY(EGL_LIBRARY EGL HINTS ${_OPENGL_LIBDIR}) ++ LIST(APPEND LIBS ${EGL_LIBRARY}) + endif() + if(NOT CMAKE_VERSION VERSION_LESS "3.6") + PKG_CHECK_MODULES(wayland-client REQUIRED IMPORTED_TARGET wayland-client) +-- +2.41.0 + diff --git a/recipes/freeglut/all/patches/3.2.2-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch b/recipes/freeglut/all/patches/3.2.2-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch new file mode 100644 index 0000000000000..83ea577575c3c --- /dev/null +++ b/recipes/freeglut/all/patches/3.2.2-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch @@ -0,0 +1,94 @@ +From 4b4f63a41d4ee33a4b3c048bb4281051acbad106 Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Tue, 7 Nov 2023 07:38:42 -0600 +Subject: [PATCH] Use find_package and pkg_check_modules to find more + dependencies + +This commit enhances the use of the FindOpenGL CMake module. +This requires CMake version 3.10 for the OpenGL::EGL imported target. +CMake 3.11 and later enable CMake policy CMP0072. +This prefers the GLVND libraries when available. + +Finds the Wayland and xkbcommon dependencies with pkg_check_modules. +This works with the pkg-config files provided by the upstream projects. +--- + CMakeLists.txt | 53 +++++++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 46 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ac8c8df3..f97f14ff 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,9 @@ +-CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0 FATAL_ERROR) +-PROJECT(freeglut) ++CMAKE_MINIMUM_REQUIRED(VERSION 3.1 FATAL_ERROR) ++PROJECT(freeglut LANGUAGES C) ++ ++if (POLICY CMP0072) ++ cmake_policy(SET CMP0072 NEW) ++endif() + + # for multiarch LIBDIR support (requires cmake>=2.8.8) + INCLUDE(GNUInstallDirs) +@@ -261,17 +265,52 @@ ENDIF() + # GLES1 and GLES2 libraries are compatible and can be co-linked. + IF(FREEGLUT_GLES) + LIST(APPEND PUBLIC_DEFINITIONS -DFREEGLUT_GLES) +- LIST(APPEND LIBS GLESv2 GLESv1_CM EGL) ++ if(NOT CMAKE_VERSION VERSION_LESS "3.27") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL GLES2 OpenGL) ++ LIST(APPEND LIBS GLESv1_CM OpenGL::EGL OpenGL::GLES2 OpenGL::OpenGL) ++ elseif(NOT CMAKE_VERSION VERSION_LESS "3.10") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL OpenGL) ++ LIST(APPEND LIBS GLESv2 GLESv1_CM OpenGL::EGL OpenGL::OpenGL) ++ else() ++ FIND_PACKAGE(OpenGL REQUIRED) ++ LIST(APPEND LIBS EGL GLESv2 GLESv1_CM) ++ endif() + ELSE() +- FIND_PACKAGE(OpenGL REQUIRED) +- LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) +- INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) ++ if(NOT CMAKE_VERSION VERSION_LESS "3.10") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS OpenGL) ++ LIST(APPEND LIBS OpenGL::GL) ++ else() ++ FIND_PACKAGE(OpenGL REQUIRED) ++ LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) ++ INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) ++ endif() + ENDIF() + + # For Wayland: compile with -DFREEGLUT_WAYLAND and pull EGL + IF(FREEGLUT_WAYLAND) + ADD_DEFINITIONS(-DFREEGLUT_WAYLAND) +- LIST(APPEND LIBS wayland-client wayland-cursor wayland-egl EGL xkbcommon) ++ INCLUDE(FindPkgConfig) ++ if(NOT CMAKE_VERSION VERSION_LESS "3.10") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL OpenGL) ++ LIST(APPEND LIBS OpenGL::EGL OpenGL::OpenGL) ++ else() ++ FIND_PACKAGE(OpenGL REQUIRED) ++ LIST(APPEND LIBS EGL) ++ endif() ++ if(NOT CMAKE_VERSION VERSION_LESS "3.6") ++ PKG_CHECK_MODULES(wayland-client REQUIRED IMPORTED_TARGET wayland-client) ++ PKG_CHECK_MODULES(wayland-cursor REQUIRED IMPORTED_TARGET wayland-cursor) ++ PKG_CHECK_MODULES(wayland-egl REQUIRED IMPORTED_TARGET wayland-egl) ++ PKG_CHECK_MODULES(xkbcommon REQUIRED IMPORTED_TARGET xkbcommon) ++ LIST(APPEND LIBS PkgConfig::wayland-client PkgConfig::wayland-cursor PkgConfig::wayland-egl PkgConfig::xkbcommon) ++ else() ++ PKG_CHECK_MODULES(wayland-client REQUIRED) ++ PKG_CHECK_MODULES(wayland-cursor REQUIRED) ++ PKG_CHECK_MODULES(wayland-egl REQUIRED) ++ PKG_CHECK_MODULES(xkbcommon REQUIRED) ++ LIST(APPEND LIBS ${wayland-client_LINK_LIBRARIES} ${wayland-cursor_LINK_LIBRARIES} ${wayland-egl_LINK_LIBRARIES} ${xkbcommon_LINK_LIBRARIES}) ++ INCLUDE_DIRECTORIES(${wayland-client_INCLUDE_DIRS} ${wayland-cursor_INCLUDE_DIRS} ${wayland-egl_INCLUDE_DIRS} ${xkbcommon_INCLUDE_DIRS}) ++ endif() + ENDIF() + + # lib m for math, not needed on windows +-- +2.41.0 + diff --git a/recipes/freeglut/all/patches/3.2.2-0002-Use-find_library-to-locate-GL-libraries-not-provided.patch b/recipes/freeglut/all/patches/3.2.2-0002-Use-find_library-to-locate-GL-libraries-not-provided.patch new file mode 100644 index 0000000000000..42975bdd0a638 --- /dev/null +++ b/recipes/freeglut/all/patches/3.2.2-0002-Use-find_library-to-locate-GL-libraries-not-provided.patch @@ -0,0 +1,65 @@ +From 0bf1cd0cf4291ef130dcbf708128c72440ed6178 Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Tue, 7 Nov 2023 11:00:39 -0600 +Subject: [PATCH] Use find_library to locate GL libraries not provided by + FindOpenGL + +FindOpenGL is used to find the OpenGL libraries. +It doesn't find all of the necessary libraries, however. +These missing libraries have been added to the link line directly. +This is problematic when FindOpenGL is pointed at OpenGL libraries somewhere outside LD_LIBRARY_PATH and the system's default linker paths. +In such cases, the libraries won't be found at link time. + +CMake's find_library function can be used instead to add the libraries as this commit does. +This function can use the location of the GL libraries that were already found as a hint. +Furthermore, this allows consumers to use CMake cache variables to set the exact libraries to use if needed. +--- + CMakeLists.txt | 21 +++++++++++++++++---- + 1 file changed, 17 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f97f14ff..c2549b1b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -267,13 +267,23 @@ IF(FREEGLUT_GLES) + LIST(APPEND PUBLIC_DEFINITIONS -DFREEGLUT_GLES) + if(NOT CMAKE_VERSION VERSION_LESS "3.27") + FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL GLES2 OpenGL) +- LIST(APPEND LIBS GLESv1_CM OpenGL::EGL OpenGL::GLES2 OpenGL::OpenGL) ++ CMAKE_PATH(GET OPENGL_gles2_LIBRARY PARENT_PATH _OPENGL_LIBDIR) ++ FIND_LIBRARY(GLES1_LIBRARY GLESv1_CM HINTS ${_OPENGL_LIBDIR} REQUIRED) ++ LIST(APPEND LIBS ${GLES1_LIBRARY} OpenGL::EGL OpenGL::GLES2 OpenGL::OpenGL) + elseif(NOT CMAKE_VERSION VERSION_LESS "3.10") + FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL OpenGL) +- LIST(APPEND LIBS GLESv2 GLESv1_CM OpenGL::EGL OpenGL::OpenGL) ++ GET_FILENAME_COMPONENT(_OPENGL_LIBDIR ${OPENGL_egl_LIBRARY} DIRECTORY) ++ FIND_LIBRARY(GLES1_LIBRARY GLESv1_CM HINTS ${_OPENGL_LIBDIR}) ++ FIND_LIBRARY(GLES2_LIBRARY GLESv2 HINTS ${_OPENGL_LIBDIR}) ++ LIST(APPEND LIBS ${GLES1_LIBRARY} ${GLES2_LIBRARY} OpenGL::EGL OpenGL::OpenGL) + else() + FIND_PACKAGE(OpenGL REQUIRED) +- LIST(APPEND LIBS EGL GLESv2 GLESv1_CM) ++ LIST(GET ${OPENGL_LIBRARIES} 0 _OPENGL_LIB) ++ GET_FILENAME_COMPONENT(_OPENGL_LIBDIR ${_OPENGL_LIB} DIRECTORY) ++ FIND_LIBRARY(EGL_LIBRARY EGL HINTS ${_OPENGL_LIBDIR}) ++ FIND_LIBRARY(GLES1_LIBRARY GLESv1_CM HINTS ${_OPENGL_LIBDIR}) ++ FIND_LIBRARY(GLES2_LIBRARY GLESv2 HINTS ${_OPENGL_LIBDIR}) ++ LIST(APPEND LIBS ${EGL_LIBRARY} ${GLES1_LIBRARY} ${GLES2_LIBRARY}) + endif() + ELSE() + if(NOT CMAKE_VERSION VERSION_LESS "3.10") +@@ -295,7 +305,10 @@ IF(FREEGLUT_WAYLAND) + LIST(APPEND LIBS OpenGL::EGL OpenGL::OpenGL) + else() + FIND_PACKAGE(OpenGL REQUIRED) +- LIST(APPEND LIBS EGL) ++ LIST(GET ${OPENGL_LIBRARIES} 0 _OPENGL_LIB) ++ GET_FILENAME_COMPONENT(_OPENGL_LIBDIR ${_OPENGL_LIB} DIRECTORY) ++ FIND_LIBRARY(EGL_LIBRARY EGL HINTS ${_OPENGL_LIBDIR}) ++ LIST(APPEND LIBS ${EGL_LIBRARY}) + endif() + if(NOT CMAKE_VERSION VERSION_LESS "3.6") + PKG_CHECK_MODULES(wayland-client REQUIRED IMPORTED_TARGET wayland-client) +-- +2.41.0 + diff --git a/recipes/freeglut/all/patches/3.4.0-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch b/recipes/freeglut/all/patches/3.4.0-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch new file mode 100644 index 0000000000000..ccc7efdb7a68d --- /dev/null +++ b/recipes/freeglut/all/patches/3.4.0-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch @@ -0,0 +1,100 @@ +From c60bc900b74d4e18994200550d26ae860899003f Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Thu, 2 Nov 2023 15:27:49 -0500 +Subject: [PATCH] Use find_package and pkg_check_modules to find more + dependencies + +This commit enhances the use of the FindOpenGL CMake module. +This requires CMake version 3.10 for the OpenGL::EGL imported target. +CMake 3.11 and later enable CMake policy CMP0072. +This prefers the GLVND libraries when available. + +Finds the Wayland and xkbcommon dependencies with pkg_check_modules. +This works with the pkg-config files provided by the upstream projects. +--- + CMakeLists.txt | 53 +++++++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 46 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 832d8672..87a54ae5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,9 @@ +-CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0 FATAL_ERROR) +-PROJECT(freeglut C) ++CMAKE_MINIMUM_REQUIRED(VERSION 3.1 FATAL_ERROR) ++PROJECT(freeglut LANGUAGES C) ++ ++if (POLICY CMP0072) ++ cmake_policy(SET CMP0072 NEW) ++endif() + + # for multiarch LIBDIR support (requires cmake>=2.8.8) + INCLUDE(GNUInstallDirs) +@@ -292,7 +296,16 @@ ENDIF() + # GLES1 and GLES2 libraries are compatible and can be co-linked. + IF(FREEGLUT_GLES) + LIST(APPEND PUBLIC_DEFINITIONS -DFREEGLUT_GLES) +- LIST(APPEND LIBS GLESv2 GLESv1_CM EGL) ++ if(NOT CMAKE_VERSION VERSION_LESS "3.27") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL GLES2 OpenGL) ++ LIST(APPEND LIBS GLESv1_CM OpenGL::EGL OpenGL::GLES2 OpenGL::OpenGL) ++ elseif(NOT CMAKE_VERSION VERSION_LESS "3.10") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL OpenGL) ++ LIST(APPEND LIBS GLESv2 GLESv1_CM OpenGL::EGL OpenGL::OpenGL) ++ else() ++ FIND_PACKAGE(OpenGL REQUIRED) ++ LIST(APPEND LIBS EGL GLESv2 GLESv1_CM) ++ endif() + ELSE() + # On OS X, we need to link against the X11 OpenGL libraries, NOT the Cocoa OpenGL libraries. + # To do that, you need to manually find two of the libraries before calling FindOpenGL +@@ -304,15 +317,41 @@ ELSE() + find_library(OPENGL_glu_LIBRARY NAME GLU HINTS ${X11_LIB_PATH}) + endif() + +- FIND_PACKAGE(OpenGL REQUIRED) +- LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) +- INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) ++ if(NOT CMAKE_VERSION VERSION_LESS "3.10") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS OpenGL) ++ LIST(APPEND LIBS OpenGL::GL) ++ else() ++ FIND_PACKAGE(OpenGL REQUIRED) ++ LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) ++ INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) ++ endif() + ENDIF() + + # For Wayland: compile with -DFREEGLUT_WAYLAND and pull EGL + IF(FREEGLUT_WAYLAND) + ADD_DEFINITIONS(-DFREEGLUT_WAYLAND) +- LIST(APPEND LIBS wayland-client wayland-cursor wayland-egl EGL xkbcommon) ++ INCLUDE(FindPkgConfig) ++ if(NOT CMAKE_VERSION VERSION_LESS "3.10") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL OpenGL) ++ LIST(APPEND LIBS OpenGL::EGL OpenGL::OpenGL) ++ else() ++ FIND_PACKAGE(OpenGL REQUIRED) ++ LIST(APPEND LIBS EGL) ++ endif() ++ if(NOT CMAKE_VERSION VERSION_LESS "3.6") ++ PKG_CHECK_MODULES(wayland-client REQUIRED IMPORTED_TARGET wayland-client) ++ PKG_CHECK_MODULES(wayland-cursor REQUIRED IMPORTED_TARGET wayland-cursor) ++ PKG_CHECK_MODULES(wayland-egl REQUIRED IMPORTED_TARGET wayland-egl) ++ PKG_CHECK_MODULES(xkbcommon REQUIRED IMPORTED_TARGET xkbcommon) ++ LIST(APPEND LIBS PkgConfig::wayland-client PkgConfig::wayland-cursor PkgConfig::wayland-egl PkgConfig::xkbcommon) ++ else() ++ PKG_CHECK_MODULES(wayland-client REQUIRED) ++ PKG_CHECK_MODULES(wayland-cursor REQUIRED) ++ PKG_CHECK_MODULES(wayland-egl REQUIRED) ++ PKG_CHECK_MODULES(xkbcommon REQUIRED) ++ LIST(APPEND LIBS ${wayland-client_LINK_LIBRARIES} ${wayland-cursor_LINK_LIBRARIES} ${wayland-egl_LINK_LIBRARIES} ${xkbcommon_LINK_LIBRARIES}) ++ INCLUDE_DIRECTORIES(${wayland-client_INCLUDE_DIRS} ${wayland-cursor_INCLUDE_DIRS} ${wayland-egl_INCLUDE_DIRS} ${xkbcommon_INCLUDE_DIRS}) ++ endif() + ENDIF() + + # lib m for math, not needed on windows +-- +2.41.0 + diff --git a/recipes/freeglut/all/patches/3.4.0-0002-Use-find_library-to-locate-GL-libraries-not-provided.patch b/recipes/freeglut/all/patches/3.4.0-0002-Use-find_library-to-locate-GL-libraries-not-provided.patch new file mode 100644 index 0000000000000..585a7de277647 --- /dev/null +++ b/recipes/freeglut/all/patches/3.4.0-0002-Use-find_library-to-locate-GL-libraries-not-provided.patch @@ -0,0 +1,65 @@ +From 4840a7d77e772d96074af64b6234cbc6e881d223 Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Tue, 7 Nov 2023 11:00:39 -0600 +Subject: [PATCH] Use find_library to locate GL libraries not provided by + FindOpenGL + +FindOpenGL is used to find the OpenGL libraries. +It doesn't find all of the necessary libraries, however. +These missing libraries have been added to the link line directly. +This is problematic when FindOpenGL is pointed at OpenGL libraries somewhere outside LD_LIBRARY_PATH and the system's default linker paths. +In such cases, the libraries won't be found at link time. + +CMake's find_library function can be used instead to add the libraries as this commit does. +This function can use the location of the GL libraries that were already found as a hint. +Furthermore, this allows consumers to use CMake cache variables to set the exact libraries to use if needed. +--- + CMakeLists.txt | 21 +++++++++++++++++---- + 1 file changed, 17 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 87a54ae5..afb4d735 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -298,13 +298,23 @@ IF(FREEGLUT_GLES) + LIST(APPEND PUBLIC_DEFINITIONS -DFREEGLUT_GLES) + if(NOT CMAKE_VERSION VERSION_LESS "3.27") + FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL GLES2 OpenGL) +- LIST(APPEND LIBS GLESv1_CM OpenGL::EGL OpenGL::GLES2 OpenGL::OpenGL) ++ CMAKE_PATH(GET OPENGL_gles2_LIBRARY PARENT_PATH _OPENGL_LIBDIR) ++ FIND_LIBRARY(GLES1_LIBRARY GLESv1_CM HINTS ${_OPENGL_LIBDIR} REQUIRED) ++ LIST(APPEND LIBS ${GLES1_LIBRARY} OpenGL::EGL OpenGL::GLES2 OpenGL::OpenGL) + elseif(NOT CMAKE_VERSION VERSION_LESS "3.10") + FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL OpenGL) +- LIST(APPEND LIBS GLESv2 GLESv1_CM OpenGL::EGL OpenGL::OpenGL) ++ GET_FILENAME_COMPONENT(_OPENGL_LIBDIR ${OPENGL_egl_LIBRARY} DIRECTORY) ++ FIND_LIBRARY(GLES1_LIBRARY GLESv1_CM HINTS ${_OPENGL_LIBDIR}) ++ FIND_LIBRARY(GLES2_LIBRARY GLESv2 HINTS ${_OPENGL_LIBDIR}) ++ LIST(APPEND LIBS ${GLES1_LIBRARY} ${GLES2_LIBRARY} OpenGL::EGL OpenGL::OpenGL) + else() + FIND_PACKAGE(OpenGL REQUIRED) +- LIST(APPEND LIBS EGL GLESv2 GLESv1_CM) ++ LIST(GET ${OPENGL_LIBRARIES} 0 _OPENGL_LIB) ++ GET_FILENAME_COMPONENT(_OPENGL_LIBDIR ${_OPENGL_LIB} DIRECTORY) ++ FIND_LIBRARY(EGL_LIBRARY EGL HINTS ${_OPENGL_LIBDIR}) ++ FIND_LIBRARY(GLES1_LIBRARY GLESv1_CM HINTS ${_OPENGL_LIBDIR}) ++ FIND_LIBRARY(GLES2_LIBRARY GLESv2 HINTS ${_OPENGL_LIBDIR}) ++ LIST(APPEND LIBS ${EGL_LIBRARY} ${GLES1_LIBRARY} ${GLES2_LIBRARY}) + endif() + ELSE() + # On OS X, we need to link against the X11 OpenGL libraries, NOT the Cocoa OpenGL libraries. +@@ -336,7 +346,10 @@ IF(FREEGLUT_WAYLAND) + LIST(APPEND LIBS OpenGL::EGL OpenGL::OpenGL) + else() + FIND_PACKAGE(OpenGL REQUIRED) +- LIST(APPEND LIBS EGL) ++ LIST(GET ${OPENGL_LIBRARIES} 0 _OPENGL_LIB) ++ GET_FILENAME_COMPONENT(_OPENGL_LIBDIR ${_OPENGL_LIB} DIRECTORY) ++ FIND_LIBRARY(EGL_LIBRARY EGL HINTS ${_OPENGL_LIBDIR}) ++ LIST(APPEND LIBS ${EGL_LIBRARY}) + endif() + if(NOT CMAKE_VERSION VERSION_LESS "3.6") + PKG_CHECK_MODULES(wayland-client REQUIRED IMPORTED_TARGET wayland-client) +-- +2.41.0 + diff --git a/recipes/freeglut/all/test_package/CMakeLists.txt b/recipes/freeglut/all/test_package/CMakeLists.txt index 8010c630a0049..9640aaa16d3b0 100644 --- a/recipes/freeglut/all/test_package/CMakeLists.txt +++ b/recipes/freeglut/all/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES C) find_package(FreeGLUT REQUIRED CONFIG) diff --git a/recipes/freeglut/all/test_package_module/CMakeLists.txt b/recipes/freeglut/all/test_package_module/CMakeLists.txt index cfee51d49e44b..91faaebf9894b 100644 --- a/recipes/freeglut/all/test_package_module/CMakeLists.txt +++ b/recipes/freeglut/all/test_package_module/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES C) find_package(GLUT REQUIRED MODULE) diff --git a/recipes/freeglut/all/test_v1_package/CMakeLists.txt b/recipes/freeglut/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 0d20897301b68..0000000000000 --- a/recipes/freeglut/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/freeglut/all/test_v1_package/conanfile.py b/recipes/freeglut/all/test_v1_package/conanfile.py deleted file mode 100644 index f044ed5376bf7..0000000000000 --- a/recipes/freeglut/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,22 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - test_type = "explicit" - - def requirements(self): - self.requires(self.tested_reference_str) - self.requires("opengl/system") - - 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/freeglut/all/test_v1_package_module/CMakeLists.txt b/recipes/freeglut/all/test_v1_package_module/CMakeLists.txt deleted file mode 100644 index 27f7a57e7a0b3..0000000000000 --- a/recipes/freeglut/all/test_v1_package_module/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package_module - ${CMAKE_CURRENT_BINARY_DIR}/test_package_module) diff --git a/recipes/freeglut/all/test_v1_package_module/conanfile.py b/recipes/freeglut/all/test_v1_package_module/conanfile.py deleted file mode 100644 index f0bc95c494a3c..0000000000000 --- a/recipes/freeglut/all/test_v1_package_module/conanfile.py +++ /dev/null @@ -1,22 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package" - test_type = "explicit" - - def requirements(self): - self.requires(self.tested_reference_str) - self.requires("opengl/system") - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) From 5fa91903932e331cda514f2cab9d99cf2a2ba34f Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 26 Feb 2024 23:45:33 +0900 Subject: [PATCH 096/405] (#21323) duckx: add recipe * duckx: add recipe * copy license * fix pugixml link error * fix compilation error on windows * add default_options for pugixml * fix error message Co-authored-by: Raziel Alphadios <64050682+RazielXYZ@users.noreply.github.com> * bump up kuba-zip Co-authored-by: Raziel Alphadios <64050682+RazielXYZ@users.noreply.github.com> --------- Co-authored-by: Raziel Alphadios <64050682+RazielXYZ@users.noreply.github.com> --- recipes/duckx/all/conandata.yml | 9 ++ recipes/duckx/all/conanfile.py | 83 +++++++++++++++++++ recipes/duckx/all/patches/0001-use-cci.patch | 53 ++++++++++++ recipes/duckx/all/test_package/CMakeLists.txt | 8 ++ recipes/duckx/all/test_package/conanfile.py | 25 ++++++ .../duckx/all/test_package/test_package.cpp | 8 ++ recipes/duckx/config.yml | 3 + 7 files changed, 189 insertions(+) create mode 100644 recipes/duckx/all/conandata.yml create mode 100644 recipes/duckx/all/conanfile.py create mode 100644 recipes/duckx/all/patches/0001-use-cci.patch create mode 100644 recipes/duckx/all/test_package/CMakeLists.txt create mode 100644 recipes/duckx/all/test_package/conanfile.py create mode 100644 recipes/duckx/all/test_package/test_package.cpp create mode 100644 recipes/duckx/config.yml diff --git a/recipes/duckx/all/conandata.yml b/recipes/duckx/all/conandata.yml new file mode 100644 index 0000000000000..f22f7365670c4 --- /dev/null +++ b/recipes/duckx/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "1.2.2": + url: "https://github.com/amiremohamadi/DuckX/archive/refs/tags/v1.2.2.tar.gz" + sha256: "ca924b9dc3a38184f617d2ec96b91deae3f06caf42a4508c23dd9943dcf9da39" +patches: + "1.2.2": + - patch_file: "patches/0001-use-cci.patch" + patch_description: "use cci packages" + patch_type: "conan" diff --git a/recipes/duckx/all/conanfile.py b/recipes/duckx/all/conanfile.py new file mode 100644 index 0000000000000..8afefe6cb2eb7 --- /dev/null +++ b/recipes/duckx/all/conanfile.py @@ -0,0 +1,83 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rmdir +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.build import check_min_cppstd +import os + +required_conan_version = ">=1.53.0" + +class DuckxConan(ConanFile): + name = "duckx" + description = " C++ library for creating and updating Microsoft Word (.docx) files." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/amiremohamadi/DuckX/" + topics = ("docx", "docx-files", "office") + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": False, + "pugixml/*:header_only": True, + } + + @property + def _min_cppstd(self): + return 11 + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("pugixml/1.14", transitive_headers=True) + self.requires("kuba-zip/0.3.1", transitive_headers=True) + + def validate(self): + if self.info.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + if not self.dependencies["pugixml"].options.header_only: + raise ConanInvalidConfiguration(f"{self.ref} requires header_only pugixml.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_TESTING"] = False + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "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.libs = ["duckx"] + diff --git a/recipes/duckx/all/patches/0001-use-cci.patch b/recipes/duckx/all/patches/0001-use-cci.patch new file mode 100644 index 0000000000000..fc24422c57061 --- /dev/null +++ b/recipes/duckx/all/patches/0001-use-cci.patch @@ -0,0 +1,53 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f452186..14a8c03 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,15 +9,19 @@ endif() + option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF) + option(BUILD_SAMPLE "Build provided sample" OFF) + +-set(HEADERS src/duckx.hpp src/zip.h src/miniz.h +- src/pugixml.hpp src/pugiconfig.hpp) +-set(SOURCES src/duckx.cpp src/zip.c src/pugixml.cpp) ++find_package(pugixml REQUIRED CONFIG) ++find_package(zip REQUIRED CONFIG) ++ ++set(HEADERS src/duckx.hpp ++ ) ++set(SOURCES src/duckx.cpp) + + if(BUILD_SHARED_LIBS) + add_library(duckx SHARED ${HEADERS} ${SOURCES}) + else() + add_library(duckx STATIC ${HEADERS} ${SOURCES}) + endif() ++target_link_libraries(duckx PRIVATE pugixml::pugixml zip::zip) + + add_library(duckx::duckx ALIAS duckx) + +diff --git a/src/duckx.cpp b/src/duckx.cpp +index 7379d02..4d66e62 100644 +--- a/src/duckx.cpp ++++ b/src/duckx.cpp +@@ -292,7 +292,7 @@ void duckx::Document::save() const { + // Open the original zip and copy all files which are not replaced by duckX + zip_t* orig_zip = zip_open(original_file.c_str(), ZIP_DEFAULT_COMPRESSION_LEVEL, 'r'); + // Loop & copy each relevant entry in the original zip +- int orig_zip_entry_ct = zip_total_entries(orig_zip); ++ int orig_zip_entry_ct = zip_entries_total(orig_zip); + for (int i = 0; i < orig_zip_entry_ct; i++) + { + zip_entry_openbyindex(orig_zip, i); +diff --git a/src/duckx.hpp b/src/duckx.hpp +index fd54d10..c3350d3 100644 +--- a/src/duckx.hpp ++++ b/src/duckx.hpp +@@ -12,7 +12,7 @@ + #include + + #include "pugixml.hpp" +-#include "zip.h" ++#include "zip/zip.h" + + + // TODO: Use container-iterator design pattern! diff --git a/recipes/duckx/all/test_package/CMakeLists.txt b/recipes/duckx/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..fc42d4028cd4f --- /dev/null +++ b/recipes/duckx/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(duckx REQUIRED CONFDIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE duckx::duckx) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/duckx/all/test_package/conanfile.py b/recipes/duckx/all/test_package/conanfile.py new file mode 100644 index 0000000000000..a9fbb7f543162 --- /dev/null +++ b/recipes/duckx/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.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/duckx/all/test_package/test_package.cpp b/recipes/duckx/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..053be6a46c0e6 --- /dev/null +++ b/recipes/duckx/all/test_package/test_package.cpp @@ -0,0 +1,8 @@ +#include +#include "duckx.hpp" + +int main() { + duckx::Document doc{}; + + return 0; +} diff --git a/recipes/duckx/config.yml b/recipes/duckx/config.yml new file mode 100644 index 0000000000000..af40d9653a378 --- /dev/null +++ b/recipes/duckx/config.yml @@ -0,0 +1,3 @@ +versions: + "1.2.2": + folder: all From 10794170ce5221a18aea25b3600bb3c3222add78 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 27 Feb 2024 00:10:51 +0900 Subject: [PATCH 097/405] (#22873) utf8.h: add version cci.20240202 * utf8.h: add version cci.20240202 * fix version --- recipes/utf8.h/all/conandata.yml | 3 +++ recipes/utf8.h/all/test_package/test_package.cpp | 8 +++++++- recipes/utf8.h/config.yml | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/recipes/utf8.h/all/conandata.yml b/recipes/utf8.h/all/conandata.yml index 8841db197744f..35ff55cfedc3d 100644 --- a/recipes/utf8.h/all/conandata.yml +++ b/recipes/utf8.h/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20240202": + url: "https://github.com/sheredom/utf8.h/archive/2aa5709fe39c66d2868c0d52d42788899b90dc92.tar.gz" + sha256: "1cce8cad2ab17b9ac4e59c8b06fa6f2bdf729893c7061b734164f2e87ff9f7f9" "cci.20210310": url: "https://github.com/sheredom/utf8.h/archive/ee5a7d4beb7755da13e4d4ec3eccfb65a0530456.tar.gz" sha256: "d7c9ad480b640c76292a1c4b9735497fd635cb8828e95beabb7db91ea4cecf55" diff --git a/recipes/utf8.h/all/test_package/test_package.cpp b/recipes/utf8.h/all/test_package/test_package.cpp index fd1eef99eafd8..66c337dd316fb 100644 --- a/recipes/utf8.h/all/test_package/test_package.cpp +++ b/recipes/utf8.h/all/test_package/test_package.cpp @@ -1,3 +1,9 @@ +#if defined(__cplusplus) && __cplusplus >= 202002L +using char_type = char8_t; +#else +typedef char char_type; +#endif + #include "utf8.h" int main() @@ -7,7 +13,7 @@ int main() char str[] = {'\xcf', '\xb4', '\xce', '\xb8', '\xce', '\x98', '\xcf', '\x91', '\0'}; - int r = utf8ncasecmp(ref, str, 8); + int r = utf8ncasecmp(reinterpret_cast(ref), reinterpret_cast(str), 8); return 0; } diff --git a/recipes/utf8.h/config.yml b/recipes/utf8.h/config.yml index dc79ecf2dafac..fad837c21119c 100644 --- a/recipes/utf8.h/config.yml +++ b/recipes/utf8.h/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20240202": + folder: all "cci.20210310": folder: all From 5581e7f81b42de9c9e4e732d5fd58821c29fa59d Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Mon, 26 Feb 2024 16:31:22 +0100 Subject: [PATCH 098/405] (#22874) aws-crt-cpp: add version 0.24.1 * aws-crt-cpp: add version 0.24.1 * aws-crt-cpp: drop version 0.18.8 with unsatisfyable deps Version 0.18.8 is not used in any aws-sdk-cpp. * aws-crt-cpp: add missing aws-c-sdkutils dependency --- recipes/aws-crt-cpp/all/conandata.yml | 13 +++++---- recipes/aws-crt-cpp/all/conanfile.py | 29 ++++++++++++------- .../patches/0.24.1-disable-sanitizers.patch | 11 +++++++ .../all/patches/0.24.1-fix-cast-error.patch | 13 +++++++++ recipes/aws-crt-cpp/config.yml | 2 +- 5 files changed, 52 insertions(+), 16 deletions(-) create mode 100644 recipes/aws-crt-cpp/all/patches/0.24.1-disable-sanitizers.patch create mode 100644 recipes/aws-crt-cpp/all/patches/0.24.1-fix-cast-error.patch diff --git a/recipes/aws-crt-cpp/all/conandata.yml b/recipes/aws-crt-cpp/all/conandata.yml index 5615e65f10a0b..9126f56004fa0 100644 --- a/recipes/aws-crt-cpp/all/conandata.yml +++ b/recipes/aws-crt-cpp/all/conandata.yml @@ -1,7 +1,7 @@ sources: - "0.18.8": - url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.18.8.tar.gz" - sha256: "70ea622cf8c1a7028b24078e909ee5898990444436584178f58d61b50b5b197d" + "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" @@ -12,10 +12,13 @@ sources: url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.14.3.tar.gz" sha256: "3ea16c43e691bab0c373ba1ad072f6535390c516ebda658dfaf4d074d920e0fb" patches: - "0.18.8": - - patch_file: "patches/0.17.23-fix-cast-error.patch" + "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" diff --git a/recipes/aws-crt-cpp/all/conanfile.py b/recipes/aws-crt-cpp/all/conanfile.py index 97c0f616bb653..459770aa822b1 100644 --- a/recipes/aws-crt-cpp/all/conanfile.py +++ b/recipes/aws-crt-cpp/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, save from conan.tools.build import check_min_cppstd +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout @@ -47,9 +48,14 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("aws-c-cal/0.5.13", transitive_headers=True) - self.requires("aws-c-common/0.8.2", transitive_headers=True) - self.requires("aws-checksums/0.1.13") + if Version(self.version) < "0.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) self.requires("aws-c-event-stream/0.2.7") @@ -58,12 +64,13 @@ def requirements(self): 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.6.17", transitive_headers=True) - self.requires("aws-c-event-stream/0.2.15") - self.requires("aws-c-http/0.6.22", transitive_headers=True) - self.requires("aws-c-io/0.13.4", transitive_headers=True) - self.requires("aws-c-mqtt/0.7.12", transitive_headers=True) - self.requires("aws-c-s3/0.1.49") + 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") def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -74,8 +81,10 @@ def source(self): def generate(self): tc = CMakeToolchain(self) + if is_msvc(self): + tc.variables["AWS_STATIC_MSVC_RUNTIME_LIBRARY"] = is_msvc_static_runtime(self) tc.variables["BUILD_TESTING"] = False - tc.variables["BUILD_DEPS"] = False + tc.cache_variables["BUILD_DEPS"] = False tc.generate() deps = CMakeDeps(self) 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 new file mode 100644 index 0000000000000..bb37fbe98b61a --- /dev/null +++ b/recipes/aws-crt-cpp/all/patches/0.24.1-disable-sanitizers.patch @@ -0,0 +1,11 @@ +--- 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 new file mode 100644 index 0000000000000..78b3163f7e6d5 --- /dev/null +++ b/recipes/aws-crt-cpp/all/patches/0.24.1-fix-cast-error.patch @@ -0,0 +1,13 @@ +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 a2a8f6922a602..20f59bce0267f 100644 --- a/recipes/aws-crt-cpp/config.yml +++ b/recipes/aws-crt-cpp/config.yml @@ -1,5 +1,5 @@ versions: - "0.18.8": + "0.24.1": folder: all "0.17.23": folder: all From 2cdf80d0e6bf9aabb84b930df05a3affc0484474 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 26 Feb 2024 16:07:27 +0000 Subject: [PATCH 099/405] (#22898) [bot] Update authorized users list (2024-02-26) Co-authored-by: conan-center-bot --- .c3i/authorized_users.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index e66b2974bcee6..874e514f2025b 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1292,3 +1292,4 @@ authorized_users: - ChristianHeinigk - metalMajor - joergbrech +- dagon666 From 5897bd22b7bdc89b3d1783f6d310a447fac9aa14 Mon Sep 17 00:00:00 2001 From: Tobias Hermann Date: Mon, 26 Feb 2024 17:30:33 +0100 Subject: [PATCH 100/405] (#22875) frugally-deep: add version 0.15.31 --- recipes/frugally-deep/all/conandata.yml | 3 +++ recipes/frugally-deep/all/conanfile.py | 2 +- recipes/frugally-deep/config.yml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/frugally-deep/all/conandata.yml b/recipes/frugally-deep/all/conandata.yml index a70e10ac28b17..e666368bd2a72 100644 --- a/recipes/frugally-deep/all/conandata.yml +++ b/recipes/frugally-deep/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.15.31": + url: "https://github.com/Dobiasd/frugally-deep/archive/v0.15.31.tar.gz" + sha256: "49bf5e30ad2d33e464433afbc8b6fe8536fc959474004a1ce2ac03d7c54bc8ba" "0.15.30": url: "https://github.com/Dobiasd/frugally-deep/archive/v0.15.30.tar.gz" sha256: "8932f7b42612598402269a54f957af09084dc2cb812d32887d991d6e45b280fb" diff --git a/recipes/frugally-deep/all/conanfile.py b/recipes/frugally-deep/all/conanfile.py index dcd9f307a4d73..5fb9992a315dc 100644 --- a/recipes/frugally-deep/all/conanfile.py +++ b/recipes/frugally-deep/all/conanfile.py @@ -39,7 +39,7 @@ def layout(self): def requirements(self): self.requires("eigen/3.4.0") - self.requires("functionalplus/0.2.22") + self.requires("functionalplus/0.2.23") self.requires("nlohmann_json/3.11.3") def package_id(self): diff --git a/recipes/frugally-deep/config.yml b/recipes/frugally-deep/config.yml index bc035ffff5654..ef73eeeb31a1b 100644 --- a/recipes/frugally-deep/config.yml +++ b/recipes/frugally-deep/config.yml @@ -1,4 +1,6 @@ versions: + "0.15.31": + folder: all "0.15.30": folder: all "0.15.29": From 6245a3d9e1f5381e05cba1d9e60265f8b8fb5219 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 27 Feb 2024 01:49:53 +0900 Subject: [PATCH 101/405] (#22879) simdjson: add version 3.7.0 * simdjson: add version 3.7.0 * revert 3.6.4 --- recipes/simdjson/all/conandata.yml | 3 +++ recipes/simdjson/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/simdjson/all/conandata.yml b/recipes/simdjson/all/conandata.yml index a418230173404..ae3a0527eade5 100644 --- a/recipes/simdjson/all/conandata.yml +++ b/recipes/simdjson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.7.0": + url: "https://github.com/simdjson/simdjson/archive/v3.7.0.tar.gz" + sha256: "27315c4861893b3e036c1f672b1c238ee86be6edb84c0824d1ed20dea5999777" "3.6.4": url: "https://github.com/simdjson/simdjson/archive/v3.6.4.tar.gz" sha256: "7e93d5094a47180a3d451cb261ba29ac66f3f6ceb7c2a0884955e9a2bb06d818" diff --git a/recipes/simdjson/config.yml b/recipes/simdjson/config.yml index cb209ae7c28cf..ef93017bac7bb 100644 --- a/recipes/simdjson/config.yml +++ b/recipes/simdjson/config.yml @@ -1,4 +1,6 @@ versions: + "3.7.0": + folder: all "3.6.4": folder: all "3.6.1": From 167b1d8b669adead87c0aebb42b71f399a1d70c4 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 27 Feb 2024 02:10:01 +0900 Subject: [PATCH 102/405] (#22887) cppcommon: make required library transitive_headers --- recipes/cppcommon/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/cppcommon/all/conanfile.py b/recipes/cppcommon/all/conanfile.py index 9677a5747f306..68efbdbf960e4 100644 --- a/recipes/cppcommon/all/conanfile.py +++ b/recipes/cppcommon/all/conanfile.py @@ -60,11 +60,11 @@ def layout(self): def requirements(self): if Version(self.version) < "1.0.3" or self.version == "cci.20201104": - self.requires("fmt/8.1.1") + self.requires("fmt/8.1.1", transitive_headers=True) else: self.requires("fmt/10.2.0", transitive_headers=True) if self.settings.os == "Linux": - self.requires("util-linux-libuuid/2.39.2") + self.requires("util-linux-libuuid/2.39.2", transitive_headers=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): From 2f06aa8d34607848f661c170f26716ad852df60e Mon Sep 17 00:00:00 2001 From: Noah Miller Date: Tue, 27 Feb 2024 06:49:18 +1300 Subject: [PATCH 103/405] (#22808) poco: add transitive_headers on zlib dependency --- recipes/poco/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/poco/all/conanfile.py b/recipes/poco/all/conanfile.py index c088845ae6933..d772d089d1b1f 100644 --- a/recipes/poco/all/conanfile.py +++ b/recipes/poco/all/conanfile.py @@ -149,7 +149,7 @@ def requirements(self): self.requires("pcre/8.45") else: self.requires("pcre2/10.42") - self.requires("zlib/[>=1.2.11 <2]") + self.requires("zlib/[>=1.2.11 <2]", transitive_headers=True) if self.options.enable_xml: self.requires("expat/2.5.0", transitive_headers=True) if self.options.enable_data_sqlite: From 467a6fcad8aa3344b5c76b05574ce0f471159845 Mon Sep 17 00:00:00 2001 From: Sergey Bobrenok Date: Mon, 26 Feb 2024 21:29:24 +0300 Subject: [PATCH 104/405] (#22860) sdbus-cpp/1.4.0: Bump version and dependencies Bump dependencies: * libsystemd * pkgconf * expat --- recipes/sdbus-cpp/all/conandata.yml | 3 +++ recipes/sdbus-cpp/all/conanfile.py | 6 +++--- recipes/sdbus-cpp/all/test_pkgconf/conanfile.py | 2 +- recipes/sdbus-cpp/all/test_v1_pkgconf/conanfile.py | 2 +- recipes/sdbus-cpp/config.yml | 2 ++ 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/recipes/sdbus-cpp/all/conandata.yml b/recipes/sdbus-cpp/all/conandata.yml index ac3e9f3df9188..d9206888314d4 100644 --- a/recipes/sdbus-cpp/all/conandata.yml +++ b/recipes/sdbus-cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.0": + url: "https://github.com/Kistler-Group/sdbus-cpp/archive/v1.4.0.tar.gz" + sha256: "ca7405c7f0f9ae3023dcfa37bc68974c4b8a1c9ea2909b970e0aedc3e8657ee6" "1.3.0": url: "https://github.com/Kistler-Group/sdbus-cpp/archive/v1.3.0.tar.gz" sha256: "d44f59abdd64d8f1ca3af7db58bc6518cb081fc9ff16285c3d75a68f5c073d10" diff --git a/recipes/sdbus-cpp/all/conanfile.py b/recipes/sdbus-cpp/all/conanfile.py index 1f8bc66668fef..b466198f4d0ea 100644 --- a/recipes/sdbus-cpp/all/conanfile.py +++ b/recipes/sdbus-cpp/all/conanfile.py @@ -56,7 +56,7 @@ def configure(self): del self.options.fPIC def requirements(self): - self.requires("libsystemd/253.10") + self.requires("libsystemd/255.2") def validate(self): if self.info.settings.os != "Linux": @@ -74,9 +74,9 @@ def validate(self): self.name, self._minimum_cpp_standard, self.info.settings.compiler, self.info.settings.compiler.version)) def build_requirements(self): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") if self.options.with_code_gen: - self.tool_requires("expat/2.5.0") + self.tool_requires("expat/2.6.0") def layout(self): cmake_layout(self, src_folder="src") diff --git a/recipes/sdbus-cpp/all/test_pkgconf/conanfile.py b/recipes/sdbus-cpp/all/test_pkgconf/conanfile.py index 8706e3310f0bf..591a984b8692f 100644 --- a/recipes/sdbus-cpp/all/test_pkgconf/conanfile.py +++ b/recipes/sdbus-cpp/all/test_pkgconf/conanfile.py @@ -15,7 +15,7 @@ def requirements(self): self.requires(self.tested_reference_str) def build_requirements(self): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") def layout(self): cmake_layout(self) diff --git a/recipes/sdbus-cpp/all/test_v1_pkgconf/conanfile.py b/recipes/sdbus-cpp/all/test_v1_pkgconf/conanfile.py index 47a93884e54ef..29f2d7295e0f4 100644 --- a/recipes/sdbus-cpp/all/test_v1_pkgconf/conanfile.py +++ b/recipes/sdbus-cpp/all/test_v1_pkgconf/conanfile.py @@ -11,7 +11,7 @@ class SdbusCppTestConan(ConanFile): generators = ("cmake", "pkg_config") def build_requirements(self): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") def build(self): cmake = CMake(self) diff --git a/recipes/sdbus-cpp/config.yml b/recipes/sdbus-cpp/config.yml index a48eafa88431d..0908a722615be 100644 --- a/recipes/sdbus-cpp/config.yml +++ b/recipes/sdbus-cpp/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.0": + folder: all "1.3.0": folder: all "1.2.0": From 2818e58115c06f9b52a24bf8f3e3c61bd2190526 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 27 Feb 2024 03:49:23 +0900 Subject: [PATCH 105/405] (#22877) daw_json_link: add version 3.23.2 --- recipes/daw_json_link/all/conandata.yml | 3 +++ recipes/daw_json_link/all/conanfile.py | 8 ++++++-- recipes/daw_json_link/config.yml | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/recipes/daw_json_link/all/conandata.yml b/recipes/daw_json_link/all/conandata.yml index 3262aaa6ca666..3284b09ee8d98 100644 --- a/recipes/daw_json_link/all/conandata.yml +++ b/recipes/daw_json_link/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.23.2": + url: "https://github.com/beached/daw_json_link/archive/refs/tags/v3.23.2.tar.gz" + sha256: "fd1234a14c126c79076e0b6e6eceae42afd465c419dc7a7393c69c28aa7f53d4" "3.23.0": url: "https://github.com/beached/daw_json_link/archive/refs/tags/v3.23.0.tar.gz" sha256: "a01e9a3a48784a47dbb60bd21ecbe7e05a7d30cec75ea6d55b1789f6aefe5f05" diff --git a/recipes/daw_json_link/all/conanfile.py b/recipes/daw_json_link/all/conanfile.py index 941ce50d79e01..f75c692a8d93d 100644 --- a/recipes/daw_json_link/all/conanfile.py +++ b/recipes/daw_json_link/all/conanfile.py @@ -39,8 +39,12 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("daw_header_libraries/2.97.0") - self.requires("daw_utf_range/2.2.3") + if Version(self.version) < "3.23.2": + self.requires("daw_header_libraries/2.97.0") + self.requires("daw_utf_range/2.2.3") + else: + self.requires("daw_header_libraries/2.101.0") + self.requires("daw_utf_range/2.2.4") def package_id(self): self.info.clear() diff --git a/recipes/daw_json_link/config.yml b/recipes/daw_json_link/config.yml index cd93a25c55255..e102478003a7f 100644 --- a/recipes/daw_json_link/config.yml +++ b/recipes/daw_json_link/config.yml @@ -1,4 +1,6 @@ versions: + "3.23.2": + folder: "all" "3.23.0": folder: "all" "3.20.1": From ea824c6afded4cc9475f3faa938c5e2898fb416f Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 27 Feb 2024 04:08:54 +0900 Subject: [PATCH 106/405] (#22881) 7bitconf: add version 1.2.0 --- recipes/7bitconf/all/conandata.yml | 8 ++++++++ recipes/7bitconf/all/conanfile.py | 6 +++++- .../patches/1.2.0-0001-fix-package-name.patch | 16 ++++++++++++++++ recipes/7bitconf/config.yml | 2 ++ 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 recipes/7bitconf/all/patches/1.2.0-0001-fix-package-name.patch diff --git a/recipes/7bitconf/all/conandata.yml b/recipes/7bitconf/all/conandata.yml index 71f022ca93c84..4ddfe60caee6d 100644 --- a/recipes/7bitconf/all/conandata.yml +++ b/recipes/7bitconf/all/conandata.yml @@ -1,7 +1,15 @@ sources: + "1.2.0": + url: "https://github.com/7bitCoder/7bitConf/archive/refs/tags/v1.2.0.tar.gz" + sha256: "c2cc19618dc6616e463dbd7cc72da1fdd5b6df1b4f5d4bf8317455658ac63f0e" "1.1.0": url: "https://github.com/7bitCoder/7bitConf/archive/refs/tags/v1.1.0.tar.gz" sha256: "07e5bff366d66c276032021c9a9ca5cdb1d8f097b29c032d07ee6ae1a10885a2" "1.0.0": url: "https://github.com/7bitCoder/7bitConf/archive/refs/tags/v1.0.0.tar.gz" sha256: "48a02d331f4281c8ff691d55c54abe744228637e9ad3af500daf526f4c77696d" +patches: + "1.2.0": + - patch_file: "patches/1.2.0-0001-fix-package-name.patch" + patch_description: "fix taocpp-json's package name" + patch_type: "conan" diff --git a/recipes/7bitconf/all/conanfile.py b/recipes/7bitconf/all/conanfile.py index 4865b328bad13..af6c2dd2e898f 100644 --- a/recipes/7bitconf/all/conanfile.py +++ b/recipes/7bitconf/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout -from conan.tools.files import get, copy, rmdir +from conan.tools.files import get, copy, rmdir, apply_conandata_patches, copy, export_conandata_patches from conan.tools.scm import Version import os @@ -43,6 +43,9 @@ def _minimum_compilers_version(self): "apple-clang": "10", } + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": self.options.rm_safe("fPIC") @@ -80,6 +83,7 @@ def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): + apply_conandata_patches(self) if not self.options.header_only: tc = CMakeToolchain(self) tc.variables["_7BIT_CONF_BUILD_EXAMPLES"] = False diff --git a/recipes/7bitconf/all/patches/1.2.0-0001-fix-package-name.patch b/recipes/7bitconf/all/patches/1.2.0-0001-fix-package-name.patch new file mode 100644 index 0000000000000..1d71939004139 --- /dev/null +++ b/recipes/7bitconf/all/patches/1.2.0-0001-fix-package-name.patch @@ -0,0 +1,16 @@ +diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt +index 6cdab6c..04c9c4f 100644 +--- a/Source/CMakeLists.txt ++++ b/Source/CMakeLists.txt +@@ -27,9 +27,9 @@ elseif (_7BIT_CONF_HEADER_ONLY_LIB) + endif () + + if (_7BIT_CONF_HEADER_ONLY_LIB) +- target_link_libraries(7bitConf INTERFACE taocpp-json) ++ target_link_libraries(7bitConf INTERFACE taocpp::json) + else () +- target_link_libraries(7bitConf taocpp-json) ++ target_link_libraries(7bitConf taocpp::json) + endif () + + add_library(7bitConf::7bitConf ALIAS 7bitConf) diff --git a/recipes/7bitconf/config.yml b/recipes/7bitconf/config.yml index 73c245662b08d..03495144e3920 100644 --- a/recipes/7bitconf/config.yml +++ b/recipes/7bitconf/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.0": + folder: all "1.1.0": folder: all "1.0.0": From a984b2241f8d8716606b585c7fbb3af1c26b9d86 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 26 Feb 2024 21:30:47 +0200 Subject: [PATCH 107/405] (#22896) velodyne_decoder: add new recipe * velodyne_decoder: new recipe * velodyne_decoder: add a patch for MSVC build flags --- recipes/velodyne_decoder/all/conandata.yml | 10 ++ recipes/velodyne_decoder/all/conanfile.py | 100 ++++++++++++++++++ .../patches/3.0.0-001-fix-msvc-flags.patch | 15 +++ .../all/test_package/CMakeLists.txt | 8 ++ .../all/test_package/conanfile.py | 26 +++++ .../all/test_package/test_package.cpp | 9 ++ recipes/velodyne_decoder/config.yml | 3 + 7 files changed, 171 insertions(+) create mode 100644 recipes/velodyne_decoder/all/conandata.yml create mode 100644 recipes/velodyne_decoder/all/conanfile.py create mode 100644 recipes/velodyne_decoder/all/patches/3.0.0-001-fix-msvc-flags.patch create mode 100644 recipes/velodyne_decoder/all/test_package/CMakeLists.txt create mode 100644 recipes/velodyne_decoder/all/test_package/conanfile.py create mode 100644 recipes/velodyne_decoder/all/test_package/test_package.cpp create mode 100644 recipes/velodyne_decoder/config.yml diff --git a/recipes/velodyne_decoder/all/conandata.yml b/recipes/velodyne_decoder/all/conandata.yml new file mode 100644 index 0000000000000..2e0d017fd8b08 --- /dev/null +++ b/recipes/velodyne_decoder/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "3.0.0": + url: "https://github.com/valgur/velodyne_decoder/archive/refs/tags/v3.0.0.tar.gz" + sha256: "bce471232205f9d559464ba8cb99bfb96a2245115e54b744115fe71cd9e42042" +patches: + "3.0.0": + - patch_file: "patches/3.0.0-001-fix-msvc-flags.patch" + patch_type: "portability" + patch_description: "Fix /O2 conflicting with debug flags on MSVC" + patch_source: "https://github.com/valgur/velodyne_decoder/commit/22809df3a4d550c3746b17aaca1d6c20692730c4" diff --git a/recipes/velodyne_decoder/all/conanfile.py b/recipes/velodyne_decoder/all/conanfile.py new file mode 100644 index 0000000000000..680c39d6c8c9b --- /dev/null +++ b/recipes/velodyne_decoder/all/conanfile.py @@ -0,0 +1,100 @@ +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, rm, rmdir, export_conandata_patches, apply_conandata_patches +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.53.0" + +class PackageConan(ConanFile): + name = "velodyne_decoder" + description = "A decoder library for raw Velodyne data and telemetry info" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/valgur/velodyne_decoder" + topics = ("velodyne", "lidar", "point-cloud") + + 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": "9", + "clang": "5", + "apple-clang": "10", + "Visual Studio": "15", + "msvc": "191", + } + + 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 export_sources(self): + export_conandata_patches(self) + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("yaml-cpp/0.8.0") + self.requires("ms-gsl/4.0.0", transitive_headers=True) + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["INSTALL_THIRD_PARTY"] = False + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "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")) + rm(self, "*.pdb", self.package_folder, recursive=True) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "velodyne_decoder") + self.cpp_info.set_property("cmake_target_name", "velodyne_decoder::velodyne_decoder") + self.cpp_info.set_property("pkg_config_name", "velodyne_decoder") + + self.cpp_info.libs = ["velodyne_decoder"] + self.cpp_info.defines = ["_USE_MATH_DEFINES"] diff --git a/recipes/velodyne_decoder/all/patches/3.0.0-001-fix-msvc-flags.patch b/recipes/velodyne_decoder/all/patches/3.0.0-001-fix-msvc-flags.patch new file mode 100644 index 0000000000000..35a9576fc8880 --- /dev/null +++ b/recipes/velodyne_decoder/all/patches/3.0.0-001-fix-msvc-flags.patch @@ -0,0 +1,15 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -17,7 +17,11 @@ + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + + if(MSVC) +- add_compile_options(/W4 /O2) ++ add_compile_options( ++ "$<$:/O2>" ++ "$<$:/O2>" ++ /W4 ++ ) + else() + add_compile_options( + "$<$:-ggdb3;-Og>" diff --git a/recipes/velodyne_decoder/all/test_package/CMakeLists.txt b/recipes/velodyne_decoder/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..6af2b5f009096 --- /dev/null +++ b/recipes/velodyne_decoder/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(velodyne_decoder REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE velodyne_decoder::velodyne_decoder) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/velodyne_decoder/all/test_package/conanfile.py b/recipes/velodyne_decoder/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/velodyne_decoder/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/velodyne_decoder/all/test_package/test_package.cpp b/recipes/velodyne_decoder/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..bc82a05812525 --- /dev/null +++ b/recipes/velodyne_decoder/all/test_package/test_package.cpp @@ -0,0 +1,9 @@ +#include +#include +#include +#include + +int main() { + velodyne_decoder::Config config; + velodyne_decoder::StreamDecoder stream_decoder(config); +} diff --git a/recipes/velodyne_decoder/config.yml b/recipes/velodyne_decoder/config.yml new file mode 100644 index 0000000000000..c6ac749e0b234 --- /dev/null +++ b/recipes/velodyne_decoder/config.yml @@ -0,0 +1,3 @@ +versions: + "3.0.0": + folder: all From 40330b402c41853e1606ad37f628968b2f193d19 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Mon, 26 Feb 2024 13:48:28 -0600 Subject: [PATCH 108/405] (#22902) libglvnd: Bump build requirements to support Python 3.12 Meson needs to be a newer version to support Python 3.12. --- recipes/libglvnd/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/libglvnd/all/conanfile.py b/recipes/libglvnd/all/conanfile.py index 91471af4e7c75..2362f8db4e5aa 100644 --- a/recipes/libglvnd/all/conanfile.py +++ b/recipes/libglvnd/all/conanfile.py @@ -59,9 +59,9 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.name} is only compatible with Linux and FreeBSD") def build_requirements(self): - self.tool_requires("meson/1.2.2") + self.tool_requires("meson/1.3.2") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") def layout(self): basic_layout(self, src_folder="src") From 10c84723be7a51174689fb9d4f995be3b66ffcf9 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 27 Feb 2024 06:09:05 +0900 Subject: [PATCH 109/405] (#22888) poco: add version 1.13.2 --- recipes/poco/all/conandata.yml | 10 ++++++++++ recipes/poco/config.yml | 2 ++ 2 files changed, 12 insertions(+) diff --git a/recipes/poco/all/conandata.yml b/recipes/poco/all/conandata.yml index 67de3df463e94..9080050916ffa 100644 --- a/recipes/poco/all/conandata.yml +++ b/recipes/poco/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.13.2": + url: "https://github.com/pocoproject/poco/archive/poco-1.13.2-release.tar.gz" + sha256: "c01221870aa9bccedf1de39890279699207848fe61a0cfb6aeec7c5942c4627f" "1.13.1": url: "https://github.com/pocoproject/poco/archive/poco-1.13.1-release.tar.gz" sha256: "8accf6c6ebb9ae686e7c8e2390a35beaab08d0ca1abda537cc2d0b7ab9296be5" @@ -30,6 +33,13 @@ sources: url: "https://github.com/pocoproject/poco/archive/poco-1.11.3-release.tar.gz" sha256: "fb5e8e70c7dbc8f3b59ec8560140a267b4eaf06ee519dc21f312d0eb195cba37" patches: + "1.13.2": + - patch_file: patches/1.13.0.patch + patch_description: "use cci's packages, use crypt32 symbol, add windmc.exe to find_program" + patch_type: "conan" + - patch_file: patches/1.13.0-0002-mysql-include.patch + patch_description: "include mysql.h instead of mysql/mysql.h" + patch_type: "portability" "1.13.1": - patch_file: patches/1.13.0.patch patch_description: "use cci's packages, use crypt32 symbol, add windmc.exe to find_program" diff --git a/recipes/poco/config.yml b/recipes/poco/config.yml index aa504b39ac1af..e7879c451d919 100644 --- a/recipes/poco/config.yml +++ b/recipes/poco/config.yml @@ -1,4 +1,6 @@ versions: + "1.13.2": + folder: all "1.13.1": folder: all "1.13.0": From 74474c0e8795a02b321d3490344a588131b2967f Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 27 Feb 2024 07:24:20 +0900 Subject: [PATCH 110/405] (#20536) zoe: add recipe * zoe: add recipe * small improvement * teemo: make deprecated * revert teemo deprecated * fix lib name * add openssl * add package_type * update cmake_minium_required Co-authored-by: Jordan Williams * fix license name Co-authored-by: Jordan Williams * update description for zoe Co-authored-by: Jordan Williams * update topics for zoe Co-authored-by: Jordan Williams * use verseion range for libcurl Co-authored-by: Uilian Ries * fix libcurl version --------- Co-authored-by: Jordan Williams Co-authored-by: Uilian Ries --- recipes/zoe/all/conandata.yml | 17 ++++ recipes/zoe/all/conanfile.py | 93 +++++++++++++++++++ .../3.0-0001-follow-cxx-standards.patch | 25 +++++ .../all/patches/3.0-0002-support-macosx.patch | 40 ++++++++ .../patches/3.0-0003-fix-install-target.patch | 13 +++ recipes/zoe/all/test_package/CMakeLists.txt | 9 ++ recipes/zoe/all/test_package/conanfile.py | 26 ++++++ recipes/zoe/all/test_package/test_package.cpp | 28 ++++++ recipes/zoe/config.yml | 3 + 9 files changed, 254 insertions(+) create mode 100644 recipes/zoe/all/conandata.yml create mode 100644 recipes/zoe/all/conanfile.py create mode 100644 recipes/zoe/all/patches/3.0-0001-follow-cxx-standards.patch create mode 100644 recipes/zoe/all/patches/3.0-0002-support-macosx.patch create mode 100644 recipes/zoe/all/patches/3.0-0003-fix-install-target.patch create mode 100644 recipes/zoe/all/test_package/CMakeLists.txt create mode 100644 recipes/zoe/all/test_package/conanfile.py create mode 100644 recipes/zoe/all/test_package/test_package.cpp create mode 100644 recipes/zoe/config.yml diff --git a/recipes/zoe/all/conandata.yml b/recipes/zoe/all/conandata.yml new file mode 100644 index 0000000000000..568b6a5cdb8e4 --- /dev/null +++ b/recipes/zoe/all/conandata.yml @@ -0,0 +1,17 @@ +sources: + "3.0": + url: "https://github.com/winsoft666/zoe/archive/refs/tags/v3.0.tar.gz" + sha256: "718c6de993bea2a4b1866070a8685e77cfa7929bbd9e22abb29e54c67a687a5e" + +patches: + "3.0": + - patch_file: "patches/3.0-0001-follow-cxx-standards.patch" + patch_description: "include threads header" + patch_type: "portability" + - patch_file: "patches/3.0-0002-support-macosx.patch" + patch_description: "support macosx" + patch_type: "portability" + - patch_file: "patches/3.0-0003-fix-install-target.patch" + patch_description: "fix wrong install target" + patch_type: "bugfix" + patch_source: "https://github.com/winsoft666/zoe/pull/25" diff --git a/recipes/zoe/all/conanfile.py b/recipes/zoe/all/conanfile.py new file mode 100644 index 0000000000000..4e403d637b5d2 --- /dev/null +++ b/recipes/zoe/all/conanfile.py @@ -0,0 +1,93 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.microsoft import is_msvc_static_runtime +from conan.tools.files import get, copy, apply_conandata_patches, export_conandata_patches +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.53.0" + +class ZoeConan(ConanFile): + name = "zoe" + description = "A multi-protocol, multi-threaded, resumable, cross-platform, open source, C++ file download library." + license = "GPL-3.0-only" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/winsoft666/zoe" + topics = ("curl", "download", "file", "ftp", "multithreading", "http", "libcurl", "rate-limit") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 11 + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("libcurl/[>=7.78.0 <9]") + self.requires("openssl/[>=1.1 <4]", transitive_headers=True) + + def validate(self): + if self.info.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + if self.info.settings.compiler == "apple-clang" and Version(self.info.settings.compiler.version) < "12.0": + raise ConanInvalidConfiguration(f"{self.ref} can not build on apple-clang < 12.0.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["ZOE_BUILD_SHARED_LIBS"] = self.options.shared + tc.variables["ZOE_USE_STATIC_CRT"] = is_msvc_static_runtime(self) + tc.variables["ZOE_BUILD_TESTS"] = False + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + + def package_info(self): + libname = "zoe" if self.options.shared else "zoe-static" + libpostfix = "-d" if self.settings.build_type == "Debug" else "" + self.cpp_info.libs = [f"{libname}{libpostfix}"] + + if self.options.shared: + self.cpp_info.defines.append("ZOE_EXPORTS") + else: + self.cpp_info.defines.append("ZOE_STATIC") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/zoe/all/patches/3.0-0001-follow-cxx-standards.patch b/recipes/zoe/all/patches/3.0-0001-follow-cxx-standards.patch new file mode 100644 index 0000000000000..ced0610043cd8 --- /dev/null +++ b/recipes/zoe/all/patches/3.0-0001-follow-cxx-standards.patch @@ -0,0 +1,25 @@ +diff --git a/src/entry_handler.cpp b/src/entry_handler.cpp +index 5844a03..0dc25a5 100644 +--- a/src/entry_handler.cpp ++++ b/src/entry_handler.cpp +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include "file_util.h" + #include "string_helper.hpp" + #include "string_encode.h" +diff --git a/src/md5.cpp b/src/md5.cpp +index 93dd21f..78a4b57 100644 +--- a/src/md5.cpp ++++ b/src/md5.cpp +@@ -90,7 +90,7 @@ void byteSwap(UWORD32* buf, unsigned words) { + * the data and converts bytes into longwords for this routine. + */ + void MD5Transform(UWORD32 buf[4], UWORD32 const in[16]) { +- register UWORD32 a, b, c, d; ++ UWORD32 a, b, c, d; + + a = buf[0]; + b = buf[1]; diff --git a/recipes/zoe/all/patches/3.0-0002-support-macosx.patch b/recipes/zoe/all/patches/3.0-0002-support-macosx.patch new file mode 100644 index 0000000000000..64f500a421a85 --- /dev/null +++ b/recipes/zoe/all/patches/3.0-0002-support-macosx.patch @@ -0,0 +1,40 @@ +diff --git a/a/src/file_util.cpp b/b/src/file_util.cpp +index 9cea293..20fb5c6 100644 +--- a/a/src/file_util.cpp ++++ b/b/src/file_util.cpp +@@ -46,6 +46,9 @@ int64_t FileUtil::GetFileSize(FILE* f) { + #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) + _fseeki64(f, 0L, SEEK_END); + int64_t fsize = _ftelli64(f); ++#elif defined(__APPLE__) ++ fseeko(f, 0L, SEEK_END); ++ int64_t fsize = ftello(f); + #else + fseeko64(f, 0L, SEEK_END); + int64_t fsize = ftello64(f); +@@ -181,6 +184,8 @@ int FileUtil::Seek(FILE* f, int64_t offset, int origin) { + if (f) { + #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) + return _fseeki64(f, offset, origin); ++#elif defined(__APPLE__) ++ return fseeko(f, offset, origin); + #else + return fseeko64(f, offset, origin); + #endif +@@ -263,6 +268,16 @@ bool FileUtil::CreateFixedSizeFile(const utf8string& path, int64_t fixed_size) { + } + + return prealloc; ++#elif defined(__APPLE__) ++ int fd = open(path.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); ++ fstore_t store = {F_ALLOCATECONTIG, F_PEOFPOSMODE, 0, fixed_size}; ++ if (fcntl(fd, F_PREALLOCATE, &store) == -1) { ++ store.fst_flags = F_ALLOCATEALL; ++ if (fcntl(fd, F_PREALLOCATE, &store) == -1) { ++ return false; ++ } ++ } ++ return ftruncate(fd, fixed_size) == 0; + #else + int fd = open(path.c_str(), O_RDWR | O_CREAT, + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); diff --git a/recipes/zoe/all/patches/3.0-0003-fix-install-target.patch b/recipes/zoe/all/patches/3.0-0003-fix-install-target.patch new file mode 100644 index 0000000000000..8dc598ccf7ec9 --- /dev/null +++ b/recipes/zoe/all/patches/3.0-0003-fix-install-target.patch @@ -0,0 +1,13 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 34f38b4..85c3a14 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -116,7 +116,7 @@ endif() + + install(DIRECTORY ../include/zoe DESTINATION include) + +-install(TARGETS ${ASHE_LIB_NAME} ++install(TARGETS ${ZOE_LIB_NAME} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/recipes/zoe/all/test_package/CMakeLists.txt b/recipes/zoe/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..573c0d90172aa --- /dev/null +++ b/recipes/zoe/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES CXX) + +find_package(zoe REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE zoe::zoe) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/zoe/all/test_package/conanfile.py b/recipes/zoe/all/test_package/conanfile.py new file mode 100644 index 0000000000000..a9fb96656f203 --- /dev/null +++ b/recipes/zoe/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/zoe/all/test_package/test_package.cpp b/recipes/zoe/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..c802a922c2c55 --- /dev/null +++ b/recipes/zoe/all/test_package/test_package.cpp @@ -0,0 +1,28 @@ +#include +#include "zoe/zoe.h" + +int main(int argc, char** argv) { + using namespace zoe; + + Zoe::GlobalInit(); + + Zoe efd; + + efd.setThreadNum(10); // Optional + efd.setTmpFileExpiredTime(3600); // Optional + efd.setDiskCacheSize(20 * (2 << 19)); // Optional + efd.setMaxDownloadSpeed(50 * (2 << 19)); // Optional + efd.setHashVerifyPolicy(ALWAYS, MD5, "6fe294c3ef4765468af4950d44c65525"); // Optional, support MD5, CRC32, SHA256 + // There are more options available, please check zoe.h + efd.setVerboseOutput([](const utf8string& verbose) { // Optional + printf("%s\n", verbose.c_str()); + }); + efd.setHttpHeaders({ // Optional + {"Origin", "http://xxx.xxx.com"}, + {"User-Agent", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)"} + }); + + Zoe::GlobalUnInit(); + + return 0; +} diff --git a/recipes/zoe/config.yml b/recipes/zoe/config.yml new file mode 100644 index 0000000000000..fdd08f532337f --- /dev/null +++ b/recipes/zoe/config.yml @@ -0,0 +1,3 @@ +versions: + "3.0": + folder: all From a4d1345f82102a2ebcfb5208b8c801c8aca53c11 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Tue, 27 Feb 2024 06:49:32 +0100 Subject: [PATCH 111/405] (#22900) asio-grpc: use maintained version of libunifex * asio-grpc/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericLemanissier.github.io/conan-center-index-bump-deps/) * asio-grpc/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericLemanissier.github.io/conan-center-index-bump-deps/) * asio-grpc/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericLemanissier.github.io/conan-center-index-bump-deps/) * boost and asio hearders are transitive https://github.com/Tradias/asio-grpc/blob/v2.9.3/src/agrpc/detail/asio_forward.hpp#L73 * grpc lib is transitive * unbump boost --- recipes/asio-grpc/all/conanfile.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/asio-grpc/all/conanfile.py b/recipes/asio-grpc/all/conanfile.py index 22435c1b8bb72..c686e567d9288 100644 --- a/recipes/asio-grpc/all/conanfile.py +++ b/recipes/asio-grpc/all/conanfile.py @@ -56,13 +56,13 @@ def configure(self): raise ConanInvalidConfiguration(f"{self.name} 'recycling_allocator' cannot be used in combination with the 'unifex' backend.") def requirements(self): - self.requires("grpc/1.54.3") + self.requires("grpc/1.54.3", transitive_libs=True) if self._local_allocator_option == "boost_container" or self.options.backend == "boost": - self.requires("boost/1.83.0") + self.requires("boost/1.83.0", transitive_headers=True) if self.options.backend == "asio": - self.requires("asio/1.28.2") + self.requires("asio/1.29.0", transitive_headers=True) if self.options.backend == "unifex": - self.requires("libunifex/cci.20220430") + self.requires("libunifex/0.4.0") def package_id(self): self.info.clear() From 8296da4efec9a887870310477314f9fcc64078bf Mon Sep 17 00:00:00 2001 From: Kim Lindberger Date: Tue, 27 Feb 2024 13:06:01 +0100 Subject: [PATCH 112/405] (#21760) ruy: Add cci.20231129 --- recipes/ruy/all/conandata.yml | 3 +++ recipes/ruy/all/conanfile.py | 8 ++++---- recipes/ruy/config.yml | 2 ++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/recipes/ruy/all/conandata.yml b/recipes/ruy/all/conandata.yml index c9acc9f74ac8c..d072c208fb5e1 100644 --- a/recipes/ruy/all/conandata.yml +++ b/recipes/ruy/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20231129": + url: "https://github.com/google/ruy/archive/690c14c441387a4ea6e07a9ed89657cec8200b92.tar.gz" + sha256: "98077cf3c38f0d8c5156953c4044a6104108f247fab021477d1cff1012eb82f3" "cci.20220628": url: "https://github.com/google/ruy/archive/841ea4172ba904fe3536789497f9565f2ef64129.tar.gz" sha256: "fbd20e6c8cd5cf8ef159f69600ea0c7ef0f1401a4c16a9cd04e5a12ffa9c6e14" diff --git a/recipes/ruy/all/conanfile.py b/recipes/ruy/all/conanfile.py index c508de954594d..5ff76e6c68a9c 100644 --- a/recipes/ruy/all/conanfile.py +++ b/recipes/ruy/all/conanfile.py @@ -31,7 +31,7 @@ class RuyConan(ConanFile): def _minimum_compilers_version(self): return { "Visual Studio": "15", - "msvc": "191", + "msvc": "191", "gcc": "5", "clang": "3.4", "apple-clang": "5.1", @@ -60,7 +60,7 @@ def configure(self): self.options.rm_safe("fPIC") def requirements(self): - self.requires("cpuinfo/cci.20220228") + self.requires("cpuinfo/cci.20231129") def layout(self): cmake_layout(self, src_folder="src") @@ -85,8 +85,8 @@ def _patch_sources(self): patches = { #Remove the invocation after project(), see https://github.com/google/ruy/issues/328 "cmake_minimum_required(VERSION 3.13)": "", - # Ensure `cmake_minimum_required` is called first - "# Copyright 2021 Google LLC": "# Copyright 2021 Google LLC\ncmake_minimum_required(VERSION 3.13)", + # Ensure `cmake_minimum_required` is called first + "# Copyright 2021 Google LLC": "# Copyright 2021 Google LLC\ncmake_minimum_required(VERSION 3.13)", } for pattern, patch in patches.items(): diff --git a/recipes/ruy/config.yml b/recipes/ruy/config.yml index f2da5345e749b..1535fe201a121 100644 --- a/recipes/ruy/config.yml +++ b/recipes/ruy/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20231129": + folder: all "cci.20220628": folder: all From 9a9e22a77e83a045ec43d1acd79ae7ee3c104ad1 Mon Sep 17 00:00:00 2001 From: Sergey Bobrenok Date: Tue, 27 Feb 2024 16:49:53 +0300 Subject: [PATCH 113/405] (#22912) sdbus-cpp/1.5.0: Bump version --- recipes/sdbus-cpp/all/conandata.yml | 3 +++ recipes/sdbus-cpp/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/sdbus-cpp/all/conandata.yml b/recipes/sdbus-cpp/all/conandata.yml index d9206888314d4..6379706780143 100644 --- a/recipes/sdbus-cpp/all/conandata.yml +++ b/recipes/sdbus-cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.5.0": + url: "https://github.com/Kistler-Group/sdbus-cpp/archive/v1.5.0.tar.gz" + sha256: "577986929f911320fb9ef6a3e2badd464dc38411ebc25d2966f5cb85c39f0897" "1.4.0": url: "https://github.com/Kistler-Group/sdbus-cpp/archive/v1.4.0.tar.gz" sha256: "ca7405c7f0f9ae3023dcfa37bc68974c4b8a1c9ea2909b970e0aedc3e8657ee6" diff --git a/recipes/sdbus-cpp/config.yml b/recipes/sdbus-cpp/config.yml index 0908a722615be..16a0828c0e1fc 100644 --- a/recipes/sdbus-cpp/config.yml +++ b/recipes/sdbus-cpp/config.yml @@ -1,4 +1,6 @@ versions: + "1.5.0": + folder: all "1.4.0": folder: all "1.3.0": From 2f12a7055b5603e45a4b15c902f8aab5256b4341 Mon Sep 17 00:00:00 2001 From: Christian Heinigk <159124390+ChristianHeinigk@users.noreply.github.com> Date: Tue, 27 Feb 2024 15:08:50 +0100 Subject: [PATCH 114/405] (#22821) Add option to disable xerces-c's network stack. * Add option to disable xerces-c's network stack. * Remove version string recipes/xerces-c/all/conanfile.py Co-authored-by: Uilian Ries * network accessor needs network always Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries --- recipes/xerces-c/all/conanfile.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/recipes/xerces-c/all/conanfile.py b/recipes/xerces-c/all/conanfile.py index 915980e982b8c..88a28ee036fe6 100644 --- a/recipes/xerces-c/all/conanfile.py +++ b/recipes/xerces-c/all/conanfile.py @@ -26,6 +26,7 @@ class XercesCConan(ConanFile): "fPIC": [True, False], # https://xerces.apache.org/xerces-c/build-3.html "char_type": ["uint16_t", "char16_t", "wchar_t"], + "network": [True, False], "network_accessor": ["curl", "socket", "cfurl", "winsock"], "transcoder": ["gnuiconv", "iconv", "icu", "macosunicodeconverter", "windows"], "message_loader": ["inmemory", "icu", "iconv"], @@ -35,6 +36,7 @@ class XercesCConan(ConanFile): "shared": False, "fPIC": True, "char_type": "uint16_t", + "network": True, "network_accessor": "socket", "transcoder": "gnuiconv", "message_loader": "inmemory", @@ -64,6 +66,8 @@ def config_options(self): def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + if not self.options.network: + self.options.rm_safe("network_accessor") def layout(self): cmake_layout(self, src_folder="src") @@ -71,7 +75,7 @@ def layout(self): def requirements(self): if "icu" in (self.options.transcoder, self.options.message_loader): self.requires("icu/74.2") - if self.options.network_accessor == "curl": + if self.options.get_safe("network_accessor") == "curl": self.requires("libcurl/[>=7.78.0 <9]") def _validate(self, option, value, host_os): @@ -84,7 +88,7 @@ def _validate(self, option, value, host_os): :param os: either a single string or a tuple of strings containing the OS(es) that `value` is valid on """ - if self.settings.os not in host_os and getattr(self.options, option) == value: + if self.settings.os not in host_os and self.options.get_safe(option) == value: raise ConanInvalidConfiguration(f"Option '{option}={value}' is only supported on {host_os}") def validate(self): @@ -117,13 +121,15 @@ def generate(self): # Because upstream overrides BUILD_SHARED_LIBS as a CACHE variable tc.cache_variables["BUILD_SHARED_LIBS"] = "ON" if self.options.shared else "OFF" # https://xerces.apache.org/xerces-c/build-3.html - tc.variables["network-accessor"] = self.options.network_accessor + tc.variables["network"] = self.options.network + if self.options.network: + tc.variables["network-accessor"] = self.options.network_accessor tc.variables["transcoder"] = self.options.transcoder tc.variables["message-loader"] = self.options.message_loader tc.variables["xmlch-type"] = self.options.char_type tc.variables["mutex-manager"] = self.options.mutex_manager # avoid picking up system dependency - tc.variables["CMAKE_DISABLE_FIND_PACKAGE_CURL"] = self.options.network_accessor != "curl" + 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) tc.generate() deps = CMakeDeps(self) From 3d3d57e300b9855c35cb0b07fdeb7fe3936ed931 Mon Sep 17 00:00:00 2001 From: Dmitry Bely Date: Tue, 27 Feb 2024 14:30:01 +0000 Subject: [PATCH 115/405] (#22735) mbedtls: add required Win32 system_libs --- recipes/mbedtls/all/conanfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/mbedtls/all/conanfile.py b/recipes/mbedtls/all/conanfile.py index b5af5483b03f4..6b9782288fcdd 100644 --- a/recipes/mbedtls/all/conanfile.py +++ b/recipes/mbedtls/all/conanfile.py @@ -108,9 +108,13 @@ def package_info(self): self.cpp_info.components["mbedcrypto"].set_property("cmake_target_name", "MbedTLS::mbedcrypto") self.cpp_info.components["mbedcrypto"].libs = ["mbedcrypto"] + if self.settings.os == "Windows": + self.cpp_info.components["mbedcrypto"].system_libs = ["bcrypt"] self.cpp_info.components["mbedx509"].set_property("cmake_target_name", "MbedTLS::mbedx509") self.cpp_info.components["mbedx509"].libs = ["mbedx509"] + if self.settings.os == "Windows": + self.cpp_info.components["mbedx509"].system_libs = ["ws2_32"] self.cpp_info.components["mbedx509"].requires = ["mbedcrypto"] self.cpp_info.components["libembedtls"].set_property("cmake_target_name", "MbedTLS::mbedtls") From 86284a99ff947d1bb70389f4c1835ef3e5db2528 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Tue, 27 Feb 2024 09:09:44 -0600 Subject: [PATCH 116/405] (#22428) freeglut: Use the mesa-glu package when not on Apple or Windows The glu/system package installs the Mesa GLU system package on Linux and FreeBSD. Now that the mesa-glu package is available in Conan, use that instead. --- recipes/freeglut/all/conandata.yml | 12 ++++ recipes/freeglut/all/conanfile.py | 12 +++- ...include-directory-for-glu.h-in-CMake.patch | 61 ++++++++++++++++ ...include-directory-for-glu.h-in-CMake.patch | 61 ++++++++++++++++ ...include-directory-for-glu.h-in-CMake.patch | 69 +++++++++++++++++++ 5 files changed, 213 insertions(+), 2 deletions(-) create mode 100644 recipes/freeglut/all/patches/3.2.1-0004-Incorporate-the-include-directory-for-glu.h-in-CMake.patch create mode 100644 recipes/freeglut/all/patches/3.2.2-0003-Incorporate-the-include-directory-for-glu.h-in-CMake.patch create mode 100644 recipes/freeglut/all/patches/3.4.0-0003-Incorporate-the-include-directory-for-glu.h-in-CMake.patch diff --git a/recipes/freeglut/all/conandata.yml b/recipes/freeglut/all/conandata.yml index 7ae0b0d3b9c12..964de8ca2d213 100644 --- a/recipes/freeglut/all/conandata.yml +++ b/recipes/freeglut/all/conandata.yml @@ -18,6 +18,10 @@ patches: patch_description: "Use find_library to locate GL libraries" patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/148" patch_type: "portability" + - patch_file: "patches/3.4.0-0003-Incorporate-the-include-directory-for-glu.h-in-CMake.patch" + patch_description: "Incorporate the include directory for glu.h in CMake" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/154" + patch_type: "portability" "3.2.2": - patch_file: "patches/3.2.1-0002-fixed-android-undefined-reference-to-glutCreateMenuU.patch" patch_description: "Add a missing function definition" @@ -31,6 +35,10 @@ patches: patch_description: "Use find_library to locate GL libraries" patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/148" patch_type: "portability" + - patch_file: "patches/3.2.2-0003-Incorporate-the-include-directory-for-glu.h-in-CMake.patch" + patch_description: "Incorporate the include directory for glu.h in CMake" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/154" + patch_type: "portability" "3.2.1": - patch_file: "patches/3.2.1-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch" patch_description: "Use find_package and pkg_check_modules to find dependencies" @@ -44,3 +52,7 @@ patches: patch_description: "Use find_library to locate GL libraries" patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/148" patch_type: "portability" + - patch_file: "patches/3.2.1-0004-Incorporate-the-include-directory-for-glu.h-in-CMake.patch" + patch_description: "Incorporate the include directory for glu.h in CMake" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/154" + patch_type: "portability" diff --git a/recipes/freeglut/all/conanfile.py b/recipes/freeglut/all/conanfile.py index 941d6703c1432..9b7f21448c416 100644 --- a/recipes/freeglut/all/conanfile.py +++ b/recipes/freeglut/all/conanfile.py @@ -1,5 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, rmdir from conan.tools.gnu import PkgConfigDeps @@ -91,7 +92,11 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("glu/system") + if is_apple_os(self) or self.settings.os == "Windows": + self.requires("glu/system") + else: + # FreeGLUT includes glu.h in freeglut_std.h. + self.requires("mesa-glu/9.0.3", transitive_headers=True) if self._with_libglvnd: self.requires("libglvnd/1.7.0") else: @@ -190,7 +195,6 @@ def package_info(self): self.cpp_info.components["freeglut_"].names["cmake_find_package_multi"] = config_target self.cpp_info.components["freeglut_"].set_property("cmake_target_name", f"FreeGLUT::{config_target}") self.cpp_info.components["freeglut_"].set_property("pkg_config_name", pkg_config) - self.cpp_info.components["freeglut_"].requires.append("glu::glu") if self._requires_libglvnd_egl: self.cpp_info.components["freeglut_"].requires.append("libglvnd::egl") if self._requires_libglvnd_gles: @@ -206,3 +210,7 @@ def package_info(self): self.cpp_info.components["freeglut_"].requires.append("xorg::xorg") if self.options.get_safe("with_wayland"): self.cpp_info.components["freeglut_"].requires.extend(["wayland::wayland-client", "wayland::wayland-cursor", "wayland::wayland-egl", "xkbcommon::xkbcommon"]) + if is_apple_os(self) or self.settings.os == "Windows": + self.cpp_info.components["freeglut_"].requires.append("glu::glu") + else: + self.cpp_info.components["freeglut_"].requires.append("mesa-glu::mesa-glu") diff --git a/recipes/freeglut/all/patches/3.2.1-0004-Incorporate-the-include-directory-for-glu.h-in-CMake.patch b/recipes/freeglut/all/patches/3.2.1-0004-Incorporate-the-include-directory-for-glu.h-in-CMake.patch new file mode 100644 index 0000000000000..a2fd409a85d19 --- /dev/null +++ b/recipes/freeglut/all/patches/3.2.1-0004-Incorporate-the-include-directory-for-glu.h-in-CMake.patch @@ -0,0 +1,61 @@ +From c81e600ace29bf5f3ded5e2650859f3303aaac6e Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Wed, 7 Feb 2024 10:09:25 -0600 +Subject: [PATCH] Incorporate the include directory for glu.h in CMake + +FreeGLUT doesn't properly check for the glu.h header file when it is required. +The glu.h header is not necessary when FreeGLUT is built for GLES. +However, the demos require use libGLU and so require the include and the library. + +CMake's FindOpenGL didn't properly search for the glu.h header file until very recently. +Refer to this PR: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9216. + +This PR checks for the glu.h header and adds the corresponding include directory when it is required. +For versions of CMake prior to 3.29, the include directory for GLU is added even when linking against the OpenGL::GLU target. +Like the FindOpenGL module, GLU include directories are ignored on Windows. +--- + CMakeLists.txt | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 772e73f3..162eec40 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -290,6 +290,17 @@ ELSE() + LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) + INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) + endif() ++ ++ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") ++ # CMake 3.29 properly locates the include directory for glu.h in the OPENGL_GLU_INCLUDE_DIR variable for us. ++ if(CMAKE_VERSION VERSION_LESS "3.29") ++ FIND_PATH(OPENGL_GLU_INCLUDE_DIR NAMES GL/glu.h OpenGL/glu.h HINTS ${OPENGL_INCLUDE_DIR}) ++ endif() ++ if(NOT OPENGL_GLU_INCLUDE_DIR) ++ message(FATAL_ERROR "Failed to find the glu.h header file.") ++ endif() ++ INCLUDE_DIRECTORIES(${OPENGL_GLU_INCLUDE_DIR}) ++ endif() + ENDIF() + + # For Wayland: compile with -DFREEGLUT_WAYLAND and pull EGL +@@ -566,7 +577,15 @@ INSTALL(FILES ${FREEGLUT_HEADERS} DESTINATION include/GL COMPONENT Devel) + # Optionally build demos, on by default. + option( FREEGLUT_BUILD_DEMOS "Build FreeGLUT demos." ON ) + +-SET(DEMO_LIBS ${OPENGL_glu_LIBRARY} ${LIBS}) ++set(DEMO_LIBS ${LIBS}) ++if (FREEGLUT_BUILD_DEMOS) ++ if (OPENGL_GLU_FOUND) ++ list(APPEND DEMO_LIBS ${OPENGL_glu_LIBRARY}) ++ else() ++ message(FATAL_ERROR "Failed to find the GLU library which is required to build the demos.") ++ endif() ++endif() ++ + # lib m for math, not needed on windows + IF (NOT WIN32) + LIST(APPEND DEMO_LIBS m) +-- +2.43.2 + diff --git a/recipes/freeglut/all/patches/3.2.2-0003-Incorporate-the-include-directory-for-glu.h-in-CMake.patch b/recipes/freeglut/all/patches/3.2.2-0003-Incorporate-the-include-directory-for-glu.h-in-CMake.patch new file mode 100644 index 0000000000000..997edcafc5966 --- /dev/null +++ b/recipes/freeglut/all/patches/3.2.2-0003-Incorporate-the-include-directory-for-glu.h-in-CMake.patch @@ -0,0 +1,61 @@ +From 278ac11cf27c8112021735240dc0b34fe849045e Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Wed, 7 Feb 2024 10:09:25 -0600 +Subject: [PATCH] Incorporate the include directory for glu.h in CMake + +FreeGLUT doesn't properly check for the glu.h header file when it is required. +The glu.h header is not necessary when FreeGLUT is built for GLES. +However, the demos require use libGLU and so require the include and the library. + +CMake's FindOpenGL didn't properly search for the glu.h header file until very recently. +Refer to this PR: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9216. + +This PR checks for the glu.h header and adds the corresponding include directory when it is required. +For versions of CMake prior to 3.29, the include directory for GLU is added even when linking against the OpenGL::GLU target. +Like the FindOpenGL module, GLU include directories are ignored on Windows. +--- + CMakeLists.txt | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c2549b1b..4ebc33af 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -294,6 +294,17 @@ ELSE() + LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) + INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) + endif() ++ ++ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") ++ # CMake 3.29 properly locates the include directory for glu.h in the OPENGL_GLU_INCLUDE_DIR variable for us. ++ if(CMAKE_VERSION VERSION_LESS "3.29") ++ FIND_PATH(OPENGL_GLU_INCLUDE_DIR NAMES GL/glu.h OpenGL/glu.h HINTS ${OPENGL_INCLUDE_DIR}) ++ endif() ++ if(NOT OPENGL_GLU_INCLUDE_DIR) ++ message(FATAL_ERROR "Failed to find the glu.h header file.") ++ endif() ++ INCLUDE_DIRECTORIES(${OPENGL_GLU_INCLUDE_DIR}) ++ endif() + ENDIF() + + # For Wayland: compile with -DFREEGLUT_WAYLAND and pull EGL +@@ -578,7 +589,15 @@ INSTALL(FILES ${FREEGLUT_HEADERS} DESTINATION include/GL COMPONENT Devel) + # Optionally build demos, on by default. + option( FREEGLUT_BUILD_DEMOS "Build FreeGLUT demos." ON ) + +-SET(DEMO_LIBS ${OPENGL_glu_LIBRARY} ${LIBS}) ++set(DEMO_LIBS ${LIBS}) ++if (FREEGLUT_BUILD_DEMOS) ++ if (OPENGL_GLU_FOUND) ++ list(APPEND DEMO_LIBS ${OPENGL_glu_LIBRARY}) ++ else() ++ message(FATAL_ERROR "Failed to find the GLU library which is required to build the demos.") ++ endif() ++endif() ++ + # lib m for math, not needed on windows + IF (NOT WIN32) + LIST(APPEND DEMO_LIBS m) +-- +2.43.2 + diff --git a/recipes/freeglut/all/patches/3.4.0-0003-Incorporate-the-include-directory-for-glu.h-in-CMake.patch b/recipes/freeglut/all/patches/3.4.0-0003-Incorporate-the-include-directory-for-glu.h-in-CMake.patch new file mode 100644 index 0000000000000..883e8141aa971 --- /dev/null +++ b/recipes/freeglut/all/patches/3.4.0-0003-Incorporate-the-include-directory-for-glu.h-in-CMake.patch @@ -0,0 +1,69 @@ +From 90f733b3adec8b3f97a24d4dd9dc47a595a17c2c Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Wed, 7 Feb 2024 10:09:25 -0600 +Subject: [PATCH] Incorporate the include directory for glu.h in CMake + +FreeGLUT doesn't properly check for the glu.h header file when it is required. +The glu.h header is not necessary when FreeGLUT is built for GLES. +However, the demos require use libGLU and so require the include and the library. + +CMake's FindOpenGL didn't properly search for the glu.h header file until very recently. +Refer to this PR: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9216. + +This PR checks for the glu.h header and adds the corresponding include directory when it is required. +For versions of CMake prior to 3.29, the include directory for GLU is added even when linking against the OpenGL::GLU target. +Like the FindOpenGL module, GLU include directories are ignored on Windows. +--- + CMakeLists.txt | 22 +++++++++++++++++++++- + 1 file changed, 21 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index afb4d735..aaf854d8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -324,6 +324,7 @@ ELSE() + get_filename_component(X11_LIB_PATH ${X11_Xi_LIB} DIRECTORY) + + find_library(OPENGL_gl_LIBRARY NAME GL HINTS ${X11_LIB_PATH}) ++ find_path(OPENGL_GLU_INCLUDE_DIR NAMES GL/glu.h OpenGL/glu.h HINTS ${X11_Xi_INCLUDE_PATH}) + find_library(OPENGL_glu_LIBRARY NAME GLU HINTS ${X11_LIB_PATH}) + endif() + +@@ -335,6 +336,17 @@ ELSE() + LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) + INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) + endif() ++ ++ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") ++ # CMake 3.29 properly locates the include directory for glu.h in the OPENGL_GLU_INCLUDE_DIR variable for us. ++ if(CMAKE_VERSION VERSION_LESS "3.29") ++ FIND_PATH(OPENGL_GLU_INCLUDE_DIR NAMES GL/glu.h OpenGL/glu.h HINTS ${OPENGL_INCLUDE_DIR}) ++ endif() ++ if(NOT OPENGL_GLU_INCLUDE_DIR) ++ message(FATAL_ERROR "Failed to find the glu.h header file.") ++ endif() ++ INCLUDE_DIRECTORIES(${OPENGL_GLU_INCLUDE_DIR}) ++ endif() + ENDIF() + + # For Wayland: compile with -DFREEGLUT_WAYLAND and pull EGL +@@ -599,7 +611,15 @@ INSTALL(FILES ${FREEGLUT_HEADERS} DESTINATION include/GL COMPONENT Devel) + # Optionally build demos, on by default. + option( FREEGLUT_BUILD_DEMOS "Build FreeGLUT demos." ON ) + +-SET(DEMO_LIBS ${OPENGL_glu_LIBRARY} ${LIBS}) ++set(DEMO_LIBS ${LIBS}) ++if (FREEGLUT_BUILD_DEMOS) ++ if (OPENGL_GLU_FOUND) ++ list(APPEND DEMO_LIBS ${OPENGL_glu_LIBRARY}) ++ else() ++ message(FATAL_ERROR "Failed to find the GLU library which is required to build the demos.") ++ endif() ++endif() ++ + # lib m for math, not needed on windows + IF (NOT WIN32) + LIST(APPEND DEMO_LIBS m) +-- +2.43.2 + From fd503cb9dcd02244e7e1f8739a4d7b942d6e026d Mon Sep 17 00:00:00 2001 From: Gang Wu Date: Tue, 27 Feb 2024 23:29:35 +0800 Subject: [PATCH 117/405] (#22854) New package: orc * New package: orc * sort functions and remove cache_variables * simplify patches * remove test_v1_package * Update recipes/orc/all/conanfile.py * use generator expression * Update recipes/orc/all/conanfile.py Co-authored-by: Uilian Ries --------- Co-authored-by: Uilian Ries --- .../orc/all/ConanThirdpartyToolchain.cmake | 50 ++++++ recipes/orc/all/conandata.yml | 10 ++ recipes/orc/all/conanfile.py | 159 ++++++++++++++++++ recipes/orc/all/test_package/CMakeLists.txt | 8 + recipes/orc/all/test_package/conanfile.py | 26 +++ recipes/orc/all/test_package/test_package.cpp | 8 + recipes/orc/config.yml | 7 + 7 files changed, 268 insertions(+) create mode 100644 recipes/orc/all/ConanThirdpartyToolchain.cmake create mode 100644 recipes/orc/all/conandata.yml create mode 100644 recipes/orc/all/conanfile.py create mode 100644 recipes/orc/all/test_package/CMakeLists.txt create mode 100644 recipes/orc/all/test_package/conanfile.py create mode 100644 recipes/orc/all/test_package/test_package.cpp create mode 100644 recipes/orc/config.yml diff --git a/recipes/orc/all/ConanThirdpartyToolchain.cmake b/recipes/orc/all/ConanThirdpartyToolchain.cmake new file mode 100644 index 0000000000000..7c6f64861a7cd --- /dev/null +++ b/recipes/orc/all/ConanThirdpartyToolchain.cmake @@ -0,0 +1,50 @@ +# ---------------------------------------------------------------------- +# Snappy + +find_package (Snappy REQUIRED) + +add_library (orc_snappy INTERFACE) +add_library (orc::snappy ALIAS orc_snappy) +target_link_libraries(orc_snappy INTERFACE Snappy::snappy) + +# ---------------------------------------------------------------------- +# ZLIB + +find_package (ZLIB REQUIRED) + +add_library (orc_zlib INTERFACE) +add_library (orc::zlib ALIAS orc_zlib) +target_link_libraries (orc_zlib INTERFACE ZLIB::ZLIB) + +# ---------------------------------------------------------------------- +# Zstd + +find_package (ZSTD REQUIRED) + +add_library (orc_zstd INTERFACE) +add_library (orc::zstd ALIAS orc_zstd) +target_link_libraries (orc_zstd INTERFACE + $ + $ +) + +# ---------------------------------------------------------------------- +# LZ4 + +find_package (LZ4 REQUIRED) + +add_library (orc_lz4 INTERFACE) +add_library (orc::lz4 ALIAS orc_lz4) +target_link_libraries (orc_lz4 INTERFACE + $ + $ +) + +# ---------------------------------------------------------------------- +# Protobuf + +find_package (Protobuf REQUIRED) + +add_library (orc_protobuf INTERFACE) +add_library (orc::protobuf ALIAS orc_protobuf) +target_link_libraries (orc_protobuf INTERFACE protobuf::protobuf) diff --git a/recipes/orc/all/conandata.yml b/recipes/orc/all/conandata.yml new file mode 100644 index 0000000000000..8458d41ec33d7 --- /dev/null +++ b/recipes/orc/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "1.9.2": + url: "https://dlcdn.apache.org/orc/orc-1.9.2/orc-1.9.2.tar.gz" + sha256: "7f46f2c184ecefd6791f1a53fb062286818bd8710c3f08b94dd3cac365e240ee" + "1.8.6": + url: "https://dlcdn.apache.org/orc/orc-1.8.6/orc-1.8.6.tar.gz" + sha256: "5675b18118df4dd7f86cc6ba859ed75b425ea1b7ddff805e1d671a17fd57d7f7" + "1.7.10": + url: "https://dlcdn.apache.org/orc/orc-1.7.10/orc-1.7.10.tar.gz" + sha256: "85aef9368dc9bcdffaaf10010b66dfe053ce22f30b64854f63852248164686a3" diff --git a/recipes/orc/all/conanfile.py b/recipes/orc/all/conanfile.py new file mode 100644 index 0000000000000..f246032bfb025 --- /dev/null +++ b/recipes/orc/all/conanfile.py @@ -0,0 +1,159 @@ +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.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import copy, get, rmdir, replace_in_file, mkdir +from conan.tools.scm import Version + +required_conan_version = ">=1.60.0 <2.0 || >=2.0.5" + +class OrcRecipe(ConanFile): + name = "orc" + description = "ORC is a self-describing type-aware columnar file format designed for Hadoop workloads" + license = "Apache-2.0" + homepage = "https://orc.apache.org/" + url = "https://github.com/conan-io/conan-center-index" + topics = ("orc", "columnar", "file-format", "hadoop") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "build_tools": [True, False], + "build_avx512": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "build_tools": False, + "build_avx512": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "8", + "clang": "7", + "apple-clang": "12", + } + + @property + def _is_legacy_one_profile(self): + return not hasattr(self, "settings_build") + + @property + def _should_patch_thirdparty_toolchain(self): + return self.version < "2.0.0" + + def export_sources(self): + if self._should_patch_thirdparty_toolchain: + copy(self, "ConanThirdpartyToolchain.cmake", + self.recipe_folder, os.path.join(self.export_sources_folder, "src", "cmake_modules")) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + if self.settings.compiler == "apple-clang": + # AVX support is not enabled by default, might need to add -mavx512f to CXXFLAGS + del self.options.build_avx512 + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src", build_folder="build") + + def requirements(self): + self.requires("protobuf/3.21.12") + self.requires("lz4/1.9.4") + self.requires("snappy/1.1.9") + self.requires("zlib/[>=1.2.11 <2]") + self.requires("zstd/1.5.5") + + 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._is_legacy_one_profile: + self.tool_requires("protobuf/") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + VirtualBuildEnv(self).generate() + VirtualRunEnv(self).generate(scope="build") + + tc = CMakeToolchain(self) + tc.variables["ORC_PACKAGE_KIND"] = "conan" + tc.variables["BUILD_JAVA"] = False + tc.variables["BUILD_CPP_TESTS"] = False + tc.variables["BUILD_TOOLS"] = self.options.build_tools + tc.variables["BUILD_LIBHDFSPP"] = False + tc.variables["BUILD_POSITION_INDEPENDENT_LIB"] = bool(self.options.get_safe("fPIC", True)) + tc.variables["INSTALL_VENDORED_LIBS"] = False + # AVX512 support is determined by ORC_USER_SIMD_LEVEL env var at runtime, defaults to off + tc.variables["BUILD_ENABLE_AVX512"] = self.options.get_safe("build_avx512", False) + tc.variables["STOP_BUILD_ON_WARNING"] = False + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + + # CMake versions less than 3.12 are supported by ORC pre-1.9.0 versions. + # Setting policy CMP0077 to NEW to remove unnecessary cache_variables settings. + if self.version < "1.9.0": + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + + protoc_path = os.path.join(self.dependencies["protobuf"].cpp_info.bindir, "protoc") + tc.variables["PROTOBUF_EXECUTABLE"] = protoc_path.replace("\\", "/") + tc.variables["HAS_POST_2038"] = self.settings.os != "Windows" + tc.variables["HAS_PRE_1970"] = self.settings.os != "Windows" + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def _patch_sources(self): + if self._should_patch_thirdparty_toolchain: + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "ThirdpartyToolchain", "ConanThirdpartyToolchain") + # Allow shared builds + replace_in_file(self, os.path.join(self.source_folder, "c++", "src", "CMakeLists.txt"), + "add_library (orc STATIC ${SOURCE_FILES})", "add_library (orc ${SOURCE_FILES})") + + 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")) + copy(self, "NOTICE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "share")) + if self.settings.os == "Windows" and self.options.shared: + mkdir(self, os.path.join(self.package_folder, "bin")) + os.rename(os.path.join(self.package_folder, "lib", "orc.dll"), + os.path.join(self.package_folder, "bin", "orc.dll")) + + def package_info(self): + self.cpp_info.libs = ["orc"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["pthread", "m"] diff --git a/recipes/orc/all/test_package/CMakeLists.txt b/recipes/orc/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..620d40236f2e4 --- /dev/null +++ b/recipes/orc/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(orc REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE orc::orc) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/orc/all/test_package/conanfile.py b/recipes/orc/all/test_package/conanfile.py new file mode 100644 index 0000000000000..594384bd24a75 --- /dev/null +++ b/recipes/orc/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run + +class 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): + cmd = os.path.join(self.cpp.build.bindir, "test_package") + self.run(cmd, env="conanrun") diff --git a/recipes/orc/all/test_package/test_package.cpp b/recipes/orc/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..ba9153b830bac --- /dev/null +++ b/recipes/orc/all/test_package/test_package.cpp @@ -0,0 +1,8 @@ +#include +#include + +int main() { + auto orcType = orc::Type::buildTypeFromString("struct"); + std::cout << orcType->toString() << std::endl; + return 0; +} diff --git a/recipes/orc/config.yml b/recipes/orc/config.yml new file mode 100644 index 0000000000000..dcd92ae52deb2 --- /dev/null +++ b/recipes/orc/config.yml @@ -0,0 +1,7 @@ +versions: + "1.9.2": + folder: all + "1.8.6": + folder: all + "1.7.10": + folder: all From f44659dad5bc94d324f6a583667cee7fb53d2caa Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Tue, 27 Feb 2024 16:49:52 +0100 Subject: [PATCH 118/405] (#22889) Add version 3.1.10 for imath library * Add version 3.1.10 for imath library * Add version exclusion for gcc <7 with imath 3.1.10 * Add a patch for the gcc5 compatibility issue * Add patch command to the build process * Add missing function to imports * Fix patch path --- recipes/imath/all/conandata.yml | 9 +++++ recipes/imath/all/conanfile.py | 9 +++-- .../all/patches/3.1.10-gcc5-backport.patch | 34 +++++++++++++++++++ recipes/imath/config.yml | 2 ++ 4 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 recipes/imath/all/patches/3.1.10-gcc5-backport.patch diff --git a/recipes/imath/all/conandata.yml b/recipes/imath/all/conandata.yml index 184bb3afe6a05..605325978acfe 100644 --- a/recipes/imath/all/conandata.yml +++ b/recipes/imath/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.1.10": + url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.10.tar.gz" + sha256: "f2943e86bfb694e216c60b9a169e5356f8a90f18fbd34d7b6e3450be14f60b10" "3.1.9": url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.9.tar.gz" sha256: "f1d8aacd46afed958babfced3190d2d3c8209b66da451f556abd6da94c165cf3" @@ -17,3 +20,9 @@ sources: "3.1.4": url: "https://github.com/AcademySoftwareFoundation/Imath/archive/refs/tags/v3.1.4.tar.gz" sha256: "fcca5fbb37d375a252bacd8a29935569bdc28b888f01ef1d9299ca0c9e87c17a" +patches: + "3.1.10": + - patch_file: "patches/3.1.10-gcc5-backport.patch" + patch_description: "Add std:: prefix for isfinite (Backport from main, two commits on the file fix the issue)" + patch_type: "official" + patch_source: "https://github.com/AcademySoftwareFoundation/Imath/blob/main/src/Imath/ImathFun.cpp" diff --git a/recipes/imath/all/conanfile.py b/recipes/imath/all/conanfile.py index ca052909386af..1493689ab88b1 100644 --- a/recipes/imath/all/conanfile.py +++ b/recipes/imath/all/conanfile.py @@ -1,7 +1,7 @@ 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, rmdir +from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, rmdir from conan.tools.microsoft import is_msvc import os @@ -30,6 +30,9 @@ class ImathConan(ConanFile): "fPIC": True, } + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -53,10 +56,12 @@ def generate(self): if is_msvc(self) and self.settings.compiler.get_safe("cppstd"): # when msvc is working with a C++ standard level higher # than the default, we need the __cplusplus macro to be correct - tc.variables["CMAKE_CXX_FLAGS"] = "/Zc:__cplusplus" + tc.variables["CMAKE_CXX_FLAGS"] = "/Zc:__cplusplus" tc.generate() def build(self): + apply_conandata_patches(self) + cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/imath/all/patches/3.1.10-gcc5-backport.patch b/recipes/imath/all/patches/3.1.10-gcc5-backport.patch new file mode 100644 index 0000000000000..8d27e5461ad48 --- /dev/null +++ b/recipes/imath/all/patches/3.1.10-gcc5-backport.patch @@ -0,0 +1,34 @@ +diff --git src/Imath/ImathFun.cpp src/Imath/ImathFun.cpp +index bfec292..c8c2e7e 100644 +--- src/Imath/ImathFun.cpp ++++ src/Imath/ImathFun.cpp +@@ -10,25 +10,25 @@ IMATH_INTERNAL_NAMESPACE_SOURCE_ENTER + + float succf(float f) IMATH_NOEXCEPT + { +- return isfinite(f) ? ++ return std::isfinite(f) ? + std::nextafter(f, std::numeric_limits::infinity()) : f; + } + + float predf(float f) IMATH_NOEXCEPT + { +- return isfinite(f) ? ++ return std::isfinite(f) ? + std::nextafter(f, -std::numeric_limits::infinity()) : f; + } + + double succd(double d) IMATH_NOEXCEPT + { +- return isfinite(d) ? ++ return std::isfinite(d) ? + std::nextafter(d, std::numeric_limits::infinity()) : d; + } + + double predd(double d) IMATH_NOEXCEPT + { +- return isfinite(d) ? ++ return std::isfinite(d) ? + std::nextafter(d, -std::numeric_limits::infinity()) : d; + } + diff --git a/recipes/imath/config.yml b/recipes/imath/config.yml index e9bdf1c39b31e..a3cca600992b6 100644 --- a/recipes/imath/config.yml +++ b/recipes/imath/config.yml @@ -1,4 +1,6 @@ versions: + "3.1.10": + folder: all "3.1.9": folder: all "3.1.8": From 5f0d20451fd89574e11d0eb8c4c5c8c837bc91a9 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 28 Feb 2024 02:08:41 +0900 Subject: [PATCH 119/405] (#22890) pathie-cpp: add recipe * pathie-cpp: add recipe * export all symbols * fix install path --- recipes/pathie-cpp/all/conandata.yml | 12 +++ recipes/pathie-cpp/all/conanfile.py | 85 +++++++++++++++++++ .../all/patches/0.1.1-0001-fix-cmake.patch | 47 ++++++++++ .../patches/0.1.1-0002-fix-install-path.patch | 27 ++++++ .../all/test_package/CMakeLists.txt | 7 ++ .../pathie-cpp/all/test_package/conanfile.py | 26 ++++++ .../all/test_package/test_package.cpp | 16 ++++ recipes/pathie-cpp/config.yml | 3 + 8 files changed, 223 insertions(+) create mode 100644 recipes/pathie-cpp/all/conandata.yml create mode 100644 recipes/pathie-cpp/all/conanfile.py create mode 100644 recipes/pathie-cpp/all/patches/0.1.1-0001-fix-cmake.patch create mode 100644 recipes/pathie-cpp/all/patches/0.1.1-0002-fix-install-path.patch create mode 100644 recipes/pathie-cpp/all/test_package/CMakeLists.txt create mode 100644 recipes/pathie-cpp/all/test_package/conanfile.py create mode 100644 recipes/pathie-cpp/all/test_package/test_package.cpp create mode 100644 recipes/pathie-cpp/config.yml diff --git a/recipes/pathie-cpp/all/conandata.yml b/recipes/pathie-cpp/all/conandata.yml new file mode 100644 index 0000000000000..4046bc50f2738 --- /dev/null +++ b/recipes/pathie-cpp/all/conandata.yml @@ -0,0 +1,12 @@ +sources: + "0.1.1": + url: "https://github.com/Quintus/pathie-cpp/archive/refs/tags/v0.1.1.tar.gz" + sha256: "7c2cca0c52ad80792bf6dbeb74213c1791fe9e599058765f5b81fd00f53eb2d3" +patches: + "0.1.1": + - patch_file: "patches/0.1.1-0001-fix-cmake.patch" + patch_description: "separate shtatic and shared build" + patch_type: "conan" + - patch_file: "patches/0.1.1-0002-fix-install-path.patch" + patch_description: "fix install path for windows shared build" + patch_type: "conan" diff --git a/recipes/pathie-cpp/all/conanfile.py b/recipes/pathie-cpp/all/conanfile.py new file mode 100644 index 0000000000000..95acb35802514 --- /dev/null +++ b/recipes/pathie-cpp/all/conanfile.py @@ -0,0 +1,85 @@ +from conan import ConanFile +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir +from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.apple import is_apple_os +import os + +required_conan_version = ">=1.53.0" + +class PathieCppConan(ConanFile): + name = "pathie-cpp" + description = "Small C++ library for crossplatform Unicode path management" + license = "BSD-2-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/Quintus/pathie-cpp" + topics = ("path", "unicode",) + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_stream_replacement": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_stream_replacement": False, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["CMAKE_BUILD_SHARED_LIBS"] = self.options.shared + tc.variables["PATHIE_BUILD_STREAM_REPLACEMENTS"] = self.options.with_stream_replacement + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + + # some files extensions and folders are not allowed. Please, read the FAQs to get informed. + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + + def package_info(self): + self.cpp_info.libs = ["pathie"] + + self.cpp_info.set_property("cmake_file_name", "Pathie") + self.cpp_info.set_property("cmake_target_name", "Pathie::Pathie") + + if self.settings.os == "Windows": + self.cpp_info.system_libs.append("shlwapi") + + if is_apple_os(self): + self.cpp_info.system_libs.append("iconv") diff --git a/recipes/pathie-cpp/all/patches/0.1.1-0001-fix-cmake.patch b/recipes/pathie-cpp/all/patches/0.1.1-0001-fix-cmake.patch new file mode 100644 index 0000000000000..50f3218d3b0f1 --- /dev/null +++ b/recipes/pathie-cpp/all/patches/0.1.1-0001-fix-cmake.patch @@ -0,0 +1,47 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d765179..e31b54b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -116,12 +116,14 @@ file(GLOB_RECURSE test_sources + # Targets + + # Libraries ++if (NOT BUILD_SHARED_LIBS) + add_library(pathie STATIC ${pathie_sources}) + if(APPLE) + target_link_libraries(pathie iconv) + endif() ++endif() + +-if (CMAKE_BUILD_SHARED_LIBS) ++if (BUILD_SHARED_LIBS) + add_library(pathie-dynamic SHARED ${pathie_sources}) + set_target_properties(pathie-dynamic PROPERTIES OUTPUT_NAME pathie) + if(APPLE) +@@ -130,9 +132,10 @@ if (CMAKE_BUILD_SHARED_LIBS) + endif() + + if(WIN32) ++ if (NOT BUILD_SHARED_LIBS) + target_link_libraries(pathie shlwapi) +- +- if (CMAKE_BUILD_SHARED_LIBS) ++ endif() ++ if (BUILD_SHARED_LIBS) + target_link_libraries(pathie-dynamic shlwapi) + endif() + endif() +@@ -152,10 +155,12 @@ endif() + ######################################## + # Installation information + ++if (NOT BUILD_SHARED_LIBS) + install(TARGETS pathie + DESTINATION lib) ++endif() + +-if (CMAKE_BUILD_SHARED_LIBS) ++if (BUILD_SHARED_LIBS) + install(TARGETS pathie-dynamic + DESTINATION lib) + endif() diff --git a/recipes/pathie-cpp/all/patches/0.1.1-0002-fix-install-path.patch b/recipes/pathie-cpp/all/patches/0.1.1-0002-fix-install-path.patch new file mode 100644 index 0000000000000..fba8edf003ed6 --- /dev/null +++ b/recipes/pathie-cpp/all/patches/0.1.1-0002-fix-install-path.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e31b54b..bdf279e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -154,15 +154,19 @@ endif() + + ######################################## + # Installation information +- ++include(GNUInstallDirs) + if (NOT BUILD_SHARED_LIBS) + install(TARGETS pathie +- DESTINATION lib) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() + + if (BUILD_SHARED_LIBS) + install(TARGETS pathie-dynamic +- DESTINATION lib) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() + + install(FILES diff --git a/recipes/pathie-cpp/all/test_package/CMakeLists.txt b/recipes/pathie-cpp/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..00bc659fd0252 --- /dev/null +++ b/recipes/pathie-cpp/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(Pathie REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE Pathie::Pathie) diff --git a/recipes/pathie-cpp/all/test_package/conanfile.py b/recipes/pathie-cpp/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/pathie-cpp/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/pathie-cpp/all/test_package/test_package.cpp b/recipes/pathie-cpp/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..62d62074adb6a --- /dev/null +++ b/recipes/pathie-cpp/all/test_package/test_package.cpp @@ -0,0 +1,16 @@ +#include +#include + +static bool callback(const Pathie::Path& entry) +{ + std::cout << entry << std::endl; + return true; +} + +int main() +{ + Pathie::Path dir("."); + dir.find(callback); + + return 0; +} diff --git a/recipes/pathie-cpp/config.yml b/recipes/pathie-cpp/config.yml new file mode 100644 index 0000000000000..b893ff21f7c23 --- /dev/null +++ b/recipes/pathie-cpp/config.yml @@ -0,0 +1,3 @@ +versions: + "0.1.1": + folder: all From 4bc06cf81d6f09da987739f1aed71322b489f342 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 27 Feb 2024 19:29:40 +0200 Subject: [PATCH 120/405] (#22892) urdfdom: add v4.0.0 * urdfdom: add v4.0.0 * urdfdom: set CMP0077 --- recipes/urdfdom/all/conandata.yml | 22 +++++++++--- recipes/urdfdom/all/conanfile.py | 16 ++++++--- .../{ => 3.1.1}/001-optional-build-apps.patch | 0 .../002-use-conan-dependencies.patch | 35 ------------------- .../003-use-merged-urdfdom_headers.patch | 9 ----- .../4.0.0/001-optional-build-apps.patch | 34 ++++++++++++++++++ .../4.0.0/002-use-conan-dependencies.patch | 14 ++++++++ recipes/urdfdom/config.yml | 2 ++ 8 files changed, 80 insertions(+), 52 deletions(-) rename recipes/urdfdom/all/patches/{ => 3.1.1}/001-optional-build-apps.patch (100%) rename recipes/urdfdom/all/patches/{ => 3.1.1}/002-use-conan-dependencies.patch (63%) rename recipes/urdfdom/all/patches/{ => 3.1.1}/003-use-merged-urdfdom_headers.patch (51%) create mode 100644 recipes/urdfdom/all/patches/4.0.0/001-optional-build-apps.patch create mode 100644 recipes/urdfdom/all/patches/4.0.0/002-use-conan-dependencies.patch diff --git a/recipes/urdfdom/all/conandata.yml b/recipes/urdfdom/all/conandata.yml index 82a2012232450..c8d87b45ad9b0 100644 --- a/recipes/urdfdom/all/conandata.yml +++ b/recipes/urdfdom/all/conandata.yml @@ -1,4 +1,11 @@ sources: + "4.0.0": + urdfdom: + url: "https://github.com/ros/urdfdom/archive/refs/tags/4.0.0.tar.gz" + sha256: "9848d106dc88dc0b907d5667c09da3ca53241fbcf17e982d8c234fe3e0d6ddcc" + urdfdom_headers: + url: "https://github.com/ros/urdfdom_headers/archive/refs/tags/1.1.1.zip" + sha256: "dde77e3dd96ffa41e2ee0a20bddcd6ef05863e95ce0143ede77130d8cd46c644" "3.1.1": urdfdom: url: "https://github.com/ros/urdfdom/archive/refs/tags/3.1.1.tar.gz" @@ -10,13 +17,20 @@ sources: url: "https://github.com/ros/urdfdom_headers/archive/1fd21b64ed78493508a174f98af982605d1e4607.zip" sha256: "aba42c1c83d6d1fb94e54ec84680a8b9e2417337fbaa85424da0e069d0cc89b6" patches: + "4.0.0": + - patch_file: "patches/4.0.0/001-optional-build-apps.patch" + patch_type: "conan" + patch_description: "Disable building of apps by default" + - patch_file: "patches/4.0.0/002-use-conan-dependencies.patch" + patch_type: "conan" + patch_description: "Use dependencies from Conan, use merged urdfdom_headers" "3.1.1": - - patch_file: "patches/001-optional-build-apps.patch" + - patch_file: "patches/3.1.1/001-optional-build-apps.patch" patch_type: "conan" patch_description: "Disable building of apps by default" - - patch_file: "patches/002-use-conan-dependencies.patch" + - patch_file: "patches/3.1.1/002-use-conan-dependencies.patch" patch_type: "conan" - patch_description: "Use dependencies (console_bridge, TinyXML, GTest) from Conan" - - patch_file: "patches/003-use-merged-urdfdom_headers.patch" + patch_description: "Use dependencies (console_bridge, TinyXML) from Conan" + - patch_file: "patches/3.1.1/003-use-merged-urdfdom_headers.patch" patch_type: "conan" patch_description: "Use merged urdfdom_headers instead of a separate package" diff --git a/recipes/urdfdom/all/conanfile.py b/recipes/urdfdom/all/conanfile.py index f7a710e7f7ea7..92fdbe4fc111e 100644 --- a/recipes/urdfdom/all/conanfile.py +++ b/recipes/urdfdom/all/conanfile.py @@ -4,6 +4,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -45,7 +46,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("tinyxml/2.6.2", transitive_headers=True) + if Version(self.version) >= "4.0": + self.requires("tinyxml2/10.0.0", transitive_headers=True, transitive_libs=True) + else: + self.requires("tinyxml/2.6.2", transitive_headers=True, transitive_libs=True) self.requires("console_bridge/1.0.2") def validate(self): @@ -68,6 +72,8 @@ def generate(self): tc.variables["BUILD_APPS"] = False if not self.options.shared: tc.preprocessor_definitions["URDFDOM_STATIC"] = "1" + # Need to set CMP0077 because CMake policy version is too old (3.5 as of v4.0.0) + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() CMakeDeps(self).generate() @@ -84,11 +90,13 @@ def build(self): cmake.build() def package(self): - copy(self, "LICENSE", - dst=os.path.join(self.package_folder, "licenses"), - src=self.source_folder) + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() + # Copy urdfdom_headers + copy(self, "*", + src=os.path.join(self.source_folder, "urdf_parser", "include"), + dst=os.path.join(self.package_folder, "include")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "lib", "urdfdom")) rmdir(self, os.path.join(self.package_folder, "CMake")) diff --git a/recipes/urdfdom/all/patches/001-optional-build-apps.patch b/recipes/urdfdom/all/patches/3.1.1/001-optional-build-apps.patch similarity index 100% rename from recipes/urdfdom/all/patches/001-optional-build-apps.patch rename to recipes/urdfdom/all/patches/3.1.1/001-optional-build-apps.patch diff --git a/recipes/urdfdom/all/patches/002-use-conan-dependencies.patch b/recipes/urdfdom/all/patches/3.1.1/002-use-conan-dependencies.patch similarity index 63% rename from recipes/urdfdom/all/patches/002-use-conan-dependencies.patch rename to recipes/urdfdom/all/patches/3.1.1/002-use-conan-dependencies.patch index cbb6f0fc84fb3..47e25f1f27284 100644 --- a/recipes/urdfdom/all/patches/002-use-conan-dependencies.patch +++ b/recipes/urdfdom/all/patches/3.1.1/002-use-conan-dependencies.patch @@ -46,38 +46,3 @@ diff --git a/urdf_parser/CMakeLists.txt b/urdf_parser/CMakeLists.txt target_compile_features(${add_urdfdom_library_LIBNAME} PUBLIC cxx_std_14) endif() -diff --git a/urdf_parser/test/CMakeLists.txt b/urdf_parser/test/CMakeLists.txt ---- a/urdf_parser/test/CMakeLists.txt (revision 1ed7ca95b917f38feb4ff7bd1aa033baf2cfce0e) -+++ b/urdf_parser/test/CMakeLists.txt (revision 6592c04e28cb59b8e9ac5944e3229c50d706a2ee) -@@ -1,18 +1,8 @@ --include_directories( -- ${CMAKE_CURRENT_SOURCE_DIR}/gtest/include -- ${CMAKE_CURRENT_SOURCE_DIR}/gtest -- ${CMAKE_CURRENT_SOURCE_DIR} --) -- --# Build gtest --add_library(gtest STATIC gtest/src/gtest-all.cc) --add_library(gtest_main STATIC gtest/src/gtest_main.cc) --target_link_libraries(gtest_main gtest) --target_compile_features(gtest PUBLIC cxx_std_11) -- - execute_process(COMMAND cmake -E remove_directory ${CMAKE_BINARY_DIR}/test_results) - execute_process(COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/test_results) - -+find_package(GTest REQUIRED) -+ - # unit test to fix geometry problems - set(tests - urdf_double_convert.cpp -@@ -27,8 +17,8 @@ - add_executable(${BINARY_NAME} ${GTEST_SOURCE_file}) - - target_link_libraries(${BINARY_NAME} -- gtest_main -- gtest -+ GTest::gtest -+ GTest::gtest_main - urdfdom_model - ) - if (UNIX) diff --git a/recipes/urdfdom/all/patches/003-use-merged-urdfdom_headers.patch b/recipes/urdfdom/all/patches/3.1.1/003-use-merged-urdfdom_headers.patch similarity index 51% rename from recipes/urdfdom/all/patches/003-use-merged-urdfdom_headers.patch rename to recipes/urdfdom/all/patches/3.1.1/003-use-merged-urdfdom_headers.patch index b4095fcb7ba42..0fc6cb3bfaa91 100644 --- a/recipes/urdfdom/all/patches/003-use-merged-urdfdom_headers.patch +++ b/recipes/urdfdom/all/patches/3.1.1/003-use-merged-urdfdom_headers.patch @@ -10,12 +10,3 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt # Control where libraries and executables are placed during the build -diff --git a/urdf_parser/CMakeLists.txt b/urdf_parser/CMakeLists.txt ---- a/urdf_parser/CMakeLists.txt (revision 82fb54588f3ba5091d9a73d072559ac7061eccdf) -+++ b/urdf_parser/CMakeLists.txt (revision 1de2b88f231fa0f7f83a028e971d4ebaed1b164c) -@@ -135,4 +135,4 @@ - FILE "urdfdomExport.cmake" - ) - --INSTALL(DIRECTORY include/urdf_parser DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -+INSTALL(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/recipes/urdfdom/all/patches/4.0.0/001-optional-build-apps.patch b/recipes/urdfdom/all/patches/4.0.0/001-optional-build-apps.patch new file mode 100644 index 0000000000000..65518ddc352d0 --- /dev/null +++ b/recipes/urdfdom/all/patches/4.0.0/001-optional-build-apps.patch @@ -0,0 +1,34 @@ +--- urdf_parser/CMakeLists.txt ++++ urdf_parser/CMakeLists.txt +@@ -81,6 +81,7 @@ + + # -------------------------------- + ++if(BUILD_APPS) + add_executable(check_urdf src/check_urdf.cpp) + target_include_directories(check_urdf PUBLIC include) + target_link_libraries(check_urdf urdfdom_model urdfdom_world) +@@ -97,6 +98,7 @@ + add_executable(urdf_mem_test test/memtest.cpp) + target_include_directories(urdf_mem_test PUBLIC include) + target_link_libraries(urdf_mem_test urdfdom_model) ++endif() + + include(CTest) + if(BUILD_TESTING) +@@ -104,6 +106,7 @@ + add_subdirectory(test) + endif() + ++if(BUILD_APPS) + INSTALL( + TARGETS + check_urdf +@@ -114,6 +117,7 @@ + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) ++endif() + INSTALL( + TARGETS + urdfdom_model diff --git a/recipes/urdfdom/all/patches/4.0.0/002-use-conan-dependencies.patch b/recipes/urdfdom/all/patches/4.0.0/002-use-conan-dependencies.patch new file mode 100644 index 0000000000000..9553d1b1c9713 --- /dev/null +++ b/recipes/urdfdom/all/patches/4.0.0/002-use-conan-dependencies.patch @@ -0,0 +1,14 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -45,11 +45,8 @@ + + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + +-find_package(tinyxml2_vendor QUIET) + find_package(TinyXML2 REQUIRED) + +-find_package(urdfdom_headers 1.0 REQUIRED) +-find_package(console_bridge_vendor QUIET) # Provides console_bridge 0.4.0 on platforms without it. + find_package(console_bridge REQUIRED) + + # Control where libraries and executables are placed during the build diff --git a/recipes/urdfdom/config.yml b/recipes/urdfdom/config.yml index fd9669719a7ad..1188e8479ce63 100644 --- a/recipes/urdfdom/config.yml +++ b/recipes/urdfdom/config.yml @@ -1,3 +1,5 @@ versions: + "4.0.0": + folder: all "3.1.1": folder: all From b0df97bfc26eba4150d8346a045d1116a0747673 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 28 Feb 2024 11:04:07 +0200 Subject: [PATCH 121/405] (#18823) redradist-icc: migrate to Conan v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * redradist-icc: migrate to Conan v2 * redradist-icc: restore VirtualRunEnv in test_package * redradist-icc: clean up imports * redradist-icc: tidy validate() * redradist-icc: fix test_v1_package --------- Co-authored-by: Rubén Rincón Blanco --- recipes/redradist-icc/all/CMakeLists.txt | 7 - recipes/redradist-icc/all/conanfile.py | 140 +++++++++--------- .../all/test_package/CMakeLists.txt | 9 +- .../all/test_package/conanfile.py | 23 ++- .../all/test_package/example.cpp | 7 +- .../all/test_v1_package/CMakeLists.txt | 8 + .../all/test_v1_package/conanfile.py | 17 +++ 7 files changed, 117 insertions(+), 94 deletions(-) delete mode 100644 recipes/redradist-icc/all/CMakeLists.txt create mode 100644 recipes/redradist-icc/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/redradist-icc/all/test_v1_package/conanfile.py diff --git a/recipes/redradist-icc/all/CMakeLists.txt b/recipes/redradist-icc/all/CMakeLists.txt deleted file mode 100644 index bd3083b512cb9..0000000000000 --- a/recipes/redradist-icc/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory(source_subfolder) diff --git a/recipes/redradist-icc/all/conanfile.py b/recipes/redradist-icc/all/conanfile.py index 926df39193116..1c501628eb1da 100644 --- a/recipes/redradist-icc/all/conanfile.py +++ b/recipes/redradist-icc/all/conanfile.py @@ -1,33 +1,35 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration, ConanException -import os +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import export_conandata_patches, get + +required_conan_version = ">=1.53.0" class ICCConan(ConanFile): - name = 'redradist-icc' - homepage = 'https://github.com/redradist/Inter-Component-Communication' - license = 'MIT' - url = 'https://github.com/conan-io/conan-center-index' - description = "I.C.C. - Inter Component Communication, This is a library created to simplify communication between " \ - "components inside of single application. It is thread safe and could be used for creating " \ - "components that works in different threads. " + name = "redradist-icc" + description = ( + "I.C.C. - Inter Component Communication, This is a library created to simplify communication between " + "components inside of single application. It is thread safe and could be used for creating " + "components that works in different threads. " + ) + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/redradist/Inter-Component-Communication" topics = ("thread-safe", "active-object", "communication") - settings = "os", "compiler", "build_type", "arch" + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], - 'fPIC': [True, False], + "fPIC": [True, False], } default_options = { - 'shared': False, - 'fPIC': True, + "shared": False, + "fPIC": True, } - generators = "cmake", "cmake_find_package", "cmake_find_package_multi" - - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" @property def _minimum_cpp_standard(self): @@ -37,79 +39,75 @@ def _minimum_cpp_standard(self): def _minimum_compilers_version(self): return { "Visual Studio": "15", + "msvc": "191", "apple-clang": "9.4", "clang": "3.3", - "gcc": "4.9.4" + "gcc": "4.9.4", } - def _configure_cmake(self): - if self._cmake: - return self._cmake - cmake = CMake(self) - cmake.definitions['ICC_BUILD_SHARED'] = self.options.shared - cmake.configure() - self._cmake = cmake - return self._cmake - - def validate(self): - if self.settings.get_safe("compiler.cppstd"): - tools.check_min_cppstd(self, self._minimum_cpp_standard) - - os = self.settings.os - if os not in ("Windows", "Linux"): - msg = ( - "OS {} is not supported !!" - ).format(os) - raise ConanInvalidConfiguration(msg) - - compiler = self.settings.compiler - try: - min_version = self._minimum_compilers_version[str(compiler)] - if tools.Version(compiler.version) < min_version: - msg = ( - "{} requires C++{} features which are not supported by compiler {} {} !!" - ).format(self.name, self._minimum_cpp_standard, compiler, compiler.version) - raise ConanInvalidConfiguration(msg) - except KeyError: - msg = ( - "{} recipe lacks information about the {} compiler, " - "support for the required C++{} features is assumed" - ).format(self.name, compiler, self._minimum_cpp_standard) - self.output.warn(msg) + def export_sources(self): + export_conandata_patches(self) def config_options(self): - if self.settings.os == 'Windows': + if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") - def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._minimum_cpp_standard) + + if is_apple_os(self): + raise ConanInvalidConfiguration(f"OS {self.settings.os} is not supported") + + def lazy_lt_semver(v1, v2): + # To allow version "9" >= "9.4" for apple-clang + return all(int(p1) < int(p2) for p1, p2 in zip(str(v1).split("."), str(v2).split("."))) + + compiler = self.settings.compiler + min_version = self._minimum_compilers_version.get(str(compiler)) + if min_version and lazy_lt_semver(compiler.version, min_version): + raise ConanInvalidConfiguration( + f"{self.name} requires C++{self._minimum_cpp_standard} features " + f"which are not supported by compiler {compiler} {compiler.version}") def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["ICC_BUILD_SHARED"] = self.options.shared + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - cmake = self._configure_cmake() + cmake = CMake(self) cmake.install() def package_info(self): - self.cpp_info.names["cmake_find_package"] = "icc" - self.cpp_info.names["cmake_find_package_multi"] = "icc" + self.cpp_info.set_property("cmake_file_name", "icc") + self.cpp_info.set_property("cmake_target_name", "icc::icc") + if self.options.shared: self.cpp_info.libs = ["ICC"] else: self.cpp_info.libs = ["ICC_static"] - if self.settings.os == 'Windows': - self.cpp_info.system_libs = ['ws2_32', 'wsock32'] - if self.settings.os == 'Linux': - self.cpp_info.system_libs = ['pthread'] + if self.settings.os == "Windows": + self.cpp_info.system_libs = ["ws2_32", "wsock32"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["pthread"] + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.names["cmake_find_package"] = "icc" + self.cpp_info.names["cmake_find_package_multi"] = "icc" diff --git a/recipes/redradist-icc/all/test_package/CMakeLists.txt b/recipes/redradist-icc/all/test_package/CMakeLists.txt index de507b485e0da..1e80ea5e97b76 100644 --- a/recipes/redradist-icc/all/test_package/CMakeLists.txt +++ b/recipes/redradist-icc/all/test_package/CMakeLists.txt @@ -1,12 +1,9 @@ -cmake_minimum_required(VERSION 3.1) -project(PackageTest) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) set(CMAKE_CXX_STANDARD 11) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -find_package(icc REQUIRED) +find_package(icc REQUIRED CONFIG) add_executable(example example.cpp) target_link_libraries(example PRIVATE icc::icc) diff --git a/recipes/redradist-icc/all/test_package/conanfile.py b/recipes/redradist-icc/all/test_package/conanfile.py index b80e4a18de9ec..8d52b7021efe1 100644 --- a/recipes/redradist-icc/all/test_package/conanfile.py +++ b/recipes/redradist-icc/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 ICCTestConan(ConanFile): - settings = 'os', 'compiler', 'build_type', 'arch' - generators = 'cmake', 'cmake_find_package' +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,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/redradist-icc/all/test_package/example.cpp b/recipes/redradist-icc/all/test_package/example.cpp index cbf15d36a28cd..2a8c9ea6d9adf 100644 --- a/recipes/redradist-icc/all/test_package/example.cpp +++ b/recipes/redradist-icc/all/test_package/example.cpp @@ -1,14 +1,15 @@ #include #include #include -#include #include +#include + int main() { auto timer = icc::os::Timer::createTimer(); - timer->setInterval(std::chrono::seconds(10)); + timer->setInterval(std::chrono::milliseconds(100)); timer->enableContinuous(); timer->start(); - std::this_thread::sleep_for(std::chrono::seconds(25)); + std::this_thread::sleep_for(std::chrono::seconds(1)); return 0; } diff --git a/recipes/redradist-icc/all/test_v1_package/CMakeLists.txt b/recipes/redradist-icc/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/redradist-icc/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/redradist-icc/all/test_v1_package/conanfile.py b/recipes/redradist-icc/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..fc78d14187e40 --- /dev/null +++ b/recipes/redradist-icc/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class ICCTestConan(ConanFile): + settings = 'os', 'compiler', 'build_type', 'arch' + generators = 'cmake', 'cmake_find_package_multi' + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join('bin', 'example') + self.run(bin_path, run_environment=True) From 06810c49553ef32bc841cad062ec751ead6ed022 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 28 Feb 2024 21:08:43 +0900 Subject: [PATCH 122/405] (#22908) openjpeg: add version 2.5.1 * openjpeg: add version 2.5.1 * remove cmake, pkgconfig from upstream, fix pkg_config_name * revert pkg_config_name --- recipes/openjpeg/all/conandata.yml | 3 +++ recipes/openjpeg/all/conanfile.py | 9 +++++---- recipes/openjpeg/config.yml | 2 ++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/recipes/openjpeg/all/conandata.yml b/recipes/openjpeg/all/conandata.yml index 1770aef0faecd..aa3392abe8228 100644 --- a/recipes/openjpeg/all/conandata.yml +++ b/recipes/openjpeg/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.5.1": + url: "https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.1.tar.gz" + sha256: "c0b92dadd65e33b1cf94f39dd9157d5469846744c2e0afb8ca10961f51f61da6" "2.5.0": url: "https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.0.tar.gz" sha256: "0333806d6adecc6f7a91243b2b839ff4d2053823634d4f6ed7a59bc87409122a" diff --git a/recipes/openjpeg/all/conanfile.py b/recipes/openjpeg/all/conanfile.py index 5b1cc6a995945..74542890fef4f 100644 --- a/recipes/openjpeg/all/conanfile.py +++ b/recipes/openjpeg/all/conanfile.py @@ -10,12 +10,11 @@ class OpenjpegConan(ConanFile): name = "openjpeg" - url = "https://github.com/conan-io/conan-center-index" description = "OpenJPEG is an open-source JPEG 2000 codec written in C language." - topics = ("jpeg2000", "jp2", "openjpeg", "image", "multimedia", "format", "graphics") - homepage = "https://github.com/uclouvain/openjpeg" license = "BSD-2-Clause" - + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/uclouvain/openjpeg" + topics = ("jpeg2000", "jp2", "openjpeg", "image", "multimedia", "format", "graphics") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -89,6 +88,8 @@ def package(self): cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", self._openjpeg_subdir)) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake", self._openjpeg_subdir)) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) self._create_cmake_module_variables( os.path.join(self.package_folder, self._module_vars_rel_path) ) diff --git a/recipes/openjpeg/config.yml b/recipes/openjpeg/config.yml index 2f39469175da4..cfbcc333e7b22 100644 --- a/recipes/openjpeg/config.yml +++ b/recipes/openjpeg/config.yml @@ -1,4 +1,6 @@ versions: + "2.5.1": + folder: all "2.5.0": folder: all "2.4.0": From 6ba7fcfa2428017eec758e84398abfe8952e84a4 Mon Sep 17 00:00:00 2001 From: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com> Date: Wed, 28 Feb 2024 07:29:29 -0500 Subject: [PATCH 123/405] (#22924) cpptrace: Add 0.4.1 --- recipes/cpptrace/all/conandata.yml | 4 ++++ recipes/cpptrace/config.yml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/recipes/cpptrace/all/conandata.yml b/recipes/cpptrace/all/conandata.yml index b9844d75c4190..7ebcd5c89c321 100644 --- a/recipes/cpptrace/all/conandata.yml +++ b/recipes/cpptrace/all/conandata.yml @@ -1,5 +1,9 @@ sources: # Newer versions at the top + "0.4.1": + url: + - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.4.1.tar.gz" + sha256: "8b6e2c813cf2db332c1aa0502c38afd01a1e00ece0ecc7fcd82fcae4b34e5161" "0.4.0": url: - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.4.0.tar.gz" diff --git a/recipes/cpptrace/config.yml b/recipes/cpptrace/config.yml index c04879bd49824..a7ff5173cbbfa 100644 --- a/recipes/cpptrace/config.yml +++ b/recipes/cpptrace/config.yml @@ -1,5 +1,7 @@ versions: # Newer versions at the top + "0.4.1": + folder: all "0.4.0": folder: all "0.3.1": From c3fd99604c2e4fc7b279199a0e2971dd3bcbe45b Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 28 Feb 2024 21:52:52 +0900 Subject: [PATCH 124/405] (#22904) fast-cpp-csv-parser: add version cci.20240102 --- recipes/fast-cpp-csv-parser/all/conandata.yml | 3 +++ recipes/fast-cpp-csv-parser/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/fast-cpp-csv-parser/all/conandata.yml b/recipes/fast-cpp-csv-parser/all/conandata.yml index 87d270e80c74e..00225e59aaf16 100644 --- a/recipes/fast-cpp-csv-parser/all/conandata.yml +++ b/recipes/fast-cpp-csv-parser/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20240102": + url: "https://github.com/ben-strasser/fast-cpp-csv-parser/archive/a71a87e700b0fb92645c6b124742cbf326e0f7b1.tar.gz" + sha256: "635d34234b9ebfefde42af3431547a5da29a112dd43cdbb532f79844b3b761d8" "cci.20211104": url: "https://github.com/ben-strasser/fast-cpp-csv-parser/archive/5a417973b4cea674a5e4a3b88a23098a2ab75479.zip" sha256: "33a22bda2603a87b8f36c79673339490f58656d92a4882e788de3f4ef7ec57b2" diff --git a/recipes/fast-cpp-csv-parser/config.yml b/recipes/fast-cpp-csv-parser/config.yml index ca4b1e35049ab..383c881ec3492 100644 --- a/recipes/fast-cpp-csv-parser/config.yml +++ b/recipes/fast-cpp-csv-parser/config.yml @@ -1,4 +1,6 @@ versions: + "cci.20240102": + folder: all "cci.20211104": folder: all "cci.20200830": From 394bd059c0bf844d1d1fe3bd759548ecb5c36f04 Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Wed, 28 Feb 2024 14:11:04 +0100 Subject: [PATCH 125/405] (#22915) OpenEXR add version 3.2.2 * OpenEXR add version 3.2.2 * Add 3.2.2 to config.yml --- recipes/openexr/3.x/conandata.yml | 12 ++++++++++++ recipes/openexr/config.yml | 2 ++ 2 files changed, 14 insertions(+) diff --git a/recipes/openexr/3.x/conandata.yml b/recipes/openexr/3.x/conandata.yml index 778602cf612b4..0195d5928e91c 100644 --- a/recipes/openexr/3.x/conandata.yml +++ b/recipes/openexr/3.x/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.2.2": + url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.2.2.tar.gz" + sha256: "65de6459c245a4977ce4d7777e70b30d7ef48ec38e0cfb10205706ca50a8bf2e" "3.2.1": url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.2.1.tar.gz" sha256: "61e175aa2203399fb3c8c2288752fbea3c2637680d50b6e306ea5f8ffdd46a9b" @@ -9,6 +12,15 @@ sources: url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.1.7.tar.gz" sha256: "78dbca39115a1c526e6728588753955ee75fa7f5bb1a6e238bed5b6d66f91fd7" patches: + "3.2.2": + - patch_file: "patches/3.2.1-gcc5-bug-workaround.patch" + patch_description: "Workaround for GCC 5 bug" + patch_type: "portability" + patch_source: "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336" + - patch_file: "patches/3.2.1-find-libdeflate.patch" + patch_description: "Use find_package for libdeflate" + patch_type: "backport" + patch_source: "https://github.com/AcademySoftwareFoundation/openexr/pull/1613" "3.2.1": - patch_file: "patches/3.2.1-gcc5-bug-workaround.patch" patch_description: "Workaround for GCC 5 bug" diff --git a/recipes/openexr/config.yml b/recipes/openexr/config.yml index 79091d0404e1f..7e99e768ab562 100644 --- a/recipes/openexr/config.yml +++ b/recipes/openexr/config.yml @@ -1,4 +1,6 @@ versions: + "3.2.2": + folder: "3.x" "3.2.1": folder: "3.x" "3.1.9": From 6e0c5dcc5e8fa0bc5301d9890d100efbc38a2be5 Mon Sep 17 00:00:00 2001 From: Kim Lindberger Date: Wed, 28 Feb 2024 14:25:56 +0100 Subject: [PATCH 126/405] (#21762) xnnpack: Add cci.20231026 Co-authored-by: Uilian Ries --- recipes/xnnpack/all/conandata.yml | 3 +++ recipes/xnnpack/all/conanfile.py | 4 ++-- recipes/xnnpack/config.yml | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/recipes/xnnpack/all/conandata.yml b/recipes/xnnpack/all/conandata.yml index 97d441c786f9f..347edb5af1787 100644 --- a/recipes/xnnpack/all/conandata.yml +++ b/recipes/xnnpack/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20231026": + url: "https://github.com/google/XNNPACK/archive/ab16a544c1cbc5ee4ec105a2f35f8adca22e94c1.tar.gz" + sha256: "11c7e0555d2c2c14d812b3fba2a277d59121cfb898dcc99de1c76477ff2055a0" "cci.20230715": url: "https://github.com/google/XNNPACK/archive/645035286fe31d47eeb07900450f4f6540b75c2c.tar.gz" sha256: "4c91153dfe4648dc3b325db0b4d6719d6e16f7ce30940b4ceb65abd033e5245e" diff --git a/recipes/xnnpack/all/conanfile.py b/recipes/xnnpack/all/conanfile.py index 5d80f5f3cd167..579c065b64636 100644 --- a/recipes/xnnpack/all/conanfile.py +++ b/recipes/xnnpack/all/conanfile.py @@ -56,10 +56,10 @@ def requirements(self): if self.version in ["cci.20220801", "cci.20220621", "cci.20211210"]: self.requires("cpuinfo/cci.20220228") else: - self.requires("cpuinfo/cci.20230118") + self.requires("cpuinfo/cci.20231129") self.requires("fp16/cci.20210320") # https://github.com/google/XNNPACK/blob/ed5f9c0562e016a08b274a4579de5ef500fec134/include/xnnpack.h#L15 - self.requires("pthreadpool/cci.20210218", transitive_headers=True) + self.requires("pthreadpool/cci.20231129", transitive_headers=True) self.requires("fxdiv/cci.20200417") def validate(self): diff --git a/recipes/xnnpack/config.yml b/recipes/xnnpack/config.yml index a1c159e3728ee..5e502dd6fac1c 100644 --- a/recipes/xnnpack/config.yml +++ b/recipes/xnnpack/config.yml @@ -1,4 +1,6 @@ versions: + "cci.20231026": + folder: all "cci.20230715": folder: all "cci.20220801": From 753532f83637c16158b0f0198085f64359959642 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 28 Feb 2024 22:48:42 +0900 Subject: [PATCH 127/405] (#21950) aws-c-s3: add version 0.4.5 * aws-c-s3: add version 0.4.6 * downgrade 0.4.5 --- recipes/aws-c-s3/all/conandata.yml | 3 +++ recipes/aws-c-s3/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/aws-c-s3/all/conandata.yml b/recipes/aws-c-s3/all/conandata.yml index c1055bfac4946..2433ee657645c 100644 --- a/recipes/aws-c-s3/all/conandata.yml +++ b/recipes/aws-c-s3/all/conandata.yml @@ -1,4 +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" diff --git a/recipes/aws-c-s3/config.yml b/recipes/aws-c-s3/config.yml index a038f7fe28821..9dc59a14978b9 100644 --- a/recipes/aws-c-s3/config.yml +++ b/recipes/aws-c-s3/config.yml @@ -1,4 +1,6 @@ versions: + "0.4.5": + folder: all "0.3.24": folder: all "0.1.49": From 55752863f305dab2fbeb6d632ac9f587700e8195 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 28 Feb 2024 23:09:45 +0900 Subject: [PATCH 128/405] (#22518) sdl_ttf: add version 2.22.0 * sdl_ttf: add version 2.22.0 * add build_requirements --- recipes/sdl_ttf/all/conandata.yml | 3 +++ recipes/sdl_ttf/all/conanfile.py | 3 +++ recipes/sdl_ttf/config.yml | 2 ++ 3 files changed, 8 insertions(+) diff --git a/recipes/sdl_ttf/all/conandata.yml b/recipes/sdl_ttf/all/conandata.yml index 556b69cb6d777..047b9b76b8975 100644 --- a/recipes/sdl_ttf/all/conandata.yml +++ b/recipes/sdl_ttf/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.22.0": + url: "https://github.com/libsdl-org/SDL_ttf/releases/download/release-2.22.0/SDL2_ttf-2.22.0.tar.gz" + sha256: "d48cbd1ce475b9e178206bf3b72d56b66d84d44f64ac05803328396234d67723" "2.20.2": url: "https://github.com/libsdl-org/SDL_ttf/releases/download/release-2.20.2/SDL2_ttf-2.20.2.tar.gz" sha256: "9dc71ed93487521b107a2c4a9ca6bf43fb62f6bddd5c26b055e6b91418a22053" diff --git a/recipes/sdl_ttf/all/conanfile.py b/recipes/sdl_ttf/all/conanfile.py index 3fb325e526385..fe9ee6f453b29 100644 --- a/recipes/sdl_ttf/all/conanfile.py +++ b/recipes/sdl_ttf/all/conanfile.py @@ -68,6 +68,9 @@ def validate(self): if is_msvc(self) and self.options.shared: raise ConanInvalidConfiguration(f"{self.ref} shared is not supported with Visual Studio") + def build_requirements(self): + self.tool_requires("cmake/[>=3.16 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/sdl_ttf/config.yml b/recipes/sdl_ttf/config.yml index be62a6c021ae5..46db183bdc30c 100644 --- a/recipes/sdl_ttf/config.yml +++ b/recipes/sdl_ttf/config.yml @@ -1,4 +1,6 @@ versions: + "2.22.0": + folder: all "2.20.2": folder: all "2.20.1": From dadf43d2bcddc56aaab9e6781550aec094140347 Mon Sep 17 00:00:00 2001 From: Thomas Steiner <47025493+steinerthomas@users.noreply.github.com> Date: Wed, 28 Feb 2024 15:47:48 +0100 Subject: [PATCH 129/405] (#19480) poco: Add option for enabling debug and trace logs * poco: Add option for enabling debug and trace logs * CR --------- Co-authored-by: Uilian Ries --- recipes/poco/all/conanfile.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes/poco/all/conanfile.py b/recipes/poco/all/conanfile.py index d772d089d1b1f..ae636de694a7b 100644 --- a/recipes/poco/all/conanfile.py +++ b/recipes/poco/all/conanfile.py @@ -29,6 +29,7 @@ class PocoConan(ConanFile): "fPIC": [True, False], "enable_fork": [True, False], "enable_active_record": [True, False, "deprecated"], + "log_debug": [True, False], "with_sql_parser": [True, False], } default_options = { @@ -36,6 +37,7 @@ class PocoConan(ConanFile): "fPIC": True, "enable_fork": True, "enable_active_record": "deprecated", + "log_debug": False, "with_sql_parser": True, } @@ -169,6 +171,7 @@ def requirements(self): def package_id(self): del self.info.options.enable_active_record + del self.info.options.log_debug def validate(self): if self.settings.compiler.cppstd: @@ -349,6 +352,9 @@ def package_info(self): if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["poco_foundation"].system_libs.extend(["pthread", "dl", "rt"]) + if self.options.log_debug: + self.cpp_info.components["poco_foundation"].defines.append("POCO_LOG_DEBUG") + if is_msvc(self): self.cpp_info.components["poco_foundation"].defines.append("POCO_NO_AUTOMATIC_LIBS") if not self.options.shared: From d82b88afceaa82fc86cd2b3932c58973d6477d62 Mon Sep 17 00:00:00 2001 From: Gareth Sylvester-Bradley <31761158+garethsb@users.noreply.github.com> Date: Wed, 28 Feb 2024 15:29:39 +0000 Subject: [PATCH 130/405] (#22852) nmos-cpp/cci.20240223: new release --- recipes/nmos-cpp/all/conandata.yml | 3 +++ recipes/nmos-cpp/all/conanfile.py | 5 ++++- recipes/nmos-cpp/config.yml | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/recipes/nmos-cpp/all/conandata.yml b/recipes/nmos-cpp/all/conandata.yml index 94817c0d8466a..48f839443ae06 100644 --- a/recipes/nmos-cpp/all/conandata.yml +++ b/recipes/nmos-cpp/all/conandata.yml @@ -1,5 +1,8 @@ sources: # see https://github.com/conan-io/conan-center-index/blob/master/docs/faqs.md#what-version-should-packages-use-for-libraries-without-official-releases + "cci.20240223": + url: "https://github.com/sony/nmos-cpp/archive/27dff31919e06a132651291648293ff7b6b38b38.tar.gz" + sha256: "25c5fec843c9ced8061231b44f00942886766008ddbb171b351bf5616c07eccc" "cci.20221203": url: "https://github.com/sony/nmos-cpp/archive/0fb6b51737f737ae011cbcc39cdfb2c5236ec59f.tar.gz" sha256: "9e811b2707afe084c4470fcaa5664f57468fd03e86b1eebd03ec9216cf31cac1" diff --git a/recipes/nmos-cpp/all/conanfile.py b/recipes/nmos-cpp/all/conanfile.py index d2bed5c1666e3..c34c0db4db93c 100644 --- a/recipes/nmos-cpp/all/conanfile.py +++ b/recipes/nmos-cpp/all/conanfile.py @@ -2,6 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools import build, files from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.scm import Version import json import os import re @@ -51,12 +52,14 @@ def requirements(self): # INFO: details/system_error.h: #include self.requires("boost/1.83.0", transitive_headers=True) # INFO: json_ops.h exposes cpprest/json.h - self.requires("cpprestsdk/2.10.18", transitive_headers=True) + self.requires("cpprestsdk/2.10.19", transitive_headers=True) self.requires("websocketpp/0.8.2") self.requires("openssl/[>=1.1 <4]") self.requires("json-schema-validator/2.3.0") self.requires("nlohmann_json/3.11.3") self.requires("zlib/[>=1.2.11 <2]") + if Version(self.version) >= "cci.20240222": + self.requires("jwt-cpp/0.7.0") if self.options.get_safe("with_dnssd") == "mdnsresponder": self.requires("mdnsresponder/878.200.35") diff --git a/recipes/nmos-cpp/config.yml b/recipes/nmos-cpp/config.yml index 1ebebe8a73c09..9cc517e0f52ae 100644 --- a/recipes/nmos-cpp/config.yml +++ b/recipes/nmos-cpp/config.yml @@ -1,4 +1,6 @@ versions: + "cci.20240223": + folder: all "cci.20221203": folder: all "cci.20220620": From 77a76aebc2db6960a9e4d9a26d9158df8242ec59 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 29 Feb 2024 00:48:56 +0900 Subject: [PATCH 131/405] (#22914) c4core: update fast_float/6.1.0 --- recipes/c4core/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/c4core/all/conanfile.py b/recipes/c4core/all/conanfile.py index d0a1927baa811..d4620ffd7f7a8 100644 --- a/recipes/c4core/all/conanfile.py +++ b/recipes/c4core/all/conanfile.py @@ -47,7 +47,7 @@ def layout(self): def requirements(self): if self.options.with_fast_float: - self.requires("fast_float/6.0.0", transitive_headers=True) + self.requires("fast_float/6.1.0", transitive_headers=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): From 5ea978b9b490690189e0e41f95f7b2777e309d93 Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Wed, 28 Feb 2024 17:08:20 +0100 Subject: [PATCH 132/405] (#22918) Add me for community alerts on packages I'm working on * Add me for community alerts on packages I'm working on regularly right now * Add also libraw for the alerting bot --- .github/workflows/alert-community.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/alert-community.yml b/.github/workflows/alert-community.yml index 405926199ff5e..c557f03f37246 100644 --- a/.github/workflows/alert-community.yml +++ b/.github/workflows/alert-community.yml @@ -186,6 +186,11 @@ jobs: files: "recipes/gtest/*/*" reviewers: "@Hopobcn @jwillikers" + - uses: ./.github/actions/alert-community + with: + files: "recipes/imath/*/*" + reviewers: "@irieger" + - uses: ./.github/actions/alert-community with: files: "recipes/imgui/*/*" @@ -266,6 +271,11 @@ jobs: files: "recipes/libpng/*/*" reviewers: "@Hopobcn" + - uses: ./.github/actions/alert-community + with: + files: "recipes/libraw/*/*" + reviewers: "@irieger" + - uses: ./.github/actions/alert-community with: files: "recipes/libsodium/*/*" @@ -326,6 +336,16 @@ jobs: files: "recipes/openapi-generator/*/*" reviewers: "@MartinDelille" + - uses: ./.github/actions/alert-community + with: + files: "recipes/opencolorio/*/*" + reviewers: "@irieger" + + - uses: ./.github/actions/alert-community + with: + files: "recipes/openexr/*/*" + reviewers: "@irieger" + - uses: ./.github/actions/alert-community with: files: "recipes/opengl/*/*" @@ -336,6 +356,11 @@ jobs: files: "recipes/opengl-registry/*/*" reviewers: "@MartinDelille" + - uses: ./.github/actions/alert-community + with: + files: "recipes/openimageio/*/*" + reviewers: "@irieger" + - uses: ./.github/actions/alert-community with: files: "recipes/openssl/*/*" From 4f83da195a9cfe41407637d604479b31456a6ef4 Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Wed, 28 Feb 2024 17:28:17 +0100 Subject: [PATCH 133/405] (#22925) OpenImageIO: Fix CMake patch for non-default option --- recipes/openimageio/all/patches/2.4.17.0-cmake-targets.patch | 2 +- recipes/openimageio/all/patches/2.4.7.1-cmake-targets.patch | 2 +- recipes/openimageio/all/patches/2.5.6.0-cmake-targets.patch | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/openimageio/all/patches/2.4.17.0-cmake-targets.patch b/recipes/openimageio/all/patches/2.4.17.0-cmake-targets.patch index dc76e283d97aa..5ed8bf12ec780 100644 --- a/recipes/openimageio/all/patches/2.4.17.0-cmake-targets.patch +++ b/recipes/openimageio/all/patches/2.4.17.0-cmake-targets.patch @@ -70,7 +70,7 @@ index a4f895c07..f55da37cb 100644 - JPEG_LIBRARIES JPEG_VERSION) -if (NOT JPEG_FOUND) # Try to find the non-turbo version +if (USE_JPEGTURBO) -+ checked_find_package (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) diff --git a/recipes/openimageio/all/patches/2.4.7.1-cmake-targets.patch b/recipes/openimageio/all/patches/2.4.7.1-cmake-targets.patch index c560e5020256a..0d61414f30ef2 100644 --- a/recipes/openimageio/all/patches/2.4.7.1-cmake-targets.patch +++ b/recipes/openimageio/all/patches/2.4.7.1-cmake-targets.patch @@ -60,7 +60,7 @@ index 48e871418..21f709b1d 100644 - JPEG_LIBRARIES JPEG_VERSION) -if (NOT JPEG_FOUND) # Try to find the non-turbo version +if (USE_JPEGTURBO) -+ checked_find_package (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) diff --git a/recipes/openimageio/all/patches/2.5.6.0-cmake-targets.patch b/recipes/openimageio/all/patches/2.5.6.0-cmake-targets.patch index 8563d86fcb7db..7d45a41ba65a6 100644 --- a/recipes/openimageio/all/patches/2.5.6.0-cmake-targets.patch +++ b/recipes/openimageio/all/patches/2.5.6.0-cmake-targets.patch @@ -69,7 +69,7 @@ index 3cfaedd57..f75fee7a3 100644 - DEFINITIONS -DUSE_JPEG_TURBO=1) -if (NOT TARGET libjpeg-turbo::jpeg) # Try to find the non-turbo version +if (USE_JPEGTURBO) -+ checked_find_package (JPEGTurbo REQUIRED ++ 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) From 0aedd00129b64d2c5acbf0b84a6c2fea814b4894 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 28 Feb 2024 18:49:26 +0200 Subject: [PATCH 134/405] (#22927) urdfdom_headers: new recipe * urdfdom_headers: new recipe * urdfdom_headers: C++11 is required --- recipes/urdfdom_headers/all/conandata.yml | 4 ++ recipes/urdfdom_headers/all/conanfile.py | 44 +++++++++++++++++++ .../all/test_package/CMakeLists.txt | 8 ++++ .../all/test_package/conanfile.py | 26 +++++++++++ .../all/test_package/test_package.cpp | 6 +++ recipes/urdfdom_headers/config.yml | 3 ++ 6 files changed, 91 insertions(+) create mode 100644 recipes/urdfdom_headers/all/conandata.yml create mode 100644 recipes/urdfdom_headers/all/conanfile.py create mode 100644 recipes/urdfdom_headers/all/test_package/CMakeLists.txt create mode 100644 recipes/urdfdom_headers/all/test_package/conanfile.py create mode 100644 recipes/urdfdom_headers/all/test_package/test_package.cpp create mode 100644 recipes/urdfdom_headers/config.yml diff --git a/recipes/urdfdom_headers/all/conandata.yml b/recipes/urdfdom_headers/all/conandata.yml new file mode 100644 index 0000000000000..9c889de9abc7d --- /dev/null +++ b/recipes/urdfdom_headers/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.1.1": + url: "https://github.com/ros/urdfdom_headers/archive/refs/tags/1.1.1.zip" + sha256: "dde77e3dd96ffa41e2ee0a20bddcd6ef05863e95ce0143ede77130d8cd46c644" diff --git a/recipes/urdfdom_headers/all/conanfile.py b/recipes/urdfdom_headers/all/conanfile.py new file mode 100644 index 0000000000000..a374540200186 --- /dev/null +++ b/recipes/urdfdom_headers/all/conanfile.py @@ -0,0 +1,44 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.52.0" + + +class PackageConan(ConanFile): + name = "urdfdom_headers" + description = "Headers for URDF parsers" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ros/urdfdom_headers" + topics = ("urdf", "ros", "robotics") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + # Add a project prefix to the headers to match the default APPEND_PROJECT_NAME_TO_INCLUDEDIR=ON + copy(self, "*.h", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include", "urdfdom")) + + def package_info(self): + self.cpp_info.includedirs.append(os.path.join("include", "urdfdom")) + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/urdfdom_headers/all/test_package/CMakeLists.txt b/recipes/urdfdom_headers/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..733e7c8f06684 --- /dev/null +++ b/recipes/urdfdom_headers/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) + +find_package(urdfdom_headers REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE urdfdom_headers::urdfdom_headers) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/urdfdom_headers/all/test_package/conanfile.py b/recipes/urdfdom_headers/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/urdfdom_headers/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/urdfdom_headers/all/test_package/test_package.cpp b/recipes/urdfdom_headers/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..aa515bd58ffb9 --- /dev/null +++ b/recipes/urdfdom_headers/all/test_package/test_package.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + urdf::World world; + return 0; +} diff --git a/recipes/urdfdom_headers/config.yml b/recipes/urdfdom_headers/config.yml new file mode 100644 index 0000000000000..60d31991f5141 --- /dev/null +++ b/recipes/urdfdom_headers/config.yml @@ -0,0 +1,3 @@ +versions: + "1.1.1": + folder: all From 76cc54bb433968dbcfc9e37d7c7ad927d701da95 Mon Sep 17 00:00:00 2001 From: HypoYoung <142313125+HypoYoung@users.noreply.github.com> Date: Thu, 29 Feb 2024 01:06:06 +0800 Subject: [PATCH 135/405] (#20639) libcurl: conan support mbedtls * libcurl: conan support mbedtls * Apply suggestions from code review Co-authored-by: Jordan Williams --------- Co-authored-by: Jordan Williams Co-authored-by: Uilian Ries --- recipes/libcurl/all/conanfile.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index 7c2f02e93b679..41ce8fa327a98 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -30,7 +30,7 @@ class LibcurlConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], - "with_ssl": [False, "openssl", "wolfssl", "schannel", "darwinssl"], + "with_ssl": [False, "openssl", "wolfssl", "schannel", "darwinssl", "mbedtls"], "with_file": [True, False], "with_ftp": [True, False], "with_http": [True, False], @@ -175,6 +175,8 @@ def requirements(self): self.requires("openssl/[>=1.1 <4]") elif self.options.with_ssl == "wolfssl": self.requires("wolfssl/5.6.6") + elif self.options.with_ssl == "mbedtls": + self.requires("mbedtls/3.5.0") if self.options.with_nghttp2: self.requires("libnghttp2/1.59.0") if self.options.with_libssh2: @@ -443,6 +445,12 @@ def _generate_with_autotools(self): tc.configure_args.append(f"--with-wolfssl={path}") else: tc.configure_args.append("--without-wolfssl") + + if self.options.with_ssl == "mbedtls": + path = unix_path(self, self.dependencies["mbedtls"].package_folder) + tc.configure_args.append(f"--with-mbedtls={path}") + else: + tc.configure_args.append("--without-mbedtls") if self.options.with_libssh2: path = unix_path(self, self.dependencies["libssh2"].package_folder) @@ -571,6 +579,10 @@ def _generate_with_cmake(self): tc.variables["CURL_USE_WOLFSSL"] = self.options.with_ssl == "wolfssl" else: tc.variables["CMAKE_USE_WOLFSSL"] = self.options.with_ssl == "wolfssl" + if Version(self.version) >= "7.81.0": + tc.variables["CURL_USE_MBEDTLS"] = self.options.with_ssl == "mbedtls" + else: + tc.variables["CMAKE_USE_MBEDTLS"] = self.options.with_ssl == "mbedtls" tc.variables["USE_NGHTTP2"] = self.options.with_nghttp2 tc.variables["CURL_ZLIB"] = self.options.with_zlib tc.variables["CURL_BROTLI"] = self.options.with_brotli @@ -687,6 +699,8 @@ def package_info(self): self.cpp_info.components["curl"].requires.append("openssl::openssl") if self.options.with_ssl == "wolfssl": self.cpp_info.components["curl"].requires.append("wolfssl::wolfssl") + if self.options.with_ssl == "mbedtls": + self.cpp_info.components["curl"].requires.append("mbedtls::mbedtls") if self.options.with_nghttp2: self.cpp_info.components["curl"].requires.append("libnghttp2::libnghttp2") if self.options.with_libssh2: From 422efa25d0659ea09bf89d9be602f973fd862cae Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Thu, 29 Feb 2024 15:48:16 +0100 Subject: [PATCH 136/405] (#22700) Qt6: fix qt multimedia on linux * require explicitely gstreamer * bump deps * fix gstreamer consumption * fix cmake_find_mode of deps --- recipes/qt/6.x.x/conanfile.py | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/recipes/qt/6.x.x/conanfile.py b/recipes/qt/6.x.x/conanfile.py index 9e3b0dd0a6a02..bff88d44cbcd2 100644 --- a/recipes/qt/6.x.x/conanfile.py +++ b/recipes/qt/6.x.x/conanfile.py @@ -64,6 +64,7 @@ class QtConan(ConanFile): "with_gssapi": [True, False], "with_md4c": [True, False], "with_x11": [True, False], + "with_egl": [True, False], "gui": [True, False], "widgets": [True, False], @@ -107,6 +108,7 @@ class QtConan(ConanFile): "with_gssapi": False, "with_md4c": True, "with_x11": True, + "with_egl": False, "gui": True, "widgets": True, @@ -165,6 +167,7 @@ def config_options(self): self.options.with_glib = False del self.options.with_libalsa del self.options.with_x11 + del self.options.with_egl if self.settings.os == "Windows": self.options.opengl = "dynamic" @@ -198,6 +201,7 @@ def configure(self): del self.options.with_libpng del self.options.with_md4c self.options.rm_safe("with_x11") + self.options.rm_safe("with_egl") if not self.options.get_safe("qtmultimedia"): self.options.rm_safe("with_libalsa") @@ -354,6 +358,8 @@ def requirements(self): self.requires("xkbcommon/1.5.0") if self.options.get_safe("with_x11", False): self.requires("xorg/system") + if self.options.get_safe("with_egl"): + self.requires("egl/system") if self.settings.os != "Windows" and self.options.get_safe("opengl", "no") != "no": self.requires("opengl/system") if self.options.with_zstd: @@ -370,6 +376,7 @@ def requirements(self): self.requires("nss/3.93") self.requires("libdrm/2.4.119") if self.options.get_safe("with_gstreamer", False): + self.requires("gstreamer/1.19.2") self.requires("gst-plugins-base/1.19.2") if self.options.get_safe("with_pulseaudio", False): self.requires("pulseaudio/14.2") @@ -415,6 +422,16 @@ def generate(self): tc.set_property("wayland::wayland-server", "cmake_target_name", "Wayland::Server") tc.set_property("wayland::wayland-cursor", "cmake_target_name", "Wayland::Cursor") tc.set_property("wayland::wayland-egl", "cmake_target_name", "Wayland::Egl") + + # override https://github.com/qt/qtbase/blob/dev/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake + tc.set_property("egl", "cmake_file_name", "EGL") + tc.set_property("egl", "cmake_find_mode", "module") + tc.set_property("egl::egl", "cmake_target_name", "EGL::EGL") + + # don't override https://github.com/qt/qtmultimedia/blob/dev/cmake/FindGStreamer.cmake + tc.set_property("gstreamer", "cmake_file_name", "gstreamer_conan") + tc.set_property("gstreamer", "cmake_find_mode", "module") + tc.generate() for f in glob.glob("*.cmake"): @@ -510,7 +527,9 @@ def generate(self): ("with_zstd", "zstd"), ("with_vulkan", "vulkan"), ("with_brotli", "brotli"), - ("with_gssapi", "gssapi")]: + ("with_gssapi", "gssapi"), + ("with_egl", "egl"), + ("with_gstreamer", "gstreamer")]: tc.variables[f"FEATURE_{conf_arg}"] = ("ON" if self.options.get_safe(opt, False) else "OFF") @@ -1021,6 +1040,8 @@ def _create_plugin(pluginname, libname, plugintype, requires): gui_reqs.append("xkbcommon::xkbcommon") if self.options.get_safe("with_x11", False): gui_reqs.append("xorg::xorg") + if self.options.get_safe("with_egl"): + gui_reqs.append("egl::egl") if self.settings.os != "Windows" and self.options.get_safe("opengl", "no") != "no": gui_reqs.append("opengl::opengl") if self.options.get_safe("with_vulkan", False): @@ -1235,7 +1256,9 @@ def _create_plugin(pluginname, libname, plugintype, requires): if self.options.qtdeclarative and qt_quick_enabled: _create_module("MultimediaQuick", ["Multimedia", "Quick"]) if self.options.with_gstreamer: - _create_plugin("QGstreamerMediaPlugin", "gstreamermediaplugin", "multimedia", ["gst-plugins-base::gst-plugins-base"]) + _create_plugin("QGstreamerMediaPlugin", "gstreamermediaplugin", "multimedia", [ + "gstreamer::gstreamer", + "gst-plugins-base::gst-plugins-base"]) if self.options.get_safe("qtpositioning"): _create_module("Positioning", []) From 8d9a09891e8b4d55ee92a4d5996a93b1b41e2798 Mon Sep 17 00:00:00 2001 From: Viktor Arvidsson Date: Thu, 29 Feb 2024 18:07:49 +0100 Subject: [PATCH 137/405] (#21973) Fix build with libjpeg-turbo See https://github.com/madebr/pdfium-cmake/pull/2 --- recipes/pdfium/all/conandata.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/pdfium/all/conandata.yml b/recipes/pdfium/all/conandata.yml index 914f93df79f0d..77888f52bfe69 100644 --- a/recipes/pdfium/all/conandata.yml +++ b/recipes/pdfium/all/conandata.yml @@ -2,8 +2,8 @@ sources: "95.0.4629": pdfium-cmake: # FIXME: create release - url: "https://github.com/madebr/pdfium-cmake/archive/9611e37f688e9881b50aef7e7775accdda6cd98f.zip" - sha256: "9085c22bd9d21acede4f5f26be0b6a0f82346e2ea53cc8bcddd785a4190d7a84" + url: "https://github.com/madebr/pdfium-cmake/archive/e02962c2ebf6d1a2edc7b05bb4fc8cb73cac5b18.zip" + sha256: "e8454d098af887bc989fbbc955b32566b109b4f03350fb6c08cc7f2e359a909f" pdfium: url: "https://pdfium.googlesource.com/pdfium/+archive/refs/heads/chromium/4629.tar.gz" # sha256 is volatile on googlesource, no up-to-date github fork From 378a21bd4fc62c873c4103b2ae25ff67d08b3f62 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Thu, 29 Feb 2024 11:24:11 -0600 Subject: [PATCH 138/405] (#20502) xorg/system: Add xcb-dri2, xcb-dri3, xcb-glx, and xcb-present * xorg/system: Add xcb-dri2, xcb-dri3, xcb-glx, and xcb-present * Fix OpenSUSE * Add xcb-xinput, xcb-composite, xcb-ewmh, and xcb-res These are requires for the wlroots package. * Add xwayland * Fix xwayland package for Apt * Remove libxcb-present-dev as it is not in Ubuntu 16.04 * Remove xcb-xinput due to missing libxcb-present-dev package on Ubuntu 16.04 * Drop XWayland since it is not available * Remove reintroduced libxvmc dependency --- recipes/xorg/all/conanfile.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/recipes/xorg/all/conanfile.py b/recipes/xorg/all/conanfile.py index 423aec281a1c2..4b5a1dfb54844 100644 --- a/recipes/xorg/all/conanfile.py +++ b/recipes/xorg/all/conanfile.py @@ -29,10 +29,12 @@ def system_requirements(self): "libxcomposite-dev", "libxcursor-dev", "libxdamage-dev", "libxdmcp-dev", "libxext-dev", "libxfixes-dev", "libxi-dev", "libxinerama-dev", "libxkbfile-dev", "libxmu-dev", "libxmuu-dev", "libxpm-dev", "libxrandr-dev", "libxrender-dev", "libxres-dev", "libxss-dev", "libxt-dev", "libxtst-dev", - "libxv-dev", "libxxf86vm-dev", "libxcb-render0-dev", + "libxv-dev", "libxxf86vm-dev", "libxcb-glx0-dev", "libxcb-render0-dev", "libxcb-render-util0-dev", "libxcb-xkb-dev", "libxcb-icccm4-dev", "libxcb-image0-dev", "libxcb-keysyms1-dev", "libxcb-randr0-dev", "libxcb-shape0-dev", "libxcb-sync-dev", "libxcb-xfixes0-dev", - "libxcb-xinerama0-dev", "libxcb-dri3-dev", "uuid-dev", "libxcb-cursor-dev"], update=True, check=True) + "libxcb-xinerama0-dev", "libxcb-dri3-dev", "uuid-dev", "libxcb-cursor-dev", "libxcb-dri2-0-dev", + "libxcb-dri3-dev", "libxcb-present-dev", "libxcb-composite0-dev", "libxcb-ewmh-dev", + "libxcb-res0-dev"], update=True, check=True) apt.install_substitutes( ["libxcb-util-dev"], ["libxcb-util0-dev"], update=True, check=True) @@ -84,7 +86,8 @@ def package_info(self): "xcb-xkb", "xcb-icccm", "xcb-image", "xcb-keysyms", "xcb-randr", "xcb-render", "xcb-renderutil", "xcb-shape", "xcb-shm", "xcb-sync", "xcb-xfixes", "xcb-xinerama", "xcb", "xcb-atom", "xcb-aux", "xcb-event", "xcb-util", - "xcb-dri3", "xcb-cursor"] + ([] if self.settings.os == "FreeBSD" else ["uuid"]): + "xcb-dri3", "xcb-cursor", "xcb-dri2", "xcb-dri3", "xcb-glx", "xcb-present", + "xcb-composite", "xcb-ewmh", "xcb-res"] + ([] if self.settings.os == "FreeBSD" else ["uuid"]): pkg_config = PkgConfig(self, name) pkg_config.fill_cpp_info( self.cpp_info.components[name], is_system=self.settings.os != "FreeBSD") From 4b480c63858a958e486994842fdea9e1041b6f6c Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 1 Mar 2024 02:48:55 +0900 Subject: [PATCH 139/405] (#22930) influxdb-cpp: add version cci.20240102 --- recipes/influxdb-cpp/all/conandata.yml | 3 +++ recipes/influxdb-cpp/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/influxdb-cpp/all/conandata.yml b/recipes/influxdb-cpp/all/conandata.yml index 08568ef090742..d9e475ef4f194 100644 --- a/recipes/influxdb-cpp/all/conandata.yml +++ b/recipes/influxdb-cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + 'cci.20240102': + url: 'https://github.com/orca-zhang/influxdb-cpp/archive/db18273f09c113d0bd6037463997389afe978ac7.tar.gz' + sha256: '8c019ca700a723d9ed33d93e366cffac44b99a65485192ab70e760bf4229c7c8' 'cci.20201227': url: 'https://github.com/orca-zhang/influxdb-cpp/archive/800e0912552bc1b261c2afc6553a95caf5e9c66d.tar.gz' sha256: '456f0160cd6b12f88a19dcd0106dc0ba1935841f53ec642bf368843fa28def0e' diff --git a/recipes/influxdb-cpp/config.yml b/recipes/influxdb-cpp/config.yml index a58749d6e9c51..911f00a7a6918 100644 --- a/recipes/influxdb-cpp/config.yml +++ b/recipes/influxdb-cpp/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20240102": + folder: all "cci.20201227": folder: all From f48eeb726acf6a8a60663db7038c4c9145e20e8f Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Fri, 1 Mar 2024 11:27:10 +0300 Subject: [PATCH 140/405] (#22490) Add rotor v0.28, v0.29 * Add rotor v0.28 * Feedback: remove exports_sources * Update receipe * Try to use boost 1.84 * refine cppstd validation Signed-off-by: Uilian Ries * Fix test_package/conanfile.py * Add v0.29 * Add v0.29 * Add test_v1_package --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries --- recipes/rotor/all/conandata.yml | 6 ++ recipes/rotor/all/conanfile.py | 67 ++++++++++--------- recipes/rotor/all/test_package/CMakeLists.txt | 8 +-- recipes/rotor/all/test_package/conanfile.py | 20 ++++-- .../rotor/all/test_v1_package/CMakeLists.txt | 8 +++ .../rotor/all/test_v1_package/conanfile.py | 26 +++++++ .../all/test_v1_package/test_package.cpp | 58 ++++++++++++++++ recipes/rotor/config.yml | 4 ++ 8 files changed, 153 insertions(+), 44 deletions(-) create mode 100644 recipes/rotor/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/rotor/all/test_v1_package/conanfile.py create mode 100644 recipes/rotor/all/test_v1_package/test_package.cpp diff --git a/recipes/rotor/all/conandata.yml b/recipes/rotor/all/conandata.yml index b1d2937ec9c70..1b4efa7d91b72 100644 --- a/recipes/rotor/all/conandata.yml +++ b/recipes/rotor/all/conandata.yml @@ -11,3 +11,9 @@ sources: "0.25": url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.25.tar.gz" sha256: "b1de95937adb8d7a9beb93bc4956d8e28ff64a6c0a898e7ce12b22a224bb8f6f" + "0.28": + url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.28.tar.gz" + sha256: "9fc7d1721379adca228ca45d0240b5a0060c993de984f0288c9e4b9cf667b971" + "0.29": + url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.29.tar.gz" + sha256: "e17e25f2d6402389e8fde07a158ca952b815666f0a2b5e07748dfc062834c522" diff --git a/recipes/rotor/all/conanfile.py b/recipes/rotor/all/conanfile.py index 373e87fb89eb0..ab2f66e84b836 100644 --- a/recipes/rotor/all/conanfile.py +++ b/recipes/rotor/all/conanfile.py @@ -6,18 +6,16 @@ from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, rmdir, copy from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout -required_conan_version = ">=1.52.0" +required_conan_version = ">=1.54.0" class RotorConan(ConanFile): name = "rotor" + description = "Event loop friendly C++ actor micro-framework, supervisable" license = "MIT" homepage = "https://github.com/basiliscos/cpp-rotor" url = "https://github.com/conan-io/conan-center-index" - description = ( - "Event loop friendly C++ actor micro-framework, supervisable" - ) topics = ("concurrency", "actor-framework", "actors", "actor-model", "erlang", "supervising", "supervisor") - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "fPIC": [True, False], @@ -25,6 +23,7 @@ class RotorConan(ConanFile): "enable_asio": [True, False], "enable_thread": [True, False], "multithreading": [True, False], # enables multithreading support + "enable_ev": [True, False], } default_options = { "fPIC": True, @@ -32,24 +31,40 @@ class RotorConan(ConanFile): "enable_asio": False, "enable_thread": False, "multithreading": True, + "enable_ev": False, } + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "8", + "clang": "7", + "apple-clang": "12", + } + 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) < "0.26": + del self.options.enable_ev def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") def requirements(self): - self.requires("boost/1.81.0") + self.requires("boost/1.84.0", transitive_headers=True) + if self.options.get_safe("enable_ev", False): + self.requires("libev/4.33") def layout(self): cmake_layout(self, src_folder="src") @@ -60,31 +75,18 @@ def generate(self): tc.variables["BUILD_THREAD"] = self.options.enable_thread tc.variables["BUILD_THREAD_UNSAFE"] = not self.options.multithreading tc.variables["BUILD_TESTING"] = False + if Version(self.version) >= "0.26": + tc.variables["BUILD_EV"] = self.options.enable_ev tc.generate() tc = CMakeDeps(self) tc.generate() def validate(self): - minimal_cpp_standard = "17" - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, minimal_cpp_standard) - minimal_version = { - "gcc": "7", - "clang": "6", - "apple-clang": "10", - "Visual Studio": "15" - } - compiler = str(self.settings.compiler) - if compiler not in minimal_version: - self.output.warn( - f"{self.ref} recipe lacks information about the {compiler} compiler standard version support") - self.output.warn( - f"{self.ref} requires a compiler that supports at least C++{minimal_cpp_standard}") - return - - compiler_version = Version(self.settings.compiler.version) - if compiler_version < minimal_version[compiler]: - raise ConanInvalidConfiguration(f"{self.ref} requires a compiler that supports at least C++{minimal_cpp_standard}") + 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.options.shared and Version(self.version) < "0.23": raise ConanInvalidConfiguration("shared option is available from v0.23") @@ -121,5 +123,6 @@ def package_info(self): self.cpp_info.components["thread"].libs = ["rotor_thread"] self.cpp_info.components["thread"].requires = ["core"] - # TODO: to remove in conan v2 once cmake_find_package* generators removed - self.cpp_info.names["cmake_find_package"] = "rotor" + if self.options.get_safe("enable_ev", False): + self.cpp_info.components["ev"].libs = ["rotor_ev"] + self.cpp_info.components["ev"].requires = ["core", "libev::libev"] diff --git a/recipes/rotor/all/test_package/CMakeLists.txt b/recipes/rotor/all/test_package/CMakeLists.txt index b48e565513a1d..027b2945e0aad 100644 --- a/recipes/rotor/all/test_package/CMakeLists.txt +++ b/recipes/rotor/all/test_package/CMakeLists.txt @@ -1,12 +1,8 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) -find_package("rotor" REQUIRED) +find_package("rotor" COMPONENTS asio thread REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) target_link_libraries(${PROJECT_NAME} rotor::core) - - diff --git a/recipes/rotor/all/test_package/conanfile.py b/recipes/rotor/all/test_package/conanfile.py index 6dfcc57d996c4..a9fb96656f203 100644 --- a/recipes/rotor/all/test_package/conanfile.py +++ b/recipes/rotor/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,7 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) - + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/rotor/all/test_v1_package/CMakeLists.txt b/recipes/rotor/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..027b2945e0aad --- /dev/null +++ b/recipes/rotor/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) + +find_package("rotor" COMPONENTS asio thread REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +target_link_libraries(${PROJECT_NAME} rotor::core) diff --git a/recipes/rotor/all/test_v1_package/conanfile.py b/recipes/rotor/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..a9fb96656f203 --- /dev/null +++ b/recipes/rotor/all/test_v1_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/rotor/all/test_v1_package/test_package.cpp b/recipes/rotor/all/test_v1_package/test_package.cpp new file mode 100644 index 0000000000000..bfb89c9986e86 --- /dev/null +++ b/recipes/rotor/all/test_v1_package/test_package.cpp @@ -0,0 +1,58 @@ +#include +#include + + +namespace { +namespace to { +struct on_timer_trigger {}; +} // namespace to +} // namespace + +namespace rotor { +template <> +inline auto rotor::actor_base_t::access(request_id_t request_id, + bool cancelled) noexcept { + on_timer_trigger(request_id, cancelled); +} +} // namespace rotor + +struct dummy_supervisor_t : public rotor::supervisor_t { + using rotor::supervisor_t::supervisor_t; + using timers_map_t = std::unordered_map; + + timers_map_t timers_map; + + void do_start_timer(const rotor::pt::time_duration &, rotor::timer_handler_base_t &handler) noexcept override { + timers_map.emplace(handler.request_id, &handler); + } + + void do_cancel_timer(rotor::request_id_t timer_id) noexcept override { + auto it = timers_map.find(timer_id); + auto &actor_ptr = it->second->owner; + actor_ptr->access(timer_id, true); + timers_map.erase(it); + } + + void start() noexcept override {} + void shutdown() noexcept override {} + void enqueue(rotor::message_ptr_t) noexcept override {} +}; + +struct hello_actor : public rotor::actor_base_t { + using rotor::actor_base_t::actor_base_t; + void on_start() noexcept override { + rotor::actor_base_t::on_start(); + std::cout << "hello world\n"; + supervisor->do_shutdown(); + } +}; + +int main() { + rotor::system_context_t ctx{}; + auto timeout = boost::posix_time::milliseconds{500}; /* does not matter */ + auto sup = ctx.create_supervisor().timeout(timeout).finish(); + sup->create_actor().timeout(timeout).finish(); + sup->do_process(); + return 0; +} + diff --git a/recipes/rotor/config.yml b/recipes/rotor/config.yml index 1dfb74272e8cc..b66cf5d118ce8 100644 --- a/recipes/rotor/config.yml +++ b/recipes/rotor/config.yml @@ -7,3 +7,7 @@ versions: folder: all "0.25": folder: all + "0.28": + folder: all + "0.29": + folder: all From 1c888e8686e4656c5046dd269045c713bd610d4e Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 1 Mar 2024 10:45:31 +0200 Subject: [PATCH 141/405] (#21511) libspatialite: add v5.1.0, bump deps * libspatialite: bump dependencies * libspatialite: drop force=True * libspatialite: bump deps * libspatialite: add a workaround for NMakeDeps quoting issues https://github.com/conan-io/conan/issues/13603 * libspatialite: add v5.1.0 * libspatialite: bump deps * libspatialite: fix MSVC build --- recipes/libspatialite/all/conandata.yml | 11 +++-- recipes/libspatialite/all/conanfile.py | 46 +++++++++++++------ .../0001-autotools-no-geos-config.patch | 22 --------- .../{ => 5.0.1}/0002-nmake-honor-flags.patch | 0 .../{ => 5.0.1}/0003-msvc-minizip.patch | 0 .../5.1.0/0002-nmake-honor-flags.patch | 36 +++++++++++++++ recipes/libspatialite/config.yml | 2 + 7 files changed, 78 insertions(+), 39 deletions(-) delete mode 100644 recipes/libspatialite/all/patches/0001-autotools-no-geos-config.patch rename recipes/libspatialite/all/patches/{ => 5.0.1}/0002-nmake-honor-flags.patch (100%) rename recipes/libspatialite/all/patches/{ => 5.0.1}/0003-msvc-minizip.patch (100%) create mode 100644 recipes/libspatialite/all/patches/5.1.0/0002-nmake-honor-flags.patch diff --git a/recipes/libspatialite/all/conandata.yml b/recipes/libspatialite/all/conandata.yml index c9378f957e838..d34eec9877d84 100644 --- a/recipes/libspatialite/all/conandata.yml +++ b/recipes/libspatialite/all/conandata.yml @@ -1,9 +1,14 @@ sources: + "5.1.0": + url: "https://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-5.1.0.tar.gz" + sha256: "43be2dd349daffe016dd1400c5d11285828c22fea35ca5109f21f3ed50605080" "5.0.1": url: "https://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-5.0.1.tar.gz" sha256: "eecbc94311c78012d059ebc0fae86ea5ef6eecb13303e6e82b3753c1b3409e98" patches: + "5.1.0": + - patch_file: "patches/5.1.0/0002-nmake-honor-flags.patch" + - patch_file: "patches/5.0.1/0003-msvc-minizip.patch" "5.0.1": - - patch_file: "patches/0001-autotools-no-geos-config.patch" - - patch_file: "patches/0002-nmake-honor-flags.patch" - - patch_file: "patches/0003-msvc-minizip.patch" + - patch_file: "patches/5.0.1/0002-nmake-honor-flags.patch" + - patch_file: "patches/5.0.1/0003-msvc-minizip.patch" diff --git a/recipes/libspatialite/all/conanfile.py b/recipes/libspatialite/all/conanfile.py index 4260480b1b097..f232307e3ab5e 100644 --- a/recipes/libspatialite/all/conanfile.py +++ b/recipes/libspatialite/all/conanfile.py @@ -85,20 +85,22 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("sqlite3/3.42.0") - self.requires("zlib/1.2.13") + # Included in public spatialite/sqlite.h + # https://www.gaia-gis.it/fossil/libspatialite/file?name=src/headers/spatialite/sqlite.h&ci=tip + self.requires("sqlite3/3.44.2", transitive_headers=True, transitive_libs=True) + self.requires("zlib/[>=1.2.11 <2]") if self.options.with_proj: - self.requires("proj/9.1.1") + self.requires("proj/9.3.1") if self.options.with_iconv: self.requires("libiconv/1.17") if self.options.with_freexl: - self.requires("freexl/1.0.6") + self.requires("freexl/2.0.0") if self.options.with_geos: - self.requires("geos/3.11.1") + self.requires("geos/3.12.0") if self.options.get_safe("with_rttopo"): self.requires("librttopo/1.1.0") if self.options.with_libxml2: - self.requires("libxml2/2.10.3") + self.requires("libxml2/2.12.4") if self.options.with_minizip: self.requires("minizip/1.2.13") @@ -106,7 +108,7 @@ def build_requirements(self): if not is_msvc(self): self.tool_requires("libtool/2.4.7") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/1.9.3") + self.tool_requires("pkgconf/2.1.0") if self._settings_build.os == "Windows": self.win_bash = True if not self.conf.get("tools.microsoft.bash:path", check_type=str): @@ -118,6 +120,9 @@ def source(self): def generate(self): if is_msvc(self): tc = NMakeToolchain(self) + tc.extra_defines.append("YY_NO_UNISTD_H") + if self.options.shared: + tc.extra_defines.append("DLL_EXPORT") tc.generate() deps = NMakeDeps(self) deps.generate() @@ -154,6 +159,7 @@ def generate(self): "--enable-geosonlyreentrant=no", "--enable-geos370=yes", f"--enable-rttopo={yes_no(self.options.with_rttopo)}", + "--with-geosconfig=true", # Using `true` command for a no-op ]) tc.generate() @@ -192,14 +198,17 @@ def _build_msvc(self): if not self.options.with_minizip: replace_in_file(self, gaiaconfig_msvc, "#define ENABLE_MINIZIP 1", "") + # Workaround for a NMakeDeps define quoting issue: + # https://github.com/conan-io/conan/issues/13603 + replace_in_file(self, os.path.join(self.generators_folder, "conannmakedeps.bat"), + r'/DSQLITE_API#\"__declspec(dllimport)\"', + "/DSQLITE_API#__declspec(dllimport)", strict=False) + target = "spatialite_i.lib" if self.options.shared else "spatialite.lib" - optflags = ["-DYY_NO_UNISTD_H"] - if self.options.shared: - optflags.append("-DDLL_EXPORT") with chdir(self, self.source_folder): - self.run(f"nmake -f makefile.vc {target} OPTFLAGS=\"{' '.join(optflags)}\"") + self.run(f"nmake -f makefile.vc {target}") - def _build_autotools(self): + def _patch_autotools(self): # fix MinGW replace_in_file( self, os.path.join(self.source_folder, "configure.ac"), @@ -208,9 +217,18 @@ def _build_autotools(self): ) # Disable tests replace_in_file(self, os.path.join(self.source_folder, "Makefile.am"), - "SUBDIRS = src test $(EXAMPLES)", - "SUBDIRS = src $(EXAMPLES)") + "SUBDIRS = src test $(EXAMPLES)", + "SUBDIRS = src $(EXAMPLES)") + # We can't use geos-config file in conan because it's a non-relocatable file, + # therefore not packaged by geos recipe of conan-center-index. + # Instead, we rely on AutoToolsBuildEnvironment helper to inject proper flags. + configure_ac = os.path.join(self.source_folder, "configure.ac") + replace_in_file(self, configure_ac, "AC_MSG_ERROR([the user-specified geos-config", "echo # ") + replace_in_file(self, configure_ac, "AC_CHECK_HEADERS([geos_c.h", "# ") + replace_in_file(self, configure_ac, "AC_SEARCH_LIBS(GEOSCoveredBy", "# ") + def _build_autotools(self): + self._patch_autotools() autotools = Autotools(self) autotools.autoreconf() autotools.configure() diff --git a/recipes/libspatialite/all/patches/0001-autotools-no-geos-config.patch b/recipes/libspatialite/all/patches/0001-autotools-no-geos-config.patch deleted file mode 100644 index 0da26fe7f8512..0000000000000 --- a/recipes/libspatialite/all/patches/0001-autotools-no-geos-config.patch +++ /dev/null @@ -1,22 +0,0 @@ -We can't use geos-config file in conan because it's a non-relocatable file, -therefore not packaged by geos recipe of conan-center-index. -Instead we rely on AutoToolsBuildEnvironment helper to inject proper flags. - ---- a/configure.ac -+++ b/configure.ac -@@ -311,6 +311,7 @@ AC_ARG_ENABLE(geos, [AS_HELP_STRING( - [--enable-geos], [enables GEOS inclusion [default=yes]])], - [], [enable_geos=yes]) - if test x"$enable_geos" != "xno"; then -+ if false; then - #----------------------------------------------------------------------- - # --with-geosconfig - # -@@ -352,6 +353,7 @@ if test x"$enable_geos" != "xno"; then - AC_SEARCH_LIBS(GEOSCoveredBy,geos_c,,AC_MSG_ERROR([could not find libgeos_c (or obsolete 'libgeos_c' < v.3.3.0 found) - you may need to specify the directory of a geos-config file using --with-geosconfig])) - LIBS="$LIBS_SAVE" - LIBS="$LIBS $GEOS_LDFLAGS -lgeos_c" -+ fi - - #----------------------------------------------------------------------- - # --enable-controlpoints diff --git a/recipes/libspatialite/all/patches/0002-nmake-honor-flags.patch b/recipes/libspatialite/all/patches/5.0.1/0002-nmake-honor-flags.patch similarity index 100% rename from recipes/libspatialite/all/patches/0002-nmake-honor-flags.patch rename to recipes/libspatialite/all/patches/5.0.1/0002-nmake-honor-flags.patch diff --git a/recipes/libspatialite/all/patches/0003-msvc-minizip.patch b/recipes/libspatialite/all/patches/5.0.1/0003-msvc-minizip.patch similarity index 100% rename from recipes/libspatialite/all/patches/0003-msvc-minizip.patch rename to recipes/libspatialite/all/patches/5.0.1/0003-msvc-minizip.patch diff --git a/recipes/libspatialite/all/patches/5.1.0/0002-nmake-honor-flags.patch b/recipes/libspatialite/all/patches/5.1.0/0002-nmake-honor-flags.patch new file mode 100644 index 0000000000000..23016b01dd132 --- /dev/null +++ b/recipes/libspatialite/all/patches/5.1.0/0002-nmake-honor-flags.patch @@ -0,0 +1,36 @@ +This patch for msvc build allows to: +* define OPTFLAG ourself from conanfile (allow to honor profile) +* not hardcode this very specific C:\OSGeo4W environment + +--- a/makefile.vc ++++ b/makefile.vc +@@ -2,7 +2,6 @@ + # + # NMAKE Makefile to build libspatialite on Windows + # +-!INCLUDE nmake.opt + + LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \ + src\gaiaexif\gaia_exif.obj src\gaiageo\gg_advanced.obj \ +@@ -96,7 +95,7 @@ + SPATIALITE_DLL = spatialite$(VERSION).dll + + CFLAGS = /nologo -I.\src\headers -I.\src\topology \ +- -I. -IC:\OSGeo4W\include $(OPTFLAGS) ++ -I. $(CFLAGS) $(OPTFLAGS) + + default: all + +@@ -111,11 +110,7 @@ + + spatialite_i.lib: $(LIBOBJ) + link /dll /out:$(SPATIALITE_DLL) \ +- /implib:spatialite_i.lib $(LIBOBJ) \ +- C:\OSGeo4W\lib\proj_i.lib C:\OSGeo4W\lib\geos_c.lib \ +- C:\OSGeo4w\lib\freexl_i.lib C:\OSGeo4w\lib\iconv.lib \ +- C:\OSGeo4W\lib\sqlite3_i.lib C:\OSGeo4W\lib\zlib.lib \ +- C:\OSGeo4W\lib\libxml2.lib C:\OSGeo4W\lib\librttopo.lib ++ /implib:spatialite_i.lib $(LIBOBJ) + if exist $(SPATIALITE_DLL).manifest mt -manifest \ + $(SPATIALITE_DLL).manifest -outputresource:$(SPATIALITE_DLL);2 + diff --git a/recipes/libspatialite/config.yml b/recipes/libspatialite/config.yml index 5787f28e91cf3..5da3767a58773 100644 --- a/recipes/libspatialite/config.yml +++ b/recipes/libspatialite/config.yml @@ -1,3 +1,5 @@ versions: + "5.1.0": + folder: all "5.0.1": folder: all From 0577ab40e16c9ef5755115d716d2c1714212dc88 Mon Sep 17 00:00:00 2001 From: David Callu Date: Fri, 1 Mar 2024 19:43:49 +0100 Subject: [PATCH 142/405] =?UTF-8?q?(#19123)=20fix(libselinux):=20add=20pat?= =?UTF-8?q?ch=20to=20link=20with=20pcre2=20from=20conan=20instead=20of=20o?= =?UTF-8?q?=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Uilian Ries --- recipes/libselinux/all/conandata.yml | 3 +++ .../libselinux/all/patches/0003-fix-link-pcre.patch | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 recipes/libselinux/all/patches/0003-fix-link-pcre.patch diff --git a/recipes/libselinux/all/conandata.yml b/recipes/libselinux/all/conandata.yml index 14380382654d7..7387838ec6a10 100644 --- a/recipes/libselinux/all/conandata.yml +++ b/recipes/libselinux/all/conandata.yml @@ -40,6 +40,9 @@ patches: base_path: libselinux-3.6 patch_description: "Fix a missing #include " patch_type: "portability" + "3.3": + - patch_file: patches/0003-fix-link-pcre.patch + base_path: libselinux-3.3 "3.0": - patch_file: patches/0001-fix-fno-common-3.0.patch base_path: libsepol-3.0 diff --git a/recipes/libselinux/all/patches/0003-fix-link-pcre.patch b/recipes/libselinux/all/patches/0003-fix-link-pcre.patch new file mode 100644 index 0000000000000..993246d09e0ea --- /dev/null +++ b/recipes/libselinux/all/patches/0003-fix-link-pcre.patch @@ -0,0 +1,11 @@ +--- a/utils/Makefile ++++ b/utils/Makefile +@@ -43,7 +43,7 @@ endif + + override CFLAGS += -I../include -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS) + override LDFLAGS += -L../src +-override LDLIBS += -lselinux $(FTS_LDLIBS) ++override LDLIBS += -lselinux $(FTS_LDLIBS) $(PCRE_LDLIBS) + PCRE_LDLIBS ?= -lpcre + + ifeq ($(ANDROID_HOST),y) From 56a3277676b5f42ddcbcbc12f6ab97a31c30d321 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Fri, 1 Mar 2024 13:09:06 -0600 Subject: [PATCH 143/405] (#22929) qt: Bump expat to 2.6.0 to avoid conflicts in xkbcommon and wayland --- recipes/qt/5.x.x/conanfile.py | 2 +- recipes/qt/6.x.x/conanfile.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/qt/5.x.x/conanfile.py b/recipes/qt/5.x.x/conanfile.py index 8b1c566af5c7c..c8a423d3f890c 100644 --- a/recipes/qt/5.x.x/conanfile.py +++ b/recipes/qt/5.x.x/conanfile.py @@ -394,7 +394,7 @@ def requirements(self): if self.options.with_zstd: self.requires("zstd/1.5.5") if self.options.qtwebengine and self.settings.os in ["Linux", "FreeBSD"]: - self.requires("expat/2.5.0") + self.requires("expat/2.6.0") self.requires("opus/1.4") if not self.options.qtwayland: self.requires("xorg-proto/2022.2") diff --git a/recipes/qt/6.x.x/conanfile.py b/recipes/qt/6.x.x/conanfile.py index bff88d44cbcd2..e785559243ce4 100644 --- a/recipes/qt/6.x.x/conanfile.py +++ b/recipes/qt/6.x.x/conanfile.py @@ -369,7 +369,7 @@ def requirements(self): if self.options.with_brotli: self.requires("brotli/1.1.0") if self.options.get_safe("qtwebengine") and self.settings.os == "Linux": - self.requires("expat/2.5.0") + self.requires("expat/2.6.0") self.requires("opus/1.4") self.requires("xorg-proto/2022.2") self.requires("libxshmfence/1.3") @@ -614,7 +614,7 @@ def generate(self): } if Version(self.version) >= "6.5.0": cpp_std_map[23] = "FEATURE_cxx2b" - + for std,feature in cpp_std_map.items(): tc.variables[feature] = "ON" if int(current_cpp_std) >= std else "OFF" From 215c9f72441b474a14180488c6648d4c9ead14db Mon Sep 17 00:00:00 2001 From: Paul Harris Date: Mon, 4 Mar 2024 18:09:04 +0800 Subject: [PATCH 144/405] (#22949) Update alert-community.yml --- .github/workflows/alert-community.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/alert-community.yml b/.github/workflows/alert-community.yml index c557f03f37246..a12c503bcd8f0 100644 --- a/.github/workflows/alert-community.yml +++ b/.github/workflows/alert-community.yml @@ -69,7 +69,7 @@ jobs: - uses: ./.github/actions/alert-community with: files: "recipes/boost/*/*" - reviewers: "@grafikrobot @Hopobcn @jwillikers" + reviewers: "@grafikrobot @Hopobcn @jwillikers @paulharris" - uses: ./.github/actions/alert-community with: @@ -279,7 +279,7 @@ jobs: - uses: ./.github/actions/alert-community with: files: "recipes/libsodium/*/*" - reviewers: "@Hopobcn" + reviewers: "@Hopobcn @paulharris" - uses: ./.github/actions/alert-community with: @@ -304,7 +304,7 @@ jobs: - uses: ./.github/actions/alert-community with: files: "recipes/llvm-core/*/*" - reviewers: "@Hopobcn" + reviewers: "@Hopobcn @paulharris" - uses: ./.github/actions/alert-community with: @@ -379,7 +379,7 @@ jobs: - uses: ./.github/actions/alert-community with: files: "recipes/qt/*/*" - reviewers: "@ericLemanissier @jwillikers @MartinDelille" + reviewers: "@ericLemanissier @jwillikers @MartinDelille @paulharris" - uses: ./.github/actions/alert-community with: From fdc9b30e1feefd0e398def9fed6149b80109bf7b Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 4 Mar 2024 20:08:03 +0900 Subject: [PATCH 145/405] (#22802) nghttp3: add version 1.2.0 * nghttp3: add version 1.2.0 * fix windows shared build * remove empty line * remove unused import Co-authored-by: ericLemanissier --------- Co-authored-by: ericLemanissier --- recipes/nghttp3/all/conandata.yml | 8 ++++++++ recipes/nghttp3/all/conanfile.py | 6 +++++- ...2.0-0001-disable-always-static-build.patch | 20 +++++++++++++++++++ recipes/nghttp3/config.yml | 2 ++ 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 recipes/nghttp3/all/patches/1.2.0-0001-disable-always-static-build.patch diff --git a/recipes/nghttp3/all/conandata.yml b/recipes/nghttp3/all/conandata.yml index 3d19ff221c51b..d0fe8bd38465c 100644 --- a/recipes/nghttp3/all/conandata.yml +++ b/recipes/nghttp3/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.0": + url: "https://github.com/ngtcp2/nghttp3/releases/download/v1.2.0/nghttp3-1.2.0.tar.bz2" + sha256: "da1bc26af1fd8756b59883c256153d2f41064294750454ee4c970fe087a70056" "1.1.0": url: "https://github.com/ngtcp2/nghttp3/releases/download/v1.1.0/nghttp3-1.1.0.tar.bz2" sha256: "5a203bf6e3129a9c23b06207c0fa3b05b26066ea28c037a62c9fea8cffecd85f" @@ -8,3 +11,8 @@ sources: "0.15.0": url: "https://github.com/ngtcp2/nghttp3/releases/download/v0.15.0/nghttp3-0.15.0.tar.gz" sha256: "3c56d9fa6f1b58b37bd7b1b53eaf16cd71118bc2d5cadbc904f09d6f6466b42f" +patches: + "1.2.0": + - patch_file: "patches/1.2.0-0001-disable-always-static-build.patch" + patch_description: "disable always static build to avoid overwrite lib file on windows" + patch_type: "conan" diff --git a/recipes/nghttp3/all/conanfile.py b/recipes/nghttp3/all/conanfile.py index 618ddcb3adf32..85e3ee603cc88 100644 --- a/recipes/nghttp3/all/conanfile.py +++ b/recipes/nghttp3/all/conanfile.py @@ -2,7 +2,7 @@ from conan.tools.apple import is_apple_os from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv -from conan.tools.files import get, rmdir, copy +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.microsoft import is_msvc import os @@ -28,6 +28,9 @@ class Nghttp3Conan(ConanFile): "fPIC": True, } + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -58,6 +61,7 @@ def generate(self): tc.generate(scope="build") def build(self): + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/nghttp3/all/patches/1.2.0-0001-disable-always-static-build.patch b/recipes/nghttp3/all/patches/1.2.0-0001-disable-always-static-build.patch new file mode 100644 index 0000000000000..3f7e1ccd58d6f --- /dev/null +++ b/recipes/nghttp3/all/patches/1.2.0-0001-disable-always-static-build.patch @@ -0,0 +1,20 @@ +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 3928fb3..18bcb04 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -78,6 +78,7 @@ if(ENABLE_SHARED_LIB) + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") + endif() + ++if(ENABLE_STATIC_LIB) + # Static library (for unittests because of symbol visibility) + add_library(nghttp3_static STATIC ${nghttp3_SOURCES}) + set_target_properties(nghttp3_static PROPERTIES +@@ -86,7 +87,6 @@ set_target_properties(nghttp3_static PROPERTIES + ARCHIVE_OUTPUT_NAME nghttp3${STATIC_LIB_SUFFIX} + ) + target_compile_definitions(nghttp3_static PUBLIC "-DNGHTTP3_STATICLIB") +-if(ENABLE_STATIC_LIB) + install(TARGETS nghttp3_static + DESTINATION "${CMAKE_INSTALL_LIBDIR}") + endif() diff --git a/recipes/nghttp3/config.yml b/recipes/nghttp3/config.yml index f581e0802958e..3550769ed467e 100644 --- a/recipes/nghttp3/config.yml +++ b/recipes/nghttp3/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.0": + folder: all "1.1.0": folder: all "1.0.0": From 30f235c4e074cccb20328b36248262f4bba6ccb5 Mon Sep 17 00:00:00 2001 From: Eyal Rozenberg Date: Mon, 4 Mar 2024 13:28:21 +0200 Subject: [PATCH 146/405] (#22947) Updated cuda-api-wrappers with versions 0.6.8 and 0.7.0-b2 * Updated cuda-api-wrappers with versions 0.6.4, 0.6.6, 0.6.7, 0.6.8 and 0.7.0-b2 * Following CR comments: Only adding latest version + beta of next version --- recipes/cuda-api-wrappers/all/conandata.yml | 6 ++++++ recipes/cuda-api-wrappers/config.yml | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/recipes/cuda-api-wrappers/all/conandata.yml b/recipes/cuda-api-wrappers/all/conandata.yml index 0a04efd212109..a2ea7cff0b936 100644 --- a/recipes/cuda-api-wrappers/all/conandata.yml +++ b/recipes/cuda-api-wrappers/all/conandata.yml @@ -1,7 +1,13 @@ sources: + "0.7.0-b2": + url: "https://github.com/eyalroz/cuda-api-wrappers/archive/refs/tags/v0.7.0-b2.tar.gz" + sha256: "9439cb2250dd3045a05d43c4ca66b5d49535eeba123b05a2e49169354fdb3123" "0.7-b1": url: "https://github.com/eyalroz/cuda-api-wrappers/archive/0.7b1.tar.gz" sha256: "1ed5912d8f602ccd176865b824de17f462cb57142eb2a685d7cc034831e54a71" + "0.6.8": + url: "https://github.com/eyalroz/cuda-api-wrappers/archive/refs/tags/v0.6.8.tar.gz" + sha256: "a0d1b062dbe41c99d06df4ae7885a053c2ae3815d6fe12df0458bc5277d08ed7" "0.6.3": url: "https://github.com/eyalroz/cuda-api-wrappers/archive/refs/tags/v0.6.3.tar.gz" sha256: "45d896136dbb4df6c75c36071899b9fe47df9a03629c95208c2d5bda979d109e" diff --git a/recipes/cuda-api-wrappers/config.yml b/recipes/cuda-api-wrappers/config.yml index 326304241de6f..60cce1aaafb6b 100644 --- a/recipes/cuda-api-wrappers/config.yml +++ b/recipes/cuda-api-wrappers/config.yml @@ -1,5 +1,9 @@ versions: + "0.7.0-b2": + folder: all "0.7-b1": folder: all + "0.6.8": + folder: all "0.6.3": folder: all From 8e719a68d7d8f658e150ab8e214d32221645252f Mon Sep 17 00:00:00 2001 From: Ahajha <44127594+Ahajha@users.noreply.github.com> Date: Mon, 4 Mar 2024 07:09:17 -0500 Subject: [PATCH 147/405] (#22953) spdlog: Add option to use std::format * WIP adding std::format support * Additional spdlog with std::format fixes * Fix 1.10 and 1.11 with std::format * Fix test package on older compilers --- recipes/spdlog/all/conanfile.py | 82 ++++++++++++++----- .../spdlog/all/test_package/CMakeLists.txt | 7 +- recipes/spdlog/all/test_package/conanfile.py | 1 + 3 files changed, 69 insertions(+), 21 deletions(-) diff --git a/recipes/spdlog/all/conanfile.py b/recipes/spdlog/all/conanfile.py index f48df9bb2bbe0..b0c1ca14504e0 100644 --- a/recipes/spdlog/all/conanfile.py +++ b/recipes/spdlog/all/conanfile.py @@ -3,7 +3,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout from conan.tools.files import get, copy, rmdir, replace_in_file, apply_conandata_patches, export_conandata_patches -from conan.tools.microsoft import is_msvc_static_runtime +from conan.tools.microsoft import check_min_vs, is_msvc, is_msvc_static_runtime from conan.tools.scm import Version import os @@ -26,6 +26,7 @@ class SpdlogConan(ConanFile): "wchar_support": [True, False], "wchar_filenames": [True, False], "no_exceptions": [True, False], + "use_std_fmt": [True, False], } default_options = { "shared": False, @@ -34,6 +35,7 @@ class SpdlogConan(ConanFile): "wchar_support": False, "wchar_filenames": False, "no_exceptions": False, + "use_std_fmt": False, } def export_sources(self): @@ -42,6 +44,8 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "1.10.0": + del self.options.use_std_fmt def configure(self): if self.options.get_safe("shared") or self.options.header_only: @@ -53,53 +57,81 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self_version = Version(self.version) - fmt_version = "7.1.3" - - if self_version >= "1.12.0": - fmt_version = "10.2.1" - elif self_version >= "1.11.0": - fmt_version = "10.0.0" - elif self_version >= "1.10.0": - fmt_version = "8.1.1" - elif self_version >= "1.9.0": - fmt_version = "8.0.1" - elif self_version >= "1.7.0": + if not self.options.get_safe("use_std_fmt"): + self_version = Version(self.version) fmt_version = "7.1.3" - self.requires(f"fmt/{fmt_version}", transitive_headers=True, transitive_libs=True) + if self_version >= "1.12.0": + fmt_version = "10.2.1" + elif self_version >= "1.11.0": + fmt_version = "10.0.0" + elif self_version >= "1.10.0": + fmt_version = "8.1.1" + elif self_version >= "1.9.0": + fmt_version = "8.0.1" + elif self_version >= "1.7.0": + fmt_version = "7.1.3" + + self.requires(f"fmt/{fmt_version}", transitive_headers=True, transitive_libs=True) def package_id(self): if self.info.options.header_only: self.info.clear() + + @property + def _std_fmt_compilers_minimum_version(self): + return { + "gcc": "13", + "clang": "14", + "apple-clang": "15", + "Visual Studio": "16", + "msvc": "192", + } def validate(self): if self.settings.get_safe("compiler.cppstd"): - check_min_cppstd(self, 11) + if self.options.get_safe("use_std_fmt"): + check_min_cppstd(self, 20) + else: + check_min_cppstd(self, 11) if self.settings.os != "Windows" and (self.options.wchar_support or self.options.wchar_filenames): raise ConanInvalidConfiguration("wchar is only supported under windows") if self.options.get_safe("shared") and is_msvc_static_runtime(self): raise ConanInvalidConfiguration("Visual Studio build for shared library with MT runtime is not supported") + + if self.options.get_safe("use_std_fmt"): + check_min_vs(self, self._std_fmt_compilers_minimum_version["msvc"]) + if not is_msvc(self): + compiler_name = str(self.settings.compiler) + minimum_version = self._std_fmt_compilers_minimum_version.get(compiler_name, False) + if not minimum_version: + self.output.warning(f"{self.name} recipe lacks information about the {compiler_name} compiler support.") + elif Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} using std::fmt requires std::fmt, which your compiler does not support." + ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): if not self.options.header_only: - fmt = self.dependencies["fmt"] tc = CMakeToolchain(self) tc.variables["SPDLOG_BUILD_EXAMPLE"] = False tc.variables["SPDLOG_BUILD_EXAMPLE_HO"] = False tc.variables["SPDLOG_BUILD_TESTS"] = False tc.variables["SPDLOG_BUILD_TESTS_HO"] = False tc.variables["SPDLOG_BUILD_BENCH"] = False - tc.variables["SPDLOG_FMT_EXTERNAL"] = not fmt.options.header_only - tc.variables["SPDLOG_FMT_EXTERNAL_HO"] = fmt.options.header_only + if not self.options.get_safe("use_std_fmt"): + fmt = self.dependencies["fmt"] + tc.variables["SPDLOG_FMT_EXTERNAL"] = not fmt.options.header_only + tc.variables["SPDLOG_FMT_EXTERNAL_HO"] = fmt.options.header_only tc.variables["SPDLOG_BUILD_SHARED"] = not self.options.header_only and self.options.shared tc.variables["SPDLOG_WCHAR_SUPPORT"] = self.options.wchar_support tc.variables["SPDLOG_WCHAR_FILENAMES"] = self.options.wchar_filenames tc.variables["SPDLOG_INSTALL"] = True tc.variables["SPDLOG_NO_EXCEPTIONS"] = self.options.no_exceptions + tc.variables["SPDLOG_USE_STD_FORMAT"] = self.options.get_safe("use_std_fmt") if self.settings.os in ("iOS", "tvOS", "watchOS"): tc.variables["SPDLOG_NO_TLS"] = True tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0091"] = "NEW" @@ -110,9 +142,16 @@ def generate(self): def _disable_werror(self): replace_in_file(self, os.path.join(self.source_folder, "cmake", "utils.cmake"), "/WX", "") + def _use_cpp20_for_std_format(self): + # This is properly set in later versions + if self.options.get_safe("use_std_fmt") and Version(self.version) < "1.12": + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "CMAKE_CXX_STANDARD 11", "CMAKE_CXX_STANDARD 20") + def build(self): apply_conandata_patches(self) self._disable_werror() + self._use_cpp20_for_std_format() if not self.options.header_only: cmake = CMake(self) cmake.configure() @@ -141,8 +180,11 @@ def package_info(self): # TODO: back to global scope in conan v2 once legacy generators removed self.cpp_info.components["libspdlog"].set_property("cmake_target_name", f"spdlog::{target}") - self.cpp_info.components["libspdlog"].defines.append("SPDLOG_FMT_EXTERNAL") - self.cpp_info.components["libspdlog"].requires = ["fmt::fmt"] + if self.options.get_safe("use_std_fmt"): + self.cpp_info.components["libspdlog"].defines.append("SPDLOG_USE_STD_FORMAT") + else: + self.cpp_info.components["libspdlog"].requires = ["fmt::fmt"] + self.cpp_info.components["libspdlog"].defines.append("SPDLOG_FMT_EXTERNAL") if self.options.header_only: self.cpp_info.components["libspdlog"].libdirs = [] diff --git a/recipes/spdlog/all/test_package/CMakeLists.txt b/recipes/spdlog/all/test_package/CMakeLists.txt index d31b151d6390c..f43e46db5a77d 100644 --- a/recipes/spdlog/all/test_package/CMakeLists.txt +++ b/recipes/spdlog/all/test_package/CMakeLists.txt @@ -9,4 +9,9 @@ if(SPDLOG_HEADER_ONLY) else() target_link_libraries(${PROJECT_NAME} PUBLIC spdlog::spdlog) endif() -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) + +if(SPDLOG_USE_STD_FORMAT) + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +endif() diff --git a/recipes/spdlog/all/test_package/conanfile.py b/recipes/spdlog/all/test_package/conanfile.py index 81d7c956cf9d2..346d9bd744058 100644 --- a/recipes/spdlog/all/test_package/conanfile.py +++ b/recipes/spdlog/all/test_package/conanfile.py @@ -19,6 +19,7 @@ def requirements(self): def generate(self): tc = CMakeToolchain(self) tc.variables["SPDLOG_HEADER_ONLY"] = self.dependencies["spdlog"].options.header_only + tc.variables["SPDLOG_USE_STD_FORMAT"] = self.dependencies["spdlog"].options.get_safe("use_std_fmt", False) tc.generate() def build(self): From 49158e20168fbdcbf76ce8c1b6ef1806dc315b04 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 4 Mar 2024 21:48:42 +0900 Subject: [PATCH 148/405] (#22935) ssp: add version 1.7.2 * ssp: add version 1.7.0 * update 1.7.2 --- recipes/ssp/all/conandata.yml | 3 +++ recipes/ssp/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/ssp/all/conandata.yml b/recipes/ssp/all/conandata.yml index 7b9246ca69c3c..4382623935239 100644 --- a/recipes/ssp/all/conandata.yml +++ b/recipes/ssp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.7.2": + url: "https://github.com/red0124/ssp/archive/refs/tags/v1.7.2.tar.gz" + sha256: "700e05d304fe10f05331d0a963757257632dddc1f9442b826a85efa545c64772" "1.6.2": url: "https://github.com/red0124/ssp/archive/refs/tags/v1.6.2.tar.gz" sha256: "6fa5ae1cd458eae3c1931e8cbcbd8d97956eda37db1388358456ca0743b48b7c" diff --git a/recipes/ssp/config.yml b/recipes/ssp/config.yml index 8664a344402ec..98bae30aec835 100644 --- a/recipes/ssp/config.yml +++ b/recipes/ssp/config.yml @@ -1,4 +1,6 @@ versions: + "1.7.2": + folder: all "1.6.2": folder: all "1.6.1": From 0b852a04bf008c48376e82d0b42349817f85c9ba Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 4 Mar 2024 13:01:51 +0000 Subject: [PATCH 149/405] (#22967) [bot] Update authorized users list (2024-03-04) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add/remove users to Access Request * Add gagoi --------- Co-authored-by: conan-center-bot Co-authored-by: Rubén Rincón Blanco Co-authored-by: Uilian Ries --- .c3i/authorized_users.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 874e514f2025b..a09f911a11265 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1293,3 +1293,8 @@ authorized_users: - metalMajor - joergbrech - dagon666 +- elvisdukaj +- vok1980 +- camm73 +- crstzh +- gagoi From ed500d9a2feecd319085d305049324fc8bc3a0cf Mon Sep 17 00:00:00 2001 From: Ahajha <44127594+Ahajha@users.noreply.github.com> Date: Mon, 4 Mar 2024 08:28:56 -0500 Subject: [PATCH 150/405] (#22939) tcl: Don't include extensions in package info libs --- recipes/tcl/all/conanfile.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/recipes/tcl/all/conanfile.py b/recipes/tcl/all/conanfile.py index 89c037e770f6b..f3487edb47074 100644 --- a/recipes/tcl/all/conanfile.py +++ b/recipes/tcl/all/conanfile.py @@ -223,15 +223,9 @@ def package(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "TCL") - libs = [] - libdirs = [] - for root, _, _ in os.walk(os.path.join(self.package_folder, "lib"), topdown=False): - newlibs = collect_libs(self, root) - if newlibs: - libs.extend(newlibs) - libdirs.append(root) - self.cpp_info.libs = libs - self.cpp_info.libdirs = libdirs + # There are other libs in subfolders, but they are only used + # for TCL extensions and should not be linked against. + self.cpp_info.libs = collect_libs(self, os.path.join(self.package_folder, "lib")) if self.settings.os == "Windows": self.cpp_info.system_libs.extend(["ws2_32", "netapi32", "userenv"]) From 8d7b574da67c5a2896e6ca4450548e14f708a3e6 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 4 Mar 2024 22:49:35 +0900 Subject: [PATCH 151/405] (#22940) glaze: add version 2.1.9 --- recipes/glaze/all/conandata.yml | 3 +++ recipes/glaze/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index 6736bccf09f67..b30f919630ddb 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.9": + url: "https://github.com/stephenberry/glaze/archive/v2.1.9.tar.gz" + sha256: "678126f068e3c21c2b3d2e1ae914c72296b68610a004cf542ea050946ab06416" "2.1.7": url: "https://github.com/stephenberry/glaze/archive/v2.1.7.tar.gz" sha256: "e110bfc6494ca3a0616beaec214e61a53d4e0bd1489d8f1a45ca6f87594a3502" diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index e31effcfe238e..4e0d084a17dc7 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,6 @@ versions: + "2.1.9": + folder: all "2.1.7": folder: all "2.1.6": From 214f901c63a5ecd04262f899172deb883572bc63 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 4 Mar 2024 23:08:30 +0900 Subject: [PATCH 152/405] (#22943) wyhash: add version final4 --- recipes/wyhash/all/conandata.yml | 3 +++ recipes/wyhash/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/wyhash/all/conandata.yml b/recipes/wyhash/all/conandata.yml index 97f88594e3ec8..585638f0f02fb 100644 --- a/recipes/wyhash/all/conandata.yml +++ b/recipes/wyhash/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "final4": + url: "https://github.com/wangyi-fudan/wyhash/archive/refs/tags/wyhash_final4.tar.gz" + sha256: "a3f2da3acf300fba43f51c8299dae71c4e0774cd6fdd96e264fad5777b12ae3a" "cci.20221102": url: "https://github.com/wangyi-fudan/wyhash/archive/ea3b25e1aef55d90f707c3a292eeb9162e2615d8.tar.gz" sha256: "94c6ca365a1ca39f4327c4e031690441a45a7d9feefbc14f86323d8b42c82cbe" diff --git a/recipes/wyhash/config.yml b/recipes/wyhash/config.yml index eec24bd72e90d..80db1803c9cf5 100644 --- a/recipes/wyhash/config.yml +++ b/recipes/wyhash/config.yml @@ -1,3 +1,5 @@ versions: + "final4": + folder: all "cci.20221102": folder: all From 36f86cd0c3f749414899746a61b51c3ea6f5a5ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20ZANGLA?= <5780920+gagoi@users.noreply.github.com> Date: Mon, 4 Mar 2024 15:28:30 +0100 Subject: [PATCH 153/405] (#22948) Bump minizip to 1.3.1 --- recipes/minizip/all/conandata.yml | 5 +++++ recipes/minizip/config.yml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/recipes/minizip/all/conandata.yml b/recipes/minizip/all/conandata.yml index d1d3166de347b..f8773fd58975f 100644 --- a/recipes/minizip/all/conandata.yml +++ b/recipes/minizip/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.1": + url: "https://zlib.net/fossils/zlib-1.3.1.tar.gz" + sha256: "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23" "1.2.13": url: "https://zlib.net/fossils/zlib-1.2.13.tar.gz" sha256: "b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30" @@ -9,6 +12,8 @@ sources: url: "https://zlib.net/fossils/zlib-1.2.11.tar.gz" sha256: "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1" patches: + "1.3.1": + - patch_file: "patches/minizip.patch" "1.2.13": - patch_file: "patches/minizip.patch" "1.2.12": diff --git a/recipes/minizip/config.yml b/recipes/minizip/config.yml index 351c06f68201f..bd5341271951d 100644 --- a/recipes/minizip/config.yml +++ b/recipes/minizip/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.1": + folder: all "1.2.13": folder: all "1.2.12": From 537270a48193d83016a2ed0bf2a260588a0e2b36 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 4 Mar 2024 16:46:52 +0200 Subject: [PATCH 154/405] (#22187) dcmtk: add v3.6.8 * dcmtk: add v3.6.8 * dcmtk: update component list Grepped for `DCMTK_TARGET_LINK_MODULES` and `DCMTK_TARGET_LINK_LIBRARIES` in the sources and updated the list accordingly. * dcmtk: cross-building on macOS is broken * dcmtk: add /Zc:__cplusplus * dcmtk: add nsl to system_libs --- recipes/dcmtk/all/conandata.yml | 10 ++ recipes/dcmtk/all/conanfile.py | 42 +++-- ....6.8-0001-cmake-robust-deps-handling.patch | 158 ++++++++++++++++++ ....6.8-0002-cmake-check-openssl-symbol.patch | 107 ++++++++++++ recipes/dcmtk/config.yml | 2 + 5 files changed, 308 insertions(+), 11 deletions(-) create mode 100644 recipes/dcmtk/all/patches/3.6.8-0001-cmake-robust-deps-handling.patch create mode 100644 recipes/dcmtk/all/patches/3.6.8-0002-cmake-check-openssl-symbol.patch diff --git a/recipes/dcmtk/all/conandata.yml b/recipes/dcmtk/all/conandata.yml index fc800b08330e7..7c6f0a7a01b93 100644 --- a/recipes/dcmtk/all/conandata.yml +++ b/recipes/dcmtk/all/conandata.yml @@ -1,8 +1,18 @@ sources: + "3.6.8": + url: "https://dicom.offis.de/download/dcmtk/dcmtk368/dcmtk-3.6.8.tar.gz" + sha256: "232076655503138debf2f624109f1799e539354f186ce4e04b27cf82a9d8720f" "3.6.7": url: "https://dicom.offis.de/download/dcmtk/dcmtk367/dcmtk-3.6.7.tar.gz" sha256: "7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a" patches: + "3.6.8": + - patch_file: "patches/3.6.8-0001-cmake-robust-deps-handling.patch" + patch_description: "CMake: robust discovery with find_package() and use imported targets" + patch_type: conan + - patch_file: "patches/3.6.8-0002-cmake-check-openssl-symbol.patch" + patch_description: "CMake: fix OpenSSL compatibility checks" + patch_type: conan "3.6.7": - patch_file: "patches/3.6.7-0001-cmake-robust-deps-handling.patch" patch_description: "CMake: robust discovery with find_package() and use imported targets" diff --git a/recipes/dcmtk/all/conanfile.py b/recipes/dcmtk/all/conanfile.py index 6980bbc99c18d..1342755427911 100644 --- a/recipes/dcmtk/all/conanfile.py +++ b/recipes/dcmtk/all/conanfile.py @@ -3,10 +3,11 @@ 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, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir, save from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.scm import Version required_conan_version = ">=1.54.0" @@ -114,10 +115,11 @@ def package_id(self): del self.info.options.external_dictionary def validate(self): - if hasattr(self, "settings_build") and cross_building(self) and \ - self.settings.os == "Macos" and self.settings.arch == "armv8": + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + if hasattr(self, "settings_build") and cross_building(self) and self.settings.os == "Macos": # FIXME: Probable issue with flags, build includes header 'mmintrin.h' - raise ConanInvalidConfiguration("Cross building to Macos M1 is not supported (yet)") + raise ConanInvalidConfiguration("Cross building on Macos is not supported (yet)") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -287,7 +289,7 @@ def tcpwrappers(): def xml2(): return ["libxml2::libxml2"] if self.options.with_libxml2 else [] - return { + components = { "ofstd" : charset_conversion(), "oflog" : ["ofstd"], "dcmdata" : ["ofstd", "oflog"] + zlib(), @@ -314,7 +316,15 @@ def xml2(): "dcmseg" : ["dcmfg", "dcmiod", "dcmdata", "ofstd", "oflog"], "dcmtract": ["dcmiod", "dcmdata", "ofstd", "oflog"], "dcmpmap" : ["dcmfg", "dcmiod", "dcmdata", "ofstd", "oflog"], + "dcmect" : ["dcmfg", "dcmiod", "dcmdata", "ofstd", "oflog"], } + if Version(self.version) >= "3.6.8": + components["dcmxml"] = ["dcmdata", "ofstd", "oflog"] + zlib() + xml2() + components["oficonv"] = [] + components["dcmpstat"] += ["dcmiod"] + components["i2d"] += ["dcmxml"] + components["ofstd"] += ["oficonv"] + return components @property def _dcm_datadictionary_path(self): @@ -326,7 +336,7 @@ def package_info(self): for target_lib, requires in self._dcmtk_components.items(): self.cpp_info.components[target_lib].set_property("cmake_target_name", f"DCMTK::{target_lib}") - # Before 3.6.7, targets were not namespaced, therefore they are also exposed for conveniency + # Before 3.6.7, targets were not namespaced, therefore they are also exposed for convenience self.cpp_info.components[target_lib].set_property("cmake_target_aliases", [target_lib]) self.cpp_info.components[target_lib].libs = [target_lib] @@ -337,14 +347,24 @@ def package_info(self): self.cpp_info.components[target_lib].build_modules["cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components[target_lib].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] + if is_msvc(self): + # Required for the __cplusplus check at + # https://github.com/DCMTK/dcmtk/blob/DCMTK-3.6.8/config/include/dcmtk/config/osconfig.h.in#L1489 + self.cpp_info.components[target_lib].cxxflags.append("/Zc:__cplusplus") + + system_libs = [] if self.settings.os == "Windows": - self.cpp_info.components["ofstd"].system_libs.extend([ - "iphlpapi", "ws2_32", "netapi32", "wsock32" - ]) + system_libs = ["iphlpapi", "ws2_32", "netapi32", "wsock32"] elif self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["ofstd"].system_libs.append("m") + system_libs = ["m", "nsl"] if self.options.with_multithreading: - self.cpp_info.components["ofstd"].system_libs.append("pthread") + system_libs.append("pthread") + if Version(self.version) >= "3.6.8": + system_libs.append("rt") + if Version(self.version) >= "3.6.8": + self.cpp_info.components["oficonv"].system_libs = system_libs + else: + self.cpp_info.components["ofstd"].system_libs = system_libs if self.options.default_dict == "external": dcmdictpath = os.path.join(self._dcm_datadictionary_path, "dcmtk", "dicom.dic") diff --git a/recipes/dcmtk/all/patches/3.6.8-0001-cmake-robust-deps-handling.patch b/recipes/dcmtk/all/patches/3.6.8-0001-cmake-robust-deps-handling.patch new file mode 100644 index 0000000000000..41e42340ad638 --- /dev/null +++ b/recipes/dcmtk/all/patches/3.6.8-0001-cmake-robust-deps-handling.patch @@ -0,0 +1,158 @@ +--- CMake/3rdparty.cmake ++++ CMake/3rdparty.cmake +@@ -25,7 +25,7 @@ + if(DCMTK_USE_FIND_PACKAGE) + # Find TIFF + if(DCMTK_WITH_TIFF) +- find_package(TIFF QUIET) ++ find_package(TIFF REQUIRED) + # turn off library if it could not be found + if(NOT TIFF_FOUND) + message(STATUS "Warning: TIFF support will be disabled because libtiff was not found.") +@@ -34,21 +34,13 @@ + else() + set(WITH_LIBTIFF 1) + # libtiff can be compiled with libjpeg support; if available, add libjpeg to library and include path +- find_package(JPEG QUIET) +- if(NOT JPEG_FOUND) +- message(STATUS "Info: DCMTK TIFF support will be enabled (but without JPEG)") +- include_directories(${TIFF_INCLUDE_DIR}) +- else() +- message(STATUS "Info: DCMTK TIFF support will be enabled") +- include_directories(${TIFF_INCLUDE_DIR} ${JPEG_INCLUDE_DIR}) +- endif() +- set(LIBTIFF_LIBS ${TIFF_LIBRARY} ${TIFF_EXTRA_LIBS_STATIC} ${JPEG_LIBRARY}) ++ set(LIBTIFF_LIBS TIFF::TIFF) + endif() + endif() + + # Find PNG + if(DCMTK_WITH_PNG) +- find_package(PNG QUIET) ++ find_package(PNG REQUIRED) + if(NOT PNG_FOUND) + set(DCMTK_WITH_PNG OFF CACHE BOOL "" FORCE) + message(STATUS "Warning: PNG support will be disabled because libpng was not found.") +@@ -57,13 +49,13 @@ + message(STATUS "Info: DCMTK PNG support will be enabled") + set(WITH_LIBPNG 1) + include_directories(${PNG_INCLUDE_DIR}) +- set(LIBPNG_LIBS ${PNG_LIBRARY}) ++ set(LIBPNG_LIBS PNG::PNG) + endif() + endif() + + # Find OpenSSL + if(DCMTK_WITH_OPENSSL) +- find_package(OpenSSL QUIET) ++ find_package(OpenSSL REQUIRED) + if(NOT OPENSSL_FOUND) + message(STATUS "Warning: OPENSSL support will be disabled because openssl was not found.") + set(WITH_OPENSSL "") +@@ -75,15 +67,11 @@ + list(APPEND CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}") + CHECK_CXX_SOURCE_COMPILES("extern \"C\" {\n#include \n}\nint main(){\n#if OPENSSL_VERSION_NUMBER < 0x10002000L\n#error OpenSSL too old\n#endif\n}\n" OPENSSL_VERSION_CHECK) + set(CMAKE_REQUIRED_INCLUDES "${TEMP_INCLUDES}") +- if(OPENSSL_VERSION_CHECK) ++ if(1) + message(STATUS "Info: DCMTK OPENSSL support will be enabled") + set(WITH_OPENSSL 1) + include_directories(${OPENSSL_INCLUDE_DIR}) +- set(OPENSSL_LIBS ${OPENSSL_LIBRARIES} ${OPENSSL_EXTRA_LIBS_STATIC}) +- CHECK_LIBRARY_EXISTS(dl dlopen "" HAVE_LIBDL) +- if(HAVE_LIBDL) +- set(OPENSSL_LIBS ${OPENSSL_LIBS} dl) +- endif() ++ set(OPENSSL_LIBS OpenSSL::SSL OpenSSL::Crypto) + else() + message(STATUS "Info: DCMTK OPENSSL support will be disabled: DCMTK requires OpenSSL version 1.0.2 or newer") + set(DCMTK_WITH_OPENSSL OFF CACHE BOOL "" FORCE) +@@ -94,7 +82,7 @@ + + # Find libXML2 + if(DCMTK_WITH_XML) +- find_package(LibXml2 QUIET) ++ find_package(LibXml2 REQUIRED MODULE) + if(NOT LIBXML2_FOUND) + message(STATUS "Warning: XML support will be disabled because libxml2 was not found.") + set(WITH_LIBXML "") +@@ -103,13 +91,13 @@ + message(STATUS "Info: DCMTK XML support will be enabled") + set(WITH_LIBXML 1) + include_directories(${LIBXML2_INCLUDE_DIR}) +- set(LIBXML_LIBS ${LIBXML2_LIBRARIES} ${LIBXML2_EXTRA_LIBS_STATIC}) ++ set(LIBXML_LIBS LibXml2::LibXml2) + endif() + endif() + + # Find zlib + if(DCMTK_WITH_ZLIB) +- find_package(ZLIB QUIET) ++ find_package(ZLIB REQUIRED) + if(NOT ZLIB_FOUND) + message(STATUS "Warning: ZLIB support will be disabled because zlib was not found.") + set(WITH_ZLIB "") +@@ -118,7 +106,7 @@ + message(STATUS "Info: DCMTK ZLIB support will be enabled") + set(WITH_ZLIB 1) + include_directories(${ZLIB_INCLUDE_DIRS}) +- set(ZLIB_LIBS ${ZLIB_LIBRARIES}) ++ set(ZLIB_LIBS ZLIB::ZLIB) + endif() + endif() + +@@ -139,11 +127,10 @@ + + # Find libiconv + if(DCMTK_WITH_ICONV) +- find_package(Iconv QUIET) +- find_package(LIBCHARSET QUIET) +- if(ICONV_FOUND) ++ find_package(Iconv REQUIRED) ++ if(Iconv_FOUND) + if(NOT Iconv_IS_BUILT_IN) +- set(LIBICONV_FOUND ${ICONV_FOUND}) ++ set(LIBICONV_FOUND ${Iconv_FOUND}) + else() + message(STATUS "Info: found builtin ICONV support inside the C standard library.") + set(DCMTK_WITH_STDLIBC_ICONV ON CACHE BOOL "" FORCE) +@@ -153,7 +140,7 @@ + set(LIBICONV_SECOND_ARGUMENT_CONST ${ICONV_SECOND_ARGUMENT_IS_CONST} CACHE INTERNAL "${HELPSTRING}") + endif() + endif() +- if(NOT LIBICONV_FOUND OR NOT LIBCHARSET_FOUND) ++ if(NOT LIBICONV_FOUND) + message(STATUS "Warning: ICONV support will be disabled because libiconv was not found. Correct LIBICONV_LIBDIR and LIBICONV_INCLUDE_DIR and re-enable DCMTK_WITH_ICONV.") + set(DCMTK_WITH_ICONV OFF CACHE BOOL "" FORCE) + set(WITH_LIBICONV "") +@@ -161,24 +148,24 @@ + message(STATUS "Info: DCMTK ICONV support will be enabled") + set(WITH_LIBICONV 1) + set(LIBICONV_INCDIR ${LIBICONV_INCLUDE_DIRS} ${Iconv_INCLUDE_DIRS} ${ICONV_INCLUDE_DIR} ${LIBCHARSET_INCLUDE_DIRS}) +- set(LIBICONV_LIBDIR ${LIBICONV_LIBDIR}) +- set(LIBICONV_LIBS ${LIBICONV_LIBRARIES} ${Iconv_LIBRARIES} ${ICONV_LIBRARIES} ${LIBCHARSET_LIBRARY}) ++ set(LIBICONV_LIBDIR ${Iconv_LIB_DIRS}) ++ set(LIBICONV_LIBS Iconv::Iconv) + include_directories(${LIBICONV_INCDIR}) + endif() + endif() + + # Find libwrap + if(DCMTK_WITH_WRAP) +- find_package(WRAP QUIET) +- if(NOT WRAP_FOUND) ++ find_package(tcp-wrappers REQUIRED CONFIG) ++ if(NOT tcp-wrappers_FOUND) + message(STATUS "Warning: WRAP support will be disabled because libwrap was not found.") + set(WITH_TCPWRAPPER "") + set(DCMTK_WITH_WRAP OFF CACHE BOOL "" FORCE) + else() + message(STATUS "Info: DCMTK WRAP support will be enabled") + set(WITH_TCPWRAPPER 1) +- include_directories(${WRAP_INCLUDE_DIRS}) +- set(WRAP_LIBS ${WRAP_LIBRARIES} ${WRAP_EXTRA_LIBS_STATIC}) ++ include_directories(${tcp-wrappers_INCLUDE_DIRS}) ++ set(WRAP_LIBS tcp-wrappers::tcp-wrappers) + endif() + endif() + diff --git a/recipes/dcmtk/all/patches/3.6.8-0002-cmake-check-openssl-symbol.patch b/recipes/dcmtk/all/patches/3.6.8-0002-cmake-check-openssl-symbol.patch new file mode 100644 index 0000000000000..a4cd32b6e2766 --- /dev/null +++ b/recipes/dcmtk/all/patches/3.6.8-0002-cmake-check-openssl-symbol.patch @@ -0,0 +1,107 @@ +--- CMake/dcmtkPrepare.cmake ++++ CMake/dcmtkPrepare.cmake +@@ -689,57 +689,59 @@ + CHECK_INCLUDE_FILE_CXX("openssl/provider.h" HAVE_OPENSSL_PROVIDER_H) + + # test presence of functions, constants and macros needed for the dcmtls module +- CHECK_FUNCTIONWITHHEADER_EXISTS("DH_bits" "openssl/dh.h" HAVE_OPENSSL_PROTOTYPE_DH_BITS) +- CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_RSA_PSS" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_RSA_PSS) +- CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_base_id" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID) +- CHECK_FUNCTIONWITHHEADER_EXISTS("NID_dsa_with_SHA512" "openssl/obj_mac.h" HAVE_OPENSSL_PROTOTYPE_NID_DSA_WITH_SHA512) +- CHECK_FUNCTIONWITHHEADER_EXISTS("NID_ecdsa_with_SHA3_256" "openssl/obj_mac.h" HAVE_OPENSSL_PROTOTYPE_NID_ECDSA_WITH_SHA3_256) +- CHECK_FUNCTIONWITHHEADER_EXISTS("NID_sha512_256WithRSAEncryption" "openssl/obj_mac.h" HAVE_OPENSSL_PROTOTYPE_NID_SHA512_256WITHRSAENCRYPTION) +- CHECK_FUNCTIONWITHHEADER_EXISTS("RAND_egd" "openssl/rand.h" HAVE_OPENSSL_PROTOTYPE_RAND_EGD) +- CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get0_param" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET0_PARAM) +- CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get_cert_store" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CERT_STORE) +- CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get_ciphers" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CIPHERS) +- CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set0_tmp_dh_pkey" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET0_TMP_DH_PKEY) +- CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set1_curves(0,0,0)" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES) +- CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set1_sigalgs" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_SIGALGS) +- CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set_ecdh_auto(0,0)" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_ECDH_AUTO) +- CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set_max_proto_version(0,0)" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_MAX_PROTO_VERSION) +- CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set_security_level" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_SECURITY_LEVEL) +- CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_ERROR_WANT_ASYNC" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC) +- CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_ERROR_WANT_ASYNC_JOB" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC_JOB) +- CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_ERROR_WANT_CLIENT_HELLO_CB" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_CLIENT_HELLO_CB) +- CHECK_FUNCTIONWITHHEADER_EXISTS("TLS1_3_RFC_AES_128_CCM_8_SHA256" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_3_RFC_AES_128_CCM_8_SHA256) +- CHECK_FUNCTIONWITHHEADER_EXISTS("TLS1_3_RFC_AES_256_GCM_SHA384" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_3_RFC_AES_256_GCM_SHA384) +- CHECK_FUNCTIONWITHHEADER_EXISTS("TLS1_3_RFC_CHACHA20_POLY1305_SHA256" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_3_RFC_CHACHA20_POLY1305_SHA256) +- CHECK_FUNCTIONWITHHEADER_EXISTS("TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM_8" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM_8) +- CHECK_FUNCTIONWITHHEADER_EXISTS("TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384) +- CHECK_FUNCTIONWITHHEADER_EXISTS("TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305) +- CHECK_FUNCTIONWITHHEADER_EXISTS("TLS_method" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS_METHOD) +- CHECK_FUNCTIONWITHHEADER_EXISTS("X509_STORE_CTX_get0_cert" "openssl/x509_vfy.h" HAVE_OPENSSL_PROTOTYPE_X509_STORE_CTX_GET0_CERT) +- CHECK_FUNCTIONWITHHEADER_EXISTS("X509_STORE_get0_param" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_STORE_GET0_PARAM) +- CHECK_FUNCTIONWITHHEADER_EXISTS("X509_get_signature_nid" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET_SIGNATURE_NID) ++ include(CheckSymbolExists) ++ include(CheckCSourceCompiles) ++ check_symbol_exists("DH_bits" "openssl/dh.h" HAVE_OPENSSL_PROTOTYPE_DH_BITS) ++ check_symbol_exists("EVP_PKEY_RSA_PSS" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_RSA_PSS) ++ check_symbol_exists("EVP_PKEY_base_id" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID) ++ check_symbol_exists("NID_dsa_with_SHA512" "openssl/obj_mac.h" HAVE_OPENSSL_PROTOTYPE_NID_DSA_WITH_SHA512) ++ check_symbol_exists("NID_ecdsa_with_SHA3_256" "openssl/obj_mac.h" HAVE_OPENSSL_PROTOTYPE_NID_ECDSA_WITH_SHA3_256) ++ check_symbol_exists("NID_sha512_256WithRSAEncryption" "openssl/obj_mac.h" HAVE_OPENSSL_PROTOTYPE_NID_SHA512_256WITHRSAENCRYPTION) ++ check_symbol_exists("RAND_egd" "openssl/rand.h" HAVE_OPENSSL_PROTOTYPE_RAND_EGD) ++ check_symbol_exists("SSL_CTX_get0_param" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET0_PARAM) ++ check_symbol_exists("SSL_CTX_get_cert_store" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CERT_STORE) ++ check_symbol_exists("SSL_CTX_get_ciphers" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CIPHERS) ++ check_symbol_exists("SSL_CTX_set0_tmp_dh_pkey" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET0_TMP_DH_PKEY) ++ check_c_source_compiles("#include \nint main() {SSL_CTX_set1_curves(0,0,0); return 0;}" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES) ++ check_symbol_exists("SSL_CTX_set1_sigalgs" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_SIGALGS) ++ check_c_source_compiles("#include \nint main() {SSL_CTX_set_ecdh_auto(0,0); return 0;}" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_ECDH_AUTO) ++ check_c_source_compiles("#include \nint main() {SSL_CTX_set_max_proto_version(0,0); return 0;}" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_MAX_PROTO_VERSION) ++ check_symbol_exists("SSL_CTX_set_security_level" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_SECURITY_LEVEL) ++ check_symbol_exists("SSL_ERROR_WANT_ASYNC" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC) ++ check_symbol_exists("SSL_ERROR_WANT_ASYNC_JOB" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC_JOB) ++ check_symbol_exists("SSL_ERROR_WANT_CLIENT_HELLO_CB" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_CLIENT_HELLO_CB) ++ check_symbol_exists("TLS1_3_RFC_AES_128_CCM_8_SHA256" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_3_RFC_AES_128_CCM_8_SHA256) ++ check_symbol_exists("TLS1_3_RFC_AES_256_GCM_SHA384" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_3_RFC_AES_256_GCM_SHA384) ++ check_symbol_exists("TLS1_3_RFC_CHACHA20_POLY1305_SHA256" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_3_RFC_CHACHA20_POLY1305_SHA256) ++ check_symbol_exists("TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM_8" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM_8) ++ check_symbol_exists("TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384) ++ check_symbol_exists("TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305) ++ check_symbol_exists("TLS_method" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS_METHOD) ++ check_symbol_exists("X509_STORE_CTX_get0_cert" "openssl/x509_vfy.h" HAVE_OPENSSL_PROTOTYPE_X509_STORE_CTX_GET0_CERT) ++ check_symbol_exists("X509_STORE_get0_param" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_STORE_GET0_PARAM) ++ check_symbol_exists("X509_get_signature_nid" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET_SIGNATURE_NID) + + # test presence of functions, constants and macros needed for the dcmsign module +- CHECK_FUNCTIONWITHHEADER_EXISTS("ASN1_STRING_get0_data" "openssl/asn1.h" HAVE_OPENSSL_PROTOTYPE_ASN1_STRING_GET0_DATA) +- CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_get0_EC_KEY" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET0_EC_KEY) +- CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_get_group_name" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET_GROUP_NAME) +- CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_id" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_ID) +- CHECK_FUNCTIONWITHHEADER_EXISTS("OSSL_PROVIDER_load" "openssl/provider.h" HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD) +- CHECK_FUNCTIONWITHHEADER_EXISTS("TS_STATUS_INFO_get0_failure_info" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_FAILURE_INFO) +- CHECK_FUNCTIONWITHHEADER_EXISTS("TS_STATUS_INFO_get0_status" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_STATUS) +- CHECK_FUNCTIONWITHHEADER_EXISTS("TS_STATUS_INFO_get0_text" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_TEXT) +- CHECK_FUNCTIONWITHHEADER_EXISTS("TS_VERIFY_CTS_set_certs(0,0)" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTS_SET_CERTS) +- CHECK_FUNCTIONWITHHEADER_EXISTS("TS_VERIFY_CTX_set_data" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_DATA) +- CHECK_FUNCTIONWITHHEADER_EXISTS("TS_VERIFY_CTX_set_flags" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_FLAGS) +- CHECK_FUNCTIONWITHHEADER_EXISTS("TS_VERIFY_CTX_set_store" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_STORE) +- CHECK_FUNCTIONWITHHEADER_EXISTS("X509_get0_notAfter" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTAFTER) +- CHECK_FUNCTIONWITHHEADER_EXISTS("X509_get0_notBefore" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTBEFORE) ++ check_symbol_exists("ASN1_STRING_get0_data" "openssl/asn1.h" HAVE_OPENSSL_PROTOTYPE_ASN1_STRING_GET0_DATA) ++ check_symbol_exists("EVP_PKEY_get0_EC_KEY" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET0_EC_KEY) ++ check_symbol_exists("EVP_PKEY_get_group_name" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET_GROUP_NAME) ++ check_symbol_exists("EVP_PKEY_id" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_ID) ++ check_symbol_exists("OSSL_PROVIDER_load" "openssl/provider.h" HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD) ++ check_symbol_exists("TS_STATUS_INFO_get0_failure_info" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_FAILURE_INFO) ++ check_symbol_exists("TS_STATUS_INFO_get0_status" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_STATUS) ++ check_symbol_exists("TS_STATUS_INFO_get0_text" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_TEXT) ++ check_c_source_compiles("#include \nint main() {TS_VERIFY_CTS_set_certs(0,0); return 0;}" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTS_SET_CERTS) ++ check_symbol_exists("TS_VERIFY_CTX_set_data" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_DATA) ++ check_symbol_exists("TS_VERIFY_CTX_set_flags" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_FLAGS) ++ check_symbol_exists("TS_VERIFY_CTX_set_store" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_STORE) ++ check_symbol_exists("X509_get0_notAfter" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTAFTER) ++ check_symbol_exists("X509_get0_notBefore" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTBEFORE) + + # check if type EVP_MD_CTX is defined as typedef for "struct evp_md_ctx_st" (new) or "struct env_md_ctx_st" (old) +- CHECK_FUNCTIONWITHHEADER_EXISTS("struct evp_md_ctx_st *a; EVP_MD_CTX *b=a" "openssl/evp.h" HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX) ++ check_c_source_compiles("#include \nint main() {struct evp_md_ctx_st *a; EVP_MD_CTX *b=a; return 0;}" HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX) + + # check if the first parameter passed to X509_ALGOR_get0() should be "const ASN1_OBJECT **" (new) or "ASN1_OBJECT **" (old) +- CHECK_FUNCTIONWITHHEADER_EXISTS("const ASN1_OBJECT *a; X509_ALGOR_get0(&a,0,0,0)" "openssl/x509.h" HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM) ++ check_c_source_compiles("#include \nint main() {const ASN1_OBJECT *a; X509_ALGOR_get0(&a,0,0,0); return 0;}" HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM) + + # restore previous value of CMAKE_REQUIRED_LIBRARIES + set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_TEMP}) diff --git a/recipes/dcmtk/config.yml b/recipes/dcmtk/config.yml index 8e28175b23370..b11effedf16d6 100644 --- a/recipes/dcmtk/config.yml +++ b/recipes/dcmtk/config.yml @@ -1,3 +1,5 @@ versions: + "3.6.8": + folder: "all" "3.6.7": folder: "all" From 13bc0dd24c3b17194d7c90d939529e64896b47e6 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Mon, 4 Mar 2024 16:13:35 +0100 Subject: [PATCH 155/405] (#22835) Meta qt6 PR * qt: add QT_NO_DEBUG define in release build * fix condition for QT_NO_DEBUG define * Qt6: add d3d12 system lib on Windows Qt 6.6.0 added `d3d12` to the list of system libraries on Windows it links against: https://github.com/qt/qtbase/commit/84fb0de413ec574aab778d863c56e0d9a7f7ef6e#diff-2d8b127aed7a6123be24b80481b760ec4e9cc251e19d668d936dc09e87147a0e This is currently breaking the build in #18794. * Qt6: make d3d12 conditional on Qt version d3d12.dll was added with Windows 10. Don't want to potentially limit the range of supported OS versions unnecessarily. * Qt6: update all system dependency lists * Fix a typo * qt6: add tools macros fixes conan-io/conan-center-index#22530 * require explicitely gstreamer * bump deps * fix gstreamer consumption * fix cmake_find_mode of deps * Qt6: minor formatting fixes * qt 6.6.2 generated with: conan config install https://github.com/conan-io/conan-extensions.git conan cci:upgrade-qt-recipe 6.6.2 * fix patching * trigger CI without conflict Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries Co-authored-by: Alex Maystrenko Co-authored-by: Martin Valgur Co-authored-by: Uilian Ries --- recipes/qt/6.x.x/conandata.yml | 28 +++ recipes/qt/6.x.x/conanfile.py | 224 +++++++++++++----- recipes/qt/6.x.x/qtmodules6.6.2.conf | 338 +++++++++++++++++++++++++++ recipes/qt/config.yml | 2 + 4 files changed, 538 insertions(+), 54 deletions(-) create mode 100644 recipes/qt/6.x.x/qtmodules6.6.2.conf diff --git a/recipes/qt/6.x.x/conandata.yml b/recipes/qt/6.x.x/conandata.yml index 689f7e5a3e8eb..7d80016fb1b78 100644 --- a/recipes/qt/6.x.x/conandata.yml +++ b/recipes/qt/6.x.x/conandata.yml @@ -1,4 +1,26 @@ sources: + "6.6.2": + url: + - "https://download.qt.io/official_releases/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://download.qt.io/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://mirrors.20i.com/pub/qt.io/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://ftp.nluug.nl/languages/qt/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://mirror.netcologne.de/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://qt-mirror.dannhauer.de/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://ftp.fau.de/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://mirrors.dotsrc.org/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://qtproject.mirror.liquidtelecom.com/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://qt.mirror.constant.com/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://mirrors.sau.edu.cn/qt/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://mirrors.cloud.tencent.com/qt/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://mirrors.ustc.edu.cn/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + sha256: "3c1e42b3073ade1f7adbf06863c01e2c59521b7cc2349df2f74ecd7ebfcb922d" "6.6.1": url: - "https://download.qt.io/official_releases/qt/6.6/6.6.1/single/qt-everywhere-src-6.6.1.tar.xz" @@ -63,6 +85,12 @@ sources: - "https://mirrors.ustc.edu.cn/qtproject/archive/qt/6.3/6.3.2/single/qt-everywhere-src-6.3.2.tar.xz" sha256: "b90524f686224a0e5a945c1d65307e16a375348dbe275c9ac11de171fe31374a" patches: + "6.6.2": + - "base_path": "qtwebengine" + "patch_description": "Workaround for too long .rps file name" + "patch_file": "patches/c72097e_6.6.0.diff" + "patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" + "patch_type": "bugfix" "6.6.1": - "base_path": "qtwebengine" "patch_description": "Workaround for too long .rps file name" diff --git a/recipes/qt/6.x.x/conanfile.py b/recipes/qt/6.x.x/conanfile.py index e785559243ce4..2d1eda3fcc0bc 100644 --- a/recipes/qt/6.x.x/conanfile.py +++ b/recipes/qt/6.x.x/conanfile.py @@ -19,7 +19,7 @@ class QtConan(ConanFile): _submodules = ["qtsvg", "qtdeclarative", "qttools", "qttranslations", "qtdoc", - "qtwayland","qtquickcontrols2", "qtquicktimeline", "qtquick3d", "qtshadertools", "qt5compat", + "qtwayland", "qtquickcontrols2", "qtquicktimeline", "qtquick3d", "qtshadertools", "qt5compat", "qtactiveqt", "qtcharts", "qtdatavis3d", "qtlottie", "qtscxml", "qtvirtualkeyboard", "qt3d", "qtimageformats", "qtnetworkauth", "qtcoap", "qtmqtt", "qtopcua", "qtmultimedia", "qtlocation", "qtsensors", "qtconnectivity", "qtserialbus", @@ -151,7 +151,6 @@ def _get_module_tree(self): if config.has_option(section, "depends"): self._submodules_tree[modulename]["depends"] = [str(i) for i in config.get(section, "depends").split()] - return self._submodules_tree def export_sources(self): @@ -573,7 +572,7 @@ def generate(self): tc.variables["FEATURE_framework"] = "OFF" elif self.settings.os == "Android": tc.variables["CMAKE_ANDROID_NATIVE_API_LEVEL"] = self.settings.os.api_level - tc.variables["ANDROID_ABI"] = {"armv7": "armeabi-v7a", + tc.variables["ANDROID_ABI"] = {"armv7": "armeabi-v7a", "armv8": "arm64-v8a", "x86": "x86", "x86_64": "x86_64"}.get(str(self.settings.arch)) @@ -596,7 +595,7 @@ def generate(self): tc.variables["FEATURE_pkg_config"] = "ON" if self.settings.compiler == "gcc" and self.settings.build_type == "Debug" and not self.options.shared: - tc.variables["BUILD_WITH_PCH"]= "OFF" # disabling PCH to save disk space + tc.variables["BUILD_WITH_PCH"] = "OFF" # disabling PCH to save disk space if self.settings.os == "Windows": tc.variables["HOST_PERL"] = self.dependencies.build["strawberryperl"].conf_info.get("user.strawberryperl:perl", check_type=str) @@ -611,11 +610,11 @@ def generate(self): 14: "FEATURE_cxx14", 17: "FEATURE_cxx17", 20: "FEATURE_cxx20" - } + } if Version(self.version) >= "6.5.0": cpp_std_map[23] = "FEATURE_cxx2b" - for std,feature in cpp_std_map.items(): + for std, feature in cpp_std_map.items(): tc.variables[feature] = "ON" if int(current_cpp_std) >= std else "OFF" tc.variables["QT_USE_VCPKG"] = False @@ -670,7 +669,10 @@ def source(self): # use official variable name https://cmake.org/cmake/help/latest/module/FindFontconfig.html replace_in_file(self, os.path.join(self.source_folder, "qtbase", "src", "gui", "configure.cmake"), "FONTCONFIG_FOUND", "Fontconfig_FOUND") - replace_in_file(self, os.path.join(self.source_folder, "qtbase", "cmake", "QtAutoDetect.cmake") , "qt_auto_detect_vcpkg()", "# qt_auto_detect_vcpkg()") + replace_in_file(self, + os.path.join(self.source_folder, "qtbase", "cmake", "QtAutoDetect.cmake" if Version(self.version) < "6.6.2" else "QtAutoDetectHelpers.cmake"), + "qt_auto_detect_vcpkg()", + "# qt_auto_detect_vcpkg()") def _xplatform(self): if self.settings.os == "Linux": @@ -772,8 +774,8 @@ def _xplatform(self): def build(self): if self.settings.os == "Macos": - save(self, ".qmake.stash" , "") - save(self, ".qmake.super" , "") + save(self, ".qmake.stash", "") + save(self, ".qmake.super", "") cmake = CMake(self) cmake.configure() cmake.build() @@ -791,8 +793,8 @@ def _cmake_qt6_private_file(self, module): def package(self): if self.settings.os == "Macos": - save(self, ".qmake.stash" , "") - save(self, ".qmake.super" , "") + save(self, ".qmake.stash", "") + save(self, ".qmake.super", "") cmake = CMake(self) cmake.install() copy(self, "*LICENSE*", self.source_folder, os.path.join(self.package_folder, "licenses"), @@ -809,10 +811,15 @@ def package(self): os.remove(os.path.join(self.package_folder, "bin", "qt-cmake-private-install.cmake")) for m in os.listdir(os.path.join(self.package_folder, "lib", "cmake")): - module = os.path.join(self.package_folder, "lib", "cmake", m, f"{m}Macros.cmake") - helper_modules = glob.glob(os.path.join(self.package_folder, "lib", "cmake", m, "QtPublic*Helpers.cmake")) - if not os.path.isfile(module) and not helper_modules: - rmdir(self, os.path.join(self.package_folder, "lib", "cmake", m)) + if os.path.isfile(os.path.join(self.package_folder, "lib", "cmake", m, f"{m}Macros.cmake")): + continue + if glob.glob(os.path.join(self.package_folder, "lib", "cmake", m, "QtPublic*Helpers.cmake")): + continue + if m.endswith("Tools"): + if os.path.isfile(os.path.join(self.package_folder, "lib", "cmake", m, f"{m[:-5]}Macros.cmake")): + continue + + rmdir(self, os.path.join(self.package_folder, "lib", "cmake", m)) extension = "" if self.settings.os == "Windows": @@ -1012,6 +1019,8 @@ def _create_plugin(pluginname, libname, plugintype, requires): ] self.cpp_info.components["qtCore"].set_property("pkg_config_custom_content", "\n".join(pkg_config_vars)) + if self.settings.build_type != "Debug": + self.cpp_info.components['qtCore'].defines.append('QT_NO_DEBUG') if self.settings.os == "Windows": self.cpp_info.components["qtCore"].system_libs.append("authz") if is_msvc(self): @@ -1025,6 +1034,12 @@ def _create_plugin(pluginname, libname, plugintype, requires): self.cpp_info.components["qtPlatform"].includedirs = [os.path.join("res", "archdatadir", "mkspecs", self._xplatform())] if self.options.with_dbus: _create_module("DBus", ["dbus::dbus"]) + if self.settings.os == "Windows": + # https://github.com/qt/qtbase/blob/v6.6.1/src/dbus/CMakeLists.txt#L71-L77 + self.cpp_info.components["qtDBus"].system_libs.append("advapi32") + self.cpp_info.components["qtDBus"].system_libs.append("netapi32") + self.cpp_info.components["qtDBus"].system_libs.append("user32") + self.cpp_info.components["qtDBus"].system_libs.append("ws2_32") if self.options.gui: gui_reqs = [] if self.options.with_dbus: @@ -1059,27 +1074,69 @@ def _create_plugin(pluginname, libname, plugintype, requires): _add_build_module("qtGui", self._cmake_qt6_private_file("Gui")) if self.settings.os == "Windows": - self.cpp_info.components["qtGui"].system_libs = ["advapi32", "gdi32", "ole32", "shell32", "user32", "d3d11", - "dxgi", "dxguid", "d2d1", "dwrite", "d3d9", "setupapi", "SHCore"] + # https://github.com/qt/qtbase/blob/v6.6.1/src/gui/CMakeLists.txt#L419-L429 + self.cpp_info.components["qtGui"].system_libs += [ + "advapi32", "gdi32", "ole32", "shell32", "user32", "d3d11", "dxgi", "dxguid" + ] + # https://github.com/qt/qtbase/blob/v6.6.1/src/gui/CMakeLists.txt#L729 + self.cpp_info.components["qtGui"].system_libs.append("d2d1") + # https://github.com/qt/qtbase/blob/v6.6.1/src/gui/CMakeLists.txt#L732-L742 + self.cpp_info.components["qtGui"].system_libs.append("dwrite") + if self.settings.compiler == "gcc": + # https://github.com/qt/qtbase/blob/v6.6.1/src/gui/CMakeLists.txt#L746 + self.cpp_info.components["qtGui"].system_libs.append("uuid") + if Version(self.version) >= "6.6.0": + # https://github.com/qt/qtbase/blob/v6.6.0/src/gui/CMakeLists.txt#L428 + self.cpp_info.components["qtGui"].system_libs.append("d3d12") + if Version(self.version) >= "6.7.0": + # https://github.com/qt/qtbase/blob/v6.7.0-beta1/src/gui/CMakeLists.txt#L430 + self.cpp_info.components["qtGui"].system_libs.append("uxtheme") if self.settings.compiler == "gcc": self.cpp_info.components["qtGui"].system_libs.append("uuid") + # https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/direct2d/CMakeLists.txt#L60-L82 + self.cpp_info.components["qtGui"].system_libs += [ + "advapi32", "d2d1", "d3d11", "dwmapi", "dwrite", "dxgi", "dxguid", "gdi32", "imm32", "ole32", + "oleaut32", "setupapi", "shell32", "shlwapi", "user32", "version", "winmm", "winspool", + "wtsapi32", "shcore", "comdlg32", "d3d9", "runtimeobject" + ] _create_plugin("QWindowsIntegrationPlugin", "qwindows", "platforms", ["Core", "Gui"]) _create_plugin("QWindowsVistaStylePlugin", "qwindowsvistastyle", "styles", ["Core", "Gui"]) - self.cpp_info.components["qtQWindowsIntegrationPlugin"].system_libs = ["advapi32", "dwmapi", "gdi32", "imm32", - "ole32", "oleaut32", "shell32", "shlwapi", "user32", "winmm", "winspool", "wtsapi32"] + # https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/windows/CMakeLists.txt#L53-L69 + self.cpp_info.components["qtQWindowsIntegrationPlugin"].system_libs += [ + "advapi32", "dwmapi", "gdi32", "imm32", "ole32", "oleaut32", "setupapi", "shell32", "shlwapi", + "user32", "winmm", "winspool", "wtsapi32", "shcore", "comdlg32", "d3d9", "runtimeobject" + ] elif self.settings.os == "Android": _create_plugin("QAndroidIntegrationPlugin", "qtforandroid", "platforms", ["Core", "Gui"]) + # https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/android/CMakeLists.txt#L68-L70 self.cpp_info.components["qtQAndroidIntegrationPlugin"].system_libs = ["android", "jnigraphics"] - elif self.settings.os == "Macos": - _create_plugin("QCocoaIntegrationPlugin", "qcocoa", "platforms", ["Core", "Gui"]) - self.cpp_info.components["QCocoaIntegrationPlugin"].frameworks = ["AppKit", "Carbon", "CoreServices", "CoreVideo", - "IOKit", "IOSurface", "Metal", "QuartzCore"] - elif self.settings.os in ["iOS", "tvOS"]: - _create_plugin("QIOSIntegrationPlugin", "qios", "platforms", []) - self.cpp_info.components["QIOSIntegrationPlugin"].frameworks = ["AudioToolbox", "Foundation", "Metal", - "QuartzCore", "UIKit"] - elif self.settings.os == "watchOS": - _create_plugin("QMinimalIntegrationPlugin", "qminimal", "platforms", []) + elif is_apple_os(self): + # https://github.com/qt/qtbase/blob/v6.6.1/src/gui/CMakeLists.txt#L388-L394 + self.cpp_info.components["qtGui"].frameworks = ["CoreFoundation", "CoreGraphics", "CoreText", "Foundation", "ImageIO"] + if self.options.get_safe("opengl", "no") != "no": + # https://github.com/qt/qtbase/commit/2ed63e587eefb246dba9e69aa01fdb2abb2def13 + self.cpp_info.components["qtGui"].frameworks.append("AGL") + if self.settings.os == "Macos": + # https://github.com/qt/qtbase/blob/v6.6.1/src/gui/CMakeLists.txt#L362-L370 + self.cpp_info.components["qtGui"].frameworks += ["AppKit", "Carbon"] + _create_plugin("QCocoaIntegrationPlugin", "qcocoa", "platforms", ["Core", "Gui"]) + # https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/cocoa/CMakeLists.txt#L51-L58 + self.cpp_info.components["QCocoaIntegrationPlugin"].frameworks = [ + "AppKit", "Carbon", "CoreServices", "CoreVideo", "IOKit", "IOSurface", "Metal", "QuartzCore" + ] + elif self.settings.os in ["iOS", "tvOS"]: + _create_plugin("QIOSIntegrationPlugin", "qios", "platforms", []) + # https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/ios/CMakeLists.txt#L32-L37 + self.cpp_info.components["QIOSIntegrationPlugin"].frameworks = [ + "AudioToolbox", "Foundation", "Metal", "QuartzCore", "UIKit", "CoreGraphics" + ] + if self.settings.os != "tvOS": + # https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/ios/CMakeLists.txt#L66-L68 + self.cpp_info.components["QIOSIntegrationPlugin"].frameworks += [ + "AssetsLibrary", "UniformTypeIdentifiers", "Photos", + ] + elif self.settings.os == "watchOS": + _create_plugin("QMinimalIntegrationPlugin", "qminimal", "platforms", []) elif self.settings.os == "Emscripten": _create_plugin("QWasmIntegrationPlugin", "qwasm", "platforms", ["Core", "Gui"]) elif self.options.get_safe("with_x11", False): @@ -1101,8 +1158,11 @@ def _create_plugin(pluginname, libname, plugintype, requires): if self.options.with_pq: _create_plugin("QPSQLDriverPlugin", "qsqlpsql", "sqldrivers", ["libpq::libpq"]) if self.options.with_odbc: + _create_plugin("QODBCDriverPlugin", "qsqlodbc", "sqldrivers", []) if self.settings.os != "Windows": - _create_plugin("QODBCDriverPlugin", "qsqlodbc", "sqldrivers", ["odbc::odbc"]) + self.cpp_info.components["QODBCDriverPlugin"].requires.append("odbc::odbc") + else: + self.cpp_info.components["QODBCDriverPlugin"].system_libs.append("odbc32") networkReqs = [] if self.options.openssl: networkReqs.append("openssl::openssl") @@ -1116,6 +1176,11 @@ def _create_plugin(pluginname, libname, plugintype, requires): if self.options.widgets: _create_module("Widgets", ["Gui"]) _add_build_module("qtWidgets", self._cmake_qt6_private_file("Widgets")) + if self.settings.os == "Windows": + # https://github.com/qt/qtbase/blob/v6.6.1/src/widgets/CMakeLists.txt#L316-L321 + self.cpp_info.components["qtWidgets"].system_libs += [ + "dwmapi", "shell32", "uxtheme", + ] if self.options.gui and self.options.widgets: _create_module("PrintSupport", ["Gui", "Widgets"]) if self.options.get_safe("opengl", "no") != "no" and self.options.gui: @@ -1167,7 +1232,7 @@ def _create_plugin(pluginname, libname, plugintype, requires): _create_module("Quick3DRuntimeRender", ["Gui", "Quick", "Quick3DAssetImport", "Quick3DUtils", "ShaderTools"]) _create_module("Quick3D", ["Gui", "Qml", "Quick", "Quick3DRuntimeRender"]) - if (self.options.get_safe("qtquickcontrols2") or self.options.qtdeclarative ) and qt_quick_enabled: + if (self.options.get_safe("qtquickcontrols2") or self.options.qtdeclarative) and qt_quick_enabled: _create_module("QuickControls2", ["Gui", "Quick"]) _create_module("QuickTemplates2", ["Gui", "Quick"]) @@ -1357,28 +1422,72 @@ def _create_plugin(pluginname, libname, plugintype, requires): if not self.options.shared: if self.settings.os == "Windows": - self.cpp_info.components["qtCore"].system_libs.append("version") # qtcore requires "GetFileVersionInfoW" and "VerQueryValueW" which are in "Version.lib" library - self.cpp_info.components["qtCore"].system_libs.append("winmm") # qtcore requires "__imp_timeSetEvent" which is in "Winmm.lib" library - self.cpp_info.components["qtCore"].system_libs.append("netapi32") # qtcore requires "NetApiBufferFree" which is in "Netapi32.lib" library - self.cpp_info.components["qtCore"].system_libs.append("userenv") # qtcore requires "__imp_GetUserProfileDirectoryW " which is in "UserEnv.Lib" library - self.cpp_info.components["qtCore"].system_libs.append("ws2_32") # qtcore requires "WSAStartup " which is in "Ws2_32.Lib" library - self.cpp_info.components["qtNetwork"].system_libs.append("dnsapi") # qtnetwork from qtbase requires "DnsFree" which is in "Dnsapi.lib" library + # https://github.com/qt/qtbase/blob/v6.6.1/src/corelib/CMakeLists.txt#L527-L541 + self.cpp_info.components["qtCore"].system_libs.append("advapi32") + self.cpp_info.components["qtCore"].system_libs.append("authz") + self.cpp_info.components["qtCore"].system_libs.append("kernel32") + self.cpp_info.components["qtCore"].system_libs.append("netapi32") + self.cpp_info.components["qtCore"].system_libs.append("ole32") + self.cpp_info.components["qtCore"].system_libs.append("shell32") + self.cpp_info.components["qtCore"].system_libs.append("user32") + self.cpp_info.components["qtCore"].system_libs.append("uuid") + self.cpp_info.components["qtCore"].system_libs.append("version") + self.cpp_info.components["qtCore"].system_libs.append("winmm") + self.cpp_info.components["qtCore"].system_libs.append("ws2_32") + self.cpp_info.components["qtCore"].system_libs.append("mpr") + self.cpp_info.components["qtCore"].system_libs.append("userenv") + # https://github.com/qt/qtbase/blob/v6.6.1/src/network/CMakeLists.txt#L196-L200 + self.cpp_info.components["qtNetwork"].system_libs.append("advapi32") + self.cpp_info.components["qtNetwork"].system_libs.append("dnsapi") self.cpp_info.components["qtNetwork"].system_libs.append("iphlpapi") - self.cpp_info.components["qtNetwork"].system_libs.extend(["winhttp", "secur32"]) - + self.cpp_info.components["qtNetwork"].system_libs.append("secur32") + self.cpp_info.components["qtNetwork"].system_libs.append("winhttp") + # https://github.com/qt/qtbase/blob/v6.6.1/src/printsupport/CMakeLists.txt#L70-L75 + self.cpp_info.components["qtPrintSupport"].system_libs.append("gdi32") + self.cpp_info.components["qtPrintSupport"].system_libs.append("user32") + self.cpp_info.components["qtPrintSupport"].system_libs.append("comdlg32") + self.cpp_info.components["qtPrintSupport"].system_libs.append("winspool") - if self.settings.os == "Macos": - self.cpp_info.components["qtCore"].frameworks.append("IOKit") # qtcore requires "_IORegistryEntryCreateCFProperty", "_IOServiceGetMatchingService" and much more which are in "IOKit" framework - self.cpp_info.components["qtCore"].frameworks.append("Cocoa") # qtcore requires "_OBJC_CLASS_$_NSApplication" and more, which are in "Cocoa" framework - self.cpp_info.components["qtCore"].frameworks.append("Security") # qtcore requires "_SecRequirementCreateWithString" and more, which are in "Security" framework + if is_apple_os(self): + # https://github.com/qt/qtbase/blob/v6.6.1/src/corelib/CMakeLists.txt#L580-L584 + self.cpp_info.components["qtCore"].frameworks.append("CoreFoundation") + self.cpp_info.components["qtCore"].frameworks.append("Foundation") + self.cpp_info.components["qtCore"].frameworks.append("IOKit") + # https://github.com/qt/qtbase/blob/v6.6.1/src/network/CMakeLists.txt#L205-L214 + self.cpp_info.components["qtNetwork"].frameworks.append("CFNetwork") + # https://github.com/qt/qtbase/blob/v6.6.1/src/network/CMakeLists.txt#L216-L221 + # qtcore requires "_OBJC_CLASS_$_NSApplication" and more, which are in "Cocoa" framework + self.cpp_info.components["qtCore"].frameworks.append("Cocoa") self.cpp_info.components["qtNetwork"].system_libs.append("resolv") - self.cpp_info.components["qtNetwork"].frameworks.append("SystemConfiguration") if self.options.with_gssapi: + # https://github.com/qt/qtbase/blob/v6.6.1/src/network/CMakeLists.txt#L250C56-L253 self.cpp_info.components["qtNetwork"].frameworks.append("GSS") if self.options.gui and self.options.widgets: + # https://github.com/qt/qtbase/blob/v6.6.1/src/printsupport/CMakeLists.txt#L52-L63 self.cpp_info.components["qtPrintSupport"].system_libs.append("cups") + self.cpp_info.components["qtPrintSupport"].frameworks.append("ApplicationServices") + if self.settings.os == "Macos": + # https://github.com/qt/qtbase/blob/v6.6.1/src/corelib/CMakeLists.txt#L598-L606 + self.cpp_info.components["qtCore"].frameworks.append("AppKit") + self.cpp_info.components["qtCore"].frameworks.append("ApplicationServices") + self.cpp_info.components["qtCore"].frameworks.append("CoreServices") + self.cpp_info.components["qtCore"].frameworks.append("CoreServices") + self.cpp_info.components["qtCore"].frameworks.append("Security") + self.cpp_info.components["qtCore"].frameworks.append("DiskArbitration") + else: + # https://github.com/qt/qtbase/blob/v6.6.1/src/corelib/CMakeLists.txt#L969-L972 + self.cpp_info.components["qtCore"].frameworks.append("MobileCoreServices") + if self.settings.os not in ["iOS", "tvOS"]: + self.cpp_info.components["qtNetwork"].frameworks.append("CoreServices") + self.cpp_info.components["qtNetwork"].frameworks.append("SystemConfiguration") + else: + # https://github.com/qt/qtbase/blob/v6.6.1/src/corelib/CMakeLists.txt#L1074-L1077 + self.cpp_info.components["qtCore"].frameworks.append("UIKit") + if self.settings.os == "watchOS": + # https://github.com/qt/qtbase/blob/v6.6.1/src/corelib/CMakeLists.txt#L1079-L1082 + self.cpp_info.components["qtCore"].frameworks.append("WatchKit") - self.cpp_info.components["qtCore"].builddirs.append(os.path.join("res","archdatadir","bin")) + self.cpp_info.components["qtCore"].builddirs.append(os.path.join("res", "archdatadir", "bin")) _add_build_module("qtCore", self._cmake_executables_file) _add_build_module("qtCore", self._cmake_qt6_private_file("Core")) if self.settings.os in ["Windows", "iOS"]: @@ -1389,17 +1498,24 @@ def _create_plugin(pluginname, libname, plugintype, requires): if component_name == "qt": component_name = "qtCore" - module = os.path.join("lib", "cmake", m, f"{m}Macros.cmake") - if os.path.isfile(module): - _add_build_module(component_name, module) + if component_name in self.cpp_info.components: + module = os.path.join("lib", "cmake", m, f"{m}Macros.cmake") + if os.path.isfile(module): + _add_build_module(component_name, module) + + module = os.path.join("lib", "cmake", m, f"{m}ConfigExtras.cmake") + if os.path.isfile(module): + _add_build_module(component_name, module) - module = os.path.join("lib", "cmake", m, f"{m}ConfigExtras.cmake") - if os.path.isfile(module): - _add_build_module(component_name, module) + for helper_modules in glob.glob(os.path.join(self.package_folder, "lib", "cmake", m, "QtPublic*Helpers.cmake")): + _add_build_module(component_name, helper_modules) + self.cpp_info.components[component_name].builddirs.append(os.path.join("lib", "cmake", m)) - for helper_modules in glob.glob(os.path.join(self.package_folder, "lib", "cmake", m, "QtPublic*Helpers.cmake")): - _add_build_module(component_name, helper_modules) - self.cpp_info.components[component_name].builddirs.append(os.path.join("lib", "cmake", m)) + elif component_name.endswith("Tools") and component_name[:-5] in self.cpp_info.components: + module = os.path.join("lib", "cmake", f"{m}", f"{m[:-5]}Macros.cmake") + if os.path.isfile(module): + _add_build_module(component_name[:-5], module) + self.cpp_info.components[component_name[:-5]].builddirs.append(os.path.join("lib", "cmake", m)) objects_dirs = glob.glob(os.path.join(self.package_folder, "lib", "objects-*/")) for object_dir in objects_dirs: diff --git a/recipes/qt/6.x.x/qtmodules6.6.2.conf b/recipes/qt/6.x.x/qtmodules6.6.2.conf new file mode 100644 index 0000000000000..1ad0f474e5053 --- /dev/null +++ b/recipes/qt/6.x.x/qtmodules6.6.2.conf @@ -0,0 +1,338 @@ +[submodule "qtbase"] + path = qtbase + url = ../qtbase.git + branch = 6.6.2 + status = essential +[submodule "qtsvg"] + depends = qtbase + path = qtsvg + url = ../qtsvg.git + branch = 6.6.2 + status = addon +[submodule "qtdeclarative"] + depends = qtbase + recommends = qtimageformats qtshadertools qtsvg qtlanguageserver + path = qtdeclarative + url = ../qtdeclarative.git + branch = 6.6.2 + status = essential +[submodule "qtactiveqt"] + depends = qtbase + path = qtactiveqt + url = ../qtactiveqt.git + branch = 6.6.2 + status = addon +[submodule "qtmultimedia"] + depends = qtbase qtshadertools + recommends = qtdeclarative qtquick3d + path = qtmultimedia + url = ../qtmultimedia.git + branch = 6.6.2 + status = addon +[submodule "qttools"] + depends = qtbase + recommends = qtdeclarative qtactiveqt + path = qttools + url = ../qttools.git + branch = 6.6.2 + status = essential +[submodule "qtxmlpatterns"] + depends = qtbase + recommends = qtdeclarative + path = qtxmlpatterns + url = ../qtxmlpatterns.git + branch = dev + status = ignore +[submodule "qttranslations"] + depends = qttools + path = qttranslations + url = ../qttranslations.git + branch = 6.6.2 + status = essential + priority = 30 +[submodule "qtdoc"] + depends = qtdeclarative qttools + recommends = qtmultimedia qtshadertools qtwebengine + path = qtdoc + url = ../qtdoc.git + branch = 6.6.2 + status = essential + priority = 40 +[submodule "qtrepotools"] + path = qtrepotools + url = ../qtrepotools.git + branch = master + status = essential + project = - +[submodule "qtqa"] + depends = qtbase + path = qtqa + url = ../qtqa.git + branch = dev + status = essential + priority = 50 +[submodule "qtlocation"] + depends = qtbase qtpositioning + recommends = qtdeclarative + path = qtlocation + url = ../qtlocation.git + branch = 6.6.2 + status = preview +[submodule "qtpositioning"] + depends = qtbase + recommends = qtdeclarative qtserialport + path = qtpositioning + url = ../qtpositioning.git + branch = 6.6.2 + status = addon +[submodule "qtsensors"] + depends = qtbase + recommends = qtdeclarative + path = qtsensors + url = ../qtsensors.git + branch = 6.6.2 + status = addon +[submodule "qtsystems"] + depends = qtbase + recommends = qtdeclarative + path = qtsystems + url = ../qtsystems.git + branch = dev + status = ignore +[submodule "qtfeedback"] + depends = qtdeclarative + recommends = qtmultimedia + path = qtfeedback + url = ../qtfeedback.git + branch = master + status = ignore +[submodule "qtpim"] + depends = qtdeclarative + path = qtpim + url = ../qtpim.git + branch = dev + status = ignore +[submodule "qtconnectivity"] + depends = qtbase + recommends = qtdeclarative + path = qtconnectivity + url = ../qtconnectivity.git + branch = 6.6.2 + status = addon +[submodule "qtwayland"] + depends = qtbase + recommends = qtdeclarative + path = qtwayland + url = ../qtwayland.git + branch = 6.6.2 + status = addon +[submodule "qt3d"] + depends = qtbase + recommends = qtdeclarative qtshadertools qtmultimedia + path = qt3d + url = ../qt3d.git + branch = 6.6.2 + status = addon +[submodule "qtimageformats"] + depends = qtbase + path = qtimageformats + url = ../qtimageformats.git + branch = 6.6.2 + status = addon +[submodule "qtserialbus"] + depends = qtbase + recommends = qtserialport + path = qtserialbus + url = ../qtserialbus.git + branch = 6.6.2 + status = addon +[submodule "qtserialport"] + depends = qtbase + path = qtserialport + url = ../qtserialport.git + branch = 6.6.2 + status = addon +[submodule "qtwebsockets"] + depends = qtbase + recommends = qtdeclarative + path = qtwebsockets + url = ../qtwebsockets.git + branch = 6.6.2 + status = addon +[submodule "qtwebchannel"] + depends = qtbase + recommends = qtdeclarative qtwebsockets + path = qtwebchannel + url = ../qtwebchannel.git + branch = 6.6.2 + status = addon +[submodule "qtwebengine"] + depends = qtdeclarative + recommends = qtwebchannel qttools qtpositioning + path = qtwebengine + url = ../qtwebengine.git + branch = 6.6.2 + status = addon + priority = 10 +[submodule "qtcanvas3d"] + depends = qtdeclarative + path = qtcanvas3d + url = ../qtcanvas3d.git + branch = dev + status = ignore +[submodule "qtwebview"] + depends = qtdeclarative + recommends = qtwebengine + path = qtwebview + url = ../qtwebview.git + branch = 6.6.2 + status = addon +[submodule "qtcharts"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtcharts + url = ../qtcharts.git + branch = 6.6.2 + status = addon +[submodule "qtdatavis3d"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtdatavis3d + url = ../qtdatavis3d.git + branch = 6.6.2 + status = addon +[submodule "qtvirtualkeyboard"] + depends = qtbase qtdeclarative qtsvg + recommends = qtmultimedia + path = qtvirtualkeyboard + url = ../qtvirtualkeyboard.git + branch = 6.6.2 + status = addon +[submodule "qtgamepad"] + depends = qtbase + recommends = qtdeclarative + path = qtgamepad + url = ../qtgamepad.git + branch = dev + status = ignore +[submodule "qtscxml"] + depends = qtbase qtdeclarative + path = qtscxml + url = ../qtscxml.git + branch = 6.6.2 + status = addon +[submodule "qtspeech"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtspeech + url = ../qtspeech.git + branch = 6.6.2 + status = addon +[submodule "qtnetworkauth"] + depends = qtbase + path = qtnetworkauth + url = ../qtnetworkauth.git + branch = 6.6.2 + status = addon +[submodule "qtremoteobjects"] + depends = qtbase + recommends = qtdeclarative + path = qtremoteobjects + url = ../qtremoteobjects.git + branch = 6.6.2 + status = addon +[submodule "qtwebglplugin"] + depends = qtbase qtwebsockets + recommends = qtdeclarative + path = qtwebglplugin + url = ../qtwebglplugin.git + branch = dev + status = ignore +[submodule "qtlottie"] + depends = qtbase qtdeclarative + path = qtlottie + url = ../qtlottie.git + branch = 6.6.2 + status = addon +[submodule "qtquicktimeline"] + depends = qtbase qtdeclarative + path = qtquicktimeline + url = ../qtquicktimeline + branch = 6.6.2 + status = addon +[submodule "qtquick3d"] + depends = qtbase qtdeclarative qtshadertools + recommends = qtquicktimeline + path = qtquick3d + url = ../qtquick3d.git + branch = 6.6.2 + status = addon +[submodule "qtshadertools"] + depends = qtbase + path = qtshadertools + url = ../qtshadertools.git + branch = 6.6.2 + status = addon +[submodule "qt5compat"] + depends = qtbase qtdeclarative + path = qt5compat + url = ../qt5compat.git + branch = 6.6.2 + status = deprecated +[submodule "qtcoap"] + depends = qtbase + path = qtcoap + url = ../qtcoap.git + branch = 6.6.2 + status = addon +[submodule "qtmqtt"] + depends = qtbase qtdeclarative + path = qtmqtt + url = ../qtmqtt.git + branch = 6.6.2 + status = addon +[submodule "qtopcua"] + depends = qtbase qtdeclarative + path = qtopcua + url = ../qtopcua.git + branch = 6.6.2 + status = addon +[submodule "qtlanguageserver"] + depends = qtbase + path = qtlanguageserver + url = ../qtlanguageserver.git + branch = 6.6.2 + status = preview +[submodule "qthttpserver"] + depends = qtbase + recommends = qtwebsockets + path = qthttpserver + url = ../qthttpserver.git + branch = 6.6.2 + status = preview +[submodule "qtquick3dphysics"] + depends = qtbase qtdeclarative qtquick3d qtshadertools + path = qtquick3dphysics + url = ../qtquick3dphysics.git + branch = 6.6.2 + status = addon +[submodule "qtgrpc"] + depends = qtbase + recommends = qtdeclarative + path = qtgrpc + url = ../qtgrpc.git + branch = 6.6.2 + status = preview +[submodule "qtquickeffectmaker"] + depends = qtbase qtdeclarative qtshadertools + recommends = qtquick3d + path = qtquickeffectmaker + url = ../qtquickeffectmaker.git + branch = 6.6.2 + status = addon +[submodule "qtgraphs"] + depends = qtbase qtdeclarative qtquick3d + path = qtgraphs + url = ../qtgraphs.git + branch = 6.6.2 + status = preview diff --git a/recipes/qt/config.yml b/recipes/qt/config.yml index 0a1aaa3dcf0ce..a0204ce95e6fc 100644 --- a/recipes/qt/config.yml +++ b/recipes/qt/config.yml @@ -1,4 +1,6 @@ versions: + "6.6.2": + folder: 6.x.x "6.6.1": folder: 6.x.x "6.6.0": From 9de3a9005adc3993a1116f28d6a0eb256426ef12 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Mon, 4 Mar 2024 16:48:06 +0100 Subject: [PATCH 156/405] (#22422) [sentry-native] Default backend + versions cleaning * [sentry-native] Add 0.6.6 / Remove 0.6.3 and 0.4.18 * Remove SENTRY_CRASHPAD_SYSTEM definition for sentry-native >= 0.7.0 * Add upstream repository pull request * Make crashpad the default backend on Linux from 0.7.0 * Improve transport option logic * Increase the C++ standard to 17 for crashpad backend * Use C++17 instead of C++14 in test package * Use minimum GCC version 7 for crashpad backend too * Respect upstream CMakelists.txt backend selection * Always use C++17 --- recipes/sentry-native/all/conandata.yml | 9 ++---- recipes/sentry-native/all/conanfile.py | 32 ++++++------------- .../all/test_package/CMakeLists.txt | 2 +- recipes/sentry-native/config.yml | 6 ++-- 4 files changed, 16 insertions(+), 33 deletions(-) diff --git a/recipes/sentry-native/all/conandata.yml b/recipes/sentry-native/all/conandata.yml index 3ae97887a0695..6bde257712f1a 100644 --- a/recipes/sentry-native/all/conandata.yml +++ b/recipes/sentry-native/all/conandata.yml @@ -2,21 +2,18 @@ sources: "0.7.0": url: "https://github.com/getsentry/sentry-native/releases/download/0.7.0/sentry-native.zip" sha256: "4dfccc879a81771b9da1c335947ffc9e5987ca3d16b3035efa2c66a06f727543" + "0.6.6": + url: "https://github.com/getsentry/sentry-native/releases/download/0.6.6/sentry-native.zip" + sha256: "7a98467c0b2571380a3afc5e681cb13aa406a709529be12d74610b0015ccde0c" "0.6.5": url: "https://github.com/getsentry/sentry-native/releases/download/0.6.5/sentry-native.zip" sha256: "5f74a5c5c3abc6e1e7825d3306be9e3b3fd4e0f586f3cf7e86607d6f56a71995" "0.6.4": url: "https://github.com/getsentry/sentry-native/releases/download/0.6.4/sentry-native.zip" sha256: "e00278bf9a4821bb4008985a5a552a84aba6ebb06d3f9e828082fcbf06b04a38" - "0.6.3": - url: "https://github.com/getsentry/sentry-native/releases/download/0.6.3/sentry-native.zip" - sha256: "6b515c17a9b860ea47c6a5fd7abdfdc89b4b8cbc654c23a8bb42a39bfcb87ad9" "0.5.4": url: "https://github.com/getsentry/sentry-native/releases/download/0.5.4/sentry-native.zip" sha256: "e151bdc76894eb964ba4637361b2a96b7447fb04212053cf695fd7f72b636e4d" - "0.4.18": - url: "https://github.com/getsentry/sentry-native/releases/download/0.4.18/sentry-native.zip" - sha256: "41fdf6499cd8576142beb03104badcc9e0b80b8ef27080ca71cd4408cc1d7ece" patches: "0.6.5": diff --git a/recipes/sentry-native/all/conanfile.py b/recipes/sentry-native/all/conanfile.py index 8964b109c4ad8..f783754fae680 100644 --- a/recipes/sentry-native/all/conanfile.py +++ b/recipes/sentry-native/all/conanfile.py @@ -51,16 +51,12 @@ class SentryNativeConan(ConanFile): @property def _min_cppstd(self): - if is_msvc(self): - return "17" - if self.options.get_safe("backend") == "breakpad" and Version(self.version) >= "0.5.4": - return 17 - return "14" + return "17" @property def _minimum_compilers_version(self): minimum_gcc_version = "5" - if self.options.get_safe("backend") == "breakpad": + if self.options.get_safe("backend") == "breakpad" or self.options.get_safe("backend") == "crashpad": minimum_gcc_version = "7" return { "Visual Studio": "15", @@ -82,22 +78,17 @@ def config_options(self): # Configure default transport if self.settings.os == "Windows": + self.options.backend = "crashpad" self.options.transport = "winhttp" - elif self.settings.os in ("FreeBSD", "Linux") or self.settings.os == "Macos": # Don't use tools.is_apple_os(os) here - self.options.transport = "curl" - else: + elif self.settings.os == "Android": self.options.transport = "none" # Configure default backend - if self.settings.os == "Windows" or self.settings.os == "Macos": # Don't use tools.is_apple_os(os) here - # FIXME: for self.version < 0.4: default backend is "breakpad" when building with MSVC for Windows xp; else: backend=none + # See https://github.com/getsentry/sentry-native/pull/927 + if self.settings.os == "Macos": self.options.backend = "crashpad" - elif self.settings.os in ("FreeBSD", "Linux"): - self.options.backend = "breakpad" - elif self.settings.os == "Android": - self.options.backend = "inproc" - else: - self.options.backend = "inproc" + if self.settings.os in ("FreeBSD", "Linux"): + self.options.backend = "breakpad" if Version(self.version) < "0.7.0" else "crashpad" if self.settings.os not in ("Linux", "Android") or self.options.backend != "crashpad" or self.options.with_crashpad != "sentry": del self.options.crashpad_with_tls @@ -120,8 +111,6 @@ def requirements(self): self.requires("crashpad/cci.20220219") else: self.requires("zlib/[>=1.2.11 <2]") - if self.settings.os in ("Linux", "FreeBSD"): - self.requires("libcurl/[>=7.78.0 <9]") if self.options.get_safe("crashpad_with_tls"): self.requires("openssl/[>=1.1 <4]") elif self.options.backend == "breakpad": @@ -156,7 +145,8 @@ def generate(self): VirtualBuildEnv(self).generate() tc = CMakeToolchain(self) tc.variables["SENTRY_BACKEND"] = self.options.backend - if self.options.backend == "crashpad": + # See https://github.com/getsentry/sentry-native/pull/928 + if Version(self.version) < "0.7.0" and self.options.backend == "crashpad": tc.variables["SENTRY_CRASHPAD_SYSTEM"] = self.options.with_crashpad == "google" if self.options.backend == "breakpad": tc.variables["SENTRY_BREAKPAD_SYSTEM"] = self.options.with_breakpad == "google" @@ -248,8 +238,6 @@ def package_info(self): self.cpp_info.components["crashpad_util"].requires = ["crashpad_compat", "crashpad_mini_chromium", "zlib::zlib"] if self.settings.os in ("Linux", "FreeBSD"): self.cpp_info.components["crashpad_util"].system_libs.extend(["pthread", "rt"]) - # Requires libcurl https://github.com/getsentry/crashpad/blob/2237d97ee2c38c930c07001e660be57324f69a37/util/CMakeLists.txt#L256 - self.cpp_info.components["crashpad_util"].requires.extend(["libcurl::libcurl"]) elif self.settings.os == "Windows": self.cpp_info.components["crashpad_util"].system_libs.append("winhttp") elif self.settings.os == "Macos": diff --git a/recipes/sentry-native/all/test_package/CMakeLists.txt b/recipes/sentry-native/all/test_package/CMakeLists.txt index 8b84ac464d998..37f553d142dc1 100644 --- a/recipes/sentry-native/all/test_package/CMakeLists.txt +++ b/recipes/sentry-native/all/test_package/CMakeLists.txt @@ -5,4 +5,4 @@ find_package(sentry REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE sentry::sentry) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/sentry-native/config.yml b/recipes/sentry-native/config.yml index 367c1c0c7563c..456ef7af835a5 100644 --- a/recipes/sentry-native/config.yml +++ b/recipes/sentry-native/config.yml @@ -1,13 +1,11 @@ versions: "0.7.0": folder: all + "0.6.6": + folder: all "0.6.5": folder: all "0.6.4": folder: all - "0.6.3": - folder: all "0.5.4": folder: all - "0.4.18": - folder: all From 78ab0ec47a6268829f584dcf9eb17d5c8c7d56e8 Mon Sep 17 00:00:00 2001 From: Sergey Bobrenok Date: Mon, 4 Mar 2024 19:10:51 +0300 Subject: [PATCH 157/405] (#22954) gperf/all: Fix build on FreeBSD The original error was: gperf/3.1: RUN: make -j1 cd lib; make all cc -m64 -O3 -DNDEBUG -I. -c ./getopt.c cc -m64 -O3 -DNDEBUG -I. -c ./getopt1.c c++ -stdlib=libc++ -std=gnu++17 -m64 -O3 -DNDEBUG -I. -c ./getline.cc c++ -stdlib=libc++ -std=gnu++17 -m64 -O3 -DNDEBUG -I. -c ./hash.cc rm -f libgp.a ar rc libgp.a getopt.o getopt1.o getline.o hash.o ranlib libgp.a cd src; make all cd: src: No such file or directory *** [all] Error code 2 --- recipes/gperf/all/conanfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/gperf/all/conanfile.py b/recipes/gperf/all/conanfile.py index 6527eca9695ee..0ed1afdf40204 100644 --- a/recipes/gperf/all/conanfile.py +++ b/recipes/gperf/all/conanfile.py @@ -39,6 +39,10 @@ def build_requirements(self): if not self.conf.get("tools.microsoft.bash:path", check_type=str): self.tool_requires("msys2/cci.latest") + # gperf makefile relies on GNU Make behaviour + if self._settings_build.os == "FreeBSD": + self.tool_requires("make/4.4.1") + def source(self): get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) From 4c128c2c053544f79643a54d511212e635c8fbe9 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 5 Mar 2024 01:28:35 +0900 Subject: [PATCH 158/405] (#22955) catch2: add version 3.5.3 --- recipes/catch2/3.x.x/conandata.yml | 3 +++ recipes/catch2/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/catch2/3.x.x/conandata.yml b/recipes/catch2/3.x.x/conandata.yml index 56cd441c7c786..cf3bf5f0495f5 100644 --- a/recipes/catch2/3.x.x/conandata.yml +++ b/recipes/catch2/3.x.x/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.5.3": + url: "https://github.com/catchorg/Catch2/archive/v3.5.3.tar.gz" + sha256: "8d723b0535c94860ef8cf6231580fa47d67a3416757ecb10639e40d748ab6c71" "3.5.2": url: "https://github.com/catchorg/Catch2/archive/v3.5.2.tar.gz" sha256: "269543a49eb76f40b3f93ff231d4c24c27a7e16c90e47d2e45bcc564de470c6e" diff --git a/recipes/catch2/config.yml b/recipes/catch2/config.yml index 20b1c62d0349a..b24c301a17e49 100644 --- a/recipes/catch2/config.yml +++ b/recipes/catch2/config.yml @@ -1,4 +1,6 @@ versions: + "3.5.3": + folder: 3.x.x "3.5.2": folder: 3.x.x "3.5.1": From 5087642bd038e688d23b91f12db19aadd542d6c8 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 5 Mar 2024 01:48:40 +0900 Subject: [PATCH 159/405] (#22963) expat: add version 2.6.1 --- recipes/expat/all/conandata.yml | 3 +++ recipes/expat/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/expat/all/conandata.yml b/recipes/expat/all/conandata.yml index 50ac4905f740e..e8f35976ab73d 100644 --- a/recipes/expat/all/conandata.yml +++ b/recipes/expat/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.6.1": + url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_1/expat-2.6.1.tar.xz" + sha256: "0c00d2760ad12efef6e26efc8b363c8eb28eb8c8de719e46d5bb67b40ba904a3" "2.6.0": url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_0/expat-2.6.0.tar.xz" sha256: "cb5f5a8ea211e1cabd59be0a933a52e3c02cc326e86a4d387d8d218e7ee47a3e" diff --git a/recipes/expat/config.yml b/recipes/expat/config.yml index 548e19d13502f..b9184b42c3bb5 100644 --- a/recipes/expat/config.yml +++ b/recipes/expat/config.yml @@ -1,4 +1,6 @@ versions: + "2.6.1": + folder: all "2.6.0": folder: all "2.5.0": From 46f9f2f710fb57ba68deb7b5e44705907bd815ef Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 5 Mar 2024 02:09:20 +0900 Subject: [PATCH 160/405] (#22964) nng: add version 1.7.3 --- recipes/nng/all/conandata.yml | 3 +++ recipes/nng/all/conanfile.py | 6 ++++++ recipes/nng/config.yml | 2 ++ 3 files changed, 11 insertions(+) diff --git a/recipes/nng/all/conandata.yml b/recipes/nng/all/conandata.yml index a0f5356224bc7..c572a0578b71b 100644 --- a/recipes/nng/all/conandata.yml +++ b/recipes/nng/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.7.3": + url: "https://github.com/nanomsg/nng/archive/refs/tags/v1.7.3.tar.gz" + sha256: "035f2c3cad4e45fc0d978c54a338c197d1937527ae6feb82180d428a96b83474" "1.7.2": url: "https://github.com/nanomsg/nng/archive/refs/tags/v1.7.2.tar.gz" sha256: "40e6af7bdd5d02ee98ba8fe5fd5c149ce3e5a555f202cdc837e3ead2d7cc7534" diff --git a/recipes/nng/all/conanfile.py b/recipes/nng/all/conanfile.py index 3de52cd9ed251..91bc43507421d 100644 --- a/recipes/nng/all/conanfile.py +++ b/recipes/nng/all/conanfile.py @@ -27,6 +27,7 @@ class NngConan(ConanFile): "max_expire_threads": ["ANY"], "max_poller_threads": ["ANY"], "compat": [True, False], + "with_ipv6": [True, False], } default_options = { "shared": False, @@ -38,6 +39,7 @@ class NngConan(ConanFile): "max_expire_threads": "8", "max_poller_threads": "8", "compat": True, + "with_ipv6": True, } def export_sources(self): @@ -52,6 +54,8 @@ def config_options(self): del self.options.max_poller_threads if Version(self.version) < "1.7.2": del self.options.compat + if Version(self.version) < "1.7.3": + del self.options.with_ipv6 def configure(self): if self.options.shared: @@ -102,6 +106,8 @@ def generate(self): tc.variables["NNG_MAX_POLLER_THREADS"] = self.options.max_poller_threads if "compat" in self.options: tc.variables["NNG_ENABLE_COMPAT"] = self.options.compat + if "with_ipv6" in self.options: + tc.variables["NNG_ENABLE_IPV6"] = self.options.with_ipv6 tc.generate() def build(self): diff --git a/recipes/nng/config.yml b/recipes/nng/config.yml index 5c118cf597a33..b2f902db3e414 100644 --- a/recipes/nng/config.yml +++ b/recipes/nng/config.yml @@ -1,4 +1,6 @@ versions: + "1.7.3": + folder: all "1.7.2": folder: all "1.7.1": From b81b43f811be25257bfcc1452badf9650257fda1 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 5 Mar 2024 02:50:17 +0900 Subject: [PATCH 161/405] (#22965) crcpp: add recipe --- recipes/crcpp/all/conandata.yml | 4 ++ recipes/crcpp/all/conanfile.py | 51 +++++++++++++++++++ recipes/crcpp/all/test_package/CMakeLists.txt | 8 +++ recipes/crcpp/all/test_package/conanfile.py | 26 ++++++++++ .../crcpp/all/test_package/test_package.cpp | 14 +++++ recipes/crcpp/config.yml | 3 ++ 6 files changed, 106 insertions(+) create mode 100644 recipes/crcpp/all/conandata.yml create mode 100644 recipes/crcpp/all/conanfile.py create mode 100644 recipes/crcpp/all/test_package/CMakeLists.txt create mode 100644 recipes/crcpp/all/test_package/conanfile.py create mode 100644 recipes/crcpp/all/test_package/test_package.cpp create mode 100644 recipes/crcpp/config.yml diff --git a/recipes/crcpp/all/conandata.yml b/recipes/crcpp/all/conandata.yml new file mode 100644 index 0000000000000..f414dda91410c --- /dev/null +++ b/recipes/crcpp/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.2.0.0": + url: "https://github.com/d-bahr/CRCpp/archive/refs/tags/release-1.2.0.0.tar.gz" + sha256: "382d399b939207d81537a874ec4b05abc7f59772be58425a0dd048711d43db14" diff --git a/recipes/crcpp/all/conanfile.py b/recipes/crcpp/all/conanfile.py new file mode 100644 index 0000000000000..3315a073a6447 --- /dev/null +++ b/recipes/crcpp/all/conanfile.py @@ -0,0 +1,51 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +import os + + +required_conan_version = ">=1.52.0" + + +class CRCPPConan(ConanFile): + name = "crcpp" + description = "Easy to use and fast C++ CRC library." + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/d-bahr/CRCpp/" + topics = ("crc", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 11 + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.h", + os.path.join(self.source_folder, "inc"), + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + # Folders not used for header-only + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/crcpp/all/test_package/CMakeLists.txt b/recipes/crcpp/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..365caf83cf9bb --- /dev/null +++ b/recipes/crcpp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(crcpp REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE crcpp::crcpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/crcpp/all/test_package/conanfile.py b/recipes/crcpp/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/crcpp/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/crcpp/all/test_package/test_package.cpp b/recipes/crcpp/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..4546a70d708c2 --- /dev/null +++ b/recipes/crcpp/all/test_package/test_package.cpp @@ -0,0 +1,14 @@ +#include +#include +#include "CRC.h" + + +int main(void) { + const char myString[] = { 'H', 'E', 'L', 'L', 'O', ' ', 'W', 'O', 'R', 'L', 'D' }; + + std::uint32_t crc = CRC::Calculate(myString, sizeof(myString), CRC::CRC_32()); + + std::cout << std::hex << crc; + + return 0; +} diff --git a/recipes/crcpp/config.yml b/recipes/crcpp/config.yml new file mode 100644 index 0000000000000..f3be59d8c2e85 --- /dev/null +++ b/recipes/crcpp/config.yml @@ -0,0 +1,3 @@ +versions: + "1.2.0.0": + folder: all From 202d8e2e9d042f010ea50c7eb2c65eced4cd18e4 Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Mon, 4 Mar 2024 19:09:30 +0100 Subject: [PATCH 162/405] (#22966) OpenImageIO: Add version 2.5.9.0 --- recipes/openimageio/all/conandata.yml | 7 + .../all/patches/2.5.9.0-cmake-targets.patch | 518 ++++++++++++++++++ recipes/openimageio/config.yml | 2 + 3 files changed, 527 insertions(+) create mode 100644 recipes/openimageio/all/patches/2.5.9.0-cmake-targets.patch diff --git a/recipes/openimageio/all/conandata.yml b/recipes/openimageio/all/conandata.yml index 9ae019a09b59e..67601ed04452c 100644 --- a/recipes/openimageio/all/conandata.yml +++ b/recipes/openimageio/all/conandata.yml @@ -8,6 +8,9 @@ sources: "2.5.6.0": url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.6.0.tar.gz" sha256: "bcfced40a25ef8576383b44d8bbe3732aa2b8efc7b8614482783d6f90378d307" + "2.5.9.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.9.0.tar.gz" + sha256: "b6a68e369bc475525eb843bdc0cb8adc910cc71000825f8db9b5e136166cdc78" patches: "2.4.7.1": - patch_file: "patches/2.4.7.1-cmake-targets.patch" @@ -24,3 +27,7 @@ patches: - patch_file: "patches/2.5.6.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.9.0": + - patch_file: "patches/2.5.9.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/patches/2.5.9.0-cmake-targets.patch b/recipes/openimageio/all/patches/2.5.9.0-cmake-targets.patch new file mode 100644 index 0000000000000..747b79bc8b544 --- /dev/null +++ b/recipes/openimageio/all/patches/2.5.9.0-cmake-targets.patch @@ -0,0 +1,518 @@ +diff --git CMakeLists.txt CMakeLists.txt +index 8125716a3..dd83c588f 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 3f73cd266..d03c906d1 100644 +--- src/cmake/externalpackages.cmake ++++ src/cmake/externalpackages.cmake +@@ -45,14 +45,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 () +@@ -108,9 +108,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 () +@@ -137,11 +137,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 +@@ -157,7 +161,7 @@ else () + endif() + + # From pythonutils.cmake +-find_python() ++#find_python() + if (USE_PYTHON) + checked_find_package (pybind11 REQUIRED VERSION_MIN 2.4.2) + endif () +@@ -167,110 +171,105 @@ 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.7 +- RECOMMEND_MIN_REASON "for AVIF 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 (OpeVDB_FOUND 0) +-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) ++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) +@@ -294,13 +293,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") +@@ -318,7 +317,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 () +@@ -337,7 +336,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 +@@ -372,7 +371,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 7bec09739..3db17086f 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 cd903dbdc9549..95116bd79b886 100644 --- a/recipes/openimageio/config.yml +++ b/recipes/openimageio/config.yml @@ -5,3 +5,5 @@ versions: folder: all "2.5.6.0": folder: all + "2.5.9.0": + folder: all From 4662ebbdeba0348dffb6e7580dd4d2d1af3c6467 Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Mon, 4 Mar 2024 23:09:42 +0100 Subject: [PATCH 163/405] (#22916) Add OpenColorIO version 2.3.2 --- recipes/opencolorio/all/conandata.yml | 7 +++++++ recipes/opencolorio/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/opencolorio/all/conandata.yml b/recipes/opencolorio/all/conandata.yml index b92cedca0d55d..840a3b9147df2 100644 --- a/recipes/opencolorio/all/conandata.yml +++ b/recipes/opencolorio/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.3.2": + url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v2.3.2.tar.gz" + sha256: "6bbf4e7fa4ea2f743a238cb22aff44890425771a2f57f62cece1574e46ceec2f" "2.3.1": url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v2.3.1.tar.gz" sha256: "7196e979a0449ce28afd46a78383476f3b8fc1cc1d3a417192be439ede83437b" @@ -15,6 +18,10 @@ sources: url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v1.1.1.tar.gz" sha256: "c9b5b9def907e1dafb29e37336b702fff22cc6306d445a13b1621b8a754c14c8" patches: + "2.3.2": + - patch_file: "patches/2.3.1-0001-fix-cmake-source-dir-and-targets.patch" + patch_description: "use cci package, use PROJECT_BINARY_DIR/PROJECT_SOURCE_DIR" + patch_type: "conan" "2.3.1": - patch_file: "patches/2.3.1-0001-fix-cmake-source-dir-and-targets.patch" patch_description: "use cci package, use PROJECT_BINARY_DIR/PROJECT_SOURCE_DIR" diff --git a/recipes/opencolorio/config.yml b/recipes/opencolorio/config.yml index dc936cbaf95e1..fdcf6dcec8972 100644 --- a/recipes/opencolorio/config.yml +++ b/recipes/opencolorio/config.yml @@ -1,4 +1,6 @@ versions: + "2.3.2": + folder: "all" "2.3.1": folder: "all" "2.3.0": From 9963f7bba712c919ea36355b81fe5638f36c86a1 Mon Sep 17 00:00:00 2001 From: Johannes Wolf <519002+johannes-wolf@users.noreply.github.com> Date: Tue, 5 Mar 2024 00:28:37 +0100 Subject: [PATCH 164/405] (#22842) simfil: add version 0.1.1 * simfil: add version 0.1.0 * simfil: add version 0.1.0 * simfil: Check per compiler version for c++concepts * simfil: Fix validate error message * simfil: Fix validate error message * simfil: Apply PR review changes Co-authored-by: Uilian Ries * Update conanfile.py * Update recipes/simfil/all/conanfile.py Co-authored-by: Uilian Ries --------- Co-authored-by: Uilian Ries --- recipes/simfil/all/conandata.yml | 4 + recipes/simfil/all/conanfile.py | 103 ++++++++++++++++++ .../simfil/all/test_package/CMakeLists.txt | 8 ++ recipes/simfil/all/test_package/conanfile.py | 26 +++++ .../simfil/all/test_package/src/example.cpp | 8 ++ recipes/simfil/config.yml | 3 + 6 files changed, 152 insertions(+) create mode 100644 recipes/simfil/all/conandata.yml create mode 100644 recipes/simfil/all/conanfile.py create mode 100644 recipes/simfil/all/test_package/CMakeLists.txt create mode 100644 recipes/simfil/all/test_package/conanfile.py create mode 100644 recipes/simfil/all/test_package/src/example.cpp create mode 100644 recipes/simfil/config.yml diff --git a/recipes/simfil/all/conandata.yml b/recipes/simfil/all/conandata.yml new file mode 100644 index 0000000000000..f6fc491607eb0 --- /dev/null +++ b/recipes/simfil/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.1.1": + url: "https://github.com/Klebert-Engineering/simfil/archive/refs/tags/v0.1.1.tar.gz" + sha256: "e82a9d92ec65b7e27776d5507c78571cecc234f2b6fcdacc7ffcece6198f7f9a" diff --git a/recipes/simfil/all/conanfile.py b/recipes/simfil/all/conanfile.py new file mode 100644 index 0000000000000..7f51c69a00ce9 --- /dev/null +++ b/recipes/simfil/all/conanfile.py @@ -0,0 +1,103 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout +from conan.tools.files import copy, get +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration +import os + + +required_conan_version = ">=1.53.0" + + +class SimfilRecipe(ConanFile): + name = "simfil" + description = "simfil is a C++ 17 library and a language for querying structured map feature data. The library provides an efficient in-memory storage pool for map data, optimized for the simfil query language, along with a query interpreter to query the actual data." + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/Klebert-Engineering/simfil" + license = "BSD-3-Clause" + topics = ["query-language", "json", "data-model"] + + # Binary configuration + settings = "os", "compiler", "build_type", "arch" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_json": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_json": True, + } + + @property + def _minimum_compilers_version(self): + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "10", + "clang": "10", + "apple-clang": "14", + } + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def validate(self): + check_min_cppstd(self, 20) + + min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) + if not min_version: + self.output.warning(f"{self.name} recipe lacks information about the {self.settings.compiler} compiler support.") + else: + if Version(self.settings.compiler.version) < min_version: + raise ConanInvalidConfiguration( + f"{self.name} requires Concepts support. The current compiler {self.settings.compiler} {self.settings.compiler.version} does not support it.") + + def build_requirements(self): + self.tool_requires("cmake/[>3.19 <4]") + + def requirements(self): + self.requires("sfl/1.2.4", transitive_headers=True) + 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") + + def config_options(self): + if self.settings.os == "Windows": + del self.options.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.cache_variables["SIMFIL_CONAN"] = True + tc.cache_variables["SIMFIL_SHARED"] = self.options.get_safe("shared") + tc.cache_variables["SIMFIL_WITH_REPL"] = False + tc.cache_variables["SIMFIL_WITH_COVERAGE"] = False + tc.cache_variables["SIMFIL_WITH_TESTS"] = False + tc.cache_variables["SIMFIL_WITH_EXAMPLES"] = False + tc.cache_variables["SIMFIL_WITH_MODEL_JSON"] = self.options.with_json + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + cmake = CMake(self) + cmake.install() + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + + def package_info(self): + self.cpp_info.libs = ["simfil"] diff --git a/recipes/simfil/all/test_package/CMakeLists.txt b/recipes/simfil/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..33e4104ed085d --- /dev/null +++ b/recipes/simfil/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(PackageTest CXX) + +find_package(simfil CONFIG REQUIRED) + +add_executable(test_package src/example.cpp) +target_link_libraries(test_package simfil::simfil) +target_compile_features(test_package PRIVATE cxx_std_20) diff --git a/recipes/simfil/all/test_package/conanfile.py b/recipes/simfil/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0c831359c3d24 --- /dev/null +++ b/recipes/simfil/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +import os + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake + +class SimfilTestPackageConanFile(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/simfil/all/test_package/src/example.cpp b/recipes/simfil/all/test_package/src/example.cpp new file mode 100644 index 0000000000000..e263d12871d8b --- /dev/null +++ b/recipes/simfil/all/test_package/src/example.cpp @@ -0,0 +1,8 @@ +#include "simfil/value.h" + +int main() { + auto value = simfil::Value::make((int64_t)123); + (void)value; + + return 0; +} diff --git a/recipes/simfil/config.yml b/recipes/simfil/config.yml new file mode 100644 index 0000000000000..b893ff21f7c23 --- /dev/null +++ b/recipes/simfil/config.yml @@ -0,0 +1,3 @@ +versions: + "0.1.1": + folder: all From 61a276dbaee2eb6ca0b0ae266e9f693e0f2f04e4 Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Tue, 5 Mar 2024 00:02:53 +0000 Subject: [PATCH 165/405] (#22971) Qt6 check if we are on C3I CI --- recipes/qt/6.x.x/conanfile.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes/qt/6.x.x/conanfile.py b/recipes/qt/6.x.x/conanfile.py index 2d1eda3fcc0bc..02d45875b2ac6 100644 --- a/recipes/qt/6.x.x/conanfile.py +++ b/recipes/qt/6.x.x/conanfile.py @@ -235,11 +235,10 @@ def _enablemodule(mod): setattr(self.options, module, False) def validate(self): - if os.getenv('NOT_ON_C3I', '0') == '0': + 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 \ self.info.settings.compiler == "clang" and Version(self.info.settings.compiler.version) >= "12": - raise ConanInvalidConfiguration("qt is not supported on gcc11 and clang >= 12 on C3I until conan-io/conan-center-index#13472 is fixed\n"\ - "If your distro is modern enough (xcb >= 1.12), set environment variable NOT_ON_C3I=1") + raise ConanInvalidConfiguration("qt is not supported on gcc11 and clang >= 12 on C3I until conan-io/conan-center-index#13472 is fixed") # C++ minimum standard required if self.settings.compiler.get_safe("cppstd"): From 650b3ef8bbec00a581b930d9680524366bdb8f2a Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 5 Mar 2024 10:02:19 +0100 Subject: [PATCH 166/405] (#22978) [config] Remove Conan v2 migration check as mandatory Signed-off-by: Uilian Ries --- .c3i/config_v1.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.c3i/config_v1.yml b/.c3i/config_v1.yml index ae8f0a7b717cf..a7779831e1660 100644 --- a/.c3i/config_v1.yml +++ b/.c3i/config_v1.yml @@ -38,7 +38,6 @@ tasks: # * status_checks refers to notifications coming from external tools (Jenkins, CLA,...) check_runs: - name: "Lint changed files (YAML files)" - - name: "Lint changed conanfile.py (v2 migration)" status_checks: - name: "license/cla" - name: "continuous-integration/jenkins/pr-merge" From 4685e1e7b29c86b091a2aba2e4b3031431f107dc Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 5 Mar 2024 18:24:07 +0900 Subject: [PATCH 167/405] (#20442) chunkio: add recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chunkio: add recipe * add package_type, export all symbols, link shlwapi * disable PIC, support relocatable shared lib on macOS * revert disable PIC * disable pic on static build * Update recipes/chunkio/all/conanfile.py * Update recipes/chunkio/all/conanfile.py * Update recipes/chunkio/all/conanfile.py Co-authored-by: Martin Valgur --------- Co-authored-by: Francisco Ramírez Co-authored-by: Martin Valgur --- recipes/chunkio/all/conandata.yml | 16 +++++ recipes/chunkio/all/conanfile.py | 72 +++++++++++++++++++ .../patches/1.1.6-0001-add-installer.patch | 65 +++++++++++++++++ .../patches/1.1.6-0002-fix-wrong-target.patch | 14 ++++ .../all/patches/1.1.6-0003-disable-pic.patch | 15 ++++ .../chunkio/all/test_package/CMakeLists.txt | 7 ++ recipes/chunkio/all/test_package/conanfile.py | 25 +++++++ .../chunkio/all/test_package/test_package.c | 20 ++++++ recipes/chunkio/config.yml | 3 + 9 files changed, 237 insertions(+) create mode 100644 recipes/chunkio/all/conandata.yml create mode 100644 recipes/chunkio/all/conanfile.py create mode 100644 recipes/chunkio/all/patches/1.1.6-0001-add-installer.patch create mode 100644 recipes/chunkio/all/patches/1.1.6-0002-fix-wrong-target.patch create mode 100644 recipes/chunkio/all/patches/1.1.6-0003-disable-pic.patch create mode 100644 recipes/chunkio/all/test_package/CMakeLists.txt create mode 100644 recipes/chunkio/all/test_package/conanfile.py create mode 100644 recipes/chunkio/all/test_package/test_package.c create mode 100644 recipes/chunkio/config.yml diff --git a/recipes/chunkio/all/conandata.yml b/recipes/chunkio/all/conandata.yml new file mode 100644 index 0000000000000..0ec309fb48a89 --- /dev/null +++ b/recipes/chunkio/all/conandata.yml @@ -0,0 +1,16 @@ +sources: + "1.1.6": + url: "https://github.com/edsiper/chunkio/archive/refs/tags/v1.1.6.tar.gz" + sha256: "755dda0b8ccf6f5ff804b2c1a3caa938bae7b0f37d73afa12c1bf1fab4fd4c86" +patches: + "1.1.6": + - patch_file: "patches/1.1.6-0001-add-installer.patch" + patch_description: "add installer" + patch_type: "conan" + - patch_file: "patches/1.1.6-0002-fix-wrong-target.patch" + patch_description: "fix wrong target" + patch_type: "bugfix" + patch_source: "https://github.com/fluent/chunkio/issues/104" + - patch_file: "patches/1.1.6-0003-disable-pic.patch" + patch_description: "disable pic on static build" + patch_type: "portability" diff --git a/recipes/chunkio/all/conanfile.py b/recipes/chunkio/all/conanfile.py new file mode 100644 index 0000000000000..a32c30c04b01b --- /dev/null +++ b/recipes/chunkio/all/conanfile.py @@ -0,0 +1,72 @@ +from conan import ConanFile +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +import os + +required_conan_version = ">=1.53.0" + +class ChunkIOConan(ConanFile): + name = "chunkio" + description = "Simple library to manage chunks of data in memory and file system" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/edsiper/chunkio" + topics = ("chunk", "io", "memory", "file") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_filesystem": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_filesystem": True, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.variables["CIO_LIB_STATIC"] = not self.options.shared + tc.variables["CIO_LIB_SHARED"] = self.options.shared + tc.variables["CIO_BACKEND_FILESYSTEM"] = self.options.with_filesystem + # Relocatable shared libs on macOS + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["chunkio-shared"] if self.options.shared else ["chunkio-static", "cio-crc32"] + if self.settings.os == "Windows": + self.cpp_info.system_libs.append("shlwapi") diff --git a/recipes/chunkio/all/patches/1.1.6-0001-add-installer.patch b/recipes/chunkio/all/patches/1.1.6-0001-add-installer.patch new file mode 100644 index 0000000000000..52a5dd664faf7 --- /dev/null +++ b/recipes/chunkio/all/patches/1.1.6-0001-add-installer.patch @@ -0,0 +1,65 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e6d5dcb..ebf3c4c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -109,10 +109,15 @@ include_directories( + + add_subdirectory(deps/crc32) + add_subdirectory(src) +-add_subdirectory(tools) ++#add_subdirectory(tools) + + # Tests + if(CIO_TESTS) + enable_testing() + add_subdirectory(tests) + endif() ++ ++include(GNUInstallDirs) ++ ++install(DIRECTORY include/chunkio DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++install(DIRECTORY deps/monkey/include/monkey DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +diff --git a/deps/crc32/CMakeLists.txt b/deps/crc32/CMakeLists.txt +index 8ae1823..0b7dba0 100644 +--- a/deps/crc32/CMakeLists.txt ++++ b/deps/crc32/CMakeLists.txt +@@ -3,3 +3,12 @@ set(src + ) + + add_library(cio-crc32 STATIC ${src}) ++ ++if(CIO_LIB_STATIC) ++ include(GNUInstallDirs) ++ install( ++ TARGETS cio-crc32 ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ) ++endif() +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index a4fc2d3..51736bc 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -50,3 +50,22 @@ endif() + if (NOT CIO_LIB_STATIC AND NOT CIO_LIB_SHARED) + message(FATAL_ERROR "What are you doing?, you should build something") + endif() ++ ++include(GNUInstallDirs) ++ ++if(CIO_LIB_STATIC) ++ install( ++ TARGETS chunkio-static ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ) ++endif() ++ ++if(CIO_LIB_SHARED) ++ install( ++ TARGETS chunkio-shared ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ) ++endif() diff --git a/recipes/chunkio/all/patches/1.1.6-0002-fix-wrong-target.patch b/recipes/chunkio/all/patches/1.1.6-0002-fix-wrong-target.patch new file mode 100644 index 0000000000000..3b36da5f199b1 --- /dev/null +++ b/recipes/chunkio/all/patches/1.1.6-0002-fix-wrong-target.patch @@ -0,0 +1,14 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index a4fc2d3..51736bc 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -41,7 +41,7 @@ endif() + + if (CIO_LIB_SHARED) + add_library(chunkio-shared SHARED ${src}) +- target_link_libraries(chunkio-static ${libs}) ++ target_link_libraries(chunkio-shared ${libs}) + if(CIO_SANITIZE_ADDRESS) + add_sanitizers(chunkio-shared) + endif() + diff --git a/recipes/chunkio/all/patches/1.1.6-0003-disable-pic.patch b/recipes/chunkio/all/patches/1.1.6-0003-disable-pic.patch new file mode 100644 index 0000000000000..02733d0726a39 --- /dev/null +++ b/recipes/chunkio/all/patches/1.1.6-0003-disable-pic.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ebf3c4c..2db2794 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,7 +7,9 @@ set(CIO_VERSION_PATCH 6) + set(CIO_VERSION_STR "${CIO_VERSION_MAJOR}.${CIO_VERSION_MINOR}.${CIO_VERSION_PATCH}") + + # CFLAGS +-set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++if(BUILD_SHARED_LIBS) ++ set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++endif() + if(MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 ") + else() diff --git a/recipes/chunkio/all/test_package/CMakeLists.txt b/recipes/chunkio/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..145508da160d2 --- /dev/null +++ b/recipes/chunkio/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(chunkio REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE chunkio::chunkio) diff --git a/recipes/chunkio/all/test_package/conanfile.py b/recipes/chunkio/all/test_package/conanfile.py new file mode 100644 index 0000000000000..f5cf204295e19 --- /dev/null +++ b/recipes/chunkio/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/chunkio/all/test_package/test_package.c b/recipes/chunkio/all/test_package/test_package.c new file mode 100644 index 0000000000000..1c8100c442be2 --- /dev/null +++ b/recipes/chunkio/all/test_package/test_package.c @@ -0,0 +1,20 @@ +#include "chunkio/chunkio.h" +#include + +static int log_cb(struct cio_ctx *ctx, int level, const char *file, int line, + char *str) +{ + (void) ctx; + + printf("[cio-test-fs] %-60s => %s:%i\n", str, file, line); + return 0; +} + +int main() { + int flags = CIO_CHECKSUM; + struct cio_ctx *ctx = cio_create(NULL, log_cb, CIO_LOG_INFO, flags); + + cio_destroy(ctx); + + return 0; +} diff --git a/recipes/chunkio/config.yml b/recipes/chunkio/config.yml new file mode 100644 index 0000000000000..98af2724bf2b9 --- /dev/null +++ b/recipes/chunkio/config.yml @@ -0,0 +1,3 @@ +versions: + "1.1.6": + folder: "all" From 5018851920669e1a02aef8347be752dbc48e4590 Mon Sep 17 00:00:00 2001 From: Roberto Turrado Camblor Date: Tue, 5 Mar 2024 10:46:26 +0100 Subject: [PATCH 168/405] (#22286) Add `tree-gen` recipe. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * coin-lemon: fixed C++17 and C++20 compilation warnings. * coin-lemon: renamed fix_cpp_20_compilation_warnings.patch to fix_cpp_20_compilation_errors.patch, and updated conandata.yml as suggested in the pull request review. * coin-lemon: updated patch to fix gcc 5 compilation (gcc 5 doesn't allow to use 'using' type aliases). * coin-lemon: fix conandata.yml (by removing an extra blank line). * coin-lemon: fixed C++20 compilation errors for path.h too. * coin-lemon: added patch_source lines to conandata.yml. * Adding a recipe for libqasm at Conan Center. * Trying to fix some Linter errors. * Trying to fix a remaining Linter error. * Revert "coin-lemon: added patch_source lines to conandata.yml." This reverts commit a94d7b1fe8cb38927eab847915cc2113710bde1d. * Revert "coin-lemon: fixed C++20 compilation errors for path.h too." This reverts commit 05fbdb86f066e2b5133c62906d09763dc2ebb135. * Revert "coin-lemon: fix conandata.yml (by removing an extra blank line)." This reverts commit 788b028529483d4057a3e405637bb7c866003467. * Revert "coin-lemon: updated patch to fix gcc 5 compilation (gcc 5 doesn't allow to use 'using' type aliases)." This reverts commit 73c92948992214360669d191aa5916c20f5ed57c. * Revert "coin-lemon: renamed fix_cpp_20_compilation_warnings.patch to fix_cpp_20_compilation_errors.patch, and updated conandata.yml as suggested in the pull request review." This reverts commit 6e1cafee0c7986e10e971ce449183ed29c984529. * Revert "coin-lemon: fixed C++17 and C++20 compilation warnings." This reverts commit 22fc69581904592e0b7a8a0eebc33e2dc6d731cd. * Initial commit. * Rename FuncgenConan to FuncGenConan. Remove actual files, and add golden files. * Remove libqasm recipe. * Require Conan>=2.0. * Initial commit. * This recipe is now in the same state as the func-gen recipe. We build tree-gen, and test the tree-gen executable. I've temporarily removed the test of the tree-gen library. There are a couple of problems with it: - First, '*inc' files are not found during compilation. - If we install these '*inc' files, then linkage fails. I think we shouldn't be installing '*inc' files. It looks like we're not creating the tree-gen library correctly. * Change source method to get sources from conandata.yml. Require Conan version >= 1.53.0. Fix package version at config.yml. * Revert "Change source method to get sources from conandata.yml." This reverts commit 7ce68f23ebf8c77f9d7bde1e956e139309b31ef2. * Require Conan version >= 1.53.0. Update to tree-gen version 1.0.1. Update source method to get sources from conandata.yml. Update test_tree_gen_executable method. * Remove func-gen recipe from this branch. * Remove commented out code from test_package/conanfile.py. * Remove share option. * Fix all/test_package/conanfile.py. * Change print calls to self.output.error. * Change package_test to use tree-gen in the expected way. - generate_tree_py should exercise the tree-gen executable. - Then example links against the tree-gen library. - Add all/test_package/CMakeLists.txt. - Implement example.cpp. Reorganize folder structure: - Move golden files to res. - Expect actual files to be written out to output. TODO: conan create all/conanfile.py --version 1.0.1 cannot find tree-gen package. * Change all/test_package/conanfile.py to look like conan-center-index/docs/package_templates/cmake_package/all/test_package/conanfile.py. Require tree-gen instead of tool_requiring it. TODO: Is this correct? tree-gen should be both tool_required (tree-gen executable) and required (tree-gen library). Make cmakee/generate_tree.cmake available to the clients by using cmake_build_modules in package_info. * Both tool_require and require tree-gen. * Trying to fix KB-H013-DEFAULT-PACKAGE-LAYOUT Conan hook error. * Trying to fix KB-H013-DEFAULT-PACKAGE-LAYOUT Conan hook error. * Apply changes from @RubenRBS code review. * Temporarily changing test_requires back to tool_requires. * Change test_package to a very simple version that just compiles. But doesn't run tree-gen executable. And doesn't compile tree-gen executable output files. * Change tool_requires(gtest) back again to test_requires. Even if this breaks a Linter. Add "lib/cmake" to cpp_info.builddirs. * Remove comments again from test_package. Even if that breaks again the recipe. * Apply most of the changes from uilianries PR. Except that we don't use patches. tree-gen 1.0.3 modifies the generate functions by accepting the path to the tree-gen executable as the first parameter. That allows us to find the tree-gen executable in all/test_package/CMakeLists.txt. Other changes: - all/conanfile.py: do not tool_require flex and bison when building for wasm architecture. * Remove references to tree-gen 1.0.1. * Change apple-clang compiler minimum version to 14. There may be a problem with apple-clang 13.0 and range-v3. * Trying to fix Windows/shared compilations. * Trying to fix Windows/shared compilations. * Trying to fix Windows/shared compilations. tree-gen 1.0.4 should export tree-gen-lib correctly. * Removing copy of hpp and inc files from source folder to package folder. Those files should be installed by tree-gen's CMakeLists.txt. * Remove unused rmdir imported from conan.tools.files. * Trying to use flex/bison Conan packages for armv8 and wasm. * Change apple-clang compiler minimum version back to 13. * Trying to fix apple-clang 13 compilation. * Change apple-clang compiler minimum version back to 14. There seems to be a bug in the Conan CI system when generating ARM binaries. Update to tree-gen version 1.0.6. --------- Co-authored-by: Rubén Rincón Blanco --- recipes/tree-gen/all/conandata.yml | 4 + recipes/tree-gen/all/conanfile.py | 108 ++++++++++++++++++ .../tree-gen/all/test_package/CMakeLists.txt | 28 +++++ .../tree-gen/all/test_package/conanfile.py | 30 +++++ .../all/test_package/res/directory.tree | 74 ++++++++++++ .../all/test_package/src/primitives.hpp | 90 +++++++++++++++ .../all/test_package/src/test_package.cpp | 18 +++ .../tree-gen/all/test_package/src/utils.hpp | 20 ++++ recipes/tree-gen/config.yml | 3 + 9 files changed, 375 insertions(+) create mode 100644 recipes/tree-gen/all/conandata.yml create mode 100644 recipes/tree-gen/all/conanfile.py create mode 100644 recipes/tree-gen/all/test_package/CMakeLists.txt create mode 100644 recipes/tree-gen/all/test_package/conanfile.py create mode 100644 recipes/tree-gen/all/test_package/res/directory.tree create mode 100644 recipes/tree-gen/all/test_package/src/primitives.hpp create mode 100644 recipes/tree-gen/all/test_package/src/test_package.cpp create mode 100644 recipes/tree-gen/all/test_package/src/utils.hpp create mode 100644 recipes/tree-gen/config.yml diff --git a/recipes/tree-gen/all/conandata.yml b/recipes/tree-gen/all/conandata.yml new file mode 100644 index 0000000000000..21ee5b5699adc --- /dev/null +++ b/recipes/tree-gen/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.6": + url: "https://github.com/QuTech-Delft/tree-gen/archive/refs/tags/1.0.6.tar.gz" + sha256: "a7f6617830b3817b21cddc0f4442a04c10fbb89a19cabb1bbd0e8facb040cba8" diff --git a/recipes/tree-gen/all/conanfile.py b/recipes/tree-gen/all/conanfile.py new file mode 100644 index 0000000000000..e2afb05918b37 --- /dev/null +++ b/recipes/tree-gen/all/conanfile.py @@ -0,0 +1,108 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" + + +class TreeGenConan(ConanFile): + name = "tree-gen" + license = "Apache-2.0" + homepage = "https://github.com/QuTech-Delft/tree-gen" + url = "https://github.com/conan-io/conan-center-index" + description = "C++ and Python code generator for tree-like structures common in parser and compiler codebases." + topics = ("code generation", "tree", "parser", "compiler") + settings = "os", "compiler", "build_type", "arch" + package_type = "library" + options = { + "shared": [True, False], + "fPIC": [True, False] + } + default_options = { + "shared": False, + "fPIC": True + } + + @property + def _should_build_test(self): + return not self.conf.get("tools.build:skip_test", default=True, check_type=bool) + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "7", + "apple-clang": "14", + "Visual Studio": "16", + "msvc": "192" + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def build_requirements(self): + if self._should_build_test: + self.test_requires("gtest/1.14.0") + self.tool_requires("m4/1.4.19") + if self.settings.os == "Windows": + self.tool_requires("winflexbison/2.5.24") + else: + self.tool_requires("flex/2.6.4") + self.tool_requires("bison/3.8.2") + + 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 requirements(self): + self.requires("fmt/10.2.1", transitive_headers=True) + self.requires("range-v3/0.12.0", transitive_headers=True) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + deps = CMakeDeps(self) + deps.generate() + tc = CMakeToolchain(self) + tc.variables["TREE_GEN_BUILD_TESTS"] = self._should_build_test + tc.generate() + env = VirtualBuildEnv(self) + env.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "generate_tree.cmake", src=os.path.join(self.source_folder, "cmake"), dst=os.path.join(self.package_folder, "lib", "cmake")) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["tree-gen"] + self.cpp_info.builddirs.append(os.path.join("lib", "cmake")) + self.cpp_info.set_property("cmake_build_modules", [os.path.join("lib", "cmake", "generate_tree.cmake")]) diff --git a/recipes/tree-gen/all/test_package/CMakeLists.txt b/recipes/tree-gen/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..1da53d12a62a1 --- /dev/null +++ b/recipes/tree-gen/all/test_package/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 3.12) + +project(PackageTest CXX) + +find_package(tree-gen REQUIRED CONFIG) + +find_program(TREE_GEN_EXECUTABLE tree-gen REQUIRED) + +# Generate the directory classes. +generate_tree_py( + "${TREE_GEN_EXECUTABLE}" + "${CMAKE_CURRENT_SOURCE_DIR}/res/directory.tree" + "${CMAKE_CURRENT_BINARY_DIR}/directory.hpp" + "${CMAKE_CURRENT_BINARY_DIR}/directory.cpp" + "${CMAKE_CURRENT_BINARY_DIR}/directory.py" +) + +add_executable(test_package + "${CMAKE_CURRENT_SOURCE_DIR}/src/test_package.cpp" + "${CMAKE_CURRENT_BINARY_DIR}/directory.cpp" +) + +target_include_directories(test_package + PRIVATE "${CMAKE_CURRENT_BINARY_DIR}" + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src" +) +target_compile_features(test_package PRIVATE cxx_std_17) +target_link_libraries(test_package PRIVATE tree-gen::tree-gen) diff --git a/recipes/tree-gen/all/test_package/conanfile.py b/recipes/tree-gen/all/test_package/conanfile.py new file mode 100644 index 0000000000000..d9214e3d91722 --- /dev/null +++ b/recipes/tree-gen/all/test_package/conanfile.py @@ -0,0 +1,30 @@ +import os + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv", "VirtualRunEnv" + test_type = "explicit" + + def build_requirements(self): + self.tool_requires(self.tested_reference_str) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def layout(self): + cmake_layout(self) + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/tree-gen/all/test_package/res/directory.tree b/recipes/tree-gen/all/test_package/res/directory.tree new file mode 100644 index 0000000000000..ef78a5d0d0d14 --- /dev/null +++ b/recipes/tree-gen/all/test_package/res/directory.tree @@ -0,0 +1,74 @@ +// Attach \file docstrings to the generated files for Doxygen. +# Implementation for classes representing a Windows directory tree. +source + +# Header for classes representing a Windows directory tree. +header + +// Include tree base classes. +include "tree-base.hpp" +tree_namespace tree::base + +// Include primitive types. +include "primitives.hpp" +import primitives + +// Initialization function to use to construct default values for the tree base +// classes and primitives. +initialize_function primitives::initialize +serdes_functions primitives::serialize primitives::deserialize + +// Set the namespace for the generated classes and attach a docstring. +# Namespace for classes representing a Windows directory tree. +namespace directory + +# Root node, containing the drives and associated directory trees. +system { + + # The drives available on the system. There must be at least one. + drives: Many; + +} + +# Represents a drive. +drive { + + # The drive letter used to identify it. + letter: primitives::Letter; + + # Root directory. + root_dir: One; + +} + +# Represents a directory entry. +entry { + + # Name of the directory entry. + name: primitives::String; + + # Represents a regular file. + file { + + # The file contents. + contents: primitives::String; + + } + + # Represents a (sub)directory. + directory { + + # The directory contents. Note that directories can be empty. + entries: Any; + + } + + # Represents a link to another directory. + mount { + + # The directory linked to. + target: Link; + + } + +} diff --git a/recipes/tree-gen/all/test_package/src/primitives.hpp b/recipes/tree-gen/all/test_package/src/primitives.hpp new file mode 100644 index 0000000000000..e4b04b69ada62 --- /dev/null +++ b/recipes/tree-gen/all/test_package/src/primitives.hpp @@ -0,0 +1,90 @@ +/** \file + * Defines primitives used in the generated directory tree structure. + */ + +#pragma once + +#include + +/** + * Namespace with primitives used in the generated directory tree structure. + */ +namespace primitives { + +/** + * Letter primitive, used to represent drive letters. + */ +using Letter = char; + +/** + * Strings, used to represent filenames and file contents. + */ +using String = std::string; + +/** + * Initialization function. This must be specialized for any types used as + * primitives in a tree that are actual C primitives (int, char, bool, etc), + * as these are not initialized by the T() construct. + */ +template +T initialize() { return T(); }; + +/** + * Declare the default initializer for drive letters. It's declared inline + * to avoid having to make a cpp file just for this. + */ +template <> +inline Letter initialize() { + return 'A'; +} + +/** + * Serialization function. This must be specialized for any types used as + * primitives in a tree. The default implementation doesn't do anything. + */ +template +void serialize(const T &obj, tree::cbor::MapWriter &map) { +} + +/** + * Serialization function for Letter. + */ +template <> +inline void serialize(const Letter &obj, tree::cbor::MapWriter &map) { + map.append_int("val", obj); +} + +/** + * Serialization function for String. + */ +template <> +inline void serialize(const String &obj, tree::cbor::MapWriter &map) { + map.append_string("val", obj); +} + +/** + * Deserialization function. This must be specialized for any types used as + * primitives in a tree. The default implementation doesn't do anything. + */ +template +T deserialize(const tree::cbor::MapReader &map) { + return initialize(); +} + +/** + * Deserialization function for Letter. + */ +template <> +inline Letter deserialize(const tree::cbor::MapReader &map) { + return map.at("val").as_int(); +} + +/** + * Deserialization function for String. + */ +template <> +inline String deserialize(const tree::cbor::MapReader &map) { + return map.at("val").as_string(); +} + +} // namespace primitives diff --git a/recipes/tree-gen/all/test_package/src/test_package.cpp b/recipes/tree-gen/all/test_package/src/test_package.cpp new file mode 100644 index 0000000000000..34ed4f5d4eea7 --- /dev/null +++ b/recipes/tree-gen/all/test_package/src/test_package.cpp @@ -0,0 +1,18 @@ +#include "directory.hpp" // the generated file +#include "utils.hpp" +#include "version.hpp" // tree-gen version + +#include + + +void print_tree_gen_version() { + std::cout << "tree-gen version: " << get_version() << "\n"; + std::cout << "tree-gen release year: " << get_release_year() << "\n"; +} + +int main() { + print_tree_gen_version(); + + auto system = tree::base::make(); + ASSERT(!system.is_well_formed()); +} diff --git a/recipes/tree-gen/all/test_package/src/utils.hpp b/recipes/tree-gen/all/test_package/src/utils.hpp new file mode 100644 index 0000000000000..09550ab4f6d8e --- /dev/null +++ b/recipes/tree-gen/all/test_package/src/utils.hpp @@ -0,0 +1,20 @@ +#pragma once + +#define ASSERT(x) \ + do { \ + if (!(x)) { \ + throw std::runtime_error("assertion failed: " #x " is false at " __FILE__ ":" + std::to_string(__LINE__)); \ + } \ + } while (0) + +#define ASSERT_RAISES(exc, x) \ + do { \ + try { \ + x; \ + throw std::runtime_error("assertion failed: no exception at " __FILE__ ":" + std::to_string(__LINE__)); \ + } catch (exc &e) { \ + std::cout << #exc << " exception message: " << e.what() << std::endl; \ + } \ + } while (0) + +#define MARKER std::cout << "###MARKER###" << std::endl; diff --git a/recipes/tree-gen/config.yml b/recipes/tree-gen/config.yml new file mode 100644 index 0000000000000..c8c4465c97415 --- /dev/null +++ b/recipes/tree-gen/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.6": + folder: all From a0df9ec5ae4e19bacc1f7c4cebdde22004f8716e Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Tue, 5 Mar 2024 10:50:09 +0100 Subject: [PATCH 169/405] linter: handle test_requires (#22979) it is basically like a build_requires: https://github.com/conan-io/conan/blob/1.63.0/conans/client/graph/graph_manager.py#L321 --- linter/transform_conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/linter/transform_conanfile.py b/linter/transform_conanfile.py index 8e33d368643b1..36846a9b3b44b 100644 --- a/linter/transform_conanfile.py +++ b/linter/transform_conanfile.py @@ -52,6 +52,7 @@ def transform_conanfile(node): dynamic_fields = { "conan_data": str_class, "build_requires": build_requires_class, + "test_requires" : build_requires_class, "tool_requires": build_requires_class, "info_build": info_class, "user_info_build": [_user_info_build_transform()], From 4f9bc0186a6641469acf102cf865f4307b7de8cd Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Tue, 5 Mar 2024 04:07:03 -0600 Subject: [PATCH 170/405] (#22426) libmount: Make the libblkid and libmount libraries separate components Adding the eudev package requires `libblkid` only. Adding a separate libblkid recipe hasn't gotten anywhere yet. This PR uses an alternative approach and separates the libraries. Each library is split into its own component. --- recipes/libmount/all/conanfile.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/recipes/libmount/all/conanfile.py b/recipes/libmount/all/conanfile.py index b9ec541d71963..ea963a9965bfc 100644 --- a/recipes/libmount/all/conanfile.py +++ b/recipes/libmount/all/conanfile.py @@ -72,7 +72,11 @@ def package(self): rm(self, "*.la", os.path.join(self.package_folder, "lib")) def package_info(self): - self.cpp_info.libs = ["mount", "blkid"] - self.cpp_info.system_libs = ["rt"] - self.cpp_info.includedirs.append(os.path.join("include", "libmount")) - self.cpp_info.set_property("pkg_config_name", "mount") + self.cpp_info.components["libblkid"].libs = ["blkid"] + self.cpp_info.components["libblkid"].set_property("pkg_config_name", "blkid") + + self.cpp_info.components["libmount"].libs = ["mount"] + self.cpp_info.components["libmount"].system_libs = ["rt"] + self.cpp_info.components["libmount"].includedirs.append(os.path.join("include", "libmount")) + self.cpp_info.components["libmount"].set_property("pkg_config_name", "mount") + self.cpp_info.components["libmount"].requires = ["libblkid"] From 4b2590afd3914d1e1eb53a9b6a39f73b99f54ad1 Mon Sep 17 00:00:00 2001 From: Ahajha <44127594+Ahajha@users.noreply.github.com> Date: Tue, 5 Mar 2024 05:50:12 -0500 Subject: [PATCH 171/405] (#22976) xz_utils: Add 5.6.0 as a new subdir * Add xz_utils 5.6.0 * Convert xz_utils 5.6.0 to a new subdir * Remove extra installed files * Rename liblzma on windows --- recipes/xz_utils/cmake/conandata.yml | 4 + recipes/xz_utils/cmake/conanfile.py | 119 ++++++++++++++++++ .../cmake/test_package/CMakeLists.txt | 26 ++++ .../xz_utils/cmake/test_package/conanfile.py | 26 ++++ .../cmake/test_package/test_package.c | 8 ++ .../cmake/test_v1_package/CMakeLists.txt | 8 ++ .../cmake/test_v1_package/conanfile.py | 17 +++ recipes/xz_utils/config.yml | 2 + 8 files changed, 210 insertions(+) create mode 100644 recipes/xz_utils/cmake/conandata.yml create mode 100644 recipes/xz_utils/cmake/conanfile.py create mode 100644 recipes/xz_utils/cmake/test_package/CMakeLists.txt create mode 100644 recipes/xz_utils/cmake/test_package/conanfile.py create mode 100644 recipes/xz_utils/cmake/test_package/test_package.c create mode 100644 recipes/xz_utils/cmake/test_v1_package/CMakeLists.txt create mode 100644 recipes/xz_utils/cmake/test_v1_package/conanfile.py diff --git a/recipes/xz_utils/cmake/conandata.yml b/recipes/xz_utils/cmake/conandata.yml new file mode 100644 index 0000000000000..457376715689b --- /dev/null +++ b/recipes/xz_utils/cmake/conandata.yml @@ -0,0 +1,4 @@ +sources: + "5.6.0": + url: "https://github.com/tukaani-project/xz/releases/download/v5.6.0/xz-5.6.0.tar.xz" + sha256: "cdafe1632f139c82937cc1ed824f7a60b7b0a0619dfbbd681dcac02b1ac28f5b" diff --git a/recipes/xz_utils/cmake/conanfile.py b/recipes/xz_utils/cmake/conanfile.py new file mode 100644 index 0000000000000..641cb1d252d68 --- /dev/null +++ b/recipes/xz_utils/cmake/conanfile.py @@ -0,0 +1,119 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rename, rmdir, save +from conan.tools.scm import Version +import os +import textwrap + +required_conan_version = ">=1.54.0" + + +class XZUtilsConan(ConanFile): + name = "xz_utils" + description = ( + "XZ Utils is free general-purpose data compression software with a high " + "compression ratio. XZ Utils were written for POSIX-like systems, but also " + "work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils." + ) + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://tukaani.org/xz" + topics = ("lzma", "xz", "compression") + license = "Unlicense", "LGPL-2.1-or-later", "GPL-2.0-or-later", "GPL-3.0-or-later" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def validate(self): + # This is only from 5.6.0 onwards, they are just in a different recipe so no need to check version. + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "7": + raise ConanInvalidConfiguration(f"{self.ref} does not work on GCC<7 due to errors with inline assembly") + + 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.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + + self._create_cmake_module_variables( + os.path.join(self.package_folder, self._module_file_rel_path), + ) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake", "liblzma")) + if self.settings.os == "Windows": + rename(self, os.path.join(self.package_folder, "lib", "liblzma.lib"), os.path.join(self.package_folder, "lib", "lzma.lib")) + + def _create_cmake_module_variables(self, module_file): + # TODO: also add LIBLZMA_HAS_AUTO_DECODER, LIBLZMA_HAS_EASY_ENCODER & LIBLZMA_HAS_LZMA_PRESET + content = textwrap.dedent(f"""\ + set(LIBLZMA_FOUND TRUE) + if(DEFINED LibLZMA_INCLUDE_DIRS) + set(LIBLZMA_INCLUDE_DIRS ${{LibLZMA_INCLUDE_DIRS}}) + endif() + if(DEFINED LibLZMA_LIBRARIES) + set(LIBLZMA_LIBRARIES ${{LibLZMA_LIBRARIES}}) + endif() + set(LIBLZMA_VERSION_MAJOR {Version(self.version).major}) + set(LIBLZMA_VERSION_MINOR {Version(self.version).minor}) + set(LIBLZMA_VERSION_PATCH {Version(self.version).patch}) + set(LIBLZMA_VERSION_STRING "{self.version}") + """) + save(self, module_file, content) + + @property + def _module_file_rel_path(self): + return os.path.join("lib", "cmake", f"conan-official-{self.name}-variables.cmake") + + def package_info(self): + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "LibLZMA") + self.cpp_info.set_property("cmake_target_name", "LibLZMA::LibLZMA") + self.cpp_info.set_property("cmake_build_modules", [self._module_file_rel_path]) + self.cpp_info.set_property("pkg_config_name", "liblzma") + self.cpp_info.libs = ["lzma"] + if not self.options.shared: + self.cpp_info.defines.append("LZMA_API_STATIC") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("pthread") + + # TODO: to remove in conan v2 once cmake_find_package* & pkg_config generators removed + self.cpp_info.names["cmake_find_package"] = "LibLZMA" + self.cpp_info.names["cmake_find_package_multi"] = "LibLZMA" + self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] diff --git a/recipes/xz_utils/cmake/test_package/CMakeLists.txt b/recipes/xz_utils/cmake/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..cd4e960a3ff01 --- /dev/null +++ b/recipes/xz_utils/cmake/test_package/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(LibLZMA REQUIRED) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE LibLZMA::LibLZMA) + +# Test whether variables from https://cmake.org/cmake/help/latest/module/FindLibLZMA.html +# are properly defined in conan generators +set(_custom_vars + LIBLZMA_FOUND + LIBLZMA_INCLUDE_DIRS + LIBLZMA_LIBRARIES + LIBLZMA_VERSION_MAJOR + LIBLZMA_VERSION_MINOR + LIBLZMA_VERSION_PATCH + LIBLZMA_VERSION_STRING +) +foreach(_custom_var ${_custom_vars}) + if(DEFINED ${_custom_var}) + message(STATUS "${_custom_var}: ${${_custom_var}}") + else() + message(FATAL_ERROR "${_custom_var} not defined") + endif() +endforeach() diff --git a/recipes/xz_utils/cmake/test_package/conanfile.py b/recipes/xz_utils/cmake/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/xz_utils/cmake/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/xz_utils/cmake/test_package/test_package.c b/recipes/xz_utils/cmake/test_package/test_package.c new file mode 100644 index 0000000000000..a1f55ac414846 --- /dev/null +++ b/recipes/xz_utils/cmake/test_package/test_package.c @@ -0,0 +1,8 @@ +#include +#include +#include + +int main() { + printf("LZMA version %s\n", lzma_version_string()); + return EXIT_SUCCESS; +} diff --git a/recipes/xz_utils/cmake/test_v1_package/CMakeLists.txt b/recipes/xz_utils/cmake/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..0d20897301b68 --- /dev/null +++ b/recipes/xz_utils/cmake/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/xz_utils/cmake/test_v1_package/conanfile.py b/recipes/xz_utils/cmake/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..19e6a0c06e3d8 --- /dev/null +++ b/recipes/xz_utils/cmake/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package" + + 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/xz_utils/config.yml b/recipes/xz_utils/config.yml index d950dab72f7d0..0044c059f459b 100644 --- a/recipes/xz_utils/config.yml +++ b/recipes/xz_utils/config.yml @@ -1,4 +1,6 @@ versions: + "5.6.0": + folder: cmake "5.4.5": folder: all "5.4.4": From e41d92b367d723976f164a42cd06372adbcf95e5 Mon Sep 17 00:00:00 2001 From: Roberto Rossini <71787608+robomics@users.noreply.github.com> Date: Tue, 5 Mar 2024 12:08:38 +0100 Subject: [PATCH 172/405] (#22975) hictk: add v0.0.10 --- recipes/hictk/all/conandata.yml | 3 +++ recipes/hictk/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/hictk/all/conandata.yml b/recipes/hictk/all/conandata.yml index ef016828b80db..ba37c76167468 100644 --- a/recipes/hictk/all/conandata.yml +++ b/recipes/hictk/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.0.10": + url: "https://github.com/paulsengroup/hictk/archive/refs/tags/v0.0.10.tar.gz" + sha256: "0b2d60af73578b292317e5ab513f24965176f9852ceda29e8d02007a434588c3" "0.0.9": url: "https://github.com/paulsengroup/hictk/archive/refs/tags/v0.0.9.tar.gz" sha256: "c64cb07a057863baa199b9d344b27b8f15a1db458390ccf7b5cac0627308d8c8" diff --git a/recipes/hictk/config.yml b/recipes/hictk/config.yml index 0677603a25aa5..351a3e971990d 100644 --- a/recipes/hictk/config.yml +++ b/recipes/hictk/config.yml @@ -1,4 +1,6 @@ versions: + "0.0.10": + folder: all "0.0.9": folder: all "0.0.8": From b3c139b51ffc60c22be91c1029de2aed8c39c288 Mon Sep 17 00:00:00 2001 From: Tamas Kenez <126668370+tamaskenezlego@users.noreply.github.com> Date: Tue, 5 Mar 2024 16:44:37 +0100 Subject: [PATCH 173/405] (#20521) Fix opencolorio/2.2.1 broken if is_apple_os() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * improve error message if is_apple_os() * Update conanfile.py --------- Co-authored-by: Francisco Ramírez Co-authored-by: Rubén Rincón Blanco --- recipes/opencolorio/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/opencolorio/all/conanfile.py b/recipes/opencolorio/all/conanfile.py index 13719aad33361..49d9c8b544de8 100644 --- a/recipes/opencolorio/all/conanfile.py +++ b/recipes/opencolorio/all/conanfile.py @@ -90,7 +90,7 @@ def validate(self): # opencolorio>=2.2.0 requires minizip-ng with with_zlib if Version(self.version) >= "2.2.0" and \ not self.dependencies["minizip-ng"].options.get_safe("with_zlib", False): - raise ConanInvalidConfiguration(f"{self.ref} requires minizip-ng with with_zlib = True.") + raise ConanInvalidConfiguration(f"{self.ref} requires minizip-ng with with_zlib = True. On Apple platforms with_libcomp = False is also needed to enable the with_zlib option.") if Version(self.version) == "1.1.1" and self.options.shared and self.dependencies["yaml-cpp"].options.shared: raise ConanInvalidConfiguration(f"{self.ref} requires static build yaml-cpp") From 9e4baa3f09b567ad7968209f4325470798069b21 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 6 Mar 2024 01:28:03 +0900 Subject: [PATCH 174/405] (#22968) aws-c-http: add version 0.8.1 --- recipes/aws-c-http/all/conandata.yml | 3 +++ recipes/aws-c-http/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/aws-c-http/all/conandata.yml b/recipes/aws-c-http/all/conandata.yml index 68fa29d3753e7..6ee734ea998ca 100644 --- a/recipes/aws-c-http/all/conandata.yml +++ b/recipes/aws-c-http/all/conandata.yml @@ -1,4 +1,7 @@ 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" diff --git a/recipes/aws-c-http/config.yml b/recipes/aws-c-http/config.yml index febd9410cb93f..9ef90600a046d 100644 --- a/recipes/aws-c-http/config.yml +++ b/recipes/aws-c-http/config.yml @@ -1,4 +1,6 @@ versions: + "0.8.1": + folder: all "0.7.14": folder: all "0.6.22": From 1c65a3accdb3b14169f852df010e8d77b042c86e Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 5 Mar 2024 17:48:07 +0100 Subject: [PATCH 175/405] (#22988) openjpeg: add version 2.5.2 --- recipes/openjpeg/all/conandata.yml | 3 +++ recipes/openjpeg/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/openjpeg/all/conandata.yml b/recipes/openjpeg/all/conandata.yml index aa3392abe8228..a2bb2c3515805 100644 --- a/recipes/openjpeg/all/conandata.yml +++ b/recipes/openjpeg/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.5.2": + url: "https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz" + sha256: "90e3896fed910c376aaf79cdd98bdfdaf98c6472efd8e1debf0a854938cbda6a" "2.5.1": url: "https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.1.tar.gz" sha256: "c0b92dadd65e33b1cf94f39dd9157d5469846744c2e0afb8ca10961f51f61da6" diff --git a/recipes/openjpeg/config.yml b/recipes/openjpeg/config.yml index cfbcc333e7b22..b4e926204666d 100644 --- a/recipes/openjpeg/config.yml +++ b/recipes/openjpeg/config.yml @@ -1,4 +1,6 @@ versions: + "2.5.2": + folder: all "2.5.1": folder: all "2.5.0": From 2ef540a2d3ef8536b1133bdea0848eb493bbc770 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 6 Mar 2024 17:47:41 +0900 Subject: [PATCH 176/405] (#22751) s2geometry: add version 0.11.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * s2geometry: add version 0.11.1 * remove share folder, update abseil * fix cmake names Co-authored-by: Uilian Ries * fix target name * Update conanfile.py --------- Co-authored-by: Uilian Ries Co-authored-by: Francisco Ramírez --- recipes/s2geometry/all/conandata.yml | 3 +++ recipes/s2geometry/all/conanfile.py | 10 +++++++--- recipes/s2geometry/all/test_package/CMakeLists.txt | 4 ++-- recipes/s2geometry/config.yml | 2 ++ 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/recipes/s2geometry/all/conandata.yml b/recipes/s2geometry/all/conandata.yml index 2320f21a27e4c..5cd6ac69f48bf 100644 --- a/recipes/s2geometry/all/conandata.yml +++ b/recipes/s2geometry/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.11.1": + url: "https://github.com/google/s2geometry/archive/refs/tags/v0.11.1.tar.gz" + sha256: "bdbeb8ebdb88fa934257caf81bb44b55711617a3ab4fdec2c3cfd6cc31b61734" "0.10.0": url: "https://github.com/google/s2geometry/archive/refs/tags/v0.10.0.tar.gz" sha256: "1c17b04f1ea20ed09a67a83151ddd5d8529716f509dde49a8190618d70532a3d" diff --git a/recipes/s2geometry/all/conanfile.py b/recipes/s2geometry/all/conanfile.py index 31e07fd7e0dc3..fd54c4b79443f 100644 --- a/recipes/s2geometry/all/conanfile.py +++ b/recipes/s2geometry/all/conanfile.py @@ -4,7 +4,7 @@ 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 get, copy, export_conandata_patches, apply_conandata_patches +from conan.tools.files import get, copy, rmdir, export_conandata_patches, apply_conandata_patches from conan.tools.microsoft import is_msvc from conan.tools.scm import Version @@ -36,7 +36,7 @@ def _min_cppstd(self): @property def _compilers_minimum_version(self): return { - "gcc": "5", + "gcc": "6", "clang": "7", "apple-clang": "10", "Visual Studio": "15", @@ -58,7 +58,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("abseil/20230125.3", transitive_headers=True, transitive_libs=True) + self.requires("abseil/20230802.1", transitive_headers=True, transitive_libs=True) self.requires("openssl/[>=1.1 <4]", transitive_headers=True) def validate(self): @@ -81,6 +81,7 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["GOOGLETEST_ROOT"] = False tc.variables["BUILD_EXAMPLES"] = False + tc.variables["BUILD_TESTS"] = False tc.generate() tc = CMakeDeps(self) tc.generate() @@ -95,6 +96,9 @@ def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) cmake = CMake(self) cmake.install() + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): self.cpp_info.libs = ["s2"] + self.cpp_info.set_property("cmake_file_name", "s2") + self.cpp_info.set_property("cmake_target_name", "s2::s2") diff --git a/recipes/s2geometry/all/test_package/CMakeLists.txt b/recipes/s2geometry/all/test_package/CMakeLists.txt index cc8c0e2143602..629a8c3aedf01 100644 --- a/recipes/s2geometry/all/test_package/CMakeLists.txt +++ b/recipes/s2geometry/all/test_package/CMakeLists.txt @@ -1,10 +1,10 @@ cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) -find_package(s2geometry REQUIRED CONFIG) +find_package(s2 REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE s2geometry::s2geometry) +target_link_libraries(${PROJECT_NAME} PRIVATE s2::s2) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) if(MSVC) # Use unsigned characters diff --git a/recipes/s2geometry/config.yml b/recipes/s2geometry/config.yml index 1b582dcf6716b..3a159672513b1 100644 --- a/recipes/s2geometry/config.yml +++ b/recipes/s2geometry/config.yml @@ -1,3 +1,5 @@ versions: + "0.11.1": + folder: all "0.10.0": folder: all From 3f827acb71153c5b6dae5c40bad9dee32774d675 Mon Sep 17 00:00:00 2001 From: igormironchik Date: Wed, 6 Mar 2024 12:12:01 +0300 Subject: [PATCH 177/405] (#22972) md4qt: bump version to 2.8.0 --- recipes/md4qt/all/conandata.yml | 3 +++ recipes/md4qt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index 9b4b6bdb2cefd..46312df8b8947 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.8.0": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.8.0.tar.gz" + sha256: "82ef6acc84ea3a7891e4547f7d79af4caaef0f4d6f152bdab2a5c6ed5a48d11b" "2.7.4": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.4.tar.gz" sha256: "adef8e96e71f13cb9f4450eee7bb02a43694682dc67519323f8e23f7bf10d0d1" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index 51c0af2212d4c..fb12b4088b445 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,6 @@ versions: + "2.8.0": + folder: all "2.7.4": folder: all "2.7.3": From 9c7b034f9668fca48cd41062052218b371aa834e Mon Sep 17 00:00:00 2001 From: Marian Klymov Date: Wed, 6 Mar 2024 11:28:55 +0200 Subject: [PATCH 178/405] (#22992) libxml2: add 2.12.5 and 2.11.7 --- recipes/libxml2/all/conandata.yml | 6 ++++++ recipes/libxml2/config.yml | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/recipes/libxml2/all/conandata.yml b/recipes/libxml2/all/conandata.yml index 6fd6c7f9c74c0..a0070b6bc4a60 100644 --- a/recipes/libxml2/all/conandata.yml +++ b/recipes/libxml2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.12.5": + url: "https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.5.tar.xz" + sha256: "a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21" "2.12.4": url: "https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.4.tar.xz" sha256: "497360e423cf0bd99eacdb7c6215dea92e6d6e89ee940393c2bae0e77cb9b7d0" @@ -11,6 +14,9 @@ sources: "2.12.1": url: "https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.1.tar.xz" sha256: "8982b9ccdf7f456e30d8f7012d50858c6623e495333b6191def455c7e95427eb" + "2.11.7": + url: "https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.7.tar.xz" + sha256: "fb27720e25eaf457f94fd3d7189bcf2626c6dccf4201553bc8874d50e3560162" "2.11.6": url: "https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.6.tar.xz" sha256: "c90eee7506764abbe07bb616b82da452529609815aefef423d66ef080eb0c300" diff --git a/recipes/libxml2/config.yml b/recipes/libxml2/config.yml index 2edcc26fbec6f..1c968c066198a 100644 --- a/recipes/libxml2/config.yml +++ b/recipes/libxml2/config.yml @@ -1,4 +1,6 @@ versions: + "2.12.5": + folder: all "2.12.4": folder: all "2.12.3": @@ -7,6 +9,8 @@ versions: folder: all "2.12.1": folder: all + "2.11.7": + folder: all "2.11.6": folder: all "2.11.4": From 0b3b4ba2e5b67525453598d445662b22da186808 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 6 Mar 2024 14:44:52 +0200 Subject: [PATCH 179/405] (#21137) gdk-pixbuf: bump deps and several fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gdk-pixbuf: bump deps, fix static build * enable gdk-pixbuf build for clang 13 and newer * Revert "enable gdk-pixbuf build for clang 13 and newer" This reverts commit 3fe80de83a7fbafbf03b288d93a42e59cb1f264c. * Added upstream report for the patch. Removed Macos validation. Added workaround for the breaking change to pkgconfig_variables * Added workaround * Using libgettext provided by Conan * Update recipes/gdk-pixbuf/all/conanfile.py * macOS always uses Conan libgettext * Blank spaces * Improved Conan libgettext requirement line in meson.build * Adding gettext as tool require * blank * Simplifying (a little bit) --------- Co-authored-by: Walid Boussafa Co-authored-by: Rubén Rincón Co-authored-by: Francisco Ramirez de Anton --- recipes/gdk-pixbuf/all/conanfile.py | 76 +++++++++++++++++++---------- 1 file changed, 49 insertions(+), 27 deletions(-) diff --git a/recipes/gdk-pixbuf/all/conanfile.py b/recipes/gdk-pixbuf/all/conanfile.py index 4f44d797427e7..cbbd71f4d5295 100644 --- a/recipes/gdk-pixbuf/all/conanfile.py +++ b/recipes/gdk-pixbuf/all/conanfile.py @@ -1,3 +1,5 @@ +import os + from conan import ConanFile, conan_version from conan.errors import ConanInvalidConfiguration from conan.tools.apple import fix_apple_shared_install_name @@ -10,15 +12,13 @@ from conan.tools.microsoft import is_msvc_static_runtime from conan.tools.scm import Version -import os - -required_conan_version = ">=1.56.0 <2 || >=2.0.6" +required_conan_version = ">=1.56.0 <2 || >=2.0.8" class GdkPixbufConan(ConanFile): name = "gdk-pixbuf" description = "toolkit for image loading and pixel buffer manipulation" - topics = ("image") + topics = "image" url = "https://github.com/conan-io/conan-center-index" homepage = "https://developer.gnome.org/gdk-pixbuf/" license = "LGPL-2.1-or-later" @@ -63,36 +63,35 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("glib/2.77.0", transitive_headers=True, transitive_libs=True) + self.requires("glib/2.78.1", transitive_headers=True, transitive_libs=True) if self.options.with_libpng: self.requires("libpng/1.6.40") if self.options.with_libtiff: - self.requires("libtiff/4.4.0") + self.requires("libtiff/4.6.0") if self.options.with_libjpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/2.1.5") + self.requires("libjpeg-turbo/3.0.1") elif self.options.with_libjpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_libjpeg == "mozjpeg": - self.requires("mozjpeg/4.1.1") + self.requires("mozjpeg/4.1.3") def validate(self): if self.options.shared and not self.dependencies["glib"].options.shared: raise ConanInvalidConfiguration( "Linking a shared library against static glib can cause unexpected behaviour." ) - if self.settings.os == "Macos": - # when running gdk-pixbuf-query-loaders - # dyld: malformed mach-o: load commands size (97560) > 32768 - raise ConanInvalidConfiguration("This package does not support Macos currently") if self.dependencies["glib"].options.shared and is_msvc_static_runtime(self): raise ConanInvalidConfiguration( "Linking shared glib with the MSVC static runtime is not supported" ) def build_requirements(self): - self.tool_requires("meson/1.0.0") + self.tool_requires("meson/1.2.3") + # FIXME: unify libgettext and gettext?? + # INFO: gettext provides msgfmt, which is required to build the .mo files + self.tool_requires("gettext/0.21") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/1.9.3") + self.tool_requires("pkgconf/2.0.3") self.tool_requires("glib/") if self.options.with_introspection: self.tool_requires("gobject-introspection/1.72.0") @@ -113,7 +112,6 @@ def generate(self): deps = PkgConfigDeps(self) deps.generate() - tc = MesonToolchain(self) enabled_disabled = lambda v: "enabled" if v else "disabled" true_false = lambda v: "true" if v else "false" @@ -140,7 +138,6 @@ def generate(self): "tiff": true_false(self.options.with_libtiff), "jpeg": true_false(self.options.with_libjpeg) }) - # Workaround for https://bugs.llvm.org/show_bug.cgi?id=16404 # Only really for the purposes of building on CCI - end users can # workaround this by appropriately setting global linker flags in their profile @@ -150,21 +147,42 @@ def generate(self): def _patch_sources(self): apply_conandata_patches(self) - meson_build = os.path.join(self.source_folder, "meson.build") + gdk_meson_build = os.path.join(self.source_folder, "gdk-pixbuf", "meson.build") + replace_in_file(self, meson_build, "subdir('tests')", "#subdir('tests')") replace_in_file(self, meson_build, "subdir('thumbnailer')", "#subdir('thumbnailer')") - replace_in_file(self, meson_build, - "gmodule_dep.get_variable(pkgconfig: 'gmodule_supported')" if Version(self.version) >= "2.42.6" - else "gmodule_dep.get_pkgconfig_variable('gmodule_supported')", "'true'") + replace_in_file(self, meson_build, "gmodule_dep.get_variable(pkgconfig: 'gmodule_supported')", "'true'") # workaround https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/203 - if Version(self.version) >= "2.42.6": - replace_in_file(self, os.path.join(self.source_folder, "build-aux", "post-install.py"), - "close_fds=True", "close_fds=(sys.platform != 'win32')") + replace_in_file(self, os.path.join(self.source_folder, "build-aux", "post-install.py"), + "close_fds=True", "close_fds=(sys.platform != 'win32')") if Version(self.version) >= "2.42.9": - replace_in_file(self, meson_build, "is_msvc_like ? 'png' : 'libpng'", "'libpng'") - replace_in_file(self, meson_build, "is_msvc_like ? 'jpeg' : 'libjpeg'", "'libjpeg'") - replace_in_file(self, meson_build, "is_msvc_like ? 'tiff' : 'libtiff-4'", "'libtiff-4'") + replace_in_file(self, meson_build, "is_msvc_like = ", "is_msvc_like = false #") + # Fix libtiff and libpng not being linked against when building statically + # Reported upstream: https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/159 + replace_in_file(self, gdk_meson_build, + "dependencies: gdk_pixbuf_deps + [ gdkpixbuf_dep ],", + "dependencies: loaders_deps + gdk_pixbuf_deps + [ gdkpixbuf_dep ],") + # Forcing Conan libgettext instead of system one (if OS != Linux) + if self.settings.os != "Linux": + # FIXME: unify libgettext and gettext ?? + replace_in_file(self, meson_build, + "intl_dep = cc.find_library('intl', required: false)", + "intl_dep = dependency('libgettext', version: '>=0.21', required: false, method: 'pkg-config')") + if self.settings.os == "Macos" and self.options.shared: + # Workaround to avoid generating gdk-pixbuf/loaders.cache fails + # Error output: + # [167/167] Generating gdk-pixbuf/loaders.cache with a custom command (wrapped by meson to capture output) + # FAILED: gdk-pixbuf/loaders.cache + # meson.py --internal exe --capture gdk-pixbuf/loaders.cache -- xxxx/gdk-pixbuf/gdk-pixbuf-query-loaders + # --- stderr --- + # dyld[25158]: Library not loaded: /lib/libgnuintl.8.dylib + # Reason: tried: '/lib/libgnuintl.8.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/lib/libgnuintl.8.dylib' (no such file) + # + # Obviously, the libgnuintl.8.dylib is in the VirtualRunEnv, but the current env is not passed to + # the meson custom_target function as it's wrappering the execution + # custom_target admits also an "env" parameter, but it's not working as expected + replace_in_file(self, gdk_meson_build, "build_by_default: true", "build_by_default: false") def build(self): self._patch_sources() @@ -195,10 +213,13 @@ def package_info(self): self.cpp_info.exelinkflags = ldflags self.cpp_info.sharedlinkflags = ldflags + # Breaking change since Conan >= 2.0.8 + # Related to https://github.com/conan-io/conan/pull/14233 + libdir_variable = "libdir1" if Version(conan_version) < "2.0" else "libdir" pkgconfig_variables = { "bindir": "${prefix}/bin", "gdk_pixbuf_binary_version": "2.10.0", - "gdk_pixbuf_binarydir": "${libdir1}/gdk-pixbuf-2.0/2.10", + "gdk_pixbuf_binarydir": "${%s}/gdk-pixbuf-2.0/2.10" % libdir_variable, "gdk_pixbuf_moduledir": "${gdk_pixbuf_binarydir}/loaders", "gdk_pixbuf_cache_file": "${gdk_pixbuf_binarydir}/loaders.cache", "gdk_pixbuf_csource": "${bindir}/gdk-pixbuf-csource", @@ -213,6 +234,7 @@ def package_info(self): self.runenv_info.define_path("GDK_PIXBUF_PIXDATA", gdk_pixbuf_pixdata) self.env_info.GDK_PIXBUF_PIXDATA = gdk_pixbuf_pixdata # remove in conan v2? + def fix_msvc_libname(conanfile, remove_lib_prefix=True): """remove lib prefix & change extension to .lib in case of cl like compiler""" if not conanfile.settings.get_safe("compiler.runtime"): From 00e6aa5e261ad5e8a64d32e9be3fb08d9f82967f Mon Sep 17 00:00:00 2001 From: Mikhail Lappo Date: Wed, 6 Mar 2024 14:08:41 +0100 Subject: [PATCH 180/405] (#23002) perfetto: add version 43.1 --- recipes/perfetto/all/conandata.yml | 3 +++ recipes/perfetto/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/perfetto/all/conandata.yml b/recipes/perfetto/all/conandata.yml index 711d2732829d9..7ea6229bf24ad 100644 --- a/recipes/perfetto/all/conandata.yml +++ b/recipes/perfetto/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "43.1": + url: "https://github.com/google/perfetto/archive/refs/tags/v43.1.tar.gz" + sha256: "0f23ba39520c9ec629c48dc36a3a4bb92ed9653ac6694445be22985205a3f4ce" "42.0": url: "https://github.com/google/perfetto/archive/refs/tags/v42.0.tar.gz" sha256: "1c474a0f16cc2f9da826fd3f9e44ffd77785c433e997cdaf0ee390ae3d64b53e" diff --git a/recipes/perfetto/config.yml b/recipes/perfetto/config.yml index f2898b0745aac..e704c3a7bc879 100644 --- a/recipes/perfetto/config.yml +++ b/recipes/perfetto/config.yml @@ -1,4 +1,6 @@ versions: + "43.1": + folder: all "42.0": folder: all "41.0": From 92bca1270cf999b42431bd314cd3a8b0fa3c1d84 Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Wed, 6 Mar 2024 15:02:46 +0000 Subject: [PATCH 181/405] (#23004) freetype: use libpng version range --- recipes/freetype/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/freetype/all/conanfile.py b/recipes/freetype/all/conanfile.py index 4b69b608387b5..5543e9e0a5962 100644 --- a/recipes/freetype/all/conanfile.py +++ b/recipes/freetype/all/conanfile.py @@ -64,7 +64,7 @@ def layout(self): def requirements(self): if self.options.with_png: - self.requires("libpng/1.6.42") + self.requires("libpng/[>=1.6 <2]") if self.options.with_zlib: self.requires("zlib/[>=1.2.10 <2]") if self.options.with_bzip2: From 907f096a2e93e4e1dd4daf13f28a22aa32042b48 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Wed, 6 Mar 2024 17:48:17 -0600 Subject: [PATCH 182/405] (#22919) xkbcommon: Bump wayland-protocols and Meson --- recipes/xkbcommon/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/xkbcommon/all/conanfile.py b/recipes/xkbcommon/all/conanfile.py index c646e023dd17c..a8f0e89851c34 100644 --- a/recipes/xkbcommon/all/conanfile.py +++ b/recipes/xkbcommon/all/conanfile.py @@ -75,14 +75,14 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} is only compatible with Linux and FreeBSD") def build_requirements(self): - self.tool_requires("meson/1.3.1") + self.tool_requires("meson/1.3.2") self.tool_requires("bison/3.8.2") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): self.tool_requires("pkgconf/2.1.0") if self.options.get_safe("with_wayland"): if self._has_build_profile: self.tool_requires("wayland/") - self.tool_requires("wayland-protocols/1.32") + self.tool_requires("wayland-protocols/1.33") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From f452bcadb4c1c286bbf3451d516a05497c43563e Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Wed, 6 Mar 2024 18:08:40 -0600 Subject: [PATCH 183/405] (#22922) glfw: Bump wayland-protocols --- recipes/glfw/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/glfw/all/conanfile.py b/recipes/glfw/all/conanfile.py index 21f5e6b8c247b..90b0cfaeecdac 100644 --- a/recipes/glfw/all/conanfile.py +++ b/recipes/glfw/all/conanfile.py @@ -82,7 +82,7 @@ def validate(self): def build_requirements(self): if self.options.get_safe("with_wayland"): - self.tool_requires("wayland-protocols/1.32") + self.tool_requires("wayland-protocols/1.33") if self._has_build_profile: self.tool_requires("wayland/") if not self.conf.get("tools.gnu:pkg_config", check_type=str): From 0bff285ebad4febf9e31a1efbf294282a7bdc122 Mon Sep 17 00:00:00 2001 From: Ahajha <44127594+Ahajha@users.noreply.github.com> Date: Wed, 6 Mar 2024 19:48:55 -0500 Subject: [PATCH 184/405] (#22577) primesieve: new package * primesieve: add version 11.0 * primesieve: Fix version numer * Update to 11.2 * Simplify test package * Misc conanfile cleanup/fixes, drop GCC 5 for now * Don't build static lib when building shared, add pthread * Fix MSVC shared package * Add m to system libs * Drop 1.x-specific changes --------- Co-authored-by: Alexis Placet --- recipes/primesieve/all/conandata.yml | 4 + recipes/primesieve/all/conanfile.py | 97 +++++++++++++++++++ .../all/test_package/CMakeLists.txt | 9 ++ .../primesieve/all/test_package/conanfile.py | 26 +++++ .../all/test_package/test_package.cpp | 15 +++ recipes/primesieve/config.yml | 3 + 6 files changed, 154 insertions(+) create mode 100644 recipes/primesieve/all/conandata.yml create mode 100644 recipes/primesieve/all/conanfile.py create mode 100644 recipes/primesieve/all/test_package/CMakeLists.txt create mode 100644 recipes/primesieve/all/test_package/conanfile.py create mode 100644 recipes/primesieve/all/test_package/test_package.cpp create mode 100644 recipes/primesieve/config.yml diff --git a/recipes/primesieve/all/conandata.yml b/recipes/primesieve/all/conandata.yml new file mode 100644 index 0000000000000..f4f2c000a99cc --- /dev/null +++ b/recipes/primesieve/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "11.2": + url: "https://github.com/kimwalisch/primesieve/archive/refs/tags/v11.2.tar.gz" + sha256: "86c31bae9c378340b19669eafef8c5e45849adf7b9c92af1d212a2a2bfa0a5db" diff --git a/recipes/primesieve/all/conanfile.py b/recipes/primesieve/all/conanfile.py new file mode 100644 index 0000000000000..c8e88390ec7a5 --- /dev/null +++ b/recipes/primesieve/all/conanfile.py @@ -0,0 +1,97 @@ +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 get, copy, rename, rm, rmdir +from conan.tools.microsoft import is_msvc_static_runtime, is_msvc +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.53.0" + +class PrimesieveConan(ConanFile): + name = "primesieve" + description = "Fast prime number generator" + license = "BSD-2-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/kimwalisch/primesieve" + topics = ("math", "prime-numbers", "sieve-of-eratosthenes") + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_multiarch": [True, False], + "with_msvc_crt_static": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_multiarch": True, + "with_msvc_crt_static": False, + } + package_type = "library" + + @property + def _min_cppstd(self): + return 11 + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) <= "5": + raise ConanInvalidConfiguration("GCC<=5 is currently not supported. Contributions with fixes are welcome.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_PRIMESIEVE"] = False + tc.variables["BUILD_DOC"] = False + tc.variables["BUILD_EXAMPLES"] = False + tc.variables["BUILD_TESTS"] = False + tc.variables["WITH_MULTIARCH"] = self.options.with_multiarch + tc.variables["BUILD_STATIC_LIBS"] = not self.options.shared + if is_msvc(self): + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0091"] = "NEW" + tc.variables["WITH_MSVC_CRT_STATIC"] = self.options.with_msvc_crt_static + tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + if is_msvc(self) and self.options.shared: + rename(self, os.path.join(self.package_folder, "lib", "primesieve.dll.lib"), os.path.join(self.package_folder, "lib", "primesieve.lib")) + + def package_info(self): + self.cpp_info.libs = ["primesieve"] + self.cpp_info.set_property("cmake_file_name", "primesieve") + self.cpp_info.set_property("cmake_target_name", "primesieve::primesieve") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["pthread", "m"] diff --git a/recipes/primesieve/all/test_package/CMakeLists.txt b/recipes/primesieve/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..ee808a6efb8b5 --- /dev/null +++ b/recipes/primesieve/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.8) + +project(test_package CXX) # if the project uses c++ + +find_package(primesieve REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE primesieve::primesieve) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/primesieve/all/test_package/conanfile.py b/recipes/primesieve/all/test_package/conanfile.py new file mode 100644 index 0000000000000..a9fb96656f203 --- /dev/null +++ b/recipes/primesieve/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/primesieve/all/test_package/test_package.cpp b/recipes/primesieve/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..a8281d9952969 --- /dev/null +++ b/recipes/primesieve/all/test_package/test_package.cpp @@ -0,0 +1,15 @@ +#include + +#include +#include +#include + +int main() { + std::vector primes; + primesieve::generate_n_primes(5, &primes); + std::cout << "First 5 primes: "; + for (const auto prime : primes) { + std::cout << prime << ' '; + } + std::cout << '\n'; +} diff --git a/recipes/primesieve/config.yml b/recipes/primesieve/config.yml new file mode 100644 index 0000000000000..3b46283d96d88 --- /dev/null +++ b/recipes/primesieve/config.yml @@ -0,0 +1,3 @@ +versions: + "11.2": + folder: all From 7f8271c397c6c2147fd3255a347c98ea0ed16881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Thu, 7 Mar 2024 11:21:48 +0100 Subject: [PATCH 185/405] (#23016) Update range list to add libpng (And mention libxml) * Update range list * Review * Review * Move to its own section --- docs/adding_packages/dependencies.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/docs/adding_packages/dependencies.md b/docs/adding_packages/dependencies.md index a69f895483ed0..f22925892a890 100644 --- a/docs/adding_packages/dependencies.md +++ b/docs/adding_packages/dependencies.md @@ -180,13 +180,11 @@ With the introduction of Conan 2.0, we are currently working to allow the use of Currently, these are: * OpenSSL: `[>=1.1 <4]` for libraries known to be compatible with OpenSSL 1.x and 3.x -* CMake: `[>3.XX <4]`, where `3.XX` is the minimum version of CMake required by the relevant build scripts +* CMake: `[>3.XX <4]`, where `3.XX` is the minimum version of CMake required by the relevant build scripts. Note that CCI recipes assume 3.15 is installed in the system, so add this +version range only when a requirement for a newer version is needed. * Libcurl: `[>=X.YY <9]`, where `X.YY` is the minimum version of Libcurl required, starting from `7.78` - -> **Note**: You might also see Zlib ranges in some PR by CCI maintainers. -> We're adding them little by little to avoid missing binaries and conflict errors. -> Please do not open PRs moving Zlib to ranges for now, we'll update this page when PRs are free to add new ranges. - +* Zlib: `[>=1.2.11 <2]` expect if the recipe needs a newer lower version for specific reasons +* Libpng: `[>=1.6 <2]` expect if the recipe needs a newer lower version for specific reasons > **Warning**: With Conan 1.x, [version ranges](https://docs.conan.io/1/versioning/version_ranges.html) adhere to a much more strict sematic version spec, > OpenSSL 1.1.x does not follow this so the client will not resolve to that range and will pick a 3.x version. In order to select a lower version you @@ -195,7 +193,15 @@ Currently, these are: Conan maintainers may introduce this for other dependencies over time. Outside of the cases outlined above, version ranges are not allowed in ConanCenter recipes. +#### Adding Version Ranges + +You might also see version ranges in some PR by CCI maintainers. + +These are being done on a case-by-case basis, and are being rolled out in phases to ensure +that they do not cause problems to users. Please do not open PRs that exclusively add version ranges to dependencies, +unless they are solving current conflicts, in which case we welcome them and they will be prioritized. + ## Handling "internal" dependencies -Vendoring in library source code should be removed (best effort) to avoid potential ODR violations. If upstream takes care to rename -symbols, it may be acceptable. +Vendoring in library source code should be removed (in a best effort basis) to avoid potential ODR violations. +If upstream takes care to rename symbols, it may be acceptable. From 82ce59a934733cecd7dc308214a06225908d64c4 Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Thu, 7 Mar 2024 10:42:14 +0000 Subject: [PATCH 186/405] (#23006) tensorflow-lite: resolve conflicts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * tensorflow-lite: resolve conflicts * Bump abseil to latest patch available --------- Co-authored-by: Rubén Rincón Blanco --- recipes/tensorflow-lite/all/conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/tensorflow-lite/all/conanfile.py b/recipes/tensorflow-lite/all/conanfile.py index 5b4b074e11411..7a430b9baca1a 100644 --- a/recipes/tensorflow-lite/all/conanfile.py +++ b/recipes/tensorflow-lite/all/conanfile.py @@ -73,7 +73,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("abseil/20230125.1") + self.requires("abseil/20230125.3") self.requires("eigen/3.4.0") self.requires("farmhash/cci.20190513") self.requires("fft/cci.20061228") @@ -83,9 +83,9 @@ def requirements(self): if self.settings.arch in ("x86", "x86_64"): self.requires("intel-neon2sse/cci.20210225") if self.options.with_xnnpack: - self.requires("xnnpack/cci.20220801") + self.requires("xnnpack/cci.20231026") # https://github.com/tensorflow/tensorflow/blob/359c3cdfc5fabac82b3c70b3b6de2b0a8c16874f/tensorflow/lite/delegates/xnnpack/xnnpack_delegate.cc#L165 - self.requires("pthreadpool/cci.20210218") + self.requires("pthreadpool/cci.20231129") if self.options.with_xnnpack or self.options.get_safe("with_nnapi", False): self.requires("fp16/cci.20210320") From ebf0181df2898265487442d7b20bfb89f1b4dc48 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Thu, 7 Mar 2024 12:23:32 +0000 Subject: [PATCH 187/405] (#23018) [bot] Update authorized users list (2024-03-07) Co-authored-by: conan-center-bot --- .c3i/authorized_users.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index a09f911a11265..6a1a5108eaac2 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1298,3 +1298,4 @@ authorized_users: - camm73 - crstzh - gagoi +- dbolduc From 72b035c3cefff9dc5f56a6809252c959f6f59482 Mon Sep 17 00:00:00 2001 From: Tatyana Raguzova Date: Thu, 7 Mar 2024 14:28:09 +0100 Subject: [PATCH 188/405] (#22913) openvino: added 2024.0.0 version --- recipes/openvino/all/conandata.yml | 29 + recipes/openvino/all/conanfile.py | 5 +- .../dependencies/dependencies-2024.0.0.yml | 1 + ...0001-Include-mutex-for-std-call_once.patch | 13 + .../0002-Fix-includes-for-dev-api.patch | 13 + ...port-OpenVINO-compilation-with-cpp20.patch | 501 ++++++++++++++++++ .../openvino/all/test_package/test_package.c | 16 +- recipes/openvino/config.yml | 2 + 8 files changed, 570 insertions(+), 10 deletions(-) create mode 100644 recipes/openvino/all/dependencies/dependencies-2024.0.0.yml create mode 100644 recipes/openvino/all/patches/2024.0.0/0001-Include-mutex-for-std-call_once.patch create mode 100644 recipes/openvino/all/patches/2024.0.0/0002-Fix-includes-for-dev-api.patch create mode 100644 recipes/openvino/all/patches/2024.0.0/0003-Support-OpenVINO-compilation-with-cpp20.patch diff --git a/recipes/openvino/all/conandata.yml b/recipes/openvino/all/conandata.yml index d95f3c25c32fa..dd23e75ae9252 100644 --- a/recipes/openvino/all/conandata.yml +++ b/recipes/openvino/all/conandata.yml @@ -1,4 +1,20 @@ sources: + "2024.0.0": + "openvino": + url: "https://github.com/openvinotoolkit/openvino/archive/refs/tags/2024.0.0.tar.gz" + sha256: "b3c257f8af9545ae68a6ea217173b2b2de9dd42d35e8703a7a51d76f4c2bfe2f" + "arm_compute": + url: "https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v23.08.tar.gz" + sha256: "62f514a555409d4401e5250b290cdf8cf1676e4eb775e5bd61ea6a740a8ce24f" + "onednn_cpu": + url: "https://github.com/openvinotoolkit/oneDNN/archive/f82148befdbdc9576ec721c9d500155ee4de8060.tar.gz" + sha256: "7fce5c6b499ffe1a30c26b2d4e4a5193a38aa217b6f54e44eea52b21cf38a684" + "mlas": + url: "https://github.com/openvinotoolkit/mlas/archive/d1bc25ec4660cddd87804fcf03b2411b5dfb2e94.tar.gz" + sha256: "0a44fbfd4b13e8609d66ddac4b11a27c90c1074cde5244c91ad197901666004c" + "onednn_gpu": + url: "https://github.com/oneapi-src/oneDNN/archive/494af5f9921bdae98f1a0e2955fa7d76ff386c4f.tar.gz" + sha256: "e2f36563cecf39197ad8d4f8b351ccc5a431085dad26e47c0ae6f0bb79149df7" "2023.3.0": "openvino": url: "https://github.com/openvinotoolkit/openvino/archive/refs/tags/2023.3.0.tar.gz" @@ -48,6 +64,19 @@ sources: url: "https://github.com/oneapi-src/oneDNN/archive/4b82a66ed38ecaa993352e5cc6ed7753656b8a26.tar.gz" sha256: "cb17c003fe51bc9b4e20189573956b4446468162adf0fc4cea2ee0820cff0cd0" patches: + "2024.0.0": + - patch_file: "patches/2024.0.0/0001-Include-mutex-for-std-call_once.patch" + patch_description: "Include mutex for std::call_once" + patch_type: "portability" + patch_source: "https://github.com/openvinotoolkit/openvino/pull/23151" + - patch_file: "patches/2024.0.0/0002-Fix-includes-for-dev-api.patch" + patch_description: "Include tensor for dev api" + patch_type: "portability" + patch_source: "https://github.com/openvinotoolkit/openvino/pull/23175" + - patch_file: "patches/2024.0.0/0003-Support-OpenVINO-compilation-with-cpp20.patch" + patch_description: "Add support to OpenVINO to build it with standards newer than cpp11" + patch_type: "portability" + patch_source: "https://github.com/openvinotoolkit/openvino/pull/22784" "2023.2.0": - patch_file: "patches/2023.2.0/0001-git-version.patch" patch_description: "Fixed issue with version on Windows" diff --git a/recipes/openvino/all/conanfile.py b/recipes/openvino/all/conanfile.py index d7d8677eb943d..d5b090836295b 100644 --- a/recipes/openvino/all/conanfile.py +++ b/recipes/openvino/all/conanfile.py @@ -355,8 +355,9 @@ def package_info(self): if self.options.enable_pytorch_frontend: openvino_runtime.libs.append("openvino_pytorch_frontend") # Common private dependencies should go last, because they satisfy dependencies for all other libraries - openvino_runtime.libs.extend(["openvino_reference", "openvino_builders", - "openvino_shape_inference", "openvino_itt", + if Version(self.version) < "2024.0.0": + openvino_runtime.libs.append("openvino_builders") + openvino_runtime.libs.extend(["openvino_reference", "openvino_shape_inference", "openvino_itt", # utils goes last since all others depend on it "openvino_util"]) # set 'openvino' once again for transformations objects files (cyclic dependency) diff --git a/recipes/openvino/all/dependencies/dependencies-2024.0.0.yml b/recipes/openvino/all/dependencies/dependencies-2024.0.0.yml new file mode 100644 index 0000000000000..f99604741682a --- /dev/null +++ b/recipes/openvino/all/dependencies/dependencies-2024.0.0.yml @@ -0,0 +1 @@ +onnx: "1.15.0" diff --git a/recipes/openvino/all/patches/2024.0.0/0001-Include-mutex-for-std-call_once.patch b/recipes/openvino/all/patches/2024.0.0/0001-Include-mutex-for-std-call_once.patch new file mode 100644 index 0000000000000..6c0e89e765f9f --- /dev/null +++ b/recipes/openvino/all/patches/2024.0.0/0001-Include-mutex-for-std-call_once.patch @@ -0,0 +1,13 @@ +diff --git a/src/inference/src/dev/make_tensor.cpp b/src/inference/src/dev/make_tensor.cpp +index e34497749a..f28c90ccf4 100644 +--- a/src/inference/src/dev/make_tensor.cpp ++++ b/src/inference/src/dev/make_tensor.cpp +@@ -5,6 +5,7 @@ + #include "openvino/runtime/make_tensor.hpp" + + #include ++#include + + #include "openvino/runtime/iremote_tensor.hpp" + #include "openvino/runtime/properties.hpp" + diff --git a/recipes/openvino/all/patches/2024.0.0/0002-Fix-includes-for-dev-api.patch b/recipes/openvino/all/patches/2024.0.0/0002-Fix-includes-for-dev-api.patch new file mode 100644 index 0000000000000..1e33d8172c049 --- /dev/null +++ b/recipes/openvino/all/patches/2024.0.0/0002-Fix-includes-for-dev-api.patch @@ -0,0 +1,13 @@ +diff --git a/src/inference/src/dev/make_tensor.cpp b/src/inference/src/dev/make_tensor.cpp +index f28c90ccf4..e457b81fc0 100644 +--- a/src/inference/src/dev/make_tensor.cpp ++++ b/src/inference/src/dev/make_tensor.cpp +@@ -9,6 +9,7 @@ + + #include "openvino/runtime/iremote_tensor.hpp" + #include "openvino/runtime/properties.hpp" ++#include "openvino/runtime/tensor.hpp" + #ifdef PROXY_PLUGIN_ENABLED + # include "openvino/proxy/plugin.hpp" + #endif + diff --git a/recipes/openvino/all/patches/2024.0.0/0003-Support-OpenVINO-compilation-with-cpp20.patch b/recipes/openvino/all/patches/2024.0.0/0003-Support-OpenVINO-compilation-with-cpp20.patch new file mode 100644 index 0000000000000..52337a8f822c9 --- /dev/null +++ b/recipes/openvino/all/patches/2024.0.0/0003-Support-OpenVINO-compilation-with-cpp20.patch @@ -0,0 +1,501 @@ +diff --git a/.github/workflows/linux_conditional_compilation.yml b/.github/workflows/linux_conditional_compilation.yml +index 4f2d7d8ec9..f74802072c 100644 +--- a/.github/workflows/linux_conditional_compilation.yml ++++ b/.github/workflows/linux_conditional_compilation.yml +@@ -152,6 +152,7 @@ jobs: + run: | + cmake \ + -G "${{ env.CMAKE_GENERATOR }}" \ ++ -DCMAKE_CXX_STANDARD=20 \ + -DBUILD_SHARED_LIBS=OFF \ + -DENABLE_TESTS=ON \ + -DENABLE_CPPLINT=OFF \ +diff --git a/.github/workflows/windows_conditional_compilation.yml b/.github/workflows/windows_conditional_compilation.yml +index 6a47f620e7..ead6c37c87 100644 +--- a/.github/workflows/windows_conditional_compilation.yml ++++ b/.github/workflows/windows_conditional_compilation.yml +@@ -147,6 +147,7 @@ jobs: + run: | + cmake -G "${{ env.CMAKE_GENERATOR }}" ` + -DBUILD_SHARED_LIBS=OFF ` ++ -DCMAKE_CXX_STANDARD=20 ` + -DENABLE_TESTS=ON ` + -DENABLE_CPPLINT=OFF ` + -DENABLE_NCC_STYLE=OFF ` +diff --git a/docs/snippets/CMakeLists.txt b/docs/snippets/CMakeLists.txt +index 89c39d706d..415f1dea88 100644 +--- a/docs/snippets/CMakeLists.txt ++++ b/docs/snippets/CMakeLists.txt +@@ -15,6 +15,10 @@ if(UNUSED_BUT_SET_VARIABLE_SUPPORTED) + ov_add_compiler_flags(-Wno-unused-but-set-variable) + endif() + ++if((CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) AND CMAKE_CXX_STANDARD GREATER_EQUAL 20) ++ set(CMAKE_CXX_FLAGS "-Wno-error=deprecated ${CMAKE_CXX_FLAGS}") ++endif() ++ + file(GLOB SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/*.c") +diff --git a/samples/cpp/hello_classification/main.cpp b/samples/cpp/hello_classification/main.cpp +index b0624b9a54..940ab918dd 100644 +--- a/samples/cpp/hello_classification/main.cpp ++++ b/samples/cpp/hello_classification/main.cpp +@@ -28,7 +28,8 @@ int tmain(int argc, tchar* argv[]) { + + // -------- Parsing and validation of input arguments -------- + if (argc != 4) { +- slog::info << "Usage : " << argv[0] << " " << slog::endl; ++ slog::info << "Usage : " << TSTRING2STRING(argv[0]) << " " ++ << slog::endl; + return EXIT_FAILURE; + } + +diff --git a/src/common/low_precision_transformations/CMakeLists.txt b/src/common/low_precision_transformations/CMakeLists.txt +index 215cb74de0..a325407d82 100644 +--- a/src/common/low_precision_transformations/CMakeLists.txt ++++ b/src/common/low_precision_transformations/CMakeLists.txt +@@ -16,6 +16,9 @@ source_group("src" FILES ${LIBRARY_SRC}) + source_group("include" FILES ${PUBLIC_HEADERS}) + + # Create library ++if((CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) AND CMAKE_CXX_STANDARD GREATER_EQUAL 20) ++ set(CMAKE_CXX_FLAGS "-Wno-error=deprecated ${CMAKE_CXX_FLAGS}") ++endif() + + add_library(${TARGET_NAME}_obj OBJECT + ${LIBRARY_SRC} +diff --git a/src/common/snippets/CMakeLists.txt b/src/common/snippets/CMakeLists.txt +index b3d2db77b7..dcde389cde 100644 +--- a/src/common/snippets/CMakeLists.txt ++++ b/src/common/snippets/CMakeLists.txt +@@ -16,6 +16,9 @@ source_group("src" FILES ${LIBRARY_SRC}) + source_group("include" FILES ${PUBLIC_HEADERS}) + + # Create static library ++if((CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) AND CMAKE_CXX_STANDARD GREATER_EQUAL 20) ++ set(CMAKE_CXX_FLAGS "-Wno-error=deprecated ${CMAKE_CXX_FLAGS}") ++endif() + + add_library(${TARGET_NAME} STATIC + ${LIBRARY_SRC} +diff --git a/src/common/transformations/CMakeLists.txt b/src/common/transformations/CMakeLists.txt +index c4c4ccaa9b..1d398b0054 100644 +--- a/src/common/transformations/CMakeLists.txt ++++ b/src/common/transformations/CMakeLists.txt +@@ -16,6 +16,9 @@ source_group("src" FILES ${LIBRARY_SRC}) + source_group("include" FILES ${PUBLIC_HEADERS}) + + # Create library ++if((CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) AND CMAKE_CXX_STANDARD GREATER_EQUAL 20) ++ set(CMAKE_CXX_FLAGS "-Wno-error=deprecated ${CMAKE_CXX_FLAGS}") ++endif() + + add_library(${TARGET_NAME}_obj OBJECT ${LIBRARY_SRC} ${PUBLIC_HEADERS}) + target_compile_definitions(${TARGET_NAME}_obj PRIVATE IMPLEMENT_OPENVINO_API) +diff --git a/src/common/transformations/include/transformations/rt_info/nms_selected_indices.hpp b/src/common/transformations/include/transformations/rt_info/nms_selected_indices.hpp +index 0719a5347c..28fa98d324 100644 +--- a/src/common/transformations/include/transformations/rt_info/nms_selected_indices.hpp ++++ b/src/common/transformations/include/transformations/rt_info/nms_selected_indices.hpp +@@ -21,7 +21,7 @@ TRANSFORMATIONS_API bool has_nms_selected_indices(const Node* node); + + TRANSFORMATIONS_API void set_nms_selected_indices(Node* node); + +-class TRANSFORMATIONS_API NmsSelectedIndices : ov::RuntimeAttribute { ++class TRANSFORMATIONS_API NmsSelectedIndices : public ov::RuntimeAttribute { + public: + OPENVINO_RTTI("nms_selected_indices", "0"); + NmsSelectedIndices() = default; +diff --git a/src/core/tests/matcher_pass.cpp b/src/core/tests/matcher_pass.cpp +index ae0b6d911c..0ac381a531 100644 +--- a/src/core/tests/matcher_pass.cpp ++++ b/src/core/tests/matcher_pass.cpp +@@ -25,7 +25,7 @@ public: + auto m_relu1 = ov::pass::pattern::wrap_type(pattern::consumers_count(1)); + auto m_relu2 = ov::pass::pattern::wrap_type({m_relu1}); + +- ov::graph_rewrite_callback callback = [=](pattern::Matcher& m) { ++ ov::graph_rewrite_callback callback = [m_relu1, this](pattern::Matcher& m) { + // Map that helps to connect labels with matched outputs + auto& node_to_output = m.get_pattern_value_map(); + +diff --git a/src/frontends/paddle/src/CMakeLists.txt b/src/frontends/paddle/src/CMakeLists.txt +index af0cf0373a..57241ae95a 100644 +--- a/src/frontends/paddle/src/CMakeLists.txt ++++ b/src/frontends/paddle/src/CMakeLists.txt +@@ -2,6 +2,10 @@ + # SPDX-License-Identifier: Apache-2.0 + # + ++if((CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) AND CMAKE_CXX_STANDARD GREATER_EQUAL 20) ++ set(CMAKE_CXX_FLAGS "-Wno-error=deprecated ${CMAKE_CXX_FLAGS}") ++endif() ++ + ov_add_frontend(NAME paddle + LINKABLE_FRONTEND + PROTOBUF_REQUIRED +diff --git a/src/frontends/pytorch/src/CMakeLists.txt b/src/frontends/pytorch/src/CMakeLists.txt +index 814d820b5c..7fb8c4ae50 100644 +--- a/src/frontends/pytorch/src/CMakeLists.txt ++++ b/src/frontends/pytorch/src/CMakeLists.txt +@@ -2,6 +2,10 @@ + # SPDX-License-Identifier: Apache-2.0 + # + ++if((CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) AND CMAKE_CXX_STANDARD GREATER_EQUAL 20) ++ set(CMAKE_CXX_FLAGS "-Wno-error=deprecated ${CMAKE_CXX_FLAGS}") ++endif() ++ + ov_add_frontend(NAME pytorch + LINKABLE_FRONTEND + SHUTDOWN_PROTOBUF +diff --git a/src/frontends/tensorflow/src/variables_index.cpp b/src/frontends/tensorflow/src/variables_index.cpp +index 2dcf3faf9e..3d97022bc6 100644 +--- a/src/frontends/tensorflow/src/variables_index.cpp ++++ b/src/frontends/tensorflow/src/variables_index.cpp +@@ -228,11 +228,11 @@ bool VariablesIndex::read_variables(std::ifstream& vi_stream, const std::wstring + } + if (m_mmap_enabled) { + m_data_files[shard].mmap = load_mmap_object(fullPath); +- FRONT_END_GENERAL_CHECK(m_data_files[shard].mmap->data(), L"Variable index data cannot be mapped"); ++ FRONT_END_GENERAL_CHECK(m_data_files[shard].mmap->data(), "Variable index data cannot be mapped"); + } else { + m_data_files[shard].stream = std::shared_ptr( + new std::ifstream(fullPath.c_str(), std::ifstream::in | std::ifstream::binary)); +- FRONT_END_GENERAL_CHECK(m_data_files[shard].stream->is_open(), L"Variable index data file does not exist"); ++ FRONT_END_GENERAL_CHECK(m_data_files[shard].stream->is_open(), "Variable index data file does not exist"); + } + } + +diff --git a/src/inference/tests/functional/caching_test.cpp b/src/inference/tests/functional/caching_test.cpp +index 1b45c2bd4a..c1a7d685f4 100644 +--- a/src/inference/tests/functional/caching_test.cpp ++++ b/src/inference/tests/functional/caching_test.cpp +@@ -2359,9 +2359,7 @@ TEST_P(CachingTest, LoadBATCHWithConfig) { + EXPECT_CALL(*mockPlugin, get_property(ov::internal::caching_properties.name(), _)).Times(AnyNumber()); + EXPECT_CALL(*mockPlugin, get_property(ov::hint::performance_mode.name(), _)) + .Times(AnyNumber()) +- .WillRepeatedly(Return([] { +- return ov::hint::PerformanceMode::THROUGHPUT; +- })); ++ .WillRepeatedly(Return(ov::hint::PerformanceMode::THROUGHPUT)); + if (m_remoteContext) { + return; // skip the remote Context test for Auto plugin + } +@@ -2490,4 +2488,4 @@ INSTANTIATE_TEST_SUITE_P(CacheTestWithProxyEnabled, + CacheTestWithProxyEnabled, + ::testing::Combine(::testing::ValuesIn(loadVariants), ::testing::ValuesIn(cacheFolders)), + getTestCaseName); +-#endif +\ No newline at end of file ++#endif +diff --git a/src/plugins/auto_batch/src/sync_infer_request.cpp b/src/plugins/auto_batch/src/sync_infer_request.cpp +index c766c521ce..707adedc3b 100644 +--- a/src/plugins/auto_batch/src/sync_infer_request.cpp ++++ b/src/plugins/auto_batch/src/sync_infer_request.cpp +@@ -160,4 +160,4 @@ std::vector SyncInferRequest::get_profiling_info() const { + return m_batched_request_wrapper->_infer_request_batched->get_profiling_info(); + } + } // namespace autobatch_plugin +-} // namespace ov +\ No newline at end of file ++} // namespace ov +diff --git a/src/plugins/intel_cpu/CMakeLists.txt b/src/plugins/intel_cpu/CMakeLists.txt +index 3a15194061..962ba21c0e 100644 +--- a/src/plugins/intel_cpu/CMakeLists.txt ++++ b/src/plugins/intel_cpu/CMakeLists.txt +@@ -8,6 +8,10 @@ endif() + + set(TARGET_NAME "openvino_intel_cpu_plugin") + ++if((CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) AND CMAKE_CXX_STANDARD GREATER_EQUAL 20) ++ set(CMAKE_CXX_FLAGS "-Wno-error=deprecated ${CMAKE_CXX_FLAGS}") ++endif() ++ + if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + # C4267, 4244 issues from oneDNN headers conversion from 'XXX' to 'YYY', possible loss of data + ov_add_compiler_flags(/wd4018) +@@ -205,7 +209,7 @@ if(BUILD_SHARED_LIBS) + $) + + target_include_directories(${TARGET_NAME}_obj SYSTEM PUBLIC $) +- ++ + if(ENABLE_MLAS_FOR_CPU) + target_include_directories(${TARGET_NAME}_obj SYSTEM PUBLIC $) + endif() +diff --git a/src/plugins/intel_cpu/src/cache/multi_cache.h b/src/plugins/intel_cpu/src/cache/multi_cache.h +index 746499bd9b..8225f5ed0f 100644 +--- a/src/plugins/intel_cpu/src/cache/multi_cache.h ++++ b/src/plugins/intel_cpu/src/cache/multi_cache.h +@@ -41,10 +41,14 @@ public: + * Also the builder type is used for the ValueType deduction + * @return result of the operation which is a pair of the requested object of ValType and the status of whether the cache hit or miss occurred + */ +- +- template::type> +- typename CacheEntry::ResultType +- getOrCreate(const KeyType& key, BuilderType builder) { ++ template 201703L)) || (defined(__cplusplus) && (__cplusplus > 201703L)) ++ typename ValueType = std::invoke_result_t> ++#else ++ typename ValueType = typename std::result_of::type> ++#endif ++ typename CacheEntry::ResultType getOrCreate(const KeyType& key, BuilderType builder) { + auto entry = getEntry(); + return entry->getOrCreate(key, std::move(builder)); + } +diff --git a/src/plugins/intel_cpu/src/graph.cpp b/src/plugins/intel_cpu/src/graph.cpp +index 39a72bd80a..e1362e3302 100644 +--- a/src/plugins/intel_cpu/src/graph.cpp ++++ b/src/plugins/intel_cpu/src/graph.cpp +@@ -1093,6 +1093,17 @@ private: + #endif + + #if (OV_THREAD == OV_THREAD_TBB || OV_THREAD == OV_THREAD_TBB_AUTO || OV_THREAD == OV_THREAD_OMP) ++ ++# if (defined(_MSVC_LANG) && (_MSVC_LANG > 201703L)) || (defined(__cplusplus) && (__cplusplus > 201703L)) ++# define ov_memory_order_release std::memory_order_release ++# define ov_memory_order_relaxed std::memory_order_relaxed ++# define ov_memory_order_acquire std::memory_order_acquire ++# else ++# define ov_memory_order_release std::memory_order::memory_order_release ++# define ov_memory_order_relaxed std::memory_order::memory_order_relaxed ++# define ov_memory_order_acquire std::memory_order::memory_order_acquire ++# endif ++ + class UpdateNodesBase : public IUpdateNodes { + public: + explicit UpdateNodesBase(std::vector& executableGraphNodes) : m_executableGraphNodes(executableGraphNodes) {} +@@ -1103,22 +1114,22 @@ public: + if (node->isDynamicNode()) { + node->updateShapes(); + } +- m_prepareCounter.store(i, std::memory_order::memory_order_release); ++ m_prepareCounter.store(i, ov_memory_order_release); + } + } + catch(...) { +- m_completion.store(true, std::memory_order::memory_order_relaxed); ++ m_completion.store(true, ov_memory_order_relaxed); + throw; + } +- m_prepareCounter.store(stop_indx, std::memory_order::memory_order_relaxed); +- m_completion.store(true, std::memory_order::memory_order_release); ++ m_prepareCounter.store(stop_indx, ov_memory_order_relaxed); ++ m_completion.store(true, ov_memory_order_release); + } + + void updateDynParams(size_t node_indx, size_t /*unused*/) { + size_t local_counter = node_indx; + while (true) { +- const bool completion = m_completion.load(std::memory_order::memory_order_acquire); +- const size_t prepareCounter = m_prepareCounter.load(std::memory_order::memory_order_relaxed); ++ const bool completion = m_completion.load(ov_memory_order_acquire); ++ const size_t prepareCounter = m_prepareCounter.load(ov_memory_order_relaxed); + if (completion && local_counter == prepareCounter) { + break; + } +diff --git a/src/plugins/intel_cpu/src/nodes/executors/fullyconnected_implementations.cpp b/src/plugins/intel_cpu/src/nodes/executors/fullyconnected_implementations.cpp +index 0f656c7049..cae4a605f6 100644 +--- a/src/plugins/intel_cpu/src/nodes/executors/fullyconnected_implementations.cpp ++++ b/src/plugins/intel_cpu/src/nodes/executors/fullyconnected_implementations.cpp +@@ -244,7 +244,10 @@ const std::vector>& getImplementations() { + return true; + }, + // create +- [](const FCAttrs& attrs, const PostOps& postOps, const MemoryArgs& memory, ExecutorContext::CPtr context) { ++ [](const FCAttrs& attrs, ++ const PostOps& postOps, ++ const MemoryArgs& memory, ++ ExecutorContext::CPtr context) -> std::shared_ptr { + struct ConvolutionInstantiator { + std::shared_ptr operator()( + const MemoryArgs& memory, +diff --git a/src/plugins/intel_cpu/src/nodes/inverse.cpp b/src/plugins/intel_cpu/src/nodes/inverse.cpp +index 93f0df2948..04c283fc2f 100644 +--- a/src/plugins/intel_cpu/src/nodes/inverse.cpp ++++ b/src/plugins/intel_cpu/src/nodes/inverse.cpp +@@ -153,7 +153,7 @@ void Inverse::lu_decomposition(const T* data, + + // Find maximum value pivot - non-parallel + for (size_t i = (k + 1) * m_side, j = k + 1; i < m_side_squared; i += m_side, ++j) { +- if (abs(U[i + k]) > abs(U[pivot_idx + k])) { ++ if (std::abs(U[i + k]) > std::abs(U[pivot_idx + k])) { + pivot_row = j; + pivot_idx = pivot_row * m_side; + } +diff --git a/src/plugins/intel_cpu/src/nodes/kernels/x64/jit_kernel.hpp b/src/plugins/intel_cpu/src/nodes/kernels/x64/jit_kernel.hpp +index e837dc7fdf..ecc3688c68 100644 +--- a/src/plugins/intel_cpu/src/nodes/kernels/x64/jit_kernel.hpp ++++ b/src/plugins/intel_cpu/src/nodes/kernels/x64/jit_kernel.hpp +@@ -700,6 +700,9 @@ private: + std::unordered_map> _emitters; + }; + ++template <> ++const Xbyak::Reg64& jit_kernel::reserve(); ++ + template + void jit_kernel::copy(const Xbyak::Reg64& dst, + const Xbyak::Reg64& src, +diff --git a/src/plugins/intel_gpu/CMakeLists.txt b/src/plugins/intel_gpu/CMakeLists.txt +index e48c985ad7..18a941ca79 100644 +--- a/src/plugins/intel_gpu/CMakeLists.txt ++++ b/src/plugins/intel_gpu/CMakeLists.txt +@@ -8,6 +8,10 @@ endif() + + set (TARGET_NAME "openvino_intel_gpu_plugin") + ++if((CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) AND CMAKE_CXX_STANDARD GREATER_EQUAL 20) ++ set(CMAKE_CXX_FLAGS "-Wno-error=deprecated ${CMAKE_CXX_FLAGS}") ++endif() ++ + if(CMAKE_COMPILER_IS_GNUCXX) + ov_add_compiler_flags(-Wno-strict-aliasing) + endif() +diff --git a/src/plugins/intel_gpu/src/graph/graph_optimizer/reorder_inputs.cpp b/src/plugins/intel_gpu/src/graph/graph_optimizer/reorder_inputs.cpp +index 0148026b6c..20b229ad9c 100644 +--- a/src/plugins/intel_gpu/src/graph/graph_optimizer/reorder_inputs.cpp ++++ b/src/plugins/intel_gpu/src/graph/graph_optimizer/reorder_inputs.cpp +@@ -689,16 +689,16 @@ void reorder_inputs::run(program& p, layout_optimizer& lo, reorder_factory& rf) + } + + GPU_DEBUG_IF(debug_config->verbose >= 2) { +- reorder_cnt total_reorder_count = std::accumulate( +- p.get_processing_order().begin(), +- p.get_processing_order().end(), +- reorder_cnt{ 0, 0 }, +- [&](reorder_cnt& total, program_node* node) { +- if (fmt_map.count(node) == 0 || fmt_map.at(node) == format::any) +- return total; +- auto count = count_reorders(fmt_map, lo, node); +- return reorder_cnt{ total.number + count.number, total.total_sizes + count.total_sizes }; +- }); ++ reorder_cnt total_reorder_count = ++ std::accumulate(p.get_processing_order().begin(), ++ p.get_processing_order().end(), ++ reorder_cnt{0, 0}, ++ [&](reorder_cnt total, program_node* node) { ++ if (fmt_map.count(node) == 0 || fmt_map.at(node) == format::any) ++ return total; ++ auto count = count_reorders(fmt_map, lo, node); ++ return reorder_cnt{total.number + count.number, total.total_sizes + count.total_sizes}; ++ }); + // Divide results by two as above function will each reorder from both sides + GPU_DEBUG_LOG_PASS << "Total number of reorders: " << total_reorder_count.number / 2 << std::endl; + GPU_DEBUG_LOG_PASS << "Total elements count of all reorders: " << total_reorder_count.total_sizes / 2 << std::endl; +diff --git a/src/plugins/intel_gpu/src/kernel_selector/auto_tuner.cpp b/src/plugins/intel_gpu/src/kernel_selector/auto_tuner.cpp +index a5d0711f61..d71a6834e8 100644 +--- a/src/plugins/intel_gpu/src/kernel_selector/auto_tuner.cpp ++++ b/src/plugins/intel_gpu/src/kernel_selector/auto_tuner.cpp +@@ -36,6 +36,27 @@ + #include + #endif + ++#if __cplusplus > 201703L ++ ++// Add operators `==` and `!=` for rapidjson::GenericMemberIterator for non const iterator when build with C++20, ++// is more strict regarding type checks. ++namespace rapidjson { ++ ++template ++inline bool operator==(GenericMemberIterator lhs, ++ GenericMemberIterator rhs) { ++ return static_cast>(lhs) == ++ static_cast>(rhs); ++} ++ ++template ++inline bool operator!=(GenericMemberIterator lhs, ++ GenericMemberIterator rhs) { ++ return !(lhs == rhs); ++} ++} // namespace rapidjson ++#endif ++ + namespace kernel_selector { + + class TuningCache::Impl { +diff --git a/src/plugins/intel_gpu/src/kernel_selector/kernel_selector_common.cpp b/src/plugins/intel_gpu/src/kernel_selector/kernel_selector_common.cpp +index 6caa5e75a4..3a14e9d802 100644 +--- a/src/plugins/intel_gpu/src/kernel_selector/kernel_selector_common.cpp ++++ b/src/plugins/intel_gpu/src/kernel_selector/kernel_selector_common.cpp +@@ -612,10 +612,8 @@ std::string toString_v2(const DataTensor& tensor) { + std::stringstream s; + s << toString(tensor.GetDType()) << "_"; + s << toString(tensor.GetLayout()); +- int i = 0; + for (auto dim : tensor.GetDims()) { + s << "_v" << dim.v << "_p" << dim.pad.before << "_" << dim.pad.after; +- i++; + } + return s.str(); + } +diff --git a/src/plugins/intel_gpu/tests/unit/module_tests/primitive_comparison_test.cpp b/src/plugins/intel_gpu/tests/unit/module_tests/primitive_comparison_test.cpp +index 0390593b59..3e0f608a9e 100644 +--- a/src/plugins/intel_gpu/tests/unit/module_tests/primitive_comparison_test.cpp ++++ b/src/plugins/intel_gpu/tests/unit/module_tests/primitive_comparison_test.cpp +@@ -11,6 +11,13 @@ + #include + #include + ++namespace cldnn { ++// For gtest NE compare, class defines only `==` operator. Required when building using C++20 ++inline bool operator!=(const range& lhs, const fully_connected& rhs) { ++ return !(lhs.operator==(rhs)); ++} ++} // namespace cldnn ++ + using namespace cldnn; + using namespace ::tests; + +diff --git a/src/tests/test_utils/common_test_utils/src/file_utils.cpp b/src/tests/test_utils/common_test_utils/src/file_utils.cpp +index b1b8b42797..eadaab6b71 100644 +--- a/src/tests/test_utils/common_test_utils/src/file_utils.cpp ++++ b/src/tests/test_utils/common_test_utils/src/file_utils.cpp +@@ -192,7 +192,7 @@ std::string getRelativePath(const std::string& from, const std::string& to) { + output += std::accumulate(mismatch_it.first, + from_vec.end(), + std::string{}, +- [&separator](std::string& a, const std::string&) -> std::string { ++ [&separator](std::string a, const std::string&) -> std::string { + return a += ".." + separator; + }); + } +@@ -203,7 +203,7 @@ std::string getRelativePath(const std::string& from, const std::string& to) { + output += std::accumulate(mismatch_it.second, + to_vec.end(), + std::string{}, +- [&separator](std::string& a, const std::string& b) -> std::string { ++ [&separator](std::string a, const std::string& b) -> std::string { + return a.empty() ? a += b : a += separator + b; + }); + return output; +diff --git a/thirdparty/itt_collector/sea_itt_lib/sea_itt_lib.cpp b/thirdparty/itt_collector/sea_itt_lib/sea_itt_lib.cpp +index 18196eda17..a764b27e68 100644 +--- a/thirdparty/itt_collector/sea_itt_lib/sea_itt_lib.cpp ++++ b/thirdparty/itt_collector/sea_itt_lib/sea_itt_lib.cpp +@@ -327,14 +327,14 @@ SEA_EXPORT int NotifyEvent(iJIT_JVM_EVENT event_type, void* EventSpecificData) { + + switch (event_type) { + case iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED: { +- sea::WriteJit(&(uint32_t)methodData->method_id, sizeof(uint32_t)); ++ sea::WriteJit(&methodData->method_id, sizeof(uint32_t)); + sea::WriteJit(&methodData->method_load_address, sizeof(void*)); +- sea::WriteJit(&(uint32_t)methodData->method_size, sizeof(uint32_t)); +- sea::WriteJit(&(uint32_t)methodData->line_number_size, sizeof(uint32_t)); ++ sea::WriteJit(&methodData->method_size, sizeof(uint32_t)); ++ sea::WriteJit(&methodData->line_number_size, sizeof(uint32_t)); + for (unsigned int i = 0; i < methodData->line_number_size; ++i) { + const LineNumberInfo& lni = methodData->line_number_table[i]; +- sea::WriteJit(&(uint32_t)lni.Offset, sizeof(uint32_t)); +- sea::WriteJit(&(uint32_t)lni.LineNumber, sizeof(uint32_t)); ++ sea::WriteJit(&lni.Offset, sizeof(uint32_t)); ++ sea::WriteJit(&lni.LineNumber, sizeof(uint32_t)); + } + + const char* strings[] = {methodData->method_name, methodData->class_file_name, methodData->source_file_name}; + diff --git a/recipes/openvino/all/test_package/test_package.c b/recipes/openvino/all/test_package/test_package.c index 1cea5771a2dbf..efe358d0b6ecb 100644 --- a/recipes/openvino/all/test_package/test_package.c +++ b/recipes/openvino/all/test_package/test_package.c @@ -23,21 +23,21 @@ int test_available_devices() { OV_FAIL(ov_core_get_property(core, "GPU", "AVAILABLE_DEVICES", &ret)); #endif #ifdef ENABLE_AUTO - OV_SUCCESS(ov_core_get_property(core, "AUTO", "SUPPORTED_METRICS", &ret)); - OV_SUCCESS(ov_core_get_property(core, "MULTI", "SUPPORTED_METRICS", &ret)); + OV_SUCCESS(ov_core_get_property(core, "AUTO", "SUPPORTED_PROPERTIES", &ret)); + OV_SUCCESS(ov_core_get_property(core, "MULTI", "SUPPORTED_PROPERTIES", &ret)); #else - OV_FAIL(ov_core_get_property(core, "AUTO", "SUPPORTED_METRICS", &ret)); - OV_FAIL(ov_core_get_property(core, "MULTI", "SUPPORTED_METRICS", &ret)); + OV_FAIL(ov_core_get_property(core, "AUTO", "SUPPORTED_PROPERTIES", &ret)); + OV_FAIL(ov_core_get_property(core, "MULTI", "SUPPORTED_PROPERTIES", &ret)); #endif #ifdef ENABLE_HETERO - OV_SUCCESS(ov_core_get_property(core, "HETERO", "SUPPORTED_METRICS", &ret)); + OV_SUCCESS(ov_core_get_property(core, "HETERO", "SUPPORTED_PROPERTIES", &ret)); #else - OV_FAIL(ov_core_get_property(core, "HETERO", "SUPPORTED_METRICS", &ret)); + OV_FAIL(ov_core_get_property(core, "HETERO", "SUPPORTED_PROPERTIES", &ret)); #endif #ifdef ENABLE_AUTO_BATCH - OV_SUCCESS(ov_core_get_property(core, "BATCH", "SUPPORTED_METRICS", &ret)); + OV_SUCCESS(ov_core_get_property(core, "BATCH", "SUPPORTED_PROPERTIES", &ret)); #else - OV_FAIL(ov_core_get_property(core, "BATCH", "SUPPORTED_METRICS", &ret)); + OV_FAIL(ov_core_get_property(core, "BATCH", "SUPPORTED_PROPERTIES", &ret)); #endif ov_core_free(core); return 0; diff --git a/recipes/openvino/config.yml b/recipes/openvino/config.yml index 0a0ed9e05655b..c055e48da509b 100644 --- a/recipes/openvino/config.yml +++ b/recipes/openvino/config.yml @@ -1,4 +1,6 @@ versions: + "2024.0.0": + folder: "all" "2023.3.0": folder: "all" "2023.2.0": From b7c0af9305ded638c1d18ecb622643c469fae539 Mon Sep 17 00:00:00 2001 From: Steven Lamerton Date: Thu, 7 Mar 2024 15:08:16 +0100 Subject: [PATCH 189/405] (#22718) libsvtav1: Unvendor use of cpuinfo * libsvtav1: Unvendor use of cpuinfo * libsvtav1: Unvendor use of cpuinfo * Use cpuinfo on all platforms * Fix patch types --- recipes/libsvtav1/all/conandata.yml | 22 ++++++ recipes/libsvtav1/all/conanfile.py | 6 ++ .../all/patches/external-cpuinfo-1.2.1.patch | 68 +++++++++++++++++++ .../all/patches/external-cpuinfo-1.3.0.patch | 68 +++++++++++++++++++ .../all/patches/external-cpuinfo-1.4.1.patch | 68 +++++++++++++++++++ .../all/patches/external-cpuinfo-1.6.0.patch | 68 +++++++++++++++++++ .../all/patches/external-cpuinfo-1.7.0.patch | 68 +++++++++++++++++++ 7 files changed, 368 insertions(+) create mode 100644 recipes/libsvtav1/all/patches/external-cpuinfo-1.2.1.patch create mode 100644 recipes/libsvtav1/all/patches/external-cpuinfo-1.3.0.patch create mode 100644 recipes/libsvtav1/all/patches/external-cpuinfo-1.4.1.patch create mode 100644 recipes/libsvtav1/all/patches/external-cpuinfo-1.6.0.patch create mode 100644 recipes/libsvtav1/all/patches/external-cpuinfo-1.7.0.patch diff --git a/recipes/libsvtav1/all/conandata.yml b/recipes/libsvtav1/all/conandata.yml index 54555aa218224..fcb9aa5c7563f 100644 --- a/recipes/libsvtav1/all/conandata.yml +++ b/recipes/libsvtav1/all/conandata.yml @@ -15,18 +15,40 @@ sources: 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" + patch_type: "portability" + patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2178 + patch_description: "Allow compiling with external cpuinfo" + "1.6.0": + - patch_file: "patches/external-cpuinfo-1.6.0.patch" + 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 ae303bae006ef..881442bca3f0b 100644 --- a/recipes/libsvtav1/all/conanfile.py +++ b/recipes/libsvtav1/all/conanfile.py @@ -43,6 +43,9 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") + def requirements(self): + self.requires("cpuinfo/cci.20231129") + def build_requirements(self): if Version(self.version) >= "1.3.0": self.tool_requires("cmake/[>=3.16 <4]") @@ -57,6 +60,7 @@ def generate(self): tc.variables["BUILD_APPS"] = False 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"): tc.variables["ENABLE_NASM"] = True tc.generate() @@ -82,11 +86,13 @@ def package_info(self): self.cpp_info.components["encoder"].libs = ["SvtAv1Enc"] self.cpp_info.components["encoder"].includedirs = ["include/svt-av1"] self.cpp_info.components["encoder"].set_property("pkg_config_name", "SvtAv1Enc") + 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: 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") + self.cpp_info.components["decoder"].requires = ["cpuinfo::cpuinfo"] if self.settings.os in ("FreeBSD", "Linux"): self.cpp_info.components["encoder"].system_libs = ["pthread", "dl", "m"] diff --git a/recipes/libsvtav1/all/patches/external-cpuinfo-1.2.1.patch b/recipes/libsvtav1/all/patches/external-cpuinfo-1.2.1.patch new file mode 100644 index 0000000000000..8e74085d78f88 --- /dev/null +++ b/recipes/libsvtav1/all/patches/external-cpuinfo-1.2.1.patch @@ -0,0 +1,68 @@ +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 new file mode 100644 index 0000000000000..8540fba08ffe5 --- /dev/null +++ b/recipes/libsvtav1/all/patches/external-cpuinfo-1.3.0.patch @@ -0,0 +1,68 @@ +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 new file mode 100644 index 0000000000000..6673e558c5c3e --- /dev/null +++ b/recipes/libsvtav1/all/patches/external-cpuinfo-1.4.1.patch @@ -0,0 +1,68 @@ +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/patches/external-cpuinfo-1.6.0.patch b/recipes/libsvtav1/all/patches/external-cpuinfo-1.6.0.patch new file mode 100644 index 0000000000000..02c89e25a93f1 --- /dev/null +++ b/recipes/libsvtav1/all/patches/external-cpuinfo-1.6.0.patch @@ -0,0 +1,68 @@ +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 b651306f208f2ff0e577e89ce37fed3e80eea0ce..25df70551b8db09becab23cfa5000f03b90a9c77 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 88553bfc4511ffcd5571300d1d45c9302d9316a6..a587e7c6ba15f7528482f476b46506b09c12cf2e 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.7.0.patch b/recipes/libsvtav1/all/patches/external-cpuinfo-1.7.0.patch new file mode 100644 index 0000000000000..c6d38c46f187f --- /dev/null +++ b/recipes/libsvtav1/all/patches/external-cpuinfo-1.7.0.patch @@ -0,0 +1,68 @@ +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 3ed7c05a28ad1b46f2a79e23630d6ad17e6c6741..251a592a46046ae1878e2913683f3417db0260ad 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -152,7 +152,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 58642d108e2a4b042e2f7a66180e1ba2d06f043e..5b7d001473af01305d396b3d2f312adc0b3f5b81 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/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/Source/Lib/Encoder/CMakeLists.txt b/Source/Lib/Encoder/CMakeLists.txt +index e2a1348aa2c07a7283266323bcf58d15dc278555..13be1227444afa74055cd5172ded084de4474b91 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() + From 6965eaab49d3b316a97a312763be32bcba883a21 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 7 Mar 2024 16:43:34 +0200 Subject: [PATCH 190/405] (#18978) rdma-core: add new recipe * rdma-core: new recipe * rdma-core: add libnl dependency * rdma-core: fix libnl dependency * rdma-core: bump version to v48.0 * rdma-core: make some libraries optional * rdma-core: fix license copying * rdma-core: tidy package_info() * rdma-core: ignore driver errors in test_package.cpp * rdma-core: limit to Linux only * rdma-core: bump to 49.0 --- recipes/rdma-core/all/conandata.yml | 4 + recipes/rdma-core/all/conanfile.py | 133 ++++++++++++++++++ .../rdma-core/all/test_package/CMakeLists.txt | 7 + .../rdma-core/all/test_package/conanfile.py | 26 ++++ .../all/test_package/test_package.cpp | 62 ++++++++ recipes/rdma-core/config.yml | 3 + 6 files changed, 235 insertions(+) create mode 100644 recipes/rdma-core/all/conandata.yml create mode 100644 recipes/rdma-core/all/conanfile.py create mode 100644 recipes/rdma-core/all/test_package/CMakeLists.txt create mode 100644 recipes/rdma-core/all/test_package/conanfile.py create mode 100644 recipes/rdma-core/all/test_package/test_package.cpp create mode 100644 recipes/rdma-core/config.yml diff --git a/recipes/rdma-core/all/conandata.yml b/recipes/rdma-core/all/conandata.yml new file mode 100644 index 0000000000000..4d08bc2892211 --- /dev/null +++ b/recipes/rdma-core/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "49.0": + url: "https://github.com/linux-rdma/rdma-core/releases/download/v49.0/rdma-core-49.0.tar.gz" + sha256: "953546ad2b179f9ce68dc21eb1eb26003098ea1bf0f87a4baed45bcea134b2b4" diff --git a/recipes/rdma-core/all/conanfile.py b/recipes/rdma-core/all/conanfile.py new file mode 100644 index 0000000000000..99a8017855d89 --- /dev/null +++ b/recipes/rdma-core/all/conanfile.py @@ -0,0 +1,133 @@ +import os +import re + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout, CMakeDeps +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import get, copy, rmdir, load, save, replace_in_file +from conan.tools.gnu import PkgConfigDeps + +required_conan_version = ">=1.53.0" + +class PackageConan(ConanFile): + name = "rdma-core" + description = ("RDMA core userspace libraries and daemons. " + "Provides userspace components for the Linux Kernel's drivers/infiniband subsystem.") + license = ("GPL-2.0", "Linux-OpenIB", "BSD-2-Clause") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/linux-rdma/rdma-core" + topics = ("linux-kernel", "rdma", "infiniband", "iwarp", "roce", "kernel-rdma-drivers", + "libefa", "libibmad", "libibnetdisc", "libibumad", "libibverbs", "libmana", + "libmlx4", "libmlx5", "librdmacm") + + package_type = "shared-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "build_libefa": [True, False], + "build_libibnetdisc": [True, False], + "build_libmana": [True, False], + "build_libmlx4": [True, False], + "build_libmlx5": [True, False], + "build_librdmacm": [True, False], + } + default_options = { + "build_libefa": True, + "build_libibnetdisc": True, + "build_libmana": True, + "build_libmlx4": True, + "build_libmlx5": False, + "build_librdmacm": False, + } + + def configure(self): + 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("libnl/3.8.0") + if self.settings.os in ["Linux", "FreeBSD"]: + self.requires("libudev/system") + + def validate(self): + if self.settings.os not in ["Linux", "FreeBSD"]: + # libnl is only available on Linux + raise ConanInvalidConfiguration("rdma-core is only supported on Linux") + + def build_requirements(self): + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.1.0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = VirtualBuildEnv(self) + tc.generate() + tc = CMakeToolchain(self) + # Shared libraries are built by default and even if ENABLE_STATIC is turned on, + # the static libraries still have dependencies on the shared libraries. + # tc.variables["ENABLE_STATIC"] = not self.options.shared + tc.variables["NO_PYVERBS"] = True + tc.variables["NO_MAN_PAGES"] = True + tc.generate() + deps = CMakeDeps(self) + deps.generate() + deps = PkgConfigDeps(self) + deps.generate() + + def _patch_sources(self): + # Build only the libraries and disable everything else + allowed_subdirs = ["ccan", "kernel-boot", "kernel-headers", "libibmad", "libibnetdisc", "libibumad", "libibverbs", + "librdmacm", "providers/efa", "providers/mana", "providers/mlx4", "providers/mlx5", "util"] + allowed_subdirs = [ + subdir for subdir in allowed_subdirs + if self.options.get_safe(f"build_{subdir.replace('providers/', 'lib')}", True) + ] + cmakelists_path = os.path.join(self.source_folder, "CMakeLists.txt") + cmakelists_content = load(self, cmakelists_path) + patched_content = re.sub(r"add_subdirectory\((?!({})\)).+\)".format("|".join(allowed_subdirs)), r"", cmakelists_content) + save(self, cmakelists_path, patched_content) + # Adjust the pkg-config target for libnl + replace_in_file(self, cmakelists_path, "libnl-3.0 libnl-route-3.0", "libnl") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "COPYING.*", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "etc")) + + def package_info(self): + def _add_component(name, requires, pthread=False): + if not self.options.get_safe(f"build_{name}", True): + return + component = self.cpp_info.components[name] + component.set_property("pkg_config_name", name) + component.libs = [name.replace("lib", "")] + component.requires = requires + ["libudev::libudev"] + if pthread and self.settings.os in ["Linux", "FreeBSD"]: + component.system_libs = ["pthread"] + + _add_component("libefa", ["libibverbs"], pthread=True) + _add_component("libibmad", ["libibumad"]) + _add_component("libibnetdisc", ["libibmad", "libibumad"]) + _add_component("libibumad", []) + _add_component("libibverbs", ["libnl::nl", "libnl::nl-route"], pthread=True) + _add_component("libmana", ["libibverbs"], pthread=True) + _add_component("libmlx4", ["libibverbs"], pthread=True) + _add_component("libmlx5", ["libibverbs"], pthread=True) + _add_component("librdmacm", ["libibverbs", "libnl::nl", "libnl::nl-route"], pthread=True) + diff --git a/recipes/rdma-core/all/test_package/CMakeLists.txt b/recipes/rdma-core/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..232275e72fa44 --- /dev/null +++ b/recipes/rdma-core/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +find_package(rdma-core REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE rdma-core::libibverbs) diff --git a/recipes/rdma-core/all/test_package/conanfile.py b/recipes/rdma-core/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/rdma-core/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/rdma-core/all/test_package/test_package.cpp b/recipes/rdma-core/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..abeb298aef336 --- /dev/null +++ b/recipes/rdma-core/all/test_package/test_package.cpp @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2004 Topspin Communications. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU + * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include + +#include + +#include + +int main(int argc, char *argv[]) +{ + struct ibv_device **dev_list; + int num_devices, i; + + dev_list = ibv_get_device_list(&num_devices); + if (!dev_list) { + perror("Failed to get IB devices list"); + return 0; + } + + printf(" %-16s\t node GUID\n", "device"); + printf(" %-16s\t----------------\n", "------"); + + for (i = 0; i < num_devices; ++i) { + printf(" %-16s\t%016llx\n", + ibv_get_device_name(dev_list[i]), + (unsigned long long) be64toh(ibv_get_device_guid(dev_list[i]))); + } + + ibv_free_device_list(dev_list); + + return 0; +} diff --git a/recipes/rdma-core/config.yml b/recipes/rdma-core/config.yml new file mode 100644 index 0000000000000..14360fc69dbd2 --- /dev/null +++ b/recipes/rdma-core/config.yml @@ -0,0 +1,3 @@ +versions: + "49.0": + folder: all From f885060de0a0afc79675c5ca047afa7fcf174b8a Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 7 Mar 2024 17:23:31 +0200 Subject: [PATCH 191/405] (#19618) cn-cbor: remove invalid check_min_cppstd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * cn-cbor: add version cci.20200822, remove invalid check_min_cppstd * Update recipes/cn-cbor/all/conandata.yml * Update recipes/cn-cbor/config.yml --------- Co-authored-by: Francisco Ramírez --- recipes/cn-cbor/all/conandata.yml | 4 ++-- recipes/cn-cbor/all/conanfile.py | 21 ++++++++++++------- recipes/cn-cbor/all/test_package/conanfile.py | 2 +- recipes/cn-cbor/config.yml | 1 - 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/recipes/cn-cbor/all/conandata.yml b/recipes/cn-cbor/all/conandata.yml index 4de861bba88a9..617cedf518b2c 100644 --- a/recipes/cn-cbor/all/conandata.yml +++ b/recipes/cn-cbor/all/conandata.yml @@ -1,4 +1,4 @@ sources: "1.0.0": - sha256: eca2bcc15b8400037fd95748724287afbb966e34d4d0275a496b4872bcea9d77 - url: https://github.com/jimsch/cn-cbor/archive/1.0.0.zip + url: "https://github.com/jimsch/cn-cbor/archive/1.0.0.zip" + sha256: "eca2bcc15b8400037fd95748724287afbb966e34d4d0275a496b4872bcea9d77" diff --git a/recipes/cn-cbor/all/conanfile.py b/recipes/cn-cbor/all/conanfile.py index 91eccd3167699..d10556f9c9031 100644 --- a/recipes/cn-cbor/all/conanfile.py +++ b/recipes/cn-cbor/all/conanfile.py @@ -2,7 +2,6 @@ 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 @@ -42,8 +41,6 @@ def layout(self): cmake_layout(self, src_folder="src") def validate(self): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) if self.settings.os == "Windows" and self.options.shared: raise ConanInvalidConfiguration("Windows shared builds are not supported right now") @@ -52,10 +49,16 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["fatal_warnings"] = False - tc.variables["coveralls"] = False - tc.variables["build_tests"] = False - tc.variables["build_docs"] = False + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = self.options.shared + tc.cache_variables["CN_CBOR_FATAL_WARNINGS"] = False + tc.cache_variables["CN_CBOR_COVERALLS"] = False + tc.cache_variables["CN_CBOR_BUILD_TESTS"] = False + tc.cache_variables["CN_CBOR_BUILD_DOCS"] = False + # For v1.0.0 + tc.cache_variables["fatal_warnings"] = False + tc.cache_variables["coveralls"] = False + tc.cache_variables["build_tests"] = False + tc.cache_variables["build_docs"] = False tc.generate() def build(self): @@ -64,7 +67,9 @@ def build(self): cmake.build() def package(self): - copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) cmake = CMake(self) cmake.install() os.remove(os.path.join(self.package_folder, "README.md")) diff --git a/recipes/cn-cbor/all/test_package/conanfile.py b/recipes/cn-cbor/all/test_package/conanfile.py index fae501d0afb9e..ef5d7042163ec 100644 --- a/recipes/cn-cbor/all/test_package/conanfile.py +++ b/recipes/cn-cbor/all/test_package/conanfile.py @@ -6,7 +6,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" test_type = "explicit" def requirements(self): diff --git a/recipes/cn-cbor/config.yml b/recipes/cn-cbor/config.yml index 8f50af2b049ed..c7f13630776fb 100644 --- a/recipes/cn-cbor/config.yml +++ b/recipes/cn-cbor/config.yml @@ -1,4 +1,3 @@ ---- versions: "1.0.0": folder: "all" From 5df252c7190b202e33b03df70eaf4b21bfcdd2e9 Mon Sep 17 00:00:00 2001 From: Carlos Zoido Date: Thu, 7 Mar 2024 17:42:05 +0100 Subject: [PATCH 192/405] (#23015) Add install_substitutes for zypper with "xorgproto-devel" --- recipes/opengl/all/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/opengl/all/conanfile.py b/recipes/opengl/all/conanfile.py index 5ccf58c206f4b..21ba6fcb6a6e6 100644 --- a/recipes/opengl/all/conanfile.py +++ b/recipes/opengl/all/conanfile.py @@ -36,7 +36,8 @@ def system_requirements(self): pacman.install(["libglvnd"], update=True, check=True) zypper = package_manager.Zypper(self) - zypper.install(["Mesa-libGL-devel", "glproto-devel"], update=True, check=True) + zypper.install_substitutes(["Mesa-libGL-devel", "glproto-devel"], + ["Mesa-libGL-devel", "xorgproto-devel"], update=True, check=True) pkg = package_manager.Pkg(self) pkg.install(["libglvnd"], update=True, check=True) From c4308b493f37390333773d651c80b015b714ae69 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 8 Mar 2024 03:07:48 +0900 Subject: [PATCH 193/405] (#22891) idna: add recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * idna: add recipe * make cmake 3.16 * remove sample topics Co-authored-by: Rubén Rincón Blanco * fix target name * fix license Co-authored-by: Martin Valgur * Add VirtualBuildEnv Co-authored-by: Martin Valgur * Add missing import for VirtualBuildEnv * Explicity disable building benchmarks Co-authored-by: Uilian Ries * Revert license names Co-authored-by: Uilian Ries * update cci.20240228, remove cmake wrapper --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: Martin Valgur Co-authored-by: Uilian Ries --- recipes/idna/all/conandata.yml | 4 + recipes/idna/all/conanfile.py | 85 +++++++++++++++++++ recipes/idna/all/test_package/CMakeLists.txt | 8 ++ recipes/idna/all/test_package/conanfile.py | 26 ++++++ .../idna/all/test_package/test_package.cpp | 14 +++ recipes/idna/config.yml | 3 + 6 files changed, 140 insertions(+) create mode 100644 recipes/idna/all/conandata.yml create mode 100644 recipes/idna/all/conanfile.py create mode 100644 recipes/idna/all/test_package/CMakeLists.txt create mode 100644 recipes/idna/all/test_package/conanfile.py create mode 100644 recipes/idna/all/test_package/test_package.cpp create mode 100644 recipes/idna/config.yml diff --git a/recipes/idna/all/conandata.yml b/recipes/idna/all/conandata.yml new file mode 100644 index 0000000000000..9c2dca57fc556 --- /dev/null +++ b/recipes/idna/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20240228": + url: "https://github.com/ada-url/idna/archive/fff988508f659ef5c6494572ebea3d5db2466ed0.tar.gz" + sha256: "68cf182f822d8e8599f827767e215a0c4f67f381d729e4ba15509443b52f849b" diff --git a/recipes/idna/all/conanfile.py b/recipes/idna/all/conanfile.py new file mode 100644 index 0000000000000..2e0091c585904 --- /dev/null +++ b/recipes/idna/all/conanfile.py @@ -0,0 +1,85 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import get, copy +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +import os + +required_conan_version = ">=1.52.0" + +class IdnaConan(ConanFile): + name = "idna" + description = "C++ library implementing the to_ascii and to_unicode functions from the Unicode Technical Standard." + license = ("Apache-2.0", "MIT") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ada-url/idna/" + topics = ("unicode", "icu") + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "fPIC": [True, False], + } + default_options = { + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + 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.16 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + VirtualBuildEnv(self).generate() + + tc = CMakeToolchain(self) + tc.variables["BUILD_TESTING"] = False + tc.variables["ADA_IDNA_BENCHMARKS"] = False + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="LICENSE-*", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["ada-idna"] + self.cpp_info.set_property("cmake_file_name", "ada-idna") + self.cpp_info.set_property("cmake_target_name", "ada-idna") diff --git a/recipes/idna/all/test_package/CMakeLists.txt b/recipes/idna/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..889584ca451e0 --- /dev/null +++ b/recipes/idna/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(ada-idna REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE ada-idna) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/idna/all/test_package/conanfile.py b/recipes/idna/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/idna/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/idna/all/test_package/test_package.cpp b/recipes/idna/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..cbb7f6eeb2dec --- /dev/null +++ b/recipes/idna/all/test_package/test_package.cpp @@ -0,0 +1,14 @@ +#include +#include + +#include "idna.h" + +int main(void) { + std::string_view input = reinterpret_cast(u8"meßagefactory.ca"); // non-empty UTF-8 string, must be percent decoded + std::string idna_ascii = ada::idna::to_ascii(input); + if(idna_ascii.empty()) { + // There was an error. + } + std::cout << idna_ascii << std::endl; + // outputs 'xn--meagefactory-m9a.ca' if the input is u8"meßagefactory.ca" +} diff --git a/recipes/idna/config.yml b/recipes/idna/config.yml new file mode 100644 index 0000000000000..34cca17a5b748 --- /dev/null +++ b/recipes/idna/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20240228": + folder: all From 659121febb31eb9d73e1347a46765db9673565cc Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Fri, 8 Mar 2024 01:47:48 -0600 Subject: [PATCH 194/405] (#22996) avahi: Fix conflicting definition of strlcpy from glibc * avahi: Fix conflicting definition of strlcpy from glibc I was unable to coerce glibc to not include the function declaration for strlcpy. It's included in `/usr/include/string.h` in recent versions of glibc. At least version 2.38 of glibc. Since I couldn't avoid the definition from glibc, I removed the static keyword to make the definitions the same. Avahi should still use its internal strlcpy in this situation. * Rename the strlcpy function to avoid conflicts * Update recipes/avahi/all/conandata.yml Co-authored-by: Uilian Ries --------- Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Co-authored-by: Uilian Ries --- recipes/avahi/all/conandata.yml | 5 ++ recipes/avahi/all/conanfile.py | 6 +- ...ing-definition-with-strlcpy-in-glibc.patch | 79 +++++++++++++++++++ 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 recipes/avahi/all/patches/0.8-0001-Avoid-conflicting-definition-with-strlcpy-in-glibc.patch diff --git a/recipes/avahi/all/conandata.yml b/recipes/avahi/all/conandata.yml index 49b6c0881959d..6cf843ad984a8 100644 --- a/recipes/avahi/all/conandata.yml +++ b/recipes/avahi/all/conandata.yml @@ -2,3 +2,8 @@ sources: "0.8": url: "https://github.com/lathiat/avahi/releases/download/v0.8/avahi-0.8.tar.gz" sha256: "060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda" +patches: + "0.8": + - patch_file: "patches/0.8-0001-Avoid-conflicting-definition-with-strlcpy-in-glibc.patch" + patch_description: "Avoid conflicting definition with glibc strlcpy" + patch_type: "conan" diff --git a/recipes/avahi/all/conanfile.py b/recipes/avahi/all/conanfile.py index fdd5b5034805a..5aa91dc39e695 100644 --- a/recipes/avahi/all/conanfile.py +++ b/recipes/avahi/all/conanfile.py @@ -3,7 +3,7 @@ from conan import ConanFile from conan.tools.build import can_run from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv -from conan.tools.files import copy, get, rmdir, rm +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, rm from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain, PkgConfigDeps from conan.tools.layout import basic_layout from conan.errors import ConanInvalidConfiguration @@ -32,6 +32,9 @@ class AvahiConan(ConanFile): "fPIC": True, } + def export_sources(self): + export_conandata_patches(self) + def configure(self): if self.options.shared: self.options.rm_safe("fPIC") @@ -86,6 +89,7 @@ def generate(self): env.vars(self).save_script("conanbuild_pkg_config") def build(self): + apply_conandata_patches(self) autotools = Autotools(self) autotools.configure() autotools.make() diff --git a/recipes/avahi/all/patches/0.8-0001-Avoid-conflicting-definition-with-strlcpy-in-glibc.patch b/recipes/avahi/all/patches/0.8-0001-Avoid-conflicting-definition-with-strlcpy-in-glibc.patch new file mode 100644 index 0000000000000..3a595ccc1cb70 --- /dev/null +++ b/recipes/avahi/all/patches/0.8-0001-Avoid-conflicting-definition-with-strlcpy-in-glibc.patch @@ -0,0 +1,79 @@ +From 495f8868f4cdad235608c7ac732ade17d3d49b17 Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Wed, 6 Mar 2024 09:44:33 -0600 +Subject: [PATCH] Avoid conflicting definition with strlcpy in glibc + +--- + avahi-common/domain.c | 8 ++------ + avahi-compat-howl/text.c | 8 ++------ + 2 files changed, 4 insertions(+), 12 deletions(-) + +diff --git a/avahi-common/domain.c b/avahi-common/domain.c +index 3b1ab68..555aeb3 100644 +--- a/avahi-common/domain.c ++++ b/avahi-common/domain.c +@@ -477,9 +477,7 @@ int avahi_service_name_join(char *p, size_t size, const char *name, const char * + return AVAHI_OK; + } + +-#ifndef HAVE_STRLCPY +- +-static size_t strlcpy(char *dest, const char *src, size_t n) { ++static size_t avahi_strlcpy(char *dest, const char *src, size_t n) { + assert(dest); + assert(src); + +@@ -491,8 +489,6 @@ static size_t strlcpy(char *dest, const char *src, size_t n) { + return strlen(src); + } + +-#endif +- + int avahi_service_name_split(const char *p, char *name, size_t name_size, char *type, size_t type_size, char *domain, size_t domain_size) { + enum { + NAME, +@@ -524,7 +520,7 @@ int avahi_service_name_split(const char *p, char *name, size_t name_size, char * + + switch (state) { + case NAME: +- strlcpy(name, buf, name_size); ++ avahi_strlcpy(name, buf, name_size); + state = TYPE; + break; + +diff --git a/avahi-compat-howl/text.c b/avahi-compat-howl/text.c +index 7ef4df3..45f43ae 100644 +--- a/avahi-compat-howl/text.c ++++ b/avahi-compat-howl/text.c +@@ -37,9 +37,7 @@ struct _sw_text_record { + int buffer_valid; + }; + +-#ifndef HAVE_STRLCPY +- +-static size_t strlcpy(char *dest, const char *src, size_t n) { ++static size_t avahi_strlcpy(char *dest, const char *src, size_t n) { + assert(dest); + assert(src); + +@@ -51,8 +49,6 @@ static size_t strlcpy(char *dest, const char *src, size_t n) { + return strlen(src); + } + +-#endif +- + sw_result sw_text_record_init(sw_text_record *self) { + assert(self); + +@@ -244,7 +240,7 @@ sw_result sw_text_record_iterator_next( + if (avahi_string_list_get_pair(self->index, &mkey, &mvalue, &msize) < 0) + return SW_E_UNKNOWN; + +- strlcpy(key, mkey, SW_TEXT_RECORD_MAX_LEN); ++ avahi_strlcpy(key, mkey, SW_TEXT_RECORD_MAX_LEN); + memset(val, 0, SW_TEXT_RECORD_MAX_LEN); + memcpy(val, mvalue, msize); + *val_len = msize; +-- +2.44.0 + From 544b0cd842c0c9a7cd24c6be305b26babb81b4b5 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Fri, 8 Mar 2024 09:07:40 +0100 Subject: [PATCH 195/405] (#22895) stale workflow: don't remove stale label twice the stale label is already removed automatically by the action. `labels-to-remove-when-unstale` is used to remove additional labels. https://github.com/actions/stale?tab=readme-ov-file#labels-to-remove-when-unstale https://github.com/conan-io/conan-center-index/actions/runs/8044709241/job/21968729920#step:2:25205 https://github.com/conan-io/conan-center-index/actions/runs/8044709241/job/21968729920#step:2:25208 --- .github/workflows/stale.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index c9c6239fc08ea..5e391a2d5e860 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -42,8 +42,6 @@ jobs: # Label to apply on staled PRs stale-pr-label: 'stale' - # Label to be removed when updating a PR - labels-to-remove-when-unstale: 'stale' # Skip issues when having stale state remove-issue-stale-when-updated: false From 20b2d5041e4c20d61777fa8def7af68c1e1723c2 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 8 Mar 2024 17:28:41 +0900 Subject: [PATCH 196/405] (#23000) minizip-ng: add version 4.0.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * minizip-ng/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericLemanissier.github.io/conan-center-index-bump-deps/) * Update conanfile.py * minizip-ng/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericLemanissier.github.io/conan-center-index-bump-deps/) * minizip-ng: add version 4.0.5 * revert xz_utils Co-authored-by: Rubén Rincón Blanco --------- Co-authored-by: Eric Lemanissier (bot) Co-authored-by: ericLemanissier Co-authored-by: Rubén Rincón Blanco --- recipes/minizip-ng/all/conandata.yml | 3 +++ recipes/minizip-ng/all/conanfile.py | 4 ++-- recipes/minizip-ng/config.yml | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/recipes/minizip-ng/all/conandata.yml b/recipes/minizip-ng/all/conandata.yml index 59d6ffad1b8f1..1c6819fac1991 100644 --- a/recipes/minizip-ng/all/conandata.yml +++ b/recipes/minizip-ng/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.0.5": + url: "https://github.com/zlib-ng/minizip-ng/archive/4.0.5.tar.gz" + sha256: "9bb636474b8a4269280d32aca7de4501f5c24cc642c9b4225b4ed7b327f4ee73" "4.0.4": url: "https://github.com/zlib-ng/minizip-ng/archive/4.0.4.tar.gz" sha256: "955800fe39f9d830fcb84e60746952f6a48e41093ec7a233c63ad611b5fcfe9f" diff --git a/recipes/minizip-ng/all/conanfile.py b/recipes/minizip-ng/all/conanfile.py index 01cfddc75128c..7d26ebb7bc61f 100644 --- a/recipes/minizip-ng/all/conanfile.py +++ b/recipes/minizip-ng/all/conanfile.py @@ -94,7 +94,7 @@ def requirements(self): def build_requirements(self): if self._needs_pkg_config: - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") if Version(self.version) >= "4.0.0": self.tool_requires("cmake/[>=3.19 <4]") @@ -163,7 +163,7 @@ def package_info(self): # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed prefix = "lib" if is_msvc(self) or self._is_clang_cl else "" - suffix = "" if Version(self.version) < "3.0.5" or self.options.mz_compatibility else "-ng" + suffix = "" if self.options.mz_compatibility else "-ng" self.cpp_info.components["minizip"].libs = [f"{prefix}minizip{suffix}"] if self.options.with_lzma: self.cpp_info.components["minizip"].defines.append("HAVE_LZMA") diff --git a/recipes/minizip-ng/config.yml b/recipes/minizip-ng/config.yml index 8a16d3eeb883f..c5531d3a6ec01 100644 --- a/recipes/minizip-ng/config.yml +++ b/recipes/minizip-ng/config.yml @@ -1,4 +1,6 @@ versions: + "4.0.5": + folder: all "4.0.4": folder: all "4.0.3": From 26060802f4ae6b24df26409bd6e233c4eb1d42fb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 09:01:47 +0000 Subject: [PATCH 197/405] (#23017) [docs] Regenerate tables of contents Co-authored-by: conan-center-bot <54393557+conan-center-bot@users.noreply.github.com> --- docs/adding_packages/dependencies.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/adding_packages/dependencies.md b/docs/adding_packages/dependencies.md index f22925892a890..80a83e5335fbf 100644 --- a/docs/adding_packages/dependencies.md +++ b/docs/adding_packages/dependencies.md @@ -16,6 +16,7 @@ from handling "vendored" dependencies to what versions should be used. * [Overriding the provided properties from the consumer](#overriding-the-provided-properties-from-the-consumer) * [Adherence to Build Service](#adherence-to-build-service) * [Version Ranges](#version-ranges) + * [Adding Version Ranges](#adding-version-ranges) * [Handling "internal" dependencies](#handling-internal-dependencies) ## List Dependencies From e7fb49ee12bc36f497a0510f744d7936b8adccab Mon Sep 17 00:00:00 2001 From: Klaus Holst Jacobsen <48069914+klausholstjacobsen@users.noreply.github.com> Date: Fri, 8 Mar 2024 10:28:22 +0100 Subject: [PATCH 198/405] (#22679) boost: Honoring tools.build:defines --- recipes/boost/all/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index a8416e04190c4..f2f1c3f6feecd 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -1143,6 +1143,9 @@ def add_defines(library): if self._with_zstd: add_defines("zstd") + for define in self.conf.get("tools.build:defines", default=[], check_type=list): + flags.append(f"define={define}") + if is_msvc(self): flags.append(f"runtime-link={'static' if is_msvc_static_runtime(self) else 'shared'}") flags.append(f"runtime-debugging={'on' if 'd' in msvc_runtime_flag(self) else 'off'}") From 15b6bb5de29d7af453b9b1ef3c266245bf797ac5 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Fri, 8 Mar 2024 04:07:51 -0600 Subject: [PATCH 199/405] (#22957) pcl: Use the mesa-glu Conan package This is done the same way as for the FreeGLUT package in #22428. Requires #22956. Fixes #22944. --- recipes/pcl/all/conanfile.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/recipes/pcl/all/conanfile.py b/recipes/pcl/all/conanfile.py index 3d3a9f2fd7b3e..662a6430c2633 100644 --- a/recipes/pcl/all/conanfile.py +++ b/recipes/pcl/all/conanfile.py @@ -1,5 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, rm @@ -212,7 +213,7 @@ def _ext_dep_to_conan_target(self, dep): "libusb": ["libusb::libusb"], "metslib": [], "opencv": ["opencv::opencv"], - "opengl": ["opengl::opengl", "freeglut::freeglut", "glew::glew", "glu::glu"], + "opengl": ["opengl::opengl", "freeglut::freeglut", "glew::glew", "glu::glu" if is_apple_os(self) or self.settings.os == "Windows" else "mesa-glu::mesa-glu"], "openni": [], "openni2": [], "pcap": ["libpcap::libpcap"], @@ -380,7 +381,10 @@ def requirements(self): self.requires("opengl/system", transitive_headers=True) self.requires("freeglut/3.4.0", transitive_headers=True) self.requires("glew/2.2.0", transitive_headers=True) - self.requires("glu/system", transitive_headers=True) + if is_apple_os(self) or self.settings.os == "Windows": + self.requires("glu/system", transitive_headers=True) + else: + self.requires("mesa-glu/9.0.3", transitive_headers=True) if self._is_enabled("opencv"): self.requires("opencv/4.8.1", transitive_headers=True) if self._is_enabled("zlib"): From 556ff2cbee7c7044d94471048f431eb1125ffeb9 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 8 Mar 2024 19:27:53 +0900 Subject: [PATCH 200/405] (#23022) neargye-semver: add version 0.3.1 --- recipes/neargye-semver/all/conandata.yml | 3 +++ recipes/neargye-semver/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/neargye-semver/all/conandata.yml b/recipes/neargye-semver/all/conandata.yml index 98327d51fc307..6859f75eb1461 100644 --- a/recipes/neargye-semver/all/conandata.yml +++ b/recipes/neargye-semver/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.3.1": + url: "https://github.com/Neargye/semver/archive/refs/tags/v0.3.1.tar.gz" + sha256: "422b5882460a685a455fda9da53b85aa1824dcb9ba9dfbd0460ce50393f71061" "0.3.0": url: "https://github.com/Neargye/semver/archive/refs/tags/v0.3.0.tar.gz" sha256: "f88697a059e7a850ca65315828682e14c34958fb585c3b8555b9d89f5c76e3cc" diff --git a/recipes/neargye-semver/config.yml b/recipes/neargye-semver/config.yml index d126790212e0c..f9de643fda854 100644 --- a/recipes/neargye-semver/config.yml +++ b/recipes/neargye-semver/config.yml @@ -1,3 +1,5 @@ versions: + "0.3.1": + folder: all "0.3.0": folder: all From 18dd5145cb58b6cb79b97986c771e7333fb3a1c7 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 8 Mar 2024 19:48:23 +0900 Subject: [PATCH 201/405] (#23023) rapidfuzz: add version 3.0.2, fix urls, remove cci version * rapidfuzz: add version 3.0.2, fix homepage url * use C++11 instread of C++98 * remove cci. version --- recipes/rapidfuzz/all/conandata.yml | 18 +++++++++--------- recipes/rapidfuzz/all/conanfile.py | 6 ++---- recipes/rapidfuzz/config.yml | 4 ++-- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/recipes/rapidfuzz/all/conandata.yml b/recipes/rapidfuzz/all/conandata.yml index c548146b1f784..79328af160566 100644 --- a/recipes/rapidfuzz/all/conandata.yml +++ b/recipes/rapidfuzz/all/conandata.yml @@ -1,22 +1,22 @@ sources: + "3.0.2": + url: "https://github.com/rapidfuzz/rapidfuzz-cpp/archive/refs/tags/v3.0.2.tar.gz" + sha256: "4fddce5c0368e78bd604c6b820e6be248d669754715e39b4a8a281bda4c06de1" "3.0.0": - url: "https://github.com/maxbachmann/rapidfuzz-cpp/archive/refs/tags/v3.0.0.tar.gz" + url: "https://github.com/rapidfuzz/rapidfuzz-cpp/archive/refs/tags/v3.0.0.tar.gz" sha256: "26a76c5a881c07638567557c1d73f6601f0d444816de03f297d731b1e019f21b" "2.2.3": - url: "https://github.com/maxbachmann/rapidfuzz-cpp/archive/refs/tags/v2.2.3.tar.gz" + url: "https://github.com/rapidfuzz/rapidfuzz-cpp/archive/refs/tags/v2.2.3.tar.gz" sha256: "df4412e9593945782de2212095bd4b70a8f8e63ae8f313976c616809be124d2c" "2.2.0": - url: "https://github.com/maxbachmann/rapidfuzz-cpp/archive/refs/tags/v2.2.0.tar.gz" + url: "https://github.com/rapidfuzz/rapidfuzz-cpp/archive/refs/tags/v2.2.0.tar.gz" sha256: "8fe2d2792ee8b32598f4aa3aad5db7d449fb3c4a32387080f650335cf4faef81" "2.1.1": - url: "https://github.com/maxbachmann/rapidfuzz-cpp/archive/refs/tags/v2.1.1.tar.gz" + url: "https://github.com/rapidfuzz/rapidfuzz-cpp/archive/refs/tags/v2.1.1.tar.gz" sha256: "1680c0dbf77d228ea81825c24755db99ee0e21a8db3663b5136741b3e108c3f2" "2.0.0": - url: "https://github.com/maxbachmann/rapidfuzz-cpp/archive/refs/tags/v2.0.0.tar.gz" + url: "https://github.com/rapidfuzz/rapidfuzz-cpp/archive/refs/tags/v2.0.0.tar.gz" sha256: "0d6d399be1de151631bbc189b72089600884831a4dac91e22f17351cef18ae64" "1.10.4": - url: "https://github.com/maxbachmann/rapidfuzz-cpp/archive/refs/tags/v1.10.4.tar.gz" + url: "https://github.com/rapidfuzz/rapidfuzz-cpp/archive/refs/tags/v1.10.4.tar.gz" sha256: "84a1ea8759aaa5bc8587c26504421d6fd34ad2a8dc74bf469b0cc3cc6758e17a" - "cci.20210513": - url: "https://github.com/maxbachmann/rapidfuzz-cpp/archive/d1e82379395cafc6d439c1c1e2cbe7512eaf2518.tar.gz" - sha256: "e5c306aae2fb4b34a381fbffaa97399114f20de14d83914ac2c9013b0226ce57" diff --git a/recipes/rapidfuzz/all/conanfile.py b/recipes/rapidfuzz/all/conanfile.py index 7ffe16027b312..16f3766c7f789 100644 --- a/recipes/rapidfuzz/all/conanfile.py +++ b/recipes/rapidfuzz/all/conanfile.py @@ -15,7 +15,7 @@ class PackageConan(ConanFile): description = "Rapid fuzzy string matching in C++ using the Levenshtein Distance" license = "MIT" url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/maxbachmann/rapidfuzz-cpp" + homepage = "https://github.com/rapidfuzz/rapidfuzz-cpp" topics = ("levenshtein", "string-matching", "string-similarity", "string-comparison", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" @@ -23,8 +23,6 @@ class PackageConan(ConanFile): @property def _min_cppstd(self): - if self.version == "cci.20210513": - return 98 return 17 @property @@ -34,7 +32,7 @@ def _compilers_minimum_version(self): "msvc": "192", "gcc": "6", "clang": "6", - "apple-clang": "12", + "apple-clang": "12", } def layout(self): diff --git a/recipes/rapidfuzz/config.yml b/recipes/rapidfuzz/config.yml index ccf581bfbc4ab..f32d6b33d56dc 100644 --- a/recipes/rapidfuzz/config.yml +++ b/recipes/rapidfuzz/config.yml @@ -1,4 +1,6 @@ versions: + "3.0.2": + folder: "all" "3.0.0": folder: "all" "2.2.3": @@ -11,5 +13,3 @@ versions: folder: "all" "1.10.4": folder: "all" - "cci.20210513": - folder: "all" From 146b5f8e0f2c5b1f9888eb2fa38fc4dc11337247 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 8 Mar 2024 20:07:51 +0900 Subject: [PATCH 202/405] (#23024) strong_type: add version v14 --- recipes/strong_type/all/conandata.yml | 3 +++ recipes/strong_type/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/strong_type/all/conandata.yml b/recipes/strong_type/all/conandata.yml index 6f362b86eb346..33e85e480c828 100644 --- a/recipes/strong_type/all/conandata.yml +++ b/recipes/strong_type/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "v14": + url: "https://github.com/rollbear/strong_type/archive/refs/tags/v14.tar.gz" + sha256: "6cc5a6f8de5b52e6c9e4c8b246b6052b5943d6de9b314660009e092af522d2fc" "v13": url: "https://github.com/rollbear/strong_type/archive/refs/tags/v13.tar.gz" sha256: "96a799dff6ed8d83040703c6f79162fc5ddf13d1aea4e56ce456736a30e07c5a" diff --git a/recipes/strong_type/config.yml b/recipes/strong_type/config.yml index cf589fbd0a896..5469ad726c024 100644 --- a/recipes/strong_type/config.yml +++ b/recipes/strong_type/config.yml @@ -1,4 +1,6 @@ versions: + "v14": + folder: all "v13": folder: all "v12": From 18ffa8f5bac259862e5ccf1964ce6ee4c7852cc2 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 8 Mar 2024 20:28:35 +0900 Subject: [PATCH 203/405] (#23027) xbyak: add version 7.06 --- recipes/xbyak/all/conandata.yml | 3 +++ recipes/xbyak/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/xbyak/all/conandata.yml b/recipes/xbyak/all/conandata.yml index 19f018739c44d..ecd59f56a583c 100644 --- a/recipes/xbyak/all/conandata.yml +++ b/recipes/xbyak/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "7.06": + url: "https://github.com/herumi/xbyak/archive/v7.06.tar.gz" + sha256: "686c710a67c7fb8e99d8e326cf22aea310a29db27a9db8ba19a9fee44f8ec097" "7.05": url: "https://github.com/herumi/xbyak/archive/v7.05.tar.gz" sha256: "853b619a6615985dbb36e8c5528d96d83f7bba3d0728ed3b3ee8ac8f4f96d87f" diff --git a/recipes/xbyak/config.yml b/recipes/xbyak/config.yml index 3f41c68a5a75f..d6d3f30f6e896 100644 --- a/recipes/xbyak/config.yml +++ b/recipes/xbyak/config.yml @@ -1,4 +1,6 @@ versions: + "7.06": + folder: all "7.05": folder: all "7.00": From 3b36ae87052c4d0f1a2cbf511cb5027535012c3a Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Fri, 8 Mar 2024 16:46:40 +0100 Subject: [PATCH 204/405] (#22441) pulseaudio 17.0 * pulseaudio 17.0 * Update conanfile.py * remove gettext * enable non-linux * remove unused deps * don't require xorg on non linux * remove alsa dependency * pulseaudio is always shared https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/blob/v17.0/src/meson.build?ref_type=tags#L201 https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/blob/v17.0/src/pulse/meson.build?ref_type=tags#L83 * Revert "remove gettext" This reverts commit 667e54d1abf3a5066844b5813d1196c1ece131af. * gettext is a requirement (not a tool_requirement) * Revert "enable non-linux" This reverts commit bc57129d9c7563360410e392a95e27a3d1873ad5. * Apply suggestions from code review Co-authored-by: Uilian Ries --------- Co-authored-by: Uilian Ries --- recipes/pulseaudio/config.yml | 2 + recipes/pulseaudio/meson/conandata.yml | 4 + recipes/pulseaudio/meson/conanfile.py | 147 ++++++++++++++++++ .../meson/test_package/CMakeLists.txt | 7 + .../meson/test_package/conanfile.py | 26 ++++ .../meson/test_package/test_package.c | 8 + 6 files changed, 194 insertions(+) create mode 100644 recipes/pulseaudio/meson/conandata.yml create mode 100644 recipes/pulseaudio/meson/conanfile.py create mode 100644 recipes/pulseaudio/meson/test_package/CMakeLists.txt create mode 100644 recipes/pulseaudio/meson/test_package/conanfile.py create mode 100644 recipes/pulseaudio/meson/test_package/test_package.c diff --git a/recipes/pulseaudio/config.yml b/recipes/pulseaudio/config.yml index 4aaa9c6cc7082..6c0f518e5ed25 100644 --- a/recipes/pulseaudio/config.yml +++ b/recipes/pulseaudio/config.yml @@ -1,4 +1,6 @@ versions: + "17.0": + folder: meson "14.2": folder: all "14.0": diff --git a/recipes/pulseaudio/meson/conandata.yml b/recipes/pulseaudio/meson/conandata.yml new file mode 100644 index 0000000000000..3380326dc7539 --- /dev/null +++ b/recipes/pulseaudio/meson/conandata.yml @@ -0,0 +1,4 @@ +sources: + "17.0": + url: "https://www.freedesktop.org/software/pulseaudio/releases/pulseaudio-17.0.tar.xz" + sha256: "053794d6671a3e397d849e478a80b82a63cb9d8ca296bd35b73317bb5ceb87b5" diff --git a/recipes/pulseaudio/meson/conanfile.py b/recipes/pulseaudio/meson/conanfile.py new file mode 100644 index 0000000000000..a9700e8c612e3 --- /dev/null +++ b/recipes/pulseaudio/meson/conanfile.py @@ -0,0 +1,147 @@ +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, rm, rmdir +from conan.tools.gnu import PkgConfigDeps +from conan.tools.meson import Meson, MesonToolchain +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.53.0" + + +class PulseAudioConan(ConanFile): + name = "pulseaudio" + description = "PulseAudio is a sound system for POSIX OSes, meaning that it is a proxy for sound applications." + topics = ("sound", "audio", "sound-server") + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://pulseaudio.org/" + license = "LGPL-2.1" + + package_type = "shared-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "with_glib": [True, False], + "with_fftw": [True, False], + "with_x11": [True, False], + "with_openssl": [True, False], + "with_dbus": [True, False], + } + default_options = { + "with_glib": False, + "with_fftw": False, + "with_x11": True, + "with_openssl": True, + "with_dbus": False, + } + + def config_options(self): + if self.settings.os not in ['Linux', 'FreeBSD']: + del self.options.with_x11 + + def configure(self): + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + if not self.options.with_dbus: + del self.options.with_fftw + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("libgettext/0.22") + self.requires("libiconv/1.17") + self.requires("libsndfile/1.2.2") + if self.options.with_glib: + self.requires("glib/2.78.1") + if self.options.get_safe("with_fftw"): + self.requires("fftw/3.3.10") + if self.options.get_safe("with_x11"): + self.requires("xorg/system") + if self.options.with_openssl: + self.requires("openssl/[>=1.1 <4]") + if self.options.with_dbus: + self.requires("dbus/1.15.8") + + def validate(self): + if self.settings.os != "Linux": + raise ConanInvalidConfiguration(f"{self.ref} recipe is only compatible with Linux right now. Contributions are welcome.") + + if self.options.get_safe("with_fftw"): + if not self.dependencies["fftw"].options.precision_single: + raise ConanInvalidConfiguration( + "Pulse audio uses fftw single precision. " + "Either set option -o fftw/*:precision_single=True or -o pulseaudio/*:with_fftw=False" + ) + + def build_requirements(self): + self.tool_requires("meson/1.3.1") + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/2.0.3") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + + tc = MesonToolchain(self) + tc.project_options['udevrulesdir']="${prefix}/bin/udev/rules.d" + tc.project_options['systemduserunitdir'] = os.path.join(self.build_folder, 'ignore') + for lib in ["x11", "openssl", "dbus", "glib", "fftw"]: + tc.project_options[lib] = "enabled" if self.options.get_safe(f"with_{lib}") else "disabled" + tc.project_options['database'] = 'simple' + tc.project_options['tests'] = False + tc.project_options['man'] = False + tc.project_options['doxygen'] = False + tc.project_options["daemon"] = False + tc.generate() + pkg = PkgConfigDeps(self) + pkg.generate() + + def build(self): + meson = Meson(self) + meson.configure() + meson.build() + + def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + meson = Meson(self) + meson.install() + rmdir(self, os.path.join(self.package_folder, "etc")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rm(self, "*.la", os.path.join(self.package_folder, "lib"), recursive=True) + + def package_info(self): + self.cpp_info.components["pulse"].set_property("pkg_config_name", "libpulse") + self.cpp_info.components["pulse"].libs = ["pulse", f"pulsecommon-{self.version}"] + self.cpp_info.components["pulse"].libdirs.append(os.path.join("lib", "pulseaudio")) + self.cpp_info.components["pulse"].requires = ["libiconv::libiconv", "libsndfile::libsndfile", "libgettext::libgettext"] + if self.options.get_safe("with_fftw"): + self.cpp_info.components["pulse"].requires.append("fftw::fftw") + if self.options.get_safe("with_x11"): + self.cpp_info.components["pulse"].requires.append("xorg::xorg") + if self.options.with_openssl: + self.cpp_info.components["pulse"].requires.append("openssl::openssl") + if self.options.with_dbus: + self.cpp_info.components["pulse"].requires.append("dbus::dbus") + + self.cpp_info.components["pulse-simple"].set_property("pkg_config_name", "libpulse-simple") + self.cpp_info.components["pulse-simple"].libs = ["pulse-simple"] + self.cpp_info.components["pulse-simple"].defines.append("_REENTRANT") + self.cpp_info.components["pulse-simple"].requires = ["pulse"] + + if self.options.with_glib: + self.cpp_info.components["pulse-mainloop-glib"].set_property("pkg_config_name", "libpulse-mainloop-glib") + self.cpp_info.components["pulse-mainloop-glib"].libs = ["pulse-mainloop-glib"] + self.cpp_info.components["pulse-mainloop-glib"].defines.append("_REENTRANT") + self.cpp_info.components["pulse-mainloop-glib"].requires = ["pulse", "glib::glib-2.0"] + + # FIXME: add cmake generators when conan can generate PULSEAUDIO_INCLUDE_DIR PULSEAUDIO_LIBRARY vars diff --git a/recipes/pulseaudio/meson/test_package/CMakeLists.txt b/recipes/pulseaudio/meson/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..a9b88d597549a --- /dev/null +++ b/recipes/pulseaudio/meson/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(pulseaudio REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE pulseaudio::pulseaudio) diff --git a/recipes/pulseaudio/meson/test_package/conanfile.py b/recipes/pulseaudio/meson/test_package/conanfile.py new file mode 100644 index 0000000000000..8a5bb47f50c4c --- /dev/null +++ b/recipes/pulseaudio/meson/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/pulseaudio/meson/test_package/test_package.c b/recipes/pulseaudio/meson/test_package/test_package.c new file mode 100644 index 0000000000000..bb944137b6045 --- /dev/null +++ b/recipes/pulseaudio/meson/test_package/test_package.c @@ -0,0 +1,8 @@ +#include +#include + +int main() +{ + printf("pulse audio verions %s\n", pa_get_library_version()); + return 0; +} From e5ad80e27ff1e83d587011028bf97173b5d95d8a Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Sun, 10 Mar 2024 00:49:02 +0100 Subject: [PATCH 205/405] (#23041) OpenEXR: Add 3.2.3 --- recipes/openexr/3.x/conandata.yml | 8 ++++++++ recipes/openexr/config.yml | 2 ++ 2 files changed, 10 insertions(+) diff --git a/recipes/openexr/3.x/conandata.yml b/recipes/openexr/3.x/conandata.yml index 0195d5928e91c..82b1ad8ce0c76 100644 --- a/recipes/openexr/3.x/conandata.yml +++ b/recipes/openexr/3.x/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.2.3": + url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.2.3.tar.gz" + sha256: "f3f6c4165694d5c09e478a791eae69847cadb1333a2948ca222aa09f145eba63" "3.2.2": url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.2.2.tar.gz" sha256: "65de6459c245a4977ce4d7777e70b30d7ef48ec38e0cfb10205706ca50a8bf2e" @@ -12,6 +15,11 @@ sources: url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.1.7.tar.gz" sha256: "78dbca39115a1c526e6728588753955ee75fa7f5bb1a6e238bed5b6d66f91fd7" patches: + "3.2.3": + - patch_file: "patches/3.2.1-gcc5-bug-workaround.patch" + patch_description: "Workaround for GCC 5 bug" + patch_type: "portability" + patch_source: "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336" "3.2.2": - patch_file: "patches/3.2.1-gcc5-bug-workaround.patch" patch_description: "Workaround for GCC 5 bug" diff --git a/recipes/openexr/config.yml b/recipes/openexr/config.yml index 7e99e768ab562..36bd699167db0 100644 --- a/recipes/openexr/config.yml +++ b/recipes/openexr/config.yml @@ -1,4 +1,6 @@ versions: + "3.2.3": + folder: "3.x" "3.2.2": folder: "3.x" "3.2.1": From 9fb90d7d64d17442609088c02de35b55ffc6ea9b Mon Sep 17 00:00:00 2001 From: Thomas Beutlich <115483027+thbeu@users.noreply.github.com> Date: Sun, 10 Mar 2024 02:44:45 +0100 Subject: [PATCH 206/405] (#20634) libtiff: Update license to libtiff See also https://spdx.org/licenses/libtiff.html. --- recipes/libtiff/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libtiff/all/conanfile.py b/recipes/libtiff/all/conanfile.py index 75e73137d3b59..d4918b7ef9fb6 100644 --- a/recipes/libtiff/all/conanfile.py +++ b/recipes/libtiff/all/conanfile.py @@ -13,7 +13,7 @@ class LibtiffConan(ConanFile): name = "libtiff" description = "Library for Tag Image File Format (TIFF)" url = "https://github.com/conan-io/conan-center-index" - license = "MIT" + license = "libtiff" homepage = "http://www.simplesystems.org/libtiff" topics = ("tiff", "image", "bigtiff", "tagged-image-file-format") From ac7582244f20054c2e05ec0d64e053b089632dd4 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 10 Mar 2024 11:29:23 +0900 Subject: [PATCH 207/405] (#23032) luau: add version 0.615 --- recipes/luau/all/conandata.yml | 3 +++ recipes/luau/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/luau/all/conandata.yml b/recipes/luau/all/conandata.yml index 8fdc026015c27..9d1d69b7d2681 100644 --- a/recipes/luau/all/conandata.yml +++ b/recipes/luau/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.615": + url: "https://github.com/Roblox/luau/archive/0.615.tar.gz" + sha256: "264192ff1cb1bc3d5c223e5fbe9c4c628d203e2ac6ff72100e09640f43f60a60" "0.610": url: "https://github.com/Roblox/luau/archive/0.610.tar.gz" sha256: "a6ee2cab90c816a86b86113f01d9da865378074ee09dc6122dbe8bfbdf819ede" diff --git a/recipes/luau/config.yml b/recipes/luau/config.yml index 6a02dc4ce2b65..8d347f4e40ba9 100644 --- a/recipes/luau/config.yml +++ b/recipes/luau/config.yml @@ -1,4 +1,6 @@ versions: + "0.615": + folder: all "0.610": folder: all "0.607": From e4f170c7cdf0174bd3a621f553c4433c14c9ea31 Mon Sep 17 00:00:00 2001 From: Roberto Rossini <71787608+robomics@users.noreply.github.com> Date: Sun, 10 Mar 2024 03:49:43 +0100 Subject: [PATCH 208/405] (#23037) fast_float: fix digest See https://github.com/fastfloat/fast_float/pull/241 --- recipes/fast_float/all/conandata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/fast_float/all/conandata.yml b/recipes/fast_float/all/conandata.yml index 53a958df0d784..3a81a600d3f70 100644 --- a/recipes/fast_float/all/conandata.yml +++ b/recipes/fast_float/all/conandata.yml @@ -1,7 +1,7 @@ sources: "6.1.0": url: "https://github.com/fastfloat/fast_float/archive/v6.1.0.tar.gz" - sha256: "a9c8ca8ca7d68c2dbb134434044f9c66cfd4c383d5e85c36b704d30f6be82506" + sha256: "5a629e1f18f037ad0016c41ead630ea471cccbcdf60239ed3466c491d8e7c908" "6.0.0": url: "https://github.com/fastfloat/fast_float/archive/v6.0.0.tar.gz" sha256: "7e98671ef4cc7ed7f44b3b13f80156c8d2d9244fac55deace28bd05b0a2c7c8e" From f84ed09bb29553ee354957719ae0fe415a3cf536 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Sun, 10 Mar 2024 06:09:27 -0500 Subject: [PATCH 209/405] (#22956) glew: Use the mesa-glu Conan package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * glew: Use the mesa-glu Conan package This is done the same way as for the FreeGLUT package. Fixes #22944. * Make dependency on GLU headers transitive GL/glew.h includes glu.h. --------- Co-authored-by: Francisco Ramírez --- recipes/glew/all/conanfile.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/recipes/glew/all/conanfile.py b/recipes/glew/all/conanfile.py index 3aaec716377cb..6df17e18c3783 100644 --- a/recipes/glew/all/conanfile.py +++ b/recipes/glew/all/conanfile.py @@ -1,4 +1,5 @@ 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 apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir import os @@ -45,7 +46,11 @@ def layout(self): def requirements(self): self.requires("opengl/system") - self.requires("glu/system") + # GL/glew.h includes glu.h. + if is_apple_os(self) or self.settings.os == "Windows": + self.requires("glu/system", transitive_headers=True) + else: + self.requires("mesa-glu/9.0.3", transitive_headers=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -90,7 +95,11 @@ def package_info(self): self.cpp_info.components["glewlib"].libs = [lib_name] if self.settings.os == "Windows" and not self.options.shared: self.cpp_info.components["glewlib"].defines.append("GLEW_STATIC") - self.cpp_info.components["glewlib"].requires = ["opengl::opengl", "glu::glu"] + self.cpp_info.components["glewlib"].requires = ["opengl::opengl"] + if is_apple_os(self) or self.settings.os == "Windows": + self.cpp_info.components["glewlib"].requires.append("glu::glu") + else: + self.cpp_info.components["glewlib"].requires.append("mesa-glu::mesa-glu") # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "GLEW" From 733711cb7157a9d2aa4ae3a147305c256c02a627 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 11 Mar 2024 01:49:13 +0900 Subject: [PATCH 210/405] (#23026) glaze: add version 2.2.1 --- recipes/glaze/all/conandata.yml | 3 +++ recipes/glaze/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index b30f919630ddb..ea8a28e593a57 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.2.1": + url: "https://github.com/stephenberry/glaze/archive/v2.2.1.tar.gz" + sha256: "ef0eb30a038c623ca100696e773ba1c9888719ed02c46e9fabf6238ee07026bb" "2.1.9": url: "https://github.com/stephenberry/glaze/archive/v2.1.9.tar.gz" sha256: "678126f068e3c21c2b3d2e1ae914c72296b68610a004cf542ea050946ab06416" diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index 4e0d084a17dc7..a975091df90db 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,6 @@ versions: + "2.2.1": + folder: all "2.1.9": folder: all "2.1.7": From f8e0b4337f05bf471f86d6f19092bbf0ce252e8b Mon Sep 17 00:00:00 2001 From: Sneder89 <45610045+Sneder89@users.noreply.github.com> Date: Sun, 10 Mar 2024 18:07:39 +0100 Subject: [PATCH 211/405] (#23028) [cppcheck] Add new version and remove old patch versions * Update config.yml * Update conandata.yml --- recipes/cppcheck/all/conandata.yml | 13 +++---------- recipes/cppcheck/config.yml | 6 ++---- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/recipes/cppcheck/all/conandata.yml b/recipes/cppcheck/all/conandata.yml index 71b6f57a8c0f0..0e4ce7f0c9324 100644 --- a/recipes/cppcheck/all/conandata.yml +++ b/recipes/cppcheck/all/conandata.yml @@ -1,16 +1,13 @@ sources: + "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.13": - url: "https://github.com/danmar/cppcheck/archive/2.13.0.tar.gz" - sha256: "8229afe1dddc3ed893248b8a723b428dc221ea014fbc76e6289840857c03d450" "2.12.1": url: "https://github.com/danmar/cppcheck/archive/2.12.1.tar.gz" sha256: "2a3d4ba1179419612183ab3d6aed6d3b18be75e98cd6f138ea8e2020905dced2" - "2.12": - url: "https://github.com/danmar/cppcheck/archive/2.12.0.tar.gz" - sha256: "7d67776118aee9a4f0214f993a4baa4a168b2dbb10c14b6ec5baf2ca147565b8" "2.11.1": url: "https://github.com/danmar/cppcheck/archive/2.11.1.tar.gz" sha256: "fef6ef868d562d49136f158e1d0f7a38237e7e1c0a91d9189bdd465f1fe54316" @@ -24,10 +21,6 @@ sources: url: "https://github.com/danmar/cppcheck/archive/2.8.2.tar.gz" sha256: "30ba99ab54089c44b83f02e2453da046a7edff5237950d4A0eb1eba4afcb4f45" patches: - "2.12": - - patch_file: "patches/0004-pcre-debuglib-name-2.12.patch" - patch_description: "Consider the Debug suffix for Windows" - patch_type: "portability" "2.11.1": - patch_file: "patches/0003-pcre-debuglib-name.patch" patch_description: "Consider the Debug suffix for Windows" diff --git a/recipes/cppcheck/config.yml b/recipes/cppcheck/config.yml index 27715122c7600..b1367265202bb 100644 --- a/recipes/cppcheck/config.yml +++ b/recipes/cppcheck/config.yml @@ -1,12 +1,10 @@ versions: - "2.13.3": + "2.13.4": folder: all - "2.13": + "2.13.3": folder: all "2.12.1": folder: all - "2.12": - folder: all "2.11.1": folder: all "2.10.3": From 7fe8cb859147f6e4ada416e38b2f496a243afdb2 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 11 Mar 2024 02:27:26 +0900 Subject: [PATCH 212/405] (#23035) ada: add version 2.7.7 --- recipes/ada/all/conandata.yml | 3 +++ recipes/ada/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/ada/all/conandata.yml b/recipes/ada/all/conandata.yml index 1a32e1d601610..8588363204f2a 100644 --- a/recipes/ada/all/conandata.yml +++ b/recipes/ada/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.7.7": + url: "https://github.com/ada-url/ada/archive/v2.7.7.tar.gz" + sha256: "7116d86a80b79886efbc9d946d3919801815060ae62daf78de68c508552af554" "2.7.5": url: "https://github.com/ada-url/ada/archive/v2.7.5.tar.gz" sha256: "25a5d62fdd4950dbef785db5725675c15f3df2cf899a4a920449fe9a05fc6d00" diff --git a/recipes/ada/config.yml b/recipes/ada/config.yml index a50d2c958edf8..2c78344707765 100644 --- a/recipes/ada/config.yml +++ b/recipes/ada/config.yml @@ -1,4 +1,6 @@ versions: + "2.7.7": + folder: all "2.7.5": folder: all "2.7.4": From f083267b04354cf96f41733c5fcfb718ee7941a6 Mon Sep 17 00:00:00 2001 From: Ahajha <44127594+Ahajha@users.noreply.github.com> Date: Mon, 11 Mar 2024 03:08:14 -0400 Subject: [PATCH 213/405] (#23044) genie: fix compiler paths --- recipes/genie/all/conanfile.py | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/recipes/genie/all/conanfile.py b/recipes/genie/all/conanfile.py index d29587bee35bc..731e87cc4f266 100644 --- a/recipes/genie/all/conanfile.py +++ b/recipes/genie/all/conanfile.py @@ -57,8 +57,10 @@ def _os(self): }[str(self.settings.os)] def _patch_compiler(self, cc, cxx): - replace_in_file(self, os.path.join(self.source_folder, "build", f"gmake.{self._os}", "genie.make"), "CC = gcc", f"CC = {cc}") - replace_in_file(self, os.path.join(self.source_folder, "build", f"gmake.{self._os}", "genie.make"), "CXX = g++", f"CXX = {cxx}") + makefile = os.path.join(self.source_folder, "build", f"gmake.{self._os}", "genie.make") + + replace_in_file(self, makefile, "CC = gcc", f"CC = {cc}" if cc else "") + replace_in_file(self, makefile, "CXX = g++", f"CXX = {cxx}" if cxx else "") @property def _genie_config(self): @@ -79,19 +81,7 @@ def build(self): self._patch_compiler("cccl", "cccl") self.run("make", cwd=self.source_folder) else: - cc = os.environ.get("CC") - cxx = os.environ.get("CXX") - if is_apple_os(self): - if not cc: - cc = "clang" - if not cxx: - cxx = "clang" - else: - if not cc: - cc = "clang" if self.settings.compiler == "clang" else "gcc" - if not cxx: - cxx = "clang++" if self.settings.compiler == "clang" else "g++" - self._patch_compiler(cc, cxx) + self._patch_compiler("", "") autotools = Autotools(self) autotools.make(args=[f"-C {self.source_folder}", f"OS={self._os}", f"config={self._genie_config}"]) From d5aed8dbe059a3f912a06e08142ba88903c9b48e Mon Sep 17 00:00:00 2001 From: Gang Wu Date: Mon, 11 Mar 2024 15:47:56 +0800 Subject: [PATCH 214/405] (#23046) add orc/2.0.0 * add orc/2.0.0 * update config.yml --- recipes/orc/all/conandata.yml | 3 +++ recipes/orc/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/orc/all/conandata.yml b/recipes/orc/all/conandata.yml index 8458d41ec33d7..52fa72322f304 100644 --- a/recipes/orc/all/conandata.yml +++ b/recipes/orc/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.0": + url: "https://dlcdn.apache.org/orc/orc-2.0.0/orc-2.0.0.tar.gz" + sha256: "9107730919c29eb39efaff1b9e36166634d1d4d9477e5fee76bfd6a8fec317df" "1.9.2": url: "https://dlcdn.apache.org/orc/orc-1.9.2/orc-1.9.2.tar.gz" sha256: "7f46f2c184ecefd6791f1a53fb062286818bd8710c3f08b94dd3cac365e240ee" diff --git a/recipes/orc/config.yml b/recipes/orc/config.yml index dcd92ae52deb2..956aa2a1d2506 100644 --- a/recipes/orc/config.yml +++ b/recipes/orc/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.0": + folder: all "1.9.2": folder: all "1.8.6": From e3b2a1b2535c0c271f164aec5f50e43f50b51ee1 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 11 Mar 2024 19:58:27 +0900 Subject: [PATCH 215/405] (#23049) libavif: add version 1.0.4 --- recipes/libavif/all/conandata.yml | 7 +++++++ recipes/libavif/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/libavif/all/conandata.yml b/recipes/libavif/all/conandata.yml index cf855ce45dc5b..f4a45a5fbdb30 100644 --- a/recipes/libavif/all/conandata.yml +++ b/recipes/libavif/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.4": + url: "https://github.com/AOMediaCodec/libavif/archive/refs/tags/v1.0.4.tar.gz" + sha256: "dc56708c83a4b934a8af2b78f67f866ba2fb568605c7cf94312acf51ee57d146" "1.0.3": url: "https://github.com/AOMediaCodec/libavif/archive/refs/tags/v1.0.3.tar.gz" sha256: "35e3cb3cd7158209dcc31d3bf222036de5b9597e368a90e18449ecc89bb86a19" @@ -15,6 +18,10 @@ sources: url: "https://github.com/AOMediaCodec/libavif/archive/refs/tags/v0.9.3.tar.gz" sha256: "bcd9a1f57f982a9615eb7e2faf87236dc88eb1d0c886f3471c7440ead605060d" patches: + "1.0.4": + - patch_file: patches/1.0.1-0001-disable-developer-only-codepaths.patch + patch_description: "disable compiler options for develop" + patch_type: "portability" "1.0.3": - patch_file: patches/1.0.1-0001-disable-developer-only-codepaths.patch patch_description: "disable compiler options for develop" diff --git a/recipes/libavif/config.yml b/recipes/libavif/config.yml index 74dbb33aa4932..0a86bfa38351a 100644 --- a/recipes/libavif/config.yml +++ b/recipes/libavif/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.4": + folder: all "1.0.3": folder: all "1.0.2": From 29917ef0647230369b4011ab60f20f260e2e44cc Mon Sep 17 00:00:00 2001 From: Noah Miller Date: Tue, 12 Mar 2024 02:29:13 +1300 Subject: [PATCH 216/405] (#22807) poco: add POCO_NO_SHARED_LIBRARY_DEBUG_SUFFIX definition Co-authored-by: Uilian Ries --- recipes/poco/all/conanfile.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/recipes/poco/all/conanfile.py b/recipes/poco/all/conanfile.py index ae636de694a7b..b2d6762eae55d 100644 --- a/recipes/poco/all/conanfile.py +++ b/recipes/poco/all/conanfile.py @@ -31,6 +31,7 @@ class PocoConan(ConanFile): "enable_active_record": [True, False, "deprecated"], "log_debug": [True, False], "with_sql_parser": [True, False], + "comp_foundation_sharedlibrary_debug_suffix": [True, False], } default_options = { "shared": False, @@ -39,6 +40,7 @@ class PocoConan(ConanFile): "enable_active_record": "deprecated", "log_debug": False, "with_sql_parser": True, + "comp_foundation_sharedlibrary_debug_suffix": True, } _PocoComponent = namedtuple("_PocoComponent", ("option", "default_option", "dependencies", "external_dependencies", "is_lib")) @@ -127,6 +129,8 @@ def config_options(self): del self.options.enable_prometheus if Version(self.version) < "1.13.0": del self.options.with_sql_parser + if self.settings.build_type != "Debug": + del self.options.comp_foundation_sharedlibrary_debug_suffix def configure(self): if self.options.enable_active_record != "deprecated": @@ -250,6 +254,9 @@ def generate(self): tc.preprocessor_definitions["POCO_NO_AUTOMATIC_LIBS"] = "1" # Picked up from conan v1 CMake wrapper, don't know the rationale tc.preprocessor_definitions["XML_DTD"] = "1" + # Disable SharedLibrary::suffix() including "d" as part of the platform-specific filename suffix + if not self.options.get_safe("comp_foundation_sharedlibrary_debug_suffix", True): + tc.preprocessor_definitions["POCO_NO_SHARED_LIBRARY_DEBUG_SUFFIX"] = "1" tc.generate() deps = CMakeDeps(self) From 958134dd0b7c148d26e8e2eda0bb70444e0ce69b Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Mon, 11 Mar 2024 15:08:28 +0100 Subject: [PATCH 217/405] (#23054) cppcheck: remove unused patch following https://github.com/conan-io/conan-center-index/commit/f8e0b4337f05bf471f86d6f19092bbf0ce252e8b --- .../all/patches/0004-pcre-debuglib-name-2.12.patch | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 recipes/cppcheck/all/patches/0004-pcre-debuglib-name-2.12.patch diff --git a/recipes/cppcheck/all/patches/0004-pcre-debuglib-name-2.12.patch b/recipes/cppcheck/all/patches/0004-pcre-debuglib-name-2.12.patch deleted file mode 100644 index 7f30a7cb1d7d4..0000000000000 --- a/recipes/cppcheck/all/patches/0004-pcre-debuglib-name-2.12.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/cmake/findDependencies.cmake 2023-09-09 15:10:31.000000000 +0200 -+++ b/cmake/findDependencies.cmake 2023-09-11 08:44:40.220863900 +0200 -@@ -31,7 +31,7 @@ - - if (HAVE_RULES) - find_path(PCRE_INCLUDE pcre.h) -- find_library(PCRE_LIBRARY pcre) -+ find_library(PCRE_LIBRARY NAMES pcre pcred) - if (NOT PCRE_LIBRARY OR NOT PCRE_INCLUDE) - message(FATAL_ERROR "pcre dependency for RULES has not been found") - endif() From 5b9ff5f781fee9e9eb8eaa9f78796e3277ec8855 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Mon, 11 Mar 2024 15:48:04 +0100 Subject: [PATCH 218/405] (#23048) sml: add version 1.1.11 --- recipes/sml/all/conandata.yml | 3 +++ recipes/sml/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/sml/all/conandata.yml b/recipes/sml/all/conandata.yml index 39d52a814e37c..886d2f2728c4c 100644 --- a/recipes/sml/all/conandata.yml +++ b/recipes/sml/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.11": + url: "https://github.com/boost-ext/sml/archive/refs/tags/v1.1.11.tar.gz" + sha256: "8773efd639ce9649dc449135c8c53232e1cb5f4037d44be02c1b9ccc343f246d" "1.1.9": url: "https://github.com/boost-ext/sml/archive/refs/tags/v1.1.9.tar.gz" sha256: "c5ebffcf791ca0b89fd49a410b720432de748a31b7e0c9e5bd5c567d11c8c477" diff --git a/recipes/sml/config.yml b/recipes/sml/config.yml index aff831fd45b0a..a97246e773800 100644 --- a/recipes/sml/config.yml +++ b/recipes/sml/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.11": + folder: all "1.1.9": folder: all "1.1.8": From b5c385cacc09c384b94e0eb8881536b9a3ea01f0 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Mon, 11 Mar 2024 19:08:19 -0500 Subject: [PATCH 219/405] (#23012) xkbcommon: Disable installing bash completions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * xkbcommon: Disable installing bash completions Installing attempts to install these in the system directory. ``` Installing /var/home/jordan/.conan2/p/b/xkbco18970aa15216b/b/src/tools/xkbcli-bash-completion.sh to /usr/share/bash-completion/completions Installation failed due to insufficient permissions. Attempt to use /usr/bin/sudo to gain elevated privileges? [y/n] Traceback (most recent call last): File "/var/home/jordan/.conan2/p/mesond0eabfb2fb735/p/bin/mesonbuild/mesonmain.py", line 194, in run return options.run_func(options) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/home/jordan/.conan2/p/mesond0eabfb2fb735/p/bin/mesonbuild/minstall.py", line 873, in run installer.do_install(datafilename) File "/var/home/jordan/.conan2/p/mesond0eabfb2fb735/p/bin/mesonbuild/minstall.py", line 557, in do_install self.install_data(d, dm, destdir, fullprefix) File "/var/home/jordan/.conan2/p/mesond0eabfb2fb735/p/bin/mesonbuild/minstall.py", line 631, in install_data if self.do_copyfile(fullfilename, outfilename, makedirs=(dm, outdir), follow_symlinks=i.follow_symlinks): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/home/jordan/.conan2/p/mesond0eabfb2fb735/p/bin/mesonbuild/minstall.py", line 430, in do_copyfile self.copy2(from_file, to_file) File "/var/home/jordan/.conan2/p/mesond0eabfb2fb735/p/bin/mesonbuild/minstall.py", line 327, in copy2 shutil.copy2(*args, **kwargs) File "/usr/lib64/python3.12/shutil.py", line 475, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "/usr/lib64/python3.12/shutil.py", line 262, in copyfile with open(dst, 'wb') as fdst: ^^^^^^^^^^^^^^^ PermissionError: [Errno 13] Permission denied: '/usr/share/bash-completion/completions/xkbcli' ``` * Add Version check for bash comppletion disabling --------- Co-authored-by: Rubén Rincón Blanco --- recipes/xkbcommon/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/xkbcommon/all/conanfile.py b/recipes/xkbcommon/all/conanfile.py index a8f0e89851c34..6c59c78b63932 100644 --- a/recipes/xkbcommon/all/conanfile.py +++ b/recipes/xkbcommon/all/conanfile.py @@ -95,6 +95,8 @@ def generate(self): env.generate(scope="build") tc = MesonToolchain(self) + if Version(self.version) >= "1.6": + tc.project_options["enable-bash-completion"] = False tc.project_options["enable-docs"] = False tc.project_options["enable-wayland"] = self.options.get_safe("with_wayland", False) tc.project_options["enable-x11"] = self.options.with_x11 From 878b5e75e2702efc335fe230272c47dcd82f29c8 Mon Sep 17 00:00:00 2001 From: Eric Pederson Date: Tue, 12 Mar 2024 04:07:43 -0400 Subject: [PATCH 220/405] (#22740) Set min_cppstd to 11 for redis-plus-plus * (22739) Set min_cppstd to 11 for redis-plus-plus * Changes from review --- recipes/redis-plus-plus/all/conanfile.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/recipes/redis-plus-plus/all/conanfile.py b/recipes/redis-plus-plus/all/conanfile.py index d7fbaf589b20b..6370311a8d6a8 100644 --- a/recipes/redis-plus-plus/all/conanfile.py +++ b/recipes/redis-plus-plus/all/conanfile.py @@ -33,7 +33,7 @@ class RedisPlusPlusConan(ConanFile): @property def _min_cppstd(self): - return "11" if Version(self.version) < "1.3.0" else "17" + return "11" @property def _compilers_minimum_version(self): @@ -86,11 +86,8 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - if self.settings.compiler.get_safe("cppstd"): - cppstd = str(self.settings.compiler.cppstd) - if cppstd.startswith("gnu"): - cppstd = cppstd[3:] - tc.cache_variables["REDIS_PLUS_PLUS_CXX_STANDARD"] = cppstd + cppstd = str(self.settings.get_safe("compiler.cppstd", 11)).replace("gnu", "") + tc.cache_variables["REDIS_PLUS_PLUS_CXX_STANDARD"] = cppstd tc.variables["REDIS_PLUS_PLUS_USE_TLS"] = self.options.with_tls if self.options.get_safe("build_async"): tc.cache_variables["REDIS_PLUS_PLUS_BUILD_ASYNC"] = "libuv" From d9c156dd52880698540da31d809875c474db31ce Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Tue, 12 Mar 2024 08:41:38 +0000 Subject: [PATCH 221/405] (#23056) [bot] Update authorized users list (2024-03-11) Co-authored-by: conan-center-bot --- .c3i/authorized_users.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 6a1a5108eaac2..e630a8c822965 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1299,3 +1299,5 @@ authorized_users: - crstzh - gagoi - dbolduc +- jgaa +- tbsuht From fe76ccb07e5cca5af1b9a3255e04f7fad31864d5 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 12 Mar 2024 11:07:49 +0200 Subject: [PATCH 222/405] (#22987) opentelemetry-cpp: fix an invalid optional library, drop v1.7.0 * opentelemetry-cpp: fix an invalid optional library, drop v1.7.0 * remove dead code --------- Co-authored-by: ericLemanissier --- recipes/opentelemetry-cpp/all/conandata.yml | 3 --- recipes/opentelemetry-cpp/all/conanfile.py | 21 ++++++--------------- recipes/opentelemetry-cpp/config.yml | 2 -- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/recipes/opentelemetry-cpp/all/conandata.yml b/recipes/opentelemetry-cpp/all/conandata.yml index fb4e67647e394..f30d3731760b0 100644 --- a/recipes/opentelemetry-cpp/all/conandata.yml +++ b/recipes/opentelemetry-cpp/all/conandata.yml @@ -8,6 +8,3 @@ sources: "1.8.3": url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.8.3.tar.gz" sha256: "b23d3c80d2e0012734ea343d2be69b2a7139ec5545453c503b13e629eb8fbe05" - "1.7.0": - url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.7.0.tar.gz" - sha256: "2ad0911cdc94fe84a93334773bef4789a38bd1f01e39560cabd4a5c267e823c3" diff --git a/recipes/opentelemetry-cpp/all/conanfile.py b/recipes/opentelemetry-cpp/all/conanfile.py index 3fbb1802a08da..f96b644388da0 100644 --- a/recipes/opentelemetry-cpp/all/conanfile.py +++ b/recipes/opentelemetry-cpp/all/conanfile.py @@ -235,14 +235,9 @@ def _patch_sources(self): replace_in_file(self, protos_cmake_path, "if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/opentelemetry-proto/.git)", "if(1)") - if Version(self.version) < "1.8.3": - replace_in_file(self, protos_cmake_path, - 'set(PROTO_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third_party/opentelemetry-proto")', - f'set(PROTO_PATH "{protos_path}")') - else: - replace_in_file(self, protos_cmake_path, - '"${CMAKE_CURRENT_SOURCE_DIR}/third_party/opentelemetry-proto")', - f'"{protos_path}")') + replace_in_file(self, protos_cmake_path, + '"${CMAKE_CURRENT_SOURCE_DIR}/third_party/opentelemetry-proto")', + f'"{protos_path}")') if self.options.with_otlp_grpc and Version(self.version) < "1.9.1": save(self, protos_cmake_path, "\ntarget_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++)", append=True) @@ -284,7 +279,6 @@ def _http_client_name(self): @property def _otel_libraries(self): libraries = [ - self._http_client_name, "opentelemetry_common", "opentelemetry_exporter_in_memory", "opentelemetry_exporter_ostream_span", @@ -292,6 +286,9 @@ def _otel_libraries(self): "opentelemetry_trace", "opentelemetry_version", ] + if self.options.with_otlp_http or self.options.with_elasticsearch or self.options.get_safe("with_jaeger") or self.options.with_zipkin: + # https://github.com/open-telemetry/opentelemetry-cpp/blob/v1.12.0/CMakeLists.txt#L452-L460 + libraries.append(self._http_client_name) if self.options.with_otlp_grpc or self.options.with_otlp_http: libraries.extend([ "opentelemetry_proto", @@ -383,12 +380,6 @@ def package_info(self): ]) if self.options.with_otlp_grpc: - if Version(self.version) <= "1.7.0": - self.cpp_info.components["opentelemetry_exporter_otlp_grpc"].requires.extend([ - "grpc::grpc++", - "opentelemetry_otlp_recordable", - ]) - self.cpp_info.components["opentelemetry_exporter_otlp_grpc_client"].requires.extend([ "grpc::grpc++", "opentelemetry_proto", diff --git a/recipes/opentelemetry-cpp/config.yml b/recipes/opentelemetry-cpp/config.yml index ea5fa8db677c4..a678af123ada5 100644 --- a/recipes/opentelemetry-cpp/config.yml +++ b/recipes/opentelemetry-cpp/config.yml @@ -5,5 +5,3 @@ versions: folder: all "1.8.3": folder: all - "1.7.0": - folder: all From f6f2e33faed9eb1448bca620f0a704a937376f60 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Tue, 12 Mar 2024 04:28:06 -0500 Subject: [PATCH 223/405] (#23007) avahi/0.8: Support cross-compilation * avahi: Support cross-compilation To cross-compile Avahi, the --with-distro flag must be passed. Disable introspection. This must be disabled to cross-compile. Strangely enough, it doesn't work when enabled. It only seems to work when set to auto. When gobject-introspection is updated to support Conan V2 an option could be added to control enabling or disabling introspection. * Remove extra check --- recipes/avahi/all/conanfile.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/recipes/avahi/all/conanfile.py b/recipes/avahi/all/conanfile.py index 5aa91dc39e695..6dfd0f410cd70 100644 --- a/recipes/avahi/all/conanfile.py +++ b/recipes/avahi/all/conanfile.py @@ -59,7 +59,7 @@ def validate(self): def build_requirements(self): self.tool_requires("glib/") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -69,17 +69,19 @@ def generate(self): virtual_build_env.generate() if can_run(self): VirtualRunEnv(self).generate(scope="build") + tc = AutotoolsToolchain(self) tc.configure_args.append("--enable-compat-libdns_sd") + tc.configure_args.append("--enable-introspection=no") tc.configure_args.append("--disable-gtk3") tc.configure_args.append("--disable-mono") tc.configure_args.append("--disable-monodoc") tc.configure_args.append("--disable-python") tc.configure_args.append("--disable-qt5") tc.configure_args.append("--with-systemdsystemunitdir=/lib/systemd/system") + tc.configure_args.append("--with-distro=none") tc.configure_args.append("ac_cv_func_strlcpy=no") - if self.settings.os in ["Linux", "FreeBSD"]: - tc.configure_args.append("ac_cv_func_setproctitle=no") + tc.configure_args.append("ac_cv_func_setproctitle=no") tc.generate() AutotoolsDeps(self).generate() PkgConfigDeps(self).generate() From 0371d7b05e5cd4447facecf9271a0bf5af9297f0 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 12 Mar 2024 18:48:03 +0900 Subject: [PATCH 224/405] (#23061) tree-sitter: add version 0.22.1 --- recipes/tree-sitter/all/conandata.yml | 3 +++ recipes/tree-sitter/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/tree-sitter/all/conandata.yml b/recipes/tree-sitter/all/conandata.yml index e9e15c0a595de..8277c606ebb37 100644 --- a/recipes/tree-sitter/all/conandata.yml +++ b/recipes/tree-sitter/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.22.1": + url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.22.1.tar.gz" + sha256: "b21065e78da33e529893c954e712ad15d9ad44a594b74567321d4a3a007d6090" "0.21.0": url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.21.0.tar.gz" sha256: "6bb60e5b63c1dc18aba57a9e7b3ea775b4f9ceec44cc35dac4634d26db4eb69c" diff --git a/recipes/tree-sitter/config.yml b/recipes/tree-sitter/config.yml index 62dc82320f3ad..d166b5cb681fc 100644 --- a/recipes/tree-sitter/config.yml +++ b/recipes/tree-sitter/config.yml @@ -1,4 +1,6 @@ versions: + "0.22.1": + folder: all "0.21.0": folder: all "0.20.8": From e76b2e02a81e9a58392988613415b4dd6fd31f7e Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 12 Mar 2024 19:07:55 +0900 Subject: [PATCH 225/405] (#23064) uwebsockets: add version 20.62.0 --- recipes/uwebsockets/all/conandata.yml | 3 +++ recipes/uwebsockets/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/uwebsockets/all/conandata.yml b/recipes/uwebsockets/all/conandata.yml index cb3f534499ced..85952f5a23966 100644 --- a/recipes/uwebsockets/all/conandata.yml +++ b/recipes/uwebsockets/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "20.62.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.62.0.tar.gz" + sha256: "03dfc8037cf43856a41e64bbc7fc5a7cf5e6369c9158682753074ecbbe09eed1" "20.60.0": url: "https://github.com/uNetworking/uWebSockets/archive/v20.60.0.tar.gz" sha256: "eb72223768f93d40038181653ee5b59a53736448a6ff4e8924fd56b2fcdc00db" diff --git a/recipes/uwebsockets/config.yml b/recipes/uwebsockets/config.yml index fd6362a846ec1..c2e19d13ebc2e 100644 --- a/recipes/uwebsockets/config.yml +++ b/recipes/uwebsockets/config.yml @@ -1,4 +1,6 @@ versions: + "20.62.0": + folder: all "20.60.0": folder: all "20.58.0": From 234a26c18b66109c135cbf83ea0c11b4bd9ed667 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 12 Mar 2024 19:27:56 +0900 Subject: [PATCH 226/405] (#23067) xz_utils: add version 5.6.1 --- recipes/xz_utils/cmake/conandata.yml | 3 +++ recipes/xz_utils/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/xz_utils/cmake/conandata.yml b/recipes/xz_utils/cmake/conandata.yml index 457376715689b..8825601a50d2d 100644 --- a/recipes/xz_utils/cmake/conandata.yml +++ b/recipes/xz_utils/cmake/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.6.1": + url: "https://github.com/tukaani-project/xz/releases/download/v5.6.1/xz-5.6.1.tar.xz" + sha256: "f334777310ca3ae9ba07206d78ed286a655aa3f44eec27854f740c26b2cd2ed0" "5.6.0": url: "https://github.com/tukaani-project/xz/releases/download/v5.6.0/xz-5.6.0.tar.xz" sha256: "cdafe1632f139c82937cc1ed824f7a60b7b0a0619dfbbd681dcac02b1ac28f5b" diff --git a/recipes/xz_utils/config.yml b/recipes/xz_utils/config.yml index 0044c059f459b..7cd5f51b3c3c5 100644 --- a/recipes/xz_utils/config.yml +++ b/recipes/xz_utils/config.yml @@ -1,4 +1,6 @@ versions: + "5.6.1": + folder: cmake "5.6.0": folder: cmake "5.4.5": From f3504d4a41dd690083057f334bdbc6c0a3e84a3a Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 12 Mar 2024 15:42:42 +0100 Subject: [PATCH 227/405] (#22945) [openssl] Set tls security level to automatic for OpenSSL 3.x * Set tls security level to automatic for openssl 3.x Signed-off-by: Uilian Ries * convert OptionValue to string Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries --- recipes/openssl/3.x.x/conanfile.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/recipes/openssl/3.x.x/conanfile.py b/recipes/openssl/3.x.x/conanfile.py index afcc879ec24a9..975619cd1b911 100644 --- a/recipes/openssl/3.x.x/conanfile.py +++ b/recipes/openssl/3.x.x/conanfile.py @@ -88,13 +88,13 @@ class OpenSSLConan(ConanFile): "no_whirlpool": [True, False], "no_zlib": [True, False], "openssldir": [None, "ANY"], - "tls_security_level": [0, 1, 2, 3, 4, 5], + "tls_security_level": [None, 0, 1, 2, 3, 4, 5], } default_options = {key: False for key in options.keys()} default_options["fPIC"] = True default_options["no_md2"] = True default_options["openssldir"] = None - default_options["tls_security_level"] = 1 + default_options["tls_security_level"] = None @property def _is_clang_cl(self): @@ -114,8 +114,6 @@ def _settings_build(self): return getattr(self, "settings_build", self.settings) def config_options(self): - self.options.tls_security_level = 1 if Version(self.version) < "3.2" else 2 - if self.settings.os != "Windows": self.options.rm_safe("capieng_dialog") self.options.rm_safe("enable_capieng") @@ -386,7 +384,8 @@ def _configure_args(self): args.append("no-fips" if self.options.get_safe("no_fips", True) else "enable-fips") args.append("no-md2" if self.options.get_safe("no_md2", True) else "enable-md2") - args.append("-DOPENSSL_TLS_SECURITY_LEVEL=%s" % str(self.options.tls_security_level)) + if str(self.options.tls_security_level) != "None": + args.append(f"-DOPENSSL_TLS_SECURITY_LEVEL={self.options.tls_security_level}") if self.options.get_safe("enable_trace"): args.append("enable-trace") From 7e0ff2a935f1384fc24359bac72dee846e062aa4 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 12 Mar 2024 17:43:16 +0200 Subject: [PATCH 228/405] (#18959) pciutils: migrate to Conan v2 * pciutils: migrate to Conan v2 * pciutils: set correct compiler and build flags * pciutils: add version 3.10.0 Generated and committed by [Conan Center Bot](https://github.com/qchateau/conan-center-bot) Find more updatable recipes in the [GitHub Pages](https://qchateau.github.io/conan-center-bot/) * pciutils: update zlib version * pciutils: tidy conandata.yml * pciutils: fix shared builds * pciutils: improve CC detection Based on the boost recipe. * pciutils: fix symlink creation * pciutils: move check to validate() --------- Co-authored-by: Quentin Chateau via Conan Center Bot --- recipes/pciutils/all/conandata.yml | 7 +- recipes/pciutils/all/conanfile.py | 144 ++++++++++++------ .../pciutils/all/test_package/CMakeLists.txt | 7 +- .../pciutils/all/test_package/conanfile.py | 24 ++- .../all/test_v1_package/CMakeLists.txt | 8 + .../pciutils/all/test_v1_package/conanfile.py | 16 ++ recipes/pciutils/config.yml | 2 + 7 files changed, 149 insertions(+), 59 deletions(-) create mode 100644 recipes/pciutils/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/pciutils/all/test_v1_package/conanfile.py diff --git a/recipes/pciutils/all/conandata.yml b/recipes/pciutils/all/conandata.yml index 01d5f5a0e9de5..de7711b0170fd 100644 --- a/recipes/pciutils/all/conandata.yml +++ b/recipes/pciutils/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.10.0": + url: "https://github.com/pciutils/pciutils/archive/v3.10.0.tar.gz" + sha256: "e579d87f1afe2196db7db648857023f80adb500e8194c4488c8b47f9a238c1c6" "3.7.0": - sha256: ea768aa0187ba349391c6c157445ecc2b42e7d671fc1ce8c53ff5ef513f1e2ab - url: https://github.com/pciutils/pciutils/archive/v3.7.0.tar.gz + url: "https://github.com/pciutils/pciutils/archive/v3.7.0.tar.gz" + sha256: "ea768aa0187ba349391c6c157445ecc2b42e7d671fc1ce8c53ff5ef513f1e2ab" diff --git a/recipes/pciutils/all/conanfile.py b/recipes/pciutils/all/conanfile.py index 7de2b56523367..9e375262e618e 100644 --- a/recipes/pciutils/all/conanfile.py +++ b/recipes/pciutils/all/conanfile.py @@ -1,76 +1,128 @@ import os -from conans import ConanFile, tools, AutoToolsBuildEnvironment -from conans.errors import ConanInvalidConfiguration +import shutil + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import XCRun +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import chdir, copy, get, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.53.0" class PciUtilsConan(ConanFile): name = "pciutils" - license = "BSD-3-Clause" description = "The PCI Utilities package contains a library for portable access to PCI bus" - topics = ("pci", "pci-bus", "hardware", "local-bus") - homepage = "https://github.com/pciutils/pciutils" + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" - settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], "fPIC": [True, False], "with_zlib": [True, False], "with_udev": [True, False]} - default_options = {"shared": False, "fPIC": True, "with_zlib": True, "with_udev": False} + homepage = "https://github.com/pciutils/pciutils" + topics = ("pci", "pci-bus", "hardware", "local-bus") - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_zlib": [True, False], + "with_udev": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_zlib": True, + "with_udev": True, + } - def configure(self): - if self.settings.os != "Linux": - raise ConanInvalidConfiguration("Platform {} is currently not supported by this recipe".format(self.settings.os)) + 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") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): if self.options.with_zlib: - self.requires("zlib/1.2.11") + self.requires("zlib/[>=1.2.11 <2]") if self.options.with_udev: - # TODO: Enable libudev option when available - raise ConanInvalidConfiguration("libudev requires conan-io/conan-center-index#2468") - self.requires("systemd/system") + self.requires("libudev/system") + + def validate(self): + if self.settings.os not in ["Linux", "FreeBSD"]: + raise ConanInvalidConfiguration( + f"Platform {self.settings.os} is currently not supported by this recipe" + ) def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = self.name + "-" + self.version - tools.rename(extracted_dir, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + @property + def _cc(self): + compilers_by_conf = self.conf.get("tools.build:compiler_executables", default={}, check_type=dict) + cxx = compilers_by_conf.get("c") or VirtualBuildEnv(self).vars().get("CC") + if cxx: + return cxx + if self.settings.compiler == "apple-clang": + return XCRun(self).cxx + compiler_version = str(self.settings.compiler.version) + major = compiler_version.split(".", 1)[0] + if self.settings.compiler == "gcc": + return shutil.which(f"gcc-{compiler_version}") or shutil.which(f"gcc-{major}") or shutil.which("gcc") or "" + if self.settings.compiler == "clang": + return shutil.which(f"clang-{compiler_version}") or shutil.which(f"clang-{major}") or shutil.which("clang") or "" + return "" - def _make(self, targets): + def generate(self): yes_no = lambda v: "yes" if v else "no" - autotools = AutoToolsBuildEnvironment(self) - autotools.make(args=["SHARED={}".format(yes_no(self.options.shared)), - "ZLIB={}".format(yes_no(self.options.with_zlib)), - "HWDB={}".format(yes_no(self.options.with_udev)), - "PREFIX={}".format(self.package_folder), - "OPT={}".format("{} {}".format( - autotools.vars["CPPFLAGS"], autotools.vars["CFLAGS"])), - "DNS=no"], - target=" ".join(targets)) + tc = AutotoolsToolchain(self) + tc.make_args = [ + f"SHARED={yes_no(self.options.shared)}", + f"ZLIB={yes_no(self.options.with_zlib)}", + f"HWDB={yes_no(self.options.with_udev)}", + f"DESTDIR={self.package_folder}", + "PREFIX=/", + "DNS=no", + f"CC={self._cc}", + ] + tc.generate() + deps = AutotoolsDeps(self) + deps.generate() def build(self): - with tools.chdir(self._source_subfolder): - self._make(["all"]) + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.make(target="all") def package(self): - with tools.chdir(self._source_subfolder): - self._make(["install", "install-pcilib"]) + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.make(target="install") + autotools.make(target="install-pcilib") - self.copy("COPYING", src=self._source_subfolder, dst="licenses") - self.copy("*.h", src=self._source_subfolder, dst="include", keep_path=True) + copy(self, "COPYING", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses")) + copy(self, "*.h", + src=self.source_folder, + dst=os.path.join(self.package_folder, "include"), + keep_path=True) if self.options.shared: - tools.rename(src=os.path.join(self._source_subfolder, "lib", "libpci.so.3.7.0"), - dst=os.path.join(self.package_folder, "lib", "libpci.so")) + # libpci.so.3 -> libpci.so + with chdir(self, os.path.join(self.package_folder, "lib")): + os.symlink("libpci.so.3", "libpci.so") - tools.rmdir(os.path.join(self.package_folder, "sbin")) - tools.rmdir(os.path.join(self.package_folder, "share")) - tools.rmdir(os.path.join(self.package_folder, "man")) + rmdir(self, os.path.join(self.package_folder, "sbin")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "man")) def package_info(self): - self.cpp_info.names["pkg_config"] = "libpci" + self.cpp_info.set_property("pkg_config_name", "libpci") self.cpp_info.libs = ["pci"] diff --git a/recipes/pciutils/all/test_package/CMakeLists.txt b/recipes/pciutils/all/test_package/CMakeLists.txt index 48b855b8a30aa..3d69747b2d1ec 100644 --- a/recipes/pciutils/all/test_package/CMakeLists.txt +++ b/recipes/pciutils/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(PackageTest C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(pciutils REQUIRED CONFIG) add_executable(example example.c) -target_link_libraries(example ${CONAN_LIBS}) +target_link_libraries(example pciutils::pciutils) diff --git a/recipes/pciutils/all/test_package/conanfile.py b/recipes/pciutils/all/test_package/conanfile.py index 9f2b070b59136..8d52b7021efe1 100644 --- a/recipes/pciutils/all/test_package/conanfile.py +++ b/recipes/pciutils/all/test_package/conanfile.py @@ -1,9 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -class CAresTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -11,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "example") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "example") + self.run(bin_path, env="conanrun") diff --git a/recipes/pciutils/all/test_v1_package/CMakeLists.txt b/recipes/pciutils/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/pciutils/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/pciutils/all/test_v1_package/conanfile.py b/recipes/pciutils/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..2978938836233 --- /dev/null +++ b/recipes/pciutils/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + +class CAresTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "example") + self.run(bin_path, run_environment=True) diff --git a/recipes/pciutils/config.yml b/recipes/pciutils/config.yml index 20ddf579e6d44..6ece8b7922d9b 100644 --- a/recipes/pciutils/config.yml +++ b/recipes/pciutils/config.yml @@ -1,3 +1,5 @@ versions: + "3.10.0": + folder: all "3.7.0": folder: all From 6f3daac38a6292e8c2e2b62ce7b00ae54390ec30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Tue, 12 Mar 2024 18:02:26 +0100 Subject: [PATCH 229/405] (#22771) oatpp-libressl: Fix header propagation, moderenize a bit * Fix oatpp-libressl header propagation, moderenize a bit * Fix hooks --- recipes/oatpp-libressl/all/conanfile.py | 26 +++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/recipes/oatpp-libressl/all/conanfile.py b/recipes/oatpp-libressl/all/conanfile.py index 6eec475cde13d..02cb36cfa573c 100644 --- a/recipes/oatpp-libressl/all/conanfile.py +++ b/recipes/oatpp-libressl/all/conanfile.py @@ -7,7 +7,7 @@ from conan.tools.scm import Version import os -required_conan_version = ">=1.51.1" +required_conan_version = ">=1.54" class OatppLibresslConan(ConanFile): @@ -18,6 +18,7 @@ class OatppLibresslConan(ConanFile): description = "oat++ libressl library" topics = ("oat++", "oatpp", "libressl") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -34,21 +35,24 @@ def config_options(self): def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires(f"oatpp/{self.version}") - self.requires("libressl/3.5.3") + # There's a 1 to 1 match between versions of oatpp and oatpp-libressl + # oatpp-libressl/oatpp-libressl/Config.hpp:28 and 30 contain includes to these libraries + self.requires(f"oatpp/{self.version}", transitive_headers=True) + self.requires("libressl/3.5.3", transitive_headers=True) + + @property + def _min_cppstd(self): + return 11 def validate(self): if self.info.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) + check_min_cppstd(self, self._min_cppstd) if is_msvc(self) and self.info.options.shared: raise ConanInvalidConfiguration(f"{self.ref} can not be built as shared library with msvc") @@ -64,8 +68,6 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["OATPP_BUILD_TESTS"] = False tc.variables["OATPP_MODULES_LOCATION"] = "INSTALLED" - # Honor BUILD_SHARED_LIBS from conan_toolchain (see https://github.com/conan-io/conan/issues/11840) - tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() deps = CMakeDeps(self) deps.generate() @@ -84,6 +86,10 @@ def package(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "oatpp-libressl") self.cpp_info.set_property("cmake_target_name", "oatpp::oatpp-libressl") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + # TODO: back to global scope in conan v2 once legacy generators removed self.cpp_info.components["_oatpp-libressl"].includedirs = [ os.path.join("include", f"oatpp-{self.version}", "oatpp-libressl") From 96e6190eb80cfc5b11727cc0b55cbd24f9c3501e Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 12 Mar 2024 18:23:22 +0100 Subject: [PATCH 230/405] (#18444) [nats] Add NATS.C package * add nats-c Signed-off-by: Uilian Ries * Build 3.8.0 Signed-off-by: Uilian Ries * safe check for openssl verion Signed-off-by: Uilian Ries * Disable streaming for now Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries --- recipes/cnats/all/conandata.yml | 4 + recipes/cnats/all/conanfile.py | 110 ++++++++++++++++++ recipes/cnats/all/test_package/CMakeLists.txt | 7 ++ recipes/cnats/all/test_package/conanfile.py | 37 ++++++ .../cnats/all/test_package/test_package.cpp | 10 ++ recipes/cnats/config.yml | 3 + 6 files changed, 171 insertions(+) create mode 100644 recipes/cnats/all/conandata.yml create mode 100644 recipes/cnats/all/conanfile.py create mode 100644 recipes/cnats/all/test_package/CMakeLists.txt create mode 100644 recipes/cnats/all/test_package/conanfile.py create mode 100644 recipes/cnats/all/test_package/test_package.cpp create mode 100644 recipes/cnats/config.yml diff --git a/recipes/cnats/all/conandata.yml b/recipes/cnats/all/conandata.yml new file mode 100644 index 0000000000000..7a17667b0dc32 --- /dev/null +++ b/recipes/cnats/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "3.8.0": + url: "https://github.com/nats-io/nats.c/archive/refs/tags/v3.8.0.tar.gz" + sha256: "465811380cdc6eab3304e40536d03f99977a69c0e56fcf566000c29dd075e4dd" diff --git a/recipes/cnats/all/conanfile.py b/recipes/cnats/all/conanfile.py new file mode 100644 index 0000000000000..60f15b3b814f2 --- /dev/null +++ b/recipes/cnats/all/conanfile.py @@ -0,0 +1,110 @@ +from conan import ConanFile +from conan.tools.files import get, copy, rename, mkdir, rmdir +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.54.0" + + +class PackageConan(ConanFile): + name = "cnats" + description = "A C client for NATS" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://nats.io/" + topics = ("messaging", "message-bus", "message-queue", "messaging-library", "nats-client") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_tls": [True, False], + "with_sodium": [True, False], + "enable_streaming": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_tls": True, + "with_sodium": False, + "enable_streaming": False + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + if self.options.with_tls: + self.requires("openssl/[>=1.1 <4]") + if self.options.with_sodium: + self.requires("libsodium/cci.20220430") + # FIXME: C3I Jenkins does not have protobuf-c static x shared deps for now + if self.options.enable_streaming: + self.requires("protobuf-c/1.4.1") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["NATS_BUILD_WITH_TLS"] = self.options.with_tls + tc.variables["NATS_BUILD_USE_SODIUM"] = self.options.with_sodium + tc.variables["NATS_BUILD_EXAMPLES"] = False + tc.variables["BUILD_TESTING"] = False + tc.variables["NATS_BUILD_LIB_STATIC"] = not self.options.shared + tc.variables["NATS_BUILD_LIB_SHARED"] = self.options.shared + if self.options.with_tls: + tc.variables["NATS_BUILD_TLS_USE_OPENSSL_1_1_API"] = Version(self.dependencies["openssl"].ref.version) >= "1.1" + tc.variables["NATS_BUILD_STREAMING"] = self.options.enable_streaming + tc.generate() + tc = CMakeDeps(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + if self.settings.os == "Windows" and self.options.shared: + mkdir(self, os.path.join(self.package_folder, "bin")) + rename(self, os.path.join(self.package_folder, "lib", f"{self._nats_library_name}.dll"), os.path.join(self.package_folder, "bin", f"{self._nats_library_name}.dll")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + @property + def _nats_library_name(self): + suffix = "" if self.options.shared else "_static" + debug = "d" if self.settings.build_type == "Debug" else "" + return f"nats{suffix}{debug}" + + def package_info(self): + self.cpp_info.libs = [self._nats_library_name] + self.cpp_info.set_property("cmake_file_name", "cnats") + self.cpp_info.set_property("cmake_target_name", f"cnats::{self._nats_library_name}") + self.cpp_info.set_property("pkg_config_name", "libnats") + + if self.options.enable_streaming: + self.cpp_info.defines.append("NATS_HAS_STREAMING") + if self.settings.os == "Windows" and self.options.shared: + self.cpp_info.defines.append("nats_IMPORTS") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["pthread", "rt"]) + elif self.settings.os == "Windows": + self.cpp_info.system_libs.append("ws2_32") diff --git a/recipes/cnats/all/test_package/CMakeLists.txt b/recipes/cnats/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..6c0bde85724d3 --- /dev/null +++ b/recipes/cnats/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) + +find_package(cnats REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE cnats::${CNATS_TARGET}) diff --git a/recipes/cnats/all/test_package/conanfile.py b/recipes/cnats/all/test_package/conanfile.py new file mode 100644 index 0000000000000..6c38f16815ae8 --- /dev/null +++ b/recipes/cnats/all/test_package/conanfile.py @@ -0,0 +1,37 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + @property + def _nats_library_name(self): + suffix = "" if self.dependencies["cnats"].options.shared else "_static" + debug = "d" if self.dependencies["cnats"].settings.build_type == "Debug" else "" + return f"nats{suffix}{debug}" + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CNATS_TARGET"] = self._nats_library_name + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/cnats/all/test_package/test_package.cpp b/recipes/cnats/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..e9578180d8c82 --- /dev/null +++ b/recipes/cnats/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include +#include + +#include "nats/nats.h" + + +int main() { + std::cout << "NATS Version: " << nats_GetVersion() << std::endl; + return EXIT_SUCCESS; +} diff --git a/recipes/cnats/config.yml b/recipes/cnats/config.yml new file mode 100644 index 0000000000000..ca7b223bb16c2 --- /dev/null +++ b/recipes/cnats/config.yml @@ -0,0 +1,3 @@ +versions: + "3.8.0": + folder: all From 3ec7531aaee84e0baf57065b0ce4f658198c7bc1 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 12 Mar 2024 19:42:48 +0200 Subject: [PATCH 231/405] (#18788) openvr: migrate to Conan v2 * openvr: migrate to Conan v2 * openvr: transitive_libs=True * openvr: fix jsoncpp target * openvr: fix shared install on Windows * openvr: add CoreFoundation framework dep --- recipes/openvr/all/CMakeLists.txt | 9 -- recipes/openvr/all/conandata.yml | 1 - recipes/openvr/all/conanfile.py | 127 +++++++++++------- .../openvr/all/test_package/CMakeLists.txt | 9 +- recipes/openvr/all/test_package/conanfile.py | 22 ++- .../openvr/all/test_v1_package/CMakeLists.txt | 8 ++ .../openvr/all/test_v1_package/conanfile.py | 16 +++ 7 files changed, 119 insertions(+), 73 deletions(-) delete mode 100644 recipes/openvr/all/CMakeLists.txt create mode 100644 recipes/openvr/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/openvr/all/test_v1_package/conanfile.py diff --git a/recipes/openvr/all/CMakeLists.txt b/recipes/openvr/all/CMakeLists.txt deleted file mode 100644 index c4553e469fbbd..0000000000000 --- a/recipes/openvr/all/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -link_libraries(CONAN_PKG::jsoncpp) - -add_subdirectory(source_subfolder) diff --git a/recipes/openvr/all/conandata.yml b/recipes/openvr/all/conandata.yml index 8306fe238fc2a..8a94700e08a51 100644 --- a/recipes/openvr/all/conandata.yml +++ b/recipes/openvr/all/conandata.yml @@ -11,4 +11,3 @@ sources: patches: "1.16.8": - patch_file: "patches/fix-includes-and-assert-1.16.8.patch" - base_path: "source_subfolder" diff --git a/recipes/openvr/all/conanfile.py b/recipes/openvr/all/conanfile.py index 35ae1e9ea460d..482f050fca0c4 100644 --- a/recipes/openvr/all/conanfile.py +++ b/recipes/openvr/all/conanfile.py @@ -1,16 +1,30 @@ import os -from conans import ConanFile, tools, CMake -from conans.errors import ConanInvalidConfiguration + +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, 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, replace_in_file, rmdir, \ + save, mkdir +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" + class OpenvrConan(ConanFile): name = "openvr" - description = "API and runtime that allows access to VR hardware from applications have specific knowledge of the hardware they are targeting." - topics = ("conan", "openvr", "vr", ) + description = ( + "API and runtime that allows access to VR hardware from applications " + "have specific knowledge of the hardware they are targeting." + ) + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/ValveSoftware/openvr" - license = "BSD-3-Clause" + topics = ("vr", "virtual reality") - settings = "os", "compiler", "build_type", "arch" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -20,13 +34,8 @@ class OpenvrConan(ConanFile): "fPIC": True, } - exports_sources = ["CMakeLists.txt", "patches/**"] - generators = "cmake" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -34,69 +43,83 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, "11") + self.options.rm_safe("fPIC") - if self.settings.compiler == "gcc" and tools.Version(self.settings.compiler.version) < "5": - raise ConanInvalidConfiguration("OpenVR can't be compiled by {0} {1}".format(self.settings.compiler, - self.settings.compiler.version)) + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("jsoncpp/1.9.4") + self.requires("jsoncpp/1.9.5", transitive_headers=True, transitive_libs=True) + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5": + raise ConanInvalidConfiguration( + f"OpenVR can't be compiled by {self.settings.compiler} {self.settings.compiler.version}" + ) def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = "{}-{}".format(self.name, self.version) - os.rename(extracted_dir, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["BUILD_SHARED"] = self.options.shared + tc.cache_variables["BUILD_UNIVERSAL"] = False + # Let Conan handle the stdlib setting, even if we are using libc++ + tc.cache_variables["USE_LIBCXX"] = False + tc.generate() + tc = CMakeDeps(self) + tc.generate() def _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) + apply_conandata_patches(self) # Honor fPIC=False - tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), - "-fPIC", "") - # Unvendor jsoncpp (we rely on our CMake wrapper for jsoncpp injection) - tools.replace_in_file(os.path.join(self._source_subfolder, "src", "CMakeLists.txt"), - "jsoncpp.cpp", "") - tools.rmdir(os.path.join(self._source_subfolder, "src", "json")) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["BUILD_SHARED"] = self.options.shared - self._cmake.definitions["BUILD_UNIVERSAL"] = False - self._cmake.definitions["USE_LIBCXX"] = False - self._cmake.configure() - - return self._cmake + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "-fPIC", "") + # Unvendor jsoncpp + replace_in_file(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"), "jsoncpp.cpp", "") + rmdir(self, os.path.join(self.source_folder, "src", "json")) + # Add jsoncpp dependency from Conan + save(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"), + "find_package(jsoncpp REQUIRED CONFIG)\n" + "target_link_libraries(${LIBNAME} JsonCpp::JsonCpp)", + append=True) def build(self): self._patch_sources() - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() + @property + def _lib_name(self): + if self.settings.os == "Windows" and self.settings.arch == "x86_64": + return "openvr_api64" + return "openvr_api" + def package(self): - self.copy("LICENSE", src=os.path.join(self.source_folder, self._source_subfolder), dst="licenses") - cmake = self._configure_cmake() + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() - self.copy(pattern="openvr_api*.dll", dst="bin", src="bin", keep_path=False) - tools.rmdir(os.path.join(self.package_folder, "share")) + if self.settings.os == "Windows" and self.options.shared: + mkdir(self, os.path.join(self.package_folder, "bin")) + os.rename(os.path.join(self.package_folder, "lib", f"{self._lib_name}.dll"), + os.path.join(self.package_folder, "bin", f"{self._lib_name}.dll")) + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): - self.cpp_info.names["pkg_config"] = "openvr" - self.cpp_info.libs = tools.collect_libs(self) + self.cpp_info.set_property("pkg_config_name", "openvr") + self.cpp_info.libs = [self._lib_name] self.cpp_info.includedirs.append(os.path.join("include", "openvr")) if not self.options.shared: self.cpp_info.defines.append("OPENVR_BUILD_STATIC") - libcxx = tools.stdcpp_library(self) + libcxx = stdcpp_library(self) if libcxx: self.cpp_info.system_libs.append(libcxx) if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("dl") - if tools.is_apple_os(self.settings.os): - self.cpp_info.frameworks.append("Foundation") + if is_apple_os(self): + self.cpp_info.frameworks.extend(["Foundation", "CoreFoundation"]) diff --git a/recipes/openvr/all/test_package/CMakeLists.txt b/recipes/openvr/all/test_package/CMakeLists.txt index aede60e3b1e4a..8759620a94936 100644 --- a/recipes/openvr/all/test_package/CMakeLists.txt +++ b/recipes/openvr/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(openvr REQUIRED CONFIG) add_executable(${CMAKE_PROJECT_NAME} test_package.cpp) -target_link_libraries(${CMAKE_PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE openvr::openvr) set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/openvr/all/test_package/conanfile.py b/recipes/openvr/all/test_package/conanfile.py index 4903f1a7e8fa0..ef5d7042163ec 100644 --- a/recipes/openvr/all/test_package/conanfile.py +++ b/recipes/openvr/all/test_package/conanfile.py @@ -1,9 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -11,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/openvr/all/test_v1_package/CMakeLists.txt b/recipes/openvr/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/openvr/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/openvr/all/test_v1_package/conanfile.py b/recipes/openvr/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..6c9d5dba712c7 --- /dev/null +++ b/recipes/openvr/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From e1e3d156fef7f784655095bcc70bdeec22296028 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 12 Mar 2024 20:03:11 +0200 Subject: [PATCH 232/405] (#18952) ofeli: migrate to Conan v2, add v5.1.0 * ofeli: migrate to Conan v2 * ofeli: shared builds are not supported * ofeli: remove incorrect shared/fPIC * ofeli: add v5.1.0 with CMake support * ofeli: shared build does not work * ofeli: install materials under res/ * ofeli: fix license copying * ofeli: add cmake/3.16 dependency * ofeli: improve validation logic, enable MSVC * ofeli: disable MSVC on 5.x --- recipes/ofeli/{all => 4.x}/conandata.yml | 0 recipes/ofeli/4.x/conanfile.py | 82 +++++++++++++++++ .../{all => 4.x}/test_package/CMakeLists.txt | 7 +- recipes/ofeli/4.x/test_package/conanfile.py | 26 ++++++ .../test_package/test_package.cpp | 2 +- .../ofeli/4.x/test_v1_package/CMakeLists.txt | 8 ++ .../test_v1_package}/conanfile.py | 0 recipes/ofeli/5.x/conandata.yml | 4 + recipes/ofeli/5.x/conanfile.py | 88 +++++++++++++++++++ recipes/ofeli/5.x/test_package/CMakeLists.txt | 8 ++ recipes/ofeli/5.x/test_package/conanfile.py | 26 ++++++ .../ofeli/5.x/test_package/test_package.cpp | 76 ++++++++++++++++ recipes/ofeli/all/CMakeLists.txt | 7 -- recipes/ofeli/all/conanfile.py | 73 --------------- recipes/ofeli/config.yml | 4 +- 15 files changed, 324 insertions(+), 87 deletions(-) rename recipes/ofeli/{all => 4.x}/conandata.yml (100%) create mode 100644 recipes/ofeli/4.x/conanfile.py rename recipes/ofeli/{all => 4.x}/test_package/CMakeLists.txt (57%) create mode 100644 recipes/ofeli/4.x/test_package/conanfile.py rename recipes/ofeli/{all => 4.x}/test_package/test_package.cpp (99%) create mode 100644 recipes/ofeli/4.x/test_v1_package/CMakeLists.txt rename recipes/ofeli/{all/test_package => 4.x/test_v1_package}/conanfile.py (100%) create mode 100644 recipes/ofeli/5.x/conandata.yml create mode 100644 recipes/ofeli/5.x/conanfile.py create mode 100644 recipes/ofeli/5.x/test_package/CMakeLists.txt create mode 100644 recipes/ofeli/5.x/test_package/conanfile.py create mode 100644 recipes/ofeli/5.x/test_package/test_package.cpp delete mode 100644 recipes/ofeli/all/CMakeLists.txt delete mode 100644 recipes/ofeli/all/conanfile.py diff --git a/recipes/ofeli/all/conandata.yml b/recipes/ofeli/4.x/conandata.yml similarity index 100% rename from recipes/ofeli/all/conandata.yml rename to recipes/ofeli/4.x/conandata.yml diff --git a/recipes/ofeli/4.x/conanfile.py b/recipes/ofeli/4.x/conanfile.py new file mode 100644 index 0000000000000..1bdb7a7fb9c25 --- /dev/null +++ b/recipes/ofeli/4.x/conanfile.py @@ -0,0 +1,82 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import chdir, copy, get +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.53.0" + + +class OfeliConan(ConanFile): + name = "ofeli" + description = "An Object Finite Element Library" + license = "LGPL-3.0-or-later" + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://ofeli.org/index.html" + topics = ("finite-element", "finite-element-library", "finite-element-analysis", "finite-element-solver") + + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "fPIC": [True, False], + } + default_options = { + "fPIC": True, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def layout(self): + basic_layout(self, src_folder="src") + + def validate(self): + if self.settings.os not in ["Linux", "FreeBSD"]: + raise ConanInvalidConfiguration("Ofeli only supports Linux") + if self.settings.compiler != "gcc": + raise ConanInvalidConfiguration("Ofeli only supports GCC") + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + if self.settings.compiler.libcxx != "libstdc++11": + raise ConanInvalidConfiguration("Ofeli only supports libstdc++'s new ABI") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) + config = 'release' if self.settings.build_type == 'Release' else 'debug' + tc.configure_args.append(f"--enable-{config}") + tc.generate() + + def build(self): + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.configure() + autotools.make() + + def package(self): + copy(self, "*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include")) + copy(self, "*libofeli.a", + dst=os.path.join(self.package_folder, "lib"), + src=os.path.join(self.source_folder, "src")) + copy(self, "*.md", + dst=os.path.join(self.package_folder, "res"), + src=os.path.join(self.source_folder, "material")) + copy(self, "COPYING", + dst=os.path.join(self.package_folder, "licenses"), + src=os.path.join(self.source_folder, "doc")) + + def package_info(self): + self.cpp_info.libs = ["ofeli"] + res_path = os.path.join(self.package_folder, "res") + self.runenv_info.define("OFELI_PATH_MATERIAL", res_path) + + # TODO: Legacy, to be removed on Conan 2.0 + self.env_info.OFELI_PATH_MATERIAL.append(res_path) diff --git a/recipes/ofeli/all/test_package/CMakeLists.txt b/recipes/ofeli/4.x/test_package/CMakeLists.txt similarity index 57% rename from recipes/ofeli/all/test_package/CMakeLists.txt rename to recipes/ofeli/4.x/test_package/CMakeLists.txt index 14b7550d3c44c..1e5e727abc890 100644 --- a/recipes/ofeli/all/test_package/CMakeLists.txt +++ b/recipes/ofeli/4.x/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(ofeli CONFIG REQUIRED) +find_package(ofeli REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} ofeli::ofeli) diff --git a/recipes/ofeli/4.x/test_package/conanfile.py b/recipes/ofeli/4.x/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/ofeli/4.x/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/ofeli/all/test_package/test_package.cpp b/recipes/ofeli/4.x/test_package/test_package.cpp similarity index 99% rename from recipes/ofeli/all/test_package/test_package.cpp rename to recipes/ofeli/4.x/test_package/test_package.cpp index 8d7d1aa2db165..618f3ee674c68 100644 --- a/recipes/ofeli/all/test_package/test_package.cpp +++ b/recipes/ofeli/4.x/test_package/test_package.cpp @@ -7,7 +7,7 @@ ============================================================================== Copyright (C) 1998 - 2015 Rachid Touzani - + This file is part of OFELI. OFELI is free software: you can redistribute it and/or modify diff --git a/recipes/ofeli/4.x/test_v1_package/CMakeLists.txt b/recipes/ofeli/4.x/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/ofeli/4.x/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/ofeli/all/test_package/conanfile.py b/recipes/ofeli/4.x/test_v1_package/conanfile.py similarity index 100% rename from recipes/ofeli/all/test_package/conanfile.py rename to recipes/ofeli/4.x/test_v1_package/conanfile.py diff --git a/recipes/ofeli/5.x/conandata.yml b/recipes/ofeli/5.x/conandata.yml new file mode 100644 index 0000000000000..113211f34c5ac --- /dev/null +++ b/recipes/ofeli/5.x/conandata.yml @@ -0,0 +1,4 @@ +sources: + "5.1.0": + url: "https://github.com/rtouzani/ofeli/archive/0e66d0e5a38b209ee79eab0daf7686562b753536.tar.gz" + sha256: "a2e4e62d912d05e55001a9be7c5c4741a7b8773a399acbbe558bdca0d60d430b" diff --git a/recipes/ofeli/5.x/conanfile.py b/recipes/ofeli/5.x/conanfile.py new file mode 100644 index 0000000000000..ee690068f3c61 --- /dev/null +++ b/recipes/ofeli/5.x/conanfile.py @@ -0,0 +1,88 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rmdir, replace_in_file, rename +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.53.0" + + +class OfeliConan(ConanFile): + name = "ofeli" + description = "An Object Finite Element Library" + license = "LGPL-3.0-or-later" + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://ofeli.org/index.html" + topics = ("finite-element", "finite-element-library", "finite-element-analysis", "finite-element-solver") + + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "fPIC": [True, False], + } + default_options = { + "fPIC": True, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + if self.settings.compiler in ["clang", "apple-clang"] or is_msvc(self): + # Clang fails with + # include/linear_algebra/LocalVect_impl.h:251:42: error: cannot initialize return object of type 'OFELI::Element *' with an lvalue of type 'const OFELI::Element *' + # MSVC fails with a lot of errors + # https://c3i.jfrog.io/c3i/misc/summary.html?json=https://c3i.jfrog.io/c3i/misc/logs/pr/18952/12-windows-visual_studio/ofeli/5.1.0/summary.json + raise ConanInvalidConfiguration(f"{self.settings.compiler} is not supported due to compilation errors") + + def build_requirements(self): + self.tool_requires("cmake/[>=3.16 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = CMakeToolchain(self) + tc.generate() + + def _patch_sources(self): + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") + replace_in_file(self, cmakelists, "add_subdirectory (demos)", "") + replace_in_file(self, cmakelists, "add_subdirectory (util)", "") + # Fix incorrect use of add_definitions() for build flags + replace_in_file(self, cmakelists, "add_definitions", "add_compile_options") + # Fix -fPIC support + replace_in_file(self, cmakelists, " -fPIE", "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + rename(self, os.path.join(self.package_folder, "share", "ofeli", "material"), + os.path.join(self.package_folder, "res")) + rmdir(self, os.path.join(self.package_folder, "share")) + + + def package_info(self): + self.cpp_info.libs = ["ofeli"] + self.cpp_info.includedirs = [os.path.join("include", "ofeli")] + res_path = os.path.join(self.package_folder, "res") + self.runenv_info.define_path("OFELI_PATH_MATERIAL", res_path) diff --git a/recipes/ofeli/5.x/test_package/CMakeLists.txt b/recipes/ofeli/5.x/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..1e5e727abc890 --- /dev/null +++ b/recipes/ofeli/5.x/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(ofeli REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ofeli::ofeli) +set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) diff --git a/recipes/ofeli/5.x/test_package/conanfile.py b/recipes/ofeli/5.x/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/ofeli/5.x/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/ofeli/5.x/test_package/test_package.cpp b/recipes/ofeli/5.x/test_package/test_package.cpp new file mode 100644 index 0000000000000..618f3ee674c68 --- /dev/null +++ b/recipes/ofeli/5.x/test_package/test_package.cpp @@ -0,0 +1,76 @@ +/*============================================================================== + + O F E L I + + Object Finite Element Library + + ============================================================================== + + Copyright (C) 1998 - 2015 Rachid Touzani + + This file is part of OFELI. + + OFELI is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OFELI is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with OFELI. If not, see . + + ============================================================================== + + An example of a Finite Element Code using OFELI + + Solution of a 1-D Elliptic problem using P1 Finite elements + + ==============================================================================*/ + +#include "OFELI.h" +using namespace OFELI; + +int main(int argc, char *argv[]) +{ + double L=1; + int N=10; + +/// Read and output mesh data + banner(); + if (argc>1) + N = atoi(argv[1]); + Mesh ms(L,N); + int NbN = N+1; + +// Declare problem data (matrix, rhs, boundary conditions, body forces) + TrMatrix A(NbN); + Vect b(ms); + b.set("16*pi*pi*sin(4*pi*x)"); + +// Build matrix and R.H.S. + double h = L/double(N); + b *= h; + for (int i=2; i sol(ms); + sol.set("sin(4*pi*x)"); + cout << "Error = " << (b-sol).getNormMax() << endl; + return 0; +} diff --git a/recipes/ofeli/all/CMakeLists.txt b/recipes/ofeli/all/CMakeLists.txt deleted file mode 100644 index c921d02a0d877..0000000000000 --- a/recipes/ofeli/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.4) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/ofeli/all/conanfile.py b/recipes/ofeli/all/conanfile.py deleted file mode 100644 index 0696eaa92f3e6..0000000000000 --- a/recipes/ofeli/all/conanfile.py +++ /dev/null @@ -1,73 +0,0 @@ -from conans import ConanFile, tools, AutoToolsBuildEnvironment -import os -from conans.errors import ConanInvalidConfiguration - -required_conan_version = ">=1.40.0" - - -class OfeliConan(ConanFile): - name = "ofeli" - description = "An Object Finite Element Library" - topics = ("finite-element", "finite-element-library", - "finite-element-analysis", "finite-element-solver") - license = "LGPL-3.0-or-later" - homepage = "http://ofeli.org/index.html" - url = "https://github.com/conan-io/conan-center-index" - settings = "os", "arch", "compiler", "build_type" - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _doc_folder(self): - return os.path.join( - self._source_subfolder, - "doc" - ) - - def validate(self): - if self.settings.os != "Linux": - raise ConanInvalidConfiguration( - "Ofeli is just supported for Linux") - if self.settings.compiler != "gcc": - raise ConanInvalidConfiguration( - "Ofeli is just supported for GCC") - if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, 11) - if self.settings.compiler.libcxx != "libstdc++11": - raise ConanInvalidConfiguration( - "Ofeli supports only libstdc++'s new ABI") - - def source(self): - tools.get(**self.conan_data["sources"][self.version], - strip_root=True, destination=self._source_subfolder) - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self) - self._autotools.configure(args=["--enable-%s" % ("release" - if self.settings.build_type == "Release" - else "debug")]) - return self._autotools - - def build(self): - with tools.chdir(self._source_subfolder): - autotools = self._configure_autotools() - autotools.make() - - def package(self): - self.copy("*.h", dst="include", - src=os.path.join(self._source_subfolder, "include")) - self.copy("*libofeli.a", dst="lib", - src=os.path.join(self._source_subfolder, "src")) - self.copy("*.md", dst="res", - src=os.path.join(self._source_subfolder, "material")) - self.copy("COPYING", dst="licenses", src=self._doc_folder) - - def package_info(self): - self.cpp_info.libs = ["ofeli"] - self.env_info.OFELI_PATH_MATERIAL.append( - os.path.join(self.package_folder, "res")) diff --git a/recipes/ofeli/config.yml b/recipes/ofeli/config.yml index 33a6df35b4e32..ed520cd12092e 100644 --- a/recipes/ofeli/config.yml +++ b/recipes/ofeli/config.yml @@ -1,3 +1,5 @@ versions: + "5.1.0": + folder: 5.x "4.1.2": - folder: all + folder: 4.x From 43bcf2b3b012596a6a34d70aea39849a1320b559 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 12 Mar 2024 20:25:11 +0200 Subject: [PATCH 233/405] (#21079) nodejs: update recipe for Conan v2, handle libc issues in C3I MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * nodejs: update recipe for Conan v2 * nodejs: skip test on old libc versions (i.e. CI) * nodejs: fix self.output.warn() * nodejs: improve libc detection * nodejs: print detected libc version * nodejs: improve libc check * nodejs: use platform.libc_ver() for libc version detection * nodejs: fix test_v1_package * Remove libc version checks, assume this works by now * Fix test check * nodejs: restore the glibc check --------- Co-authored-by: Rubén Rincón Blanco --- recipes/nodejs/all/conanfile.py | 68 ++++++++----------- recipes/nodejs/all/test_package/conanfile.py | 17 ++++- .../nodejs/all/test_v1_package/conanfile.py | 12 +++- 3 files changed, 54 insertions(+), 43 deletions(-) diff --git a/recipes/nodejs/all/conanfile.py b/recipes/nodejs/all/conanfile.py index c098d4eea4705..077b1d4fb6d5e 100644 --- a/recipes/nodejs/all/conanfile.py +++ b/recipes/nodejs/all/conanfile.py @@ -1,33 +1,35 @@ import os -import re -from six import StringIO -from conan import ConanFile, conan_version -from conan.tools.scm import Version -from conan.tools.files import copy, get + +from conan import ConanFile from conan.errors import ConanInvalidConfiguration +from conan.tools.files import copy, get required_conan_version = ">=1.59.0" class NodejsConan(ConanFile): name = "nodejs" - description = "nodejs binaries for use in recipes" - topics = ("node", "javascript", "runtime") + description = "Node.js is an open-source, cross-platform JavaScript runtime environment." + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://nodejs.org" - license = "MIT" + topics = ("node", "javascript", "runtime", "pre-built") + package_type = "application" - settings = "os", "arch", "compiler" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True short_paths = True - @property - def _source_subfolder(self): - return os.path.join(self.source_folder, "source_subfolder") + def layout(self): + pass + + def package_id(self): + del self.info.settings.compiler + del self.info.settings.build_type @property def _nodejs_arch(self): - if str(self.settings.os) == "Linux": + if str(self.settings.os) in ["Linux", "FreeBSD"]: if str(self.settings.arch).startswith("armv7"): return "armv7" if str(self.settings.arch).startswith("armv8") and "32" not in str(self.settings.arch): @@ -35,40 +37,30 @@ def _nodejs_arch(self): return str(self.settings.arch) @property - def _glibc_version(self): - cmd = ['ldd', '--version'] if conan_version.major == "1" else ['ldd --version'] - buff = StringIO() - self.run(cmd, buff) - return str(re.search(r'GLIBC (\d{1,3}.\d{1,3})', buff.getvalue()).group(1)) - - def package_id(self): - del self.info.settings.compiler + def _dl_info(self): + return self.conan_data["sources"].get(self.version, {}).get(str(self.settings.os), {}).get(self._nodejs_arch) def validate(self): - if not self.version in self.conan_data["sources"] or \ - not str(self.settings.os) in self.conan_data["sources"][self.version] or \ - not self._nodejs_arch in self.conan_data["sources"][self.version][str(self.settings.os)]: + if not self._dl_info: raise ConanInvalidConfiguration("Binaries for this combination of architecture/version/os not available") - if Version(self.version) >= "18.0.0": - if str(self.settings.os) == "Linux": - if Version(self._glibc_version) < '2.27': - raise ConanInvalidConfiguration("Binaries for this combination of architecture/version/os not available") - def build(self): - get(self, **self.conan_data["sources"][self.version][str(self.settings.os)][self._nodejs_arch], - destination=self._source_subfolder, strip_root=True) + get(self, **self._dl_info, strip_root=True) def package(self): - copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self._source_subfolder) - copy(self, pattern="*", dst=os.path.join(self.package_folder, "bin"), src=os.path.join(self._source_subfolder, "bin")) - copy(self, pattern="*", dst=os.path.join(self.package_folder, "lib"), src=os.path.join(self._source_subfolder, "lib")) - copy(self, pattern="node.exe", dst=os.path.join(self.package_folder, "bin"), src=self._source_subfolder) - copy(self, pattern="npm", dst=os.path.join(self.package_folder, "bin"), src=self._source_subfolder) - copy(self, pattern="npx", dst=os.path.join(self.package_folder, "bin"), src=self._source_subfolder) + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.build_folder) + copy(self, "*", dst=os.path.join(self.package_folder, "bin"), src=os.path.join(self.build_folder, "bin")) + copy(self, "*", dst=os.path.join(self.package_folder, "lib"), src=os.path.join(self.build_folder, "lib")) + copy(self, "node.exe", dst=os.path.join(self.package_folder, "bin"), src=self.build_folder) + copy(self, "npm", dst=os.path.join(self.package_folder, "bin"), src=self.build_folder) + copy(self, "npx", dst=os.path.join(self.package_folder, "bin"), src=self.build_folder) def package_info(self): self.cpp_info.includedirs = [] + self.cpp_info.frameworkdirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] + + # TODO: Legacy, to be removed on Conan 2.0 bin_dir = os.path.join(self.package_folder, "bin") - self.output.info('Appending PATH environment variable: {}'.format(bin_dir)) self.env_info.PATH.append(bin_dir) diff --git a/recipes/nodejs/all/test_package/conanfile.py b/recipes/nodejs/all/test_package/conanfile.py index 26c1600e272f4..01953a2dc0788 100644 --- a/recipes/nodejs/all/test_package/conanfile.py +++ b/recipes/nodejs/all/test_package/conanfile.py @@ -1,16 +1,27 @@ +import platform + from conan import ConanFile from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout +from conan.tools.scm import Version class TestPackageConan(ConanFile): - - settings = "os", "arch" + settings = "os", "arch", "compiler", "build_type" + generators = "VirtualRunEnv" test_type = "explicit" + def layout(self): + cmake_layout(self) + def build_requirements(self): self.tool_requires(self.tested_reference_str) def test(self): if can_run(self): - self.output.info("Node version:") + if self.settings.os in ["Linux", "FreeBSD"]: + libc_version = Version(platform.libc_ver()[1]) + if libc_version < "2.29": + self.output.warning(f"System libc version {libc_version} < 2.29, skipping test_package") + return self.run("node --version") diff --git a/recipes/nodejs/all/test_v1_package/conanfile.py b/recipes/nodejs/all/test_v1_package/conanfile.py index 70012946fb840..31062ce8b441a 100644 --- a/recipes/nodejs/all/test_v1_package/conanfile.py +++ b/recipes/nodejs/all/test_v1_package/conanfile.py @@ -1,5 +1,8 @@ +import platform + from conan import ConanFile from conan.tools.build import cross_building +from conans.model.version import Version class TestPackageConan(ConanFile): @@ -7,10 +10,15 @@ class TestPackageConan(ConanFile): settings = "os", "arch" test_type = "explicit" - def requirements(self): - self.requires(self.tested_reference_str) + def build_requirements(self): + self.build_requires(self.tested_reference_str) def test(self): if not cross_building(self): + if self.settings.os in ["Linux", "FreeBSD"]: + libc_version = Version(platform.libc_ver()[1]) + if libc_version < "2.29": + self.output.warning(f"System libc version {libc_version} < 2.29, skipping test_package") + return self.output.info("Node version:") self.run("node --version") From a34410f3d27a31758d0c9dd642591784eb6a0ffd Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 12 Mar 2024 20:44:32 +0200 Subject: [PATCH 234/405] (#21111) xtr: migrate to Conan v2 * xtr: migrate to Conan v2 * xtr: switch to CMake, enable non-Linux builds * xtr: fix overly strict compiler checks * xtr: handle fPIC on Windows * xtr: enable io_uring only for Linux, not FreeBSD * xtr: enable only for x86_64 * xtr: enable only for Linux and FreeBSD --- recipes/xtr/all/conandata.yml | 6 - recipes/xtr/all/conanfile.py | 169 +++++++++++------- recipes/xtr/all/test_package/CMakeLists.txt | 6 +- recipes/xtr/all/test_package/conanfile.py | 19 +- .../xtr/all/test_v1_package/CMakeLists.txt | 8 + recipes/xtr/all/test_v1_package/conanfile.py | 17 ++ recipes/xtr/config.yml | 4 - 7 files changed, 143 insertions(+), 86 deletions(-) create mode 100644 recipes/xtr/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/xtr/all/test_v1_package/conanfile.py diff --git a/recipes/xtr/all/conandata.yml b/recipes/xtr/all/conandata.yml index c4c7a036934fc..1e78ef99a9e55 100644 --- a/recipes/xtr/all/conandata.yml +++ b/recipes/xtr/all/conandata.yml @@ -5,12 +5,6 @@ sources: "2.0.1": url: "https://github.com/choll/xtr/archive/refs/tags/2.0.1.tar.gz" sha256: "92327264541900a2c9d43aaa3070d143d5e91879737fcea8cbf56065330af059" - "2.0.0": - url: "https://github.com/choll/xtr/archive/refs/tags/2.0.0.tar.gz" - sha256: "1d0113d3551e0d5f5b97228ba245d711c6b66a62a69d62bdf1b206fdf45edd41" "1.0.1": url: "https://github.com/choll/xtr/archive/refs/tags/1.0.1.tar.gz" sha256: "7cc5ec7a2d7d2979e33b928191def79dc05c8074f4c8bb76cd0a20d9b514be0c" - "1.0.0": - url: "https://github.com/choll/xtr/archive/refs/tags/1.0.0.tar.gz" - sha256: "c828883f3045762442fb8a69ed2633e523493a307a0cb2717ac0df93606db7fd" diff --git a/recipes/xtr/all/conanfile.py b/recipes/xtr/all/conanfile.py index 494c8ad3c65f3..267bd2a3780a0 100644 --- a/recipes/xtr/all/conanfile.py +++ b/recipes/xtr/all/conanfile.py @@ -1,125 +1,160 @@ -from conans import ConanFile, AutoToolsBuildEnvironment, tools -from conans.errors import ConanInvalidConfiguration - import os +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake +from conan.tools.files import copy, get, replace_in_file +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" + class XtrConan(ConanFile): name = "xtr" - description = \ - "C++ Logging Library for Low-latency or Real-time Environments" - topics = ("xtr", "logging", "logger") + description = "C++ Logging Library for Low-latency or Real-time Environments" + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/choll/xtr" - license = "MIT" + topics = ("logging", "logger") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { + "shared": [True, False], "fPIC": [True, False], "enable_exceptions": [True, False], "enable_lto": [True, False], "enable_io_uring": ["auto", True, False], "enable_io_uring_sqpoll": [True, False], - "sink_capacity_kb": "ANY" + "sink_capacity_kb": [None, "ANY"], } default_options = { + "shared": False, "fPIC": True, "enable_exceptions": True, "enable_lto": False, "enable_io_uring": "auto", "enable_io_uring_sqpoll": False, - "sink_capacity_kb": None + "sink_capacity_kb": None, } - generators = "make" + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "10", + "clang": "12", + } + def config_options(self): - if tools.Version(self.version) < "1.0.1": - del self.options.sink_capacity_kb - if tools.Version(self.version) < "2.0.0": + if Version(self.version) >= "2.0.0" and self.settings.os == "Linux": + # Require liburing on any Linux system by default as a run-time check will be + # done to detect if the host kernel supports io_uring. + self.options.enable_io_uring = True + else: del self.options.enable_io_uring del self.options.enable_io_uring_sqpoll + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + basic_layout(self, src_folder="src") + def requirements(self): - self.requires("fmt/7.1.3") - # Require liburing on any Linux system as a run-time check will be - # done to detect if the host kernel supports io_uring. - if tools.Version(self.version) >= "2.0.0" and self.settings.os == "Linux" and self.options.get_safe("enable_io_uring"): - self.requires("liburing/2.1") + # INFO: https://github.com/choll/xtr/blob/2.1.0/include/xtr/detail/buffer.hpp#L27 + self.requires("fmt/10.1.1", transitive_headers=True, transitive_libs=True) + if self.options.get_safe("enable_io_uring"): + self.requires("liburing/2.4") def validate(self): - if self.settings.os not in ("FreeBSD", "Linux"): + if self.settings.os not in ["FreeBSD", "Linux"]: raise ConanInvalidConfiguration(f"Unsupported os={self.settings.os}") - if self.settings.compiler not in ("gcc", "clang"): - raise ConanInvalidConfiguration(f"Unsupported compiler={self.settings.compiler}") - if self.settings.arch not in ("x86_64", ): + if self.settings.arch not in ["x86_64"]: raise ConanInvalidConfiguration(f"Unsupported arch={self.settings.arch}") - if tools.Version(self.version) < "2.0.0" and self.settings.compiler == "clang" and self.settings.compiler.libcxx == "libc++": - raise ConanInvalidConfiguration(f"Use at least version 2.0.0 for libc++ compatibility") - if self.options.get_safe("enable_io_uring_sqpoll") and not self.options.get_safe("enable_io_uring"): - raise ConanInvalidConfiguration(f"io_uring must be enabled if io_uring_sqpoll is enabled") - if self.options.get_safe("sink_capacity_kb") and not str(self.options.get_safe("sink_capacity_kb")).isdigit(): - raise ConanInvalidConfiguration(f"The option 'sink_capacity_kb' must be an integer") - minimal_cpp_standard = 20 if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, minimal_cpp_standard) + 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 Version(self.version) < "2.0.0" and str(self.settings.compiler.libcxx) == "libc++": + raise ConanInvalidConfiguration("Use at least version 2.0.0 for libc++ compatibility") - minimum_version = {"gcc": 10, "clang": 12} - compiler = str(self.settings.compiler) - version = tools.Version(self.settings.compiler.version) + if self.options.get_safe("enable_io_uring_sqpoll") and not self.options.get_safe("enable_io_uring"): + raise ConanInvalidConfiguration("io_uring must be enabled if io_uring_sqpoll is enabled") + if self.options.get_safe("sink_capacity_kb") and not str(self.options.get_safe("sink_capacity_kb")).isdigit(): + raise ConanInvalidConfiguration("The option 'sink_capacity_kb' must be an integer") - if version < minimum_version[compiler]: - raise ConanInvalidConfiguration( - f"{self.name} requires {self.settings.compiler} version {minimum_version[compiler]} or later") + if Version(self.dependencies["fmt"].ref.version) < 6: + raise ConanInvalidConfiguration("The version of fmt must be >= 6.0.0") + if Version(self.dependencies["fmt"].ref.version) == "8.0.0" and self.settings.compiler == "clang": + raise ConanInvalidConfiguration("fmt/8.0.0 is known to not work with clang (https://github.com/fmtlib/fmt/issues/2377)") def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def get_defines(self): + def _get_defines(self): defines = [] enable_io_uring = self.options.get_safe("enable_io_uring") if enable_io_uring in (True, False): - defines += ["XTR_USE_IO_URING={}".format(int(bool(enable_io_uring)))] + defines += [f"XTR_USE_IO_URING={int(bool(enable_io_uring))}"] if self.options.get_safe("enable_io_uring_sqpoll"): defines += ["XTR_IO_URING_POLL=1"] capacity = self.options.get_safe("sink_capacity_kb") if capacity: - defines += ["XTR_SINK_CAPACITY={}".format(int(capacity) * 1024)] + defines += [f"XTR_SINK_CAPACITY={int(capacity) * 1024}"] return defines - def build(self): - # FIXME: should be done in validate (but version is not yet available there) - if tools.Version(self.deps_cpp_info["fmt"].version) < 6: - raise ConanInvalidConfiguration("The version of fmt must >= 6.0.0") - if tools.Version(self.deps_cpp_info["fmt"].version) == "8.0.0" and self.settings.compiler == "clang": - raise ConanInvalidConfiguration("fmt/8.0.0 is known to not work with clang (https://github.com/fmtlib/fmt/issues/2377)") + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["ENABLE_EXCEPTIONS"] = self.options.enable_exceptions + tc.cache_variables["ENABLE_LTO"] = self.options.enable_lto + tc.cache_variables["BUILD_SINGLE_HEADER"] = False + tc.cache_variables["BUILD_BENCHMARK"] = False + tc.cache_variables["BUILD_TESTING"] = False + tc.cache_variables["INSTALL_DOCS"] = False + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def _patch_sources(self): + if Version(self.version) >= "2.0.0": + # Ensure that liburing from Conan is used + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "find_package(liburing)", + "find_package(liburing REQUIRED NO_DEFAULT_PATH PATHS ${CMAKE_PREFIX_PATH})" + if self.options.get_safe("enable_io_uring") else + "") + # Non-single header installation is broken as of 2.1.0 + # https://github.com/choll/xtr/pull/4 + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + " PUBLIC_HEADER DESTINATION include)", + ")\ninstall(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ DESTINATION include)") - autotools = AutoToolsBuildEnvironment(self) - env_build_vars = autotools.vars - # Conan uses LIBS, presumably following autotools conventions, while - # the XTR makefile follows GNU make conventions and uses LDLIBS - env_build_vars["LDLIBS"] = env_build_vars["LIBS"] - # fPIC and Release/Debug/RelWithDebInfo etc are set via CXXFLAGS, - # CPPFLAGS etc. - env_build_vars["EXCEPTIONS"] = \ - str(int(bool(self.options.enable_exceptions))) - env_build_vars["LTO"] = str(int(bool(self.options.enable_lto))) - env_build_vars["CXXFLAGS"] += "".join([" -D{}".format(d) for d in self.get_defines()]) - autotools.make(vars=env_build_vars) - autotools.make(vars=env_build_vars, target="xtrctl") + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() def package(self): - self.copy("LICENSE", dst="licenses") - self.copy("*.hpp", src="include", dst="include") - self.copy("*/libxtr.a", src="build", dst="lib", keep_path=False) - self.copy("*/xtrctl", src="build", dst="bin", keep_path=False) - - tools.rmdir(os.path.join(self.package_folder, "man")) + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() def package_info(self): self.cpp_info.libs = ["xtr"] self.cpp_info.system_libs = ["pthread"] - self.cpp_info.defines = self.get_defines() + self.cpp_info.defines = self._get_defines() + + # TODO: Legacy, to be removed on Conan 2.0 bin_path = os.path.join(self.package_folder, "bin") - self.output.info(f"Appending PATH environment variable: {bin_path}") self.env_info.PATH.append(bin_path) diff --git a/recipes/xtr/all/test_package/CMakeLists.txt b/recipes/xtr/all/test_package/CMakeLists.txt index 921819122a4a1..3c2e1a85eb695 100644 --- a/recipes/xtr/all/test_package/CMakeLists.txt +++ b/recipes/xtr/all/test_package/CMakeLists.txt @@ -1,11 +1,9 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) set(CMAKE_CXX_STANDARD 20) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) -find_package(xtr REQUIRED) +find_package(xtr REQUIRED CONFIG) add_executable(${PROJECT_NAME} example.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE xtr::xtr) diff --git a/recipes/xtr/all/test_package/conanfile.py b/recipes/xtr/all/test_package/conanfile.py index 38f4483872d47..ef5d7042163ec 100644 --- a/recipes/xtr/all/test_package/conanfile.py +++ b/recipes/xtr/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/xtr/all/test_v1_package/CMakeLists.txt b/recipes/xtr/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/xtr/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/xtr/all/test_v1_package/conanfile.py b/recipes/xtr/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..38f4483872d47 --- /dev/null +++ b/recipes/xtr/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/xtr/config.yml b/recipes/xtr/config.yml index ecc6dca2fd252..4f7c23f02e7c5 100644 --- a/recipes/xtr/config.yml +++ b/recipes/xtr/config.yml @@ -3,9 +3,5 @@ versions: folder: all "2.0.1": folder: all - "2.0.0": - folder: all "1.0.1": folder: all - "1.0.0": - folder: all From f87fc31f55a0c49c11dc1302663804f4d1f5b4fc Mon Sep 17 00:00:00 2001 From: Ritobroto Mukherjee Date: Wed, 13 Mar 2024 00:36:07 +0530 Subject: [PATCH 235/405] (#21791) openal-soft: add patch for pulseaudio --- recipes/openal-soft/all/conandata.yml | 1 + ....2-0002-fix-pulseaudio-find-package-vars.patch | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 recipes/openal-soft/all/patches/1.22.2-0002-fix-pulseaudio-find-package-vars.patch diff --git a/recipes/openal-soft/all/conandata.yml b/recipes/openal-soft/all/conandata.yml index 39085eaa09938..104b16635107e 100644 --- a/recipes/openal-soft/all/conandata.yml +++ b/recipes/openal-soft/all/conandata.yml @@ -17,6 +17,7 @@ sources: patches: "1.22.2": - patch_file: "patches/1.22.2-0001-fix-al-optional-in-if-compile-error.patch" + - patch_file: "patches/1.22.2-0002-fix-pulseaudio-find-package-vars.patch" "1.21.0": - patch_file: "patches/1.21.0-0001-c++14-does-not-have-std-aligned_alloc.patch" - patch_file: "patches/1.21.0-0002-fix-windows-sdk.patch" diff --git a/recipes/openal-soft/all/patches/1.22.2-0002-fix-pulseaudio-find-package-vars.patch b/recipes/openal-soft/all/patches/1.22.2-0002-fix-pulseaudio-find-package-vars.patch new file mode 100644 index 0000000000000..ff97aae372563 --- /dev/null +++ b/recipes/openal-soft/all/patches/1.22.2-0002-fix-pulseaudio-find-package-vars.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1984ac9..75e904d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1051,8 +1051,8 @@ if(PULSEAUDIO_FOUND) + set(HAVE_PULSEAUDIO 1) + set(BACKENDS "${BACKENDS} PulseAudio${IS_LINKED},") + set(ALC_OBJS ${ALC_OBJS} alc/backends/pulseaudio.cpp alc/backends/pulseaudio.h) +- add_backend_libs(${PULSEAUDIO_LIBRARIES}) +- set(INC_PATHS ${INC_PATHS} ${PULSEAUDIO_INCLUDE_DIRS}) ++ add_backend_libs(${PULSEAUDIO_LIBRARY}) ++ set(INC_PATHS ${INC_PATHS} ${PULSEAUDIO_INCLUDE_DIR}) + endif() + endif() + if(ALSOFT_REQUIRE_PULSEAUDIO AND NOT HAVE_PULSEAUDIO) From df3ba9ab669394474b250ccfab072ca18992ae8e Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 12 Mar 2024 21:25:55 +0200 Subject: [PATCH 236/405] (#22047) assimp: add v5.3.1, v5.2.5, simplify patching, drop old versions * assimp: always add zlib dependency It's a transitive dependency of minizip anyway. * assimp: simplify patching * assimp: add conan_deps.cmake to inject dependencies * assimp: inject using conan_deps.cmake, drop old versions * assimp: bump deps * assimp: use namespaced CMake targets only * assimp: add v5.3.1, v5.2.5 * assimp: v5.2+ requires C++17 https://github.com/assimp/assimp/commit/af42d53c92487badcb396e9594157dcfdb196d68 * assimp: make _patch_sources() clearer * assimp: fix patching --- recipes/assimp/5.x/conan_deps.cmake | 42 ++ recipes/assimp/5.x/conandata.yml | 25 +- recipes/assimp/5.x/conanfile.py | 148 ++++--- .../patches/0001-unvendor-deps-5.0.x.patch | 292 -------------- .../0002-fix-all-exporters-disabled.patch | 253 ------------ .../patches/0003-unvendor-deps-5.1.x.patch | 364 ------------------ .../patches/0004-unvendor-deps-5.1.6.patch | 340 ---------------- .../patches/0006-unvendor-deps-5.2.x.patch | 340 ---------------- recipes/assimp/config.yml | 10 +- 9 files changed, 153 insertions(+), 1661 deletions(-) create mode 100644 recipes/assimp/5.x/conan_deps.cmake delete mode 100644 recipes/assimp/5.x/patches/0001-unvendor-deps-5.0.x.patch delete mode 100644 recipes/assimp/5.x/patches/0002-fix-all-exporters-disabled.patch delete mode 100644 recipes/assimp/5.x/patches/0003-unvendor-deps-5.1.x.patch delete mode 100644 recipes/assimp/5.x/patches/0004-unvendor-deps-5.1.6.patch delete mode 100644 recipes/assimp/5.x/patches/0006-unvendor-deps-5.2.x.patch diff --git a/recipes/assimp/5.x/conan_deps.cmake b/recipes/assimp/5.x/conan_deps.cmake new file mode 100644 index 0000000000000..ed063a23fb273 --- /dev/null +++ b/recipes/assimp/5.x/conan_deps.cmake @@ -0,0 +1,42 @@ +find_package(minizip REQUIRED CONFIG) +link_libraries(minizip::minizip) + +find_package(pugixml REQUIRED CONFIG) +link_libraries(pugixml::pugixml) + +find_package(utf8cpp REQUIRED CONFIG) +link_libraries(utf8cpp::utf8cpp) + +find_package(ZLIB REQUIRED CONFIG) +link_libraries(ZLIB::ZLIB) + +if(WITH_CLIPPER) + find_package(clipper REQUIRED CONFIG) + link_libraries(clipper::clipper) +endif() +if(WITH_DRACO) + find_package(draco REQUIRED CONFIG) + link_libraries(draco::draco) +endif() +if(WITH_KUBAZIP) + find_package(zip REQUIRED CONFIG) + link_libraries(zip::zip) +endif() +if(WITH_OPENDDL) + find_package(openddlparser REQUIRED CONFIG) + link_libraries(openddlparser::openddlparser) +endif() +if(WITH_POLY2TRI) + find_package(poly2tri REQUIRED CONFIG) + link_libraries(poly2tri::poly2tri) +endif() +if(WITH_PUGIXML) +endif() +if(WITH_RAPIDJSON) + find_package(RapidJSON REQUIRED CONFIG) + link_libraries(rapidjson::rapidjson) +endif() +if(WITH_STB) + find_package(stb REQUIRED CONFIG) + link_libraries(stb::stb) +endif() diff --git a/recipes/assimp/5.x/conandata.yml b/recipes/assimp/5.x/conandata.yml index c99892ad1d8a8..42aa3dd3fee85 100644 --- a/recipes/assimp/5.x/conandata.yml +++ b/recipes/assimp/5.x/conandata.yml @@ -1,31 +1,18 @@ sources: + "5.3.1": + url: "https://github.com/assimp/assimp/archive/refs/tags/v5.3.1.tar.gz" + sha256: "a07666be71afe1ad4bc008c2336b7c688aca391271188eb9108d0c6db1be53f1" + "5.2.5": + url: "https://github.com/assimp/assimp/archive/refs/tags/v5.2.5.tar.gz" + sha256: "b5219e63ae31d895d60d98001ee5bb809fb2c7b2de1e7f78ceeb600063641e1a" "5.2.2": url: "https://github.com/assimp/assimp/archive/refs/tags/v5.2.2.tar.gz" sha256: "ad76c5d86c380af65a9d9f64e8fc57af692ffd80a90f613dfc6bd945d0b80bb4" "5.1.6": url: "https://github.com/assimp/assimp/archive/refs/tags/v5.1.6.tar.gz" sha256: "52ad3a3776ce320c8add531dbcb2d3b93f2e1f10fcff5ac30178b09ba934d084" - "5.1.0": - url: "https://github.com/assimp/assimp/archive/refs/tags/v5.1.0.tar.gz" - sha256: "b96f609bca45cc4747bf8ea4b696816ada484aed2812e60ea4d16aae18360b0b" - "5.0.1": - url: "https://github.com/assimp/assimp/archive/refs/tags/v5.0.1.tar.gz" - sha256: "11310ec1f2ad2cd46b95ba88faca8f7aaa1efe9aa12605c55e3de2b977b3dbfc" - "5.0.0": - url: "https://github.com/assimp/assimp/archive/refs/tags/v5.0.0.tar.gz" - sha256: "b0110a91650d6bb4000e3d5c2185bf77b0ff0a2e7a284bc2c4af81b33988b63c" patches: "5.2.2": - patch_file: "patches/0005-fix-unzip.patch" - - patch_file: "patches/0006-unvendor-deps-5.2.x.patch" "5.1.6": - - patch_file: "patches/0004-unvendor-deps-5.1.6.patch" - patch_file: "patches/0005-fix-unzip.patch" - "5.1.0": - - patch_file: "patches/0003-unvendor-deps-5.1.x.patch" - "5.0.1": - - patch_file: "patches/0001-unvendor-deps-5.0.x.patch" - - patch_file: "patches/0002-fix-all-exporters-disabled.patch" - "5.0.0": - - patch_file: "patches/0001-unvendor-deps-5.0.x.patch" - - patch_file: "patches/0002-fix-all-exporters-disabled.patch" diff --git a/recipes/assimp/5.x/conanfile.py b/recipes/assimp/5.x/conanfile.py index 375b192d92523..9d8d654edce03 100644 --- a/recipes/assimp/5.x/conanfile.py +++ b/recipes/assimp/5.x/conanfile.py @@ -1,8 +1,8 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.build import stdcpp_library +from conan.tools.build import stdcpp_library, check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, replace_in_file, rmdir +from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, replace_in_file, rmdir, save from conan.tools.microsoft import is_msvc from conan.tools.scm import Version import os @@ -104,8 +104,27 @@ class AssimpConan(ConanFile): options.update(dict.fromkeys(_format_option_map, [True, False])) default_options.update(dict.fromkeys(_format_option_map, True)) + @property + def _min_cppstd(self): + if Version(self.version) < "5.2.0": + return 11 + return 17 + + @property + def _compilers_minimum_version(self): + if Version(self.version) < "5.2.0": + return {} + return { + "gcc": "7", + "clang": "6", + "apple-clang": "10", + "msvc": "191", + "Visual Studio": "15", + } + 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): if self.settings.os == "Windows": @@ -136,8 +155,6 @@ def _depends_on_rapidjson(self): @property def _depends_on_draco(self): - if Version(self.version) < "5.1.0": - return False return self.options.with_gltf or self.options.with_gltf_exporter @property @@ -146,51 +163,46 @@ def _depends_on_clipper(self): @property def _depends_on_stb(self): - if Version(self.version) < "5.1.0": - return False return self.options.with_m3d or self.options.with_m3d_exporter or \ self.options.with_pbrt_exporter - @property - def _depends_on_zlib(self): - return self.options.with_assbin or self.options.with_assbin_exporter or \ - self.options.with_assxml_exporter or self.options.with_blend or self.options.with_fbx or \ - self.options.with_q3bsp or self.options.with_x or self.options.with_xgl - @property def _depends_on_openddlparser(self): - if Version(self.version) < "5.1.0": - return False return self.options.with_opengex def requirements(self): # TODO: unvendor others libs: # - Open3DGC self.requires("minizip/1.2.13") - self.requires("utfcpp/3.2.3") - if Version(self.version) < "5.1.0": - self.requires("irrxml/1.2") - else: - self.requires("pugixml/1.13") + self.requires("pugixml/1.14") + self.requires("utfcpp/4.0.1") + self.requires("zlib/[>=1.2.11 <2]") if self._depends_on_kuba_zip: - self.requires("kuba-zip/0.2.6") + self.requires("kuba-zip/0.3.0") if self._depends_on_poly2tri: self.requires("poly2tri/cci.20130502") if self._depends_on_rapidjson: - self.requires("rapidjson/cci.20220822") - if self._depends_on_zlib: - self.requires("zlib/[>=1.2.11 <2]") + self.requires("rapidjson/cci.20230929") if self._depends_on_draco: self.requires("draco/1.5.6") if self._depends_on_clipper: - self.requires("clipper/4.10.0") # Only 4.x supported + if Version(self.version) >= "5.3.0": + self.requires("clipper/6.4.2") + else: + self.requires("clipper/4.10.0") if self._depends_on_stb: - self.requires("stb/cci.20220909") + self.requires("stb/cci.20230920") if self._depends_on_openddlparser: - self.requires("openddl-parser/0.5.0") + self.requires("openddl-parser/0.5.1") def validate(self): - if self._depends_on_clipper and Version(self.dependencies["clipper"].ref.version).major != "4": + 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 Version(self.version) < "5.3.0" and self._depends_on_clipper and Version(self.dependencies["clipper"].ref.version).major != "4": raise ConanInvalidConfiguration("Only 'clipper/4.x' is supported") def source(self): @@ -198,14 +210,9 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - if Version(self.version) >= "5.1.0": - tc.variables["ASSIMP_HUNTER_ENABLED"] = False - tc.variables["ASSIMP_IGNORE_GIT_HASH"] = True - tc.variables["ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR"] = False - else: - tc.variables["HUNTER_ENABLED"] = False - tc.variables["IGNORE_GIT_HASH"] = True - tc.variables["SYSTEM_IRRXML"] = True + tc.variables["ASSIMP_HUNTER_ENABLED"] = False + tc.variables["ASSIMP_IGNORE_GIT_HASH"] = True + tc.variables["ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR"] = False tc.variables["ASSIMP_ANDROID_JNIIOSYSTEM"] = False tc.variables["ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT"] = False tc.variables["ASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT"] = False @@ -223,9 +230,20 @@ def generate(self): if self.settings.os == "Windows": tc.preprocessor_definitions["NOMINMAX"] = 1 tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" # to avoid warnings + + tc.cache_variables["CMAKE_PROJECT_Assimp_INCLUDE"] = "conan_deps.cmake" + tc.cache_variables["WITH_CLIPPER"] = self._depends_on_clipper + tc.cache_variables["WITH_DRACO"] = self._depends_on_draco + tc.cache_variables["WITH_KUBAZIP"] = self._depends_on_kuba_zip + tc.cache_variables["WITH_OPENDDL"] = self._depends_on_openddlparser + tc.cache_variables["WITH_POLY2TRI"] = self._depends_on_poly2tri + tc.cache_variables["WITH_RAPIDJSON"] = self._depends_on_rapidjson + tc.cache_variables["WITH_STB"] = self._depends_on_stb tc.generate() cd = CMakeDeps(self) + cd.set_property("rapidjson", "cmake_target_name", "rapidjson::rapidjson") + cd.set_property("utfcpp", "cmake_target_name", "utf8cpp::utf8cpp") cd.generate() def _patch_sources(self): @@ -235,25 +253,61 @@ def _patch_sources(self): replace_mapping = [ ("-fPIC", ""), ("-g ", ""), + ("/WX", ""), + ("-Werror", ""), ("SET(CMAKE_POSITION_INDEPENDENT_CODE ON)", ""), ('SET(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /MDd /Ob2 /DEBUG:FULL /Zi")', ""), ('SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od")', ""), ('SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")', ""), ('SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG:FULL /PDBALTPATH:%_PDB% /OPT:REF /OPT:ICF")', ""), - ("/WX", "") ] - for before, after in replace_mapping: - replace_in_file(self, os.path.join( - self.source_folder, "CMakeLists.txt"), before, after, strict=False) - # Take care to not use these vendored libs - vendors = ["poly2tri", "rapidjson", "utf8cpp", "zip", "unzip", "stb", "zlib", "clipper"] - if Version(self.version) < "5.1.0": - vendors.append("irrXML") - else: - vendors.extend(["pugixml", "draco", "openddlparser"]) - for vendor in vendors: - rmdir(self, os.path.join(self.source_folder, "contrib", vendor)) + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), before, after, strict=False) + replace_in_file(self, os.path.join(self.source_folder, "code", "CMakeLists.txt"), before, after, strict=False) + + # Make sure vendored libs are not used by accident by removing their subdirs + allow_vendored = ["Open3DGC"] + for contrib_dir in self.source_path.joinpath("contrib").iterdir(): + if contrib_dir.is_dir() and contrib_dir.name not in allow_vendored: + rmdir(self, contrib_dir) + + # Do not include add vendored library sources to the build + # https://github.com/assimp/assimp/blob/v5.3.1/code/CMakeLists.txt#L1151-L1159 + code_cmakelists = self.source_path.joinpath("code", "CMakeLists.txt") + content = code_cmakelists.read_text(encoding="utf-8") + for vendored_lib in [ + "unzip_compile", + "Poly2Tri", + "Clipper", + "openddl_parser", + # "open3dgc", + "ziplib", + "Pugixml", + "stb", + ]: + content = content.replace("${%s_SRCS}" % vendored_lib, "") + code_cmakelists.write_text(content, encoding="utf-8") + + # Make vendored headers redirect to external ones. + for contrib_header, include in [ + (os.path.join("clipper", "clipper.hpp"), "polyclipping/clipper.hpp"), + (os.path.join("poly2tri", "poly2tri", "poly2tri.h"), "poly2tri/poly2tri.h"), + (os.path.join("stb", "stb_image.h"), "stb_image.h"), + (os.path.join("utf8cpp", "source", "utf8.h"), "utf8.h"), + (os.path.join("zip", "src", "zip.h"), "zip/zip.h"), + ]: + save(self, os.path.join(self.source_folder, "contrib", contrib_header), + f"#include <{include}>\n") + + # minizip is provided via conan_deps.cmake, no need to use pkgconfig + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "use_pkgconfig(UNZIP minizip)", "set(UNZIP_FOUND TRUE)") + + # ZLIB is unvendored, no need to install it + # https://github.com/assimp/assimp/blob/v5.3.1/CMakeLists.txt#L483-L487 + # https://github.com/assimp/assimp/blob/v5.1.6/CMakeLists.txt#L463-L466 + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "INSTALL( TARGETS zlib", "set(_ #") def build(self): self._patch_sources() diff --git a/recipes/assimp/5.x/patches/0001-unvendor-deps-5.0.x.patch b/recipes/assimp/5.x/patches/0001-unvendor-deps-5.0.x.patch deleted file mode 100644 index 2797e98541843..0000000000000 --- a/recipes/assimp/5.x/patches/0001-unvendor-deps-5.0.x.patch +++ /dev/null @@ -1,292 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -437,10 +437,14 @@ IF(HUNTER_ENABLED) - set(ASSIMP_BUILD_MINIZIP TRUE) - ELSE(HUNTER_ENABLED) - IF ( NOT ASSIMP_BUILD_ZLIB ) -- FIND_PACKAGE(ZLIB) -+ if(ASSIMP_BUILD_ASSBIN_IMPORTER OR ASSIMP_BUILD_ASSBIN_EXPORTER OR ASSIMP_BUILD_ASSXML_EXPORTER OR -+ ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_FBX_IMPORTER OR ASSIMP_BUILD_Q3BSP_IMPORTER OR -+ ASSIMP_BUILD_X_IMPORTER OR ASSIMP_BUILD_XGL_IMPORTER) -+ find_package(ZLIB REQUIRED) -+ endif() - ENDIF( NOT ASSIMP_BUILD_ZLIB ) - -- IF( NOT ZLIB_FOUND ) -+ IF(0) - MESSAGE(STATUS "compiling zlib from sources") - INCLUDE(CheckIncludeFile) - INCLUDE(CheckTypeSize) -@@ -461,23 +465,23 @@ ELSE(HUNTER_ENABLED) - SET(ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/contrib/zlib ${CMAKE_CURRENT_BINARY_DIR}/contrib/zlib) - # need to ensure we don't link with system zlib or minizip as well. - SET(ASSIMP_BUILD_MINIZIP 1) -- ELSE(NOT ZLIB_FOUND) -+ ELSE() - ADD_DEFINITIONS(-DASSIMP_BUILD_NO_OWN_ZLIB) - SET(ZLIB_LIBRARIES_LINKED -lz) -- ENDIF(NOT ZLIB_FOUND) -+ ENDIF() - INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) - ENDIF(HUNTER_ENABLED) - - IF( NOT IOS ) - IF( NOT ASSIMP_BUILD_MINIZIP ) -- use_pkgconfig(UNZIP minizip) -+ find_package(minizip REQUIRED CONFIG) -+ set(UNZIP_FOUND TRUE) - ENDIF( NOT ASSIMP_BUILD_MINIZIP ) - ELSE ( NOT IOS ) -- IF( NOT BUILD_SHARED_LIBS ) - IF( NOT ASSIMP_BUILD_MINIZIP ) -- use_pkgconfig(UNZIP minizip) -+ find_package(minizip REQUIRED CONFIG) -+ set(UNZIP_FOUND TRUE) - ENDIF( NOT ASSIMP_BUILD_MINIZIP ) -- ENDIF ( NOT BUILD_SHARED_LIBS ) - ENDIF ( NOT IOS ) - - IF ( ASSIMP_NO_EXPORT ) ---- a/code/3MF/D3MFExporter.cpp -+++ b/code/3MF/D3MFExporter.cpp -@@ -58,7 +58,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include -+# include - #endif - - namespace Assimp { ---- a/code/Blender/BlenderTessellator.h -+++ b/code/Blender/BlenderTessellator.h -@@ -147,7 +147,7 @@ namespace Assimp - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" -+# include - #endif - - namespace Assimp ---- a/code/CMakeLists.txt -+++ b/code/CMakeLists.txt -@@ -866,6 +866,7 @@ IF(HUNTER_ENABLED) - hunter_add_package(irrXML) - find_package(irrXML CONFIG REQUIRED) - ELSE(HUNTER_ENABLED) -+ find_package(irrxml REQUIRED CONFIG) - # irrXML already included in contrib directory by parent CMakeLists.txt. - ENDIF(HUNTER_ENABLED) - -@@ -874,6 +875,7 @@ IF(HUNTER_ENABLED) - hunter_add_package(utf8) - find_package(utf8 CONFIG REQUIRED) - ELSE(HUNTER_ENABLED) -+ find_package(utf8cpp REQUIRED CONFIG) - # utf8 is header-only, so Assimp doesn't need to do anything. - ENDIF(HUNTER_ENABLED) - -@@ -882,6 +884,9 @@ IF(HUNTER_ENABLED) - hunter_add_package(polyclipping) - find_package(polyclipping CONFIG REQUIRED) - ELSE(HUNTER_ENABLED) -+ if(ASSIMP_BUILD_IFC_IMPORTER) -+ find_package(clipper REQUIRED CONFIG) -+ endif() - SET( Clipper_SRCS - ../contrib/clipper/clipper.hpp - ../contrib/clipper/clipper.cpp -@@ -894,6 +899,9 @@ IF(HUNTER_ENABLED) - hunter_add_package(poly2tri) - find_package(poly2tri CONFIG REQUIRED) - ELSE(HUNTER_ENABLED) -+ if(ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_IFC_IMPORTER) -+ find_package(poly2tri REQUIRED CONFIG) -+ endif() - SET( Poly2Tri_SRCS - ../contrib/poly2tri/poly2tri/common/shapes.cc - ../contrib/poly2tri/poly2tri/common/shapes.h -@@ -930,6 +938,9 @@ IF(HUNTER_ENABLED) - hunter_add_package(zip) - find_package(zip CONFIG REQUIRED) - ELSE(HUNTER_ENABLED) -+ if(ASSIMP_BUILD_3MF_EXPORTER) -+ find_package(zip REQUIRED CONFIG) -+ endif() - SET( ziplib_SRCS - ../contrib/zip/src/miniz.h - ../contrib/zip/src/zip.c -@@ -1025,8 +1036,9 @@ IF(HUNTER_ENABLED) - hunter_add_package(RapidJSON) - find_package(RapidJSON CONFIG REQUIRED) - ELSE(HUNTER_ENABLED) -- INCLUDE_DIRECTORIES( "../contrib/rapidjson/include" ) -- INCLUDE_DIRECTORIES( "../contrib" ) -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ find_package(RapidJSON REQUIRED CONFIG) -+ endif() - ENDIF(HUNTER_ENABLED) - - # VC2010 fixes -@@ -1076,13 +1088,8 @@ SET( assimp_src - ${ASSIMP_EXPORTER_SRCS} - - # Third-party libraries -- ${IrrXML_SRCS} -- ${unzip_compile_SRCS} -- ${Poly2Tri_SRCS} -- ${Clipper_SRCS} - ${openddl_parser_SRCS} - ${open3dgc_SRCS} -- ${ziplib_SRCS} - # Necessary to show the headers in the project when using the VC++ generator: - - ${PUBLIC_HEADERS} -@@ -1094,6 +1101,7 @@ IF(NOT HUNTER_ENABLED) - INCLUDE_DIRECTORIES( - ${IRRXML_INCLUDE_DIR} - ../contrib/openddlparser/include -+ ../contrib # for Open3DGC - ) - ENDIF(NOT HUNTER_ENABLED) - -@@ -1125,7 +1133,24 @@ IF(HUNTER_ENABLED) - zip::zip - ) - ELSE(HUNTER_ENABLED) -- TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES} ${IRRXML_LIBRARY} ) -+ target_link_libraries(assimp irrxml::irrxml utf8cpp) -+ if(ASSIMP_BUILD_ASSBIN_IMPORTER OR ASSIMP_BUILD_ASSBIN_EXPORTER OR ASSIMP_BUILD_ASSXML_EXPORTER OR -+ ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_FBX_IMPORTER OR ASSIMP_BUILD_Q3BSP_IMPORTER OR -+ ASSIMP_BUILD_X_IMPORTER OR ASSIMP_BUILD_XGL_IMPORTER) -+ target_link_libraries(assimp ZLIB::ZLIB) -+ endif() -+ if(ASSIMP_BUILD_IFC_IMPORTER) -+ target_link_libraries(assimp clipper::clipper) -+ endif() -+ if(ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_IFC_IMPORTER) -+ target_link_libraries(assimp poly2tri::poly2tri) -+ endif() -+ if(ASSIMP_BUILD_3MF_EXPORTER) -+ target_link_libraries(assimp zip::zip) -+ endif() -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ target_link_libraries(assimp rapidjson) -+ endif() - ENDIF(HUNTER_ENABLED) - - if(ASSIMP_ANDROID_JNIIOSYSTEM) -@@ -1210,8 +1235,7 @@ ENDIF(APPLE) - # assimp can #include "unzip.h" - IF(NOT HUNTER_ENABLED) - if (UNZIP_FOUND) -- INCLUDE_DIRECTORIES(${UNZIP_INCLUDE_DIRS}) -- TARGET_LINK_LIBRARIES(assimp ${UNZIP_LIBRARIES}) -+ target_link_libraries(assimp minizip::minizip) - else (UNZIP_FOUND) - INCLUDE_DIRECTORIES("../") - endif (UNZIP_FOUND) ---- a/code/Common/BaseImporter.cpp -+++ b/code/Common/BaseImporter.cpp -@@ -344,7 +344,7 @@ std::string BaseImporter::GetExtension( const std::string& file ) { - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/utf8cpp/source/utf8.h" -+# include - #endif - - // ------------------------------------------------------------------------------------------------ ---- a/code/Common/ZipArchiveIOSystem.cpp -+++ b/code/Common/ZipArchiveIOSystem.cpp -@@ -55,7 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include -+# include - #endif - - namespace Assimp { ---- a/code/Importer/IFC/IFCGeometry.cpp -+++ b/code/Importer/IFC/IFCGeometry.cpp -@@ -53,8 +53,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # include - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" --# include "../contrib/clipper/clipper.hpp" -+# include -+# include - #endif - - #include ---- a/code/Importer/IFC/IFCLoader.cpp -+++ b/code/Importer/IFC/IFCLoader.cpp -@@ -55,7 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # ifdef ASSIMP_USE_HUNTER - # include - # else --# include -+# include - # endif - #endif - ---- a/code/Importer/IFC/IFCOpenings.cpp -+++ b/code/Importer/IFC/IFCOpenings.cpp -@@ -53,8 +53,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # include - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" --# include "../contrib/clipper/clipper.hpp" -+# include -+# include - #endif - - #include ---- a/code/Importer/STEPParser/STEPFileEncoding.cpp -+++ b/code/Importer/STEPParser/STEPFileEncoding.cpp -@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include -+# include - #endif - - #include ---- a/code/MMD/MMDPmxParser.cpp -+++ b/code/MMD/MMDPmxParser.cpp -@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/utf8cpp/source/utf8.h" -+# include - #endif - #include - ---- a/code/SIB/SIBImporter.cpp -+++ b/code/SIB/SIBImporter.cpp -@@ -63,7 +63,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # include - #else - //# include "../contrib/ConvertUTF/ConvertUTF.h" --# include "../contrib/utf8cpp/source/utf8.h" -+# include - #endif - #include - #include ---- a/code/X3D/FIReader.cpp -+++ b/code/X3D/FIReader.cpp -@@ -63,7 +63,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/utf8cpp/source/utf8.h" -+# include - #endif - #include - #include diff --git a/recipes/assimp/5.x/patches/0002-fix-all-exporters-disabled.patch b/recipes/assimp/5.x/patches/0002-fix-all-exporters-disabled.patch deleted file mode 100644 index 2e71d7e86ff86..0000000000000 --- a/recipes/assimp/5.x/patches/0002-fix-all-exporters-disabled.patch +++ /dev/null @@ -1,253 +0,0 @@ -patch from https://github.com/assimp/assimp/pull/2759 - ---- a/code/Common/Exporter.cpp -+++ b/code/Common/Exporter.cpp -@@ -105,90 +105,88 @@ void ExportScene3MF( const char*, IOSystem*, const aiScene*, const ExportPropert - void ExportAssimp2Json(const char* , IOSystem*, const aiScene* , const Assimp::ExportProperties*); - - // ------------------------------------------------------------------------------------------------ --// global array of all export formats which Assimp supports in its current build --Exporter::ExportFormatEntry gExporters[] = -+static void setupExporterArray(std::vector &exporters) - { - #ifndef ASSIMP_BUILD_NO_COLLADA_EXPORTER -- Exporter::ExportFormatEntry( "collada", "COLLADA - Digital Asset Exchange Schema", "dae", &ExportSceneCollada ), -+ exporters.push_back(Exporter::ExportFormatEntry( "collada", "COLLADA - Digital Asset Exchange Schema", "dae", &ExportSceneCollada )); - #endif - - #ifndef ASSIMP_BUILD_NO_X_EXPORTER -- Exporter::ExportFormatEntry( "x", "X Files", "x", &ExportSceneXFile, -- aiProcess_MakeLeftHanded | aiProcess_FlipWindingOrder | aiProcess_FlipUVs ), -+ exporters.push_back(Exporter::ExportFormatEntry( "x", "X Files", "x", &ExportSceneXFile, -+ aiProcess_MakeLeftHanded | aiProcess_FlipWindingOrder | aiProcess_FlipUVs )); - #endif - - #ifndef ASSIMP_BUILD_NO_STEP_EXPORTER -- Exporter::ExportFormatEntry( "stp", "Step Files", "stp", &ExportSceneStep, 0 ), -+ exporters.push_back(Exporter::ExportFormatEntry( "stp", "Step Files", "stp", &ExportSceneStep, 0 )); - #endif - - #ifndef ASSIMP_BUILD_NO_OBJ_EXPORTER -- Exporter::ExportFormatEntry( "obj", "Wavefront OBJ format", "obj", &ExportSceneObj, -- aiProcess_GenSmoothNormals /*| aiProcess_PreTransformVertices */ ), -- Exporter::ExportFormatEntry( "objnomtl", "Wavefront OBJ format without material file", "obj", &ExportSceneObjNoMtl, -- aiProcess_GenSmoothNormals /*| aiProcess_PreTransformVertices */ ), -+ exporters.push_back(Exporter::ExportFormatEntry( "obj", "Wavefront OBJ format", "obj", &ExportSceneObj, -+ aiProcess_GenSmoothNormals /*| aiProcess_PreTransformVertices */ )); -+ exporters.push_back(Exporter::ExportFormatEntry( "objnomtl", "Wavefront OBJ format without material file", "obj", &ExportSceneObjNoMtl, -+ aiProcess_GenSmoothNormals /*| aiProcess_PreTransformVertices */ )); - #endif - - #ifndef ASSIMP_BUILD_NO_STL_EXPORTER -- Exporter::ExportFormatEntry( "stl", "Stereolithography", "stl" , &ExportSceneSTL, -+ exporters.push_back(Exporter::ExportFormatEntry( "stl", "Stereolithography", "stl" , &ExportSceneSTL, - aiProcess_Triangulate | aiProcess_GenNormals | aiProcess_PreTransformVertices -- ), -- Exporter::ExportFormatEntry( "stlb", "Stereolithography (binary)", "stl" , &ExportSceneSTLBinary, -+ )); -+ exporters.push_back(Exporter::ExportFormatEntry( "stlb", "Stereolithography (binary)", "stl" , &ExportSceneSTLBinary, - aiProcess_Triangulate | aiProcess_GenNormals | aiProcess_PreTransformVertices -- ), -+ )); - #endif - - #ifndef ASSIMP_BUILD_NO_PLY_EXPORTER -- Exporter::ExportFormatEntry( "ply", "Stanford Polygon Library", "ply" , &ExportScenePly, -+ exporters.push_back(Exporter::ExportFormatEntry( "ply", "Stanford Polygon Library", "ply" , &ExportScenePly, - aiProcess_PreTransformVertices -- ), -- Exporter::ExportFormatEntry( "plyb", "Stanford Polygon Library (binary)", "ply", &ExportScenePlyBinary, -+ )); -+ exporters.push_back(Exporter::ExportFormatEntry( "plyb", "Stanford Polygon Library (binary)", "ply", &ExportScenePlyBinary, - aiProcess_PreTransformVertices -- ), -+ )); - #endif - - #ifndef ASSIMP_BUILD_NO_3DS_EXPORTER -- Exporter::ExportFormatEntry( "3ds", "Autodesk 3DS (legacy)", "3ds" , &ExportScene3DS, -- aiProcess_Triangulate | aiProcess_SortByPType | aiProcess_JoinIdenticalVertices ), -+ exporters.push_back(Exporter::ExportFormatEntry( "3ds", "Autodesk 3DS (legacy)", "3ds" , &ExportScene3DS, -+ aiProcess_Triangulate | aiProcess_SortByPType | aiProcess_JoinIdenticalVertices )); - #endif - - #ifndef ASSIMP_BUILD_NO_GLTF_EXPORTER -- Exporter::ExportFormatEntry( "gltf2", "GL Transmission Format v. 2", "gltf", &ExportSceneGLTF2, -- aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType ), -- Exporter::ExportFormatEntry( "glb2", "GL Transmission Format v. 2 (binary)", "glb", &ExportSceneGLB2, -- aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType ), -- Exporter::ExportFormatEntry( "gltf", "GL Transmission Format", "gltf", &ExportSceneGLTF, -- aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType ), -- Exporter::ExportFormatEntry( "glb", "GL Transmission Format (binary)", "glb", &ExportSceneGLB, -- aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType ), -+ exporters.push_back(Exporter::ExportFormatEntry( "gltf2", "GL Transmission Format v. 2", "gltf", &ExportSceneGLTF2, -+ aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType )); -+ exporters.push_back(Exporter::ExportFormatEntry( "glb2", "GL Transmission Format v. 2 (binary)", "glb", &ExportSceneGLB2, -+ aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType )); -+ exporters.push_back(Exporter::ExportFormatEntry( "gltf", "GL Transmission Format", "gltf", &ExportSceneGLTF, -+ aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType )); -+ exporters.push_back(Exporter::ExportFormatEntry( "glb", "GL Transmission Format (binary)", "glb", &ExportSceneGLB, -+ aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType )); - #endif - - #ifndef ASSIMP_BUILD_NO_ASSBIN_EXPORTER -- Exporter::ExportFormatEntry( "assbin", "Assimp Binary File", "assbin" , &ExportSceneAssbin, 0 ), -+ exporters.push_back(Exporter::ExportFormatEntry( "assbin", "Assimp Binary File", "assbin" , &ExportSceneAssbin, 0 )); - #endif - - #ifndef ASSIMP_BUILD_NO_ASSXML_EXPORTER -- Exporter::ExportFormatEntry( "assxml", "Assimp XML Document", "assxml" , &ExportSceneAssxml, 0 ), -+ exporters.push_back(Exporter::ExportFormatEntry( "assxml", "Assimp XML Document", "assxml" , &ExportSceneAssxml, 0 )); - #endif - - #ifndef ASSIMP_BUILD_NO_X3D_EXPORTER -- Exporter::ExportFormatEntry( "x3d", "Extensible 3D", "x3d" , &ExportSceneX3D, 0 ), -+ exporters.push_back(Exporter::ExportFormatEntry( "x3d", "Extensible 3D", "x3d" , &ExportSceneX3D, 0 )); - #endif - - #ifndef ASSIMP_BUILD_NO_FBX_EXPORTER -- Exporter::ExportFormatEntry( "fbx", "Autodesk FBX (binary)", "fbx", &ExportSceneFBX, 0 ), -- Exporter::ExportFormatEntry( "fbxa", "Autodesk FBX (ascii)", "fbx", &ExportSceneFBXA, 0 ), -+ exporters.push_back(Exporter::ExportFormatEntry( "fbx", "Autodesk FBX (binary)", "fbx", &ExportSceneFBX, 0 )); -+ exporters.push_back(Exporter::ExportFormatEntry( "fbxa", "Autodesk FBX (ascii)", "fbx", &ExportSceneFBXA, 0 )); - #endif - - #ifndef ASSIMP_BUILD_NO_3MF_EXPORTER -- Exporter::ExportFormatEntry( "3mf", "The 3MF-File-Format", "3mf", &ExportScene3MF, 0 ), -+ exporters.push_back(Exporter::ExportFormatEntry( "3mf", "The 3MF-File-Format", "3mf", &ExportScene3MF, 0 )); - #endif - - #ifndef ASSIMP_BUILD_NO_ASSJSON_EXPORTER -- Exporter::ExportFormatEntry( "assjson", "Assimp JSON Document", "json", &ExportAssimp2Json, 0) -+ exporters.push_back(Exporter::ExportFormatEntry( "assjson", "Assimp JSON Document", "json", &ExportAssimp2Json, 0)); - #endif --}; -+} - --#define ASSIMP_NUM_EXPORTERS (sizeof(gExporters)/sizeof(gExporters[0])) - - - class ExporterPimpl { -@@ -205,10 +203,7 @@ public: - GetPostProcessingStepInstanceList(mPostProcessingSteps); - - // grab all built-in exporters -- if ( 0 != ( ASSIMP_NUM_EXPORTERS ) ) { -- mExporters.resize( ASSIMP_NUM_EXPORTERS ); -- std::copy( gExporters, gExporters + ASSIMP_NUM_EXPORTERS, mExporters.begin() ); -- } -+ setupExporterArray(mExporters); - } - - ~ExporterPimpl() { -@@ -252,23 +247,27 @@ Exporter :: Exporter() - - // ------------------------------------------------------------------------------------------------ - Exporter::~Exporter() { -+ ai_assert(nullptr != pimpl); - FreeBlob(); - delete pimpl; - } - - // ------------------------------------------------------------------------------------------------ - void Exporter::SetIOHandler( IOSystem* pIOHandler) { -+ ai_assert(nullptr != pimpl); - pimpl->mIsDefaultIOHandler = !pIOHandler; - pimpl->mIOSystem.reset(pIOHandler); - } - - // ------------------------------------------------------------------------------------------------ - IOSystem* Exporter::GetIOHandler() const { -+ ai_assert(nullptr != pimpl); - return pimpl->mIOSystem.get(); - } - - // ------------------------------------------------------------------------------------------------ - bool Exporter::IsDefaultIOHandler() const { -+ ai_assert(nullptr != pimpl); - return pimpl->mIsDefaultIOHandler; - } - -@@ -295,6 +294,7 @@ void Exporter::SetProgressHandler(ProgressHandler* pHandler) { - // ------------------------------------------------------------------------------------------------ - const aiExportDataBlob* Exporter::ExportToBlob( const aiScene* pScene, const char* pFormatId, - unsigned int pPreprocessing, const ExportProperties* pProperties) { -+ ai_assert(nullptr != pimpl); - if (pimpl->blob) { - delete pimpl->blob; - pimpl->blob = nullptr; -@@ -319,6 +319,7 @@ const aiExportDataBlob* Exporter::ExportToBlob( const aiScene* pScene, const cha - aiReturn Exporter::Export( const aiScene* pScene, const char* pFormatId, const char* pPath, - unsigned int pPreprocessing, const ExportProperties* pProperties) { - ASSIMP_BEGIN_EXCEPTION_REGION(); -+ ai_assert(nullptr != pimpl); - - // when they create scenes from scratch, users will likely create them not in verbose - // format. They will likely not be aware that there is a flag in the scene to indicate -@@ -466,11 +467,13 @@ aiReturn Exporter::Export( const aiScene* pScene, const char* pFormatId, const c - - // ------------------------------------------------------------------------------------------------ - const char* Exporter::GetErrorString() const { -+ ai_assert(nullptr != pimpl); - return pimpl->mError.c_str(); - } - - // ------------------------------------------------------------------------------------------------ - void Exporter::FreeBlob() { -+ ai_assert(nullptr != pimpl); - delete pimpl->blob; - pimpl->blob = nullptr; - -@@ -479,11 +482,13 @@ void Exporter::FreeBlob() { - - // ------------------------------------------------------------------------------------------------ - const aiExportDataBlob* Exporter::GetBlob() const { -+ ai_assert(nullptr != pimpl); - return pimpl->blob; - } - - // ------------------------------------------------------------------------------------------------ - const aiExportDataBlob* Exporter::GetOrphanedBlob() const { -+ ai_assert(nullptr != pimpl); - const aiExportDataBlob* tmp = pimpl->blob; - pimpl->blob = nullptr; - return tmp; -@@ -491,18 +496,20 @@ const aiExportDataBlob* Exporter::GetOrphanedBlob() const { - - // ------------------------------------------------------------------------------------------------ - size_t Exporter::GetExportFormatCount() const { -+ ai_assert(nullptr != pimpl); - return pimpl->mExporters.size(); - } - - // ------------------------------------------------------------------------------------------------ - const aiExportFormatDesc* Exporter::GetExportFormatDescription( size_t index ) const { -+ ai_assert(nullptr != pimpl); - if (index >= GetExportFormatCount()) { - return nullptr; - } - - // Return from static storage if the requested index is built-in. -- if (index < sizeof(gExporters) / sizeof(gExporters[0])) { -- return &gExporters[index].mDescription; -+ if (index < pimpl->mExporters.size()) { -+ return &pimpl->mExporters[index].mDescription; - } - - return &pimpl->mExporters[index].mDescription; -@@ -510,6 +517,7 @@ const aiExportFormatDesc* Exporter::GetExportFormatDescription( size_t index ) c - - // ------------------------------------------------------------------------------------------------ - aiReturn Exporter::RegisterExporter(const ExportFormatEntry& desc) { -+ ai_assert(nullptr != pimpl); - for(const ExportFormatEntry& e : pimpl->mExporters) { - if (!strcmp(e.mDescription.id,desc.mDescription.id)) { - return aiReturn_FAILURE; -@@ -522,6 +530,7 @@ aiReturn Exporter::RegisterExporter(const ExportFormatEntry& desc) { - - // ------------------------------------------------------------------------------------------------ - void Exporter::UnregisterExporter(const char* id) { -+ ai_assert(nullptr != pimpl); - for(std::vector::iterator it = pimpl->mExporters.begin(); - it != pimpl->mExporters.end(); ++it) { - if (!strcmp((*it).mDescription.id,id)) { diff --git a/recipes/assimp/5.x/patches/0003-unvendor-deps-5.1.x.patch b/recipes/assimp/5.x/patches/0003-unvendor-deps-5.1.x.patch deleted file mode 100644 index 27151094d0e71..0000000000000 --- a/recipes/assimp/5.x/patches/0003-unvendor-deps-5.1.x.patch +++ /dev/null @@ -1,364 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -459,16 +459,20 @@ IF(ASSIMP_HUNTER_ENABLED) - set(ASSIMP_BUILD_MINIZIP TRUE) - ELSE() - # If the zlib is already found outside, add an export in case assimpTargets can't find it. -- IF( ZLIB_FOUND ) -+ IF(0) - INSTALL( TARGETS zlib zlibstatic - EXPORT "${TARGETS_EXPORT_NAME}") - ENDIF() - - IF ( NOT ASSIMP_BUILD_ZLIB ) -- FIND_PACKAGE(ZLIB) -+ if(ASSIMP_BUILD_ASSBIN_IMPORTER OR ASSIMP_BUILD_ASSBIN_EXPORTER OR ASSIMP_BUILD_ASSXML_EXPORTER OR -+ ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_FBX_IMPORTER OR ASSIMP_BUILD_Q3BSP_IMPORTER OR -+ ASSIMP_BUILD_X_IMPORTER OR ASSIMP_BUILD_XGL_IMPORTER) -+ find_package(ZLIB REQUIRED) -+ endif() - ENDIF() - -- IF( NOT ZLIB_FOUND ) -+ IF(0) - MESSAGE(STATUS "compiling zlib from sources") - INCLUDE(CheckIncludeFile) - INCLUDE(CheckTypeSize) -@@ -498,12 +502,14 @@ ENDIF() - - IF( NOT IOS ) - IF( NOT ASSIMP_BUILD_MINIZIP ) -- use_pkgconfig(UNZIP minizip) -+ find_package(minizip REQUIRED CONFIG) -+ set(UNZIP_FOUND TRUE) - ENDIF() - ELSE () - IF( NOT BUILD_SHARED_LIBS ) - IF( NOT ASSIMP_BUILD_MINIZIP ) -- use_pkgconfig(UNZIP minizip) -+ find_package(minizip REQUIRED CONFIG) -+ set(UNZIP_FOUND TRUE) - ENDIF() - ENDIF () - ENDIF () ---- a/code/AssetLib/3MF/D3MFExporter.cpp -+++ b/code/AssetLib/3MF/D3MFExporter.cpp -@@ -57,7 +57,7 @@ - #ifdef ASSIMP_USE_HUNTER - #include - #else --#include -+#include - #endif - - namespace Assimp { ---- a/code/AssetLib/Blender/BlenderTessellator.h -+++ b/code/AssetLib/Blender/BlenderTessellator.h -@@ -147,7 +147,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" -+# include - #endif - - namespace Assimp ---- a/code/AssetLib/IFC/IFCGeometry.cpp -+++ b/code/AssetLib/IFC/IFCGeometry.cpp -@@ -53,8 +53,8 @@ - # include - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" --# include "../contrib/clipper/clipper.hpp" -+# include -+# include - #endif - - #include ---- a/code/AssetLib/IFC/IFCLoader.cpp -+++ b/code/AssetLib/IFC/IFCLoader.cpp -@@ -54,7 +54,7 @@ - #ifdef ASSIMP_USE_HUNTER - #include - #else --#include -+#include - #endif - #endif - ---- a/code/AssetLib/IFC/IFCOpenings.cpp -+++ b/code/AssetLib/IFC/IFCOpenings.cpp -@@ -53,8 +53,8 @@ - # include - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" --# include "../contrib/clipper/clipper.hpp" -+# include -+# include - #endif - - #include ---- a/code/AssetLib/M3D/M3DWrapper.hpp -+++ b/code/AssetLib/M3D/M3DWrapper.h -@@ -59,7 +59,7 @@ - - // Share stb_image's PNG loader with other importers/exporters instead of bringing our own copy. - #define STBI_ONLY_PNG --#include -+#include - - #include "m3d.h" - ---- a/code/AssetLib/MMD/MMDPmxParser.cpp -+++ b/code/AssetLib/MMD/MMDPmxParser.cpp -@@ -45,7 +45,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/utf8cpp/source/utf8.h" -+# include - #endif - #include - ---- a/code/AssetLib/SIB/SIBImporter.cpp -+++ b/code/AssetLib/SIB/SIBImporter.cpp -@@ -62,7 +62,7 @@ - #include - #else - //# include "../contrib/ConvertUTF/ConvertUTF.h" --#include "../contrib/utf8cpp/source/utf8.h" -+#include - #endif - #include - #include ---- a/code/AssetLib/STEPParser/STEPFileEncoding.cpp -+++ b/code/AssetLib/STEPParser/STEPFileEncoding.cpp -@@ -48,7 +48,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include -+# include - #endif - - #include ---- a/code/CMakeLists.txt -+++ b/code/CMakeLists.txt -@@ -887,6 +887,7 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(pugixml) - find_package(pugixml CONFIG REQUIRED) - ELSE() -+ find_package(pugixml REQUIRED CONFIG) - SET( Pugixml_SRCS - ../contrib/pugixml/src/pugiconfig.hpp - ../contrib/pugixml/src/pugixml.hpp -@@ -900,6 +901,7 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(utf8) - find_package(utf8cpp CONFIG REQUIRED) - ELSE() -+ find_package(utf8cpp REQUIRED CONFIG) - # utf8 is header-only, so Assimp doesn't need to do anything. - ENDIF() - -@@ -908,6 +910,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(polyclipping) - find_package(polyclipping CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_IFC_IMPORTER) -+ find_package(clipper REQUIRED CONFIG) -+ endif() - SET( Clipper_SRCS - ../contrib/clipper/clipper.hpp - ../contrib/clipper/clipper.cpp -@@ -920,6 +925,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(poly2tri) - find_package(poly2tri CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_IFC_IMPORTER) -+ find_package(poly2tri REQUIRED CONFIG) -+ endif() - SET( Poly2Tri_SRCS - ../contrib/poly2tri/poly2tri/common/shapes.cc - ../contrib/poly2tri/poly2tri/common/shapes.h -@@ -957,6 +965,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(zip) - find_package(zip CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_3MF_EXPORTER) -+ find_package(zip REQUIRED CONFIG) -+ endif() - SET( ziplib_SRCS - ../contrib/zip/src/miniz.h - ../contrib/zip/src/zip.c -@@ -978,6 +989,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(openddlparser) - find_package(openddlparser CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_OPENGEX_IMPORTER) -+ find_package(openddlparser REQUIRED CONFIG) -+ endif() - SET ( openddl_parser_SRCS - ../contrib/openddlparser/code/OpenDDLParser.cpp - ../contrib/openddlparser/code/DDLNode.cpp -@@ -1052,7 +1066,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(RapidJSON) - find_package(RapidJSON CONFIG REQUIRED) - ELSE() -- INCLUDE_DIRECTORIES("../contrib/rapidjson/include") -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ find_package(RapidJSON REQUIRED CONFIG) -+ endif() - ADD_DEFINITIONS( -DRAPIDJSON_HAS_STDSTRING=1) - option( ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR "Suppress rapidjson warning on MSVC (NOTE: breaks android build)" ON ) - if(ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR) -@@ -1065,10 +1081,12 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(stb) - find_package(stb CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_M3D_IMPORTER OR ASSIMP_BUILD_M3D_EXPORTER OR ASSIMP_BUILD_PBRT_EXPORTER) -+ find_package(stb REQUIRED CONFIG) -+ endif() - SET( stb_SRCS - ../contrib/stb/stb_image.h - ) -- INCLUDE_DIRECTORIES("../contrib") - SOURCE_GROUP( Contrib\\stb FILES ${stb_SRCS}) - ENDIF() - -@@ -1123,14 +1141,7 @@ SET( assimp_src - ${ASSIMP_EXPORTER_SRCS} - - # Third-party libraries -- ${unzip_compile_SRCS} -- ${Poly2Tri_SRCS} -- ${Clipper_SRCS} -- ${openddl_parser_SRCS} - ${open3dgc_SRCS} -- ${ziplib_SRCS} -- ${Pugixml_SRCS} -- ${stb_SRCS} - # Necessary to show the headers in the project when using the VC++ generator: - - ${PUBLIC_HEADERS} -@@ -1141,7 +1152,7 @@ ADD_DEFINITIONS( -DOPENDDLPARSER_BUILD ) - IF(NOT ASSIMP_HUNTER_ENABLED) - INCLUDE_DIRECTORIES( - ${IRRXML_INCLUDE_DIR} -- ../contrib/openddlparser/include -+ ../contrib # for Open3DGC - ) - ENDIF() - -@@ -1150,8 +1161,8 @@ IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER) - INCLUDE_DIRECTORIES(${C4D_INCLUDES}) - ENDIF () - --IF (ASSIMP_BUILD_DRACO) -- INCLUDE_DIRECTORIES(${draco_INCLUDE_DIRS}) -+if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ find_package(draco REQUIRED CONFIG) - ADD_DEFINITIONS( -DASSIMP_ENABLE_DRACO ) - ENDIF() - -@@ -1162,9 +1173,7 @@ TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp) - - # enable warnings as errors ######################################## - IF (MSVC) -- TARGET_COMPILE_OPTIONS(assimp PRIVATE /WX) - ELSE() -- TARGET_COMPILE_OPTIONS(assimp PRIVATE -Werror) - ENDIF() - - # adds C_FLAGS required to compile zip.c on old GCC 4.x compiler -@@ -1195,9 +1204,32 @@ IF(ASSIMP_HUNTER_ENABLED) - target_link_libraries(assimp PUBLIC ${draco_LIBRARIES}) - endif() - ELSE() -- TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES}) -- if (ASSIMP_BUILD_DRACO) -- target_link_libraries(assimp ${draco_LIBRARIES}) -+ target_link_libraries(assimp pugixml::pugixml utf8cpp) -+ if(ASSIMP_BUILD_ASSBIN_IMPORTER OR ASSIMP_BUILD_ASSBIN_EXPORTER OR ASSIMP_BUILD_ASSXML_EXPORTER OR -+ ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_FBX_IMPORTER OR ASSIMP_BUILD_Q3BSP_IMPORTER OR -+ ASSIMP_BUILD_X_IMPORTER OR ASSIMP_BUILD_XGL_IMPORTER) -+ target_link_libraries(assimp ZLIB::ZLIB) -+ endif() -+ if(ASSIMP_BUILD_IFC_IMPORTER) -+ target_link_libraries(assimp clipper::clipper) -+ endif() -+ if(ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_IFC_IMPORTER) -+ target_link_libraries(assimp poly2tri::poly2tri) -+ endif() -+ if(ASSIMP_BUILD_3MF_EXPORTER) -+ target_link_libraries(assimp zip::zip) -+ endif() -+ if(ASSIMP_BUILD_OPENGEX_IMPORTER) -+ target_link_libraries(assimp openddlparser::openddlparser) -+ endif() -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ target_link_libraries(assimp rapidjson) -+ endif() -+ if(ASSIMP_BUILD_M3D_IMPORTER OR ASSIMP_BUILD_M3D_EXPORTER OR ASSIMP_BUILD_PBRT_EXPORTER) -+ target_link_libraries(assimp stb::stb) -+ endif() -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ target_link_libraries(assimp draco::draco) - endif() - ENDIF() - -@@ -1279,8 +1311,7 @@ ENDIF() - # assimp can #include "unzip.h" - IF(NOT ASSIMP_HUNTER_ENABLED) - if (UNZIP_FOUND) -- INCLUDE_DIRECTORIES(${UNZIP_INCLUDE_DIRS}) -- TARGET_LINK_LIBRARIES(assimp ${UNZIP_LIBRARIES}) -+ target_link_libraries(assimp minizip::minizip) - else () - INCLUDE_DIRECTORIES("../") - endif () ---- a/code/Common/Assimp.cpp -+++ b/code/Common/Assimp.cpp -@@ -1290,7 +1290,7 @@ - # endif - - # define STB_IMAGE_IMPLEMENTATION --# include "stb/stb_image.h" -+# include "stb_image.h" - - # if _MSC_VER - # pragma warning(pop) ---- a/code/Common/BaseImporter.cpp -+++ b/code/Common/BaseImporter.cpp -@@ -330,7 +330,7 @@ - #ifdef ASSIMP_USE_HUNTER - #include - #else --#include "../contrib/utf8cpp/source/utf8.h" -+#include - #endif - - // ------------------------------------------------------------------------------------------------ ---- a/code/Common/ZipArchiveIOSystem.cpp -+++ b/code/Common/ZipArchiveIOSystem.cpp -@@ -54,7 +54,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include -+# include - #endif - - namespace Assimp { ---- a/code/Pbrt/PbrtExporter.cpp -+++ b/code/Pbrt/PbrtExporter.cpp -@@ -83,7 +83,7 @@ - #include - #include - --#include "stb/stb_image.h" -+#include "stb_image.h" - - using namespace Assimp; - diff --git a/recipes/assimp/5.x/patches/0004-unvendor-deps-5.1.6.patch b/recipes/assimp/5.x/patches/0004-unvendor-deps-5.1.6.patch deleted file mode 100644 index dedc3847ab7ea..0000000000000 --- a/recipes/assimp/5.x/patches/0004-unvendor-deps-5.1.6.patch +++ /dev/null @@ -1,340 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -460,16 +460,20 @@ IF(ASSIMP_HUNTER_ENABLED) - set(ASSIMP_BUILD_MINIZIP TRUE) - ELSE() - # If the zlib is already found outside, add an export in case assimpTargets can't find it. -- IF( ZLIB_FOUND ) -+ IF(0) - INSTALL( TARGETS zlib zlibstatic - EXPORT "${TARGETS_EXPORT_NAME}") - ENDIF() - - IF ( NOT ASSIMP_BUILD_ZLIB ) -- FIND_PACKAGE(ZLIB) -+ if(ASSIMP_BUILD_ASSBIN_IMPORTER OR ASSIMP_BUILD_ASSBIN_EXPORTER OR ASSIMP_BUILD_ASSXML_EXPORTER OR -+ ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_FBX_IMPORTER OR ASSIMP_BUILD_Q3BSP_IMPORTER OR -+ ASSIMP_BUILD_X_IMPORTER OR ASSIMP_BUILD_XGL_IMPORTER) -+ find_package(ZLIB REQUIRED) -+ endif() - ENDIF() - -- IF( NOT ZLIB_FOUND ) -+ IF(0) - MESSAGE(STATUS "compiling zlib from sources") - INCLUDE(CheckIncludeFile) - INCLUDE(CheckTypeSize) -@@ -499,12 +503,14 @@ ENDIF() - - IF( NOT IOS ) - IF( NOT ASSIMP_BUILD_MINIZIP ) -- use_pkgconfig(UNZIP minizip) -+ find_package(minizip REQUIRED CONFIG) -+ set(UNZIP_FOUND TRUE) - ENDIF() - ELSE () - IF( NOT BUILD_SHARED_LIBS ) - IF( NOT ASSIMP_BUILD_MINIZIP ) -- use_pkgconfig(UNZIP minizip) -+ find_package(minizip REQUIRED CONFIG) -+ set(UNZIP_FOUND TRUE) - ENDIF() - ENDIF () - ENDIF () ---- a/code/AssetLib/3MF/D3MFExporter.cpp -+++ b/code/AssetLib/3MF/D3MFExporter.cpp -@@ -57,7 +57,7 @@ - #ifdef ASSIMP_USE_HUNTER - #include - #else --#include -+#include - #endif - - namespace Assimp { ---- a/code/AssetLib/Blender/BlenderTessellator.h -+++ b/code/AssetLib/Blender/BlenderTessellator.h -@@ -147,7 +147,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" -+# include - #endif - - namespace Assimp ---- a/code/AssetLib/IFC/IFCGeometry.cpp -+++ b/code/AssetLib/IFC/IFCGeometry.cpp -@@ -53,8 +53,8 @@ - # include - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" --# include "../contrib/clipper/clipper.hpp" -+# include -+# include - #endif - - #include ---- a/code/AssetLib/IFC/IFCOpenings.cpp -+++ b/code/AssetLib/IFC/IFCOpenings.cpp -@@ -53,8 +53,8 @@ - # include - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" --# include "../contrib/clipper/clipper.hpp" -+# include -+# include - #endif - - #include ---- a/code/AssetLib/M3D/M3DWrapper.h -+++ b/code/AssetLib/M3D/M3DWrapper.h -@@ -59,7 +59,7 @@ - - // Share stb_image's PNG loader with other importers/exporters instead of bringing our own copy. - #define STBI_ONLY_PNG --#include -+#include - - #include "m3d.h" - ---- a/code/AssetLib/MMD/MMDPmxParser.cpp -+++ b/code/AssetLib/MMD/MMDPmxParser.cpp -@@ -45,7 +45,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/utf8cpp/source/utf8.h" -+# include - #endif - #include - ---- a/code/AssetLib/SIB/SIBImporter.cpp -+++ b/code/AssetLib/SIB/SIBImporter.cpp -@@ -62,7 +62,7 @@ - #include - #else - //# include "../contrib/ConvertUTF/ConvertUTF.h" --#include "../contrib/utf8cpp/source/utf8.h" -+#include - #endif - #include - #include ---- a/code/AssetLib/STEPParser/STEPFileEncoding.cpp -+++ b/code/AssetLib/STEPParser/STEPFileEncoding.cpp -@@ -48,7 +48,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include -+# include - #endif - - #include ---- a/code/CMakeLists.txt -+++ b/code/CMakeLists.txt -@@ -888,6 +888,7 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(pugixml) - find_package(pugixml CONFIG REQUIRED) - ELSE() -+ find_package(pugixml REQUIRED CONFIG) - SET( Pugixml_SRCS - ../contrib/pugixml/src/pugiconfig.hpp - ../contrib/pugixml/src/pugixml.hpp -@@ -901,6 +902,7 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(utf8) - find_package(utf8cpp CONFIG REQUIRED) - ELSE() -+ find_package(utf8cpp REQUIRED CONFIG) - # utf8 is header-only, so Assimp doesn't need to do anything. - ENDIF() - -@@ -909,6 +911,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(polyclipping) - find_package(polyclipping CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_IFC_IMPORTER) -+ find_package(clipper REQUIRED CONFIG) -+ endif() - SET( Clipper_SRCS - ../contrib/clipper/clipper.hpp - ../contrib/clipper/clipper.cpp -@@ -921,6 +926,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(poly2tri) - find_package(poly2tri CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_IFC_IMPORTER) -+ find_package(poly2tri REQUIRED CONFIG) -+ endif() - SET( Poly2Tri_SRCS - ../contrib/poly2tri/poly2tri/common/shapes.cc - ../contrib/poly2tri/poly2tri/common/shapes.h -@@ -960,6 +968,7 @@ IF(3MF IN_LIST ASSIMP_EXPORTERS_LIST) - hunter_add_package(zip) - find_package(zip CONFIG REQUIRED) - ELSE() -+ find_package(zip REQUIRED CONFIG) - SET( ziplib_SRCS - ../contrib/zip/src/miniz.h - ../contrib/zip/src/zip.c -@@ -982,6 +991,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(openddlparser) - find_package(openddlparser CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_OPENGEX_IMPORTER) -+ find_package(openddlparser REQUIRED CONFIG) -+ endif() - SET ( openddl_parser_SRCS - ../contrib/openddlparser/code/OpenDDLParser.cpp - ../contrib/openddlparser/code/DDLNode.cpp -@@ -1056,7 +1068,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(RapidJSON) - find_package(RapidJSON CONFIG REQUIRED) - ELSE() -- INCLUDE_DIRECTORIES("../contrib/rapidjson/include") -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ find_package(RapidJSON REQUIRED CONFIG) -+ endif() - ADD_DEFINITIONS( -DRAPIDJSON_HAS_STDSTRING=1) - option( ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR "Suppress rapidjson warning on MSVC (NOTE: breaks android build)" ON ) - if(ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR) -@@ -1069,10 +1083,12 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(stb) - find_package(stb CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_M3D_IMPORTER OR ASSIMP_BUILD_M3D_EXPORTER OR ASSIMP_BUILD_PBRT_EXPORTER) -+ find_package(stb REQUIRED CONFIG) -+ endif() - SET( stb_SRCS - ../contrib/stb/stb_image.h - ) -- INCLUDE_DIRECTORIES("../contrib") - SOURCE_GROUP( Contrib\\stb FILES ${stb_SRCS}) - ENDIF() - -@@ -1127,14 +1143,7 @@ SET( assimp_src - ${ASSIMP_EXPORTER_SRCS} - - # Third-party libraries -- ${unzip_compile_SRCS} -- ${Poly2Tri_SRCS} -- ${Clipper_SRCS} -- ${openddl_parser_SRCS} - ${open3dgc_SRCS} -- ${ziplib_SRCS} -- ${Pugixml_SRCS} -- ${stb_SRCS} - # Necessary to show the headers in the project when using the VC++ generator: - - ${PUBLIC_HEADERS} -@@ -1145,7 +1154,7 @@ ADD_DEFINITIONS( -DOPENDDLPARSER_BUILD ) - IF(NOT ASSIMP_HUNTER_ENABLED) - INCLUDE_DIRECTORIES( - ${IRRXML_INCLUDE_DIR} -- ../contrib/openddlparser/include -+ ../contrib # for Open3DGC - ) - ENDIF() - -@@ -1154,8 +1163,8 @@ IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER) - INCLUDE_DIRECTORIES(${C4D_INCLUDES}) - ENDIF () - --IF (ASSIMP_BUILD_DRACO) -- INCLUDE_DIRECTORIES(${draco_INCLUDE_DIRS}) -+if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ find_package(draco REQUIRED CONFIG) - ADD_DEFINITIONS( -DASSIMP_ENABLE_DRACO ) - ENDIF() - -@@ -1166,9 +1175,7 @@ TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp) - - # enable warnings as errors ######################################## - IF (MSVC) -- TARGET_COMPILE_OPTIONS(assimp PRIVATE /WX) - ELSE() -- TARGET_COMPILE_OPTIONS(assimp PRIVATE -Werror) - ENDIF() - - # adds C_FLAGS required to compile zip.c on old GCC 4.x compiler -@@ -1201,9 +1208,32 @@ IF(ASSIMP_HUNTER_ENABLED) - target_link_libraries(assimp PUBLIC ${draco_LIBRARIES}) - endif() - ELSE() -- TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES}) -- if (ASSIMP_BUILD_DRACO) -- target_link_libraries(assimp ${draco_LIBRARIES}) -+ target_link_libraries(assimp pugixml::pugixml utf8cpp) -+ if(ASSIMP_BUILD_ASSBIN_IMPORTER OR ASSIMP_BUILD_ASSBIN_EXPORTER OR ASSIMP_BUILD_ASSXML_EXPORTER OR -+ ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_FBX_IMPORTER OR ASSIMP_BUILD_Q3BSP_IMPORTER OR -+ ASSIMP_BUILD_X_IMPORTER OR ASSIMP_BUILD_XGL_IMPORTER) -+ target_link_libraries(assimp ZLIB::ZLIB) -+ endif() -+ if(ASSIMP_BUILD_IFC_IMPORTER) -+ target_link_libraries(assimp clipper::clipper) -+ endif() -+ if(ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_IFC_IMPORTER) -+ target_link_libraries(assimp poly2tri::poly2tri) -+ endif() -+ if(ASSIMP_BUILD_3MF_EXPORTER) -+ target_link_libraries(assimp zip::zip) -+ endif() -+ if(ASSIMP_BUILD_OPENGEX_IMPORTER) -+ target_link_libraries(assimp openddlparser::openddlparser) -+ endif() -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ target_link_libraries(assimp rapidjson) -+ endif() -+ if(ASSIMP_BUILD_M3D_IMPORTER OR ASSIMP_BUILD_M3D_EXPORTER OR ASSIMP_BUILD_PBRT_EXPORTER) -+ target_link_libraries(assimp stb::stb) -+ endif() -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ target_link_libraries(assimp draco::draco) - endif() - ENDIF() - -@@ -1291,8 +1321,7 @@ ENDIF() - # assimp can #include "unzip.h" - IF(NOT ASSIMP_HUNTER_ENABLED) - if (UNZIP_FOUND) -- INCLUDE_DIRECTORIES(${UNZIP_INCLUDE_DIRS}) -- TARGET_LINK_LIBRARIES(assimp ${UNZIP_LIBRARIES}) -+ target_link_libraries(assimp minizip::minizip) - else () - INCLUDE_DIRECTORIES("../") - endif () ---- a/code/Common/Assimp.cpp -+++ b/code/Common/Assimp.cpp -@@ -1290,7 +1290,7 @@ - # endif - - # define STB_IMAGE_IMPLEMENTATION --# include "stb/stb_image.h" -+# include "stb_image.h" - - # if _MSC_VER - # pragma warning(pop) ---- a/code/Common/BaseImporter.cpp -+++ b/code/Common/BaseImporter.cpp -@@ -331,7 +331,7 @@ - #ifdef ASSIMP_USE_HUNTER - #include - #else --#include "../contrib/utf8cpp/source/utf8.h" -+#include - #endif - - // ------------------------------------------------------------------------------------------------ ---- a/code/Pbrt/PbrtExporter.cpp -+++ b/code/Pbrt/PbrtExporter.cpp -@@ -83,7 +83,7 @@ - #include - #include - --#include "stb/stb_image.h" -+#include "stb_image.h" - - using namespace Assimp; - diff --git a/recipes/assimp/5.x/patches/0006-unvendor-deps-5.2.x.patch b/recipes/assimp/5.x/patches/0006-unvendor-deps-5.2.x.patch deleted file mode 100644 index 9642d329d9a0a..0000000000000 --- a/recipes/assimp/5.x/patches/0006-unvendor-deps-5.2.x.patch +++ /dev/null @@ -1,340 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -482,16 +482,20 @@ IF(ASSIMP_HUNTER_ENABLED) - set(ASSIMP_BUILD_MINIZIP TRUE) - ELSE() - # If the zlib is already found outside, add an export in case assimpTargets can't find it. -- IF( ZLIB_FOUND ) -+ IF(0) - INSTALL( TARGETS zlib zlibstatic - EXPORT "${TARGETS_EXPORT_NAME}") - ENDIF() - - IF ( NOT ASSIMP_BUILD_ZLIB ) -- FIND_PACKAGE(ZLIB) -+ if(ASSIMP_BUILD_ASSBIN_IMPORTER OR ASSIMP_BUILD_ASSBIN_EXPORTER OR ASSIMP_BUILD_ASSXML_EXPORTER OR -+ ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_FBX_IMPORTER OR ASSIMP_BUILD_Q3BSP_IMPORTER OR -+ ASSIMP_BUILD_X_IMPORTER OR ASSIMP_BUILD_XGL_IMPORTER) -+ find_package(ZLIB REQUIRED) -+ endif() - ENDIF() - -- IF( NOT ZLIB_FOUND ) -+ IF(0) - MESSAGE(STATUS "compiling zlib from sources") - INCLUDE(CheckIncludeFile) - INCLUDE(CheckTypeSize) -@@ -521,12 +525,14 @@ ENDIF() - - IF( NOT IOS ) - IF( NOT ASSIMP_BUILD_MINIZIP ) -- use_pkgconfig(UNZIP minizip) -+ find_package(minizip REQUIRED CONFIG) -+ set(UNZIP_FOUND TRUE) - ENDIF() - ELSE () - IF( NOT BUILD_SHARED_LIBS ) - IF( NOT ASSIMP_BUILD_MINIZIP ) -- use_pkgconfig(UNZIP minizip) -+ find_package(minizip REQUIRED CONFIG) -+ set(UNZIP_FOUND TRUE) - ENDIF() - ENDIF () - ENDIF () ---- a/code/AssetLib/3MF/D3MFExporter.cpp -+++ b/code/AssetLib/3MF/D3MFExporter.cpp -@@ -57,7 +57,7 @@ - #ifdef ASSIMP_USE_HUNTER - #include - #else --#include -+#include - #endif - - namespace Assimp { ---- a/code/AssetLib/Blender/BlenderTessellator.h -+++ b/code/AssetLib/Blender/BlenderTessellator.h -@@ -147,7 +147,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" -+# include - #endif - - namespace Assimp ---- a/code/AssetLib/IFC/IFCGeometry.cpp -+++ b/code/AssetLib/IFC/IFCGeometry.cpp -@@ -53,8 +53,8 @@ - # include - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" --# include "../contrib/clipper/clipper.hpp" -+# include -+# include - #endif - - #include ---- a/code/AssetLib/IFC/IFCOpenings.cpp -+++ b/code/AssetLib/IFC/IFCOpenings.cpp -@@ -53,8 +53,8 @@ - # include - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" --# include "../contrib/clipper/clipper.hpp" -+# include -+# include - #endif - - #include ---- a/code/AssetLib/M3D/M3DWrapper.h -+++ b/code/AssetLib/M3D/M3DWrapper.h -@@ -59,7 +59,7 @@ - - // Share stb_image's PNG loader with other importers/exporters instead of bringing our own copy. - #define STBI_ONLY_PNG --#include -+#include - - #include "m3d.h" - ---- a/code/AssetLib/MMD/MMDPmxParser.cpp -+++ b/code/AssetLib/MMD/MMDPmxParser.cpp -@@ -45,7 +45,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/utf8cpp/source/utf8.h" -+# include - #endif - #include - ---- a/code/AssetLib/SIB/SIBImporter.cpp -+++ b/code/AssetLib/SIB/SIBImporter.cpp -@@ -59,7 +59,7 @@ - #ifdef ASSIMP_USE_HUNTER - #include - #else --#include "../contrib/utf8cpp/source/utf8.h" -+#include - #endif - #include - #include ---- a/code/AssetLib/STEPParser/STEPFileEncoding.cpp -+++ b/code/AssetLib/STEPParser/STEPFileEncoding.cpp -@@ -48,7 +48,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include -+# include - #endif - - #include ---- a/code/CMakeLists.txt -+++ b/code/CMakeLists.txt -@@ -899,6 +899,7 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(pugixml) - find_package(pugixml CONFIG REQUIRED) - ELSE() -+ find_package(pugixml REQUIRED CONFIG) - SET( Pugixml_SRCS - ../contrib/pugixml/src/pugiconfig.hpp - ../contrib/pugixml/src/pugixml.hpp -@@ -912,6 +913,7 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(utf8) - find_package(utf8cpp CONFIG REQUIRED) - ELSE() -+ find_package(utf8cpp REQUIRED CONFIG) - # utf8 is header-only, so Assimp doesn't need to do anything. - ENDIF() - -@@ -920,6 +922,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(polyclipping) - find_package(polyclipping CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_IFC_IMPORTER) -+ find_package(clipper REQUIRED CONFIG) -+ endif() - SET( Clipper_SRCS - ../contrib/clipper/clipper.hpp - ../contrib/clipper/clipper.cpp -@@ -932,6 +937,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(poly2tri) - find_package(poly2tri CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_IFC_IMPORTER) -+ find_package(poly2tri REQUIRED CONFIG) -+ endif() - SET( Poly2Tri_SRCS - ../contrib/poly2tri/poly2tri/common/shapes.cc - ../contrib/poly2tri/poly2tri/common/shapes.h -@@ -971,6 +979,7 @@ IF(3MF IN_LIST ASSIMP_EXPORTERS_LIST) - hunter_add_package(zip) - find_package(zip CONFIG REQUIRED) - ELSE() -+ find_package(zip REQUIRED CONFIG) - SET( ziplib_SRCS - ../contrib/zip/src/miniz.h - ../contrib/zip/src/zip.c -@@ -993,6 +1002,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(openddlparser) - find_package(openddlparser CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_OPENGEX_IMPORTER) -+ find_package(openddlparser REQUIRED CONFIG) -+ endif() - SET ( openddl_parser_SRCS - ../contrib/openddlparser/code/OpenDDLParser.cpp - ../contrib/openddlparser/code/DDLNode.cpp -@@ -1067,7 +1079,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(RapidJSON) - find_package(RapidJSON CONFIG REQUIRED) - ELSE() -- INCLUDE_DIRECTORIES("../contrib/rapidjson/include") -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ find_package(RapidJSON REQUIRED CONFIG) -+ endif() - ADD_DEFINITIONS( -DRAPIDJSON_HAS_STDSTRING=1) - option( ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR "Suppress rapidjson warning on MSVC (NOTE: breaks android build)" ON ) - if(ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR) -@@ -1080,10 +1094,12 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(stb) - find_package(stb CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_M3D_IMPORTER OR ASSIMP_BUILD_M3D_EXPORTER OR ASSIMP_BUILD_PBRT_EXPORTER) -+ find_package(stb REQUIRED CONFIG) -+ endif() - SET( stb_SRCS - ../contrib/stb/stb_image.h - ) -- INCLUDE_DIRECTORIES("../contrib") - SOURCE_GROUP( Contrib\\stb FILES ${stb_SRCS}) - ENDIF() - -@@ -1138,14 +1154,7 @@ SET( assimp_src - ${ASSIMP_EXPORTER_SRCS} - - # Third-party libraries -- ${unzip_compile_SRCS} -- ${Poly2Tri_SRCS} -- ${Clipper_SRCS} -- ${openddl_parser_SRCS} - ${open3dgc_SRCS} -- ${ziplib_SRCS} -- ${Pugixml_SRCS} -- ${stb_SRCS} - # Necessary to show the headers in the project when using the VC++ generator: - - ${PUBLIC_HEADERS} -@@ -1156,7 +1165,7 @@ ADD_DEFINITIONS( -DOPENDDLPARSER_BUILD ) - IF(NOT ASSIMP_HUNTER_ENABLED) - INCLUDE_DIRECTORIES( - ${IRRXML_INCLUDE_DIR} -- ../contrib/openddlparser/include -+ ../contrib # for Open3DGC - ) - ENDIF() - -@@ -1165,8 +1174,8 @@ IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER) - INCLUDE_DIRECTORIES(${C4D_INCLUDES}) - ENDIF () - --IF (ASSIMP_BUILD_DRACO) -- INCLUDE_DIRECTORIES(${draco_INCLUDE_DIRS}) -+if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ find_package(draco REQUIRED CONFIG) - ADD_DEFINITIONS( -DASSIMP_ENABLE_DRACO ) - ENDIF() - -@@ -1177,9 +1186,7 @@ TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp) - - # enable warnings as errors ######################################## - IF (MSVC) -- TARGET_COMPILE_OPTIONS(assimp PRIVATE /WX) - ELSE() -- TARGET_COMPILE_OPTIONS(assimp PRIVATE -Werror) - ENDIF() - - # adds C_FLAGS required to compile zip.c on old GCC 4.x compiler -@@ -1212,9 +1219,32 @@ IF(ASSIMP_HUNTER_ENABLED) - target_link_libraries(assimp PUBLIC ${draco_LIBRARIES}) - endif() - ELSE() -- TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES}) -- if (ASSIMP_BUILD_DRACO) -- target_link_libraries(assimp ${draco_LIBRARIES}) -+ target_link_libraries(assimp pugixml::pugixml utf8cpp) -+ if(ASSIMP_BUILD_ASSBIN_IMPORTER OR ASSIMP_BUILD_ASSBIN_EXPORTER OR ASSIMP_BUILD_ASSXML_EXPORTER OR -+ ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_FBX_IMPORTER OR ASSIMP_BUILD_Q3BSP_IMPORTER OR -+ ASSIMP_BUILD_X_IMPORTER OR ASSIMP_BUILD_XGL_IMPORTER) -+ target_link_libraries(assimp ZLIB::ZLIB) -+ endif() -+ if(ASSIMP_BUILD_IFC_IMPORTER) -+ target_link_libraries(assimp clipper::clipper) -+ endif() -+ if(ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_IFC_IMPORTER) -+ target_link_libraries(assimp poly2tri::poly2tri) -+ endif() -+ if(ASSIMP_BUILD_3MF_EXPORTER) -+ target_link_libraries(assimp zip::zip) -+ endif() -+ if(ASSIMP_BUILD_OPENGEX_IMPORTER) -+ target_link_libraries(assimp openddlparser::openddlparser) -+ endif() -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ target_link_libraries(assimp rapidjson) -+ endif() -+ if(ASSIMP_BUILD_M3D_IMPORTER OR ASSIMP_BUILD_M3D_EXPORTER OR ASSIMP_BUILD_PBRT_EXPORTER) -+ target_link_libraries(assimp stb::stb) -+ endif() -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ target_link_libraries(assimp draco::draco) - endif() - ENDIF() - -@@ -1302,8 +1332,7 @@ ENDIF() - # assimp can #include "unzip.h" - IF(NOT ASSIMP_HUNTER_ENABLED) - if (UNZIP_FOUND) -- INCLUDE_DIRECTORIES(${UNZIP_INCLUDE_DIRS}) -- TARGET_LINK_LIBRARIES(assimp ${UNZIP_LIBRARIES}) -+ target_link_libraries(assimp minizip::minizip) - else () - INCLUDE_DIRECTORIES("../") - endif () ---- a/code/Common/Assimp.cpp -+++ b/code/Common/Assimp.cpp -@@ -1290,7 +1290,7 @@ - # endif - - # define STB_IMAGE_IMPLEMENTATION --# include "stb/stb_image.h" -+# include "stb_image.h" - - # if _MSC_VER - # pragma warning(pop) ---- a/code/Common/BaseImporter.cpp -+++ b/code/Common/BaseImporter.cpp -@@ -332,7 +332,7 @@ - #ifdef ASSIMP_USE_HUNTER - #include - #else --#include "../contrib/utf8cpp/source/utf8.h" -+#include - #endif - - // ------------------------------------------------------------------------------------------------ ---- a/code/Pbrt/PbrtExporter.cpp -+++ b/code/Pbrt/PbrtExporter.cpp -@@ -83,7 +83,7 @@ - #include - #include - --#include "stb/stb_image.h" -+#include "stb_image.h" - - using namespace Assimp; - diff --git a/recipes/assimp/config.yml b/recipes/assimp/config.yml index 2542b27436840..c3337bd62baf1 100644 --- a/recipes/assimp/config.yml +++ b/recipes/assimp/config.yml @@ -1,11 +1,9 @@ versions: - "5.2.2": - folder: "5.x" - "5.1.6": + "5.3.1": folder: "5.x" - "5.1.0": + "5.2.5": folder: "5.x" - "5.0.1": + "5.2.2": folder: "5.x" - "5.0.0": + "5.1.6": folder: "5.x" From 4fc538cfcbd63e6d409c546e9e4090c4b2f9e2cb Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 13 Mar 2024 04:47:25 +0900 Subject: [PATCH 237/405] (#22986) fixed-containers: add recipe * fixed-containers: add recipe * fix package name, drop support apple-clang * support apple-clang/15 --- recipes/fixed-containers/all/conandata.yml | 4 ++ recipes/fixed-containers/all/conanfile.py | 66 +++++++++++++++++++ .../all/test_package/CMakeLists.txt | 8 +++ .../all/test_package/conanfile.py | 26 ++++++++ .../all/test_package/test_package.cpp | 20 ++++++ recipes/fixed-containers/config.yml | 3 + 6 files changed, 127 insertions(+) create mode 100644 recipes/fixed-containers/all/conandata.yml create mode 100644 recipes/fixed-containers/all/conanfile.py create mode 100644 recipes/fixed-containers/all/test_package/CMakeLists.txt create mode 100644 recipes/fixed-containers/all/test_package/conanfile.py create mode 100644 recipes/fixed-containers/all/test_package/test_package.cpp create mode 100644 recipes/fixed-containers/config.yml diff --git a/recipes/fixed-containers/all/conandata.yml b/recipes/fixed-containers/all/conandata.yml new file mode 100644 index 0000000000000..e2bbaf816f1d4 --- /dev/null +++ b/recipes/fixed-containers/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20240225": + url: "https://github.com/teslamotors/fixed-containers/archive/095b1bc100903a4c49cbec13842288f57e84b4f3.tar.gz" + sha256: "5d3624cd2c1fdfd1b054b03005804f2b7a2a6c2c114943976821c64b20a94588" diff --git a/recipes/fixed-containers/all/conanfile.py b/recipes/fixed-containers/all/conanfile.py new file mode 100644 index 0000000000000..cdfe73d72c2b9 --- /dev/null +++ b/recipes/fixed-containers/all/conanfile.py @@ -0,0 +1,66 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.52.0" + +class FixedContainersConan(ConanFile): + name = "fixed-containers" + description = "C++ Fixed Containers" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/teslamotors/fixed-containers/" + topics = ("constexpr", "containers", "compile-time", "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", + "Visual Studio": "16", + "msvc": "192", + # apple-clang has support std::lexicographical_compare_three_way since 15. + "apple-clang": "15", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.hpp", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/fixed-containers/all/test_package/CMakeLists.txt b/recipes/fixed-containers/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..697ff29d18c1a --- /dev/null +++ b/recipes/fixed-containers/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(fixed-containers REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE fixed-containers::fixed-containers) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/fixed-containers/all/test_package/conanfile.py b/recipes/fixed-containers/all/test_package/conanfile.py new file mode 100644 index 0000000000000..e845ae751a301 --- /dev/null +++ b/recipes/fixed-containers/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/fixed-containers/all/test_package/test_package.cpp b/recipes/fixed-containers/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..aed686f3d1107 --- /dev/null +++ b/recipes/fixed-containers/all/test_package/test_package.cpp @@ -0,0 +1,20 @@ +#include "fixed_containers/fixed_vector.hpp" + +using namespace fixed_containers; + +int main(void) { + constexpr auto v1 = []() { + FixedVector v{}; + v.push_back(0); + v.emplace_back(1); + v.push_back(2); + return v; + }(); + static_assert(v1[0] == 0); + static_assert(v1[1] == 1); + static_assert(v1[2] == 2); + static_assert(v1.size() == 3); + static_assert(v1.capacity() == 11); + + return 0; +} diff --git a/recipes/fixed-containers/config.yml b/recipes/fixed-containers/config.yml new file mode 100644 index 0000000000000..5b3feee9a17dd --- /dev/null +++ b/recipes/fixed-containers/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20240225": + folder: all From b6876c41a7cf7fb2e598d89771032cc7dfc070cb Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 13 Mar 2024 05:08:30 +0900 Subject: [PATCH 238/405] (#23040) libgd: support xpm and webp, add package_type * libgd: support xpm and webp, add package_type * fix WebP name --- recipes/libgd/all/conandata.yml | 2 +- recipes/libgd/all/conanfile.py | 14 +++- recipes/libgd/all/patches/2.2.5-use-cci.patch | 54 +++++++++++++- recipes/libgd/all/patches/2.3.0-use-cci.patch | 54 +++++++++++++- recipes/libgd/all/patches/2.3.1-use-cci.patch | 72 +++++++++++++++++++ recipes/libgd/all/patches/2.3.2-use-cci.patch | 60 +++++++++++++++- recipes/libgd/all/patches/2.3.3-use-cci.patch | 63 +++++++++++++++- 7 files changed, 307 insertions(+), 12 deletions(-) create mode 100644 recipes/libgd/all/patches/2.3.1-use-cci.patch diff --git a/recipes/libgd/all/conandata.yml b/recipes/libgd/all/conandata.yml index f0b126888eb32..235cf46164b0a 100644 --- a/recipes/libgd/all/conandata.yml +++ b/recipes/libgd/all/conandata.yml @@ -48,7 +48,7 @@ patches: - patch_file: "patches/2.3.x-png-msvc.patch" patch_description: "support png on msvc" patch_type: "portability" - - patch_file: "patches/2.3.0-use-cci.patch" + - patch_file: "patches/2.3.1-use-cci.patch" patch_description: "use cci's package" patch_type: "conan" "2.3.0": diff --git a/recipes/libgd/all/conanfile.py b/recipes/libgd/all/conanfile.py index 5de7e7911d0ed..3c72e55bd83d5 100644 --- a/recipes/libgd/all/conanfile.py +++ b/recipes/libgd/all/conanfile.py @@ -15,7 +15,7 @@ class LibgdConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://libgd.github.io" topics = ("images", "graphics") - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -24,6 +24,8 @@ class LibgdConan(ConanFile): "with_jpeg": [True, False], "with_tiff": [True, False], "with_freetype": [True, False], + "with_xpm": [True, False], + "with_webp": [True, False], } default_options = { "shared": False, @@ -32,6 +34,8 @@ class LibgdConan(ConanFile): "with_jpeg": False, "with_tiff": False, "with_freetype": False, + "with_xpm": False, + "with_webp": False, } def export_sources(self): @@ -62,6 +66,10 @@ def requirements(self): self.requires("libtiff/4.6.0") if self.options.with_freetype: self.requires("freetype/2.13.2") + if self.options.with_xpm: + self.requires("libxpm/3.5.13") + if self.options.with_webp: + self.requires("libwebp/1.3.2") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -77,10 +85,10 @@ def generate(self): tc.variables["ENABLE_JPEG"] = self.options.with_jpeg tc.variables["ENABLE_TIFF"] = self.options.with_tiff tc.variables["ENABLE_ICONV"] = False - tc.variables["ENABLE_XPM"] = False + tc.variables["ENABLE_XPM"] = self.options.with_xpm tc.variables["ENABLE_FREETYPE"] = self.options.with_freetype tc.variables["ENABLE_FONTCONFIG"] = False - tc.variables["ENABLE_WEBP"] = False + tc.variables["ENABLE_WEBP"] = self.options.with_webp if Version(self.version) >= "2.3.2": tc.variables["ENABLE_HEIF"] = False tc.variables["ENABLE_AVIF"] = False diff --git a/recipes/libgd/all/patches/2.2.5-use-cci.patch b/recipes/libgd/all/patches/2.2.5-use-cci.patch index 7a3609a12620d..63805346e86b3 100644 --- a/recipes/libgd/all/patches/2.2.5-use-cci.patch +++ b/recipes/libgd/all/patches/2.2.5-use-cci.patch @@ -1,8 +1,48 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8c99816..63775fd 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -97,7 +97,7 @@ else (USE_EXT_GD) + FIND_PACKAGE(ZLIB) + + IF (ENABLE_WEBP) +- FIND_PACKAGE(WEBP) ++ FIND_PACKAGE(WebP) + ENDIF (ENABLE_WEBP) + + IF (ENABLE_LIQ) +@@ -121,7 +121,7 @@ else (USE_EXT_GD) + endif (ENABLE_FREETYPE) + + if (ENABLE_XPM) +- FIND_PACKAGE(XPM) ++ FIND_PACKAGE(libxpm) + endif (ENABLE_XPM) + + if (ENABLE_FONTCONFIG) +@@ -140,7 +140,7 @@ else (USE_EXT_GD) + ENDIF(ZLIB_FOUND) + + IF(WEBP_FOUND) +- INCLUDE_DIRECTORIES(${WEBP_INCLUDE_DIR}) ++ INCLUDE_DIRECTORIES(${WebP_INCLUDE_DIR}) + SET(HAVE_LIBWEBP 1) + ENDIF(WEBP_FOUND) + +@@ -161,7 +161,7 @@ else (USE_EXT_GD) + ENDIF(LIQ_FOUND) + + IF(XPM_FOUND) +- INCLUDE_DIRECTORIES(${XPM_INCLUDE_DIR}) ++ INCLUDE_DIRECTORIES(${libxpm_INCLUDE_DIR}) + SET(HAVE_LIBXPM 1) + ENDIF(XPM_FOUND) + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 5b764eb..c411860 100755 +index 5b764eb..11d3a46 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -110,7 +110,7 @@ INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_S +@@ -110,15 +110,15 @@ INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_S SET(LIBGD_DEP_LIBS ${ZLIB_LIBRARIES} @@ -11,3 +51,13 @@ index 5b764eb..c411860 100755 ${PNG_LIBRARIES} ${ICONV_LIBRARIES} ${LIQ_LIBRARIES} + ${JPEG_LIBRARIES} + ${TIFF_LIBRARIES} +- ${XPM_LIBRARIES} ++ ${libxpm_LIBRARIES} + ${FONTCONFIG_LIBRARY} +- ${WEBP_LIBRARIES} ++ ${WebP_LIBRARIES} + ) + if (BUILD_SHARED_LIBS) + target_link_libraries(${GD_LIB} ${LIBGD_DEP_LIBS}) diff --git a/recipes/libgd/all/patches/2.3.0-use-cci.patch b/recipes/libgd/all/patches/2.3.0-use-cci.patch index cdb3bfc14381a..6083253b1e3db 100644 --- a/recipes/libgd/all/patches/2.3.0-use-cci.patch +++ b/recipes/libgd/all/patches/2.3.0-use-cci.patch @@ -1,8 +1,48 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fc76868..f503436 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -113,7 +113,7 @@ else (USE_EXT_GD) + FIND_PACKAGE(ZLIB) + + IF (ENABLE_WEBP) +- FIND_PACKAGE(WEBP) ++ FIND_PACKAGE(WebP) + ENDIF (ENABLE_WEBP) + + IF (ENABLE_LIQ) +@@ -137,7 +137,7 @@ else (USE_EXT_GD) + endif (ENABLE_FREETYPE) + + if (ENABLE_XPM) +- FIND_PACKAGE(XPM) ++ FIND_PACKAGE(libxpm) + endif (ENABLE_XPM) + + if (ENABLE_FONTCONFIG) +@@ -162,7 +162,7 @@ else (USE_EXT_GD) + ENDIF(ZLIB_FOUND) + + IF(WEBP_FOUND) +- INCLUDE_DIRECTORIES(${WEBP_INCLUDE_DIR}) ++ INCLUDE_DIRECTORIES(${WebP_INCLUDE_DIR}) + SET(HAVE_LIBWEBP 1) + ENDIF(WEBP_FOUND) + +@@ -183,7 +183,7 @@ else (USE_EXT_GD) + ENDIF(LIQ_FOUND) + + IF(XPM_FOUND) +- INCLUDE_DIRECTORIES(${XPM_INCLUDE_DIR}) ++ INCLUDE_DIRECTORIES(${libxpm_INCLUDE_DIR}) + SET(HAVE_LIBXPM 1) + ENDIF(XPM_FOUND) + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index e1f8eda..aa06600 100644 +index 98b9e64..0d676ba 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -125,7 +125,7 @@ INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_S +@@ -125,14 +125,14 @@ INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_S SET(LIBGD_DEP_LIBS ${ZLIB_LIBRARIES} @@ -11,3 +51,13 @@ index e1f8eda..aa06600 100644 ${PNG_LIBRARIES} ${ICONV_LIBRARIES} ${LIQ_LIBRARIES} + ${JPEG_LIBRARIES} + ${TIFF_LIBRARIES} +- ${XPM_LIBRARIES} ++ ${libxpm_LIBRARIES} + ${FONTCONFIG_LIBRARY} +- ${WEBP_LIBRARIES} ++ ${WebP_LIBRARIES} + ${RAQM_LIBRARIES} + ) + if (BUILD_SHARED_LIBS) diff --git a/recipes/libgd/all/patches/2.3.1-use-cci.patch b/recipes/libgd/all/patches/2.3.1-use-cci.patch new file mode 100644 index 0000000000000..540439b9bf43a --- /dev/null +++ b/recipes/libgd/all/patches/2.3.1-use-cci.patch @@ -0,0 +1,72 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bf7836f..c4995b0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -116,7 +116,7 @@ else (USE_EXT_GD) + endif (ENABLE_ICONV) + + IF (ENABLE_WEBP) +- FIND_PACKAGE(WEBP REQUIRED) ++ FIND_PACKAGE(WebP REQUIRED) + ENDIF (ENABLE_WEBP) + + IF (ENABLE_LIQ) +@@ -140,7 +140,7 @@ else (USE_EXT_GD) + endif (ENABLE_FREETYPE) + + if (ENABLE_XPM) +- FIND_PACKAGE(XPM REQUIRED) ++ FIND_PACKAGE(libxpm REQUIRED) + endif (ENABLE_XPM) + + if (ENABLE_FONTCONFIG) +@@ -167,7 +167,7 @@ else (USE_EXT_GD) + ENDIF(ZLIB_FOUND) + + IF(WEBP_FOUND) +- INCLUDE_DIRECTORIES(${WEBP_INCLUDE_DIR}) ++ INCLUDE_DIRECTORIES(${WebP_INCLUDE_DIR}) + SET(HAVE_LIBWEBP 1) + ENDIF(WEBP_FOUND) + +@@ -189,7 +189,7 @@ else (USE_EXT_GD) + ENDIF(LIQ_FOUND) + + IF(XPM_FOUND) +- INCLUDE_DIRECTORIES(${XPM_INCLUDE_DIR}) ++ INCLUDE_DIRECTORIES(${libxpm_INCLUDE_DIR}) + SET(HAVE_LIBXPM 1) + LIST(APPEND PKG_REQUIRES_PRIVATES xpm) + ENDIF(XPM_FOUND) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index e1f8eda..47b1ee8 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -125,15 +125,15 @@ INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_S + + SET(LIBGD_DEP_LIBS + ${ZLIB_LIBRARIES} +- ${FREETYPE_LIBRARIES} ++ ${freetype_LIBRARIES} + ${PNG_LIBRARIES} + ${ICONV_LIBRARIES} + ${LIQ_LIBRARIES} + ${JPEG_LIBRARIES} + ${TIFF_LIBRARIES} +- ${XPM_LIBRARIES} ++ ${libxpm_LIBRARIES} + ${FONTCONFIG_LIBRARY} +- ${WEBP_LIBRARIES} ++ ${WebP_LIBRARIES} + ${RAQM_LIBRARIES} + ) + if (BUILD_SHARED_LIBS) +@@ -146,7 +146,7 @@ endif() + SET(LIBS_PRIVATES + ${ICONV_LIBRARIES} + ${LIQ_LIBRARIES} +- ${WEBP_LIBRARIES} ++ ${WebP_LIBRARIES} + ) + + set(GD_PROGRAMS gdcmpgif) diff --git a/recipes/libgd/all/patches/2.3.2-use-cci.patch b/recipes/libgd/all/patches/2.3.2-use-cci.patch index 489c66beb6236..758709ea2bdc7 100644 --- a/recipes/libgd/all/patches/2.3.2-use-cci.patch +++ b/recipes/libgd/all/patches/2.3.2-use-cci.patch @@ -1,8 +1,48 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 57cd95d..11a8409 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -118,7 +118,7 @@ else (USE_EXT_GD) + endif (ENABLE_ICONV) + + IF (ENABLE_WEBP) +- FIND_PACKAGE(WEBP REQUIRED) ++ FIND_PACKAGE(WebP REQUIRED) + ENDIF (ENABLE_WEBP) + + IF (ENABLE_HEIF) +@@ -153,7 +153,7 @@ else (USE_EXT_GD) + endif (ENABLE_FREETYPE) + + if (ENABLE_XPM) +- FIND_PACKAGE(XPM REQUIRED) ++ FIND_PACKAGE(libxpm REQUIRED) + endif (ENABLE_XPM) + + if (ENABLE_FONTCONFIG) +@@ -180,7 +180,7 @@ else (USE_EXT_GD) + ENDIF(ZLIB_FOUND) + + IF(WEBP_FOUND) +- INCLUDE_DIRECTORIES(${WEBP_INCLUDE_DIR}) ++ INCLUDE_DIRECTORIES(${WebP_INCLUDE_DIR}) + SET(HAVE_LIBWEBP 1) + ENDIF(WEBP_FOUND) + +@@ -207,7 +207,7 @@ else (USE_EXT_GD) + ENDIF(LIQ_FOUND) + + IF(XPM_FOUND) +- INCLUDE_DIRECTORIES(${XPM_INCLUDE_DIR}) ++ INCLUDE_DIRECTORIES(${libxpm_INCLUDE_DIR}) + SET(HAVE_LIBXPM 1) + LIST(APPEND PKG_REQUIRES_PRIVATES xpm) + ENDIF(XPM_FOUND) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 1d1be42..447458f 100644 +index 1d1be42..2843193 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -122,7 +122,7 @@ INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_S +@@ -122,13 +122,13 @@ INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_S SET(LIBGD_DEP_LIBS ${ZLIB_LIBRARIES} @@ -11,3 +51,19 @@ index 1d1be42..447458f 100644 ${PNG_LIBRARIES} ${ICONV_LIBRARIES} ${LIQ_LIBRARIES} + ${JPEG_LIBRARIES} + ${TIFF_LIBRARIES} +- ${XPM_LIBRARIES} ++ ${libxpm_LIBRARIES} + ${FONTCONFIG_LIBRARY} + ${WEBP_LIBRARIES} + ${AVIF_LIBRARIES} +@@ -145,7 +145,7 @@ endif() + SET(LIBS_PRIVATES + ${ICONV_LIBRARIES} + ${LIQ_LIBRARIES} +- ${WEBP_LIBRARIES} ++ ${WebP_LIBRARIES} + ) + + set(GD_PROGRAMS gdcmpgif) diff --git a/recipes/libgd/all/patches/2.3.3-use-cci.patch b/recipes/libgd/all/patches/2.3.3-use-cci.patch index 4a067840ce98f..fb8b637380621 100644 --- a/recipes/libgd/all/patches/2.3.3-use-cci.patch +++ b/recipes/libgd/all/patches/2.3.3-use-cci.patch @@ -1,8 +1,48 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6b3e5b3..2536fc6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -134,7 +134,7 @@ else (USE_EXT_GD) + endif (ENABLE_ICONV) + + IF (ENABLE_WEBP) +- FIND_PACKAGE(WEBP REQUIRED) ++ FIND_PACKAGE(WebP REQUIRED) + ENDIF (ENABLE_WEBP) + + IF (ENABLE_HEIF) +@@ -169,7 +169,7 @@ else (USE_EXT_GD) + endif (ENABLE_FREETYPE) + + if (ENABLE_XPM) +- FIND_PACKAGE(XPM REQUIRED) ++ FIND_PACKAGE(libxpm REQUIRED) + endif (ENABLE_XPM) + + if (ENABLE_FONTCONFIG) +@@ -196,7 +196,7 @@ else (USE_EXT_GD) + ENDIF(ZLIB_FOUND) + + IF(WEBP_FOUND) +- INCLUDE_DIRECTORIES(${WEBP_INCLUDE_DIR}) ++ INCLUDE_DIRECTORIES(${WebP_INCLUDE_DIR}) + SET(HAVE_LIBWEBP 1) + ENDIF(WEBP_FOUND) + +@@ -223,7 +223,7 @@ else (USE_EXT_GD) + ENDIF(LIQ_FOUND) + + IF(XPM_FOUND) +- INCLUDE_DIRECTORIES(${XPM_INCLUDE_DIR}) ++ INCLUDE_DIRECTORIES(${libxpm_INCLUDE_DIR}) + SET(HAVE_LIBXPM 1) + LIST(APPEND PKG_REQUIRES_PRIVATES xpm) + ENDIF(XPM_FOUND) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 3b271a8..2ee5ef9 100644 +index 3b271a8..55a8095 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -102,7 +102,7 @@ INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_S +@@ -102,15 +102,15 @@ INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_S SET(LIBGD_DEP_LIBS ${ZLIB_LIBRARIES} @@ -11,3 +51,22 @@ index 3b271a8..2ee5ef9 100644 ${PNG_LIBRARIES} ${ICONV_LIBRARIES} ${LIQ_LIBRARIES} + ${JPEG_LIBRARIES} + ${TIFF_LIBRARIES} +- ${XPM_LIBRARIES} ++ ${libxpm_LIBRARIES} + ${FONTCONFIG_LIBRARY} +- ${WEBP_LIBRARIES} ++ ${WebP_LIBRARIES} + ${AVIF_LIBRARIES} + ${RAQM_LIBRARIES} + ${HEIF_LIBRARIES} +@@ -125,7 +125,7 @@ endif() + SET(LIBS_PRIVATES + ${ICONV_LIBRARIES} + ${LIQ_LIBRARIES} +- ${WEBP_LIBRARIES} ++ ${WebP_LIBRARIES} + ) + + set(GD_PROGRAMS gdcmpgif) From 8f9bd107c2af27358a23273f862bacb0797dfea7 Mon Sep 17 00:00:00 2001 From: xyz1001 Date: Wed, 13 Mar 2024 04:27:46 +0800 Subject: [PATCH 239/405] (#23047) winreg: add winreg 6.2.0 --- recipes/winreg/all/conandata.yml | 4 ++ recipes/winreg/all/conanfile.py | 53 +++++++++++++++++++ .../winreg/all/test_package/CMakeLists.txt | 8 +++ recipes/winreg/all/test_package/conanfile.py | 26 +++++++++ .../winreg/all/test_package/test_package.cpp | 12 +++++ recipes/winreg/config.yml | 3 ++ 6 files changed, 106 insertions(+) create mode 100644 recipes/winreg/all/conandata.yml create mode 100644 recipes/winreg/all/conanfile.py create mode 100644 recipes/winreg/all/test_package/CMakeLists.txt create mode 100644 recipes/winreg/all/test_package/conanfile.py create mode 100644 recipes/winreg/all/test_package/test_package.cpp create mode 100644 recipes/winreg/config.yml diff --git a/recipes/winreg/all/conandata.yml b/recipes/winreg/all/conandata.yml new file mode 100644 index 0000000000000..4a90ca44d78e9 --- /dev/null +++ b/recipes/winreg/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "6.2.0": + url: "https://github.com/GiovanniDicanio/WinReg/archive/refs/tags/v6.2.0.tar.gz" + sha256: "9dc1b287fb8c765a35791bf0deea0da81e52a969827bc2d8777f54f26ade588d" diff --git a/recipes/winreg/all/conanfile.py b/recipes/winreg/all/conanfile.py new file mode 100644 index 0000000000000..13ef7cc69e291 --- /dev/null +++ b/recipes/winreg/all/conanfile.py @@ -0,0 +1,53 @@ +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 +import os + +required_conan_version = ">=1.50.0" + + +class WinregConan(ConanFile): + name = "winreg" + homepage = "https://github.com/GiovanniDicanio/WinReg" + description = "Convenient high-level C++ wrapper around the Windows Registry API." + topics = "registry", "header-only" + url = "https://github.com/conan-io/conan-center-index" + license = "MIT" + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _minimum_cpp_standard(self): + return 17 + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._minimum_cpp_standard) + if self.settings.os != "Windows": + raise ConanInvalidConfiguration("WinReg is only supported on Windows") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + pass + + def build(self): + pass + + 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, "WinReg"), os.path.join(self.package_folder, "include/WinReg")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/winreg/all/test_package/CMakeLists.txt b/recipes/winreg/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..d6ae3f3d82d9a --- /dev/null +++ b/recipes/winreg/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(winreg REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE winreg::winreg) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/winreg/all/test_package/conanfile.py b/recipes/winreg/all/test_package/conanfile.py new file mode 100644 index 0000000000000..34be4a6e879fa --- /dev/null +++ b/recipes/winreg/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +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, run=can_run(self)) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + self.run(os.path.join(self.cpp.build.bindirs[0], "test_package"), env="conanrun") diff --git a/recipes/winreg/all/test_package/test_package.cpp b/recipes/winreg/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..ff8ebb139790c --- /dev/null +++ b/recipes/winreg/all/test_package/test_package.cpp @@ -0,0 +1,12 @@ +#include +#include + +#include "WinReg/WinReg.hpp" + +int main() { + auto subkey = L"Environment"; + winreg::RegKey key{HKEY_CURRENT_USER, subkey}; + auto value = key.GetStringValue(L"Path"); + std::wcout << value << std::endl; + return 0; +} diff --git a/recipes/winreg/config.yml b/recipes/winreg/config.yml new file mode 100644 index 0000000000000..ff45ed79b1303 --- /dev/null +++ b/recipes/winreg/config.yml @@ -0,0 +1,3 @@ +versions: + "6.2.0": + folder: all From 6d031b7f70c6a3199246f03087cb413945fc14a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Wed, 13 Mar 2024 10:23:42 +0100 Subject: [PATCH 240/405] (#22770) easyexif: Fix test_package and modernize a tiny bit more * Fix easyexif test package and modernize a tiny bit more * Fully fix this time around * Fix hooks --- recipes/easyexif/all/CMakeLists.txt | 20 +++++++++------- recipes/easyexif/all/conanfile.py | 23 +++++++++++++----- .../easyexif/all/test_package/CMakeLists.txt | 13 +++++----- .../easyexif/all/test_package/conanfile.py | 24 +++++++++++++------ 4 files changed, 52 insertions(+), 28 deletions(-) diff --git a/recipes/easyexif/all/CMakeLists.txt b/recipes/easyexif/all/CMakeLists.txt index de50a2ead5152..0e4ae0258643c 100644 --- a/recipes/easyexif/all/CMakeLists.txt +++ b/recipes/easyexif/all/CMakeLists.txt @@ -1,6 +1,8 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.15) project(easyexif) +include(GNUInstallDirs) + set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_CXX_STANDARD 11) @@ -8,12 +10,14 @@ if(WIN32 AND BUILD_SHARED_LIBS) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) endif() -add_library(easyexif exif.cpp) -target_include_directories(easyexif PUBLIC exif.h) +add_library(easyexif ${EASYEXIF_SRC_DIR}/exif.cpp) +target_include_directories(easyexif PUBLIC ${EASYEXIF_SRC_DIR}/exif.h) +set_target_properties( + easyexif + PROPERTIES + PUBLIC_HEADER "${EASYEXIF_SRC_DIR}/exif.h" +) install(TARGETS easyexif - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -install(FILES exif.h DESTINATION include/easyexif) - + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/easyexif +) diff --git a/recipes/easyexif/all/conanfile.py b/recipes/easyexif/all/conanfile.py index c2f91926a073b..8b47ebbc93442 100644 --- a/recipes/easyexif/all/conanfile.py +++ b/recipes/easyexif/all/conanfile.py @@ -10,12 +10,13 @@ class EasyExifConan(ConanFile): name = "easyexif" description = "Tiny ISO-compliant C++ EXIF parsing library, third-party dependency free." - topics = ("conan", "exif", "image", "multimedia", "format", "graphics") + topics = ("exif", "image", "multimedia", "format", "graphics") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/mayanklahiri/easyexif" license = "BSD-2-Clause" - exports_sources = "CMakeLists.txt" + settings = "os", "compiler", "build_type", "arch" + package_type = "library" options = { "shared": [True, False], "fPIC": [True, False] @@ -30,23 +31,31 @@ def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + + @property + def _min_cppstd(self): + return 11 + def validate(self): - if self.info.settings.get_safe("compiler.cppstd"): - check_min_cppstd(self, 11) + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) def layout(self): - cmake_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.variables["EASYEXIF_SRC_DIR"] = self.source_folder.replace("\\", "/") tc.generate() def build(self): cmake = CMake(self) - cmake.configure() + cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) cmake.build() def package(self): @@ -56,3 +65,5 @@ def package(self): def package_info(self): self.cpp_info.libs = ["easyexif"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/easyexif/all/test_package/CMakeLists.txt b/recipes/easyexif/all/test_package/CMakeLists.txt index 2cf2b33919697..418b220626ca8 100644 --- a/recipes/easyexif/all/test_package/CMakeLists.txt +++ b/recipes/easyexif/all/test_package/CMakeLists.txt @@ -1,10 +1,9 @@ -cmake_minimum_required(VERSION 3.1) -project(PackageTest CXX) +cmake_minimum_required(VERSION 3.15) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +project(test_package LANGUAGES CXX) # if the project uses c++ -add_executable(example example.cpp) +find_package(easyexif REQUIRED CONFIG) -set_target_properties(example PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED ON) -target_link_libraries(example ${CONAN_LIBS}) +add_executable(${PROJECT_NAME} example.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE easyexif::easyexif) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/easyexif/all/test_package/conanfile.py b/recipes/easyexif/all/test_package/conanfile.py index f0acb990f0375..9da36f4d489c2 100644 --- a/recipes/easyexif/all/test_package/conanfile.py +++ b/recipes/easyexif/all/test_package/conanfile.py @@ -1,10 +1,20 @@ import os -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run -class SolaceTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +22,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "example") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") From 9209b533557712b17abc7bbae7673c292f7fba8d Mon Sep 17 00:00:00 2001 From: Ivo Hedtke Date: Wed, 13 Mar 2024 10:47:38 +0100 Subject: [PATCH 241/405] (#23020) Add highs version 1.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add highs version 1.7.0 * Also copy license.txt * Guard LICENSE copy on version * Use pattern when copying the license file --------- Co-authored-by: Rubén Rincón Blanco --- recipes/highs/all/conandata.yml | 3 +++ recipes/highs/all/conanfile.py | 2 +- recipes/highs/config.yml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/highs/all/conandata.yml b/recipes/highs/all/conandata.yml index 72761292a635a..412ffae12f185 100644 --- a/recipes/highs/all/conandata.yml +++ b/recipes/highs/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.7.0": + url: "https://github.com/ERGO-Code/HiGHS/archive/refs/tags/v1.7.0.tar.gz" + sha256: "D10175AD66E7F113AC5DC00C9D6650A620663A6884FBF2942D6EB7A3D854604F" "1.6.0": url: "https://github.com/ERGO-Code/HiGHS/archive/refs/tags/v1.6.0.tar.gz" sha256: "71962981566477c72c51b8b722c5df053d857b05b4f0e6869f455f657b3aa193" diff --git a/recipes/highs/all/conanfile.py b/recipes/highs/all/conanfile.py index 0094aa110e305..31a3a0427b60b 100644 --- a/recipes/highs/all/conanfile.py +++ b/recipes/highs/all/conanfile.py @@ -62,7 +62,7 @@ def build(self): cmake.build() def package(self): - copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "LICENSE*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) diff --git a/recipes/highs/config.yml b/recipes/highs/config.yml index f48a692b61e92..2fc1c9523304b 100644 --- a/recipes/highs/config.yml +++ b/recipes/highs/config.yml @@ -1,4 +1,6 @@ versions: + "1.7.0": + folder: all "1.6.0": folder: all "1.5.3": From d4d9670d91ba0abfb232d9233170b229fa6a1289 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 13 Mar 2024 11:56:16 +0100 Subject: [PATCH 242/405] (#23081) [docs] Changelog March 13th, 2024 Signed-off-by: Uilian Ries --- docs/changelog.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/changelog.md b/docs/changelog.md index e5f21f6b7c8bf..8179d56b57c90 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,10 @@ # Changelog +### 13-Mar-2024 - 11:08 CET + +- [feature]: Build with both */*:shared=True/False option when package type is declared as ``shared-library``. +- [fix]: Fix ValidateInfra python version check to be aligned with the latest Jenkins version. + ### 07-February-2024 - 15:43 CET - [feature] Add waiting list for new collaborators that are not found in access request issue. From a4a994fd7dd388dd20a5e8beee65ade4ca0aaf69 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 14 Mar 2024 11:18:44 +0200 Subject: [PATCH 243/405] (#22025) kmod: add v31 --- recipes/kmod/all/conandata.yml | 3 +++ recipes/kmod/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/kmod/all/conandata.yml b/recipes/kmod/all/conandata.yml index cc817fbafc1ad..e2d88fd85c718 100644 --- a/recipes/kmod/all/conandata.yml +++ b/recipes/kmod/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "31": + url: "https://kernel.org/pub/linux/utils/kernel/kmod/kmod-31.tar.xz" + sha256: "f5a6949043cc72c001b728d8c218609c5a15f3c33d75614b78c79418fcf00d80" "30": url: "https://kernel.org/pub/linux/utils/kernel/kmod/kmod-30.tar.xz" sha256: "f897dd72698dc6ac1ef03255cd0a5734ad932318e4adbaebc7338ef2f5202f9f" diff --git a/recipes/kmod/config.yml b/recipes/kmod/config.yml index 61353908a11fc..6c4bbbc0156bb 100644 --- a/recipes/kmod/config.yml +++ b/recipes/kmod/config.yml @@ -1,4 +1,6 @@ versions: + "31": + folder: all "30": folder: all "29": From cab4970c17199758caa8c74cef7807c710072ac6 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Thu, 14 Mar 2024 04:28:58 -0500 Subject: [PATCH 244/405] (#20335) eudev: Add recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * eudev: Add recipe * Set pkg_config_name to libudev * Enable libblkid * Specify requires and use consistent option name with_selinux * Bump to the latest version * Fix compatibility of the pkg-config file Set the version for pkg-config properly and set exec_prefix. This maps to version checks for libudev. * Bump version * Add PkgConfigDeps to test package * Convert version to string * Fix version for Conan V1 * Save version of libudev to a file for package_info * Bump linux-headers-generic to 6.5.9 --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: Daniel --- recipes/eudev/all/conandata.yml | 4 + recipes/eudev/all/conanfile.py | 148 ++++++++++++++++++ recipes/eudev/all/test_package/CMakeLists.txt | 7 + recipes/eudev/all/test_package/conanfile.py | 31 ++++ recipes/eudev/all/test_package/test_package.c | 25 +++ recipes/eudev/config.yml | 3 + 6 files changed, 218 insertions(+) create mode 100644 recipes/eudev/all/conandata.yml create mode 100644 recipes/eudev/all/conanfile.py create mode 100644 recipes/eudev/all/test_package/CMakeLists.txt create mode 100644 recipes/eudev/all/test_package/conanfile.py create mode 100644 recipes/eudev/all/test_package/test_package.c create mode 100644 recipes/eudev/config.yml diff --git a/recipes/eudev/all/conandata.yml b/recipes/eudev/all/conandata.yml new file mode 100644 index 0000000000000..72fcfaa216122 --- /dev/null +++ b/recipes/eudev/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "3.2.14": + url: "https://github.com/eudev-project/eudev/releases/download/v3.2.14/eudev-3.2.14.tar.gz" + sha256: "8da4319102f24abbf7fff5ce9c416af848df163b29590e666d334cc1927f006f" diff --git a/recipes/eudev/all/conanfile.py b/recipes/eudev/all/conanfile.py new file mode 100644 index 0000000000000..85b6e2350551c --- /dev/null +++ b/recipes/eudev/all/conanfile.py @@ -0,0 +1,148 @@ +import os +import re + +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, load, rm, rmdir, save +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps, PkgConfigDeps +from conan.tools.layout import basic_layout + + +required_conan_version = ">=1.54.0" + + +class EudevConan(ConanFile): + name = "eudev" + description = "eudev is a standalone dynamic and persistent device naming support (aka userspace devfs) daemon that runs independently from the init system." + license = "GPL-2.0-or-later" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/eudev-project/eudev" + topics = ("device", "udev") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "hwdb": [True, False], + "mtd_probe": [True, False], + "programs": [True, False], + "with_kmod": [True, False], + "with_libblkid": [True, False], + "with_selinux": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "hwdb": False, + "mtd_probe": False, + "programs": True, + "with_kmod": True, + "with_libblkid": True, + "with_selinux": True, + } + provides = "libudev" + + 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("acl/2.3.1") + self.requires("libcap/2.69") + self.requires("libxslt/1.1.34") + self.requires("linux-headers-generic/6.5.9") + + if self.options.with_kmod: + self.requires("kmod/30") + if self.options.with_libblkid: + self.requires("libmount/2.39.2") + if self.options.with_selinux: + self.requires("libselinux/3.6") + + def validate(self): + if self.settings.os != "Linux": + raise ConanInvalidConfiguration(f"{self.ref} is not supported on {self.settings.os}.") + + def build_requirements(self): + self.tool_requires("gperf/3.1") + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/2.1.0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + tc = AutotoolsToolchain(self) + def yes_no(v): + return "yes" if v else "no" + tc.configure_args.extend([ + "--sysconfdir=${prefix}/res", + f"--enable-programs={yes_no(self.options.programs)}", + f"--enable-blkid={yes_no(self.options.with_libblkid)}", + f"--enable-selinux={yes_no(self.options.with_selinux)}", + f"--enable-kmod={yes_no(self.options.with_kmod)}", + f"--enable-hwdb={yes_no(self.options.hwdb)}", + f"--enable-mtd_probe={yes_no(self.options.mtd_probe)}", + "--enable-manpages=no", + ]) + tc.generate() + tc = PkgConfigDeps(self) + tc.generate() + tc = AutotoolsDeps(self) + tc.generate() + + def build(self): + autotools = Autotools(self) + autotools.configure() + autotools.make() + + @property + def _libudev_version_txt(self): + return os.path.join(self.package_folder, "res", f"{self.name}-libudev-version.txt") + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) + autotools.install() + + pkg_config = load(self, os.path.join(self.package_folder, "lib", "pkgconfig", "libudev.pc")) + libudev_version = next(re.finditer("^Version: ([^\n$]+)[$\n]", pkg_config, flags=re.MULTILINE)).group(1) + save(self, self._libudev_version_txt, libudev_version) + + 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")) + + def package_info(self): + self.cpp_info.libs = ["udev"] + libudev_version = load(self, self._libudev_version_txt).strip() + self.cpp_info.set_property("pkg_config_name", "libudev") + self.cpp_info.set_property("system_package_version", str(libudev_version)) + pkgconfig_variables = { + 'exec_prefix': '${prefix}', + } + self.cpp_info.set_property( + "pkg_config_custom_content", + "\n".join(f"{key}={value}" for key, value in pkgconfig_variables.items())) + self.cpp_info.requires = ["acl::acl", "libcap::cap", "libxslt::xslt", "linux-headers-generic::linux-headers-generic"] + if self.options.with_kmod: + self.cpp_info.requires.append("kmod::kmod") + if self.options.with_libblkid: + self.cpp_info.requires.append("libmount::libblkid") + if self.options.with_selinux: + self.cpp_info.requires.append("libselinux::selinux") + + # todo Remove this workaround for Conan v1 + self.cpp_info.set_property("component_version", str(libudev_version)) diff --git a/recipes/eudev/all/test_package/CMakeLists.txt b/recipes/eudev/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..ba37277275903 --- /dev/null +++ b/recipes/eudev/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(eudev REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE eudev::eudev) diff --git a/recipes/eudev/all/test_package/conanfile.py b/recipes/eudev/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0ce98f8735f95 --- /dev/null +++ b/recipes/eudev/all/test_package/conanfile.py @@ -0,0 +1,31 @@ +import os + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +from conan.tools.gnu import PkgConfig +from conan.tools.scm import Version + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "PkgConfigDeps", "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): + pkg_config = PkgConfig(self, "libudev", pkg_config_path=self.generators_folder) + assert Version(pkg_config.version) >= 251, f"{pkg_config.version} should be >= 251" + 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/eudev/all/test_package/test_package.c b/recipes/eudev/all/test_package/test_package.c new file mode 100644 index 0000000000000..05b8913de0a37 --- /dev/null +++ b/recipes/eudev/all/test_package/test_package.c @@ -0,0 +1,25 @@ +#include +#include +#include + + +int main() { + struct udev *udev; + struct udev_enumerate *enumerate; + + udev = udev_new(); + if (!udev) { + fprintf(stderr, "Cannot create udev context.\n"); + return 1; + } + + enumerate = udev_enumerate_new(udev); + if (!enumerate) { + fprintf(stderr, "Cannot create enumerate context.\n"); + } + + udev_enumerate_unref(enumerate); + udev_unref(udev); + + return EXIT_SUCCESS; +} diff --git a/recipes/eudev/config.yml b/recipes/eudev/config.yml new file mode 100644 index 0000000000000..3420dd6df85af --- /dev/null +++ b/recipes/eudev/config.yml @@ -0,0 +1,3 @@ +versions: + "3.2.14": + folder: all From b0546ef93267f0ee2eb1eb4958b891880d3c9549 Mon Sep 17 00:00:00 2001 From: Ahajha <44127594+Ahajha@users.noreply.github.com> Date: Thu, 14 Mar 2024 06:29:08 -0400 Subject: [PATCH 245/405] (#22982) abseil: Add 20240116.1, remove old versions * Add abseil 20240116.1 * Skip C++17 build on latest version with GCC 7 * Remove old "patch" versions * Convert compiler major version to int in v1 test package * Backport GCC7/C++17/filesystem fix * Revert GCC 7 hacks * Remove std::result_of workaround defines --- recipes/abseil/all/conandata.yml | 44 +++++---------- recipes/abseil/all/conanfile.py | 5 -- .../0003-absl-string-libm-20240116.patch | 15 ++++++ ...240116.1-0001-fix-filesystem-include.patch | 53 +++++++++++++++++++ recipes/abseil/config.yml | 10 +--- 5 files changed, 82 insertions(+), 45 deletions(-) create mode 100644 recipes/abseil/all/patches/0003-absl-string-libm-20240116.patch create mode 100644 recipes/abseil/all/patches/20240116.1-0001-fix-filesystem-include.patch diff --git a/recipes/abseil/all/conandata.yml b/recipes/abseil/all/conandata.yml index 1f04efd630a51..c6bc5198c7de0 100644 --- a/recipes/abseil/all/conandata.yml +++ b/recipes/abseil/all/conandata.yml @@ -1,29 +1,29 @@ sources: + "20240116.1": + url: "https://github.com/abseil/abseil-cpp/archive/20240116.1.tar.gz" + sha256: "3c743204df78366ad2eaf236d6631d83f6bc928d1705dd0000b872e53b73dc6a" "20230802.1": url: "https://github.com/abseil/abseil-cpp/archive/20230802.1.tar.gz" sha256: "987ce98f02eefbaf930d6e38ab16aa05737234d7afbab2d5c4ea7adbe50c28ed" "20230125.3": url: "https://github.com/abseil/abseil-cpp/archive/20230125.3.tar.gz" sha256: "5366D7E7FA7BA0D915014D387B66D0D002C03236448E1BA9EF98122C13B35C36" - "20230125.2": - url: "https://github.com/abseil/abseil-cpp/archive/20230125.2.tar.gz" - sha256: "9a2b5752d7bfade0bdeee2701de17c9480620f8b237e1964c1b9967c75374906" - "20230125.1": - url: "https://github.com/abseil/abseil-cpp/archive/20230125.1.tar.gz" - sha256: "81311c17599b3712069ded20cca09a62ab0bf2a89dfa16993786c8782b7ed145" - "20230125.0": - url: "https://github.com/abseil/abseil-cpp/archive/20230125.0.tar.gz" - sha256: "3ea49a7d97421b88a8c48a0de16c16048e17725c7ec0f1d3ea2683a2a75adc21" "20220623.1": url: "https://github.com/abseil/abseil-cpp/archive/20220623.1.tar.gz" sha256: "91ac87d30cc6d79f9ab974c51874a704de9c2647c40f6932597329a282217ba8" - "20220623.0": - url: "https://github.com/abseil/abseil-cpp/archive/20220623.0.tar.gz" - sha256: "4208129b49006089ba1d6710845a45e31c59b0ab6bff9e5788a87f55c5abd602" "20211102.0": url: "https://github.com/abseil/abseil-cpp/archive/20211102.0.tar.gz" sha256: "dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4" patches: + "20240116.1": + - 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" + - patch_file: "patches/20240116.1-0001-fix-filesystem-include.patch" + patch_description: "Fix GCC 7 including in C++17 mode when it is not available (until GCC 8)" + patch_type: "portability" + patch_source: "https://github.com/abseil/abseil-cpp/commit/bb83aceacb554e79e7cd2404856f0be30bd00303" "20230802.1": - patch_file: "patches/0003-absl-string-libm-20230802.patch" patch_description: "link libm to absl string" @@ -37,18 +37,6 @@ patches: - patch_file: "patches/0003-absl-string-libm.patch" patch_description: "link libm to absl string" patch_type: "portability" - "20230125.2": - - patch_file: "patches/0003-absl-string-libm.patch" - patch_description: "link libm to absl string" - patch_type: "portability" - "20230125.1": - - patch_file: "patches/0003-absl-string-libm.patch" - patch_description: "link libm to absl string" - patch_type: "portability" - "20230125.0": - - patch_file: "patches/0003-absl-string-libm.patch" - patch_description: "link libm to absl string" - patch_type: "portability" "20220623.1": - patch_file: "patches/0003-absl-string-libm.patch" patch_description: "link libm to absl string" @@ -57,14 +45,6 @@ patches: patch_description: "Workaround bug in GCC 7.2" patch_source: "https://github.com/abseil/abseil-cpp/pull/1250" patch_type: "portability" - "20220623.0": - - patch_file: "patches/0003-absl-string-libm.patch" - patch_description: "link libm to absl string" - patch_type: "portability" - - patch_file: "patches/0005-has-unique-object-representations.patch" - patch_description: "Workaround bug in GCC 7.2" - patch_source: "https://github.com/abseil/abseil-cpp/pull/1250" - patch_type: "portability" "20211102.0": - patch_file: "patches/0003-absl-string-libm.patch" patch_description: "link libm to absl string" diff --git a/recipes/abseil/all/conanfile.py b/recipes/abseil/all/conanfile.py index 1d57cb0be91b0..bcfa3c446e426 100644 --- a/recipes/abseil/all/conanfile.py +++ b/recipes/abseil/all/conanfile.py @@ -232,11 +232,6 @@ def package_info(self): self.cpp_info.components[pkgconfig_name].system_libs = values.get("system_libs", []) self.cpp_info.components[pkgconfig_name].frameworks = values.get("frameworks", []) self.cpp_info.components[pkgconfig_name].requires = values.get("requires", []) - if is_msvc(self) and self.settings.compiler.get_safe("cppstd") == "20": - self.cpp_info.components[pkgconfig_name].defines.extend([ - "_HAS_DEPRECATED_RESULT_OF", - "_SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING", - ]) self.cpp_info.components[pkgconfig_name].names["cmake_find_package"] = cmake_target self.cpp_info.components[pkgconfig_name].names["cmake_find_package_multi"] = cmake_target diff --git a/recipes/abseil/all/patches/0003-absl-string-libm-20240116.patch b/recipes/abseil/all/patches/0003-absl-string-libm-20240116.patch new file mode 100644 index 0000000000000..640ce8d7b642d --- /dev/null +++ b/recipes/abseil/all/patches/0003-absl-string-libm-20240116.patch @@ -0,0 +1,15 @@ +--- a/absl/strings/CMakeLists.txt ++++ b/absl/strings/CMakeLists.txt +@@ -32,9 +32,12 @@ + PUBLIC + ) + ++find_library(LIBM m) + absl_cc_library( + NAME + strings ++ LINKOPTS ++ $<$:-lm> + HDRS + "ascii.h" + "charconv.h" diff --git a/recipes/abseil/all/patches/20240116.1-0001-fix-filesystem-include.patch b/recipes/abseil/all/patches/20240116.1-0001-fix-filesystem-include.patch new file mode 100644 index 0000000000000..f29ce6195fad0 --- /dev/null +++ b/recipes/abseil/all/patches/20240116.1-0001-fix-filesystem-include.patch @@ -0,0 +1,53 @@ +From bb83aceacb554e79e7cd2404856f0be30bd00303 Mon Sep 17 00:00:00 2001 +From: Derek Mauro +Date: Tue, 12 Mar 2024 08:33:40 -0700 +Subject: [PATCH] Fix GCC7 C++17 build + +GCC did not support until GCC8. + +Fixes #1635 + +PiperOrigin-RevId: 615051227 +Change-Id: If7cd5802ead40805b1ff1c3bdfc10ba6d2858ef0 +--- + absl/hash/hash_test.cc | 2 +- + absl/hash/internal/hash.h | 12 ++++++++++-- + 2 files changed, 11 insertions(+), 3 deletions(-) + +diff --git a/absl/hash/internal/hash.h b/absl/hash/internal/hash.h +index f4a94f9129f..b7d89b01807 100644 +--- a/absl/hash/internal/hash.h ++++ b/absl/hash/internal/hash.h +@@ -24,6 +24,15 @@ + #include + #endif + ++#include "absl/base/config.h" ++ ++// For feature testing and determining which headers can be included. ++#if ABSL_INTERNAL_CPLUSPLUS_LANG >= 202002L ++#include ++#else ++#include ++#endif ++ + #include + #include + #include +@@ -47,7 +56,6 @@ + #include + #include + +-#include "absl/base/config.h" + #include "absl/base/internal/unaligned_access.h" + #include "absl/base/port.h" + #include "absl/container/fixed_array.h" +@@ -61,7 +69,7 @@ + #include "absl/types/variant.h" + #include "absl/utility/utility.h" + +-#if ABSL_INTERNAL_CPLUSPLUS_LANG >= 201703L && \ ++#if defined(__cpp_lib_filesystem) && __cpp_lib_filesystem >= 201703L && \ + !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) + #include // NOLINT + #endif diff --git a/recipes/abseil/config.yml b/recipes/abseil/config.yml index a5bf2303085d1..4db2fe8f16b71 100644 --- a/recipes/abseil/config.yml +++ b/recipes/abseil/config.yml @@ -1,17 +1,11 @@ versions: + "20240116.1": + folder: all "20230802.1": folder: all "20230125.3": folder: all - "20230125.2": - folder: all - "20230125.1": - folder: all - "20230125.0": - folder: all "20220623.1": folder: all - "20220623.0": - folder: all "20211102.0": folder: all From e29d0bfe1d4cb260bc7448d916cab0f2d82a33c7 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Thu, 14 Mar 2024 11:47:51 +0100 Subject: [PATCH 246/405] (#23072) [openapi-generator] Bump version 7.4.0 and remove older --- recipes/openapi-generator/all/conandata.yml | 12 +++--------- recipes/openapi-generator/config.yml | 8 ++------ 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/recipes/openapi-generator/all/conandata.yml b/recipes/openapi-generator/all/conandata.yml index 62465f2d111e7..e13b56c9de28d 100644 --- a/recipes/openapi-generator/all/conandata.yml +++ b/recipes/openapi-generator/all/conandata.yml @@ -1,19 +1,13 @@ sources: + "7.4.0": + url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.4.0/openapi-generator-cli-7.4.0.jar" + sha256: "e42769a98fef5634bee0f921e4b90786a6b3292aa11fe8d2f84c045ac435ab29" "7.3.0": url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.3.0/openapi-generator-cli-7.3.0.jar" sha256: "879c15340a75a19a7e720efc242c3223e0e4207b0694d6d1cea5c7dd87cf1cce" "7.2.0": url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.2.0/openapi-generator-cli-7.2.0.jar" sha256: "1cf0c80de12c0fdc8594289c19e414b402108ef10b8dd0bfda1953151341ab5d" - "7.0.0": - url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.0/openapi-generator-cli-7.0.0.jar" - sha256: "80e8e9d71bdbdf513b8c65cf7d3fc2fe3d88aaeb4e39a2c6e20831f00032c775" "6.6.0": url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.6.0/openapi-generator-cli-6.6.0.jar" sha256: "9718ff7844e89462c75dcd9b20a35136f6db257bfe1b874db1e3002e99de4609" - "6.5.0": - url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.5.0/openapi-generator-cli-6.5.0.jar" - sha256: "f18d771e98f2c5bb169d1d1961de4f94866d2901abc1e16177dd7e9299834721" - "6.4.0": - url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.4.0/openapi-generator-cli-6.4.0.jar" - sha256: "35aead300e0c9469fbd9d30cf46f4153897dcb282912091ca4ec9212dce9d151" diff --git a/recipes/openapi-generator/config.yml b/recipes/openapi-generator/config.yml index 07bf0a2fcdb65..949f6537e4806 100644 --- a/recipes/openapi-generator/config.yml +++ b/recipes/openapi-generator/config.yml @@ -1,13 +1,9 @@ versions: + "7.4.0": + folder: all "7.3.0": folder: all "7.2.0": folder: all - "7.0.0": - folder: all "6.6.0": folder: all - "6.5.0": - folder: all - "6.4.0": - folder: all From a7a8ddb1eafd85629ce5df3651b46b6a9a526a16 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 14 Mar 2024 20:03:36 +0900 Subject: [PATCH 247/405] (#20704) antlr4: add recipe * antlr: add recipe * rename folder name --- recipes/antlr4/all/conandata.yml | 8 +++ recipes/antlr4/all/conanfile.py | 75 ++++++++++++++++++++ recipes/antlr4/all/test_package/conanfile.py | 15 ++++ recipes/antlr4/config.yml | 3 + 4 files changed, 101 insertions(+) create mode 100644 recipes/antlr4/all/conandata.yml create mode 100644 recipes/antlr4/all/conanfile.py create mode 100644 recipes/antlr4/all/test_package/conanfile.py create mode 100644 recipes/antlr4/config.yml diff --git a/recipes/antlr4/all/conandata.yml b/recipes/antlr4/all/conandata.yml new file mode 100644 index 0000000000000..bb6d82645f9fb --- /dev/null +++ b/recipes/antlr4/all/conandata.yml @@ -0,0 +1,8 @@ +sources: + "4.13.1": + jar: + url: "https://www.antlr.org/download/antlr-4.13.1-complete.jar" + sha256: "bc13a9c57a8dd7d5196888211e5ede657cb64a3ce968608697e4f668251a8487" + license: + url: "https://raw.githubusercontent.com/antlr/antlr4/4.13.1/LICENSE.txt" + sha256: "3db1fb3ee79a4b4f9918fc4d0f6133bf18a3cf787f126cd22f8aa9b862281c0c" diff --git a/recipes/antlr4/all/conanfile.py b/recipes/antlr4/all/conanfile.py new file mode 100644 index 0000000000000..b0a45cf87f544 --- /dev/null +++ b/recipes/antlr4/all/conanfile.py @@ -0,0 +1,75 @@ +from conan import ConanFile +from conan.tools.files import copy, download, save +import os +import stat + + +required_conan_version = ">=1.47.0" + + +class Antlr4Conan(ConanFile): + name = "antlr4" + description = "powerful parser generator for reading, processing, executing, or translating structured text or binary files." + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/antlr/antlr4" + topics = ("parser", "generator") + package_type = "application" + settings = "os", "arch", "compiler", "build_type" + + def layout(self): + pass + + def requirements(self): + self.requires("openjdk/21.0.1") + + def package_id(self): + del self.info.settings.arch + del self.info.settings.compiler + del self.info.settings.build_type + + def source(self): + v = self.conan_data["sources"][self.version] + download( + self, + url=v["jar"]["url"], + filename=os.path.join(self.source_folder, "antlr-complete.jar"), + sha256=v["jar"]["sha256"], + ) + download( + self, + url=v["license"]["url"], + filename=os.path.join(self.source_folder, "LICENSE.txt"), + sha256=v["license"]["sha256"], + ) + + def package(self): + copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, pattern="antlr-complete.jar", dst=os.path.join(self.package_folder, "res"), src=self.source_folder) + if self.settings.os == "Windows": + save(self, + path=os.path.join(self.package_folder, "bin", "antlr4.bat"), + content="""\ + java -classpath %CLASSPATH% org.antlr.v4.Tool %* + """ + ) + else: + bin_path = os.path.join(self.package_folder, "bin", "antlr4") + save(self, + path=bin_path, + content="""\ + #!/bin/bash + java -classpath $CLASSPATH org.antlr.v4.Tool $@ + """ + ) + st = os.stat(bin_path) + os.chmod(bin_path, st.st_mode | stat.S_IEXEC) + + def package_info(self): + self.cpp_info.frameworkdirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] + self.cpp_info.includedirs = [] + + jar = os.path.join(self.package_folder, "res", "antlr-complete.jar") + self.runenv_info.prepend_path("CLASSPATH", jar) diff --git a/recipes/antlr4/all/test_package/conanfile.py b/recipes/antlr4/all/test_package/conanfile.py new file mode 100644 index 0000000000000..07c30b7476b74 --- /dev/null +++ b/recipes/antlr4/all/test_package/conanfile.py @@ -0,0 +1,15 @@ +from conan import ConanFile +from conan.tools.build import can_run + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "VirtualBuildEnv" + test_type = "explicit" + + def build_requirements(self): + self.tool_requires(self.tested_reference_str) + + def test(self): + if can_run(self): + self.run("antlr4") diff --git a/recipes/antlr4/config.yml b/recipes/antlr4/config.yml new file mode 100644 index 0000000000000..641cda5e6add7 --- /dev/null +++ b/recipes/antlr4/config.yml @@ -0,0 +1,3 @@ +versions: + "4.13.1": + folder: all From 8ff9c002837c04b3abc925b8c84f72d0bcbf103a Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 14 Mar 2024 20:27:09 +0900 Subject: [PATCH 248/405] (#23074) sqlite3: add version 3.45.2 --- recipes/sqlite3/all/conandata.yml | 3 +++ recipes/sqlite3/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/sqlite3/all/conandata.yml b/recipes/sqlite3/all/conandata.yml index 79c5bc7cc7480..1f5bb786d1767 100644 --- a/recipes/sqlite3/all/conandata.yml +++ b/recipes/sqlite3/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.45.2": + url: "https://sqlite.org/2024/sqlite-amalgamation-3450200.zip" + sha256: "65230414820d43a6d1445d1d98cfe57e8eb9f7ac0d6a96ad6932e0647cce51db" "3.45.1": url: "https://sqlite.org/2024/sqlite-amalgamation-3450100.zip" sha256: "5592243caf28b2cdef41e6ab58d25d653dfc53deded8450eb66072c929f030c4" diff --git a/recipes/sqlite3/config.yml b/recipes/sqlite3/config.yml index 922ba60e383e9..97c45a94fa443 100644 --- a/recipes/sqlite3/config.yml +++ b/recipes/sqlite3/config.yml @@ -1,4 +1,6 @@ versions: + "3.45.2": + folder: all "3.45.1": folder: all "3.45.0": From 2c12fe30fd472a22e5f885b36e09b7551e7f627b Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Thu, 14 Mar 2024 13:04:24 +0000 Subject: [PATCH 249/405] (#23097) [bot] Update authorized users list (2024-03-14) Co-authored-by: conan-center-bot --- .c3i/authorized_users.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index e630a8c822965..e2da892a9b7e4 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1301,3 +1301,7 @@ authorized_users: - dbolduc - jgaa - tbsuht +- Greendogo +- iso8859-1 +- spiderkeys +- lspintzyk From 40c6cba54590e90f5288f0e7a4aab8c4c42fdcdb Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Thu, 14 Mar 2024 11:47:41 -0500 Subject: [PATCH 250/405] (#23013) libudev: Set the pkg-config version to the real version number The pkg-config file contains the version of the Conan package. This is problematic because it is `system` which causes version checks for libudev to fail. This happens in Weston I'm making for instance: ``` Dependency libudev found: NO found system but need: '>= 136' Found CMake: /usr/local/bin/cmake (3.28.20240202) Run-time dependency libudev found: NO (tried cmake) ../src/libweston/meson.build:196:2: ERROR: Dependency lookup for libudev with method 'pkgconfig' failed: Invalid version, need 'libudev' ['>= 136'] found 'system'. ``` I've set the version in the pkg-config file to that of the version on the system. This fixes version checks in consumers using pkg-config. --- recipes/libudev/all/conanfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/libudev/all/conanfile.py b/recipes/libudev/all/conanfile.py index 46c164d11074a..0a4056812ce72 100644 --- a/recipes/libudev/all/conanfile.py +++ b/recipes/libudev/all/conanfile.py @@ -48,3 +48,7 @@ def package_info(self): self.cpp_info.libdirs = [] pkg_config = PkgConfig(self, "libudev") pkg_config.fill_cpp_info(self.cpp_info) + self.cpp_info.set_property("system_package_version", str(pkg_config.version)) + + # todo Remove this workaround for Conan v1 + self.cpp_info.set_property("component_version", str(pkg_config.version)) From a0ec39fe01b42c229e8a66a974c043929922899c Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Fri, 15 Mar 2024 09:32:04 +0000 Subject: [PATCH 251/405] (#23109) [bot] Update authorized users list (2024-03-15) Co-authored-by: conan-center-bot --- .c3i/authorized_users.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index e2da892a9b7e4..ad6d2b83372d7 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1305,3 +1305,6 @@ authorized_users: - iso8859-1 - spiderkeys - lspintzyk +- js-nano +- matheusgomes28 +- jsinge From 309abf85111c15087164b2cb66d81c951f8912e0 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Sat, 16 Mar 2024 03:07:05 -0500 Subject: [PATCH 252/405] (#23011) harfbuzz: Disable auto-features which pull in system dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It autodetects cairo and pulls it in, which breaks reproducibility. This also breaks cross compilation by pulling in dependencies on the build system. Co-authored-by: Rubén Rincón Blanco --- recipes/harfbuzz/all/conanfile.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/harfbuzz/all/conanfile.py b/recipes/harfbuzz/all/conanfile.py index 7904abea985f6..a0f1c1c55554a 100644 --- a/recipes/harfbuzz/all/conanfile.py +++ b/recipes/harfbuzz/all/conanfile.py @@ -100,9 +100,9 @@ def validate(self): ) def build_requirements(self): - self.tool_requires("meson/1.2.3") + self.tool_requires("meson/1.3.2") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") if self.options.with_glib: self.tool_requires("glib/") if self.settings.os == "Macos": @@ -141,6 +141,7 @@ def is_vs_2017(): backend, cxxflags = meson_backend_and_flags() tc = MesonToolchain(self, backend=backend) + tc.project_options["auto_features"] = "disabled" tc.project_options.update({ "glib": is_enabled(self.options.with_glib), "icu": is_enabled(self.options.with_icu), From c75f7c4927ee13dfdda78f46b06dde1ffa59434f Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 18 Mar 2024 13:27:05 +0900 Subject: [PATCH 253/405] (#23121) sfl: add version 1.3.0 --- recipes/sfl/all/conandata.yml | 3 +++ recipes/sfl/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/sfl/all/conandata.yml b/recipes/sfl/all/conandata.yml index cc5806fe1937d..b4d8ce3303e28 100644 --- a/recipes/sfl/all/conandata.yml +++ b/recipes/sfl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.0": + url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.3.0.tar.gz" + sha256: "1d0e797c5e11bbc861f9f1ae8eb7d9378d456d6cd1c43e00cdec6d3664e745e6" "1.2.4": url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.2.4.tar.gz" sha256: "e24d4adb1aff638e17ef49841881992a1020dc951e4e9721b81b76d44ef89f5b" diff --git a/recipes/sfl/config.yml b/recipes/sfl/config.yml index aec9153a51c8d..5f304ccdf5f5a 100644 --- a/recipes/sfl/config.yml +++ b/recipes/sfl/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.0": + folder: "all" "1.2.4": folder: "all" "1.2.3": From 9b2303a313c10ec14c8bcaa1a8899eeff7992fd2 Mon Sep 17 00:00:00 2001 From: Nicolai Grodzitski Date: Mon, 18 Mar 2024 09:23:52 +0100 Subject: [PATCH 254/405] (#20859) Add the package for quickcpplib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add the package for quickcpplib https://github.com/ned14/quickcpplib * Add quickcpplib (ci fixes) * Review on quickcpplib Co-authored-by: Uilian Ries * Update recipes/quickcpplib/all/conanfile.py * fix missing import Signed-off-by: Uilian Ries * Fix * Check cppstd in a v1 compatible way * Remove bad import --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries Co-authored-by: Rubén Rincón Blanco --- recipes/quickcpplib/all/conandata.yml | 4 + recipes/quickcpplib/all/conanfile.py | 105 ++++++++++++++++++ .../all/test_package/CMakeLists.txt | 13 +++ .../quickcpplib/all/test_package/conanfile.py | 26 +++++ .../all/test_package/test_package.cpp | 53 +++++++++ recipes/quickcpplib/config.yml | 3 + 6 files changed, 204 insertions(+) create mode 100644 recipes/quickcpplib/all/conandata.yml create mode 100644 recipes/quickcpplib/all/conanfile.py create mode 100644 recipes/quickcpplib/all/test_package/CMakeLists.txt create mode 100644 recipes/quickcpplib/all/test_package/conanfile.py create mode 100644 recipes/quickcpplib/all/test_package/test_package.cpp create mode 100644 recipes/quickcpplib/config.yml diff --git a/recipes/quickcpplib/all/conandata.yml b/recipes/quickcpplib/all/conandata.yml new file mode 100644 index 0000000000000..c89f6afe4befd --- /dev/null +++ b/recipes/quickcpplib/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20231208": + url: "https://github.com/ned14/quickcpplib/archive/72277c70f925829935a2af846731ab36063ec16f.tar.gz" + sha256: "bb9da86efa2f262e6a292453775fa9b999b422700eb1c1ac390b7cbe5f0ec92f" diff --git a/recipes/quickcpplib/all/conanfile.py b/recipes/quickcpplib/all/conanfile.py new file mode 100644 index 0000000000000..be93e0eb71c55 --- /dev/null +++ b/recipes/quickcpplib/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.files import get, copy, rmdir, rm +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.54.0" + + +class QuickcpplibCodeConan(ConanFile): + name = "quickcpplib" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ned14/quickcpplib" + description = "Eliminate all the tedious hassle when making state-of-the-art C++ 17 - 23 libraries!" + topics = ("header-only", "common") + package_type = "header-library" + settings = "os", "compiler", "build_type", "arch" + + @property + def _compiler_required_version(self): + return { + "gcc": "9", + "clang": "10", + "Visual Studio": "15", + "msvc": "191", + } + + @property + def _needs_span_lite(self): + # TODO: Conan 1 only has check_min_cppstd, move to `valid_max_cppstd` when only Conan 2 is required + try: + check_min_cppstd(self, "20") + return False + except ConanInvalidConfiguration: + return True + + @property + def _min_cppstd(self): + return "17" + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + if self._needs_span_lite: + self.requires("span-lite/0.10.3") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + # To simplify library integration to CCI + # we require C++17 to be dependency free. + check_min_cppstd(self, self._min_cppstd) + + min_version = self._compiler_required_version.get(str(self.settings.compiler)) + if min_version: + if Version(self.settings.compiler.version) < min_version: + raise ConanInvalidConfiguration(f"This package requires c++ {self._min_cppstd} support. The current compiler does not support it.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], + destination=self.source_folder, strip_root=True) + + def build(self): + pass + + def package(self): + copy(self, "*.hpp", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + copy(self, "*.ipp", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + copy(self, "*.h", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + rmdir(self, os.path.join(self.package_folder, "include", "quickcpplib", "byte")) + rmdir(self, os.path.join(self.package_folder, "include", "quickcpplib", "boost")) + rmdir(self, os.path.join(self.package_folder, "include", "quickcpplib", "optional")) + rmdir(self, os.path.join(self.package_folder, "include", "quickcpplib", "span-lite")) + rm(self, "allocator_testing.hpp", os.path.join(self.package_folder, "include", "quickcpplib")) + copy(self, "Licence.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "quickcpplib") + self.cpp_info.set_property("cmake_target_name", "quickcpplib::hl") + + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] + + if self._needs_span_lite: + self.cpp_info.requires = ["span-lite::span-lite"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["dl", "pthread", "rt"] + + self.cpp_info.defines.append("QUICKCPPLIB_DISABLE_ABI_PERMUTATION") + + if self._needs_span_lite: + self.cpp_info.defines.append("QUICKCPPLIB_USE_SYSTEM_SPAN_LITE=1") + else: + self.cpp_info.defines.append("QUICKCPPLIB_USE_STD_SPAN=1") + + self.cpp_info.defines.append("QUICKCPPLIB_USE_STD_BYTE=1") + self.cpp_info.defines.append("QUICKCPPLIB_USE_STD_OPTIONAL=1") diff --git a/recipes/quickcpplib/all/test_package/CMakeLists.txt b/recipes/quickcpplib/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..fc0e3e545987e --- /dev/null +++ b/recipes/quickcpplib/all/test_package/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +find_package(quickcpplib REQUIRED CONFIG) + +add_executable(test_package test_package.cpp) +target_link_libraries(test_package quickcpplib::hl) + +if (TARGET nonstd::span-lite) +target_compile_features(test_package PRIVATE cxx_std_17) +else () +target_compile_features(test_package PRIVATE cxx_std_20) +endif() diff --git a/recipes/quickcpplib/all/test_package/conanfile.py b/recipes/quickcpplib/all/test_package/conanfile.py new file mode 100644 index 0000000000000..e845ae751a301 --- /dev/null +++ b/recipes/quickcpplib/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/quickcpplib/all/test_package/test_package.cpp b/recipes/quickcpplib/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..54a5243de2818 --- /dev/null +++ b/recipes/quickcpplib/all/test_package/test_package.cpp @@ -0,0 +1,53 @@ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace ql = ::quickcpplib; + +int main() { + std::uint64_t x = 20230904ULL; + std::uint64_t y = 42ULL; + if( ql::algorithm::hash::fast_hash::hash(reinterpret_cast(&x), sizeof(x)) + == ql::algorithm::hash::fast_hash::hash(reinterpret_cast(&y), sizeof(y)) ) + { + return -1; + } + + return 0; +} diff --git a/recipes/quickcpplib/config.yml b/recipes/quickcpplib/config.yml new file mode 100644 index 0000000000000..1f4ea336bc936 --- /dev/null +++ b/recipes/quickcpplib/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20231208": + folder: all From fca4d560031841226037939a34c95c3660ba7afb Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Mon, 18 Mar 2024 10:27:24 +0100 Subject: [PATCH 255/405] (#23034) qt 5.15.13 * qt 5.15.13 * remove patches merged upstream https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/462017 https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/460367 * shorten the path to ANGLE * remove 5.15.7 * remove 5.15.8 --- recipes/qt/5.x.x/conandata.yml | 117 ++----- recipes/qt/5.x.x/conanfile.py | 12 +- recipes/qt/5.x.x/patches/107ed30ec5.patch | 35 -- ...qmake-default-libdirs-apple-clang-15.patch | 26 -- recipes/qt/5.x.x/patches/QTBUG-98813.patch | 38 -- recipes/qt/5.x.x/patches/d3396fb6fc.patch | 30 -- recipes/qt/5.x.x/patches/dece6f5.diff | 14 - ...dules5.15.7.conf => qtmodules5.15.13.conf} | 0 recipes/qt/5.x.x/qtmodules5.15.8.conf | 326 ------------------ recipes/qt/config.yml | 6 +- 10 files changed, 40 insertions(+), 564 deletions(-) delete mode 100644 recipes/qt/5.x.x/patches/107ed30ec5.patch delete mode 100644 recipes/qt/5.x.x/patches/5.15.7-fix-qmake-default-libdirs-apple-clang-15.patch delete mode 100644 recipes/qt/5.x.x/patches/QTBUG-98813.patch delete mode 100644 recipes/qt/5.x.x/patches/d3396fb6fc.patch delete mode 100644 recipes/qt/5.x.x/patches/dece6f5.diff rename recipes/qt/5.x.x/{qtmodules5.15.7.conf => qtmodules5.15.13.conf} (100%) delete mode 100644 recipes/qt/5.x.x/qtmodules5.15.8.conf diff --git a/recipes/qt/5.x.x/conandata.yml b/recipes/qt/5.x.x/conandata.yml index bc095a693b2c9..a8c2e2c8e2a71 100644 --- a/recipes/qt/5.x.x/conandata.yml +++ b/recipes/qt/5.x.x/conandata.yml @@ -1,4 +1,10 @@ sources: + "5.15.13": + url: + - "https://download.qt.io/official_releases/qt/5.15/5.15.13/single/qt-everywhere-opensource-src-5.15.13.tar.xz" + - "https://download.qt.io/archive/qt/5.15/5.15.13/single/qt-everywhere-opensource-src-5.15.13.tar.xz" + - "https://mirrors.cloud.tencent.com/qt/archive/qt/5.15/5.15.13/single/qt-everywhere-opensource-src-5.15.13.tar.xz" + sha256: "9550ec8fc758d3d8d9090e261329700ddcd712e2dda97e5fcfeabfac22bea2ca" "5.15.12": url: - "https://download.qt.io/official_releases/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" @@ -87,21 +93,30 @@ sources: - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" sha256: "26d5f36134db03abe4a6db794c7570d729c92a3fc1b0bf9b1c8f86d0573cd02f" - "5.15.8": - url: - - "https://download.qt.io/archive/qt/5.15/5.15.8/single/qt-everywhere-opensource-src-5.15.8.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/5.15/5.15.8/single/qt-everywhere-opensource-src-5.15.8.tar.xz" - - "https://www.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/5.15/5.15.8/single/qt-everywhere-opensource-src-5.15.8.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/5.15/5.15.8/single/qt-everywhere-opensource-src-5.15.8.tar.xz" - sha256: "776a9302c336671f9406a53bd30b8e36f825742b2ec44a57c08217bff0fa86b9" - "5.15.7": - url: - - "https://download.qt.io/archive/qt/5.15/5.15.7/single/qt-everywhere-opensource-src-5.15.7.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/5.15/5.15.7/single/qt-everywhere-opensource-src-5.15.7.tar.xz" - - "https://www.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/5.15/5.15.7/single/qt-everywhere-opensource-src-5.15.7.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/5.15/5.15.7/single/qt-everywhere-opensource-src-5.15.7.tar.xz" - sha256: "8a71986676a3f37a198a9113acedbfd5bc5606a459b6b85816d951458adbe9a0" patches: + "5.15.13": + - "base_path": "qt5/qtbase" + "patch_file": "patches/aa2a39dea5.diff" + - "base_path": "qt5/qtwebengine" + "patch_file": "patches/c72097e.diff" + - "base_path": "qt5/qttools" + "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/qtbase" + "patch_file": "patches/android-backtrace.diff" + - "base_path": "qt5/qtbase" + "patch_file": "patches/android-openssl.diff" + - "base_path": "qt5/qtbase" + "patch_description": "Fix qmake build with apple-clang>=15" + "patch_file": "patches/5.15.8-fix-qmake-default-libdirs-apple-clang-15.patch" + "patch_source": "https://codereview.qt-project.org/c/qt/qtbase/+/503916" + "patch_type": "portability" + - "base_path": "qt5/qtbase" + "patch_description": "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" + "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" "5.15.12": - "base_path": "qt5/qtbase" "patch_file": "patches/aa2a39dea5.diff" @@ -229,77 +244,3 @@ patches: patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" patch_type: "portability" patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/482392" - "5.15.8": - - patch_file: "patches/aa2a39dea5.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/c72097e.diff" - base_path: "qt5/qtwebengine" - - patch_file: "patches/fix-macdeployqt.diff" - base_path: "qt5/qttools" - - patch_file: "patches/chromium-v8-missing-constexpr.patch" - base_path: "qt5/qtwebengine/src/3rdparty/chromium/v8" - - patch_file: "patches/chromium-skia-missing-iterator-include.patch" - base_path: "qt5/qtwebengine/src/3rdparty" - - patch_file: "patches/skia-cd397f3.diff" - base_path: "qt5/qtwebengine/src/3rdparty/chromium/third_party/skia" - - patch_file: "patches/0001-Find-fontconfig-using-pkg-config.patch" - base_path: "qt5/qtwebengine/src/3rdparty" - - patch_file: "patches/337f28c9ab-5.15.8.patch" - base_path: "qt5/qtbase" - - patch_file: "patches/android-backtrace.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/android-openssl.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/android-new-ndk.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/5.15.8-fix-qmake-default-libdirs-apple-clang-15.patch" - base_path: "qt5/qtbase" - patch_description: "Fix build with apple-clang 15" - patch_type: "portability" - patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" - - patch_file: "patches/5.15.7-fix-macos-cpp-lib-memory-resource.patch" - base_path: "qt5/qtbase" - patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" - patch_type: "portability" - patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/482392" - "5.15.7": - - patch_file: "patches/337f28c9ab.patch" - base_path: "qt5/qtbase" - - patch_file: "patches/aa2a39dea5.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/c72097e.diff" - base_path: "qt5/qtwebengine" - - patch_file: "patches/fix-macdeployqt.diff" - base_path: "qt5/qttools" - - patch_file: "patches/dece6f5.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/QTBUG-98813.patch" - base_path: "qt5/qtwebengine/src/3rdparty" - - patch_file: "patches/d3396fb6fc.patch" - base_path: "qt5/qtwebengine/src/3rdparty" - - patch_file: "patches/107ed30ec5.patch" - base_path: "qt5/qtwebengine/src/3rdparty" - - patch_file: "patches/chromium-v8-missing-constexpr.patch" - base_path: "qt5/qtwebengine/src/3rdparty/chromium/v8" - - patch_file: "patches/chromium-skia-missing-iterator-include.patch" - base_path: "qt5/qtwebengine/src/3rdparty" - - patch_file: "patches/skia-cd397f3.diff" - base_path: "qt5/qtwebengine/src/3rdparty/chromium/third_party/skia" - - patch_file: "patches/0001-Find-fontconfig-using-pkg-config.patch" - base_path: "qt5/qtwebengine/src/3rdparty" - - patch_file: "patches/android-backtrace.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/android-openssl.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/android-new-ndk.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/5.15.7-fix-qmake-default-libdirs-apple-clang-15.patch" - base_path: "qt5/qtbase" - patch_description: "Fix build with apple-clang 15" - patch_type: "portability" - patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" - - patch_file: "patches/5.15.7-fix-macos-cpp-lib-memory-resource.patch" - base_path: "qt5/qtbase" - patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" - patch_type: "portability" - patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/482392" diff --git a/recipes/qt/5.x.x/conanfile.py b/recipes/qt/5.x.x/conanfile.py index c8a423d3f890c..9d4a18d87ad0e 100644 --- a/recipes/qt/5.x.x/conanfile.py +++ b/recipes/qt/5.x.x/conanfile.py @@ -338,9 +338,6 @@ def validate(self): if self.options.with_sqlite3 and not self.dependencies["sqlite3"].options.enable_column_metadata: raise ConanInvalidConfiguration("sqlite3 option enable_column_metadata must be enabled for qt") - if Version(self.version) < "5.15.9" and self.settings.os == "Macos" and self.settings.arch == "armv8": - raise ConanInvalidConfiguration("qt does not support macOS on ARM before 5.15.9 (QTBUG-85279)") - def requirements(self): self.requires("zlib/[>=1.2.11 <2]") if self.options.openssl: @@ -447,6 +444,10 @@ def build_requirements(self): if self.options.qtwayland: self.tool_requires("wayland/") + @property + def angle_path(self): + return os.path.join(self.source_folder, "angle") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True, destination="qt5") @@ -463,6 +464,10 @@ def source(self): ) save(self, os.path.join(self.source_folder, "qt5", "qtbase", "mkspecs", "features", "uikit", "bitcode.prf"), "") + # shorten the path to ANGLE to avoid the following error: + # C:\J2\w\prod-v2\bsr@4\104220\ebfcf\p\qtde01f793a6074\s\qt5\qtbase\src\3rdparty\angle\src\libANGLE\renderer\d3d\d3d11\texture_format_table_autogen.cpp : fatal error C1083: Cannot open compiler generated file: '': Invalid argument + copy(self, "*", os.path.join(self.source_folder, "qt5", "qtbase", "src", "3rdparty", "angle"), self.angle_path) + def generate(self): pc = PkgConfigDeps(self) pc.generate() @@ -475,6 +480,7 @@ def generate(self): vre.generate(scope="build") env = Environment() env.define("MAKEFLAGS", f"j{build_jobs(self)}") + env.define("ANGLE_DIR", self.angle_path) env.prepend_path("PKG_CONFIG_PATH", self.generators_folder) if self.settings.os == "Windows": env.prepend_path("PATH", os.path.join(self.source_folder, "qt5", "gnuwin32", "bin")) diff --git a/recipes/qt/5.x.x/patches/107ed30ec5.patch b/recipes/qt/5.x.x/patches/107ed30ec5.patch deleted file mode 100644 index 3dd48a20a04ce..0000000000000 --- a/recipes/qt/5.x.x/patches/107ed30ec5.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 107ed30ec505f20f166cf7df3b99c5c73a680796 Mon Sep 17 00:00:00 2001 -From: Peter Varga -Date: Fri, 4 Mar 2022 10:42:25 +0100 -Subject: [PATCH] [Backport] Fix for non-constant SIGSTKSZ - -On glibc > 2.33, `SIGSTKSZ` might not be constant (in which case -it expands to a call to `sysconf` which returns a `long int`); see -https://sourceware.org/pipermail/libc-alpha/2020-October/118513.html - -Pass unsigned explicitly to std::max, to avoid relying on template -argument deduction. This works both with the old-style constant -`SIGSTKSZ` and the new configurable one. - -Initially based on https://chromium-review.googlesource.com/c/2776379 - -Change-Id: I2279e8423aa70987ce4537674c7291216d23062f -Review-URL: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3340721 -Reviewed-by: Allan Sandfeld Jensen ---- - .../breakpad/src/client/linux/handler/exception_handler.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc b/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -index ca353c40997..4c73053c513 100644 ---- a/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -+++ b/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() { - // SIGSTKSZ may be too small to prevent the signal handlers from overrunning - // the alternative stack. Ensure that the size of the alternative stack is - // large enough. -- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); -+ static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); - - // Only set an alternative stack if there isn't already one, or if the current - // one is too small. diff --git a/recipes/qt/5.x.x/patches/5.15.7-fix-qmake-default-libdirs-apple-clang-15.patch b/recipes/qt/5.x.x/patches/5.15.7-fix-qmake-default-libdirs-apple-clang-15.patch deleted file mode 100644 index 1f9f0f90f6e5b..0000000000000 --- a/recipes/qt/5.x.x/patches/5.15.7-fix-qmake-default-libdirs-apple-clang-15.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/mkspecs/features/toolchain.prf -+++ b/mkspecs/features/toolchain.prf -@@ -283,9 +283,12 @@ isEmpty($${target_prefix}.INCDIRS) { - } - } - } -- isEmpty(QMAKE_DEFAULT_LIBDIRS)|isEmpty(QMAKE_DEFAULT_INCDIRS): \ -+ isEmpty(QMAKE_DEFAULT_INCDIRS): \ - !integrity: \ -- error("failed to parse default search paths from compiler output") -+ error("failed to parse default include paths from compiler output") -+ isEmpty(QMAKE_DEFAULT_LIBDIRS): \ -+ !integrity:!darwin: \ -+ error("failed to parse default library paths from compiler output") - QMAKE_DEFAULT_LIBDIRS = $$unique(QMAKE_DEFAULT_LIBDIRS) - } else: ghs { - cmd = $$QMAKE_CXX $$QMAKE_CXXFLAGS -$${LITERAL_HASH} -o /tmp/fake_output /tmp/fake_input.cpp -@@ -407,7 +410,7 @@ isEmpty($${target_prefix}.INCDIRS) { - QMAKE_DEFAULT_INCDIRS = $$split(INCLUDE, $$QMAKE_DIRLIST_SEP) - } - -- unix:if(!cross_compile|host_build) { -+ unix:!darwin:if(!cross_compile|host_build) { - isEmpty(QMAKE_DEFAULT_INCDIRS): QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include - isEmpty(QMAKE_DEFAULT_LIBDIRS): QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib - } diff --git a/recipes/qt/5.x.x/patches/QTBUG-98813.patch b/recipes/qt/5.x.x/patches/QTBUG-98813.patch deleted file mode 100644 index c7d6fe522ebcf..0000000000000 --- a/recipes/qt/5.x.x/patches/QTBUG-98813.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 7ff159da128c4f249b468f3ff972f864d243c742 Mon Sep 17 00:00:00 2001 -From: Allan Sandfeld Jensen -Date: Tue, 7 Dec 2021 10:44:51 +0100 -Subject: [PATCH] Try to fix build on Apple Monterey -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -std::basic_string::shrink_to_fit appears to not be inline - -Change-Id: I5bca251bdde433e917879947f97659973c430f54 -Fixes: QTBUG-98813 -Reviewed-by: Peter Varga -Reviewed-by: Allan Sandfeld Jensen -Reviewed-by: Michael Brüning ---- - chromium/base/strings/utf_string_conversions.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/chromium/base/strings/utf_string_conversions.cc b/chromium/base/strings/utf_string_conversions.cc -index 0b55cd9e59d..12ed1f3e010 100644 ---- a/chromium/base/strings/utf_string_conversions.cc -+++ b/chromium/base/strings/utf_string_conversions.cc -@@ -15,6 +15,14 @@ - #include "base/third_party/icu/icu_utf.h" - #include "build/build_config.h" - -+#if defined(OS_MAC) -+namespace std { -+inline namespace __1 { -+template class basic_string; -+} // namespace __1 -+} // namespace std -+#endif // defined(OS_MAC) -+ - namespace base { - - namespace { diff --git a/recipes/qt/5.x.x/patches/d3396fb6fc.patch b/recipes/qt/5.x.x/patches/d3396fb6fc.patch deleted file mode 100644 index 5f832ae4c3873..0000000000000 --- a/recipes/qt/5.x.x/patches/d3396fb6fc.patch +++ /dev/null @@ -1,30 +0,0 @@ -From d3396fb6fcf9e1846de3091ada99284e10e9ee54 Mon Sep 17 00:00:00 2001 -From: Peter Varga -Date: Fri, 10 Dec 2021 14:40:20 +0100 -Subject: [PATCH] [Backport] abseil-cpp: Fixes build with latest glibc - -Fixes https://github.com/abseil/abseil-cpp/issues/952 - -This fix is extracted from: -https://github.com/abseil/abseil-cpp/commit/a9831f1cbf93fb18dd951453635f488037454ce9 - -Change-Id: I337c8c900ef569853046bb9adc3807a3ed12b13b -Reviewed-by: Allan Sandfeld Jensen ---- - .../abseil-cpp/absl/debugging/failure_signal_handler.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc b/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc -index 5d13bdbbbd1..2ed137b58f1 100644 ---- a/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc -+++ b/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc -@@ -135,7 +135,8 @@ static bool SetupAlternateStackOnce() { - #else - const size_t page_mask = sysconf(_SC_PAGESIZE) - 1; - #endif -- size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; -+ size_t stack_size = -+ (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; - #if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \ - defined(ABSL_HAVE_MEMORY_SANITIZER) || defined(ABSL_HAVE_THREAD_SANITIZER) - // Account for sanitizer instrumentation requiring additional stack space. diff --git a/recipes/qt/5.x.x/patches/dece6f5.diff b/recipes/qt/5.x.x/patches/dece6f5.diff deleted file mode 100644 index cd70c3d8f67ab..0000000000000 --- a/recipes/qt/5.x.x/patches/dece6f5.diff +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h b/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h -index e070ba977d..35a62f59e3 100644 ---- a/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h -+++ b/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h -@@ -43,6 +43,9 @@ - #include - #include - -+ -+#include -+ - QT_BEGIN_NAMESPACE - - class QIOSurfaceGraphicsBuffer : public QPlatformGraphicsBuffer diff --git a/recipes/qt/5.x.x/qtmodules5.15.7.conf b/recipes/qt/5.x.x/qtmodules5.15.13.conf similarity index 100% rename from recipes/qt/5.x.x/qtmodules5.15.7.conf rename to recipes/qt/5.x.x/qtmodules5.15.13.conf diff --git a/recipes/qt/5.x.x/qtmodules5.15.8.conf b/recipes/qt/5.x.x/qtmodules5.15.8.conf deleted file mode 100644 index 452233655f279..0000000000000 --- a/recipes/qt/5.x.x/qtmodules5.15.8.conf +++ /dev/null @@ -1,326 +0,0 @@ -[submodule "qtbase"] - path = qtbase - url = ../qtbase.git - branch = 5.15 - status = essential -[submodule "qtsvg"] - depends = qtbase - path = qtsvg - url = ../qtsvg.git - branch = 5.15 - status = addon -[submodule "qtdeclarative"] - depends = qtbase - recommends = qtsvg - path = qtdeclarative - url = ../qtdeclarative.git - branch = 5.15 - status = essential -[submodule "qtactiveqt"] - depends = qtbase - path = qtactiveqt - url = ../qtactiveqt.git - branch = 5.15 - status = addon -[submodule "qtscript"] - depends = qtbase - recommends = qttools - path = qtscript - url = ../qtscript.git - branch = 5.15 - status = deprecated -[submodule "qtmultimedia"] - depends = qtbase - recommends = qtdeclarative - path = qtmultimedia - url = ../qtmultimedia.git - branch = 5.15 - status = essential -[submodule "qttools"] - depends = qtbase - recommends = qtdeclarative qtactiveqt - path = qttools - url = ../qttools.git - branch = 5.15 - status = essential -[submodule "qtxmlpatterns"] - depends = qtbase - recommends = qtdeclarative - path = qtxmlpatterns - url = ../qtxmlpatterns.git - branch = 5.15 - status = deprecated -[submodule "qttranslations"] - depends = qttools - path = qttranslations - url = ../qttranslations.git - branch = 5.15 - status = essential - priority = 30 -[submodule "qtdoc"] - depends = qtdeclarative qttools - recommends = qtmultimedia qtquickcontrols qtquickcontrols2 - path = qtdoc - url = ../qtdoc.git - branch = 5.15 - status = essential - priority = 40 -[submodule "qtrepotools"] - path = qtrepotools - url = ../qtrepotools.git - branch = master - status = essential - project = - -[submodule "qtqa"] - depends = qtbase - path = qtqa - url = ../qtqa.git - branch = master - status = essential - priority = 50 -[submodule "qtlocation"] - depends = qtbase - recommends = qtdeclarative qtquickcontrols qtquickcontrols2 qtserialport - path = qtlocation - url = ../qtlocation.git - branch = 5.15 - status = addon -[submodule "qtsensors"] - depends = qtbase - recommends = qtdeclarative - path = qtsensors - url = ../qtsensors.git - branch = 5.15 - status = addon -[submodule "qtsystems"] - depends = qtbase - recommends = qtdeclarative - path = qtsystems - url = ../qtsystems.git - branch = dev - status = ignore -[submodule "qtfeedback"] - depends = qtdeclarative - recommends = qtmultimedia - path = qtfeedback - url = ../qtfeedback.git - branch = master - status = ignore -[submodule "qtdocgallery"] - depends = qtdeclarative - path = qtdocgallery - url = ../qtdocgallery.git - branch = master - status = ignore -[submodule "qtpim"] - depends = qtdeclarative - path = qtpim - url = ../qtpim.git - branch = dev - status = ignore -[submodule "qtconnectivity"] - depends = qtbase - recommends = qtdeclarative qtandroidextras - path = qtconnectivity - url = ../qtconnectivity.git - branch = 5.15 - status = addon -[submodule "qtwayland"] - depends = qtbase - recommends = qtdeclarative - path = qtwayland - url = ../qtwayland.git - branch = 5.15 - status = addon -[submodule "qt3d"] - depends = qtbase - recommends = qtdeclarative qtimageformats qtgamepad - path = qt3d - url = ../qt3d.git - branch = 5.15 - status = addon -[submodule "qtimageformats"] - depends = qtbase - path = qtimageformats - url = ../qtimageformats.git - branch = 5.15 - status = addon -[submodule "qtgraphicaleffects"] - depends = qtdeclarative - path = qtgraphicaleffects - url = ../qtgraphicaleffects.git - branch = 5.15 - status = essential -[submodule "qtquickcontrols"] - depends = qtdeclarative - recommends = qtgraphicaleffects - path = qtquickcontrols - url = ../qtquickcontrols.git - branch = 5.15 - status = addon -[submodule "qtserialbus"] - depends = qtbase - recommends = qtserialport - path = qtserialbus - url = ../qtserialbus.git - branch = 5.15 - status = addon -[submodule "qtserialport"] - depends = qtbase - path = qtserialport - url = ../qtserialport.git - branch = 5.15 - status = addon -[submodule "qtx11extras"] - depends = qtbase - path = qtx11extras - url = ../qtx11extras.git - branch = 5.15 - status = addon -[submodule "qtmacextras"] - depends = qtbase - path = qtmacextras - url = ../qtmacextras.git - branch = 5.15 - status = addon -[submodule "qtwinextras"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtwinextras - url = ../qtwinextras.git - branch = 5.15 - status = addon -[submodule "qtandroidextras"] - depends = qtbase - path = qtandroidextras - url = ../qtandroidextras.git - branch = 5.15 - status = addon -[submodule "qtwebsockets"] - depends = qtbase - recommends = qtdeclarative - path = qtwebsockets - url = ../qtwebsockets.git - branch = 5.15 - status = addon -[submodule "qtwebchannel"] - depends = qtbase - recommends = qtdeclarative qtwebsockets - path = qtwebchannel - url = ../qtwebchannel.git - branch = 5.15 - status = addon -[submodule "qtwebengine"] - depends = qtdeclarative - recommends = qtquickcontrols qtquickcontrols2 qtlocation qtwebchannel qttools - path = qtwebengine - url = ../qtwebengine.git - branch = 5.15 - status = addon - priority = 10 -[submodule "qtcanvas3d"] - depends = qtdeclarative - path = qtcanvas3d - url = ../qtcanvas3d.git - branch = dev - status = ignore -[submodule "qtwebview"] - depends = qtdeclarative - recommends = qtwebengine - path = qtwebview - url = ../qtwebview.git - branch = 5.15 - status = addon -[submodule "qtquickcontrols2"] - depends = qtgraphicaleffects - recommends = qtimageformats - path = qtquickcontrols2 - url = ../qtquickcontrols2.git - branch = 5.15 - status = essential -[submodule "qtpurchasing"] - depends = qtbase - recommends = qtdeclarative qtandroidextras - path = qtpurchasing - url = ../qtpurchasing.git - branch = 5.15 - status = addon -[submodule "qtcharts"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtcharts - url = ../qtcharts.git - branch = 5.15 - status = addon -[submodule "qtdatavis3d"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtdatavis3d - url = ../qtdatavis3d.git - branch = 5.15 - status = addon -[submodule "qtvirtualkeyboard"] - depends = qtbase qtdeclarative qtsvg - recommends = qtmultimedia qtquickcontrols - path = qtvirtualkeyboard - url = ../qtvirtualkeyboard.git - branch = 5.15 - status = addon -[submodule "qtgamepad"] - depends = qtbase - recommends = qtdeclarative - path = qtgamepad - url = ../qtgamepad.git - branch = 5.15 - status = addon -[submodule "qtscxml"] - depends = qtbase qtdeclarative - path = qtscxml - url = ../qtscxml.git - branch = 5.15 - status = addon -[submodule "qtspeech"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtspeech - url = ../qtspeech.git - branch = 5.15 - status = addon -[submodule "qtnetworkauth"] - depends = qtbase - path = qtnetworkauth - url = ../qtnetworkauth.git - branch = 5.15 - status = addon -[submodule "qtremoteobjects"] - depends = qtbase - recommends = qtdeclarative - path = qtremoteobjects - url = ../qtremoteobjects.git - branch = 5.15 - status = addon -[submodule "qtwebglplugin"] - depends = qtbase qtwebsockets - recommends = qtdeclarative - path = qtwebglplugin - url = ../qtwebglplugin.git - branch = 5.15 - status = addon -[submodule "qtlottie"] - depends = qtbase qtdeclarative - path = qtlottie - url = ../qtlottie.git - branch = 5.15 - status = addon -[submodule "qtquicktimeline"] - depends = qtbase qtdeclarative - path = qtquicktimeline - url = ../qtquicktimeline - branch = 5.15 - status = addon -[submodule "qtquick3d"] - depends = qtbase qtdeclarative - path = qtquick3d - url = ../qtquick3d.git - branch = 5.15 - status = addon diff --git a/recipes/qt/config.yml b/recipes/qt/config.yml index a0204ce95e6fc..026f022cea5e2 100644 --- a/recipes/qt/config.yml +++ b/recipes/qt/config.yml @@ -11,6 +11,8 @@ versions: folder: 6.x.x "6.3.2": folder: 6.x.x + "5.15.13": + folder: 5.x.x "5.15.12": folder: 5.x.x "5.15.11": @@ -19,7 +21,3 @@ versions: folder: 5.x.x "5.15.9": folder: 5.x.x - "5.15.8": - folder: 5.x.x - "5.15.7": - folder: 5.x.x From 8c4c61470af4f78e79e9253229a6cfbe3ac87f57 Mon Sep 17 00:00:00 2001 From: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com> Date: Mon, 18 Mar 2024 04:47:17 -0500 Subject: [PATCH 256/405] (#23119) cpptrace: add 0.5.0 --- recipes/cpptrace/all/conandata.yml | 4 ++++ recipes/cpptrace/config.yml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/recipes/cpptrace/all/conandata.yml b/recipes/cpptrace/all/conandata.yml index 7ebcd5c89c321..3c8c1e7ad8901 100644 --- a/recipes/cpptrace/all/conandata.yml +++ b/recipes/cpptrace/all/conandata.yml @@ -1,5 +1,9 @@ sources: # Newer versions at the top + "0.5.0": + url: + - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.5.0.tar.gz" + sha256: "dc034503aed3009618312c42c40e1f80bf14d4148c9bc8b3ea02cf971459120e" "0.4.1": url: - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.4.1.tar.gz" diff --git a/recipes/cpptrace/config.yml b/recipes/cpptrace/config.yml index a7ff5173cbbfa..1be32f1ad9626 100644 --- a/recipes/cpptrace/config.yml +++ b/recipes/cpptrace/config.yml @@ -1,5 +1,7 @@ versions: # Newer versions at the top + "0.5.0": + folder: all "0.4.1": folder: all "0.4.0": From ae76e2ae44bae9f7af947e5ec6aab5408ee03d09 Mon Sep 17 00:00:00 2001 From: Marian Klymov Date: Mon, 18 Mar 2024 14:28:10 +0200 Subject: [PATCH 257/405] (#23099) expat: add 2.6.2 and remove several old versions * expat: add 2.6.2 and remove several old versions * Remove 2.4.1 Co-authored-by: Uilian Ries --------- Co-authored-by: Uilian Ries --- recipes/expat/all/conandata.yml | 27 +++------------------------ recipes/expat/config.yml | 16 +--------------- 2 files changed, 4 insertions(+), 39 deletions(-) diff --git a/recipes/expat/all/conandata.yml b/recipes/expat/all/conandata.yml index e8f35976ab73d..f010a588a6317 100644 --- a/recipes/expat/all/conandata.yml +++ b/recipes/expat/all/conandata.yml @@ -1,7 +1,7 @@ sources: - "2.6.1": - url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_1/expat-2.6.1.tar.xz" - sha256: "0c00d2760ad12efef6e26efc8b363c8eb28eb8c8de719e46d5bb67b40ba904a3" + "2.6.2": + url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_2/expat-2.6.2.tar.xz" + sha256: "ee14b4c5d8908b1bec37ad937607eab183d4d9806a08adee472c3c3121d27364" "2.6.0": url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_0/expat-2.6.0.tar.xz" sha256: "cb5f5a8ea211e1cabd59be0a933a52e3c02cc326e86a4d387d8d218e7ee47a3e" @@ -14,27 +14,6 @@ sources: "2.4.8": sha256: "f79b8f904b749e3e0d20afeadecf8249c55b2e32d4ebb089ae378df479dcaf25" url: "https://github.com/libexpat/libexpat/releases/download/R_2_4_8/expat-2.4.8.tar.xz" - "2.4.7": - sha256: "9875621085300591f1e64c18fd3da3a0eeca4a74f884b9abac2758ad1bd07a7d" - url: "https://github.com/libexpat/libexpat/releases/download/R_2_4_7/expat-2.4.7.tar.xz" - "2.4.6": - sha256: "de55794b7a9bc214852fdc075beaaecd854efe1361597e6268ee87946951289b" - url: "https://github.com/libexpat/libexpat/releases/download/R_2_4_6/expat-2.4.6.tar.xz" - "2.4.5": - sha256: "f2af8fc7cdc63a87920da38cd6d12cb113c3c3a3f437495b1b6541e0cff32579" - url: "https://github.com/libexpat/libexpat/releases/download/R_2_4_5/expat-2.4.5.tar.xz" - "2.4.4": - sha256: "b5d25d6e373351c2ed19b562b4732d01d2589ac8c8e9e7962d8df1207cc311b8" - url: "https://github.com/libexpat/libexpat/releases/download/R_2_4_4/expat-2.4.4.tar.xz" - "2.4.3": - sha256: "b1f9f1b1a5ebb0acaa88c9ff79bfa4e145823b78aa5185e5c5d85f060824778a" - url: "https://github.com/libexpat/libexpat/releases/download/R_2_4_3/expat-2.4.3.tar.xz" - "2.4.2": - sha256: "a2fb692e8e610406168296f25ba500ae8ce22cb4c8947a8689894d744b6deb02" - url: "https://github.com/libexpat/libexpat/releases/download/R_2_4_2/expat-2.4.2.tar.gz" - "2.4.1": - sha256: "a00ae8a6b96b63a3910ddc1100b1a7ef50dc26dceb65ced18ded31ab392f132b" - url: "https://github.com/libexpat/libexpat/releases/download/R_2_4_1/expat-2.4.1.tar.gz" "2.3.0": sha256: "89df123c62f2c2e2b235692d9fe76def6a9ab03dbe95835345bf412726eb1987" url: "https://github.com/libexpat/libexpat/releases/download/R_2_3_0/expat-2.3.0.tar.gz" diff --git a/recipes/expat/config.yml b/recipes/expat/config.yml index b9184b42c3bb5..ee86cf4cc73ee 100644 --- a/recipes/expat/config.yml +++ b/recipes/expat/config.yml @@ -1,5 +1,5 @@ versions: - "2.6.1": + "2.6.2": folder: all "2.6.0": folder: all @@ -9,20 +9,6 @@ versions: folder: all "2.4.8": folder: all - "2.4.7": - folder: all - "2.4.6": - folder: all - "2.4.5": - folder: all - "2.4.4": - folder: all - "2.4.3": - folder: all - "2.4.2": - folder: all - "2.4.1": - folder: all "2.3.0": folder: all "2.2.10": From 2ba975b0faffb580202bbb1b233705f738e852f1 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 18 Mar 2024 21:47:40 +0900 Subject: [PATCH 258/405] (#23115) iguana: add recipe * iguana: add recipe * drop apple-clang/13 --- recipes/iguana/all/conandata.yml | 4 + recipes/iguana/all/conanfile.py | 78 ++++++++++++++++++ .../iguana/all/test_package/CMakeLists.txt | 8 ++ recipes/iguana/all/test_package/conanfile.py | 26 ++++++ .../iguana/all/test_package/test_package.cpp | 81 +++++++++++++++++++ recipes/iguana/config.yml | 3 + 6 files changed, 200 insertions(+) create mode 100644 recipes/iguana/all/conandata.yml create mode 100644 recipes/iguana/all/conanfile.py create mode 100644 recipes/iguana/all/test_package/CMakeLists.txt create mode 100644 recipes/iguana/all/test_package/conanfile.py create mode 100644 recipes/iguana/all/test_package/test_package.cpp create mode 100644 recipes/iguana/config.yml diff --git a/recipes/iguana/all/conandata.yml b/recipes/iguana/all/conandata.yml new file mode 100644 index 0000000000000..48d127d2fc21f --- /dev/null +++ b/recipes/iguana/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.3": + url: "https://github.com/qicosmos/iguana/archive/refs/tags/v1.0.3.tar.gz" + sha256: "7dcb21a36bd64a63a9ea857f3563ac61e965c49ec60ad7b99a2bfb9192f3e4c3" diff --git a/recipes/iguana/all/conanfile.py b/recipes/iguana/all/conanfile.py new file mode 100644 index 0000000000000..4bbd7a9302f02 --- /dev/null +++ b/recipes/iguana/all/conanfile.py @@ -0,0 +1,78 @@ +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 IguanaConan(ConanFile): + name = "iguana" + description = "universal serialization engine" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/qicosmos/iguana" + topics = ("serialization", "json", "xml", "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 requirements(self): + self.requires("frozen/1.1.1", transitive_headers=True) + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + 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, + "*.h", + os.path.join(self.source_folder, "iguana"), + os.path.join(self.package_folder, "include", "iguana"), + ) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "iguana"), + os.path.join(self.package_folder, "include", "iguana"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("pthread") + self.cpp_info.system_libs.append("dl") diff --git a/recipes/iguana/all/test_package/CMakeLists.txt b/recipes/iguana/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..96ed5d3dde518 --- /dev/null +++ b/recipes/iguana/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(iguana REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE iguana::iguana) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/iguana/all/test_package/conanfile.py b/recipes/iguana/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/iguana/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/iguana/all/test_package/test_package.cpp b/recipes/iguana/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..f97e8fb335c14 --- /dev/null +++ b/recipes/iguana/all/test_package/test_package.cpp @@ -0,0 +1,81 @@ +#include +#include + +namespace client { +struct person { + std::string name; + int64_t age; +}; + +REFLECTION(person, name, age); +} // namespace client + +struct MyStruct { + uint64_t a; +}; +REFLECTION(MyStruct, a); + +struct student { + int id; + std::string name; + int age; +}; +REFLECTION(student, id, name, age); + +void test() { + MyStruct p = {5566777755311}; + iguana::string_stream ss; + iguana::to_json(p, ss); + + MyStruct p2; + iguana::from_json(p2, ss); + std::cout << p2.a << std::endl; +} + +void test_v() { + client::person p1 = {"tom", 20}; + client::person p2 = {"jack", 19}; + client::person p3 = {"mike", 21}; + + std::vector v{p1, p2, p3}; + iguana::string_stream ss; + iguana::to_json(v, ss); + std::cout << ss << std::endl; + + std::vector v1; + iguana::from_json(v1, ss); +} + +void test_disorder() { + student s{1, "tom", 20}; + iguana::string_stream ss; + iguana::to_json(s, ss); + std::cout << ss << std::endl; + + student s1{}; + std::string str = "{\"name\":\"tom\",\"id\":1,\"age\":20}"; + iguana::from_json(s1, str.data(), str.length()); + std::string str1 = "{\"name\":\"tom\",\"age\":20,\"id\":1}"; + iguana::from_json(s1, str1.data(), str1.length()); + + std::string str2 = "{ \"id\":1,\"name\" : \"madoka\",\"age\" : 27 }"; + iguana::from_json(s1, str2.data(), str2.length()); +} + +int main(void) { + test_disorder(); + test_v(); + test(); + client::person p = {"zombie chow", -311}; + iguana::string_stream ss; + iguana::to_json(p, ss); + + std::cout << ss << std::endl; + client::person p2; + + iguana::from_json(p2, ss.data(), ss.length()); + + std::cout << p2.name << " - " << p2.age << std::endl; + + return 0; +} diff --git a/recipes/iguana/config.yml b/recipes/iguana/config.yml new file mode 100644 index 0000000000000..372dd1cb646bd --- /dev/null +++ b/recipes/iguana/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.3": + folder: all From 6b4b3977ed40145eab326145f14862c2365fe220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Mon, 18 Mar 2024 16:02:21 +0100 Subject: [PATCH 259/405] (#23078) tensorflow: Fix 2.12.0 URL * Inital fix for tensorflow 2.12 * Import version header * Fix version import missing header * Initial fxdiv support from CCI, still need to patch and pthreadpool * add telemetry to sources * wip * wip * wip --------- Co-authored-by: czoido --- recipes/tensorflow-lite/all/conandata.yml | 17 +-- recipes/tensorflow-lite/all/conanfile.py | 10 +- ...move_simple_memory_arena_debug_dump.patch} | 0 ...> 2.10.0-0002-disable_fetch_content.patch} | 0 ...=> 2.10.0-0003-use-cci-dependencies.patch} | 0 ...emove_simple_memory_arena_debug_dump.patch | 21 ++++ .../2.12.0-0002-disable-fetch-content.patch | 23 ++++ .../2.12.0-0003-use-cci-dependencies.patch | 103 ++++++++++++++++++ .../all/test_package/test_package.cpp | 2 + 9 files changed, 167 insertions(+), 9 deletions(-) rename recipes/tensorflow-lite/all/patches/{remove_simple_memory_arena_debug_dump.patch => 2.10.0-0001-remove_simple_memory_arena_debug_dump.patch} (100%) rename recipes/tensorflow-lite/all/patches/{disable_fetch_content.patch => 2.10.0-0002-disable_fetch_content.patch} (100%) rename recipes/tensorflow-lite/all/patches/{dependencies_2_10.patch => 2.10.0-0003-use-cci-dependencies.patch} (100%) create mode 100644 recipes/tensorflow-lite/all/patches/2.12.0-0001-remove_simple_memory_arena_debug_dump.patch create mode 100644 recipes/tensorflow-lite/all/patches/2.12.0-0002-disable-fetch-content.patch create mode 100644 recipes/tensorflow-lite/all/patches/2.12.0-0003-use-cci-dependencies.patch diff --git a/recipes/tensorflow-lite/all/conandata.yml b/recipes/tensorflow-lite/all/conandata.yml index 4727adcc61017..c5076017657c5 100644 --- a/recipes/tensorflow-lite/all/conandata.yml +++ b/recipes/tensorflow-lite/all/conandata.yml @@ -1,26 +1,27 @@ sources: "2.12.0": - url: "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.10.0.tar.gz" - sha256: "b5a1bb04c84b6fe1538377e5a1f649bb5d5f0b2e3625a3c526ff3a8af88633e8" + url: "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.12.0.tar.gz" + sha256: "c030cb1905bff1d2446615992aad8d8d85cbe90c4fb625cee458c63bf466bc8e" "2.10.0": url: "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.10.0.tar.gz" sha256: "b5a1bb04c84b6fe1538377e5a1f649bb5d5f0b2e3625a3c526ff3a8af88633e8" patches: "2.12.0": - - patch_file: "patches/remove_simple_memory_arena_debug_dump.patch" + - 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." - - patch_file: "patches/disable_fetch_content.patch" + patch_type: "conan" + - patch_file: "patches/2.12.0-0002-disable-fetch-content.patch" patch_description: "Fail if the CMake build script tries to fetch external dependencies" patch_type: "conan" - - patch_file: "patches/dependencies_2_10.patch" + - 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" "2.10.0": - - patch_file: "patches/remove_simple_memory_arena_debug_dump.patch" + - 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." - - patch_file: "patches/disable_fetch_content.patch" + - patch_file: "patches/2.10.0-0002-disable_fetch_content.patch" patch_description: "Fail if the CMake build script tries to fetch external dependencies" patch_type: "conan" - - patch_file: "patches/dependencies_2_10.patch" + - 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" diff --git a/recipes/tensorflow-lite/all/conanfile.py b/recipes/tensorflow-lite/all/conanfile.py index 7a430b9baca1a..0ad39bb09b0e6 100644 --- a/recipes/tensorflow-lite/all/conanfile.py +++ b/recipes/tensorflow-lite/all/conanfile.py @@ -1,9 +1,10 @@ +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, CMakeDeps, cmake_layout from conan.tools.env import VirtualBuildEnv -from conan.tools.files import get, save, copy, export_conandata_patches, apply_conandata_patches +from conan.tools.files import get, save, copy, export_conandata_patches, apply_conandata_patches, replace_in_file from conan.tools.scm import Version from os.path import join import textwrap @@ -72,6 +73,10 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") + @property + def _needs_fxdiv(self): + return Version(self.version) >= "2.12.0" + def requirements(self): self.requires("abseil/20230125.3") self.requires("eigen/3.4.0") @@ -88,6 +93,8 @@ def requirements(self): self.requires("pthreadpool/cci.20231129") if self.options.with_xnnpack or self.options.get_safe("with_nnapi", False): self.requires("fp16/cci.20210320") + if self._needs_fxdiv: + self.requires("fxdiv/cci.20200417") def validate(self): if self.settings.get_safe("compiler.cppstd"): @@ -151,6 +158,7 @@ def _module_file(self): 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")) diff --git a/recipes/tensorflow-lite/all/patches/remove_simple_memory_arena_debug_dump.patch b/recipes/tensorflow-lite/all/patches/2.10.0-0001-remove_simple_memory_arena_debug_dump.patch similarity index 100% rename from recipes/tensorflow-lite/all/patches/remove_simple_memory_arena_debug_dump.patch rename to recipes/tensorflow-lite/all/patches/2.10.0-0001-remove_simple_memory_arena_debug_dump.patch diff --git a/recipes/tensorflow-lite/all/patches/disable_fetch_content.patch b/recipes/tensorflow-lite/all/patches/2.10.0-0002-disable_fetch_content.patch similarity index 100% rename from recipes/tensorflow-lite/all/patches/disable_fetch_content.patch rename to recipes/tensorflow-lite/all/patches/2.10.0-0002-disable_fetch_content.patch diff --git a/recipes/tensorflow-lite/all/patches/dependencies_2_10.patch b/recipes/tensorflow-lite/all/patches/2.10.0-0003-use-cci-dependencies.patch similarity index 100% rename from recipes/tensorflow-lite/all/patches/dependencies_2_10.patch rename to recipes/tensorflow-lite/all/patches/2.10.0-0003-use-cci-dependencies.patch diff --git a/recipes/tensorflow-lite/all/patches/2.12.0-0001-remove_simple_memory_arena_debug_dump.patch b/recipes/tensorflow-lite/all/patches/2.12.0-0001-remove_simple_memory_arena_debug_dump.patch new file mode 100644 index 0000000000000..7347da947b777 --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.12.0-0001-remove_simple_memory_arena_debug_dump.patch @@ -0,0 +1,21 @@ +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index c71a392..7260efe 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -221,6 +221,9 @@ if(CMAKE_SYSTEM_NAME MATCHES "Android") + endif() + # Build a list of source files to compile into the TF Lite library. + populate_tflite_source_vars("." TFLITE_SRCS) ++if(CMAKE_SYSTEM_NAME MATCHES "Windows" AND BUILD_SHARED_LIBS) ++ list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*simple_memory_arena_debug_dump\\.cc$") ++endif() + + # This particular file is excluded because the more explicit approach to enable + # XNNPACK delegate is preferred to the weak-symbol one. +@@ -654,4 +657,4 @@ target_link_libraries(_pywrap_tensorflow_interpreter_wrapper + target_compile_options(_pywrap_tensorflow_interpreter_wrapper + PUBLIC ${TFLITE_TARGET_PUBLIC_OPTIONS} + PRIVATE ${TFLITE_TARGET_PRIVATE_OPTIONS} +-) +\ No newline at end of file ++) diff --git a/recipes/tensorflow-lite/all/patches/2.12.0-0002-disable-fetch-content.patch b/recipes/tensorflow-lite/all/patches/2.12.0-0002-disable-fetch-content.patch new file mode 100644 index 0000000000000..3e5227f425d87 --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.12.0-0002-disable-fetch-content.patch @@ -0,0 +1,23 @@ +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index 24b8265..7260efe 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -657,4 +657,4 @@ target_link_libraries(_pywrap_tensorflow_interpreter_wrapper + target_compile_options(_pywrap_tensorflow_interpreter_wrapper + PUBLIC ${TFLITE_TARGET_PUBLIC_OPTIONS} + PRIVATE ${TFLITE_TARGET_PRIVATE_OPTIONS} +-) +\ No newline at end of file ++) +diff --git a/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake b/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake +index 9ed9510..4a6a45d 100644 +--- a/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake ++++ b/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake +@@ -251,6 +251,7 @@ function(OverridableFetchContent_Declare CONTENT_NAME) + URL_HASH + URL_MD5 + ) ++ message(FATAL_ERROR "OverridableFetchContent_Declare called by ${CONTENT_NAME}! Failing build.") + set(ALL_VALUE_ARGS LICENSE_FILE LICENSE_URL ${OVERRIDABLE_ARGS}) + cmake_parse_arguments(ARGS + "" diff --git a/recipes/tensorflow-lite/all/patches/2.12.0-0003-use-cci-dependencies.patch b/recipes/tensorflow-lite/all/patches/2.12.0-0003-use-cci-dependencies.patch new file mode 100644 index 0000000000000..669ae2418a34e --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.12.0-0003-use-cci-dependencies.patch @@ -0,0 +1,103 @@ +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index 24b8265..9e0d1e0 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -142,31 +142,16 @@ + 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) +-find_package(NEON_2_SSE REQUIRED) + find_package(cpuinfo REQUIRED) #CPUINFO is used by XNNPACK and RUY library + find_package(ruy REQUIRED) +-# Download necessary dependencies. +-# Download pthreadpool source package if it doesn't exist. +-if(NOT DEFINED PTHREADPOOL_SOURCE_DIR) +- message(STATUS "Downloading pthreadpool to ${CMAKE_BINARY_DIR}/pthreadpool-source (define PTHREADPOOL_SOURCE_DIR to avoid it)") +- configure_file(cmake/DownloadPThreadPool.cmake "${CMAKE_BINARY_DIR}/pthreadpool-download/CMakeLists.txt") +- execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/pthreadpool-download") +- execute_process(COMMAND "${CMAKE_COMMAND}" --build . +- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/pthreadpool-download") +- set(PTHREADPOOL_SOURCE_DIR "${CMAKE_BINARY_DIR}/pthreadpool-source" CACHE STRING "pthreadpool source directory") +-endif() +-# Configure pthreadpool +-if(NOT TARGET pthreadpool) +- set(PTHREADPOOL_BUILD_TESTS OFF CACHE BOOL "") +- set(PTHREADPOOL_BUILD_BENCHMARKS OFF CACHE BOOL "") +- set(PTHREADPOOL_ALLOW_DEPRECATED_API OFF CACHE BOOL "") +- add_subdirectory( +- "${PTHREADPOOL_SOURCE_DIR}" +- "${CMAKE_BINARY_DIR}/pthreadpool") ++ ++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$") +@@ -180,6 +165,10 @@ + set(TFLITE_TARGET_PRIVATE_DEFINITIONS "") + # Additional library dependencies based upon enabled features. + set(TFLITE_TARGET_DEPENDENCIES "") ++if (NOT CMAKE_SYSTEM_PROCESSOR OR CMAKE_SYSTEM_PROCESSOR MATCHES "x86") ++ find_package(NEON_2_SSE REQUIRED) ++ list(APPEND TFLITE_TARGET_DEPENDENCIES NEON_2_SSE::NEON_2_SSE) ++endif() + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang$") + # TFLite uses deprecated methods in neon2sse which generates a huge number of + # warnings so surpress these until they're fixed. +@@ -429,13 +418,14 @@ + endif() + if(TFLITE_ENABLE_XNNPACK) + find_package(fp16_headers REQUIRED) +- find_package(XNNPACK REQUIRED) ++ find_package(xnnpack REQUIRED) ++ find_package(pthreadpool 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() +@@ -492,6 +482,7 @@ + TFLITE_KERNEL_INTERNAL_REF_SPARSE_OPS_SRCS + ) + set(TFLITE_PROFILER_SRCS ++${TFLITE_SOURCE_DIR}/profiling/telemetry/telemetry.cc + ${TFLITE_SOURCE_DIR}/profiling/platform_profiler.cc + ${TFLITE_SOURCE_DIR}/profiling/root_profiler.h + ${TFLITE_SOURCE_DIR}/profiling/root_profiler.cc +@@ -555,19 +546,18 @@ + target_link_libraries(tensorflow-lite + PUBLIC + Eigen3::Eigen +- NEON_2_SSE::NEON_2_SSE + absl::flags + absl::hash + absl::status + absl::strings + absl::synchronization + absl::variant +- farmhash +- fft2d_fftsg2d +- flatbuffers::flatbuffers +- gemmlowp ++ 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/all/test_package/test_package.cpp b/recipes/tensorflow-lite/all/test_package/test_package.cpp index 4a4921bbf217f..954d81537da3f 100644 --- a/recipes/tensorflow-lite/all/test_package/test_package.cpp +++ b/recipes/tensorflow-lite/all/test_package/test_package.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -12,6 +13,7 @@ int main(int argc, char * argv[]) { std::cerr << "Pass model file path as argument" << std::endl; return -1; } + std::cout << "Using TensorFlow Lite version " << TFLITE_VERSION_STRING << std::endl; auto model = tflite::FlatBufferModel::BuildFromFile(argv[1]); if (!model) { throw std::runtime_error("Failed to load TFLite model"); From 494327197b35b85a77fb229c8cd43df211736288 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 19 Mar 2024 00:50:13 +0900 Subject: [PATCH 260/405] (#23161) flatbuffers: add version 24.3.7 --- recipes/flatbuffers/all/conandata.yml | 3 +++ recipes/flatbuffers/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/flatbuffers/all/conandata.yml b/recipes/flatbuffers/all/conandata.yml index bff177589ebd1..0cb168b6cedaa 100644 --- a/recipes/flatbuffers/all/conandata.yml +++ b/recipes/flatbuffers/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "24.3.7": + url: "https://github.com/google/flatbuffers/archive/v24.3.7.tar.gz" + sha256: "bfff9d2150fcff88f844e8c608b02b2a0e94c92aea39b04c0624783464304784" "23.5.26": url: "https://github.com/google/flatbuffers/archive/v23.5.26.tar.gz" sha256: "1cce06b17cddd896b6d73cc047e36a254fb8df4d7ea18a46acf16c4c0cd3f3f3" diff --git a/recipes/flatbuffers/config.yml b/recipes/flatbuffers/config.yml index 58021445a86c5..7828770c7bd8a 100644 --- a/recipes/flatbuffers/config.yml +++ b/recipes/flatbuffers/config.yml @@ -1,4 +1,6 @@ versions: + "24.3.7": + folder: all "23.5.26": folder: all "23.3.3": From fcb7405f1e141590b220d11bd216ef34d1fd6556 Mon Sep 17 00:00:00 2001 From: jsinge Date: Mon, 18 Mar 2024 17:49:10 +0100 Subject: [PATCH 261/405] (#23107) libvips: add v8.15.2 --- recipes/libvips/all/conandata.yml | 3 +++ recipes/libvips/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/libvips/all/conandata.yml b/recipes/libvips/all/conandata.yml index 3a7a741fa16ea..ebae63c90e5b2 100644 --- a/recipes/libvips/all/conandata.yml +++ b/recipes/libvips/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "8.15.2": + url: "https://github.com/libvips/libvips/releases/download/v8.15.2a/vips-8.15.2.tar.xz" + sha256: "a2ab15946776ca7721d11cae3215f20f1f097b370ff580cd44fc0f19387aee84" "8.15.1": url: "https://github.com/libvips/libvips/releases/download/v8.15.1/vips-8.15.1.tar.xz" sha256: "06811f5aed3e7bc03e63d05537ff4b501de5283108c8ee79396c60601a00830c" diff --git a/recipes/libvips/config.yml b/recipes/libvips/config.yml index 93b9203bbe82c..411a90d607682 100644 --- a/recipes/libvips/config.yml +++ b/recipes/libvips/config.yml @@ -1,4 +1,6 @@ versions: + "8.15.2": + folder: all "8.15.1": folder: all "8.14.2": From a5b2d813348e5663f840736e217fd54be5882255 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 18 Mar 2024 22:22:10 +0000 Subject: [PATCH 262/405] (#23166) [bot] Update list of references (prod-v2/ListPackages) Co-authored-by: conan-center-bot --- .c3i/conan_v2_ready_references.yml | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index c8822abbf29a6..aced003f38780 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -23,6 +23,7 @@ required_for_references: - andreasbuhr-cppcoro - android-ndk - angelscript +- antlr4 - antlr4-cppruntime - any-lite - anyrpc @@ -91,6 +92,7 @@ required_for_references: - beauty - benchmark - bertrand +- bezier - bgfx - bigint - bimg @@ -110,6 +112,7 @@ required_for_references: - boost-ext-ut - boost-leaf - boostdep +- botan - box2d - breakpad - brigand @@ -164,6 +167,7 @@ required_for_references: - chef-fun - chipmunk2d - choc +- chunkio - cimg - circularbuffer - cista @@ -172,6 +176,7 @@ required_for_references: - cjson - clara - clhep +- cli - cli11 - clickhouse-cpp - clipboard_lite @@ -184,6 +189,7 @@ required_for_references: - cmocka - cmp - cn-cbor +- cnats - cnpy - cocoyaxi - coin-cgl @@ -233,6 +239,7 @@ required_for_references: - cqrlib - crc32c - crc_cpp +- crcpp - create-dmg - croncpp - crossguid @@ -291,6 +298,7 @@ required_for_references: - djinni-support-lib - dlib - dlpack +- dnet - docopt.cpp - doctest - double-conversion @@ -305,12 +313,14 @@ required_for_references: - dsp-filters - dtl - duckdb +- duckx - duktape - dylib - eabase - earcut - eastl - easy_profiler +- easyexif - easyhttpcpp - easyloggingpp - easylzma @@ -347,6 +357,7 @@ required_for_references: - eternal - ethash - etl +- eudev - eventpp - evmc - exiv2 @@ -363,6 +374,7 @@ required_for_references: - fast-dds - fast_double_parser - fast_float +- fast_io - fastgltf - fastnoise2 - fastpfor @@ -373,6 +385,7 @@ required_for_references: - fft - fftw - fire-hpp +- fixed-containers - flac - flann - flatbuffers @@ -398,6 +411,7 @@ required_for_references: - fp16 - fpgen - fpzip +- freealut - freeglut - freeimage - freetype @@ -418,6 +432,7 @@ required_for_references: - gamenetworkingsockets - gamma - gcem +- gdal - gdbm - gdcm - gdk-pixbuf @@ -516,6 +531,7 @@ required_for_references: - iconfontcppheaders - icu - id3v2lib +- idna - ignition-cmake - iir1 - im95able-rea @@ -542,6 +558,7 @@ required_for_references: - iqa - irrxml - isa-l +- isl - iso8601lib - itk - itlib @@ -762,6 +779,7 @@ required_for_references: - libtorrent - libucl - libudev +- libunifex - libunistring - libunwind - liburing @@ -954,7 +972,9 @@ required_for_references: - nv-codec-headers - nvtx - oatpp +- oatpp-libressl - oatpp-postgresql +- oatpp-sqlite - objectbox - objectbox-generator - observer-ptr-lite @@ -965,6 +985,7 @@ required_for_references: - octomap - odbc - ode +- ofeli - ogdf - ogg - ohnet @@ -999,6 +1020,7 @@ required_for_references: - opengl-registry - opengv - openh264 +- openimageio - openjdk - openjpeg - openmesh @@ -1011,10 +1033,12 @@ required_for_references: - opentelemetry-proto - opentracing-cpp - openvino +- openvr - openxlsx - optional-lite - opus - opusfile +- orc - orcania - osmanip - osqp @@ -1031,9 +1055,11 @@ required_for_references: - parg - parson - patchelf +- pathie-cpp - pbtools - pcapplusplus - pcg-cpp +- pciutils - pcl - pcre - pcre2 @@ -1088,6 +1114,7 @@ required_for_references: - pranav-csv2 - premake - pretty-name +- primesieve - procxx-boost-ext-simd - proj - prometheus-cpp @@ -1138,6 +1165,7 @@ required_for_references: - rapidxml - rapidyaml - raylib +- rdma-core - re2 - re2c - reactiveplusplus @@ -1151,6 +1179,7 @@ required_for_references: - rectpack2d - redboltz-mqtt_cpp - redis-plus-plus +- redradist-icc - refl-cpp - reflect-cpp - replxx @@ -1164,6 +1193,7 @@ required_for_references: - roaring - robin-hood-hashing - rocksdb +- rotor - rpclib - rply - rsync @@ -1176,6 +1206,7 @@ required_for_references: - rxcpp - s2geometry - s2n +- safe - safeint - sail - samurai @@ -1208,6 +1239,7 @@ required_for_references: - serdepp - serf - serial +- sfl - sfml - shapelib - shield @@ -1217,10 +1249,12 @@ required_for_references: - simde - simdjson - simdutf +- simfil - simple-websocket-server - simple-yaml - sjson-cpp - skyr-url +- sleef - sml - snappy - snitch @@ -1351,6 +1385,7 @@ required_for_references: - transwarp - trantor - tre +- tree-gen - tree-sitter - tree-sitter-c - troldal-zippy @@ -1384,6 +1419,7 @@ required_for_references: - unqlite - upx - urdfdom +- urdfdom_headers - uriparser - usockets - usrsctp @@ -1403,6 +1439,7 @@ required_for_references: - vdpau - vectorclass - vectorial +- velodyne_decoder - veque - very-simple-smtps - vincentlaucsb-csv-parser @@ -1440,6 +1477,7 @@ required_for_references: - wildmidi - winflexbison - winmd +- winreg - wiringpi - wise_enum - wolfssl @@ -1471,6 +1509,7 @@ required_for_references: - xsimd - xtensor - xtl +- xtr - xtrans - xxhash - xxsds-sdsl-lite @@ -1494,6 +1533,7 @@ required_for_references: - zlib-ng - zmarok-semver - zmqpp +- zoe - zookeeper-client-c - zopfli - zpp_bits From 0f1b32a38de414cdbdc83e85a3d35f1ee209c9e8 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Tue, 19 Mar 2024 08:41:31 +0000 Subject: [PATCH 263/405] (#23154) [bot] Update authorized users list (2024-03-18) Co-authored-by: conan-center-bot --- .c3i/authorized_users.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index ad6d2b83372d7..86ea5a6a6dbca 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1308,3 +1308,8 @@ authorized_users: - js-nano - matheusgomes28 - jsinge +- karlworks-dev +- PJBoy +- Ruwei-Liu +- msparapa +- pzheltov From d9f1b88e98e85efaf272c7ab45dc26ee1984a6c3 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 19 Mar 2024 18:07:51 +0900 Subject: [PATCH 264/405] (#23031) watcher: add version 0.10.0 * watcher: add version 0.10.0 * link pthread --- recipes/watcher/all/conandata.yml | 3 +++ recipes/watcher/all/conanfile.py | 2 +- recipes/watcher/config.yml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/watcher/all/conandata.yml b/recipes/watcher/all/conandata.yml index 857cc8ad36367..533a3689631b9 100644 --- a/recipes/watcher/all/conandata.yml +++ b/recipes/watcher/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.10.0": + url: "https://github.com/e-dant/watcher/archive/release/0.10.0.tar.gz" + sha256: "c15f088ddc41b58100921ea0b630bcbde83c9960aefecf82221da997f4d4b4ec" "0.9.5": url: "https://github.com/e-dant/watcher/archive/release/0.9.5.tar.gz" sha256: "41b74d138eec106c35a99e7544def599453a8bf4cf4887ad627e1c9e3355287c" diff --git a/recipes/watcher/all/conanfile.py b/recipes/watcher/all/conanfile.py index a860da1f34772..e70c9cb544fb1 100644 --- a/recipes/watcher/all/conanfile.py +++ b/recipes/watcher/all/conanfile.py @@ -88,6 +88,6 @@ def package_info(self): self.cpp_info.libdirs = [] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs.append("m") + self.cpp_info.system_libs.extend(["m", "pthread"]) if is_apple_os(self): self.cpp_info.frameworks = ["CoreFoundation", "CoreServices"] diff --git a/recipes/watcher/config.yml b/recipes/watcher/config.yml index 2b4b53a7cfb59..83559e08c8922 100644 --- a/recipes/watcher/config.yml +++ b/recipes/watcher/config.yml @@ -1,4 +1,6 @@ versions: + "0.10.0": + folder: all "0.9.5": folder: all "0.9.2": From c552a8eb76c3e410f67c7f6ec5620770d7e2f8ad Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Tue, 19 Mar 2024 10:24:43 +0100 Subject: [PATCH 265/405] (#21242) opencv/4.8.1: fix access to wayland-protocols root path with 1 profile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix access to wayland-protocols root path with 1 profile * more elegant workaround for wayland-protocols and 1 profile * use self.dependencies.build for 1 profile * bump dependencies --------- Co-authored-by: Rubén Rincón Blanco --- recipes/opencv/4.x/conanfile.py | 54 ++++++++++++++++----------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/recipes/opencv/4.x/conanfile.py b/recipes/opencv/4.x/conanfile.py index 2c4952f422304..0d5396ed1027e 100644 --- a/recipes/opencv/4.x/conanfile.py +++ b/recipes/opencv/4.x/conanfile.py @@ -1107,29 +1107,29 @@ def requirements(self): self.requires("wayland/1.22.0") # imgcodecs module dependencies if self.options.get_safe("with_avif"): - self.requires("libavif/1.0.2") + self.requires("libavif/1.0.4") if self.options.get_safe("with_jpeg") == "libjpeg": self.requires("libjpeg/9e") elif self.options.get_safe("with_jpeg") == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.1") + self.requires("libjpeg-turbo/3.0.2") elif self.options.get_safe("with_jpeg") == "mozjpeg": self.requires("mozjpeg/4.1.5") if self.options.get_safe("with_jpeg2000") == "jasper": - self.requires("jasper/4.1.0") + self.requires("jasper/4.2.0") elif self.options.get_safe("with_jpeg2000") == "openjpeg": - self.requires("openjpeg/2.5.0") + self.requires("openjpeg/2.5.2") if self.options.get_safe("with_png"): - self.requires("libpng/1.6.40") + self.requires("libpng/1.6.43") if self.options.get_safe("with_openexr"): - self.requires("openexr/3.2.1") + self.requires("openexr/3.2.3") if self.options.get_safe("with_tiff"): self.requires("libtiff/4.6.0") if self.options.get_safe("with_webp"): self.requires("libwebp/1.3.2") if self.options.get_safe("with_gdal"): - self.requires("gdal/3.7.0") + self.requires("gdal/3.8.3") if self.options.get_safe("with_gdcm"): - self.requires("gdcm/3.0.21") + self.requires("gdcm/3.0.23") # objdetect module dependencies if self.options.get_safe("with_quirc"): self.requires("quirc/1.2") @@ -1150,10 +1150,10 @@ def requirements(self): # sfm module dependencies if self.options.sfm: self.requires("gflags/2.2.2") - self.requires("glog/0.6.0") + self.requires("glog/0.7.0") # text module dependencies if self.options.get_safe("with_tesseract"): - self.requires("tesseract/5.3.0") + self.requires("tesseract/5.3.3") def package_id(self): # deprecated options @@ -1210,7 +1210,7 @@ def build_requirements(self): if not self._is_legacy_one_profile: self.tool_requires("protobuf/") if self.options.get_safe("with_wayland"): - self.tool_requires("wayland-protocols/1.32") + self.tool_requires("wayland-protocols/1.33") if not self._is_legacy_one_profile: self.tool_requires("wayland/") if not self.conf.get("tools.gnu:pkg_config", check_type=str): @@ -1272,22 +1272,6 @@ def _patch_sources(self): "ocv_check_modules(XKBCOMMON xkbcommon)", "ocv_check_modules(XKBCOMMON xkbcommon)\nfind_package(xkbcommon REQUIRED CONFIG)\nset(XKBCOMMON_LINK_LIBRARIES xkbcommon::libxkbcommon)", ) - # OpenCV uses pkgconfig to find wayland-protocols files, but we can't generate - # pkgconfig files of a build requirement with 1 profile, so here is a workaround - if self._is_legacy_one_profile: - replace_in_file( - self, - detect_wayland, - "ocv_check_modules(WAYLAND_PROTOCOLS wayland-protocols>=1.13)", - "set(HAVE_WAYLAND_PROTOCOLS TRUE)", - ) - pkgdatadir = os.path.join(self.dependencies["wayland-protocols"].package_folder, "res", "wayland-protocols") - replace_in_file( - self, - detect_wayland, - "pkg_get_variable(WAYLAND_PROTOCOLS_BASE wayland-protocols pkgdatadir)", - f"set(WAYLAND_PROTOCOLS_BASE {pkgdatadir})", - ) ## Cleanup RPATH install_layout_file = os.path.join(self.source_folder, "cmake", "OpenCVInstallLayout.cmake") @@ -1547,7 +1531,21 @@ def generate(self): if self.options.get_safe("with_wayland"): deps = PkgConfigDeps(self) - if not self._is_legacy_one_profile: + if self._is_legacy_one_profile: + # Manually generate pkgconfig file of wayland-protocols since + # PkgConfigDeps.build_context_activated can't work with legacy 1 profile + wp_prefix = self.dependencies.build["wayland-protocols"].package_folder + wp_version = self.dependencies.build["wayland-protocols"].ref.version + wp_pkg_content = textwrap.dedent(f"""\ + prefix={wp_prefix} + datarootdir=${{prefix}}/res + pkgdatadir=${{datarootdir}}/wayland-protocols + Name: Wayland Protocols + Description: Wayland protocol files + Version: {wp_version} + """) + save(self, os.path.join(self.generators_folder, "wayland-protocols.pc"), wp_pkg_content) + else: deps.build_context_activated = ["wayland-protocols"] deps.generate() From 2711a394d0fe78ca384240710bc5ab04900ef280 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 19 Mar 2024 18:48:14 +0900 Subject: [PATCH 266/405] (#23063) glaze: add version 2.3.0 * glaze: add version 2.2.2 * update 2.2.4 * update 2.3.0 --- recipes/glaze/all/conandata.yml | 3 +++ recipes/glaze/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index ea8a28e593a57..a15ae462af46d 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.3.0": + url: "https://github.com/stephenberry/glaze/archive/v2.3.0.tar.gz" + sha256: "9963761337941f4709458155a045ce4ab5dc5edf5e60dca8cc290200fce8330e" "2.2.1": url: "https://github.com/stephenberry/glaze/archive/v2.2.1.tar.gz" sha256: "ef0eb30a038c623ca100696e773ba1c9888719ed02c46e9fabf6238ee07026bb" diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index a975091df90db..de35ec863def5 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,6 @@ versions: + "2.3.0": + folder: all "2.2.1": folder: all "2.1.9": From 33a1c95d20e0977b4069e508b15175910c1541d8 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 19 Mar 2024 19:07:22 +0900 Subject: [PATCH 267/405] (#23103) simde: add version 0.8.0 --- recipes/simde/all/conandata.yml | 4 ++++ recipes/simde/config.yml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/recipes/simde/all/conandata.yml b/recipes/simde/all/conandata.yml index c108fd42332f1..2710ad3ab19c8 100644 --- a/recipes/simde/all/conandata.yml +++ b/recipes/simde/all/conandata.yml @@ -1,4 +1,8 @@ sources: + "0.8.0": + # same as 0.7.6 + url: "https://github.com/simd-everywhere/simde/archive/refs/tags/v0.8.0.tar.gz" + sha256: "d7c1aef6dd9ef0fbe6f521d1ca3e79afc26deda7d8f857544ca020b42a4b9b97" "0.7.6": # A release tarball exists, but I want to use the archive tarball. # Because the release tarball has only amalgatated(with lots of duplicate lines) header files. diff --git a/recipes/simde/config.yml b/recipes/simde/config.yml index 1d3599e3efc2e..82cc9014779ef 100644 --- a/recipes/simde/config.yml +++ b/recipes/simde/config.yml @@ -1,3 +1,5 @@ versions: + "0.8.0": + folder: all "0.7.6": folder: all From ee5059b6fc22b4c6930eb5d607a1fd94be6e7cbd Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Tue, 19 Mar 2024 10:21:17 +0000 Subject: [PATCH 268/405] (#23033) add gettext 0.22.5 * add gettext 0.22.5 * patch to fix crossbuild * missing endline * automake 1.16.5 on Linux * fix * simply test package * patch: do not touch .m4 files * windows fixes * fix * cleanup test package --- recipes/gettext/all/conandata.yml | 12 +++- recipes/gettext/all/conanfile.py | 9 ++- .../0.22.5-0001-fix-macos-crossbuild.patch | 26 +++++++ ...emmove-is-intrinsic-function-on-MSVC.patch | 72 ------------------- recipes/gettext/all/test_package/conanfile.py | 36 +--------- .../gettext/all/test_package/src/configure.ac | 6 -- recipes/gettext/config.yml | 2 + 7 files changed, 47 insertions(+), 116 deletions(-) create mode 100644 recipes/gettext/all/patches/0.22.5-0001-fix-macos-crossbuild.patch delete mode 100644 recipes/gettext/all/patches/0002-memmove-is-intrinsic-function-on-MSVC.patch delete mode 100644 recipes/gettext/all/test_package/src/configure.ac diff --git a/recipes/gettext/all/conandata.yml b/recipes/gettext/all/conandata.yml index e03cab34f1431..54ee01473c0ca 100644 --- a/recipes/gettext/all/conandata.yml +++ b/recipes/gettext/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.22.5": + url: "https://ftp.gnu.org/pub/gnu/gettext/gettext-0.22.5.tar.gz" + sha256: "ec1705b1e969b83a9f073144ec806151db88127f5e40fe5a94cb6c8fa48996a0" "0.21": url: "https://ftp.gnu.org/pub/gnu/gettext/gettext-0.21.tar.gz" sha256: "c77d0da3102aec9c07f43671e60611ebff89a996ef159497ce8e59d075786b12" @@ -6,14 +9,19 @@ sources: url: "https://ftp.gnu.org/pub/gnu/gettext/gettext-0.20.1.tar.gz" sha256: "66415634c6e8c3fa8b71362879ec7575e27da43da562c798a8a2f223e6e47f5c" patches: + "0.22.5": + - patch_file: "patches/0004-autopoint-relocatable.patch" + patch_description: "relocatable autopoint with resources relative to script" + patch_type: "conan" + - patch_file: "patches/0.22.5-0001-fix-macos-crossbuild.patch" + patch_description: "fix ability to crossbuild on macos and assume macOS newer than 10.4" + patch_type: "conan" "0.21": - - patch_file: "patches/0002-memmove-is-intrinsic-function-on-MSVC.patch" - patch_file: "patches/0004-autopoint-relocatable.patch" patch_description: "relocatable autopoint with resources relative to script" patch_type: "conan" "0.20.1": - patch_file: "patches/0.20.1-0001-fix-build-errors-with-MSVC.patch" - - patch_file: "patches/0002-memmove-is-intrinsic-function-on-MSVC.patch" - patch_file: "patches/0.20.1-0003-Reported-by-Gabor-Z.-Papp-gzp-papp.hu.patch" - patch_file: "patches/0004-autopoint-relocatable.patch" patch_description: "relocatable autopoint with resources relative to script" diff --git a/recipes/gettext/all/conanfile.py b/recipes/gettext/all/conanfile.py index 433bf975c1087..90ff82b6775b1 100644 --- a/recipes/gettext/all/conanfile.py +++ b/recipes/gettext/all/conanfile.py @@ -50,7 +50,8 @@ def build_requirements(self): self.win_bash = True if not self.conf.get("tools.microsoft.bash:path", check_type=str): self.tool_requires("msys2/cci.latest") - if is_msvc(self): + + if self.version >= Version("0.22") or is_msvc(self): self.build_requires("automake/1.16.5") def source(self): @@ -84,6 +85,12 @@ def generate(self): if check_min_vs(self, "180", raise_invalid=False): tc.extra_cflags.append("-FS") #TODO: reference github issue + # prevent redefining compiler instrinsic functions + tc.configure_args.extend([ + 'ac_cv_func_memmove=yes', + 'ac_cv_func_memset=yes' + ]) + # The flag above `--with-libiconv-prefix` fails to correctly detect libiconv on windows+msvc # so it needs an extra nudge. We could use `AutotoolsDeps` but it's currently affected by the # following outstanding issue: https://github.com/conan-io/conan/issues/12784 diff --git a/recipes/gettext/all/patches/0.22.5-0001-fix-macos-crossbuild.patch b/recipes/gettext/all/patches/0.22.5-0001-fix-macos-crossbuild.patch new file mode 100644 index 0000000000000..9deceb328f646 --- /dev/null +++ b/recipes/gettext/all/patches/0.22.5-0001-fix-macos-crossbuild.patch @@ -0,0 +1,26 @@ +diff --git a/gettext-runtime/configure b/gettext-runtime/configure +index 75c8e6f..6e4df72 100755 +--- a/gettext-runtime/configure ++++ b/gettext-runtime/configure +@@ -36149,7 +36149,7 @@ fi + haiku*) use_elf_origin_trick=yes ;; + # On Mac OS X 10.4 or newer, use Mac OS X tools. See + # . +- darwin | darwin[1-7].*) ;; ++ darwin | darwin[1-7].*) use_macos_tools=yes ;; + darwin*) use_macos_tools=yes ;; + esac + if test $is_noop = yes; then +diff --git a/gettext-tools/configure b/gettext-tools/configure +index c62f256..f3a66ed 100755 +--- a/gettext-tools/configure ++++ b/gettext-tools/configure +@@ -49566,7 +49566,7 @@ fi + haiku*) use_elf_origin_trick=yes ;; + # On Mac OS X 10.4 or newer, use Mac OS X tools. See + # . +- darwin | darwin[1-7].*) ;; ++ darwin | darwin[1-7].*) use_macos_tools=yes ;; + darwin*) use_macos_tools=yes ;; + esac + if test $is_noop = yes; then diff --git a/recipes/gettext/all/patches/0002-memmove-is-intrinsic-function-on-MSVC.patch b/recipes/gettext/all/patches/0002-memmove-is-intrinsic-function-on-MSVC.patch deleted file mode 100644 index dbbf7b795a53e..0000000000000 --- a/recipes/gettext/all/patches/0002-memmove-is-intrinsic-function-on-MSVC.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 9b2e480278d36c4d7b6f988621a3a9f699cc730f Mon Sep 17 00:00:00 2001 -From: SSE4 -Date: Wed, 10 Jul 2019 03:55:56 -0700 -Subject: [PATCH 2/2] - memmove is intrinsic function on MSVC - -Signed-off-by: SSE4 ---- - gettext-runtime/gnulib-lib/memmove.c | 4 ++++ - gettext-tools/gnulib-lib/memmove.c | 4 ++++ - gettext-tools/gnulib-lib/memset.c | 4 ++++ - 3 files changed, 12 insertions(+) - -diff --git a/gettext-runtime/gnulib-lib/memmove.c b/gettext-runtime/gnulib-lib/memmove.c -index 0f040540c..bc8883ae4 100644 ---- a/gettext-runtime/gnulib-lib/memmove.c -+++ b/gettext-runtime/gnulib-lib/memmove.c -@@ -7,6 +7,8 @@ - - #include - -+#ifndef _MSC_VER -+ - void * - memmove (void *dest0, void const *source0, size_t length) - { -@@ -24,3 +26,5 @@ memmove (void *dest0, void const *source0, size_t length) - } - return dest0; - } -+ -+#endif -diff --git a/gettext-tools/gnulib-lib/memmove.c b/gettext-tools/gnulib-lib/memmove.c -index 0f040540c..bc8883ae4 100644 ---- a/gettext-tools/gnulib-lib/memmove.c -+++ b/gettext-tools/gnulib-lib/memmove.c -@@ -7,6 +7,8 @@ - - #include - -+#ifndef _MSC_VER -+ - void * - memmove (void *dest0, void const *source0, size_t length) - { -@@ -24,3 +26,5 @@ memmove (void *dest0, void const *source0, size_t length) - } - return dest0; - } -+ -+#endif -diff --git a/gettext-tools/gnulib-lib/memset.c b/gettext-tools/gnulib-lib/memset.c -index 4e60124e7..b595fa966 100644 ---- a/gettext-tools/gnulib-lib/memset.c -+++ b/gettext-tools/gnulib-lib/memset.c -@@ -18,6 +18,8 @@ - - #include - -+#ifndef _MSC_VER -+ - void * - memset (void *str, int c, size_t len) - { -@@ -27,3 +29,5 @@ memset (void *str, int c, size_t len) - *st++ = c; - return str; - } -+ -+#endif --- -2.21.0.windows.1 - diff --git a/recipes/gettext/all/test_package/conanfile.py b/recipes/gettext/all/test_package/conanfile.py index 882b297a65cf5..38cf5d5e86a20 100644 --- a/recipes/gettext/all/test_package/conanfile.py +++ b/recipes/gettext/all/test_package/conanfile.py @@ -1,58 +1,24 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.env import Environment, VirtualRunEnv, VirtualBuildEnv -from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.env import VirtualRunEnv from conan.tools.layout import basic_layout -from conan.tools.microsoft import is_msvc class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - exports_sources = "configure.ac", test_type = "explicit" - win_bash = True - - @property - def _settings_build(self): - return getattr(self, "settings_build", self.settings) def requirements(self): self.requires(self.tested_reference_str) - def build_requirements(self): - self.tool_requires(self.tested_reference_str) - self.tool_requires("automake/1.16.5") - self.tool_requires("xz_utils/5.4.5") - if self._settings_build.os == "Windows" and not self.conf.get("tools.microsoft.bash:path", check_type=str): - self.tool_requires("msys2/cci.latest") - def layout(self): basic_layout(self, src_folder="src") def generate(self): - buildenv = VirtualBuildEnv(self) - buildenv.generate() - - at = AutotoolsToolchain(self) - at.generate() - - if is_msvc(self): - env = Environment() - env.define("CC", "cl -nologo") - env.define("LD", "link -nologo") - env.vars(self).save_script("conanbuild_libsmacker_msvc") - runenv = VirtualRunEnv(self) runenv.generate() - def build(self): - - autotools = Autotools(self) - autotools.autoreconf() - autotools.configure() - - def test(self): if can_run(self): for exe in ["gettext", "ngettext", "msgcat", "msgmerge"]: diff --git a/recipes/gettext/all/test_package/src/configure.ac b/recipes/gettext/all/test_package/src/configure.ac deleted file mode 100644 index b2c4f352a64de..0000000000000 --- a/recipes/gettext/all/test_package/src/configure.ac +++ /dev/null @@ -1,6 +0,0 @@ -AC_INIT([test_package_gettext],[1.0]) -AC_PREREQ([2.69]) - -AM_GNU_GETTEXT_REQUIRE_VERSION([0.20]) -AM_GNU_GETTEXT([external], [need-ngettext]) -AM_ICONV diff --git a/recipes/gettext/config.yml b/recipes/gettext/config.yml index dc03f51a1d462..00bba3996ff90 100644 --- a/recipes/gettext/config.yml +++ b/recipes/gettext/config.yml @@ -1,4 +1,6 @@ versions: + "0.22.5": + folder: all "0.21": folder: all "0.20.1": From 3c2b13fcfac5873b91c9e1bd6418afc251a5f819 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 19 Mar 2024 11:29:24 +0100 Subject: [PATCH 269/405] (#23092) [cgal] add cgal/5.6.1 --- recipes/cgal/all/conandata.yml | 3 +++ recipes/cgal/all/conanfile.py | 2 +- recipes/cgal/config.yml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/cgal/all/conandata.yml b/recipes/cgal/all/conandata.yml index eda02a9fb3ec4..c9c061bf70265 100644 --- a/recipes/cgal/all/conandata.yml +++ b/recipes/cgal/all/conandata.yml @@ -17,6 +17,9 @@ sources: "5.6": sha256: dcab9b08a50a06a7cc2cc69a8a12200f8d8f391b9b8013ae476965c10b45161f url: https://github.com/CGAL/cgal/releases/download/v5.6/CGAL-5.6.tar.xz + "5.6.1": + sha256: cdb15e7ee31e0663589d3107a79988a37b7b1719df3d24f2058545d1bcdd5837 + url: https://github.com/CGAL/cgal/releases/download/v5.6.1/CGAL-5.6.1.tar.xz patches: "5.3.2": - patch_file: "patches/0001-fix-for-conan.patch" diff --git a/recipes/cgal/all/conanfile.py b/recipes/cgal/all/conanfile.py index 73115e60a2ec6..59ac6cec34475 100644 --- a/recipes/cgal/all/conanfile.py +++ b/recipes/cgal/all/conanfile.py @@ -93,7 +93,7 @@ def package(self): def _create_cmake_module_variables(self, module_file): ''' CGAL requires C++14, and specific compilers flags to enable the possibility to set FPU rounding modes. - This CMake module, from the upsream CGAL pull-request https://github.com/CGAL/cgal/pull/7512, takes + This CMake module, from the upstream CGAL pull-request https://github.com/CGAL/cgal/pull/7512, takes care of all the known compilers CGAL has ever supported. ''' content = textwrap.dedent('''\ diff --git a/recipes/cgal/config.yml b/recipes/cgal/config.yml index 3d807cdb944c7..65c6d1c183e2c 100644 --- a/recipes/cgal/config.yml +++ b/recipes/cgal/config.yml @@ -11,3 +11,5 @@ versions: folder: all "5.6": folder: all + "5.6.1": + folder: all From bc71c97258833a1e0df97183c9515e803d4e53d3 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 19 Mar 2024 19:48:15 +0900 Subject: [PATCH 270/405] (#23104) simdjson: add version 3.8.0 --- recipes/simdjson/all/conandata.yml | 3 +++ recipes/simdjson/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/simdjson/all/conandata.yml b/recipes/simdjson/all/conandata.yml index ae3a0527eade5..a13784e72fcfe 100644 --- a/recipes/simdjson/all/conandata.yml +++ b/recipes/simdjson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.8.0": + url: "https://github.com/simdjson/simdjson/archive/v3.8.0.tar.gz" + sha256: "e28e3f46f0012d405b67de6c0a75e8d8c9a612b0548cb59687822337d73ca78b" "3.7.0": url: "https://github.com/simdjson/simdjson/archive/v3.7.0.tar.gz" sha256: "27315c4861893b3e036c1f672b1c238ee86be6edb84c0824d1ed20dea5999777" diff --git a/recipes/simdjson/config.yml b/recipes/simdjson/config.yml index ef93017bac7bb..76ac101fa502f 100644 --- a/recipes/simdjson/config.yml +++ b/recipes/simdjson/config.yml @@ -1,4 +1,6 @@ versions: + "3.8.0": + folder: all "3.7.0": folder: all "3.6.4": From 9cac2445471124d41ccce93718871680acd76090 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 19 Mar 2024 20:07:11 +0900 Subject: [PATCH 271/405] (#23105) ssp: add version 1.8.0 --- recipes/ssp/all/conandata.yml | 3 +++ recipes/ssp/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/ssp/all/conandata.yml b/recipes/ssp/all/conandata.yml index 4382623935239..220fd55612197 100644 --- a/recipes/ssp/all/conandata.yml +++ b/recipes/ssp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.8.0": + url: "https://github.com/red0124/ssp/archive/refs/tags/v1.8.0.tar.gz" + sha256: "a4416746023c8a60f6808200193dd207f1044b6e37e6c5bc0462e85452307d1d" "1.7.2": url: "https://github.com/red0124/ssp/archive/refs/tags/v1.7.2.tar.gz" sha256: "700e05d304fe10f05331d0a963757257632dddc1f9442b826a85efa545c64772" diff --git a/recipes/ssp/config.yml b/recipes/ssp/config.yml index 98bae30aec835..e1c88426892a4 100644 --- a/recipes/ssp/config.yml +++ b/recipes/ssp/config.yml @@ -1,4 +1,6 @@ versions: + "1.8.0": + folder: all "1.7.2": folder: all "1.6.2": From f45396d7398e284be4b4317db8c83e16f805c4db Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 19 Mar 2024 20:27:04 +0900 Subject: [PATCH 272/405] (#23106) wasmtime: add version 18.0.3 --- recipes/wasmtime/all/conandata.yml | 30 ++++++++++++++++++++++++++++++ recipes/wasmtime/config.yml | 2 ++ 2 files changed, 32 insertions(+) diff --git a/recipes/wasmtime/all/conandata.yml b/recipes/wasmtime/all/conandata.yml index 59585bd0e0f08..033b48ec7ab2e 100644 --- a/recipes/wasmtime/all/conandata.yml +++ b/recipes/wasmtime/all/conandata.yml @@ -1,4 +1,34 @@ sources: + "18.0.3": + Windows: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.3/wasmtime-v18.0.3-x86_64-windows-c-api.zip" + sha256: "d23c633e73424304bc926b028a3fb9bed2709bc872414729e356ae66e55eb705" + MinGW: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.3/wasmtime-v18.0.3-x86_64-mingw-c-api.zip" + sha256: "d4b74cf84862c1a3bb29a7a11f6785ed1307628a3f3e9a2b850df19f0c4da659" + Linux: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.3/wasmtime-v18.0.3-x86_64-linux-c-api.tar.xz" + sha256: "c5c67a16386c1b2efc875246cb8c75f45faa806a16979c985842d3ba91502b34" + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.3/wasmtime-v18.0.3-aarch64-linux-c-api.tar.xz" + sha256: "c7c790b6e5e3f998f588f2aacda6b39daf4aa59b68e58578a477579312ca0756" + "s390x": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.3/wasmtime-v18.0.3-s390x-linux-c-api.tar.xz" + sha256: "196ec417bd07fe2559381c922434c9908087bd238ed0811b0b81a6a860ff0145" + Macos: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.3/wasmtime-v18.0.3-x86_64-macos-c-api.tar.xz" + sha256: "48a8969fda0abaee08ce17acd1413f21cc1112b2b5de1af00baa647a32d3951f" + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.3/wasmtime-v18.0.3-aarch64-macos-c-api.tar.xz" + sha256: "f6faa6ae319d43c7f54892c10742be18aa7cca5ba72fd470a0926f64d0745050" + Android: + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.3/wasmtime-v18.0.3-aarch64-linux-c-api.tar.xz" + sha256: "c7c790b6e5e3f998f588f2aacda6b39daf4aa59b68e58578a477579312ca0756" "16.0.0": Windows: "x86_64": diff --git a/recipes/wasmtime/config.yml b/recipes/wasmtime/config.yml index 53f9ed2965380..e2a5b299e7fea 100644 --- a/recipes/wasmtime/config.yml +++ b/recipes/wasmtime/config.yml @@ -1,4 +1,6 @@ versions: + "18.0.3": + folder: all "16.0.0": folder: all "12.0.2": From 89f98cee683a1c372aa418a0b914f8c4bc2630cd Mon Sep 17 00:00:00 2001 From: Ahajha <44127594+Ahajha@users.noreply.github.com> Date: Tue, 19 Mar 2024 07:47:04 -0400 Subject: [PATCH 273/405] (#23108) xz_utils: skip building tests --- recipes/xz_utils/cmake/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/xz_utils/cmake/conanfile.py b/recipes/xz_utils/cmake/conanfile.py index 641cb1d252d68..29d660487cdf7 100644 --- a/recipes/xz_utils/cmake/conanfile.py +++ b/recipes/xz_utils/cmake/conanfile.py @@ -57,6 +57,7 @@ def source(self): def generate(self): tc = CMakeToolchain(self) + tc.variables["BUILD_TESTING"] = False tc.generate() def build(self): From 06e03b93a21552263fede4cedb3565fc362369e0 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 19 Mar 2024 21:10:38 +0900 Subject: [PATCH 274/405] (#23116) unity: add version 2.6.0 --- recipes/unity/all/conandata.yml | 3 +++ recipes/unity/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/unity/all/conandata.yml b/recipes/unity/all/conandata.yml index a3d7facb1dfbb..99c6f0d9d4bf6 100644 --- a/recipes/unity/all/conandata.yml +++ b/recipes/unity/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.6.0": + url: "https://github.com/ThrowTheSwitch/Unity/archive/refs/tags/v2.6.0.tar.gz" + sha256: "aa4c9fb1ae5fc5242f914c65f3557e817e40cb37f04a31e5ff76d1ab89dbf674" "2.5.2": url: "https://github.com/ThrowTheSwitch/Unity/archive/refs/tags/v2.5.2.tar.gz" sha256: "3786de6c8f389be3894feae4f7d8680a02e70ed4dbcce36109c8f8646da2671a" diff --git a/recipes/unity/config.yml b/recipes/unity/config.yml index 2ac88b6313aec..a6bd532e688f8 100644 --- a/recipes/unity/config.yml +++ b/recipes/unity/config.yml @@ -1,3 +1,5 @@ versions: + "2.6.0": + folder: all "2.5.2": folder: all From 21852721929bb7ebcf987d54a786721385a769b8 Mon Sep 17 00:00:00 2001 From: matheusgomes28 Date: Tue, 19 Mar 2024 12:28:11 +0000 Subject: [PATCH 275/405] (#23100) Fix gettext for clang>=16 * Apply noreturn attribute patch * Fix yml schema warning * Update conandata.yml Add patch source * More fixes --------- Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> --- recipes/gettext/all/conandata.yml | 4 + ...-clang-16-noreturn-attribute-warning.patch | 78 +++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 recipes/gettext/all/patches/0.21-clang-16-noreturn-attribute-warning.patch diff --git a/recipes/gettext/all/conandata.yml b/recipes/gettext/all/conandata.yml index 54ee01473c0ca..71a50d966129d 100644 --- a/recipes/gettext/all/conandata.yml +++ b/recipes/gettext/all/conandata.yml @@ -20,6 +20,10 @@ patches: - patch_file: "patches/0004-autopoint-relocatable.patch" patch_description: "relocatable autopoint with resources relative to script" patch_type: "conan" + - patch_file: "patches/0.21-clang-16-noreturn-attribute-warning.patch" + patch_description: "apply the __atribute_noreturn__ to print_and_abort" + patch_source: "https://github.com/coreutils/gnulib/commit/0cc39712803ade7b2d4b89c36b143dad72404063" + patch_type: "conan" "0.20.1": - patch_file: "patches/0.20.1-0001-fix-build-errors-with-MSVC.patch" - patch_file: "patches/0.20.1-0003-Reported-by-Gabor-Z.-Papp-gzp-papp.hu.patch" diff --git a/recipes/gettext/all/patches/0.21-clang-16-noreturn-attribute-warning.patch b/recipes/gettext/all/patches/0.21-clang-16-noreturn-attribute-warning.patch new file mode 100644 index 0000000000000..59ee5067e98dd --- /dev/null +++ b/recipes/gettext/all/patches/0.21-clang-16-noreturn-attribute-warning.patch @@ -0,0 +1,78 @@ +diff --git a/gettext-tools/gnulib-lib/obstack.c b/gettext-tools/gnulib-lib/obstack.c +index a6757b8..7d4439f 100644 +--- a/gettext-tools/gnulib-lib/obstack.c ++++ b/gettext-tools/gnulib-lib/obstack.c +@@ -326,7 +326,7 @@ int obstack_exit_failure = EXIT_FAILURE; + # include + # endif + +-static _Noreturn void ++static __attribute_noreturn__ void + print_and_abort (void) + { + /* Don't change any of these strings. Yes, it would be possible to add +diff --git a/gettext-tools/gnulib-lib/obstack.h b/gettext-tools/gnulib-lib/obstack.h +index cb59627..e0494a1 100644 +--- a/gettext-tools/gnulib-lib/obstack.h ++++ b/gettext-tools/gnulib-lib/obstack.h +@@ -153,7 +153,7 @@ + + /* Not the same as _Noreturn, since it also works with function pointers. */ + #ifndef __attribute_noreturn__ +-# if 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C ++# if 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ || 0x5110 <= __SUNPRO_C + # define __attribute_noreturn__ __attribute__ ((__noreturn__)) + # else + # define __attribute_noreturn__ +diff --git a/gettext-tools/libgettextpo/obstack.c b/gettext-tools/libgettextpo/obstack.c +index a6757b8..7d4439f 100644 +--- a/gettext-tools/libgettextpo/obstack.c ++++ b/gettext-tools/libgettextpo/obstack.c +@@ -326,7 +326,7 @@ int obstack_exit_failure = EXIT_FAILURE; + # include + # endif + +-static _Noreturn void ++static __attribute_noreturn__ void + print_and_abort (void) + { + /* Don't change any of these strings. Yes, it would be possible to add +diff --git a/gettext-tools/libgettextpo/obstack.h b/gettext-tools/libgettextpo/obstack.h +index cb59627..e0494a1 100644 +--- a/gettext-tools/libgettextpo/obstack.h ++++ b/gettext-tools/libgettextpo/obstack.h +@@ -153,7 +153,7 @@ + + /* Not the same as _Noreturn, since it also works with function pointers. */ + #ifndef __attribute_noreturn__ +-# if 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C ++# if 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ || 0x5110 <= __SUNPRO_C + # define __attribute_noreturn__ __attribute__ ((__noreturn__)) + # else + # define __attribute_noreturn__ +diff --git a/libtextstyle/lib/obstack.c b/libtextstyle/lib/obstack.c +index a6757b8..7d4439f 100644 +--- a/libtextstyle/lib/obstack.c ++++ b/libtextstyle/lib/obstack.c +@@ -326,7 +326,7 @@ int obstack_exit_failure = EXIT_FAILURE; + # include + # endif + +-static _Noreturn void ++static __attribute_noreturn__ void + print_and_abort (void) + { + /* Don't change any of these strings. Yes, it would be possible to add +diff --git a/libtextstyle/lib/obstack.h b/libtextstyle/lib/obstack.h +index cb59627..e0494a1 100644 +--- a/libtextstyle/lib/obstack.h ++++ b/libtextstyle/lib/obstack.h +@@ -153,7 +153,7 @@ + + /* Not the same as _Noreturn, since it also works with function pointers. */ + #ifndef __attribute_noreturn__ +-# if 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C ++# if 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ || 0x5110 <= __SUNPRO_C + # define __attribute_noreturn__ __attribute__ ((__noreturn__)) + # else + # define __attribute_noreturn__ From 0b2cd0d15787a40df8f6402fce5331a5e1f63767 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 19 Mar 2024 22:07:52 +0900 Subject: [PATCH 276/405] (#23167) quilll: add version 3.7.0 --- recipes/quill/all/conandata.yml | 3 +++ recipes/quill/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/quill/all/conandata.yml b/recipes/quill/all/conandata.yml index b6e754cda2c2e..289ea10c9c0f4 100644 --- a/recipes/quill/all/conandata.yml +++ b/recipes/quill/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.7.0": + url: "https://github.com/odygrd/quill/archive/v3.7.0.tar.gz" + sha256: "53afe555c32b4263c9d31ec11bd0d858983374af7a5e79eb26124f803b192515" "3.6.0": url: "https://github.com/odygrd/quill/archive/v3.6.0.tar.gz" sha256: "ba9dc3df262f2e65c57904580cc8407eba9a462001340c17bab7ae1dccddb4bd" diff --git a/recipes/quill/config.yml b/recipes/quill/config.yml index 3aa843c1a29c6..b27bda5fe6f9a 100644 --- a/recipes/quill/config.yml +++ b/recipes/quill/config.yml @@ -1,4 +1,6 @@ versions: + "3.7.0": + folder: "all" "3.6.0": folder: "all" "3.5.1": From ac9eaf1ca456f3d399581e47b343976bdb6b61fa Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 19 Mar 2024 14:27:44 +0100 Subject: [PATCH 277/405] (#23139) fltk: use libpng version range --- recipes/fltk/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/fltk/all/conanfile.py b/recipes/fltk/all/conanfile.py index 31462b1c91873..bd7f4d5b1b6f2 100644 --- a/recipes/fltk/all/conanfile.py +++ b/recipes/fltk/all/conanfile.py @@ -68,7 +68,7 @@ def layout(self): def requirements(self): self.requires("zlib/[>=1.2.11 <2]") self.requires("libjpeg/9e") - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.settings.os in ["Linux", "FreeBSD"]: if self.options.with_gl: self.requires("opengl/system") From 43563b8d72986bf48cc9a9463ecd1ec417338b6f Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Tue, 19 Mar 2024 14:48:27 +0100 Subject: [PATCH 278/405] (#23155) qt5: remove unused patch cleanup after fca4d560031841226037939a34c95c3660ba7afb --- recipes/qt/5.x.x/patches/337f28c9ab.patch | 40 ----------------------- 1 file changed, 40 deletions(-) delete mode 100644 recipes/qt/5.x.x/patches/337f28c9ab.patch diff --git a/recipes/qt/5.x.x/patches/337f28c9ab.patch b/recipes/qt/5.x.x/patches/337f28c9ab.patch deleted file mode 100644 index 6784be15b8cfe..0000000000000 --- a/recipes/qt/5.x.x/patches/337f28c9ab.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 337f28c9abb12f28538cfe2f49e5afc460578b32 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= -Date: Tue, 5 Jul 2022 15:38:33 +0200 -Subject: Darwin: Replace deprecated symbol kIOMasterPortDefault with - equivalent - -We can't use the replacement kIOMainPortDefault yet, as it's not -available in operating system versions we still support, but the -kIOMasterPortDefault documentation explicitly says that passing -NULL as a port argument indicates "use the default". - -As the underlying type of a mach_port_t is potentially either -a pointer or an unsigned int, we initialize the default to 0. - -Pick-to: 6.2 6.3 6.4 5.15 -Change-Id: I288aa94b8f2fbda47fd1cbaf329799db7ab988a0 -Reviewed-by: Alexandru Croitor ---- - src/corelib/global/qglobal.cpp | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -(limited to 'src/corelib/global/qglobal.cpp') - -diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp -index 738e39658f..c894471ad6 100644 ---- a/src/corelib/global/qglobal.cpp -+++ b/src/corelib/global/qglobal.cpp -@@ -3067,7 +3067,8 @@ QByteArray QSysInfo::machineUniqueId() - { - #if defined(Q_OS_DARWIN) && __has_include() - char uuid[UuidStringLen + 1]; -- io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice")); -+ static const mach_port_t defaultPort = 0; // Effectively kIOMasterPortDefault/kIOMainPortDefault -+ io_service_t service = IOServiceGetMatchingService(defaultPort, IOServiceMatching("IOPlatformExpertDevice")); - QCFString stringRef = (CFStringRef)IORegistryEntryCreateCFProperty(service, CFSTR(kIOPlatformUUIDKey), kCFAllocatorDefault, 0); - CFStringGetCString(stringRef, uuid, sizeof(uuid), kCFStringEncodingMacRoman); - return QByteArray(uuid); --- -cgit v1.2.1 - From 91f536f978a9b1a7bdc7937410fbba85147372ad Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 19 Mar 2024 15:08:35 +0100 Subject: [PATCH 279/405] (#23140) dlib: use libpng version range --- recipes/dlib/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/dlib/all/conanfile.py b/recipes/dlib/all/conanfile.py index 0bfd41e940b0f..a026fc21e83a6 100644 --- a/recipes/dlib/all/conanfile.py +++ b/recipes/dlib/all/conanfile.py @@ -92,7 +92,7 @@ def requirements(self): if self.options.with_jpeg: self.requires("libjpeg/9e") if self.options.with_png: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.options.get_safe("with_webp"): self.requires("libwebp/1.3.2") if self.options.with_sqlite3: From df53eeb2cb3a1499f561c6fb3ee50e17822e6c47 Mon Sep 17 00:00:00 2001 From: wadehunk <123095244+wadehunk@users.noreply.github.com> Date: Tue, 19 Mar 2024 09:29:14 -0500 Subject: [PATCH 280/405] (#23101) fast-dds: add version 2.13.3 * Add v2.13.2 and update requirements * Use older fast-cdr for versions < 2.12.0. Consistent with https://github.com/eProsima/Fast-DDS/blob/v2.11.3/fastrtps.repos * Refactor test to handle different code generation versions * Bump minimum gcc version to 10 * Add gettid patch that addresses https://github.com/eProsima/Fast-DDS/issues/4225 * Tweak version variable * Cleanup * Left config.yml out * Make fast-cdr options consistent with fast-dds * Use v2.13.3 --- recipes/fast-dds/all/conandata.yml | 29 +-- recipes/fast-dds/all/conanfile.py | 13 +- ...13.3-0001-fix-find-asio-and-tinyxml2.patch | 31 +++ ...02-add-gettid-macro-for-glibc-compat.patch | 31 +++ .../fast-dds/all/test_package/CMakeLists.txt | 18 +- .../all/test_package/msg2/HelloWorld.cxx | 165 +++++++++++++ .../all/test_package/msg2/HelloWorld.h | 189 +++++++++++++++ .../all/test_package/msg2/HelloWorld.idl | 5 + .../test_package/msg2/HelloWorldCdrAux.hpp | 48 ++++ .../test_package/msg2/HelloWorldCdrAux.ipp | 128 ++++++++++ .../msg2/HelloWorldPubSubTypes.cxx | 221 ++++++++++++++++++ .../test_package/msg2/HelloWorldPubSubTypes.h | 132 +++++++++++ .../all/test_package/test_package.cpp | 6 +- recipes/fast-dds/config.yml | 8 +- 14 files changed, 987 insertions(+), 37 deletions(-) create mode 100644 recipes/fast-dds/all/patches/2.13.3-0001-fix-find-asio-and-tinyxml2.patch create mode 100644 recipes/fast-dds/all/patches/2.13.3-0002-add-gettid-macro-for-glibc-compat.patch create mode 100644 recipes/fast-dds/all/test_package/msg2/HelloWorld.cxx create mode 100644 recipes/fast-dds/all/test_package/msg2/HelloWorld.h create mode 100644 recipes/fast-dds/all/test_package/msg2/HelloWorld.idl create mode 100644 recipes/fast-dds/all/test_package/msg2/HelloWorldCdrAux.hpp create mode 100644 recipes/fast-dds/all/test_package/msg2/HelloWorldCdrAux.ipp create mode 100644 recipes/fast-dds/all/test_package/msg2/HelloWorldPubSubTypes.cxx create mode 100644 recipes/fast-dds/all/test_package/msg2/HelloWorldPubSubTypes.h diff --git a/recipes/fast-dds/all/conandata.yml b/recipes/fast-dds/all/conandata.yml index ab4d2d857dbe4..38fe2366959a0 100644 --- a/recipes/fast-dds/all/conandata.yml +++ b/recipes/fast-dds/all/conandata.yml @@ -1,28 +1,25 @@ sources: + "2.13.3": + url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.13.3.tar.gz" + sha256: "0f33596a8a48b5da4c43a964f2dc70127c6449defd5698944dddbdfb16d2b268" "2.11.2": url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.11.2.tar.gz" sha256: "711f5d7afc6a31a908ab204f8b67045d5e7cab7b4052614b595b37c774f357fd" - "2.11.1": - url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.11.1.tar.gz" - sha256: "3fe8b9f67a13a5d2aa40c0bd10581bd90f0a192b39c71f92ee233ffe584d3374" "2.10.1": url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.10.1.tar.gz" sha256: "2cc2682db5dc7e87684b7f23166e2f32faf8d5c4b4a8c94c6c21211a8a38f553" "2.3.4": url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.3.4.tar.gz" sha256: "b1b2322de0ca55a16495666e3fbda8aca32b888bbfaecda29f2ffc4b072ef7ac" - "2.3.3": - url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.3.3.tar.gz" - sha256: "5ebf27d810c6ab68eef7d42937cd421d85e50509ae96883239979a1b3a2f4f82" - "2.3.2": - url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.3.2.tar.gz" - sha256: "4d8183cf4d37c3de9e6fd28d2850dd08023a9079001c4880b23c95f0d8c0b5ce" patches: - "2.11.2": - - patch_file: "patches/2.11.1-0001-fix-find-asio-and-tinyxml2.patch" + "2.13.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.11.1": + - patch_file: "patches/2.13.3-0002-add-gettid-macro-for-glibc-compat.patch" + patch_type: "conan" + patch_description: "Add gettid macro for glibc compat. See: eProsima/Fast-DDS#4565" + "2.11.2": - patch_file: "patches/2.11.1-0001-fix-find-asio-and-tinyxml2.patch" patch_type: "conan" patch_description: "Fixup find asio and tinyxml2" @@ -34,11 +31,3 @@ patches: - patch_file: "patches/2.3.X-0001-fix-find-asio-and-tinyxml2.patch" patch_type: "conan" patch_description: "Fixup find asio and tinyxml2" - "2.3.3": - - patch_file: "patches/2.3.X-0001-fix-find-asio-and-tinyxml2.patch" - patch_type: "conan" - patch_description: "Fixup find asio and tinyxml2" - "2.3.2": - - patch_file: "patches/2.3.2-0001-fix-find-asio-and-tinyxml2.patch" - patch_type: "conan" - patch_description: "Fixup find asio and tinyxml2" diff --git a/recipes/fast-dds/all/conanfile.py b/recipes/fast-dds/all/conanfile.py index e8ad7b42a13f0..624cba722a1e1 100644 --- a/recipes/fast-dds/all/conanfile.py +++ b/recipes/fast-dds/all/conanfile.py @@ -50,7 +50,7 @@ def _min_cppstd(self): @property def _compilers_minimum_version(self): return { - "gcc": "5", + "gcc": "10", "clang": "3.9", "apple-clang": "8", } @@ -63,6 +63,7 @@ def config_options(self): del self.options.fPIC def configure(self): + self.options["fast-cdr"].shared = self.options.shared if self.options.shared: self.options.rm_safe("fPIC") @@ -70,9 +71,13 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("tinyxml2/9.0.0") - self.requires("asio/1.28.0") # This is now a package_type = header - self.requires("fast-cdr/1.0.27", transitive_headers=True, transitive_libs=True) + self.requires("tinyxml2/10.0.0") + self.requires("asio/1.29.0") # This is now a package_type = header + # Fast-DDS < 2.12 uses Fast-CDR 1.x + if Version(self.version) < "2.12.0": + self.requires("fast-cdr/1.1.0", transitive_headers=True, transitive_libs=True) + else: + self.requires("fast-cdr/2.1.0", transitive_headers=True, transitive_libs=True) self.requires("foonathan-memory/0.7.3") if self.options.with_ssl: self.requires("openssl/[>=1.1 <4]") diff --git a/recipes/fast-dds/all/patches/2.13.3-0001-fix-find-asio-and-tinyxml2.patch b/recipes/fast-dds/all/patches/2.13.3-0001-fix-find-asio-and-tinyxml2.patch new file mode 100644 index 0000000000000..414ee059e1b42 --- /dev/null +++ b/recipes/fast-dds/all/patches/2.13.3-0001-fix-find-asio-and-tinyxml2.patch @@ -0,0 +1,31 @@ +From 7d4f8a198ce34570c3c5b678f74240a8c5b9eae8 Mon Sep 17 00:00:00 2001 +From: Wade Hunkapiller +Date: Mon, 18 Mar 2024 15:57:02 -0500 +Subject: [PATCH] fix find asio and tinyxml2 + +--- + CMakeLists.txt | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5ccb97a1b..ac6630c44 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -234,9 +234,11 @@ if(NOT BUILD_SHARED_LIBS) + set(FASTDDS_STATIC ON) + endif() + +-eprosima_find_package(fastcdr REQUIRED) +-eprosima_find_thirdparty(Asio asio VERSION 1.10.8) +-eprosima_find_thirdparty(TinyXML2 tinyxml2) ++eprosima_find_thirdparty(fastcdr REQUIRED) ++eprosima_find_thirdparty(asio REQUIRED) ++eprosima_find_thirdparty(tinyxml2 REQUIRED) ++set(TINYXML2_LIBRARY tinyxml2::tinyxml2) ++set(Asio_INCLUDE_DIR ${asio_INCLUDE_DIR}) + + find_package(foonathan_memory REQUIRED) + message(STATUS "Found foonathan_memory: ${foonathan_memory_DIR}") +-- +2.39.3 + diff --git a/recipes/fast-dds/all/patches/2.13.3-0002-add-gettid-macro-for-glibc-compat.patch b/recipes/fast-dds/all/patches/2.13.3-0002-add-gettid-macro-for-glibc-compat.patch new file mode 100644 index 0000000000000..da528c2501e0d --- /dev/null +++ b/recipes/fast-dds/all/patches/2.13.3-0002-add-gettid-macro-for-glibc-compat.patch @@ -0,0 +1,31 @@ +From 12de52b7074f653cf9a1d1fed8f9f83a4030319d Mon Sep 17 00:00:00 2001 +From: WADE HUNKAPILLER +Date: Fri, 15 Mar 2024 10:45:45 -0500 +Subject: [PATCH] add gettid macro for glibc compat + +--- + src/cpp/utils/threading/threading_pthread.ipp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/cpp/utils/threading/threading_pthread.ipp b/src/cpp/utils/threading/threading_pthread.ipp +index 75ad33f2d..252f60c77 100644 +--- a/src/cpp/utils/threading/threading_pthread.ipp ++++ b/src/cpp/utils/threading/threading_pthread.ipp +@@ -25,6 +25,14 @@ + #include + #include + ++#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ <= 30))) ++ #include ++ #ifndef SYS_gettid ++ #error "SYS_gettid unavailable on this system" ++ #endif ++ #define gettid() ((pid_t)syscall(SYS_gettid)) ++#endif ++ + namespace eprosima { + + template +-- +2.39.3 + diff --git a/recipes/fast-dds/all/test_package/CMakeLists.txt b/recipes/fast-dds/all/test_package/CMakeLists.txt index d158385cb30f9..fbfb035dfe0a2 100644 --- a/recipes/fast-dds/all/test_package/CMakeLists.txt +++ b/recipes/fast-dds/all/test_package/CMakeLists.txt @@ -3,11 +3,21 @@ project(test_package CXX) find_package(fastdds REQUIRED CONFIG) -add_executable(${PROJECT_NAME} - test_package.cpp +add_executable(${PROJECT_NAME} test_package.cpp) + +if ("${fastdds_VERSION}" VERSION_LESS "2.12.0") + target_sources(${PROJECT_NAME} PRIVATE msg/HelloWorld.cxx - msg/HelloWorldPubSubTypes.cxx -) + msg/HelloWorldPubSubTypes.cxx) + target_include_directories(${PROJECT_NAME} PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/msg) +else() + target_sources(${PROJECT_NAME} PRIVATE + msg2/HelloWorld.cxx + msg2/HelloWorldPubSubTypes.cxx) + target_include_directories(${PROJECT_NAME} PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/msg2) +endif() target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) target_link_libraries(${PROJECT_NAME} fastrtps) diff --git a/recipes/fast-dds/all/test_package/msg2/HelloWorld.cxx b/recipes/fast-dds/all/test_package/msg2/HelloWorld.cxx new file mode 100644 index 0000000000000..ef9331d5d9e6d --- /dev/null +++ b/recipes/fast-dds/all/test_package/msg2/HelloWorld.cxx @@ -0,0 +1,165 @@ +// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! + * @file HelloWorld.cpp + * This source file contains the implementation of the described types in the IDL file. + * + * This file was generated by the tool fastddsgen. + */ + +#ifdef _WIN32 +// Remove linker warning LNK4221 on Visual Studio +namespace { +char dummy; +} // namespace +#endif // _WIN32 + +#include "HelloWorld.h" + +#include + + +#include +using namespace eprosima::fastcdr::exception; + +#include + + + + +HelloWorld::HelloWorld() +{ +} + +HelloWorld::~HelloWorld() +{ +} + +HelloWorld::HelloWorld( + const HelloWorld& x) +{ + m_index = x.m_index; + m_message = x.m_message; +} + +HelloWorld::HelloWorld( + HelloWorld&& x) noexcept +{ + m_index = x.m_index; + m_message = std::move(x.m_message); +} + +HelloWorld& HelloWorld::operator =( + const HelloWorld& x) +{ + + m_index = x.m_index; + m_message = x.m_message; + return *this; +} + +HelloWorld& HelloWorld::operator =( + HelloWorld&& x) noexcept +{ + + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; +} + +bool HelloWorld::operator ==( + const HelloWorld& x) const +{ + return (m_index == x.m_index && + m_message == x.m_message); +} + +bool HelloWorld::operator !=( + const HelloWorld& x) const +{ + return !(*this == x); +} + +/*! + * @brief This function sets a value in member index + * @param _index New value for member index + */ +void HelloWorld::index( + uint32_t _index) +{ + m_index = _index; +} + +/*! + * @brief This function returns the value of member index + * @return Value of member index + */ +uint32_t HelloWorld::index() const +{ + return m_index; +} + +/*! + * @brief This function returns a reference to member index + * @return Reference to member index + */ +uint32_t& HelloWorld::index() +{ + return m_index; +} + + +/*! + * @brief This function copies the value in member message + * @param _message New value to be copied in member message + */ +void HelloWorld::message( + const std::string& _message) +{ + m_message = _message; +} + +/*! + * @brief This function moves the value in member message + * @param _message New value to be moved in member message + */ +void HelloWorld::message( + std::string&& _message) +{ + m_message = std::move(_message); +} + +/*! + * @brief This function returns a constant reference to member message + * @return Constant reference to member message + */ +const std::string& HelloWorld::message() const +{ + return m_message; +} + +/*! + * @brief This function returns a reference to member message + * @return Reference to member message + */ +std::string& HelloWorld::message() +{ + return m_message; +} + + +// Include auxiliary functions like for serializing/deserializing. +#include "HelloWorldCdrAux.ipp" + diff --git a/recipes/fast-dds/all/test_package/msg2/HelloWorld.h b/recipes/fast-dds/all/test_package/msg2/HelloWorld.h new file mode 100644 index 0000000000000..b95bcb5b146dd --- /dev/null +++ b/recipes/fast-dds/all/test_package/msg2/HelloWorld.h @@ -0,0 +1,189 @@ +// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! + * @file HelloWorld.h + * This header file contains the declaration of the described types in the IDL file. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ +#define _FAST_DDS_GENERATED_HELLOWORLD_H_ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + + + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#define eProsima_user_DllExport __declspec( dllexport ) +#else +#define eProsima_user_DllExport +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define eProsima_user_DllExport +#endif // _WIN32 + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#if defined(HELLOWORLD_SOURCE) +#define HELLOWORLD_DllAPI __declspec( dllexport ) +#else +#define HELLOWORLD_DllAPI __declspec( dllimport ) +#endif // HELLOWORLD_SOURCE +#else +#define HELLOWORLD_DllAPI +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define HELLOWORLD_DllAPI +#endif // _WIN32 + +namespace eprosima { +namespace fastcdr { +class Cdr; +class CdrSizeCalculator; +} // namespace fastcdr +} // namespace eprosima + + + + + +/*! + * @brief This class represents the structure HelloWorld defined by the user in the IDL file. + * @ingroup HelloWorld + */ +class HelloWorld +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport HelloWorld(); + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~HelloWorld(); + + /*! + * @brief Copy constructor. + * @param x Reference to the object HelloWorld that will be copied. + */ + eProsima_user_DllExport HelloWorld( + const HelloWorld& x); + + /*! + * @brief Move constructor. + * @param x Reference to the object HelloWorld that will be copied. + */ + eProsima_user_DllExport HelloWorld( + HelloWorld&& x) noexcept; + + /*! + * @brief Copy assignment. + * @param x Reference to the object HelloWorld that will be copied. + */ + eProsima_user_DllExport HelloWorld& operator =( + const HelloWorld& x); + + /*! + * @brief Move assignment. + * @param x Reference to the object HelloWorld that will be copied. + */ + eProsima_user_DllExport HelloWorld& operator =( + HelloWorld&& x) noexcept; + + /*! + * @brief Comparison operator. + * @param x HelloWorld object to compare. + */ + eProsima_user_DllExport bool operator ==( + const HelloWorld& x) const; + + /*! + * @brief Comparison operator. + * @param x HelloWorld object to compare. + */ + eProsima_user_DllExport bool operator !=( + const HelloWorld& x) const; + + /*! + * @brief This function sets a value in member index + * @param _index New value for member index + */ + eProsima_user_DllExport void index( + uint32_t _index); + + /*! + * @brief This function returns the value of member index + * @return Value of member index + */ + eProsima_user_DllExport uint32_t index() const; + + /*! + * @brief This function returns a reference to member index + * @return Reference to member index + */ + eProsima_user_DllExport uint32_t& index(); + + + /*! + * @brief This function copies the value in member message + * @param _message New value to be copied in member message + */ + eProsima_user_DllExport void message( + const std::string& _message); + + /*! + * @brief This function moves the value in member message + * @param _message New value to be moved in member message + */ + eProsima_user_DllExport void message( + std::string&& _message); + + /*! + * @brief This function returns a constant reference to member message + * @return Constant reference to member message + */ + eProsima_user_DllExport const std::string& message() const; + + /*! + * @brief This function returns a reference to member message + * @return Reference to member message + */ + eProsima_user_DllExport std::string& message(); + +private: + + uint32_t m_index{0}; + std::string m_message; + +}; + +#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ + + + diff --git a/recipes/fast-dds/all/test_package/msg2/HelloWorld.idl b/recipes/fast-dds/all/test_package/msg2/HelloWorld.idl new file mode 100644 index 0000000000000..0fd2c355aeefa --- /dev/null +++ b/recipes/fast-dds/all/test_package/msg2/HelloWorld.idl @@ -0,0 +1,5 @@ +struct HelloWorld +{ + unsigned long index; + string message; +}; diff --git a/recipes/fast-dds/all/test_package/msg2/HelloWorldCdrAux.hpp b/recipes/fast-dds/all/test_package/msg2/HelloWorldCdrAux.hpp new file mode 100644 index 0000000000000..9f346d306beca --- /dev/null +++ b/recipes/fast-dds/all/test_package/msg2/HelloWorldCdrAux.hpp @@ -0,0 +1,48 @@ +// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! + * @file HelloWorldCdrAux.hpp + * This source file contains some definitions of CDR related functions. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ +#define _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ + +#include "HelloWorld.h" + +constexpr uint32_t HelloWorld_max_cdr_typesize {268UL}; +constexpr uint32_t HelloWorld_max_key_cdr_typesize {0UL}; + + +namespace eprosima { +namespace fastcdr { + +class Cdr; +class CdrSizeCalculator; + + + +eProsima_user_DllExport void serialize_key( + eprosima::fastcdr::Cdr& scdr, + const HelloWorld& data); + + +} // namespace fastcdr +} // namespace eprosima + +#endif // _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ + diff --git a/recipes/fast-dds/all/test_package/msg2/HelloWorldCdrAux.ipp b/recipes/fast-dds/all/test_package/msg2/HelloWorldCdrAux.ipp new file mode 100644 index 0000000000000..42e91f3cc384a --- /dev/null +++ b/recipes/fast-dds/all/test_package/msg2/HelloWorldCdrAux.ipp @@ -0,0 +1,128 @@ +// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! + * @file HelloWorldCdrAux.ipp + * This source file contains some declarations of CDR related functions. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_IPP_ +#define _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_IPP_ + +#include "HelloWorldCdrAux.hpp" + +#include +#include + + +#include +using namespace eprosima::fastcdr::exception; + +namespace eprosima { +namespace fastcdr { + + + +template<> +eProsima_user_DllExport size_t calculate_serialized_size( + eprosima::fastcdr::CdrSizeCalculator& calculator, + const HelloWorld& data, + size_t& current_alignment) +{ + static_cast(data); + + eprosima::fastcdr::EncodingAlgorithmFlag previous_encoding = calculator.get_encoding(); + size_t calculated_size {calculator.begin_calculate_type_serialized_size( + eprosima::fastcdr::CdrVersion::XCDRv2 == calculator.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR, + current_alignment)}; + + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + data.index(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + data.message(), current_alignment); + + + calculated_size += calculator.end_calculate_type_serialized_size(previous_encoding, current_alignment); + + return calculated_size; +} + +template<> +eProsima_user_DllExport void serialize( + eprosima::fastcdr::Cdr& scdr, + const HelloWorld& data) +{ + eprosima::fastcdr::Cdr::state current_state(scdr); + scdr.begin_serialize_type(current_state, + eprosima::fastcdr::CdrVersion::XCDRv2 == scdr.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR); + + scdr + << eprosima::fastcdr::MemberId(0) << data.index() + << eprosima::fastcdr::MemberId(1) << data.message() +; + scdr.end_serialize_type(current_state); +} + +template<> +eProsima_user_DllExport void deserialize( + eprosima::fastcdr::Cdr& cdr, + HelloWorld& data) +{ + cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR, + [&data](eprosima::fastcdr::Cdr& dcdr, const eprosima::fastcdr::MemberId& mid) -> bool + { + bool ret_value = true; + switch (mid.id) + { + case 0: + dcdr >> data.index(); + break; + + case 1: + dcdr >> data.message(); + break; + + default: + ret_value = false; + break; + } + return ret_value; + }); +} + +void serialize_key( + eprosima::fastcdr::Cdr& scdr, + const HelloWorld& data) +{ + static_cast(scdr); + static_cast(data); +} + + + +} // namespace fastcdr +} // namespace eprosima + +#endif // _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_IPP_ + diff --git a/recipes/fast-dds/all/test_package/msg2/HelloWorldPubSubTypes.cxx b/recipes/fast-dds/all/test_package/msg2/HelloWorldPubSubTypes.cxx new file mode 100644 index 0000000000000..85cb477896e60 --- /dev/null +++ b/recipes/fast-dds/all/test_package/msg2/HelloWorldPubSubTypes.cxx @@ -0,0 +1,221 @@ +// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! + * @file HelloWorldPubSubTypes.cpp + * This header file contains the implementation of the serialization functions. + * + * This file was generated by the tool fastddsgen. + */ + + +#include + +#include "HelloWorldPubSubTypes.h" +#include "HelloWorldCdrAux.hpp" + +using SerializedPayload_t = eprosima::fastrtps::rtps::SerializedPayload_t; +using InstanceHandle_t = eprosima::fastrtps::rtps::InstanceHandle_t; +using DataRepresentationId_t = eprosima::fastdds::dds::DataRepresentationId_t; + + + +HelloWorldPubSubType::HelloWorldPubSubType() +{ + setName("HelloWorld"); + uint32_t type_size = +#if FASTCDR_VERSION_MAJOR == 1 + static_cast(HelloWorld::getMaxCdrSerializedSize()); +#else + HelloWorld_max_cdr_typesize; +#endif + type_size += static_cast(eprosima::fastcdr::Cdr::alignment(type_size, 4)); /* possible submessage alignment */ + m_typeSize = type_size + 4; /*encapsulation*/ + m_isGetKeyDefined = false; + uint32_t keyLength = HelloWorld_max_key_cdr_typesize > 16 ? HelloWorld_max_key_cdr_typesize : 16; + m_keyBuffer = reinterpret_cast(malloc(keyLength)); + memset(m_keyBuffer, 0, keyLength); +} + +HelloWorldPubSubType::~HelloWorldPubSubType() +{ + if (m_keyBuffer != nullptr) + { + free(m_keyBuffer); + } +} + +bool HelloWorldPubSubType::serialize( + void* data, + SerializedPayload_t* payload, + DataRepresentationId_t data_representation) +{ + HelloWorld* p_type = static_cast(data); + + // Object that manages the raw buffer. + eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->max_size); + // Object that serializes the data. + eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::CdrVersion::XCDRv1 : eprosima::fastcdr::CdrVersion::XCDRv2); + payload->encapsulation = ser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; +#if FASTCDR_VERSION_MAJOR > 1 + ser.set_encoding_flag( + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR : + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2); +#endif // FASTCDR_VERSION_MAJOR > 1 + + try + { + // Serialize encapsulation + ser.serialize_encapsulation(); + // Serialize the object. + ser << *p_type; + } + catch (eprosima::fastcdr::exception::Exception& /*exception*/) + { + return false; + } + + // Get the serialized length +#if FASTCDR_VERSION_MAJOR == 1 + payload->length = static_cast(ser.getSerializedDataLength()); +#else + payload->length = static_cast(ser.get_serialized_data_length()); +#endif // FASTCDR_VERSION_MAJOR == 1 + return true; +} + +bool HelloWorldPubSubType::deserialize( + SerializedPayload_t* payload, + void* data) +{ + try + { + // Convert DATA to pointer of your type + HelloWorld* p_type = static_cast(data); + + // Object that manages the raw buffer. + eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->length); + + // Object that deserializes the data. + eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN +#if FASTCDR_VERSION_MAJOR == 1 + , eprosima::fastcdr::Cdr::CdrType::DDS_CDR +#endif // FASTCDR_VERSION_MAJOR == 1 + ); + + // Deserialize encapsulation. + deser.read_encapsulation(); + payload->encapsulation = deser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; + + // Deserialize the object. + deser >> *p_type; + } + catch (eprosima::fastcdr::exception::Exception& /*exception*/) + { + return false; + } + + return true; +} + +std::function HelloWorldPubSubType::getSerializedSizeProvider( + void* data, + DataRepresentationId_t data_representation) +{ + return [data, data_representation]() -> uint32_t + { +#if FASTCDR_VERSION_MAJOR == 1 + static_cast(data_representation); + return static_cast(type::getCdrSerializedSize(*static_cast(data))) + + 4u /*encapsulation*/; +#else + try + { + eprosima::fastcdr::CdrSizeCalculator calculator( + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2); + size_t current_alignment {0}; + return static_cast(calculator.calculate_serialized_size( + *static_cast(data), current_alignment)) + + 4u /*encapsulation*/; + } + catch (eprosima::fastcdr::exception::Exception& /*exception*/) + { + return 0; + } +#endif // FASTCDR_VERSION_MAJOR == 1 + }; +} + +void* HelloWorldPubSubType::createData() +{ + return reinterpret_cast(new HelloWorld()); +} + +void HelloWorldPubSubType::deleteData( + void* data) +{ + delete(reinterpret_cast(data)); +} + +bool HelloWorldPubSubType::getKey( + void* data, + InstanceHandle_t* handle, + bool force_md5) +{ + if (!m_isGetKeyDefined) + { + return false; + } + + HelloWorld* p_type = static_cast(data); + + // Object that manages the raw buffer. + eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(m_keyBuffer), + HelloWorld_max_key_cdr_typesize); + + // Object that serializes the data. + eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS, eprosima::fastcdr::CdrVersion::XCDRv1); +#if FASTCDR_VERSION_MAJOR == 1 + p_type->serializeKey(ser); +#else + eprosima::fastcdr::serialize_key(ser, *p_type); +#endif // FASTCDR_VERSION_MAJOR == 1 + if (force_md5 || HelloWorld_max_key_cdr_typesize > 16) + { + m_md5.init(); +#if FASTCDR_VERSION_MAJOR == 1 + m_md5.update(m_keyBuffer, static_cast(ser.getSerializedDataLength())); +#else + m_md5.update(m_keyBuffer, static_cast(ser.get_serialized_data_length())); +#endif // FASTCDR_VERSION_MAJOR == 1 + m_md5.finalize(); + for (uint8_t i = 0; i < 16; ++i) + { + handle->value[i] = m_md5.digest[i]; + } + } + else + { + for (uint8_t i = 0; i < 16; ++i) + { + handle->value[i] = m_keyBuffer[i]; + } + } + return true; +} + diff --git a/recipes/fast-dds/all/test_package/msg2/HelloWorldPubSubTypes.h b/recipes/fast-dds/all/test_package/msg2/HelloWorldPubSubTypes.h new file mode 100644 index 0000000000000..cb61cd6ba2335 --- /dev/null +++ b/recipes/fast-dds/all/test_package/msg2/HelloWorldPubSubTypes.h @@ -0,0 +1,132 @@ +// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! + * @file HelloWorldPubSubTypes.h + * This header file contains the declaration of the serialization functions. + * + * This file was generated by the tool fastddsgen. + */ + + +#ifndef _FAST_DDS_GENERATED_HELLOWORLD_PUBSUBTYPES_H_ +#define _FAST_DDS_GENERATED_HELLOWORLD_PUBSUBTYPES_H_ + +#include +#include +#include +#include +#include + +#include "HelloWorld.h" + + +#if !defined(GEN_API_VER) || (GEN_API_VER != 2) +#error \ + Generated HelloWorld is not compatible with current installed Fast DDS. Please, regenerate it with fastddsgen. +#endif // GEN_API_VER + + + + +/*! + * @brief This class represents the TopicDataType of the type HelloWorld defined by the user in the IDL file. + * @ingroup HelloWorld + */ +class HelloWorldPubSubType : public eprosima::fastdds::dds::TopicDataType +{ +public: + + typedef HelloWorld type; + + eProsima_user_DllExport HelloWorldPubSubType(); + + eProsima_user_DllExport ~HelloWorldPubSubType() override; + + eProsima_user_DllExport bool serialize( + void* data, + eprosima::fastrtps::rtps::SerializedPayload_t* payload) override + { + return serialize(data, payload, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION); + } + + eProsima_user_DllExport bool serialize( + void* data, + eprosima::fastrtps::rtps::SerializedPayload_t* payload, + eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; + + eProsima_user_DllExport bool deserialize( + eprosima::fastrtps::rtps::SerializedPayload_t* payload, + void* data) override; + + eProsima_user_DllExport std::function getSerializedSizeProvider( + void* data) override + { + return getSerializedSizeProvider(data, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION); + } + + eProsima_user_DllExport std::function getSerializedSizeProvider( + void* data, + eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; + + eProsima_user_DllExport bool getKey( + void* data, + eprosima::fastrtps::rtps::InstanceHandle_t* ihandle, + bool force_md5 = false) override; + + eProsima_user_DllExport void* createData() override; + + eProsima_user_DllExport void deleteData( + void* data) override; + +#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED + eProsima_user_DllExport inline bool is_bounded() const override + { + return false; + } + +#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED + +#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN + eProsima_user_DllExport inline bool is_plain() const override + { + return false; + } + + eProsima_user_DllExport inline bool is_plain( + eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override + { + static_cast(data_representation); + return false; + } + +#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN + +#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE + eProsima_user_DllExport inline bool construct_sample( + void* memory) const override + { + static_cast(memory); + return false; + } + +#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE + + MD5 m_md5; + unsigned char* m_keyBuffer; + +}; + +#endif // _FAST_DDS_GENERATED_HELLOWORLD_PUBSUBTYPES_H_ + diff --git a/recipes/fast-dds/all/test_package/test_package.cpp b/recipes/fast-dds/all/test_package/test_package.cpp index 89ac973375f14..f183dbe4586b0 100644 --- a/recipes/fast-dds/all/test_package/test_package.cpp +++ b/recipes/fast-dds/all/test_package/test_package.cpp @@ -5,12 +5,12 @@ #include #include -#include "msg/HelloWorld.h" -#include "msg/HelloWorldPubSubTypes.h" +#include "HelloWorld.h" +#include "HelloWorldPubSubTypes.h" int main() { - // Define msg to send + // Define msg to send HelloWorld hello; hello.index(0); hello.message("HelloWorld"); diff --git a/recipes/fast-dds/config.yml b/recipes/fast-dds/config.yml index 1a933c21ca9ca..7b157442d779f 100644 --- a/recipes/fast-dds/config.yml +++ b/recipes/fast-dds/config.yml @@ -1,13 +1,9 @@ versions: - "2.11.2": + "2.13.3": folder: all - "2.11.1": + "2.11.2": folder: all "2.10.1": folder: all "2.3.4": folder: all - "2.3.3": - folder: all - "2.3.2": - folder: all From 3328030438bd56634802d0517414cf97227e9b78 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 19 Mar 2024 15:50:11 +0100 Subject: [PATCH 281/405] (#23141) imagl: use libpng version range --- recipes/imagl/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/imagl/all/conanfile.py b/recipes/imagl/all/conanfile.py index e756a56a2d548..485f56d442ad3 100644 --- a/recipes/imagl/all/conanfile.py +++ b/recipes/imagl/all/conanfile.py @@ -65,7 +65,7 @@ def layout(self): def requirements(self): if self.options.with_png: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self._supports_jpeg and self.options.with_jpeg: self.requires("libjpeg/9e") From 5d2702f320094f6745b55a00c9ec08d7a628f487 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 19 Mar 2024 16:08:16 +0100 Subject: [PATCH 282/405] (#23142) guetzli: use libpng version range --- recipes/guetzli/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/guetzli/all/conanfile.py b/recipes/guetzli/all/conanfile.py index 55d0965a2f54b..1ca0fe9e70fdd 100644 --- a/recipes/guetzli/all/conanfile.py +++ b/recipes/guetzli/all/conanfile.py @@ -25,7 +25,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") def package_id(self): del self.info.settings.compiler From d80f708e98f5820a29d2ecfc76c8927399356001 Mon Sep 17 00:00:00 2001 From: Ivo Hedtke Date: Tue, 19 Mar 2024 16:28:10 +0100 Subject: [PATCH 283/405] (#23019) Add yoga version 3.0.2 * Add yoga version 3.0.0 * yoga 3 needs a c++20 header * Deactivate warnings as errors * v3 required C++20 * Require more recent compilers due to std::bit_cast * Update from yoga 3.0.0 to yoga 3.0.2 --- recipes/yoga/all/conandata.yml | 7 +++++++ recipes/yoga/all/conanfile.py | 21 ++++++++++++------- .../yoga/all/patches/0001-delete-tests.patch | 5 +---- recipes/yoga/config.yml | 2 ++ 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/recipes/yoga/all/conandata.yml b/recipes/yoga/all/conandata.yml index 17011be7f593d..4491f60c4cea8 100644 --- a/recipes/yoga/all/conandata.yml +++ b/recipes/yoga/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.0.2": + url: "https://github.com/facebook/yoga/archive/refs/tags/v3.0.2.tar.gz" + sha256: "73a81c51d9ceb5b95cd3abcafeb4c840041801d59f5048dacce91fbaab0cc6f9" "2.0.1": url: "https://github.com/facebook/yoga/archive/refs/tags/v2.0.1.tar.gz" sha256: "4c80663b557027cdaa6a836cc087d735bb149b8ff27cbe8442fc5e09cec5ed92" @@ -6,6 +9,10 @@ sources: url: "https://github.com/facebook/yoga/archive/refs/tags/v2.0.0.tar.gz" sha256: "29eaf05191dd857f76b6db97c77cce66db3c0067c88bd5e052909386ea66b8c5" patches: + "3.0.2": + - patch_file: "patches/0001-delete-tests.patch" + patch_description: "Delete test targets from cmake" + patch_type: "conan" "2.0.1": - patch_file: "patches/0001-delete-tests.patch" patch_description: "Delete test targets from cmake" diff --git a/recipes/yoga/all/conanfile.py b/recipes/yoga/all/conanfile.py index e8249b9860f59..f2a7303076d24 100644 --- a/recipes/yoga/all/conanfile.py +++ b/recipes/yoga/all/conanfile.py @@ -26,15 +26,22 @@ class YogaConan(ConanFile): @property def _min_cppstd(self): - return 14 + return 20 if Version(self.version) >= "3.0.0" else 14 @property def _compilers_minimum_version(self): - return { - "gcc": "5", - "clang": "3.4", - "apple-clang": "10", - } + if Version(self.version) >= "3.0.0": + return { # C++20 with bit_cast + "gcc": "11", + "clang": "14", + "apple-clang": "14" + } + else: + return { + "gcc": "5", + "clang": "3.4", + "apple-clang": "10", + } def export_sources(self): export_conandata_patches(self) @@ -49,7 +56,7 @@ def layout(self): def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, self._min_cppstd) - check_min_vs(self, 191) + check_min_vs(self, 192 if Version(self.version) >= "3.0.0" else 191) if not is_msvc(self): minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version and Version(self.settings.compiler.version) < minimum_version: diff --git a/recipes/yoga/all/patches/0001-delete-tests.patch b/recipes/yoga/all/patches/0001-delete-tests.patch index d3a76211634ca..bae612fca66b5 100644 --- a/recipes/yoga/all/patches/0001-delete-tests.patch +++ b/recipes/yoga/all/patches/0001-delete-tests.patch @@ -2,11 +2,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index f4ce73cc..9f414127 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -10,7 +10,6 @@ set(CMAKE_VERBOSE_MAKEFILE on) +@@ -10,4 +10,3 @@ set(CMAKE_VERBOSE_MAKEFILE on) include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/project-defaults.cmake) add_subdirectory(yoga) -add_subdirectory(tests) - - # cmake install config - include(GNUInstallDirs) diff --git a/recipes/yoga/config.yml b/recipes/yoga/config.yml index 184166496d26e..c6a903df77248 100644 --- a/recipes/yoga/config.yml +++ b/recipes/yoga/config.yml @@ -1,4 +1,6 @@ versions: + "3.0.2": + folder: all "2.0.1": folder: all "2.0.0": From d43ed39b4bd7e41a589f3e44b090d2bea6c4548f Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 19 Mar 2024 16:48:19 +0100 Subject: [PATCH 284/405] (#23144) cimg: use libpng version range --- recipes/cimg/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cimg/all/conanfile.py b/recipes/cimg/all/conanfile.py index b626bca664ae6..fa4663a48bbd0 100644 --- a/recipes/cimg/all/conanfile.py +++ b/recipes/cimg/all/conanfile.py @@ -70,7 +70,7 @@ def requirements(self): if self.options.enable_openexr: self.requires("openexr/3.2.1") if self.options.enable_png: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.options.enable_tiff: self.requires("libtiff/4.6.0") if self.options.enable_ffmpeg: From 767bb0282c657345b91afea1d4853380ed9ab3db Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Tue, 19 Mar 2024 11:07:47 -0500 Subject: [PATCH 285/405] (#23111) pulseaudio/17.0: Add missing tool requirement for m4 --- recipes/pulseaudio/meson/conanfile.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/pulseaudio/meson/conanfile.py b/recipes/pulseaudio/meson/conanfile.py index a9700e8c612e3..470080481b438 100644 --- a/recipes/pulseaudio/meson/conanfile.py +++ b/recipes/pulseaudio/meson/conanfile.py @@ -76,9 +76,10 @@ def validate(self): ) def build_requirements(self): - self.tool_requires("meson/1.3.1") + self.tool_requires("m4/1.4.19") + self.tool_requires("meson/1.3.2") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 71ae930b1100ccb886911e8333d79350aaba2e01 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 19 Mar 2024 17:27:50 +0100 Subject: [PATCH 286/405] (#23120) sail: use version range for libpng --- recipes/sail/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/sail/all/conanfile.py b/recipes/sail/all/conanfile.py index 85a8cadc9a916..7651e9b295a4e 100644 --- a/recipes/sail/all/conanfile.py +++ b/recipes/sail/all/conanfile.py @@ -58,7 +58,7 @@ def requirements(self): if self.options.with_highest_priority_codecs: self.requires("giflib/5.2.1") self.requires("libjpeg/9e") - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") self.requires("libtiff/4.6.0") if self.options.with_high_priority_codecs: if Version(self.version) >= "0.9.1": From ebea754efa941d7d8fda3a70c3994fb6a2dc4f72 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 19 Mar 2024 17:47:49 +0100 Subject: [PATCH 287/405] (#23128) pcl: use libpng version range --- recipes/pcl/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/pcl/all/conanfile.py b/recipes/pcl/all/conanfile.py index 662a6430c2633..2b324ce7e9270 100644 --- a/recipes/pcl/all/conanfile.py +++ b/recipes/pcl/all/conanfile.py @@ -367,7 +367,7 @@ def requirements(self): if self._is_enabled("flann"): self.requires("flann/1.9.2", transitive_headers=True) if self._is_enabled("png"): - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self._is_enabled("qhull"): self.requires("qhull/8.0.1", transitive_headers=True) if self._is_enabled("qt"): From fc88753fea140dc87f85618d7b0253dfa3856f89 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 19 Mar 2024 18:11:16 +0100 Subject: [PATCH 288/405] (#23133) libgd: use libpng version range --- recipes/libgd/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libgd/all/conanfile.py b/recipes/libgd/all/conanfile.py index 3c72e55bd83d5..0c18187731da2 100644 --- a/recipes/libgd/all/conanfile.py +++ b/recipes/libgd/all/conanfile.py @@ -57,7 +57,7 @@ def layout(self): def requirements(self): self.requires("zlib/[>=1.2.11 <2]") if self.options.with_png: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if is_msvc(self): self.requires("getopt-for-visual-studio/20200201") if self.options.with_jpeg: From 9696912ff84dc03ffebd7fd4699921b29c521b6b Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 19 Mar 2024 18:28:20 +0100 Subject: [PATCH 289/405] (#23146) butteraugli: use libpng version range --- recipes/butteraugli/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/butteraugli/all/conanfile.py b/recipes/butteraugli/all/conanfile.py index 35cd9c65cf914..113630ce7e2ab 100644 --- a/recipes/butteraugli/all/conanfile.py +++ b/recipes/butteraugli/all/conanfile.py @@ -45,7 +45,7 @@ def layout(self): def requirements(self): if self.options.tool: - self.requires("libpng/1.6.39") + self.requires("libpng/[>=1.6 <2]") self.requires("libjpeg/9e") def validate(self): From 56d3295f54bd3f44b7161e577999a9a9118c2e85 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 20 Mar 2024 02:48:43 +0900 Subject: [PATCH 290/405] (#23159) dnet: add version 1.18.0 --- recipes/dnet/all/conandata.yml | 3 +++ recipes/dnet/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/dnet/all/conandata.yml b/recipes/dnet/all/conandata.yml index 6e95e35e1a154..f4b4a52916d3d 100644 --- a/recipes/dnet/all/conandata.yml +++ b/recipes/dnet/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.18.0": + url: "https://github.com/ofalk/libdnet/archive/refs/tags/libdnet-1.18.0.tar.gz" + sha256: "a4a82275c7d83b85b1daac6ebac9461352731922161f1dcdcccd46c318f583c9" "1.17.0": url: "https://github.com/ofalk/libdnet/archive/refs/tags/libdnet-1.17.0.tar.gz" sha256: "6be1ed0763151ede4c9665a403f1c9d974b2ffab2eacdb26b22078e461aae1dc" diff --git a/recipes/dnet/config.yml b/recipes/dnet/config.yml index aad66aeff535b..a8840ca57e8bd 100644 --- a/recipes/dnet/config.yml +++ b/recipes/dnet/config.yml @@ -1,3 +1,5 @@ versions: + "1.18.0": + folder: "all" "1.17.0": folder: "all" From 69a28a49ffca8a7330a5456f3faa9ed1200e9d2c Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 19 Mar 2024 19:08:27 +0100 Subject: [PATCH 291/405] (#23123) pngpp: use libpng version range --- recipes/pngpp/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/pngpp/all/conanfile.py b/recipes/pngpp/all/conanfile.py index 57559867af002..105bf9fe8f655 100644 --- a/recipes/pngpp/all/conanfile.py +++ b/recipes/pngpp/all/conanfile.py @@ -22,7 +22,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") def package_id(self): self.info.clear() From dc53bb656a53459c8f32bb6756096ab80d2eaaa4 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 19 Mar 2024 19:27:40 +0100 Subject: [PATCH 292/405] (#23124) exiv2: use version range for libpng --- recipes/exiv2/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/exiv2/all/conanfile.py b/recipes/exiv2/all/conanfile.py index 8957750b23fe0..84f13196b12f9 100644 --- a/recipes/exiv2/all/conanfile.py +++ b/recipes/exiv2/all/conanfile.py @@ -73,7 +73,7 @@ def layout(self): def requirements(self): self.requires("libiconv/1.17") if self.options.with_png: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") self.requires("zlib/[>=1.2.11 <2]") if self.options.with_xmp == "bundled": self.requires("expat/2.5.0") From 06e1d8ae5eef01e5071cc395d1ebc3358c98c20e Mon Sep 17 00:00:00 2001 From: Samuel Beer <52746180+MartyMcFlyInTheSky@users.noreply.github.com> Date: Tue, 19 Mar 2024 19:50:17 +0100 Subject: [PATCH 293/405] (#23038) added libfork * added libfork * update recipe to 3.7.2 Signed-off-by: Uilian Ries * update min compiler required Signed-off-by: Uilian Ries * update min compiler required Signed-off-by: Uilian Ries * update min compiler required Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries --- recipes/libfork/all/conandata.yml | 4 + recipes/libfork/all/conanfile.py | 74 +++++++++++++++++++ .../libfork/all/test_package/CMakeLists.txt | 8 ++ recipes/libfork/all/test_package/conanfile.py | 27 +++++++ .../libfork/all/test_package/test_package.cpp | 24 ++++++ recipes/libfork/config.yml | 3 + 6 files changed, 140 insertions(+) create mode 100644 recipes/libfork/all/conandata.yml create mode 100644 recipes/libfork/all/conanfile.py create mode 100644 recipes/libfork/all/test_package/CMakeLists.txt create mode 100644 recipes/libfork/all/test_package/conanfile.py create mode 100644 recipes/libfork/all/test_package/test_package.cpp create mode 100644 recipes/libfork/config.yml diff --git a/recipes/libfork/all/conandata.yml b/recipes/libfork/all/conandata.yml new file mode 100644 index 0000000000000..29f8392061e5d --- /dev/null +++ b/recipes/libfork/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "3.7.2": + url: "https://github.com/conorwilliams/libfork/archive/v3.7.2.tar.gz" + sha256: "0c4fbb7a6000c0a93b219b385d9834bd07bc5f19d89aa41ba8e27b5723694b15" diff --git a/recipes/libfork/all/conanfile.py b/recipes/libfork/all/conanfile.py new file mode 100644 index 0000000000000..003c113741bce --- /dev/null +++ b/recipes/libfork/all/conanfile.py @@ -0,0 +1,74 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.layout import basic_layout +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.53.0" + + +class PackageConan(ConanFile): + name = "libfork" + description = "A bleeding-edge, lock-free, wait-free, continuation-stealing tasking library." + license = "MPL-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ConorWilliams/libfork" + topics = ("multithreading", + "fork-join", + "parallelism", + "framework", + "continuation-stealing", + "lockfree", + "wait-free", + "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): + # https://en.cppreference.com/w/cpp/utility/source_location requires new compilers + return { + "apple-clang": "15", + "clang": "15", + "gcc": "11", + "msvc": "192.10", + "Visual Studio": "16.10", + } + + 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.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "*.hpp", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["pthread"] diff --git a/recipes/libfork/all/test_package/CMakeLists.txt b/recipes/libfork/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..23f7d6ffa9876 --- /dev/null +++ b/recipes/libfork/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) + +find_package(libfork REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE libfork::libfork) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/libfork/all/test_package/conanfile.py b/recipes/libfork/all/test_package/conanfile.py new file mode 100644 index 0000000000000..502059e940b33 --- /dev/null +++ b/recipes/libfork/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run + + +class LibforkPackageTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + cmd = os.path.join(self.cpp.build.bindir, "test_package") + self.run(cmd, env="conanrun") diff --git a/recipes/libfork/all/test_package/test_package.cpp b/recipes/libfork/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..70ecda89a8887 --- /dev/null +++ b/recipes/libfork/all/test_package/test_package.cpp @@ -0,0 +1,24 @@ +#include +#include + +#include "libfork.hpp" + +namespace { + constexpr auto hello_async_world = [](auto /* self */) -> lf::task { + std::cout << "Hello, async world!" << std::endl; + co_return 0; + }; +} + +auto main() -> int { + try { + return lf::sync_wait(lf::lazy_pool{}, hello_async_world); + } catch (std::exception const &e) { + std::cerr << "Caught exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } catch (...) { + std::cerr << "Caught unknown exception." << std::endl; + return EXIT_FAILURE; + } + return EXIT_SUCCESS; +} diff --git a/recipes/libfork/config.yml b/recipes/libfork/config.yml new file mode 100644 index 0000000000000..a47dcb81bcc23 --- /dev/null +++ b/recipes/libfork/config.yml @@ -0,0 +1,3 @@ +versions: + "3.7.2": + folder: all From 0bbb7a4758e9c513e4f9df25db9bcc281d5a475c Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 19 Mar 2024 20:07:40 +0100 Subject: [PATCH 294/405] (#23127) pdf-writer: use libpng version range --- recipes/pdf-writer/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/pdf-writer/all/conanfile.py b/recipes/pdf-writer/all/conanfile.py index 976af4f35f825..a535f209e9a7b 100644 --- a/recipes/pdf-writer/all/conanfile.py +++ b/recipes/pdf-writer/all/conanfile.py @@ -56,7 +56,7 @@ def requirements(self): if self.options.with_png: self.requires("libjpeg/9e") if self.options.with_jpeg: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.options.with_tiff: self.requires("libtiff/4.6.0") From 2f7516caa6c021e1923a613f117c10bedcbb06aa Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 19 Mar 2024 20:27:36 +0100 Subject: [PATCH 295/405] (#23132) libharu: use libpng version range --- recipes/libharu/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libharu/all/conanfile.py b/recipes/libharu/all/conanfile.py index c35f205e346da..172d75e65c04a 100644 --- a/recipes/libharu/all/conanfile.py +++ b/recipes/libharu/all/conanfile.py @@ -48,7 +48,7 @@ def layout(self): def requirements(self): self.requires("zlib/[>=1.2.11 <2]") - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") def source(self): get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) From 5c9531d33e9cde95bdd8da160b352ebefc1d8ddc Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 20 Mar 2024 04:48:19 +0900 Subject: [PATCH 296/405] (#23160) fast_float: add version 6.1.1 --- recipes/fast_float/all/conandata.yml | 3 +++ recipes/fast_float/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/fast_float/all/conandata.yml b/recipes/fast_float/all/conandata.yml index 3a81a600d3f70..a35ee1375a199 100644 --- a/recipes/fast_float/all/conandata.yml +++ b/recipes/fast_float/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "6.1.1": + url: "https://github.com/fastfloat/fast_float/archive/v6.1.1.tar.gz" + sha256: "10159a4a58ba95fe9389c3c97fe7de9a543622aa0dcc12dd9356d755e9a94cb4" "6.1.0": url: "https://github.com/fastfloat/fast_float/archive/v6.1.0.tar.gz" sha256: "5a629e1f18f037ad0016c41ead630ea471cccbcdf60239ed3466c491d8e7c908" diff --git a/recipes/fast_float/config.yml b/recipes/fast_float/config.yml index 94d0f58561b88..dbe55c83d4f49 100644 --- a/recipes/fast_float/config.yml +++ b/recipes/fast_float/config.yml @@ -1,4 +1,6 @@ versions: + "6.1.1": + folder: all "6.1.0": folder: all "6.0.0": From 9b8dfef092f8418c760dea909775d9fdadb034a0 Mon Sep 17 00:00:00 2001 From: wadehunk <123095244+wadehunk@users.noreply.github.com> Date: Tue, 19 Mar 2024 15:09:11 -0500 Subject: [PATCH 297/405] (#23162) fast-cdr: Add version 2.2.0 --- recipes/fast-cdr/all/conandata.yml | 18 +++--------------- recipes/fast-cdr/config.yml | 12 ++---------- 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/recipes/fast-cdr/all/conandata.yml b/recipes/fast-cdr/all/conandata.yml index 021355947389f..f1fb4fa51912e 100644 --- a/recipes/fast-cdr/all/conandata.yml +++ b/recipes/fast-cdr/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.2.0": + url: "https://github.com/eProsima/Fast-CDR/archive/v2.2.0.tar.gz" + sha256: "8a75ee3aed59f495e95208050920d2c2146df92f073809505a3bd29011c21f20" "2.1.0": url: "https://github.com/eProsima/Fast-CDR/archive/v2.1.0.tar.gz" sha256: "7ee3b3e977381f76f8d9ab1e1df7b5202556505b104afb3f03ee79bbe6507aa0" @@ -11,21 +14,6 @@ sources: "1.0.27": url: "https://github.com/eProsima/Fast-CDR/archive/v1.0.27.tar.gz" sha256: "a9bc8fd31a2c2b95e6d2fb46e6ce1ad733e86dc4442f733479e33ed9cdc54bf6" - "1.0.26": - url: "https://github.com/eProsima/Fast-CDR/archive/v1.0.26.tar.gz" - sha256: "812b29dd9fa8b79395dea3f4b810f9ab9e820fa4f0a666338c279b739a36595d" - "1.0.24": - url: "https://github.com/eProsima/Fast-CDR/archive/v1.0.24.tar.gz" - sha256: "ecd688ab89ff1c03b9031c314891ae60995e2e73d919b93569eb840d6e87dec2" - "1.0.23": - url: "https://github.com/eProsima/Fast-CDR/archive/v1.0.23.tar.gz" - sha256: "6f7c9c6c0c82c150b5ea2b0a58d5c9a466b87a1fcfca40d5786d99d4963a6721" - "1.0.22": - url: "https://github.com/eProsima/Fast-CDR/archive/v1.0.22.tar.gz" - sha256: "7ca7f09c633963622431bdb216eeb4145e378f81a2ce5113e341b9eee55e4f44" - "1.0.21": - url: "https://github.com/eProsima/Fast-CDR/archive/refs/tags/v1.0.21.tar.gz" - sha256: "C1F32BDD76910ADA00D551EB8828DE7561AD2B2846D063CB4316F9262C03C77D" patches: "2.0.0": - patch_file: "patches/2.0.0-0001-Fix-for-non-CWG-1270-revision-compliant-compilers-17.patch" diff --git a/recipes/fast-cdr/config.yml b/recipes/fast-cdr/config.yml index 9cc6db5bd0315..c6c63a5158e6b 100644 --- a/recipes/fast-cdr/config.yml +++ b/recipes/fast-cdr/config.yml @@ -1,4 +1,6 @@ versions: + "2.2.0": + folder: all "2.1.0": folder: all "2.0.0": @@ -7,13 +9,3 @@ versions: folder: all "1.0.27": folder: all - "1.0.26": - folder: all - "1.0.24": - folder: all - "1.0.23": - folder: all - "1.0.22": - folder: all - "1.0.21": - folder: all From f115c5765e43ca1c41bd6204b9c72cfc41dea31b Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 20 Mar 2024 05:28:19 +0900 Subject: [PATCH 298/405] (#23169) simdutf: add version 5.0.0 --- recipes/simdutf/all/conandata.yml | 3 +++ recipes/simdutf/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/simdutf/all/conandata.yml b/recipes/simdutf/all/conandata.yml index 810965b8af5c2..043f57d573076 100644 --- a/recipes/simdutf/all/conandata.yml +++ b/recipes/simdutf/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.0.0": + url: "https://github.com/simdutf/simdutf/archive/v5.0.0.tar.gz" + sha256: "088d750466bf3487117cce7f828eb94a0a3474d7e76b45d4902c99a2387212b7" "4.0.9": url: "https://github.com/simdutf/simdutf/archive/v4.0.9.tar.gz" sha256: "599E6558FC8D06F8346E5F210564F8B18751C93D83BCE1A40A0E6A326C57B61E" diff --git a/recipes/simdutf/config.yml b/recipes/simdutf/config.yml index 150d39023d095..1753ee45a4882 100644 --- a/recipes/simdutf/config.yml +++ b/recipes/simdutf/config.yml @@ -1,4 +1,6 @@ versions: + "5.0.0": + folder: all "4.0.9": folder: all "4.0.5": From afd3df26009bc6c6ad2eca85e8f6a93a70ac26b4 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 20 Mar 2024 12:21:44 +0100 Subject: [PATCH 299/405] (#23183) [changelog] Deployment March 20, 2023 Signed-off-by: Uilian Ries --- docs/changelog.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 8179d56b57c90..2e9e9d20de17f 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,9 +1,14 @@ # Changelog -### 13-Mar-2024 - 11:08 CET +### 20-March-2024 - 11:13 CET -- [feature]: Build with both */*:shared=True/False option when package type is declared as ``shared-library``. -- [fix]: Fix ValidateInfra python version check to be aligned with the latest Jenkins version. +- [fix] Changing Version Ranges in dependencies is now bump dependencies +- [fix] Static library package type should be built with both all static and all shared dependencies + +### 13-March-2024 - 11:08 CET + +- [feature] Build with both */*:shared=True/False option when package type is declared as ``shared-library``. +- [fix] Fix ValidateInfra python version check to be aligned with the latest Jenkins version. ### 07-February-2024 - 15:43 CET From a09dbad48511db1ff91a7026e9ee55e40cf9b97e Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 20 Mar 2024 21:09:38 +0900 Subject: [PATCH 300/405] (#23177) meson: add version 1.4.0 --- recipes/meson/all/conandata.yml | 3 +++ recipes/meson/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/meson/all/conandata.yml b/recipes/meson/all/conandata.yml index 775660b3d07c2..f567bf8d56087 100644 --- a/recipes/meson/all/conandata.yml +++ b/recipes/meson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.0": + url: "https://github.com/mesonbuild/meson/archive/1.4.0.tar.gz" + sha256: "61382f295378bddcd9bebb3a9a9065b1cbc671fa41b80964ab02726f9a5f3a88" "1.3.2": url: "https://github.com/mesonbuild/meson/archive/1.3.2.tar.gz" sha256: "683082fb3c5cddf203b21d29bdf4c227e2f7964da5324a15e1a5f7db94322b4b" diff --git a/recipes/meson/config.yml b/recipes/meson/config.yml index 0e150ef5dedd6..2b56413242adf 100644 --- a/recipes/meson/config.yml +++ b/recipes/meson/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.0": + folder: all "1.3.2": folder: all "1.3.1": From 33f6f284a9bc599cd1f692877f26f939b6e64dee Mon Sep 17 00:00:00 2001 From: Vyacheslav Koscheev Date: Wed, 20 Mar 2024 19:48:07 +0700 Subject: [PATCH 301/405] (#22936) android-ndk: add r26c --- recipes/android-ndk/all/conandata.yml | 13 +++++++++++++ recipes/android-ndk/config.yml | 2 ++ 2 files changed, 15 insertions(+) diff --git a/recipes/android-ndk/all/conandata.yml b/recipes/android-ndk/all/conandata.yml index 788c3990884da..0a73cd9fc973b 100644 --- a/recipes/android-ndk/all/conandata.yml +++ b/recipes/android-ndk/all/conandata.yml @@ -1,4 +1,17 @@ sources: + "r26c": + "Windows": + "x86_64": + url: "https://dl.google.com/android/repository/android-ndk-r26c-windows.zip" + sha256: "67d0c7e4ba853e9168584e8640a562af431dcf086c08efef3ec23ee827139303" + "Linux": + "x86_64": + url: "https://dl.google.com/android/repository/android-ndk-r26c-linux.zip" + sha256: "6d6e659834d28bb24ba7ae66148ad05115ebbad7dabed1af9b3265674774fcf6" + "Macos": + "x86_64": + url: "https://dl.google.com/android/repository/android-ndk-r26c-darwin.zip" + sha256: "312756dfcbdbf389d35d651e17ca98683bd36cb83cc7bf7ad51cac5c06bd064b" "r26b": "Windows": "x86_64": diff --git a/recipes/android-ndk/config.yml b/recipes/android-ndk/config.yml index a7fa8c97dd42c..2f8b2364c9c1c 100644 --- a/recipes/android-ndk/config.yml +++ b/recipes/android-ndk/config.yml @@ -1,4 +1,6 @@ versions: + "r26c": + folder: all "r26b": folder: all "r26": From 04da1bd79ea20cb712a7950b762f59ee988a3105 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Wed, 20 Mar 2024 14:07:39 +0100 Subject: [PATCH 302/405] (#23182) fast-dds: remove dangling patch 2.3.2-0001-fix-find-asio-and-tinyxml2.patch is not used sinc https://github.com/conan-io/conan-center-index/commit/df53eeb2cb3a1499f561c6fb3ee50e17822e6c47 also, 2.11.1-0001-fix-find-asio-and-tinyxml2.patch is identical to 2.10.1-0001-fix-find-asio-and-tinyxml2.patch --- recipes/fast-dds/all/conandata.yml | 2 +- ...11.1-0001-fix-find-asio-and-tinyxml2.patch | 31 ------------- ....3.2-0001-fix-find-asio-and-tinyxml2.patch | 46 ------------------- 3 files changed, 1 insertion(+), 78 deletions(-) delete mode 100644 recipes/fast-dds/all/patches/2.11.1-0001-fix-find-asio-and-tinyxml2.patch delete mode 100644 recipes/fast-dds/all/patches/2.3.2-0001-fix-find-asio-and-tinyxml2.patch diff --git a/recipes/fast-dds/all/conandata.yml b/recipes/fast-dds/all/conandata.yml index 38fe2366959a0..02a8d037bcc07 100644 --- a/recipes/fast-dds/all/conandata.yml +++ b/recipes/fast-dds/all/conandata.yml @@ -20,7 +20,7 @@ patches: patch_type: "conan" patch_description: "Add gettid macro for glibc compat. See: eProsima/Fast-DDS#4565" "2.11.2": - - patch_file: "patches/2.11.1-0001-fix-find-asio-and-tinyxml2.patch" + - patch_file: "patches/2.10.1-0001-fix-find-asio-and-tinyxml2.patch" patch_type: "conan" patch_description: "Fixup find asio and tinyxml2" "2.10.1": diff --git a/recipes/fast-dds/all/patches/2.11.1-0001-fix-find-asio-and-tinyxml2.patch b/recipes/fast-dds/all/patches/2.11.1-0001-fix-find-asio-and-tinyxml2.patch deleted file mode 100644 index bada751126e81..0000000000000 --- a/recipes/fast-dds/all/patches/2.11.1-0001-fix-find-asio-and-tinyxml2.patch +++ /dev/null @@ -1,31 +0,0 @@ -From b8c533b0fb2b92e9bd2aada5e195d7a0b3c0c6a9 Mon Sep 17 00:00:00 2001 -From: Joakim Haugen -Date: Wed, 10 May 2023 13:17:11 +0200 -Subject: [PATCH] fix find asio and tinyxml2 - ---- - CMakeLists.txt | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b01b2c470..7867feff3 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -232,9 +232,11 @@ if(NOT BUILD_SHARED_LIBS) - set(FASTDDS_STATIC ON) - endif() - --eprosima_find_package(fastcdr REQUIRED) --eprosima_find_thirdparty(Asio asio VERSION 1.10.8) --eprosima_find_thirdparty(TinyXML2 tinyxml2) -+eprosima_find_thirdparty(fastcdr REQUIRED) -+eprosima_find_thirdparty(asio REQUIRED) -+eprosima_find_thirdparty(tinyxml2 REQUIRED) -+set(TINYXML2_LIBRARY tinyxml2::tinyxml2) -+set(Asio_INCLUDE_DIR ${asio_INCLUDE_DIR}) - - find_package(foonathan_memory REQUIRED) - message(STATUS "Found foonathan_memory: ${foonathan_memory_DIR}") --- -2.30.2 - diff --git a/recipes/fast-dds/all/patches/2.3.2-0001-fix-find-asio-and-tinyxml2.patch b/recipes/fast-dds/all/patches/2.3.2-0001-fix-find-asio-and-tinyxml2.patch deleted file mode 100644 index 5d4d5bc2037bb..0000000000000 --- a/recipes/fast-dds/all/patches/2.3.2-0001-fix-find-asio-and-tinyxml2.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8a9cb0209..400c681e7 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -225,8 +225,8 @@ if(NOT BUILD_SHARED_LIBS) - endif() - - eprosima_find_package(fastcdr REQUIRED) --eprosima_find_thirdparty(Asio asio VERSION 1.10.8) --eprosima_find_thirdparty(TinyXML2 tinyxml2) -+eprosima_find_thirdparty(asio REQUIRED) -+eprosima_find_thirdparty(tinyxml2 REQUIRED) - - find_package(foonathan_memory REQUIRED) - message(STATUS "Found foonathan_memory: ${foonathan_memory_DIR}") -diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt -index 04d313bf2..efd1f9f7a 100644 ---- a/src/cpp/CMakeLists.txt -+++ b/src/cpp/CMakeLists.txt -@@ -434,7 +434,7 @@ elseif(NOT EPROSIMA_INSTALLER) - $ - $ - PRIVATE -- ${Asio_INCLUDE_DIR} -+ ${asio_INCLUDE_DIR} - ${TINYXML2_INCLUDE_DIR} - $<$:${ANDROID_IFADDRS_INCLUDE_DIR}> - ${THIRDPARTY_BOOST_INCLUDE_DIR} -@@ -455,7 +455,7 @@ elseif(NOT EPROSIMA_INSTALLER) - # Link library to external libraries. - target_link_libraries(${PROJECT_NAME} ${PRIVACY} fastcdr foonathan_memory - ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} -- ${TINYXML2_LIBRARY} -+ tinyxml2::tinyxml2 - $<$:OpenSSL::SSL$OpenSSL::Crypto> - $<$:iphlpapi$Shlwapi> - ${THIRDPARTY_BOOST_LINK_LIBS} -@@ -536,7 +536,7 @@ if(UNIX AND EPROSIMA_INSTALLER) - COMPONENT headers - ) - -- set_public_headers_directory(${Asio_INCLUDE_DIR} "" -+ set_public_headers_directory(${asio_INCLUDE_DIR} "" - DESTINATION thirdparty/asio - COMPONENT headers - ) From 6ce2c8fa1d3fd83d237611db242b26b83d4cedbd Mon Sep 17 00:00:00 2001 From: Roberto Turrado Camblor Date: Wed, 20 Mar 2024 16:28:19 +0100 Subject: [PATCH 303/405] (#23174) Add tree-gen 1.0.7. * Add tree-gen 1.0.7. * Update sha256. I have updated tree-gen, and made the 1.0.7 tag point to the latest commit. * Update sha256. I have updated tree-gen a second time. And again made the 1.0.7 tag point to the latest commit. * Update sha256. I have updated tree-gen a third time. And again made the 1.0.7 tag point to the latest commit. --- recipes/tree-gen/all/conandata.yml | 3 +++ recipes/tree-gen/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/tree-gen/all/conandata.yml b/recipes/tree-gen/all/conandata.yml index 21ee5b5699adc..71aa893da1723 100644 --- a/recipes/tree-gen/all/conandata.yml +++ b/recipes/tree-gen/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.7": + url: "https://github.com/QuTech-Delft/tree-gen/archive/refs/tags/1.0.7.tar.gz" + sha256: "bd27c88d789efe1d187846d3b819fbaa1ba3a520d6d4181d1216c4a2e73e4e85" "1.0.6": url: "https://github.com/QuTech-Delft/tree-gen/archive/refs/tags/1.0.6.tar.gz" sha256: "a7f6617830b3817b21cddc0f4442a04c10fbb89a19cabb1bbd0e8facb040cba8" diff --git a/recipes/tree-gen/config.yml b/recipes/tree-gen/config.yml index c8c4465c97415..4028d61266d40 100644 --- a/recipes/tree-gen/config.yml +++ b/recipes/tree-gen/config.yml @@ -1,3 +1,5 @@ versions: + "1.0.7": + folder: all "1.0.6": folder: all From 77b212c4564d1b36f826e1e43461ee97ec28f516 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 21 Mar 2024 06:47:57 +0900 Subject: [PATCH 304/405] (#23176) tsl-robin-map: add version 1.2.2 --- recipes/tsl-robin-map/all/conandata.yml | 3 +++ recipes/tsl-robin-map/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/tsl-robin-map/all/conandata.yml b/recipes/tsl-robin-map/all/conandata.yml index 89211be8fec7b..0898c1e12fe8b 100644 --- a/recipes/tsl-robin-map/all/conandata.yml +++ b/recipes/tsl-robin-map/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.2": + url: "https://github.com/Tessil/robin-map/archive/v1.2.2.tar.gz" + sha256: "c72767ecea2a90074c7efbe91620c8f955af666505e22782e82813c652710821" "1.2.1": url: "https://github.com/Tessil/robin-map/archive/v1.2.1.tar.gz" sha256: "2b54d2c1de2f73bea5c51d5dcbd64813a08caf1bfddcfdeee40ab74e9599e8e3" diff --git a/recipes/tsl-robin-map/config.yml b/recipes/tsl-robin-map/config.yml index 7a3b316dace84..cd852f361a5d2 100644 --- a/recipes/tsl-robin-map/config.yml +++ b/recipes/tsl-robin-map/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.2": + folder: all "1.2.1": folder: all "1.0.1": From 2c9f25c4af3f21f1d65ada7392410b77d538963f Mon Sep 17 00:00:00 2001 From: Alejandro Ramallo Date: Thu, 21 Mar 2024 04:05:40 -0400 Subject: [PATCH 305/405] (#22076) openjdk fix JAVA_HOME environment variable --- recipes/openjdk/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/openjdk/all/conanfile.py b/recipes/openjdk/all/conanfile.py index becd2ce7c641c..9da58ed44e05f 100644 --- a/recipes/openjdk/all/conanfile.py +++ b/recipes/openjdk/all/conanfile.py @@ -67,8 +67,8 @@ def package(self): def package_info(self): self.output.info(f"Creating JAVA_HOME environment variable with : {self.package_folder}") - self.runenv_info.append("JAVA_HOME", self.package_folder) - self.buildenv_info.append("JAVA_HOME", self.package_folder) + self.runenv_info.define_path("JAVA_HOME", self.package_folder) + self.buildenv_info.define_path("JAVA_HOME", self.package_folder) # TODO: remove `env_info` once the recipe is only compatible with Conan >= 2.0 self.env_info.JAVA_HOME = self.package_folder From de54cbb614a55377da272031c837676159121035 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 21 Mar 2024 18:48:03 +0900 Subject: [PATCH 306/405] (#23190) glaze: add version 2.3.1 --- recipes/glaze/all/conandata.yml | 3 +++ recipes/glaze/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index a15ae462af46d..a4694a9ba80d2 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.3.1": + url: "https://github.com/stephenberry/glaze/archive/v2.3.1.tar.gz" + sha256: "941bf3f8cea5b6a024895d37dceaaaa82071a9178af63e9935a1d9fd80caa451" "2.3.0": url: "https://github.com/stephenberry/glaze/archive/v2.3.0.tar.gz" sha256: "9963761337941f4709458155a045ce4ab5dc5edf5e60dca8cc290200fce8330e" diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index de35ec863def5..808f5a655fa9c 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,6 @@ versions: + "2.3.1": + folder: all "2.3.0": folder: all "2.2.1": From d07444d08cb102d61bedfeb04f8a61371777cf0f Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 21 Mar 2024 19:48:11 +0900 Subject: [PATCH 307/405] (#23187) roaring: add version 3.0.0 --- recipes/roaring/all/conandata.yml | 3 +++ recipes/roaring/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/roaring/all/conandata.yml b/recipes/roaring/all/conandata.yml index edc3ffb72f6d6..afaf790313c5a 100644 --- a/recipes/roaring/all/conandata.yml +++ b/recipes/roaring/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.0.0": + url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v3.0.0.tar.gz" + sha256: "25183bc54ab650d964256d547869a34573a13d06f7e6a369b79e77f5c1feb8ba" "2.1.2": url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v2.1.2.tar.gz" sha256: "a53d2f540f78ddae31e30c573b1b7fd41d7257d6a090507ba35d9c398712e5ad" diff --git a/recipes/roaring/config.yml b/recipes/roaring/config.yml index cc4a150b9e961..6437564275dee 100644 --- a/recipes/roaring/config.yml +++ b/recipes/roaring/config.yml @@ -1,4 +1,6 @@ versions: + "3.0.0": + folder: all "2.1.2": folder: all "2.1.1": From e78f2d5937309b5ac478dbe247b68893289dbcdb Mon Sep 17 00:00:00 2001 From: Ahajha <44127594+Ahajha@users.noreply.github.com> Date: Thu, 21 Mar 2024 07:45:26 -0400 Subject: [PATCH 308/405] (#21387) CPython: Conan 2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * wip * cpython: migrate to Conan v2 * cpython: fix autotools install step * cpython: fix libuuid requirement * cpython: update test_package * cpython: temporarily disable FindPythonX tests * cpython: package_type should be "library" * cpython: tidy * cpython: ncurses is required transitively * cpython: fix shared test * cpython: use cpp_info.aggregated_components() for deps * cpython: bsddb has been remove in Python 3 * cpython: fix openssl support * Fix package layout * Fix new generators in test package * Misc fixes * Remove redundant test * Add FIXMEs * Fix running test package multiple times in a row * Handle conan 1/2 differences in test_package * Fix MSBuild * Misc Conan 2.0 fixes * cpython: minor tweaks, bump deps * cpython: use altinstall Fixed modules standard library modules not being found in test_package. * Comment out versions with broken patches for now * Fix Autotools build * Restore old versions, temp remove 2.7.18 * Temp remove CPython 2.7.18 * Temp remove 2.7.18 * Misc MSVC fixes * Fix Windows/static build * Readd old test_package as test_v1_package * Add conanrun env to test package self.runs * Fix Linux shared build * Shared by default, don't delete compiler in package ID * Misc Mac fixes/cleanup * libxcrypt is transitive * Static by default for now * Attempt to fix 3.7 on Mac * Remove ssl module FIXME * self.settings.arch * Try using vendored libffi for mac on <3.9 * Fix PYTHONHOME on Linux, always set PYTHONHOME for test * Try vendored libffi on mac in debug mode * Remove "dynamic" check * Remove force on versions * Use Version() when comparing versions * Use a virtualrunenv in build, revert ffi changes * Bandaid fix for Linux * Use virtualrunenvs in v1 test package also * Skip 3.7 build on M1 macs * Set platform toolset directly on <3.8 * Fix issue with pip installed cmake * Python 2 compat in test_package.py * Re-add Python 2.7 + workarounds for MSVC * Misc pre-3.8 msvc fixes * Fix python 2 on Linux * Add 2.7.18 to config.yml * Remove includedirs for all components other than the main one * Use msvc_runtime_flag * Misc MSVC fixes * Skip building _freeze_importlib, fix 3.7.12 in msvc Debug MDd * Shot in the dark attempt at fixing Mac issue * Unconditionally generate VCVars in test package * Print config.log if autotools configure fails * Skip spam module test in 2.7 (debug, MDd) as well * Allow MSVC/Debug/dynamic with newer libffi * Test package cleanup * Fix Debug MSVC test package * Use test_package/test_package.py in test_v1_package * Fix conditional _d in debug mode * Add -Wl,--as-needed * Use extra_ldflags instead * Don't use -Wl,--as-needed on Apple OSs * Manually inject platform toolset on 3.8.x * Always manually specify the platform toolset * Update dependencies * Add patch descriptions * Enable short paths * Add link to nis system library * nis -> nsl * Simplify pkg-config info * Check for Linux or FreeBSD * Fix disabling sqlite3 (on Linux at least) * Simplify some file removing * rm unnecessary rm * Misc configure variable cleanup * Point test_v1_package to test_package sources * Fix lint warning * Diff cleanup * Misc test package cleanup * Bump xz_utils * Bump xz_utils * Fix pymalloc argument * Don't read SSL config file Co-authored-by: Jordan Williams * Bandaid fix for test package overflowing Windows max path length * Remove EOL versions * Remove calculated Python major version * Use autotools.install() directly Co-authored-by: Uilian Ries * Remove outdated configure flags and some hacks * Add 2.0 versions of env variables * Remove PYTHONHOME from env info for now --------- Co-authored-by: memsharded Co-authored-by: Martin Valgur Co-authored-by: Rubén Rincón Blanco Co-authored-by: Jordan Williams Co-authored-by: Uilian Ries --- recipes/cpython/all/conandata.yml | 103 ++- recipes/cpython/all/conanfile.py | 769 +++++++++--------- .../all/patches/2.7.18-0001-msvc.patch | 278 ------- .../2.7.18-0002-add-support-msvc-14.patch | 59 -- .../patches/2.7.18-0003-msvc-fix-static.patch | 11 - .../2.7.18-0004-disable-macos-tcltk.patch | 15 - .../patches/{ => 3.10}/3.10.0-0001-msvc.patch | 22 +- .../{ => 3.10}/3.10.0-0003-_ctypes-ffi.patch | 0 ...0-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch | 0 .../3.10.0-0005-disable-macos-tcltk.patch | 0 .../cpython/all/patches/3.7.9-0001-msvc.patch | 416 ---------- ...9-0002-setup.py-pass-CFLAGS-CPPFLAGS.patch | 15 - .../3.7.9-0003-disable-macos-tcltk.patch | 15 - .../patches/{ => 3.8}/3.8.12-0001-msvc.patch | 22 +- .../{ => 3.8}/3.8.12-0002-_ctypes-ffi.patch | 0 ...2-0003-setup.py-pass-CFLAGS-CPPFLAGS.patch | 0 .../3.8.12-0004-disable-macos-tcltk.patch | 0 .../patches/{ => 3.9}/3.9.7-0001-msvc.patch | 22 +- .../{ => 3.9}/3.9.7-0002-_msi-vcxproj.patch | 0 .../{ => 3.9}/3.9.7-0003-_ctypes-ffi.patch | 0 ...7-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch | 0 .../3.9.7-0005-disable-macos-tcltk.patch | 0 .../cpython/all/test_package/CMakeLists.txt | 67 +- recipes/cpython/all/test_package/conanfile.py | 287 +++---- .../all/test_package/py2/test_module.c | 42 - .../all/test_package/py2/test_package.c | 12 - recipes/cpython/all/test_package/setup.py | 17 +- .../all/test_package/{py3 => }/test_module.c | 0 .../all/test_package/{py3 => }/test_package.c | 0 .../cpython/all/test_package/test_package.py | 76 +- .../all/test_v1_package/CMakeLists.txt | 96 +++ .../cpython/all/test_v1_package/conanfile.py | 154 ++++ recipes/cpython/config.yml | 4 - 33 files changed, 925 insertions(+), 1577 deletions(-) delete mode 100644 recipes/cpython/all/patches/2.7.18-0001-msvc.patch delete mode 100644 recipes/cpython/all/patches/2.7.18-0002-add-support-msvc-14.patch delete mode 100644 recipes/cpython/all/patches/2.7.18-0003-msvc-fix-static.patch delete mode 100644 recipes/cpython/all/patches/2.7.18-0004-disable-macos-tcltk.patch rename recipes/cpython/all/patches/{ => 3.10}/3.10.0-0001-msvc.patch (94%) rename recipes/cpython/all/patches/{ => 3.10}/3.10.0-0003-_ctypes-ffi.patch (100%) rename recipes/cpython/all/patches/{ => 3.10}/3.10.0-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch (100%) rename recipes/cpython/all/patches/{ => 3.10}/3.10.0-0005-disable-macos-tcltk.patch (100%) delete mode 100644 recipes/cpython/all/patches/3.7.9-0001-msvc.patch delete mode 100644 recipes/cpython/all/patches/3.7.9-0002-setup.py-pass-CFLAGS-CPPFLAGS.patch delete mode 100644 recipes/cpython/all/patches/3.7.9-0003-disable-macos-tcltk.patch rename recipes/cpython/all/patches/{ => 3.8}/3.8.12-0001-msvc.patch (95%) rename recipes/cpython/all/patches/{ => 3.8}/3.8.12-0002-_ctypes-ffi.patch (100%) rename recipes/cpython/all/patches/{ => 3.8}/3.8.12-0003-setup.py-pass-CFLAGS-CPPFLAGS.patch (100%) rename recipes/cpython/all/patches/{ => 3.8}/3.8.12-0004-disable-macos-tcltk.patch (100%) rename recipes/cpython/all/patches/{ => 3.9}/3.9.7-0001-msvc.patch (95%) rename recipes/cpython/all/patches/{ => 3.9}/3.9.7-0002-_msi-vcxproj.patch (100%) rename recipes/cpython/all/patches/{ => 3.9}/3.9.7-0003-_ctypes-ffi.patch (100%) rename recipes/cpython/all/patches/{ => 3.9}/3.9.7-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch (100%) rename recipes/cpython/all/patches/{ => 3.9}/3.9.7-0005-disable-macos-tcltk.patch (100%) delete mode 100644 recipes/cpython/all/test_package/py2/test_module.c delete mode 100644 recipes/cpython/all/test_package/py2/test_package.c rename recipes/cpython/all/test_package/{py3 => }/test_module.c (100%) rename recipes/cpython/all/test_package/{py3 => }/test_package.c (100%) create mode 100644 recipes/cpython/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/cpython/all/test_v1_package/conanfile.py diff --git a/recipes/cpython/all/conandata.yml b/recipes/cpython/all/conandata.yml index f9fd51067c8b3..80e01a0b76111 100644 --- a/recipes/cpython/all/conandata.yml +++ b/recipes/cpython/all/conandata.yml @@ -8,65 +8,58 @@ sources: "3.8.12": url: "https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz" sha256: "316aa33f3b7707d041e73f246efedb297a70898c4b91f127f66dc8d80c596f1a" - "3.7.12": - url: "https://www.python.org/ftp/python/3.7.12/Python-3.7.12.tgz" - sha256: "33b4daaf831be19219659466d12645f87ecec6eb21d4d9f9711018a7b66cce46" - "2.7.18": - url: "https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz" - sha256: "da3080e3b488f648a3d7a4560ddee895284c3380b11d6de75edb986526b9a814" patches: "3.10.0": - - patch_file: "patches/3.10.0-0001-msvc.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.9.7-0002-_msi-vcxproj.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.10.0-0003-_ctypes-ffi.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.10.0-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.10.0-0005-disable-macos-tcltk.patch" - base_path: "source_subfolder" + - patch_file: "patches/3.10/3.10.0-0001-msvc.patch" + patch_description: "Version specific patches to MSVC projects to allow injection of dependencies" + patch_type: "conan" + - patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch" + patch_description: "Fix ARM/ARM64 mismatch in project file" + patch_type: "bugfix" + - patch_file: "patches/3.10/3.10.0-0003-_ctypes-ffi.patch" + patch_description: "Remove duplicate libffi symbols and support shared libffi" + patch_type: "portability" + - patch_file: "patches/3.10/3.10.0-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch" + patch_description: "Pass C and CPP flags from configure script to setup.py" + patch_type: "bugfix" + - patch_file: "patches/3.10/3.10.0-0005-disable-macos-tcltk.patch" + patch_description: "Unconditionally enable tcl/tk on Mac" + patch_type: "conan" - patch_file: "patches/3.x-0001-relocatable-python-config.patch" - base_path: "source_subfolder" + patch_description: "Allow package to be relocatable" + patch_type: "conan" "3.9.7": - - patch_file: "patches/3.9.7-0001-msvc.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.9.7-0002-_msi-vcxproj.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.9.7-0003-_ctypes-ffi.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.9.7-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.9.7-0005-disable-macos-tcltk.patch" - base_path: "source_subfolder" + - patch_file: "patches/3.9/3.9.7-0001-msvc.patch" + patch_description: "Version specific patches to MSVC projects to allow injection of dependencies" + patch_type: "conan" + - patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch" + patch_description: "Fix ARM/ARM64 mismatch in project file" + patch_type: "bugfix" + - patch_file: "patches/3.9/3.9.7-0003-_ctypes-ffi.patch" + patch_description: "Remove duplicate libffi symbols and support shared libffi" + patch_type: "portability" + - patch_file: "patches/3.9/3.9.7-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch" + patch_description: "Pass C and CPP flags from configure script to setup.py" + patch_type: "bugfix" + - patch_file: "patches/3.9/3.9.7-0005-disable-macos-tcltk.patch" + patch_description: "Unconditionally enable tcl/tk on Mac" + patch_type: "conan" - patch_file: "patches/3.x-0001-relocatable-python-config.patch" - base_path: "source_subfolder" + patch_description: "Allow package to be relocatable" + patch_type: "conan" "3.8.12": - - patch_file: "patches/3.8.12-0001-msvc.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.8.12-0002-_ctypes-ffi.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.8.12-0003-setup.py-pass-CFLAGS-CPPFLAGS.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.8.12-0004-disable-macos-tcltk.patch" - base_path: "source_subfolder" + - patch_file: "patches/3.8/3.8.12-0001-msvc.patch" + patch_description: "Version specific patches to MSVC projects to allow injection of dependencies" + patch_type: "conan" + - patch_file: "patches/3.8/3.8.12-0002-_ctypes-ffi.patch" + patch_description: "Remove duplicate libffi symbols and support shared libffi" + patch_type: "portability" + - patch_file: "patches/3.8/3.8.12-0003-setup.py-pass-CFLAGS-CPPFLAGS.patch" + patch_description: "Pass C and CPP flags from configure script to setup.py" + patch_type: "bugfix" + - patch_file: "patches/3.8/3.8.12-0004-disable-macos-tcltk.patch" + patch_description: "Unconditionally enable tcl/tk on Mac" + patch_type: "conan" - patch_file: "patches/3.x-0001-relocatable-python-config.patch" - base_path: "source_subfolder" - "3.7.12": - - patch_file: "patches/3.7.9-0001-msvc.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.7.9-0002-setup.py-pass-CFLAGS-CPPFLAGS.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.7.9-0003-disable-macos-tcltk.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.x-0001-relocatable-python-config.patch" - base_path: "source_subfolder" - "2.7.18": - - patch_file: "patches/2.7.18-0001-msvc.patch" - base_path: "source_subfolder" - - patch_file: "patches/2.7.18-0002-add-support-msvc-14.patch" - base_path: "source_subfolder" - - patch_file: "patches/2.7.18-0003-msvc-fix-static.patch" - base_path: "source_subfolder" - - patch_file: "patches/2.7.18-0004-disable-macos-tcltk.patch" - base_path: "source_subfolder" + patch_description: "Allow package to be relocatable" + patch_type: "conan" diff --git a/recipes/cpython/all/conanfile.py b/recipes/cpython/all/conanfile.py index 4fa1d1da6334e..160fe6920a426 100644 --- a/recipes/cpython/all/conanfile.py +++ b/recipes/cpython/all/conanfile.py @@ -1,21 +1,29 @@ -from conans import AutoToolsBuildEnvironment, ConanFile, MSBuild, tools -from conans.errors import ConanInvalidConfiguration -from io import StringIO import os import re import textwrap -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration, ConanException +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.env import VirtualRunEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, mkdir, replace_in_file, rm, rmdir, unzip +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout +from conan.tools.microsoft import MSBuildDeps, MSBuildToolchain, MSBuild, is_msvc, is_msvc_static_runtime, msvc_runtime_flag, msvs_toolset +from conan.tools.scm import Version + +required_conan_version = ">=1.58.0" class CPythonConan(ConanFile): name = "cpython" + description = "Python is a programming language that lets you work quickly and integrate systems more effectively." + license = "Python-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.python.org" - description = "Python is a programming language that lets you work quickly and integrate systems more effectively." topics = ("python", "cpython", "language", "script") - license = ("Python-2.0",) - exports_sources = "patches/**" + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -30,11 +38,6 @@ class CPythonConan(ConanFile): "with_sqlite3": [True, False], "with_tkinter": [True, False], "with_curses": [True, False], - - # Python 2 options - "unicode": ["ucs2", "ucs4"], - "with_bsddb": [True, False], - # Python 3 options "with_lzma": [True, False], # options that don't change package id @@ -53,168 +56,132 @@ class CPythonConan(ConanFile): "with_sqlite3": True, "with_tkinter": True, "with_curses": True, - - # Python 2 options - "unicode": "ucs2", - "with_bsddb": False, # True, # FIXME: libdb package missing (#5309/#5392) - # Python 3 options "with_lzma": True, # options that don't change package id "env_vars": True, } - - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _version_number_only(self): - return re.match(r"^([0-9.]+)", self.version).group(1) - - @property - def _version_tuple(self): - return tuple(self._version_number_only.split(".")) + short_paths = True @property def _supports_modules(self): - return self.settings.compiler != "Visual Studio" or self.options.shared + return not is_msvc(self) or self.options.shared @property def _version_suffix(self): - if self.settings.compiler == "Visual Studio": - joiner = "" - else: - joiner = "." - return joiner.join(self._version_tuple[:2]) - - @property - def _is_py3(self): - return tools.Version(self._version_number_only).major == "3" + v = Version(self.version) + joiner = "" if is_msvc(self) else "." + return f"{v.major}{joiner}{v.minor}" - @property - def _is_py2(self): - return tools.Version(self._version_number_only).major == "2" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if self.settings.compiler == "Visual Studio": + if is_msvc(self): del self.options.lto del self.options.docstrings del self.options.pymalloc del self.options.with_curses del self.options.with_gdbm del self.options.with_nis - if self._is_py2: - # Python 2.xx does not support following options - del self.options.with_lzma - elif self._is_py3: - # Python 3.xx does not support following options - del self.options.with_bsddb - del self.options.unicode - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.settings.compiler.rm_safe("libcxx") + self.settings.compiler.rm_safe("cppstd") def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") if not self._supports_modules: - del self.options.with_bz2 - del self.options.with_sqlite3 - del self.options.with_tkinter - - del self.options.with_bsddb - del self.options.with_lzma - if self.settings.compiler == "Visual Studio": - # The msbuild generator only works with Visual Studio - self.generators.append("MSBuildDeps") - - def validate(self): - if self.options.shared: - if self.settings.compiler == "Visual Studio" and "MT" in self.settings.compiler.runtime: - raise ConanInvalidConfiguration("cpython does not support MT(d) runtime when building a shared cpython library") - if self.settings.compiler == "Visual Studio": - if self.options.optimizations: - raise ConanInvalidConfiguration("This recipe does not support optimized MSVC cpython builds (yet)") - # FIXME: should probably throw when cross building - # FIXME: optimizations for Visual Studio, before building the final `build_type`: - # 1. build the MSVC PGInstrument build_type, - # 2. run the instrumented binaries, (PGInstrument should have created a `python.bat` file in the PCbuild folder) - # 3. build the MSVC PGUpdate build_type - if self.settings.build_type == "Debug" and "d" not in self.settings.compiler.runtime: - raise ConanInvalidConfiguration("Building debug cpython requires a debug runtime (Debug cpython requires _CrtReportMode symbol, which only debug runtimes define)") - if self._is_py2: - if self.settings.compiler.version >= tools.Version("14"): - self.output.warn("Visual Studio versions 14 and higher were never officially supported by the CPython developers") - if str(self.settings.arch) not in self._msvc_archs: - raise ConanInvalidConfiguration("Visual Studio does not support this architecture") - - if not self.options.shared and tools.Version(self._version_number_only) >= "3.10": - raise ConanInvalidConfiguration("Static msvc build disabled (>=3.10) due to \"AttributeError: module 'sys' has no attribute 'winver'\"") - - if self.options.get_safe("with_curses", False) and not self.options["ncurses"].with_widec: - raise ConanInvalidConfiguration("cpython requires ncurses with wide character support") - - def package_id(self): - del self.info.options.env_vars - - def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + self.options.rm_safe("with_bz2") + self.options.rm_safe("with_sqlite3") + self.options.rm_safe("with_tkinter") + self.options.rm_safe("with_lzma") - @property - def _with_libffi(self): - # cpython 3.7.x on MSVC uses an ancient libffi 2.00-beta (which is not available at cci, and is API/ABI incompatible with current 3.2+) - return self._supports_modules \ - and (self.settings.compiler != "Visual Studio" or tools.Version(self._version_number_only) >= "3.8") + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): - self.requires("zlib/1.2.11") + self.requires("zlib/[>=1.2.11 <2]") if self._supports_modules: - self.requires("openssl/1.1.1l") - self.requires("expat/2.4.1") - if self._with_libffi: - self.requires("libffi/3.2.1") - if tools.Version(self._version_number_only) < "3.8": - self.requires("mpdecimal/2.4.2") - elif tools.Version(self._version_number_only) < "3.10": + self.requires("openssl/[>=1.1 <4]") + self.requires("expat/2.6.0") + self.requires("libffi/3.4.4") + if Version(self.version) < "3.10" or is_apple_os(self): + # FIXME: mpdecimal > 2.5.0 on MacOS causes the _decimal module to not be importable self.requires("mpdecimal/2.5.0") else: - self.requires("mpdecimal/2.5.0") # FIXME: no 2.5.1 to troubleshoot apple + self.requires("mpdecimal/2.5.1") if self.settings.os != "Windows": - if not tools.is_apple_os(self.settings.os): - self.requires("libuuid/1.0.3") - self.requires("libxcrypt/4.4.25") + if not is_apple_os(self): + self.requires("util-linux-libuuid/2.39.2") + # If crypt.h is detected, it is included in the public headers. + self.requires("libxcrypt/4.4.36", transitive_headers=True, transitive_libs=True) if self.options.get_safe("with_bz2"): self.requires("bzip2/1.0.8") if self.options.get_safe("with_gdbm", False): - self.requires("gdbm/1.19") + self.requires("gdbm/1.23") if self.options.get_safe("with_nis", False): # TODO: Add nis when available. raise ConanInvalidConfiguration("nis is not available on CCI (yet)") if self.options.get_safe("with_sqlite3"): - self.requires("sqlite3/3.36.0") + self.requires("sqlite3/3.45.0") if self.options.get_safe("with_tkinter"): self.requires("tk/8.6.10") if self.options.get_safe("with_curses", False): - self.requires("ncurses/6.2") - if self.options.get_safe("with_bsddb", False): - self.requires("libdb/5.3.28") + # Used in a public header + # https://github.com/python/cpython/blob/v3.10.13/Include/py_curses.h#L34 + self.requires("ncurses/6.4", transitive_headers=True, transitive_libs=True) if self.options.get_safe("with_lzma", False): - self.requires("xz_utils/5.2.5") + self.requires("xz_utils/5.6.1") + + def package_id(self): + del self.info.options.env_vars + + def validate(self): + if self.options.shared: + if is_msvc_static_runtime(self): + raise ConanInvalidConfiguration( + "cpython does not support MT(d) runtime when building a shared cpython library" + ) + if is_msvc(self): + if self.options.optimizations: + raise ConanInvalidConfiguration( + "This recipe does not support optimized MSVC cpython builds (yet)" + ) + # FIXME: should probably throw when cross building + # FIXME: optimizations for Visual Studio, before building the final `build_type`: + # 1. build the MSVC PGInstrument build_type, + # 2. run the instrumented binaries, (PGInstrument should have created a `python.bat` file in the PCbuild folder) + # 3. build the MSVC PGUpdate build_type + if self.settings.build_type == "Debug" and "d" not in msvc_runtime_flag(self): + raise ConanInvalidConfiguration( + "Building debug cpython requires a debug runtime (Debug cpython requires _CrtReportMode" + " symbol, which only debug runtimes define)" + ) + if str(self.settings.arch) not in self._msvc_archs: + raise ConanInvalidConfiguration("Visual Studio does not support this architecture") + if not self.options.shared and Version(self.version) >= "3.10": + raise ConanInvalidConfiguration("Static msvc build disabled (>=3.10) due to \"AttributeError: module 'sys' has no attribute 'winver'\"") + + if self.options.get_safe("with_curses", False) and not self.dependencies["ncurses"].options.with_widec: + raise ConanInvalidConfiguration("cpython requires ncurses with wide character support") + + if self._supports_modules: + if Version(self.version) >= "3.9.0": + if self.dependencies["mpdecimal"].ref.version < Version("2.5.0"): + raise ConanInvalidConfiguration("cpython 3.9.0 (and newer) requires (at least) mpdecimal 2.5.0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - self._autotools.libs = [] + def _generate_autotools(self): + tc = AutotoolsToolchain(self, prefix=self.package_folder) + # Not necessary, just cleans up the output + tc.update_configure_args({"--enable-static": None, "--disable-static": None}) yes_no = lambda v: "yes" if v else "no" - conf_args = [ - "--enable-shared={}".format(yes_no(self.options.shared)), + tc.configure_args += [ "--with-doc-strings={}".format(yes_no(self.options.docstrings)), "--with-pymalloc={}".format(yes_no(self.options.pymalloc)), "--with-system-expat", @@ -222,117 +189,157 @@ def _configure_autotools(self): "--enable-optimizations={}".format(yes_no(self.options.optimizations)), "--with-lto={}".format(yes_no(self.options.lto)), "--with-pydebug={}".format(yes_no(self.settings.build_type == "Debug")), + "--with-system-libmpdec", + "--with-openssl={}".format(self.dependencies["openssl"].package_folder), ] - if self._is_py2: - conf_args.extend([ - "--enable-unicode={}".format(yes_no(self.options.unicode)), - ]) - if self._is_py3: - conf_args.extend([ - "--with-system-libmpdec", - "--with-openssl={}".format(self.deps_cpp_info["openssl"].rootpath), - "--enable-loadable-sqlite-extensions={}".format(yes_no(not self.options["sqlite3"].omit_load_extension)), - ]) - if self.settings.compiler == "intel": - conf_args.extend(["--with-icc"]) - if tools.get_env("CC") or self.settings.compiler != "gcc": - conf_args.append("--without-gcc") + if Version(self.version) >= "3.10": + tc.configure_args.append("--disable-test-modules") + if self.options.get_safe("with_sqlite3"): + tc.configure_args.append("--enable-loadable-sqlite-extensions={}".format( + yes_no(not self.dependencies["sqlite3"].options.omit_load_extension) + )) if self.options.with_tkinter: tcltk_includes = [] tcltk_libs = [] # FIXME: collect using some conan util (https://github.com/conan-io/conan/issues/7656) for dep in ("tcl", "tk", "zlib"): - tcltk_includes += ["-I{}".format(d) for d in self.deps_cpp_info[dep].include_paths] - tcltk_libs += ["-l{}".format(lib) for lib in self.deps_cpp_info[dep].libs] - if self.settings.os == "Linux" and not self.options["tk"].shared: + cpp_info = self.dependencies[dep].cpp_info.aggregated_components() + tcltk_includes += [f"-I{d}" for d in cpp_info.includedirs] + tcltk_libs += [f"-L{lib}" for lib in cpp_info.libdirs] + tcltk_libs += [f"-l{lib}" for lib in cpp_info.libs] + if self.settings.os in ["Linux", "FreeBSD"] and not self.dependencies["tk"].options.shared: # FIXME: use info from xorg.components (x11, xscrnsaver) - tcltk_libs.extend(["-l{}".format(lib) for lib in ("X11", "Xss")]) - conf_args.extend([ + tcltk_libs.extend([f"-l{lib}" for lib in ("X11", "Xss")]) + tc.configure_args += [ "--with-tcltk-includes={}".format(" ".join(tcltk_includes)), "--with-tcltk-libs={}".format(" ".join(tcltk_libs)), - ]) - if self.settings.os in ("Linux", "FreeBSD"): - # Building _testembed fails due to missing pthread/rt symbols - self._autotools.link_flags.append("-lpthread") - - build = None - if tools.cross_building(self) and not tools.cross_building(self, skip_x64_x86=True): - # Building from x86_64 to x86 is not a "real" cross build, so set build == host - build = tools.get_gnu_triplet(str(self.settings.os), str(self.settings.arch), str(self.settings.compiler)) - self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder, build=build) - return self._autotools + ] + if not is_apple_os(self): + tc.extra_ldflags.append('-Wl,--as-needed') + + tc.generate() + + deps = AutotoolsDeps(self) + deps.generate() + + def generate(self): + VirtualRunEnv(self).generate(scope="build") + + if is_msvc(self): + # The msbuild generator only works with Visual Studio + deps = MSBuildDeps(self) + deps.generate() + # The toolchain.props is not injected yet, but it also generates VCVars + toolchain = MSBuildToolchain(self) + toolchain.properties["IncludeExternals"] = "true" + toolchain.generate() + else: + self._generate_autotools() def _patch_sources(self): - for patch in self.conan_data.get("patches",{}).get(self.version, []): - tools.patch(**patch) - if self._is_py3 and tools.Version(self._version_number_only) < "3.10": - tools.replace_in_file(os.path.join(self._source_subfolder, "setup.py"), - ":libmpdec.so.2", "mpdec") - if self.settings.compiler == "Visual Studio": + apply_conandata_patches(self) + setup_py = os.path.join(self.source_folder, "setup.py") + if Version(self.version) < "3.10": + replace_in_file(self, setup_py, ":libmpdec.so.2", "mpdec") + if is_msvc(self): runtime_library = { "MT": "MultiThreaded", "MTd": "MultiThreadedDebug", "MD": "MultiThreadedDLL", "MDd": "MultiThreadedDebugDLL", - }[str(self.settings.compiler.runtime)] + }[msvc_runtime_flag(self)] self.output.info("Patching runtime") - tools.replace_in_file(os.path.join(self._source_subfolder, "PCbuild", "pyproject.props"), - "MultiThreadedDLL", runtime_library) - tools.replace_in_file(os.path.join(self._source_subfolder, "PCbuild", "pyproject.props"), - "MultiThreadedDebugDLL", runtime_library) + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pyproject.props"), + "MultiThreadedDLL", runtime_library) + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pyproject.props"), + "MultiThreadedDebugDLL", runtime_library) # Remove vendored packages - tools.rmdir(os.path.join(self._source_subfolder, "Modules", "_decimal", "libmpdec")) - tools.rmdir(os.path.join(self._source_subfolder, "Modules", "expat")) + rmdir(self, os.path.join(self.source_folder, "Modules", "_decimal", "libmpdec")) + rmdir(self, os.path.join(self.source_folder, "Modules", "expat")) if self.options.get_safe("with_curses", False): # FIXME: this will link to ALL libraries of ncurses. Only need to link to ncurses(w) (+ eventually tinfo) - tools.replace_in_file(os.path.join(self._source_subfolder, "setup.py"), - "curses_libs = ", - "curses_libs = {} #".format(repr(self.deps_cpp_info["ncurses"].libs + self.deps_cpp_info["ncurses"].system_libs))) + ncurses_info = self.dependencies["ncurses"].cpp_info.aggregated_components() + replace_in_file(self, setup_py, + "curses_libs = ", + "curses_libs = {} #".format(repr(ncurses_info.libs + ncurses_info.system_libs))) + + if self._supports_modules: + openssl = self.dependencies["openssl"].cpp_info.aggregated_components() + zlib = self.dependencies["zlib"].cpp_info.aggregated_components() + replace_in_file(self, setup_py, + "openssl_includes = ", + f"openssl_includes = {openssl.includedirs + zlib.includedirs} #") + replace_in_file(self, setup_py, + "openssl_libdirs = ", + f"openssl_libdirs = {openssl.libdirs + zlib.libdirs} #") + replace_in_file(self, setup_py, + "openssl_libs = ", + f"openssl_libs = {openssl.libs + zlib.libs} #") # Enable static MSVC cpython if not self.options.shared: - tools.replace_in_file(os.path.join(self._source_subfolder, "PCbuild", "pythoncore.vcxproj"), - "","Py_NO_BUILD_SHARED;") - tools.replace_in_file(os.path.join(self._source_subfolder, "PCbuild", "pythoncore.vcxproj"), - "Py_ENABLE_SHARED", "Py_NO_ENABLE_SHARED") - tools.replace_in_file(os.path.join(self._source_subfolder, "PCbuild", "pythoncore.vcxproj"), - "DynamicLibrary", "StaticLibrary") - - tools.replace_in_file(os.path.join(self._source_subfolder, "PCbuild", "python.vcxproj"), - "", "shlwapi.lib;ws2_32.lib;pathcch.lib;version.lib;%(AdditionalDependencies)") - tools.replace_in_file(os.path.join(self._source_subfolder, "PCbuild", "python.vcxproj"), - "", "Py_NO_ENABLE_SHARED;") - - tools.replace_in_file(os.path.join(self._source_subfolder, "PCbuild", "pythonw.vcxproj"), - "", "shlwapi.lib;ws2_32.lib;pathcch.lib;version.lib;%(AdditionalDependencies)") - tools.replace_in_file(os.path.join(self._source_subfolder, "PCbuild", "pythonw.vcxproj"), - "", "Py_NO_ENABLE_SHARED;%(PreprocessorDefinitions)") - - def _upgrade_single_project_file(self, project_file): - """ - `devenv /upgrade ` will upgrade *ALL* projects referenced by the project. - By temporarily moving the solution project, only one project is upgraded - This is needed for static cpython or for disabled optional dependencies (e.g. tkinter=False) - Restore it afterwards because it is needed to build some targets. - """ - tools.rename(os.path.join(self._source_subfolder, "PCbuild", "pcbuild.sln"), - os.path.join(self._source_subfolder, "PCbuild", "pcbuild.sln.bak")) - tools.rename(os.path.join(self._source_subfolder, "PCbuild", "pcbuild.proj"), - os.path.join(self._source_subfolder, "PCbuild", "pcbuild.proj.bak")) - with tools.vcvars(self.settings): - self.run("devenv \"{}\" /upgrade".format(project_file), run_environment=True) - tools.rename(os.path.join(self._source_subfolder, "PCbuild", "pcbuild.sln.bak"), - os.path.join(self._source_subfolder, "PCbuild", "pcbuild.sln")) - tools.rename(os.path.join(self._source_subfolder, "PCbuild", "pcbuild.proj.bak"), - os.path.join(self._source_subfolder, "PCbuild", "pcbuild.proj")) + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pythoncore.vcxproj"), + "", + "Py_NO_BUILD_SHARED;") + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pythoncore.vcxproj"), + "Py_ENABLE_SHARED", + "Py_NO_ENABLE_SHARED") + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pythoncore.vcxproj"), + "DynamicLibrary", + "StaticLibrary") + + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "python.vcxproj"), + "", + "shlwapi.lib;ws2_32.lib;pathcch.lib;version.lib;%(AdditionalDependencies)") + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "python.vcxproj"), + "", + "Py_NO_ENABLE_SHARED;") + + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pythonw.vcxproj"), + "", + "shlwapi.lib;ws2_32.lib;pathcch.lib;version.lib;%(AdditionalDependencies)") + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pythonw.vcxproj"), + "", + "Py_NO_ENABLE_SHARED;%(PreprocessorDefinitions)") + + # Don't import projects that we aren't pulling + deps = [ + # Option suffix, base file name, conan props suffix + ("sqlite3", "_sqlite3", "sqlite3"), + ("tkinter", "_tkinter", "tk"), + ("bz2", "_bz2", "bzip2"), + ("lzma", "_lzma", "xz_utils"), + ] + for opt, fname, propname in deps: + full_file = os.path.join(self.source_folder, "PCbuild", f"{fname}.vcxproj") + if not self.options.get_safe(f"with_{opt}", default=True): + replace_in_file(self, full_file, f'', "") + + # Fix props path for dependencies we are pulling + PCBuild = os.path.join(self.source_folder, "PCbuild") + for filename in os.listdir(PCBuild): + if filename.endswith(".vcxproj"): + replace_in_file(self, os.path.join(PCBuild, filename), "CONAN_REPLACE_HERE", self.generators_folder, strict=False) + + conantoolchain_props = os.path.join(self.generators_folder, MSBuildToolchain.filename) + replace_in_file( + self, os.path.join(self.source_folder, "PCbuild", "pythoncore.vcxproj"), + '', + f'', + ) + + for project in ["python", "pythonw"]: + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", f"{project}.vcxproj"), + '', + f'') @property def _solution_projects(self): if self.options.shared: - solution_path = os.path.join(self._source_subfolder, "PCbuild", "pcbuild.sln") - projects = set(m.group(1) for m in re.finditer("\"([^\"]+)\\.vcxproj\"", open(solution_path).read())) + solution_path = os.path.join(self.source_folder, "PCbuild", "pcbuild.sln") + projects = set(m.group(1) for m in re.finditer('"([^"]+)\\.vcxproj"', open(solution_path).read())) def project_build(name): if os.path.basename(name) in self._msvc_discarded_projects: @@ -341,39 +348,31 @@ def project_build(name): return False return True - def sort_importance(key): - importance = ( - "pythoncore", # The python library MUST be built first. All modules and executables depend on it - "python", # Build the python executable next (for convenience, when debugging) - ) - try: - return importance.index(key) - except ValueError: - return len(importance) - - projects = sorted((p for p in projects if project_build(p)), key=sort_importance) + projects = list(filter(project_build, projects)) return projects else: - return "pythoncore", "python", "pythonw" + return ["pythoncore", "python", "pythonw"] @property def _msvc_discarded_projects(self): - discarded = {"python_uwp", "pythonw_uwp"} + discarded = { + "python_uwp", + "pythonw_uwp", + "_freeze_importlib", + "sqlite3", + "bdist_wininst", + "liblzma", + "openssl", + "xxlimited", + } if not self.options.with_bz2: discarded.add("bz2") if not self.options.with_sqlite3: discarded.add("_sqlite3") if not self.options.with_tkinter: discarded.add("_tkinter") - if self._is_py2: - # Python 2 Visual Studio projects NOT to build - discarded = discarded.union({"bdist_wininst", "libeay", "ssleay", "sqlite3", "tcl", "tk", "tix"}) - if not self.options.with_bsddb: - discarded.add("_bsddb") - elif self._is_py3: - discarded = discarded.union({"bdist_wininst", "liblzma", "openssl", "sqlite3", "xxlimited"}) - if not self.options.with_lzma: - discarded.add("_lzma") + if not self.options.with_lzma: + discarded.add("_lzma") return discarded @property @@ -381,50 +380,31 @@ def _msvc_archs(self): archs = { "x86": "Win32", "x86_64": "x64", + "armv7": "ARM", + "armv8_32": "ARM", + "armv8": "ARM64", } - if tools.Version(self._version_number_only) >= "3.8": - archs.update({ - "armv7": "ARM", - "armv8_32": "ARM", - "armv8": "ARM64", - }) return archs def _msvc_build(self): msbuild = MSBuild(self) - msbuild_properties = { - "IncludeExternals": "true", - } + msbuild.platform = self._msvc_archs[str(self.settings.arch)] + projects = self._solution_projects - self.output.info("Building {} Visual Studio projects: {}".format(len(projects), projects)) + self.output.info(f"Building {len(projects)} Visual Studio projects: {projects}") - with tools.no_op(): - for project_i, project in enumerate(projects, 1): - self.output.info("[{}/{}] Building project '{}'...".format(project_i, len(projects), project)) - project_file = os.path.join(self._source_subfolder, "PCbuild", project + ".vcxproj") - self._upgrade_single_project_file(project_file) - msbuild.build(project_file, upgrade_project=False, build_type="Debug" if self.settings.build_type == "Debug" else "Release", - platforms=self._msvc_archs, properties=msbuild_properties) + sln = os.path.join(self.source_folder, "PCbuild", "pcbuild.sln") + # FIXME: Solution files do not pick up the toolset automatically. + cmd = msbuild.command(sln, targets=projects) + self.run(f"{cmd} /p:PlatformToolset={msvs_toolset(self)}") def build(self): - # FIXME: these checks belong in validate, but the versions of dependencies are not available there yet - if self._supports_modules: - if tools.Version(self._version_number_only) < "3.8.0": - if tools.Version(self.deps_cpp_info["mpdecimal"].version) >= "2.5.0": - raise ConanInvalidConfiguration("cpython versions lesser then 3.8.0 require a mpdecimal lesser then 2.5.0") - elif tools.Version(self._version_number_only) >= "3.9.0": - if tools.Version(self.deps_cpp_info["mpdecimal"].version) < "2.5.0": - raise ConanInvalidConfiguration("cpython 3.9.0 (and newer) requires (at least) mpdecimal 2.5.0") - - if self._with_libffi: - if tools.Version(self.deps_cpp_info["libffi"].version) >= "3.3" and self.settings.compiler == "Visual Studio" and "d" in str(self.settings.compiler.runtime): - raise ConanInvalidConfiguration("libffi versions >= 3.3 cause 'read access violations' when using a debug runtime (MTd/MDd)") - self._patch_sources() - if self.settings.compiler == "Visual Studio": + if is_msvc(self): self._msvc_build() else: - autotools = self._configure_autotools() + autotools = Autotools(self) + autotools.configure() autotools.make() @property @@ -432,44 +412,40 @@ def _msvc_artifacts_path(self): build_subdir_lut = { "x86_64": "amd64", "x86": "win32", + "armv7": "arm32", + "armv8_32": "arm32", + "armv8": "arm64", } - if tools.Version(self._version_number_only) >= "3.8": - build_subdir_lut.update({ - "armv7": "arm32", - "armv8_32": "arm32", - "armv8": "arm64", - }) - return os.path.join(self._source_subfolder, "PCbuild", build_subdir_lut[str(self.settings.arch)]) + return os.path.join(self.source_folder, "PCbuild", build_subdir_lut[str(self.settings.arch)]) @property def _msvc_install_subprefix(self): return "bin" def _copy_essential_dlls(self): - if self.settings.compiler == "Visual Studio": + if is_msvc(self): # Until MSVC builds support cross building, copy dll's of essential (shared) dependencies to python binary location. # These dll's are required when running the layout tool using the newly built python executable. dest_path = os.path.join(self.build_folder, self._msvc_artifacts_path) - if self._with_libffi: - for bin_path in self.deps_cpp_info["libffi"].bin_paths: - self.copy("*.dll", src=bin_path, dst=dest_path) - for bin_path in self.deps_cpp_info["expat"].bin_paths: - self.copy("*.dll", src=bin_path, dst=dest_path) - for bin_path in self.deps_cpp_info["zlib"].bin_paths: - self.copy("*.dll", src=bin_path, dst=dest_path) + for bin_path in self.dependencies["libffi"].cpp_info.bindirs: + copy(self, "*.dll", src=bin_path, dst=dest_path) + for bin_path in self.dependencies["expat"].cpp_info.bindirs: + copy(self, "*.dll", src=bin_path, dst=dest_path) + for bin_path in self.dependencies["zlib"].cpp_info.bindirs: + copy(self, "*.dll", src=bin_path, dst=dest_path) def _msvc_package_layout(self): self._copy_essential_dlls() install_prefix = os.path.join(self.package_folder, self._msvc_install_subprefix) - tools.mkdir(install_prefix) + mkdir(self, install_prefix) build_path = self._msvc_artifacts_path infix = "_d" if self.settings.build_type == "Debug" else "" # FIXME: if cross building, use a build python executable here - python_built = os.path.join(build_path, "python{}.exe".format(infix)) + python_built = os.path.join(build_path, f"python{infix}.exe") layout_args = [ - os.path.join(self._source_subfolder, "PC", "layout", "main.py"), + os.path.join(self.source_folder, "PC", "layout", "main.py"), "-v", - "-s", self._source_subfolder, + "-s", self.source_folder, "-b", build_path, "--copy", install_prefix, "-p", @@ -481,16 +457,12 @@ def _msvc_package_layout(self): layout_args.append("--include-tcltk") if self.settings.build_type == "Debug": layout_args.append("-d") - python_args = " ".join("\"{}\"".format(a) for a in layout_args) - self.run("{} {}".format(python_built, python_args), run_environment=True) + python_args = " ".join(f'"{a}"' for a in layout_args) + self.run(f"{python_built} {python_args}") - tools.rmdir(os.path.join(self.package_folder, "bin", "tcl")) + rmdir(self, os.path.join(self.package_folder, "bin", "tcl")) - for file in os.listdir(install_prefix): - if re.match("vcruntime.*", file): - os.unlink(os.path.join(install_prefix, file)) - continue - os.unlink(os.path.join(install_prefix, "LICENSE.txt")) + rm(self, "LICENSE.txt", install_prefix) for file in os.listdir(os.path.join(install_prefix, "libs")): if not re.match("python.*", file): os.unlink(os.path.join(install_prefix, "libs", file)) @@ -498,45 +470,61 @@ def _msvc_package_layout(self): def _msvc_package_copy(self): build_path = self._msvc_artifacts_path infix = "_d" if self.settings.build_type == "Debug" else "" - self.copy("*.exe", src=build_path, dst=os.path.join(self.package_folder, self._msvc_install_subprefix)) - self.copy("*.dll", src=build_path, dst=os.path.join(self.package_folder, self._msvc_install_subprefix)) - self.copy("*.pyd", src=build_path, dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "DLLs")) - self.copy("python{}{}.lib".format(self._version_suffix, infix), src=build_path, dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "libs")) - self.copy("*", src=os.path.join(self._source_subfolder, "Include"), dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "include")) - self.copy("pyconfig.h", src=os.path.join(self._source_subfolder, "PC"), dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "include")) - self.copy("*.py", src=os.path.join(self._source_subfolder, "lib"), dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "Lib")) - tools.rmdir(os.path.join(self.package_folder, self._msvc_install_subprefix, "Lib", "test")) + copy(self, "*.exe", + src=build_path, + dst=os.path.join(self.package_folder, self._msvc_install_subprefix)) + copy(self, "*.dll", + src=build_path, + dst=os.path.join(self.package_folder, self._msvc_install_subprefix)) + copy(self, "*.pyd", + src=build_path, + dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "DLLs")) + copy(self, f"python{self._version_suffix}{infix}.lib", + src=build_path, + dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "libs")) + copy(self, "*", + src=os.path.join(self.source_folder, "Include"), + dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "include")) + copy(self, "pyconfig.h", + src=os.path.join(self.source_folder, "PC"), + dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "include")) + copy(self, "*.py", + src=os.path.join(self.source_folder, "lib"), + dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "Lib")) + rmdir(self, os.path.join(self.package_folder, self._msvc_install_subprefix, "Lib", "test")) packages = {} get_name_version = lambda fn: fn.split(".", 2)[:2] - whldir = os.path.join(self._source_subfolder, "Lib", "ensurepip", "_bundled") + whldir = os.path.join(self.source_folder, "Lib", "ensurepip", "_bundled") for fn in filter(lambda n: n.endswith(".whl"), os.listdir(whldir)): name, version = get_name_version(fn) add = True if name in packages: pname, pversion = get_name_version(packages[name]) - add = tools.Version(version) > tools.Version(pversion) + add = Version(version) > Version(pversion) if add: packages[name] = fn for fname in packages.values(): - tools.unzip(filename=os.path.join(whldir, fname), destination=os.path.join(self.package_folder, "bin", "Lib", "site-packages")) + unzip(self, filename=os.path.join(whldir, fname), + destination=os.path.join(self.package_folder, "bin", "Lib", "site-packages")) - self.run("{} -c \"import compileall; compileall.compile_dir('{}')\"".format(os.path.join(build_path, self._cpython_interpreter_name), os.path.join(self.package_folder, self._msvc_install_subprefix, "Lib").replace("\\", "/")), - run_environment=True) + interpreter_path = os.path.join(build_path, self._cpython_interpreter_name) + lib_dir_path = os.path.join(self.package_folder, self._msvc_install_subprefix, "Lib").replace("\\", "/") + self.run(f"{interpreter_path} -c \"import compileall; compileall.compile_dir('{lib_dir_path}')\"") def package(self): - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") - if self.settings.compiler == "Visual Studio": - if self._is_py2 or not self.options.shared: - self._msvc_package_copy() - else: + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + if is_msvc(self): + if self.options.shared: self._msvc_package_layout() - tools.remove_files_by_mask(os.path.join(self.package_folder, "bin"), "vcruntime*") + else: + self._msvc_package_copy() + rm(self, "vcruntime*", os.path.join(self.package_folder, "bin"), recursive=True) else: - 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")) + autotools = Autotools(self) + autotools.install(args=["DESTDIR="]) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) # Rewrite shebangs of python scripts for filename in os.listdir(os.path.join(self.package_folder, "bin")): @@ -550,23 +538,23 @@ def package(self): if not(firstline.startswith(b"#!") and b"/python" in firstline and b"/bin/sh" not in firstline): continue text = fn.read() - self.output.info("Rewriting shebang of {}".format(filename)) + self.output.info(f"Rewriting shebang of {filename}") with open(filepath, "wb") as fn: - fn.write(textwrap.dedent("""\ + fn.write(textwrap.dedent(f"""\ #!/bin/sh ''':' __file__="$0" while [ -L "$__file__" ]; do __file__="$(dirname "$__file__")/$(readlink "$__file__")" done - exec "$(dirname "$__file__")/python{}" "$0" "$@" + exec "$(dirname "$__file__")/python{self._version_suffix}" "$0" "$@" ''' - """.format(self._version_suffix)).encode()) + """).encode()) fn.write(text) if not os.path.exists(self._cpython_symlink): - os.symlink("python{}".format(self._version_suffix), self._cpython_symlink) - self._fix_install_name() + os.symlink(f"python{self._version_suffix}", self._cpython_symlink) + fix_apple_shared_install_name(self) @property def _cpython_symlink(self): @@ -577,14 +565,12 @@ def _cpython_symlink(self): @property def _cpython_interpreter_name(self): - if self.settings.compiler == "Visual Studio": - suffix = "" - else: - suffix = self._version_suffix - python = "python{}".format(suffix) - if self.settings.compiler == "Visual Studio": + python = "python" + if is_msvc(self): if self.settings.build_type == "Debug": python += "_d" + else: + python += self._version_suffix if self.settings.os == "Windows": python += ".exe" return python @@ -596,80 +582,71 @@ def _cpython_interpreter_path(self): @property def _abi_suffix(self): res = "" - if self._is_py3: - if self.settings.build_type == "Debug": - res += "d" - if tools.Version(self._version_number_only) < "3.8": - if self.options.get_safe("pymalloc", False): - res += "m" + if self.settings.build_type == "Debug": + res += "d" return res @property def _lib_name(self): - if self.settings.compiler == "Visual Studio": + if is_msvc(self): if self.settings.build_type == "Debug": lib_ext = "_d" else: lib_ext = "" else: - lib_ext = self._abi_suffix + (".dll.a" if self.options.shared and self.settings.os == "Windows" else "") - return "python{}{}".format(self._version_suffix, lib_ext) - - def _fix_install_name(self): - if tools.is_apple_os(self.settings.os) and self.options.shared: - buffer = StringIO() - python = os.path.join(self.package_folder, "bin", "python") - self.run('otool -L "%s"' % python, output=buffer) - lines = buffer.getvalue().strip().split('\n')[1:] - for line in lines: - library = line.split()[0] - if library.startswith(self.package_folder): - new = library.replace(self.package_folder, "@executable_path/..") - self.output.info("patching {}, replace {} with {}".format(python, library, new)) - self.run("install_name_tool -change {} {} {}".format(library, new, python)) + lib_ext = self._abi_suffix + ( + ".dll.a" if self.options.shared and self.settings.os == "Windows" else "" + ) + return f"python{self._version_suffix}{lib_ext}" def package_info(self): # FIXME: conan components Python::Interpreter component, need a target type # self.cpp_info.names["cmake_find_package"] = "Python" # self.cpp_info.names["cmake_find_package_multi"] = "Python" - # FIXME: conan components need to generate multiple .pc files (python2, python-27) - py_version = tools.Version(self._version_number_only) + py_version = Version(self.version) # python component: "Build a C extension for Python" - if self.settings.compiler == "Visual Studio": + if is_msvc(self): self.cpp_info.components["python"].includedirs = [os.path.join(self._msvc_install_subprefix, "include")] libdir = os.path.join(self._msvc_install_subprefix, "libs") else: - self.cpp_info.components["python"].includedirs.append(os.path.join("include", "python{}{}".format(self._version_suffix, self._abi_suffix))) + self.cpp_info.components["python"].includedirs.append( + os.path.join("include", f"python{self._version_suffix}{self._abi_suffix}") + ) libdir = "lib" if self.options.shared: self.cpp_info.components["python"].defines.append("Py_ENABLE_SHARED") else: self.cpp_info.components["python"].defines.append("Py_NO_ENABLE_SHARED") - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["python"].system_libs.extend(["dl", "m", "pthread", "util"]) elif self.settings.os == "Windows": - self.cpp_info.components["python"].system_libs.extend(["pathcch", "shlwapi", "version", "ws2_32"]) + self.cpp_info.components["python"].system_libs.extend( + ["pathcch", "shlwapi", "version", "ws2_32"] + ) self.cpp_info.components["python"].requires = ["zlib::zlib"] if self.settings.os != "Windows": self.cpp_info.components["python"].requires.append("libxcrypt::libxcrypt") - self.cpp_info.components["python"].names["pkg_config"] = "python-{}.{}".format(py_version.major, py_version.minor) + self.cpp_info.components["python"].set_property( + "pkg_config_name", f"python-{py_version.major}.{py_version.minor}" + ) + self.cpp_info.components["python"].set_property( + "pkg_config_aliases", f"python{py_version.major}" + ) self.cpp_info.components["python"].libdirs = [] - self.cpp_info.components["_python_copy"].names["pkg_config"] = "python{}".format(py_version.major) - self.cpp_info.components["_python_copy"].requires = ["python"] - self.cpp_info.components["_python_copy"].libdirs = [] - # embed component: "Embed Python into an application" self.cpp_info.components["embed"].libs = [self._lib_name] self.cpp_info.components["embed"].libdirs = [libdir] - self.cpp_info.components["embed"].names["pkg_config"] = "python-{}.{}-embed".format(py_version.major, py_version.minor) + self.cpp_info.components["embed"].includedirs = [] + self.cpp_info.components["embed"].set_property( + "pkg_config_name", f"python-{py_version.major}.{py_version.minor}-embed" + ) + self.cpp_info.components["embed"].set_property( + "pkg_config_aliases", f"python{py_version.major}-embed" + ) self.cpp_info.components["embed"].requires = ["python"] - self.cpp_info.components["_embed_copy"].requires = ["embed"] - self.cpp_info.components["_embed_copy"].names["pkg_config"] = ["python{}-embed".format(py_version.major)] - self.cpp_info.components["_embed_copy"].libdirs = [] - if self._supports_modules: # hidden components: the C extensions of python are built as dynamically loaded shared libraries. # C extensions or applications with an embedded Python should not need to link to them.. @@ -677,12 +654,11 @@ def package_info(self): "openssl::openssl", "expat::expat", "mpdecimal::mpdecimal", + "libffi::libffi", ] - if self._with_libffi: - self.cpp_info.components["_hidden"].requires.append("libffi::libffi") if self.settings.os != "Windows": - if not tools.is_apple_os(self.settings.os): - self.cpp_info.components["_hidden"].requires.append("libuuid::libuuid") + if not is_apple_os(self): + self.cpp_info.components["_hidden"].requires.append("util-linux-libuuid::util-linux-libuuid") self.cpp_info.components["_hidden"].requires.append("libxcrypt::libxcrypt") if self.options.with_bz2: self.cpp_info.components["_hidden"].requires.append("bzip2::bzip2") @@ -692,47 +668,68 @@ def package_info(self): self.cpp_info.components["_hidden"].requires.append("sqlite3::sqlite3") if self.options.get_safe("with_curses", False): self.cpp_info.components["_hidden"].requires.append("ncurses::ncurses") - if self.options.get_safe("with_bsddb"): - self.cpp_info.components["_hidden"].requires.append("libdb::libdb") if self.options.get_safe("with_lzma"): self.cpp_info.components["_hidden"].requires.append("xz_utils::xz_utils") if self.options.get_safe("with_tkinter"): self.cpp_info.components["_hidden"].requires.append("tk::tk") + self.cpp_info.components["_hidden"].includedirs = [] self.cpp_info.components["_hidden"].libdirs = [] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["_hidden"].system_libs.append("nsl") if self.options.env_vars: bindir = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bindir)) + self.runenv_info.append_path("PATH", bindir) + self.buildenv_info.append_path("PATH", bindir) + + # TODO remove once Conan 1.x is no longer supported + self.output.info(f"Appending PATH environment variable: {bindir}") self.env_info.PATH.append(bindir) python = self._cpython_interpreter_path + self.conf_info.define("user.cpython:python", python) self.user_info.python = python if self.options.env_vars: - self.output.info("Setting PYTHON environment variable: {}".format(python)) + self.runenv_info.append_path("PYTHON", python) + self.buildenv_info.append_path("PYTHON", python) + + # TODO remove once Conan 1.x is no longer supported + self.output.info(f"Appending PYTHON environment variable: {python}") self.env_info.PYTHON = python - if self.settings.compiler == "Visual Studio": + if is_msvc(self): pythonhome = os.path.join(self.package_folder, "bin") - elif tools.is_apple_os(self.settings.os): - pythonhome = self.package_folder else: - version = tools.Version(self._version_number_only) - pythonhome = os.path.join(self.package_folder, "lib", "python{}.{}".format(version.major, version.minor)) + pythonhome = self.package_folder + self.conf_info.define("user.cpython:pythonhome", pythonhome) self.user_info.pythonhome = pythonhome - pythonhome_required = self.settings.compiler == "Visual Studio" or tools.is_apple_os(self.settings.os) + pythonhome_required = is_msvc(self) or is_apple_os(self) + self.conf_info.define("user.cpython:module_requires_pythonhome", pythonhome_required) self.user_info.module_requires_pythonhome = pythonhome_required - if self.settings.compiler == "Visual Studio": + if is_msvc(self): if self.options.env_vars: - self.output.info("Setting PYTHONHOME environment variable: {}".format(pythonhome)) + # FIXME: On Windows, defining this breaks the packaged Python executable, but fixes + # separately built executables with an embedded interpreter trying to run standard Python + # modules. However, NOT defining this reverses the situation, normal Python executables + #work, but embedded interpreters break. + # The docs at https://python.readthedocs.io/en/latest/using/cmdline.html#envvar-PYTHONHOME + # seem to not be accurate to Windows (https://discuss.python.org/t/the-document-on-pythonhome-might-be-wrong/19614/5) + #self.runenv_info.append_path("PYTHONHOME", pythonhome) + #self.buildenv_info.append_path("PYTHONHOME", pythonhome) + + # TODO remove once Conan 1.x is no longer supported + self.output.info(f"Setting PYTHONHOME environment variable: {pythonhome}") self.env_info.PYTHONHOME = pythonhome - if self._is_py2: - python_root = "" - else: - python_root = self.package_folder - if self.options.env_vars: - self.output.info("Setting PYTHON_ROOT environment variable: {}".format(python_root)) - self.env_info.PYTHON_ROOT = python_root + python_root = self.package_folder + if self.options.env_vars: + self.runenv_info.append_path("PYTHON_ROOT", python_root) + self.buildenv_info.append_path("PYTHON_ROOT", python_root) + + # TODO remove once Conan 1.x is no longer supported + self.output.info(f"Setting PYTHON_ROOT environment variable: {python_root}") + self.env_info.PYTHON_ROOT = python_root + self.conf_info.define("user.cpython:python_root", python_root) self.user_info.python_root = python_root diff --git a/recipes/cpython/all/patches/2.7.18-0001-msvc.patch b/recipes/cpython/all/patches/2.7.18-0001-msvc.patch deleted file mode 100644 index 2c101049df531..0000000000000 --- a/recipes/cpython/all/patches/2.7.18-0001-msvc.patch +++ /dev/null @@ -1,278 +0,0 @@ ---- PCbuild/_bsddb.vcxproj -+++ PCbuild/_bsddb.vcxproj -@@ -46,7 +46,7 @@ - NotSet - - -- -+ - - .pyd - -@@ -75,7 +75,7 @@ - - - -- -+ - - - ---- PCbuild/_hashlib.vcxproj -+++ PCbuild/_hashlib.vcxproj -@@ -45,7 +45,7 @@ - DynamicLibrary - NotSet - -- -+ - - .pyd - -@@ -64,7 +64,7 @@ - $(opensslIncludeDir);%(AdditionalIncludeDirectories) - - -- ws2_32.lib;$(OutDir)libeay$(PyDebugExt).lib;$(OutDir)ssleay$(PyDebugExt).lib;%(AdditionalDependencies) -+ ws2_32.lib;%(AdditionalDependencies) - - - -@@ -75,14 +75,14 @@ - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - -- -+ - - - ---- PCbuild/_sqlite3.vcxproj -+++ PCbuild/_sqlite3.vcxproj -@@ -45,7 +45,7 @@ - DynamicLibrary - NotSet - -- -+ - - .pyd - -@@ -96,10 +96,10 @@ - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - -- -+ - - - ---- PCbuild/_ssl.vcxproj -+++ PCbuild/_ssl.vcxproj -@@ -45,7 +45,7 @@ - DynamicLibrary - NotSet - -- -+ - - .pyd - -@@ -64,7 +64,7 @@ - $(opensslIncludeDir);%(AdditionalIncludeDirectories) - - -- ws2_32.lib;crypt32.lib;$(OutDir)libeay$(PyDebugExt).lib;$(OutDir)ssleay$(PyDebugExt).lib;%(AdditionalDependencies) -+ ws2_32.lib;crypt32.lib;%(AdditionalDependencies) - - - -@@ -75,14 +75,14 @@ - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - -- -+ - - {86937f53-c189-40ef-8ce8-8759d8e7d480} - false ---- PCbuild/bz2.vcxproj -+++ PCbuild/bz2.vcxproj -@@ -47,7 +47,7 @@ - NotSet - - -- -+ - - .pyd - -@@ -72,13 +72,13 @@ - - - -- -+ - - - ---- PCbuild/_elementtree.vcxproj -+++ PCbuild/_elementtree.vcxproj -@@ -45,7 +45,7 @@ - DynamicLibrary - NotSet - -- -+ - - .pyd - -@@ -61,15 +61,15 @@ - - - -- ..\Modules\expat;%(AdditionalIncludeDirectories) -- _CRT_SECURE_NO_WARNINGS;USE_PYEXPAT_CAPI;XML_STATIC;%(PreprocessorDefinitions) -+ %(AdditionalIncludeDirectories) -+ _CRT_SECURE_NO_WARNINGS;USE_PYEXPAT_CAPI;%(PreprocessorDefinitions) - - - 0x1D100000 - - - -- -+ - - - -- -+ - - - ---- PCbuild/pyexpat.vcxproj -+++ PCbuild/pyexpat.vcxproj -@@ -45,7 +45,7 @@ - DynamicLibrary - NotSet - -- -+ - - .pyd - -@@ -58,19 +58,19 @@ - - - -- $(PySourcePath)Modules\expat;%(AdditionalIncludeDirectories) -- _CRT_SECURE_NO_WARNINGS;PYEXPAT_EXPORTS;XML_STATIC;%(PreprocessorDefinitions) -+ %(AdditionalIncludeDirectories) -+ _CRT_SECURE_NO_WARNINGS;PYEXPAT_EXPORTS;%(PreprocessorDefinitions) - - - -- -- -+ - - - -- -+ - - - ---- PCbuild/_tkinter.vcxproj -+++ PCbuild/_tkinter.vcxproj -@@ -45,7 +45,7 @@ - DynamicLibrary - NotSet - -- -+ - - .pyd - -@@ -61,11 +61,11 @@ - - - -- $(tcltkDir)include;%(AdditionalIncludeDirectories) -+ %(AdditionalIncludeDirectories) - WITH_APPINIT;%(PreprocessorDefinitions) - - -- $(tcltkLib);%(AdditionalDependencies) -+ %(AdditionalDependencies) - - - -@@ -77,12 +77,12 @@ - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - -- -+ - - - diff --git a/recipes/cpython/all/patches/2.7.18-0002-add-support-msvc-14.patch b/recipes/cpython/all/patches/2.7.18-0002-add-support-msvc-14.patch deleted file mode 100644 index 6034410d3d265..0000000000000 --- a/recipes/cpython/all/patches/2.7.18-0002-add-support-msvc-14.patch +++ /dev/null @@ -1,59 +0,0 @@ -Patches from https://bugs.python.org/issue30742 - ---- Modules/posixmodule.c -+++ Modules/posixmodule.c -@@ -563,7 +563,10 @@ typedef struct { - char osfile; - } my_ioinfo; - -+#if _MSC_VER < 1900 // MSVS2013 and lower (https://bugs.python.org/issue30742) - extern __declspec(dllimport) char * __pioinfo[]; -+#endif -+ - #define IOINFO_L2E 5 - #define IOINFO_ARRAY_ELTS (1 << IOINFO_L2E) - #define IOINFO_ARRAYS 64 -@@ -575,6 +578,7 @@ extern __declspec(dllimport) char * __pioinfo[]; - int - _PyVerify_fd(int fd) - { -+#if _MSC_VER < 1900 // MSVS2013 and lower (https://bugs.python.org/issue30742) - const int i1 = fd >> IOINFO_L2E; - const int i2 = fd & ((1 << IOINFO_L2E) - 1); - -@@ -607,6 +611,13 @@ _PyVerify_fd(int fd) - fail: - errno = EBADF; - return 0; -+#else -+ //a call to _get_osfhandle with invalid fd sets errno to EBADF -+ if (_get_osfhandle(fd) == INVALID_HANDLE_VALUE) -+ return 0; -+ else -+ return 1; -+#endif - } - - /* the special case of checking dup2. The target fd must be in a sensible range */ ---- Modules/timemodule.c -+++ Modules/timemodule.c -@@ -803,7 +803,18 @@ inittimezone(PyObject *m) { - - And I'm lazy and hate C so nyer. - */ --#if defined(HAVE_TZNAME) && !defined(__GLIBC__) && !defined(__CYGWIN__) -+#if defined(HAVE_TZNAME) && (_MSC_VER >= 1900) //MSVS2015+ (https://bugs.python.org/issue30742) -+ tzset(); -+ PyModule_AddIntConstant(m, "timezone", _timezone); -+#ifdef HAVE_ALTZONE -+ PyModule_AddIntConstant(m, "altzone", altzone); -+#else -+ PyModule_AddIntConstant(m, "altzone", _timezone - 3600); -+#endif -+ PyModule_AddIntConstant(m, "daylight", _daylight); -+ PyModule_AddObject(m, "tzname", -+ Py_BuildValue("(zz)", _tzname[0], _tzname[1])); -+#elif defined(HAVE_TZNAME) && !defined(__GLIBC__) && !defined(__CYGWIN__) - tzset(); - #ifdef PYOS_OS2 - PyModule_AddIntConstant(m, "timezone", _timezone); diff --git a/recipes/cpython/all/patches/2.7.18-0003-msvc-fix-static.patch b/recipes/cpython/all/patches/2.7.18-0003-msvc-fix-static.patch deleted file mode 100644 index 9eb079402733d..0000000000000 --- a/recipes/cpython/all/patches/2.7.18-0003-msvc-fix-static.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- PC/dl_nt.c -+++ PC/dl_nt.c -@@ -107,5 +107,7 @@ - } - return TRUE; - } -- -+#else -+ULONG_PTR _Py_ActivateActCtx() { return 0; } -+void _Py_DeactivateActCtx(ULONG_PTR cookie) {} - #endif /* Py_ENABLE_SHARED */ diff --git a/recipes/cpython/all/patches/2.7.18-0004-disable-macos-tcltk.patch b/recipes/cpython/all/patches/2.7.18-0004-disable-macos-tcltk.patch deleted file mode 100644 index 5c61acd74bd5c..0000000000000 --- a/recipes/cpython/all/patches/2.7.18-0004-disable-macos-tcltk.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- setup.py -+++ setup.py -@@ -1928,9 +1928,9 @@ - # Rather than complicate the code below, detecting and building - # AquaTk is a separate method. Only one Tkinter will be built on - # Darwin - either AquaTk, if it is found, or X11 based Tk. -- if (host_platform == 'darwin' and -- self.detect_tkinter_darwin(inc_dirs, lib_dirs)): -- return -+ #if (host_platform == 'darwin' and -+ # self.detect_tkinter_darwin(inc_dirs, lib_dirs)): -+ # return - - # Assume we haven't found any of the libraries or include files - # The versions with dots are used on Unix, and the versions without diff --git a/recipes/cpython/all/patches/3.10.0-0001-msvc.patch b/recipes/cpython/all/patches/3.10/3.10.0-0001-msvc.patch similarity index 94% rename from recipes/cpython/all/patches/3.10.0-0001-msvc.patch rename to recipes/cpython/all/patches/3.10/3.10.0-0001-msvc.patch index e9b1faf061f3b..9884e12e53f1e 100644 --- a/recipes/cpython/all/patches/3.10.0-0001-msvc.patch +++ b/recipes/cpython/all/patches/3.10/3.10.0-0001-msvc.patch @@ -26,7 +26,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -59,7 +59,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -88,7 +88,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -146,7 +146,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -180,7 +180,7 @@ +++ PCbuild/_sqlite3.vcxproj @@ -74,1 +74,1 @@ - -+ ++ @@ -129,4 +129,4 @@ - + ---- PCbuild/_freeze_importlib.vcxproj -+++ PCbuild/_freeze_importlib.vcxproj -@@ -110,1 +110,1 @@ -- -+ --> ---- PCbuild/_bz2.vcxproj -+++ PCbuild/_bz2.vcxproj -@@ -39,7 +39,7 @@ - bz2 - Win32Proj - -- -+ - - - DynamicLibrary -@@ -69,17 +69,17 @@ - - - -- -+ - - -- -- -+ - - - ---- PCbuild/_decimal.vcxproj -+++ PCbuild/_decimal.vcxproj -@@ -39,7 +39,7 @@ - _decimal - Win32Proj - -- -+ - - - DynamicLibrary -@@ -64,11 +64,11 @@ - _CRT_SECURE_NO_WARNINGS;MASM;%(PreprocessorDefinitions) - CONFIG_32;PPRO;%(PreprocessorDefinitions) - CONFIG_64;%(PreprocessorDefinitions) -- ..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories) -+ ..\Modules\_decimal;%(AdditionalIncludeDirectories) - - - -- -+ - - - -- -+ - - -- -+ - - - ---- PCbuild/_elementtree.vcxproj -+++ PCbuild/_elementtree.vcxproj -@@ -39,7 +39,7 @@ - _elementtree - Win32Proj - -- -+ - - - DynamicLibrary -@@ -65,8 +65,8 @@ -- _CRT_SECURE_NO_WARNINGS;USE_PYEXPAT_CAPI;XML_STATIC;%(PreprocessorDefinitions) -+ _CRT_SECURE_NO_WARNINGS;USE_PYEXPAT_CAPI;%(PreprocessorDefinitions) - - - -- -+ - - - -- -+ - - - ---- PCbuild/_lzma.vcxproj -+++ PCbuild/_lzma.vcxproj -@@ -39,7 +39,7 @@ - lzma - Win32Proj - -- -+ - - - DynamicLibrary -@@ -62,10 +62,10 @@ - - - $(lzmaDir)src/liblzma/api;%(AdditionalIncludeDirectories) -- WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions) -+ $(ConanPreprocessorDefinitions);WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions) - - -- $(OutDir)liblzma$(PyDebugExt).lib;%(AdditionalDependencies) -+ %(AdditionalDependencies) - - - -@@ -79,10 +79,10 @@ - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - -- -+ - - - ---- PCbuild/_sqlite3.vcxproj -+++ PCbuild/_sqlite3.vcxproj -@@ -39,7 +39,7 @@ - _sqlite3 - Win32Proj - -- -+ - - - DynamicLibrary -@@ -95,10 +95,10 @@ - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - -- -+ - - - ---- PCbuild/openssl.vcxproj -+++ PCbuild/openssl.vcxproj -@@ -74,6 +74,6 @@ nmake - - - -- -+ - - - ---- PCbuild/pyexpat.vcxproj -+++ PCbuild/pyexpat.vcxproj -@@ -39,7 +39,7 @@ - {D06B6426-4762-44CC-8BAD-D79052507F2F} - pyexpat - -- -+ - - - DynamicLibrary -@@ -58,19 +58,19 @@ - - - -- $(PySourcePath)Modules\expat;%(AdditionalIncludeDirectories) -- _CRT_SECURE_NO_WARNINGS;PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_STATIC;%(PreprocessorDefinitions) -+ %(AdditionalIncludeDirectories) -+ _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - - - -- -- -+ - - - -- -+ - - - ---- PCbuild/pythoncore.vcxproj -+++ PCbuild/pythoncore.vcxproj -@@ -38,7 +38,7 @@ - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - pythoncore - -- -+ - - - DynamicLibrary -@@ -215,7 +215,7 @@ - - - -- -+ - - - -@@ -409,7 +409,7 @@ - - - -- -+ - - - ---- PCbuild/_hashlib.vcxproj -+++ PCbuild/_hashlib.vcxproj -@@ -39,7 +39,7 @@ - _hashlib - Win32Proj - -- -+ - - - DynamicLibrary -@@ -54,7 +54,7 @@ - - - -- -+ - - - ---- PCbuild/_ssl.vcxproj -+++ PCbuild/_ssl.vcxproj -@@ -39,7 +39,7 @@ - _ssl - Win32Proj - -- -+ - - - DynamicLibrary -@@ -54,7 +54,7 @@ - - - -- -+ - - - -@@ -67,9 +67,9 @@ - - - -- -+ - - - ---- PCbuild/_tkinter.vcxproj -+++ PCbuild/_tkinter.vcxproj -@@ -45,7 +45,7 @@ - DynamicLibrary - NotSet - -- -+ - - .pyd - -@@ -61,12 +61,12 @@ - - - -- $(tcltkDir)include;%(AdditionalIncludeDirectories) -+ %(AdditionalIncludeDirectories) - WITH_APPINIT;%(PreprocessorDefinitions) -- Py_TCLTK_DIR="$(tcltkDir.TrimEnd('\').Replace('\', '\\'))";%(PreprocessorDefinitions) -+ - - -- $(tcltkLib);%(AdditionalDependencies) -+ %(AdditionalDependencies) - - - -@@ -76,10 +76,10 @@ - - - -- -+ - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} ---- PCbuild/pcbuild.sln -+++ PCbuild/pcbuild.sln -@@ -9,9 +9,6 @@ - EndProjectSection - EndProject - Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcxproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}" -- ProjectSection(ProjectDependencies) = postProject -- {0E9791DB-593A-465F-98BC-681011311618} = {0E9791DB-593A-465F-98BC-681011311618} -- EndProjectSection - EndProject - Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcxproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}" - EndProject diff --git a/recipes/cpython/all/patches/3.7.9-0002-setup.py-pass-CFLAGS-CPPFLAGS.patch b/recipes/cpython/all/patches/3.7.9-0002-setup.py-pass-CFLAGS-CPPFLAGS.patch deleted file mode 100644 index 92e44c8ea6ee5..0000000000000 --- a/recipes/cpython/all/patches/3.7.9-0002-setup.py-pass-CFLAGS-CPPFLAGS.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- Makefile.pre.in -+++ Makefile.pre.in -@@ -618,10 +618,10 @@ - *\ -s*|s*) quiet="-q";; \ - *) quiet="";; \ - esac; \ -- echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ -+ echo "$(RUNSHARED) CC='$(CC) $(CONFIGURE_CFLAGS) $(CONFIGURE_CPPFLAGS)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build"; \ -- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ -+ $(RUNSHARED) CC='$(CC) $(CONFIGURE_CFLAGS) $(CONFIGURE_CPPFLAGS)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build - diff --git a/recipes/cpython/all/patches/3.7.9-0003-disable-macos-tcltk.patch b/recipes/cpython/all/patches/3.7.9-0003-disable-macos-tcltk.patch deleted file mode 100644 index f5ffba2f61232..0000000000000 --- a/recipes/cpython/all/patches/3.7.9-0003-disable-macos-tcltk.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- setup.py -+++ setup.py -@@ -1829,9 +1829,9 @@ - # Rather than complicate the code below, detecting and building - # AquaTk is a separate method. Only one Tkinter will be built on - # Darwin - either AquaTk, if it is found, or X11 based Tk. -- if (host_platform == 'darwin' and -- self.detect_tkinter_darwin(inc_dirs, lib_dirs)): -- return -+ #if (host_platform == 'darwin' and -+ # self.detect_tkinter_darwin(inc_dirs, lib_dirs)): -+ # return - - # Assume we haven't found any of the libraries or include files - # The versions with dots are used on Unix, and the versions without diff --git a/recipes/cpython/all/patches/3.8.12-0001-msvc.patch b/recipes/cpython/all/patches/3.8/3.8.12-0001-msvc.patch similarity index 95% rename from recipes/cpython/all/patches/3.8.12-0001-msvc.patch rename to recipes/cpython/all/patches/3.8/3.8.12-0001-msvc.patch index 4e390810d2dde..3e4f2d86c5335 100644 --- a/recipes/cpython/all/patches/3.8.12-0001-msvc.patch +++ b/recipes/cpython/all/patches/3.8/3.8.12-0001-msvc.patch @@ -26,7 +26,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -59,7 +59,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -88,7 +88,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -145,7 +145,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -182,7 +182,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -206,7 +206,7 @@ pythoncore - -+ ++ DynamicLibrary @@ -253,7 +253,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -273,7 +273,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -305,7 +305,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -349,7 +349,7 @@ pyexpat - -+ ++ DynamicLibrary @@ -384,7 +384,7 @@ NotSet - -+ ++ .pyd diff --git a/recipes/cpython/all/patches/3.8.12-0002-_ctypes-ffi.patch b/recipes/cpython/all/patches/3.8/3.8.12-0002-_ctypes-ffi.patch similarity index 100% rename from recipes/cpython/all/patches/3.8.12-0002-_ctypes-ffi.patch rename to recipes/cpython/all/patches/3.8/3.8.12-0002-_ctypes-ffi.patch diff --git a/recipes/cpython/all/patches/3.8.12-0003-setup.py-pass-CFLAGS-CPPFLAGS.patch b/recipes/cpython/all/patches/3.8/3.8.12-0003-setup.py-pass-CFLAGS-CPPFLAGS.patch similarity index 100% rename from recipes/cpython/all/patches/3.8.12-0003-setup.py-pass-CFLAGS-CPPFLAGS.patch rename to recipes/cpython/all/patches/3.8/3.8.12-0003-setup.py-pass-CFLAGS-CPPFLAGS.patch diff --git a/recipes/cpython/all/patches/3.8.12-0004-disable-macos-tcltk.patch b/recipes/cpython/all/patches/3.8/3.8.12-0004-disable-macos-tcltk.patch similarity index 100% rename from recipes/cpython/all/patches/3.8.12-0004-disable-macos-tcltk.patch rename to recipes/cpython/all/patches/3.8/3.8.12-0004-disable-macos-tcltk.patch diff --git a/recipes/cpython/all/patches/3.9.7-0001-msvc.patch b/recipes/cpython/all/patches/3.9/3.9.7-0001-msvc.patch similarity index 95% rename from recipes/cpython/all/patches/3.9.7-0001-msvc.patch rename to recipes/cpython/all/patches/3.9/3.9.7-0001-msvc.patch index fac9247123880..0c65a84205152 100644 --- a/recipes/cpython/all/patches/3.9.7-0001-msvc.patch +++ b/recipes/cpython/all/patches/3.9/3.9.7-0001-msvc.patch @@ -26,7 +26,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -59,7 +59,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -88,7 +88,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -146,7 +146,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -183,7 +183,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -207,7 +207,7 @@ pythoncore - -+ ++ DynamicLibrary @@ -254,7 +254,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -274,7 +274,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -306,7 +306,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -350,7 +350,7 @@ pyexpat - -+ ++ DynamicLibrary @@ -387,7 +387,7 @@ NotSet - -+ ++ .pyd diff --git a/recipes/cpython/all/patches/3.9.7-0002-_msi-vcxproj.patch b/recipes/cpython/all/patches/3.9/3.9.7-0002-_msi-vcxproj.patch similarity index 100% rename from recipes/cpython/all/patches/3.9.7-0002-_msi-vcxproj.patch rename to recipes/cpython/all/patches/3.9/3.9.7-0002-_msi-vcxproj.patch diff --git a/recipes/cpython/all/patches/3.9.7-0003-_ctypes-ffi.patch b/recipes/cpython/all/patches/3.9/3.9.7-0003-_ctypes-ffi.patch similarity index 100% rename from recipes/cpython/all/patches/3.9.7-0003-_ctypes-ffi.patch rename to recipes/cpython/all/patches/3.9/3.9.7-0003-_ctypes-ffi.patch diff --git a/recipes/cpython/all/patches/3.9.7-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch b/recipes/cpython/all/patches/3.9/3.9.7-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch similarity index 100% rename from recipes/cpython/all/patches/3.9.7-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch rename to recipes/cpython/all/patches/3.9/3.9.7-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch diff --git a/recipes/cpython/all/patches/3.9.7-0005-disable-macos-tcltk.patch b/recipes/cpython/all/patches/3.9/3.9.7-0005-disable-macos-tcltk.patch similarity index 100% rename from recipes/cpython/all/patches/3.9.7-0005-disable-macos-tcltk.patch rename to recipes/cpython/all/patches/3.9/3.9.7-0005-disable-macos-tcltk.patch diff --git a/recipes/cpython/all/test_package/CMakeLists.txt b/recipes/cpython/all/test_package/CMakeLists.txt index 525329324757f..0d333d99af1e3 100644 --- a/recipes/cpython/all/test_package/CMakeLists.txt +++ b/recipes/cpython/all/test_package/CMakeLists.txt @@ -1,15 +1,19 @@ -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(cpython REQUIRED CONFIG) -set(CACHE PY_VERSION_MAJOR "" CACHE STRING "MAJOR version of python") -set(CACHE PY_VERSION_MAJOR_MINOR "" CACHE STRING "MAJOR.MINOR version of python") -set(CACHE PY_VERSION "" CACHE STRING "Required version of python") -set(CACHE PY_VERSION_SUFFIX "" CACHE STRING "Suffix of python") +# FIXME: We can't modify CMake's FindPython to link dependencies pulled by +# Conan, so here we just include them globally. This is mainly necessary for +# MacOS missing crypt.h, which is available at configure time (in the main recipe) +# but otherwise not at build time (in consumer packages). +link_libraries(cpython::python) -set(Python_ADDITIONAL_VERSIONS ${PY_VERSION}${PY_VERSION_SUFFIX} ${PY_VERSION_MAJOR_MINOR}${PY_VERSION_SUFFIX} ${PY_VERSION_MAJOR}${PY_VERSION_SUFFIX} ${PY_VERSION} ${PY_VERSION_MAJOR_MINOR} ${PY_VERSION_MAJOR}) +set(PY_VERSION_MAJOR_MINOR "" CACHE STRING "MAJOR.MINOR version of python") +set(PY_VERSION "" CACHE STRING "Required version of python") +set(PY_VERSION_SUFFIX "" CACHE STRING "Suffix of python") + +set(Python_ADDITIONAL_VERSIONS ${PY_VERSION}${PY_VERSION_SUFFIX} ${PY_VERSION_MAJOR_MINOR}${PY_VERSION_SUFFIX} 3${PY_VERSION_SUFFIX} ${PY_VERSION} ${PY_VERSION_MAJOR_MINOR} 3) message("Using Python_ADDITIONAL_VERSIONS: ${Python_ADDITIONAL_VERSIONS}") find_package(PythonInterp REQUIRED) @@ -22,7 +26,6 @@ endif() message(STATUS "FindPythonInterp:") message(STATUS "PYTHON_VERSION_STRING: ${PYTHON_VERSION_STRING}") -message(STATUS "PYTHON_VERSION_MAJOR: ${PYTHON_VERSION_MAJOR}") message(STATUS "PYTHON_VERSION_MINOR: ${PYTHON_VERSION_MINOR}") message(STATUS "PYTHON_VERSION_PATCH: ${PYTHON_VERSION_PATCH}") message(STATUS "=============================================") @@ -45,8 +48,8 @@ if(PYTHON_VERSION_STRING) endif() if(PYTHONLIBS_VERSION_STRING) - if(NOT PYTHONLIBS_VERSION_STRING STREQUAL "${PY_FULL_VERSION}") - message("PYTHONLIBS_VERSION_STRING does not match PY_FULL_VERSION") + if(NOT PYTHONLIBS_VERSION_STRING STREQUAL "${PY_VERSION}") + message("PYTHONLIBS_VERSION_STRING does not match PY_VERSION") message(FATAL_ERROR "CMake detected wrong cpython version") endif() endif() @@ -54,7 +57,7 @@ endif() option(BUILD_MODULE "Build python module") if(BUILD_MODULE) - add_library(spam MODULE "py${PY_VERSION_MAJOR}/test_module.c") + add_library(spam MODULE "test_module.c") target_include_directories(spam PRIVATE ${PYTHON_INCLUDE_DIRS} @@ -64,37 +67,29 @@ if(BUILD_MODULE) ) set_property(TARGET spam PROPERTY PREFIX "") if(MSVC) - if(CONAN_SETTINGS_BUILD_TYPE STREQUAL "Debug") - set(SUFFIX "_d.pyd") - else() - set(SUFFIX ".pyd") - endif() - set_property(TARGET spam PROPERTY SUFFIX "${SUFFIX}") + set_target_properties(spam PROPERTIES + DEBUG_POSTFIX "_d" + SUFFIX ".pyd" + ) endif() option(USE_FINDPYTHON_X "Use new-style FindPythonX module") - if(USE_FINDPYTHON_X AND NOT (CMAKE_VERSION VERSION_LESS "3.16")) - # Require CMake 3.16 because this version introduces Python${PY_VERSION_MAJOR}_FIND_ABI - find_package(Python${PY_VERSION_MAJOR} REQUIRED COMPONENTS Interpreter Development) - message("Python${PY_VERSION_MAJOR}_EXECUTABLE: ${Python${PY_VERSION_MAJOR}_EXECUTABLE}") - message("Python${PY_VERSION_MAJOR}_INTERPRETER_ID: ${Python${PY_VERSION_MAJOR}_INTERPRETER_ID}") - message("Python${PY_VERSION_MAJOR}_VERSION: ${Python${PY_VERSION_MAJOR}_VERSION}") - message("Python${PY_VERSION_MAJOR}_INCLUDE_DIRS: ${Python${PY_VERSION_MAJOR}_INCLUDE_DIRS}") - message("Python${PY_VERSION_MAJOR}_LIBRARIES: ${Python${PY_VERSION_MAJOR}_LIBRARIES}") - if(NOT Python${PY_VERSION_MAJOR}_VERSION STREQUAL "${PY_VERSION}") + if(USE_FINDPYTHON_X AND NOT CMAKE_VERSION VERSION_LESS "3.16") + # Require CMake 3.16 because this version introduces Python3_FIND_ABI + find_package(Python3 REQUIRED COMPONENTS Interpreter Development) + message("Python3_EXECUTABLE: ${Python3_EXECUTABLE}") + message("Python3_INTERPRETER_ID: ${Python3_INTERPRETER_ID}") + message("Python3_VERSION: ${Python3_VERSION}") + message("Python3_INCLUDE_DIRS: ${Python3_INCLUDE_DIRS}") + message("Python3_LIBRARIES: ${Python3_LIBRARIES}") + if(NOT Python3_VERSION STREQUAL "${PY_VERSION}") message("Python_ADDITIONAL_VERSIONS does not match PY_VERSION") message(FATAL_ERROR "CMake detected wrong cpython version") endif() - if(PY_VERSION_MAJOR STREQUAL "2") - python2_add_library(spam2 "py${PY_VERSION_MAJOR}/test_module.c") - elseif(PY_VERSION_MAJOR STREQUAL "3") - python3_add_library(spam2 "py${PY_VERSION_MAJOR}/test_module.c") - else() - message(FATAL_ERROR "Unknown PY_VERSION_MAJOR") - endif() + python3_add_library(spam2 "test_module.c") endif() endif() -add_executable(${PROJECT_NAME} "py${PY_VERSION_MAJOR}/test_package.c") -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +add_executable(${PROJECT_NAME} "test_package.c") +target_link_libraries(${PROJECT_NAME} PRIVATE cpython::embed) diff --git a/recipes/cpython/all/test_package/conanfile.py b/recipes/cpython/all/test_package/conanfile.py index 8abc18e4492c5..bca7c7fcfd3b7 100644 --- a/recipes/cpython/all/test_package/conanfile.py +++ b/recipes/cpython/all/test_package/conanfile.py @@ -1,192 +1,193 @@ -from conans import AutoToolsBuildEnvironment, ConanFile, CMake, tools, RunEnvironment -from conans.errors import ConanException -from io import StringIO import os -import re -import shutil - +from io import StringIO -class CmakePython3Abi(object): - def __init__(self, debug, pymalloc, unicode): - self.debug, self.pymalloc, self.unicode = debug, pymalloc, unicode +from conan import ConanFile, conan_version +from conan.errors import ConanException +from conan.tools.apple import is_apple_os +from conan.tools.build import can_run +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import Environment, VirtualRunEnv +from conan.tools.gnu import AutotoolsDeps +from conan.tools.microsoft import is_msvc, VCVars +from conan.tools.scm import Version - _cmake_lut = { - None: "ANY", - True: "ON", - False: "OFF", - } +conan2 = conan_version.major >= 2 - @property - def suffix(self): - return "{}{}{}".format( - "d" if self.debug else "", - "m" if self.pymalloc else "", - "u" if self.unicode else "", - ) +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + test_type = "explicit" - @property - def cmake_arg(self): - return ";".join(self._cmake_lut[a] for a in (self.debug, self.pymalloc, self.unicode)) + def requirements(self): + self.requires(self.tested_reference_str) + def build_requirements(self): + # The main recipe does not require CMake, but we test with it. + # The interesting problem that arises here is if you have CMake installed + # with your global pip, then it will fail to run in this test package. + # To avoid that, just add a requirement on CMake. + self.tool_requires("cmake/[>=3.15 <4]") -class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + def layout(self): + cmake_layout(self) @property - def _py_version(self): - return re.match(r"^([0-9.]+)", self.deps_cpp_info["cpython"].version).group(1) + def _python(self): + if conan2: + return self.dependencies["cpython"].conf_info.get("user.cpython:python", check_type=str) + else: + return self.deps_user_info["cpython"].python - @property - def _pymalloc(self): - return bool("pymalloc" in self.options["cpython"] and self.options["cpython"].pymalloc) + def _cpython_option(self, name): + if conan2: + return self.dependencies["cpython"].options.get_safe(name, False) + else: + try: + return getattr(self.options["cpython"], name, False) + except ConanException: + return False @property - def _cmake_abi(self): - if self._py_version < tools.Version("3.8"): - return CmakePython3Abi( - debug=self.settings.build_type == "Debug", - pymalloc=self._pymalloc, - unicode=False, - ) + def _py_version(self): + if conan2: + return Version(self.dependencies["cpython"].ref.version) else: - return CmakePython3Abi( - debug=self.settings.build_type == "Debug", - pymalloc=False, - unicode=False, - ) + return Version(self.deps_cpp_info["cpython"].version) @property def _cmake_try_FindPythonX(self): - if self.settings.compiler == "Visual Studio" and self.settings.build_type == "Debug": - return False - return True + return not is_msvc(self) or self.settings.build_type != "Debug" @property def _supports_modules(self): - return self.settings.compiler != "Visual Studio" or self.options["cpython"].shared + return not is_msvc(self) or self._cpython_option("shared") + + def generate(self): + tc = CMakeToolchain(self) + version = self._py_version + tc.cache_variables["BUILD_MODULE"] = self._supports_modules + tc.cache_variables["PY_VERSION_MAJOR_MINOR"] = f"{version.major}.{version.minor}" + tc.cache_variables["PY_VERSION"] = str(self._py_version) + tc.cache_variables["PY_VERSION_SUFFIX"] = "d" if self.settings.build_type == "Debug" else "" + tc.cache_variables["PYTHON_EXECUTABLE"] = self._python + tc.cache_variables["USE_FINDPYTHON_X"] = self._cmake_try_FindPythonX + tc.cache_variables["Python3_EXECUTABLE"] = self._python + tc.cache_variables["Python3_ROOT_DIR"] = self.dependencies["cpython"].package_folder + tc.cache_variables["Python3_USE_STATIC_LIBS"] = not self.dependencies["cpython"].options.shared + tc.cache_variables["Python3_FIND_FRAMEWORK"] = "NEVER" + tc.cache_variables["Python3_FIND_REGISTRY"] = "NEVER" + tc.cache_variables["Python3_FIND_IMPLEMENTATIONS"] = "CPython" + tc.cache_variables["Python3_FIND_STRATEGY"] = "LOCATION" + tc.generate() + + deps = CMakeDeps(self) + deps.generate() - def build(self): - if not tools.cross_building(self, skip_x64_x86=True): - command = "{} --version".format(self.deps_user_info["cpython"].python) - buffer = StringIO() - self.run(command, output=buffer, ignore_errors=True, run_environment=True) - self.output.info("output: %s" % buffer.getvalue()) - self.run(command, run_environment=True) + try: + # CMakeToolchain might generate VCVars, but we need it + # unconditionally for the setuptools build. + VCVars(self).generate() + except ConanException: + pass + # The build also needs access to the run environment to run the python executable + VirtualRunEnv(self).generate(scope="run") + VirtualRunEnv(self).generate(scope="build") + # Just for the distutils build + AutotoolsDeps(self).generate(scope="build") + + def build(self): cmake = CMake(self) - py_major = self.deps_cpp_info["cpython"].version.split(".")[0] - cmake.definitions["BUILD_MODULE"] = self._supports_modules - cmake.definitions["PY_VERSION_MAJOR"] = py_major - cmake.definitions["PY_VERSION_MAJOR_MINOR"] = ".".join(self._py_version.split(".")[:2]) - cmake.definitions["PY_FULL_VERSION"] = self.deps_cpp_info["cpython"].version - cmake.definitions["PY_VERSION"] = self._py_version - cmake.definitions["PY_VERSION_SUFFIX"] = self._cmake_abi.suffix - cmake.definitions["PYTHON_EXECUTABLE"] = self.deps_user_info["cpython"].python - cmake.definitions["USE_FINDPYTHON_X".format(py_major)] = self._cmake_try_FindPythonX - cmake.definitions["Python{}_EXECUTABLE".format(py_major)] = self.deps_user_info["cpython"].python - cmake.definitions["Python{}_ROOT_DIR".format(py_major)] = self.deps_cpp_info["cpython"].rootpath - cmake.definitions["Python{}_USE_STATIC_LIBS".format(py_major)] = not self.options["cpython"].shared - cmake.definitions["Python{}_FIND_FRAMEWORK".format(py_major)] = "NEVER" - cmake.definitions["Python{}_FIND_REGISTRY".format(py_major)] = "NEVER" - cmake.definitions["Python{}_FIND_IMPLEMENTATIONS".format(py_major)] = "CPython" - cmake.definitions["Python{}_FIND_STRATEGY".format(py_major)] = "LOCATION" - - if self.settings.compiler != "Visual Studio": - if tools.Version(self._py_version) < tools.Version("3.8"): - cmake.definitions["Python{}_FIND_ABI".format(py_major)] = self._cmake_abi.cmake_arg - - with tools.environment_append(RunEnvironment(self).vars): - cmake.configure() + cmake.configure() cmake.build() - if not tools.cross_building(self, skip_x64_x86=True): - if self._supports_modules: - with tools.vcvars(self.settings) if self.settings.compiler == "Visual Studio" else tools.no_op(): - modsrcfolder = "py2" if tools.Version(self.deps_cpp_info["cpython"].version).major < "3" else "py3" - tools.mkdir(os.path.join(self.build_folder, modsrcfolder)) - for fn in os.listdir(os.path.join(self.source_folder, modsrcfolder)): - shutil.copy(os.path.join(self.source_folder, modsrcfolder, fn), os.path.join(self.build_folder, modsrcfolder, fn)) - shutil.copy(os.path.join(self.source_folder, "setup.py"), os.path.join(self.build_folder, "setup.py")) - env = { - "DISTUTILS_USE_SDK": "1", - "MSSdk": "1" - } - env.update(**AutoToolsBuildEnvironment(self).vars) - with tools.environment_append(env): - setup_args = [ - "{}/setup.py".format(self.source_folder), - # "conan", - # "--install-folder", self.build_folder, - "build", - "--build-base", self.build_folder, - "--build-platlib", os.path.join(self.build_folder, "lib_setuptools"), - ] - if self.settings.build_type == "Debug": - setup_args.append("--debug") - self.run("{} {}".format(self.deps_user_info["cpython"].python, " ".join("\"{}\"".format(a) for a in setup_args)), run_environment=True) + if can_run(self) and self._supports_modules: + os.environ["DISTUTILS_USE_SDK"] = "1" + os.environ["MSSdk"] = "1" + setup_args = [ + os.path.join(self.source_folder, "setup.py"), + "build", + "--build-base", self.build_folder, + "--build-platlib", os.path.join(self.build_folder, "lib_setuptools"), + # Bandaid fix: setuptools places temporary files in a subdirectory of the build folder where the + # entirety of the absolute path up to this folder is appended (with seemingly no way to stop this), + # essentially doubling the path length. This may run into Windows max path lengths, so we give ourselves + # a little bit of wiggle room by making this directory name as short as possible. One of the directory + # names goes from (for example) "temp.win-amd64-3.10-pydebug" to "t", saving us roughly 25 characters. + "--build-temp", "t", + ] + if self.settings.build_type == "Debug": + setup_args.append("--debug") + args = " ".join(f'"{a}"' for a in setup_args) + self.run(f"{self._python} {args}") def _test_module(self, module, should_work): try: - self.run("{} {}/test_package.py -b {} -t {} ".format( - self.deps_user_info["cpython"].python, self.source_folder, self.build_folder, module), run_environment=True) - works = True - except ConanException as e: - works = False - exception = e - if should_work == works: - self.output.info("Result of test was expected.") - else: - if works: - raise ConanException("Module '{}' works, but should not have worked".format(module)) - else: - self.output.warn("Module '{}' does not work, but should have worked".format(module)) - raise exception - - def _cpython_option(self, name): - try: - return getattr(self.options["cpython"], name, False) + self.run(f"{self._python} {self.source_folder}/test_package.py -b {self.build_folder} -t {module}", env="conanrun") except ConanException: - return False + if should_work: + self.output.warning(f"Module '{module}' does not work, but should have worked") + raise + self.output.info("Module failed as expected") + return + if not should_work: + raise ConanException(f"Module '{module}' works, but should not have worked") + self.output.info("Module worked as expected") def test(self): - if not tools.cross_building(self, skip_x64_x86=True): - self.run("{} -c \"print('hello world')\"".format(self.deps_user_info["cpython"].python), run_environment=True) + if can_run(self): + self.run(f"{self._python} --version", env="conanrun") + + self.run(f"{self._python} -c \"print('hello world')\"", env="conanrun") buffer = StringIO() - self.run("{} -c \"import sys; print('.'.join(str(s) for s in sys.version_info[:3]))\"".format(self.deps_user_info["cpython"].python), run_environment=True, output=buffer) + self.run(f"{self._python} -c \"import sys; print('.'.join(str(s) for s in sys.version_info[:3]))\"", buffer, env="conanrun") self.output.info(buffer.getvalue()) version_detected = buffer.getvalue().splitlines()[-1].strip() if self._py_version != version_detected: - raise ConanException("python reported wrong version. Expected {exp}. Got {res}.".format(exp=self._py_version, res=version_detected)) + raise ConanException( + f"python reported wrong version. Expected {self._py_version}. Got {version_detected}." + ) if self._supports_modules: self._test_module("gdbm", self._cpython_option("with_gdbm")) self._test_module("bz2", self._cpython_option("with_bz2")) - self._test_module("bsddb", self._cpython_option("with_bsddb")) self._test_module("lzma", self._cpython_option("with_lzma")) self._test_module("tkinter", self._cpython_option("with_tkinter")) - with tools.environment_append({"TERM": "ansi"}): - self._test_module("curses", self._cpython_option("with_curses")) - + os.environ["TERM"] = "ansi" + self._test_module("curses", self._cpython_option("with_curses")) self._test_module("expat", True) - self._test_module("sqlite3", True) + self._test_module("sqlite3", self._cpython_option("with_sqlite3")) self._test_module("decimal", True) self._test_module("ctypes", True) - - if tools.is_apple_os(self.settings.os) and not self.options["cpython"].shared: - self.output.info("Not testing the module, because these seem not to work on apple when cpython is built as a static library") + env = Environment() + if self.settings.os != "Windows": + env.define_path("OPENSSL_CONF", os.path.join(os.sep, "dev", "null")) + with env.vars(self).apply(): + self._test_module("ssl", True) + + if is_apple_os(self) and not self._cpython_option("shared"): + self.output.info( + "Not testing the module, because these seem not to work on apple when cpython is built as" + " a static library" + ) # FIXME: find out why cpython on apple does not allow to use modules linked against a static python else: if self._supports_modules: - with tools.environment_append({"PYTHONPATH": [os.path.join(self.build_folder, "lib")]}): - self.output.info("Testing module (spam) using cmake built module") - self._test_module("spam", True) + os.environ["PYTHONPATH"] = os.path.join(self.build_folder, self.cpp.build.libdirs[0]) + self.output.info("Testing module (spam) using cmake built module") + self._test_module("spam", True) + + os.environ["PYTHONPATH"] = os.path.join(self.build_folder, "lib_setuptools") + self.output.info("Testing module (spam) using setup.py built module") + self._test_module("spam", True) - with tools.environment_append({"PYTHONPATH": [os.path.join(self.build_folder, "lib_setuptools")]}): - self.output.info("Testing module (spam) using setup.py built module") - self._test_module("spam", True) + del os.environ["PYTHONPATH"] - # MSVC builds need PYTHONHOME set. - with tools.environment_append({"PYTHONHOME": self.deps_user_info["cpython"].pythonhome}) if self.deps_user_info["cpython"].module_requires_pythonhome == "True" else tools.no_op(): - self.run(os.path.join("bin", "test_package"), run_environment=True) + # MSVC builds need PYTHONHOME set. Linux and Mac don't require it to be set if tested after building, + # but if the package is relocated then it needs to be set. + if conan2: + os.environ["PYTHONHOME"] = self.dependencies["cpython"].conf_info.get("user.cpython:pythonhome", check_type=str) + else: + os.environ["PYTHONHOME"] = self.deps_user_info["cpython"].pythonhome + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/cpython/all/test_package/py2/test_module.c b/recipes/cpython/all/test_package/py2/test_module.c deleted file mode 100644 index 9c5af39ab391b..0000000000000 --- a/recipes/cpython/all/test_package/py2/test_module.c +++ /dev/null @@ -1,42 +0,0 @@ -#include - -#include - -static PyObject *SpamError; - -static PyObject * -spam_system(PyObject *self, PyObject *args) -{ - const char *command; - int sts; - - if (!PyArg_ParseTuple(args, "s", &command)) - return NULL; - sts = system(command); - if (sts < 0) { - PyErr_SetString(SpamError, "System command failed"); - return NULL; - } - return PyLong_FromLong(sts); -} - -const char spam_doc[] = "This is an example spam doc."; - -static PyMethodDef SpamMethods[] = { - {"system", spam_system, METH_VARARGS, "Execute a shell command."}, - {NULL, NULL, 0, NULL} /* Sentinel */ -}; - -PyMODINIT_FUNC -initspam(void) -{ - PyObject *m; - - m = Py_InitModule("spam", SpamMethods); - if (m == NULL) - return; - PyModule_AddStringConstant(m, "__doc__", spam_doc); - SpamError = PyErr_NewException("spam.error", NULL, NULL); - Py_INCREF(SpamError); - PyModule_AddObject(m, "error", SpamError); -} diff --git a/recipes/cpython/all/test_package/py2/test_package.c b/recipes/cpython/all/test_package/py2/test_package.c deleted file mode 100644 index 5e5d839b5a6a1..0000000000000 --- a/recipes/cpython/all/test_package/py2/test_package.c +++ /dev/null @@ -1,12 +0,0 @@ -#include - -int -main(int argc, char *argv[]) -{ - Py_SetProgramName(argv[0]); /* optional but recommended */ - Py_Initialize(); - PyRun_SimpleString("from time import time,ctime\n" - "print 'Today is',ctime(time())\n"); - Py_Finalize(); - return 0; -} diff --git a/recipes/cpython/all/test_package/setup.py b/recipes/cpython/all/test_package/setup.py index cd1754cef8131..2cf4febef6264 100644 --- a/recipes/cpython/all/test_package/setup.py +++ b/recipes/cpython/all/test_package/setup.py @@ -1,5 +1,4 @@ import os -import sys # Hack to work around Python 3.8+ secure dll loading: # see https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew @@ -8,24 +7,14 @@ if os.path.isdir(directory): os.add_dll_directory(directory) -PY2 = (2, 0) <= sys.version_info < (3, 0) -PY3 = (3, 0) <= sys.version_info < (4, 0) - -if PY2: - subdir = "py2" - from distutils.core import setup, Extension -elif PY3: - subdir = "py3" - from setuptools import setup, Extension -else: - raise Exception +from setuptools import setup, Extension +script_dir = os.path.dirname(os.path.realpath(__file__)) setup( name="test_package", version="1.0", - use_2to3=True, ext_modules=[ - Extension("spam", [os.path.join(subdir, "test_module.c")]), + Extension("spam", [os.path.join(script_dir, "test_module.c")]), ], ) diff --git a/recipes/cpython/all/test_package/py3/test_module.c b/recipes/cpython/all/test_package/test_module.c similarity index 100% rename from recipes/cpython/all/test_package/py3/test_module.c rename to recipes/cpython/all/test_package/test_module.c diff --git a/recipes/cpython/all/test_package/py3/test_package.c b/recipes/cpython/all/test_package/test_package.c similarity index 100% rename from recipes/cpython/all/test_package/py3/test_package.c rename to recipes/cpython/all/test_package/test_package.c diff --git a/recipes/cpython/all/test_package/test_package.py b/recipes/cpython/all/test_package/test_package.py index f77d2837c6376..bed43fac74c62 100644 --- a/recipes/cpython/all/test_package/test_package.py +++ b/recipes/cpython/all/test_package/test_package.py @@ -14,12 +14,13 @@ def add_test(fn): global ALL_TESTS - name = fn.__name__[fn.__name__.find("_")+1:] + name = fn.__name__[fn.__name__.find("_") + 1 :] def inner_fn(): print("testing {}".format(name)) sys.stdout.flush() fn() + ALL_TESTS[name] = inner_fn return fn @@ -30,13 +31,13 @@ def test_expat(): # 3 handler functions def start_element(name, attrs): - print('Start element:', name, attrs) + print("Start element:", name, attrs) def end_element(name): - print('End element:', name) + print("End element:", name) def char_data(data): - print('Character data:', repr(data)) + print("Character data:", repr(data)) p = xml.parsers.expat.ParserCreate() @@ -44,18 +45,18 @@ def char_data(data): p.EndElementHandler = end_element p.CharacterDataHandler = char_data - p.Parse(""" + p.Parse( + """ Text goes here More text - """, 1) + """, + 1, + ) @add_test def test_gdbm(): - if sys.version_info < (3, 0): - import gdbm - else: - import dbm.gnu as gdbm + import dbm.gnu as gdbm dbfile = "gdbm.db" @@ -85,10 +86,8 @@ def test_spam(): if "This is an example spam doc." not in spam.__doc__: raise Exception("spam.__doc__ does not contain the expected text") - cmd = { - "Windows": "dir", - }.get(platform.system(), "ls") - print("About to run spam.system(\"{}\")".format(cmd)) + cmd = {"Windows": "dir"}.get(platform.system(), "ls") + print('About to run spam.system("{}")'.format(cmd)) sys.stdout.flush() spam.system(cmd) @@ -103,24 +102,6 @@ def test_bz2(): raise Exception("bz2.compress returned no data") -@add_test -def test_bsddb(): - import bsddb - - db = bsddb.btopen("bsddb.db", "c") - db["key1"] = "value1" - db["key2"] = "value2" - db.close() - - db = bsddb.btopen("bsddb.db", "r") - if len(db) != 2: - raise Exception("Wrong length") - if db["key1"] != "value1": - raise Exception("value1 incorrect {}".format(db["key1"])) - if db["key2"] != "value2": - raise Exception("value2 incorrect {}".format(db["key2"])) - - @add_test def test_lzma(): import lzma @@ -133,6 +114,7 @@ def test_lzma(): @add_test def test_sqlite3(): import sqlite3 + conn = sqlite3.connect("sqlite3.db") c = conn.cursor() @@ -141,16 +123,16 @@ def test_sqlite3(): c.execute("INSERT INTO stocks VALUES ('2006-01-05','BUY','RHAT',100,35.14)") conn.commit() - t = ('RHAT',) - c.execute('SELECT * FROM stocks WHERE symbol=?', t) + t = ("RHAT",) + c.execute("SELECT * FROM stocks WHERE symbol=?", t) # Larger example that inserts many records at a time purchases = [ - ('2006-03-28', 'BUY', 'IBM', 1000, 45.00), - ('2006-04-05', 'BUY', 'MSFT', 1000, 72.00), - ('2006-04-06', 'SELL', 'IBM', 500, 53.00), + ("2006-03-28", "BUY", "IBM", 1000, 45.00), + ("2006-04-05", "BUY", "MSFT", 1000, 72.00), + ("2006-04-06", "SELL", "IBM", 500, 53.00), ] - c.executemany('INSERT INTO stocks VALUES (?,?,?,?,?)', purchases) + c.executemany("INSERT INTO stocks VALUES (?,?,?,?,?)", purchases) conn.commit() conn.close() conn = sqlite3.connect("sqlite3.db") @@ -161,15 +143,15 @@ def test_sqlite3(): raise Exception("Need 4 stocks") print(data) conn.close() + # Remove the file so subsequent tests don't fail + os.remove("sqlite3.db") @add_test def test_decimal(): - if sys.version_info >= (3, ): - # Check whether the _decimal package was built successfully - import _decimal as decimal - else: - import decimal + # Check whether the _decimal package was built successfully + import _decimal as decimal + decimal.getcontext().prec = 6 print("1/7 =", decimal.Decimal(1) / decimal.Decimal(7)) decimal.getcontext().prec = 40 @@ -199,6 +181,14 @@ def test_tkinter(): print("tk version: {}".format(_tkinter.TK_VERSION)) +@add_test +def test_ssl(): + import ssl + + default_context = ssl.create_default_context() + print("default_context.options={}".format(default_context.options)) + + def main(): parser = argparse.ArgumentParser() parser.add_argument("-b", dest="build_folder", help="build_folder", required=True) diff --git a/recipes/cpython/all/test_v1_package/CMakeLists.txt b/recipes/cpython/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..6014dcdd6efcb --- /dev/null +++ b/recipes/cpython/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,96 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package C) + +include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") +conan_basic_setup() + +set(CACHE PY_VERSION_MAJOR "" CACHE STRING "MAJOR version of python") +set(CACHE PY_VERSION_MAJOR_MINOR "" CACHE STRING "MAJOR.MINOR version of python") +set(CACHE PY_VERSION "" CACHE STRING "Required version of python") +set(CACHE PY_VERSION_SUFFIX "" CACHE STRING "Suffix of python") + +set(Python_ADDITIONAL_VERSIONS ${PY_VERSION}${PY_VERSION_SUFFIX} ${PY_VERSION_MAJOR_MINOR}${PY_VERSION_SUFFIX} 3${PY_VERSION_SUFFIX} ${PY_VERSION} ${PY_VERSION_MAJOR_MINOR} 3) +message("Using Python_ADDITIONAL_VERSIONS: ${Python_ADDITIONAL_VERSIONS}") + +find_package(PythonInterp REQUIRED) +find_package(PythonLibs REQUIRED) + +string(FIND "${PYTHON_EXECUTABLE}" "${CONAN_CPYTHON_ROOT}" ROOT_SUBPOS) +if(ROOT_SUBPOS EQUAL -1) + message(FATAL_ERROR "found wrong python interpreter: ${PYTHON_EXECUTABLE}") +endif() + +message(STATUS "FindPythonInterp:") +message(STATUS "PYTHON_VERSION_STRING: ${PYTHON_VERSION_STRING}") +message(STATUS "PYTHON_VERSION_MAJOR: ${PYTHON_VERSION_MAJOR}") +message(STATUS "PYTHON_VERSION_MINOR: ${PYTHON_VERSION_MINOR}") +message(STATUS "PYTHON_VERSION_PATCH: ${PYTHON_VERSION_PATCH}") +message(STATUS "=============================================") +message(STATUS "FindPythonLibs:") +message(STATUS "PYTHON_LIBRARIES: ${PYTHON_LIBRARIES}") +message(STATUS "PYTHON_INCLUDE_PATH: ${PYTHON_INCLUDE_PATH} (deprecated)") +message(STATUS "PYTHON_INCLUDE_DIRS: ${PYTHON_INCLUDE_DIRS}") +message(STATUS "PYTHON_DEBUG_LIBRARIES: ${PYTHON_DEBUG_LIBRARIES} (deprecated)") +message(STATUS "PYTHONLIBS_VERSION_STRING: ${PYTHONLIBS_VERSION_STRING}") + +if(NOT PYTHON_VERSION_STRING AND NOT PYTHONLIBS_VERSION_STRING) + message(FATAL_ERROR "Version of python interpreter and libraries not found") +endif() + +if(PYTHON_VERSION_STRING) + if(NOT PYTHON_VERSION_STRING VERSION_EQUAL "${PY_VERSION}") + message("PYTHON_VERSION_STRING does not match PY_VERSION") + message(FATAL_ERROR "CMake detected wrong cpython version") + endif() +endif() + +if(PYTHONLIBS_VERSION_STRING) + if(NOT PYTHONLIBS_VERSION_STRING STREQUAL "${PY_FULL_VERSION}") + message("PYTHONLIBS_VERSION_STRING does not match PY_FULL_VERSION") + message(FATAL_ERROR "CMake detected wrong cpython version") + endif() +endif() + +option(BUILD_MODULE "Build python module") + +set(SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../test_package") + +if(BUILD_MODULE) + add_library(spam MODULE "${SOURCE_DIR}/test_module.c") + target_include_directories(spam + PRIVATE + ${PYTHON_INCLUDE_DIRS} + ) + target_link_libraries(spam PRIVATE + ${PYTHON_LIBRARIES} + ) + set_property(TARGET spam PROPERTY PREFIX "") + if(MSVC) + if(CONAN_SETTINGS_BUILD_TYPE STREQUAL "Debug") + set(SUFFIX "_d.pyd") + else() + set(SUFFIX ".pyd") + endif() + set_property(TARGET spam PROPERTY SUFFIX "${SUFFIX}") + endif() + + option(USE_FINDPYTHON_X "Use new-style FindPythonX module") + if(USE_FINDPYTHON_X AND NOT (CMAKE_VERSION VERSION_LESS "3.16")) + # Require CMake 3.16 because this version introduces Python3_FIND_ABI + find_package(Python3 REQUIRED COMPONENTS Interpreter Development) + message("Python3_EXECUTABLE: ${Python3_EXECUTABLE}") + message("Python3_INTERPRETER_ID: ${Python3_INTERPRETER_ID}") + message("Python3_VERSION: ${Python3_VERSION}") + message("Python3_INCLUDE_DIRS: ${Python3_INCLUDE_DIRS}") + message("Python3_LIBRARIES: ${Python3_LIBRARIES}") + if(NOT Python3_VERSION STREQUAL "${PY_VERSION}") + message("Python_ADDITIONAL_VERSIONS does not match PY_VERSION") + message(FATAL_ERROR "CMake detected wrong cpython version") + endif() + + python3_add_library(spam2 "${SOURCE_DIR}/test_module.c") + endif() +endif() + +add_executable(${PROJECT_NAME} "${SOURCE_DIR}/test_package.c") +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/cpython/all/test_v1_package/conanfile.py b/recipes/cpython/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..b79e5742735f3 --- /dev/null +++ b/recipes/cpython/all/test_v1_package/conanfile.py @@ -0,0 +1,154 @@ +from conans import AutoToolsBuildEnvironment, ConanFile, CMake, tools, RunEnvironment +from conans.errors import ConanException +from conan.tools.env import VirtualRunEnv +from io import StringIO +import os +import re + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + @property + def _py_version(self): + return re.match(r"^([0-9.]+)", self.deps_cpp_info["cpython"].version).group(1) + + @property + def _cmake_try_FindPythonX(self): + if self.settings.compiler == "Visual Studio" and self.settings.build_type == "Debug": + return False + return True + + @property + def _supports_modules(self): + return self.settings.compiler != "Visual Studio" or self.options["cpython"].shared + + def generate(self): + # The build also needs access to the run environment to run the python executable + VirtualRunEnv(self).generate(scope="run") + VirtualRunEnv(self).generate(scope="build") + + def build_requirements(self): + # The main recipe does not require CMake, but we test with it. + # The interesting problem that arises here is if you have CMake installed + # with your global pip, then it will fail to run in this test package. + # To avoid that, just add a requirement on CMake. + self.tool_requires("cmake/[>=3.15 <4]") + + def build(self): + if not tools.cross_building(self, skip_x64_x86=True): + command = "{} --version".format(self.deps_user_info["cpython"].python) + buffer = StringIO() + self.run(command, output=buffer, ignore_errors=True, run_environment=True) + self.output.info("output: %s" % buffer.getvalue()) + self.run(command, run_environment=True) + + cmake = CMake(self) + cmake.definitions["BUILD_MODULE"] = self._supports_modules + cmake.definitions["PY_VERSION_MAJOR_MINOR"] = ".".join(self._py_version.split(".")[:2]) + cmake.definitions["PY_FULL_VERSION"] = self.deps_cpp_info["cpython"].version + cmake.definitions["PY_VERSION"] = self._py_version + cmake.definitions["PY_VERSION_SUFFIX"] = "d" if self.settings.build_type == "Debug" else "" + cmake.definitions["PYTHON_EXECUTABLE"] = self.deps_user_info["cpython"].python + cmake.definitions["USE_FINDPYTHON_X"] = self._cmake_try_FindPythonX + cmake.definitions["Python3_EXECUTABLE"] = self.deps_user_info["cpython"].python + cmake.definitions["Python3_ROOT_DIR"] = self.deps_cpp_info["cpython"].rootpath + cmake.definitions["Python3_USE_STATIC_LIBS"] = not self.options["cpython"].shared + cmake.definitions["Python3_FIND_FRAMEWORK"] = "NEVER" + cmake.definitions["Python3_FIND_REGISTRY"] = "NEVER" + cmake.definitions["Python3_FIND_IMPLEMENTATIONS"] = "CPython" + cmake.definitions["Python3_FIND_STRATEGY"] = "LOCATION" + + with tools.environment_append(RunEnvironment(self).vars): + cmake.configure() + cmake.build() + + if not tools.cross_building(self, skip_x64_x86=True): + if self._supports_modules: + with tools.vcvars(self.settings) if self.settings.compiler == "Visual Studio" else tools.no_op(): + env = { + "DISTUTILS_USE_SDK": "1", + "MSSdk": "1" + } + env.update(**AutoToolsBuildEnvironment(self).vars) + with tools.environment_append(env): + setup_args = [ + os.path.join(self.source_folder, "..", "test_package", "setup.py"), + "build", + "--build-base", self.build_folder, + "--build-platlib", os.path.join(self.build_folder, "lib_setuptools"), + # Bandaid fix: setuptools places temporary files in a subdirectory of the build folder where the + # entirety of the absolute path up to this folder is appended (with seemingly no way to stop this), + # essentially doubling the path length. This may run into Windows max path lengths, so we give ourselves + # a little bit of wiggle room by making this directory name as short as possible. One of the directory + # names goes from (for example) "temp.win-amd64-3.10-pydebug" to "t", saving us roughly 25 characters. + "--build-temp", "t", + ] + if self.settings.build_type == "Debug": + setup_args.append("--debug") + self.run("{} {}".format(self.deps_user_info["cpython"].python, " ".join("\"{}\"".format(a) for a in setup_args)), run_environment=True) + + def _test_module(self, module, should_work): + try: + self.run("{} {}/../test_package/test_package.py -b {} -t {} ".format( + self.deps_user_info["cpython"].python, self.source_folder, self.build_folder, module), run_environment=True) + works = True + except ConanException as e: + works = False + exception = e + if should_work == works: + self.output.info("Result of test was expected.") + else: + if works: + raise ConanException("Module '{}' works, but should not have worked".format(module)) + else: + self.output.warn("Module '{}' does not work, but should have worked".format(module)) + raise exception + + def _cpython_option(self, name): + try: + return getattr(self.options["cpython"], name, False) + except ConanException: + return False + + def test(self): + if not tools.cross_building(self, skip_x64_x86=True): + self.run("{} -c \"print('hello world')\"".format(self.deps_user_info["cpython"].python), run_environment=True) + + buffer = StringIO() + self.run("{} -c \"import sys; print('.'.join(str(s) for s in sys.version_info[:3]))\"".format(self.deps_user_info["cpython"].python), run_environment=True, output=buffer) + self.output.info(buffer.getvalue()) + version_detected = buffer.getvalue().splitlines()[-1].strip() + if self._py_version != version_detected: + raise ConanException("python reported wrong version. Expected {exp}. Got {res}.".format(exp=self._py_version, res=version_detected)) + + if self._supports_modules: + self._test_module("gdbm", self._cpython_option("with_gdbm")) + self._test_module("bz2", self._cpython_option("with_bz2")) + self._test_module("lzma", self._cpython_option("with_lzma")) + self._test_module("tkinter", self._cpython_option("with_tkinter")) + with tools.environment_append({"TERM": "ansi"}): + self._test_module("curses", self._cpython_option("with_curses")) + + self._test_module("expat", True) + self._test_module("sqlite3", True) + self._test_module("decimal", True) + self._test_module("ctypes", True) + + if tools.is_apple_os(self.settings.os) and not self.options["cpython"].shared: + self.output.info("Not testing the module, because these seem not to work on apple when cpython is built as a static library") + # FIXME: find out why cpython on apple does not allow to use modules linked against a static python + else: + if self._supports_modules: + with tools.environment_append({"PYTHONPATH": [os.path.join(self.build_folder, "lib")]}): + self.output.info("Testing module (spam) using cmake built module") + self._test_module("spam", True) + + with tools.environment_append({"PYTHONPATH": [os.path.join(self.build_folder, "lib_setuptools")]}): + self.output.info("Testing module (spam) using setup.py built module") + self._test_module("spam", True) + + # MSVC builds need PYTHONHOME set. Linux and Mac don't require it to be set if tested after building, + # but if the package is relocated then it needs to be set. + with tools.environment_append({"PYTHONHOME": self.deps_user_info["cpython"].pythonhome}): + self.run(os.path.join("bin", "test_package"), run_environment=True) diff --git a/recipes/cpython/config.yml b/recipes/cpython/config.yml index e3abf3ec8acb2..cce5cc26948d6 100644 --- a/recipes/cpython/config.yml +++ b/recipes/cpython/config.yml @@ -5,7 +5,3 @@ versions: folder: "all" "3.8.12": folder: "all" - "3.7.12": - folder: "all" - "2.7.18": - folder: "all" From e6eaa827b92423c26b6939198126fc1fe34fef3d Mon Sep 17 00:00:00 2001 From: Tux3 Date: Thu, 21 Mar 2024 13:06:27 +0100 Subject: [PATCH 309/405] (#22827) android-ndk: add r26c From c8aa3f27320a13bda4c08a671fc4b63ca0d759cf Mon Sep 17 00:00:00 2001 From: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com> Date: Thu, 21 Mar 2024 07:48:24 -0500 Subject: [PATCH 310/405] (#23188) cpptrace: add version 0.5.1 --- recipes/cpptrace/all/conandata.yml | 4 ++++ recipes/cpptrace/config.yml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/recipes/cpptrace/all/conandata.yml b/recipes/cpptrace/all/conandata.yml index 3c8c1e7ad8901..0eb7e3cd9436a 100644 --- a/recipes/cpptrace/all/conandata.yml +++ b/recipes/cpptrace/all/conandata.yml @@ -1,5 +1,9 @@ sources: # Newer versions at the top + "0.5.1": + url: + - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.5.1.tar.gz" + sha256: "27b9f862ec6185f570ee59c07fdd12bebb55a986191518e896621317d2654f26" "0.5.0": url: - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.5.0.tar.gz" diff --git a/recipes/cpptrace/config.yml b/recipes/cpptrace/config.yml index 1be32f1ad9626..f119602310f02 100644 --- a/recipes/cpptrace/config.yml +++ b/recipes/cpptrace/config.yml @@ -1,5 +1,7 @@ versions: # Newer versions at the top + "0.5.1": + folder: all "0.5.0": folder: all "0.4.1": From d53dbc91ad520a1bfff2ac8f310c2aa958fcae13 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 21 Mar 2024 22:29:08 +0900 Subject: [PATCH 311/405] (#23189) openjdk: add version 21.0.2 --- recipes/openjdk/all/conandata.yml | 16 ++++++++++++++++ recipes/openjdk/config.yml | 2 ++ 2 files changed, 18 insertions(+) diff --git a/recipes/openjdk/all/conandata.yml b/recipes/openjdk/all/conandata.yml index bb0f8bea50c9b..41ac854b16462 100644 --- a/recipes/openjdk/all/conandata.yml +++ b/recipes/openjdk/all/conandata.yml @@ -1,4 +1,20 @@ sources: + "21.0.2": + Windows: + url: "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_windows-x64_bin.zip" + sha256: "b6c17e747ae78cdd6de4d7532b3164b277daee97c007d3eaa2b39cca99882664" + Linux_x86_64: + url: "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/12/GPL/openjdk-21.0.2_linux-x64_bin.tar.gz" + sha256: "960a708e76bffa0864e3e756e03314d56aa9dfb253b0803ae8a35eef2188f475" + Linux_armv8: + url: "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/12/GPL/openjdk-21.0.2_linux-aarch64_bin.tar.gz" + sha256: "0fcd2bdd32de146288635e05a362a24217baf669a3fa8e145ed09c6ad96a8c38" + Macos_x86_64: + url: "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/12/GPL/openjdk-21.0.2_macos-x64_bin.tar.gz" + sha256: "2830aa583a7f1e6ea2673ead18c12a2b1f85e9d5b8d69b116666014b14b81656" + Macos_armv8: + url: "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/12/GPL/openjdk-21.0.2_macos-aarch64_bin.tar.gz" + sha256: "997e0797f304a423149fd72284e9bcf7782c4a969fcb49ef05dfa7e5e6b6fbd6" "21.0.1": Windows: url: "https://download.java.net/java/GA/jdk21.0.1/415e3f918a1f4062a0074a2794853d0d/12/GPL/openjdk-21.0.1_windows-x64_bin.zip" diff --git a/recipes/openjdk/config.yml b/recipes/openjdk/config.yml index 1e9a2a92440d2..c2d6c3ae88d91 100644 --- a/recipes/openjdk/config.yml +++ b/recipes/openjdk/config.yml @@ -1,4 +1,6 @@ versions: + "21.0.2": + folder: all "21.0.1": folder: all "19.0.2": From b5aa00dfdd297e54d69b5ef87b361aae6488fcb3 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 21 Mar 2024 15:49:17 +0200 Subject: [PATCH 312/405] (#23194) metis: fix incorrect default value for with_64bit_types --- recipes/metis/all/conanfile.py | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/recipes/metis/all/conanfile.py b/recipes/metis/all/conanfile.py index 7782c2735e124..d935fb4c025d2 100644 --- a/recipes/metis/all/conanfile.py +++ b/recipes/metis/all/conanfile.py @@ -34,7 +34,7 @@ class METISConan(ConanFile): default_options = { "shared": False, "fPIC": True, - "with_64bit_types": True, + "with_64bit_types": False, "enable_gkrand": False, "enable_gkregex": False, "with_openmp": False, @@ -45,12 +45,7 @@ class METISConan(ConanFile): def export_sources(self): export_conandata_patches(self) copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) - copy( - self, - "gkbuild.cmake", - self.recipe_folder, - os.path.join(self.export_sources_folder, "src"), - ) + copy(self, "gkbuild.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": @@ -76,11 +71,11 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - tc.cache_variables["VALGRIND"] = self.options.with_valgrind - tc.cache_variables["OPENMP"] = self.options.with_openmp - tc.cache_variables["PCRE"] = self.options.with_pcre - tc.cache_variables["GKREGEX"] = self.settings.os == "Windows" or self.options.enable_gkregex - tc.cache_variables["GKRAND"] = self.options.enable_gkrand + tc.variables["VALGRIND"] = self.options.with_valgrind + tc.variables["OPENMP"] = self.options.with_openmp + tc.variables["PCRE"] = self.options.with_pcre + tc.variables["GKREGEX"] = self.settings.os == "Windows" or self.options.enable_gkregex + tc.variables["GKRAND"] = self.options.enable_gkrand if self.settings.build_type == "Debug": tc.preprocessor_definitions["DEBUG"] = "" else: @@ -104,12 +99,7 @@ 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, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() rm(self, "*.cmake", self.package_folder, recursive=True) From 486d5b9b38f8d7af209a7f774ce9bb85b76b0968 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 21 Mar 2024 15:21:51 +0100 Subject: [PATCH 313/405] (#23197) [minicoro] Add new package: minicoro/0.1.3 Signed-off-by: Uilian Ries --- recipes/minicoro/all/conandata.yml | 4 ++ recipes/minicoro/all/conanfile.py | 39 +++++++++++++++++++ .../minicoro/all/test_package/CMakeLists.txt | 7 ++++ .../minicoro/all/test_package/conanfile.py | 26 +++++++++++++ .../minicoro/all/test_package/test_package.c | 22 +++++++++++ recipes/minicoro/config.yml | 3 ++ 6 files changed, 101 insertions(+) create mode 100644 recipes/minicoro/all/conandata.yml create mode 100644 recipes/minicoro/all/conanfile.py create mode 100644 recipes/minicoro/all/test_package/CMakeLists.txt create mode 100644 recipes/minicoro/all/test_package/conanfile.py create mode 100644 recipes/minicoro/all/test_package/test_package.c create mode 100644 recipes/minicoro/config.yml diff --git a/recipes/minicoro/all/conandata.yml b/recipes/minicoro/all/conandata.yml new file mode 100644 index 0000000000000..26ecba7b50b2a --- /dev/null +++ b/recipes/minicoro/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.1.3": + url: "https://github.com/edubart/minicoro/archive/refs/tags/v0.1.3.tar.gz" + sha256: "4f9d4c3b5f6473f8141ee45e9947a6e7e7ee6665b4d9a8c373c0602495c5f6c9" diff --git a/recipes/minicoro/all/conanfile.py b/recipes/minicoro/all/conanfile.py new file mode 100644 index 0000000000000..de0be35811b00 --- /dev/null +++ b/recipes/minicoro/all/conanfile.py @@ -0,0 +1,39 @@ +from conan import ConanFile +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +import os + + +required_conan_version = ">=1.52.0" + + +class PackageConan(ConanFile): + name = "minicoro" + description = "Single header stackful cross-platform coroutine library in pure C" + license = ("Unlicense", "MIT-0") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/edubart/minicoro" + topics = ("lua", "coroutine", "fibers", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + pass + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*.h", self.source_folder, os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/minicoro/all/test_package/CMakeLists.txt b/recipes/minicoro/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..2862cc4744006 --- /dev/null +++ b/recipes/minicoro/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(minicoro REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE minicoro::minicoro) diff --git a/recipes/minicoro/all/test_package/conanfile.py b/recipes/minicoro/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/minicoro/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/minicoro/all/test_package/test_package.c b/recipes/minicoro/all/test_package/test_package.c new file mode 100644 index 0000000000000..5c333058e9350 --- /dev/null +++ b/recipes/minicoro/all/test_package/test_package.c @@ -0,0 +1,22 @@ +#define MINICORO_IMPL +#include "minicoro.h" + +#include +#include +#include + +void coro_entry(mco_coro* co) { + printf("coroutine 1\n"); + mco_yield(co); + printf("coroutine 2\n"); +} + +int main(void) { + mco_desc desc = mco_desc_init(coro_entry, 0); + desc.user_data = NULL; + mco_coro* co; + mco_create(&co, &desc); + mco_destroy(co); + + return EXIT_SUCCESS; +} diff --git a/recipes/minicoro/config.yml b/recipes/minicoro/config.yml new file mode 100644 index 0000000000000..b7f57204004e4 --- /dev/null +++ b/recipes/minicoro/config.yml @@ -0,0 +1,3 @@ +versions: + "0.1.3": + folder: all From 691adb0ab0ece4d9a285717302cfb1a9442f41c1 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Thu, 21 Mar 2024 14:41:53 +0000 Subject: [PATCH 314/405] (#23196) [bot] Update authorized users list (2024-03-21) Co-authored-by: conan-center-bot --- .c3i/authorized_users.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 86ea5a6a6dbca..c0b8570a8a236 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1313,3 +1313,6 @@ authorized_users: - Ruwei-Liu - msparapa - pzheltov +- igadmg +- eljonny +- VladimirShaleev From 98b2fa7efbf58f93c54f487fa057b2458a56ab26 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 21 Mar 2024 17:03:29 +0200 Subject: [PATCH 315/405] (#20010) behaviortree.cpp: add v4.5.0, improve maintainability, unvendor some dependencies * behaviortree.cpp: add v4.3.7 * behaviortree.cpp: bump deps * behaviortree.cpp: simplify patching * behaviortree.cpp: unvendor minitrace * behaviortree.cpp: drop v3.5.6 * behaviortree.cpp: unvendor tinyxml2 * behaviortree.cpp: unvendor lexy * behaviortree.cpp: bump to v4.4.2 * behaviortree.cpp: bump deps * behaviortree.cpp: fix linter error * behaviortree.cpp: add cmake/[>=3.16.3 <4] * behaviortree.cpp: add sqlite3 dependency * behaviortree.cpp: bump tinyxml2 * behaviortree.cpp: bump to v4.4.3 * behaviortree.cpp: add v3.8.6 * behaviortree.cpp: fix unvendored dependencies * behaviortree.cpp: unvendor tinyxml2 only for 4.0+ * behaviortree.cpp: ncurses is no longer used since v4.1 * behaviortree.cpp: add dl system dep * behaviortree.cpp: cross-compiling with apple-clang is broken * behaviortree.cpp: avoid accidental use of system ncurses * behaviortree.cpp: fix ZeroMQ CMake file name * behaviortree.cpp: expose all build options * behaviortree.cpp: bump to v4.5.0 * behaviortree.cpp: update v4.5.0 hash * behaviortree.cpp: bump to v4.5.2 * behaviortree.cpp: revert removal of -Werror=return-type --- recipes/behaviortree.cpp/all/conan_deps.cmake | 16 ++ recipes/behaviortree.cpp/all/conandata.yml | 27 +-- recipes/behaviortree.cpp/all/conanfile.py | 220 ++++++++++++++---- .../all/patches/3.5.6-0001-remove-fpic.patch | 12 - .../all/patches/3.5.6-0002-find-zmq.patch | 68 ------ .../all/patches/3.5.6-0003-no-werror.patch | 17 -- .../patches/3.5.6-0004-win-sigaction.patch | 22 -- .../all/patches/3.5.6-0005-stdc-format.patch | 12 - .../all/patches/3.7.0-0001-remove-fpic.patch | 13 -- .../all/patches/3.7.0-0002-find-zmq.patch | 68 ------ .../all/patches/3.7.0-0003-no-werror.patch | 13 -- .../all/patches/4.0.1-0001-remove-fpic.patch | 13 -- .../all/patches/4.0.1-0002-find-zmq.patch | 57 ----- .../all/patches/4.0.1-0003-no-werror.patch | 13 -- recipes/behaviortree.cpp/config.yml | 6 +- 15 files changed, 204 insertions(+), 373 deletions(-) create mode 100644 recipes/behaviortree.cpp/all/conan_deps.cmake delete mode 100644 recipes/behaviortree.cpp/all/patches/3.5.6-0001-remove-fpic.patch delete mode 100644 recipes/behaviortree.cpp/all/patches/3.5.6-0002-find-zmq.patch delete mode 100644 recipes/behaviortree.cpp/all/patches/3.5.6-0003-no-werror.patch delete mode 100644 recipes/behaviortree.cpp/all/patches/3.5.6-0004-win-sigaction.patch delete mode 100644 recipes/behaviortree.cpp/all/patches/3.5.6-0005-stdc-format.patch delete mode 100644 recipes/behaviortree.cpp/all/patches/3.7.0-0001-remove-fpic.patch delete mode 100644 recipes/behaviortree.cpp/all/patches/3.7.0-0002-find-zmq.patch delete mode 100644 recipes/behaviortree.cpp/all/patches/3.7.0-0003-no-werror.patch delete mode 100644 recipes/behaviortree.cpp/all/patches/4.0.1-0001-remove-fpic.patch delete mode 100644 recipes/behaviortree.cpp/all/patches/4.0.1-0002-find-zmq.patch delete mode 100644 recipes/behaviortree.cpp/all/patches/4.0.1-0003-no-werror.patch diff --git a/recipes/behaviortree.cpp/all/conan_deps.cmake b/recipes/behaviortree.cpp/all/conan_deps.cmake new file mode 100644 index 0000000000000..1bfd028b22003 --- /dev/null +++ b/recipes/behaviortree.cpp/all/conan_deps.cmake @@ -0,0 +1,16 @@ +# Inject unvendored dependencies provided by Conan + +if(WITH_LEXY) + find_package(lexy REQUIRED CONFIG) + link_libraries(foonathan::lexy) +endif() + +if(WITH_MINITRACE) + find_package(minitrace REQUIRED CONFIG) + link_libraries(minitrace::minitrace) +endif() + +if(WITH_TINYXML2) + find_package(tinyxml2 REQUIRED CONFIG) + link_libraries(tinyxml2::tinyxml2) +endif() diff --git a/recipes/behaviortree.cpp/all/conandata.yml b/recipes/behaviortree.cpp/all/conandata.yml index 8e188b3097d43..e0d26c089d74f 100644 --- a/recipes/behaviortree.cpp/all/conandata.yml +++ b/recipes/behaviortree.cpp/all/conandata.yml @@ -1,28 +1,13 @@ sources: + "4.5.2": + url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/4.5.2.tar.gz" + sha256: "1aaac034fc6a2f03d9347934e3baf3cabd5edc8bb416b9d7f5d944598019aeb9" "4.0.1": url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/4.0.1.tar.gz" sha256: "71544f72abea8e8c246b016b7e8d87d96f731c8aa96698058d8e69d40e56f9b9" + "3.8.6": + url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/3.8.6.tar.gz" + sha256: "df01713e61aa3b6f4a637dcff31dfd3c96c3c05fac226da8566a873a24ccde27" "3.7.0": url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/3.7.0.tar.gz" sha256: "ab0d8ac1a0df4dd43cf45da8a784bab7fdedf711bd0e227f7ed071f79b0c7b5c" - "3.5.6": - url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/3.5.6.tar.gz" - sha256: "543c428602b5acb7c5666aee34feb532e18ce7200870a79b23ff9aed17ee84c4" -patches: - "4.0.1": - - patch_file: "patches/4.0.1-0001-remove-fpic.patch" - - patch_file: "patches/4.0.1-0002-find-zmq.patch" - - patch_file: "patches/4.0.1-0003-no-werror.patch" - - patch_file: "patches/3.5.6-0005-stdc-format.patch" - - patch_file: "patches/3.5.6-0005-stdc-format.patch" - "3.7.0": - - patch_file: "patches/3.7.0-0001-remove-fpic.patch" - - patch_file: "patches/3.7.0-0002-find-zmq.patch" - - patch_file: "patches/3.7.0-0003-no-werror.patch" - - patch_file: "patches/3.5.6-0005-stdc-format.patch" - "3.5.6": - - patch_file: "patches/3.5.6-0001-remove-fpic.patch" - - patch_file: "patches/3.5.6-0002-find-zmq.patch" - - patch_file: "patches/3.5.6-0003-no-werror.patch" - - patch_file: "patches/3.5.6-0004-win-sigaction.patch" - - patch_file: "patches/3.5.6-0005-stdc-format.patch" diff --git a/recipes/behaviortree.cpp/all/conanfile.py b/recipes/behaviortree.cpp/all/conanfile.py index 54f5ae5ad8322..abd62b04171b4 100644 --- a/recipes/behaviortree.cpp/all/conanfile.py +++ b/recipes/behaviortree.cpp/all/conanfile.py @@ -1,8 +1,8 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.microsoft import check_min_vs, is_msvc -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir -from conan.tools.build import check_min_cppstd +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import get, copy, rmdir, replace_in_file, save, rm +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 @@ -23,39 +23,70 @@ class BehaviorTreeCPPConan(ConanFile): "fPIC": [True, False], "with_tools": [True, False], "with_coroutines": [True, False], + "enable_groot_interface": [True, False], + "enable_sqlite_logging": [True, False], + "enable_manual_selector": [True, False], + "use_v3_compatible_names": [True, False], } default_options = { "shared": False, "fPIC": True, "with_tools": False, "with_coroutines": False, + "enable_groot_interface": True, + "enable_sqlite_logging": True, + "enable_manual_selector": False, + "use_v3_compatible_names": False, + } + options_description = { + "with_tools": "Build commandline tools", + "with_coroutines": "Enable Boost coroutines", + "enable_groot_interface": "Add Groot2 connection (requires ZeroMQ)", + "enable_sqlite_logging": "Add SQLite logging", + "enable_manual_selector": "Build manual selector node", + "use_v3_compatible_names": "Use v3 compatible names", } @property def _minimum_cppstd_required(self): - return 14 if Version(self.version) < "4.0" else 17 + if Version(self.version) >= "4.0": + return 17 + return 14 @property def _minimum_compilers_version(self): - if Version(self.version) < "4.0": + if Version(self.version) >= "4.0": return { - "gcc": "5", - "clang": "5", + "gcc": "8", + "clang": "7", "apple-clang": "12", + "msvc": "192", + "Visual Studio": "16", } else: return { - "gcc": "8", - "clang": "7", + "gcc": "5", + "clang": "5", "apple-clang": "12", + "msvc": "191", + "Visual Studio": "15", } 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): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "4.0": + del self.options.use_v3_compatible_names + if Version(self.version) >= "4.1.0": + del self.options.with_coroutines + if Version(self.version) >= "4.1.1": + del self.options.enable_manual_selector + else: + del self.options.enable_groot_interface + del self.options.enable_sqlite_logging def configure(self): if self.options.shared: @@ -64,54 +95,150 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") + @property + def _with_boost(self): + return self.options.get_safe("with_coroutines", False) + + @property + def _with_lexy(self): + # FIXME: using vendored version temporarily due to a missing CCI binary + # return Version(self.version) >= "4.0.0" + return False + + @property + def _with_minitrace(self): + return Version(self.version) >= "4.3.4" + + @property + def _with_ncurses(self): + return self.options.get_safe("enable_manual_selector", False) + + @property + def _with_sqlite3(self): + return self.options.get_safe("enable_sqlite_logging", False) + + @property + def _with_tinyxml2(self): + return Version(self.version) >= "4.0.0" + + @property + def _with_zeromq(self): + if Version(self.version) >= "4.1.1": + return self.options.enable_groot_interface + return Version(self.version) >= "4.0.0" + def requirements(self): - if self.options.with_coroutines: - self.requires("boost/1.80.0") - self.requires("ncurses/6.3") - self.requires("zeromq/4.3.4") - self.requires("cppzmq/4.9.0") + if self._with_boost: + self.requires("boost/1.83.0") + if self._with_ncurses: + self.requires("ncurses/6.4") + if self._with_lexy: + self.requires("foonathan-lexy/2022.12.1") + if self._with_minitrace: + self.requires("minitrace/cci.20230905") + if self._with_sqlite3: + self.requires("sqlite3/3.44.2") + if self._with_tinyxml2: + self.requires("tinyxml2/10.0.0") + if self._with_zeromq: + self.requires("zeromq/4.3.5") + + # TODO: other vendored dependencies + # - cppzmq is customized and not compatible with Conan version + # - cpp-sqlite + # - minicoro + # - wildcards def validate(self): if self.info.settings.os == "Windows" and self.info.options.shared: raise ConanInvalidConfiguration(f"{self.ref} can not be built as shared on Windows.") if self.info.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._minimum_cppstd_required) - check_min_vs(self, 191 if Version(self.version) < "4.0" else 192) - if not is_msvc(self): - minimum_version = self._minimum_compilers_version.get(str(self.info.settings.compiler), False) - if not minimum_version: - self.output.warn(f"{self.ref} requires C++{self._minimum_cppstd_required}. Your compiler is unknown. Assuming it supports C++{self._minimum_cppstd_required}.") - elif Version(self.info.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration("BehaviorTree.CPP requires C++{}, which your compiler does not support." - .format(self._minimum_cppstd_required)) + minimum_version = self._minimum_compilers_version.get(str(self.info.settings.compiler), False) + if not minimum_version: + self.output.warn(f"{self.ref} requires C++{self._minimum_cppstd_required}. " + f"Your compiler is unknown. Assuming it supports C++{self._minimum_cppstd_required}.") + elif Version(self.info.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"BehaviorTree.CPP requires C++{self._minimum_cppstd_required}, which your compiler does not support." + ) if self.settings.compiler == "clang" and str(self.settings .compiler.libcxx) == "libstdc++": raise ConanInvalidConfiguration(f"{self.ref} needs recent libstdc++ with charconv. please switch to gcc, or to libc++") + if self.settings.compiler == "apple-clang" and cross_building(self) and self.settings.arch in ["x86", "x86_64"]: + raise ConanInvalidConfiguration(f"Cross-compiling for {self.settings.arch} is not yet supported. Contributions are welcome!") + + def build_requirements(self): + if Version(self.version) >= "4.1.0": + self.tool_requires("cmake/[>=3.16.3 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) def generate(self): + venv = VirtualBuildEnv(self) + venv.generate() + tc = CMakeToolchain(self) + tc.variables["CMAKE_PROJECT_behaviortree_cpp_INCLUDE"] = "conan_deps.cmake" + tc.variables["WITH_LEXY"] = self._with_lexy + tc.variables["WITH_MINITRACE"] = self._with_minitrace + tc.variables["WITH_TINYXML2"] = self._with_tinyxml2 + if not self.options.get_safe("enable_manual_selector"): + # Avoid accidental use of system ncurses + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_Curses"] = True if Version(self.version) < "4.0": tc.variables["BUILD_EXAMPLES"] = False tc.variables["BUILD_UNIT_TESTS"] = False tc.variables["BUILD_TOOLS"] = self.options.with_tools tc.variables["ENABLE_COROUTINES"] = self.options.with_coroutines + tc.variables["BUILD_MANUAL_SELECTOR"] = self.options.get_safe("enable_manual_selector", False) else: tc.variables["BTCPP_SHARED_LIBS"] = self.options.shared tc.variables["BTCPP_EXAMPLES"] = False tc.variables["BTCPP_UNIT_TESTS"] = False tc.variables["BTCPP_BUILD_TOOLS"] = self.options.with_tools - tc.variables["BTCPP_ENABLE_COROUTINES"] = self.options.with_coroutines + tc.variables["BTCPP_ENABLE_COROUTINES"] = self.options.get_safe("with_coroutines", False) + tc.variables["BTCPP_MANUAL_SELECTOR"] = self.options.get_safe("enable_manual_selector", False) + tc.variables["BTCPP_GROOT_INTERFACE"] = self.options.get_safe("enable_groot_interface", False) + tc.variables["BTCPP_SQLITE_LOGGING"] = self.options.get_safe("enable_sqlite_logging", False) + tc.variables["USE_V3_COMPATIBLE_NAMES"] = self.options.use_v3_compatible_names tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() deps = CMakeDeps(self) + if Version(self.version) >= "4.1.0": + deps.set_property("zeromq", "cmake_file_name", "ZeroMQ") + else: + deps.set_property("zeromq", "cmake_file_name", "ZMQ") deps.generate() + def _patch_sources(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", "") + # Unvendor lexy + if self._with_lexy: + rmdir(self, os.path.join(self.source_folder, "3rdparty", "lexy")) + save(self, os.path.join(self.source_folder, "3rdparty", "lexy", "CMakeLists.txt"), "") + # 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", "") + replace_in_file(self, os.path.join(self.source_folder, "src", "loggers", "bt_minitrace_logger.cpp"), + "minitrace/minitrace.h", "minitrace.h") + # Unvendor tinyxml2 + if self._with_tinyxml2: + rmdir(self, os.path.join(self.source_folder, "3rdparty", "tinyxml2")) + replace_in_file(self, cmakelists, "3rdparty/tinyxml2/tinyxml2.cpp", "") + replace_in_file(self, os.path.join(self.source_folder, "src", "xml_parsing.cpp"), + "tinyxml2/tinyxml2.h", "tinyxml2.h") + # Ensure ZeroMQ and other packages are provided by Conan + rm(self, "Find*.cmake", os.path.join(self.source_folder, "cmake")) + def build(self): - apply_conandata_patches(self) + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() @@ -125,39 +252,48 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): - if Version(self.version) < "4.0": - self.cpp_info.set_property("cmake_file_name", "BehaviorTreeV3") + if Version(self.version) >= "4.0": + cmake_file_name = "BehaviorTree" + libname = "behaviortree_cpp" else: - self.cpp_info.set_property("cmake_file_name", "BehaviorTree") - - libname = "behaviortree_cpp_v3" if Version(self.version) < "4.0" else "behaviortree_cpp" + cmake_file_name = "BehaviorTreeV3" + libname = "behaviortree_cpp_v3" + self.cpp_info.set_property("cmake_file_name", cmake_file_name) self.cpp_info.set_property("cmake_target_name", f"BT::{libname}") + requires = [] + if self._with_boost: + requires.append("boost::coroutine") + if self._with_lexy: + requires.append("foonathan-lexy::foonathan-lexy") + if self._with_minitrace: + requires.append("minitrace::minitrace") + if self._with_ncurses: + requires.append("ncurses::ncurses") + if self._with_sqlite3: + requires.append("sqlite3::sqlite3") + if self._with_tinyxml2: + requires.append("tinyxml2::tinyxml2") + if self._with_zeromq: + requires.append("zeromq::zeromq") + postfix = "d" if self.settings.os == "Windows" and self.settings.build_type == "Debug" else "" # TODO: back to global scope in conan v2 once cmake_find_package* generators removed self.cpp_info.components[libname].libs = [f"{libname}{postfix}"] - self.cpp_info.components[libname].requires = ["zeromq::zeromq", "cppzmq::cppzmq", "ncurses::ncurses"] - if self.options.with_coroutines: - self.cpp_info.components[libname].requires.append("boost::coroutine") + self.cpp_info.components[libname].requires = requires if self.settings.os in ("Linux", "FreeBSD"): - self.cpp_info.components[libname].system_libs.append("pthread") + self.cpp_info.components[libname].system_libs.extend(["pthread", "dl"]) if Version(self.version) >= "4.0" and \ self.settings.compiler == "gcc" and Version(self.settings.compiler.version).major == "8": self.cpp_info.components[libname].system_libs.append("stdc++fs") if self.options.with_tools: 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) # TODO: to remove in conan v2 once cmake_find_package* generators removed - if Version(self.version) < "4.0": - self.cpp_info.filenames["cmake_find_package"] = "BehaviorTreeV3" - self.cpp_info.filenames["cmake_find_package_multi"] = "BehaviorTreeV3" - else: - self.cpp_info.filenames["cmake_find_package"] = "BehaviorTree" - self.cpp_info.filenames["cmake_find_package_multi"] = "BehaviorTree" - + self.cpp_info.filenames["cmake_find_package"] = cmake_file_name + self.cpp_info.filenames["cmake_find_package_multi"] = cmake_file_name self.cpp_info.names["cmake_find_package"] = "BT" self.cpp_info.names["cmake_find_package_multi"] = "BT" self.cpp_info.components[libname].names["cmake_find_package"] = libname diff --git a/recipes/behaviortree.cpp/all/patches/3.5.6-0001-remove-fpic.patch b/recipes/behaviortree.cpp/all/patches/3.5.6-0001-remove-fpic.patch deleted file mode 100644 index 7cb2daad955aa..0000000000000 --- a/recipes/behaviortree.cpp/all/patches/3.5.6-0001-remove-fpic.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a390aed..aff91ec 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -36,7 +36,6 @@ if(NOT DEFINED BT_COROUTINES) - add_definitions(-DBT_NO_COROUTINES) - endif() - --set(CMAKE_POSITION_INDEPENDENT_CODE ON) - - #---- project configuration ---- - option(BUILD_EXAMPLES "Build tutorials and examples" ON) diff --git a/recipes/behaviortree.cpp/all/patches/3.5.6-0002-find-zmq.patch b/recipes/behaviortree.cpp/all/patches/3.5.6-0002-find-zmq.patch deleted file mode 100644 index c717020c8e00a..0000000000000 --- a/recipes/behaviortree.cpp/all/patches/3.5.6-0002-find-zmq.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index aff91ec..242c214 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -45,14 +45,14 @@ option(BUILD_SHARED_LIBS "Build shared libraries" ON) - - #---- Find other packages ---- - find_package(Threads) --find_package(ZMQ) -+find_package(ZeroMQ) - - list(APPEND BEHAVIOR_TREE_PUBLIC_LIBRARIES - ${CMAKE_THREAD_LIBS_INIT} - ${CMAKE_DL_LIBS} - ) - --if( ZMQ_FOUND ) -+if( ZeroMQ_FOUND ) - message(STATUS "ZeroMQ found.") - add_definitions( -DZMQ_FOUND ) - list(APPEND BT_SOURCE src/loggers/bt_zmq_publisher.cpp) -@@ -202,8 +202,8 @@ if (WIN32) - add_library(${BEHAVIOR_TREE_LIBRARY} STATIC ${BT_SOURCE} ) - endif() - --if( ZMQ_FOUND ) -- list(APPEND BUILD_TOOL_INCLUDE_DIRS ${ZMQ_INCLUDE_DIRS}) -+if( ZeroMQ_FOUND ) -+ list(APPEND BUILD_TOOL_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIRS}) - endif() - - target_link_libraries(${BEHAVIOR_TREE_LIBRARY} PUBLIC -@@ -211,7 +211,7 @@ target_link_libraries(${BEHAVIOR_TREE_LIBRARY} PUBLIC - - target_link_libraries(${BEHAVIOR_TREE_LIBRARY} PRIVATE - ${Boost_LIBRARIES} -- ${ZMQ_LIBRARIES}) -+ ${ZeroMQ_LIBRARIES}) - - #get_target_property(my_libs ${BEHAVIOR_TREE_LIBRARY} INTERFACE_LINK_LIBRARIES) - #list(REMOVE_ITEM _libs X) -@@ -227,8 +227,8 @@ target_include_directories(${BEHAVIOR_TREE_LIBRARY} PUBLIC - $ - ${BUILD_TOOL_INCLUDE_DIRS}) - --if( ZMQ_FOUND ) -- target_compile_definitions(${BEHAVIOR_TREE_LIBRARY} PUBLIC ZMQ_FOUND) -+if( ZeroMQ_FOUND ) -+ target_compile_definitions(${BEHAVIOR_TREE_LIBRARY} PUBLIC ZeroMQ_FOUND) - endif() - - if(MSVC) -diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt -index 0801850..153b447 100644 ---- a/tools/CMakeLists.txt -+++ b/tools/CMakeLists.txt -@@ -6,9 +6,9 @@ target_link_libraries(bt3_log_cat ${BEHAVIOR_TREE_LIBRARY} ) - install(TARGETS bt3_log_cat - DESTINATION ${BEHAVIOR_TREE_BIN_DESTINATION} ) - --if( ZMQ_FOUND ) -+if( ZeroMQ_FOUND ) - add_executable(bt3_recorder bt_recorder.cpp ) -- target_link_libraries(bt3_recorder ${BEHAVIOR_TREE_LIBRARY} ${ZMQ_LIBRARIES}) -+ target_link_libraries(bt3_recorder ${BEHAVIOR_TREE_LIBRARY} ${ZeroMQ_LIBRARIES}) - install(TARGETS bt3_recorder - DESTINATION ${BEHAVIOR_TREE_BIN_DESTINATION} ) - endif() diff --git a/recipes/behaviortree.cpp/all/patches/3.5.6-0003-no-werror.patch b/recipes/behaviortree.cpp/all/patches/3.5.6-0003-no-werror.patch deleted file mode 100644 index 4996714060f93..0000000000000 --- a/recipes/behaviortree.cpp/all/patches/3.5.6-0003-no-werror.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 242c214..cb8d77a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -232,10 +232,10 @@ if( ZeroMQ_FOUND ) - endif() - - if(MSVC) -- target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE /W3 /WX) -+ target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE /W3) - else() - target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE -- -Wall -Wextra -Werror=return-type) -+ -Wall -Wextra) - endif() - - ###################################################### diff --git a/recipes/behaviortree.cpp/all/patches/3.5.6-0004-win-sigaction.patch b/recipes/behaviortree.cpp/all/patches/3.5.6-0004-win-sigaction.patch deleted file mode 100644 index 75f9c74e55e10..0000000000000 --- a/recipes/behaviortree.cpp/all/patches/3.5.6-0004-win-sigaction.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/tools/bt_recorder.cpp b/tools/bt_recorder.cpp -index 3aa6740..4b36414 100644 ---- a/tools/bt_recorder.cpp -+++ b/tools/bt_recorder.cpp -@@ -16,12 +16,17 @@ static void s_signal_handler(int) - - static void CatchSignals(void) - { -+#ifdef _WIN32 -+ signal(SIGINT, s_signal_handler); -+ signal(SIGTERM, s_signal_handler); -+#else - struct sigaction action; - action.sa_handler = s_signal_handler; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - sigaction(SIGINT, &action, NULL); - sigaction(SIGTERM, &action, NULL); -+#endif - } - - int main(int argc, char* argv[]) diff --git a/recipes/behaviortree.cpp/all/patches/3.5.6-0005-stdc-format.patch b/recipes/behaviortree.cpp/all/patches/3.5.6-0005-stdc-format.patch deleted file mode 100644 index d1b1b47051f32..0000000000000 --- a/recipes/behaviortree.cpp/all/patches/3.5.6-0005-stdc-format.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/3rdparty/minitrace/minitrace.h b/3rdparty/minitrace/minitrace.h -index c7d5b31..d68dc52 100644 ---- a/3rdparty/minitrace/minitrace.h -+++ b/3rdparty/minitrace/minitrace.h -@@ -21,6 +21,7 @@ - // More: - // http://www.altdevblogaday.com/2012/08/21/using-chrometracing-to-view-your-inline-profiling-data/ - -+#define __STDC_FORMAT_MACROS - #include - - #define MTR_ENABLED diff --git a/recipes/behaviortree.cpp/all/patches/3.7.0-0001-remove-fpic.patch b/recipes/behaviortree.cpp/all/patches/3.7.0-0001-remove-fpic.patch deleted file mode 100644 index b1bd9fd89538c..0000000000000 --- a/recipes/behaviortree.cpp/all/patches/3.7.0-0001-remove-fpic.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index cd490a5..843045e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -15,8 +15,6 @@ else() - add_definitions(-Wpedantic) - endif() - --set(CMAKE_POSITION_INDEPENDENT_CODE ON) -- - #---- project configuration ---- - option(BUILD_EXAMPLES "Build tutorials and examples" ON) - option(BUILD_SAMPLES "Build sample nodes" ON) diff --git a/recipes/behaviortree.cpp/all/patches/3.7.0-0002-find-zmq.patch b/recipes/behaviortree.cpp/all/patches/3.7.0-0002-find-zmq.patch deleted file mode 100644 index 7290476cc8726..0000000000000 --- a/recipes/behaviortree.cpp/all/patches/3.7.0-0002-find-zmq.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 843045e..471c00e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -54,14 +54,14 @@ endif() - - #---- Find other packages ---- - find_package(Threads) --find_package(ZMQ) -+find_package(ZeroMQ) - - list(APPEND BEHAVIOR_TREE_PUBLIC_LIBRARIES - ${CMAKE_THREAD_LIBS_INIT} - ${CMAKE_DL_LIBS} - ) - --if( ZMQ_FOUND ) -+if( ZeroMQ_FOUND ) - message(STATUS "ZeroMQ found.") - add_definitions( -DZMQ_FOUND ) - list(APPEND BT_SOURCE src/loggers/bt_zmq_publisher.cpp) -@@ -193,8 +193,8 @@ else() - add_library(${BEHAVIOR_TREE_LIBRARY} STATIC ${BT_SOURCE}) - endif() - --if( ZMQ_FOUND ) -- list(APPEND BUILD_TOOL_INCLUDE_DIRS ${ZMQ_INCLUDE_DIRS}) -+if( ZeroMQ_FOUND ) -+ list(APPEND BUILD_TOOL_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIRS}) - endif() - - target_link_libraries(${BEHAVIOR_TREE_LIBRARY} PUBLIC -@@ -202,7 +202,7 @@ target_link_libraries(${BEHAVIOR_TREE_LIBRARY} PUBLIC - - target_link_libraries(${BEHAVIOR_TREE_LIBRARY} PRIVATE - ${Boost_LIBRARIES} -- ${ZMQ_LIBRARIES}) -+ ${ZeroMQ_LIBRARIES}) - - #get_target_property(my_libs ${BEHAVIOR_TREE_LIBRARY} INTERFACE_LINK_LIBRARIES) - #list(REMOVE_ITEM _libs X) -@@ -218,8 +218,8 @@ target_include_directories(${BEHAVIOR_TREE_LIBRARY} PUBLIC - $ - ${BUILD_TOOL_INCLUDE_DIRS}) - --if( ZMQ_FOUND ) -- target_compile_definitions(${BEHAVIOR_TREE_LIBRARY} PUBLIC ZMQ_FOUND) -+if( ZeroMQ_FOUND ) -+ target_compile_definitions(${BEHAVIOR_TREE_LIBRARY} PUBLIC ZeroMQ_FOUND) - endif() - - if(MSVC) -diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt -index 2ad33b3..2dc969d 100644 ---- a/tools/CMakeLists.txt -+++ b/tools/CMakeLists.txt -@@ -6,9 +6,9 @@ target_link_libraries(bt3_log_cat ${BEHAVIOR_TREE_LIBRARY} ) - install(TARGETS bt3_log_cat - DESTINATION ${BEHAVIOR_TREE_BIN_DESTINATION} ) - --if( ZMQ_FOUND ) -+if( ZeroMQ_FOUND ) - add_executable(bt3_recorder bt_recorder.cpp ) -- target_link_libraries(bt3_recorder ${BEHAVIOR_TREE_LIBRARY} ${ZMQ_LIBRARIES}) -+ target_link_libraries(bt3_recorder ${BEHAVIOR_TREE_LIBRARY} ${ZeroMQ_LIBRARIES}) - install(TARGETS bt3_recorder - DESTINATION ${BEHAVIOR_TREE_BIN_DESTINATION} ) - endif() diff --git a/recipes/behaviortree.cpp/all/patches/3.7.0-0003-no-werror.patch b/recipes/behaviortree.cpp/all/patches/3.7.0-0003-no-werror.patch deleted file mode 100644 index 5bf8893db1770..0000000000000 --- a/recipes/behaviortree.cpp/all/patches/3.7.0-0003-no-werror.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 471c00e..7245461 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -225,7 +225,7 @@ endif() - if(MSVC) - else() - target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE -- -Wall -Wextra -Werror=return-type) -+ -Wall -Wextra) - endif() - - ############################################################# diff --git a/recipes/behaviortree.cpp/all/patches/4.0.1-0001-remove-fpic.patch b/recipes/behaviortree.cpp/all/patches/4.0.1-0001-remove-fpic.patch deleted file mode 100644 index 23931bd446392..0000000000000 --- a/recipes/behaviortree.cpp/all/patches/4.0.1-0001-remove-fpic.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d03b8a7..a2f23cf 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -15,8 +15,6 @@ else() - add_definitions(-Wpedantic) - endif() - --set(CMAKE_POSITION_INDEPENDENT_CODE ON) -- - #---- project configuration ---- - option(BTCPP_SHARED_LIBS "Build shared libraries" ON) - option(BTCPP_ENABLE_COROUTINES "Enable boost coroutines" ON) diff --git a/recipes/behaviortree.cpp/all/patches/4.0.1-0002-find-zmq.patch b/recipes/behaviortree.cpp/all/patches/4.0.1-0002-find-zmq.patch deleted file mode 100644 index 6753b06f564d0..0000000000000 --- a/recipes/behaviortree.cpp/all/patches/4.0.1-0002-find-zmq.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a2f23cf..d427d37 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -67,14 +67,14 @@ endif() - - #---- Find other packages ---- - find_package(Threads) --find_package(ZMQ) -+find_package(ZeroMQ) - - list(APPEND BEHAVIOR_TREE_PUBLIC_LIBRARIES - ${CMAKE_THREAD_LIBS_INIT} - ${CMAKE_DL_LIBS} - ) - --if( ZMQ_FOUND ) -+if( ZeroMQ_FOUND ) - message(STATUS "ZeroMQ found.") - add_definitions( -DZMQ_FOUND ) - list(APPEND BT_SOURCE src/loggers/bt_zmq_publisher.cpp) -@@ -221,7 +221,7 @@ target_link_libraries(${BEHAVIOR_TREE_LIBRARY} - ${BEHAVIOR_TREE_PUBLIC_LIBRARIES} - PRIVATE - ${Boost_LIBRARIES} -- ${ZMQ_LIBRARIES} -+ ${ZeroMQ_LIBRARIES} - $ - ) - -@@ -243,8 +243,8 @@ target_include_directories(${BEHAVIOR_TREE_LIBRARY} PRIVATE - $ - ) - --if( ZMQ_FOUND ) -- target_compile_definitions(${BEHAVIOR_TREE_LIBRARY} PUBLIC ZMQ_FOUND) -+if( ZeroMQ_FOUND ) -+ target_compile_definitions(${BEHAVIOR_TREE_LIBRARY} PUBLIC ZeroMQ_FOUND) - endif() - - if(MSVC) -diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt -index 163e703..b98f525 100644 ---- a/tools/CMakeLists.txt -+++ b/tools/CMakeLists.txt -@@ -7,9 +7,9 @@ target_link_libraries(bt3_log_cat ${BEHAVIOR_TREE_LIBRARY} ) - install(TARGETS bt3_log_cat - DESTINATION ${BEHAVIOR_TREE_BIN_DESTINATION} ) - --if( ZMQ_FOUND ) -+if( ZeroMQ_FOUND ) - add_executable(bt3_recorder bt_recorder.cpp ) -- target_link_libraries(bt3_recorder ${BEHAVIOR_TREE_LIBRARY} ${ZMQ_LIBRARIES}) -+ target_link_libraries(bt3_recorder ${BEHAVIOR_TREE_LIBRARY} ${ZeroMQ_LIBRARIES}) - install(TARGETS bt3_recorder - DESTINATION ${BEHAVIOR_TREE_BIN_DESTINATION} ) - endif() diff --git a/recipes/behaviortree.cpp/all/patches/4.0.1-0003-no-werror.patch b/recipes/behaviortree.cpp/all/patches/4.0.1-0003-no-werror.patch deleted file mode 100644 index b69541449eb87..0000000000000 --- a/recipes/behaviortree.cpp/all/patches/4.0.1-0003-no-werror.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d427d37..0c10f52 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -250,7 +250,7 @@ endif() - if(MSVC) - else() - target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE -- -Wall -Wextra -Werror=return-type) -+ -Wall -Wextra) - endif() - - ############################################################# diff --git a/recipes/behaviortree.cpp/config.yml b/recipes/behaviortree.cpp/config.yml index e1234d5535a8c..f6b53df246238 100644 --- a/recipes/behaviortree.cpp/config.yml +++ b/recipes/behaviortree.cpp/config.yml @@ -1,7 +1,9 @@ versions: + "4.5.2": + folder: all "4.0.1": folder: all - "3.7.0": + "3.8.6": folder: all - "3.5.6": + "3.7.0": folder: all From 94d7a8daa8e29bc89cb6ca6174d9e2d70dd9acb1 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 21 Mar 2024 16:27:46 +0100 Subject: [PATCH 316/405] (#23185) Arrow: Remove older versions not compatible with Macos amrv8 * testing: build arrow recipe * get rid of 1.0.0 * get rid of 2.0.0 * remove recipe edit --- recipes/arrow/all/conandata.yml | 26 -- .../patches/1.0.0-0003-fix-shared-msvc.patch | 13 - .../1.0.0-0005-fix-make12-namespace.patch | 22 -- .../all/patches/1.0.0-0006-fix-cmake.patch | 333 ------------------ .../patches/2.0.0-0003-fix-shared-msvc.patch | 13 - .../patches/2.0.0-0005-gandiva-engine.patch | 13 - .../all/patches/2.0.0-0008-fix-cmake.patch | 273 -------------- recipes/arrow/config.yml | 4 - 8 files changed, 697 deletions(-) delete mode 100644 recipes/arrow/all/patches/1.0.0-0003-fix-shared-msvc.patch delete mode 100644 recipes/arrow/all/patches/1.0.0-0005-fix-make12-namespace.patch delete mode 100644 recipes/arrow/all/patches/1.0.0-0006-fix-cmake.patch delete mode 100644 recipes/arrow/all/patches/2.0.0-0003-fix-shared-msvc.patch delete mode 100644 recipes/arrow/all/patches/2.0.0-0005-gandiva-engine.patch delete mode 100644 recipes/arrow/all/patches/2.0.0-0008-fix-cmake.patch diff --git a/recipes/arrow/all/conandata.yml b/recipes/arrow/all/conandata.yml index 5521daf96b996..030422c3d34b6 100644 --- a/recipes/arrow/all/conandata.yml +++ b/recipes/arrow/all/conandata.yml @@ -38,12 +38,6 @@ sources: "7.0.0": url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-7.0.0/apache-arrow-7.0.0.tar.gz?action=download" sha256: "e8f49b149a15ecef4e40fcfab1b87c113c6b1ee186005c169e5cdf95d31a99de" - "2.0.0": - url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-2.0.0/apache-arrow-2.0.0.tar.gz?action=download" - sha256: "be0342cc847bb340d86aeaef43596a0b6c1dbf1ede9c789a503d939e01c71fbe" - "1.0.0": - url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-1.0.0/apache-arrow-1.0.0.tar.gz?action=download" - sha256: "86ddb9feb48203a5aaf9cc4f2827525e20a2ca4d7239e492af17e74532ccf243" patches: "8.0.1": - patch_file: "patches/8.0.0-0005-install-utils.patch" @@ -66,23 +60,3 @@ patches: - patch_file: "patches/7.0.0-0007-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" - "2.0.0": - - patch_file: "patches/2.0.0-0003-fix-shared-msvc.patch" - patch_description: "make shared enabled in msvc" - patch_type: "official" - - patch_file: "patches/2.0.0-0005-gandiva-engine.patch" - patch_description: "fix grandiva compilation error" - patch_type: "official" - - patch_file: "patches/2.0.0-0008-fix-cmake.patch" - patch_description: "use cci package" - patch_type: "conan" - "1.0.0": - - patch_file: "patches/1.0.0-0003-fix-shared-msvc.patch" - patch_description: "make shared enabled in msvc" - patch_type: "official" - - patch_file: "patches/1.0.0-0005-fix-make12-namespace.patch" - patch_description: "fix ambiguous `make12` function between std and date" - patch_type: "official" - - patch_file: "patches/1.0.0-0006-fix-cmake.patch" - patch_description: "use cci package" - patch_type: "conan" diff --git a/recipes/arrow/all/patches/1.0.0-0003-fix-shared-msvc.patch b/recipes/arrow/all/patches/1.0.0-0003-fix-shared-msvc.patch deleted file mode 100644 index 3c7e86d5ff279..0000000000000 --- a/recipes/arrow/all/patches/1.0.0-0003-fix-shared-msvc.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- cpp/src/arrow/CMakeLists.txt -+++ cpp/src/arrow/CMakeLists.txt -@@ -490,6 +490,10 @@ - target_compile_definitions(arrow_static PUBLIC ARROW_STATIC) - endif() - -+if(ARROW_BUILD_SHARED AND WIN32) -+target_compile_definitions(arrow_shared PRIVATE ARROW_EXPORTING) -+endif() -+ - if(ARROW_WITH_BACKTRACE) - find_package(Backtrace) - diff --git a/recipes/arrow/all/patches/1.0.0-0005-fix-make12-namespace.patch b/recipes/arrow/all/patches/1.0.0-0005-fix-make12-namespace.patch deleted file mode 100644 index 5f0f6f4c52d5c..0000000000000 --- a/recipes/arrow/all/patches/1.0.0-0005-fix-make12-namespace.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/cpp/src/arrow/vendored/datetime/date.h b/cpp/src/arrow/vendored/datetime/date.h -index 02a4909..2b168d2 100644 ---- a/cpp/src/arrow/vendored/datetime/date.h -+++ b/cpp/src/arrow/vendored/datetime/date.h -@@ -5152,7 +5152,7 @@ to_stream(std::basic_ostream& os, const CharT* fmt, - if (modified == CharT{}) - #endif - { -- auto h = *fmt == CharT{'I'} ? make12(hms.hours()) : hms.hours(); -+ auto h = *fmt == CharT{'I'} ? arrow_vendored::date::make12(hms.hours()) : hms.hours(); - if (h < hours{10}) - os << CharT{'0'}; - os << h.count(); -@@ -5366,7 +5366,7 @@ to_stream(std::basic_ostream& os, const CharT* fmt, - save_ostream _(os); - os.fill('0'); - os.width(2); -- os << make12(tod.hours()).count() << CharT{':'}; -+ os << arrow_vendored::date::make12(tod.hours()).count() << CharT{':'}; - os.width(2); - os << tod.minutes().count() << CharT{':'}; - os.width(2); diff --git a/recipes/arrow/all/patches/1.0.0-0006-fix-cmake.patch b/recipes/arrow/all/patches/1.0.0-0006-fix-cmake.patch deleted file mode 100644 index eb6816262214b..0000000000000 --- a/recipes/arrow/all/patches/1.0.0-0006-fix-cmake.patch +++ /dev/null @@ -1,333 +0,0 @@ -diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt -index 300f043..0127a7a 100644 ---- a/cpp/CMakeLists.txt -+++ b/cpp/CMakeLists.txt -@@ -654,7 +654,7 @@ endif() - - if(ARROW_WITH_BROTLI) - # Order is important for static linking -- set(ARROW_BROTLI_LIBS Brotli::brotlienc Brotli::brotlidec Brotli::brotlicommon) -+ set(ARROW_BROTLI_LIBS brotli::brotlienc brotli::brotlidec brotli::brotlicommon) - list(APPEND ARROW_LINK_LIBS ${ARROW_BROTLI_LIBS}) - list(APPEND ARROW_STATIC_LINK_LIBS ${ARROW_BROTLI_LIBS}) - endif() -@@ -664,7 +664,7 @@ if(ARROW_WITH_BZ2) - endif() - - if(ARROW_WITH_LZ4) -- list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4) -+ list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4_static) - endif() - - if(ARROW_WITH_SNAPPY) -@@ -800,8 +800,11 @@ endif() - - if(ARROW_MIMALLOC) - add_definitions(-DARROW_MIMALLOC) -- list(APPEND ARROW_LINK_LIBS mimalloc::mimalloc) -- list(APPEND ARROW_STATIC_LINK_LIBS mimalloc::mimalloc) -+ if (TARGET mimalloc-static) -+ list(APPEND ARROW_LINK_LIBS mimalloc-static) -+ else() -+ list(APPEND ARROW_STATIC_LINK_LIBS mimalloc) -+ endif() - endif() - - # ---------------------------------------------------------------------- -diff --git a/cpp/cmake_modules/BuildUtils.cmake b/cpp/cmake_modules/BuildUtils.cmake -index eb10ebe..9c81017 100644 ---- a/cpp/cmake_modules/BuildUtils.cmake -+++ b/cpp/cmake_modules/BuildUtils.cmake -@@ -165,10 +165,10 @@ function(create_merged_static_lib output_target) - set(ar_script_path ${CMAKE_BINARY_DIR}/${ARG_NAME}.ar) - - file(WRITE ${ar_script_path}.in "CREATE ${output_lib_path}\n") -- file(APPEND ${ar_script_path}.in "ADDLIB $\n") -+ file(APPEND ${ar_script_path}.in "ADDLIB $\n") - - foreach(lib ${ARG_TO_MERGE}) -- file(APPEND ${ar_script_path}.in "ADDLIB $\n") -+ file(APPEND ${ar_script_path}.in "ADDLIB $\n") - endforeach() - - file(APPEND ${ar_script_path}.in "SAVE\nEND\n") -diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake -index 807e2b9..016c8db 100644 ---- a/cpp/cmake_modules/ThirdpartyToolchain.cmake -+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake -@@ -154,16 +154,7 @@ macro(build_dependency DEPENDENCY_NAME) - endmacro() - - macro(resolve_dependency DEPENDENCY_NAME) -- if(${DEPENDENCY_NAME}_SOURCE STREQUAL "AUTO") -- find_package(${DEPENDENCY_NAME} MODULE) -- if(NOT ${${DEPENDENCY_NAME}_FOUND}) -- build_dependency(${DEPENDENCY_NAME}) -- endif() -- elseif(${DEPENDENCY_NAME}_SOURCE STREQUAL "BUNDLED") -- build_dependency(${DEPENDENCY_NAME}) -- elseif(${DEPENDENCY_NAME}_SOURCE STREQUAL "SYSTEM") -- find_package(${DEPENDENCY_NAME} REQUIRED) -- endif() -+ find_package(${DEPENDENCY_NAME} REQUIRED) - endmacro() - - macro(resolve_dependency_with_version DEPENDENCY_NAME REQUIRED_VERSION) -@@ -765,6 +756,7 @@ endif() - # - Tests need Boost at runtime. - # - S3FS and Flight benchmarks need Boost at runtime. - if(ARROW_BUILD_INTEGRATION -+ OR ARROW_BOOST_REQUIRED - OR ARROW_BUILD_TESTS - OR ARROW_GANDIVA - OR (ARROW_FLIGHT AND ARROW_BUILD_BENCHMARKS) -@@ -785,7 +777,7 @@ if(ARROW_BOOST_REQUIRED) - elseif(BOOST_SOURCE STREQUAL "BUNDLED") - build_boost() - elseif(BOOST_SOURCE STREQUAL "SYSTEM") -- find_package(BoostAlt ${ARROW_BOOST_REQUIRED_VERSION} REQUIRED) -+ find_package(Boost ${ARROW_BOOST_REQUIRED_VERSION} REQUIRED) - endif() - - if(TARGET Boost::system) -@@ -936,11 +928,11 @@ macro(build_brotli) - endmacro() - - if(ARROW_WITH_BROTLI) -- resolve_dependency(Brotli) -+ resolve_dependency(brotli) - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(BROTLI_INCLUDE_DIR Brotli::brotlicommon -+ get_target_property(BROTLI_INCLUDE_DIR brotli::brotlicommon - INTERFACE_INCLUDE_DIRECTORIES) -- include_directories(SYSTEM ${BROTLI_INCLUDE_DIR}) -+ include_directories(SYSTEM ${brotli_INCLUDE_DIR}) - endif() - - if(PARQUET_REQUIRE_ENCRYPTION AND NOT ARROW_PARQUET) -@@ -1146,9 +1138,10 @@ if(ARROW_NEED_GFLAGS) - endif() - endif() - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR}) -+ include_directories(SYSTEM ${gflags_INCLUDE_DIR}) -+ set(GFLAGS_LIBRARIES ${gflags_LIBRARIES}) - -- if(NOT TARGET ${GFLAGS_LIBRARIES}) -+ if(0) - if(TARGET gflags-shared) - set(GFLAGS_LIBRARIES gflags-shared) - elseif(TARGET gflags_shared) -@@ -1237,12 +1230,13 @@ endmacro() - if(ARROW_WITH_THRIFT) - # We already may have looked for Thrift earlier, when considering whether - # to build Boost, so don't look again if already found. -- if(NOT Thrift_FOUND AND NOT THRIFT_FOUND) -+ if(0) - # Thrift c++ code generated by 0.13 requires 0.11 or greater - resolve_dependency_with_version(Thrift 0.11.0) - endif() -+ find_package(Thrift CONFIG REQUIRED) - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${THRIFT_INCLUDE_DIR}) -+ include_directories(SYSTEM ${Thrift_INCLUDE_DIR}) - endif() - - # ---------------------------------------------------------------------- -@@ -1407,6 +1401,7 @@ endif() - # jemalloc - Unix-only high-performance allocator - - if(ARROW_JEMALLOC) -+if(0) - message(STATUS "Building (vendored) jemalloc from source") - # We only use a vendored jemalloc as we want to control its version. - # Also our build of jemalloc is specially prefixed so that it will not -@@ -1465,12 +1460,18 @@ if(ARROW_JEMALLOC) - add_dependencies(jemalloc::jemalloc jemalloc_ep) - - list(APPEND ARROW_BUNDLED_STATIC_LIBS jemalloc::jemalloc) -+else() -+ find_package(jemalloc REQUIRED CONFIG) -+ include_directories(SYSTEM "${jemalloc_INCLUDE_DIR}") -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${jemalloc_LIBRARIES_TARGETS} ) -+endif() - endif() - - # ---------------------------------------------------------------------- - # mimalloc - Cross-platform high-performance allocator, from Microsoft - - if(ARROW_MIMALLOC) -+if(0) - message(STATUS "Building (vendored) mimalloc from source") - # We only use a vendored mimalloc as we want to control its build options. - -@@ -1518,6 +1519,11 @@ if(ARROW_MIMALLOC) - add_dependencies(toolchain mimalloc_ep) - - list(APPEND ARROW_BUNDLED_STATIC_LIBS mimalloc::mimalloc) -+else() -+ find_package(mimalloc REQUIRED CONFIG) -+ include_directories(SYSTEM "${mimalloc_INCLUDE_DIR}") -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${mimalloc_LIBRARIES_TARGETS} ) -+endif() - endif() - - # ---------------------------------------------------------------------- -@@ -1918,11 +1924,16 @@ macro(build_lz4) - endmacro() - - if(ARROW_WITH_LZ4) -- resolve_dependency(Lz4) -+ resolve_dependency(lz4) - - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(LZ4_INCLUDE_DIR LZ4::lz4 INTERFACE_INCLUDE_DIRECTORIES) -- include_directories(SYSTEM ${LZ4_INCLUDE_DIR}) -+ if(TARGET LZ4::lz4_static) -+ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_static INTERFACE_INCLUDE_DIRECTORIES) -+ else() -+ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_shared INTERFACE_INCLUDE_DIRECTORIES) -+ endif() -+ include_directories(SYSTEM ${lz4_INCLUDE_DIR}) -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${lz4_LIBRARIES_TARGETS} ) - endif() - - macro(build_zstd) -@@ -2037,10 +2048,10 @@ macro(build_re2) - endmacro() - - if(ARROW_GANDIVA) -- resolve_dependency(RE2) -+ resolve_dependency(re2) - - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(RE2_INCLUDE_DIR RE2::re2 INTERFACE_INCLUDE_DIRECTORIES) -+ get_target_property(RE2_INCLUDE_DIR re2::re2 INTERFACE_INCLUDE_DIRECTORIES) - include_directories(SYSTEM ${RE2_INCLUDE_DIR}) - endif() - -@@ -2480,17 +2491,24 @@ if(ARROW_WITH_GRPC) - endif() - - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(GRPC_INCLUDE_DIR gRPC::grpc INTERFACE_INCLUDE_DIRECTORIES) -+ # get_target_property(GRPC_INCLUDE_DIR gRPC::grpc INTERFACE_INCLUDE_DIRECTORIES) -+ if(grpc_INCLUDE_DIRS_RELEASE) -+ set(GRPC_INCLUDE_DIR ${grpc_INCLUDE_DIRS_RELEASE}) -+ elseif(grpc_INCLUDE_DIRS_DEBUG) -+ set(GRPC_INCLUDE_DIR ${grpc_INCLUDE_DIRS_DEBUG}) -+ endif() - include_directories(SYSTEM ${GRPC_INCLUDE_DIR}) -+ include_directories(SYSTEM ${absl_INCLUDE_DIR}) -+ include_directories(SYSTEM ${protobuf_INCLUDE_DIR}) - - if(GRPC_VENDORED) - set(GRPCPP_PP_INCLUDE TRUE) - else() - # grpc++ headers may reside in ${GRPC_INCLUDE_DIR}/grpc++ or ${GRPC_INCLUDE_DIR}/grpcpp - # depending on the gRPC version. -- if(EXISTS "${GRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h") -+ if(EXISTS ${GRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h) - set(GRPCPP_PP_INCLUDE TRUE) -- elseif(EXISTS "${GRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h") -+ elseif(EXISTS ${GRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h) - set(GRPCPP_PP_INCLUDE FALSE) - else() - message(FATAL_ERROR "Cannot find grpc++ headers in ${GRPC_INCLUDE_DIR}") -diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt -index 5797a78..da6bd4d 100644 ---- a/cpp/src/arrow/CMakeLists.txt -+++ b/cpp/src/arrow/CMakeLists.txt -@@ -292,10 +292,15 @@ set(ARROW_TESTING_SRCS - - set(_allocator_dependencies "") # Empty list - if(ARROW_JEMALLOC) -- list(APPEND _allocator_dependencies jemalloc_ep) -+ list(APPEND _allocator_dependencies jemalloc::jemalloc) - endif() -+ - if(ARROW_MIMALLOC) -- list(APPEND _allocator_dependencies mimalloc_ep) -+ if (TARGET mimalloc-static) -+ list(APPEND _allocator_dependencies mimalloc-static) -+ else() -+ list(APPEND _allocator_dependencies mimalloc) -+ endif() - endif() - - if(_allocator_dependencies) -diff --git a/cpp/src/arrow/memory_pool.cc b/cpp/src/arrow/memory_pool.cc -index 784bf7b..8f005a5 100644 ---- a/cpp/src/arrow/memory_pool.cc -+++ b/cpp/src/arrow/memory_pool.cc -@@ -31,7 +31,7 @@ - // Needed to support jemalloc 3 and 4 - #define JEMALLOC_MANGLE - // Explicitly link to our version of jemalloc --#include "jemalloc_ep/dist/include/jemalloc/jemalloc.h" -+#include "jemalloc/jemalloc.h" - #endif - - #ifdef ARROW_MIMALLOC -diff --git a/cpp/src/gandiva/CMakeLists.txt b/cpp/src/gandiva/CMakeLists.txt -index 85e8db6..cd70c63 100644 ---- a/cpp/src/gandiva/CMakeLists.txt -+++ b/cpp/src/gandiva/CMakeLists.txt -@@ -25,7 +25,7 @@ add_custom_target(gandiva-benchmarks) - - add_dependencies(gandiva-all gandiva gandiva-tests gandiva-benchmarks) - --find_package(LLVMAlt REQUIRED) -+find_package(LLVM REQUIRED) - - if(LLVM_VERSION_MAJOR LESS "10") - set(GANDIVA_CXX_STANDARD ${CMAKE_CXX_STANDARD}) -@@ -88,9 +88,16 @@ set(SRC_FILES - random_generator_holder.cc - ${GANDIVA_PRECOMPILED_CC_PATH}) - --set(GANDIVA_SHARED_PRIVATE_LINK_LIBS arrow_shared LLVM::LLVM_INTERFACE RE2::re2) - --set(GANDIVA_STATIC_LINK_LIBS arrow_static LLVM::LLVM_INTERFACE RE2::re2) -+ function(get_all_targets var) -+ set(targets) -+ get_all_targets_recursive(targets ${CMAKE_CURRENT_SOURCE_DIR}) -+ set(${var} ${targets} PARENT_SCOPE) -+endfunction() -+ -+set(GANDIVA_SHARED_PRIVATE_LINK_LIBS arrow_shared llvm-core::llvm-core re2::re2) -+ -+set(GANDIVA_STATIC_LINK_LIBS arrow_static llvm-core::llvm-core re2::re2) - - if(ARROW_GANDIVA_STATIC_LIBSTDCPP - AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)) -@@ -131,7 +138,7 @@ add_arrow_lib(gandiva - arrow_dependencies - precompiled - EXTRA_INCLUDES -- $ -+ $ - SHARED_LINK_FLAGS - ${GANDIVA_SHARED_LINK_FLAGS} - SHARED_LINK_LIBS -@@ -203,7 +210,7 @@ endfunction() - - set(GANDIVA_INTERNALS_TEST_ARGUMENTS) - if(WIN32) -- list(APPEND GANDIVA_INTERNALS_TEST_ARGUMENTS EXTRA_LINK_LIBS LLVM::LLVM_INTERFACE) -+ list(APPEND GANDIVA_INTERNALS_TEST_ARGUMENTS EXTRA_LINK_LIBS llvm-core::llvm-core) - endif() - add_gandiva_test(internals-test - SOURCES -@@ -225,9 +232,9 @@ add_gandiva_test(internals-test - decimal_type_util_test.cc - random_generator_holder_test.cc - EXTRA_DEPENDENCIES -- LLVM::LLVM_INTERFACE -+ llvm-core::llvm-core - EXTRA_INCLUDES -- $ -+ $ - ${GANDIVA_INTERNALS_TEST_ARGUMENTS}) - - if(ARROW_GANDIVA_JAVA) diff --git a/recipes/arrow/all/patches/2.0.0-0003-fix-shared-msvc.patch b/recipes/arrow/all/patches/2.0.0-0003-fix-shared-msvc.patch deleted file mode 100644 index f3268abf74e2c..0000000000000 --- a/recipes/arrow/all/patches/2.0.0-0003-fix-shared-msvc.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- cpp/src/arrow/CMakeLists.txt -+++ cpp/src/arrow/CMakeLists.txt -@@ -504,6 +504,10 @@ - target_compile_definitions(arrow_static PUBLIC ARROW_STATIC) - endif() - -+if(ARROW_BUILD_SHARED AND WIN32) -+target_compile_definitions(arrow_shared PRIVATE ARROW_EXPORTING) -+endif() -+ - if(ARROW_WITH_BACKTRACE) - find_package(Backtrace) - diff --git a/recipes/arrow/all/patches/2.0.0-0005-gandiva-engine.patch b/recipes/arrow/all/patches/2.0.0-0005-gandiva-engine.patch deleted file mode 100644 index 9fcc4b1a36a8a..0000000000000 --- a/recipes/arrow/all/patches/2.0.0-0005-gandiva-engine.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- cpp/src/gandiva/engine.cc -+++ cpp/src/gandiva/engine.cc -@@ -64,6 +64,10 @@ - #include - #include - -+#if GANDIVA_LLVM_VERSION >= 11 -+#include -+#endif -+ - #if defined(_MSC_VER) - #pragma warning(pop) - #endif diff --git a/recipes/arrow/all/patches/2.0.0-0008-fix-cmake.patch b/recipes/arrow/all/patches/2.0.0-0008-fix-cmake.patch deleted file mode 100644 index 7153d641e0c61..0000000000000 --- a/recipes/arrow/all/patches/2.0.0-0008-fix-cmake.patch +++ /dev/null @@ -1,273 +0,0 @@ -diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt -index 515e6af..7488161 100644 ---- a/cpp/CMakeLists.txt -+++ b/cpp/CMakeLists.txt -@@ -109,7 +109,7 @@ set(BUILD_SUPPORT_DIR "${CMAKE_SOURCE_DIR}/build-support") - set(ARROW_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") - set(ARROW_DOC_DIR "share/doc/${PROJECT_NAME}") - --set(ARROW_LLVM_VERSIONS "10" "9" "8" "7") -+set(ARROW_LLVM_VERSIONS "13" "12" "11" "10" "9" "8" "7") - list(GET ARROW_LLVM_VERSIONS 0 ARROW_LLVM_VERSION_PRIMARY) - string(REGEX - REPLACE "^([0-9]+)(\\..+)?" "\\1" ARROW_LLVM_VERSION_PRIMARY_MAJOR -@@ -667,7 +667,7 @@ endif() - - if(ARROW_WITH_BROTLI) - # Order is important for static linking -- set(ARROW_BROTLI_LIBS Brotli::brotlienc Brotli::brotlidec Brotli::brotlicommon) -+ set(ARROW_BROTLI_LIBS brotli::brotlienc brotli::brotlidec brotli::brotlicommon) - list(APPEND ARROW_LINK_LIBS ${ARROW_BROTLI_LIBS}) - list(APPEND ARROW_STATIC_LINK_LIBS ${ARROW_BROTLI_LIBS}) - if(Brotli_SOURCE STREQUAL "SYSTEM") -@@ -683,9 +683,9 @@ if(ARROW_WITH_BZ2) - endif() - - if(ARROW_WITH_LZ4) -- list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4) -+ list(APPEND ARROW_STATIC_LINK_LIBS lz4::lz4) - if(Lz4_SOURCE STREQUAL "SYSTEM") -- list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4) -+ list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS lz4::lz4) - endif() - endif() - -@@ -842,8 +842,14 @@ endif() - - if(ARROW_MIMALLOC) - add_definitions(-DARROW_MIMALLOC) -- list(APPEND ARROW_LINK_LIBS mimalloc::mimalloc) -- list(APPEND ARROW_STATIC_LINK_LIBS mimalloc::mimalloc) -+ if (TARGET mimalloc-static) -+ list(APPEND ARROW_LINK_LIBS mimalloc-static) -+ list(APPEND ARROW_STATIC_LINK_LIBS mimalloc-static) -+ else() -+ list(APPEND ARROW_LINK_LIBS mimalloc) -+ list(APPEND ARROW_STATIC_LINK_LIBS mimalloc) -+ endif() -+ - endif() - - # ---------------------------------------------------------------------- -diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake -index cc37a3c..8fe6db9 100644 ---- a/cpp/cmake_modules/ThirdpartyToolchain.cmake -+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake -@@ -171,6 +171,7 @@ macro(provide_find_module DEPENDENCY_NAME) - endmacro() - - macro(resolve_dependency DEPENDENCY_NAME) -+if(0) - set(options) - set(one_value_args REQUIRED_VERSION) - cmake_parse_arguments(ARG -@@ -207,6 +208,14 @@ macro(resolve_dependency DEPENDENCY_NAME) - provide_find_module(${DEPENDENCY_NAME}) - list(APPEND ARROW_SYSTEM_DEPENDENCIES ${DEPENDENCY_NAME}) - endif() -+else() -+ if(ARG_REQUIRED_VERSION) -+ find_package(${DEPENDENCY_NAME} ${ARG_REQUIRED_VERSION} REQUIRED) -+ else() -+ find_package(${DEPENDENCY_NAME} REQUIRED) -+ endif() -+ list(APPEND ARROW_SYSTEM_DEPENDENCIES ${DEPENDENCY_NAME}) -+endif() - endmacro() - - # ---------------------------------------------------------------------- -@@ -826,6 +835,7 @@ endif() - # - Tests need Boost at runtime. - # - S3FS and Flight benchmarks need Boost at runtime. - if(ARROW_BUILD_INTEGRATION -+ OR ARROW_BOOST_REQUIRED - OR ARROW_BUILD_TESTS - OR ARROW_GANDIVA - OR (ARROW_FLIGHT AND ARROW_BUILD_BENCHMARKS) -@@ -846,7 +856,7 @@ if(ARROW_BOOST_REQUIRED) - elseif(BOOST_SOURCE STREQUAL "BUNDLED") - build_boost() - elseif(BOOST_SOURCE STREQUAL "SYSTEM") -- find_package(BoostAlt ${ARROW_BOOST_REQUIRED_VERSION} REQUIRED) -+ find_package(Boost ${ARROW_BOOST_REQUIRED_VERSION} REQUIRED) - endif() - - if(TARGET Boost::system) -@@ -973,11 +983,11 @@ macro(build_brotli) - endmacro() - - if(ARROW_WITH_BROTLI) -- resolve_dependency(Brotli) -+ resolve_dependency(brotli) - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(BROTLI_INCLUDE_DIR Brotli::brotlicommon -+ get_target_property(BROTLI_INCLUDE_DIR brotli::brotlicommon - INTERFACE_INCLUDE_DIRECTORIES) -- include_directories(SYSTEM ${BROTLI_INCLUDE_DIR}) -+ include_directories(SYSTEM ${brotli_INCLUDE_DIR}) - endif() - - if(PARQUET_REQUIRE_ENCRYPTION AND NOT ARROW_PARQUET) -@@ -1200,9 +1210,10 @@ if(ARROW_NEED_GFLAGS) - endif() - endif() - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR}) -+ include_directories(SYSTEM ${gflags_INCLUDE_DIR}) -+ set(GFLAGS_LIBRARIES ${gflags_LIBRARIES}) - -- if(NOT TARGET ${GFLAGS_LIBRARIES}) -+ if(0) - if(TARGET gflags-shared) - set(GFLAGS_LIBRARIES gflags-shared) - elseif(TARGET gflags_shared) -@@ -1291,12 +1302,13 @@ endmacro() - if(ARROW_WITH_THRIFT) - # We already may have looked for Thrift earlier, when considering whether - # to build Boost, so don't look again if already found. -- if(NOT Thrift_FOUND AND NOT THRIFT_FOUND) -+ if(0) - # Thrift c++ code generated by 0.13 requires 0.11 or greater - resolve_dependency(Thrift REQUIRED_VERSION 0.11.0) - endif() -+ find_package(Thrift CONFIG REQUIRED) - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${THRIFT_INCLUDE_DIR}) -+ include_directories(SYSTEM ${Thrift_INCLUDE_DIR}) - endif() - - # ---------------------------------------------------------------------- -@@ -1461,6 +1473,7 @@ endif() - # jemalloc - Unix-only high-performance allocator - - if(ARROW_JEMALLOC) -+if(0) - message(STATUS "Building (vendored) jemalloc from source") - # We only use a vendored jemalloc as we want to control its version. - # Also our build of jemalloc is specially prefixed so that it will not -@@ -1519,12 +1532,18 @@ if(ARROW_JEMALLOC) - add_dependencies(jemalloc::jemalloc jemalloc_ep) - - list(APPEND ARROW_BUNDLED_STATIC_LIBS jemalloc::jemalloc) -+else() -+ find_package(jemalloc REQUIRED CONFIG) -+ include_directories(SYSTEM "${jemalloc_INCLUDE_DIR}") -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${jemalloc_LIBRARIES_TARGETS} ) -+endif() - endif() - - # ---------------------------------------------------------------------- - # mimalloc - Cross-platform high-performance allocator, from Microsoft - - if(ARROW_MIMALLOC) -+if(0) - message(STATUS "Building (vendored) mimalloc from source") - # We only use a vendored mimalloc as we want to control its build options. - -@@ -1572,6 +1591,11 @@ if(ARROW_MIMALLOC) - add_dependencies(toolchain mimalloc_ep) - - list(APPEND ARROW_BUNDLED_STATIC_LIBS mimalloc::mimalloc) -+else() -+ find_package(mimalloc REQUIRED CONFIG) -+ include_directories(SYSTEM "${mimalloc_INCLUDE_DIR}") -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${mimalloc_LIBRARIES_TARGETS} ) -+endif() - endif() - - # ---------------------------------------------------------------------- -@@ -1971,11 +1995,16 @@ macro(build_lz4) - endmacro() - - if(ARROW_WITH_LZ4) -- resolve_dependency(Lz4) -+ resolve_dependency(lz4) - - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(LZ4_INCLUDE_DIR LZ4::lz4 INTERFACE_INCLUDE_DIRECTORIES) -- include_directories(SYSTEM ${LZ4_INCLUDE_DIR}) -+ if(TARGET LZ4::lz4_static) -+ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_static INTERFACE_INCLUDE_DIRECTORIES) -+ else() -+ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_shared INTERFACE_INCLUDE_DIRECTORIES) -+ endif() -+ include_directories(SYSTEM ${lz4_INCLUDE_DIR}) -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${lz4_LIBRARIES_TARGETS} ) - endif() - - macro(build_zstd) -@@ -2090,10 +2119,10 @@ macro(build_re2) - endmacro() - - if(ARROW_GANDIVA) -- resolve_dependency(RE2) -+ resolve_dependency(re2) - - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(RE2_INCLUDE_DIR RE2::re2 INTERFACE_INCLUDE_DIRECTORIES) -+ get_target_property(RE2_INCLUDE_DIR re2::re2 INTERFACE_INCLUDE_DIRECTORIES) - include_directories(SYSTEM ${RE2_INCLUDE_DIR}) - endif() - -@@ -2541,17 +2570,24 @@ if(ARROW_WITH_GRPC) - endif() - - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(GRPC_INCLUDE_DIR gRPC::grpc INTERFACE_INCLUDE_DIRECTORIES) -+ if(grpc_INCLUDE_DIRS_RELEASE) -+ set(GRPC_INCLUDE_DIR ${grpc_INCLUDE_DIRS_RELEASE}) -+ elseif(grpc_INCLUDE_DIRS_DEBUG) -+ set(GRPC_INCLUDE_DIR ${grpc_INCLUDE_DIRS_DEBUG}) -+ endif() -+ - include_directories(SYSTEM ${GRPC_INCLUDE_DIR}) -+ include_directories(SYSTEM ${absl_INCLUDE_DIR}) -+ include_directories(SYSTEM ${protobuf_INCLUDE_DIR}) - - if(GRPC_VENDORED) - set(GRPCPP_PP_INCLUDE TRUE) - else() - # grpc++ headers may reside in ${GRPC_INCLUDE_DIR}/grpc++ or ${GRPC_INCLUDE_DIR}/grpcpp - # depending on the gRPC version. -- if(EXISTS "${GRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h") -+ if(EXISTS ${gRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h) - set(GRPCPP_PP_INCLUDE TRUE) -- elseif(EXISTS "${GRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h") -+ elseif(EXISTS ${gRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h) - set(GRPCPP_PP_INCLUDE FALSE) - else() - message(FATAL_ERROR "Cannot find grpc++ headers in ${GRPC_INCLUDE_DIR}") -diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt -index 2751254..842fc9e 100644 ---- a/cpp/src/arrow/CMakeLists.txt -+++ b/cpp/src/arrow/CMakeLists.txt -@@ -307,10 +307,14 @@ set(ARROW_TESTING_SRCS - - set(_allocator_dependencies "") # Empty list - if(ARROW_JEMALLOC) -- list(APPEND _allocator_dependencies jemalloc_ep) -+ list(APPEND _allocator_dependencies jemalloc::jemalloc) - endif() - if(ARROW_MIMALLOC) -- list(APPEND _allocator_dependencies mimalloc_ep) -+ if (TARGET mimalloc-static) -+ list(APPEND _allocator_dependencies mimalloc-static) -+ else() -+ list(APPEND _allocator_dependencies mimalloc) -+ endif() - endif() - - if(_allocator_dependencies) -diff --git a/cpp/src/arrow/memory_pool.cc b/cpp/src/arrow/memory_pool.cc -index 784bf7b..8f005a5 100644 ---- a/cpp/src/arrow/memory_pool.cc -+++ b/cpp/src/arrow/memory_pool.cc -@@ -31,7 +31,7 @@ - // Needed to support jemalloc 3 and 4 - #define JEMALLOC_MANGLE - // Explicitly link to our version of jemalloc --#include "jemalloc_ep/dist/include/jemalloc/jemalloc.h" -+#include "jemalloc/jemalloc.h" - #endif - - #ifdef ARROW_MIMALLOC diff --git a/recipes/arrow/config.yml b/recipes/arrow/config.yml index fdbc85ca26541..316731612eda2 100644 --- a/recipes/arrow/config.yml +++ b/recipes/arrow/config.yml @@ -25,7 +25,3 @@ versions: folder: all "7.0.0": folder: all - "2.0.0": - folder: all - "1.0.0": - folder: all From 10d3d7578b08bfd3413269708e87f3d4e714e179 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 21 Mar 2024 17:49:59 +0200 Subject: [PATCH 317/405] (#21911) matio: add v1.5.26, drop old versions * matio: add v1.5.26, drop old versions * matio: bump hdf5 * matio: update config.yml --- recipes/matio/all/conandata.yml | 28 ++++--------------- recipes/matio/all/conanfile.py | 2 +- .../all/patches/disable-hdf5-target.patch | 12 -------- .../patches/patch-apple-no-undefined.patch | 17 ----------- recipes/matio/config.yml | 8 ++---- 5 files changed, 9 insertions(+), 58 deletions(-) delete mode 100644 recipes/matio/all/patches/disable-hdf5-target.patch delete mode 100644 recipes/matio/all/patches/patch-apple-no-undefined.patch diff --git a/recipes/matio/all/conandata.yml b/recipes/matio/all/conandata.yml index 0850bf3d72ee4..9a389d571f858 100644 --- a/recipes/matio/all/conandata.yml +++ b/recipes/matio/all/conandata.yml @@ -1,36 +1,20 @@ sources: - "1.5.18": - url: "https://downloads.sourceforge.net/project/matio/matio/1.5.18/matio-1.5.18.tar.gz" - sha256: "5fad71a63a854d821cc6f4e8c84da837149dd5fb57e1e2baeffd85fa0f28fe25" - "1.5.19": - url: "https://downloads.sourceforge.net/project/matio/matio/1.5.19/matio-1.5.19.tar.gz" - sha256: "a4fa4d248b0414fc72f3d6155f710c470d5628d3c31af834f8d5ccf06b60286f" - "1.5.21": - url: "https://downloads.sourceforge.net/project/matio/matio/1.5.21/matio-1.5.21.tar.gz" - sha256: "21809177e55839e7c94dada744ee55c1dea7d757ddaab89605776d50122fb065" "1.5.23": url: "https://downloads.sourceforge.net/project/matio/matio/1.5.23/matio-1.5.23.tar.gz" sha256: "9f91eae661df46ea53c311a1b2dcff72051095b023c612d7cbfc09406c9f4d6e" "1.5.24": url: "https://downloads.sourceforge.net/project/matio/matio/1.5.24/matio-1.5.24.tar.gz" sha256: "5106ebed5b40d02a2bb968b57bef8876701c566e039e6ebe134bab779c436f7c" + "1.5.26": + url: "https://downloads.sourceforge.net/project/matio/matio/1.5.26/matio-1.5.26.tar.gz" + sha256: "8b47c29f58e468dba7a5555371c6a72ad4c6aa8b15f459b2b0b65a303c063933" patches: - "1.5.18": - - patch_file: "patches/require-cmake-3.10.patch" - - patch_file: "patches/disable-hdf5-target.patch" - - patch_file: "patches/patch-apple-no-undefined.patch" - - patch_file: "patches/cmake-install-bundle.patch" - "1.5.19": - - patch_file: "patches/require-cmake-3.10.patch" - - patch_file: "patches/patch-apple-no-undefined.patch" - - patch_file: "patches/cmake-install-bundle.patch" - "1.5.21": - - patch_file: "patches/require-cmake-3.10.patch" - - patch_file: "patches/patch-apple-no-undefined.patch" - - patch_file: "patches/cmake-install-bundle.patch" "1.5.23": - patch_file: "patches/require-cmake-3.10.patch" - patch_file: "patches/cmake-install-bundle.patch" "1.5.24": - patch_file: "patches/require-cmake-3.10.patch" - patch_file: "patches/cmake-install-bundle.patch" + "1.5.26": + - patch_file: "patches/require-cmake-3.10.patch" + - patch_file: "patches/cmake-install-bundle.patch" diff --git a/recipes/matio/all/conanfile.py b/recipes/matio/all/conanfile.py index 199bb98823415..74cf617347b43 100644 --- a/recipes/matio/all/conanfile.py +++ b/recipes/matio/all/conanfile.py @@ -54,7 +54,7 @@ def layout(self): def requirements(self): if self.options.with_hdf5: - self.requires("hdf5/1.14.1") + self.requires("hdf5/1.14.3") if self.options.with_zlib: self.requires("zlib/[>=1.2.11 <2]") diff --git a/recipes/matio/all/patches/disable-hdf5-target.patch b/recipes/matio/all/patches/disable-hdf5-target.patch deleted file mode 100644 index 8f9c45cb87de8..0000000000000 --- a/recipes/matio/all/patches/disable-hdf5-target.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/cmake/thirdParties.cmake -+++ b/cmake/thirdParties.cmake -@@ -29,8 +29,8 @@ if(MATIO_WITH_HDF5) - endif() - endif() - --if(HDF5_FOUND) - set(HAVE_HDF5 1) -+if(0) - add_library(HDF5::HDF5 INTERFACE IMPORTED) - if(MATIO_USE_CONAN AND TARGET CONAN_PKG::hdf5) - # target from Conan diff --git a/recipes/matio/all/patches/patch-apple-no-undefined.patch b/recipes/matio/all/patches/patch-apple-no-undefined.patch deleted file mode 100644 index 6dbb97ff53471..0000000000000 --- a/recipes/matio/all/patches/patch-apple-no-undefined.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/cmake/src.cmake -+++ b/cmake/src.cmake -@@ -37,8 +37,12 @@ if(STDINT_MSVC) - endif() - - if(NOT MSVC) -- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") -- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--retain-symbols-file,${PROJECT_SOURCE_DIR}/src/matio.sym") -+ if(APPLE) -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,error") -+ else() -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--retain-symbols-file,${PROJECT_SOURCE_DIR}/src/matio.sym") -+ endif() - endif() - - if(MATIO_SHARED) diff --git a/recipes/matio/config.yml b/recipes/matio/config.yml index 32213bb4d952d..aa1f75ac7dd6a 100644 --- a/recipes/matio/config.yml +++ b/recipes/matio/config.yml @@ -1,11 +1,7 @@ versions: - "1.5.18": + "1.5.26": folder: all - "1.5.19": - folder: all - "1.5.21": + "1.5.24": folder: all "1.5.23": folder: all - "1.5.24": - folder: all From 8ef261f37b247e2e58b7e9251bad7adb3fa6de6e Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 22 Mar 2024 01:08:45 +0900 Subject: [PATCH 318/405] (#22772) duckdb: add version 0.10.1 * duckdb: add version 0.10.0 * add bigobj * link rstrtmgr * add platform option for cross building * update 0.10.1 * link bcrypt * setting DDUCKDB_EXPLICIT_PLATFORM on cross build only Co-authored-by: Uilian Ries * remove platform option Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries --- recipes/duckdb/all/conandata.yml | 10 ++ recipes/duckdb/all/conanfile.py | 11 +- .../all/patches/0.10.1-0001-fix-cmake.patch | 118 ++++++++++++++++++ .../all/patches/0.10.1-0002-msvc-bicobj.patch | 13 ++ recipes/duckdb/config.yml | 2 + 5 files changed, 152 insertions(+), 2 deletions(-) create mode 100644 recipes/duckdb/all/patches/0.10.1-0001-fix-cmake.patch create mode 100644 recipes/duckdb/all/patches/0.10.1-0002-msvc-bicobj.patch diff --git a/recipes/duckdb/all/conandata.yml b/recipes/duckdb/all/conandata.yml index 82ad639285d87..65a6c49289818 100644 --- a/recipes/duckdb/all/conandata.yml +++ b/recipes/duckdb/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.10.1": + url: "https://github.com/duckdb/duckdb/archive/refs/tags/v0.10.1.tar.gz" + sha256: "83bd4944c070fd0bd287fbe62919fa887f35d7422ba0fa66e13d4ed098f3791a" "0.9.2": url: "https://github.com/duckdb/duckdb/archive/refs/tags/v0.9.2.tar.gz" sha256: "afff7bd925a98dc2af4039b8ab2159b0705cbf5e0ee05d97f7bb8dce5f880dc2" @@ -24,6 +27,13 @@ sources: url: "https://github.com/duckdb/duckdb/archive/refs/tags/v0.5.1.tar.gz" sha256: "3dab7ba0d0f8d024d3c73fd3d4fb8834203c31d7b0ddb1e8539ee266e11b0e9b" patches: + "0.10.1": + - patch_file: "patches/0.10.1-0001-fix-cmake.patch" + patch_description: "install static of shared library, add installation for odbc extention" + patch_type: "portability" + - patch_file: "patches/0.10.1-0002-msvc-bicobj.patch" + patch_description: "add /bigobj flag" + patch_type: "portability" "0.9.2": - patch_file: "patches/0.9.2-0001-fix-cmake.patch" patch_description: "install static of shared library, add installation for odbc extention" diff --git a/recipes/duckdb/all/conanfile.py b/recipes/duckdb/all/conanfile.py index bb764a9d7f7ea..05d51ebfbbe3b 100644 --- a/recipes/duckdb/all/conanfile.py +++ b/recipes/duckdb/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir, replace_in_file -from conan.tools.build import check_min_cppstd +from conan.tools.build import check_min_cppstd, cross_building from conan.tools.scm import Version from conan.tools.microsoft import is_msvc from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout @@ -108,7 +108,7 @@ def generate(self): tc.variables["DUCKDB_MINOR_VERSION"] = Version(self.version).minor tc.variables["DUCKDB_PATCH_VERSION"] = Version(self.version).patch tc.variables["DUCKDB_DEV_ITERATION"] = 0 - + tc.variables["OVERRIDE_GIT_DESCRIBE"] = f"v{self.version}" if "with_parquet" in self.options: tc.variables["BUILD_PARQUET_EXTENSION"] = self.options.with_parquet @@ -159,6 +159,8 @@ def generate(self): tc.variables["ENABLE_UBSAN"] = False if is_msvc(self) and not self.options.shared: tc.preprocessor_definitions["DUCKDB_API"] = "" + if Version(self.version) >= "0.10.0" and cross_building(self): + tc.variables["DUCKDB_EXPLICIT_PLATFORM"] = f"{self.settings.os}_{self.settings.arch}" tc.generate() dpes = CMakeDeps(self) @@ -211,6 +213,8 @@ def package_info(self): ] if Version(self.version) >= "0.6.0": self.cpp_info.libs.append("duckdb_fsst") + if Version(self.version) >= "0.10.0": + self.cpp_info.libs.append("duckdb_skiplistlib") if self.options.with_autocomplete: self.cpp_info.libs.append("autocomplete_extension") @@ -244,6 +248,9 @@ def package_info(self): if self.settings.os == "Windows": self.cpp_info.system_libs.append("ws2_32") + if Version(self.version) >= "0.10.0": + self.cpp_info.system_libs.extend(["rstrtmgr", "bcrypt"]) + if self.options.with_shell: binpath = os.path.join(self.package_folder, "bin") diff --git a/recipes/duckdb/all/patches/0.10.1-0001-fix-cmake.patch b/recipes/duckdb/all/patches/0.10.1-0001-fix-cmake.patch new file mode 100644 index 0000000000000..7843bec6ccf0e --- /dev/null +++ b/recipes/duckdb/all/patches/0.10.1-0001-fix-cmake.patch @@ -0,0 +1,118 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aebc060..4698e32 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -836,7 +836,7 @@ function(build_static_extension NAME PARAMETERS) + set(FILES ${ARGV}) + list(REMOVE_AT FILES 0) + add_library(${NAME}_extension STATIC ${FILES}) +- target_link_libraries(${NAME}_extension duckdb_static) ++# target_link_libraries(${NAME}_extension duckdb_static) + endfunction() + + # Internal extension register function +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index d45ae7f..c13ca96 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -92,21 +92,21 @@ else() + duckdb_fastpforlib + duckdb_skiplistlib + duckdb_mbedtls) +- ++ if(BUILD_SHARED_LIBS) + add_library(duckdb SHARED ${ALL_OBJECT_FILES}) + target_link_libraries(duckdb ${DUCKDB_LINK_LIBS}) + link_threads(duckdb) + link_extension_libraries(duckdb) +- ++ endif() + add_library(duckdb_static STATIC ${ALL_OBJECT_FILES}) + target_link_libraries(duckdb_static ${DUCKDB_LINK_LIBS}) + link_threads(duckdb_static) + link_extension_libraries(duckdb_static) +- ++ if(BUILD_SHARED_LIBS) + target_include_directories( + duckdb PUBLIC $ + $) +- ++ endif() + target_include_directories( + duckdb_static PUBLIC $ + $) +@@ -121,10 +121,18 @@ else() + DESTINATION "${INSTALL_INCLUDE_DIR}") + + endif() +- ++if(BUILD_SHARED_LIBS) + install( +- TARGETS duckdb duckdb_static ++ TARGETS duckdb + EXPORT "${DUCKDB_EXPORT_SET}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + RUNTIME DESTINATION "${INSTALL_BIN_DIR}") ++else() ++install( ++ TARGETS duckdb_static ++ EXPORT "${DUCKDB_EXPORT_SET}" ++ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ++ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" ++ RUNTIME DESTINATION "${INSTALL_BIN_DIR}") ++endif() +diff --git a/tools/odbc/CMakeLists.txt b/tools/odbc/CMakeLists.txt +index baf7823..4bef643 100644 +--- a/tools/odbc/CMakeLists.txt ++++ b/tools/odbc/CMakeLists.txt +@@ -38,6 +38,14 @@ add_library(duckdb_odbc SHARED ${ALL_OBJECT_FILES} duckdb_odbc.def) + set_target_properties(duckdb_odbc PROPERTIES DEFINE_SYMBOL "DUCKDB_ODBC_API") + target_link_libraries(duckdb_odbc ${LINK_LIB_LIST} duckdb_static) + ++install( ++ TARGETS duckdb_odbc ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ++) ++ + if(NOT CLANG_TIDY) + add_subdirectory(test) + endif() +diff --git a/tools/sqlite3_api_wrapper/CMakeLists.txt b/tools/sqlite3_api_wrapper/CMakeLists.txt +index e29c33e..fb926b5 100644 +--- a/tools/sqlite3_api_wrapper/CMakeLists.txt ++++ b/tools/sqlite3_api_wrapper/CMakeLists.txt +@@ -26,20 +26,20 @@ if(NOT AMALGAMATION_BUILD) + endif() + link_threads(sqlite3_api_wrapper_static) + +-if(NOT WIN32 AND NOT ZOS) ++if(BUILD_SHARED_LIBS AND NOT WIN32 AND NOT ZOS) + add_library(sqlite3_api_wrapper SHARED ${SQLITE_API_WRAPPER_FILES}) + target_link_libraries(sqlite3_api_wrapper duckdb ${DUCKDB_EXTRA_LINK_FLAGS}) + link_threads(sqlite3_api_wrapper) + endif() + +-include_directories(../../third_party/catch) ++# include_directories(../../third_party/catch) + +-include_directories(test/include) +-add_subdirectory(test) ++# include_directories(test/include) ++# add_subdirectory(test) + +-add_executable(test_sqlite3_api_wrapper ${SQLITE_TEST_FILES}) +-if(WIN32 OR ZOS) +- target_link_libraries(test_sqlite3_api_wrapper sqlite3_api_wrapper_static) +-else() +- target_link_libraries(test_sqlite3_api_wrapper sqlite3_api_wrapper) +-endif() ++# add_executable(test_sqlite3_api_wrapper ${SQLITE_TEST_FILES}) ++# if(WIN32 OR ZOS) ++# target_link_libraries(test_sqlite3_api_wrapper sqlite3_api_wrapper_static) ++# else() ++# target_link_libraries(test_sqlite3_api_wrapper sqlite3_api_wrapper) ++# endif() diff --git a/recipes/duckdb/all/patches/0.10.1-0002-msvc-bicobj.patch b/recipes/duckdb/all/patches/0.10.1-0002-msvc-bicobj.patch new file mode 100644 index 0000000000000..4dd0c46e33839 --- /dev/null +++ b/recipes/duckdb/all/patches/0.10.1-0002-msvc-bicobj.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aebc060..4a696b6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -508,7 +508,7 @@ if(NOT MSVC) + endif() + else() + set(CMAKE_CXX_WINDOWS_FLAGS +- "/wd4244 /wd4267 /wd4200 /wd26451 /wd26495 /D_CRT_SECURE_NO_WARNINGS /utf-8") ++ "/wd4244 /wd4267 /wd4200 /wd26451 /wd26495 /D_CRT_SECURE_NO_WARNINGS /utf-8 /bigobj") + if(TREAT_WARNINGS_AS_ERRORS) + set(CMAKE_CXX_WINDOWS_FLAGS "${CMAKE_CXX_WINDOWS_FLAGS} /WX") + endif() diff --git a/recipes/duckdb/config.yml b/recipes/duckdb/config.yml index 77e20cf10a797..60b78863eb1bb 100644 --- a/recipes/duckdb/config.yml +++ b/recipes/duckdb/config.yml @@ -1,4 +1,6 @@ versions: + "0.10.1": + folder: "all" "0.9.2": folder: "all" "0.9.0": From 1fb61063d32d21f788298ae8417a0e5cf101591a Mon Sep 17 00:00:00 2001 From: Johannes Wolf <519002+johannes-wolf@users.noreply.github.com> Date: Thu, 21 Mar 2024 17:29:59 +0100 Subject: [PATCH 319/405] (#23195) simfil: Bump 0.1.2 * simfil: Bump 0.1.2 * simfil: Add package type --- recipes/simfil/all/conandata.yml | 3 +++ recipes/simfil/all/conanfile.py | 1 + recipes/simfil/config.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/recipes/simfil/all/conandata.yml b/recipes/simfil/all/conandata.yml index f6fc491607eb0..4fa19c86dbd8c 100644 --- a/recipes/simfil/all/conandata.yml +++ b/recipes/simfil/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.1.2": + url: "https://github.com/Klebert-Engineering/simfil/archive/refs/tags/v0.1.2.tar.gz" + sha256: "a903658ff37fa304dc6d8cb65e7923b6857b825ce2ac205522b84e4785d80e8d" "0.1.1": url: "https://github.com/Klebert-Engineering/simfil/archive/refs/tags/v0.1.1.tar.gz" sha256: "e82a9d92ec65b7e27776d5507c78571cecc234f2b6fcdacc7ffcece6198f7f9a" diff --git a/recipes/simfil/all/conanfile.py b/recipes/simfil/all/conanfile.py index 7f51c69a00ce9..66a16c329cfe6 100644 --- a/recipes/simfil/all/conanfile.py +++ b/recipes/simfil/all/conanfile.py @@ -16,6 +16,7 @@ class SimfilRecipe(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/Klebert-Engineering/simfil" license = "BSD-3-Clause" + package_type = "library" topics = ["query-language", "json", "data-model"] # Binary configuration diff --git a/recipes/simfil/config.yml b/recipes/simfil/config.yml index b893ff21f7c23..eb8addc0ca6d3 100644 --- a/recipes/simfil/config.yml +++ b/recipes/simfil/config.yml @@ -1,3 +1,5 @@ versions: + "0.1.2": + folder: all "0.1.1": folder: all From b0f46b6edd1544e4c1df093e7ce622432becfbad Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 22 Mar 2024 02:09:21 +0900 Subject: [PATCH 320/405] (#23172) wasmtime-cpp: add version 18.0.0 --- recipes/wasmtime-cpp/all/conandata.yml | 3 +++ recipes/wasmtime-cpp/all/conanfile.py | 1 + recipes/wasmtime-cpp/config.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/recipes/wasmtime-cpp/all/conandata.yml b/recipes/wasmtime-cpp/all/conandata.yml index 524a7021c9bc2..35283cdf993b9 100644 --- a/recipes/wasmtime-cpp/all/conandata.yml +++ b/recipes/wasmtime-cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "18.0.0": + url: "https://github.com/bytecodealliance/wasmtime-cpp/archive/v18.0.0.tar.gz" + sha256: "94478a9465c6f766ebd7999438a89392dcb30f9fe10f772c8669dcd0b7ffbf86" "9.0.0": url: "https://github.com/bytecodealliance/wasmtime-cpp/archive/v9.0.0.tar.gz" sha256: "0ff8242a9dcbe43eb38c6a3e02be40ed585e6b88efd89092bf1b5318cb8fece1" diff --git a/recipes/wasmtime-cpp/all/conanfile.py b/recipes/wasmtime-cpp/all/conanfile.py index 9970e18861d77..9e61f74387ac9 100644 --- a/recipes/wasmtime-cpp/all/conanfile.py +++ b/recipes/wasmtime-cpp/all/conanfile.py @@ -44,6 +44,7 @@ def requirements(self): "1.0.0": "1.0.1", "6.0.0": "6.0.1", "9.0.0": "12.0.2", + "18.0.0": "18.0.3", } self.requires(f"wasmtime/{version_map.get(version, version)}") diff --git a/recipes/wasmtime-cpp/config.yml b/recipes/wasmtime-cpp/config.yml index 37168a28be705..49006a3577c70 100644 --- a/recipes/wasmtime-cpp/config.yml +++ b/recipes/wasmtime-cpp/config.yml @@ -1,4 +1,6 @@ versions: + "18.0.0": + folder: all "9.0.0": folder: all "7.0.0": From 62a7071cddcdd0934640154a3bfeebd1096548ff Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 21 Mar 2024 18:22:02 +0100 Subject: [PATCH 321/405] (#23200) [wildcards] Add new package: wilcards 1.4.0 Signed-off-by: Uilian Ries --- recipes/wildcards/all/conandata.yml | 4 ++ recipes/wildcards/all/conanfile.py | 52 +++++++++++++++++++ .../wildcards/all/test_package/CMakeLists.txt | 8 +++ .../wildcards/all/test_package/conanfile.py | 26 ++++++++++ .../all/test_package/test_package.cpp | 10 ++++ recipes/wildcards/config.yml | 3 ++ 6 files changed, 103 insertions(+) create mode 100644 recipes/wildcards/all/conandata.yml create mode 100644 recipes/wildcards/all/conanfile.py create mode 100644 recipes/wildcards/all/test_package/CMakeLists.txt create mode 100644 recipes/wildcards/all/test_package/conanfile.py create mode 100644 recipes/wildcards/all/test_package/test_package.cpp create mode 100644 recipes/wildcards/config.yml diff --git a/recipes/wildcards/all/conandata.yml b/recipes/wildcards/all/conandata.yml new file mode 100644 index 0000000000000..466e54e9a7c61 --- /dev/null +++ b/recipes/wildcards/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.4.0": + url: "https://github.com/zemasoft/wildcards/archive/refs/tags/v1.4.0.tar.gz" + sha256: "da8846215df2c1493e9796392d9e17ca2da8cfeae0f718fe1d6e0544cbcfaa0f" diff --git a/recipes/wildcards/all/conanfile.py b/recipes/wildcards/all/conanfile.py new file mode 100644 index 0000000000000..6546c04ceaf0a --- /dev/null +++ b/recipes/wildcards/all/conanfile.py @@ -0,0 +1,52 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +import os + + +required_conan_version = ">=1.52.0" + + +class PackageConan(ConanFile): + name = "wildcards" + description = "A simple C++ header-only template library implementing matching using wildcards" + license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/zemasoft/wildcards" + topics = ("template", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + 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, 11) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["WILDCARDS_BUILD_TESTS"] = False + tc.variables["WILDCARDS_BUILD_EXAMPLES"] = False + tc.generate() + + def build(self): + # INFO: Wildcards uses CMake to generate wildcards.hpp + cmake = CMake(self) + cmake.configure() + + def package(self): + copy(self, "LICENSE_1_0.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*.hpp", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/wildcards/all/test_package/CMakeLists.txt b/recipes/wildcards/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..5d849260e8ce8 --- /dev/null +++ b/recipes/wildcards/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(wildcards REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE wildcards::wildcards) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/wildcards/all/test_package/conanfile.py b/recipes/wildcards/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/wildcards/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/wildcards/all/test_package/test_package.cpp b/recipes/wildcards/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..076aaeb8e51e2 --- /dev/null +++ b/recipes/wildcards/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include + +#include "wildcards.hpp" + + +int main(void) { + wildcards::match("Hello, World!", "H*World?"); + + return EXIT_SUCCESS; +} diff --git a/recipes/wildcards/config.yml b/recipes/wildcards/config.yml new file mode 100644 index 0000000000000..c957e4bc2d3c7 --- /dev/null +++ b/recipes/wildcards/config.yml @@ -0,0 +1,3 @@ +versions: + "1.4.0": + folder: all From 1d02e99e78e4e703f334eab18476c118e2a36ba5 Mon Sep 17 00:00:00 2001 From: Ulrich Telle Date: Thu, 21 Mar 2024 19:04:25 +0100 Subject: [PATCH 322/405] (#21354) Add recipe for sqlite3mc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add recipe for sqlite3mc * Adjust recipe Remove C++ compiler options, because this library is a C library * Add CMake version requirement * Add CMake requirement to test package * Add missing header in test * Adjust according to review * Fix conan v1 related issues * Apply suggestions from code review Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com> * Remove option SQLITE_ENABLE_JSON1, add FreeBSD to os list --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com> --- recipes/sqlite3mc/all/conandata.yml | 4 + recipes/sqlite3mc/all/conanfile.py | 222 ++++++++++++++++++ .../sqlite3mc/all/test_package/CMakeLists.txt | 12 + .../sqlite3mc/all/test_package/conanfile.py | 25 ++ recipes/sqlite3mc/all/test_package/main.c | 73 ++++++ recipes/sqlite3mc/config.yml | 3 + 6 files changed, 339 insertions(+) create mode 100644 recipes/sqlite3mc/all/conandata.yml create mode 100644 recipes/sqlite3mc/all/conanfile.py create mode 100644 recipes/sqlite3mc/all/test_package/CMakeLists.txt create mode 100644 recipes/sqlite3mc/all/test_package/conanfile.py create mode 100644 recipes/sqlite3mc/all/test_package/main.c create mode 100644 recipes/sqlite3mc/config.yml diff --git a/recipes/sqlite3mc/all/conandata.yml b/recipes/sqlite3mc/all/conandata.yml new file mode 100644 index 0000000000000..462228eb46b29 --- /dev/null +++ b/recipes/sqlite3mc/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.8.0": + url: "https://github.com/utelle/SQLite3MultipleCiphers/archive/refs/tags/v1.8.0.tar.gz" + sha256: "13D9B939BEF7C7371D58A3874F83B18CF330EB2171205B3680ACDDB2215BE0E5" diff --git a/recipes/sqlite3mc/all/conanfile.py b/recipes/sqlite3mc/all/conanfile.py new file mode 100644 index 0000000000000..eddb5a88de890 --- /dev/null +++ b/recipes/sqlite3mc/all/conanfile.py @@ -0,0 +1,222 @@ +import os +from conan import ConanFile +from conan.tools.cmake import cmake_layout, CMakeDeps, CMakeToolchain, CMake +from conan.tools.files import get, copy + +required_conan_version = ">=1.53.0" + + +class sqlite3mc(ConanFile): + name = "sqlite3mc" + package_type = "library" + + license = "MIT" + homepage = "https://github.com/utelle/SQLite3MultipleCiphers" + url = "https://github.com/conan-io/conan-center-index" + description = "The project SQLite3 Multiple Ciphers implements an encryption extension for SQLite with support for multiple ciphers." + topics = ("sqlite", "sqlite3", "sqlite3-encryption", "database-encryption", "sqlite3-extension") + + settings = "os", "compiler", "build_type", "arch" + options = { + "shared": [True, False], + "fPIC": [True, False], + "require_zlib": [True, False], + "static_runtime_link": [True, False], + "build_shell": [True, False], + "with_icu": [True, False], + "enable_debug": [True, False], + "soundex": [True, False], + "enable_column_metadata": [True, False], + "secure_delete": [True, False], + "enable_fts3": [True, False], + "enable_fts3_paranthesis": [True, False], + "enable_fts4": [True, False], + "enable_fts5": [True, False], + "enable_carray": [True, False], + "enable_csv": [True, False], + "enable_extfunc": [True, False], + "enable_geopoly": [True, False], + "enable_rtree": [True, False], + "enable_uuid": [True, False], + "use_uri": [True, False], + "user_authentication": [True, False], + "enable_preupdate_hook": [True, False], + "enable_session": [True, False], + "shell_is_utf8": [True, False], + "enable_fileio": [True, False], + "enable_regexp": [True, False], + "enable_series": [True, False], + "enable_sha3": [True, False], + "enable_explain_comments": [True, False], + "enable_dbpage_vtab": [True, False], + "enable_dbstat_vtab": [True, False], + "enable_stmtvtab": [True, False], + "enable_unknown_sql_function": [True, False], + "use_miniz": [True, False], + "enable_compress": [True, False], + "enable_sqlar": [True, False], + "enable_zipfile": [True, False], + "use_sqleet_legacy": [True, False], + "use_sqlcipher_legacy": [True, False], + "secure_memory": [True, False], + "use_random_fill_memory": [True, False], + "omit_aes_hardware_support": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "require_zlib": False, + "static_runtime_link": False, + "build_shell": False, + "with_icu": False, + "enable_debug": False, + "soundex": True, + "enable_column_metadata": True, + "secure_delete": True, + "enable_fts3": True, + "enable_fts3_paranthesis": True, + "enable_fts4": True, + "enable_fts5": True, + "enable_carray": True, + "enable_csv": True, + "enable_extfunc": True, + "enable_geopoly": True, + "enable_rtree": True, + "enable_uuid": True, + "use_uri": True, + "user_authentication": True, + "enable_preupdate_hook": False, + "enable_session": False, + "shell_is_utf8": True, + "enable_fileio": True, + "enable_regexp": True, + "enable_series": True, + "enable_sha3": True, + "enable_explain_comments": True, + "enable_dbpage_vtab": True, + "enable_dbstat_vtab": True, + "enable_stmtvtab": True, + "enable_unknown_sql_function": True, + "use_miniz": False, + "enable_compress": False, + "enable_sqlar": False, + "enable_zipfile": False, + "use_sqleet_legacy": False, + "use_sqlcipher_legacy": False, + "secure_memory": False, + "use_random_fill_memory": False, + "omit_aes_hardware_support": False + } + + def build_requirements(self): + self.tool_requires("cmake/[>=3.24 <4]") + + 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 source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + if self.options.require_zlib: + self.requires("zlib/[>=1.2.11 <2]") + if self.options.with_icu: + self.requires("icu/74.1") + + def generate(self): + deps = CMakeDeps(self) + deps.generate() + + tc = CMakeToolchain(self) + tc.variables["_SQLITE3MC_REQUIRE_ZLIB"] = self.options.require_zlib + tc.variables["SQLITE3MC_STATIC_RUNTIME_LINK"] = self.options.static_runtime_link + tc.variables["SQLITE3MC_STATIC"] = not self.options.shared + tc.variables["SQLITE3MC_BUILD_SHELL"] = self.options.build_shell + tc.variables["SQLITE3MC_WITH_ICU"] = self.options.with_icu + + tc.variables["SQLITE_ENABLE_DEBUG"] = self.options.enable_debug + tc.variables["SQLITE_SOUNDEX"] = self.options.soundex + tc.variables["SQLITE_ENABLE_COLUMN_METADATA"] = self.options.enable_column_metadata + tc.variables["SQLITE_SECURE_DELETE"] = self.options.secure_delete + tc.variables["SQLITE_ENABLE_FTS3"] = self.options.enable_fts3 + tc.variables["SQLITE_ENABLE_FTS3_PARENTHESIS"] = self.options.enable_fts3_paranthesis + tc.variables["SQLITE_ENABLE_FTS4"] = self.options.enable_fts4 + tc.variables["SQLITE_ENABLE_FTS5"] = self.options.enable_fts5 + + tc.variables["SQLITE_ENABLE_CARRAY"] = self.options.enable_carray + tc.variables["SQLITE_ENABLE_CSV"] = self.options.enable_csv + tc.variables["SQLITE_ENABLE_EXTFUNC"] = self.options.enable_extfunc + tc.variables["SQLITE_ENABLE_GEOPOLY"] = self.options.enable_geopoly + tc.variables["SQLITE_ENABLE_RTREE"] = self.options.enable_rtree + tc.variables["SQLITE_ENABLE_UUID"] = self.options.enable_uuid + tc.variables["SQLITE_USE_URI"] = self.options.use_uri + tc.variables["SQLITE_USER_AUTHENTICATION"] = self.options.user_authentication + tc.variables["SQLITE_ENABLE_PREUPDATE_HOOK"] = self.options.enable_preupdate_hook + tc.variables["SQLITE_ENABLE_SESSION"] = self.options.enable_session + tc.variables["SQLITE_SHELL_IS_UTF8"] = self.options.shell_is_utf8 + + # Options for library only + tc.variables["SQLITE_ENABLE_FILEIO"] = self.options.enable_fileio + tc.variables["SQLITE_ENABLE_REGEXP"] = self.options.enable_regexp + tc.variables["SQLITE_ENABLE_SERIES"] = self.options.enable_series + tc.variables["SQLITE_ENABLE_SHA3"] = self.options.enable_sha3 + + # Options for shell only (compatibility with official SQLite shell) + tc.variables["SQLITE_ENABLE_EXPLAIN_COMMENTS"] = self.options.enable_explain_comments + tc.variables["SQLITE_ENABLE_DBPAGE_VTAB"] = self.options.enable_dbpage_vtab + tc.variables["SQLITE_ENABLE_DBSTAT_VTAB"] = self.options.enable_dbstat_vtab + tc.variables["SQLITE_ENABLE_STMTVTAB"] = self.options.enable_stmtvtab + tc.variables["SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION"] = self.options.enable_unknown_sql_function + + # Embedded Compression + tc.variables["SQLITE3MC_USE_MINIZ"] = self.options.use_miniz + + # Compression/Options that require ZLIB + tc.variables["SQLITE_ENABLE_COMPRESS"] = self.options.enable_compress + tc.variables["SQLITE_ENABLE_SQLAR"] = self.options.enable_sqlar + tc.variables["SQLITE_ENABLE_ZIPFILE"] = self.options.enable_zipfile + + # Legacy Encryption Extensions + tc.variables["SQLITE3MC_USE_SQLEET_LEGACY"] = self.options.use_sqleet_legacy + tc.variables["SQLITE3MC_USE_SQLCIPHER_LEGACY"] = self.options.use_sqlcipher_legacy + + # Additional memory security (filling freed memory allocations with zeros or random data) + tc.variables["SQLITE3MC_SECURE_MEMORY"] = self.options.secure_memory + tc.variables["SQLITE3MC_USE_RANDOM_FILL_MEMORY"] = self.options.use_random_fill_memory + + # Omit AES hardware support + tc.variables["SQLITE3MC_OMIT_AES_HARDWARE_SUPPORT"] = self.options.omit_aes_hardware_support + + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + cmake = CMake(self) + cmake.install() + copy(self, "LICENSE*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"), keep_path=False) + + def package_info(self): + if self.options.shared: + self.cpp_info.libs = ["sqlite3mc"] + else: + self.cpp_info.libs = ["sqlite3mc_static"] + if self.settings.os in ("Linux", "FreeBSD", "Macos"): + self.cpp_info.system_libs.append("pthread") + self.cpp_info.system_libs.append("dl") + self.cpp_info.system_libs.append("m") + if self.settings.os == "Macos": + self.cpp_info.frameworks.append("Security") diff --git a/recipes/sqlite3mc/all/test_package/CMakeLists.txt b/recipes/sqlite3mc/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..79301e1094eb1 --- /dev/null +++ b/recipes/sqlite3mc/all/test_package/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 3.15) +project(test_sqlite3mc C) + +find_package(sqlite3mc REQUIRED) + +add_executable(${PROJECT_NAME} + main.c +) + +target_link_libraries(${PROJECT_NAME} + sqlite3mc::sqlite3mc +) diff --git a/recipes/sqlite3mc/all/test_package/conanfile.py b/recipes/sqlite3mc/all/test_package/conanfile.py new file mode 100644 index 0000000000000..1b70bb597a5da --- /dev/null +++ b/recipes/sqlite3mc/all/test_package/conanfile.py @@ -0,0 +1,25 @@ +import os +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run + + +class sqlite3mcTest(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def layout(self): + cmake_layout(self) + + def test(self): + if can_run(self): + cmd = os.path.join(self.cpp.build.bindir, "test_sqlite3mc") + self.run(cmd, env="conanrun") diff --git a/recipes/sqlite3mc/all/test_package/main.c b/recipes/sqlite3mc/all/test_package/main.c new file mode 100644 index 0000000000000..efb9f3b4c701d --- /dev/null +++ b/recipes/sqlite3mc/all/test_package/main.c @@ -0,0 +1,73 @@ +#include +#include +#include + +int main(int argc, char *argv[]) +{ + sqlite3 *db; + const char *key = "password"; + const char *wrongKey = "wrongPassword"; + + // Create database + int rc = sqlite3_open("test.db", &db); + if (rc != SQLITE_OK) + { + fprintf(stderr, "Failed to open database: %s\n", sqlite3_errmsg(db)); + sqlite3_close(db); + return 1; + } + + // Encrypt + sqlite3_key(db, key, strlen(key)); + + // Fill db with some data and close it + rc = sqlite3_exec(db, "CREATE TABLE users (name TEXT NOT NULL, ID INTEGER PRIMARY KEY UNIQUE)", NULL, NULL, NULL); + if (rc != SQLITE_OK) + { + fprintf(stderr, "SQL error: %s\n", sqlite3_errmsg(db)); + sqlite3_close(db); + return 1; + } + rc = sqlite3_exec(db, "INSERT INTO users (name, ID) VALUES ('testUser', '12345')", NULL, NULL, NULL); + if (rc != SQLITE_OK) + { + fprintf(stderr, "SQL error: %s\n", sqlite3_errmsg(db)); + sqlite3_close(db); + return 1; + } + rc = sqlite3_close(db); + if (rc != SQLITE_OK) + { + fprintf(stderr, "Failed to close database: %s\n", sqlite3_errmsg(db)); + return 1; + } + + // Reopen and provide wrong key + rc = sqlite3_open("test.db", &db); + if (rc != SQLITE_OK) + { + fprintf(stderr, "Failed to open database: %s\n", sqlite3_errmsg(db)); + sqlite3_close(db); + return 1; + } + sqlite3_key(db, wrongKey, strlen(wrongKey)); + + // Try to access the database, should fail + rc = sqlite3_exec(db, "SELECT name FROM users WHERE ID = '12345'", NULL, NULL, NULL); + if (rc == SQLITE_OK) + { + fprintf(stderr, "Access was provided without the proper key\n"); + sqlite3_close(db); + return 1; + } + rc = sqlite3_close(db); + if (rc != SQLITE_OK) + { + fprintf(stderr, "Failed to close database: %s\n", sqlite3_errmsg(db)); + return 1; + } + + + fprintf(stdout, "Test successful\n"); + return 0; +} diff --git a/recipes/sqlite3mc/config.yml b/recipes/sqlite3mc/config.yml new file mode 100644 index 0000000000000..4d72270a88048 --- /dev/null +++ b/recipes/sqlite3mc/config.yml @@ -0,0 +1,3 @@ +versions: + "1.8.0": + folder: all From c1cf27410afbb80d98c41316e583082c1229fd9b Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Thu, 21 Mar 2024 18:09:29 -0500 Subject: [PATCH 323/405] (#23204) libunwind: Bump xz_utils to avoid a dependency conflict in cpython Fixes a conflicting dependency in #20528. --- recipes/libunwind/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libunwind/all/conanfile.py b/recipes/libunwind/all/conanfile.py index 002c9bf613f23..7980721bda607 100644 --- a/recipes/libunwind/all/conanfile.py +++ b/recipes/libunwind/all/conanfile.py @@ -53,7 +53,7 @@ def layout(self): def requirements(self): if self.options.minidebuginfo: - self.requires("xz_utils/5.4.5") + self.requires("xz_utils/5.6.1") if self.options.zlibdebuginfo: self.requires("zlib/[>=1.2.11 <2]") From dcf57227962a1f140bb2d875baf945b0ecf7ce40 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Fri, 22 Mar 2024 10:06:10 +0100 Subject: [PATCH 324/405] (#22695) zint: use version range for libpng * zint: bump libpng * zint: use version range for libpng --------- Co-authored-by: Daniel --- recipes/zint/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/zint/all/conanfile.py b/recipes/zint/all/conanfile.py index f9c54ff2b86cf..c582bdfe4e8e1 100644 --- a/recipes/zint/all/conanfile.py +++ b/recipes/zint/all/conanfile.py @@ -49,7 +49,7 @@ def layout(self): def requirements(self): if self.options.with_libpng: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") self.requires("zlib/[>=1.2.11 <2]") if self.options.with_qt: self.requires("qt/5.15.10") From 2af167e4c024005364ee8e2deccfcd6047c04a4e Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 22 Mar 2024 18:48:05 +0900 Subject: [PATCH 325/405] (#23208) sfl: add version 1.3.1 --- recipes/sfl/all/conandata.yml | 3 +++ recipes/sfl/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/sfl/all/conandata.yml b/recipes/sfl/all/conandata.yml index b4d8ce3303e28..121900e615afb 100644 --- a/recipes/sfl/all/conandata.yml +++ b/recipes/sfl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.1": + url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.3.1.tar.gz" + sha256: "e541857067ae3e6c8d9933736e70ef92c1ce0a0e374872497328edd2e4e47ae9" "1.3.0": url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.3.0.tar.gz" sha256: "1d0e797c5e11bbc861f9f1ae8eb7d9378d456d6cd1c43e00cdec6d3664e745e6" diff --git a/recipes/sfl/config.yml b/recipes/sfl/config.yml index 5f304ccdf5f5a..6afe808172f22 100644 --- a/recipes/sfl/config.yml +++ b/recipes/sfl/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.1": + folder: "all" "1.3.0": folder: "all" "1.2.4": From ef502a87eea01b23cd15711404ac80a82fe9b63c Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Fri, 22 Mar 2024 12:15:57 +0100 Subject: [PATCH 326/405] (#22136) opencv: add version 4.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * opencv: add version 4.9.0 * bump deps * bump deps * Fix issue with quirc * Set quirc to false for old versions * use version range for libpng --------- Co-authored-by: Rubén Rincón Blanco --- recipes/opencv/4.x/conandata.yml | 27 +++++++++++++++++++++++++++ recipes/opencv/4.x/conanfile.py | 14 +++++++++++--- recipes/opencv/config.yml | 2 ++ 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/recipes/opencv/4.x/conandata.yml b/recipes/opencv/4.x/conandata.yml index 523e50b3b56b9..d536778d0cf88 100644 --- a/recipes/opencv/4.x/conandata.yml +++ b/recipes/opencv/4.x/conandata.yml @@ -1,4 +1,9 @@ sources: + "4.9.0": + - url: "https://github.com/opencv/opencv/archive/refs/tags/4.9.0.tar.gz" + sha256: "ddf76f9dffd322c7c3cb1f721d0887f62d747b82059342213138dc190f28bc6c" + - url: "https://github.com/opencv/opencv_contrib/archive/refs/tags/4.9.0.tar.gz" + sha256: "8952c45a73b75676c522dd574229f563e43c271ae1d5bbbd26f8e2b6bc1a4dae" "4.8.1": - url: "https://github.com/opencv/opencv/archive/refs/tags/4.8.1.tar.gz" sha256: "62f650467a60a38794d681ae7e66e3e8cfba38f445e0bf87867e2f2cdc8be9d5" @@ -20,6 +25,28 @@ sources: - url: "https://github.com/opencv/opencv_contrib/archive/refs/tags/4.1.2.tar.gz" sha256: "0f6c3d30baa39e3e7611afb481ee86dea45dafb182cac87d570c95dccd83eb8b" patches: + "4.9.0": + - patch_file: "patches/4.5.5-0001-find-openexr.patch" + patch_description: "Robust discovery & injection of OpenEXR" + patch_type: "conan" + - patch_file: "patches/4.5.5-0003-find-quirc.patch" + patch_description: "Robust discovery & injection of quirc" + patch_type: "conan" + - patch_file: "patches/4.8.1-0001-find-ade.patch" + patch_description: "Robust discovery & injection of ade" + patch_type: "conan" + - patch_file: "patches/4.5.1-0001-tracking-no-plot-deps.patch" + patch_description: "Fix requirements of tracking module" + patch_type: "conan" + - patch_file: "patches/4.1.2-0006-hdf.patch" + patch_description: "Robust discovery of hdf" + patch_type: "conan" + - patch_file: "patches/4.5.2-0001-fix-zlib-static-android.patch" + patch_description: "Fix discovery of zlib static if Android" + patch_type: "conan" + - patch_file: "patches/4.1.2-0007-android-install-layout.patch" + patch_description: "Honor install layout from conan if Android" + patch_type: "conan" "4.8.1": - patch_file: "patches/4.5.5-0001-find-openexr.patch" patch_description: "Robust discovery & injection of OpenEXR" diff --git a/recipes/opencv/4.x/conanfile.py b/recipes/opencv/4.x/conanfile.py index 0d5396ed1027e..4f868f3cc469f 100644 --- a/recipes/opencv/4.x/conanfile.py +++ b/recipes/opencv/4.x/conanfile.py @@ -203,7 +203,7 @@ class OpenCVConan(ConanFile): "with_msmf": True, "with_msmf_dxva": True, # objdetect module options - "with_quirc": True, + "with_quirc": False, # videoio module options "with_ffmpeg": True, "with_v4l": False, @@ -351,6 +351,9 @@ def config_options(self): if not self._has_with_wayland_option: self.options.with_gtk = True + if Version(self.version) >= "4.9": + self.options.with_quirc = True + @property def _opencv_modules(self): def imageformats_deps(): @@ -1119,7 +1122,7 @@ def requirements(self): elif self.options.get_safe("with_jpeg2000") == "openjpeg": self.requires("openjpeg/2.5.2") if self.options.get_safe("with_png"): - self.requires("libpng/1.6.43") + self.requires("libpng/[>=1.6 <2]") if self.options.get_safe("with_openexr"): self.requires("openexr/3.2.3") if self.options.get_safe("with_tiff"): @@ -1238,6 +1241,10 @@ def _patch_sources(self): replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "ANDROID OR NOT UNIX", "FALSE") replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "elseif(EMSCRIPTEN)", "elseif(QNXNTO)\nelseif(EMSCRIPTEN)") + if self.options.with_quirc: + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "add_subdirectory(3rdparty/quirc)", "# add_subdirectory(3rdparty/quirc)") + + ## Fix link to several dependencies replace_in_file(self, os.path.join(self.source_folder, "modules", "imgcodecs", "CMakeLists.txt"), "JASPER_", "Jasper_") replace_in_file(self, os.path.join(self.source_folder, "modules", "imgcodecs", "CMakeLists.txt"), "${GDAL_LIBRARY}", "GDAL::GDAL") @@ -1411,10 +1418,11 @@ def generate(self): tc.variables["WITH_OPENNI"] = False tc.variables["WITH_OPENNI2"] = False tc.variables["WITH_OPENVX"] = False + tc.variables["WITH_CAROTENE"] = False tc.variables["WITH_PLAIDML"] = False tc.variables["WITH_PVAPI"] = False tc.variables["WITH_QT"] = self.options.get_safe("with_qt", False) - tc.variables["WITH_QUIRC"] = False + tc.variables["WITH_QUIRC"] = self.options.get_safe("with_quirc", False) tc.variables["WITH_V4L"] = self.options.get_safe("with_v4l", False) tc.variables["WITH_VA"] = False tc.variables["WITH_VA_INTEL"] = False diff --git a/recipes/opencv/config.yml b/recipes/opencv/config.yml index 443d5e91a8125..42e7008ac9ec0 100644 --- a/recipes/opencv/config.yml +++ b/recipes/opencv/config.yml @@ -1,4 +1,6 @@ versions: + "4.9.0": + folder: "4.x" "4.8.1": folder: "4.x" "4.5.5": From 9c9cdfb517e5fb658c0883f3558567c3410ba1f7 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 22 Mar 2024 12:41:52 +0100 Subject: [PATCH 327/405] (#23209) [minicoro] Add include folder as namespace Signed-off-by: Uilian Ries --- recipes/minicoro/all/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/minicoro/all/conanfile.py b/recipes/minicoro/all/conanfile.py index de0be35811b00..77385609248b9 100644 --- a/recipes/minicoro/all/conanfile.py +++ b/recipes/minicoro/all/conanfile.py @@ -32,8 +32,9 @@ def build(self): def package(self): copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) - copy(self, "*.h", self.source_folder, os.path.join(self.package_folder, "include")) + copy(self, "*.h", self.source_folder, os.path.join(self.package_folder, "include", "minicoro")) def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] + self.cpp_info.includedirs.append(os.path.join("include", "minicoro")) From fad10d521456364518e3a7a7648a3eea1e5189b7 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 22 Mar 2024 13:01:38 +0100 Subject: [PATCH 328/405] (#23210) [wildcards] Add include folder as namespace Signed-off-by: Uilian Ries --- recipes/wildcards/all/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/wildcards/all/conanfile.py b/recipes/wildcards/all/conanfile.py index 6546c04ceaf0a..ea532ea715b2a 100644 --- a/recipes/wildcards/all/conanfile.py +++ b/recipes/wildcards/all/conanfile.py @@ -45,8 +45,9 @@ def build(self): def package(self): copy(self, "LICENSE_1_0.txt", 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, "*.hpp", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder, "include", "wildcards")) def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] + self.cpp_info.includedirs.append(os.path.join("include", "wildcards")) From 31cb46771d0650831d81c212140b4d2a2e915508 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Fri, 22 Mar 2024 07:23:34 -0500 Subject: [PATCH 329/405] (#20346) libinput: Add recipe * libinput: Add recipe * Link transitively to both libevdev and mtdev * Revert "Link transitively to both libevdev and mtdev" This reverts commit 20d94b13d7007a924fa839feec838090e21286c5. * Remove comment * Disable debug_gui by default to reduce default number of dependencies * Fix error in the test package * Update * Bump eudev version * Remove comment and only require wayland when debug_gui is enabled --- recipes/libinput/all/conandata.yml | 4 + recipes/libinput/all/conanfile.py | 125 ++++++++++++++++++ .../libinput/all/test_package/conanfile.py | 32 +++++ recipes/libinput/all/test_package/meson.build | 5 + .../libinput/all/test_package/test_package.c | 54 ++++++++ recipes/libinput/config.yml | 3 + 6 files changed, 223 insertions(+) create mode 100644 recipes/libinput/all/conandata.yml create mode 100644 recipes/libinput/all/conanfile.py create mode 100644 recipes/libinput/all/test_package/conanfile.py create mode 100644 recipes/libinput/all/test_package/meson.build create mode 100644 recipes/libinput/all/test_package/test_package.c create mode 100644 recipes/libinput/config.yml diff --git a/recipes/libinput/all/conandata.yml b/recipes/libinput/all/conandata.yml new file mode 100644 index 0000000000000..541bad5e261c8 --- /dev/null +++ b/recipes/libinput/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.25.0": + url: "https://gitlab.freedesktop.org/libinput/libinput/-/archive/1.25.0/libinput-1.25.0.tar.bz2" + sha256: "193bd592298bd9e369c0ef3e5d83a6a9d68ddc4cd3dfc84bbe77920a8d0d57df" diff --git a/recipes/libinput/all/conanfile.py b/recipes/libinput/all/conanfile.py new file mode 100644 index 0000000000000..fe4a2b2983462 --- /dev/null +++ b/recipes/libinput/all/conanfile.py @@ -0,0 +1,125 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rmdir +from conan.tools.gnu import PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson, MesonToolchain +import os + + +required_conan_version = ">=1.53.0" + + +class LibinputConan(ConanFile): + name = "libinput" + description = "libinput is a library that handles input devices for display servers and other applications that need to directly deal with input devices." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.freedesktop.org/wiki/Software/libinput/" + topics = ("device", "display", "event", "input") + package_type = "shared-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "epoll_dir": [None, "ANY"], + "debug_gui": [True, False], + "with_libudev": ["eudev", "systemd"], + "with_libwacom": [True, False], + "with_wayland": [True, False], + "with_x11": [True, False], + } + default_options = { + "epoll_dir": None, + "debug_gui": False, + "with_libudev": "systemd", + # todo Package libwacom and enable this option by default. + "with_libwacom": False, + "with_wayland": True, + "with_x11": True, + } + + def configure(self): + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + if not self.options.debug_gui: + self.options.rm_safe("with_wayland") + self.options.rm_safe("with_x11") + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("mtdev/1.1.6") + self.requires("libevdev/1.13.1") + + if self.options.debug_gui: + self.requires("cairo/1.18.0") + self.requires("glib/2.78.3") + self.requires("gtk/system") + if self.options.with_wayland: + self.requires("wayland/1.22.0") + self.requires("wayland-protocols/1.33") + if self.options.with_x11: + self.requires("xorg/system") + + if self.options.with_libudev == "systemd": + self.requires("libudev/system", transitive_libs=True) + elif self.options.with_libudev == "eudev": + self.requires("eudev/3.2.14", transitive_libs=True) + + def validate(self): + if self.settings.os not in ["FreeBSD", "Linux"]: + raise ConanInvalidConfiguration(f"{self.ref} is not supported on {self.settings.os}.") + if self.options.with_libwacom: + raise ConanInvalidConfiguration(f"The with_libwacom option for {self.ref} is not yet supported. Contributions welcome.") + + def build_requirements(self): + self.tool_requires("meson/1.3.2") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.1.0") + if self.options.debug_gui and self.options.get_safe("with_wayland"): + self.tool_requires("wayland/") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = MesonToolchain(self) + tc.project_options["coverity"] = False + tc.project_options["datadir"] = "res" + tc.project_options["documentation"] = False + tc.project_options["epoll-dir"] = '' if self.options.epoll_dir is None else str(self.options.epoll_dir) + tc.project_options["debug-gui"] = self.options.debug_gui + tc.project_options["install-tests"] = False + # Change libexecdir so that the libinput subdirectory in the bin directory doesn't conflict with the libinput executable. + tc.project_options["libexecdir"] = "libexec" + tc.project_options["libwacom"] = self.options.with_libwacom + tc.project_options["tests"] = False + tc.generate() + tc = PkgConfigDeps(self) + tc.generate() + tc = VirtualBuildEnv(self) + tc.generate() + + def build(self): + meson = Meson(self) + meson.configure() + meson.build() + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + meson = Meson(self) + meson.install() + + copy(self, f"{self.name}-*", os.path.join(self.package_folder, "libexec", self.name), os.path.join(self.package_folder, "bin")) + rmdir(self, os.path.join(self.package_folder, "libexec")) + + rmdir(self, os.path.join(self.package_folder, "etc")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "res", "zsh")) + rmdir(self, os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.libs = ["input"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["m", "rt"]) diff --git a/recipes/libinput/all/test_package/conanfile.py b/recipes/libinput/all/test_package/conanfile.py new file mode 100644 index 0000000000000..cdcf9b281723d --- /dev/null +++ b/recipes/libinput/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.3.2") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.1.0") + + 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/libinput/all/test_package/meson.build b/recipes/libinput/all/test_package/meson.build new file mode 100644 index 0000000000000..2dea5d2c4a326 --- /dev/null +++ b/recipes/libinput/all/test_package/meson.build @@ -0,0 +1,5 @@ +project('test_package', 'c') +package_dep = dependency('libinput') +executable('test_package', + sources : ['test_package.c'], + dependencies : [package_dep]) diff --git a/recipes/libinput/all/test_package/test_package.c b/recipes/libinput/all/test_package/test_package.c new file mode 100644 index 0000000000000..6a8e1e6d99fe9 --- /dev/null +++ b/recipes/libinput/all/test_package/test_package.c @@ -0,0 +1,54 @@ +#include +#include +#include +#include +#include + +#include +#include + +static int +open_restricted(const char *path, int flags, void *user_data) +{ + int fd = open(path, flags); + return fd < 0 ? -1 : fd; +} + +static void +close_restricted(int fd, void *user_data) +{ + close(fd); +} + +static const struct libinput_interface interface = { + .open_restricted = open_restricted, + .close_restricted = close_restricted, +}; + +int main(void) { + bool grab = false; + struct libinput *li; + struct udev *udev = udev_new(); + if (!udev) { + fprintf(stderr, "Failed to initialize udev\n"); + return EXIT_FAILURE; + } + + li = libinput_udev_create_context(&interface, &grab, udev); + if (!li) { + fprintf(stderr, "Failed to initialize libinput context from udev\n"); + udev_unref(udev); + return EXIT_FAILURE; + } + + if (libinput_udev_assign_seat(li, "seat0")) { + fprintf(stderr, "Failed to set seat\n"); + libinput_unref(li); + li = NULL; + udev_unref(udev); + return EXIT_FAILURE; + } + + udev_unref(udev); + return EXIT_SUCCESS; +} diff --git a/recipes/libinput/config.yml b/recipes/libinput/config.yml new file mode 100644 index 0000000000000..3f07e920910b2 --- /dev/null +++ b/recipes/libinput/config.yml @@ -0,0 +1,3 @@ +versions: + "1.25.0": + folder: all From 67fc9c7ae2bfcad8cdc9cf062f280b98abdd5347 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Fri, 22 Mar 2024 11:46:45 -0500 Subject: [PATCH 330/405] (#22920) dbus: Bump expat and glib dependencies to minimize conflicts The expat dependency must be bumped to not conflict with wayland. Additionally, glib/2.78.1 and glib/2.78.3 are used much more than glib/2.77.0. I went with glib/2.78.3 since it is newer and also required in the Qt packages. Bump build dependencies as well. --- recipes/dbus/1.x.x/conanfile.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/dbus/1.x.x/conanfile.py b/recipes/dbus/1.x.x/conanfile.py index c20fd3f03b189..cd719ddcf771f 100644 --- a/recipes/dbus/1.x.x/conanfile.py +++ b/recipes/dbus/1.x.x/conanfile.py @@ -67,9 +67,9 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("expat/2.5.0") + self.requires("expat/2.6.0") if self.options.with_glib: - self.requires("glib/2.77.0") + self.requires("glib/2.78.3") if self.options.get_safe("with_systemd"): self.requires("libsystemd/253.6") if self.options.with_selinux: @@ -82,9 +82,9 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} requires at least gcc 7.") def build_requirements(self): - self.tool_requires("meson/1.2.0") + self.tool_requires("meson/1.3.2") if not self.conf.get("tools.gnu:pkg_config",check_type=str): - self.tool_requires("pkgconf/1.9.5") + self.tool_requires("pkgconf/2.1.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 05244134cbc5969cf20bec22434d060c995488b2 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 22 Mar 2024 19:06:54 +0200 Subject: [PATCH 331/405] (#22926) liblzf: avoid WINDOWS_EXPORT_ALL_SYMBOLS --- recipes/liblzf/all/CMakeLists.txt | 13 +++++-------- recipes/liblzf/all/conanfile.py | 7 ++++--- recipes/liblzf/all/liblzf.def | 3 +++ 3 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 recipes/liblzf/all/liblzf.def diff --git a/recipes/liblzf/all/CMakeLists.txt b/recipes/liblzf/all/CMakeLists.txt index a501b15938468..c20ae859c1770 100644 --- a/recipes/liblzf/all/CMakeLists.txt +++ b/recipes/liblzf/all/CMakeLists.txt @@ -2,8 +2,9 @@ cmake_minimum_required(VERSION 3.15) project(liblzf LANGUAGES C) add_library(liblzf - src/lzf_c.c - src/lzf_d.c + lzf_c.c + lzf_d.c + liblzf.def ) set_target_properties(liblzf PROPERTIES OUTPUT_NAME lzf) @@ -20,14 +21,10 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU") target_compile_options(liblzf PRIVATE "-funroll-all-loops") endif() -set_target_properties(liblzf PROPERTIES - WINDOWS_EXPORT_ALL_SYMBOLS ON - PUBLIC_HEADER src/lzf.h -) - +include(GNUInstallDirs) install(TARGETS liblzf RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) +install(FILES lzf.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/recipes/liblzf/all/conanfile.py b/recipes/liblzf/all/conanfile.py index 70d2ac9f7171b..0796e45c4ac60 100644 --- a/recipes/liblzf/all/conanfile.py +++ b/recipes/liblzf/all/conanfile.py @@ -29,7 +29,8 @@ class LiblzfConan(ConanFile): } def export_sources(self): - copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + copy(self, "CMakeLists.txt", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) + copy(self, "liblzf.def", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) export_conandata_patches(self) def config_options(self): @@ -55,11 +56,11 @@ def generate(self): def build(self): apply_conandata_patches(self) cmake = CMake(self) - cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + cmake.configure() cmake.build() def package(self): - copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() diff --git a/recipes/liblzf/all/liblzf.def b/recipes/liblzf/all/liblzf.def new file mode 100644 index 0000000000000..2d8efa48df7f7 --- /dev/null +++ b/recipes/liblzf/all/liblzf.def @@ -0,0 +1,3 @@ +EXPORTS + lzf_compress + lzf_decompress From 4f59f50211a8bc1353ec5750008c738940032122 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 22 Mar 2024 19:27:38 +0200 Subject: [PATCH 332/405] (#23175) nvcloth: migrate to Conan v2 * nvcloth: migrate to Conan v2 * nvcloth: restore the CMakeLists.txt wrapper --- recipes/nvcloth/1.1.6/CMakeLists.txt | 10 +- recipes/nvcloth/1.1.6/conandata.yml | 3 - recipes/nvcloth/1.1.6/conanfile.py | 219 ++++++++---------- .../nvcloth/1.1.6/test_package/CMakeLists.txt | 8 +- .../nvcloth/1.1.6/test_package/conanfile.py | 24 +- .../1.1.6/test_v1_package/CMakeLists.txt | 8 + .../1.1.6/test_v1_package/conanfile.py | 16 ++ 7 files changed, 147 insertions(+), 141 deletions(-) create mode 100644 recipes/nvcloth/1.1.6/test_v1_package/CMakeLists.txt create mode 100644 recipes/nvcloth/1.1.6/test_v1_package/conanfile.py diff --git a/recipes/nvcloth/1.1.6/CMakeLists.txt b/recipes/nvcloth/1.1.6/CMakeLists.txt index a236130272a84..4cd8eda7866f8 100644 --- a/recipes/nvcloth/1.1.6/CMakeLists.txt +++ b/recipes/nvcloth/1.1.6/CMakeLists.txt @@ -1,7 +1,5 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) +# Using a CMake wrapper because the project's CMakeLists.txt does not set project() +cmake_minimum_required(VERSION 3.15) +project(cmake_wrapper CXX) -include(conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) - -add_subdirectory("source_subfolder/NvCloth/compiler/cmake/${TARGET_BUILD_PLATFORM}") +add_subdirectory("src/NvCloth/compiler/cmake/${TARGET_BUILD_PLATFORM}") diff --git a/recipes/nvcloth/1.1.6/conandata.yml b/recipes/nvcloth/1.1.6/conandata.yml index c37596cc7f7b6..657fa6c95ca38 100644 --- a/recipes/nvcloth/1.1.6/conandata.yml +++ b/recipes/nvcloth/1.1.6/conandata.yml @@ -5,8 +5,5 @@ sources: patches: "1.1.6": - patch_file: "patches/0001-PsAllocator-include-typeinfo.patch" - base_path: "source_subfolder" - patch_file: "patches/0002-CallbackFix.patch" - base_path: "source_subfolder" - patch_file: "patches/0003-PsAllocator.patch" - base_path: "source_subfolder" diff --git a/recipes/nvcloth/1.1.6/conanfile.py b/recipes/nvcloth/1.1.6/conanfile.py index c303576ad28c2..abfae884a66d8 100644 --- a/recipes/nvcloth/1.1.6/conanfile.py +++ b/recipes/nvcloth/1.1.6/conanfile.py @@ -1,175 +1,152 @@ import os import shutil -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration -from conan.tools.microsoft import msvc_runtime_flag, is_msvc_static_runtime, is_msvc +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 Environment +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir +from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime + +required_conan_version = ">=1.53.0" -required_conan_version = ">=1.35.0" class NvclothConan(ConanFile): name = "nvcloth" + description = "NvCloth is a library that provides low level access to a cloth solver designed for realtime interactive applications." license = "Nvidia Source Code License (1-Way Commercial)" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/NVIDIAGameWorks/NvCloth" - description = "NvCloth is a library that provides low level access to a cloth solver designed for realtime interactive applications." topics = ("physics", "physics-engine", "physics-simulation", "game-development", "cuda") - # Binary configuration - settings = "os", "compiler", "build_type", "arch" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], "use_cuda": [True, False], - "use_dx11": [True, False] + "use_dx11": [True, False], } default_options = { "shared": False, "fPIC": True, "use_cuda": False, - "use_dx11": False + "use_dx11": False, } - generators = "cmake" + def export_sources(self): + export_conandata_patches(self) + copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) - @property - def _source_subfolder(self): - return "source_subfolder" + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC - @property - def _build_subfolder(self): - return "build_subfolder" - - def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") - def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) - def validate(self): - if self.settings.os not in ["Windows", "Linux", "Macos", "Android", "iOS"]: - raise ConanInvalidConfiguration("Current os is not supported") + if self.settings.os not in ["Windows", "Linux", "FreeBSD", "Macos", "Android", "iOS"]: + raise ConanInvalidConfiguration(f"{self.settings.os} is not supported") - build_type = self.settings.build_type - if build_type not in ["Debug", "RelWithDebInfo", "Release"]: - raise ConanInvalidConfiguration("Current build_type is not supported") + if self.settings.os in ["Windows", "Macos"] and not self.options.shared: + raise ConanInvalidConfiguration(f"Static builds are not supported on {self.settings.os}") + if self.settings.os in ["iOS", "Android"] and self.options.shared: + raise ConanInvalidConfiguration(f"Shared builds are not supported on {self.settings.os}") - if is_msvc(self) and tools.Version(self.settings.compiler.version) < 9: - raise ConanInvalidConfiguration("Visual Studio versions < 9 are not supported") + if self.settings.build_type not in ["Debug", "RelWithDebInfo", "Release"]: + raise ConanInvalidConfiguration(f"{self.settings.build_type} build_type is not supported") - def _configure_cmake(self): - cmake = CMake(self) - if not self.options.shared: - cmake.definitions["PX_STATIC_LIBRARIES"] = 1 - cmake.definitions["STATIC_WINCRT"] = is_msvc_static_runtime(self) + check_min_vs(self, 150) + check_min_cppstd(self, 11) - cmake.definitions["NV_CLOTH_ENABLE_CUDA"] = self.options.use_cuda - cmake.definitions["NV_CLOTH_ENABLE_DX11"] = self.options.use_dx11 + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) - cmake.definitions["TARGET_BUILD_PLATFORM"] = self._get_target_build_platform() + @property + def _target_build_platform(self): + return { + "Windows": "windows", + "Linux": "linux", + "Macos": "mac", + "Android": "android", + "iOS": "ios", + }.get(str(self.settings.os)) + + def generate(self): + tc = CMakeToolchain(self) + if not self.options.shared: + tc.variables["PX_STATIC_LIBRARIES"] = 1 + tc.variables["STATIC_WINCRT"] = is_msvc_static_runtime(self) + tc.variables["NV_CLOTH_ENABLE_CUDA"] = self.options.use_cuda + tc.variables["NV_CLOTH_ENABLE_DX11"] = self.options.use_dx11 + tc.variables["TARGET_BUILD_PLATFORM"] = self._target_build_platform + tc.generate() + + env = Environment() + env.define_path("GW_DEPS_ROOT", self.source_folder) + env.vars(self).save_script("conan_build_vars") - cmake.configure( - build_folder=os.path.join(self.build_folder, self._build_subfolder) - ) - return cmake - def _remove_samples(self): - tools.rmdir(os.path.join(self._source_subfolder, "NvCloth", "samples")) + rmdir(self, os.path.join(self.source_folder, "NvCloth", "samples")) def _patch_sources(self): # There is no reason to force consumer of PhysX public headers to use one of # NDEBUG or _DEBUG, since none of them relies on NDEBUG or _DEBUG - tools.replace_in_file(os.path.join(self.build_folder, self._source_subfolder, "PxShared", "include", "foundation", "PxPreprocessor.h"), - "#error Exactly one of NDEBUG and _DEBUG needs to be defined!", - "// #error Exactly one of NDEBUG and _DEBUG needs to be defined!") - shutil.copy( - os.path.join(self.build_folder, self._source_subfolder, "NvCloth/include/NvCloth/Callbacks.h"), - os.path.join(self.build_folder, self._source_subfolder, "NvCloth/include/NvCloth/Callbacks.h.origin") - ) - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) - - if self.settings.build_type == "Debug": - shutil.copy( - os.path.join(self.build_folder, self._source_subfolder, "NvCloth/include/NvCloth/Callbacks.h"), - os.path.join(self.build_folder, self._source_subfolder, "NvCloth/include/NvCloth/Callbacks.h.patched") - ) - shutil.copy( - os.path.join(self.build_folder, self._source_subfolder, "NvCloth/include/NvCloth/Callbacks.h.origin"), - os.path.join(self.build_folder, self._source_subfolder, "NvCloth/include/NvCloth/Callbacks.h") - ) - - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC + replace_in_file(self, os.path.join(self.source_folder, "PxShared", "include", "foundation", "PxPreprocessor.h"), + "#error Exactly one of NDEBUG and _DEBUG needs to be defined!", + "// #error Exactly one of NDEBUG and _DEBUG needs to be defined!") + shutil.copy(os.path.join(self.source_folder, "NvCloth", "include", "NvCloth", "Callbacks.h"), + os.path.join(self.source_folder, "NvCloth", "include", "NvCloth", "Callbacks.h.origin")) + apply_conandata_patches(self) - def configure(self): - if self.options.shared: - del self.options.fPIC + if self.settings.build_type == "Debug": + shutil.copy(os.path.join(self.source_folder, "NvCloth", "include", "NvCloth", "Callbacks.h"), + os.path.join(self.source_folder, "NvCloth", "include", "NvCloth", "Callbacks.h.patched")) + shutil.copy(os.path.join(self.source_folder, "NvCloth", "include", "NvCloth", "Callbacks.h.origin"), + os.path.join(self.source_folder, "NvCloth", "include", "NvCloth", "Callbacks.h")) def build(self): - with tools.environment_append({"GW_DEPS_ROOT": os.path.abspath(self._source_subfolder)}): - self._patch_sources() - self._remove_samples() - cmake = self._configure_cmake() - cmake.build() - - def _get_build_type(self): - if self.settings.build_type == "Debug": - return "debug" - elif self.settings.build_type == "RelWithDebInfo": - return "checked" - elif self.settings.build_type == "Release": - return "release" - - def _get_target_build_platform(self): - return { - "Windows" : "windows", - "Linux" : "linux", - "Macos" : "mac", - "Android" : "android", - "iOS" : "ios" - }.get(str(self.settings.os)) + self._patch_sources() + self._remove_samples() + cmake = CMake(self) + cmake.configure(build_script_folder=self.source_path.parent) + cmake.build() def package(self): if self.settings.build_type == "Debug": - shutil.copy( - os.path.join(self._source_subfolder, "NvCloth/include/NvCloth/Callbacks.h.patched"), - os.path.join(self._source_subfolder, "NvCloth/include/NvCloth/Callbacks.h") - ) - nvcloth_source_subfolder = os.path.join(self.build_folder, self._source_subfolder) - nvcloth_build_subfolder = os.path.join(self.build_folder, self._build_subfolder) - - self.copy(pattern="NvCloth/license.txt", dst="licenses", src=nvcloth_source_subfolder, keep_path=False) - self.copy("*.h", dst="include", src=os.path.join(nvcloth_source_subfolder, "NvCloth", "include")) - self.copy("*.h", dst="include", src=os.path.join(nvcloth_source_subfolder, "NvCloth", "extensions", "include")) - self.copy("*.h", dst="include", src=os.path.join(nvcloth_source_subfolder, "PxShared", "include")) - self.copy("*.a", dst="lib", src=nvcloth_build_subfolder, keep_path=False) - self.copy("*.lib", dst="lib", src=nvcloth_build_subfolder, keep_path=False) - self.copy("*.dylib*", dst="lib", src=nvcloth_build_subfolder, keep_path=False) - self.copy("*.dll", dst="bin", src=nvcloth_build_subfolder, keep_path=False) - self.copy("*.so", dst="lib", src=nvcloth_build_subfolder, keep_path=False) + shutil.copy(os.path.join(self.source_folder, "NvCloth", "include", "NvCloth", "Callbacks.h.patched"), + os.path.join(self.source_folder, "NvCloth", "include", "NvCloth", "Callbacks.h")) + copy(self, "NvCloth/license.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder, keep_path=False) + copy(self, "*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "NvCloth", "include")) + copy(self, "*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "NvCloth", "extensions", "include")) + copy(self, "*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "PxShared", "include")) + copy(self, "*.a", dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False) + copy(self, "*.lib", dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False) + copy(self, "*.dylib*", dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False) + copy(self, "*.dll", dst=os.path.join(self.package_folder, "bin"), src=self.build_folder, keep_path=False) + copy(self, "*.so", dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False) def package_info(self): - self.cpp_info.names["cmake_find_package"] = "nvcloth" - self.cpp_info.names["cmake_find_package_multi"] = "nvcloth" + self.cpp_info.set_property("cmake_file_name", "nvcloth") + self.cpp_info.set_property("cmake_target_name", "nvcloth::nvcloth") if self.settings.build_type == "Debug": debug_suffix = "DEBUG" else: debug_suffix = "" - if self.settings.os == "Windows": - if self.settings.arch == "x86_64": - arch_suffix = "x64" - else: - arch_suffix = "" - self.cpp_info.libs = ["NvCloth{}_{}".format(debug_suffix, arch_suffix)] + if self.settings.os == "Windows" and self.settings.arch == "x86_64": + arch_suffix = "_x64" else: - self.cpp_info.libs = ["NvCloth{}".format(debug_suffix)] + arch_suffix = "" - if not self.options.shared: - if self.settings.os in ("FreeBSD", "Linux"): - self.cpp_info.system_libs.append("m") + self.cpp_info.libs = [f"NvCloth{debug_suffix}{arch_suffix}"] + + if self.settings.os in ("FreeBSD", "Linux"): + self.cpp_info.system_libs.append("m") diff --git a/recipes/nvcloth/1.1.6/test_package/CMakeLists.txt b/recipes/nvcloth/1.1.6/test_package/CMakeLists.txt index e0165aeedb7a2..d8a9e2773d7d6 100644 --- a/recipes/nvcloth/1.1.6/test_package/CMakeLists.txt +++ b/recipes/nvcloth/1.1.6/test_package/CMakeLists.txt @@ -1,10 +1,10 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +find_package(nvcloth REQUIRED CONFIG) find_package(nvcloth REQUIRED nvcloth CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} nvcloth::nvcloth) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/nvcloth/1.1.6/test_package/conanfile.py b/recipes/nvcloth/1.1.6/test_package/conanfile.py index e290e81a631fa..ef5d7042163ec 100644 --- a/recipes/nvcloth/1.1.6/test_package/conanfile.py +++ b/recipes/nvcloth/1.1.6/test_package/conanfile.py @@ -1,9 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools -class NvClothTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -11,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/nvcloth/1.1.6/test_v1_package/CMakeLists.txt b/recipes/nvcloth/1.1.6/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/nvcloth/1.1.6/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/nvcloth/1.1.6/test_v1_package/conanfile.py b/recipes/nvcloth/1.1.6/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..e290e81a631fa --- /dev/null +++ b/recipes/nvcloth/1.1.6/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +import os +from conans import ConanFile, CMake, tools + +class NvClothTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 056e2bd6044e6f7784fe304d8ca5ae633c302ec3 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 22 Mar 2024 19:45:36 +0200 Subject: [PATCH 333/405] (#21971) jom: add v1.1.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * jom: add v1.1.4 * jom: move license URL to conandata.yml * jom: fix license URL Co-authored-by: Rubén Rincón Blanco --------- Co-authored-by: Rubén Rincón Blanco --- recipes/jom/all/conandata.yml | 15 +++++++++++++-- recipes/jom/all/conanfile.py | 4 ++-- recipes/jom/config.yml | 2 ++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/recipes/jom/all/conandata.yml b/recipes/jom/all/conandata.yml index 0fe464cf0c395..0b87aa433e46a 100644 --- a/recipes/jom/all/conandata.yml +++ b/recipes/jom/all/conandata.yml @@ -1,4 +1,15 @@ sources: + "1.1.4": + x86_64: + url: "http://download.qt.io/official_releases/jom/jom_1_1_4.zip" + sha256: "d533c1ef49214229681e90196ed2094691e8c4a0a0bef0b2c901debcb562682b" + license: + url: "https://code.qt.io/cgit/qt-labs/jom.git/plain/LICENSE.GPL?h=v1.1.3" + sha256: "d3d9052b838761dbe00067168ed9ebc437734d53ebf71dea1c8e9f7532a5333b" "1.1.3": - sha256: "128fdd846fe24f8594eed37d1d8929a0ea78df563537c0c1b1861a635013fff8" - url: "http://download.qt.io/official_releases/jom/jom_1_1_3.zip" + x86_64: + url: "http://download.qt.io/official_releases/jom/jom_1_1_3.zip" + sha256: "128fdd846fe24f8594eed37d1d8929a0ea78df563537c0c1b1861a635013fff8" + license: + url: "https://code.qt.io/cgit/qt-labs/jom.git/plain/LICENSE.GPL?h=v1.1.3" + sha256: "d3d9052b838761dbe00067168ed9ebc437734d53ebf71dea1c8e9f7532a5333b" diff --git a/recipes/jom/all/conanfile.py b/recipes/jom/all/conanfile.py index 4962bc3e3e42f..6605c75c3ffa3 100644 --- a/recipes/jom/all/conanfile.py +++ b/recipes/jom/all/conanfile.py @@ -30,8 +30,8 @@ def source(self): pass def build(self): - get(self, **self.conan_data["sources"][self.version]) - download(self, f"https://code.qt.io/cgit/qt-labs/jom.git/plain/LICENSE.GPL?h=v{self.version}", filename="LICENSE.GPL") + get(self, **self.conan_data["sources"][self.version]["x86_64"]) + download(self, **self.conan_data["sources"][self.version]["license"], filename="LICENSE.GPL") def package(self): copy(self, "LICENSE.GPL", self.build_folder, os.path.join(self.package_folder, "licenses")) diff --git a/recipes/jom/config.yml b/recipes/jom/config.yml index e1c4f3be24983..7f3d713ab8481 100644 --- a/recipes/jom/config.yml +++ b/recipes/jom/config.yml @@ -1,3 +1,5 @@ versions: + "1.1.4": + folder: all "1.1.3": folder: all From 168a7ad6bcca8b5dc95602303b4f9df9a0fc0cc7 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 23 Mar 2024 03:07:52 +0900 Subject: [PATCH 334/405] (#23211) glaze: add version 2.3.2 --- recipes/glaze/all/conandata.yml | 3 +++ recipes/glaze/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index a4694a9ba80d2..a322f0ae53c98 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.3.2": + url: "https://github.com/stephenberry/glaze/archive/v2.3.2.tar.gz" + sha256: "360c1eab71afb69d59cc0f0e180d6b214653950340ac267a464a18c81dac585a" "2.3.1": url: "https://github.com/stephenberry/glaze/archive/v2.3.1.tar.gz" sha256: "941bf3f8cea5b6a024895d37dceaaaa82071a9178af63e9935a1d9fd80caa451" diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index 808f5a655fa9c..17c7299a3f149 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,6 @@ versions: + "2.3.2": + folder: all "2.3.1": folder: all "2.3.0": From c5b0f5e6a1f3efc5556d805464d10ea9c01f8ac4 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 23 Mar 2024 03:27:21 +0900 Subject: [PATCH 335/405] (#23212) wasmer: add version 4.2.7 --- recipes/wasmer/all/conandata.yml | 27 +++++++++++++++++++++++++++ recipes/wasmer/config.yml | 2 ++ 2 files changed, 29 insertions(+) diff --git a/recipes/wasmer/all/conandata.yml b/recipes/wasmer/all/conandata.yml index 17a89f2c17e7b..88b147bfcf235 100644 --- a/recipes/wasmer/all/conandata.yml +++ b/recipes/wasmer/all/conandata.yml @@ -1,4 +1,31 @@ sources: + "4.2.7": + Windows: + "x86_64": + "Visual Studio": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.7/wasmer-windows-amd64.tar.gz" + sha256: "5e429450a997e9a23b4efb7ad1bfb57a8c4a77436ce2a0c7c160c26576a42562" + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.7/wasmer-windows-gnu64.tar.gz" + sha256: "82061836fe79e2d52710ebb48fdffbd82910663ac1bae5bb13e72e6e1a7f0a46" + Linux: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.7/wasmer-linux-amd64.tar.gz" + sha256: "7fb9c34c42d31cd7ffed956d0e98d620b5fde0c5fccf9af5e58b9177664e25b1" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.7/wasmer-linux-aarch64.tar.gz" + sha256: "5915f617f966cdedd0fe18f26237ef04701c6475c34e5b1cd2ffc0f6e84ffd3a" + Macos: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.7/wasmer-darwin-amd64.tar.gz" + sha256: "29748cdf51ecd11d10cc819bc568820e6267d658d495f08f4af7b90cf3bd0a35" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.7/wasmer-darwin-arm64.tar.gz" + sha256: "65de621cd931acee76e09505bda28d71b6d955a6b33481ae1251280f0f26ebfc" "4.2.5": Windows: "x86_64": diff --git a/recipes/wasmer/config.yml b/recipes/wasmer/config.yml index 4c7ede684889d..7d131c7cb3eea 100644 --- a/recipes/wasmer/config.yml +++ b/recipes/wasmer/config.yml @@ -1,4 +1,6 @@ versions: + "4.2.7": + folder: "all" "4.2.5": folder: "all" "4.2.0": From f4b52e83bc2d79c3dcf4c983d845d8e9b064312a Mon Sep 17 00:00:00 2001 From: Sil3ntStorm Date: Fri, 22 Mar 2024 23:04:28 +0100 Subject: [PATCH 336/405] (#20999) fix(openssl): remove renaming of debug files within the recipe --- recipes/openssl/1.x.x/conanfile.py | 9 ++------- recipes/openssl/3.x.x/conanfile.py | 11 ++--------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/recipes/openssl/1.x.x/conanfile.py b/recipes/openssl/1.x.x/conanfile.py index 073a01dcd3cdc..55815e5161b53 100644 --- a/recipes/openssl/1.x.x/conanfile.py +++ b/recipes/openssl/1.x.x/conanfile.py @@ -539,10 +539,6 @@ def package(self): with chdir(self, self.source_folder): self.run(f"nmake -f Makefile install_sw DESTDIR={self.package_folder}") rm(self, "*.pdb", self.package_folder, recursive=True) - if self.settings.build_type == "Debug": - with chdir(self, os.path.join(self.package_folder, "lib")): - rename(self, "libssl.lib", "libssld.lib") - rename(self, "libcrypto.lib", "libcryptod.lib") else: autotools = Autotools(self) with chdir(self, self.source_folder): @@ -619,9 +615,8 @@ def package_info(self): self.cpp_info.components["ssl"].set_property("cmake_target_name", "OpenSSL::SSL") self.cpp_info.components["ssl"].set_property("pkg_config_name", "libssl") if self._use_nmake: - libsuffix = "d" if self.settings.build_type == "Debug" else "" - self.cpp_info.components["ssl"].libs = ["libssl" + libsuffix] - self.cpp_info.components["crypto"].libs = ["libcrypto" + libsuffix] + self.cpp_info.components["ssl"].libs = ["libssl"] + self.cpp_info.components["crypto"].libs = ["libcrypto"] else: self.cpp_info.components["ssl"].libs = ["ssl"] self.cpp_info.components["crypto"].libs = ["crypto"] diff --git a/recipes/openssl/3.x.x/conanfile.py b/recipes/openssl/3.x.x/conanfile.py index 975619cd1b911..f1a5c603e6eeb 100644 --- a/recipes/openssl/3.x.x/conanfile.py +++ b/recipes/openssl/3.x.x/conanfile.py @@ -554,12 +554,6 @@ def package(self): for filename in files: if fnmatch.fnmatch(filename, "*.pdb"): os.unlink(os.path.join(self.package_folder, root, filename)) - if self._use_nmake: - if self.settings.build_type == "Debug": - with chdir(self, os.path.join(self.package_folder, "lib")): - rename(self, "libssl.lib", "libssld.lib") - rename(self, "libcrypto.lib", "libcryptod.lib") - if self.options.shared: libdir = os.path.join(self.package_folder, "lib") for file in os.listdir(libdir): @@ -649,9 +643,8 @@ def package_info(self): self.cpp_info.components["crypto"].set_property("cmake_build_modules", [self._module_file_rel_path]) if self._use_nmake: - libsuffix = "d" if self.settings.build_type == "Debug" else "" - self.cpp_info.components["ssl"].libs = ["libssl" + libsuffix] - self.cpp_info.components["crypto"].libs = ["libcrypto" + libsuffix] + self.cpp_info.components["ssl"].libs = ["libssl"] + self.cpp_info.components["crypto"].libs = ["libcrypto"] else: self.cpp_info.components["ssl"].libs = ["ssl"] self.cpp_info.components["crypto"].libs = ["crypto"] From 3079044c0f725f9d8f47e2995d736a2daaf63dc0 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 23 Mar 2024 09:23:44 +0200 Subject: [PATCH 337/405] (#18891) openvdb: migrate to Conan v2 * openvdb: migrate to Conan v2 * openvdb: the patch is no longer required * openvdb: add v8.2.0 Newer versions require considerable amounts of memory to build, probably too much for the CI. More than 1.5 GB per core. * openvdb: bump deps, use cache_variables * openvdb: remove broken minimum TBB version check * openvdb: enable v9, v10, expose all available options, fix imath use * openvdb: add and disable use_explicit_instantiation to limit memory usage during build * openvdb: disable options not available in older versions * openvdb: require flex and bison for build_ax * openvdb: backport a bugfix for a build issue * openvdb: bump versions * openvdb: openexr requires transitive_libs=True * openvdb: use imath instead of openexr for newer versions * openvdb: use strict version checking * openvdb: set use_imath_half=True To fix error LNK2001: unresolved external symbol "__declspec(dllimport) private: static unsigned short const * const half::_eLut" etc on MSVC. * openvdb: bump deps * openvdb: add v10.1.0 * openvdb: drop v8.0.1 * openvdb: add v11.0.0 * openvdb: fix C++ standard in test_package * openvdb: drop v8 * openvdb: enable log4cplus by default, bump deps * openvdb: deprecation warning for with_exr * openvdb: disable log4cplus * openvdb: don't need cache_variables --- recipes/openvdb/all/CMakeLists.txt | 7 - recipes/openvdb/all/conandata.yml | 16 +- recipes/openvdb/all/conanfile.py | 374 ++++++++++-------- .../patches/0001-Find-packages-fixes.patch | 14 - .../openvdb/all/test_package/CMakeLists.txt | 13 +- recipes/openvdb/all/test_package/conanfile.py | 19 +- .../all/test_v1_package/CMakeLists.txt | 8 + .../openvdb/all/test_v1_package/conanfile.py | 17 + recipes/openvdb/config.yml | 6 +- 9 files changed, 274 insertions(+), 200 deletions(-) delete mode 100644 recipes/openvdb/all/CMakeLists.txt delete mode 100644 recipes/openvdb/all/patches/0001-Find-packages-fixes.patch create mode 100644 recipes/openvdb/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/openvdb/all/test_v1_package/conanfile.py diff --git a/recipes/openvdb/all/CMakeLists.txt b/recipes/openvdb/all/CMakeLists.txt deleted file mode 100644 index b71c882d9d33f..0000000000000 --- a/recipes/openvdb/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/openvdb/all/conandata.yml b/recipes/openvdb/all/conandata.yml index 902318df1e3ae..35817586160ea 100644 --- a/recipes/openvdb/all/conandata.yml +++ b/recipes/openvdb/all/conandata.yml @@ -1,8 +1,10 @@ sources: - "8.0.1": - url: "https://github.com/AcademySoftwareFoundation/openvdb/archive/refs/tags/v8.0.1.tar.gz" - sha256: "a6845da7c604d2c72e4141c898930ac8a2375521e535f696c2cd92bebbe43c4f" -patches: - "8.0.1": - - patch_file: "patches/0001-Find-packages-fixes.patch" - base_path: "source_subfolder" + "11.0.0": + url: "https://github.com/AcademySoftwareFoundation/openvdb/archive/refs/tags/v11.0.0.tar.gz" + sha256: "6314ff1db057ea90050763e7b7d7ed86d8224fcd42a82cdbb9c515e001b96c74" + "10.1.0": + url: "https://github.com/AcademySoftwareFoundation/openvdb/archive/refs/tags/v10.1.0.tar.gz" + sha256: "2746236e29659a0d35ab90d832f7c7987dd2537587a1a2f9237d9c98afcd5817" + "9.1.0": + url: "https://github.com/AcademySoftwareFoundation/openvdb/archive/refs/tags/v9.1.0.tar.gz" + sha256: "914ee417b4607c75c95b53bc73a0599de4157c7d6a32e849e80f24e40fb64181" diff --git a/recipes/openvdb/all/conanfile.py b/recipes/openvdb/all/conanfile.py index 10e73dc4150e4..3aa277005044c 100644 --- a/recipes/openvdb/all/conanfile.py +++ b/recipes/openvdb/all/conanfile.py @@ -1,11 +1,16 @@ -from conan.tools.microsoft import is_msvc -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration -import functools import os +import re + +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.env import VirtualBuildEnv +from conan.tools.files import copy, get, rm, replace_in_file +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version - -required_conan_version = ">=1.45.0" +required_conan_version = ">=1.53.0" class OpenVDBConan(ConanFile): @@ -16,232 +21,281 @@ class OpenVDBConan(ConanFile): "manipulation of sparse volumetric data discretized on three-dimensional grids." ) license = "MPL-2.0" - topics = ("voxel", "voxelizer", "volume-rendering", "fx") - homepage = "https://github.com/AcademySoftwareFoundation/openvdb" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/AcademySoftwareFoundation/openvdb" + topics = ("voxel", "voxelizer", "volume-rendering", "fx", "vdb") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], + "build_ax": [True, False], + "simd": [None, "SSE42", "AVX"], + "use_colored_output": [True, False], + "use_delayed_loading": [True, False], + "use_explicit_instantiation": [True, False], + "use_imath_half": [True, False], "with_blosc": [True, False], - "with_zlib": [True, False], + # Deprecated because EXR is only used when building executables, which the recipe does not support + "with_exr": ["deprecated", True, False], "with_log4cplus": [True, False], - "with_exr": [True, False], - "simd": [None, "SSE42", "AVX"], + "with_zlib": [True, False], } default_options = { "shared": False, "fPIC": True, + "build_ax": False, + "simd": None, + "use_colored_output": False, + "use_delayed_loading": False, + "use_explicit_instantiation": False, + "use_imath_half": True, "with_blosc": True, + "with_exr": "deprecated", + "with_log4cplus": False, # Disabled by default because it is not compatible with C++17 "with_zlib": True, - "with_log4cplus": False, - "with_exr": False, - "simd": None, } - - generators = "cmake", "cmake_find_package" - - @property - def _source_subfolder(self): - return "source_subfolder" + options_description = { + "build_ax": "Build the OpenVDB AX library.", + "simd": ( + "Choose whether to enable SIMD compiler flags or not. " + "Although not required, it is strongly recommended to enable SIMD. AVX implies SSE42." + ), + "use_colored_output": "Always produce ANSI-colored output (GNU/Clang only).", + "use_delayed_loading": "Build the core OpenVDB library with delayed-loading.", + "use_explicit_instantiation": ( + "Use explicit instantiation for all supported classes and methods against a pre-defined " + "list of OpenVDB trees. This makes the core library larger and slower to compile, but speeds up " + "the compilation of all dependent code by bypassing the expensive template instantiation. " + "Disabled by default in ConanCenter to avoid excessive memory usage during compilation." + ), + "use_imath_half": ( + "Use the definition of half-precision floating point types from the Imath library. " + "If False, the embedded definition provided by OpenVDB is used. " + "You may set this to on to force Imath half to be used if you know it to be required." + ), + "with_blosc": "Use Blosc for improved disk compression. Recommended.", + "with_log4cplus": "Use log4cplus for improved OpenVDB Logging.", + "with_zlib": "Use ZLib for disk serialization compression. ZLib can only be disabled if Blosc is also disabled.", + } @property - def _build_subfolder(self): - return "build_subfolder" + def _min_cppstd(self): + return 17 if Version(self.version) >= "10.0.0" else 14 @property def _compilers_min_version(self): - return { - "msvc": "191", - "Visual Studio": "15", # Should we check toolset? - "gcc": "6.3.1", - "clang": "3.8", - "apple-clang": "3.8", - "intel": "17", - } - - def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + if Version(self.version) >= "10.0.0": + # https://github.com/AcademySoftwareFoundation/openvdb/blob/v10.0.1/doc/dependencies.txt#L56-L84 + return { + "msvc": "192.8", + "Visual Studio": "16", + "gcc": "9.3.1", + "clang": "5.0", + "apple-clang": "12.0", + "intel-cc": "19", + } + else: + # https://github.com/AcademySoftwareFoundation/openvdb/blob/v9.1.0/doc/dependencies.txt#L56-L84 + return { + "msvc": "191.0", + "Visual Studio": "15", + "gcc": "6.3.1", + "clang": "3.8", + "apple-clang": "10.0", + "intel-cc": "17", + } def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if is_msvc(self): + # Supported by GCC and Clang only + del self.options.use_colored_output + if Version(self.version) < "10.0.0": + del self.options.use_explicit_instantiation + del self.options.use_delayed_loading 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 package_id(self): + # with_exr is deprecated and has no effect + del self.info.options.with_exr def requirements(self): - self.requires("boost/1.79.0") - self.requires("onetbb/2020.3") - self.requires("openexr/2.5.7") # required for IlmBase::Half + # https://github.com/AcademySoftwareFoundation/openvdb/blob/v10.0.1/doc/dependencies.txt#L36-L84 + self.requires("boost/1.84.0", transitive_headers=True) + self.requires("onetbb/2021.10.0", transitive_headers=True, transitive_libs=True) + if self.options.use_imath_half: + self.requires("imath/3.1.10", transitive_headers=True, transitive_libs=True) if self.options.with_zlib: self.requires("zlib/[>=1.2.11 <2]") - if self.options.with_exr: - # Not necessary now. Required for IlmBase::IlmImf - self.requires("openexr/2.5.7") if self.options.with_blosc: - self.requires("c-blosc/1.21.1") + self.requires("c-blosc/1.21.5") if self.options.with_log4cplus: - self.requires("log4cplus/2.0.7") + # log4cplus 2.x is not supported + self.requires("log4cplus/1.2.2", transitive_headers=True) - def _check_compilier_version(self): + def _check_compiler_version(self): compiler = str(self.settings.compiler) - version = tools.Version(self.settings.compiler.version) minimum_version = self._compilers_min_version.get(compiler, False) - if minimum_version and version < minimum_version: - raise ConanInvalidConfiguration(f"{self.name} requires a {compiler} version greater than {minimum_version}") + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.name} requires a {compiler} version greater than {minimum_version}" + ) def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 14) + check_min_cppstd(self, self._min_cppstd) if self.settings.arch not in ("x86", "x86_64"): if self.options.simd: raise ConanInvalidConfiguration("Only intel architectures support SSE4 or AVX.") - self._check_compilier_version() + self._check_compiler_version() + if self.options.with_exr != "deprecated": + self.output.warning("with_exr option is deprecated, do not use anymore.") + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def build_requirements(self): + if Version(self.version) >= "10.0.0": + self.tool_requires("cmake/[>=3.18 <4]") + if self.options.build_ax: + if self._settings_build.os == "Windows": + self.tool_requires("winflexbison/2.5.25") + else: + self.tool_requires("bison/3.8.2") + self.tool_requires("flex/2.6.4") def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + + tc = CMakeToolchain(self) + tc.variables["Boost_USE_STATIC_LIBS"] = not self.dependencies["boost"].options.shared + tc.variables["OPENVDB_BUILD_AX"] = self.options.build_ax + tc.variables["OPENVDB_BUILD_BINARIES"] = False + tc.variables["OPENVDB_BUILD_CORE"] = True + tc.variables["OPENVDB_BUILD_DOCS"] = False + tc.variables["OPENVDB_BUILD_HOUDINI_ABITESTS"] = False + tc.variables["OPENVDB_BUILD_HOUDINI_PLUGIN"] = False + tc.variables["OPENVDB_BUILD_MAYA_PLUGIN"] = False + tc.variables["OPENVDB_BUILD_NANOVDB"] = False # nanovdb should be packaged separately in CCI + tc.variables["OPENVDB_BUILD_PYTHON_MODULE"] = False + tc.variables["OPENVDB_CORE_SHARED"] = self.options.shared + tc.variables["OPENVDB_CORE_STATIC"] = not self.options.shared + tc.variables["OPENVDB_CXX_STRICT"] = False + tc.variables["OPENVDB_DISABLE_BOOST_IMPLICIT_LINKING"] = True + tc.variables["OPENVDB_ENABLE_RPATH"] = True + tc.variables["OPENVDB_ENABLE_UNINSTALL"] = False + tc.variables["OPENVDB_FUTURE_DEPRECATION"] = True + tc.variables["OPENVDB_INSTALL_CMAKE_MODULES"] = False + tc.variables["OPENVDB_SIMD"] = self.options.simd + tc.variables["OPENVDB_USE_DELAYED_LOADING"] = self.options.get_safe("use_delayed_loading", False) + tc.variables["USE_AX"] = False # used only by Python bindings and the Houdini plugin + tc.variables["USE_BLOSC"] = self.options.with_blosc + tc.variables["USE_COLORED_OUTPUT"] = self.options.get_safe("use_colored_output", False) + tc.variables["USE_EXPLICIT_INSTANTIATION"] = self.options.get_safe("use_explicit_instantiation", False) + tc.variables["USE_EXR"] = False + tc.variables["USE_HOUDINI"] = False + tc.variables["USE_IMATH_HALF"] = self.options.get_safe("use_imath_half", False) + tc.variables["USE_LOG4CPLUS"] = self.options.with_log4cplus + tc.variables["USE_MAYA"] = False + tc.variables["USE_NANOVDB"] = False + tc.variables["USE_PKGCONFIG"] = False + tc.variables["USE_PNG"] = False + tc.variables["USE_STATIC_DEPENDENCIES"] = False + tc.variables["USE_TBB"] = True # Only affects the nanovdb component + tc.variables["USE_ZLIB"] = self.options.with_zlib + tc.generate() + + tc = CMakeDeps(self) + tc.set_property("c-blosc", "cmake_file_name", "Blosc") + tc.set_property("c-blosc", "cmake_target_name", "Blosc::blosc") + tc.set_property("openexr", "cmake_file_name", "IlmBase") + tc.set_property("openexr::ilmbase_half", "cmake_target_name", "IlmBase::Half") + tc.set_property("log4cplus", "cmake_target_name", "Log4cplus::log4cplus") + tc.generate() def _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) # Remove FindXXX files from OpenVDB. Let Conan do the job - tools.remove_files_by_mask(os.path.join(self._source_subfolder, "cmake"), "Find*") - with open("FindBlosc.cmake", "w") as f: - f.write( - """find_package(c-blosc) -if(c-blosc_FOUND) - add_library(blosc INTERFACE) - target_link_libraries(blosc INTERFACE c-blosc::c-blosc) - add_library(Blosc::blosc ALIAS blosc) -endif() -""" - ) - with open("FindIlmBase.cmake", "w") as f: - f.write( - """find_package(OpenEXR) -if(OpenEXR_FOUND) - add_library(Half INTERFACE) - add_library(IlmThread INTERFACE) - add_library(Iex INTERFACE) - add_library(Imath INTERFACE) - add_library(IlmImf INTERFACE) - target_link_libraries(Half INTERFACE OpenEXR::OpenEXR) - target_link_libraries(IlmThread INTERFACE OpenEXR::OpenEXR) - target_link_libraries(Iex INTERFACE OpenEXR::OpenEXR) - target_link_libraries(Imath INTERFACE OpenEXR::OpenEXR) - target_link_libraries(IlmImf INTERFACE OpenEXR::OpenEXR) - add_library(IlmBase::Half ALIAS Half) - add_library(IlmBase::IlmThread ALIAS IlmThread) - add_library(IlmBase::Iex ALIAS Iex) - add_library(IlmBase::Imath ALIAS Imath) - add_library(OpenEXR::IlmImf ALIAS IlmImf) - endif() - """ - ) + rm(self, "Find*.cmake", os.path.join(self.source_folder, "cmake"), recursive=True) + # Relax version checks in find_package(), + # since the config/module files produced by CMakeDeps do not support gt major version checks + cmakelists = self.source_path.joinpath("openvdb", "openvdb", "CMakeLists.txt") + cmakelists.write_text(re.sub(r"\$\{MINIMUM_\S+_VERSION}", "", cmakelists.read_text())) + replace_in_file(self, os.path.join(self.source_folder, "openvdb", "openvdb", "CMakeLists.txt"), + "OPENVDB_FUTURE_DEPRECATION", "FALSE") def build(self): self._patch_sources() - cmake = self._configure_cmake() - cmake.build() - - @functools.lru_cache(1) - def _configure_cmake(self): cmake = CMake(self) - # exposed options - cmake.definitions["USE_BLOSC"] = self.options.with_blosc - cmake.definitions["USE_ZLIB"] = self.options.with_zlib - cmake.definitions["USE_LOG4CPLUS"] = self.options.with_log4cplus - cmake.definitions["USE_EXR"] = self.options.with_exr - cmake.definitions["OPENVDB_SIMD"] = self.options.simd - - cmake.definitions["OPENVDB_CORE_SHARED"] = self.options.shared - cmake.definitions["OPENVDB_CORE_STATIC"] = not self.options.shared - - # All available options but not exposed yet. Set to default values - cmake.definitions["OPENVDB_BUILD_CORE"] = True - cmake.definitions["OPENVDB_BUILD_BINARIES"] = False - cmake.definitions["OPENVDB_BUILD_PYTHON_MODULE"] = False - cmake.definitions["OPENVDB_BUILD_UNITTESTS"] = False - cmake.definitions["OPENVDB_BUILD_DOCS"] = False - cmake.definitions["OPENVDB_BUILD_HOUDINI_PLUGIN"] = False - cmake.definitions["OPENVDB_BUILD_HOUDINI_ABITESTS"] = False - - cmake.definitions["OPENVDB_BUILD_AX"] = False - cmake.definitions["OPENVDB_BUILD_AX_BINARIES"] = False - cmake.definitions["OPENVDB_BUILD_AX_UNITTESTS"] = False - - cmake.definitions["OPENVDB_BUILD_MAYA_PLUGIN"] = False - cmake.definitions["OPENVDB_ENABLE_RPATH"] = False - cmake.definitions["OPENVDB_CXX_STRICT"] = False - cmake.definitions["USE_HOUDINI"] = False - cmake.definitions["USE_MAYA"] = False - cmake.definitions["USE_STATIC_DEPENDENCIES"] = False - cmake.definitions["USE_PKGCONFIG"] = False - cmake.definitions["OPENVDB_INSTALL_CMAKE_MODULES"] = False - - cmake.definitions["Boost_USE_STATIC_LIBS"] = not self.options["boost"].shared - cmake.definitions["OPENEXR_USE_STATIC_LIBS"] = not self.options["openexr"].shared - - cmake.definitions["OPENVDB_DISABLE_BOOST_IMPLICIT_LINKING"] = True - - cmake.configure(build_folder=self._build_subfolder) - return cmake + cmake.configure() + cmake.build() def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() + @property + def _public_defines(self): + defines = [] + if self.options.shared: + defines.append("OPENVDB_DLL") + else: + defines.append("OPENVDB_STATICLIB") + if self.settings.os == "Windows": + defines.append("_WIN32") + defines.append("NOMINMAX") + if self.options.with_log4cplus: + defines.append("OPENVDB_USE_LOG4CPLUS") + return defines + def package_info(self): self.cpp_info.set_property("cmake_find_mode", "both") self.cpp_info.set_property("cmake_file_name", "OpenVDB") self.cpp_info.set_property("cmake_target_name", "OpenVDB::openvdb") # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed + main_component = self.cpp_info.components["openvdb-core"] lib_prefix = "lib" if is_msvc(self) and not self.options.shared else "" - self.cpp_info.components["openvdb-core"].libs = [lib_prefix + "openvdb"] - - lib_define = "OPENVDB_DLL" if self.options.shared else "OPENVDB_STATICLIB" - self.cpp_info.components["openvdb-core"].defines.append(lib_define) - - if self.settings.os == "Windows": - self.cpp_info.components["openvdb-core"].defines.append("_WIN32") - self.cpp_info.components["openvdb-core"].defines.append("NOMINMAX") - - if not self.options["openexr"].shared: - self.cpp_info.components["openvdb-core"].defines.append("OPENVDB_OPENEXR_STATICLIB") - if self.options.with_exr: - self.cpp_info.components["openvdb-core"].defines.append("OPENVDB_TOOLS_RAYTRACER_USE_EXR") - if self.options.with_log4cplus: - self.cpp_info.components["openvdb-core"].defines.append("OPENVDB_USE_LOG4CPLUS") + main_component.libs = [lib_prefix + "openvdb"] + main_component.defines = self._public_defines + if self.settings.os in ("Linux", "FreeBSD"): + main_component.system_libs = ["pthread"] - self.cpp_info.components["openvdb-core"].requires = [ + main_component.requires = [ "boost::iostreams", "boost::system", "onetbb::onetbb", - "openexr::openexr", # should be "openexr::Half", ] if self.settings.os == "Windows": - self.cpp_info.components["openvdb-core"].requires.append("boost::disable_autolinking") - + main_component.requires.append("boost::disable_autolinking") if self.options.with_zlib: - self.cpp_info.components["openvdb-core"].requires.append("zlib::zlib") + main_component.requires.append("zlib::zlib") if self.options.with_blosc: - self.cpp_info.components["openvdb-core"].requires.append("c-blosc::c-blosc") + main_component.requires.append("c-blosc::c-blosc") if self.options.with_log4cplus: - self.cpp_info.components["openvdb-core"].requires.append("log4cplus::log4cplus") - - if self.settings.os in ("Linux", "FreeBSD"): - self.cpp_info.components["openvdb-core"].system_libs = ["pthread"] + main_component.requires.append("log4cplus::log4cplus") + if self.options.use_imath_half: + main_component.requires.append("imath::imath") # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.names["cmake_find_package"] = "OpenVDB" self.cpp_info.names["cmake_find_package_multi"] = "OpenVDB" - self.cpp_info.components["openvdb-core"].names["cmake_find_package"] = "openvdb" - self.cpp_info.components["openvdb-core"].names["cmake_find_package_multi"] = "openvdb" - self.cpp_info.components["openvdb-core"].set_property("cmake_target_name", "OpenVDB::openvdb") + main_component.names["cmake_find_package"] = "openvdb" + main_component.names["cmake_find_package_multi"] = "openvdb" + main_component.set_property("cmake_target_name", "OpenVDB::openvdb") diff --git a/recipes/openvdb/all/patches/0001-Find-packages-fixes.patch b/recipes/openvdb/all/patches/0001-Find-packages-fixes.patch deleted file mode 100644 index 65027361b1c53..0000000000000 --- a/recipes/openvdb/all/patches/0001-Find-packages-fixes.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- ---- openvdb/openvdb/CMakeLists.txt -+++ openvdb/openvdb/CMakeLists.txt -@@ -413,8 +413,7 @@ if(WIN32) - # @note OPENVDB_OPENEXR_STATICLIB is old functionality from the makefiles - # used in PlatformConfig.h to configure EXR exports. Once this file - # is completely removed, this define can be too -- get_target_property(ILMBASE_LIB_TYPE IlmBase::Half TYPE) -- if(OPENEXR_USE_STATIC_LIBS OR (${ILMBASE_LIB_TYPE} STREQUAL STATIC_LIBRARY)) -+ if(OPENEXR_USE_STATIC_LIBS) - list(APPEND OPENVDB_CORE_PUBLIC_DEFINES -DOPENVDB_OPENEXR_STATICLIB) - endif() - list(APPEND OPENVDB_CORE_PUBLIC_DEFINES -D_WIN32 -DNOMINMAX) - diff --git a/recipes/openvdb/all/test_package/CMakeLists.txt b/recipes/openvdb/all/test_package/CMakeLists.txt index 1016f9a6ff31e..5665948f27dfd 100644 --- a/recipes/openvdb/all/test_package/CMakeLists.txt +++ b/recipes/openvdb/all/test_package/CMakeLists.txt @@ -1,11 +1,12 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(OpenVDB REQUIRED) +find_package(OpenVDB REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE OpenVDB::openvdb) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +if (OpenVDB_VERSION VERSION_GREATER_EQUAL "10.0.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +endif() diff --git a/recipes/openvdb/all/test_package/conanfile.py b/recipes/openvdb/all/test_package/conanfile.py index 19e6a0c06e3d8..ef5d7042163ec 100644 --- a/recipes/openvdb/all/test_package/conanfile.py +++ b/recipes/openvdb/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/openvdb/all/test_v1_package/CMakeLists.txt b/recipes/openvdb/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/openvdb/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/openvdb/all/test_v1_package/conanfile.py b/recipes/openvdb/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..38f4483872d47 --- /dev/null +++ b/recipes/openvdb/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/openvdb/config.yml b/recipes/openvdb/config.yml index d603f0308422b..203a6bdcd5a75 100644 --- a/recipes/openvdb/config.yml +++ b/recipes/openvdb/config.yml @@ -1,3 +1,7 @@ versions: - "8.0.1": + "11.0.0": + folder: all + "10.1.0": + folder: all + "9.1.0": folder: all From 09621f986088f9eb8fbeed1d821f65fe405af2b7 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Sun, 24 Mar 2024 16:01:26 +0100 Subject: [PATCH 338/405] (#21448) [docs] Allow boost namespace for non official projects Signed-off-by: Uilian Ries --- docs/faqs.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/faqs.md b/docs/faqs.md index b463fc96e8c9b..a1714a7a2b37b 100644 --- a/docs/faqs.md +++ b/docs/faqs.md @@ -453,6 +453,8 @@ and does not install libraries with the boost prefix. Yes, but make sure it does not have Boost in the name. Use the [`author-name` convention](https://github.com/conan-io/conan-center-index/blob/master/docs/faqs.md#what-is-the-policy-on-recipe-name-collisions) so there are no conflicts. In addition to follow the rules outlined above. +**NOTE**: In case you have no intention to submit to Boost, then you can use the project name as is (e.g `boost-foobar`). + ## Can I add options that do not affect `package_id` or the package contents Generally no, these sorts of options can most likely be set from a profile or downstream recipes. However if the project supports this option from its build script From cd5d2691a06c8f7ab9e98d987020a0ac4bf50f6e Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 25 Mar 2024 03:46:50 +0900 Subject: [PATCH 339/405] (#23082) fixed-containers: fix cmake names, require magic_enum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fixed-containers: require magic_enum * fix cmake names * Update recipes/fixed-containers/all/conanfile.py Co-authored-by: ericLemanissier * remove enum_util from test_package --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: ericLemanissier --- recipes/fixed-containers/all/conanfile.py | 6 ++++++ recipes/fixed-containers/all/test_package/CMakeLists.txt | 4 ++-- recipes/fixed-containers/all/test_package/test_package.cpp | 5 ++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/recipes/fixed-containers/all/conanfile.py b/recipes/fixed-containers/all/conanfile.py index cdfe73d72c2b9..9729326c0e725 100644 --- a/recipes/fixed-containers/all/conanfile.py +++ b/recipes/fixed-containers/all/conanfile.py @@ -37,6 +37,9 @@ def _compilers_minimum_version(self): def layout(self): basic_layout(self, src_folder="src") + def requirements(self): + self.requires("magic_enum/0.9.3", transitive_headers=True) + def package_id(self): self.info.clear() @@ -64,3 +67,6 @@ def package(self): def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] + + self.cpp_info.set_property("cmake_file_name", "fixed_containers") + self.cpp_info.set_property("cmake_target_name", "fixed_containers::fixed_containers") diff --git a/recipes/fixed-containers/all/test_package/CMakeLists.txt b/recipes/fixed-containers/all/test_package/CMakeLists.txt index 697ff29d18c1a..24c19844b253b 100644 --- a/recipes/fixed-containers/all/test_package/CMakeLists.txt +++ b/recipes/fixed-containers/all/test_package/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) -find_package(fixed-containers REQUIRED CONFIG) +find_package(fixed_containers) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE fixed-containers::fixed-containers) +target_link_libraries(${PROJECT_NAME} PRIVATE fixed_containers::fixed_containers) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/fixed-containers/all/test_package/test_package.cpp b/recipes/fixed-containers/all/test_package/test_package.cpp index aed686f3d1107..d129e8622b3d9 100644 --- a/recipes/fixed-containers/all/test_package/test_package.cpp +++ b/recipes/fixed-containers/all/test_package/test_package.cpp @@ -1,10 +1,9 @@ #include "fixed_containers/fixed_vector.hpp" - -using namespace fixed_containers; +#include "fixed_containers/enum_utils.hpp" int main(void) { constexpr auto v1 = []() { - FixedVector v{}; + fixed_containers::FixedVector v{}; v.push_back(0); v.emplace_back(1); v.push_back(2); From d1523f9109677fed86075d3e977546323c06dd5f Mon Sep 17 00:00:00 2001 From: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com> Date: Sun, 24 Mar 2024 21:27:18 -0500 Subject: [PATCH 340/405] (#23117) libassert: add 2.0.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add libassert 2.0.0 * Fixes/improvements * Try to fix conan v1 conanfile * Again * Printbug * Fix? * Revert "Fix?" This reverts commit ab47df7fbd80b310c1218d24c9aa3188d0ec7e32. * Silly me * Remove erlier setting of LIBASSERT2 in the main conanfile * Use better way to detect version in test package, and fix Windows shared copy * Add LIBASSERT_STATIC_DEFINE * Fix Conan v1 test package * Fix versions checks * generate cmake target for Conan 1.x Signed-off-by: Uilian Ries * Update recipes/libassert/all/conanfile.py * Fix * Update patch * Export definition via component only * Review comments --------- Signed-off-by: Uilian Ries Co-authored-by: Rubén Rincón Blanco Co-authored-by: Uilian Ries --- recipes/libassert/all/conandata.yml | 9 +++ recipes/libassert/all/conanfile.py | 62 ++++++++++++++----- .../2.0.0/0001-fix-export-and-include.patch | 13 ++++ .../libassert/all/test_package/CMakeLists.txt | 17 +++-- .../libassert/all/test_package/conanfile.py | 10 ++- .../all/test_package/test_package.cpp | 16 +++++ .../all/test_v1_package/CMakeLists.txt | 2 +- .../all/test_v1_package/conanfile.py | 2 + recipes/libassert/config.yml | 2 + 9 files changed, 111 insertions(+), 22 deletions(-) create mode 100644 recipes/libassert/all/patches/2.0.0/0001-fix-export-and-include.patch diff --git a/recipes/libassert/all/conandata.yml b/recipes/libassert/all/conandata.yml index 1cae5dc94ff57..9cef3e5cfa449 100644 --- a/recipes/libassert/all/conandata.yml +++ b/recipes/libassert/all/conandata.yml @@ -1,5 +1,9 @@ sources: # Newer versions at the top + "2.0.0": + url: + - "https://github.com/jeremy-rifkin/libassert/archive/refs/tags/v2.0.0.tar.gz" + sha256: "d4b2da2179a94637b34d18813a814531a1eceb0ddc6dd6db6098050dd638f4a1" "1.2.2": url: - "https://github.com/jeremy-rifkin/libassert/archive/refs/tags/v1.2.2.tar.gz" @@ -18,6 +22,11 @@ sources: sha256: "e1bb3b50767994ca4d0f60b7977b279cf32b8569ff92c5830e7a1de567b82fd5" patches: + "2.0.0": + - patch_file: "patches/2.0.0/0001-fix-export-and-include.patch" + patch_type: "bugfix" + patch_source: https://github.com/jeremy-rifkin/libassert/commit/25c1f3e43737ab18490a0d9430cb1c70f976a662 + patch_description: "Fix export header and an incorrect #include" "1.2.2": - patch_file: "patches/1.2.2/0001-cpptrace-dll-copy.patch" patch_type: "conan" diff --git a/recipes/libassert/all/conanfile.py b/recipes/libassert/all/conanfile.py index c596be696aeb2..0e1e7eaa52d08 100644 --- a/recipes/libassert/all/conanfile.py +++ b/recipes/libassert/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc +from conan.tools.apple import is_apple_os from conan.tools.files import get, copy, rm, rmdir from conan.tools.build import check_min_cppstd from conan.tools.scm import Version @@ -52,14 +53,17 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) >= Version("1.2.2"): + if Version(self.version) >= "2.0.0": + # libassert::detail::process_assert_fail + self.requires("cpptrace/0.5.0", transitive_headers=True, transitive_libs=True) + elif Version(self.version) >= "1.2.2": self.requires("cpptrace/0.3.1") - elif Version(self.version) >= Version("1.2.1"): + elif Version(self.version) >= "1.2.1": self.requires("cpptrace/0.2.1") def validate(self): - if self.settings.compiler == "apple-clang": - raise ConanInvalidConfiguration("apple-clang not supported") + if Version(self.version) <= "2.0.0" and is_apple_os(self): + raise ConanInvalidConfiguration(f"{self.ref} is not supported on Mac. Please, update to version >=2.0.0") if self.settings.compiler.cppstd: check_min_cppstd(self, self._min_cppstd) @@ -82,7 +86,11 @@ def generate(self): if is_msvc(self): tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self) - if Version(self.version) >= Version("1.2.1"): + if Version(self.version) >= "2.0.0": + tc.variables["LIBASSERT_USE_EXTERNAL_CPPTRACE"] = True + deps = CMakeDeps(self) + deps.generate() + elif Version(self.version) >= "1.2.1": if not self.options.shared: tc.variables["ASSERT_STATIC"] = True tc.variables["ASSERT_USE_EXTERNAL_CPPTRACE"] = True @@ -124,22 +132,48 @@ def package(self): def package_info(self): self.cpp_info.libs = ["assert"] - self.cpp_info.set_property("cmake_file_name", "assert") - self.cpp_info.set_property("cmake_target_name", "assert::assert") + if Version(self.version) >= "2.0.0": + self.cpp_info.set_property("cmake_file_name", "libassert") + self.cpp_info.set_property("cmake_target_name", "libassert::assert") + else: + self.cpp_info.set_property("cmake_file_name", "assert") + self.cpp_info.set_property("cmake_target_name", "assert::assert") # the first version of this library used assert/assert as include folder # appending this one but not removing the default to not break consumers - self.cpp_info.includedirs.append(os.path.join("include", "assert")) + if Version(self.version) >= "2.0.0": + self.cpp_info.includedirs.append(os.path.join("include", "libassert")) + else: + self.cpp_info.includedirs.append(os.path.join("include", "assert")) # TODO: to remove in conan v2 once cmake_find_package_* generators removed - self.cpp_info.filenames["cmake_find_package"] = "assert" - self.cpp_info.filenames["cmake_find_package_multi"] = "assert" - self.cpp_info.names["cmake_find_package"] = "assert" - self.cpp_info.names["cmake_find_package_multi"] = "assert" - - if Version(self.version) < Version("1.2.1"): + if Version(self.version) >= "2.0.0": + self.cpp_info.filenames["cmake_find_package"] = "libassert" + self.cpp_info.filenames["cmake_find_package_multi"] = "libassert" + self.cpp_info.names["cmake_find_package"] = "libassert" + self.cpp_info.names["cmake_find_package_multi"] = "libassert" + + self.cpp_info.components["assert"].names["cmake_find_package"] = "assert" + self.cpp_info.components["assert"].names["cmake_find_package_multi"] = "assert" + self.cpp_info.components["assert"].requires = ["cpptrace::cpptrace"] + self.cpp_info.components["assert"].libs = ["assert"] + if not self.options.shared: + self.cpp_info.components["assert"].defines.append("LIBASSERT_STATIC_DEFINE") + else: + self.cpp_info.filenames["cmake_find_package"] = "assert" + self.cpp_info.filenames["cmake_find_package_multi"] = "assert" + self.cpp_info.names["cmake_find_package"] = "assert" + self.cpp_info.names["cmake_find_package_multi"] = "assert" + + if Version(self.version) < "1.2.1": # pre-cpptrace if self.settings.os == "Linux": self.cpp_info.system_libs.append("dl") if self.settings.os == "Windows": self.cpp_info.system_libs.append("dbghelp") + + if Version(self.version) >= "2.0.0": + self.cpp_info.system_libs.append("m") + + if Version(self.version) >= "2.0.0": + self.cpp_info.requires = ["cpptrace::cpptrace"] diff --git a/recipes/libassert/all/patches/2.0.0/0001-fix-export-and-include.patch b/recipes/libassert/all/patches/2.0.0/0001-fix-export-and-include.patch new file mode 100644 index 0000000000000..199fdd0350b42 --- /dev/null +++ b/recipes/libassert/all/patches/2.0.0/0001-fix-export-and-include.patch @@ -0,0 +1,13 @@ +diff --git a/include/libassert/assert-gtest.hpp b/include/libassert/assert-gtest.hpp +index 912da40..57dbc91 100644 +--- a/include/libassert/assert-gtest.hpp ++++ b/include/libassert/assert-gtest.hpp +@@ -6,8 +6,6 @@ + #define LIBASSERT_PREFIX_ASSERTIONS + #include + +-#include "tokenizer.hpp" +- + #if defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL != 0 + #error "Libassert integration does not work with MSVC's non-conformant preprocessor. /Zc:preprocessor must be used." + #endif diff --git a/recipes/libassert/all/test_package/CMakeLists.txt b/recipes/libassert/all/test_package/CMakeLists.txt index 97d2bfbc982a3..a3d62a686df6a 100644 --- a/recipes/libassert/all/test_package/CMakeLists.txt +++ b/recipes/libassert/all/test_package/CMakeLists.txt @@ -1,11 +1,18 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -find_package(assert REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -# don't link to ${CONAN_LIBS} or CONAN_PKG::package -target_link_libraries(${PROJECT_NAME} PRIVATE assert::assert) -# In case the target project need a specific C++ standard + +if(LIBASSERT2) + find_package(libassert REQUIRED CONFIG) + target_link_libraries(${PROJECT_NAME} PRIVATE libassert::assert) + target_compile_definitions(${PROJECT_NAME} PRIVATE LIBASSERT2) +else() + find_package(assert REQUIRED CONFIG) + target_link_libraries(${PROJECT_NAME} PRIVATE assert::assert) +endif() + + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/libassert/all/test_package/conanfile.py b/recipes/libassert/all/test_package/conanfile.py index f5cf204295e19..0dcbd4380c138 100644 --- a/recipes/libassert/all/test_package/conanfile.py +++ b/recipes/libassert/all/test_package/conanfile.py @@ -1,11 +1,12 @@ 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 import os + class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + generators = "CMakeDeps", "VirtualRunEnv" test_type = "explicit" def requirements(self): @@ -14,6 +15,11 @@ def requirements(self): def layout(self): cmake_layout(self) + def generate(self): + tc = CMakeToolchain(self) + tc.variables["LIBASSERT2"] = self.dependencies[self.tested_reference_str].ref.version >= "2.0.0" + tc.generate() + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/libassert/all/test_package/test_package.cpp b/recipes/libassert/all/test_package/test_package.cpp index 751d401023f78..b4b1ce192f8af 100644 --- a/recipes/libassert/all/test_package/test_package.cpp +++ b/recipes/libassert/all/test_package/test_package.cpp @@ -1,12 +1,28 @@ #include #include +#ifdef LIBASSERT2 +#include +#else #include +#endif int main(void) { std::cout << "Testing libassert\n"; + + #ifdef LIBASSERT2 + libassert::set_failure_handler([](const libassert::assertion_info& info) { + std::cerr<= "2.0.0" else "OFF" cmake.configure() cmake.build() diff --git a/recipes/libassert/config.yml b/recipes/libassert/config.yml index 8ade508384535..25538d073da91 100644 --- a/recipes/libassert/config.yml +++ b/recipes/libassert/config.yml @@ -1,5 +1,7 @@ versions: # Newer versions at the top + "2.0.0": + folder: all "1.2.2": folder: all "1.2.1": From 9d6da2719666dcb4d20e7c08bd54e99700ae37b6 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 25 Mar 2024 17:47:01 +0900 Subject: [PATCH 341/405] (#23005) dacap-clip: add version 1.8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * dacap-clip: add version 1.8 * Update recipes/dacap-clip/all/conanfile.py --------- Co-authored-by: Rubén Rincón Blanco --- recipes/dacap-clip/all/conandata.yml | 3 +++ recipes/dacap-clip/all/conanfile.py | 16 ++++++++++++---- recipes/dacap-clip/config.yml | 2 ++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/recipes/dacap-clip/all/conandata.yml b/recipes/dacap-clip/all/conandata.yml index f4f5540f11df5..a548f37295671 100644 --- a/recipes/dacap-clip/all/conandata.yml +++ b/recipes/dacap-clip/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.8": + url: "https://github.com/dacap/clip/archive/refs/tags/v1.8.tar.gz" + sha256: "a54d243451fb483590ffd9239a3c55f8d8e672d44df63dc2b81da01a229074bc" "1.7": url: "https://github.com/dacap/clip/archive/refs/tags/v1.7.tar.gz" sha256: "f494d306f3425e984368cbd94ffb213e0a3b3d44c3ab169e5134788d3342535c" diff --git a/recipes/dacap-clip/all/conanfile.py b/recipes/dacap-clip/all/conanfile.py index c4021d403c55f..9c743f68fab4e 100644 --- a/recipes/dacap-clip/all/conanfile.py +++ b/recipes/dacap-clip/all/conanfile.py @@ -7,6 +7,7 @@ from conan.tools.microsoft import is_msvc from conan.tools.apple import is_apple_os from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -23,11 +24,13 @@ class DacapClipConan(ConanFile): "shared": [True, False], "fPIC": [True, False], "with_png": [True, False], + "with_image": [True, False], } default_options = { "shared": False, "fPIC": True, "with_png": True, + "with_image": True, } @property @@ -37,19 +40,21 @@ def _min_cppstd(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if self.settings.os not in ["Linux", "FreeBSD"]: + del self.options.with_png + if Version(self.version) < "1.8": + del self.options.with_image def configure(self): if self.options.shared: self.options.rm_safe("fPIC") - if self.settings.os not in ["Linux", "FreeBSD"]: - del self.options.with_png def layout(self): cmake_layout(self, src_folder="src") def requirements(self): if self.options.get_safe("with_png", False): - self.requires("libpng/1.6.37") + self.requires("libpng/[>=1.6 <2]") if self.settings.os == "Linux": self.requires("xorg/system") @@ -67,6 +72,7 @@ def generate(self): toolchain.variables["CLIP_EXAMPLES"] = False toolchain.variables["CLIP_TESTS"] = False toolchain.variables["CLIP_X11_WITH_PNG"] = self.options.get_safe("with_png", False) + toolchain.variables["CLIP_ENABLE_IMAGE"] = self.options.get_safe("with_image", False) if is_msvc(self): toolchain.cache_variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = bool(self.options.shared) toolchain.generate() @@ -93,6 +99,8 @@ def package_info(self): if self.options.get_safe("with_png", False): self.cpp_info.requires.append("libpng::libpng") + if self.options.get_safe("with_image", False): + self.cpp_info.defines.append("CLIP_ENABLE_IMAGE=1") if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.requires.append("xorg::xcb") @@ -108,6 +116,6 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "clip") self.cpp_info.set_property("cmake_target_name", "clip::clip") - # TODO: Remove on Conan 2.0 + # TODO: Remove on Conan 2.0 self.cpp_info.names["cmake_find_package"] = "clip" self.cpp_info.names["cmake_find_package_multi"] = "clip" diff --git a/recipes/dacap-clip/config.yml b/recipes/dacap-clip/config.yml index f10766e09880a..80ca8c43729e6 100644 --- a/recipes/dacap-clip/config.yml +++ b/recipes/dacap-clip/config.yml @@ -1,4 +1,6 @@ versions: + "1.8": + folder: "all" "1.7": folder: "all" "1.6": From 3f569fee2614a54999ba6a7df4c89997fe8ef5c3 Mon Sep 17 00:00:00 2001 From: Esteban Dugueperoux <43169544+EstebanDugueperoux2@users.noreply.github.com> Date: Mon, 25 Mar 2024 10:07:13 +0100 Subject: [PATCH 342/405] (#23231) Add use_sse option to pcl recipe Add use_sse option to pcl recipe to be able to disable in case of cross-compilation as for arm64. --- recipes/pcl/all/conanfile.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes/pcl/all/conanfile.py b/recipes/pcl/all/conanfile.py index 2b324ce7e9270..f22cfe52d2e6c 100644 --- a/recipes/pcl/all/conanfile.py +++ b/recipes/pcl/all/conanfile.py @@ -91,6 +91,7 @@ class PclConan(ConanFile): "precompile_only_core_point_types": [True, False], # Whether to append a ''/d/rd/s postfix to executables on Windows depending on the build type "add_build_type_postfix": [True, False], + "use_sse": [True, False], } default_options = { "shared": False, @@ -151,6 +152,7 @@ class PclConan(ConanFile): # Enabled to avoid excessive memory usage during compilation in CCI "precompile_only_core_point_types": True, "add_build_type_postfix": False, + "use_sse": True, } short_paths = True @@ -333,6 +335,8 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if self.settings.arch not in ["x86", "x86_64"]: + del self.options.use_sse def configure(self): if self.options.shared: @@ -477,6 +481,8 @@ def generate(self): for comp in disabled: tc.cache_variables[f"BUILD_{comp}"] = False + tc.cache_variables["PCL_ENABLE_SSE"] = self.options.get_safe("use_sse", False) + tc.generate() deps = CMakeDeps(self) From 5f7d1bdac0aeedfdfaba5fff4b0bcdfaa2d922d3 Mon Sep 17 00:00:00 2001 From: Tomasz Wisniewski Date: Mon, 25 Mar 2024 17:07:12 +0000 Subject: [PATCH 343/405] (#22907) libboxes: add recipe for v0.1.1 --- recipes/libboxes/all/conandata.yml | 4 + recipes/libboxes/all/conanfile.py | 95 +++++++++++++++++++ .../libboxes/all/test_package/CMakeLists.txt | 10 ++ .../libboxes/all/test_package/conanfile.py | 26 +++++ .../libboxes/all/test_package/src/example.cpp | 16 ++++ recipes/libboxes/config.yml | 3 + 6 files changed, 154 insertions(+) create mode 100644 recipes/libboxes/all/conandata.yml create mode 100644 recipes/libboxes/all/conanfile.py create mode 100644 recipes/libboxes/all/test_package/CMakeLists.txt create mode 100644 recipes/libboxes/all/test_package/conanfile.py create mode 100644 recipes/libboxes/all/test_package/src/example.cpp create mode 100644 recipes/libboxes/config.yml diff --git a/recipes/libboxes/all/conandata.yml b/recipes/libboxes/all/conandata.yml new file mode 100644 index 0000000000000..5ed3e25a8e382 --- /dev/null +++ b/recipes/libboxes/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.1.1": + url: "https://gitlab.com/twdev_projects/boxes/-/archive/v0.1.1/boxes-v0.1.1.tar.gz" + sha256: "a9943a47abd820b7847e1f7abd15fc733c028379542815f8038192a0e4902cd0" diff --git a/recipes/libboxes/all/conanfile.py b/recipes/libboxes/all/conanfile.py new file mode 100644 index 0000000000000..59e6f45a38714 --- /dev/null +++ b/recipes/libboxes/all/conanfile.py @@ -0,0 +1,95 @@ +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, rmdir +from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps +from conan.tools.scm import Version +import os + +class libboxesRecipe(ConanFile): + name = "libboxes" + description = "Boxes is a set of frequently used containers built on top of STL" + + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://gitlab.com/twdev_projects/boxes" + + topics = ("container", "utility") + 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 20 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "13", + "clang": "14", + "gcc": "11", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("xxhash/0.8.2", transitive_headers=True) + + def validate(self): + if self.settings.os == "Windows": + raise ConanInvalidConfiguration("libboxes does not support Windows yet") + + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared + tc.cache_variables["BUILD_EXAMPLES"] = "OFF" + tc.generate() + + tc = CMakeDeps(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.md", 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")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "libboxes") + self.cpp_info.set_property("cmake_target_name", "libboxes::libboxes") + self.cpp_info.set_property("pkg_config_name", "libboxes") + + if self.settings.os in ["Linux", "Android", "FreeBSD", "SunOS", "AIX"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/libboxes/all/test_package/CMakeLists.txt b/recipes/libboxes/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..2c73e54e37773 --- /dev/null +++ b/recipes/libboxes/all/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.15) +project(PackageTest CXX) + +find_package(libboxes CONFIG REQUIRED) + + + +add_executable(example src/example.cpp) +target_link_libraries(example libboxes::libboxes) +target_compile_features(example PRIVATE cxx_std_20) diff --git a/recipes/libboxes/all/test_package/conanfile.py b/recipes/libboxes/all/test_package/conanfile.py new file mode 100644 index 0000000000000..fa3590fe7255a --- /dev/null +++ b/recipes/libboxes/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run + + +class libboxesTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "CMakeToolchain" + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def layout(self): + cmake_layout(self) + + def test(self): + if can_run(self): + cmd = os.path.join(self.cpp.build.bindir, "example") + self.run(cmd, env="conanrun") diff --git a/recipes/libboxes/all/test_package/src/example.cpp b/recipes/libboxes/all/test_package/src/example.cpp new file mode 100644 index 0000000000000..813df03e7c552 --- /dev/null +++ b/recipes/libboxes/all/test_package/src/example.cpp @@ -0,0 +1,16 @@ +#include + +#include + +int main() { + boxes::RingBuffer buf; + buf.push_back(123); + + if (buf.size() == 1 && buf.front() == 123) { + std::cout << "libboxes::RingBuffer works!" << std::endl; + } else { + std::cout << "libboxes::RingBuffer is broken!" << std::endl; + } + + return 0; +} diff --git a/recipes/libboxes/config.yml b/recipes/libboxes/config.yml new file mode 100644 index 0000000000000..b893ff21f7c23 --- /dev/null +++ b/recipes/libboxes/config.yml @@ -0,0 +1,3 @@ +versions: + "0.1.1": + folder: all From 9a67bfc988dff1bfed8c8461cf1efe76bbcf055a Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 25 Mar 2024 22:22:18 +0000 Subject: [PATCH 344/405] (#23268) [bot] Update list of references (prod-v2/ListPackages) Co-authored-by: conan-center-bot --- .c3i/conan_v2_ready_references.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index aced003f38780..cb129d27a5d1b 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -90,6 +90,7 @@ required_for_references: - bdwgc - bear - beauty +- behaviortree.cpp - benchmark - bertrand - bezier @@ -236,6 +237,7 @@ required_for_references: - cprocessing - cpu_features - cpuinfo +- cpython - cqrlib - crc32c - crc_cpp @@ -533,6 +535,7 @@ required_for_references: - id3v2lib - idna - ignition-cmake +- iguana - iir1 - im95able-rea - imagl @@ -670,6 +673,7 @@ required_for_references: - libexif - libfdk_aac - libffi +- libfork - libfreenect - libfreenect2 - libftdi @@ -690,6 +694,7 @@ required_for_references: - libiberty - libiconv - libid3tag +- libinput - libinterpolate - libipt - libjpeg @@ -893,6 +898,7 @@ required_for_references: - mingw-builds - mingw-w64 - miniaudio +- minicoro - minimp3 - minisat - miniscript @@ -970,6 +976,7 @@ required_for_references: - numcpp - nuraft - nv-codec-headers +- nvcloth - nvtx - oatpp - oatpp-libressl @@ -1032,6 +1039,7 @@ required_for_references: - opentelemetry-cpp - opentelemetry-proto - opentracing-cpp +- openvdb - openvino - openvr - openxlsx @@ -1146,6 +1154,7 @@ required_for_references: - quantlib - quaternions - quazip +- quickcpplib - quickfix - quickjs - quill @@ -1281,6 +1290,7 @@ required_for_references: - spy - sqlcipher - sqlite3 +- sqlite3mc - sqlite_orm - sqlitecpp - sqlpp11 @@ -1474,6 +1484,7 @@ required_for_references: - whisper-cpp - wide-integer - wil +- wildcards - wildmidi - winflexbison - winmd From dc660a04ee700f04d164fa100dc9052fa125cb6f Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Tue, 26 Mar 2024 08:02:00 +0000 Subject: [PATCH 345/405] (#23244) [bot] Update authorized users list (2024-03-25) Co-authored-by: conan-center-bot --- .c3i/authorized_users.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index c0b8570a8a236..0079f1d503a7f 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1316,3 +1316,5 @@ authorized_users: - igadmg - eljonny - VladimirShaleev +- phwissmann +- ybogo From 3e3b13b2f0bde2fa903d3eee5f6ca7cc581548fc Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 26 Mar 2024 19:27:17 +0900 Subject: [PATCH 346/405] (#23136) cpp-channel: add recipe * cpp-channel: add recipe * drop support gcc < 7 * remove conans.errors --- recipes/cpp-channel/all/conandata.yml | 4 ++ recipes/cpp-channel/all/conanfile.py | 59 +++++++++++++++++++ .../all/test_package/CMakeLists.txt | 8 +++ .../cpp-channel/all/test_package/conanfile.py | 26 ++++++++ .../all/test_package/test_package.cpp | 27 +++++++++ recipes/cpp-channel/config.yml | 3 + 6 files changed, 127 insertions(+) create mode 100644 recipes/cpp-channel/all/conandata.yml create mode 100644 recipes/cpp-channel/all/conanfile.py create mode 100644 recipes/cpp-channel/all/test_package/CMakeLists.txt create mode 100644 recipes/cpp-channel/all/test_package/conanfile.py create mode 100644 recipes/cpp-channel/all/test_package/test_package.cpp create mode 100644 recipes/cpp-channel/config.yml diff --git a/recipes/cpp-channel/all/conandata.yml b/recipes/cpp-channel/all/conandata.yml new file mode 100644 index 0000000000000..8e45b89578701 --- /dev/null +++ b/recipes/cpp-channel/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "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/all/conanfile.py b/recipes/cpp-channel/all/conanfile.py new file mode 100644 index 0000000000000..2dfc0cff05ee7 --- /dev/null +++ b/recipes/cpp-channel/all/conanfile.py @@ -0,0 +1,59 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration +import os + +required_conan_version = ">=1.52.0" + +class CppCHannelConan(ConanFile): + name = "cpp-channel" + description = "Thread-safe container for sharing data between threads" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/andreiavrammsd/cpp-channel" + topics = ("channel", "golang", "container", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 11 + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "7": + raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc < 7") + + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.hpp", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + copy( + self, + pattern="*.inl", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/cpp-channel/all/test_package/CMakeLists.txt b/recipes/cpp-channel/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..6e53e2494f389 --- /dev/null +++ b/recipes/cpp-channel/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(cpp-channel REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE cpp-channel::cpp-channel) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/cpp-channel/all/test_package/conanfile.py b/recipes/cpp-channel/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/cpp-channel/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/cpp-channel/all/test_package/test_package.cpp b/recipes/cpp-channel/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..f0fa8b9f9e593 --- /dev/null +++ b/recipes/cpp-channel/all/test_package/test_package.cpp @@ -0,0 +1,27 @@ +#include + +#include "msd/channel.hpp" + +int main() +{ + msd::channel ch{10}; + + int in{}; + + in = 1; + ch << in; + + in = 2; + ch << in; + + in = 3; + ch << in; + + for (auto out : ch) { + std::cout << out << '\n'; + + if (ch.empty()) { + break; + } + } +} diff --git a/recipes/cpp-channel/config.yml b/recipes/cpp-channel/config.yml new file mode 100644 index 0000000000000..bed1cdd9bb5b1 --- /dev/null +++ b/recipes/cpp-channel/config.yml @@ -0,0 +1,3 @@ +versions: + "0.8.2": + folder: all From ec38d96aa174e168670e0bd9b82572466ed3ee62 Mon Sep 17 00:00:00 2001 From: Roberto Rossini <71787608+robomics@users.noreply.github.com> Date: Tue, 26 Mar 2024 15:50:35 +0100 Subject: [PATCH 347/405] (#23271) hictk: add v0.0.11, bump deps and add missing define * Add v0.0.11 * Bump deps * Add missing define --- recipes/hictk/all/conandata.yml | 3 +++ recipes/hictk/all/conanfile.py | 7 +++++-- recipes/hictk/config.yml | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/recipes/hictk/all/conandata.yml b/recipes/hictk/all/conandata.yml index ba37c76167468..8f7bc333d7e7a 100644 --- a/recipes/hictk/all/conandata.yml +++ b/recipes/hictk/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.0.11": + url: "https://github.com/paulsengroup/hictk/archive/refs/tags/v0.0.11.tar.gz" + sha256: "a06b674de2301918188d1c890a95aaa4d6164377ebaa44cc07efb77fd9eb654c" "0.0.10": url: "https://github.com/paulsengroup/hictk/archive/refs/tags/v0.0.10.tar.gz" sha256: "0b2d60af73578b292317e5ab513f24965176f9852ceda29e8d02007a434588c3" diff --git a/recipes/hictk/all/conanfile.py b/recipes/hictk/all/conanfile.py index 5993c72d21567..5e466db516caa 100644 --- a/recipes/hictk/all/conanfile.py +++ b/recipes/hictk/all/conanfile.py @@ -41,7 +41,7 @@ def layout(self): def requirements(self): self.requires("bshoshany-thread-pool/4.0.1", transitive_headers=True) - self.requires("fast_float/6.1.0", transitive_headers=True) + self.requires("fast_float/6.1.1", transitive_headers=True) if self.options.with_eigen: self.requires("eigen/3.4.0", transitive_headers=True) self.requires("fmt/10.2.1", transitive_headers=True) @@ -49,7 +49,7 @@ def requirements(self): self.requires("highfive/2.9.0", transitive_headers=True) self.requires("libdeflate/1.19", transitive_headers=True) self.requires("parallel-hashmap/1.3.11", transitive_headers=True) # Note: v1.3.11 is more recent than v1.37 - self.requires("span-lite/0.10.3", transitive_headers=True) + self.requires("span-lite/0.11.0", transitive_headers=True) self.requires("spdlog/1.13.0", transitive_headers=True) self.requires("zstd/1.5.5", transitive_headers=True) @@ -121,3 +121,6 @@ def package_info(self): self.cpp_info.libdirs = [] self.cpp_info.set_property("cmake_file_name", "hictk") self.cpp_info.set_property("cmake_target_name", "hictk::libhictk") + + if self.options.with_eigen: + self.cpp_info.defines.append("HICTK_WITH_EIGEN") diff --git a/recipes/hictk/config.yml b/recipes/hictk/config.yml index 351a3e971990d..3ff8e282beaa5 100644 --- a/recipes/hictk/config.yml +++ b/recipes/hictk/config.yml @@ -1,4 +1,6 @@ versions: + "0.0.11": + folder: all "0.0.10": folder: all "0.0.9": From 2b137798c42caa3c0e1f4e3031b9f7625e948126 Mon Sep 17 00:00:00 2001 From: hoyhoy Date: Tue, 26 Mar 2024 08:27:33 -0700 Subject: [PATCH 348/405] (#22449) boost: fix for ppc compile * fix for boost on powerpc linux * ws * Skip checking boost math submodules Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries --- recipes/boost/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index f2f1c3f6feecd..25b060af95c59 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -1749,6 +1749,8 @@ def filter_transform_module_libraries(names): for name in names: if name in ("boost_stacktrace_windbg", "boost_stacktrace_windbg_cached") and self.settings.os != "Windows": 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",) and self.settings.os == "Windows": continue if name == "boost_stacktrace_addr2line" and not self._stacktrace_addr2line_available: From c9626f9f02679c3dbf7e4261fe320673ca32368a Mon Sep 17 00:00:00 2001 From: Guillaume Egles Date: Wed, 27 Mar 2024 02:12:25 -0700 Subject: [PATCH 349/405] (#23284) cmake: add version `3.29.0` --- recipes/cmake/binary/conandata.yml | 19 +++++++++++++++++++ recipes/cmake/config.yml | 2 ++ 2 files changed, 21 insertions(+) diff --git a/recipes/cmake/binary/conandata.yml b/recipes/cmake/binary/conandata.yml index 312a7c7d57530..25e592bef0ec8 100644 --- a/recipes/cmake/binary/conandata.yml +++ b/recipes/cmake/binary/conandata.yml @@ -1,4 +1,23 @@ sources: + "3.29.0": + Linux: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.0-linux-aarch64.tar.gz" + sha256: "2cb768a14b28a4478bb931d917dbc419305b82433bdecc046df98e7c336225fa" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.0-linux-x86_64.tar.gz" + sha256: "f06258f52c5649752dfb10c4c2e1d8167c760c8826f078c6f5c332fa9d976bf8" + Macos: + universal: + url: "https://cmake.org/files/v3.29/cmake-3.29.0-macos10.10-universal.tar.gz" + sha256: "868f356c56a3c35e8f39f0d4fb7e579cb2eb0ac06c26520d6a203d91bdc7ad09" + Windows: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.0-windows-arm64.zip" + sha256: "e5bea5c45b61f105429fc664364c5280acd40770cc74235b79e7422f608a9849" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.0-windows-x86_64.zip" + sha256: "9ab28eba1ab7911a0e57ab274f5990a283fffa1d22eb711792d5562e5869f9ef" "3.28.1": Linux: armv8: diff --git a/recipes/cmake/config.yml b/recipes/cmake/config.yml index 7ce9e3ce4a58b..6f9c7e82ab831 100644 --- a/recipes/cmake/config.yml +++ b/recipes/cmake/config.yml @@ -1,4 +1,6 @@ versions: + "3.29.0": + folder: "binary" "3.28.1": folder: "binary" "3.27.9": From e9b307bb8113eb39c776d7424222b281acfaa559 Mon Sep 17 00:00:00 2001 From: phwissmann <33758534+phwissmann@users.noreply.github.com> Date: Wed, 27 Mar 2024 11:08:05 +0100 Subject: [PATCH 350/405] (#23239) Alembic: bump imath to 3.1.10 - Avoid conflict with Openvdb 11.0.0 * Alembic: bump imath to 3.1.10 * Bump hdf5 to 1.14.3 Co-authored-by: Martin Valgur --------- Co-authored-by: Martin Valgur --- recipes/alembic/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/alembic/all/conanfile.py b/recipes/alembic/all/conanfile.py index 81ce4ae17f4f7..e7c175aeca597 100644 --- a/recipes/alembic/all/conanfile.py +++ b/recipes/alembic/all/conanfile.py @@ -44,9 +44,9 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("imath/3.1.9", transitive_headers=True) + self.requires("imath/3.1.10", transitive_headers=True) if self.options.with_hdf5: - self.requires("hdf5/1.14.2") + self.requires("hdf5/1.14.3") def validate(self): if self.settings.compiler.get_safe("cppstd"): From c7676caaf943b1fa6eca343913b06a00b61c55db Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 27 Mar 2024 20:08:41 +0900 Subject: [PATCH 351/405] (#23125) sdl: add version 2.30.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * sdl: add version 2.30.1 * support macOSX * revert iconv name * remove pdb files * Stop tests from being built * apply CMP0077 --------- Co-authored-by: Rubén Rincón Blanco --- recipes/sdl/all/conandata.yml | 3 +++ recipes/sdl/all/conanfile.py | 44 +++++++++++++++++++++-------------- recipes/sdl/config.yml | 2 ++ 3 files changed, 31 insertions(+), 18 deletions(-) diff --git a/recipes/sdl/all/conandata.yml b/recipes/sdl/all/conandata.yml index 5542cc7bb105c..f008d5014f61d 100644 --- a/recipes/sdl/all/conandata.yml +++ b/recipes/sdl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.30.1": + url: "https://www.libsdl.org/release/SDL2-2.30.1.tar.gz" + sha256: "01215ffbc8cfc4ad165ba7573750f15ddda1f971d5a66e9dcaffd37c587f473a" "2.28.5": url: "https://www.libsdl.org/release/SDL2-2.28.5.tar.gz" sha256: "332cb37d0be20cb9541739c61f79bae5a477427d79ae85e352089afdaf6666e4" diff --git a/recipes/sdl/all/conanfile.py b/recipes/sdl/all/conanfile.py index 97981518e1f52..cd55e0ceb1b78 100644 --- a/recipes/sdl/all/conanfile.py +++ b/recipes/sdl/all/conanfile.py @@ -79,12 +79,12 @@ class SDLConan(ConanFile): "libunwind": True, } generators = "CMakeDeps", "PkgConfigDeps", "VirtualBuildEnv" - + @property def _is_clang_cl(self): return self.settings.os == "Windows" and self.settings.compiler == "clang" and \ self.settings.compiler.get_safe("runtime") - + def layout(self): cmake_layout(self, src_folder="src") @@ -192,22 +192,23 @@ def source(self): def _patch_sources(self): apply_conandata_patches(self) - cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") - if self.settings.os == "Macos": - if self.options.iconv: - # If using conan-provided iconv, search for the symbol "libiconv_open" - replace_check = "check_library_exists(iconv libiconv_open" - else: - # When no tusing conan-provided icon, don't check for iconv at all - replace_check = "#check_library_exists(iconv iconv_open" - replace_in_file(self, cmakelists, "check_library_exists(iconv iconv_open", - replace_check) - - # Avoid assuming iconv is available if it is provided by the C runtime, - # and let SDL build the fallback implementation - replace_in_file(self, cmakelists, - 'check_library_exists(c iconv_open "" HAVE_BUILTIN_ICONV)', - '# check_library_exists(c iconv_open "" HAVE_BUILTIN_ICONV)') + if Version(self.version) < "2.30.0": + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") + if self.settings.os == "Macos": + if self.options.iconv: + # If using conan-provided iconv, search for the symbol "libiconv_open" + replace_check = "check_library_exists(iconv libiconv_open" + else: + # When no tusing conan-provided icon, don't check for iconv at all + replace_check = "#check_library_exists(iconv iconv_open" + replace_in_file(self, cmakelists, "check_library_exists(iconv iconv_open", + replace_check) + + # Avoid assuming iconv is available if it is provided by the C runtime, + # and let SDL build the fallback implementation + replace_in_file(self, cmakelists, + 'check_library_exists(c iconv_open "" HAVE_BUILTIN_ICONV)', + '# check_library_exists(c iconv_open "" HAVE_BUILTIN_ICONV)') # Ensure to find wayland-scanner from wayland recipe in build requirements (or requirements if 1 profile) if self.options.get_safe("wayland"): @@ -237,6 +238,7 @@ def define_toolchain(self): tc.variables["HAVE_LIBC"] = True tc.variables["SDL_SHARED"] = self.options.shared tc.variables["SDL_STATIC"] = not self.options.shared + tc.variables["SDL_TEST"] = False tc.variables["SDL_OPENGL"] = self.options.opengl tc.variables["SDL_OPENGLES"] = self.options.opengles tc.variables["SDL_VULKAN"] = self.options.vulkan @@ -313,6 +315,9 @@ def define_toolchain(self): if Version(self.version) >= "2.0.22": tc.variables["SDL2_DISABLE_SDL2MAIN"] = not self.options.sdl2main + if Version(self.version) >= "2.30.0": + tc.variables["SDL_LIBICONV"] = self.options.get_safe("iconv", False) + tc.variables["SDL_SYSTEM_ICONV"] = False # Add extra information collected from the deps tc.variables["EXTRA_LDFLAGS"] = ";".join(cmake_extra_ldflags) @@ -320,6 +325,7 @@ def define_toolchain(self): cmake_extra_cflags = ["-I{}".format(path) for _, dep in self.dependencies.items() for path in dep.cpp_info.includedirs] tc.variables["EXTRA_CFLAGS"] = ";".join(cmake_extra_cflags).replace(os.sep, '/') tc.variables["EXTRA_LIBS"] = ";".join(cmake_extra_libs) + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() def build(self): @@ -334,6 +340,8 @@ def package(self): copy(self, pattern="LICENSE.txt", src=os.path.join(self.source_folder), dst=os.path.join(self.package_folder, "licenses")) rm(self, "sdl2-config", os.path.join(self.package_folder, "bin")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) rmdir(self, os.path.join(self.package_folder, "cmake")) rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) diff --git a/recipes/sdl/config.yml b/recipes/sdl/config.yml index e05c00ea2969e..8dbb1d123695c 100644 --- a/recipes/sdl/config.yml +++ b/recipes/sdl/config.yml @@ -1,4 +1,6 @@ versions: + "2.30.1": + folder: all "2.28.5": folder: all "2.28.3": From 032d8120edd968aa54ffa8321fb270336c1e4cdd Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 27 Mar 2024 21:07:58 +0900 Subject: [PATCH 352/405] (#23237) rabbitmq-c: add version 0.14.0 --- recipes/rabbitmq-c/all/conandata.yml | 3 +++ recipes/rabbitmq-c/all/conanfile.py | 11 ++++++++++- recipes/rabbitmq-c/config.yml | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/recipes/rabbitmq-c/all/conandata.yml b/recipes/rabbitmq-c/all/conandata.yml index 4a93aef8c8422..eeadabf60d0ef 100755 --- a/recipes/rabbitmq-c/all/conandata.yml +++ b/recipes/rabbitmq-c/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.14.0": + url: "https://github.com/alanxz/rabbitmq-c/archive/v0.14.0.tar.gz" + sha256: "839b28eae20075ac58f45925fe991d16a3138cbde015db0ee11df1acb1c493df" "0.13.0": url: "https://github.com/alanxz/rabbitmq-c/archive/v0.13.0.tar.gz" sha256: "8b224e41bba504fc52b02f918d8df7e4bf5359d493cbbff36c06078655c676e6" diff --git a/recipes/rabbitmq-c/all/conanfile.py b/recipes/rabbitmq-c/all/conanfile.py index a192092e12ead..278092bcc50b8 100755 --- a/recipes/rabbitmq-c/all/conanfile.py +++ b/recipes/rabbitmq-c/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import copy, get, rmdir from conan.tools.scm import Version +from conan.tools.env import VirtualBuildEnv import os required_conan_version = ">=1.53.0" @@ -9,10 +10,10 @@ class RabbitmqcConan(ConanFile): name = "rabbitmq-c" + description = "This is a C-language AMQP client library for use with v2.0+ of the RabbitMQ broker." license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/alanxz/rabbitmq-c" - description = "This is a C-language AMQP client library for use with v2.0+ of the RabbitMQ broker." topics = ("rabbitmq", "message queue") package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -41,6 +42,10 @@ def requirements(self): if self.options.ssl: self.requires("openssl/[>=1.1 <4]") + def build_requirements(self): + if Version(self.version) >= "0.14.0": + self.tool_requires("cmake/[>=3.22 <4]") + def layout(self): cmake_layout(self, src_folder="src") @@ -68,6 +73,10 @@ def generate(self): deps = CMakeDeps(self) deps.generate() + if Version(self.version) >= "0.14.0": + venv = VirtualBuildEnv(self) + venv.generate(scope="build") + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/rabbitmq-c/config.yml b/recipes/rabbitmq-c/config.yml index 5d590dc0b2c3b..b97f7da4c2ee8 100644 --- a/recipes/rabbitmq-c/config.yml +++ b/recipes/rabbitmq-c/config.yml @@ -1,4 +1,6 @@ versions: + "0.14.0": + folder: all "0.13.0": folder: all "0.11.0": From fa153f00b615449424c1eaab21815111f860f024 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 27 Mar 2024 21:48:24 +0900 Subject: [PATCH 353/405] (#23238) libsrtp: add version 2.6.0 * libsrtp: add version 2.6.0 * apply CMP0077 policy Co-authored-by: Martin Valgur * add cmake as build_requirements --------- Co-authored-by: Martin Valgur --- recipes/libsrtp/all/conandata.yml | 3 +++ recipes/libsrtp/all/conanfile.py | 24 +++++++++++++++++++----- recipes/libsrtp/config.yml | 2 ++ 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/recipes/libsrtp/all/conandata.yml b/recipes/libsrtp/all/conandata.yml index d7ca622cbdb82..04f0998b86517 100644 --- a/recipes/libsrtp/all/conandata.yml +++ b/recipes/libsrtp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.6.0": + url: "https://github.com/cisco/libsrtp/archive/v2.6.0.tar.gz" + sha256: "bf641aa654861be10570bfc137d1441283822418e9757dc71ebb69a6cf84ea6b" "2.5.0": url: "https://github.com/cisco/libsrtp/archive/v2.5.0.tar.gz" sha256: "8a43ef8e9ae2b665292591af62aa1a4ae41e468b6d98d8258f91478735da4e09" diff --git a/recipes/libsrtp/all/conanfile.py b/recipes/libsrtp/all/conanfile.py index 8a081d12ab6ba..38334eef95695 100644 --- a/recipes/libsrtp/all/conanfile.py +++ b/recipes/libsrtp/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import collect_libs, copy, get, save, rmdir from conan.tools.scm import Version +from conan.tools.env import VirtualBuildEnv import os required_conan_version = ">=1.53.0" @@ -14,10 +15,10 @@ class LibsrtpRecipe(ConanFile): "Protocol (SRTP), the Universal Security Transform (UST), and a supporting" "cryptographic kernel." ) - topics = ("srtp",) - homepage = "https://github.com/cisco/libsrtp" - url = "https://github.com/conan-io/conan-center-index" license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/cisco/libsrtp" + topics = ("srtp",) package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -48,21 +49,34 @@ def requirements(self): if self.options.with_openssl: self.requires("openssl/[>=1.1 <4]") + def build_requirements(self): + if Version(self.version) >= "2.6.0": + self.tool_requires("cmake/[>=3.21 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) tc.variables["ENABLE_OPENSSL"] = self.options.with_openssl - tc.variables["TEST_APPS"] = False + if Version(self.version) < "2.6.0": + tc.variables["TEST_APPS"] = False + else: + tc.variables["LIBSRTP_TEST_APPS"] = False if Version(self.version) < "2.4.0": # Relocatable shared libs on Macos tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" - if Version(self.version) >= "2.5.0": + if "2.5.0" <= Version(self.version) < "2.6.0": tc.cache_variables["BUILD_WITH_WARNINGS"] = False + if "2.6.0" <= Version(self.version): + tc.cache_variables["ENABLE_WARNINGS"] = False + tc.cache_variables["ENABLE_WARNINGS_AS_ERRORS"] = False + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() deps = CMakeDeps(self) deps.generate() + venv = VirtualBuildEnv(self) + venv.generate(scope="build") def _patch_sources(self): save(self, os.path.join(self.source_folder, "CMakeLists.txt"), diff --git a/recipes/libsrtp/config.yml b/recipes/libsrtp/config.yml index 0abd910fd2126..8daa9e28d8c53 100644 --- a/recipes/libsrtp/config.yml +++ b/recipes/libsrtp/config.yml @@ -1,4 +1,6 @@ versions: + "2.6.0": + folder: all "2.5.0": folder: all "2.4.2": From 48198b1590bd08a123cfde6e75152f0a0c9b280d Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 27 Mar 2024 23:28:02 +0900 Subject: [PATCH 354/405] (#23224) erkir: add version 2.1.1 * erkir: add version 2.1.0 * link math lib * update 2.1.1 --- recipes/erkir/all/conandata.yml | 13 +++++++++ recipes/erkir/all/conanfile.py | 8 ++++-- .../all/patches/2.1.1-0002-fix-cmake.patch | 22 +++++++++++++++ .../patches/2.1.1-0003-fix-erkir_export.patch | 28 +++++++++++++++++++ recipes/erkir/config.yml | 2 ++ 5 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 recipes/erkir/all/patches/2.1.1-0002-fix-cmake.patch create mode 100644 recipes/erkir/all/patches/2.1.1-0003-fix-erkir_export.patch diff --git a/recipes/erkir/all/conandata.yml b/recipes/erkir/all/conandata.yml index 24a6857c0b7eb..f16d2da6950e6 100644 --- a/recipes/erkir/all/conandata.yml +++ b/recipes/erkir/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.1": + url: "https://github.com/vahancho/erkir/archive/refs/tags/v2.1.1.tar.gz" + sha256: "b314824c126bf933e2f08e5335e12b7ef3ded9ceb341d542276455d991e7e85d" "2.0.0": url: "https://github.com/vahancho/erkir/archive/refs/tags/v2.0.0.tar.gz" sha256: "98d095adcf0f2f11e3ba345bd5bbe890568cde69de9680b2c2a424f0008453ac" @@ -6,6 +9,16 @@ sources: url: "https://github.com/vahancho/erkir/archive/refs/tags/1.0.0.tar.gz" sha256: "0bc5122fe2fef0f9036de275483af7f8adb947f6e8dd63fc18ac085ef31e9421" patches: + "2.1.1": + - patch_file: "patches/2.0.0-0001-remove-specify-architecture.patch" + patch_description: "fix supported architectures limited to x86/x86_64" + patch_type: "conan" + - patch_file: "patches/2.1.1-0002-fix-cmake.patch" + patch_description: "disable shared and fPIC options" + patch_type: "conan" + - patch_file: "patches/2.1.1-0003-fix-erkir_export.patch" + patch_description: "define ERKIR_EXPORT as empty on static build" + patch_type: "conan" "2.0.0": - patch_file: "patches/2.0.0-0001-remove-specify-architecture.patch" patch_description: "fix supported architectures limited to x86/x86_64" diff --git a/recipes/erkir/all/conanfile.py b/recipes/erkir/all/conanfile.py index 941e33312f121..10808e03cf409 100644 --- a/recipes/erkir/all/conanfile.py +++ b/recipes/erkir/all/conanfile.py @@ -81,7 +81,11 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): - self.cpp_info.set_property("cmake_file_name", "erkir") - self.cpp_info.set_property("cmake_target_name", "erkir::erkir") postfix = "d" if Version(self.version) >= "2.0.0" and self.settings.build_type == "Debug" else "" self.cpp_info.libs = [f"erkir{postfix}"] + + if Version(self.version) >= "2.1.0" and self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + + self.cpp_info.set_property("cmake_file_name", "erkir") + self.cpp_info.set_property("cmake_target_name", "erkir::erkir") diff --git a/recipes/erkir/all/patches/2.1.1-0002-fix-cmake.patch b/recipes/erkir/all/patches/2.1.1-0002-fix-cmake.patch new file mode 100644 index 0000000000000..0a92d7aabdffc --- /dev/null +++ b/recipes/erkir/all/patches/2.1.1-0002-fix-cmake.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d72f102..7bf1655 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.9) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) + set(CMAKE_CXX_STANDARD 11) +-set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++# set(CMAKE_POSITION_INDEPENDENT_CODE ON) + + # The project definition + project(erkir VERSION 2.1.1 +@@ -14,7 +14,7 @@ project(erkir VERSION 2.1.1 + include(GNUInstallDirs) + + # General options +-option(BUILD_SHARED_LIBS "Build using shared libraries" ON) ++# option(BUILD_SHARED_LIBS "Build using shared libraries" ON) + option(ENABLE_TESTING "Enable unit test build" OFF) + + if (0) diff --git a/recipes/erkir/all/patches/2.1.1-0003-fix-erkir_export.patch b/recipes/erkir/all/patches/2.1.1-0003-fix-erkir_export.patch new file mode 100644 index 0000000000000..a12676d0ed400 --- /dev/null +++ b/recipes/erkir/all/patches/2.1.1-0003-fix-erkir_export.patch @@ -0,0 +1,28 @@ +diff --git a/include/export.h b/include/export.h +index edcb0b3..e090174 100644 +--- a/include/export.h ++++ b/include/export.h +@@ -1,7 +1,7 @@ + #ifndef __EXPORT_H_ + #define __EXPORT_H_ + +-#ifdef _WIN32 ++#if defined(_WIN32) && defined(ERKIR_SHARED) + #ifdef MAKEDLL + # define ERKIR_EXPORT __declspec(dllexport) + #else +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index ad88fd6..519a300 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -38,6 +38,10 @@ if (MSVC) + target_compile_definitions(${TARGET} PUBLIC MAKEDLL) + endif() + ++if (BUILD_SHARED_LIBS) ++ target_compile_definitions(${TARGET} PUBLIC ERKIR_SHARED) ++endif() ++ + ############################################################################### + # The installation and packaging + # diff --git a/recipes/erkir/config.yml b/recipes/erkir/config.yml index 870fb33e55af0..65dc9fbda0110 100644 --- a/recipes/erkir/config.yml +++ b/recipes/erkir/config.yml @@ -1,4 +1,6 @@ versions: + "2.1.1": + folder: all "2.0.0": folder: all "1.0.0": From 1634381974b91b14804ce996c00fdd1374a29b72 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 27 Mar 2024 17:05:25 +0200 Subject: [PATCH 355/405] (#21937) async_simple: add v1.2 --- recipes/async_simple/all/conandata.yml | 6 ++++-- recipes/async_simple/config.yml | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/recipes/async_simple/all/conandata.yml b/recipes/async_simple/all/conandata.yml index b0f536ac75473..884ed02955ab2 100644 --- a/recipes/async_simple/all/conandata.yml +++ b/recipes/async_simple/all/conandata.yml @@ -1,5 +1,7 @@ sources: + "1.2": + url: "https://github.com/alibaba/async_simple/archive/refs/tags/1.2.tar.gz" + sha256: "a59a2674ac2b0a3997b90873b2bf0fbe4d96fdedbe6a2628c16c92a65a3fa39a" "1.0.0": - url: - - "https://github.com/alibaba/async_simple/archive/refs/tags/1.0.tar.gz" + url: "https://github.com/alibaba/async_simple/archive/refs/tags/1.0.tar.gz" sha256: "b243fb7af5d61b534fe18b662d16498392bbce1deffdc68e58829aa31db7badf" diff --git a/recipes/async_simple/config.yml b/recipes/async_simple/config.yml index 5d96905a31039..0b3d8acdb470b 100644 --- a/recipes/async_simple/config.yml +++ b/recipes/async_simple/config.yml @@ -1,4 +1,5 @@ versions: - # Newer versions at the top + "1.2": + folder: all "1.0.0": folder: all From 388a1a0fc62b573979872f631386a0a1acee001c Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 27 Mar 2024 17:45:45 +0200 Subject: [PATCH 356/405] (#21917) ensmallen: add v2.21.0 --- recipes/ensmallen/all/conandata.yml | 3 +++ recipes/ensmallen/all/conanfile.py | 2 +- recipes/ensmallen/config.yml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/ensmallen/all/conandata.yml b/recipes/ensmallen/all/conandata.yml index a566be23b4893..31733be82e383 100644 --- a/recipes/ensmallen/all/conandata.yml +++ b/recipes/ensmallen/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.21.0": + url: "https://ensmallen.org/files/ensmallen-2.21.0.tar.gz" + sha256: "076f9d84e1ebc84c0ae19ee63accfc8fd3ec850f8993784bd9277776c3af2932" "2.19.1": url: "https://ensmallen.org/files/ensmallen-2.19.1.tar.gz" sha256: "f36ad7f08b0688d2a8152e1c73dd437c56ed7a5af5facf65db6ffd977b275b2e" diff --git a/recipes/ensmallen/all/conanfile.py b/recipes/ensmallen/all/conanfile.py index 7b6250290ad81..093bca4ec6467 100644 --- a/recipes/ensmallen/all/conanfile.py +++ b/recipes/ensmallen/all/conanfile.py @@ -25,7 +25,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("armadillo/12.2.0") + self.requires("armadillo/12.6.4") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/ensmallen/config.yml b/recipes/ensmallen/config.yml index 3af3934850762..0bd90f07549cf 100644 --- a/recipes/ensmallen/config.yml +++ b/recipes/ensmallen/config.yml @@ -1,3 +1,5 @@ versions: + "2.21.0": + folder: all "2.19.1": folder: all From f729c980310ae07dc01a9ab07dc52dab9b759b97 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 28 Mar 2024 01:29:34 +0900 Subject: [PATCH 357/405] (#23261) libftp: add recipe * libftp: add recipe * support shared build * link math lib * add invalid config for windows shared --------- Co-authored-by: czoido --- recipes/libftp/all/conandata.yml | 4 + recipes/libftp/all/conanfile.py | 106 ++++++++++++++++++ .../libftp/all/test_package/CMakeLists.txt | 8 ++ recipes/libftp/all/test_package/conanfile.py | 26 +++++ .../libftp/all/test_package/test_package.cpp | 14 +++ recipes/libftp/config.yml | 3 + 6 files changed, 161 insertions(+) create mode 100644 recipes/libftp/all/conandata.yml create mode 100644 recipes/libftp/all/conanfile.py create mode 100644 recipes/libftp/all/test_package/CMakeLists.txt create mode 100644 recipes/libftp/all/test_package/conanfile.py create mode 100644 recipes/libftp/all/test_package/test_package.cpp create mode 100644 recipes/libftp/config.yml diff --git a/recipes/libftp/all/conandata.yml b/recipes/libftp/all/conandata.yml new file mode 100644 index 0000000000000..6f6b3ca9dc582 --- /dev/null +++ b/recipes/libftp/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.4.1": + url: "https://github.com/deniskovalchuk/libftp/archive/refs/tags/v0.4.1.tar.gz" + sha256: "873dd7647234f72fecfe57150b0a4a60f4c16611d26ad7eb687e0561f54b9eec" diff --git a/recipes/libftp/all/conanfile.py b/recipes/libftp/all/conanfile.py new file mode 100644 index 0000000000000..a3d283d843da6 --- /dev/null +++ b/recipes/libftp/all/conanfile.py @@ -0,0 +1,106 @@ +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 +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.53.0" + + +class LibFTPConan(ConanFile): + name = "libftp" + description = "A cross-platform FTP client library based on Boost.Asio" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/deniskovalchuk/libftp" + topics = ("ftp", "boost") + 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": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("boost/1.84.0", transitive_headers=True) + + def validate(self): + if is_msvc(self) and self.options.shared: + raise ConanInvalidConfiguration(f"{self.ref} doesn't support shared builds with Visual Studio.") + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["LIBFTP_BUILD_TEST"] = False + tc.variables["LIBFTP_BUILD_EXAMPLE"] = False + tc.variables["LIBFTP_BUILD_CMDLINE_CLIENT"] = False + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["ftp"] + + self.cpp_info.set_property("cmake_file_name", "ftp") + self.cpp_info.set_property("cmake_target_name", "ftp::ftp") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + + if self.settings.os == "Windows": + self.cpp_info.system_libs.append("ws2_32") diff --git a/recipes/libftp/all/test_package/CMakeLists.txt b/recipes/libftp/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..d4b87e9e23e3a --- /dev/null +++ b/recipes/libftp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(ftp REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE ftp::ftp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/libftp/all/test_package/conanfile.py b/recipes/libftp/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/libftp/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/libftp/all/test_package/test_package.cpp b/recipes/libftp/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..8c6d986925378 --- /dev/null +++ b/recipes/libftp/all/test_package/test_package.cpp @@ -0,0 +1,14 @@ +#include +#include "ftp/client.hpp" + +int main(void) { + try { + ftp::client client; + client.get_current_directory(); + client.disconnect(); + } + catch (const std::exception & ex) { + std::cerr << ex.what() << std::endl; + } + return 0; +} diff --git a/recipes/libftp/config.yml b/recipes/libftp/config.yml new file mode 100644 index 0000000000000..3a9d5538921fc --- /dev/null +++ b/recipes/libftp/config.yml @@ -0,0 +1,3 @@ +versions: + "0.4.1": + folder: all From fa476b26520c9d8317ee3781c603a888935d4754 Mon Sep 17 00:00:00 2001 From: Gareth Sylvester-Bradley <31761158+garethsb@users.noreply.github.com> Date: Wed, 27 Mar 2024 17:08:18 +0000 Subject: [PATCH 358/405] (#23264) [avahi] Bump expat and glib Match dbus recipe --- recipes/avahi/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/avahi/all/conanfile.py b/recipes/avahi/all/conanfile.py index 6dfd0f410cd70..7c5e4d7f868ae 100644 --- a/recipes/avahi/all/conanfile.py +++ b/recipes/avahi/all/conanfile.py @@ -45,8 +45,8 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("glib/2.78.1") - self.requires("expat/2.5.0") + self.requires("glib/2.78.3") + self.requires("expat/2.6.0") self.requires("libdaemon/0.14") self.requires("dbus/1.15.8") self.requires("gdbm/1.23") From 057d663648abde4c092f6e0136de2dbd1f267cc4 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 27 Mar 2024 18:49:17 +0100 Subject: [PATCH 359/405] (#23242) opencv 4.x: re-enable quirc by default * re-enable quirc by default for opencv < 4.9 * less confusing patches --- recipes/opencv/4.x/conanfile.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/recipes/opencv/4.x/conanfile.py b/recipes/opencv/4.x/conanfile.py index 4f868f3cc469f..27d637332f3ab 100644 --- a/recipes/opencv/4.x/conanfile.py +++ b/recipes/opencv/4.x/conanfile.py @@ -203,7 +203,7 @@ class OpenCVConan(ConanFile): "with_msmf": True, "with_msmf_dxva": True, # objdetect module options - "with_quirc": False, + "with_quirc": True, # videoio module options "with_ffmpeg": True, "with_v4l": False, @@ -351,9 +351,6 @@ def config_options(self): if not self._has_with_wayland_option: self.options.with_gtk = True - if Version(self.version) >= "4.9": - self.options.with_quirc = True - @property def _opencv_modules(self): def imageformats_deps(): @@ -1241,9 +1238,9 @@ def _patch_sources(self): replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "ANDROID OR NOT UNIX", "FALSE") replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "elseif(EMSCRIPTEN)", "elseif(QNXNTO)\nelseif(EMSCRIPTEN)") - if self.options.with_quirc: - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "add_subdirectory(3rdparty/quirc)", "# add_subdirectory(3rdparty/quirc)") - + ## Upstream CMakeLists vendors quirc in CMakeLists of 3rdparty/quirc. + ## Instead we rely on find-quirc.patch in order to link external quirc. + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "add_subdirectory(3rdparty/quirc)", "") ## Fix link to several dependencies replace_in_file(self, os.path.join(self.source_folder, "modules", "imgcodecs", "CMakeLists.txt"), "JASPER_", "Jasper_") @@ -1492,8 +1489,6 @@ def generate(self): if self.options.get_safe("with_protobuf"): tc.variables["PROTOBUF_UPDATE_FILES"] = True tc.variables["WITH_ADE"] = self.options.gapi - if self.options.objdetect: - tc.variables["HAVE_QUIRC"] = self.options.with_quirc # force usage of quirc requirement # Extra modules if any([self.options.get_safe(module) for module in OPENCV_EXTRA_MODULES_OPTIONS]) or self.options.with_cuda: From c7c6e636bd2658b81f8c12a25eaf21ede4bf9f19 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Thu, 28 Mar 2024 18:47:27 -0500 Subject: [PATCH 360/405] (#23201) libva/2.20.0: Fix discovery of wayland-scanner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * libva/2.20.0: Fix discovery of wayland-scanner Cross-compilation is currently broken for the libva package for Conan V1. It doesn't properly make the wayland package available in the build context through pkg-config. This is necessary for the project to find the wayland-scanner program. I've updated libva to use the same procedure as xkbcommon to incorporate Wayland's pkg-config in the build context. Note that this change is not necessary for Conan version 2.2.1 which works out-of-the-box. * Update recipes/libva/all/conanfile.py Co-authored-by: Rubén Rincón Blanco * Update recipes/libva/all/conanfile.py Co-authored-by: Rubén Rincón Blanco * Update recipes/libva/all/conanfile.py Co-authored-by: Rubén Rincón Blanco * Update recipes/libva/all/conanfile.py Co-authored-by: Martin Valgur --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: Martin Valgur --- recipes/libva/all/conanfile.py | 39 ++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/recipes/libva/all/conanfile.py b/recipes/libva/all/conanfile.py index 4020db9e7c63e..d92edb9da1d88 100644 --- a/recipes/libva/all/conanfile.py +++ b/recipes/libva/all/conanfile.py @@ -1,15 +1,16 @@ +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 apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir from conan.tools.gnu import PkgConfigDeps from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain -import os -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.60.0 <2 || >=2.0.6" class PackageConan(ConanFile): @@ -37,6 +38,10 @@ class PackageConan(ConanFile): "with_win32": True, } + @property + def _has_build_profile(self): + return hasattr(self, "settings_build") + def export_sources(self): export_conandata_patches(self) @@ -76,9 +81,9 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} can not be built without at least one backend dev files.") def build_requirements(self): - if self.options.get_safe("with_wayland"): - self.tool_requires("wayland/1.22.0") - self.tool_requires("meson/1.3.1") + if self.options.get_safe("with_wayland") and self._has_build_profile: + self.tool_requires("wayland/") + self.tool_requires("meson/1.3.2") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): self.tool_requires("pkgconf/2.1.0") @@ -90,14 +95,30 @@ def generate(self): tc.project_options["disable_drm"] = not self.options.get_safe("with_drm") for opt in ['with_x11', 'with_glx', 'with_wayland', 'with_win32']: tc.project_options[opt] = "yes" if self.options.get_safe(opt) else "no" + tc.project_options["build.pkg_config_path"] = self.generators_folder tc.generate() - tc = PkgConfigDeps(self) - tc.generate() + pkg_config_deps = PkgConfigDeps(self) + if self.options.get_safe("with_wayland") and self._has_build_profile: + pkg_config_deps.build_context_activated = ["wayland"] + pkg_config_deps.build_context_suffix = {"wayland": "_BUILD"} + pkg_config_deps.generate() tc = VirtualBuildEnv(self) tc.generate() - def build(self): + def _patch_sources(self): apply_conandata_patches(self) + if self.options.get_safe("with_wayland") and self._has_build_profile: + # Patch the build system to use the pkg-config files generated for the build context. + meson_build_file = os.path.join(self.source_folder, "meson.build") + replace_in_file( + self, + meson_build_file, + "wayland_scanner_dep = dependency('wayland-scanner',", + "wayland_scanner_dep = dependency('wayland-scanner_BUILD',", + ) + + def build(self): + self._patch_sources() meson = Meson(self) meson.configure() meson.build() From 8cf8e8faf59d8f21c6259756e4cdcbdaefe22558 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Sat, 30 Mar 2024 07:48:35 -0500 Subject: [PATCH 361/405] (#23311) xz_utils/5.6.x: Remove compromised versions CVE-2024-3094 See #23310. --- recipes/xz_utils/cmake/conandata.yml | 7 - recipes/xz_utils/cmake/conanfile.py | 120 ------------------ .../cmake/test_package/CMakeLists.txt | 26 ---- .../xz_utils/cmake/test_package/conanfile.py | 26 ---- .../cmake/test_package/test_package.c | 8 -- .../cmake/test_v1_package/CMakeLists.txt | 8 -- .../cmake/test_v1_package/conanfile.py | 17 --- recipes/xz_utils/config.yml | 4 - 8 files changed, 216 deletions(-) delete mode 100644 recipes/xz_utils/cmake/conandata.yml delete mode 100644 recipes/xz_utils/cmake/conanfile.py delete mode 100644 recipes/xz_utils/cmake/test_package/CMakeLists.txt delete mode 100644 recipes/xz_utils/cmake/test_package/conanfile.py delete mode 100644 recipes/xz_utils/cmake/test_package/test_package.c delete mode 100644 recipes/xz_utils/cmake/test_v1_package/CMakeLists.txt delete mode 100644 recipes/xz_utils/cmake/test_v1_package/conanfile.py diff --git a/recipes/xz_utils/cmake/conandata.yml b/recipes/xz_utils/cmake/conandata.yml deleted file mode 100644 index 8825601a50d2d..0000000000000 --- a/recipes/xz_utils/cmake/conandata.yml +++ /dev/null @@ -1,7 +0,0 @@ -sources: - "5.6.1": - url: "https://github.com/tukaani-project/xz/releases/download/v5.6.1/xz-5.6.1.tar.xz" - sha256: "f334777310ca3ae9ba07206d78ed286a655aa3f44eec27854f740c26b2cd2ed0" - "5.6.0": - url: "https://github.com/tukaani-project/xz/releases/download/v5.6.0/xz-5.6.0.tar.xz" - sha256: "cdafe1632f139c82937cc1ed824f7a60b7b0a0619dfbbd681dcac02b1ac28f5b" diff --git a/recipes/xz_utils/cmake/conanfile.py b/recipes/xz_utils/cmake/conanfile.py deleted file mode 100644 index 29d660487cdf7..0000000000000 --- a/recipes/xz_utils/cmake/conanfile.py +++ /dev/null @@ -1,120 +0,0 @@ -from conan import ConanFile -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.errors import ConanInvalidConfiguration -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rename, rmdir, save -from conan.tools.scm import Version -import os -import textwrap - -required_conan_version = ">=1.54.0" - - -class XZUtilsConan(ConanFile): - name = "xz_utils" - description = ( - "XZ Utils is free general-purpose data compression software with a high " - "compression ratio. XZ Utils were written for POSIX-like systems, but also " - "work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils." - ) - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://tukaani.org/xz" - topics = ("lzma", "xz", "compression") - license = "Unlicense", "LGPL-2.1-or-later", "GPL-2.0-or-later", "GPL-3.0-or-later" - package_type = "library" - settings = "os", "arch", "compiler", "build_type" - options = { - "shared": [True, False], - "fPIC": [True, False], - } - default_options = { - "shared": False, - "fPIC": True, - } - - def export_sources(self): - export_conandata_patches(self) - - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - self.settings.rm_safe("compiler.cppstd") - self.settings.rm_safe("compiler.libcxx") - - def validate(self): - # This is only from 5.6.0 onwards, they are just in a different recipe so no need to check version. - if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "7": - raise ConanInvalidConfiguration(f"{self.ref} does not work on GCC<7 due to errors with inline assembly") - - 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["BUILD_TESTING"] = False - tc.generate() - - def build(self): - apply_conandata_patches(self) - cmake = CMake(self) - cmake.configure() - cmake.build() - - def package(self): - copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - - self._create_cmake_module_variables( - os.path.join(self.package_folder, self._module_file_rel_path), - ) - cmake = CMake(self) - cmake.install() - - rmdir(self, os.path.join(self.package_folder, "share")) - rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - rmdir(self, os.path.join(self.package_folder, "lib", "cmake", "liblzma")) - if self.settings.os == "Windows": - rename(self, os.path.join(self.package_folder, "lib", "liblzma.lib"), os.path.join(self.package_folder, "lib", "lzma.lib")) - - def _create_cmake_module_variables(self, module_file): - # TODO: also add LIBLZMA_HAS_AUTO_DECODER, LIBLZMA_HAS_EASY_ENCODER & LIBLZMA_HAS_LZMA_PRESET - content = textwrap.dedent(f"""\ - set(LIBLZMA_FOUND TRUE) - if(DEFINED LibLZMA_INCLUDE_DIRS) - set(LIBLZMA_INCLUDE_DIRS ${{LibLZMA_INCLUDE_DIRS}}) - endif() - if(DEFINED LibLZMA_LIBRARIES) - set(LIBLZMA_LIBRARIES ${{LibLZMA_LIBRARIES}}) - endif() - set(LIBLZMA_VERSION_MAJOR {Version(self.version).major}) - set(LIBLZMA_VERSION_MINOR {Version(self.version).minor}) - set(LIBLZMA_VERSION_PATCH {Version(self.version).patch}) - set(LIBLZMA_VERSION_STRING "{self.version}") - """) - save(self, module_file, content) - - @property - def _module_file_rel_path(self): - return os.path.join("lib", "cmake", f"conan-official-{self.name}-variables.cmake") - - def package_info(self): - self.cpp_info.set_property("cmake_find_mode", "both") - self.cpp_info.set_property("cmake_file_name", "LibLZMA") - self.cpp_info.set_property("cmake_target_name", "LibLZMA::LibLZMA") - self.cpp_info.set_property("cmake_build_modules", [self._module_file_rel_path]) - self.cpp_info.set_property("pkg_config_name", "liblzma") - self.cpp_info.libs = ["lzma"] - if not self.options.shared: - self.cpp_info.defines.append("LZMA_API_STATIC") - if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs.append("pthread") - - # TODO: to remove in conan v2 once cmake_find_package* & pkg_config generators removed - self.cpp_info.names["cmake_find_package"] = "LibLZMA" - self.cpp_info.names["cmake_find_package_multi"] = "LibLZMA" - self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] diff --git a/recipes/xz_utils/cmake/test_package/CMakeLists.txt b/recipes/xz_utils/cmake/test_package/CMakeLists.txt deleted file mode 100644 index cd4e960a3ff01..0000000000000 --- a/recipes/xz_utils/cmake/test_package/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package LANGUAGES C) - -find_package(LibLZMA REQUIRED) - -add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE LibLZMA::LibLZMA) - -# Test whether variables from https://cmake.org/cmake/help/latest/module/FindLibLZMA.html -# are properly defined in conan generators -set(_custom_vars - LIBLZMA_FOUND - LIBLZMA_INCLUDE_DIRS - LIBLZMA_LIBRARIES - LIBLZMA_VERSION_MAJOR - LIBLZMA_VERSION_MINOR - LIBLZMA_VERSION_PATCH - LIBLZMA_VERSION_STRING -) -foreach(_custom_var ${_custom_vars}) - if(DEFINED ${_custom_var}) - message(STATUS "${_custom_var}: ${${_custom_var}}") - else() - message(FATAL_ERROR "${_custom_var} not defined") - endif() -endforeach() diff --git a/recipes/xz_utils/cmake/test_package/conanfile.py b/recipes/xz_utils/cmake/test_package/conanfile.py deleted file mode 100644 index 0a6bc68712d90..0000000000000 --- a/recipes/xz_utils/cmake/test_package/conanfile.py +++ /dev/null @@ -1,26 +0,0 @@ -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/xz_utils/cmake/test_package/test_package.c b/recipes/xz_utils/cmake/test_package/test_package.c deleted file mode 100644 index a1f55ac414846..0000000000000 --- a/recipes/xz_utils/cmake/test_package/test_package.c +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include -#include - -int main() { - printf("LZMA version %s\n", lzma_version_string()); - return EXIT_SUCCESS; -} diff --git a/recipes/xz_utils/cmake/test_v1_package/CMakeLists.txt b/recipes/xz_utils/cmake/test_v1_package/CMakeLists.txt deleted file mode 100644 index 0d20897301b68..0000000000000 --- a/recipes/xz_utils/cmake/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/xz_utils/cmake/test_v1_package/conanfile.py b/recipes/xz_utils/cmake/test_v1_package/conanfile.py deleted file mode 100644 index 19e6a0c06e3d8..0000000000000 --- a/recipes/xz_utils/cmake/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package" - - 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/xz_utils/config.yml b/recipes/xz_utils/config.yml index 7cd5f51b3c3c5..d950dab72f7d0 100644 --- a/recipes/xz_utils/config.yml +++ b/recipes/xz_utils/config.yml @@ -1,8 +1,4 @@ versions: - "5.6.1": - folder: cmake - "5.6.0": - folder: cmake "5.4.5": folder: all "5.4.4": From 96c6de1eadf79369c27b9bc7067e666fa84da4e4 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Sat, 30 Mar 2024 07:52:38 -0500 Subject: [PATCH 362/405] libunwind: Downgrade xz_utils to mitigate CVE-2024-3094 (#23312) See #23310. --- recipes/libunwind/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libunwind/all/conanfile.py b/recipes/libunwind/all/conanfile.py index 7980721bda607..002c9bf613f23 100644 --- a/recipes/libunwind/all/conanfile.py +++ b/recipes/libunwind/all/conanfile.py @@ -53,7 +53,7 @@ def layout(self): def requirements(self): if self.options.minidebuginfo: - self.requires("xz_utils/5.6.1") + self.requires("xz_utils/5.4.5") if self.options.zlibdebuginfo: self.requires("zlib/[>=1.2.11 <2]") From 94c7d2765f9cc06def5142d0bb32058704bfb212 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Sat, 30 Mar 2024 07:52:46 -0500 Subject: [PATCH 363/405] cpython: Downgrade xz_utils to mitigate CVE-2024-3094 (#23313) See #23310. --- recipes/cpython/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/cpython/all/conanfile.py b/recipes/cpython/all/conanfile.py index 160fe6920a426..2c579fc71772b 100644 --- a/recipes/cpython/all/conanfile.py +++ b/recipes/cpython/all/conanfile.py @@ -134,7 +134,7 @@ def requirements(self): # https://github.com/python/cpython/blob/v3.10.13/Include/py_curses.h#L34 self.requires("ncurses/6.4", transitive_headers=True, transitive_libs=True) if self.options.get_safe("with_lzma", False): - self.requires("xz_utils/5.6.1") + self.requires("xz_utils/5.4.5") def package_id(self): del self.info.options.env_vars @@ -224,7 +224,7 @@ def _generate_autotools(self): def generate(self): VirtualRunEnv(self).generate(scope="build") - + if is_msvc(self): # The msbuild generator only works with Visual Studio deps = MSBuildDeps(self) From f7621e6b4377d9f6fa513366c94fc0d09257f56f Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 1 Apr 2024 10:45:08 +0200 Subject: [PATCH 364/405] (#23322) [libunwind] Fix: Generate new recipe revision to upload it as the latest --- recipes/libunwind/all/conanfile.py | 63 +++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 18 deletions(-) diff --git a/recipes/libunwind/all/conanfile.py b/recipes/libunwind/all/conanfile.py index 002c9bf613f23..d96b4cec23a07 100644 --- a/recipes/libunwind/all/conanfile.py +++ b/recipes/libunwind/all/conanfile.py @@ -2,7 +2,14 @@ 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, rm, rmdir +from conan.tools.files import ( + apply_conandata_patches, + copy, + export_conandata_patches, + get, + rm, + rmdir, +) from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps from conan.tools.layout import basic_layout @@ -11,6 +18,7 @@ required_conan_version = ">=1.53.0" + class LiunwindConan(ConanFile): name = "libunwind" description = "Manipulate the preserved state of each call-frame and resume the execution at any point." @@ -59,7 +67,9 @@ def requirements(self): def validate(self): if self.settings.os not in ["Linux", "FreeBSD"]: - raise ConanInvalidConfiguration("libunwind is only supported on Linux and FreeBSD") + raise ConanInvalidConfiguration( + "libunwind is only supported on Linux and FreeBSD" + ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -71,15 +81,17 @@ def generate(self): tc = AutotoolsToolchain(self) yes_no = lambda v: "yes" if v else "no" - tc.configure_args.extend([ - f"--enable-coredump={yes_no(self.options.coredump)}", - f"--enable-ptrace={yes_no(self.options.ptrace)}", - f"--enable-setjmp={yes_no(self.options.setjmp)}", - f"--enable-minidebuginfo={yes_no(self.options.minidebuginfo)}", - f"--enable-zlibdebuginfo={yes_no(self.options.zlibdebuginfo)}", - "--disable-tests", - "--disable-documentation", - ]) + tc.configure_args.extend( + [ + f"--enable-coredump={yes_no(self.options.coredump)}", + f"--enable-ptrace={yes_no(self.options.ptrace)}", + f"--enable-setjmp={yes_no(self.options.setjmp)}", + f"--enable-minidebuginfo={yes_no(self.options.minidebuginfo)}", + f"--enable-zlibdebuginfo={yes_no(self.options.zlibdebuginfo)}", + "--disable-tests", + "--disable-documentation", + ] + ) tc.generate() tc = AutotoolsDeps(self) @@ -92,7 +104,12 @@ def build(self): autotools.make() def package(self): - copy(self, pattern="COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy( + self, + pattern="COPYING", + 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")) @@ -102,8 +119,10 @@ def package(self): # As this seems to be unnecessary for the conan package. # rename the real file to libunwind_generic, lib_ext = "so" if self.options.shared else "a" - symlink_path = os.path.join(self.package_folder, "lib", f"libunwind-generic.{lib_ext}") - source_path = os.path.realpath(symlink_path) + symlink_path = os.path.join( + self.package_folder, "lib", f"libunwind-generic.{lib_ext}" + ) + source_path = os.path.realpath(symlink_path) rm(self, os.path.basename(symlink_path), os.path.dirname(symlink_path)) shutil.copy(source_path, symlink_path) @@ -116,18 +135,26 @@ def package_info(self): self.cpp_info.components["unwind"].requires.append("zlib::zlib") if self.settings.os == "Linux": self.cpp_info.components["unwind"].system_libs.append("pthread") - self.cpp_info.components["generic"].set_property("pkg_config_name", "libunwind-generic") + self.cpp_info.components["generic"].set_property( + "pkg_config_name", "libunwind-generic" + ) self.cpp_info.components["generic"].libs = ["unwind-generic"] self.cpp_info.components["generic"].requires = ["unwind"] if self.options.ptrace: - self.cpp_info.components["ptrace"].set_property("pkg_config_name", "libunwind-ptrace") + self.cpp_info.components["ptrace"].set_property( + "pkg_config_name", "libunwind-ptrace" + ) self.cpp_info.components["ptrace"].libs = ["unwind-ptrace"] self.cpp_info.components["ptrace"].requires = ["generic", "unwind"] if self.options.setjmp: - self.cpp_info.components["setjmp"].set_property("pkg_config_name", "libunwind-setjmp") + self.cpp_info.components["setjmp"].set_property( + "pkg_config_name", "libunwind-setjmp" + ) self.cpp_info.components["setjmp"].libs = ["unwind-setjmp"] self.cpp_info.components["setjmp"].requires = ["unwind"] if self.options.coredump: - self.cpp_info.components["coredump"].set_property("pkg_config_name", "libunwind-coredump") + self.cpp_info.components["coredump"].set_property( + "pkg_config_name", "libunwind-coredump" + ) self.cpp_info.components["coredump"].libs = ["unwind-coredump"] self.cpp_info.components["coredump"].requires = ["generic", "unwind"] From 6a4e42b97e05855a8f1ba31e3e6c2124be0cd2b7 Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 1 Apr 2024 11:20:06 +0100 Subject: [PATCH 365/405] (#23300) [bot] Update authorized users list (2024-03-28) Co-authored-by: conan-center-bot --- .c3i/authorized_users.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 0079f1d503a7f..1b385acde695e 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1318,3 +1318,7 @@ authorized_users: - VladimirShaleev - phwissmann - ybogo +- ujos +- nclindroos +- es20490446e +- victimsnino From 806008ebdab057578f8029e6312e2ea58136356e Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 1 Apr 2024 13:45:46 +0300 Subject: [PATCH 366/405] (#22362) proxy: new recipe * proxy: new recipe * proxy: require msvc 193 * proxy: bump to v2.1.1 * proxy: bump to v2.2.1 * proxy: adjust min compiler versions Co-authored-by: Uilian Ries --------- Co-authored-by: Uilian Ries --- recipes/proxy/all/conandata.yml | 4 ++ recipes/proxy/all/conanfile.py | 66 +++++++++++++++++++ recipes/proxy/all/test_package/CMakeLists.txt | 8 +++ recipes/proxy/all/test_package/conanfile.py | 26 ++++++++ .../proxy/all/test_package/test_package.cpp | 47 +++++++++++++ recipes/proxy/config.yml | 3 + 6 files changed, 154 insertions(+) create mode 100644 recipes/proxy/all/conandata.yml create mode 100644 recipes/proxy/all/conanfile.py create mode 100644 recipes/proxy/all/test_package/CMakeLists.txt create mode 100644 recipes/proxy/all/test_package/conanfile.py create mode 100644 recipes/proxy/all/test_package/test_package.cpp create mode 100644 recipes/proxy/config.yml diff --git a/recipes/proxy/all/conandata.yml b/recipes/proxy/all/conandata.yml new file mode 100644 index 0000000000000..6117dde9e8ce1 --- /dev/null +++ b/recipes/proxy/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.2.1": + url: "https://github.com/microsoft/proxy/archive/refs/tags/2.2.1.tar.gz" + sha256: "096f0b2d793dffc54d41def2bca0ced594b6b8efe35ac5ae27db35802e742b96" diff --git a/recipes/proxy/all/conanfile.py b/recipes/proxy/all/conanfile.py new file mode 100644 index 0000000000000..a561cdbfc8a38 --- /dev/null +++ b/recipes/proxy/all/conanfile.py @@ -0,0 +1,66 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + + +class ProxyConan(ConanFile): + name = "proxy" + description = "Proxy: Next Generation Polymorphism in C++" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/microsoft/proxy" + topics = ("runtime-polymorphism", "polymorphism", "duck-typing", "metaprogramming", "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": "15", + "apple-clang": "14", + "msvc": "193", + "Visual Studio": "17", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + 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, "proxy.h", self.source_folder, os.path.join(self.package_folder, "include", "proxy")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "proxy") + self.cpp_info.set_property("cmake_target_name", "msft_proxy") + + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/proxy/all/test_package/CMakeLists.txt b/recipes/proxy/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..7ca64396c7e13 --- /dev/null +++ b/recipes/proxy/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(proxy REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE msft_proxy) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/proxy/all/test_package/conanfile.py b/recipes/proxy/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/proxy/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/proxy/all/test_package/test_package.cpp b/recipes/proxy/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..09afe4defb583 --- /dev/null +++ b/recipes/proxy/all/test_package/test_package.cpp @@ -0,0 +1,47 @@ +// https://github.com/microsoft/proxy/blob/2.1.0/samples/resource_dictionary/main.cpp +// Copyright (c) Microsoft Corporation. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE + +#include + +#include +#include +#include +#include + + +namespace poly { + +PRO_DEF_MEMBER_DISPATCH(at, std::string(int)); +PRO_DEF_FACADE(Dictionary, at); + +} // namespace poly + +void demo_print(pro::proxy dictionary) { + std::cout << dictionary(1) << std::endl; +} + +int main() { + std::map container1{{1, "hello"}}; + std::vector container2{"hello", "world"}; + demo_print(&container1); // print: hello\n + demo_print(&container2); // print: world\n + return 0; +} diff --git a/recipes/proxy/config.yml b/recipes/proxy/config.yml new file mode 100644 index 0000000000000..a816d92f78ee3 --- /dev/null +++ b/recipes/proxy/config.yml @@ -0,0 +1,3 @@ +versions: + "2.2.1": + folder: all From c0fc38a0d1618218ab3927c45b77a3b253ded7a7 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 1 Apr 2024 14:28:36 +0300 Subject: [PATCH 367/405] (#23246) zstd: remove vulnerable versions (< 1.4.9) https://repology.org/project/zstd/cves Currently all versions < 1.4.9 are affected. --- recipes/zstd/all/conandata.yml | 29 ------------------- recipes/zstd/all/conanfile.py | 11 ++----- .../all/patches/1.3.5-cmake-project.patch | 12 -------- .../all/patches/1.4.5-cmake-install-dll.patch | 10 ------- recipes/zstd/config.yml | 14 --------- 5 files changed, 2 insertions(+), 74 deletions(-) delete mode 100644 recipes/zstd/all/patches/1.3.5-cmake-project.patch delete mode 100644 recipes/zstd/all/patches/1.4.5-cmake-install-dll.patch diff --git a/recipes/zstd/all/conandata.yml b/recipes/zstd/all/conandata.yml index 0deaf672d11b8..64ae6207e0c7c 100644 --- a/recipes/zstd/all/conandata.yml +++ b/recipes/zstd/all/conandata.yml @@ -17,27 +17,6 @@ sources: "1.4.9": url: "https://github.com/facebook/zstd/releases/download/v1.4.9/zstd-1.4.9.tar.gz" sha256: "29ac74e19ea28659017361976240c4b5c5c24db3b89338731a6feb97c038d293" - "1.4.8": - url: "https://github.com/facebook/zstd/releases/download/v1.4.8/zstd-1.4.8.tar.gz" - sha256: "32478297ca1500211008d596276f5367c54198495cf677e9439f4791a4c69f24" - "1.4.7": - url: "https://github.com/facebook/zstd/releases/download/v1.4.7/zstd-1.4.7.tar.gz" - sha256: "192cbb1274a9672cbcceaf47b5c4e9e59691ca60a357f1d4a8b2dfa2c365d757" - "1.4.5": - url: "https://github.com/facebook/zstd/releases/download/v1.4.5/zstd-1.4.5.tar.gz" - sha256: "98e91c7c6bf162bf90e4e70fdbc41a8188b9fa8de5ad840c401198014406ce9e" - "1.4.4": - url: "https://github.com/facebook/zstd/releases/download/v1.4.4/zstd-1.4.4.tar.gz" - sha256: "59ef70ebb757ffe74a7b3fe9c305e2ba3350021a918d168a046c6300aeea9315" - "1.4.3": - url: "https://github.com/facebook/zstd/releases/download/v1.4.3/zstd-1.4.3.tar.gz" - sha256: "e88ec8d420ff228610b77fba4fbf22b9f8b9d3f223a40ef59c9c075fcdad5767" - "1.3.8": - url: "https://github.com/facebook/zstd/releases/download/v1.3.8/zstd-1.3.8.tar.gz" - sha256: "293fa004dfacfbe90b42660c474920ff27093e3fb6c99f7b76e6083b21d6d48e" - "1.3.5": - url: "https://github.com/facebook/zstd/archive/refs/tags/v1.3.5.tar.gz" - sha256: "d6e1559e4cdb7c4226767d4ddc990bff5f9aab77085ff0d0490c828b025e2eea" patches: "1.5.5": - patch_file: "patches/1.5.2-cmake-remove-asm-except-x86_64.patch" @@ -76,11 +55,3 @@ patches: patch_description: "fix strange performance and scalability issues" patch_type: "bugfix" patch_source: "https://github.com/facebook/zstd/pull/3167" - "1.4.5": - - patch_file: "patches/1.4.5-cmake-install-dll.patch" - patch_description: "fix runtime installation path" - patch_type: "conan" - "1.3.5": - - patch_file: "patches/1.3.5-cmake-project.patch" - patch_description: "fix `project()` position" - patch_type: "portability" diff --git a/recipes/zstd/all/conanfile.py b/recipes/zstd/all/conanfile.py index 5920d50771523..62abbe3967884 100644 --- a/recipes/zstd/all/conanfile.py +++ b/recipes/zstd/all/conanfile.py @@ -1,7 +1,6 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, replace_in_file, rmdir, rm -from conan.tools.scm import Version from conan.tools.microsoft import is_msvc import glob import os @@ -56,21 +55,15 @@ def generate(self): tc.variables["ZSTD_BUILD_STATIC"] = not self.options.shared or self.options.build_programs tc.variables["ZSTD_BUILD_SHARED"] = self.options.shared tc.variables["ZSTD_MULTITHREAD_SUPPORT"] = self.options.threading - if not is_msvc(self): tc.variables["CMAKE_C_FLAGS"] = "-Wno-maybe-uninitialized" - - if Version(self.version) < "1.4.3": - # Generate a relocatable shared lib on Macos - tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" tc.generate() def _patch_sources(self): apply_conandata_patches(self) # Don't force PIC - if Version(self.version) >= "1.4.5": - replace_in_file(self, os.path.join(self.source_folder, "build", "cmake", "lib", "CMakeLists.txt"), - "POSITION_INDEPENDENT_CODE On", "") + replace_in_file(self, os.path.join(self.source_folder, "build", "cmake", "lib", "CMakeLists.txt"), + "POSITION_INDEPENDENT_CODE On", "") def build(self): self._patch_sources() diff --git a/recipes/zstd/all/patches/1.3.5-cmake-project.patch b/recipes/zstd/all/patches/1.3.5-cmake-project.patch deleted file mode 100644 index c8c9479c8ede1..0000000000000 --- a/recipes/zstd/all/patches/1.3.5-cmake-project.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/build/cmake/CMakeLists.txt -+++ b/build/cmake/CMakeLists.txt -@@ -7,8 +7,8 @@ - # in the COPYING file in the root directory of this source tree). - # ################################################################ - --PROJECT(zstd) - CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9) -+PROJECT(zstd) - SET(ZSTD_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../..") - LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules") - INCLUDE(GNUInstallDirs) diff --git a/recipes/zstd/all/patches/1.4.5-cmake-install-dll.patch b/recipes/zstd/all/patches/1.4.5-cmake-install-dll.patch deleted file mode 100644 index 9433dfdbea9cb..0000000000000 --- a/recipes/zstd/all/patches/1.4.5-cmake-install-dll.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- build/cmake/lib/CMakeLists.txt 2020-05-22 05:04:00.000000000 +0000 -+++ build/cmake/lib/CMakeLists.txt 2020-05-22 19:14:38.249960211 +0000 -@@ -161,6 +161,7 @@ - install(TARGETS ${library_targets} - EXPORT zstdExports - INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" -+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - ) diff --git a/recipes/zstd/config.yml b/recipes/zstd/config.yml index ddb81b147ddb6..64f52a6b03fb1 100644 --- a/recipes/zstd/config.yml +++ b/recipes/zstd/config.yml @@ -11,17 +11,3 @@ versions: folder: all "1.4.9": folder: all - "1.4.8": - folder: all - "1.4.7": - folder: all - "1.4.5": - folder: all - "1.4.4": - folder: all - "1.4.3": - folder: all - "1.3.8": - folder: all - "1.3.5": - folder: all From 3dca6fcd527d81a8e960149b7f3a26cd8a9b851d Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 1 Apr 2024 13:02:14 +0100 Subject: [PATCH 368/405] (#23323) [bot] Update authorized users list (2024-04-01) Co-authored-by: conan-center-bot --- .c3i/authorized_users.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 1b385acde695e..523655fa1ea1f 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1322,3 +1322,6 @@ authorized_users: - nclindroos - es20490446e - victimsnino +- dmpriso +- darakelian +- sivachandran From b813d935cf966611954077585fa0c7c0d41ce543 Mon Sep 17 00:00:00 2001 From: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com> Date: Mon, 1 Apr 2024 07:50:23 -0500 Subject: [PATCH 369/405] (#23321) cpptrace: Add v0.5.2 * Add v0.5.2 * Patch * Fix CI * Update for adjusted tag * Workaround msvc bug --- recipes/cpptrace/all/conandata.yml | 9 +++++ .../all/patches/0.5.2/0001-msvc-bug.patch | 36 +++++++++++++++++++ recipes/cpptrace/config.yml | 2 ++ 3 files changed, 47 insertions(+) create mode 100644 recipes/cpptrace/all/patches/0.5.2/0001-msvc-bug.patch diff --git a/recipes/cpptrace/all/conandata.yml b/recipes/cpptrace/all/conandata.yml index 0eb7e3cd9436a..82140c1347a01 100644 --- a/recipes/cpptrace/all/conandata.yml +++ b/recipes/cpptrace/all/conandata.yml @@ -1,5 +1,9 @@ sources: # Newer versions at the top + "0.5.2": + url: + - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.5.2.tar.gz" + sha256: "d148998e175b9c69ffb4383ab321a0d27487392e4eee3f39441d35b6856c8f78" "0.5.1": url: - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.5.1.tar.gz" @@ -29,6 +33,11 @@ sources: - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.2.1.tar.gz" sha256: "3184f404c61b6b8ba6fe7c64fc40d1c3d6d87df59bcacf1845d846101bc22f9a" patches: + "0.5.2": + - patch_file: "patches/0.5.2/0001-msvc-bug.patch" + patch_type: "official" + patch_source: "https://github.com/jeremy-rifkin/cpptrace/commit/599d6abd6cc74e80e8429fc309247be5f7edd5d7" + patch_description: "Workaround bug for old msvc" "0.4.0": - patch_file: "patches/0.4.0/0001-libdwarf_path.patch" patch_type: "conan" diff --git a/recipes/cpptrace/all/patches/0.5.2/0001-msvc-bug.patch b/recipes/cpptrace/all/patches/0.5.2/0001-msvc-bug.patch new file mode 100644 index 0000000000000..b9a184ee0d627 --- /dev/null +++ b/recipes/cpptrace/all/patches/0.5.2/0001-msvc-bug.patch @@ -0,0 +1,36 @@ +diff --git a/src/utils/microfmt.hpp b/src/utils/microfmt.hpp +index ba47db7..0f750c3 100644 +--- a/src/utils/microfmt.hpp ++++ b/src/utils/microfmt.hpp +@@ -302,20 +302,27 @@ namespace microfmt { + } + } + +- template + #if defined(__cpp_lib_string_view) && __cpp_lib_string_view >= 201606L ++ template + std::string format(std::string_view fmt, Args&&... args) { +- #else +- std::string format(const std::string& fmt, Args&&... args) { +- #endif + return detail::format(fmt.begin(), fmt.end(), {detail::format_value(args)...}); + } + ++ inline std::string format(std::string_view fmt) { ++ return std::string(fmt); ++ } ++ #endif ++ + template + std::string format(const char* fmt, Args&&... args) { + return detail::format(fmt, fmt + std::strlen(fmt), {detail::format_value(args)...}); + } + ++ // working around an old msvc bug https://godbolt.org/z/88T8hrzzq mre: https://godbolt.org/z/drd8echbP ++ inline std::string format(const char* fmt) { ++ return std::string(fmt); ++ } ++ + template + void print(const S& fmt, Args&&... args) { + std::cout< Date: Mon, 1 Apr 2024 16:48:35 +0300 Subject: [PATCH 370/405] (#23290) Bump ReactivePlusPlus v2.1.1 * Add v2.1.1 * Specify 2.1.1 in config * Update hash --- recipes/reactiveplusplus/all/conandata.yml | 3 +++ recipes/reactiveplusplus/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/reactiveplusplus/all/conandata.yml b/recipes/reactiveplusplus/all/conandata.yml index a8ee60a2f8197..45940f3c98c16 100644 --- a/recipes/reactiveplusplus/all/conandata.yml +++ b/recipes/reactiveplusplus/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.1": + url: "https://github.com/victimsnino/ReactivePlusPlus/archive/refs/tags/v2.1.1.tar.gz" + sha256: "0b962478d7c973a1f74062ce7f8d24c2fdcd2733031b1f014e65d252d59ebe6a" "2.0.0": url: "https://github.com/victimsnino/ReactivePlusPlus/archive/v2.0.0.tar.gz" sha256: "8950fe579aea23be1a6affd4ec8845c78016454aaf875dbae6a52d10eeb6df02" diff --git a/recipes/reactiveplusplus/config.yml b/recipes/reactiveplusplus/config.yml index feccf8f451435..f409d3e717279 100644 --- a/recipes/reactiveplusplus/config.yml +++ b/recipes/reactiveplusplus/config.yml @@ -1,4 +1,6 @@ versions: + "2.1.1": + folder: all "2.0.0": folder: all "0.2.3": From 35a6c3e810d51cbb40c39a3712475239c45bf252 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 1 Apr 2024 23:28:42 +0900 Subject: [PATCH 371/405] (#23314) 7bitdi: add version 3.0.0 --- recipes/7bitdi/all/conandata.yml | 3 +++ recipes/7bitdi/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/7bitdi/all/conandata.yml b/recipes/7bitdi/all/conandata.yml index 22d7e84c10e0a..0385266be5999 100644 --- a/recipes/7bitdi/all/conandata.yml +++ b/recipes/7bitdi/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.0.0": + url: "https://github.com/7bitcoder/7bitDI/archive/refs/tags/v3.0.0.tar.gz" + sha256: "aabb8e907c0cafb8e4b7c8367ed5dbb3cba2d83af090bdef9a7f855c0778c8f3" "2.1.0": url: "https://github.com/7bitcoder/7bitDI/archive/refs/tags/v2.1.0.tar.gz" sha256: "54edceb4f90bf652126310ca0b78150d05a02d7081cef3c9ccaba5f4dd112935" diff --git a/recipes/7bitdi/config.yml b/recipes/7bitdi/config.yml index 4a1d176d1dc7e..b196dff512285 100644 --- a/recipes/7bitdi/config.yml +++ b/recipes/7bitdi/config.yml @@ -1,4 +1,6 @@ versions: + "3.0.0": + folder: all "2.1.0": folder: all "2.0.0": From 5f288db7e9f49f635cc7f15686f374d1ab9706d0 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 1 Apr 2024 23:48:42 +0900 Subject: [PATCH 372/405] (#23316) c-ares: add version 1.28.1 * c-ares: add version 1.28.0 * update 1.28.1 --- recipes/c-ares/all/conandata.yml | 3 +++ recipes/c-ares/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/c-ares/all/conandata.yml b/recipes/c-ares/all/conandata.yml index 3833dbb894ff0..3a07eb4a811b8 100644 --- a/recipes/c-ares/all/conandata.yml +++ b/recipes/c-ares/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.28.1": + url: "https://github.com/c-ares/c-ares/releases/download/cares-1_28_1/c-ares-1.28.1.tar.gz" + sha256: "675a69fc54ddbf42e6830bc671eeb6cd89eeca43828eb413243fd2c0a760809d" "1.27.0": url: "https://github.com/c-ares/c-ares/releases/download/cares-1_27_0/c-ares-1.27.0.tar.gz" sha256: "0a72be66959955c43e2af2fbd03418e82a2bd5464604ec9a62147e37aceb420b" diff --git a/recipes/c-ares/config.yml b/recipes/c-ares/config.yml index 75dbe67cad1ac..78e892e1326a4 100644 --- a/recipes/c-ares/config.yml +++ b/recipes/c-ares/config.yml @@ -1,4 +1,6 @@ versions: + "1.28.1": + folder: all "1.27.0": folder: all "1.26.0": From 9a896541ba68e4c9d6e8c4b608c469917187eb82 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 2 Apr 2024 00:30:15 +0900 Subject: [PATCH 373/405] (#23317) libnghttp2: add version 1.60.0, disable tests and examples build * libnghttp2: add version 1.60.0, disable tests and examples build * support MSVC shared build --- recipes/libnghttp2/all/conandata.yml | 3 +++ recipes/libnghttp2/all/conanfile.py | 15 ++++++++++++--- recipes/libnghttp2/config.yml | 2 ++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/recipes/libnghttp2/all/conandata.yml b/recipes/libnghttp2/all/conandata.yml index 66dd4333f96a2..9cb62065c5e94 100644 --- a/recipes/libnghttp2/all/conandata.yml +++ b/recipes/libnghttp2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.60.0": + url: "https://github.com/nghttp2/nghttp2/archive/v1.60.0.tar.gz" + sha256: "3cc9403c64e0a133868f62132ff0884cd5dc567eee5bd7b2d03ac81293695d6b" "1.59.0": url: "https://github.com/nghttp2/nghttp2/archive/v1.59.0.tar.gz" sha256: "0dd5c980f1262ff5f03676fd99f46f250b66c842f7d864fa1ca9f8453e5f8868" diff --git a/recipes/libnghttp2/all/conanfile.py b/recipes/libnghttp2/all/conanfile.py index 7e54ec938b2f3..8fa456dd4d783 100644 --- a/recipes/libnghttp2/all/conanfile.py +++ b/recipes/libnghttp2/all/conanfile.py @@ -83,8 +83,11 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["ENABLE_SHARED_LIB"] = self.options.shared - tc.variables["ENABLE_STATIC_LIB"] = not self.options.shared + if Version(self.version) < "1.60.0": + tc.variables["ENABLE_SHARED_LIB"] = self.options.shared + tc.variables["ENABLE_STATIC_LIB"] = not self.options.shared + else: + tc.variables["BUILD_STATIC_LIBS"] = not self.options.shared tc.variables["ENABLE_HPACK_TOOLS"] = self.options.with_hpack tc.variables["ENABLE_APP"] = self.options.with_app tc.variables["ENABLE_EXAMPLES"] = False @@ -96,6 +99,9 @@ def generate(self): tc.variables["WITH_JEMALLOC"] = self.options.get_safe("with_jemalloc", False) if Version(self.version) < "1.52.0": tc.variables["ENABLE_ASIO_LIB"] = self.options.with_asio + # To avoid overwriting dll import lib by static lib + if Version(self.version) >= "1.60.0" and self.options.shared: + tc.variables["STATIC_LIB_SUFFIX"] = "-static" if is_apple_os(self): # workaround for: install TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE executable tc.cache_variables["CMAKE_MACOSX_BUNDLE"] = False @@ -107,7 +113,7 @@ def generate(self): tc.generate() def _patch_sources(self): - if not self.options.shared: + if not self.options.shared and Version(self.version) < "1.60.0": # easier to patch here rather than have patch 'nghttp_static_include_directories' for each version save(self, os.path.join(self.source_folder, "lib", "CMakeLists.txt"), "target_include_directories(nghttp2_static INTERFACE\n" @@ -135,6 +141,8 @@ def _patch_sources(self): "\n" " target_link_libraries(nghttp2_asio\n" f" {target_libnghttp2}\n") + 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"), "add_subdirectory(tests)", "") def build(self): self._patch_sources() @@ -148,6 +156,7 @@ def package(self): cmake.install() rmdir(self, os.path.join(self.package_folder, "share")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): self.cpp_info.components["nghttp2"].set_property("pkg_config_name", "libnghttp2") diff --git a/recipes/libnghttp2/config.yml b/recipes/libnghttp2/config.yml index 3479f13f33830..f0fc4100dde67 100644 --- a/recipes/libnghttp2/config.yml +++ b/recipes/libnghttp2/config.yml @@ -1,4 +1,6 @@ versions: + "1.60.0": + folder: all "1.59.0": folder: all "1.58.0": From bf218943a89843ef3256b4da015de391b697f959 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 2 Apr 2024 01:07:00 +0900 Subject: [PATCH 374/405] (#22941) wiringpi: add version 3.2 * wiringpi: add version 3.0 * check gcc version for 3.0 * update 3.1 * disable support gcc 11 debug build * update 3.2 * require linux_headers * include linux-headers * add comment for validation Co-authored-by: Uilian Ries --------- Co-authored-by: Uilian Ries --- recipes/wiringpi/all/CMakeLists.txt | 4 +++ recipes/wiringpi/all/conandata.yml | 3 ++ recipes/wiringpi/all/conanfile.py | 53 ++++++++++++++++++++--------- recipes/wiringpi/config.yml | 2 ++ 4 files changed, 46 insertions(+), 16 deletions(-) diff --git a/recipes/wiringpi/all/CMakeLists.txt b/recipes/wiringpi/all/CMakeLists.txt index fdd0b1aff610c..6d527ad7fbe95 100644 --- a/recipes/wiringpi/all/CMakeLists.txt +++ b/recipes/wiringpi/all/CMakeLists.txt @@ -20,6 +20,10 @@ if(WIRINGPI_WITH_DEV_LIB) ${WIRINGPI_SRC_DIR}/wiringPi) endif() +if(WIRINGPI_LINUX_HEADERS_DIR) + target_include_directories(${PROJECT_NAME} PUBLIC ${WIRINGPI_LINUX_HEADERS_DIR}) +endif() + install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib diff --git a/recipes/wiringpi/all/conandata.yml b/recipes/wiringpi/all/conandata.yml index 676b9c65bf9fe..307e8283601a9 100644 --- a/recipes/wiringpi/all/conandata.yml +++ b/recipes/wiringpi/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.2": + url: "https://github.com/WiringPi/WiringPi/archive/refs/tags/3.2.tar.gz" + sha256: "45aeaf52d86631edb7a5c82a4f6d0050ef10c8b4de6c566cd8017fc52a17b68e" "2.61-1": url: "https://github.com/WiringPi/WiringPi/archive/refs/tags/2.61-1.tar.gz" sha256: "b5dc6c6c2ba1349acf602fafd7b58aa81e3fc3216a33b983386264cca0033e12" diff --git a/recipes/wiringpi/all/conanfile.py b/recipes/wiringpi/all/conanfile.py index b1ff871a8a06d..ec52053dc1d9c 100644 --- a/recipes/wiringpi/all/conanfile.py +++ b/recipes/wiringpi/all/conanfile.py @@ -3,26 +3,32 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import get, copy +from conan.tools.scm import Version required_conan_version = ">=1.53.0" class WiringpiConan(ConanFile): name = "wiringpi" - license = "LGPL-3.0" description = "GPIO Interface library for the Raspberry Pi" + license = "LGPL-3.0" + url = "https://github.com/conan-io/conan-center-index" homepage = "http://wiringpi.com" topics = ("wiringpi", "gpio", "raspberrypi") - url = "https://github.com/conan-io/conan-center-index" - settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], - "fPIC": [True, False], - "wpi_extensions": [True, False], - "with_devlib": [True, False]} - default_options = {"shared": False, - "fPIC": True, - "wpi_extensions": False, - "with_devlib": True} - + settings = "os", "arch", "compiler", "build_type" + package_type = "library" + options = { + "shared": [True, False], + "fPIC": [True, False], + "wpi_extensions": [True, False], + "with_devlib": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "wpi_extensions": False, + "with_devlib": True, + } + def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) @@ -32,21 +38,36 @@ def configure(self): self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + if Version(self.version) >= "3.2": + self.requires("linux-headers-generic/6.5.9", transitive_headers=True) + def validate(self): if self.settings.os != "Linux": raise ConanInvalidConfiguration(f"{self.ref} only works for Linux") - - def layout(self): - cmake_layout(self, src_folder="src") + if Version(self.version) >= 3.0: + if self.settings.compiler == "gcc" and \ + Version(self.settings.compiler.version) < 8: + raise ConanInvalidConfiguration(f"{self.ref} requires gcc >= 8") + # wiringPi.c:1755:9: error: case label does not reduce to an integer constant + if self.settings.compiler == "gcc" and \ + Version(self.settings.compiler.version).major == 11 and \ + self.settings.build_type == "Debug": + raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc 11 in Debug build") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - + def generate(self): tc = CMakeToolchain(self) tc.variables["WIRINGPI_SRC_DIR"] = self.source_folder.replace("\\", "/") tc.variables["WIRINGPI_WITH_WPI_EXTENSIONS"] = self.options.wpi_extensions tc.variables["WIRINGPI_WITH_DEV_LIB"] = self.options.with_devlib + if Version(self.version) >= "3.2": + tc.variables["WIRINGPI_LINUX_HEADERS_DIR"] = self.dependencies["linux-headers-generic"].cpp_info.includedirs[0] tc.generate() def build(self): diff --git a/recipes/wiringpi/config.yml b/recipes/wiringpi/config.yml index b0d56a22c2e0d..09456181564b6 100644 --- a/recipes/wiringpi/config.yml +++ b/recipes/wiringpi/config.yml @@ -1,4 +1,6 @@ versions: + "3.2": + folder: "all" "2.61-1": folder: "all" "cci.20210727": From 88f283093301742d8b4e7b1296d469b3fbb249e3 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 2 Apr 2024 01:51:12 +0900 Subject: [PATCH 375/405] (#23215) octomap: add version 1.10.0 * octomap: add version 1.10.0 * enable C++11 on 1.10.0 and later * use cppstd in settings Co-authored-by: Uilian Ries --------- Co-authored-by: Uilian Ries --- recipes/octomap/all/conandata.yml | 7 + recipes/octomap/all/conanfile.py | 11 +- ....0-0001-separate-static-shared-build.patch | 120 ++++++++++++++++++ .../octomap/all/test_package/CMakeLists.txt | 4 + recipes/octomap/config.yml | 2 + 5 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 recipes/octomap/all/patches/1.10.0-0001-separate-static-shared-build.patch diff --git a/recipes/octomap/all/conandata.yml b/recipes/octomap/all/conandata.yml index 4699a071746f8..24483c3d1fc42 100644 --- a/recipes/octomap/all/conandata.yml +++ b/recipes/octomap/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.10.0": + url: "https://github.com/OctoMap/octomap/archive/v1.10.0.tar.gz" + sha256: "8da2576ec6a0993e8900db7f91083be8682d8397a7be0752c85d1b7dd1b8e992" "1.9.8": url: "https://github.com/OctoMap/octomap/archive/v1.9.8.tar.gz" sha256: "417af6da4e855e9a83b93458aa98b01a2c88f880088baad2b59d323ce162586e" @@ -15,6 +18,10 @@ sources: url: "https://github.com/OctoMap/octomap/archive/v1.9.3.tar.gz" sha256: "8488de97ed2c8f4757bfbaf3225e82a9e36783dce1f573b3bde1cf968aa89696" patches: + "1.10.0": + - patch_file: "patches/1.10.0-0001-separate-static-shared-build.patch" + patch_description: "CMake: build either shared or static" + patch_type: "conan" "1.9.8": - patch_file: "patches/1.9.5-0001-targets-outputname-collision.patch" patch_description: "CMake: build either shared or static, and avoid name collision" diff --git a/recipes/octomap/all/conanfile.py b/recipes/octomap/all/conanfile.py index 52d010aca9b55..ced4e906103b0 100644 --- a/recipes/octomap/all/conanfile.py +++ b/recipes/octomap/all/conanfile.py @@ -4,12 +4,12 @@ from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir, save from conan.tools.microsoft import is_msvc, is_msvc_static_runtime from conan.tools.scm import Version +from conan.tools.build import check_min_cppstd import os import textwrap required_conan_version = ">=1.53.0" - class OctomapConan(ConanFile): name = "octomap" description = "An Efficient Probabilistic 3D Mapping Framework Based on Octrees." @@ -31,6 +31,10 @@ class OctomapConan(ConanFile): "openmp": False, } + @property + def _min_cppstd(self): + return 11 + def export_sources(self): export_conandata_patches(self) @@ -49,6 +53,9 @@ def validate(self): if self.options.shared and is_msvc(self) and is_msvc_static_runtime(self): raise ConanInvalidConfiguration("shared octomap doesn't support MT runtime") + if Version(self.version) >= "1.10.0" and self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -58,6 +65,8 @@ def generate(self): tc.variables["BUILD_TESTING"] = False if is_msvc(self) and self.options.shared: tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + if Version(self.version) >= "1.10.0": + tc.variables["CMAKE_CXX_STANDARD"] = self.settings.compiler.get_safe("cppstd", "11").replace("gnu", "") tc.generate() def _patch_sources(self): diff --git a/recipes/octomap/all/patches/1.10.0-0001-separate-static-shared-build.patch b/recipes/octomap/all/patches/1.10.0-0001-separate-static-shared-build.patch new file mode 100644 index 0000000000000..bf38e33037d86 --- /dev/null +++ b/recipes/octomap/all/patches/1.10.0-0001-separate-static-shared-build.patch @@ -0,0 +1,120 @@ +diff --git a/octomap/src/CMakeLists.txt b/octomap/src/CMakeLists.txt +index 45b384f..e870608 100644 +--- a/octomap/src/CMakeLists.txt ++++ b/octomap/src/CMakeLists.txt +@@ -11,24 +11,32 @@ SET (octomap_SRCS + ) + + # dynamic and static libs, see CMake FAQ: ++if(BUILD_SHARED_LIBS) + ADD_LIBRARY( octomap SHARED ${octomap_SRCS}) + set_target_properties( octomap PROPERTIES + VERSION ${OCTOMAP_VERSION} + SOVERSION ${OCTOMAP_SOVERSION} + ) ++TARGET_LINK_LIBRARIES(octomap octomath) ++else() + ADD_LIBRARY( octomap-static STATIC ${octomap_SRCS}) + SET_TARGET_PROPERTIES(octomap-static PROPERTIES OUTPUT_NAME "octomap") + add_dependencies(octomap-static octomath-static) +- +-TARGET_LINK_LIBRARIES(octomap octomath) ++TARGET_LINK_LIBRARIES(octomap-static octomath-static) ++endif() + + if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + file(MAKE_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + endif() + +-export(TARGETS octomap octomap-static ++if(BUILD_SHARED_LIBS) ++export(TARGETS octomap + APPEND FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-targets.cmake") +- ++else() ++export(TARGETS octomap-static ++ APPEND FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-targets.cmake") ++endif() ++if(0) + ADD_SUBDIRECTORY( testing ) + + ADD_EXECUTABLE(graph2tree graph2tree.cpp) +@@ -66,14 +74,22 @@ TARGET_LINK_LIBRARIES(intersection_example octomap) + + ADD_EXECUTABLE(octree2pointcloud octree2pointcloud.cpp) + TARGET_LINK_LIBRARIES(octree2pointcloud octomap) +- +-install(TARGETS octomap octomap-static ++endif() ++if(BUILD_SHARED_LIBS) ++install(TARGETS octomap + EXPORT octomap-targets + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ${INSTALL_TARGETS_DEFAULT_ARGS} + ) ++else() ++install(TARGETS octomap-static ++ EXPORT octomap-targets ++ INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ++ ${INSTALL_TARGETS_DEFAULT_ARGS} ++) ++endif() + install(EXPORT octomap-targets DESTINATION "${CMAKE_INSTALL_DATADIR}/octomap") +- ++if(0) + install(TARGETS + graph2tree + log2graph +@@ -85,4 +101,4 @@ install(TARGETS + compare_octrees + ${INSTALL_TARGETS_DEFAULT_ARGS} + ) +- ++endif() +diff --git a/octomap/src/math/CMakeLists.txt b/octomap/src/math/CMakeLists.txt +index 3b47ec4..596f7d8 100644 +--- a/octomap/src/math/CMakeLists.txt ++++ b/octomap/src/math/CMakeLists.txt +@@ -4,26 +4,37 @@ SET (octomath_SRCS + Pose6D.cpp + ) + +- ++if(BUILD_SHARED_LIBS) + ADD_LIBRARY( octomath SHARED ${octomath_SRCS}) + + SET_TARGET_PROPERTIES( octomath PROPERTIES + VERSION ${OCTOMAP_VERSION} + SOVERSION ${OCTOMAP_SOVERSION} + ) +- ++else() + ADD_LIBRARY( octomath-static STATIC ${octomath_SRCS}) + SET_TARGET_PROPERTIES(octomath-static PROPERTIES OUTPUT_NAME "octomath") +- ++endif() + if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + file(MAKE_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + endif() + +-export(TARGETS octomath octomath-static ++if(BUILD_SHARED_LIBS) ++export(TARGETS octomath + APPEND FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-targets.cmake") + +-install(TARGETS octomath octomath-static ++install(TARGETS octomath + EXPORT octomap-targets + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ${INSTALL_TARGETS_DEFAULT_ARGS} + ) ++else() ++export(TARGETS octomath-static ++ APPEND FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-targets.cmake") ++ ++install(TARGETS octomath-static ++ EXPORT octomap-targets ++ INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ++ ${INSTALL_TARGETS_DEFAULT_ARGS} ++) ++endif() diff --git a/recipes/octomap/all/test_package/CMakeLists.txt b/recipes/octomap/all/test_package/CMakeLists.txt index bb595de7484c4..4ec2de09236c3 100644 --- a/recipes/octomap/all/test_package/CMakeLists.txt +++ b/recipes/octomap/all/test_package/CMakeLists.txt @@ -9,3 +9,7 @@ if(TARGET octomap-static) else() target_link_libraries(${PROJECT_NAME} PRIVATE octomap octomath) endif() + +if(octomap_VERSION VERSION_GREATER_EQUAL "1.10.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +endif() diff --git a/recipes/octomap/config.yml b/recipes/octomap/config.yml index 7b6ae3353a6fd..83dd314d86186 100644 --- a/recipes/octomap/config.yml +++ b/recipes/octomap/config.yml @@ -1,4 +1,6 @@ versions: + "1.10.0": + folder: all "1.9.8": folder: all "1.9.7": From ddbeacd43fede68625601422ea221dbdcde6819d Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 2 Apr 2024 02:28:25 +0900 Subject: [PATCH 376/405] (#23226) libgd: support avif and heif * libgd: support avif and heif * simply patch files * remove unused patches * Update recipes/libgd/all/conanfile.py Co-authored-by: Martin Valgur --------- Co-authored-by: Carlos Zoido Co-authored-by: Martin Valgur --- recipes/libgd/all/conandata.yml | 9 -- recipes/libgd/all/conanfile.py | 19 ++++- recipes/libgd/all/patches/2.2.5-use-cci.patch | 63 -------------- recipes/libgd/all/patches/2.3.0-use-cci.patch | 63 -------------- recipes/libgd/all/patches/2.3.1-use-cci.patch | 72 ---------------- recipes/libgd/all/patches/2.3.2-use-cci.patch | 82 +++++------------- recipes/libgd/all/patches/2.3.3-use-cci.patch | 85 +++++-------------- 7 files changed, 57 insertions(+), 336 deletions(-) delete mode 100644 recipes/libgd/all/patches/2.2.5-use-cci.patch delete mode 100644 recipes/libgd/all/patches/2.3.0-use-cci.patch delete mode 100644 recipes/libgd/all/patches/2.3.1-use-cci.patch diff --git a/recipes/libgd/all/conandata.yml b/recipes/libgd/all/conandata.yml index 235cf46164b0a..1c4db40fa14b0 100644 --- a/recipes/libgd/all/conandata.yml +++ b/recipes/libgd/all/conandata.yml @@ -48,9 +48,6 @@ patches: - patch_file: "patches/2.3.x-png-msvc.patch" patch_description: "support png on msvc" patch_type: "portability" - - patch_file: "patches/2.3.1-use-cci.patch" - patch_description: "use cci's package" - patch_type: "conan" "2.3.0": - patch_file: "patches/remove-unistd-h.patch" patch_description: "remove unistd.h to fix build error" @@ -61,9 +58,6 @@ patches: - patch_file: "patches/2.3.x-png-msvc.patch" patch_description: "support png on msvc" patch_type: "conan" - - patch_file: "patches/2.3.0-use-cci.patch" - patch_description: "use cci's package" - patch_type: "conan" "2.2.5": - patch_file: "patches/2.2.5-msvc-static-lib.patch" patch_description: "support static build on msvc" @@ -71,6 +65,3 @@ patches: - patch_file: "patches/2.2.5-qualify-nondll.patch" patch_description: "use BGD_NONDLL instead NONDLL" patch_type: "conan" - - patch_file: "patches/2.2.5-use-cci.patch" - patch_description: "use cci's package" - patch_type: "conan" diff --git a/recipes/libgd/all/conanfile.py b/recipes/libgd/all/conanfile.py index 0c18187731da2..ffc0a4e68966c 100644 --- a/recipes/libgd/all/conanfile.py +++ b/recipes/libgd/all/conanfile.py @@ -26,6 +26,8 @@ class LibgdConan(ConanFile): "with_freetype": [True, False], "with_xpm": [True, False], "with_webp": [True, False], + "with_heif": [True, False], + "with_avif": [True, False], } default_options = { "shared": False, @@ -36,6 +38,8 @@ class LibgdConan(ConanFile): "with_freetype": False, "with_xpm": False, "with_webp": False, + "with_heif": False, + "with_avif": False, } def export_sources(self): @@ -44,6 +48,9 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "2.3.2": + del self.options.with_heif + del self.options.with_avif def configure(self): if self.options.shared: @@ -70,6 +77,10 @@ def requirements(self): self.requires("libxpm/3.5.13") if self.options.with_webp: self.requires("libwebp/1.3.2") + if self.options.get_safe("with_heif"): + self.requires("libheif/1.16.2") + if self.options.get_safe("with_avif"): + self.requires("libavif/1.0.4") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -90,14 +101,18 @@ def generate(self): tc.variables["ENABLE_FONTCONFIG"] = False tc.variables["ENABLE_WEBP"] = self.options.with_webp if Version(self.version) >= "2.3.2": - tc.variables["ENABLE_HEIF"] = False - tc.variables["ENABLE_AVIF"] = False + tc.variables["ENABLE_HEIF"] = self.options.get_safe("with_heif", False) + tc.variables["ENABLE_AVIF"] = self.options.get_safe("with_avif", False) if Version(self.version) >= "2.3.0": tc.variables["ENABLE_RAQM"] = False tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() deps = CMakeDeps(self) + deps.set_property("libheif", "cmake_file_name", "HEIF") + deps.set_property("webp", "cmake_file_name", "WEBP") + deps.set_property("libxpm", "cmake_file_name", "XPM") + deps.set_property("freetype", "cmake_file_name", "FREETYPE") deps.generate() def _patch(self): diff --git a/recipes/libgd/all/patches/2.2.5-use-cci.patch b/recipes/libgd/all/patches/2.2.5-use-cci.patch deleted file mode 100644 index 63805346e86b3..0000000000000 --- a/recipes/libgd/all/patches/2.2.5-use-cci.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8c99816..63775fd 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -97,7 +97,7 @@ else (USE_EXT_GD) - FIND_PACKAGE(ZLIB) - - IF (ENABLE_WEBP) -- FIND_PACKAGE(WEBP) -+ FIND_PACKAGE(WebP) - ENDIF (ENABLE_WEBP) - - IF (ENABLE_LIQ) -@@ -121,7 +121,7 @@ else (USE_EXT_GD) - endif (ENABLE_FREETYPE) - - if (ENABLE_XPM) -- FIND_PACKAGE(XPM) -+ FIND_PACKAGE(libxpm) - endif (ENABLE_XPM) - - if (ENABLE_FONTCONFIG) -@@ -140,7 +140,7 @@ else (USE_EXT_GD) - ENDIF(ZLIB_FOUND) - - IF(WEBP_FOUND) -- INCLUDE_DIRECTORIES(${WEBP_INCLUDE_DIR}) -+ INCLUDE_DIRECTORIES(${WebP_INCLUDE_DIR}) - SET(HAVE_LIBWEBP 1) - ENDIF(WEBP_FOUND) - -@@ -161,7 +161,7 @@ else (USE_EXT_GD) - ENDIF(LIQ_FOUND) - - IF(XPM_FOUND) -- INCLUDE_DIRECTORIES(${XPM_INCLUDE_DIR}) -+ INCLUDE_DIRECTORIES(${libxpm_INCLUDE_DIR}) - SET(HAVE_LIBXPM 1) - ENDIF(XPM_FOUND) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 5b764eb..11d3a46 100755 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -110,15 +110,15 @@ INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_S - - SET(LIBGD_DEP_LIBS - ${ZLIB_LIBRARIES} -- ${FREETYPE_LIBRARIES} -+ ${freetype_LIBRARIES} - ${PNG_LIBRARIES} - ${ICONV_LIBRARIES} - ${LIQ_LIBRARIES} - ${JPEG_LIBRARIES} - ${TIFF_LIBRARIES} -- ${XPM_LIBRARIES} -+ ${libxpm_LIBRARIES} - ${FONTCONFIG_LIBRARY} -- ${WEBP_LIBRARIES} -+ ${WebP_LIBRARIES} - ) - if (BUILD_SHARED_LIBS) - target_link_libraries(${GD_LIB} ${LIBGD_DEP_LIBS}) diff --git a/recipes/libgd/all/patches/2.3.0-use-cci.patch b/recipes/libgd/all/patches/2.3.0-use-cci.patch deleted file mode 100644 index 6083253b1e3db..0000000000000 --- a/recipes/libgd/all/patches/2.3.0-use-cci.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index fc76868..f503436 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -113,7 +113,7 @@ else (USE_EXT_GD) - FIND_PACKAGE(ZLIB) - - IF (ENABLE_WEBP) -- FIND_PACKAGE(WEBP) -+ FIND_PACKAGE(WebP) - ENDIF (ENABLE_WEBP) - - IF (ENABLE_LIQ) -@@ -137,7 +137,7 @@ else (USE_EXT_GD) - endif (ENABLE_FREETYPE) - - if (ENABLE_XPM) -- FIND_PACKAGE(XPM) -+ FIND_PACKAGE(libxpm) - endif (ENABLE_XPM) - - if (ENABLE_FONTCONFIG) -@@ -162,7 +162,7 @@ else (USE_EXT_GD) - ENDIF(ZLIB_FOUND) - - IF(WEBP_FOUND) -- INCLUDE_DIRECTORIES(${WEBP_INCLUDE_DIR}) -+ INCLUDE_DIRECTORIES(${WebP_INCLUDE_DIR}) - SET(HAVE_LIBWEBP 1) - ENDIF(WEBP_FOUND) - -@@ -183,7 +183,7 @@ else (USE_EXT_GD) - ENDIF(LIQ_FOUND) - - IF(XPM_FOUND) -- INCLUDE_DIRECTORIES(${XPM_INCLUDE_DIR}) -+ INCLUDE_DIRECTORIES(${libxpm_INCLUDE_DIR}) - SET(HAVE_LIBXPM 1) - ENDIF(XPM_FOUND) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 98b9e64..0d676ba 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -125,14 +125,14 @@ INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_S - - SET(LIBGD_DEP_LIBS - ${ZLIB_LIBRARIES} -- ${FREETYPE_LIBRARIES} -+ ${freetype_LIBRARIES} - ${PNG_LIBRARIES} - ${ICONV_LIBRARIES} - ${LIQ_LIBRARIES} - ${JPEG_LIBRARIES} - ${TIFF_LIBRARIES} -- ${XPM_LIBRARIES} -+ ${libxpm_LIBRARIES} - ${FONTCONFIG_LIBRARY} -- ${WEBP_LIBRARIES} -+ ${WebP_LIBRARIES} - ${RAQM_LIBRARIES} - ) - if (BUILD_SHARED_LIBS) diff --git a/recipes/libgd/all/patches/2.3.1-use-cci.patch b/recipes/libgd/all/patches/2.3.1-use-cci.patch deleted file mode 100644 index 540439b9bf43a..0000000000000 --- a/recipes/libgd/all/patches/2.3.1-use-cci.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index bf7836f..c4995b0 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -116,7 +116,7 @@ else (USE_EXT_GD) - endif (ENABLE_ICONV) - - IF (ENABLE_WEBP) -- FIND_PACKAGE(WEBP REQUIRED) -+ FIND_PACKAGE(WebP REQUIRED) - ENDIF (ENABLE_WEBP) - - IF (ENABLE_LIQ) -@@ -140,7 +140,7 @@ else (USE_EXT_GD) - endif (ENABLE_FREETYPE) - - if (ENABLE_XPM) -- FIND_PACKAGE(XPM REQUIRED) -+ FIND_PACKAGE(libxpm REQUIRED) - endif (ENABLE_XPM) - - if (ENABLE_FONTCONFIG) -@@ -167,7 +167,7 @@ else (USE_EXT_GD) - ENDIF(ZLIB_FOUND) - - IF(WEBP_FOUND) -- INCLUDE_DIRECTORIES(${WEBP_INCLUDE_DIR}) -+ INCLUDE_DIRECTORIES(${WebP_INCLUDE_DIR}) - SET(HAVE_LIBWEBP 1) - ENDIF(WEBP_FOUND) - -@@ -189,7 +189,7 @@ else (USE_EXT_GD) - ENDIF(LIQ_FOUND) - - IF(XPM_FOUND) -- INCLUDE_DIRECTORIES(${XPM_INCLUDE_DIR}) -+ INCLUDE_DIRECTORIES(${libxpm_INCLUDE_DIR}) - SET(HAVE_LIBXPM 1) - LIST(APPEND PKG_REQUIRES_PRIVATES xpm) - ENDIF(XPM_FOUND) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index e1f8eda..47b1ee8 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -125,15 +125,15 @@ INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_S - - SET(LIBGD_DEP_LIBS - ${ZLIB_LIBRARIES} -- ${FREETYPE_LIBRARIES} -+ ${freetype_LIBRARIES} - ${PNG_LIBRARIES} - ${ICONV_LIBRARIES} - ${LIQ_LIBRARIES} - ${JPEG_LIBRARIES} - ${TIFF_LIBRARIES} -- ${XPM_LIBRARIES} -+ ${libxpm_LIBRARIES} - ${FONTCONFIG_LIBRARY} -- ${WEBP_LIBRARIES} -+ ${WebP_LIBRARIES} - ${RAQM_LIBRARIES} - ) - if (BUILD_SHARED_LIBS) -@@ -146,7 +146,7 @@ endif() - SET(LIBS_PRIVATES - ${ICONV_LIBRARIES} - ${LIQ_LIBRARIES} -- ${WEBP_LIBRARIES} -+ ${WebP_LIBRARIES} - ) - - set(GD_PROGRAMS gdcmpgif) diff --git a/recipes/libgd/all/patches/2.3.2-use-cci.patch b/recipes/libgd/all/patches/2.3.2-use-cci.patch index 758709ea2bdc7..57724df5d1cec 100644 --- a/recipes/libgd/all/patches/2.3.2-use-cci.patch +++ b/recipes/libgd/all/patches/2.3.2-use-cci.patch @@ -1,69 +1,27 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 57cd95d..11a8409 100644 +index 57cd95d..f7640c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -118,7 +118,7 @@ else (USE_EXT_GD) - endif (ENABLE_ICONV) - - IF (ENABLE_WEBP) -- FIND_PACKAGE(WEBP REQUIRED) -+ FIND_PACKAGE(WebP REQUIRED) - ENDIF (ENABLE_WEBP) - - IF (ENABLE_HEIF) -@@ -153,7 +153,7 @@ else (USE_EXT_GD) - endif (ENABLE_FREETYPE) - - if (ENABLE_XPM) -- FIND_PACKAGE(XPM REQUIRED) -+ FIND_PACKAGE(libxpm REQUIRED) - endif (ENABLE_XPM) - - if (ENABLE_FONTCONFIG) -@@ -180,7 +180,7 @@ else (USE_EXT_GD) - ENDIF(ZLIB_FOUND) - - IF(WEBP_FOUND) -- INCLUDE_DIRECTORIES(${WEBP_INCLUDE_DIR}) -+ INCLUDE_DIRECTORIES(${WebP_INCLUDE_DIR}) - SET(HAVE_LIBWEBP 1) - ENDIF(WEBP_FOUND) - -@@ -207,7 +207,7 @@ else (USE_EXT_GD) - ENDIF(LIQ_FOUND) - - IF(XPM_FOUND) -- INCLUDE_DIRECTORIES(${XPM_INCLUDE_DIR}) -+ INCLUDE_DIRECTORIES(${libxpm_INCLUDE_DIR}) - SET(HAVE_LIBXPM 1) +@@ -126,7 +126,7 @@ else (USE_EXT_GD) + ENDIF (ENABLE_HEIF) + + IF (ENABLE_AVIF) +- FIND_PACKAGE(libavif 0.8.2 REQUIRED CONFIG) ++ FIND_PACKAGE(libavif REQUIRED CONFIG) + SET(HAVE_LIBAVIF 1) + SET(AVIF_LIBRARIES avif) + SET(AVIF_FOUND 1) +@@ -212,11 +212,11 @@ else (USE_EXT_GD) LIST(APPEND PKG_REQUIRES_PRIVATES xpm) ENDIF(XPM_FOUND) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 1d1be42..2843193 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -122,13 +122,13 @@ INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_S - SET(LIBGD_DEP_LIBS - ${ZLIB_LIBRARIES} -- ${FREETYPE_LIBRARIES} -+ ${freetype_LIBRARIES} - ${PNG_LIBRARIES} - ${ICONV_LIBRARIES} - ${LIQ_LIBRARIES} - ${JPEG_LIBRARIES} - ${TIFF_LIBRARIES} -- ${XPM_LIBRARIES} -+ ${libxpm_LIBRARIES} - ${FONTCONFIG_LIBRARY} - ${WEBP_LIBRARIES} - ${AVIF_LIBRARIES} -@@ -145,7 +145,7 @@ endif() - SET(LIBS_PRIVATES - ${ICONV_LIBRARIES} - ${LIQ_LIBRARIES} -- ${WEBP_LIBRARIES} -+ ${WebP_LIBRARIES} - ) +- IF(JPEG_FOUND) ++ IF(ENABLE_JPEG AND JPEG_FOUND) + INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR}) + SET(HAVE_LIBJPEG 1) + LIST(APPEND PKG_REQUIRES_PRIVATES libjpeg) +- ENDIF(JPEG_FOUND) ++ ENDIF() - set(GD_PROGRAMS gdcmpgif) + IF(TIFF_FOUND) + INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) diff --git a/recipes/libgd/all/patches/2.3.3-use-cci.patch b/recipes/libgd/all/patches/2.3.3-use-cci.patch index fb8b637380621..561c4e9f127a0 100644 --- a/recipes/libgd/all/patches/2.3.3-use-cci.patch +++ b/recipes/libgd/all/patches/2.3.3-use-cci.patch @@ -1,72 +1,27 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6b3e5b3..2536fc6 100644 +index 6b3e5b3..2b71c74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -134,7 +134,7 @@ else (USE_EXT_GD) - endif (ENABLE_ICONV) - - IF (ENABLE_WEBP) -- FIND_PACKAGE(WEBP REQUIRED) -+ FIND_PACKAGE(WebP REQUIRED) - ENDIF (ENABLE_WEBP) - - IF (ENABLE_HEIF) -@@ -169,7 +169,7 @@ else (USE_EXT_GD) - endif (ENABLE_FREETYPE) - - if (ENABLE_XPM) -- FIND_PACKAGE(XPM REQUIRED) -+ FIND_PACKAGE(libxpm REQUIRED) - endif (ENABLE_XPM) - - if (ENABLE_FONTCONFIG) -@@ -196,7 +196,7 @@ else (USE_EXT_GD) - ENDIF(ZLIB_FOUND) - - IF(WEBP_FOUND) -- INCLUDE_DIRECTORIES(${WEBP_INCLUDE_DIR}) -+ INCLUDE_DIRECTORIES(${WebP_INCLUDE_DIR}) - SET(HAVE_LIBWEBP 1) - ENDIF(WEBP_FOUND) - -@@ -223,7 +223,7 @@ else (USE_EXT_GD) - ENDIF(LIQ_FOUND) - - IF(XPM_FOUND) -- INCLUDE_DIRECTORIES(${XPM_INCLUDE_DIR}) -+ INCLUDE_DIRECTORIES(${libxpm_INCLUDE_DIR}) - SET(HAVE_LIBXPM 1) +@@ -142,7 +142,7 @@ else (USE_EXT_GD) + ENDIF (ENABLE_HEIF) + + IF (ENABLE_AVIF) +- FIND_PACKAGE(libavif 0.8.2 REQUIRED CONFIG) ++ FIND_PACKAGE(libavif REQUIRED CONFIG) + SET(HAVE_LIBAVIF 1) + SET(AVIF_LIBRARIES avif) + SET(AVIF_FOUND 1) +@@ -228,11 +228,11 @@ else (USE_EXT_GD) LIST(APPEND PKG_REQUIRES_PRIVATES xpm) ENDIF(XPM_FOUND) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 3b271a8..55a8095 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -102,15 +102,15 @@ INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_S - SET(LIBGD_DEP_LIBS - ${ZLIB_LIBRARIES} -- ${FREETYPE_LIBRARIES} -+ ${freetype_LIBRARIES} - ${PNG_LIBRARIES} - ${ICONV_LIBRARIES} - ${LIQ_LIBRARIES} - ${JPEG_LIBRARIES} - ${TIFF_LIBRARIES} -- ${XPM_LIBRARIES} -+ ${libxpm_LIBRARIES} - ${FONTCONFIG_LIBRARY} -- ${WEBP_LIBRARIES} -+ ${WebP_LIBRARIES} - ${AVIF_LIBRARIES} - ${RAQM_LIBRARIES} - ${HEIF_LIBRARIES} -@@ -125,7 +125,7 @@ endif() - SET(LIBS_PRIVATES - ${ICONV_LIBRARIES} - ${LIQ_LIBRARIES} -- ${WEBP_LIBRARIES} -+ ${WebP_LIBRARIES} - ) +- IF(JPEG_FOUND) ++ IF(ENABLE_JPEG AND JPEG_FOUND) + INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR}) + SET(HAVE_LIBJPEG 1) + LIST(APPEND PKG_REQUIRES_PRIVATES libjpeg) +- ENDIF(JPEG_FOUND) ++ ENDIF() - set(GD_PROGRAMS gdcmpgif) + IF(TIFF_FOUND) + INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) From 6edbc7ccdce5c4c476b10751d96c63936295e170 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 1 Apr 2024 21:07:41 +0300 Subject: [PATCH 377/405] (#23216) libcvd: new recipe * libcvd: new recipe * libcvd: OpenGL is required on Windows * libcvd: tidy conandata.yml * libcvd: fix Windows build * libcvd: add ws2_32 system dep * libcvd: use libglvnd * libcvd: bump to v2.5.1 --- recipes/libcvd/all/conandata.yml | 4 + recipes/libcvd/all/conanfile.py | 177 ++++++++++++++++++ .../libcvd/all/test_package/CMakeLists.txt | 9 + recipes/libcvd/all/test_package/conanfile.py | 26 +++ .../libcvd/all/test_package/test_package.cpp | 85 +++++++++ recipes/libcvd/config.yml | 3 + 6 files changed, 304 insertions(+) create mode 100644 recipes/libcvd/all/conandata.yml create mode 100644 recipes/libcvd/all/conanfile.py create mode 100644 recipes/libcvd/all/test_package/CMakeLists.txt create mode 100644 recipes/libcvd/all/test_package/conanfile.py create mode 100644 recipes/libcvd/all/test_package/test_package.cpp create mode 100644 recipes/libcvd/config.yml diff --git a/recipes/libcvd/all/conandata.yml b/recipes/libcvd/all/conandata.yml new file mode 100644 index 0000000000000..8c0de4fe10731 --- /dev/null +++ b/recipes/libcvd/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.5.1": + url: "https://github.com/edrosten/libcvd/archive/refs/tags/RELEASE_2_5_1.tar.gz" + sha256: "c077e426e1bd6e6c7af3b9330ec1496a59789f2d0c529dc18049fc653947dd6e" diff --git a/recipes/libcvd/all/conanfile.py b/recipes/libcvd/all/conanfile.py new file mode 100644 index 0000000000000..a272a22ebfe97 --- /dev/null +++ b/recipes/libcvd/all/conanfile.py @@ -0,0 +1,177 @@ +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, save, rmdir, replace_in_file +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" + + +class LibCVDConan(ConanFile): + name = "libcvd" + description = "libCVD - efficient and easy-to-use C++ computer vision library" + license = "BSD-2-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/edrosten/libcvd" + topics = ("computer-vision",) + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_libjpeg": [False, "libjpeg", "libjpeg-turbo", "mozjpeg"], + "with_libpng": [True, False], + "with_libtiff": [True, False], + "with_ffmpeg": [True, False], + "with_libdc1394": [True, False], + "with_opengl": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_libjpeg": "libjpeg", + "with_libpng": True, + "with_libtiff": True, + # Build without video support by default + "with_ffmpeg": False, + "with_libdc1394": False, + "with_opengl": False, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "5", + "apple-clang": "10", + "msvc": "191", + "Visual Studio": "15", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + # OpenGL is always used on Windows + del self.options.with_opengl + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + # https://github.com/edrosten/libcvd/blob/main/cmake/CVDFindAllDeps.cmake + if self.options.with_ffmpeg: + # FFMPEG v5.x+ are not supported + self.requires("ffmpeg/4.4.4", transitive_libs=True) + if self.options.with_libdc1394: + self.requires("libdc1394/2.2.7") + # FIXME: libidc1394 seems to be missing raw1394 dependency + # test_package fails with "undefined reference to `raw1394_new_handle'" etc + if self.options.with_libjpeg == "libjpeg-turbo": + 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.5") + if self.options.with_libpng: + self.requires("libpng/[>=1.6 <2]") + if self.options.with_libtiff: + self.requires("libtiff/4.6.0") + if self.options.get_safe("with_opengl", True): + # https://github.com/edrosten/libcvd/blob/RELEASE_2_5_0/cvd/videodisplay.h#L18-L20 + if self.settings.os in ["Linux", "FreeBSD"]: + self.requires("libglvnd/1.7.0", transitive_headers=True, transitive_libs=True) + self.requires("xorg/system", transitive_headers=True, transitive_libs=True) + else: + self.requires("opengl/system", transitive_headers=True, transitive_libs=True) + # TODO: https://github.com/ankurhanda/TooN + # https://github.com/edrosten/libcvd/blob/RELEASE_2_5_0/cvd/canny.h#L4 + # self.requires("toon/3.1.1", transitive_headers=True, transitive_libs=True) + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CVD_ENABLE_TESTS"] = False + tc.variables["CVD_ENABLE_PROGS"] = False + tc.variables["CVD_ENABLE_EXAMPLES"] = False + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_ffmpeg"] = not self.options.with_ffmpeg + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_libdc1394"] = not self.options.with_libdc1394 + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_JPEG"] = not self.options.with_libjpeg + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_PNG"] = not self.options.with_libpng + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_TIFF"] = not self.options.with_libtiff + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_OpenGL"] = not self.options.get_safe("with_opengl", True) + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_X11"] = not self.options.get_safe("with_opengl", True) + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_TooN"] = True + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("ffmpeg", "cmake_file_name", "CVD_FFMPEG") + deps.set_property("libdc1394", "cmake_file_name", "CVD_dc1394v2") + deps.set_property("toon", "cmake_file_name", "CVD_TooN") + deps.generate() + + def _patch_sources(self): + # Use deps from Conan + save(self, os.path.join(self.source_folder, "cmake", "CVDFindFFMPEG.cmake"), + "find_package(CVD_FFMPEG REQUIRED)\n" if self.options.with_ffmpeg else "") + save(self, os.path.join(self.source_folder, "cmake", "CVDFinddc1394v2.cmake"), + "find_package(CVD_dc1394v2 REQUIRED)\n" if self.options.with_libdc1394 else "") + save(self, os.path.join(self.source_folder, "cmake", "CVDFindTooN.cmake"), + "set(CVD_TooN_FOUND FALSE)\n") + + # For debugging + save(self, os.path.join(self.source_folder, "cmake", "CVDFindAllDeps.cmake"), + '\nmessage(INFO "CVD_DEP_LIBS: ${CVD_DEP_LIBS}")\n', append=True) + + # Install DLL + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)", + "install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin)") + + + 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, "cmake")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "CVD") + self.cpp_info.set_property("cmake_target_name", "cvd") + self.cpp_info.set_property("cmake_find_mode", "both") + + postfix = "_debug" if self.settings.build_type == "Debug" else "" + self.cpp_info.libs = ["cvd" + postfix] + + if self.settings.os == "Windows": + self.cpp_info.system_libs.append("ws2_32") diff --git a/recipes/libcvd/all/test_package/CMakeLists.txt b/recipes/libcvd/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..22605b8561ab7 --- /dev/null +++ b/recipes/libcvd/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(CVD REQUIRED MODULE) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE ${CVD_LIBRARIES}) +target_include_directories(${PROJECT_NAME} PRIVATE ${CVD_INCLUDE_DIRS}) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/libcvd/all/test_package/conanfile.py b/recipes/libcvd/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/libcvd/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/libcvd/all/test_package/test_package.cpp b/recipes/libcvd/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..4e0988c93bbd2 --- /dev/null +++ b/recipes/libcvd/all/test_package/test_package.cpp @@ -0,0 +1,85 @@ +// https://github.com/edrosten/libcvd/blob/RELEASE_2_5_0/examples/distance_transform.cc + +// Copyright (c) 2005--2013, The Authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS'' +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +#include +#include + +#include +#include + +using CVD::byte; +using CVD::euclidean_distance_transform_sq; +using CVD::Image; +using CVD::ImageRef; +using CVD::img_save; +using CVD::Rgb; +using std::max_element; +using std::mt19937; +using std::uniform_int_distribution; + +int main() +{ + //Create a blank image. + Image im(ImageRef(128, 128), 0); + + mt19937 engine; + uniform_int_distribution rand_x(0, im.size().x - 1); + uniform_int_distribution rand_y(0, im.size().y - 1); + + //Scatter down 7 points at random. + for(int i = 1; i < 8; i++) + im[rand_y(engine)][rand_x(engine)] = i; + + Image dt(im.size()); + Image inverse_dt(im.size()); + + //Perform the distance transform + euclidean_distance_transform_sq(im, dt, inverse_dt); + + //Create an output which is the distance transfom of the input, + //but coloured according to which pixel is closest. + int largest_distance = *max_element(dt.begin(), dt.end()); + + Image> out(im.size()); + + for(int y = 0; y < im.size().y; y++) + for(int x = 0; x < im.size().x; x++) + { + int c = floor(sqrt(dt[y][x] * 1.0 / largest_distance) * 255 + .5); + + Rgb r(0, 0, 0); + if(im[inverse_dt[y][x]] & 1) + r.red = c; + if(im[inverse_dt[y][x]] & 2) + r.green = c; + if(im[inverse_dt[y][x]] & 4) + r.blue = c; + + out[y][x] = r; + } + + img_save(out, "distance_transform_result.png"); +} diff --git a/recipes/libcvd/config.yml b/recipes/libcvd/config.yml new file mode 100644 index 0000000000000..eab83a303df52 --- /dev/null +++ b/recipes/libcvd/config.yml @@ -0,0 +1,3 @@ +versions: + "2.5.1": + folder: all From 7f7399d1e028bf35d2aeab581b63de46224da90a Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 2 Apr 2024 03:47:43 +0900 Subject: [PATCH 378/405] (#23178) z3: add version 4.13.0 --- recipes/z3/all/conandata.yml | 3 +++ recipes/z3/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/z3/all/conandata.yml b/recipes/z3/all/conandata.yml index f57877f85f54a..22ef6c0cbb592 100644 --- a/recipes/z3/all/conandata.yml +++ b/recipes/z3/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.13.0": + url: "https://github.com/Z3Prover/z3/archive/z3-4.13.0.tar.gz" + sha256: "01bcc61c8362e37bb89fd2430f7e3385e86df7915019bd2ce45de9d9bd934502" "4.12.4": url: "https://github.com/Z3Prover/z3/archive/z3-4.12.4.tar.gz" sha256: "25e9b18d04ee22f1d872dfe0daaf4c39034744525214e34fedd206e25140e96e" diff --git a/recipes/z3/config.yml b/recipes/z3/config.yml index 3fad1114f7caf..3b0214f4790b4 100644 --- a/recipes/z3/config.yml +++ b/recipes/z3/config.yml @@ -1,4 +1,6 @@ versions: + "4.13.0": + folder: "all" "4.12.4": folder: "all" "4.12.2": From 41a7561a40fc2ae1b928869653e16f0159a2d9ff Mon Sep 17 00:00:00 2001 From: Conan Center Index Bot <54393557+conan-center-bot@users.noreply.github.com> Date: Mon, 1 Apr 2024 20:21:37 +0100 Subject: [PATCH 379/405] (#23331) [bot] Update list of references (prod-v2/ListPackages) Co-authored-by: conan-center-bot --- .c3i/conan_v2_ready_references.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index cb129d27a5d1b..4d1e0b1a6370f 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -209,6 +209,7 @@ required_for_references: - cose-c - cotila - coz +- cpp-channel - cpp-httplib - cpp-ipc - cpp-jwt @@ -632,6 +633,7 @@ required_for_references: - libbacktrace - libbasisu - libbigwig +- libboxes - libbpf - libbsd - libcap @@ -677,6 +679,7 @@ required_for_references: - libfreenect - libfreenect2 - libftdi +- libftp - libfuse - libgcrypt - libgd From 057c6c5fdb23bac89e8c3b05f38cf17d4598db67 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Mon, 1 Apr 2024 22:09:34 +0200 Subject: [PATCH 380/405] (#23157) runtimeqml: bump qt * runtimeqml: bump qt * fix linter * Update conanfile.py * put theCMakeLists in the right folder * Apply suggestions from code review Co-authored-by: Martin Valgur --------- Co-authored-by: Martin Valgur --- recipes/runtimeqml/all/conanfile.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/recipes/runtimeqml/all/conanfile.py b/recipes/runtimeqml/all/conanfile.py index 8ed18efdf54c9..cae0fb3d308bb 100644 --- a/recipes/runtimeqml/all/conanfile.py +++ b/recipes/runtimeqml/all/conanfile.py @@ -41,8 +41,7 @@ def _compilers_minimum_version(self): } def export_sources(self): - copy(self, "CMakeLists.txt", self.recipe_folder, - self.export_sources_folder) + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": @@ -50,19 +49,16 @@ def config_options(self): def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") def layout(self): - cmake_layout(self) + cmake_layout(self, src_folder="src") def requirements(self): if Version(self.version) <= "cci.20211220": - self.requires("qt/5.15.5") + self.requires("qt/5.15.13") else: - self.requires("qt/6.3.1") + self.requires("qt/6.6.2") def validate(self): if self.info.settings.compiler.cppstd: @@ -81,8 +77,7 @@ def validate(self): f"{self.ref} requires option qt:qtdeclarative=True") def source(self): - get(self, **self.conan_data["sources"][str(self.version)], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][str(self.version)], strip_root=True) def generate(self): tc = CMakeToolchain(self) From b62686a4ad7048ecdf91de1b92a3d123f44be2ea Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 1 Apr 2024 23:22:58 +0300 Subject: [PATCH 381/405] (#19291) ouster_sdk: add a new package * ouster_sdk: add new recipe * ouster_sdk: bump fmt, fix flatbuffers target * ouster_sdk: fix missing zlib dep * ouster_sdk: bump libtins * ouster_sdk: unvendor optional-lite, remove shared/ * ouster_sdk: improve test_package coverage * ouster_sdk: improve option description * ouster_sdk: add flatbuffers as tool_requires * ouster_sdk: disable Windows builds for Conan v1 * ouster_sdk: update zlib dependency * ouster_sdk: bump version * ouster_sdk: bump deps * ouster_sdk: CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS * ouster_sdk: bump glfw * ouster_sdk: disable build_pcap by default on Conan v1 * ouster_sdk: bump deps * ouster_sdk: build_osf requires build_pcap * ouster_sdk: fix osf not supporting shared builds * ouster_sdk: backport a bugfix patch --- recipes/ouster_sdk/all/conandata.yml | 11 + recipes/ouster_sdk/all/conanfile.py | 223 ++++++++++++++++++ .../001-579-fix-cpp20-string-error.patch | 25 ++ .../all/test_package/CMakeLists.txt | 8 + .../ouster_sdk/all/test_package/conanfile.py | 36 +++ .../all/test_package/test_package.cpp | 38 +++ recipes/ouster_sdk/config.yml | 3 + 7 files changed, 344 insertions(+) create mode 100644 recipes/ouster_sdk/all/conandata.yml create mode 100644 recipes/ouster_sdk/all/conanfile.py create mode 100644 recipes/ouster_sdk/all/patches/001-579-fix-cpp20-string-error.patch create mode 100644 recipes/ouster_sdk/all/test_package/CMakeLists.txt create mode 100644 recipes/ouster_sdk/all/test_package/conanfile.py create mode 100644 recipes/ouster_sdk/all/test_package/test_package.cpp create mode 100644 recipes/ouster_sdk/config.yml diff --git a/recipes/ouster_sdk/all/conandata.yml b/recipes/ouster_sdk/all/conandata.yml new file mode 100644 index 0000000000000..72736b062686c --- /dev/null +++ b/recipes/ouster_sdk/all/conandata.yml @@ -0,0 +1,11 @@ +sources: + # The C++ library uses a separate versioning scheme from the overall releases + "0.10.0": + url: "https://github.com/ouster-lidar/ouster_example/archive/refs/tags/20231031.tar.gz" + sha256: "150482d28930308ef089233f3d4eb15d1330727a167aad3f9b2190078dcecfbf" +patches: + "0.10.0": + - patch_file: "patches/001-579-fix-cpp20-string-error.patch" + patch_type: "portability" + patch_description: "Fix non-const string issue with C++20" + patch_source: "https://github.com/ouster-lidar/ouster_example/pull/579" diff --git a/recipes/ouster_sdk/all/conanfile.py b/recipes/ouster_sdk/all/conanfile.py new file mode 100644 index 0000000000000..aca955cd49832 --- /dev/null +++ b/recipes/ouster_sdk/all/conanfile.py @@ -0,0 +1,223 @@ +import os + +from conan import ConanFile, conan_version +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import get, copy, rmdir, rm, save, replace_in_file, export_conandata_patches, apply_conandata_patches +from conan.tools.scm import Version + +required_conan_version = ">=1.60.0 <2.0 || >=2.0.6" + +class PackageConan(ConanFile): + name = "ouster_sdk" + description = "Ouster SDK - tools for working with Ouster Lidars" + license = "BSD 3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ouster-lidar/ouster_example" + topics = ("ouster", "lidar", "driver", "hardware", "point cloud", "3d", "robotics", "automotive") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "build_osf": [True, False], + "build_pcap": [True, False], + "build_viz": [True, False], + "eigen_max_align_bytes": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "build_osf": True, + "build_pcap": True, + "build_viz": False, + "eigen_max_align_bytes": False, + } + options_description = { + "build_osf": "Build Ouster OSF library.", + "build_pcap": "Build pcap utils.", + "build_viz": "Build Ouster visualizer.", + "eigen_max_align_bytes": "Force maximum alignment of Eigen data to 32 bytes.", + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "5", + "apple-clang": "10", + "msvc": "191", + "Visual Studio": "15", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + if conan_version.major == 1: + # Turning off by default due to perpetually missing libtins binaries on CCI + self.options.build_pcap = False + self.options.build_osf = False + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + # Used in ouster/types.h + self.requires("eigen/3.4.0", transitive_headers=True) + # Used in ouster/sensor_http.h + self.requires("jsoncpp/1.9.5", transitive_headers=True, transitive_libs=True) + self.requires("spdlog/1.13.0") + self.requires("fmt/10.2.1") + self.requires("libcurl/[>=7.78 <9]") + # Replaces vendored optional-lite + self.requires("optional-lite/3.6.0", transitive_headers=True) + + if self.options.build_pcap: + self.requires("libtins/4.5") + + if self.options.build_osf: + # Used in fb_generated/*.h + self.requires("flatbuffers/24.3.7", transitive_headers=True) + self.requires("libpng/[>=1.6 <2]") + self.requires("zlib/[>=1.2.11 <2]", transitive_libs=True) + + if self.options.build_viz: + self.requires("glad/0.1.36") + self.requires("CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS/3.4") + if self.settings.os != "Windows": + self.requires("xorg/system") + + def validate(self): + if conan_version.major < 2 and self.settings.os == "Windows": + raise ConanInvalidConfiguration("Windows builds require Conan >= 2.0") + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler)) + 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.options.build_osf and not self.options.build_pcap: + raise ConanInvalidConfiguration("build_osf=True requires build_pcap=True") + + if self.options.shared and self.settings.os == "Windows": + raise ConanInvalidConfiguration("Shared builds are not supported on Windows") + + def build_requirements(self): + if self.options.build_osf: + self.tool_requires("flatbuffers/") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = CMakeToolchain(self) + tc.variables["BUILD_VIZ"] = self.options.build_viz + tc.variables["BUILD_PCAP"] = self.options.build_pcap + tc.variables["BUILD_OSF"] = self.options.build_osf + tc.variables["OUSTER_USE_EIGEN_MAX_ALIGN_BYTES_32"] = self.options.eigen_max_align_bytes + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + deps = CMakeDeps(self) + deps.set_property("flatbuffers", "cmake_target_name", "flatbuffers::flatbuffers") + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + + # Unvendor optional-lite + rmdir(self, os.path.join(self.source_folder, "ouster_client", "include", "optional-lite")) + replace_in_file(self, os.path.join(self.source_folder, "ouster_client", "CMakeLists.txt"), + " include/optional-lite", "") + save(self, os.path.join(self.source_folder, "ouster_client", "CMakeLists.txt"), + "find_package(optional-lite REQUIRED)\n" + "target_link_libraries(ouster_client PUBLIC nonstd::optional-lite)\n", + append=True) + + # Allow non-static ouster_osf for consistency with other components + replace_in_file(self, os.path.join(self.source_folder, "ouster_osf", "CMakeLists.txt"), + "add_library(ouster_osf STATIC", "add_library(ouster_osf") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.pdb", self.package_folder, recursive=True) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "OusterSDK") + self.cpp_info.set_property("cmake_target_name", "OusterSDK::OusterSDK") + + self.cpp_info.components["ouster_client"].set_property("cmake_target_name", "OusterSDK::ouster_client") + self.cpp_info.components["ouster_client"].libs = ["ouster_client"] + self.cpp_info.components["ouster_client"].requires = [ + "eigen::eigen", + "jsoncpp::jsoncpp", + "spdlog::spdlog", + "fmt::fmt", + "libcurl::libcurl", + "optional-lite::optional-lite", + ] + + if self.options.build_osf: + self.cpp_info.components["ouster_osf"].set_property("cmake_target_name", "OusterSDK::ouster_osf") + self.cpp_info.components["ouster_osf"].libs = ["ouster_osf"] + self.cpp_info.components["ouster_osf"].includedirs.append(os.path.join("include", "fb_generated")) + self.cpp_info.components["ouster_osf"].requires = [ + "ouster_client", + "ouster_pcap", + "flatbuffers::flatbuffers", + "libpng::libpng", + "zlib::zlib", + ] + + if self.options.build_pcap: + self.cpp_info.components["ouster_pcap"].set_property("cmake_target_name", "OusterSDK::ouster_pcap") + self.cpp_info.components["ouster_pcap"].libs = ["ouster_pcap"] + self.cpp_info.components["ouster_pcap"].requires = [ + "ouster_client", + "libtins::libtins", + ] + + if self.options.build_viz: + self.cpp_info.components["ouster_viz"].set_property("cmake_target_name", "OusterSDK::ouster_viz") + self.cpp_info.components["ouster_viz"].libs = ["ouster_viz"] + self.cpp_info.components["ouster_viz"].requires = [ + "ouster_client", + "glad::glad", + "glfw::glfw", + ] + if self.settings.os != "Windows": + self.cpp_info.components["ouster_viz"].requires.append("xorg::xorg") + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.filenames["cmake_find_package"] = "OusterSDK" + self.cpp_info.filenames["cmake_find_package_multi"] = "OusterSDK" + self.cpp_info.names["cmake_find_package"] = "OusterSDK" + self.cpp_info.names["cmake_find_package_multi"] = "OusterSDK" + diff --git a/recipes/ouster_sdk/all/patches/001-579-fix-cpp20-string-error.patch b/recipes/ouster_sdk/all/patches/001-579-fix-cpp20-string-error.patch new file mode 100644 index 0000000000000..aa80f65d67d9c --- /dev/null +++ b/recipes/ouster_sdk/all/patches/001-579-fix-cpp20-string-error.patch @@ -0,0 +1,25 @@ +From b2896dee6f43733c832c3a60f09f362abe2c5e79 Mon Sep 17 00:00:00 2001 +From: Kevin Greene +Date: Fri, 23 Feb 2024 10:22:02 -0800 +Subject: [PATCH] Fix non-const string issue with C++20 + +--- + ouster_client/src/curl_client.h | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/ouster_client/src/curl_client.h b/ouster_client/src/curl_client.h +index ce3fb31d..62bcabc0 100644 +--- a/ouster_client/src/curl_client.h ++++ b/ouster_client/src/curl_client.h +@@ -89,9 +89,8 @@ class CurlClient : public ouster::util::HttpClient { + // HTTP 5XX means a server error, so we should re-attempt. + // log a warning and sleep before re-attempting + ouster::sensor::logger().warn( +- std::string("Re-attempting CurlClient::execute_get after " +- "failure for url: ") + +- "[{}] with the code: [{}] - and return: {}", ++ "Re-attempting CurlClient::execute_get after failure for " ++ "url: [{}] with the code: [{}] - and return: {}", + url, http_code, buffer); + std::this_thread::sleep_for( + std::chrono::milliseconds(retry_delay_ms)); diff --git a/recipes/ouster_sdk/all/test_package/CMakeLists.txt b/recipes/ouster_sdk/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..498c697a4f010 --- /dev/null +++ b/recipes/ouster_sdk/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) + project(test_package CXX) + +find_package(OusterSDK REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE OusterSDK::OusterSDK) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/ouster_sdk/all/test_package/conanfile.py b/recipes/ouster_sdk/all/test_package/conanfile.py new file mode 100644 index 0000000000000..57c251706a8d6 --- /dev/null +++ b/recipes/ouster_sdk/all/test_package/conanfile.py @@ -0,0 +1,36 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def generate(self): + tc = CMakeToolchain(self) + if self.dependencies["ouster_sdk"].options.build_osf: + tc.preprocessor_definitions["WITH_OSF"] = "1" + if self.dependencies["ouster_sdk"].options.build_pcap: + tc.preprocessor_definitions["WITH_PCAP"] = "1" + if self.dependencies["ouster_sdk"].options.build_viz: + tc.preprocessor_definitions["WITH_VIZ"] = "1" + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/ouster_sdk/all/test_package/test_package.cpp b/recipes/ouster_sdk/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..3190406572ca4 --- /dev/null +++ b/recipes/ouster_sdk/all/test_package/test_package.cpp @@ -0,0 +1,38 @@ +#include "ouster/lidar_scan.h" + +#ifdef WITH_OSF +#include "ouster/osf/writer.h" +#endif +#ifdef WITH_PCAP +#include "ouster/os_pcap.h" +#endif +#ifdef WITH_VIZ +#include "ouster/point_viz.h" +#endif + +#include + +int main() { + size_t w = 100; + size_t h = 100; + using namespace ouster::sensor; + ouster::LidarScan scan(w, h, UDPProfileLidar::PROFILE_RNG19_RFL8_SIG16_NIR16_DUAL); + std::cout << "Successfully created a sensor::LidarScan object" << std::endl; + +#ifdef WITH_OSF + ouster::osf::Writer writer("tmp.osf"); + std::cout << "Successfully created a osf::Writer object" << std::endl; +#endif + +#ifdef WITH_PCAP + try { + ouster::sensor_utils::PcapReader pcap_reader("tmp.pcap"); + } catch (...) { } + std::cout << "Successfully created a sensor_utils::PcapReader object" << std::endl; +#endif + +#ifdef WITH_VIZ + ouster::viz::PointViz viz("Viz example"); + std::cout << "Successfully created a viz::PointViz object" << std::endl; +#endif +} diff --git a/recipes/ouster_sdk/config.yml b/recipes/ouster_sdk/config.yml new file mode 100644 index 0000000000000..1b582dcf6716b --- /dev/null +++ b/recipes/ouster_sdk/config.yml @@ -0,0 +1,3 @@ +versions: + "0.10.0": + folder: all From a6209eab3270dc4cf7c09ad805933098151de124 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Mon, 1 Apr 2024 23:08:05 +0200 Subject: [PATCH 382/405] (#23240) libdrm: fix freebsd linux-headers-generic is linux only --- recipes/libdrm/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/libdrm/all/conanfile.py b/recipes/libdrm/all/conanfile.py index af355e6b5b875..6b0ee32f2161c 100644 --- a/recipes/libdrm/all/conanfile.py +++ b/recipes/libdrm/all/conanfile.py @@ -80,7 +80,7 @@ def layout(self): def requirements(self): if self.options.intel: self.requires("libpciaccess/0.17") - if self.settings.os in ["Linux", "FreeBSD"]: + if self.settings.os == "Linux": self.requires("linux-headers-generic/6.5.9") def validate(self): @@ -139,7 +139,7 @@ def package_info(self): self.cpp_info.components["libdrm_libdrm"].libs = ["drm"] self.cpp_info.components["libdrm_libdrm"].includedirs.append(os.path.join("include", "libdrm")) self.cpp_info.components["libdrm_libdrm"].set_property("pkg_config_name", "libdrm") - if self.settings.os in ["Linux", "FreeBSD"]: + if self.settings.os == "Linux": self.cpp_info.components["libdrm_libdrm"].requires = ["linux-headers-generic::linux-headers-generic"] if Version(self.version) < "2.4.111": From ef3bb029ef69bad215c6608b371196e3f1a75f8c Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 2 Apr 2024 00:47:42 +0300 Subject: [PATCH 383/405] (#23248) pixman: add v0.43.4, drop vulnerable versions https://repology.org/project/pixman/cves --- recipes/pixman/all/conandata.yml | 29 +- recipes/pixman/all/conanfile.py | 8 +- .../0001-incompatible-pointer-types.patch | 21 -- .../pixman/all/patches/0002-meson-build.patch | 253 ------------------ .../all/patches/0003-meson-static-build.patch | 28 -- recipes/pixman/config.yml | 6 +- 6 files changed, 8 insertions(+), 337 deletions(-) delete mode 100644 recipes/pixman/all/patches/0001-incompatible-pointer-types.patch delete mode 100644 recipes/pixman/all/patches/0002-meson-build.patch delete mode 100644 recipes/pixman/all/patches/0003-meson-static-build.patch diff --git a/recipes/pixman/all/conandata.yml b/recipes/pixman/all/conandata.yml index f712201caaef3..dc1f3f424ea14 100644 --- a/recipes/pixman/all/conandata.yml +++ b/recipes/pixman/all/conandata.yml @@ -1,4 +1,9 @@ sources: + "0.43.4": + url: + - "https://www.cairographics.org/releases/pixman-0.43.4.tar.gz" + - "https://www.x.org/releases/individual/lib/pixman-0.43.4.tar.gz" + sha256: "a0624db90180c7ddb79fc7a9151093dc37c646d8c38d3f232f767cf64b85a226" "0.43.0": url: - "https://www.cairographics.org/releases/pixman-0.43.0.tar.gz" @@ -9,33 +14,9 @@ sources: - "https://www.cairographics.org/releases/pixman-0.42.2.tar.gz" - "https://www.x.org/releases/individual/lib/pixman-0.42.2.tar.gz" sha256: "ea1480efada2fd948bc75366f7c349e1c96d3297d09a3fe62626e38e234a625e" - "0.40.0": - url: - - "https://www.cairographics.org/releases/pixman-0.40.0.tar.gz" - - "https://www.x.org/releases/individual/lib/pixman-0.40.0.tar.gz" - sha256: "6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc" - "0.38.4": - url: - - "https://www.cairographics.org/releases/pixman-0.38.4.tar.gz" - - "https://www.x.org/releases/individual/lib/pixman-0.38.4.tar.gz" - sha256: "da66d6fd6e40aee70f7bd02e4f8f76fc3f006ec879d346bae6a723025cfbdde7" patches: "0.42.2": - patch_file: "patches/0.42.2-0001-pixman-arma64-Adjustments-to-build-with-llvm-integra.patch" patch_description: "Adjustments to build for arm64 with LLVM's assembler" patch_type: "portability" patch_source: "https://gitlab.freedesktop.org/pixman/pixman/-/merge_requests/71" - "0.40.0": - - patch_file: "patches/0001-incompatible-pointer-types.patch" - patch_description: "backport fix for clang build" - patch_type: "portability" - patch_source: "https://gitlab.freedesktop.org/pixman/pixman/-/merge_requests/48" - - patch_file: "patches/0003-meson-static-build.patch" - patch_description: "backport fix for msvc static build" - patch_type: "bugfix" - patch_source: "https://gitlab.freedesktop.org/pixman/pixman/-/commit/48d5df1f3772a08a929dcb3b2fe4d7b1853223c9.patch" - "0.38.4": - - patch_file: "patches/0002-meson-build.patch" - patch_description: "backport meson build files from 0.40.0 to fix windows build" - patch_type: "portability" - patch_source: "https://gitlab.freedesktop.org/pixman/pixman/-/tree/pixman-0.40.0" diff --git a/recipes/pixman/all/conanfile.py b/recipes/pixman/all/conanfile.py index 8d655189662cb..c0b64456bcee2 100644 --- a/recipes/pixman/all/conanfile.py +++ b/recipes/pixman/all/conanfile.py @@ -1,7 +1,6 @@ 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 ( @@ -11,7 +10,6 @@ from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain from conan.tools.microsoft import is_msvc -from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -50,12 +48,8 @@ def configure(self): def layout(self): basic_layout(self, src_folder="src") - def validate(self): - if self.settings.os == "Windows" and self.options.shared and Version(self.version) < "0.40.0": - raise ConanInvalidConfiguration(f"pixman/{self.version} can only be built as a static library on Windows") - def build_requirements(self): - self.tool_requires("meson/1.2.3") + self.tool_requires("meson/1.4.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/pixman/all/patches/0001-incompatible-pointer-types.patch b/recipes/pixman/all/patches/0001-incompatible-pointer-types.patch deleted file mode 100644 index ee95a8b091433..0000000000000 --- a/recipes/pixman/all/patches/0001-incompatible-pointer-types.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c -index 4cfabe3..3832e2b 100644 ---- a/pixman/pixman-bits-image.c -+++ b/pixman/pixman-bits-image.c -@@ -1051,14 +1051,14 @@ dest_write_back_narrow (pixman_iter_t *iter) - iter->y++; - } - --static const float -+static float - dither_factor_blue_noise_64 (int x, int y) - { - float m = dither_blue_noise_64x64[((y & 0x3f) << 6) | (x & 0x3f)]; - return m * (1. / 4096.f) + (1. / 8192.f); - } - --static const float -+static float - dither_factor_bayer_8 (int x, int y) - { - uint32_t m; diff --git a/recipes/pixman/all/patches/0002-meson-build.patch b/recipes/pixman/all/patches/0002-meson-build.patch deleted file mode 100644 index 6063b377301a8..0000000000000 --- a/recipes/pixman/all/patches/0002-meson-build.patch +++ /dev/null @@ -1,253 +0,0 @@ -diff --git a/meson.build b/meson.build -index fad22ee..519441b 100644 ---- a/meson.build -+++ b/meson.build -@@ -23,7 +23,7 @@ project( - ['c'], - version : '0.38.4', - license : 'MIT', -- meson_version : '>= 0.47.2', -+ meson_version : '>= 0.50.0', - default_options : ['buildtype=debugoptimized'], - ) - -@@ -36,6 +36,7 @@ add_project_arguments( - '-Wdeclaration-after-statement', - '-fno-strict-aliasing', - '-fvisibility=hidden', -+ '-Wundef', - ]), - language : ['c'] - ) -@@ -50,7 +51,7 @@ endforeach - - use_loongson_mmi = get_option('loongson-mmi') - have_loongson_mmi = false --loongson_mmi_flags = ['-march=loongson2f'] -+loongson_mmi_flags = ['-mloongson-mmi'] - if not use_loongson_mmi.disabled() - if host_machine.cpu_family() == 'mips64' and cc.compiles(''' - #ifndef __mips_loongson_vector_rev -@@ -84,9 +85,17 @@ endif - - use_mmx = get_option('mmx') - have_mmx = false --mmx_flags = ['-mmmx', '-Winline'] -+mmx_flags = [] -+ -+if cc.get_id() == 'msvc' -+ mmx_flags = ['/w14710', '/w14714', '/wd4244'] -+elif cc.get_id() == 'sun' -+ mmx_flags = ['-xarch=sse'] -+else -+ mmx_flags = ['-mmmx', '-Winline'] -+endif - if not use_mmx.disabled() -- if host_machine.cpu_family() == 'x86_64' -+ if host_machine.cpu_family() == 'x86_64' or cc.get_id() == 'msvc' - have_mmx = true - elif host_machine.cpu_family() == 'x86' and cc.compiles(''' - #include -@@ -127,14 +136,23 @@ if not use_mmx.disabled() - endif - - if have_mmx -- config.set10('USE_X86_MMX', true) -+ # Inline assembly do not work on X64 MSVC, so we use -+ # compatibility intrinsics there -+ if cc.get_id() != 'msvc' or host_machine.cpu_family() != 'x86_64' -+ config.set10('USE_X86_MMX', true) -+ endif - elif use_mmx.enabled() - error('MMX Support unavailable, but required') - endif - - use_sse2 = get_option('sse2') - have_sse2 = false --sse2_flags = ['-msse2', '-Winline'] -+sse2_flags = [] -+if cc.get_id() == 'sun' -+ sse2_flags = ['-xarch=sse2'] -+elif cc.get_id() != 'msvc' -+ sse2_flags = ['-msse2', '-Winline'] -+endif - if not use_sse2.disabled() - if host_machine.cpu_family() == 'x86' - if cc.compiles(''' -@@ -169,8 +187,13 @@ endif - - use_ssse3 = get_option('ssse3') - have_ssse3 = false --ssse3_flags =['-mssse3', '-Winline'] --if not use_ssse3.disabled() -+ssse3_flags = [] -+if cc.get_id() != 'msvc' -+ ssse3_flags = ['-mssse3', '-Winline'] -+endif -+ -+# x64 pre-2010 MSVC compilers crashes when building the ssse3 code -+if not use_ssse3.disabled() and not (cc.get_id() == 'msvc' and cc.version().version_compare('<16') and host_machine.cpu_family() == 'x86_64') - if host_machine.cpu_family().startswith('x86') - if cc.compiles(''' - #include -@@ -349,14 +372,21 @@ if get_option('gnuplot') - config.set('PIXMAN_GNUPLOT', 1) - endif - --dep_openmp = dependency('openmp', required : get_option('openmp')) --if dep_openmp.found() -- config.set10('USE_OPENMP', true) --elif meson.version().version_compare('<0.51.0') --# In versions of meson before 0.51 the openmp dependency can still --# inject arguments in the the auto case when it is not found, the --# detection does work correctly in that case however, so we just --# replace dep_openmp with null_dep to work around this. -+if cc.get_id() != 'msvc' -+ dep_openmp = dependency('openmp', required : get_option('openmp')) -+ if dep_openmp.found() -+ config.set10('USE_OPENMP', true) -+ elif meson.version().version_compare('<0.51.0') -+ # In versions of meson before 0.51 the openmp dependency can still -+ # inject arguments in the the auto case when it is not found, the -+ # detection does work correctly in that case however, so we just -+ # replace dep_openmp with null_dep to work around this. -+ dep_openmp = null_dep -+ endif -+else -+ # the MSVC implementation of openmp is not compliant enough for our -+ # uses here, so we disable it here. -+ # Please see: https://stackoverflow.com/questions/12560243/using-threadprivate-directive-in-visual-studio - dep_openmp = null_dep - endif - -@@ -364,17 +394,56 @@ dep_gtk = dependency('gtk+-2.0', version : '>= 2.16', required : get_option('gtk - dep_glib = dependency('glib-2.0', required : get_option('gtk')) - dep_pixman = dependency('pixman-1', required : get_option('gtk'), - version : '>= ' + meson.project_version()) --dep_png = dependency('libpng', required : get_option('libpng')) -+ -+dep_png = null_dep -+if not get_option('libpng').disabled() -+ dep_png = dependency('libpng', required : false) -+ -+ # We need to look for the right library to link to for libpng, -+ # when looking for libpng manually -+ foreach png_ver : [ '16', '15', '14', '13', '12', '10' ] -+ if not dep_png.found() -+ dep_png = cc.find_library('libpng@0@'.format(png_ver), has_headers : ['png.h'], required : false) -+ endif -+ endforeach -+ -+ if get_option('libpng').enabled() and not dep_png.found() -+ error('libpng support requested but libpng library not found') -+ endif -+endif -+ - if dep_png.found() - config.set('HAVE_LIBPNG', 1) - endif - dep_m = cc.find_library('m', required : false) - dep_threads = dependency('threads') --if dep_threads.found() -+ -+# MSVC-style compilers do not come with pthreads, so we must link -+# to it explicitly, currently pthreads-win32 is supported -+pthreads_found = false -+ -+if dep_threads.found() and cc.has_header('pthread.h') -+ if cc.get_argument_syntax() == 'msvc' -+ pthread_lib = null_dep -+ foreach pthread_type : ['VC3', 'VSE3', 'VCE3', 'VC2', 'VSE2', 'VCE2'] -+ if not pthread_lib.found() -+ pthread_lib = cc.find_library('pthread@0@'.format(pthread_type), required : false) -+ endif -+ endforeach -+ if pthread_lib.found() -+ pthreads_found = true -+ dep_threads = pthread_lib -+ endif -+ else -+ pthreads_found = true -+ endif -+endif -+ -+if pthreads_found - config.set('HAVE_PTHREADS', 1) - endif - --funcs = ['sigaction', 'alarm', 'mprotect', 'getpagesize', 'mmap'] -+funcs = ['sigaction', 'alarm', 'mprotect', 'getpagesize', 'mmap', 'getisax', 'gettimeofday'] - # mingw claimes to have posix_memalign, but it doesn't - if host_machine.system() != 'windows' - funcs += 'posix_memalign' -@@ -386,10 +455,6 @@ foreach f : funcs - endif - endforeach - --if cc.has_function('gettimeofday') -- config.set('HAVE_GETTIMEOFDAY', 1) --endif -- - # This is only used in one test, that defines _GNU_SOURCE - if cc.has_function('feenableexcept', - prefix : '#define _GNU_SOURCE\n#include ', -@@ -407,8 +472,12 @@ foreach h : ['sys/mman.h', 'fenv.h', 'unistd.h'] - endif - endforeach - -+# gcc on Windows only warns that __declspec(thread) isn't supported, -+# passing -Werror=attributes makes it fail. - if (host_machine.system() == 'windows' and -- cc.compiles('int __declspec(thread) foo;', name : 'TLS via __declspec(thread)')) -+ cc.compiles('int __declspec(thread) foo;', -+ args : cc.get_supported_arguments(['-Werror=attributes']), -+ name : 'TLS via __declspec(thread)')) - config.set('TLS', '__declspec(thread)') - elif cc.compiles('int __thread foo;', name : 'TLS via __thread') - config.set('TLS', '__thread') -@@ -445,6 +514,8 @@ if host_machine.endian() == 'big' - config.set('WORDS_BIGENDIAN', 1) - endif - -+config.set('SIZEOF_LONG', cc.sizeof('long')) -+ - # Required to make pixman-private.h - config.set('PACKAGE', 'foo') - -diff --git a/pixman/meson.build b/pixman/meson.build -index 6ce87e7..f48357f 100644 ---- a/pixman/meson.build -+++ b/pixman/meson.build -@@ -30,6 +30,11 @@ version_h = configure_file( - install_dir : join_paths(get_option('prefix'), get_option('includedir'), 'pixman-1') - ) - -+libpixman_extra_cargs = [] -+if cc.has_function_attribute('dllexport') -+ libpixman_extra_cargs = ['-DPIXMAN_API=__declspec(dllexport)'] -+endif -+ - pixman_simd_libs = [] - simds = [ - # the mmx library can be compiled with mmx on x86/x86_64, iwmmxt on -@@ -97,10 +102,18 @@ pixman_files = files( - 'pixman-utils.c', - ) - --libpixman = shared_library( -+# We cannot use 'link_with' or 'link_whole' because meson wont do the right -+# thing for static archives. -+_obs = [] -+foreach l : pixman_simd_libs -+ _obs += l.extract_all_objects() -+endforeach -+ -+libpixman = library( - 'pixman-1', - [pixman_files, config_h, version_h], -- link_with : [pixman_simd_libs], -+ objects : _obs, -+ c_args : libpixman_extra_cargs, - dependencies : [dep_m, dep_threads], - version : meson.project_version(), - install : true, diff --git a/recipes/pixman/all/patches/0003-meson-static-build.patch b/recipes/pixman/all/patches/0003-meson-static-build.patch deleted file mode 100644 index 6283ba2680054..0000000000000 --- a/recipes/pixman/all/patches/0003-meson-static-build.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 48d5df1f3772a08a929dcb3b2fe4d7b1853223c9 Mon Sep 17 00:00:00 2001 -From: Benjamin Gilbert -Date: Thu, 5 Jan 2023 20:29:00 -0500 -Subject: [PATCH] meson: don't dllexport when built as static library - -If a static Pixman is linked with a dynamic library, Pixman shouldn't -export its own symbols into the latter's ABI. ---- - pixman/meson.build | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/pixman/meson.build b/pixman/meson.build -index 5dce870..62ec66b 100644 ---- a/pixman/meson.build -+++ b/pixman/meson.build -@@ -31,7 +31,8 @@ version_h = configure_file( - ) - - libpixman_extra_cargs = [] --if cc.has_function_attribute('dllexport') -+default_library = get_option('default_library') -+if default_library != 'static' and cc.has_function_attribute('dllexport') - libpixman_extra_cargs = ['-DPIXMAN_API=__declspec(dllexport)'] - endif - --- -GitLab - diff --git a/recipes/pixman/config.yml b/recipes/pixman/config.yml index 1daaad4889538..c3e710db89855 100644 --- a/recipes/pixman/config.yml +++ b/recipes/pixman/config.yml @@ -1,9 +1,7 @@ versions: + "0.43.4": + folder: "all" "0.43.0": folder: "all" "0.42.2": folder: "all" - "0.40.0": - folder: "all" - "0.38.4": - folder: "all" From 8cf6adca2539b2d8d8045b8442db1fc6c301d7dc Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 2 Apr 2024 01:28:53 +0300 Subject: [PATCH 384/405] (#23254) exiv2: add v0.28.2, bump deps, drop vulnerable v0.28.0 * exiv2: add v0.28.2, bump deps, drop vulnerable v0.28.0 Based on https://repology.org/project/exiv2/information * exiv2: revert expat bump --- recipes/exiv2/all/conandata.yml | 6 +++--- recipes/exiv2/all/conanfile.py | 2 +- recipes/exiv2/config.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/recipes/exiv2/all/conandata.yml b/recipes/exiv2/all/conandata.yml index 55858f820d83f..0b36cf903900d 100644 --- a/recipes/exiv2/all/conandata.yml +++ b/recipes/exiv2/all/conandata.yml @@ -1,10 +1,10 @@ sources: + "0.28.2": + url: "https://github.com/Exiv2/exiv2/archive/refs/tags/v0.28.2.tar.gz" + sha256: "543bead934135f20f438e0b6d8858c55c5fcb7ff80f5d1d55489965f1aad58b9" "0.28.1": url: "https://github.com/Exiv2/exiv2/archive/refs/tags/v0.28.1.tar.gz" sha256: "3078651f995cb6313b1041f07f4dd1bf0e9e4d394d6e2adc6e92ad0b621291fa" - "0.28.0": - url: "https://github.com/Exiv2/exiv2/releases/download/v0.28.0/exiv2-0.28.0-Source.tar.gz" - sha256: "89af3b5ef7277753ef7a7b5374ae017c6b9e304db3b688f1948e73e103491f3d" "0.27.5": url: "https://github.com/Exiv2/exiv2/releases/download/v0.27.5/exiv2-0.27.5-Source.tar.gz" sha256: "35a58618ab236a901ca4928b0ad8b31007ebdc0386d904409d825024e45ea6e2" diff --git a/recipes/exiv2/all/conanfile.py b/recipes/exiv2/all/conanfile.py index 84f13196b12f9..e0f3dda5c9ab6 100644 --- a/recipes/exiv2/all/conanfile.py +++ b/recipes/exiv2/all/conanfile.py @@ -82,7 +82,7 @@ def requirements(self): if self.options.get_safe("with_brotli"): self.requires("brotli/1.1.0") if self.options.get_safe("with_inih"): - self.requires("inih/57") + self.requires("inih/58") def validate(self): if Version(self.version) >= "0.28.0": diff --git a/recipes/exiv2/config.yml b/recipes/exiv2/config.yml index d503f95292a28..f9244e625c48f 100644 --- a/recipes/exiv2/config.yml +++ b/recipes/exiv2/config.yml @@ -1,7 +1,7 @@ versions: - "0.28.1": + "0.28.2": folder: all - "0.28.0": + "0.28.1": folder: all "0.27.5": folder: all From eb6e1da4cc193f49fa0ce85be51d8cd88aa8c8bc Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 2 Apr 2024 08:08:32 +0900 Subject: [PATCH 385/405] (#23262) rapidcsv: add version 8.82 --- recipes/rapidcsv/all/conandata.yml | 3 +++ recipes/rapidcsv/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/rapidcsv/all/conandata.yml b/recipes/rapidcsv/all/conandata.yml index 22f73545deb36..350384694edeb 100644 --- a/recipes/rapidcsv/all/conandata.yml +++ b/recipes/rapidcsv/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "8.82": + url: "https://github.com/d99kris/rapidcsv/archive/refs/tags/v8.82.tar.gz" + sha256: "4f1f57ca9db0f5447416acbef4e059cbd7cb03f6eb39fec1301732bbedaac927" "8.80": url: "https://github.com/d99kris/rapidcsv/archive/refs/tags/v8.80.tar.gz" sha256: "4c9e01cb2554cc76acac61532ef33b59e5b1f822160d2eb7efee2c128ea7f4c5" diff --git a/recipes/rapidcsv/config.yml b/recipes/rapidcsv/config.yml index 643c892898926..a48e9cfb7dba1 100644 --- a/recipes/rapidcsv/config.yml +++ b/recipes/rapidcsv/config.yml @@ -1,4 +1,6 @@ versions: + "8.82": + folder: "all" "8.80": folder: "all" "8.77": From cad1c20ff725c48795ecce91b5d38cfc121f67a4 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 2 Apr 2024 02:48:59 +0300 Subject: [PATCH 386/405] (#23265) toon: new recipe * toon: new recipe * toon: set openblas:build_lapack=True * toon: require pkgconf for test_package --- recipes/toon/all/conandata.yml | 10 ++ recipes/toon/all/conanfile.py | 83 ++++++++++++ recipes/toon/all/config.hh | 29 ++++ .../all/patches/001-bugfixes-backport.patch | 127 ++++++++++++++++++ recipes/toon/all/test_package/CMakeLists.txt | 9 ++ recipes/toon/all/test_package/conanfile.py | 30 +++++ .../toon/all/test_package/test_package.cpp | 15 +++ recipes/toon/config.yml | 3 + 8 files changed, 306 insertions(+) create mode 100644 recipes/toon/all/conandata.yml create mode 100644 recipes/toon/all/conanfile.py create mode 100644 recipes/toon/all/config.hh create mode 100644 recipes/toon/all/patches/001-bugfixes-backport.patch create mode 100644 recipes/toon/all/test_package/CMakeLists.txt create mode 100644 recipes/toon/all/test_package/conanfile.py create mode 100644 recipes/toon/all/test_package/test_package.cpp create mode 100644 recipes/toon/config.yml diff --git a/recipes/toon/all/conandata.yml b/recipes/toon/all/conandata.yml new file mode 100644 index 0000000000000..2e5eef4c5773f --- /dev/null +++ b/recipes/toon/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "3.2": + url: "https://github.com/edrosten/TooN/archive/refs/tags/TOON_3.2.tar.gz" + sha256: "62f30dfb92a6f8873e6a42649760e2d1b54e61e1d3bc023d0bb171600b41c759" +patches: + "3.2": + - patch_file: "patches/001-bugfixes-backport.patch" + patch_description: "apply unreleased minor fixes" + patch_type: "backport" + patch_source: "https://github.com/edrosten/TooN/compare/TOON_3.2...370dcd9" diff --git a/recipes/toon/all/conanfile.py b/recipes/toon/all/conanfile.py new file mode 100644 index 0000000000000..49e7347dc80b4 --- /dev/null +++ b/recipes/toon/all/conanfile.py @@ -0,0 +1,83 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + + +class ToonConan(ConanFile): + name = "toon" + description = "TooN - Tom's Object Oriented Numerics library" + license = "BSD-2-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://codedocs.xyz/edrosten/TooN/" + topics = ("numerical", "linear-algebra", "matrix", "vector", "optimization", "automatic-differentiation", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + exports_sources = ["config.hh"] + + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "6", + "clang": "5", + "apple-clang": "10", + "msvc": "191", + "Visual Studio": "15", + } + + def export_sources(self): + export_conandata_patches(self) + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("openblas/0.3.26", options={"build_lapack": True}) + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + 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 not self.dependencies["openblas"].options.build_lapack: + raise ConanInvalidConfiguration("TooN requires LAPACK support in OpenBLAS") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + apply_conandata_patches(self) + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*", + os.path.join(self.source_folder, "TooN"), + os.path.join(self.package_folder, "include", "TooN")) + copy(self, "config.hh", self.export_sources_folder, + os.path.join(self.package_folder, "include", "TooN", "internal")) + + def package_info(self): + self.cpp_info.set_property("pkg_config_name", "TooN") + + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["m", "pthread"]) diff --git a/recipes/toon/all/config.hh b/recipes/toon/all/config.hh new file mode 100644 index 0000000000000..ed689361e6c58 --- /dev/null +++ b/recipes/toon/all/config.hh @@ -0,0 +1,29 @@ +/* TooN/internal/config.hh. Generated from config.hh.in by configure. */ +/* TooN/internal/config.hh.in. Generated from configure.ac by autoheader. */ + +/* define if the compiler supports basic C++14 syntax */ +#undef HAVE_CXX14 + +/* Define to 1 if you have the `lapack' library (-llapack). */ +#define HAVE_LIBLAPACK 1 + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://github.com/edrosten/TooN" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "TooN" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "TooN version-3.2" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "toon" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "https://codedocs.xyz/edrosten/TooN/" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "version-3.2" + +/* Use LAPACK */ +#define TOON_USE_LAPACK diff --git a/recipes/toon/all/patches/001-bugfixes-backport.patch b/recipes/toon/all/patches/001-bugfixes-backport.patch new file mode 100644 index 0000000000000..634a27c8578c0 --- /dev/null +++ b/recipes/toon/all/patches/001-bugfixes-backport.patch @@ -0,0 +1,127 @@ +diff --git a/TooN/QR.h b/TooN/QR.h +index e2273cc..10b33c3 100644 +--- a/TooN/QR.h ++++ b/TooN/QR.h +@@ -29,6 +29,7 @@ + #ifndef TOON_INC_QR_H + #define TOON_INC_QR_H + #include ++#include + #include + + namespace TooN +diff --git a/TooN/QR_Lapack.h b/TooN/QR_Lapack.h +index 6b628d1..67f1fd0 100644 +--- a/TooN/QR_Lapack.h ++++ b/TooN/QR_Lapack.h +@@ -29,6 +29,7 @@ + + #include + #include ++#include + #include + + namespace TooN{ +diff --git a/TooN/SVD.h b/TooN/SVD.h +index a74deed..e22a437 100644 +--- a/TooN/SVD.h ++++ b/TooN/SVD.h +@@ -30,6 +30,7 @@ + + #include + #include ++#include + + namespace TooN { + +diff --git a/TooN/SymEigen.h b/TooN/SymEigen.h +index aa5b434..8c6d42f 100644 +--- a/TooN/SymEigen.h ++++ b/TooN/SymEigen.h +@@ -28,6 +28,7 @@ + #ifndef __SYMEIGEN_H + #define __SYMEIGEN_H + ++#include + #include + #include + #include +diff --git a/TooN/functions/derivatives.h b/TooN/functions/derivatives.h +index 791f71e..9749461 100644 +--- a/TooN/functions/derivatives.h ++++ b/TooN/functions/derivatives.h +@@ -27,6 +27,7 @@ + #define TOON_INCLUDE_DERIVATIVES_NUMERICAL_H + + #include ++#include + #include + #include + +diff --git a/TooN/helpers.h b/TooN/helpers.h +index 8204560..447bca3 100644 +--- a/TooN/helpers.h ++++ b/TooN/helpers.h +@@ -32,6 +32,7 @@ + + #include + #include ++#include + #include + #include + #include +diff --git a/TooN/optimization/brent.h b/TooN/optimization/brent.h +index e117a80..3e60251 100644 +--- a/TooN/optimization/brent.h ++++ b/TooN/optimization/brent.h +@@ -27,6 +27,7 @@ + #define TOON_BRENT_H + #include + #include ++#include + #include + #include + #include +diff --git a/doc/documentation.h b/doc/documentation.h +index 2df5d9e..95276b1 100644 +--- a/doc/documentation.h ++++ b/doc/documentation.h +@@ -1,15 +1,7 @@ + /* + Copyright (c) 2005 Paul Smith, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Edward Rosten + +- Permission is granted to copy, distribute and/or modify this document under +- the terms of the GNU Free Documentation License, Version 1.2 or any later +- version published by the Free Software Foundation; with no Invariant +- Sections, no Front-Cover Texts, and no Back-Cover Texts. +- +- You should have received a copy of the GNU Free Documentation License +- License along with this library; if not, write to the Free Software +- Foundation, Inc. +- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ This library is free software, see COPYING file for details + + */ + /////////////////////////////////////////////////////// +diff --git a/doc/linoperatorsdoc.h b/doc/linoperatorsdoc.h +index b7aa503..f2ec6b1 100644 +--- a/doc/linoperatorsdoc.h ++++ b/doc/linoperatorsdoc.h +@@ -1,16 +1,7 @@ + /* + Copyright (c) 2005 Paul Smith + +- Permission is granted to copy, distribute and/or modify this document under +- the terms of the GNU Free Documentation License, Version 1.2 or any later +- version published by the Free Software Foundation; with no Invariant +- Sections, no Front-Cover Texts, and no Back-Cover Texts. +- +- You should have received a copy of the GNU Free Documentation License +- License along with this library; if not, write to the Free Software +- Foundation, Inc. +- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +- ++ This library is free software, see COPYING file for details + */ + // A proxy version of the Matrix class, + // cleaned up to present a comprehensible diff --git a/recipes/toon/all/test_package/CMakeLists.txt b/recipes/toon/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..d0e7f8aeeb811 --- /dev/null +++ b/recipes/toon/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(PkgConfig REQUIRED) +pkg_check_modules(TooN REQUIRED IMPORTED_TARGET TooN) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE PkgConfig::TooN) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/toon/all/test_package/conanfile.py b/recipes/toon/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0ded7848c2ace --- /dev/null +++ b/recipes/toon/all/test_package/conanfile.py @@ -0,0 +1,30 @@ +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 = "PkgConfigDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build_requirements(self): + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.1.0") + + 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/toon/all/test_package/test_package.cpp b/recipes/toon/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..ac702cc9b641d --- /dev/null +++ b/recipes/toon/all/test_package/test_package.cpp @@ -0,0 +1,15 @@ +#include + +#include +#include + +using namespace TooN; + +int main() { + Matrix<3> t = Data( + 1, 0.5, 0.5, + 0.5, 2, 0.7, + 0.5, 0.7, 3); + Lapack_Cholesky<3> chol(t); + std::cout << chol.determinant() << std::endl; +} diff --git a/recipes/toon/config.yml b/recipes/toon/config.yml new file mode 100644 index 0000000000000..9b5abcde381a5 --- /dev/null +++ b/recipes/toon/config.yml @@ -0,0 +1,3 @@ +versions: + "3.2": + folder: all From 3c3bd9c91e4674db37c4528a7a81aaa63329b387 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Tue, 2 Apr 2024 02:29:11 +0200 Subject: [PATCH 387/405] (#23269) [sentry-native] Add 0.7.1 and remove old versions * [sentry-native] Add version 0.7.1 * Remove 0.6.4 and 0.6.5 --- recipes/sentry-native/all/conandata.yml | 16 +++------------ recipes/sentry-native/all/conanfile.py | 6 +----- .../patches/0.6.5-0001-fix-for-gcc13.patch | 20 ------------------- recipes/sentry-native/config.yml | 6 ++---- 4 files changed, 6 insertions(+), 42 deletions(-) delete mode 100644 recipes/sentry-native/all/patches/0.6.5-0001-fix-for-gcc13.patch diff --git a/recipes/sentry-native/all/conandata.yml b/recipes/sentry-native/all/conandata.yml index 6bde257712f1a..daa3f158286e5 100644 --- a/recipes/sentry-native/all/conandata.yml +++ b/recipes/sentry-native/all/conandata.yml @@ -1,23 +1,13 @@ sources: + "0.7.1": + url: "https://github.com/getsentry/sentry-native/releases/download/0.7.1/sentry-native.zip" + sha256: "c450a064b0dbb1883a355455db2b6469abef59c04686a53719384bbc7ff507d3" "0.7.0": url: "https://github.com/getsentry/sentry-native/releases/download/0.7.0/sentry-native.zip" sha256: "4dfccc879a81771b9da1c335947ffc9e5987ca3d16b3035efa2c66a06f727543" "0.6.6": url: "https://github.com/getsentry/sentry-native/releases/download/0.6.6/sentry-native.zip" sha256: "7a98467c0b2571380a3afc5e681cb13aa406a709529be12d74610b0015ccde0c" - "0.6.5": - url: "https://github.com/getsentry/sentry-native/releases/download/0.6.5/sentry-native.zip" - sha256: "5f74a5c5c3abc6e1e7825d3306be9e3b3fd4e0f586f3cf7e86607d6f56a71995" - "0.6.4": - url: "https://github.com/getsentry/sentry-native/releases/download/0.6.4/sentry-native.zip" - sha256: "e00278bf9a4821bb4008985a5a552a84aba6ebb06d3f9e828082fcbf06b04a38" "0.5.4": url: "https://github.com/getsentry/sentry-native/releases/download/0.5.4/sentry-native.zip" sha256: "e151bdc76894eb964ba4637361b2a96b7447fb04212053cf695fd7f72b636e4d" - -patches: - "0.6.5": - - patch_file: "patches/0.6.5-0001-fix-for-gcc13.patch" - patch_type: "backport" - patch_description: "Extra header required for gcc13" - patch_source: "https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/4847514" diff --git a/recipes/sentry-native/all/conanfile.py b/recipes/sentry-native/all/conanfile.py index f783754fae680..2f31f5efdc35b 100644 --- a/recipes/sentry-native/all/conanfile.py +++ b/recipes/sentry-native/all/conanfile.py @@ -4,7 +4,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir +from conan.tools.files import copy, get, rm, rmdir from conan.tools.microsoft import is_msvc from conan.tools.scm import Version import os @@ -66,9 +66,6 @@ def _minimum_compilers_version(self): "apple-clang": "5.1", } - def export_sources(self): - export_conandata_patches(self) - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -162,7 +159,6 @@ def generate(self): CMakeDeps(self).generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/sentry-native/all/patches/0.6.5-0001-fix-for-gcc13.patch b/recipes/sentry-native/all/patches/0.6.5-0001-fix-for-gcc13.patch deleted file mode 100644 index b3a766009b3a7..0000000000000 --- a/recipes/sentry-native/all/patches/0.6.5-0001-fix-for-gcc13.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/external/crashpad/third_party/mini_chromium/mini_chromium/base/logging.h 2023-08-25 09:55:27.677142704 +0800 -+++ b/external/crashpad/third_party/mini_chromium/mini_chromium/base/logging.h 2023-08-25 10:06:01.654142494 +0800 -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - - #include "base/check.h" - #include "base/check_op.h" ---- a/external/crashpad/third_party/mini_chromium/mini_chromium/base/strings/utf_string_conversion_utils.h 2023-08-25 10:11:28.084886020 +0800 -+++ b/external/crashpad/third_party/mini_chromium/mini_chromium/base/strings/utf_string_conversion_utils.h 2023-08-25 11:06:37.044297949 +0800 -@@ -6,6 +6,7 @@ - #define MINI_CHROMIUM_BASE_STRINGS_UTF_STRING_CONVERSION_UTILS_H_ - - #include -+#include - - namespace base { - diff --git a/recipes/sentry-native/config.yml b/recipes/sentry-native/config.yml index 456ef7af835a5..9ae5623ea0bea 100644 --- a/recipes/sentry-native/config.yml +++ b/recipes/sentry-native/config.yml @@ -1,11 +1,9 @@ versions: + "0.7.1": + folder: all "0.7.0": folder: all "0.6.6": folder: all - "0.6.5": - folder: all - "0.6.4": - folder: all "0.5.4": folder: all From 89ffa7d02c5729faec90b17225bec91373713cc6 Mon Sep 17 00:00:00 2001 From: Alberto Salvia Novella Date: Tue, 2 Apr 2024 03:07:48 +0200 Subject: [PATCH 388/405] (#23281) Use (ftp.gnu.org) as fallback of (ftpmirror.gnu.org), as the second might fail due to unsafe crypto * Don't use ftpmirror.gnu.org, as it might fail With the departure towards OpenSSL some mirrors are still using old unsafe renegotiation, and that's preventing from building this recipe. I have noticed the mirror here about the issue, but from the time being it's just better to use the non mirrored FTP. autoconf/2.71: ERROR: Error downloading file https://ftpmirror.gnu.org/autoconf/autoconf-2.71.tar.xz: 'HTTPSConnectionPool(host='ftp.rediris.es', port=443): Max retries exceeded with url: /mirror/GNU/autoconf/autoconf-2.71.tar.xz (Caused by SSLError(SSLError(1, '[SSL: UNSAFE_LEGACY_RENEGOTIATION_DISABLED] unsafe legacy renegotiation disabled (_ssl.c:1006)')))' ERROR: autoconf/2.71: Error in source() method, line 51 get(self, **self.conan_data["sources"][self.version], strip_root=True) ConanException: Error downloading file https://ftpmirror.gnu.org/autoconf/autoconf-2.71.tar.xz: 'HTTPSConnectionPool(host='ftp.rediris.es', port=443): Max retries exceeded with url: /mirror/GNU/autoconf/autoconf-2.71.tar.xz (Caused by SSLError(SSLError(1, '[SSL: UNSAFE_LEGACY_RENEGOTIATION_DISABLED] unsafe legacy renegotiation disabled (_ssl.c:1006)')))' * autoconf/all/conandata.yml: fallback urls: v2.72 Co-authored-by: Martin Valgur * autoconf/all/conandata.yml: fallback urls: v2.71 Co-authored-by: Martin Valgur * autoconf: conandata.yml: Lint urls properly --------- Co-authored-by: Martin Valgur --- recipes/autoconf/all/conandata.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/recipes/autoconf/all/conandata.yml b/recipes/autoconf/all/conandata.yml index 48a99f0a3f908..9d182df49e442 100644 --- a/recipes/autoconf/all/conandata.yml +++ b/recipes/autoconf/all/conandata.yml @@ -1,9 +1,13 @@ sources: "2.72": - url: "https://ftpmirror.gnu.org/autoconf/autoconf-2.72.tar.xz" + url: + - "https://ftpmirror.gnu.org/autoconf/autoconf-2.72.tar.xz" + - "https://ftp.gnu.org/gnu/autoconf/autoconf-2.72.tar.xz" sha256: "ba885c1319578d6c94d46e9b0dceb4014caafe2490e437a0dbca3f270a223f5a" "2.71": - url: "https://ftpmirror.gnu.org/autoconf/autoconf-2.71.tar.xz" + url: + - "https://ftpmirror.gnu.org/autoconf/autoconf-2.71.tar.xz" + - "https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.xz" sha256: "f14c83cfebcc9427f2c3cea7258bd90df972d92eb26752da4ddad81c87a0faa4" patches: "2.72": From f67a46af379efa199e7de0be400f7db2e7410610 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 2 Apr 2024 10:47:47 +0900 Subject: [PATCH 389/405] (#23283) glaze: add version 2.4.0 * glaze: add version 2.3.3 * update 2.4.0 --- recipes/glaze/all/conandata.yml | 3 +++ recipes/glaze/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index a322f0ae53c98..3e64f60544255 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.4.0": + url: "https://github.com/stephenberry/glaze/archive/v2.4.0.tar.gz" + sha256: "be8cfb94c0b4b13c0a1fc846e2c112614d2dda02a49977fcdeea544876b3625b" "2.3.2": url: "https://github.com/stephenberry/glaze/archive/v2.3.2.tar.gz" sha256: "360c1eab71afb69d59cc0f0e180d6b214653950340ac267a464a18c81dac585a" diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index 17c7299a3f149..bd5802e146152 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,6 @@ versions: + "2.4.0": + folder: all "2.3.2": folder: all "2.3.1": From 012557d3865bbec75e9ddf02e7e62bd5b00af8a8 Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Tue, 2 Apr 2024 04:28:54 +0200 Subject: [PATCH 390/405] (#23289) RtMidi: Replace https URLs with http ones to prevent cerificate errors --- recipes/rtmidi/all/conandata.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/recipes/rtmidi/all/conandata.yml b/recipes/rtmidi/all/conandata.yml index 7f688e03dcce4..ad84f3a29f6e6 100644 --- a/recipes/rtmidi/all/conandata.yml +++ b/recipes/rtmidi/all/conandata.yml @@ -1,12 +1,18 @@ sources: "6.0.0": - url: "https://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-6.0.0.tar.gz" + url: + - "https://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-6.0.0.tar.gz" + - "http://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-6.0.0.tar.gz" sha256: "5960ccf64b42c23400720ccc880e2f205677ce9457f747ef758b598acd64db5b" "5.0.0": - url: "https://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-5.0.0.tar.gz" + url: + - "https://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-5.0.0.tar.gz" + - "http://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-5.0.0.tar.gz" sha256: "48db0ed58c8c0e207b5d7327a0210b5bcaeb50e26387935d02829239b0f3c2b9" "4.0.0": - url: "http://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-4.0.0.tar.gz" + url: + - "https://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-4.0.0.tar.gz" + - "http://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-4.0.0.tar.gz" sha256: "370cfe710f43fbeba8d2b8c8bc310f314338c519c2cf2865e2d2737b251526cd" patches: "4.0.0": From 2cb61c447e1082c322086d8929f9c59de3ab0383 Mon Sep 17 00:00:00 2001 From: igormironchik Date: Tue, 2 Apr 2024 06:07:54 +0300 Subject: [PATCH 391/405] (#23292) md4qt: bump version --- recipes/md4qt/all/conandata.yml | 3 +++ recipes/md4qt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index 46312df8b8947..e21deda7ceec5 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.8.1": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.8.1.tar.gz" + sha256: "02a046c1586da820be0c5dd36f635ca50060f893fe638b542546f4a7a07d3164" "2.8.0": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.8.0.tar.gz" sha256: "82ef6acc84ea3a7891e4547f7d79af4caaef0f4d6f152bdab2a5c6ed5a48d11b" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index fb12b4088b445..88cab2028c7e0 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,6 @@ versions: + "2.8.1": + folder: all "2.8.0": folder: all "2.7.4": From e18aabd4aa5bed767dc4ae8b98be28a646d9b7ad Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Tue, 2 Apr 2024 05:47:45 +0200 Subject: [PATCH 392/405] (#23297) libvips 8.15.2: fix url of tarball --- recipes/libvips/all/conandata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libvips/all/conandata.yml b/recipes/libvips/all/conandata.yml index ebae63c90e5b2..ef20d5b718d8d 100644 --- a/recipes/libvips/all/conandata.yml +++ b/recipes/libvips/all/conandata.yml @@ -1,6 +1,6 @@ sources: "8.15.2": - url: "https://github.com/libvips/libvips/releases/download/v8.15.2a/vips-8.15.2.tar.xz" + url: "https://github.com/libvips/libvips/releases/download/v8.15.2/vips-8.15.2.tar.xz" sha256: "a2ab15946776ca7721d11cae3215f20f1f097b370ff580cd44fc0f19387aee84" "8.15.1": url: "https://github.com/libvips/libvips/releases/download/v8.15.1/vips-8.15.1.tar.xz" From 1165392370ccc9276ad20a632a0725524d7aea88 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 2 Apr 2024 13:27:27 +0900 Subject: [PATCH 393/405] (#23298) cpp-peglib: add version 1.8.7 --- recipes/cpp-peglib/1.x.x/conandata.yml | 3 +++ recipes/cpp-peglib/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/cpp-peglib/1.x.x/conandata.yml b/recipes/cpp-peglib/1.x.x/conandata.yml index dc41e18c30f7b..8f4479718aedd 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.8.7": + url: "https://github.com/yhirose/cpp-peglib/archive/v1.8.7.tar.gz" + sha256: "400696cc7e721b23aeac28a1ae12ceec235e2671888993da2ce012f6acdf83d4" "1.8.6": url: "https://github.com/yhirose/cpp-peglib/archive/v1.8.6.tar.gz" sha256: "b2ebdc135a66074a386d377b761b38e050088fba6482575ca3028d0e184ecd91" diff --git a/recipes/cpp-peglib/config.yml b/recipes/cpp-peglib/config.yml index 67a22c2c821e5..1c8807299673f 100644 --- a/recipes/cpp-peglib/config.yml +++ b/recipes/cpp-peglib/config.yml @@ -1,4 +1,6 @@ versions: + "1.8.7": + folder: "1.x.x" "1.8.6": folder: "1.x.x" "1.8.5": From b6964dd08221bef4fd86b3fdbd7e162ee086b434 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 2 Apr 2024 08:07:31 +0300 Subject: [PATCH 394/405] (#23299) pybind: add v2.12.0 --- recipes/pybind11/all/conandata.yml | 17 ++++++++++------- recipes/pybind11/config.yml | 2 ++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/recipes/pybind11/all/conandata.yml b/recipes/pybind11/all/conandata.yml index 62adb5a253c62..ad2c426df1a16 100644 --- a/recipes/pybind11/all/conandata.yml +++ b/recipes/pybind11/all/conandata.yml @@ -1,25 +1,28 @@ sources: - 2.7.1: + "2.7.1": url: "https://github.com/pybind/pybind11/archive/v2.7.1.tar.gz" sha256: "616d1c42e4cf14fa27b2a4ff759d7d7b33006fdc5ad8fd603bb2c22622f27020" - 2.8.1: + "2.8.1": url: "https://github.com/pybind/pybind11/archive/v2.8.1.tar.gz" sha256: "f1bcc07caa568eb312411dde5308b1e250bd0e1bc020fae855bf9f43209940cc" - 2.9.1: + "2.9.1": url: "https://github.com/pybind/pybind11/archive/v2.9.1.tar.gz" sha256: "c6160321dc98e6e1184cc791fbeadd2907bb4a0ce0e447f2ea4ff8ab56550913" - 2.9.2: + "2.9.2": url: "https://github.com/pybind/pybind11/archive/v2.9.2.tar.gz" sha256: "6bd528c4dbe2276635dc787b6b1f2e5316cf6b49ee3e150264e455a0d68d19c1" "2.10.0": url: "https://github.com/pybind/pybind11/archive/v2.10.0.tar.gz" sha256: "eacf582fa8f696227988d08cfc46121770823839fe9e301a20fbce67e7cd70ec" - 2.10.1: + "2.10.1": url: "https://github.com/pybind/pybind11/archive/v2.10.1.tar.gz" sha256: "111014b516b625083bef701df7880f78c2243835abdb263065b6b59b960b6bad" - 2.10.4: + "2.10.4": url: "https://github.com/pybind/pybind11/archive/v2.10.4.tar.gz" sha256: "832e2f309c57da9c1e6d4542dedd34b24e4192ecb4d62f6f4866a737454c9970" - 2.11.1: + "2.11.1": url: "https://github.com/pybind/pybind11/archive/v2.11.1.tar.gz" sha256: "d475978da0cdc2d43b73f30910786759d593a9d8ee05b1b6846d1eb16c6d2e0c" + "2.12.0": + url: "https://github.com/pybind/pybind11/archive/v2.12.0.tar.gz" + sha256: "bf8f242abd1abcd375d516a7067490fb71abd79519a282d22b6e4d19282185a7" diff --git a/recipes/pybind11/config.yml b/recipes/pybind11/config.yml index 0637bb6f5067e..adf07a18a08dd 100644 --- a/recipes/pybind11/config.yml +++ b/recipes/pybind11/config.yml @@ -15,3 +15,5 @@ versions: folder: all "2.11.1": folder: all + "2.12.0": + folder: all From bc30f3f64633e35fcb3051c939ad187f1875aa6c Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 2 Apr 2024 14:48:59 +0900 Subject: [PATCH 395/405] (#23302) kuba-zip: add version 0.3.2 --- recipes/kuba-zip/all/conandata.yml | 3 +++ recipes/kuba-zip/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/kuba-zip/all/conandata.yml b/recipes/kuba-zip/all/conandata.yml index 707848aa88e1e..2c9419a46ca41 100644 --- a/recipes/kuba-zip/all/conandata.yml +++ b/recipes/kuba-zip/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.3.2": + url: "https://github.com/kuba--/zip/archive/v0.3.2.tar.gz" + sha256: "0c33740aec7a3913bca07df360420c19cac5e794e0f602f14f798cb2e6f710e5" "0.3.1": url: "https://github.com/kuba--/zip/archive/v0.3.1.tar.gz" sha256: "775b8a44b53e72a55c13839bf507219c2cf30b26f62e70f1a20bb727db54438f" diff --git a/recipes/kuba-zip/config.yml b/recipes/kuba-zip/config.yml index ab67eaba39ebb..b1201b1eaf043 100644 --- a/recipes/kuba-zip/config.yml +++ b/recipes/kuba-zip/config.yml @@ -1,4 +1,6 @@ versions: + "0.3.2": + folder: "all" "0.3.1": folder: "all" "0.3.0": From 0a5a86d32683d2a2d2f9a7fb2b213bf9cfd24d1b Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 2 Apr 2024 09:28:08 +0300 Subject: [PATCH 396/405] (#23275) imath: add v3.1.11, drop old versions --- recipes/imath/all/conandata.yml | 15 +++------------ recipes/imath/config.yml | 10 ++-------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/recipes/imath/all/conandata.yml b/recipes/imath/all/conandata.yml index 605325978acfe..3f20468a0db96 100644 --- a/recipes/imath/all/conandata.yml +++ b/recipes/imath/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.1.11": + url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.11.tar.gz" + sha256: "9057849585e49b8b85abe7cc1e76e22963b01bfdc3b6d83eac90c499cd760063" "3.1.10": url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.10.tar.gz" sha256: "f2943e86bfb694e216c60b9a169e5356f8a90f18fbd34d7b6e3450be14f60b10" @@ -8,18 +11,6 @@ sources: "3.1.8": url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.8.tar.gz" sha256: "a23a4e2160ca8ff68607a4e129e484edd1d0d13f707394d32af7aed659020803" - "3.1.7": - url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.7.tar.gz" - sha256: "bff1fa140f4af0e7f02c6cb78d41b9a7d5508e6bcdfda3a583e35460eb6d4b47" - "3.1.6": - url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.6.tar.gz" - sha256: "ea5592230f5ab917bea3ceab266cf38eb4aa4a523078d46eac0f5a89c52304db" - "3.1.5": - url: "https://github.com/AcademySoftwareFoundation/Imath/archive/refs/tags/v3.1.5.tar.gz" - sha256: "1e9c7c94797cf7b7e61908aed1f80a331088cc7d8873318f70376e4aed5f25fb" - "3.1.4": - url: "https://github.com/AcademySoftwareFoundation/Imath/archive/refs/tags/v3.1.4.tar.gz" - sha256: "fcca5fbb37d375a252bacd8a29935569bdc28b888f01ef1d9299ca0c9e87c17a" patches: "3.1.10": - patch_file: "patches/3.1.10-gcc5-backport.patch" diff --git a/recipes/imath/config.yml b/recipes/imath/config.yml index a3cca600992b6..61b9f04e8a57f 100644 --- a/recipes/imath/config.yml +++ b/recipes/imath/config.yml @@ -1,15 +1,9 @@ versions: + "3.1.11": + folder: all "3.1.10": folder: all "3.1.9": folder: all "3.1.8": folder: all - "3.1.7": - folder: all - "3.1.6": - folder: all - "3.1.5": - folder: all - "3.1.4": - folder: all From 0f00c5f129c75e6936c47df8605597b7eddcf7f3 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Tue, 2 Apr 2024 02:07:42 -0500 Subject: [PATCH 397/405] (#23301) libinput: Make wayland-protocols a build dependency This aligns with how wayland-protocols is handled in every other package. --- recipes/libinput/all/conanfile.py | 41 +++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/recipes/libinput/all/conanfile.py b/recipes/libinput/all/conanfile.py index fe4a2b2983462..93eb56ba01fa4 100644 --- a/recipes/libinput/all/conanfile.py +++ b/recipes/libinput/all/conanfile.py @@ -1,11 +1,13 @@ +import os +import textwrap + from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.env import VirtualBuildEnv -from conan.tools.files import copy, get, rmdir +from conan.tools.files import copy, get, replace_in_file, rmdir, save from conan.tools.gnu import PkgConfigDeps from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain -import os required_conan_version = ">=1.53.0" @@ -38,6 +40,10 @@ class LibinputConan(ConanFile): "with_x11": True, } + @property + def _has_build_profile(self): + return hasattr(self, "settings_build") + def configure(self): self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") @@ -58,7 +64,6 @@ def requirements(self): self.requires("gtk/system") if self.options.with_wayland: self.requires("wayland/1.22.0") - self.requires("wayland-protocols/1.33") if self.options.with_x11: self.requires("xorg/system") @@ -77,14 +82,17 @@ def build_requirements(self): self.tool_requires("meson/1.3.2") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): self.tool_requires("pkgconf/2.1.0") - if self.options.debug_gui and self.options.get_safe("with_wayland"): - self.tool_requires("wayland/") + if self.options.get_safe("with_wayland"): + if self._has_build_profile: + self.tool_requires("wayland/") + self.tool_requires("wayland-protocols/1.33") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = MesonToolchain(self) + tc.project_options["build.pkg_config_path"] = self.generators_folder tc.project_options["coverity"] = False tc.project_options["datadir"] = "res" tc.project_options["documentation"] = False @@ -96,8 +104,27 @@ def generate(self): tc.project_options["libwacom"] = self.options.with_libwacom tc.project_options["tests"] = False tc.generate() - tc = PkgConfigDeps(self) - tc.generate() + pkg_config_deps = PkgConfigDeps(self) + if self.options.get_safe("with_wayland"): + if self._has_build_profile: + pkg_config_deps.build_context_activated = ["wayland-protocols"] + else: + # Manually generate pkgconfig file of wayland-protocols since + # PkgConfigDeps.build_context_activated can't work with legacy 1 profile + # We must use legacy conan v1 deps_cpp_info because self.dependencies doesn't + # contain build requirements when using 1 profile. + wp_prefix = self.deps_cpp_info["wayland-protocols"].rootpath + wp_version = self.deps_cpp_info["wayland-protocols"].version + wp_pkg_content = textwrap.dedent(f"""\ + prefix={wp_prefix} + datarootdir=${{prefix}}/res + pkgdatadir=${{datarootdir}}/wayland-protocols + Name: Wayland Protocols + Description: Wayland protocol files + Version: {wp_version} + """) + save(self, os.path.join(self.generators_folder, "wayland-protocols.pc"), wp_pkg_content) + pkg_config_deps.generate() tc = VirtualBuildEnv(self) tc.generate() From 2d65dd4bd3a23530b458b8cf5258fcfbf66f7e0c Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 2 Apr 2024 16:48:57 +0900 Subject: [PATCH 398/405] (#23305) mbedtls: add version 3.6.0 * mbedtls: add version 3.6.0 * remove pkgconfig --- recipes/mbedtls/all/conandata.yml | 3 +++ recipes/mbedtls/all/conanfile.py | 7 +++++++ recipes/mbedtls/config.yml | 2 ++ 3 files changed, 12 insertions(+) diff --git a/recipes/mbedtls/all/conandata.yml b/recipes/mbedtls/all/conandata.yml index 4fc47c13a49df..bc6f67303c8e3 100644 --- a/recipes/mbedtls/all/conandata.yml +++ b/recipes/mbedtls/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.6.0": + url: "https://github.com/Mbed-TLS/mbedtls/releases/download/v3.6.0/mbedtls-3.6.0.tar.bz2" + sha256: "3ecf94fcfdaacafb757786a01b7538a61750ebd85c4b024f56ff8ba1490fcd38" "3.5.2": url: "https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.5.2.tar.gz" sha256: "eedecc468b3f8d052ef05a9d42bf63f04c8a1c50d1c5a94c251c681365a2c723" diff --git a/recipes/mbedtls/all/conanfile.py b/recipes/mbedtls/all/conanfile.py index 6b9782288fcdd..64391d08ba541 100644 --- a/recipes/mbedtls/all/conanfile.py +++ b/recipes/mbedtls/all/conanfile.py @@ -100,6 +100,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")) rmdir(self, os.path.join(self.package_folder, "cmake")) def package_info(self): @@ -110,16 +111,22 @@ def package_info(self): self.cpp_info.components["mbedcrypto"].libs = ["mbedcrypto"] if self.settings.os == "Windows": self.cpp_info.components["mbedcrypto"].system_libs = ["bcrypt"] + if Version(self.version) >= "3.6.0": + self.cpp_info.components["mbedcrypto"].set_property("pkg_config_name", "mbedcrypto") self.cpp_info.components["mbedx509"].set_property("cmake_target_name", "MbedTLS::mbedx509") self.cpp_info.components["mbedx509"].libs = ["mbedx509"] if self.settings.os == "Windows": self.cpp_info.components["mbedx509"].system_libs = ["ws2_32"] self.cpp_info.components["mbedx509"].requires = ["mbedcrypto"] + if Version(self.version) >= "3.6.0": + self.cpp_info.components["mbedx509"].set_property("pkg_config_name", "mbedx509") self.cpp_info.components["libembedtls"].set_property("cmake_target_name", "MbedTLS::mbedtls") self.cpp_info.components["libembedtls"].libs = ["mbedtls"] self.cpp_info.components["libembedtls"].requires = ["mbedx509"] + if Version(self.version) >= "3.6.0": + self.cpp_info.components["libembedtls"].set_property("pkg_config_name", "embedtls") if self.options.get_safe("with_zlib"): for component in self.cpp_info.components: diff --git a/recipes/mbedtls/config.yml b/recipes/mbedtls/config.yml index 0b85d9e34743c..1fa588f3972ec 100644 --- a/recipes/mbedtls/config.yml +++ b/recipes/mbedtls/config.yml @@ -1,4 +1,6 @@ versions: + "3.6.0": + folder: all "3.5.2": folder: all "3.5.1": From 5d83c48ff9f96e1256570b1e35130fceed5d8acc Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 2 Apr 2024 17:28:52 +0900 Subject: [PATCH 399/405] (#23324) commata: add version 0.2.9 --- recipes/commata/all/conandata.yml | 3 +++ recipes/commata/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/commata/all/conandata.yml b/recipes/commata/all/conandata.yml index 2f4d1cb571d15..710727e45a1b4 100644 --- a/recipes/commata/all/conandata.yml +++ b/recipes/commata/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.2.9": + url: "https://github.com/furfurylic/commata/archive/refs/tags/v0.2.9.tar.gz" + sha256: "24c404e90e2f01a2f9e46e55c2f8121a3f146d1f2dfb819b8d7ab5cf13bd6a9f" "0.2.8": url: "https://github.com/furfurylic/commata/archive/refs/tags/v0.2.8.tar.gz" sha256: "a762ec3ef1549aa5aebef78a160a40ee16d396fd976154f1f5c160837d145c8a" diff --git a/recipes/commata/config.yml b/recipes/commata/config.yml index 613aa17053d3e..142c2b3beaf0a 100644 --- a/recipes/commata/config.yml +++ b/recipes/commata/config.yml @@ -1,4 +1,6 @@ versions: + "0.2.9": + folder: all "0.2.8": folder: all "0.2.7": From a7c594e0bae066599ef5e24ddc1b3211dee82487 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Tue, 2 Apr 2024 03:38:30 -0500 Subject: [PATCH 400/405] (#23325) libressl: Add version 3.9.1 --- recipes/libressl/all/conandata.yml | 3 +++ recipes/libressl/all/conanfile.py | 1 + recipes/libressl/config.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/recipes/libressl/all/conandata.yml b/recipes/libressl/all/conandata.yml index 8d70158fca32f..c4fc1016c6f77 100644 --- a/recipes/libressl/all/conandata.yml +++ b/recipes/libressl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.9.1": + url: "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.9.1.tar.gz" + sha256: "6da0b954695f7ee62b03f64200a8a4f02af93717b60cce04ab6c8df262c07a51" "3.5.3": url: "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.5.3.tar.gz" sha256: "3ab5e5eaef69ce20c6b170ee64d785b42235f48f2e62b095fca5d7b6672b8b28" diff --git a/recipes/libressl/all/conanfile.py b/recipes/libressl/all/conanfile.py index 83b9b2abeb131..01fe7dba222cd 100644 --- a/recipes/libressl/all/conanfile.py +++ b/recipes/libressl/all/conanfile.py @@ -88,6 +88,7 @@ def package(self): cmake.install() rm(self, "*.cmake", os.path.join(self.package_folder, "include")) rmdir(self, os.path.join(self.package_folder, "include", "CMakeFiles")) + 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")) diff --git a/recipes/libressl/config.yml b/recipes/libressl/config.yml index bfca6d19b58d7..10de737dfb8f5 100644 --- a/recipes/libressl/config.yml +++ b/recipes/libressl/config.yml @@ -1,4 +1,6 @@ versions: + "3.9.1": + folder: all "3.5.3": folder: all "3.5.2": From eccce7fc3c0eed5b4747657740bcee2061485320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Tue, 2 Apr 2024 11:02:18 +0200 Subject: [PATCH 401/405] (#23329) xz_utils: Add source backups for old releases --- recipes/xz_utils/all/conandata.yml | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/recipes/xz_utils/all/conandata.yml b/recipes/xz_utils/all/conandata.yml index 09ca27188fcd2..3274a9b4cdc21 100644 --- a/recipes/xz_utils/all/conandata.yml +++ b/recipes/xz_utils/all/conandata.yml @@ -1,24 +1,38 @@ sources: "5.4.5": - url: "https://tukaani.org/xz/xz-5.4.5.tar.xz" + url: + - "https://tukaani.org/xz/xz-5.4.5.tar.xz" + - "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/da9dec6c12cf2ecf269c31ab65b5de18e8e52b96f35d5bcd08c12b43e6878803" sha256: "da9dec6c12cf2ecf269c31ab65b5de18e8e52b96f35d5bcd08c12b43e6878803" "5.4.4": - url: "https://tukaani.org/xz/xz-5.4.4.tar.gz" + url: + - "https://tukaani.org/xz/xz-5.4.4.tar.gz" + - "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/aae39544e254cfd27e942d35a048d592959bd7a79f9a624afb0498bb5613bdf8" sha256: "aae39544e254cfd27e942d35a048d592959bd7a79f9a624afb0498bb5613bdf8" "5.4.2": - url: "https://tukaani.org/xz/xz-5.4.2.tar.gz" + url: + - "https://tukaani.org/xz/xz-5.4.2.tar.gz" + - "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/87947679abcf77cc509d8d1b474218fd16b72281e2797360e909deaee1ac9d05" sha256: "87947679abcf77cc509d8d1b474218fd16b72281e2797360e909deaee1ac9d05" "5.4.0": - url: "https://tukaani.org/xz/xz-5.4.0.tar.gz" + url: + - "https://tukaani.org/xz/xz-5.4.0.tar.gz" + - "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/7471ef5991f690268a8f2be019acec2e0564b7b233ca40035f339fe9a07f830b" sha256: "7471ef5991f690268a8f2be019acec2e0564b7b233ca40035f339fe9a07f830b" "5.2.10": - url: "https://tukaani.org/xz/xz-5.2.10.tar.gz" + url: + - "https://tukaani.org/xz/xz-5.2.10.tar.gz" + - "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/eb7a3b2623c9d0135da70ca12808a214be9c019132baaa61c9e1d198d1d9ded3" sha256: "eb7a3b2623c9d0135da70ca12808a214be9c019132baaa61c9e1d198d1d9ded3" "5.2.5": - url: "https://tukaani.org/xz/xz-5.2.5.tar.gz" + url: + - "https://tukaani.org/xz/xz-5.2.5.tar.gz" + - "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10" sha256: "f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10" "5.2.4": - url: "https://tukaani.org/xz/xz-5.2.4.tar.gz" + url: + - "https://tukaani.org/xz/xz-5.2.4.tar.gz" + - "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/b512f3b726d3b37b6dc4c8570e137b9311e7552e8ccbab4d39d47ce5f4177145" sha256: "b512f3b726d3b37b6dc4c8570e137b9311e7552e8ccbab4d39d47ce5f4177145" patches: "5.2.4": From a7f698304b3f18cd6fc4f0d2120ec86edd5827cd Mon Sep 17 00:00:00 2001 From: Beartama <8091245+uyha@users.noreply.github.com> Date: Tue, 2 Apr 2024 12:47:50 +0300 Subject: [PATCH 402/405] (#23338) msgpack-cxx: add version 6.1.1 --- recipes/msgpack-cxx/all/conandata.yml | 3 +++ recipes/msgpack-cxx/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/msgpack-cxx/all/conandata.yml b/recipes/msgpack-cxx/all/conandata.yml index 6af577efebddf..7f56a30465e39 100644 --- a/recipes/msgpack-cxx/all/conandata.yml +++ b/recipes/msgpack-cxx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "6.1.1": + url: "https://github.com/msgpack/msgpack-c/releases/download/cpp-6.1.1/msgpack-cxx-6.1.1.tar.gz" + sha256: "5fd555742e37bbd58d166199e669f01f743c7b3c6177191dd7b31fb0c37fa191" "6.1.0": url: "https://github.com/msgpack/msgpack-c/releases/download/cpp-6.1.0/msgpack-cxx-6.1.0.tar.gz" sha256: "23ede7e93c8efee343ad8c6514c28f3708207e5106af3b3e4969b3a9ed7039e7" diff --git a/recipes/msgpack-cxx/config.yml b/recipes/msgpack-cxx/config.yml index 934a0432a27c7..ed41d0a75c634 100644 --- a/recipes/msgpack-cxx/config.yml +++ b/recipes/msgpack-cxx/config.yml @@ -1,4 +1,6 @@ versions: + "6.1.1": + folder: all "6.1.0": folder: all "6.0.0": From 883746559099a801bcb672290d703f5e3be0f191 Mon Sep 17 00:00:00 2001 From: Klaus Holst Jacobsen <48069914+klausholstjacobsen@users.noreply.github.com> Date: Tue, 2 Apr 2024 14:24:36 +0200 Subject: [PATCH 403/405] (#19031) openssh/9.1p1: Added openssh recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * openssh: Added openssh recipe * Update zlib dependency range Co-authored-by: Rubén Rincón Blanco * Empty commit for pipeline re-run * openssh: Disbaled zlib version check during configure * Simplify conditional patching & test package * Update recipes/openssh/all/conanfile.py Co-authored-by: Jordan Williams * Update recipes/openssh/all/conanfile.py Co-authored-by: Jordan Williams * Update recipes/openssh/all/conanfile.py Co-authored-by: Jordan Williams * openssh: Updated recipe according to PR discusion and suggestions * openssh:: Fixed imports and indentation * openssh: Fixed configure args * openssh: removed support for old version 8.1p1 * Update recipes/openssh/all/conanfile.py Co-authored-by: Jordan Williams * openssh: Added support for libressl * Update recipes/openssh/all/conanfile.py Co-authored-by: Rubén Rincón Blanco * Update recipes/openssh/all/conanfile.py Co-authored-by: Martin Valgur * Update recipes/openssh/all/conanfile.py Co-authored-by: Martin Valgur * openssh: Updated with_pam default value * Limited use of virtualrunenv in build scope. Applied suggestions * Solved implicit function declarations errors --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: Rubén Rincón Co-authored-by: Jordan Williams Co-authored-by: Martin Valgur Co-authored-by: Francisco Ramirez de Anton --- recipes/openssh/all/conandata.yml | 7 + recipes/openssh/all/conanfile.py | 132 ++++++++++++++++++ recipes/openssh/all/test_package/conanfile.py | 18 +++ recipes/openssh/config.yml | 5 + 4 files changed, 162 insertions(+) create mode 100644 recipes/openssh/all/conandata.yml create mode 100644 recipes/openssh/all/conanfile.py create mode 100644 recipes/openssh/all/test_package/conanfile.py create mode 100644 recipes/openssh/config.yml diff --git a/recipes/openssh/all/conandata.yml b/recipes/openssh/all/conandata.yml new file mode 100644 index 0000000000000..e3ccaa5b6d5e6 --- /dev/null +++ b/recipes/openssh/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "9.6p1": + url: "https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.6p1.tar.gz" + sha256: "910211c07255a8c5ad654391b40ee59800710dd8119dd5362de09385aa7a777c" + "9.1p1": + url: "https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.1p1.tar.gz" + sha256: "19f85009c7e3e23787f0236fbb1578392ab4d4bf9f8ec5fe6bc1cd7e8bfdd288" diff --git a/recipes/openssh/all/conanfile.py b/recipes/openssh/all/conanfile.py new file mode 100644 index 0000000000000..19003f0d0b8c0 --- /dev/null +++ b/recipes/openssh/all/conanfile.py @@ -0,0 +1,132 @@ +from os.path import join + +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, rmdir, export_conandata_patches +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.54.0" + + +class PackageConan(ConanFile): + name = "openssh" + description = "The OpenSSH (portable) suite of secure connectivity tools" + license = "SSH-OpenSSH" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.openssh.com/portable.html" + topics = ("security", "cryptography", "login", "keychain", "file-sharing", "ssh") + package_type = "application" + settings = "os", "arch", "compiler", "build_type" + options = { + "with_libcrypto": [False, "libressl", "openssl"], + "with_pam": [False, "openpam"], # linux-pam and Solaris PAM are also supported + "with_selinux": [True, False], + "with_libedit": [True, False], + "with_sandbox": [False, "auto", "capsicum", "darwin", "rlimit", "seccomp_filter", "systrace", "pledge"] + } + default_options = { + "with_libcrypto": "openssl", + "with_pam": False, + "with_selinux": False, + "with_libedit": False, + "with_sandbox": "auto" + } + + def package_id(self): + del self.info.settings.compiler + del self.info.settings.build_type + + def export_sources(self): + export_conandata_patches(self) + + def configure(self): + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("zlib/[>=1.2.11 <2]") + if self.options.with_libcrypto == "openssl": + self.requires("openssl/[>=1.1 <=3.1]") + elif self.options.with_libcrypto == "libressl": + self.requires("libressl/3.9.1") + if self.options.with_pam == "openpam": + self.requires("openpam/20190224") + if self.options.with_libedit: + self.requires("editline/3.1") + + def validate(self): + if self.settings.os in ["baremetal", "Windows"]: + raise ConanInvalidConfiguration(f"{self.ref} is not supported on {self.settings.os}.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + + ad = AutotoolsDeps(self) + ad.generate() + + tc = AutotoolsToolchain(self) + tc.configure_args.append("--without-zlib-version-check") + + if self.options.with_selinux: + tc.configure_args.append("--with-selinux") + + if self.options.with_pam: + tc.configure_args.append("--with-pam") + + if self.options.with_libedit: + editline = self.dependencies["editline"] + tc.configure_args.append("--with-libedit={}".format(editline.package_folder)) + + if self.options.with_libcrypto == "openssl": + openssl = self.dependencies["openssl"] + tc.configure_args.append("--with-ssl-dir={}".format(openssl.package_folder)) + # It needs libcrypto.so in build time context + if openssl.options.shared: + env = VirtualRunEnv(self) + env.generate(scope="build") + elif self.options.with_libcrypto == "libressl": + libressl = self.dependencies["libressl"] + tc.configure_args.append("--with-ssl-dir={}".format(libressl.package_folder)) + else: + tc.configure_args.append("--without-openssl") + + if self.options.with_sandbox != 'auto': + tc.configure_args.append("--with-sandbox={}".format(self.options.with_sandbox or "no")) + + tc.generate() + + def build(self): + autotools = Autotools(self) + autotools.configure() + autotools.make() + + def package(self): + autotools = Autotools(self) + + install_target = 'install-nokeys' if cross_building(self) else 'install' + autotools.install(target=install_target) + + copy(self, "LICENCE", src=self.source_folder, dst=join(self.package_folder, "licenses"), ignore_case=True) + copy(self, "*", src=join(self.package_folder, "libexec"), dst=join(self.package_folder, "bin"), ignore_case=True) + + rmdir(self, join(self.package_folder, "etc")) + rmdir(self, join(self.package_folder, "var")) + rmdir(self, join(self.package_folder, "share")) + rmdir(self, join(self.package_folder, "libexec")) + + def package_info(self): + self.cpp_info.includedirs = [] + self.cpp_info.libdirs = [] + + bindir = join(self.package_folder, "bin") + self.runenv_info.prepend_path("PATH", bindir) diff --git a/recipes/openssh/all/test_package/conanfile.py b/recipes/openssh/all/test_package/conanfile.py new file mode 100644 index 0000000000000..6198df68dc282 --- /dev/null +++ b/recipes/openssh/all/test_package/conanfile.py @@ -0,0 +1,18 @@ +from conan import ConanFile +from conan.tools.build import can_run + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + pass + + def test(self): + if can_run(self): + self.run("ssh -Q help", env="conanrun") diff --git a/recipes/openssh/config.yml b/recipes/openssh/config.yml new file mode 100644 index 0000000000000..a033c3a0343f3 --- /dev/null +++ b/recipes/openssh/config.yml @@ -0,0 +1,5 @@ +versions: + "9.6p1": + folder: all + "9.1p1": + folder: all From 9bdddb3b1504cfe627c7ed7e94ab3d3441961c41 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 2 Apr 2024 15:07:53 +0200 Subject: [PATCH 404/405] (#23282) giflib: add version 5.2.2 * giflib: add version 5.2.2 * remove export patch & use CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS * Use strtok_s instead of strtok_r with MSVC * split patch * Use patch for symbol export there's a data export that can't be exported using CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS --- recipes/giflib/5.2.x/conandata.yml | 14 + .../5.2.x/patches/0000-msvc-strtok_r.patch | 15 ++ .../5.2.x/patches/0001-msvc-unistd.patch | 245 ------------------ .../patches/5.2.1-0002-msvc-export.patch | 230 ++++++++++++++++ .../patches/5.2.2-0001-msvc-export.patch | 220 ++++++++++++++++ recipes/giflib/config.yml | 2 + 6 files changed, 481 insertions(+), 245 deletions(-) create mode 100644 recipes/giflib/5.2.x/patches/0000-msvc-strtok_r.patch create mode 100644 recipes/giflib/5.2.x/patches/5.2.1-0002-msvc-export.patch create mode 100644 recipes/giflib/5.2.x/patches/5.2.2-0001-msvc-export.patch diff --git a/recipes/giflib/5.2.x/conandata.yml b/recipes/giflib/5.2.x/conandata.yml index e36e2cd9d7be2..ea8a0bcf52687 100644 --- a/recipes/giflib/5.2.x/conandata.yml +++ b/recipes/giflib/5.2.x/conandata.yml @@ -1,7 +1,21 @@ sources: + "5.2.2": + url: "https://downloads.sourceforge.net/project/giflib/giflib-5.2.2.tar.gz" + sha256: "be7ffbd057cadebe2aa144542fd90c6838c6a083b5e8a9048b8ee3b66b29d5fb" "5.2.1": url: "https://downloads.sourceforge.net/project/giflib/giflib-5.2.1.tar.gz" sha256: "31da5562f44c5f15d63340a09a4fd62b48c45620cd302f77a6d9acf0077879bd" patches: + "5.2.2": + - patch_file: "patches/0000-msvc-strtok_r.patch" + patch_description: "Use strtok_s instead of strtok_r with MSVC" + patch_type: "portability" + - patch_file: "patches/5.2.2-0001-msvc-export.patch" + patch_description: "export symbols with MSVC" + patch_type: "portability" "5.2.1": + - patch_file: "patches/0000-msvc-strtok_r.patch" + patch_description: "Use strtok_s instead of strtok_r with MSVC" + patch_type: "portability" - patch_file: "patches/0001-msvc-unistd.patch" + - patch_file: "patches/5.2.1-0002-msvc-export.patch" diff --git a/recipes/giflib/5.2.x/patches/0000-msvc-strtok_r.patch b/recipes/giflib/5.2.x/patches/0000-msvc-strtok_r.patch new file mode 100644 index 0000000000000..e9b7a0f9661b8 --- /dev/null +++ b/recipes/giflib/5.2.x/patches/0000-msvc-strtok_r.patch @@ -0,0 +1,15 @@ +diff --git a/gif_font.c b/gif_font.c +index d90783c..0fd20ed 100644 +--- a/gif_font.c ++++ b/gif_font.c +@@ -11,6 +11,10 @@ SPDX-License-Identifier: MIT + + #include "gif_lib.h" + ++#ifdef _MSC_VER ++# define strtok_r strtok_s ++#endif ++ + /***************************************************************************** + Ascii 8 by 8 regular font - only first 128 characters are supported. + *****************************************************************************/ diff --git a/recipes/giflib/5.2.x/patches/0001-msvc-unistd.patch b/recipes/giflib/5.2.x/patches/0001-msvc-unistd.patch index 05112f7bfb6f7..1a777f5c69b47 100644 --- a/recipes/giflib/5.2.x/patches/0001-msvc-unistd.patch +++ b/recipes/giflib/5.2.x/patches/0001-msvc-unistd.patch @@ -1,18 +1,3 @@ -diff --git a/gif_font.c b/gif_font.c -index d90783c..0fd20ed 100644 ---- a/gif_font.c -+++ b/gif_font.c -@@ -11,6 +11,10 @@ SPDX-License-Identifier: MIT - - #include "gif_lib.h" - -+#ifdef _MSC_VER -+# define strtok_r strtok_s -+#endif -+ - /***************************************************************************** - Ascii 8 by 8 regular font - only first 128 characters are supported. - *****************************************************************************/ diff --git a/gif_hash.h b/gif_hash.h index 6a1b585..6311cd1 100644 --- a/gif_hash.h @@ -29,233 +14,3 @@ index 6a1b585..6311cd1 100644 #include #define HT_SIZE 8192 /* 12bits = 4096 or twice as big! */ -diff --git a/gif_lib.h b/gif_lib.h -index ebdbd3c..bf0d373 100644 ---- a/gif_lib.h -+++ b/gif_lib.h -@@ -13,6 +13,20 @@ SPDX-License-Identifier: MIT - extern "C" { - #endif /* __cplusplus */ - -+#ifdef _MSC_VER -+ #ifdef USE_GIF_LIB -+ #define GIF_EXPORT -+ #else /* USE_GIF_LIB */ -+ #ifdef USE_GIF_DLL -+ #define GIF_EXPORT __declspec(dllimport) -+ #else /* USE_GIF_DLL */ -+ #define GIF_EXPORT __declspec(dllexport) -+ #endif /* USE_GIF_DLL */ -+ #endif /* USE_GIF_LIB */ -+#else -+ #define GIF_EXPORT -+#endif /* _MSC_VER */ -+ - #define GIFLIB_MAJOR 5 - #define GIFLIB_MINOR 2 - #define GIFLIB_RELEASE 1 -@@ -125,13 +139,13 @@ typedef struct GraphicsControlBlock { - ******************************************************************************/ - - /* Main entry points */ --GifFileType *EGifOpenFileName(const char *GifFileName, -+GIF_EXPORT GifFileType *EGifOpenFileName(const char *GifFileName, - const bool GifTestExistence, int *Error); --GifFileType *EGifOpenFileHandle(const int GifFileHandle, int *Error); --GifFileType *EGifOpen(void *userPtr, OutputFunc writeFunc, int *Error); --int EGifSpew(GifFileType * GifFile); --const char *EGifGetGifVersion(GifFileType *GifFile); /* new in 5.x */ --int EGifCloseFile(GifFileType *GifFile, int *ErrorCode); -+GIF_EXPORT GifFileType *EGifOpenFileHandle(const int GifFileHandle, int *Error); -+GIF_EXPORT GifFileType *EGifOpen(void *userPtr, OutputFunc writeFunc, int *Error); -+GIF_EXPORT int EGifSpew(GifFileType * GifFile); -+GIF_EXPORT const char *EGifGetGifVersion(GifFileType *GifFile); /* new in 5.x */ -+GIF_EXPORT int EGifCloseFile(GifFileType *GifFile, int *ErrorCode); - - #define E_GIF_SUCCEEDED 0 - #define E_GIF_ERR_OPEN_FAILED 1 /* And EGif possible errors. */ -@@ -146,31 +160,31 @@ int EGifCloseFile(GifFileType *GifFile, int *ErrorCode); - #define E_GIF_ERR_NOT_WRITEABLE 10 - - /* These are legacy. You probably do not want to call them directly */ --int EGifPutScreenDesc(GifFileType *GifFile, -+GIF_EXPORT int EGifPutScreenDesc(GifFileType *GifFile, - const int GifWidth, const int GifHeight, - const int GifColorRes, - const int GifBackGround, - const ColorMapObject *GifColorMap); --int EGifPutImageDesc(GifFileType *GifFile, -+GIF_EXPORT int EGifPutImageDesc(GifFileType *GifFile, - const int GifLeft, const int GifTop, - const int GifWidth, const int GifHeight, - const bool GifInterlace, - const ColorMapObject *GifColorMap); --void EGifSetGifVersion(GifFileType *GifFile, const bool gif89); --int EGifPutLine(GifFileType *GifFile, GifPixelType *GifLine, -+GIF_EXPORT void EGifSetGifVersion(GifFileType *GifFile, const bool gif89); -+GIF_EXPORT int EGifPutLine(GifFileType *GifFile, GifPixelType *GifLine, - int GifLineLen); --int EGifPutPixel(GifFileType *GifFile, const GifPixelType GifPixel); --int EGifPutComment(GifFileType *GifFile, const char *GifComment); --int EGifPutExtensionLeader(GifFileType *GifFile, const int GifExtCode); --int EGifPutExtensionBlock(GifFileType *GifFile, -+GIF_EXPORT int EGifPutPixel(GifFileType *GifFile, const GifPixelType GifPixel); -+GIF_EXPORT int EGifPutComment(GifFileType *GifFile, const char *GifComment); -+GIF_EXPORT int EGifPutExtensionLeader(GifFileType *GifFile, const int GifExtCode); -+GIF_EXPORT int EGifPutExtensionBlock(GifFileType *GifFile, - const int GifExtLen, const void *GifExtension); --int EGifPutExtensionTrailer(GifFileType *GifFile); --int EGifPutExtension(GifFileType *GifFile, const int GifExtCode, -+GIF_EXPORT int EGifPutExtensionTrailer(GifFileType *GifFile); -+GIF_EXPORT int EGifPutExtension(GifFileType *GifFile, const int GifExtCode, - const int GifExtLen, - const void *GifExtension); --int EGifPutCode(GifFileType *GifFile, int GifCodeSize, -+GIF_EXPORT int EGifPutCode(GifFileType *GifFile, int GifCodeSize, - const GifByteType *GifCodeBlock); --int EGifPutCodeNext(GifFileType *GifFile, -+GIF_EXPORT int EGifPutCodeNext(GifFileType *GifFile, - const GifByteType *GifCodeBlock); - - /****************************************************************************** -@@ -178,11 +192,11 @@ int EGifPutCodeNext(GifFileType *GifFile, - ******************************************************************************/ - - /* Main entry points */ --GifFileType *DGifOpenFileName(const char *GifFileName, int *Error); --GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error); --int DGifSlurp(GifFileType * GifFile); --GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error); /* new one (TVT) */ -- int DGifCloseFile(GifFileType * GifFile, int *ErrorCode); -+GIF_EXPORT GifFileType *DGifOpenFileName(const char *GifFileName, int *Error); -+GIF_EXPORT GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error); -+GIF_EXPORT int DGifSlurp(GifFileType * GifFile); -+GIF_EXPORT GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error); /* new one (TVT) */ -+GIF_EXPORT int DGifCloseFile(GifFileType * GifFile, int *ErrorCode); - - #define D_GIF_SUCCEEDED 0 - #define D_GIF_ERR_OPEN_FAILED 101 /* And DGif possible errors. */ -@@ -200,26 +214,26 @@ GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error); /* new - #define D_GIF_ERR_EOF_TOO_SOON 113 - - /* These are legacy. You probably do not want to call them directly */ --int DGifGetScreenDesc(GifFileType *GifFile); --int DGifGetRecordType(GifFileType *GifFile, GifRecordType *GifType); --int DGifGetImageHeader(GifFileType *GifFile); --int DGifGetImageDesc(GifFileType *GifFile); --int DGifGetLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen); --int DGifGetPixel(GifFileType *GifFile, GifPixelType GifPixel); --int DGifGetExtension(GifFileType *GifFile, int *GifExtCode, -+GIF_EXPORT int DGifGetScreenDesc(GifFileType *GifFile); -+GIF_EXPORT int DGifGetRecordType(GifFileType *GifFile, GifRecordType *GifType); -+GIF_EXPORT int DGifGetImageHeader(GifFileType *GifFile); -+GIF_EXPORT int DGifGetImageDesc(GifFileType *GifFile); -+GIF_EXPORT int DGifGetLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen); -+GIF_EXPORT int DGifGetPixel(GifFileType *GifFile, GifPixelType GifPixel); -+GIF_EXPORT int DGifGetExtension(GifFileType *GifFile, int *GifExtCode, - GifByteType **GifExtension); --int DGifGetExtensionNext(GifFileType *GifFile, GifByteType **GifExtension); --int DGifGetCode(GifFileType *GifFile, int *GifCodeSize, -+GIF_EXPORT int DGifGetExtensionNext(GifFileType *GifFile, GifByteType **GifExtension); -+GIF_EXPORT int DGifGetCode(GifFileType *GifFile, int *GifCodeSize, - GifByteType **GifCodeBlock); --int DGifGetCodeNext(GifFileType *GifFile, GifByteType **GifCodeBlock); --int DGifGetLZCodes(GifFileType *GifFile, int *GifCode); --const char *DGifGetGifVersion(GifFileType *GifFile); -+GIF_EXPORT int DGifGetCodeNext(GifFileType *GifFile, GifByteType **GifCodeBlock); -+GIF_EXPORT int DGifGetLZCodes(GifFileType *GifFile, int *GifCode); -+GIF_EXPORT const char *DGifGetGifVersion(GifFileType *GifFile); - - - /****************************************************************************** - Error handling and reporting. - ******************************************************************************/ --extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */ -+GIF_EXPORT extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */ - - /***************************************************************************** - Everything below this point is new after version 1.2, supporting `slurp -@@ -230,43 +244,43 @@ extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */ - Color map handling from gif_alloc.c - ******************************************************************************/ - --extern ColorMapObject *GifMakeMapObject(int ColorCount, -+GIF_EXPORT extern ColorMapObject *GifMakeMapObject(int ColorCount, - const GifColorType *ColorMap); --extern void GifFreeMapObject(ColorMapObject *Object); --extern ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1, -+GIF_EXPORT extern void GifFreeMapObject(ColorMapObject *Object); -+GIF_EXPORT extern ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1, - const ColorMapObject *ColorIn2, - GifPixelType ColorTransIn2[]); --extern int GifBitSize(int n); -+GIF_EXPORT extern int GifBitSize(int n); - - /****************************************************************************** - Support for the in-core structures allocation (slurp mode). - ******************************************************************************/ - --extern void GifApplyTranslation(SavedImage *Image, GifPixelType Translation[]); --extern int GifAddExtensionBlock(int *ExtensionBlock_Count, -+GIF_EXPORT extern void GifApplyTranslation(SavedImage *Image, GifPixelType Translation[]); -+GIF_EXPORT extern int GifAddExtensionBlock(int *ExtensionBlock_Count, - ExtensionBlock **ExtensionBlocks, - int Function, - unsigned int Len, unsigned char ExtData[]); --extern void GifFreeExtensions(int *ExtensionBlock_Count, -+GIF_EXPORT extern void GifFreeExtensions(int *ExtensionBlock_Count, - ExtensionBlock **ExtensionBlocks); --extern SavedImage *GifMakeSavedImage(GifFileType *GifFile, -+GIF_EXPORT extern SavedImage *GifMakeSavedImage(GifFileType *GifFile, - const SavedImage *CopyFrom); --extern void GifFreeSavedImages(GifFileType *GifFile); -+GIF_EXPORT extern void GifFreeSavedImages(GifFileType *GifFile); - - /****************************************************************************** - 5.x functions for GIF89 graphics control blocks - ******************************************************************************/ - --int DGifExtensionToGCB(const size_t GifExtensionLength, -+GIF_EXPORT int DGifExtensionToGCB(const size_t GifExtensionLength, - const GifByteType *GifExtension, - GraphicsControlBlock *GCB); --size_t EGifGCBToExtension(const GraphicsControlBlock *GCB, -+GIF_EXPORT size_t EGifGCBToExtension(const GraphicsControlBlock *GCB, - GifByteType *GifExtension); - --int DGifSavedExtensionToGCB(GifFileType *GifFile, -+GIF_EXPORT int DGifSavedExtensionToGCB(GifFileType *GifFile, - int ImageIndex, - GraphicsControlBlock *GCB); --int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB, -+GIF_EXPORT int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB, - GifFileType *GifFile, - int ImageIndex); - -@@ -276,21 +290,21 @@ int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB, - - #define GIF_FONT_WIDTH 8 - #define GIF_FONT_HEIGHT 8 --extern const unsigned char GifAsciiTable8x8[][GIF_FONT_WIDTH]; -+GIF_EXPORT extern const unsigned char GifAsciiTable8x8[][GIF_FONT_WIDTH]; - --extern void GifDrawText8x8(SavedImage *Image, -+GIF_EXPORT extern void GifDrawText8x8(SavedImage *Image, - const int x, const int y, - const char *legend, const int color); - --extern void GifDrawBox(SavedImage *Image, -+GIF_EXPORT extern void GifDrawBox(SavedImage *Image, - const int x, const int y, - const int w, const int d, const int color); - --extern void GifDrawRectangle(SavedImage *Image, -+GIF_EXPORT extern void GifDrawRectangle(SavedImage *Image, - const int x, const int y, - const int w, const int d, const int color); - --extern void GifDrawBoxedText8x8(SavedImage *Image, -+GIF_EXPORT extern void GifDrawBoxedText8x8(SavedImage *Image, - const int x, const int y, - const char *legend, - const int border, const int bg, const int fg); diff --git a/recipes/giflib/5.2.x/patches/5.2.1-0002-msvc-export.patch b/recipes/giflib/5.2.x/patches/5.2.1-0002-msvc-export.patch new file mode 100644 index 0000000000000..d9383c54a5729 --- /dev/null +++ b/recipes/giflib/5.2.x/patches/5.2.1-0002-msvc-export.patch @@ -0,0 +1,230 @@ +diff --git a/gif_lib.h b/gif_lib.h +index ebdbd3c..bf0d373 100644 +--- a/gif_lib.h ++++ b/gif_lib.h +@@ -13,6 +13,20 @@ SPDX-License-Identifier: MIT + extern "C" { + #endif /* __cplusplus */ + ++#ifdef _MSC_VER ++ #ifdef USE_GIF_LIB ++ #define GIF_EXPORT ++ #else /* USE_GIF_LIB */ ++ #ifdef USE_GIF_DLL ++ #define GIF_EXPORT __declspec(dllimport) ++ #else /* USE_GIF_DLL */ ++ #define GIF_EXPORT __declspec(dllexport) ++ #endif /* USE_GIF_DLL */ ++ #endif /* USE_GIF_LIB */ ++#else ++ #define GIF_EXPORT ++#endif /* _MSC_VER */ ++ + #define GIFLIB_MAJOR 5 + #define GIFLIB_MINOR 2 + #define GIFLIB_RELEASE 1 +@@ -125,13 +139,13 @@ typedef struct GraphicsControlBlock { + ******************************************************************************/ + + /* Main entry points */ +-GifFileType *EGifOpenFileName(const char *GifFileName, ++GIF_EXPORT GifFileType *EGifOpenFileName(const char *GifFileName, + const bool GifTestExistence, int *Error); +-GifFileType *EGifOpenFileHandle(const int GifFileHandle, int *Error); +-GifFileType *EGifOpen(void *userPtr, OutputFunc writeFunc, int *Error); +-int EGifSpew(GifFileType * GifFile); +-const char *EGifGetGifVersion(GifFileType *GifFile); /* new in 5.x */ +-int EGifCloseFile(GifFileType *GifFile, int *ErrorCode); ++GIF_EXPORT GifFileType *EGifOpenFileHandle(const int GifFileHandle, int *Error); ++GIF_EXPORT GifFileType *EGifOpen(void *userPtr, OutputFunc writeFunc, int *Error); ++GIF_EXPORT int EGifSpew(GifFileType * GifFile); ++GIF_EXPORT const char *EGifGetGifVersion(GifFileType *GifFile); /* new in 5.x */ ++GIF_EXPORT int EGifCloseFile(GifFileType *GifFile, int *ErrorCode); + + #define E_GIF_SUCCEEDED 0 + #define E_GIF_ERR_OPEN_FAILED 1 /* And EGif possible errors. */ +@@ -146,31 +160,31 @@ int EGifCloseFile(GifFileType *GifFile, int *ErrorCode); + #define E_GIF_ERR_NOT_WRITEABLE 10 + + /* These are legacy. You probably do not want to call them directly */ +-int EGifPutScreenDesc(GifFileType *GifFile, ++GIF_EXPORT int EGifPutScreenDesc(GifFileType *GifFile, + const int GifWidth, const int GifHeight, + const int GifColorRes, + const int GifBackGround, + const ColorMapObject *GifColorMap); +-int EGifPutImageDesc(GifFileType *GifFile, ++GIF_EXPORT int EGifPutImageDesc(GifFileType *GifFile, + const int GifLeft, const int GifTop, + const int GifWidth, const int GifHeight, + const bool GifInterlace, + const ColorMapObject *GifColorMap); +-void EGifSetGifVersion(GifFileType *GifFile, const bool gif89); +-int EGifPutLine(GifFileType *GifFile, GifPixelType *GifLine, ++GIF_EXPORT void EGifSetGifVersion(GifFileType *GifFile, const bool gif89); ++GIF_EXPORT int EGifPutLine(GifFileType *GifFile, GifPixelType *GifLine, + int GifLineLen); +-int EGifPutPixel(GifFileType *GifFile, const GifPixelType GifPixel); +-int EGifPutComment(GifFileType *GifFile, const char *GifComment); +-int EGifPutExtensionLeader(GifFileType *GifFile, const int GifExtCode); +-int EGifPutExtensionBlock(GifFileType *GifFile, ++GIF_EXPORT int EGifPutPixel(GifFileType *GifFile, const GifPixelType GifPixel); ++GIF_EXPORT int EGifPutComment(GifFileType *GifFile, const char *GifComment); ++GIF_EXPORT int EGifPutExtensionLeader(GifFileType *GifFile, const int GifExtCode); ++GIF_EXPORT int EGifPutExtensionBlock(GifFileType *GifFile, + const int GifExtLen, const void *GifExtension); +-int EGifPutExtensionTrailer(GifFileType *GifFile); +-int EGifPutExtension(GifFileType *GifFile, const int GifExtCode, ++GIF_EXPORT int EGifPutExtensionTrailer(GifFileType *GifFile); ++GIF_EXPORT int EGifPutExtension(GifFileType *GifFile, const int GifExtCode, + const int GifExtLen, + const void *GifExtension); +-int EGifPutCode(GifFileType *GifFile, int GifCodeSize, ++GIF_EXPORT int EGifPutCode(GifFileType *GifFile, int GifCodeSize, + const GifByteType *GifCodeBlock); +-int EGifPutCodeNext(GifFileType *GifFile, ++GIF_EXPORT int EGifPutCodeNext(GifFileType *GifFile, + const GifByteType *GifCodeBlock); + + /****************************************************************************** +@@ -178,11 +192,11 @@ int EGifPutCodeNext(GifFileType *GifFile, + ******************************************************************************/ + + /* Main entry points */ +-GifFileType *DGifOpenFileName(const char *GifFileName, int *Error); +-GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error); +-int DGifSlurp(GifFileType * GifFile); +-GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error); /* new one (TVT) */ +- int DGifCloseFile(GifFileType * GifFile, int *ErrorCode); ++GIF_EXPORT GifFileType *DGifOpenFileName(const char *GifFileName, int *Error); ++GIF_EXPORT GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error); ++GIF_EXPORT int DGifSlurp(GifFileType * GifFile); ++GIF_EXPORT GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error); /* new one (TVT) */ ++GIF_EXPORT int DGifCloseFile(GifFileType * GifFile, int *ErrorCode); + + #define D_GIF_SUCCEEDED 0 + #define D_GIF_ERR_OPEN_FAILED 101 /* And DGif possible errors. */ +@@ -200,26 +214,26 @@ GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error); /* new + #define D_GIF_ERR_EOF_TOO_SOON 113 + + /* These are legacy. You probably do not want to call them directly */ +-int DGifGetScreenDesc(GifFileType *GifFile); +-int DGifGetRecordType(GifFileType *GifFile, GifRecordType *GifType); +-int DGifGetImageHeader(GifFileType *GifFile); +-int DGifGetImageDesc(GifFileType *GifFile); +-int DGifGetLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen); +-int DGifGetPixel(GifFileType *GifFile, GifPixelType GifPixel); +-int DGifGetExtension(GifFileType *GifFile, int *GifExtCode, ++GIF_EXPORT int DGifGetScreenDesc(GifFileType *GifFile); ++GIF_EXPORT int DGifGetRecordType(GifFileType *GifFile, GifRecordType *GifType); ++GIF_EXPORT int DGifGetImageHeader(GifFileType *GifFile); ++GIF_EXPORT int DGifGetImageDesc(GifFileType *GifFile); ++GIF_EXPORT int DGifGetLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen); ++GIF_EXPORT int DGifGetPixel(GifFileType *GifFile, GifPixelType GifPixel); ++GIF_EXPORT int DGifGetExtension(GifFileType *GifFile, int *GifExtCode, + GifByteType **GifExtension); +-int DGifGetExtensionNext(GifFileType *GifFile, GifByteType **GifExtension); +-int DGifGetCode(GifFileType *GifFile, int *GifCodeSize, ++GIF_EXPORT int DGifGetExtensionNext(GifFileType *GifFile, GifByteType **GifExtension); ++GIF_EXPORT int DGifGetCode(GifFileType *GifFile, int *GifCodeSize, + GifByteType **GifCodeBlock); +-int DGifGetCodeNext(GifFileType *GifFile, GifByteType **GifCodeBlock); +-int DGifGetLZCodes(GifFileType *GifFile, int *GifCode); +-const char *DGifGetGifVersion(GifFileType *GifFile); ++GIF_EXPORT int DGifGetCodeNext(GifFileType *GifFile, GifByteType **GifCodeBlock); ++GIF_EXPORT int DGifGetLZCodes(GifFileType *GifFile, int *GifCode); ++GIF_EXPORT const char *DGifGetGifVersion(GifFileType *GifFile); + + + /****************************************************************************** + Error handling and reporting. + ******************************************************************************/ +-extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */ ++GIF_EXPORT extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */ + + /***************************************************************************** + Everything below this point is new after version 1.2, supporting `slurp +@@ -230,43 +244,43 @@ extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */ + Color map handling from gif_alloc.c + ******************************************************************************/ + +-extern ColorMapObject *GifMakeMapObject(int ColorCount, ++GIF_EXPORT extern ColorMapObject *GifMakeMapObject(int ColorCount, + const GifColorType *ColorMap); +-extern void GifFreeMapObject(ColorMapObject *Object); +-extern ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1, ++GIF_EXPORT extern void GifFreeMapObject(ColorMapObject *Object); ++GIF_EXPORT extern ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1, + const ColorMapObject *ColorIn2, + GifPixelType ColorTransIn2[]); +-extern int GifBitSize(int n); ++GIF_EXPORT extern int GifBitSize(int n); + + /****************************************************************************** + Support for the in-core structures allocation (slurp mode). + ******************************************************************************/ + +-extern void GifApplyTranslation(SavedImage *Image, GifPixelType Translation[]); +-extern int GifAddExtensionBlock(int *ExtensionBlock_Count, ++GIF_EXPORT extern void GifApplyTranslation(SavedImage *Image, GifPixelType Translation[]); ++GIF_EXPORT extern int GifAddExtensionBlock(int *ExtensionBlock_Count, + ExtensionBlock **ExtensionBlocks, + int Function, + unsigned int Len, unsigned char ExtData[]); +-extern void GifFreeExtensions(int *ExtensionBlock_Count, ++GIF_EXPORT extern void GifFreeExtensions(int *ExtensionBlock_Count, + ExtensionBlock **ExtensionBlocks); +-extern SavedImage *GifMakeSavedImage(GifFileType *GifFile, ++GIF_EXPORT extern SavedImage *GifMakeSavedImage(GifFileType *GifFile, + const SavedImage *CopyFrom); +-extern void GifFreeSavedImages(GifFileType *GifFile); ++GIF_EXPORT extern void GifFreeSavedImages(GifFileType *GifFile); + + /****************************************************************************** + 5.x functions for GIF89 graphics control blocks + ******************************************************************************/ + +-int DGifExtensionToGCB(const size_t GifExtensionLength, ++GIF_EXPORT int DGifExtensionToGCB(const size_t GifExtensionLength, + const GifByteType *GifExtension, + GraphicsControlBlock *GCB); +-size_t EGifGCBToExtension(const GraphicsControlBlock *GCB, ++GIF_EXPORT size_t EGifGCBToExtension(const GraphicsControlBlock *GCB, + GifByteType *GifExtension); + +-int DGifSavedExtensionToGCB(GifFileType *GifFile, ++GIF_EXPORT int DGifSavedExtensionToGCB(GifFileType *GifFile, + int ImageIndex, + GraphicsControlBlock *GCB); +-int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB, ++GIF_EXPORT int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB, + GifFileType *GifFile, + int ImageIndex); + +@@ -276,21 +290,21 @@ int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB, + + #define GIF_FONT_WIDTH 8 + #define GIF_FONT_HEIGHT 8 +-extern const unsigned char GifAsciiTable8x8[][GIF_FONT_WIDTH]; ++GIF_EXPORT extern const unsigned char GifAsciiTable8x8[][GIF_FONT_WIDTH]; + +-extern void GifDrawText8x8(SavedImage *Image, ++GIF_EXPORT extern void GifDrawText8x8(SavedImage *Image, + const int x, const int y, + const char *legend, const int color); + +-extern void GifDrawBox(SavedImage *Image, ++GIF_EXPORT extern void GifDrawBox(SavedImage *Image, + const int x, const int y, + const int w, const int d, const int color); + +-extern void GifDrawRectangle(SavedImage *Image, ++GIF_EXPORT extern void GifDrawRectangle(SavedImage *Image, + const int x, const int y, + const int w, const int d, const int color); + +-extern void GifDrawBoxedText8x8(SavedImage *Image, ++GIF_EXPORT extern void GifDrawBoxedText8x8(SavedImage *Image, + const int x, const int y, + const char *legend, + const int border, const int bg, const int fg); diff --git a/recipes/giflib/5.2.x/patches/5.2.2-0001-msvc-export.patch b/recipes/giflib/5.2.x/patches/5.2.2-0001-msvc-export.patch new file mode 100644 index 0000000000000..bdeb9f0885c6a --- /dev/null +++ b/recipes/giflib/5.2.x/patches/5.2.2-0001-msvc-export.patch @@ -0,0 +1,220 @@ +diff --git a/gif_lib.h b/gif_lib.h +--- a/gif_lib.h ++++ b/gif_lib.h +@@ -13,6 +13,20 @@ + extern "C" { + #endif /* __cplusplus */ + ++#ifdef _MSC_VER ++ #ifdef USE_GIF_LIB ++ #define GIF_EXPORT ++ #else /* USE_GIF_LIB */ ++ #ifdef USE_GIF_DLL ++ #define GIF_EXPORT __declspec(dllimport) ++ #else /* USE_GIF_DLL */ ++ #define GIF_EXPORT __declspec(dllexport) ++ #endif /* USE_GIF_DLL */ ++ #endif /* USE_GIF_LIB */ ++#else ++ #define GIF_EXPORT ++#endif /* _MSC_VER */ ++ + #define GIFLIB_MAJOR 5 + #define GIFLIB_MINOR 2 + #define GIFLIB_RELEASE 2 +@@ -125,13 +139,13 @@ + ******************************************************************************/ + + /* Main entry points */ +-GifFileType *EGifOpenFileName(const char *GifFileName, ++GIF_EXPORT GifFileType *EGifOpenFileName(const char *GifFileName, + const bool GifTestExistence, int *Error); +-GifFileType *EGifOpenFileHandle(const int GifFileHandle, int *Error); +-GifFileType *EGifOpen(void *userPtr, OutputFunc writeFunc, int *Error); +-int EGifSpew(GifFileType *GifFile); +-const char *EGifGetGifVersion(GifFileType *GifFile); /* new in 5.x */ +-int EGifCloseFile(GifFileType *GifFile, int *ErrorCode); ++GIF_EXPORT GifFileType *EGifOpenFileHandle(const int GifFileHandle, int *Error); ++GIF_EXPORT GifFileType *EGifOpen(void *userPtr, OutputFunc writeFunc, int *Error); ++GIF_EXPORT int EGifSpew(GifFileType *GifFile); ++GIF_EXPORT const char *EGifGetGifVersion(GifFileType *GifFile); /* new in 5.x */ ++GIF_EXPORT int EGifCloseFile(GifFileType *GifFile, int *ErrorCode); + + #define E_GIF_SUCCEEDED 0 + #define E_GIF_ERR_OPEN_FAILED 1 /* And EGif possible errors. */ +@@ -146,39 +160,39 @@ + #define E_GIF_ERR_NOT_WRITEABLE 10 + + /* These are legacy. You probably do not want to call them directly */ +-int EGifPutScreenDesc(GifFileType *GifFile, const int GifWidth, ++GIF_EXPORT int EGifPutScreenDesc(GifFileType *GifFile, const int GifWidth, + const int GifHeight, const int GifColorRes, + const int GifBackGround, + const ColorMapObject *GifColorMap); +-int EGifPutImageDesc(GifFileType *GifFile, const int GifLeft, const int GifTop, ++GIF_EXPORT int EGifPutImageDesc(GifFileType *GifFile, const int GifLeft, const int GifTop, + const int GifWidth, const int GifHeight, + const bool GifInterlace, + const ColorMapObject *GifColorMap); +-void EGifSetGifVersion(GifFileType *GifFile, const bool gif89); +-int EGifPutLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen); +-int EGifPutPixel(GifFileType *GifFile, const GifPixelType GifPixel); +-int EGifPutComment(GifFileType *GifFile, const char *GifComment); +-int EGifPutExtensionLeader(GifFileType *GifFile, const int GifExtCode); +-int EGifPutExtensionBlock(GifFileType *GifFile, const int GifExtLen, ++GIF_EXPORT void EGifSetGifVersion(GifFileType *GifFile, const bool gif89); ++GIF_EXPORT int EGifPutLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen); ++GIF_EXPORT int EGifPutPixel(GifFileType *GifFile, const GifPixelType GifPixel); ++GIF_EXPORT int EGifPutComment(GifFileType *GifFile, const char *GifComment); ++GIF_EXPORT int EGifPutExtensionLeader(GifFileType *GifFile, const int GifExtCode); ++GIF_EXPORT int EGifPutExtensionBlock(GifFileType *GifFile, const int GifExtLen, + const void *GifExtension); +-int EGifPutExtensionTrailer(GifFileType *GifFile); +-int EGifPutExtension(GifFileType *GifFile, const int GifExtCode, ++GIF_EXPORT int EGifPutExtensionTrailer(GifFileType *GifFile); ++GIF_EXPORT int EGifPutExtension(GifFileType *GifFile, const int GifExtCode, + const int GifExtLen, const void *GifExtension); +-int EGifPutCode(GifFileType *GifFile, int GifCodeSize, ++GIF_EXPORT int EGifPutCode(GifFileType *GifFile, int GifCodeSize, + const GifByteType *GifCodeBlock); +-int EGifPutCodeNext(GifFileType *GifFile, const GifByteType *GifCodeBlock); ++GIF_EXPORT int EGifPutCodeNext(GifFileType *GifFile, const GifByteType *GifCodeBlock); + + /****************************************************************************** + GIF decoding routines + ******************************************************************************/ + + /* Main entry points */ +-GifFileType *DGifOpenFileName(const char *GifFileName, int *Error); +-GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error); +-int DGifSlurp(GifFileType *GifFile); +-GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, ++GIF_EXPORT GifFileType *DGifOpenFileName(const char *GifFileName, int *Error); ++GIF_EXPORT GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error); ++GIF_EXPORT int DGifSlurp(GifFileType *GifFile); ++GIF_EXPORT GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, + int *Error); /* new one (TVT) */ +-int DGifCloseFile(GifFileType *GifFile, int *ErrorCode); ++GIF_EXPORT int DGifCloseFile(GifFileType *GifFile, int *ErrorCode); + + #define D_GIF_SUCCEEDED 0 + #define D_GIF_ERR_OPEN_FAILED 101 /* And DGif possible errors. */ +@@ -196,25 +210,25 @@ + #define D_GIF_ERR_EOF_TOO_SOON 113 + + /* These are legacy. You probably do not want to call them directly */ +-int DGifGetScreenDesc(GifFileType *GifFile); +-int DGifGetRecordType(GifFileType *GifFile, GifRecordType *GifType); +-int DGifGetImageHeader(GifFileType *GifFile); +-int DGifGetImageDesc(GifFileType *GifFile); +-int DGifGetLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen); +-int DGifGetPixel(GifFileType *GifFile, GifPixelType GifPixel); +-int DGifGetExtension(GifFileType *GifFile, int *GifExtCode, ++GIF_EXPORT int DGifGetScreenDesc(GifFileType *GifFile); ++GIF_EXPORT int DGifGetRecordType(GifFileType *GifFile, GifRecordType *GifType); ++GIF_EXPORT int DGifGetImageHeader(GifFileType *GifFile); ++GIF_EXPORT int DGifGetImageDesc(GifFileType *GifFile); ++GIF_EXPORT int DGifGetLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen); ++GIF_EXPORT int DGifGetPixel(GifFileType *GifFile, GifPixelType GifPixel); ++GIF_EXPORT int DGifGetExtension(GifFileType *GifFile, int *GifExtCode, + GifByteType **GifExtension); +-int DGifGetExtensionNext(GifFileType *GifFile, GifByteType **GifExtension); +-int DGifGetCode(GifFileType *GifFile, int *GifCodeSize, ++GIF_EXPORT int DGifGetExtensionNext(GifFileType *GifFile, GifByteType **GifExtension); ++GIF_EXPORT int DGifGetCode(GifFileType *GifFile, int *GifCodeSize, + GifByteType **GifCodeBlock); +-int DGifGetCodeNext(GifFileType *GifFile, GifByteType **GifCodeBlock); +-int DGifGetLZCodes(GifFileType *GifFile, int *GifCode); +-const char *DGifGetGifVersion(GifFileType *GifFile); ++GIF_EXPORT int DGifGetCodeNext(GifFileType *GifFile, GifByteType **GifCodeBlock); ++GIF_EXPORT int DGifGetLZCodes(GifFileType *GifFile, int *GifCode); ++GIF_EXPORT const char *DGifGetGifVersion(GifFileType *GifFile); + + /****************************************************************************** + Error handling and reporting. + ******************************************************************************/ +-extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */ ++GIF_EXPORT extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */ + + /***************************************************************************** + Everything below this point is new after version 1.2, supporting `slurp +@@ -225,42 +239,42 @@ + Color map handling from gif_alloc.c + ******************************************************************************/ + +-extern ColorMapObject *GifMakeMapObject(int ColorCount, ++GIF_EXPORT extern ColorMapObject *GifMakeMapObject(int ColorCount, + const GifColorType *ColorMap); +-extern void GifFreeMapObject(ColorMapObject *Object); +-extern ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1, ++GIF_EXPORT extern void GifFreeMapObject(ColorMapObject *Object); ++GIF_EXPORT extern ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1, + const ColorMapObject *ColorIn2, + GifPixelType ColorTransIn2[]); +-extern int GifBitSize(int n); ++GIF_EXPORT extern int GifBitSize(int n); + + /****************************************************************************** + Support for the in-core structures allocation (slurp mode). + ******************************************************************************/ + +-extern void GifApplyTranslation(SavedImage *Image, ++GIF_EXPORT extern void GifApplyTranslation(SavedImage *Image, + const GifPixelType Translation[]); +-extern int GifAddExtensionBlock(int *ExtensionBlock_Count, ++GIF_EXPORT extern int GifAddExtensionBlock(int *ExtensionBlock_Count, + ExtensionBlock **ExtensionBlocks, int Function, + unsigned int Len, unsigned char ExtData[]); +-extern void GifFreeExtensions(int *ExtensionBlock_Count, ++GIF_EXPORT extern void GifFreeExtensions(int *ExtensionBlock_Count, + ExtensionBlock **ExtensionBlocks); +-extern SavedImage *GifMakeSavedImage(GifFileType *GifFile, ++GIF_EXPORT extern SavedImage *GifMakeSavedImage(GifFileType *GifFile, + const SavedImage *CopyFrom); +-extern void GifFreeSavedImages(GifFileType *GifFile); ++GIF_EXPORT extern void GifFreeSavedImages(GifFileType *GifFile); + + /****************************************************************************** + 5.x functions for GIF89 graphics control blocks + ******************************************************************************/ + +-int DGifExtensionToGCB(const size_t GifExtensionLength, ++GIF_EXPORT int DGifExtensionToGCB(const size_t GifExtensionLength, + const GifByteType *GifExtension, + GraphicsControlBlock *GCB); +-size_t EGifGCBToExtension(const GraphicsControlBlock *GCB, ++GIF_EXPORT size_t EGifGCBToExtension(const GraphicsControlBlock *GCB, + GifByteType *GifExtension); + +-int DGifSavedExtensionToGCB(GifFileType *GifFile, int ImageIndex, ++GIF_EXPORT int DGifSavedExtensionToGCB(GifFileType *GifFile, int ImageIndex, + GraphicsControlBlock *GCB); +-int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB, ++GIF_EXPORT int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB, + GifFileType *GifFile, int ImageIndex); + + /****************************************************************************** +@@ -269,18 +283,18 @@ + + #define GIF_FONT_WIDTH 8 + #define GIF_FONT_HEIGHT 8 +-extern const unsigned char GifAsciiTable8x8[][GIF_FONT_WIDTH]; ++GIF_EXPORT extern const unsigned char GifAsciiTable8x8[][GIF_FONT_WIDTH]; + +-extern void GifDrawText8x8(SavedImage *Image, const int x, const int y, ++GIF_EXPORT extern void GifDrawText8x8(SavedImage *Image, const int x, const int y, + const char *legend, const int color); + +-extern void GifDrawBox(SavedImage *Image, const int x, const int y, const int w, ++GIF_EXPORT extern void GifDrawBox(SavedImage *Image, const int x, const int y, const int w, + const int d, const int color); + +-extern void GifDrawRectangle(SavedImage *Image, const int x, const int y, ++GIF_EXPORT extern void GifDrawRectangle(SavedImage *Image, const int x, const int y, + const int w, const int d, const int color); + +-extern void GifDrawBoxedText8x8(SavedImage *Image, const int x, const int y, ++GIF_EXPORT extern void GifDrawBoxedText8x8(SavedImage *Image, const int x, const int y, + const char *legend, const int border, + const int bg, const int fg); + diff --git a/recipes/giflib/config.yml b/recipes/giflib/config.yml index 1ccf672c09135..c70c4f2d279f1 100644 --- a/recipes/giflib/config.yml +++ b/recipes/giflib/config.yml @@ -1,4 +1,6 @@ versions: + "5.2.2": + folder: "5.2.x" "5.2.1": folder: "5.2.x" "5.1.4": From 11ef9513d3efe896afbafa5decce8f17fcfb8c82 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 2 Apr 2024 22:49:25 +0900 Subject: [PATCH 405/405] (#23344) cpp-peglib: add version 1.8.8 --- recipes/cpp-peglib/1.x.x/conandata.yml | 3 +++ recipes/cpp-peglib/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/cpp-peglib/1.x.x/conandata.yml b/recipes/cpp-peglib/1.x.x/conandata.yml index 8f4479718aedd..7aa81fd5b52ff 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.8.8": + url: "https://github.com/yhirose/cpp-peglib/archive/v1.8.8.tar.gz" + sha256: "3019d8084a146562fe2fd4c71e3226ac6e3994e8cee21cab27b3cd5a86bcef34" "1.8.7": url: "https://github.com/yhirose/cpp-peglib/archive/v1.8.7.tar.gz" sha256: "400696cc7e721b23aeac28a1ae12ceec235e2671888993da2ce012f6acdf83d4" diff --git a/recipes/cpp-peglib/config.yml b/recipes/cpp-peglib/config.yml index 1c8807299673f..81349971ce40f 100644 --- a/recipes/cpp-peglib/config.yml +++ b/recipes/cpp-peglib/config.yml @@ -1,4 +1,6 @@ versions: + "1.8.8": + folder: "1.x.x" "1.8.7": folder: "1.x.x" "1.8.6":