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

New package: apache orc #5988

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
Open

New package: apache orc #5988

wants to merge 9 commits into from

Conversation

Altina-oz
Copy link
Contributor

  • Before adding new features and new modules, please go to issues to submit the relevant feature description first.
  • Write good commit messages and use the same coding conventions as the rest of the project.
  • Please commit code to dev branch and we will merge into master branch in feature
  • Ensure your edited codes with four spaces instead of TAB.

  • 增加新特性和新模块之前,请先到issues提交相关特性说明,经过讨论评估确认后,再进行相应的代码提交,避免做无用工作。
  • 编写友好可读的提交信息,并使用与工程代码相同的代码规范,代码请用4个空格字符代替tab缩进。
  • 请提交代码到dev分支,如果通过,我们会在特定时间合并到master分支上。
  • 为了规范化提交日志的格式,commit消息,不要用中文,请用英文描述。


add_urls("https://github.com/apache/orc/archive/refs/tags/v$(version).tar.gz",
"https://github.com/apache/orc.git")
add_versions("2.0.3","7920c7c7644f31c5519befa18f8f949cdf53420603b621bd85d214b516e25ff3")
Copy link
Contributor

Choose a reason for hiding this comment

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

v$(version) -> $(version)
2.0.3 -> v2.0.3

add_urls("https://github.com/apache/orc/archive/refs/tags/v$(version).tar.gz",
"https://github.com/apache/orc.git")
add_versions("2.0.3","7920c7c7644f31c5519befa18f8f949cdf53420603b621bd85d214b516e25ff3")
add_configs("fPIC", {default = true, type = "boolean"})
Copy link
Contributor

Choose a reason for hiding this comment

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

builtin config (see xrepo info zlib), Please remove it.

add_versions("2.0.3","7920c7c7644f31c5519befa18f8f949cdf53420603b621bd85d214b516e25ff3")
add_configs("fPIC", {default = true, type = "boolean"})
add_configs("build_tools", {default = false, type = "boolean"})
add_configs("build_avx512", {default = true, type = "boolean"})
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Missing description
  • Rename
    • build_tools -> tools
    • build_avx512 -> avx512

add_configs("build_tools", {default = false, type = "boolean"})
add_configs("build_avx512", {default = true, type = "boolean"})

add_deps("xmake::protobuf-cpp","xmake::lz4","xmake::snappy","xmake::zlib","xmake::zstd","cmake")
Copy link
Contributor

Choose a reason for hiding this comment

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

add_deps("cmake")
add_deps("protobuf-cpp", "lz4", "snappy", "zlib", "zstd")


add_deps("xmake::protobuf-cpp","xmake::lz4","xmake::snappy","xmake::zlib","xmake::zstd","cmake")
if is_plat("macosx", "linux") then
add_syslinks("pthread", "m")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be "macosx", "linux" -> "linux", "bsd"?

if is_plat("macosx", "linux") then
add_syslinks("pthread", "m")
end
on_install("windows|!arm*","linux|!arm*","macosx|!arm*","bsd|!arm*",function (package)
Copy link
Contributor

Choose a reason for hiding this comment

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

We can use on_check to filter arch.

on_check(function (package)
    if package:is_arch("arm.*") then
        raise("package(xxx) unsupported arm arch")
    end
end)

"-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON",
"-DHAS_PRE_1970=".. (is_plat("windows") and "OFF" or "ON"),
"-DHAS_PRE_2038=".. (is_plat("windows") and "OFF" or "ON"),
"-DBUILD_POSITION_INDEPENDENT_LIB=".. (package:is_targetos("windows") and "OFF" or (package:config("fPIC") and "ON" or "OFF")),
Copy link
Contributor

Choose a reason for hiding this comment

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

table.insert(configs, "-DBUILD_POSITION_INDEPENDENT_LIB=" .. (package:config("pic") and "ON" or "OFF"))

"-DZLIB_HOME="..package:dep("zlib"):installdir(),
"-DZSTD_HOME="..package:dep("zstd"):installdir()
}
if package:dep("cmake"):version() < "1.9.0" then
Copy link
Contributor

Choose a reason for hiding this comment

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

package:dep("cmake"):version():lt("1.9.0")

end

import("package.tools.cmake").install(package, configs)
end)
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing on_test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants