1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-12 18:59:50 +03:00

community/anki: upgrade to 25.07.2

This commit is contained in:
Callum Andrew 2025-07-07 19:52:47 +10:00 committed by Patrycja Rosa
parent f57af699cd
commit a13c14c3f8
3 changed files with 44 additions and 19 deletions

View file

@ -2,15 +2,15 @@
# Contributor: Frank Oltmanns <alpine@oltmanns.dev>
maintainer="Callum Andrew <contact@candrew.net>"
pkgname=anki
pkgver=25.02.7
pkgver=25.07.2
pkgrel=0
# Remember to update the following lines when updating the pkgver
# 1. checkout the release tag
# 2. anki -> git rev-parse --short=8 $pkgver^{}
# 3. ftl -> git submodule
_tags_ftl_core="0fe0162f4a18e8ef2fbac1d9a33af8e38cf7260e"
_tags_ftl_desktop="17216b03db7249600542e388bd4ea124478400e5"
_anki_commit="98253c81"
_tags_ftl_core="3d04bcbf7fefca0007bc9db307409d88210995d8"
_tags_ftl_desktop="c65a9587b1f18931986bdf145872e8e4c44c5c82"
_anki_commit="3adcf05c"
# This APKBUILD and the patches use the PKGBUILD for Anki 23.10 as
# a basis.
@ -46,6 +46,7 @@ makedepends="
py3-wheel
rsync
samurai
uv
yarn
"
@ -72,13 +73,14 @@ depends="
qt6-qtsvg
py3-send2trash
"
subpackages="$pkgname-pyc"
subpackages="$pkgname-doc $pkgname-pyc"
source="
anki-$pkgver.tar.gz::https://github.com/ankitects/anki/archive/refs/tags/$pkgver.tar.gz
anki-core-i18n-$_tags_ftl_core.tar.gz::https://github.com/ankitects/anki-core-i18n/archive/$_tags_ftl_core.tar.gz
anki-desktop-ftl-$_tags_ftl_desktop.tar.gz::https://github.com/ankitects/anki-desktop-ftl/archive/$_tags_ftl_desktop.tar.gz
no-update.patch
strip-formatter-deps.patch
strip-python-pip-system-certs.patch
strip-type-checking-deps.patch
"
@ -126,10 +128,12 @@ prepare() {
build() {
export YARN_CACHE_FOLDER="$srcdir/$_caches_yarn" # do not litter in ~
#use local binaries instead of downloading them
export PYTHON_BINARY=$(which python3)
export PROTOC_BINARY=$(which protoc)
# Use local binaries instead of downloading them
export NODE_BINARY=$(which node)
export PROTOC_BINARY=$(which protoc)
export PYTHON_BINARY=$(which python3)
export UV_BINARY=$(which uv)
export UV_PYTHON=$(which python3)
export YARN_BINARY=$(which yarn)
export CARGO_HOME="$srcdir/$_caches_cargo" # do not litter in ~
@ -147,15 +151,20 @@ package() {
python3 -m installer -d "$pkgdir" $file
done
install -Dm644 qt/bundle/lin/anki.desktop "$pkgdir"/usr/share/applications/anki.desktop
install -Dm644 qt/bundle/lin/anki.png "$pkgdir"/usr/share/pixmaps/anki.png
cd qt/launcher/lin
install -Dm644 anki.desktop "$pkgdir"/usr/share/applications/anki.desktop
install -Dm644 anki.png "$pkgdir"/usr/share/pixmaps/anki.png
install -Dm644 anki.xpm "$pkgdir"/usr/share/pixmaps/anki.xpm
install -Dm644 anki.1 "$pkgdir"/usr/share/man/man1/anki.1
install -Dm644 anki.xml "$pkgdir"/usr/share/mime/application/anki.xml
}
sha512sums="
3d2464d3be920df8c8f35b86d1a0b1d26bf3a88a9d416195c7ab0aba748b91dcc02d357d7d1eaf1bb8f52b2a044083176c8db36608fd34de821a33ce86994d58 anki-25.02.7.tar.gz
c72eaea9e0f350d092a44f7623a7cfdcb74ff99a97ca4b53c51b1b26af387c9c6cd64bfca3dc4577c14c3ee4040b8ce1a7a50f2e209b0fa47c5297f97c92a910 anki-core-i18n-0fe0162f4a18e8ef2fbac1d9a33af8e38cf7260e.tar.gz
6d91607c6b0805e6dfce8a93dbf46ac945e9b1631aa054cb98e513d7a6da64d905035b8da8ea5d10c0d700a0aa96b056748d956342fe4ddf7232f7f7540ee88a anki-desktop-ftl-17216b03db7249600542e388bd4ea124478400e5.tar.gz
061e872d41ccdd89a40dd08cb49fcaced80b3f3cf23c58e80d54fbc90ca6b5734acc0f946bc0b190f2ae288b089f6a6edfb31809366b634a5299d6fea0b703ca anki-25.07.2.tar.gz
dbfc9c93b70c39c52748c3a913a88dd08292238c0dcad42eb675671b07c1020858e95556cb64bfaf5e7c9610fcda580e99b5e07b65dbe433842919f1301c528e anki-core-i18n-3d04bcbf7fefca0007bc9db307409d88210995d8.tar.gz
06343bb975c5a6bfa39b437d4535667d4946e231285ed0f641d2c93c6b80a665f59609c3319207939e615de138a077ebf3c7d7b024df0dd0c55cf9effa09f1f4 anki-desktop-ftl-c65a9587b1f18931986bdf145872e8e4c44c5c82.tar.gz
36c3bddb5de84f0f5eebe46b506b9723ecc80dd69281b3d2ffc9842fa2db181ececd8232ae0b3366bcfd5cb68a4d760abcadd3dada2a7ce2d2da26586a132e09 no-update.patch
f71b45b08b8f05d98faab3a88d7ba2847a948a12ca26c682d58541dc423ad72ae8aac5b34155472869ebbf195e5e5c488cfc4e640df7247c7674e5dfad053d60 strip-formatter-deps.patch
25d03a5d22a8e2aa59c1ec5aa863704b01f9598714c3795b8fe84a71291a651adf246b0e3b731ba72a7b8b77523e3946fe1ae2d9547477712e1031892a884c70 strip-formatter-deps.patch
0341faba5f23023d4a1774704daa6e805af4932a79ddff256b436de9071d9a3460d114ef24d4ae0bc53e59a4e1e595eb4d8b9c0ce7e923f1b45797b6177da036 strip-python-pip-system-certs.patch
2c7d1ab46d81e65f22e63cb5af37daef27a78d348f240570f9250730d6b33311670876027fd1c54d4c69922c18a7458e82211cb232e98591e182ac11c49877db strip-type-checking-deps.patch
"

View file

@ -1,9 +1,9 @@
Remove dependency on dev-python/black used to format the generated hooks.py
file as it's not relevant in a packaging use case.
Remove dependency on dev-python/ruff used to format the generated hooks.py
file as it's not relevant in a packaging use case.
--- a/pylib/tools/hookslib.py
+++ b/pylib/tools/hookslib.py
@@ -208,4 +208,3 @@ def write_file(path: str, hooks: list[Hook], prefix: str, suffix: str):
os.environ["USERPROFILE"] = os.environ["HOME"]
@@ -205,4 +205,3 @@
with open(path, "wb") as file:
file.write(code.encode("utf8"))
- subprocess.run([sys.executable, "-m", "black", "-q", path], check=True)
- subprocess.run([sys.executable, "-m", "ruff", "format", "-q", path], check=True)

View file

@ -0,0 +1,16 @@
Remove pip_system_certs import as Alpine provides this in py3-certifi
--- a/qt/aqt/__init__.py
+++ b/qt/aqt/__init__.py
@@ -16,13 +16,6 @@ if "ANKI_FIRST_RUN" in os.environ:
first_run_setup()
-try:
- import pip_system_certs.wrapt_requests
-except ModuleNotFoundError:
- print(
- "Python module pip_system_certs is not installed. System certificate store and custom SSL certificates may not work. See: https://github.com/ankitects/anki/issues/3016"
- )
-
if sys.version_info[0] < 3 or sys.version_info[1] < 9:
raise Exception("Anki requires Python 3.9+")