Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] anki: updated to (TODO)
@ 2023-06-05 13:18 loreb
  2023-06-05 13:21 ` loreb
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: loreb @ 2023-06-05 13:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1898 bytes --]

There is a new pull request by loreb against master on the void-packages repository

https://github.com/loreb/void-packages anki
https://github.com/void-linux/void-packages/pull/44276

anki: updated to (TODO)
=> anki-2.1.64_1: skipping check (XBPS_CHECK_PKGS is disabled) ...
=> anki-2.1.64_1: running pre-install hook: 00-libdir ...
=> anki-2.1.64_1: running pre-install hook: 02-script-wrapper ...
=> anki-2.1.64_1: running pre-install hook: 98-fixup-gir-path ...
=> anki-2.1.64_1: running do_install ...
error: found a virtual manifest at `/builddir/anki-2.1.64/Cargo.toml` instead of a package manifest
=> ERROR: anki-2.1.64_1: do_install: '${make_cmd} install --target ${RUST_TARGET} --root="${DESTDIR}/usr" --offline --locked ${configure_args} ${make_install_args}' exited with 101
=> ERROR:   in do_install() at common/build-style/cargo.sh:22

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/44276.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-anki-44276.patch --]
[-- Type: text/x-diff, Size: 10911 bytes --]

From e7ccbf54baa5e34d20de84ba4b4dad348ee7e177 Mon Sep 17 00:00:00 2001
From: Lorenzo Beretta <vc.net.loreb@gmail.com>
Date: Mon, 5 Jun 2023 11:11:45 +0200
Subject: [PATCH] anki: updated to (TODO)

=> anki-2.1.64_1: skipping check (XBPS_CHECK_PKGS is disabled) ...
=> anki-2.1.64_1: running pre-install hook: 00-libdir ...
=> anki-2.1.64_1: running pre-install hook: 02-script-wrapper ...
=> anki-2.1.64_1: running pre-install hook: 98-fixup-gir-path ...
=> anki-2.1.64_1: running do_install ...
error: found a virtual manifest at `/builddir/anki-2.1.64/Cargo.toml` instead of a package manifest
=> ERROR: anki-2.1.64_1: do_install: '${make_cmd} install --target ${RUST_TARGET} --root="${DESTDIR}/usr" --offline --locked ${configure_args} ${make_install_args}' exited with 101
=> ERROR:   in do_install() at common/build-style/cargo.sh:22
---
 srcpkgs/anki/patches/disable_popup.patch      | 12 +++---
 srcpkgs/anki/patches/fix_float.patch          | 42 -------------------
 srcpkgs/anki/patches/fix_mpv_args.patch       | 29 -------------
 srcpkgs/anki/patches/fix_profile_save.patch   | 15 -------
 srcpkgs/anki/patches/fix_unescape.patch       | 11 -----
 srcpkgs/anki/patches/wtf-git-submodules.patch | 40 ++++++++++++++++++
 srcpkgs/anki/template                         | 18 +++++---
 7 files changed, 59 insertions(+), 108 deletions(-)
 delete mode 100644 srcpkgs/anki/patches/fix_float.patch
 delete mode 100644 srcpkgs/anki/patches/fix_mpv_args.patch
 delete mode 100644 srcpkgs/anki/patches/fix_profile_save.patch
 delete mode 100644 srcpkgs/anki/patches/fix_unescape.patch
 create mode 100644 srcpkgs/anki/patches/wtf-git-submodules.patch

diff --git a/srcpkgs/anki/patches/disable_popup.patch b/srcpkgs/anki/patches/disable_popup.patch
index 8b7a041fc656..096b427ea626 100644
--- a/srcpkgs/anki/patches/disable_popup.patch
+++ b/srcpkgs/anki/patches/disable_popup.patch
@@ -1,10 +1,10 @@
---- a/aqt/update.py
-+++ b/aqt/update.py
-@@ -31,6 +31,7 @@ class LatestVersionFinder(QThread):
-         return d
+--- a/qt/aqt/update.py
++++ b/qt/aqt/update.py
+@@ -33,6 +33,7 @@ class LatestVersionFinder(QThread):
+         }
  
-     def run(self):
+     def run(self) -> None:
 +        return
-         if not self.config['updates']:
+         if not self.config["updates"]:
              return
          d = self._data()
diff --git a/srcpkgs/anki/patches/fix_float.patch b/srcpkgs/anki/patches/fix_float.patch
deleted file mode 100644
index 333d76c8efd7..000000000000
--- a/srcpkgs/anki/patches/fix_float.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- a/aqt/deckconf.py
-+++ b/aqt/deckconf.py
-@@ -172,7 +172,7 @@ class DeckConf(QDialog):
-         f.lrnGradInt.setValue(c['ints'][0])
-         f.lrnEasyInt.setValue(c['ints'][1])
-         f.lrnEasyInt.setValue(c['ints'][1])
--        f.lrnFactor.setValue(c['initialFactor']/10.0)
-+        f.lrnFactor.setValue(c['initialFactor']//10)
-         f.newOrder.setCurrentIndex(c['order'])
-         f.newPerDay.setValue(c['perDay'])
-         f.bury.setChecked(c.get("bury", True))
-@@ -180,7 +180,7 @@ class DeckConf(QDialog):
-         # rev
-         c = self.conf['rev']
-         f.revPerDay.setValue(c['perDay'])
--        f.easyBonus.setValue(c['ease4']*100)
-+        f.easyBonus.setValue(int(c['ease4'])*100)
-         f.fi1.setValue(c['ivlFct']*100)
-         f.maxIvl.setValue(c['maxIvl'])
-         f.revplim.setText(self.parentLimText('rev'))
-@@ -192,7 +192,7 @@ class DeckConf(QDialog):
-         # lapse
-         c = self.conf['lapse']
-         f.lapSteps.setText(self.listToUser(c['delays']))
--        f.lapMult.setValue(c['mult']*100)
-+        f.lapMult.setValue(int(c['mult'])*100)
-         f.lapMinInt.setValue(c['minInt'])
-         f.leechThreshold.setValue(c['leechFails'])
-         f.leechAction.setCurrentIndex(c['leechAction'])
---- a/aqt/preferences.py
-+++ b/aqt/preferences.py
-@@ -77,8 +77,8 @@ class Preferences(QDialog):
-             f.hwAccel.setVisible(False)
-         else:
-             f.hwAccel.setChecked(self.mw.pm.glMode() != "software")
--        f.lrnCutoff.setValue(qc['collapseTime']/60.0)
--        f.timeLimit.setValue(qc['timeLim']/60.0)
-+        f.lrnCutoff.setValue(qc['collapseTime']//60)
-+        f.timeLimit.setValue(qc['timeLim']//60)
-         f.showEstimates.setChecked(qc['estTimes'])
-         f.showProgress.setChecked(qc['dueCounts'])
-         f.nightMode.setChecked(qc.get("nightMode", False))
diff --git a/srcpkgs/anki/patches/fix_mpv_args.patch b/srcpkgs/anki/patches/fix_mpv_args.patch
deleted file mode 100644
index 0b99dd8fe856..000000000000
--- a/srcpkgs/anki/patches/fix_mpv_args.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/anki/mpv.py
-+++ b/anki/mpv.py
-@@ -104,9 +104,9 @@
-         """
-         self.argv = [self.executable]
-         self.argv += self.default_argv
--        self.argv += ["--input-ipc-server", self._sock_filename]
-+        self.argv += ["--input-ipc-server="+self._sock_filename]
-         if self.window_id is not None:
--            self.argv += ["--wid", str(self.window_id)]
-+            self.argv += ["--wid="+str(self.window_id)]
- 
-     def _start_process(self):
-         """Start the mpv process.
-
---- a/anki/sound.py
-+++ b/anki/sound.py
-@@ -123,10 +123,7 @@
- 
- def setMpvConfigBase(base):
-     mpvConfPath = os.path.join(base, "mpv.conf")
--    MpvManager.default_argv += [
--        "--no-config",
--        "--include="+mpvConfPath,
--    ]
-+    MpvManager.default_argv += ["--include="+mpvConfPath]
- 
- mpvManager = None
- 
diff --git a/srcpkgs/anki/patches/fix_profile_save.patch b/srcpkgs/anki/patches/fix_profile_save.patch
deleted file mode 100644
index 9d72a1a20e82..000000000000
--- a/srcpkgs/anki/patches/fix_profile_save.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Fixes crash related to saving profile data on exit.
---- a/aqt/profiles.py
-+++ b/aqt/profiles.py
-@@ -160,7 +160,10 @@ a flash drive.""" % self.base)
-         return up.load()
- 
-     def _pickle(self, obj):
--        return pickle.dumps(obj, protocol=0)
-+        for key, val in obj.items():
-+            if isinstance(val, QByteArray):
-+                obj[key] = bytes(val)  # type: ignore
-+        return pickle.dumps(obj, protocol=4)
- 
-     def load(self, name):
-         assert name != "_global"
diff --git a/srcpkgs/anki/patches/fix_unescape.patch b/srcpkgs/anki/patches/fix_unescape.patch
deleted file mode 100644
index f7024bc7bf15..000000000000
--- a/srcpkgs/anki/patches/fix_unescape.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/aqt/reviewer.py
-+++ b/aqt/reviewer.py
-@@ -359,7 +359,7 @@
-         cor = stripHTML(cor)
-         # ensure we don't chomp multiple whitespace
-         cor = cor.replace(" ", "&nbsp;")
--        cor = parser.unescape(cor)
-+        cor = html.unescape(cor)
-         cor = cor.replace("\xa0", " ")
-         cor = cor.strip()
-         given = self.typedAnswer
diff --git a/srcpkgs/anki/patches/wtf-git-submodules.patch b/srcpkgs/anki/patches/wtf-git-submodules.patch
new file mode 100644
index 000000000000..287d039cf071
--- /dev/null
+++ b/srcpkgs/anki/patches/wtf-git-submodules.patch
@@ -0,0 +1,40 @@
+--- a/rslib/i18n/build/gather.rs
++++ b/rslib/i18n/build/gather.rs
+@@ -21,7 +21,8 @@ pub fn get_ftl_data() -> TranslationsByLang {
+     let ftl_base = source_tree_root();
+     add_folder(&mut map, &ftl_base.join("core"), "templates");
+     // And core translations from submodule
+-    add_translation_root(&mut map, &ftl_base.join("core-repo/core"), true);
++    // thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', rslib/i18n/build/gather.rs:69:37
++    //add_translation_root(&mut map, &ftl_base.join("core-repo/core"), true);
+ 
+     if let Some(path) = extra_ftl_root() {
+         // Mobile client has requested its own extra translations
+@@ -35,7 +36,7 @@ pub fn get_ftl_data() -> TranslationsByLang {
+         // Qt core templates from this repo
+         add_folder(&mut map, &ftl_base.join("qt"), "templates");
+         // And translations from submodule
+-        add_translation_root(&mut map, &ftl_base.join("qt-repo/desktop"), true)
++        //add_translation_root(&mut map, &ftl_base.join("qt-repo/desktop"), true)
+     }
+     map
+ }
+@@ -65,6 +66,7 @@ fn add_folder(map: &mut TranslationsByLang, folder: &Path, lang: &str) {
+ /// If ignore_templates is true, the templates/ folder will be ignored, on the
+ /// assumption the templates were extracted from the source tree.
+ fn add_translation_root(map: &mut TranslationsByLang, root: &Path, ignore_templates: bool) {
++    eprint!("add_translation_root({})\n", root.display());
+     for entry in fs::read_dir(root).unwrap() {
+         let entry = entry.unwrap();
+         let lang = entry.file_name().to_string_lossy().to_string();
+--- a/rslib/i18n/build/main.rs
++++ b/rslib/i18n/build/main.rs
+@@ -26,6 +26,7 @@ fn main() {
+     println!("cargo:rerun-if-env-changed=STRINGS_JSON");
+     if let Some(path) = option_env!("STRINGS_JSON") {
+         let meta_json = serde_json::to_string_pretty(&modules).unwrap();
+-        fs::write(path, meta_json).unwrap();
++        println!("path({})", path);
++        println!("fs::write(path, meta_json).unwrap()");
+     }
+ }
diff --git a/srcpkgs/anki/template b/srcpkgs/anki/template
index ead0f33a1df7..188fd0015860 100644
--- a/srcpkgs/anki/template
+++ b/srcpkgs/anki/template
@@ -1,8 +1,11 @@
 # Template file for 'anki'
 pkgname=anki
-version=2.1.15
-revision=6
-build_style=gnu-makefile
+version=2.1.64
+revision=1
+# XXX "The Rust version pinned in rust-toolchain.toml will be automatically downloaded if not yet installed"
+build_style=cargo
+hostmakedepends="pkg-config protobuf nodejs"
+makedepends="libzstd-devel nodejs-devel openssl-devel"
 depends="python3-PyQt5-webengine python3-requests python3-SQLAlchemy
  python3-PyAudio python3-mpv python3-Markdown python3-send2trash
  python3-BeautifulSoup4 python3-decorator python3-jsonschema"
@@ -11,8 +14,13 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="AGPL-3.0-or-later"
 homepage="https://apps.ankiweb.net"
 changelog="https://apps.ankiweb.net/docs/changes.html"
-distfiles="https://apps.ankiweb.net/downloads/archive/anki-$version-source.tgz"
-checksum=5a53760164c77d619f55107a13099cffe620566a7f610b61b6c4b52487f3bb89
+distfiles="https://github.com/ankitects/anki/archive/refs/tags/$version.tar.gz"
+checksum=5ff8c17e599b593af38beed35e18a8ac68da0c012d79e11a0b3105151c3ea21a
+# "Python, node and protoc are downloaded as part of the build. You can optionally define PYTHON_BINARY, NODE_BINARY and/or PROTOC_BINARY to use locally-installed versions instead."
+export PYTHON_BINARY=/usr/bin/python3
+export PROTOC_BINARY=/usr/bin/protoc
+export NODE_BINARY=/usr/bin/node
+export RUST_BACKTRACE=full # XXX only to debug those "helpful" error messages ("file not found" -- WHAT FILE?!?!?!)
 
 python_version=3
 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: anki: updated to (TODO)
  2023-06-05 13:18 [PR PATCH] anki: updated to (TODO) loreb
@ 2023-06-05 13:21 ` loreb
  2023-06-08 13:13 ` [PR PATCH] [Updated] " loreb
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: loreb @ 2023-06-05 13:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 431 bytes --]

New comment by loreb on void-packages repository

https://github.com/void-linux/void-packages/pull/44276#issuecomment-1576794208

Comment:
I tried to force it to compile by patching out submodules, got this far and I'm not sure how to proceed.
Regarding the submodules the idea was to follow the example of https://github.com/void-linux/void-packages/blob/master/srcpkgs/tracebox/template - any comment/correction/... appreciated

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Updated] anki: updated to (TODO)
  2023-06-05 13:18 [PR PATCH] anki: updated to (TODO) loreb
  2023-06-05 13:21 ` loreb
