summaryrefslogtreecommitdiffstats
path: root/office/calibre
diff options
context:
space:
mode:
Diffstat (limited to 'office/calibre')
-rw-r--r--office/calibre/calibre.SlackBuild10
-rw-r--r--office/calibre/calibre.info8
-rw-r--r--office/calibre/patches/icu.patch31
-rw-r--r--office/calibre/patches/qt-5.15.patch40
-rw-r--r--office/calibre/patches/remove-desktop-integration.patch13
5 files changed, 87 insertions, 15 deletions
diff --git a/office/calibre/calibre.SlackBuild b/office/calibre/calibre.SlackBuild
index 048798bcf9..ef72f00a09 100644
--- a/office/calibre/calibre.SlackBuild
+++ b/office/calibre/calibre.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=calibre
-VERSION=${VERSION:-3.34.0}
+VERSION=${VERSION:-3.48.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -70,6 +70,10 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# Patch for the newer icu4c
+patch -p1 < $CWD/patches/icu.patch
+# Patch for qt-5.15.x
+patch -p1 < $CWD/patches/qt-5.15.patch
# Remove desktop integration. We'll do that later.
patch -p1 < $CWD/patches/remove-desktop-integration.patch
# Fix calibre module location.
@@ -79,10 +83,6 @@ patch -p1 < $CWD/patches/calibre-no-update.patch
# Remove calibre portable scripts.
rm -f resources/calibre-portable.*
-PYTHONVER=$(python -V 2>&1 | cut -f 2 -d' ' | cut -f 1-2 -d.)
-export SIP_BIN=/usr/bin/python2-sip
-export SIP_INC_DIR="/usr/include/python$PYTHONVER/python2-sip"
-
OVERRIDE_CFLAGS="$SLKCFLAGS" \
OVERRIDE_LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \
python setup.py build
diff --git a/office/calibre/calibre.info b/office/calibre/calibre.info
index ef7454be15..a2716dfff7 100644
--- a/office/calibre/calibre.info
+++ b/office/calibre/calibre.info
@@ -1,10 +1,10 @@
PRGNAM="calibre"
-VERSION="3.34.0"
+VERSION="3.48.0"
HOMEPAGE="https://calibre-ebook.com"
-DOWNLOAD="https://download.calibre-ebook.com/3.34.0/calibre-3.34.0.tar.xz"
-MD5SUM="8d462959dba64b829529b63fd3f78b8c"
+DOWNLOAD="https://download.calibre-ebook.com/3.48.0/calibre-3.48.0.tar.xz"
+MD5SUM="ec7431dcdeea8a9d8eca3edc83bdec42"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="cssutils dnspython mechanize podofo python-dateutil netifaces psutil cssselect apsw optipng PyQt5 Pygments msgpack-python regex html5-parser dukpy unrardll"
+REQUIRES="css-parser dnspython mechanize podofo python-dateutil netifaces psutil cssselect apsw optipng PyQt5 Pygments msgpack-python regex html5-parser dukpy unrardll python2-pillow"
MAINTAINER="Larry Hajali"
EMAIL="larryhaja[at]gmail[dot]com"
diff --git a/office/calibre/patches/icu.patch b/office/calibre/patches/icu.patch
new file mode 100644
index 0000000000..498691e90a
--- /dev/null
+++ b/office/calibre/patches/icu.patch
@@ -0,0 +1,31 @@
+diff -Naur calibre-3.48.0.orig/src/calibre/utils/icu.c calibre-3.48.0/src/calibre/utils/icu.c
+--- calibre-3.48.0.orig/src/calibre/utils/icu.c 2019-09-13 04:46:46.000000000 +0200
++++ calibre-3.48.0/src/calibre/utils/icu.c 2020-12-05 09:20:59.063932000 +0100
+@@ -243,14 +243,14 @@
+
+ a = python_to_icu(a_, &asz);
+ if (a == NULL) goto end;
+- if (asz == 0) { found = TRUE; goto end; }
++ if (asz == 0) { found = true; goto end; }
+ b = python_to_icu(b_, &bsz);
+ if (b == NULL) goto end;
+
+ search = usearch_openFromCollator(a, asz, b, bsz, self->collator, NULL, &status);
+ if (U_SUCCESS(status)) {
+ pos = usearch_first(search, &status);
+- if (pos != USEARCH_DONE) found = TRUE;
++ if (pos != USEARCH_DONE) found = true;
+ }
+ end:
+ if (search != NULL) usearch_close(search);
+diff -Naur calibre-3.48.0.orig/src/calibre/utils/matcher.c calibre-3.48.0/src/calibre/utils/matcher.c
+--- calibre-3.48.0.orig/src/calibre/utils/matcher.c 2019-09-13 04:46:46.000000000 +0200
++++ calibre-3.48.0/src/calibre/utils/matcher.c 2020-12-05 09:26:57.800932000 +0100
+@@ -15,7 +15,6 @@
+ #define inline
+ #endif
+
+-typedef unsigned char bool;
+ #define TRUE 1
+ #define FALSE 0
+ #define MAX(x, y) ((x > y) ? x : y)
diff --git a/office/calibre/patches/qt-5.15.patch b/office/calibre/patches/qt-5.15.patch
new file mode 100644
index 0000000000..bfcb486e9b
--- /dev/null
+++ b/office/calibre/patches/qt-5.15.patch
@@ -0,0 +1,40 @@
+From db7007a25faefb0cc90e64dda1c0793393b9512d Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Tue, 26 May 2020 20:10:48 +0200
+Subject: [PATCH] Update fontconfig database for Qt 5.15
+
+---
+ src/calibre/headless/fontconfig_database.cpp | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/src/calibre/headless/fontconfig_database.cpp b/src/calibre/headless/fontconfig_database.cpp
+index d867f02948..96a6365ba2 100644
+--- a/src/calibre/headless/fontconfig_database.cpp
++++ b/src/calibre/headless/fontconfig_database.cpp
+@@ -295,7 +295,26 @@ static const char specialLanguages[][6] = {
+ "", // MasaramGondi
+ "", // Nushu
+ "", // Soyombo
++#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
++ "", // ZanabazarSquare
++ "", // Dogra
++ "", // GunjalaGondi
++ "", // HanifiRohingya
++ "", // Makasar
++ "", // Medefaidrin
++ "", // OldSogdian
++ "", // Sogdian
++ "", // Elymaic
++ "", // Nandinagari
++ "", // NyiakengPuachueHmong
++ "", // Wancho
++ "", // Chorasmian
++ "", // DivesAkuru
++ "", // KhitanSmallScript
++ "" // Yezidi
++#else
+ "" // ZanabazarSquare
++#endif // Qt >= 5.15
+ #else
+ "" // SignWriting
+ #endif // Qt >= 5.11
diff --git a/office/calibre/patches/remove-desktop-integration.patch b/office/calibre/patches/remove-desktop-integration.patch
index dbf54d6cb0..0272a7c6eb 100644
--- a/office/calibre/patches/remove-desktop-integration.patch
+++ b/office/calibre/patches/remove-desktop-integration.patch
@@ -1,13 +1,14 @@
-diff -Naur calibre.orig/src/calibre/linux.py calibre/src/calibre/linux.py
---- calibre.orig/src/calibre/linux.py 2012-06-29 04:53:39.000000000 +0000
-+++ calibre/src/calibre/linux.py 2012-07-03 02:57:13.834849391 +0000
-@@ -177,9 +177,6 @@
- self.mime_resources = []
+diff -Naur calibre-3.48.0.orig/src/calibre/linux.py calibre-3.48.0/src/calibre/linux.py
+--- calibre-3.48.0.orig/src/calibre/linux.py 2019-09-13 04:46:46.000000000 +0200
++++ calibre-3.48.0/src/calibre/linux.py 2020-03-04 15:02:49.789055000 +0100
+@@ -725,10 +725,6 @@
+ self.appdata_resources = []
if islinux or isbsd:
self.setup_completion()
- if islinux or isbsd:
- self.setup_desktop_integration()
-- self.create_uninstaller()
+- if not getattr(self.opts, 'staged_install', False):
+- self.create_uninstaller()
from calibre.utils.config import config_dir
if os.path.exists(config_dir):