- poppler-0.12.1

- deprecate xpdf/pdftohtml Conflicts/Obsoletes
This commit is contained in:
Rex Dieter 2009-10-19 14:38:06 +00:00
parent a14a00688e
commit ce9ddcd542
4 changed files with 138 additions and 110 deletions

View File

@ -1 +1 @@
poppler-0.12.0.tar.gz
poppler-0.12.1.tar.gz

View File

@ -1,12 +1,120 @@
diff -up poppler/XRef.h.objstream poppler-0.8.6/poppler-0.8.6/poppler/XRef.h
--- poppler/XRef.h.objstream 20.8.31-21 21:00:59.000000000 +0100
+++ poppler/XRef.h 20.8.32-18 17:18:47.000000000 +0100
@@ -19,7 +19,36 @@
diff -up poppler-0.12.1/poppler/XRef.cc.objstream poppler-0.12.1/poppler/XRef.cc
--- poppler-0.12.1/poppler/XRef.cc.objstream 2009-10-17 17:23:09.000000000 -0500
+++ poppler-0.12.1/poppler/XRef.cc 2009-10-19 08:29:24.552691208 -0500
@@ -69,37 +69,9 @@
// ObjectStream
//------------------------------------------------------------------------
-class ObjectStream {
-public:
-
- // Create an object stream, using object number <objStrNum>,
- // generation 0.
- ObjectStream(XRef *xref, int objStrNumA);
-
- GBool isOk() { return ok; }
-
- ~ObjectStream();
-
- // Return the object number of this object stream.
- int getObjStrNum() { return objStrNum; }
-
- // Get the <objIdx>th object from this stream, which should be
- // object number <objNum>, generation 0.
- Object *getObject(int objIdx, int objNum, Object *obj);
-
-private:
-
- int objStrNum; // object number of the object stream
- int nObjects; // number of objects in the stream
- Object *objs; // the objects (length = nObjects)
- int *objNums; // the object numbers (length = nObjects)
- GBool ok;
-};
-
ObjectStream::ObjectStream(XRef *xref, int objStrNumA) {
Stream *str;
Parser *parser;
- int *offsets;
Object objStr, obj1, obj2;
int first, i;
@@ -107,6 +79,7 @@ ObjectStream::ObjectStream(XRef *xref, i
nObjects = 0;
objs = NULL;
objNums = NULL;
+ offsets = NULL;
ok = gFalse;
if (!xref->fetch(objStrNum, 0, &objStr)->isStream()) {
@@ -128,6 +101,7 @@ ObjectStream::ObjectStream(XRef *xref, i
goto err1;
}
first = obj1.getInt();
+ firstOffset = objStr.getStream()->getBaseStream()->getStart() + first;
obj1.free();
if (first < 0) {
goto err1;
@@ -156,7 +130,7 @@ ObjectStream::ObjectStream(XRef *xref, i
obj1.free();
obj2.free();
delete parser;
- gfree(offsets);
+// gfree(offsets);
goto err1;
}
objNums[i] = obj1.getInt();
@@ -166,7 +140,7 @@ ObjectStream::ObjectStream(XRef *xref, i
if (objNums[i] < 0 || offsets[i] < 0 ||
(i > 0 && offsets[i] < offsets[i-1])) {
delete parser;
- gfree(offsets);
+// gfree(offsets);
goto err1;
}
}
@@ -195,7 +169,7 @@ ObjectStream::ObjectStream(XRef *xref, i
delete parser;
}
- gfree(offsets);
+ // gfree(offsets);
ok = gTrue;
err1:
@@ -212,6 +186,7 @@ ObjectStream::~ObjectStream() {
delete[] objs;
}
gfree(objNums);
+ gfree(offsets);
}
Object *ObjectStream::getObject(int objIdx, int objNum, Object *obj) {
diff -up poppler-0.12.1/poppler/XRef.h.objstream poppler-0.12.1/poppler/XRef.h
--- poppler-0.12.1/poppler/XRef.h.objstream 2009-09-09 16:22:31.000000000 -0500
+++ poppler-0.12.1/poppler/XRef.h 2009-10-19 08:34:12.152684910 -0500
@@ -1,8 +1,8 @@
//========================================================================
//
-// XRef.h
+//XRef.h
//
-// Copyright 1996-2003 Glyph & Cog, LLC
+//Copyright 1996-2003 Glyph & Cog, LLC
//
//========================================================================
@@ -36,7 +36,43 @@
class Dict;
class Stream;
class Parser;
-class ObjectStream;
+
+
+//------------------------------------------------------------------------
+// ObjectStream
+//------------------------------------------------------------------------
+
+class ObjectStream {
+public:
+
@ -14,6 +122,8 @@ diff -up poppler/XRef.h.objstream poppler-0.8.6/poppler-0.8.6/poppler/XRef.h
+ // generation 0.
+ ObjectStream(XRef *xref, int objStrNumA);
+
+ GBool isOk() { return ok; }
+
+ ~ObjectStream();
+
+ // Return the object number of this object stream.
@ -32,14 +142,14 @@ diff -up poppler/XRef.h.objstream poppler-0.8.6/poppler-0.8.6/poppler/XRef.h
+ int nObjects; // number of objects in the stream
+ Object *objs; // the objects (length = nObjects)
+ int *objNums; // the object numbers (length = nObjects)
+ GBool ok;
+ int *offsets; // the object offsets (length = nObjects)
+ Guint firstOffset;
+};
+
//------------------------------------------------------------------------
// XRef
@@ -106,6 +135,7 @@ public:
@@ -123,6 +159,7 @@ public:
int getSize() { return size; }
XRefEntry *getEntry(int i) { return &entries[i]; }
Object *getTrailerDict() { return &trailerDict; }
@ -47,92 +157,3 @@ diff -up poppler/XRef.h.objstream poppler-0.8.6/poppler-0.8.6/poppler/XRef.h
// Write access
void setModifiedObject(Object* o, Ref r);
diff -up poppler/XRef.cc.objstream poppler/XRef.cc
--- poppler/XRef.cc.objstream 20.8.31-21 21:00:59.000000000 +0100
+++ poppler/XRef.cc 20.8.32-18 17:18:47.000000000 +0100
@@ -50,34 +50,9 @@
// ObjectStream
//------------------------------------------------------------------------
-class ObjectStream {
-public:
-
- // Create an object stream, using object number <objStrNum>,
- // generation 0.
- ObjectStream(XRef *xref, int objStrNumA);
-
- ~ObjectStream();
-
- // Return the object number of this object stream.
- int getObjStrNum() { return objStrNum; }
-
- // Get the <objIdx>th object from this stream, which should be
- // object number <objNum>, generation 0.
- Object *getObject(int objIdx, int objNum, Object *obj);
-
-private:
-
- int objStrNum; // object number of the object stream
- int nObjects; // number of objects in the stream
- Object *objs; // the objects (length = nObjects)
- int *objNums; // the object numbers (length = nObjects)
-};
-
ObjectStream::ObjectStream(XRef *xref, int objStrNumA) {
Stream *str;
Parser *parser;
- int *offsets;
Object objStr, obj1, obj2;
int first, i;
@@ -85,6 +60,7 @@ ObjectStream::ObjectStream(XRef *xref, i
nObjects = 0;
objs = NULL;
objNums = NULL;
+ offsets = NULL;
if (!xref->fetch(objStrNum, 0, &objStr)->isStream()) {
goto err1;
@@ -105,6 +81,7 @@ ObjectStream::ObjectStream(XRef *xref, i
goto err1;
}
first = obj1.getInt();
+ firstOffset = objStr.getStream()->getBaseStream()->getStart() + first;
obj1.free();
if (first < 0) {
goto err1;
@@ -131,7 +108,7 @@ ObjectStream::ObjectStream(XRef *xref, i
obj1.free();
obj2.free();
delete parser;
- gfree(offsets);
+// gfree(offsets);
goto err1;
}
objNums[i] = obj1.getInt();
@@ -141,7 +118,7 @@ ObjectStream::ObjectStream(XRef *xref, i
if (objNums[i] < 0 || offsets[i] < 0 ||
(i > 0 && offsets[i] < offsets[i-1])) {
delete parser;
- gfree(offsets);
+// gfree(offsets);
goto err1;
}
}
@@ -170,7 +147,7 @@ ObjectStream::ObjectStream(XRef *xref, i
delete parser;
}
- gfree(offsets);
+// gfree(offsets);
err1:
objStr.free();
@@ -187,6 +164,7 @@ ObjectStream::~ObjectStream() {
delete[] objs;
}
gfree(objNums);
+ gfree(offsets);
}
Object *ObjectStream::getObject(int objIdx, int objNum, Object *obj) {

View File

@ -1,15 +1,17 @@
Summary: PDF rendering library
Name: poppler
Version: 0.12.0
Version: 0.12.1
Release: 1%{?dist}
License: GPLv2
Group: Development/Libraries
URL: http://poppler.freedesktop.org/
Source0: http://poppler.freedesktop.org/poppler-%{version}.tar.gz
# for texlive/pdftex, TODO: upstream
Patch0: poppler-ObjStream.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
## upstreamable patches
# for texlive/pdftex, make ObjStream class public
Patch100: poppler-0.12.1-objstream.patch
BuildRequires: automake libtool
BuildRequires: cairo-devel >= 1.8.4
@ -93,15 +95,16 @@ Requires: qt4-devel
Summary: Command line utilities for converting PDF files
Group: Applications/Text
Requires: %{name} = %{version}-%{release}
Conflicts: xpdf <= 1:3.01-8
# There's an extras package that provides pdftohtml
%if 0%{?fedora} < 11
# last seen in fc8
Provides: pdftohtml
Obsoletes: pdftohtml
# last seen in fc7
Provides: xpdf-utils = 1:3.01-27.fc7
Obsoletes: xpdf-utils <= 1:3.01-26.fc7
# even earlier?
Conflicts: xpdf <= 1:3.01-8
%endif
%description utils
Poppler, a PDF rendering library, is a fork of the xpdf PDF
viewer developed by Derek Noonburg of Glyph and Cog, LLC.
@ -112,14 +115,13 @@ converting PDF files to a number of other formats.
%prep
%setup -q
%patch0 -p0 -b .objstream
%patch100 -p1 -b .objstream
# hammer to nuke rpaths, recheck on new releases
autoreconf -i -f
%build
# can use in a pinch, but isn't necessary (in general) -- Rex
unset QTDIR && . /etc/profile.d/qt.sh
%configure \
--disable-static \
--enable-cairo-output \
@ -135,9 +137,10 @@ make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm $RPM_BUILD_ROOT%{_libdir}/lib*.la
rm -fv $RPM_BUILD_ROOT%{_libdir}/lib*.la
%post -p /sbin/ldconfig
@ -211,6 +214,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Mon Oct 19 2009 Rex Dieter <rdieter@fedoraproject.org> - 0.12.1-1
- poppler-0.12.1
- deprecate xpdf/pdftohtml Conflicts/Obsoletes
* Wed Sep 09 2009 Rex Dieter <rdieter@fedoraproject.org> - 0.12.0-1
- Update to 0.12.0

View File

@ -1 +1 @@
399b25d9d71ad22bc9a2a9281769c49c poppler-0.12.0.tar.gz
3432046ee111efa5b85e5f2cdde8af5c poppler-0.12.1.tar.gz