git: 476d3a4e0e31 - main - graphics/py-s2: Update to 0.10.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 26 Apr 2022 15:04:38 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=476d3a4e0e31ad2d8422d85d7ab42740191500f2 commit 476d3a4e0e31ad2d8422d85d7ab42740191500f2 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2022-04-26 14:53:06 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2022-04-26 15:01:17 +0000 graphics/py-s2: Update to 0.10.0 Changes: https://github.com/google/s2geometry/releases --- graphics/py-s2/Makefile | 6 +++--- graphics/py-s2/distinfo | 6 +++--- graphics/py-s2/files/patch-CMakeLists.txt | 33 +++++++++++++++---------------- 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/graphics/py-s2/Makefile b/graphics/py-s2/Makefile index 854e830cb985..a204257139ab 100644 --- a/graphics/py-s2/Makefile +++ b/graphics/py-s2/Makefile @@ -1,8 +1,7 @@ # Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org> PORTNAME= s2 -PORTVERSION= 0.9.0 -PORTREVISION= 1 +PORTVERSION= 0.10.0 DISTVERSIONPREFIX= v CATEGORIES= graphics python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -14,11 +13,12 @@ LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/../../LICENSE BUILD_DEPENDS= s2>=${PORTVERSION}:graphics/s2 \ - swig:devel/swig + swig>=4:devel/swig LIB_DEPENDS= libs2.so:graphics/s2 USES= cmake compiler:c++11-lang localbase:ldflags python +CMAKE_ON= WITH_PYTHON WRKSRC_SUBDIR= src/python GH_ACCOUNT= google diff --git a/graphics/py-s2/distinfo b/graphics/py-s2/distinfo index 5a5d086bbe8b..9ac8ed9cf19f 100644 --- a/graphics/py-s2/distinfo +++ b/graphics/py-s2/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1599729119 -SHA256 (google-s2geometry-v0.9.0_GH0.tar.gz) = 54c09b653f68929e8929bffa60ea568e26f3b4a51e1b1734f5c3c037f1d89062 -SIZE (google-s2geometry-v0.9.0_GH0.tar.gz) = 1124554 +TIMESTAMP = 1650970065 +SHA256 (google-s2geometry-v0.10.0_GH0.tar.gz) = 1c17b04f1ea20ed09a67a83151ddd5d8529716f509dde49a8190618d70532a3d +SIZE (google-s2geometry-v0.10.0_GH0.tar.gz) = 1110687 diff --git a/graphics/py-s2/files/patch-CMakeLists.txt b/graphics/py-s2/files/patch-CMakeLists.txt index d6cf99fe37dc..8d599c991b79 100644 --- a/graphics/py-s2/files/patch-CMakeLists.txt +++ b/graphics/py-s2/files/patch-CMakeLists.txt @@ -1,35 +1,34 @@ ---- CMakeLists.txt.orig 2019-03-04 16:53:16 UTC +--- CMakeLists.txt.orig 2022-04-01 11:53:29 UTC +++ CMakeLists.txt -@@ -1,5 +1,15 @@ -+cmake_minimum_required(VERSION 3.5) +@@ -1,5 +1,18 @@ ++cmake_minimum_required(VERSION 3.12) + +project(s2-geometry) + +find_path(S2_INCLUDE_DIR s2/s2cell.h) + -+find_package(SWIG) -+find_package(PythonInterp) -+find_package(PythonLibs) ++# Should be easy to make it work with swig3, but some args to %pythonprepend ++# seem to be different and were changed. ++find_package(SWIG 4.0) ++# Use Python3_ROOT_DIR to help find python3, if the correct location is not ++# being found by default. ++find_package(Python3 COMPONENTS Interpreter Development) + include(${SWIG_USE_FILE}) --include_directories(${PYTHON_INCLUDE_PATH}) -+include_directories(${S2_INCLUDE_DIR} ${PYTHON_INCLUDE_PATH}) +-include_directories(${Python3_INCLUDE_DIRS}) ++include_directories(${S2_INCLUDE_DIR} ${Python3_INCLUDE_DIRS}) 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") +@@ -13,9 +26,9 @@ add_test(NAME pywraps2_test COMMAND + ${Python3_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(TARGETS _pywraps2 DESTINATION ${Python3_SITELIB}) -install(FILES "${PROJECT_BINARY_DIR}/python/pywraps2.py" +install(FILES "${PROJECT_BINARY_DIR}/pywraps2.py" - DESTINATION ${PYTHON_SITE}) + DESTINATION ${Python3_SITELIB})