Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Sep 2020 12:07:17 +0000 (UTC)
From:      Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r548313 - in head/graphics: . py-s2 py-s2/files
Message-ID:  <202009121207.08CC7HpJ099374@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sunpoet
Date: Sat Sep 12 12:07:17 2020
New Revision: 548313
URL: https://svnweb.freebsd.org/changeset/ports/548313

Log:
  Add py-s2 0.9.0
  
  S2 Geometry Library 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.
  
  This port is the Python binding of S2 Geometry Library.
  
  WWW: https://s2geometry.io/
  WWW: https://github.com/google/s2geometry

Added:
  head/graphics/py-s2/
  head/graphics/py-s2/Makefile   (contents, props changed)
  head/graphics/py-s2/distinfo   (contents, props changed)
  head/graphics/py-s2/files/
  head/graphics/py-s2/files/patch-CMakeLists.txt   (contents, props changed)
  head/graphics/py-s2/pkg-descr   (contents, props changed)
  head/graphics/py-s2/pkg-plist   (contents, props changed)
Modified:
  head/graphics/Makefile

Modified: head/graphics/Makefile
==============================================================================
--- head/graphics/Makefile	Sat Sep 12 12:07:11 2020	(r548312)
+++ head/graphics/Makefile	Sat Sep 12 12:07:17 2020	(r548313)
@@ -873,6 +873,7 @@
     SUBDIR += py-qt5-svg
     SUBDIR += py-rasterio
     SUBDIR += py-rawkit
+    SUBDIR += py-s2
     SUBDIR += py-scikit-image
     SUBDIR += py-seqdiag
     SUBDIR += py-sorl-thumbnail

Added: head/graphics/py-s2/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/py-s2/Makefile	Sat Sep 12 12:07:17 2020	(r548313)
@@ -0,0 +1,26 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME=	s2
+PORTVERSION=	0.9.0
+DISTVERSIONPREFIX=	v
+CATEGORIES=	graphics
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Python binding of S2 Geometry Library
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/../../LICENSE
+
+BUILD_DEPENDS=	swig:devel/swig
+LIB_DEPENDS=	libs2.so:graphics/s2
+
+USES=		cmake compiler:c++11-lang localbase:ldflags python
+
+WRKSRC_SUBDIR=	src/python
+
+GH_ACCOUNT=	google
+GH_PROJECT=	s2geometry
+USE_GITHUB=	yes
+
+.include <bsd.port.mk>

Added: head/graphics/py-s2/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/py-s2/distinfo	Sat Sep 12 12:07:17 2020	(r548313)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1599729119
+SHA256 (google-s2geometry-v0.9.0_GH0.tar.gz) = 54c09b653f68929e8929bffa60ea568e26f3b4a51e1b1734f5c3c037f1d89062
+SIZE (google-s2geometry-v0.9.0_GH0.tar.gz) = 1124554

Added: head/graphics/py-s2/files/patch-CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/py-s2/files/patch-CMakeLists.txt	Sat Sep 12 12:07:17 2020	(r548313)
@@ -0,0 +1,35 @@
+--- CMakeLists.txt.orig	2019-03-04 16:53:16 UTC
++++ CMakeLists.txt
+@@ -1,5 +1,15 @@
++cmake_minimum_required(VERSION 3.5)
++
++project(s2-geometry)
++
++find_path(S2_INCLUDE_DIR s2/s2cell.h)
++
++find_package(SWIG)
++find_package(PythonInterp)
++find_package(PythonLibs)
++
+ include(${SWIG_USE_FILE})
+-include_directories(${PYTHON_INCLUDE_PATH})
++include_directories(${S2_INCLUDE_DIR} ${PYTHON_INCLUDE_PATH})
+ 
+ set(CMAKE_SWIG_FLAGS "")
+ set_property(SOURCE s2.i PROPERTY SWIG_FLAGS "-module" "pywraps2")
+@@ -18,7 +28,7 @@ add_test(NAME pywraps2_test COMMAND
+          ${PYTHON_EXECUTABLE}
+ 	 "${PROJECT_SOURCE_DIR}/src/python/pywraps2_test.py")
+ set_property(TEST pywraps2_test PROPERTY ENVIRONMENT
+-             "PYTHONPATH=$ENV{PYTHONPATH}:${PROJECT_BINARY_DIR}/python")
++             "PYTHONPATH=$ENV{PYTHONPATH}:${PROJECT_BINARY_DIR}")
+ 
+ execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "if True:
+                   from distutils import sysconfig as sc;
+@@ -28,5 +38,5 @@ execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "if 
+ 
+ # Install the wrapper.
+ install(TARGETS _pywraps2 DESTINATION ${PYTHON_SITE})
+-install(FILES "${PROJECT_BINARY_DIR}/python/pywraps2.py"
++install(FILES "${PROJECT_BINARY_DIR}/pywraps2.py"
+         DESTINATION ${PYTHON_SITE})

Added: head/graphics/py-s2/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/py-s2/pkg-descr	Sat Sep 12 12:07:17 2020	(r548313)
@@ -0,0 +1,9 @@
+S2 Geometry Library 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.
+
+This port is the Python binding of S2 Geometry Library.
+
+WWW: https://s2geometry.io/
+WWW: https://github.com/google/s2geometry

Added: head/graphics/py-s2/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/py-s2/pkg-plist	Sat Sep 12 12:07:17 2020	(r548313)
@@ -0,0 +1,2 @@
+%%PYTHON_SITELIBDIR%%/_pywraps2.so
+%%PYTHON_SITELIBDIR%%/pywraps2.py



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009121207.08CC7HpJ099374>