summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoïc Bartoletti <lbartoletti@FreeBSD.org>2024-02-22 22:07:14 +0100
committerLoïc Bartoletti <lbartoletti@FreeBSD.org>2024-02-24 06:23:53 +0100
commitfc5745d2f621970d9b80e5b05e7fe215378d4e1e (patch)
treee899bc186aeba79ecfeae65cae733606de1d2898
parentbf09746b742d1fbdeb5235f848c5823c87b51339 (diff)
downloadfreebsd-ports-fc5745d2f621970d9b80e5b05e7fe215378d4e1e.zip
math/saga: fix build against pdal 2.6.3
-rw-r--r--math/saga/Makefile3
-rw-r--r--math/saga/files/patch-cmake_modules_FindPDAL.cmake23
-rw-r--r--math/saga/files/patch-src_tools_io_io__pdal_CMakeLists.txt17
3 files changed, 42 insertions, 1 deletions
diff --git a/math/saga/Makefile b/math/saga/Makefile
index 1704cf419f6c..0e68194b13aa 100644
--- a/math/saga/Makefile
+++ b/math/saga/Makefile
@@ -1,5 +1,6 @@
PORTNAME= saga
PORTVERSION= 9.3.1
+PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= SF/saga-gis/SAGA%20-%20${PORTVERSION:C/\.[[:digit:]]\.[[:digit:]]*$//}/SAGA%20-%20${PORTVERSION}
@@ -22,7 +23,7 @@ LIB_DEPENDS= libcurl.so:ftp/curl \
libhpdf.so:print/libharu \
libodbc.so:databases/unixODBC \
libopencv_core.so:graphics/opencv \
- libpdal_base.so:math/pdal \
+ libpdalcpp.so:math/pdal \
libproj.so:graphics/proj \
libsvm.so:science/libsvm \
libsz.so:science/libaec \
diff --git a/math/saga/files/patch-cmake_modules_FindPDAL.cmake b/math/saga/files/patch-cmake_modules_FindPDAL.cmake
new file mode 100644
index 000000000000..e6879b50383c
--- /dev/null
+++ b/math/saga/files/patch-cmake_modules_FindPDAL.cmake
@@ -0,0 +1,23 @@
+--- cmake/modules/FindPDAL.cmake.orig 2024-02-22 20:36:47 UTC
++++ cmake/modules/FindPDAL.cmake
+@@ -35,17 +35,10 @@ FIND_LIBRARY(PDAL_CPP_LIBRARY NAMES pdalcpp libpdalcpp
+ )
+ FIND_LIBRARY(PDAL_CPP_LIBRARY NAMES pdalcpp libpdalcpp)
+
+-FIND_LIBRARY(PDAL_UTIL_LIBRARY NAMES pdal_util libpdal_util PATHS
+- "$ENV{LIB_DIR}/lib"
+- c:/msys/local/lib
+- NO_DEFAULT_PATH
+- )
+-FIND_LIBRARY(PDAL_UTIL_LIBRARY NAMES pdal_util libpdal_util)
+-
+-IF (PDAL_INCLUDE_DIR AND PDAL_CPP_LIBRARY AND PDAL_UTIL_LIBRARY)
++IF (PDAL_INCLUDE_DIR AND PDAL_CPP_LIBRARY)
+ SET(PDAL_FOUND TRUE)
+- SET(PDAL_LIBRARIES ${PDAL_CPP_LIBRARY} ${PDAL_UTIL_LIBRARY})
+-ENDIF (PDAL_INCLUDE_DIR AND PDAL_CPP_LIBRARY AND PDAL_UTIL_LIBRARY)
++ SET(PDAL_LIBRARIES ${PDAL_CPP_LIBRARY})
++ENDIF (PDAL_INCLUDE_DIR AND PDAL_CPP_LIBRARY)
+
+ IF (PDAL_FOUND)
+ IF (NOT PDAL_FIND_QUIETLY)
diff --git a/math/saga/files/patch-src_tools_io_io__pdal_CMakeLists.txt b/math/saga/files/patch-src_tools_io_io__pdal_CMakeLists.txt
new file mode 100644
index 000000000000..bda10dfd1e8d
--- /dev/null
+++ b/math/saga/files/patch-src_tools_io_io__pdal_CMakeLists.txt
@@ -0,0 +1,17 @@
+--- src/tools/io/io_pdal/CMakeLists.txt.orig 2024-02-22 20:37:05 UTC
++++ src/tools/io/io_pdal/CMakeLists.txt
+@@ -9,11 +9,10 @@ if(WITH_TOOLS_PDAL)
+ endif()
+ find_path (PDAL_INCLUDE_DIR NAMES pdal/pdal.hpp PATHS "${LIB4SAGA}/include")
+ find_library(PDAL_LIBRARY_CPP NAMES pdalcpp libpdalcpp PATHS "${LIB4SAGA}/lib")
+- find_library(PDAL_LIBRARY_UTIL NAMES pdal_util libpdal_util PATHS "${LIB4SAGA}/lib")
+- mark_as_advanced(PDAL_INCLUDE_DIR PDAL_LIBRARY_CPP PDAL_LIBRARY_UTIL)
++ mark_as_advanced(PDAL_INCLUDE_DIR PDAL_LIBRARY_CPP)
+ include(FindPackageHandleStandardArgs)
+- FIND_PACKAGE_HANDLE_STANDARD_ARGS(PDAL REQUIRED_VARS PDAL_LIBRARY_UTIL PDAL_LIBRARY_CPP PDAL_INCLUDE_DIR)
+- set(PDAL_LIBRARIES ${PDAL_LIBRARY_CPP} ${PDAL_LIBRARY_UTIL} ws2_32)
++ FIND_PACKAGE_HANDLE_STANDARD_ARGS(PDAL REQUIRED_VARS PDAL_LIBRARY_CPP PDAL_INCLUDE_DIR)
++ set(PDAL_LIBRARIES ${PDAL_LIBRARY_CPP} ws2_32)
+ endif()
+ if(NOT PDAL_FOUND)
+ find_package(PDAL QUIET) # link PDAL library