Add patches (with new ebuild rev) for security bug #72804
authorCaleb Tennis <caleb@gentoo.org>
Thu, 9 Dec 2004 17:51:18 +0000 (17:51 +0000)
committerCaleb Tennis <caleb@gentoo.org>
Thu, 9 Dec 2004 17:51:18 +0000 (17:51 +0000)
kde-base/kdelibs/ChangeLog
kde-base/kdelibs/Manifest
kde-base/kdelibs/files/digest-kdelibs-3.2.3-r3 [new file with mode: 0644]
kde-base/kdelibs/files/digest-kdelibs-3.3.1-r1 [new file with mode: 0644]
kde-base/kdelibs/files/post-3.2.3-kdelibs-khtml.diff [new file with mode: 0644]
kde-base/kdelibs/files/post-3.2.3-kdelibs-kio.diff [new file with mode: 0644]
kde-base/kdelibs/files/post-3.3.1-kdelibs-khtml.diff [new file with mode: 0644]
kde-base/kdelibs/files/post-3.3.1-kdelibs-kio.diff [new file with mode: 0644]
kde-base/kdelibs/kdelibs-3.2.3-r3.ebuild [new file with mode: 0644]
kde-base/kdelibs/kdelibs-3.3.1-r1.ebuild [new file with mode: 0644]

index 07de5374ba15dcd8ea98f4477cef4ab16aba0ea5..7df9f77585013af8fa77bdfc5437b52e436a4aab 100644 (file)
@@ -1,6 +1,14 @@
 # ChangeLog for kde-base/kdelibs
 # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/ChangeLog,v 1.171 2004/12/09 01:43:18 caleb Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/ChangeLog,v 1.172 2004/12/09 17:51:18 caleb Exp $
+
+*kdelibs-3.3.1-r1 (09 Dec 2004)
+
+  09 Dec 2004; Caleb Tennis <caleb@gentoo.org>
+  +files/post-3.2.3-kdelibs-khtml.diff, +files/post-3.2.3-kdelibs-kio.diff,
+  +files/post-3.3.1-kdelibs-khtml.diff, +files/post-3.3.1-kdelibs-kio.diff,
+  +kdelibs-3.2.3-r3.ebuild, +kdelibs-3.3.1-r1.ebuild:
+  Add patches (with new ebuild rev) for security bug #72804
 
 *kdelibs-3.3.2 (08 Dec 2004)
 
index 91713096c1a01481f6f4e4949cd8b90fa35ed466..00cf2e28425d448e8a8ed80c53d14e7b13a78251 100644 (file)
@@ -1,18 +1,23 @@
 MD5 2f58e1c51efb89082af89b80505983be kdelibs-3.2.0.ebuild 2404
+MD5 79ad3c607a60e2726d82a6f0579af78d kdelibs-3.2.3-r3.ebuild 2828
 MD5 8a989f55b68f5521cd6e86f131f78a6e kdelibs-3.1.5-r1.ebuild 2055
 MD5 3c4af305c1f179c1d4e04ec8c5224a36 kdelibs-3.3.0.ebuild 3001
 MD5 b707cac51f1876562c5dc8552788d09f kdelibs-3.2.2-r1.ebuild 2611
 MD5 a6e84bcc0ded1adff3f3555fbfda3ad7 kdelibs-3.3.2.ebuild 2876
 MD5 3076e42461e8f1a8cd2829c5307f6d39 kdelibs-3.2.3-r2.ebuild 2731
-MD5 db63869f3266251f0d413573d24710c3 ChangeLog 27261
+MD5 11db723207c212ba56797d0f4040ee6a kdelibs-3.3.1-r1.ebuild 2930
+MD5 94aba605053b0118e1cbe6bda71fbab6 ChangeLog 27608
 MD5 14889ab75f97d76e58b0c1154e7683a9 metadata.xml 161
 MD5 748d9bf5fe752ab9587b9d0c15a3eff6 kdelibs-3.3.1.ebuild 2849
