commit:     7cfff3431575e5eacfe2721fe33df857dfd418d0
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  5 07:48:03 2026 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Thu Feb  5 07:48:31 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7cfff343

sci-geosciences/s2geometry: new package, add 0.13.1

Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 sci-geosciences/s2geometry/Manifest                |  1 +
 .../s2geometry/files/s2geometry-0.13.1-test.patch  | 23 +++++++++++++++
 sci-geosciences/s2geometry/metadata.xml            | 22 +++++++++++++++
 .../s2geometry/s2geometry-0.13.1.ebuild            | 33 ++++++++++++++++++++++
 4 files changed, 79 insertions(+)

diff --git a/sci-geosciences/s2geometry/Manifest 
b/sci-geosciences/s2geometry/Manifest
new file mode 100644
index 000000000000..313824722011
--- /dev/null
+++ b/sci-geosciences/s2geometry/Manifest
@@ -0,0 +1 @@
+DIST s2geometry-0.13.1.tar.gz 2776617 BLAKE2B 
801456832f6c3dd66c29244f91f29cd68d1957307fa8d79dacdf23775ad169d6a86b589017a5f1daa96304b9712cabf51890271a8edf7c310ff3bc3d6ea09f1b
 SHA512 
4ddfff2f44c0e98b2a110da57335fe119788f32e3924c8bdbe9afffbad5e037fdfe64f88f664b025a86134e17f14f6195107035b258fde06f946972f1f0456a8

diff --git a/sci-geosciences/s2geometry/files/s2geometry-0.13.1-test.patch 
b/sci-geosciences/s2geometry/files/s2geometry-0.13.1-test.patch
new file mode 100644
index 000000000000..8d7f8147e0f5
--- /dev/null
+++ b/sci-geosciences/s2geometry/files/s2geometry-0.13.1-test.patch
@@ -0,0 +1,23 @@
+--- a/CMakeLists.txt   2026-02-04 19:24:26.620844118 +0100
++++ b/CMakeLists.txt   2026-02-04 20:09:05.404038948 +0100
+@@ -494,9 +494,6 @@
+   endif()
+   message("GOOGLETEST_ROOT: ${GOOGLETEST_ROOT}")
+ 
+-  add_subdirectory(${GOOGLETEST_ROOT}/googlemock build_gmock)
+-  include_directories(${GOOGLETEST_ROOT}/googlemock/include)
+-  include_directories(${GOOGLETEST_ROOT}/googletest/include)
+ 
+   set(S2TestFiles
+       src/s2/encoded_s2cell_id_vector_test.cc
+@@ -644,7 +641,9 @@
+         absl::status
+         absl::strings
+         absl::synchronization
+-        gmock_main)
++        gmock_main
++        gmock
++        gtest)
+     add_test(${test} ${test})
+   endforeach()
+ endif()

diff --git a/sci-geosciences/s2geometry/metadata.xml 
b/sci-geosciences/s2geometry/metadata.xml
new file mode 100644
index 000000000000..b91d5af93ed3
--- /dev/null
+++ b/sci-geosciences/s2geometry/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Tupone Alfredo</name>
+       </maintainer>
+       <maintainer type="project">
+               <email>[email protected]</email>
+               <name>Gentoo Science Project</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">google/s2geometry</remote-id>
+       </upstream>
+       <longdescription lang="en">
+               This is a package for manipulating geometric shapes. Unlike many
+               geometry libraries, S2 is primarily designed to work with 
spherical
+               geometry, i.e., shapes drawn on a sphere rather than on a planar
+               2D map. This makes it especially suitable for working with 
geographic
+               data.
+       </longdescription>
+</pkgmetadata>

diff --git a/sci-geosciences/s2geometry/s2geometry-0.13.1.ebuild 
b/sci-geosciences/s2geometry/s2geometry-0.13.1.ebuild
new file mode 100644
index 000000000000..1feaa6ab16b3
--- /dev/null
+++ b/sci-geosciences/s2geometry/s2geometry-0.13.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 2025-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Computational geometry and spatial indexing on the sphere"
+HOMEPAGE="http://s2geometry.io/";
+SRC_URI="https://github.com/google/${PN}/archive/refs/tags/v${PV}.tar.gz
+       -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       >=dev-cpp/abseil-cpp-20250814.1:=
+       dev-libs/openssl:=
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-test.patch )
+
+src_configure() {
+       local mycmakeargs=(
+               -DBUILD_TESTS=$(usex test)
+               -DGOOGLETEST_ROOT=/usr/include
+       )
+       cmake_src_configure
+}

Reply via email to