[strigi] Revert commit that breaks parsing of some PDF files
Rex Dieter
rdieter at fedoraproject.org
Mon Oct 17 14:42:21 UTC 2011
commit d3d34701583d8fd5e76cd3d9304abb961518b1dd
Author: Rex Dieter <rdieter at fedoraproject.org>
Date: Mon Oct 17 09:42:20 2011 -0500
Revert commit that breaks parsing of some PDF files
strigi-0.7.6-libstreamanalyzer_pdf.patch | 27 +++++++++++++++++++++++++++
strigi.spec | 10 +++++++++-
2 files changed, 36 insertions(+), 1 deletions(-)
---
diff --git a/strigi-0.7.6-libstreamanalyzer_pdf.patch b/strigi-0.7.6-libstreamanalyzer_pdf.patch
new file mode 100644
index 0000000..6871d67
--- /dev/null
+++ b/strigi-0.7.6-libstreamanalyzer_pdf.patch
@@ -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;
+ }
diff --git a/strigi.spec b/strigi.spec
index b88ec95..36479f3 100644
--- a/strigi.spec
+++ b/strigi.spec
@@ -7,7 +7,7 @@
Name: strigi
Version: 0.7.6
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A desktop search program
Group: Applications/Productivity
License: LGPLv2+
@@ -24,6 +24,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch50: strigi-0.7.5-static_convenience_libs.patch
## upstream patches
+# https://projects.kde.org/projects/kdesupport/strigi/libstreamanalyzer/repository/revisions/23d5ce636b7897dc3f233a5293f3164dac50566d
+Patch100: strigi-0.7.6-libstreamanalyzer_pdf.patch
BuildRequires: bison
BuildRequires: boost-devel
@@ -75,6 +77,9 @@ Strigi search engine libraries
%setup -q -n %{name}-%{version}%{?pre:-%{pre}}
%patch50 -p1 -b .static_convenience_libs
+pushd libstreamanalyzer
+%patch100 -p1 -b libstreamanalyzer_pdf
+popd
%build
@@ -154,6 +159,9 @@ rm -rf %{buildroot}
%changelog
+* Mon Oct 17 2011 Rex Dieter <rdieter at fedoraproject.org> 0.7.6-3
+- Revert commit that breaks parsing of some PDF files
+
* Fri Oct 14 2011 Rex Dieter <rdieter at fedoraproject.org> - 0.7.6-2
- rebuild (exiv2)
More information about the scm-commits
mailing list