calibre 4.3.0-1 (x86_64) 2019-9121
10000

Status published
Submitter nobodydead [@T] gmail.com
Platform rolling
Repository unsupported
URL https://abf.openmandriva.org/build_lists/644836
Packages
calibre-4.3.0-1.x86_64.binary
calibre-4.3.0-1.x86_64.source
calibre-debuginfo-4.3.0-1.x86_64.debuginfo
Build Date 2019-11-20 23:23:02 +0000 UTC
Last Updated 2019-11-22 08:19:13.291414279 +0000 UTC
$ git diff --patch-with-stat --summary e5614cc29f74740d83dce02562d453dd8ff37c47..b16a6fcfcefdfd501cf3b201c4147761c6f43fcf

 .abf.yml                      |   2 +-
 calibre-3.18-python-fix.patch |   8 +--
 calibre.spec                  | 117 +++++++++++++++++++++++++++++-------------
 python3-sip.patch             |  21 ++++++++
 4 files changed, 106 insertions(+), 42 deletions(-)
 create mode 100644 python3-sip.patch

diff --git a/.abf.yml b/.abf.yml
index 709f9f5..623a29f 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,2 +1,2 @@
 sources:
-  calibre-3.40.1.tar.xz: 12cea0bed963dde2b58c9cdd4c3c25c735d6d15a
+  calibre-4.3.0.tar.xz: 75dc3899b29dd04513bdadeaee2cf25a69d1b021
diff --git a/calibre-3.18-python-fix.patch b/calibre-3.18-python-fix.patch
index b81a297..146c652 100644
--- a/calibre-3.18-python-fix.patch
+++ b/calibre-3.18-python-fix.patch
@@ -1,7 +1,7 @@
 --- calibre-3.18.0/setup/build.py.orig	2018-02-26 19:57:30.172763764 +0000
 +++ calibre-3.18.0/setup/build.py	2018-02-26 20:01:03.381770411 +0000
-@@ -12,8 +12,8 @@
- from setup import Command, islinux, isbsd, isfreebsd, isosx, ishaiku, SRC, iswindows, __version__
+@@ -13,8 +13,8 @@ from collections import namedtuple
+ from setup import Command, islinux, isbsd, isfreebsd, isosx, ishaiku, SRC, iswindows, __version__, ispy3
  isunix = islinux or isosx or isbsd or ishaiku
  
 -py_lib = os.path.join(sys.prefix, 'libs', 'python%d%d.lib' % sys.version_info[:2])
@@ -9,8 +9,8 @@
 +from distutils import sysconfig
 +py_lib = '-lpython'+sysconfig.get_python_version()
  
- def absolutize(paths):
-     return list(set([x if os.path.isabs(x) else os.path.join(SRC, x.replace('/', os.sep)) for x in paths]))
+ def init_symbol_name(name):
+     prefix = 'PyInit_' if ispy3 else 'init'
 @@ -459,8 +459,8 @@
          SOURCES = {sources}
          INCLUDEPATH += {sipinc} {pyinc}
diff --git a/calibre.spec b/calibre.spec
index c950af6..50caffc 100644
--- a/calibre.spec
+++ b/calibre.spec
@@ -1,7 +1,7 @@
 %define _disable_ld_no_undefined 1
 
 Name:		calibre
-Version:	3.40.1
+Version:	4.3.0
 Release:	1
 Summary:	E-book converter and library management
 Group:		Office
@@ -12,19 +12,29 @@ Source2:	calibre-mount-helper
 Source100:	calibre.rpmlintrc
 Patch1:		%{name}-2.9.0-fdo-no_update.patch
 Patch3:		calibre-3.18-python-fix.patch
-BuildRequires:	python2 >= 2.6
-BuildRequires:	pkgconfig(python2) >= 2.7
+#Patch4:		python3-sip.patch
+
+BuildRequires:	python
+BuildRequires:	pkgconfig(python3)
 BuildRequires:	imagemagick-devel
-BuildRequires:	python2-setuptools
+BuildRequires:  python3dist(setuptools)
+BuildRequires:	qmake5
 BuildRequires:	qt5-devel
 BuildRequires:	%{_lib}qt5themesupport-static-devel
 BuildRequires:	%{_lib}qt5fontdatabasesupport-static-devel
 BuildRequires:	%{_lib}qt5servicesupport-static-devel
 BuildRequires:	%{_lib}qt5eventdispatchersupport-static-devel
 BuildRequires:	python-qt5
