From fe08d45a4bacdcf5c8e090956f813bc552f1a087 Mon Sep 17 00:00:00 2001 From: Gang Wu Date: Tue, 26 Nov 2024 01:04:13 +0800 Subject: [PATCH] orc: add version 2.0.3 (and other stable releases) (#25971) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Abril Rincón Blanco --- recipes/orc/all/conandata.yml | 21 ++++++--------------- recipes/orc/all/conanfile.py | 21 +++++---------------- recipes/orc/config.yml | 12 +++--------- 3 files changed, 14 insertions(+), 40 deletions(-) diff --git a/recipes/orc/all/conandata.yml b/recipes/orc/all/conandata.yml index 93dd0aef42c8e..4a8dd075c4c10 100644 --- a/recipes/orc/all/conandata.yml +++ b/recipes/orc/all/conandata.yml @@ -1,19 +1,10 @@ sources: + "2.0.3": + url: "https://archive.apache.org/dist/orc/orc-2.0.3/orc-2.0.3.tar.gz" + sha256: "082cba862b5a8a0d14c225404d0b51cd8d1b64ca81b8f1e500322ce8922cb86d" "2.0.0": url: "https://archive.apache.org/dist/orc/orc-2.0.0/orc-2.0.0.tar.gz" sha256: "9107730919c29eb39efaff1b9e36166634d1d4d9477e5fee76bfd6a8fec317df" - "1.9.3": - url: "https://archive.apache.org/dist/orc/orc-1.9.3/orc-1.9.3.tar.gz" - sha256: "f737d005d0c4deb65688ac3c0223ed530b0ba6258552555b2774dcdb77359b0f" - "1.9.2": - url: "https://archive.apache.org/dist/orc/orc-1.9.2/orc-1.9.2.tar.gz" - sha256: "7f46f2c184ecefd6791f1a53fb062286818bd8710c3f08b94dd3cac365e240ee" - "1.8.7": - url: "https://archive.apache.org/dist/orc/orc-1.8.7/orc-1.8.7.tar.gz" - sha256: "57c9d12bf74b2752b1ce1039c15035c3b6f6531d865df962a99b3e079b3dfdb7" - "1.8.6": - url: "https://archive.apache.org/dist/orc/orc-1.8.6/orc-1.8.6.tar.gz" - sha256: "5675b18118df4dd7f86cc6ba859ed75b425ea1b7ddff805e1d671a17fd57d7f7" - "1.7.10": - url: "https://archive.apache.org/dist/orc/orc-1.7.10/orc-1.7.10.tar.gz" - sha256: "85aef9368dc9bcdffaaf10010b66dfe053ce22f30b64854f63852248164686a3" + "1.9.5": + url: "https://archive.apache.org/dist/orc/orc-1.9.5/orc-1.9.5.tar.gz" + sha256: "6900b4e8a2e4e49275f4067bd0f838ad68330204305fd3f13a5ec519e9d71547" diff --git a/recipes/orc/all/conanfile.py b/recipes/orc/all/conanfile.py index f246032bfb025..8ffc69bfa533d 100644 --- a/recipes/orc/all/conanfile.py +++ b/recipes/orc/all/conanfile.py @@ -8,7 +8,7 @@ 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" +required_conan_version = ">=2.1" class OrcRecipe(ConanFile): name = "orc" @@ -47,10 +47,6 @@ def _compilers_minimum_version(self): "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" @@ -79,11 +75,10 @@ def requirements(self): 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") + self.requires("zstd/[~1.5]") 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( @@ -91,11 +86,11 @@ def validate(self): ) def build_requirements(self): - if not self._is_legacy_one_profile: - self.tool_requires("protobuf/") + self.tool_requires("protobuf/") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + self._patch_sources() def generate(self): VirtualBuildEnv(self).generate() @@ -114,11 +109,6 @@ def generate(self): 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" @@ -137,7 +127,6 @@ def _patch_sources(self): "add_library (orc STATIC ${SOURCE_FILES})", "add_library (orc ${SOURCE_FILES})") def build(self): - self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/orc/config.yml b/recipes/orc/config.yml index ad011c33e6349..692bfaffff862 100644 --- a/recipes/orc/config.yml +++ b/recipes/orc/config.yml @@ -1,13 +1,7 @@ versions: - "2.0.0": - folder: all - "1.9.3": - folder: all - "1.9.2": + "2.0.3": folder: all - "1.8.7": - folder: all - "1.8.6": + "2.0.0": folder: all - "1.7.10": + "1.9.5": folder: all