Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mmorel-35 authored and aiuto committed Jun 3, 2024
1 parent d060551 commit 50aa303
Show file tree
Hide file tree
Showing 6 changed files with 287 additions and 0 deletions.
11 changes: 11 additions & 0 deletions modules/s2geometry/0.10.0/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module(
name = "s2geometry",
version = "0.10.0",
compatibility_level = 1,
)

bazel_dep(
name = "abseil-cpp",
repo_name = "com_google_absl",
version = "20230125.1",
)
217 changes: 217 additions & 0 deletions modules/s2geometry/0.10.0/patches/add_build_file.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
--- /dev/null
+++ BUILD.bazel
@@ -0,0 +1,214 @@
+licenses(["notice"]) # Apache License 2.0
+
+exports_files(["LICENSE"])
+
+cc_library(
+ name = "bits",
+ srcs = [
+ "s2/util/bits/bits.cc",
+ "s2/util/bits/bit-interleave.cc"
+ ],
+ hdrs = [
+ "s2/util/bits/bits.h",
+ "s2/util/bits/bit-interleave.h",
+ "s2/base/integral_types.h",
+ "s2/base/logging.h",
+ "s2/base/log_severity.h",
+ "s2/base/port.h",
+ ],
+ deps = [
+ "@com_google_absl//absl/base",
+ "@com_google_absl//absl/base:core_headers",
+ "@com_google_absl//absl/numeric:bits",
+ "@com_google_absl//absl/numeric:int128",
+ ],
+)
+
+cc_library(
+ name = "endian",
+ hdrs = [
+ "s2/util/endian/endian.h",
+ ],
+ deps = [
+ "@com_google_absl//absl/base",
+ "@com_google_absl//absl/base:core_headers",
+ "@com_google_absl//absl/base:config",
+ "@com_google_absl//absl/base:endian",
+ "@com_google_absl//absl/numeric:int128",
+ ],
+)
+
+cc_library(
+ name = "gtl_util",
+ hdrs = [
+ "s2/util/gtl/compact_array.h",
+ "s2/util/gtl/container_logging.h",
+ "s2/util/gtl/dense_hash_set.h",
+ "s2/util/gtl/densehashtable.h",
+ "s2/util/gtl/hashtable_common.h",
+ "s2/util/gtl/legacy_random_shuffle.h",
+ ],
+ deps = [
+ "@com_google_absl//absl/base",
+ "@com_google_absl//absl/meta:type_traits",
+ "@com_google_absl//absl/strings:internal",
+ ],
+)
+
+cc_library(
+ name = "hash",
+ hdrs = [
+ "s2/util/hash/mix.h",
+ ],
+ deps = [
+ "@com_google_absl//absl/base",
+ "@com_google_absl//absl/base:core_headers",
+ "@com_google_absl//absl/base:endian",
+ "@com_google_absl//absl/numeric:int128",
+ "@com_google_absl//absl/strings",
+ ],
+)
+
+cc_library(
+ name = "coding",
+ srcs = [
+ "s2/util/coding/coder.cc",
+ "s2/util/coding/varint.cc",
+ ],
+ hdrs = [
+ "s2/util/coding/coder.h",
+ "s2/util/coding/nth-derivative.h",
+ "s2/util/coding/transforms.h",
+ "s2/util/coding/varint.h",
+ "s2/base/port.h",
+ "s2/base/casts.h",
+ "s2/base/logging.h",
+ "s2/base/log_severity.h",
+ ],
+ deps = [
+ "@com_google_absl//absl/base",
+ "@com_google_absl//absl/base:core_headers",
+ "@com_google_absl//absl/numeric:int128",
+ "@com_google_absl//absl/utility",
+ ":bits",
+ ":endian",
+ ":gtl_util",
+ ":hash",
+ ],
+)
+
+cc_library(
+ name = "mathutil",
+ srcs = ["s2/util/math/mathutil.cc"],
+ hdrs = [
+ "s2/util/math/mathutil.h",
+ "s2/base/integral_types.h",
+ "s2/base/logging.h",
+ "s2/base/log_severity.h",
+ "s2/util/bits/bits.h",
+ "s2/base/port.h",
+ ],
+ deps = [
+ "@com_google_absl//absl/base",
+ "@com_google_absl//absl/base:core_headers",
+ "@com_google_absl//absl/numeric:bits",
+ "@com_google_absl//absl/numeric:int128",
+ "@com_google_absl//absl/meta:type_traits",
+ ],
+)
+
+cc_library(
+ name = "vector",
+ hdrs = [
+ "s2/util/math/vector.h",
+ ],
+ deps = [
+ "@com_google_absl//absl/base",
+ "@com_google_absl//absl/base:core_headers",
+ "@com_google_absl//absl/utility",
+ ],
+)
+
+cc_library(
+ name = "matrix",
+ hdrs = [
+ "s2/util/math/matrix3x3.h",
+ "s2/util/math/vector.h",
+ ],
+ deps = [
+ ":mathutil",
+ ":vector",
+ "@com_google_absl//absl/base",
+ "@com_google_absl//absl/base:core_headers",
+ "@com_google_absl//absl/types:optional",
+ ],
+)
+
+cc_library(
+ name = "r1interval",
+ hdrs = [
+ "s2/_fp_contract_off.h",
+ "s2/r1interval.h",
+ ],
+ deps = [
+ "@com_google_absl//absl/base",
+ "@com_google_absl//absl/log:check",
+ ":vector",
+ ],
+)
+
+cc_library(
+ name = "s2cell_id",
+ srcs = [
+ "s2/r2rect.cc",
+ "s2/s1angle.cc",
+ "s2/s1chord_angle.cc",
+ "s2/s2cell_id.cc",
+ "s2/s2coords.cc",
+ "s2/s2coords_internal.h",
+ "s2/s2latlng.cc",
+ "s2/s2pointutil.cc",
+ ],
+ hdrs = [
+ "s2/_fp_contract_off.h",
+ "s2/r2.h",
+ "s2/r2rect.h",
+ "s2/s1angle.h",
+ "s2/s1chord_angle.h",
+ "s2/s2cell_id.h",
+ "s2/s2coords.h",
+ "s2/s2error.h",
+ "s2/s2latlng.h",
+ "s2/s2point.h",
+ "s2/s2pointutil.h",
+ "s2/s2region.h",
+ "s2/s2shape.h",
+ "s2/base/integral_types.h",
+ "s2/base/logging.h",
+ "s2/base/log_severity.h",
+ "s2/util/bits/bits.h",
+ "s2/base/port.h",
+ ],
+ textual_hdrs = [
+ "s2/_fp_contract_off.h",
+ "s2/r1interval.h",
+ ],
+ visibility = ["//visibility:public"],
+ deps = [
+ ":r1interval",
+ "@com_google_absl//absl/base",
+ "@com_google_absl//absl/base:core_headers",
+ "@com_google_absl//absl/hash",
+ "@com_google_absl//absl/log",
+ "@com_google_absl//absl/log:check",
+ "@com_google_absl//absl/numeric:bits",
+ "@com_google_absl//absl/status",
+ "@com_google_absl//absl/strings",
+ "@com_google_absl//absl/strings:str_format",
+ ":bits",
+ ":coding",
+ ":mathutil",
+ ":matrix",
+ ":vector",
+ ],
+)
14 changes: 14 additions & 0 deletions modules/s2geometry/0.10.0/patches/module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- MODULE.bazel
+++ MODULE.bazel
@@ -0,0 +1,11 @@
+module(
+ name = "s2geometry",
+ version = "0.10.0",
+ compatibility_level = 1,
+)
+
+bazel_dep(
+ name = "abseil-cpp",
+ repo_name = "com_google_absl",
+ version = "20230125.1",
+)
19 changes: 19 additions & 0 deletions modules/s2geometry/0.10.0/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
matrix:
platform:
- debian10
- ubuntu2004
- macos
- macos_arm64
bazel:
- 7.x
- 6.x
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_flags:
- '--cxxopt=-std=c++14'
- '--host_cxxopt=-std=c++14'
build_targets:
- '@s2geometry//...'
10 changes: 10 additions & 0 deletions modules/s2geometry/0.10.0/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url": "https://github.com/google/s2geometry/archive/refs/tags/v0.10.0.tar.gz",
"integrity": "sha256-HBewTx6iDtCaZ6gxUd3V2FKXFvUJ3eSagZBhjXBTKj0=",
"strip_prefix": "s2geometry-0.10.0/src",
"patches": {
"add_build_file.patch": "sha256-31LIDPP+da7vOezEjFztvjmK3WoV4j3m2yOiYDFqGrE=",
"module_dot_bazel.patch": "sha256-s5lvDU+veq9J8twVwlNZdXG4hFKFyDxh3yYLFlLmnR4="
},
"patch_strip": 0
}
16 changes: 16 additions & 0 deletions modules/s2geometry/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"homepage": "https://github.com/google/s2geometry",
"maintainers": [
{
"email": "[email protected]",
"name": "No Maintainer Specified"
}
],
"repository": [
"github:google/s2geometry"
],
"versions": [
"0.10.0"
],
"yanked_versions": {}
}

0 comments on commit 50aa303

Please sign in to comment.