git: b85c2f097ce4 - 2023Q4 - Mk/Uses: Add support for lazarus-qt6-devel

From: Jose Alonso Cardenas Marquez <acm_at_FreeBSD.org>
Date: Fri, 10 Nov 2023 20:17:25 UTC
The branch 2023Q4 has been updated by acm:

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

commit b85c2f097ce48b28f4ee2df5187021a0a79459f2
Author:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
AuthorDate: 2023-10-29 17:54:11 +0000
Commit:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2023-11-10 20:17:18 +0000

    Mk/Uses: Add support for lazarus-qt6-devel
    
    (cherry picked from commit b9432b9be484a7c96696ed17ef3198ba324c6c72)
---
 Mk/Uses/lazarus.mk | 26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/Mk/Uses/lazarus.mk b/Mk/Uses/lazarus.mk
index ce2ce2c3c4e3..0f7cc934562e 100644
--- a/Mk/Uses/lazarus.mk
+++ b/Mk/Uses/lazarus.mk
@@ -9,7 +9,9 @@
 # gtk2      - This automatically build lazarus-app with gtk2 interface
 #     
 # qt5       - This automatically build lazarus-app with qt5 interface
-#                
+#
+# qt6       - This automatically build lazarus-app with qt6 interface
+#
 # flavors   - This automatically build lazarus-app with flavors feature
 #
 # If the port not requires compile lazarus project files automatically, you can
@@ -46,13 +48,17 @@ _INCLUDE_USES_LAZARUS_MK=   yes
 WARNING+=	"DEFAULT_LAZARUS_VER is defined, consider using DEFAULT_VERSIONS=lazarus=${DEFAULT_LAZARUS_VER} instead"
 .  endif
 
-.  if ${lazarus_ARGS:Ngtk2:Nqt5:Nflavors}
-IGNORE=		Unknown argument for USES=lazarus: ${lazarus_ARGS:Ngtk2:Nqt5:Nflavors}
+.  if ${lazarus_ARGS:Mqt6} && !defined(WANT_LAZARUS_DEVEL)
+IGNORE=		"DEFAULT_LAZARUS_VER not support qt6 flavor, consider using: gtk2 or qt5 instead"
+.  endif
+
+.  if ${lazarus_ARGS:Ngtk2:Nqt5:Nqt6:Nflavors}
+IGNORE=		Unknown argument for USES=lazarus: ${lazarus_ARGS:Ngtk2:Nqt5:Nqt6:Nflavors}
 .  endif
 
 .  if !empty(LAZARUS_NO_FLAVORS)
-.    if ${LAZARUS_NO_FLAVORS:Ngtk2:Nqt5}
-IGNORE=         Unknown argument for LAZARUS_NO_FLAVORS: ${LAZARUS_NO_FLAVORS:Ngtk2:Nqt5}
+.    if ${LAZARUS_NO_FLAVORS:Ngtk2:Nqt5:Nqt6}
+IGNORE=         Unknown argument for LAZARUS_NO_FLAVORS: ${LAZARUS_NO_FLAVORS:Ngtk2:Nqt5:Nqt6}
 .    endif
 .  endif
 
@@ -78,6 +84,10 @@ MKINSTDIR=		${LOCALBASE}/lib/fpc/${FPC_VER}/fpmkinst/${BUILDNAME}
 
 LAZARUS_FLAVORS=	gtk2 qt5
 
+.  if defined(WANT_LAZARUS_DEVEL)
+LAZARUS_FLAVORS+=	qt6
+.  endif
+
 .  if ${lazarus_ARGS:Mflavors}
 .    if defined(LAZARUS_NO_FLAVORS)
 .      for flavor in ${LAZARUS_NO_FLAVORS}
@@ -117,6 +127,12 @@ LCL_PLATFORM=	qt5
 BUILD_DEPENDS+=	${LCL_UNITS_DIR}/${LCL_PLATFORM}/interfaces.ppu:editors/lazarus-qt5${LAZARUS_DEVELSUFFIX}
 .  endif
 
+.  if ${lazarus_ARGS:Mqt6} || ${FLAVOR} == qt6
+LIB_DEPENDS+=	libQt6Pas.so:x11-toolkits/qt6pas
+LCL_PLATFORM=	qt6
+BUILD_DEPENDS+=	${LCL_UNITS_DIR}/${LCL_PLATFORM}/interfaces.ppu:editors/lazarus-qt6${LAZARUS_DEVELSUFFIX}
+.  endif
+
 LAZBUILD_CMD=	${LOCALBASE}/bin/lazbuild
 LAZBUILD_ARGS?=	# empty