summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/xetexdir
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/xetexdir')
-rw-r--r--Build/source/texk/web2c/xetexdir/ChangeLog6
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeX_ext.c12
-rw-r--r--Build/source/texk/web2c/xetexdir/am/xetex.am4
-rw-r--r--Build/source/texk/web2c/xetexdir/am/xetex.mk205
-rw-r--r--Build/source/texk/web2c/xetexdir/pdfimage.cpp12
5 files changed, 30 insertions, 209 deletions
diff --git a/Build/source/texk/web2c/xetexdir/ChangeLog b/Build/source/texk/web2c/xetexdir/ChangeLog
new file mode 100644
index 00000000000..df1b2896a5e
--- /dev/null
+++ b/Build/source/texk/web2c/xetexdir/ChangeLog
@@ -0,0 +1,6 @@
+2009-05-05 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * XeTeX_ext.c, image/pdfimage.cpp: adapt for poppler.
+
+ patches from Norbert Preinig <preining@logic.at>
+
diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
index da3bf2f1e64..44abaa0afd3 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
+++ b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
@@ -33,7 +33,14 @@ authorization from SIL International.
*/
#ifdef XETEX_OTHER
+#ifdef POPPLER_VERSION
+#define xpdfVersion POPPLER_VERSION
+#define xpdfString "poppler"
+#include "poppler-config.h"
+#else
+#define xpdfString "xpdf"
#include "xpdf/config.h"
+#endif
#include "png.h"
#endif
@@ -190,7 +197,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 %s version %s\n"
#endif
;
@@ -201,6 +208,7 @@ void initversionstring(char **versions)
#ifdef XETEX_OTHER
+ strlen(PNG_LIBPNG_VER_STRING)
+ strlen(png_libpng_ver)
+ + strlen(xpdfString)
+ strlen(xpdfVersion)
+ 6 * 3 /* for fontconfig version #s (won't really need 3 digits per field!) */
#endif
@@ -226,7 +234,7 @@ void initversionstring(char **versions)
FC_VERSION / 10000, (FC_VERSION % 10000) / 100, FC_VERSION % 100,
fc_version / 10000, (fc_version % 10000) / 100, fc_version % 100,
PNG_LIBPNG_VER_STRING, png_libpng_ver,
- xpdfVersion
+ xpdfString, xpdfVersion
#endif
);
}
diff --git a/Build/source/texk/web2c/xetexdir/am/xetex.am b/Build/source/texk/web2c/xetexdir/am/xetex.am
index 97181592bec..bf8bad87a56 100644
--- a/Build/source/texk/web2c/xetexdir/am/xetex.am
+++ b/Build/source/texk/web2c/xetexdir/am/xetex.am
@@ -218,6 +218,9 @@ libxetexmm_a_SOURCES = \
## included by xetexdir/XeTeXFontMgr_Mac.cpp
EXTRA_DIST += xetexdir/XeTeXFontMgr_Mac.mm
+EXTRA_DIST += \
+ xetexdir/ChangeLog
+
## Not used
##
EXTRA_DIST += \
@@ -227,7 +230,6 @@ EXTRA_DIST += \
##
EXTRA_DIST += \
xetexdir/acx_pthread.m4 \
- xetexdir/am/xetex.mk \
xetexdir/tests.ac \
xetexdir/withenable.ac \
xetexdir/xetex.mk
diff --git a/Build/source/texk/web2c/xetexdir/am/xetex.mk b/Build/source/texk/web2c/xetexdir/am/xetex.mk
deleted file mode 100644
index 94c9a75727d..00000000000
--- a/Build/source/texk/web2c/xetexdir/am/xetex.mk
+++ /dev/null
@@ -1,205 +0,0 @@
-# Makefile fragment for XeTeX and web2c. -- Jonathan Kew -- Public domain.
-# This fragment contains the parts of the makefile that are most likely to
-# differ between releases of XeTeX.
-
-Makefile: $(srcdir)/xetexdir/xetex.mk
-
-# this should probably move to common.mk some day,
-# but need to check possible effect on other programs
-ALL_CXXFLAGS = @CXXFLAGS@
-
-# We build xetex unless configure decides to skip it
-xetex = @XETEX@ xetex
-
-### Platform-specific defines and files to be built
-
-# On Mac OS X:
-@XETEX_MACOSX@ xetex_platform_o = XeTeXFontMgr_Mac.o
-
-# On non-Mac platforms:
-
-@XETEX_GENERIC@ EXTRADEPS = @LIBXPDFDEP@ @LIBPNGDEP@
-
-### is Graphite support included?
-
-@XETEX_GRAPHITE@ GRAPHITEDIR = ../../libs/graphite-engine
-@XETEX_GRAPHITE@ GRAPHITESRCDIR = $(srcdir)/$(GRAPHITEDIR)
-
-@XETEX_GRAPHITE@ GRAPHITEFLAGS = @GRAPHITECPPFLAGS@
-@XETEX_GRAPHITE@ LDGRAPHITE = @LDGRAPHITE@
-@XETEX_GRAPHITE@ GRAPHITEDEP = @GRAPHITEDEP@
-
-### end of platform-specific setup
-
-LDLIBXPDF=@LDLIBXPDF@
-LIBXPDFCPPFLAGS=@LIBXPDFCPPFLAGS@
-LIBXPDFDEP=@LIBXPDFDEP@
-
-LIBXPDFDIR=../../libs/xpdf
-LIBXPDFSRCDIR=$(srcdir)/$(LIBXPDFDIR)
-
-LDLIBPNG=@LDLIBPNG@
-LIBPNGCPPFLAGS=@LIBPNGCPPFLAGS@
-LIBPNGDEP=@LIBPNGDEP@
-
-LIBPNGDIR=../../libs/libpng
-LIBPNGSRCDIR=$(srcdir)/$(LIBPNGDIR)
-
-LDFREETYPE2 = @LDFREETYPE2@
-FTFLAGS = @FREETYPE2CPPFLAGS@
-FREETYPE2DEP = @FREETYPE2DEP@
-
-FREETYPE2DIR = ../../libs/freetype2
-FREETYPE2SRCDIR = $(srcdir)/$(FREETYPE2DIR)
-
-TECKITFLAGS = @TECKITCPPFLAGS@
-LDTECKIT = @LDTECKIT@
-TECKITDEP = @TECKITDEP@
-
-TECKITDIR=../../libs/teckit
-TECKITSRCDIR=$(srcdir)/$(TECKITDIR)
-
-ICUFLAGS = @ICUCPPFLAGS@
-LDICU = @LDICU@
-ICUDEP = @ICUDEP@
-
-ICUDIR=../../libs/icu-xetex
-ICUSRCDIR=$(srcdir)/$(ICUDIR)
-
-ICUCFLAGS = @ICUCPPFLAGS@ -DLE_USE_CMEMORY
-
-ZLIBCPPFLAGS = @ZLIBCPPFLAGS@
-LDZLIB = @LDZLIB@
-
-ZLIBDIR = ../../libs/zlib
-ZLIBSRCDIR = $(srcdir)/$(ZLIBDIR)
-
-FONTCONFIGCPPFLAGS = @FONTCONFIGCPPFLAGS@
-FONTCONFIGLDFLAGS = @FONTCONFIGLDFLAGS@
-
-xetexlibs = $(LDICU) $(LDTECKIT) $(LDFREETYPE2) $(LDGRAPHITE) $(LDZLIB)
-
-# Font-related headers
-XeTeXFontHdrs = \
- $(srcdir)/xetexdir/XeTeXFontMgr_Mac.h
-
-
-# The C sources.
-xetex_c = xetexini.c xetex0.c xetex1.c xetex2.c
-xetex_o = xetexini.o xetex0.o xetex1.o xetex2.o xetexextra.o
-xetex_add_o = xetex_pool.o $(xetex_platform_o)
-
-# these compilations require the path to TECkit headers;
-# just setting it in XCFLAGS doesn't seem to work when we're called
-# recursively from "make world" etc
-xetexini.o: xetexini.c $(srcdir)/xetexdir/XeTeX_ext.h
- $(compile) $(TECKITFLAGS) $(FTFLAGS) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@
-xetex0.o: xetex0.c $(srcdir)/xetexdir/XeTeX_ext.h
- $(compile) $(TECKITFLAGS) $(FTFLAGS) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@
-xetex1.o: xetex1.c $(srcdir)/xetexdir/XeTeX_ext.h
- $(compile) $(TECKITFLAGS) $(FTFLAGS) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@
-xetex2.o: xetex2.c $(srcdir)/xetexdir/XeTeX_ext.h
- $(compile) $(TECKITFLAGS) $(FTFLAGS) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@
-xetexextra.o: xetexextra.c $(srcdir)/xetexdir/XeTeX_ext.h
- $(compile) $(TECKITFLAGS) $(FTFLAGS) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@
-xetex_pool.o: xetex_pool.c $(srcdir)/xetexdir/XeTeX_ext.h
- $(compile) $(TECKITFLAGS) $(FTFLAGS) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@
-
-# image support
-mfileio.o: $(srcdir)/xetexdir/mfileio.c $(srcdir)/xetexdir/mfileio.h
- $(compile) $(ALL_CFLAGS) $(FTFLAGS) -c $< -o $@
-
-numbers.o: $(srcdir)/xetexdir/numbers.c $(srcdir)/xetexdir/numbers.h
- $(compile) $(ALL_CFLAGS) $(FTFLAGS) -c $< -o $@
-
-bmpimage.o: $(srcdir)/xetexdir/bmpimage.c $(srcdir)/xetexdir/bmpimage.h
- $(compile) $(ALL_CFLAGS) $(FTFLAGS) -c $< -o $@
-
-jpegimage.o: $(srcdir)/xetexdir/jpegimage.c $(srcdir)/xetexdir/jpegimage.h
- $(compile) $(ALL_CFLAGS) $(FTFLAGS) -c $< -o $@
-
-pngimage.o: $(srcdir)/xetexdir/pngimage.c $(srcdir)/xetexdir/pngimage.h
- $(compile) $(ALL_CFLAGS) $(FTFLAGS) $(LIBPNGCPPFLAGS) $(ZLIBCPPFLAGS) -c $< -o $@
-
-pdfimage.o: $(srcdir)/xetexdir/pdfimage.cpp $(srcdir)/xetexdir/pdfimage.h
- $(CXX) $(ALL_CFLAGS) $(FTFLAGS) $(LIBXPDFCPPFLAGS) -c $< -o $@
-
-XeTeX_pic.o: $(srcdir)/xetexdir/XeTeX_pic.c $(srcdir)/xetexdir/XeTeX_ext.h $(XeTeXImageHdrs)
- $(compile) $(TECKITFLAGS) $(FTFLAGS) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@
-
-# Layout library
-xetex_ot_layout_o = \
- $(xetex_platform_layout_o)
-
-XeTeXLayoutInterface.o: $(srcdir)/xetexdir/XeTeXLayoutInterface.cpp $(XeTeXFontHdrs)
- $(CXX) $(ICUCFLAGS) $(FTFLAGS) $(GRAPHITEFLAGS) $(FONTCONFIGCPPFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) $(XETEX_GRAPHITE) -c $< -o $@
-XeTeXOTLayoutEngine.o: $(srcdir)/xetexdir/XeTeXOTLayoutEngine.cpp $(XeTeXFontHdrs)
- $(CXX) $(ICUCFLAGS) $(FTFLAGS) $(FONTCONFIGCPPFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
-
-XeTeXFontMgr.o: $(srcdir)/xetexdir/XeTeXFontMgr.cpp $(XeTeXFontHdrs)
- $(CXX) $(ICUCFLAGS) $(FTFLAGS) $(FONTCONFIGCPPFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
-XeTeXFontMgr_FC.o: $(srcdir)/xetexdir/XeTeXFontMgr_FC.cpp $(XeTeXFontHdrs)
- $(CXX) $(ICUCFLAGS) $(FTFLAGS) $(FONTCONFIGCPPFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
-
-XeTeXFontMgr_Mac.o: $(srcdir)/xetexdir/XeTeXFontMgr_Mac.mm $(XeTeXFontHdrs)
- $(CXX) -ObjC++ $(ICUCFLAGS) $(FTFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
-
-cmaps.o: $(srcdir)/xetexdir/cmaps.cpp
- $(CXX) $(ICUCFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
-FontTableCache.o: $(srcdir)/xetexdir/FontTableCache.cpp
- $(CXX) $(ICUCFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
-
-XeTeXFontInst.o: $(srcdir)/xetexdir/XeTeXFontInst.cpp $(XeTeXFontHdrs)
- $(CXX) $(ICUCFLAGS) $(FTFLAGS) $(FONTCONFIGCPPFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
-XeTeXFontInst_Mac.o: $(srcdir)/xetexdir/XeTeXFontInst_Mac.cpp $(XeTeXFontHdrs)
- $(CXX) $(ICUCFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
-XeTeXFontInst_FT2.o: $(srcdir)/xetexdir/XeTeXFontInst_FT2.cpp $(XeTeXFontHdrs)
- $(CXX) $(ICUCFLAGS) $(FTFLAGS) $(FONTCONFIGCPPFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
-
-XeTeXOTMath.o: $(srcdir)/xetexdir/XeTeXOTMath.cpp $(XeTeXFontHdrs)
- $(CXX) $(ICUCFLAGS) $(FTFLAGS) $(FONTCONFIGCPPFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
-
-XeTeXGrLayout.o: $(srcdir)/xetexdir/XeTeXGrLayout.cpp $(srcdir)/xetexdir/XeTeXGrLayout.h \
- $(XeTeXFontHdrs) $(GRAPHITESRCDIR)/include/graphite/Font.h
- $(CXX) $(ICUCFLAGS) $(FTFLAGS) $(FONTCONFIGCPPFLAGS) $(GRAPHITEFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
-
-# special rules for files that need the TECkit headers as well
-XeTeX_ext.o: $(srcdir)/xetexdir/XeTeX_ext.c xetexd.h
- $(compile) $(ICUCFLAGS) $(FTFLAGS) $(TECKITFLAGS) $(LIBPNGCPPFLAGS) $(LIBXPDFCPPFLAGS) $(ZLIBCPPFLAGS) $(ALL_CFLAGS) $(XETEX_DEFINES) $(XETEX_GRAPHITE) -c $< -o $@
-XeTeX_mac.o: $(srcdir)/xetexdir/XeTeX_mac.c xetexd.h
- $(compile) $(ICUCFLAGS) $(TECKITFLAGS) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@
-
-trans.o: $(srcdir)/xetexdir/trans.c
- $(compile) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@
-
-# sync
-synctex-xe.o: synctex-xe.c
- $(compile) $(ALL_CFLAGS) $(TECKITFLAGS) $(FTFLAGS) $(XETEX_DEFINES) -c $< -o $@
-
-# Making xetex.
-xetex: $(xetex_o) $(xetex_add_o) $(xetex_images_o) $(xetex_ot_layout_o) \
- $(GRAPHITEDEP) $(TECKITDEP) $(FREETYPE2DEP) $(ICUDEP) $(EXTRADEPS)
- @CXXHACKLINK@ $(xetex_o) $(xetex_add_o) $(xetex_images_o) $(xetex_ot_layout_o) \
- $(FONTCONFIGLDFLAGS) $(socketlibs) $(xetexlibs) $(EXTRALIBS) \
- @CXXHACKLDLIBS@ @CXXLDEXTRA@ @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
-
-
-
-# Dumps
-all_xefmts = xetex.fmt $(xefmts)
-
-dumps: @XETEX@ xefmts
-xefmts: $(all_xefmts)
-
-xefmtdir = $(web2cdir)/xetex
-$(xefmtdir)::
- $(SHELL) $(top_srcdir)/../mkinstalldirs ${DESTDIR}$(xefmtdir)
-
-xetex.fmt: xetex
- $(dumpenv) $(MAKE) progname=xetex files="xetex.ini unicode-letters.tex plain.tex cmr10.tfm" prereq-check
- $(dumpenv) ./xetex --progname=xetex --jobname=xetex --ini \*\\input xetex.ini \\dump </dev/null
-
-xelatex.fmt: xetex
- $(dumpenv) $(MAKE) progname=xelatex files="xelatex.ini unicode-letters.tex latex.ltx" prereq-check
- $(dumpenv) ./xetex --progname=xelatex --jobname=xelatex --ini \*\\input xelatex.ini </dev/null
-
diff --git a/Build/source/texk/web2c/xetexdir/pdfimage.cpp b/Build/source/texk/web2c/xetexdir/pdfimage.cpp
index 12eda2c68b0..c76f2372ca1 100644
--- a/Build/source/texk/web2c/xetexdir/pdfimage.cpp
+++ b/Build/source/texk/web2c/xetexdir/pdfimage.cpp
@@ -11,10 +11,20 @@
#include "pdfimage.h"
+#ifdef POPPLER_VERSION
+#include <dirent.h>
+#include <poppler-config.h>
+#include <goo/GooString.h>
+#include <goo/gmem.h>
+#include <goo/gfile.h>
+#define GString GooString
+#else
+#include "goo/GString.h"
+#endif
+
#include "PDFDoc.h"
#include "Catalog.h"
#include "Page.h"
-#include "GString.h"
#include "XeTeX_ext.h"