-BuildRequires:  python-sip
-BuildRequires:	python2-qt5
-BuildRequires:	python2-sip
+BuildRequires:	python-qt5-devel
+BuildRequires:	python-sip
+BuildRequires:  python-sip-qt5
+BuildRequires:	python-qt5-webkit
+BuildRequires:  pkgconfig(Qt5Core)
+BuildRequires:  pkgconfig(Qt5DBus)
+BuildRequires:  pkgconfig(Qt5Gui)
+BuildRequires:  pkgconfig(Qt5Network)
+BuildRequires:  pkgconfig(Qt5Widgets)
+BuildRequires:  pkgconfig(Qt5WebKit)
 BuildRequires:	pkgconfig(poppler-qt5) >= 0.12
 BuildRequires:	pkgconfig(poppler-glib)
 BuildRequires:	pkgconfig(mtdev)
@@ -32,45 +42,72 @@ BuildRequires:	pkgconfig(libinput)
 BuildRequires:	pkgconfig(openssl)
 BuildRequires:	podofo-devel
 BuildRequires:	desktop-file-utils
-BuildRequires:	python2-mechanize
-BuildRequires:	python2-lxml
-BuildRequires:	python2-dateutil
-BuildRequires:	python2-imaging
+BuildRequires:  python3dist(mechanize)
+BuildRequires:  python3dist(lxml)
+BuildRequires:  python3dist(python-dateutil)
+BuildRequires:  python3dist(pillow)
+BuildRequires:  python3dist(css-parser)
+BuildRequires:  python3dist(feedparser)
+BuildRequires:  python3dist(netifaces)
+BuildRequires:  python3dist(beautifulsoup4)
+BuildRequires:  python3dist(psutil)
+BuildRequires:  python3dist(pygments)
+BuildRequires:  python3dist(soupsieve)
+BuildRequires:  python3dist(msgpack)
+BuildRequires:  python3dist(regex)
+BuildRequires:  python3dist(html5-parser) >= 0.4.8
+BuildRequires:  python-html2text
+BuildRequires:  bash-completion
+#BuildRequires:  python3dist(zeroconf)
+BuildRequires:  python3dist(markdown) 
 BuildRequires:	xdg-utils
 BuildRequires:	chmlib-devel
-BuildRequires:	python2-cssutils >= 0.9.9
+BuildRequires:	python-cssutils
 BuildRequires:	pkgconfig(sqlite3)
 BuildRequires:	pkgconfig(icu-i18n)
 BuildRequires:	unzip
 BuildRequires:	libwmf-devel
 BuildRequires:	libmtp-devel
-BuildRequires:	python2-apsw
-BuildRequires:	python2-six
-BuildRequires:	python2-html5-parser
-BuildRequires:	python2-regex
-BuildRequires:	python2-msgpack
+BuildRequires:  python3dist(apsw)
 BuildRequires:	python-enum34
+BuildRequires:  pkgconfig(hunspell)
+
 Requires:	imagemagick
-Requires:	python2-apsw
-Requires:	python2-cssutils
-Requires:	python2-dateutil
-Requires:	python2-dbus
-Requires:	python2-imaging
-Requires:	python2-lxml
-Requires:	python2-mechanize
-Requires:	python2-netifaces
-Requires:	python2-sip
-Requires:	python2-qt5
-Requires:	python2-qt5-help
-Requires:	python2-html5-parser
-Requires:	python2-regex
-Requires:	python2-msgpack
+Requires:       python-qt5-webkit
+Requires:       python3dist(css-parser)
+Requires:       python3dist(odfpy)
+Requires:       python3dist(pillow)
+Requires:	python-dbus
+Requires:       python3dist(lxml)
+Requires:       python3dist(mechanize)
+Requires:	python3dist(python-dateutil)
+Requires:       python3dist(beautifulsoup4)
+Requires:       python3dist(netifaces)
+Requires:       python3dist(dnspython)
+Requires:       python3dist(apsw)
+Requires:       python3dist(psutil)
+Requires:       python3dist(pygments)
+Requires:       python3dist(msgpack)
+Requires:       python3dist(regex)
+#Requires:       python3dist(enum34)
+Requires:       python3dist(six)
+Requires:       python3dist(markdown)
+Requires:       python3dist(feedparser)
+Requires:       python3dist(soupsieve)
+Requires:	python-sip
+Requires:	python-qt5
+Requires:	python-qt5-help
+Requires:	python-qt5-webengine
+Requires:	python-qt5-webengine-widgets
+Requires:	python-html5-parser
+Requires:       python3dist(html5-parser)
+Requires:	optipng
 Requires:	poppler
 # Require the packages of the files which are symlinked by calibre
 Requires:	fonts-ttf-liberation
 # E-mail functionality requires this package
 # see https://bugs.launchpad.net/calibre/+bug/739073
