$ git diff --patch-with-stat --summary 4e5f32c1d23f5e8e51540f65ec6f41e74e8f2dd6..33a4575c60b30b3ba08d16389aadb99a69ba3fe6
.abf.yml | 5 +++--
calibre-3.18-python-fix.patch | 13 -------------
...0-compile.patch => calibre-6.12.0-compile.patch | 16 +++++++---------
...nousrlib.patch => calibre-6.12.0-nousrlib.patch | 13 +++++++------
calibre-6.12.0-python-fix.patch | 13 +++++++++++++
calibre.spec | 22 +++++++++++++++-------
6 files changed, 45 insertions(+), 37 deletions(-)
delete mode 100644 calibre-3.18-python-fix.patch
rename calibre-5.34.0-compile.patch => calibre-6.12.0-compile.patch (56%)
rename calibre-4.21.0-nousrlib.patch => calibre-6.12.0-nousrlib.patch (51%)
create mode 100644 calibre-6.12.0-python-fix.patch
diff --git a/.abf.yml b/.abf.yml
index e1f4c86..1b44269 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,3 +1,4 @@
sources:
- hyphenation-dictionaries.tar.gz: 4134ad7ef98596d64dc0889b192ceb3f1e60f3e9
- calibre-6.11.0.tar.xz: e06525c5aee819a71c502dca6418e64fb34b40f7
+ MathJax-3.1.4.tar.gz: 404ca907dab3608c023e5b05d50bce2cda59ec01
+ calibre-6.13.0.tar.xz: 00034590d6567019f4e4376681c8eb69caa7fa22
+ hyphenation-dictionaries.tar.gz: 26092ce2ac14470bf1f71f0f4c76687aa1058918
diff --git a/calibre-3.18-python-fix.patch b/calibre-3.18-python-fix.patch
deleted file mode 100644
index e73204f..0000000
--- a/calibre-3.18-python-fix.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -up calibre-6.5.0/setup/build.py.3~ calibre-6.5.0/setup/build.py
---- calibre-6.5.0/setup/build.py.3~ 2022-09-18 17:11:58.452909480 +0200
-+++ calibre-6.5.0/setup/build.py 2022-09-18 17:11:58.469576235 +0200
-@@ -10,7 +10,8 @@ from collections import namedtuple
- from setup import Command, islinux, isbsd, isfreebsd, ismacos, ishaiku, SRC, iswindows
- isunix = islinux or ismacos or isbsd or ishaiku
-
--py_lib = os.path.join(sys.prefix, 'libs', 'python%d%d.lib' % sys.version_info[:2])
-+from distutils import sysconfig
-+py_lib = '-lpython'+sysconfig.get_python_version()
- CompileCommand = namedtuple('CompileCommand', 'cmd src dest')
- LinkCommand = namedtuple('LinkCommand', 'cmd objects dest')
-
diff --git a/calibre-5.34.0-compile.patch b/calibre-6.12.0-compile.patch
similarity index 56%
rename from calibre-5.34.0-compile.patch
rename to calibre-6.12.0-compile.patch
index 39160e3..21c3c9c 100644
--- a/calibre-5.34.0-compile.patch
+++ b/calibre-6.12.0-compile.patch
@@ -1,18 +1,16 @@
-diff -up calibre-5.35.0/setup/build.py.5~ calibre-5.35.0/setup/build.py
---- calibre-5.35.0/setup/build.py.5~ 2022-01-21 19:30:03.508488817 +0100
-+++ calibre-5.35.0/setup/build.py 2022-01-21 19:30:03.513488821 +0100
+--- a/setup/build.py
++++ b/setup/build.py
@@ -10,7 +10,7 @@ from collections import namedtuple
- from setup import Command, islinux, isbsd, isfreebsd, ismacos, ishaiku, SRC, iswindows
+
isunix = islinux or ismacos or isbsd or ishaiku
-from distutils import sysconfig
+import distutils.sysconfig
py_lib = '-lpython'+sysconfig.get_python_version()
- CompileCommand = namedtuple('CompileCommand', 'cmd src dest')
- LinkCommand = namedtuple('LinkCommand', 'cmd objects dest')
-diff -up calibre-5.35.0/setup/install.py.5~ calibre-5.35.0/setup/install.py
---- calibre-5.35.0/setup/install.py.5~ 2022-01-21 19:30:03.513488821 +0100
-+++ calibre-5.35.0/setup/install.py 2022-01-21 19:31:17.852557698 +0100
+
+ class CompileCommand(NamedTuple):
+--- a/setup/install.py
++++ b/setup/install.py
@@ -156,9 +156,8 @@ class Develop(Command):
def install_env_module(self):
import sysconfig
diff --git a/calibre-4.21.0-nousrlib.patch b/calibre-6.12.0-nousrlib.patch
similarity index 51%
rename from calibre-4.21.0-nousrlib.patch
rename to calibre-6.12.0-nousrlib.patch
index a11b28e..9de95e0 100644
--- a/calibre-4.21.0-nousrlib.patch
+++ b/calibre-6.12.0-nousrlib.patch
@@ -1,15 +1,16 @@
---- calibre-4.21.0/setup/build_environment.py.orig 2020-07-25 18:01:21.176597226 +0100
-+++ calibre-4.21.0/setup/build_environment.py 2020-07-25 18:01:34.536531319 +0100
+--- a/setup/build_environment.py
++++ b/setup/build_environment.py
@@ -177,10 +177,10 @@
else:
- ft_inc_dirs = pkgconfig_include_dirs('freetype2', 'FT_INC_DIR',
+ freetype_inc_dirs = pkgconfig_include_dirs('freetype2', 'FT_INC_DIR',
'/usr/include/freetype2')
-- ft_lib_dirs = pkgconfig_lib_dirs('freetype2', 'FT_LIB_DIR', '/usr/lib')
-+ ft_lib_dirs = pkgconfig_lib_dirs('freetype2', 'FT_LIB_DIR', None)
- ft_libs = pkgconfig_libs('freetype2', '', '')
+- freetype_lib_dirs = pkgconfig_lib_dirs('freetype2', 'FT_LIB_DIR', '/usr/lib')
++ freetype_lib_dirs = pkgconfig_lib_dirs('freetype2', 'FT_LIB_DIR', None)
+ freetype_libs = pkgconfig_libs('freetype2', '', '')
hunspell_inc_dirs = pkgconfig_include_dirs('hunspell', 'HUNSPELL_INC_DIR', '/usr/include/hunspell')
- hunspell_lib_dirs = pkgconfig_lib_dirs('hunspell', 'HUNSPELL_LIB_DIR', '/usr/lib')
+ hunspell_lib_dirs = pkgconfig_lib_dirs('hunspell', 'HUNSPELL_LIB_DIR', None)
sw = os.environ.get('SW', os.path.expanduser('~/sw'))
podofo_inc = '/usr/include/podofo'
podofo_lib = '/usr/lib'
+
diff --git a/calibre-6.12.0-python-fix.patch b/calibre-6.12.0-python-fix.patch
new file mode 100644
index 0000000..810d105
--- /dev/null
+++ b/calibre-6.12.0-python-fix.patch
@@ -0,0 +1,13 @@
+--- a/setup/build.py
++++ b/setup/build.py
+@@ -10,7 +10,8 @@ from collections import namedtuple
+
+ isunix = islinux or ismacos or isbsd or ishaiku
+
+-py_lib = os.path.join(sys.prefix, 'libs', 'python%d%d.lib' % sys.version_info[:2])
++from distutils import sysconfig
++py_lib = '-lpython'+sysconfig.get_python_version()
+
+ class CompileCommand(NamedTuple):
+ cmd: List[str]
+
diff --git a/calibre.spec b/calibre.spec
index d8d7569..8eb8c52 100644
--- a/calibre.spec
+++ b/calibre.spec
@@ -2,25 +2,28 @@
%define _disable_lto 1
Name: calibre
-Version: 6.11.0
+Version: 6.13.0
Release: 1
Summary: E-book converter and library management
Group: Office
License: GPLv3
URL: https://calibre-ebook.com/
-Source0: https://code.calibre-ebook.com/dist/src/%{name}-%{version}.tar.xz
+Source0: http://code.calibre-ebook.com/dist/src/%{name}-%{version}.tar.xz
Source1: https://github.com/LibreOffice/dictionaries/archive/master/hyphenation-dictionaries.tar.gz
+# (mandian) FIXME: use this until version 3.x is packaged
+Source2: https://github.com/mathjax/MathJax/archive/3.1.4/MathJax-3.1.4.tar.gz
Source4: calibre-mount-helper
Source100: calibre.rpmlintrc
-Patch1: %{name}-2.9.0-fdo-no_update.patch
+Patch1: calibre-2.9.0-fdo-no_update.patch
Patch2: calibre-5.9.0-compile.patch
-Patch3: calibre-3.18-python-fix.patch
-Patch4: calibre-4.21.0-nousrlib.patch
-Patch5: calibre-5.34.0-compile.patch
+Patch3: calibre-6.12.0-python-fix.patch
+Patch4: calibre-6.12.0-nousrlib.patch
+Patch5: calibre-6.12.0-compile.patch
BuildRequires: pkgconfig(python3)
BuildRequires: imagemagick-devel
BuildRequires: python3dist(setuptools)
+BuildRequires: mathjax
BuildRequires: qmake-qt6
BuildRequires: qt6-cmake
BuildRequires: hyphen-devel
@@ -80,6 +83,7 @@ BuildRequires: pkgconfig(xkbcommon)
Requires: fonts-ttf-liberation
Requires: imagemagick
+Requires: mathjax
Requires: python3dist(css-parser)
Requires: python3dist(odfpy)
Requires: python3dist(pillow)
@@ -209,6 +213,7 @@ chmod -x recipes/*.recipe
%build
tar xf %{S:1}
+tar xf %{S:2}
export OVERRIDE_CFLAGS="%{optflags}"
PODOFO_LIB_DIR=%{_libdir} CXX=clang++ CC=clang python setup.py build
PODOFO_LIB_DIR=%{_libdir} CXX=clang++ CC=clang python setup.py iso639
@@ -218,7 +223,10 @@ PODOFO_LIB_DIR=%{_libdir} CXX=clang++ CC=clang python setup.py gui
PODOFO_LIB_DIR=%{_libdir} CXX=clang++ CC=clang python setup.py resources \
--path-to-liberation_fonts %{_datadir}/fonts/TTF/liberation \
--system-liberation_fonts \
- --path-to-hyphenation `pwd`/dictionaries-master
+ --path-to-hyphenation `pwd`/dictionaries-master \
+ --path-to-mathjax `pwd`/MathJax-3.1.4
+# --system-mathjax \
+# --path-to-mathjax %{_libdir}/javascript/mathjax
PODOFO_LIB_DIR=%{_libdir} CXX=clang++ CC=clang python setup.py man_pages
%install