@ 2023-06-08 13:13 ` loreb
  2023-06-17 12:29 ` [PR PATCH] [Updated] anki: update to 2.1.65 failed loreb
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: loreb @ 2023-06-08 13:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1903 bytes --]

There is an updated pull request by loreb against master on the void-packages repository

https://github.com/loreb/void-packages anki
https://github.com/void-linux/void-packages/pull/44276

anki: updated to (TODO)
=> anki-2.1.64_1: skipping check (XBPS_CHECK_PKGS is disabled) ...
=> anki-2.1.64_1: running pre-install hook: 00-libdir ...
=> anki-2.1.64_1: running pre-install hook: 02-script-wrapper ...
=> anki-2.1.64_1: running pre-install hook: 98-fixup-gir-path ...
=> anki-2.1.64_1: running do_install ...
error: found a virtual manifest at `/builddir/anki-2.1.64/Cargo.toml` instead of a package manifest
=> ERROR: anki-2.1.64_1: do_install: '${make_cmd} install --target ${RUST_TARGET} --root="${DESTDIR}/usr" --offline --locked ${configure_args} ${make_install_args}' exited with 101
=> ERROR:   in do_install() at common/build-style/cargo.sh:22

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/44276.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-anki-44276.patch --]
[-- Type: text/x-diff, Size: 10305 bytes --]

