[arch-commits] Commit in calibre/trunk (PKGBUILD podofo_0.9.6.patch)

2018-09-27 Thread Eli Schwartz via arch-commits
Date: Friday, September 28, 2018 @ 05:03:22
  Author: eschwartz
Revision: 386776

upgpkg: calibre 3.32.0-1

upstream release

Modified:
  calibre/trunk/PKGBUILD
Deleted:
  calibre/trunk/podofo_0.9.6.patch

+
 PKGBUILD   |   17 +---
 podofo_0.9.6.patch |  206 ---
 2 files changed, 8 insertions(+), 215 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2018-09-28 04:26:57 UTC (rev 386775)
+++ PKGBUILD2018-09-28 05:03:22 UTC (rev 386776)
@@ -7,8 +7,8 @@
 # Contributor: Larry Hajali 
 
 pkgname=calibre
-pkgver=3.31.0
-pkgrel=3
+pkgver=3.32.0
+pkgrel=1
 pkgdesc="Ebook management application"
 arch=('x86_64')
 url="https://calibre-ebook.com/";
@@ -24,21 +24,20 @@
 makedepends=('qt5-x11extras' 'sip' 'xdg-utils')
 checkdepends=('xorg-server-xvfb')
 optdepends=('ipython2: to use calibre-debug'
-'poppler: required for converting pdf to html'
-)
+'poppler: required for converting pdf to html')
 source=("https://download.calibre-ebook.com/${pkgver}/calibre-${pkgver}.tar.xz";
 "https://calibre-ebook.com/signatures/${pkgname}-${pkgver}.tar.xz.sig";
-podofo_0.9.6.patch)
-sha256sums=('3c2713a89a186e20d45ea42f2ed6be509fecce880ce6e233e63e6f3a415fe1f5'
+
"https://github.com/kovidgoyal/calibre/commit/4d4ffcff7c247072c28d20822abed12e2539cdd2.patch";)
+sha256sums=('57254b147d8f8caf16f774f090266e112281c19bf7bc4170e65d22ab9b58d8ac'
 'SKIP'
-'4243e18653348aed438e28af7268c40ea6047e4b1d2b091faeaa1351572f7873')
+'60bb12d242e83ba886615472abcf91e05560f1a97a22d04c806d3acdc27fff6c')
 validpgpkeys=('3CE1780F78DD88DF45194FD706BC317B515ACE7C') # Kovid Goyal (New 
