File source-poppler-0.6.dif of Package texlive

--- configure
+++ configure	2007-02-06 12:54:46.000000000 +0100
@@ -3442,9 +3442,9 @@ export needs_zlib
 
 # 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
 
--- configure.in
+++ configure.in	2007-02-06 12:55:10.000000000 +0100
@@ -157,9 +157,9 @@ export needs_zlib
 
 # 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
 
--- texk/web2c/pdftexdir/Makefile.in
+++ texk/web2c/pdftexdir/Makefile.in	2007-02-06 15:48:07.000000000 +0100
@@ -8,7 +8,7 @@ kpse_include ../make/library.mk
 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) $(XCPIE) -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
--- texk/web2c/pdftexdir/depend.mk
+++ texk/web2c/pdftexdir/depend.mk	2007-02-06 15:50:39.000000000 +0100
@@ -15,7 +15,7 @@ vfpacket.o: vfpacket.c ptexlib.h ../pdft
  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 \
+writefont.o: writefont.c 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 \
@@ -40,16 +40,6 @@ writepng.o: writepng.c ptexlib.h ../pdft
 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
 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
--- texk/web2c/pdftexdir/pdftex.mk
+++ texk/web2c/pdftexdir/pdftex.mk	2007-02-06 19:04:20.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 @@ pdftex_o = pdftexini.o pdftex0.o pdftex1
 
 # 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
@@ -152,11 +155,12 @@ ttf2afm-clean:
 	rm -f ttf2afm.o macnames.o
 	rm -f ttf2afm.c macnames.c
 # 
-# pdftosrc
-pdftosrc = pdftosrc
+# pdftosrc disabled due poppler can not used for.
+#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
--- texk/web2c/pdftexdir/pdftexextra.in
+++ texk/web2c/pdftexdir/pdftexextra.in	2007-02-06 15:52:51.000000000 +0100
@@ -26,7 +26,7 @@ $Id: pdftexextra.in,v 1.4 2004/08/26 18:
    (generated from ../lib/texmfmp.c).
 */
 
-#define BANNER "This is pdfTeX, Version 3.141592-PDFTEX-VERSION-ETEX-VERSION"
+#define BANNER "This is pdfTeX using libpoppler, Version 3.141592-PDFTEX-VERSION-ETEX-VERSION"
 #define COPYRIGHT_HOLDER "Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX)"
 #define AUTHOR NULL
 #define PROGRAM_HELP PDFTEXHELP
--- texk/web2c/pdftexdir/pdftoepdf.cc
+++ texk/web2c/pdftexdir/pdftoepdf.cc	2007-02-06 19:16:15.000000000 +0100
@@ -26,24 +26,25 @@ $Id: pdftoepdf.cc,v 1.9 2006/09/01 18:06
 #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"
 
