diff options
author | 2005-10-10 22:10:08 +0000 | |
---|---|---|
committer | 2005-10-10 22:10:08 +0000 | |
commit | f0bf0f010e05b84a2bd27d2c56295228c2e57891 (patch) | |
tree | 3d284a1baa973e79df960a7b06640bd4af7e47dd /app-office/koffice | |
parent | Version bump. Adds support for Creative Zen (Micro-like unit with 20GB capaci... (diff) | |
download | historical-f0bf0f010e05b84a2bd27d2c56295228c2e57891.tar.gz historical-f0bf0f010e05b84a2bd27d2c56295228c2e57891.tar.bz2 historical-f0bf0f010e05b84a2bd27d2c56295228c2e57891.zip |
New version.
Package-Manager: portage-2.0.51.22-r3
Diffstat (limited to 'app-office/koffice')
-rw-r--r-- | app-office/koffice/ChangeLog | 11 | ||||
-rw-r--r-- | app-office/koffice/files/digest-koffice-1.4.1-r1 | 1 | ||||
-rw-r--r-- | app-office/koffice/files/digest-koffice-1.4.2 | 1 | ||||
-rw-r--r-- | app-office/koffice/files/koffice-1.4.1-rtfimport.patch | 325 | ||||
-rw-r--r-- | app-office/koffice/koffice-1.4.1-r1.ebuild | 70 | ||||
-rw-r--r-- | app-office/koffice/koffice-1.4.2.ebuild | 63 |
6 files changed, 470 insertions, 1 deletions
diff --git a/app-office/koffice/ChangeLog b/app-office/koffice/ChangeLog index fe1f4c2c5f71..34ee9280bb40 100644 --- a/app-office/koffice/ChangeLog +++ b/app-office/koffice/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for app-office/koffice # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-office/koffice/ChangeLog,v 1.113 2005/09/03 15:52:24 hansmi Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-office/koffice/ChangeLog,v 1.114 2005/10/10 22:06:00 greg_g Exp $ + +*koffice-1.4.2 (10 Oct 2005) +*koffice-1.4.1-r1 (10 Oct 2005) + + 10 Oct 2005; Gregorio Guidi <greg_g@gentoo.org> + +files/koffice-1.4.1-rtfimport.patch, +koffice-1.4.1-r1.ebuild, + +koffice-1.4.2.ebuild: + New version. Includes fix for buffer overflow in RTF import. Fix applied to + 1.4.1, too. 03 Sep 2005; Michael Hanselmann <hansmi@gentoo.org> koffice-1.4.1.ebuild: Stable on ppc. diff --git a/app-office/koffice/files/digest-koffice-1.4.1-r1 b/app-office/koffice/files/digest-koffice-1.4.1-r1 new file mode 100644 index 000000000000..47d9bab5c838 --- /dev/null +++ b/app-office/koffice/files/digest-koffice-1.4.1-r1 @@ -0,0 +1 @@ +MD5 91a7b68757addc5934c5a8209a4926d5 koffice-1.4.1.tar.bz2 19364338 diff --git a/app-office/koffice/files/digest-koffice-1.4.2 b/app-office/koffice/files/digest-koffice-1.4.2 new file mode 100644 index 000000000000..a054824ae545 --- /dev/null +++ b/app-office/koffice/files/digest-koffice-1.4.2 @@ -0,0 +1 @@ +MD5 6b456fb7d54c84b11396b27a96ae0cf8 koffice-1.4.2.tar.bz2 19486852 diff --git a/app-office/koffice/files/koffice-1.4.1-rtfimport.patch b/app-office/koffice/files/koffice-1.4.1-rtfimport.patch new file mode 100644 index 000000000000..1bcf326fe121 --- /dev/null +++ b/app-office/koffice/files/koffice-1.4.1-rtfimport.patch @@ -0,0 +1,325 @@ +diff -Nur koffice-1.4.1.orig/filters/kword/rtf/import/rtfimport_tokenizer.cpp koffice-1.4.1/filters/kword/rtf/import/rtfimport_tokenizer.cpp +--- koffice-1.4.1.orig/filters/kword/rtf/import/rtfimport_tokenizer.cpp 2005-07-19 16:09:11.000000000 +0200 ++++ koffice-1.4.1/filters/kword/rtf/import/rtfimport_tokenizer.cpp 2005-10-08 10:17:14.000000000 +0200 +@@ -16,7 +16,7 @@ + + RTFTokenizer::RTFTokenizer() + { +- tokenText.resize( 4112 ); ++ tokenText.resize( 4113 ); + fileBuffer.resize( 4096 ); + infile = 0L; + } +@@ -30,8 +30,25 @@ + fileBufferPtr = 0L; + fileBufferEnd = 0L; + infile = in; ++ type = RTFTokenizer::PlainText; + } + ++int RTFTokenizer::nextChar() ++{ ++ if ( fileBufferPtr == fileBufferEnd ) { ++ int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); ++ fileBufferPtr = ( uchar* ) fileBuffer.data(); ++ fileBufferEnd = fileBufferPtr; ++ ++ if ( n <= 0 ) ++ return -1; ++ ++ fileBufferEnd = fileBufferPtr + n; ++ } ++ return *fileBufferPtr++; ++} ++ ++ + /** + * Reads the next token. + */ +@@ -42,22 +59,15 @@ + if (!infile) + return; + +- do +- { +- if (fileBufferPtr == fileBufferEnd) +- { +- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); ++ do { ++ int n = nextChar(); + +- if (n <= 0) +- { +- // Return CloseGroup on EOF +- ch = '}'; +- break; +- } +- fileBufferPtr = (uchar *)fileBuffer.data(); +- fileBufferEnd = (fileBufferPtr + n); +- } +- ch = *fileBufferPtr++; ++ if ( n <= 0 ) { ++ ch = '}'; ++ break; ++ } ++ ++ ch = n; + } + while (ch == '\n' || ch == '\r' && ch != 0); + +@@ -67,6 +77,7 @@ + + uchar *_text = (uchar *)text; + ++ + if (ch == '{') + type = RTFTokenizer::OpenGroup; + else if (ch == '}') +@@ -75,20 +86,14 @@ + { + type = RTFTokenizer::ControlWord; + +- if (fileBufferPtr == fileBufferEnd) +- { +- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); ++ int n = nextChar(); + +- if (n <= 0) +- { +- // Return CloseGroup on EOF +- type = RTFTokenizer::CloseGroup; +- return; +- } +- fileBufferPtr = (uchar *)fileBuffer.data(); +- fileBufferEnd = (fileBufferPtr + n); +- } +- ch = *fileBufferPtr++; ++ if ( n <= 0 ) { ++ // Return CloseGroup on EOF ++ type = RTFTokenizer::CloseGroup; ++ return; ++ } ++ ch = n; + + // Type is either control word or control symbol + if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) +@@ -96,64 +101,41 @@ + int v = 0; + + // Read alphabetic string (command) +- while ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) ++ while (_text < ( uchar* )tokenText.data()+tokenText.size()-3 && ++ ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) ) + { + *_text++ = ch; + +- if (fileBufferPtr == fileBufferEnd) +- { +- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); +- +- if (n <= 0) +- { +- ch = ' '; +- break; +- } +- fileBufferPtr = (uchar *)fileBuffer.data(); +- fileBufferEnd = (fileBufferPtr + n); +- } +- ch = *fileBufferPtr++; ++ int n = nextChar(); ++ if ( n <= 0 ) { ++ ch = ' '; ++ break; ++ } ++ ch = n; + } + + // Read numeric parameter (param) + bool isneg = (ch == '-'); + +- if (isneg) +- { +- if (fileBufferPtr == fileBufferEnd) +- { +- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); +- +- if (n <= 0) +- { +- // Return CloseGroup on EOF +- type = RTFTokenizer::CloseGroup; +- return; +- } +- fileBufferPtr = (uchar *)fileBuffer.data(); +- fileBufferEnd = (fileBufferPtr + n); +- } +- ch = *fileBufferPtr++; ++ if (isneg) { ++ int n = nextChar(); ++ if ( n <= 0 ) { ++ type = RTFTokenizer::CloseGroup; ++ return; ++ } ++ ch = n; + } +- while (ch >= '0' && ch <= '9') +- { ++ ++ while (ch >= '0' && ch <= '9') { + v = (10 * v) + ch - '0'; + hasParam = true; + +- if (fileBufferPtr == fileBufferEnd) +- { +- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); +- +- if (n <= 0) +- { +- ch = ' '; +- break; +- } +- fileBufferPtr = (uchar *)fileBuffer.data(); +- fileBufferEnd = (fileBufferPtr + n); +- } +- ch = *fileBufferPtr++; +- } ++ int n = nextChar(); ++ ++ if ( n <= 0 ) ++ n = ' '; ++ ch = n; ++ } + value = isneg ? -v : v; + + // If delimiter is a space, it's part of the control word +@@ -163,7 +145,7 @@ + } + + *_text = 0; // Just put an end of string for the test, it can then be over-written again +- if ( !qstrncmp( tokenText.data()+1, "bin", 4 ) ) // Test the NULL too to avoid catching keywords starting with "bin" ++ if ( !memcmp( tokenText.data()+1, "bin", 4 ) ) + { // We have \bin, so we need to read the bytes + kdDebug(30515) << "Token:" << tokenText << endl; + if (value > 0) +@@ -173,26 +155,15 @@ + binaryData.resize(value); + for (int i=0; i<value; i++) + { +- if (fileBufferPtr == fileBufferEnd) +- { +- const int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); +- +- if (n <= 0) +- { +- kdError(30515) << "\\bin stream hit end of file." << endl; +- type = RTFTokenizer::CloseGroup; +- break; +- } +- fileBufferPtr = (uchar *)fileBuffer.data(); +- fileBufferEnd = (fileBufferPtr + n); ++ int n = nextChar(); ++ if ( n <= 0 ) { ++ type = RTFTokenizer::CloseGroup; ++ break; + } +- binaryData[i]=*fileBufferPtr++; ++ ++ binaryData[i] = n; + } + } +- else +- { +- kdError(30515) << "\\bin with negative value skipping" << endl; +- } + } + + } +@@ -200,19 +171,13 @@ + { + type = RTFTokenizer::ControlWord; + *_text++ = ch; +- if (fileBufferPtr == fileBufferEnd) +- { +- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); + +- if (n <= 0) +- { +- // Return CloseGroup on EOF +- type = RTFTokenizer::CloseGroup; +- return; +- } +- fileBufferPtr = (uchar *)fileBuffer.data(); +- fileBufferEnd = (fileBufferPtr + n); +- } ++ int n = nextChar(); ++ ++ if ( n <= 0 ) { ++ type = RTFTokenizer::CloseGroup; ++ return; ++ } + ch = *fileBufferPtr++; + for(int i=0;i<2;i++) + { +@@ -220,22 +185,16 @@ + value<<=4; + value=value|((ch + ((ch & 16) ? 0 : 9)) & 0xf); + +- if (fileBufferPtr == fileBufferEnd) +- { +- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); +- +- if (n <= 0) +- { +- ch = ' '; +- break; +- } +- fileBufferPtr = (uchar *)fileBuffer.data(); +- fileBufferEnd = (fileBufferPtr + n); +- } ++ int n = nextChar(); ++ ++ if ( n <= 0 ) { ++ ch = ' '; ++ break; ++ } + ch = *fileBufferPtr++; + } +- --fileBufferPtr; +- } ++ --fileBufferPtr; ++ } + else + { + type = RTFTokenizer::ControlWord; +@@ -248,14 +207,16 @@ + + // Everything until next backslash, opener or closer + while ( ch != '\\' && ch != '{' && ch != '}' && ch != '\n' && +- ch != '\r' && fileBufferPtr <= fileBufferEnd ) ++ ch != '\r') + { + *_text++ = ch; ++ if(fileBufferPtr >= fileBufferEnd) ++ break; + ch = *fileBufferPtr++; + } +- +- // Give back last char +- --fileBufferPtr; ++ if(fileBufferPtr < fileBufferEnd) ++ --fileBufferPtr; // give back the last char + } + *_text++ = 0; ++ + } +diff -Nur koffice-1.4.1.orig/filters/kword/rtf/import/rtfimport_tokenizer.h koffice-1.4.1/filters/kword/rtf/import/rtfimport_tokenizer.h +--- koffice-1.4.1.orig/filters/kword/rtf/import/rtfimport_tokenizer.h 2005-07-19 16:09:11.000000000 +0200 ++++ koffice-1.4.1/filters/kword/rtf/import/rtfimport_tokenizer.h 2005-10-08 10:17:14.000000000 +0200 +@@ -50,6 +50,8 @@ + + // tokenizer (private) data + private: ++ int nextChar(); ++ + QFile *infile; + QByteArray fileBuffer; + QCString tokenText; diff --git a/app-office/koffice/koffice-1.4.1-r1.ebuild b/app-office/koffice/koffice-1.4.1-r1.ebuild new file mode 100644 index 000000000000..ea359a075e30 --- /dev/null +++ b/app-office/koffice/koffice-1.4.1-r1.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-office/koffice/koffice-1.4.1-r1.ebuild,v 1.1 2005/10/10 22:06:00 greg_g Exp $ + +inherit kde + +DESCRIPTION="An integrated office suite for KDE, the K Desktop Environment." +HOMEPAGE="http://www.koffice.org/" +SRC_URI="mirror://kde/stable/koffice-${PV}/src/${P}.tar.bz2" +LICENSE="GPL-2 LGPL-2" + +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="doc javascript mysql postgres" + +RDEPEND=">=media-gfx/imagemagick-5.5.2 + >=app-text/wv2-0.1.9 + >=media-libs/freetype-2 + media-libs/fontconfig + media-libs/libart_lgpl + dev-libs/libxml2 + dev-libs/libxslt + sys-libs/readline + mysql? ( dev-db/mysql ) + postgres? ( dev-libs/libpqxx ) + dev-lang/python + >=media-libs/lcms-1.12 + javascript? ( kde-base/kjsembed ) + !dev-db/kexi" + +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen ) + dev-util/pkgconfig" + +# add blockers on split packages derived from this one +for x in $(get-child-packages ${CATEGORY}/${PN}); do + DEPEND="${DEPEND} !${x}" + RDEPEND="${RDEPEND} !${x}" +done + +need-kde 3.3 + +# TODO: kword sql plugin needs Qt compiled with sql support +# the dependency on python is needed for scripting support in kexi +# and for kivio/kiviopart/kiviosdk. + +src_unpack() { + kde_src_unpack + + # Fix RTF import buffer overflow. Applied in 1.4.2. + epatch "${FILESDIR}/koffice-1.4.1-rtfimport.patch" +} + +src_compile() { + local myconf="$(use_enable mysql) $(use_enable postgres pgsql)" + + kde_src_compile + if use doc; then + make apidox || die + fi +} + +src_install() { + kde_src_install + if use doc; then + make DESTDIR="${D}" install-apidox || die + fi + + dodoc changes-* +} diff --git a/app-office/koffice/koffice-1.4.2.ebuild b/app-office/koffice/koffice-1.4.2.ebuild new file mode 100644 index 000000000000..22974df8b2c5 --- /dev/null +++ b/app-office/koffice/koffice-1.4.2.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-office/koffice/koffice-1.4.2.ebuild,v 1.1 2005/10/10 22:06:00 greg_g Exp $ + +inherit kde + +DESCRIPTION="An integrated office suite for KDE, the K Desktop Environment." +HOMEPAGE="http://www.koffice.org/" +SRC_URI="mirror://kde/stable/koffice-${PV}/src/${P}.tar.bz2" +LICENSE="GPL-2 LGPL-2" + +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="doc javascript mysql postgres" + +RDEPEND=">=media-gfx/imagemagick-5.5.2 + >=app-text/wv2-0.1.9 + >=media-libs/freetype-2 + media-libs/fontconfig + media-libs/libart_lgpl + dev-libs/libxml2 + dev-libs/libxslt + sys-libs/readline + mysql? ( dev-db/mysql ) + postgres? ( dev-libs/libpqxx ) + dev-lang/python + >=media-libs/lcms-1.12 + javascript? ( kde-base/kjsembed ) + !dev-db/kexi" + +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen ) + dev-util/pkgconfig" + +# add blockers on split packages derived from this one +for x in $(get-child-packages ${CATEGORY}/${PN}); do + DEPEND="${DEPEND} !${x}" + RDEPEND="${RDEPEND} !${x}" +done + +need-kde 3.3 + +# TODO: kword sql plugin needs Qt compiled with sql support +# the dependency on python is needed for scripting support in kexi +# and for kivio/kiviopart/kiviosdk. + +src_compile() { + local myconf="$(use_enable mysql) $(use_enable postgres pgsql)" + + kde_src_compile + if use doc; then + make apidox || die + fi +} + +src_install() { + kde_src_install + if use doc; then + make DESTDIR="${D}" install-apidox || die + fi + + dodoc changes-* +} |