Skip to content

Commit

Permalink
orc: add version 2.0.3 (and other stable releases) (#25971)
Browse files Browse the repository at this point in the history
Co-authored-by: Abril Rincón Blanco <[email protected]>
  • Loading branch information
wgtmac and AbrilRBS authored Nov 25, 2024
1 parent fc1e559 commit fe08d45
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 40 deletions.
21 changes: 6 additions & 15 deletions recipes/orc/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -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"
21 changes: 5 additions & 16 deletions recipes/orc/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -79,23 +75,22 @@ 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(
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/<host_version>")
self.tool_requires("protobuf/<host_version>")

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
self._patch_sources()

def generate(self):
VirtualBuildEnv(self).generate()
Expand All @@ -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"
Expand All @@ -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()
Expand Down
12 changes: 3 additions & 9 deletions recipes/orc/config.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit fe08d45

Please sign in to comment.