Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 118 additions & 0 deletions srcpkgs/calibre/patches/0001-Disable-piper.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
From ef8fbea5ff37a4145bdbed91fdc8a6bdfdfc81ea Mon Sep 17 00:00:00 2001
From: Patrick Poitras <patrick@pfpoitras.com>
Date: Wed, 6 May 2026 19:14:43 -0700
Subject: [PATCH] Disable piper

---
setup/build.py | 8 ++++++++
setup/commands.py | 5 -----
setup/resources.py | 2 +-
src/calibre/gui2/tts/types.py | 5 +++--
src/calibre/test_build.py | 3 ++-
src/calibre/utils/run_tests.py | 5 +++--
6 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/setup/build.py b/setup/build.py
index 956ad7504f..54a5f1236a 100644
--- a/setup/build.py
+++ b/setup/build.py
@@ -444,6 +444,14 @@ def run(self, opts):
continue
if not is_ext_allowed(self.compiling_for, ext):
continue
+################################################################################
+# Void linux patch. The piper extension relies on `onnx` which isn't
+# packaged for void. It would also require espeak-ng > 1.52 also unpackaged
+# (last release is Dec 2024 and is missing the
+# espeak_TextToPhonemesWithTerminator() function.)
+################################################################################
+ if ext.name == "piper":
+ continue
if ext.error:
if ext.optional:
self.warn(ext.error)
diff --git a/setup/commands.py b/setup/commands.py
index faba5b437a..96e5682ce6 100644
--- a/setup/commands.py
+++ b/setup/commands.py
@@ -31,7 +31,6 @@
'manual',
'mathjax',
'osx',
- 'piper_voices',
'pot',
'publish',
'publish_betas',
@@ -95,10 +94,6 @@

hyphenation = Hyphenation()

-from setup.piper import PiperVoices
-
-piper_voices = PiperVoices()
-
from setup.liberation import LiberationFonts

liberation_fonts = LiberationFonts()
diff --git a/setup/resources.py b/setup/resources.py
index fbd918c5df..64a60bd0bf 100644
--- a/setup/resources.py
+++ b/setup/resources.py
@@ -104,7 +104,7 @@ def run(self, opts):
class Resources(Command): # {{{

description = 'Compile various needed calibre resources'
- sub_commands = ['liberation_fonts', 'mathjax', 'rapydscript', 'hyphenation', 'piper_voices']
+ sub_commands = ['liberation_fonts', 'mathjax', 'rapydscript', 'hyphenation']

def run(self, opts):
from calibre.utils.serialize import msgpack_dumps
diff --git a/src/calibre/gui2/tts/types.py b/src/calibre/gui2/tts/types.py
index a9ef058ae4..0db9b3dcc3 100644
--- a/src/calibre/gui2/tts/types.py
+++ b/src/calibre/gui2/tts/types.py
@@ -236,8 +236,9 @@ def qt_engine_metadata(name: str, human_name: str, desc: str, allows_choosing_au
continue

try:
- import calibre_extensions.piper as check_that_piper_imports
- del check_that_piper_imports
+ # import calibre_extensions.piper as check_that_piper_imports
+ # del check_that_piper_imports
+ pass
except ImportError:
pass
else:
diff --git a/src/calibre/test_build.py b/src/calibre/test_build.py
index b60e2f1cd6..bfbed35e56 100644
--- a/src/calibre/test_build.py
+++ b/src/calibre/test_build.py
@@ -158,7 +158,8 @@ def test_plugins(self):
# Just check that the DLL can be loaded
ctypes.CDLL(os.path.join(plugins_loc, name + ('.dylib' if ismacos else '.so')))
continue
- import_module('calibre_extensions.' + name)
+ if 'piper' not in name:
+ import_module('calibre_extensions.' + name)

def test_lxml(self):
from calibre.utils.cleantext import test_clean_xml_chars
diff --git a/src/calibre/utils/run_tests.py b/src/calibre/utils/run_tests.py
index 19853589ff..7e880dff58 100644
--- a/src/calibre/utils/run_tests.py
+++ b/src/calibre/utils/run_tests.py
@@ -190,8 +190,9 @@ def test_import_of_all_python_modules(self):
'calibre.utils.linux_trash', 'calibre.utils.open_with.linux',
'calibre.gui2.linux_file_dialogs',
}
- if 'SKIP_SPEECH_TESTS' in os.environ:
- exclude_packages.add('calibre.gui2.tts')
+ exclude_packages.add('calibre.gui2.tts')
+ exclude_packages.add('calibre.utils.tts')
+ exclude_modules.add('calibre.gui2.tts.piper')
if not isbsd:
exclude_modules.add('calibre.devices.usbms.hal')
d = os.path.dirname
--
2.54.0

