aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucio Sauer <watermanpaint@posteo.net>2023-12-11 14:26:03 +0100
committerLucio Sauer <watermanpaint@posteo.net>2023-12-11 14:26:03 +0100
commitde148e5714e6c52f5b08e25e9c7c1fda822927c3 (patch)
tree95baa37d9fbbf02dc5996cc7a4b339499751a783 /app-misc
parentgames-rpg/open-adventure: add || die to sed calls (diff)
downloadguru-de148e5714e6c52f5b08e25e9c7c1fda822927c3.tar.gz
guru-de148e5714e6c52f5b08e25e9c7c1fda822927c3.tar.bz2
guru-de148e5714e6c52f5b08e25e9c7c1fda822927c3.zip
app-misc/anki-bin: add 23.10.1-r1, drop 23.10.1
Fix runtime Qt detection mechanism: Prior to this commit, Anki would select its Qt6 GUI at runtime, if it successfully imported PyQt6. Anki's choice of GUI framework should only depend on the qt6 USE flag. Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/anki-bin/anki-bin-23.10.1-r1.ebuild (renamed from app-misc/anki-bin/anki-bin-23.10.1.ebuild)13
1 files changed, 11 insertions, 2 deletions
diff --git a/app-misc/anki-bin/anki-bin-23.10.1.ebuild b/app-misc/anki-bin/anki-bin-23.10.1-r1.ebuild
index 697a1f392..247ebe6f0 100644
--- a/app-misc/anki-bin/anki-bin-23.10.1.ebuild
+++ b/app-misc/anki-bin/anki-bin-23.10.1-r1.ebuild
@@ -19,8 +19,8 @@ SRC_URI="
https://raw.githubusercontent.com/ankitects/anki/${PV}/qt/bundle/lin/anki.1 -> ${P}.1
https://raw.githubusercontent.com/ankitects/anki/${PV}/qt/bundle/lin/anki.desktop -> ${P}.desktop
https://raw.githubusercontent.com/ankitects/anki/${PV}/qt/bundle/lin/anki.png -> ${P}.png
- https://raw.githubusercontent.com/ankitects/anki/${PV}/qt/bundle/lin/anki.xpm -> ${P}.xpm
https://raw.githubusercontent.com/ankitects/anki/${PV}/qt/bundle/lin/anki.xml -> ${P}.xml
+ https://raw.githubusercontent.com/ankitects/anki/${PV}/qt/bundle/lin/anki.xpm -> ${P}.xpm
"
# The program itself is licensed under AGPL-3+ with contributed portions licensed
@@ -110,13 +110,22 @@ The latter option has additional runtime dependencies. Please take a look
at this package's 'optional runtime features' for a complete listing.
In an early 2024 update, ENABLE_QT5_COMPAT will be removed, so this is not a
-long term solution.
+long-term solution.
Anki's user manual is located online at https://docs.ankiweb.net/
Anki's add-on developer manual is located online at
https://addon-docs.ankiweb.net/
"
+src_prepare() {
+ default
+ # Anki's Qt detection mechanism falls back to Qt5 Python bindings, if Qt6
+ # Python bindings don't get imported successfully.
+ if ! use qt6; then
+ sed -i "s/import PyQt6/raise ImportError/" aqt/qt/__init__.py || die
+ fi
+}
+
src_install() {
python_domodule anki {,_}aqt *.dist-info
printf "#!/usr/bin/python3\nimport sys;from aqt import run;sys.exit(run())" > runanki