summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2011-10-05 18:10:27 +0000
committerAlexis Ballier <aballier@gentoo.org>2011-10-05 18:10:27 +0000
commit023904119db8556113d57f8d4a4df684f676eb1c (patch)
treeab357859e41311afc3601a9a3cc933e6cb5e5065 /dev-tex
parentppc stable wrt #369909 (diff)
downloadgentoo-2-023904119db8556113d57f8d4a4df684f676eb1c.tar.gz
gentoo-2-023904119db8556113d57f8d4a4df684f676eb1c.tar.bz2
gentoo-2-023904119db8556113d57f8d4a4df684f676eb1c.zip
fix build with latest poppler, by Martin von Gagern, bug #384875
(Portage version: 2.2.0_alpha60/cvs/Linux x86_64)
Diffstat (limited to 'dev-tex')
-rw-r--r--dev-tex/luatex/ChangeLog6
-rw-r--r--dev-tex/luatex/files/poppler018.patch160
-rw-r--r--dev-tex/luatex/luatex-0.70.1.ebuild3
3 files changed, 167 insertions, 2 deletions
diff --git a/dev-tex/luatex/ChangeLog b/dev-tex/luatex/ChangeLog
index c57a9d7ead7c..465d21371046 100644
--- a/dev-tex/luatex/ChangeLog
+++ b/dev-tex/luatex/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-tex/luatex
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-tex/luatex/ChangeLog,v 1.96 2011/10/05 17:54:26 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-tex/luatex/ChangeLog,v 1.97 2011/10/05 18:10:27 aballier Exp $
+
+ 05 Oct 2011; Alexis Ballier <aballier@gentoo.org> +files/poppler018.patch,
+ luatex-0.70.1.ebuild:
+ fix build with latest poppler, by Martin von Gagern, bug #384875
05 Oct 2011; Alexis Ballier <aballier@gentoo.org> -luatex-0.63.0.ebuild,
-luatex-0.65.0.ebuild:
diff --git a/dev-tex/luatex/files/poppler018.patch b/dev-tex/luatex/files/poppler018.patch
new file mode 100644
index 000000000000..d21253853db7
--- /dev/null
+++ b/dev-tex/luatex/files/poppler018.patch
@@ -0,0 +1,160 @@
+by Martin von Gagern
+https://bugs.gentoo.org/show_bug.cgi?id=384875
+http://thread.gmane.org/gmane.comp.tex.luatex/2630
+
+--- luatex-beta-0.70.1/source/texk/web2c/luatexdir/lua/lepdflib.cc
++++ luatex-beta-0.70.1/source/texk/web2c/luatexdir/lua/lepdflib.cc
+@@ -89,7 +89,6 @@ new_poppler_userdata(AnnotBorder);
+ new_poppler_userdata(Annots);
+ new_poppler_userdata(Array);
+ new_poppler_userdata(Catalog);
+-new_poppler_userdata(EmbFile);
+ new_poppler_userdata(Dict);
+ //new_poppler_userdata(GooString);
+ new_poppler_userdata(LinkDest);
+@@ -393,7 +392,7 @@ static int m_Annot__gc(lua_State * L)
+ printf("\n===== Annot GC ===== uin=<%p>\n", uin);
+ #endif
+ if (uin->atype == ALLOC_LEPDF)
+- delete(Annot *) uin->d;
++ ((Annot *) uin->d)->decRefCnt();
+ return 0;
+ }
+
+@@ -408,34 +407,6 @@ static const struct luaL_Reg Annot_m[] =
+ };
+
+ //**********************************************************************
+-// AnnotBorderStyle
+-
+-m_poppler_get_DOUBLE(AnnotBorderStyle, getWidth);
+-
+-m_poppler__tostring(AnnotBorderStyle);
+-
+-static int m_Annots__gc(lua_State * L)
+-{
+- udstruct *uin;
+- uin = (udstruct *) luaL_checkudata(L, 1, M_Annots);
+- if (uin->pd != NULL && uin->pd->pc != uin->pc)
+- pdfdoc_changed_error(L);
+-#ifdef DEBUG
+- printf("\n===== Annots GC ===== uin=<%p>\n", uin);
+-#endif
+- if (uin->atype == ALLOC_LEPDF)
+- delete(Annots *) uin->d;
+- return 0;
+-}
+-
+-static const struct luaL_Reg AnnotBorderStyle_m[] = {
+- {"getWidth", m_AnnotBorderStyle_getWidth},
+- {"__tostring", m_AnnotBorderStyle__tostring},
+- {"__gc", m_Annots__gc},
+- {NULL, NULL} // sentinel
+-};
+-
+-//**********************************************************************
+ // Annots
+
+ m_poppler_get_INT(Annots, getNumAnnots);
+@@ -683,31 +654,6 @@ static int m_Catalog_findDest(lua_State
+
+ m_poppler_get_poppler(Catalog, Object, getDests);
+ m_poppler_get_INT(Catalog, numEmbeddedFiles);
+-
+-static int m_Catalog_embeddedFile(lua_State * L)
+-{
+- EmbFile *ef;
+- int i, len;
+- udstruct *uin, *uout;
+- uin = (udstruct *) luaL_checkudata(L, 1, M_Catalog);
+- if (uin->pd != NULL && uin->pd->pc != uin->pc)
+- pdfdoc_changed_error(L);
+- i = luaL_checkint(L, 2);
+- len = ((Catalog *) uin->d)->numEmbeddedFiles();
+- if (i > 0 && i <= len) {
+- ef = ((Catalog *) uin->d)->embeddedFile(i - 1);
+- if (ef != NULL) {
+- uout = new_EmbFile_userdata(L);
+- uout->d = ef;
+- uout->pc = uin->pc;
+- uout->pd = uin->pd;
+- } else
+- lua_pushnil(L);
+- } else
+- lua_pushnil(L);
+- return 1;
+-}
+-
+ m_poppler_get_INT(Catalog, numJS);
+
+ static int m_Catalog_getJS(lua_State * L)
+@@ -749,7 +695,6 @@ static const struct luaL_Reg Catalog_m[]
+ {"findDest", m_Catalog_findDest},
+ {"getDests", m_Catalog_getDests},
+ {"numEmbeddedFiles", m_Catalog_numEmbeddedFiles},
+- {"embeddedFile", m_Catalog_embeddedFile},
+ {"numJS", m_Catalog_numJS},
+ {"getJS", m_Catalog_getJS},
+ {"getOutline", m_Catalog_getOutline},
+@@ -759,49 +704,6 @@ static const struct luaL_Reg Catalog_m[]
+ };
+
+ //**********************************************************************
+-// EmbFile
+-
+-m_poppler_get_GOOSTRING(EmbFile, name);
+-m_poppler_get_GOOSTRING(EmbFile, description);
+-m_poppler_get_INT(EmbFile, size);
+-m_poppler_get_GOOSTRING(EmbFile, modDate);
+-m_poppler_get_GOOSTRING(EmbFile, createDate);
+-m_poppler_get_GOOSTRING(EmbFile, checksum);
+-m_poppler_get_GOOSTRING(EmbFile, mimeType);
+-
+-static int m_EmbFile_streamObject(lua_State * L)
+-{
+- udstruct *uin, *uout;
+- uin = (udstruct *) luaL_checkudata(L, 1, M_EmbFile);
+- if (uin->pd != NULL && uin->pd->pc != uin->pc)
+- pdfdoc_changed_error(L);
+- uout = new_Object_userdata(L);
+- uout->d = new Object(); // automatic init to type "none"
+- ((EmbFile *) uin->d)->streamObject().copy((Object *) uout->d);
+- uout->pc = uin->pc;
+- uout->pd = uin->pd;
+- return 1;
+-}
+-
+-m_poppler_get_BOOL(EmbFile, isOk);
+-
+-m_poppler__tostring(EmbFile);
+-
+-static const struct luaL_Reg EmbFile_m[] = {
+- {"name", m_EmbFile_name},
+- {"description", m_EmbFile_description},
+- {"size", m_EmbFile_size},
+- {"modDate", m_EmbFile_modDate},
+- {"createDate", m_EmbFile_createDate},
+- {"checksum", m_EmbFile_checksum},
+- {"mimeType", m_EmbFile_mimeType},
+- {"streamObject", m_EmbFile_streamObject},
+- {"isOk", m_EmbFile_isOk},
+- {"__tostring", m_EmbFile__tostring},
+- {NULL, NULL} // sentinel
+-};
+-
+-//**********************************************************************
+ // Dict
+
+ static int m_Dict_incRef(lua_State * L)
+@@ -2683,11 +2585,9 @@ int luaopen_epdf(lua_State * L)
+ {
+ register_meta(Annot);
+ // TODO register_meta(AnnotBorder);
+- register_meta(AnnotBorderStyle);
+ register_meta(Annots);
+ register_meta(Array);
+ register_meta(Catalog);
+- register_meta(EmbFile);
+ register_meta(Dict);
+ register_meta(GooString);
+ register_meta(LinkDest);
diff --git a/dev-tex/luatex/luatex-0.70.1.ebuild b/dev-tex/luatex/luatex-0.70.1.ebuild
index b155c86ef78a..96ab8181d756 100644
--- a/dev-tex/luatex/luatex-0.70.1.ebuild
+++ b/dev-tex/luatex/luatex-0.70.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-tex/luatex/luatex-0.70.1.ebuild,v 1.9 2011/10/04 17:48:09 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-tex/luatex/luatex-0.70.1.ebuild,v 1.10 2011/10/05 18:10:27 aballier Exp $
EAPI="2"
@@ -30,6 +30,7 @@ PRELIBS="libs/obsdcompat"
#kpathsea_extraconf="--disable-shared --disable-largefile"
src_prepare() {
+ has_version '>=app-text/poppler-0.18.0:0' && epatch "${FILESDIR}/poppler018.patch"
S="${S}/build-aux" elibtoolize --shallow
}