Thanks, pushed an update! If something goes wrong, please tell me.
Search Criteria
Package Details: anki-git r11894.f927aa578-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/anki-git.git (read-only, click to copy) |
---|---|
Package Base: | anki-git |
Description: | Helps you remember facts (like words/phrases in a foreign language) efficiently |
Upstream URL: | https://github.com/ankitects/anki |
Keywords: | anki memorise memory study |
Licenses: | AGPL-3.0-or-later |
Conflicts: | anki, anki-bin, anki-official-binary-bundle, anki20 |
Provides: | anki |
Submitter: | degeberg |
Maintainer: | blackthorne |
Last Packager: | blackthorne |
Votes: | 25 |
Popularity: | 0.000004 |
First Submitted: | 2017-02-12 11:51 (UTC) |
Last Updated: | 2025-07-07 06:18 (UTC) |
Dependencies (31)
- python (python37AUR)
- python-beautifulsoup4
- python-decorator
- python-distro
- python-flask
- python-flask-cors
- python-jsonschema
- python-markdown
- python-orjson (python-orjson-gitAUR)
- python-protobuf (python-protobuf-gitAUR, python-protobuf-21AUR)
- python-pyaudio (python-pyaudio-gitAUR)
- python-pyqt6 (python-pyqt6-pre-releaseAUR)
- python-pyqt6-webengine
- python-pyqtwebengine (python-pyqt5-webengine)
- python-pysocks
- python-requests
- python-send2trash
- python-waitress
- python-wheel
- cargo (rust-nightly-binAUR, rust-gitAUR, rust-beta-binAUR, rustup-stubAUR, rustup-gitAUR, rust, rustup) (make)
- clang (llvm-gitAUR, clang-minimal-gitAUR, clang17-binAUR) (make)
- git (git-gitAUR, git-glAUR) (make)
- libxcrypt-compat (make)
- lld (llvm-gitAUR) (make)
- ninja (ninja-kitwareAUR, ninja-fuchsia-gitAUR, ninja-gitAUR, ninja-jobserverAUR, ninja-memAUR, ninja-noemacs-gitAUR) (make)
- npm (python-nodejs-wheelAUR, corepackerAUR) (make)
- python-pip (make)
- rsync (rsync-gitAUR, rsync-reflink-gitAUR, rsync-reflinkAUR) (make)
- lame (lame-svnAUR, lame-altivecAUR) (optional) – record sound
- mplayer (mplayer-gui-svnAUR) (optional) – play sound
- mpv (mpv-light-pulseAUR, mpv-gitAUR, mpv-build-gitAUR, mpv-full-luajit-gitAUR, mpv-amd-full-gitAUR, libmpv-gitAUR, mpv-fullAUR, mpv-full-gitAUR, mpv-full-build-gitAUR) (optional) – play sound. prefered over mplayer
Required by (2)
- kindle2anki-git (requires anki)
- subs2srs (requires anki) (optional)
Sources (2)
Latest Comments
« First ‹ Previous 1 2 3 4 5 6 7 8 9 .. 13 Next › Last »
DarkShadow44 commented on 2022-11-27 21:17 (UTC)
tobias.predel commented on 2022-11-27 20:34 (UTC) (edited on 2022-11-27 20:38 (UTC) by tobias.predel)
Anki has recently changed its build system to Ninja.
I applied something like the following changes to adapt the PKGBUILD in compliance with development.md:
diff --git a/PKGBUILD b/PKGBUILD
index 0fbf561..9c7182f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,15 +8,15 @@
# Contributor: Michael 'manveru' Fellinger <m.fellinger@gmail.com>
# Contributor: Dave Pretty <david dot pretty at gmail dot com>
pkgname=anki-git
pkgver=r9412.bc6ede7c1
pkgrel=1
pkgdesc="Helps you remember facts (like words/phrases in a foreign language) efficiently"
url="http://ankisrs.net/"
license=('AGPL3')
arch=('any')
provides=('anki')
conflicts=('anki' 'anki20' 'anki-official-binary-bundle')
depends=(
# anki and aqt
'python-beautifulsoup4'
@@ -36,22 +36,20 @@ depends=(
'python-markdown'
'python-jsonschema'
'python-pyaudio'
- 'python-pyqtwebengine'
'python-flask'
'python-flask-cors'
'python-waitress'
- 'python-pyqt5'
+ 'python-pyqt6'
+ 'python-pyqt6-webengine'
)
makedepends=(
'git'
'rsync'
-
- 'bazel'
+ 'ninja'
'clang'
'maturin'
'rust'
-
'python-pip'
'python-mypy-protobuf'
'npm'
@@ -65,13 +63,11 @@ optdepends=(
)
source=(
$pkgname::git+https://github.com/dae/anki.git
-
- #ankitects-anki-core-i18n-master.tar.gz::https://github.com/ankitects/anki-core-i18n/tarball/master
- #ankitects-anki-desktop-ftl-master.tar.gz::https://github.com/ankitects/anki-desktop-ftl/tarball/master
- #ankitects-anki-desktop-i18n-master.tar.gz::https://github.com/ankitects/anki-desktop-i18n/tarball/master
)
sha512sums=('SKIP')
pkgver() {
cd "$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
@@ -80,34 +76,21 @@ pkgver() {
prepare() {
cd "$pkgname"
- # Disable foring a specific bazel version to build with
- rm .bazelversion
-
- # Work around option that got removed in bazel
- sed -i 's/--experimental_no_product_name_out_symlink//g' .bazelrc
-
- # Put translations in place.
- #ln -sf "$srcdir"/ankitects-anki-core-i18n-*/ rslib/ftl/repo
- #ln -sf "$srcdir"/ankitects-anki-desktop-ftl-*/ qt/ftl/repo
- #ln -sf "$srcdir"/ankitects-anki-desktop-i18n-*/ qt/po/repo
-
- echo "build --action_env=PYO3_PYTHON=/usr/bin/python3" > "$srcdir/$pkgname/user.bazelrc"
}
build() {
cd "$pkgname"
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
- export JAVA_HOME=/usr/lib/jvm/java-11-openjdk
./tools/build
}
package() {
cd "$pkgname"
- PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps .bazel/out/dist/anki-*.whl .bazel/out/dist/aqt-*.whl
+ PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps out/wheels/*.whl
install -Dm755 qt/runanki.py "$pkgdir"/usr/bin/anki
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
}
Hope this helps.
york commented on 2022-09-17 23:53 (UTC)
Hi @DarkShadow44,
Just saw the pinned comments, and tried:
rm -rf ./cache/bazel
and then the build succeeded. Thank you for the help.
york commented on 2022-09-17 23:40 (UTC)
@DarkShadow44. Yes I did clean the cache from "~/.cache/yay/anki-git" before running
yay -S anki-git
Also, I just tried it again hopping to have different results as I just upgraded my Arch Linux system lately, but I still got the exact same errors.
DarkShadow44 commented on 2022-08-16 21:37 (UTC)
@york Did you try cleaning the cache from "~/.cache/yay/anki-git/"?
york commented on 2022-08-15 19:43 (UTC) (edited on 2022-08-15 19:46 (UTC) by york)
I wasn't able to install anki-git. The following was the full log. Any help would be greatly appreciated.
$ uname -a
Linux xxxxx 5.19.1-arch2-1 #1 SMP PREEMPT_DYNAMIC Thu, 11 Aug 2022 16:06:13 +0000 x86_64 GNU/Linux
$ yay -S anki-git
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1] anki-git-r9412.bc6ede7c1-1
:: (1/1) Downloaded PKGBUILD: anki-git
1 anki-git (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
:: (1/1) Parsing SRCINFO: anki-git
==> Making package: anki-git r9412.bc6ede7c1-1 (Mon 15 Aug 2022 03:35:36 PM EDT)
==> Retrieving sources...
-> Cloning anki-git git repo...
Cloning into bare repository '~/.cache/yay/anki-git/anki-git'...
remote: Enumerating objects: 130342, done.
remote: Counting objects: 100% (1246/1246), done.
remote: Compressing objects: 100% (473/473), done.
remote: Total 130342 (delta 839), reused 1092 (delta 772), pack-reused 129096
Receiving objects: 100% (130342/130342), 70.12 MiB | 51.69 MiB/s, done.
Resolving deltas: 100% (102280/102280), done.
==> Validating source files with sha512sums...
anki-git ... Skipped
==> Making package: anki-git r9412.bc6ede7c1-1 (Mon 15 Aug 2022 03:35:45 PM EDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Updating anki-git git repo...
==> Validating source files with sha512sums...
anki-git ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
-> Creating working copy of anki-git git repo...
Cloning into 'anki-git'...
done.
==> Starting prepare()...
==> Starting pkgver()...
==> Updated version: anki-git r9576.9ca13ca3b-1
==> Sources are ready.
==> Making package: anki-git r9576.9ca13ca3b-1 (Mon 15 Aug 2022 03:35:49 PM EDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting pkgver()...
==> Starting build()...
Starting local Bazel server and connecting to it...
INFO: Analyzed target //:wheels (723 packages loaded, 31483 targets configured).
INFO: Found 1 target...
Target //:wheels up-to-date:
.bazel/bin/wheels.tar
INFO: Elapsed time: 14.626s, Critical Path: 1.87s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
wheels are in .bazel/out/dist
==> Entering fakeroot environment...
==> Starting package()...
Processing ./.bazel/out/dist/anki-2.1.51-cp39-abi3-manylinux_2_28_x86_64.whl
Processing ./.bazel/out/dist/anki-2.1.55-cp39-abi3-manylinux_2_28_x86_64.whl
Processing ./.bazel/out/dist/aqt-2.1.51-py3-none-any.whl
Processing ./.bazel/out/dist/aqt-2.1.55-py3-none-any.whl
ERROR: Cannot install anki 2.1.51 (from ~/.cache/yay/anki-git/src/anki-git/.bazel/out/dist/anki-2.1.51-cp39-abi3-manylinux_2_28_x86_64.whl) and anki 2.1.55 (from ~/.cache/yay/anki-git/src/anki-git/.bazel/out/dist/anki-2.1.55-cp39-abi3-manylinux_2_28_x86_64.whl) because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested anki 2.1.51 (from ~/.cache/yay/anki-git/src/anki-git/.bazel/out/dist/anki-2.1.51-cp39-abi3-manylinux_2_28_x86_64.whl)
The user requested anki 2.1.55 (from ~/.cache/yay/anki-git/src/anki-git/.bazel/out/dist/anki-2.1.55-cp39-abi3-manylinux_2_28_x86_64.whl)
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
==> ERROR: A failure occurred in package().
Aborting...
-> error making: anki-git
DarkShadow44 commented on 2022-04-13 17:13 (UTC)
@homocomputeris Just changing the dependencies to qt6 won't work, since I still will have the qt5 dependencies installed. Not sure how to make anki pick qt6.
homocomputeris commented on 2022-04-13 08:31 (UTC) (edited on 2022-04-13 11:27 (UTC) by homocomputeris)
@DarkShadow44
UPD: Seems that copypaste from/to Anki Qt6 doesn't work.
There is a Qt6 PKGBUILD (with other minor fixes too) in the comments below, which is basically changing qt5 to qt6 counterparts.
It seems that Anki doesn't depend on Java explicitly, because it was replaced by Rust.
Sorry, I did flag this because back then it didn't build even with the bazel cache removed, so it seemed that something had changed on the build process side.
DarkShadow44 commented on 2022-04-11 00:38 (UTC) (edited on 2022-04-11 00:43 (UTC) by DarkShadow44)
@homocomputeris Sure, how do you configure the build for qt6?
Also, please don't flag the package out of date for something addressed as pinned issue.
homocomputeris commented on 2022-04-10 20:07 (UTC)
I suggest switching it to Qt6 since 2.1.50 https://github.com/ankitects/anki/releases/tag/2.1.50
Qt6
The packaged builds now come in separate Qt5 and Qt6 versions. Each version
has some advantages and disadvantages.
The Qt6 version is built with a more recent graphics toolkit. Advantages
include:
Various bugfixes.
Native support for recent Apple Silicon Macs (faster, better battery life).
Compatibility with recent glibc versions on Linux (fixes blank screens).
Better HiDPI support on Linux.
Pinned Comments
blackthorne commented on 2025-05-09 19:48 (UTC)
the PKGBUILD should be compiling now. if not, please let me know. i'll try and clean up the PKGBUILD soon, try and get rid of the AUR dependency, compiler optimization flags, etc.
@hmry thanks for the rust-clang-linking fix.