[xpdf/f15] 3.03
Tom Callaway
spot at fedoraproject.org
Mon Aug 22 18:45:00 UTC 2011
commit 0bb2c8cb3ac94d1f7456261c02b1cec5367b7171
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date: Mon Aug 22 14:44:49 2011 -0400
3.03
02_permissions.dpatch | 172 +++++++++++++++++++++----------------------
sources | 2 +-
xpdf-3.01-redhat-new.patch | 46 ++++++------
xpdf-3.03-64bit.patch | 57 ++++++++++++++
xpdf-3.03-compile-fix.patch | 12 +++
xpdf-3.03-crash.patch | 48 ++++++++++++
xpdf-3.03-ext.patch | 51 +++++++++++++
xpdf.spec | 57 ++++----------
8 files changed, 293 insertions(+), 152 deletions(-)
---
diff --git a/02_permissions.dpatch b/02_permissions.dpatch
index 3ef4244..36d46a4 100644
--- a/02_permissions.dpatch
+++ b/02_permissions.dpatch
@@ -1,13 +1,6 @@
-#! /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
-
- at 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
+diff -up xpdf-3.03/xpdf/PDFCore.cc.permissions xpdf-3.03/xpdf/PDFCore.cc
+--- xpdf-3.03/xpdf/PDFCore.cc.permissions 2011-08-15 17:08:53.000000000 -0400
++++ xpdf-3.03/xpdf/PDFCore.cc 2011-08-22 13:54:13.553262082 -0400
@@ -4,6 +4,8 @@
//
// Copyright 2004 Glyph & Cog, LLC
@@ -17,7 +10,7 @@ diff -urNad xpdf-3.02~/xpdf/PDFCore.cc xpdf-3.02/xpdf/PDFCore.cc
//========================================================================
#include <aconf.h>
-@@ -1563,9 +1565,11 @@
+@@ -1619,9 +1621,11 @@ GString *PDFCore::extractText(int pg, do
int x0, y0, x1, y1, t;
GString *s;
@@ -29,148 +22,151 @@ diff -urNad xpdf-3.02~/xpdf/PDFCore.cc xpdf-3.02/xpdf/PDFCore.cc
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
+diff -up xpdf-3.03/xpdf/pdfimages.cc.permissions xpdf-3.03/xpdf/pdfimages.cc
+--- xpdf-3.03/xpdf/pdfimages.cc.permissions 2011-08-15 17:08:53.000000000 -0400
++++ xpdf-3.03/xpdf/pdfimages.cc 2011-08-22 13:58:49.976195545 -0400
@@ -4,6 +4,8 @@
//
- // Copyright 2002-2003 Glyph & Cog, LLC
+ // Copyright 1998-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;
+@@ -119,12 +121,14 @@ int main(int argc, char *argv[]) {
+ }
+ // check for copy permission
+#ifdef ENFORCE_PERMISSIONS
if (!doc->okToCopy()) {
- return;
+ error(errNotAllowed, -1,
+ "Copying of images from this document is not allowed.");
+ exitCode = 3;
+ goto err1;
}
+#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
+
+ // get page range
+ if (firstPage < 1)
+diff -up xpdf-3.03/xpdf/pdftops.cc.permissions xpdf-3.03/xpdf/pdftops.cc
+--- xpdf-3.03/xpdf/pdftops.cc.permissions 2011-08-15 17:08:53.000000000 -0400
++++ xpdf-3.03/xpdf/pdftops.cc 2011-08-22 13:59:33.638714938 -0400
@@ -4,6 +4,8 @@
//
- // Copyright 2002-2003 Glyph & Cog, LLC
+ // Copyright 1996-2003 Glyph & Cog, LLC
//
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
+//
//========================================================================
#include <aconf.h>
-@@ -3406,10 +3408,12 @@
- PSOutputDev *psOut;
+@@ -278,12 +280,14 @@ int main(int argc, char *argv[]) {
+ goto err1;
+ }
- doc = viewer->core->getDoc();
+#ifdef ENFORCE_PERMISSIONS
+ // check for print permission
if (!doc->okToPrint()) {
- error(-1, "Printing this document is not allowed.");
- return;
+ error(errNotAllowed, -1, "Printing this document is not allowed.");
+ exitCode = 3;
+ goto err1;
}
+#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
+ // construct PostScript file name
+ if (argc == 3) {
+diff -up xpdf-3.03/xpdf/pdftotext.cc.permissions xpdf-3.03/xpdf/pdftotext.cc
+--- xpdf-3.03/xpdf/pdftotext.cc.permissions 2011-08-15 17:08:53.000000000 -0400
++++ xpdf-3.03/xpdf/pdftotext.cc 2011-08-22 14:00:05.227367840 -0400
@@ -4,6 +4,8 @@
//
- // Copyright 1998-2003 Glyph & Cog, LLC
+ // Copyright 1997-2003 Glyph & Cog, LLC
//
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
+//
//========================================================================
#include <aconf.h>
-@@ -119,11 +121,13 @@
+@@ -168,6 +170,7 @@ int main(int argc, char *argv[]) {
+ goto err2;
}
- // check for copy permission
+#ifdef ENFORCE_PERMISSIONS
+ // check for copy permission
if (!doc->okToCopy()) {
- error(-1, "Copying of images from this document is not allowed.");
+ error(errNotAllowed, -1,
+@@ -175,6 +178,7 @@ int main(int argc, char *argv[]) {
exitCode = 3;
- goto err1;
+ goto err2;
}
+#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
+ // construct text file name
+ if (argc == 3) {
+diff -up xpdf-3.03/xpdf/XPDFCore.cc.permissions xpdf-3.03/xpdf/XPDFCore.cc
+--- xpdf-3.03/xpdf/XPDFCore.cc.permissions 2011-08-22 13:54:13.488262809 -0400
++++ xpdf-3.03/xpdf/XPDFCore.cc 2011-08-22 13:57:21.556171863 -0400
@@ -4,6 +4,8 @@
//
- // Copyright 1996-2003 Glyph & Cog, LLC
+ // Copyright 2002-2003 Glyph & Cog, LLC
//
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
+//
//========================================================================
#include <aconf.h>
-@@ -278,12 +280,14 @@
- goto err1;
- }
+@@ -384,12 +386,16 @@ void XPDFCore::endSelection(int wx, int
+ #ifndef NO_TEXT_SELECT
+ if (selectULX != selectLRX &&
+ selectULY != selectLRY) {
++#ifdef ENFORCE_PERMISSIONS
+ if (doc->okToCopy()) {
+ copySelection();
+ } else {
+ error(errNotAllowed, -1,
+ "Copying of text from this document is not allowed.");
+ }
++#else
++ copySelection();
++#endif
+ }
+ #endif
+ }
+@@ -408,9 +414,11 @@ void XPDFCore::copySelection() {
+ int pg;
+ double ulx, uly, lrx, lry;
+#ifdef ENFORCE_PERMISSIONS
- // check for print permission
- if (!doc->okToPrint()) {
- error(-1, "Printing this document is not allowed.");
- exitCode = 3;
- goto err1;
+ if (!doc->okToCopy()) {
+ return;
}
+#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
+ if (getSelection(&pg, &ulx, &uly, &lrx, &lry)) {
+ //~ for multithreading: need a mutex here
+ if (currentSelection) {
+diff -up xpdf-3.03/xpdf/XPDFViewer.cc.permissions xpdf-3.03/xpdf/XPDFViewer.cc
+--- xpdf-3.03/xpdf/XPDFViewer.cc.permissions 2011-08-22 13:54:13.540262229 -0400
++++ xpdf-3.03/xpdf/XPDFViewer.cc 2011-08-22 13:58:15.021581012 -0400
@@ -4,6 +4,8 @@
//
- // Copyright 1997-2003 Glyph & Cog, LLC
+ // Copyright 2002-2003 Glyph & Cog, LLC
//
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
+//
//========================================================================
#include <aconf.h>
-@@ -160,12 +162,14 @@
- goto err2;
- }
+@@ -3494,10 +3496,12 @@ void XPDFViewer::printPrintCbk(Widget wi
+ PSOutputDev *psOut;
+ doc = viewer->core->getDoc();
+#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;
+ if (!doc->okToPrint()) {
+ error(errNotAllowed, -1, "Printing this document is not allowed.");
+ return;
}
+#endif
- // construct text file name
- if (argc == 3) {
+ viewer->core->setBusyCursor(gTrue);
+
diff --git a/sources b/sources
index 03ac3f5..106603d 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-b1ce3f8ee8bebce3856d70990cb42db1 xpdf-3.02-novms.tar.gz
+03e68fb1ee46edb3613d63e36e16e91d xpdf-3.03-novms.tar.gz
ba4b037ab691f8b029ec2b9820a2fb8c xpdf-chinese-simplified-2004-jul-27-NOCMAP.tar.gz
697e7edc09a285115b597ab03f2eddf9 xpdf-chinese-traditional-2004-jul-27-NOCMAP.tar.gz
7b22f31289ce0812d2ec77014e7b0cdf xpdf-cyrillic-2003-jun-28.tar.gz
diff --git a/xpdf-3.01-redhat-new.patch b/xpdf-3.01-redhat-new.patch
index e8261f0..2a1e0ca 100644
--- a/xpdf-3.01-redhat-new.patch
+++ b/xpdf-3.01-redhat-new.patch
@@ -85,29 +85,6 @@
This is the default location for the system-wide configuration file.
Depending on build options, it may be placed elsewhere.
.TP
---- xpdf-3.01/doc/sample-xpdfrc.orig 2005-08-17 00:34:30.000000000 -0500
-+++ xpdf-3.01/doc/sample-xpdfrc 2006-09-25 12:54:53.000000000 -0500
-@@ -56,7 +56,7 @@
-
- # Set the default PostScript file or command.
-
--#psFile "|lpr -Pmyprinter"
-+psFile "|lpr"
-
- # Set the default PostScript paper size -- this can be letter, legal,
- # A4, or A3. You can also specify a paper size as width and height
-@@ -88,4 +88,11 @@
- # Set the command used to run a web browser when a URL hyperlink is
- # clicked.
-
-+urlCommand "xdg-open '%s'"
- #urlCommand "netscape -remote 'openURL(%s)'"
-+
-+# CJK
-+include /etc/xpdf/add-to-xpdfrc.japanese
-+include /etc/xpdf/add-to-xpdfrc.korean
-+include /etc/xpdf/add-to-xpdfrc.chinese-simplified
-+include /etc/xpdf/add-to-xpdfrc.chinese-traditional
--- xpdf-3.01/doc/xpdf.1.orig 2005-08-17 00:34:30.000000000 -0500
+++ xpdf-3.01/doc/xpdf.1 2006-09-25 12:54:53.000000000 -0500
@@ -41,7 +41,7 @@ xpdf
@@ -256,3 +233,26 @@
+nameToUnicode /usr/share/xpdf/cyrillic/Bulgarian.nameToUnicode
+unicodeMap KOI8-R /usr/share/xpdf/cyrillic/KOI8-R.unicodeMap
#----- end Cyrillic support package
+--- xpdf-3.03/doc/sample-xpdfrc.orig 2011-08-15 17:08:53.000000000 -0400
++++ xpdf-3.03/doc/sample-xpdfrc 2011-08-22 13:41:14.405172432 -0400
+@@ -56,7 +56,7 @@
+
+ # Set the default PostScript file or command.
+
+-#psFile "|lpr -Pmyprinter"
++psFile "|lpr"
+
+ # Set the default PostScript paper size -- this can be letter, legal,
+ # A4, or A3. You can also specify a paper size as width and height
+@@ -89,4 +89,10 @@
+ # clicked.
+
+ #launchCommand viewer-script
+-#urlCommand "netscape -remote 'openURL(%s)'"
++urlCommand "xdg-open '%s'"
++
++# CJK
++include /etc/xpdf/add-to-xpdfrc.japanese
++include /etc/xpdf/add-to-xpdfrc.korean
++include /etc/xpdf/add-to-xpdfrc.chinese-simplified
++include /etc/xpdf/add-to-xpdfrc.chinese-traditional
diff --git a/xpdf-3.03-64bit.patch b/xpdf-3.03-64bit.patch
new file mode 100644
index 0000000..942ffe0
--- /dev/null
+++ b/xpdf-3.03-64bit.patch
@@ -0,0 +1,57 @@
+diff -up xpdf-3.03/goo/gmem.cc.alloc xpdf-3.03/goo/gmem.cc
+--- xpdf-3.03/goo/gmem.cc.alloc 2011-08-15 17:08:53.000000000 -0400
++++ xpdf-3.03/goo/gmem.cc 2011-08-22 13:48:31.891115878 -0400
+@@ -47,9 +47,9 @@ static int gMemInUse = 0;
+
+ #endif /* DEBUG_MEM */
+
+-void *gmalloc(int size) GMEM_EXCEP {
++void *gmalloc(size_t size) GMEM_EXCEP {
+ #ifdef DEBUG_MEM
+- int size1;
++ size_t size1;
+ char *mem;
+ GMemHdr *hdr;
+ void *data;
+@@ -122,11 +122,11 @@ void *gmalloc(int size) GMEM_EXCEP {
+ #endif
+ }
+
+-void *grealloc(void *p, int size) GMEM_EXCEP {
++void *grealloc(void *p, size_t size) GMEM_EXCEP {
+ #ifdef DEBUG_MEM
+ GMemHdr *hdr;
+ void *q;
+- int oldSize;
++ size_t oldSize;
+
+ if (size < 0) {
+ #if USE_EXCEPTIONS
+@@ -227,7 +227,7 @@ void *greallocn(void *p, int nObjs, int
+
+ void gfree(void *p) {
+ #ifdef DEBUG_MEM
+- int size;
++ size_t size;
+ GMemHdr *hdr;
+ unsigned long *trl, *clr;
+
+diff -up xpdf-3.03/goo/gmem.h.alloc xpdf-3.03/goo/gmem.h
+--- xpdf-3.03/goo/gmem.h.alloc 2011-08-15 17:08:53.000000000 -0400
++++ xpdf-3.03/goo/gmem.h 2011-08-22 13:47:27.274853540 -0400
+@@ -36,13 +36,13 @@ extern "C" {
+ * Same as malloc, but prints error message and exits if malloc()
+ * returns NULL.
+ */
+-extern void *gmalloc(int size) GMEM_EXCEP;
++extern void *gmalloc(size_t size) GMEM_EXCEP;
+
+ /*
+ * Same as realloc, but prints error message and exits if realloc()
+ * returns NULL. If <p> is NULL, calls malloc instead of realloc().
+ */
+-extern void *grealloc(void *p, int size) GMEM_EXCEP;
++extern void *grealloc(void *p, size_t size) GMEM_EXCEP;
+
+ /*
+ * These are similar to gmalloc and grealloc, but take an object count
diff --git a/xpdf-3.03-compile-fix.patch b/xpdf-3.03-compile-fix.patch
new file mode 100644
index 0000000..b28c369
--- /dev/null
+++ b/xpdf-3.03-compile-fix.patch
@@ -0,0 +1,12 @@
+diff -up xpdf-3.03/xpdf/XPDFViewer.cc.BAD xpdf-3.03/xpdf/XPDFViewer.cc
+--- xpdf-3.03/xpdf/XPDFViewer.cc.BAD 2011-08-22 14:19:42.845075813 -0400
++++ xpdf-3.03/xpdf/XPDFViewer.cc 2011-08-22 14:19:47.953013145 -0400
+@@ -1807,7 +1807,7 @@ void XPDFViewer::initToolbar(Widget pare
+ menuPane = XmCreatePulldownMenu(toolBar, "zoomMenuPane", args, n);
+ for (i = 0; i < nZoomMenuItems; ++i) {
+ n = 0;
+- s = XmStringCreateLocalized(zoomMenuInfo[i].label);
++ s = XmStringCreateLocalized((char *)zoomMenuInfo[i].label);
+ XtSetArg(args[n], XmNlabelString, s); ++n;
+ XtSetArg(args[n], XmNuserData, (XtPointer)i); ++n;
+ sprintf(buf, "zoom%d", i);
diff --git a/xpdf-3.03-crash.patch b/xpdf-3.03-crash.patch
new file mode 100644
index 0000000..5c16bfe
--- /dev/null
+++ b/xpdf-3.03-crash.patch
@@ -0,0 +1,48 @@
+diff -up xpdf-3.03/fofi/FoFiType1.cc.crash xpdf-3.03/fofi/FoFiType1.cc
+--- xpdf-3.03/fofi/FoFiType1.cc.crash 2011-08-15 17:08:53.000000000 -0400
++++ xpdf-3.03/fofi/FoFiType1.cc 2011-08-22 13:44:32.936859153 -0400
+@@ -268,9 +268,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.03/splash/Splash.cc.crash xpdf-3.03/splash/Splash.cc
+--- xpdf-3.03/splash/Splash.cc.crash 2011-08-15 17:08:53.000000000 -0400
++++ xpdf-3.03/splash/Splash.cc 2011-08-22 13:46:54.295231194 -0400
+@@ -2053,6 +2053,11 @@ SplashError Splash::fillWithPattern(Spla
+ xPath->aaScale();
+ }
+ xPath->sort();
++ if (!&xPath->segs[0])
++ {
++ delete xPath;
++ return splashErrEmptyPath;
++ }
+ yMinI = state->clip->getYMinI();
+ yMaxI = state->clip->getYMaxI();
+ if (vectorAntialias && !inShading) {
+@@ -2194,6 +2199,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, state->clip->getYMinI(),
+ state->clip->getYMaxI());
+
diff --git a/xpdf-3.03-ext.patch b/xpdf-3.03-ext.patch
new file mode 100644
index 0000000..3115d65
--- /dev/null
+++ b/xpdf-3.03-ext.patch
@@ -0,0 +1,51 @@
+diff -up xpdf-3.03/goo/gfile.cc.ext xpdf-3.03/goo/gfile.cc
+--- xpdf-3.03/goo/gfile.cc.ext 2011-08-15 17:08:53.000000000 -0400
++++ xpdf-3.03/goo/gfile.cc 2011-08-22 13:43:54.540304026 -0400
+@@ -507,32 +507,14 @@ GBool openTempFile(GString **name, FILE
+ char *s;
+ int fd;
+
+- if (ext) {
+-#if HAVE_MKSTEMPS
+- if ((s = getenv("TMPDIR"))) {
+- *name = new GString(s);
+- } else {
+- *name = new GString("/tmp");
+- }
+- (*name)->append("/XXXXXX")->append(ext);
+- fd = mkstemps((*name)->getCString(), strlen(ext));
+-#else
+- if (!(s = tmpnam(NULL))) {
+- return gFalse;
+- }
++#if HAVE_MKSTEMP
++ if ((s = getenv("TMPDIR"))) {
+ *name = new GString(s);
+- (*name)->append(ext);
+- fd = open((*name)->getCString(), O_WRONLY | O_CREAT | O_EXCL, 0600);
+-#endif
+ } else {
+-#if HAVE_MKSTEMP
+- if ((s = getenv("TMPDIR"))) {
+- *name = new GString(s);
+- } else {
+- *name = new GString("/tmp");
+- }
+- (*name)->append("/XXXXXX");
+- fd = mkstemp((*name)->getCString());
++ *name = new GString("/tmp");
++ }
++ (*name)->append("/XXXXXX");
++ fd = mkstemp((*name)->getCString());
+ #else // HAVE_MKSTEMP
+ if (!(s = tmpnam(NULL))) {
+ return gFalse;
+@@ -540,7 +522,7 @@ GBool openTempFile(GString **name, FILE
+ *name = new GString(s);
+ fd = open((*name)->getCString(), O_WRONLY | O_CREAT | O_EXCL, 0600);
+ #endif // HAVE_MKSTEMP
+- }
++
+ if (fd < 0 || !(*f = fdopen(fd, mode))) {
+ delete *name;
+ *name = NULL;
diff --git a/xpdf.spec b/xpdf.spec
index e1449d7..65734c6 100644
--- a/xpdf.spec
+++ b/xpdf.spec
@@ -1,8 +1,8 @@
Summary: A PDF file viewer for the X Window System
Name: xpdf
-Version: 3.02
-Release: 18%{?dist}
-License: GPLv2
+Version: 3.03
+Release: 1%{?dist}
+License: GPLv2 or GPLv3
Epoch: 1
Url: http://www.foolabs.com/xpdf/
Group: Applications/Publishing
@@ -32,40 +32,27 @@ Source15: ftp://ftp.foolabs.com/pub/xpdf/xpdf-latin2-2002-oct-22.tar.gz
Source16: ftp://ftp.foolabs.com/pub/xpdf/xpdf-turkish-2002-apr-10.tar.gz
Patch0: xpdf-3.01-redhat-new.patch
-Patch3: xpdf-2.02-ext.patch
+Patch3: xpdf-3.03-ext.patch
Patch6: xpdf-3.00-core.patch
Patch7: xpdf-3.00-xfont.patch
Patch9: xpdf-3.00-papersize.patch
Patch10: xpdf-3.00-gcc4.patch
-Patch11: xpdf-3.02-crash.patch
-Patch12: xpdf-3.00-64bit.patch
+Patch11: xpdf-3.03-crash.patch
+Patch12: xpdf-3.03-64bit.patch
# Patch13: xpdf-3.01-resize.patch
# Patch14: xpdf-3.01-freetype-internals.patch
Patch15: xpdf-3.01-nocmap.patch
Patch16: xpdf-3.02-fontlist.patch
-Patch17: xpdf-3.02-x86_64-fix.patch
-Patch18: xpdf-3.02-mousebuttons.patch
Patch19: xpdf-3.02-additionalzoom.patch
-Patch20: xpdf-3.02-mousebuttons_view.patch
+Patch20: xpdf-3.03-compile-fix.patch
# Security patches
-Patch100: xpdf-3.02pl1.patch
-Patch101: ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl2.patch
-Patch102: ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl3.patch
-Patch103: ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl4.patch
-Patch104: ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl5.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
@@ -76,7 +63,6 @@ Requires: xorg-x11-fonts-ISO8859-1-100dpi
BuildRequires: lesstif-devel
BuildRequires: freetype-devel >= 2.1.7
BuildRequires: desktop-file-utils
-BuildRequires: t1lib-devel
BuildRequires: libpaper-devel
Provides: %{name}-chinese-simplified = %{version}-%{release}
@@ -110,25 +96,16 @@ standard X fonts.
#%%patch14 -p1 -b .freetype-internals
%patch15 -p1
%patch16 -p1 -b .fontlist
-%patch17 -p1
-%patch18 -p1
%patch19 -p1
-%patch20 -p1
+# invalid conversion from 'const char*' to 'char*'
+%patch20 -p1 -b .charfix
# security patches
-%patch100 -p1 -b .security
-%patch101 -p1 -b .security2
-%patch102 -p1 -b .security3
-%patch103 -p1 -b .security4
-%patch104 -p1 -b .security5
# 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
@@ -151,7 +128,6 @@ done
--enable-opi \
--with-appdef-dir=%{_datadir}/X11/app-defaults/ \
--without-Xp-library \
- --with-t1-library \
--with-freetype2-library=%{_libdir} \
--with-freetype2-includes=%{_includedir}/freetype2
@@ -159,8 +135,6 @@ make %{?_smp_mflags}
make xpdf %{?_smp_mflags}
%install
-rm -rf $RPM_BUILD_ROOT
-
mkdir -p $RPM_BUILD_ROOT%{_datadir}/xpdf/arabic \
$RPM_BUILD_ROOT%{_datadir}/xpdf/chinese-simplified \
$RPM_BUILD_ROOT%{_datadir}/xpdf/chinese-traditional \
@@ -228,9 +202,6 @@ for i in arabic cyrillic greek hebrew latin2 thai turkish; do
echo "include %{_sysconfdir}/xpdf/add-to-xpdfrc.$i" >> $RPM_BUILD_ROOT%{_sysconfdir}/xpdfrc
done
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%post
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
@@ -242,14 +213,17 @@ touch --no-create %{_datadir}/icons/hicolor || :
update-desktop-database &> /dev/null ||:
%files
-%defattr(-,root,root)
%doc CHANGES README README.*
%{_bindir}/xpdf
%{_mandir}/man?/xpdf*
-%if 0%{?rhel} < 6 || 0%{?fedora} < 7
+%if 0%{?rhel} > 5 || 0%{?fedora} > 6
+# Do Nothing.
+%else
%{_bindir}/pdftoppm
%{_mandir}/man?/pdftoppm*
%endif
+%{_bindir}/pdfdetach
+%{_mandir}/man?/pdfdetach*
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xpdfrc
%dir %{_sysconfdir}/xpdf
%lang(ar) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xpdf/add-to-xpdfrc.arabic
@@ -280,6 +254,9 @@ update-desktop-database &> /dev/null ||:
%{_datadir}/xpdf/latin2
%changelog
+* Mon Aug 22 2011 Tom Callaway <spot at fedoraproject.org> - 1:3.03-1
+- update to 3.03
+
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:3.02-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
More information about the scm-commits
mailing list