+MD5 a9840789442b11d5f1d4418b706566a7 files/post-3.3.1-kdelibs-kio.diff 1324
 MD5 0046c691fa833b2ff8d7eac15312a68b files/post-3.2.3-kdelibs-dcopserver.patch 4751
 MD5 52e0e955204a77781505d33b9a3c341d files/post-3.2.2-kdelibs-ktelnetservice.patch 974
 MD5 285676023bab94666dfec728231cfcd1 files/kdelibs-3.2.2-su.cpp.diff 383
 MD5 ca12b078c7288ce9b2653e639a5b3ee0 files/post-3.2.3-kdelibs-kcookiejar.patch 5384
 MD5 119cc73926dceafff9107b5f916277ee files/post-3.2.3-kdelibs-htmlframes.patch 15435
+MD5 5e9c627e4e9e367ce88ed62a0a9ac162 files/post-3.2.3-kdelibs-khtml.diff 2411
 MD5 1b408d4b494b5328cd15768991836fd8 files/post-3.3.2-kdelibs-kio.diff 1442
+MD5 fed1da1d587ee8aa43b3affc1fa9a35b files/post-3.3.1-kdelibs-khtml.diff 2447
 MD5 3f21fc4e8ddbf79459bfa8f2df1a5e15 files/animated-gif-fix.patch 317
 MD5 ee0b53e6fbaea17ae3543638dc09ca34 files/digest-kdelibs-3.2.0 68
 MD5 bf08eeb18202c2640f0184420af9a19e files/digest-kdelibs-3.3.0 68
@@ -22,8 +27,11 @@ MD5 345ce2e01cfdfa4754c47894c0271dcc files/post-3.2.3-kdelibs-kstandarddirs.patc
 MD5 41d30ba8cf8d36ad3caebeedb1ddfd0e files/kdelibs-3.1.5-kjs-alphaev6-gcc3-workaround.patch 477
 MD5 7cebc1abb3141287db618486fd679b32 files/post-3.2.2-kdelibs-kapplication.patch 882
 MD5 76ef4c7d472a5e3659219ee223f12cb5 files/qt-3.3-printfix.patch 333
+MD5 0ce7a1c41d2bc3c102c6c4d4a6ba8f0b files/post-3.2.3-kdelibs-kio.diff 1315
 MD5 bde52aa0bba055c4f678540ec20bfe5a files/post-3.1.5-kdelibs-ktelnetservice.patch 968
 MD5 8fea98dc672d5c85b217bcb8bcec9214 files/post-3.1.5-kdelibs-kapplication.patch 653
 MD5 1e53bd5071cc4fe6ba67fda7252a1cf2 files/digest-kdelibs-3.1.5-r1 68
 MD5 6176dc207f5ba91edee9b04ab111afe5 files/digest-kdelibs-3.2.2-r1 68
 MD5 57b3bdaa9934d84f320c1aa40a56afe4 files/digest-kdelibs-3.2.3-r2 68