longer key) 
 
 prepare(){
   cd "${pkgname}-${pkgver}"
 
-  # https://bugs.launchpad.net/bugs/1791430
-  patch -Np1 -i ${srcdir}/podofo_0.9.6.patch
+  # https://bugs.launchpad.net/bugs/1794915
+  patch -p1 -i ../4d4ffcff7c247072c28d20822abed12e2539cdd2.patch
 
   # Remove unneeded files
   rm -rf resources/${pkgname}-portable.*

Deleted: podofo_0.9.6.patch
===
--- podofo_0.9.6.patch  2018-09-28 04:26:57 UTC (rev 386775)
+++ podofo_0.9.6.patch  2018-09-28 05:03:22 UTC (rev 386776)
@@ -1,206 +0,0 @@
-From dc130d90cdd257f37037a4699b8be1550efc2b6b Mon Sep 17 00:00:00 2001
-From: Kovid Goyal 
-Date: Sat, 8 Sep 2018 20:51:58 +0530
-Subject: [PATCH 1/3] Fix #1791430 [Podofo ABI breakage in
- 0.9.6](https://bugs.launchpad.net/calibre/+bug/1791430)
-

- src/calibre/utils/podofo/doc.cpp | 31 +++
- 1 file changed, 19 insertions(+), 12 deletions(-)
-
-diff --git a/src/calibre/utils/podofo/doc.cpp 
b/src/calibre/utils/podofo/doc.cpp
-index b33647336c..58572a688e 100644
 a/src/calibre/utils/podofo/doc.cpp
-+++ b/src/calibre/utils/podofo/doc.cpp
-@@ -39,7 +39,11 @@ PDFDoc_load(PDFDoc *self, PyObject *args) {
- 
- if (PyArg_ParseTuple(args, "s#", &buffer, &size)) {
- try {
-+#if PODOFO_VERSION <= 0x000905
- self->doc->Load(buffer, (long)size);
-+#else
-+self->doc->LoadBuffer(buffer, (long)size);
-+#endif
- } catch(const PdfError & err) {
- podofo_set_exception(err);
- return NULL;
-@@ -56,7 +60,11 @@ PDFDoc_open(PDFDoc *self, PyObject *args) {
- 
- if (PyArg_ParseTuple(args, "s", &fname)) {
- try {
-+#if PODOFO_VERSION <= 0x000905
- self->doc->Load(fname);
-+#else
-+self->doc->LoadFromFile(fname);
-+#endif
- } catch(const PdfError & err) {
- podofo_set_exception(err);
- return NULL;
-@@ -88,7 +96,7 @@ PDFDoc_save(PDFDoc *self, PyObject *args) {
- static PyObject *
- PDFDoc_write(PDFDoc *self, PyObject *args) {
- PyObject *ans;
--
-+
- try {
- PdfRefCountedBuffer buffer(1*1024*1024);
- PdfOutputDevice out(&buffer);
-@@ -305,7 +313,7 @@ PDFDoc_set_xmp_metadata(PDFDoc *self, PyObject *args) {
- long len = 0;
- PoDoFo::PdfObject *metadata = NULL, *catalog = NULL;
- PoDoFo::PdfStream *str = NULL;
--TVecFilters compressed(1); 
-+TVecFilters compressed(1);
- compressed[0] = ePdfFilter_FlateDecode;
- 
- if (!PyArg_ParseTuple(args, "s#", &raw, &len)) return NULL;
-@@ -428,7 +436,7 @@ PDFDoc_setter(PDFDoc *self, PyObject *val, int field) {
- PdfString *s = NULL;
- 
- if (self->doc->GetEncrypted()) s = 
podofo_convert_pystring_single_byte(val);
--else s = podofo_convert_pystring(val); 
-+else s = podofo_convert_pystring(val);
- if (s == NULL) return -1;
- 
- 
-@@ -503,35 +511,35 @@ PDFDoc_producer_setter(PDFDoc *self, PyObject *val, void 
*closure) {
- }
- 
- static PyGetSetDef PDFDoc_getsetters[] = {
--{(char *)"title", 
-+{(char *)"title",
-  (getter)PDFDoc_title_getter, (setter)PDFDoc_title_setter,
-  (char *)"Document title",
-  NULL},
--{(char

[arch-commits] Commit in calibre/trunk (PKGBUILD podofo_0.9.6.patch)

2018-09-08 Thread Eli Schwartz via arch-commits
Date: Sunday, September 9, 2018 @ 02:10:43
  Author: eschwartz
Revision: 378842

upgpkg: calibre 3.31.0-3

update podofo patch with upstream version
websocket test works for me, re-enabling for now

Modified:
  calibre/trunk/PKGBUILD
  calibre/trunk/podofo_0.9.6.patch

+
 PKGBUILD   |7 -
 podofo_0.9.6.patch |  198 +--
 2 files changed, 194 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2018-09-09 02:09:52 UTC (rev 378841)
+++ PKGBUILD2018-09-09 02:10:43 UTC (rev 378842)
@@ -8,7 +8,7 @@
 
 pkgname=calibre
 pkgver=3.31.0
-pkgrel=2
+pkgrel=3
 pkgdesc="Ebook management application"
 arch=('x86_64')
 url="https://calibre-ebook.com/";
@@ -31,12 +31,13 @@
 podofo_0.9.6.patch)
 sha256sums=('3c2713a89a186e20d45ea42f2ed6be509fecce880ce6e233e63e6f3a415fe1f5'
 'SKIP'
-'6e5c856b164724ed54bf84b1e592a6aea52d0472874be706fd8b61e88ad73151')
+'4243e18653348aed438e28af7268c40ea6047e4b1d2b091faeaa1351572f7873')
 validpgpkeys=('3CE1780F78DD88DF45194FD706BC317B515ACE7C') # Kovid Goyal (New 
longer key) 
 
 prepare(){
   cd "${pkgname}-${pkgver}"
 
+  # https://bugs.launchpad.net/bugs/1791430
   patch -Np1 -i ${srcdir}/podofo_0.9.6.patch
 
   # Remove unneeded files
@@ -64,8 +65,6 @@
   # without xvfb-run this fails with much "Control socket failed to recv(), 
resetting"
   # ERROR: test_websocket_perf (calibre.srv.tests.web_sockets.WebSocketTest)
 
-  # websocket test fails currently.
-  rm src/calibre/srv/tests/web_sockets.py
   LANG='en_US.UTF-8' xvfb-run python2 setup.py test
 }
 

Modified: podofo_0.9.6.patch
===
--- podofo_0.9.6.patch  2018-09-09 02:09:52 UTC (rev 378841)
+++ podofo_0.9.6.patch  2018-09-09 02:10:43 UTC (rev 378842)
@@ -1,22 +1,206 @@
+From dc130d90cdd257f37037a4699b8be1550efc2b6b Mon Sep 17 00:00:00 2001
+From: Kovid Goyal 
+Date: Sat, 8 Sep 2018 20:51:58 +0530
+Subject: [PATCH 1/3] Fix #1791430 [Podofo ABI breakage in
+ 0.9.6](https://bugs.launchpad.net/calibre/+bug/1791430)
+
+---
+ src/calibre/utils/podofo/doc.cpp | 31 +++
+ 1 file changed, 19 insertions(+), 12 deletions(-)
+
 diff --git a/src/calibre/utils/podofo/doc.cpp 
b/src/calibre/utils/podofo/doc.cpp
-index b33647336c..3d25ac993f 100644
+index b33647336c..58572a688e 100644
 --- a/src/calibre/utils/podofo/doc.cpp
 +++ b/src/calibre/utils/podofo/doc.cpp
-@@ -39,7 +39,7 @@ PDFDoc_load(PDFDoc *self, PyObject *args) {
+@@ -39,7 +39,11 @@ PDFDoc_load(PDFDoc *self, PyObject *args) {
  
  if (PyArg_ParseTuple(args, "s#", &buffer, &size)) {
  try {
--self->doc->Load(buffer, (long)size);
-+self->doc->LoadFromBuffer(buffer, (long)size);
++#if PODOFO_VERSION <= 0x000905
+ self->doc->Load(buffer, (long)size);
++#else
++self->doc->LoadBuffer(buffer, (long)size);
++#endif
  } catch(const PdfError & err) {
  podofo_set_exception(err);
  return NULL;
-@@ -56,7 +56,7 @@ PDFDoc_open(PDFDoc *self, PyObject *args) {
+@@ -56,7 +60,11 @@ PDFDoc_open(PDFDoc *self, PyObject *args) {
  
  if (PyArg_ParseTuple(args, "s", &fname)) {
  try {
--self->doc->Load(fname);
-+self->doc->LoadFromBuffer(fname, (long)strlen(fname));
++#if PODOFO_VERSION <= 0x000905
+ self->doc->Load(fname);
++#else
++self->doc->LoadFromFile(fname);
++#endif
  } catch(const PdfError & err) {
  podofo_set_exception(err);
  return NULL;
+@@ -88,7 +96,7 @@ PDFDoc_save(PDFDoc *self, PyObject *args) {
+ static PyObject *
+ PDFDoc_write(PDFDoc *self, PyObject *args) {
+ PyObject *ans;
+-
++
+ try {
+ PdfRefCountedBuffer buffer(1*1024*1024);
+ PdfOutputDevice out(&buffer);
+@@ -305,7 +313,7 @@ PDFDoc_set_xmp_metadata(PDFDoc *self, PyObject *args) {
+ long len = 0;
+ PoDoFo::PdfObject *metadata = NULL, *catalog = NULL;
+ PoDoFo::PdfStream *str = NULL;
+-TVecFilters compressed(1); 
++TVecFilters compressed(1);
+ compressed[0] = ePdfFilter_FlateDecode;
+ 
+ if (!PyArg_ParseTuple(args, "s#", &raw, &len)) return NULL;
+@@ -428,7 +436,7 @@ PDFDoc_setter(PDFDoc *self, PyObject *val, int field) {
+ PdfString *s = NULL;
+ 
+ if (self->doc->GetEncrypted()) s = 
podofo_convert_pystring_single_byte(val);
+-else s = podofo_convert_pystring(val); 
++else s = podofo_convert_pystring(val);
+ if (s == NULL) return -1;
+ 
+ 
+@@ -503,35 +511,35 @@ PDFDoc_producer_setter(PDFDoc *self, PyObject *val, void 
*closure) {
+ }
+ 
+ static PyGetSetDef PDFDoc_getsetters[] = {
+-{(char *)"title", 
++{(char *)"title",
+  (getter)PDFDoc_title_getter, (setter)PDFDoc_title_setter,
+  (char *)"Document title",
+  NULL},
+-{(char *)"author", 
++{(char *)"

[arch-commits] Commit in calibre/trunk (PKGBUILD podofo_0.9.6.patch)

2018-09-08 Thread Jelle van der Waa via arch-commits
Date: Saturday, September 8, 2018 @ 14:34:16
  Author: jelle
Revision: 378816

upgpkg: calibre 3.31.0-2

podofo rebuild

Added:
  calibre/trunk/podofo_0.9.6.patch
Modified:
  calibre/trunk/PKGBUILD

+
 PKGBUILD   |   13 ++---
 podofo_0.9.6.patch |   22 ++
 2 files changed, 32 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2018-09-08 12:56:34 UTC (rev 378815)
+++ PKGBUILD2018-09-08 14:34:16 UTC (rev 378816)
@@ -8,7 +8,7 @@
 
 pkgname=calibre
 pkgver=3.31.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Ebook management application"
 arch=('x86_64')
 url="https://calibre-ebook.com/";
@@ -27,14 +27,18 @@
 'poppler: required for converting pdf to html'
 )
 source=("https://download.calibre-ebook.com/${pkgver}/calibre-${pkgver}.tar.xz";
-"https://calibre-ebook.com/signatures/${pkgname}-${pkgver}.tar.xz.sig";)
+"https://calibre-ebook.com/signatures/${pkgname}-${pkgver}.tar.xz.sig";
+podofo_0.9.6.patch)
 sha256sums=('3c2713a89a186e20d45ea42f2ed6be509fecce880ce6e233e63e6f3a415fe1f5'
-'SKIP')
+'SKIP'
+'6e5c856b164724ed54bf84b1e592a6aea52d0472874be706fd8b61e88ad73151')
 validpgpkeys=('3CE1780F78DD88DF45194FD706BC317B515ACE7C') # Kovid Goyal (New 
longer key) 
 
 prepare(){
   cd "${pkgname}-${pkgver}"
 
+  patch -Np1 -i ${srcdir}/podofo_0.9.6.patch
+
   # Remove unneeded files
   rm -rf resources/${pkgname}-portable.*
 
@@ -59,6 +63,9 @@
 
   # without xvfb-run this fails with much "Control socket failed to recv(), 
resetting"
   # ERROR: test_websocket_perf (calibre.srv.tests.web_sockets.WebSocketTest)
+
+  # websocket test fails currently.
+  rm src/calibre/srv/tests/web_sockets.py
   LANG='en_US.UTF-8' xvfb-run python2 setup.py test
 }
 

Added: podofo_0.9.6.patch
===
--- podofo_0.9.6.patch  (rev 0)
+++ podofo_0.9.6.patch  2018-09-08 14:34:16 UTC (rev 378816)
@@ -0,0 +1,22 @@
+diff --git a/src/calibre/utils/podofo/doc.cpp 
b/src/calibre/utils/podofo/doc.cpp
+index b33647336c..3d25ac993f 100644
+--- a/src/calibre/utils/podofo/doc.cpp
 b/src/calibre/utils/podofo/doc.cpp
+@@ -39,7 +39,7 @@ PDFDoc_load(PDFDoc *self, PyObject *args) {
+ 
+ if (PyArg_ParseTuple(args, "s#", &buffer, &size)) {
+ try {
+-self->doc->Load(buffer, (long)size);
++self->doc->LoadFromBuffer(buffer, (long)size);
+ } catch(const PdfError & err) {
+ podofo_set_exception(err);
+ return NULL;
+@@ -56,7 +56,7 @@ PDFDoc_open(PDFDoc *self, PyObject *args) {
+ 
+ if (PyArg_ParseTuple(args, "s", &fname)) {
+ try {
+-self->doc->Load(fname);
++self->doc->LoadFromBuffer(fname, (long)strlen(fname));
+ } catch(const PdfError & err) {
+ podofo_set_exception(err);
+ return NULL;