From 6230a3ad3985de35f25e45da4517821dfcc10241 Mon Sep 17 00:00:00 2001
From: Lorenzo Beretta <vc.net.loreb@gmail.com>
Date: Mon, 5 Jun 2023 11:11:45 +0200
Subject: [PATCH] anki: update to 2.1.65

It compiles but it fails do_install
---
 srcpkgs/anki/patches/disable_popup.patch      | 12 +++---
 srcpkgs/anki/patches/fix_float.patch          | 42 -------------------
 srcpkgs/anki/patches/fix_mpv_args.patch       | 29 -------------
 srcpkgs/anki/patches/fix_profile_save.patch   | 15 -------
 srcpkgs/anki/patches/fix_unescape.patch       | 11 -----
 srcpkgs/anki/patches/wtf-git-submodules.patch | 40 ++++++++++++++++++
 srcpkgs/anki/template                         | 18 +++++---
 7 files changed, 59 insertions(+), 108 deletions(-)
 delete mode 100644 srcpkgs/anki/patches/fix_float.patch
 delete mode 100644 srcpkgs/anki/patches/fix_mpv_args.patch
 delete mode 100644 srcpkgs/anki/patches/fix_profile_save.patch
 delete mode 100644 srcpkgs/anki/patches/fix_unescape.patch
 create mode 100644 srcpkgs/anki/patches/wtf-git-submodules.patch

diff --git a/srcpkgs/anki/patches/disable_popup.patch b/srcpkgs/anki/patches/disable_popup.patch
index 8b7a041fc656..096b427ea626 100644
--- a/srcpkgs/anki/patches/disable_popup.patch
+++ b/srcpkgs/anki/patches/disable_popup.patch
@@ -1,10 +1,10 @@
---- a/aqt/update.py
-+++ b/aqt/update.py
-@@ -31,6 +31,7 @@ class LatestVersionFinder(QThread):
-         return d
+--- a/qt/aqt/update.py
++++ b/qt/aqt/update.py
+@@ -33,6 +33,7 @@ class LatestVersionFinder(QThread):
+         }
  
-     def run(self):
+     def run(self) -> None:
 +        return
-         if not self.config['updates']:
+         if not self.config["updates"]:
              return
          d = self._data()
