[arch-commits] Commit in anki/repos (9 files)

Johannes Löthberg demize at archlinux.org
Sat May 9 17:18:26 UTC 2020


    Date: Saturday, May 9, 2020 @ 17:18:25
  Author: demize
Revision: 626028

db-move: moved anki from [community-testing] to [community] (x86_64)

Added:
  anki/repos/community-x86_64/0001-Move-aqt_data-to-sys.prefix-share.patch
    (from rev 626027, anki/repos/community-testing-x86_64/0001-Move-aqt_data-to-sys.prefix-share.patch)
  anki/repos/community-x86_64/0002-Remove-bad-build-steps-from-makefiles.patch
    (from rev 626027, anki/repos/community-testing-x86_64/0002-Remove-bad-build-steps-from-makefiles.patch)
  anki/repos/community-x86_64/0003-Compile-.py-s-before-building-wheel.patch
    (from rev 626027, anki/repos/community-testing-x86_64/0003-Compile-.py-s-before-building-wheel.patch)
  anki/repos/community-x86_64/0004-Disable-auto-updates.patch
    (from rev 626027, anki/repos/community-testing-x86_64/0004-Disable-auto-updates.patch)
  anki/repos/community-x86_64/PKGBUILD
    (from rev 626027, anki/repos/community-testing-x86_64/PKGBUILD)
Deleted:
  anki/repos/community-testing-x86_64/
  anki/repos/community-x86_64/0001-Move-aqt_data-to-sys.prefix-share.patch
  anki/repos/community-x86_64/0001-Unfuck-make-build-targets.patch
  anki/repos/community-x86_64/PKGBUILD

-------------------------------------------------------------------+
 /0001-Move-aqt_data-to-sys.prefix-share.patch                     |   45 +++
 /PKGBUILD                                                         |  120 ++++++++++
 community-x86_64/0001-Move-aqt_data-to-sys.prefix-share.patch     |   45 ---
 community-x86_64/0001-Unfuck-make-build-targets.patch             |   93 -------
 community-x86_64/0002-Remove-bad-build-steps-from-makefiles.patch |   66 +++++
 community-x86_64/0003-Compile-.py-s-before-building-wheel.patch   |   43 +++
 community-x86_64/0004-Disable-auto-updates.patch                  |   29 ++
 community-x86_64/PKGBUILD                                         |  106 --------
 8 files changed, 303 insertions(+), 244 deletions(-)

Deleted: community-x86_64/0001-Move-aqt_data-to-sys.prefix-share.patch
===================================================================
--- community-x86_64/0001-Move-aqt_data-to-sys.prefix-share.patch	2020-05-09 17:17:49 UTC (rev 626027)
+++ community-x86_64/0001-Move-aqt_data-to-sys.prefix-share.patch	2020-05-09 17:18:25 UTC (rev 626028)
@@ -1,45 +0,0 @@
-From d7ecae49a8a46e5ad5f25726044a25006fd1f006 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= <johannes at kyriasis.com>
-Date: Sun, 29 Mar 2020 06:24:43 +0200
-Subject: [PATCH] Move aqt_data to sys.prefix/share
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-These files do _not_ belong right under sys.prefix.
-
-Signed-off-by: Johannes Löthberg <johannes at kyriasis.com>
----
- qt/aqt/utils.py | 2 +-
- qt/setup.py     | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/qt/aqt/utils.py b/qt/aqt/utils.py
-index a0e12362..4d8c8c34 100644
---- a/qt/aqt/utils.py
-+++ b/qt/aqt/utils.py
-@@ -21,7 +21,7 @@ from aqt.theme import theme_manager
- 
- def aqt_data_folder() -> str:
-     # wheel install?
--    dir = os.path.join(sys.prefix, "aqt_data")
-+    dir = os.path.join(sys.prefix,"share", "aqt_data")
-     if not os.path.exists(dir) or not os.listdir(dir):
-         # running in place?
-         dir = os.path.join(os.path.dirname(__file__), "..", "aqt_data")
-diff --git a/qt/setup.py b/qt/setup.py
-index 6d498994..d67a8791 100644
---- a/qt/setup.py
-+++ b/qt/setup.py
-@@ -9,7 +9,7 @@ with open("../meta/version") as fh:
- def package_files(directory):
-     entries = []
-     for (path, directories, filenames) in os.walk(directory):
--        entries.append((path, [os.path.join(path, f) for f in filenames]))
-+        entries.append((os.path.join("share", path), [os.path.join(path, f) for f in filenames]))
-     return entries
- 
- 
--- 
-2.26.0
-

