diff options
author | Andreas Hüttel <dilfridge@gentoo.org> | 2013-03-10 12:52:07 +0000 |
---|---|---|
committer | Andreas Hüttel <dilfridge@gentoo.org> | 2013-03-10 12:52:07 +0000 |
commit | 55d51be476f19460d6e50fe303a519bf6400d7ba (patch) | |
tree | a1eedeec0c870e448eb37999d5899a6d1a4e663b /dev-tex/luatex | |
parent | Revision bump: EAPI 5, fix stop function in initscript, wrt bug #449950 (diff) | |
download | historical-55d51be476f19460d6e50fe303a519bf6400d7ba.tar.gz historical-55d51be476f19460d6e50fe303a519bf6400d7ba.tar.bz2 historical-55d51be476f19460d6e50fe303a519bf6400d7ba.zip |
Add experimental poppler-0.22 patch
Package-Manager: portage-2.2.0_alpha166/cvs/Linux x86_64
Manifest-Sign-Key: 0xB6C5F7DE
Diffstat (limited to 'dev-tex/luatex')
-rw-r--r-- | dev-tex/luatex/ChangeLog | 8 | ||||
-rw-r--r-- | dev-tex/luatex/Manifest | 30 | ||||
-rw-r--r-- | dev-tex/luatex/files/poppler022.patch | 399 | ||||
-rw-r--r-- | dev-tex/luatex/luatex-0.70.1-r2.ebuild | 120 |
4 files changed, 542 insertions, 15 deletions
diff --git a/dev-tex/luatex/ChangeLog b/dev-tex/luatex/ChangeLog index 07194cad2a68..f425979e56b3 100644 --- a/dev-tex/luatex/ChangeLog +++ b/dev-tex/luatex/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-tex/luatex # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-tex/luatex/ChangeLog,v 1.119 2013/03/09 23:55:02 dilfridge Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-tex/luatex/ChangeLog,v 1.120 2013/03/10 12:51:59 dilfridge Exp $ + +*luatex-0.70.1-r2 (10 Mar 2013) + + 10 Mar 2013; Andreas K. Huettel <dilfridge@gentoo.org> + +files/poppler022.patch, +luatex-0.70.1-r2.ebuild: + Add experimental poppler-0.22 patch 09 Mar 2013; Andreas K. Huettel <dilfridge@gentoo.org> luatex-0.70.1.ebuild, luatex-0.70.1-r1.ebuild: diff --git a/dev-tex/luatex/Manifest b/dev-tex/luatex/Manifest index 97153bd098bc..7b11249b0dea 100644 --- a/dev-tex/luatex/Manifest +++ b/dev-tex/luatex/Manifest @@ -5,30 +5,32 @@ AUX includes.patch 923 SHA256 24093a082fe4040cb858ee8a742bebc61287b15d467093a030 AUX kpathsea2012.patch 944 SHA256 afb87b3c1cb9317666a7f45b6ecd6ad1078896d56b91fca7bfe6aa1c75ada495 SHA512 d72bce55c2494622fd15703f483c058245c96c8b2aa03d6fa02b112be827ddfe8a0013ee0c3710bb3e1313b631bf436f70ce99d383f11f4d2b51915752c59960 WHIRLPOOL 39c93138b416d79a55d1e5a464afe8363c9902abff50397d88bad623ec298e970490fd93dd8ed4d4c1a8e9788da300f265da550bf2ab6149b41351027998b107 AUX poppler018.patch 5041 SHA256 98317c41cab055cde67fd1eefa6c79fa8ec0ac2b36d93a094abe9eb8e834221c SHA512 e8b1660cb6674a8d2f68f29022d0ea33ca00795c8360a9656c5ad84776c86d3ab0a3c0895632957c5ed93fcab96e11e6bc7eb1a03df518122fcc3fa574b095ee WHIRLPOOL 0a14b110479acbe5d31a40642b53e0bcf03226acac19596f5dc885ff8a7a9c83895d8409044e96630bc66cf77ea915ce41f580a43dc48df423519dc0a9226335 AUX poppler020.patch 2909 SHA256 ffec5fd2e311841ee355deabfe13b37fdaea781608e95a2a5ab037d1cdd04ea8 SHA512 9517efce4ede9b792f27647ec4ed95d447572a9cbb3ee58e089b658ccc55bbb6a7843768b5962a4535ed77ab364e73f4fd1248e92a5a480ce30429303664f385 WHIRLPOOL db89a3e07ace603aea4abf71a97cd26f0b16c60b939f0c361db77d8af22c03b0003440e38164a0052258a8fbaceb283bac401a8254fa0b42e71179b715151f06 +AUX poppler022.patch 13128 SHA256 9c9348a1fda9183cd2d28a0f6f1b7599b53414b7aa43fd5cd5e21ef9d4759414 SHA512 8d1bd30712c9a9f1510ecc043cab2c6baac292100dbbed7183ef72ae9816d93aec90b2237f4193dfcd2c4e7a84a7ac804853da53c261e6c78aac64f34b1e1fdc WHIRLPOOL b8023bedf42f56e12f8ad2ac7bb542baf21d0c8e097779434a996d1318740428142e91e94579b6ca21e9d3c9470eed643c90fe10e8a32619b8fc7dd4fe23070e AUX remove-zlib-version-check.patch 938 SHA256 5c569bab0ccecc38e89f0bfeeaeabb921ce2fe38e17ecd0d7da11a75c0ed9d19 SHA512 1d19fb396af846a2ffa9ab7ffcf20d363956921cec92d6b03e499e26bac3802a8ca874b982c25ef99a560af48f0d85b0a36ac5786f7c3129abba3b8d9e38c780 WHIRLPOOL 2b06826e5f8bd2bc50b933a7636b5185bd21b44e2c5aad54e4e641bd39c74a29235928f3a6e36d551b679dac6ca2fa8c969447c520805807a487b6bd0b82c79c DIST luatex-beta-0.70.1-doc.tar.bz2 1048489 SHA256 4f1d24777725a606efbf5d7a59064245c46fb29b8066236c6b48fb423a595606 SHA512 eb4de91a80a6afccf5cca5cb05d5c1378a60ec35763e5ef5e9dbadaa2a276758a446e01d66e76a78e91442274778c10c73458b513af903e7221d90beb644afa9 WHIRLPOOL 97142a3a3c23d01f3b21963690f7362edf0c7f0de1ad77295361122a81c92459cb2ecd36baaea3588b7ad4f8b81c5dfa81d22df7a5529cb5b8b2b39fe6ce84be DIST luatex-beta-0.70.1.tar.bz2 8181155 SHA256 c641a4ba1535ede6ee8e2a958d8c4b436f5979c5be6f3f51d3dec5b4df6bb6ed SHA512 e04a9b96f349bf9036ef4c01746dee96ebf245cd4da6b719f546223e05cb98fb844e20878a64f80f42c77e220fac01ee2d97ad56939c1fb3af44faab53c603cb WHIRLPOOL 63dfdf182d3f1aadd6fc802e424b3791eda4df7eb8d707ad719d2ad0f97946b365316f6b9caed2362d5827280e9ddf2e750c8beeb61277dac72bffaed06a4fc9 DIST luatex-beta-0.74.0-doc.tar.bz2 990978 SHA256 e77aeb3dc7bc00cac080c483f0e9930b6d5479063dc58d014160ce327c2ef284 SHA512 bf446b9fbd6792cf84b29de10f0437e4ead84183a9a17bbd3538dd3b26a4ed68246149e5987228b95ef8ad9f9b662d54c1505191cc18d6c757ab59464bd586a2 WHIRLPOOL fbdef40858a360b032c242ab831c498e42e9460b0388f84ec34cdf8557028e1a8d70ab90f6878cfd14f762b664db527f0fc67b8cc0e8fe3ddc993a342fd9eae2 DIST luatex-beta-0.74.0-source.tar.bz2 10852125 SHA256 e8125e4f5d7ad90422a1c9e952a2f1c37daff485a4c40ade343a4011d872680e SHA512 e515347576d4385e3e42729e87370637786f77d5eaabe9aa92cf4ce291dda94908201864695d593ba29e349911c9e79967a768c32da14fca72c38b000689eb81 WHIRLPOOL 7cf3e3e5caa14f552b4102dfe5182ea77a7298154288a2fcd22501a4249e1e8b939eab1f1b6cb57bdce78903f976b0c09dd36b5c58e2611e76272118a19bbac5 EBUILD luatex-0.70.1-r1.ebuild 3705 SHA256 03cbd6c7d4afdff9a8ea08fbbee98445701a0db5f7917dd21ac1946b7fb1bff4 SHA512 0099c94f1a8db3ecad938ab2a8bcdd2176a2a3613dc8543a50e71a5ce75a50dcf0a65ce27d9887048e8acdb76f31b7e2b87d230259c734f81bb885831bce83a3 WHIRLPOOL a53f713bfab6e7a9b8254bc2fb17f4e081592f6ec1fb477b26862d677666700077673f6146b318f9854994c706516b9d95eabda19147874012703db27f20b41a +EBUILD luatex-0.70.1-r2.ebuild 3793 SHA256 8cebb4802e43e004895ed3318d0cc392645295e0d972fb80b028d37c77dfcbae SHA512 c7f9b5849a0127760b38bc56a518daec5ce09e60a8710027790ee6aa4949d1445545de10b527432244f837324215d274798f1b10185097e92291fd2692e4de5a WHIRLPOOL e8e1ea2af6c8807ba2464f2c3209f42804ef383f8698632b93f9dad2f7e24ca155768bdbb3d4e9b08a8a6d6c61177b0984777eddd22ad4b67eca4c16a726c75a EBUILD luatex-0.70.1.ebuild 3966 SHA256 674775f793ea19835793b0ac42091e9596025561a8c9554f8bdb61db8e195b7a SHA512 fc90683e04073b20b7433244b8f3154cfc1ff7586d2c3657708e0e57284851a7a48bd7add2062a4b22fe2760bbe2b8dab496748a4ea479543cf87eba96052487 WHIRLPOOL b15f53276a60add449297ce9b64e8048fc919d8f1e27fbd6c8da596969cc389369ce50f887b569151e929bfbb150ba880debd2f86b3328b515fd96463e906197 EBUILD luatex-0.74.0.ebuild 3089 SHA256 4142210d1218050e126c0c07e458eddae505dd7545b8cc2f49a70c72d4f83167 SHA512 5dfcf55516f0443df278095e36b8f918f0410e83fe30b88e6d99416f50fc213f904e5871336785aeb04a947b1011ead0fb3d29fee7f80023352834f1caf31196 WHIRLPOOL f4eda2133561db359958656134ffa6ebe8c533a61aba8eaff33c38d7669a70dc244b70596ffbbc5c8ce386a1a09d7523c8ca84c74b304b0f3f00d9f5c87bf661 -MISC ChangeLog 15038 SHA256 45733b96a0dbaba4edbca0df011dba40d4722e56db840ee92ec5700c08e4b338 SHA512 ac7b4b943ecede76950571c4f25ff68ad211af2021ab6c253fe68f586f484648112fc8a0c7f63119d6a66f5b8a7a41381103d6aee829036ec6444dec2dae3be0 WHIRLPOOL 039757d80338cd9d5c58b3a1aa9b3d831b417ae65e07cfe2461deba0ebecb2fb7223487e3d8ad69b707aa47fcbf4825fd85119effd06438005d7f641e11f5d84 +MISC ChangeLog 15220 SHA256 d6e780ea1dc0e8671b5afb8c605c8151c9dd3d9d9c9051fc4e5f8c24839c1ef5 SHA512 1eef5de3daf5c88b7db6bac9a4ea96dcf97c346d0f9df950114a54c4647e9f59d3c1f170ac73c2545e6d80884c45db1187642ac2aca413fc88939af188dcaeda WHIRLPOOL 0e60b56f819cffd9aceee10443a6643a7e57acd302e37f2a0f9736825947073ad4992ef718a883fb06272fc230f488e7c339845a459e9f4f76d5c0c359515d24 MISC metadata.xml 336 SHA256 126018a4822f911e52afe63656a10f2a7b0b938ea106f2a2caef00bdc18a845f SHA512 d998dbfe23cbb7f60db7b876e8ac3d039281ad9568aeb45a494774eb65468392523cdfc1b5cc8b621fc9a2f2f7f33dc3e351d1cf902f9ecf3f122534ef4767e0 WHIRLPOOL 3350c9964adc178cb58ee77019669fa51899cd71734ae1ff8f4646d1f9e141973c9f686f43e5995f1a7258d92bd173176dc0d9c3d8bcc09b96c37a0b7a0fb4a2 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iQIcBAEBCAAGBQJRO8wCAAoJENwGBM22xffesk0P/2TIpktA9lr2S+hFr5/Lthi4 -LTpJ3SwGNgY3kcNp0TBhuUeknCw/PICvWZOsHfejMsQTQpUuTXfrtSSG2bfQ074W -DT8yUmOgIqDMrLW+qKxBwG8Ii+sGcCsOz947hQ9QOKFNiqM8JX8/EvTEaMNZSduC -FWgYCJ1gPZ29yv1YujVvHkyYhgVCgBPwmvmKnBdL0GU8OIP+p5oguJ7zm9Acm6l2 -dCBqa3FRTogJSf2h1uHlghDpGwes4a67JMzoP3OUG4zmCwiiz+t486A4oVNxtsUA -97O1RsF5stYpdKzs8nomXKxTEJBRi8ARtclf/p+hemjI8N6f9waNZMYtXdxU9sL/ -WsdDEJGqs9eqGAeY0B1MWBwxfR8FATURbeNy9tEhqJ+PiGMa5Ex0Q+ksWe+osBYH -gLcKxzPw6LnRdbm2sNKi8HHeuiENebx7BQkasLhHXShNeOmyqvpc6MUwDNQfVaiw -fql4nTEJuNpS5gySHjzzLA3f9edRtbSSQrc3fFU9tX+ardTftZki4uoIsbr5jbEu -3tfsmsnm4V82R0OKNCe68ICjjIxpSRA3PZYA7pptD00v47qieIB9ieMIKAu4ViHG -J8S+niFdYml9tfuav3jpbustH4cNm0ibJhmtSQ1aAeF0rpY6UzBs3QhIkGCxllSc -Z74KsIPPrhT7vzaJLwIJ -=FeTC +iQIcBAEBCAAGBQJRPIIbAAoJENwGBM22xffe0bYQAI71Mr/4X04qF0xFq3DhofPJ +SNnHUOsyJoE7ILtakyNFmqGpqdAzNoLSITT9eJWxzaZLGUVH41Fjse2GyRCMxJbg +rDvN5amZ+jlqUSdDwywXhXbvERNoU9XIJFCOPk8XcdJ1oiswoTcZ15MU/l3A3+Qa +svAxO8c8uJDKEjzXhovlcXhOwbwLsM9WXjUE5F1aZdxMUjifJ1UHe/zoTdjed/7g +dh1Ue1pGculT+ENQx6U/qOK+UNCRsvof6z5ku4vMW0JT3s0OvsbOYstm2AZaD4qd +OnMayp3f46AkHvLWZSUcOKC05yK9XxFc61tvPurJZWN1tLdkGtUYGrdc3lsk9qOx +fHLPPOr/Yn61BVPeq2FP146GEsa/aLb8jOoUXvPb5D0vF/BIq7bxDpztx/oKC0gC +k/zjuaJHAsYox2A68wFR0Vyi2tbC2t7dptNQmhN8RGcJam75y7csoJH2nsvXsuem +RxuKySejtRGUA911QwQpQR82N9DCgUs5D/eiixzMAA8b5V/E6uLvVH7xOWXPQ8/K +Vp9uXU9IAUsEbmJH9k7vM/QeElSHRfn6q2J6hSlsnh/q3Uwa6FI/rtB57751EHkc +OyU21GP8fCpAXCQs83q2/HWgT3cptVE9WfRZz7CivB2iUd5ltoRpZg5rjKLvWkzo +ySTSmOUliYDEo600bODx +=frHM -----END PGP SIGNATURE----- diff --git a/dev-tex/luatex/files/poppler022.patch b/dev-tex/luatex/files/poppler022.patch new file mode 100644 index 000000000000..42178c71eca0 --- /dev/null +++ b/dev-tex/luatex/files/poppler022.patch @@ -0,0 +1,399 @@ +Patch updating lepdflib.cc to upstream revision 4415, which basically removes +part of the exported interface and thereby circumvents the changes in +poppler-0.20 -> 0.22. Experimental, rebased on our existing Gentoo patches +poppler-0.18.patch and poppler-0.20.patch. Here to solve bug 449538. + +diff -ruN luatex-beta-0.70.1.gentoo/source/texk/web2c/luatexdir/lua/lepdflib.cc +luatex-beta-0.70.1/source/texk/web2c/luatexdir/lua/lepdflib.cc +--- luatex-beta-0.70.1.gentoo/source/texk/web2c/luatexdir/lua/lepdflib.cc 2013-03-10 13:31:22.000000000 +0100 ++++ luatex-beta-0.70.1/source/texk/web2c/luatexdir/lua/lepdflib.cc 2013-03-10 13:47:24.000000000 +0100 +@@ -1,7 +1,7 @@ + /* lepdflib.cc + +- Copyright 2009-2011 Taco Hoekwater <taco@luatex.org> +- Copyright 2009-2011 Hartmut Henkel <hartmut@luatex.org> ++ Copyright 2009-2012 Taco Hoekwater <taco@luatex.org> ++ Copyright 2009-2012 Hartmut Henkel <hartmut@luatex.org> + + This file is part of LuaTeX. + +@@ -19,8 +19,8 @@ + with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */ + + static const char _svn_version[] = +- "$Id: poppler022.patch,v 1.1 2013/03/10 12:51:59 dilfridge Exp $ " +- "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.70.1/source/texk/web2c/luatexdir/lua/lepdflib.cc $"; ++ "$Id: poppler022.patch,v 1.1 2013/03/10 12:51:59 dilfridge Exp $ " ++ "$URL: https://foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/lepdflib.cc $"; + + #include "image/epdf.h" + +@@ -49,15 +49,13 @@ + //********************************************************************** + + #define M_Annot "Annot" +-#define M_AnnotBorder "AnnotBorder" +-#define M_AnnotBorderStyle "AnnotBorderStyle" + #define M_Annots "Annots" + #define M_Array "Array" + #define M_Catalog "Catalog" +-#define M_EmbFile "EmbFile" + #define M_Dict "Dict" + #define M_GooString "GooString" + #define M_LinkDest "LinkDest" ++#define M_Link "Link" + #define M_Links "Links" + #define M_Object "Object" + #define M_Page "Page" +@@ -65,8 +63,8 @@ + #define M_PDFRectangle "PDFRectangle" + #define M_Ref "Ref" + #define M_Stream "Stream" +-#define M_XRef "XRef" + #define M_XRefEntry "XRefEntry" ++#define M_XRef "XRef" + + //********************************************************************** + +@@ -84,13 +82,9 @@ + new_poppler_userdata(PDFDoc); + + new_poppler_userdata(Annot); +-new_poppler_userdata(AnnotBorder); +-//new_poppler_userdata(AnnotBorderStyle); +-new_poppler_userdata(Annots); + new_poppler_userdata(Array); + new_poppler_userdata(Catalog); + new_poppler_userdata(Dict); +-//new_poppler_userdata(GooString); + new_poppler_userdata(LinkDest); + new_poppler_userdata(Links); + new_poppler_userdata(Object); +@@ -99,7 +93,6 @@ + new_poppler_userdata(Ref); + new_poppler_userdata(Stream); + new_poppler_userdata(XRef); +-//new_poppler_userdata(XRefEntry); + + //********************************************************************** + +@@ -134,53 +127,6 @@ + return 1; // doc path + } + +-static int l_new_Annot(lua_State * L) +-{ +- udstruct *uxref, *udict, *ucatalog, *uref, *uout; +- uxref = (udstruct *) luaL_checkudata(L, 1, M_XRef); +- udict = (udstruct *) luaL_checkudata(L, 2, M_Dict); +- ucatalog = (udstruct *) luaL_checkudata(L, 3, M_Catalog); +- uref = (udstruct *) luaL_checkudata(L, 4, M_Ref); +- if (uxref->pd != ucatalog->pd || uxref->pd != udict->pd +- || uxref->pd != uref->pd) +- pdfdoc_differs_error(L); +- if ((uxref->pd != NULL && uxref->pd->pc != uxref->pc) || +- (ucatalog->pd != NULL && ucatalog->pd->pc != ucatalog->pc) || +- (udict->pd != NULL && udict->pd->pc != udict->pc) || +- (uref->pd != NULL && uref->pd->pc != uref->pc)) +- pdfdoc_changed_error(L); +- uout = new_Annot_userdata(L); +- uout->d = +- new Annot(udict->pd->doc, (Dict *) udict->d, +- (Object *) uref->d); +- uout->atype = ALLOC_LEPDF; +- uout->pc = uxref->pc; +- uout->pd = uxref->pd; +- return 1; +-} +- +-static int l_new_Annots(lua_State * L) +-{ +- udstruct *uxref, *ucatalog, *uannotsobj, *uout; +- uxref = (udstruct *) luaL_checkudata(L, 1, M_XRef); +- ucatalog = (udstruct *) luaL_checkudata(L, 2, M_Catalog); +- uannotsobj = (udstruct *) luaL_checkudata(L, 3, M_Object); +- if (uxref->pd != ucatalog->pd || uxref->pd != uannotsobj->pd) +- pdfdoc_differs_error(L); +- if ((uxref->pd != NULL && uxref->pd->pc != uxref->pc) +- || (ucatalog->pd != NULL && ucatalog->pd->pc != ucatalog->pc) +- || (uannotsobj->pd != NULL && uannotsobj->pd->pc != uannotsobj->pc)) +- pdfdoc_changed_error(L); +- uout = new_Annots_userdata(L); +- uout->d = +- new Annots(uannotsobj->pd->doc, +- (Object *) uannotsobj->d); +- uout->atype = ALLOC_LEPDF; +- uout->pc = uxref->pc; +- uout->pd = uxref->pd; +- return 1; +-} +- + static int l_new_Array(lua_State * L) + { + udstruct *uxref, *uout; +@@ -235,8 +181,6 @@ + + static const struct luaL_Reg epdflib[] = { + {"open", l_open_PDFDoc}, +- {"Annot", l_new_Annot}, +- {"Annots", l_new_Annots}, + {"Array", l_new_Array}, + {"Dict", l_new_Dict}, + {"Object", l_new_Object}, +@@ -359,12 +303,26 @@ + return 1; \ + } + ++#define m_poppler_check_string(in, function) \ ++static int m_##in##_##function(lua_State * L) \ ++{ \ ++ const char *s; \ ++ udstruct *uin; \ ++ uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \ ++ if (uin->pd != NULL && uin->pd->pc != uin->pc) \ ++ pdfdoc_changed_error(L); \ ++ s = luaL_checkstring(L, 2); \ ++ if (((in *) uin->d)->function((char *) s)) \ ++ lua_pushboolean(L, 1); \ ++ else \ ++ lua_pushboolean(L, 0); \ ++ return 1; \ ++} ++ + //********************************************************************** + // Annot + + m_poppler_get_BOOL(Annot, isOk); +-m_poppler_get_OBJECT(Annot, getAppearanceResDict); +-m_poppler_get_poppler(Annot, AnnotBorder, getBorder); + + static int m_Annot_match(lua_State * L) + { +@@ -398,8 +356,6 @@ + + static const struct luaL_Reg Annot_m[] = { + {"isOk", m_Annot_isOk}, +- {"getAppearanceResDict", m_Annot_getAppearanceResDict}, +- {"getBorder", m_Annot_getBorder}, + {"match", m_Annot_match}, + {"__tostring", m_Annot__tostring}, + {"__gc", m_Annot__gc}, +@@ -654,6 +610,7 @@ + + m_poppler_get_poppler(Catalog, Object, getDests); + m_poppler_get_INT(Catalog, numEmbeddedFiles); ++ + m_poppler_get_INT(Catalog, numJS); + + static int m_Catalog_getJS(lua_State * L) +@@ -770,20 +727,7 @@ + return 0; + } + +-static int m_Dict_is(lua_State * L) +-{ +- const char *s; +- udstruct *uin; +- uin = (udstruct *) luaL_checkudata(L, 1, M_Dict); +- if (uin->pd != NULL && uin->pd->pc != uin->pc) +- pdfdoc_changed_error(L); +- s = luaL_checkstring(L, 2); +- if (((Dict *) uin->d)->is((char *) s)) +- lua_pushboolean(L, 1); +- else +- lua_pushboolean(L, 0); +- return 1; +-} ++m_poppler_check_string(Dict, is); + + static int m_Dict_lookup(lua_State * L) + { +@@ -894,6 +838,8 @@ + return 1; + } + ++m_poppler_check_string(Dict, hasKey); ++ + m_poppler__tostring(Dict); + + static const struct luaL_Reg Dict_m[] = { +@@ -910,6 +856,7 @@ + {"getKey", m_Dict_getKey}, + {"getVal", m_Dict_getVal}, + {"getValNF", m_Dict_getValNF}, ++ {"hasKey", m_Dict_hasKey}, + {"__tostring", m_Dict__tostring}, + {NULL, NULL} // sentinel + }; +@@ -1017,9 +964,13 @@ + //********************************************************************** + // Links + ++m_poppler_get_INT(Links, getNumLinks); ++ + m_poppler__tostring(Links); + + static const struct luaL_Reg Links_m[] = { ++ {"getNumLinks", m_Links_getNumLinks}, ++ //{"getLink", m_Links_getLink}, + {"__tostring", m_Links__tostring}, + {NULL, NULL} // sentinel + }; +@@ -1925,28 +1876,6 @@ + m_poppler_get_poppler(Page, Dict, getResourceDict); + m_poppler_get_OBJECT(Page, getAnnots); + +-static int m_Page_getLinks(lua_State * L) +-{ +- Links *links; +- udstruct *uin, *ucat, *uout; +- uin = (udstruct *) luaL_checkudata(L, 1, M_Page); +- ucat = (udstruct *) luaL_checkudata(L, 2, M_Catalog); +- if (uin->pd != NULL && ucat->pd != NULL && uin->pd != ucat->pd) +- pdfdoc_differs_error(L); +- if ((uin->pd != NULL && uin->pd->pc != uin->pc) +- || (ucat->pd != NULL && ucat->pd->pc != ucat->pd->pc)) +- pdfdoc_changed_error(L); +- links = ((Page *) uin->d)->getLinks(); +- if (links != NULL) { +- uout = new_Links_userdata(L); +- uout->d = links; +- uout->pc = uin->pc; +- uout->pd = uin->pd; +- } else +- lua_pushnil(L); +- return 1; +-} +- + m_poppler_get_OBJECT(Page, getContents); + + m_poppler__tostring(Page); +@@ -1973,7 +1902,6 @@ + {"getSeparationInfo", m_Page_getSeparationInfo}, + {"getResourceDict", m_Page_getResourceDict}, + {"getAnnots", m_Page_getAnnots}, +- {"getLinks", m_Page_getLinks}, + {"getContents", m_Page_getContents}, + {"__tostring", m_Page__tostring}, + {NULL, NULL} // sentinel +@@ -2158,19 +2086,23 @@ + + static int m_PDFDoc_getLinks(lua_State * L) + { +- int i; ++ int i, pages; + Links *links; + udstruct *uin, *uout; + uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc); + if (uin->pd != NULL && uin->pd->pc != uin->pc) + pdfdoc_changed_error(L); + i = luaL_checkint(L, 2); +- links = ((PdfDocument *) uin->d)->doc->getLinks(i); +- if (links != NULL) { +- uout = new_Links_userdata(L); +- uout->d = links; +- uout->pc = uin->pc; +- uout->pd = uin->pd; ++ pages = ((PdfDocument *) uin->d)->doc->getNumPages(); ++ if (i > 0 && i <= pages) { ++ links = ((PdfDocument *) uin->d)->doc->getLinks(i); ++ if (links != NULL) { ++ uout = new_Links_userdata(L); ++ uout->d = links; ++ uout->pc = uin->pc; ++ uout->pd = uin->pd; ++ } else ++ lua_pushnil(L); + } else + lua_pushnil(L); + return 1; +@@ -2249,6 +2181,8 @@ + m_PDFDoc_INT(getPDFMajorVersion); + m_PDFDoc_INT(getPDFMinorVersion); + ++m_poppler__tostring(PDFDoc); ++ + static int m_PDFDoc__gc(lua_State * L) + { + udstruct *uin; +@@ -2292,6 +2226,7 @@ + {"getDocInfoNF", m_PDFDoc_getDocInfoNF}, + {"getPDFMajorVersion", m_PDFDoc_getPDFMajorVersion}, + {"getPDFMinorVersion", m_PDFDoc_getPDFMinorVersion}, ++ {"__tostring", m_PDFDoc__tostring}, + {"__gc", m_PDFDoc__gc}, // finalizer + {NULL, NULL} // sentinel + }; +@@ -2437,11 +2372,6 @@ + "Flate", "JBIG2", "JPX", "Weird", NULL + }; + +-#if 0 +-static const char *StreamColorSpaceModeNames[] = +- { "CSNone", "CSDeviceGray", "CSDeviceRGB", "CSDeviceCMYK", NULL }; +-#endif +- + m_poppler_get_INT(Stream, getKind); + + static int m_Stream_getKindName(lua_State * L) +@@ -2527,11 +2457,26 @@ + m_poppler_get_OBJECT(XRef, getDocInfo); + m_poppler_get_OBJECT(XRef, getDocInfoNF); + m_poppler_get_INT(XRef, getNumObjects); +-// getLastXRefPos + m_poppler_get_INT(XRef, getRootNum); + m_poppler_get_INT(XRef, getRootGen); + // getStreamEnd +-// getEntry ++ ++static int m_XRef_getNumEntry(lua_State * L) ++{ ++ int i, offset; ++ udstruct *uin; ++ uin = (udstruct *) luaL_checkudata(L, 1, M_XRef); ++ if (uin->pd != NULL && uin->pd->pc != uin->pc) ++ pdfdoc_changed_error(L); ++ offset = luaL_checkint(L, 2); ++ i = ((XRef *) uin->d)->getNumEntry(offset); ++ if (i >= 0) ++ lua_pushinteger(L, i); ++ else ++ lua_pushnil(L); ++ return 1; ++} ++ + m_poppler_get_poppler(XRef, Object, getTrailerDict); + + m_poppler__tostring(XRef); +@@ -2553,10 +2498,10 @@ + {"getDocInfo", m_XRef_getDocInfo}, + {"getDocInfoNF", m_XRef_getDocInfoNF}, + {"getNumObjects", m_XRef_getNumObjects}, +- // + {"getRootNum", m_XRef_getRootNum}, + {"getRootGen", m_XRef_getRootGen}, +- // ++ // {"getStreamEnd", m_XRef_getStreamEnd}, ++ {"getNumEntry", m_XRef_getNumEntry}, + {"getTrailerDict", m_XRef_getTrailerDict}, + {"__tostring", m_XRef__tostring}, + {NULL, NULL} // sentinel +@@ -2565,7 +2510,10 @@ + //********************************************************************** + // XRefEntry + ++m_poppler__tostring(XRefEntry); ++ + static const struct luaL_Reg XRefEntry_m[] = { ++ {"__tostring", m_XRefEntry__tostring}, + {NULL, NULL} // sentinel + }; + +@@ -2582,7 +2530,6 @@ + int luaopen_epdf(lua_State * L) + { + register_meta(Annot); +- // TODO register_meta(AnnotBorder); + register_meta(Annots); + register_meta(Array); + register_meta(Catalog); diff --git a/dev-tex/luatex/luatex-0.70.1-r2.ebuild b/dev-tex/luatex/luatex-0.70.1-r2.ebuild new file mode 100644 index 000000000000..9531423c7937 --- /dev/null +++ b/dev-tex/luatex/luatex-0.70.1-r2.ebuild @@ -0,0 +1,120 @@ +# Copyright 1999-2013 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-r2.ebuild,v 1.1 2013/03/10 12:51:59 dilfridge Exp $ + +EAPI=4 + +inherit libtool eutils texlive-common + +DESCRIPTION="An extended version of pdfTeX using Lua as an embedded scripting language." +HOMEPAGE="http://www.luatex.org/" +SRC_URI="http://foundry.supelec.fr/gf/download/frsrelease/392/1730/${PN}-beta-${PV}.tar.bz2 + http://foundry.supelec.fr/gf/download/frsrelease/392/1732/${PN}-beta-${PV}-doc.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="doc" + +RDEPEND="dev-libs/zziplib + >=media-libs/libpng-1.4 + app-text/poppler[xpdf-headers(+)] + sys-libs/zlib + >=dev-libs/kpathsea-6.0.1_p20110627" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +S="${WORKDIR}/${PN}-beta-${PV}/source" +PRELIBS="libs/obsdcompat" +#texk/kpathsea" +#kpathsea_extraconf="--disable-shared --disable-largefile" + +src_prepare() { + has_version '>=app-text/poppler-0.18.0:0' && epatch "${FILESDIR}/poppler018.patch" + has_version '>=app-text/poppler-0.20.0:0' && epatch "${FILESDIR}/poppler020.patch" + has_version '>=app-text/poppler-0.22.0:0' && epatch "${FILESDIR}/poppler022.patch" + epatch "${FILESDIR}/kpathsea2012.patch" \ + "${FILESDIR}/remove-zlib-version-check.patch" + S="${S}/build-aux" elibtoolize --shallow +} + +src_configure() { + # Too many regexps use A-Z a-z constructs, what causes problems with locales + # that don't have the same alphabetical order than ascii. Bug #244619 + # So we set LC_ALL to C in order to avoid problems. + export LC_ALL=C + + local myconf + myconf="" + #has_version '>=app-text/texlive-core-2009' && myconf="--with-system-kpathsea" + + cd "${S}/texk/web2c" + econf \ + --disable-cxx-runtime-hack \ + --disable-all-pkgs \ + --disable-mp \ + --disable-ptex \ + --disable-tex \ + --disable-mf \ + --disable-largefile \ + --disable-ipc \ + --disable-shared \ + --enable-luatex \ + --enable-dump-share \ + --without-mf-x-toolkit \ + --without-x \ + --with-system-kpathsea \ + --with-kpathsea-includes="${EPREFIX}"/usr/include \ + --with-system-gd \ + --with-system-libpng \ + --with-system-teckit \ + --with-system-zlib \ + --with-system-t1lib \ + --with-system-xpdf \ + --with-system-poppler \ + --with-system-zziplib \ + --disable-multiplatform \ + + for i in ${PRELIBS} ; do + einfo "Configuring $i" + local j=$(basename $i)_extraconf + local myconf + eval myconf=\${$j} + cd "${S}/${i}" + econf ${myconf} + done +} + +src_compile() { + texk/web2c/luatexdir/getluatexsvnversion.sh || die + for i in ${PRELIBS} ; do + cd "${S}/${i}" + emake || die "failed to build ${i}" + done + cd "${WORKDIR}/${PN}-beta-${PV}/source/texk/web2c" + emake luatex || die "failed to build luatex" +} + +src_install() { + cd "${WORKDIR}/${PN}-beta-${PV}/source/texk/web2c" + emake DESTDIR="${D}" bin_PROGRAMS="luatex" SUBDIRS="" nodist_man_MANS="" \ + install-exec-am || die + + dodoc "${WORKDIR}/${PN}-beta-${PV}/README" || die + doman "${WORKDIR}/texmf/doc/man/man1/"*.1 || die + if use doc ; then + dodoc "${WORKDIR}/${PN}-beta-${PV}/manual/"*.pdf || die + dodoc "${WORKDIR}/texmf/doc/man/man1/"*.pdf || die + fi +} + +pkg_postinst() { + if ! has_version '>=dev-texlive/texlive-basic-2008' ; then + elog "Note that this package does not install many files, mainly just the" + elog "${PN} executable, which needs other files in order to be" + elog "useful. Please consider installing a recent TeX distribution such as" + elog "TeX Live 2008 or later to take advantage of the full power of" + elog "${PN} ." + fi + efmtutil-sys +} |