diff --git a/srcpkgs/anki/patches/fix_float.patch b/srcpkgs/anki/patches/fix_float.patch
deleted file mode 100644
index 333d76c8efd7..000000000000
--- a/srcpkgs/anki/patches/fix_float.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- a/aqt/deckconf.py
-+++ b/aqt/deckconf.py
-@@ -172,7 +172,7 @@ class DeckConf(QDialog):
-         f.lrnGradInt.setValue(c['ints'][0])
-         f.lrnEasyInt.setValue(c['ints'][1])
-         f.lrnEasyInt.setValue(c['ints'][1])
--        f.lrnFactor.setValue(c['initialFactor']/10.0)
-+        f.lrnFactor.setValue(c['initialFactor']//10)
-         f.newOrder.setCurrentIndex(c['order'])
-         f.newPerDay.setValue(c['perDay'])
-         f.bury.setChecked(c.get("bury", True))
-@@ -180,7 +180,7 @@ class DeckConf(QDialog):
-         # rev
-         c = self.conf['rev']
-         f.revPerDay.setValue(c['perDay'])
--        f.easyBonus.setValue(c['ease4']*100)
-+        f.easyBonus.setValue(int(c['ease4'])*100)
-         f.fi1.setValue(c['ivlFct']*100)
-         f.maxIvl.setValue(c['maxIvl'])
-         f.revplim.setText(self.parentLimText('rev'))
-@@ -192,7 +192,7 @@ class DeckConf(QDialog):
-         # lapse
-         c = self.conf['lapse']
-         f.lapSteps.setText(self.listToUser(c['delays']))
--        f.lapMult.setValue(c['mult']*100)
-+        f.lapMult.setValue(int(c['mult'])*100)
-         f.lapMinInt.setValue(c['minInt'])
-         f.leechThreshold.setValue(c['leechFails'])
-         f.leechAction.setCurrentIndex(c['leechAction'])
---- a/aqt/preferences.py
-+++ b/aqt/preferences.py
-@@ -77,8 +77,8 @@ class Preferences(QDialog):
-             f.hwAccel.setVisible(False)
-         else:
-             f.hwAccel.setChecked(self.mw.pm.glMode() != "software")
--        f.lrnCutoff.setValue(qc['collapseTime']/60.0)
--        f.timeLimit.setValue(qc['timeLim']/60.0)
-+        f.lrnCutoff.setValue(qc['collapseTime']//60)
-+        f.timeLimit.setValue(qc['timeLim']//60)
-         f.showEstimates.setChecked(qc['estTimes'])
-         f.showProgress.setChecked(qc['dueCounts'])
-         f.nightMode.setChecked(qc.get("nightMode", False))
diff --git a/srcpkgs/anki/patches/fix_mpv_args.patch b/srcpkgs/anki/patches/fix_mpv_args.patch
deleted file mode 100644
index 0b99dd8fe856..000000000000
--- a/srcpkgs/anki/patches/fix_mpv_args.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/anki/mpv.py
-+++ b/anki/mpv.py
-@@ -104,9 +104,9 @@
-         """
-         self.argv = [self.executable]
-         self.argv += self.default_argv
--        self.argv += ["--input-ipc-server", self._sock_filename]
-+        self.argv += ["--input-ipc-server="+self._sock_filename]
-         if self.window_id is not None:
--            self.argv += ["--wid", str(self.window_id)]
-+            self.argv += ["--wid="+str(self.window_id)]
- 
-     def _start_process(self):
-         """Start the mpv process.
-
---- a/anki/sound.py
-+++ b/anki/sound.py
-@@ -123,10 +123,7 @@
- 
- def setMpvConfigBase(base):
-     mpvConfPath = os.path.join(base, "mpv.conf")
--    MpvManager.default_argv += [
--        "--no-config",
--        "--include="+mpvConfPath,
--    ]
-+    MpvManager.default_argv += ["--include="+mpvConfPath]
- 
- mpvManager = None
- 
diff --git a/srcpkgs/anki/patches/fix_profile_save.patch b/srcpkgs/anki/patches/fix_profile_save.patch
deleted file mode 100644
index 9d72a1a20e82..000000000000
--- a/srcpkgs/anki/patches/fix_profile_save.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Fixes crash related to saving profile data on exit.
---- a/aqt/profiles.py
-+++ b/aqt/profiles.py
-@@ -160,7 +160,10 @@ a flash drive.""" % self.base)
-         return up.load()
- 
-     def _pickle(self, obj):
--        return pickle.dumps(obj, protocol=0)
-+        for key, val in obj.items():
-+            if isinstance(val, QByteArray):
-+                obj[key] = bytes(val)  # type: ignore
-+        return pickle.dumps(obj, protocol=4)
- 
-     def load(self, name):
-         assert name != "_global"
diff --git a/srcpkgs/anki/patches/fix_unescape.patch b/srcpkgs/anki/patches/fix_unescape.patch
deleted file mode 100644
index f7024bc7bf15..000000000000
--- a/srcpkgs/anki/patches/fix_unescape.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/aqt/reviewer.py
-+++ b/aqt/reviewer.py
-@@ -359,7 +359,7 @@
-         cor = stripHTML(cor)
-         # ensure we don't chomp multiple whitespace
-         cor = cor.replace(" ", "&nbsp;")
--        cor = parser.unescape(cor)
-+        cor = html.unescape(cor)
-         cor = cor.replace("\xa0", " ")
-         cor = cor.strip()
-         given = self.typedAnswer
diff --git a/srcpkgs/anki/patches/wtf-git-submodules.patch b/srcpkgs/anki/patches/wtf-git-submodules.patch
new file mode 100644
index 000000000000..287d039cf071
--- /dev/null
+++ b/srcpkgs/anki/patches/wtf-git-submodules.patch
@@ -0,0 +1,40 @@
+--- a/rslib/i18n/build/gather.rs
++++ b/rslib/i18n/build/gather.rs
+@@ -21,7 +21,8 @@ pub fn get_ftl_data() -> TranslationsByLang {
+     let ftl_base = source_tree_root();
+     add_folder(&mut map, &ftl_base.join("core"), "templates");
+     // And core translations from submodule
+-    add_translation_root(&mut map, &ftl_base.join("core-repo/core"), true);
++    // thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', rslib/i18n/build/gather.rs:69:37
++    //add_translation_root(&mut map, &ftl_base.join("core-repo/core"), true);
+ 
+     if let Some(path) = extra_ftl_root() {
+         // Mobile client has requested its own extra translations
+@@ -35,7 +36,7 @@ pub fn get_ftl_data() -> TranslationsByLang {
+         // Qt core templates from this repo
+         add_folder(&mut map, &ftl_base.join("qt"), "templates");
+         // And translations from submodule
+-        add_translation_root(&mut map, &ftl_base.join("qt-repo/desktop"), true)
++        //add_translation_root(&mut map, &ftl_base.join("qt-repo/desktop"), true)
+     }
+     map
+ }
+@@ -65,6 +66,7 @@ fn add_folder(map: &mut TranslationsByLang, folder: &Path, lang: &str) {
+ /// If ignore_templates is true, the templates/ folder will be ignored, on the
+ /// assumption the templates were extracted from the source tree.
+ fn add_translation_root(map: &mut TranslationsByLang, root: &Path, ignore_templates: bool) {
++    eprint!("add_translation_root({})\n", root.display());
+     for entry in fs::read_dir(root).unwrap() {
+         let entry = entry.unwrap();
+         let lang = entry.file_name().to_string_lossy().to_string();
+--- a/rslib/i18n/build/main.rs
++++ b/rslib/i18n/build/main.rs
+@@ -26,6 +26,7 @@ fn main() {
+     println!("cargo:rerun-if-env-changed=STRINGS_JSON");
+     if let Some(path) = option_env!("STRINGS_JSON") {
+         let meta_json = serde_json::to_string_pretty(&modules).unwrap();
+-        fs::write(path, meta_json).unwrap();
++        println!("path({})", path);
++        println!("fs::write(path, meta_json).unwrap()");
+     }
+ }
diff --git a/srcpkgs/anki/template b/srcpkgs/anki/template
index ead0f33a1df7..05dea8256647 100644
--- a/srcpkgs/anki/template
+++ b/srcpkgs/anki/template
@@ -1,8 +1,11 @@
 # Template file for 'anki'
 pkgname=anki
-version=2.1.15
-revision=6
-build_style=gnu-makefile
+version=2.1.65
+revision=1
+# XXX "The Rust version pinned in rust-toolchain.toml will be automatically downloaded if not yet installed"
+build_style=cargo
+hostmakedepends="pkg-config protobuf nodejs"
+makedepends="libzstd-devel nodejs-devel openssl-devel"
 depends="python3-PyQt5-webengine python3-requests python3-SQLAlchemy
  python3-PyAudio python3-mpv python3-Markdown python3-send2trash
  python3-BeautifulSoup4 python3-decorator python3-jsonschema"
@@ -11,8 +14,13 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="AGPL-3.0-or-later"
 homepage="https://apps.ankiweb.net"
 changelog="https://apps.ankiweb.net/docs/changes.html"
-distfiles="https://apps.ankiweb.net/downloads/archive/anki-$version-source.tgz"
-checksum=5a53760164c77d619f55107a13099cffe620566a7f610b61b6c4b52487f3bb89
+distfiles="https://github.com/ankitects/anki/archive/refs/tags/$version.tar.gz"
+checksum=ca1c37e8e32bec02f09421bd29ac67253e4039e705bf9fba919918c4559b48e8
+# "Python, node and protoc are downloaded as part of the build. You can optionally define PYTHON_BINARY, NODE_BINARY and/or PROTOC_BINARY to use locally-installed versions instead."
+export PYTHON_BINARY=/usr/bin/python3
+export PROTOC_BINARY=/usr/bin/protoc
+export NODE_BINARY=/usr/bin/node
+export RUST_BACKTRACE=full # XXX only to debug those "helpful" error messages ("file not found" -- WHAT FILE?!?!?!)
 
 python_version=3
 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Updated] anki: update to 2.1.65 failed
  2023-06-05 13:18 [PR PATCH] anki: updated to (TODO) loreb
  2023-06-05 13:21 ` loreb
  2023-06-08 13:13 ` [PR PATCH] [Updated] " loreb
@ 2023-06-17 12:29 ` loreb
  2023-08-27 21:31 ` acdimalev
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: loreb @ 2023-06-17 12:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1909 bytes --]

There is an updated pull request by loreb against master on the void-packages repository

https://github.com/loreb/void-packages anki
https://github.com/void-linux/void-packages/pull/44276

anki: update to 2.1.65 failed
=> anki-2.1.64_1: skipping check (XBPS_CHECK_PKGS is disabled) ...
=> anki-2.1.64_1: running pre-install hook: 00-libdir ...
=> anki-2.1.64_1: running pre-install hook: 02-script-wrapper ...
=> anki-2.1.64_1: running pre-install hook: 98-fixup-gir-path ...
=> anki-2.1.64_1: running do_install ...
error: found a virtual manifest at `/builddir/anki-2.1.64/Cargo.toml` instead of a package manifest
=> ERROR: anki-2.1.64_1: do_install: '${make_cmd} install --target ${RUST_TARGET} --root="${DESTDIR}/usr" --offline --locked ${configure_args} ${make_install_args}' exited with 101
=> ERROR:   in do_install() at common/build-style/cargo.sh:22

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/44276.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-anki-44276.patch --]
[-- Type: text/x-diff, Size: 10076 bytes --]

From 7782f949b82f79fee98cdcaada5d16e861d43362 Mon Sep 17 00:00:00 2001
From: Lorenzo Beretta <vc.net.loreb@gmail.com>
Date: Mon, 5 Jun 2023 11:11:45 +0200
Subject: [PATCH] anki: update to 2.1.65

It compiles the runner and then runner fails...

Possibly copy&paste
https://cgit.freebsd.org/ports/tree/games/anki
(or nix) to get it working
---
 srcpkgs/anki/patches/disable_popup.patch      | 12 ++---
 srcpkgs/anki/patches/fix_float.patch          | 42 ----------------
 srcpkgs/anki/patches/fix_mpv_args.patch       | 29 -----------
 srcpkgs/anki/patches/fix_profile_save.patch   | 15 ------
 srcpkgs/anki/patches/fix_unescape.patch       | 11 -----
 srcpkgs/anki/patches/wtf-git-submodules.patch | 10 ++++
 srcpkgs/anki/template                         | 49 +++++++++++++++++--
 7 files changed, 60 insertions(+), 108 deletions(-)
 delete mode 100644 srcpkgs/anki/patches/fix_float.patch
 delete mode 100644 srcpkgs/anki/patches/fix_mpv_args.patch
 delete mode 100644 srcpkgs/anki/patches/fix_profile_save.patch
 delete mode 100644 srcpkgs/anki/patches/fix_unescape.patch
 create mode 100644 srcpkgs/anki/patches/wtf-git-submodules.patch

diff --git a/srcpkgs/anki/patches/disable_popup.patch b/srcpkgs/anki/patches/disable_popup.patch
index 8b7a041fc656..096b427ea626 100644
--- a/srcpkgs/anki/patches/disable_popup.patch
+++ b/srcpkgs/anki/patches/disable_popup.patch
@@ -1,10 +1,10 @@
---- a/aqt/update.py
-+++ b/aqt/update.py
-@@ -31,6 +31,7 @@ class LatestVersionFinder(QThread):
-         return d
+--- a/qt/aqt/update.py
++++ b/qt/aqt/update.py
+@@ -33,6 +33,7 @@ class LatestVersionFinder(QThread):
+         }
  
-     def run(self):
+     def run(self) -> None:
 +        return
-         if not self.config['updates']:
+         if not self.config["updates"]:
              return
          d = self._data()
diff --git a/srcpkgs/anki/patches/fix_float.patch b/srcpkgs/anki/patches/fix_float.patch
deleted file mode 100644
index 333d76c8efd7..000000000000
--- a/srcpkgs/anki/patches/fix_float.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- a/aqt/deckconf.py
-+++ b/aqt/deckconf.py
-@@ -172,7 +172,7 @@ class DeckConf(QDialog):
-         f.lrnGradInt.setValue(c['ints'][0])
-         f.lrnEasyInt.setValue(c['ints'][1])
-         f.lrnEasyInt.setValue(c['ints'][1])
--        f.lrnFactor.setValue(c['initialFactor']/10.0)
-+        f.lrnFactor.setValue(c['initialFactor']//10)
-         f.newOrder.setCurrentIndex(c['order'])
-         f.newPerDay.setValue(c['perDay'])
-         f.bury.setChecked(c.get("bury", True))
-@@ -180,7 +180,7 @@ class DeckConf(QDialog):
-         # rev
-         c = self.conf['rev']
-         f.revPerDay.setValue(c['perDay'])
--        f.easyBonus.setValue(c['ease4']*100)
-+        f.easyBonus.setValue(int(c['ease4'])*100)
-         f.fi1.setValue(c['ivlFct']*100)
-         f.maxIvl.setValue(c['maxIvl'])
-         f.revplim.setText(self.parentLimText('rev'))
-@@ -192,7 +192,7 @@ class DeckConf(QDialog):
-         # lapse
-         c = self.conf['lapse']
-         f.lapSteps.setText(self.listToUser(c['delays']))
--        f.lapMult.setValue(c['mult']*100)
-+        f.lapMult.setValue(int(c['mult'])*100)
-         f.lapMinInt.setValue(c['minInt'])
-         f.leechThreshold.setValue(c['leechFails'])
-         f.leechAction.setCurrentIndex(c['leechAction'])
---- a/aqt/preferences.py
-+++ b/aqt/preferences.py
-@@ -77,8 +77,8 @@ class Preferences(QDialog):
-             f.hwAccel.setVisible(False)
-         else:
-             f.hwAccel.setChecked(self.mw.pm.glMode() != "software")
--        f.lrnCutoff.setValue(qc['collapseTime']/60.0)
--        f.timeLimit.setValue(qc['timeLim']/60.0)
-+        f.lrnCutoff.setValue(qc['collapseTime']//60)
-+        f.timeLimit.setValue(qc['timeLim']//60)
-         f.showEstimates.setChecked(qc['estTimes'])
-         f.showProgress.setChecked(qc['dueCounts'])
-         f.nightMode.setChecked(qc.get("nightMode", False))
diff --git a/srcpkgs/anki/patches/fix_mpv_args.patch b/srcpkgs/anki/patches/fix_mpv_args.patch
deleted file mode 100644
index 0b99dd8fe856..000000000000
--- a/srcpkgs/anki/patches/fix_mpv_args.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/anki/mpv.py
-+++ b/anki/mpv.py
-@@ -104,9 +104,9 @@
-         """
-         self.argv = [self.executable]
-         self.argv += self.default_argv
--        self.argv += ["--input-ipc-server", self._sock_filename]
-+        self.argv += ["--input-ipc-server="+self._sock_filename]
-         if self.window_id is not None:
--            self.argv += ["--wid", str(self.window_id)]
-+            self.argv += ["--wid="+str(self.window_id)]
- 
-     def _start_process(self):
-         """Start the mpv process.
-
---- a/anki/sound.py
-+++ b/anki/sound.py
-@@ -123,10 +123,7 @@
- 
- def setMpvConfigBase(base):
-     mpvConfPath = os.path.join(base, "mpv.conf")
--    MpvManager.default_argv += [
--        "--no-config",
--        "--include="+mpvConfPath,
--    ]
-+    MpvManager.default_argv += ["--include="+mpvConfPath]
- 
- mpvManager = None
- 
diff --git a/srcpkgs/anki/patches/fix_profile_save.patch b/srcpkgs/anki/patches/fix_profile_save.patch
deleted file mode 100644
index 9d72a1a20e82..000000000000
--- a/srcpkgs/anki/patches/fix_profile_save.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Fixes crash related to saving profile data on exit.
---- a/aqt/profiles.py
-+++ b/aqt/profiles.py
-@@ -160,7 +160,10 @@ a flash drive.""" % self.base)
-         return up.load()
- 
-     def _pickle(self, obj):
--        return pickle.dumps(obj, protocol=0)
-+        for key, val in obj.items():
-+            if isinstance(val, QByteArray):
-+                obj[key] = bytes(val)  # type: ignore
-+        return pickle.dumps(obj, protocol=4)
- 
-     def load(self, name):
-         assert name != "_global"
diff --git a/srcpkgs/anki/patches/fix_unescape.patch b/srcpkgs/anki/patches/fix_unescape.patch
deleted file mode 100644
index f7024bc7bf15..000000000000
--- a/srcpkgs/anki/patches/fix_unescape.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/aqt/reviewer.py
-+++ b/aqt/reviewer.py
-@@ -359,7 +359,7 @@
-         cor = stripHTML(cor)
-         # ensure we don't chomp multiple whitespace
-         cor = cor.replace(" ", "&nbsp;")
--        cor = parser.unescape(cor)
-+        cor = html.unescape(cor)
-         cor = cor.replace("\xa0", " ")
-         cor = cor.strip()
-         given = self.typedAnswer
diff --git a/srcpkgs/anki/patches/wtf-git-submodules.patch b/srcpkgs/anki/patches/wtf-git-submodules.patch
new file mode 100644
index 000000000000..cc3b68f04244
--- /dev/null
+++ b/srcpkgs/anki/patches/wtf-git-submodules.patch
@@ -0,0 +1,10 @@
+--- a/rslib/i18n/build/main.rs
++++ b/rslib/i18n/build/main.rs
+@@ -25,6 +25,7 @@ fn main() {
+     // write strings.json file to requested path
+     println!("cargo:rerun-if-env-changed=STRINGS_JSON");
+     if let Some(path) = option_env!("STRINGS_JSON") {
++        println!("STRINGS_JSON({})", path);
+         let meta_json = serde_json::to_string_pretty(&modules).unwrap();
+         fs::write(path, meta_json).unwrap();
+     }
diff --git a/srcpkgs/anki/template b/srcpkgs/anki/template
index ead0f33a1df7..a0facce5b9e7 100644
--- a/srcpkgs/anki/template
+++ b/srcpkgs/anki/template
@@ -1,8 +1,11 @@
 # Template file for 'anki'
 pkgname=anki
-version=2.1.15
-revision=6
-build_style=gnu-makefile
+version=2.1.65
+revision=1
+# XXX "The Rust version pinned in rust-toolchain.toml will be automatically downloaded if not yet installed"
+build_style=cargo
+hostmakedepends="pkg-config protobuf nodejs ninja yarn git tar"
+makedepends="libzstd-devel nodejs-devel openssl-devel"
 depends="python3-PyQt5-webengine python3-requests python3-SQLAlchemy
  python3-PyAudio python3-mpv python3-Markdown python3-send2trash
  python3-BeautifulSoup4 python3-decorator python3-jsonschema"
@@ -11,11 +14,47 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="AGPL-3.0-or-later"
 homepage="https://apps.ankiweb.net"
 changelog="https://apps.ankiweb.net/docs/changes.html"
-distfiles="https://apps.ankiweb.net/downloads/archive/anki-$version-source.tgz"
-checksum=5a53760164c77d619f55107a13099cffe620566a7f610b61b6c4b52487f3bb89
+_i18n_git=331f05bf02563582164755c68db1ba188224b202
+_ftl_git=1fbf87bb8a7d441482e79b3b8c2e06479e9fa978
+distfiles="https://github.com/ankitects/anki/archive/refs/tags/$version.tar.gz
+ https://github.com/ankitects/anki-core-i18n/archive/${_i18n_git}.tar.gz>anki-core-i18n-${_i18n_git}.tar.gz
+ https://github.com/ankitects/anki-desktop-ftl/archive/${_ftl_git}.tar.gz>anki-desktop-ftl-${_ftl_git}.tar.gz"
+checksum="ca1c37e8e32bec02f09421bd29ac67253e4039e705bf9fba919918c4559b48e8
+fec92648b650a99872a38d6487cd1765d1fc46962eb14018343ab81b4de21ffe
+85c6f4570b66cac1a021eb3efb7e69868d8c9b130b5c6171d459dd5bfbde321a
+"
+# "Python, node and protoc are downloaded as part of the build. You can optionally define PYTHON_BINARY, NODE_BINARY and/or PROTOC_BINARY to use locally-installed versions instead."
+export PYTHON_BINARY=/usr/bin/python3
+export PROTOC_BINARY=/usr/bin/protoc
+export NODE_BINARY=/usr/bin/node
+export RUST_BACKTRACE=full # XXX only to debug those "helpful" error messages ("file not found" -- WHAT FILE?!?!?!)
 
 python_version=3
 
+pre_patch() {
+	# aren't git submodules lovely?
+	# anki$version now contains anki$version + i18n + ...
+	( cd anki-"$version" && tar cpf - . ) | tar xpf - && rm -fr anki-"$version"
+	( cd anki-core-i18n-"$_i18n_git" && tar cpf - . ) | ( cd ftl/core-repo && tar xpf - )
+	( cd anki-desktop-ftl-"$_ftl_git" && tar cpf - . ) | ( cd ftl/qt-repo && tar xpf - )
+}
+
+do_build() {
+	#cargo auditable build --release --locked --target ${RUST_TARGET} -p runner
+	#runner hardcodes a rust invocation...
+	cargo auditable build --locked -p runner
+}
+
+post_build() {
+	git config --global user.email "you@example.com"
+	git config --global user.name "Your Name"
+	git init -q
+	git add Cargo.toml
+	git commit -a -q -m "runner *needs* a git repository with at least one commit"
+	#./target/${RUST_TARGET}/release/runner build wheels
+	./target/debug/runner build wheels
+}
+
 post_install() {
 	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: anki: update to 2.1.65 failed
  2023-06-05 13:18 [PR PATCH] anki: updated to (TODO) loreb
                   ` (2 preceding siblings ...)
  2023-06-17 12:29 ` [PR PATCH] [Updated] anki: update to 2.1.65 failed loreb
@ 2023-08-27 21:31 ` acdimalev
  2023-08-29  9:32 ` acdimalev
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: acdimalev @ 2023-08-27 21:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 400 bytes --]

New comment by acdimalev on void-packages repository

https://github.com/void-linux/void-packages/pull/44276#issuecomment-1694766684

Comment:
Thanks for working on this.  I'm trying a different approach as well.

https://forums.ankiweb.net/t/anki-source-tarballs/33686

I've got a few reasons for wanting complete official source tarballs, so going to find out where asking nicely takes things.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: anki: update to 2.1.65 failed
  2023-06-05 13:18 [PR PATCH] anki: updated to (TODO) loreb
                   ` (3 preceding siblings ...)
  2023-08-27 21:31 ` acdimalev
@ 2023-08-29  9:32 ` acdimalev
  2023-08-29 13:00 ` loreb
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: acdimalev @ 2023-08-29  9:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2586 bytes --]

New comment by acdimalev on void-packages repository

https://github.com/void-linux/void-packages/pull/44276#issuecomment-1697092248

Comment:
That went nowhere fast.

Just in case anyone else has been bit by the same problem.  Upgrading Anki on my phone automatically enabled the following feature that broke Anki on my desktop:

Settings / Reviewing / New timezone handling

Disabled that and it's working again.

Building Recent versions of Anki in Void looks a bit like a mess.  It's worth noting that the docs call out musl as being explicitly not supported.  But just trying to get the thing to build at all, this is what I've got.

```
# force use of OS binaries
export NODE_BINARY=/usr/bin/node
export PROTOC_BINARY=/usr/bin/protoc
export PYTHON_BINARY=/usr/bin/python3
export YARN_BINARY=/usr/bin/yarn
export PYTHONPATH=/usr/lib/python3.11/site-packages

# disable all pyenv package installation
echo > python/requirements.base.txt
echo > python/requirements.dev.txt
echo > python/requirements.qt6_lin.txt

# add runtime dependencies...
# black
# python3-Flask
# python3-Flask-Cors
# python3-protobuf
# python3-waitress

# disable use of pip-sync
# --- a/build/runner/src/pyenv.rs
# +++ b/build/runner/src/pyenv.rs
# @@ -25,7 +25,6 @@ pub fn setup_pyenv(args: PyenvArgs) {
#
#      let pyenv_bin_folder = pyenv_folder.join(if cfg!(windows) { "scripts" } else { "bin" });
#      let pyenv_python = pyenv_bin_folder.join("python");
# -    let pip_sync = pyenv_bin_folder.join("pip-sync");
#
#      if !pyenv_python.exists() {
#          run_silent(
# @@ -52,6 +51,4 @@ pub fn setup_pyenv(args: PyenvArgs) {
#              &args.initial_reqs,
#          ]));
#      }
# -
# -    run_silent(Command::new(pip_sync).args(&args.reqs));
#  }

# disable protobuf mypy output
# maybe there's a dependency that would satisfy this...
# --- a/build/configure/src/python.rs
# +++ b/build/configure/src/python.rs
# @@ -86,9 +86,7 @@ pub struct GenPythonProto {
#  impl BuildAction for GenPythonProto {
#      fn command(&self) -> &str {
#          "$protoc $
# -        --plugin=protoc-gen-mypy=$protoc-gen-mypy $
#          --python_out=$builddir/pylib $
# -        --mypy_out=$builddir/pylib $
#          -Iproto $in"
#      }
# EOD

# build
tools/build
```

This results in the output of a couple wheel files which _should_ be installable via normal means, but I've run out of steam for testing at the moment.

```
$ ls -1 out/wheels/
anki-2.1.65-cp39-abi3-manylinux_2_28_x86_64.whl
aqt-2.1.65-py3-none-any.whl
```

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: anki: update to 2.1.65 failed
  2023-06-05 13:18 [PR PATCH] anki: updated to (TODO) loreb
                   ` (4 preceding siblings ...)
  2023-08-29  9:32 ` acdimalev
@ 2023-08-29 13:00 ` loreb
  2023-11-28  1:46 ` github-actions
  2023-12-12  1:47 ` [PR PATCH] [Closed]: " github-actions
  7 siblings, 0 replies; 9+ messages in thread
From: loreb @ 2023-08-29 13:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 559 bytes --]

New comment by loreb on void-packages repository

https://github.com/void-linux/void-packages/pull/44276#issuecomment-1697401478

Comment:
lol, that makes two of us!

In my case I've decided that mnemosyne can import all my cards and it builds without much trouble (and much more quickly); if you ever feel like giving it another try, I can only recommend that you read the bug about anki being too hard to build, then look at the work done by the guys who packaged it for nix and freebsd, pick whichever you find more readable and do exactly what they do.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: anki: update to 2.1.65 failed
  2023-06-05 13:18 [PR PATCH] anki: updated to (TODO) loreb
                   ` (5 preceding siblings ...)
  2023-08-29 13:00 ` loreb
@ 2023-11-28  1:46 ` github-actions
  2023-12-12  1:47 ` [PR PATCH] [Closed]: " github-actions
  7 siblings, 0 replies; 9+ messages in thread
From: github-actions @ 2023-11-28  1:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/44276#issuecomment-1828929986

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Closed]: anki: update to 2.1.65 failed
  2023-06-05 13:18 [PR PATCH] anki: updated to (TODO) loreb
                   ` (6 preceding siblings ...)
  2023-11-28  1:46 ` github-actions
@ 2023-12-12  1:47 ` github-actions
  7 siblings, 0 replies; 9+ messages in thread
From: github-actions @ 2023-12-12  1:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1760 bytes --]

There's a closed pull request on the void-packages repository

anki: update to 2.1.65 failed
https://github.com/void-linux/void-packages/pull/44276

Description:
=> anki-2.1.64_1: skipping check (XBPS_CHECK_PKGS is disabled) ...
=> anki-2.1.64_1: running pre-install hook: 00-libdir ...
=> anki-2.1.64_1: running pre-install hook: 02-script-wrapper ...
=> anki-2.1.64_1: running pre-install hook: 98-fixup-gir-path ...
=> anki-2.1.64_1: running do_install ...
error: found a virtual manifest at `/builddir/anki-2.1.64/Cargo.toml` instead of a package manifest
=> ERROR: anki-2.1.64_1: do_install: '${make_cmd} install --target ${RUST_TARGET} --root="${DESTDIR}/usr" --offline --locked ${configure_args} ${make_install_args}' exited with 101
=> ERROR:   in do_install() at common/build-style/cargo.sh:22

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-12-12  1:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-05 13:18 [PR PATCH] anki: updated to (TODO) loreb
2023-06-05 13:21 ` loreb
2023-06-08 13:13 ` [PR PATCH] [Updated] " loreb
2023-06-17 12:29 ` [PR PATCH] [Updated] anki: update to 2.1.65 failed loreb
2023-08-27 21:31 ` acdimalev
2023-08-29  9:32 ` acdimalev
2023-08-29 13:00 ` loreb
2023-11-28  1:46 ` github-actions
2023-12-12  1:47 ` [PR PATCH] [Closed]: " github-actions

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).