diff options
author | Simon Stelling <blubb@gentoo.org> | 2006-01-28 14:43:26 +0000 |
---|---|---|
committer | Simon Stelling <blubb@gentoo.org> | 2006-01-28 14:43:26 +0000 |
commit | f61b6e09dd96a7f2cc439b2c677b378422b55b8f (patch) | |
tree | 233da763343f3f94a97cc995cd81337fb5d24c39 /app-text/xpdf | |
parent | Version 3.5.1. Not yet released upstream, so package.masked for now. (diff) | |
download | gentoo-2-f61b6e09dd96a7f2cc439b2c677b378422b55b8f.tar.gz gentoo-2-f61b6e09dd96a7f2cc439b2c677b378422b55b8f.tar.bz2 gentoo-2-f61b6e09dd96a7f2cc439b2c677b378422b55b8f.zip |
no need to bzip smallish patches
(Portage version: 2.1_pre3-r1)
Diffstat (limited to 'app-text/xpdf')
-rw-r--r-- | app-text/xpdf/ChangeLog | 12 | ||||
-rw-r--r-- | app-text/xpdf/files/xpdf-3.00-PathScanner.patch | 125 | ||||
-rw-r--r-- | app-text/xpdf/files/xpdf-3.00-PathScanner.patch.bz2 | bin | 1003 -> 0 bytes | |||
-rw-r--r-- | app-text/xpdf/files/xpdf-3.00-core.patch | 13 | ||||
-rw-r--r-- | app-text/xpdf/files/xpdf-3.00-core.patch.bz2 | bin | 271 -> 0 bytes | |||
-rw-r--r-- | app-text/xpdf/files/xpdf-3.00-overflow.patch | 296 | ||||
-rw-r--r-- | app-text/xpdf/files/xpdf-3.00-overflow.patch.bz2 | bin | 2097 -> 0 bytes | |||
-rw-r--r-- | app-text/xpdf/files/xpdf-3.00-scroll-opts.patch | 185 | ||||
-rw-r--r-- | app-text/xpdf/files/xpdf-3.00-scroll-opts.patch.bz2 | bin | 1869 -> 0 bytes | |||
-rw-r--r-- | app-text/xpdf/files/xpdf-3.00-truetype-new.diff | 98 | ||||
-rw-r--r-- | app-text/xpdf/files/xpdf-3.00-truetype-new.diff.gz | bin | 1271 -> 0 bytes | |||
-rw-r--r-- | app-text/xpdf/xpdf-3.00-r10.ebuild | 14 | ||||
-rw-r--r-- | app-text/xpdf/xpdf-3.00-r8.ebuild | 14 |
13 files changed, 742 insertions, 15 deletions
diff --git a/app-text/xpdf/ChangeLog b/app-text/xpdf/ChangeLog index 75cc03fe4dd4..69bae59990cb 100644 --- a/app-text/xpdf/ChangeLog +++ b/app-text/xpdf/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for app-text/xpdf # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/xpdf/ChangeLog,v 1.124 2006/01/25 23:06:37 kloeri Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/xpdf/ChangeLog,v 1.125 2006/01/28 14:43:26 blubb Exp $ + + 28 Jan 2006; Simon Stelling <blubb@gentoo.org> + +files/xpdf-3.00-PathScanner.patch, + -files/xpdf-3.00-PathScanner.patch.bz2, +files/xpdf-3.00-core.patch, + -files/xpdf-3.00-core.patch.bz2, +files/xpdf-3.00-overflow.patch, + -files/xpdf-3.00-overflow.patch.bz2, +files/xpdf-3.00-scroll-opts.patch, + -files/xpdf-3.00-scroll-opts.patch.bz2, + +files/xpdf-3.00-truetype-new.diff, -files/xpdf-3.00-truetype-new.diff.gz, + xpdf-3.00-r8.ebuild, xpdf-3.00-r10.ebuild: + no need to bzip smallish patches 25 Jan 2006; Bryan Østergaard <kloeri@gentoo.org xpdf-3.01-r5.ebuild: Stable on alpha, bug 117495. diff --git a/app-text/xpdf/files/xpdf-3.00-PathScanner.patch b/app-text/xpdf/files/xpdf-3.00-PathScanner.patch new file mode 100644 index 000000000000..dac7bfa34ad2 --- /dev/null +++ b/app-text/xpdf/files/xpdf-3.00-PathScanner.patch @@ -0,0 +1,125 @@ +--- 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-PathScanner.patch.bz2 b/app-text/xpdf/files/xpdf-3.00-PathScanner.patch.bz2 Binary files differdeleted file mode 100644 index 9f87d6d5e78d..000000000000 --- a/app-text/xpdf/files/xpdf-3.00-PathScanner.patch.bz2 +++ /dev/null diff --git a/app-text/xpdf/files/xpdf-3.00-core.patch b/app-text/xpdf/files/xpdf-3.00-core.patch new file mode 100644 index 000000000000..21e614821a71 --- /dev/null +++ b/app-text/xpdf/files/xpdf-3.00-core.patch @@ -0,0 +1,13 @@ +--- 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-core.patch.bz2 b/app-text/xpdf/files/xpdf-3.00-core.patch.bz2 Binary files differdeleted file mode 100644 index 0e63c30e3ade..000000000000 --- a/app-text/xpdf/files/xpdf-3.00-core.patch.bz2 +++ /dev/null diff --git a/app-text/xpdf/files/xpdf-3.00-overflow.patch b/app-text/xpdf/files/xpdf-3.00-overflow.patch new file mode 100644 index 000000000000..d1b2f584d812 --- /dev/null +++ b/app-text/xpdf/files/xpdf-3.00-overflow.patch @@ -0,0 +1,296 @@ +--- 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-overflow.patch.bz2 b/app-text/xpdf/files/xpdf-3.00-overflow.patch.bz2 Binary files differdeleted file mode 100644 index 3527c2d80b96..000000000000 --- a/app-text/xpdf/files/xpdf-3.00-overflow.patch.bz2 +++ /dev/null diff --git a/app-text/xpdf/files/xpdf-3.00-scroll-opts.patch b/app-text/xpdf/files/xpdf-3.00-scroll-opts.patch new file mode 100644 index 000000000000..9a661ea621c1 --- /dev/null +++ b/app-text/xpdf/files/xpdf-3.00-scroll-opts.patch @@ -0,0 +1,185 @@ +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-scroll-opts.patch.bz2 b/app-text/xpdf/files/xpdf-3.00-scroll-opts.patch.bz2 Binary files differdeleted file mode 100644 index 205abd845f01..000000000000 --- a/app-text/xpdf/files/xpdf-3.00-scroll-opts.patch.bz2 +++ /dev/null diff --git a/app-text/xpdf/files/xpdf-3.00-truetype-new.diff b/app-text/xpdf/files/xpdf-3.00-truetype-new.diff new file mode 100644 index 000000000000..73d22e81e394 --- /dev/null +++ b/app-text/xpdf/files/xpdf-3.00-truetype-new.diff @@ -0,0 +1,98 @@ +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.00-truetype-new.diff.gz b/app-text/xpdf/files/xpdf-3.00-truetype-new.diff.gz Binary files differdeleted file mode 100644 index 17b48a904349..000000000000 --- a/app-text/xpdf/files/xpdf-3.00-truetype-new.diff.gz +++ /dev/null diff --git a/app-text/xpdf/xpdf-3.00-r10.ebuild b/app-text/xpdf/xpdf-3.00-r10.ebuild index 54a7d62340a1..9249894fec6f 100644 --- a/app-text/xpdf/xpdf-3.00-r10.ebuild +++ b/app-text/xpdf/xpdf-3.00-r10.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2005 Gentoo Foundation +# 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.8 2005/08/14 03:54:21 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/xpdf/xpdf-3.00-r10.ebuild,v 1.9 2006/01/28 14:43:26 blubb Exp $ inherit eutils @@ -51,15 +51,15 @@ PROVIDE="virtual/pdfviewer" src_unpack() { unpack ${A} cd ${S} - use truetype && epatch ${FILESDIR}/xpdf-3.00-truetype-new.diff.gz + 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.bz2 - epatch ${FILESDIR}/xpdf-3.00-overflow.patch.bz2 - epatch ${FILESDIR}/xpdf-3.00-PathScanner.patch.bz2 + 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.bz2 + 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 diff --git a/app-text/xpdf/xpdf-3.00-r8.ebuild b/app-text/xpdf/xpdf-3.00-r8.ebuild index 6478fcc54699..9c04523ac9f9 100644 --- a/app-text/xpdf/xpdf-3.00-r8.ebuild +++ b/app-text/xpdf/xpdf-3.00-r8.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2005 Gentoo Foundation +# 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-r8.ebuild,v 1.17 2005/06/08 16:55:23 lanius Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/xpdf/xpdf-3.00-r8.ebuild,v 1.18 2006/01/28 14:43:26 blubb Exp $ inherit eutils @@ -49,15 +49,15 @@ PROVIDE="virtual/pdfviewer" src_unpack() { unpack ${A} cd ${S} - epatch ${FILESDIR}/xpdf-3.00-truetype-new.diff.gz + epatch ${FILESDIR}/xpdf-3.00-truetype-new.diff 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.bz2 - epatch ${FILESDIR}/xpdf-3.00-overflow.patch.bz2 - epatch ${FILESDIR}/xpdf-3.00-PathScanner.patch.bz2 + 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.bz2 + epatch ${FILESDIR}/xpdf-3.00-scroll-opts.patch epatch ${FILESDIR}/xpdf-3.00-pl2.patch epatch ${FILESDIR}/xpdf-3.00-pl3.patch autoconf |