backports/calibre: new aport

This commit is contained in:
Antoine Martin 2024-07-03 16:43:04 -04:00
parent 7320512e66
commit 0807d658c5
2 changed files with 141 additions and 0 deletions

View file

@ -0,0 +1,25 @@
diff --color -Nur calibre-6.17.0.orig/src/calibre/gui2/update.py calibre-6.17.0/src/calibre/gui2/update.py
--- calibre-6.17.0.orig/src/calibre/gui2/update.py 2023-05-06 11:36:35.678461036 -0700
+++ calibre-6.17.0/src/calibre/gui2/update.py 2023-05-06 11:39:10.365134930 -0700
@@ -82,20 +82,6 @@
while not self.shutdown_event.is_set():
calibre_update_version = NO_CALIBRE_UPDATE
plugins_update_found = 0
- try:
- version = get_newest_version()
- if version[:2] > numeric_version[:2]:
- calibre_update_version = version
- except Exception as e:
- prints('Failed to check for calibre update:', as_unicode(e))
- try:
- update_plugins = get_plugin_updates_available(raise_error=True)
- if update_plugins is not None:
- plugins_update_found = len(update_plugins)
- except Exception as e:
- prints('Failed to check for plugin update:', as_unicode(e))
- if calibre_update_version != NO_CALIBRE_UPDATE or plugins_update_found > 0:
- self.signal.update_found.emit(calibre_update_version, plugins_update_found)
self.shutdown_event.wait(self.INTERVAL)
def shutdown(self):

116
backports/calibre/APKBUILD Normal file
View file

@ -0,0 +1,116 @@
# Maintainer: Cowington Post <cowingtonpost@gmail.com>
pkgname=calibre
pkgver=7.12.0
pkgrel=0
pkgdesc="Ebook management application"
# qt6-webengine
arch="x86_64 aarch64"
url="https://calibre-ebook.com"
license="GPL-3.0-or-later"
depends="
font-liberation
libwmf
mtdev
optipng
poppler
py3-apsw
py3-beautifulsoup4
py3-css-parser
py3-cssselect
py3-dateutil
py3-dnspython
py3-feedparser
py3-fonttools
py3-html2text
py3-html5-parser
py3-html5lib
py3-jeepney
py3-lxml
py3-markdown
py3-mechanize
py3-msgpack
py3-netifaces
py3-pillow
py3-psutil
py3-pycryptodome
py3-pygments
py3-pyqt6-webengine
py3-regex
py3-xxhash
py3-zeroconf
qt6-qtimageformats
qt6-qtsvg
qt6-qtwebengine
udisks2
"
makedepends="
cmake
curl
hunspell-dev
hyphen-dev
libmtp-dev
libstemmer-dev
libusb-dev
podofo-dev
py3-pyqt-builder
py3-pyqt6-sip
py3-sip
python3-dev
qt6-qtbase-dev
uchardet-dev
xdg-utils
"
subpackages="
$pkgname-pyc
$pkgname-doc
$pkgname-bash-completion
$pkgname-zsh-completion
"
source="https://download.calibre-ebook.com/$pkgver/calibre-$pkgver.tar.xz
0001-$pkgname-no-update.patch
"
# net: downloads iso-codes
# !check: no tests ran
options="net !check"
export LANG="en_US.UTF-8"
prepare() {
default_prepare
rm -f resources/calibre-portable.*
}
build() {
python3 setup.py build
python3 setup.py iso639
python3 setup.py iso3166
python3 setup.py liberation_fonts --system-liberation_fonts --path-to-liberation_fonts /usr/share/fonts/liberation
python3 setup.py mathjax
python3 setup.py gui
}
check() {
python3 -m unittest discover
}
package() {
# needed for zsh
mkdir -p "$pkgdir"/usr/share/zsh/site-functions
python3 setup.py install \
--staging-root="$pkgdir"/usr \
--no-compile \
--system-plugins-location=/usr/share/calibre/system-plugins
cp -a man-pages/ "$pkgdir"/usr/share/man
rm -r "$pkgdir"/usr/share/calibre/rapydscript/
python3 -m compileall -fq "$pkgdir"/usr
}
sha512sums="
ee654260d7047f0579a659b8907439a407fb561affcef84141126840452e7b98d10bb5e0a69e0cc809d9ba68729570900a0e7251f18b2056a94b0213880f1363 calibre-7.12.0.tar.xz
eb8e7ce40ff8b8daf6e7e55a5dff8ec4dff06c45744266bb48b3194e92ab1196bc91468203e3c2ca1e5144166a7d6be90e6cf0253513e761b56a4c85be4c2c76 0001-calibre-no-update.patch
"