Copied: anki/repos/community-x86_64/0001-Move-aqt_data-to-sys.prefix-share.patch (from rev 626027, anki/repos/community-testing-x86_64/0001-Move-aqt_data-to-sys.prefix-share.patch)
===================================================================
--- community-x86_64/0001-Move-aqt_data-to-sys.prefix-share.patch	                        (rev 0)
+++ community-x86_64/0001-Move-aqt_data-to-sys.prefix-share.patch	2020-05-09 17:18:25 UTC (rev 626028)
@@ -0,0 +1,45 @@
+From a0a9ac1aeb8b8678f1102aed81010a901ad8d9e1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= <johannes at kyriasis.com>
+Date: Sun, 29 Mar 2020 06:24:43 +0200
+Subject: [PATCH 1/4] Move aqt_data to sys.prefix/share
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+These files do _not_ belong right under sys.prefix.
+
+Signed-off-by: Johannes Löthberg <johannes at kyriasis.com>
+---
+ qt/aqt/utils.py | 2 +-
+ qt/setup.py     | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/qt/aqt/utils.py b/qt/aqt/utils.py
+index a0e12362..4d8c8c34 100644
+--- a/qt/aqt/utils.py
++++ b/qt/aqt/utils.py
+@@ -21,7 +21,7 @@ from aqt.theme import theme_manager
+ 
+ def aqt_data_folder() -> str:
+     # wheel install?
+-    dir = os.path.join(sys.prefix, "aqt_data")
++    dir = os.path.join(sys.prefix,"share", "aqt_data")
+     if not os.path.exists(dir) or not os.listdir(dir):
+         # running in place?
+         dir = os.path.join(os.path.dirname(__file__), "..", "aqt_data")
+diff --git a/qt/setup.py b/qt/setup.py
+index 38f4e2b7..bdda3baa 100644
+--- a/qt/setup.py
++++ b/qt/setup.py
+@@ -8,7 +8,7 @@ import setuptools
+ def package_files(directory):
+     entries = []
+     for (path, directories, filenames) in os.walk(directory):
+-        entries.append((path, [os.path.join(path, f) for f in filenames]))
++        entries.append((os.path.join("share", path), [os.path.join(path, f) for f in filenames]))
+     return entries
+ 
+ 
+-- 
+2.26.2
+

Deleted: community-x86_64/0001-Unfuck-make-build-targets.patch
===================================================================
--- community-x86_64/0001-Unfuck-make-build-targets.patch	2020-05-09 17:17:49 UTC (rev 626027)
+++ community-x86_64/0001-Unfuck-make-build-targets.patch	2020-05-09 17:18:25 UTC (rev 626028)
@@ -1,93 +0,0 @@
-From 3dc54977a9cc86175bf47b3586178c3d86ad53d5 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= <johannes at kyriasis.com>
-Date: Sun, 29 Mar 2020 05:54:00 +0200
-Subject: [PATCH] Unfuck make build targets
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Johannes Löthberg <johannes at kyriasis.com>
----
- pylib/Makefile | 12 ++----------
- qt/Makefile    | 10 +---------
- rspy/Makefile  |  4 ----
- 3 files changed, 3 insertions(+), 23 deletions(-)
-
-diff --git a/pylib/Makefile b/pylib/Makefile
-index 9727fc92..1d86144e 100644
---- a/pylib/Makefile
-+++ b/pylib/Makefile
-@@ -31,17 +31,9 @@ $(shell mkdir -p .build ../dist)
- PHONY: all
- all: check
- 
--.build/run-deps: setup.py
--	python -m pip install -e .
--	@touch $@
--
--.build/dev-deps: requirements.dev
--	python -m pip install -r requirements.dev
--	@touch $@
--
- PROTODEPS := $(wildcard ../proto/*.proto)
- 
--.build/py-proto: .build/dev-deps $(PROTODEPS)
-+.build/py-proto: $(PROTODEPS)
- 	protoc --proto_path=../proto --python_out=anki --mypy_out=anki $(PROTODEPS)
- 	perl -i'' -pe 's/from fluent_pb2/from anki.fluent_pb2/' anki/backend_pb2.pyi
- 	perl -i'' -pe 's/import fluent_pb2/import anki.fluent_pb2/' anki/backend_pb2.py
-@@ -52,7 +44,7 @@ PROTODEPS := $(wildcard ../proto/*.proto)
- 	python -m black anki/hooks.py
- 	@touch $@
- 
--BUILD_STEPS := .build/run-deps .build/dev-deps .build/py-proto anki/buildinfo.py .build/hooks
-+BUILD_STEPS := .build/py-proto anki/buildinfo.py
- 
- # Checking
- ######################
-diff --git a/qt/Makefile b/qt/Makefile
-index 4fef3e92..562a18a2 100644
---- a/qt/Makefile
-+++ b/qt/Makefile
-@@ -34,14 +34,6 @@ $(shell mkdir -p .build ../dist)
- PHONY: all
- all: check
- 
--.build/run-deps: setup.py
--	python -m pip install -e .
--	@touch $@
--
--.build/dev-deps: requirements.dev
--	python -m pip install -r requirements.dev
--	@touch $@
--
- .build/ui: $(shell ${FIND} designer -type f)
- 	./tools/build_ui.sh
- 	@touch $@
-@@ -64,7 +56,7 @@ TSDEPS := $(wildcard ts/src/*.ts) $(wildcard ts/scss/*.scss)
- 	python -m black aqt/gui_hooks.py
- 	@touch $@
- 
--BUILD_STEPS := .build/run-deps .build/dev-deps .build/js .build/ui aqt/buildinfo.py .build/hooks .build/i18n
-+BUILD_STEPS := .build/js .build/ui aqt/buildinfo.py .build/i18n
- 
- # Checking
- ######################
-diff --git a/rspy/Makefile b/rspy/Makefile
-index 20362e17..c31636ea 100644
---- a/rspy/Makefile
-+++ b/rspy/Makefile
-@@ -78,10 +78,6 @@ clean:
- RUST_TOOLCHAIN := $(shell cat rust-toolchain)
- 
- .build/tools: requirements.txt rust-toolchain
--	python -m pip install -r requirements.txt
--	rustup toolchain install $(RUST_TOOLCHAIN)
--	rustup component add rustfmt-preview --toolchain $(RUST_TOOLCHAIN)
--	rustup component add clippy-preview --toolchain $(RUST_TOOLCHAIN)
- 	@touch $@
- 
- .build/check: build
--- 
-2.26.0
-

Copied: anki/repos/community-x86_64/0002-Remove-bad-build-steps-from-makefiles.patch (from rev 626027, anki/repos/community-testing-x86_64/0002-Remove-bad-build-steps-from-makefiles.patch)
===================================================================
--- community-x86_64/0002-Remove-bad-build-steps-from-makefiles.patch	                        (rev 0)
+++ community-x86_64/0002-Remove-bad-build-steps-from-makefiles.patch	2020-05-09 17:18:25 UTC (rev 626028)
@@ -0,0 +1,66 @@
+From 5f8a3a14906d4ad20cd0d1be6b90e0922a5ba098 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= <johannes at kyriasis.com>
+Date: Sun, 29 Mar 2020 05:54:00 +0200
+Subject: [PATCH 2/4] Remove bad build steps from makefiles
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Johannes Löthberg <johannes at kyriasis.com>
+---
+ pylib/Makefile | 4 ++--
+ qt/Makefile    | 2 +-
+ rspy/Makefile  | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/pylib/Makefile b/pylib/Makefile
+index b9e6aa63..feae25d8 100644
+--- a/pylib/Makefile
++++ b/pylib/Makefile
+@@ -41,7 +41,7 @@ all: check
+ 
+ PROTODEPS := $(wildcard ../proto/*.proto)
+ 
+-.build/py-proto: .build/dev-deps $(PROTODEPS)
++.build/py-proto: $(PROTODEPS)
+ 	protoc --proto_path=../proto --python_out=anki --mypy_out=anki $(PROTODEPS)
+ 	perl -i'' -pe 's/from fluent_pb2/from anki.fluent_pb2/' anki/backend_pb2.pyi
+ 	perl -i'' -pe 's/import fluent_pb2/import anki.fluent_pb2/' anki/backend_pb2.py
+@@ -52,7 +52,7 @@ PROTODEPS := $(wildcard ../proto/*.proto)
+ 	python -m black anki/hooks.py
+ 	@touch $@
+ 
+-BUILD_STEPS := .build/vernum .build/run-deps .build/dev-deps .build/py-proto anki/buildinfo.py .build/hooks
++BUILD_STEPS := .build/vernum .build/py-proto anki/buildinfo.py
+ 
+ # Checking
+ ######################
+diff --git a/qt/Makefile b/qt/Makefile
+index 2ebee696..c0ba93e3 100644
+--- a/qt/Makefile
++++ b/qt/Makefile
+@@ -64,7 +64,7 @@ TSDEPS := $(wildcard ts/src/*.ts) $(wildcard ts/scss/*.scss)
+ 	python -m black aqt/gui_hooks.py
+ 	@touch $@
+ 
+-BUILD_STEPS := .build/vernum .build/run-deps .build/dev-deps .build/js .build/ui aqt/buildinfo.py .build/hooks .build/i18n
++BUILD_STEPS := .build/vernum .build/js .build/ui aqt/buildinfo.py .build/i18n
+ 
+ # Checking
+ ######################
+diff --git a/rspy/Makefile b/rspy/Makefile
+index 7506608d..01b7aff4 100644
+--- a/rspy/Makefile
++++ b/rspy/Makefile
+@@ -47,7 +47,7 @@ all: develop
+ 
+ develop: .build/develop
+ 
+-DEPS := .build/tools .build/vernum ../meta/buildhash \
++DEPS := .build/vernum ../meta/buildhash \
+ 	$(wildcard $(QT_FTL_TEMPLATES)/*.ftl) \
+ 	$(wildcard $(QT_FTL_LOCALES)/*/*.ftl) \
+ 	$(shell "${FIND}" ../rslib/src -name '*.rs') $(wildcard ../proto/*) \
+-- 
+2.26.2
+

Copied: anki/repos/community-x86_64/0003-Compile-.py-s-before-building-wheel.patch (from rev 626027, anki/repos/community-testing-x86_64/0003-Compile-.py-s-before-building-wheel.patch)
===================================================================
--- community-x86_64/0003-Compile-.py-s-before-building-wheel.patch	                        (rev 0)
+++ community-x86_64/0003-Compile-.py-s-before-building-wheel.patch	2020-05-09 17:18:25 UTC (rev 626028)
@@ -0,0 +1,43 @@
+From d1e3ca1144b664421facf30acd5524cd28961a3c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= <johannes at kyriasis.com>
+Date: Mon, 4 May 2020 18:46:38 +0200
+Subject: [PATCH 3/4] Compile .py's before building wheel
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Johannes Löthberg <johannes at kyriasis.com>
+---
+ pylib/Makefile | 2 ++
+ qt/Makefile    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/pylib/Makefile b/pylib/Makefile
+index feae25d8..9d60bfe2 100644
+--- a/pylib/Makefile
++++ b/pylib/Makefile
+@@ -103,6 +103,8 @@ build: .build/build
+ 
+ .build/build: $(BUILD_STEPS) $(CHECKDEPS)
+ 	rm -rf dist build
++	python setup.py build
++	python -O -m compileall .
+ 	python setup.py -q bdist_wheel
+ 	rsync -a dist/*.whl ../dist/
+ 	touch $@
+diff --git a/qt/Makefile b/qt/Makefile
+index c0ba93e3..364fa890 100644
+--- a/qt/Makefile
++++ b/qt/Makefile
+@@ -131,6 +131,8 @@ build: .build/build
+ 
+ .build/build: $(BUILD_STEPS) $(CHECKDEPS)
+ 	rm -rf dist build
++	python setup.py build
++	python -O -m compileall .
+ 	python setup.py -q bdist_wheel
+ 	rsync -a dist/*.whl ../dist/
+ 	touch $@
+-- 
+2.26.2
+

Copied: anki/repos/community-x86_64/0004-Disable-auto-updates.patch (from rev 626027, anki/repos/community-testing-x86_64/0004-Disable-auto-updates.patch)
===================================================================
--- community-x86_64/0004-Disable-auto-updates.patch	                        (rev 0)
+++ community-x86_64/0004-Disable-auto-updates.patch	2020-05-09 17:18:25 UTC (rev 626028)
@@ -0,0 +1,29 @@
+From 2c15f97b0e682f8b7616f14ea3f3caab653a78f7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= <johannes at kyriasis.com>
+Date: Mon, 4 May 2020 17:57:29 +0200
+Subject: [PATCH 4/4] Disable auto updates
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Johannes Löthberg <johannes at kyriasis.com>
+---
+ qt/aqt/update.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/qt/aqt/update.py b/qt/aqt/update.py
+index 2513d84c..37656733 100644
+--- a/qt/aqt/update.py
++++ b/qt/aqt/update.py
+@@ -34,6 +34,8 @@ class LatestVersionFinder(QThread):
+         return d
+ 
+     def run(self):
++        return
++
+         if not self.config["updates"]:
+             return
+         d = self._data()
+-- 
+2.26.2
+

Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD	2020-05-09 17:17:49 UTC (rev 626027)
+++ community-x86_64/PKGBUILD	2020-05-09 17:18:25 UTC (rev 626028)
@@ -1,106 +0,0 @@
-# Maintainer: Johannes Löthberg <johannes at kyriasis.com>
-# Contributor: Sergej Pupykin <pupykin.s+arch at gmail.com>
-# Contributor: Timm Preetz <timm at preetz.us>
-# Contributor: Michael 'manveru' Fellinger <m.fellinger at gmail.com>
-# Contributor: Dave Pretty <david dot pretty at gmail dot com>
-
-pkgname=anki
-pkgver=2.1.23
-pkgrel=1
-
-pkgdesc="Helps you remember facts (like words/phrases in a foreign language) efficiently"
-url="https://ankisrs.net/"
-arch=('x86_64')
-license=('AGPL3')
-
-depends=(
-	# anki and aqt
-	'python-beautifulsoup4'
-	'python-requests'
-	'python-wheel'
-
-	# anki
-	'python-decorator'
-	'python-distro'
-	# Currently not packaged.  Falls back to stdlib json module.
-	# 'python-orjson'
-	'python-protobuf'
-
-	# aqt
-	'python-jsonschema'
-	'python-markdown'
-	'python-pyaudio'
-	'python-pyqt5'
-	'python-pyqtwebengine'
-	'python-send2trash'
-)
-makedepends=(
-	'git'
-	'rsync'
-
-	'maturin'
-	'rustup'
-
-	'python-pip'
-	'python-mypy-protobuf'
-	'npm'
-	'typescript'
-)
-optdepends=(
-	'lame: record sound'
-	'mpv: play sound. prefered over mplayer'
-	'mplayer: play sound'
-)
-
-source=(
-	anki-$pkgver.tar.gz::https://github.com/ankitects/anki/archive/$pkgver.tar.gz
-	git+https://github.com/ankitects/anki-desktop-ftl#commit=255a12eadf5c6afc22705ac9ab7c9e2982c7d2b1
-	git+https://github.com/ankitects/anki-core-i18n#commit=23c4dc5bf5c88c782536ec48934ef6a379b10e72
-	0001-Unfuck-make-build-targets.patch
-	0001-Move-aqt_data-to-sys.prefix-share.patch
-)
-sha256sums=(
-	'682efd4cf044a89a0dbd83e30d4545683c6574d847642cc64cc0e0ca4a94f4ae'
-	'SKIP'
-	'SKIP'
-	'SKIP'
-	'SKIP'
-)
-
-prepare() {
-	cd anki-$pkgver
-	patch -p1 <"$srcdir"/0001-Unfuck-make-build-targets.patch
-	patch -p1 <"$srcdir"/0001-Move-aqt_data-to-sys.prefix-share.patch
-}
-
-build() {
-	# Put translations in place.
-	git clone anki-desktop-ftl anki-$pkgver/qt/ftl/repo
-	git clone anki-core-i18n anki-$pkgver/rslib/ftl/repo
-
-	# Built into the shared libraries so that the Python component can check
-	# that it has the same value.
-	cd anki-$pkgver/meta
-	echo anki-$pkgver > buildhash
-
-	# rust ankirspy module
-	cd ../rspy
-	make build
-
-	# python anki module
-	cd ../pylib
-	make build
-
-	# python aqt module
-	cd ../qt
-	make build
-}
-
-package() {
-	cd anki-$pkgver
-
-	PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps dist/*.whl
-
-	install -Dm755 qt/runanki "$pkgdir"/usr/bin/anki
-	install -Dm644 qt/anki.desktop "$pkgdir"/usr/share/applications/anki.desktop
-}

Copied: anki/repos/community-x86_64/PKGBUILD (from rev 626027, anki/repos/community-testing-x86_64/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2020-05-09 17:18:25 UTC (rev 626028)
@@ -0,0 +1,120 @@
+# Maintainer: Johannes Löthberg <johannes at kyriasis.com>
+# Contributor: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Contributor: Timm Preetz <timm at preetz.us>
+# Contributor: Michael 'manveru' Fellinger <m.fellinger at gmail.com>
+# Contributor: Dave Pretty <david dot pretty at gmail dot com>
+
+_core_i18n=8d6ec08
+_desktop_ftl=04f26f2
+_desktop_i18n=0c64190
+
+pkgname=anki
+pkgver=2.1.26
+pkgrel=1
+
+pkgdesc="Helps you remember facts (like words/phrases in a foreign language) efficiently"
+url="https://ankisrs.net/"
+arch=('x86_64')
+license=('AGPL3')
+
+depends=(
+	# anki and aqt
+	'python-beautifulsoup4'
+	'python-requests'
+	'python-wheel'
+
+	# anki
+	'python-decorator'
+	'python-distro'
+	# Currently not packaged.  Falls back to stdlib json module.
+	# 'python-orjson'
+	'python-protobuf'
+
+	# aqt
+	'python-jsonschema'
+	'python-markdown'
+	'python-pyaudio'
+	'python-pyqt5'
+	'python-pyqtwebengine'
+	'python-send2trash'
+)
+makedepends=(
+	'git'
+	'rsync'
+
+	'maturin'
+	'rustup'
+
+	'python-pip'
+	'python-mypy-protobuf'
+	'npm'
+	'typescript'
+)
+optdepends=(
+	'lame: record sound'
+	'mpv: play sound. prefered over mplayer'
+	'mplayer: play sound'
+)
+
+source=(
+	anki-$pkgver.tar.gz::https://github.com/ankitects/anki/archive/$pkgver.tar.gz
+
+	ankitects-anki-core-i18n-$_core_i18n.tar.gz::https://github.com/ankitects/anki-core-i18n/tarball/$_core_i18n
+	ankitects-anki-desktop-ftl-$_desktop_ftl.tar.gz::https://github.com/ankitects/anki-desktop-ftl/tarball/$_desktop_ftl
+	ankitects-anki-desktop-i18n-$_desktop_i18n.tar.gz::https://github.com/ankitects/anki-desktop-i18n/tarball/$_desktop_i18n
+
+	0001-Move-aqt_data-to-sys.prefix-share.patch
+	0002-Remove-bad-build-steps-from-makefiles.patch
+	0003-Compile-.py-s-before-building-wheel.patch
+	0004-Disable-auto-updates.patch
+)
+sha256sums=('f5a0c41f3eebe0e77de9d46f2a5cbbe20f7c3a4787f0f02e1d33f298428acbdf'
+            'b1cfb3bd01d9133759e9ad1f349974a79e59f262778dbe6beb88446dc6d1e089'
+            '7a3ddb027ce8ba35f8ef36f2092536ac33c40bf6f6f3337fa9738e31edb22ee7'
+            '325dd0ed4150d143c42bd2f2140ecde0f0fef14695a908e688a5a27784e6f322'
+            '26162e6370e7763a8ec37e1690dc39c8b0f71e9d2524c452c330276b357cb18f'
+            '1bf87c408fd9e2a09cb39d8353af1e0dc64930ac819b4ffae555b14ed4644981'
+            '401d31ac5992c342778ba748eac6179da9d594e1ef93d0db8170fad643bab069'
+            '97048aa118281311f17b1e2154f55a2a2f1d84cbebbdc93459bca49e8f8f06fd')
+
+prepare() {
+	cd anki-$pkgver
+	patch -p1 <"$srcdir"/0001-Move-aqt_data-to-sys.prefix-share.patch
+	patch -p1 <"$srcdir"/0002-Remove-bad-build-steps-from-makefiles.patch
+	patch -p1 <"$srcdir"/0003-Compile-.py-s-before-building-wheel.patch
+	patch -p1 <"$srcdir"/0004-Disable-auto-updates.patch
+
+	# 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
+}
+
+build() {
+	# Built into the shared libraries so that the Python component can check
+	# that it has the same value.
+	cd anki-$pkgver/meta
+	echo arch-linux-$pkgver-$pkgrel > buildhash
+
+	# rust ankirspy module
+	cd ../rspy
+	make build
+
+	# python anki module
+	cd ../pylib
+	make build
+
+	# python aqt module
+	cd ../qt
+	make build
+}
+
+package() {
+	cd anki-$pkgver
+
+	PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps dist/*.whl
+
+	install -Dm755 qt/runanki "$pkgdir"/usr/bin/anki
+	install -Dm644 qt/anki.desktop "$pkgdir"/usr/share/applications/anki.desktop
+	install -Dm644 qt/anki.png "$pkgdir"/usr/share/pixmaps/anki.png
+}



More information about the arch-commits mailing list