- poppler-0.8.0-ocg-crash.patch: Fix a crash when no optional content
groups are defined. - Mangle configure to account for the new directory for qt3 libs. - Fix grammar in %description.
This commit is contained in:
parent
b62eac01f6
commit
026875ff6e
62
poppler-0.8.0-ocg-crash.patch
Normal file
62
poppler-0.8.0-ocg-crash.patch
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
diff -up poppler-0.8.0/poppler-0.8.0/poppler/OptionalContent.cc.jx poppler-0.8.0/poppler-0.8.0/poppler/OptionalContent.cc
|
||||||
|
--- poppler-0.8.0/poppler-0.8.0/poppler/OptionalContent.cc.jx 2008-03-14 20:24:54.000000000 -0400
|
||||||
|
+++ poppler-0.8.0/poppler-0.8.0/poppler/OptionalContent.cc 2008-04-06 18:56:06.000000000 -0400
|
||||||
|
@@ -162,6 +162,8 @@ OptionalContentGroup* OCGs::findOcgByRef
|
||||||
|
{
|
||||||
|
//TODO: make this more efficient
|
||||||
|
OptionalContentGroup *ocg = NULL;
|
||||||
|
+ if (!optionalContentGroups)
|
||||||
|
+ return NULL;
|
||||||
|
for (int i=0; i < optionalContentGroups->getLength(); ++i) {
|
||||||
|
ocg = (OptionalContentGroup*)optionalContentGroups->get(i);
|
||||||
|
if ( (ocg->ref().num == ref.num) && (ocg->ref().gen == ref.gen) ) {
|
||||||
|
@@ -208,7 +210,7 @@ bool OCGs::optContentIsVisible( Object *
|
||||||
|
}
|
||||||
|
} else if (ocg.isRef()) {
|
||||||
|
OptionalContentGroup* oc = findOcgByRef( ocg.getRef() );
|
||||||
|
- if ( oc->state() == OptionalContentGroup::Off ) {
|
||||||
|
+ if ( !oc || oc->state() == OptionalContentGroup::Off ) {
|
||||||
|
result = false;
|
||||||
|
} else {
|
||||||
|
result = true ;
|
||||||
|
@@ -218,11 +220,8 @@ bool OCGs::optContentIsVisible( Object *
|
||||||
|
policy.free();
|
||||||
|
} else if ( dictType.isName("OCG") ) {
|
||||||
|
OptionalContentGroup* oc = findOcgByRef( dictRef->getRef() );
|
||||||
|
- if ( oc ) {
|
||||||
|
-// printf("Found valid group object\n");
|
||||||
|
- if ( oc->state() == OptionalContentGroup::Off ) {
|
||||||
|
- result=false;
|
||||||
|
- }
|
||||||
|
+ if ( !oc || oc->state() == OptionalContentGroup::Off ) {
|
||||||
|
+ result=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dictType.free();
|
||||||
|
@@ -253,6 +252,8 @@ bool OCGs::allOff( Array *ocgArray )
|
||||||
|
ocgArray->getNF(i, &ocgItem);
|
||||||
|
if (ocgItem.isRef()) {
|
||||||
|
OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() );
|
||||||
|
+ if (!oc)
|
||||||
|
+ continue;
|
||||||
|
if ( oc->state() == OptionalContentGroup::On ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@@ -268,6 +269,8 @@ bool OCGs::anyOn( Array *ocgArray )
|
||||||
|
ocgArray->getNF(i, &ocgItem);
|
||||||
|
if (ocgItem.isRef()) {
|
||||||
|
OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() );
|
||||||
|
+ if (!oc)
|
||||||
|
+ continue;
|
||||||
|
if ( oc->state() == OptionalContentGroup::On ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@@ -283,6 +286,8 @@ bool OCGs::anyOff( Array *ocgArray )
|
||||||
|
ocgArray->getNF(i, &ocgItem);
|
||||||
|
if (ocgItem.isRef()) {
|
||||||
|
OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() );
|
||||||
|
+ if (!oc)
|
||||||
|
+ continue;
|
||||||
|
if ( oc->state() == OptionalContentGroup::Off ) {
|
||||||
|
return true;
|
||||||
|
}
|
24
poppler.spec
24
poppler.spec
@ -3,7 +3,7 @@
|
|||||||
Summary: PDF rendering library
|
Summary: PDF rendering library
|
||||||
Name: poppler
|
Name: poppler
|
||||||
Version: 0.8.0
|
Version: 0.8.0
|
||||||
Release: 2%{?dist}
|
Release: 3%{?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
|
||||||
@ -13,6 +13,7 @@ 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
|
||||||
Patch0: poppler-ObjStream.patch
|
Patch0: poppler-ObjStream.patch
|
||||||
Patch1: fix-qt4-build.patch
|
Patch1: fix-qt4-build.patch
|
||||||
|
Patch2: poppler-0.8.0-ocg-crash.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||||
|
|
||||||
BuildRequires: gtk2-devel
|
BuildRequires: gtk2-devel
|
||||||
@ -21,7 +22,7 @@ BuildRequires: qt3-devel
|
|||||||
BuildRequires: qt4-devel
|
BuildRequires: qt4-devel
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Poppler, a PDF rendering library, it's a fork of the xpdf PDF
|
Poppler, a PDF rendering library, is a fork of the xpdf PDF
|
||||||
viewer developed by Derek Noonburg of Glyph and Cog, LLC.
|
viewer developed by Derek Noonburg of Glyph and Cog, LLC.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
@ -31,7 +32,7 @@ Requires: %{name} = %{version}-%{release}
|
|||||||
Requires: pkgconfig
|
Requires: pkgconfig
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Poppler, a PDF rendering library, it's a fork of the xpdf PDF
|
Poppler, a PDF rendering library, is a fork of the xpdf PDF
|
||||||
viewer developed by Derek Noonburg of Glyph and Cog, LLC.
|
viewer developed by Derek Noonburg of Glyph and Cog, LLC.
|
||||||
|
|
||||||
You should install the poppler-devel package if you would like to
|
You should install the poppler-devel package if you would like to
|
||||||
@ -103,7 +104,7 @@ Provides: xpdf-utils = 1:3.01-27.fc7
|
|||||||
Obsoletes: xpdf-utils <= 1:3.01-26.fc7
|
Obsoletes: xpdf-utils <= 1:3.01-26.fc7
|
||||||
|
|
||||||
%description utils
|
%description utils
|
||||||
Poppler, a PDF rendering library, it's a fork of the xpdf PDF
|
Poppler, a PDF rendering library, is a fork of the xpdf PDF
|
||||||
viewer developed by Derek Noonburg of Glyph and Cog, LLC.
|
viewer developed by Derek Noonburg of Glyph and Cog, LLC.
|
||||||
|
|
||||||
This utils package installs a number of command line tools for
|
This utils package installs a number of command line tools for
|
||||||
@ -113,17 +114,20 @@ converting PDF files to a number of other formats.
|
|||||||
%setup -c -q -a1
|
%setup -c -q -a1
|
||||||
%patch0 -p1 -b .objstream
|
%patch0 -p1 -b .objstream
|
||||||
%patch1 -p1 -b .fix-qt4-build
|
%patch1 -p1 -b .fix-qt4-build
|
||||||
|
%patch2 -p1 -b .ocg
|
||||||
|
|
||||||
%build
|
%build
|
||||||
( cd %{name}-%{version}
|
pushd %{name}-%{version}
|
||||||
|
# despair
|
||||||
|
sed -i s/qt3/qt-3.3/g configure
|
||||||
%configure \
|
%configure \
|
||||||
--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
|
--enable-xpdf-headers
|
||||||
)
|
make %{?_smp_mflags}
|
||||||
make %{?_smp_mflags} -C %{name}-%{version}
|
popd
|
||||||
|
|
||||||
pushd poppler-data-%{dataversion}
|
pushd poppler-data-%{dataversion}
|
||||||
cp COPYING COPYING-poppler-data
|
cp COPYING COPYING-poppler-data
|
||||||
@ -197,6 +201,12 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Apr 06 2008 Adam Jackson <ajax@redhat.com> 0.8.0-3
|
||||||
|
- poppler-0.8.0-ocg-crash.patch: Fix a crash when no optional content
|
||||||
|
groups are defined.
|
||||||
|
- Mangle configure to account for the new directory for qt3 libs.
|
||||||
|
- Fix grammar in %%description.
|
||||||
|
|
||||||
* Tue Apr 01 2008 Rex Dieter <rdieter@fedoraproject.org> - 0.8.0-2
|
* Tue Apr 01 2008 Rex Dieter <rdieter@fedoraproject.org> - 0.8.0-2
|
||||||
- -qt-devel: Requires: qt3-devel
|
- -qt-devel: Requires: qt3-devel
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user