From 9be92b9e59e343f2524ff1c3ca6a35d643335697 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Diego=20Elio=20Petten=C3=B2?= Date: Tue, 5 Dec 2006 14:54:00 +0000 Subject: [PATCH] Add patch to fix bug #155949. Package-Manager: portage-2.1.2_rc2-r5 --- kde-base/kdegraphics-kfile-plugins/ChangeLog | 9 +- .../digest-kdegraphics-kfile-plugins-3.5.5-r1 | 3 + .../files/post-3.5.5-kdegraphics.diff | 134 ++++++++++++++++++ .../kdegraphics-kfile-plugins-3.5.5-r1.ebuild | 28 ++++ kde-base/kdegraphics/ChangeLog | 8 +- .../files/digest-kdegraphics-3.5.5-r1 | 6 + .../files/post-3.5.5-kdegraphics.diff | 134 ++++++++++++++++++ .../kdegraphics/kdegraphics-3.5.5-r1.ebuild | 72 ++++++++++ 8 files changed, 392 insertions(+), 2 deletions(-) create mode 100644 kde-base/kdegraphics-kfile-plugins/files/digest-kdegraphics-kfile-plugins-3.5.5-r1 create mode 100644 kde-base/kdegraphics-kfile-plugins/files/post-3.5.5-kdegraphics.diff create mode 100644 kde-base/kdegraphics-kfile-plugins/kdegraphics-kfile-plugins-3.5.5-r1.ebuild create mode 100644 kde-base/kdegraphics/files/digest-kdegraphics-3.5.5-r1 create mode 100644 kde-base/kdegraphics/files/post-3.5.5-kdegraphics.diff create mode 100644 kde-base/kdegraphics/kdegraphics-3.5.5-r1.ebuild diff --git a/kde-base/kdegraphics-kfile-plugins/ChangeLog b/kde-base/kdegraphics-kfile-plugins/ChangeLog index 6f66a50da1bb..8fb87c2dada7 100644 --- a/kde-base/kdegraphics-kfile-plugins/ChangeLog +++ b/kde-base/kdegraphics-kfile-plugins/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for kde-base/kdegraphics-kfile-plugins # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/kdegraphics-kfile-plugins/ChangeLog,v 1.61 2006/11/26 23:46:59 corsair Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdegraphics-kfile-plugins/ChangeLog,v 1.62 2006/12/05 14:54:00 flameeyes Exp $ + +*kdegraphics-kfile-plugins-3.5.5-r1 (05 Dec 2006) + + 05 Dec 2006; Diego Pettenò + +files/post-3.5.5-kdegraphics.diff, + +kdegraphics-kfile-plugins-3.5.5-r1.ebuild: + Add patch to fix bug #155949. 26 Nov 2006; Markus Rothe kdegraphics-kfile-plugins-3.5.5.ebuild: diff --git a/kde-base/kdegraphics-kfile-plugins/files/digest-kdegraphics-kfile-plugins-3.5.5-r1 b/kde-base/kdegraphics-kfile-plugins/files/digest-kdegraphics-kfile-plugins-3.5.5-r1 new file mode 100644 index 000000000000..7dbb38b9a877 --- /dev/null +++ b/kde-base/kdegraphics-kfile-plugins/files/digest-kdegraphics-kfile-plugins-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/kdegraphics-kfile-plugins/files/post-3.5.5-kdegraphics.diff b/kde-base/kdegraphics-kfile-plugins/files/post-3.5.5-kdegraphics.diff new file mode 100644 index 000000000000..881b81757ab4 --- /dev/null +++ b/kde-base/kdegraphics-kfile-plugins/files/post-3.5.5-kdegraphics.diff @@ -0,0 +1,134 @@ +--- kfile-plugins/jpeg/exif.h ++++ kfile-plugins/jpeg/exif.h +@@ -72,7 +72,8 @@ + int Get32s(void * Long); + unsigned Get32u(void * Long); + double ConvertAnyFormat(void * ValuePtr, int Format); +- void ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBase, unsigned ExifLength); ++ void ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBase, unsigned ExifLength, ++ unsigned NestingLevel); + void process_COM (const uchar * Data, int length); + void process_SOFn (const uchar * Data, int marker); + int Get16m(const void * Short); +--- kfile-plugins/jpeg/exif.cpp ++++ kfile-plugins/jpeg/exif.cpp +@@ -446,7 +446,7 @@ + //-------------------------------------------------------------------------- + // Process one of the nested EXIF directories. + //-------------------------------------------------------------------------- +-void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBase, unsigned ExifLength) ++void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBase, unsigned ExifLength, unsigned NestingLevel) + { + int de; + int a; +@@ -454,6 +454,9 @@ + unsigned ThumbnailOffset = 0; + unsigned ThumbnailSize = 0; + ++ if ( NestingLevel > 4) ++ throw FatalError("Maximum directory nesting exceeded (corrupt exif header)"); ++ + NumDirEntries = Get16u(DirStart); + #define DIR_ENTRY_ADDR(Start, Entry) (Start+2+12*(Entry)) + +@@ -476,7 +479,7 @@ + for (de=0;de 0x10000) { ++ throw FatalError("Illegal number of components for tag"); ++ continue; ++ } ++ + ByteCount = Components * BytesPerFormat[Format]; + + if (ByteCount > 4){ +@@ -517,11 +525,11 @@ + switch(Tag){ + + case TAG_MAKE: +- ExifData::CameraMake = QString((char*)ValuePtr); ++ ExifData::CameraMake = QString::fromLatin1((const char*)ValuePtr, 31); + break; + + case TAG_MODEL: +- ExifData::CameraModel = QString((char*)ValuePtr); ++ ExifData::CameraModel = QString::fromLatin1((const char*)ValuePtr, 39); + break; + + case TAG_ORIENTATION: +@@ -529,7 +537,7 @@ + break; + + case TAG_DATETIME_ORIGINAL: +- DateTime = QString((char*)ValuePtr); ++ DateTime = QString::fromLatin1((const char*)ValuePtr, 19); + break; + + case TAG_USERCOMMENT: +@@ -550,14 +558,12 @@ + int c; + c = (ValuePtr)[a]; + if (c != '\0' && c != ' '){ +- //strncpy(ImageInfo.Comments, (const char*)(a+ValuePtr), 199); +- UserComment.sprintf("%s", (const char*)(a+ValuePtr)); ++ UserComment = QString::fromLatin1((const char*)(a+ValuePtr), 199); + break; + } + } + }else{ +- //strncpy(ImageInfo.Comments, (const char*)ValuePtr, 199); +- UserComment.sprintf("%s", (const char*)ValuePtr); ++ UserComment = QString::fromLatin1((const char*)ValuePtr, 199); + } + break; + +@@ -676,10 +682,10 @@ + if (Tag == TAG_EXIF_OFFSET || Tag == TAG_INTEROP_OFFSET){ + unsigned char * SubdirStart; + SubdirStart = OffsetBase + Get32u(ValuePtr); +- if (SubdirStart < OffsetBase || SubdirStart > OffsetBase+ExifLength){ ++ if (SubdirStart <= OffsetBase || SubdirStart >= OffsetBase+ExifLength){ + throw FatalError("Illegal subdirectory link"); + } +- ProcessExifDir(SubdirStart, OffsetBase, ExifLength); ++ ProcessExifDir(SubdirStart, OffsetBase, ExifLength, NestingLevel+1); + continue; + } + } +@@ -709,7 +715,7 @@ + } + }else{ + if (SubdirStart <= OffsetBase+ExifLength){ +- ProcessExifDir(SubdirStart, OffsetBase, ExifLength); ++ ProcessExifDir(SubdirStart, OffsetBase, ExifLength, NestingLevel+1); + } + } + } +@@ -719,7 +725,7 @@ + } + + if (ThumbnailSize && ThumbnailOffset){ +- if (ThumbnailSize + ThumbnailOffset <= ExifLength){ ++ if (ThumbnailSize + ThumbnailOffset < ExifLength){ + // The thumbnail pointer appears to be valid. Store it. + Thumbnail.loadFromData(OffsetBase + ThumbnailOffset, ThumbnailSize, "JPEG"); + } +@@ -810,7 +816,7 @@ + LastExifRefd = CharBuf; + + // First directory starts 16 bytes in. Offsets start at 8 bytes in. +- ProcessExifDir(CharBuf+16, CharBuf+8, length-6); ++ ProcessExifDir(CharBuf+16, CharBuf+8, length-6, 0); + + // This is how far the interesting (non thumbnail) part of the exif went. + ExifSettingsLength = LastExifRefd - CharBuf; diff --git a/kde-base/kdegraphics-kfile-plugins/kdegraphics-kfile-plugins-3.5.5-r1.ebuild b/kde-base/kdegraphics-kfile-plugins/kdegraphics-kfile-plugins-3.5.5-r1.ebuild new file mode 100644 index 000000000000..f8f94d561674 --- /dev/null +++ b/kde-base/kdegraphics-kfile-plugins/kdegraphics-kfile-plugins-3.5.5-r1.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdegraphics-kfile-plugins/kdegraphics-kfile-plugins-3.5.5-r1.ebuild,v 1.1 2006/12/05 14:54:00 flameeyes Exp $ + +KMNAME=kdegraphics +KMMODULE=kfile-plugins +MAXKDEVER=$PV +KM_DEPRANGE="$PV $MAXKDEVER" +inherit kde-meta eutils + +DESCRIPTION="kfile plugins from kdegraphics" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="openexr" +DEPEND="media-libs/tiff + openexr? ( media-libs/openexr )" + +# compilation of the tiff plugin depends on the check in acinclude.m4.in, +# which doesn't have a switch. + +# ps installed with kghostview, pdf installed with kpdf +KMEXTRACTONLY="kfile-plugins/ps kfile-plugins/pdf" + +PATCHES="${FILESDIR}/post-3.5.5-kdegraphics.diff" + +src_compile() { + myconf="$myconf $(use_with openexr)" + kde-meta_src_compile +} diff --git a/kde-base/kdegraphics/ChangeLog b/kde-base/kdegraphics/ChangeLog index d361655f572d..635ebaa2bfc2 100644 --- a/kde-base/kdegraphics/ChangeLog +++ b/kde-base/kdegraphics/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for kde-base/kdegraphics # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/kdegraphics/ChangeLog,v 1.275 2006/12/03 19:31:40 corsair Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdegraphics/ChangeLog,v 1.276 2006/12/05 14:51:51 flameeyes Exp $ + +*kdegraphics-3.5.5-r1 (05 Dec 2006) + + 05 Dec 2006; Diego Pettenò + +files/post-3.5.5-kdegraphics.diff, +kdegraphics-3.5.5-r1.ebuild: + Add patch to fix bug #155949. 03 Dec 2006; Markus Rothe kdegraphics-3.5.5.ebuild: Stable on ppc64 diff --git a/kde-base/kdegraphics/files/digest-kdegraphics-3.5.5-r1 b/kde-base/kdegraphics/files/digest-kdegraphics-3.5.5-r1 new file mode 100644 index 000000000000..0298d4d6afa0 --- /dev/null +++ b/kde-base/kdegraphics/files/digest-kdegraphics-3.5.5-r1 @@ -0,0 +1,6 @@ +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 +MD5 6bffd8365786b79b10db269588a8a281 kpdf-3.5.3-poppler-bis.patch.bz2 6283 +RMD160 b4d4bffd22a67cfdb86cf9c4614d31e56ed01757 kpdf-3.5.3-poppler-bis.patch.bz2 6283 +SHA256 08ea2cda6088ec33da22f0fbb2046de08bc6e26167b8373bbc22f891ed021a02 kpdf-3.5.3-poppler-bis.patch.bz2 6283 diff --git a/kde-base/kdegraphics/files/post-3.5.5-kdegraphics.diff b/kde-base/kdegraphics/files/post-3.5.5-kdegraphics.diff new file mode 100644 index 000000000000..881b81757ab4 --- /dev/null +++ b/kde-base/kdegraphics/files/post-3.5.5-kdegraphics.diff @@ -0,0 +1,134 @@ +--- kfile-plugins/jpeg/exif.h ++++ kfile-plugins/jpeg/exif.h +@@ -72,7 +72,8 @@ + int Get32s(void * Long); + unsigned Get32u(void * Long); + double ConvertAnyFormat(void * ValuePtr, int Format); +- void ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBase, unsigned ExifLength); ++ void ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBase, unsigned ExifLength, ++ unsigned NestingLevel); + void process_COM (const uchar * Data, int length); + void process_SOFn (const uchar * Data, int marker); + int Get16m(const void * Short); +--- kfile-plugins/jpeg/exif.cpp ++++ kfile-plugins/jpeg/exif.cpp +@@ -446,7 +446,7 @@ + //-------------------------------------------------------------------------- + // Process one of the nested EXIF directories. + //-------------------------------------------------------------------------- +-void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBase, unsigned ExifLength) ++void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBase, unsigned ExifLength, unsigned NestingLevel) + { + int de; + int a; +@@ -454,6 +454,9 @@ + unsigned ThumbnailOffset = 0; + unsigned ThumbnailSize = 0; + ++ if ( NestingLevel > 4) ++ throw FatalError("Maximum directory nesting exceeded (corrupt exif header)"); ++ + NumDirEntries = Get16u(DirStart); + #define DIR_ENTRY_ADDR(Start, Entry) (Start+2+12*(Entry)) + +@@ -476,7 +479,7 @@ + for (de=0;de 0x10000) { ++ throw FatalError("Illegal number of components for tag"); ++ continue; ++ } ++ + ByteCount = Components * BytesPerFormat[Format]; + + if (ByteCount > 4){ +@@ -517,11 +525,11 @@ + switch(Tag){ + + case TAG_MAKE: +- ExifData::CameraMake = QString((char*)ValuePtr); ++ ExifData::CameraMake = QString::fromLatin1((const char*)ValuePtr, 31); + break; + + case TAG_MODEL: +- ExifData::CameraModel = QString((char*)ValuePtr); ++ ExifData::CameraModel = QString::fromLatin1((const char*)ValuePtr, 39); + break; + + case TAG_ORIENTATION: +@@ -529,7 +537,7 @@ + break; + + case TAG_DATETIME_ORIGINAL: +- DateTime = QString((char*)ValuePtr); ++ DateTime = QString::fromLatin1((const char*)ValuePtr, 19); + break; + + case TAG_USERCOMMENT: +@@ -550,14 +558,12 @@ + int c; + c = (ValuePtr)[a]; + if (c != '\0' && c != ' '){ +- //strncpy(ImageInfo.Comments, (const char*)(a+ValuePtr), 199); +- UserComment.sprintf("%s", (const char*)(a+ValuePtr)); ++ UserComment = QString::fromLatin1((const char*)(a+ValuePtr), 199); + break; + } + } + }else{ +- //strncpy(ImageInfo.Comments, (const char*)ValuePtr, 199); +- UserComment.sprintf("%s", (const char*)ValuePtr); ++ UserComment = QString::fromLatin1((const char*)ValuePtr, 199); + } + break; + +@@ -676,10 +682,10 @@ + if (Tag == TAG_EXIF_OFFSET || Tag == TAG_INTEROP_OFFSET){ + unsigned char * SubdirStart; + SubdirStart = OffsetBase + Get32u(ValuePtr); +- if (SubdirStart < OffsetBase || SubdirStart > OffsetBase+ExifLength){ ++ if (SubdirStart <= OffsetBase || SubdirStart >= OffsetBase+ExifLength){ + throw FatalError("Illegal subdirectory link"); + } +- ProcessExifDir(SubdirStart, OffsetBase, ExifLength); ++ ProcessExifDir(SubdirStart, OffsetBase, ExifLength, NestingLevel+1); + continue; + } + } +@@ -709,7 +715,7 @@ + } + }else{ + if (SubdirStart <= OffsetBase+ExifLength){ +- ProcessExifDir(SubdirStart, OffsetBase, ExifLength); ++ ProcessExifDir(SubdirStart, OffsetBase, ExifLength, NestingLevel+1); + } + } + } +@@ -719,7 +725,7 @@ + } + + if (ThumbnailSize && ThumbnailOffset){ +- if (ThumbnailSize + ThumbnailOffset <= ExifLength){ ++ if (ThumbnailSize + ThumbnailOffset < ExifLength){ + // The thumbnail pointer appears to be valid. Store it. + Thumbnail.loadFromData(OffsetBase + ThumbnailOffset, ThumbnailSize, "JPEG"); + } +@@ -810,7 +816,7 @@ + LastExifRefd = CharBuf; + + // First directory starts 16 bytes in. Offsets start at 8 bytes in. +- ProcessExifDir(CharBuf+16, CharBuf+8, length-6); ++ ProcessExifDir(CharBuf+16, CharBuf+8, length-6, 0); + + // This is how far the interesting (non thumbnail) part of the exif went. + ExifSettingsLength = LastExifRefd - CharBuf; diff --git a/kde-base/kdegraphics/kdegraphics-3.5.5-r1.ebuild b/kde-base/kdegraphics/kdegraphics-3.5.5-r1.ebuild new file mode 100644 index 000000000000..bcb8e520304f --- /dev/null +++ b/kde-base/kdegraphics/kdegraphics-3.5.5-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdegraphics/kdegraphics-3.5.5-r1.ebuild,v 1.1 2006/12/05 14:51:51 flameeyes Exp $ + +inherit kde-dist eutils + +DESCRIPTION="KDE graphics-related apps" + +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="gphoto2 imlib openexr opengl pdf povray scanner tetex" + +DEPEND="~kde-base/kdebase-${PV} + >=media-libs/freetype-2 + media-libs/fontconfig + gphoto2? ( media-libs/libgphoto2 ) + scanner? ( media-gfx/sane-backends ) + media-libs/libart_lgpl + media-libs/lcms + dev-libs/fribidi + imlib? ( media-libs/imlib ) + virtual/ghostscript + media-libs/tiff + openexr? ( >=media-libs/openexr-1.2 ) + povray? ( media-gfx/povray + virtual/opengl ) + pdf? ( >=app-text/poppler-0.5.1 + >=app-text/poppler-bindings-0.5.1 )" + +RDEPEND="${DEPEND} + tetex? ( + || ( >=app-text/tetex-2 + app-text/ptex + app-text/cstetex + app-text/dvipdfm ) )" + +DEPEND="${DEPEND} + dev-util/pkgconfig" + +SRC_URI="${SRC_URI} + mirror://gentoo/kpdf-3.5.3-poppler-bis.patch.bz2" + +PATCHES="${DISTDIR}/kpdf-3.5.3-poppler-bis.patch.bz2 + ${FILESDIR}/post-3.5.5-kdegraphics.diff" + +pkg_setup() { + kde_pkg_setup + for ghostscript in app-text/ghostscript-{gnu,esp,afpl}; do + if has_version ${ghostscript} && ! built_with_use ${ghostscript} X; then + eerror "This package requires ${ghostscript} compiled with X11 support." + eerror "Please reemerge ${ghostscript} with USE=\"X\"." + die "Please reemerge ${ghostscript} with USE=\"X\"." + fi + done + if use pdf && ! 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="$(use_with openexr) $(use_with pdf poppler) + $(use_with gphoto2 kamera)" + + use imlib || export DO_NOT_COMPILE="${DO_NOT_COMPILE} kuickshow" + use scanner || export DO_NOT_COMPILE="${DO_NOT_COMPILE} kooka libkscan" + use povray || export DO_NOT_COMPILE="${DO_NOT_COMPILE} kpovmodeler" + use pdf || export DO_NOT_COMPILE="${DO_NOT_COMPILE} kpdf" + + rm -f ${S}/configure # ask rebuilding + kde_src_compile +} -- 2.26.2