From 91777a25333d1994366029e8c4c38f367d554d46 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 5 Nov 2024 15:11:25 +0900 Subject: [PATCH 1/6] folly: add version 2024.11.04.00 --- recipes/folly/all/conandata.yml | 3 +++ recipes/folly/all/conanfile.py | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/recipes/folly/all/conandata.yml b/recipes/folly/all/conandata.yml index a21030554ee04..0b508d8472577 100644 --- a/recipes/folly/all/conandata.yml +++ b/recipes/folly/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2024.11.04.00": + url: "https://github.com/facebook/folly/releases/download/v2024.11.04.00/folly-v2024.11.04.00.tar.gz" + sha256: "55fa5f3f3399fd022a157db8d8144249e8fbe115c13d833d333a719ba2a81216" "2024.08.12.00": url: "https://github.com/facebook/folly/releases/download/v2024.08.12.00/folly-v2024.08.12.00.tar.gz" sha256: "18d7be721721db547cb9c5dd5cc50df05cd88b0a8e683e3126ec6f9ce2c41c4d" diff --git a/recipes/folly/all/conanfile.py b/recipes/folly/all/conanfile.py index 7b2eee5c31d02..ada772c233671 100755 --- a/recipes/folly/all/conanfile.py +++ b/recipes/folly/all/conanfile.py @@ -26,10 +26,12 @@ class FollyConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "with_libaio": [True, False], } default_options = { "shared": False, "fPIC": True, + "with_libaio": True, } @property @@ -53,6 +55,8 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if self.settings.os != "Linux": + del self.options.with_libaio def configure(self): if self.options.shared: @@ -88,6 +92,10 @@ def requirements(self): self.requires("liburing/2.6") # INFO: Folly does not support fmt 11 on MSVC: https://github.com/facebook/folly/issues/2250 self.requires("fmt/10.2.1", transitive_headers=True, transitive_libs=True) + if self.options.get_safe("with_libaio"): + self.requires("libaio/0.3.113") + if Version(self.version) >= "2024.11.04": + self.requires("fast_float/6.1.5") def build_requirements(self): # INFO: Required due ZIP_LISTS CMake feature in conan_deps.cmake @@ -197,6 +205,11 @@ def generate(self): deps.set_property("xz_utils", "cmake_file_name", "LibLZMA") deps.set_property("zlib", "cmake_file_name", "ZLIB") deps.set_property("zstd", "cmake_file_name", "Zstd") + if self.options.get_safe("with_libaio"): + deps.set_property("libaio", "cmake_file_name", "LibAIO") + deps.set_property("libaio", "cmake_additional_variables_prefixes", ["LIBAIO"]) + if Version(self.version) >= "2024.11.04": + deps.set_property("FastFloat", "cmake_additional_variables_prefixes", ["FASTFLOAT"]) deps.generate() def _patch_sources(self): @@ -267,6 +280,11 @@ def package_info(self): if self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version.value) >= "11.0": self.cpp_info.components["libfolly"].system_libs.append("c++abi") + if self.options.get_safe("with_libaio"): + self.cpp_info.components["libfolly"].requires.append("libaio::libaio") + if Version(self.version) >= "2024.11.04": + self.cpp_info.components["libfolly"].requires.append("fast_float::fast_float") + self.cpp_info.components["follybenchmark"].set_property("cmake_target_name", "Folly::follybenchmark") self.cpp_info.components["follybenchmark"].set_property("pkg_config_name", "libfollybenchmark") self.cpp_info.components["follybenchmark"].libs = ["follybenchmark"] From e8476ef1f10b98f1a7eb3fb4c7799e05169a4489 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 5 Nov 2024 15:14:56 +0900 Subject: [PATCH 2/6] update config.yml --- recipes/folly/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/folly/config.yml b/recipes/folly/config.yml index e799fbeee0433..cfdb9e2c88dd3 100644 --- a/recipes/folly/config.yml +++ b/recipes/folly/config.yml @@ -1,3 +1,5 @@ versions: + "2024.11.04.00": + folder: all "2024.08.12.00": folder: all From dd8527bd3e09b00787a1ebe5a3f578badea01f9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abril=20Rinc=C3=B3n=20Blanco?= Date: Wed, 6 Nov 2024 12:03:02 +0100 Subject: [PATCH 3/6] Cleanup --- recipes/folly/all/conanfile.py | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/recipes/folly/all/conanfile.py b/recipes/folly/all/conanfile.py index ada772c233671..9fa8c06e76f5b 100755 --- a/recipes/folly/all/conanfile.py +++ b/recipes/folly/all/conanfile.py @@ -10,7 +10,7 @@ import os -required_conan_version = ">=1.54.0" +required_conan_version = ">=2.1" class FollyConan(ConanFile): @@ -114,8 +114,7 @@ def _required_boost_cmake_targets(self): return [f"Boost::{comp}" for comp in self._required_boost_components] def validate(self): - if self.settings.compiler.cppstd: - check_min_cppstd(self, self._min_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.") @@ -310,26 +309,3 @@ def package_info(self): self.cpp_info.components["folly_exception_counter"].set_property("pkg_config_name", "libfolly_exception_counter") self.cpp_info.components["folly_exception_counter"].libs = ["folly_exception_counter"] self.cpp_info.components["folly_exception_counter"].requires = ["folly_exception_tracer"] - - # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed - self.cpp_info.filenames["cmake_find_package"] = "folly" - self.cpp_info.filenames["cmake_find_package_multi"] = "folly" - self.cpp_info.names["cmake_find_package"] = "Folly" - self.cpp_info.names["cmake_find_package_multi"] = "Folly" - self.cpp_info.components["libfolly"].names["cmake_find_package"] = "folly" - self.cpp_info.components["libfolly"].names["cmake_find_package_multi"] = "folly" - - # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed - self.cpp_info.components["follybenchmark"].names["cmake_find_package"] = "follybenchmark" - self.cpp_info.components["follybenchmark"].names["cmake_find_package_multi"] = "follybenchmark" - self.cpp_info.components["folly_test_util"].names["cmake_find_package"] = "folly_test_util" - self.cpp_info.components["folly_test_util"].names["cmake_find_package_multi"] = "folly_test_util" - - if self.settings.os in ["Linux", "FreeBSD"]: - # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed - self.cpp_info.components["folly_exception_tracer_base"].names["cmake_find_package"] = "folly_exception_tracer_base" - self.cpp_info.components["folly_exception_tracer_base"].names["cmake_find_package_multi"] = "folly_exception_tracer_base" - self.cpp_info.components["folly_exception_tracer"].names["cmake_find_package"] = "folly_exception_tracer" - self.cpp_info.components["folly_exception_tracer"].names["cmake_find_package_multi"] = "folly_exception_tracer" - self.cpp_info.components["folly_exception_counter"].names["cmake_find_package"] = "folly_exception_counter" - self.cpp_info.components["folly_exception_counter"].names["cmake_find_package_multi"] = "folly_exception_counter" From 3877236b5db78e0e8a296a3d54862b0ce0ca45bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abril=20Rinc=C3=B3n=20Blanco?= Date: Wed, 6 Nov 2024 12:04:31 +0100 Subject: [PATCH 4/6] extra variables --- recipes/folly/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/folly/all/conanfile.py b/recipes/folly/all/conanfile.py index 9fa8c06e76f5b..39ba08900cf48 100755 --- a/recipes/folly/all/conanfile.py +++ b/recipes/folly/all/conanfile.py @@ -10,7 +10,7 @@ import os -required_conan_version = ">=2.1" +required_conan_version = ">=2.4" class FollyConan(ConanFile): From a12cc8fe6436d1283a06e8327e9212b91e99c764 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 8 Nov 2024 23:54:53 +0900 Subject: [PATCH 5/6] fix wrong recipe name --- recipes/folly/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/folly/all/conanfile.py b/recipes/folly/all/conanfile.py index 39ba08900cf48..d4a0613aaccf5 100755 --- a/recipes/folly/all/conanfile.py +++ b/recipes/folly/all/conanfile.py @@ -208,7 +208,7 @@ def generate(self): deps.set_property("libaio", "cmake_file_name", "LibAIO") deps.set_property("libaio", "cmake_additional_variables_prefixes", ["LIBAIO"]) if Version(self.version) >= "2024.11.04": - deps.set_property("FastFloat", "cmake_additional_variables_prefixes", ["FASTFLOAT"]) + deps.set_property("fast_float", "cmake_additional_variables_prefixes", ["FASTFLOAT"]) deps.generate() def _patch_sources(self): From af2b3f06062cfc90b0e858db68605c9073fd14f6 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 13 Nov 2024 15:16:14 +0900 Subject: [PATCH 6/6] update 2024.11.11.0 --- recipes/folly/all/conandata.yml | 6 +++--- recipes/folly/config.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/folly/all/conandata.yml b/recipes/folly/all/conandata.yml index 0b508d8472577..b6b08be12fed9 100644 --- a/recipes/folly/all/conandata.yml +++ b/recipes/folly/all/conandata.yml @@ -1,7 +1,7 @@ sources: - "2024.11.04.00": - url: "https://github.com/facebook/folly/releases/download/v2024.11.04.00/folly-v2024.11.04.00.tar.gz" - sha256: "55fa5f3f3399fd022a157db8d8144249e8fbe115c13d833d333a719ba2a81216" + "2024.11.11.00": + url: "https://github.com/facebook/folly/releases/download/v2024.11.11.00/folly-v2024.11.11.00.tar.gz" + sha256: "5aa23ce1772afae0416e886804935a44b6ccf3eec04b58003b8e2bf18c266b50" "2024.08.12.00": url: "https://github.com/facebook/folly/releases/download/v2024.08.12.00/folly-v2024.08.12.00.tar.gz" sha256: "18d7be721721db547cb9c5dd5cc50df05cd88b0a8e683e3126ec6f9ce2c41c4d" diff --git a/recipes/folly/config.yml b/recipes/folly/config.yml index cfdb9e2c88dd3..4218747528671 100644 --- a/recipes/folly/config.yml +++ b/recipes/folly/config.yml @@ -1,5 +1,5 @@ versions: - "2024.11.04.00": + "2024.11.11.00": folder: all "2024.08.12.00": folder: all