ship xpdf headers (for texlive)
This commit is contained in:
parent
e7251d20e4
commit
184c74081d
138
poppler-ObjStream.patch
Normal file
138
poppler-ObjStream.patch
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
diff -up poppler-0.6.2/poppler-0.6.2/poppler/XRef.h.objstream poppler-0.6.2/poppler-0.6.2/poppler/XRef.h
|
||||||
|
--- poppler-0.6.2/poppler-0.6.2/poppler/XRef.h.objstream 2007-11-05 00:11:05.000000000 +0100
|
||||||
|
+++ poppler-0.6.2/poppler-0.6.2/poppler/XRef.h 2007-11-28 12:23:02.000000000 +0100
|
||||||
|
@@ -19,7 +19,36 @@
|
||||||
|
class Dict;
|
||||||
|
class Stream;
|
||||||
|
class Parser;
|
||||||
|
-class 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);
|
||||||
|
+
|
||||||
|
+ int *getOffsets() { return offsets; }
|
||||||
|
+ Guint getFirstOffset() { return firstOffset; }
|
||||||
|
+
|
||||||
|
+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)
|
||||||
|
+ int *offsets; // the object offsets (length = nObjects)
|
||||||
|
+ Guint firstOffset;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------
|
||||||
|
// XRef
|
||||||
|
@@ -106,6 +135,7 @@ public:
|
||||||
|
int getSize() { return size; }
|
||||||
|
XRefEntry *getEntry(int i) { return &entries[i]; }
|
||||||
|
Object *getTrailerDict() { return &trailerDict; }
|
||||||
|
+ ObjectStream *getObjStr() { return objStr; }
|
||||||
|
|
||||||
|
// Write access
|
||||||
|
void setModifiedObject(Object* o, Ref r);
|
||||||
|
diff -up poppler-0.6.2/poppler-0.6.2/poppler/XRef.cc.objstream poppler-0.6.2/poppler-0.6.2/poppler/XRef.cc
|
||||||
|
--- poppler-0.6.2/poppler-0.6.2/poppler/XRef.cc.objstream 2007-11-05 00:11:05.000000000 +0100
|
||||||
|
+++ poppler-0.6.2/poppler-0.6.2/poppler/XRef.cc 2007-11-28 12:23:02.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) {
|
13
poppler-qt3-check.patch
Normal file
13
poppler-qt3-check.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
--- poppler-0.6.2/poppler-0.6.2/configure.orig 2007-11-29 12:09:57.000000000 +0100
|
||||||
|
+++ poppler-0.6.2/poppler-0.6.2/configure 2007-11-29 12:20:49.000000000 +0100
|
||||||
|
@@ -25816,8 +25816,8 @@
|
||||||
|
|
||||||
|
if test x$enable_poppler_qt = xyes; then
|
||||||
|
|
||||||
|
-qt_incdirs="$QTINC /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib/qt3/include /usr/lib/qt/include /usr/share/qt3/include"
|
||||||
|
-qt_libdirs="$QTLIB /usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt3/lib /usr/lib/qt/lib /usr/share/qt3/lib"
|
||||||
|
+qt_incdirs="$QTINC /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib/qt3/include /usr/lib/qt/include /usr/share/qt3/include /usr/lib/qt-3.3/include"
|
||||||
|
+qt_libdirs="$QTLIB /usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt3/lib /usr/lib/qt/lib /usr/share/qt3/lib /usr/lib/qt-3.3/lib"
|
||||||
|
if test -n "$QTDIR" ; then
|
||||||
|
qt_incdirs="$QTDIR/include $qt_incdirs"
|
||||||
|
qt_libdirs="$QTDIR/lib $qt_libdirs"
|
18
poppler.spec
18
poppler.spec
@ -3,7 +3,7 @@
|
|||||||
Summary: PDF rendering library
|
Summary: PDF rendering library
|
||||||
Name: poppler
|
Name: poppler
|
||||||
Version: 0.6.2
|
Version: 0.6.2
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2 and Redistributable, no modification permitted
|
License: GPLv2 and Redistributable, no modification permitted
|
||||||
# the code is GPLv2
|
# the code is GPLv2
|
||||||
# the charmap data in /usr/share/poppler is redistributable
|
# the charmap data in /usr/share/poppler is redistributable
|
||||||
@ -12,6 +12,8 @@ URL: http://poppler.freedesktop.org/
|
|||||||
Source0: http://poppler.freedesktop.org/poppler-%{version}.tar.gz
|
Source0: http://poppler.freedesktop.org/poppler-%{version}.tar.gz
|
||||||
Source1: http://poppler.freedesktop.org/poppler-data-%{dataversion}.tar.gz
|
Source1: http://poppler.freedesktop.org/poppler-data-%{dataversion}.tar.gz
|
||||||
# https://bugs.freedesktop.org/show_bug.cgi?id=12016
|
# https://bugs.freedesktop.org/show_bug.cgi?id=12016
|
||||||
|
Patch0: poppler-ObjStream.patch
|
||||||
|
Patch1: poppler-qt3-check.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||||
|
|
||||||
BuildRequires: gtk2-devel
|
BuildRequires: gtk2-devel
|
||||||
@ -91,6 +93,8 @@ converting PDF files to a number of other formats.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -c -q -a1
|
%setup -c -q -a1
|
||||||
|
%patch0 -p1 -b .objstream
|
||||||
|
%patch1 -p1 -b .qt3-check
|
||||||
|
|
||||||
%build
|
%build
|
||||||
( cd %{name}-%{version}
|
( cd %{name}-%{version}
|
||||||
@ -98,7 +102,8 @@ converting PDF files to a number of other formats.
|
|||||||
--disable-static \
|
--disable-static \
|
||||||
--enable-cairo-output \
|
--enable-cairo-output \
|
||||||
--enable-poppler-qt \
|
--enable-poppler-qt \
|
||||||
--enable-poppler-qt4
|
--enable-poppler-qt4 \
|
||||||
|
--enable-xpdf-headers
|
||||||
)
|
)
|
||||||
make %{?_smp_mflags} -C %{name}-%{version}
|
make %{?_smp_mflags} -C %{name}-%{version}
|
||||||
|
|
||||||
@ -138,8 +143,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_libdir}/pkgconfig/poppler-splash.pc
|
%{_libdir}/pkgconfig/poppler-splash.pc
|
||||||
%{_libdir}/libpoppler-glib.so
|
%{_libdir}/libpoppler-glib.so
|
||||||
%{_libdir}/libpoppler.so
|
%{_libdir}/libpoppler.so
|
||||||
%dir %{_includedir}/poppler/
|
%{_includedir}/poppler/
|
||||||
%{_includedir}/poppler/glib/
|
|
||||||
%{_datadir}/gtk-doc/html/poppler
|
%{_datadir}/gtk-doc/html/poppler
|
||||||
|
|
||||||
%files qt
|
%files qt
|
||||||
@ -168,7 +172,11 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Nov 22 2007 Matthias Clasen@redhat.com> - 0.6.2-1
|
* Thu Nov 28 2007 Matthias Clasen <mclasen@redhat.com> - 0.6.2-2
|
||||||
|
- package xpdf headers in poppler-devel (Jindrich Novy)
|
||||||
|
- Fix qt3 detection (Denis Leroy)
|
||||||
|
|
||||||
|
* Thu Nov 22 2007 Matthias Clasen <mclasen@redhat.com> - 0.6.2-1
|
||||||
- Update to 0.6.2
|
- Update to 0.6.2
|
||||||
|
|
||||||
* Thu Oct 11 2007 Rex Dieter <rdieter[AT]fedoraproject.org> - 0.6-2
|
* Thu Oct 11 2007 Rex Dieter <rdieter[AT]fedoraproject.org> - 0.6-2
|
||||||
|
Loading…
Reference in New Issue
Block a user