Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=kdetesting.git;a=commitdiff;h=19c8c4c9bcdb67ee7428ef81e97d26d9161dd100
commit 19c8c4c9bcdb67ee7428ef81e97d26d9161dd100 Author: crazy <[email protected]> Date: Wed Jan 20 18:49:52 2010 +0100 kdebase-workspace-4.3.4-9-x86_64 * relbump * next round of patches :) * new subpackage diff --git a/source/kde/kdebase-workspace/07-kspalsh-fix.patch b/source/kde/kdebase-workspace/07-kspalsh-fix.patch new file mode 100644 index 0000000..cc5d19c --- /dev/null +++ b/source/kde/kdebase-workspace/07-kspalsh-fix.patch @@ -0,0 +1,174 @@ +=== modified file 'ksplash/ksplashx/pixmap.h' +--- kdebase-workspace-4.2.0/ksplash/ksplashx/pixmap.h 2009-02-21 06:24:44 +0000 ++++ kdebase-workspace-4.2.0/ksplash/ksplashx/pixmap.h 2009-02-21 07:18:37 +0000 +@@ -48,7 +48,7 @@ + + #include "x11_defs.h" + +-class QImage; ++#include "qimage.h" + + enum Optimization { DefaultOptim, NoOptim, MemoryOptim=NoOptim, + NormalOptim, BestOptim }; +@@ -62,6 +62,7 @@ + int d; + Optimization optim; + XImage* ximage; ++ QImage orig; + }; + + class PP : public Qt // inherit from Qt to reduce needed code changes in the function + +=== modified file 'ksplash/ksplashx/splash.cpp' +--- kdebase-workspace-4.2.0/ksplash/ksplashx/splash.cpp 2009-02-21 06:24:44 +0000 ++++ kdebase-workspace-4.2.0/ksplash/ksplashx/splash.cpp 2009-02-21 17:06:27 +0000 +@@ -458,7 +458,7 @@ + return img; + } + +-static PixmapData* imageAnimToPixmaps( const QImage& img, int frames ) ++static PixmapData* imageAnimToPixmaps( const QImage& img, const QImage& orig, int frames ) + { + if( img.isNull()) + return NULL; +@@ -478,6 +478,9 @@ + ret[ frame ].w = framew; + ret[ frame ].h = frameh; + ret[ frame ].d = x11Depth(); ++ ret[ frame ].orig = orig.copy( ++ ( frame % ANIM_IMAGES_ROW ) * framew, ( frame / ANIM_IMAGES_ROW ) * frameh, framew, frameh); ++ + } + if( pix.hd != None ) + XFreePixmap( qt_xdisplay(), pix.hd ); +@@ -508,10 +511,40 @@ + if( anim != NULL + && area.intersects( QRect( anim->x, anim->y, frame->w, frame->h ))) + { +- XCopyArea( qt_xdisplay(), frame->hd, pixmap, gc, +- qMax( 0, area.x() - anim->x ), qMax( 0, area.y() - anim->y ), +- area.x() - anim->x + area.width(), area.y() - anim->y + area.height(), +- qMax( 0, anim->x - area.x()), qMax( 0, anim->y - area.y())); ++ QRect rect = area.intersect(QRect( anim->x, anim->y, frame->w, frame->h)); ++ ++ const int w = rect.width(); ++ const int h = rect.height(); ++ ++ const int h_off = frame->w - w; ++ const int v_off = rect.top() - anim->y; ++ ++ rect.moveBy(-area.x(), -area.y()); ++ XImage* img = XGetImage(qt_xdisplay(), pixmap, rect.x(), rect.y(), w, h, AllPlanes, ZPixmap); ++ ++ QRgb* bg = (QRgb*)(img->data); ++ QRgb* fg = (QRgb*)frame->orig.bits(); ++ fg += v_off * frame->w; ++ for (int y=0 ; y<h ; ++y) ++ { ++ if (anim->x < area.x()) ++ { ++ fg += h_off; ++ } ++ ++ for (int x=0; x<w ; ++x, ++fg, ++bg) ++ { ++ *bg = blend(*fg, *bg); ++ } ++ ++ if (anim->x > area.x()) ++ { ++ fg += h_off; ++ } ++ } ++ ++ XPutImage(qt_xdisplay(), pixmap, gc, img, 0, 0, rect.left(), rect.top(), w, h); ++ XDestroyImage(img); + } + } + XCopyArea( qt_xdisplay(), pixmap, window, gc, 0, 0, area.width(), area.height(), area.x(), area.y()); +@@ -561,7 +594,7 @@ + fprintf( stderr, "No window contents\n" ); + exit( 3 ); + } +- time_t test_time = time( NULL ) + 2; ++ time_t test_time = time( NULL ) + 1; + #ifdef DEBUG + fprintf( stderr,"AWATING STATE: %d (%s)\n", expected_state, states[ expected_state ] ); + #endif +@@ -624,7 +657,7 @@ + if( test && time( NULL ) >= test_time ) + { + ++state; +- test_time = time( NULL ) + 2; ++ test_time = time( NULL ) + 1; + } + if( expected_state <= state ) + return false; +@@ -723,15 +756,6 @@ + return makeAbsolute( screen_ref[ 1 ], y_rel, image_ref[ 1 ], height, geometry.height()); + } + +-static inline QRgb blend( QRgb c, QRgb background ) +- { +- if( qAlpha( c ) == 255 ) +- return c; +- return qRgb( ( qRed( background ) * ( 255 - qAlpha( c ) ) + qRed( c ) * qAlpha( c ) ) / 255, +- ( qGreen( background ) * ( 255 - qAlpha( c ) ) + qGreen( c ) * qAlpha( c ) ) / 255, +- ( qBlue( background ) * ( 255 - qAlpha( c ) ) + qBlue( c ) * qAlpha( c ) ) / 255 ); +- } +- + static void blend( QImage& img, int x_pos, int y_pos, int x_img, int y_img, int w_img, int h_img ) + { + if( !img.hasAlphaBuffer()) +@@ -1115,10 +1139,11 @@ + if( splash_image.isNull()) + createSplashImage(); + QImage imgs = loadAnimImage( buf, frames ); ++ QImage origs = imgs.copy(); + if( !imgs.isNull()) + { + blendAnim( imgs, x, y, frames ); +- PixmapData* pixs = imageAnimToPixmaps( imgs, frames ); ++ PixmapData* pixs = imageAnimToPixmaps( imgs, origs, frames ); + delete animations[ number ]; + animations[ number ] = new AnimData( x, y, pixs, frames, delay, repeat ); + } +@@ -1154,6 +1179,7 @@ + if( splash_image.isNull()) + createSplashImage(); + QImage imgs = loadAnimImage( buf, frames ); ++ QImage origs = imgs.copy(); + if( !imgs.isNull()) + { + int framew, frameh; +@@ -1161,7 +1187,7 @@ + x = makeAbsoluteX( window_ref, x_rel, image_ref, framew ); + y = makeAbsoluteY( window_ref, y_rel, image_ref, frameh ); + blendAnim( imgs, x, y, frames ); +- PixmapData* pixs = imageAnimToPixmaps( imgs, frames ); ++ PixmapData* pixs = imageAnimToPixmaps( imgs, origs, frames ); + delete animations[ number ]; + animations[ number ] = new AnimData( x, y, pixs, frames, delay, repeat ); + } + +=== modified file 'ksplash/ksplashx/splash.h' +--- kdebase-workspace-4.2.0/ksplash/ksplashx/splash.h 2009-02-21 06:24:44 +0000 ++++ kdebase-workspace-4.2.0/ksplash/ksplashx/splash.h 2009-02-21 07:19:08 +0000 +@@ -22,6 +22,16 @@ + #define _SPLASH_H + + #include <stdio.h> ++#include "qcolor.h" ++ ++static inline QRgb blend(const QRgb& c, const QRgb& background ) ++{ ++ if( qAlpha( c ) == 255 ) ++ return c; ++ return qRgb( ( qRed( background ) * ( 255 - qAlpha( c ) ) + qRed( c ) * qAlpha( c ) ) / 255, ++ ( qGreen( background ) * ( 255 - qAlpha( c ) ) + qGreen( c ) * qAlpha( c ) ) / 255, ++ ( qBlue( background ) * ( 255 - qAlpha( c ) ) + qBlue( c ) * qAlpha( c ) ) / 255 ); ++} + + void runSplash( const char* theme, bool test, int pipe ); + + diff --git a/source/kde/kdebase-workspace/08-kwin-compositing-r300_r600.patch b/source/kde/kdebase-workspace/08-kwin-compositing-r300_r600.patch new file mode 100644 index 0000000..f527bea --- /dev/null +++ b/source/kde/kdebase-workspace/08-kwin-compositing-r300_r600.patch @@ -0,0 +1,87 @@ +diff -Naur kdebase-workspace-4.3.4/kwin/compositingprefs.cpp kdebase-workspace-4.3.4-p/kwin/compositingprefs.cpp +--- kdebase-workspace-4.3.4/kwin/compositingprefs.cpp 2009-06-17 22:07:38.000000000 +0200 ++++ kdebase-workspace-4.3.4-p/kwin/compositingprefs.cpp 2010-01-20 16:51:33.000000000 +0100 +@@ -270,6 +270,9 @@ + { + mDriver = "radeon"; + mVersion = Version( mGLRenderer.split(" ")[ 3 ] ); ++ // Check that the version string is changed, and try the fifth element if it does ++ if (!mVersion.startsWith("20")) ++ mVersion = Version( mGLRenderer.split(' ')[ 5 ] ); + } + else if( mGLRenderer == "Software Rasterizer" ) + { +@@ -286,6 +289,32 @@ + #endif + } + ++void CompositingPrefs::parseMesaVersion( const QString &version, int *major, int *minor ) ++ { ++ *major = 0; ++ *minor = 0; ++ ++ const QStringList tokens = version.split( ' ' ); ++ int token = 0; ++ while( token < tokens.count() && !tokens.at( token ).endsWith( "Mesa" ) ) ++ token++; ++ ++ if( token < tokens.count() - 1 ) ++ { ++ const QStringList version = tokens.at( token + 1 ).split( '.' ); ++ if( version.count() >= 2 ) ++ { ++ *major = version[ 0 ].toInt(); ++ ++ int end = 0; ++ while( end < version[ 1 ].length() && version[ 1 ][ end ].isDigit() ) ++ end++; ++ ++ *minor = version[ 1 ].left( end ).toInt(); ++ } ++ } ++ } ++ + // See http://techbase.kde.org/Projects/KWin/HW for a list of some cards that are known to work. + void CompositingPrefs::applyDriverSpecificOptions() + { +@@ -324,12 +353,28 @@ + } + } + else if( mDriver == "radeon" ) +- { // radeon r200 only ? ++ { + if( mGLRenderer.startsWith( "Mesa DRI R200" ) && mVersion >= Version( "20060602" )) + { + kDebug( 1212 ) << "radeon r200 >= 20060602, enabling compositing"; + mEnableCompositing = true; + } ++ if( mGLRenderer.startsWith( "Mesa DRI R300" ) && mVersion >= Version( "20090101" )) // krazy:exclude=strings ++ { ++ kDebug( 1212 ) << "radeon r300 >= 20090101, enabling compositing"; ++ mEnableCompositing = true; ++ } ++ if( mGLRenderer.startsWith( "Mesa DRI R600" ) ) ++ { ++ // Enable compositing with Mesa 7.7 or later ++ int major, minor; ++ parseMesaVersion( mGLVersion, &major, &minor ); ++ if( major > 7 || ( major == 7 && minor >= 7 ) ) ++ { ++ kDebug( 1212 ) << "Radeon R600/R700, Mesa 7.7 or better. Enabling compositing."; ++ mEnableCompositing = true; ++ } ++ } + } + else if( mDriver == "fglrx" ) + { // radeon r200 only ? +diff -Naur kdebase-workspace-4.3.4/kwin/compositingprefs.h kdebase-workspace-4.3.4-p/kwin/compositingprefs.h +--- kdebase-workspace-4.3.4/kwin/compositingprefs.h 2008-10-17 13:00:26.000000000 +0200 ++++ kdebase-workspace-4.3.4-p/kwin/compositingprefs.h 2010-01-20 16:51:33.000000000 +0100 +@@ -69,6 +69,7 @@ + protected: + + void detectDriverAndVersion(); ++ void parseMesaVersion( const QString &version, int *major, int *minor ); + void applyDriverSpecificOptions(); + static bool detectXgl(); + diff --git a/source/kde/kdebase-workspace/FrugalBuild b/source/kde/kdebase-workspace/FrugalBuild index 1dad7cb..11e9a90 100644 --- a/source/kde/kdebase-workspace/FrugalBuild +++ b/source/kde/kdebase-workspace/FrugalBuild @@ -2,7 +2,7 @@ # Maintainer: DeX77 <[email protected]> pkgname=kdebase-workspace -pkgrel=8 +pkgrel=9 pkgdesc="Programs specific for the KDE4 desktop." groups=('kde') archs=('i686' 'x86_64') @@ -14,7 +14,7 @@ rodepends=('kde-frugalware>=1.2') depends=('consolekit' 'libusb' 'libxcomposite' 'libxdamage' \ 'libxklavier>=4.0' 'libxxf86misc' 'lmsensors' 'libxtst' \ "kdebase-runtime>=$_F_kde_ver" "kdepimlibs>=$_F_kde_ver" \ - 'polkit-qt' 'qimageblitz' 'xdg-utils' 'dbus-x11' 'libxscrnsaver') + 'polkit-qt' 'qimageblitz' 'xdg-utils' 'dbus-x11' 'libxscrnsaver' "kdelibs>=${_F_kde_ver}-2") makedepends=("${makedepen...@]}" 'boost' 'bluez-libs' 'sip>=4.10' 'pyqt4>=4.7' \ "kdebindings>=$_F_kde_ver" 'xrdb') ## xrdb needed by font part .. from code in fonts.cpp ->: @@ -25,7 +25,9 @@ source=("${sour...@]}" \ 03-default-fonts.patch \ 04-systemsettings-root.patch \ 05-Suse-kdm-make_it_cool.diff \ - 06-clock.patch) + 06-clock.patch \ + 07-kspalsh-fix.patch \ + 08-kwin-compositing-r300_r600.patch) replaces=('ksensors' 'katapult' 'tastymenu' 'kbfx' 'kdesktop-menu' \ 'kicker-compiz' 'taskbar-compiz' 'mtaskbar' 'ksmoothdock' 'kompose') sha1sums=('5b43447139d22247d5bc2deee8e3a944447f0bbf' \ @@ -34,14 +36,16 @@ sha1sums=('5b43447139d22247d5bc2deee8e3a944447f0bbf' \ '03a6acd95841885d684fc05f53566a0e36dd600a' \ 'da461b91ab3ffaa5d29e2c88448ed61ed280b652' \ '5b16b82ff8f0084d15db9adf98c423906ff816e9' \ - '280a676b39bd2d0b10e2cdafe11c97a674f37f2b') + '280a676b39bd2d0b10e2cdafe11c97a674f37f2b' \ + 'be19f30fcffd85e899d7557c4b483d5c16f15b7e' \ + '5dd8a5b5b412d3fe6b388570333d9e27119ea646') -subpkgs=("$pkgname-docs" "$pkgname-wallpapers") -subdescs=("Kdebase Workspace Documentation" "Kdebase Workspace Wallpapers") -subdepends=('' '') -subgroups=('docs-extra kde-docs' 'kde-extra') -subarchs=('i686 x86_64' 'i686 x86_64') +subpkgs=("$pkgname-docs" "$pkgname-wallpapers" "$pkgname-extra-cursors") +subdescs=("Kdebase Workspace Documentation" "Kdebase Workspace Wallpapers" "Kdebase Workspace Big Cursors") +subdepends=('' '' '') +subgroups=('docs-extra kde-docs' 'kde-extra' 'kde-extra') +subarchs=('i686 x86_64' 'i686 x86_64' 'i686 x86_64') build() @@ -59,13 +63,17 @@ build() Fsplit $pkgname-wallpapers $i done - ## kdmrc should be in kde-fw package ( need to finish some kde-fw package first ) + ## kdmrc is in kde-fw package Fmv /etc/kde/config/kdm/kdmrc /etc/kde/config/kdm/kdmrc-kde4-$pkgver.orig ## cursors location is broken so is the icon location broke ## in oxygen-icons package ;) Fmkdir usr/share/icons Fmv /usr/share/kde/icons/Oxygen_* /usr/share/icons/ + Fsplit $pkgname-extra-cursors usr/share/icons/Oxygen_*_Big + + ## default ksplash ... + Fmv /usr/share/apps/ksplash/Themes/Default /usr/share/apps/ksplash/Themes/Default.kde4 } # optimization OK _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
