Compare commits

...

8 Commits

8 changed files with 34 additions and 146 deletions

View File

@@ -1,12 +0,0 @@
diff -ru calibre.orig/src/calibre/ebooks/oeb/stylizer.py calibre/src/calibre/ebooks/oeb/stylizer.py
--- calibre.orig/src/calibre/ebooks/oeb/stylizer.py 2011-03-18 19:22:30.000000000 +0100
+++ calibre/src/calibre/ebooks/oeb/stylizer.py 2012-12-23 14:27:31.670272511 +0100
@@ -16,7 +16,7 @@
CSSValueList, CSSFontFaceRule, cssproperties
from cssutils import profile as cssprofiles
from lxml import etree
-from lxml.cssselect import css_to_xpath, ExpressionError, SelectorSyntaxError
+from cssselect import GenericTranslator
from calibre.ebooks.oeb.base import XHTML, XHTML_NS, CSS_MIME, OEB_STYLES
from calibre.ebooks.oeb.base import XPNSMAP, xpath, urlnormalize
from calibre.ebooks.oeb.profile import PROFILES

View File

@@ -1,10 +0,0 @@
--- calibre/src/calibre/ebooks/pdf/images.cpp.orig 2012-12-23 13:03:09.695517787 +0100
+++ calibre/src/calibre/ebooks/pdf/images.cpp 2012-12-23 13:03:25.011366729 +0100
@@ -16,6 +16,7 @@
#include "images.h"
#include "utils.h"
+#include <zlib.h>
#ifdef _WIN32
inline double round(double x) { return (x-floor(x))>0.5 ? ceil(x) : floor(x); }

View File

@@ -1,35 +0,0 @@
diff -Nru calibre.orig/src/calibre/ebooks/pdf/images.cpp calibre/src/calibre/ebooks/pdf/images.cpp
--- calibre.orig/src/calibre/ebooks/pdf/images.cpp 2011-04-30 17:48:24.000000000 +0200
+++ calibre/src/calibre/ebooks/pdf/images.cpp 2012-12-23 12:57:00.432159785 +0100
@@ -125,7 +125,7 @@
if (img->type == jpeg) {
int c;
- str = ((DCTStream *)str)->getRawStream();
+ str = str->getNextStream();
str->reset();
// copy the stream
diff -Nru calibre.orig/src/calibre/ebooks/pdf/reflow.cpp calibre/src/calibre/ebooks/pdf/reflow.cpp
--- calibre.orig/src/calibre/ebooks/pdf/reflow.cpp 2012-12-23 12:53:29.336535948 +0100
+++ calibre/src/calibre/ebooks/pdf/reflow.cpp 2012-12-23 12:57:28.503882918 +0100
@@ -625,7 +625,7 @@
return oss.str();
}
-void XMLOutputDev::process_link(Link* link){
+void XMLOutputDev::process_link(AnnotLink* link){
double _x1, _y1, _x2, _y2;
int x1, y1, x2, y2;
diff -Nru calibre.orig/src/calibre/ebooks/pdf/reflow.h calibre/src/calibre/ebooks/pdf/reflow.h
--- calibre.orig/src/calibre/ebooks/pdf/reflow.h 2011-04-30 17:48:24.000000000 +0200
+++ calibre/src/calibre/ebooks/pdf/reflow.h 2012-12-23 12:57:53.359637768 +0100
@@ -244,6 +244,6 @@
XMLImages *images;
PDFDoc *doc;
- void process_link(Link* link);
+ void process_link(AnnotLink* link);
};
}

View File

