git: c289bc627850 - main - Uses/pyqt.mk: repair PORTEPOCH of py-sip dependency

From: Adriaan de Groot <adridg_at_FreeBSD.org>
Date: Sun, 29 May 2022 11:22:03 UTC
The branch main has been updated by adridg:

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

commit c289bc6278504bd2dd455851a5de8de4bf48af4e
Author:     Adriaan de Groot <adridg@FreeBSD.org>
AuthorDate: 2022-05-29 11:02:53 +0000
Commit:     Adriaan de Groot <adridg@FreeBSD.org>
CommitDate: 2022-05-29 11:16:44 +0000

    Uses/pyqt.mk: repair PORTEPOCH of py-sip dependency
    
    When using BUILD_DEPENDS with a dependency-version, as described
    in section 5.9.9 of the Porters Handbook, a desired-version can be
    compared with an installed-version, e.g.:
    
            py38-sip>=6.5.1:devel/py-sip@py38
    
    The version is compared fully with all the ports-versioning
    parts included. That includes the PORTEPOCH, which isn't
    visible (because =0 in the specification above). Since py-sip
    was epoched at some point, the installed version of py-sip might
    be this:
    
            py38-sip-5.5.0,1               Python to C and C++ bindings generator
    
    Because of the epoch, the version 5.5.0,1 > 6.5.1, even though
    visually it seems like it wouldn't be. Massage the dependency generation
    in pyqt.mk to take that epoch into account.
    
    PR:             262129
    Reported by:    Rafael Grether
---
 Mk/Uses/pyqt.mk | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/Mk/Uses/pyqt.mk b/Mk/Uses/pyqt.mk
index 62013f08c376..a421a438056b 100644
--- a/Mk/Uses/pyqt.mk
+++ b/Mk/Uses/pyqt.mk
@@ -63,7 +63,15 @@ MASTER_SITES_QSCI2=	RIVERBANK/QScintilla/${PORTVERSION} \
 			SF/pyqt/QScintilla2/QScintilla-${PORTVERSION} \
 			GENTOO
 
-SIP_VERSION=		6.5.1
+# 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).
+# Adding the epoch directly into the version here cannot be done,
+# because the DISTVERSION of each of these ports is obtained from the
+# *_VERSION variable (and PORTEPOCH is set in each individual port).
+#
+# 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.5.1	# ,1
 SIP4_VERSION=		4.19.25
 QSCI2_VERSION=		2.13.2
 PYQT5_VERSION=		5.15.6
@@ -99,8 +107,8 @@ PYQT_DISTNAME=		${PYQT${_PYQT_VERSION}_DISTNAME}
 PYQT_DISTINFO_FILE=	${PYQT${_PYQT_VERSION}_DISTINFO_FILE}
 PYQT_LICENSE=		${PYQT${_PYQT_VERSION}_LICENSE}
 
-# PATH
-py-sip_PATH=			${PYTHON_PKGNAMEPREFIX}sip>=${SIP_VERSION}
+# PATH (see note about epochs, above)
+py-sip_PATH=			${PYTHON_PKGNAMEPREFIX}sip>=${SIP_VERSION},1
 py-pysip_PATH=			${PYQT_PY_RELNAME}-sip>=${PYQTSIP_VERSION}
 py-qscintilla2_PATH=		${PYQT_PY_RELNAME}-qscintilla2>=${QSCI2_VERSION}
 py-qtbuilder_PATH=		${PYTHON_PKGNAMEPREFIX}qtbuilder>=${PYQTBUILDER_VERSION}