diff --git a/graphics/qgis-ltr/Makefile b/graphics/qgis-ltr/Makefile index ad0eff27a3d5..b95dc84e5e0c 100644 --- a/graphics/qgis-ltr/Makefile +++ b/graphics/qgis-ltr/Makefile @@ -1,199 +1,199 @@ PORTNAME= qgis DISTVERSION= 3.28.15 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics geography MASTER_SITES= https://qgis.org/downloads/ PKGNAMESUFFIX= -ltr MAINTAINER= rhurlin@FreeBSD.org COMMENT= Free and Open Source Geographic Information System WWW= https://qgis.org/en/site/ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/doc/LICENSE BUILD_DEPENDS= gpsbabel>=1.7.0:astro/gpsbabel \ opencl>=0:devel/opencl \ ${PYTHON_PKGNAMEPREFIX}cycler>=0.11.0:devel/py-cycler@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dateutil>=2.8.2:devel/py-dateutil@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}future>=0.18.2:devel/py-future@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}httplib2>=0.20.2:www/py-httplib2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}jedi>=0.18.1:devel/py-jedi@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}Jinja2>=3.1.2:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}markupsafe>=2.1.1:textproc/py-markupsafe@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}matplotlib>=3.4.3:math/py-matplotlib@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}mock>=4.0.3:devel/py-mock@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}OWSLib>=0.27.2:graphics/py-OWSLib@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pbr>=5.10.0:devel/py-pbr@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pip>=22.2.2:devel/py-pip@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}plotly>=4.14.3:graphics/py-plotly@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pygments>=2.13.0:textproc/py-pygments@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyproj>=3.4.0:graphics/py-pyproj@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytz>=2020.5:devel/py-pytz@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}requests>=2.28.0:www/py-requests@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}six>=1.16.0:devel/py-six@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sqlite3>=3.7.16:databases/py-sqlite3@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}yaml>=5.4.1:devel/py-yaml@${PY_FLAVOR} LIB_DEPENDS= libexiv2.so:graphics/exiv2 \ libexpat.so:textproc/expat2 \ libgdal.so:graphics/gdal \ libgeos.so:graphics/geos \ libgsl.so:math/gsl \ libhdf5.so:science/hdf5 \ libmdal.so:math/mdal \ libnetcdf.so:science/netcdf \ libOpenCL.so:devel/ocl-icd \ - libpdal_base.so:math/pdal \ + libpdalcpp.so:math/pdal \ libproj.so:graphics/proj \ libprotobuf-lite.so:devel/protobuf \ libqjson-qt5.so:devel/qjson \ libqscintilla2_qt5.so:devel/qscintilla2-qt5 \ libqt5keychain.so:security/qtkeychain@qt5 \ libqwt.so:x11-toolkits/qwt6@qt5 \ libspatialindex.so:devel/spatialindex \ libspatialite.so:databases/spatialite \ libsz.so:science/libaec \ libxerces-c.so:textproc/xerces-c3 \ libzip.so:archivers/libzip \ libzstd.so:archivers/zstd RUN_DEPENDS= astyle:devel/astyle \ opencl>=0:devel/opencl \ ${PYTHON_PKGNAMEPREFIX}black>=22.10:devel/py-black@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}cycler>=0.11.0:devel/py-cycler@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dateutil>=2.8.2:devel/py-dateutil@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}Fiona>=1.8.21:graphics/py-fiona@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}future>=0.18.2:devel/py-future@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}gdal>=3.5.2:graphics/py-gdal@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}geojson>=2.3.0:devel/py-geojson@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}geopandas>=0.11.1:graphics/py-geopandas@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}httplib2>=0.20.2:www/py-httplib2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}jedi>=0.18.1:devel/py-jedi@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}Jinja2>=3.1.2:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}markupsafe>=2.1.1:textproc/py-markupsafe@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}matplotlib>=3.4.3:math/py-matplotlib@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}mock>=4.0.3:devel/py-mock@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}nbformat>=5.7.0:devel/py-nbformat@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}netCDF4>=1.6.2:science/py-netCDF4@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}networkx>=2.8.8:math/py-networkx@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}nltk>=3.7:textproc/py-nltk@${PY_FLAVOR} \ ${PYNUMPY} \ ${PYTHON_PKGNAMEPREFIX}OWSLib>=0.27.2:graphics/py-OWSLib@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pandas>=1.5.0:math/py-pandas@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pbr>=5.10.0:devel/py-pbr@${PY_FLAVOR} \ ${PY_PILLOW} \ ${PYTHON_PKGNAMEPREFIX}pip>=22.2.2:devel/py-pip@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}plotly>=4.14.3:graphics/py-plotly@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}psutil>=5.9.2:sysutils/py-psutil@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}psycopg2>=2.9.4:databases/py-psycopg2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pygments>=2.13.0:textproc/py-pygments@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyproj>=3.4.0:graphics/py-pyproj@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyrsgis>=0.4.1:graphics/py-pyrsgis@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytz>=2020.5:devel/py-pytz@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}rasterio>=1.3.2:graphics/py-rasterio@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}requests>=2.28.0:www/py-requests@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}scikit-image>=0.19.3:graphics/py-scikit-image@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}scikit-learn>=1.1.3:science/py-scikit-learn@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}shapely>=1.8.5:devel/py-shapely@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}six>=1.16.0:devel/py-six@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sqlite3>=3.7.16:databases/py-sqlite3@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}termcolor>=2.1.0:devel/py-termcolor@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}xcffib>=0.11.1:x11/py-xcffib@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}xlrd>=2.0.1:textproc/py-xlrd@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}yaml>=5.4.1:devel/py-yaml@${PY_FLAVOR} ### Fortran is needed by numpy, GRASS, etc. USES= bison cmake compiler:features desktop-file-utils \ fortran gl gmake gnome pgsql pyqt:5 python qca qt:5 \ shebangfix sqlite:3 tar:bz2 USE_GL= gl USE_GNOME= libxml2 USE_LDCONFIG= yes USE_PYQT= pyqt5 qscintilla2 pysip sip USE_QT= 3d buildtools:build core concurrent dbus declarative \ designer:build qdoc:build gamepad gui linguist:build location \ network printsupport qmake:build script serialport \ sql sql-pgsql sql-sqlite3 svg uitools:build \ webengine widgets xml SHEBANG_FILES= src/plugins/grass/scripts/*.py # Python_EXECUTABLE: Use the default version if multiple Pythons are available CMAKE_ARGS+= -DCMAKE_BUILD_TYPE:STRING=Release \ -DHAVE_PGCONFIG=1 \ -DWITH_INTERNAL_MDAL:BOOL=false \ -DPYRCC_PROGRAM:FILEPATH=${LOCALBASE}/bin/pyrcc5-${PYTHON_VER} \ -DPYUIC_PROGRAM:FILEPATH=${LOCALBASE}/bin/pyuic5-${PYTHON_VER} \ -DPython_EXECUTABLE=${PYTHON_CMD} \ -DQSCI_SIP_DIR:PATH=${PYQT_SIPDIR}/Qsci \ -DQWT_INCLUDE_DIR:PATH=${LOCALBASE}/include/qt5/qwt6 \ -DQWT_LIBRARY:FILEPATH=${LOCALBASE}/lib/qt5/libqwt.so \ -DQGIS_MANUAL_SUBDIR:PATH=share/man CMAKE_ON= USE_OPENCL WITH_3D WITH_ASTYLE WITH_BINDINGS WITH_COPC \ WITH_CUSTOM_WIDGETS WITH_EPT WITH_PDAL WITH_POSTGRESQL CMAKE_OFF= ENABLE_TESTS WITH_QTWEBKIT WITH_QWTPOLAR # math/pdal fails in pdal_wrench() with "undefined reference to symbol 'pthread_create@@FBSD_1.0'" CXXFLAGS+= -pthread CONFLICTS_INSTALL= qgis PLIST_SUB= DISTVERSION=${DISTVERSION} .if !defined(MAINTAINER_MODE) CMAKE_ARGS+= -Wno-dev CMAKE_OFF+= SUPPRESS_QT_WARNINGS .endif OPTIONS_DEFINE= SERVER OPTIONS_DEFAULT= SERVER GRASS8 OPTIONS_RADIO= GRASS OPTIONS_RADIO_GRASS= GRASS7 GRASS8 #NO_OPTIONS_SORT= yes OPTIONS_SUB= yes GRASS_DESC= Add GRASS GIS to processing tools SERVER_DESC= Enable QGIS server GRASS7_BUILD_DEPENDS= grass7:databases/grass7 GRASS7_RUN_DEPENDS= ${GRASS7_BUILD_DEPENDS} GRASS7_CMAKE_BOOL= WITH_GRASS7 GRASS8_BUILD_DEPENDS= grass8:databases/grass8 GRASS8_RUN_DEPENDS= ${GRASS8_BUILD_DEPENDS} GRASS8_CMAKE_BOOL= WITH_GRASS8 SERVER_LIB_DEPENDS= libfcgi.so:www/fcgi SERVER_CMAKE_BOOL= WITH_SERVER WITH_SERVER_PLUGINS WITH_QSPATIALITE .include pre-patch: # Only PostgreSQL Client headers, not Server @${REINPLACE_CMD} -e 's|set(POSTGRES_INCLUDE_DIR \$${PostgreSQL_INCLUDE_DIRS})|set(POSTGRES_INCLUDE ${LOCALBASE}/include)|g' \ ${WRKSRC}/cmake/FindPostgres.cmake post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/cmake/FindGRASS.cmake # On i386, '-mllvm -inline-threshold=128' does not build under all circumstances # See bugs 242557 and 241687. .if ${OPSYS} == FreeBSD && ${ARCH} == "i386" @${REINPLACE_CMD} -e 's|"-mllvm -inline-threshold=128"|"-O1"|g' \ ${WRKSRC}/src/core/CMakeLists.txt .endif pre-configure: ${MKDIR} ${CONFIGURE_WRKSRC}/bin && ${LN} -s ${PYTHON_CMD} ${CONFIGURE_WRKSRC}/bin/python3 .if ${PORT_OPTIONS:MGRASS7} || ${PORT_OPTIONS:MGRASS8} PLIST_SUB+= GRASS="" NO_GRASS="@comment " .else PLIST_SUB+= GRASS="@comment " NO_GRASS="" .endif post-install: @${RM} ${STAGEDIR}${DATADIR}/python/pytz/tzfile.py.bak @${FIND} ${STAGEDIR}${LOCALBASE} -name "__pycache__" -delete @${RM} /tmp/srs.db check: @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} check .include diff --git a/graphics/qgis-ltr/files/patch-cmake_FindPDAL.cmake b/graphics/qgis-ltr/files/patch-cmake_FindPDAL.cmake new file mode 100644 index 000000000000..8e3ebf2b787e --- /dev/null +++ b/graphics/qgis-ltr/files/patch-cmake_FindPDAL.cmake @@ -0,0 +1,83 @@ +--- cmake/FindPDAL.cmake.orig 2024-02-22 21:12:12 UTC ++++ cmake/FindPDAL.cmake +@@ -7,8 +7,7 @@ + # CMake module to search for PDAL library + # + # If it's found it sets PDAL_FOUND to TRUE +-# and following variables are set: +-# PDAL_INCLUDE_DIR ++# and adds the following variable containing library target(s): + # PDAL_LIBRARIES + + # FIND_PATH and FIND_LIBRARY normally search standard locations +@@ -18,6 +17,28 @@ + # locations. When an earlier FIND_* succeeds, subsequent FIND_*s + # searching for the same item do nothing. + ++find_package(PDAL CONFIG) ++ ++if(PDAL_FOUND) ++ if(NOT PDAL_FIND_QUIETLY) ++ message(STATUS "Found PDAL: ${PDAL_LIBRARIES} (${PDAL_VERSION})") ++ endif() ++ ++ if(PDAL_VERSION VERSION_LESS "1.7.0") ++ message(FATAL_ERROR "PDAL version is too old (${PDAL_VERSION}). Use 1.7 or higher.") ++ endif() ++ ++ if(MSVC) ++ foreach(PDAL_TARG ${PDAL_LIBRARIES}) ++ target_compile_definitions(${PDAL_TARG} INTERFACE WIN32_LEAN_AND_MEAN) ++ endforeach() ++ endif() ++ ++ return() ++endif() ++ ++# Fallback for systems where PDAL's config-file package is not present. ++# It is not adapted for PDAL 2.6+ (where pdal_util library is removed). + FIND_PATH(PDAL_INCLUDE_DIR pdal/pdal.hpp + "$ENV{LIB_DIR}/include" + "/usr/include" +@@ -50,7 +71,7 @@ IF (PDAL_INCLUDE_DIR AND PDAL_CPP_LIBRARY AND PDAL_UTI + + IF (PDAL_INCLUDE_DIR AND PDAL_CPP_LIBRARY AND PDAL_UTIL_LIBRARY AND PDAL_BIN) + SET(PDAL_FOUND TRUE) +- SET(PDAL_LIBRARIES ${PDAL_CPP_LIBRARY} ${PDAL_UTIL_LIBRARY}) ++ SET(PDAL_LIBRARIES pdalcpp pdal_util) + ENDIF (PDAL_INCLUDE_DIR AND PDAL_CPP_LIBRARY AND PDAL_UTIL_LIBRARY AND PDAL_BIN) + + IF (PDAL_FOUND) +@@ -60,8 +81,8 @@ IF (PDAL_FOUND) + OUTPUT_VARIABLE PDAL_VERSION_OUT ) + STRING(REGEX REPLACE "^.*([0-9]+)\\.([0-9]+)\\.([0-9]+).*$" "\\1" PDAL_VERSION_MAJOR "${PDAL_VERSION_OUT}") + STRING(REGEX REPLACE "^.*([0-9]+)\\.([0-9]+)\\.([0-9]+).*$" "\\2" PDAL_VERSION_MINOR "${PDAL_VERSION_OUT}") +- STRING(REGEX REPLACE "^.*([0-9]+)\\.([0-9]+)\\.([0-9]+).*$" "\\3" PDAL_VERSION_MICRO "${PDAL_VERSION_OUT}") +- STRING(CONCAT PDAL_VERSION ${PDAL_VERSION_MAJOR} "." ${PDAL_VERSION_MINOR} "." ${PDAL_VERSION_MICRO}) ++ STRING(REGEX REPLACE "^.*([0-9]+)\\.([0-9]+)\\.([0-9]+).*$" "\\3" PDAL_VERSION_PATCH "${PDAL_VERSION_OUT}") ++ STRING(CONCAT PDAL_VERSION ${PDAL_VERSION_MAJOR} "." ${PDAL_VERSION_MINOR} "." ${PDAL_VERSION_PATCH}) + + IF (NOT PDAL_FIND_QUIETLY) + MESSAGE(STATUS "Found PDAL: ${PDAL_LIBRARIES} (${PDAL_VERSION})") +@@ -70,6 +91,21 @@ IF (PDAL_FOUND) + IF ((PDAL_VERSION_MAJOR EQUAL 1) AND (PDAL_VERSION_MINOR LESS 7)) + MESSAGE (FATAL_ERROR "PDAL version is too old (${PDAL_VERSION}). Use 1.7 or higher.") + ENDIF() ++ ++ add_library(pdalcpp UNKNOWN IMPORTED) ++ target_link_libraries(pdalcpp INTERFACE ${PDAL_CPP_LIBRARY}) ++ target_include_directories(pdalcpp INTERFACE ${PDAL_INCLUDE_DIR}) ++ set_target_properties(pdalcpp PROPERTIES IMPORTED_LOCATION ${PDAL_CPP_LIBRARY}) ++ ++ add_library(pdal_util UNKNOWN IMPORTED) ++ target_link_libraries(pdal_util INTERFACE ${PDAL_UTIL_LIBRARY}) ++ target_include_directories(pdal_util INTERFACE ${PDAL_INCLUDE_DIR}) ++ set_target_properties(pdal_util PROPERTIES IMPORTED_LOCATION ${PDAL_UTIL_LIBRARY}) ++ ++ if(MSVC) ++ target_compile_definitions(pdalcpp INTERFACE WIN32_LEAN_AND_MEAN) ++ target_compile_definitions(pdal_util INTERFACE WIN32_LEAN_AND_MEAN) ++ endif() + + ELSE (PDAL_FOUND) + IF (PDAL_FIND_REQUIRED)