Added missing deps for dev-util/automoc and dev-util/pkgconfig. Thanks to Nikoli...
authorJorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>
Sun, 11 Jul 2010 01:54:44 +0000 (01:54 +0000)
committerJorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>
Sun, 11 Jul 2010 01:54:44 +0000 (01:54 +0000)
Added a patch to fix the missing tray icon in non-KDE environments. Thanks to Rex Dieter for the heads up in the amarok-packagers ml and Kevin Funk for the patch - fixes bug 325371.
Fixed the available linguas list. Thanks to MarisN <maris.gis@gmail.com> - fixes bug 326147.
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64

media-sound/amarok/ChangeLog
media-sound/amarok/Manifest
media-sound/amarok/amarok-2.3.1-r2.ebuild [new file with mode: 0644]
media-sound/amarok/files/amarok-2.3.1-fix-trayicon.patch [new file with mode: 0644]

index 8177e41046d0134923ce6af98351c6ddde0b03f3..72227800c1623ee36d012200f2d27d3f58ca2584 100644 (file)
@@ -1,6 +1,18 @@
 # ChangeLog for media-sound/amarok
 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/amarok/ChangeLog,v 1.381 2010/07/07 20:35:18 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/amarok/ChangeLog,v 1.382 2010/07/11 01:54:43 jmbsvicetto Exp $
+
+*amarok-2.3.1-r2 (11 Jul 2010)
+
+  11 Jul 2010; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>
+  +amarok-2.3.1-r2.ebuild, +files/amarok-2.3.1-fix-trayicon.patch:
+  Added missing deps for dev-util/automoc and dev-util/pkgconfig. Thanks to
+  Nikoli <nikoli@lavabit.com> - fixes bug 324883.
+  Added a patch to fix the missing tray icon in non-KDE environments. Thanks
+  to Rex Dieter for the heads up in the amarok-packagers ml and Kevin Funk
+  for the patch - fixes bug 325371.
+  Fixed the available linguas list. Thanks to MarisN <maris.gis@gmail.com> -
+  fixes bug 326147.
 
   07 Jul 2010; Samuli Suominen <ssuominen@gentoo.org>
   amarok-2.3.1-r1.ebuild:
index a0b6703be00fe557e80b7f65738ce4d9a3a66531..7f6b74d8aec5d1f926eb62ef30f967ce123633c7 100644 (file)
@@ -1,12 +1,14 @@
 AUX amarok-2.2-mysql-libs.patch 540 RMD160 16b143a50c126ba69851e4c1d1524b1d6b7c175d SHA1 0358c91184604bf4587cfa755202a41ba9c4d346 SHA256 ace02a3f8d20295077de08d17af00382c19ad21ddf4ef324ff7c5e5ec4d666e1
 AUX amarok-2.2.2-nodebug.patch 16478 RMD160 8f8eedbd5a29f10da6243cc4ac586f59ca493a7d SHA1 c2316800d0632b473b14d683415f51a36879922a SHA256 022a655eff5cd918fc61999001a3251de7e406cbffb40127295820eb4e398a29
 AUX amarok-2.3.0-crash_fix_info_applet.patch 1820 RMD160 2ddbd8e30d7c9031eead648430bc8c9e2e6ec0cd SHA1 5aa6fd5ae30c956ea4f4be3d5bb6078af9e88ea3 SHA256 2f48faa43ad621616289b30da5b2febcd2861bc500a73bf9112916d1eeb3b41c
