diff options
author | Stefan Schweizer <genstef@gentoo.org> | 2006-02-19 19:07:08 +0000 |
---|---|---|
committer | Stefan Schweizer <genstef@gentoo.org> | 2006-02-19 19:07:08 +0000 |
commit | c35172d353ec74229d5f065cc0555107b2441d06 (patch) | |
tree | e3e13bdced606a32b5feb9c015528f213f45a5e6 /app-text/xpdf | |
parent | Initial commit, ebuild written by me. (diff) | |
download | gentoo-2-c35172d353ec74229d5f065cc0555107b2441d06.tar.gz gentoo-2-c35172d353ec74229d5f065cc0555107b2441d06.tar.bz2 gentoo-2-c35172d353ec74229d5f065cc0555107b2441d06.zip |
remove older ebuilds
(Portage version: 2.1_pre4-r1)
Diffstat (limited to 'app-text/xpdf')
27 files changed, 0 insertions, 2120 deletions
diff --git a/app-text/xpdf/files/digest-xpdf-3.00-r10 b/app-text/xpdf/files/digest-xpdf-3.00-r10 deleted file mode 100644 index 5d4918e4839b..000000000000 --- a/app-text/xpdf/files/digest-xpdf-3.00-r10 +++ /dev/null @@ -1,12 +0,0 @@ -MD5 95294cef3031dd68e65f331e8750b2c2 xpdf-3.00.tar.gz 534697 -MD5 67f05f65bc64bf022b36138c7c26746d xpdf-arabic.tar.gz 1058 -MD5 713659f0282b9e3d169390e246e5eb74 xpdf-chinese-simplified.tar.gz 756127 -MD5 5be730b859f8b01de569eb1bad188426 xpdf-chinese-traditional.tar.gz 698902 -MD5 21f57122247e2e2a63bfed4dc4f6c199 xpdf-cyrillic.tar.gz 1286 -MD5 2240a364b9c28ce09fd8c3107784ce40 xpdf-greek.tar.gz 1124 -MD5 438dd417517641cbb78a94facf2d938e xpdf-hebrew.tar.gz 1314 -MD5 57bb9359437583479b6670e75fa06c31 xpdf-japanese.tar.gz 430478 -MD5 10cd92e4eef065a6a26341d9a2a1b5c2 xpdf-korean.tar.gz 419081 -MD5 ac19ef990cd63afd2837c10dc7e1c3ab xpdf-latin2.tar.gz 1435 -MD5 9af495766ee4eaf3411d1fa74560f0ec xpdf-thai.tar.gz 1876 -MD5 f9233880805e3d8d2cf15a4fe679f25b xpdf-turkish.tar.gz 1140 diff --git a/app-text/xpdf/files/digest-xpdf-3.01-r5 b/app-text/xpdf/files/digest-xpdf-3.01-r5 deleted file mode 100644 index a9aeca0c2984..000000000000 --- a/app-text/xpdf/files/digest-xpdf-3.01-r5 +++ /dev/null @@ -1,12 +0,0 @@ -MD5 e004c69c7dddef165d768b1362b44268 xpdf-3.01.tar.gz 599778 -MD5 67f05f65bc64bf022b36138c7c26746d xpdf-arabic.tar.gz 1058 -MD5 713659f0282b9e3d169390e246e5eb74 xpdf-chinese-simplified.tar.gz 756127 -MD5 5be730b859f8b01de569eb1bad188426 xpdf-chinese-traditional.tar.gz 698902 -MD5 21f57122247e2e2a63bfed4dc4f6c199 xpdf-cyrillic.tar.gz 1286 -MD5 2240a364b9c28ce09fd8c3107784ce40 xpdf-greek.tar.gz 1124 -MD5 438dd417517641cbb78a94facf2d938e xpdf-hebrew.tar.gz 1314 -MD5 57bb9359437583479b6670e75fa06c31 xpdf-japanese.tar.gz 430478 -MD5 10cd92e4eef065a6a26341d9a2a1b5c2 xpdf-korean.tar.gz 419081 -MD5 ac19ef990cd63afd2837c10dc7e1c3ab xpdf-latin2.tar.gz 1435 -MD5 9af495766ee4eaf3411d1fa74560f0ec xpdf-thai.tar.gz 1876 -MD5 f9233880805e3d8d2cf15a4fe679f25b xpdf-turkish.tar.gz 1140 diff --git a/app-text/xpdf/files/xpdf-3.00-64bit.patch b/app-text/xpdf/files/xpdf-3.00-64bit.patch deleted file mode 100644 index ec13b7bb261f..000000000000 --- a/app-text/xpdf/files/xpdf-3.00-64bit.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- xpdf-3.00/goo/gmem.h.me 2005-07-25 10:47:46.000000000 +0200 -+++ xpdf-3.00/goo/gmem.h 2005-07-25 10:49:55.000000000 +0200 -@@ -19,13 +19,13 @@ - * Same as malloc, but prints error message and exits if malloc() - * returns NULL. - */ --extern void *gmalloc(int size); -+extern void *gmalloc(size_t size); - - /* - * Same as realloc, but prints error message and exits if realloc() - * returns NULL. If <p> is NULL, calls malloc instead of realloc(). - */ --extern void *grealloc(void *p, int size); -+extern void *grealloc(void *p, size_t size); - - /* - * Same as free, but checks for and ignores NULL pointers. ---- xpdf-3.00/goo/gmem.c.me 2005-07-25 10:47:51.000000000 +0200 -+++ xpdf-3.00/goo/gmem.c 2005-07-25 10:49:30.000000000 +0200 -@@ -53,9 +53,9 @@ - - #endif /* DEBUG_MEM */ - --void *gmalloc(int size) { -+void *gmalloc(size_t size) { - #ifdef DEBUG_MEM -- int size1; -+ size_t size1; - char *mem; - GMemHdr *hdr; - void *data; -@@ -94,11 +94,11 @@ - #endif - } - --void *grealloc(void *p, int size) { -+void *grealloc(void *p, size_t size) { - #ifdef DEBUG_MEM - GMemHdr *hdr; - void *q; -- int oldSize; -+ size_t oldSize; - - if (size == 0) { - if (p) -@@ -137,7 +137,7 @@ - - void gfree(void *p) { - #ifdef DEBUG_MEM -- int size; -+ size_t size; - GMemHdr *hdr; - GMemHdr *prevHdr, *q; - int lst; diff --git a/app-text/xpdf/files/xpdf-3.00-PathScanner.patch b/app-text/xpdf/files/xpdf-3.00-PathScanner.patch deleted file mode 100644 index dac7bfa34ad2..000000000000 --- a/app-text/xpdf/files/xpdf-3.00-PathScanner.patch +++ /dev/null @@ -1,125 +0,0 @@ ---- xpdf-3.00/splash/Splash.cc.orig 2004-10-19 11:50:09.000000000 +0200 -+++ xpdf-3.00/splash/Splash.cc 2004-10-19 11:50:46.000000000 +0200 -@@ -631,6 +631,9 @@ - if (path->length == 0) { - return splashErrEmptyPath; - } -+ if (path->length == 1) -+ return splashErrBogusPath; -+ - xPath = new SplashXPath(path, state->flatness, gTrue); - xPath->sort(); - scanner = new SplashXPathScanner(xPath, eo); ---- xpdf-3.00/splash/SplashXPathScanner.cc.orig 2004-10-21 16:36:41.170525604 +0200 -+++ xpdf-3.00/splash/SplashXPathScanner.cc 2004-10-21 17:34:05.320376896 +0200 -@@ -39,54 +39,60 @@ - xPath = xPathA; - eo = eoA; - -+ xMin = 0; -+ xMax = 0; -+ yMin = 0; -+ yMax = 0; -+ interY = 0; -+ xPathIdx = 0; -+ inter = NULL; -+ interLen = interSize = 0; -+ - // compute the bbox - seg = &xPath->segs[0]; -- if (seg->x0 <= seg->x1) { -- xMinFP = seg->x0; -- xMaxFP = seg->x1; -- } else { -- xMinFP = seg->x1; -- xMaxFP = seg->x0; -- } -- if (seg->flags & splashXPathFlip) { -- yMinFP = seg->y1; -- yMaxFP = seg->y0; -- } else { -- yMinFP = seg->y0; -- yMaxFP = seg->y1; -- } -- for (i = 1; i < xPath->length; ++i) { -- seg = &xPath->segs[i]; -- if (seg->x0 < xMinFP) { -+ if (seg) { -+ if (seg->x0 <= seg->x1) { - xMinFP = seg->x0; -- } else if (seg->x0 > xMaxFP) { -- xMaxFP = seg->x0; -- } -- if (seg->x1 < xMinFP) { -- xMinFP = seg->x1; -- } else if (seg->x1 > xMaxFP) { - xMaxFP = seg->x1; -+ } else { -+ xMinFP = seg->x1; -+ xMaxFP = seg->x0; - } - if (seg->flags & splashXPathFlip) { -- if (seg->y0 > yMaxFP) { -- yMaxFP = seg->y0; -- } -+ yMinFP = seg->y1; -+ yMaxFP = seg->y0; - } else { -- if (seg->y1 > yMaxFP) { -- yMaxFP = seg->y1; -+ yMinFP = seg->y0; -+ yMaxFP = seg->y1; -+ } -+ for (i = 1; i < xPath->length; ++i) { -+ seg = &xPath->segs[i]; -+ if (seg->x0 < xMinFP) { -+ xMinFP = seg->x0; -+ } else if (seg->x0 > xMaxFP) { -+ xMaxFP = seg->x0; -+ } -+ if (seg->x1 < xMinFP) { -+ xMinFP = seg->x1; -+ } else if (seg->x1 > xMaxFP) { -+ xMaxFP = seg->x1; -+ } -+ if (seg->flags & splashXPathFlip) { -+ if (seg->y0 > yMaxFP) { -+ yMaxFP = seg->y0; -+ } -+ } else { -+ if (seg->y1 > yMaxFP) { -+ yMaxFP = seg->y1; -+ } - } - } -+ xMin = splashFloor(xMinFP); -+ xMax = splashFloor(xMaxFP); -+ yMin = splashFloor(yMinFP); -+ yMax = splashFloor(yMaxFP); -+ computeIntersections(yMin); - } -- xMin = splashFloor(xMinFP); -- xMax = splashFloor(xMaxFP); -- yMin = splashFloor(yMinFP); -- yMax = splashFloor(yMaxFP); -- -- interY = 0; -- xPathIdx = 0; -- inter = NULL; -- interLen = interSize = 0; -- computeIntersections(yMin); - } - - SplashXPathScanner::~SplashXPathScanner() { ---- xpdf-3.00/splash/SplashFTFont.cc.orig 2004-10-19 11:50:55.000000000 +0200 -+++ xpdf-3.00/splash/SplashFTFont.cc 2004-10-19 11:51:12.000000000 +0200 -@@ -225,6 +225,9 @@ - if (FT_Get_Glyph(slot, &glyph)) { - return NULL; - } -+ if (glyph->format != FT_GLYPH_FORMAT_OUTLINE) { -+ return NULL; -+ } - path = new SplashPath(); - FT_Outline_Decompose(&((FT_OutlineGlyph)glyph)->outline, - &outlineFuncs, path); diff --git a/app-text/xpdf/files/xpdf-3.00-core.patch b/app-text/xpdf/files/xpdf-3.00-core.patch deleted file mode 100644 index 21e614821a71..000000000000 --- a/app-text/xpdf/files/xpdf-3.00-core.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- xpdf-3.00/xpdf/XPDFCore.cc.ud 2004-10-07 12:44:23.000000000 -0700 -+++ xpdf-3.00/xpdf/XPDFCore.cc 2004-10-07 12:44:26.000000000 -0700 -@@ -1051,6 +1051,10 @@ - GString *msg; - int i; - -+ if (action == NULL) -+ // Nothing to do. -+ return; -+ - switch (kind = action->getKind()) { - - // GoTo / GoToR action diff --git a/app-text/xpdf/files/xpdf-3.00-empty-bookmark.patch b/app-text/xpdf/files/xpdf-3.00-empty-bookmark.patch deleted file mode 100644 index 3f05bced654a..000000000000 --- a/app-text/xpdf/files/xpdf-3.00-empty-bookmark.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- xpdf/XPDFViewer.cc 2004-05-18 12:47:11.512305008 +0200 -+++ xpdf/XPDFViewer.cc.new 2004-05-18 12:38:14.558934328 +0200 -@@ -1681,7 +1681,7 @@ - OutlineItem *item; - - XtVaGetValues(data->selectedItem, XmNuserData, &item, NULL); -- if (item) { -+ if (item && (item->getAction() != 0)) { - viewer->core->doAction(item->getAction()); - } - viewer->core->takeFocus(); diff --git a/app-text/xpdf/files/xpdf-3.00-fonts.patch b/app-text/xpdf/files/xpdf-3.00-fonts.patch deleted file mode 100644 index 1292918f6144..000000000000 --- a/app-text/xpdf/files/xpdf-3.00-fonts.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ur xpdf.org/xpdf/GlobalParams.cc xpdf-3.00/xpdf/GlobalParams.cc ---- xpdf.org/xpdf/GlobalParams.cc 2004-01-21 17:26:45.000000000 -0800 -+++ xpdf-3.00/xpdf/GlobalParams.cc 2005-03-18 19:52:03.000000000 -0800 -@@ -84,6 +84,7 @@ - "/usr/share/ghostscript/fonts", - "/usr/local/share/ghostscript/fonts", - "/usr/share/fonts/default/Type1", -+ "/usr/share/fonts/default/ghostscript", - NULL - }; - diff --git a/app-text/xpdf/files/xpdf-3.00-freetype-2.1.7.patch b/app-text/xpdf/files/xpdf-3.00-freetype-2.1.7.patch deleted file mode 100644 index b6f789516ebc..000000000000 --- a/app-text/xpdf/files/xpdf-3.00-freetype-2.1.7.patch +++ /dev/null @@ -1,74 +0,0 @@ -diff -Naur xpdf-3.00/configure.in xpdf-3.00.new/configure.in ---- xpdf-3.00/configure.in 2004-01-22 02:26:44.000000000 +0100 -+++ xpdf-3.00.new/configure.in 2004-09-29 19:27:16.089925504 +0200 -@@ -306,10 +306,13 @@ - dnl ##### (Note: FT_Get_Name_Index was added in FT 2.0.5, and is - dnl ##### the reason that Xpdf requires 2.0.5+.) - smr_CHECK_LIB(freetype2, freetype, [FreeType2 font rasterizer - version 2.0.5+], -- FT_Get_Name_Index, freetype/freetype.h, -lm) -+ FT_Get_Name_Index, freetype/ft2build.h, -lm) - if test x"$freetype2_LIBS" = x; then - smr_CHECK_LIB(freetype2, freetype, [FreeType2 font rasterizer - version 2.0.5+], -- FT_Get_Name_Index, freetype.h, -lm) -+ FT_Get_Name_Index, ft2build.h, -lm) -+ if test "x$smr_have_freetype2_library" = xyes; then -+ AC_DEFINE(HAVE_FREETYPE_H) -+ fi - fi - AC_SUBST(freetype2_LIBS) - AC_SUBST(freetype2_CFLAGS) -diff -Naur xpdf-3.00/splash/SplashFTFont.cc xpdf-3.00.new/splash/SplashFTFont.cc ---- xpdf-3.00/splash/SplashFTFont.cc 2004-01-22 02:26:44.000000000 +0100 -+++ xpdf-3.00.new/splash/SplashFTFont.cc 2004-09-29 19:27:46.527298320 +0200 -@@ -12,8 +12,10 @@ - #pragma implementation - #endif - --#include "freetype/ftoutln.h" --#include "freetype/internal/ftobjs.h" // needed for FT_New_Size decl -+#include <ft2build.h> -+#include FT_OUTLINE_H -+#include FT_GLYPH_H -+#include FT_SIZES_H // needed for FT_New_Size decl - #include "gmem.h" - #include "SplashMath.h" - #include "SplashGlyphBitmap.h" -diff -Naur xpdf-3.00/splash/SplashFTFont.h xpdf-3.00.new/splash/SplashFTFont.h ---- xpdf-3.00/splash/SplashFTFont.h 2004-01-22 02:26:44.000000000 +0100 -+++ xpdf-3.00.new/splash/SplashFTFont.h 2004-09-29 19:27:16.091925200 +0200 -@@ -15,7 +15,8 @@ - #pragma interface - #endif - --#include <freetype/freetype.h> -+#include <ft2build.h> -+#include FT_FREETYPE_H - #include "SplashFont.h" - - class SplashFTFontFile; -diff -Naur xpdf-3.00/splash/SplashFTFontEngine.h xpdf-3.00.new/splash/SplashFTFontEngine.h ---- xpdf-3.00/splash/SplashFTFontEngine.h 2004-01-22 02:26:44.000000000 +0100 -+++ xpdf-3.00.new/splash/SplashFTFontEngine.h 2004-09-29 19:27:16.091925200 +0200 -@@ -15,7 +15,8 @@ - #pragma interface - #endif - --#include <freetype/freetype.h> -+#include <ft2build.h> -+#include FT_FREETYPE_H - #include "gtypes.h" - - class SplashFontFile; -diff -Naur xpdf-3.00/splash/SplashFTFontFile.h xpdf-3.00.new/splash/SplashFTFontFile.h ---- xpdf-3.00/splash/SplashFTFontFile.h 2004-01-22 02:26:44.000000000 +0100 -+++ xpdf-3.00.new/splash/SplashFTFontFile.h 2004-09-29 19:27:16.091925200 +0200 -@@ -15,7 +15,8 @@ - #pragma interface - #endif - --#include <freetype/freetype.h> -+#include <ft2build.h> -+#include FT_FREETYPE_H - #include "SplashFontFile.h" - - class SplashFontFileID; diff --git a/app-text/xpdf/files/xpdf-3.00-gcc41.patch b/app-text/xpdf/files/xpdf-3.00-gcc41.patch deleted file mode 100644 index 6856d492b06f..000000000000 --- a/app-text/xpdf/files/xpdf-3.00-gcc41.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -Naur xpdf-3.00.old/splash/SplashT1Font.h xpdf-3.00/splash/SplashT1Font.h ---- xpdf-3.00.old/splash/SplashT1Font.h 2004-01-22 09:26:44.000000000 +0800 -+++ xpdf-3.00/splash/SplashT1Font.h 2005-06-08 10:09:56.000000000 +0800 -@@ -16,6 +16,7 @@ - #endif - - #include "SplashFont.h" -+#include "SplashT1FontFile.h" - - //------------------------------------------------------------------------ - // SplashT1Font -diff -Naur xpdf-3.00.old/xpdf/TextOutputDev.h xpdf-3.00/xpdf/TextOutputDev.h ---- xpdf-3.00.old/xpdf/TextOutputDev.h 2004-01-22 09:26:45.000000000 +0800 -+++ xpdf-3.00/xpdf/TextOutputDev.h 2005-06-08 10:15:45.000000000 +0800 -@@ -26,6 +26,10 @@ - class GfxState; - class UnicodeMap; - -+class TextBlock; -+class TextPage; -+class TextLineFrag; -+ - //------------------------------------------------------------------------ - - typedef void (*TextOutputFunc)(void *stream, char *text, int len); diff --git a/app-text/xpdf/files/xpdf-3.00-nodrm.diff b/app-text/xpdf/files/xpdf-3.00-nodrm.diff deleted file mode 100644 index 8abf09f45aba..000000000000 --- a/app-text/xpdf/files/xpdf-3.00-nodrm.diff +++ /dev/null @@ -1,39 +0,0 @@ -diff -uNr xpdf-3.00-old/xpdf/XRef.cc xpdf-3.00/xpdf/XRef.cc ---- xpdf-3.00-old/xpdf/XRef.cc 2004-01-22 02:26:45.000000000 +0100 -+++ xpdf-3.00/xpdf/XRef.cc 2004-09-01 16:11:32.410396128 +0200 -@@ -822,7 +822,7 @@ - - GBool XRef::okToPrint(GBool ignoreOwnerPW) { - #ifndef NO_DECRYPTION -- return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permPrint); -+ return gTrue; - #else - return gTrue; - #endif -@@ -830,7 +830,7 @@ - - GBool XRef::okToChange(GBool ignoreOwnerPW) { - #ifndef NO_DECRYPTION -- return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permChange); -+ return gTrue; - #else - return gTrue; - #endif -@@ -838,7 +838,7 @@ - - GBool XRef::okToCopy(GBool ignoreOwnerPW) { - #ifndef NO_DECRYPTION -- return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permCopy); -+ return gTrue; - #else - return gTrue; - #endif -@@ -846,7 +846,7 @@ - - GBool XRef::okToAddNotes(GBool ignoreOwnerPW) { - #ifndef NO_DECRYPTION -- return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permNotes); -+ return gTrue; - #else - return gTrue; - #endif diff --git a/app-text/xpdf/files/xpdf-3.00-overflow.patch b/app-text/xpdf/files/xpdf-3.00-overflow.patch deleted file mode 100644 index d1b2f584d812..000000000000 --- a/app-text/xpdf/files/xpdf-3.00-overflow.patch +++ /dev/null @@ -1,296 +0,0 @@ ---- xpdf-3.00/xpdf/Catalog.cc.orig 2004-10-18 16:51:35.824126848 +0200 -+++ xpdf-3.00/xpdf/Catalog.cc 2004-10-18 16:53:06.634620045 +0200 -@@ -64,6 +64,15 @@ - } - pagesSize = numPages0 = (int)obj.getNum(); - obj.free(); -+ // The gcc doesnt optimize this away, so this check is ok, -+ // even if it looks like a pagesSize != pagesSize check -+ if (pagesSize*sizeof(Page *)/sizeof(Page *) != pagesSize || -+ pagesSize*sizeof(Ref)/sizeof(Ref) != pagesSize) { -+ error(-1, "Invalid 'pagesSize'"); -+ ok = gFalse; -+ return; -+ } -+ - pages = (Page **)gmalloc(pagesSize * sizeof(Page *)); - pageRefs = (Ref *)gmalloc(pagesSize * sizeof(Ref)); - for (i = 0; i < pagesSize; ++i) { -@@ -191,6 +200,11 @@ - } - if (start >= pagesSize) { - pagesSize += 32; -+ if (pagesSize*sizeof(Page *)/sizeof(Page *) != pagesSize || -+ pagesSize*sizeof(Ref)/sizeof(Ref) != pagesSize) { -+ error(-1, "Invalid 'pagesSize' parameter."); -+ goto err3; -+ } - pages = (Page **)grealloc(pages, pagesSize * sizeof(Page *)); - pageRefs = (Ref *)grealloc(pageRefs, pagesSize * sizeof(Ref)); - for (j = pagesSize - 32; j < pagesSize; ++j) { ---- xpdf-3.00/xpdf/XRef.cc.orig 2004-10-11 15:51:14.000000000 +0200 -+++ xpdf-3.00/xpdf/XRef.cc 2004-10-11 15:56:48.000000000 +0200 -@@ -96,7 +96,7 @@ - } - nObjects = obj1.getInt(); - obj1.free(); -- if (nObjects == 0) { -+ if (nObjects <= 0) { - goto err1; - } - -@@ -106,7 +106,15 @@ - } - first = obj1.getInt(); - obj1.free(); -+ if (first < 0) { -+ goto err1; -+ } - -+ if (nObjects*sizeof(int)/sizeof(int) != nObjects) { -+ error(-1, "Invalid 'nObjects'"); -+ goto err1; -+ } -+ - objs = new Object[nObjects]; - objNums = (int *)gmalloc(nObjects * sizeof(int)); - offsets = (int *)gmalloc(nObjects * sizeof(int)); -@@ -130,6 +138,12 @@ - offsets[i] = obj2.getInt(); - obj1.free(); - obj2.free(); -+ if (objNums[i] < 0 || offsets[i] < 0 || -+ (i > 0 && offsets[i] < offsets[i-1])) { -+ delete parser; -+ gfree(offsets); -+ goto err1; -+ } - } - while (str->getChar() != EOF) ; - delete parser; -@@ -369,10 +383,21 @@ - } - n = obj.getInt(); - obj.free(); -+ if (first < 0 || n < 0 || first + n < 0) { -+ goto err1; -+ } - if (first + n > size) { - for (newSize = size ? 2 * size : 1024; -- first + n > newSize; -+ first + n > newSize && newSize > 0; - newSize <<= 1) ; -+ if (newSize < 0) { -+ goto err1; -+ } -+ if (newSize*sizeof(XRefEntry)/sizeof(XRefEntry) != newSize) { -+ error(-1, "Invalid 'obj' parameters'"); -+ goto err1; -+ } -+ - entries = (XRefEntry *)grealloc(entries, newSize * sizeof(XRefEntry)); - for (i = size; i < newSize; ++i) { - entries[i].offset = 0xffffffff; -@@ -443,7 +468,7 @@ - - // check for an 'XRefStm' key - if (obj.getDict()->lookup("XRefStm", &obj2)->isInt()) { -- pos2 = obj2.getInt(); -+ pos2 = (Guint)obj2.getInt(); - readXRef(&pos2); - if (!ok) { - goto err1; -@@ -474,7 +499,14 @@ - } - newSize = obj.getInt(); - obj.free(); -+ if (newSize < 0) { -+ goto err1; -+ } - if (newSize > size) { -+ if (newSize * sizeof(XRefEntry)/sizeof(XRefEntry) != newSize) { -+ error(-1, "Invalid 'size' parameter."); -+ return gFalse; -+ } - entries = (XRefEntry *)grealloc(entries, newSize * sizeof(XRefEntry)); - for (i = size; i < newSize; ++i) { - entries[i].offset = 0xffffffff; -@@ -494,6 +526,9 @@ - } - w[i] = obj2.getInt(); - obj2.free(); -+ if (w[i] < 0 || w[i] > 4) { -+ goto err1; -+ } - } - obj.free(); - -@@ -513,13 +548,14 @@ - } - n = obj.getInt(); - obj.free(); -- if (!readXRefStreamSection(xrefStr, w, first, n)) { -+ if (first < 0 || n < 0 || -+ !readXRefStreamSection(xrefStr, w, first, n)) { - idx.free(); - goto err0; - } - } - } else { -- if (!readXRefStreamSection(xrefStr, w, 0, size)) { -+ if (!readXRefStreamSection(xrefStr, w, 0, newSize)) { - idx.free(); - goto err0; - } -@@ -551,10 +587,20 @@ - Guint offset; - int type, gen, c, newSize, i, j; - -+ if (first + n < 0) { -+ return gFalse; -+ } - if (first + n > size) { - for (newSize = size ? 2 * size : 1024; -- first + n > newSize; -+ first + n > newSize && newSize > 0; - newSize <<= 1) ; -+ if (newSize < 0) { -+ return gFalse; -+ } -+ if (newSize*sizeof(XRefEntry)/sizeof(XRefEntry) != newSize) { -+ error(-1, "Invalid 'size' inside xref table."); -+ return gFalse; -+ } - entries = (XRefEntry *)grealloc(entries, newSize * sizeof(XRefEntry)); - for (i = size; i < newSize; ++i) { - entries[i].offset = 0xffffffff; -@@ -585,24 +631,26 @@ - } - gen = (gen << 8) + c; - } -- switch (type) { -- case 0: -- entries[i].offset = offset; -- entries[i].gen = gen; -- entries[i].type = xrefEntryFree; -- break; -- case 1: -- entries[i].offset = offset; -- entries[i].gen = gen; -- entries[i].type = xrefEntryUncompressed; -- break; -- case 2: -- entries[i].offset = offset; -- entries[i].gen = gen; -- entries[i].type = xrefEntryCompressed; -- break; -- default: -- return gFalse; -+ if (entries[i].offset == 0xffffffff) { -+ switch (type) { -+ case 0: -+ entries[i].offset = offset; -+ entries[i].gen = gen; -+ entries[i].type = xrefEntryFree; -+ break; -+ case 1: -+ entries[i].offset = offset; -+ entries[i].gen = gen; -+ entries[i].type = xrefEntryUncompressed; -+ break; -+ case 2: -+ entries[i].offset = offset; -+ entries[i].gen = gen; -+ entries[i].type = xrefEntryCompressed; -+ break; -+ default: -+ return gFalse; -+ } - } - } - -@@ -664,38 +712,48 @@ - // look for object - } else if (isdigit(*p)) { - num = atoi(p); -- do { -- ++p; -- } while (*p && isdigit(*p)); -- if (isspace(*p)) { -+ if (num > 0) { - do { - ++p; -- } while (*p && isspace(*p)); -- if (isdigit(*p)) { -- gen = atoi(p); -+ } while (*p && isdigit(*p)); -+ if (isspace(*p)) { - do { - ++p; -- } while (*p && isdigit(*p)); -- if (isspace(*p)) { -+ } while (*p && isspace(*p)); -+ if (isdigit(*p)) { -+ gen = atoi(p); - do { - ++p; -- } while (*p && isspace(*p)); -- if (!strncmp(p, "obj", 3)) { -- if (num >= size) { -- newSize = (num + 1 + 255) & ~255; -- entries = (XRefEntry *) -- grealloc(entries, newSize * sizeof(XRefEntry)); -- for (i = size; i < newSize; ++i) { -- entries[i].offset = 0xffffffff; -- entries[i].type = xrefEntryFree; -+ } while (*p && isdigit(*p)); -+ if (isspace(*p)) { -+ do { -+ ++p; -+ } while (*p && isspace(*p)); -+ if (!strncmp(p, "obj", 3)) { -+ if (num >= size) { -+ newSize = (num + 1 + 255) & ~255; -+ if (newSize < 0) { -+ error(-1, "Bad object number"); -+ return gFalse; -+ } -+ if (newSize*sizeof(XRefEntry)/sizeof(XRefEntry) != newSize) { -+ error(-1, "Invalid 'obj' parameters."); -+ return gFalse; -+ } -+ entries = (XRefEntry *) -+ grealloc(entries, newSize * sizeof(XRefEntry)); -+ for (i = size; i < newSize; ++i) { -+ entries[i].offset = 0xffffffff; -+ entries[i].type = xrefEntryFree; -+ } -+ size = newSize; -+ } -+ if (entries[num].type == xrefEntryFree || -+ gen >= entries[num].gen) { -+ entries[num].offset = pos - start; -+ entries[num].gen = gen; -+ entries[num].type = xrefEntryUncompressed; - } -- size = newSize; -- } -- if (entries[num].type == xrefEntryFree || -- gen >= entries[num].gen) { -- entries[num].offset = pos - start; -- entries[num].gen = gen; -- entries[num].type = xrefEntryUncompressed; - } - } - } -@@ -705,6 +763,10 @@ - } else if (!strncmp(p, "endstream", 9)) { - if (streamEndsLen == streamEndsSize) { - streamEndsSize += 64; -+ if (streamEndsSize*sizeof(int)/sizeof(int) != streamEndsSize) { -+ error(-1, "Invalid 'endstream' parameter."); -+ return gFalse; -+ } - streamEnds = (Guint *)grealloc(streamEnds, - streamEndsSize * sizeof(int)); - } diff --git a/app-text/xpdf/files/xpdf-3.00-pl2.patch b/app-text/xpdf/files/xpdf-3.00-pl2.patch deleted file mode 100644 index 0b5066a61ee7..000000000000 --- a/app-text/xpdf/files/xpdf-3.00-pl2.patch +++ /dev/null @@ -1,54 +0,0 @@ -*** xpdf/Gfx.cc.orig Sun Dec 12 16:04:43 2004 ---- xpdf/Gfx.cc Sun Dec 12 16:05:16 2004 -*************** -*** 2654,2660 **** - haveMask = gFalse; - dict->lookup("Mask", &maskObj); - if (maskObj.isArray()) { -! for (i = 0; i < maskObj.arrayGetLength(); ++i) { - maskObj.arrayGet(i, &obj1); - maskColors[i] = obj1.getInt(); - obj1.free(); ---- 2654,2662 ---- - haveMask = gFalse; - dict->lookup("Mask", &maskObj); - if (maskObj.isArray()) { -! for (i = 0; -! i < maskObj.arrayGetLength() && i < 2*gfxColorMaxComps; -! ++i) { - maskObj.arrayGet(i, &obj1); - maskColors[i] = obj1.getInt(); - obj1.free(); -*** xpdf/GfxState.cc.orig Sun Dec 12 16:04:48 2004 ---- xpdf/GfxState.cc Sun Dec 12 16:06:38 2004 -*************** -*** 708,713 **** ---- 708,718 ---- - } - nCompsA = obj2.getInt(); - obj2.free(); -+ if (nCompsA > gfxColorMaxComps) { -+ error(-1, "ICCBased color space with too many (%d > %d) components", -+ nCompsA, gfxColorMaxComps); -+ nCompsA = gfxColorMaxComps; -+ } - if (dict->lookup("Alternate", &obj2)->isNull() || - !(altA = GfxColorSpace::parse(&obj2))) { - switch (nCompsA) { -*************** -*** 1054,1060 **** - } - nCompsA = obj1.arrayGetLength(); - if (nCompsA > gfxColorMaxComps) { -! error(-1, "DeviceN color space with more than %d > %d components", - nCompsA, gfxColorMaxComps); - nCompsA = gfxColorMaxComps; - } ---- 1059,1065 ---- - } - nCompsA = obj1.arrayGetLength(); - if (nCompsA > gfxColorMaxComps) { -! error(-1, "DeviceN color space with too many (%d > %d) components", - nCompsA, gfxColorMaxComps); - nCompsA = gfxColorMaxComps; - } diff --git a/app-text/xpdf/files/xpdf-3.00-pl3.patch b/app-text/xpdf/files/xpdf-3.00-pl3.patch deleted file mode 100644 index 9000f0b529bf..000000000000 --- a/app-text/xpdf/files/xpdf-3.00-pl3.patch +++ /dev/null @@ -1,14 +0,0 @@ -*** xpdf/XRef.cc.orig Wed Jan 12 17:10:53 2005 ---- xpdf/XRef.cc Wed Jan 12 17:11:22 2005 -*************** -*** 793,798 **** ---- 793,801 ---- - } else { - keyLength = 5; - } -+ if (keyLength > 16) { -+ keyLength = 16; -+ } - permFlags = permissions.getInt(); - if (encVersion >= 1 && encVersion <= 2 && - encRevision >= 2 && encRevision <= 3) { diff --git a/app-text/xpdf/files/xpdf-3.00-scroll-opts.patch b/app-text/xpdf/files/xpdf-3.00-scroll-opts.patch deleted file mode 100644 index 9a661ea621c1..000000000000 --- a/app-text/xpdf/files/xpdf-3.00-scroll-opts.patch +++ /dev/null @@ -1,185 +0,0 @@ -diff -ur xpdf-3.00.org/xpdf/GlobalParams.cc xpdf-3.00/xpdf/GlobalParams.cc ---- xpdf-3.00.org/xpdf/GlobalParams.cc 2004-01-21 20:26:45.000000000 -0500 -+++ xpdf-3.00/xpdf/GlobalParams.cc 2004-12-01 06:33:25.998677321 -0500 -@@ -234,6 +234,8 @@ - enableT1lib = gTrue; - enableFreeType = gTrue; - antialias = gTrue; -+ scrollLines = 1; -+ scrollCols = 1; - urlCommand = NULL; - movieCommand = NULL; - mapNumericCharNames = gTrue; -@@ -445,6 +447,10 @@ - parseYesNo("antialias", &antialias, tokens, fileName, line); - } else if (!cmd->cmp("urlCommand")) { - parseCommand("urlCommand", &urlCommand, tokens, fileName, line); -+ } else if (!cmd->cmp("scrollLines")) { -+ parseInteger("scrollLines", &scrollLines, tokens, fileName, line); -+ } else if (!cmd->cmp("scrollCols")) { -+ parseInteger("scrollCols", &scrollCols, tokens, fileName, line); - } else if (!cmd->cmp("movieCommand")) { - parseCommand("movieCommand", &movieCommand, tokens, fileName, line); - } else if (!cmd->cmp("mapNumericCharNames")) { -@@ -809,6 +815,38 @@ - *val = ((GString *)tokens->get(1))->copy(); - } - -+void GlobalParams::parseInteger(char *cmdName, int *val, -+ GList *tokens, GString *fileName, int line) { -+ char *tok; -+ int value; -+ GBool invalid = gFalse; -+ -+ if (tokens->getLength() != 2) { -+ error(-1, "Bad '%s' config file command (%s:%d)", -+ cmdName, fileName->getCString(), line); -+ return; -+ } -+ tok = ((GString*) tokens->get(1))->getCString(); -+ value = atoi(tok); -+ if (value == 0) { -+ // Verify it's a valid 0 (ie, a string of only '0's) -+ if (*tok != '0') -+ invalid = gTrue; -+ while (!invalid && *tok != '\0') -+ { -+ if (*tok != '0') -+ invalid = gTrue; -+ tok++; -+ } -+ if (invalid) { -+ error(-1, "Bad '%s' config file command (%s:%d)", -+ cmdName, fileName->getCString(), line); -+ return; -+ } -+ } -+ *val = value; -+} -+ - void GlobalParams::parseYesNo(char *cmdName, GBool *flag, - GList *tokens, GString *fileName, int line) { - GString *tok; -diff -ur xpdf-3.00.org/xpdf/GlobalParams.h xpdf-3.00/xpdf/GlobalParams.h ---- xpdf-3.00.org/xpdf/GlobalParams.h 2004-01-21 20:26:45.000000000 -0500 -+++ xpdf-3.00/xpdf/GlobalParams.h 2004-12-01 06:38:10.489040100 -0500 -@@ -156,6 +156,8 @@ - GBool getEnableFreeType(); - GBool getAntialias(); - GString *getURLCommand() { return urlCommand; } -+ int getScrollLines() { return scrollLines; } -+ int getScrollCols() { return scrollCols; } - GString *getMovieCommand() { return movieCommand; } - GBool getMapNumericCharNames(); - GBool getPrintCommands(); -@@ -224,6 +226,8 @@ - void parseInitialZoom(GList *tokens, GString *fileName, int line); - void parseCommand(char *cmdName, GString **val, - GList *tokens, GString *fileName, int line); -+ void parseInteger(char *cmdName, int *val, -+ GList *tokens, GString *fileName, int line); - void parseYesNo(char *cmdName, GBool *flag, - GList *tokens, GString *fileName, int line); - GBool parseYesNo2(char *token, GBool *flag); -@@ -290,6 +294,8 @@ - GBool enableT1lib; // t1lib enable flag - GBool enableFreeType; // FreeType enable flag - GBool antialias; // anti-aliasing enable flag -+ int scrollLines; // How many lines to scroll -+ int scrollCols; // How many columns to scroll - GString *urlCommand; // command executed for URL links - GString *movieCommand; // command executed for movie annotations - GBool mapNumericCharNames; // map numeric char names (from font subsets)? -diff -ur xpdf-3.00.org/xpdf/XPDFCore.cc xpdf-3.00/xpdf/XPDFCore.cc ---- xpdf-3.00.org/xpdf/XPDFCore.cc 2004-01-21 20:26:45.000000000 -0500 -+++ xpdf-3.00/xpdf/XPDFCore.cc 2004-12-01 06:38:54.614635025 -0500 -@@ -686,19 +686,35 @@ - displayPage(history[historyCur].page, zoom, rotate, gFalse, gFalse); - } - --void XPDFCore::scrollLeft(int nCols) { -+void XPDFCore::scrollLeft() { -+ scrollLeft_(globalParams->getScrollCols()); -+} -+ -+void XPDFCore::scrollLeft_(int nCols) { - scrollTo(scrollX - nCols * 16, scrollY); - } - --void XPDFCore::scrollRight(int nCols) { -+void XPDFCore::scrollRight() { -+ scrollRight_(globalParams->getScrollCols()); -+} -+ -+void XPDFCore::scrollRight_(int nCols) { - scrollTo(scrollX + nCols * 16, scrollY); - } - --void XPDFCore::scrollUp(int nLines) { -+void XPDFCore::scrollUp() { -+ scrollUp_(globalParams->getScrollLines()); -+} -+ -+void XPDFCore::scrollUp_(int nLines) { - scrollTo(scrollX, scrollY - nLines * 16); - } - --void XPDFCore::scrollDown(int nLines) { -+void XPDFCore::scrollDown() { -+ scrollDown_(globalParams->getScrollLines()); -+} -+ -+void XPDFCore::scrollDown_(int nLines) { - scrollTo(scrollX, scrollY + nLines * 16); - } - -@@ -1613,7 +1629,7 @@ - } else if (core->scrollY == 0) { - core->gotoPrevPage(1, gFalse, gTrue); - } else { -- core->scrollUp(1); -+ core->scrollUp(); - } - } else if (data->event->xbutton.button == 5) { // mouse wheel down - if (core->fullScreen || -@@ -1621,15 +1637,15 @@ - core->out->getBitmapHeight() - core->drawAreaHeight) { - core->gotoNextPage(1, gTrue); - } else { -- core->scrollDown(1); -+ core->scrollDown(); - } - } else if (data->event->xbutton.button == 6) { // second mouse wheel left - if (!core->fullScreen) { -- core->scrollLeft(1); -+ core->scrollLeft(); - } - } else if (data->event->xbutton.button == 7) { // second mouse wheel right - if (!core->fullScreen) { -- core->scrollRight(1); -+ core->scrollRight(); - } - } else { - if (*core->mouseCbk) { -diff -ur xpdf-3.00.org/xpdf/XPDFCore.h xpdf-3.00/xpdf/XPDFCore.h ---- xpdf-3.00.org/xpdf/XPDFCore.h 2004-01-21 20:26:45.000000000 -0500 -+++ xpdf-3.00/xpdf/XPDFCore.h 2004-12-01 06:19:08.566433277 -0500 -@@ -126,10 +126,14 @@ - void gotoPrevPage(int dec, GBool top, GBool bottom); - void goForward(); - void goBackward(); -- void scrollLeft(int nCols = 1); -- void scrollRight(int nCols = 1); -- void scrollUp(int nLines = 1); -- void scrollDown(int nLines = 1); -+ void scrollLeft(); -+ void scrollRight(); -+ void scrollUp(); -+ void scrollDown(); -+ void scrollLeft_(int nCols = 1); -+ void scrollRight_(int nCols = 1); -+ void scrollUp_(int nLines = 1); -+ void scrollDown_(int nLines = 1); - void scrollPageUp(); - void scrollPageDown(); - void scrollTo(int x, int y); diff --git a/app-text/xpdf/files/xpdf-3.00-security-can-2005-2097.patch b/app-text/xpdf/files/xpdf-3.00-security-can-2005-2097.patch deleted file mode 100644 index 216b05abed98..000000000000 --- a/app-text/xpdf/files/xpdf-3.00-security-can-2005-2097.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- xpdf-3.00/fofi/FoFiTrueType.cc (revision 439182) -+++ xpdf-3.00/fofi/FoFiTrueType.cc (working copy) -@@ -1343,6 +1343,27 @@ - return; - } - -+ // make sure the loca table is sane (correct length and entries are -+ // in bounds) -+ i = seekTable("loca"); -+ if (tables[i].len < (nGlyphs + 1) * (locaFmt ? 4 : 2)) { -+ parsedOk = gFalse; -+ return; -+ } -+ for (j = 0; j <= nGlyphs; ++j) { -+ if (locaFmt) { -+ pos = (int)getU32BE(tables[i].offset + j*4, &parsedOk); -+ } else { -+ pos = getU16BE(tables[i].offset + j*2, &parsedOk); -+ } -+ if (pos < 0 || pos > len) { -+ parsedOk = gFalse; -+ } -+ } -+ if (!parsedOk) { -+ return; -+ } -+ - // read the post table - readPostTable(); - if (!parsedOk) { ---- xpdf-3.00/xpdf/SplashOutputDev.cc (revision 439182) -+++ xpdf-3.00/xpdf/SplashOutputDev.cc (working copy) -@@ -621,16 +621,19 @@ - } - break; - case fontTrueType: -- if (!(ff = FoFiTrueType::load(fileName->getCString()))) { -- goto err2; -+ if ((ff = FoFiTrueType::load(fileName->getCString()))) { -+ codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff); -+ n = 256; -+ delete ff; -+ } else { -+ codeToGID = NULL; -+ n = 0; - } -- codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff); -- delete ff; - if (!(fontFile = fontEngine->loadTrueTypeFont( - id, - fileName->getCString(), - fileName == tmpFileName, -- codeToGID, 256))) { -+ codeToGID, n))) { - error(-1, "Couldn't create a font for '%s'", - gfxFont->getName() ? gfxFont->getName()->getCString() - : "(unnamed)"); diff --git a/app-text/xpdf/files/xpdf-3.00-truetype-new.diff b/app-text/xpdf/files/xpdf-3.00-truetype-new.diff deleted file mode 100644 index 73d22e81e394..000000000000 --- a/app-text/xpdf/files/xpdf-3.00-truetype-new.diff +++ /dev/null @@ -1,98 +0,0 @@ -diff -ruN xpdf.orig/CharCodeToUnicode.h xpdf/CharCodeToUnicode.h ---- xpdf.orig/CharCodeToUnicode.h 2004-01-21 17:26:45.000000000 -0800 -+++ xpdf/CharCodeToUnicode.h 2004-02-12 14:05:30.591633392 -0800 -@@ -67,6 +67,10 @@ - // Map a CharCode to Unicode. - int mapToUnicode(CharCode c, Unicode *u, int size); - -+ // Return the mapping's length, i.e., one more than the max char -+ // code supported by the mapping. -+ CharCode getLength() { return mapLen; } -+ - private: - - void parseCMap1(int (*getCharFunc)(void *), void *data, int nBits); -diff -ruN xpdf.orig/SplashOutputDev.cc xpdf/SplashOutputDev.cc ---- xpdf.orig/SplashOutputDev.cc 2004-01-21 17:26:45.000000000 -0800 -+++ xpdf/SplashOutputDev.cc 2004-02-12 14:05:30.602631720 -0800 -@@ -497,15 +497,18 @@ - FILE *tmpFile; - Gushort *codeToGID; - DisplayFontParam *dfp; -+ CharCodeToUnicode *ctu; - double m11, m12, m21, m22, w1, w2; - SplashCoord mat[4]; - char *name; -- int c, substIdx, n, code; -+ Unicode uBuf[8]; -+ int c, substIdx, n, code, cmap; - - needFontUpdate = gFalse; - font = NULL; - tmpFileName = NULL; - substIdx = -1; -+ dfp = NULL; - - if (!(gfxFont = state->getFont())) { - goto err1; -@@ -544,7 +547,6 @@ - } else if (!(fileName = gfxFont->getExtFontFile())) { - - // look for a display font mapping or a substitute font -- dfp = NULL; - if (gfxFont->isCIDFont()) { - if (((GfxCIDFont *)gfxFont)->getCollection()) { - dfp = globalParams-> -@@ -650,10 +652,48 @@ - } - break; - case fontCIDType2: -- n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen(); -- codeToGID = (Gushort *)gmalloc(n * sizeof(Gushort)); -- memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), -- n * sizeof(Gushort)); -+ codeToGID = NULL; -+ n = 0; -+ if (dfp) { -+ // create a CID-to-GID mapping, via Unicode -+ if ((ctu = ((GfxCIDFont *)gfxFont)->getToUnicode())) { -+ if ((ff = FoFiTrueType::load(fileName->getCString()))) { -+ // look for a Unicode cmap -+ for (cmap = 0; cmap < ff->getNumCmaps(); ++cmap) { -+ if ((ff->getCmapPlatform(cmap) == 3 && -+ ff->getCmapEncoding(cmap) == 1) || -+ ff->getCmapPlatform(cmap) == 0) { -+ break; -+ } -+ } -+ if (cmap < ff->getNumCmaps()) { -+ // map CID -> Unicode -> GID -+ n = ctu->getLength(); -+ codeToGID = (Gushort *)gmalloc(n * sizeof(Gushort)); -+ for (code = 0; code < n; ++code) { -+ if (ctu->mapToUnicode(code, uBuf, 8) > 0) { -+ codeToGID[code] = ff->mapCodeToGID(cmap, uBuf[0]); -+ } else { -+ codeToGID[code] = 0; -+ } -+ } -+ } -+ delete ff; -+ } -+ ctu->decRefCnt(); -+ } else { -+ error(-1, "Couldn't find a mapping to Unicode for font '%s'", -+ gfxFont->getName() ? gfxFont->getName()->getCString() -+ : "(unnamed)"); -+ } -+ } else { -+ if (((GfxCIDFont *)gfxFont)->getCIDToGID()) { -+ n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen(); -+ codeToGID = (Gushort *)gmalloc(n * sizeof(Gushort)); -+ memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), -+ n * sizeof(Gushort)); -+ } -+ } - if (!(fontFile = fontEngine->loadTrueTypeFont( - id, - fileName->getCString(), diff --git a/app-text/xpdf/files/xpdf-3.01-crash.patch b/app-text/xpdf/files/xpdf-3.01-crash.patch deleted file mode 100644 index 21e60b3bfd7a..000000000000 --- a/app-text/xpdf/files/xpdf-3.01-crash.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- xpdf-3.00/splash/Splash.cc.tn 2005-07-25 09:59:45.000000000 +0200 -+++ xpdf-3.00/splash/Splash.cc 2005-07-25 10:00:58.000000000 +0200 -@@ -636,6 +641,11 @@ - - xPath = new SplashXPath(path, state->flatness, gTrue); - xPath->sort(); -+ if (!&xPath->segs[0]) -+ { -+ delete xPath; -+ return splashErrEmptyPath; -+ } - scanner = new SplashXPathScanner(xPath, eo); - - // get the min and max x and y values ---- xpdf-3.00/fofi/FoFiType1.cc.tn 2005-07-25 10:34:04.000000000 +0200 -+++ xpdf-3.00/fofi/FoFiType1.cc 2005-07-25 10:41:37.000000000 +0200 -@@ -187,9 +187,14 @@ - } - } - } else { -- if (strtok(buf, " \t") && -- (p = strtok(NULL, " \t\n\r")) && !strcmp(p, "def")) { -- break; -+ p = strtok(buf, " \t\n\r"); -+ if (p) -+ { -+ if (!strcmp(p, "def")) break; -+ if (!strcmp(p, "readonly")) break; -+ // the spec does not says this but i'm mantaining old xpdf behaviour that accepts "foo def" as end of the encoding array -+ p = strtok(buf, " \t\n\r"); -+ if (p && !strcmp(p, "def")) break; - } - } - line = line1; diff --git a/app-text/xpdf/files/xpdf-3.01-nodrm.patch b/app-text/xpdf/files/xpdf-3.01-nodrm.patch deleted file mode 100644 index c657a2645525..000000000000 --- a/app-text/xpdf/files/xpdf-3.01-nodrm.patch +++ /dev/null @@ -1,104 +0,0 @@ -diff -u xpdf-3.01.orig/xpdf/PDFCore.cc xpdf-3.01/xpdf/PDFCore.cc ---- xpdf-3.01.orig/xpdf/PDFCore.cc 2005-10-05 16:29:19.000000000 +0200 -+++ xpdf-3.01/xpdf/PDFCore.cc 2005-10-05 16:29:28.000000000 +0200 -@@ -1273,9 +1273,6 @@ - int x0, y0, x1, y1, t; - GString *s; - -- if (!doc->okToCopy()) { -- return NULL; -- } - if ((page = findPage(pg))) { - cvtUserToDev(pg, xMin, yMin, &x0, &y0); - cvtUserToDev(pg, xMax, yMax, &x1, &y1); -diff -u xpdf-3.01.orig/xpdf/pdfimages.cc xpdf-3.01/xpdf/pdfimages.cc ---- xpdf-3.01.orig/xpdf/pdfimages.cc 2005-10-05 16:29:19.000000000 +0200 -+++ xpdf-3.01/xpdf/pdfimages.cc 2005-10-05 16:29:28.000000000 +0200 -@@ -118,13 +118,6 @@ - goto err1; - } - -- // check for copy permission -- if (!doc->okToCopy()) { -- error(-1, "Copying of images from this document is not allowed."); -- exitCode = 3; -- goto err1; -- } -- - // get page range - if (firstPage < 1) - firstPage = 1; -diff -u xpdf-3.01.orig/xpdf/pdftops.cc xpdf-3.01/xpdf/pdftops.cc ---- xpdf-3.01.orig/xpdf/pdftops.cc 2005-10-05 16:29:19.000000000 +0200 -+++ xpdf-3.01/xpdf/pdftops.cc 2005-10-05 16:29:28.000000000 +0200 -@@ -269,13 +269,6 @@ - goto err1; - } - -- // check for print permission -- if (!doc->okToPrint()) { -- error(-1, "Printing this document is not allowed."); -- exitCode = 3; -- goto err1; -- } -- - // construct PostScript file name - if (argc == 3) { - psFileName = new GString(argv[2]); -diff -u xpdf-3.01.orig/xpdf/pdftotext.cc xpdf-3.01/xpdf/pdftotext.cc ---- xpdf-3.01.orig/xpdf/pdftotext.cc 2005-10-05 16:29:19.000000000 +0200 -+++ xpdf-3.01/xpdf/pdftotext.cc 2005-10-05 16:29:28.000000000 +0200 -@@ -160,13 +160,6 @@ - goto err2; - } - -- // check for copy permission -- if (!doc->okToCopy()) { -- error(-1, "Copying of text from this document is not allowed."); -- exitCode = 3; -- goto err2; -- } -- - // construct text file name - if (argc == 3) { - textFileName = new GString(argv[2]); -diff -u xpdf-3.01.orig/xpdf/XPDFCore.cc xpdf-3.01/xpdf/XPDFCore.cc ---- xpdf-3.01.orig/xpdf/XPDFCore.cc 2005-10-05 16:29:19.000000000 +0200 -+++ xpdf-3.01/xpdf/XPDFCore.cc 2005-10-05 16:29:28.000000000 +0200 -@@ -377,9 +377,6 @@ - int pg; - double ulx, uly, lrx, lry; - -- if (!doc->okToCopy()) { -- return; -- } - if (getSelection(&pg, &ulx, &uly, &lrx, &lry)) { - //~ for multithreading: need a mutex here - if (currentSelection) { -@@ -1108,11 +1105,7 @@ - #ifndef NO_TEXT_SELECT - if (core->selectULX != core->selectLRX && - core->selectULY != core->selectLRY) { -- if (core->doc->okToCopy()) { -- core->copySelection(); -- } else { -- error(-1, "Copying of text from this document is not allowed."); -- } -+ core->copySelection(); - } - #endif - } -diff -u xpdf-3.01.orig/xpdf/XPDFViewer.cc xpdf-3.01/xpdf/XPDFViewer.cc ---- xpdf-3.01.orig/xpdf/XPDFViewer.cc 2005-10-05 16:29:19.000000000 +0200 -+++ xpdf-3.01/xpdf/XPDFViewer.cc 2005-10-05 16:29:28.000000000 +0200 -@@ -2391,10 +2391,6 @@ - PSOutputDev *psOut; - - doc = viewer->core->getDoc(); -- if (!doc->okToPrint()) { -- error(-1, "Printing this document is not allowed."); -- return; -- } - - viewer->core->setBusyCursor(gTrue); - diff --git a/app-text/xpdf/files/xpdf-3.01-onlyx.patch b/app-text/xpdf/files/xpdf-3.01-onlyx.patch deleted file mode 100644 index 37deb68534eb..000000000000 --- a/app-text/xpdf/files/xpdf-3.01-onlyx.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff --exclude-from=/home/dang/.diffrc -u -ruN xpdf-3.01.orig/Makefile.in xpdf-3.01/Makefile.in ---- xpdf-3.01.orig/Makefile.in 2005-12-27 12:35:34.000000000 -0500 -+++ xpdf-3.01/Makefile.in 2005-12-27 12:38:00.000000000 -0500 -@@ -37,61 +37,21 @@ - cd @UP_DIR@splash; $(MAKE) - cd @UP_DIR@xpdf; $(MAKE) xpdf$(EXE) - --pdftops: dummy -- cd goo; $(MAKE) -- cd @UP_DIR@fofi; $(MAKE) -- cd @UP_DIR@splash; $(MAKE) -- cd @UP_DIR@xpdf; $(MAKE) pdftops$(EXE) -- --pdftotext: dummy -- cd goo; $(MAKE) -- cd @UP_DIR@fofi; $(MAKE) -- cd @UP_DIR@splash; $(MAKE) -- cd @UP_DIR@xpdf; $(MAKE) pdftotext$(EXE) -- --pdfinfo: -- cd goo; $(MAKE) -- cd @UP_DIR@fofi; $(MAKE) -- cd @UP_DIR@splash; $(MAKE) -- cd @UP_DIR@xpdf; $(MAKE) pdfinfo$(EXE) -- --pdffonts: -- cd goo; $(MAKE) -- cd @UP_DIR@fofi; $(MAKE) -- cd @UP_DIR@splash; $(MAKE) -- cd @UP_DIR@xpdf; $(MAKE) pdffonts$(EXE) -- - pdftoppm: - cd goo; $(MAKE) - cd @UP_DIR@fofi; $(MAKE) - cd @UP_DIR@splash; $(MAKE) - cd @UP_DIR@xpdf; $(MAKE) pdftoppm$(EXE) - --pdfimages: -- cd goo; $(MAKE) -- cd @UP_DIR@fofi; $(MAKE) -- cd @UP_DIR@splash; $(MAKE) -- cd @UP_DIR@xpdf; $(MAKE) pdfimages$(EXE) -- - dummy: - - install: dummy - -mkdir -p $(DESTDIR)@bindir@ - @X@ $(INSTALL_PROGRAM) xpdf/xpdf$(EXE) $(DESTDIR)@bindir@/xpdf$(EXE) -- $(INSTALL_PROGRAM) xpdf/pdftops$(EXE) $(DESTDIR)@bindir@/pdftops$(EXE) -- $(INSTALL_PROGRAM) xpdf/pdftotext$(EXE) $(DESTDIR)@bindir@/pdftotext$(EXE) -- $(INSTALL_PROGRAM) xpdf/pdfinfo$(EXE) $(DESTDIR)@bindir@/pdfinfo$(EXE) -- $(INSTALL_PROGRAM) xpdf/pdffonts$(EXE) $(DESTDIR)@bindir@/pdffonts$(EXE) - $(INSTALL_PROGRAM) xpdf/pdftoppm$(EXE) $(DESTDIR)@bindir@/pdftoppm$(EXE) -- $(INSTALL_PROGRAM) xpdf/pdfimages$(EXE) $(DESTDIR)@bindir@/pdfimages$(EXE) - -mkdir -p $(DESTDIR)@mandir@/man1 - @X@ $(INSTALL_DATA) $(srcdir)/doc/xpdf.1 $(DESTDIR)@mandir@/man1/xpdf.1 -- $(INSTALL_DATA) $(srcdir)/doc/pdftops.1 $(DESTDIR)@mandir@/man1/pdftops.1 -- $(INSTALL_DATA) $(srcdir)/doc/pdftotext.1 $(DESTDIR)@mandir@/man1/pdftotext.1 -- $(INSTALL_DATA) $(srcdir)/doc/pdfinfo.1 $(DESTDIR)@mandir@/man1/pdfinfo.1 -- $(INSTALL_DATA) $(srcdir)/doc/pdffonts.1 $(DESTDIR)@mandir@/man1/pdffonts.1 - $(INSTALL_DATA) $(srcdir)/doc/pdftoppm.1 $(DESTDIR)@mandir@/man1/pdftoppm.1 -- $(INSTALL_DATA) $(srcdir)/doc/pdfimages.1 $(DESTDIR)@mandir@/man1/pdfimages.1 - -mkdir -p $(DESTDIR)@mandir@/man5 - $(INSTALL_DATA) $(srcdir)/doc/xpdfrc.5 $(DESTDIR)@mandir@/man5/xpdfrc.5 - -mkdir -p $(DESTDIR)@sysconfdir@ -diff --exclude-from=/home/dang/.diffrc -u -ruN xpdf-3.01.orig/xpdf/Makefile.in xpdf-3.01/xpdf/Makefile.in ---- xpdf-3.01.orig/xpdf/Makefile.in 2005-12-27 12:35:34.000000000 -0500 -+++ xpdf-3.01/xpdf/Makefile.in 2005-12-27 12:39:38.000000000 -0500 -@@ -105,11 +105,9 @@ - - #------------------------------------------------------------------------ - --all: xpdf$(EXE) pdftops$(EXE) pdftotext$(EXE) pdfinfo$(EXE) \ -- pdffonts$(EXE) pdftoppm$(EXE) pdfimages$(EXE) -+all: xpdf$(EXE) pdftoppm$(EXE) - --all-no-x: pdftops$(EXE) pdftotext$(EXE) pdfinfo$(EXE) pdffonts$(EXE) \ -- pdftoppm$(EXE) pdfimages$(EXE) -+all-no-x: pdftoppm$(EXE) - - #------------------------------------------------------------------------ - diff --git a/app-text/xpdf/files/xpdf-3.01-pdftoppm.patch b/app-text/xpdf/files/xpdf-3.01-pdftoppm.patch deleted file mode 100644 index 7e0dc988309c..000000000000 --- a/app-text/xpdf/files/xpdf-3.01-pdftoppm.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -urN xpdf-3.01/Makefile.in xpdf-3.01-pdftoppm-no_X-patch/Makefile.in ---- xpdf-3.01/Makefile.in 2005-08-17 07:34:30.000000000 +0200 -+++ xpdf-3.01-pdftoppm-no_X-patch/Makefile.in 2005-09-12 23:12:25.272986000 +0200 -@@ -82,7 +82,7 @@ - $(INSTALL_PROGRAM) xpdf/pdftotext$(EXE) $(DESTDIR)@bindir@/pdftotext$(EXE) - $(INSTALL_PROGRAM) xpdf/pdfinfo$(EXE) $(DESTDIR)@bindir@/pdfinfo$(EXE) - $(INSTALL_PROGRAM) xpdf/pdffonts$(EXE) $(DESTDIR)@bindir@/pdffonts$(EXE) --@X@ $(INSTALL_PROGRAM) xpdf/pdftoppm$(EXE) $(DESTDIR)@bindir@/pdftoppm$(EXE) -+ $(INSTALL_PROGRAM) xpdf/pdftoppm$(EXE) $(DESTDIR)@bindir@/pdftoppm$(EXE) - $(INSTALL_PROGRAM) xpdf/pdfimages$(EXE) $(DESTDIR)@bindir@/pdfimages$(EXE) - -mkdir -p $(DESTDIR)@mandir@/man1 - @X@ $(INSTALL_DATA) $(srcdir)/doc/xpdf.1 $(DESTDIR)@mandir@/man1/xpdf.1 -@@ -90,7 +90,7 @@ - $(INSTALL_DATA) $(srcdir)/doc/pdftotext.1 $(DESTDIR)@mandir@/man1/pdftotext.1 - $(INSTALL_DATA) $(srcdir)/doc/pdfinfo.1 $(DESTDIR)@mandir@/man1/pdfinfo.1 - $(INSTALL_DATA) $(srcdir)/doc/pdffonts.1 $(DESTDIR)@mandir@/man1/pdffonts.1 --@X@ $(INSTALL_DATA) $(srcdir)/doc/pdftoppm.1 $(DESTDIR)@mandir@/man1/pdftoppm.1 -+ $(INSTALL_DATA) $(srcdir)/doc/pdftoppm.1 $(DESTDIR)@mandir@/man1/pdftoppm.1 - $(INSTALL_DATA) $(srcdir)/doc/pdfimages.1 $(DESTDIR)@mandir@/man1/pdfimages.1 - -mkdir -p $(DESTDIR)@mandir@/man5 - $(INSTALL_DATA) $(srcdir)/doc/xpdfrc.5 $(DESTDIR)@mandir@/man5/xpdfrc.5 -diff -urN xpdf-3.01/xpdf/Makefile.in xpdf-3.01-pdftoppm-no_X-patch/xpdf/Makefile.in ---- xpdf-3.01/xpdf/Makefile.in 2005-08-17 07:34:31.000000000 +0200 -+++ xpdf-3.01-pdftoppm-no_X-patch/xpdf/Makefile.in 2005-09-12 23:27:53.903705325 +0200 -@@ -109,7 +109,7 @@ - pdffonts$(EXE) pdftoppm$(EXE) pdfimages$(EXE) - - all-no-x: pdftops$(EXE) pdftotext$(EXE) pdfinfo$(EXE) pdffonts$(EXE) \ -- pdfimages$(EXE) -+ pdftoppm$(EXE) pdfimages$(EXE) - - #------------------------------------------------------------------------ - diff --git a/app-text/xpdf/files/xpdf-3.01-resize.patch b/app-text/xpdf/files/xpdf-3.01-resize.patch deleted file mode 100644 index c1240c3406f0..000000000000 --- a/app-text/xpdf/files/xpdf-3.01-resize.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- xpdf-3.01/xpdf/XPDFCore.cc.resize 2005-10-06 23:40:10.000000000 +0200 -+++ xpdf-3.01/xpdf/XPDFCore.cc 2005-10-06 23:40:10.000000000 +0200 -@@ -979,6 +979,9 @@ - XPDFCore *core = (XPDFCore *)ptr; - XEvent event; - Widget top; -+ Window rootWin; -+ int x1, y1; -+ Guint w1, h1, bw1, depth1; - Arg args[2]; - int n; - Dimension w, h; -@@ -986,15 +989,20 @@ - - // find the top-most widget which has an associated window, and look - // for a pending ConfigureNotify in the event queue -- if there is -- // one, that means we're still resizing, and we want to skip the -- // current event -+ // one, and it specifies a different width or height, that means -+ // we're still resizing, and we want to skip the current event - for (top = core->parentWidget; - XtParent(top) && XtWindow(XtParent(top)); - top = XtParent(top)) ; - if (XCheckTypedWindowEvent(core->display, XtWindow(top), - ConfigureNotify, &event)) { - XPutBackEvent(core->display, &event); -- return; -+ XGetGeometry(core->display, event.xconfigure.window, -+ &rootWin, &x1, &y1, &w1, &h1, &bw1, &depth1); -+ if ((Guint)event.xconfigure.width != w1 || -+ (Guint)event.xconfigure.height != h1) { -+ return; -+ } - } - - n = 0; diff --git a/app-text/xpdf/files/xpdf-3.01-sec-rollup.patch b/app-text/xpdf/files/xpdf-3.01-sec-rollup.patch deleted file mode 100644 index 04d2f5673e90..000000000000 --- a/app-text/xpdf/files/xpdf-3.01-sec-rollup.patch +++ /dev/null @@ -1,266 +0,0 @@ -diff --exclude-from=/home/dang/.diffrc -u -ruN xpdf-3.01.orig/xpdf/JBIG2Stream.cc xpdf-3.01/xpdf/JBIG2Stream.cc ---- xpdf-3.01.orig/xpdf/JBIG2Stream.cc 2005-08-17 01:34:31.000000000 -0400 -+++ xpdf-3.01/xpdf/JBIG2Stream.cc 2006-01-05 14:48:26.000000000 -0500 -@@ -7,6 +7,7 @@ - //======================================================================== - - #include <aconf.h> -+#include <limits.h> - - #ifdef USE_GCC_PRAGMAS - #pragma implementation -@@ -681,6 +682,13 @@ - w = wA; - h = hA; - line = (wA + 7) >> 3; -+ -+ 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; -@@ -692,6 +700,13 @@ - w = bitmap->w; - h = bitmap->h; - line = bitmap->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); -@@ -720,7 +735,10 @@ - } - - 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; - } - // need to allocate one extra guard byte for use in combine() -@@ -2305,6 +2323,15 @@ - 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; -@@ -2936,6 +2963,11 @@ - 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(); - -diff --exclude-from=/home/dang/.diffrc -u -ruN xpdf-3.01.orig/xpdf/JPXStream.cc xpdf-3.01/xpdf/JPXStream.cc ---- xpdf-3.01.orig/xpdf/JPXStream.cc 2005-08-17 01:34:31.000000000 -0400 -+++ xpdf-3.01/xpdf/JPXStream.cc 2006-01-05 14:49:33.000000000 -0500 -@@ -7,6 +7,7 @@ - //======================================================================== - - #include <aconf.h> -+#include <limits.h> - - #ifdef USE_GCC_PRAGMAS - #pragma implementation -@@ -783,7 +784,7 @@ - int segType; - GBool haveSIZ, haveCOD, haveQCD, haveSOT; - Guint precinctSize, style; -- Guint segLen, capabilities, comp, i, j, r; -+ Guint segLen, capabilities, nTiles, comp, i, j, r; - - //----- main header - haveSIZ = haveCOD = haveQCD = haveSOT = gFalse; -@@ -818,8 +819,19 @@ - / img.xTileSize; - img.nYTiles = (img.ySize - img.yTileOffset + img.yTileSize - 1) - / img.yTileSize; -- img.tiles = (JPXTile *)gmallocn(img.nXTiles * img.nYTiles, -- sizeof(JPXTile)); -+ // check for overflow before allocating memory -+ if (img.nXTiles <= 0 || img.nYTiles <= 0 || -+ img.nXTiles >= INT_MAX/img.nYTiles) { -+ error(getPos(), "Bad tile count in JPX SIZ marker segment"); -+ return gFalse; -+ } -+ nTiles = img.nXTiles * img.nYTiles; -+ if (nTiles >= INT_MAX/sizeof(JPXTile)) { -+ error(getPos(), "Bad tile count in JPX SIZ marker segment"); -+ return gFalse; -+ } -+ img.tiles = (JPXTile *)gmalloc(nTiles * sizeof(JPXTile)); -+ - for (i = 0; i < img.nXTiles * img.nYTiles; ++i) { - img.tiles[i].tileComps = (JPXTileComp *)gmallocn(img.nComps, - sizeof(JPXTileComp)); -diff --exclude-from=/home/dang/.diffrc -u -ruN xpdf-3.01.orig/xpdf/Stream.cc xpdf-3.01/xpdf/Stream.cc ---- xpdf-3.01.orig/xpdf/Stream.cc 2005-08-17 01:34:31.000000000 -0400 -+++ xpdf-3.01/xpdf/Stream.cc 2006-01-05 14:50:31.000000000 -0500 -@@ -15,6 +15,7 @@ - #include <stdio.h> - #include <stdlib.h> - #include <stddef.h> -+#include <limits.h> - #ifndef WIN32 - #include <unistd.h> - #endif -@@ -406,13 +407,28 @@ - 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() { -@@ -1004,6 +1020,10 @@ - FilterStream(strA) { - if (predictor != 1) { - pred = new StreamPredictor(this, predictor, columns, colors, bits); -+ if (!pred->isOk()) { -+ delete pred; -+ pred = NULL; -+ } - } else { - pred = NULL; - } -@@ -1256,8 +1276,9 @@ - endOfLine = endOfLineA; - byteAlign = byteAlignA; - columns = columnsA; -- if (columns < 1) { -- columns = 1; -+ if (columns < 1 || columns >= INT_MAX / sizeof(short)) { -+ error(-1, "invalid number of columns: %d", columns); -+ exit(1); - } - rows = rowsA; - endOfBlock = endOfBlockA; -@@ -2899,6 +2920,11 @@ - 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; -@@ -2925,6 +2951,11 @@ - 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; -@@ -2947,6 +2978,11 @@ - - length = read16() - 2; - scanInfo.numComps = str->getChar(); -+ if (scanInfo.numComps <= 0 || scanInfo.numComps > 4) { -+ scanInfo.numComps = 0; -+ 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"); -@@ -3031,12 +3067,12 @@ - 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]; -@@ -3827,6 +3863,10 @@ - FilterStream(strA) { - if (predictor != 1) { - pred = new StreamPredictor(this, predictor, columns, colors, bits); -+ if (!pred->isOk()) { -+ delete pred; -+ pred = NULL; -+ } - } else { - pred = NULL; - } -diff --exclude-from=/home/dang/.diffrc -u -ruN xpdf-3.01.orig/xpdf/Stream.h xpdf-3.01/xpdf/Stream.h ---- xpdf-3.01.orig/xpdf/Stream.h 2005-08-17 01:34:31.000000000 -0400 -+++ xpdf-3.01/xpdf/Stream.h 2006-01-05 14:44:31.000000000 -0500 -@@ -232,6 +232,8 @@ - - ~StreamPredictor(); - -+ GBool isOk() { return ok; } -+ - int lookChar(); - int getChar(); - -@@ -249,6 +251,7 @@ - int rowBytes; // bytes per line - Guchar *predLine; // line buffer - int predIdx; // current index in predLine -+ GBool ok; - }; - - //------------------------------------------------------------------------ diff --git a/app-text/xpdf/files/xpdf-3.01pl1.patch b/app-text/xpdf/files/xpdf-3.01pl1.patch deleted file mode 100644 index 8b038ad56f0d..000000000000 --- a/app-text/xpdf/files/xpdf-3.01pl1.patch +++ /dev/null @@ -1,168 +0,0 @@ -diff -c -r xpdf-3.01-orig/xpdf/JPXStream.cc xpdf-3.01/xpdf/JPXStream.cc -*** xpdf-3.01-orig/xpdf/JPXStream.cc Tue Aug 16 22:34:31 2005 ---- xpdf-3.01/xpdf/JPXStream.cc Thu Nov 3 16:50:39 2005 -*************** -*** 783,789 **** - int segType; - GBool haveSIZ, haveCOD, haveQCD, haveSOT; - Guint precinctSize, style; -! Guint segLen, capabilities, comp, i, j, r; - - //----- main header - haveSIZ = haveCOD = haveQCD = haveSOT = gFalse; ---- 783,789 ---- - int segType; - GBool haveSIZ, haveCOD, haveQCD, haveSOT; - Guint precinctSize, style; -! Guint segLen, capabilities, nTiles, comp, i, j, r; - - //----- main header - haveSIZ = haveCOD = haveQCD = haveSOT = gFalse; -*************** -*** 818,825 **** - / img.xTileSize; - img.nYTiles = (img.ySize - img.yTileOffset + img.yTileSize - 1) - / img.yTileSize; -! img.tiles = (JPXTile *)gmallocn(img.nXTiles * img.nYTiles, -! sizeof(JPXTile)); - for (i = 0; i < img.nXTiles * img.nYTiles; ++i) { - img.tiles[i].tileComps = (JPXTileComp *)gmallocn(img.nComps, - sizeof(JPXTileComp)); ---- 818,830 ---- - / img.xTileSize; - img.nYTiles = (img.ySize - img.yTileOffset + img.yTileSize - 1) - / img.yTileSize; -! nTiles = img.nXTiles * img.nYTiles; -! // check for overflow before allocating memory -! if (nTiles == 0 || nTiles / img.nXTiles != img.nYTiles) { -! error(getPos(), "Bad tile count in JPX SIZ marker segment"); -! return gFalse; -! } -! img.tiles = (JPXTile *)gmallocn(nTiles, sizeof(JPXTile)); - for (i = 0; i < img.nXTiles * img.nYTiles; ++i) { - img.tiles[i].tileComps = (JPXTileComp *)gmallocn(img.nComps, - sizeof(JPXTileComp)); -diff -c -r xpdf-3.01-orig/xpdf/Stream.cc xpdf-3.01/xpdf/Stream.cc -*** xpdf-3.01-orig/xpdf/Stream.cc Tue Aug 16 22:34:31 2005 ---- xpdf-3.01/xpdf/Stream.cc Thu Nov 3 16:50:39 2005 -*************** -*** 401,418 **** - - StreamPredictor::StreamPredictor(Stream *strA, int predictorA, - int widthA, int nCompsA, int nBitsA) { - str = strA; - predictor = predictorA; - width = widthA; - nComps = nCompsA; - nBits = nBitsA; - - nVals = width * nComps; - pixBytes = (nComps * nBits + 7) >> 3; -! rowBytes = ((nVals * nBits + 7) >> 3) + pixBytes; - predLine = (Guchar *)gmalloc(rowBytes); - memset(predLine, 0, rowBytes); - predIdx = rowBytes; - } - - StreamPredictor::~StreamPredictor() { ---- 401,433 ---- - - StreamPredictor::StreamPredictor(Stream *strA, int predictorA, - int widthA, int nCompsA, int nBitsA) { -+ int totalBits; -+ - str = strA; - predictor = predictorA; - width = widthA; - nComps = nCompsA; - nBits = nBitsA; -+ predLine = NULL; -+ ok = gFalse; - - nVals = width * nComps; -+ totalBits = nVals * nBits; -+ if (totalBits == 0 || -+ (totalBits / nBits) / nComps != width || -+ totalBits + 7 < 0) { -+ return; -+ } - pixBytes = (nComps * nBits + 7) >> 3; -! rowBytes = ((totalBits + 7) >> 3) + pixBytes; -! if (rowBytes < 0) { -! return; -! } - predLine = (Guchar *)gmalloc(rowBytes); - memset(predLine, 0, rowBytes); - predIdx = rowBytes; -+ -+ ok = gTrue; - } - - StreamPredictor::~StreamPredictor() { -*************** -*** 1004,1009 **** ---- 1019,1028 ---- - FilterStream(strA) { - if (predictor != 1) { - pred = new StreamPredictor(this, predictor, columns, colors, bits); -+ if (!pred->isOk()) { -+ delete pred; -+ pred = NULL; -+ } - } else { - pred = NULL; - } -*************** -*** 2899,2904 **** ---- 2918,2931 ---- - height = read16(); - width = read16(); - numComps = str->getChar(); -+ if (numComps <= 0 || numComps > 4) { -+ error(getPos(), "Bad number of components in DCT stream", prec); -+ return gFalse; -+ } -+ if (numComps <= 0 || numComps > 4) { -+ error(getPos(), "Bad number of components in DCT stream", prec); -+ return gFalse; -+ } - if (prec != 8) { - error(getPos(), "Bad DCT precision %d", prec); - return gFalse; -*************** -*** 3827,3832 **** ---- 3854,3863 ---- - FilterStream(strA) { - if (predictor != 1) { - pred = new StreamPredictor(this, predictor, columns, colors, bits); -+ if (!pred->isOk()) { -+ delete pred; -+ pred = NULL; -+ } - } else { - pred = NULL; - } -diff -c -r xpdf-3.01-orig/xpdf/Stream.h xpdf-3.01/xpdf/Stream.h -*** xpdf-3.01-orig/xpdf/Stream.h Tue Aug 16 22:34:31 2005 ---- xpdf-3.01/xpdf/Stream.h Thu Nov 3 16:50:39 2005 -*************** -*** 232,237 **** ---- 232,239 ---- - - ~StreamPredictor(); - -+ GBool isOk() { return ok; } -+ - int lookChar(); - int getChar(); - -*************** -*** 249,254 **** ---- 251,257 ---- - int rowBytes; // bytes per line - Guchar *predLine; // line buffer - int predIdx; // current index in predLine -+ GBool ok; - }; - - //------------------------------------------------------------------------ diff --git a/app-text/xpdf/files/xpdf-goo-sizet.patch b/app-text/xpdf/files/xpdf-goo-sizet.patch deleted file mode 100644 index 5d90c5120bd4..000000000000 --- a/app-text/xpdf/files/xpdf-goo-sizet.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff -ru xpdf-2.02pl1/goo/gmem.c xpdf-2.02pl1/goo/gmem.c ---- xpdf-2.02pl1/goo/gmem.c 2003-06-16 22:01:26.000000000 +0200 -+++ xpdf-2.02pl1/goo/gmem.c 2004-10-29 15:13:34.866919791 +0200 -@@ -53,9 +53,9 @@ - - #endif /* DEBUG_MEM */ - --void *gmalloc(int size) { -+void *gmalloc(size_t size) { - #ifdef DEBUG_MEM -- int size1; -+ size_t size1; - char *mem; - GMemHdr *hdr; - void *data; -@@ -94,11 +94,11 @@ - #endif - } - --void *grealloc(void *p, int size) { -+void *grealloc(void *p, size_t size) { - #ifdef DEBUG_MEM - GMemHdr *hdr; - void *q; -- int oldSize; -+ size_t oldSize; - - if (size == 0) { - if (p) -@@ -137,7 +137,7 @@ - - void gfree(void *p) { - #ifdef DEBUG_MEM -- int size; -+ size_t size; - GMemHdr *hdr; - GMemHdr *prevHdr, *q; - int lst; -diff -ru xpdf-2.02pl1/goo/gmem.h xpdf-2.02pl1/goo/gmem.h ---- xpdf-2.02pl1/goo/gmem.h 2003-06-16 22:01:26.000000000 +0200 -+++ xpdf-2.02pl1/goo/gmem.h 2004-10-29 15:13:50.864027201 +0200 -@@ -19,13 +19,13 @@ - * Same as malloc, but prints error message and exits if malloc() - * returns NULL. - */ --extern void *gmalloc(int size); -+extern void *gmalloc(size_t size); - - /* - * Same as realloc, but prints error message and exits if realloc() - * returns NULL. If <p> is NULL, calls malloc instead of realloc(). - */ --extern void *grealloc(void *p, int size); -+extern void *grealloc(void *p, size_t size); - - /* - * Same as free, but checks for and ignores NULL pointers. diff --git a/app-text/xpdf/files/xpdfrc.1 b/app-text/xpdf/files/xpdfrc.1 deleted file mode 100644 index cdab040840ea..000000000000 --- a/app-text/xpdf/files/xpdfrc.1 +++ /dev/null @@ -1,20 +0,0 @@ -displayFontT1 Times-Roman /usr/share/fonts/default/ghostscript/n021003l.pfb -displayFontT1 Times-Italic /usr/share/fonts/default/ghostscript/n021023l.pfb -displayFontT1 Times-Bold /usr/share/fonts/default/ghostscript/n021004l.pfb -displayFontT1 Times-BoldItalic /usr/share/fonts/default/ghostscript/n021024l.pfb -displayFontT1 Helvetica /usr/share/fonts/default/ghostscript/n019003l.pfb -displayFontT1 Helvetica-Oblique /usr/share/fonts/default/ghostscript/n019023l.pfb -displayFontT1 Helvetica-Bold /usr/share/fonts/default/ghostscript/n019004l.pfb -displayFontT1 Helvetica-BoldOblique /usr/share/fonts/default/ghostscript/n019024l.pfb -displayFontT1 Courier /usr/share/fonts/default/ghostscript/n022003l.pfb -displayFontT1 Courier-Oblique /usr/share/fonts/default/ghostscript/n022023l.pfb -displayFontT1 Courier-Bold /usr/share/fonts/default/ghostscript/n022004l.pfb -displayFontT1 Courier-BoldOblique /usr/share/fonts/default/ghostscript/n022024l.pfb -displayFontT1 Symbol /usr/share/fonts/default/ghostscript/s050000l.pfb -displayFontT1 ZapfDingbats /usr/share/fonts/default/ghostscript/d050000l.pfb - -displayCIDFontTT Adobe-Japan1 "/usr/share/fonts/kochi-substitute/kochi-gothic-subst.ttf" -displayCIDFontTT Adobe-CNS1 "/usr/share/fonts/arphicfonts/bkai00mp.ttf" -displayCIDFontTT Adobe-GB1 "/usr/share/fonts/arphicfonts/gkai00mp.ttf" -displayCIDFontTT Adobe-Korea1 "/usr/share/fonts/baekmuk-fonts/batang.ttf" -displayCIDFontTT Unidocs-Korea1 "/usr/share/fonts/baekmuk-fonts/batang.ttf" diff --git a/app-text/xpdf/xpdf-3.00-r10.ebuild b/app-text/xpdf/xpdf-3.00-r10.ebuild deleted file mode 100644 index 75c66c065d1f..000000000000 --- a/app-text/xpdf/xpdf-3.00-r10.ebuild +++ /dev/null @@ -1,117 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/xpdf/xpdf-3.00-r10.ebuild,v 1.11 2006/02/18 19:14:51 vapier Exp $ - -inherit eutils - -DESCRIPTION="An X Viewer for PDF Files" -HOMEPAGE="http://www.foolabs.com/xpdf/" -SRC_URI="ftp://ftp.foolabs.com/pub/xpdf/${P}.tar.gz - linguas_ar? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-arabic.tar.gz ) - linguas_zh_CN? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-chinese-simplified.tar.gz ) - linguas_zh_TW? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-chinese-traditional.tar.gz ) - linguas_ru? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-cyrillic.tar.gz ) - linguas_el? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-greek.tar.gz ) - linguas_he? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-hebrew.tar.gz ) - linguas_ja? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-japanese.tar.gz ) - linguas_ko? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-korean.tar.gz ) - linguas_la? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-latin2.tar.gz ) - linguas_th? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-thai.tar.gz ) - linguas_tr? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-turkish.tar.gz )" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 sparc x86" -IUSE="motif nodrm truetype" - -DEPEND="motif? ( x11-libs/openmotif ) - truetype? ( - >=media-libs/freetype-2.0.5 - media-libs/t1lib - virtual/ghostscript - )" - -RDEPEND="${DEPEND} - linguas_ja? ( >=media-fonts/kochi-substitute-20030809-r3 ) - linguas_zh_CN? ( >=media-fonts/arphicfonts-0.1-r2 ) - linguas_zh_TW? ( >=media-fonts/arphicfonts-0.1-r2 ) - linguas_ko? ( >=media-fonts/baekmuk-fonts-2.2 ) - !app-text/xpdf-chinese-simplified - !app-text/xpdf-chinese-traditional - !app-text/xpdf-cyrillic - !app-text/xpdf-greek - !app-text/xpdf-japanese - !app-text/xpdf-korean - !app-text/xpdf-latin2 - !app-text/xpdf-thai - !app-text/xpdf-turkish" -PROVIDE="virtual/pdfviewer" - -src_unpack() { - unpack ${A} - cd ${S} - use truetype && epatch ${FILESDIR}/xpdf-3.00-truetype-new.diff - use truetype && epatch ${FILESDIR}/xpdf-3.00-freetype-2.1.7.patch - epatch ${FILESDIR}/xpdf-3.00-empty-bookmark.patch - epatch ${FILESDIR}/xpdf-3.00-core.patch - epatch ${FILESDIR}/xpdf-3.00-overflow.patch - epatch ${FILESDIR}/xpdf-3.00-PathScanner.patch - use nodrm && epatch ${FILESDIR}/xpdf-3.00-nodrm.diff - epatch ${FILESDIR}/xpdf-goo-sizet.patch - epatch ${FILESDIR}/xpdf-3.00-scroll-opts.patch - epatch ${FILESDIR}/xpdf-3.00-pl2.patch - epatch ${FILESDIR}/xpdf-3.00-pl3.patch - epatch ${FILESDIR}/xpdf-3.00-fonts.patch - epatch ${FILESDIR}/xpdf-3.00-gcc41.patch - epatch ${FILESDIR}/xpdf-3.00-security-can-2005-2097.patch - autoconf -} - -src_compile() { - use truetype \ - && myconf="--enable-freetype2 --with-freetype2-includes=/usr/include/freetype2" \ - || myconf="--disable-freetype2" - - econf \ - ${myconf} \ - --enable-opi || die - - emake || die -} - -src_install() { - make DESTDIR=${D} install || die - prepallman - dodoc README ANNOUNCE CHANGES - insinto /etc - newins ${FILESDIR}/xpdfrc.1 xpdfrc - - # install languages, but not on ppc64 (produces crashes...) - if use !ppc64; then - use linguas_ar && install_lang turkish - use linguas_zh_CN && install_lang chinese-simplified - use linguas_zh_TW && install_lang chinese-traditional - use linguas_ru && install_lang cyrillic - use linguas_el && install_lang greek - use linguas_he && install_lang hebrew - use linguas_ja && install_lang japanese - use linguas_ko && install_lang korean - use linguas_la && install_lang latin2 - use linguas_th && install_lang thai - use linguas_tr && install_lang turkish - fi -} - -install_lang() { - cd ../xpdf-$1 - sed 's,/usr/local/share/xpdf/,/usr/share/xpdf/,g' add-to-xpdfrc >> ${D}/etc/xpdfrc - insinto /usr/share/xpdf/$1 - doins *.unicodeMap - doins *.cid* - insinto /usr/share/xpdf/$1/CMap - doins CMap/* -} - -pkg_postinst() { - use motif || einfo "If you want to compile xpdf binary you have to set USE=motif" -} diff --git a/app-text/xpdf/xpdf-3.01-r5.ebuild b/app-text/xpdf/xpdf-3.01-r5.ebuild deleted file mode 100644 index b45b865265a7..000000000000 --- a/app-text/xpdf/xpdf-3.01-r5.ebuild +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/xpdf/xpdf-3.01-r5.ebuild,v 1.12 2006/02/18 19:14:51 vapier Exp $ - -inherit eutils flag-o-matic - -DESCRIPTION="An X Viewer for PDF Files" -HOMEPAGE="http://www.foolabs.com/xpdf/" -SRC_URI="ftp://ftp.foolabs.com/pub/xpdf/${P}.tar.gz - linguas_ar? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-arabic.tar.gz ) - linguas_zh_CN? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-chinese-simplified.tar.gz ) - linguas_zh_TW? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-chinese-traditional.tar.gz ) - linguas_ru? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-cyrillic.tar.gz ) - linguas_el? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-greek.tar.gz ) - linguas_he? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-hebrew.tar.gz ) - linguas_ja? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-japanese.tar.gz ) - linguas_ko? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-korean.tar.gz ) - linguas_la? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-latin2.tar.gz ) - linguas_th? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-thai.tar.gz ) - linguas_tr? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-turkish.tar.gz )" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86" -IUSE="X" - -DEPEND=" - X? ( - virtual/motif - >=media-libs/freetype-2.0.5 - media-libs/t1lib - virtual/ghostscript - || ( ( x11-libs/libXt - x11-libs/libXpm - x11-libs/libICE - x11-libs/libSM - x11-libs/libXp - ) - virtual/x11 - ) - )" - -RDEPEND="${DEPEND} - linguas_ja? ( >=media-fonts/kochi-substitute-20030809-r3 ) - linguas_zh_CN? ( >=media-fonts/arphicfonts-0.1-r2 ) - linguas_zh_TW? ( >=media-fonts/arphicfonts-0.1-r2 ) - linguas_ko? ( >=media-fonts/baekmuk-fonts-2.2 ) - !app-text/xpdf-chinese-simplified - !app-text/xpdf-chinese-traditional - !app-text/xpdf-cyrillic - !app-text/xpdf-greek - !app-text/xpdf-japanese - !app-text/xpdf-korean - !app-text/xpdf-latin2 - !app-text/xpdf-thai - !app-text/xpdf-turkish - >=app-text/poppler-0.4.3-r1" -PROVIDE="virtual/pdfviewer" - -src_unpack() { - unpack ${A} - cd ${S} - epatch ${FILESDIR}/${PN}-3.00-gcc41.patch - epatch ${FILESDIR}/${PN}-3.00-64bit.patch - epatch ${FILESDIR}/${P}-crash.patch - epatch ${FILESDIR}/${P}-pdftoppm.patch - epatch ${FILESDIR}/${P}-resize.patch - epatch ${FILESDIR}/${P}-sec-rollup.patch - epatch ${FILESDIR}/${P}-onlyx.patch - autoconf -} - -src_compile() { - replace-flags "-Os" "-O2" - - local myconf - if use X; then - myconf="${myconf} --with-x --enable-freetype2 \ - --with-freetype2-includes=/usr/include/freetype2" - else - myconf="${myconf} --without-x --without-freetype2-library" - fi - - econf \ - ${myconf} \ - --enable-opi -enable-multithreaded || die "Configure Failed" - - emake || die "make failed" -} - -src_install() { - make DESTDIR=${D} install || die "make install failed" - prepallman - dodoc README ANNOUNCE CHANGES - insinto /etc - newins ${FILESDIR}/xpdfrc.1 xpdfrc - - # install languages, but not on ppc64 (produces crashes...) - if use !ppc64; then - use linguas_ar && install_lang turkish - use linguas_zh_CN && install_lang chinese-simplified - use linguas_zh_TW && install_lang chinese-traditional - use linguas_ru && install_lang cyrillic - use linguas_el && install_lang greek - use linguas_he && install_lang hebrew - use linguas_ja && install_lang japanese - use linguas_ko && install_lang korean - use linguas_la && install_lang latin2 - use linguas_th && install_lang thai - use linguas_tr && install_lang turkish - fi -} - -install_lang() { - cd ../xpdf-$1 - sed 's,/usr/local/share/xpdf/,/usr/share/xpdf/,g' add-to-xpdfrc >> ${D}/etc/xpdfrc - insinto /usr/share/xpdf/$1 - doins *.unicodeMap - doins *.cid* - insinto /usr/share/xpdf/$1/CMap - doins CMap/* -} |