[arch-commits] Commit in strigi/trunk (PKGBUILD libstreamanalyzer_pdf.patch)

Andrea Scarpino andrea at archlinux.org
Tue Oct 18 15:06:58 EDT 2011


    Date: Tuesday, October 18, 2011 @ 15:06:58
  Author: andrea
Revision: 140760

upgpkg: strigi 0.7.6-2

Fix kfilemetadatareader crash with PDF files (FS#26504)

Added:
  strigi/trunk/libstreamanalyzer_pdf.patch
Modified:
  strigi/trunk/PKGBUILD

-----------------------------+
 PKGBUILD                    |   11 ++++++++---
 libstreamanalyzer_pdf.patch |   27 +++++++++++++++++++++++++++
 2 files changed, 35 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-10-18 19:04:08 UTC (rev 140759)
+++ PKGBUILD	2011-10-18 19:06:58 UTC (rev 140760)
@@ -4,7 +4,7 @@
 
 pkgname=strigi
 pkgver=0.7.6
-pkgrel=1
+pkgrel=2
 pkgdesc="Fast crawling desktop search engine with Qt4 GUI"
 arch=('i686' 'x86_64')
 url="http://www.vandenoever.info/software/strigi/"
@@ -14,10 +14,15 @@
 optdepends=('kdegraphics-strigi-analyzer: strigi analyzers for various graphics file'
             'kdesdk-strigi-analyzer: strigi analyzer for KDE SDK')
 #source=("http://www.vandenoever.info/software/${pkgname}/${pkgname}-${pkgver}.tar.bz2")
-source=("ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.bz2")
-md5sums=('41cddd39e4ae3f590d82c859a14e9261')
+source=("ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
+        'libstreamanalyzer_pdf.patch')
+md5sums=('41cddd39e4ae3f590d82c859a14e9261'
+         '3e722a93cf5c6238e625ca58463afac2')
 
 build() {
+  cd "${srcdir}"/${pkgname}-${pkgver}/libstreamanalyzer
+  patch -p1 -i "${srcdir}"/libstreamanalyzer_pdf.patch
+
   cd "${srcdir}"
   mkdir build
   cd build

Added: libstreamanalyzer_pdf.patch
===================================================================
--- libstreamanalyzer_pdf.patch	                        (rev 0)
+++ libstreamanalyzer_pdf.patch	2011-10-18 19:06:58 UTC (rev 140760)
@@ -0,0 +1,27 @@
+commit 23d5ce636b7897dc3f233a5293f3164dac50566d
+Author: Jos van den Oever <jos at vandenoever.info>
+Date:   Sun Jul 31 12:32:44 2011 +0200
+
+    Revert patch that breaks parsing of PDF files.
+    The offending patch was 672c8b7b3cb4400bc505421f4cc70cf742ed9df0.
+
+diff --git a/lib/pdf/pdfparser.cpp b/lib/pdf/pdfparser.cpp
+index c27f691..df2f7e5 100644
+--- a/lib/pdf/pdfparser.cpp
++++ b/lib/pdf/pdfparser.cpp
+@@ -34,12 +34,13 @@ StreamStatus
+ PdfParser::read(int32_t min, int32_t max) {
+     int32_t off = (int32_t)(pos-start);
+     int32_t d = (int32_t)(stream->position() - bufferStart);
+-    bufferStart += off;
++    min += d;
++    if (max > 0) max += d;
+     stream->reset(bufferStart);
+     int32_t n = stream->read(start, min, max);
+ //    printf("objstart %i %i\n", d, n);
+     if (n < min) return stream->status();
+-    pos = start;
++    pos = start + off;
+     end = start + n;
+     return Ok;
+ }



More information about the arch-commits mailing list