Skip to content

Commit

Permalink
saga: update to version 9.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nilason committed Oct 6, 2023
1 parent 67c3067 commit 354f50f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 54 deletions.
12 changes: 6 additions & 6 deletions gis/saga/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ wxWidgets.use wxWidgets-3.2
name saga
categories gis
license GPL
version 9.1.2
revision 1
version 9.2.0
revision 0
maintainers {vince @Veence} {yahoo.com:n_larsson @nilason} openmaintainer

description SAGA is a GIS oriented towards statistics and analysis
Expand All @@ -25,9 +25,9 @@ long_description SAGA - System for Automated Geoscientific Analyses - is\
homepage https://saga-gis.sourceforge.io/en/index.html
master_sites sourceforge:project/saga-gis/SAGA%20-%20[lindex [split ${version} "."] 0]/SAGA%20-%20${version}

checksums rmd160 950238112c7c5216fbea41efa7d85507abf9bc5d \
sha256 f0839e6e33fbc6ea86c4a78ef48fcdd86d0a485b5e332cd1db199b45accedb62 \
size 8392187
checksums rmd160 602db180673c0146ff475a87216c7bca47c4f828 \
sha256 8c7662d5cd4ce5641fa819ad22f23b4bd9963579b3194b2f809202bd76d28d57 \
size 8676071

cmake.source_dir ${worksrcpath}/saga-gis

Expand Down Expand Up @@ -148,7 +148,7 @@ foreach pyver ${python_suffixes} {
post-patch {
reinplace \"s|@PYVER@|${py_dot_ver}|\" \
${worksrcpath}/saga-gis/src/saga_core/saga_api/saga_api_python/CMakeLists.txt
}
}
"
}

Expand Down
53 changes: 5 additions & 48 deletions gis/saga/files/python_cmake.diff
Original file line number Diff line number Diff line change
@@ -1,54 +1,11 @@
--- saga-gis/src/saga_core/saga_api/saga_api_python/CMakeLists.txt.orig 2023-07-11 13:21:34.000000000 +0200
+++ saga-gis/src/saga_core/saga_api/saga_api_python/CMakeLists.txt 2023-07-14 13:44:08.000000000 +0200
@@ -25,8 +25,8 @@
--- saga-gis/src/saga_core/saga_api/saga_api_python/CMakeLists.txt.orig
+++ saga-gis/src/saga_core/saga_api/saga_api_python/CMakeLists.txt
@@ -25,7 +25,7 @@
find_package(SWIG QUIET)
if(SWIG_FOUND)
message(STATUS "SWIG for Python found")
- find_package(Python COMPONENTS Interpreter Development)
- if(Python_FOUND)
+ find_package(Python3 @PYVER@ EXACT COMPONENTS Interpreter Development)
+ if(Python3_FOUND)
+ find_package(Python @PYVER@ EXACT COMPONENTS Interpreter Development)
if(Python_FOUND)
# project(saga_api_python)

message(STATUS "project: ${PROJECT_NAME}")
@@ -43,8 +43,8 @@

include(UseSWIG)

- include_directories("${Python_INCLUDE_DIRS}")
- include_directories("${Python_INCLUDE_DIRS}/../PC") # msvc builds
+ include_directories("${Python3_INCLUDE_DIRS}")
+ include_directories("${Python3_INCLUDE_DIRS}/../PC") # msvc builds
include_directories("..")

set(CMAKE_SWIG_FLAGS "-D_SAGA_PYTHON -D_SWIG_WCHAR")
@@ -57,20 +57,20 @@
set_property(TARGET saga_api_python PROPERTY OUTPUT_NAME saga_api)

swig_link_libraries(saga_api_python saga_api)
- swig_link_libraries(saga_api_python ${Python_LIBRARIES})
+ swig_link_libraries(saga_api_python ${Python3_LIBRARIES})


- if(EXISTS ${Python_SITELIB})
+ if(EXISTS ${Python3_SITELIB})
option(WITH_PYTHON_PKG "PySAGA package installation (if not checked API modules become installed directly in Python's site/dist-packages folder)" ON)
if(WITH_PYTHON_PKG)
- message(STATUS "SAGA-Python-API installed to: ${Python_SITELIB}/PySAGA")
- install(TARGETS saga_api_python DESTINATION ${Python_SITELIB}/PySAGA)
- install(FILES ${CMAKE_BINARY_DIR}/src/saga_core/saga_api/saga_api_python/saga_api.py DESTINATION ${Python_SITELIB}/PySAGA)
- install(FILES ${CMAKE_SOURCE_DIR}/src/accessories/python/__init__.py DESTINATION ${Python_SITELIB}/PySAGA)
+ message(STATUS "SAGA-Python-API installed to: ${Python3_SITELIB}/PySAGA")
+ install(TARGETS saga_api_python DESTINATION ${Python3_SITELIB}/PySAGA)
+ install(FILES ${CMAKE_BINARY_DIR}/src/saga_core/saga_api/saga_api_python/saga_api.py DESTINATION ${Python3_SITELIB}/PySAGA)
+ install(FILES ${CMAKE_SOURCE_DIR}/src/accessories/python/__init__.py DESTINATION ${Python3_SITELIB}/PySAGA)
else()
- message(STATUS "SAGA-Python-API installed to: ${Python_SITELIB}")
- install(TARGETS saga_api_python DESTINATION ${Python_SITELIB})
- install(FILES ${CMAKE_BINARY_DIR}/src/saga_core/saga_api/saga_api_python/saga_api.py DESTINATION ${Python_SITELIB})
+ message(STATUS "SAGA-Python-API installed to: ${Python3_SITELIB}")
+ install(TARGETS saga_api_python DESTINATION ${Python3_SITELIB})
+ install(FILES ${CMAKE_BINARY_DIR}/src/saga_core/saga_api/saga_api_python/saga_api.py DESTINATION ${Python3_SITELIB})
endif()
endif()
endif()

0 comments on commit 354f50f

Please sign in to comment.