-Requires:	python2-dnspython
+Requires:	python-dnspython
 Requires:	python-enum34
 
 %description
@@ -88,7 +125,6 @@ Supported input formats are: MOBI, LIT, PRC, EPUB, CHM, ODT, HTML, CBR, CBZ,
 RTF, TXT, PDF and LRS.
 
 %files
-#-f %{name}.lang
 %doc COPYRIGHT LICENSE Changelog.yaml
 %{_bindir}/calibre
 %{_bindir}/calibre-complete
@@ -117,7 +153,8 @@ RTF, TXT, PDF and LRS.
 %{_datadir}/applications/*.desktop
 %{_datadir}/icons/hicolor/*/mimetypes/*
 %{_datadir}/icons/hicolor/*/apps/*
-%{python2_sitelib}/init_calibre.py*
+%{python_sitelib}/init_calibre.py*
+%{python_sitelib}/__pycache__/init_calibre.*.py*
 
 #--------------------------------------------------------------------
 
@@ -133,6 +170,8 @@ rm -rf resources/fonts/*/
 
 %patch3 -p1
 
+#patch4 -p1
+
 # dos2unix newline conversion
 sed -i -e 's/\r//' src/calibre/web/feeds/recipes/*
 
@@ -162,7 +201,10 @@ chmod -x src/calibre/*.py
 chmod -x recipes/*.recipe
 
 %build
-OVERRIDE_CFLAGS="%{optflags}" python2 setup.py build
+#OVERRIDE_CFLAGS="%{optflags}" python2 setup.py build
+export OVERRIDE_CFLAGS="%{optflags}"
+CALIBRE_PY3_PORT=1 \
+%__python3 setup.py build
 
 %install
 mkdir -p %{buildroot}%{_datadir}
@@ -184,13 +226,14 @@ XDG_DATA_DIRS="%{buildroot}%{_datadir}" \
 XDG_UTILS_INSTALL_MODE="system" \
 LIBPATH="%{_libdir}" \
 LANG="en_US" \
-python2 setup.py install --root=%{buildroot}%{_prefix} \
+CALIBRE_PY3_PORT=1 \
+%__python3 setup.py install --root=%{buildroot}%{_prefix} \
 			--prefix=%{_prefix} \
 			--libdir=%{_libdir} \
 			--staging-libdir=%{buildroot}%{_libdir} \
 # remove shebang from init_calibre.py here because
 # it just got spawned by the install script
-sed -i -e '/^#!\//, 1d' %{buildroot}%{python2_sitelib}/init_calibre.py
+sed -i -e '/^#!\//, 1d' %{buildroot}%{python_sitelib}/init_calibre.py
 
 # icons
 mkdir -p %{buildroot}%{_datadir}/pixmaps/
diff --git a/python3-sip.patch b/python3-sip.patch
new file mode 100644
index 0000000..1af5abf
--- /dev/null
+++ b/python3-sip.patch
@@ -0,0 +1,21 @@
+diff -Nrup a/setup/build_environment.py b/setup/build_environment.py
+--- a/setup/build_environment.py	2019-09-02 04:54:47.000000000 +0200
++++ b/setup/build_environment.py	2019-09-02 15:49:28.227201671 +0200
+@@ -87,7 +87,7 @@ pyqt = {x:readvar(y) for x, y in (
+ qt = {x:readvar(y) for x, y in {'libs':'QT_INSTALL_LIBS', 'plugins':'QT_INSTALL_PLUGINS'}.items()}
+ qmakespec = readvar('QMAKE_SPEC') if iswindows else None
+ 
+-pyqt['sip_bin'] = os.environ.get('SIP_BIN', 'sip')
++pyqt['sip_bin'] = os.environ.get('SIP_BIN', 'python3-sip')
+ 
+ from PyQt5.QtCore import PYQT_CONFIGURATION
+ pyqt['sip_flags'] = PYQT_CONFIGURATION['sip_flags']
+@@ -99,7 +99,7 @@ def get_sip_dir():
+     elif isfreebsd:
+         q = os.path.join(sys.prefix, 'share', 'py-sip')
+     else:
+-        q = os.path.join(sys.prefix, 'share', 'sip')
++        q = os.path.join(sys.prefix, 'share', 'python3-sip')
+     q = os.environ.get('SIP_DIR', q)
+     for x in ('', 'Py2-PyQt5', 'PyQt5', 'sip/PyQt5'):
+         base = os.path.join(q, x)
Not Available

benbullard79 [@T] cox.netNo Comment.1589d 05hrs
itchka [@T] compuserve.comRelease contrib packages1588d 23hrs
itchka [@T] compuserve.comNo Comment.1588d 23hrs