diff options
author | Alexandre Buisse <nattfodd@gentoo.org> | 2006-02-18 17:26:32 +0000 |
---|---|---|
committer | Alexandre Buisse <nattfodd@gentoo.org> | 2006-02-18 17:26:32 +0000 |
commit | 751eec04be1791929902e3dccbfbd6fa05cbb3fe (patch) | |
tree | b9b734344a832d645bdf637457809ce32bd165ea /app-text | |
parent | 0.7 version bump. virtual/libpcap -> net-libs/libpcap. (diff) | |
download | historical-751eec04be1791929902e3dccbfbd6fa05cbb3fe.tar.gz historical-751eec04be1791929902e3dccbfbd6fa05cbb3fe.tar.bz2 historical-751eec04be1791929902e3dccbfbd6fa05cbb3fe.zip |
Corrects most recent tetex-2 issues.
Package-Manager: portage-2.1_pre4-r1
Diffstat (limited to 'app-text')
-rw-r--r-- | app-text/ptex/ChangeLog | 12 | ||||
-rw-r--r-- | app-text/ptex/Manifest | 75 | ||||
-rw-r--r-- | app-text/ptex/files/digest-ptex-3.1.5-r1 | 30 | ||||
-rw-r--r-- | app-text/ptex/files/ptex-3.1.5-dvi-draw-conflicting-types.patch | 11 | ||||
-rw-r--r-- | app-text/ptex/files/ptex-3.1.5-flex-unput.patch | 12 | ||||
-rw-r--r-- | app-text/ptex/files/xpdf-2.02pl1-CAN-2005-3191-3.patch | 252 | ||||
-rw-r--r-- | app-text/ptex/ptex-3.1.5-r1.ebuild | 136 |
7 files changed, 517 insertions, 11 deletions
diff --git a/app-text/ptex/ChangeLog b/app-text/ptex/ChangeLog index b1507b9660b4..7c8a3a0ff4c8 100644 --- a/app-text/ptex/ChangeLog +++ b/app-text/ptex/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-text/ptex -# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/ptex/ChangeLog,v 1.47 2005/09/17 15:25:26 kloeri Exp $ +# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/ptex/ChangeLog,v 1.48 2006/02/18 17:26:32 nattfodd Exp $ + +*ptex-3.1.5-r1 (18 Feb 2006) + + 18 Feb 2006; Alexandre Buisse <nattfodd@gentoo.org> + +files/xpdf-2.02pl1-CAN-2005-3191-3.patch, + +files/ptex-3.1.5-dvi-draw-conflicting-types.patch, + +files/ptex-3.1.5-flex-unput.patch, +ptex-3.1.5-r1.ebuild: + Backport recent tetex-2 patches (from bugs #115775, #122365 and #118264). *ptex-3.1.8.1_p20050418 (19 Apr 2005) diff --git a/app-text/ptex/Manifest b/app-text/ptex/Manifest index 4e7d79bafbc7..6865409be6c7 100644 --- a/app-text/ptex/Manifest +++ b/app-text/ptex/Manifest @@ -1,31 +1,88 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 d2fd604b88f163116f23670ca84b1815 metadata.xml 531 -MD5 6159b18f18d59387df77cb2813192347 ptex-3.1.4-r2.ebuild 3526 -MD5 3f169da4e4346adecedf12050b56a97e ptex-3.1.5.ebuild 3535 -MD5 f4dacad25285fd71b633da7dbbe28991 ptex-3.1.8.1.ebuild 4986 -MD5 dd71ce3866d7de096837448e9b2fbdda ptex-3.1.8.1_p20050418.ebuild 4952 -MD5 04a7a7574d57a564ba46f29d00fedf20 ChangeLog 6873 +MD5 a17dfeaa6b6c06aff800a380fb738c7a ChangeLog 7196 +RMD160 fd2b265d8ff88a4ab00c2538866036a8ae5a7f68 ChangeLog 7196 +SHA256 68a93a43c7d257122e500a8206c1e850fe46c51d25875e128a74aeb1bd4e93f5 ChangeLog 7196 MD5 02883507686a831b844da77bd0fb2b3a files/10texmf-ptex.cnf 722 +RMD160 073ae8409ccc2e65d2b8e72f87b9a2c843b8f029 files/10texmf-ptex.cnf 722 +SHA256 0acf11028fd530df0fded16c89817875e5c4d1823374af3bc3eedcf73f495453 files/10texmf-ptex.cnf 722 MD5 4d1956517ccb98e9be75cdf83f9b7ac0 files/20fmtutil-platex.cnf 121 +RMD160 7eae2f8b4beea900940f9338deb99d1ec5e35194 files/20fmtutil-platex.cnf 121 +SHA256 a278f047e12fc573564a09519fb94c7422a8e523811bf509c2132df2d378d1c3 files/20fmtutil-platex.cnf 121 MD5 a1829990d625a3607cc38b99a27b9574 files/20texmf-cmap.cnf 65 +RMD160 5b31cfebf651aeeeb461c8a9d78602afba5e2fee files/20texmf-cmap.cnf 65 +SHA256 c25e39dee0ecece05176b72d6cb56be847fbe2fd803e352d64efe64dc442e7de files/20texmf-cmap.cnf 65 MD5 d4d469b2a8b88c4d97440979fd5c2a41 files/20updmap-ja.cfg 43 +RMD160 cc29fa63aa16d39607542e772e5f447359449083 files/20updmap-ja.cfg 43 +SHA256 711f6918b1a29b51ee1645b05b8ce4527f0dfefe57ea0b228f8456c77f3fcd5a files/20updmap-ja.cfg 43 MD5 424cf5900fe6b1af9867cd2e8c952292 files/digest-ptex-3.1.4-r2 718 +RMD160 3793db7ab3f90986bd3c45af72097e872fd879c5 files/digest-ptex-3.1.4-r2 718 +SHA256 71d98faed33745954ae151b2990210c237a1d3b16f1b5daa8b0f74bb31c02bb8 files/digest-ptex-3.1.4-r2 718 MD5 3e6bd16aa42a2c0f77d9ea14dabb96f3 files/digest-ptex-3.1.5 718 +RMD160 e589ab0f8ec1b5ca3bb1b966087d724b317832a1 files/digest-ptex-3.1.5 718 +SHA256 f2f325f0af39078cddff0abeba35191a67ace8e6678b69a83ef9e51ecbdc2032 files/digest-ptex-3.1.5 718 +MD5 390ef8723583f2619962182606b60930 files/digest-ptex-3.1.5-r1 2614 +RMD160 7b7f46e695d6aba95b4a9ba36c2b339ea3a8eb5c files/digest-ptex-3.1.5-r1 2614 +SHA256 29ad57293e360601b00772c175562ee8c13d2d996b1f23140539521f0ccb7198 files/digest-ptex-3.1.5-r1 2614 MD5 661aaa7be66ace377a17bb300e99b508 files/digest-ptex-3.1.8.1 271 +RMD160 69c8e3c9a0f07a9927dedd592d40bf6bf2277195 files/digest-ptex-3.1.8.1 271 +SHA256 c9d1cfb603e46dc699bc1815fa496e4643c09bace19e31abb0f720023a92897f files/digest-ptex-3.1.8.1 271 MD5 8649a146af71c946a9a5acd6495d1ec6 files/digest-ptex-3.1.8.1_p20050418 271 +RMD160 c187c11862977deb9f6e1dfeb7b94cc11394d057 files/digest-ptex-3.1.8.1_p20050418 271 +SHA256 562decf1773e4bb7118b6d627991451d3297bbd0181c10bd49e3c8e9ec99d1dc files/digest-ptex-3.1.8.1_p20050418 271 MD5 d15f2d9ab04bcfa15c3e737f106d1625 files/psfonts-ja.map 1158 +RMD160 3e1953fd9d660bba85030ccac2e3aa7de3d68d99 files/psfonts-ja.map 1158 +SHA256 fa053893be3695cd0b97a0390cfb64d882899b18b56a8552a1d6ca8c2e16ca5c files/psfonts-ja.map 1158 +MD5 912aea791088e715e491a7ccaa7eb25f files/ptex-3.1.5-dvi-draw-conflicting-types.patch 410 +RMD160 8417f8ee01a46fe1c066d7fd2cd20c7f33ab0a52 files/ptex-3.1.5-dvi-draw-conflicting-types.patch 410 +SHA256 5f6a525bb57f25a722178716e142a6555058903be0ce3944263b424896941126 files/ptex-3.1.5-dvi-draw-conflicting-types.patch 410 +MD5 56e1062f89330aad64afa0208ea09b30 files/ptex-3.1.5-flex-unput.patch 498 +RMD160 834d9c73bcbd2cecedd51c31b38e742e6919b31f files/ptex-3.1.5-flex-unput.patch 498 +SHA256 40305736699ab42b68203b43483f669aee57b98dad5ee60eb05d19d8e5d7652d files/ptex-3.1.5-flex-unput.patch 498 MD5 77107ec8ba31c93b0e1bc35a9e4c9c4b files/xdvizilla.patch 912 +RMD160 79bf98f5b05cdc4e99147809e1ec6895e8843097 files/xdvizilla.patch 912 +SHA256 cb7f0ca4758cd20d5a0a819dd87caa8f2d1df64aaac458e13b4bb3c43deb5204 files/xdvizilla.patch 912 +MD5 34a6a462f630bab703319681b675a92d files/xpdf-2.02pl1-CAN-2005-3191-3.patch 7060 +RMD160 3aa0387ac8bb005193bf4d5e190c8e43b2729a09 files/xpdf-2.02pl1-CAN-2005-3191-3.patch 7060 +SHA256 d96036af3be0bab42b42abad600c7ef49f62b079b3deaa4108c999269be0c6f3 files/xpdf-2.02pl1-CAN-2005-3191-3.patch 7060 MD5 5d40ba9d885af84bcc917ad17e2bf8e0 files/xpdf-3.00pl2-CAN-2004-1125.patch 1136 +RMD160 f11de185e9f7893b0bfb744db01739af13b5741e files/xpdf-3.00pl2-CAN-2004-1125.patch 1136 +SHA256 47dc9849b67313c7c7b6545ea8df4a9f97ceeffe818eb1a8e5eeeb3339bcb9ea files/xpdf-3.00pl2-CAN-2004-1125.patch 1136 MD5 c32a612ce419b9930ff273cf382558bf files/xpdf-3.00pl3-CAN-2005-0064.patch 346 +RMD160 7fb5521b698589245f9e0ccea753a6d4e30badf8 files/xpdf-3.00pl3-CAN-2005-0064.patch 346 +SHA256 c51f769fcac31cbb95dd3124deb1b658e0874a3a90fe17d9752c9be937773621 files/xpdf-3.00pl3-CAN-2005-0064.patch 346 MD5 87d20c86d1451638e4b7adc2f7ac8067 files/xpdf-CESA-2004-007-xpdf2-newer.diff 2718 +RMD160 0cf60c817b9868896c7d6fa678978c2c1244618c files/xpdf-CESA-2004-007-xpdf2-newer.diff 2718 +SHA256 7df6d659edd6c79f89e0b2a54c65b9ae27dca57c00e7650fd3ae6273e7dc2ed1 files/xpdf-CESA-2004-007-xpdf2-newer.diff 2718 MD5 2fce5bedd61300fad1566a41f991a782 files/xpdf-goo-sizet.patch 1424 +RMD160 c52769d3ac95b372593e22d46ad4742dc44e47d3 files/xpdf-goo-sizet.patch 1424 +SHA256 d1a75bcb1764383ee1f5bd1c2d678cdadc69cd123069657f1dced0825964cbb0 files/xpdf-goo-sizet.patch 1424 MD5 362296e34a1a04a6e5e2a7d9e97547c6 files/xpdf2-underflow.patch 2363 +RMD160 110c32f97715d3eb0bcdf19db41a0ac7465d75d1 files/xpdf2-underflow.patch 2363 +SHA256 88a06ef62c423805a0fed011db59e9c170a2482c29f0359dec8ae962395a28ba files/xpdf2-underflow.patch 2363 +MD5 d2fd604b88f163116f23670ca84b1815 metadata.xml 531 +RMD160 76adc41dc7e5284da7d10009a47e171cf28102ca metadata.xml 531 +SHA256 aaf1eb228418bdd12af85cf35ec13f9064a9832ce8b094cc5e590258688be156 metadata.xml 531 +MD5 6159b18f18d59387df77cb2813192347 ptex-3.1.4-r2.ebuild 3526 +RMD160 7ecf8076c9c555d2208ece665793bce7066b72a8 ptex-3.1.4-r2.ebuild 3526 +SHA256 4c6c3450546b87465bf516ddfdd2f7d2f012af298f0408d18a233511a1aa3420 ptex-3.1.4-r2.ebuild 3526 +MD5 0373a46f414821fc0086915cb323566b ptex-3.1.5-r1.ebuild 3847 +RMD160 ce5f40befb2fc8fddb6839f0db5c351e64a252d7 ptex-3.1.5-r1.ebuild 3847 +SHA256 177bfe4133266f328f68cffd187a0fb10bba3be28bc0f284a7db5a2c926692fc ptex-3.1.5-r1.ebuild 3847 +MD5 3f169da4e4346adecedf12050b56a97e ptex-3.1.5.ebuild 3535 +RMD160 8ab21b52a2028a2228479187c9eac2cc0ce405ac ptex-3.1.5.ebuild 3535 +SHA256 c857463ab3ca56566329d806c3011be73eec7a0c7c6466f1684e91f4142f18d5 ptex-3.1.5.ebuild 3535 +MD5 f4dacad25285fd71b633da7dbbe28991 ptex-3.1.8.1.ebuild 4986 +RMD160 1d513727a21b9d6108f525eb8988acbc802907b3 ptex-3.1.8.1.ebuild 4986 +SHA256 323203f550cf95d6f4a0f76cd4e056061f797d1c90d59cfd41ce23954b932ba0 ptex-3.1.8.1.ebuild 4986 +MD5 dd71ce3866d7de096837448e9b2fbdda ptex-3.1.8.1_p20050418.ebuild 4952 +RMD160 95eca2d6ca7f6e710712606d82be3e89bb50665d ptex-3.1.8.1_p20050418.ebuild 4952 +SHA256 fd33baa98123cac8d07c0b143dd790bb1b4fcff751fa867664485475ce4a96a8 ptex-3.1.8.1_p20050418.ebuild 4952 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) -iD8DBQFDLDV/Kf2g/qXtneoRAsWDAKCDvlTMR/hmq7vpmRhM3aW8bpkLcQCeI52k -S7HOoiNS3h2cU7CWcqw5PWA= -=8N5l +iD8DBQFD92cAwx9vvAARv2sRAiYJAJ9upT8cc6I60T61LwbsceXXdFGovACg2zRp +StEqraFALkXR0kgekV54qD4= +=SeWb -----END PGP SIGNATURE----- diff --git a/app-text/ptex/files/digest-ptex-3.1.5-r1 b/app-text/ptex/files/digest-ptex-3.1.5-r1 new file mode 100644 index 000000000000..6392d9628914 --- /dev/null +++ b/app-text/ptex/files/digest-ptex-3.1.5-r1 @@ -0,0 +1,30 @@ +MD5 cf7c5744c27d585384e414cf3e5ca4cd dvipsk-jpatch-p1.6a.tar.gz 29428 +RMD160 c6d071e010a8182974fcf7428cc1ed41bb143fad dvipsk-jpatch-p1.6a.tar.gz 29428 +SHA256 b0ab0defff380c94daa6f9e27d3d1306d58ecd088621aa4af9548dc1f77772d1 dvipsk-jpatch-p1.6a.tar.gz 29428 +MD5 540af0eb4e6e5eb942e14bef0f8c1e8b ptex-src-3.1.5.tar.gz 122201 +RMD160 b3f02418917f97c3c082f524b8a50447e601db72 ptex-src-3.1.5.tar.gz 122201 +SHA256 67e2ef7de02938cf480d213b01af467753bb5f87eb0662cdb38f6a8a2cd7dedd ptex-src-3.1.5.tar.gz 122201 +MD5 e47a49328a369781d94c40355047ffc6 ptex-texmf-2.3.tar.gz 1866282 +RMD160 004291050ad6d726fca6a6a371e30341d4658331 ptex-texmf-2.3.tar.gz 1866282 +SHA256 b4ab3c8abd5a4b935d0a5b2738fd691012c01567190b8551f3b0ec0dbc04de34 ptex-texmf-2.3.tar.gz 1866282 +MD5 0a0ba30552331663f496d41b8ca2a299 tetex-2.0.2-gentoo.tar.gz 1704 +RMD160 f32700bfe389c9c15a72344770c7abe2ee048c38 tetex-2.0.2-gentoo.tar.gz 1704 +SHA256 331ac072cf658c22b983b16439dc0e6f95cac0cc95f4d993fcb4bad883ea2622 tetex-2.0.2-gentoo.tar.gz 1704 +MD5 f1ab77fcd0bbc54415b88ce7d6ad557c tetex-src-2.0.2-xdvik-y1-j1.19.patch.gz 10936 +RMD160 05380fc151de8eca72c6bb3d332e9ec2474a0695 tetex-src-2.0.2-xdvik-y1-j1.19.patch.gz 10936 +SHA256 e4047ce7e637a5c2db0228508254af24cb80cfbf345479d0fd2b11039d1b2efb tetex-src-2.0.2-xdvik-y1-j1.19.patch.gz 10936 +MD5 291f5bd0cb68f2bcfdc289cdff24dd84 tetex-src-2.0.2-xdvik-y1.patch.gz 16294 +RMD160 6bf7b57b7217bb199114c284d07c22ad72843d90 tetex-src-2.0.2-xdvik-y1.patch.gz 16294 +SHA256 ad02e7b0dcec180275106ee9d5694bff637c05caf93b1c87a2539845c2ea2075 tetex-src-2.0.2-xdvik-y1.patch.gz 16294 +MD5 a16f6bba227d55e79aeee46fbbd82d28 tetex-src-2.0.2.tar.gz 11745933 +RMD160 9bbb274c0598547bcecb00ff48e459d41bc65e93 tetex-src-2.0.2.tar.gz 11745933 +SHA256 9f8a35b3abd293d71fa6785a4c3e6aa4fdaeff03ae71863ad5ec9e1a9fc087f5 tetex-src-2.0.2.tar.gz 11745933 +MD5 d3bdb96f9077e43b2115d3cc471743b3 tetex-texmf-2.0.2.tar.gz 52424280 +RMD160 ff88622c2d97416a4f67fbdf7a00d837af35d94e tetex-texmf-2.0.2.tar.gz 52424280 +SHA256 0d5c4adb7a72a33fffa9eeb5e3137e0094c912eafc45e358ca20cd9257f79f0d tetex-texmf-2.0.2.tar.gz 52424280 +MD5 40d4b2c5582eccbee4b6ec692c3cc253 tetex-texmfsrc-2.0.2.tar.gz 22909537 +RMD160 bc444152b2f45cf3c0a743f6416134e31e8635b4 tetex-texmfsrc-2.0.2.tar.gz 22909537 +SHA256 9348f10c9e95fdb5e9a9702956cfce38be42c48621fcfc6c9ae192363e08d267 tetex-texmfsrc-2.0.2.tar.gz 22909537 +MD5 9ce0615764079502f3b76692127a068a xdvik-22.40y1-j1.21.patch.gz 166908 +RMD160 4f84b62c418b2a7d3d07b7f9d60420ccbbfb479e xdvik-22.40y1-j1.21.patch.gz 166908 +SHA256 d7cd93e1b32e82dab39fbabdc0a67d0a06f291a854e82a29a1ee97f9f61bcf8f xdvik-22.40y1-j1.21.patch.gz 166908 diff --git a/app-text/ptex/files/ptex-3.1.5-dvi-draw-conflicting-types.patch b/app-text/ptex/files/ptex-3.1.5-dvi-draw-conflicting-types.patch new file mode 100644 index 000000000000..c38a8e01bc71 --- /dev/null +++ b/app-text/ptex/files/ptex-3.1.5-dvi-draw-conflicting-types.patch @@ -0,0 +1,11 @@ +--- tetex-src-2.0.2.old/texk/xdvik/dvi-draw.c 2003-01-25 05:16:33.000000000 -0500 ++++ tetex-src-2.0.2/texk/xdvik/dvi-draw.c 2006-01-08 04:52:44.000000000 -0500 +@@ -518,7 +518,7 @@ + + #endif /* T1LIB */ + +-extern void home(); /* from events.c */ ++extern void home(wide_bool scrl); /* from events.c */ + extern int fallbacktfm; /* from tfmload.c */ + + static struct frame frame0; /* dummy head of list */ diff --git a/app-text/ptex/files/ptex-3.1.5-flex-unput.patch b/app-text/ptex/files/ptex-3.1.5-flex-unput.patch new file mode 100644 index 000000000000..57a037e09ba6 --- /dev/null +++ b/app-text/ptex/files/ptex-3.1.5-flex-unput.patch @@ -0,0 +1,12 @@ +diff -uNr tetex-src-2.0.2.old/texk/web2c/omegafonts/Makefile.in tetex-src-2.0.2/texk/web2c/omegafonts/Makefile.in +--- tetex-src-2.0.2.old/texk/web2c/omegafonts/Makefile.in 2001-11-10 14:42:37.000000000 +0100 ++++ tetex-src-2.0.2/texk/web2c/omegafonts/Makefile.in 2006-02-13 12:38:48.000000000 +0100 +@@ -40,7 +40,7 @@ + -test -f y.tab.h && mv -f y.tab.h y_tab.h + $(LEX_OUTPUT_ROOT).o: parser.h + $(LEX_OUTPUT_ROOT).c: pl.l +- $(LEX) $(srcdir)/pl.l ++ cp $(srcdir)/lex.yy.c-dist $(srcdir)/lex.yy.c + + + diff --git a/app-text/ptex/files/xpdf-2.02pl1-CAN-2005-3191-3.patch b/app-text/ptex/files/xpdf-2.02pl1-CAN-2005-3191-3.patch new file mode 100644 index 000000000000..6e2531318df7 --- /dev/null +++ b/app-text/ptex/files/xpdf-2.02pl1-CAN-2005-3191-3.patch @@ -0,0 +1,252 @@ +Index: xpdf-2.02pl1/xpdf/Stream.h +=================================================================== +--- xpdf-2.02pl1.orig/xpdf/Stream.h ++++ xpdf-2.02pl1/xpdf/Stream.h +@@ -225,6 +225,8 @@ public: + + ~StreamPredictor(); + ++ GBool isOk() { return ok; } ++ + int lookChar(); + int getChar(); + +@@ -242,6 +244,7 @@ private: + int rowBytes; // bytes per line + Guchar *predLine; // line buffer + int predIdx; // current index in predLine ++ GBool ok; + }; + + //------------------------------------------------------------------------ +Index: xpdf-2.02pl1/xpdf/Stream.cc +=================================================================== +--- xpdf-2.02pl1.orig/xpdf/Stream.cc ++++ xpdf-2.02pl1/xpdf/Stream.cc +@@ -15,6 +15,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <stddef.h> ++#include <limits.h> + #ifndef WIN32 + #include <unistd.h> + #endif +@@ -409,13 +410,28 @@ StreamPredictor::StreamPredictor(Stream + width = widthA; + nComps = nCompsA; + nBits = nBitsA; ++ predLine = NULL; ++ ok = gFalse; + ++ if (width <= 0 || nComps <= 0 || nBits <= 0 || ++ nComps >= INT_MAX/nBits || ++ width >= INT_MAX/nComps/nBits) { ++ return; ++ } + nVals = width * nComps; ++ if (nVals * nBits + 7 <= 0) { ++ return; ++ } + pixBytes = (nComps * nBits + 7) >> 3; + rowBytes = ((nVals * nBits + 7) >> 3) + pixBytes; ++ if (rowBytes < 0) { ++ return; ++ } + predLine = (Guchar *)gmalloc(rowBytes); + memset(predLine, 0, rowBytes); + predIdx = rowBytes; ++ ++ ok = gTrue; + } + + StreamPredictor::~StreamPredictor() { +@@ -981,6 +997,10 @@ LZWStream::LZWStream(Stream *strA, int p + FilterStream(strA) { + if (predictor != 1) { + pred = new StreamPredictor(this, predictor, columns, colors, bits); ++ if (!pred->isOk()) { ++ delete pred; ++ pred = NULL; ++ } + } else { + pred = NULL; + } +@@ -1226,6 +1246,10 @@ CCITTFaxStream::CCITTFaxStream(Stream *s + endOfLine = endOfLineA; + byteAlign = byteAlignA; + columns = columnsA; ++ if (columns < 1 || columns >= INT_MAX / sizeof(short)) { ++ error(-1, "invalid number of columns"); ++ exit(1); ++ } + rows = rowsA; + endOfBlock = endOfBlockA; + black = blackA; +@@ -2864,6 +2888,11 @@ GBool DCTStream::readBaselineSOF() { + height = read16(); + width = read16(); + numComps = str->getChar(); ++ if (numComps <= 0 || numComps > 4) { ++ numComps = 0; ++ error(getPos(), "Bad number of components in DCT stream"); ++ return gFalse; ++ } + if (prec != 8) { + error(getPos(), "Bad DCT precision %d", prec); + return gFalse; +@@ -2890,6 +2919,11 @@ GBool DCTStream::readProgressiveSOF() { + height = read16(); + width = read16(); + numComps = str->getChar(); ++ if (numComps <= 0 || numComps > 4) { ++ numComps = 0; ++ error(getPos(), "Bad number of components in DCT stream"); ++ return gFalse; ++ } + if (prec != 8) { + error(getPos(), "Bad DCT precision %d", prec); + return gFalse; +@@ -2912,6 +2946,10 @@ GBool DCTStream::readScanInfo() { + + length = read16() - 2; + scanInfo.numComps = str->getChar(); ++ if (scanInfo.numComps <= 0 || scanInfo.numComps > 4) { ++ error(getPos(), "Bad number of components in DCT stream"); ++ return gFalse; ++ } + --length; + if (length != 2 * scanInfo.numComps + 3) { + error(getPos(), "Bad DCT scan info block"); +@@ -2979,12 +3017,12 @@ GBool DCTStream::readHuffmanTables() { + while (length > 0) { + index = str->getChar(); + --length; +- if ((index & 0x0f) >= 4) { ++ if ((index & ~0x10) >= 4 || (index & ~0x10) < 0) { + error(getPos(), "Bad DCT Huffman table"); + return gFalse; + } + if (index & 0x10) { +- index &= 0x0f; ++ index &= 0x03; + if (index >= numACHuffTables) + numACHuffTables = index+1; + tbl = &acHuffTables[index]; +@@ -3072,9 +3110,11 @@ int DCTStream::readMarker() { + do { + do { + c = str->getChar(); ++ if(c == EOF) return EOF; + } while (c != 0xff); + do { + c = str->getChar(); ++ if(c == EOF) return EOF; + } while (c == 0xff); + } while (c == 0x00); + return c; +@@ -3182,6 +3222,10 @@ FlateStream::FlateStream(Stream *strA, i + FilterStream(strA) { + if (predictor != 1) { + pred = new StreamPredictor(this, predictor, columns, colors, bits); ++ if (!pred->isOk()) { ++ delete pred; ++ pred = NULL; ++ } + } else { + pred = NULL; + } +Index: xpdf-2.02pl1/xpdf/JBIG2Stream.cc +=================================================================== +--- xpdf-2.02pl1.orig/xpdf/JBIG2Stream.cc ++++ xpdf-2.02pl1/xpdf/JBIG2Stream.cc +@@ -7,6 +7,7 @@ + //======================================================================== + + #include <aconf.h> ++#include <limits.h> + + #ifdef USE_GCC_PRAGMAS + #pragma implementation +@@ -1001,7 +1002,16 @@ JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, + w = wA; + h = hA; + line = (wA + 7) >> 3; +- data = (Guchar *)gmalloc(h * line); ++ ++ if (h < 0 || line <= 0 || h >= (INT_MAX - 1) / line) { ++ error(-1, "invalid width/height"); ++ data = NULL; ++ return; ++ } ++ ++ // need to allocate one extra guard byte for use in combine() ++ data = (Guchar *)gmalloc(h * line + 1); ++ data[h * line] = 0; + } + + JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, JBIG2Bitmap *bitmap): +@@ -1010,8 +1020,17 @@ JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, + w = bitmap->w; + h = bitmap->h; + line = bitmap->line; +- data = (Guchar *)gmalloc(h * line); ++ ++ if (h < 0 || line <= 0 || h >= (INT_MAX - 1) / line) { ++ error(-1, "invalid width/height"); ++ data = NULL; ++ return; ++ } ++ ++ // need to allocate one extra guard byte for use in combine() ++ data = (Guchar *)gmalloc(h * line + 1); + memcpy(data, bitmap->data, h * line); ++ data[h * line] = 0; + } + + JBIG2Bitmap::~JBIG2Bitmap() { +@@ -1036,10 +1055,14 @@ JBIG2Bitmap *JBIG2Bitmap::getSlice(Guint + } + + void JBIG2Bitmap::expand(int newH, Guint pixel) { +- if (newH <= h) { ++ if (newH <= h || line <= 0 || newH >= (INT_MAX - 1)/ line) { ++ error(-1, "invalid width/height"); ++ gfree(data); ++ data = NULL; + return; + } +- data = (Guchar *)grealloc(data, newH * line); ++ // need to allocate one extra guard byte for use in combine() ++ data = (Guchar *)grealloc(data, newH * line + 1); + if (pixel) { + memset(data + h * line, 0xff, (newH - h) * line); + } else { +@@ -2576,6 +2599,15 @@ void JBIG2Stream::readHalftoneRegionSeg( + error(getPos(), "Bad symbol dictionary reference in JBIG2 halftone segment"); + return; + } ++ if (gridH == 0 || gridW >= INT_MAX / gridH) { ++ error(getPos(), "Bad size in JBIG2 halftone segment"); ++ return; ++ } ++ if (w == 0 || h >= INT_MAX / w) { ++ error(getPos(), "Bad size in JBIG2 bitmap segment"); ++ return; ++ } ++ + patternDict = (JBIG2PatternDict *)seg; + bpp = 0; + i = 1; +@@ -3205,6 +3237,11 @@ JBIG2Bitmap *JBIG2Stream::readGenericRef + JBIG2BitmapPtr tpgrCXPtr0, tpgrCXPtr1, tpgrCXPtr2; + int x, y, pix; + ++ if (w < 0 || h <= 0 || w >= INT_MAX / h) { ++ error(-1, "invalid width/height"); ++ return NULL; ++ } ++ + bitmap = new JBIG2Bitmap(0, w, h); + bitmap->clearToZero(); + +# vim: syntax=diff diff --git a/app-text/ptex/ptex-3.1.5-r1.ebuild b/app-text/ptex/ptex-3.1.5-r1.ebuild new file mode 100644 index 000000000000..b82ec2756d8c --- /dev/null +++ b/app-text/ptex/ptex-3.1.5-r1.ebuild @@ -0,0 +1,136 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/ptex/ptex-3.1.5-r1.ebuild,v 1.1 2006/02/18 17:26:32 nattfodd Exp $ + +PTEX_TEXMF_PV=2.3 +TETEX_PV=2.0.2 + +inherit tetex-2 + +DESCRIPTION="The ASCII publishing TeX distribution" +HOMEPAGE="http://www.ascii.co.jp/pb/ptex/" + +PTEX_SRC="ptex-src-${PV}.tar.gz" +PTEX_TEXMF="ptex-texmf-${PTEX_TEXMF_PV}.tar.gz" + +SRC_PATH_PTEX="ftp://ftp.ascii.co.jp/pub/TeX/ascii-ptex" +SRC_URI="${SRC_URI} + ${SRC_PATH_PTEX}/tetex/${PTEX_SRC} + ${SRC_PATH_PTEX}/tetex/${PTEX_TEXMF} + ${SRC_PATH_PTEX}/dvips/dvipsk-jpatch-p1.6a.tar.gz + X? ( http://tutimura.ath.cx/~nob/tex/xdvi/tetex-src-2.0.2-xdvik-y1.patch.gz + http://tutimura.ath.cx/~nob/tex/xdvi/tetex-src-2.0.2-xdvik-y1-j1.19.patch.gz + http://www.nn.iij4u.or.jp/~tutimura/tex/xdvik-22.40y1-j1.21.patch.gz )" + +LICENSE="GPL-2 BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~ppc-macos ~sparc ~x86" +IUSE="X" + +DEPEND="X? ( >=media-libs/freetype-2 + >=media-fonts/kochi-substitute-20030809-r3 ) + !app-text/xdvik" + +src_unpack() { + tetex-2_src_unpack + + einfo "Unpacking pTeX sources..." + cd ${S}/texmf + unpack ${PTEX_TEXMF} + + cd ${S}/texk/web2c + unpack ${PTEX_SRC} + + cd ${S}/texk + unpack dvipsk-jpatch-p1.6a.tar.gz + epatch dvipsk-5.92b-p1.6a.patch + + if use X ; then + cd ${S} + epatch ${DISTDIR}/tetex-src-2.0.2-xdvik-y1.patch.gz + epatch ${DISTDIR}/xdvik-22.40y1-j1.21.patch.gz + epatch ${DISTDIR}/tetex-src-2.0.2-xdvik-y1-j1.19.patch.gz + sed -i -e "/\/usr\/local/s:^:%:g" \ + -e "/kochi-.*-subst/s:%::g" \ + -e "s:/usr/local:/usr:g" \ + -e "s:/usr/X11R6/lib/X11/fonts/truetype:/usr/share/fonts/kochi-substitute:g" \ + ${S}/texk/xdvik/vfontmap.freetype || die + cd texk/oxdvik + ln -s ../xdvik/*.{c,h} ./ + cp -f ../xdvik/Makefile.in.oxdvi Makefile.in + cp -f ../xdvik/c-auto.in ./ + fi + + # bug 75801 + EPATCH_OPTS="-d ${S}/libs/xpdf/xpdf -p0" epatch ${FILESDIR}/xpdf-CESA-2004-007-xpdf2-newer.diff + EPATCH_OPTS="-d ${S}/libs/xpdf -p1" epatch ${FILESDIR}/xpdf-goo-sizet.patch + EPATCH_OPTS="-d ${S}/libs/xpdf -p1" epatch ${FILESDIR}/xpdf2-underflow.patch + EPATCH_OPTS="-d ${S}/libs/xpdf/xpdf -p0" epatch ${FILESDIR}/xpdf-3.00pl2-CAN-2004-1125.patch + EPATCH_OPTS="-d ${S}/libs/xpdf/xpdf -p0" epatch ${FILESDIR}/xpdf-3.00pl3-CAN-2005-0064.patch + EPATCH_OPTS="-d ${S} -p1" epatch ${FILESDIR}/xdvizilla.patch + + #bug 115775 + EPATCH_OPTS="-d ${S}/libs/xpdf/xpdf -p2" epatch ${FILESDIR}/xpdf-2.02pl1-CAN-2005-3191-3.patch + + #bug 122365 + EPATCH_OPTS="-d ${WORKDIR}" epatch ${FILESDIR}/${P}-flex-unput.patch + + # bug 118264 + EPATCH_OPTS="-d ${WORKDIR} -p0" epatch ${FILESDIR}/${P}-dvi-draw-conflicting-types.patch + +} + +src_compile() { + if use X ; then + export CPPFLAGS="${CPPFLAGS} -I/usr/include/freetype2" + TETEX_ECONF="--with-vflib=vf2ft" + fi + + tetex_src_compile + + cat >>${S}/texk/web2c/fmtutil.cnf<<-EOF + + # Japanese pLaTeX: + ptex ptex - ptex.ini + platex ptex language.dat platex.ini + platex209 ptex language.dat plplain.ini + EOF + + cat >>${S}/texk/web2c/texmf.cnf<<-EOF + + CMAPINPUTS = .;/opt/Acrobat5/Resource/Font//;/usr/share/xpdf// + EOF + + cd ${S}/texk/web2c/${PN}-src-${PV} || die + ./configure EUC || die "configure pTeX failed" + + make programs || die "make pTeX failed" +} + +src_install() { + tetex-2_src_install + + einfo "Installing pTeX..." + cd ${S}/texk/web2c/${PN}-src-${PV} || die + einstall bindir=${D}/usr/bin texmf=${D}/usr/share/texmf || die + + insinto /usr/share/texmf/dvips/config + doins ${FILESDIR}/psfonts-ja.map || die + cat >>${D}/usr/share/texmf/web2c/updmap.cfg<<-EOF + + # Japanese fonts + MixedMap psfonts-ja.map + EOF + + docinto dvipsk + cd ${S}/texk/dvipsk + dodoc ../ChangeLog.jpatch ../README.jpatch + + if use X ; then + cd ${S}/texk/xdvik + docinto xdvik + dodoc ANNOUNCE BUGS CHANGES.xdvik-jp FAQ README.* + docinto xdvik/READMEs + dodoc READMEs/* + fi +} |