commit:     3ff6ef3e0537174ce85e1f46ecec6118e1dab715
Author:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Sat May  6 22:45:17 2023 +0000
Commit:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
CommitDate: Sat May  6 22:45:17 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3ff6ef3e

app-misc/anki-bin: add QT6 support

* drop unneeded dependencies
* USE !qt6 blocks PyQt6 because of Anki's QT6
  detection mechanism via `try: import PyQt6`

Signed-off-by: Lucio Sauer <watermanpaint <AT> posteo.net>

 app-misc/anki-bin/anki-bin-2.1.62.ebuild | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/app-misc/anki-bin/anki-bin-2.1.62.ebuild 
b/app-misc/anki-bin/anki-bin-2.1.62.ebuild
index 278790c5b..ed8b4e3c3 100644
--- a/app-misc/anki-bin/anki-bin-2.1.62.ebuild
+++ b/app-misc/anki-bin/anki-bin-2.1.62.ebuild
@@ -25,6 +25,7 @@ SRC_URI="
 LICENSE="AGPL-3+ Apache-2.0 BSD CC-BY-3.0 GPL-3+ MIT"
 SLOT="0"
 KEYWORDS="~amd64"
+IUSE="qt6"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
 QA_PREBUILT="usr/lib/*"
@@ -35,16 +36,29 @@ $(python_gen_cond_dep '
        dev-python/distro[${PYTHON_USEDEP}]
        dev-python/beautifulsoup4[${PYTHON_USEDEP}]
        dev-python/requests[${PYTHON_USEDEP}]
-       dev-python/flask[${PYTHON_USEDEP}]
        dev-python/waitress[${PYTHON_USEDEP}]
        dev-python/send2trash[${PYTHON_USEDEP}]
        dev-python/markdown[${PYTHON_USEDEP}]
        dev-python/jsonschema[${PYTHON_USEDEP}]
        dev-python/flask-cors[${PYTHON_USEDEP}]
-       dev-python/PyQt5[${PYTHON_USEDEP}]
-       dev-python/PyQtWebEngine[${PYTHON_USEDEP}]
-       dev-python/stringcase[${PYTHON_USEDEP}]
        ')
+
+!qt6? (
+               $(python_gen_cond_dep '
+                       
>=dev-python/PyQt5-5.15.5[gui,network,webchannel,widgets,${PYTHON_USEDEP}]
+                       >=dev-python/PyQt5-sip-12.9.0[${PYTHON_USEDEP}]
+                       >=dev-python/PyQtWebEngine-5.15.5[${PYTHON_USEDEP}]
+                       ')
+               !dev-python/PyQt6
+         )
+
+qt6? (
+               $(python_gen_cond_dep '
+                       
>=dev-python/PyQt6-6.5.0[dbus,gui,network,opengl,printsupport,webchannel,widgets,${PYTHON_USEDEP}]
+                       >=dev-python/PyQt6-sip-13.5.1[${PYTHON_USEDEP}]
+                       
>=dev-python/PyQt6-WebEngine-6.5.0[widgets,${PYTHON_USEDEP}]
+                       ')
+        )
 "
 RDEPEND="${DEPEND}
        ${PYTHON_DEPS}

Reply via email to