+AUX amarok-2.3.1-fix-trayicon.patch 7914 RMD160 0df9c611db33d11a4567f9ad4b5b1f3f8e449862 SHA1 c0c6a670b4fec60546fec80bd049306bb9139433 SHA256 8c52be2670fc3d60006eb8638e8cbd7ea52e623efc9f1a642629d1c3762eea47
 AUX amarok-fix-accessibility-dep.patch 687 RMD160 184a28eecb351117c8ce3c922112e7ac5c4efde1 SHA1 e9ea735d7431fb3c11f5aabab0935c637826059c SHA256 8d631d10dccce5a72eb24a366afc5672d7853fba8a5c667e300549d8ee85170d
 AUX amarok-qtscriptcheck.patch 1024 RMD160 0693ddd6bbaa2f15d381eec329cfeff1e8b176cd SHA1 0585c08f8159a06c95e89f22e788d6e039224fbb SHA256 8a2983f3bd5ec422f2ed0a90a49970fd13fed3852c66ed220c01b4d8418ce89d
 DIST amarok-2.2.2.tar.bz2 8788107 RMD160 0782c4b032d318179bd8bb91353f8e33772d2912 SHA1 2075299b856477cf55cba8ba983ea25a93dc139b SHA256 768d308572897a3100f0d87999f1bb1c68b2e2fa3b0961fd0b918bcfd33ae64d
 DIST amarok-2.3.1.tar.bz2 9823411 RMD160 70e581bd681361d7837f1ed295191174e92e9f8f SHA1 00a596384df8d155b91b40bb2484ec0a7f51da80 SHA256 3fef3f4d4b4ffa22faf4a3b97e2c2bcfde85f55a9973b1ad6d66df55068b4a72
 EBUILD amarok-2.2.2-r1.ebuild 3129 RMD160 7f2f764b4542d2447b7e1109c757a45ea8f0f403 SHA1 24f628aaf70a20f4160fa135df7d07e4f83f724f SHA256 fda21a42223a92bf47f68e2b2824b332017c480c3164389b76b1f8c5106459d1
 EBUILD amarok-2.3.1-r1.ebuild 4128 RMD160 ed941d9b1cdce3e9f900c0d39b21823740c26872 SHA1 27af017934c245dac5d84ff3b00b6d8b22303d1e SHA256 c3434e3d19d7679b2b8cb608de331f79fc05c0118f01dc4708d44051c2e8d9af
+EBUILD amarok-2.3.1-r2.ebuild 4531 RMD160 cb56b2ad770859e2902edf0cbb685a8adea181ea SHA1 e4226a6feae889b74ea3a06fb33877a1362ab97e SHA256 d2b0fb91f63284462601431877cca240b2846cb9061d590027147cad630726c1
 EBUILD amarok-2.3.1.ebuild 3465 RMD160 7834bed748ffc58ae9573eaad9f779de67332598 SHA1 ce11a10148980406634e9b494c6eeb530c647f7e SHA256 86b44855a9c8ea722406a13ef861350d18ba8e19ff7c11b202e9a3db9557a632
-MISC ChangeLog 63653 RMD160 39b969c8cfd21d9f1ad9fd8b3b746979bb8ffe95 SHA1 4aaec4e2bd7c91952ec49d8e3e645cef08030b94 SHA256 8fe045591b5efb0fb11fd982e0c362aaa7e33adf25c17e2cdfa4108484e54c78
+MISC ChangeLog 64233 RMD160 b9c3b682e481d1ecef947a24a5757b6015417ec4 SHA1 dea61cf1741ea5fd07ebf3a6250302d6f6758318 SHA256 fd476fd45eacd61bdb4129cb6c4df41b6d5674061645eba463d90b7a2e74b0de
 MISC metadata.xml 1413 RMD160 62fc2ae4eae51f52f3ef02d86e8b244a3132ba86 SHA1 dda8b8bf344947925b93744cff693605f46c1006 SHA256 be46bcd7f470f66bb3afc8df3338aab204e055e10f042d4bae2be65eae7b3f8f