@@ -1,20 +0,0 @@
--- calibre/src/calibre/ebooks/pdf/reflow.cpp 2012-05-17 14:44:05.000000000 +0200
+++ calibre/src/calibre/ebooks/pdf/reflow.cpp 2012-05-17 14:54:04.000000000 +0200
@@ -648,7 +648,7 @@ void XMLOutputDev::process_link(AnnotLin
void XMLOutputDev::endPage() {
- Links *slinks = catalog->getPage(current_page->number())->getLinks(catalog);
+ Links *slinks = catalog->getPage(current_page->number())->getLinks();
for (int i = 0; i < slinks->getNumLinks(); i++)
{
this->process_link(slinks->getLink(i));
@@ -879,7 +879,7 @@ vector<char>* Reflow::render_first_page(
throw ReflowException("Failed to allocate SplashOutputDev");
}
try {
- out->startDoc(doc->getXRef());
+ out->startDoc(doc);
out->startPage(1, NULL);
double pg_w, pg_h;

View File

@@ -1,11 +0,0 @@
--- calibre-5.10.1/setup/translations.py.orig 2021-02-10 10:29:11.518360983 +0100
+++ calibre-5.10.1/setup/translations.py 2021-02-10 10:37:37.017022669 +0100
@@ -159,7 +159,7 @@
f.seek(0), f.truncate(), f.write('\n'.join(lines).encode('utf-8'))
break
else:
- raise SystemExit(f'Failed to add file_filter for {slug=} to config file')
+ raise SystemExit(f'Failed to add file_filter for slug= to config file')
self.git('add .tx/config')
self.upload_pot(resource=slug)
self.git(['add', dest])

View File

@@ -1,12 +0,0 @@
--- calibre-5.16.0/src/calibre/utils/formatter.py.orig 2021-04-18 14:10:24.085338098 +0200
+++ calibre-5.16.0/src/calibre/utils/formatter.py 2021-04-18 14:11:43.765791414 +0200
@@ -888,7 +888,8 @@
def do_node_first_non_empty(self, prog):
for expr in prog.expression_list:
- if v := self.expr(expr):
+ v = self.expr(expr)
+ if v:
if (self.break_reporter):
self.break_reporter(prog.node_name, v, prog.line_number)
return v

View File

@@ -1,30 +0,0 @@
diff --color -Naru a/src/calibre/devices/smart_device_app/driver.py b/src/calibre/devices/smart_device_app/driver.py
--- a/src/calibre/devices/smart_device_app/driver.py 2021-08-08 08:32:03.104016444 +0200
+++ b/src/calibre/devices/smart_device_app/driver.py 2021-08-08 08:33:30.699018403 +0200
@@ -2040,13 +2040,6 @@
# Function to monkeypatch zeroconf to remove the 15 character name length restriction.
# Copied from https://github.com/jstasiak/python-zeroconf version 0.28.1
-
-from zeroconf import (BadTypeInNameException, _HAS_A_TO_Z,
- _HAS_ONLY_A_TO_Z_NUM_HYPHEN_UNDERSCORE,
- _HAS_ASCII_CONTROL_CHARS,
- _HAS_ONLY_A_TO_Z_NUM_HYPHEN)
-
-
def service_type_name(type_: str, *, allow_underscores: bool = False) -> str:
"""
Validate a fully qualified service name, instance or subtype. [rfc6763]
@@ -2087,6 +2080,12 @@
:param type_: Type, SubType or service name to validate
:return: fully qualified service name (eg: _http._tcp.local.)
"""
+
+ from zeroconf import (BadTypeInNameException, _HAS_A_TO_Z,
+ _HAS_ONLY_A_TO_Z_NUM_HYPHEN_UNDERSCORE,
+ _HAS_ASCII_CONTROL_CHARS,
+ _HAS_ONLY_A_TO_Z_NUM_HYPHEN)
+
if not (type_.endswith('._tcp.local.') or type_.endswith('._udp.local.')):
raise BadTypeInNameException("Type '%s' must end with '._tcp.local.' or '._udp.local.'" % type_)

View File

@@ -1,5 +1,5 @@
Name: calibre
Version: 8.0.1
Version: 8.13.0
Release: 1mamba
Summary: A free and open source e-book library management application
Group: Graphical Desktop/Applications/Multimedia
@@ -8,15 +8,7 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://calibre-ebook.com
Source: https://github.com/kovidgoyal/calibre/releases/download/v%{version}/calibre-%{version}.tar.xz
#Source: https://github.com/kovidgoyal/calibre.git/v%{version}/calibre-%{version}.tar.bz2
Source1: calibre.desktop
Patch0: calibre-0.8.33-libpoppler-0.20.patch
Patch1: calibre-0.7.59-libpoppler-0.18.patch
Patch2: calibre-0.7.59-libpng-1.5.patch
Patch3: calibre-0.7.50-python-lxml.patch
Patch4: calibre-5.10.1-slug-build-fix.patch
Patch5: calibre-5.16.0-python-3.7.patch
Patch6: calibre-5.22.1-python-zeroconf-0.36.7.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@@ -26,6 +18,7 @@ BuildRequires: libQt6Widgets
BuildRequires: libavcodec-devel
BuildRequires: libavformat-devel
BuildRequires: libavutil-devel
BuildRequires: libespeak-ng-devel
BuildRequires: libfreetype-devel
BuildRequires: libgcc
BuildRequires: libglvnd-devel
@@ -34,6 +27,7 @@ BuildRequires: libhyphen-devel
BuildRequires: libicu-devel
BuildRequires: libmtp-devel
BuildRequires: libopenssl-devel
BuildRequires: libpiper-phonemize-devel
BuildRequires: libpodofo-devel
BuildRequires: libpython3-devel
BuildRequires: libpython311-devel
@@ -47,6 +41,7 @@ BuildRequires: libxkbcommon-devel
BuildRequires: libpython3-devel
BuildRequires: libpodofo-devel >= 0.10.1
BuildRequires: libwmf-devel
#BuildRequires: mathjax
BuildRequires: python-apsw-py3
BuildRequires: python-beautifulsoup4-py3
BuildRequires: python-css-parser-py3
@@ -109,15 +104,14 @@ export QTWEBENGINE_DISABLE_SANDBOX=1
export LANG='en_US.UTF-8'
#CFLAGS="%{optflags}" %{__python3} setup.py bootstrap
%{__python3} setup.py build
#%{__python3} setup.py iso639
#%{__python3} setup.py iso3166
%{__python3} setup.py iso639
%{__python3} setup.py iso3166
%{__python3} setup.py liberation_fonts --path-to-liberation_fonts %{_datadir}/fonts/liberation --system-liberation_fonts
%{__python3} setup.py mathjax --system-mathjax --path-to-mathjax %{_datadir}/mathjax
# MathJax 4 not supported
#% {__python3} setup.py mathjax --system-mathjax --path-to-mathjax %{_datadir}/mathjax
%{__python3} setup.py mathjax
%{__python3} setup.py gui
#LANG='en_US.UTF-8' %{__python3} setup.py resources
#LANG='en_US.UTF-8' %{__python3} setup.py rapydscript
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
# If this directory doesn't exist, zsh completion won't install.
@@ -146,11 +140,11 @@ install -d %{buildroot}%{_datadir}/zsh/site-functions
%{_datadir}/applications/calibre-*.desktop
%{_datadir}/metainfo/calibre-*.xml
%{_datadir}/mime/packages/calibre-mimetypes.xml
#%{_datadir}/bash-completion/completions/*
%dir %{_libdir}/calibre
%{_libdir}/calibre/*
%dir %{_datadir}/calibre
%{_datadir}/calibre/*
#%{_datadir}/bash-completion/completions/*
#%{_datadir}/zsh/site-functions/_calibre
%{_datadir}/icons/hicolor/*/apps/calibre-*.png
%{_datadir}/icons/hicolor/*/mimetypes/application-*.png
@@ -159,6 +153,30 @@ install -d %{buildroot}%{_datadir}/zsh/site-functions
%{python3_sitearch}/init_calibre.py
%changelog
* Mon Oct 20 2025 Automatic Build System <autodist@openmamba.org> 8.13.0-1mamba
- automatic version update by autodist
* Sat Oct 04 2025 Automatic Build System <autodist@openmamba.org> 8.12.0-1mamba
- automatic version update by autodist
* Fri Sep 12 2025 Automatic Build System <autodist@openmamba.org> 8.10.0-1mamba
- automatic version update by autodist
* Fri Aug 22 2025 Automatic Build System <autodist@openmamba.org> 8.9.0-1mamba
- automatic version update by autodist
* Wed Aug 20 2025 Automatic Build System <autodist@openmamba.org> 8.8.0-1mamba
- automatic version update by autodist
* Sun May 18 2025 Silvan Calarco <silvan.calarco@mambasoft.it> 8.4.0-1mamba
- update to 8.4.0
* Fri Apr 04 2025 Automatic Build System <autodist@openmamba.org> 8.2.1-1mamba
- automatic version update by autodist
* Sat Mar 29 2025 Automatic Build System <autodist@openmamba.org> 8.1.1-1mamba
- automatic version update by autodist
* Fri Mar 21 2025 Automatic Build System <autodist@openmamba.org> 8.0.1-1mamba
- automatic version update by autodist