git: f75db19bdf5f - main - deskutils/qownnotes: Rework port and make QT 6 default

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Sat, 04 Oct 2025 08:13:34 UTC
The branch main has been updated by diizzy:

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

commit f75db19bdf5f1dac3c4cedd244873147c97dcdfc
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2025-10-03 22:08:23 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2025-10-04 08:11:48 +0000

    deskutils/qownnotes: Rework port and make QT 6 default
    
    As QT 5 is going away move defaults to QT 6
    While at it modernize port Makefile to closer follow
    Porters Handbook and switch dependency from git to libgit2 for QT 6 port
    
    PR:             289565
    Approved by:    maintainer timeout, 2+ weeks
---
 deskutils/qownnotes/Makefile | 38 +++++++++++++++++++++++---------------
 1 file changed, 23 insertions(+), 15 deletions(-)

diff --git a/deskutils/qownnotes/Makefile b/deskutils/qownnotes/Makefile
index 45dbb2da6b63..83a0e7bf4911 100644
--- a/deskutils/qownnotes/Makefile
+++ b/deskutils/qownnotes/Makefile
@@ -1,7 +1,8 @@
 PORTNAME=	qownnotes
-PORTVERSION=	25.9.3
+DISTVERSION=	25.9.3
+PORTREVISION=	1
 CATEGORIES=	deskutils
-MASTER_SITES=	https://github.com/pbek/QOwnNotes/releases/download/v${PORTVERSION}/
+MASTER_SITES=	https://github.com/pbek/QOwnNotes/releases/download/v${DISTVERSION}/
 
 MAINTAINER=	stobbsm@gmail.com
 COMMENT=	Markdown note taking program with cloud integration
@@ -9,30 +10,37 @@ WWW=		https://www.qownnotes.org/
 
 LICENSE=	GPLv2
 
-RUN_DEPENDS=	git:devel/git
+FLAVORS=	qt6 qt5
+FLAVOR?=	${FLAVORS:[1]}
+qt5_PKGNAMESUFFIX=	-qt5
+
+qt6_LIB_DEPENDS=	libbotan-3.so:security/botan3 \
+			libgit2.so:devel/libgit2
+qt5_RUN_DEPENDS=	git:devel/git
 
 USES=		gl pkgconfig tar:xz xorg
 USE_GL=		gl
 USE_XORG=	x11
 
-FLAVORS=	qt5 qt6
-
-.if ${FLAVOR:U} == qt6
-LIB_DEPENDS=	libbotan-3.so:security/botan3
-CMAKE_ON=	BUILD_WITH_SYSTEM_BOTAN QON_QT6_BUILD
+.if ${FLAVOR:U} == qt5
+USES+=		gmake qmake qt:5
+USE_QT=		buildtools:build linguisttools:build sql-sqlite3:run \
+		concurrent core declarative gui network printsupport \
+		sql svg websockets widgets x11extras xml
+.else
 USES+=		cmake qt:6
 USE_QT=		tools:build base declarative svg websockets
 USE_XORG+=	ice sm xext
-PKGNAMESUFFIX=	-${FLAVOR}
+.endif
+
+.if ${FLAVOR:U} == qt6
+CMAKE_ON=	BUILD_WITH_LIBGIT2 \
+		BUILD_WITH_SYSTEM_BOTAN \
+		QON_QT6_BUILD
+.endif
 
 post-patch:
 	@${REINPLACE_CMD} -e '/QON_QM_FILES/s,QOwnNotes,${_QT_RELNAME},' \
 		${WRKSRC}/CMakeLists.txt
-.else
-USES+=		gmake qmake qt:5
-USE_QT=		buildtools:build linguisttools:build sql-sqlite3:run \
-		concurrent core declarative gui network printsupport \
-		sql svg websockets widgets x11extras xml
-.endif
 
 .include <bsd.port.mk>