git: 89fcb25ec43a - main - games/anki: Switch to PyQt6

From: Kai Knoblich <kai_at_FreeBSD.org>
Date: Fri, 10 Mar 2023 05:54:20 UTC
The branch main has been updated by kai:

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

commit 89fcb25ec43a78886b86a0a82eb46e74d131d8f1
Author:     Kai Knoblich <kai@FreeBSD.org>
AuthorDate: 2023-03-10 05:51:24 +0000
Commit:     Kai Knoblich <kai@FreeBSD.org>
CommitDate: 2023-03-10 05:51:24 +0000

    games/anki: Switch to PyQt6
    
    * This also fixes runtime errors [1] that occur in environments where
      PyQt5 and PyQt6 are present.  In that case Anki prefers PyQt6 over
      PyQt5 upon invocation which leads then to following error:
    
    $ anki
    Running with temporary Qt5 compatibility shims.
    Run with DISABLE_QT5_COMPAT=1 to confirm compatibility with Qt6.
    Traceback (most recent call last):
      File "/usr/local/bin/anki", line 7, in <module>
        import aqt
      File "/usr/local/share/anki/aqt/__init__.py", line 74, in <module>
        from aqt.main import AnkiQt  # isort:skip
      File "/usr/local/share/anki/aqt/main.py", line 20, in <module>
        import aqt.forms
      File "/usr/local/share/anki/aqt/forms/__init__.py", line 1, in <module>
        from . import about
      File "/usr/local/share/anki/aqt/forms/about.py", line 3, in <module>
        from .about_qt6 import *
      File "/usr/local/share/anki/aqt/forms/about_qt6.py", line 45, in <module>
        import icons_rc
    ModuleNotFoundError: No module named 'icons_rc'
    
    * Amend a minor issue while I'm here:  devel/py-sip is only required for
      build, set it accordingly.
    
    * Bump PORTREVISION due changed dependencies and to regenerate the code
      (rust, js) in conjunction with PyQt6.
    
    Reported by:    Robin Dapp, Michael Reim (via e-mail) [1]
    MFH:            No (PyQt6 not present in 2023Q1)
---
 games/anki/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/games/anki/Makefile b/games/anki/Makefile
index 3815dedf7fb3..21315496e251 100644
--- a/games/anki/Makefile
+++ b/games/anki/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	anki
 DISTVERSION=	2.1.54
-PORTREVISION=	11
+PORTREVISION=	12
 # Don't forget to update ${_MY_BUILDHASH} if DISTVERSION changes
 CATEGORIES=	games education python
 MASTER_SITES=	LOCAL/kai/:yarncache \
@@ -51,7 +51,7 @@ RUN_DEPENDS=	lame:audio/lame \
 		${PYTHON_PKGNAMEPREFIX}waitress>0:www/py-waitress@${PY_FLAVOR}
 
 # USES=ssl is required for the compilation of the Rust code
-USES=		cargo desktop-file-utils go:modules,no_targets nodejs:build pyqt:5 \
+USES=		cargo desktop-file-utils go:modules,no_targets nodejs:build pyqt:6 \
 		python:3.9+ shebangfix ssl
 USE_GITHUB=	yes
 GH_ACCOUNT=	ankitects
@@ -71,7 +71,7 @@ GH_TUPLE+=	bazelbuild:bazel-skylib:e59b620:bzlskylib \
 GH_TUPLE+=	evanw:esbuild:${_MY_ESBUILDVER}:esbuild \
 		golang:sys:aa78b53d3365:golang_sys
 
-USE_PYQT=	pyqt5 sip webengine
+USE_PYQT=	pyqt6 sip:build webengine
 
 SHEBANG_FILES=	qt/tools/runanki.system.in