@@ -169,7 +170,7 @@ static PdfDocument *find_add_document(ch
     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 +512,7 @@ static void copyObject(Object * obj)
     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()) {
@@ -703,7 +704,7 @@ read_pdf_info(char *image_name, char *pa
     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);
--- texk/web2c/pdftexdir/pdftosrc.cc
+++ texk/web2c/pdftexdir/pdftosrc.cc	2007-02-06 19:06:16.000000000 +0100
@@ -25,22 +25,25 @@ $Id: //depot/Build/source.development/Te
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
-#include <aconf.h>
+#include <config.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/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>
 
 static XRef *xref = 0;
 
@@ -48,7 +51,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;
@@ -62,7 +65,7 @@ int main(int argc, char *argv[])
                 "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()) {
--- texk/web2c/pdftexdir/writefont.c
+++ texk/web2c/pdftexdir/writefont.c	2007-02-02 16:22:27.000000000 +0100
@@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place, Suite
 $Id: writefont.c,v 1.3 2005/12/27 19:04:42 hahe Exp $
 */
 
+#include <poppler/goo/gmem.h>
 #include "ptexlib.h"
 
 /**********************************************************************/
--- texk/web2c/xetexdir/XeTeX_ext.c
+++ texk/web2c/xetexdir/XeTeX_ext.c	2007-02-06 19:28:46.000000000 +0100
@@ -33,7 +33,7 @@ authorization from SIL International.
  */
 
 #ifdef XETEX_OTHER
-#include "xpdf/config.h"
+#include <poppler/poppler-config.h>
 #include "png.h"
 #endif
 
@@ -194,7 +194,7 @@ void initversionstring(char **versions)
 #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 (xpdf version %s)\n"
 #endif
 		;
 
--- texk/web2c/xetexdir/pdfimage.cpp
+++ texk/web2c/xetexdir/pdfimage.cpp	2007-02-06 18:25:23.000000000 +0100
@@ -11,10 +11,23 @@
 
 #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 +41,7 @@ my_fmin(double x, double y)
 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) {
--- texk/web2c/xetexdir/xetex.mk
+++ texk/web2c/xetexdir/xetex.mk	2007-02-06 16:08:33.000000000 +0100
@@ -29,7 +29,11 @@ xetex = @XETEX@ xetex
 
 @XETEX_GENERIC@ XETEX_DEFINES = -DXETEX_OTHER
 
-@XETEX_GENERIC@ EXTRALIBS = @LDLIBXPDF@ @LDLIBPNG@ @LDFONTCONFIG@
+# use libpoppler instead of included xpdf code
+@XETEX_GENERIC@ ADDLDFLAGS = -lpoppler
+@XETEX_GENERIC@ ALL_CXXFLAGS = @CXXFLAGS@ @DEFS@ $(XXCFLAGS) $(XCPIE) -I. -I$(srcdir) -I$(kpathsea_dir_parent) -I$(kpathsea_srcdir_parent) -I/usr/include/poppler
+
+@XETEX_GENERIC@ EXTRALIBS = @LDLIBXPDF@ @LDLIBPNG@ @LDFONTCONFIG@ $(ADDLDFLAGS)
 
 @XETEX_GENERIC@ EXTRADEPS = @LIBXPDFDEP@ @LIBPNGDEP@
 
@@ -144,7 +148,7 @@ pngimage.o: $(srcdir)/xetexdir/pngimage.
 	$(compile) $(ALL_CFLAGS) $(LIBPNGCPPFLAGS) $(ZLIBCPPFLAGS) -c $< -o $@
 
 pdfimage.o: $(srcdir)/xetexdir/pdfimage.cpp $(srcdir)/xetexdir/pdfimage.h
-	$(CXX) $(ALL_CFLAGS) $(LIBXPDFCPPFLAGS) -c $< -o $@
+	$(CXX) $(ALL_CXXFLAGS) $(LIBXPDFCPPFLAGS) -c $< -o $@
 
 XeTeX_pic.o: $(srcdir)/xetexdir/XeTeX_pic.c $(srcdir)/xetexdir/XeTeX_ext.h $(XeTeXImageHdrs)
 	$(compile) $(TECKITFLAGS) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@
--- texk/web2c/xetexdir/xetexextra.in
+++ texk/web2c/xetexdir/xetexextra.in	2007-02-06 13:00:12.000000000 +0100
@@ -51,7 +51,7 @@ You should have received a copy of the G
 along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
-#define BANNER "This is XeTeX, Version 3.141592-XETEX-VERSION"
+#define BANNER "This is XeTeX using libpoppler, Version 3.141592-XETEX-VERSION"
 #define COPYRIGHT_HOLDER "SIL International"
 #define AUTHOR "Jonathan Kew"
 #define PROGRAM_HELP XETEXHELP
--- ./texk/web2c/xetexdir/XeTeX_ext.c.orig	2008-11-29 10:28:54.692767000 +0100
+++ ./texk/web2c/xetexdir/XeTeX_ext.c	2008-11-29 10:29:06.027422000 +0100
@@ -185,6 +185,8 @@
 	extern FT_Library	gFreeTypeLibrary; /* in XeTeXFontInst_FT2 */
 	FT_Int	ftMajor, ftMinor, ftPatch;
 
+	const char *xpdfVersion = "3.00";
+
 	char* fmt =
 		"Compiled with ICU version %s [with modifications for XeTeX]\n"
 		"Compiled with zlib version %s; using %s\n"
openSUSE Build Service is sponsored by