rpms/xpdf/F-9 02_permissions.dpatch, NONE, 1.1 10_add_accelerators.dpatch, NONE, 1.1 fix-437725.dpatch, NONE, 1.1 fix-444648.dpatch, NONE, 1.1 fix-462544.dpatch, NONE, 1.1 fix-479467.dpatch, NONE, 1.1 xpdf-3.02-crash.patch, NONE, 1.1 xpdf.spec, 1.10, 1.11
Tom Callaway
spot at fedoraproject.org
Wed Dec 10 17:33:19 UTC 2008
- Previous message (by thread): rpms/perl-Test-Output/devel .cvsignore, 1.2, 1.3 perl-Test-Output.spec, 1.4, 1.5 sources, 1.2, 1.3
- Next message (by thread): rpms/xpdf/F-10 02_permissions.dpatch, NONE, 1.1 10_add_accelerators.dpatch, NONE, 1.1 fix-437725.dpatch, NONE, 1.1 fix-444648.dpatch, NONE, 1.1 fix-462544.dpatch, NONE, 1.1 fix-479467.dpatch, NONE, 1.1 xpdf-3.02-crash.patch, NONE, 1.1 xpdf.spec, 1.11, 1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: spot
Update of /cvs/extras/rpms/xpdf/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12076/F-9
Modified Files:
xpdf.spec
Added Files:
02_permissions.dpatch 10_add_accelerators.dpatch
fix-437725.dpatch fix-444648.dpatch fix-462544.dpatch
fix-479467.dpatch xpdf-3.02-crash.patch
Log Message:
apply debian patches
--- NEW FILE 02_permissions.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## permissions.dpatch by <hamish at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Remove PDF file permission checks
@DPATCH@
diff -urNad xpdf-3.02~/xpdf/PDFCore.cc xpdf-3.02/xpdf/PDFCore.cc
--- xpdf-3.02~/xpdf/PDFCore.cc 2007-02-28 09:05:52.000000000 +1100
+++ xpdf-3.02/xpdf/PDFCore.cc 2007-04-24 23:43:59.000000000 +1000
@@ -4,6 +4,8 @@
//
// Copyright 2004 Glyph & Cog, LLC
//
+// Modified for Debian by Hamish Moffatt, 18 August 2005.
+//
//========================================================================
#include <aconf.h>
@@ -1563,9 +1565,11 @@
int x0, y0, x1, y1, t;
GString *s;
+#ifdef ENFORCE_PERMISSIONS
if (!doc->okToCopy()) {
return NULL;
}
+#endif
if ((page = findPage(pg))) {
cvtUserToDev(pg, xMin, yMin, &x0, &y0);
cvtUserToDev(pg, xMax, yMax, &x1, &y1);
diff -urNad xpdf-3.02~/xpdf/XPDFCore.cc xpdf-3.02/xpdf/XPDFCore.cc
--- xpdf-3.02~/xpdf/XPDFCore.cc 2007-02-28 09:05:52.000000000 +1100
+++ xpdf-3.02/xpdf/XPDFCore.cc 2007-04-24 23:46:39.000000000 +1000
@@ -4,6 +4,8 @@
//
// Copyright 2002-2003 Glyph & Cog, LLC
//
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
+//
//========================================================================
#include <aconf.h>
@@ -384,11 +386,15 @@
#ifndef NO_TEXT_SELECT
if (selectULX != selectLRX &&
selectULY != selectLRY) {
+#ifdef ENFORCE_PERMISSIONS
if (doc->okToCopy()) {
copySelection();
} else {
error(-1, "Copying of text from this document is not allowed.");
}
+#else
+ copySelection();
+#endif
}
#endif
}
@@ -407,9 +413,11 @@
int pg;
double ulx, uly, lrx, lry;
+#ifdef ENFORCE_PERMISSIONS
if (!doc->okToCopy()) {
return;
}
+#endif
if (getSelection(&pg, &ulx, &uly, &lrx, &lry)) {
//~ for multithreading: need a mutex here
if (currentSelection) {
diff -urNad xpdf-3.02~/xpdf/XPDFViewer.cc xpdf-3.02/xpdf/XPDFViewer.cc
--- xpdf-3.02~/xpdf/XPDFViewer.cc 2007-02-28 09:05:52.000000000 +1100
+++ xpdf-3.02/xpdf/XPDFViewer.cc 2007-04-24 23:43:59.000000000 +1000
@@ -4,6 +4,8 @@
//
// Copyright 2002-2003 Glyph & Cog, LLC
//
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
+//
//========================================================================
#include <aconf.h>
@@ -3406,10 +3408,12 @@
PSOutputDev *psOut;
doc = viewer->core->getDoc();
+#ifdef ENFORCE_PERMISSIONS
if (!doc->okToPrint()) {
error(-1, "Printing this document is not allowed.");
return;
}
+#endif
viewer->core->setBusyCursor(gTrue);
diff -urNad xpdf-3.02~/xpdf/pdfimages.cc xpdf-3.02/xpdf/pdfimages.cc
--- xpdf-3.02~/xpdf/pdfimages.cc 2007-02-28 09:05:52.000000000 +1100
+++ xpdf-3.02/xpdf/pdfimages.cc 2007-04-24 23:43:59.000000000 +1000
@@ -4,6 +4,8 @@
//
// Copyright 1998-2003 Glyph & Cog, LLC
//
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
+//
//========================================================================
#include <aconf.h>
@@ -119,11 +121,13 @@
}
// check for copy permission
+#ifdef ENFORCE_PERMISSIONS
if (!doc->okToCopy()) {
error(-1, "Copying of images from this document is not allowed.");
exitCode = 3;
goto err1;
}
+#endif
// get page range
if (firstPage < 1)
diff -urNad xpdf-3.02~/xpdf/pdftops.cc xpdf-3.02/xpdf/pdftops.cc
--- xpdf-3.02~/xpdf/pdftops.cc 2007-02-28 09:05:52.000000000 +1100
+++ xpdf-3.02/xpdf/pdftops.cc 2007-04-24 23:43:59.000000000 +1000
@@ -4,6 +4,8 @@
//
// Copyright 1996-2003 Glyph & Cog, LLC
//
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
+//
//========================================================================
#include <aconf.h>
@@ -278,12 +280,14 @@
goto err1;
}
+#ifdef ENFORCE_PERMISSIONS
// check for print permission
if (!doc->okToPrint()) {
error(-1, "Printing this document is not allowed.");
exitCode = 3;
goto err1;
}
+#endif
// construct PostScript file name
if (argc == 3) {
diff -urNad xpdf-3.02~/xpdf/pdftotext.cc xpdf-3.02/xpdf/pdftotext.cc
--- xpdf-3.02~/xpdf/pdftotext.cc 2007-02-28 09:05:52.000000000 +1100
+++ xpdf-3.02/xpdf/pdftotext.cc 2007-04-24 23:43:59.000000000 +1000
@@ -4,6 +4,8 @@
//
// Copyright 1997-2003 Glyph & Cog, LLC
//
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
+//
//========================================================================
#include <aconf.h>
@@ -160,12 +162,14 @@
goto err2;
}
+#ifdef ENFORCE_PERMISSIONS
// check for copy permission
if (!doc->okToCopy()) {
error(-1, "Copying of text from this document is not allowed.");
exitCode = 3;
goto err2;
}
+#endif
// construct text file name
if (argc == 3) {
--- NEW FILE 10_add_accelerators.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 10_add_accelerators.dpatch by <hamish at noddy.cloud.net.au>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Add keyboard accelerators for rotate (#385962)
@DPATCH@
diff -urNad xpdf-3.02~/xpdf/XPDFViewer.cc xpdf-3.02/xpdf/XPDFViewer.cc
--- xpdf-3.02~/xpdf/XPDFViewer.cc 2007-04-25 01:40:50.000000000 +1000
+++ xpdf-3.02/xpdf/XPDFViewer.cc 2007-04-25 01:42:13.000000000 +1000
@@ -1958,16 +1958,22 @@
n = 0;
s = XmStringCreateLocalized("Rotate counterclockwise");
XtSetArg(args[n], XmNlabelString, s); ++n;
+ s2 = XmStringCreateLocalized("[");
+ XtSetArg(args[n], XmNacceleratorText, s2); ++n;
btn = XmCreatePushButton(popupMenu, "rotateCCW", args, n);
XmStringFree(s);
+ XmStringFree(s2);
XtManageChild(btn);
XtAddCallback(btn, XmNactivateCallback,
&rotateCCWCbk, (XtPointer)this);
n = 0;
s = XmStringCreateLocalized("Rotate clockwise");
XtSetArg(args[n], XmNlabelString, s); ++n;
+ s2 = XmStringCreateLocalized("]");
+ XtSetArg(args[n], XmNacceleratorText, s2); ++n;
btn = XmCreatePushButton(popupMenu, "rotateCW", args, n);
XmStringFree(s);
+ XmStringFree(s2);
XtManageChild(btn);
XtAddCallback(btn, XmNactivateCallback,
&rotateCWCbk, (XtPointer)this);
--- NEW FILE fix-437725.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## fix-437725.dpatch from Arno Renevier <arenevier at fdn.fr>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix segmentation fault when pressing Ctrl-W in full screen mode
@DPATCH@
--- a/xpdf/XPDFViewer.cc 2007-08-13 22:41:36.000000000 +0200
+++ b/xpdf/XPDFViewer.cc 2007-08-13 23:01:07.000000000 +0200
@@ -400,18 +400,21 @@ void XPDFViewer::clear() {
title = app->getTitle() ? app->getTitle()->getCString()
: (char *)xpdfAppName;
XtVaSetValues(win, XmNtitle, title, XmNiconName, title, NULL);
- s = XmStringCreateLocalized("");
- XtVaSetValues(pageNumText, XmNlabelString, s, NULL);
- XmStringFree(s);
- s = XmStringCreateLocalized(" of 0");
- XtVaSetValues(pageCountLabel, XmNlabelString, s, NULL);
- XmStringFree(s);
- // disable buttons
- XtVaSetValues(prevTenPageBtn, XmNsensitive, False, NULL);
- XtVaSetValues(prevPageBtn, XmNsensitive, False, NULL);
- XtVaSetValues(nextTenPageBtn, XmNsensitive, False, NULL);
- XtVaSetValues(nextPageBtn, XmNsensitive, False, NULL);
+ if (toolBar != None) {
+ s = XmStringCreateLocalized("");
+ XtVaSetValues(pageNumText, XmNlabelString, s, NULL);
+ XmStringFree(s);
+ s = XmStringCreateLocalized(" of 0");
+ XtVaSetValues(pageCountLabel, XmNlabelString, s, NULL);
+ XmStringFree(s);
+
+ // disable buttons
+ XtVaSetValues(prevTenPageBtn, XmNsensitive, False, NULL);
+ XtVaSetValues(prevPageBtn, XmNsensitive, False, NULL);
+ XtVaSetValues(nextTenPageBtn, XmNsensitive, False, NULL);
+ XtVaSetValues(nextPageBtn, XmNsensitive, False, NULL);
+ }
// remove the old outline
#ifndef DISABLE_OUTLINE
--- NEW FILE fix-444648.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## fix-444648.dpatch by Bernhard R. Link <brlink at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Do proper PS stream encoding on 64 bit architectures
@DPATCH@
--- xpdf-3.02/xpdf/Stream.cc.BAD 2008-12-10 12:16:16.000000000 -0500
+++ xpdf-3.02/xpdf/Stream.cc 2008-12-10 12:16:21.000000000 -0500
@@ -4514,7 +4514,7 @@ void ASCII85Encoder::reset() {
GBool ASCII85Encoder::fillBuf() {
Guint t;
char buf1[5];
- int c0, c1, c2, c3;
+ unsigned int c0, c1, c2, c3;
int n, i;
if (eof) {
--- NEW FILE fix-462544.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## fix-462544.dpatch from Jiri Palecek <jpalecek at web.de>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix segmentation fault in image handling
@DPATCH@
--- xpdf-3.02/xpdf/SplashOutputDev.cc 2007-02-27 23:05:52.000000000 +0100
+++ xpdf-3.02.new/xpdf/SplashOutputDev.cc 2008-02-17 17:28:46.000000000 +0100
@@ -2475,14 +2461,14 @@
tx = (int)floor(xMin);
if (tx < 0) {
tx = 0;
- } else if (tx > bitmap->getWidth()) {
- tx = bitmap->getWidth();
+ } else if (tx >= bitmap->getWidth()) {
+ tx = bitmap->getWidth()-1;
}
ty = (int)floor(yMin);
if (ty < 0) {
ty = 0;
- } else if (ty > bitmap->getHeight()) {
- ty = bitmap->getHeight();
+ } else if (ty >= bitmap->getHeight()) {
+ ty = bitmap->getHeight()-1;
}
w = (int)ceil(xMax) - tx + 1;
if (tx + w > bitmap->getWidth()) {
--- NEW FILE fix-479467.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## fix-479467.dpatch from Stephan Beyer <s-beyer at gmx.net>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix segmentation fault when pressing g in full screen mode
@DPATCH@
diff -ruN xpdf-3.02.old/xpdf/XPDFViewer.cc xpdf-3.02.fix/xpdf/XPDFViewer.cc
--- xpdf-3.02.old/xpdf/XPDFViewer.cc 2007-02-27 23:05:52.000000000 +0100
+++ xpdf-3.02.fix/xpdf/XPDFViewer.cc 2008-05-04 21:29:34.000000000 +0200
@@ -834,6 +834,9 @@
void XPDFViewer::cmdFocusToPageNum(GString *args[], int nArgs,
XEvent *event) {
+ if (core->getFullScreen()) {
+ return;
+ }
XmTextFieldSetSelection(pageNumText, 0,
strlen(XmTextFieldGetString(pageNumText)),
XtLastTimestampProcessed(display));
xpdf-3.02-crash.patch:
--- NEW FILE xpdf-3.02-crash.patch ---
diff -up xpdf-3.02/fofi/FoFiType1.cc.BAD xpdf-3.02/fofi/FoFiType1.cc
--- xpdf-3.02/fofi/FoFiType1.cc.BAD 2008-12-10 11:55:08.000000000 -0500
+++ xpdf-3.02/fofi/FoFiType1.cc 2008-12-10 11:57:42.000000000 -0500
@@ -235,9 +235,14 @@ void FoFiType1::parse() {
}
}
} else {
- if (strtok(buf, " \t") &&
- (p = strtok(NULL, " \t\n\r")) && !strcmp(p, "def")) {
- break;
+ p = strtok(buf, " \t\n\r");
+ if (p)
+ {
+ if (!strcmp(p, "def")) break;
+ if (!strcmp(p, "readonly")) break;
+ // the spec does not says this but i'm mantaining old xpdf behaviour that accepts "foo def" as end of the encoding array
+ p = strtok(buf, " \t\n\r");
+ if (p && !strcmp(p, "def")) break;
}
}
}
diff -up xpdf-3.02/splash/Splash.cc.BAD xpdf-3.02/splash/Splash.cc
--- xpdf-3.02/splash/Splash.cc.BAD 2008-12-10 11:54:10.000000000 -0500
+++ xpdf-3.02/splash/Splash.cc 2008-12-10 11:54:49.000000000 -0500
@@ -1573,6 +1573,11 @@ SplashError Splash::xorFill(SplashPath *
}
xPath = new SplashXPath(path, state->matrix, state->flatness, gTrue);
xPath->sort();
+ if (!&xPath->segs[0])
+ {
+ delete xPath;
+ return splashErrEmptyPath;
+ }
scanner = new SplashXPathScanner(xPath, eo);
// get the min and max x and y values
Index: xpdf.spec
===================================================================
RCS file: /cvs/extras/rpms/xpdf/F-9/xpdf.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- xpdf.spec 19 Jun 2008 13:11:20 -0000 1.10
+++ xpdf.spec 10 Dec 2008 17:32:49 -0000 1.11
@@ -1,7 +1,7 @@
Summary: A PDF file viewer for the X Window System
Name: xpdf
Version: 3.02
-Release: 7%{?dist}
+Release: 9%{?dist}
License: GPLv2
Epoch: 1
Url: http://www.foolabs.com/xpdf/
@@ -37,7 +37,7 @@
Patch7: xpdf-3.00-xfont.patch
Patch9: xpdf-3.00-papersize.patch
Patch10: xpdf-3.00-gcc4.patch
-Patch11: xpdf-3.01-crash.patch
+Patch11: xpdf-3.02-crash.patch
Patch12: xpdf-3.00-64bit.patch
# Patch13: xpdf-3.01-resize.patch
# Patch14: xpdf-3.01-freetype-internals.patch
@@ -51,6 +51,18 @@
Patch100: xpdf-3.02pl1.patch
Patch101: ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl2.patch
+# Debian patches
+Patch200: 02_permissions.dpatch
+Patch201: 10_add_accelerators.dpatch
+# Fix crash with ctrl-W in full screen mode
+Patch202: fix-437725.dpatch
+# Proper stream encoding on 64bit platforms
+Patch203: fix-444648.dpatch
+# Fix segfault in image handling
+Patch204: fix-462544.dpatch
+# Fix crash with "g" in full screen mode
+Patch205: fix-479467.dpatch
+
Requires: urw-fonts
Requires: xdg-utils
Requires: poppler-utils
@@ -80,7 +92,7 @@
%prep
%setup -q -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 12 -a 13 -a 14 -a 15 -a 16
-%patch -p1
+%patch0 -p1
%patch3 -p1 -b .ext
%patch6 -p1 -b .core
%patch7 -p1 -b .fonts
@@ -101,6 +113,14 @@
%patch100 -p1 -b .security
%patch101 -p1 -b .security2
+# debian patches
+%patch200 -p1 -b .permissions
+%patch201 -p1 -b .accelerators
+%patch202 -p1 -b .fullscreen-crashfix
+%patch203 -p1 -b .64bit-stream
+%patch204 -p1 -b .segfaultfix
+%patch205 -p1 -b .fullscreen-crashfix2
+
%build
find -name "*orig" | xargs rm -f
@@ -246,6 +266,12 @@
%{_datadir}/xpdf/latin2
%changelog
+* Wed Dec 10 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 1:3.02-9
+- apply debian patches
+
+* Sun Sep 21 2008 Ville Skyttä <ville.skytta at iki.fi> - 1:3.02-8
+- Fix Patch0:/%%patch mismatch.
+
* Thu Jun 19 2008 Tom "spot" Callaway <tcallawa at redhat.com> 1:3.02-7
- add missing Requires: xorg-x11-fonts-ISO8859-1-75dpi
- Previous message (by thread): rpms/perl-Test-Output/devel .cvsignore, 1.2, 1.3 perl-Test-Output.spec, 1.4, 1.5 sources, 1.2, 1.3
- Next message (by thread): rpms/xpdf/F-10 02_permissions.dpatch, NONE, 1.1 10_add_accelerators.dpatch, NONE, 1.1 fix-437725.dpatch, NONE, 1.1 fix-444648.dpatch, NONE, 1.1 fix-462544.dpatch, NONE, 1.1 fix-479467.dpatch, NONE, 1.1 xpdf-3.02-crash.patch, NONE, 1.1 xpdf.spec, 1.11, 1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list