[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: SVN texlive (new) commit: r2406 - texlive-new/trunk/texlive-bin/debian/patches



Hi Frank!

Here is my quilt refresh-ed patch, I also changed the
	Compiled with 
in pdftex ...

What do we check in ...?

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <preining@logic.at>                    Università di Siena
Debian Developer <preining@debian.org>                         Debian TeX Group
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
BOOK	Meanwhile, the starship has landed on the surface
	of Magrathea and Trillian is about to make one of the most
	important statements of her life. Its importance is not
	immediately recognised by her companions.
TRILL.	Hey, my white mice have escaped.
ZAPHOD	Nuts to your white mice.
                 --- Douglas Adams, The Hitchhikers Guide to the Galaxy
#! /bin/sh /usr/share/dpatch/dpatch-run
## 30_libpoppler.dpatch
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: use libpoppler instead of libxpdf in pdfetex

@DPATCH@
 build/source/configure                         |    6 +-
 build/source/configure.in                      |    8 +--
 build/source/texk/web2c/pdftexdir/Makefile.in  |    2 
 build/source/texk/web2c/pdftexdir/depend.mk    |   58 +------------------------
 build/source/texk/web2c/pdftexdir/pdftex.mk    |    9 ++-
 build/source/texk/web2c/pdftexdir/pdftoepdf.cc |   43 +++++++++---------
 build/source/texk/web2c/pdftexdir/pdftosrc.cc  |   37 ++++++++-------
 build/source/texk/web2c/pdftexdir/utils.c      |    2 
 build/source/texk/web2c/xetexdir/XeTeX_ext.c   |    4 -
 build/source/texk/web2c/xetexdir/pdfimage.cpp  |   24 ++++++++--
 build/source/texk/web2c/xetexdir/xetex.mk      |    6 ++
 11 files changed, 85 insertions(+), 114 deletions(-)

Index: texlive-bin-2007/build/source/texk/web2c/pdftexdir/depend.mk
===================================================================
--- texlive-bin-2007.orig/build/source/texk/web2c/pdftexdir/depend.mk	2006-12-27 00:37:34.000000000 +0100
+++ texlive-bin-2007/build/source/texk/web2c/pdftexdir/depend.mk	2007-01-31 19:45:53.000000000 +0100
@@ -1,55 +1,5 @@
-epdf.o: epdf.c ptexlib.h ../pdftexd.h ../texmfmp.h ../cpascal.h \
- ../config.h ../help.h ../texmfmem.h ../pdftexcoerce.h ptexmac.h
-mapfile.o: mapfile.c ptexlib.h ../pdftexd.h ../texmfmp.h ../cpascal.h \
- ../config.h ../help.h ../texmfmem.h ../pdftexcoerce.h ptexmac.h
-papersiz.o: papersiz.c ptexlib.h ../pdftexd.h ../texmfmp.h \
- ../cpascal.h ../config.h ../help.h ../texmfmem.h ../pdftexcoerce.h \
- ptexmac.h
-utils.o: utils.c ptexlib.h ../pdftexd.h ../texmfmp.h ../cpascal.h \
- ../config.h ../help.h ../texmfmem.h ../pdftexcoerce.h ptexmac.h \
- ../../../libs/zlib/zlib.h ../../../libs/zlib/zconf.h \
- ../../../libs/md5/md5.h pdftexextra.h \
- ../../../libs/obsdcompat/openbsd-compat.h
-vfpacket.o: vfpacket.c ptexlib.h ../pdftexd.h ../texmfmp.h \
- ../cpascal.h ../config.h ../help.h ../texmfmem.h ../pdftexcoerce.h \
- ptexmac.h
-pkin.o: pkin.c ptexlib.h ../pdftexd.h ../texmfmp.h ../cpascal.h \
- ../config.h ../help.h ../texmfmem.h ../pdftexcoerce.h ptexmac.h
-writefont.o: writefont.c ../../../libs/xpdf/goo/gmem.h ptexlib.h \
- ../pdftexd.h ../texmfmp.h ../cpascal.h ../config.h ../help.h \
- ../texmfmem.h ../pdftexcoerce.h ptexmac.h
-writet1.o: writet1.c ptexlib.h ../pdftexd.h ../texmfmp.h ../cpascal.h \
- ../config.h ../help.h ../texmfmem.h ../pdftexcoerce.h ptexmac.h
-writet3.o: writet3.c ptexlib.h ../pdftexd.h ../texmfmp.h ../cpascal.h \
- ../config.h ../help.h ../texmfmem.h ../pdftexcoerce.h ptexmac.h
-writezip.o: writezip.c ptexlib.h ../pdftexd.h ../texmfmp.h \
- ../cpascal.h ../config.h ../help.h ../texmfmem.h ../pdftexcoerce.h \
- ptexmac.h ../../../libs/zlib/zlib.h ../../../libs/zlib/zconf.h
-writeenc.o: writeenc.c ptexlib.h ../pdftexd.h ../texmfmp.h \
- ../cpascal.h ../config.h ../help.h ../texmfmem.h ../pdftexcoerce.h \
- ptexmac.h
-writettf.o: writettf.c ptexlib.h writettf.h ../pdftexd.h ../texmfmp.h \
- ../cpascal.h ../config.h ../help.h ../texmfmem.h ../pdftexcoerce.h \
- ptexmac.h macnames.c
-writejpg.o: writejpg.c ptexlib.h ../pdftexd.h ../texmfmp.h \
- ../cpascal.h ../config.h ../help.h ../texmfmem.h ../pdftexcoerce.h \
- ptexmac.h image.h
-writepng.o: writepng.c ptexlib.h ../pdftexd.h ../texmfmp.h \
- ../cpascal.h ../config.h ../help.h ../texmfmem.h ../pdftexcoerce.h \
- ptexmac.h image.h
-writeimg.o: writeimg.c ptexlib.h ../pdftexd.h ../texmfmp.h \
- ../cpascal.h ../config.h ../help.h ../texmfmem.h ../pdftexcoerce.h \
- ptexmac.h image.h
-pdftoepdf.o: pdftoepdf.cc ../../../libs/xpdf/xpdf/Object.h \
- ../../../libs/xpdf/goo/gmem.h ../../../libs/xpdf/xpdf/Array.h \
- ../../../libs/xpdf/xpdf/Dict.h ../../../libs/xpdf/xpdf/Stream.h \
- ../../../libs/xpdf/xpdf/XRef.h ../../../libs/xpdf/xpdf/Catalog.h \
- ../../../libs/xpdf/xpdf/Page.h ../../../libs/xpdf/xpdf/GfxFont.h \
- ../../../libs/xpdf/xpdf/Error.h epdf.h
+pdftoepdf.o: pdftoepdf.cc epdf.h ../../kpathsea/c-auto.h \
+  ../../kpathsea/c-proto.h ../../web2c/c-auto.h ../../web2c/config.h \
+  ../../kpathsea/c-fopen.h ../../web2c/pdftexdir/ptexmac.h
 ttf2afm.o: ttf2afm.c writettf.h macnames.c
-pdftosrc.o: pdftosrc.cc ../../../libs/xpdf/xpdf/Object.h \
- ../../../libs/xpdf/xpdf/Array.h ../../../libs/xpdf/xpdf/Dict.h \
- ../../../libs/xpdf/xpdf/Stream.h ../../../libs/xpdf/xpdf/XRef.h \
- ../../../libs/xpdf/xpdf/Catalog.h ../../../libs/xpdf/xpdf/Page.h \
- ../../../libs/xpdf/xpdf/PDFDoc.h ../../../libs/xpdf/xpdf/Link.h \
- ../../../libs/xpdf/xpdf/Error.h ../../../libs/xpdf/xpdf/config.h
+pdftosrc.o: pdftosrc.cc
Index: texlive-bin-2007/build/source/texk/web2c/pdftexdir/pdftoepdf.cc
===================================================================
--- texlive-bin-2007.orig/build/source/texk/web2c/pdftexdir/pdftoepdf.cc	2006-12-27 00:37:34.000000000 +0100
+++ texlive-bin-2007/build/source/texk/web2c/pdftexdir/pdftoepdf.cc	2007-01-31 19:45:53.000000000 +0100
@@ -26,25 +26,24 @@
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
-#include <aconf.h>
-#include <GString.h>
-#include <gmem.h>
-#include <gfile.h>
-#include <config.h>
 #include <assert.h>
-#include "Object.h"
-#include "Stream.h"
-#include "Array.h"
-#include "Dict.h"
-#include "XRef.h"
-#include "Catalog.h"
-#include "Link.h"
-#include "Page.h"
-#include "GfxFont.h"
-#include "PDFDoc.h"
-#include "GlobalParams.h"
-#include "Error.h"
-
+#include <dirent.h>
+#include <poppler/poppler-config.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/Link.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 "epdf.h"
 
 // This file is mostly C and not very much C++; it's just used to interface
@@ -169,7 +168,7 @@
     fprintf(stderr, "\npdfTeX Debug: Creating %s (%d)\n", p->file_name,
             p->occurences);
 #endif
-    GString *docName = new GString(p->file_name);
+    GooString *docName = new GooString(p->file_name);
     p->doc = new PDFDoc(docName);       // takes ownership of docName
     if (!p->doc->isOk() || !p->doc->okToPrint()) {
         pdftex_fail("xpdf: reading PDF image failed");
@@ -511,7 +510,7 @@
     int i, l, c;
     Ref ref;
     char *p;
-    GString *s;
+    GooString *s;
     if (obj->isBool()) {
         pdf_printf("%s", obj->getBool()? "true" : "false");
     } else if (obj->isInt()) {
@@ -677,7 +676,7 @@
     float pdf_version_found, pdf_version_wanted;
     // initialize
     if (!isInit) {
-        globalParams = new GlobalParams();
+        globalParams = new GlobalParams(NULL);
         globalParams->setErrQuiet(gFalse);
         isInit = gTrue;
     }
@@ -703,7 +702,7 @@
     epdf_num_pages = pdf_doc->doc->getCatalog()->getNumPages();
     if (page_name) {
         // get page by name
-        GString name(page_name);
+        GooString name(page_name);
         LinkDest *link = pdf_doc->doc->findDest(&name);
         if (link == 0 || !link->isOk())
             pdftex_fail("PDF inclusion: invalid destination <%s>", page_name);
Index: texlive-bin-2007/build/source/texk/web2c/pdftexdir/pdftosrc.cc
===================================================================
--- texlive-bin-2007.orig/build/source/texk/web2c/pdftexdir/pdftosrc.cc	2006-12-27 00:37:34.000000000 +0100
+++ texlive-bin-2007/build/source/texk/web2c/pdftexdir/pdftosrc.cc	2007-01-31 19:45:53.000000000 +0100
@@ -25,22 +25,23 @@
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
-#include <aconf.h>
 #include <assert.h>
-#include <GString.h>
-#include <gmem.h>
-#include <gfile.h>
-#include "Object.h"
-#include "Stream.h"
-#include "Array.h"
-#include "Dict.h"
-#include "XRef.h"
-#include "Catalog.h"
-#include "Page.h"
-#include "GfxFont.h"
-#include "PDFDoc.h"
-#include "GlobalParams.h"
-#include "Error.h"
+
+#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"
 
 static XRef *xref = 0;
 
@@ -48,7 +49,7 @@
 {
     char *p, buf[1024];
     PDFDoc *doc;
-    GString *fileName;
+    GooString *fileName;
     Stream *s;
     Object srcStream, srcName, catalogDict;
     FILE *outfile;
@@ -62,8 +63,8 @@
                 "Usage: pdftosrc <PDF-file> [<stream-object-number>]\n");
         exit(1);
     }
-    fileName = new GString(argv[1]);
-    globalParams = new GlobalParams();
+    fileName = new GooString(argv[1]);
+    globalParams = new GlobalParams(NULL);
     doc = new PDFDoc(fileName);
     if (!doc->isOk()) {
         fprintf(stderr, "Invalid PDF file\n");
Index: texlive-bin-2007/build/source/texk/web2c/pdftexdir/Makefile.in
===================================================================
--- texlive-bin-2007.orig/build/source/texk/web2c/pdftexdir/Makefile.in	2006-12-27 00:37:34.000000000 +0100
+++ texlive-bin-2007/build/source/texk/web2c/pdftexdir/Makefile.in	2007-01-31 19:45:53.000000000 +0100
@@ -8,7 +8,7 @@
 kpathsea_srcdir_parent = $(srcdir)/../..
 kpathsea_dir_parent = ../..
 
-ALL_CXXFLAGS = @CXXFLAGS@ @DEFS@ $(XXCFLAGS) -I. -I$(srcdir) -I$(kpathsea_dir_parent) -I$(kpathsea_srcdir_parent) @LIBXPDFCPPFLAGS@ -I$(LIBOBSDCOMPATDIR) -I$(LIBOBSDCOMPATDIR)/.. -I$(LIBOBSDCOMPATFSRCDIR) -I$(LIBOBSDCOMPATFSRCDIR)/..
+ALL_CXXFLAGS = @CXXFLAGS@ @DEFS@ $(XXCFLAGS) -I. -I$(srcdir) -I$(kpathsea_dir_parent) -I$(kpathsea_srcdir_parent) -I/usr/include/poppler -I$(LIBOBSDCOMPATDIR) -I$(LIBOBSDCOMPATDIR)/.. -I$(LIBOBSDCOMPATFSRCDIR) -I$(LIBOBSDCOMPATFSRCDIR)/..
 CXX = @CXX@
 
 .SUFFIXES: .cc .o
Index: texlive-bin-2007/build/source/texk/web2c/pdftexdir/pdftex.mk
===================================================================
--- texlive-bin-2007.orig/build/source/texk/web2c/pdftexdir/pdftex.mk	2006-12-27 00:37:34.000000000 +0100
+++ texlive-bin-2007/build/source/texk/web2c/pdftexdir/pdftex.mk	2007-01-31 19:47:15.000000000 +0100
@@ -2,6 +2,9 @@
 # This fragment contains the parts of the makefile that are most likely to
 # differ between releases of pdfeTeX.
 
+# use libpoppler instead of included xpdf code
+ADDLDFLAGS = -lpoppler
+
 # We build pdftex
 pdftex = @PETEX@ pdftex
 pdftexdir = pdftexdir
@@ -29,7 +32,7 @@
 
 # Making pdftex
 pdftex: pdftexd.h $(pdftex_o) $(pdftexextra_o) $(pdftexlibsdep)
-	@CXXHACKLINK@ $(pdftex_o) $(pdftexextra_o) $(pdftexlibs) $(socketlibs) @CXXHACKLDLIBS@ @CXXLDEXTRA@
+	@CXXHACKLINK@ $(pdftex_o) $(pdftexextra_o) $(pdftexlibs) $(socketlibs) @CXXHACKLDLIBS@ @CXXLDEXTRA@ $(ADDLDFLAGS)
 
 # C file dependencies.
 $(pdftex_c) pdftexcoerce.h pdftexd.h: pdftex.p $(web2c_texmf) $(srcdir)/$(pdftexdir)/pdftex.defines $(srcdir)/$(pdftexdir)/pdftex.h
@@ -153,10 +156,10 @@
 	rm -f ttf2afm.c macnames.c
 # 
 # pdftosrc
-pdftosrc = pdftosrc
+pdftosrc = 
 
 pdftosrc: $(pdftexdir)/pdftosrc.o $(LIBXPDFDEP)
-	@CXXHACKLINK@ $(pdftexdir)/pdftosrc.o $(LDLIBXPDF) -lm @CXXLDEXTRA@
+	@CXXHACKLINK@ $(pdftexdir)/pdftosrc.o $(LDLIBXPDF) -lm @CXXLDEXTRA@  $(ADDLDFLAGS)
 $(pdftexdir)/pdftosrc.o:$(srcdir)/$(pdftexdir)/pdftosrc.cc
 	cd $(pdftexdir) && $(MAKE) pdftosrc.o
 check: pdftosrc-check
Index: texlive-bin-2007/build/source/configure
===================================================================
--- texlive-bin-2007.orig/build/source/configure	2007-01-09 15:16:26.000000000 +0100
+++ texlive-bin-2007/build/source/configure	2007-01-31 19:45:53.000000000 +0100
@@ -3442,9 +3442,9 @@
 
 # we need libxpdf for pdf[ex]tex, xetex
 test ! -d $srcdir/$LIBXPDFDIR && : ${needs_libxpdf=no}
-test "$with_pdftex"  != no    && : ${needs_libxpdf=yes}
-test "$with_pdfetex" != no    && : ${needs_libxpdf=yes}
-test "$with_xetex"   != no    && : ${needs_libxpdf=yes}
+test "$with_pdftex"  != no    && : ${needs_libxpdf=no}
+test "$with_pdfetex" != no    && : ${needs_libxpdf=no}
+test "$with_xetex"   != no    && : ${needs_libxpdf=no}
 : ${needs_libxpdf=no}
 export needs_libxpdf
 
Index: texlive-bin-2007/build/source/configure.in
===================================================================
--- texlive-bin-2007.orig/build/source/configure.in	2007-01-09 02:17:11.000000000 +0100
+++ texlive-bin-2007/build/source/configure.in	2007-01-31 19:45:53.000000000 +0100
@@ -157,9 +157,9 @@
 
 # we need libxpdf for pdf[ex]tex, xetex
 test ! -d $srcdir/$LIBXPDFDIR && : ${needs_libxpdf=no}
-test "$with_pdftex"  != no    && : ${needs_libxpdf=yes}
-test "$with_pdfetex" != no    && : ${needs_libxpdf=yes}
-test "$with_xetex"   != no    && : ${needs_libxpdf=yes}
+test "$with_pdftex"  != no    && : ${needs_libxpdf=no}
+test "$with_pdfetex" != no    && : ${needs_libxpdf=no}
+test "$with_xetex"   != no    && : ${needs_libxpdf=no}
 : ${needs_libxpdf=no}
 export needs_libxpdf
 
@@ -207,7 +207,7 @@
 sinclude(libs/libpng/libpng.ac)
 sinclude(libs/zlib/zlib.ac)
 sinclude(libs/ncurses/ncurses.ac)
-sinclude(libs/xpdf/libxpdf.ac)
+#sinclude(libs/xpdf/libxpdf.ac)
 sinclude(libs/t1lib/t1lib.ac)
 sinclude(libs/gd/gd.ac)
 sinclude(libs/freetype/freetype.ac)
Index: texlive-bin-2007/build/source/texk/web2c/xetexdir/XeTeX_ext.c
===================================================================
--- texlive-bin-2007.orig/build/source/texk/web2c/xetexdir/XeTeX_ext.c	2007-01-31 19:46:46.000000000 +0100
+++ texlive-bin-2007/build/source/texk/web2c/xetexdir/XeTeX_ext.c	2007-01-31 19:49:20.000000000 +0100
@@ -33,7 +33,7 @@
  */
 
 #ifdef XETEX_OTHER
-#include "xpdf/config.h"
+#include "poppler/poppler-config.h"
 #include "png.h"
 #endif
 
@@ -194,7 +194,7 @@
 #else
 		"Compiled with fontconfig version %d.%d.%d; using %d.%d.%d\n"
 		"Compiled with libpng version %s; using %s\n"
-		"Compiled with xpdf version %s\n"
+		"Compiled with libpoppler version %s\n"
 #endif
 		;
 
Index: texlive-bin-2007/build/source/texk/web2c/xetexdir/pdfimage.cpp
===================================================================
--- texlive-bin-2007.orig/build/source/texk/web2c/xetexdir/pdfimage.cpp	2007-01-31 19:46:35.000000000 +0100
+++ texlive-bin-2007/build/source/texk/web2c/xetexdir/pdfimage.cpp	2007-01-31 19:47:15.000000000 +0100
@@ -11,10 +11,24 @@
 
 #include "pdfimage.h"
 
-#include "PDFDoc.h"
-#include "Catalog.h"
-#include "Page.h"
-#include "GString.h"
+#include <dirent.h>
+#include <poppler/poppler-config.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/Link.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 "XeTeX_ext.h"
 
@@ -28,7 +42,7 @@
 int
 pdf_get_rect(char* filename, int page_num, int pdf_box, realrect* box)
 {
-	GString*	name = new GString(filename);
+	GooString*	name = new GooString(filename);
 	PDFDoc*		doc = new PDFDoc(name);
 	
 	if (!doc) {
Index: texlive-bin-2007/build/source/texk/web2c/xetexdir/xetex.mk
===================================================================
--- texlive-bin-2007.orig/build/source/texk/web2c/xetexdir/xetex.mk	2007-01-31 19:46:57.000000000 +0100
+++ texlive-bin-2007/build/source/texk/web2c/xetexdir/xetex.mk	2007-01-31 19:47:15.000000000 +0100
@@ -4,6 +4,10 @@
 
 Makefile: $(srcdir)/xetexdir/xetex.mk
 
+# use libpoppler instead of included xpdf code
+ADDLDFLAGS = -lpoppler
+
+
 # We build xetex unless configure decides to skip it
 xetex = @XETEX@ xetex
 
@@ -29,7 +33,7 @@
 
 @XETEX_GENERIC@ XETEX_DEFINES = -DXETEX_OTHER
 
-@XETEX_GENERIC@ EXTRALIBS = @LDLIBXPDF@ @LDLIBPNG@ @LDFONTCONFIG@
+@XETEX_GENERIC@ EXTRALIBS = @LDLIBXPDF@ @LDLIBPNG@ @LDFONTCONFIG@ $(ADDLDFLAGS)
 
 @XETEX_GENERIC@ EXTRADEPS = @LIBXPDFDEP@ @LIBPNGDEP@
 
Index: texlive-bin-2007/build/source/texk/web2c/pdftexdir/utils.c
===================================================================
--- texlive-bin-2007.orig/build/source/texk/web2c/pdftexdir/utils.c	2007-01-31 19:49:47.000000000 +0100
+++ texlive-bin-2007/build/source/texk/web2c/pdftexdir/utils.c	2007-01-31 19:50:01.000000000 +0100
@@ -1261,7 +1261,7 @@
     (void) asprintf(versions,
                     "Compiled with libpng %s; using libpng %s\n"
                     "Compiled with zlib %s; using zlib %s\n"
-                    "Compiled with xpdf version %s\n",
+                    "Compiled with libpoppler version %s\n",
                     PNG_LIBPNG_VER_STRING, png_libpng_ver,
                     ZLIB_VERSION, zlib_version, xpdfVersion);
 }

Reply to: