From ce9ddcd542e3fffd29b8e47ad6dab34bc0af00a9 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 19 Oct 2009 14:38:06 +0000 Subject: [PATCH] - poppler-0.12.1 - deprecate xpdf/pdftohtml Conflicts/Obsoletes --- .cvsignore | 2 +- ...am.patch => poppler-0.12.1-objstream.patch | 211 ++++++++++-------- poppler.spec | 33 +-- sources | 2 +- 4 files changed, 138 insertions(+), 110 deletions(-) rename poppler-ObjStream.patch => poppler-0.12.1-objstream.patch (67%) diff --git a/.cvsignore b/.cvsignore index 8addc69..8ea6b6d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -poppler-0.12.0.tar.gz +poppler-0.12.1.tar.gz diff --git a/poppler-ObjStream.patch b/poppler-0.12.1-objstream.patch similarity index 67% rename from poppler-ObjStream.patch rename to poppler-0.12.1-objstream.patch index 5b52ead..9456e7a 100644 --- a/poppler-ObjStream.patch +++ b/poppler-0.12.1-objstream.patch @@ -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 , +- // 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 th object from this stream, which should be +- // object number , 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 , -- // generation 0. -- ObjectStream(XRef *xref, int objStrNumA); -- -- ~ObjectStream(); -- -- // Return the object number of this object stream. -- int getObjStrNum() { return objStrNum; } -- -- // Get the th object from this stream, which should be -- // object number , 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) { diff --git a/poppler.spec b/poppler.spec index f0542fa..6b2c798 100644 --- a/poppler.spec +++ b/poppler.spec @@ -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 - 0.12.1-1 +- poppler-0.12.1 +- deprecate xpdf/pdftohtml Conflicts/Obsoletes + * Wed Sep 09 2009 Rex Dieter - 0.12.0-1 - Update to 0.12.0 diff --git a/sources b/sources index 5cd15e6..d2a980d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -399b25d9d71ad22bc9a2a9281769c49c poppler-0.12.0.tar.gz +3432046ee111efa5b85e5f2cdde8af5c poppler-0.12.1.tar.gz