[arch-commits] Commit in calibre/trunk (PKGBUILD pyqt5.5.patch)

Jelle van der Waa jelle at archlinux.org
Thu Jul 23 08:13:23 UTC 2015


    Date: Thursday, July 23, 2015 @ 10:13:21
  Author: jelle
Revision: 137299

Add patch for PyQt5.5 to fix FS#45744

Added:
  calibre/trunk/pyqt5.5.patch
Modified:
  calibre/trunk/PKGBUILD

---------------+
 PKGBUILD      |    9 ++++++---
 pyqt5.5.patch |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-07-23 07:35:25 UTC (rev 137298)
+++ PKGBUILD	2015-07-23 08:13:21 UTC (rev 137299)
@@ -8,7 +8,7 @@
 
 pkgname=calibre
 pkgver=2.32.1
-pkgrel=1
+pkgrel=2
 pkgdesc="Ebook management application"
 arch=('i686' 'x86_64')
 url="http://calibre-ebook.com/"
@@ -25,8 +25,9 @@
             'udisks: required for mounting certain devices'
 )
 install=calibre.install
-source=("http://download.calibre-ebook.com/${pkgver}/calibre-${pkgver}.tar.xz")
-md5sums=('54e8bcfdf1e74595bd7611dd61bac20a')
+source=("http://download.calibre-ebook.com/${pkgver}/calibre-${pkgver}.tar.xz" "pyqt5.5.patch")
+md5sums=('54e8bcfdf1e74595bd7611dd61bac20a'
+         'bec94ae1af7725c2ddc5981e606a3906')
 
 prepare(){
   cd "${srcdir}/${pkgname}-${pkgver}"
@@ -37,6 +38,8 @@
          src/html5lib \
          src/chardet
 
+  patch -Np1 -i $srcdir/pyqt5.5.patch
+
   sed -i "s/shlex.split(ldflags)/& + ['-fPIC']/" setup/extensions.py
 
   # Use python2

Added: pyqt5.5.patch
===================================================================
--- pyqt5.5.patch	                        (rev 0)
+++ pyqt5.5.patch	2015-07-23 08:13:21 UTC (rev 137299)
@@ -0,0 +1,55 @@
+From 8f75f2d5ad17ef35d52a9dc1a137c36d42e8454e Mon Sep 17 00:00:00 2001
+From: Kovid Goyal <kovid at kovidgoyal.net>
+Date: Thu, 23 Jul 2015 11:47:53 +0530
+Subject: [PATCH] More compatibility fixes for PyQt 5.5
+
+---
+ src/calibre/gui2/library/alternate_views.py | 2 +-
+ src/calibre/gui2/library/delegates.py       | 4 ++--
+ src/calibre/gui2/library/views.py           | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/calibre/gui2/library/alternate_views.py b/src/calibre/gui2/library/alternate_views.py
+index f492343..813ff48 100644
+--- a/src/calibre/gui2/library/alternate_views.py
++++ b/src/calibre/gui2/library/alternate_views.py
+@@ -101,7 +101,7 @@ def drag_data(self):
+     selected = self.get_selected_ids()
+     ids = ' '.join(map(str, selected))
+     md = QMimeData()
+-    md.setData('application/calibre+from_library', ids)
++    md.setData('application/calibre+from_library', ids.encode('utf-8'))
+     fmt = prefs['output_format']
+ 
+     def url_for_id(i):
+diff --git a/src/calibre/gui2/library/delegates.py b/src/calibre/gui2/library/delegates.py
+index eed3ed8..5e0344c 100644
+--- a/src/calibre/gui2/library/delegates.py
++++ b/src/calibre/gui2/library/delegates.py
+@@ -55,11 +55,11 @@ def updateEditorGeometry(self, editor, option, index):
+         # Now get the size of the combo/spinner arrows and add them to the needed width
+         if isinstance(editor, (QComboBox, QDateTimeEdit)):
+             r = style.subControlRect(QStyle.CC_ComboBox, QStyleOptionComboBox(),
+-                                      QStyle.SC_ComboBoxArrow)
++                                      QStyle.SC_ComboBoxArrow, editor)
+             new_width += r.width()
+         elif isinstance(editor, (QSpinBox, QDoubleSpinBox)):
+             r = style.subControlRect(QStyle.CC_SpinBox, QStyleOptionSpinBox(),
+-                                  QStyle.SC_SpinBoxUp)
++                                  QStyle.SC_SpinBoxUp, editor)
+             new_width += r.width()
+ 
+         # Compute the maximum we can show if we consume the entire viewport
+diff --git a/src/calibre/gui2/library/views.py b/src/calibre/gui2/library/views.py
+index 008721e..7e1743d 100644
+--- a/src/calibre/gui2/library/views.py
++++ b/src/calibre/gui2/library/views.py
+@@ -1098,7 +1098,7 @@ def drag_data(self):
+         rows = self.selectionModel().selectedRows()
+         paths = [force_unicode(p, enc=filesystem_encoding) for p in m.paths(rows) if p]
+         md = QMimeData()
+-        md.setData('application/calibre+from_device', 'dummy')
++        md.setData('application/calibre+from_device', b'dummy')
+         md.setUrls([QUrl.fromLocalFile(p) for p in paths])
+         drag = QDrag(self)
+         drag.setMimeData(md)



More information about the arch-commits mailing list