diff --git a/media-sound/amarok/amarok-2.3.1-r2.ebuild b/media-sound/amarok/amarok-2.3.1-r2.ebuild
new file mode 100644 (file)
index 0000000..5e81878
--- /dev/null
@@ -0,0 +1,155 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/amarok/amarok-2.3.1-r2.ebuild,v 1.1 2010/07/11 01:54:44 jmbsvicetto Exp $
+
+EAPI="2"
+
+# Translations are only in the tarballs, not the git repo
+if [[ ${PV} != *9999* ]]; then
+       KDE_LINGUAS="af bg ca ca@valencia cs da de el en_GB es et fr it ja lt lv nb nds pa pl
+       pt pt_BR ru sk sl sr sr@ijekavian sr@ijekavianlatin sr@latin sv th tr uk zh_CN zh_TW"
+       SRC_URI="mirror://kde/unstable/${PN}/${PV}/src/${P}.tar.bz2"
+else
+       EGIT_REPO_URI="git://git.kde.org/${PN}/${PN}.git"
+       GIT_ECLASS="git"
+fi
+
+KDE_REQUIRED="never"
+inherit flag-o-matic kde4-base ${GIT_ECLASS}
+
+DESCRIPTION="Advanced audio player based on KDE framework."
+HOMEPAGE="http://amarok.kde.org/"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+SLOT="4"
+IUSE="cdda daap debug embedded ipod lastfm mp3tunes mtp opengl +player semantic-desktop +utils"
+
+# Tests require gmock - http://code.google.com/p/gmock/
+# It's not in the tree yet
+RESTRICT="test"
+
+# ipod requires gdk enabled and also gtk compiled in libgpod
+COMMONDEPEND="
+       >=media-libs/taglib-1.6.1[asf,mp4]
+       >=media-libs/taglib-extras-1.0.1
+       player? (
+               app-crypt/qca:2
+               >=app-misc/strigi-0.5.7[dbus,qt4]
+               || ( >=dev-db/mysql-5.0.76 =virtual/mysql-5.1 )
+               >=kde-base/kdelibs-${KDE_MINIMAL}[opengl?,semantic-desktop?]
+               sys-libs/zlib
+               x11-libs/qt-script
+               >=x11-libs/qtscriptgenerator-0.1.0
+               cdda? (
+                       >=kde-base/libkcddb-${KDE_MINIMAL}
+                       >=kde-base/libkcompactdisc-${KDE_MINIMAL}
+                       >=kde-base/kdemultimedia-kioslaves-${KDE_MINIMAL}
+               )
+               embedded? ( <dev-db/mysql-5.1[embedded,-minimal] )
+               ipod? ( >=media-libs/libgpod-0.7.0[gtk] )
+               lastfm? ( >=media-libs/liblastfm-0.3.0 )
+               mp3tunes? (
+                       dev-libs/glib:2
+                       dev-libs/libxml2
+                       dev-libs/openssl
+                       net-libs/loudmouth
+                       net-misc/curl
+                       x11-libs/qt-core[glib]
+               )
+               mtp? ( >=media-libs/libmtp-0.3.0 )
+               opengl? ( virtual/opengl )
+       )
+       utils? (
+               x11-libs/qt-core
+               x11-libs/qt-dbus
+       )
+       !player? ( !utils? ( media-sound/amarok[player] ) )
+"
+DEPEND="${COMMONDEPEND}
+       dev-util/automoc
+       dev-util/pkgconfig
+"
+RDEPEND="${COMMONDEPEND}
+       !media-sound/amarok-utils
+       player? ( >=kde-base/phonon-kde-${KDE_MINIMAL} )
+"
+
+# The fix trayicon patch is amarok.git-26104cd35fd50222c354f3afc9fce6bba093c05f.patch
+# from https://bugs.kde.org/show_bug.cgi?id=232578#c13 and
+# http://gitweb.kde.org/amarok/amarok.git/commitdiff/26104cd35fd50222c354f3afc9fce6bba093c05f
+PATCHES=( "${FILESDIR}/${PN}-fix-accessibility-dep.patch" "${FILESDIR}/${P}-fix-trayicon.patch")
+
+src_prepare() {
+       if ! use player; then
+               # Disable po processing
+               sed -e "s:include(MacroOptionalAddSubdirectory)::" \
+                       -i "${S}/CMakeLists.txt" \
+                       || die "Removing include of MacroOptionalAddSubdirectory failed."
+               sed -e "s:macro_optional_add_subdirectory( po )::" \
+                       -i "${S}/CMakeLists.txt" \
+                       || die "Removing include of MacroOptionalAddSubdirectory failed."
+       fi
+
+       kde4-base_src_prepare
+}
+
+src_configure() {
+       # Append minimal-toc cflag for ppc64, see bug 280552 and 292707
+       use ppc64 && append-flags -mminimal-toc
+
+       if use player; then
+               mycmakeargs=(
+                       -DWITH_PLAYER=ON
+                       -DWITH_Libgcrypt=OFF
+                       $(cmake-utils_use embedded WITH_MYSQL_EMBEDDED)
+                       $(cmake-utils_use_with ipod)
+                       $(cmake-utils_use_with ipod Gdk)
+                       $(cmake-utils_use_with lastfm LibLastFm)
+                       $(cmake-utils_use_with mtp)
+                       $(cmake-utils_use_with mp3tunes MP3Tunes)
+               )
+       else
+               mycmakeargs=(
+                       -DWITH_PLAYER=OFF
+               )
+       fi
+
+       mycmakeargs+=(
+               $(cmake-utils_use_with utils UTILITIES)
+       )
+               # $(cmake-utils_use_with semantic-desktop Nepomuk)
+               # $(cmake-utils_use_with semantic-desktop Soprano)
+
+       kde4-base_src_configure
+}
+
+pkg_postinst() {
+       kde4-base_pkg_postinst
+
+       if use player; then
+
+               if use daap; then
+                       echo
+                       elog "You have installed amarok with daap support."
+                       elog "You may be interested in installing www-servers/mongrel as well."
+                       echo
+               fi
+
+               if ! use embedded; then
+                       echo
+                       elog "You've disabled the amarok support for embedded mysql DBs."
+                       elog "You'll have to configure amarok to use an external db server."
+                       echo
+                       elog "Please read http://amaroklive.com/wiki/MySQL_Server for details on how"
+                       elog "to configure the external db and migrate your data from the embedded database."
+                       echo
+
+                       if has_version "dev-db/mysql[minimal]"; then
+                               elog "You built mysql with the minimal use flag, so it doesn't include the server."
+                               elog "You won't be able to use the local mysql installation to store your amarok collection."
+                               echo
+                       fi
+               fi
+       fi
+}
diff --git a/media-sound/amarok/files/amarok-2.3.1-fix-trayicon.patch b/media-sound/amarok/files/amarok-2.3.1-fix-trayicon.patch
new file mode 100644 (file)
index 0000000..c971ef4
--- /dev/null
@@ -0,0 +1,260 @@
+From 26104cd35fd50222c354f3afc9fce6bba093c05f Mon Sep 17 00:00:00 2001
+From: Kevin Funk <krf@electrostorm.net>
+Date: Thu, 8 Jul 2010 12:13:00 +0200
+Subject: [PATCH] Some TrayIcon changes:
+ * Remove track progress effect (this is because KSNI has some bogus
+ implementation of the setIconByPixmap() function causing the overlay
+ icon being wrong sized
+ * Fix overlay icon size
+ * Tooltip album cover is now updated if changed in Amarok
+ * Cleanup
+ CCBUG: 231539
+ CCBUG: 232578
+ CCBUG: 232312
+ BUG: 233506
+ BUG: 240463
+
+---
+ src/TrayIcon.cpp |  106 ++++++++++++------------------------------------------
+ src/TrayIcon.h   |   11 +-----
+ 2 files changed, 25 insertions(+), 92 deletions(-)
+
+diff --git a/src/TrayIcon.cpp b/src/TrayIcon.cpp
+index fb97483..4bd46e4 100644
+--- a/src/TrayIcon.cpp
++++ b/src/TrayIcon.cpp
+@@ -52,7 +52,6 @@
+ Amarok::TrayIcon::TrayIcon( QObject *parent )
+         : KStatusNotifierItem( parent )
+         , Engine::EngineObserver( The::engineController() )
+-        , m_trackLength( 0 )
+         , m_separator( 0 )
+ {
+     DEBUG_BLOCK
+@@ -80,7 +79,7 @@ Amarok::TrayIcon::TrayIcon( QObject *parent )
+ 
+     PERF_LOG( "Adding system tray icon" );
++    setIconByName( "amarok" );
+-    paintIcon();
+ 
+     setupToolTip();
+ 
+     connect( this, SIGNAL( scrollRequested( int, Qt::Orientation ) ), SLOT( slotScrollRequested(int, Qt::Orientation) ) );
+@@ -102,22 +95,13 @@ Amarok::TrayIcon::setupToolTip()
+         setToolTipTitle( The::engineController()->prettyNowPlaying() );
+ 
+         QStringList tooltip;
+-        // TODO: Use Observer to get notified about changed album art
+-        if( m_track->album() )
++        if( m_track->album() && m_track->album()->hasImage() )
+         {
+             const QString uid = m_track->uidUrl();
+             if ( uid != m_toolTipIconUid ) {
+                 const QPixmap image = The::svgHandler()->imageWithBorder( m_track->album(), KIconLoader::SizeLarge, 5 );
+-                if ( image.isNull() )
+-                {
+-                    setToolTipIconByName( "amarok" );
+-                    m_toolTipIconUid.clear();
+-                }
+-                else
+-                {
+-                    setToolTipIconByPixmap( image );
+-                    m_toolTipIconUid = uid;
+-                }
++                setToolTipIconByPixmap( image );
++                m_toolTipIconUid = uid;
+             }
+         }
+         else
+@@ -184,9 +168,10 @@ Amarok::TrayIcon::setupToolTip()
+     else
+     {
+         setToolTipIconByName( "amarok" );
+-        m_toolTipIconUid.clear();
+         setToolTipTitle( KCmdLineArgs::aboutData()->programName() );
+         setToolTipSubTitle( The::engineController()->prettyNowPlaying() );
++
++        m_toolTipIconUid.clear();
+     }
+ }
+ 
+@@ -206,20 +191,26 @@ Amarok::TrayIcon::engineStateChanged( Phonon::State state, Phonon::State /*oldSt
+     switch( state )
+     {
+         case Phonon::PlayingState:
+-            unsubscribeFrom( m_track );
++            if ( m_track )
++            {
++                unsubscribeFrom( m_track );
++                unsubscribeFrom( m_track->album() );
++            }
+             m_track = track;
+-            m_trackLength = m_track ? m_track->length() : 0;
+-            subscribeTo( track );
++            if ( track )
++            {
++                subscribeTo( track );
++                subscribeTo( track->album() );
++            }
+ 
+-            paintIcon( 0 );
++            setOverlayIconByName( "media-playback-start" );
+             setupMenu();
+             break;
+ 
+         case Phonon::StoppedState:
+             m_track = 0;
+-            m_trackLength = 0;
+ 
+-            paintIcon();
++            setOverlayIconByName( QString() );
+             setupMenu(); // remove custom track actions on stop
+             break;
+ 
+@@ -230,6 +221,7 @@ Amarok::TrayIcon::engineStateChanged( Phonon::State state, Phonon::State /*oldSt
+         case Phonon::LoadingState:
+         case Phonon::ErrorState:
+         case Phonon::BufferingState:
++            setOverlayIconByName( QString() );
+             break;
+     }
+ 
+@@ -240,9 +232,6 @@ void
+ Amarok::TrayIcon::engineNewTrackPlaying()
+ {
+     m_track = The::engineController()->currentTrack();
+-    m_trackLength = m_track ? m_track->length() : 0;
+-
+-    paintIcon( 0 );
+ 
+     setupToolTip();
+     setupMenu();
+@@ -258,12 +247,12 @@ Amarok::TrayIcon::metadataChanged( Meta::TrackPtr track )
+ }
+ 
+ void
+-Amarok::TrayIcon::engineTrackPositionChanged( qint64 position, bool userSeek )
++Amarok::TrayIcon::metadataChanged( Meta::AlbumPtr album )
+ {
+-    Q_UNUSED( userSeek );
++    Q_UNUSED( album )
+ 
+-    if( m_trackLength )
+-        paintIcon( position );
++    setupToolTip();
++    setupMenu();
+ }
+ 
+ void
+@@ -283,71 +272,6 @@ Amarok::TrayIcon::engineMuteStateChanged( bool mute )
+ }
+ 
+ void
+-Amarok::TrayIcon::paletteChange( const QPalette & op )
+-{
+-    Q_UNUSED( op );
+-
+-    paintIcon();
+-}
+-
+-void
+-Amarok::TrayIcon::paintIcon( qint64 trackPosition )
+-{
+-    static qint64 oldMergePos = -1;
+-
+-    // start up
+-    // TODO: Move these two blocks to ctor (warning: might get some regressions)
+-    if( m_baseIcon.isNull() )
+-    {
+-        m_baseIcon = KIconLoader::global()->loadIcon( "amarok", KIconLoader::Panel );
+-        setIconByPixmap( m_baseIcon ); // show icon
+-        setOverlayIconByName( QString() );
+-        return; // HACK: return because m_baseIcon is still null after first startup (why?)
+-    }
+-
+-    if( m_grayedIcon.isNull() )
+-    {
+-        m_grayedIcon = m_baseIcon; // copies object
+-        KIconEffect::semiTransparent( m_grayedIcon );
+-    }
+-
+-    // trackPosition < 0 means reset
+-    if( trackPosition < 0 )
+-    {
+-        oldMergePos = -1;
+-        setIconByPixmap( m_baseIcon );
+-        setOverlayIconByName( QString() );
+-        return;
+-    }
+-
+-    // check if we are playing a stream
+-    if( !m_trackLength )
+-    {
+-        m_icon = m_baseIcon;
+-        setIconByPixmap( m_icon );
+-        setOverlayIconByName( "media-playback-start" );
+-        return;
+-    }
+-
+-    const qint64 mergePos = ( float( trackPosition ) / m_trackLength ) * m_icon.height();
+-
+-    // return if pixmap would stay the same
+-    if( oldMergePos == mergePos )
+-        return;
+-
+-    // draw m_baseIcon on top of the gray version
+-    m_icon = m_grayedIcon; // copies object
+-    QPainter p( &m_icon );
+-    p.drawPixmap( 0, 0, m_baseIcon, 0, 0, 0, m_icon.height() - mergePos );
+-    p.end();
+-
+-    oldMergePos = mergePos;
+-
+-    setIconByPixmap( m_icon );
+-    setOverlayIconByName( "media-playback-start" );
+-}
+-
+-void
+ Amarok::TrayIcon::setupMenu()
+ {
+     foreach( QAction* action, m_extraActions )
+diff --git a/src/TrayIcon.h b/src/TrayIcon.h
+index c2602df..d590b5f 100644
+--- a/src/TrayIcon.h
++++ b/src/TrayIcon.h
+@@ -49,16 +49,13 @@ protected:
+     // reimplemented from engineobserver
+     virtual void engineStateChanged( Phonon::State state, Phonon::State oldState = Phonon::StoppedState );
+     virtual void engineNewTrackPlaying();
+-    virtual void engineTrackPositionChanged( qint64 position, bool /*userSeek*/ );
+     virtual void engineVolumeChanged( int percent );
+     virtual void engineMuteStateChanged( bool mute );
+ 
+-    //Reimplemented from Meta::Observer
++    // reimplemented from Meta::Observer
+     using Observer::metadataChanged;
+     virtual void metadataChanged( Meta::TrackPtr track );
+-
+-    // get notified of 'highlight' color change
+-    virtual void paletteChange( const QPalette & oldPalette );
++    virtual void metadataChanged( Meta::AlbumPtr album );
+ 
+ private slots:
+     void slotActivated();
+@@ -68,13 +65,9 @@ private:
+     void setupMenu();
+     void setupToolTip();
+ 
+-    void paintIcon( qint64 trackPosition = -1 );
+-
+     Meta::TrackPtr m_track;
+-    qint64 m_trackLength;
+     QString m_toolTipIconUid;
+ 
+-    QPixmap m_baseIcon, m_grayedIcon, m_icon;
+     SmartPointerList<QAction> m_extraActions;
+     QPointer<QAction> m_separator;
+ };
+-- 
+1.7.1
+