-
Notifications
You must be signed in to change notification settings - Fork 647
[S2Geography] New recipe #9450
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
base: master
Are you sure you want to change the base?
[S2Geography] New recipe #9450
Changes from 4 commits
f530f5a
34eb96c
c70ba5f
8ff5e6b
f89da08
1853d73
98e2c3f
dd213a8
9cfe02f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| using BinaryBuilder, Pkg | ||
|
|
||
| name = "S2Geography" | ||
| version = v"0.1.2" | ||
| sources = [ | ||
| GitSource("https://github.com/paleolimbot/S2Geography.git", "26b65bb0a60361adfcc72b0ac427302cbf10b040"), | ||
| DirectorySource("./bundled"), | ||
| ] | ||
|
|
||
| # TODO: fix the build | ||
| # by pointing to the right s2 and abseil paths | ||
| # from the JLLs. | ||
| script = raw""" | ||
| cd ${WORKSPACE}/srcdir/s2geography | ||
| atomic_patch -p1 ../patches/msvc_to_win32_target.patch | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This failed because your patch was in |
||
| mkdir build | ||
| cd build | ||
| cmake .. | ||
asinghvi17 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| -DS2GEOGRAPHY_S2_SOURCE=SYSTEM | ||
| -DS2GEOGRAPHY_BUILD_TESTS=OFF | ||
| -DS2GEOGRAPHY_BUILD_EXAMPLES=OFF | ||
| -DS2GEOGRAPHY_CODE_COVERAGE=OFF | ||
| cmake --build . | ||
asinghvi17 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| """ | ||
|
|
||
| platforms = supported_platforms() | ||
|
|
||
| # These are the platforms we will build for by default, unless further | ||
| # platforms are passed in on the command line | ||
| platforms = supported_platforms() | ||
| # The following platforms are also excluded by s2geometry, which we depend on. | ||
|
|
||
| # Only 64-bit platforms supported | ||
| filter!(p -> nbits(p) == 64, platforms) | ||
| # We are missing some dependencies (Abseil) for aarch64-freebsd, | ||
| # can be re-enabled in the future when we have them | ||
| filter!(p -> !(Sys.isfreebsd(p) && arch(p) == "aarch64"), platforms) | ||
| # Compilation fails for powerpc: | ||
| # /workspace/srcdir/s2geometry/src/s2/s2edge_crossings.cc:120:31: error: ‘(6.15348059642740421245081038903225e-15l / 5.40431955284459475358983848622456e+16l)’ is not a constant expression | ||
asinghvi17 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| filter!(p -> arch(p) != "powerpc64le", platforms) | ||
|
|
||
| platforms = expand_cxxstring_abis(platforms) | ||
|
|
||
| products = [ | ||
| LibraryProduct("libs2geography", :libs2geography), | ||
| LibraryProduct("libs2geography_geoarrow", :libs2geography_geoarrow), | ||
| ] | ||
|
|
||
| dependencies = [ | ||
| Dependency(PackageSpec(name="abseil_cpp_jll", uuid="43133aba-3931-5066-b004-a34c79b93f2e"), compat="20240116.2.0"), | ||
| Dependency(PackageSpec(name="S2Geometry_jll", uuid="846536d6-5c10-5069-b47f-45525c463cf9"), compat="0.11.1"), | ||
| ] | ||
|
|
||
| build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6", preferred_gcc_version=v"7") | ||
asinghvi17 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please upstream this patch?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I opened a PR a while ago google/s2geometry#379 and I just saw someone commented there - will see what they think. But for this version is this reasonable to get in?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doh, never mind, this is for s2geography. I'll talk to the author there to try and upstream this. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -147,7 +147,7 @@ elseif(${S2_SOURCE} STREQUAL "SYSTEM") | ||
| endif() | ||
| endif() | ||
|
|
||
| -if (MSVC AND NOT ${S2_SOURCE} STREQUAL "BUNDLED") | ||
| +if (WIN32 AND NOT ${S2_SOURCE} STREQUAL "BUNDLED") | ||
| # used in s2geometry's CMakeLists.txt but not defined in target | ||
| target_compile_definitions(s2::s2 INTERFACE _USE_MATH_DEFINES) | ||
| target_compile_definitions(s2::s2 INTERFACE NOMINMAX) |
Uh oh!
There was an error while loading. Please reload this page.