+MD5 57b3bdaa9934d84f320c1aa40a56afe4 files/digest-kdelibs-3.2.3-r3 68
+MD5 a874ee470150aacab38ec42463cac4dd files/digest-kdelibs-3.3.1-r1 68
diff --git a/kde-base/kdelibs/files/digest-kdelibs-3.2.3-r3 b/kde-base/kdelibs/files/digest-kdelibs-3.2.3-r3
new file mode 100644 (file)
index 0000000..ab94bd8
--- /dev/null
@@ -0,0 +1 @@
+MD5 d9d1c4bd2016a96f156b491ca908dc16 kdelibs-3.2.3.tar.bz2 12737024
diff --git a/kde-base/kdelibs/files/digest-kdelibs-3.3.1-r1 b/kde-base/kdelibs/files/digest-kdelibs-3.3.1-r1
new file mode 100644 (file)
index 0000000..d9d5a99
--- /dev/null
@@ -0,0 +1 @@
+MD5 8636c93405b20eceadb12af5c5483508 kdelibs-3.3.1.tar.bz2 15573765
diff --git a/kde-base/kdelibs/files/post-3.2.3-kdelibs-khtml.diff b/kde-base/kdelibs/files/post-3.2.3-kdelibs-khtml.diff
new file mode 100644 (file)
index 0000000..810f4a5
--- /dev/null
@@ -0,0 +1,67 @@
+--- khtml/khtml_ext.cpp        3 Aug 2004 14:38:41 -0000       1.85.2.3
++++ khtml/khtml_ext.cpp        8 Dec 2004 02:09:29 -0000
+@@ -442,40 +442,44 @@ void KHTMLPopupGUIClient::slotSaveImageA
+   saveURL( d->m_khtml->widget(), i18n( "Save Image As" ), d->m_imageURL, metaData );
+ }
+ 
+ void KHTMLPopupGUIClient::slotCopyLinkLocation()
+ {
++  KURL safeURL(d->m_url);
++  safeURL.setPass(QString::null);
+ #ifndef QT_NO_MIMECLIPBOARD
+   // Set it in both the mouse selection and in the clipboard
+   KURL::List lst;
+-  lst.append( d->m_url );
++  lst.append( safeURL );
+   QApplication::clipboard()->setSelectionMode(true);
+   QApplication::clipboard()->setData( new KURLDrag( lst ) );
+   QApplication::clipboard()->setSelectionMode(false);
+   QApplication::clipboard()->setData( new KURLDrag( lst ) );
+ #else
+-  QApplication::clipboard()->setText( d->m_url.url() ); //FIXME(E): Handle multiple entries
++  QApplication::clipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries
+ #endif
+ }
+ 
+ void KHTMLPopupGUIClient::slotStopAnimations()
+ {
+   d->m_khtml->stopAnimations();
+ }
+ 
+ void KHTMLPopupGUIClient::slotCopyImageLocation()
+ {
++  KURL safeURL(d->m_imageURL);
++  safeURL.setPass(QString::null);
+ #ifndef QT_NO_MIMECLIPBOARD
+   // Set it in both the mouse selection and in the clipboard
+   KURL::List lst;
+-  lst.append( d->m_imageURL);
++  lst.append( safeURL );
+   QApplication::clipboard()->setSelectionMode(true);
+   QApplication::clipboard()->setData( new KURLDrag( lst ) );
+   QApplication::clipboard()->setSelectionMode(false);
+   QApplication::clipboard()->setData( new KURLDrag( lst ) );
+ #else
+-  QApplication::clipboard()->setText(d->m_imageURL.url()); //FIXME(E): Handle multiple entries
++  QApplication::clipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries
+ #endif
+ }
+ 
+ void KHTMLPopupGUIClient::slotViewImage()
+ {
+--- khtml/khtml_part.cpp       8 Aug 2004 11:10:55 -0000       1.959.2.23
++++ khtml/khtml_part.cpp       8 Dec 2004 02:09:32 -0000
+@@ -5465,10 +5465,12 @@ void KHTMLPart::khtmlMouseMoveEvent( kht
+       // Text or image link...
+       u = completeURL( d->m_strSelectedURL );
+       pix = KMimeType::pixmapForURL(u, 0, KIcon::Desktop, KIcon::SizeMedium);
+     }
+ 
++    u.setPass(QString::null);
++
+     KURLDrag* urlDrag = new KURLDrag( u, img ? 0 : d->m_view->viewport() );
+     if ( !d->m_referrer.isEmpty() )
+       urlDrag->metaData()["referrer"] = d->m_referrer;
+ 
+     if( img ) {
+
diff --git a/kde-base/kdelibs/files/post-3.2.3-kdelibs-kio.diff b/kde-base/kdelibs/files/post-3.2.3-kdelibs-kio.diff
new file mode 100644 (file)
index 0000000..c50eca2
--- /dev/null
@@ -0,0 +1,19 @@
+--- kio/kio/job.cpp    18 Jun 2004 09:09:18 -0000      1.368.2.11
++++ kio/kio/job.cpp    8 Dec 2004 02:20:23 -0000
+@@ -2890,12 +2890,14 @@ void CopyJob::copyNextFile()
+                        if ( f.open( IO_ReadWrite ) )
+                        {
+                            f.close();
+                            KSimpleConfig config( path );
+                            config.setDesktopGroup();
+-                           config.writePathEntry( QString::fromLatin1("URL"), (*it).uSource.url() );
+-                           config.writeEntry( QString::fromLatin1("Name"), (*it).uSource.url() );
++                           KURL url = (*it).uSource;
++                           url.setPass( "" );
++                           config.writePathEntry( QString::fromLatin1("URL"), url.url() );
++                           config.writeEntry( QString::fromLatin1("Name"), url.url() );
+                            config.writeEntry( QString::fromLatin1("Type"), QString::fromLatin1("Link") );
+                            QString protocol = (*it).uSource.protocol();
+                            if ( protocol == QString::fromLatin1("ftp") )
+                                config.writeEntry( QString::fromLatin1("Icon"), QString::fromLatin1("ftp") );
+                            else if ( protocol == QString::fromLatin1("http") )
diff --git a/kde-base/kdelibs/files/post-3.3.1-kdelibs-khtml.diff b/kde-base/kdelibs/files/post-3.3.1-kdelibs-khtml.diff
new file mode 100644 (file)
index 0000000..eea6697
--- /dev/null
@@ -0,0 +1,67 @@
+--- khtml/khtml_ext.cpp        25 Oct 2004 12:21:23 -0000      1.103
++++ khtml/khtml_ext.cpp        8 Nov 2004 05:29:24 -0000
+@@ -543,40 +543,44 @@ void KHTMLPopupGUIClient::slotSaveImageA
+   saveURL( d->m_khtml->widget(), i18n( "Save Image As" ), d->m_imageURL, metaData, QString::null, 0, d->m_suggestedFilename );
+ }
+ 
+ void KHTMLPopupGUIClient::slotCopyLinkLocation()
+ {
++  KURL safeURL(d->m_url);
++  safeURL.setPass(QString::null);
+ #ifndef QT_NO_MIMECLIPBOARD
+   // Set it in both the mouse selection and in the clipboard
+   KURL::List lst;
+-  lst.append( d->m_url );
++  lst.append( safeURL );
+   QApplication::clipboard()->setSelectionMode(true);
+   QApplication::clipboard()->setData( new KURLDrag( lst ) );
+   QApplication::clipboard()->setSelectionMode(false);
+   QApplication::clipboard()->setData( new KURLDrag( lst ) );
+ #else
+-  QApplication::clipboard()->setText( d->m_url.url() ); //FIXME(E): Handle multiple entries
++  QApplication::clipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries
+ #endif
+ }
+ 
+ void KHTMLPopupGUIClient::slotStopAnimations()
+ {
+   d->m_khtml->stopAnimations();
+ }
+ 
+ void KHTMLPopupGUIClient::slotCopyImageLocation()
+ {
++  KURL safeURL(d->m_imageURL);
++  safeURL.setPass(QString::null);
+ #ifndef QT_NO_MIMECLIPBOARD
+   // Set it in both the mouse selection and in the clipboard
+   KURL::List lst;
+-  lst.append( d->m_imageURL);
++  lst.append( safeURL );
+   QApplication::clipboard()->setSelectionMode(true);
+   QApplication::clipboard()->setData( new KURLDrag( lst ) );
+   QApplication::clipboard()->setSelectionMode(false);
+   QApplication::clipboard()->setData( new KURLDrag( lst ) );
+ #else
+-  QApplication::clipboard()->setText(d->m_imageURL.url()); //FIXME(E): Handle multiple entries
++  QApplication::clipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries
+ #endif
+ }
+ 
+ void KHTMLPopupGUIClient::slotViewImage()
+ {
+--- khtml/khtml_part.cpp       7 Nov 2004 13:56:07 -0000       1.1046
++++ khtml/khtml_part.cpp       8 Nov 2004 05:29:27 -0000
+@@ -5978,10 +5978,12 @@ void KHTMLPart::khtmlMouseMoveEvent( kht
+       // Text or image link...
+       u = completeURL( d->m_strSelectedURL );
+       pix = KMimeType::pixmapForURL(u, 0, KIcon::Desktop, KIcon::SizeMedium);
+     }
+ 
++    u.setPass(QString::null);
++
+     KURLDrag* urlDrag = new KURLDrag( u, img ? 0 : d->m_view->viewport() );
+     if ( !d->m_referrer.isEmpty() )
+       urlDrag->metaData()["referrer"] = d->m_referrer;
+ 
+     if( img ) {
+
diff --git a/kde-base/kdelibs/files/post-3.3.1-kdelibs-kio.diff b/kde-base/kdelibs/files/post-3.3.1-kdelibs-kio.diff
new file mode 100644 (file)
index 0000000..b03e16b
--- /dev/null
@@ -0,0 +1,20 @@
+--- kio/kio/job.cpp    1 Oct 2004 20:29:04 -0000       1.397.2.1
++++ kio/kio/job.cpp    8 Dec 2004 01:08:15 -0000       1.397.2.8
+@@ -3115,12 +3119,14 @@ void CopyJob::copyNextFile()
+                        if ( f.open( IO_ReadWrite ) )
+                        {
+                            f.close();
+                            KSimpleConfig config( path );
+                            config.setDesktopGroup();
+-                           config.writePathEntry( QString::fromLatin1("URL"), (*it).uSource.url() );
+-                           config.writeEntry( QString::fromLatin1("Name"), (*it).uSource.url() );
++                           KURL url = (*it).uSource;
++                           url.setPass( "" );
++                           config.writePathEntry( QString::fromLatin1("URL"), url.url() );
++                           config.writeEntry( QString::fromLatin1("Name"), url.url() );
+                            config.writeEntry( QString::fromLatin1("Type"), QString::fromLatin1("Link") );
+                            QString protocol = (*it).uSource.protocol();
+                            if ( protocol == QString::fromLatin1("ftp") )
+                                config.writeEntry( QString::fromLatin1("Icon"), QString::fromLatin1("ftp") );
+                            else if ( protocol == QString::fromLatin1("http") )
+
diff --git a/kde-base/kdelibs/kdelibs-3.2.3-r3.ebuild b/kde-base/kdelibs/kdelibs-3.2.3-r3.ebuild
new file mode 100644 (file)
index 0000000..466d139
--- /dev/null
@@ -0,0 +1,96 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/kdelibs-3.2.3-r3.ebuild,v 1.1 2004/12/09 17:51:18 caleb Exp $
+
+inherit kde eutils
+
+need-autoconf 2.5
+set-kdedir ${PV}
+
+DESCRIPTION="KDE libraries needed by all kde programs"
+HOMEPAGE="http//www.kde.org/"
+SRC_URI="mirror://kde/stable/${PV}/src/${PN}-${PV}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="3.2"
+KEYWORDS="alpha amd64 hppa ia64 ~mips ppc sparc x86"
+IUSE="alsa cups ipv6 ssl doc ldap"
+
+# kde.eclass has kdelibs in DEPEND, and we can't have that in here.
+# so we recreate the entire DEPEND from scratch.
+DEPEND=">=sys-devel/autoconf-2.58
+       >=sys-devel/automake-1.8
+       >=app-arch/bzip2-1.0.2
+       >=dev-libs/libxslt-1.0.31
+       >=dev-libs/libxml2-2.5.8
+       >=dev-libs/libpcre-3.9
+       ssl? ( >=dev-libs/openssl-0.9.6k )
+       alsa? ( media-libs/alsa-lib virtual/alsa )
+       cups? ( >=net-print/cups-1.1.19 )
+       ldap? ( >=net-nds/openldap-2.0.25 )
+       media-libs/tiff
+       >=app-admin/fam-2.6.10
+       virtual/ghostscript
+       media-libs/libart_lgpl
+       sys-devel/gettext
+       ~kde-base/arts-1.2.3
+       >=x11-libs/qt-3.2.3"
+RDEPEND="${DEPEND}
+       app-text/sgml-common
+       cups? ( net-print/cups )
+       doc? ( app-doc/doxygen )
+       dev-lang/python"
+
+src_unpack() {
+       kde_src_unpack
+       epatch ${FILESDIR}/post-3.2.3-kdelibs-kcookiejar.patch
+       epatch ${FILESDIR}/post-3.2.3-kdelibs-kstandarddirs.patch
+       epatch ${FILESDIR}/post-3.2.3-kdelibs-htmlframes.patch
+       epatch ${FILESDIR}/post-3.2.3-kdelibs-kio.diff
+       epatch ${FILESDIR}/post-3.2.3-kdelibs-khtml.diff
+       cd ${S}/dcop && patch -p0 < ${FILESDIR}/post-3.2.3-kdelibs-dcopserver.patch
+       cd ${S} && aclocal -I ${S}
+}
+
+src_compile() {
+       kde_src_compile myconf
+
+       myconf="$myconf --with-distribution=Gentoo --enable-libfam --enable-dnotify"
+       myconf="$myconf `use_with alsa` `use_enable cups`"
+
+       use ipv6        || myconf="$myconf --with-ipv6-lookup=no"
+       use ssl         && myconf="$myconf --with-ssl-dir=/usr" || myconf="$myconf --without-ssl"
+       use alsa        && myconf="$myconf --with-alsa" || myconf="$myconf --without-alsa"
+       use cups        && myconf="$myconf --enable-cups" || myconf="$myconf --disable-cups"
+
+       use x86 && myconf="$myconf --enable-fast-malloc=full"
+
+       kde_src_compile configure make
+
+       use doc && make apidox
+}
+
+src_install() {
+       kde_src_install
+       dohtml *.html
+
+       if use doc ; then
+               einfo "Copying API documentation..."
+               dodir ${KDEDIR}/share/doc/HTML/en/kdelibs-apidocs
+               cp -r ${S}/apidocs/* ${D}/$KDEDIR/share/doc/HTML/en/kdelibs-apidocs
+       else
+               rm -r ${D}/$KDEDIR/share/doc/HTML/en/kdelibs-apidocs
+       fi
+
+       # needed to fix lib64 issues on amd64, see bug #45669
+       use amd64 && ln -s ${KDEDIR}/lib ${D}/${KDEDIR}/lib64
+
+}
+
+pkg_postinst() {
+       if use doc ; then
+               rm $KDEDIR/share/doc/HTML/en/kdelibs-apidocs/common
+               ln -sf $KDEDIR/share/doc/HTML/en/common \
+                       $KDEDIR/share/doc/HTML/en/kdelibs-apidocs/common
+       fi
+}
diff --git a/kde-base/kdelibs/kdelibs-3.3.1-r1.ebuild b/kde-base/kdelibs/kdelibs-3.3.1-r1.ebuild
new file mode 100644 (file)
index 0000000..4493d15
--- /dev/null
@@ -0,0 +1,105 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/kdelibs-3.3.1-r1.ebuild,v 1.1 2004/12/09 17:51:18 caleb Exp $
+
+inherit kde eutils flag-o-matic
+set-kdedir 3.3
+
+DESCRIPTION="KDE libraries needed by all kde programs"
+HOMEPAGE="http//www.kde.org/"
+SRC_URI="mirror://kde/stable/${PV}/src/${PN}-${PV}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="3.3"
+KEYWORDS="~amd64 hppa ~mips ppc ~ppc64 sparc x86 alpha"
+IUSE="alsa arts cups doc ipv6 kerberos ldap ssl tiff"
+
+# kde.eclass has kdelibs in DEPEND, and we can't have that in here.
+# so we recreate the entire DEPEND from scratch.
+DEPEND=">=sys-devel/autoconf-2.58
+       >=sys-devel/automake-1.8
+       app-arch/bzip2
+       >=dev-libs/libxslt-1.1.4
+       >=dev-libs/libxml2-2.6.6
+       >=dev-libs/libpcre-4.2
+       ssl? ( >=dev-libs/openssl-0.9.7d )
+       alsa? ( media-libs/alsa-lib virtual/alsa )
+       arts? ( ~kde-base/arts-1.3.1 )
+       cups? ( >=net-print/cups-1.1.19 )
+       ldap? ( >=net-nds/openldap-2.1.26 )
+       tiff? ( media-libs/tiff )
+       kerberos? ( virtual/krb5 )
+       virtual/fam
+       virtual/ghostscript
+       media-libs/libart_lgpl
+       net-dns/libidn
+       sys-devel/gettext
+       >=x11-libs/qt-3.3.3"
+RDEPEND="${DEPEND}
+       app-text/sgml-common
+       cups? ( net-print/cups )
+       doc? ( app-doc/doxygen )"
+
+src_unpack() {
+       kde_src_unpack
+       epatch ${FILESDIR}/post-3.3.1-kdelibs-kio.diff
+       epatch ${FILESDIR}/post-3.3.1-kdelibs-khtml.diff
+}
+
+src_compile() {
+       kde_src_compile myconf
+
+       myconf="$myconf --with-distribution=Gentoo --enable-libfam --enable-dnotify"
+       myconf="$myconf $(use_with alsa) $(use_enable cups) $(use_with arts)"
+
+       use ipv6        || myconf="$myconf --with-ipv6-lookup=no"
+       use ssl         && myconf="$myconf --with-ssl-dir=/usr" || myconf="$myconf --without-ssl"
+
+       use kerberos || myconf="$myconf --with-gssapi=no"
+
+       use x86 && myconf="$myconf --enable-fast-malloc=full"
+       use ppc64 && append-flags -mminimal-toc
+
+       kde_src_compile configure make
+
+       use doc && make apidox
+}
+
+src_install() {
+       kde_src_install
+       dohtml *.html
+
+       if use doc ; then
+               einfo "Copying API documentation..."
+               dodir ${KDEDIR}/share/doc/HTML/en/kdelibs-apidocs
+               cp -r ${S}/apidocs/* ${D}/$KDEDIR/share/doc/HTML/en/kdelibs-apidocs
+       else
+               rm -r ${D}/$KDEDIR/share/doc/HTML/en/kdelibs-apidocs
+       fi
+
+       # needed to fix lib64 issues on amd64, see bug #45669
+       use amd64 && ln -s ${KDEDIR}/lib ${D}/${KDEDIR}/lib64
+
+
+       if ! use arts ; then
+
+               dodir /etc/env.d
+
+               echo "PATH=${PREFIX}/bin
+ROOTPATH=${PREFIX}/sbin:${PREFIX}/bin
+LDPATH=${PREFIX}/lib
+CONFIG_PROTECT=\"${PREFIX}/share/config ${PREFIX}/env ${PREFIX}/shutdown\"" > ${D}/etc/env.d/47kdepaths-3.3.1 # number goes down with version upgrade
+
+               echo "KDEDIR=$PREFIX" > ${D}/etc/env.d/58kdedir-3.3.1 # number goes up with version upgrade
+
+       fi
+
+}
+
+pkg_postinst() {
+       if use doc ; then
+               rm $KDEDIR/share/doc/HTML/en/kdelibs-apidocs/common
+               ln -sf $KDEDIR/share/doc/HTML/en/common \
+                       $KDEDIR/share/doc/HTML/en/kdelibs-apidocs/common
+       fi
+}