aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2020-09-12 12:07:11 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2020-09-12 12:07:11 +0000
commit846ae5fac0088d4faad65f8ca80d9c1f5e71b51c (patch)
tree321fb00e34f99b05fbe337bd63d398bf877defbc /graphics
parentc32ae064bdefea587fa24db6d4f5d767eefddea9 (diff)
downloadports-846ae5fac0088d4faad65f8ca80d9c1f5e71b51c.tar.gz
ports-846ae5fac0088d4faad65f8ca80d9c1f5e71b51c.zip
Add py-h3 3.6.4
H3 is a geospatial indexing system using a hexagonal grid that can be (approximately) subdivided into finer and finer hexagonal grids, combining the benefits of a hexagonal grid with S2's hierarchical subdivisions. This port is the Python binding for H3 core library. WWW: https://github.com/uber/h3-py
Notes
Notes: svn path=/head/; revision=548312
Diffstat (limited to 'graphics')
-rw-r--r--graphics/Makefile1
-rw-r--r--graphics/py-h3/Makefile31
-rw-r--r--graphics/py-h3/distinfo3
-rw-r--r--graphics/py-h3/files/patch-CMakeLists.txt19
-rw-r--r--graphics/py-h3/pkg-descr7
5 files changed, 61 insertions, 0 deletions
diff --git a/graphics/Makefile b/graphics/Makefile
index 5f4250c1c7cc..84c81008b269 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -822,6 +822,7 @@
SUBDIR += py-graphviz
SUBDIR += py-graphy
SUBDIR += py-gvgen
+ SUBDIR += py-h3
SUBDIR += py-hiplot
SUBDIR += py-imageio
SUBDIR += py-imageio-ffmpeg
diff --git a/graphics/py-h3/Makefile b/graphics/py-h3/Makefile
new file mode 100644
index 000000000000..645f2780af11
--- /dev/null
+++ b/graphics/py-h3/Makefile
@@ -0,0 +1,31 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= h3
+PORTVERSION= 3.6.4
+CATEGORIES= graphics python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Python binding of H3 library
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= cmake:devel/cmake \
+ ${PYTHON_PKGNAMEPREFIX}scikit-build>=0:devel/py-scikit-build@${PY_FLAVOR}
+LIB_DEPENDS= libh3.so:graphics/h3
+
+USES= localbase:ldflags python
+USE_PYTHON= autoplist concurrent cython distutils
+
+CFLAGS+= -I${LOCALBASE}/include/h3
+
+OPTIONS_DEFINE= NUMPY
+OPTIONS_DEFAULT=NUMPY
+NUMPY_DESC= NumPy support
+
+NUMPY_RUN_DEPENDS= ${PYNUMPY}
+
+.include <bsd.port.mk>
diff --git a/graphics/py-h3/distinfo b/graphics/py-h3/distinfo
new file mode 100644
index 000000000000..ef0513607c8c
--- /dev/null
+++ b/graphics/py-h3/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1599729121
+SHA256 (h3-3.6.4.tar.gz) = 416e35d736ef6ec9c1f73b9d4a9d5c696cc2a7561811f8bcfa08c8c4912f2289
+SIZE (h3-3.6.4.tar.gz) = 17292758
diff --git a/graphics/py-h3/files/patch-CMakeLists.txt b/graphics/py-h3/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..10490c593a1a
--- /dev/null
+++ b/graphics/py-h3/files/patch-CMakeLists.txt
@@ -0,0 +1,19 @@
+--- CMakeLists.txt.orig 2020-07-20 21:47:43 UTC
++++ CMakeLists.txt
+@@ -6,16 +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)
+-
+-# Build the core library as static
+-set(BUILD_SHARED_LIBS OFF)
+-add_subdirectory(src/h3lib)
+-
+ # Build the rest (other than the core library dependency) as shared
+ set(BUILD_SHARED_LIBS ON)
+ add_subdirectory(src/h3)
diff --git a/graphics/py-h3/pkg-descr b/graphics/py-h3/pkg-descr
new file mode 100644
index 000000000000..5174d14895cd
--- /dev/null
+++ b/graphics/py-h3/pkg-descr
@@ -0,0 +1,7 @@
+H3 is a geospatial indexing system using a hexagonal grid that can be
+(approximately) subdivided into finer and finer hexagonal grids, combining the
+benefits of a hexagonal grid with S2's hierarchical subdivisions.
+
+This port is the Python binding for H3 core library.
+
+WWW: https://github.com/uber/h3-py