git: 1d003c1864b4 - main - graphics/py-h3: Update to 3.7.6

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 30 Jan 2023 13:06:46 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1d003c1864b4219148d0005e473953f70f341bc7

commit 1d003c1864b4219148d0005e473953f70f341bc7
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-01-30 12:29:16 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-01-30 12:59:16 +0000

    graphics/py-h3: Update to 3.7.6
    
    - Convert to USE_PYTHON=pytest
    
    Changes:        https://github.com/uber/h3-py/releases
---
 graphics/py-h3/Makefile                   | 17 +++++++++--------
 graphics/py-h3/distinfo                   |  6 +++---
 graphics/py-h3/files/patch-CMakeLists.txt | 24 ++++++++++++++++++------
 3 files changed, 30 insertions(+), 17 deletions(-)

diff --git a/graphics/py-h3/Makefile b/graphics/py-h3/Makefile
index 1a605849dfe7..47f92cd5f446 100644
--- a/graphics/py-h3/Makefile
+++ b/graphics/py-h3/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	h3
-PORTVERSION=	3.7.4
+PORTVERSION=	3.7.6
 CATEGORIES=	graphics python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -12,16 +12,16 @@ LICENSE=	APACHE20
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
 BUILD_DEPENDS=	cmake:devel/cmake-core \
-		h3>=${PORTVERSION:R}:graphics/h3 \
+		h3>=3.7.2:graphics/h3 \
 		${PYTHON_PKGNAMEPREFIX}scikit-build>=0:devel/py-scikit-build@${PY_FLAVOR}
 LIB_DEPENDS=	libh3.so:graphics/h3
-TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}numpy>=0,1:math/py-numpy@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}numpy>=0,1:math/py-numpy@${PY_FLAVOR}
 
 USES=		localbase:ldflags ninja:build python:3.7+
-USE_PYTHON=	autoplist concurrent cython distutils
+USE_PYTHON=	autoplist concurrent cython distutils pytest
 
 CFLAGS+=	-I${LOCALBASE}/include/h3
+TEST_ENV=	PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} ${PYTHON_CMD}
 
 OPTIONS_DEFINE=	NUMPY
 OPTIONS_DEFAULT=NUMPY
@@ -29,10 +29,11 @@ NUMPY_DESC=	NumPy support
 
 NUMPY_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}numpy>=0,1:math/py-numpy@${PY_FLAVOR}
 
+post-patch:
+# Clean up bundled libraries
+	@${RM} -r ${WRKSRC}/src/h3lib/
+
 post-install:
 	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
 
-do-test:
-	cd ${WRKSRC} && ${SETENV} PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} ${PYTHON_CMD} -m pytest -rs -v
-
 .include <bsd.port.mk>
diff --git a/graphics/py-h3/distinfo b/graphics/py-h3/distinfo
index b1a8ae91402e..bee1c875524f 100644
--- a/graphics/py-h3/distinfo
+++ b/graphics/py-h3/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1650228794
-SHA256 (h3-3.7.4.tar.gz) = f8edf5a546b31afdcd801b60448ea890ce1ff418fb784335e1329519f13aa85e
-SIZE (h3-3.7.4.tar.gz) = 178439
+TIMESTAMP = 1674589590
+SHA256 (h3-3.7.6.tar.gz) = 9bbd3dbac99532fa521d7d2e288ff55877bea3223b070f659ed7b5f8f1f213eb
+SIZE (h3-3.7.6.tar.gz) = 178602
diff --git a/graphics/py-h3/files/patch-CMakeLists.txt b/graphics/py-h3/files/patch-CMakeLists.txt
index 10490c593a1a..232444f5b742 100644
--- a/graphics/py-h3/files/patch-CMakeLists.txt
+++ b/graphics/py-h3/files/patch-CMakeLists.txt
@@ -1,14 +1,26 @@
---- CMakeLists.txt.orig	2020-07-20 21:47:43 UTC
+--- CMakeLists.txt.orig	2022-11-24 19:38:22 UTC
 +++ CMakeLists.txt
-@@ -6,16 +6,6 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+@@ -6,28 +6,6 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
  # Always make a release build
  set(CMAKE_BUILD_TYPE Release)
  
 -# Avoid building tooling we won't need for release
--set(BUILD_BENCHMARKS OFF CACHE BOOL "" FORCE)
--set(BUILD_FILTERS OFF CACHE BOOL "" FORCE)
--set(BUILD_GENERATORS OFF CACHE BOOL "" FORCE)
--set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
+-# See all options with `cmake -LA` in an `h3/build` directory,
+-# or at https://h3geo.org/docs/next/core-library/compilation-options/
+-macro(turn_off option_name)
+-    set(${option_name} OFF CACHE BOOL "" FORCE)
+-endmacro()
+-turn_off(BUILD_ALLOC_TESTS)
+-turn_off(BUILD_BENCHMARKS)
+-turn_off(BUILD_FILTERS)
+-turn_off(BUILD_FUZZERS)
+-turn_off(BUILD_GENERATORS)
+-turn_off(BUILD_TESTING)
+-turn_off(ENABLE_COVERAGE)
+-turn_off(ENABLE_DOCS)
+-turn_off(ENABLE_FORMAT)
+-turn_off(ENABLE_LIBFUZZER)
+-turn_off(ENABLE_LINTING)
 -
 -# Build the core library as static
 -set(BUILD_SHARED_LIBS OFF)