diff options
6 files changed, 232 insertions, 1 deletions
diff --git a/app-office/koffice-libs/ChangeLog b/app-office/koffice-libs/ChangeLog index df292899e1e6..ca0b23a1ab8a 100644 --- a/app-office/koffice-libs/ChangeLog +++ b/app-office/koffice-libs/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-office/koffice-libs # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-office/koffice-libs/ChangeLog,v 1.60 2006/10/24 15:20:04 blubb Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-office/koffice-libs/ChangeLog,v 1.61 2006/11/30 09:40:48 flameeyes Exp $ + +*koffice-libs-1.6.0-r1 (30 Nov 2006) +*koffice-libs-1.4.2-r1 (30 Nov 2006) + + 30 Nov 2006; Diego Pettenò <flameeyes@gentoo.org> + +files/koffice-ole-filter.patch, +koffice-libs-1.4.2-r1.ebuild, + +koffice-libs-1.6.0-r1.ebuild: + Add patch to fix OLE filters, see bug #155914. 24 Oct 2006; Simon Stelling <blubb@gentoo.org> koffice-libs-1.5.2.ebuild: stable on amd64 diff --git a/app-office/koffice-libs/files/digest-koffice-libs-1.4.2-r1 b/app-office/koffice-libs/files/digest-koffice-libs-1.4.2-r1 new file mode 100644 index 000000000000..9a2dc2d67d8e --- /dev/null +++ b/app-office/koffice-libs/files/digest-koffice-libs-1.4.2-r1 @@ -0,0 +1,3 @@ +MD5 6b456fb7d54c84b11396b27a96ae0cf8 koffice-1.4.2.tar.bz2 19486852 +RMD160 117d5c50aa81d669002005f39fc03bc3f999b62c koffice-1.4.2.tar.bz2 19486852 +SHA256 c9d5ba0bbd008ebfc40500b0d69335d94ad9657cb58c5f2d939179de8d23d361 koffice-1.4.2.tar.bz2 19486852 diff --git a/app-office/koffice-libs/files/digest-koffice-libs-1.6.0-r1 b/app-office/koffice-libs/files/digest-koffice-libs-1.6.0-r1 new file mode 100644 index 000000000000..2e01d4cedd36 --- /dev/null +++ b/app-office/koffice-libs/files/digest-koffice-libs-1.6.0-r1 @@ -0,0 +1,3 @@ +MD5 e669cf19b2e1c7db7029c0772c527c0d koffice-1.6.0.tar.bz2 56718478 +RMD160 be09c18005eb33f6dc35ab0359cc97a8a658ce7c koffice-1.6.0.tar.bz2 56718478 +SHA256 9eddaae640ada9bd184f001e2489854daf7094b73e5f15b0b8deffb4cc654ae2 koffice-1.6.0.tar.bz2 56718478 diff --git a/app-office/koffice-libs/files/koffice-ole-filter.patch b/app-office/koffice-libs/files/koffice-ole-filter.patch new file mode 100644 index 000000000000..ca8b9d0c9185 --- /dev/null +++ b/app-office/koffice-libs/files/koffice-ole-filter.patch @@ -0,0 +1,87 @@ +diff -uNrp koffice-1.4.1/filters/olefilters/lib/klaola.cc koffice-1.4.1-kees/filters/olefilters/lib/klaola.cc +--- koffice-1.4.1/filters/olefilters/lib/klaola.cc 2005-07-19 07:09:30.000000000 -0700 ++++ koffice-1.4.1-kees/filters/olefilters/lib/klaola.cc 2006-11-21 16:02:08.000000000 -0800 +@@ -197,11 +197,21 @@ bool KLaola::parseHeader() { + num_of_bbd_blocks=read32(0x2c); + root_startblock=read32(0x30); + sbd_startblock=read32(0x3c); ++ ++ if (num_of_bbd_blocks >= 0x800000) { ++ kdError(s_area) << "KLaola::parseHeader(): Too many bbd blocks found in header!" << endl; ++ return false; ++ } + bbd_list=new unsigned int[num_of_bbd_blocks]; + + unsigned int i, j; +- for(i=0, j=0; i<num_of_bbd_blocks; ++i, j=j+4) ++ for(i=0, j=0; i<num_of_bbd_blocks; ++i, j=j+4) { + bbd_list[i]=read32(0x4c+j); ++ if (bbd_list[i] >= (0x800000 - 1)) { ++ kdError(s_area) << "KLaola::parseHeader(): bbd " << i << " offset (" << bbd_list[i] << ") too large" << endl; ++ return false; ++ } ++ } + return true; + } + +@@ -283,7 +293,8 @@ const unsigned char *KLaola::readBBStrea + unsigned char *p=0; + + tmp=start; +- while(tmp!=-2 && tmp>=0 && tmp<=static_cast<int>(maxblock)) { ++ /* 0x10000 chosen as arbitrary "too many blocks" limit to not loop forver */ ++ while(tmp!=-2 && tmp>=0 && i<0x10000 && tmp<=static_cast<int>(maxblock)) { + ++i; + tmp=nextBigBlock(tmp); + } +@@ -293,7 +304,7 @@ const unsigned char *KLaola::readBBStrea + maxSblock=i*8-1; + i=0; + tmp=start; +- while(tmp!=-2 && tmp>=0 && tmp<=static_cast<int>(maxblock)) { ++ while(tmp!=-2 && tmp>=0 && i<0x10000 && tmp<=static_cast<int>(maxblock)) { + memcpy(&p[i*0x200], &m_file.data[(tmp+1)*0x200], 0x200); + tmp=nextBigBlock(tmp); + ++i; +@@ -308,7 +319,8 @@ const unsigned char *KLaola::readSBStrea + unsigned char *p=0; + + tmp=start; +- while(tmp!=-2 && tmp>=0 && tmp<=static_cast<int>(maxSblock)) { ++ /* 0x10000 chosen as arbitrary "too many blocks" limit to not loop forver */ ++ while(tmp!=-2 && tmp>=0 && i<0x10000 && tmp<=static_cast<int>(maxSblock)) { + ++i; + tmp=nextSmallBlock(tmp); + } +@@ -316,7 +328,7 @@ const unsigned char *KLaola::readSBStrea + p=new unsigned char[i*0x40]; + i=0; + tmp=start; +- while(tmp!=-2 && tmp>=0 && tmp<=static_cast<int>(maxSblock)) { ++ while(tmp!=-2 && tmp>=0 && i<0x10000 && tmp<=static_cast<int>(maxSblock)) { + memcpy(&p[i*0x40], &smallBlockFile[tmp*0x40], 0x40); + tmp=nextSmallBlock(tmp); + ++i; +@@ -326,10 +338,20 @@ const unsigned char *KLaola::readSBStrea + } + + void KLaola::readBigBlockDepot() { ++ if (num_of_bbd_blocks >= 0x800000) ++ return; + + bigBlockDepot=new unsigned char[0x200*num_of_bbd_blocks]; +- for(unsigned int i=0; i<num_of_bbd_blocks; ++i) +- memcpy(&bigBlockDepot[i*0x200], &m_file.data[(bbd_list[i]+1)*0x200], 0x200); ++ for(unsigned int i=0; i<num_of_bbd_blocks; ++i) { ++ unsigned int offset = (bbd_list[i]+1)*0x200; ++ if (offset > m_file.length - 0x200) { ++ /* attempting to read past end of file */ ++ memset(&bigBlockDepot[i*0x200], 0, 0x200); ++ } ++ else { ++ memcpy(&bigBlockDepot[i*0x200], &m_file.data[offset], 0x200); ++ } ++ } + } + + void KLaola::readSmallBlockDepot() { diff --git a/app-office/koffice-libs/koffice-libs-1.4.2-r1.ebuild b/app-office/koffice-libs/koffice-libs-1.4.2-r1.ebuild new file mode 100644 index 000000000000..ff2df3abfe15 --- /dev/null +++ b/app-office/koffice-libs/koffice-libs-1.4.2-r1.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-office/koffice-libs/koffice-libs-1.4.2-r1.ebuild,v 1.1 2006/11/30 09:40:48 flameeyes Exp $ + +MAXKOFFICEVER=${PV} +KMNAME=koffice +KMMODULE=lib +inherit kde-meta eutils + +DESCRIPTION="Shared KOffice libraries." +HOMEPAGE="http://www.koffice.org/" +LICENSE="GPL-2 LGPL-2" + +SLOT="0" +KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86" +IUSE="doc" + +RDEPEND="$(deprange $PV $MAXKOFFICEVER app-office/koffice-data)" + +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen ) + dev-util/pkgconfig" + +KMEXTRA=" + interfaces/ + plugins/ + tools/ + filters/olefilters/ + filters/xsltfilter/ + filters/generic_wrapper/ + kounavail/ + doc/api/ + doc/koffice/ + doc/thesaurus/" + +KMEXTRACTONLY=" + kchart/kdchart/" + +PATCHES="${FILESDIR}/koffice-ole-filter.patch" + +need-kde 3.3 + +src_unpack() { + kde-meta_src_unpack unpack + + # Force the compilation of libkopainter. + sed -i 's:$(KOPAINTERDIR):kopainter:' $S/lib/Makefile.am + + kde-meta_src_unpack makefiles +} + +src_compile() { + kde-meta_src_compile + if use doc; then + make apidox || die + fi +} + +src_install() { + kde-meta_src_install + if use doc; then + make DESTDIR=${D} install-apidox || die + fi +} diff --git a/app-office/koffice-libs/koffice-libs-1.6.0-r1.ebuild b/app-office/koffice-libs/koffice-libs-1.6.0-r1.ebuild new file mode 100644 index 000000000000..c5125c35ae98 --- /dev/null +++ b/app-office/koffice-libs/koffice-libs-1.6.0-r1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-office/koffice-libs/koffice-libs-1.6.0-r1.ebuild,v 1.1 2006/11/30 09:40:48 flameeyes Exp $ + +MAXKOFFICEVER=${PV} +KMNAME=koffice +KMMODULE=lib +inherit kde-meta eutils + +DESCRIPTION="Shared KOffice libraries." +HOMEPAGE="http://www.koffice.org/" +LICENSE="GPL-2 LGPL-2" + +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="doc" + +RDEPEND="$(deprange $PV $MAXKOFFICEVER app-office/koffice-data) + virtual/python + dev-lang/ruby" + +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen ) + dev-util/pkgconfig" + +KMEXTRA="interfaces/ + plugins/ + tools/ + filters/olefilters/ + filters/xsltfilter/ + filters/generic_wrapper/ + kounavail/ + doc/api/ + doc/koffice/ + doc/thesaurus/" + +KMEXTRACTONLY=" + kchart/kdchart/" + +PATCHES="${FILESDIR}/koffice-ole-filter.patch" + +need-kde 3.4 + +src_unpack() { + kde-meta_src_unpack unpack + + # Force the compilation of libkopainter. + sed -i 's:$(KOPAINTERDIR):kopainter:' $S/lib/Makefile.am + + kde-meta_src_unpack makefiles +} + +src_compile() { + local myconf="--enable-scripting --with-pythonfir=${ROOT}/usr/$(get_libdir)/python${PYVER}/site-packages" + kde-meta_src_compile + if use doc; then + make apidox || die + fi +} + +src_install() { + kde-meta_src_install + if use doc; then + make DESTDIR=${D} install-apidox || die + fi +} |