[S2Geography] New recipe#9450
Conversation
Co-authored-by: Mosè Giordano <765740+giordano@users.noreply.github.com>
|
@asinghvi17 hi there, are you still interested in completing this? |
|
Hey @fingolfin, thanks for the ping! I marked this as ready for review and am re-running CI now. |
|
@asinghvi17 that won't work, you'll have to rebase this on latest master, or merge latest master into it |
|
Somehow it doesn't let me merge online, so I will do that locally tomorrow |
|
I merged |
Co-authored-by: Max Horn <max@quendi.de>
- Bump source to tag 0.3.0 (geoarrow now built into main library) - Remove libs2geography_geoarrow product (no longer a separate target) - Add nanoarrow_jll dependency (new requirement in v0.3.0) - Update msvc_to_win32_target.patch for v0.3.0 CMakeLists.txt Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…chContent - Add CMAKE_INSTALL_PREFIX and CMAKE_TOOLCHAIN_FILE so the library installs to the correct destdir and cross-compiles properly - Set FETCHCONTENT_FULLY_DISCONNECTED=ON to use system nanoarrow JLL instead of downloading a separate copy Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Inject find_package(nanoarrow) and create an alias target so the upstream CMakeLists.txt skips its FetchContent download and uses the nanoarrow_jll instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CMake cannot create an ALIAS of an ALIAS target. Use the real nanoarrow::nanoarrow_shared target instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The /J flag (make char unsigned) is MSVC-specific. When cross-compiling for Windows with MinGW/GCC, this flag is not recognized. Keep _USE_MATH_DEFINES and NOMINMAX for all WIN32, but guard /J behind an MSVC check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Bump preferred_gcc_version to v10 to fix MinGW std::filesystem bugs in GCC 8's headers - Filter out all freebsd (OpenSSL sysroot mismatch) and riscv64 (s2geometry not found) platforms Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Merge MSVC/WIN32 patch and nanoarrow sed hack into a single cmake_fixes.patch - Remove stale TODO comment and duplicate platforms declaration - Delete old msvc_to_win32_target.patch Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
e767a9b to
921ba86
Compare
Instead of patching the nanoarrow FetchContent block out of CMakeLists.txt, use CMAKE_PROJECT_s2geography_INCLUDE to inject find_package(nanoarrow) after project(). This creates the nanoarrow target before the FetchContent block runs, so it's skipped naturally. The patch now only contains the WIN32/MSVC fix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The CMAKE_PROJECT_INCLUDE approach found nanoarrow from the wrong sysroot on some platforms (static instead of shared). The combined patch is more reliable since it runs at the right point in cmake processing with the correct find paths. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
According to Claude: The bundled
|
Match paleolimbot/s2geography#70: try find_package(nanoarrow) first, fall back to FetchContent if not found. This keeps the FetchContent block intact as a fallback rather than deleting it. Once the upstream PR is merged, the nanoarrow hunk of this patch can be dropped. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Updated to s2geography v0.3.0 (from v0.1.2). Summary of changes:
The nanoarrow portion of |
Test whether MinGW builds work without the MSVC->WIN32 change. MinGW typically defines M_PI without _USE_MATH_DEFINES and may not need NOMINMAX. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
MinGW does not define M_PI without _USE_MATH_DEFINES, confirmed by CI failure. The WIN32 patch is necessary. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cleaner approach: try find_package inside the existing guard, close it, then let the FetchContent block run under its own guard. This way the find_package only runs if nanoarrow isn't already available. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update s2geography to 04a31a89 which includes the CMake fixes from paleolimbot/s2geography#70 and JuliaPackaging#71, so the patch is no longer needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@fingolfin any last comments? The recipe looks fine to me now. |
https://github.com/paleolimbot/S2Geography is a wrapper around S2Geometry that provides a GEOS-like C++ API around the S2 objects which often don't act like geospatial objects.
This PR is now ready to go.