diff options
Diffstat (limited to 'kde-base')
-rw-r--r-- | kde-base/kpdf/ChangeLog | 16 | ||||
-rw-r--r-- | kde-base/kpdf/files/digest-kpdf-3.5.5-r1 | 3 | ||||
-rw-r--r-- | kde-base/kpdf/files/digest-kpdf-3.5.6-r1 | 3 | ||||
-rw-r--r-- | kde-base/kpdf/files/post-3.4.3-kdegraphics-CAN-2005-3193.diff | 334 | ||||
-rw-r--r-- | kde-base/kpdf/files/post-3.4.3-kdegraphics-CVE-2006-0301.diff | 52 | ||||
-rw-r--r-- | kde-base/kpdf/files/post-3.5.5-kdegraphics-CVE-2007-0104.diff | 61 | ||||
-rw-r--r-- | kde-base/kpdf/kpdf-3.5.5-r1.ebuild | 38 | ||||
-rw-r--r-- | kde-base/kpdf/kpdf-3.5.6-r1.ebuild | 36 |
8 files changed, 156 insertions, 387 deletions
diff --git a/kde-base/kpdf/ChangeLog b/kde-base/kpdf/ChangeLog index 49625b1af9ec..13768b9a9b29 100644 --- a/kde-base/kpdf/ChangeLog +++ b/kde-base/kpdf/ChangeLog @@ -1,6 +1,20 @@ # ChangeLog for kde-base/kpdf # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/kpdf/ChangeLog,v 1.121 2007/01/17 12:44:09 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/kpdf/ChangeLog,v 1.122 2007/01/27 17:19:33 flameeyes Exp $ + +*kpdf-3.5.6-r1 (27 Jan 2007) +*kpdf-3.5.5-r1 (27 Jan 2007) + + 27 Jan 2007; Diego Pettenò <flameeyes@gentoo.org> + -files/post-3.4.3-kdegraphics-CAN-2005-3193.diff, + -files/post-3.4.3-kdegraphics-CVE-2006-0301.diff, + +files/post-3.5.5-kdegraphics-CVE-2007-0104.diff, +kpdf-3.5.5-r1.ebuild, + +kpdf-3.5.6-r1.ebuild: + As the current situation with Gentoo KDE team and KPDF developers changed + since we originally decided to use KUbuntu's patch for Poppler, add two + testing revisions of kpdf that are vanilla. For 3.5.5 version, add the patch + to fix last week's security problem too. Remove old patches in the mean + time. 17 Jan 2007; Diego Pettenò <flameeyes@gentoo.org> files/digest-kpdf-3.5.6, Manifest: diff --git a/kde-base/kpdf/files/digest-kpdf-3.5.5-r1 b/kde-base/kpdf/files/digest-kpdf-3.5.5-r1 new file mode 100644 index 000000000000..7dbb38b9a877 --- /dev/null +++ b/kde-base/kpdf/files/digest-kpdf-3.5.5-r1 @@ -0,0 +1,3 @@ +MD5 cdbe15afc01c5da7af9557e803bbb7e6 kdegraphics-3.5.5.tar.bz2 7334117 +RMD160 c6febdf8ebd67110be3f27ada4c00e148403217f kdegraphics-3.5.5.tar.bz2 7334117 +SHA256 b6706d37568686e1ca4b4bb2cf1f79c027b94a512f6fe1156b7c7b7f79336f16 kdegraphics-3.5.5.tar.bz2 7334117 diff --git a/kde-base/kpdf/files/digest-kpdf-3.5.6-r1 b/kde-base/kpdf/files/digest-kpdf-3.5.6-r1 new file mode 100644 index 000000000000..de24125a93ab --- /dev/null +++ b/kde-base/kpdf/files/digest-kpdf-3.5.6-r1 @@ -0,0 +1,3 @@ +MD5 79a1ffb7ae89bede1410411a30be3210 kdegraphics-3.5.6.tar.bz2 7332938 +RMD160 4cb41696ffb1284252009edfe8bd0933ef541800 kdegraphics-3.5.6.tar.bz2 7332938 +SHA256 2c397f3c524b7c465e6d9289944aa8ed2acc43c8bafb983eb3f252aba7a19a1f kdegraphics-3.5.6.tar.bz2 7332938 diff --git a/kde-base/kpdf/files/post-3.4.3-kdegraphics-CAN-2005-3193.diff b/kde-base/kpdf/files/post-3.4.3-kdegraphics-CAN-2005-3193.diff deleted file mode 100644 index 8c1d3ac42603..000000000000 --- a/kde-base/kpdf/files/post-3.4.3-kdegraphics-CAN-2005-3193.diff +++ /dev/null @@ -1,334 +0,0 @@ -Index: kpdf/xpdf/xpdf/JBIG2Stream.cc -=================================================================== ---- kpdf/xpdf/xpdf/JBIG2Stream.cc (revision 466932) -+++ kpdf/xpdf/xpdf/JBIG2Stream.cc (revision 488714) -@@ -7,6 +7,7 @@ - //======================================================================== - - #include <aconf.h> -+#include <limits.h> - - #ifdef USE_GCC_PRAGMAS - #pragma implementation -@@ -681,6 +682,13 @@ JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, - w = wA; - h = hA; - line = (wA + 7) >> 3; -+ -+ if (h < 0 || line <= 0 || h >= INT_MAX / line) { -+ error(-1, "invalid width/height"); -+ data = NULL; -+ return; -+ } -+ - data = (Guchar *)gmalloc(h * line); - } - -@@ -690,6 +698,13 @@ JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, - w = bitmap->w; - h = bitmap->h; - line = bitmap->line; -+ -+ if (h < 0 || line <= 0 || h >= INT_MAX / line) { -+ error(-1, "invalid width/height"); -+ data = NULL; -+ return; -+ } -+ - data = (Guchar *)gmalloc(h * line); - memcpy(data, bitmap->data, h * line); - } -@@ -716,7 +731,10 @@ JBIG2Bitmap *JBIG2Bitmap::getSlice(Guint - } - - void JBIG2Bitmap::expand(int newH, Guint pixel) { -- if (newH <= h) { -+ if (newH <= h || line <= 0 || newH >= INT_MAX / line) { -+ error(-1, "invalid width/height"); -+ gfree(data); -+ data = NULL; - return; - } - data = (Guchar *)grealloc(data, newH * line); -@@ -2256,6 +2274,15 @@ void JBIG2Stream::readHalftoneRegionSeg( - error(getPos(), "Bad symbol dictionary reference in JBIG2 halftone segment"); - return; - } -+ if (gridH == 0 || gridW >= INT_MAX / gridH) { -+ error(getPos(), "Bad size in JBIG2 halftone segment"); -+ return; -+ } -+ if (w == 0 || h >= INT_MAX / w) { -+ error(getPos(), "Bad size in JBIG2 bitmap segment"); -+ return; -+ } -+ - patternDict = (JBIG2PatternDict *)seg; - bpp = 0; - i = 1; -@@ -2887,6 +2914,11 @@ JBIG2Bitmap *JBIG2Stream::readGenericRef - JBIG2BitmapPtr tpgrCXPtr0, tpgrCXPtr1, tpgrCXPtr2; - int x, y, pix; - -+ if (w < 0 || h <= 0 || w >= INT_MAX / h) { -+ error(-1, "invalid width/height"); -+ return NULL; -+ } -+ - bitmap = new JBIG2Bitmap(0, w, h); - bitmap->clearToZero(); - -Index: kpdf/xpdf/xpdf/Stream.cc -=================================================================== ---- kpdf/xpdf/xpdf/Stream.cc (revision 466932) -+++ kpdf/xpdf/xpdf/Stream.cc (revision 488714) -@@ -15,6 +15,7 @@ - #include <stdio.h> - #include <stdlib.h> - #include <stddef.h> -+#include <limits.h> - #ifndef WIN32 - #include <unistd.h> - #endif -@@ -413,13 +414,27 @@ StreamPredictor::StreamPredictor(Stream - width = widthA; - nComps = nCompsA; - nBits = nBitsA; -+ predLine = NULL; -+ ok = gFalse; -+ -+ if (width <= 0 || nComps <= 0 || nBits <= 0 || -+ nComps >= INT_MAX / nBits || -+ width >= INT_MAX / nComps / nBits) -+ return; - - nVals = width * nComps; -+ if (nVals * nBits + 7 <= 0) -+ return; - pixBytes = (nComps * nBits + 7) >> 3; - rowBytes = ((nVals * nBits + 7) >> 3) + pixBytes; -+ if (rowBytes < 0) -+ return; -+ - predLine = (Guchar *)gmalloc(rowBytes); - memset(predLine, 0, rowBytes); - predIdx = rowBytes; -+ -+ ok = gTrue; - } - - StreamPredictor::~StreamPredictor() { -@@ -1013,6 +1028,10 @@ LZWStream::LZWStream(Stream *strA, int p - FilterStream(strA) { - if (predictor != 1) { - pred = new StreamPredictor(this, predictor, columns, colors, bits); -+ if (!pred->isOk()) { -+ delete pred; -+ pred = NULL; -+ } - } else { - pred = NULL; - } -@@ -1261,6 +1280,10 @@ CCITTFaxStream::CCITTFaxStream(Stream *s - endOfLine = endOfLineA; - byteAlign = byteAlignA; - columns = columnsA; -+ if (columns < 1 || columns >= INT_MAX / sizeof(short)) { -+ error(-1, "invalid number of columns"); -+ exit(1); -+ } - rows = rowsA; - endOfBlock = endOfBlockA; - black = blackA; -@@ -2899,6 +2922,11 @@ GBool DCTStream::readBaselineSOF() { - height = read16(); - width = read16(); - numComps = str->getChar(); -+ if (numComps <= 0 || numComps > 4) { -+ numComps = 0; -+ error(getPos(), "Bad number of components in DCT stream"); -+ return gFalse; -+ } - if (prec != 8) { - error(getPos(), "Bad DCT precision %d", prec); - return gFalse; -@@ -2925,6 +2953,11 @@ GBool DCTStream::readProgressiveSOF() { - height = read16(); - width = read16(); - numComps = str->getChar(); -+ if (numComps <= 0 || numComps > 4) { -+ numComps = 0; -+ error(getPos(), "Bad number of components in DCT stream"); -+ return gFalse; -+ } - if (prec != 8) { - error(getPos(), "Bad DCT precision %d", prec); - return gFalse; -@@ -2947,6 +2980,11 @@ GBool DCTStream::readScanInfo() { - - 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"); -@@ -3021,12 +3059,12 @@ GBool DCTStream::readHuffmanTables() { - while (length > 0) { - index = str->getChar(); - --length; -- if ((index & 0x0f) >= 4) { -+ if ((index & ~0x10) >= 4 || (index & ~0x10) < 0) { - error(getPos(), "Bad DCT Huffman table"); - return gFalse; - } - if (index & 0x10) { -- index &= 0x0f; -+ index &= 0x03; - if (index >= numACHuffTables) - numACHuffTables = index+1; - tbl = &acHuffTables[index]; -@@ -3144,9 +3182,11 @@ int DCTStream::readMarker() { - do { - do { - c = str->getChar(); -+ if(c == EOF) return EOF; - } while (c != 0xff); - do { - c = str->getChar(); -+ if(c == EOF) return EOF; - } while (c == 0xff); - } while (c == 0x00); - return c; -@@ -3258,6 +3298,10 @@ FlateStream::FlateStream(Stream *strA, i - FilterStream(strA) { - if (predictor != 1) { - pred = new StreamPredictor(this, predictor, columns, colors, bits); -+ if (!pred->isOk()) { -+ delete pred; -+ pred = NULL; -+ } - } else { - pred = NULL; - } -Index: kpdf/xpdf/xpdf/Stream.h -=================================================================== ---- kpdf/xpdf/xpdf/Stream.h (revision 466932) -+++ kpdf/xpdf/xpdf/Stream.h (revision 488714) -@@ -233,6 +233,8 @@ public: - - ~StreamPredictor(); - -+ GBool isOk() { return ok; } -+ - int lookChar(); - int getChar(); - -@@ -250,6 +252,7 @@ private: - int rowBytes; // bytes per line - Guchar *predLine; // line buffer - int predIdx; // current index in predLine -+ GBool ok; - }; - - //------------------------------------------------------------------------ -Index: kpdf/xpdf/xpdf/JPXStream.cc -=================================================================== ---- kpdf/xpdf/xpdf/JPXStream.cc (revision 466932) -+++ kpdf/xpdf/xpdf/JPXStream.cc (revision 488714) -@@ -7,6 +7,7 @@ - //======================================================================== - - #include <aconf.h> -+#include <limits.h> - - #ifdef USE_GCC_PRAGMAS - #pragma implementation -@@ -666,7 +667,7 @@ GBool JPXStream::readCodestream(Guint /* - 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; -@@ -701,8 +702,12 @@ GBool JPXStream::readCodestream(Guint /* - / img.xTileSize; - img.nYTiles = (img.ySize - img.yTileOffset + img.yTileSize - 1) - / img.yTileSize; -- img.tiles = (JPXTile *)gmalloc(img.nXTiles * img.nYTiles * -- sizeof(JPXTile)); -+ nTiles = img.nXTiles * img.nYTiles; -+ 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; -+ } -+ img.tiles = (JPXTile *)gmallocn(nTiles, sizeof(JPXTile)); - for (i = 0; i < img.nXTiles * img.nYTiles; ++i) { - img.tiles[i].tileComps = (JPXTileComp *)gmalloc(img.nComps * - sizeof(JPXTileComp)); -Index: kpdf/xpdf/goo/gmem.c -=================================================================== ---- kpdf/xpdf/goo/gmem.c (revision 466932) -+++ kpdf/xpdf/goo/gmem.c (revision 488714) -@@ -11,6 +11,7 @@ - #include <stdlib.h> - #include <stddef.h> - #include <string.h> -+#include <limits.h> - #include "gmem.h" - - #ifdef DEBUG_MEM -@@ -175,6 +176,28 @@ void gfree(void *p) { - #endif - } - -+void *gmallocn(int nObjs, int objSize) { -+ int n; -+ -+ n = nObjs * objSize; -+ if (objSize <= 0 || nObjs < 0 || nObjs >= INT_MAX / objSize) { -+ fprintf(stderr, "Bogus memory allocation size\n"); -+ exit(1); -+ } -+ return gmalloc(n); -+} -+ -+void *greallocn(void *p, int nObjs, int objSize) { -+ int n; -+ -+ n = nObjs * objSize; -+ if (objSize <= 0 || nObjs < 0 || nObjs >= INT_MAX / objSize) { -+ fprintf(stderr, "Bogus memory allocation size\n"); -+ exit(1); -+ } -+ return grealloc(p, n); -+} -+ - #ifdef DEBUG_MEM - void gMemReport(FILE *f) { - GMemHdr *p; -Index: kpdf/xpdf/goo/gmem.h -=================================================================== ---- kpdf/xpdf/goo/gmem.h (revision 466932) -+++ kpdf/xpdf/goo/gmem.h (revision 488714) -@@ -28,6 +28,15 @@ extern void *gmalloc(size_t size); - extern void *grealloc(void *p, size_t size); - - /* -+ * These are similar to gmalloc and grealloc, but take an object count -+ * and size. The result is similar to allocating nObjs * objSize -+ * bytes, but there is an additional error check that the total size -+ * doesn't overflow an int. -+ */ -+extern void *gmallocn(int nObjs, int objSize); -+extern void *greallocn(void *p, int nObjs, int objSize); -+ -+/* - * Same as free, but checks for and ignores NULL pointers. - */ - extern void gfree(void *p); diff --git a/kde-base/kpdf/files/post-3.4.3-kdegraphics-CVE-2006-0301.diff b/kde-base/kpdf/files/post-3.4.3-kdegraphics-CVE-2006-0301.diff deleted file mode 100644 index 7c6b1fe28d80..000000000000 --- a/kde-base/kpdf/files/post-3.4.3-kdegraphics-CVE-2006-0301.diff +++ /dev/null @@ -1,52 +0,0 @@ -Index: kpdf/xpdf/splash/SplashXPathScanner.cc -=================================================================== ---- kpdf/xpdf/splash/SplashXPathScanner.cc (Revision 504400) -+++ kpdf/xpdf/splash/SplashXPathScanner.cc (Revision 505063) -@@ -182,7 +182,7 @@ GBool SplashXPathScanner::getNextSpan(in - } - - void SplashXPathScanner::computeIntersections(int y) { -- SplashCoord ySegMin, ySegMax, xx0, xx1; -+ SplashCoord xSegMin, xSegMax, ySegMin, ySegMax, xx0, xx1; - SplashXPathSeg *seg; - int i, j; - -@@ -232,19 +232,27 @@ void SplashXPathScanner::computeIntersec - } else if (seg->flags & splashXPathVert) { - xx0 = xx1 = seg->x0; - } else { -- if (ySegMin <= y) { -- // intersection with top edge -- xx0 = seg->x0 + (y - seg->y0) * seg->dxdy; -+ if (seg->x0 < seg->x1) { -+ xSegMin = seg->x0; -+ xSegMax = seg->x1; - } else { -- // x coord of segment endpoint with min y coord -- xx0 = (seg->flags & splashXPathFlip) ? seg->x1 : seg->x0; -+ xSegMin = seg->x1; -+ xSegMax = seg->x0; - } -- if (ySegMax >= y + 1) { -- // intersection with bottom edge -- xx1 = seg->x0 + (y + 1 - seg->y0) * seg->dxdy; -- } else { -- // x coord of segment endpoint with max y coord -- xx1 = (seg->flags & splashXPathFlip) ? seg->x0 : seg->x1; -+ // intersection with top edge -+ xx0 = seg->x0 + ((SplashCoord)y - seg->y0) * seg->dxdy; -+ // intersection with bottom edge -+ xx1 = seg->x0 + ((SplashCoord)y + 1 - seg->y0) * seg->dxdy; -+ // the segment may not actually extend to the top and/or bottom edges -+ if (xx0 < xSegMin) { -+ xx0 = xSegMin; -+ } else if (xx0 > xSegMax) { -+ xx0 = xSegMax; -+ } -+ if (xx1 < xSegMin) { -+ xx1 = xSegMin; -+ } else if (xx1 > xSegMax) { -+ xx1 = xSegMax; - } - } - if (xx0 < xx1) { diff --git a/kde-base/kpdf/files/post-3.5.5-kdegraphics-CVE-2007-0104.diff b/kde-base/kpdf/files/post-3.5.5-kdegraphics-CVE-2007-0104.diff new file mode 100644 index 000000000000..092cf67f360b --- /dev/null +++ b/kde-base/kpdf/files/post-3.5.5-kdegraphics-CVE-2007-0104.diff @@ -0,0 +1,61 @@ +--- kpdf/xpdf/xpdf/Catalog.cc ++++ kpdf/xpdf/xpdf/Catalog.cc +@@ -26,6 +26,12 @@ + #include "UGString.h" + #include "Catalog.h" + ++// This define is used to limit the depth of recursive readPageTree calls ++// This is needed because the page tree nodes can reference their parents ++// leaving us in an infinite loop ++// Most sane pdf documents don't have a call depth higher than 10 ++#define MAX_CALL_DEPTH 1000 ++ + //------------------------------------------------------------------------ + // Catalog + //------------------------------------------------------------------------ +@@ -76,7 +82,7 @@ Catalog::Catalog(XRef *xrefA) { + pageRefs[i].num = -1; + pageRefs[i].gen = -1; + } +- numPages = readPageTree(pagesDict.getDict(), NULL, 0); ++ numPages = readPageTree(pagesDict.getDict(), NULL, 0, 0); + if (numPages != numPages0) { + error(-1, "Page count in top-level pages object is incorrect"); + } +@@ -191,7 +197,7 @@ GString *Catalog::readMetadata() { + return s; + } + +-int Catalog::readPageTree(Dict *pagesDict, PageAttrs *attrs, int start) { ++int Catalog::readPageTree(Dict *pagesDict, PageAttrs *attrs, int start, int callDepth) { + Object kids; + Object kid; + Object kidRef; +@@ -236,9 +242,13 @@ int Catalog::readPageTree(Dict *pagesDic + // This should really be isDict("Pages"), but I've seen at least one + // PDF file where the /Type entry is missing. + } else if (kid.isDict()) { +- if ((start = readPageTree(kid.getDict(), attrs1, start)) +- < 0) +- goto err2; ++ if (callDepth > MAX_CALL_DEPTH) { ++ error(-1, "Limit of %d recursive calls reached while reading the page tree. If your document is correct and not a test to try to force a crash, please report a bug.", MAX_CALL_DEPTH); ++ } else { ++ if ((start = readPageTree(kid.getDict(), attrs1, start, callDepth + 1)) ++ < 0) ++ goto err2; ++ } + } else { + error(-1, "Kid object (page %d) is wrong type (%s)", + start+1, kid.getTypeName()); +--- kpdf/xpdf/xpdf/Catalog.h ++++ kpdf/xpdf/xpdf/Catalog.h +@@ -128,7 +128,7 @@ private: + Object acroForm; // AcroForm dictionary + GBool ok; // true if catalog is valid + +- int readPageTree(Dict *pages, PageAttrs *attrs, int start); ++ int readPageTree(Dict *pages, PageAttrs *attrs, int start, int callDepth); + Object *findDestInTree(Object *tree, GString *name, Object *obj); + }; + diff --git a/kde-base/kpdf/kpdf-3.5.5-r1.ebuild b/kde-base/kpdf/kpdf-3.5.5-r1.ebuild new file mode 100644 index 000000000000..c8bd5a01212d --- /dev/null +++ b/kde-base/kpdf/kpdf-3.5.5-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/kpdf/kpdf-3.5.5-r1.ebuild,v 1.1 2007/01/27 17:19:33 flameeyes Exp $ + +KMNAME=kdegraphics +MAXKDEVER=$PV +KM_DEPRANGE="$PV $MAXKDEVER" +inherit kde-meta flag-o-matic + +DESCRIPTION="kpdf, a kde pdf viewer based on xpdf" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="" +KMEXTRA="kfile-plugins/pdf" + +DEPEND=">=media-libs/freetype-2.0.5 + media-libs/t1lib + >=app-text/poppler-0.5.1 + >=app-text/poppler-bindings-0.5.1" +RDEPEND="${DEPEND} + $(deprange-dual $PV $MAXKDEVER kde-base/kdeprint)" + +PATCHES="${FILESDIR}/post-3.5.5-kdegraphics-CVE-2007-0104.diff" + +pkg_setup() { + kde_pkg_setup + # check for qt still until it had a revision bump in both ~arch and stable. + if ! built_with_use app-text/poppler-bindings qt3; then + eerror "This package requires app-text/poppler-bindings compiled with Qt 3.x support." + eerror "Please reemerge app-text/poppler-bindings with USE=\"qt3\"." + die "Please reemerge app-text/poppler-bindings with USE=\"qt3\"." + fi +} + +src_compile() { + local myconf="--with-poppler" + replace-flags "-Os" "-O2" # see bug 114822 + kde-meta_src_compile +} diff --git a/kde-base/kpdf/kpdf-3.5.6-r1.ebuild b/kde-base/kpdf/kpdf-3.5.6-r1.ebuild new file mode 100644 index 000000000000..99affda39bed --- /dev/null +++ b/kde-base/kpdf/kpdf-3.5.6-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/kpdf/kpdf-3.5.6-r1.ebuild,v 1.1 2007/01/27 17:19:33 flameeyes Exp $ + +KMNAME=kdegraphics +MAXKDEVER=$PV +KM_DEPRANGE="$PV $MAXKDEVER" +inherit kde-meta flag-o-matic + +DESCRIPTION="kpdf, a kde pdf viewer based on xpdf" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="" +KMEXTRA="kfile-plugins/pdf" + +DEPEND=">=media-libs/freetype-2.0.5 + media-libs/t1lib + >=app-text/poppler-0.5.1 + >=app-text/poppler-bindings-0.5.1" +RDEPEND="${DEPEND} + $(deprange-dual $PV $MAXKDEVER kde-base/kdeprint)" + +pkg_setup() { + kde_pkg_setup + # check for qt still until it had a revision bump in both ~arch and stable. + if ! built_with_use app-text/poppler-bindings qt3; then + eerror "This package requires app-text/poppler-bindings compiled with Qt 3.x support." + eerror "Please reemerge app-text/poppler-bindings with USE=\"qt3\"." + die "Please reemerge app-text/poppler-bindings with USE=\"qt3\"." + fi +} + +src_compile() { + local myconf="--with-poppler" + replace-flags "-Os" "-O2" # see bug 114822 + kde-meta_src_compile +} |