106 changes: 0 additions & 106 deletions srcpkgs/calibre/patches/py313-re-scanner.patch

This file was deleted.

11 changes: 0 additions & 11 deletions srcpkgs/calibre/patches/qt610.patch

This file was deleted.

15 changes: 9 additions & 6 deletions srcpkgs/calibre/template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Template file for 'calibre'
pkgname=calibre
version=8.7.0
revision=4
version=9.8.0
revision=1
build_helper=python3
pycompile_dirs="/usr/lib/calibre/"
hostmakedepends="pkg-config cmake python3-BeautifulSoup4 python3-Pillow
Expand All @@ -17,7 +17,7 @@ makedepends="libinput-devel libmagick-devel libmtp-devel libstemmer-devel
python3-pyqt6-gui python3-pyqt6-svg python3-pyqt6-widgets python3-pyqt6-network
python3-pyqt6-printsupport python3-pyqt6-webengine python3-pyqt6-webchannel
qt6-base-private-devel python3-pyqt6-bindings python3-pyqt6-webengine-devel
ffmpeg6-devel"
ffmpeg6-devel python3-tzlocal"
depends="desktop-file-utils optipng poppler python3-BeautifulSoup4
qt6-imageformats python3-Pygments python3-pycryptodome python3-xxhash
python3-Markdown python3-Pillow python3-zeroconf python3-Pygments python3-apsw
Expand All @@ -31,15 +31,15 @@ depends="desktop-file-utils optipng poppler python3-BeautifulSoup4
python3-pyqt6-printsupport python3-pyqt6-webchannel python3-pyqt6-svg
python3-pyqt6-pdf python3-pyqt6-webengine python3-fonttools
python3-pyqt6-speech python3-pyqt6-multimedia python3-pykakasi
python3-lxml_html_clean"
python3-lxml_html_clean python3-tzlocal"
checkdepends="${depends} libjpeg-turbo-tools jxrlib"
short_desc="Ebook management application"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-only"
homepage="https://calibre-ebook.com"
changelog="https://raw.githubusercontent.com/kovidgoyal/calibre/master/Changelog.txt"
distfiles="https://download.calibre-ebook.com/${version}/calibre-${version}.tar.xz"
checksum=2cfe587e3773d8607fe8bbefbcd77b5cfb816124cac89e491353deb8f2fa9324
checksum=ddd916a246fc821e093dbac1b09f5d1b2fc84b53df36b014efbe6ac68f0268ef
python_version=3
lib32disabled=yes
nocross="python3 setup.py gui"
Expand Down Expand Up @@ -186,14 +186,17 @@ do_check() {
# test_recipe_browser_webengine case fails on ci
# test_piper not packaged
# test_websocket_basic fails
# test_tzdata fails because we don't specifically
# use pip-packaged version of tzdata
python3 setup.py test \
--exclude-test-name unrar \
--exclude-test-name qt \
--exclude-test-name searching \
--exclude-test-name test_dom_load \
--exclude-test-name test_recipe_browser_webengine \
--exclude-test-name test_piper \
--exclude-test-name test_websocket_basic
--exclude-test-name test_websocket_basic \
--exclude-test-name test_tzdata
}

do_install() {
Expand Down