git: 37513514834b - 2023Q3 - graphics/qgis-ltr: Use default Python version

From: Rainer Hurling <rhurlin_at_FreeBSD.org>
Date: Fri, 14 Jul 2023 07:27:10 UTC
The branch 2023Q3 has been updated by rhurlin:

URL: https://cgit.FreeBSD.org/ports/commit/?id=37513514834bc0a27a792f458f2dbcd5ae3d7143

commit 37513514834bc0a27a792f458f2dbcd5ae3d7143
Author:     alt2600@icloud.com <alt2600@icloud.com>
AuthorDate: 2023-07-14 07:22:33 +0000
Commit:     Rainer Hurling <rhurlin@FreeBSD.org>
CommitDate: 2023-07-14 07:26:39 +0000

    graphics/qgis-ltr: Use default Python version
    
    cmake's FindPython.cmake always returns the highest found Python version,
    although the default version is needed here, since only for this usually
    further tools like SIP etc. are installed.
    
    Passing the path of the default version to Python_EXECUTABLE causes the
    cmake configuration to use it.
    
    Co-authored-by: Rainer Hurling <rhurlin@gwdg.de>
    
    PR:             272457
    MFH:            2023Q3
    (cherry picked from commit 347cd7d336121850e3b6234d4d4ebea96ab42588)
---
 graphics/qgis-ltr/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/graphics/qgis-ltr/Makefile b/graphics/qgis-ltr/Makefile
index b1870e0f75ff..32ce5586f737 100644
--- a/graphics/qgis-ltr/Makefile
+++ b/graphics/qgis-ltr/Makefile
@@ -116,11 +116,13 @@ USE_QT=		3d buildtools:build core concurrent dbus declarative \
 
 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/libqwt6.so \