summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2013-12-12 10:42:21 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2013-12-12 10:42:21 +0000
commit0109f63149bb3611c96deb9466d5a418b772d827 (patch)
tree47d59ff608c40ff060cb74cf5b6eb1fffa7c7e02 /Build
parentb179b3a423007409b4c01ebe096f60405f5e6098 (diff)
luatex: Adapt for poppler 0.25.x
git-svn-id: svn://tug.org/texlive/trunk@32389 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/ChangeLog5
-rw-r--r--Build/source/texk/web2c/Makefile.in63
-rw-r--r--Build/source/texk/web2c/c-auto.in3
-rwxr-xr-xBuild/source/texk/web2c/configure49
-rw-r--r--Build/source/texk/web2c/configure.ac14
-rw-r--r--Build/source/texk/web2c/luatexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/luatexdir/image/epdf.h3
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/lepdflib.cc14
8 files changed, 126 insertions, 29 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index 79ab73b53a3..48d30418c07 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,3 +1,8 @@
+2013-12-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * configure.ac (poppler features): Check if getStructTreeRoot()
+ returns an Object as for poppler <0.25.x.
+
2013-12-06 Peter Breitenlohner <peb@mppmu.mpg.de>
* vptovf.ch: Use make_suffix() for implied tfm_name.
diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in
index 9efcf779155..4e38474a74b 100644
--- a/Build/source/texk/web2c/Makefile.in
+++ b/Build/source/texk/web2c/Makefile.in
@@ -1913,7 +1913,9 @@ EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h \
$(xetex_tests) xetexdir/COPYING xetexdir/NEWS \
xetexdir/image/README xetexdir/xewebmac.tex omegaware/README \
omegaware/ChangeLog $(odvicopy_sources) $(odvitype_sources) \
- $(ofm2opl_sources) $(opl2ofm_sources) $(otangle_sources) \
+ omegaware/ofm2opl.web omegaware/ofm2opl.up \
+ omegaware/ofm2opl.ch omegaware/opl2ofm.web \
+ omegaware/opl2ofm.up omegaware/opl2ofm.ch $(otangle_sources) \
omegaware/ovf2ovp.web omegaware/ovf2ovp.up \
omegaware/ovf2ovp.ch omegaware/ovp2ovf.web \
omegaware/ovp2ovf.up omegaware/ovp2ovf.ch $(OTANGLE_tests) \
@@ -1936,15 +1938,16 @@ EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h \
omegaware/tests/ofontv4.vpl omegaware/tests/ofontv5.opl \
omegaware/tests/ofontv5.ovp omegaware/tests/ofontv6.opl \
omegaware/tests/ofontv6.ovp omegaware/tests/Cherokee.pl \
- omegaware/tests/OCherokee.ovp omegaware/tests/inbmp0.opl \
- omegaware/tests/overbmp.ovp omegaware/tests/realnum.opl \
- omegaware/tests/realnum.out omegaware/tests/repeat.opl \
- omegaware/tests/repeated.opl omegaware/tests/sample.out \
- omegaware/tests/sample.ovp omegaware/tests/sample0-h.opl \
- omegaware/tests/specialhex.ovp $(aleph_web_srcs) \
- $(aleph_ch_srcs) alephdir/ChangeLog alephdir/aleph.defines \
- alephdir/aleph.version $(aleph_tests) synctexdir/ChangeLog \
- synctexdir/README.txt synctexdir/synctex_parser_readme.txt \
+ omegaware/tests/OCherokee.ovp omegaware/tests/inbmp.opl \
+ omegaware/tests/overbmp.opl omegaware/tests/overbmp.ovp \
+ omegaware/tests/realnum.opl omegaware/tests/realnum.out \
+ omegaware/tests/repeat.opl omegaware/tests/repeated.opl \
+ omegaware/tests/sample.out omegaware/tests/sample.ovp \
+ omegaware/tests/sample0-h.opl omegaware/tests/specialhex.ovp \
+ $(aleph_web_srcs) $(aleph_ch_srcs) alephdir/ChangeLog \
+ alephdir/aleph.defines alephdir/aleph.version $(aleph_tests) \
+ synctexdir/ChangeLog synctexdir/README.txt \
+ synctexdir/synctex_parser_readme.txt \
synctexdir/synctex_parser_version.txt synctexdir/tests \
synctexdir/synctex-common.h synctexdir/synctex.c \
synctexdir/synctex.defines synctexdir/synctex.h \
@@ -2009,19 +2012,19 @@ DISTCLEANFILES = $(EXTRA_LIBRARIES) CXXLD.sh tangle.c tangle.h \
xetex.ch xetex-web2c xetex.p xetex.pool xetex-tangle \
$(omegaware_programs:=.c) $(omegaware_programs:=.h) \
$(omegaware_programs:=.p) $(omegaware_programs:=-web2c) \
- ovf2ovp.web ovp2ovf.web omegaware/tests/xlevel1.ofm \
- omegaware/tests/xlevel1.opl ofont*vf omegaware/tests/xofont* \
- omegaware/tests/Cherokee.tfm omegaware/tests/OCherokee.ofm \
- omegaware/tests/OCherokee.opl omegaware/tests/OCherokee.ovf \
- omegaware/tests/xCherokee.* omegaware/tests/xOCherokee.* \
- omegaware/tests/inbmp1.* omegaware/tests/xoverbmp.* ocftest.* \
- omegaware/tests/xrealnum.* omegaware/tests/xrepeated.* \
- omegaware/tests/sample*.ofm omegaware/tests/sample*.ovf \
- omegaware/tests/sample1-h.opl omegaware/tests/xsample*.out \
- omegaware/tests/specialhex.ofm omegaware/tests/specialhex.opl \
- omegaware/tests/specialhex.ovf omegaware/tests/xspecialhex.* \
- $(nodist_aleph_SOURCES) aleph.web aleph.ch aleph-web2c aleph.p \
- aleph.pool aleph-tangle
+ ofm2opl.web opl2ofm.web ovf2ovp.web ovp2ovf.web \
+ omegaware/tests/xlevel1.ofm omegaware/tests/xlevel1.opl \
+ ofont*vf omegaware/tests/xofont* omegaware/tests/Cherokee.tfm \
+ omegaware/tests/OCherokee.ofm omegaware/tests/OCherokee.opl \
+ omegaware/tests/OCherokee.ovf omegaware/tests/xCherokee.* \
+ omegaware/tests/xOCherokee.* omegaware/tests/xinbmp* \
+ omegaware/tests/xoverbmp* ocftest.* omegaware/tests/xrealnum.* \
+ omegaware/tests/xrepeated.* omegaware/tests/sample*.ofm \
+ omegaware/tests/sample*.ovf omegaware/tests/sample1-h.opl \
+ omegaware/tests/xsample*.out omegaware/tests/specialhex.ofm \
+ omegaware/tests/specialhex.opl omegaware/tests/specialhex.ovf \
+ omegaware/tests/xspecialhex.* $(nodist_aleph_SOURCES) \
+ aleph.web aleph.ch aleph-web2c aleph.p aleph.pool aleph-tangle
CLEANFILES =
TRIPTRAP_CLEAN = $(am__append_9) $(am__append_17) $(am__append_26) \
$(am__append_31) $(am__append_37) $(am__append_43) \
@@ -2938,9 +2941,7 @@ odvicopy_sources = omegaware/odvicopy.web omegaware/odvicopy.ch
nodist_odvitype_SOURCES = odvitype.c odvitype.h
odvitype_sources = omegaware/odvitype.web omegaware/odvitype.ch
nodist_ofm2opl_SOURCES = ofm2opl.c ofm2opl.h
-ofm2opl_sources = omegaware/ofm2opl.web omegaware/ofm2opl.ch
nodist_opl2ofm_SOURCES = opl2ofm.c opl2ofm.h
-opl2ofm_sources = omegaware/opl2ofm.web omegaware/opl2ofm.ch
nodist_otangle_SOURCES = otangle.c otangle.h
otangle_sources = omegaware/otangle.web omegaware/otangle.ch
nodist_ovf2ovp_SOURCES = ovf2ovp.c ovf2ovp.h
@@ -11078,14 +11079,18 @@ ofm2opl.c ofm2opl.h: ofm2opl-web2c
@$(web2c) ofm2opl
ofm2opl-web2c: ofm2opl.p $(web2c_depend)
@$(web2c) ofm2opl
-ofm2opl.p: tangle$(EXEEXT) $(ofm2opl_sources)
- $(tangle_silent)$(ow_tangle) ofm2opl ofm2opl
+ofm2opl.p: tangle$(EXEEXT) ofm2opl.web omegaware/ofm2opl.ch
+ $(tangle_silent)$(ow_otangle) ofm2opl ofm2opl
+ofm2opl.web: tie$(EXEEXT) omegaware/ofm2opl.web omegaware/ofm2opl.up
+ $(tie) -m ofm2opl.web omegaware/ofm2opl.web omegaware/ofm2opl.up
opl2ofm.c opl2ofm.h: opl2ofm-web2c
@$(web2c) opl2ofm
opl2ofm-web2c: opl2ofm.p $(web2c_depend)
@$(web2c) opl2ofm
-opl2ofm.p: tangle$(EXEEXT) $(opl2ofm_sources)
- $(tangle_silent)$(ow_tangle) opl2ofm opl2ofm
+opl2ofm.p: tangle$(EXEEXT) opl2ofm.web omegaware/opl2ofm.ch
+ $(tangle_silent)$(ow_otangle) opl2ofm opl2ofm
+opl2ofm.web: tie$(EXEEXT) omegaware/opl2ofm.web omegaware/opl2ofm.up
+ $(tie) -m opl2ofm.web omegaware/opl2ofm.web omegaware/opl2ofm.up
otangle.c otangle.h: otangle-web2c
@$(web2c) otangle
otangle-web2c: otangle.p $(web2c_depend)
diff --git a/Build/source/texk/web2c/c-auto.in b/Build/source/texk/web2c/c-auto.in
index cd1b7bafe5e..f447dab1d12 100644
--- a/Build/source/texk/web2c/c-auto.in
+++ b/Build/source/texk/web2c/c-auto.in
@@ -43,6 +43,9 @@
/* web2c: Define to enable HackyInputFileNameForCoreDump.tex. */
#undef FUNNY_CORE_DUMP
+/* Define to 1 if Catalog::getStructTree_Root() returns an Object. */
+#undef GETSTRUCTTREEROOT_RETURNS_OBJECT
+
/* Define to 1 if you have the `access' function. */
#undef HAVE_ACCESS
diff --git a/Build/source/texk/web2c/configure b/Build/source/texk/web2c/configure
index 8b0505c4f01..78fffc338f8 100755
--- a/Build/source/texk/web2c/configure
+++ b/Build/source/texk/web2c/configure
@@ -23606,6 +23606,55 @@ _ACEOF
+# Check poppler features
+eval CPPFLAGS=\"$POPPLER_INCLUDES \$CPPFLAGS\"
+eval LIBS=\"$POPPLER_LIBS \$LIBS\"
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ac_link="./libtool --mode=link --tag=CXX $ac_link"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if getStructTreeRoot() returns an Object" >&5
+$as_echo_n "checking if getStructTreeRoot() returns an Object... " >&6; }
+if ${kpse_cv_getStructTreeRoot_returns_Object+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <Catalog.h>
+int
+main ()
+{
+Catalog *cat; Object *obj = cat->getStructTreeRoot();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ kpse_cv_getStructTreeRoot_returns_Object=yes
+else
+ kpse_cv_getStructTreeRoot_returns_Object=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_getStructTreeRoot_returns_Object" >&5
+$as_echo "$kpse_cv_getStructTreeRoot_returns_Object" >&6; }
+if test "x$kpse_cv_getStructTreeRoot_returns_Object" = xyes; then :
+
+$as_echo "#define GETSTRUCTTREEROOT_RETURNS_OBJECT 1" >>confdefs.h
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_link="./libtool --mode=link --tag=CC $ac_link"
+
+
CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
diff --git a/Build/source/texk/web2c/configure.ac b/Build/source/texk/web2c/configure.ac
index 0464fc66479..12f73ae9194 100644
--- a/Build/source/texk/web2c/configure.ac
+++ b/Build/source/texk/web2c/configure.ac
@@ -293,6 +293,20 @@ KPSE_ADD_FLAGS([kpathsea])
AC_CHECK_SIZEOF([off_t], , AC_INCLUDES_DEFAULT
[#include <kpathsea/config.h>])
+# Check poppler features
+KPSE_ADD_FLAGS([poppler])
+AC_LANG_PUSH([C++])
+AC_CACHE_CHECK([if getStructTreeRoot() returns an Object],
+ [kpse_cv_getStructTreeRoot_returns_Object],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <Catalog.h>]],
+ [[Catalog *cat; Object *obj = cat->getStructTreeRoot();]])],
+ [kpse_cv_getStructTreeRoot_returns_Object=yes],
+ [kpse_cv_getStructTreeRoot_returns_Object=no])])
+AS_IF([test "x$kpse_cv_getStructTreeRoot_returns_Object" = xyes],
+ [AC_DEFINE([GETSTRUCTTREEROOT_RETURNS_OBJECT], 1,
+ [Define to 1 if Catalog::getStructTree_Root() returns an Object.])])
+AC_LANG_POP([C++])
+
KPSE_RESTORE_FLAGS
dnl Write output here, instead of putting a zillion -D's on the command line.
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog
index 201ddbf2d8c..e73de6add38 100644
--- a/Build/source/texk/web2c/luatexdir/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/ChangeLog
@@ -1,3 +1,7 @@
+2013-12-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * image/epdf.h, lua/lepdflib.cc: Adapt for poppler-0.25.x.
+
2013-12-08 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* font/writet3.w: More cast arg2 of setpdffloat to int64_t.
diff --git a/Build/source/texk/web2c/luatexdir/image/epdf.h b/Build/source/texk/web2c/luatexdir/image/epdf.h
index b4041ef577b..257dfd7eac6 100644
--- a/Build/source/texk/web2c/luatexdir/image/epdf.h
+++ b/Build/source/texk/web2c/luatexdir/image/epdf.h
@@ -48,6 +48,9 @@ extern "C" {
# include "Dict.h"
# include "XRef.h"
# include "Catalog.h"
+#ifndef GETSTRUCTTREEROOT_RETURNS_OBJECT
+# include "StructTreeRoot.h"
+#endif
# include "Link.h"
# include "Page.h"
# include "GfxFont.h"
diff --git a/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc b/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc
index 100642b47a0..498180acff4 100644
--- a/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc
+++ b/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc
@@ -65,6 +65,7 @@ static const char *ErrorCodeNames[] = { "None", "OpenFile", "BadCatalog",
#define M_PDFRectangle "PDFRectangle"
#define M_Ref "Ref"
#define M_Stream "Stream"
+#define M_StructTreeRoot "StructTreeRoot"
#define M_XRefEntry "XRefEntry"
#define M_XRef "XRef"
@@ -96,6 +97,7 @@ new_poppler_userdata(Page);
new_poppler_userdata(PDFRectangle);
new_poppler_userdata(Ref);
new_poppler_userdata(Stream);
+new_poppler_userdata(StructTreeRoot);
new_poppler_userdata(XRef);
//**********************************************************************
@@ -573,7 +575,11 @@ static int m_Catalog_getPageRef(lua_State * L)
m_poppler_get_GOOSTRING(Catalog, getBaseURI);
m_poppler_get_GOOSTRING(Catalog, readMetadata);
+#ifdef GETSTRUCTTREEROOT_RETURNS_OBJECT
m_poppler_get_poppler(Catalog, Object, getStructTreeRoot);
+#else
+m_poppler_get_poppler(Catalog, StructTreeRoot, getStructTreeRoot);
+#endif
static int m_Catalog_findPage(lua_State * L)
{
@@ -2146,14 +2152,22 @@ static int m_PDFDoc_readMetadata(lua_State * L)
static int m_PDFDoc_getStructTreeRoot(lua_State * L)
{
+#ifdef GETSTRUCTTREEROOT_RETURNS_OBJECT
Object *obj;
+#else
+ StructTreeRoot *obj;
+#endif
udstruct *uin, *uout;
uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc);
if (uin->pd != NULL && uin->pd->pc != uin->pc)
pdfdoc_changed_error(L);
if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) {
obj = ((PdfDocument *) uin->d)->doc->getStructTreeRoot();
+#ifdef GETSTRUCTTREEROOT_RETURNS_OBJECT
uout = new_Object_userdata(L);
+#else
+ uout = new_Object_userdata(L);
+#endif
uout->d = obj;
uout->pc = uin->pc;
uout->pd = uin->pd;