Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

orc: add version 2.1.0 #26426

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions recipes/orc/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"2.1.0":
url: "https://archive.apache.org/dist/orc/orc-2.1.0/orc-2.1.0.tar.gz"
sha256: "69d45665bfb5699b709094ba630ae4b186b19e083c4438855fc29c77125c149c"
"2.0.3":
url: "https://archive.apache.org/dist/orc/orc-2.0.3/orc-2.0.3.tar.gz"
sha256: "082cba862b5a8a0d14c225404d0b51cd8d1b64ca81b8f1e500322ce8922cb86d"
Expand All @@ -8,3 +11,9 @@ sources:
"1.9.5":
url: "https://archive.apache.org/dist/orc/orc-1.9.5/orc-1.9.5.tar.gz"
sha256: "6900b4e8a2e4e49275f4067bd0f838ad68330204305fd3f13a5ec519e9d71547"
patches:
"2.1.0":
- patch_file: "patches/2.1.0-0001-fix-cmake.patch"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch can be removed once 2.1.1 is released.

patch_description: "fix cmake build specific to 2.1.0"
patch_type: "backport"
patch_source: "https://github.com/apache/orc/pull/2108"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes that in the patch but not in the referenced PR will be fixed in this PR: apache/orc#2121

10 changes: 7 additions & 3 deletions recipes/orc/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,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, VirtualRunEnv
from conan.tools.files import copy, get, rmdir, replace_in_file, mkdir
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, replace_in_file, mkdir
from conan.tools.scm import Version

required_conan_version = ">=2.1"
Expand Down Expand Up @@ -52,6 +52,7 @@ def _should_patch_thirdparty_toolchain(self):
return Version(self.version) < "2.0.0"

def export_sources(self):
export_conandata_patches(self)
if self._should_patch_thirdparty_toolchain:
copy(self, "ConanThirdpartyToolchain.cmake",
self.recipe_folder, os.path.join(self.export_sources_folder, "src", "cmake_modules"))
Expand Down Expand Up @@ -127,6 +128,7 @@ def _patch_sources(self):
"add_library (orc STATIC ${SOURCE_FILES})", "add_library (orc ${SOURCE_FILES})")

def build(self):
apply_conandata_patches(self)
cmake = CMake(self)
cmake.configure()
cmake.build()
Expand All @@ -139,8 +141,10 @@ def package(self):
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"))
if os.path.exists(os.path.join(self.package_folder, "lib", "orc.dll")) and \
not os.path.exists(os.path.join(self.package_folder, "bin", "orc.dll")):
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"]
Expand Down
Loading