git: 671f29c2a341 - main - Mk/Uses/pyqt.mk: Whitespace fixes/readability

From: Jason E. Hale <jhale_at_FreeBSD.org>
Date: Sat, 19 Oct 2024 07:38:49 UTC
The branch main has been updated by jhale:

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

commit 671f29c2a341dfed8f564d7358c56b6c6712907d
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2024-10-17 21:21:41 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2024-10-19 04:22:15 +0000

    Mk/Uses/pyqt.mk: Whitespace fixes/readability
---
 Mk/Uses/pyqt.mk | 176 +++++++++++++++++++++++++++++++-------------------------
 1 file changed, 99 insertions(+), 77 deletions(-)

diff --git a/Mk/Uses/pyqt.mk b/Mk/Uses/pyqt.mk
index 7e70302061f5..1383c2417c5a 100644
--- a/Mk/Uses/pyqt.mk
+++ b/Mk/Uses/pyqt.mk
@@ -23,27 +23,26 @@
 .if !defined(_INCLUDE_USES_PYQT_MK)
 _INCLUDE_USES_PYQT_MK=	yes
 
-# At the moment we support PyQt bindings versions 5 and 6
-# option is for internal use by the py-sip ports.
-_PYQT_SUPPORTED=        5 6 sip
+# At the moment we support PyQt bindings versions 5 and 6.
+# The sip argument is for internal use by devel/py-sip.
+_PYQT_SUPPORTED=	5 6 sip
 
 .  if empty(pyqt_ARGS)
-IGNORE=	pyqt needs a qt-version (${_PYQT_SUPPORTED})
+IGNORE=		pyqt needs a qt-version (${_PYQT_SUPPORTED})
 .  endif
 
-# At the moment we support PyQt bindings versions 5 and 6
 .  for ver in ${_PYQT_SUPPORTED:O:u}
 .    if ${pyqt_ARGS:M${ver}}
 .      if empty(_PYQT_VERSION)
-_PYQT_VERSION=  ${ver}
+_PYQT_VERSION=	${ver}
 .      else
