-
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
Open
asinghvi17
wants to merge
9
commits into
JuliaPackaging:master
Choose a base branch
from
asinghvi17:as/s2geography
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[S2Geography] New recipe #9450
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f530f5a
Create S/S2Geography/build_tarballs.jl
asinghvi17 34eb96c
Use Pkg in build_tarballs.jl
asinghvi17 c70ba5f
Apply the MSVC -> Win32 patch
asinghvi17 8ff5e6b
Fix `cd` command
asinghvi17 f89da08
capitalization?
asinghvi17 1853d73
Apply suggestions from code review
asinghvi17 98e2c3f
Revert capitalization
asinghvi17 dd213a8
Merge branch 'master' into as/s2geography
fingolfin 9cfe02f
move patch
fingolfin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| 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 | ||
| cmake -B build \ | ||
| -DS2GEOGRAPHY_S2_SOURCE=SYSTEM \ | ||
| -DS2GEOGRAPHY_BUILD_TESTS=OFF \ | ||
| -DS2GEOGRAPHY_BUILD_EXAMPLES=OFF \ | ||
| -DS2GEOGRAPHY_CODE_COVERAGE=OFF | ||
| cmake --build build --parallel ${nproc} | ||
| cmake --install build | ||
| """ | ||
|
|
||
| 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. | ||
| filter!(p -> nbits(p) == 64, platforms) | ||
| filter!(p -> !(Sys.isfreebsd(p) && arch(p) == "aarch64"), platforms) | ||
| 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") | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This failed because your patch was in
bundled/msvc_to_win32_target.patchnot inbundled/patches/msvc_to_win32_target.patch-- I've moved it now