[tex-k] libpoppler support in TeX Live source tree

Norbert Preining preining at logic.at
Wed Mar 18 17:16:56 CET 2009


On Mi, 18 Mär 2009, Peter Breitenlohner wrote:
> I just had a look at your patch (ignoring all the auto stuff that will
> be or already is replaced by *.ac and *.am fragments).  The code changes are
> indeed rather limited, and can easily be made optional via a -D<something>
> and/or #define's supplied by the TL build system.
> 
> I suppose the changes required for luatex will have a similar size.

Yes absolutely, the curren CODE change (the rest is a bit different) is
attached.

The problem here is with libpoppler not shipping the
	xpdfVersion
variable/define anymore. I circumvented that with a 
	-DPOPPLER_VERSION=`pkg-config ...`
but I am not sure that is the best version. One can also drop that, or
if someone has a better solution for that it would be great.

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <preining at logic.at>        Vienna University of Technology
Debian Developer <preining at debian.org>                         Debian TeX Group
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
BOTUSFLEMING
A small, long-handled steel trowel used by surgeons to remove the
contents of a patient's nostrils prior to a sinus operation.
			--- Douglas Adams, The Meaning of Liff
-------------- next part --------------
libpoppler-0.10

making luatex compile with libpoppler 0.10 release line

 src/configure                               |    6 ++--
 src/configure.in                            |    8 ++---
 src/texk/web2c/luatexdir/Makefile.in        |    9 ++++--
 src/texk/web2c/luatexdir/image/pdftoepdf.cc |   41 +++++++++++++---------------
 src/texk/web2c/luatexdir/luatex.mk          |    5 ++-
 src/texk/web2c/luatexdir/luatexextra.in     |    2 -
 src/texk/web2c/luatexdir/utils.c            |    6 ++--
 7 files changed, 41 insertions(+), 36 deletions(-)

Index: luatex-0.35.0/src/texk/web2c/luatexdir/image/pdftoepdf.cc
===================================================================
--- luatex-0.35.0.orig/src/texk/web2c/luatexdir/image/pdftoepdf.cc	2009-03-09 17:32:37.000000000 +0100
+++ luatex-0.35.0/src/texk/web2c/luatexdir/image/pdftoepdf.cc	2009-03-09 17:32:42.000000000 +0100
@@ -24,25 +24,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"
 
 static const char _svn_version[] =
@@ -163,7 +162,7 @@
         pdf_doc->file_path = xstrdup(file_path);
         void **aa = avl_probe(PdfDocumentTree, pdf_doc);
         assert(aa != NULL);
-        GString *docName = new GString(pdf_doc->file_path);
+        GooString *docName = new GooString(pdf_doc->file_path);
         pdf_doc->doc = new PDFDoc(docName);     // takes ownership of docName
         if (!pdf_doc->doc->isOk() || !pdf_doc->doc->okToPrint())
             pdftex_fail("xpdf: reading PDF image failed");
@@ -533,7 +532,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()) {
@@ -725,7 +724,7 @@
     img_totalpages(idict) = pdf_doc->doc->getCatalog()->getNumPages();
     if (img_pagename(idict)) {
         // get page by name
-        GString name(img_pagename(idict));
+        GooString name(img_pagename(idict));
         LinkDest *link = pdf_doc->doc->findDest(&name);
         if (link == NULL || !link->isOk())
             pdftex_fail("PDF inclusion: invalid destination <%s>",
Index: luatex-0.35.0/src/texk/web2c/luatexdir/luatexextra.in
===================================================================
--- luatex-0.35.0.orig/src/texk/web2c/luatexdir/luatexextra.in	2009-03-09 17:32:37.000000000 +0100
+++ luatex-0.35.0/src/texk/web2c/luatexdir/luatexextra.in	2009-03-09 17:32:42.000000000 +0100
@@ -25,7 +25,7 @@
    (generated from ../lib/texmfmp.c).
 */
 
-#define BANNER "This is LuaTeX, Version LUATEX-VERSION"
+#define BANNER "This is LuaTeX using libpoppler, Version LUATEX-VERSION"
 #define COPYRIGHT_HOLDER "Taco Hoekwater"
 #define AUTHOR NULL
 #define PROGRAM_HELP LUATEXHELP
Index: luatex-0.35.0/src/texk/web2c/luatexdir/utils.c
===================================================================
--- luatex-0.35.0.orig/src/texk/web2c/luatexdir/utils.c	2009-03-09 17:32:37.000000000 +0100
+++ luatex-0.35.0/src/texk/web2c/luatexdir/utils.c	2009-03-09 17:34:16.000000000 +0100
@@ -41,7 +41,7 @@
 #include "ptexlib.h"
 
 #include "png.h"
-#include "xpdf/config.h"        /* just to get the xpdf version */
+#include "poppler/poppler-config.h"        /* just to get the xpdf version */
 
 static const char __svn_version[] =
     "$Id: utils.c 1897 2009-02-23 14:44:44Z taco $ $URL: svn://scm.foundry.supelec.fr/svn/luatex/tags/beta-0.35.0/src/texk/web2c/luatexdir/utils.c $";
@@ -1131,9 +1131,9 @@
     (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 poppler version %s\n",
                     PNG_LIBPNG_VER_STRING, png_libpng_ver,
-                    ZLIB_VERSION, zlib_version, xpdfVersion);
+                    ZLIB_VERSION, zlib_version, POPPLERVERSION);
 }
 
 


More information about the tex-k mailing list