-IGNORE?=        cannot be installed: different PYQT versions specified via pyqt:[${_PYQT_SUPPORTED:S/ //g}]
+IGNORE?=	cannot be installed: different PYQT versions specified via pyqt:[${_PYQT_SUPPORTED:S/ //g}]
 .      endif
 .    endif
 .  endfor
 
 .  if empty(_PYQT_VERSION)
-IGNORE?=        USES=pyqt needs a version number (valid values: ${_PYQT_SUPPORTED})
+IGNORE?=	USES=pyqt needs a version number (valid values: ${_PYQT_SUPPORTED})
 _PYQT_VERSION=	0
 .  endif
 
@@ -52,37 +51,43 @@ PYQT_MAINTAINER=	kde@FreeBSD.org
 MASTER_SITE_RIVERBANK=	https://www.riverbankcomputing.com/static/Downloads/%SUBDIR%/
 MASTER_SITE_RBDEV=	https://www.riverbankcomputing.com/pypi/packages/%SUBDIR%/
 
-MASTER_SITES_SIP=	PYPI/source/s/sip
-MASTER_SITES_PYQT5=	PYPI/source/P/PyQt5
-MASTER_SITES_PYQT6=	PYPI/source/P/PyQt6 \
-			RBDEV/PyQt6
-MASTER_SITES_PYQT=	${MASTER_SITES_PYQT${_PYQT_VERSION}}
-MASTER_SITES_PYQT5SIP=	PYPI/source/P/PyQt5-sip
-MASTER_SITES_PYQT6SIP=	PYPI/source/P/PyQt6-sip
-MASTER_SITES_PYQTSIP=	${MASTER_SITES_PYQT${_PYQT_VERSION}SIP}
-MASTER_SITES_PYQT63D=	PYPI/source/P/PyQt6-3D \
-			RBDEV/PyQt6-3D
-MASTER_SITES_PYQT3D=	${MASTER_SITES_PYQT${_PYQT_VERSION}3D}
+# Qt version-agnostic components
+MASTER_SITES_PYQTBUILDER=	PYPI/source/P/PyQt-builder
+MASTER_SITES_QSCI2=		RIVERBANK/QScintilla/${PORTVERSION} \
+				SF/pyqt/QScintilla2/QScintilla-${PORTVERSION} \
+				GENTOO
+MASTER_SITES_SIP=		PYPI/source/s/sip
+
+# Qt 5 components
+MASTER_SITES_PYQT5SIP=		PYPI/source/P/PyQt5-sip
+MASTER_SITES_PYQT5=		PYPI/source/P/PyQt5
 MASTER_SITES_PYQT5CHART=	PYPI/source/P/PyQtChart
+MASTER_SITES_PYQT5NETWORKAUTH=	PYPI/source/P/PyQtNetworkAuth
+MASTER_SITES_PYQT5WEBENGINE=	PYPI/source/P/PyQtWebEngine
+
+# Qt 6 components
+MASTER_SITES_PYQT6SIP=		PYPI/source/P/PyQt6-sip
+MASTER_SITES_PYQT6=		PYPI/source/P/PyQt6 \
+				RBDEV/PyQt6
+MASTER_SITES_PYQT63D=		PYPI/source/P/PyQt6-3D \
+				RBDEV/PyQt6-3D
 MASTER_SITES_PYQT6CHART=	PYPI/source/P/PyQt6-Charts \
 				RBDEV/PyQt6-Charts
-MASTER_SITES_PYQTCHART=		${MASTER_SITES_PYQT${_PYQT_VERSION}CHART}
 MASTER_SITES_PYQT6DATAVIS3D=	PYPI/source/P/PyQt6-DataVisualization \
 				RBDEV/PyQt6-DataVisualization
-MASTER_SITES_PYQTDATAVIS3D=	${MASTER_SITES_PYQT${_PYQT_VERSION}DATAVIS3D}
-MASTER_SITES_PYQT5NETWORKAUTH=	PYPI/source/P/PyQtNetworkAuth
 MASTER_SITES_PYQT6NETWORKAUTH=	PYPI/source/P/PyQt6-NetworkAuth \
 				RBDEV/PyQt6-NetworkAuth
-MASTER_SITES_PYQTNETWORKAUTH=	${MASTER_SITES_PYQT${_PYQT_VERSION}NETWORKAUTH}
-MASTER_SITES_PYQTBUILDER=	PYPI/source/P/PyQt-builder
-MASTER_SITES_PYQT5WEBENGINE=	PYPI/source/P/PyQtWebEngine
 MASTER_SITES_PYQT6WEBENGINE=	PYPI/source/P/PyQt6-WebEngine \
 				RBDEV/PyQt6-WebEngine
+
+# Unversioned MASTER_SITES
+MASTER_SITES_PYQT=		${MASTER_SITES_PYQT${_PYQT_VERSION}}
+MASTER_SITES_PYQTSIP=		${MASTER_SITES_PYQT${_PYQT_VERSION}SIP}
+MASTER_SITES_PYQT3D=		${MASTER_SITES_PYQT${_PYQT_VERSION}3D}
+MASTER_SITES_PYQTCHART=		${MASTER_SITES_PYQT${_PYQT_VERSION}CHART}
+MASTER_SITES_PYQTDATAVIS3D=	${MASTER_SITES_PYQT${_PYQT_VERSION}DATAVIS3D}
+MASTER_SITES_PYQTNETWORKAUTH=	${MASTER_SITES_PYQT${_PYQT_VERSION}NETWORKAUTH}
 MASTER_SITES_PYQTWEBENGINE=	${MASTER_SITES_PYQT${_PYQT_VERSION}WEBENGINE}
-#https://www.riverbankcomputing.com/static/Downloads/QScintilla/2.12.0/QScintilla_src-2.12.0.tar.gz
-MASTER_SITES_QSCI2=	RIVERBANK/QScintilla/${PORTVERSION} \
-			SF/pyqt/QScintilla2/QScintilla-${PORTVERSION} \
-			GENTOO
 
 # PORTEPOCH is important here, because version-comparisons in *_DEPENDS
 # take it into account (visually, 6.5.1 >= 5.5.3,1, but it isn't).
@@ -92,39 +97,53 @@ MASTER_SITES_QSCI2=	RIVERBANK/QScintilla/${PORTVERSION} \
 #
 # Where noted, the ports are epoched and the py-${comp}-PATH variables,
 # below, should have a suitable epoch appended to the version.
-SIP_VERSION=		6.8.3	# ,1
-QSCI2_VERSION=		2.14.1
-PYQT5_VERSION=		5.15.10
-PYQT6_VERSION=		6.7.0
-PYQT63D_VERSION=	6.7.0
-PYQT5CHART_VERSION=	5.15.6
-PYQT6CHART_VERSION=	6.7.0
-PYQT6DATAVIS3D_VERSION=	6.7.0
-PYQT5NETWORKAUTH_VERSION=5.15.5
-PYQT6NETWORKAUTH_VERSION=6.7.0
-PYQT5WEBENGINE_VERSION=	5.15.6
-PYQT6WEBENGINE_VERSION=	6.7.0
-PYQT5SIP_VERSION=	12.13.0
-PYQT6SIP_VERSION=	13.6.0
+
+# Qt version-agnostic components
 # PyQt-builder >= 1.16.0 requires setuptools >= 64
 # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270358
-PYQTBUILDER_VERSION=	1.15.4
-
-PYQT5_DISTNAME=		PyQt5-${PYQT5_VERSION}
-PYQT6_DISTNAME=		PyQt6-${PYQT6_VERSION}
-PYQT5SIP_DISTNAME=	PyQt5_sip-${PYQT5SIP_VERSION}
-PYQT6SIP_DISTNAME=	PyQt6_sip-${PYQT6SIP_VERSION}
-PYQT63D_DISTNAME=	PyQt6_3D-${PYQT63D_VERSION}
-PYQT5CHART_DISTNAME=	PyQtChart-${PYQT5CHART_VERSION}
-PYQT6CHART_DISTNAME=	PyQt6_Charts-${PYQT6CHART_VERSION}
-PYQT6DATAVIS3D_DISTNAME=	PyQt6_DataVisualization-${PYQT6DATAVIS3D_VERSION}
+PYQTBUILDER_VERSION=		1.15.4
+QSCI2_VERSION=			2.14.1
+SIP_VERSION=			6.8.3	# ,1
+
+# Qt 5 components
+PYQT5SIP_VERSION=		12.13.0
+PYQT5_VERSION=			5.15.10
+PYQT5CHART_VERSION=		5.15.6
+PYQT5NETWORKAUTH_VERSION=	5.15.5
+PYQT5WEBENGINE_VERSION=		5.15.6
+
+# Qt 6 components
+PYQT6SIP_VERSION=		13.6.0
+PYQT6_VERSION=			6.7.0
+PYQT63D_VERSION=		6.7.0
+PYQT6CHART_VERSION=		6.7.0
+PYQT6DATAVIS3D_VERSION=		6.7.0
+PYQT6NETWORKAUTH_VERSION=	6.7.0
+PYQT6WEBENGINE_VERSION=		6.7.0
+
+# Qt version-agnostic components
+#PYQTBUILDER_DISTNAME=		pyqt_builder-${PYQTBUILDER_VERSION}
+QSCI2_DISTNAME=			QScintilla_src-${QSCI2_VERSION}
+
+# Qt 5 components
+PYQT5SIP_DISTNAME=		PyQt5_sip-${PYQT5SIP_VERSION}
+PYQT5_DISTNAME=			PyQt5-${PYQT5_VERSION}
+PYQT5CHART_DISTNAME=		PyQtChart-${PYQT5CHART_VERSION}
 PYQT5NETWORKAUTH_DISTNAME=	PyQtNetworkAuth-${PYQT5NETWORKAUTH_VERSION}
-PYQT6NETWORKAUTH_DISTNAME=	PyQt6_NetworkAuth-${PYQT6NETWORKAUTH_VERSION}
 PYQT5WEBENGINE_DISTNAME=	PyQtWebEngine-${PYQT5WEBENGINE_VERSION}
+
+# Qt 6 components
+PYQT6SIP_DISTNAME=		PyQt6_sip-${PYQT6SIP_VERSION}
+PYQT6_DISTNAME=			PyQt6-${PYQT6_VERSION}
+PYQT63D_DISTNAME=		PyQt6_3D-${PYQT63D_VERSION}
+PYQT6CHART_DISTNAME=		PyQt6_Charts-${PYQT6CHART_VERSION}
+PYQT6DATAVIS3D_DISTNAME=	PyQt6_DataVisualization-${PYQT6DATAVIS3D_VERSION}
+PYQT6NETWORKAUTH_DISTNAME=	PyQt6_NetworkAuth-${PYQT6NETWORKAUTH_VERSION}
 PYQT6WEBENGINE_DISTNAME=	PyQt6_WebEngine-${PYQT6WEBENGINE_VERSION}
+
 PYQT5_DISTINFO_FILE=	${.CURDIR:H:H}/devel/${PYQT_RELNAME}/distinfo
 PYQT6_DISTINFO_FILE=	${.CURDIR:H:H}/devel/${PYQT_RELNAME}/distinfo
-QSCI2_DISTNAME=		QScintilla_src-${QSCI2_VERSION}
+
 PYQT5_LICENSE=		GPLv3
 PYQT6_LICENSE=		GPLv3
 
@@ -134,23 +153,26 @@ _USE_QSCINTILLA=	qscintilla2
 _USE_PYQTBUILDER=	qtbuilder
 
 # Unversioned variables for the rest of the file
-PYQT_VERSION=		${PYQT${_PYQT_VERSION}_VERSION}
-PYQT3D_VERSION=		${PYQT${_PYQT_VERSION}3D_VERSION}
-PYQTCHART_VERSION=	${PYQT${_PYQT_VERSION}CHART_VERSION}
-PYQTDATAVIS3D_VERSION=	${PYQT${_PYQT_VERSION}DATAVIS3D_VERSION}
-PYQTNETWORKAUTH_VERSION=${PYQT${_PYQT_VERSION}NETWORKAUTH_VERSION}
-PYQTWEBENGINE_VERSION=${PYQT${_PYQT_VERSION}WEBENGINE_VERSION}
-PYQT_RELNAME=		py-qt${_PYQT_VERSION}
-PYQT_PY_RELNAME=	${PYTHON_PKGNAMEPREFIX}qt${_PYQT_VERSION}
-PYQT_MASTERSITES=	${MASTER_SITES_PYQT${_PYQT_VERSION}}
-PYQT_DISTNAME=		${PYQT${_PYQT_VERSION}_DISTNAME}
-PYQT3D_DISTNAME=	${PYQT${_PYQT_VERSION}3D_DISTNAME}
-PYQTCHART_DISTNAME=	${PYQT${_PYQT_VERSION}CHART_DISTNAME}
-PYQTDATAVIS3D_DISTNAME=	${PYQT${_PYQT_VERSION}DATAVIS3D_DISTNAME}
-PYQTNETWORKAUTH_DISTNAME=${PYQT${_PYQT_VERSION}NETWORKAUTH_DISTNAME}
-PYQTWEBENGINE_DISTNAME=${PYQT${_PYQT_VERSION}WEBENGINE_DISTNAME}
-PYQT_DISTINFO_FILE=	${PYQT${_PYQT_VERSION}_DISTINFO_FILE}
-PYQT_LICENSE=		${PYQT${_PYQT_VERSION}_LICENSE}
+PYQT_VERSION=			${PYQT${_PYQT_VERSION}_VERSION}
+PYQT3D_VERSION=			${PYQT${_PYQT_VERSION}3D_VERSION}
+PYQTCHART_VERSION=		${PYQT${_PYQT_VERSION}CHART_VERSION}
+PYQTDATAVIS3D_VERSION=		${PYQT${_PYQT_VERSION}DATAVIS3D_VERSION}
+PYQTNETWORKAUTH_VERSION=	${PYQT${_PYQT_VERSION}NETWORKAUTH_VERSION}
+PYQTWEBENGINE_VERSION=		${PYQT${_PYQT_VERSION}WEBENGINE_VERSION}
+
+PYQT_RELNAME=			py-qt${_PYQT_VERSION}
+PYQT_PY_RELNAME=		${PYTHON_PKGNAMEPREFIX}qt${_PYQT_VERSION}
+PYQT_MASTERSITES=		${MASTER_SITES_PYQT${_PYQT_VERSION}}
+
+PYQT_DISTNAME=			${PYQT${_PYQT_VERSION}_DISTNAME}
+PYQT3D_DISTNAME=		${PYQT${_PYQT_VERSION}3D_DISTNAME}
+PYQTCHART_DISTNAME=		${PYQT${_PYQT_VERSION}CHART_DISTNAME}
+PYQTDATAVIS3D_DISTNAME=		${PYQT${_PYQT_VERSION}DATAVIS3D_DISTNAME}
+PYQTNETWORKAUTH_DISTNAME=	${PYQT${_PYQT_VERSION}NETWORKAUTH_DISTNAME}
+PYQTWEBENGINE_DISTNAME=		${PYQT${_PYQT_VERSION}WEBENGINE_DISTNAME}
+
+PYQT_DISTINFO_FILE=		${PYQT${_PYQT_VERSION}_DISTINFO_FILE}
+PYQT_LICENSE=			${PYQT${_PYQT_VERSION}_LICENSE}
 
 # PATH (see note about epochs, above)
 py-sip_PATH=			${PYTHON_PKGNAMEPREFIX}sip>=${SIP_VERSION},1
@@ -183,8 +205,8 @@ SIP=		${LOCALBASE}/bin/sip-build-${PYTHON_VER}
 
 # Relative directories
 _VERSION_SUBDIR_REL=	PyQt${_PYQT_VERSION}/${PYTHON_VER}
-_APIDIR_REL=	share/${_VERSION_SUBDIR_REL}/qsci
-_DOCDIR_REL=	share/doc/${_VERSION_SUBDIR_REL}
+_APIDIR_REL=		share/${_VERSION_SUBDIR_REL}/qsci
+_DOCDIR_REL=		share/doc/${_VERSION_SUBDIR_REL}
 _EXAMPLEDIR_REL=	share/examples/${_VERSION_SUBDIR_REL}
 _SIPDIR_REL=		PyQt${_PYQT_VERSION}/bindings
 _DESIGNERDIR_REL=	${QT_PLUGINDIR_REL}/designer/${_VERSION_SUBDIR_REL}
@@ -251,7 +273,7 @@ _USE_PYQT_ALL+=				${_USE_SIP_ALL} \
 					${_USE_QSCINTILLA} \
 					${_USE_PYQTBUILDER}
 .  for comp in ${_USE_PYQT_ALL:O:u}
-_USE_PYQT_ALL_SUFFIXED+=		py-${comp} py-${comp}:build py-${comp}:run py-${comp}:test
+_USE_PYQT_ALL_PREFIXED+=		py-${comp} py-${comp}:build py-${comp}:run py-${comp}:test
 py-${comp}_BUILD_DEPENDS?=		${py-${comp}_PATH}:${py-${comp}_PORT}@${PY_FLAVOR}
 py-${comp}_RUN_DEPENDS?=		${py-${comp}_PATH}:${py-${comp}_PORT}@${PY_FLAVOR}
 py-${comp}_TEST_DEPENDS?=		${py-${comp}_PATH}:${py-${comp}_PORT}@${PY_FLAVOR}
@@ -260,9 +282,9 @@ py-${comp}_run_RUN_DEPENDS?=		${py-${comp}_RUN_DEPENDS}
 py-${comp}_test_TEST_DEPENDS?=		${py-${comp}_TEST_DEPENDS}
 .  endfor
 
-_USE_PYQT=      ${USE_PYQT:O:u}
+_USE_PYQT=	${USE_PYQT:O:u}
 .  for comp in ${_USE_PYQT}
-.    if ${_USE_PYQT_ALL_SUFFIXED:Mpy-${comp}}
+.    if ${_USE_PYQT_ALL_PREFIXED:Mpy-${comp}}
 BUILD_DEPENDS+=		${py-${comp:S/:/_/}_BUILD_DEPENDS}
 RUN_DEPENDS+=		${py-${comp:S/:/_/}_RUN_DEPENDS}
 TEST_DEPENDS+=		${py-${comp:S/:/_/}_TEST_DEPENDS}