-
-
Notifications
You must be signed in to change notification settings - Fork 425
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
Update capnproto to branch and with version 1.0.2 #4780
Conversation
capnproto/capnproto#1833 it seems they need an additional library? i have just added the syslinks, but cannot test it as i cannot set up a mingw right now, so i added it to the |
it seems that they broke support for arm-dos by using |
apply patch to support it or disable windows/arm |
@chriku Hi, I have to depend on the v1 capnproto as well. I figure we could proceed by banning the windows arm builds and mingw build for now? I drafted a version below: package("capnproto")
set_homepage("https://github.com/capnproto/capnproto")
set_description("Cap'n Proto serialization/RPC system - core tools and C++ library.")
set_license("MIT")
add_urls("https://github.com/capnproto/capnproto/archive/v$(version).zip")
add_urls("https://github.com/capnproto/capnproto.git")
add_versions("1.1.0", "cefc757d4ee07acb17070b0c5c90bfa106b79468670869052246712bf8781fd9")
add_versions("1.0.2", "3c9afa5dffa4d81a3cbd0581a15a5b1633feaf43093a3b108aded0f636622752")
add_versions("0.9.0", "18cf46aa4e05446a3d34bad8d56f9d0c73e72020a2b7548b6ec7cb7b1a828d5b")
add_versions("0.8.0", "9a5e090b1f3ad39bb47fed5fd03672169493674ce273418b76c868393fced2e4")
add_versions("0.7.0", "1054a879e174b8f797f1b506fedb14ecba5556c656e33ac51bd0a62bd90f925f")
add_linkorders("capnpc", "capnp-json")
add_linkorders("capnpc", "capnp-rpc")
add_linkorders("capnp-json", "capnp")
add_linkorders("capnp-json", "kj-http")
add_linkorders("capnp-rpc", "capnp")
add_linkorders("capnp-rpc", "kj-http")
add_linkorders("capnp", "kj-test")
add_linkorders("capnp", "kj-http")
add_linkorders("capnp", "kj-async")
add_linkorders("kj-async", "kj")
add_linkorders("kj-test", "kj")
add_linkorders("kj-gzip", "kj-async")
add_linkorders("kj-tls", "kj-async")
add_linkorders("kj-http", "kj-async")
if is_plat("windows") then
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
end
if is_plat("windows", "mingw") then
add_syslinks("ws2_32")
end
add_deps("cmake", "zlib")
-- Add on_check to fail for version greater than 1.0.2 on Windows ARM and MingW
on_check(function (package)
if package:version() >= "1.0.2" then
if is_plat("windows") and is_arch("arm*") then
raise("package(capnproto): Unsupported version on Windows ARM. Version 0.9.0 is the latest supported version on Windows ARM.")
end
if is_plat("mingw") then
raise("package(capnproto): Unsupported version on MingW. Version 0.9.0 is the latest supported version on MingW.")
end
end
end)
on_install("windows", "mingw@windows,msys", "linux", "macosx", "bsd", function (package)
local configs = {"-DBUILD_TESTING=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
package:addenv("PATH", "bin")
end)
on_test(function (package)
assert(package:has_cxxtypes("capnp::MallocMessageBuilder", {configs = {languages = "c++14"}, includes = "capnp/message.h"}))
end) I succeeded installing v1.1.0 locally on a linux x86 env. |
…as it is only supported in old versions
hi @chriku , the thing I was worried about is, if we do not include a version check before banning the mingw platform, then those people who was already running 0.9.0 on windows-mingw will have trouble upgrading their xrepo. Do you see this as an issue too? @waruqi should we prefer simplicity over backward compatibility? |
We also need to be compatible with lower versions. |
@mirageAlchemy You are entirely right, my brain did not think of the old versions and I did not trust the on_check part, so I didn't even think. But waruqi seem to have fixed that
|
It seems two tests are borked, but not because of the capnproto changes. Assuming they get fixed, is this PR good enough to merge? Are there any other fixes for capnproto that sould to be done until the pipeline is happy again? |
packages/c/capnproto/xmake.lua
Outdated
-- Add on_check to fail for version greater than 1.0.2 on Windows ARM and MingW | ||
on_check(function (package) | ||
if package:version() >= "1.0.2" then | ||
if is_plat("windows") and is_arch("arm*") then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package:is_plat/package:is_arch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arm.*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages/c/capnproto/xmake.lua
Outdated
if is_plat("windows") and is_arch("arm*") then | ||
raise("package(capnproto): Unsupported version on Windows ARM. Version 0.9.0 is the latest supported version on Windows ARM.") | ||
end | ||
if is_plat("mingw") then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package:
is done in 62f51cc
Update Cap’n Proto with the current release and add the ability to use the git branch, should get Cap’n Proto in a usable state, if combined with xmake-io/xmake#5406