[texlive] fix pdftosrc so that texlive builds with the new poppler
Jindrich Novy
jnovy at fedoraproject.org
Fri Aug 20 12:16:31 UTC 2010
commit fef1f5f1ed94daa0aedba31ffec67d97b09e9114
Author: Jindrich Novy <jnovy at redhat.com>
Date: Fri Aug 20 14:16:10 2010 +0200
fix pdftosrc so that texlive builds with the new poppler
texlive-poppler.patch | 117 ++++++++++++++++++++++++++++--------------------
texlive.spec | 5 ++-
2 files changed, 72 insertions(+), 50 deletions(-)
---
diff --git a/texlive-poppler.patch b/texlive-poppler.patch
index 21183b5..a97add2 100644
--- a/texlive-poppler.patch
+++ b/texlive-poppler.patch
@@ -1,6 +1,6 @@
diff -up texlive-2007/configure.in.poppler texlive-2007/configure.in
--- texlive-2007/configure.in.poppler 2007-01-09 02:17:11.000000000 +0100
-+++ texlive-2007/configure.in 2009-10-15 14:57:43.000000000 +0200
++++ texlive-2007/configure.in 2010-08-20 13:37:22.466142036 +0200
@@ -157,9 +157,9 @@ export needs_zlib
# we need libxpdf for pdf[ex]tex, xetex
@@ -25,7 +25,7 @@ diff -up texlive-2007/configure.in.poppler texlive-2007/configure.in
sinclude(libs/freetype/freetype.ac)
diff -up texlive-2007/configure.poppler texlive-2007/configure
--- texlive-2007/configure.poppler 2007-01-09 15:16:26.000000000 +0100
-+++ texlive-2007/configure 2009-10-15 14:57:43.000000000 +0200
++++ texlive-2007/configure 2010-08-20 13:37:22.468141670 +0200
@@ -3442,9 +3442,9 @@ export needs_zlib
# we need libxpdf for pdf[ex]tex, xetex
@@ -41,7 +41,7 @@ diff -up texlive-2007/configure.poppler texlive-2007/configure
diff -up texlive-2007/texk/web2c/pdftexdir/pdftexextra.in.poppler texlive-2007/texk/web2c/pdftexdir/pdftexextra.in
--- texlive-2007/texk/web2c/pdftexdir/pdftexextra.in.poppler 2006-12-27 00:37:34.000000000 +0100
-+++ texlive-2007/texk/web2c/pdftexdir/pdftexextra.in 2009-10-15 14:57:43.000000000 +0200
++++ texlive-2007/texk/web2c/pdftexdir/pdftexextra.in 2010-08-20 13:37:22.469149555 +0200
@@ -26,7 +26,7 @@ $Id: pdftexextra.in,v 1.4 2004/08/26 18:
(generated from ../lib/texmfmp.c).
*/
@@ -53,7 +53,7 @@ diff -up texlive-2007/texk/web2c/pdftexdir/pdftexextra.in.poppler texlive-2007/t
#define PROGRAM_HELP PDFTEXHELP
diff -up texlive-2007/texk/web2c/pdftexdir/pdftex.mk.poppler texlive-2007/texk/web2c/pdftexdir/pdftex.mk
--- texlive-2007/texk/web2c/pdftexdir/pdftex.mk.poppler 2006-12-27 00:37:34.000000000 +0100
-+++ texlive-2007/texk/web2c/pdftexdir/pdftex.mk 2009-10-15 14:57:43.000000000 +0200
++++ texlive-2007/texk/web2c/pdftexdir/pdftex.mk 2010-08-20 13:37:22.470141585 +0200
@@ -2,6 +2,9 @@
# This fragment contains the parts of the makefile that are most likely to
# differ between releases of pdfeTeX.
@@ -84,7 +84,7 @@ diff -up texlive-2007/texk/web2c/pdftexdir/pdftex.mk.poppler texlive-2007/texk/w
check: pdftosrc-check
diff -up texlive-2007/texk/web2c/pdftexdir/pdftoepdf.cc.poppler texlive-2007/texk/web2c/pdftexdir/pdftoepdf.cc
--- texlive-2007/texk/web2c/pdftexdir/pdftoepdf.cc.poppler 2006-12-27 00:37:34.000000000 +0100
-+++ texlive-2007/texk/web2c/pdftexdir/pdftoepdf.cc 2009-10-15 14:57:52.000000000 +0200
++++ texlive-2007/texk/web2c/pdftexdir/pdftoepdf.cc 2010-08-20 13:37:22.471141577 +0200
@@ -26,25 +26,24 @@ $Id: pdftoepdf.cc,v 1.9 2006/09/01 18:06
#include <stdio.h>
#include <string.h>
@@ -175,13 +175,35 @@ diff -up texlive-2007/texk/web2c/pdftexdir/pdftoepdf.cc.poppler texlive-2007/tex
pdftex_fail("PDF inclusion: invalid destination <%s>", page_name);
diff -up texlive-2007/texk/web2c/pdftexdir/pdftosrc.cc.poppler texlive-2007/texk/web2c/pdftexdir/pdftosrc.cc
--- texlive-2007/texk/web2c/pdftexdir/pdftosrc.cc.poppler 2006-12-27 00:37:34.000000000 +0100
-+++ texlive-2007/texk/web2c/pdftexdir/pdftosrc.cc 2009-10-15 14:57:43.000000000 +0200
-@@ -25,22 +25,23 @@ $Id: //depot/Build/source.development/Te
++++ texlive-2007/texk/web2c/pdftexdir/pdftosrc.cc 2010-08-20 13:36:25.000000000 +0200
+@@ -1,5 +1,5 @@
+ /*
+-Copyright (c) 1996-2006 Han The Thanh, <thanh at pdftex.org>
++Copyright (c) 1996-2007 Han The Thanh, <thanh at pdftex.org>
+
+ This file is part of pdfTeX.
+
+@@ -13,11 +13,9 @@ but WITHOUT ANY WARRANTY; without even t
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+-You should have received a copy of the GNU General Public License
+-along with pdfTeX; if not, write to the Free Software
+-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+-
+-$Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/pdftosrc.cc#10 $
++You should have received a copy of the GNU General Public License along
++with pdfTeX; if not, write to the Free Software Foundation, Inc., 51
++Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+ #include <stdlib.h>
+@@ -25,22 +23,26 @@ $Id: //depot/Build/source.development/Te
#include <stdio.h>
#include <string.h>
#include <ctype.h>
-#include <aconf.h>
- #include <assert.h>
+-#include <assert.h>
-#include <GString.h>
-#include <gmem.h>
-#include <gfile.h>
@@ -197,52 +219,49 @@ diff -up texlive-2007/texk/web2c/pdftexdir/pdftosrc.cc.poppler texlive-2007/texk
-#include "GlobalParams.h"
-#include "Error.h"
+
++#include <poppler/cpp/poppler-version.h>
++#define GString GooString
++#define xpdfVersion POPPLER_VERSION
+#include <dirent.h>
+#include <poppler/goo/GooString.h>
+#include <poppler/goo/gmem.h>
+#include <poppler/goo/gfile.h>
-+#include <poppler/Object.h>
-+#include <poppler/Stream.h>
-+#include <poppler/Array.h>
-+#include <poppler/Dict.h>
-+#include <poppler/XRef.h>
-+#include <poppler/Catalog.h>
-+#include <poppler/Page.h>
-+#include <poppler/GfxFont.h>
-+#include <poppler/PDFDoc.h>
-+#include <poppler/GlobalParams.h>
-+#include <poppler/Error.h>
++
++#include "poppler/Object.h"
++#include "poppler/Stream.h"
++#include "poppler/Array.h"
++#include "poppler/Dict.h"
++#include "poppler/XRef.h"
++#include "poppler/Catalog.h"
++#include "poppler/Page.h"
++#include "poppler/GfxFont.h"
++#include "poppler/PDFDoc.h"
++#include "poppler/GlobalParams.h"
++#include "poppler/Error.h"
static XRef *xref = 0;
-@@ -48,7 +49,7 @@ int main(int argc, char *argv[])
- {
- char *p, buf[1024];
- PDFDoc *doc;
-- GString *fileName;
-+ GooString *fileName;
- Stream *s;
- Object srcStream, srcName, catalogDict;
- FILE *outfile;
-@@ -56,13 +57,13 @@ int main(int argc, char *argv[])
- int objnum = 0, objgen = 0;
- bool extract_xref_table = false;
- int c;
-- fprintf(stderr, "pdftosrc version %s\n", xpdfVersion);
-+ fprintf(stderr, "pdftosrc\n");
- if (argc < 2) {
- fprintf(stderr,
- "Usage: pdftosrc <PDF-file> [<stream-object-number>]\n");
- exit(1);
- }
-- fileName = new GString(argv[1]);
-+ fileName = new GooString(argv[1]);
- globalParams = new GlobalParams();
- doc = new PDFDoc(fileName);
- if (!doc->isOk()) {
+@@ -140,6 +142,9 @@ int main(int argc, char *argv[])
+ (long unsigned) e->offset, e->gen,
+ (e->type == xrefEntryFree ? "f" : "n"));
+ else { // e->offset is the object number of the object stream
++#ifdef POPPLER_VERSION
++ fprintf(stderr, "warning: this version of pdftosrc doesn't support object stream (use pdftosrc from TeX Live if you need it)\n");
++#else
+ // e->gen is the local index inside that object stream
+ //int objStrOffset = xref->getEntry(e->offset)->offset;
+ Object tmpObj;
+@@ -156,6 +161,7 @@ int main(int argc, char *argv[])
+ localOffsets[e->gen]));
+ // (long unsigned) (objStrOffset + objStr->getStart() + localOffsets[e->gen]));
+ tmpObj.free();
++#endif
+ }
+ }
+ } else {
diff -up texlive-2007/texk/web2c/pdftexdir/utils.c.poppler texlive-2007/texk/web2c/pdftexdir/utils.c
--- texlive-2007/texk/web2c/pdftexdir/utils.c.poppler 2007-01-01 18:20:03.000000000 +0100
-+++ texlive-2007/texk/web2c/pdftexdir/utils.c 2009-10-15 14:57:43.000000000 +0200
++++ texlive-2007/texk/web2c/pdftexdir/utils.c 2010-08-20 13:37:22.472141499 +0200
@@ -37,7 +37,7 @@ $Id: //depot/Build/source.development/Te
#include "zlib.h"
#include "ptexlib.h"
@@ -266,7 +285,7 @@ diff -up texlive-2007/texk/web2c/pdftexdir/utils.c.poppler texlive-2007/texk/web
diff -up texlive-2007/texk/web2c/xetexdir/pdfimage.cpp.poppler texlive-2007/texk/web2c/xetexdir/pdfimage.cpp
--- texlive-2007/texk/web2c/xetexdir/pdfimage.cpp.poppler 2006-12-09 11:29:12.000000000 +0100
-+++ texlive-2007/texk/web2c/xetexdir/pdfimage.cpp 2009-10-15 14:57:43.000000000 +0200
++++ texlive-2007/texk/web2c/xetexdir/pdfimage.cpp 2010-08-20 13:37:22.474140994 +0200
@@ -11,10 +11,24 @@
#include "pdfimage.h"
@@ -307,7 +326,7 @@ diff -up texlive-2007/texk/web2c/xetexdir/pdfimage.cpp.poppler texlive-2007/texk
if (!doc) {
diff -up texlive-2007/texk/web2c/xetexdir/XeTeX_ext.c.poppler texlive-2007/texk/web2c/xetexdir/XeTeX_ext.c
--- texlive-2007/texk/web2c/xetexdir/XeTeX_ext.c.poppler 2007-01-15 14:04:36.000000000 +0100
-+++ texlive-2007/texk/web2c/xetexdir/XeTeX_ext.c 2009-10-15 14:57:43.000000000 +0200
++++ texlive-2007/texk/web2c/xetexdir/XeTeX_ext.c 2010-08-20 13:37:22.475141056 +0200
@@ -33,7 +33,7 @@ authorization from SIL International.
*/
@@ -345,8 +364,8 @@ diff -up texlive-2007/texk/web2c/xetexdir/XeTeX_ext.c.poppler texlive-2007/texk/
);
}
diff -up texlive-2007/texk/web2c/xetexdir/xetex.mk.poppler texlive-2007/texk/web2c/xetexdir/xetex.mk
---- texlive-2007/texk/web2c/xetexdir/xetex.mk.poppler 2009-10-15 14:57:41.000000000 +0200
-+++ texlive-2007/texk/web2c/xetexdir/xetex.mk 2009-10-15 14:57:43.000000000 +0200
+--- texlive-2007/texk/web2c/xetexdir/xetex.mk.poppler 2010-08-20 13:37:22.405141336 +0200
++++ texlive-2007/texk/web2c/xetexdir/xetex.mk 2010-08-20 13:37:22.476140978 +0200
@@ -4,6 +4,10 @@
Makefile: $(srcdir)/xetexdir/xetex.mk
diff --git a/texlive.spec b/texlive.spec
index 6ff775e..0de7e95 100644
--- a/texlive.spec
+++ b/texlive.spec
@@ -21,7 +21,7 @@
Name: texlive
Version: %{texlive_ver}
-Release: 55%{?dist}
+Release: 56%{?dist}
Summary: Binaries for the TeX formatting system
Group: Applications/Publishing
@@ -1262,6 +1262,9 @@ fi
%{_mandir}/man1/texutil.1*
%changelog
+* Fri Aug 20 2010 Jindrich Novy <jnovy at redhat.com> 2007-56
+- fix pdftosrc so that texlive builds with the new poppler
+
* Thu Aug 19 2010 Rex Dieter <rdieter at fedoraproject.org> - 2007-55
- rebuild (poppler)
More information about the scm-commits
mailing list