diff options
author | Carsten Lohrke <carlo@gentoo.org> | 2006-04-21 18:39:56 +0000 |
---|---|---|
committer | Carsten Lohrke <carlo@gentoo.org> | 2006-04-21 18:39:56 +0000 |
commit | e7ca93b9073fb762a94dc70eeffc6763322090ed (patch) | |
tree | abedb137767880026986c93dcf13f03fc124d856 /kde-base/kdelibs | |
parent | New version 2.0 (diff) | |
download | gentoo-2-e7ca93b9073fb762a94dc70eeffc6763322090ed.tar.gz gentoo-2-e7ca93b9073fb762a94dc70eeffc6763322090ed.tar.bz2 gentoo-2-e7ca93b9073fb762a94dc70eeffc6763322090ed.zip |
Fix two crashes and bug #120858.
(Portage version: 2.0.54)
Diffstat (limited to 'kde-base/kdelibs')
-rw-r--r-- | kde-base/kdelibs/ChangeLog | 8 | ||||
-rw-r--r-- | kde-base/kdelibs/Manifest | 5 | ||||
-rw-r--r-- | kde-base/kdelibs/files/digest-kdelibs-3.5.2-r4 | 1 | ||||
-rw-r--r-- | kde-base/kdelibs/files/kdelibs-3.5.2-misc-fixes-2.diff | 446 | ||||
-rw-r--r-- | kde-base/kdelibs/kdelibs-3.5.2-r4.ebuild | 147 |
5 files changed, 605 insertions, 2 deletions
diff --git a/kde-base/kdelibs/ChangeLog b/kde-base/kdelibs/ChangeLog index 2d853f35dc52..4816341375c9 100644 --- a/kde-base/kdelibs/ChangeLog +++ b/kde-base/kdelibs/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for kde-base/kdelibs # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/ChangeLog,v 1.317 2006/04/17 18:28:09 carlo Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/ChangeLog,v 1.318 2006/04/21 18:39:55 carlo Exp $ + +*kdelibs-3.5.2-r4 (21 Apr 2006) + + 21 Apr 2006; Carsten Lohrke <carlo@gentoo.org> + +files/kdelibs-3.5.2-misc-fixes-2.diff, +kdelibs-3.5.2-r4.ebuild: + Fix two crashes and bug #120858. *kdelibs-3.5.2-r3 (17 Apr 2006) diff --git a/kde-base/kdelibs/Manifest b/kde-base/kdelibs/Manifest index e4be30aef7cb..f39afff08b18 100644 --- a/kde-base/kdelibs/Manifest +++ b/kde-base/kdelibs/Manifest @@ -1,4 +1,4 @@ -MD5 e349ad6866a95a42177fdec813d221fe ChangeLog 51140 +MD5 abadef8c2668775f8c406b8dc1322d00 ChangeLog 51326 MD5 e8b51d92930950619b2139c22d4e1407 files/digest-kdelibs-3.3.2-r10 517 MD5 b6eeb54c84f336414abfd45f4fa6a156 files/digest-kdelibs-3.4.1-r1 68 MD5 b6eeb54c84f336414abfd45f4fa6a156 files/digest-kdelibs-3.4.1-r2 68 @@ -8,6 +8,7 @@ MD5 e7fe23c3618de82d63dfdc90fb483a86 files/digest-kdelibs-3.4.3 68 MD5 e7fe23c3618de82d63dfdc90fb483a86 files/digest-kdelibs-3.4.3-r1 68 MD5 4c4f49895caa9f8976a6dced47216f21 files/digest-kdelibs-3.5.2-r2 250 MD5 380d0beea866646a3702d083896cff80 files/digest-kdelibs-3.5.2-r3 68 +MD5 380d0beea866646a3702d083896cff80 files/digest-kdelibs-3.5.2-r4 68 MD5 a5d3cb18c9572d8ca3dd06cbe5d226f1 files/kde3-dcopidlng.patch 681 MD5 25ab050b323a8efb2049fd770f50058b files/kdelibs-3.3.2-anchor-fix.patch 5947 MD5 d3df6d042148fd884422822aaf4ffbab files/kdelibs-3.3.2-aspell-dir.patch 467 @@ -23,6 +24,7 @@ MD5 4173e2f4114839a4f378835b6a52ed74 files/kdelibs-3.5.2-kate-fixes-2.diff 16521 MD5 b90114903755198fb136b739697819eb files/kdelibs-3.5.2-kate-fixes.diff 14651 MD5 f80013d47f75d05b7d79c2a8aa93f19c files/kdelibs-3.5.2-kio-errror-handling.diff 3919 MD5 60558f20708e58f343461af74915f9de files/kdelibs-3.5.2-kio-fixes.diff 6739 +MD5 4f014cb61aa0d8d73fed1ff7201ae9ec files/kdelibs-3.5.2-misc-fixes-2.diff 14433 MD5 3327af3adbdebae3ca8fc90f992d4e2c files/kdelibs-3.5.2-misc-fixes.diff 14127 MD5 073d3bf868dd8f07df2029d692308cb4 files/kdelibs-3.5.2-xorg7-rgbtxt.patch 633 MD5 7e082af5fd71b9b01d01a86f31646499 files/post-3.3.2-kdelibs-htmlframes2.patch 989 @@ -37,4 +39,5 @@ MD5 2c50f5fde5dce4194f6b3dd5e21dfe4a kdelibs-3.4.3-r1.ebuild 3481 MD5 8118ed2fe88987c7ed81197599658246 kdelibs-3.4.3.ebuild 3383 MD5 a16c66fff6c663988a028192d97a00db kdelibs-3.5.2-r2.ebuild 4092 MD5 18775b90e73dcefd4db71497d6017420 kdelibs-3.5.2-r3.ebuild 4123 +MD5 5a7b580cd7023ba5c7f731dbdd04fd5d kdelibs-3.5.2-r4.ebuild 4243 MD5 acc03a4b12bb0433a57e95bd253b9501 metadata.xml 156 diff --git a/kde-base/kdelibs/files/digest-kdelibs-3.5.2-r4 b/kde-base/kdelibs/files/digest-kdelibs-3.5.2-r4 new file mode 100644 index 000000000000..7399e31d3824 --- /dev/null +++ b/kde-base/kdelibs/files/digest-kdelibs-3.5.2-r4 @@ -0,0 +1 @@ +MD5 367738696dc468859cf90d5a6e8f18a9 kdelibs-3.5.2.tar.bz2 15442103 diff --git a/kde-base/kdelibs/files/kdelibs-3.5.2-misc-fixes-2.diff b/kde-base/kdelibs/files/kdelibs-3.5.2-misc-fixes-2.diff new file mode 100644 index 000000000000..32af99920097 --- /dev/null +++ b/kde-base/kdelibs/files/kdelibs-3.5.2-misc-fixes-2.diff @@ -0,0 +1,446 @@ +--- kdelibs/kparts/factory.cpp 2005/09/29 09:47:40 465272 ++++ kdelibs/kparts/factory.cpp 2006/04/05 22:48:19 526923 +@@ -64,7 +64,7 @@ + if ( !factory ) + return 0; + KParts::Factory *pfactory = dynamic_cast<KParts::Factory *>( factory ); +- if ( !factory ) ++ if ( !pfactory ) + return 0; + return pfactory->partInstance(); + } +--- kdelibs/kdeui/kcmodule.cpp 2005/09/29 09:47:40 465272 ++++ kdelibs/kdeui/kcmodule.cpp 2006/04/05 17:22:08 526823 +@@ -79,7 +79,12 @@ + { + init(); + d->_instance = instance; +- KGlobal::locale()->insertCatalogue(instance->instanceName()); ++ ++ if (instance) ++ { ++ KGlobal::locale()->insertCatalogue(instance->instanceName()); ++ } ++ + d->_hasOwnInstance = false; + KGlobal::setActiveInstance(this->instance()); + } +--- kdelibs/kdeui/kcolordialog.cpp 2006/02/14 13:21:59 509356 ++++ kdelibs/kdeui/kcolordialog.cpp 2006/04/07 13:50:45 527264 +@@ -242,7 +242,7 @@ + p = (uint *) image.scanLine( ySize - s - 1 ); + for( h = 0; h < xSize; h++ ) + { +- col.setHsv( 359*h/(xSize-1), 255*s/(ySize-1), 192 ); ++ col.setHsv( 359*h/(xSize-1), 255*s/((ySize == 1) ? 1 : ySize-1), 192 ); + *p = col.rgb(); + p++; + } +@@ -305,7 +305,7 @@ + + for( int x = 0; x < xSize; x++ ) + { +- col.setHsv( _hue, _sat, 255*x/(xSize-1) ); ++ col.setHsv( _hue, _sat, 255*x/((xSize == 1) ? 1 : xSize-1) ); + rgb = col.rgb(); + *p++ = rgb; + } +@@ -317,7 +317,7 @@ + for ( int v = 0; v < ySize; v++ ) + { + p = (uint *) image.scanLine( ySize - v - 1 ); +- col.setHsv( _hue, _sat, 255*v/(ySize-1) ); ++ col.setHsv( _hue, _sat, 255*v/((ySize == 1) ? 1 : ySize-1) ); + rgb = col.rgb(); + for ( int i = 0; i < xSize; i++ ) + *p++ = rgb; +@@ -426,7 +426,7 @@ + + void KColorCells::mouseMoveEvent( QMouseEvent *e ) + { +- if( !(e->state() && LeftButton)) return; ++ if( !(e->state() & LeftButton)) return; + + if(inMouse) { + int delay = KGlobalSettings::dndEventDelay(); +@@ -530,7 +530,7 @@ + void KColorPatch::mouseMoveEvent( QMouseEvent *e ) + { + // Drag color object +- if( !(e->state() && LeftButton)) return; ++ if( !(e->state() & LeftButton)) return; + KColorDrag *d = new KColorDrag( color, this); + d->dragCopy(); + } +@@ -1253,30 +1253,26 @@ + void + KColorDialog::readSettings() + { +- KConfig* config = KGlobal::config(); ++ KConfigGroup group( KGlobal::config(), "Colors" ); + +- QString oldgroup = config->group(); +- +- config->setGroup("Colors"); +- QString palette = config->readEntry("CurrentPalette"); ++ QString palette = group.readEntry("CurrentPalette"); + d->table->setPalette(palette); +- config->setGroup( oldgroup ); + } + + void + KColorDialog::slotWriteSettings() + { +- KConfig* config = KGlobal::config(); +- config->setGroup("Colors"); ++ KConfigGroup group( KGlobal::config(), "Colors" ); ++ + QString palette = d->table->palette(); +- if (!config->hasDefault("CurrentPalette") && ++ if (!group.hasDefault("CurrentPalette") && + (d->table->palette() == d->originalPalette)) + { +- config->revertToDefault("CurrentPalette"); ++ group.revertToDefault("CurrentPalette"); + } + else + { +- config->writeEntry("CurrentPalette", d->table->palette()); ++ group.writeEntry("CurrentPalette", d->table->palette()); + } + } + +--- kdelibs/kdeui/kdialogbase.cpp 2005/09/29 09:47:40 465272 ++++ kdelibs/kdeui/kdialogbase.cpp 2006/04/05 16:45:10 526809 +@@ -668,7 +668,7 @@ + return; + } + +- if( style < 0 || style > ActionStyleMAX ) { style = ActionStyle0; } ++ if( style < 0 || style >= ActionStyleMAX ) { style = ActionStyle0; } + d->mButton.style = style; + + const int *layout; +--- kdelibs/kdecore/kglobalaccel_x11.cpp 2005/09/29 09:47:40 465272 ++++ kdelibs/kdecore/kglobalaccel_x11.cpp 2006/04/09 09:06:52 527729 +@@ -212,7 +212,7 @@ + if( failed ) { + kdDebug(125) << "grab failed!\n"; + for( uint m = 0; m <= 0xff; m++ ) { +- if( m & keyModMaskX == 0 ) ++ if(( m & keyModMaskX ) == 0 ) + XUngrabKey( qt_xdisplay(), keyCodeX, keyModX | m, qt_xrootwin() ); + } + } +--- kdelibs/kdecore/network/kresolver.cpp 2006/02/26 18:55:08 513854 ++++ kdelibs/kdecore/network/kresolver.cpp 2006/04/13 14:57:25 529483 +@@ -609,7 +609,7 @@ + + QStrList KResolver::protocolName(int protonum) + { +- struct protoent *pe; ++ struct protoent *pe = 0L; + #ifndef HAVE_GETPROTOBYNAME_R + QMutexLocker locker(&getXXbyYYmutex); + +@@ -628,6 +628,7 @@ + if (getprotobynumber_r(protonum, &protobuf, buf, buflen, &pe) == ERANGE) + # endif + { ++ pe = 0L; + buflen += 1024; + delete [] buf; + } +@@ -655,7 +656,7 @@ + + QStrList KResolver::protocolName(const char *protoname) + { +- struct protoent *pe; ++ struct protoent *pe = 0L; + #ifndef HAVE_GETPROTOBYNAME_R + QMutexLocker locker(&getXXbyYYmutex); + +@@ -674,6 +675,7 @@ + if (getprotobyname_r(protoname, &protobuf, buf, buflen, &pe) == ERANGE) + # endif + { ++ pe = 0L; + buflen += 1024; + delete [] buf; + } +@@ -701,7 +703,7 @@ + + int KResolver::protocolNumber(const char *protoname) + { +- struct protoent *pe; ++ struct protoent *pe = 0L; + #ifndef HAVE_GETPROTOBYNAME_R + QMutexLocker locker(&getXXbyYYmutex); + +@@ -720,6 +722,7 @@ + if (getprotobyname_r(protoname, &protobuf, buf, buflen, &pe) == ERANGE) + # endif + { ++ pe = 0L; + buflen += 1024; + delete [] buf; + } +@@ -743,7 +746,7 @@ + + int KResolver::servicePort(const char *servname, const char *protoname) + { +- struct servent *se; ++ struct servent *se = 0L; + #ifndef HAVE_GETSERVBYNAME_R + QMutexLocker locker(&getXXbyYYmutex); + +@@ -762,6 +765,7 @@ + if (getservbyname_r(servname, protoname, &servbuf, buf, buflen, &se) == ERANGE) + # endif + { ++ se = 0L; + buflen += 1024; + delete [] buf; + } +@@ -785,7 +789,7 @@ + + QStrList KResolver::serviceName(const char* servname, const char *protoname) + { +- struct servent *se; ++ struct servent *se = 0L; + #ifndef HAVE_GETSERVBYNAME_R + QMutexLocker locker(&getXXbyYYmutex); + +@@ -804,6 +808,7 @@ + if (getservbyname_r(servname, protoname, &servbuf, buf, buflen, &se) == ERANGE) + # endif + { ++ se = 0L; + buflen += 1024; + delete [] buf; + } +@@ -831,7 +836,7 @@ + + QStrList KResolver::serviceName(int port, const char *protoname) + { +- struct servent *se; ++ struct servent *se = 0L; + #ifndef HAVE_GETSERVBYPORT_R + QMutexLocker locker(&getXXbyYYmutex); + +@@ -850,6 +855,7 @@ + if (getservbyport_r(port, protoname, &servbuf, buf, buflen, &se) == ERANGE) + # endif + { ++ se = 0L; + buflen += 1024; + delete [] buf; + } +--- kdelibs/kdecore/netsupp.cpp 2005/09/29 09:47:40 465272 ++++ kdelibs/kdecore/netsupp.cpp 2006/04/13 14:57:25 529483 +@@ -352,15 +352,9 @@ + return 0; + + out: +- // Normal exit of the function +- if (err == 0) +- *result = res; +- else +- { +- if (res->data != NULL) +- freeaddrinfo(res->data); +- free(res); +- } ++ if (res->data != NULL) ++ freeaddrinfo(res->data); ++ free(res); + return err; + } + +--- kdelibs/kdeui/kdockwidget.cpp 2005/09/29 09:47:40 465272 ++++ kdelibs/kdeui/kdockwidget.cpp 2006/04/13 21:35:27 529609 +@@ -762,9 +762,11 @@ + void KDockWidget::setEnableDocking( int pos ) + { + eDocking = pos; +- if( header && header->inherits( "KDockWidgetHeader" ) ) +- ( ( KDockWidgetHeader* ) header )->showUndockButton( pos & DockDesktop ); +- updateHeader(); ++ if( header ) { ++ if (header->inherits( "KDockWidgetHeader" ) ) ++ ( ( KDockWidgetHeader* ) header )->showUndockButton( pos & DockDesktop ); ++ updateHeader(); ++ } + } + + void KDockWidget::updateHeader() +--- kdelibs/kdecore/netwm_def.h 2006/01/06 15:07:18 494899 ++++ kdelibs/kdecore/netwm_def.h 2006/04/11 12:48:50 528573 +@@ -606,6 +606,20 @@ + FromApplication, + FromTool + }; ++ ++ /** ++ Compares two X timestamps, taking into account wrapping and 64bit architectures. ++ Return value is like with strcmp(), 0 for equal, -1 for time1 < time2, 1 for time1 > time2. ++ @since 3.5.3 ++ */ ++ static int timestampCompare( unsigned long time1, unsigned long time2 ); ++ /** ++ Returns a difference of two X timestamps, time2 - time1, where time2 must be later than time1, ++ as returned by timestampCompare(). ++ @since 3.5.3 ++ */ ++ static int timestampDiff( unsigned long time1_, unsigned long time2_ ); ++ + }; + + +--- kdelibs/kdecore/kapplication.cpp 2006/03/15 13:08:02 518842 ++++ kdelibs/kdecore/kapplication.cpp 2006/04/11 12:48:50 528573 +@@ -960,14 +960,13 @@ + static int my_system (const char *command) { + int pid, status; + +- QApplication::flushX(); + pid = fork(); + if (pid == -1) + return -1; + if (pid == 0) { + const char* shell = "/bin/sh"; + execl(shell, shell, "-c", command, (void *)0); +- ::exit(127); ++ ::_exit(127); + } + do { + if (waitpid(pid, &status, 0) == -1) { +@@ -1684,7 +1683,7 @@ + && _event->xclient.data.l[ 3 ] != 0 ) + { + if( qt_x_user_time == 0 +- || ( _event->xclient.data.l[ 3 ] - qt_x_user_time ) < 100000U ) ++ || NET::timestampCompare( _event->xclient.data.l[ 3 ], qt_x_user_time ) > 0 ) + { // and the timestamp looks reasonable + qt_x_user_time = _event->xclient.data.l[ 3 ]; // update our qt_x_user_time from it + } +@@ -1692,7 +1691,7 @@ + else // normal DND, only needed until Qt updates qt_x_user_time from XdndDrop + { + if( qt_x_user_time == 0 +- || ( _event->xclient.data.l[ 2 ] - qt_x_user_time ) < 100000U ) ++ || NET::timestampCompare( _event->xclient.data.l[ 2 ], qt_x_user_time ) > 0 ) + { // the timestamp looks reasonable + qt_x_user_time = _event->xclient.data.l[ 2 ]; // update our qt_x_user_time from it + } +@@ -1812,7 +1811,7 @@ + XDestroyWindow( qt_xdisplay(), w ); + } + if( qt_x_user_time == 0 +- || time - qt_x_user_time < 1000000000U ) // check time > qt_x_user_time, handle wrapping ++ || NET::timestampCompare( time, qt_x_user_time ) > 0 ) // check time > qt_x_user_time + qt_x_user_time = time; + #endif + } +--- kdelibs/kdecore/kprocess.cpp 2006/01/29 09:42:40 503447 ++++ kdelibs/kdecore/kprocess.cpp 2006/03/30 22:04:03 524676 +@@ -355,8 +355,6 @@ + if (pipe(fd)) + fd[0] = fd[1] = -1; // Pipe failed.. continue + +- QApplication::flushX(); +- + // we don't use vfork() because + // - it has unclear semantics and is not standardized + // - we do way too much magic in the child +@@ -768,7 +766,7 @@ + d->shell = shell; + else + // #ifdef NON_FREE // ... as they ship non-POSIX /bin/sh +-#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__GNU__) ++#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__GNU__) && !defined(__DragonFly__) + // Solaris POSIX ... + if (!access( "/usr/xpg4/bin/sh", X_OK )) + d->shell = "/usr/xpg4/bin/sh"; +--- kdelibs/kdecore/kxerrorhandler.cpp 2005/07/26 18:54:59 438982 ++++ kdelibs/kdecore/kxerrorhandler.cpp 2006/04/11 13:28:02 528591 +@@ -28,6 +28,7 @@ + #include "kxerrorhandler.h" + #include <assert.h> + #include <stdlib.h> ++#include <netwm_def.h> + + KXErrorHandler** KXErrorHandler::handlers = NULL; + int KXErrorHandler::pos = 0; +@@ -101,13 +102,14 @@ + int KXErrorHandler::handle( Display* dpy, XErrorEvent* e ) + { + if( dpy == display +- && e->serial - first_request < 1000000000 ) // e->serial > first_request, with wrapping ++ // e->serial >= first_request , compare like X timestamps to handle wrapping ++ && NET::timestampCompare( e->serial, first_request ) >= 0 ) + { // it's for us + //qDebug( "Handling: %p", static_cast< void* >( this )); +- if( user_handler1 != NULL ) +- was_error |= user_handler1( e->request_code, e->error_code, e->resourceid ); +- else if( user_handler2 != NULL ) +- was_error |= ( user_handler2( dpy, e ) != 0 ); ++ if( user_handler1 != NULL && user_handler1( e->request_code, e->error_code, e->resourceid )) ++ was_error = true; ++ if( user_handler2 != NULL && user_handler2( dpy, e ) != 0 ) ++ was_error = true; + else // no handler set, simply set that there was an error + was_error = true; + return 0; +--- kdelibs/kdecore/netwm.cpp 2005/07/26 18:54:59 438982 ++++ kdelibs/kdecore/netwm.cpp 2006/04/11 12:48:50 528573 +@@ -4401,4 +4401,38 @@ + void NETWinInfo::virtual_hook( int, void* ) + { /*BASE::virtual_hook( id, data );*/ } + ++// Functions for X timestamp comparing. For Time being 32bit they're fairly simple ++// (the #if 0 part), but on 64bit architectures Time is 64bit unsigned long, ++// so there special care needs to be taken to always use only the lower 32bits. ++#if 0 ++int NET::timestampCompare( Time time1, Time time2 ) // like strcmp() ++ { ++ if( time1 == time2 ) ++ return 0; ++ return ( time1 - time2 ) < 0x7fffffffU ? 1 : -1; // time1 > time2 -> 1, handle wrapping ++ } ++ ++Time NET::timestampDiff( Time time1, Time time2 ) // returns time2 - time1 ++ { // no need to handle wrapping? ++ return time2 - time1; ++ } ++#else ++int NET::timestampCompare( unsigned long time1_, unsigned long time2_ ) // like strcmp() ++ { ++ Q_UINT32 time1 = time1_; ++ Q_UINT32 time2 = time2_; ++ if( time1 == time2 ) ++ return 0; ++ return Q_UINT32( time1 - time2 ) < 0x7fffffffU ? 1 : -1; // time1 > time2 -> 1, handle wrapping ++ } ++ ++int NET::timestampDiff( unsigned long time1_, unsigned long time2_ ) // returns time2 - time1 ++ { // no need to handle wrapping? ++ Q_UINT32 time1 = time1_; ++ Q_UINT32 time2 = time2_; ++ return Q_UINT32( time2 - time1 ); ++ } ++#endif ++ ++ + #endif +--- kdelibs/kdeprint/kpgeneralpage.cpp 2005/10/13 02:22:24 470046 ++++ kdelibs/kdeprint/kpgeneralpage.cpp 2006/04/19 09:45:52 531417 +@@ -523,7 +523,7 @@ + if (ch) setComboItem(m_papertype, ch->get("text")); + } + value = opts["InputSlot"]; +- if (m_inputslot->isEnabled() && !value.isEmpty()) ++ if (m_inputslot && m_inputslot->isEnabled() && !value.isEmpty()) + { + DrBase *ch = ((DrListOption*)driver()->findOption("InputSlot"))->findChoice(value); + if (ch) setComboItem(m_inputslot, ch->get("text")); diff --git a/kde-base/kdelibs/kdelibs-3.5.2-r4.ebuild b/kde-base/kdelibs/kdelibs-3.5.2-r4.ebuild new file mode 100644 index 000000000000..36cc4cd4acfd --- /dev/null +++ b/kde-base/kdelibs/kdelibs-3.5.2-r4.ebuild @@ -0,0 +1,147 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/kdelibs-3.5.2-r4.ebuild,v 1.1 2006/04/21 18:39:56 carlo Exp $ +inherit kde flag-o-matic eutils multilib +set-kdedir 3.5 + +DESCRIPTION="KDE libraries needed by all kde programs" +HOMEPAGE="http://www.kde.org/" +SRC_URI="mirror://kde/stable/${PV}/src/${P}.tar.bz2" +#SRC_URI="mirror://kde/stable/3.5/src/${P}.tar.bz2" + +LICENSE="GPL-2 LGPL-2" +SLOT="3.5" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="acl alsa arts cups doc jpeg2k kerberos openexr spell ssl tiff zeroconf" + +# kde.eclass has kdelibs in DEPEND, and we can't have that in here. +# so we recreate the entire DEPEND from scratch. +RDEPEND="$(qt_min_version 3.3.3) + arts? ( ~kde-base/arts-${PV} ) + app-arch/bzip2 + >=media-libs/freetype-2 + media-libs/fontconfig + >=dev-libs/libxslt-1.1.15 + >=dev-libs/libxml2-2.6.6 + >=dev-libs/libpcre-4.2 + media-libs/libart_lgpl + net-dns/libidn + virtual/utempter + acl? ( kernel_linux? ( sys-apps/acl ) ) + ssl? ( >=dev-libs/openssl-0.9.7d ) + alsa? ( media-libs/alsa-lib ) + cups? ( >=net-print/cups-1.1.19 ) + tiff? ( media-libs/tiff ) + kerberos? ( virtual/krb5 ) + jpeg2k? ( media-libs/jasper ) + openexr? ( >=media-libs/openexr-1.2 ) + spell? ( || ( app-text/aspell + app-text/ispell ) ) + zeroconf? ( net-misc/mDNSResponder ) + virtual/fam + virtual/ghostscript" + +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen ) + sys-devel/gettext + dev-util/pkgconfig" + +RDEPEND="${RDEPEND} + || ( x11-apps/rgb virtual/x11 )" + +PATCHES="${FILESDIR}/${PN}-3.5.0-bindnow.patch + ${FILESDIR}/${PN}-3.5.0-kicker-crash.patch + ${FILESDIR}/${P}-xorg7-rgbtxt.patch + ${FILESDIR}/kdelibs-3.5.2-kio-fixes.diff + ${FILESDIR}/kdelibs-3.5.2-kate-fixes-2.diff + ${FILESDIR}/kdelibs-3.5.2-misc-fixes-2.diff" + +src_compile() { + rm -f ${S}/configure + + # hspell is disabled because it requires version 0.9 of hspell that + # is not in portage yet; leaving it to autodetection tries to use it + # and then fails because of missing required functions + + myconf="--with-distribution=Gentoo + --enable-libfam $(use_enable kernel_linux dnotify) + --with-libart --with-libidn --with-utempter + $(use_with acl) $(use_with ssl) + $(use_with alsa) $(use_with arts) + $(use_with kerberos gssapi) $(use_with tiff) + $(use_with jpeg2k jasper) $(use_with openexr) + $(use_enable cups) $(use_enable zeroconf dnssd) + --without-hspell" + + if use spell && has_version app-text/aspell; then + myconf="${myconf} --with-aspell" + else + myconf="${myconf} --without-aspell" + fi + + if has_version x11-apps/rgb; then + myconf="${myconf} --with-rgbfile=/usr/share/X11/rgb.txt" + fi + + myconf="${myconf} --disable-fast-malloc" + + # fix bug 58179, bug 85593 + # kdelibs-3.4.0 needed -fno-gcse; 3.4.1 needs -mminimal-toc; this needs a + # closer look... - corsair + use ppc64 && append-flags "-mminimal-toc" + + # work around bug #120858, gcc 3.4.x -Os miscompilation + use x86 && replace-flags "-Os" "-O2" # see bug #120858 + + export BINDNOW_FLAGS="$(bindnow-flags)" + + 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 + + # Needed to create lib -> lib64 symlink for amd64 2005.0 profile + if [ "${SYMLINK_LIB}" = "yes" ]; then + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) ${KDEDIR}/lib + fi + + if ! use arts ; then + dodir /etc/env.d + + # List all the multilib libdirs + local libdirs + for libdir in $(get_all_libdirs); do + libdirs="${libdirs}:${PREFIX}/${libdir}" + done + + cat <<EOF > ${D}/etc/env.d/45kdepaths-${SLOT} # number goes down with version upgrade +PATH=${PREFIX}/bin +ROOTPATH=${PREFIX}/sbin:${PREFIX}/bin +LDPATH=${libdirs:1} +CONFIG_PROTECT="${PREFIX}/share/config ${PREFIX}/env ${PREFIX}/shutdown" +EOF + fi + +} + +pkg_postinst() { + if use zeroconf; then + echo + einfo "To make zeroconf support available in KDE" + einfo "make sure that the 'mdnsd' daemon is running." + einfo "Make sure also that multicast dns lookups are" + einfo "enabled by editing the 'hosts:' line in" + einfo "/etc/nsswitch.conf to include 'mdns', e.g.:" + einfo "hosts: files mdns dns" + echo + fi +} |