public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2011-02-27 20:45 Andreas K. Huettel
  0 siblings, 0 replies; 38+ messages in thread
From: Andreas K. Huettel @ 2011-02-27 20:45 UTC (permalink / raw
  To: gentoo-commits

commit:     2ab0b518fba47b1ea0c4334fde2b8c85d36e09a0
Author:     Andreas K. Huettel (dilfridge) <mail <AT> akhuettel <DOT> de>
AuthorDate: Sun Feb 27 20:46:06 2011 +0000
Commit:     Andreas K. Huettel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Feb 27 20:46:06 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=2ab0b518

[kde-base/kdelibs] Include no accessibility fix, bug 355969

(Portage version: 2.1.9.41/git/Linux x86_64, signed Manifest commit with key B6C5F7DE)

---
 kde-base/kdelibs/files/kdelibs-4.6.0-kateacc.patch |   49 ++++++++++++++++++++
 kde-base/kdelibs/kdelibs-4.6.1.ebuild              |    1 +
 kde-base/kdelibs/kdelibs-4.6.9999.ebuild           |    1 +
 kde-base/kdelibs/kdelibs-9999.ebuild               |    1 +
 4 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.6.0-kateacc.patch b/kde-base/kdelibs/files/kdelibs-4.6.0-kateacc.patch
new file mode 100644
index 0000000..80bcfc5
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.6.0-kateacc.patch
@@ -0,0 +1,49 @@
+diff -ur kdelibs-4.5.96.orig/kate/view/kateviewaccessible.h kdelibs-4.5.95/kate/view/kateviewaccessible.h
+--- kdelibs-4.5.96.orig/kate/view/kateviewaccessible.h	2010-11-11 17:41:28.000000000 +0300
++++ kdelibs-4.5.95/kate/view/kateviewaccessible.h	2011-01-11 11:37:15.288810505 +0300
+@@ -19,6 +19,7 @@
+ 
+ #ifndef _KATE_VIEW_ACCESSIBLE_
+ #define _KATE_VIEW_ACCESSIBLE_
++#ifndef QT_NO_ACCESSIBILITY
+ 
+ #include "kateviewinternal.h"
+ #include "katetextcursor.h"
+@@ -318,3 +319,4 @@
+ }
+ 
+ #endif
++#endif
+diff -ur kdelibs-4.5.96.orig/kate/view/kateviewinternal.cpp kdelibs-4.5.95/kate/view/kateviewinternal.cpp
+--- kdelibs-4.5.96.orig/kate/view/kateviewinternal.cpp	2010-12-03 17:57:05.000000000 +0300
++++ kdelibs-4.5.95/kate/view/kateviewinternal.cpp	2011-01-11 11:36:51.968811481 +0300
+@@ -216,7 +216,9 @@
+   connect( m_view, SIGNAL( selectionChanged(KTextEditor::View*) ),
+              this, SLOT( viewSelectionChanged() ) );
+ 
++#ifndef QT_NO_ACCESSIBILITY
+   QAccessible::installFactory(accessibleInterfaceFactory);
++#endif
+ 
+   // update is called in KateView, after construction and layout is over
+   // but before any other kateviewinternal call
+@@ -224,7 +226,9 @@
+ 
+ KateViewInternal::~KateViewInternal ()
+ {
++#ifndef QT_NO_ACCESSIBILITY
+   QAccessible::removeFactory(accessibleInterfaceFactory);
++#endif
+ 
+   // kill preedit ranges
+   delete m_imPreeditRange;
+@@ -646,7 +650,9 @@
+ 
+   m_madeVisible = !force;
+ 
++#ifndef QT_NO_ACCESSIBILITY
+   QAccessible::updateAccessibility( this, KateCursorAccessible::ChildId, QAccessible::Focus );
++#endif
+ }
+ 
+ void KateViewInternal::slotRegionVisibilityChangedAt(unsigned int,bool clear_cache)

diff --git a/kde-base/kdelibs/kdelibs-4.6.1.ebuild b/kde-base/kdelibs/kdelibs-4.6.1.ebuild
index 084927c..dde724f 100644
--- a/kde-base/kdelibs/kdelibs-4.6.1.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.6.1.ebuild
@@ -134,6 +134,7 @@ PATCHES=(
 #	"${FILESDIR}/${PN}-4.5.74-klauncher_mac.patch" - FIXME read above
 	"${FILESDIR}/${PN}-4.5.90-mimetypes.patch"
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
+	"${FILESDIR}/${PN}-4.6.0-kateacc.patch"
 )
 
 src_prepare() {

diff --git a/kde-base/kdelibs/kdelibs-4.6.9999.ebuild b/kde-base/kdelibs/kdelibs-4.6.9999.ebuild
index 128ac16..0efaedf 100644
--- a/kde-base/kdelibs/kdelibs-4.6.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.6.9999.ebuild
@@ -134,6 +134,7 @@ PATCHES=(
 #	"${FILESDIR}/${PN}-4.5.74-klauncher_mac.patch" - FIXME read above
 	"${FILESDIR}/${PN}-4.5.90-mimetypes.patch"
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
+	"${FILESDIR}/${PN}-4.6.0-kateacc.patch"
 )
 
 src_prepare() {

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index 128ac16..0efaedf 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -134,6 +134,7 @@ PATCHES=(
 #	"${FILESDIR}/${PN}-4.5.74-klauncher_mac.patch" - FIXME read above
 	"${FILESDIR}/${PN}-4.5.90-mimetypes.patch"
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
+	"${FILESDIR}/${PN}-4.6.0-kateacc.patch"
 )
 
 src_prepare() {



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2011-04-03 17:06 Andreas K. Huettel
  0 siblings, 0 replies; 38+ messages in thread
From: Andreas K. Huettel @ 2011-04-03 17:06 UTC (permalink / raw
  To: gentoo-commits

commit:     770600b673ace427b6e17072439149b1764ef7f0
Author:     Andreas K. Huettel (dilfridge) <mail <AT> akhuettel <DOT> de>
AuthorDate: Sun Apr  3 17:09:57 2011 +0000
Commit:     Andreas K. Huettel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Apr  3 17:09:57 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=770600b6

[kde-base/kdelibs] Add upstream patch: KFileMetaDataProvider: Don't crash if a Strigi analyzer crashes

Some Strigi analyzers are still unstable and crash under certain circumstances.
This patch moves the reading of the meta-data into a custom process instead of
doing it in a thread, which assures that a crashing Strigi analyzer does not
result in crashing Dolphin or Konqueror when hovering some items.

(Portage version: 2.1.9.45/git/Linux x86_64, signed Manifest commit with key B6C5F7DE)

---
 .../kdelibs/files/kdelibs-4.6.2-safestrigi.patch   |  780 ++++++++++++++++++++
 kde-base/kdelibs/kdelibs-4.6.2.ebuild              |    1 +
 kde-base/kdelibs/kdelibs-4.6.9999.ebuild           |    1 +
 3 files changed, 782 insertions(+), 0 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.6.2-safestrigi.patch b/kde-base/kdelibs/files/kdelibs-4.6.2-safestrigi.patch
new file mode 100644
index 0000000..f6c1828
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.6.2-safestrigi.patch
@@ -0,0 +1,780 @@
+commit d1254968eac95f4d9d8c47552e27f0cc40e6aed9
+Author: Peter Penz <peter.penz19@gmail.com>
+Date:   Sun Feb 27 20:01:19 2011 +0100
+
+    KFileMetaDataProvider: Don't crash if a Strigi analyzer crashes
+    
+    Some Strigi analyzers are still unstable and crash under certain circumstances. This patch moves the reading of the meta-data into a custom process instead of doing it in a thread, which assures that a crashing Strigi analyzer does not result in crashing Dolphin or Konqueror when hovering some items.
+    
+    FIXED-IN: 4.7.0
+    BUG: 257964
+    BUG: 258715
+    BUG: 262299
+    BUG: 263468
+    BUG: 263502
+    BUG: 264254
+    BUG: 234799
+    BUG: 251462
+    BUG: 251701
+    BUG: 258918
+    BUG: 192377
+    BUG: 195564
+    BUG: 199368
+    BUG: 210841
+    BUG: 245376
+    BUG: 246461
+    BUG: 246901
+    BUG: 249150
+    BUG: 261952
+    BUG: 249876
+    BUG: 179376
+    BUG: 179417
+    BUG: 179420
+    BUG: 181591
+    BUG: 183269
+    BUG: 183722
+    BUG: 185667
+    BUG: 188596
+    BUG: 191864
+    BUG: 193112
+    BUG: 205813
+    BUG: 244621
+    BUG: 245451
+    BUG: 248214
+    BUG: 249655
+    BUG: 249876
+    BUG: 265549
+    BUG: 267079
+
+diff --git a/kio/CMakeLists.txt b/kio/CMakeLists.txt
+index 0802150..72386f8 100644
+--- a/kio/CMakeLists.txt
++++ b/kio/CMakeLists.txt
+@@ -257,7 +257,6 @@ if(NOT KIO_NO_NEPOMUK)
+   set(kfile_STAT_SRCS
+     ${kfile_STAT_SRCS}
+     kfile/kcommentwidget.cpp
+-    kfile/kloadfilemetadatathread.cpp
+     )
+ endif(NOT KIO_NO_NEPOMUK)
+ 
+@@ -307,6 +306,12 @@ set(kio_LIB_PRIVATE_SRCS
+     kio/slaveinterface_p.h
+ )
+ 
++if(NOT KIO_NO_NEPOMUK)
++    set(kfilemetadatareader_SRCS
++        kfile/kfilemetadatareader.cpp
++    )
++endif(NOT KIO_NO_NEPOMUK)
++
+ kde4_add_ui_files(kio_LIB_SRCS
+    kfile/kpropertiesdesktopadvbase.ui
+    kfile/kpropertiesdesktopbase.ui
+@@ -323,6 +328,8 @@ install(FILES kssl/ksslcertificatemanager.upd
+ kde4_add_library(kio ${LIBRARY_TYPE} ${kio_LIB_SRCS})
+ 
+ if(NOT KIO_NO_NEPOMUK)
++  kde4_add_executable(kfilemetadatareader ${kfilemetadatareader_SRCS})
++  target_link_libraries(kfilemetadatareader ${KDE4_KIO_LIBS} ${KDE4_NEPOMUK_LIBRARY} nepomukutils)
+   target_link_libraries(kio ${KDE4_NEPOMUK_LIBRARY} nepomukquery nepomukutils)
+ endif(NOT KIO_NO_NEPOMUK)
+ target_link_libraries(kio ${KDE4_KDEUI_LIBS} ${ZLIB_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTSVG_LIBRARY} ${X11_LIBRARIES} ${KIO_EXTRA_LIBS})
+@@ -343,6 +350,9 @@ set_target_properties(kio PROPERTIES VERSION ${KDE_NON_GENERIC_LIB_VERSION}
+ 
+ ########### install files ###############
+ install(TARGETS kio EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
++if(NOT KIO_NO_NEPOMUK)
++    install(TARGETS kfilemetadatareader ${INSTALL_TARGETS_DEFAULT_ARGS})
++endif(NOT KIO_NO_NEPOMUK)
+ 
+ install( PROGRAMS useragent.pl proxytype.pl  DESTINATION ${KCONF_UPDATE_INSTALL_DIR} )
+ 
+diff --git a/kio/kfile/kfilemetadataprovider.cpp b/kio/kfile/kfilemetadataprovider.cpp
+index 09ce4b2..d6e4d0d 100644
+--- a/kio/kfile/kfilemetadataprovider.cpp
++++ b/kio/kfile/kfilemetadataprovider.cpp
+@@ -22,18 +22,20 @@
+ #include <kfileitem.h>
+ #include "knfotranslator_p.h"
+ #include <klocale.h>
++#include <kprocess.h>
++#include <kstandarddirs.h>
+ #include <kurl.h>
+ 
+ #ifndef KIO_NO_NEPOMUK
+     #define DISABLE_NEPOMUK_LEGACY
+     #include "nepomukmassupdatejob.h"
+     #include "tagwidget.h"
++    #include "tag.h"
+     #include "kratingwidget.h"
+     #include "resource.h"
+     #include "resourcemanager.h"
+ 
+     #include "kcommentwidget_p.h"
+-    #include "kloadfilemetadatathread_p.h"
+ #else
+     namespace Nepomuk
+     {
+@@ -103,7 +105,7 @@ public:
+     Private(KFileMetaDataProvider* parent);
+     ~Private();
+ 
+-    void slotLoadingFinished(QThread* finishedThread);
++    void slotLoadingFinished(int exitCode, QProcess::ExitStatus exitStatus);
+ 
+     void slotRatingChanged(unsigned int rating);
+     void slotTagsChanged(const QList<Nepomuk::Tag>& tags);
+@@ -135,8 +137,8 @@ public:
+ #ifndef KIO_NO_NEPOMUK
+     QHash<KUrl, Nepomuk::Variant> m_data;
+ 
+-    QList<KLoadFileMetaDataThread*> m_metaDataThreads;
+-    KLoadFileMetaDataThread* m_latestMetaDataThread;
++    QList<KProcess*> m_metaDataProcesses;
++    KProcess* m_latestMetaDataProcess;
+ 
+     QWeakPointer<KRatingWidget> m_ratingWidget;
+     QWeakPointer<Nepomuk::TagWidget> m_tagWidget;
+@@ -153,8 +155,8 @@ KFileMetaDataProvider::Private::Private(KFileMetaDataProvider* parent) :
+     m_fileItems(),
+ #ifndef KIO_NO_NEPOMUK
+     m_data(),
+-    m_metaDataThreads(),
+-    m_latestMetaDataThread(0),
++    m_metaDataProcesses(),
++    m_latestMetaDataProcess(0),
+     m_ratingWidget(),
+     m_tagWidget(),
+     m_commentWidget(),
+@@ -169,35 +171,57 @@ KFileMetaDataProvider::Private::Private(KFileMetaDataProvider* parent) :
+ KFileMetaDataProvider::Private::~Private()
+ {
+ #ifndef KIO_NO_NEPOMUK
+-    foreach (KLoadFileMetaDataThread* thread, m_metaDataThreads) {
+-        disconnect(thread, SIGNAL(finished(QThread*)),
+-                   q, SLOT(slotLoadingFinished(QThread*)));
+-        thread->wait();
+-    }
++    qDeleteAll(m_metaDataProcesses);
+ #endif
+ }
+ 
+-void KFileMetaDataProvider::Private::slotLoadingFinished(QThread* finishedThread)
++void KFileMetaDataProvider::Private::slotLoadingFinished(int exitCode, QProcess::ExitStatus exitStatus)
+ {
++    Q_UNUSED(exitCode);
++    Q_UNUSED(exitStatus);
++
+ #ifndef KIO_NO_NEPOMUK
+-    // The thread that has emitted the finished() signal
+-    // will get deleted and removed from m_metaDataThreads.
+-    const int threadsCount = m_metaDataThreads.count();
+-    for (int i = 0; i < threadsCount; ++i) {
+-        KLoadFileMetaDataThread* thread = m_metaDataThreads[i];
+-        if (thread == finishedThread) {
+-            m_metaDataThreads.removeAt(i);
+-            if (thread != m_latestMetaDataThread) {
+-                // Ignore data of older threads, as the data got
+-                // obsolete by m_latestMetaDataThread.
+-                thread->deleteLater();
++    KProcess* finishedProcess = qobject_cast<KProcess*>(q->sender());
++    // The process that has emitted the finished() signal
++    // will get deleted and removed from m_metaDataProcesses.
++    for (int i = 0; i < m_metaDataProcesses.count(); ++i) {
++        KProcess* process = m_metaDataProcesses[i];
++        if (process == finishedProcess) {
++            m_metaDataProcesses.removeAt(i);
++            if (process != m_latestMetaDataProcess) {
++                // Ignore data of older processs, as the data got
++                // obsolete by m_latestMetaDataProcess.
++                process->deleteLater();
+                 return;
+             }
+         }
+     }
+ 
+-    m_data = m_latestMetaDataThread->data();
+-    m_latestMetaDataThread->deleteLater();
++    m_data.clear();
++    while (m_latestMetaDataProcess->canReadLine()) {
++        // Read key
++        QString key = QString::fromLocal8Bit(m_latestMetaDataProcess->readLine());
++        key.remove(QChar::Other_Control);
++
++        // Read variant-type
++        if (!m_latestMetaDataProcess->canReadLine()) {
++            break;
++        }
++        QString valueTypeString(QString::fromLocal8Bit(m_latestMetaDataProcess->readLine()));
++        valueTypeString.remove(QChar::Other_Control);
++        const int valueType = valueTypeString.toInt();
++        if (!m_latestMetaDataProcess->canReadLine()) {
++            break;
++        }
++
++        // Read variant-value
++        QString value(QString::fromLocal8Bit(m_latestMetaDataProcess->readLine()));
++        value.remove(QChar::Other_Control);
++        // TODO: Handle value-types like QVariantList
++        Q_UNUSED(valueType);
++        m_data.insert(KUrl(key), value);
++    }
++    m_latestMetaDataProcess->deleteLater();
+ 
+     if (m_fileItems.count() == 1) {
+         // TODO: Handle case if remote URLs are used properly. isDir() does
+@@ -219,14 +243,11 @@ void KFileMetaDataProvider::Private::slotLoadingFinished(QThread* finishedThread
+         }
+         m_data.insert(KUrl("kfileitem#totalSize"), KIO::convertSize(totalSize));
+     }
+-#else
+-    Q_UNUSED(finishedThread)
+ #endif
+ 
+     emit q->loadingFinished();
+ }
+ 
+-
+ void KFileMetaDataProvider::Private::slotRatingChanged(unsigned int rating)
+ {
+ #ifndef KIO_NO_NEPOMUK
+@@ -386,18 +407,27 @@ void KFileMetaDataProvider::setItems(const KFileItemList& items)
+         }
+     }
+ 
+-    // Cancel all threads that have not emitted a finished() signal.
+-    // The deleting of those threads is done in slotLoadingFinished().
+-    foreach (KLoadFileMetaDataThread* thread, d->m_metaDataThreads) {
+-        thread->cancel();
++    // Create a new process that will provide the meta data for the items
++    d->m_latestMetaDataProcess = new KProcess();
++
++    const QString fileMetaDataReaderExe = KStandardDirs::findExe(QLatin1String("kfilemetadatareader"));
++    (*d->m_latestMetaDataProcess) << fileMetaDataReaderExe;
++
++    foreach (const KUrl& url, urls) {
++        (*d->m_latestMetaDataProcess) << url.url();
+     }
+ 
+-    // Create a new thread that will provide the meta data for the items
+-    d->m_latestMetaDataThread = new KLoadFileMetaDataThread();
+-    connect(d->m_latestMetaDataThread, SIGNAL(finished(QThread*)),
+-            this, SLOT(slotLoadingFinished(QThread*)));
+-    d->m_latestMetaDataThread->load(urls);
+-    d->m_metaDataThreads.append(d->m_latestMetaDataThread);
++    d->m_latestMetaDataProcess->setOutputChannelMode(KProcess::OnlyStdoutChannel);
++    d->m_latestMetaDataProcess->setNextOpenMode(QIODevice::ReadOnly | QIODevice::Text);
++    d->m_latestMetaDataProcess->start();
++    if (d->m_latestMetaDataProcess->waitForStarted()) {
++        connect(d->m_latestMetaDataProcess, SIGNAL(finished(int, QProcess::ExitStatus)),
++                this, SLOT(slotLoadingFinished(int, QProcess::ExitStatus)));
++        d->m_metaDataProcesses.append(d->m_latestMetaDataProcess);
++    } else {
++        delete d->m_latestMetaDataProcess;
++        d->m_latestMetaDataProcess = 0;
++    }
+ #endif
+ }
+ 
+diff --git a/kio/kfile/kfilemetadataprovider_p.h b/kio/kfile/kfilemetadataprovider_p.h
+index 05ae848..ce6e259 100644
+--- a/kio/kfile/kfilemetadataprovider_p.h
++++ b/kio/kfile/kfilemetadataprovider_p.h
+@@ -33,6 +33,7 @@
+ #endif
+ 
+ class KFileItemList;
++class KProcess;
+ class KUrl;
+ class QWidget;
+ 
+@@ -131,7 +132,7 @@ private:
+     class Private;
+     Private* const d;
+ 
+-    Q_PRIVATE_SLOT(d, void slotLoadingFinished(QThread* finishedThread))
++    Q_PRIVATE_SLOT(d, void slotLoadingFinished(int exitCode, QProcess::ExitStatus exitStatus))
+     Q_PRIVATE_SLOT(d, void slotRatingChanged(unsigned int rating))
+     Q_PRIVATE_SLOT(d, void slotTagsChanged(const QList<Nepomuk::Tag>& tags))
+     Q_PRIVATE_SLOT(d, void slotCommentChanged(const QString& comment))
+diff --git a/kio/kfile/kfilemetadatareader.cpp b/kio/kfile/kfilemetadatareader.cpp
+new file mode 100644
+index 0000000..0609235
+--- /dev/null
++++ b/kio/kfile/kfilemetadatareader.cpp
+@@ -0,0 +1,174 @@
++/*****************************************************************************
++ * Copyright (C) 2011 by Peter Penz <peter.penz@gmx.at>                      *
++ *                                                                           *
++ * This library is free software; you can redistribute it and/or             *
++ * modify it under the terms of the GNU Library General Public               *
++ * License as published by the Free Software Foundation; either              *
++ * version 2 of the License, or (at your option) any later version.          *
++ *                                                                           *
++ * This library is distributed in the hope that it will be useful,           *
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
++ * Library General Public License for more details.                          *
++ *                                                                           *
++ * You should have received a copy of the GNU Library General Public License *
++ * along with this library; see the file COPYING.LIB.  If not, write to      *
++ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,      *
++ * Boston, MA 02110-1301, USA.                                               *
++ *****************************************************************************/
++
++#include <iostream>
++
++#include <kaboutdata.h>
++#include <kcmdlineargs.h>
++#include <kfilemetainfo.h>
++#include <klocale.h>
++
++#include <QtCore/QHash>
++#include <QtCore/QString>
++
++#define DISABLE_NEPOMUK_LEGACY
++#include "config-nepomuk.h"
++
++#include <nepomuk/query/filequery.h>
++#include <nepomuk/query/comparisonterm.h>
++#include <nepomuk/query/andterm.h>
++#include <nepomuk/query/resourceterm.h>
++#include <nepomuk/query/resourcetypeterm.h>
++#include <nepomuk/query/optionalterm.h>
++#include <nepomuk/utils/utils.h>
++#include <nepomuk/property.h>
++#include <nepomuk/tag.h>
++#include <nepomuk/variant.h>
++#include <nepomuk/resourcemanager.h>
++
++using namespace std;
++
++static void sendMetaData(const QHash<KUrl, Nepomuk::Variant>& data)
++{
++    // Write the meta-data as sequence of the following properties:
++    // 1. Metadata key
++    // 2. Variant type
++    // 3. Variant value
++    QHashIterator<KUrl, Nepomuk::Variant> it(data);
++    while (it.hasNext()) {
++        it.next();
++        const QString key = it.key().url();
++        const Nepomuk::Variant& variant = it.value();
++
++        const QString variantType = QString::number(variant.type());
++        // TODO: serialize valuetypes like variant lists
++        QString variantValue = variant.toString();
++        // QChar::Other_Control acts as separator between the output-values.
++        // Assure that this character is not already part of a value:
++        variantValue.remove(QChar::Other_Control);
++
++        cout << key.toLocal8Bit().data() << endl;
++        cout << variantType.toLocal8Bit().data() << endl;
++        cout << variantValue.toLocal8Bit().data() << endl;
++    }
++}
++
++static int readMetaData(const KCmdLineArgs* args)
++{
++    KUrl::List urls;
++    const int argsCount = args->count();
++    for (int i = 0; i < argsCount; ++i) {
++        urls.append(KUrl(args->arg(i)));
++    }
++
++    unsigned int rating = 0;
++    QString comment;
++    QList<Nepomuk::Tag> tags;
++    QHash<KUrl, Nepomuk::Variant> data;
++
++    bool first = true;
++    foreach (const KUrl& url, urls) {
++        Nepomuk::Resource file(url);
++        if (!file.isValid()) {
++            continue;
++        }
++
++        if (!first && (rating != file.rating())) {
++            rating = 0; // Reset rating
++        } else if (first) {
++            rating = file.rating();
++        }
++
++        if (!first && (comment != file.description())) {
++            comment.clear(); // Reset comment
++        } else if (first) {
++            comment = file.description();
++        }
++
++        if (!first && (tags != file.tags())) {
++            tags.clear(); // Reset tags
++        } else if (first) {
++            tags = file.tags();
++        }
++
++        if (first && (urls.count() == 1)) {
++            // Get cached meta data by checking the indexed files
++            QHash<QUrl, Nepomuk::Variant> variants = file.properties();
++            QHash<QUrl, Nepomuk::Variant>::const_iterator it = variants.constBegin();
++            while (it != variants.constEnd()) {
++                Nepomuk::Types::Property prop(it.key());
++                data.insert(prop.uri(), Nepomuk::Utils::formatPropertyValue(prop, it.value(),
++                                                                            QList<Nepomuk::Resource>() << file,
++                                                                            Nepomuk::Utils::WithKioLinks));
++                ++it;
++            }
++
++            if (variants.isEmpty()) {
++                // The file has not been indexed, query the meta data
++                // directly from the file.
++                const QString path = urls.first().toLocalFile();
++                KFileMetaInfo metaInfo(path, QString(), KFileMetaInfo::Fastest);
++                const QHash<QString, KFileMetaInfoItem> metaInfoItems = metaInfo.items();
++                foreach (const KFileMetaInfoItem& metaInfoItem, metaInfoItems) {
++                    const QString uriString = metaInfoItem.name();
++                    const Nepomuk::Variant value(metaInfoItem.value());
++                    data.insert(uriString,
++                                Nepomuk::Utils::formatPropertyValue(Nepomuk::Types::Property(), value));
++                }
++            }
++        }
++
++        first = false;
++    }
++
++    if (Nepomuk::ResourceManager::instance()->initialized()) {
++        data.insert(KUrl("kfileitem#rating"), rating);
++        data.insert(KUrl("kfileitem#comment"), comment);
++
++        QList<Nepomuk::Variant> tagVariants;
++        foreach (const Nepomuk::Tag& tag, tags) {
++            tagVariants.append(Nepomuk::Variant(tag));
++        }
++        data.insert(KUrl("kfileitem#tags"), tagVariants);
++    }
++
++    sendMetaData(data);
++    return 0;
++}
++
++int main(int argc, char *argv[])
++{
++    KAboutData aboutData("kfilemetadatareader", 0, ki18n("KFileMetaDataReader"),
++                         "1.0",
++                         ki18n("KFileMetaDataReader can be used to read metadata from a file"),
++                         KAboutData::License_GPL,
++                         ki18n("(C) 2011, Peter Penz"));
++    aboutData.addAuthor(ki18n("Peter Penz"), ki18n("Current maintainer"), "peter.penz19@gmail.com");
++    
++    KCmdLineArgs::init(argc, argv, &aboutData);
++    
++    KCmdLineOptions options;
++    options.add("+[arg]", ki18n("List of URLs where the meta-data should be read from"));
++
++    KCmdLineArgs::addCmdLineOptions(options);
++    const KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
++
++    return readMetaData(args);
++}
++
+diff --git a/kio/kfile/kfilemetadatawidget.cpp b/kio/kfile/kfilemetadatawidget.cpp
+index dca3a12..532d884 100644
+--- a/kio/kfile/kfilemetadatawidget.cpp
++++ b/kio/kfile/kfilemetadatawidget.cpp
+@@ -41,9 +41,7 @@
+     #include <property.h>
+     #include <tag.h>
+ 
+-    #include <QMutex>
+     #include <QSpacerItem>
+-    #include <QThread>
+ #endif
+ 
+ class KFileMetaDataWidget::Private
+diff --git a/kio/kfile/kloadfilemetadatathread.cpp b/kio/kfile/kloadfilemetadatathread.cpp
+deleted file mode 100644
+index 55d2c37..0000000
+--- a/kio/kfile/kloadfilemetadatathread.cpp
++++ /dev/null
+@@ -1,178 +0,0 @@
+-/*****************************************************************************
+- * Copyright (C) 2009-2010 by Peter Penz <peter.penz@gmx.at>                 *
+- * Copyright (C) 2009-2010 by Sebastian Trueg <trueg@kde.org>                *
+- *                                                                           *
+- * This library is free software; you can redistribute it and/or             *
+- * modify it under the terms of the GNU Library General Public               *
+- * License as published by the Free Software Foundation; either              *
+- * version 2 of the License, or (at your option) any later version.          *
+- *                                                                           *
+- * This library is distributed in the hope that it will be useful,           *
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
+- * Library General Public License for more details.                          *
+- *                                                                           *
+- * You should have received a copy of the GNU Library General Public License *
+- * along with this library; see the file COPYING.LIB.  If not, write to      *
+- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,      *
+- * Boston, MA 02110-1301, USA.                                               *
+- *****************************************************************************/
+-
+-#include "kloadfilemetadatathread_p.h"
+-
+-#include <kfilemetainfo.h>
+-#include <kfilemetainfoitem.h>
+-#include <kglobal.h>
+-#include <klocale.h>
+-#include "kfilemetadataprovider_p.h"
+-#include <kprotocolinfo.h>
+-
+-#include "resource.h"
+-#include "thing.h"
+-#include "variant.h"
+-#include "resourcemanager.h"
+-
+-#include "config-nepomuk.h"
+-
+-#include "query/filequery.h"
+-#include "query/comparisonterm.h"
+-#include "query/andterm.h"
+-#include "query/resourceterm.h"
+-#include "query/resourcetypeterm.h"
+-#include "query/optionalterm.h"
+-#include "utils/utils.h"
+-
+-#include <Soprano/Model>
+-#include <Soprano/QueryResultIterator>
+-#include <Soprano/NodeIterator>
+-
+-#include <QMutexLocker>
+-
+-KLoadFileMetaDataThread::KLoadFileMetaDataThread()
+-    : m_canceled(false)
+-{
+-    connect(this, SIGNAL(finished()), this, SLOT(slotLoadingFinished()));
+-}
+-
+-KLoadFileMetaDataThread::~KLoadFileMetaDataThread()
+-{
+-}
+-
+-void KLoadFileMetaDataThread::load(const KUrl::List& urls)
+-{
+-    QMutexLocker locker(&m_mutex);
+-    m_urls = urls;
+-    m_canceled = false;
+-    start();
+-}
+-
+-QHash<KUrl, Nepomuk::Variant> KLoadFileMetaDataThread::data() const
+-{
+-    QMutexLocker locker(&m_mutex);
+-    return m_data;
+-}
+-
+-void KLoadFileMetaDataThread::cancel()
+-{
+-    // Setting m_canceled to true will cancel KLoadFileMetaDataThread::run()
+-    // as soon as run() gets the chance to check m_cancel.
+-    m_canceled = true;
+-}
+-
+-void KLoadFileMetaDataThread::run()
+-{
+-    QMutexLocker locker(&m_mutex);
+-    const KUrl::List urls = m_urls;
+-    locker.unlock(); // no shared member is accessed until locker.relock()
+-
+-    unsigned int rating = 0;
+-    QString comment;
+-    QList<Nepomuk::Tag> tags;
+-    QHash<KUrl, Nepomuk::Variant> data;
+-
+-    bool first = true;
+-    foreach (const KUrl& url, urls) {
+-        if (m_canceled) {
+-            return;
+-        }
+-
+-        Nepomuk::Resource file(url);
+-        if (!file.isValid()) {
+-            continue;
+-        }
+-
+-        if (!first && (rating != file.rating())) {
+-            rating = 0; // reset rating
+-        } else if (first) {
+-            rating = file.rating();
+-        }
+-
+-        if (!first && (comment != file.description())) {
+-            comment.clear(); // reset comment
+-        } else if (first) {
+-            comment = file.description();
+-        }
+-
+-        if (!first && (tags != file.tags())) {
+-            tags.clear(); // reset tags
+-        } else if (first) {
+-            tags = file.tags();
+-        }
+-
+-        if (first && (urls.count() == 1)) {
+-            // get cached meta data by checking the indexed files
+-            QHash<QUrl, Nepomuk::Variant> variants = file.properties();
+-            QHash<QUrl, Nepomuk::Variant>::const_iterator it = variants.constBegin();
+-            while (it != variants.constEnd()) {
+-                Nepomuk::Types::Property prop(it.key());
+-                data.insert(prop.uri(), Nepomuk::Utils::formatPropertyValue(prop, it.value(), QList<Nepomuk::Resource>() << file, Nepomuk::Utils::WithKioLinks));
+-                ++it;
+-            }
+-
+-            if (variants.isEmpty()) {
+-                // The file has not been indexed, query the meta data
+-                // directly from the file
+-
+-                // TODO: Some Strigi analyzers (used in KFileMetaInfo) are not reentrant.
+-                // As workaround the access is protected by a mutex here. To reproduce
+-                // the issue run kfilemetainfotest with helgrind.
+-                static QMutex metaInfoMutex;
+-                metaInfoMutex.lock();
+-
+-                const QString path = urls.first().toLocalFile();
+-                KFileMetaInfo metaInfo(path, QString(), KFileMetaInfo::Fastest);
+-                const QHash<QString, KFileMetaInfoItem> metaInfoItems = metaInfo.items();
+-                foreach (const KFileMetaInfoItem& metaInfoItem, metaInfoItems) {
+-                    const QString uriString = metaInfoItem.name();
+-                    const Nepomuk::Variant value(metaInfoItem.value());
+-                    data.insert(uriString, Nepomuk::Utils::formatPropertyValue(Nepomuk::Types::Property(), value));
+-                }
+-
+-                metaInfoMutex.unlock();
+-            }
+-        }
+-
+-        first = false;
+-    }
+-
+-    if (Nepomuk::ResourceManager::instance()->initialized()) {
+-        data.insert(KUrl("kfileitem#rating"), rating);
+-        data.insert(KUrl("kfileitem#comment"), comment);
+-
+-        QList<Nepomuk::Variant> tagVariants;
+-        foreach (const Nepomuk::Tag& tag, tags) {
+-            tagVariants.append(Nepomuk::Variant(tag));
+-        }
+-        data.insert(KUrl("kfileitem#tags"), tagVariants);
+-    }
+-
+-    locker.relock();
+-    m_data = data;
+-}
+-
+-void KLoadFileMetaDataThread::slotLoadingFinished()
+-{
+-    emit finished(this);
+-}
+-
+-#include "kloadfilemetadatathread_p.moc"
+diff --git a/kio/kfile/kloadfilemetadatathread_p.h b/kio/kfile/kloadfilemetadatathread_p.h
+deleted file mode 100644
+index 006e3a0..0000000
+--- a/kio/kfile/kloadfilemetadatathread_p.h
++++ /dev/null
+@@ -1,96 +0,0 @@
+-/*****************************************************************************
+- * Copyright (C) 2009-2010 by Peter Penz <peter.penz@gmx.at>                 *
+- *                                                                           *
+- * This library is free software; you can redistribute it and/or             *
+- * modify it under the terms of the GNU Library General Public               *
+- * License as published by the Free Software Foundation; either              *
+- * version 2 of the License, or (at your option) any later version.          *
+- *                                                                           *
+- * This library is distributed in the hope that it will be useful,           *
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
+- * Library General Public License for more details.                          *
+- *                                                                           *
+- * You should have received a copy of the GNU Library General Public License *
+- * along with this library; see the file COPYING.LIB.  If not, write to      *
+- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,      *
+- * Boston, MA 02110-1301, USA.                                               *
+- *****************************************************************************/
+-
+-#ifndef KLOADFILEMETADATATHREAD_H
+-#define KLOADFILEMETADATATHREAD_H
+-
+-#define DISABLE_NEPOMUK_LEGACY
+-#include <property.h>
+-#include <tag.h>
+-#include <variant.h>
+-
+-#include <kurl.h>
+-#include <QList>
+-#include <QMutex>
+-#include <QThread>
+-
+-/**
+- * Loads the meta data of files that are
+- * required by the widget KMetaDataWidget.
+- *
+- * Is used in KMetaDataModel.
+- */
+-class KLoadFileMetaDataThread : public QThread
+-{
+-    Q_OBJECT
+-
+-public:
+-    KLoadFileMetaDataThread();
+-    virtual ~KLoadFileMetaDataThread();
+-
+-    /**
+-     * Starts the thread and loads the meta data for
+-     * the files given by \p urls. After receiving
+-     * the signal finished(), the method KLoadFileMetaDataThread::data()
+-     * provides the loaded meta data.
+-     */
+-    void load(const KUrl::List& urls);
+-
+-    /**
+-     * Returns the meta data for the URLs given
+-     * by KLoadFileMetaDataThread::load(). The method only provides
+-     * valid results after the signal finished() has been
+-     * emitted.
+-     */
+-    QHash<KUrl, Nepomuk::Variant> data() const;
+-
+-    /**
+-     * Tells the thread that it should cancel as soon
+-     * as possible. It is undefined when the thread
+-     * gets cancelled. The signal finished() will emitted
+-     * after the cancelling has been done.mergedIt
+-     */
+-    void cancel();
+-
+-    /** @see QThread::run() */
+-    virtual void run();
+-
+-Q_SIGNALS:
+-    /**
+-     * Is emitted if the thread has finished the loading. KMetaDataModel
+-     * requires the information which thread has been finished, hence
+-     * the thread is passed as parameter (using QObject::sender() would
+-     * be an alternative, but it is less understandable).
+-     */
+-    void finished(QThread* thread);
+-
+-private slots:
+-    /**
+-     * Emits the signal finished() including the thread as parameter.
+-     */
+-    void slotLoadingFinished();
+-
+-private:
+-    mutable QMutex m_mutex;
+-    QHash<KUrl, Nepomuk::Variant> m_data;
+-    KUrl::List m_urls;
+-
+-    volatile bool m_canceled;
+-};
+-#endif

diff --git a/kde-base/kdelibs/kdelibs-4.6.2.ebuild b/kde-base/kdelibs/kdelibs-4.6.2.ebuild
index b28049b..4b2d0e7 100644
--- a/kde-base/kdelibs/kdelibs-4.6.2.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.6.2.ebuild
@@ -136,6 +136,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.5.90-mimetypes.patch"
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.0-kateacc.patch"
+	"${FILESDIR}/${PN}-4.6.2-safestrigi.patch"
 )
 
 src_prepare() {

diff --git a/kde-base/kdelibs/kdelibs-4.6.9999.ebuild b/kde-base/kdelibs/kdelibs-4.6.9999.ebuild
index 6d76d50..61b0f5f 100644
--- a/kde-base/kdelibs/kdelibs-4.6.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.6.9999.ebuild
@@ -136,6 +136,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.5.90-mimetypes.patch"
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.0-kateacc.patch"
+	"${FILESDIR}/${PN}-4.6.2-safestrigi.patch"
 )
 
 src_prepare() {



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2011-04-11 22:07 Andreas K. Huettel
  0 siblings, 0 replies; 38+ messages in thread
From: Andreas K. Huettel @ 2011-04-11 22:07 UTC (permalink / raw
  To: gentoo-commits

commit:     56fcc016245148e9524213ab79906f50c81d3f2e
Author:     Andreas K. Huettel (dilfridge) <mail <AT> akhuettel <DOT> de>
AuthorDate: Mon Apr 11 22:09:58 2011 +0000
Commit:     Andreas K. Huettel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Apr 11 22:10:12 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=56fcc016

[kde-base/kdelibs] Disable fatal linker warnings for all kde apps on arm only to make things build, bug 336209

(Portage version: 2.1.9.45/git/Linux x86_64, signed Manifest commit with key B6C5F7DE)

---
 .../kdelibs/files/kdelibs-4.6.2-armlinking.patch   |   14 ++++++++++++++
 .../kdelibs/files/kdelibs-4.6.2-nonepomuk.patch    |   15 +++++++++++++++
 kde-base/kdelibs/kdelibs-4.6.9999.ebuild           |    4 +++-
 kde-base/kdelibs/kdelibs-9999.ebuild               |    5 +++--
 4 files changed, 35 insertions(+), 3 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.6.2-armlinking.patch b/kde-base/kdelibs/files/kdelibs-4.6.2-armlinking.patch
new file mode 100644
index 0000000..a207d10
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.6.2-armlinking.patch
@@ -0,0 +1,14 @@
+diff -ruN kdelibs-4.6.2.orig/cmake/modules/FindKDE4Internal.cmake kdelibs-4.6.2/cmake/modules/FindKDE4Internal.cmake
+--- kdelibs-4.6.2.orig/cmake/modules/FindKDE4Internal.cmake	2011-04-01 15:56:18.000000000 +0200
++++ kdelibs-4.6.2/cmake/modules/FindKDE4Internal.cmake	2011-04-11 23:53:19.067196607 +0200
+@@ -1092,8 +1092,8 @@
+ if (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME STREQUAL GNU)
+    if (CMAKE_COMPILER_IS_GNUCXX)
+       set ( _KDE4_PLATFORM_DEFINITIONS -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_GNU_SOURCE)
+-      set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
+-      set ( CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_MODULE_LINKER_FLAGS}")
++      set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
++      set ( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined -lc ${CMAKE_MODULE_LINKER_FLAGS}")
+ 
+       set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,--enable-new-dtags ${CMAKE_SHARED_LINKER_FLAGS}")
+       set ( CMAKE_MODULE_LINKER_FLAGS "-Wl,--enable-new-dtags ${CMAKE_MODULE_LINKER_FLAGS}")

diff --git a/kde-base/kdelibs/files/kdelibs-4.6.2-nonepomuk.patch b/kde-base/kdelibs/files/kdelibs-4.6.2-nonepomuk.patch
new file mode 100644
index 0000000..2e34050
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.6.2-nonepomuk.patch
@@ -0,0 +1,15 @@
+diff -urNp kdelibs-4.6.1.org/kparts/CMakeLists.txt kdelibs-4.6.1/kparts/CMakeLists.txt
+--- kdelibs-4.6.1.org/kparts/CMakeLists.txt	2011-02-25 23:53:31.000000000 +0200
++++ kdelibs-4.6.1/kparts/CMakeLists.txt	2011-04-02 00:41:54.884508059 +0300
+@@ -2,7 +2,10 @@ project(kparts)
+ 
+ add_subdirectory( tests )
+ 
+-include_directories(${KDE4_KIO_INCLUDES} ${kparts_BINARY_DIR} ${nepomuk_SOURCE_DIR} ${nepomuk_SOURCE_DIR}/core ${nepomuk_SOURCE_DIR}/types)
++include_directories(${KDE4_KIO_INCLUDES} ${kparts_BINARY_DIR})
++if(HAVE_NEPOMUK)
++include_directories(${nepomuk_SOURCE_DIR} ${nepomuk_SOURCE_DIR}/core ${nepomuk_SOURCE_DIR}/types)
++endif(HAVE_NEPOMUK)
+ if(Soprano_FOUND)
+ include_directories(${SOPRANO_INCLUDE_DIR})
+ endif(Soprano_FOUND)

diff --git a/kde-base/kdelibs/kdelibs-4.6.9999.ebuild b/kde-base/kdelibs/kdelibs-4.6.9999.ebuild
index 40ecc56..cf96750 100644
--- a/kde-base/kdelibs/kdelibs-4.6.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.6.9999.ebuild
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/kdelibs-4.6.2-r2.ebuild,v 1.2 2011/04/11 21:59:37 dilfridge Exp $
 
 EAPI=3
 
@@ -136,10 +136,12 @@ PATCHES=(
 #	"${FILESDIR}/${PN}-4.5.74-klauncher_mac.patch" - FIXME read above
 	"${FILESDIR}/${PN}-4.5.90-mimetypes.patch"
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
+	"${FILESDIR}/${PN}-4.6.2-nonepomuk.patch"
 )
 
 src_prepare() {
 	kde4-base_src_prepare
+	use arm && epatch "${FILESDIR}/${PN}-4.6.2-armlinking.patch"
 
 	# Rename applications.menu (needs 01_gentoo_set_xdg_menu_prefix.patch to work)
 	local menu_prefix="kde-${SLOT}-"

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index c01e401..cf96750 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/kdelibs-4.6.2-r2.ebuild,v 1.2 2011/04/11 21:59:37 dilfridge Exp $
 
 EAPI=3
 
@@ -136,11 +136,12 @@ PATCHES=(
 #	"${FILESDIR}/${PN}-4.5.74-klauncher_mac.patch" - FIXME read above
 	"${FILESDIR}/${PN}-4.5.90-mimetypes.patch"
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
-#	"${FILESDIR}/${PN}-4.6.0-kateacc.patch" - FIXME no longer in git?
+	"${FILESDIR}/${PN}-4.6.2-nonepomuk.patch"
 )
 
 src_prepare() {
 	kde4-base_src_prepare
+	use arm && epatch "${FILESDIR}/${PN}-4.6.2-armlinking.patch"
 
 	# Rename applications.menu (needs 01_gentoo_set_xdg_menu_prefix.patch to work)
 	local menu_prefix="kde-${SLOT}-"



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2011-05-01 22:13 Tomas Chvatal
  0 siblings, 0 replies; 38+ messages in thread
From: Tomas Chvatal @ 2011-05-01 22:13 UTC (permalink / raw
  To: gentoo-commits

commit:     e58a95bd32024e1205b90da1ce626a855447f7ac
Author:     Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Sun May  1 22:13:02 2011 +0000
Commit:     Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Sun May  1 22:13:02 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=e58a95bd

[kde-base/kdelibs] Drop kate patch as acessibility is harddep

---
 kde-base/kdelibs/files/kdelibs-4.6.0-kateacc.patch |   49 --------------------
 kde-base/kdelibs/kdelibs-4.6.3.ebuild              |    1 -
 kde-base/kdelibs/kdelibs-4.6.9999.ebuild           |    1 -
 kde-base/kdelibs/kdelibs-9999.ebuild               |    1 -
 4 files changed, 0 insertions(+), 52 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.6.0-kateacc.patch b/kde-base/kdelibs/files/kdelibs-4.6.0-kateacc.patch
deleted file mode 100644
index 80bcfc5..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.6.0-kateacc.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff -ur kdelibs-4.5.96.orig/kate/view/kateviewaccessible.h kdelibs-4.5.95/kate/view/kateviewaccessible.h
---- kdelibs-4.5.96.orig/kate/view/kateviewaccessible.h	2010-11-11 17:41:28.000000000 +0300
-+++ kdelibs-4.5.95/kate/view/kateviewaccessible.h	2011-01-11 11:37:15.288810505 +0300
-@@ -19,6 +19,7 @@
- 
- #ifndef _KATE_VIEW_ACCESSIBLE_
- #define _KATE_VIEW_ACCESSIBLE_
-+#ifndef QT_NO_ACCESSIBILITY
- 
- #include "kateviewinternal.h"
- #include "katetextcursor.h"
-@@ -318,3 +319,4 @@
- }
- 
- #endif
-+#endif
-diff -ur kdelibs-4.5.96.orig/kate/view/kateviewinternal.cpp kdelibs-4.5.95/kate/view/kateviewinternal.cpp
---- kdelibs-4.5.96.orig/kate/view/kateviewinternal.cpp	2010-12-03 17:57:05.000000000 +0300
-+++ kdelibs-4.5.95/kate/view/kateviewinternal.cpp	2011-01-11 11:36:51.968811481 +0300
-@@ -216,7 +216,9 @@
-   connect( m_view, SIGNAL( selectionChanged(KTextEditor::View*) ),
-              this, SLOT( viewSelectionChanged() ) );
- 
-+#ifndef QT_NO_ACCESSIBILITY
-   QAccessible::installFactory(accessibleInterfaceFactory);
-+#endif
- 
-   // update is called in KateView, after construction and layout is over
-   // but before any other kateviewinternal call
-@@ -224,7 +226,9 @@
- 
- KateViewInternal::~KateViewInternal ()
- {
-+#ifndef QT_NO_ACCESSIBILITY
-   QAccessible::removeFactory(accessibleInterfaceFactory);
-+#endif
- 
-   // kill preedit ranges
-   delete m_imPreeditRange;
-@@ -646,7 +650,9 @@
- 
-   m_madeVisible = !force;
- 
-+#ifndef QT_NO_ACCESSIBILITY
-   QAccessible::updateAccessibility( this, KateCursorAccessible::ChildId, QAccessible::Focus );
-+#endif
- }
- 
- void KateViewInternal::slotRegionVisibilityChangedAt(unsigned int,bool clear_cache)

diff --git a/kde-base/kdelibs/kdelibs-4.6.3.ebuild b/kde-base/kdelibs/kdelibs-4.6.3.ebuild
index e3922bd..51c7d4e 100644
--- a/kde-base/kdelibs/kdelibs-4.6.3.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.6.3.ebuild
@@ -132,7 +132,6 @@ PATCHES=(
 	"${FILESDIR}/dist/02_gentoo_append_xdg_config_dirs-1.patch"
 	"${FILESDIR}/${PN}-4.5.90-mimetypes.patch"
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
-	"${FILESDIR}/${PN}-4.6.0-kateacc.patch"
 	"${FILESDIR}/${PN}-4.6.2-nonepomuk.patch"
 )
 

diff --git a/kde-base/kdelibs/kdelibs-4.6.9999.ebuild b/kde-base/kdelibs/kdelibs-4.6.9999.ebuild
index 124c5b3..c448e29 100644
--- a/kde-base/kdelibs/kdelibs-4.6.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.6.9999.ebuild
@@ -132,7 +132,6 @@ PATCHES=(
 	"${FILESDIR}/dist/02_gentoo_append_xdg_config_dirs-1.patch"
 	"${FILESDIR}/${PN}-4.5.90-mimetypes.patch"
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
-	"${FILESDIR}/${PN}-4.6.0-kateacc.patch"
 	"${FILESDIR}/${PN}-4.6.2-nonepomuk.patch"
 )
 

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index b531bea..1196c44 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -132,7 +132,6 @@ PATCHES=(
 	"${FILESDIR}/dist/02_gentoo_append_xdg_config_dirs-1.patch"
 	"${FILESDIR}/${PN}-4.5.90-mimetypes.patch"
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
-	"${FILESDIR}/${PN}-4.6.0-kateacc.patch"
 	"${FILESDIR}/${PN}-4.6.2-nonepomuk.patch"
 )
 



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2011-05-01 22:24 Tomas Chvatal
  0 siblings, 0 replies; 38+ messages in thread
From: Tomas Chvatal @ 2011-05-01 22:24 UTC (permalink / raw
  To: gentoo-commits

commit:     f1534bedb4964925c9bbfef13713c8d8e6854747
Author:     Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Sun May  1 22:24:03 2011 +0000
Commit:     Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Sun May  1 22:24:03 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=f1534bed

[kde-base/kdelibs] do not suid kdeinit. Per bug #365633

---
 .../files/kdelibs-4.6.3-no_suid_kdeinit.patch      |   19 +++++++++++++++++++
 kde-base/kdelibs/kdelibs-4.6.3.ebuild              |    1 +
 kde-base/kdelibs/kdelibs-4.6.9999.ebuild           |    1 +
 kde-base/kdelibs/kdelibs-9999.ebuild               |    1 +
 4 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.6.3-no_suid_kdeinit.patch b/kde-base/kdelibs/files/kdelibs-4.6.3-no_suid_kdeinit.patch
new file mode 100644
index 0000000..4b34f62
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.6.3-no_suid_kdeinit.patch
@@ -0,0 +1,19 @@
+diff -urN kdelibs-4.6.3.old/kinit/CMakeLists.txt kdelibs-4.6.3/kinit/CMakeLists.txt
+--- kdelibs-4.6.3.old/kinit/CMakeLists.txt	2011-05-02 00:19:10.000000000 +0200
++++ kdelibs-4.6.3/kinit/CMakeLists.txt	2011-05-02 00:20:32.000000000 +0200
+@@ -170,15 +170,6 @@
+   install(TARGETS start_kdeinit_wrapper DESTINATION ${LIBEXEC_INSTALL_DIR})
+ endif (NOT WIN32)
+ 
+-if (CMAKE_SYSTEM_NAME MATCHES Linux)
+-    MESSAGE(STATUS "Using setuid root kdeinit wrapper in order to protect it from bad Linux OOM-killer")
+-    set(KDEINIT_OOM_PROTECT 1)
+-    install(CODE "
+-        set(START_KDEINIT_PATH \"\$ENV{DESTDIR}${LIBEXEC_INSTALL_DIR}/start_kdeinit\")
+-        EXECUTE_PROCESS(COMMAND sh -c \"chown 0 '\${START_KDEINIT_PATH}' && chmod u+s '\${START_KDEINIT_PATH}'\")
+-    ")
+-endif (CMAKE_SYSTEM_NAME MATCHES Linux)
+-
+ ########### install files ###############
+ 
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.KLauncher.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} )

diff --git a/kde-base/kdelibs/kdelibs-4.6.3.ebuild b/kde-base/kdelibs/kdelibs-4.6.3.ebuild
index 51c7d4e..76410bc 100644
--- a/kde-base/kdelibs/kdelibs-4.6.3.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.6.3.ebuild
@@ -133,6 +133,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.5.90-mimetypes.patch"
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.2-nonepomuk.patch"
+	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-4.6.9999.ebuild b/kde-base/kdelibs/kdelibs-4.6.9999.ebuild
index c448e29..bbf33af 100644
--- a/kde-base/kdelibs/kdelibs-4.6.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.6.9999.ebuild
@@ -133,6 +133,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.5.90-mimetypes.patch"
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.2-nonepomuk.patch"
+	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index 1196c44..423e81e 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -133,6 +133,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.5.90-mimetypes.patch"
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.2-nonepomuk.patch"
+	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 )
 
 pkg_pretend() {



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2011-06-21 20:38 Andreas Hüttel
  0 siblings, 0 replies; 38+ messages in thread
From: Andreas Hüttel @ 2011-06-21 20:38 UTC (permalink / raw
  To: gentoo-commits

commit:     d4a62e3e9f8f3c421ee4eef20daf05ce7526bebf
Author:     Andreas K. Huettel (dilfridge) <mail <AT> akhuettel <DOT> de>
AuthorDate: Tue Jun 21 20:38:40 2011 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jun 21 20:38:40 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=d4a62e3e

[kde-base/kdelibs] Respect PYTHONDONTWRITEBYTECODE environmental variable in PYTHON_INSTALL macro, bug 372407

(Portage version: 2.1.10.3/git/Linux x86_64, signed Manifest commit with key B6C5F7DE)

---
 .../kdelibs/files/kdelibs-4.6.3-bytecode.patch     |   81 ++++++++++++++++++++
 kde-base/kdelibs/kdelibs-4.6.49.9999.ebuild        |    1 +
 kde-base/kdelibs/kdelibs-4.6.80-r1.ebuild          |    1 +
 kde-base/kdelibs/kdelibs-9999.ebuild               |    1 +
 4 files changed, 84 insertions(+), 0 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.6.3-bytecode.patch b/kde-base/kdelibs/files/kdelibs-4.6.3-bytecode.patch
new file mode 100644
index 0000000..736e2ae
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.6.3-bytecode.patch
@@ -0,0 +1,81 @@
+diff -ruN kdelibs-4.6.3.orig/cmake/modules/PythonMacros.cmake kdelibs-4.6.3/cmake/modules/PythonMacros.cmake
+--- kdelibs-4.6.3.orig/cmake/modules/PythonMacros.cmake	2011-04-01 15:55:50.000000000 +0200
++++ kdelibs-4.6.3/cmake/modules/PythonMacros.cmake	2011-06-21 22:30:18.957765437 +0200
+@@ -23,40 +23,42 @@
+   # Install the source file.
+   INSTALL(FILES ${SOURCE_FILE} DESTINATION ${DESINATION_DIR})
+ 
+-  # Byte compile and install the .pyc file.        
+-  GET_FILENAME_COMPONENT(_absfilename ${SOURCE_FILE} ABSOLUTE)
+-  GET_FILENAME_COMPONENT(_filename ${SOURCE_FILE} NAME)
+-  GET_FILENAME_COMPONENT(_filenamebase ${SOURCE_FILE} NAME_WE)
+-  GET_FILENAME_COMPONENT(_basepath ${SOURCE_FILE} PATH)
+-
+-  if(WIN32)
+-    string(REGEX REPLACE ".:/" "/" _basepath "${_basepath}")
+-  endif(WIN32)
+-
+-  SET(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename})
+-  SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc)
+-
+-  FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath})
+-
+-  SET(_message "-DMESSAGE=Byte-compiling ${_bin_py}")
+-
+-  GET_FILENAME_COMPONENT(_abs_bin_py ${_bin_py} ABSOLUTE)
+-  IF(_abs_bin_py STREQUAL ${_absfilename})    # Don't copy the file onto itself.
+-    ADD_CUSTOM_COMMAND(
+-      TARGET compile_python_files
+-      COMMAND ${CMAKE_COMMAND} -E echo ${message}
+-      COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py}
+-      DEPENDS ${_absfilename}
+-    )
+-  ELSE(_abs_bin_py STREQUAL ${_absfilename})
+-    ADD_CUSTOM_COMMAND(
+-      TARGET compile_python_files
+-      COMMAND ${CMAKE_COMMAND} -E echo ${message} 
+-      COMMAND ${CMAKE_COMMAND} -E copy ${_absfilename} ${_bin_py}
+-      COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py}
+-      DEPENDS ${_absfilename}
+-    )
+-  ENDIF(_abs_bin_py STREQUAL ${_absfilename})
++  # Byte compile and install the .pyc file.
++  IF("$ENV{PYTHONDONTWRITEBYTECODE}" STREQUAL "")
++    GET_FILENAME_COMPONENT(_absfilename ${SOURCE_FILE} ABSOLUTE)
++    GET_FILENAME_COMPONENT(_filename ${SOURCE_FILE} NAME)
++    GET_FILENAME_COMPONENT(_filenamebase ${SOURCE_FILE} NAME_WE)
++    GET_FILENAME_COMPONENT(_basepath ${SOURCE_FILE} PATH)
++
++    if(WIN32)
++      string(REGEX REPLACE ".:/" "/" _basepath "${_basepath}")
++    endif(WIN32)
++
++    SET(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename})
++    SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc)
++
++    FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath})
++
++    SET(_message "-DMESSAGE=Byte-compiling ${_bin_py}")
++
++    GET_FILENAME_COMPONENT(_abs_bin_py ${_bin_py} ABSOLUTE)
++    IF(_abs_bin_py STREQUAL ${_absfilename})    # Don't copy the file onto itself.
++      ADD_CUSTOM_COMMAND(
++        TARGET compile_python_files
++        COMMAND ${CMAKE_COMMAND} -E echo ${message}
++        COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py}
++        DEPENDS ${_absfilename}
++      )
++    ELSE(_abs_bin_py STREQUAL ${_absfilename})
++      ADD_CUSTOM_COMMAND(
++        TARGET compile_python_files
++        COMMAND ${CMAKE_COMMAND} -E echo ${message}
++        COMMAND ${CMAKE_COMMAND} -E copy ${_absfilename} ${_bin_py}
++        COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py}
++        DEPENDS ${_absfilename}
++      )
++    ENDIF(_abs_bin_py STREQUAL ${_absfilename})
+ 
+-  INSTALL(FILES ${_bin_pyc} DESTINATION ${DESINATION_DIR})
++    INSTALL(FILES ${_bin_pyc} DESTINATION ${DESINATION_DIR})
++  ENDIF("$ENV{PYTHONDONTWRITEBYTECODE}" STREQUAL "")
+ ENDMACRO(PYTHON_INSTALL)

diff --git a/kde-base/kdelibs/kdelibs-4.6.49.9999.ebuild b/kde-base/kdelibs/kdelibs-4.6.49.9999.ebuild
index cd2dfd8..6fea3fd 100644
--- a/kde-base/kdelibs/kdelibs-4.6.49.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.6.49.9999.ebuild
@@ -133,6 +133,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.2-nonepomuk.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
+	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-4.6.80-r1.ebuild b/kde-base/kdelibs/kdelibs-4.6.80-r1.ebuild
index 5a9fce3..a87ae07 100644
--- a/kde-base/kdelibs/kdelibs-4.6.80-r1.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.6.80-r1.ebuild
@@ -133,6 +133,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.2-nonepomuk.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
+	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index a2dfdf2..1cf8d08 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -133,6 +133,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.2-nonepomuk.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
+	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"
 )
 
 pkg_pretend() {



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2011-09-24 15:36 Andreas Hüttel
  0 siblings, 0 replies; 38+ messages in thread
From: Andreas Hüttel @ 2011-09-24 15:36 UTC (permalink / raw
  To: gentoo-commits

commit:     ae1b325a14e51f8826158ca2296d771dab9c1f53
Author:     Andreas K. Huettel (dilfridge) <mail <AT> akhuettel <DOT> de>
AuthorDate: Sat Sep 24 15:37:07 2011 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Sep 24 15:37:07 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=ae1b325a

Fix build with libpng-1.5, bug 383915

(Portage version: 2.1.10.19/git/Linux x86_64, signed Manifest commit with key B6C5F7DE)

---
 .../kdelibs/files/kdelibs-4.7.1-libpng15.patch     |   11 +++++++++++
 kde-base/kdelibs/kdelibs-4.7.49.9999.ebuild        |    1 +
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.7.1-libpng15.patch b/kde-base/kdelibs/files/kdelibs-4.7.1-libpng15.patch
new file mode 100644
index 0000000..7fd52d9
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.7.1-libpng15.patch
@@ -0,0 +1,11 @@
+--- kdelibs-4.7.1/khtml/imload/decoders/pngloader.cpp
++++ kdelibs-4.7.1/khtml/imload/decoders/pngloader.cpp
+@@ -198,7 +198,7 @@
+     {
+         if (interlaced)
+         {
+-            Q_ASSERT(pngReadStruct->row_info.pixel_depth <= depth * 8);
++            //Q_ASSERT(pngReadStruct->row_info.pixel_depth <= depth * 8);
+             requestScanline(rowNum, scanlineBuf);
+             png_progressive_combine_row(pngReadStruct, scanlineBuf, data);
+             notifyScanline(pass + 1, scanlineBuf);

diff --git a/kde-base/kdelibs/kdelibs-4.7.49.9999.ebuild b/kde-base/kdelibs/kdelibs-4.7.49.9999.ebuild
index 691119f..ff4385b 100644
--- a/kde-base/kdelibs/kdelibs-4.7.49.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.7.49.9999.ebuild
@@ -122,6 +122,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"
+	"${FILESDIR}/${PN}-4.7.1-libpng15.patch"
 )
 
 pkg_pretend() {



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2011-09-28 10:56 Marc Schiffbauer
  0 siblings, 0 replies; 38+ messages in thread
From: Marc Schiffbauer @ 2011-09-28 10:56 UTC (permalink / raw
  To: gentoo-commits

commit:     6adf728bca168413e7db5191ebe2f84602b8aef7
Author:     Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 28 10:55:46 2011 +0000
Commit:     Marc Schiffbauer <marc <AT> schiffbauer <DOT> net>
CommitDate: Wed Sep 28 10:55:46 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=6adf728b

[kde-base/kdelibs] removed files/kdelibs-4.7.1-libpng15.patch, fixed upstream

(Portage version: 2.2.0_alpha59/git/Linux x86_64, signed Manifest commit with key 0x35A64134)

---
 .../kdelibs/files/kdelibs-4.7.1-libpng15.patch     |   11 -----------
 kde-base/kdelibs/kdelibs-4.7.49.9999.ebuild        |    1 -
 2 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.7.1-libpng15.patch b/kde-base/kdelibs/files/kdelibs-4.7.1-libpng15.patch
deleted file mode 100644
index 7fd52d9..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.7.1-libpng15.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- kdelibs-4.7.1/khtml/imload/decoders/pngloader.cpp
-+++ kdelibs-4.7.1/khtml/imload/decoders/pngloader.cpp
-@@ -198,7 +198,7 @@
-     {
-         if (interlaced)
-         {
--            Q_ASSERT(pngReadStruct->row_info.pixel_depth <= depth * 8);
-+            //Q_ASSERT(pngReadStruct->row_info.pixel_depth <= depth * 8);
-             requestScanline(rowNum, scanlineBuf);
-             png_progressive_combine_row(pngReadStruct, scanlineBuf, data);
-             notifyScanline(pass + 1, scanlineBuf);

diff --git a/kde-base/kdelibs/kdelibs-4.7.49.9999.ebuild b/kde-base/kdelibs/kdelibs-4.7.49.9999.ebuild
index b4b5de4..e6694c5 100644
--- a/kde-base/kdelibs/kdelibs-4.7.49.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.7.49.9999.ebuild
@@ -125,7 +125,6 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"
-	"${FILESDIR}/${PN}-4.7.1-libpng15.patch"
 )
 
 pkg_pretend() {



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2011-12-27  3:38 Marc Schiffbauer
  0 siblings, 0 replies; 38+ messages in thread
From: Marc Schiffbauer @ 2011-12-27  3:38 UTC (permalink / raw
  To: gentoo-commits

commit:     899627c5cdde43c63f064b94a20808008b6107a5
Author:     Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 27 03:37:01 2011 +0000
Commit:     Marc Schiffbauer <marc <AT> schiffbauer <DOT> net>
CommitDate: Tue Dec 27 03:37:01 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=899627c5

[kde-base/kdelibs] Add files/kdelibs-4.7.96-mimetypes.patch

  and switch to KDE/4.8 branch in 9999, too

---
 .../kdelibs/files/kdelibs-4.7.96-mimetypes.patch   |   38 ++++++++++++++++++++
 kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild        |    2 +-
 kde-base/kdelibs/kdelibs-9999.ebuild               |    4 +-
 3 files changed, 41 insertions(+), 3 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.7.96-mimetypes.patch b/kde-base/kdelibs/files/kdelibs-4.7.96-mimetypes.patch
new file mode 100644
index 0000000..049cef8
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.7.96-mimetypes.patch
@@ -0,0 +1,38 @@
+diff -ur kdelibs-4.8.49.9999.orig/mimetypes/kde.xml kdelibs-4.8.49.9999/mimetypes/kde.xml
+--- kdelibs-4.8.49.9999.orig/mimetypes/kde.xml	2011-12-27 04:20:35.982831561 +0100
++++ kdelibs-4.8.49.9999/mimetypes/kde.xml	2011-12-27 04:30:15.747168085 +0100
+@@ -178,34 +178,6 @@
+     <glob pattern="*.abc"/>
+   </mime-type>
+ 
+-  <!-- all/ fake mime types -->
+-  <mime-type type="all/all">
+-    <comment>all files and folders</comment>
+-  </mime-type>
+-  <mime-type type="all/allfiles">
+-    <comment>all files</comment>
+-  </mime-type>
+-
+-  <!-- uri/ fake mime types -->
+-  <mime-type type="uri/mms">
+-    <comment>mms: URIs</comment>
+-  </mime-type>
+-  <mime-type type="uri/mmst">
+-    <comment>mmst: URIs</comment>
+-  </mime-type>
+-  <mime-type type="uri/mmsu">
+-    <comment>mmsu: URIs</comment>
+-  </mime-type>
+-  <mime-type type="uri/pnm">
+-    <comment>pnm: URIs</comment>
+-  </mime-type>
+-  <mime-type type="uri/rtspt">
+-    <comment>rtspt: URIs</comment>
+-  </mime-type>
+-  <mime-type type="uri/rtspu">
+-    <comment>rtspu: URIs</comment>
+-  </mime-type>
+-
+   <mime-type type="application/vnd.kde.fontspackage">
+     <sub-class-of type="application/zip"/>
+     <comment>fonts package</comment>

diff --git a/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild b/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
index 4dd416c..763a9dd 100644
--- a/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
@@ -129,7 +129,7 @@ add_blocker kcontrol 4.4.50
 PATCHES=(
 	"${FILESDIR}/dist/01_gentoo_set_xdg_menu_prefix-1.patch"
 	"${FILESDIR}/dist/02_gentoo_append_xdg_config_dirs-1.patch"
-	"${FILESDIR}/${PN}-4.5.90-mimetypes.patch"
+	"${FILESDIR}/${PN}-4.7.96-mimetypes.patch"
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index f400411..763a9dd 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -12,7 +12,7 @@ inherit kde4-base fdo-mime toolchain-funcs
 
 # The "master" branch is out of date, so use KDE/4.7 per upstream's
 # recommendation (KDE/4.8 will be branched off of KDE/4.7)
-EGIT_BRANCH="KDE/4.7"
+EGIT_BRANCH="KDE/4.8"
 
 DESCRIPTION="KDE libraries needed by all KDE programs."
 HOMEPAGE="http://www.kde.org/"
@@ -129,7 +129,7 @@ add_blocker kcontrol 4.4.50
 PATCHES=(
 	"${FILESDIR}/dist/01_gentoo_set_xdg_menu_prefix-1.patch"
 	"${FILESDIR}/dist/02_gentoo_append_xdg_config_dirs-1.patch"
-	"${FILESDIR}/${PN}-4.5.90-mimetypes.patch"
+	"${FILESDIR}/${PN}-4.7.96-mimetypes.patch"
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-01-05 11:12 Johannes Huber
  0 siblings, 0 replies; 38+ messages in thread
From: Johannes Huber @ 2012-01-05 11:12 UTC (permalink / raw
  To: gentoo-commits

commit:     11dec3efc36313f2c88aba6d747b6ab4a8782435
Author:     Johannes Huber <johu <AT> gentoo <DOT> org>
AuthorDate: Thu Jan  5 11:11:11 2012 +0000
Commit:     Johannes Huber <johu <AT> gentoo <DOT> org>
CommitDate: Thu Jan  5 11:11:27 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=11dec3ef

[kde-base/kdelibs] Fix FindXine.cmake to use pkg-config instead of xine-config wrt #397595

(Portage version: 2.2.0_alpha84/git/Linux x86_64, unsigned Manifest commit)

---
 .../kdelibs/files/kdelibs-4.7.4-xinelib12x.patch   |   32 ++++++++++++++++++++
 ...libs-4.7.95.ebuild => kdelibs-4.7.95-r1.ebuild} |    1 +
 ...libs-4.7.97.ebuild => kdelibs-4.7.97-r1.ebuild} |    1 +
 kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild        |    1 +
 kde-base/kdelibs/kdelibs-9999.ebuild               |    1 +
 5 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.7.4-xinelib12x.patch b/kde-base/kdelibs/files/kdelibs-4.7.4-xinelib12x.patch
new file mode 100644
index 0000000..bdcd39a
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.7.4-xinelib12x.patch
@@ -0,0 +1,32 @@
+From de5da56d10a47ff8fdf55c0818e9e776dcfa01f9 Mon Sep 17 00:00:00 2001
+From: Johannes Huber <johu@gentoo.org>
+Date: Thu, 5 Jan 2012 10:06:05 +0100
+Subject: [PATCH] Fix FindXine.cmake module with >=xine-lib-1.2.
+
+---
+ cmake/modules/FindXine.cmake |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cmake/modules/FindXine.cmake b/cmake/modules/FindXine.cmake
+index 37c58c6..d71969a 100644
+--- a/cmake/modules/FindXine.cmake
++++ b/cmake/modules/FindXine.cmake
+@@ -36,13 +36,13 @@ find_library(XINE_LIBRARY NAMES xine
+   ${PC_LIBXINE_LIBRARY_DIRS}
+  )
+ 
+-find_program(XINECONFIG_EXECUTABLE NAMES xine-config 
++find_program(XINECONFIG_EXECUTABLE NAMES pkg-config
+    HINTS
+    ${PC_LIBXINE_PREFIX}/bin
+ )
+ 
+ if (XINE_INCLUDE_DIR AND XINE_LIBRARY AND XINECONFIG_EXECUTABLE)
+-   exec_program(${XINECONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE XINE_VERSION ERROR_QUIET)
++   exec_program(${XINECONFIG_EXECUTABLE} ARGS --modversion libxine RETURN_VALUE _return_VALUE OUTPUT_VARIABLE XINE_VERSION ERROR_QUIET)
+    if("${XINE_VERSION}" VERSION_GREATER "1.1.0")   #if (... VERSION_GREATER) is new since cmake 2.6.2
+       set(XINE_VERSION_OK TRUE)
+       string(REGEX REPLACE "[0-9]\\.[0-9]\\." "" XINE_BUGFIX_VERSION ${XINE_VERSION})
+-- 
+1.7.8.2
+

diff --git a/kde-base/kdelibs/kdelibs-4.7.95.ebuild b/kde-base/kdelibs/kdelibs-4.7.95-r1.ebuild
similarity index 99%
rename from kde-base/kdelibs/kdelibs-4.7.95.ebuild
rename to kde-base/kdelibs/kdelibs-4.7.95-r1.ebuild
index 52a3998..34c63ee 100644
--- a/kde-base/kdelibs/kdelibs-4.7.95.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.7.95-r1.ebuild
@@ -133,6 +133,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"
+	"${FILESDIR}/${PN}-4.7.4-xinelib12x.patch"
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-4.7.97.ebuild b/kde-base/kdelibs/kdelibs-4.7.97-r1.ebuild
similarity index 99%
rename from kde-base/kdelibs/kdelibs-4.7.97.ebuild
rename to kde-base/kdelibs/kdelibs-4.7.97-r1.ebuild
index 0fd4b57..b839f64 100644
--- a/kde-base/kdelibs/kdelibs-4.7.97.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.7.97-r1.ebuild
@@ -133,6 +133,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"
+	"${FILESDIR}/${PN}-4.7.4-xinelib12x.patch"
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild b/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
index 763a9dd..21408f4 100644
--- a/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
@@ -133,6 +133,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"
+	"${FILESDIR}/${PN}-4.7.4-xinelib12x.patch"
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index 763a9dd..21408f4 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -133,6 +133,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"
+	"${FILESDIR}/${PN}-4.7.4-xinelib12x.patch"
 )
 
 pkg_pretend() {



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-03-24 16:47 Andreas Hüttel
  0 siblings, 0 replies; 38+ messages in thread
From: Andreas Hüttel @ 2012-03-24 16:47 UTC (permalink / raw
  To: gentoo-commits

commit:     7928de25d218d2639d107cf75e47ec7c08e4ab11
Author:     Andreas K. Huettel (dilfridge) <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 24 16:25:33 2012 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Mar 24 16:25:33 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=7928de25

[kde-base/kdelibs] Add patch to drop rpath from kde executables

(Portage version: 2.1.10.49/git/Linux x86_64, unsigned Manifest commit)

---
 .../files/kdelibs-4.8.1-nepomuk-kmail.patch        |   52 ++++++++++++++++++++
 kde-base/kdelibs/files/kdelibs-4.8.1-norpath.patch |   18 +++++++
 .../files/kdelibs-4.8.1-sonnet-highlighter.patch   |   40 +++++++++++++++
 ...-4.8.49.9999.ebuild => kdelibs-4.8.1-r3.ebuild} |    7 ++-
 kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild        |    1 +
 kde-base/kdelibs/kdelibs-9999.ebuild               |    1 +
 6 files changed, 117 insertions(+), 2 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.1-nepomuk-kmail.patch b/kde-base/kdelibs/files/kdelibs-4.8.1-nepomuk-kmail.patch
new file mode 100644
index 0000000..145472d
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.8.1-nepomuk-kmail.patch
@@ -0,0 +1,52 @@
+diff --git a/nepomuk/core/resourcedata.cpp b/nepomuk/core/resourcedata.cpp
+index abe55ea..e65e66e 100644
+--- a/nepomuk/core/resourcedata.cpp
++++ b/nepomuk/core/resourcedata.cpp
+@@ -175,7 +175,7 @@ void Nepomuk::ResourceData::resetAll( bool isDelete )
+     if( !m_uri.isEmpty() ) {
+         m_rm->m_initializedData.remove( m_uri );
+         if( m_rm->m_watcher && m_addedToWatcher ) {
+-            m_rm->m_watcher->removeResource(Resource::fromResourceUri(m_uri));
++            QMetaObject::invokeMethod(m_rm->m_watcher, "removeResource", Qt::AutoConnection, Q_ARG(Nepomuk::Resource, Resource::fromResourceUri(m_uri)));
+             m_addedToWatcher = false;
+         }
+     }
+@@ -394,15 +394,16 @@ bool Nepomuk::ResourceData::load()
+ 
+         if(!m_rm->m_watcher) {
+             m_rm->m_watcher = new ResourceWatcher(m_rm->m_manager);
++            m_rm->m_watcher->moveToThread(m_rm->m_manager->thread());
+             QObject::connect( m_rm->m_watcher, SIGNAL(propertyAdded(Nepomuk::Resource, Nepomuk::Types::Property, QVariant)),
+                               m_rm->m_manager, SLOT(slotPropertyAdded(Nepomuk::Resource, Nepomuk::Types::Property, QVariant)) );
+             QObject::connect( m_rm->m_watcher, SIGNAL(propertyRemoved(Nepomuk::Resource, Nepomuk::Types::Property, QVariant)),
+                               m_rm->m_manager, SLOT(slotPropertyRemoved(Nepomuk::Resource, Nepomuk::Types::Property, QVariant)) );
+             m_rm->m_watcher->addResource( Nepomuk::Resource::fromResourceUri(m_uri) );
+-            m_rm->m_watcher->start();
++            QMetaObject::invokeMethod(m_rm->m_watcher, "start", Qt::AutoConnection);
+         }
+         else {
+-            m_rm->m_watcher->addResource( Nepomuk::Resource::fromResourceUri(m_uri) );
++            QMetaObject::invokeMethod(m_rm->m_watcher, "addResource", Qt::AutoConnection, Q_ARG(Nepomuk::Resource, Nepomuk::Resource::fromResourceUri(m_uri)) );
+         }
+         m_addedToWatcher = true;
+ 
+diff --git a/nepomuk/core/resourcewatcher.h b/nepomuk/core/resourcewatcher.h
+index 06b9622..92b12f5 100644
+--- a/nepomuk/core/resourcewatcher.h
++++ b/nepomuk/core/resourcewatcher.h
+@@ -93,6 +93,7 @@ namespace Nepomuk {
+          */
+         virtual ~ResourceWatcher();
+ 
++    public Q_SLOTS:
+         /**
+          * \brief Add a type to be watched.
+          *
+@@ -204,7 +205,6 @@ namespace Nepomuk {
+          */
+         QList<Types::Property> properties() const;
+ 
+-    public Q_SLOTS:
+         /**
+          * \brief Start the signalling of changes.
+          *

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.1-norpath.patch b/kde-base/kdelibs/files/kdelibs-4.8.1-norpath.patch
new file mode 100644
index 0000000..83d5576
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.8.1-norpath.patch
@@ -0,0 +1,18 @@
+diff -ruN kdelibs-4.8.1.orig/cmake/modules/FindKDE4Internal.cmake kdelibs-4.8.1/cmake/modules/FindKDE4Internal.cmake
+--- kdelibs-4.8.1.orig/cmake/modules/FindKDE4Internal.cmake	2012-02-29 22:55:52.000000000 +0100
++++ kdelibs-4.8.1/cmake/modules/FindKDE4Internal.cmake	2012-03-24 17:18:59.452942648 +0100
+@@ -1045,7 +1045,13 @@
+ 
+       set(CMAKE_SKIP_BUILD_RPATH FALSE)
+       set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+-      set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
++
++      # the RPATH to be used when installing
++      SET(CMAKE_INSTALL_RPATH "")
++
++      # don't add the automatically determined parts of the RPATH
++      # which point to directories outside the build tree to the install RPATH
++      SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
+    endif (APPLE)
+ endif (UNIX)
+ 

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.1-sonnet-highlighter.patch b/kde-base/kdelibs/files/kdelibs-4.8.1-sonnet-highlighter.patch
new file mode 100644
index 0000000..92a1f45
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.8.1-sonnet-highlighter.patch
@@ -0,0 +1,40 @@
+commit 20f73c2150bcd2220fe3604c2ec251b4026a3891
+Author: Montel Laurent <montel@kde.org>
+Date:   Mon Mar 19 12:30:49 2012 +0100
+
+    Fix Bug 295615 - kmail crashes trying to edit subject/message body with
+    
+    some dictionary languages set in identity properties
+    
+    Patch from Matt Whitlock from https://bugs.gentoo.org/show_bug.cgi?id=407709
+    it's right timer can be uninitialize when we change language => it will
+    crash
+    
+    FIXED-IN: 4.8.2
+    BUG: 295615
+
+diff --git a/kdeui/sonnet/highlighter.cpp b/kdeui/sonnet/highlighter.cpp
+index 05f7ed1..b10310a 100644
+--- a/kdeui/sonnet/highlighter.cpp
++++ b/kdeui/sonnet/highlighter.cpp
+@@ -108,6 +108,10 @@ Highlighter::Highlighter(QTextEdit *textEdit,
+ 
+     d->dict = new Sonnet::Speller();
+     d->spellCheckerFound = d->dict->isValid();
++    d->rehighlightRequest = new QTimer(this);
++    connect( d->rehighlightRequest, SIGNAL(timeout()),
++             this, SLOT(slotRehighlight()));
++
+     if(!d->spellCheckerFound)
+         return;
+ 
+@@ -121,9 +125,6 @@ Highlighter::Highlighter(QTextEdit *textEdit,
+     for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+         d->dict->addToSession( *it );
+     }
+-    d->rehighlightRequest = new QTimer(this);
+-    connect( d->rehighlightRequest, SIGNAL(timeout()),
+-             this, SLOT(slotRehighlight()));
+     d->completeRehighlightRequired = true;
+     d->rehighlightRequest->setInterval(0);
+     d->rehighlightRequest->setSingleShot(true);

diff --git a/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild b/kde-base/kdelibs/kdelibs-4.8.1-r3.ebuild
similarity index 96%
copy from kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
copy to kde-base/kdelibs/kdelibs-4.8.1-r3.ebuild
index 56163b0..e8d2e62 100644
--- a/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.8.1-r3.ebuild
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/kdelibs-4.8.1-r2.ebuild,v 1.2 2012/03/23 21:41:16 johu Exp $
 
 EAPI=4
 
@@ -17,7 +17,7 @@ EGIT_BRANCH="KDE/4.8"
 DESCRIPTION="KDE libraries needed by all KDE programs."
 HOMEPAGE="http://www.kde.org/"
 
-KEYWORDS=""
+KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
 LICENSE="LGPL-2.1"
 IUSE="3dnow acl alsa altivec +bzip2 debug doc fam +handbook jpeg2k kerberos lzma
 mmx nls openexr +policykit semantic-desktop spell sse sse2 ssl +udev +udisks
@@ -127,6 +127,9 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"
+	"${FILESDIR}/${PN}-4.8.1-nepomuk-kmail.patch"
+	"${FILESDIR}/${PN}-4.8.1-sonnet-highlighter.patch"
+	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild b/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
index 56163b0..01a327e 100644
--- a/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
@@ -127,6 +127,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"
+	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index cb3f98e..41de55e 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -127,6 +127,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"
+	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 )
 
 pkg_pretend() {



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-04-03 21:01 Andreas Hüttel
  0 siblings, 0 replies; 38+ messages in thread
From: Andreas Hüttel @ 2012-04-03 21:01 UTC (permalink / raw
  To: gentoo-commits

commit:     d3052285dfc9cfac1348e717c54b795b8dfaff9d
Author:     Andreas K. Huettel (dilfridge) <mail <AT> akhuettel <DOT> de>
AuthorDate: Tue Apr  3 21:00:56 2012 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Apr  3 21:00:56 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=d3052285

[kde-base/kdelib] Fix usage of calculator key, bug 406049

(Portage version: 2.1.10.54/git/Linux x86_64, unsigned Manifest commit)

---
 .../files/kdelibs-4.8.2-calculator_key.patch       |   11 +++++++++++
 kde-base/kdelibs/kdelibs-4.8.2.ebuild              |    1 +
 kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild        |    1 +
 kde-base/kdelibs/kdelibs-9999.ebuild               |    1 +
 4 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.2-calculator_key.patch b/kde-base/kdelibs/files/kdelibs-4.8.2-calculator_key.patch
new file mode 100644
index 0000000..4c481c6
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.8.2-calculator_key.patch
@@ -0,0 +1,11 @@
+--- kdeui/util/kkeyserver_x11.cpp	2012-02-25 18:53:49.480771132 -0200
++++ kdeui/util/kkeyserver_x11.cpp	2012-02-25 18:20:38.912403430 -0200
+@@ -355,7 +355,7 @@
+     { Qt::Key_MediaRecord, XF86XK_AudioRecord },
+     { Qt::Key_LaunchMail, XF86XK_Mail },
+     { Qt::Key_Launch0,    XF86XK_MyComputer },
+-    { Qt::Key_Calculator,    XF86XK_Calculator },
++    { Qt::Key_Launch1,    XF86XK_Calculator },
+     { Qt::Key_Memo,    XF86XK_Memo },
+     { Qt::Key_ToDoList,    XF86XK_ToDoList },
+     { Qt::Key_Calendar,    XF86XK_Calendar },

diff --git a/kde-base/kdelibs/kdelibs-4.8.2.ebuild b/kde-base/kdelibs/kdelibs-4.8.2.ebuild
index 9ed7e74..fa80b48 100644
--- a/kde-base/kdelibs/kdelibs-4.8.2.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.8.2.ebuild
@@ -128,6 +128,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
+	"${FILESDIR}/${PN}-4.8.2-calculator_key.patch"
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild b/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
index 0f2c38a..a958f20 100644
--- a/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
@@ -128,6 +128,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
+	"${FILESDIR}/${PN}-4.8.2-calculator_key.patch"
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index ab2cd65..595e4d9 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -128,6 +128,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
+	"${FILESDIR}/${PN}-4.8.2-calculator_key.patch"
 )
 
 pkg_pretend() {



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-04-05  5:55 Johannes Huber
  0 siblings, 0 replies; 38+ messages in thread
From: Johannes Huber @ 2012-04-05  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     d62378f09a9978e6d878c4a5fe2f1ce36a01f09b
Author:     Johannes Huber <johu <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  5 05:53:40 2012 +0000
Commit:     Johannes Huber <johu <AT> gentoo <DOT> org>
CommitDate: Thu Apr  5 05:53:40 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=d62378f0

[kde-base/kdelibs] Remove obsolete, newer version with rpath removal patch in tree.

(Portage version: 2.2.0_alpha98/git/Linux i686, unsigned Manifest commit)

---
 .../files/kdelibs-4.8.1-nepomuk-kmail.patch        |   52 ----
 .../files/kdelibs-4.8.1-sonnet-highlighter.patch   |   40 ---
 kde-base/kdelibs/kdelibs-4.8.1-r3.ebuild           |  314 --------------------
 3 files changed, 0 insertions(+), 406 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.1-nepomuk-kmail.patch b/kde-base/kdelibs/files/kdelibs-4.8.1-nepomuk-kmail.patch
deleted file mode 100644
index 145472d..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.8.1-nepomuk-kmail.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff --git a/nepomuk/core/resourcedata.cpp b/nepomuk/core/resourcedata.cpp
-index abe55ea..e65e66e 100644
---- a/nepomuk/core/resourcedata.cpp
-+++ b/nepomuk/core/resourcedata.cpp
-@@ -175,7 +175,7 @@ void Nepomuk::ResourceData::resetAll( bool isDelete )
-     if( !m_uri.isEmpty() ) {
-         m_rm->m_initializedData.remove( m_uri );
-         if( m_rm->m_watcher && m_addedToWatcher ) {
--            m_rm->m_watcher->removeResource(Resource::fromResourceUri(m_uri));
-+            QMetaObject::invokeMethod(m_rm->m_watcher, "removeResource", Qt::AutoConnection, Q_ARG(Nepomuk::Resource, Resource::fromResourceUri(m_uri)));
-             m_addedToWatcher = false;
-         }
-     }
-@@ -394,15 +394,16 @@ bool Nepomuk::ResourceData::load()
- 
-         if(!m_rm->m_watcher) {
-             m_rm->m_watcher = new ResourceWatcher(m_rm->m_manager);
-+            m_rm->m_watcher->moveToThread(m_rm->m_manager->thread());
-             QObject::connect( m_rm->m_watcher, SIGNAL(propertyAdded(Nepomuk::Resource, Nepomuk::Types::Property, QVariant)),
-                               m_rm->m_manager, SLOT(slotPropertyAdded(Nepomuk::Resource, Nepomuk::Types::Property, QVariant)) );
-             QObject::connect( m_rm->m_watcher, SIGNAL(propertyRemoved(Nepomuk::Resource, Nepomuk::Types::Property, QVariant)),
-                               m_rm->m_manager, SLOT(slotPropertyRemoved(Nepomuk::Resource, Nepomuk::Types::Property, QVariant)) );
-             m_rm->m_watcher->addResource( Nepomuk::Resource::fromResourceUri(m_uri) );
--            m_rm->m_watcher->start();
-+            QMetaObject::invokeMethod(m_rm->m_watcher, "start", Qt::AutoConnection);
-         }
-         else {
--            m_rm->m_watcher->addResource( Nepomuk::Resource::fromResourceUri(m_uri) );
-+            QMetaObject::invokeMethod(m_rm->m_watcher, "addResource", Qt::AutoConnection, Q_ARG(Nepomuk::Resource, Nepomuk::Resource::fromResourceUri(m_uri)) );
-         }
-         m_addedToWatcher = true;
- 
-diff --git a/nepomuk/core/resourcewatcher.h b/nepomuk/core/resourcewatcher.h
-index 06b9622..92b12f5 100644
---- a/nepomuk/core/resourcewatcher.h
-+++ b/nepomuk/core/resourcewatcher.h
-@@ -93,6 +93,7 @@ namespace Nepomuk {
-          */
-         virtual ~ResourceWatcher();
- 
-+    public Q_SLOTS:
-         /**
-          * \brief Add a type to be watched.
-          *
-@@ -204,7 +205,6 @@ namespace Nepomuk {
-          */
-         QList<Types::Property> properties() const;
- 
--    public Q_SLOTS:
-         /**
-          * \brief Start the signalling of changes.
-          *

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.1-sonnet-highlighter.patch b/kde-base/kdelibs/files/kdelibs-4.8.1-sonnet-highlighter.patch
deleted file mode 100644
index 92a1f45..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.8.1-sonnet-highlighter.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-commit 20f73c2150bcd2220fe3604c2ec251b4026a3891
-Author: Montel Laurent <montel@kde.org>
-Date:   Mon Mar 19 12:30:49 2012 +0100
-
-    Fix Bug 295615 - kmail crashes trying to edit subject/message body with
-    
-    some dictionary languages set in identity properties
-    
-    Patch from Matt Whitlock from https://bugs.gentoo.org/show_bug.cgi?id=407709
-    it's right timer can be uninitialize when we change language => it will
-    crash
-    
-    FIXED-IN: 4.8.2
-    BUG: 295615
-
-diff --git a/kdeui/sonnet/highlighter.cpp b/kdeui/sonnet/highlighter.cpp
-index 05f7ed1..b10310a 100644
---- a/kdeui/sonnet/highlighter.cpp
-+++ b/kdeui/sonnet/highlighter.cpp
-@@ -108,6 +108,10 @@ Highlighter::Highlighter(QTextEdit *textEdit,
- 
-     d->dict = new Sonnet::Speller();
-     d->spellCheckerFound = d->dict->isValid();
-+    d->rehighlightRequest = new QTimer(this);
-+    connect( d->rehighlightRequest, SIGNAL(timeout()),
-+             this, SLOT(slotRehighlight()));
-+
-     if(!d->spellCheckerFound)
-         return;
- 
-@@ -121,9 +125,6 @@ Highlighter::Highlighter(QTextEdit *textEdit,
-     for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
-         d->dict->addToSession( *it );
-     }
--    d->rehighlightRequest = new QTimer(this);
--    connect( d->rehighlightRequest, SIGNAL(timeout()),
--             this, SLOT(slotRehighlight()));
-     d->completeRehighlightRequired = true;
-     d->rehighlightRequest->setInterval(0);
-     d->rehighlightRequest->setSingleShot(true);

diff --git a/kde-base/kdelibs/kdelibs-4.8.1-r3.ebuild b/kde-base/kdelibs/kdelibs-4.8.1-r3.ebuild
deleted file mode 100644
index c54d8c0..0000000
--- a/kde-base/kdelibs/kdelibs-4.8.1-r3.ebuild
+++ /dev/null
@@ -1,314 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/kdelibs-4.8.1-r2.ebuild,v 1.2 2012/03/23 21:41:16 johu Exp $
-
-EAPI=4
-
-CPPUNIT_REQUIRED="optional"
-DECLARATIVE_REQUIRED="always"
-OPENGL_REQUIRED="optional"
-KDE_SCM="git"
-inherit kde4-base fdo-mime toolchain-funcs
-
-# The "master" branch is out of date, so use KDE/4.8 per upstream's
-# recommendation.
-EGIT_BRANCH="KDE/4.8"
-
-DESCRIPTION="KDE libraries needed by all KDE programs."
-HOMEPAGE="http://www.kde.org/"
-
-KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
-LICENSE="LGPL-2.1"
-IUSE="3dnow acl alsa altivec +bzip2 debug doc fam +handbook jpeg2k kerberos lzma
-mmx nls openexr +policykit semantic-desktop spell sse sse2 ssl +udev +udisks
-+upower upnp zeroconf"
-
-REQUIRED_USE="
-	udisks? ( udev )
-	upower? ( udev )
-"
-
-# needs the kate regression testsuite from svn
-RESTRICT="test"
-
-COMMONDEPEND="
-	app-crypt/qca:2
-	>=app-misc/strigi-0.7.7
-	app-text/docbook-xml-dtd:4.2
-	app-text/docbook-xsl-stylesheets
-	>=dev-libs/libattica-0.1.90
-	>=dev-libs/libdbusmenu-qt-0.3.2
-	dev-libs/libpcre[unicode]
-	dev-libs/libxml2
-	dev-libs/libxslt
-	media-libs/fontconfig
-	media-libs/freetype:2
-	media-libs/giflib
-	>=media-libs/libpng-1.4
-	>=media-libs/phonon-4.4.3
-	sys-libs/zlib
-	virtual/jpeg
-	>=x11-misc/shared-mime-info-0.60
-	acl? ( virtual/acl )
-	alsa? ( media-libs/alsa-lib )
-	!aqua? (
-		x11-libs/libICE
-		x11-libs/libSM
-		x11-libs/libX11
-		x11-libs/libXau
-		x11-libs/libXcursor
-		x11-libs/libXdmcp
-		x11-libs/libXext
-		x11-libs/libXfixes
-		x11-libs/libXft
-		x11-libs/libXpm
-		x11-libs/libXrender
-		x11-libs/libXScrnSaver
-		x11-libs/libXtst
-		!kernel_SunOS? ( sys-libs/libutempter )
-	)
-	bzip2? ( app-arch/bzip2 )
-	fam? ( virtual/fam )
-	jpeg2k? ( media-libs/jasper )
-	kerberos? ( virtual/krb5 )
-	openexr? (
-		media-libs/openexr
-		media-libs/ilmbase
-	)
-	policykit? ( >=sys-auth/polkit-qt-0.103.0 )
-	semantic-desktop? (
-		>=dev-libs/shared-desktop-ontologies-0.8.1
-		>=dev-libs/soprano-2.7.3[dbus,raptor,redland]
-	)
-	spell? ( app-text/enchant )
-	ssl? ( dev-libs/openssl )
-	udev? ( sys-fs/udev )
-	upnp? ( media-libs/herqq )
-	zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
-"
-DEPEND="${COMMONDEPEND}
-	doc? ( app-doc/doxygen )
-	nls? ( virtual/libintl )
-"
-RDEPEND="${COMMONDEPEND}
-	!x11-libs/qt-phonon
-	>=app-crypt/gnupg-2.0.11
-	app-misc/ca-certificates
-	$(add_kdebase_dep kde-env)
-	!aqua? (
-		x11-apps/iceauth
-		x11-apps/rgb
-		>=x11-misc/xdg-utils-1.0.2-r3
-		udisks? ( sys-fs/udisks:0 )
-		upower? ( sys-power/upower )
-	)
-"
-PDEPEND="
-	$(add_kdebase_dep katepart)
-	|| ( ( $(add_kdebase_dep kfmclient) ) x11-misc/xdg-utils )
-	handbook? ( $(add_kdebase_dep khelpcenter) )
-	policykit? (
-		>=kde-misc/polkit-kde-kcmodules-0.98_pre20101127
-		>=sys-auth/polkit-kde-agent-0.99
-	)
-	semantic-desktop? ( $(add_kdebase_dep nepomuk) )
-"
-
-# Force the upgrade of plasma-workspace to a version that explicitly depends on kactivities
-add_blocker plasma-workspace 4.7.1
-
-# file collision, bug 394991
-add_blocker kcontrol 4.4.50
-
-PATCHES=(
-	"${FILESDIR}/dist/01_gentoo_set_xdg_menu_prefix-1.patch"
-	"${FILESDIR}/dist/02_gentoo_append_xdg_config_dirs-1.patch"
-	"${FILESDIR}/${PN}-4.7.96-mimetypes.patch"
-	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
-	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
-	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"
-	"${FILESDIR}/${PN}-4.8.1-nepomuk-kmail.patch"
-	"${FILESDIR}/${PN}-4.8.1-sonnet-highlighter.patch"
-	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
-)
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]]; then
-		[[ $(gcc-major-version) -lt 4 ]] || \
-				( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 3 ]] ) \
-			&& die "Sorry, but gcc-4.3 and earlier won't work for KDE SC 4.6 (see bug #354837)."
-	fi
-}
-
-src_prepare() {
-	kde4-base_src_prepare
-	use arm && epatch "${FILESDIR}/${PN}-4.6.2-armlinking.patch"
-
-	# Rename applications.menu (needs 01_gentoo_set_xdg_menu_prefix-1.patch to work)
-	sed -e 's|FILES[[:space:]]applications.menu|FILES applications.menu RENAME kde-4-applications.menu|g' \
-		-i kded/CMakeLists.txt || die "Sed on CMakeLists.txt for applications.menu failed."
-
-	if use aqua; then
-		sed -i -e \
-			"s:BUNDLE_INSTALL_DIR \"/Applications:BUNDLE_INSTALL_DIR \"${EPREFIX}/${APP_BUNDLE_DIR}:g" \
-			cmake/modules/FindKDE4Internal.cmake || die "failed to sed FindKDE4Internal.cmake"
-
-		#if [[ ${CHOST} == *-darwin8 ]]; then
-		sed -i -e \
-			"s:set(_add_executable_param MACOSX_BUNDLE):remove(_add_executable_param MACOSX_BUNDLE):g" \
-			cmake/modules/KDE4Macros.cmake || die "failed to sed KDE4Macros.cmake"
-		#fi
-
-		# solid/solid/backends/iokit doesn't properly link, so disable it.
-		sed -e "s|\(APPLE\)|(FALSE)|g" -i solid/solid/CMakeLists.txt \
-			|| die "disabling solid/solid/backends/iokit failed"
-		sed -e "s|m_backend = .*Backends::IOKit.*;|m_backend = 0;|g" -i solid/solid/managerbase.cpp \
-			|| die "disabling solid/solid/backends/iokit failed"
-
-		# There's no fdatasync on OSX and the check fails to detect that.
-		sed -e "/HAVE_FDATASYNC/ d" -i config.h.cmake \
-			|| die "disabling fdatasync failed"
-
-		# Fix nameser include to nameser8_compat
-		sed -e "s|nameser8_compat.h|nameser_compat.h|g" -i kio/misc/kpac/discovery.cpp \
-			|| die "fixing nameser include failed"
-		append-flags -DHAVE_ARPA_NAMESER8_COMPAT_H=1
-
-		# Try to fix kkeyserver_mac
-		epatch "${FILESDIR}"/${PN}-4.3.80-kdeui_util_kkeyserver_mac.patch
-	fi
-
-	if [[ ${CHOST} == *-solaris* ]] ; then
-		epatch "${FILESDIR}/kdelibs-4.3.2-solaris-ksyscoca.patch"
-		# getgrouplist not in solaris libc
-		epatch "${FILESDIR}/kdelibs-4.3.2-solaris-getgrouplist.patch"
-		# solaris has no d_type element in dir_ent
-		epatch "${FILESDIR}/kdelibs-4.3.2-solaris-fileunix.patch"
-	fi
-}
-
-src_configure() {
-	if use zeroconf; then
-		if has_version net-dns/avahi; then
-			mycmakeargs=(-DWITH_Avahi=ON -DWITH_DNSSD=OFF)
-		else
-			die "USE=\"zeroconf\" enabled but net-dns/avahi wasn't found."
-		fi
-	else
-		mycmakeargs=(-DWITH_Avahi=OFF -DWITH_DNSSD=OFF)
-	fi
-	mycmakeargs+=(
-		-DWITH_HSPELL=OFF
-		-DWITH_ASPELL=OFF
-		-DKDE_DEFAULT_HOME=.kde4
-		-DKAUTH_BACKEND=POLKITQT-1
-		-DBUILD_libkactivities=OFF
-		$(cmake-utils_use_build handbook doc)
-		$(cmake-utils_use_has 3dnow X86_3DNOW)
-		$(cmake-utils_use_has altivec PPC_ALTIVEC)
-		$(cmake-utils_use_has mmx X86_MMX)
-		$(cmake-utils_use_has sse X86_SSE)
-		$(cmake-utils_use_has sse2 X86_SSE2)
-		$(cmake-utils_use_with acl)
-		$(cmake-utils_use_with alsa)
-		$(cmake-utils_use_with bzip2 BZip2)
-		$(cmake-utils_use_with fam)
-		$(cmake-utils_use_with jpeg2k Jasper)
-		$(cmake-utils_use_with kerberos GSSAPI)
-		$(cmake-utils_use_with lzma LibLZMA)
-		$(cmake-utils_use_with nls Libintl)
-		$(cmake-utils_use_with openexr OpenEXR)
-		$(cmake-utils_use_with opengl OpenGL)
-		$(cmake-utils_use_with policykit PolkitQt-1)
-		$(cmake-utils_use_with semantic-desktop Soprano)
-		$(cmake-utils_use_with semantic-desktop SharedDesktopOntologies)
-		$(cmake-utils_use_with spell ENCHANT)
-		$(cmake-utils_use_with ssl OpenSSL)
-		$(cmake-utils_use_with udev UDev)
-		$(cmake-utils_use_with upnp HUpnp)
-	)
-	kde4-base_src_configure
-}
-
-src_compile() {
-	kde4-base_src_compile
-
-	# The building of apidox is not managed anymore by the build system
-	if use doc; then
-		einfo "Building API documentation"
-		cd "${S}"/doc/api/
-		./doxygen.sh "${S}" || die "APIDOX generation failed"
-	fi
-}
-
-src_install() {
-	kde4-base_src_install
-
-	# use system certificates
-	rm -f "${ED}"/usr/share/apps/kssl/ca-bundle.crt || die
-	dosym /etc/ssl/certs/ca-certificates.crt /usr/share/apps/kssl/ca-bundle.crt
-
-	if use doc; then
-		einfo "Installing API documentation. This could take a bit of time."
-		cd "${S}"/doc/api/
-		docinto /HTML/en/kdelibs-apidox
-		dohtml -r ${P}-apidocs/*
-	fi
-
-	if use aqua; then
-		einfo "fixing ${PN} plugins"
-
-		local _PV=${PV:0:3}.0
-		local _dir=${EPREFIX}/usr/$(get_libdir)/kde4/plugins/script
-
-		install_name_tool -id \
-			"${_dir}/libkrossqtsplugin.${_PV}.dylib" \
-			"${D}/${_dir}/libkrossqtsplugin.${_PV}.dylib" \
-			|| die "failed fixing libkrossqtsplugin.${_PV}.dylib"
-
-		einfo "fixing ${PN} cmake detection files"
-		#sed -i -e \
-		#	"s:if (HAVE_XKB):if (HAVE_XKB AND NOT APPLE):g" \
-		echo -e "set(XKB_FOUND FALSE)\nset(HAVE_XKB FALSE)" > \
-			"${ED}"/usr/share/apps/cmake/modules/FindXKB.cmake \
-			|| die "failed fixing FindXKB.cmake"
-	fi
-
-	einfo Installing environment file.
-	# Since 44qt4 is sourced earlier QT_PLUGIN_PATH is defined.
-	echo "COLON_SEPARATED=QT_PLUGIN_PATH" > "${T}/77kde"
-	echo "QT_PLUGIN_PATH=${EPREFIX}/usr/$(get_libdir)/kde4/plugins" >> "${T}/77kde"
-	doenvd "${T}/77kde"
-}
-
-pkg_postinst() {
-	fdo-mime_mime_database_update
-
-	if use zeroconf; then
-		echo
-		elog "To make zeroconf support available in KDE make sure that the 'mdnsd' daemon"
-		elog "is running."
-		echo
-		einfo "If you also want to use zeroconf for hostname resolution, emerge sys-auth/nss-mdns"
-		einfo "and enable multicast dns lookups by editing the 'hosts:' line in /etc/nsswitch.conf"
-		einfo "to include 'mdns', e.g.:"
-		einfo "	hosts: files mdns dns"
-		echo
-	fi
-
-	elog "Your homedir is set to \${HOME}/.kde4"
-	echo
-
-	kde4-base_pkg_postinst
-}
-
-pkg_prerm() {
-	# Remove ksycoca4 global database
-	rm -f "${EROOT}${PREFIX}"/share/kde4/services/ksycoca4
-}
-
-pkg_postrm() {
-	fdo-mime_mime_database_update
-
-	kde4-base_pkg_postrm
-}



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-04-12 19:38 Michael Palimaka
  0 siblings, 0 replies; 38+ messages in thread
From: Michael Palimaka @ 2012-04-12 19:38 UTC (permalink / raw
  To: gentoo-commits

commit:     de19116cce5dafbf2ca6582d303e1a2f8d3204cd
Author:     Michael Palimaka <kensington <AT> astralcloak <DOT> net>
AuthorDate: Thu Apr 12 19:30:58 2012 +0000
Commit:     Michael Palimaka <kensington <AT> astralcloak <DOT> net>
CommitDate: Thu Apr 12 19:30:58 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=de19116c

[kde-base/kdelibs] Sync warning text between live ebuilds and remove unused patches that are updated / fixed upstream.

(Portage version: 2.1.10.56/git/Linux x86_64, unsigned Manifest commit)

---
 .../kdelibs/files/kdelibs-4.5.90-mimetypes.patch   |   51 --------------------
 .../kdelibs/files/kdelibs-4.7.4-xinelib12x.patch   |   32 ------------
 kde-base/kdelibs/kdelibs-9999.ebuild               |    2 +-
 3 files changed, 1 insertions(+), 84 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.5.90-mimetypes.patch b/kde-base/kdelibs/files/kdelibs-4.5.90-mimetypes.patch
deleted file mode 100644
index 5088123..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.5.90-mimetypes.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-diff -ur kdelibs-4.5.90.orig/mimetypes/kde.xml kdelibs-4.5.90/mimetypes/kde.xml
---- kdelibs-4.5.90.orig/mimetypes/kde.xml	2010-12-22 10:56:01.000000000 +0100
-+++ kdelibs-4.5.90/mimetypes/kde.xml	2010-12-23 11:31:53.000000000 +0100
-@@ -178,34 +178,6 @@
-     <glob pattern="*.abc"/>
-   </mime-type>
- 
--  <!-- all/ fake mime types -->
--  <mime-type type="all/all">
--    <comment>all files and folders</comment>
--  </mime-type>
--  <mime-type type="all/allfiles">
--    <comment>all files</comment>
--  </mime-type>
--
--  <!-- uri/ fake mime types -->
--  <mime-type type="uri/mms">
--    <comment>mms: URIs</comment>
--  </mime-type>
--  <mime-type type="uri/mmst">
--    <comment>mmst: URIs</comment>
--  </mime-type>
--  <mime-type type="uri/mmsu">
--    <comment>mmsu: URIs</comment>
--  </mime-type>
--  <mime-type type="uri/pnm">
--    <comment>pnm: URIs</comment>
--  </mime-type>
--  <mime-type type="uri/rtspt">
--    <comment>rtspt: URIs</comment>
--  </mime-type>
--  <mime-type type="uri/rtspu">
--    <comment>rtspu: URIs</comment>
--  </mime-type>
--
-   <mime-type type="application/vnd.kde.fontspackage">
-     <sub-class-of type="application/zip"/>
-     <comment>fonts package</comment>
-@@ -346,12 +318,6 @@
-     <glob pattern="*.icq"/>
-   </mime-type>
- 
--  <mime-type type="interface/x-winamp-skin">
--    <sub-class-of type="application/zip"/>
--    <comment>compressed Winamp skin</comment>
--    <glob pattern="*.wsz"/>
--  </mime-type>
--
-   <mime-type type="video/x-ms-wmp"> <!-- fdo #19671, rejected because "not a file type, only a plugin type" -->
-     <comment>Microsoft Media Format</comment>
-     <sub-class-of type="video/x-ms-wmv"/>
\ No newline at end of file

diff --git a/kde-base/kdelibs/files/kdelibs-4.7.4-xinelib12x.patch b/kde-base/kdelibs/files/kdelibs-4.7.4-xinelib12x.patch
deleted file mode 100644
index bdcd39a..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.7.4-xinelib12x.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From de5da56d10a47ff8fdf55c0818e9e776dcfa01f9 Mon Sep 17 00:00:00 2001
-From: Johannes Huber <johu@gentoo.org>
-Date: Thu, 5 Jan 2012 10:06:05 +0100
-Subject: [PATCH] Fix FindXine.cmake module with >=xine-lib-1.2.
-
----
- cmake/modules/FindXine.cmake |    4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/cmake/modules/FindXine.cmake b/cmake/modules/FindXine.cmake
-index 37c58c6..d71969a 100644
---- a/cmake/modules/FindXine.cmake
-+++ b/cmake/modules/FindXine.cmake
-@@ -36,13 +36,13 @@ find_library(XINE_LIBRARY NAMES xine
-   ${PC_LIBXINE_LIBRARY_DIRS}
-  )
- 
--find_program(XINECONFIG_EXECUTABLE NAMES xine-config 
-+find_program(XINECONFIG_EXECUTABLE NAMES pkg-config
-    HINTS
-    ${PC_LIBXINE_PREFIX}/bin
- )
- 
- if (XINE_INCLUDE_DIR AND XINE_LIBRARY AND XINECONFIG_EXECUTABLE)
--   exec_program(${XINECONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE XINE_VERSION ERROR_QUIET)
-+   exec_program(${XINECONFIG_EXECUTABLE} ARGS --modversion libxine RETURN_VALUE _return_VALUE OUTPUT_VARIABLE XINE_VERSION ERROR_QUIET)
-    if("${XINE_VERSION}" VERSION_GREATER "1.1.0")   #if (... VERSION_GREATER) is new since cmake 2.6.2
-       set(XINE_VERSION_OK TRUE)
-       string(REGEX REPLACE "[0-9]\\.[0-9]\\." "" XINE_BUGFIX_VERSION ${XINE_VERSION})
--- 
-1.7.8.2
-

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index 595e4d9..a958f20 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -191,7 +191,7 @@ src_configure() {
 		if has_version net-dns/avahi; then
 			mycmakeargs=(-DWITH_Avahi=ON -DWITH_DNSSD=OFF)
 		else
-			die "USE=\"zeroconf\" but net-dns/avahi wasn't found."
+			die "USE=\"zeroconf\" enabled but net-dns/avahi wasn't found."
 		fi
 	else
 		mycmakeargs=(-DWITH_Avahi=OFF -DWITH_DNSSD=OFF)



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-05-31 21:38 Marc Schiffbauer
  0 siblings, 0 replies; 38+ messages in thread
From: Marc Schiffbauer @ 2012-05-31 21:38 UTC (permalink / raw
  To: gentoo-commits

commit:     14d7d9cb2219f64c7a715d8da0bbe48a32c9dad8
Author:     Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Thu May 31 21:37:17 2012 +0000
Commit:     Marc Schiffbauer <marc <AT> schiffbauer <DOT> net>
CommitDate: Thu May 31 21:37:17 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=14d7d9cb

[kde-base/kdelibs] added kdelibs-4.8.4-bytecode.patch

	Updated patch is required for kdelibs >4.8.3

---
 .../kdelibs/files/kdelibs-4.8.4-bytecode.patch     |   78 ++++++++++++++++++++
 kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild        |    2 +-
 kde-base/kdelibs/kdelibs-9999.ebuild               |    2 +-
 3 files changed, 80 insertions(+), 2 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.4-bytecode.patch b/kde-base/kdelibs/files/kdelibs-4.8.4-bytecode.patch
new file mode 100644
index 0000000..6920121
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.8.4-bytecode.patch
@@ -0,0 +1,78 @@
+--- cmake/modules/PythonMacros.cmake.orig	2012-05-31 23:28:04.035788719 +0200
++++ cmake/modules/PythonMacros.cmake	2012-05-31 23:30:13.997840354 +0200
+@@ -24,39 +24,41 @@
+   INSTALL(FILES ${SOURCE_FILE} DESTINATION ${DESINATION_DIR})
+ 
+   # Byte compile and install the .pyc file.        
+-  GET_FILENAME_COMPONENT(_absfilename ${SOURCE_FILE} ABSOLUTE)
+-  GET_FILENAME_COMPONENT(_filename ${SOURCE_FILE} NAME)
+-  GET_FILENAME_COMPONENT(_filenamebase ${SOURCE_FILE} NAME_WE)
+-  GET_FILENAME_COMPONENT(_basepath ${SOURCE_FILE} PATH)
+-
+-  if(WIN32)
+-    string(REGEX REPLACE ".:/" "/" _basepath "${_basepath}")
+-  endif(WIN32)
+-
+-  SET(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename})
+-  SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc)
+-
+-  FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath})
+-
+-  SET(_message "-DMESSAGE=Byte-compiling ${_bin_py}")
+-
+-  GET_FILENAME_COMPONENT(_abs_bin_py ${_bin_py} ABSOLUTE)
+-  IF(_abs_bin_py STREQUAL ${_absfilename})    # Don't copy the file onto itself.
+-    ADD_CUSTOM_COMMAND(
+-      TARGET compile_python_files
+-      COMMAND ${CMAKE_COMMAND} -E echo ${_message}
+-      COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py}
+-      DEPENDS ${_absfilename}
+-    )
+-  ELSE(_abs_bin_py STREQUAL ${_absfilename})
+-    ADD_CUSTOM_COMMAND(
+-      TARGET compile_python_files
+-      COMMAND ${CMAKE_COMMAND} -E echo ${_message} 
+-      COMMAND ${CMAKE_COMMAND} -E copy ${_absfilename} ${_bin_py}
+-      COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py}
+-      DEPENDS ${_absfilename}
+-    )
+-  ENDIF(_abs_bin_py STREQUAL ${_absfilename})
++  IF("$ENV{PYTHONDONTWRITEBYTECODE}" STREQUAL "")
++    GET_FILENAME_COMPONENT(_absfilename ${SOURCE_FILE} ABSOLUTE)
++    GET_FILENAME_COMPONENT(_filename ${SOURCE_FILE} NAME)
++    GET_FILENAME_COMPONENT(_filenamebase ${SOURCE_FILE} NAME_WE)
++    GET_FILENAME_COMPONENT(_basepath ${SOURCE_FILE} PATH)
++
++    if(WIN32)
++      string(REGEX REPLACE ".:/" "/" _basepath "${_basepath}")
++    endif(WIN32)
++
++    SET(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename})
++    SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc)
++
++    FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath})
++
++    SET(_message "-DMESSAGE=Byte-compiling ${_bin_py}")
++
++    GET_FILENAME_COMPONENT(_abs_bin_py ${_bin_py} ABSOLUTE)
++    IF(_abs_bin_py STREQUAL ${_absfilename})    # Don't copy the file onto itself.
++      ADD_CUSTOM_COMMAND(
++        TARGET compile_python_files
++        COMMAND ${CMAKE_COMMAND} -E echo ${_message}
++        COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py}
++        DEPENDS ${_absfilename}
++      )
++    ELSE(_abs_bin_py STREQUAL ${_absfilename})
++      ADD_CUSTOM_COMMAND(
++        TARGET compile_python_files
++        COMMAND ${CMAKE_COMMAND} -E echo ${_message} 
++        COMMAND ${CMAKE_COMMAND} -E copy ${_absfilename} ${_bin_py}
++        COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py}
++        DEPENDS ${_absfilename}
++      )
++    ENDIF(_abs_bin_py STREQUAL ${_absfilename})
+ 
+-  INSTALL(FILES ${_bin_pyc} DESTINATION ${DESINATION_DIR})
++    INSTALL(FILES ${_bin_pyc} DESTINATION ${DESINATION_DIR})
++  ENDIF("$ENV{PYTHONDONTWRITEBYTECODE}" STREQUAL "")
+ ENDMACRO(PYTHON_INSTALL)

diff --git a/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild b/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
index a5e2f24..b4d5a7b 100644
--- a/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
@@ -126,7 +126,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.7.96-mimetypes.patch"
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
-	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"
+	"${FILESDIR}/${PN}-4.8.4-bytecode.patch"
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.8.2-calculator_key.patch"
 )

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index e744a19..0aeaeee 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -126,7 +126,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.7.96-mimetypes.patch"
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
-	"${FILESDIR}/${PN}-4.6.3-bytecode.patch"
+	"${FILESDIR}/${PN}-4.8.4-bytecode.patch"
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.8.2-calculator_key.patch"
 )



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-06-19 20:48 Andreas Hüttel
  0 siblings, 0 replies; 38+ messages in thread
From: Andreas Hüttel @ 2012-06-19 20:48 UTC (permalink / raw
  To: gentoo-commits

commit:     f9355df5a827292d8176e4c95aa33233248f2762
Author:     Andreas K. Huettel (dilfridge) <mail <AT> akhuettel <DOT> de>
AuthorDate: Tue Jun 19 20:48:58 2012 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jun 19 20:48:58 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=f9355df5

[kde-base/kdelibs] Migrate kde-4.9 to udisks:2; patches from Fedora

http://pkgs.fedoraproject.org/gitweb/?p=kdelibs.git;a=tree;h=5d79b99d8d2bb73a25bfe43de023fb58df755335;hb=5d79b99d8d2bb73a25bfe43de023fb58df755335

(Portage version: 2.2.0_alpha110/git/Linux x86_64, RepoMan options: --force, unsigned Manifest commit)

---
 .../files/kdelibs-4.8.90-udisks2_backend.patch     | 3524 ++++++++++++++++++++
 .../files/kdelibs-4.8.90-udisks2_post.patch        |  113 +
 .../files/kdelibs-4.8.90-udisks2_prep.patch        |   65 +
 kde-base/kdelibs/kdelibs-4.8.90.ebuild             |    3 +-
 kde-base/kdelibs/kdelibs-9999.ebuild               |    3 +-
 5 files changed, 3706 insertions(+), 2 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2_backend.patch b/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2_backend.patch
new file mode 100644
index 0000000..74ec3c2
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2_backend.patch
@@ -0,0 +1,3524 @@
+diff --git a/tier1/solid/src/solid/backends/udisks2/dbus/manager.cpp b/tier1/solid/src/solid/backends/udisks2/dbus/manager.cpp
+new file mode 100644
+index 0000000..7ea4aa8
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/dbus/manager.cpp
+@@ -0,0 +1,26 @@
++/*
++ * This file was generated by qdbusxml2cpp version 0.7
++ * Command line was: qdbusxml2cpp -p manager manager.xml
++ *
++ * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
++ *
++ * This is an auto-generated file.
++ * This file may have been hand-edited. Look for HAND-EDIT comments
++ * before re-generating it.
++ */
++
++#include "manager.h"
++
++/*
++ * Implementation of interface class OrgFreedesktopDBusObjectManagerInterface
++ */
++
++OrgFreedesktopDBusObjectManagerInterface::OrgFreedesktopDBusObjectManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
++    : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
++{
++}
++
++OrgFreedesktopDBusObjectManagerInterface::~OrgFreedesktopDBusObjectManagerInterface()
++{
++}
++
+diff --git a/tier1/solid/src/solid/backends/udisks2/dbus/manager.h b/tier1/solid/src/solid/backends/udisks2/dbus/manager.h
+new file mode 100644
+index 0000000..11f0be8
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/dbus/manager.h
+@@ -0,0 +1,59 @@
++/*
++ * This file was generated by qdbusxml2cpp version 0.7
++ * Command line was: qdbusxml2cpp -p manager manager.xml
++ *
++ * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
++ *
++ * This is an auto-generated file.
++ * Do not edit! All changes made to it will be lost.
++ */
++
++#ifndef MANAGER_H_1329493525
++#define MANAGER_H_1329493525
++
++#include <QtCore/QObject>
++#include <QtCore/QByteArray>
++#include <QtCore/QList>
++#include <QtCore/QMap>
++#include <QtCore/QString>
++#include <QtCore/QStringList>
++#include <QtCore/QVariant>
++#include <QtDBus/QtDBus>
++
++#include "../udisks2.h"
++
++/*
++ * Proxy class for interface org.freedesktop.DBus.ObjectManager
++ */
++class OrgFreedesktopDBusObjectManagerInterface: public QDBusAbstractInterface
++{
++    Q_OBJECT
++public:
++    static inline const char *staticInterfaceName()
++    { return "org.freedesktop.DBus.ObjectManager"; }
++
++public:
++    OrgFreedesktopDBusObjectManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
++
++    ~OrgFreedesktopDBusObjectManagerInterface();
++
++public Q_SLOTS: // METHODS
++    inline QDBusPendingReply<DBUSManagerStruct> GetManagedObjects()
++    {
++        QList<QVariant> argumentList;
++        return asyncCallWithArgumentList(QLatin1String("GetManagedObjects"), argumentList);
++    }
++
++Q_SIGNALS: // SIGNALS
++    void InterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties);
++    void InterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces);
++};
++
++namespace org {
++  namespace freedesktop {
++    namespace DBus {
++      typedef ::OrgFreedesktopDBusObjectManagerInterface ObjectManager;
++    }
++  }
++}
++#endif
+diff --git a/tier1/solid/src/solid/backends/udisks2/dbus/manager.xml b/tier1/solid/src/solid/backends/udisks2/dbus/manager.xml
+new file mode 100644
+index 0000000..8f25cb6
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/dbus/manager.xml
+@@ -0,0 +1,21 @@
++<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
++                      "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
++<node>
++  <interface name="org.freedesktop.DBus.ObjectManager">
++    <method name="GetManagedObjects">
++      <arg type="a{oa{sa{sv}}}" name="object_paths_interfaces_and_properties" direction="out">
++        <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="DBUSManagerStruct"/>
++      </arg>
++    </method>
++    <signal name="InterfacesAdded">
++      <arg type="o" name="object_path"/>
++      <arg type="a{sa{sv}}" name="interfaces_and_properties">
++        <annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="QVariantMapMap"/>
++      </arg>
++    </signal>
++    <signal name="InterfacesRemoved">
++      <arg type="o" name="object_path"/>
++      <arg type="as" name="interfaces"/>
++    </signal>
++  </interface>
++</node>
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisks2.h b/tier1/solid/src/solid/backends/udisks2/udisks2.h
+new file mode 100644
+index 0000000..25a1dc0
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisks2.h
+@@ -0,0 +1,77 @@
++/*
++    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef SOLID_BACKENDS_UDISKS2_H
++#define SOLID_BACKENDS_UDISKS2_H
++
++#include <QMetaType>
++#include <QtDBus>
++#include <QVariant>
++#include <QMap>
++#include <QList>
++
++typedef QList<QByteArray> QByteArrayList;
++Q_DECLARE_METATYPE(QByteArrayList)
++
++typedef QMap<QString,QVariantMap> QVariantMapMap;
++Q_DECLARE_METATYPE(QVariantMapMap)
++
++typedef QMap<QDBusObjectPath, QVariantMapMap> DBUSManagerStruct;
++Q_DECLARE_METATYPE(DBUSManagerStruct)
++
++/* UDisks2 */
++#define UD2_DBUS_SERVICE                 "org.freedesktop.UDisks2"
++#define UD2_DBUS_PATH                    "/org/freedesktop/UDisks2"
++#define UD2_UDI_DISKS_PREFIX             "/org/freedesktop/UDisks2"
++#define UD2_DBUS_PATH_MANAGER            "/org/freedesktop/UDisks2/Manager"
++#define UD2_DBUS_PATH_DRIVES             "/org/freedesktop/UDisks2/drives/"
++#define UD2_DBUS_PATH_JOBS               "/org/freedesktop/UDisks2/jobs/"
++#define DBUS_INTERFACE_PROPS             "org.freedesktop.DBus.Properties"
++#define DBUS_INTERFACE_INTROSPECT        "org.freedesktop.DBus.Introspectable"
++#define DBUS_INTERFACE_MANAGER           "org.freedesktop.DBus.ObjectManager"
++#define UD2_DBUS_INTERFACE_BLOCK         "org.freedesktop.UDisks2.Block"
++#define UD2_DBUS_INTERFACE_DRIVE         "org.freedesktop.UDisks2.Drive"
++#define UD2_DBUS_INTERFACE_PARTITION     "org.freedesktop.UDisks2.Partition"
++#define UD2_DBUS_INTERFACE_PARTITIONTABLE   "org.freedesktop.UDisks2.PartitionTable"
++#define UD2_DBUS_INTERFACE_FILESYSTEM    "org.freedesktop.UDisks2.Filesystem"
++#define UD2_DBUS_INTERFACE_ENCRYPTED     "org.freedesktop.UDisks2.Encrypted"
++#define UD2_DBUS_INTERFACE_SWAP          "org.freedesktop.UDisks2.Swapspace"
++
++/* errors */
++#define UD2_ERROR_UNAUTHORIZED            "org.freedesktop.PolicyKit.Error.NotAuthorized"
++#define UD2_ERROR_BUSY                    "org.freedesktop.UDisks2.Error.DeviceBusy"
++#define UD2_ERROR_FAILED                  "org.freedesktop.UDisks2.Error.Failed"
++#define UD2_ERROR_CANCELED                "org.freedesktop.UDisks2.Error.Cancelled"
++#define UD2_ERROR_INVALID_OPTION          "org.freedesktop.UDisks2.Error.OptionNotPermitted"
++#define UD2_ERROR_MISSING_DRIVER          "org.freedesktop.UDisks2.Error.NotSupported"
++
++#define UD2_ERROR_ALREADY_MOUNTED         "org.freedesktop.UDisks2.Error.AlreadyMounted"
++#define UD2_ERROR_NOT_MOUNTED             "org.freedesktop.UDisks2.Error.NotMounted"
++#define UD2_ERROR_MOUNTED_BY_OTHER_USER   "org.freedesktop.UDisks2.Error.MountedByOtherUser"
++#define UD2_ERROR_ALREADY_UNMOUNTING      "org.freedesktop.UDisks2.Error.AlreadyUnmounting"
++#define UD2_ERROR_TIMED_OUT               "org.freedesktop.UDisks2.Error.Timedout"
++#define UD2_ERROR_WOULD_WAKEUP            "org.freedesktop.UDisks2.Error.WouldWakeup"
++#define UD2_ERROR_ALREADY_CANCELLED       "org.freedesktop.UDisks2.Error.AlreadyCancelled"
++
++#define UD2_ERROR_NOT_AUTHORIZED          "org.freedesktop.UDisks2.Error.NotAuthorized"
++#define UD2_ERROR_NOT_AUTHORIZED_CAN_OBTAIN  "org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain"
++#define UD2_ERROR_NOT_AUTHORIZED_DISMISSED   "org.freedesktop.UDisks2.Error.NotAuthorizedDismissed"
++
++#endif // SOLID_BACKENDS_UDISKS2_H
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksblock.cpp b/tier1/solid/src/solid/backends/udisks2/udisksblock.cpp
+new file mode 100644
+index 0000000..c27b1c4
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksblock.cpp
+@@ -0,0 +1,84 @@
++/*
++    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include <linux/kdev_t.h>
++
++#include <QFile>
++#include <QtDBus/QDBusConnection>
++#include <QtDBus/QDBusPendingReply>
++
++#include "udisksblock.h"
++#include "dbus/manager.h"
++
++using namespace Solid::Backends::UDisks2;
++
++Block::Block(Device *dev)
++    : DeviceInterface(dev)
++{
++    m_devNum = m_device->prop("DeviceNumber").toULongLong();
++    m_devFile = QFile::decodeName(m_device->prop("Device").toByteArray());
++
++    // we have a drive (non-block device for udisks), so let's find the corresponding (real) block device
++    if (m_devNum == 0 || m_devFile.isEmpty()) {
++        org::freedesktop::DBus::ObjectManager manager(UD2_DBUS_SERVICE, UD2_DBUS_PATH, QDBusConnection::systemBus());
++        QDBusPendingReply<DBUSManagerStruct> reply = manager.GetManagedObjects();
++        reply.waitForFinished();
++        if (!reply.isError()) {  // enum devices
++            Q_FOREACH(const QDBusObjectPath &path, reply.value().keys()) {
++                const QString udi = path.path();
++
++                if (udi == UD2_DBUS_PATH_MANAGER || udi == UD2_UDI_DISKS_PREFIX || udi.startsWith(UD2_DBUS_PATH_JOBS))
++                    continue;
++
++                Device device(udi);
++                if (device.drivePath() == dev->udi()) {
++                    m_devNum = device.prop("DeviceNumber").toULongLong();
++                    m_devFile = QFile::decodeName(device.prop("Device").toByteArray());
++                    break;
++                }
++            }
++        }
++        else  // show error
++        {
++            qWarning() << "Failed enumerating UDisks2 objects:" << reply.error().name() << "\n" << reply.error().message();
++        }
++    }
++
++    qDebug() << "devnum:" << m_devNum << "dev file:" << m_devFile;
++}
++
++Block::~Block()
++{
++}
++
++QString Block::device() const
++{
++    return m_devFile;
++}
++
++int Block::deviceMinor() const
++{
++    return MINOR(m_devNum);
++}
++
++int Block::deviceMajor() const
++{
++    return MAJOR(m_devNum);
++}
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksblock.h b/tier1/solid/src/solid/backends/udisks2/udisksblock.h
+new file mode 100644
+index 0000000..19cb70a
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksblock.h
+@@ -0,0 +1,56 @@
++/*
++    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2BLOCK_H
++#define UDISKS2BLOCK_H
++
++#include <solid/ifaces/block.h>
++#include "udisksdeviceinterface.h"
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class Block: public DeviceInterface, virtual public Solid::Ifaces::Block
++{
++
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::Block)
++
++public:
++    Block(Device *dev);
++    virtual ~Block();
++
++    virtual QString device() const;
++    virtual int deviceMinor() const;
++    virtual int deviceMajor() const;
++private:
++    dev_t m_devNum;
++    QString m_devFile;
++};
++
++}
++}
++}
++
++#endif // UDISKS2BLOCK_H
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksdevice.cpp b/tier1/solid/src/solid/backends/udisks2/udisksdevice.cpp
+new file mode 100644
+index 0000000..fb74fa2
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksdevice.cpp
+@@ -0,0 +1,910 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksdevice.h"
++#include "udisksblock.h"
++#include "udisksdeviceinterface.h"
++#include "udisksstoragevolume.h"
++#include "udisksopticaldisc.h"
++#include "udisksopticaldrive.h"
++#include "udisksstorageaccess.h"
++#include "udisksgenericinterface.h"
++
++#include <solid/genericinterface.h>
++#include <solid/deviceinterface.h>
++#include <solid/device.h>
++
++#include <QtCore/QDebug>
++
++#include <QtDBus/QDBusMessage>
++#include <QtDBus/QDBusMetaType>
++#include <QtDBus/QDBusPendingReply>
++#include <QtDBus/QDBusArgument>
++
++#include <QtXml/QDomDocument>
++
++using namespace Solid::Backends::UDisks2;
++
++// Adapted from KLocale as Solid needs to be Qt-only
++static QString formatByteSize(double size)
++{
++    // Per IEC 60027-2
++
++    // Binary prefixes
++    //Tebi-byte             TiB             2^40    1,099,511,627,776 bytes
++    //Gibi-byte             GiB             2^30    1,073,741,824 bytes
++    //Mebi-byte             MiB             2^20    1,048,576 bytes
++    //Kibi-byte             KiB             2^10    1,024 bytes
++
++    QString s;
++    // Gibi-byte
++    if ( size >= 1073741824.0 )
++    {
++        size /= 1073741824.0;
++        if ( size > 1024 ) // Tebi-byte
++            s = QObject::tr("%1 TiB").arg(QLocale().toString(size / 1024.0, 'f', 1));
++        else
++            s = QObject::tr("%1 GiB").arg(QLocale().toString(size, 'f', 1));
++    }
++    // Mebi-byte
++    else if ( size >= 1048576.0 )
++    {
++        size /= 1048576.0;
++        s = QObject::tr("%1 MiB").arg(QLocale().toString(size, 'f', 1));
++    }
++    // Kibi-byte
++    else if ( size >= 1024.0 )
++    {
++        size /= 1024.0;
++        s = QObject::tr("%1 KiB").arg(QLocale().toString(size, 'f', 1));
++    }
++    // Just byte
++    else if ( size > 0 )
++    {
++        s = QObject::tr("%1 B").arg(QLocale().toString(size, 'f', 1));
++    }
++    // Nothing
++    else
++    {
++        s = QObject::tr("0 B");
++    }
++    return s;
++}
++
++Device::Device(const QString &udi)
++    : Solid::Ifaces::Device()
++    , m_udi(udi)
++{
++    m_device = new QDBusInterface(UD2_DBUS_SERVICE, m_udi,
++                                  QString(), // no interface, we aggregate them
++                                  QDBusConnection::systemBus());
++
++    if (m_device->isValid()) {
++        QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, m_udi, DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
++                                             SLOT(slotPropertiesChanged(QString,QVariantMap,QStringList)));
++
++        QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, UD2_DBUS_PATH, DBUS_INTERFACE_MANAGER, "InterfacesAdded",
++                                             this, SLOT(slotInterfacesAdded(QDBusObjectPath,QVariantMapMap)));
++        QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, UD2_DBUS_PATH, DBUS_INTERFACE_MANAGER, "InterfacesRemoved",
++                                             this, SLOT(slotInterfacesRemoved(QDBusObjectPath,QStringList)));
++
++        initInterfaces();
++    }
++}
++
++Device::~Device()
++{
++    delete m_device;
++}
++
++QObject* Device::createDeviceInterface(const Solid::DeviceInterface::Type& type)
++{
++    if (!queryDeviceInterface(type)) {
++        return 0;
++    }
++
++    DeviceInterface *iface = 0;
++    switch (type)
++    {
++    case Solid::DeviceInterface::GenericInterface:
++        iface = new GenericInterface(this);
++        break;
++    case Solid::DeviceInterface::Block:
++        iface = new Block(this);
++        break;
++    case Solid::DeviceInterface::StorageAccess:
++        iface = new StorageAccess(this);
++        break;
++    case Solid::DeviceInterface::StorageDrive:
++        iface = new StorageDrive(this);
++        break;
++    case Solid::DeviceInterface::OpticalDrive:
++        iface = new OpticalDrive(this);
++        break;
++    case Solid::DeviceInterface::StorageVolume:
++        iface = new StorageVolume(this);
++        break;
++    case Solid::DeviceInterface::OpticalDisc:
++        iface = new OpticalDisc(this);
++        break;
++    default:
++        break;
++    }
++    return iface;
++}
++
++bool Device::queryDeviceInterface(const Solid::DeviceInterface::Type& type) const
++{
++    switch (type) {
++    case Solid::DeviceInterface::GenericInterface:
++        return true;
++    case Solid::DeviceInterface::Block:
++        return isBlock();
++    case Solid::DeviceInterface::StorageVolume:
++        return isStorageVolume();
++    case Solid::DeviceInterface::StorageAccess:
++        return isStorageAccess();
++    case Solid::DeviceInterface::StorageDrive:
++        return isDrive();
++    case Solid::DeviceInterface::OpticalDrive:
++        return isOpticalDrive();
++    case Solid::DeviceInterface::OpticalDisc:
++        return isOpticalDisc();
++    default:
++        return false;
++    }
++}
++
++QStringList Device::emblems() const
++{
++    QStringList res;
++
++    if (queryDeviceInterface(Solid::DeviceInterface::StorageAccess))
++    {
++        const UDisks2::StorageAccess accessIface(const_cast<Device *>(this));
++        if (accessIface.isAccessible())
++        {
++            if (isEncryptedContainer())
++                res << "emblem-encrypted-unlocked";
++            else
++                res << "emblem-mounted";
++        }
++        else
++        {
++            if (isEncryptedContainer())
++                res << "emblem-encrypted-locked";
++            else
++                res << "emblem-unmounted";
++        }
++    }
++
++    return res;
++}
++
++QString Device::description() const
++{
++    const QString hintName = prop("HintName").toString();
++    if (!hintName.isEmpty())
++        return hintName;
++
++    if (queryDeviceInterface(Solid::DeviceInterface::StorageDrive))
++        return storageDescription();
++    else if (queryDeviceInterface(Solid::DeviceInterface::StorageVolume))
++        return volumeDescription();
++    else
++        return product();
++}
++
++QString Device::storageDescription() const
++{
++    QString description;
++    const UDisks2::StorageDrive storageDrive(const_cast<Device*>(this));
++    Solid::StorageDrive::DriveType drive_type = storageDrive.driveType();
++    bool drive_is_hotpluggable = storageDrive.isHotpluggable();
++
++    if (drive_type == Solid::StorageDrive::CdromDrive)
++    {
++        const UDisks2::OpticalDrive opticalDrive(const_cast<Device*>(this));
++        Solid::OpticalDrive::MediumTypes mediumTypes = opticalDrive.supportedMedia();
++        QString first;
++        QString second;
++
++        first = QObject::tr("CD-ROM", "First item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Cdr)
++            first = QObject::tr("CD-R", "First item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Cdrw)
++            first = QObject::tr("CD-RW", "First item of %1%2 Drive sentence");
++
++        if (mediumTypes & Solid::OpticalDrive::Dvd)
++            second = QObject::tr("/DVD-ROM", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Dvdplusr)
++            second = QObject::tr("/DVD+R", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Dvdplusrw)
++            second = QObject::tr("/DVD+RW", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Dvdr)
++            second = QObject::tr("/DVD-R", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Dvdrw)
++            second = QObject::tr("/DVD-RW", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Dvdram)
++            second = QObject::tr("/DVD-RAM", "Second item of %1%2 Drive sentence");
++        if ((mediumTypes & Solid::OpticalDrive::Dvdr) && (mediumTypes & Solid::OpticalDrive::Dvdplusr))
++        {
++            if(mediumTypes & Solid::OpticalDrive::Dvdplusdl)
++                second = QObject::trUtf8("/DVD±R DL", "Second item of %1%2 Drive sentence");
++            else
++                second = QObject::trUtf8("/DVD±R", "Second item of %1%2 Drive sentence");
++        }
++        if ((mediumTypes & Solid::OpticalDrive::Dvdrw) && (mediumTypes & Solid::OpticalDrive::Dvdplusrw))
++        {
++            if((mediumTypes & Solid::OpticalDrive::Dvdplusdl) || (mediumTypes & Solid::OpticalDrive::Dvdplusdlrw))
++                second = QObject::trUtf8("/DVD±RW DL", "Second item of %1%2 Drive sentence");
++            else
++                second = QObject::trUtf8("/DVD±RW", "Second item of %1%2 Drive sentence");
++        }
++        if (mediumTypes & Solid::OpticalDrive::Bd)
++            second = QObject::tr("/BD-ROM", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Bdr)
++            second = QObject::tr("/BD-R", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Bdre)
++            second = QObject::tr("/BD-RE", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::HdDvd)
++            second = QObject::tr("/HD DVD-ROM", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::HdDvdr)
++            second = QObject::tr("/HD DVD-R", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::HdDvdrw)
++            second = QObject::tr("/HD DVD-RW", "Second item of %1%2 Drive sentence");
++
++        if (drive_is_hotpluggable)
++            description = QObject::tr("External %1%2 Drive", "%1 is CD-ROM/CD-R/etc; %2 is '/DVD-ROM'/'/DVD-R'/etc (with leading slash)").arg(first).arg(second);
++        else
++            description = QObject::tr("%1%2 Drive", "%1 is CD-ROM/CD-R/etc; %2 is '/DVD-ROM'/'/DVD-R'/etc (with leading slash)").arg(first).arg(second);
++
++        return description;
++    }
++
++    if (drive_type == Solid::StorageDrive::Floppy)
++    {
++        if (drive_is_hotpluggable)
++            description = QObject::tr("External Floppy Drive");
++        else
++            description = QObject::tr("Floppy Drive");
++
++        return description;
++    }
++
++    bool drive_is_removable = storageDrive.isRemovable();
++
++    if (drive_type == Solid::StorageDrive::HardDisk && !drive_is_removable)
++    {
++        QString size_str = formatByteSize(storageDrive.size());
++        if (!size_str.isEmpty())
++        {
++            if (drive_is_hotpluggable)
++                description = QObject::tr("%1 External Hard Drive", "%1 is the size").arg(size_str);
++            else
++                description = QObject::tr("%1 Hard Drive", "%1 is the size").arg(size_str);
++        } else {
++            if (drive_is_hotpluggable)
++                description = QObject::tr("External Hard Drive");
++            else
++                description = QObject::tr("Hard Drive");
++        }
++
++        return description;
++    }
++
++    QString vendormodel_str;
++    QString model = product();
++    QString vendor_str = vendor();
++
++    if (vendor_str.isEmpty())
++    {
++        if (!model.isEmpty())
++            vendormodel_str = model;
++    }
++    else
++    {
++        if (model.isEmpty())
++            vendormodel_str = vendor_str;
++        else
++        {
++            if (model.startsWith(vendor_str))
++            {
++                // e.g. vendor is "Nokia" and model is "Nokia N950" we do not want "Nokia Nokia N950" as description
++                vendormodel_str = model;
++            }
++            else
++            {
++                vendormodel_str = QObject::tr("%1 %2", "%1 is the vendor, %2 is the model of the device").arg(vendor_str).arg(model);
++            }
++        }
++    }
++
++    if (vendormodel_str.isEmpty())
++        description = QObject::tr("Drive");
++    else
++        description = vendormodel_str;
++
++    return description;
++}
++
++QString Device::volumeDescription() const
++{
++    QString description;
++    const UDisks2::StorageVolume storageVolume(const_cast<Device*>(this));
++    QString volume_label = prop("IdLabel").toString();
++    if (volume_label.isEmpty())
++        volume_label = prop("Name").toString();
++    if (!volume_label.isEmpty())
++        return volume_label;
++
++    UDisks2::Device storageDevice(drivePath());
++    const UDisks2::StorageDrive storageDrive(&storageDevice);
++    Solid::StorageDrive::DriveType drive_type = storageDrive.driveType();
++
++    // Handle media in optical drives
++    if (drive_type == Solid::StorageDrive::CdromDrive)
++    {
++        const UDisks2::OpticalDisc disc(const_cast<Device*>(this));
++        switch (disc.discType())
++        {
++            case Solid::OpticalDisc::UnknownDiscType:
++            case Solid::OpticalDisc::CdRom:
++                description = QObject::tr("CD-ROM");
++                break;
++
++            case Solid::OpticalDisc::CdRecordable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank CD-R");
++                else
++                    description = QObject::tr("CD-R");
++                break;
++
++            case Solid::OpticalDisc::CdRewritable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank CD-RW");
++                else
++                    description = QObject::tr("CD-RW");
++                break;
++
++            case Solid::OpticalDisc::DvdRom:
++                description = QObject::tr("DVD-ROM");
++                break;
++
++            case Solid::OpticalDisc::DvdRam:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD-RAM");
++                else
++                    description = QObject::tr("DVD-RAM");
++                break;
++
++            case Solid::OpticalDisc::DvdRecordable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD-R");
++                else
++                    description = QObject::tr("DVD-R");
++                break;
++
++            case Solid::OpticalDisc::DvdPlusRecordableDuallayer:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD+R Dual-Layer");
++                else
++                    description = QObject::tr("DVD+R Dual-Layer");
++                break;
++
++            case Solid::OpticalDisc::DvdRewritable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD-RW");
++                else
++                    description = QObject::tr("DVD-RW");
++                break;
++
++            case Solid::OpticalDisc::DvdPlusRecordable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD+R");
++                else
++                    description = QObject::tr("DVD+R");
++                break;
++
++            case Solid::OpticalDisc::DvdPlusRewritable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD+RW");
++                else
++                    description = QObject::tr("DVD+RW");
++                break;
++
++            case Solid::OpticalDisc::DvdPlusRewritableDuallayer:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD+RW Dual-Layer");
++                else
++                    description = QObject::tr("DVD+RW Dual-Layer");
++                break;
++
++            case Solid::OpticalDisc::BluRayRom:
++                description = QObject::tr("BD-ROM");
++                break;
++
++            case Solid::OpticalDisc::BluRayRecordable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank BD-R");
++                else
++                    description = QObject::tr("BD-R");
++                break;
++
++            case Solid::OpticalDisc::BluRayRewritable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank BD-RE");
++                else
++                    description = QObject::tr("BD-RE");
++                break;
++
++            case Solid::OpticalDisc::HdDvdRom:
++                description = QObject::tr("HD DVD-ROM");
++                break;
++
++            case Solid::OpticalDisc::HdDvdRecordable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank HD DVD-R");
++                else
++                    description = QObject::tr("HD DVD-R");
++                break;
++
++            case Solid::OpticalDisc::HdDvdRewritable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank HD DVD-RW");
++                else
++                    description = QObject::tr("HD DVD-RW");
++                break;
++            }
++
++        // Special case for pure audio disc
++        if (disc.availableContent() == Solid::OpticalDisc::Audio)
++            description = QObject::tr("Audio CD");
++
++        return description;
++    }
++
++    const bool drive_is_removable = storageDrive.isRemovable();
++    const bool drive_is_hotpluggable = storageDrive.isHotpluggable();
++
++    QString size_str = formatByteSize(storageVolume.size());
++    if (isEncryptedContainer())
++    {
++        if (!size_str.isEmpty())
++            description = QObject::tr("%1 Encrypted Container", "%1 is the size").arg(size_str);
++        else
++            description = QObject::tr("Encrypted Container");
++    }
++    else if (drive_type == Solid::StorageDrive::HardDisk && !drive_is_removable)
++    {
++        if (!size_str.isEmpty())
++        {
++            if (drive_is_hotpluggable)
++                description = QObject::tr("%1 External Hard Drive", "%1 is the size").arg(size_str);
++            else
++                description = QObject::tr("%1 Hard Drive", "%1 is the size").arg(size_str);
++        }
++        else
++        {
++            if (drive_is_hotpluggable)
++                description = QObject::tr("External Hard Drive");
++            else
++                description = QObject::tr("Hard Drive");
++        }
++    }
++    else
++    {
++        if (drive_is_removable)
++            description = QObject::tr("%1 Removable Media", "%1 is the size").arg(size_str);
++        else
++            description = QObject::tr("%1 Media", "%1 is the size").arg(size_str);
++    }
++
++    return description;
++}
++
++QString Device::icon() const
++{
++    QString iconName = prop( "HintIconName" ).toString();
++
++    if ( !iconName.isEmpty() )
++    {
++        return iconName;
++    }
++    else if (isDrive()) {
++        const bool isRemovable = prop("Removable").toBool();
++        const QString conn = prop("ConnectionBus").toString();
++
++        if (isOpticalDrive())
++            return "drive-optical";
++        else if (isRemovable && !isOpticalDisc()) {
++            if (conn == "usb")
++                return "drive-removable-media-usb";
++            else
++                return "drive-removable-media";
++        }
++    }
++    else if (isBlock()) {
++        Device drive(drivePath());
++
++        // handle media
++        const QString media = drive.prop("Media").toString();
++
++        if ( !media.isEmpty() )
++        {
++            if ( isOpticalDisc() )    // optical stuff
++            {
++                bool isWritable = drive.prop("OpticalBlank").toBool();
++
++                const UDisks2::OpticalDisc disc(const_cast<Device*>(this));
++                Solid::OpticalDisc::ContentTypes availContent = disc.availableContent();
++
++                if (availContent & Solid::OpticalDisc::VideoDvd) // Video DVD
++                    return "media-optical-dvd-video";
++                else if ((availContent & Solid::OpticalDisc::VideoCd) || (availContent & Solid::OpticalDisc::SuperVideoCd)) // Video CD
++                    return "media-optical-video";
++                else if ((availContent & Solid::OpticalDisc::Data) && (availContent & Solid::OpticalDisc::Audio)) // Mixed CD
++                    return "media-optical-mixed-cd";
++                else if (availContent & Solid::OpticalDisc::Audio) // Audio CD
++                    return "media-optical-audio";
++                else if (availContent & Solid::OpticalDisc::Data) // Data CD
++                    return "media-optical-data";
++                else if ( isWritable )
++                    return "media-optical-recordable";
++                else
++                {
++                    if ( media.startsWith( "optical_dvd" ) || media.startsWith( "optical_hddvd" ) ) // DVD
++                        return "media-optical-dvd";
++                    else if ( media.startsWith( "optical_bd" ) ) // BluRay
++                        return "media-optical-blu-ray";
++                }
++
++                // fallback for every other optical disc
++                return "media-optical";
++            }
++
++            if ( media == "flash_ms" ) // Flash & Co.
++                return "media-flash-memory-stick";
++            else if ( media == "flash_sd" || media == "flash_sdhc" || media == "flash_sdxc" || media == "flash_mmc" )
++                return "media-flash-sd-mmc";
++            else if ( media == "flash_sm" )
++                return "media-flash-smart-media";
++            else if ( media == "thumb" )
++                return "drive-removable-media-usb-pendrive";
++            else if ( media.startsWith( "flash" ) )
++                return "media-flash";
++            else if ( media == "floppy" ) // the good ol' floppy
++                return "media-floppy";
++        }
++
++        if (drive.prop("ConnectionBus").toString() == "sdio")  // hack for SD cards connected thru sdio bus
++            return "media-flash-sd-mmc";
++
++        return drive.icon();
++    }
++
++    return "drive-harddisk";    // general fallback
++}
++
++QString Device::product() const
++{
++    QString product = prop("Model").toString();
++
++    if (!isDrive()) {
++        QString label = prop("IdLabel").toString();
++        if (!label.isEmpty()) {
++            product = label;
++        }
++    }
++
++    return product;
++}
++
++QString Device::vendor() const
++{
++    return prop("Vendor").toString();
++}
++
++QString Device::udi() const
++{
++    return m_udi;
++}
++
++QString Device::parentUdi() const
++{
++    QString parent;
++
++    if (isEncryptedContainer())
++        parent = prop("CryptoBackingDevice").value<QDBusObjectPath>().path();
++    else if (propertyExists("Drive"))  // block
++        parent = prop("Drive").value<QDBusObjectPath>().path();
++    else if (propertyExists("Table"))  // partition
++        parent = prop("Table").value<QDBusObjectPath>().path();
++    else if (parent.isEmpty() || parent=="/") {
++        parent = UD2_UDI_DISKS_PREFIX;
++    }
++    return parent;
++}
++
++void Device::checkCache(const QString &key) const
++{
++    if (m_cache.isEmpty()) // recreate the cache
++        allProperties();
++
++    if (m_cache.contains(key))
++        return;
++
++    QVariant reply = m_device->property(key.toUtf8());
++
++    if (reply.isValid()) {
++        m_cache.insert(key, reply);
++    } else {
++        //qDebug() << "got invalid reply for cache:" << key;
++        //m_cache.insert(key, QVariant());
++    }
++}
++
++QString Device::introspect() const
++{
++    QDBusMessage call = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_udi,
++                                                       DBUS_INTERFACE_INTROSPECT, "Introspect");
++    QDBusPendingReply<QString> reply = QDBusConnection::systemBus().asyncCall(call);
++    reply.waitForFinished();
++
++    if (reply.isValid())
++        return reply.value();
++    else {
++        return QString();
++    }
++}
++
++QVariant Device::prop(const QString &key) const
++{
++    checkCache(key);
++    return m_cache.value(key);
++}
++
++bool Device::propertyExists(const QString &key) const
++{
++    checkCache(key);
++    return m_cache.contains(key);
++}
++
++QVariantMap Device::allProperties() const
++{
++    Q_FOREACH (const QString & iface, m_interfaces) {
++        if (iface.startsWith("org.freedesktop.DBus"))
++            continue;
++        QDBusMessage call = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_udi, DBUS_INTERFACE_PROPS, "GetAll");
++        call << iface;
++        QDBusPendingReply<QVariantMap> reply = QDBusConnection::systemBus().asyncCall(call);
++        reply.waitForFinished();
++
++        if (reply.isValid())
++            m_cache.unite(reply.value());
++        else
++            qWarning() << "Error getting props:" << reply.error().name() << reply.error().message();
++        //qDebug() << "After iface" << iface << ", cache now contains" << m_cache.size() << "items";
++    }
++
++    return m_cache;
++}
++
++bool Device::hasInterface(const QString &name) const
++{
++    return m_interfaces.contains(name);
++}
++
++QStringList Device::interfaces() const
++{
++    return m_interfaces;
++}
++
++void Device::initInterfaces()
++{
++    m_interfaces.clear();
++    const QString xmlData = introspect();
++    QDomDocument dom;
++    dom.setContent(xmlData);
++    QDomNodeList ifaceNodeList = dom.elementsByTagName("interface");
++    for (int i = 0; i < ifaceNodeList.count(); i++) {
++        QDomElement ifaceElem = ifaceNodeList.item(i).toElement();
++        if (!ifaceElem.isNull())
++            m_interfaces.append(ifaceElem.attribute("name"));
++    }
++    //qDebug() << "Device" << m_udi << "has interfaces:" << m_interfaces;
++}
++
++void Device::slotPropertiesChanged(const QString &ifaceName, const QVariantMap &changedProps, const QStringList &invalidatedProps)
++{
++    //Q_UNUSED(ifaceName);
++
++    qDebug() << m_udi << "'s interface" << ifaceName << "changed props:";
++
++    QMap<QString, int> changeMap;
++
++    Q_FOREACH(const QString & key, invalidatedProps) {
++        m_cache.remove(key);
++        changeMap.insert(key, Solid::GenericInterface::PropertyRemoved);
++        qDebug() << "\t invalidated:" << key;
++    }
++
++    QMapIterator<QString, QVariant> i(changedProps);
++    while (i.hasNext()) {
++        i.next();
++        const QString key = i.key();
++        m_cache.insert(key, i.value());  // replace the value
++        changeMap.insert(key, Solid::GenericInterface::PropertyModified);
++        qDebug() << "\t modified:" << key << ":" << m_cache.value(key);
++    }
++
++    Q_EMIT propertyChanged(changeMap);
++    Q_EMIT changed();
++}
++
++void Device::slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties)
++{
++    if (object_path.path() == m_udi) {
++        m_interfaces.append(interfaces_and_properties.keys());
++    }
++}
++
++void Device::slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces)
++{
++    if (object_path.path() == m_udi) {
++        Q_FOREACH(const QString & iface, interfaces) {
++            m_interfaces.removeAll(iface);
++        }
++    }
++}
++
++
++QString Device::errorToString(const QString & error) const
++{
++    if (error == UD2_ERROR_UNAUTHORIZED || error == UD2_ERROR_NOT_AUTHORIZED)
++        return QObject::tr("You are not authorized to perform this operation");
++    else if (error == UD2_ERROR_BUSY)
++        return QObject::tr("The device is currently busy");
++    else if (error == UD2_ERROR_FAILED)
++        return QObject::tr("The requested operation has failed");
++    else if (error == UD2_ERROR_CANCELED)
++        return QObject::tr("The requested operation has been canceled");
++    else if (error == UD2_ERROR_INVALID_OPTION)
++        return QObject::tr("An invalid or malformed option has been given");
++    else if (error == UD2_ERROR_MISSING_DRIVER)
++        return QObject::tr("The kernel driver for this filesystem type is not available");
++    else if (error == UD2_ERROR_ALREADY_MOUNTED)
++        return QObject::tr("The device is already mounted");
++    else if (error == UD2_ERROR_NOT_MOUNTED)
++        return QObject::tr("The device is not mounted");
++    else if (error == UD2_ERROR_MOUNTED_BY_OTHER_USER)
++        return QObject::tr("The device is mounted by another user");
++    else if (error == UD2_ERROR_ALREADY_UNMOUNTING)
++        return QObject::tr("The device is already unmounting");
++    else if (error == UD2_ERROR_TIMED_OUT)
++        return QObject::tr("The operation timed out");
++    else if (error == UD2_ERROR_WOULD_WAKEUP)
++        return QObject::tr("The operation would wake up a disk that is in a deep-sleep state");
++    else if (error == UD2_ERROR_ALREADY_CANCELLED)
++        return QObject::tr("The operation has already been canceled");
++    else
++        return QObject::tr("An unspecified error has occurred");
++}
++
++Solid::ErrorType Device::errorToSolidError(const QString & error) const
++{
++    if (error == UD2_ERROR_BUSY)
++        return Solid::DeviceBusy;
++    else if (error == UD2_ERROR_FAILED)
++        return Solid::OperationFailed;
++    else if (error == UD2_ERROR_CANCELED)
++        return Solid::UserCanceled;
++    else if (error == UD2_ERROR_INVALID_OPTION)
++        return Solid::InvalidOption;
++    else if (error == UD2_ERROR_MISSING_DRIVER)
++        return Solid::MissingDriver;
++    else
++        return Solid::UnauthorizedOperation;
++}
++
++bool Device::isBlock() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_BLOCK);
++}
++
++bool Device::isPartition() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_PARTITION);
++}
++
++bool Device::isPartitionTable() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_PARTITIONTABLE);
++}
++
++bool Device::isStorageVolume() const
++{
++    return isPartition() || isPartitionTable() || isStorageAccess() || isOpticalDisc();
++}
++
++bool Device::isStorageAccess() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_FILESYSTEM) || isEncryptedContainer();
++}
++
++bool Device::isDrive() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_DRIVE);
++}
++
++bool Device::isOpticalDrive() const
++{
++    return isDrive() && !prop("MediaCompatibility").toStringList().filter("optical_").isEmpty();
++}
++
++bool Device::isOpticalDisc() const
++{
++    const QString drv = drivePath();
++    if (drv.isEmpty() || drv == "/")
++        return false;
++
++    Device drive(drv);
++    return drive.prop("Optical").toBool();
++}
++
++bool Device::mightBeOpticalDisc() const
++{
++    const QString drv = drivePath();
++    if (drv.isEmpty() || drv == "/")
++        return false;
++
++    Device drive(drv);
++    return drive.isOpticalDrive();
++}
++
++bool Device::isMounted() const
++{
++    return propertyExists("MountPoints") && !qdbus_cast<QByteArrayList>(prop("MountPoints")).isEmpty();
++}
++
++bool Device::isEncryptedContainer() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_ENCRYPTED);
++}
++
++bool Device::isEncryptedCleartext() const
++{
++    const QString holderDevice = prop("CryptoBackingDevice").toString();
++    if (holderDevice.isEmpty() || holderDevice == "/")
++        return false;
++    else
++        return true;
++}
++
++bool Device::isSwap() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_SWAP);
++}
++
++QString Device::drivePath() const
++{
++    return prop("Drive").value<QDBusObjectPath>().path();
++}
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksdevice.h b/tier1/solid/src/solid/backends/udisks2/udisksdevice.h
+new file mode 100644
+index 0000000..cf8e2f5
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksdevice.h
+@@ -0,0 +1,112 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2DEVICE_H
++#define UDISKS2DEVICE_H
++
++#include "udisks2.h"
++
++#include <ifaces/device.h>
++#include <solid/deviceinterface.h>
++#include <solid/solidnamespace.h>
++
++#include <QtDBus/QDBusInterface>
++#include <QtDBus/QDBusObjectPath>
++#include <QtCore/QStringList>
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class Device: public Solid::Ifaces::Device
++{
++    Q_OBJECT
++public:
++    Device(const QString &udi);
++    virtual ~Device();
++
++    virtual QObject* createDeviceInterface(const Solid::DeviceInterface::Type& type);
++    virtual bool queryDeviceInterface(const Solid::DeviceInterface::Type& type) const;
++    virtual QString description() const;
++    virtual QStringList emblems() const;
++    virtual QString icon() const;
++    virtual QString product() const;
++    virtual QString vendor() const;
++    virtual QString udi() const;
++    virtual QString parentUdi() const;
++
++    QVariant prop(const QString &key) const;
++    bool propertyExists(const QString &key) const;
++    QVariantMap allProperties() const;
++
++    bool hasInterface(const QString & name) const;
++    QStringList interfaces() const;
++
++    QString errorToString(const QString & error) const;
++    Solid::ErrorType errorToSolidError(const QString & error) const;
++
++    bool isBlock() const;
++    bool isPartition() const;
++    bool isPartitionTable() const;
++    bool isStorageVolume() const;
++    bool isStorageAccess() const;
++    bool isDrive() const;
++    bool isOpticalDrive() const;
++    bool isOpticalDisc() const;
++    bool mightBeOpticalDisc() const;
++    bool isMounted() const;
++    bool isEncryptedContainer() const;
++    bool isEncryptedCleartext() const;
++    bool isSwap() const;
++
++    QString drivePath() const;
++
++Q_SIGNALS:
++    void changed();
++    void propertyChanged(const QMap<QString,int> &changes);
++
++private Q_SLOTS:
++    void slotPropertiesChanged(const QString & ifaceName, const QVariantMap & changedProps, const QStringList & invalidatedProps);
++    void slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties);
++    void slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces);
++
++private:
++    QString storageDescription() const;
++    QString volumeDescription() const;
++    mutable QDBusInterface *m_device;
++    QString m_udi;
++    mutable QVariantMap m_cache;
++
++    void initInterfaces();
++    QStringList m_interfaces;
++
++    void checkCache(const QString &key) const;
++    QString introspect() const;
++};
++
++}
++}
++}
++
++#endif // UDISKS2DEVICE_H
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksdeviceinterface.cpp b/tier1/solid/src/solid/backends/udisks2/udisksdeviceinterface.cpp
+new file mode 100644
+index 0000000..9fa60e5
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksdeviceinterface.cpp
+@@ -0,0 +1,33 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksdeviceinterface.h"
++
++using namespace Solid::Backends::UDisks2;
++
++DeviceInterface::DeviceInterface(Device *device)
++    : QObject(device), m_device(device)
++{
++
++}
++
++DeviceInterface::~DeviceInterface()
++{
++}
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksdeviceinterface.h b/tier1/solid/src/solid/backends/udisks2/udisksdeviceinterface.h
+new file mode 100644
+index 0000000..43a1b6f
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksdeviceinterface.h
+@@ -0,0 +1,148 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2DEVICEINTERFACE_H
++#define UDISKS2DEVICEINTERFACE_H
++
++#include <ifaces/deviceinterface.h>
++#include "udisksdevice.h"
++
++#include <QtCore/QObject>
++#include <QtCore/QStringList>
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class DeviceInterface : public QObject, virtual public Solid::Ifaces::DeviceInterface
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::DeviceInterface)
++public:
++    DeviceInterface(Device *device);
++    virtual ~DeviceInterface();
++
++protected:
++    Device *m_device;
++
++public:
++    inline static QStringList toStringList(Solid::DeviceInterface::Type type)
++    {
++        QStringList list;
++
++        switch(type)
++        {
++        case Solid::DeviceInterface::GenericInterface:
++            list << "generic";
++            break;
++        case Solid::DeviceInterface::Processor:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::Block:
++            list << "block";
++            break;
++        case Solid::DeviceInterface::StorageAccess:
++            list << "volume";
++            break;
++        case Solid::DeviceInterface::StorageDrive:
++            list << "storage";
++            break;
++        case Solid::DeviceInterface::OpticalDrive:
++            list << "storage.cdrom";
++            break;
++        case Solid::DeviceInterface::StorageVolume:
++            list << "volume";
++            break;
++        case Solid::DeviceInterface::OpticalDisc:
++            list << "volume.disc";
++            break;
++        case Solid::DeviceInterface::Camera:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::PortableMediaPlayer:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::NetworkInterface:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::AcAdapter:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::Battery:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::Button:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::AudioInterface:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::DvbInterface:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::Video:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::SerialInterface:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::InternetGateway:
++            break;
++        case Solid::DeviceInterface::SmartCardReader:
++            // Doesn't exist with UDisks
++        case Solid::DeviceInterface::NetworkShare:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::Unknown:
++            break;
++        case Solid::DeviceInterface::Last:
++            break;
++        }
++
++        return list;
++    }
++
++    inline static Solid::DeviceInterface::Type fromString(const QString &capability)
++    {
++        if (capability == "generic")
++            return Solid::DeviceInterface::GenericInterface;
++        else if (capability == "block")
++            return Solid::DeviceInterface::Block;
++        else if (capability == "storage")
++            return Solid::DeviceInterface::StorageDrive;
++        else if (capability == "storage.cdrom")
++            return Solid::DeviceInterface::OpticalDrive;
++        else if (capability == "volume")
++            return Solid::DeviceInterface::StorageVolume;
++        else if (capability == "volume.disc")
++            return Solid::DeviceInterface::OpticalDisc;
++        else
++            return Solid::DeviceInterface::Unknown;
++    }
++};
++
++}
++}
++}
++
++#endif // UDISKS2DEVICEINTERFACE_H
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksgenericinterface.cpp b/tier1/solid/src/solid/backends/udisks2/udisksgenericinterface.cpp
+new file mode 100644
+index 0000000..2d8cea2
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksgenericinterface.cpp
+@@ -0,0 +1,53 @@
++/*
++    Copyright 2009 Pino Toscano <pino@kde.org>
++    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksgenericinterface.h"
++
++#include "udisksdevice.h"
++
++using namespace Solid::Backends::UDisks2;
++
++GenericInterface::GenericInterface(Device *device)
++    : DeviceInterface(device)
++{
++    connect(device, SIGNAL(propertyChanged(QMap<QString,int>)),
++            this, SIGNAL(propertyChanged(QMap<QString,int>)));
++}
++
++GenericInterface::~GenericInterface()
++{
++}
++
++QVariant GenericInterface::property(const QString &key) const
++{
++    return m_device->prop(key);
++}
++
++QVariantMap GenericInterface::allProperties() const
++{
++    return m_device->allProperties();
++}
++
++bool GenericInterface::propertyExists(const QString &key) const
++{
++    return m_device->propertyExists(key);
++}
++
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksgenericinterface.h b/tier1/solid/src/solid/backends/udisks2/udisksgenericinterface.h
+new file mode 100644
+index 0000000..d225f32
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksgenericinterface.h
+@@ -0,0 +1,57 @@
++/*
++    Copyright 2009 Pino Toscano <pino@kde.org>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef SOLID_BACKENDS_UDISKS2_GENERICINTERFACE_H
++#define SOLID_BACKENDS_UDISKS2_GENERICINTERFACE_H
++
++#include <solid/ifaces/genericinterface.h>
++#include <solid/genericinterface.h>
++#include "udisksdeviceinterface.h"
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++class Device;
++
++class GenericInterface : public DeviceInterface, virtual public Solid::Ifaces::GenericInterface
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::GenericInterface)
++
++public:
++    GenericInterface(Device *device);
++    virtual ~GenericInterface();
++
++    virtual QVariant property(const QString &key) const;
++    virtual QVariantMap allProperties() const;
++    virtual bool propertyExists(const QString &key) const;
++
++Q_SIGNALS:
++    void propertyChanged(const QMap<QString, int> &changes);
++    void conditionRaised(const QString &condition, const QString &reason);
++};
++}
++}
++}
++
++#endif // SOLID_BACKENDS_UDISKS2_GENERICINTERFACE_H
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksmanager.cpp b/tier1/solid/src/solid/backends/udisks2/udisksmanager.cpp
+new file mode 100644
+index 0000000..9af8ee2
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksmanager.cpp
+@@ -0,0 +1,227 @@
++/*
++    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksmanager.h"
++
++#include <QtCore/QDebug>
++#include <QtDBus>
++
++#include "../shared/rootdevice.h"
++
++using namespace Solid::Backends::UDisks2;
++using namespace Solid::Backends::Shared;
++
++Manager::Manager(QObject *parent)
++    : Solid::Ifaces::DeviceManager(parent),
++      m_manager(UD2_DBUS_SERVICE,
++                UD2_DBUS_PATH,
++                QDBusConnection::systemBus())
++{
++    m_supportedInterfaces
++            << Solid::DeviceInterface::GenericInterface
++            << Solid::DeviceInterface::Block
++            << Solid::DeviceInterface::StorageAccess
++            << Solid::DeviceInterface::StorageDrive
++            << Solid::DeviceInterface::OpticalDrive
++            << Solid::DeviceInterface::OpticalDisc
++            << Solid::DeviceInterface::StorageVolume;
++
++    qDBusRegisterMetaType<QList<QDBusObjectPath> >();
++    qDBusRegisterMetaType<QVariantMap>();
++    qDBusRegisterMetaType<QVariantMapMap>();
++    qDBusRegisterMetaType<QByteArrayList>();
++    qDBusRegisterMetaType<DBUSManagerStruct>();
++
++    bool serviceFound = m_manager.isValid();
++    if (!serviceFound) {
++        // find out whether it will be activated automatically
++        QDBusMessage message = QDBusMessage::createMethodCall("org.freedesktop.DBus",
++                                                              "/org/freedesktop/DBus",
++                                                              "org.freedesktop.DBus",
++                                                              "ListActivatableNames");
++
++        QDBusReply<QStringList> reply = QDBusConnection::systemBus().call(message);
++        if (reply.isValid() && reply.value().contains(UD2_DBUS_SERVICE)) {
++            QDBusConnection::systemBus().interface()->startService(UD2_DBUS_SERVICE);
++            serviceFound = true;
++        }
++    }
++
++    if (serviceFound) {
++        connect(&m_manager, SIGNAL(InterfacesAdded(QDBusObjectPath, QVariantMapMap)),
++                this, SLOT(slotInterfacesAdded(QDBusObjectPath,QVariantMapMap)));
++        connect(&m_manager, SIGNAL(InterfacesRemoved(QDBusObjectPath,QStringList)),
++                this, SLOT(slotInterfacesRemoved(QDBusObjectPath,QStringList)));
++    }
++}
++
++Manager::~Manager()
++{
++}
++
++QObject* Manager::createDevice(const QString& udi)
++{
++    if (udi==udiPrefix()) {
++        RootDevice *root = new RootDevice(udi);
++
++        root->setProduct(tr("Storage"));
++        root->setDescription(tr("Storage devices"));
++        root->setIcon("server-database"); // Obviously wasn't meant for that, but maps nicely in oxygen icon set :-p
++
++        return root;
++    } else if (deviceCache().contains(udi)) {
++        return new Device(udi);
++    } else {
++        return 0;
++    }
++}
++
++QStringList Manager::devicesFromQuery(const QString& parentUdi, Solid::DeviceInterface::Type type)
++{
++    QStringList result;
++
++    if (!parentUdi.isEmpty())
++    {
++        Q_FOREACH (const QString &udi, deviceCache())
++        {
++            Device device(udi);
++            if (device.queryDeviceInterface(type) && device.parentUdi() == parentUdi)
++                result << udi;
++        }
++
++        return result;
++    }
++    else if (type != Solid::DeviceInterface::Unknown)
++    {
++        Q_FOREACH (const QString &udi, deviceCache())
++        {
++            Device device(udi);
++            if (device.queryDeviceInterface(type))
++                result << udi;
++        }
++
++        return result;
++    }
++
++    return deviceCache();
++}
++
++QStringList Manager::allDevices()
++{
++    m_deviceCache.clear();
++
++    QDBusPendingReply<DBUSManagerStruct> reply = m_manager.GetManagedObjects();
++    reply.waitForFinished();
++    if (!reply.isError()) {  // enum devices
++        m_deviceCache << udiPrefix();
++
++        Q_FOREACH(const QDBusObjectPath &path, reply.value().keys()) {
++            const QString udi = path.path();
++            qDebug() << "Adding device" << udi;
++
++            if (udi == UD2_DBUS_PATH_MANAGER || udi == UD2_UDI_DISKS_PREFIX || udi.startsWith(UD2_DBUS_PATH_JOBS))
++                continue;
++
++            Device device(udi);
++            if (device.mightBeOpticalDisc()) {
++                QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, udi, DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
++                                                     SLOT(slotMediaChanged(QDBusMessage)));
++                if (!device.isOpticalDisc())  // skip empty CD disc
++                    continue;
++            }
++
++            m_deviceCache.append(udi);
++        }
++    }
++    else  // show error
++    {
++        qWarning() << "Failed enumerating UDisks2 objects:" << reply.error().name() << "\n" << reply.error().message();
++    }
++
++    return m_deviceCache;
++}
++
++
++QSet< Solid::DeviceInterface::Type > Manager::supportedInterfaces() const
++{
++    return m_supportedInterfaces;
++}
++
++QString Manager::udiPrefix() const
++{
++    return UD2_UDI_DISKS_PREFIX;
++}
++
++void Manager::slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties)
++{
++    const QString udi = object_path.path();
++
++    qDebug() << udi << "has new interfaces:" << interfaces_and_properties.keys();
++
++    // new device, we don't know it yet
++    if (!m_deviceCache.contains(udi)) {
++        m_deviceCache.append(udi);
++        Q_EMIT deviceAdded(udi);
++    }
++}
++
++void Manager::slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces)
++{
++    const QString udi = object_path.path();
++
++    qDebug() << udi << "lost interfaces:" << interfaces;
++
++    Device device(udi);
++
++    if (!udi.isEmpty() && (interfaces.isEmpty() || device.interfaces().isEmpty() || device.interfaces().contains(UD2_DBUS_INTERFACE_FILESYSTEM))) {
++        Q_EMIT deviceRemoved(udi);
++        m_deviceCache.removeAll(udi);
++    }
++}
++
++void Manager::slotMediaChanged(const QDBusMessage & msg)
++{
++    const QVariantMap properties = qdbus_cast<QVariantMap>(msg.arguments().at(1));
++
++    if (!properties.contains("Size"))  // react only on Size changes
++        return;
++
++    const QString udi = msg.path();
++    qulonglong size = properties.value("Size").toULongLong();
++    qDebug() << "MEDIA CHANGED in" << udi << "; size is:" << size;
++
++    if (!m_deviceCache.contains(udi) && size > 0) { // we don't know the optdisc, got inserted
++        m_deviceCache.append(udi);
++        Q_EMIT deviceAdded(udi);
++    }
++
++    if (m_deviceCache.contains(udi) && size == 0) {  // we know the optdisc, got removed
++        Q_EMIT deviceRemoved(udi);
++        m_deviceCache.removeAll(udi);
++    }
++}
++
++const QStringList & Manager::deviceCache()
++{
++    if (m_deviceCache.isEmpty())
++        allDevices();
++
++    return m_deviceCache;
++}
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksmanager.h b/tier1/solid/src/solid/backends/udisks2/udisksmanager.h
+new file mode 100644
+index 0000000..7cf0a72
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksmanager.h
+@@ -0,0 +1,69 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2MANAGER_H
++#define UDISKS2MANAGER_H
++
++#include "udisks2.h"
++#include "udisksdevice.h"
++#include "dbus/manager.h"
++
++#include "solid/ifaces/devicemanager.h"
++
++#include <QtDBus/QDBusInterface>
++#include <QtCore/QSet>
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class Manager: public Solid::Ifaces::DeviceManager
++{
++    Q_OBJECT
++
++public:
++    Manager(QObject *parent);
++    virtual QObject* createDevice(const QString& udi);
++    virtual QStringList devicesFromQuery(const QString& parentUdi, Solid::DeviceInterface::Type type);
++    virtual QStringList allDevices();
++    virtual QSet< Solid::DeviceInterface::Type > supportedInterfaces() const;
++    virtual QString udiPrefix() const;
++    virtual ~Manager();
++
++private Q_SLOTS:
++    void slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties);
++    void slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces);
++    void slotMediaChanged(const QDBusMessage &msg);
++
++private:
++    const QStringList &deviceCache();
++    QSet<Solid::DeviceInterface::Type> m_supportedInterfaces;
++    org::freedesktop::DBus::ObjectManager m_manager;
++    QStringList m_deviceCache;
++};
++
++}
++}
++}
++#endif // UDISKS2MANAGER_H
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksopticaldisc.cpp b/tier1/solid/src/solid/backends/udisks2/udisksopticaldisc.cpp
+new file mode 100644
+index 0000000..478c930
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksopticaldisc.cpp
+@@ -0,0 +1,277 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010 - 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include <sys/types.h>
++#include <unistd.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++
++#include <QtCore/QFile>
++#include <QtDBus/QDBusConnection>
++
++#include "../shared/udevqtclient.h"
++
++#include "udisks2.h"
++#include "udisksopticaldisc.h"
++
++// inspired by http://cgit.freedesktop.org/hal/tree/hald/linux/probing/probe-volume.c
++static Solid::OpticalDisc::ContentType advancedDiscDetect(const QByteArray & device_file)
++{
++    /* the discs block size */
++    unsigned short bs;
++    /* the path table size */
++    unsigned short ts;
++    /* the path table location (in blocks) */
++    unsigned int tl;
++    /* length of the directory name in current path table entry */
++    unsigned char len_di = 0;
++    /* the number of the parent directory's path table entry */
++    unsigned int parent = 0;
++    /* filename for the current path table entry */
++    char dirname[256];
++    /* our position into the path table */
++    int pos = 0;
++    /* the path table record we're on */
++    int curr_record = 1;
++
++    Solid::OpticalDisc::ContentType result = Solid::OpticalDisc::NoContent;
++
++    int fd = open(device_file.constData(), O_RDONLY);
++
++    /* read the block size */
++    lseek (fd, 0x8080, SEEK_CUR);
++    if (read (fd, &bs, 2) != 2)
++    {
++        qDebug("Advanced probing on %s failed while reading block size", qPrintable(device_file));
++        goto out;
++    }
++
++    /* read in size of path table */
++    lseek (fd, 2, SEEK_CUR);
++    if (read (fd, &ts, 2) != 2)
++    {
++        qDebug("Advanced probing on %s failed while reading path table size", qPrintable(device_file));
++        goto out;
++    }
++
++    /* read in which block path table is in */
++    lseek (fd, 6, SEEK_CUR);
++    if (read (fd, &tl, 4) != 4)
++    {
++        qDebug("Advanced probing on %s failed while reading path table block", qPrintable(device_file));
++        goto out;
++    }
++
++    /* seek to the path table */
++    lseek (fd, bs * tl, SEEK_SET);
++
++    /* loop through the path table entries */
++    while (pos < ts)
++    {
++        /* get the length of the filename of the current entry */
++        if (read (fd, &len_di, 1) != 1)
++        {
++            qDebug("Advanced probing on %s failed, cannot read more entries", qPrintable(device_file));
++            break;
++        }
++
++        /* get the record number of this entry's parent
++           i'm pretty sure that the 1st entry is always the top directory */
++        lseek (fd, 5, SEEK_CUR);
++        if (read (fd, &parent, 2) != 2)
++        {
++            qDebug("Advanced probing on %s failed, couldn't read parent entry", qPrintable(device_file));
++            break;
++        }
++
++        /* read the name */
++        if (read (fd, dirname, len_di) != len_di)
++        {
++            qDebug("Advanced probing on %s failed, couldn't read the entry name", qPrintable(device_file));
++            break;
++        }
++        dirname[len_di] = 0;
++
++        /* if we found a folder that has the root as a parent, and the directory name matches
++           one of the special directories then set the properties accordingly */
++        if (parent == 1)
++        {
++            if (!strcasecmp (dirname, "VIDEO_TS"))
++            {
++                qDebug("Disc in %s is a Video DVD", qPrintable(device_file));
++                result = Solid::OpticalDisc::VideoDvd;
++                break;
++            }
++            else if (!strcasecmp (dirname, "BDMV"))
++            {
++                qDebug("Disc in %s is a Blu-ray video disc", qPrintable(device_file));
++                result = Solid::OpticalDisc::VideoBluRay;
++                break;
++            }
++            else if (!strcasecmp (dirname, "VCD"))
++            {
++                qDebug("Disc in %s is a Video CD", qPrintable(device_file));
++                result = Solid::OpticalDisc::VideoCd;
++                break;
++            }
++            else if (!strcasecmp (dirname, "SVCD"))
++            {
++                qDebug("Disc in %s is a Super Video CD", qPrintable(device_file));
++                result = Solid::OpticalDisc::SuperVideoCd;
++                break;
++            }
++        }
++
++        /* all path table entries are padded to be even,
++           so if this is an odd-length table, seek a byte to fix it */
++        if (len_di%2 == 1)
++        {
++            lseek (fd, 1, SEEK_CUR);
++            pos++;
++        }
++
++        /* update our position */
++        pos += 8 + len_di;
++        curr_record++;
++    }
++
++    close(fd);
++    return result;
++
++out:
++    /* go back to the start of the file */
++    lseek (fd, 0, SEEK_SET);
++    close(fd);
++    return result;
++}
++
++using namespace Solid::Backends::UDisks2;
++
++OpticalDisc::OpticalDisc(Device *dev)
++    : StorageVolume(dev), m_needsReprobe(true), m_cachedContent(Solid::OpticalDisc::NoContent)
++{
++    UdevQt::Client client(this);
++    m_udevDevice = client.deviceByDeviceFile(device());
++    //qDebug() << "udev device:" << m_udevDevice.name() << "valid:" << m_udevDevice.isValid();
++    /*qDebug() << "\tProperties:" << */ m_udevDevice.deviceProperties(); // initialize the properties DB so that it doesn't crash further down, #298416
++
++    m_drive = new Device(m_device->prop("Drive").value<QDBusObjectPath>().path());
++    QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, m_drive->udi(), DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
++                                         SLOT(slotDrivePropertiesChanged(QString,QVariantMap,QStringList)));
++}
++
++OpticalDisc::~OpticalDisc()
++{
++    delete m_drive;
++}
++
++qulonglong OpticalDisc::capacity() const
++{
++    return m_device->prop("Size").toULongLong();
++}
++
++bool OpticalDisc::isRewritable() const
++{
++    // the hard way, udisks has no notion of a disc "rewritability"
++    const QString mediaType = media();
++    return mediaType == "optical_cd_rw" || mediaType == "optical_dvd_rw" || mediaType == "optical_dvd_ram" ||
++            mediaType == "optical_dvd_plus_rw" || mediaType == "optical_dvd_plus_rw_dl" ||
++            mediaType == "optical_bd_re" || mediaType == "optical_hddvd_rw";
++}
++
++bool OpticalDisc::isBlank() const
++{
++    return m_drive->prop("OpticalBlank").toBool();
++}
++
++bool OpticalDisc::isAppendable() const
++{
++    //qDebug() << "appendable prop" << m_udevDevice.deviceProperty("ID_CDROM_MEDIA_STATE");
++    return m_udevDevice.deviceProperty("ID_CDROM_MEDIA_STATE").toString() == QLatin1String("appendable");
++}
++
++Solid::OpticalDisc::DiscType OpticalDisc::discType() const
++{
++    QMap<Solid::OpticalDisc::DiscType, QString> map;
++    map[Solid::OpticalDisc::CdRom] = "optical_cd";
++    map[Solid::OpticalDisc::CdRecordable] = "optical_cd_r";
++    map[Solid::OpticalDisc::CdRewritable] = "optical_cd_rw";
++    map[Solid::OpticalDisc::DvdRom] = "optical_dvd";
++    map[Solid::OpticalDisc::DvdRecordable] = "optical_dvd_r";
++    map[Solid::OpticalDisc::DvdRewritable] ="optical_dvd_rw";
++    map[Solid::OpticalDisc::DvdRam] ="optical_dvd_ram";
++    map[Solid::OpticalDisc::DvdPlusRecordable] ="optical_dvd_plus_r";
++    map[Solid::OpticalDisc::DvdPlusRewritable] ="optical_dvd_plus_rw";
++    map[Solid::OpticalDisc::DvdPlusRecordableDuallayer] ="optical_dvd_plus_r_dl";
++    map[Solid::OpticalDisc::DvdPlusRewritableDuallayer] ="optical_dvd_plus_rw_dl";
++    map[Solid::OpticalDisc::BluRayRom] ="optical_bd";
++    map[Solid::OpticalDisc::BluRayRecordable] ="optical_bd_r";
++    map[Solid::OpticalDisc::BluRayRewritable] ="optical_bd_re";
++    map[Solid::OpticalDisc::HdDvdRom] ="optical_hddvd";
++    map[Solid::OpticalDisc::HdDvdRecordable] ="optical_hddvd_r";
++    map[Solid::OpticalDisc::HdDvdRewritable] ="optical_hddvd_rw";
++    // TODO add these to Solid
++    //map[Solid::OpticalDisc::MagnetoOptical] ="optical_mo";
++    //map[Solid::OpticalDisc::MountRainer] ="optical_mrw";
++    //map[Solid::OpticalDisc::MountRainerWritable] ="optical_mrw_w";
++
++    return map.key(media(), Solid::OpticalDisc::UnknownDiscType);  // FIXME optimize, lookup by value, not key
++}
++
++Solid::OpticalDisc::ContentTypes OpticalDisc::availableContent() const
++{
++    if (isBlank()) {
++        m_needsReprobe = false;
++        return Solid::OpticalDisc::NoContent;
++    }
++
++    if (m_needsReprobe) {
++        m_cachedContent = Solid::OpticalDisc::NoContent;
++        const bool hasData = m_drive->prop("OpticalNumDataTracks").toUInt() > 0;
++        const bool hasAudio = m_drive->prop("OpticalNumAudioTracks").toUInt() > 0;
++
++        if ( hasData ) {
++            m_cachedContent |= Solid::OpticalDisc::Data;
++            m_cachedContent |= advancedDiscDetect(m_device->prop("Device").toByteArray());
++        }
++        if ( hasAudio )
++            m_cachedContent |= Solid::OpticalDisc::Audio;
++
++        m_needsReprobe = false;
++    }
++
++    return m_cachedContent;
++}
++
++void OpticalDisc::slotDrivePropertiesChanged(const QString &ifaceName, const QVariantMap &changedProps, const QStringList &invalidatedProps)
++{
++    Q_UNUSED(ifaceName);
++
++    if (changedProps.keys().contains("Media") || invalidatedProps.contains("Media")) {
++        m_needsReprobe = true;
++        m_cachedContent = Solid::OpticalDisc::NoContent;
++    }
++}
++
++QString OpticalDisc::media() const
++{
++    return m_drive->prop("Media").toString();
++}
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksopticaldisc.h b/tier1/solid/src/solid/backends/udisks2/udisksopticaldisc.h
+new file mode 100644
+index 0000000..5b80995
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksopticaldisc.h
+@@ -0,0 +1,69 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010 - 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2OPTICALDISC_H
++#define UDISKS2OPTICALDISC_H
++
++#include <solid/ifaces/opticaldisc.h>
++
++#include "../shared/udevqtdevice.h"
++
++#include "udisksstoragevolume.h"
++#include "udisksdevice.h"
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class OpticalDisc: public StorageVolume, virtual public Solid::Ifaces::OpticalDisc
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::OpticalDisc)
++
++public:
++    OpticalDisc(Device *dev);
++    virtual ~OpticalDisc();
++
++    virtual qulonglong capacity() const;
++    virtual bool isRewritable() const;
++    virtual bool isBlank() const;
++    virtual bool isAppendable() const;
++    virtual Solid::OpticalDisc::DiscType discType() const;
++    virtual Solid::OpticalDisc::ContentTypes availableContent() const;
++
++private Q_SLOTS:
++    void slotDrivePropertiesChanged(const QString & ifaceName, const QVariantMap & changedProps, const QStringList & invalidatedProps);
++
++private:
++    QString media() const;
++    mutable bool m_needsReprobe;
++    mutable Solid::OpticalDisc::ContentTypes m_cachedContent;
++    Device * m_drive;
++    UdevQt::Device m_udevDevice;
++};
++
++}
++}
++}
++#endif // UDISKS2OPTICALDISC_H
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksopticaldrive.cpp b/tier1/solid/src/solid/backends/udisks2/udisksopticaldrive.cpp
+new file mode 100644
+index 0000000..0eb4685
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksopticaldrive.cpp
+@@ -0,0 +1,188 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++#include <string.h>
++#include <errno.h>
++#include <unistd.h>
++#include <stdlib.h>
++
++#include <QtCore/QFile>
++#include <QtCore/QDebug>
++
++#include "udisksopticaldrive.h"
++#include "udisks2.h"
++#include "udisksdevice.h"
++
++using namespace Solid::Backends::UDisks2;
++
++OpticalDrive::OpticalDrive(Device *device)
++    : StorageDrive(device), m_ejectInProgress(false), m_readSpeed(0), m_writeSpeed(0), m_speedsInit(false)
++{
++    m_device->registerAction("eject", this,
++                             SLOT(slotEjectRequested()),
++                             SLOT(slotEjectDone(int, const QString&)));
++
++    connect(m_device, SIGNAL(changed()), this, SLOT(slotChanged()));
++}
++
++OpticalDrive::~OpticalDrive()
++{
++}
++
++bool OpticalDrive::eject()
++{
++    if (m_ejectInProgress)
++        return false;
++    m_ejectInProgress = true;
++    m_device->broadcastActionRequested("eject");
++
++    QDBusConnection c = QDBusConnection::systemBus();
++
++    QString path = m_device->udi();
++
++    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, UD2_DBUS_INTERFACE_DRIVE, "Eject");
++    msg << QVariantMap();
++    return c.callWithCallback(msg, this, SLOT(slotDBusReply(const QDBusMessage &)), SLOT(slotDBusError(const QDBusError &)));
++}
++
++void OpticalDrive::slotDBusReply(const QDBusMessage &/*reply*/)
++{
++    m_ejectInProgress = false;
++    m_device->broadcastActionDone("eject");
++}
++
++void OpticalDrive::slotDBusError(const QDBusError &error)
++{
++    m_ejectInProgress = false;
++    m_device->broadcastActionDone("eject", m_device->errorToSolidError(error.name()),
++                                  m_device->errorToString(error.name()) + ": " +error.message());
++}
++
++void OpticalDrive::slotEjectRequested()
++{
++    m_ejectInProgress = true;
++    Q_EMIT ejectRequested(m_device->udi());
++}
++
++void OpticalDrive::slotEjectDone(int error, const QString &errorString)
++{
++    m_ejectInProgress = false;
++    Q_EMIT ejectDone(static_cast<Solid::ErrorType>(error), errorString, m_device->udi());
++}
++
++void OpticalDrive::initReadWriteSpeeds() const
++{
++#if 0
++    int read_speed, write_speed;
++    char *write_speeds = 0;
++    QByteArray device_file = QFile::encodeName(m_device->property("Device").toString());
++
++    //qDebug("Doing open (\"%s\", O_RDONLY | O_NONBLOCK)", device_file.constData());
++    int fd = open(device_file, O_RDONLY | O_NONBLOCK);
++    if (fd < 0) {
++        qWarning("Cannot open %s: %s", device_file.constData(), strerror (errno));
++        return;
++    }
++
++    if (get_read_write_speed(fd, &read_speed, &write_speed, &write_speeds) >= 0) {
++        m_readSpeed = read_speed;
++        m_writeSpeed = write_speed;
++
++        QStringList list = QString::fromLatin1(write_speeds).split(',', QString::SkipEmptyParts);
++        Q_FOREACH (const QString & speed, list)
++            m_writeSpeeds.append(speed.toInt());
++
++        free(write_speeds);
++
++        m_speedsInit = true;
++    }
++
++    close(fd);
++#endif
++}
++
++QList<int> OpticalDrive::writeSpeeds() const
++{
++    if (!m_speedsInit)
++        initReadWriteSpeeds();
++    //qDebug() << "solid write speeds:" << m_writeSpeeds;
++    return m_writeSpeeds;
++}
++
++int OpticalDrive::writeSpeed() const
++{
++    if (!m_speedsInit)
++        initReadWriteSpeeds();
++    return m_writeSpeed;
++}
++
++int OpticalDrive::readSpeed() const
++{
++    if (!m_speedsInit)
++        initReadWriteSpeeds();
++    return m_readSpeed;
++}
++
++Solid::OpticalDrive::MediumTypes OpticalDrive::supportedMedia() const
++{
++    const QStringList mediaTypes = m_device->prop("MediaCompatibility").toStringList();
++    Solid::OpticalDrive::MediumTypes supported;
++
++    QMap<Solid::OpticalDrive::MediumType, QString> map;
++    map[Solid::OpticalDrive::Cdr] = "optical_cd_r";
++    map[Solid::OpticalDrive::Cdrw] = "optical_cd_rw";
++    map[Solid::OpticalDrive::Dvd] = "optical_dvd";
++    map[Solid::OpticalDrive::Dvdr] = "optical_dvd_r";
++    map[Solid::OpticalDrive::Dvdrw] ="optical_dvd_rw";
++    map[Solid::OpticalDrive::Dvdram] ="optical_dvd_ram";
++    map[Solid::OpticalDrive::Dvdplusr] ="optical_dvd_plus_r";
++    map[Solid::OpticalDrive::Dvdplusrw] ="optical_dvd_plus_rw";
++    map[Solid::OpticalDrive::Dvdplusdl] ="optical_dvd_plus_r_dl";
++    map[Solid::OpticalDrive::Dvdplusdlrw] ="optical_dvd_plus_rw_dl";
++    map[Solid::OpticalDrive::Bd] ="optical_bd";
++    map[Solid::OpticalDrive::Bdr] ="optical_bd_r";
++    map[Solid::OpticalDrive::Bdre] ="optical_bd_re";
++    map[Solid::OpticalDrive::HdDvd] ="optical_hddvd";
++    map[Solid::OpticalDrive::HdDvdr] ="optical_hddvd_r";
++    map[Solid::OpticalDrive::HdDvdrw] ="optical_hddvd_rw";
++    // TODO add these to Solid
++    //map[Solid::OpticalDrive::Mo] ="optical_mo";
++    //map[Solid::OpticalDrive::Mr] ="optical_mrw";
++    //map[Solid::OpticalDrive::Mrw] ="optical_mrw_w";
++
++    Q_FOREACH ( const Solid::OpticalDrive::MediumType & type, map.keys() )
++    {
++        if ( mediaTypes.contains( map[type] ) )
++        {
++            supported |= type;
++        }
++    }
++
++    return supported;
++}
++
++void OpticalDrive::slotChanged()
++{
++    m_speedsInit = false; // reset the read/write speeds, changes eg. with an inserted media
++}
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksopticaldrive.h b/tier1/solid/src/solid/backends/udisks2/udisksopticaldrive.h
+new file mode 100644
+index 0000000..4c98ef5
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksopticaldrive.h
+@@ -0,0 +1,81 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2OPTICALDRIVE_H
++#define UDISKS2OPTICALDRIVE_H
++
++#include <solid/ifaces/opticaldrive.h>
++#include "udisksstoragedrive.h"
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class OpticalDrive: public StorageDrive, virtual public Solid::Ifaces::OpticalDrive
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::OpticalDrive)
++
++public:
++    OpticalDrive(Device *device);
++    virtual ~OpticalDrive();
++
++Q_SIGNALS:
++    void ejectPressed(const QString &udi);
++    void ejectDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
++    void ejectRequested(const QString &udi);
++
++public:
++    virtual bool eject();
++    virtual QList<int> writeSpeeds() const;
++    virtual int writeSpeed() const;
++    virtual int readSpeed() const;
++    virtual Solid::OpticalDrive::MediumTypes supportedMedia() const;
++
++private Q_SLOTS:
++    void slotDBusReply(const QDBusMessage &reply);
++    void slotDBusError(const QDBusError &error);
++
++    void slotEjectRequested();
++    void slotEjectDone(int error, const QString &errorString);
++
++    void slotChanged();
++
++private:
++    void initReadWriteSpeeds() const;
++
++    bool m_ejectInProgress;
++
++    // read/write speeds
++    mutable int m_readSpeed;
++    mutable int m_writeSpeed;
++    mutable QList<int> m_writeSpeeds;
++    mutable bool m_speedsInit;
++};
++
++}
++}
++}
++
++#endif // UDISKS2OPTICALDRIVE_H
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksstorageaccess.cpp b/tier1/solid/src/solid/backends/udisks2/udisksstorageaccess.cpp
+new file mode 100644
+index 0000000..146c227
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksstorageaccess.cpp
+@@ -0,0 +1,359 @@
++/*
++    Copyright 2009 Pino Toscano <pino@kde.org>
++    Copyright 2009-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksstorageaccess.h"
++#include "udisks2.h"
++
++#include <QtCore/QProcess>
++#include <QtDBus/QtDBus>
++#include <QtGui/QApplication>
++#include <QtGui/QWidget>
++
++using namespace Solid::Backends::UDisks2;
++
++StorageAccess::StorageAccess(Device *device)
++    : DeviceInterface(device), m_setupInProgress(false), m_teardownInProgress(false), m_passphraseRequested(false)
++{
++    updateCache();
++    QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, m_device->udi(), DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
++                                         SLOT(slotPropertiesChanged(QString,QVariantMap,QStringList)));
++
++    // Delay connecting to DBus signals to avoid the related time penalty
++    // in hot paths such as predicate matching
++    QTimer::singleShot(0, this, SLOT(connectDBusSignals()));
++}
++
++StorageAccess::~StorageAccess()
++{
++}
++
++void StorageAccess::connectDBusSignals()
++{
++    m_device->registerAction("setup", this,
++                             SLOT(slotSetupRequested()),
++                             SLOT(slotSetupDone(int, const QString&)));
++
++    m_device->registerAction("teardown", this,
++                             SLOT(slotTeardownRequested()),
++                             SLOT(slotTeardownDone(int, const QString&)));
++}
++
++bool StorageAccess::isLuksDevice() const
++{
++    return m_device->isEncryptedContainer(); // encrypted device
++}
++
++bool StorageAccess::isAccessible() const
++{
++    if (isLuksDevice()) { // check if the cleartext slave is mounted
++        if (m_clearTextPath.isEmpty() || m_clearTextPath == "/")
++            return false;
++        Device holderDevice(m_clearTextPath);
++        return holderDevice.isMounted();
++    }
++
++    return m_device->isMounted();
++}
++
++QString StorageAccess::filePath() const
++{
++    if (!isAccessible())
++        return QString();
++
++    QByteArrayList mntPoints;
++
++    if (isLuksDevice()) {  // encrypted (and unlocked) device
++        if (m_clearTextPath.isEmpty() || m_clearTextPath == "/")
++            return QString();
++        Device holderDevice(m_clearTextPath);
++        mntPoints = qdbus_cast<QByteArrayList>(holderDevice.prop("MountPoints"));
++        if (!mntPoints.isEmpty())
++            return QFile::decodeName(mntPoints.first()); // FIXME Solid doesn't support multiple mount points
++        else
++            return QString();
++    }
++
++    mntPoints = qdbus_cast<QByteArrayList>(m_device->prop("MountPoints"));
++
++    if (!mntPoints.isEmpty())
++        return QFile::decodeName(mntPoints.first()); // FIXME Solid doesn't support multiple mount points
++    else
++        return QString();
++}
++
++bool StorageAccess::isIgnored() const
++{
++    return m_device->prop("HintIgnore").toBool(); // FIXME tune
++}
++
++bool StorageAccess::setup()
++{
++    if ( m_teardownInProgress || m_setupInProgress )
++        return false;
++    m_setupInProgress = true;
++    m_device->broadcastActionRequested("setup");
++
++    if (m_device->isEncryptedContainer())
++        return requestPassphrase();
++    else
++        return mount();
++}
++
++bool StorageAccess::teardown()
++{
++    if ( m_teardownInProgress || m_setupInProgress )
++        return false;
++    m_teardownInProgress = true;
++    m_device->broadcastActionRequested("teardown");
++
++    return unmount();
++}
++
++void StorageAccess::slotPropertiesChanged(const QString &ifaceName, const QVariantMap &changedProps, const QStringList &invalidatedProps)
++{
++    Q_UNUSED(ifaceName);
++
++    if (changedProps.keys().contains("MountPoints") || invalidatedProps.contains("MountPoints")) {
++        Q_EMIT accessibilityChanged(isAccessible(), isLuksDevice() ? m_clearTextPath : m_device->udi());
++    }
++}
++
++void StorageAccess::updateCache()
++{
++    m_isAccessible = isAccessible();
++}
++
++void StorageAccess::checkAccessibility()
++{
++    const bool old_isAccessible = m_isAccessible;
++    updateCache();
++
++    if (old_isAccessible != m_isAccessible) {
++        Q_EMIT accessibilityChanged(m_isAccessible, isLuksDevice() ? m_clearTextPath : m_device->udi());
++    }
++}
++
++void StorageAccess::slotDBusReply( const QDBusMessage & reply )
++{
++    if (m_setupInProgress)
++    {
++        if (isLuksDevice() && !isAccessible()) { // unlocked device, now mount it
++            if (reply.type() == QDBusMessage::ReplyMessage)  // we've got a response from Unlock
++                m_clearTextPath = reply.arguments().value(0).value<QDBusObjectPath>().path();
++            mount();
++        }
++        else // Don't broadcast setupDone unless the setup is really done. (Fix kde#271156)
++        {
++            m_setupInProgress = false;
++            m_device->broadcastActionDone("setup");
++
++            checkAccessibility();
++        }
++    }
++    else if (m_teardownInProgress)  // FIXME
++    {
++        if (isLuksDevice() && !m_clearTextPath.isEmpty() && m_clearTextPath != "/") // unlocked device, lock it
++        {
++            callCryptoTeardown();
++        }
++        else if (!m_clearTextPath.isEmpty() && m_clearTextPath != "/") {
++            callCryptoTeardown(true); // Lock crypted parent
++        }
++        else
++        {
++            if (m_device->prop("Ejectable").toBool() && !m_device->isOpticalDisc()) // optical drives have their Eject method
++            {
++                // try to "eject" (aka safely remove) from the (parent) drive, e.g. SD card from a reader
++                QString drivePath = m_device->prop("Drive").value<QDBusObjectPath>().path();
++                if (!drivePath.isEmpty() || drivePath != "/")
++                {
++                    QDBusConnection c = QDBusConnection::systemBus();
++                    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, drivePath, UD2_DBUS_INTERFACE_DRIVE, "Eject");
++                    msg << QVariantMap();   // options, unused now
++                    c.call(msg, QDBus::NoBlock);
++                }
++            }
++
++            m_teardownInProgress = false;
++            m_device->broadcastActionDone("teardown");
++
++            checkAccessibility();
++        }
++    }
++}
++
++void StorageAccess::slotDBusError( const QDBusError & error )
++{
++    if (m_setupInProgress)
++    {
++        m_setupInProgress = false;
++        m_device->broadcastActionDone("setup", m_device->errorToSolidError(error.name()),
++                                      m_device->errorToString(error.name()) + ": " +error.message());
++
++        checkAccessibility();
++    }
++    else if (m_teardownInProgress)
++    {
++        m_teardownInProgress = false;
++        m_clearTextPath.clear();
++        m_device->broadcastActionDone("teardown", m_device->errorToSolidError(error.name()),
++                                      m_device->errorToString(error.name()) + ": " + error.message());
++        checkAccessibility();
++    }
++}
++
++void StorageAccess::slotSetupRequested()
++{
++    m_setupInProgress = true;
++    Q_EMIT setupRequested(m_device->udi());
++}
++
++void StorageAccess::slotSetupDone(int error, const QString &errorString)
++{
++    m_setupInProgress = false;
++    Q_EMIT setupDone(static_cast<Solid::ErrorType>(error), errorString, m_device->udi());
++}
++
++void StorageAccess::slotTeardownRequested()
++{
++    m_teardownInProgress = true;
++    Q_EMIT teardownRequested(m_device->udi());
++}
++
++void StorageAccess::slotTeardownDone(int error, const QString &errorString)
++{
++    m_teardownInProgress = false;
++    m_clearTextPath.clear();
++    Q_EMIT teardownDone(static_cast<Solid::ErrorType>(error), errorString, m_device->udi());
++}
++
++bool StorageAccess::mount()
++{
++    QString path = m_device->udi();
++
++    if (isLuksDevice()) { // mount options for the cleartext volume
++        path = m_clearTextPath;
++    }
++
++    QDBusConnection c = QDBusConnection::systemBus();
++    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, UD2_DBUS_INTERFACE_FILESYSTEM, "Mount");
++
++    msg << QVariantMap();   // options, unused now
++
++    return c.callWithCallback(msg, this,
++                              SLOT(slotDBusReply(const QDBusMessage &)),
++                              SLOT(slotDBusError(const QDBusError &)));
++}
++
++bool StorageAccess::unmount()
++{
++    QString path = m_device->udi();
++
++    if (isLuksDevice()) { // unmount options for the cleartext volume
++        path = m_clearTextPath;
++    }
++
++    QDBusConnection c = QDBusConnection::systemBus();
++    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, UD2_DBUS_INTERFACE_FILESYSTEM, "Unmount");
++
++    msg << QVariantMap();   // options, unused now
++
++    return c.callWithCallback(msg, this,
++                              SLOT(slotDBusReply(const QDBusMessage &)),
++                              SLOT(slotDBusError(const QDBusError &)),
++                              s_unmountTimeout);
++}
++
++QString StorageAccess::generateReturnObjectPath()
++{
++    static int number = 1;
++
++    return "/org/kde/solid/UDisks2StorageAccess_"+QString::number(number++);
++}
++
++bool StorageAccess::requestPassphrase()
++{
++    QString udi = m_device->udi();
++    QString returnService = QDBusConnection::sessionBus().baseService();
++    m_lastReturnObject = generateReturnObjectPath();
++
++    QDBusConnection::sessionBus().registerObject(m_lastReturnObject, this, QDBusConnection::ExportScriptableSlots);
++
++    QWidget *activeWindow = QApplication::activeWindow();
++    uint wId = 0;
++    if (activeWindow!=0)
++        wId = (uint)activeWindow->winId();
++
++    QString appId = QCoreApplication::applicationName();
++
++    QDBusInterface soliduiserver("org.kde.kded5", "/modules/soliduiserver", "org.kde.SolidUiServer");
++    QDBusReply<void> reply = soliduiserver.call("showPassphraseDialog", udi, returnService,
++                                                m_lastReturnObject, wId, appId);
++    m_passphraseRequested = reply.isValid();
++    if (!m_passphraseRequested)
++        qWarning() << "Failed to call the SolidUiServer, D-Bus said:" << reply.error();
++
++    return m_passphraseRequested;
++}
++
++void StorageAccess::passphraseReply(const QString & passphrase)
++{
++    if (m_passphraseRequested)
++    {
++        QDBusConnection::sessionBus().unregisterObject(m_lastReturnObject);
++        m_passphraseRequested = false;
++        if (!passphrase.isEmpty())
++            callCryptoSetup(passphrase);
++        else
++        {
++            m_setupInProgress = false;
++            m_device->broadcastActionDone("setup");
++        }
++    }
++}
++
++void StorageAccess::callCryptoSetup(const QString & passphrase)
++{
++    QDBusConnection c = QDBusConnection::systemBus();
++    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_device->udi(), UD2_DBUS_INTERFACE_ENCRYPTED, "Unlock");
++
++    msg << passphrase;
++    msg << QVariantMap();   // options, unused now
++
++    c.callWithCallback(msg, this,
++                       SLOT(slotDBusReply(const QDBusMessage &)),
++                       SLOT(slotDBusError(const QDBusError &)));
++}
++
++bool StorageAccess::callCryptoTeardown(bool actOnParent)
++{
++    QDBusConnection c = QDBusConnection::systemBus();
++    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE,
++                                                      actOnParent ? (m_device->prop("CryptoBackingDevice").value<QDBusObjectPath>().path()) : m_device->udi(),
++                                                      UD2_DBUS_INTERFACE_ENCRYPTED, "Lock");
++    msg << QVariantMap();   // options, unused now
++
++    m_clearTextPath.clear();
++
++    return c.callWithCallback(msg, this,
++                              SLOT(slotDBusReply(const QDBusMessage &)),
++                              SLOT(slotDBusError(const QDBusError &)));
++}
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksstorageaccess.h b/tier1/solid/src/solid/backends/udisks2/udisksstorageaccess.h
+new file mode 100644
+index 0000000..36f2102
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksstorageaccess.h
+@@ -0,0 +1,104 @@
++/*
++    Copyright 2009 Pino Toscano <pino@kde.org>
++    Copyright 2009-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2STORAGEACCESS_H
++#define UDISKS2STORAGEACCESS_H
++
++#include <solid/ifaces/storageaccess.h>
++#include "udisksdeviceinterface.h"
++
++#include <QtDBus/QDBusMessage>
++#include <QtDBus/QDBusError>
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++class StorageAccess : public DeviceInterface, virtual public Solid::Ifaces::StorageAccess
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::StorageAccess)
++
++public:
++    StorageAccess(Device *device);
++    virtual ~StorageAccess();
++
++    virtual bool isAccessible() const;
++    virtual QString filePath() const;
++    virtual bool isIgnored() const;
++    virtual bool setup();
++    virtual bool teardown();
++
++Q_SIGNALS:
++    void accessibilityChanged(bool accessible, const QString &udi);
++    void setupDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
++    void teardownDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
++    void setupRequested(const QString &udi);
++    void teardownRequested(const QString &udi);
++
++public Q_SLOTS:
++    Q_SCRIPTABLE Q_NOREPLY void passphraseReply(const QString & passphrase);
++
++private Q_SLOTS:
++    void slotPropertiesChanged(const QString & ifaceName, const QVariantMap & changedProps, const QStringList & invalidatedProps);
++    void slotDBusReply(const QDBusMessage & reply);
++    void slotDBusError(const QDBusError & error);
++
++    void connectDBusSignals();
++
++    void slotSetupRequested();
++    void slotSetupDone(int error, const QString &errorString);
++    void slotTeardownRequested();
++    void slotTeardownDone(int error, const QString &errorString);
++
++private:
++    /// @return true if this device is luks and unlocked
++    bool isLuksDevice() const;
++
++    void updateCache();
++    void checkAccessibility();
++
++    bool mount();
++    bool unmount();
++
++    bool requestPassphrase();
++    void callCryptoSetup( const QString & passphrase );
++    bool callCryptoTeardown( bool actOnParent=false );
++
++    QString generateReturnObjectPath();
++
++private:
++    bool m_isAccessible;
++    bool m_setupInProgress;
++    bool m_teardownInProgress;
++    bool m_passphraseRequested;
++    QString m_lastReturnObject;
++    QString m_clearTextPath;  // path to the unlocked cleartext device
++
++    static const int s_unmountTimeout = 0x7fffffff;
++};
++}
++}
++}
++
++#endif // UDISKS2STORAGEACCESS_H
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksstoragedrive.cpp b/tier1/solid/src/solid/backends/udisks2/udisksstoragedrive.cpp
+new file mode 100644
+index 0000000..c79ac20
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksstoragedrive.cpp
+@@ -0,0 +1,147 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksstoragedrive.h"
++
++#include "../shared/udevqtclient.h"
++
++#include <QtCore/QDebug>
++#include <QtCore/QFile>
++
++using namespace Solid::Backends::UDisks2;
++
++StorageDrive::StorageDrive(Device *dev)
++    : Block(dev)
++{
++    UdevQt::Client client(this);
++    m_udevDevice = client.deviceByDeviceFile(device());
++    m_udevDevice.deviceProperties();
++}
++
++StorageDrive::~StorageDrive()
++{
++}
++
++qulonglong StorageDrive::size() const
++{
++    return m_device->prop("Size").toULongLong();
++}
++
++bool StorageDrive::isHotpluggable() const
++{
++    const Solid::StorageDrive::Bus _bus = bus();
++    return _bus == Solid::StorageDrive::Usb || _bus == Solid::StorageDrive::Ieee1394;
++}
++
++bool StorageDrive::isRemovable() const
++{
++    return m_device->prop("MediaRemovable").toBool() || m_device->prop("Removable").toBool();
++}
++
++Solid::StorageDrive::DriveType StorageDrive::driveType() const
++{
++    const QStringList mediaTypes = m_device->prop("MediaCompatibility").toStringList();
++
++    if ( m_device->isOpticalDrive() ) // optical disks
++    {
++        return Solid::StorageDrive::CdromDrive;
++    }
++    else if ( mediaTypes.contains( "floppy" ) )
++    {
++        return Solid::StorageDrive::Floppy;
++    }
++#if 0 // TODO add to Solid
++    else if ( mediaTypes.contains( "floppy_jaz" ) )
++    {
++        return Solid::StorageDrive::Jaz;
++    }
++    else if ( mediaTypes.contains( "floppy_zip" ) )
++    {
++        return Solid::StorageDrive::Zip;
++    }
++    else if ( mediaTypes.contains( "flash" ) )
++    {
++        return Solid::StorageDrive::Flash;
++    }
++#endif
++    else if ( mediaTypes.contains( "flash_cf" ) )
++    {
++        return Solid::StorageDrive::CompactFlash;
++    }
++    else if ( mediaTypes.contains( "flash_ms" ) )
++    {
++        return Solid::StorageDrive::MemoryStick;
++    }
++    else if ( mediaTypes.contains( "flash_sm" ) )
++    {
++        return Solid::StorageDrive::SmartMedia;
++    }
++    else if ( mediaTypes.contains( "flash_sd" ) || mediaTypes.contains( "flash_sdhc" )
++              || mediaTypes.contains( "flash_mmc" ) || mediaTypes.contains("flash_sdxc") )
++    {
++        return Solid::StorageDrive::SdMmc;
++    }
++    // FIXME: udisks2 doesn't know about xD cards
++    else
++    {
++        return Solid::StorageDrive::HardDisk;
++    }
++}
++
++Solid::StorageDrive::Bus StorageDrive::bus() const
++{
++    const QString bus = m_device->prop("ConnectionBus").toString();
++    const QString udevBus = m_udevDevice.deviceProperty("ID_BUS").toString();
++
++    //qDebug() << "bus:" << bus << "udev bus:" << udevBus;
++
++    if (udevBus == "ata")
++    {
++        if (m_udevDevice.deviceProperty("ID_ATA_SATA").toInt() == 1) // serial ATA
++            return Solid::StorageDrive::Sata;
++        else  // parallel (classical) ATA
++            return Solid::StorageDrive::Ide;
++    }
++    else if (bus == "usb")
++    {
++        return Solid::StorageDrive::Usb;
++    }
++    else if (bus == "ieee1394")
++    {
++        return Solid::StorageDrive::Ieee1394;
++    }
++    else if (udevBus == "scsi")
++    {
++        return Solid::StorageDrive::Scsi;
++    }
++#if 0  // TODO add these to Solid
++    else if ( bus == "sdio" )
++    {
++        return Solid::StorageDrive::SDIO;
++    }
++    else if ( bus == "virtual" )
++    {
++        return Solid::StorageDrive::Virtual;
++    }
++#endif
++    else
++        return Solid::StorageDrive::Platform;
++}
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksstoragedrive.h b/tier1/solid/src/solid/backends/udisks2/udisksstoragedrive.h
+new file mode 100644
+index 0000000..9c87a23
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksstoragedrive.h
+@@ -0,0 +1,61 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2STORAGEDRIVE_H
++#define UDISKS2STORAGEDRIVE_H
++
++#include <ifaces/storagedrive.h>
++
++#include "../shared/udevqtdevice.h"
++
++#include "udisksblock.h"
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class StorageDrive: public Block, virtual public Solid::Ifaces::StorageDrive
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::StorageDrive)
++
++public:
++    StorageDrive(Device *dev);
++    virtual ~StorageDrive();
++
++    virtual qulonglong size() const;
++    virtual bool isHotpluggable() const;
++    virtual bool isRemovable() const;
++    virtual Solid::StorageDrive::DriveType driveType() const;
++    virtual Solid::StorageDrive::Bus bus() const;
++
++private:
++    UdevQt::Device m_udevDevice;
++};
++
++}
++}
++}
++
++#endif // UDISK2SSTORAGEDRIVE_H
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksstoragevolume.cpp b/tier1/solid/src/solid/backends/udisks2/udisksstoragevolume.cpp
+new file mode 100644
+index 0000000..a7d8fad
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksstoragevolume.cpp
+@@ -0,0 +1,105 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksstoragevolume.h"
++#include "udisks2.h"
++
++using namespace Solid::Backends::UDisks2;
++
++StorageVolume::StorageVolume(Device *device)
++    : Block(device)
++{
++}
++
++StorageVolume::~StorageVolume()
++{
++}
++
++QString StorageVolume::encryptedContainerUdi() const
++{
++    const QString path = m_device->prop("CryptoBackingDevice").value<QDBusObjectPath>().path();
++    if ( path.isEmpty() || path == "/")
++        return QString();
++    else
++        return path;
++}
++
++qulonglong StorageVolume::size() const
++{
++    return m_device->prop("Size").toULongLong();
++}
++
++QString StorageVolume::uuid() const
++{
++    return m_device->prop("IdUUID").toString();
++}
++
++QString StorageVolume::label() const
++{
++    QString label = m_device->prop("HintName").toString();
++    if (label.isEmpty())
++        label = m_device->prop("IdLabel").toString();
++    if (label.isEmpty())
++        label = m_device->prop("Name").toString();
++    return label;
++}
++
++QString StorageVolume::fsType() const
++{
++    return m_device->prop("IdType").toString();
++}
++
++Solid::StorageVolume::UsageType StorageVolume::usage() const
++{
++    const QString usage = m_device->prop("IdUsage").toString();
++
++    if (m_device->hasInterface(UD2_DBUS_INTERFACE_FILESYSTEM))
++    {
++        return Solid::StorageVolume::FileSystem;
++    }
++    else if (m_device->isPartitionTable())
++    {
++        return Solid::StorageVolume::PartitionTable;
++    }
++    else if (usage == "raid")
++    {
++        return Solid::StorageVolume::Raid;
++    }
++    else if (m_device->isEncryptedContainer())
++    {
++        return Solid::StorageVolume::Encrypted;
++    }
++    else if (usage == "unused" || usage.isEmpty())
++    {
++        return Solid::StorageVolume::Unused;
++    }
++    else
++    {
++        return Solid::StorageVolume::Other;
++    }
++}
++
++bool StorageVolume::isIgnored() const
++{
++    const Solid::StorageVolume::UsageType usg = usage();
++    return m_device->prop("HintIgnore").toBool() || m_device->isSwap() ||
++            ((usg == Solid::StorageVolume::Unused || usg == Solid::StorageVolume::Other || usg == Solid::StorageVolume::PartitionTable) && !m_device->isOpticalDisc());
++}
+diff --git a/tier1/solid/src/solid/backends/udisks2/udisksstoragevolume.h b/tier1/solid/src/solid/backends/udisks2/udisksstoragevolume.h
+new file mode 100644
+index 0000000..2ca04d2
+--- /dev/null
++++ b/tier1/solid/src/solid/backends/udisks2/udisksstoragevolume.h
+@@ -0,0 +1,57 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2STORAGEVOLUME_H
++#define UDISKS2STORAGEVOLUME_H
++
++#include <ifaces/storagevolume.h>
++#include "udisksblock.h"
++
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class StorageVolume: public Block, virtual public Solid::Ifaces::StorageVolume
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::StorageVolume)
++
++public:
++    StorageVolume(Device *device);
++    virtual ~StorageVolume();
++
++    virtual QString encryptedContainerUdi() const;
++    virtual qulonglong size() const;
++    virtual QString uuid() const;
++    virtual QString label() const;
++    virtual QString fsType() const;
++    virtual Solid::StorageVolume::UsageType usage() const;
++    virtual bool isIgnored() const;
++};
++
++}
++}
++}
++
++#endif // UDISKS2STORAGEVOLUME_H

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2_post.patch b/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2_post.patch
new file mode 100644
index 0000000..68ad5f4
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2_post.patch
@@ -0,0 +1,113 @@
+diff -ruN kdelibs-4.8.90.orig/solid/solid/CMakeLists.txt kdelibs-4.8.90/solid/solid/CMakeLists.txt
+--- kdelibs-4.8.90.orig/solid/solid/CMakeLists.txt	2012-06-19 22:42:38.267962759 +0200
++++ kdelibs-4.8.90/solid/solid/CMakeLists.txt	2012-06-19 22:44:23.050968201 +0200
+@@ -40,7 +40,6 @@
+ 
+ file(MAKE_DIRECTORY
+    ${CMAKE_CURRENT_BINARY_DIR}/backends/fakehw
+-   ${CMAKE_CURRENT_BINARY_DIR}/backends/hal
+    ${CMAKE_CURRENT_BINARY_DIR}/backends/udev
+    ${CMAKE_CURRENT_BINARY_DIR}/backends/wmi
+ )
+@@ -226,33 +225,6 @@
+    endif( UDEV_FOUND )
+ 
+ 
+-   message(STATUS "Building Solid HAL backend." )
+-   set(solid_LIB_SRCS ${solid_LIB_SRCS}
+-   backends/hal/halacadapter.cpp
+-   backends/hal/halaudiointerface.cpp
+-   backends/hal/halbattery.cpp
+-   backends/hal/halblock.cpp
+-   backends/hal/halbutton.cpp
+-   backends/hal/halcamera.cpp
+-   backends/hal/halcdrom.cpp
+-   backends/hal/haldeviceinterface.cpp
+-   backends/hal/haldvbinterface.cpp
+-   backends/hal/halfstabhandling.cpp
+-   backends/hal/halgenericinterface.cpp
+-   backends/hal/haldevice.cpp
+-   backends/hal/halmanager.cpp
+-   backends/hal/halnetworkinterface.cpp
+-   backends/hal/halserialinterface.cpp
+-   backends/hal/halopticaldisc.cpp
+-   backends/hal/halportablemediaplayer.cpp
+-   backends/hal/halprocessor.cpp
+-   backends/hal/halstorageaccess.cpp
+-   backends/hal/halstorage.cpp
+-   backends/hal/halvideo.cpp
+-   backends/hal/halvolume.cpp
+-   backends/hal/halsmartcardreader.cpp
+-   )
+-
+    message(STATUS "Building Solid UPower backend." )
+    set(solid_LIB_SRCS ${solid_LIB_SRCS}
+    backends/upower/upowermanager.cpp
+@@ -265,18 +237,19 @@
+ 
+    # FIXME: this should work on more Unix systems
+    if (CMAKE_SYSTEM_NAME MATCHES Linux)
+-      message(STATUS "Building Solid UDisks backend." )
++      message(STATUS "Building Solid UDisks2 backend." )
+       set(solid_LIB_SRCS ${solid_LIB_SRCS}
+-      backends/udisks/udisksmanager.cpp
+-      backends/udisks/udisksdevice.cpp
+-      backends/udisks/udisksblock.cpp
+-      backends/udisks/udisksstoragevolume.cpp
+-      backends/udisks/udisksdeviceinterface.cpp
+-      backends/udisks/udisksopticaldisc.cpp
+-      backends/udisks/udisksopticaldrive.cpp
+-      backends/udisks/udisksstoragedrive.cpp
+-      backends/udisks/udisksstorageaccess.cpp
+-      backends/udisks/udisksgenericinterface.cpp
++      backends/udisks2/udisksmanager.cpp
++      backends/udisks2/udisksdevice.cpp
++      backends/udisks2/udisksblock.cpp
++      backends/udisks2/udisksstoragevolume.cpp
++      backends/udisks2/udisksdeviceinterface.cpp
++      backends/udisks2/udisksopticaldisc.cpp
++      backends/udisks2/udisksopticaldrive.cpp
++      backends/udisks2/udisksstoragedrive.cpp
++      backends/udisks2/udisksstorageaccess.cpp
++      backends/udisks2/udisksgenericinterface.cpp
++      backends/udisks2/dbus/manager.cpp
+       )
+    endif (CMAKE_SYSTEM_NAME MATCHES Linux)
+ 
+diff -ruN kdelibs-4.8.90.orig/solid/solid/managerbase.cpp kdelibs-4.8.90/solid/solid/managerbase.cpp
+--- kdelibs-4.8.90.orig/solid/solid/managerbase.cpp	2012-06-19 22:42:38.267962759 +0200
++++ kdelibs-4.8.90/solid/solid/managerbase.cpp	2012-06-19 22:44:23.050968201 +0200
+@@ -30,8 +30,7 @@
+ #if defined (Q_OS_MAC)
+ #include "backends/iokit/iokitmanager.h"
+ #elif defined (Q_OS_UNIX)
+-#include "backends/hal/halmanager.h"
+-#include "backends/udisks/udisksmanager.h"
++#include "backends/udisks2/udisksmanager.h"
+ #include "backends/upower/upowermanager.h"
+ 
+ #if defined (HUPNP_FOUND)
+@@ -71,22 +70,13 @@
+ #        elif defined(Q_OS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
+             m_backends << new Solid::Backends::Wmi::WmiManager(0);
+ 
+-#        elif defined(Q_OS_UNIX) && !defined(Q_OS_LINUX)
+-            m_backends << new Solid::Backends::Hal::HalManager(0);
+-
+ #        elif defined(Q_OS_LINUX)
+-            bool solidHalLegacyEnabled
+-                = QString::fromLocal8Bit(qgetenv("SOLID_HAL_LEGACY")).toInt()==1;
+-            if (solidHalLegacyEnabled) {
+-                m_backends << new Solid::Backends::Hal::HalManager(0);
+-            } else {
+ #               if defined(UDEV_FOUND)
+                     m_backends << new Solid::Backends::UDev::UDevManager(0);
+ #               endif
+-                m_backends << new Solid::Backends::UDisks::UDisksManager(0)
++                m_backends << new Solid::Backends::UDisks2::Manager(0)
+                            << new Solid::Backends::UPower::UPowerManager(0)
+                            << new Solid::Backends::Fstab::FstabManager(0);
+-            }
+ #        endif
+ 
+ #        if defined (HUPNP_FOUND)

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2_prep.patch b/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2_prep.patch
new file mode 100644
index 0000000..2962837
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2_prep.patch
@@ -0,0 +1,65 @@
+diff -up kdelibs-4.8.2/solid/solid/CMakeLists.txt.udisks2_prep kdelibs-4.8.2/solid/solid/CMakeLists.txt
+--- kdelibs-4.8.2/solid/solid/CMakeLists.txt.udisks2_prep	2011-07-27 13:34:38.000000000 -0500
++++ kdelibs-4.8.2/solid/solid/CMakeLists.txt	2012-04-17 16:02:06.153985974 -0500
+@@ -1,6 +1,7 @@
+ set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
+ add_subdirectory( ifaces )
+ include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
++include_directories( ${QT_QTDBUS_INCLUDE_DIR} )
+ 
+ if(WIN32)
+    include_directories( ${KDEWIN_INCLUDES} )
+diff -up kdelibs-4.8.2/solid/solid/managerbase.cpp.udisks2_prep kdelibs-4.8.2/solid/solid/managerbase.cpp
+--- kdelibs-4.8.2/solid/solid/managerbase.cpp.udisks2_prep	2011-07-27 13:34:39.000000000 -0500
++++ kdelibs-4.8.2/solid/solid/managerbase.cpp	2012-04-17 16:02:06.154985961 -0500
+@@ -21,7 +21,7 @@
+ #include "managerbase_p.h"
+ 
+ #include <stdlib.h>
+-#if !defined (Q_WS_WIN) && !defined (Q_OS_MAC)
++#if !defined (Q_OS_WIN) && !defined (Q_OS_MAC)
+ #include <config-solid.h>
+ #endif
+ 
+@@ -44,7 +44,7 @@
+ 
+ #include "backends/fstab/fstabmanager.h"
+ 
+-#elif defined (Q_WS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
++#elif defined (Q_OS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
+ #include "backends/wmi/wmimanager.h"
+ #endif
+ 
+@@ -68,7 +68,7 @@ void Solid::ManagerBasePrivate::loadBack
+ #        if defined(Q_OS_MAC)
+             m_backends << new Solid::Backends::IOKit::IOKitManager(0);
+ 
+-#        elif defined(Q_WS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
++#        elif defined(Q_OS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
+             m_backends << new Solid::Backends::Wmi::WmiManager(0);
+ 
+ #        elif defined(Q_OS_UNIX) && !defined(Q_OS_LINUX)
+diff -up kdelibs-4.8.2/solid/tests/CMakeLists.txt.udisks2_prep kdelibs-4.8.2/solid/tests/CMakeLists.txt
+--- kdelibs-4.8.2/solid/tests/CMakeLists.txt.udisks2_prep	2011-10-20 15:52:04.000000000 -0500
++++ kdelibs-4.8.2/solid/tests/CMakeLists.txt	2012-04-17 16:02:44.584505527 -0500
+@@ -16,20 +16,6 @@ target_link_libraries(fakehardwaretest s
+ add_definitions(-DTEST_DATA="\\"${CMAKE_CURRENT_SOURCE_DIR}/../solid/backends/fakehw/fakecomputer.xml\\"")
+ 
+ 
+-########### halbasictest ###############
+-
+-if(NOT WIN32 AND NOT APPLE)
+-set(halbasictest_SRCS halbasictest.cpp )
+-
+-kde4_add_executable(halbasictest ${halbasictest_SRCS})
+-
+-if(WIN32)
+-  set_target_properties(halbasictest PROPERTIES COMPILE_FLAGS -DSOLID_EXPORT=)
+-endif(WIN32)
+-
+-target_link_libraries(halbasictest solid_static ${KDEWIN_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTTEST_LIBRARY} )
+-endif(NOT WIN32 AND NOT APPLE)
+-
+ ########### solidhwtest ###############
+ 
+ set(solidhwtest_SRCS 

diff --git a/kde-base/kdelibs/kdelibs-4.8.90.ebuild b/kde-base/kdelibs/kdelibs-4.8.90.ebuild
index 8e5fbd3..bad7083 100644
--- a/kde-base/kdelibs/kdelibs-4.8.90.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.8.90.ebuild
@@ -99,7 +99,7 @@ RDEPEND="${COMMONDEPEND}
 		x11-apps/iceauth
 		x11-apps/rgb
 		>=x11-misc/xdg-utils-1.0.2-r3
-		udisks? ( sys-fs/udisks:0 )
+		udisks? ( sys-fs/udisks:2 )
 		upower? ( sys-power/upower )
 	)
 "
@@ -129,6 +129,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.8.2-calculator_key.patch"
 	"${FILESDIR}/${PN}-4.8.4-bytecode.patch"
+	"${FILESDIR}/${PN}-4.8.90-udisks2"_{prep,backend,post}.patch
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index 8e6a93a..7b1a1b1 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -99,7 +99,7 @@ RDEPEND="${COMMONDEPEND}
 		x11-apps/iceauth
 		x11-apps/rgb
 		>=x11-misc/xdg-utils-1.0.2-r3
-		udisks? ( sys-fs/udisks:0 )
+		udisks? ( sys-fs/udisks:2 )
 		upower? ( sys-power/upower )
 	)
 "
@@ -129,6 +129,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.8.2-calculator_key.patch"
 	"${FILESDIR}/${PN}-4.8.4-bytecode.patch"
+	"${FILESDIR}/${PN}-4.8.90-udisks2"_{prep,backend,post}.patch
 )
 
 pkg_pretend() {



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-06-19 21:05 Andreas Hüttel
  0 siblings, 0 replies; 38+ messages in thread
From: Andreas Hüttel @ 2012-06-19 21:05 UTC (permalink / raw
  To: gentoo-commits

commit:     f48b439bf8e265d28f97848c224b962d3e45f9a0
Author:     Andreas K. Huettel (dilfridge) <mail <AT> akhuettel <DOT> de>
AuthorDate: Tue Jun 19 21:06:52 2012 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jun 19 21:06:52 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=f48b439b

[kde-base/kdelibs] Make the huge udisks2 patch a distfile

(Portage version: 2.2.0_alpha110/git/Linux x86_64, RepoMan options: --force, unsigned Manifest commit)

---
 .../files/kdelibs-4.8.90-udisks2_backend.patch     | 3524 --------------------
 kde-base/kdelibs/kdelibs-4.8.90.ebuild             |    5 +-
 kde-base/kdelibs/kdelibs-9999.ebuild               |    5 +-
 3 files changed, 8 insertions(+), 3526 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2_backend.patch b/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2_backend.patch
deleted file mode 100644
index 74ec3c2..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2_backend.patch
+++ /dev/null
@@ -1,3524 +0,0 @@
-diff --git a/tier1/solid/src/solid/backends/udisks2/dbus/manager.cpp b/tier1/solid/src/solid/backends/udisks2/dbus/manager.cpp
-new file mode 100644
-index 0000000..7ea4aa8
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/dbus/manager.cpp
-@@ -0,0 +1,26 @@
-+/*
-+ * This file was generated by qdbusxml2cpp version 0.7
-+ * Command line was: qdbusxml2cpp -p manager manager.xml
-+ *
-+ * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-+ *
-+ * This is an auto-generated file.
-+ * This file may have been hand-edited. Look for HAND-EDIT comments
-+ * before re-generating it.
-+ */
-+
-+#include "manager.h"
-+
-+/*
-+ * Implementation of interface class OrgFreedesktopDBusObjectManagerInterface
-+ */
-+
-+OrgFreedesktopDBusObjectManagerInterface::OrgFreedesktopDBusObjectManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
-+    : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
-+{
-+}
-+
-+OrgFreedesktopDBusObjectManagerInterface::~OrgFreedesktopDBusObjectManagerInterface()
-+{
-+}
-+
-diff --git a/tier1/solid/src/solid/backends/udisks2/dbus/manager.h b/tier1/solid/src/solid/backends/udisks2/dbus/manager.h
-new file mode 100644
-index 0000000..11f0be8
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/dbus/manager.h
-@@ -0,0 +1,59 @@
-+/*
-+ * This file was generated by qdbusxml2cpp version 0.7
-+ * Command line was: qdbusxml2cpp -p manager manager.xml
-+ *
-+ * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-+ *
-+ * This is an auto-generated file.
-+ * Do not edit! All changes made to it will be lost.
-+ */
-+
-+#ifndef MANAGER_H_1329493525
-+#define MANAGER_H_1329493525
-+
-+#include <QtCore/QObject>
-+#include <QtCore/QByteArray>
-+#include <QtCore/QList>
-+#include <QtCore/QMap>
-+#include <QtCore/QString>
-+#include <QtCore/QStringList>
-+#include <QtCore/QVariant>
-+#include <QtDBus/QtDBus>
-+
-+#include "../udisks2.h"
-+
-+/*
-+ * Proxy class for interface org.freedesktop.DBus.ObjectManager
-+ */
-+class OrgFreedesktopDBusObjectManagerInterface: public QDBusAbstractInterface
-+{
-+    Q_OBJECT
-+public:
-+    static inline const char *staticInterfaceName()
-+    { return "org.freedesktop.DBus.ObjectManager"; }
-+
-+public:
-+    OrgFreedesktopDBusObjectManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
-+
-+    ~OrgFreedesktopDBusObjectManagerInterface();
-+
-+public Q_SLOTS: // METHODS
-+    inline QDBusPendingReply<DBUSManagerStruct> GetManagedObjects()
-+    {
-+        QList<QVariant> argumentList;
-+        return asyncCallWithArgumentList(QLatin1String("GetManagedObjects"), argumentList);
-+    }
-+
-+Q_SIGNALS: // SIGNALS
-+    void InterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties);
-+    void InterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces);
-+};
-+
-+namespace org {
-+  namespace freedesktop {
-+    namespace DBus {
-+      typedef ::OrgFreedesktopDBusObjectManagerInterface ObjectManager;
-+    }
-+  }
-+}
-+#endif
-diff --git a/tier1/solid/src/solid/backends/udisks2/dbus/manager.xml b/tier1/solid/src/solid/backends/udisks2/dbus/manager.xml
-new file mode 100644
-index 0000000..8f25cb6
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/dbus/manager.xml
-@@ -0,0 +1,21 @@
-+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
-+                      "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
-+<node>
-+  <interface name="org.freedesktop.DBus.ObjectManager">
-+    <method name="GetManagedObjects">
-+      <arg type="a{oa{sa{sv}}}" name="object_paths_interfaces_and_properties" direction="out">
-+        <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="DBUSManagerStruct"/>
-+      </arg>
-+    </method>
-+    <signal name="InterfacesAdded">
-+      <arg type="o" name="object_path"/>
-+      <arg type="a{sa{sv}}" name="interfaces_and_properties">
-+        <annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="QVariantMapMap"/>
-+      </arg>
-+    </signal>
-+    <signal name="InterfacesRemoved">
-+      <arg type="o" name="object_path"/>
-+      <arg type="as" name="interfaces"/>
-+    </signal>
-+  </interface>
-+</node>
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisks2.h b/tier1/solid/src/solid/backends/udisks2/udisks2.h
-new file mode 100644
-index 0000000..25a1dc0
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisks2.h
-@@ -0,0 +1,77 @@
-+/*
-+    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef SOLID_BACKENDS_UDISKS2_H
-+#define SOLID_BACKENDS_UDISKS2_H
-+
-+#include <QMetaType>
-+#include <QtDBus>
-+#include <QVariant>
-+#include <QMap>
-+#include <QList>
-+
-+typedef QList<QByteArray> QByteArrayList;
-+Q_DECLARE_METATYPE(QByteArrayList)
-+
-+typedef QMap<QString,QVariantMap> QVariantMapMap;
-+Q_DECLARE_METATYPE(QVariantMapMap)
-+
-+typedef QMap<QDBusObjectPath, QVariantMapMap> DBUSManagerStruct;
-+Q_DECLARE_METATYPE(DBUSManagerStruct)
-+
-+/* UDisks2 */
-+#define UD2_DBUS_SERVICE                 "org.freedesktop.UDisks2"
-+#define UD2_DBUS_PATH                    "/org/freedesktop/UDisks2"
-+#define UD2_UDI_DISKS_PREFIX             "/org/freedesktop/UDisks2"
-+#define UD2_DBUS_PATH_MANAGER            "/org/freedesktop/UDisks2/Manager"
-+#define UD2_DBUS_PATH_DRIVES             "/org/freedesktop/UDisks2/drives/"
-+#define UD2_DBUS_PATH_JOBS               "/org/freedesktop/UDisks2/jobs/"
-+#define DBUS_INTERFACE_PROPS             "org.freedesktop.DBus.Properties"
-+#define DBUS_INTERFACE_INTROSPECT        "org.freedesktop.DBus.Introspectable"
-+#define DBUS_INTERFACE_MANAGER           "org.freedesktop.DBus.ObjectManager"
-+#define UD2_DBUS_INTERFACE_BLOCK         "org.freedesktop.UDisks2.Block"
-+#define UD2_DBUS_INTERFACE_DRIVE         "org.freedesktop.UDisks2.Drive"
-+#define UD2_DBUS_INTERFACE_PARTITION     "org.freedesktop.UDisks2.Partition"
-+#define UD2_DBUS_INTERFACE_PARTITIONTABLE   "org.freedesktop.UDisks2.PartitionTable"
-+#define UD2_DBUS_INTERFACE_FILESYSTEM    "org.freedesktop.UDisks2.Filesystem"
-+#define UD2_DBUS_INTERFACE_ENCRYPTED     "org.freedesktop.UDisks2.Encrypted"
-+#define UD2_DBUS_INTERFACE_SWAP          "org.freedesktop.UDisks2.Swapspace"
-+
-+/* errors */
-+#define UD2_ERROR_UNAUTHORIZED            "org.freedesktop.PolicyKit.Error.NotAuthorized"
-+#define UD2_ERROR_BUSY                    "org.freedesktop.UDisks2.Error.DeviceBusy"
-+#define UD2_ERROR_FAILED                  "org.freedesktop.UDisks2.Error.Failed"
-+#define UD2_ERROR_CANCELED                "org.freedesktop.UDisks2.Error.Cancelled"
-+#define UD2_ERROR_INVALID_OPTION          "org.freedesktop.UDisks2.Error.OptionNotPermitted"
-+#define UD2_ERROR_MISSING_DRIVER          "org.freedesktop.UDisks2.Error.NotSupported"
-+
-+#define UD2_ERROR_ALREADY_MOUNTED         "org.freedesktop.UDisks2.Error.AlreadyMounted"
-+#define UD2_ERROR_NOT_MOUNTED             "org.freedesktop.UDisks2.Error.NotMounted"
-+#define UD2_ERROR_MOUNTED_BY_OTHER_USER   "org.freedesktop.UDisks2.Error.MountedByOtherUser"
-+#define UD2_ERROR_ALREADY_UNMOUNTING      "org.freedesktop.UDisks2.Error.AlreadyUnmounting"
-+#define UD2_ERROR_TIMED_OUT               "org.freedesktop.UDisks2.Error.Timedout"
-+#define UD2_ERROR_WOULD_WAKEUP            "org.freedesktop.UDisks2.Error.WouldWakeup"
-+#define UD2_ERROR_ALREADY_CANCELLED       "org.freedesktop.UDisks2.Error.AlreadyCancelled"
-+
-+#define UD2_ERROR_NOT_AUTHORIZED          "org.freedesktop.UDisks2.Error.NotAuthorized"
-+#define UD2_ERROR_NOT_AUTHORIZED_CAN_OBTAIN  "org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain"
-+#define UD2_ERROR_NOT_AUTHORIZED_DISMISSED   "org.freedesktop.UDisks2.Error.NotAuthorizedDismissed"
-+
-+#endif // SOLID_BACKENDS_UDISKS2_H
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksblock.cpp b/tier1/solid/src/solid/backends/udisks2/udisksblock.cpp
-new file mode 100644
-index 0000000..c27b1c4
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksblock.cpp
-@@ -0,0 +1,84 @@
-+/*
-+    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include <linux/kdev_t.h>
-+
-+#include <QFile>
-+#include <QtDBus/QDBusConnection>
-+#include <QtDBus/QDBusPendingReply>
-+
-+#include "udisksblock.h"
-+#include "dbus/manager.h"
-+
-+using namespace Solid::Backends::UDisks2;
-+
-+Block::Block(Device *dev)
-+    : DeviceInterface(dev)
-+{
-+    m_devNum = m_device->prop("DeviceNumber").toULongLong();
-+    m_devFile = QFile::decodeName(m_device->prop("Device").toByteArray());
-+
-+    // we have a drive (non-block device for udisks), so let's find the corresponding (real) block device
-+    if (m_devNum == 0 || m_devFile.isEmpty()) {
-+        org::freedesktop::DBus::ObjectManager manager(UD2_DBUS_SERVICE, UD2_DBUS_PATH, QDBusConnection::systemBus());
-+        QDBusPendingReply<DBUSManagerStruct> reply = manager.GetManagedObjects();
-+        reply.waitForFinished();
-+        if (!reply.isError()) {  // enum devices
-+            Q_FOREACH(const QDBusObjectPath &path, reply.value().keys()) {
-+                const QString udi = path.path();
-+
-+                if (udi == UD2_DBUS_PATH_MANAGER || udi == UD2_UDI_DISKS_PREFIX || udi.startsWith(UD2_DBUS_PATH_JOBS))
-+                    continue;
-+
-+                Device device(udi);
-+                if (device.drivePath() == dev->udi()) {
-+                    m_devNum = device.prop("DeviceNumber").toULongLong();
-+                    m_devFile = QFile::decodeName(device.prop("Device").toByteArray());
-+                    break;
-+                }
-+            }
-+        }
-+        else  // show error
-+        {
-+            qWarning() << "Failed enumerating UDisks2 objects:" << reply.error().name() << "\n" << reply.error().message();
-+        }
-+    }
-+
-+    qDebug() << "devnum:" << m_devNum << "dev file:" << m_devFile;
-+}
-+
-+Block::~Block()
-+{
-+}
-+
-+QString Block::device() const
-+{
-+    return m_devFile;
-+}
-+
-+int Block::deviceMinor() const
-+{
-+    return MINOR(m_devNum);
-+}
-+
-+int Block::deviceMajor() const
-+{
-+    return MAJOR(m_devNum);
-+}
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksblock.h b/tier1/solid/src/solid/backends/udisks2/udisksblock.h
-new file mode 100644
-index 0000000..19cb70a
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksblock.h
-@@ -0,0 +1,56 @@
-+/*
-+    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef UDISKS2BLOCK_H
-+#define UDISKS2BLOCK_H
-+
-+#include <solid/ifaces/block.h>
-+#include "udisksdeviceinterface.h"
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+
-+class Block: public DeviceInterface, virtual public Solid::Ifaces::Block
-+{
-+
-+    Q_OBJECT
-+    Q_INTERFACES(Solid::Ifaces::Block)
-+
-+public:
-+    Block(Device *dev);
-+    virtual ~Block();
-+
-+    virtual QString device() const;
-+    virtual int deviceMinor() const;
-+    virtual int deviceMajor() const;
-+private:
-+    dev_t m_devNum;
-+    QString m_devFile;
-+};
-+
-+}
-+}
-+}
-+
-+#endif // UDISKS2BLOCK_H
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksdevice.cpp b/tier1/solid/src/solid/backends/udisks2/udisksdevice.cpp
-new file mode 100644
-index 0000000..fb74fa2
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksdevice.cpp
-@@ -0,0 +1,910 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include "udisksdevice.h"
-+#include "udisksblock.h"
-+#include "udisksdeviceinterface.h"
-+#include "udisksstoragevolume.h"
-+#include "udisksopticaldisc.h"
-+#include "udisksopticaldrive.h"
-+#include "udisksstorageaccess.h"
-+#include "udisksgenericinterface.h"
-+
-+#include <solid/genericinterface.h>
-+#include <solid/deviceinterface.h>
-+#include <solid/device.h>
-+
-+#include <QtCore/QDebug>
-+
-+#include <QtDBus/QDBusMessage>
-+#include <QtDBus/QDBusMetaType>
-+#include <QtDBus/QDBusPendingReply>
-+#include <QtDBus/QDBusArgument>
-+
-+#include <QtXml/QDomDocument>
-+
-+using namespace Solid::Backends::UDisks2;
-+
-+// Adapted from KLocale as Solid needs to be Qt-only
-+static QString formatByteSize(double size)
-+{
-+    // Per IEC 60027-2
-+
-+    // Binary prefixes
-+    //Tebi-byte             TiB             2^40    1,099,511,627,776 bytes
-+    //Gibi-byte             GiB             2^30    1,073,741,824 bytes
-+    //Mebi-byte             MiB             2^20    1,048,576 bytes
-+    //Kibi-byte             KiB             2^10    1,024 bytes
-+
-+    QString s;
-+    // Gibi-byte
-+    if ( size >= 1073741824.0 )
-+    {
-+        size /= 1073741824.0;
-+        if ( size > 1024 ) // Tebi-byte
-+            s = QObject::tr("%1 TiB").arg(QLocale().toString(size / 1024.0, 'f', 1));
-+        else
-+            s = QObject::tr("%1 GiB").arg(QLocale().toString(size, 'f', 1));
-+    }
-+    // Mebi-byte
-+    else if ( size >= 1048576.0 )
-+    {
-+        size /= 1048576.0;
-+        s = QObject::tr("%1 MiB").arg(QLocale().toString(size, 'f', 1));
-+    }
-+    // Kibi-byte
-+    else if ( size >= 1024.0 )
-+    {
-+        size /= 1024.0;
-+        s = QObject::tr("%1 KiB").arg(QLocale().toString(size, 'f', 1));
-+    }
-+    // Just byte
-+    else if ( size > 0 )
-+    {
-+        s = QObject::tr("%1 B").arg(QLocale().toString(size, 'f', 1));
-+    }
-+    // Nothing
-+    else
-+    {
-+        s = QObject::tr("0 B");
-+    }
-+    return s;
-+}
-+
-+Device::Device(const QString &udi)
-+    : Solid::Ifaces::Device()
-+    , m_udi(udi)
-+{
-+    m_device = new QDBusInterface(UD2_DBUS_SERVICE, m_udi,
-+                                  QString(), // no interface, we aggregate them
-+                                  QDBusConnection::systemBus());
-+
-+    if (m_device->isValid()) {
-+        QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, m_udi, DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
-+                                             SLOT(slotPropertiesChanged(QString,QVariantMap,QStringList)));
-+
-+        QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, UD2_DBUS_PATH, DBUS_INTERFACE_MANAGER, "InterfacesAdded",
-+                                             this, SLOT(slotInterfacesAdded(QDBusObjectPath,QVariantMapMap)));
-+        QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, UD2_DBUS_PATH, DBUS_INTERFACE_MANAGER, "InterfacesRemoved",
-+                                             this, SLOT(slotInterfacesRemoved(QDBusObjectPath,QStringList)));
-+
-+        initInterfaces();
-+    }
-+}
-+
-+Device::~Device()
-+{
-+    delete m_device;
-+}
-+
-+QObject* Device::createDeviceInterface(const Solid::DeviceInterface::Type& type)
-+{
-+    if (!queryDeviceInterface(type)) {
-+        return 0;
-+    }
-+
-+    DeviceInterface *iface = 0;
-+    switch (type)
-+    {
-+    case Solid::DeviceInterface::GenericInterface:
-+        iface = new GenericInterface(this);
-+        break;
-+    case Solid::DeviceInterface::Block:
-+        iface = new Block(this);
-+        break;
-+    case Solid::DeviceInterface::StorageAccess:
-+        iface = new StorageAccess(this);
-+        break;
-+    case Solid::DeviceInterface::StorageDrive:
-+        iface = new StorageDrive(this);
-+        break;
-+    case Solid::DeviceInterface::OpticalDrive:
-+        iface = new OpticalDrive(this);
-+        break;
-+    case Solid::DeviceInterface::StorageVolume:
-+        iface = new StorageVolume(this);
-+        break;
-+    case Solid::DeviceInterface::OpticalDisc:
-+        iface = new OpticalDisc(this);
-+        break;
-+    default:
-+        break;
-+    }
-+    return iface;
-+}
-+
-+bool Device::queryDeviceInterface(const Solid::DeviceInterface::Type& type) const
-+{
-+    switch (type) {
-+    case Solid::DeviceInterface::GenericInterface:
-+        return true;
-+    case Solid::DeviceInterface::Block:
-+        return isBlock();
-+    case Solid::DeviceInterface::StorageVolume:
-+        return isStorageVolume();
-+    case Solid::DeviceInterface::StorageAccess:
-+        return isStorageAccess();
-+    case Solid::DeviceInterface::StorageDrive:
-+        return isDrive();
-+    case Solid::DeviceInterface::OpticalDrive:
-+        return isOpticalDrive();
-+    case Solid::DeviceInterface::OpticalDisc:
-+        return isOpticalDisc();
-+    default:
-+        return false;
-+    }
-+}
-+
-+QStringList Device::emblems() const
-+{
-+    QStringList res;
-+
-+    if (queryDeviceInterface(Solid::DeviceInterface::StorageAccess))
-+    {
-+        const UDisks2::StorageAccess accessIface(const_cast<Device *>(this));
-+        if (accessIface.isAccessible())
-+        {
-+            if (isEncryptedContainer())
-+                res << "emblem-encrypted-unlocked";
-+            else
-+                res << "emblem-mounted";
-+        }
-+        else
-+        {
-+            if (isEncryptedContainer())
-+                res << "emblem-encrypted-locked";
-+            else
-+                res << "emblem-unmounted";
-+        }
-+    }
-+
-+    return res;
-+}
-+
-+QString Device::description() const
-+{
-+    const QString hintName = prop("HintName").toString();
-+    if (!hintName.isEmpty())
-+        return hintName;
-+
-+    if (queryDeviceInterface(Solid::DeviceInterface::StorageDrive))
-+        return storageDescription();
-+    else if (queryDeviceInterface(Solid::DeviceInterface::StorageVolume))
-+        return volumeDescription();
-+    else
-+        return product();
-+}
-+
-+QString Device::storageDescription() const
-+{
-+    QString description;
-+    const UDisks2::StorageDrive storageDrive(const_cast<Device*>(this));
-+    Solid::StorageDrive::DriveType drive_type = storageDrive.driveType();
-+    bool drive_is_hotpluggable = storageDrive.isHotpluggable();
-+
-+    if (drive_type == Solid::StorageDrive::CdromDrive)
-+    {
-+        const UDisks2::OpticalDrive opticalDrive(const_cast<Device*>(this));
-+        Solid::OpticalDrive::MediumTypes mediumTypes = opticalDrive.supportedMedia();
-+        QString first;
-+        QString second;
-+
-+        first = QObject::tr("CD-ROM", "First item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::Cdr)
-+            first = QObject::tr("CD-R", "First item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::Cdrw)
-+            first = QObject::tr("CD-RW", "First item of %1%2 Drive sentence");
-+
-+        if (mediumTypes & Solid::OpticalDrive::Dvd)
-+            second = QObject::tr("/DVD-ROM", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::Dvdplusr)
-+            second = QObject::tr("/DVD+R", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::Dvdplusrw)
-+            second = QObject::tr("/DVD+RW", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::Dvdr)
-+            second = QObject::tr("/DVD-R", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::Dvdrw)
-+            second = QObject::tr("/DVD-RW", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::Dvdram)
-+            second = QObject::tr("/DVD-RAM", "Second item of %1%2 Drive sentence");
-+        if ((mediumTypes & Solid::OpticalDrive::Dvdr) && (mediumTypes & Solid::OpticalDrive::Dvdplusr))
-+        {
-+            if(mediumTypes & Solid::OpticalDrive::Dvdplusdl)
-+                second = QObject::trUtf8("/DVD±R DL", "Second item of %1%2 Drive sentence");
-+            else
-+                second = QObject::trUtf8("/DVD±R", "Second item of %1%2 Drive sentence");
-+        }
-+        if ((mediumTypes & Solid::OpticalDrive::Dvdrw) && (mediumTypes & Solid::OpticalDrive::Dvdplusrw))
-+        {
-+            if((mediumTypes & Solid::OpticalDrive::Dvdplusdl) || (mediumTypes & Solid::OpticalDrive::Dvdplusdlrw))
-+                second = QObject::trUtf8("/DVD±RW DL", "Second item of %1%2 Drive sentence");
-+            else
-+                second = QObject::trUtf8("/DVD±RW", "Second item of %1%2 Drive sentence");
-+        }
-+        if (mediumTypes & Solid::OpticalDrive::Bd)
-+            second = QObject::tr("/BD-ROM", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::Bdr)
-+            second = QObject::tr("/BD-R", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::Bdre)
-+            second = QObject::tr("/BD-RE", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::HdDvd)
-+            second = QObject::tr("/HD DVD-ROM", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::HdDvdr)
-+            second = QObject::tr("/HD DVD-R", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::HdDvdrw)
-+            second = QObject::tr("/HD DVD-RW", "Second item of %1%2 Drive sentence");
-+
-+        if (drive_is_hotpluggable)
-+            description = QObject::tr("External %1%2 Drive", "%1 is CD-ROM/CD-R/etc; %2 is '/DVD-ROM'/'/DVD-R'/etc (with leading slash)").arg(first).arg(second);
-+        else
-+            description = QObject::tr("%1%2 Drive", "%1 is CD-ROM/CD-R/etc; %2 is '/DVD-ROM'/'/DVD-R'/etc (with leading slash)").arg(first).arg(second);
-+
-+        return description;
-+    }
-+
-+    if (drive_type == Solid::StorageDrive::Floppy)
-+    {
-+        if (drive_is_hotpluggable)
-+            description = QObject::tr("External Floppy Drive");
-+        else
-+            description = QObject::tr("Floppy Drive");
-+
-+        return description;
-+    }
-+
-+    bool drive_is_removable = storageDrive.isRemovable();
-+
-+    if (drive_type == Solid::StorageDrive::HardDisk && !drive_is_removable)
-+    {
-+        QString size_str = formatByteSize(storageDrive.size());
-+        if (!size_str.isEmpty())
-+        {
-+            if (drive_is_hotpluggable)
-+                description = QObject::tr("%1 External Hard Drive", "%1 is the size").arg(size_str);
-+            else
-+                description = QObject::tr("%1 Hard Drive", "%1 is the size").arg(size_str);
-+        } else {
-+            if (drive_is_hotpluggable)
-+                description = QObject::tr("External Hard Drive");
-+            else
-+                description = QObject::tr("Hard Drive");
-+        }
-+
-+        return description;
-+    }
-+
-+    QString vendormodel_str;
-+    QString model = product();
-+    QString vendor_str = vendor();
-+
-+    if (vendor_str.isEmpty())
-+    {
-+        if (!model.isEmpty())
-+            vendormodel_str = model;
-+    }
-+    else
-+    {
-+        if (model.isEmpty())
-+            vendormodel_str = vendor_str;
-+        else
-+        {
-+            if (model.startsWith(vendor_str))
-+            {
-+                // e.g. vendor is "Nokia" and model is "Nokia N950" we do not want "Nokia Nokia N950" as description
-+                vendormodel_str = model;
-+            }
-+            else
-+            {
-+                vendormodel_str = QObject::tr("%1 %2", "%1 is the vendor, %2 is the model of the device").arg(vendor_str).arg(model);
-+            }
-+        }
-+    }
-+
-+    if (vendormodel_str.isEmpty())
-+        description = QObject::tr("Drive");
-+    else
-+        description = vendormodel_str;
-+
-+    return description;
-+}
-+
-+QString Device::volumeDescription() const
-+{
-+    QString description;
-+    const UDisks2::StorageVolume storageVolume(const_cast<Device*>(this));
-+    QString volume_label = prop("IdLabel").toString();
-+    if (volume_label.isEmpty())
-+        volume_label = prop("Name").toString();
-+    if (!volume_label.isEmpty())
-+        return volume_label;
-+
-+    UDisks2::Device storageDevice(drivePath());
-+    const UDisks2::StorageDrive storageDrive(&storageDevice);
-+    Solid::StorageDrive::DriveType drive_type = storageDrive.driveType();
-+
-+    // Handle media in optical drives
-+    if (drive_type == Solid::StorageDrive::CdromDrive)
-+    {
-+        const UDisks2::OpticalDisc disc(const_cast<Device*>(this));
-+        switch (disc.discType())
-+        {
-+            case Solid::OpticalDisc::UnknownDiscType:
-+            case Solid::OpticalDisc::CdRom:
-+                description = QObject::tr("CD-ROM");
-+                break;
-+
-+            case Solid::OpticalDisc::CdRecordable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank CD-R");
-+                else
-+                    description = QObject::tr("CD-R");
-+                break;
-+
-+            case Solid::OpticalDisc::CdRewritable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank CD-RW");
-+                else
-+                    description = QObject::tr("CD-RW");
-+                break;
-+
-+            case Solid::OpticalDisc::DvdRom:
-+                description = QObject::tr("DVD-ROM");
-+                break;
-+
-+            case Solid::OpticalDisc::DvdRam:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank DVD-RAM");
-+                else
-+                    description = QObject::tr("DVD-RAM");
-+                break;
-+
-+            case Solid::OpticalDisc::DvdRecordable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank DVD-R");
-+                else
-+                    description = QObject::tr("DVD-R");
-+                break;
-+
-+            case Solid::OpticalDisc::DvdPlusRecordableDuallayer:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank DVD+R Dual-Layer");
-+                else
-+                    description = QObject::tr("DVD+R Dual-Layer");
-+                break;
-+
-+            case Solid::OpticalDisc::DvdRewritable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank DVD-RW");
-+                else
-+                    description = QObject::tr("DVD-RW");
-+                break;
-+
-+            case Solid::OpticalDisc::DvdPlusRecordable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank DVD+R");
-+                else
-+                    description = QObject::tr("DVD+R");
-+                break;
-+
-+            case Solid::OpticalDisc::DvdPlusRewritable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank DVD+RW");
-+                else
-+                    description = QObject::tr("DVD+RW");
-+                break;
-+
-+            case Solid::OpticalDisc::DvdPlusRewritableDuallayer:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank DVD+RW Dual-Layer");
-+                else
-+                    description = QObject::tr("DVD+RW Dual-Layer");
-+                break;
-+
-+            case Solid::OpticalDisc::BluRayRom:
-+                description = QObject::tr("BD-ROM");
-+                break;
-+
-+            case Solid::OpticalDisc::BluRayRecordable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank BD-R");
-+                else
-+                    description = QObject::tr("BD-R");
-+                break;
-+
-+            case Solid::OpticalDisc::BluRayRewritable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank BD-RE");
-+                else
-+                    description = QObject::tr("BD-RE");
-+                break;
-+
-+            case Solid::OpticalDisc::HdDvdRom:
-+                description = QObject::tr("HD DVD-ROM");
-+                break;
-+
-+            case Solid::OpticalDisc::HdDvdRecordable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank HD DVD-R");
-+                else
-+                    description = QObject::tr("HD DVD-R");
-+                break;
-+
-+            case Solid::OpticalDisc::HdDvdRewritable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank HD DVD-RW");
-+                else
-+                    description = QObject::tr("HD DVD-RW");
-+                break;
-+            }
-+
-+        // Special case for pure audio disc
-+        if (disc.availableContent() == Solid::OpticalDisc::Audio)
-+            description = QObject::tr("Audio CD");
-+
-+        return description;
-+    }
-+
-+    const bool drive_is_removable = storageDrive.isRemovable();
-+    const bool drive_is_hotpluggable = storageDrive.isHotpluggable();
-+
-+    QString size_str = formatByteSize(storageVolume.size());
-+    if (isEncryptedContainer())
-+    {
-+        if (!size_str.isEmpty())
-+            description = QObject::tr("%1 Encrypted Container", "%1 is the size").arg(size_str);
-+        else
-+            description = QObject::tr("Encrypted Container");
-+    }
-+    else if (drive_type == Solid::StorageDrive::HardDisk && !drive_is_removable)
-+    {
-+        if (!size_str.isEmpty())
-+        {
-+            if (drive_is_hotpluggable)
-+                description = QObject::tr("%1 External Hard Drive", "%1 is the size").arg(size_str);
-+            else
-+                description = QObject::tr("%1 Hard Drive", "%1 is the size").arg(size_str);
-+        }
-+        else
-+        {
-+            if (drive_is_hotpluggable)
-+                description = QObject::tr("External Hard Drive");
-+            else
-+                description = QObject::tr("Hard Drive");
-+        }
-+    }
-+    else
-+    {
-+        if (drive_is_removable)
-+            description = QObject::tr("%1 Removable Media", "%1 is the size").arg(size_str);
-+        else
-+            description = QObject::tr("%1 Media", "%1 is the size").arg(size_str);
-+    }
-+
-+    return description;
-+}
-+
-+QString Device::icon() const
-+{
-+    QString iconName = prop( "HintIconName" ).toString();
-+
-+    if ( !iconName.isEmpty() )
-+    {
-+        return iconName;
-+    }
-+    else if (isDrive()) {
-+        const bool isRemovable = prop("Removable").toBool();
-+        const QString conn = prop("ConnectionBus").toString();
-+
-+        if (isOpticalDrive())
-+            return "drive-optical";
-+        else if (isRemovable && !isOpticalDisc()) {
-+            if (conn == "usb")
-+                return "drive-removable-media-usb";
-+            else
-+                return "drive-removable-media";
-+        }
-+    }
-+    else if (isBlock()) {
-+        Device drive(drivePath());
-+
-+        // handle media
-+        const QString media = drive.prop("Media").toString();
-+
-+        if ( !media.isEmpty() )
-+        {
-+            if ( isOpticalDisc() )    // optical stuff
-+            {
-+                bool isWritable = drive.prop("OpticalBlank").toBool();
-+
-+                const UDisks2::OpticalDisc disc(const_cast<Device*>(this));
-+                Solid::OpticalDisc::ContentTypes availContent = disc.availableContent();
-+
-+                if (availContent & Solid::OpticalDisc::VideoDvd) // Video DVD
-+                    return "media-optical-dvd-video";
-+                else if ((availContent & Solid::OpticalDisc::VideoCd) || (availContent & Solid::OpticalDisc::SuperVideoCd)) // Video CD
-+                    return "media-optical-video";
-+                else if ((availContent & Solid::OpticalDisc::Data) && (availContent & Solid::OpticalDisc::Audio)) // Mixed CD
-+                    return "media-optical-mixed-cd";
-+                else if (availContent & Solid::OpticalDisc::Audio) // Audio CD
-+                    return "media-optical-audio";
-+                else if (availContent & Solid::OpticalDisc::Data) // Data CD
-+                    return "media-optical-data";
-+                else if ( isWritable )
-+                    return "media-optical-recordable";
-+                else
-+                {
-+                    if ( media.startsWith( "optical_dvd" ) || media.startsWith( "optical_hddvd" ) ) // DVD
-+                        return "media-optical-dvd";
-+                    else if ( media.startsWith( "optical_bd" ) ) // BluRay
-+                        return "media-optical-blu-ray";
-+                }
-+
-+                // fallback for every other optical disc
-+                return "media-optical";
-+            }
-+
-+            if ( media == "flash_ms" ) // Flash & Co.
-+                return "media-flash-memory-stick";
-+            else if ( media == "flash_sd" || media == "flash_sdhc" || media == "flash_sdxc" || media == "flash_mmc" )
-+                return "media-flash-sd-mmc";
-+            else if ( media == "flash_sm" )
-+                return "media-flash-smart-media";
-+            else if ( media == "thumb" )
-+                return "drive-removable-media-usb-pendrive";
-+            else if ( media.startsWith( "flash" ) )
-+                return "media-flash";
-+            else if ( media == "floppy" ) // the good ol' floppy
-+                return "media-floppy";
-+        }
-+
-+        if (drive.prop("ConnectionBus").toString() == "sdio")  // hack for SD cards connected thru sdio bus
-+            return "media-flash-sd-mmc";
-+
-+        return drive.icon();
-+    }
-+
-+    return "drive-harddisk";    // general fallback
-+}
-+
-+QString Device::product() const
-+{
-+    QString product = prop("Model").toString();
-+
-+    if (!isDrive()) {
-+        QString label = prop("IdLabel").toString();
-+        if (!label.isEmpty()) {
-+            product = label;
-+        }
-+    }
-+
-+    return product;
-+}
-+
-+QString Device::vendor() const
-+{
-+    return prop("Vendor").toString();
-+}
-+
-+QString Device::udi() const
-+{
-+    return m_udi;
-+}
-+
-+QString Device::parentUdi() const
-+{
-+    QString parent;
-+
-+    if (isEncryptedContainer())
-+        parent = prop("CryptoBackingDevice").value<QDBusObjectPath>().path();
-+    else if (propertyExists("Drive"))  // block
-+        parent = prop("Drive").value<QDBusObjectPath>().path();
-+    else if (propertyExists("Table"))  // partition
-+        parent = prop("Table").value<QDBusObjectPath>().path();
-+    else if (parent.isEmpty() || parent=="/") {
-+        parent = UD2_UDI_DISKS_PREFIX;
-+    }
-+    return parent;
-+}
-+
-+void Device::checkCache(const QString &key) const
-+{
-+    if (m_cache.isEmpty()) // recreate the cache
-+        allProperties();
-+
-+    if (m_cache.contains(key))
-+        return;
-+
-+    QVariant reply = m_device->property(key.toUtf8());
-+
-+    if (reply.isValid()) {
-+        m_cache.insert(key, reply);
-+    } else {
-+        //qDebug() << "got invalid reply for cache:" << key;
-+        //m_cache.insert(key, QVariant());
-+    }
-+}
-+
-+QString Device::introspect() const
-+{
-+    QDBusMessage call = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_udi,
-+                                                       DBUS_INTERFACE_INTROSPECT, "Introspect");
-+    QDBusPendingReply<QString> reply = QDBusConnection::systemBus().asyncCall(call);
-+    reply.waitForFinished();
-+
-+    if (reply.isValid())
-+        return reply.value();
-+    else {
-+        return QString();
-+    }
-+}
-+
-+QVariant Device::prop(const QString &key) const
-+{
-+    checkCache(key);
-+    return m_cache.value(key);
-+}
-+
-+bool Device::propertyExists(const QString &key) const
-+{
-+    checkCache(key);
-+    return m_cache.contains(key);
-+}
-+
-+QVariantMap Device::allProperties() const
-+{
-+    Q_FOREACH (const QString & iface, m_interfaces) {
-+        if (iface.startsWith("org.freedesktop.DBus"))
-+            continue;
-+        QDBusMessage call = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_udi, DBUS_INTERFACE_PROPS, "GetAll");
-+        call << iface;
-+        QDBusPendingReply<QVariantMap> reply = QDBusConnection::systemBus().asyncCall(call);
-+        reply.waitForFinished();
-+
-+        if (reply.isValid())
-+            m_cache.unite(reply.value());
-+        else
-+            qWarning() << "Error getting props:" << reply.error().name() << reply.error().message();
-+        //qDebug() << "After iface" << iface << ", cache now contains" << m_cache.size() << "items";
-+    }
-+
-+    return m_cache;
-+}
-+
-+bool Device::hasInterface(const QString &name) const
-+{
-+    return m_interfaces.contains(name);
-+}
-+
-+QStringList Device::interfaces() const
-+{
-+    return m_interfaces;
-+}
-+
-+void Device::initInterfaces()
-+{
-+    m_interfaces.clear();
-+    const QString xmlData = introspect();
-+    QDomDocument dom;
-+    dom.setContent(xmlData);
-+    QDomNodeList ifaceNodeList = dom.elementsByTagName("interface");
-+    for (int i = 0; i < ifaceNodeList.count(); i++) {
-+        QDomElement ifaceElem = ifaceNodeList.item(i).toElement();
-+        if (!ifaceElem.isNull())
-+            m_interfaces.append(ifaceElem.attribute("name"));
-+    }
-+    //qDebug() << "Device" << m_udi << "has interfaces:" << m_interfaces;
-+}
-+
-+void Device::slotPropertiesChanged(const QString &ifaceName, const QVariantMap &changedProps, const QStringList &invalidatedProps)
-+{
-+    //Q_UNUSED(ifaceName);
-+
-+    qDebug() << m_udi << "'s interface" << ifaceName << "changed props:";
-+
-+    QMap<QString, int> changeMap;
-+
-+    Q_FOREACH(const QString & key, invalidatedProps) {
-+        m_cache.remove(key);
-+        changeMap.insert(key, Solid::GenericInterface::PropertyRemoved);
-+        qDebug() << "\t invalidated:" << key;
-+    }
-+
-+    QMapIterator<QString, QVariant> i(changedProps);
-+    while (i.hasNext()) {
-+        i.next();
-+        const QString key = i.key();
-+        m_cache.insert(key, i.value());  // replace the value
-+        changeMap.insert(key, Solid::GenericInterface::PropertyModified);
-+        qDebug() << "\t modified:" << key << ":" << m_cache.value(key);
-+    }
-+
-+    Q_EMIT propertyChanged(changeMap);
-+    Q_EMIT changed();
-+}
-+
-+void Device::slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties)
-+{
-+    if (object_path.path() == m_udi) {
-+        m_interfaces.append(interfaces_and_properties.keys());
-+    }
-+}
-+
-+void Device::slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces)
-+{
-+    if (object_path.path() == m_udi) {
-+        Q_FOREACH(const QString & iface, interfaces) {
-+            m_interfaces.removeAll(iface);
-+        }
-+    }
-+}
-+
-+
-+QString Device::errorToString(const QString & error) const
-+{
-+    if (error == UD2_ERROR_UNAUTHORIZED || error == UD2_ERROR_NOT_AUTHORIZED)
-+        return QObject::tr("You are not authorized to perform this operation");
-+    else if (error == UD2_ERROR_BUSY)
-+        return QObject::tr("The device is currently busy");
-+    else if (error == UD2_ERROR_FAILED)
-+        return QObject::tr("The requested operation has failed");
-+    else if (error == UD2_ERROR_CANCELED)
-+        return QObject::tr("The requested operation has been canceled");
-+    else if (error == UD2_ERROR_INVALID_OPTION)
-+        return QObject::tr("An invalid or malformed option has been given");
-+    else if (error == UD2_ERROR_MISSING_DRIVER)
-+        return QObject::tr("The kernel driver for this filesystem type is not available");
-+    else if (error == UD2_ERROR_ALREADY_MOUNTED)
-+        return QObject::tr("The device is already mounted");
-+    else if (error == UD2_ERROR_NOT_MOUNTED)
-+        return QObject::tr("The device is not mounted");
-+    else if (error == UD2_ERROR_MOUNTED_BY_OTHER_USER)
-+        return QObject::tr("The device is mounted by another user");
-+    else if (error == UD2_ERROR_ALREADY_UNMOUNTING)
-+        return QObject::tr("The device is already unmounting");
-+    else if (error == UD2_ERROR_TIMED_OUT)
-+        return QObject::tr("The operation timed out");
-+    else if (error == UD2_ERROR_WOULD_WAKEUP)
-+        return QObject::tr("The operation would wake up a disk that is in a deep-sleep state");
-+    else if (error == UD2_ERROR_ALREADY_CANCELLED)
-+        return QObject::tr("The operation has already been canceled");
-+    else
-+        return QObject::tr("An unspecified error has occurred");
-+}
-+
-+Solid::ErrorType Device::errorToSolidError(const QString & error) const
-+{
-+    if (error == UD2_ERROR_BUSY)
-+        return Solid::DeviceBusy;
-+    else if (error == UD2_ERROR_FAILED)
-+        return Solid::OperationFailed;
-+    else if (error == UD2_ERROR_CANCELED)
-+        return Solid::UserCanceled;
-+    else if (error == UD2_ERROR_INVALID_OPTION)
-+        return Solid::InvalidOption;
-+    else if (error == UD2_ERROR_MISSING_DRIVER)
-+        return Solid::MissingDriver;
-+    else
-+        return Solid::UnauthorizedOperation;
-+}
-+
-+bool Device::isBlock() const
-+{
-+    return hasInterface(UD2_DBUS_INTERFACE_BLOCK);
-+}
-+
-+bool Device::isPartition() const
-+{
-+    return hasInterface(UD2_DBUS_INTERFACE_PARTITION);
-+}
-+
-+bool Device::isPartitionTable() const
-+{
-+    return hasInterface(UD2_DBUS_INTERFACE_PARTITIONTABLE);
-+}
-+
-+bool Device::isStorageVolume() const
-+{
-+    return isPartition() || isPartitionTable() || isStorageAccess() || isOpticalDisc();
-+}
-+
-+bool Device::isStorageAccess() const
-+{
-+    return hasInterface(UD2_DBUS_INTERFACE_FILESYSTEM) || isEncryptedContainer();
-+}
-+
-+bool Device::isDrive() const
-+{
-+    return hasInterface(UD2_DBUS_INTERFACE_DRIVE);
-+}
-+
-+bool Device::isOpticalDrive() const
-+{
-+    return isDrive() && !prop("MediaCompatibility").toStringList().filter("optical_").isEmpty();
-+}
-+
-+bool Device::isOpticalDisc() const
-+{
-+    const QString drv = drivePath();
-+    if (drv.isEmpty() || drv == "/")
-+        return false;
-+
-+    Device drive(drv);
-+    return drive.prop("Optical").toBool();
-+}
-+
-+bool Device::mightBeOpticalDisc() const
-+{
-+    const QString drv = drivePath();
-+    if (drv.isEmpty() || drv == "/")
-+        return false;
-+
-+    Device drive(drv);
-+    return drive.isOpticalDrive();
-+}
-+
-+bool Device::isMounted() const
-+{
-+    return propertyExists("MountPoints") && !qdbus_cast<QByteArrayList>(prop("MountPoints")).isEmpty();
-+}
-+
-+bool Device::isEncryptedContainer() const
-+{
-+    return hasInterface(UD2_DBUS_INTERFACE_ENCRYPTED);
-+}
-+
-+bool Device::isEncryptedCleartext() const
-+{
-+    const QString holderDevice = prop("CryptoBackingDevice").toString();
-+    if (holderDevice.isEmpty() || holderDevice == "/")
-+        return false;
-+    else
-+        return true;
-+}
-+
-+bool Device::isSwap() const
-+{
-+    return hasInterface(UD2_DBUS_INTERFACE_SWAP);
-+}
-+
-+QString Device::drivePath() const
-+{
-+    return prop("Drive").value<QDBusObjectPath>().path();
-+}
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksdevice.h b/tier1/solid/src/solid/backends/udisks2/udisksdevice.h
-new file mode 100644
-index 0000000..cf8e2f5
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksdevice.h
-@@ -0,0 +1,112 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef UDISKS2DEVICE_H
-+#define UDISKS2DEVICE_H
-+
-+#include "udisks2.h"
-+
-+#include <ifaces/device.h>
-+#include <solid/deviceinterface.h>
-+#include <solid/solidnamespace.h>
-+
-+#include <QtDBus/QDBusInterface>
-+#include <QtDBus/QDBusObjectPath>
-+#include <QtCore/QStringList>
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+
-+class Device: public Solid::Ifaces::Device
-+{
-+    Q_OBJECT
-+public:
-+    Device(const QString &udi);
-+    virtual ~Device();
-+
-+    virtual QObject* createDeviceInterface(const Solid::DeviceInterface::Type& type);
-+    virtual bool queryDeviceInterface(const Solid::DeviceInterface::Type& type) const;
-+    virtual QString description() const;
-+    virtual QStringList emblems() const;
-+    virtual QString icon() const;
-+    virtual QString product() const;
-+    virtual QString vendor() const;
-+    virtual QString udi() const;
-+    virtual QString parentUdi() const;
-+
-+    QVariant prop(const QString &key) const;
-+    bool propertyExists(const QString &key) const;
-+    QVariantMap allProperties() const;
-+
-+    bool hasInterface(const QString & name) const;
-+    QStringList interfaces() const;
-+
-+    QString errorToString(const QString & error) const;
-+    Solid::ErrorType errorToSolidError(const QString & error) const;
-+
-+    bool isBlock() const;
-+    bool isPartition() const;
-+    bool isPartitionTable() const;
-+    bool isStorageVolume() const;
-+    bool isStorageAccess() const;
-+    bool isDrive() const;
-+    bool isOpticalDrive() const;
-+    bool isOpticalDisc() const;
-+    bool mightBeOpticalDisc() const;
-+    bool isMounted() const;
-+    bool isEncryptedContainer() const;
-+    bool isEncryptedCleartext() const;
-+    bool isSwap() const;
-+
-+    QString drivePath() const;
-+
-+Q_SIGNALS:
-+    void changed();
-+    void propertyChanged(const QMap<QString,int> &changes);
-+
-+private Q_SLOTS:
-+    void slotPropertiesChanged(const QString & ifaceName, const QVariantMap & changedProps, const QStringList & invalidatedProps);
-+    void slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties);
-+    void slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces);
-+
-+private:
-+    QString storageDescription() const;
-+    QString volumeDescription() const;
-+    mutable QDBusInterface *m_device;
-+    QString m_udi;
-+    mutable QVariantMap m_cache;
-+
-+    void initInterfaces();
-+    QStringList m_interfaces;
-+
-+    void checkCache(const QString &key) const;
-+    QString introspect() const;
-+};
-+
-+}
-+}
-+}
-+
-+#endif // UDISKS2DEVICE_H
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksdeviceinterface.cpp b/tier1/solid/src/solid/backends/udisks2/udisksdeviceinterface.cpp
-new file mode 100644
-index 0000000..9fa60e5
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksdeviceinterface.cpp
-@@ -0,0 +1,33 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include "udisksdeviceinterface.h"
-+
-+using namespace Solid::Backends::UDisks2;
-+
-+DeviceInterface::DeviceInterface(Device *device)
-+    : QObject(device), m_device(device)
-+{
-+
-+}
-+
-+DeviceInterface::~DeviceInterface()
-+{
-+}
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksdeviceinterface.h b/tier1/solid/src/solid/backends/udisks2/udisksdeviceinterface.h
-new file mode 100644
-index 0000000..43a1b6f
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksdeviceinterface.h
-@@ -0,0 +1,148 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef UDISKS2DEVICEINTERFACE_H
-+#define UDISKS2DEVICEINTERFACE_H
-+
-+#include <ifaces/deviceinterface.h>
-+#include "udisksdevice.h"
-+
-+#include <QtCore/QObject>
-+#include <QtCore/QStringList>
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+
-+class DeviceInterface : public QObject, virtual public Solid::Ifaces::DeviceInterface
-+{
-+    Q_OBJECT
-+    Q_INTERFACES(Solid::Ifaces::DeviceInterface)
-+public:
-+    DeviceInterface(Device *device);
-+    virtual ~DeviceInterface();
-+
-+protected:
-+    Device *m_device;
-+
-+public:
-+    inline static QStringList toStringList(Solid::DeviceInterface::Type type)
-+    {
-+        QStringList list;
-+
-+        switch(type)
-+        {
-+        case Solid::DeviceInterface::GenericInterface:
-+            list << "generic";
-+            break;
-+        case Solid::DeviceInterface::Processor:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::Block:
-+            list << "block";
-+            break;
-+        case Solid::DeviceInterface::StorageAccess:
-+            list << "volume";
-+            break;
-+        case Solid::DeviceInterface::StorageDrive:
-+            list << "storage";
-+            break;
-+        case Solid::DeviceInterface::OpticalDrive:
-+            list << "storage.cdrom";
-+            break;
-+        case Solid::DeviceInterface::StorageVolume:
-+            list << "volume";
-+            break;
-+        case Solid::DeviceInterface::OpticalDisc:
-+            list << "volume.disc";
-+            break;
-+        case Solid::DeviceInterface::Camera:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::PortableMediaPlayer:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::NetworkInterface:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::AcAdapter:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::Battery:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::Button:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::AudioInterface:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::DvbInterface:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::Video:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::SerialInterface:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::InternetGateway:
-+            break;
-+        case Solid::DeviceInterface::SmartCardReader:
-+            // Doesn't exist with UDisks
-+        case Solid::DeviceInterface::NetworkShare:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::Unknown:
-+            break;
-+        case Solid::DeviceInterface::Last:
-+            break;
-+        }
-+
-+        return list;
-+    }
-+
-+    inline static Solid::DeviceInterface::Type fromString(const QString &capability)
-+    {
-+        if (capability == "generic")
-+            return Solid::DeviceInterface::GenericInterface;
-+        else if (capability == "block")
-+            return Solid::DeviceInterface::Block;
-+        else if (capability == "storage")
-+            return Solid::DeviceInterface::StorageDrive;
-+        else if (capability == "storage.cdrom")
-+            return Solid::DeviceInterface::OpticalDrive;
-+        else if (capability == "volume")
-+            return Solid::DeviceInterface::StorageVolume;
-+        else if (capability == "volume.disc")
-+            return Solid::DeviceInterface::OpticalDisc;
-+        else
-+            return Solid::DeviceInterface::Unknown;
-+    }
-+};
-+
-+}
-+}
-+}
-+
-+#endif // UDISKS2DEVICEINTERFACE_H
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksgenericinterface.cpp b/tier1/solid/src/solid/backends/udisks2/udisksgenericinterface.cpp
-new file mode 100644
-index 0000000..2d8cea2
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksgenericinterface.cpp
-@@ -0,0 +1,53 @@
-+/*
-+    Copyright 2009 Pino Toscano <pino@kde.org>
-+    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include "udisksgenericinterface.h"
-+
-+#include "udisksdevice.h"
-+
-+using namespace Solid::Backends::UDisks2;
-+
-+GenericInterface::GenericInterface(Device *device)
-+    : DeviceInterface(device)
-+{
-+    connect(device, SIGNAL(propertyChanged(QMap<QString,int>)),
-+            this, SIGNAL(propertyChanged(QMap<QString,int>)));
-+}
-+
-+GenericInterface::~GenericInterface()
-+{
-+}
-+
-+QVariant GenericInterface::property(const QString &key) const
-+{
-+    return m_device->prop(key);
-+}
-+
-+QVariantMap GenericInterface::allProperties() const
-+{
-+    return m_device->allProperties();
-+}
-+
-+bool GenericInterface::propertyExists(const QString &key) const
-+{
-+    return m_device->propertyExists(key);
-+}
-+
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksgenericinterface.h b/tier1/solid/src/solid/backends/udisks2/udisksgenericinterface.h
-new file mode 100644
-index 0000000..d225f32
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksgenericinterface.h
-@@ -0,0 +1,57 @@
-+/*
-+    Copyright 2009 Pino Toscano <pino@kde.org>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef SOLID_BACKENDS_UDISKS2_GENERICINTERFACE_H
-+#define SOLID_BACKENDS_UDISKS2_GENERICINTERFACE_H
-+
-+#include <solid/ifaces/genericinterface.h>
-+#include <solid/genericinterface.h>
-+#include "udisksdeviceinterface.h"
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+class Device;
-+
-+class GenericInterface : public DeviceInterface, virtual public Solid::Ifaces::GenericInterface
-+{
-+    Q_OBJECT
-+    Q_INTERFACES(Solid::Ifaces::GenericInterface)
-+
-+public:
-+    GenericInterface(Device *device);
-+    virtual ~GenericInterface();
-+
-+    virtual QVariant property(const QString &key) const;
-+    virtual QVariantMap allProperties() const;
-+    virtual bool propertyExists(const QString &key) const;
-+
-+Q_SIGNALS:
-+    void propertyChanged(const QMap<QString, int> &changes);
-+    void conditionRaised(const QString &condition, const QString &reason);
-+};
-+}
-+}
-+}
-+
-+#endif // SOLID_BACKENDS_UDISKS2_GENERICINTERFACE_H
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksmanager.cpp b/tier1/solid/src/solid/backends/udisks2/udisksmanager.cpp
-new file mode 100644
-index 0000000..9af8ee2
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksmanager.cpp
-@@ -0,0 +1,227 @@
-+/*
-+    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include "udisksmanager.h"
-+
-+#include <QtCore/QDebug>
-+#include <QtDBus>
-+
-+#include "../shared/rootdevice.h"
-+
-+using namespace Solid::Backends::UDisks2;
-+using namespace Solid::Backends::Shared;
-+
-+Manager::Manager(QObject *parent)
-+    : Solid::Ifaces::DeviceManager(parent),
-+      m_manager(UD2_DBUS_SERVICE,
-+                UD2_DBUS_PATH,
-+                QDBusConnection::systemBus())
-+{
-+    m_supportedInterfaces
-+            << Solid::DeviceInterface::GenericInterface
-+            << Solid::DeviceInterface::Block
-+            << Solid::DeviceInterface::StorageAccess
-+            << Solid::DeviceInterface::StorageDrive
-+            << Solid::DeviceInterface::OpticalDrive
-+            << Solid::DeviceInterface::OpticalDisc
-+            << Solid::DeviceInterface::StorageVolume;
-+
-+    qDBusRegisterMetaType<QList<QDBusObjectPath> >();
-+    qDBusRegisterMetaType<QVariantMap>();
-+    qDBusRegisterMetaType<QVariantMapMap>();
-+    qDBusRegisterMetaType<QByteArrayList>();
-+    qDBusRegisterMetaType<DBUSManagerStruct>();
-+
-+    bool serviceFound = m_manager.isValid();
-+    if (!serviceFound) {
-+        // find out whether it will be activated automatically
-+        QDBusMessage message = QDBusMessage::createMethodCall("org.freedesktop.DBus",
-+                                                              "/org/freedesktop/DBus",
-+                                                              "org.freedesktop.DBus",
-+                                                              "ListActivatableNames");
-+
-+        QDBusReply<QStringList> reply = QDBusConnection::systemBus().call(message);
-+        if (reply.isValid() && reply.value().contains(UD2_DBUS_SERVICE)) {
-+            QDBusConnection::systemBus().interface()->startService(UD2_DBUS_SERVICE);
-+            serviceFound = true;
-+        }
-+    }
-+
-+    if (serviceFound) {
-+        connect(&m_manager, SIGNAL(InterfacesAdded(QDBusObjectPath, QVariantMapMap)),
-+                this, SLOT(slotInterfacesAdded(QDBusObjectPath,QVariantMapMap)));
-+        connect(&m_manager, SIGNAL(InterfacesRemoved(QDBusObjectPath,QStringList)),
-+                this, SLOT(slotInterfacesRemoved(QDBusObjectPath,QStringList)));
-+    }
-+}
-+
-+Manager::~Manager()
-+{
-+}
-+
-+QObject* Manager::createDevice(const QString& udi)
-+{
-+    if (udi==udiPrefix()) {
-+        RootDevice *root = new RootDevice(udi);
-+
-+        root->setProduct(tr("Storage"));
-+        root->setDescription(tr("Storage devices"));
-+        root->setIcon("server-database"); // Obviously wasn't meant for that, but maps nicely in oxygen icon set :-p
-+
-+        return root;
-+    } else if (deviceCache().contains(udi)) {
-+        return new Device(udi);
-+    } else {
-+        return 0;
-+    }
-+}
-+
-+QStringList Manager::devicesFromQuery(const QString& parentUdi, Solid::DeviceInterface::Type type)
-+{
-+    QStringList result;
-+
-+    if (!parentUdi.isEmpty())
-+    {
-+        Q_FOREACH (const QString &udi, deviceCache())
-+        {
-+            Device device(udi);
-+            if (device.queryDeviceInterface(type) && device.parentUdi() == parentUdi)
-+                result << udi;
-+        }
-+
-+        return result;
-+    }
-+    else if (type != Solid::DeviceInterface::Unknown)
-+    {
-+        Q_FOREACH (const QString &udi, deviceCache())
-+        {
-+            Device device(udi);
-+            if (device.queryDeviceInterface(type))
-+                result << udi;
-+        }
-+
-+        return result;
-+    }
-+
-+    return deviceCache();
-+}
-+
-+QStringList Manager::allDevices()
-+{
-+    m_deviceCache.clear();
-+
-+    QDBusPendingReply<DBUSManagerStruct> reply = m_manager.GetManagedObjects();
-+    reply.waitForFinished();
-+    if (!reply.isError()) {  // enum devices
-+        m_deviceCache << udiPrefix();
-+
-+        Q_FOREACH(const QDBusObjectPath &path, reply.value().keys()) {
-+            const QString udi = path.path();
-+            qDebug() << "Adding device" << udi;
-+
-+            if (udi == UD2_DBUS_PATH_MANAGER || udi == UD2_UDI_DISKS_PREFIX || udi.startsWith(UD2_DBUS_PATH_JOBS))
-+                continue;
-+
-+            Device device(udi);
-+            if (device.mightBeOpticalDisc()) {
-+                QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, udi, DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
-+                                                     SLOT(slotMediaChanged(QDBusMessage)));
-+                if (!device.isOpticalDisc())  // skip empty CD disc
-+                    continue;
-+            }
-+
-+            m_deviceCache.append(udi);
-+        }
-+    }
-+    else  // show error
-+    {
-+        qWarning() << "Failed enumerating UDisks2 objects:" << reply.error().name() << "\n" << reply.error().message();
-+    }
-+
-+    return m_deviceCache;
-+}
-+
-+
-+QSet< Solid::DeviceInterface::Type > Manager::supportedInterfaces() const
-+{
-+    return m_supportedInterfaces;
-+}
-+
-+QString Manager::udiPrefix() const
-+{
-+    return UD2_UDI_DISKS_PREFIX;
-+}
-+
-+void Manager::slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties)
-+{
-+    const QString udi = object_path.path();
-+
-+    qDebug() << udi << "has new interfaces:" << interfaces_and_properties.keys();
-+
-+    // new device, we don't know it yet
-+    if (!m_deviceCache.contains(udi)) {
-+        m_deviceCache.append(udi);
-+        Q_EMIT deviceAdded(udi);
-+    }
-+}
-+
-+void Manager::slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces)
-+{
-+    const QString udi = object_path.path();
-+
-+    qDebug() << udi << "lost interfaces:" << interfaces;
-+
-+    Device device(udi);
-+
-+    if (!udi.isEmpty() && (interfaces.isEmpty() || device.interfaces().isEmpty() || device.interfaces().contains(UD2_DBUS_INTERFACE_FILESYSTEM))) {
-+        Q_EMIT deviceRemoved(udi);
-+        m_deviceCache.removeAll(udi);
-+    }
-+}
-+
-+void Manager::slotMediaChanged(const QDBusMessage & msg)
-+{
-+    const QVariantMap properties = qdbus_cast<QVariantMap>(msg.arguments().at(1));
-+
-+    if (!properties.contains("Size"))  // react only on Size changes
-+        return;
-+
-+    const QString udi = msg.path();
-+    qulonglong size = properties.value("Size").toULongLong();
-+    qDebug() << "MEDIA CHANGED in" << udi << "; size is:" << size;
-+
-+    if (!m_deviceCache.contains(udi) && size > 0) { // we don't know the optdisc, got inserted
-+        m_deviceCache.append(udi);
-+        Q_EMIT deviceAdded(udi);
-+    }
-+
-+    if (m_deviceCache.contains(udi) && size == 0) {  // we know the optdisc, got removed
-+        Q_EMIT deviceRemoved(udi);
-+        m_deviceCache.removeAll(udi);
-+    }
-+}
-+
-+const QStringList & Manager::deviceCache()
-+{
-+    if (m_deviceCache.isEmpty())
-+        allDevices();
-+
-+    return m_deviceCache;
-+}
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksmanager.h b/tier1/solid/src/solid/backends/udisks2/udisksmanager.h
-new file mode 100644
-index 0000000..7cf0a72
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksmanager.h
-@@ -0,0 +1,69 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef UDISKS2MANAGER_H
-+#define UDISKS2MANAGER_H
-+
-+#include "udisks2.h"
-+#include "udisksdevice.h"
-+#include "dbus/manager.h"
-+
-+#include "solid/ifaces/devicemanager.h"
-+
-+#include <QtDBus/QDBusInterface>
-+#include <QtCore/QSet>
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+
-+class Manager: public Solid::Ifaces::DeviceManager
-+{
-+    Q_OBJECT
-+
-+public:
-+    Manager(QObject *parent);
-+    virtual QObject* createDevice(const QString& udi);
-+    virtual QStringList devicesFromQuery(const QString& parentUdi, Solid::DeviceInterface::Type type);
-+    virtual QStringList allDevices();
-+    virtual QSet< Solid::DeviceInterface::Type > supportedInterfaces() const;
-+    virtual QString udiPrefix() const;
-+    virtual ~Manager();
-+
-+private Q_SLOTS:
-+    void slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties);
-+    void slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces);
-+    void slotMediaChanged(const QDBusMessage &msg);
-+
-+private:
-+    const QStringList &deviceCache();
-+    QSet<Solid::DeviceInterface::Type> m_supportedInterfaces;
-+    org::freedesktop::DBus::ObjectManager m_manager;
-+    QStringList m_deviceCache;
-+};
-+
-+}
-+}
-+}
-+#endif // UDISKS2MANAGER_H
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksopticaldisc.cpp b/tier1/solid/src/solid/backends/udisks2/udisksopticaldisc.cpp
-new file mode 100644
-index 0000000..478c930
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksopticaldisc.cpp
-@@ -0,0 +1,277 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010 - 2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include <sys/types.h>
-+#include <unistd.h>
-+#include <sys/stat.h>
-+#include <fcntl.h>
-+
-+#include <QtCore/QFile>
-+#include <QtDBus/QDBusConnection>
-+
-+#include "../shared/udevqtclient.h"
-+
-+#include "udisks2.h"
-+#include "udisksopticaldisc.h"
-+
-+// inspired by http://cgit.freedesktop.org/hal/tree/hald/linux/probing/probe-volume.c
-+static Solid::OpticalDisc::ContentType advancedDiscDetect(const QByteArray & device_file)
-+{
-+    /* the discs block size */
-+    unsigned short bs;
-+    /* the path table size */
-+    unsigned short ts;
-+    /* the path table location (in blocks) */
-+    unsigned int tl;
-+    /* length of the directory name in current path table entry */
-+    unsigned char len_di = 0;
-+    /* the number of the parent directory's path table entry */
-+    unsigned int parent = 0;
-+    /* filename for the current path table entry */
-+    char dirname[256];
-+    /* our position into the path table */
-+    int pos = 0;
-+    /* the path table record we're on */
-+    int curr_record = 1;
-+
-+    Solid::OpticalDisc::ContentType result = Solid::OpticalDisc::NoContent;
-+
-+    int fd = open(device_file.constData(), O_RDONLY);
-+
-+    /* read the block size */
-+    lseek (fd, 0x8080, SEEK_CUR);
-+    if (read (fd, &bs, 2) != 2)
-+    {
-+        qDebug("Advanced probing on %s failed while reading block size", qPrintable(device_file));
-+        goto out;
-+    }
-+
-+    /* read in size of path table */
-+    lseek (fd, 2, SEEK_CUR);
-+    if (read (fd, &ts, 2) != 2)
-+    {
-+        qDebug("Advanced probing on %s failed while reading path table size", qPrintable(device_file));
-+        goto out;
-+    }
-+
-+    /* read in which block path table is in */
-+    lseek (fd, 6, SEEK_CUR);
-+    if (read (fd, &tl, 4) != 4)
-+    {
-+        qDebug("Advanced probing on %s failed while reading path table block", qPrintable(device_file));
-+        goto out;
-+    }
-+
-+    /* seek to the path table */
-+    lseek (fd, bs * tl, SEEK_SET);
-+
-+    /* loop through the path table entries */
-+    while (pos < ts)
-+    {
-+        /* get the length of the filename of the current entry */
-+        if (read (fd, &len_di, 1) != 1)
-+        {
-+            qDebug("Advanced probing on %s failed, cannot read more entries", qPrintable(device_file));
-+            break;
-+        }
-+
-+        /* get the record number of this entry's parent
-+           i'm pretty sure that the 1st entry is always the top directory */
-+        lseek (fd, 5, SEEK_CUR);
-+        if (read (fd, &parent, 2) != 2)
-+        {
-+            qDebug("Advanced probing on %s failed, couldn't read parent entry", qPrintable(device_file));
-+            break;
-+        }
-+
-+        /* read the name */
-+        if (read (fd, dirname, len_di) != len_di)
-+        {
-+            qDebug("Advanced probing on %s failed, couldn't read the entry name", qPrintable(device_file));
-+            break;
-+        }
-+        dirname[len_di] = 0;
-+
-+        /* if we found a folder that has the root as a parent, and the directory name matches
-+           one of the special directories then set the properties accordingly */
-+        if (parent == 1)
-+        {
-+            if (!strcasecmp (dirname, "VIDEO_TS"))
-+            {
-+                qDebug("Disc in %s is a Video DVD", qPrintable(device_file));
-+                result = Solid::OpticalDisc::VideoDvd;
-+                break;
-+            }
-+            else if (!strcasecmp (dirname, "BDMV"))
-+            {
-+                qDebug("Disc in %s is a Blu-ray video disc", qPrintable(device_file));
-+                result = Solid::OpticalDisc::VideoBluRay;
-+                break;
-+            }
-+            else if (!strcasecmp (dirname, "VCD"))
-+            {
-+                qDebug("Disc in %s is a Video CD", qPrintable(device_file));
-+                result = Solid::OpticalDisc::VideoCd;
-+                break;
-+            }
-+            else if (!strcasecmp (dirname, "SVCD"))
-+            {
-+                qDebug("Disc in %s is a Super Video CD", qPrintable(device_file));
-+                result = Solid::OpticalDisc::SuperVideoCd;
-+                break;
-+            }
-+        }
-+
-+        /* all path table entries are padded to be even,
-+           so if this is an odd-length table, seek a byte to fix it */
-+        if (len_di%2 == 1)
-+        {
-+            lseek (fd, 1, SEEK_CUR);
-+            pos++;
-+        }
-+
-+        /* update our position */
-+        pos += 8 + len_di;
-+        curr_record++;
-+    }
-+
-+    close(fd);
-+    return result;
-+
-+out:
-+    /* go back to the start of the file */
-+    lseek (fd, 0, SEEK_SET);
-+    close(fd);
-+    return result;
-+}
-+
-+using namespace Solid::Backends::UDisks2;
-+
-+OpticalDisc::OpticalDisc(Device *dev)
-+    : StorageVolume(dev), m_needsReprobe(true), m_cachedContent(Solid::OpticalDisc::NoContent)
-+{
-+    UdevQt::Client client(this);
-+    m_udevDevice = client.deviceByDeviceFile(device());
-+    //qDebug() << "udev device:" << m_udevDevice.name() << "valid:" << m_udevDevice.isValid();
-+    /*qDebug() << "\tProperties:" << */ m_udevDevice.deviceProperties(); // initialize the properties DB so that it doesn't crash further down, #298416
-+
-+    m_drive = new Device(m_device->prop("Drive").value<QDBusObjectPath>().path());
-+    QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, m_drive->udi(), DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
-+                                         SLOT(slotDrivePropertiesChanged(QString,QVariantMap,QStringList)));
-+}
-+
-+OpticalDisc::~OpticalDisc()
-+{
-+    delete m_drive;
-+}
-+
-+qulonglong OpticalDisc::capacity() const
-+{
-+    return m_device->prop("Size").toULongLong();
-+}
-+
-+bool OpticalDisc::isRewritable() const
-+{
-+    // the hard way, udisks has no notion of a disc "rewritability"
-+    const QString mediaType = media();
-+    return mediaType == "optical_cd_rw" || mediaType == "optical_dvd_rw" || mediaType == "optical_dvd_ram" ||
-+            mediaType == "optical_dvd_plus_rw" || mediaType == "optical_dvd_plus_rw_dl" ||
-+            mediaType == "optical_bd_re" || mediaType == "optical_hddvd_rw";
-+}
-+
-+bool OpticalDisc::isBlank() const
-+{
-+    return m_drive->prop("OpticalBlank").toBool();
-+}
-+
-+bool OpticalDisc::isAppendable() const
-+{
-+    //qDebug() << "appendable prop" << m_udevDevice.deviceProperty("ID_CDROM_MEDIA_STATE");
-+    return m_udevDevice.deviceProperty("ID_CDROM_MEDIA_STATE").toString() == QLatin1String("appendable");
-+}
-+
-+Solid::OpticalDisc::DiscType OpticalDisc::discType() const
-+{
-+    QMap<Solid::OpticalDisc::DiscType, QString> map;
-+    map[Solid::OpticalDisc::CdRom] = "optical_cd";
-+    map[Solid::OpticalDisc::CdRecordable] = "optical_cd_r";
-+    map[Solid::OpticalDisc::CdRewritable] = "optical_cd_rw";
-+    map[Solid::OpticalDisc::DvdRom] = "optical_dvd";
-+    map[Solid::OpticalDisc::DvdRecordable] = "optical_dvd_r";
-+    map[Solid::OpticalDisc::DvdRewritable] ="optical_dvd_rw";
-+    map[Solid::OpticalDisc::DvdRam] ="optical_dvd_ram";
-+    map[Solid::OpticalDisc::DvdPlusRecordable] ="optical_dvd_plus_r";
-+    map[Solid::OpticalDisc::DvdPlusRewritable] ="optical_dvd_plus_rw";
-+    map[Solid::OpticalDisc::DvdPlusRecordableDuallayer] ="optical_dvd_plus_r_dl";
-+    map[Solid::OpticalDisc::DvdPlusRewritableDuallayer] ="optical_dvd_plus_rw_dl";
-+    map[Solid::OpticalDisc::BluRayRom] ="optical_bd";
-+    map[Solid::OpticalDisc::BluRayRecordable] ="optical_bd_r";
-+    map[Solid::OpticalDisc::BluRayRewritable] ="optical_bd_re";
-+    map[Solid::OpticalDisc::HdDvdRom] ="optical_hddvd";
-+    map[Solid::OpticalDisc::HdDvdRecordable] ="optical_hddvd_r";
-+    map[Solid::OpticalDisc::HdDvdRewritable] ="optical_hddvd_rw";
-+    // TODO add these to Solid
-+    //map[Solid::OpticalDisc::MagnetoOptical] ="optical_mo";
-+    //map[Solid::OpticalDisc::MountRainer] ="optical_mrw";
-+    //map[Solid::OpticalDisc::MountRainerWritable] ="optical_mrw_w";
-+
-+    return map.key(media(), Solid::OpticalDisc::UnknownDiscType);  // FIXME optimize, lookup by value, not key
-+}
-+
-+Solid::OpticalDisc::ContentTypes OpticalDisc::availableContent() const
-+{
-+    if (isBlank()) {
-+        m_needsReprobe = false;
-+        return Solid::OpticalDisc::NoContent;
-+    }
-+
-+    if (m_needsReprobe) {
-+        m_cachedContent = Solid::OpticalDisc::NoContent;
-+        const bool hasData = m_drive->prop("OpticalNumDataTracks").toUInt() > 0;
-+        const bool hasAudio = m_drive->prop("OpticalNumAudioTracks").toUInt() > 0;
-+
-+        if ( hasData ) {
-+            m_cachedContent |= Solid::OpticalDisc::Data;
-+            m_cachedContent |= advancedDiscDetect(m_device->prop("Device").toByteArray());
-+        }
-+        if ( hasAudio )
-+            m_cachedContent |= Solid::OpticalDisc::Audio;
-+
-+        m_needsReprobe = false;
-+    }
-+
-+    return m_cachedContent;
-+}
-+
-+void OpticalDisc::slotDrivePropertiesChanged(const QString &ifaceName, const QVariantMap &changedProps, const QStringList &invalidatedProps)
-+{
-+    Q_UNUSED(ifaceName);
-+
-+    if (changedProps.keys().contains("Media") || invalidatedProps.contains("Media")) {
-+        m_needsReprobe = true;
-+        m_cachedContent = Solid::OpticalDisc::NoContent;
-+    }
-+}
-+
-+QString OpticalDisc::media() const
-+{
-+    return m_drive->prop("Media").toString();
-+}
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksopticaldisc.h b/tier1/solid/src/solid/backends/udisks2/udisksopticaldisc.h
-new file mode 100644
-index 0000000..5b80995
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksopticaldisc.h
-@@ -0,0 +1,69 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010 - 2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef UDISKS2OPTICALDISC_H
-+#define UDISKS2OPTICALDISC_H
-+
-+#include <solid/ifaces/opticaldisc.h>
-+
-+#include "../shared/udevqtdevice.h"
-+
-+#include "udisksstoragevolume.h"
-+#include "udisksdevice.h"
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+
-+class OpticalDisc: public StorageVolume, virtual public Solid::Ifaces::OpticalDisc
-+{
-+    Q_OBJECT
-+    Q_INTERFACES(Solid::Ifaces::OpticalDisc)
-+
-+public:
-+    OpticalDisc(Device *dev);
-+    virtual ~OpticalDisc();
-+
-+    virtual qulonglong capacity() const;
-+    virtual bool isRewritable() const;
-+    virtual bool isBlank() const;
-+    virtual bool isAppendable() const;
-+    virtual Solid::OpticalDisc::DiscType discType() const;
-+    virtual Solid::OpticalDisc::ContentTypes availableContent() const;
-+
-+private Q_SLOTS:
-+    void slotDrivePropertiesChanged(const QString & ifaceName, const QVariantMap & changedProps, const QStringList & invalidatedProps);
-+
-+private:
-+    QString media() const;
-+    mutable bool m_needsReprobe;
-+    mutable Solid::OpticalDisc::ContentTypes m_cachedContent;
-+    Device * m_drive;
-+    UdevQt::Device m_udevDevice;
-+};
-+
-+}
-+}
-+}
-+#endif // UDISKS2OPTICALDISC_H
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksopticaldrive.cpp b/tier1/solid/src/solid/backends/udisks2/udisksopticaldrive.cpp
-new file mode 100644
-index 0000000..0eb4685
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksopticaldrive.cpp
-@@ -0,0 +1,188 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <fcntl.h>
-+#include <string.h>
-+#include <errno.h>
-+#include <unistd.h>
-+#include <stdlib.h>
-+
-+#include <QtCore/QFile>
-+#include <QtCore/QDebug>
-+
-+#include "udisksopticaldrive.h"
-+#include "udisks2.h"
-+#include "udisksdevice.h"
-+
-+using namespace Solid::Backends::UDisks2;
-+
-+OpticalDrive::OpticalDrive(Device *device)
-+    : StorageDrive(device), m_ejectInProgress(false), m_readSpeed(0), m_writeSpeed(0), m_speedsInit(false)
-+{
-+    m_device->registerAction("eject", this,
-+                             SLOT(slotEjectRequested()),
-+                             SLOT(slotEjectDone(int, const QString&)));
-+
-+    connect(m_device, SIGNAL(changed()), this, SLOT(slotChanged()));
-+}
-+
-+OpticalDrive::~OpticalDrive()
-+{
-+}
-+
-+bool OpticalDrive::eject()
-+{
-+    if (m_ejectInProgress)
-+        return false;
-+    m_ejectInProgress = true;
-+    m_device->broadcastActionRequested("eject");
-+
-+    QDBusConnection c = QDBusConnection::systemBus();
-+
-+    QString path = m_device->udi();
-+
-+    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, UD2_DBUS_INTERFACE_DRIVE, "Eject");
-+    msg << QVariantMap();
-+    return c.callWithCallback(msg, this, SLOT(slotDBusReply(const QDBusMessage &)), SLOT(slotDBusError(const QDBusError &)));
-+}
-+
-+void OpticalDrive::slotDBusReply(const QDBusMessage &/*reply*/)
-+{
-+    m_ejectInProgress = false;
-+    m_device->broadcastActionDone("eject");
-+}
-+
-+void OpticalDrive::slotDBusError(const QDBusError &error)
-+{
-+    m_ejectInProgress = false;
-+    m_device->broadcastActionDone("eject", m_device->errorToSolidError(error.name()),
-+                                  m_device->errorToString(error.name()) + ": " +error.message());
-+}
-+
-+void OpticalDrive::slotEjectRequested()
-+{
-+    m_ejectInProgress = true;
-+    Q_EMIT ejectRequested(m_device->udi());
-+}
-+
-+void OpticalDrive::slotEjectDone(int error, const QString &errorString)
-+{
-+    m_ejectInProgress = false;
-+    Q_EMIT ejectDone(static_cast<Solid::ErrorType>(error), errorString, m_device->udi());
-+}
-+
-+void OpticalDrive::initReadWriteSpeeds() const
-+{
-+#if 0
-+    int read_speed, write_speed;
-+    char *write_speeds = 0;
-+    QByteArray device_file = QFile::encodeName(m_device->property("Device").toString());
-+
-+    //qDebug("Doing open (\"%s\", O_RDONLY | O_NONBLOCK)", device_file.constData());
-+    int fd = open(device_file, O_RDONLY | O_NONBLOCK);
-+    if (fd < 0) {
-+        qWarning("Cannot open %s: %s", device_file.constData(), strerror (errno));
-+        return;
-+    }
-+
-+    if (get_read_write_speed(fd, &read_speed, &write_speed, &write_speeds) >= 0) {
-+        m_readSpeed = read_speed;
-+        m_writeSpeed = write_speed;
-+
-+        QStringList list = QString::fromLatin1(write_speeds).split(',', QString::SkipEmptyParts);
-+        Q_FOREACH (const QString & speed, list)
-+            m_writeSpeeds.append(speed.toInt());
-+
-+        free(write_speeds);
-+
-+        m_speedsInit = true;
-+    }
-+
-+    close(fd);
-+#endif
-+}
-+
-+QList<int> OpticalDrive::writeSpeeds() const
-+{
-+    if (!m_speedsInit)
-+        initReadWriteSpeeds();
-+    //qDebug() << "solid write speeds:" << m_writeSpeeds;
-+    return m_writeSpeeds;
-+}
-+
-+int OpticalDrive::writeSpeed() const
-+{
-+    if (!m_speedsInit)
-+        initReadWriteSpeeds();
-+    return m_writeSpeed;
-+}
-+
-+int OpticalDrive::readSpeed() const
-+{
-+    if (!m_speedsInit)
-+        initReadWriteSpeeds();
-+    return m_readSpeed;
-+}
-+
-+Solid::OpticalDrive::MediumTypes OpticalDrive::supportedMedia() const
-+{
-+    const QStringList mediaTypes = m_device->prop("MediaCompatibility").toStringList();
-+    Solid::OpticalDrive::MediumTypes supported;
-+
-+    QMap<Solid::OpticalDrive::MediumType, QString> map;
-+    map[Solid::OpticalDrive::Cdr] = "optical_cd_r";
-+    map[Solid::OpticalDrive::Cdrw] = "optical_cd_rw";
-+    map[Solid::OpticalDrive::Dvd] = "optical_dvd";
-+    map[Solid::OpticalDrive::Dvdr] = "optical_dvd_r";
-+    map[Solid::OpticalDrive::Dvdrw] ="optical_dvd_rw";
-+    map[Solid::OpticalDrive::Dvdram] ="optical_dvd_ram";
-+    map[Solid::OpticalDrive::Dvdplusr] ="optical_dvd_plus_r";
-+    map[Solid::OpticalDrive::Dvdplusrw] ="optical_dvd_plus_rw";
-+    map[Solid::OpticalDrive::Dvdplusdl] ="optical_dvd_plus_r_dl";
-+    map[Solid::OpticalDrive::Dvdplusdlrw] ="optical_dvd_plus_rw_dl";
-+    map[Solid::OpticalDrive::Bd] ="optical_bd";
-+    map[Solid::OpticalDrive::Bdr] ="optical_bd_r";
-+    map[Solid::OpticalDrive::Bdre] ="optical_bd_re";
-+    map[Solid::OpticalDrive::HdDvd] ="optical_hddvd";
-+    map[Solid::OpticalDrive::HdDvdr] ="optical_hddvd_r";
-+    map[Solid::OpticalDrive::HdDvdrw] ="optical_hddvd_rw";
-+    // TODO add these to Solid
-+    //map[Solid::OpticalDrive::Mo] ="optical_mo";
-+    //map[Solid::OpticalDrive::Mr] ="optical_mrw";
-+    //map[Solid::OpticalDrive::Mrw] ="optical_mrw_w";
-+
-+    Q_FOREACH ( const Solid::OpticalDrive::MediumType & type, map.keys() )
-+    {
-+        if ( mediaTypes.contains( map[type] ) )
-+        {
-+            supported |= type;
-+        }
-+    }
-+
-+    return supported;
-+}
-+
-+void OpticalDrive::slotChanged()
-+{
-+    m_speedsInit = false; // reset the read/write speeds, changes eg. with an inserted media
-+}
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksopticaldrive.h b/tier1/solid/src/solid/backends/udisks2/udisksopticaldrive.h
-new file mode 100644
-index 0000000..4c98ef5
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksopticaldrive.h
-@@ -0,0 +1,81 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef UDISKS2OPTICALDRIVE_H
-+#define UDISKS2OPTICALDRIVE_H
-+
-+#include <solid/ifaces/opticaldrive.h>
-+#include "udisksstoragedrive.h"
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+
-+class OpticalDrive: public StorageDrive, virtual public Solid::Ifaces::OpticalDrive
-+{
-+    Q_OBJECT
-+    Q_INTERFACES(Solid::Ifaces::OpticalDrive)
-+
-+public:
-+    OpticalDrive(Device *device);
-+    virtual ~OpticalDrive();
-+
-+Q_SIGNALS:
-+    void ejectPressed(const QString &udi);
-+    void ejectDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
-+    void ejectRequested(const QString &udi);
-+
-+public:
-+    virtual bool eject();
-+    virtual QList<int> writeSpeeds() const;
-+    virtual int writeSpeed() const;
-+    virtual int readSpeed() const;
-+    virtual Solid::OpticalDrive::MediumTypes supportedMedia() const;
-+
-+private Q_SLOTS:
-+    void slotDBusReply(const QDBusMessage &reply);
-+    void slotDBusError(const QDBusError &error);
-+
-+    void slotEjectRequested();
-+    void slotEjectDone(int error, const QString &errorString);
-+
-+    void slotChanged();
-+
-+private:
-+    void initReadWriteSpeeds() const;
-+
-+    bool m_ejectInProgress;
-+
-+    // read/write speeds
-+    mutable int m_readSpeed;
-+    mutable int m_writeSpeed;
-+    mutable QList<int> m_writeSpeeds;
-+    mutable bool m_speedsInit;
-+};
-+
-+}
-+}
-+}
-+
-+#endif // UDISKS2OPTICALDRIVE_H
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksstorageaccess.cpp b/tier1/solid/src/solid/backends/udisks2/udisksstorageaccess.cpp
-new file mode 100644
-index 0000000..146c227
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksstorageaccess.cpp
-@@ -0,0 +1,359 @@
-+/*
-+    Copyright 2009 Pino Toscano <pino@kde.org>
-+    Copyright 2009-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include "udisksstorageaccess.h"
-+#include "udisks2.h"
-+
-+#include <QtCore/QProcess>
-+#include <QtDBus/QtDBus>
-+#include <QtGui/QApplication>
-+#include <QtGui/QWidget>
-+
-+using namespace Solid::Backends::UDisks2;
-+
-+StorageAccess::StorageAccess(Device *device)
-+    : DeviceInterface(device), m_setupInProgress(false), m_teardownInProgress(false), m_passphraseRequested(false)
-+{
-+    updateCache();
-+    QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, m_device->udi(), DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
-+                                         SLOT(slotPropertiesChanged(QString,QVariantMap,QStringList)));
-+
-+    // Delay connecting to DBus signals to avoid the related time penalty
-+    // in hot paths such as predicate matching
-+    QTimer::singleShot(0, this, SLOT(connectDBusSignals()));
-+}
-+
-+StorageAccess::~StorageAccess()
-+{
-+}
-+
-+void StorageAccess::connectDBusSignals()
-+{
-+    m_device->registerAction("setup", this,
-+                             SLOT(slotSetupRequested()),
-+                             SLOT(slotSetupDone(int, const QString&)));
-+
-+    m_device->registerAction("teardown", this,
-+                             SLOT(slotTeardownRequested()),
-+                             SLOT(slotTeardownDone(int, const QString&)));
-+}
-+
-+bool StorageAccess::isLuksDevice() const
-+{
-+    return m_device->isEncryptedContainer(); // encrypted device
-+}
-+
-+bool StorageAccess::isAccessible() const
-+{
-+    if (isLuksDevice()) { // check if the cleartext slave is mounted
-+        if (m_clearTextPath.isEmpty() || m_clearTextPath == "/")
-+            return false;
-+        Device holderDevice(m_clearTextPath);
-+        return holderDevice.isMounted();
-+    }
-+
-+    return m_device->isMounted();
-+}
-+
-+QString StorageAccess::filePath() const
-+{
-+    if (!isAccessible())
-+        return QString();
-+
-+    QByteArrayList mntPoints;
-+
-+    if (isLuksDevice()) {  // encrypted (and unlocked) device
-+        if (m_clearTextPath.isEmpty() || m_clearTextPath == "/")
-+            return QString();
-+        Device holderDevice(m_clearTextPath);
-+        mntPoints = qdbus_cast<QByteArrayList>(holderDevice.prop("MountPoints"));
-+        if (!mntPoints.isEmpty())
-+            return QFile::decodeName(mntPoints.first()); // FIXME Solid doesn't support multiple mount points
-+        else
-+            return QString();
-+    }
-+
-+    mntPoints = qdbus_cast<QByteArrayList>(m_device->prop("MountPoints"));
-+
-+    if (!mntPoints.isEmpty())
-+        return QFile::decodeName(mntPoints.first()); // FIXME Solid doesn't support multiple mount points
-+    else
-+        return QString();
-+}
-+
-+bool StorageAccess::isIgnored() const
-+{
-+    return m_device->prop("HintIgnore").toBool(); // FIXME tune
-+}
-+
-+bool StorageAccess::setup()
-+{
-+    if ( m_teardownInProgress || m_setupInProgress )
-+        return false;
-+    m_setupInProgress = true;
-+    m_device->broadcastActionRequested("setup");
-+
-+    if (m_device->isEncryptedContainer())
-+        return requestPassphrase();
-+    else
-+        return mount();
-+}
-+
-+bool StorageAccess::teardown()
-+{
-+    if ( m_teardownInProgress || m_setupInProgress )
-+        return false;
-+    m_teardownInProgress = true;
-+    m_device->broadcastActionRequested("teardown");
-+
-+    return unmount();
-+}
-+
-+void StorageAccess::slotPropertiesChanged(const QString &ifaceName, const QVariantMap &changedProps, const QStringList &invalidatedProps)
-+{
-+    Q_UNUSED(ifaceName);
-+
-+    if (changedProps.keys().contains("MountPoints") || invalidatedProps.contains("MountPoints")) {
-+        Q_EMIT accessibilityChanged(isAccessible(), isLuksDevice() ? m_clearTextPath : m_device->udi());
-+    }
-+}
-+
-+void StorageAccess::updateCache()
-+{
-+    m_isAccessible = isAccessible();
-+}
-+
-+void StorageAccess::checkAccessibility()
-+{
-+    const bool old_isAccessible = m_isAccessible;
-+    updateCache();
-+
-+    if (old_isAccessible != m_isAccessible) {
-+        Q_EMIT accessibilityChanged(m_isAccessible, isLuksDevice() ? m_clearTextPath : m_device->udi());
-+    }
-+}
-+
-+void StorageAccess::slotDBusReply( const QDBusMessage & reply )
-+{
-+    if (m_setupInProgress)
-+    {
-+        if (isLuksDevice() && !isAccessible()) { // unlocked device, now mount it
-+            if (reply.type() == QDBusMessage::ReplyMessage)  // we've got a response from Unlock
-+                m_clearTextPath = reply.arguments().value(0).value<QDBusObjectPath>().path();
-+            mount();
-+        }
-+        else // Don't broadcast setupDone unless the setup is really done. (Fix kde#271156)
-+        {
-+            m_setupInProgress = false;
-+            m_device->broadcastActionDone("setup");
-+
-+            checkAccessibility();
-+        }
-+    }
-+    else if (m_teardownInProgress)  // FIXME
-+    {
-+        if (isLuksDevice() && !m_clearTextPath.isEmpty() && m_clearTextPath != "/") // unlocked device, lock it
-+        {
-+            callCryptoTeardown();
-+        }
-+        else if (!m_clearTextPath.isEmpty() && m_clearTextPath != "/") {
-+            callCryptoTeardown(true); // Lock crypted parent
-+        }
-+        else
-+        {
-+            if (m_device->prop("Ejectable").toBool() && !m_device->isOpticalDisc()) // optical drives have their Eject method
-+            {
-+                // try to "eject" (aka safely remove) from the (parent) drive, e.g. SD card from a reader
-+                QString drivePath = m_device->prop("Drive").value<QDBusObjectPath>().path();
-+                if (!drivePath.isEmpty() || drivePath != "/")
-+                {
-+                    QDBusConnection c = QDBusConnection::systemBus();
-+                    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, drivePath, UD2_DBUS_INTERFACE_DRIVE, "Eject");
-+                    msg << QVariantMap();   // options, unused now
-+                    c.call(msg, QDBus::NoBlock);
-+                }
-+            }
-+
-+            m_teardownInProgress = false;
-+            m_device->broadcastActionDone("teardown");
-+
-+            checkAccessibility();
-+        }
-+    }
-+}
-+
-+void StorageAccess::slotDBusError( const QDBusError & error )
-+{
-+    if (m_setupInProgress)
-+    {
-+        m_setupInProgress = false;
-+        m_device->broadcastActionDone("setup", m_device->errorToSolidError(error.name()),
-+                                      m_device->errorToString(error.name()) + ": " +error.message());
-+
-+        checkAccessibility();
-+    }
-+    else if (m_teardownInProgress)
-+    {
-+        m_teardownInProgress = false;
-+        m_clearTextPath.clear();
-+        m_device->broadcastActionDone("teardown", m_device->errorToSolidError(error.name()),
-+                                      m_device->errorToString(error.name()) + ": " + error.message());
-+        checkAccessibility();
-+    }
-+}
-+
-+void StorageAccess::slotSetupRequested()
-+{
-+    m_setupInProgress = true;
-+    Q_EMIT setupRequested(m_device->udi());
-+}
-+
-+void StorageAccess::slotSetupDone(int error, const QString &errorString)
-+{
-+    m_setupInProgress = false;
-+    Q_EMIT setupDone(static_cast<Solid::ErrorType>(error), errorString, m_device->udi());
-+}
-+
-+void StorageAccess::slotTeardownRequested()
-+{
-+    m_teardownInProgress = true;
-+    Q_EMIT teardownRequested(m_device->udi());
-+}
-+
-+void StorageAccess::slotTeardownDone(int error, const QString &errorString)
-+{
-+    m_teardownInProgress = false;
-+    m_clearTextPath.clear();
-+    Q_EMIT teardownDone(static_cast<Solid::ErrorType>(error), errorString, m_device->udi());
-+}
-+
-+bool StorageAccess::mount()
-+{
-+    QString path = m_device->udi();
-+
-+    if (isLuksDevice()) { // mount options for the cleartext volume
-+        path = m_clearTextPath;
-+    }
-+
-+    QDBusConnection c = QDBusConnection::systemBus();
-+    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, UD2_DBUS_INTERFACE_FILESYSTEM, "Mount");
-+
-+    msg << QVariantMap();   // options, unused now
-+
-+    return c.callWithCallback(msg, this,
-+                              SLOT(slotDBusReply(const QDBusMessage &)),
-+                              SLOT(slotDBusError(const QDBusError &)));
-+}
-+
-+bool StorageAccess::unmount()
-+{
-+    QString path = m_device->udi();
-+
-+    if (isLuksDevice()) { // unmount options for the cleartext volume
-+        path = m_clearTextPath;
-+    }
-+
-+    QDBusConnection c = QDBusConnection::systemBus();
-+    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, UD2_DBUS_INTERFACE_FILESYSTEM, "Unmount");
-+
-+    msg << QVariantMap();   // options, unused now
-+
-+    return c.callWithCallback(msg, this,
-+                              SLOT(slotDBusReply(const QDBusMessage &)),
-+                              SLOT(slotDBusError(const QDBusError &)),
-+                              s_unmountTimeout);
-+}
-+
-+QString StorageAccess::generateReturnObjectPath()
-+{
-+    static int number = 1;
-+
-+    return "/org/kde/solid/UDisks2StorageAccess_"+QString::number(number++);
-+}
-+
-+bool StorageAccess::requestPassphrase()
-+{
-+    QString udi = m_device->udi();
-+    QString returnService = QDBusConnection::sessionBus().baseService();
-+    m_lastReturnObject = generateReturnObjectPath();
-+
-+    QDBusConnection::sessionBus().registerObject(m_lastReturnObject, this, QDBusConnection::ExportScriptableSlots);
-+
-+    QWidget *activeWindow = QApplication::activeWindow();
-+    uint wId = 0;
-+    if (activeWindow!=0)
-+        wId = (uint)activeWindow->winId();
-+
-+    QString appId = QCoreApplication::applicationName();
-+
-+    QDBusInterface soliduiserver("org.kde.kded5", "/modules/soliduiserver", "org.kde.SolidUiServer");
-+    QDBusReply<void> reply = soliduiserver.call("showPassphraseDialog", udi, returnService,
-+                                                m_lastReturnObject, wId, appId);
-+    m_passphraseRequested = reply.isValid();
-+    if (!m_passphraseRequested)
-+        qWarning() << "Failed to call the SolidUiServer, D-Bus said:" << reply.error();
-+
-+    return m_passphraseRequested;
-+}
-+
-+void StorageAccess::passphraseReply(const QString & passphrase)
-+{
-+    if (m_passphraseRequested)
-+    {
-+        QDBusConnection::sessionBus().unregisterObject(m_lastReturnObject);
-+        m_passphraseRequested = false;
-+        if (!passphrase.isEmpty())
-+            callCryptoSetup(passphrase);
-+        else
-+        {
-+            m_setupInProgress = false;
-+            m_device->broadcastActionDone("setup");
-+        }
-+    }
-+}
-+
-+void StorageAccess::callCryptoSetup(const QString & passphrase)
-+{
-+    QDBusConnection c = QDBusConnection::systemBus();
-+    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_device->udi(), UD2_DBUS_INTERFACE_ENCRYPTED, "Unlock");
-+
-+    msg << passphrase;
-+    msg << QVariantMap();   // options, unused now
-+
-+    c.callWithCallback(msg, this,
-+                       SLOT(slotDBusReply(const QDBusMessage &)),
-+                       SLOT(slotDBusError(const QDBusError &)));
-+}
-+
-+bool StorageAccess::callCryptoTeardown(bool actOnParent)
-+{
-+    QDBusConnection c = QDBusConnection::systemBus();
-+    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE,
-+                                                      actOnParent ? (m_device->prop("CryptoBackingDevice").value<QDBusObjectPath>().path()) : m_device->udi(),
-+                                                      UD2_DBUS_INTERFACE_ENCRYPTED, "Lock");
-+    msg << QVariantMap();   // options, unused now
-+
-+    m_clearTextPath.clear();
-+
-+    return c.callWithCallback(msg, this,
-+                              SLOT(slotDBusReply(const QDBusMessage &)),
-+                              SLOT(slotDBusError(const QDBusError &)));
-+}
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksstorageaccess.h b/tier1/solid/src/solid/backends/udisks2/udisksstorageaccess.h
-new file mode 100644
-index 0000000..36f2102
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksstorageaccess.h
-@@ -0,0 +1,104 @@
-+/*
-+    Copyright 2009 Pino Toscano <pino@kde.org>
-+    Copyright 2009-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef UDISKS2STORAGEACCESS_H
-+#define UDISKS2STORAGEACCESS_H
-+
-+#include <solid/ifaces/storageaccess.h>
-+#include "udisksdeviceinterface.h"
-+
-+#include <QtDBus/QDBusMessage>
-+#include <QtDBus/QDBusError>
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+class StorageAccess : public DeviceInterface, virtual public Solid::Ifaces::StorageAccess
-+{
-+    Q_OBJECT
-+    Q_INTERFACES(Solid::Ifaces::StorageAccess)
-+
-+public:
-+    StorageAccess(Device *device);
-+    virtual ~StorageAccess();
-+
-+    virtual bool isAccessible() const;
-+    virtual QString filePath() const;
-+    virtual bool isIgnored() const;
-+    virtual bool setup();
-+    virtual bool teardown();
-+
-+Q_SIGNALS:
-+    void accessibilityChanged(bool accessible, const QString &udi);
-+    void setupDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
-+    void teardownDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
-+    void setupRequested(const QString &udi);
-+    void teardownRequested(const QString &udi);
-+
-+public Q_SLOTS:
-+    Q_SCRIPTABLE Q_NOREPLY void passphraseReply(const QString & passphrase);
-+
-+private Q_SLOTS:
-+    void slotPropertiesChanged(const QString & ifaceName, const QVariantMap & changedProps, const QStringList & invalidatedProps);
-+    void slotDBusReply(const QDBusMessage & reply);
-+    void slotDBusError(const QDBusError & error);
-+
-+    void connectDBusSignals();
-+
-+    void slotSetupRequested();
-+    void slotSetupDone(int error, const QString &errorString);
-+    void slotTeardownRequested();
-+    void slotTeardownDone(int error, const QString &errorString);
-+
-+private:
-+    /// @return true if this device is luks and unlocked
-+    bool isLuksDevice() const;
-+
-+    void updateCache();
-+    void checkAccessibility();
-+
-+    bool mount();
-+    bool unmount();
-+
-+    bool requestPassphrase();
-+    void callCryptoSetup( const QString & passphrase );
-+    bool callCryptoTeardown( bool actOnParent=false );
-+
-+    QString generateReturnObjectPath();
-+
-+private:
-+    bool m_isAccessible;
-+    bool m_setupInProgress;
-+    bool m_teardownInProgress;
-+    bool m_passphraseRequested;
-+    QString m_lastReturnObject;
-+    QString m_clearTextPath;  // path to the unlocked cleartext device
-+
-+    static const int s_unmountTimeout = 0x7fffffff;
-+};
-+}
-+}
-+}
-+
-+#endif // UDISKS2STORAGEACCESS_H
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksstoragedrive.cpp b/tier1/solid/src/solid/backends/udisks2/udisksstoragedrive.cpp
-new file mode 100644
-index 0000000..c79ac20
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksstoragedrive.cpp
-@@ -0,0 +1,147 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include "udisksstoragedrive.h"
-+
-+#include "../shared/udevqtclient.h"
-+
-+#include <QtCore/QDebug>
-+#include <QtCore/QFile>
-+
-+using namespace Solid::Backends::UDisks2;
-+
-+StorageDrive::StorageDrive(Device *dev)
-+    : Block(dev)
-+{
-+    UdevQt::Client client(this);
-+    m_udevDevice = client.deviceByDeviceFile(device());
-+    m_udevDevice.deviceProperties();
-+}
-+
-+StorageDrive::~StorageDrive()
-+{
-+}
-+
-+qulonglong StorageDrive::size() const
-+{
-+    return m_device->prop("Size").toULongLong();
-+}
-+
-+bool StorageDrive::isHotpluggable() const
-+{
-+    const Solid::StorageDrive::Bus _bus = bus();
-+    return _bus == Solid::StorageDrive::Usb || _bus == Solid::StorageDrive::Ieee1394;
-+}
-+
-+bool StorageDrive::isRemovable() const
-+{
-+    return m_device->prop("MediaRemovable").toBool() || m_device->prop("Removable").toBool();
-+}
-+
-+Solid::StorageDrive::DriveType StorageDrive::driveType() const
-+{
-+    const QStringList mediaTypes = m_device->prop("MediaCompatibility").toStringList();
-+
-+    if ( m_device->isOpticalDrive() ) // optical disks
-+    {
-+        return Solid::StorageDrive::CdromDrive;
-+    }
-+    else if ( mediaTypes.contains( "floppy" ) )
-+    {
-+        return Solid::StorageDrive::Floppy;
-+    }
-+#if 0 // TODO add to Solid
-+    else if ( mediaTypes.contains( "floppy_jaz" ) )
-+    {
-+        return Solid::StorageDrive::Jaz;
-+    }
-+    else if ( mediaTypes.contains( "floppy_zip" ) )
-+    {
-+        return Solid::StorageDrive::Zip;
-+    }
-+    else if ( mediaTypes.contains( "flash" ) )
-+    {
-+        return Solid::StorageDrive::Flash;
-+    }
-+#endif
-+    else if ( mediaTypes.contains( "flash_cf" ) )
-+    {
-+        return Solid::StorageDrive::CompactFlash;
-+    }
-+    else if ( mediaTypes.contains( "flash_ms" ) )
-+    {
-+        return Solid::StorageDrive::MemoryStick;
-+    }
-+    else if ( mediaTypes.contains( "flash_sm" ) )
-+    {
-+        return Solid::StorageDrive::SmartMedia;
-+    }
-+    else if ( mediaTypes.contains( "flash_sd" ) || mediaTypes.contains( "flash_sdhc" )
-+              || mediaTypes.contains( "flash_mmc" ) || mediaTypes.contains("flash_sdxc") )
-+    {
-+        return Solid::StorageDrive::SdMmc;
-+    }
-+    // FIXME: udisks2 doesn't know about xD cards
-+    else
-+    {
-+        return Solid::StorageDrive::HardDisk;
-+    }
-+}
-+
-+Solid::StorageDrive::Bus StorageDrive::bus() const
-+{
-+    const QString bus = m_device->prop("ConnectionBus").toString();
-+    const QString udevBus = m_udevDevice.deviceProperty("ID_BUS").toString();
-+
-+    //qDebug() << "bus:" << bus << "udev bus:" << udevBus;
-+
-+    if (udevBus == "ata")
-+    {
-+        if (m_udevDevice.deviceProperty("ID_ATA_SATA").toInt() == 1) // serial ATA
-+            return Solid::StorageDrive::Sata;
-+        else  // parallel (classical) ATA
-+            return Solid::StorageDrive::Ide;
-+    }
-+    else if (bus == "usb")
-+    {
-+        return Solid::StorageDrive::Usb;
-+    }
-+    else if (bus == "ieee1394")
-+    {
-+        return Solid::StorageDrive::Ieee1394;
-+    }
-+    else if (udevBus == "scsi")
-+    {
-+        return Solid::StorageDrive::Scsi;
-+    }
-+#if 0  // TODO add these to Solid
-+    else if ( bus == "sdio" )
-+    {
-+        return Solid::StorageDrive::SDIO;
-+    }
-+    else if ( bus == "virtual" )
-+    {
-+        return Solid::StorageDrive::Virtual;
-+    }
-+#endif
-+    else
-+        return Solid::StorageDrive::Platform;
-+}
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksstoragedrive.h b/tier1/solid/src/solid/backends/udisks2/udisksstoragedrive.h
-new file mode 100644
-index 0000000..9c87a23
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksstoragedrive.h
-@@ -0,0 +1,61 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef UDISKS2STORAGEDRIVE_H
-+#define UDISKS2STORAGEDRIVE_H
-+
-+#include <ifaces/storagedrive.h>
-+
-+#include "../shared/udevqtdevice.h"
-+
-+#include "udisksblock.h"
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+
-+class StorageDrive: public Block, virtual public Solid::Ifaces::StorageDrive
-+{
-+    Q_OBJECT
-+    Q_INTERFACES(Solid::Ifaces::StorageDrive)
-+
-+public:
-+    StorageDrive(Device *dev);
-+    virtual ~StorageDrive();
-+
-+    virtual qulonglong size() const;
-+    virtual bool isHotpluggable() const;
-+    virtual bool isRemovable() const;
-+    virtual Solid::StorageDrive::DriveType driveType() const;
-+    virtual Solid::StorageDrive::Bus bus() const;
-+
-+private:
-+    UdevQt::Device m_udevDevice;
-+};
-+
-+}
-+}
-+}
-+
-+#endif // UDISK2SSTORAGEDRIVE_H
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksstoragevolume.cpp b/tier1/solid/src/solid/backends/udisks2/udisksstoragevolume.cpp
-new file mode 100644
-index 0000000..a7d8fad
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksstoragevolume.cpp
-@@ -0,0 +1,105 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include "udisksstoragevolume.h"
-+#include "udisks2.h"
-+
-+using namespace Solid::Backends::UDisks2;
-+
-+StorageVolume::StorageVolume(Device *device)
-+    : Block(device)
-+{
-+}
-+
-+StorageVolume::~StorageVolume()
-+{
-+}
-+
-+QString StorageVolume::encryptedContainerUdi() const
-+{
-+    const QString path = m_device->prop("CryptoBackingDevice").value<QDBusObjectPath>().path();
-+    if ( path.isEmpty() || path == "/")
-+        return QString();
-+    else
-+        return path;
-+}
-+
-+qulonglong StorageVolume::size() const
-+{
-+    return m_device->prop("Size").toULongLong();
-+}
-+
-+QString StorageVolume::uuid() const
-+{
-+    return m_device->prop("IdUUID").toString();
-+}
-+
-+QString StorageVolume::label() const
-+{
-+    QString label = m_device->prop("HintName").toString();
-+    if (label.isEmpty())
-+        label = m_device->prop("IdLabel").toString();
-+    if (label.isEmpty())
-+        label = m_device->prop("Name").toString();
-+    return label;
-+}
-+
-+QString StorageVolume::fsType() const
-+{
-+    return m_device->prop("IdType").toString();
-+}
-+
-+Solid::StorageVolume::UsageType StorageVolume::usage() const
-+{
-+    const QString usage = m_device->prop("IdUsage").toString();
-+
-+    if (m_device->hasInterface(UD2_DBUS_INTERFACE_FILESYSTEM))
-+    {
-+        return Solid::StorageVolume::FileSystem;
-+    }
-+    else if (m_device->isPartitionTable())
-+    {
-+        return Solid::StorageVolume::PartitionTable;
-+    }
-+    else if (usage == "raid")
-+    {
-+        return Solid::StorageVolume::Raid;
-+    }
-+    else if (m_device->isEncryptedContainer())
-+    {
-+        return Solid::StorageVolume::Encrypted;
-+    }
-+    else if (usage == "unused" || usage.isEmpty())
-+    {
-+        return Solid::StorageVolume::Unused;
-+    }
-+    else
-+    {
-+        return Solid::StorageVolume::Other;
-+    }
-+}
-+
-+bool StorageVolume::isIgnored() const
-+{
-+    const Solid::StorageVolume::UsageType usg = usage();
-+    return m_device->prop("HintIgnore").toBool() || m_device->isSwap() ||
-+            ((usg == Solid::StorageVolume::Unused || usg == Solid::StorageVolume::Other || usg == Solid::StorageVolume::PartitionTable) && !m_device->isOpticalDisc());
-+}
-diff --git a/tier1/solid/src/solid/backends/udisks2/udisksstoragevolume.h b/tier1/solid/src/solid/backends/udisks2/udisksstoragevolume.h
-new file mode 100644
-index 0000000..2ca04d2
---- /dev/null
-+++ b/tier1/solid/src/solid/backends/udisks2/udisksstoragevolume.h
-@@ -0,0 +1,57 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef UDISKS2STORAGEVOLUME_H
-+#define UDISKS2STORAGEVOLUME_H
-+
-+#include <ifaces/storagevolume.h>
-+#include "udisksblock.h"
-+
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+
-+class StorageVolume: public Block, virtual public Solid::Ifaces::StorageVolume
-+{
-+    Q_OBJECT
-+    Q_INTERFACES(Solid::Ifaces::StorageVolume)
-+
-+public:
-+    StorageVolume(Device *device);
-+    virtual ~StorageVolume();
-+
-+    virtual QString encryptedContainerUdi() const;
-+    virtual qulonglong size() const;
-+    virtual QString uuid() const;
-+    virtual QString label() const;
-+    virtual QString fsType() const;
-+    virtual Solid::StorageVolume::UsageType usage() const;
-+    virtual bool isIgnored() const;
-+};
-+
-+}
-+}
-+}
-+
-+#endif // UDISKS2STORAGEVOLUME_H

diff --git a/kde-base/kdelibs/kdelibs-4.8.90.ebuild b/kde-base/kdelibs/kdelibs-4.8.90.ebuild
index bad7083..0a72c9e 100644
--- a/kde-base/kdelibs/kdelibs-4.8.90.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.8.90.ebuild
@@ -22,6 +22,7 @@ LICENSE="LGPL-2.1"
 IUSE="3dnow acl alsa altivec +bzip2 debug doc fam +handbook jpeg2k kerberos lzma
 mmx nls openexr +policykit semantic-desktop spell sse sse2 ssl +udev +udisks
 +upower upnp zeroconf"
+SRC_URI+=" http://dev.gentoo.org/~dilfridge/distfiles/kdelibs-4.8.90-udisks2_backend.patch.bz2"
 
 REQUIRED_USE="
 	udisks? ( udev )
@@ -129,7 +130,9 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.8.2-calculator_key.patch"
 	"${FILESDIR}/${PN}-4.8.4-bytecode.patch"
-	"${FILESDIR}/${PN}-4.8.90-udisks2"_{prep,backend,post}.patch
+	"${FILESDIR}/${PN}-4.8.90-udisks2_prep.patch"
+	"${WORKDIR}/${PN}-4.8.90-udisks2_backend.patch"
+	"${FILESDIR}/${PN}-4.8.90-udisks2_post.patch"
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index 7b1a1b1..7e7d1d4 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -22,6 +22,7 @@ LICENSE="LGPL-2.1"
 IUSE="3dnow acl alsa altivec +bzip2 debug doc fam +handbook jpeg2k kerberos lzma
 mmx nls openexr +policykit semantic-desktop spell sse sse2 ssl +udev +udisks
 +upower upnp zeroconf"
+SRC_URI+=" http://dev.gentoo.org/~dilfridge/distfiles/kdelibs-4.8.90-udisks2_backend.patch.bz2"
 
 REQUIRED_USE="
 	udisks? ( udev )
@@ -129,7 +130,9 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.8.2-calculator_key.patch"
 	"${FILESDIR}/${PN}-4.8.4-bytecode.patch"
-	"${FILESDIR}/${PN}-4.8.90-udisks2"_{prep,backend,post}.patch
+	"${FILESDIR}/${PN}-4.8.90-udisks2_prep.patch"
+	"${WORKDIR}/${PN}-4.8.90-udisks2_backend.patch"
+	"${FILESDIR}/${PN}-4.8.90-udisks2_post.patch"
 )
 
 pkg_pretend() {



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-06-20 11:44 Andreas Hüttel
  0 siblings, 0 replies; 38+ messages in thread
From: Andreas Hüttel @ 2012-06-20 11:44 UTC (permalink / raw
  To: gentoo-commits

commit:     0beb40a3423f2a6237e75992aba020f982a72cef
Author:     Andreas K. Huettel <andreas.huettel <AT> physik <DOT> uni-r <DOT> de>
AuthorDate: Wed Jun 20 11:43:41 2012 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Jun 20 11:43:41 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=0beb40a3

[kde-base/kdelibs] Properly apply udisks2 patch

(Portage version: 2.2.0_alpha110/git/Linux x86_64, RepoMan options: --force, unsigned Manifest commit)

---
 .../kdelibs/files/kdelibs-4.8.90-udisks2.patch     | 3643 ++++++++++++++++++++
 .../files/kdelibs-4.8.90-udisks2_post.patch        |  113 -
 .../files/kdelibs-4.8.90-udisks2_prep.patch        |   65 -
 kde-base/kdelibs/kdelibs-4.8.90.ebuild             |    5 +-
 kde-base/kdelibs/kdelibs-9999.ebuild               |    5 +-
 5 files changed, 3645 insertions(+), 186 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2.patch b/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2.patch
new file mode 100644
index 0000000..294ceb8
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2.patch
@@ -0,0 +1,3643 @@
+diff -ruN kdelibs-4.8.90.orig/solid/solid/CMakeLists.txt kdelibs-4.8.90/solid/solid/CMakeLists.txt
+--- kdelibs-4.8.90.orig/solid/solid/CMakeLists.txt	2012-05-23 01:45:27.000000000 +0200
++++ kdelibs-4.8.90/solid/solid/CMakeLists.txt	2012-06-20 13:39:51.000000000 +0200
+@@ -1,6 +1,7 @@
+ set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
+ add_subdirectory( ifaces )
+ include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
++include_directories( ${QT_QTDBUS_INCLUDE_DIR} )
+ 
+ if(WIN32)
+    include_directories( ${KDEWIN_INCLUDES} )
+@@ -39,7 +40,6 @@
+ 
+ file(MAKE_DIRECTORY
+    ${CMAKE_CURRENT_BINARY_DIR}/backends/fakehw
+-   ${CMAKE_CURRENT_BINARY_DIR}/backends/hal
+    ${CMAKE_CURRENT_BINARY_DIR}/backends/udev
+    ${CMAKE_CURRENT_BINARY_DIR}/backends/wmi
+ )
+@@ -225,33 +225,6 @@
+    endif( UDEV_FOUND )
+ 
+ 
+-   message(STATUS "Building Solid HAL backend." )
+-   set(solid_LIB_SRCS ${solid_LIB_SRCS}
+-   backends/hal/halacadapter.cpp
+-   backends/hal/halaudiointerface.cpp
+-   backends/hal/halbattery.cpp
+-   backends/hal/halblock.cpp
+-   backends/hal/halbutton.cpp
+-   backends/hal/halcamera.cpp
+-   backends/hal/halcdrom.cpp
+-   backends/hal/haldeviceinterface.cpp
+-   backends/hal/haldvbinterface.cpp
+-   backends/hal/halfstabhandling.cpp
+-   backends/hal/halgenericinterface.cpp
+-   backends/hal/haldevice.cpp
+-   backends/hal/halmanager.cpp
+-   backends/hal/halnetworkinterface.cpp
+-   backends/hal/halserialinterface.cpp
+-   backends/hal/halopticaldisc.cpp
+-   backends/hal/halportablemediaplayer.cpp
+-   backends/hal/halprocessor.cpp
+-   backends/hal/halstorageaccess.cpp
+-   backends/hal/halstorage.cpp
+-   backends/hal/halvideo.cpp
+-   backends/hal/halvolume.cpp
+-   backends/hal/halsmartcardreader.cpp
+-   )
+-
+    message(STATUS "Building Solid UPower backend." )
+    set(solid_LIB_SRCS ${solid_LIB_SRCS}
+    backends/upower/upowermanager.cpp
+@@ -264,18 +237,19 @@
+ 
+    # FIXME: this should work on more Unix systems
+    if (CMAKE_SYSTEM_NAME MATCHES Linux)
+-      message(STATUS "Building Solid UDisks backend." )
++      message(STATUS "Building Solid UDisks2 backend." )
+       set(solid_LIB_SRCS ${solid_LIB_SRCS}
+-      backends/udisks/udisksmanager.cpp
+-      backends/udisks/udisksdevice.cpp
+-      backends/udisks/udisksblock.cpp
+-      backends/udisks/udisksstoragevolume.cpp
+-      backends/udisks/udisksdeviceinterface.cpp
+-      backends/udisks/udisksopticaldisc.cpp
+-      backends/udisks/udisksopticaldrive.cpp
+-      backends/udisks/udisksstoragedrive.cpp
+-      backends/udisks/udisksstorageaccess.cpp
+-      backends/udisks/udisksgenericinterface.cpp
++      backends/udisks2/udisksmanager.cpp
++      backends/udisks2/udisksdevice.cpp
++      backends/udisks2/udisksblock.cpp
++      backends/udisks2/udisksstoragevolume.cpp
++      backends/udisks2/udisksdeviceinterface.cpp
++      backends/udisks2/udisksopticaldisc.cpp
++      backends/udisks2/udisksopticaldrive.cpp
++      backends/udisks2/udisksstoragedrive.cpp
++      backends/udisks2/udisksstorageaccess.cpp
++      backends/udisks2/udisksgenericinterface.cpp
++      backends/udisks2/dbus/manager.cpp
+       )
+    endif (CMAKE_SYSTEM_NAME MATCHES Linux)
+ 
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/dbus/manager.cpp kdelibs-4.8.90/solid/solid/backends/udisks2/dbus/manager.cpp
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/dbus/manager.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/dbus/manager.cpp	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,26 @@
++/*
++ * This file was generated by qdbusxml2cpp version 0.7
++ * Command line was: qdbusxml2cpp -p manager manager.xml
++ *
++ * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
++ *
++ * This is an auto-generated file.
++ * This file may have been hand-edited. Look for HAND-EDIT comments
++ * before re-generating it.
++ */
++
++#include "manager.h"
++
++/*
++ * Implementation of interface class OrgFreedesktopDBusObjectManagerInterface
++ */
++
++OrgFreedesktopDBusObjectManagerInterface::OrgFreedesktopDBusObjectManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
++    : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
++{
++}
++
++OrgFreedesktopDBusObjectManagerInterface::~OrgFreedesktopDBusObjectManagerInterface()
++{
++}
++
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/dbus/manager.h kdelibs-4.8.90/solid/solid/backends/udisks2/dbus/manager.h
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/dbus/manager.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/dbus/manager.h	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,59 @@
++/*
++ * This file was generated by qdbusxml2cpp version 0.7
++ * Command line was: qdbusxml2cpp -p manager manager.xml
++ *
++ * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
++ *
++ * This is an auto-generated file.
++ * Do not edit! All changes made to it will be lost.
++ */
++
++#ifndef MANAGER_H_1329493525
++#define MANAGER_H_1329493525
++
++#include <QtCore/QObject>
++#include <QtCore/QByteArray>
++#include <QtCore/QList>
++#include <QtCore/QMap>
++#include <QtCore/QString>
++#include <QtCore/QStringList>
++#include <QtCore/QVariant>
++#include <QtDBus/QtDBus>
++
++#include "../udisks2.h"
++
++/*
++ * Proxy class for interface org.freedesktop.DBus.ObjectManager
++ */
++class OrgFreedesktopDBusObjectManagerInterface: public QDBusAbstractInterface
++{
++    Q_OBJECT
++public:
++    static inline const char *staticInterfaceName()
++    { return "org.freedesktop.DBus.ObjectManager"; }
++
++public:
++    OrgFreedesktopDBusObjectManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
++
++    ~OrgFreedesktopDBusObjectManagerInterface();
++
++public Q_SLOTS: // METHODS
++    inline QDBusPendingReply<DBUSManagerStruct> GetManagedObjects()
++    {
++        QList<QVariant> argumentList;
++        return asyncCallWithArgumentList(QLatin1String("GetManagedObjects"), argumentList);
++    }
++
++Q_SIGNALS: // SIGNALS
++    void InterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties);
++    void InterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces);
++};
++
++namespace org {
++  namespace freedesktop {
++    namespace DBus {
++      typedef ::OrgFreedesktopDBusObjectManagerInterface ObjectManager;
++    }
++  }
++}
++#endif
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/dbus/manager.xml kdelibs-4.8.90/solid/solid/backends/udisks2/dbus/manager.xml
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/dbus/manager.xml	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/dbus/manager.xml	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,21 @@
++<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
++                      "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
++<node>
++  <interface name="org.freedesktop.DBus.ObjectManager">
++    <method name="GetManagedObjects">
++      <arg type="a{oa{sa{sv}}}" name="object_paths_interfaces_and_properties" direction="out">
++        <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="DBUSManagerStruct"/>
++      </arg>
++    </method>
++    <signal name="InterfacesAdded">
++      <arg type="o" name="object_path"/>
++      <arg type="a{sa{sv}}" name="interfaces_and_properties">
++        <annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="QVariantMapMap"/>
++      </arg>
++    </signal>
++    <signal name="InterfacesRemoved">
++      <arg type="o" name="object_path"/>
++      <arg type="as" name="interfaces"/>
++    </signal>
++  </interface>
++</node>
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisks2.h kdelibs-4.8.90/solid/solid/backends/udisks2/udisks2.h
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisks2.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisks2.h	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,77 @@
++/*
++    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef SOLID_BACKENDS_UDISKS2_H
++#define SOLID_BACKENDS_UDISKS2_H
++
++#include <QMetaType>
++#include <QtDBus>
++#include <QVariant>
++#include <QMap>
++#include <QList>
++
++typedef QList<QByteArray> QByteArrayList;
++Q_DECLARE_METATYPE(QByteArrayList)
++
++typedef QMap<QString,QVariantMap> QVariantMapMap;
++Q_DECLARE_METATYPE(QVariantMapMap)
++
++typedef QMap<QDBusObjectPath, QVariantMapMap> DBUSManagerStruct;
++Q_DECLARE_METATYPE(DBUSManagerStruct)
++
++/* UDisks2 */
++#define UD2_DBUS_SERVICE                 "org.freedesktop.UDisks2"
++#define UD2_DBUS_PATH                    "/org/freedesktop/UDisks2"
++#define UD2_UDI_DISKS_PREFIX             "/org/freedesktop/UDisks2"
++#define UD2_DBUS_PATH_MANAGER            "/org/freedesktop/UDisks2/Manager"
++#define UD2_DBUS_PATH_DRIVES             "/org/freedesktop/UDisks2/drives/"
++#define UD2_DBUS_PATH_JOBS               "/org/freedesktop/UDisks2/jobs/"
++#define DBUS_INTERFACE_PROPS             "org.freedesktop.DBus.Properties"
++#define DBUS_INTERFACE_INTROSPECT        "org.freedesktop.DBus.Introspectable"
++#define DBUS_INTERFACE_MANAGER           "org.freedesktop.DBus.ObjectManager"
++#define UD2_DBUS_INTERFACE_BLOCK         "org.freedesktop.UDisks2.Block"
++#define UD2_DBUS_INTERFACE_DRIVE         "org.freedesktop.UDisks2.Drive"
++#define UD2_DBUS_INTERFACE_PARTITION     "org.freedesktop.UDisks2.Partition"
++#define UD2_DBUS_INTERFACE_PARTITIONTABLE   "org.freedesktop.UDisks2.PartitionTable"
++#define UD2_DBUS_INTERFACE_FILESYSTEM    "org.freedesktop.UDisks2.Filesystem"
++#define UD2_DBUS_INTERFACE_ENCRYPTED     "org.freedesktop.UDisks2.Encrypted"
++#define UD2_DBUS_INTERFACE_SWAP          "org.freedesktop.UDisks2.Swapspace"
++
++/* errors */
++#define UD2_ERROR_UNAUTHORIZED            "org.freedesktop.PolicyKit.Error.NotAuthorized"
++#define UD2_ERROR_BUSY                    "org.freedesktop.UDisks2.Error.DeviceBusy"
++#define UD2_ERROR_FAILED                  "org.freedesktop.UDisks2.Error.Failed"
++#define UD2_ERROR_CANCELED                "org.freedesktop.UDisks2.Error.Cancelled"
++#define UD2_ERROR_INVALID_OPTION          "org.freedesktop.UDisks2.Error.OptionNotPermitted"
++#define UD2_ERROR_MISSING_DRIVER          "org.freedesktop.UDisks2.Error.NotSupported"
++
++#define UD2_ERROR_ALREADY_MOUNTED         "org.freedesktop.UDisks2.Error.AlreadyMounted"
++#define UD2_ERROR_NOT_MOUNTED             "org.freedesktop.UDisks2.Error.NotMounted"
++#define UD2_ERROR_MOUNTED_BY_OTHER_USER   "org.freedesktop.UDisks2.Error.MountedByOtherUser"
++#define UD2_ERROR_ALREADY_UNMOUNTING      "org.freedesktop.UDisks2.Error.AlreadyUnmounting"
++#define UD2_ERROR_TIMED_OUT               "org.freedesktop.UDisks2.Error.Timedout"
++#define UD2_ERROR_WOULD_WAKEUP            "org.freedesktop.UDisks2.Error.WouldWakeup"
++#define UD2_ERROR_ALREADY_CANCELLED       "org.freedesktop.UDisks2.Error.AlreadyCancelled"
++
++#define UD2_ERROR_NOT_AUTHORIZED          "org.freedesktop.UDisks2.Error.NotAuthorized"
++#define UD2_ERROR_NOT_AUTHORIZED_CAN_OBTAIN  "org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain"
++#define UD2_ERROR_NOT_AUTHORIZED_DISMISSED   "org.freedesktop.UDisks2.Error.NotAuthorizedDismissed"
++
++#endif // SOLID_BACKENDS_UDISKS2_H
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksblock.cpp kdelibs-4.8.90/solid/solid/backends/udisks2/udisksblock.cpp
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksblock.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksblock.cpp	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,84 @@
++/*
++    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include <linux/kdev_t.h>
++
++#include <QFile>
++#include <QtDBus/QDBusConnection>
++#include <QtDBus/QDBusPendingReply>
++
++#include "udisksblock.h"
++#include "dbus/manager.h"
++
++using namespace Solid::Backends::UDisks2;
++
++Block::Block(Device *dev)
++    : DeviceInterface(dev)
++{
++    m_devNum = m_device->prop("DeviceNumber").toULongLong();
++    m_devFile = QFile::decodeName(m_device->prop("Device").toByteArray());
++
++    // we have a drive (non-block device for udisks), so let's find the corresponding (real) block device
++    if (m_devNum == 0 || m_devFile.isEmpty()) {
++        org::freedesktop::DBus::ObjectManager manager(UD2_DBUS_SERVICE, UD2_DBUS_PATH, QDBusConnection::systemBus());
++        QDBusPendingReply<DBUSManagerStruct> reply = manager.GetManagedObjects();
++        reply.waitForFinished();
++        if (!reply.isError()) {  // enum devices
++            Q_FOREACH(const QDBusObjectPath &path, reply.value().keys()) {
++                const QString udi = path.path();
++
++                if (udi == UD2_DBUS_PATH_MANAGER || udi == UD2_UDI_DISKS_PREFIX || udi.startsWith(UD2_DBUS_PATH_JOBS))
++                    continue;
++
++                Device device(udi);
++                if (device.drivePath() == dev->udi()) {
++                    m_devNum = device.prop("DeviceNumber").toULongLong();
++                    m_devFile = QFile::decodeName(device.prop("Device").toByteArray());
++                    break;
++                }
++            }
++        }
++        else  // show error
++        {
++            qWarning() << "Failed enumerating UDisks2 objects:" << reply.error().name() << "\n" << reply.error().message();
++        }
++    }
++
++    qDebug() << "devnum:" << m_devNum << "dev file:" << m_devFile;
++}
++
++Block::~Block()
++{
++}
++
++QString Block::device() const
++{
++    return m_devFile;
++}
++
++int Block::deviceMinor() const
++{
++    return MINOR(m_devNum);
++}
++
++int Block::deviceMajor() const
++{
++    return MAJOR(m_devNum);
++}
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksblock.h kdelibs-4.8.90/solid/solid/backends/udisks2/udisksblock.h
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksblock.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksblock.h	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,56 @@
++/*
++    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2BLOCK_H
++#define UDISKS2BLOCK_H
++
++#include <solid/ifaces/block.h>
++#include "udisksdeviceinterface.h"
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class Block: public DeviceInterface, virtual public Solid::Ifaces::Block
++{
++
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::Block)
++
++public:
++    Block(Device *dev);
++    virtual ~Block();
++
++    virtual QString device() const;
++    virtual int deviceMinor() const;
++    virtual int deviceMajor() const;
++private:
++    dev_t m_devNum;
++    QString m_devFile;
++};
++
++}
++}
++}
++
++#endif // UDISKS2BLOCK_H
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksdevice.cpp kdelibs-4.8.90/solid/solid/backends/udisks2/udisksdevice.cpp
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksdevice.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksdevice.cpp	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,910 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksdevice.h"
++#include "udisksblock.h"
++#include "udisksdeviceinterface.h"
++#include "udisksstoragevolume.h"
++#include "udisksopticaldisc.h"
++#include "udisksopticaldrive.h"
++#include "udisksstorageaccess.h"
++#include "udisksgenericinterface.h"
++
++#include <solid/genericinterface.h>
++#include <solid/deviceinterface.h>
++#include <solid/device.h>
++
++#include <QtCore/QDebug>
++
++#include <QtDBus/QDBusMessage>
++#include <QtDBus/QDBusMetaType>
++#include <QtDBus/QDBusPendingReply>
++#include <QtDBus/QDBusArgument>
++
++#include <QtXml/QDomDocument>
++
++using namespace Solid::Backends::UDisks2;
++
++// Adapted from KLocale as Solid needs to be Qt-only
++static QString formatByteSize(double size)
++{
++    // Per IEC 60027-2
++
++    // Binary prefixes
++    //Tebi-byte             TiB             2^40    1,099,511,627,776 bytes
++    //Gibi-byte             GiB             2^30    1,073,741,824 bytes
++    //Mebi-byte             MiB             2^20    1,048,576 bytes
++    //Kibi-byte             KiB             2^10    1,024 bytes
++
++    QString s;
++    // Gibi-byte
++    if ( size >= 1073741824.0 )
++    {
++        size /= 1073741824.0;
++        if ( size > 1024 ) // Tebi-byte
++            s = QObject::tr("%1 TiB").arg(QLocale().toString(size / 1024.0, 'f', 1));
++        else
++            s = QObject::tr("%1 GiB").arg(QLocale().toString(size, 'f', 1));
++    }
++    // Mebi-byte
++    else if ( size >= 1048576.0 )
++    {
++        size /= 1048576.0;
++        s = QObject::tr("%1 MiB").arg(QLocale().toString(size, 'f', 1));
++    }
++    // Kibi-byte
++    else if ( size >= 1024.0 )
++    {
++        size /= 1024.0;
++        s = QObject::tr("%1 KiB").arg(QLocale().toString(size, 'f', 1));
++    }
++    // Just byte
++    else if ( size > 0 )
++    {
++        s = QObject::tr("%1 B").arg(QLocale().toString(size, 'f', 1));
++    }
++    // Nothing
++    else
++    {
++        s = QObject::tr("0 B");
++    }
++    return s;
++}
++
++Device::Device(const QString &udi)
++    : Solid::Ifaces::Device()
++    , m_udi(udi)
++{
++    m_device = new QDBusInterface(UD2_DBUS_SERVICE, m_udi,
++                                  QString(), // no interface, we aggregate them
++                                  QDBusConnection::systemBus());
++
++    if (m_device->isValid()) {
++        QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, m_udi, DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
++                                             SLOT(slotPropertiesChanged(QString,QVariantMap,QStringList)));
++
++        QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, UD2_DBUS_PATH, DBUS_INTERFACE_MANAGER, "InterfacesAdded",
++                                             this, SLOT(slotInterfacesAdded(QDBusObjectPath,QVariantMapMap)));
++        QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, UD2_DBUS_PATH, DBUS_INTERFACE_MANAGER, "InterfacesRemoved",
++                                             this, SLOT(slotInterfacesRemoved(QDBusObjectPath,QStringList)));
++
++        initInterfaces();
++    }
++}
++
++Device::~Device()
++{
++    delete m_device;
++}
++
++QObject* Device::createDeviceInterface(const Solid::DeviceInterface::Type& type)
++{
++    if (!queryDeviceInterface(type)) {
++        return 0;
++    }
++
++    DeviceInterface *iface = 0;
++    switch (type)
++    {
++    case Solid::DeviceInterface::GenericInterface:
++        iface = new GenericInterface(this);
++        break;
++    case Solid::DeviceInterface::Block:
++        iface = new Block(this);
++        break;
++    case Solid::DeviceInterface::StorageAccess:
++        iface = new StorageAccess(this);
++        break;
++    case Solid::DeviceInterface::StorageDrive:
++        iface = new StorageDrive(this);
++        break;
++    case Solid::DeviceInterface::OpticalDrive:
++        iface = new OpticalDrive(this);
++        break;
++    case Solid::DeviceInterface::StorageVolume:
++        iface = new StorageVolume(this);
++        break;
++    case Solid::DeviceInterface::OpticalDisc:
++        iface = new OpticalDisc(this);
++        break;
++    default:
++        break;
++    }
++    return iface;
++}
++
++bool Device::queryDeviceInterface(const Solid::DeviceInterface::Type& type) const
++{
++    switch (type) {
++    case Solid::DeviceInterface::GenericInterface:
++        return true;
++    case Solid::DeviceInterface::Block:
++        return isBlock();
++    case Solid::DeviceInterface::StorageVolume:
++        return isStorageVolume();
++    case Solid::DeviceInterface::StorageAccess:
++        return isStorageAccess();
++    case Solid::DeviceInterface::StorageDrive:
++        return isDrive();
++    case Solid::DeviceInterface::OpticalDrive:
++        return isOpticalDrive();
++    case Solid::DeviceInterface::OpticalDisc:
++        return isOpticalDisc();
++    default:
++        return false;
++    }
++}
++
++QStringList Device::emblems() const
++{
++    QStringList res;
++
++    if (queryDeviceInterface(Solid::DeviceInterface::StorageAccess))
++    {
++        const UDisks2::StorageAccess accessIface(const_cast<Device *>(this));
++        if (accessIface.isAccessible())
++        {
++            if (isEncryptedContainer())
++                res << "emblem-encrypted-unlocked";
++            else
++                res << "emblem-mounted";
++        }
++        else
++        {
++            if (isEncryptedContainer())
++                res << "emblem-encrypted-locked";
++            else
++                res << "emblem-unmounted";
++        }
++    }
++
++    return res;
++}
++
++QString Device::description() const
++{
++    const QString hintName = prop("HintName").toString();
++    if (!hintName.isEmpty())
++        return hintName;
++
++    if (queryDeviceInterface(Solid::DeviceInterface::StorageDrive))
++        return storageDescription();
++    else if (queryDeviceInterface(Solid::DeviceInterface::StorageVolume))
++        return volumeDescription();
++    else
++        return product();
++}
++
++QString Device::storageDescription() const
++{
++    QString description;
++    const UDisks2::StorageDrive storageDrive(const_cast<Device*>(this));
++    Solid::StorageDrive::DriveType drive_type = storageDrive.driveType();
++    bool drive_is_hotpluggable = storageDrive.isHotpluggable();
++
++    if (drive_type == Solid::StorageDrive::CdromDrive)
++    {
++        const UDisks2::OpticalDrive opticalDrive(const_cast<Device*>(this));
++        Solid::OpticalDrive::MediumTypes mediumTypes = opticalDrive.supportedMedia();
++        QString first;
++        QString second;
++
++        first = QObject::tr("CD-ROM", "First item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Cdr)
++            first = QObject::tr("CD-R", "First item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Cdrw)
++            first = QObject::tr("CD-RW", "First item of %1%2 Drive sentence");
++
++        if (mediumTypes & Solid::OpticalDrive::Dvd)
++            second = QObject::tr("/DVD-ROM", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Dvdplusr)
++            second = QObject::tr("/DVD+R", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Dvdplusrw)
++            second = QObject::tr("/DVD+RW", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Dvdr)
++            second = QObject::tr("/DVD-R", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Dvdrw)
++            second = QObject::tr("/DVD-RW", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Dvdram)
++            second = QObject::tr("/DVD-RAM", "Second item of %1%2 Drive sentence");
++        if ((mediumTypes & Solid::OpticalDrive::Dvdr) && (mediumTypes & Solid::OpticalDrive::Dvdplusr))
++        {
++            if(mediumTypes & Solid::OpticalDrive::Dvdplusdl)
++                second = QObject::trUtf8("/DVD±R DL", "Second item of %1%2 Drive sentence");
++            else
++                second = QObject::trUtf8("/DVD±R", "Second item of %1%2 Drive sentence");
++        }
++        if ((mediumTypes & Solid::OpticalDrive::Dvdrw) && (mediumTypes & Solid::OpticalDrive::Dvdplusrw))
++        {
++            if((mediumTypes & Solid::OpticalDrive::Dvdplusdl) || (mediumTypes & Solid::OpticalDrive::Dvdplusdlrw))
++                second = QObject::trUtf8("/DVD±RW DL", "Second item of %1%2 Drive sentence");
++            else
++                second = QObject::trUtf8("/DVD±RW", "Second item of %1%2 Drive sentence");
++        }
++        if (mediumTypes & Solid::OpticalDrive::Bd)
++            second = QObject::tr("/BD-ROM", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Bdr)
++            second = QObject::tr("/BD-R", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Bdre)
++            second = QObject::tr("/BD-RE", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::HdDvd)
++            second = QObject::tr("/HD DVD-ROM", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::HdDvdr)
++            second = QObject::tr("/HD DVD-R", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::HdDvdrw)
++            second = QObject::tr("/HD DVD-RW", "Second item of %1%2 Drive sentence");
++
++        if (drive_is_hotpluggable)
++            description = QObject::tr("External %1%2 Drive", "%1 is CD-ROM/CD-R/etc; %2 is '/DVD-ROM'/'/DVD-R'/etc (with leading slash)").arg(first).arg(second);
++        else
++            description = QObject::tr("%1%2 Drive", "%1 is CD-ROM/CD-R/etc; %2 is '/DVD-ROM'/'/DVD-R'/etc (with leading slash)").arg(first).arg(second);
++
++        return description;
++    }
++
++    if (drive_type == Solid::StorageDrive::Floppy)
++    {
++        if (drive_is_hotpluggable)
++            description = QObject::tr("External Floppy Drive");
++        else
++            description = QObject::tr("Floppy Drive");
++
++        return description;
++    }
++
++    bool drive_is_removable = storageDrive.isRemovable();
++
++    if (drive_type == Solid::StorageDrive::HardDisk && !drive_is_removable)
++    {
++        QString size_str = formatByteSize(storageDrive.size());
++        if (!size_str.isEmpty())
++        {
++            if (drive_is_hotpluggable)
++                description = QObject::tr("%1 External Hard Drive", "%1 is the size").arg(size_str);
++            else
++                description = QObject::tr("%1 Hard Drive", "%1 is the size").arg(size_str);
++        } else {
++            if (drive_is_hotpluggable)
++                description = QObject::tr("External Hard Drive");
++            else
++                description = QObject::tr("Hard Drive");
++        }
++
++        return description;
++    }
++
++    QString vendormodel_str;
++    QString model = product();
++    QString vendor_str = vendor();
++
++    if (vendor_str.isEmpty())
++    {
++        if (!model.isEmpty())
++            vendormodel_str = model;
++    }
++    else
++    {
++        if (model.isEmpty())
++            vendormodel_str = vendor_str;
++        else
++        {
++            if (model.startsWith(vendor_str))
++            {
++                // e.g. vendor is "Nokia" and model is "Nokia N950" we do not want "Nokia Nokia N950" as description
++                vendormodel_str = model;
++            }
++            else
++            {
++                vendormodel_str = QObject::tr("%1 %2", "%1 is the vendor, %2 is the model of the device").arg(vendor_str).arg(model);
++            }
++        }
++    }
++
++    if (vendormodel_str.isEmpty())
++        description = QObject::tr("Drive");
++    else
++        description = vendormodel_str;
++
++    return description;
++}
++
++QString Device::volumeDescription() const
++{
++    QString description;
++    const UDisks2::StorageVolume storageVolume(const_cast<Device*>(this));
++    QString volume_label = prop("IdLabel").toString();
++    if (volume_label.isEmpty())
++        volume_label = prop("Name").toString();
++    if (!volume_label.isEmpty())
++        return volume_label;
++
++    UDisks2::Device storageDevice(drivePath());
++    const UDisks2::StorageDrive storageDrive(&storageDevice);
++    Solid::StorageDrive::DriveType drive_type = storageDrive.driveType();
++
++    // Handle media in optical drives
++    if (drive_type == Solid::StorageDrive::CdromDrive)
++    {
++        const UDisks2::OpticalDisc disc(const_cast<Device*>(this));
++        switch (disc.discType())
++        {
++            case Solid::OpticalDisc::UnknownDiscType:
++            case Solid::OpticalDisc::CdRom:
++                description = QObject::tr("CD-ROM");
++                break;
++
++            case Solid::OpticalDisc::CdRecordable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank CD-R");
++                else
++                    description = QObject::tr("CD-R");
++                break;
++
++            case Solid::OpticalDisc::CdRewritable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank CD-RW");
++                else
++                    description = QObject::tr("CD-RW");
++                break;
++
++            case Solid::OpticalDisc::DvdRom:
++                description = QObject::tr("DVD-ROM");
++                break;
++
++            case Solid::OpticalDisc::DvdRam:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD-RAM");
++                else
++                    description = QObject::tr("DVD-RAM");
++                break;
++
++            case Solid::OpticalDisc::DvdRecordable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD-R");
++                else
++                    description = QObject::tr("DVD-R");
++                break;
++
++            case Solid::OpticalDisc::DvdPlusRecordableDuallayer:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD+R Dual-Layer");
++                else
++                    description = QObject::tr("DVD+R Dual-Layer");
++                break;
++
++            case Solid::OpticalDisc::DvdRewritable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD-RW");
++                else
++                    description = QObject::tr("DVD-RW");
++                break;
++
++            case Solid::OpticalDisc::DvdPlusRecordable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD+R");
++                else
++                    description = QObject::tr("DVD+R");
++                break;
++
++            case Solid::OpticalDisc::DvdPlusRewritable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD+RW");
++                else
++                    description = QObject::tr("DVD+RW");
++                break;
++
++            case Solid::OpticalDisc::DvdPlusRewritableDuallayer:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD+RW Dual-Layer");
++                else
++                    description = QObject::tr("DVD+RW Dual-Layer");
++                break;
++
++            case Solid::OpticalDisc::BluRayRom:
++                description = QObject::tr("BD-ROM");
++                break;
++
++            case Solid::OpticalDisc::BluRayRecordable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank BD-R");
++                else
++                    description = QObject::tr("BD-R");
++                break;
++
++            case Solid::OpticalDisc::BluRayRewritable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank BD-RE");
++                else
++                    description = QObject::tr("BD-RE");
++                break;
++
++            case Solid::OpticalDisc::HdDvdRom:
++                description = QObject::tr("HD DVD-ROM");
++                break;
++
++            case Solid::OpticalDisc::HdDvdRecordable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank HD DVD-R");
++                else
++                    description = QObject::tr("HD DVD-R");
++                break;
++
++            case Solid::OpticalDisc::HdDvdRewritable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank HD DVD-RW");
++                else
++                    description = QObject::tr("HD DVD-RW");
++                break;
++            }
++
++        // Special case for pure audio disc
++        if (disc.availableContent() == Solid::OpticalDisc::Audio)
++            description = QObject::tr("Audio CD");
++
++        return description;
++    }
++
++    const bool drive_is_removable = storageDrive.isRemovable();
++    const bool drive_is_hotpluggable = storageDrive.isHotpluggable();
++
++    QString size_str = formatByteSize(storageVolume.size());
++    if (isEncryptedContainer())
++    {
++        if (!size_str.isEmpty())
++            description = QObject::tr("%1 Encrypted Container", "%1 is the size").arg(size_str);
++        else
++            description = QObject::tr("Encrypted Container");
++    }
++    else if (drive_type == Solid::StorageDrive::HardDisk && !drive_is_removable)
++    {
++        if (!size_str.isEmpty())
++        {
++            if (drive_is_hotpluggable)
++                description = QObject::tr("%1 External Hard Drive", "%1 is the size").arg(size_str);
++            else
++                description = QObject::tr("%1 Hard Drive", "%1 is the size").arg(size_str);
++        }
++        else
++        {
++            if (drive_is_hotpluggable)
++                description = QObject::tr("External Hard Drive");
++            else
++                description = QObject::tr("Hard Drive");
++        }
++    }
++    else
++    {
++        if (drive_is_removable)
++            description = QObject::tr("%1 Removable Media", "%1 is the size").arg(size_str);
++        else
++            description = QObject::tr("%1 Media", "%1 is the size").arg(size_str);
++    }
++
++    return description;
++}
++
++QString Device::icon() const
++{
++    QString iconName = prop( "HintIconName" ).toString();
++
++    if ( !iconName.isEmpty() )
++    {
++        return iconName;
++    }
++    else if (isDrive()) {
++        const bool isRemovable = prop("Removable").toBool();
++        const QString conn = prop("ConnectionBus").toString();
++
++        if (isOpticalDrive())
++            return "drive-optical";
++        else if (isRemovable && !isOpticalDisc()) {
++            if (conn == "usb")
++                return "drive-removable-media-usb";
++            else
++                return "drive-removable-media";
++        }
++    }
++    else if (isBlock()) {
++        Device drive(drivePath());
++
++        // handle media
++        const QString media = drive.prop("Media").toString();
++
++        if ( !media.isEmpty() )
++        {
++            if ( isOpticalDisc() )    // optical stuff
++            {
++                bool isWritable = drive.prop("OpticalBlank").toBool();
++
++                const UDisks2::OpticalDisc disc(const_cast<Device*>(this));
++                Solid::OpticalDisc::ContentTypes availContent = disc.availableContent();
++
++                if (availContent & Solid::OpticalDisc::VideoDvd) // Video DVD
++                    return "media-optical-dvd-video";
++                else if ((availContent & Solid::OpticalDisc::VideoCd) || (availContent & Solid::OpticalDisc::SuperVideoCd)) // Video CD
++                    return "media-optical-video";
++                else if ((availContent & Solid::OpticalDisc::Data) && (availContent & Solid::OpticalDisc::Audio)) // Mixed CD
++                    return "media-optical-mixed-cd";
++                else if (availContent & Solid::OpticalDisc::Audio) // Audio CD
++                    return "media-optical-audio";
++                else if (availContent & Solid::OpticalDisc::Data) // Data CD
++                    return "media-optical-data";
++                else if ( isWritable )
++                    return "media-optical-recordable";
++                else
++                {
++                    if ( media.startsWith( "optical_dvd" ) || media.startsWith( "optical_hddvd" ) ) // DVD
++                        return "media-optical-dvd";
++                    else if ( media.startsWith( "optical_bd" ) ) // BluRay
++                        return "media-optical-blu-ray";
++                }
++
++                // fallback for every other optical disc
++                return "media-optical";
++            }
++
++            if ( media == "flash_ms" ) // Flash & Co.
++                return "media-flash-memory-stick";
++            else if ( media == "flash_sd" || media == "flash_sdhc" || media == "flash_sdxc" || media == "flash_mmc" )
++                return "media-flash-sd-mmc";
++            else if ( media == "flash_sm" )
++                return "media-flash-smart-media";
++            else if ( media == "thumb" )
++                return "drive-removable-media-usb-pendrive";
++            else if ( media.startsWith( "flash" ) )
++                return "media-flash";
++            else if ( media == "floppy" ) // the good ol' floppy
++                return "media-floppy";
++        }
++
++        if (drive.prop("ConnectionBus").toString() == "sdio")  // hack for SD cards connected thru sdio bus
++            return "media-flash-sd-mmc";
++
++        return drive.icon();
++    }
++
++    return "drive-harddisk";    // general fallback
++}
++
++QString Device::product() const
++{
++    QString product = prop("Model").toString();
++
++    if (!isDrive()) {
++        QString label = prop("IdLabel").toString();
++        if (!label.isEmpty()) {
++            product = label;
++        }
++    }
++
++    return product;
++}
++
++QString Device::vendor() const
++{
++    return prop("Vendor").toString();
++}
++
++QString Device::udi() const
++{
++    return m_udi;
++}
++
++QString Device::parentUdi() const
++{
++    QString parent;
++
++    if (isEncryptedContainer())
++        parent = prop("CryptoBackingDevice").value<QDBusObjectPath>().path();
++    else if (propertyExists("Drive"))  // block
++        parent = prop("Drive").value<QDBusObjectPath>().path();
++    else if (propertyExists("Table"))  // partition
++        parent = prop("Table").value<QDBusObjectPath>().path();
++    else if (parent.isEmpty() || parent=="/") {
++        parent = UD2_UDI_DISKS_PREFIX;
++    }
++    return parent;
++}
++
++void Device::checkCache(const QString &key) const
++{
++    if (m_cache.isEmpty()) // recreate the cache
++        allProperties();
++
++    if (m_cache.contains(key))
++        return;
++
++    QVariant reply = m_device->property(key.toUtf8());
++
++    if (reply.isValid()) {
++        m_cache.insert(key, reply);
++    } else {
++        //qDebug() << "got invalid reply for cache:" << key;
++        //m_cache.insert(key, QVariant());
++    }
++}
++
++QString Device::introspect() const
++{
++    QDBusMessage call = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_udi,
++                                                       DBUS_INTERFACE_INTROSPECT, "Introspect");
++    QDBusPendingReply<QString> reply = QDBusConnection::systemBus().asyncCall(call);
++    reply.waitForFinished();
++
++    if (reply.isValid())
++        return reply.value();
++    else {
++        return QString();
++    }
++}
++
++QVariant Device::prop(const QString &key) const
++{
++    checkCache(key);
++    return m_cache.value(key);
++}
++
++bool Device::propertyExists(const QString &key) const
++{
++    checkCache(key);
++    return m_cache.contains(key);
++}
++
++QVariantMap Device::allProperties() const
++{
++    Q_FOREACH (const QString & iface, m_interfaces) {
++        if (iface.startsWith("org.freedesktop.DBus"))
++            continue;
++        QDBusMessage call = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_udi, DBUS_INTERFACE_PROPS, "GetAll");
++        call << iface;
++        QDBusPendingReply<QVariantMap> reply = QDBusConnection::systemBus().asyncCall(call);
++        reply.waitForFinished();
++
++        if (reply.isValid())
++            m_cache.unite(reply.value());
++        else
++            qWarning() << "Error getting props:" << reply.error().name() << reply.error().message();
++        //qDebug() << "After iface" << iface << ", cache now contains" << m_cache.size() << "items";
++    }
++
++    return m_cache;
++}
++
++bool Device::hasInterface(const QString &name) const
++{
++    return m_interfaces.contains(name);
++}
++
++QStringList Device::interfaces() const
++{
++    return m_interfaces;
++}
++
++void Device::initInterfaces()
++{
++    m_interfaces.clear();
++    const QString xmlData = introspect();
++    QDomDocument dom;
++    dom.setContent(xmlData);
++    QDomNodeList ifaceNodeList = dom.elementsByTagName("interface");
++    for (int i = 0; i < ifaceNodeList.count(); i++) {
++        QDomElement ifaceElem = ifaceNodeList.item(i).toElement();
++        if (!ifaceElem.isNull())
++            m_interfaces.append(ifaceElem.attribute("name"));
++    }
++    //qDebug() << "Device" << m_udi << "has interfaces:" << m_interfaces;
++}
++
++void Device::slotPropertiesChanged(const QString &ifaceName, const QVariantMap &changedProps, const QStringList &invalidatedProps)
++{
++    //Q_UNUSED(ifaceName);
++
++    qDebug() << m_udi << "'s interface" << ifaceName << "changed props:";
++
++    QMap<QString, int> changeMap;
++
++    Q_FOREACH(const QString & key, invalidatedProps) {
++        m_cache.remove(key);
++        changeMap.insert(key, Solid::GenericInterface::PropertyRemoved);
++        qDebug() << "\t invalidated:" << key;
++    }
++
++    QMapIterator<QString, QVariant> i(changedProps);
++    while (i.hasNext()) {
++        i.next();
++        const QString key = i.key();
++        m_cache.insert(key, i.value());  // replace the value
++        changeMap.insert(key, Solid::GenericInterface::PropertyModified);
++        qDebug() << "\t modified:" << key << ":" << m_cache.value(key);
++    }
++
++    Q_EMIT propertyChanged(changeMap);
++    Q_EMIT changed();
++}
++
++void Device::slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties)
++{
++    if (object_path.path() == m_udi) {
++        m_interfaces.append(interfaces_and_properties.keys());
++    }
++}
++
++void Device::slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces)
++{
++    if (object_path.path() == m_udi) {
++        Q_FOREACH(const QString & iface, interfaces) {
++            m_interfaces.removeAll(iface);
++        }
++    }
++}
++
++
++QString Device::errorToString(const QString & error) const
++{
++    if (error == UD2_ERROR_UNAUTHORIZED || error == UD2_ERROR_NOT_AUTHORIZED)
++        return QObject::tr("You are not authorized to perform this operation");
++    else if (error == UD2_ERROR_BUSY)
++        return QObject::tr("The device is currently busy");
++    else if (error == UD2_ERROR_FAILED)
++        return QObject::tr("The requested operation has failed");
++    else if (error == UD2_ERROR_CANCELED)
++        return QObject::tr("The requested operation has been canceled");
++    else if (error == UD2_ERROR_INVALID_OPTION)
++        return QObject::tr("An invalid or malformed option has been given");
++    else if (error == UD2_ERROR_MISSING_DRIVER)
++        return QObject::tr("The kernel driver for this filesystem type is not available");
++    else if (error == UD2_ERROR_ALREADY_MOUNTED)
++        return QObject::tr("The device is already mounted");
++    else if (error == UD2_ERROR_NOT_MOUNTED)
++        return QObject::tr("The device is not mounted");
++    else if (error == UD2_ERROR_MOUNTED_BY_OTHER_USER)
++        return QObject::tr("The device is mounted by another user");
++    else if (error == UD2_ERROR_ALREADY_UNMOUNTING)
++        return QObject::tr("The device is already unmounting");
++    else if (error == UD2_ERROR_TIMED_OUT)
++        return QObject::tr("The operation timed out");
++    else if (error == UD2_ERROR_WOULD_WAKEUP)
++        return QObject::tr("The operation would wake up a disk that is in a deep-sleep state");
++    else if (error == UD2_ERROR_ALREADY_CANCELLED)
++        return QObject::tr("The operation has already been canceled");
++    else
++        return QObject::tr("An unspecified error has occurred");
++}
++
++Solid::ErrorType Device::errorToSolidError(const QString & error) const
++{
++    if (error == UD2_ERROR_BUSY)
++        return Solid::DeviceBusy;
++    else if (error == UD2_ERROR_FAILED)
++        return Solid::OperationFailed;
++    else if (error == UD2_ERROR_CANCELED)
++        return Solid::UserCanceled;
++    else if (error == UD2_ERROR_INVALID_OPTION)
++        return Solid::InvalidOption;
++    else if (error == UD2_ERROR_MISSING_DRIVER)
++        return Solid::MissingDriver;
++    else
++        return Solid::UnauthorizedOperation;
++}
++
++bool Device::isBlock() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_BLOCK);
++}
++
++bool Device::isPartition() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_PARTITION);
++}
++
++bool Device::isPartitionTable() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_PARTITIONTABLE);
++}
++
++bool Device::isStorageVolume() const
++{
++    return isPartition() || isPartitionTable() || isStorageAccess() || isOpticalDisc();
++}
++
++bool Device::isStorageAccess() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_FILESYSTEM) || isEncryptedContainer();
++}
++
++bool Device::isDrive() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_DRIVE);
++}
++
++bool Device::isOpticalDrive() const
++{
++    return isDrive() && !prop("MediaCompatibility").toStringList().filter("optical_").isEmpty();
++}
++
++bool Device::isOpticalDisc() const
++{
++    const QString drv = drivePath();
++    if (drv.isEmpty() || drv == "/")
++        return false;
++
++    Device drive(drv);
++    return drive.prop("Optical").toBool();
++}
++
++bool Device::mightBeOpticalDisc() const
++{
++    const QString drv = drivePath();
++    if (drv.isEmpty() || drv == "/")
++        return false;
++
++    Device drive(drv);
++    return drive.isOpticalDrive();
++}
++
++bool Device::isMounted() const
++{
++    return propertyExists("MountPoints") && !qdbus_cast<QByteArrayList>(prop("MountPoints")).isEmpty();
++}
++
++bool Device::isEncryptedContainer() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_ENCRYPTED);
++}
++
++bool Device::isEncryptedCleartext() const
++{
++    const QString holderDevice = prop("CryptoBackingDevice").toString();
++    if (holderDevice.isEmpty() || holderDevice == "/")
++        return false;
++    else
++        return true;
++}
++
++bool Device::isSwap() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_SWAP);
++}
++
++QString Device::drivePath() const
++{
++    return prop("Drive").value<QDBusObjectPath>().path();
++}
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksdevice.h kdelibs-4.8.90/solid/solid/backends/udisks2/udisksdevice.h
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksdevice.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksdevice.h	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,112 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2DEVICE_H
++#define UDISKS2DEVICE_H
++
++#include "udisks2.h"
++
++#include <ifaces/device.h>
++#include <solid/deviceinterface.h>
++#include <solid/solidnamespace.h>
++
++#include <QtDBus/QDBusInterface>
++#include <QtDBus/QDBusObjectPath>
++#include <QtCore/QStringList>
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class Device: public Solid::Ifaces::Device
++{
++    Q_OBJECT
++public:
++    Device(const QString &udi);
++    virtual ~Device();
++
++    virtual QObject* createDeviceInterface(const Solid::DeviceInterface::Type& type);
++    virtual bool queryDeviceInterface(const Solid::DeviceInterface::Type& type) const;
++    virtual QString description() const;
++    virtual QStringList emblems() const;
++    virtual QString icon() const;
++    virtual QString product() const;
++    virtual QString vendor() const;
++    virtual QString udi() const;
++    virtual QString parentUdi() const;
++
++    QVariant prop(const QString &key) const;
++    bool propertyExists(const QString &key) const;
++    QVariantMap allProperties() const;
++
++    bool hasInterface(const QString & name) const;
++    QStringList interfaces() const;
++
++    QString errorToString(const QString & error) const;
++    Solid::ErrorType errorToSolidError(const QString & error) const;
++
++    bool isBlock() const;
++    bool isPartition() const;
++    bool isPartitionTable() const;
++    bool isStorageVolume() const;
++    bool isStorageAccess() const;
++    bool isDrive() const;
++    bool isOpticalDrive() const;
++    bool isOpticalDisc() const;
++    bool mightBeOpticalDisc() const;
++    bool isMounted() const;
++    bool isEncryptedContainer() const;
++    bool isEncryptedCleartext() const;
++    bool isSwap() const;
++
++    QString drivePath() const;
++
++Q_SIGNALS:
++    void changed();
++    void propertyChanged(const QMap<QString,int> &changes);
++
++private Q_SLOTS:
++    void slotPropertiesChanged(const QString & ifaceName, const QVariantMap & changedProps, const QStringList & invalidatedProps);
++    void slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties);
++    void slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces);
++
++private:
++    QString storageDescription() const;
++    QString volumeDescription() const;
++    mutable QDBusInterface *m_device;
++    QString m_udi;
++    mutable QVariantMap m_cache;
++
++    void initInterfaces();
++    QStringList m_interfaces;
++
++    void checkCache(const QString &key) const;
++    QString introspect() const;
++};
++
++}
++}
++}
++
++#endif // UDISKS2DEVICE_H
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksdeviceinterface.cpp kdelibs-4.8.90/solid/solid/backends/udisks2/udisksdeviceinterface.cpp
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksdeviceinterface.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksdeviceinterface.cpp	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,33 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksdeviceinterface.h"
++
++using namespace Solid::Backends::UDisks2;
++
++DeviceInterface::DeviceInterface(Device *device)
++    : QObject(device), m_device(device)
++{
++
++}
++
++DeviceInterface::~DeviceInterface()
++{
++}
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksdeviceinterface.h kdelibs-4.8.90/solid/solid/backends/udisks2/udisksdeviceinterface.h
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksdeviceinterface.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksdeviceinterface.h	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,148 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2DEVICEINTERFACE_H
++#define UDISKS2DEVICEINTERFACE_H
++
++#include <ifaces/deviceinterface.h>
++#include "udisksdevice.h"
++
++#include <QtCore/QObject>
++#include <QtCore/QStringList>
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class DeviceInterface : public QObject, virtual public Solid::Ifaces::DeviceInterface
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::DeviceInterface)
++public:
++    DeviceInterface(Device *device);
++    virtual ~DeviceInterface();
++
++protected:
++    Device *m_device;
++
++public:
++    inline static QStringList toStringList(Solid::DeviceInterface::Type type)
++    {
++        QStringList list;
++
++        switch(type)
++        {
++        case Solid::DeviceInterface::GenericInterface:
++            list << "generic";
++            break;
++        case Solid::DeviceInterface::Processor:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::Block:
++            list << "block";
++            break;
++        case Solid::DeviceInterface::StorageAccess:
++            list << "volume";
++            break;
++        case Solid::DeviceInterface::StorageDrive:
++            list << "storage";
++            break;
++        case Solid::DeviceInterface::OpticalDrive:
++            list << "storage.cdrom";
++            break;
++        case Solid::DeviceInterface::StorageVolume:
++            list << "volume";
++            break;
++        case Solid::DeviceInterface::OpticalDisc:
++            list << "volume.disc";
++            break;
++        case Solid::DeviceInterface::Camera:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::PortableMediaPlayer:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::NetworkInterface:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::AcAdapter:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::Battery:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::Button:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::AudioInterface:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::DvbInterface:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::Video:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::SerialInterface:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::InternetGateway:
++            break;
++        case Solid::DeviceInterface::SmartCardReader:
++            // Doesn't exist with UDisks
++        case Solid::DeviceInterface::NetworkShare:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::Unknown:
++            break;
++        case Solid::DeviceInterface::Last:
++            break;
++        }
++
++        return list;
++    }
++
++    inline static Solid::DeviceInterface::Type fromString(const QString &capability)
++    {
++        if (capability == "generic")
++            return Solid::DeviceInterface::GenericInterface;
++        else if (capability == "block")
++            return Solid::DeviceInterface::Block;
++        else if (capability == "storage")
++            return Solid::DeviceInterface::StorageDrive;
++        else if (capability == "storage.cdrom")
++            return Solid::DeviceInterface::OpticalDrive;
++        else if (capability == "volume")
++            return Solid::DeviceInterface::StorageVolume;
++        else if (capability == "volume.disc")
++            return Solid::DeviceInterface::OpticalDisc;
++        else
++            return Solid::DeviceInterface::Unknown;
++    }
++};
++
++}
++}
++}
++
++#endif // UDISKS2DEVICEINTERFACE_H
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksgenericinterface.cpp kdelibs-4.8.90/solid/solid/backends/udisks2/udisksgenericinterface.cpp
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksgenericinterface.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksgenericinterface.cpp	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,53 @@
++/*
++    Copyright 2009 Pino Toscano <pino@kde.org>
++    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksgenericinterface.h"
++
++#include "udisksdevice.h"
++
++using namespace Solid::Backends::UDisks2;
++
++GenericInterface::GenericInterface(Device *device)
++    : DeviceInterface(device)
++{
++    connect(device, SIGNAL(propertyChanged(QMap<QString,int>)),
++            this, SIGNAL(propertyChanged(QMap<QString,int>)));
++}
++
++GenericInterface::~GenericInterface()
++{
++}
++
++QVariant GenericInterface::property(const QString &key) const
++{
++    return m_device->prop(key);
++}
++
++QVariantMap GenericInterface::allProperties() const
++{
++    return m_device->allProperties();
++}
++
++bool GenericInterface::propertyExists(const QString &key) const
++{
++    return m_device->propertyExists(key);
++}
++
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksgenericinterface.h kdelibs-4.8.90/solid/solid/backends/udisks2/udisksgenericinterface.h
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksgenericinterface.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksgenericinterface.h	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,57 @@
++/*
++    Copyright 2009 Pino Toscano <pino@kde.org>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef SOLID_BACKENDS_UDISKS2_GENERICINTERFACE_H
++#define SOLID_BACKENDS_UDISKS2_GENERICINTERFACE_H
++
++#include <solid/ifaces/genericinterface.h>
++#include <solid/genericinterface.h>
++#include "udisksdeviceinterface.h"
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++class Device;
++
++class GenericInterface : public DeviceInterface, virtual public Solid::Ifaces::GenericInterface
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::GenericInterface)
++
++public:
++    GenericInterface(Device *device);
++    virtual ~GenericInterface();
++
++    virtual QVariant property(const QString &key) const;
++    virtual QVariantMap allProperties() const;
++    virtual bool propertyExists(const QString &key) const;
++
++Q_SIGNALS:
++    void propertyChanged(const QMap<QString, int> &changes);
++    void conditionRaised(const QString &condition, const QString &reason);
++};
++}
++}
++}
++
++#endif // SOLID_BACKENDS_UDISKS2_GENERICINTERFACE_H
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksmanager.cpp kdelibs-4.8.90/solid/solid/backends/udisks2/udisksmanager.cpp
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksmanager.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksmanager.cpp	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,227 @@
++/*
++    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksmanager.h"
++
++#include <QtCore/QDebug>
++#include <QtDBus>
++
++#include "../shared/rootdevice.h"
++
++using namespace Solid::Backends::UDisks2;
++using namespace Solid::Backends::Shared;
++
++Manager::Manager(QObject *parent)
++    : Solid::Ifaces::DeviceManager(parent),
++      m_manager(UD2_DBUS_SERVICE,
++                UD2_DBUS_PATH,
++                QDBusConnection::systemBus())
++{
++    m_supportedInterfaces
++            << Solid::DeviceInterface::GenericInterface
++            << Solid::DeviceInterface::Block
++            << Solid::DeviceInterface::StorageAccess
++            << Solid::DeviceInterface::StorageDrive
++            << Solid::DeviceInterface::OpticalDrive
++            << Solid::DeviceInterface::OpticalDisc
++            << Solid::DeviceInterface::StorageVolume;
++
++    qDBusRegisterMetaType<QList<QDBusObjectPath> >();
++    qDBusRegisterMetaType<QVariantMap>();
++    qDBusRegisterMetaType<QVariantMapMap>();
++    qDBusRegisterMetaType<QByteArrayList>();
++    qDBusRegisterMetaType<DBUSManagerStruct>();
++
++    bool serviceFound = m_manager.isValid();
++    if (!serviceFound) {
++        // find out whether it will be activated automatically
++        QDBusMessage message = QDBusMessage::createMethodCall("org.freedesktop.DBus",
++                                                              "/org/freedesktop/DBus",
++                                                              "org.freedesktop.DBus",
++                                                              "ListActivatableNames");
++
++        QDBusReply<QStringList> reply = QDBusConnection::systemBus().call(message);
++        if (reply.isValid() && reply.value().contains(UD2_DBUS_SERVICE)) {
++            QDBusConnection::systemBus().interface()->startService(UD2_DBUS_SERVICE);
++            serviceFound = true;
++        }
++    }
++
++    if (serviceFound) {
++        connect(&m_manager, SIGNAL(InterfacesAdded(QDBusObjectPath, QVariantMapMap)),
++                this, SLOT(slotInterfacesAdded(QDBusObjectPath,QVariantMapMap)));
++        connect(&m_manager, SIGNAL(InterfacesRemoved(QDBusObjectPath,QStringList)),
++                this, SLOT(slotInterfacesRemoved(QDBusObjectPath,QStringList)));
++    }
++}
++
++Manager::~Manager()
++{
++}
++
++QObject* Manager::createDevice(const QString& udi)
++{
++    if (udi==udiPrefix()) {
++        RootDevice *root = new RootDevice(udi);
++
++        root->setProduct(tr("Storage"));
++        root->setDescription(tr("Storage devices"));
++        root->setIcon("server-database"); // Obviously wasn't meant for that, but maps nicely in oxygen icon set :-p
++
++        return root;
++    } else if (deviceCache().contains(udi)) {
++        return new Device(udi);
++    } else {
++        return 0;
++    }
++}
++
++QStringList Manager::devicesFromQuery(const QString& parentUdi, Solid::DeviceInterface::Type type)
++{
++    QStringList result;
++
++    if (!parentUdi.isEmpty())
++    {
++        Q_FOREACH (const QString &udi, deviceCache())
++        {
++            Device device(udi);
++            if (device.queryDeviceInterface(type) && device.parentUdi() == parentUdi)
++                result << udi;
++        }
++
++        return result;
++    }
++    else if (type != Solid::DeviceInterface::Unknown)
++    {
++        Q_FOREACH (const QString &udi, deviceCache())
++        {
++            Device device(udi);
++            if (device.queryDeviceInterface(type))
++                result << udi;
++        }
++
++        return result;
++    }
++
++    return deviceCache();
++}
++
++QStringList Manager::allDevices()
++{
++    m_deviceCache.clear();
++
++    QDBusPendingReply<DBUSManagerStruct> reply = m_manager.GetManagedObjects();
++    reply.waitForFinished();
++    if (!reply.isError()) {  // enum devices
++        m_deviceCache << udiPrefix();
++
++        Q_FOREACH(const QDBusObjectPath &path, reply.value().keys()) {
++            const QString udi = path.path();
++            qDebug() << "Adding device" << udi;
++
++            if (udi == UD2_DBUS_PATH_MANAGER || udi == UD2_UDI_DISKS_PREFIX || udi.startsWith(UD2_DBUS_PATH_JOBS))
++                continue;
++
++            Device device(udi);
++            if (device.mightBeOpticalDisc()) {
++                QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, udi, DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
++                                                     SLOT(slotMediaChanged(QDBusMessage)));
++                if (!device.isOpticalDisc())  // skip empty CD disc
++                    continue;
++            }
++
++            m_deviceCache.append(udi);
++        }
++    }
++    else  // show error
++    {
++        qWarning() << "Failed enumerating UDisks2 objects:" << reply.error().name() << "\n" << reply.error().message();
++    }
++
++    return m_deviceCache;
++}
++
++
++QSet< Solid::DeviceInterface::Type > Manager::supportedInterfaces() const
++{
++    return m_supportedInterfaces;
++}
++
++QString Manager::udiPrefix() const
++{
++    return UD2_UDI_DISKS_PREFIX;
++}
++
++void Manager::slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties)
++{
++    const QString udi = object_path.path();
++
++    qDebug() << udi << "has new interfaces:" << interfaces_and_properties.keys();
++
++    // new device, we don't know it yet
++    if (!m_deviceCache.contains(udi)) {
++        m_deviceCache.append(udi);
++        Q_EMIT deviceAdded(udi);
++    }
++}
++
++void Manager::slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces)
++{
++    const QString udi = object_path.path();
++
++    qDebug() << udi << "lost interfaces:" << interfaces;
++
++    Device device(udi);
++
++    if (!udi.isEmpty() && (interfaces.isEmpty() || device.interfaces().isEmpty() || device.interfaces().contains(UD2_DBUS_INTERFACE_FILESYSTEM))) {
++        Q_EMIT deviceRemoved(udi);
++        m_deviceCache.removeAll(udi);
++    }
++}
++
++void Manager::slotMediaChanged(const QDBusMessage & msg)
++{
++    const QVariantMap properties = qdbus_cast<QVariantMap>(msg.arguments().at(1));
++
++    if (!properties.contains("Size"))  // react only on Size changes
++        return;
++
++    const QString udi = msg.path();
++    qulonglong size = properties.value("Size").toULongLong();
++    qDebug() << "MEDIA CHANGED in" << udi << "; size is:" << size;
++
++    if (!m_deviceCache.contains(udi) && size > 0) { // we don't know the optdisc, got inserted
++        m_deviceCache.append(udi);
++        Q_EMIT deviceAdded(udi);
++    }
++
++    if (m_deviceCache.contains(udi) && size == 0) {  // we know the optdisc, got removed
++        Q_EMIT deviceRemoved(udi);
++        m_deviceCache.removeAll(udi);
++    }
++}
++
++const QStringList & Manager::deviceCache()
++{
++    if (m_deviceCache.isEmpty())
++        allDevices();
++
++    return m_deviceCache;
++}
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksmanager.h kdelibs-4.8.90/solid/solid/backends/udisks2/udisksmanager.h
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksmanager.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksmanager.h	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,69 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2MANAGER_H
++#define UDISKS2MANAGER_H
++
++#include "udisks2.h"
++#include "udisksdevice.h"
++#include "dbus/manager.h"
++
++#include "solid/ifaces/devicemanager.h"
++
++#include <QtDBus/QDBusInterface>
++#include <QtCore/QSet>
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class Manager: public Solid::Ifaces::DeviceManager
++{
++    Q_OBJECT
++
++public:
++    Manager(QObject *parent);
++    virtual QObject* createDevice(const QString& udi);
++    virtual QStringList devicesFromQuery(const QString& parentUdi, Solid::DeviceInterface::Type type);
++    virtual QStringList allDevices();
++    virtual QSet< Solid::DeviceInterface::Type > supportedInterfaces() const;
++    virtual QString udiPrefix() const;
++    virtual ~Manager();
++
++private Q_SLOTS:
++    void slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties);
++    void slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces);
++    void slotMediaChanged(const QDBusMessage &msg);
++
++private:
++    const QStringList &deviceCache();
++    QSet<Solid::DeviceInterface::Type> m_supportedInterfaces;
++    org::freedesktop::DBus::ObjectManager m_manager;
++    QStringList m_deviceCache;
++};
++
++}
++}
++}
++#endif // UDISKS2MANAGER_H
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksopticaldisc.cpp kdelibs-4.8.90/solid/solid/backends/udisks2/udisksopticaldisc.cpp
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksopticaldisc.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksopticaldisc.cpp	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,277 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010 - 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include <sys/types.h>
++#include <unistd.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++
++#include <QtCore/QFile>
++#include <QtDBus/QDBusConnection>
++
++#include "../shared/udevqtclient.h"
++
++#include "udisks2.h"
++#include "udisksopticaldisc.h"
++
++// inspired by http://cgit.freedesktop.org/hal/tree/hald/linux/probing/probe-volume.c
++static Solid::OpticalDisc::ContentType advancedDiscDetect(const QByteArray & device_file)
++{
++    /* the discs block size */
++    unsigned short bs;
++    /* the path table size */
++    unsigned short ts;
++    /* the path table location (in blocks) */
++    unsigned int tl;
++    /* length of the directory name in current path table entry */
++    unsigned char len_di = 0;
++    /* the number of the parent directory's path table entry */
++    unsigned int parent = 0;
++    /* filename for the current path table entry */
++    char dirname[256];
++    /* our position into the path table */
++    int pos = 0;
++    /* the path table record we're on */
++    int curr_record = 1;
++
++    Solid::OpticalDisc::ContentType result = Solid::OpticalDisc::NoContent;
++
++    int fd = open(device_file.constData(), O_RDONLY);
++
++    /* read the block size */
++    lseek (fd, 0x8080, SEEK_CUR);
++    if (read (fd, &bs, 2) != 2)
++    {
++        qDebug("Advanced probing on %s failed while reading block size", qPrintable(device_file));
++        goto out;
++    }
++
++    /* read in size of path table */
++    lseek (fd, 2, SEEK_CUR);
++    if (read (fd, &ts, 2) != 2)
++    {
++        qDebug("Advanced probing on %s failed while reading path table size", qPrintable(device_file));
++        goto out;
++    }
++
++    /* read in which block path table is in */
++    lseek (fd, 6, SEEK_CUR);
++    if (read (fd, &tl, 4) != 4)
++    {
++        qDebug("Advanced probing on %s failed while reading path table block", qPrintable(device_file));
++        goto out;
++    }
++
++    /* seek to the path table */
++    lseek (fd, bs * tl, SEEK_SET);
++
++    /* loop through the path table entries */
++    while (pos < ts)
++    {
++        /* get the length of the filename of the current entry */
++        if (read (fd, &len_di, 1) != 1)
++        {
++            qDebug("Advanced probing on %s failed, cannot read more entries", qPrintable(device_file));
++            break;
++        }
++
++        /* get the record number of this entry's parent
++           i'm pretty sure that the 1st entry is always the top directory */
++        lseek (fd, 5, SEEK_CUR);
++        if (read (fd, &parent, 2) != 2)
++        {
++            qDebug("Advanced probing on %s failed, couldn't read parent entry", qPrintable(device_file));
++            break;
++        }
++
++        /* read the name */
++        if (read (fd, dirname, len_di) != len_di)
++        {
++            qDebug("Advanced probing on %s failed, couldn't read the entry name", qPrintable(device_file));
++            break;
++        }
++        dirname[len_di] = 0;
++
++        /* if we found a folder that has the root as a parent, and the directory name matches
++           one of the special directories then set the properties accordingly */
++        if (parent == 1)
++        {
++            if (!strcasecmp (dirname, "VIDEO_TS"))
++            {
++                qDebug("Disc in %s is a Video DVD", qPrintable(device_file));
++                result = Solid::OpticalDisc::VideoDvd;
++                break;
++            }
++            else if (!strcasecmp (dirname, "BDMV"))
++            {
++                qDebug("Disc in %s is a Blu-ray video disc", qPrintable(device_file));
++                result = Solid::OpticalDisc::VideoBluRay;
++                break;
++            }
++            else if (!strcasecmp (dirname, "VCD"))
++            {
++                qDebug("Disc in %s is a Video CD", qPrintable(device_file));
++                result = Solid::OpticalDisc::VideoCd;
++                break;
++            }
++            else if (!strcasecmp (dirname, "SVCD"))
++            {
++                qDebug("Disc in %s is a Super Video CD", qPrintable(device_file));
++                result = Solid::OpticalDisc::SuperVideoCd;
++                break;
++            }
++        }
++
++        /* all path table entries are padded to be even,
++           so if this is an odd-length table, seek a byte to fix it */
++        if (len_di%2 == 1)
++        {
++            lseek (fd, 1, SEEK_CUR);
++            pos++;
++        }
++
++        /* update our position */
++        pos += 8 + len_di;
++        curr_record++;
++    }
++
++    close(fd);
++    return result;
++
++out:
++    /* go back to the start of the file */
++    lseek (fd, 0, SEEK_SET);
++    close(fd);
++    return result;
++}
++
++using namespace Solid::Backends::UDisks2;
++
++OpticalDisc::OpticalDisc(Device *dev)
++    : StorageVolume(dev), m_needsReprobe(true), m_cachedContent(Solid::OpticalDisc::NoContent)
++{
++    UdevQt::Client client(this);
++    m_udevDevice = client.deviceByDeviceFile(device());
++    //qDebug() << "udev device:" << m_udevDevice.name() << "valid:" << m_udevDevice.isValid();
++    /*qDebug() << "\tProperties:" << */ m_udevDevice.deviceProperties(); // initialize the properties DB so that it doesn't crash further down, #298416
++
++    m_drive = new Device(m_device->prop("Drive").value<QDBusObjectPath>().path());
++    QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, m_drive->udi(), DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
++                                         SLOT(slotDrivePropertiesChanged(QString,QVariantMap,QStringList)));
++}
++
++OpticalDisc::~OpticalDisc()
++{
++    delete m_drive;
++}
++
++qulonglong OpticalDisc::capacity() const
++{
++    return m_device->prop("Size").toULongLong();
++}
++
++bool OpticalDisc::isRewritable() const
++{
++    // the hard way, udisks has no notion of a disc "rewritability"
++    const QString mediaType = media();
++    return mediaType == "optical_cd_rw" || mediaType == "optical_dvd_rw" || mediaType == "optical_dvd_ram" ||
++            mediaType == "optical_dvd_plus_rw" || mediaType == "optical_dvd_plus_rw_dl" ||
++            mediaType == "optical_bd_re" || mediaType == "optical_hddvd_rw";
++}
++
++bool OpticalDisc::isBlank() const
++{
++    return m_drive->prop("OpticalBlank").toBool();
++}
++
++bool OpticalDisc::isAppendable() const
++{
++    //qDebug() << "appendable prop" << m_udevDevice.deviceProperty("ID_CDROM_MEDIA_STATE");
++    return m_udevDevice.deviceProperty("ID_CDROM_MEDIA_STATE").toString() == QLatin1String("appendable");
++}
++
++Solid::OpticalDisc::DiscType OpticalDisc::discType() const
++{
++    QMap<Solid::OpticalDisc::DiscType, QString> map;
++    map[Solid::OpticalDisc::CdRom] = "optical_cd";
++    map[Solid::OpticalDisc::CdRecordable] = "optical_cd_r";
++    map[Solid::OpticalDisc::CdRewritable] = "optical_cd_rw";
++    map[Solid::OpticalDisc::DvdRom] = "optical_dvd";
++    map[Solid::OpticalDisc::DvdRecordable] = "optical_dvd_r";
++    map[Solid::OpticalDisc::DvdRewritable] ="optical_dvd_rw";
++    map[Solid::OpticalDisc::DvdRam] ="optical_dvd_ram";
++    map[Solid::OpticalDisc::DvdPlusRecordable] ="optical_dvd_plus_r";
++    map[Solid::OpticalDisc::DvdPlusRewritable] ="optical_dvd_plus_rw";
++    map[Solid::OpticalDisc::DvdPlusRecordableDuallayer] ="optical_dvd_plus_r_dl";
++    map[Solid::OpticalDisc::DvdPlusRewritableDuallayer] ="optical_dvd_plus_rw_dl";
++    map[Solid::OpticalDisc::BluRayRom] ="optical_bd";
++    map[Solid::OpticalDisc::BluRayRecordable] ="optical_bd_r";
++    map[Solid::OpticalDisc::BluRayRewritable] ="optical_bd_re";
++    map[Solid::OpticalDisc::HdDvdRom] ="optical_hddvd";
++    map[Solid::OpticalDisc::HdDvdRecordable] ="optical_hddvd_r";
++    map[Solid::OpticalDisc::HdDvdRewritable] ="optical_hddvd_rw";
++    // TODO add these to Solid
++    //map[Solid::OpticalDisc::MagnetoOptical] ="optical_mo";
++    //map[Solid::OpticalDisc::MountRainer] ="optical_mrw";
++    //map[Solid::OpticalDisc::MountRainerWritable] ="optical_mrw_w";
++
++    return map.key(media(), Solid::OpticalDisc::UnknownDiscType);  // FIXME optimize, lookup by value, not key
++}
++
++Solid::OpticalDisc::ContentTypes OpticalDisc::availableContent() const
++{
++    if (isBlank()) {
++        m_needsReprobe = false;
++        return Solid::OpticalDisc::NoContent;
++    }
++
++    if (m_needsReprobe) {
++        m_cachedContent = Solid::OpticalDisc::NoContent;
++        const bool hasData = m_drive->prop("OpticalNumDataTracks").toUInt() > 0;
++        const bool hasAudio = m_drive->prop("OpticalNumAudioTracks").toUInt() > 0;
++
++        if ( hasData ) {
++            m_cachedContent |= Solid::OpticalDisc::Data;
++            m_cachedContent |= advancedDiscDetect(m_device->prop("Device").toByteArray());
++        }
++        if ( hasAudio )
++            m_cachedContent |= Solid::OpticalDisc::Audio;
++
++        m_needsReprobe = false;
++    }
++
++    return m_cachedContent;
++}
++
++void OpticalDisc::slotDrivePropertiesChanged(const QString &ifaceName, const QVariantMap &changedProps, const QStringList &invalidatedProps)
++{
++    Q_UNUSED(ifaceName);
++
++    if (changedProps.keys().contains("Media") || invalidatedProps.contains("Media")) {
++        m_needsReprobe = true;
++        m_cachedContent = Solid::OpticalDisc::NoContent;
++    }
++}
++
++QString OpticalDisc::media() const
++{
++    return m_drive->prop("Media").toString();
++}
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksopticaldisc.h kdelibs-4.8.90/solid/solid/backends/udisks2/udisksopticaldisc.h
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksopticaldisc.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksopticaldisc.h	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,69 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010 - 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2OPTICALDISC_H
++#define UDISKS2OPTICALDISC_H
++
++#include <solid/ifaces/opticaldisc.h>
++
++#include "../shared/udevqtdevice.h"
++
++#include "udisksstoragevolume.h"
++#include "udisksdevice.h"
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class OpticalDisc: public StorageVolume, virtual public Solid::Ifaces::OpticalDisc
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::OpticalDisc)
++
++public:
++    OpticalDisc(Device *dev);
++    virtual ~OpticalDisc();
++
++    virtual qulonglong capacity() const;
++    virtual bool isRewritable() const;
++    virtual bool isBlank() const;
++    virtual bool isAppendable() const;
++    virtual Solid::OpticalDisc::DiscType discType() const;
++    virtual Solid::OpticalDisc::ContentTypes availableContent() const;
++
++private Q_SLOTS:
++    void slotDrivePropertiesChanged(const QString & ifaceName, const QVariantMap & changedProps, const QStringList & invalidatedProps);
++
++private:
++    QString media() const;
++    mutable bool m_needsReprobe;
++    mutable Solid::OpticalDisc::ContentTypes m_cachedContent;
++    Device * m_drive;
++    UdevQt::Device m_udevDevice;
++};
++
++}
++}
++}
++#endif // UDISKS2OPTICALDISC_H
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksopticaldrive.cpp kdelibs-4.8.90/solid/solid/backends/udisks2/udisksopticaldrive.cpp
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksopticaldrive.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksopticaldrive.cpp	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,188 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++#include <string.h>
++#include <errno.h>
++#include <unistd.h>
++#include <stdlib.h>
++
++#include <QtCore/QFile>
++#include <QtCore/QDebug>
++
++#include "udisksopticaldrive.h"
++#include "udisks2.h"
++#include "udisksdevice.h"
++
++using namespace Solid::Backends::UDisks2;
++
++OpticalDrive::OpticalDrive(Device *device)
++    : StorageDrive(device), m_ejectInProgress(false), m_readSpeed(0), m_writeSpeed(0), m_speedsInit(false)
++{
++    m_device->registerAction("eject", this,
++                             SLOT(slotEjectRequested()),
++                             SLOT(slotEjectDone(int, const QString&)));
++
++    connect(m_device, SIGNAL(changed()), this, SLOT(slotChanged()));
++}
++
++OpticalDrive::~OpticalDrive()
++{
++}
++
++bool OpticalDrive::eject()
++{
++    if (m_ejectInProgress)
++        return false;
++    m_ejectInProgress = true;
++    m_device->broadcastActionRequested("eject");
++
++    QDBusConnection c = QDBusConnection::systemBus();
++
++    QString path = m_device->udi();
++
++    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, UD2_DBUS_INTERFACE_DRIVE, "Eject");
++    msg << QVariantMap();
++    return c.callWithCallback(msg, this, SLOT(slotDBusReply(const QDBusMessage &)), SLOT(slotDBusError(const QDBusError &)));
++}
++
++void OpticalDrive::slotDBusReply(const QDBusMessage &/*reply*/)
++{
++    m_ejectInProgress = false;
++    m_device->broadcastActionDone("eject");
++}
++
++void OpticalDrive::slotDBusError(const QDBusError &error)
++{
++    m_ejectInProgress = false;
++    m_device->broadcastActionDone("eject", m_device->errorToSolidError(error.name()),
++                                  m_device->errorToString(error.name()) + ": " +error.message());
++}
++
++void OpticalDrive::slotEjectRequested()
++{
++    m_ejectInProgress = true;
++    Q_EMIT ejectRequested(m_device->udi());
++}
++
++void OpticalDrive::slotEjectDone(int error, const QString &errorString)
++{
++    m_ejectInProgress = false;
++    Q_EMIT ejectDone(static_cast<Solid::ErrorType>(error), errorString, m_device->udi());
++}
++
++void OpticalDrive::initReadWriteSpeeds() const
++{
++#if 0
++    int read_speed, write_speed;
++    char *write_speeds = 0;
++    QByteArray device_file = QFile::encodeName(m_device->property("Device").toString());
++
++    //qDebug("Doing open (\"%s\", O_RDONLY | O_NONBLOCK)", device_file.constData());
++    int fd = open(device_file, O_RDONLY | O_NONBLOCK);
++    if (fd < 0) {
++        qWarning("Cannot open %s: %s", device_file.constData(), strerror (errno));
++        return;
++    }
++
++    if (get_read_write_speed(fd, &read_speed, &write_speed, &write_speeds) >= 0) {
++        m_readSpeed = read_speed;
++        m_writeSpeed = write_speed;
++
++        QStringList list = QString::fromLatin1(write_speeds).split(',', QString::SkipEmptyParts);
++        Q_FOREACH (const QString & speed, list)
++            m_writeSpeeds.append(speed.toInt());
++
++        free(write_speeds);
++
++        m_speedsInit = true;
++    }
++
++    close(fd);
++#endif
++}
++
++QList<int> OpticalDrive::writeSpeeds() const
++{
++    if (!m_speedsInit)
++        initReadWriteSpeeds();
++    //qDebug() << "solid write speeds:" << m_writeSpeeds;
++    return m_writeSpeeds;
++}
++
++int OpticalDrive::writeSpeed() const
++{
++    if (!m_speedsInit)
++        initReadWriteSpeeds();
++    return m_writeSpeed;
++}
++
++int OpticalDrive::readSpeed() const
++{
++    if (!m_speedsInit)
++        initReadWriteSpeeds();
++    return m_readSpeed;
++}
++
++Solid::OpticalDrive::MediumTypes OpticalDrive::supportedMedia() const
++{
++    const QStringList mediaTypes = m_device->prop("MediaCompatibility").toStringList();
++    Solid::OpticalDrive::MediumTypes supported;
++
++    QMap<Solid::OpticalDrive::MediumType, QString> map;
++    map[Solid::OpticalDrive::Cdr] = "optical_cd_r";
++    map[Solid::OpticalDrive::Cdrw] = "optical_cd_rw";
++    map[Solid::OpticalDrive::Dvd] = "optical_dvd";
++    map[Solid::OpticalDrive::Dvdr] = "optical_dvd_r";
++    map[Solid::OpticalDrive::Dvdrw] ="optical_dvd_rw";
++    map[Solid::OpticalDrive::Dvdram] ="optical_dvd_ram";
++    map[Solid::OpticalDrive::Dvdplusr] ="optical_dvd_plus_r";
++    map[Solid::OpticalDrive::Dvdplusrw] ="optical_dvd_plus_rw";
++    map[Solid::OpticalDrive::Dvdplusdl] ="optical_dvd_plus_r_dl";
++    map[Solid::OpticalDrive::Dvdplusdlrw] ="optical_dvd_plus_rw_dl";
++    map[Solid::OpticalDrive::Bd] ="optical_bd";
++    map[Solid::OpticalDrive::Bdr] ="optical_bd_r";
++    map[Solid::OpticalDrive::Bdre] ="optical_bd_re";
++    map[Solid::OpticalDrive::HdDvd] ="optical_hddvd";
++    map[Solid::OpticalDrive::HdDvdr] ="optical_hddvd_r";
++    map[Solid::OpticalDrive::HdDvdrw] ="optical_hddvd_rw";
++    // TODO add these to Solid
++    //map[Solid::OpticalDrive::Mo] ="optical_mo";
++    //map[Solid::OpticalDrive::Mr] ="optical_mrw";
++    //map[Solid::OpticalDrive::Mrw] ="optical_mrw_w";
++
++    Q_FOREACH ( const Solid::OpticalDrive::MediumType & type, map.keys() )
++    {
++        if ( mediaTypes.contains( map[type] ) )
++        {
++            supported |= type;
++        }
++    }
++
++    return supported;
++}
++
++void OpticalDrive::slotChanged()
++{
++    m_speedsInit = false; // reset the read/write speeds, changes eg. with an inserted media
++}
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksopticaldrive.h kdelibs-4.8.90/solid/solid/backends/udisks2/udisksopticaldrive.h
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksopticaldrive.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksopticaldrive.h	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,81 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2OPTICALDRIVE_H
++#define UDISKS2OPTICALDRIVE_H
++
++#include <solid/ifaces/opticaldrive.h>
++#include "udisksstoragedrive.h"
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class OpticalDrive: public StorageDrive, virtual public Solid::Ifaces::OpticalDrive
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::OpticalDrive)
++
++public:
++    OpticalDrive(Device *device);
++    virtual ~OpticalDrive();
++
++Q_SIGNALS:
++    void ejectPressed(const QString &udi);
++    void ejectDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
++    void ejectRequested(const QString &udi);
++
++public:
++    virtual bool eject();
++    virtual QList<int> writeSpeeds() const;
++    virtual int writeSpeed() const;
++    virtual int readSpeed() const;
++    virtual Solid::OpticalDrive::MediumTypes supportedMedia() const;
++
++private Q_SLOTS:
++    void slotDBusReply(const QDBusMessage &reply);
++    void slotDBusError(const QDBusError &error);
++
++    void slotEjectRequested();
++    void slotEjectDone(int error, const QString &errorString);
++
++    void slotChanged();
++
++private:
++    void initReadWriteSpeeds() const;
++
++    bool m_ejectInProgress;
++
++    // read/write speeds
++    mutable int m_readSpeed;
++    mutable int m_writeSpeed;
++    mutable QList<int> m_writeSpeeds;
++    mutable bool m_speedsInit;
++};
++
++}
++}
++}
++
++#endif // UDISKS2OPTICALDRIVE_H
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksstorageaccess.cpp kdelibs-4.8.90/solid/solid/backends/udisks2/udisksstorageaccess.cpp
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksstorageaccess.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksstorageaccess.cpp	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,359 @@
++/*
++    Copyright 2009 Pino Toscano <pino@kde.org>
++    Copyright 2009-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksstorageaccess.h"
++#include "udisks2.h"
++
++#include <QtCore/QProcess>
++#include <QtDBus/QtDBus>
++#include <QtGui/QApplication>
++#include <QtGui/QWidget>
++
++using namespace Solid::Backends::UDisks2;
++
++StorageAccess::StorageAccess(Device *device)
++    : DeviceInterface(device), m_setupInProgress(false), m_teardownInProgress(false), m_passphraseRequested(false)
++{
++    updateCache();
++    QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, m_device->udi(), DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
++                                         SLOT(slotPropertiesChanged(QString,QVariantMap,QStringList)));
++
++    // Delay connecting to DBus signals to avoid the related time penalty
++    // in hot paths such as predicate matching
++    QTimer::singleShot(0, this, SLOT(connectDBusSignals()));
++}
++
++StorageAccess::~StorageAccess()
++{
++}
++
++void StorageAccess::connectDBusSignals()
++{
++    m_device->registerAction("setup", this,
++                             SLOT(slotSetupRequested()),
++                             SLOT(slotSetupDone(int, const QString&)));
++
++    m_device->registerAction("teardown", this,
++                             SLOT(slotTeardownRequested()),
++                             SLOT(slotTeardownDone(int, const QString&)));
++}
++
++bool StorageAccess::isLuksDevice() const
++{
++    return m_device->isEncryptedContainer(); // encrypted device
++}
++
++bool StorageAccess::isAccessible() const
++{
++    if (isLuksDevice()) { // check if the cleartext slave is mounted
++        if (m_clearTextPath.isEmpty() || m_clearTextPath == "/")
++            return false;
++        Device holderDevice(m_clearTextPath);
++        return holderDevice.isMounted();
++    }
++
++    return m_device->isMounted();
++}
++
++QString StorageAccess::filePath() const
++{
++    if (!isAccessible())
++        return QString();
++
++    QByteArrayList mntPoints;
++
++    if (isLuksDevice()) {  // encrypted (and unlocked) device
++        if (m_clearTextPath.isEmpty() || m_clearTextPath == "/")
++            return QString();
++        Device holderDevice(m_clearTextPath);
++        mntPoints = qdbus_cast<QByteArrayList>(holderDevice.prop("MountPoints"));
++        if (!mntPoints.isEmpty())
++            return QFile::decodeName(mntPoints.first()); // FIXME Solid doesn't support multiple mount points
++        else
++            return QString();
++    }
++
++    mntPoints = qdbus_cast<QByteArrayList>(m_device->prop("MountPoints"));
++
++    if (!mntPoints.isEmpty())
++        return QFile::decodeName(mntPoints.first()); // FIXME Solid doesn't support multiple mount points
++    else
++        return QString();
++}
++
++bool StorageAccess::isIgnored() const
++{
++    return m_device->prop("HintIgnore").toBool(); // FIXME tune
++}
++
++bool StorageAccess::setup()
++{
++    if ( m_teardownInProgress || m_setupInProgress )
++        return false;
++    m_setupInProgress = true;
++    m_device->broadcastActionRequested("setup");
++
++    if (m_device->isEncryptedContainer())
++        return requestPassphrase();
++    else
++        return mount();
++}
++
++bool StorageAccess::teardown()
++{
++    if ( m_teardownInProgress || m_setupInProgress )
++        return false;
++    m_teardownInProgress = true;
++    m_device->broadcastActionRequested("teardown");
++
++    return unmount();
++}
++
++void StorageAccess::slotPropertiesChanged(const QString &ifaceName, const QVariantMap &changedProps, const QStringList &invalidatedProps)
++{
++    Q_UNUSED(ifaceName);
++
++    if (changedProps.keys().contains("MountPoints") || invalidatedProps.contains("MountPoints")) {
++        Q_EMIT accessibilityChanged(isAccessible(), isLuksDevice() ? m_clearTextPath : m_device->udi());
++    }
++}
++
++void StorageAccess::updateCache()
++{
++    m_isAccessible = isAccessible();
++}
++
++void StorageAccess::checkAccessibility()
++{
++    const bool old_isAccessible = m_isAccessible;
++    updateCache();
++
++    if (old_isAccessible != m_isAccessible) {
++        Q_EMIT accessibilityChanged(m_isAccessible, isLuksDevice() ? m_clearTextPath : m_device->udi());
++    }
++}
++
++void StorageAccess::slotDBusReply( const QDBusMessage & reply )
++{
++    if (m_setupInProgress)
++    {
++        if (isLuksDevice() && !isAccessible()) { // unlocked device, now mount it
++            if (reply.type() == QDBusMessage::ReplyMessage)  // we've got a response from Unlock
++                m_clearTextPath = reply.arguments().value(0).value<QDBusObjectPath>().path();
++            mount();
++        }
++        else // Don't broadcast setupDone unless the setup is really done. (Fix kde#271156)
++        {
++            m_setupInProgress = false;
++            m_device->broadcastActionDone("setup");
++
++            checkAccessibility();
++        }
++    }
++    else if (m_teardownInProgress)  // FIXME
++    {
++        if (isLuksDevice() && !m_clearTextPath.isEmpty() && m_clearTextPath != "/") // unlocked device, lock it
++        {
++            callCryptoTeardown();
++        }
++        else if (!m_clearTextPath.isEmpty() && m_clearTextPath != "/") {
++            callCryptoTeardown(true); // Lock crypted parent
++        }
++        else
++        {
++            if (m_device->prop("Ejectable").toBool() && !m_device->isOpticalDisc()) // optical drives have their Eject method
++            {
++                // try to "eject" (aka safely remove) from the (parent) drive, e.g. SD card from a reader
++                QString drivePath = m_device->prop("Drive").value<QDBusObjectPath>().path();
++                if (!drivePath.isEmpty() || drivePath != "/")
++                {
++                    QDBusConnection c = QDBusConnection::systemBus();
++                    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, drivePath, UD2_DBUS_INTERFACE_DRIVE, "Eject");
++                    msg << QVariantMap();   // options, unused now
++                    c.call(msg, QDBus::NoBlock);
++                }
++            }
++
++            m_teardownInProgress = false;
++            m_device->broadcastActionDone("teardown");
++
++            checkAccessibility();
++        }
++    }
++}
++
++void StorageAccess::slotDBusError( const QDBusError & error )
++{
++    if (m_setupInProgress)
++    {
++        m_setupInProgress = false;
++        m_device->broadcastActionDone("setup", m_device->errorToSolidError(error.name()),
++                                      m_device->errorToString(error.name()) + ": " +error.message());
++
++        checkAccessibility();
++    }
++    else if (m_teardownInProgress)
++    {
++        m_teardownInProgress = false;
++        m_clearTextPath.clear();
++        m_device->broadcastActionDone("teardown", m_device->errorToSolidError(error.name()),
++                                      m_device->errorToString(error.name()) + ": " + error.message());
++        checkAccessibility();
++    }
++}
++
++void StorageAccess::slotSetupRequested()
++{
++    m_setupInProgress = true;
++    Q_EMIT setupRequested(m_device->udi());
++}
++
++void StorageAccess::slotSetupDone(int error, const QString &errorString)
++{
++    m_setupInProgress = false;
++    Q_EMIT setupDone(static_cast<Solid::ErrorType>(error), errorString, m_device->udi());
++}
++
++void StorageAccess::slotTeardownRequested()
++{
++    m_teardownInProgress = true;
++    Q_EMIT teardownRequested(m_device->udi());
++}
++
++void StorageAccess::slotTeardownDone(int error, const QString &errorString)
++{
++    m_teardownInProgress = false;
++    m_clearTextPath.clear();
++    Q_EMIT teardownDone(static_cast<Solid::ErrorType>(error), errorString, m_device->udi());
++}
++
++bool StorageAccess::mount()
++{
++    QString path = m_device->udi();
++
++    if (isLuksDevice()) { // mount options for the cleartext volume
++        path = m_clearTextPath;
++    }
++
++    QDBusConnection c = QDBusConnection::systemBus();
++    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, UD2_DBUS_INTERFACE_FILESYSTEM, "Mount");
++
++    msg << QVariantMap();   // options, unused now
++
++    return c.callWithCallback(msg, this,
++                              SLOT(slotDBusReply(const QDBusMessage &)),
++                              SLOT(slotDBusError(const QDBusError &)));
++}
++
++bool StorageAccess::unmount()
++{
++    QString path = m_device->udi();
++
++    if (isLuksDevice()) { // unmount options for the cleartext volume
++        path = m_clearTextPath;
++    }
++
++    QDBusConnection c = QDBusConnection::systemBus();
++    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, UD2_DBUS_INTERFACE_FILESYSTEM, "Unmount");
++
++    msg << QVariantMap();   // options, unused now
++
++    return c.callWithCallback(msg, this,
++                              SLOT(slotDBusReply(const QDBusMessage &)),
++                              SLOT(slotDBusError(const QDBusError &)),
++                              s_unmountTimeout);
++}
++
++QString StorageAccess::generateReturnObjectPath()
++{
++    static int number = 1;
++
++    return "/org/kde/solid/UDisks2StorageAccess_"+QString::number(number++);
++}
++
++bool StorageAccess::requestPassphrase()
++{
++    QString udi = m_device->udi();
++    QString returnService = QDBusConnection::sessionBus().baseService();
++    m_lastReturnObject = generateReturnObjectPath();
++
++    QDBusConnection::sessionBus().registerObject(m_lastReturnObject, this, QDBusConnection::ExportScriptableSlots);
++
++    QWidget *activeWindow = QApplication::activeWindow();
++    uint wId = 0;
++    if (activeWindow!=0)
++        wId = (uint)activeWindow->winId();
++
++    QString appId = QCoreApplication::applicationName();
++
++    QDBusInterface soliduiserver("org.kde.kded5", "/modules/soliduiserver", "org.kde.SolidUiServer");
++    QDBusReply<void> reply = soliduiserver.call("showPassphraseDialog", udi, returnService,
++                                                m_lastReturnObject, wId, appId);
++    m_passphraseRequested = reply.isValid();
++    if (!m_passphraseRequested)
++        qWarning() << "Failed to call the SolidUiServer, D-Bus said:" << reply.error();
++
++    return m_passphraseRequested;
++}
++
++void StorageAccess::passphraseReply(const QString & passphrase)
++{
++    if (m_passphraseRequested)
++    {
++        QDBusConnection::sessionBus().unregisterObject(m_lastReturnObject);
++        m_passphraseRequested = false;
++        if (!passphrase.isEmpty())
++            callCryptoSetup(passphrase);
++        else
++        {
++            m_setupInProgress = false;
++            m_device->broadcastActionDone("setup");
++        }
++    }
++}
++
++void StorageAccess::callCryptoSetup(const QString & passphrase)
++{
++    QDBusConnection c = QDBusConnection::systemBus();
++    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_device->udi(), UD2_DBUS_INTERFACE_ENCRYPTED, "Unlock");
++
++    msg << passphrase;
++    msg << QVariantMap();   // options, unused now
++
++    c.callWithCallback(msg, this,
++                       SLOT(slotDBusReply(const QDBusMessage &)),
++                       SLOT(slotDBusError(const QDBusError &)));
++}
++
++bool StorageAccess::callCryptoTeardown(bool actOnParent)
++{
++    QDBusConnection c = QDBusConnection::systemBus();
++    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE,
++                                                      actOnParent ? (m_device->prop("CryptoBackingDevice").value<QDBusObjectPath>().path()) : m_device->udi(),
++                                                      UD2_DBUS_INTERFACE_ENCRYPTED, "Lock");
++    msg << QVariantMap();   // options, unused now
++
++    m_clearTextPath.clear();
++
++    return c.callWithCallback(msg, this,
++                              SLOT(slotDBusReply(const QDBusMessage &)),
++                              SLOT(slotDBusError(const QDBusError &)));
++}
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksstorageaccess.h kdelibs-4.8.90/solid/solid/backends/udisks2/udisksstorageaccess.h
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksstorageaccess.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksstorageaccess.h	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,104 @@
++/*
++    Copyright 2009 Pino Toscano <pino@kde.org>
++    Copyright 2009-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2STORAGEACCESS_H
++#define UDISKS2STORAGEACCESS_H
++
++#include <solid/ifaces/storageaccess.h>
++#include "udisksdeviceinterface.h"
++
++#include <QtDBus/QDBusMessage>
++#include <QtDBus/QDBusError>
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++class StorageAccess : public DeviceInterface, virtual public Solid::Ifaces::StorageAccess
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::StorageAccess)
++
++public:
++    StorageAccess(Device *device);
++    virtual ~StorageAccess();
++
++    virtual bool isAccessible() const;
++    virtual QString filePath() const;
++    virtual bool isIgnored() const;
++    virtual bool setup();
++    virtual bool teardown();
++
++Q_SIGNALS:
++    void accessibilityChanged(bool accessible, const QString &udi);
++    void setupDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
++    void teardownDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
++    void setupRequested(const QString &udi);
++    void teardownRequested(const QString &udi);
++
++public Q_SLOTS:
++    Q_SCRIPTABLE Q_NOREPLY void passphraseReply(const QString & passphrase);
++
++private Q_SLOTS:
++    void slotPropertiesChanged(const QString & ifaceName, const QVariantMap & changedProps, const QStringList & invalidatedProps);
++    void slotDBusReply(const QDBusMessage & reply);
++    void slotDBusError(const QDBusError & error);
++
++    void connectDBusSignals();
++
++    void slotSetupRequested();
++    void slotSetupDone(int error, const QString &errorString);
++    void slotTeardownRequested();
++    void slotTeardownDone(int error, const QString &errorString);
++
++private:
++    /// @return true if this device is luks and unlocked
++    bool isLuksDevice() const;
++
++    void updateCache();
++    void checkAccessibility();
++
++    bool mount();
++    bool unmount();
++
++    bool requestPassphrase();
++    void callCryptoSetup( const QString & passphrase );
++    bool callCryptoTeardown( bool actOnParent=false );
++
++    QString generateReturnObjectPath();
++
++private:
++    bool m_isAccessible;
++    bool m_setupInProgress;
++    bool m_teardownInProgress;
++    bool m_passphraseRequested;
++    QString m_lastReturnObject;
++    QString m_clearTextPath;  // path to the unlocked cleartext device
++
++    static const int s_unmountTimeout = 0x7fffffff;
++};
++}
++}
++}
++
++#endif // UDISKS2STORAGEACCESS_H
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksstoragedrive.cpp kdelibs-4.8.90/solid/solid/backends/udisks2/udisksstoragedrive.cpp
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksstoragedrive.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksstoragedrive.cpp	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,147 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksstoragedrive.h"
++
++#include "../shared/udevqtclient.h"
++
++#include <QtCore/QDebug>
++#include <QtCore/QFile>
++
++using namespace Solid::Backends::UDisks2;
++
++StorageDrive::StorageDrive(Device *dev)
++    : Block(dev)
++{
++    UdevQt::Client client(this);
++    m_udevDevice = client.deviceByDeviceFile(device());
++    m_udevDevice.deviceProperties();
++}
++
++StorageDrive::~StorageDrive()
++{
++}
++
++qulonglong StorageDrive::size() const
++{
++    return m_device->prop("Size").toULongLong();
++}
++
++bool StorageDrive::isHotpluggable() const
++{
++    const Solid::StorageDrive::Bus _bus = bus();
++    return _bus == Solid::StorageDrive::Usb || _bus == Solid::StorageDrive::Ieee1394;
++}
++
++bool StorageDrive::isRemovable() const
++{
++    return m_device->prop("MediaRemovable").toBool() || m_device->prop("Removable").toBool();
++}
++
++Solid::StorageDrive::DriveType StorageDrive::driveType() const
++{
++    const QStringList mediaTypes = m_device->prop("MediaCompatibility").toStringList();
++
++    if ( m_device->isOpticalDrive() ) // optical disks
++    {
++        return Solid::StorageDrive::CdromDrive;
++    }
++    else if ( mediaTypes.contains( "floppy" ) )
++    {
++        return Solid::StorageDrive::Floppy;
++    }
++#if 0 // TODO add to Solid
++    else if ( mediaTypes.contains( "floppy_jaz" ) )
++    {
++        return Solid::StorageDrive::Jaz;
++    }
++    else if ( mediaTypes.contains( "floppy_zip" ) )
++    {
++        return Solid::StorageDrive::Zip;
++    }
++    else if ( mediaTypes.contains( "flash" ) )
++    {
++        return Solid::StorageDrive::Flash;
++    }
++#endif
++    else if ( mediaTypes.contains( "flash_cf" ) )
++    {
++        return Solid::StorageDrive::CompactFlash;
++    }
++    else if ( mediaTypes.contains( "flash_ms" ) )
++    {
++        return Solid::StorageDrive::MemoryStick;
++    }
++    else if ( mediaTypes.contains( "flash_sm" ) )
++    {
++        return Solid::StorageDrive::SmartMedia;
++    }
++    else if ( mediaTypes.contains( "flash_sd" ) || mediaTypes.contains( "flash_sdhc" )
++              || mediaTypes.contains( "flash_mmc" ) || mediaTypes.contains("flash_sdxc") )
++    {
++        return Solid::StorageDrive::SdMmc;
++    }
++    // FIXME: udisks2 doesn't know about xD cards
++    else
++    {
++        return Solid::StorageDrive::HardDisk;
++    }
++}
++
++Solid::StorageDrive::Bus StorageDrive::bus() const
++{
++    const QString bus = m_device->prop("ConnectionBus").toString();
++    const QString udevBus = m_udevDevice.deviceProperty("ID_BUS").toString();
++
++    //qDebug() << "bus:" << bus << "udev bus:" << udevBus;
++
++    if (udevBus == "ata")
++    {
++        if (m_udevDevice.deviceProperty("ID_ATA_SATA").toInt() == 1) // serial ATA
++            return Solid::StorageDrive::Sata;
++        else  // parallel (classical) ATA
++            return Solid::StorageDrive::Ide;
++    }
++    else if (bus == "usb")
++    {
++        return Solid::StorageDrive::Usb;
++    }
++    else if (bus == "ieee1394")
++    {
++        return Solid::StorageDrive::Ieee1394;
++    }
++    else if (udevBus == "scsi")
++    {
++        return Solid::StorageDrive::Scsi;
++    }
++#if 0  // TODO add these to Solid
++    else if ( bus == "sdio" )
++    {
++        return Solid::StorageDrive::SDIO;
++    }
++    else if ( bus == "virtual" )
++    {
++        return Solid::StorageDrive::Virtual;
++    }
++#endif
++    else
++        return Solid::StorageDrive::Platform;
++}
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksstoragedrive.h kdelibs-4.8.90/solid/solid/backends/udisks2/udisksstoragedrive.h
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksstoragedrive.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksstoragedrive.h	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,61 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2STORAGEDRIVE_H
++#define UDISKS2STORAGEDRIVE_H
++
++#include <ifaces/storagedrive.h>
++
++#include "../shared/udevqtdevice.h"
++
++#include "udisksblock.h"
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class StorageDrive: public Block, virtual public Solid::Ifaces::StorageDrive
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::StorageDrive)
++
++public:
++    StorageDrive(Device *dev);
++    virtual ~StorageDrive();
++
++    virtual qulonglong size() const;
++    virtual bool isHotpluggable() const;
++    virtual bool isRemovable() const;
++    virtual Solid::StorageDrive::DriveType driveType() const;
++    virtual Solid::StorageDrive::Bus bus() const;
++
++private:
++    UdevQt::Device m_udevDevice;
++};
++
++}
++}
++}
++
++#endif // UDISK2SSTORAGEDRIVE_H
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksstoragevolume.cpp kdelibs-4.8.90/solid/solid/backends/udisks2/udisksstoragevolume.cpp
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksstoragevolume.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksstoragevolume.cpp	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,105 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksstoragevolume.h"
++#include "udisks2.h"
++
++using namespace Solid::Backends::UDisks2;
++
++StorageVolume::StorageVolume(Device *device)
++    : Block(device)
++{
++}
++
++StorageVolume::~StorageVolume()
++{
++}
++
++QString StorageVolume::encryptedContainerUdi() const
++{
++    const QString path = m_device->prop("CryptoBackingDevice").value<QDBusObjectPath>().path();
++    if ( path.isEmpty() || path == "/")
++        return QString();
++    else
++        return path;
++}
++
++qulonglong StorageVolume::size() const
++{
++    return m_device->prop("Size").toULongLong();
++}
++
++QString StorageVolume::uuid() const
++{
++    return m_device->prop("IdUUID").toString();
++}
++
++QString StorageVolume::label() const
++{
++    QString label = m_device->prop("HintName").toString();
++    if (label.isEmpty())
++        label = m_device->prop("IdLabel").toString();
++    if (label.isEmpty())
++        label = m_device->prop("Name").toString();
++    return label;
++}
++
++QString StorageVolume::fsType() const
++{
++    return m_device->prop("IdType").toString();
++}
++
++Solid::StorageVolume::UsageType StorageVolume::usage() const
++{
++    const QString usage = m_device->prop("IdUsage").toString();
++
++    if (m_device->hasInterface(UD2_DBUS_INTERFACE_FILESYSTEM))
++    {
++        return Solid::StorageVolume::FileSystem;
++    }
++    else if (m_device->isPartitionTable())
++    {
++        return Solid::StorageVolume::PartitionTable;
++    }
++    else if (usage == "raid")
++    {
++        return Solid::StorageVolume::Raid;
++    }
++    else if (m_device->isEncryptedContainer())
++    {
++        return Solid::StorageVolume::Encrypted;
++    }
++    else if (usage == "unused" || usage.isEmpty())
++    {
++        return Solid::StorageVolume::Unused;
++    }
++    else
++    {
++        return Solid::StorageVolume::Other;
++    }
++}
++
++bool StorageVolume::isIgnored() const
++{
++    const Solid::StorageVolume::UsageType usg = usage();
++    return m_device->prop("HintIgnore").toBool() || m_device->isSwap() ||
++            ((usg == Solid::StorageVolume::Unused || usg == Solid::StorageVolume::Other || usg == Solid::StorageVolume::PartitionTable) && !m_device->isOpticalDisc());
++}
+diff -ruN kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksstoragevolume.h kdelibs-4.8.90/solid/solid/backends/udisks2/udisksstoragevolume.h
+--- kdelibs-4.8.90.orig/solid/solid/backends/udisks2/udisksstoragevolume.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.90/solid/solid/backends/udisks2/udisksstoragevolume.h	2012-06-20 13:39:24.000000000 +0200
+@@ -0,0 +1,57 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2STORAGEVOLUME_H
++#define UDISKS2STORAGEVOLUME_H
++
++#include <ifaces/storagevolume.h>
++#include "udisksblock.h"
++
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class StorageVolume: public Block, virtual public Solid::Ifaces::StorageVolume
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::StorageVolume)
++
++public:
++    StorageVolume(Device *device);
++    virtual ~StorageVolume();
++
++    virtual QString encryptedContainerUdi() const;
++    virtual qulonglong size() const;
++    virtual QString uuid() const;
++    virtual QString label() const;
++    virtual QString fsType() const;
++    virtual Solid::StorageVolume::UsageType usage() const;
++    virtual bool isIgnored() const;
++};
++
++}
++}
++}
++
++#endif // UDISKS2STORAGEVOLUME_H
+diff -ruN kdelibs-4.8.90.orig/solid/solid/managerbase.cpp kdelibs-4.8.90/solid/solid/managerbase.cpp
+--- kdelibs-4.8.90.orig/solid/solid/managerbase.cpp	2012-05-23 01:45:29.000000000 +0200
++++ kdelibs-4.8.90/solid/solid/managerbase.cpp	2012-06-20 13:39:51.000000000 +0200
+@@ -21,7 +21,7 @@
+ #include "managerbase_p.h"
+ 
+ #include <stdlib.h>
+-#if !defined (Q_WS_WIN) && !defined (Q_OS_MAC)
++#if !defined (Q_OS_WIN) && !defined (Q_OS_MAC)
+ #include <config-solid.h>
+ #endif
+ 
+@@ -30,8 +30,7 @@
+ #if defined (Q_OS_MAC)
+ #include "backends/iokit/iokitmanager.h"
+ #elif defined (Q_OS_UNIX)
+-#include "backends/hal/halmanager.h"
+-#include "backends/udisks/udisksmanager.h"
++#include "backends/udisks2/udisksmanager.h"
+ #include "backends/upower/upowermanager.h"
+ 
+ #if defined (HUPNP_FOUND)
+@@ -44,7 +43,7 @@
+ 
+ #include "backends/fstab/fstabmanager.h"
+ 
+-#elif defined (Q_WS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
++#elif defined (Q_OS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
+ #include "backends/wmi/wmimanager.h"
+ #endif
+ 
+@@ -68,25 +67,16 @@
+ #        if defined(Q_OS_MAC)
+             m_backends << new Solid::Backends::IOKit::IOKitManager(0);
+ 
+-#        elif defined(Q_WS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
++#        elif defined(Q_OS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
+             m_backends << new Solid::Backends::Wmi::WmiManager(0);
+ 
+-#        elif defined(Q_OS_UNIX) && !defined(Q_OS_LINUX)
+-            m_backends << new Solid::Backends::Hal::HalManager(0);
+-
+ #        elif defined(Q_OS_LINUX)
+-            bool solidHalLegacyEnabled
+-                = QString::fromLocal8Bit(qgetenv("SOLID_HAL_LEGACY")).toInt()==1;
+-            if (solidHalLegacyEnabled) {
+-                m_backends << new Solid::Backends::Hal::HalManager(0);
+-            } else {
+ #               if defined(UDEV_FOUND)
+                     m_backends << new Solid::Backends::UDev::UDevManager(0);
+ #               endif
+-                m_backends << new Solid::Backends::UDisks::UDisksManager(0)
++                m_backends << new Solid::Backends::UDisks2::Manager(0)
+                            << new Solid::Backends::UPower::UPowerManager(0)
+                            << new Solid::Backends::Fstab::FstabManager(0);
+-            }
+ #        endif
+ 
+ #        if defined (HUPNP_FOUND)
+diff -ruN kdelibs-4.8.90.orig/solid/tests/CMakeLists.txt kdelibs-4.8.90/solid/tests/CMakeLists.txt
+--- kdelibs-4.8.90.orig/solid/tests/CMakeLists.txt	2012-05-23 01:45:29.000000000 +0200
++++ kdelibs-4.8.90/solid/tests/CMakeLists.txt	2012-06-20 13:39:02.000000000 +0200
+@@ -16,20 +16,6 @@
+ add_definitions(-DTEST_DATA="\\"${CMAKE_CURRENT_SOURCE_DIR}/../solid/backends/fakehw/fakecomputer.xml\\"")
+ 
+ 
+-########### halbasictest ###############
+-
+-if(NOT WIN32 AND NOT APPLE)
+-set(halbasictest_SRCS halbasictest.cpp )
+-
+-kde4_add_executable(halbasictest ${halbasictest_SRCS})
+-
+-if(WIN32)
+-  set_target_properties(halbasictest PROPERTIES COMPILE_FLAGS -DSOLID_EXPORT=)
+-endif(WIN32)
+-
+-target_link_libraries(halbasictest solid_static ${KDEWIN_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTTEST_LIBRARY} )
+-endif(NOT WIN32 AND NOT APPLE)
+-
+ ########### solidhwtest ###############
+ 
+ set(solidhwtest_SRCS 

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2_post.patch b/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2_post.patch
deleted file mode 100644
index 68ad5f4..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2_post.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-diff -ruN kdelibs-4.8.90.orig/solid/solid/CMakeLists.txt kdelibs-4.8.90/solid/solid/CMakeLists.txt
---- kdelibs-4.8.90.orig/solid/solid/CMakeLists.txt	2012-06-19 22:42:38.267962759 +0200
-+++ kdelibs-4.8.90/solid/solid/CMakeLists.txt	2012-06-19 22:44:23.050968201 +0200
-@@ -40,7 +40,6 @@
- 
- file(MAKE_DIRECTORY
-    ${CMAKE_CURRENT_BINARY_DIR}/backends/fakehw
--   ${CMAKE_CURRENT_BINARY_DIR}/backends/hal
-    ${CMAKE_CURRENT_BINARY_DIR}/backends/udev
-    ${CMAKE_CURRENT_BINARY_DIR}/backends/wmi
- )
-@@ -226,33 +225,6 @@
-    endif( UDEV_FOUND )
- 
- 
--   message(STATUS "Building Solid HAL backend." )
--   set(solid_LIB_SRCS ${solid_LIB_SRCS}
--   backends/hal/halacadapter.cpp
--   backends/hal/halaudiointerface.cpp
--   backends/hal/halbattery.cpp
--   backends/hal/halblock.cpp
--   backends/hal/halbutton.cpp
--   backends/hal/halcamera.cpp
--   backends/hal/halcdrom.cpp
--   backends/hal/haldeviceinterface.cpp
--   backends/hal/haldvbinterface.cpp
--   backends/hal/halfstabhandling.cpp
--   backends/hal/halgenericinterface.cpp
--   backends/hal/haldevice.cpp
--   backends/hal/halmanager.cpp
--   backends/hal/halnetworkinterface.cpp
--   backends/hal/halserialinterface.cpp
--   backends/hal/halopticaldisc.cpp
--   backends/hal/halportablemediaplayer.cpp
--   backends/hal/halprocessor.cpp
--   backends/hal/halstorageaccess.cpp
--   backends/hal/halstorage.cpp
--   backends/hal/halvideo.cpp
--   backends/hal/halvolume.cpp
--   backends/hal/halsmartcardreader.cpp
--   )
--
-    message(STATUS "Building Solid UPower backend." )
-    set(solid_LIB_SRCS ${solid_LIB_SRCS}
-    backends/upower/upowermanager.cpp
-@@ -265,18 +237,19 @@
- 
-    # FIXME: this should work on more Unix systems
-    if (CMAKE_SYSTEM_NAME MATCHES Linux)
--      message(STATUS "Building Solid UDisks backend." )
-+      message(STATUS "Building Solid UDisks2 backend." )
-       set(solid_LIB_SRCS ${solid_LIB_SRCS}
--      backends/udisks/udisksmanager.cpp
--      backends/udisks/udisksdevice.cpp
--      backends/udisks/udisksblock.cpp
--      backends/udisks/udisksstoragevolume.cpp
--      backends/udisks/udisksdeviceinterface.cpp
--      backends/udisks/udisksopticaldisc.cpp
--      backends/udisks/udisksopticaldrive.cpp
--      backends/udisks/udisksstoragedrive.cpp
--      backends/udisks/udisksstorageaccess.cpp
--      backends/udisks/udisksgenericinterface.cpp
-+      backends/udisks2/udisksmanager.cpp
-+      backends/udisks2/udisksdevice.cpp
-+      backends/udisks2/udisksblock.cpp
-+      backends/udisks2/udisksstoragevolume.cpp
-+      backends/udisks2/udisksdeviceinterface.cpp
-+      backends/udisks2/udisksopticaldisc.cpp
-+      backends/udisks2/udisksopticaldrive.cpp
-+      backends/udisks2/udisksstoragedrive.cpp
-+      backends/udisks2/udisksstorageaccess.cpp
-+      backends/udisks2/udisksgenericinterface.cpp
-+      backends/udisks2/dbus/manager.cpp
-       )
-    endif (CMAKE_SYSTEM_NAME MATCHES Linux)
- 
-diff -ruN kdelibs-4.8.90.orig/solid/solid/managerbase.cpp kdelibs-4.8.90/solid/solid/managerbase.cpp
---- kdelibs-4.8.90.orig/solid/solid/managerbase.cpp	2012-06-19 22:42:38.267962759 +0200
-+++ kdelibs-4.8.90/solid/solid/managerbase.cpp	2012-06-19 22:44:23.050968201 +0200
-@@ -30,8 +30,7 @@
- #if defined (Q_OS_MAC)
- #include "backends/iokit/iokitmanager.h"
- #elif defined (Q_OS_UNIX)
--#include "backends/hal/halmanager.h"
--#include "backends/udisks/udisksmanager.h"
-+#include "backends/udisks2/udisksmanager.h"
- #include "backends/upower/upowermanager.h"
- 
- #if defined (HUPNP_FOUND)
-@@ -71,22 +70,13 @@
- #        elif defined(Q_OS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
-             m_backends << new Solid::Backends::Wmi::WmiManager(0);
- 
--#        elif defined(Q_OS_UNIX) && !defined(Q_OS_LINUX)
--            m_backends << new Solid::Backends::Hal::HalManager(0);
--
- #        elif defined(Q_OS_LINUX)
--            bool solidHalLegacyEnabled
--                = QString::fromLocal8Bit(qgetenv("SOLID_HAL_LEGACY")).toInt()==1;
--            if (solidHalLegacyEnabled) {
--                m_backends << new Solid::Backends::Hal::HalManager(0);
--            } else {
- #               if defined(UDEV_FOUND)
-                     m_backends << new Solid::Backends::UDev::UDevManager(0);
- #               endif
--                m_backends << new Solid::Backends::UDisks::UDisksManager(0)
-+                m_backends << new Solid::Backends::UDisks2::Manager(0)
-                            << new Solid::Backends::UPower::UPowerManager(0)
-                            << new Solid::Backends::Fstab::FstabManager(0);
--            }
- #        endif
- 
- #        if defined (HUPNP_FOUND)

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2_prep.patch b/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2_prep.patch
deleted file mode 100644
index 2962837..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.8.90-udisks2_prep.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-diff -up kdelibs-4.8.2/solid/solid/CMakeLists.txt.udisks2_prep kdelibs-4.8.2/solid/solid/CMakeLists.txt
---- kdelibs-4.8.2/solid/solid/CMakeLists.txt.udisks2_prep	2011-07-27 13:34:38.000000000 -0500
-+++ kdelibs-4.8.2/solid/solid/CMakeLists.txt	2012-04-17 16:02:06.153985974 -0500
-@@ -1,6 +1,7 @@
- set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
- add_subdirectory( ifaces )
- include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
-+include_directories( ${QT_QTDBUS_INCLUDE_DIR} )
- 
- if(WIN32)
-    include_directories( ${KDEWIN_INCLUDES} )
-diff -up kdelibs-4.8.2/solid/solid/managerbase.cpp.udisks2_prep kdelibs-4.8.2/solid/solid/managerbase.cpp
---- kdelibs-4.8.2/solid/solid/managerbase.cpp.udisks2_prep	2011-07-27 13:34:39.000000000 -0500
-+++ kdelibs-4.8.2/solid/solid/managerbase.cpp	2012-04-17 16:02:06.154985961 -0500
-@@ -21,7 +21,7 @@
- #include "managerbase_p.h"
- 
- #include <stdlib.h>
--#if !defined (Q_WS_WIN) && !defined (Q_OS_MAC)
-+#if !defined (Q_OS_WIN) && !defined (Q_OS_MAC)
- #include <config-solid.h>
- #endif
- 
-@@ -44,7 +44,7 @@
- 
- #include "backends/fstab/fstabmanager.h"
- 
--#elif defined (Q_WS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
-+#elif defined (Q_OS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
- #include "backends/wmi/wmimanager.h"
- #endif
- 
-@@ -68,7 +68,7 @@ void Solid::ManagerBasePrivate::loadBack
- #        if defined(Q_OS_MAC)
-             m_backends << new Solid::Backends::IOKit::IOKitManager(0);
- 
--#        elif defined(Q_WS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
-+#        elif defined(Q_OS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
-             m_backends << new Solid::Backends::Wmi::WmiManager(0);
- 
- #        elif defined(Q_OS_UNIX) && !defined(Q_OS_LINUX)
-diff -up kdelibs-4.8.2/solid/tests/CMakeLists.txt.udisks2_prep kdelibs-4.8.2/solid/tests/CMakeLists.txt
---- kdelibs-4.8.2/solid/tests/CMakeLists.txt.udisks2_prep	2011-10-20 15:52:04.000000000 -0500
-+++ kdelibs-4.8.2/solid/tests/CMakeLists.txt	2012-04-17 16:02:44.584505527 -0500
-@@ -16,20 +16,6 @@ target_link_libraries(fakehardwaretest s
- add_definitions(-DTEST_DATA="\\"${CMAKE_CURRENT_SOURCE_DIR}/../solid/backends/fakehw/fakecomputer.xml\\"")
- 
- 
--########### halbasictest ###############
--
--if(NOT WIN32 AND NOT APPLE)
--set(halbasictest_SRCS halbasictest.cpp )
--
--kde4_add_executable(halbasictest ${halbasictest_SRCS})
--
--if(WIN32)
--  set_target_properties(halbasictest PROPERTIES COMPILE_FLAGS -DSOLID_EXPORT=)
--endif(WIN32)
--
--target_link_libraries(halbasictest solid_static ${KDEWIN_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTTEST_LIBRARY} )
--endif(NOT WIN32 AND NOT APPLE)
--
- ########### solidhwtest ###############
- 
- set(solidhwtest_SRCS 

diff --git a/kde-base/kdelibs/kdelibs-4.8.90.ebuild b/kde-base/kdelibs/kdelibs-4.8.90.ebuild
index 0a72c9e..2503764 100644
--- a/kde-base/kdelibs/kdelibs-4.8.90.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.8.90.ebuild
@@ -22,7 +22,6 @@ LICENSE="LGPL-2.1"
 IUSE="3dnow acl alsa altivec +bzip2 debug doc fam +handbook jpeg2k kerberos lzma
 mmx nls openexr +policykit semantic-desktop spell sse sse2 ssl +udev +udisks
 +upower upnp zeroconf"
-SRC_URI+=" http://dev.gentoo.org/~dilfridge/distfiles/kdelibs-4.8.90-udisks2_backend.patch.bz2"
 
 REQUIRED_USE="
 	udisks? ( udev )
@@ -130,9 +129,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.8.2-calculator_key.patch"
 	"${FILESDIR}/${PN}-4.8.4-bytecode.patch"
-	"${FILESDIR}/${PN}-4.8.90-udisks2_prep.patch"
-	"${WORKDIR}/${PN}-4.8.90-udisks2_backend.patch"
-	"${FILESDIR}/${PN}-4.8.90-udisks2_post.patch"
+	"${FILESDIR}/${PN}-4.8.90-udisks2.patch"
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index 7e7d1d4..219ece9 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -22,7 +22,6 @@ LICENSE="LGPL-2.1"
 IUSE="3dnow acl alsa altivec +bzip2 debug doc fam +handbook jpeg2k kerberos lzma
 mmx nls openexr +policykit semantic-desktop spell sse sse2 ssl +udev +udisks
 +upower upnp zeroconf"
-SRC_URI+=" http://dev.gentoo.org/~dilfridge/distfiles/kdelibs-4.8.90-udisks2_backend.patch.bz2"
 
 REQUIRED_USE="
 	udisks? ( udev )
@@ -130,9 +129,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.8.2-calculator_key.patch"
 	"${FILESDIR}/${PN}-4.8.4-bytecode.patch"
-	"${FILESDIR}/${PN}-4.8.90-udisks2_prep.patch"
-	"${WORKDIR}/${PN}-4.8.90-udisks2_backend.patch"
-	"${FILESDIR}/${PN}-4.8.90-udisks2_post.patch"
+	"${FILESDIR}/${PN}-4.8.90-udisks2.patch"
 )
 
 pkg_pretend() {



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-06-21 20:20 Andreas Hüttel
  0 siblings, 0 replies; 38+ messages in thread
From: Andreas Hüttel @ 2012-06-21 20:20 UTC (permalink / raw
  To: gentoo-commits

commit:     547648a0d41f2e5444f5e43f46fee68abf5489d5
Author:     Andreas K. Huettel (dilfridge) <mail <AT> akhuettel <DOT> de>
AuthorDate: Thu Jun 21 19:48:10 2012 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Thu Jun 21 19:48:10 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=547648a0

[kde-base/kdelibs] make 4.8.x work with soprano-2.7.6 again

(Portage version: 2.2.0_alpha110/git/Linux x86_64, RepoMan options: --force, unsigned Manifest commit)

---
 kde-base/kdelibs/files/kdelibs-4.8.4-power.patch   |   25 +++++++++++++++++
 .../files/kdelibs-4.8.4-sopranorevert1.patch       |   28 +++++++++++++++++++
 .../files/kdelibs-4.8.4-sopranorevert2.patch       |   29 ++++++++++++++++++++
 kde-base/kdelibs/kdelibs-4.8.4.ebuild              |    5 +++-
 kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild        |    2 +-
 5 files changed, 87 insertions(+), 2 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.4-power.patch b/kde-base/kdelibs/files/kdelibs-4.8.4-power.patch
new file mode 100644
index 0000000..61ea0aa
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.8.4-power.patch
@@ -0,0 +1,25 @@
+From 5926264d13900efec70aaac434b7b67f9d8e6837 Mon Sep 17 00:00:00 2001
+From: Lukas Tinkl <lukas@kde.org>
+Date: Tue, 19 Jun 2012 18:27:04 +0200
+Subject: [PATCH 5/5] correctly report power saving status
+
+---
+ solid/solid/powermanagement.cpp |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/solid/solid/powermanagement.cpp b/solid/solid/powermanagement.cpp
+index 8dc8535..faadea4 100644
+--- a/solid/solid/powermanagement.cpp
++++ b/solid/solid/powermanagement.cpp
+@@ -73,7 +73,7 @@ Solid::PowerManagement::Notifier::Notifier()
+ 
+ bool Solid::PowerManagement::appShouldConserveResources()
+ {
+-    return globalPowerManager->powerSaveStatus;
++    return globalPowerManager->managerIface.GetPowerSaveStatus();
+ }
+ 
+ QSet<Solid::PowerManagement::SleepState> Solid::PowerManagement::supportedSleepStates()
+-- 
+1.7.9.2
+

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.4-sopranorevert1.patch b/kde-base/kdelibs/files/kdelibs-4.8.4-sopranorevert1.patch
new file mode 100644
index 0000000..59c3174
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.8.4-sopranorevert1.patch
@@ -0,0 +1,28 @@
+From 76e0376d7582cfe5b898c56bf3779ca2279dace8 Mon Sep 17 00:00:00 2001
+From: Vishesh Handa <me@vhanda.in>
+Date: Thu, 14 Jun 2012 02:55:32 +0530
+Subject: [PATCH 1/5] Revert "Disconnect before re-connecting. Soprano does
+ not do that for us."
+
+This reverts commit 3708be2d09700b21f934c2129218e1c7ea44efdf.
+
+This is being done so that KDE 4.8.x works with Soprano 2.7.6
+---
+ nepomuk/core/nepomukmainmodel.cpp |    1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/nepomuk/core/nepomukmainmodel.cpp b/nepomuk/core/nepomukmainmodel.cpp
+index 8dc0b1f..ff742d7 100644
+--- a/nepomuk/core/nepomukmainmodel.cpp
++++ b/nepomuk/core/nepomukmainmodel.cpp
+@@ -97,7 +97,6 @@ public:
+         if ( forced || (!m_socketConnectFailed && !localSocketClient.isConnected()) ) {
+             delete localSocketModel;
+             localSocketModel = 0;
+-            localSocketClient.disconnect();
+             QString socketName = KGlobal::dirs()->locateLocal( "socket", "nepomuk-socket" );
+             kDebug() << "Connecting to local socket" << socketName;
+             if ( localSocketClient.connect( socketName ) ) {
+-- 
+1.7.9.2
+

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.4-sopranorevert2.patch b/kde-base/kdelibs/files/kdelibs-4.8.4-sopranorevert2.patch
new file mode 100644
index 0000000..206e654
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.8.4-sopranorevert2.patch
@@ -0,0 +1,29 @@
+From bde5aad1e9f7bfb6f8d5c60197797de4a315158d Mon Sep 17 00:00:00 2001
+From: Vishesh Handa <me@vhanda.in>
+Date: Thu, 14 Jun 2012 02:56:31 +0530
+Subject: [PATCH 2/5] Revert "Always rec-connect if forced (ie. when Nepomuk
+ server restarts)"
+
+This reverts commit a43824a200ed76cef48a90bd3aee8547698b7c91.
+
+This is done so that 4.8.x works with Soprano 2.7.6
+---
+ nepomuk/core/nepomukmainmodel.cpp |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/nepomuk/core/nepomukmainmodel.cpp b/nepomuk/core/nepomukmainmodel.cpp
+index ff742d7..be23b38 100644
+--- a/nepomuk/core/nepomukmainmodel.cpp
++++ b/nepomuk/core/nepomukmainmodel.cpp
+@@ -94,7 +94,7 @@ public:
+ 
+         // we may get disconnected from the server but we don't want to try
+         // to connect every time the model is requested
+-        if ( forced || (!m_socketConnectFailed && !localSocketClient.isConnected()) ) {
++        if ( !m_socketConnectFailed && !localSocketClient.isConnected() ) {
+             delete localSocketModel;
+             localSocketModel = 0;
+             QString socketName = KGlobal::dirs()->locateLocal( "socket", "nepomuk-socket" );
+-- 
+1.7.9.2
+

diff --git a/kde-base/kdelibs/kdelibs-4.8.4.ebuild b/kde-base/kdelibs/kdelibs-4.8.4.ebuild
index 28d09d4..c56902b 100644
--- a/kde-base/kdelibs/kdelibs-4.8.4.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.8.4.ebuild
@@ -77,7 +77,7 @@ COMMONDEPEND="
 	policykit? ( >=sys-auth/polkit-qt-0.103.0 )
 	semantic-desktop? (
 		>=dev-libs/shared-desktop-ontologies-0.8.1
-		>=dev-libs/soprano-2.7.56-r1[dbus,raptor,redland]
+		>=dev-libs/soprano-2.7.6[dbus,raptor,redland]
 	)
 	spell? ( app-text/enchant )
 	ssl? ( dev-libs/openssl )
@@ -128,6 +128,9 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.8.2-calculator_key.patch"
 	"${FILESDIR}/${PN}-4.8.4-bytecode.patch"
+	"${FILESDIR}/${PN}-4.8.4-sopranorevert1.patch"
+	"${FILESDIR}/${PN}-4.8.4-sopranorevert2.patch"
+	"${FILESDIR}/${PN}-4.8.4-power.patch"
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild b/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
index c1bc0d0..89d0593 100644
--- a/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
@@ -78,7 +78,7 @@ COMMONDEPEND="
 	policykit? ( >=sys-auth/polkit-qt-0.103.0 )
 	semantic-desktop? (
 		>=dev-libs/shared-desktop-ontologies-0.8.1
-		>=dev-libs/soprano-2.7.56-r1[dbus,raptor,redland]
+		>=dev-libs/soprano-2.7.6[dbus,raptor,redland]
 	)
 	spell? ( app-text/enchant )
 	ssl? ( dev-libs/openssl )



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-06-27 19:55 Andreas Hüttel
  0 siblings, 0 replies; 38+ messages in thread
From: Andreas Hüttel @ 2012-06-27 19:55 UTC (permalink / raw
  To: gentoo-commits

commit:     81b0f917e060e4bb467a5b38c477e4e3942c4688
Author:     Andreas K. Huettel (dilfridge) <mail <AT> akhuettel <DOT> de>
AuthorDate: Wed Jun 27 19:56:49 2012 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Jun 27 19:56:49 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=81b0f917

[kde-base/kdelibs] Update udisks2 patch

(Portage version: 2.2.0_alpha113/git/Linux x86_64, RepoMan options: --force, unsigned Manifest commit)

---
 .../kdelibs/files/kdelibs-4.8.95-udisks2.patch     | 4148 ++++++++++++++++++++
 kde-base/kdelibs/kdelibs-4.8.95.ebuild             |    2 +-
 2 files changed, 4149 insertions(+), 1 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.95-udisks2.patch b/kde-base/kdelibs/files/kdelibs-4.8.95-udisks2.patch
new file mode 100644
index 0000000..9337e59
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.8.95-udisks2.patch
@@ -0,0 +1,4148 @@
+http://pkgs.fedoraproject.org/gitweb/?p=kdelibs.git;a=tree;h=b54aa3a731733709ef376bb8851e936641bc4517;hb=b54aa3a731733709ef376bb8851e936641bc4517
+re-done udisks2 patch from Wed, 27 Jun 2012 16:11:24 +0000
+
+diff -ruN kdelibs-4.8.95.orig/solid/solid/CMakeLists.txt kdelibs-4.8.95/solid/solid/CMakeLists.txt
+--- kdelibs-4.8.95.orig/solid/solid/CMakeLists.txt	2012-05-23 01:45:27.000000000 +0200
++++ kdelibs-4.8.95/solid/solid/CMakeLists.txt	2012-06-27 21:51:57.030594701 +0200
+@@ -1,6 +1,7 @@
+ set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
+ add_subdirectory( ifaces )
+ include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
++include_directories( ${QT_QTDBUS_INCLUDE_DIR} )
+ 
+ if(WIN32)
+    include_directories( ${KDEWIN_INCLUDES} )
+@@ -39,7 +40,6 @@
+ 
+ file(MAKE_DIRECTORY
+    ${CMAKE_CURRENT_BINARY_DIR}/backends/fakehw
+-   ${CMAKE_CURRENT_BINARY_DIR}/backends/hal
+    ${CMAKE_CURRENT_BINARY_DIR}/backends/udev
+    ${CMAKE_CURRENT_BINARY_DIR}/backends/wmi
+ )
+@@ -225,33 +225,6 @@
+    endif( UDEV_FOUND )
+ 
+ 
+-   message(STATUS "Building Solid HAL backend." )
+-   set(solid_LIB_SRCS ${solid_LIB_SRCS}
+-   backends/hal/halacadapter.cpp
+-   backends/hal/halaudiointerface.cpp
+-   backends/hal/halbattery.cpp
+-   backends/hal/halblock.cpp
+-   backends/hal/halbutton.cpp
+-   backends/hal/halcamera.cpp
+-   backends/hal/halcdrom.cpp
+-   backends/hal/haldeviceinterface.cpp
+-   backends/hal/haldvbinterface.cpp
+-   backends/hal/halfstabhandling.cpp
+-   backends/hal/halgenericinterface.cpp
+-   backends/hal/haldevice.cpp
+-   backends/hal/halmanager.cpp
+-   backends/hal/halnetworkinterface.cpp
+-   backends/hal/halserialinterface.cpp
+-   backends/hal/halopticaldisc.cpp
+-   backends/hal/halportablemediaplayer.cpp
+-   backends/hal/halprocessor.cpp
+-   backends/hal/halstorageaccess.cpp
+-   backends/hal/halstorage.cpp
+-   backends/hal/halvideo.cpp
+-   backends/hal/halvolume.cpp
+-   backends/hal/halsmartcardreader.cpp
+-   )
+-
+    message(STATUS "Building Solid UPower backend." )
+    set(solid_LIB_SRCS ${solid_LIB_SRCS}
+    backends/upower/upowermanager.cpp
+@@ -264,18 +237,19 @@
+ 
+    # FIXME: this should work on more Unix systems
+    if (CMAKE_SYSTEM_NAME MATCHES Linux)
+-      message(STATUS "Building Solid UDisks backend." )
++      message(STATUS "Building Solid UDisks2 backend." )
+       set(solid_LIB_SRCS ${solid_LIB_SRCS}
+-      backends/udisks/udisksmanager.cpp
+-      backends/udisks/udisksdevice.cpp
+-      backends/udisks/udisksblock.cpp
+-      backends/udisks/udisksstoragevolume.cpp
+-      backends/udisks/udisksdeviceinterface.cpp
+-      backends/udisks/udisksopticaldisc.cpp
+-      backends/udisks/udisksopticaldrive.cpp
+-      backends/udisks/udisksstoragedrive.cpp
+-      backends/udisks/udisksstorageaccess.cpp
+-      backends/udisks/udisksgenericinterface.cpp
++      backends/udisks2/udisksmanager.cpp
++      backends/udisks2/udisksdevice.cpp
++      backends/udisks2/udisksblock.cpp
++      backends/udisks2/udisksstoragevolume.cpp
++      backends/udisks2/udisksdeviceinterface.cpp
++      backends/udisks2/udisksopticaldisc.cpp
++      backends/udisks2/udisksopticaldrive.cpp
++      backends/udisks2/udisksstoragedrive.cpp
++      backends/udisks2/udisksstorageaccess.cpp
++      backends/udisks2/udisksgenericinterface.cpp
++      backends/udisks2/dbus/manager.cpp
+       )
+    endif (CMAKE_SYSTEM_NAME MATCHES Linux)
+ 
+diff -ruN kdelibs-4.8.95.orig/solid/solid/CMakeLists.txt.orig kdelibs-4.8.95/solid/solid/CMakeLists.txt.orig
+--- kdelibs-4.8.95.orig/solid/solid/CMakeLists.txt.orig	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/CMakeLists.txt.orig	2012-06-27 21:50:56.879591338 +0200
+@@ -0,0 +1,463 @@
++set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
++add_subdirectory( ifaces )
++include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
++include_directories( ${QT_QTDBUS_INCLUDE_DIR} )
++
++if(WIN32)
++   include_directories( ${KDEWIN_INCLUDES} )
++endif(WIN32)
++
++configure_file(solid_export.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/solid_export.h)
++
++include (CheckCXXSourceCompiles)
++
++check_cxx_source_compiles("	#ifdef __SUNPRO_CC
++					#define __asm__ asm
++				#endif
++				int main() { __asm__(\"pxor %mm0, %mm0\") ; }" HAVE_X86_MMX)
++check_cxx_source_compiles("     #ifdef __SUNPRO_CC
++                                        #define __asm__ asm
++                                #endif
++				int main() { __asm__(\"xorps %xmm0, %xmm0\"); }" HAVE_X86_SSE)
++check_cxx_source_compiles("     #ifdef __SUNPRO_CC
++                                        #define __asm__ asm
++                                #endif
++				int main() { __asm__(\"xorpd %xmm0, %xmm0\"); }" HAVE_X86_SSE2)
++check_cxx_source_compiles("     #ifdef __SUNPRO_CC
++                                        #define __asm__ asm
++                                #endif
++				int main() { __asm__(\"femms\"); }" HAVE_X86_3DNOW)
++check_cxx_source_compiles("     #ifdef __SUNPRO_CC
++                                        #define __asm__ asm
++                                #endif
++				int main() { __asm__(\"mtspr 256, %0; vand %%v0, %%v0, %%v0\" : : \"r\"(-1) ); }" HAVE_PPC_ALTIVEC)
++
++configure_file(config-processor.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-processor.h )
++
++
++
++########### next target ###############
++
++file(MAKE_DIRECTORY
++   ${CMAKE_CURRENT_BINARY_DIR}/backends/fakehw
++   ${CMAKE_CURRENT_BINARY_DIR}/backends/hal
++   ${CMAKE_CURRENT_BINARY_DIR}/backends/udev
++   ${CMAKE_CURRENT_BINARY_DIR}/backends/wmi
++)
++
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${KDE4_C_FLAGS}") # enable -fvisibility=hidden for C sources
++
++set(solid_LIB_SRCS
++   solidnamespace.cpp
++   managerbase.cpp
++   device.cpp
++   devicemanager.cpp
++   deviceinterface.cpp
++   genericinterface.cpp
++   processor.cpp
++   block.cpp
++   storagedrive.cpp
++   opticaldrive.cpp
++   storagevolume.cpp
++   opticaldisc.cpp
++   storageaccess.cpp
++   camera.cpp
++   portablemediaplayer.cpp
++   networkinterface.cpp
++   networkshare.cpp
++   serialinterface.cpp
++   acadapter.cpp
++   battery.cpp
++   button.cpp
++   audiointerface.cpp
++   dvbinterface.cpp
++   predicate.cpp
++   predicateparse.cpp
++   predicate_lexer.c
++   predicate_parser.c
++   powermanagement.cpp
++   networking.cpp
++   video.cpp
++   smartcardreader.cpp
++   internetgateway.cpp
++   xdgbasedirs.cpp
++
++   ifaces/acadapter.cpp
++   ifaces/audiointerface.cpp
++   ifaces/battery.cpp
++   ifaces/block.cpp
++   ifaces/button.cpp
++   ifaces/camera.cpp
++   ifaces/opticaldrive.cpp
++   ifaces/device.cpp
++   ifaces/deviceinterface.cpp
++   ifaces/devicemanager.cpp
++   ifaces/dvbinterface.cpp
++   ifaces/genericinterface.cpp
++   ifaces/networkinterface.cpp
++   ifaces/networkshare.cpp
++   ifaces/serialinterface.cpp
++   ifaces/opticaldisc.cpp
++   ifaces/portablemediaplayer.cpp
++   ifaces/processor.cpp
++   ifaces/storagedrive.cpp
++   ifaces/storagevolume.cpp
++   ifaces/storageaccess.cpp
++   ifaces/video.cpp
++   ifaces/smartcardreader.cpp
++   ifaces/internetgateway.cpp
++
++   backends/fakehw/fakeacadapter.cpp
++   backends/fakehw/fakeaudiointerface.cpp
++   backends/fakehw/fakebattery.cpp
++   backends/fakehw/fakeblock.cpp
++   backends/fakehw/fakebutton.cpp
++   backends/fakehw/fakecamera.cpp
++   backends/fakehw/fakecdrom.cpp
++   backends/fakehw/fakedevice.cpp
++   backends/fakehw/fakedeviceinterface.cpp
++   backends/fakehw/fakedvbinterface.cpp
++   backends/fakehw/fakegenericinterface.cpp
++   backends/fakehw/fakemanager.cpp
++   backends/fakehw/fakenetworkshare.cpp
++   backends/fakehw/fakenetworkinterface.cpp
++   backends/fakehw/fakeopticaldisc.cpp
++   backends/fakehw/fakeportablemediaplayer.cpp
++   backends/fakehw/fakeprocessor.cpp
++   backends/fakehw/fakestorage.cpp
++   backends/fakehw/fakestorageaccess.cpp
++   backends/fakehw/fakevideo.cpp
++   backends/fakehw/fakevolume.cpp
++   backends/fakehw/fakesmartcardreader.cpp
++
++   backends/shared/rootdevice.cpp
++   backends/shared/cpufeatures.cpp
++)
++
++if(NOT APPLE)
++  macro_optional_find_package( HUpnp )
++
++  if ( HUPNP_FOUND AND ((HUPNP_VERSION_MAJOR EQUAL 0 AND HUPNP_VERSION_MINOR EQUAL 9) OR (HUPNP_VERSION_MAJOR EQUAL 1)))
++    include_directories( ${HUPNP_INCLUDE_DIR} )
++    message(STATUS "Building Solid UPnP backend." )
++    set(solid_LIB_SRCS ${solid_LIB_SRCS}
++       backends/upnp/upnpdevice.cpp
++       backends/upnp/upnpdevicemanager.cpp
++       backends/upnp/upnpdeviceinterface.cpp
++       backends/upnp/upnpmediaserver.cpp
++       backends/upnp/upnpinternetgateway.cpp
++       backends/upnp/upnpcontrolpoint.cpp
++    )
++  else ()
++    set(HUPNP_FOUND false)
++  endif ()
++  macro_log_feature( HUPNP_FOUND "HUPnP" "UPnP support for Solid" "http://www.herqq.org" FALSE "" "Allows Solid to provide information about UPnP devices on the network" )
++endif(NOT APPLE)
++
++if(NOT WIN32 AND NOT APPLE)
++#   message(STATUS "Building Solid KUPnP backend." )
++#   set(solid_LIB_SRCS ${solid_LIB_SRCS}
++
++#   backends/kupnp/cagibidbuscodec.cpp
++#   backends/kupnp/cagibidevice.cpp
++#   backends/kupnp/kupnpstorageaccess.cpp
++#   backends/kupnp/kupnpdeviceinterface.cpp
++#   backends/kupnp/mediaserver1.cpp
++#   backends/kupnp/mediaserver2.cpp
++#   backends/kupnp/mediaserver3.cpp
++#   backends/kupnp/internetgatewaydevice1.cpp
++#   backends/kupnp/kupnpdevice.cpp
++#   backends/kupnp/kupnprootdevice.cpp
++#   backends/kupnp/kupnpmanager.cpp
++
++#   )
++
++   macro_optional_find_package( UDev )
++   macro_log_feature( UDEV_FOUND "UDev" "UDev support for Solid" "http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" FALSE "" "Allows Solid to use UDev to provide information about devices on Linux" )
++   configure_file( config-solid.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-solid.h )
++
++
++   if ( UDEV_FOUND )
++      message(STATUS "Building Solid UDev backend." )
++      set(solid_LIB_SRCS ${solid_LIB_SRCS}
++      backends/udev/udevdevice.cpp
++      backends/udev/udevmanager.cpp
++      backends/udev/udevdeviceinterface.cpp
++      backends/udev/udevgenericinterface.cpp
++      backends/udev/cpuinfo.cpp
++      backends/udev/udevprocessor.cpp
++      backends/udev/udevcamera.cpp
++      backends/udev/udevvideo.cpp
++      backends/udev/udevaudiointerface.cpp
++      backends/udev/udevnetworkinterface.cpp
++      backends/udev/udevserialinterface.cpp
++      backends/udev/udevaudiointerface_p.cpp
++      backends/udev/udevportablemediaplayer.cpp
++      backends/udev/udevdvbinterface.cpp
++      backends/udev/udevblock.cpp
++      backends/shared/udevqtclient.cpp
++      backends/shared/udevqtdevice.cpp
++      )
++
++      # check for media-player-info (runtime-only optional dependency)
++      set(XDG_DATA_DIRS_ENV $ENV{XDG_DATA_DIRS})  # if(ENV{..}) does not work for me
++      if(XDG_DATA_DIRS_ENV)
++         find_path(MEDIAPLAYERINFO_PATH sony_psp.mpi
++            PATHS ENV XDG_DATA_DIRS
++            PATH_SUFFIXES "media-player-info" NO_DEFAULT_PATH
++         )
++      else(XDG_DATA_DIRS_ENV)
++         set(XDG_DATA_DIRS "/usr/share")
++         message(STATUS "Warning: environment variable XDG_DATA_DIRS not set, falling back to ${XDG_DATA_DIRS}")
++         find_path(MEDIAPLAYERINFO_PATH sony_psp.mpi
++            PATHS "${XDG_DATA_DIRS}"
++            PATH_SUFFIXES "media-player-info" NO_DEFAULT_PATH
++         )
++      endif(XDG_DATA_DIRS_ENV)
++
++      macro_log_feature(MEDIAPLAYERINFO_PATH
++         "media-player-info"
++         "Enables identification and querying of portable media players"
++         "http://www.freedesktop.org/wiki/Software/media-player-info"
++         FALSE
++         ""
++         "Runtime-only dependency of the udev solid backend. Support for m-p-i is included even if not found during build"
++      )
++   endif( UDEV_FOUND )
++
++
++   message(STATUS "Building Solid HAL backend." )
++   set(solid_LIB_SRCS ${solid_LIB_SRCS}
++   backends/hal/halacadapter.cpp
++   backends/hal/halaudiointerface.cpp
++   backends/hal/halbattery.cpp
++   backends/hal/halblock.cpp
++   backends/hal/halbutton.cpp
++   backends/hal/halcamera.cpp
++   backends/hal/halcdrom.cpp
++   backends/hal/haldeviceinterface.cpp
++   backends/hal/haldvbinterface.cpp
++   backends/hal/halfstabhandling.cpp
++   backends/hal/halgenericinterface.cpp
++   backends/hal/haldevice.cpp
++   backends/hal/halmanager.cpp
++   backends/hal/halnetworkinterface.cpp
++   backends/hal/halserialinterface.cpp
++   backends/hal/halopticaldisc.cpp
++   backends/hal/halportablemediaplayer.cpp
++   backends/hal/halprocessor.cpp
++   backends/hal/halstorageaccess.cpp
++   backends/hal/halstorage.cpp
++   backends/hal/halvideo.cpp
++   backends/hal/halvolume.cpp
++   backends/hal/halsmartcardreader.cpp
++   )
++
++   message(STATUS "Building Solid UPower backend." )
++   set(solid_LIB_SRCS ${solid_LIB_SRCS}
++   backends/upower/upowermanager.cpp
++   backends/upower/upowerdevice.cpp
++   backends/upower/upowerbattery.cpp
++   backends/upower/upoweracadapter.cpp
++   backends/upower/upowerdeviceinterface.cpp
++   backends/upower/upowergenericinterface.cpp
++   )
++
++   # FIXME: this should work on more Unix systems
++   if (CMAKE_SYSTEM_NAME MATCHES Linux)
++      message(STATUS "Building Solid UDisks backend." )
++      set(solid_LIB_SRCS ${solid_LIB_SRCS}
++      backends/udisks/udisksmanager.cpp
++      backends/udisks/udisksdevice.cpp
++      backends/udisks/udisksblock.cpp
++      backends/udisks/udisksstoragevolume.cpp
++      backends/udisks/udisksdeviceinterface.cpp
++      backends/udisks/udisksopticaldisc.cpp
++      backends/udisks/udisksopticaldrive.cpp
++      backends/udisks/udisksstoragedrive.cpp
++      backends/udisks/udisksstorageaccess.cpp
++      backends/udisks/udisksgenericinterface.cpp
++      )
++   endif (CMAKE_SYSTEM_NAME MATCHES Linux)
++
++   message(STATUS "Building Solid fstab backend." )
++   set(solid_LIB_SRCS ${solid_LIB_SRCS}
++   backends/fstab/fstabmanager.cpp
++   backends/fstab/fstabdevice.cpp
++   backends/fstab/fstabnetworkshare.cpp
++   backends/fstab/fstabstorageaccess.cpp
++   backends/fstab/fstabhandling.cpp
++   backends/fstab/fstabwatcher.cpp
++   )
++
++endif(NOT WIN32 AND NOT APPLE)
++
++if(APPLE)
++   find_package(IOKit REQUIRED)
++
++   message(STATUS "-- Building Solid IOKit backend." )
++   set(solid_LIB_SRCS ${solid_LIB_SRCS}
++   backends/iokit/iokitmanager.cpp
++   backends/iokit/iokitdevice.cpp
++   backends/iokit/cfhelper.cpp
++   backends/iokit/iokitdeviceinterface.cpp
++   backends/iokit/iokitgenericinterface.cpp
++   backends/iokit/iokitprocessor.cpp
++   backends/iokit/iokitnetworkinterface.cpp
++   backends/iokit/iokitserialinterface.cpp
++   backends/iokit/iokitbattery.cpp
++   )
++endif(APPLE)
++
++if(WIN32)
++   include(CheckIncludeFileCXX)
++   check_include_file_cxx(wbemidl.h HAVE_WBEM)
++   FIND_LIBRARY(WBEM_LIBRARIES NAMES wbemuuid wbemuuidd)
++   if(HAVE_WBEM AND WBEM_LIBRARIES)
++      set(HAVE_WBEM True)
++      message(STATUS "Found wbemuuid library: ${WBEM_LIBRARIES}")
++   else(HAVE_WBEM AND WBEM_LIBRARIES)
++      set(HAVE_WBEM False)
++   endif(HAVE_WBEM AND WBEM_LIBRARIES)
++   if(HAVE_WBEM AND NOT WINCE)
++       set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_WBEM")
++       message(STATUS "-- Building Solid WMI backend." )
++
++       set(solid_LIB_SRCS ${solid_LIB_SRCS}
++       backends/wmi/wmiacadapter.cpp
++       backends/wmi/wmiaudiointerface.cpp
++       backends/wmi/wmibattery.cpp
++       backends/wmi/wmiblock.cpp
++       backends/wmi/wmibutton.cpp
++       backends/wmi/wmicamera.cpp
++       backends/wmi/wmicdrom.cpp
++       backends/wmi/wmideviceinterface.cpp
++       backends/wmi/wmidvbinterface.cpp
++       backends/wmi/wmigenericinterface.cpp
++       backends/wmi/wmidevice.cpp
++       backends/wmi/wmimanager.cpp
++       backends/wmi/wminetworkinterface.cpp
++       backends/wmi/wmiopticaldisc.cpp
++       backends/wmi/wmiportablemediaplayer.cpp
++       backends/wmi/wmiprocessor.cpp
++       backends/wmi/wmiquery.cpp
++       backends/wmi/wmistorageaccess.cpp
++       backends/wmi/wmistorage.cpp
++       backends/wmi/wmivideo.cpp
++       backends/wmi/wmivolume.cpp
++
++       )
++    endif(HAVE_WBEM AND NOT WINCE)
++endif(WIN32)
++
++set_source_files_properties( org.freedesktop.PowerManagement.xml
++                             org.freedesktop.PowerManagement.Inhibit.xml
++                             org.kde.Solid.PowerManagement.PolicyAgent.xml
++                             PROPERTIES NO_NAMESPACE TRUE)
++
++qt4_add_dbus_interfaces(solid_LIB_SRCS org.freedesktop.PowerManagement.xml
++                        org.freedesktop.PowerManagement.Inhibit.xml
++                        org.kde.Solid.PowerManagement.PolicyAgent.xml)
++
++qt4_add_dbus_interface(solid_LIB_SRCS org.kde.Solid.Networking.Client.xml
++                       org_kde_solid_networking_client)
++
++set(solid_OPTIONAL_LIBS)
++
++if(WIN32)
++   set(solid_OPTIONAL_LIBS ${solid_OPTIONAL_LIBS} ${KDEWIN_LIBRARY})
++   if(HAVE_WBEM)
++      set(solid_OPTIONAL_LIBS ${solid_OPTIONAL_LIBS} ${WBEM_LIBRARIES})
++   endif(HAVE_WBEM)
++endif(WIN32)
++
++if(APPLE)
++   set(solid_OPTIONAL_LIBS ${IOKIT_LIBRARY})
++endif(APPLE)
++
++kde4_add_library(solid ${LIBRARY_TYPE} ${solid_LIB_SRCS})
++
++if ( HUPNP_FOUND )
++   set(solid_OPTIONAL_LIBS ${solid_OPTIONAL_LIBS} ${HUPNP_LIBS})
++endif( HUPNP_FOUND )
++
++if ( UDEV_FOUND )
++   set(solid_OPTIONAL_LIBS ${solid_OPTIONAL_LIBS} ${UDEV_LIBS})
++endif ( UDEV_FOUND )
++
++target_link_libraries(solid ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTGUI_LIBRARY} ${solid_OPTIONAL_LIBS} )
++target_link_libraries(solid LINK_INTERFACE_LIBRARIES ${QT_CORE_LIBRARY} )
++
++if (WINCE)
++   target_link_libraries(solid ${WCECOMPAT_LIBRARIES})
++endif(WINCE)
++
++set_target_properties(solid PROPERTIES
++   VERSION ${GENERIC_LIB_VERSION}
++   SOVERSION ${GENERIC_LIB_SOVERSION}
++)
++install(TARGETS solid EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
++
++install(FILES org.kde.Solid.Networking.Client.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
++install(FILES org.kde.Solid.PowerManagement.PolicyAgent.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
++install(FILES org.freedesktop.PowerManagement.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
++install(FILES org.freedesktop.PowerManagement.Inhibit.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
++
++########### static lib for tests  ###############
++
++kde4_add_library(solid_static STATIC ${solid_LIB_SRCS})
++
++target_link_libraries(solid_static ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTGUI_LIBRARY} ${solid_OPTIONAL_LIBS})
++
++if(WIN32)
++   set_target_properties(solid_static PROPERTIES COMPILE_FLAGS -DSOLID_EXPORT=)
++endif(WIN32)
++########### install files ###############
++
++install( FILES ${CMAKE_CURRENT_BINARY_DIR}/solid_export.h solidnamespace.h device.h
++               devicenotifier.h deviceinterface.h genericinterface.h processor.h block.h
++               storageaccess.h storagedrive.h opticaldrive.h storagevolume.h opticaldisc.h
++               camera.h portablemediaplayer.h networkinterface.h acadapter.h battery.h
++               button.h audiointerface.h dvbinterface.h predicate.h powermanagement.h
++               networking.h video.h serialinterface.h smartcardreader.h internetgateway.h
++               networkshare.h DESTINATION ${INCLUDE_INSTALL_DIR}/solid COMPONENT Devel)
++
++########### parser build ###############
++
++set(lexer_FILE predicate_lexer)
++set(parser_FILE predicate_parser)
++
++find_package(Flex)
++macro_log_feature(FLEX_FOUND
++   "Flex"
++   "Allows the Solid predicate parser to be updated"
++   "http://flex.sourceforge.net"
++   FALSE
++   ""
++   "Required by the UpdateSolidPredicateParser target (mainly useful for developers)")
++
++find_program(BISON_EXECUTABLE bison)
++macro_log_feature(BISON_EXECUTABLE
++   "Bison"
++   "Allows the Solid predicate parser to be updated"
++   "http://www.gnu.org/software/bison"
++   FALSE
++   ""
++   "Required by the UpdateSolidPredicateParser target (mainly useful for developers)")
++mark_as_advanced(BISON_EXECUTABLE)      # don't show it in the simple view in cmake-gui/ccmake
++
++if (FLEX_EXECUTABLE AND BISON_EXECUTABLE)
++
++   add_custom_target(UpdateSolidPredicateParser
++                     COMMAND ${FLEX_EXECUTABLE} -P Solid -o${lexer_FILE}.c ${lexer_FILE}.l
++                     COMMAND ${BISON_EXECUTABLE} -p Solid -d -b ${parser_FILE} ${parser_FILE}.y
++                     COMMAND ${CMAKE_COMMAND} -E copy ${parser_FILE}.tab.c ${CMAKE_CURRENT_SOURCE_DIR}/${parser_FILE}.c
++                     COMMAND ${CMAKE_COMMAND} -E copy ${parser_FILE}.tab.h ${CMAKE_CURRENT_SOURCE_DIR}/${parser_FILE}.h
++                     COMMAND ${CMAKE_COMMAND} -E remove ${parser_FILE}.tab.c ${parser_FILE}.tab.h
++                     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
++
++else (FLEX_EXECUTABLE AND BISON_EXECUTABLE)
++   add_custom_target(UpdateSolidPredicateParser
++                     COMMAND echo "flex and/or bison not found, so target UpdateSolidPredicateParser inactive")
++endif (FLEX_EXECUTABLE AND BISON_EXECUTABLE)
++
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/dbus/manager.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/dbus/manager.cpp
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/dbus/manager.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/dbus/manager.cpp	2012-06-27 21:52:42.084597220 +0200
+@@ -0,0 +1,26 @@
++/*
++ * This file was generated by qdbusxml2cpp version 0.7
++ * Command line was: qdbusxml2cpp -p manager manager.xml
++ *
++ * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
++ *
++ * This is an auto-generated file.
++ * This file may have been hand-edited. Look for HAND-EDIT comments
++ * before re-generating it.
++ */
++
++#include "manager.h"
++
++/*
++ * Implementation of interface class OrgFreedesktopDBusObjectManagerInterface
++ */
++
++OrgFreedesktopDBusObjectManagerInterface::OrgFreedesktopDBusObjectManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
++    : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
++{
++}
++
++OrgFreedesktopDBusObjectManagerInterface::~OrgFreedesktopDBusObjectManagerInterface()
++{
++}
++
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/dbus/manager.h kdelibs-4.8.95/solid/solid/backends/udisks2/dbus/manager.h
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/dbus/manager.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/dbus/manager.h	2012-06-27 21:52:42.084597220 +0200
+@@ -0,0 +1,59 @@
++/*
++ * This file was generated by qdbusxml2cpp version 0.7
++ * Command line was: qdbusxml2cpp -p manager manager.xml
++ *
++ * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
++ *
++ * This is an auto-generated file.
++ * Do not edit! All changes made to it will be lost.
++ */
++
++#ifndef MANAGER_H_1329493525
++#define MANAGER_H_1329493525
++
++#include <QtCore/QObject>
++#include <QtCore/QByteArray>
++#include <QtCore/QList>
++#include <QtCore/QMap>
++#include <QtCore/QString>
++#include <QtCore/QStringList>
++#include <QtCore/QVariant>
++#include <QtDBus/QtDBus>
++
++#include "../udisks2.h"
++
++/*
++ * Proxy class for interface org.freedesktop.DBus.ObjectManager
++ */
++class OrgFreedesktopDBusObjectManagerInterface: public QDBusAbstractInterface
++{
++    Q_OBJECT
++public:
++    static inline const char *staticInterfaceName()
++    { return "org.freedesktop.DBus.ObjectManager"; }
++
++public:
++    OrgFreedesktopDBusObjectManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
++
++    ~OrgFreedesktopDBusObjectManagerInterface();
++
++public Q_SLOTS: // METHODS
++    inline QDBusPendingReply<DBUSManagerStruct> GetManagedObjects()
++    {
++        QList<QVariant> argumentList;
++        return asyncCallWithArgumentList(QLatin1String("GetManagedObjects"), argumentList);
++    }
++
++Q_SIGNALS: // SIGNALS
++    void InterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties);
++    void InterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces);
++};
++
++namespace org {
++  namespace freedesktop {
++    namespace DBus {
++      typedef ::OrgFreedesktopDBusObjectManagerInterface ObjectManager;
++    }
++  }
++}
++#endif
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/dbus/manager.xml kdelibs-4.8.95/solid/solid/backends/udisks2/dbus/manager.xml
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/dbus/manager.xml	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/dbus/manager.xml	2012-06-27 21:52:42.085597220 +0200
+@@ -0,0 +1,21 @@
++<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
++                      "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
++<node>
++  <interface name="org.freedesktop.DBus.ObjectManager">
++    <method name="GetManagedObjects">
++      <arg type="a{oa{sa{sv}}}" name="object_paths_interfaces_and_properties" direction="out">
++        <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="DBUSManagerStruct"/>
++      </arg>
++    </method>
++    <signal name="InterfacesAdded">
++      <arg type="o" name="object_path"/>
++      <arg type="a{sa{sv}}" name="interfaces_and_properties">
++        <annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="QVariantMapMap"/>
++      </arg>
++    </signal>
++    <signal name="InterfacesRemoved">
++      <arg type="o" name="object_path"/>
++      <arg type="as" name="interfaces"/>
++    </signal>
++  </interface>
++</node>
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisks2.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisks2.h
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisks2.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisks2.h	2012-06-27 21:52:42.085597220 +0200
+@@ -0,0 +1,77 @@
++/*
++    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef SOLID_BACKENDS_UDISKS2_H
++#define SOLID_BACKENDS_UDISKS2_H
++
++#include <QMetaType>
++#include <QtDBus>
++#include <QVariant>
++#include <QMap>
++#include <QList>
++
++typedef QList<QByteArray> QByteArrayList;
++Q_DECLARE_METATYPE(QByteArrayList)
++
++typedef QMap<QString,QVariantMap> QVariantMapMap;
++Q_DECLARE_METATYPE(QVariantMapMap)
++
++typedef QMap<QDBusObjectPath, QVariantMapMap> DBUSManagerStruct;
++Q_DECLARE_METATYPE(DBUSManagerStruct)
++
++/* UDisks2 */
++#define UD2_DBUS_SERVICE                 "org.freedesktop.UDisks2"
++#define UD2_DBUS_PATH                    "/org/freedesktop/UDisks2"
++#define UD2_UDI_DISKS_PREFIX             "/org/freedesktop/UDisks2"
++#define UD2_DBUS_PATH_MANAGER            "/org/freedesktop/UDisks2/Manager"
++#define UD2_DBUS_PATH_DRIVES             "/org/freedesktop/UDisks2/drives/"
++#define UD2_DBUS_PATH_JOBS               "/org/freedesktop/UDisks2/jobs/"
++#define DBUS_INTERFACE_PROPS             "org.freedesktop.DBus.Properties"
++#define DBUS_INTERFACE_INTROSPECT        "org.freedesktop.DBus.Introspectable"
++#define DBUS_INTERFACE_MANAGER           "org.freedesktop.DBus.ObjectManager"
++#define UD2_DBUS_INTERFACE_BLOCK         "org.freedesktop.UDisks2.Block"
++#define UD2_DBUS_INTERFACE_DRIVE         "org.freedesktop.UDisks2.Drive"
++#define UD2_DBUS_INTERFACE_PARTITION     "org.freedesktop.UDisks2.Partition"
++#define UD2_DBUS_INTERFACE_PARTITIONTABLE   "org.freedesktop.UDisks2.PartitionTable"
++#define UD2_DBUS_INTERFACE_FILESYSTEM    "org.freedesktop.UDisks2.Filesystem"
++#define UD2_DBUS_INTERFACE_ENCRYPTED     "org.freedesktop.UDisks2.Encrypted"
++#define UD2_DBUS_INTERFACE_SWAP          "org.freedesktop.UDisks2.Swapspace"
++
++/* errors */
++#define UD2_ERROR_UNAUTHORIZED            "org.freedesktop.PolicyKit.Error.NotAuthorized"
++#define UD2_ERROR_BUSY                    "org.freedesktop.UDisks2.Error.DeviceBusy"
++#define UD2_ERROR_FAILED                  "org.freedesktop.UDisks2.Error.Failed"
++#define UD2_ERROR_CANCELED                "org.freedesktop.UDisks2.Error.Cancelled"
++#define UD2_ERROR_INVALID_OPTION          "org.freedesktop.UDisks2.Error.OptionNotPermitted"
++#define UD2_ERROR_MISSING_DRIVER          "org.freedesktop.UDisks2.Error.NotSupported"
++
++#define UD2_ERROR_ALREADY_MOUNTED         "org.freedesktop.UDisks2.Error.AlreadyMounted"
++#define UD2_ERROR_NOT_MOUNTED             "org.freedesktop.UDisks2.Error.NotMounted"
++#define UD2_ERROR_MOUNTED_BY_OTHER_USER   "org.freedesktop.UDisks2.Error.MountedByOtherUser"
++#define UD2_ERROR_ALREADY_UNMOUNTING      "org.freedesktop.UDisks2.Error.AlreadyUnmounting"
++#define UD2_ERROR_TIMED_OUT               "org.freedesktop.UDisks2.Error.Timedout"
++#define UD2_ERROR_WOULD_WAKEUP            "org.freedesktop.UDisks2.Error.WouldWakeup"
++#define UD2_ERROR_ALREADY_CANCELLED       "org.freedesktop.UDisks2.Error.AlreadyCancelled"
++
++#define UD2_ERROR_NOT_AUTHORIZED          "org.freedesktop.UDisks2.Error.NotAuthorized"
++#define UD2_ERROR_NOT_AUTHORIZED_CAN_OBTAIN  "org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain"
++#define UD2_ERROR_NOT_AUTHORIZED_DISMISSED   "org.freedesktop.UDisks2.Error.NotAuthorizedDismissed"
++
++#endif // SOLID_BACKENDS_UDISKS2_H
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksblock.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksblock.cpp
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksblock.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksblock.cpp	2012-06-27 21:52:42.085597220 +0200
+@@ -0,0 +1,84 @@
++/*
++    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include <linux/kdev_t.h>
++
++#include <QFile>
++#include <QtDBus/QDBusConnection>
++#include <QtDBus/QDBusPendingReply>
++
++#include "udisksblock.h"
++#include "dbus/manager.h"
++
++using namespace Solid::Backends::UDisks2;
++
++Block::Block(Device *dev)
++    : DeviceInterface(dev)
++{
++    m_devNum = m_device->prop("DeviceNumber").toULongLong();
++    m_devFile = QFile::decodeName(m_device->prop("Device").toByteArray());
++
++    // we have a drive (non-block device for udisks), so let's find the corresponding (real) block device
++    if (m_devNum == 0 || m_devFile.isEmpty()) {
++        org::freedesktop::DBus::ObjectManager manager(UD2_DBUS_SERVICE, UD2_DBUS_PATH, QDBusConnection::systemBus());
++        QDBusPendingReply<DBUSManagerStruct> reply = manager.GetManagedObjects();
++        reply.waitForFinished();
++        if (!reply.isError()) {  // enum devices
++            Q_FOREACH(const QDBusObjectPath &path, reply.value().keys()) {
++                const QString udi = path.path();
++
++                if (udi == UD2_DBUS_PATH_MANAGER || udi == UD2_UDI_DISKS_PREFIX || udi.startsWith(UD2_DBUS_PATH_JOBS))
++                    continue;
++
++                Device device(udi);
++                if (device.drivePath() == dev->udi()) {
++                    m_devNum = device.prop("DeviceNumber").toULongLong();
++                    m_devFile = QFile::decodeName(device.prop("Device").toByteArray());
++                    break;
++                }
++            }
++        }
++        else  // show error
++        {
++            qWarning() << "Failed enumerating UDisks2 objects:" << reply.error().name() << "\n" << reply.error().message();
++        }
++    }
++
++    //qDebug() << "devnum:" << m_devNum << "dev file:" << m_devFile;
++}
++
++Block::~Block()
++{
++}
++
++QString Block::device() const
++{
++    return m_devFile;
++}
++
++int Block::deviceMinor() const
++{
++    return MINOR(m_devNum);
++}
++
++int Block::deviceMajor() const
++{
++    return MAJOR(m_devNum);
++}
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksblock.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksblock.h
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksblock.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksblock.h	2012-06-27 21:52:42.086597220 +0200
+@@ -0,0 +1,56 @@
++/*
++    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2BLOCK_H
++#define UDISKS2BLOCK_H
++
++#include <solid/ifaces/block.h>
++#include "udisksdeviceinterface.h"
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class Block: public DeviceInterface, virtual public Solid::Ifaces::Block
++{
++
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::Block)
++
++public:
++    Block(Device *dev);
++    virtual ~Block();
++
++    virtual QString device() const;
++    virtual int deviceMinor() const;
++    virtual int deviceMajor() const;
++private:
++    dev_t m_devNum;
++    QString m_devFile;
++};
++
++}
++}
++}
++
++#endif // UDISKS2BLOCK_H
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksdevice.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksdevice.cpp
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksdevice.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksdevice.cpp	2012-06-27 21:52:42.087597220 +0200
+@@ -0,0 +1,910 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksdevice.h"
++#include "udisksblock.h"
++#include "udisksdeviceinterface.h"
++#include "udisksstoragevolume.h"
++#include "udisksopticaldisc.h"
++#include "udisksopticaldrive.h"
++#include "udisksstorageaccess.h"
++#include "udisksgenericinterface.h"
++
++#include <solid/genericinterface.h>
++#include <solid/deviceinterface.h>
++#include <solid/device.h>
++
++#include <QtCore/QDebug>
++
++#include <QtDBus/QDBusMessage>
++#include <QtDBus/QDBusMetaType>
++#include <QtDBus/QDBusPendingReply>
++#include <QtDBus/QDBusArgument>
++
++#include <QtXml/QDomDocument>
++
++using namespace Solid::Backends::UDisks2;
++
++// Adapted from KLocale as Solid needs to be Qt-only
++static QString formatByteSize(double size)
++{
++    // Per IEC 60027-2
++
++    // Binary prefixes
++    //Tebi-byte             TiB             2^40    1,099,511,627,776 bytes
++    //Gibi-byte             GiB             2^30    1,073,741,824 bytes
++    //Mebi-byte             MiB             2^20    1,048,576 bytes
++    //Kibi-byte             KiB             2^10    1,024 bytes
++
++    QString s;
++    // Gibi-byte
++    if ( size >= 1073741824.0 )
++    {
++        size /= 1073741824.0;
++        if ( size > 1024 ) // Tebi-byte
++            s = QObject::tr("%1 TiB").arg(QLocale().toString(size / 1024.0, 'f', 1));
++        else
++            s = QObject::tr("%1 GiB").arg(QLocale().toString(size, 'f', 1));
++    }
++    // Mebi-byte
++    else if ( size >= 1048576.0 )
++    {
++        size /= 1048576.0;
++        s = QObject::tr("%1 MiB").arg(QLocale().toString(size, 'f', 1));
++    }
++    // Kibi-byte
++    else if ( size >= 1024.0 )
++    {
++        size /= 1024.0;
++        s = QObject::tr("%1 KiB").arg(QLocale().toString(size, 'f', 1));
++    }
++    // Just byte
++    else if ( size > 0 )
++    {
++        s = QObject::tr("%1 B").arg(QLocale().toString(size, 'f', 1));
++    }
++    // Nothing
++    else
++    {
++        s = QObject::tr("0 B");
++    }
++    return s;
++}
++
++Device::Device(const QString &udi)
++    : Solid::Ifaces::Device()
++    , m_udi(udi)
++{
++    m_device = new QDBusInterface(UD2_DBUS_SERVICE, m_udi,
++                                  QString(), // no interface, we aggregate them
++                                  QDBusConnection::systemBus());
++
++    if (m_device->isValid()) {
++        QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, m_udi, DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
++                                             SLOT(slotPropertiesChanged(QString,QVariantMap,QStringList)));
++
++        QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, UD2_DBUS_PATH, DBUS_INTERFACE_MANAGER, "InterfacesAdded",
++                                             this, SLOT(slotInterfacesAdded(QDBusObjectPath,QVariantMapMap)));
++        QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, UD2_DBUS_PATH, DBUS_INTERFACE_MANAGER, "InterfacesRemoved",
++                                             this, SLOT(slotInterfacesRemoved(QDBusObjectPath,QStringList)));
++
++        initInterfaces();
++    }
++}
++
++Device::~Device()
++{
++    delete m_device;
++}
++
++QObject* Device::createDeviceInterface(const Solid::DeviceInterface::Type& type)
++{
++    if (!queryDeviceInterface(type)) {
++        return 0;
++    }
++
++    DeviceInterface *iface = 0;
++    switch (type)
++    {
++    case Solid::DeviceInterface::GenericInterface:
++        iface = new GenericInterface(this);
++        break;
++    case Solid::DeviceInterface::Block:
++        iface = new Block(this);
++        break;
++    case Solid::DeviceInterface::StorageAccess:
++        iface = new StorageAccess(this);
++        break;
++    case Solid::DeviceInterface::StorageDrive:
++        iface = new StorageDrive(this);
++        break;
++    case Solid::DeviceInterface::OpticalDrive:
++        iface = new OpticalDrive(this);
++        break;
++    case Solid::DeviceInterface::StorageVolume:
++        iface = new StorageVolume(this);
++        break;
++    case Solid::DeviceInterface::OpticalDisc:
++        iface = new OpticalDisc(this);
++        break;
++    default:
++        break;
++    }
++    return iface;
++}
++
++bool Device::queryDeviceInterface(const Solid::DeviceInterface::Type& type) const
++{
++    switch (type) {
++    case Solid::DeviceInterface::GenericInterface:
++        return true;
++    case Solid::DeviceInterface::Block:
++        return isBlock();
++    case Solid::DeviceInterface::StorageVolume:
++        return isStorageVolume();
++    case Solid::DeviceInterface::StorageAccess:
++        return isStorageAccess();
++    case Solid::DeviceInterface::StorageDrive:
++        return isDrive();
++    case Solid::DeviceInterface::OpticalDrive:
++        return isOpticalDrive();
++    case Solid::DeviceInterface::OpticalDisc:
++        return isOpticalDisc();
++    default:
++        return false;
++    }
++}
++
++QStringList Device::emblems() const
++{
++    QStringList res;
++
++    if (queryDeviceInterface(Solid::DeviceInterface::StorageAccess))
++    {
++        const UDisks2::StorageAccess accessIface(const_cast<Device *>(this));
++        if (accessIface.isAccessible())
++        {
++            if (isEncryptedContainer())
++                res << "emblem-encrypted-unlocked";
++            else
++                res << "emblem-mounted";
++        }
++        else
++        {
++            if (isEncryptedContainer())
++                res << "emblem-encrypted-locked";
++            else
++                res << "emblem-unmounted";
++        }
++    }
++
++    return res;
++}
++
++QString Device::description() const
++{
++    const QString hintName = prop("HintName").toString();
++    if (!hintName.isEmpty())
++        return hintName;
++
++    if (queryDeviceInterface(Solid::DeviceInterface::StorageDrive))
++        return storageDescription();
++    else if (queryDeviceInterface(Solid::DeviceInterface::StorageVolume))
++        return volumeDescription();
++    else
++        return product();
++}
++
++QString Device::storageDescription() const
++{
++    QString description;
++    const UDisks2::StorageDrive storageDrive(const_cast<Device*>(this));
++    Solid::StorageDrive::DriveType drive_type = storageDrive.driveType();
++    bool drive_is_hotpluggable = storageDrive.isHotpluggable();
++
++    if (drive_type == Solid::StorageDrive::CdromDrive)
++    {
++        const UDisks2::OpticalDrive opticalDrive(const_cast<Device*>(this));
++        Solid::OpticalDrive::MediumTypes mediumTypes = opticalDrive.supportedMedia();
++        QString first;
++        QString second;
++
++        first = QObject::tr("CD-ROM", "First item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Cdr)
++            first = QObject::tr("CD-R", "First item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Cdrw)
++            first = QObject::tr("CD-RW", "First item of %1%2 Drive sentence");
++
++        if (mediumTypes & Solid::OpticalDrive::Dvd)
++            second = QObject::tr("/DVD-ROM", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Dvdplusr)
++            second = QObject::tr("/DVD+R", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Dvdplusrw)
++            second = QObject::tr("/DVD+RW", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Dvdr)
++            second = QObject::tr("/DVD-R", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Dvdrw)
++            second = QObject::tr("/DVD-RW", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Dvdram)
++            second = QObject::tr("/DVD-RAM", "Second item of %1%2 Drive sentence");
++        if ((mediumTypes & Solid::OpticalDrive::Dvdr) && (mediumTypes & Solid::OpticalDrive::Dvdplusr))
++        {
++            if(mediumTypes & Solid::OpticalDrive::Dvdplusdl)
++                second = QObject::trUtf8("/DVD±R DL", "Second item of %1%2 Drive sentence");
++            else
++                second = QObject::trUtf8("/DVD±R", "Second item of %1%2 Drive sentence");
++        }
++        if ((mediumTypes & Solid::OpticalDrive::Dvdrw) && (mediumTypes & Solid::OpticalDrive::Dvdplusrw))
++        {
++            if((mediumTypes & Solid::OpticalDrive::Dvdplusdl) || (mediumTypes & Solid::OpticalDrive::Dvdplusdlrw))
++                second = QObject::trUtf8("/DVD±RW DL", "Second item of %1%2 Drive sentence");
++            else
++                second = QObject::trUtf8("/DVD±RW", "Second item of %1%2 Drive sentence");
++        }
++        if (mediumTypes & Solid::OpticalDrive::Bd)
++            second = QObject::tr("/BD-ROM", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Bdr)
++            second = QObject::tr("/BD-R", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::Bdre)
++            second = QObject::tr("/BD-RE", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::HdDvd)
++            second = QObject::tr("/HD DVD-ROM", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::HdDvdr)
++            second = QObject::tr("/HD DVD-R", "Second item of %1%2 Drive sentence");
++        if (mediumTypes & Solid::OpticalDrive::HdDvdrw)
++            second = QObject::tr("/HD DVD-RW", "Second item of %1%2 Drive sentence");
++
++        if (drive_is_hotpluggable)
++            description = QObject::tr("External %1%2 Drive", "%1 is CD-ROM/CD-R/etc; %2 is '/DVD-ROM'/'/DVD-R'/etc (with leading slash)").arg(first).arg(second);
++        else
++            description = QObject::tr("%1%2 Drive", "%1 is CD-ROM/CD-R/etc; %2 is '/DVD-ROM'/'/DVD-R'/etc (with leading slash)").arg(first).arg(second);
++
++        return description;
++    }
++
++    if (drive_type == Solid::StorageDrive::Floppy)
++    {
++        if (drive_is_hotpluggable)
++            description = QObject::tr("External Floppy Drive");
++        else
++            description = QObject::tr("Floppy Drive");
++
++        return description;
++    }
++
++    bool drive_is_removable = storageDrive.isRemovable();
++
++    if (drive_type == Solid::StorageDrive::HardDisk && !drive_is_removable)
++    {
++        QString size_str = formatByteSize(storageDrive.size());
++        if (!size_str.isEmpty())
++        {
++            if (drive_is_hotpluggable)
++                description = QObject::tr("%1 External Hard Drive", "%1 is the size").arg(size_str);
++            else
++                description = QObject::tr("%1 Hard Drive", "%1 is the size").arg(size_str);
++        } else {
++            if (drive_is_hotpluggable)
++                description = QObject::tr("External Hard Drive");
++            else
++                description = QObject::tr("Hard Drive");
++        }
++
++        return description;
++    }
++
++    QString vendormodel_str;
++    QString model = product();
++    QString vendor_str = vendor();
++
++    if (vendor_str.isEmpty())
++    {
++        if (!model.isEmpty())
++            vendormodel_str = model;
++    }
++    else
++    {
++        if (model.isEmpty())
++            vendormodel_str = vendor_str;
++        else
++        {
++            if (model.startsWith(vendor_str))
++            {
++                // e.g. vendor is "Nokia" and model is "Nokia N950" we do not want "Nokia Nokia N950" as description
++                vendormodel_str = model;
++            }
++            else
++            {
++                vendormodel_str = QObject::tr("%1 %2", "%1 is the vendor, %2 is the model of the device").arg(vendor_str).arg(model);
++            }
++        }
++    }
++
++    if (vendormodel_str.isEmpty())
++        description = QObject::tr("Drive");
++    else
++        description = vendormodel_str;
++
++    return description;
++}
++
++QString Device::volumeDescription() const
++{
++    QString description;
++    const UDisks2::StorageVolume storageVolume(const_cast<Device*>(this));
++    QString volume_label = prop("IdLabel").toString();
++    if (volume_label.isEmpty())
++        volume_label = prop("Name").toString();
++    if (!volume_label.isEmpty())
++        return volume_label;
++
++    UDisks2::Device storageDevice(drivePath());
++    const UDisks2::StorageDrive storageDrive(&storageDevice);
++    Solid::StorageDrive::DriveType drive_type = storageDrive.driveType();
++
++    // Handle media in optical drives
++    if (drive_type == Solid::StorageDrive::CdromDrive)
++    {
++        const UDisks2::OpticalDisc disc(const_cast<Device*>(this));
++        switch (disc.discType())
++        {
++            case Solid::OpticalDisc::UnknownDiscType:
++            case Solid::OpticalDisc::CdRom:
++                description = QObject::tr("CD-ROM");
++                break;
++
++            case Solid::OpticalDisc::CdRecordable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank CD-R");
++                else
++                    description = QObject::tr("CD-R");
++                break;
++
++            case Solid::OpticalDisc::CdRewritable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank CD-RW");
++                else
++                    description = QObject::tr("CD-RW");
++                break;
++
++            case Solid::OpticalDisc::DvdRom:
++                description = QObject::tr("DVD-ROM");
++                break;
++
++            case Solid::OpticalDisc::DvdRam:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD-RAM");
++                else
++                    description = QObject::tr("DVD-RAM");
++                break;
++
++            case Solid::OpticalDisc::DvdRecordable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD-R");
++                else
++                    description = QObject::tr("DVD-R");
++                break;
++
++            case Solid::OpticalDisc::DvdPlusRecordableDuallayer:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD+R Dual-Layer");
++                else
++                    description = QObject::tr("DVD+R Dual-Layer");
++                break;
++
++            case Solid::OpticalDisc::DvdRewritable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD-RW");
++                else
++                    description = QObject::tr("DVD-RW");
++                break;
++
++            case Solid::OpticalDisc::DvdPlusRecordable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD+R");
++                else
++                    description = QObject::tr("DVD+R");
++                break;
++
++            case Solid::OpticalDisc::DvdPlusRewritable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD+RW");
++                else
++                    description = QObject::tr("DVD+RW");
++                break;
++
++            case Solid::OpticalDisc::DvdPlusRewritableDuallayer:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank DVD+RW Dual-Layer");
++                else
++                    description = QObject::tr("DVD+RW Dual-Layer");
++                break;
++
++            case Solid::OpticalDisc::BluRayRom:
++                description = QObject::tr("BD-ROM");
++                break;
++
++            case Solid::OpticalDisc::BluRayRecordable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank BD-R");
++                else
++                    description = QObject::tr("BD-R");
++                break;
++
++            case Solid::OpticalDisc::BluRayRewritable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank BD-RE");
++                else
++                    description = QObject::tr("BD-RE");
++                break;
++
++            case Solid::OpticalDisc::HdDvdRom:
++                description = QObject::tr("HD DVD-ROM");
++                break;
++
++            case Solid::OpticalDisc::HdDvdRecordable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank HD DVD-R");
++                else
++                    description = QObject::tr("HD DVD-R");
++                break;
++
++            case Solid::OpticalDisc::HdDvdRewritable:
++                if (disc.isBlank())
++                    description = QObject::tr("Blank HD DVD-RW");
++                else
++                    description = QObject::tr("HD DVD-RW");
++                break;
++            }
++
++        // Special case for pure audio disc
++        if (disc.availableContent() == Solid::OpticalDisc::Audio)
++            description = QObject::tr("Audio CD");
++
++        return description;
++    }
++
++    const bool drive_is_removable = storageDrive.isRemovable();
++    const bool drive_is_hotpluggable = storageDrive.isHotpluggable();
++
++    QString size_str = formatByteSize(storageVolume.size());
++    if (isEncryptedContainer())
++    {
++        if (!size_str.isEmpty())
++            description = QObject::tr("%1 Encrypted Container", "%1 is the size").arg(size_str);
++        else
++            description = QObject::tr("Encrypted Container");
++    }
++    else if (drive_type == Solid::StorageDrive::HardDisk && !drive_is_removable)
++    {
++        if (!size_str.isEmpty())
++        {
++            if (drive_is_hotpluggable)
++                description = QObject::tr("%1 External Hard Drive", "%1 is the size").arg(size_str);
++            else
++                description = QObject::tr("%1 Hard Drive", "%1 is the size").arg(size_str);
++        }
++        else
++        {
++            if (drive_is_hotpluggable)
++                description = QObject::tr("External Hard Drive");
++            else
++                description = QObject::tr("Hard Drive");
++        }
++    }
++    else
++    {
++        if (drive_is_removable)
++            description = QObject::tr("%1 Removable Media", "%1 is the size").arg(size_str);
++        else
++            description = QObject::tr("%1 Media", "%1 is the size").arg(size_str);
++    }
++
++    return description;
++}
++
++QString Device::icon() const
++{
++    QString iconName = prop( "HintIconName" ).toString();
++
++    if ( !iconName.isEmpty() )
++    {
++        return iconName;
++    }
++    else if (isDrive()) {
++        const bool isRemovable = prop("Removable").toBool();
++        const QString conn = prop("ConnectionBus").toString();
++
++        if (isOpticalDrive())
++            return "drive-optical";
++        else if (isRemovable && !isOpticalDisc()) {
++            if (conn == "usb")
++                return "drive-removable-media-usb";
++            else
++                return "drive-removable-media";
++        }
++    }
++    else if (isBlock()) {
++        Device drive(drivePath());
++
++        // handle media
++        const QString media = drive.prop("Media").toString();
++
++        if ( !media.isEmpty() )
++        {
++            if ( isOpticalDisc() )    // optical stuff
++            {
++                bool isWritable = drive.prop("OpticalBlank").toBool();
++
++                const UDisks2::OpticalDisc disc(const_cast<Device*>(this));
++                Solid::OpticalDisc::ContentTypes availContent = disc.availableContent();
++
++                if (availContent & Solid::OpticalDisc::VideoDvd) // Video DVD
++                    return "media-optical-dvd-video";
++                else if ((availContent & Solid::OpticalDisc::VideoCd) || (availContent & Solid::OpticalDisc::SuperVideoCd)) // Video CD
++                    return "media-optical-video";
++                else if ((availContent & Solid::OpticalDisc::Data) && (availContent & Solid::OpticalDisc::Audio)) // Mixed CD
++                    return "media-optical-mixed-cd";
++                else if (availContent & Solid::OpticalDisc::Audio) // Audio CD
++                    return "media-optical-audio";
++                else if (availContent & Solid::OpticalDisc::Data) // Data CD
++                    return "media-optical-data";
++                else if ( isWritable )
++                    return "media-optical-recordable";
++                else
++                {
++                    if ( media.startsWith( "optical_dvd" ) || media.startsWith( "optical_hddvd" ) ) // DVD
++                        return "media-optical-dvd";
++                    else if ( media.startsWith( "optical_bd" ) ) // BluRay
++                        return "media-optical-blu-ray";
++                }
++
++                // fallback for every other optical disc
++                return "media-optical";
++            }
++
++            if ( media == "flash_ms" ) // Flash & Co.
++                return "media-flash-memory-stick";
++            else if ( media == "flash_sd" || media == "flash_sdhc" || media == "flash_sdxc" || media == "flash_mmc" )
++                return "media-flash-sd-mmc";
++            else if ( media == "flash_sm" )
++                return "media-flash-smart-media";
++            else if ( media == "thumb" )
++                return "drive-removable-media-usb-pendrive";
++            else if ( media.startsWith( "flash" ) )
++                return "media-flash";
++            else if ( media == "floppy" ) // the good ol' floppy
++                return "media-floppy";
++        }
++
++        if (drive.prop("ConnectionBus").toString() == "sdio")  // hack for SD cards connected thru sdio bus
++            return "media-flash-sd-mmc";
++
++        return drive.icon();
++    }
++
++    return "drive-harddisk";    // general fallback
++}
++
++QString Device::product() const
++{
++    QString product = prop("Model").toString();
++
++    if (!isDrive()) {
++        QString label = prop("IdLabel").toString();
++        if (!label.isEmpty()) {
++            product = label;
++        }
++    }
++
++    return product;
++}
++
++QString Device::vendor() const
++{
++    return prop("Vendor").toString();
++}
++
++QString Device::udi() const
++{
++    return m_udi;
++}
++
++QString Device::parentUdi() const
++{
++    QString parent;
++
++    if (isEncryptedContainer())
++        parent = prop("CryptoBackingDevice").value<QDBusObjectPath>().path();
++    else if (propertyExists("Drive"))  // block
++        parent = prop("Drive").value<QDBusObjectPath>().path();
++    else if (propertyExists("Table"))  // partition
++        parent = prop("Table").value<QDBusObjectPath>().path();
++    else if (parent.isEmpty() || parent=="/") {
++        parent = UD2_UDI_DISKS_PREFIX;
++    }
++    return parent;
++}
++
++void Device::checkCache(const QString &key) const
++{
++    if (m_cache.isEmpty()) // recreate the cache
++        allProperties();
++
++    if (m_cache.contains(key))
++        return;
++
++    QVariant reply = m_device->property(key.toUtf8());
++
++    if (reply.isValid()) {
++        m_cache.insert(key, reply);
++    } else {
++        //qDebug() << "got invalid reply for cache:" << key;
++        //m_cache.insert(key, QVariant());
++    }
++}
++
++QString Device::introspect() const
++{
++    QDBusMessage call = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_udi,
++                                                       DBUS_INTERFACE_INTROSPECT, "Introspect");
++    QDBusPendingReply<QString> reply = QDBusConnection::systemBus().asyncCall(call);
++    reply.waitForFinished();
++
++    if (reply.isValid())
++        return reply.value();
++    else {
++        return QString();
++    }
++}
++
++QVariant Device::prop(const QString &key) const
++{
++    checkCache(key);
++    return m_cache.value(key);
++}
++
++bool Device::propertyExists(const QString &key) const
++{
++    checkCache(key);
++    return m_cache.contains(key);
++}
++
++QVariantMap Device::allProperties() const
++{
++    Q_FOREACH (const QString & iface, m_interfaces) {
++        if (iface.startsWith("org.freedesktop.DBus"))
++            continue;
++        QDBusMessage call = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_udi, DBUS_INTERFACE_PROPS, "GetAll");
++        call << iface;
++        QDBusPendingReply<QVariantMap> reply = QDBusConnection::systemBus().asyncCall(call);
++        reply.waitForFinished();
++
++        if (reply.isValid())
++            m_cache.unite(reply.value());
++        else
++            qWarning() << "Error getting props:" << reply.error().name() << reply.error().message();
++        //qDebug() << "After iface" << iface << ", cache now contains" << m_cache.size() << "items";
++    }
++
++    return m_cache;
++}
++
++bool Device::hasInterface(const QString &name) const
++{
++    return m_interfaces.contains(name);
++}
++
++QStringList Device::interfaces() const
++{
++    return m_interfaces;
++}
++
++void Device::initInterfaces()
++{
++    m_interfaces.clear();
++    const QString xmlData = introspect();
++    QDomDocument dom;
++    dom.setContent(xmlData);
++    QDomNodeList ifaceNodeList = dom.elementsByTagName("interface");
++    for (int i = 0; i < ifaceNodeList.count(); i++) {
++        QDomElement ifaceElem = ifaceNodeList.item(i).toElement();
++        if (!ifaceElem.isNull())
++            m_interfaces.append(ifaceElem.attribute("name"));
++    }
++    //qDebug() << "Device" << m_udi << "has interfaces:" << m_interfaces;
++}
++
++void Device::slotPropertiesChanged(const QString &ifaceName, const QVariantMap &changedProps, const QStringList &invalidatedProps)
++{
++    //Q_UNUSED(ifaceName);
++
++    qDebug() << m_udi << "'s interface" << ifaceName << "changed props:";
++
++    QMap<QString, int> changeMap;
++
++    Q_FOREACH(const QString & key, invalidatedProps) {
++        m_cache.remove(key);
++        changeMap.insert(key, Solid::GenericInterface::PropertyRemoved);
++        qDebug() << "\t invalidated:" << key;
++    }
++
++    QMapIterator<QString, QVariant> i(changedProps);
++    while (i.hasNext()) {
++        i.next();
++        const QString key = i.key();
++        m_cache.insert(key, i.value());  // replace the value
++        changeMap.insert(key, Solid::GenericInterface::PropertyModified);
++        qDebug() << "\t modified:" << key << ":" << m_cache.value(key);
++    }
++
++    Q_EMIT propertyChanged(changeMap);
++    Q_EMIT changed();
++}
++
++void Device::slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties)
++{
++    if (object_path.path() == m_udi) {
++        m_interfaces.append(interfaces_and_properties.keys());
++    }
++}
++
++void Device::slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces)
++{
++    if (object_path.path() == m_udi) {
++        Q_FOREACH(const QString & iface, interfaces) {
++            m_interfaces.removeAll(iface);
++        }
++    }
++}
++
++
++QString Device::errorToString(const QString & error) const
++{
++    if (error == UD2_ERROR_UNAUTHORIZED || error == UD2_ERROR_NOT_AUTHORIZED)
++        return QObject::tr("You are not authorized to perform this operation");
++    else if (error == UD2_ERROR_BUSY)
++        return QObject::tr("The device is currently busy");
++    else if (error == UD2_ERROR_FAILED)
++        return QObject::tr("The requested operation has failed");
++    else if (error == UD2_ERROR_CANCELED)
++        return QObject::tr("The requested operation has been canceled");
++    else if (error == UD2_ERROR_INVALID_OPTION)
++        return QObject::tr("An invalid or malformed option has been given");
++    else if (error == UD2_ERROR_MISSING_DRIVER)
++        return QObject::tr("The kernel driver for this filesystem type is not available");
++    else if (error == UD2_ERROR_ALREADY_MOUNTED)
++        return QObject::tr("The device is already mounted");
++    else if (error == UD2_ERROR_NOT_MOUNTED)
++        return QObject::tr("The device is not mounted");
++    else if (error == UD2_ERROR_MOUNTED_BY_OTHER_USER)
++        return QObject::tr("The device is mounted by another user");
++    else if (error == UD2_ERROR_ALREADY_UNMOUNTING)
++        return QObject::tr("The device is already unmounting");
++    else if (error == UD2_ERROR_TIMED_OUT)
++        return QObject::tr("The operation timed out");
++    else if (error == UD2_ERROR_WOULD_WAKEUP)
++        return QObject::tr("The operation would wake up a disk that is in a deep-sleep state");
++    else if (error == UD2_ERROR_ALREADY_CANCELLED)
++        return QObject::tr("The operation has already been canceled");
++    else
++        return QObject::tr("An unspecified error has occurred");
++}
++
++Solid::ErrorType Device::errorToSolidError(const QString & error) const
++{
++    if (error == UD2_ERROR_BUSY)
++        return Solid::DeviceBusy;
++    else if (error == UD2_ERROR_FAILED)
++        return Solid::OperationFailed;
++    else if (error == UD2_ERROR_CANCELED)
++        return Solid::UserCanceled;
++    else if (error == UD2_ERROR_INVALID_OPTION)
++        return Solid::InvalidOption;
++    else if (error == UD2_ERROR_MISSING_DRIVER)
++        return Solid::MissingDriver;
++    else
++        return Solid::UnauthorizedOperation;
++}
++
++bool Device::isBlock() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_BLOCK);
++}
++
++bool Device::isPartition() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_PARTITION);
++}
++
++bool Device::isPartitionTable() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_PARTITIONTABLE);
++}
++
++bool Device::isStorageVolume() const
++{
++    return isPartition() || isPartitionTable() || isStorageAccess() || isOpticalDisc();
++}
++
++bool Device::isStorageAccess() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_FILESYSTEM) || isEncryptedContainer();
++}
++
++bool Device::isDrive() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_DRIVE);
++}
++
++bool Device::isOpticalDrive() const
++{
++    return isDrive() && !prop("MediaCompatibility").toStringList().filter("optical_").isEmpty();
++}
++
++bool Device::isOpticalDisc() const
++{
++    const QString drv = drivePath();
++    if (drv.isEmpty() || drv == "/")
++        return false;
++
++    Device drive(drv);
++    return drive.prop("Optical").toBool();
++}
++
++bool Device::mightBeOpticalDisc() const
++{
++    const QString drv = drivePath();
++    if (drv.isEmpty() || drv == "/")
++        return false;
++
++    Device drive(drv);
++    return drive.isOpticalDrive();
++}
++
++bool Device::isMounted() const
++{
++    return propertyExists("MountPoints") && !qdbus_cast<QByteArrayList>(prop("MountPoints")).isEmpty();
++}
++
++bool Device::isEncryptedContainer() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_ENCRYPTED);
++}
++
++bool Device::isEncryptedCleartext() const
++{
++    const QString holderDevice = prop("CryptoBackingDevice").toString();
++    if (holderDevice.isEmpty() || holderDevice == "/")
++        return false;
++    else
++        return true;
++}
++
++bool Device::isSwap() const
++{
++    return hasInterface(UD2_DBUS_INTERFACE_SWAP);
++}
++
++QString Device::drivePath() const
++{
++    return prop("Drive").value<QDBusObjectPath>().path();
++}
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksdevice.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksdevice.h
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksdevice.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksdevice.h	2012-06-27 21:52:42.087597220 +0200
+@@ -0,0 +1,112 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2DEVICE_H
++#define UDISKS2DEVICE_H
++
++#include "udisks2.h"
++
++#include <ifaces/device.h>
++#include <solid/deviceinterface.h>
++#include <solid/solidnamespace.h>
++
++#include <QtDBus/QDBusInterface>
++#include <QtDBus/QDBusObjectPath>
++#include <QtCore/QStringList>
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class Device: public Solid::Ifaces::Device
++{
++    Q_OBJECT
++public:
++    Device(const QString &udi);
++    virtual ~Device();
++
++    virtual QObject* createDeviceInterface(const Solid::DeviceInterface::Type& type);
++    virtual bool queryDeviceInterface(const Solid::DeviceInterface::Type& type) const;
++    virtual QString description() const;
++    virtual QStringList emblems() const;
++    virtual QString icon() const;
++    virtual QString product() const;
++    virtual QString vendor() const;
++    virtual QString udi() const;
++    virtual QString parentUdi() const;
++
++    QVariant prop(const QString &key) const;
++    bool propertyExists(const QString &key) const;
++    QVariantMap allProperties() const;
++
++    bool hasInterface(const QString & name) const;
++    QStringList interfaces() const;
++
++    QString errorToString(const QString & error) const;
++    Solid::ErrorType errorToSolidError(const QString & error) const;
++
++    bool isBlock() const;
++    bool isPartition() const;
++    bool isPartitionTable() const;
++    bool isStorageVolume() const;
++    bool isStorageAccess() const;
++    bool isDrive() const;
++    bool isOpticalDrive() const;
++    bool isOpticalDisc() const;
++    bool mightBeOpticalDisc() const;
++    bool isMounted() const;
++    bool isEncryptedContainer() const;
++    bool isEncryptedCleartext() const;
++    bool isSwap() const;
++
++    QString drivePath() const;
++
++Q_SIGNALS:
++    void changed();
++    void propertyChanged(const QMap<QString,int> &changes);
++
++private Q_SLOTS:
++    void slotPropertiesChanged(const QString & ifaceName, const QVariantMap & changedProps, const QStringList & invalidatedProps);
++    void slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties);
++    void slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces);
++
++private:
++    QString storageDescription() const;
++    QString volumeDescription() const;
++    mutable QDBusInterface *m_device;
++    QString m_udi;
++    mutable QVariantMap m_cache;
++
++    void initInterfaces();
++    QStringList m_interfaces;
++
++    void checkCache(const QString &key) const;
++    QString introspect() const;
++};
++
++}
++}
++}
++
++#endif // UDISKS2DEVICE_H
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksdeviceinterface.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksdeviceinterface.cpp
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksdeviceinterface.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksdeviceinterface.cpp	2012-06-27 21:52:42.088597220 +0200
+@@ -0,0 +1,33 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksdeviceinterface.h"
++
++using namespace Solid::Backends::UDisks2;
++
++DeviceInterface::DeviceInterface(Device *device)
++    : QObject(device), m_device(device)
++{
++
++}
++
++DeviceInterface::~DeviceInterface()
++{
++}
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksdeviceinterface.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksdeviceinterface.h
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksdeviceinterface.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksdeviceinterface.h	2012-06-27 21:52:42.088597220 +0200
+@@ -0,0 +1,148 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2DEVICEINTERFACE_H
++#define UDISKS2DEVICEINTERFACE_H
++
++#include <ifaces/deviceinterface.h>
++#include "udisksdevice.h"
++
++#include <QtCore/QObject>
++#include <QtCore/QStringList>
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class DeviceInterface : public QObject, virtual public Solid::Ifaces::DeviceInterface
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::DeviceInterface)
++public:
++    DeviceInterface(Device *device);
++    virtual ~DeviceInterface();
++
++protected:
++    Device *m_device;
++
++public:
++    inline static QStringList toStringList(Solid::DeviceInterface::Type type)
++    {
++        QStringList list;
++
++        switch(type)
++        {
++        case Solid::DeviceInterface::GenericInterface:
++            list << "generic";
++            break;
++        case Solid::DeviceInterface::Processor:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::Block:
++            list << "block";
++            break;
++        case Solid::DeviceInterface::StorageAccess:
++            list << "volume";
++            break;
++        case Solid::DeviceInterface::StorageDrive:
++            list << "storage";
++            break;
++        case Solid::DeviceInterface::OpticalDrive:
++            list << "storage.cdrom";
++            break;
++        case Solid::DeviceInterface::StorageVolume:
++            list << "volume";
++            break;
++        case Solid::DeviceInterface::OpticalDisc:
++            list << "volume.disc";
++            break;
++        case Solid::DeviceInterface::Camera:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::PortableMediaPlayer:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::NetworkInterface:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::AcAdapter:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::Battery:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::Button:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::AudioInterface:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::DvbInterface:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::Video:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::SerialInterface:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::InternetGateway:
++            break;
++        case Solid::DeviceInterface::SmartCardReader:
++            // Doesn't exist with UDisks
++        case Solid::DeviceInterface::NetworkShare:
++            // Doesn't exist with UDisks
++            break;
++        case Solid::DeviceInterface::Unknown:
++            break;
++        case Solid::DeviceInterface::Last:
++            break;
++        }
++
++        return list;
++    }
++
++    inline static Solid::DeviceInterface::Type fromString(const QString &capability)
++    {
++        if (capability == "generic")
++            return Solid::DeviceInterface::GenericInterface;
++        else if (capability == "block")
++            return Solid::DeviceInterface::Block;
++        else if (capability == "storage")
++            return Solid::DeviceInterface::StorageDrive;
++        else if (capability == "storage.cdrom")
++            return Solid::DeviceInterface::OpticalDrive;
++        else if (capability == "volume")
++            return Solid::DeviceInterface::StorageVolume;
++        else if (capability == "volume.disc")
++            return Solid::DeviceInterface::OpticalDisc;
++        else
++            return Solid::DeviceInterface::Unknown;
++    }
++};
++
++}
++}
++}
++
++#endif // UDISKS2DEVICEINTERFACE_H
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksgenericinterface.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksgenericinterface.cpp
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksgenericinterface.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksgenericinterface.cpp	2012-06-27 21:52:42.088597220 +0200
+@@ -0,0 +1,53 @@
++/*
++    Copyright 2009 Pino Toscano <pino@kde.org>
++    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksgenericinterface.h"
++
++#include "udisksdevice.h"
++
++using namespace Solid::Backends::UDisks2;
++
++GenericInterface::GenericInterface(Device *device)
++    : DeviceInterface(device)
++{
++    connect(device, SIGNAL(propertyChanged(QMap<QString,int>)),
++            this, SIGNAL(propertyChanged(QMap<QString,int>)));
++}
++
++GenericInterface::~GenericInterface()
++{
++}
++
++QVariant GenericInterface::property(const QString &key) const
++{
++    return m_device->prop(key);
++}
++
++QVariantMap GenericInterface::allProperties() const
++{
++    return m_device->allProperties();
++}
++
++bool GenericInterface::propertyExists(const QString &key) const
++{
++    return m_device->propertyExists(key);
++}
++
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksgenericinterface.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksgenericinterface.h
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksgenericinterface.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksgenericinterface.h	2012-06-27 21:52:42.089597220 +0200
+@@ -0,0 +1,57 @@
++/*
++    Copyright 2009 Pino Toscano <pino@kde.org>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef SOLID_BACKENDS_UDISKS2_GENERICINTERFACE_H
++#define SOLID_BACKENDS_UDISKS2_GENERICINTERFACE_H
++
++#include <solid/ifaces/genericinterface.h>
++#include <solid/genericinterface.h>
++#include "udisksdeviceinterface.h"
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++class Device;
++
++class GenericInterface : public DeviceInterface, virtual public Solid::Ifaces::GenericInterface
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::GenericInterface)
++
++public:
++    GenericInterface(Device *device);
++    virtual ~GenericInterface();
++
++    virtual QVariant property(const QString &key) const;
++    virtual QVariantMap allProperties() const;
++    virtual bool propertyExists(const QString &key) const;
++
++Q_SIGNALS:
++    void propertyChanged(const QMap<QString, int> &changes);
++    void conditionRaised(const QString &condition, const QString &reason);
++};
++}
++}
++}
++
++#endif // SOLID_BACKENDS_UDISKS2_GENERICINTERFACE_H
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksmanager.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksmanager.cpp
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksmanager.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksmanager.cpp	2012-06-27 21:52:42.089597220 +0200
+@@ -0,0 +1,227 @@
++/*
++    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksmanager.h"
++
++#include <QtCore/QDebug>
++#include <QtDBus>
++
++#include "../shared/rootdevice.h"
++
++using namespace Solid::Backends::UDisks2;
++using namespace Solid::Backends::Shared;
++
++Manager::Manager(QObject *parent)
++    : Solid::Ifaces::DeviceManager(parent),
++      m_manager(UD2_DBUS_SERVICE,
++                UD2_DBUS_PATH,
++                QDBusConnection::systemBus())
++{
++    m_supportedInterfaces
++            << Solid::DeviceInterface::GenericInterface
++            << Solid::DeviceInterface::Block
++            << Solid::DeviceInterface::StorageAccess
++            << Solid::DeviceInterface::StorageDrive
++            << Solid::DeviceInterface::OpticalDrive
++            << Solid::DeviceInterface::OpticalDisc
++            << Solid::DeviceInterface::StorageVolume;
++
++    qDBusRegisterMetaType<QList<QDBusObjectPath> >();
++    qDBusRegisterMetaType<QVariantMap>();
++    qDBusRegisterMetaType<QVariantMapMap>();
++    qDBusRegisterMetaType<QByteArrayList>();
++    qDBusRegisterMetaType<DBUSManagerStruct>();
++
++    bool serviceFound = m_manager.isValid();
++    if (!serviceFound) {
++        // find out whether it will be activated automatically
++        QDBusMessage message = QDBusMessage::createMethodCall("org.freedesktop.DBus",
++                                                              "/org/freedesktop/DBus",
++                                                              "org.freedesktop.DBus",
++                                                              "ListActivatableNames");
++
++        QDBusReply<QStringList> reply = QDBusConnection::systemBus().call(message);
++        if (reply.isValid() && reply.value().contains(UD2_DBUS_SERVICE)) {
++            QDBusConnection::systemBus().interface()->startService(UD2_DBUS_SERVICE);
++            serviceFound = true;
++        }
++    }
++
++    if (serviceFound) {
++        connect(&m_manager, SIGNAL(InterfacesAdded(QDBusObjectPath, QVariantMapMap)),
++                this, SLOT(slotInterfacesAdded(QDBusObjectPath,QVariantMapMap)));
++        connect(&m_manager, SIGNAL(InterfacesRemoved(QDBusObjectPath,QStringList)),
++                this, SLOT(slotInterfacesRemoved(QDBusObjectPath,QStringList)));
++    }
++}
++
++Manager::~Manager()
++{
++}
++
++QObject* Manager::createDevice(const QString& udi)
++{
++    if (udi==udiPrefix()) {
++        RootDevice *root = new RootDevice(udi);
++
++        root->setProduct(tr("Storage"));
++        root->setDescription(tr("Storage devices"));
++        root->setIcon("server-database"); // Obviously wasn't meant for that, but maps nicely in oxygen icon set :-p
++
++        return root;
++    } else if (deviceCache().contains(udi)) {
++        return new Device(udi);
++    } else {
++        return 0;
++    }
++}
++
++QStringList Manager::devicesFromQuery(const QString& parentUdi, Solid::DeviceInterface::Type type)
++{
++    QStringList result;
++
++    if (!parentUdi.isEmpty())
++    {
++        Q_FOREACH (const QString &udi, deviceCache())
++        {
++            Device device(udi);
++            if (device.queryDeviceInterface(type) && device.parentUdi() == parentUdi)
++                result << udi;
++        }
++
++        return result;
++    }
++    else if (type != Solid::DeviceInterface::Unknown)
++    {
++        Q_FOREACH (const QString &udi, deviceCache())
++        {
++            Device device(udi);
++            if (device.queryDeviceInterface(type))
++                result << udi;
++        }
++
++        return result;
++    }
++
++    return deviceCache();
++}
++
++QStringList Manager::allDevices()
++{
++    m_deviceCache.clear();
++
++    QDBusPendingReply<DBUSManagerStruct> reply = m_manager.GetManagedObjects();
++    reply.waitForFinished();
++    if (!reply.isError()) {  // enum devices
++        m_deviceCache << udiPrefix();
++
++        Q_FOREACH(const QDBusObjectPath &path, reply.value().keys()) {
++            const QString udi = path.path();
++            //qDebug() << "Adding device" << udi;
++
++            if (udi == UD2_DBUS_PATH_MANAGER || udi == UD2_UDI_DISKS_PREFIX || udi.startsWith(UD2_DBUS_PATH_JOBS))
++                continue;
++
++            Device device(udi);
++            if (device.mightBeOpticalDisc()) {
++                QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, udi, DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
++                                                     SLOT(slotMediaChanged(QDBusMessage)));
++                if (!device.isOpticalDisc())  // skip empty CD disc
++                    continue;
++            }
++
++            m_deviceCache.append(udi);
++        }
++    }
++    else  // show error
++    {
++        qWarning() << "Failed enumerating UDisks2 objects:" << reply.error().name() << "\n" << reply.error().message();
++    }
++
++    return m_deviceCache;
++}
++
++
++QSet< Solid::DeviceInterface::Type > Manager::supportedInterfaces() const
++{
++    return m_supportedInterfaces;
++}
++
++QString Manager::udiPrefix() const
++{
++    return UD2_UDI_DISKS_PREFIX;
++}
++
++void Manager::slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties)
++{
++    const QString udi = object_path.path();
++
++    qDebug() << udi << "has new interfaces:" << interfaces_and_properties.keys();
++
++    // new device, we don't know it yet
++    if (!m_deviceCache.contains(udi)) {
++        m_deviceCache.append(udi);
++        Q_EMIT deviceAdded(udi);
++    }
++}
++
++void Manager::slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces)
++{
++    const QString udi = object_path.path();
++
++    qDebug() << udi << "lost interfaces:" << interfaces;
++
++    Device device(udi);
++
++    if (!udi.isEmpty() && (interfaces.isEmpty() || device.interfaces().isEmpty() || device.interfaces().contains(UD2_DBUS_INTERFACE_FILESYSTEM))) {
++        Q_EMIT deviceRemoved(udi);
++        m_deviceCache.removeAll(udi);
++    }
++}
++
++void Manager::slotMediaChanged(const QDBusMessage & msg)
++{
++    const QVariantMap properties = qdbus_cast<QVariantMap>(msg.arguments().at(1));
++
++    if (!properties.contains("Size"))  // react only on Size changes
++        return;
++
++    const QString udi = msg.path();
++    qulonglong size = properties.value("Size").toULongLong();
++    qDebug() << "MEDIA CHANGED in" << udi << "; size is:" << size;
++
++    if (!m_deviceCache.contains(udi) && size > 0) { // we don't know the optdisc, got inserted
++        m_deviceCache.append(udi);
++        Q_EMIT deviceAdded(udi);
++    }
++
++    if (m_deviceCache.contains(udi) && size == 0) {  // we know the optdisc, got removed
++        Q_EMIT deviceRemoved(udi);
++        m_deviceCache.removeAll(udi);
++    }
++}
++
++const QStringList & Manager::deviceCache()
++{
++    if (m_deviceCache.isEmpty())
++        allDevices();
++
++    return m_deviceCache;
++}
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksmanager.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksmanager.h
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksmanager.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksmanager.h	2012-06-27 21:52:42.091597220 +0200
+@@ -0,0 +1,69 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2MANAGER_H
++#define UDISKS2MANAGER_H
++
++#include "udisks2.h"
++#include "udisksdevice.h"
++#include "dbus/manager.h"
++
++#include "solid/ifaces/devicemanager.h"
++
++#include <QtDBus/QDBusInterface>
++#include <QtCore/QSet>
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class Manager: public Solid::Ifaces::DeviceManager
++{
++    Q_OBJECT
++
++public:
++    Manager(QObject *parent);
++    virtual QObject* createDevice(const QString& udi);
++    virtual QStringList devicesFromQuery(const QString& parentUdi, Solid::DeviceInterface::Type type);
++    virtual QStringList allDevices();
++    virtual QSet< Solid::DeviceInterface::Type > supportedInterfaces() const;
++    virtual QString udiPrefix() const;
++    virtual ~Manager();
++
++private Q_SLOTS:
++    void slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties);
++    void slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces);
++    void slotMediaChanged(const QDBusMessage &msg);
++
++private:
++    const QStringList &deviceCache();
++    QSet<Solid::DeviceInterface::Type> m_supportedInterfaces;
++    org::freedesktop::DBus::ObjectManager m_manager;
++    QStringList m_deviceCache;
++};
++
++}
++}
++}
++#endif // UDISKS2MANAGER_H
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldisc.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldisc.cpp
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldisc.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldisc.cpp	2012-06-27 21:52:42.092597220 +0200
+@@ -0,0 +1,277 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010 - 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include <sys/types.h>
++#include <unistd.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++
++#include <QtCore/QFile>
++#include <QtDBus/QDBusConnection>
++
++#include "../shared/udevqtclient.h"
++
++#include "udisks2.h"
++#include "udisksopticaldisc.h"
++
++// inspired by http://cgit.freedesktop.org/hal/tree/hald/linux/probing/probe-volume.c
++static Solid::OpticalDisc::ContentType advancedDiscDetect(const QByteArray & device_file)
++{
++    /* the discs block size */
++    unsigned short bs;
++    /* the path table size */
++    unsigned short ts;
++    /* the path table location (in blocks) */
++    unsigned int tl;
++    /* length of the directory name in current path table entry */
++    unsigned char len_di = 0;
++    /* the number of the parent directory's path table entry */
++    unsigned int parent = 0;
++    /* filename for the current path table entry */
++    char dirname[256];
++    /* our position into the path table */
++    int pos = 0;
++    /* the path table record we're on */
++    int curr_record = 1;
++
++    Solid::OpticalDisc::ContentType result = Solid::OpticalDisc::NoContent;
++
++    int fd = open(device_file.constData(), O_RDONLY);
++
++    /* read the block size */
++    lseek (fd, 0x8080, SEEK_CUR);
++    if (read (fd, &bs, 2) != 2)
++    {
++        qDebug("Advanced probing on %s failed while reading block size", qPrintable(device_file));
++        goto out;
++    }
++
++    /* read in size of path table */
++    lseek (fd, 2, SEEK_CUR);
++    if (read (fd, &ts, 2) != 2)
++    {
++        qDebug("Advanced probing on %s failed while reading path table size", qPrintable(device_file));
++        goto out;
++    }
++
++    /* read in which block path table is in */
++    lseek (fd, 6, SEEK_CUR);
++    if (read (fd, &tl, 4) != 4)
++    {
++        qDebug("Advanced probing on %s failed while reading path table block", qPrintable(device_file));
++        goto out;
++    }
++
++    /* seek to the path table */
++    lseek (fd, bs * tl, SEEK_SET);
++
++    /* loop through the path table entries */
++    while (pos < ts)
++    {
++        /* get the length of the filename of the current entry */
++        if (read (fd, &len_di, 1) != 1)
++        {
++            qDebug("Advanced probing on %s failed, cannot read more entries", qPrintable(device_file));
++            break;
++        }
++
++        /* get the record number of this entry's parent
++           i'm pretty sure that the 1st entry is always the top directory */
++        lseek (fd, 5, SEEK_CUR);
++        if (read (fd, &parent, 2) != 2)
++        {
++            qDebug("Advanced probing on %s failed, couldn't read parent entry", qPrintable(device_file));
++            break;
++        }
++
++        /* read the name */
++        if (read (fd, dirname, len_di) != len_di)
++        {
++            qDebug("Advanced probing on %s failed, couldn't read the entry name", qPrintable(device_file));
++            break;
++        }
++        dirname[len_di] = 0;
++
++        /* if we found a folder that has the root as a parent, and the directory name matches
++           one of the special directories then set the properties accordingly */
++        if (parent == 1)
++        {
++            if (!strcasecmp (dirname, "VIDEO_TS"))
++            {
++                qDebug("Disc in %s is a Video DVD", qPrintable(device_file));
++                result = Solid::OpticalDisc::VideoDvd;
++                break;
++            }
++            else if (!strcasecmp (dirname, "BDMV"))
++            {
++                qDebug("Disc in %s is a Blu-ray video disc", qPrintable(device_file));
++                result = Solid::OpticalDisc::VideoBluRay;
++                break;
++            }
++            else if (!strcasecmp (dirname, "VCD"))
++            {
++                qDebug("Disc in %s is a Video CD", qPrintable(device_file));
++                result = Solid::OpticalDisc::VideoCd;
++                break;
++            }
++            else if (!strcasecmp (dirname, "SVCD"))
++            {
++                qDebug("Disc in %s is a Super Video CD", qPrintable(device_file));
++                result = Solid::OpticalDisc::SuperVideoCd;
++                break;
++            }
++        }
++
++        /* all path table entries are padded to be even,
++           so if this is an odd-length table, seek a byte to fix it */
++        if (len_di%2 == 1)
++        {
++            lseek (fd, 1, SEEK_CUR);
++            pos++;
++        }
++
++        /* update our position */
++        pos += 8 + len_di;
++        curr_record++;
++    }
++
++    close(fd);
++    return result;
++
++out:
++    /* go back to the start of the file */
++    lseek (fd, 0, SEEK_SET);
++    close(fd);
++    return result;
++}
++
++using namespace Solid::Backends::UDisks2;
++
++OpticalDisc::OpticalDisc(Device *dev)
++    : StorageVolume(dev), m_needsReprobe(true), m_cachedContent(Solid::OpticalDisc::NoContent)
++{
++    UdevQt::Client client(this);
++    m_udevDevice = client.deviceByDeviceFile(device());
++    //qDebug() << "udev device:" << m_udevDevice.name() << "valid:" << m_udevDevice.isValid();
++    /*qDebug() << "\tProperties:" << */ m_udevDevice.deviceProperties(); // initialize the properties DB so that it doesn't crash further down, #298416
++
++    m_drive = new Device(m_device->prop("Drive").value<QDBusObjectPath>().path());
++    QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, m_drive->udi(), DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
++                                         SLOT(slotDrivePropertiesChanged(QString,QVariantMap,QStringList)));
++}
++
++OpticalDisc::~OpticalDisc()
++{
++    delete m_drive;
++}
++
++qulonglong OpticalDisc::capacity() const
++{
++    return m_device->prop("Size").toULongLong();
++}
++
++bool OpticalDisc::isRewritable() const
++{
++    // the hard way, udisks has no notion of a disc "rewritability"
++    const QString mediaType = media();
++    return mediaType == "optical_cd_rw" || mediaType == "optical_dvd_rw" || mediaType == "optical_dvd_ram" ||
++            mediaType == "optical_dvd_plus_rw" || mediaType == "optical_dvd_plus_rw_dl" ||
++            mediaType == "optical_bd_re" || mediaType == "optical_hddvd_rw";
++}
++
++bool OpticalDisc::isBlank() const
++{
++    return m_drive->prop("OpticalBlank").toBool();
++}
++
++bool OpticalDisc::isAppendable() const
++{
++    //qDebug() << "appendable prop" << m_udevDevice.deviceProperty("ID_CDROM_MEDIA_STATE");
++    return m_udevDevice.deviceProperty("ID_CDROM_MEDIA_STATE").toString() == QLatin1String("appendable");
++}
++
++Solid::OpticalDisc::DiscType OpticalDisc::discType() const
++{
++    QMap<Solid::OpticalDisc::DiscType, QString> map;
++    map[Solid::OpticalDisc::CdRom] = "optical_cd";
++    map[Solid::OpticalDisc::CdRecordable] = "optical_cd_r";
++    map[Solid::OpticalDisc::CdRewritable] = "optical_cd_rw";
++    map[Solid::OpticalDisc::DvdRom] = "optical_dvd";
++    map[Solid::OpticalDisc::DvdRecordable] = "optical_dvd_r";
++    map[Solid::OpticalDisc::DvdRewritable] ="optical_dvd_rw";
++    map[Solid::OpticalDisc::DvdRam] ="optical_dvd_ram";
++    map[Solid::OpticalDisc::DvdPlusRecordable] ="optical_dvd_plus_r";
++    map[Solid::OpticalDisc::DvdPlusRewritable] ="optical_dvd_plus_rw";
++    map[Solid::OpticalDisc::DvdPlusRecordableDuallayer] ="optical_dvd_plus_r_dl";
++    map[Solid::OpticalDisc::DvdPlusRewritableDuallayer] ="optical_dvd_plus_rw_dl";
++    map[Solid::OpticalDisc::BluRayRom] ="optical_bd";
++    map[Solid::OpticalDisc::BluRayRecordable] ="optical_bd_r";
++    map[Solid::OpticalDisc::BluRayRewritable] ="optical_bd_re";
++    map[Solid::OpticalDisc::HdDvdRom] ="optical_hddvd";
++    map[Solid::OpticalDisc::HdDvdRecordable] ="optical_hddvd_r";
++    map[Solid::OpticalDisc::HdDvdRewritable] ="optical_hddvd_rw";
++    // TODO add these to Solid
++    //map[Solid::OpticalDisc::MagnetoOptical] ="optical_mo";
++    //map[Solid::OpticalDisc::MountRainer] ="optical_mrw";
++    //map[Solid::OpticalDisc::MountRainerWritable] ="optical_mrw_w";
++
++    return map.key(media(), Solid::OpticalDisc::UnknownDiscType);  // FIXME optimize, lookup by value, not key
++}
++
++Solid::OpticalDisc::ContentTypes OpticalDisc::availableContent() const
++{
++    if (isBlank()) {
++        m_needsReprobe = false;
++        return Solid::OpticalDisc::NoContent;
++    }
++
++    if (m_needsReprobe) {
++        m_cachedContent = Solid::OpticalDisc::NoContent;
++        const bool hasData = m_drive->prop("OpticalNumDataTracks").toUInt() > 0;
++        const bool hasAudio = m_drive->prop("OpticalNumAudioTracks").toUInt() > 0;
++
++        if ( hasData ) {
++            m_cachedContent |= Solid::OpticalDisc::Data;
++            m_cachedContent |= advancedDiscDetect(m_device->prop("Device").toByteArray());
++        }
++        if ( hasAudio )
++            m_cachedContent |= Solid::OpticalDisc::Audio;
++
++        m_needsReprobe = false;
++    }
++
++    return m_cachedContent;
++}
++
++void OpticalDisc::slotDrivePropertiesChanged(const QString &ifaceName, const QVariantMap &changedProps, const QStringList &invalidatedProps)
++{
++    Q_UNUSED(ifaceName);
++
++    if (changedProps.keys().contains("Media") || invalidatedProps.contains("Media")) {
++        m_needsReprobe = true;
++        m_cachedContent = Solid::OpticalDisc::NoContent;
++    }
++}
++
++QString OpticalDisc::media() const
++{
++    return m_drive->prop("Media").toString();
++}
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldisc.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldisc.h
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldisc.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldisc.h	2012-06-27 21:52:42.092597220 +0200
+@@ -0,0 +1,69 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010 - 2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2OPTICALDISC_H
++#define UDISKS2OPTICALDISC_H
++
++#include <solid/ifaces/opticaldisc.h>
++
++#include "../shared/udevqtdevice.h"
++
++#include "udisksstoragevolume.h"
++#include "udisksdevice.h"
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class OpticalDisc: public StorageVolume, virtual public Solid::Ifaces::OpticalDisc
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::OpticalDisc)
++
++public:
++    OpticalDisc(Device *dev);
++    virtual ~OpticalDisc();
++
++    virtual qulonglong capacity() const;
++    virtual bool isRewritable() const;
++    virtual bool isBlank() const;
++    virtual bool isAppendable() const;
++    virtual Solid::OpticalDisc::DiscType discType() const;
++    virtual Solid::OpticalDisc::ContentTypes availableContent() const;
++
++private Q_SLOTS:
++    void slotDrivePropertiesChanged(const QString & ifaceName, const QVariantMap & changedProps, const QStringList & invalidatedProps);
++
++private:
++    QString media() const;
++    mutable bool m_needsReprobe;
++    mutable Solid::OpticalDisc::ContentTypes m_cachedContent;
++    Device * m_drive;
++    UdevQt::Device m_udevDevice;
++};
++
++}
++}
++}
++#endif // UDISKS2OPTICALDISC_H
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldrive.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldrive.cpp
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldrive.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldrive.cpp	2012-06-27 21:52:42.093597220 +0200
+@@ -0,0 +1,222 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++#include <string.h>
++#include <errno.h>
++#include <unistd.h>
++#include <stdlib.h>
++
++#include <QtCore/QFile>
++#include <QtCore/QDebug>
++
++#include "udisksopticaldrive.h"
++#include "udisks2.h"
++#include "udisksdevice.h"
++#include "dbus/manager.h"
++
++using namespace Solid::Backends::UDisks2;
++
++OpticalDrive::OpticalDrive(Device *device)
++    : StorageDrive(device), m_ejectInProgress(false), m_readSpeed(0), m_writeSpeed(0), m_speedsInit(false)
++{
++    m_device->registerAction("eject", this,
++                             SLOT(slotEjectRequested()),
++                             SLOT(slotEjectDone(int, const QString&)));
++
++    connect(m_device, SIGNAL(changed()), this, SLOT(slotChanged()));
++}
++
++OpticalDrive::~OpticalDrive()
++{
++}
++
++bool OpticalDrive::eject()
++{
++    if (m_ejectInProgress)
++        return false;
++    m_ejectInProgress = true;
++    m_device->broadcastActionRequested("eject");
++
++    const QString path = m_device->udi();
++    QDBusConnection c = QDBusConnection::systemBus();
++
++    // if the device is mounted, unmount first
++    QString blockPath;
++    org::freedesktop::DBus::ObjectManager manager(UD2_DBUS_SERVICE, UD2_DBUS_PATH, c);
++    QDBusPendingReply<DBUSManagerStruct> reply = manager.GetManagedObjects();
++    reply.waitForFinished();
++    if (!reply.isError()) {  // enum devices
++        Q_FOREACH(const QDBusObjectPath &objPath, reply.value().keys()) {
++            const QString udi = objPath.path();
++
++            //qDebug() << "Inspecting" << udi;
++
++            if (udi == UD2_DBUS_PATH_MANAGER || udi == UD2_UDI_DISKS_PREFIX || udi.startsWith(UD2_DBUS_PATH_JOBS))
++                continue;
++
++            Device device(udi);
++            if (device.drivePath() == path && device.isMounted()) {
++                //qDebug() << "Got mounted block device:" << udi;
++                blockPath = udi;
++                break;
++            }
++        }
++    }
++    else  // show error
++    {
++        qWarning() << "Failed enumerating UDisks2 objects:" << reply.error().name() << "\n" << reply.error().message();
++    }
++
++    if (!blockPath.isEmpty()) {
++        //qDebug() << "Calling unmount on" << blockPath;
++        QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, blockPath, UD2_DBUS_INTERFACE_FILESYSTEM, "Unmount");
++        msg << QVariantMap();   // options, unused now
++        c.call(msg, QDBus::BlockWithGui);
++    }
++
++    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, UD2_DBUS_INTERFACE_DRIVE, "Eject");
++    msg << QVariantMap();
++    return c.callWithCallback(msg, this, SLOT(slotDBusReply(const QDBusMessage &)), SLOT(slotDBusError(const QDBusError &)));
++}
++
++void OpticalDrive::slotDBusReply(const QDBusMessage &/*reply*/)
++{
++    m_ejectInProgress = false;
++    m_device->broadcastActionDone("eject");
++}
++
++void OpticalDrive::slotDBusError(const QDBusError &error)
++{
++    m_ejectInProgress = false;
++    m_device->broadcastActionDone("eject", m_device->errorToSolidError(error.name()),
++                                  m_device->errorToString(error.name()) + ": " +error.message());
++}
++
++void OpticalDrive::slotEjectRequested()
++{
++    m_ejectInProgress = true;
++    Q_EMIT ejectRequested(m_device->udi());
++}
++
++void OpticalDrive::slotEjectDone(int error, const QString &errorString)
++{
++    m_ejectInProgress = false;
++    Q_EMIT ejectDone(static_cast<Solid::ErrorType>(error), errorString, m_device->udi());
++}
++
++void OpticalDrive::initReadWriteSpeeds() const
++{
++#if 0
++    int read_speed, write_speed;
++    char *write_speeds = 0;
++    QByteArray device_file = QFile::encodeName(m_device->property("Device").toString());
++
++    //qDebug("Doing open (\"%s\", O_RDONLY | O_NONBLOCK)", device_file.constData());
++    int fd = open(device_file, O_RDONLY | O_NONBLOCK);
++    if (fd < 0) {
++        qWarning("Cannot open %s: %s", device_file.constData(), strerror (errno));
++        return;
++    }
++
++    if (get_read_write_speed(fd, &read_speed, &write_speed, &write_speeds) >= 0) {
++        m_readSpeed = read_speed;
++        m_writeSpeed = write_speed;
++
++        QStringList list = QString::fromLatin1(write_speeds).split(',', QString::SkipEmptyParts);
++        Q_FOREACH (const QString & speed, list)
++            m_writeSpeeds.append(speed.toInt());
++
++        free(write_speeds);
++
++        m_speedsInit = true;
++    }
++
++    close(fd);
++#endif
++}
++
++QList<int> OpticalDrive::writeSpeeds() const
++{
++    if (!m_speedsInit)
++        initReadWriteSpeeds();
++    //qDebug() << "solid write speeds:" << m_writeSpeeds;
++    return m_writeSpeeds;
++}
++
++int OpticalDrive::writeSpeed() const
++{
++    if (!m_speedsInit)
++        initReadWriteSpeeds();
++    return m_writeSpeed;
++}
++
++int OpticalDrive::readSpeed() const
++{
++    if (!m_speedsInit)
++        initReadWriteSpeeds();
++    return m_readSpeed;
++}
++
++Solid::OpticalDrive::MediumTypes OpticalDrive::supportedMedia() const
++{
++    const QStringList mediaTypes = m_device->prop("MediaCompatibility").toStringList();
++    Solid::OpticalDrive::MediumTypes supported;
++
++    QMap<Solid::OpticalDrive::MediumType, QString> map;
++    map[Solid::OpticalDrive::Cdr] = "optical_cd_r";
++    map[Solid::OpticalDrive::Cdrw] = "optical_cd_rw";
++    map[Solid::OpticalDrive::Dvd] = "optical_dvd";
++    map[Solid::OpticalDrive::Dvdr] = "optical_dvd_r";
++    map[Solid::OpticalDrive::Dvdrw] ="optical_dvd_rw";
++    map[Solid::OpticalDrive::Dvdram] ="optical_dvd_ram";
++    map[Solid::OpticalDrive::Dvdplusr] ="optical_dvd_plus_r";
++    map[Solid::OpticalDrive::Dvdplusrw] ="optical_dvd_plus_rw";
++    map[Solid::OpticalDrive::Dvdplusdl] ="optical_dvd_plus_r_dl";
++    map[Solid::OpticalDrive::Dvdplusdlrw] ="optical_dvd_plus_rw_dl";
++    map[Solid::OpticalDrive::Bd] ="optical_bd";
++    map[Solid::OpticalDrive::Bdr] ="optical_bd_r";
++    map[Solid::OpticalDrive::Bdre] ="optical_bd_re";
++    map[Solid::OpticalDrive::HdDvd] ="optical_hddvd";
++    map[Solid::OpticalDrive::HdDvdr] ="optical_hddvd_r";
++    map[Solid::OpticalDrive::HdDvdrw] ="optical_hddvd_rw";
++    // TODO add these to Solid
++    //map[Solid::OpticalDrive::Mo] ="optical_mo";
++    //map[Solid::OpticalDrive::Mr] ="optical_mrw";
++    //map[Solid::OpticalDrive::Mrw] ="optical_mrw_w";
++
++    Q_FOREACH ( const Solid::OpticalDrive::MediumType & type, map.keys() )
++    {
++        if ( mediaTypes.contains( map[type] ) )
++        {
++            supported |= type;
++        }
++    }
++
++    return supported;
++}
++
++void OpticalDrive::slotChanged()
++{
++    m_speedsInit = false; // reset the read/write speeds, changes eg. with an inserted media
++}
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldrive.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldrive.h
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldrive.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldrive.h	2012-06-27 21:52:42.093597220 +0200
+@@ -0,0 +1,81 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2OPTICALDRIVE_H
++#define UDISKS2OPTICALDRIVE_H
++
++#include <solid/ifaces/opticaldrive.h>
++#include "udisksstoragedrive.h"
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class OpticalDrive: public StorageDrive, virtual public Solid::Ifaces::OpticalDrive
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::OpticalDrive)
++
++public:
++    OpticalDrive(Device *device);
++    virtual ~OpticalDrive();
++
++Q_SIGNALS:
++    void ejectPressed(const QString &udi);
++    void ejectDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
++    void ejectRequested(const QString &udi);
++
++public:
++    virtual bool eject();
++    virtual QList<int> writeSpeeds() const;
++    virtual int writeSpeed() const;
++    virtual int readSpeed() const;
++    virtual Solid::OpticalDrive::MediumTypes supportedMedia() const;
++
++private Q_SLOTS:
++    void slotDBusReply(const QDBusMessage &reply);
++    void slotDBusError(const QDBusError &error);
++
++    void slotEjectRequested();
++    void slotEjectDone(int error, const QString &errorString);
++
++    void slotChanged();
++
++private:
++    void initReadWriteSpeeds() const;
++
++    bool m_ejectInProgress;
++
++    // read/write speeds
++    mutable int m_readSpeed;
++    mutable int m_writeSpeed;
++    mutable QList<int> m_writeSpeeds;
++    mutable bool m_speedsInit;
++};
++
++}
++}
++}
++
++#endif // UDISKS2OPTICALDRIVE_H
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstorageaccess.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstorageaccess.cpp
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstorageaccess.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstorageaccess.cpp	2012-06-27 21:52:42.093597220 +0200
+@@ -0,0 +1,360 @@
++/*
++    Copyright 2009 Pino Toscano <pino@kde.org>
++    Copyright 2009-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksstorageaccess.h"
++#include "udisks2.h"
++
++#include <QtCore/QProcess>
++#include <QtDBus/QtDBus>
++#include <QtGui/QApplication>
++#include <QtGui/QWidget>
++
++using namespace Solid::Backends::UDisks2;
++
++StorageAccess::StorageAccess(Device *device)
++    : DeviceInterface(device), m_setupInProgress(false), m_teardownInProgress(false), m_passphraseRequested(false)
++{
++    connect(device, SIGNAL(changed()), this, SLOT(checkAccessibility()));
++    updateCache();
++
++    // Delay connecting to DBus signals to avoid the related time penalty
++    // in hot paths such as predicate matching
++    QTimer::singleShot(0, this, SLOT(connectDBusSignals()));
++}
++
++StorageAccess::~StorageAccess()
++{
++}
++
++void StorageAccess::connectDBusSignals()
++{
++    m_device->registerAction("setup", this,
++                             SLOT(slotSetupRequested()),
++                             SLOT(slotSetupDone(int, const QString&)));
++
++    m_device->registerAction("teardown", this,
++                             SLOT(slotTeardownRequested()),
++                             SLOT(slotTeardownDone(int, const QString&)));
++}
++
++bool StorageAccess::isLuksDevice() const
++{
++    return m_device->isEncryptedContainer(); // encrypted device
++}
++
++bool StorageAccess::isAccessible() const
++{
++    if (isLuksDevice()) { // check if the cleartext slave is mounted
++        if (m_clearTextPath.isEmpty() || m_clearTextPath == "/")
++            return false;
++        Device holderDevice(m_clearTextPath);
++        return holderDevice.isMounted();
++    }
++
++    return m_device->isMounted();
++}
++
++QString StorageAccess::filePath() const
++{
++    if (!isAccessible())
++        return QString();
++
++    QByteArrayList mntPoints;
++
++    if (isLuksDevice()) {  // encrypted (and unlocked) device
++        if (m_clearTextPath.isEmpty() || m_clearTextPath == "/")
++            return QString();
++        Device holderDevice(m_clearTextPath);
++        mntPoints = qdbus_cast<QByteArrayList>(holderDevice.prop("MountPoints"));
++        if (!mntPoints.isEmpty())
++            return QFile::decodeName(mntPoints.first()); // FIXME Solid doesn't support multiple mount points
++        else
++            return QString();
++    }
++
++    mntPoints = qdbus_cast<QByteArrayList>(m_device->prop("MountPoints"));
++
++    if (!mntPoints.isEmpty())
++        return QFile::decodeName(mntPoints.first()); // FIXME Solid doesn't support multiple mount points
++    else
++        return QString();
++}
++
++bool StorageAccess::isIgnored() const
++{
++    return m_device->prop("HintIgnore").toBool(); // FIXME tune
++}
++
++bool StorageAccess::setup()
++{
++    if ( m_teardownInProgress || m_setupInProgress )
++        return false;
++    m_setupInProgress = true;
++    m_device->broadcastActionRequested("setup");
++
++    if (m_device->isEncryptedContainer())
++        return requestPassphrase();
++    else
++        return mount();
++}
++
++bool StorageAccess::teardown()
++{
++    if ( m_teardownInProgress || m_setupInProgress )
++        return false;
++    m_teardownInProgress = true;
++    m_device->broadcastActionRequested("teardown");
++
++    return unmount();
++}
++
++void StorageAccess::updateCache()
++{
++    m_isAccessible = isAccessible();
++}
++
++void StorageAccess::checkAccessibility()
++{
++    const bool old_isAccessible = m_isAccessible;
++    updateCache();
++
++    if (old_isAccessible != m_isAccessible) {
++        Q_EMIT accessibilityChanged(m_isAccessible, isLuksDevice() ? m_clearTextPath : m_device->udi());
++    }
++}
++
++void StorageAccess::slotDBusReply( const QDBusMessage & reply )
++{
++    if (m_setupInProgress)
++    {
++        if (isLuksDevice() && !isAccessible()) { // unlocked device, now mount it
++            if (reply.type() == QDBusMessage::ReplyMessage)  // we've got a response from Unlock
++                m_clearTextPath = reply.arguments().value(0).value<QDBusObjectPath>().path();
++            mount();
++        }
++        else // Don't broadcast setupDone unless the setup is really done. (Fix kde#271156)
++        {
++            m_setupInProgress = false;
++            m_device->broadcastActionDone("setup");
++
++            checkAccessibility();
++        }
++    }
++    else if (m_teardownInProgress)  // FIXME
++    {
++        if (isLuksDevice() && !m_clearTextPath.isEmpty() && m_clearTextPath != "/") // unlocked device, lock it
++        {
++            callCryptoTeardown();
++        }
++        else if (!m_clearTextPath.isEmpty() && m_clearTextPath != "/") {
++            callCryptoTeardown(true); // Lock crypted parent
++        }
++        else
++        {
++            // try to "eject" (aka safely remove) from the (parent) drive, e.g. SD card from a reader
++            QString drivePath = m_device->prop("Drive").value<QDBusObjectPath>().path();
++            if (!drivePath.isEmpty() || drivePath != "/")
++            {
++                Device drive(drivePath);
++                if (drive.prop("Ejectable").toBool() && !m_device->isOpticalDisc()) // optical drives have their Eject method
++                {
++                    QDBusConnection c = QDBusConnection::systemBus();
++                    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, drivePath, UD2_DBUS_INTERFACE_DRIVE, "Eject");
++                    msg << QVariantMap();   // options, unused now
++                    c.call(msg, QDBus::NoBlock);
++                }
++            }
++
++            m_teardownInProgress = false;
++            m_device->broadcastActionDone("teardown");
++
++            checkAccessibility();
++        }
++    }
++}
++
++void StorageAccess::slotDBusError( const QDBusError & error )
++{
++    if (m_setupInProgress)
++    {
++        m_setupInProgress = false;
++        m_device->broadcastActionDone("setup", m_device->errorToSolidError(error.name()),
++                                      m_device->errorToString(error.name()) + ": " +error.message());
++
++        checkAccessibility();
++    }
++    else if (m_teardownInProgress)
++    {
++        m_teardownInProgress = false;
++        m_clearTextPath.clear();
++        m_device->broadcastActionDone("teardown", m_device->errorToSolidError(error.name()),
++                                      m_device->errorToString(error.name()) + ": " + error.message());
++        checkAccessibility();
++    }
++}
++
++void StorageAccess::slotSetupRequested()
++{
++    m_setupInProgress = true;
++    //qDebug() << "SETUP REQUESTED:" << m_device->udi();
++    Q_EMIT setupRequested(m_device->udi());
++}
++
++void StorageAccess::slotSetupDone(int error, const QString &errorString)
++{
++    m_setupInProgress = false;
++    //qDebug() << "SETUP DONE:" << m_device->udi();
++    Q_EMIT setupDone(static_cast<Solid::ErrorType>(error), errorString, m_device->udi());
++
++    checkAccessibility();
++}
++
++void StorageAccess::slotTeardownRequested()
++{
++    m_teardownInProgress = true;
++    Q_EMIT teardownRequested(m_device->udi());
++}
++
++void StorageAccess::slotTeardownDone(int error, const QString &errorString)
++{
++    m_teardownInProgress = false;
++    m_clearTextPath.clear();
++    Q_EMIT teardownDone(static_cast<Solid::ErrorType>(error), errorString, m_device->udi());
++
++    checkAccessibility();
++}
++
++bool StorageAccess::mount()
++{
++    QString path = m_device->udi();
++
++    if (isLuksDevice()) { // mount options for the cleartext volume
++        path = m_clearTextPath;
++    }
++
++    QDBusConnection c = QDBusConnection::systemBus();
++    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, UD2_DBUS_INTERFACE_FILESYSTEM, "Mount");
++    QVariantMap options;
++
++    if (m_device->prop("IdType").toString() == "vfat")
++        options.insert("options", "flush");
++
++    msg << options;
++
++    return c.callWithCallback(msg, this,
++                              SLOT(slotDBusReply(const QDBusMessage &)),
++                              SLOT(slotDBusError(const QDBusError &)));
++}
++
++bool StorageAccess::unmount()
++{
++    QString path = m_device->udi();
++
++    if (isLuksDevice()) { // unmount options for the cleartext volume
++        path = m_clearTextPath;
++    }
++
++    QDBusConnection c = QDBusConnection::systemBus();
++    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, UD2_DBUS_INTERFACE_FILESYSTEM, "Unmount");
++
++    msg << QVariantMap();   // options, unused now
++
++    return c.callWithCallback(msg, this,
++                              SLOT(slotDBusReply(const QDBusMessage &)),
++                              SLOT(slotDBusError(const QDBusError &)),
++                              s_unmountTimeout);
++}
++
++QString StorageAccess::generateReturnObjectPath()
++{
++    static int number = 1;
++
++    return "/org/kde/solid/UDisks2StorageAccess_"+QString::number(number++);
++}
++
++bool StorageAccess::requestPassphrase()
++{
++    QString udi = m_device->udi();
++    QString returnService = QDBusConnection::sessionBus().baseService();
++    m_lastReturnObject = generateReturnObjectPath();
++
++    QDBusConnection::sessionBus().registerObject(m_lastReturnObject, this, QDBusConnection::ExportScriptableSlots);
++
++    QWidget *activeWindow = QApplication::activeWindow();
++    uint wId = 0;
++    if (activeWindow!=0)
++        wId = (uint)activeWindow->winId();
++
++    QString appId = QCoreApplication::applicationName();
++
++    QDBusInterface soliduiserver("org.kde.kded5", "/modules/soliduiserver", "org.kde.SolidUiServer");
++    QDBusReply<void> reply = soliduiserver.call("showPassphraseDialog", udi, returnService,
++                                                m_lastReturnObject, wId, appId);
++    m_passphraseRequested = reply.isValid();
++    if (!m_passphraseRequested)
++        qWarning() << "Failed to call the SolidUiServer, D-Bus said:" << reply.error();
++
++    return m_passphraseRequested;
++}
++
++void StorageAccess::passphraseReply(const QString & passphrase)
++{
++    if (m_passphraseRequested)
++    {
++        QDBusConnection::sessionBus().unregisterObject(m_lastReturnObject);
++        m_passphraseRequested = false;
++        if (!passphrase.isEmpty())
++            callCryptoSetup(passphrase);
++        else
++        {
++            m_setupInProgress = false;
++            m_device->broadcastActionDone("setup");
++        }
++    }
++}
++
++void StorageAccess::callCryptoSetup(const QString & passphrase)
++{
++    QDBusConnection c = QDBusConnection::systemBus();
++    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_device->udi(), UD2_DBUS_INTERFACE_ENCRYPTED, "Unlock");
++
++    msg << passphrase;
++    msg << QVariantMap();   // options, unused now
++
++    c.callWithCallback(msg, this,
++                       SLOT(slotDBusReply(const QDBusMessage &)),
++                       SLOT(slotDBusError(const QDBusError &)));
++}
++
++bool StorageAccess::callCryptoTeardown(bool actOnParent)
++{
++    QDBusConnection c = QDBusConnection::systemBus();
++    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE,
++                                                      actOnParent ? (m_device->prop("CryptoBackingDevice").value<QDBusObjectPath>().path()) : m_device->udi(),
++                                                      UD2_DBUS_INTERFACE_ENCRYPTED, "Lock");
++    msg << QVariantMap();   // options, unused now
++
++    m_clearTextPath.clear();
++
++    return c.callWithCallback(msg, this,
++                              SLOT(slotDBusReply(const QDBusMessage &)),
++                              SLOT(slotDBusError(const QDBusError &)));
++}
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstorageaccess.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstorageaccess.h
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstorageaccess.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstorageaccess.h	2012-06-27 21:52:42.094597220 +0200
+@@ -0,0 +1,104 @@
++/*
++    Copyright 2009 Pino Toscano <pino@kde.org>
++    Copyright 2009-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2STORAGEACCESS_H
++#define UDISKS2STORAGEACCESS_H
++
++#include <solid/ifaces/storageaccess.h>
++#include "udisksdeviceinterface.h"
++
++#include <QtDBus/QDBusMessage>
++#include <QtDBus/QDBusError>
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++class StorageAccess : public DeviceInterface, virtual public Solid::Ifaces::StorageAccess
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::StorageAccess)
++
++public:
++    StorageAccess(Device *device);
++    virtual ~StorageAccess();
++
++    virtual bool isAccessible() const;
++    virtual QString filePath() const;
++    virtual bool isIgnored() const;
++    virtual bool setup();
++    virtual bool teardown();
++
++Q_SIGNALS:
++    void accessibilityChanged(bool accessible, const QString &udi);
++    void setupDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
++    void teardownDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
++    void setupRequested(const QString &udi);
++    void teardownRequested(const QString &udi);
++
++public Q_SLOTS:
++    Q_SCRIPTABLE Q_NOREPLY void passphraseReply(const QString & passphrase);
++
++private Q_SLOTS:
++    void slotDBusReply(const QDBusMessage & reply);
++    void slotDBusError(const QDBusError & error);
++
++    void connectDBusSignals();
++
++    void slotSetupRequested();
++    void slotSetupDone(int error, const QString &errorString);
++    void slotTeardownRequested();
++    void slotTeardownDone(int error, const QString &errorString);
++
++    void checkAccessibility();
++
++private:
++    /// @return true if this device is luks and unlocked
++    bool isLuksDevice() const;
++
++    void updateCache();
++
++    bool mount();
++    bool unmount();
++
++    bool requestPassphrase();
++    void callCryptoSetup( const QString & passphrase );
++    bool callCryptoTeardown( bool actOnParent=false );
++
++    QString generateReturnObjectPath();
++
++private:
++    bool m_isAccessible;
++    bool m_setupInProgress;
++    bool m_teardownInProgress;
++    bool m_passphraseRequested;
++    QString m_lastReturnObject;
++    QString m_clearTextPath;  // path to the unlocked cleartext device
++
++    static const int s_unmountTimeout = 0x7fffffff;
++};
++}
++}
++}
++
++#endif // UDISKS2STORAGEACCESS_H
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragedrive.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragedrive.cpp
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragedrive.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragedrive.cpp	2012-06-27 21:52:42.094597220 +0200
+@@ -0,0 +1,147 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksstoragedrive.h"
++
++#include "../shared/udevqtclient.h"
++
++#include <QtCore/QDebug>
++#include <QtCore/QFile>
++
++using namespace Solid::Backends::UDisks2;
++
++StorageDrive::StorageDrive(Device *dev)
++    : Block(dev)
++{
++    UdevQt::Client client(this);
++    m_udevDevice = client.deviceByDeviceFile(device());
++    m_udevDevice.deviceProperties();
++}
++
++StorageDrive::~StorageDrive()
++{
++}
++
++qulonglong StorageDrive::size() const
++{
++    return m_device->prop("Size").toULongLong();
++}
++
++bool StorageDrive::isHotpluggable() const
++{
++    const Solid::StorageDrive::Bus _bus = bus();
++    return _bus == Solid::StorageDrive::Usb || _bus == Solid::StorageDrive::Ieee1394;
++}
++
++bool StorageDrive::isRemovable() const
++{
++    return m_device->prop("MediaRemovable").toBool() || m_device->prop("Removable").toBool();
++}
++
++Solid::StorageDrive::DriveType StorageDrive::driveType() const
++{
++    const QStringList mediaTypes = m_device->prop("MediaCompatibility").toStringList();
++
++    if ( m_device->isOpticalDrive() ) // optical disks
++    {
++        return Solid::StorageDrive::CdromDrive;
++    }
++    else if ( mediaTypes.contains( "floppy" ) )
++    {
++        return Solid::StorageDrive::Floppy;
++    }
++#if 0 // TODO add to Solid
++    else if ( mediaTypes.contains( "floppy_jaz" ) )
++    {
++        return Solid::StorageDrive::Jaz;
++    }
++    else if ( mediaTypes.contains( "floppy_zip" ) )
++    {
++        return Solid::StorageDrive::Zip;
++    }
++    else if ( mediaTypes.contains( "flash" ) )
++    {
++        return Solid::StorageDrive::Flash;
++    }
++#endif
++    else if ( mediaTypes.contains( "flash_cf" ) )
++    {
++        return Solid::StorageDrive::CompactFlash;
++    }
++    else if ( mediaTypes.contains( "flash_ms" ) )
++    {
++        return Solid::StorageDrive::MemoryStick;
++    }
++    else if ( mediaTypes.contains( "flash_sm" ) )
++    {
++        return Solid::StorageDrive::SmartMedia;
++    }
++    else if ( mediaTypes.contains( "flash_sd" ) || mediaTypes.contains( "flash_sdhc" )
++              || mediaTypes.contains( "flash_mmc" ) || mediaTypes.contains("flash_sdxc") )
++    {
++        return Solid::StorageDrive::SdMmc;
++    }
++    // FIXME: udisks2 doesn't know about xD cards
++    else
++    {
++        return Solid::StorageDrive::HardDisk;
++    }
++}
++
++Solid::StorageDrive::Bus StorageDrive::bus() const
++{
++    const QString bus = m_device->prop("ConnectionBus").toString();
++    const QString udevBus = m_udevDevice.deviceProperty("ID_BUS").toString();
++
++    //qDebug() << "bus:" << bus << "udev bus:" << udevBus;
++
++    if (udevBus == "ata")
++    {
++        if (m_udevDevice.deviceProperty("ID_ATA_SATA").toInt() == 1) // serial ATA
++            return Solid::StorageDrive::Sata;
++        else  // parallel (classical) ATA
++            return Solid::StorageDrive::Ide;
++    }
++    else if (bus == "usb")
++    {
++        return Solid::StorageDrive::Usb;
++    }
++    else if (bus == "ieee1394")
++    {
++        return Solid::StorageDrive::Ieee1394;
++    }
++    else if (udevBus == "scsi")
++    {
++        return Solid::StorageDrive::Scsi;
++    }
++#if 0  // TODO add these to Solid
++    else if ( bus == "sdio" )
++    {
++        return Solid::StorageDrive::SDIO;
++    }
++    else if ( bus == "virtual" )
++    {
++        return Solid::StorageDrive::Virtual;
++    }
++#endif
++    else
++        return Solid::StorageDrive::Platform;
++}
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragedrive.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragedrive.h
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragedrive.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragedrive.h	2012-06-27 21:52:42.095597221 +0200
+@@ -0,0 +1,61 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2STORAGEDRIVE_H
++#define UDISKS2STORAGEDRIVE_H
++
++#include <ifaces/storagedrive.h>
++
++#include "../shared/udevqtdevice.h"
++
++#include "udisksblock.h"
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class StorageDrive: public Block, virtual public Solid::Ifaces::StorageDrive
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::StorageDrive)
++
++public:
++    StorageDrive(Device *dev);
++    virtual ~StorageDrive();
++
++    virtual qulonglong size() const;
++    virtual bool isHotpluggable() const;
++    virtual bool isRemovable() const;
++    virtual Solid::StorageDrive::DriveType driveType() const;
++    virtual Solid::StorageDrive::Bus bus() const;
++
++private:
++    UdevQt::Device m_udevDevice;
++};
++
++}
++}
++}
++
++#endif // UDISK2SSTORAGEDRIVE_H
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragevolume.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragevolume.cpp
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragevolume.cpp	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragevolume.cpp	2012-06-27 21:52:42.095597221 +0200
+@@ -0,0 +1,105 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include "udisksstoragevolume.h"
++#include "udisks2.h"
++
++using namespace Solid::Backends::UDisks2;
++
++StorageVolume::StorageVolume(Device *device)
++    : Block(device)
++{
++}
++
++StorageVolume::~StorageVolume()
++{
++}
++
++QString StorageVolume::encryptedContainerUdi() const
++{
++    const QString path = m_device->prop("CryptoBackingDevice").value<QDBusObjectPath>().path();
++    if ( path.isEmpty() || path == "/")
++        return QString();
++    else
++        return path;
++}
++
++qulonglong StorageVolume::size() const
++{
++    return m_device->prop("Size").toULongLong();
++}
++
++QString StorageVolume::uuid() const
++{
++    return m_device->prop("IdUUID").toString();
++}
++
++QString StorageVolume::label() const
++{
++    QString label = m_device->prop("HintName").toString();
++    if (label.isEmpty())
++        label = m_device->prop("IdLabel").toString();
++    if (label.isEmpty())
++        label = m_device->prop("Name").toString();
++    return label;
++}
++
++QString StorageVolume::fsType() const
++{
++    return m_device->prop("IdType").toString();
++}
++
++Solid::StorageVolume::UsageType StorageVolume::usage() const
++{
++    const QString usage = m_device->prop("IdUsage").toString();
++
++    if (m_device->hasInterface(UD2_DBUS_INTERFACE_FILESYSTEM))
++    {
++        return Solid::StorageVolume::FileSystem;
++    }
++    else if (m_device->isPartitionTable())
++    {
++        return Solid::StorageVolume::PartitionTable;
++    }
++    else if (usage == "raid")
++    {
++        return Solid::StorageVolume::Raid;
++    }
++    else if (m_device->isEncryptedContainer())
++    {
++        return Solid::StorageVolume::Encrypted;
++    }
++    else if (usage == "unused" || usage.isEmpty())
++    {
++        return Solid::StorageVolume::Unused;
++    }
++    else
++    {
++        return Solid::StorageVolume::Other;
++    }
++}
++
++bool StorageVolume::isIgnored() const
++{
++    const Solid::StorageVolume::UsageType usg = usage();
++    return m_device->prop("HintIgnore").toBool() || m_device->isSwap() ||
++            ((usg == Solid::StorageVolume::Unused || usg == Solid::StorageVolume::Other || usg == Solid::StorageVolume::PartitionTable) && !m_device->isOpticalDisc());
++}
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragevolume.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragevolume.h
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragevolume.h	1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragevolume.h	2012-06-27 21:52:42.096597222 +0200
+@@ -0,0 +1,57 @@
++/*
++    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) version 3, or any
++    later version accepted by the membership of KDE e.V. (or its
++    successor approved by the membership of KDE e.V.), which shall
++    act as a proxy defined in Section 6 of version 3 of the license.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef UDISKS2STORAGEVOLUME_H
++#define UDISKS2STORAGEVOLUME_H
++
++#include <ifaces/storagevolume.h>
++#include "udisksblock.h"
++
++
++namespace Solid
++{
++namespace Backends
++{
++namespace UDisks2
++{
++
++class StorageVolume: public Block, virtual public Solid::Ifaces::StorageVolume
++{
++    Q_OBJECT
++    Q_INTERFACES(Solid::Ifaces::StorageVolume)
++
++public:
++    StorageVolume(Device *device);
++    virtual ~StorageVolume();
++
++    virtual QString encryptedContainerUdi() const;
++    virtual qulonglong size() const;
++    virtual QString uuid() const;
++    virtual QString label() const;
++    virtual QString fsType() const;
++    virtual Solid::StorageVolume::UsageType usage() const;
++    virtual bool isIgnored() const;
++};
++
++}
++}
++}
++
++#endif // UDISKS2STORAGEVOLUME_H
+diff -ruN kdelibs-4.8.95.orig/solid/solid/managerbase.cpp kdelibs-4.8.95/solid/solid/managerbase.cpp
+--- kdelibs-4.8.95.orig/solid/solid/managerbase.cpp	2012-05-23 01:45:29.000000000 +0200
++++ kdelibs-4.8.95/solid/solid/managerbase.cpp	2012-06-27 21:51:57.030594701 +0200
+@@ -21,7 +21,7 @@
+ #include "managerbase_p.h"
+ 
+ #include <stdlib.h>
+-#if !defined (Q_WS_WIN) && !defined (Q_OS_MAC)
++#if !defined (Q_OS_WIN) && !defined (Q_OS_MAC)
+ #include <config-solid.h>
+ #endif
+ 
+@@ -30,8 +30,7 @@
+ #if defined (Q_OS_MAC)
+ #include "backends/iokit/iokitmanager.h"
+ #elif defined (Q_OS_UNIX)
+-#include "backends/hal/halmanager.h"
+-#include "backends/udisks/udisksmanager.h"
++#include "backends/udisks2/udisksmanager.h"
+ #include "backends/upower/upowermanager.h"
+ 
+ #if defined (HUPNP_FOUND)
+@@ -44,7 +43,7 @@
+ 
+ #include "backends/fstab/fstabmanager.h"
+ 
+-#elif defined (Q_WS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
++#elif defined (Q_OS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
+ #include "backends/wmi/wmimanager.h"
+ #endif
+ 
+@@ -68,25 +67,16 @@
+ #        if defined(Q_OS_MAC)
+             m_backends << new Solid::Backends::IOKit::IOKitManager(0);
+ 
+-#        elif defined(Q_WS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
++#        elif defined(Q_OS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
+             m_backends << new Solid::Backends::Wmi::WmiManager(0);
+ 
+-#        elif defined(Q_OS_UNIX) && !defined(Q_OS_LINUX)
+-            m_backends << new Solid::Backends::Hal::HalManager(0);
+-
+ #        elif defined(Q_OS_LINUX)
+-            bool solidHalLegacyEnabled
+-                = QString::fromLocal8Bit(qgetenv("SOLID_HAL_LEGACY")).toInt()==1;
+-            if (solidHalLegacyEnabled) {
+-                m_backends << new Solid::Backends::Hal::HalManager(0);
+-            } else {
+ #               if defined(UDEV_FOUND)
+                     m_backends << new Solid::Backends::UDev::UDevManager(0);
+ #               endif
+-                m_backends << new Solid::Backends::UDisks::UDisksManager(0)
++                m_backends << new Solid::Backends::UDisks2::Manager(0)
+                            << new Solid::Backends::UPower::UPowerManager(0)
+                            << new Solid::Backends::Fstab::FstabManager(0);
+-            }
+ #        endif
+ 
+ #        if defined (HUPNP_FOUND)
+diff -ruN kdelibs-4.8.95.orig/solid/tests/CMakeLists.txt kdelibs-4.8.95/solid/tests/CMakeLists.txt
+--- kdelibs-4.8.95.orig/solid/tests/CMakeLists.txt	2012-05-23 01:45:29.000000000 +0200
++++ kdelibs-4.8.95/solid/tests/CMakeLists.txt	2012-06-27 21:50:56.880591338 +0200
+@@ -16,20 +16,6 @@
+ add_definitions(-DTEST_DATA="\\"${CMAKE_CURRENT_SOURCE_DIR}/../solid/backends/fakehw/fakecomputer.xml\\"")
+ 
+ 
+-########### halbasictest ###############
+-
+-if(NOT WIN32 AND NOT APPLE)
+-set(halbasictest_SRCS halbasictest.cpp )
+-
+-kde4_add_executable(halbasictest ${halbasictest_SRCS})
+-
+-if(WIN32)
+-  set_target_properties(halbasictest PROPERTIES COMPILE_FLAGS -DSOLID_EXPORT=)
+-endif(WIN32)
+-
+-target_link_libraries(halbasictest solid_static ${KDEWIN_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTTEST_LIBRARY} )
+-endif(NOT WIN32 AND NOT APPLE)
+-
+ ########### solidhwtest ###############
+ 
+ set(solidhwtest_SRCS 

diff --git a/kde-base/kdelibs/kdelibs-4.8.95.ebuild b/kde-base/kdelibs/kdelibs-4.8.95.ebuild
index 2503764..0ea0a98 100644
--- a/kde-base/kdelibs/kdelibs-4.8.95.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.8.95.ebuild
@@ -129,7 +129,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.8.2-calculator_key.patch"
 	"${FILESDIR}/${PN}-4.8.4-bytecode.patch"
-	"${FILESDIR}/${PN}-4.8.90-udisks2.patch"
+	"${FILESDIR}/${PN}-4.8.95-udisks2.patch"
 )
 
 pkg_pretend() {



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-06-27 22:05 Andreas Hüttel
  0 siblings, 0 replies; 38+ messages in thread
From: Andreas Hüttel @ 2012-06-27 22:05 UTC (permalink / raw
  To: gentoo-commits

commit:     711fea634b5216de7258cc8bf5556be68febe779
Author:     Andreas K. Huettel (dilfridge) <mail <AT> akhuettel <DOT> de>
AuthorDate: Wed Jun 27 22:06:05 2012 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Jun 27 22:06:05 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=711fea63

[kde-base/kdelibs] Fix includes for udisks2

(Portage version: 2.2.0_alpha113/git/Linux x86_64, RepoMan options: --force, unsigned Manifest commit)

---
 .../files/kdelibs-4.8.95-udisks2-includes.patch    |   24 ++++++++++++++++++++
 kde-base/kdelibs/kdelibs-4.8.95.ebuild             |    1 +
 2 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.95-udisks2-includes.patch b/kde-base/kdelibs/files/kdelibs-4.8.95-udisks2-includes.patch
new file mode 100644
index 0000000..4b11763
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.8.95-udisks2-includes.patch
@@ -0,0 +1,24 @@
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldisc.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldisc.h
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldisc.h	2012-06-28 00:02:46.022033586 +0200
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldisc.h	2012-06-28 00:03:53.791036528 +0200
+@@ -24,7 +24,7 @@
+ 
+ #include <solid/ifaces/opticaldisc.h>
+ 
+-#include "../shared/udevqtdevice.h"
++#include "../shared/udevqt.h"
+ 
+ #include "udisksstoragevolume.h"
+ #include "udisksdevice.h"
+diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragedrive.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragedrive.h
+--- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragedrive.h	2012-06-28 00:02:46.024033586 +0200
++++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragedrive.h	2012-06-28 00:03:39.134040443 +0200
+@@ -24,7 +24,7 @@
+ 
+ #include <ifaces/storagedrive.h>
+ 
+-#include "../shared/udevqtdevice.h"
++#include "../shared/udevqt.h"
+ 
+ #include "udisksblock.h"
+ 

diff --git a/kde-base/kdelibs/kdelibs-4.8.95.ebuild b/kde-base/kdelibs/kdelibs-4.8.95.ebuild
index 0ea0a98..eef4d86 100644
--- a/kde-base/kdelibs/kdelibs-4.8.95.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.8.95.ebuild
@@ -130,6 +130,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.8.2-calculator_key.patch"
 	"${FILESDIR}/${PN}-4.8.4-bytecode.patch"
 	"${FILESDIR}/${PN}-4.8.95-udisks2.patch"
+	"${FILESDIR}/${PN}-4.8.95-udisks2-includes.patch"
 )
 
 pkg_pretend() {



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-07-06 20:54 Andreas Hüttel
  0 siblings, 0 replies; 38+ messages in thread
From: Andreas Hüttel @ 2012-07-06 20:54 UTC (permalink / raw
  To: gentoo-commits

commit:     32f088bc94e656bccb0f73f365fc29f366c90cfb
Author:     Andreas K. Huettel (dilfridge) <mail <AT> akhuettel <DOT> de>
AuthorDate: Thu Jul  5 19:45:49 2012 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Jul  6 20:55:22 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=32f088bc

[kde-base/kdelibs] Fix crash bug 424355

(Portage version: 2.2.0_alpha115/git/Linux x86_64, RepoMan options: --force, unsigned Manifest commit)

---
 .../kdelibs/files/kdelibs-4.8.4-kiopointer.patch   |   21 ++++++++++++++++++++
 kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild        |    1 +
 2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.4-kiopointer.patch b/kde-base/kdelibs/files/kdelibs-4.8.4-kiopointer.patch
new file mode 100644
index 0000000..a01b221
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.8.4-kiopointer.patch
@@ -0,0 +1,21 @@
+--- a/kio/kio/accessmanager.cpp
++++ b/kio/kio/accessmanager.cpp
+@@ -37,7 +37,7 @@
+ #include <klocalizedstring.h>
+ 
+ #include <QtCore/QUrl>
+-#include <QtCore/QWeakPointer>
++#include <QtCore/QPointer>
+ #include <QtGui/QWidget>
+ #include <QtDBus/QDBusInterface>
+ #include <QtDBus/QDBusConnection>
+@@ -87,7 +87,7 @@
+     bool emitReadyReadOnMetaDataChange;
+     KIO::MetaData requestMetaData;
+     KIO::MetaData sessionMetaData;
+-    QWidget* window;
++    QPointer<QWidget> window;
+ };
+ 
+ namespace Integration {
+

diff --git a/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild b/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
index 89d0593..51d0d80 100644
--- a/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.8.49.9999.ebuild
@@ -129,6 +129,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.8.2-calculator_key.patch"
 	"${FILESDIR}/${PN}-4.8.4-bytecode.patch"
+	"${FILESDIR}/${PN}-4.8.4-kiopointer.patch"
 )
 
 pkg_pretend() {



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-07-14 19:43 Johannes Huber
  0 siblings, 0 replies; 38+ messages in thread
From: Johannes Huber @ 2012-07-14 19:43 UTC (permalink / raw
  To: gentoo-commits

commit:     66ce4f06759f48049c7cea812e0609ce71a3dcde
Author:     Johannes Huber <johu <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 14 19:42:32 2012 +0000
Commit:     Johannes Huber <johu <AT> gentoo <DOT> org>
CommitDate: Sat Jul 14 19:42:48 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=66ce4f06

[kde-base/kdelibs] Move huge patch to devspace, makes repoman smile again.

(Portage version: 2.2.0_alpha118/git/Linux x86_64, unsigned Manifest commit)

---
 .../kdelibs/files/kdelibs-4.8.95-udisks2.patch     | 4148 --------------------
 kde-base/kdelibs/kdelibs-4.8.95.ebuild             |    3 +-
 kde-base/kdelibs/kdelibs-4.8.97.ebuild             |    3 +-
 kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild        |    3 +-
 kde-base/kdelibs/kdelibs-9999.ebuild               |    3 +-
 5 files changed, 8 insertions(+), 4152 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.95-udisks2.patch b/kde-base/kdelibs/files/kdelibs-4.8.95-udisks2.patch
deleted file mode 100644
index 9337e59..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.8.95-udisks2.patch
+++ /dev/null
@@ -1,4148 +0,0 @@
-http://pkgs.fedoraproject.org/gitweb/?p=kdelibs.git;a=tree;h=b54aa3a731733709ef376bb8851e936641bc4517;hb=b54aa3a731733709ef376bb8851e936641bc4517
-re-done udisks2 patch from Wed, 27 Jun 2012 16:11:24 +0000
-
-diff -ruN kdelibs-4.8.95.orig/solid/solid/CMakeLists.txt kdelibs-4.8.95/solid/solid/CMakeLists.txt
---- kdelibs-4.8.95.orig/solid/solid/CMakeLists.txt	2012-05-23 01:45:27.000000000 +0200
-+++ kdelibs-4.8.95/solid/solid/CMakeLists.txt	2012-06-27 21:51:57.030594701 +0200
-@@ -1,6 +1,7 @@
- set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
- add_subdirectory( ifaces )
- include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
-+include_directories( ${QT_QTDBUS_INCLUDE_DIR} )
- 
- if(WIN32)
-    include_directories( ${KDEWIN_INCLUDES} )
-@@ -39,7 +40,6 @@
- 
- file(MAKE_DIRECTORY
-    ${CMAKE_CURRENT_BINARY_DIR}/backends/fakehw
--   ${CMAKE_CURRENT_BINARY_DIR}/backends/hal
-    ${CMAKE_CURRENT_BINARY_DIR}/backends/udev
-    ${CMAKE_CURRENT_BINARY_DIR}/backends/wmi
- )
-@@ -225,33 +225,6 @@
-    endif( UDEV_FOUND )
- 
- 
--   message(STATUS "Building Solid HAL backend." )
--   set(solid_LIB_SRCS ${solid_LIB_SRCS}
--   backends/hal/halacadapter.cpp
--   backends/hal/halaudiointerface.cpp
--   backends/hal/halbattery.cpp
--   backends/hal/halblock.cpp
--   backends/hal/halbutton.cpp
--   backends/hal/halcamera.cpp
--   backends/hal/halcdrom.cpp
--   backends/hal/haldeviceinterface.cpp
--   backends/hal/haldvbinterface.cpp
--   backends/hal/halfstabhandling.cpp
--   backends/hal/halgenericinterface.cpp
--   backends/hal/haldevice.cpp
--   backends/hal/halmanager.cpp
--   backends/hal/halnetworkinterface.cpp
--   backends/hal/halserialinterface.cpp
--   backends/hal/halopticaldisc.cpp
--   backends/hal/halportablemediaplayer.cpp
--   backends/hal/halprocessor.cpp
--   backends/hal/halstorageaccess.cpp
--   backends/hal/halstorage.cpp
--   backends/hal/halvideo.cpp
--   backends/hal/halvolume.cpp
--   backends/hal/halsmartcardreader.cpp
--   )
--
-    message(STATUS "Building Solid UPower backend." )
-    set(solid_LIB_SRCS ${solid_LIB_SRCS}
-    backends/upower/upowermanager.cpp
-@@ -264,18 +237,19 @@
- 
-    # FIXME: this should work on more Unix systems
-    if (CMAKE_SYSTEM_NAME MATCHES Linux)
--      message(STATUS "Building Solid UDisks backend." )
-+      message(STATUS "Building Solid UDisks2 backend." )
-       set(solid_LIB_SRCS ${solid_LIB_SRCS}
--      backends/udisks/udisksmanager.cpp
--      backends/udisks/udisksdevice.cpp
--      backends/udisks/udisksblock.cpp
--      backends/udisks/udisksstoragevolume.cpp
--      backends/udisks/udisksdeviceinterface.cpp
--      backends/udisks/udisksopticaldisc.cpp
--      backends/udisks/udisksopticaldrive.cpp
--      backends/udisks/udisksstoragedrive.cpp
--      backends/udisks/udisksstorageaccess.cpp
--      backends/udisks/udisksgenericinterface.cpp
-+      backends/udisks2/udisksmanager.cpp
-+      backends/udisks2/udisksdevice.cpp
-+      backends/udisks2/udisksblock.cpp
-+      backends/udisks2/udisksstoragevolume.cpp
-+      backends/udisks2/udisksdeviceinterface.cpp
-+      backends/udisks2/udisksopticaldisc.cpp
-+      backends/udisks2/udisksopticaldrive.cpp
-+      backends/udisks2/udisksstoragedrive.cpp
-+      backends/udisks2/udisksstorageaccess.cpp
-+      backends/udisks2/udisksgenericinterface.cpp
-+      backends/udisks2/dbus/manager.cpp
-       )
-    endif (CMAKE_SYSTEM_NAME MATCHES Linux)
- 
-diff -ruN kdelibs-4.8.95.orig/solid/solid/CMakeLists.txt.orig kdelibs-4.8.95/solid/solid/CMakeLists.txt.orig
---- kdelibs-4.8.95.orig/solid/solid/CMakeLists.txt.orig	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/CMakeLists.txt.orig	2012-06-27 21:50:56.879591338 +0200
-@@ -0,0 +1,463 @@
-+set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
-+add_subdirectory( ifaces )
-+include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
-+include_directories( ${QT_QTDBUS_INCLUDE_DIR} )
-+
-+if(WIN32)
-+   include_directories( ${KDEWIN_INCLUDES} )
-+endif(WIN32)
-+
-+configure_file(solid_export.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/solid_export.h)
-+
-+include (CheckCXXSourceCompiles)
-+
-+check_cxx_source_compiles("	#ifdef __SUNPRO_CC
-+					#define __asm__ asm
-+				#endif
-+				int main() { __asm__(\"pxor %mm0, %mm0\") ; }" HAVE_X86_MMX)
-+check_cxx_source_compiles("     #ifdef __SUNPRO_CC
-+                                        #define __asm__ asm
-+                                #endif
-+				int main() { __asm__(\"xorps %xmm0, %xmm0\"); }" HAVE_X86_SSE)
-+check_cxx_source_compiles("     #ifdef __SUNPRO_CC
-+                                        #define __asm__ asm
-+                                #endif
-+				int main() { __asm__(\"xorpd %xmm0, %xmm0\"); }" HAVE_X86_SSE2)
-+check_cxx_source_compiles("     #ifdef __SUNPRO_CC
-+                                        #define __asm__ asm
-+                                #endif
-+				int main() { __asm__(\"femms\"); }" HAVE_X86_3DNOW)
-+check_cxx_source_compiles("     #ifdef __SUNPRO_CC
-+                                        #define __asm__ asm
-+                                #endif
-+				int main() { __asm__(\"mtspr 256, %0; vand %%v0, %%v0, %%v0\" : : \"r\"(-1) ); }" HAVE_PPC_ALTIVEC)
-+
-+configure_file(config-processor.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-processor.h )
-+
-+
-+
-+########### next target ###############
-+
-+file(MAKE_DIRECTORY
-+   ${CMAKE_CURRENT_BINARY_DIR}/backends/fakehw
-+   ${CMAKE_CURRENT_BINARY_DIR}/backends/hal
-+   ${CMAKE_CURRENT_BINARY_DIR}/backends/udev
-+   ${CMAKE_CURRENT_BINARY_DIR}/backends/wmi
-+)
-+
-+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${KDE4_C_FLAGS}") # enable -fvisibility=hidden for C sources
-+
-+set(solid_LIB_SRCS
-+   solidnamespace.cpp
-+   managerbase.cpp
-+   device.cpp
-+   devicemanager.cpp
-+   deviceinterface.cpp
-+   genericinterface.cpp
-+   processor.cpp
-+   block.cpp
-+   storagedrive.cpp
-+   opticaldrive.cpp
-+   storagevolume.cpp
-+   opticaldisc.cpp
-+   storageaccess.cpp
-+   camera.cpp
-+   portablemediaplayer.cpp
-+   networkinterface.cpp
-+   networkshare.cpp
-+   serialinterface.cpp
-+   acadapter.cpp
-+   battery.cpp
-+   button.cpp
-+   audiointerface.cpp
-+   dvbinterface.cpp
-+   predicate.cpp
-+   predicateparse.cpp
-+   predicate_lexer.c
-+   predicate_parser.c
-+   powermanagement.cpp
-+   networking.cpp
-+   video.cpp
-+   smartcardreader.cpp
-+   internetgateway.cpp
-+   xdgbasedirs.cpp
-+
-+   ifaces/acadapter.cpp
-+   ifaces/audiointerface.cpp
-+   ifaces/battery.cpp
-+   ifaces/block.cpp
-+   ifaces/button.cpp
-+   ifaces/camera.cpp
-+   ifaces/opticaldrive.cpp
-+   ifaces/device.cpp
-+   ifaces/deviceinterface.cpp
-+   ifaces/devicemanager.cpp
-+   ifaces/dvbinterface.cpp
-+   ifaces/genericinterface.cpp
-+   ifaces/networkinterface.cpp
-+   ifaces/networkshare.cpp
-+   ifaces/serialinterface.cpp
-+   ifaces/opticaldisc.cpp
-+   ifaces/portablemediaplayer.cpp
-+   ifaces/processor.cpp
-+   ifaces/storagedrive.cpp
-+   ifaces/storagevolume.cpp
-+   ifaces/storageaccess.cpp
-+   ifaces/video.cpp
-+   ifaces/smartcardreader.cpp
-+   ifaces/internetgateway.cpp
-+
-+   backends/fakehw/fakeacadapter.cpp
-+   backends/fakehw/fakeaudiointerface.cpp
-+   backends/fakehw/fakebattery.cpp
-+   backends/fakehw/fakeblock.cpp
-+   backends/fakehw/fakebutton.cpp
-+   backends/fakehw/fakecamera.cpp
-+   backends/fakehw/fakecdrom.cpp
-+   backends/fakehw/fakedevice.cpp
-+   backends/fakehw/fakedeviceinterface.cpp
-+   backends/fakehw/fakedvbinterface.cpp
-+   backends/fakehw/fakegenericinterface.cpp
-+   backends/fakehw/fakemanager.cpp
-+   backends/fakehw/fakenetworkshare.cpp
-+   backends/fakehw/fakenetworkinterface.cpp
-+   backends/fakehw/fakeopticaldisc.cpp
-+   backends/fakehw/fakeportablemediaplayer.cpp
-+   backends/fakehw/fakeprocessor.cpp
-+   backends/fakehw/fakestorage.cpp
-+   backends/fakehw/fakestorageaccess.cpp
-+   backends/fakehw/fakevideo.cpp
-+   backends/fakehw/fakevolume.cpp
-+   backends/fakehw/fakesmartcardreader.cpp
-+
-+   backends/shared/rootdevice.cpp
-+   backends/shared/cpufeatures.cpp
-+)
-+
-+if(NOT APPLE)
-+  macro_optional_find_package( HUpnp )
-+
-+  if ( HUPNP_FOUND AND ((HUPNP_VERSION_MAJOR EQUAL 0 AND HUPNP_VERSION_MINOR EQUAL 9) OR (HUPNP_VERSION_MAJOR EQUAL 1)))
-+    include_directories( ${HUPNP_INCLUDE_DIR} )
-+    message(STATUS "Building Solid UPnP backend." )
-+    set(solid_LIB_SRCS ${solid_LIB_SRCS}
-+       backends/upnp/upnpdevice.cpp
-+       backends/upnp/upnpdevicemanager.cpp
-+       backends/upnp/upnpdeviceinterface.cpp
-+       backends/upnp/upnpmediaserver.cpp
-+       backends/upnp/upnpinternetgateway.cpp
-+       backends/upnp/upnpcontrolpoint.cpp
-+    )
-+  else ()
-+    set(HUPNP_FOUND false)
-+  endif ()
-+  macro_log_feature( HUPNP_FOUND "HUPnP" "UPnP support for Solid" "http://www.herqq.org" FALSE "" "Allows Solid to provide information about UPnP devices on the network" )
-+endif(NOT APPLE)
-+
-+if(NOT WIN32 AND NOT APPLE)
-+#   message(STATUS "Building Solid KUPnP backend." )
-+#   set(solid_LIB_SRCS ${solid_LIB_SRCS}
-+
-+#   backends/kupnp/cagibidbuscodec.cpp
-+#   backends/kupnp/cagibidevice.cpp
-+#   backends/kupnp/kupnpstorageaccess.cpp
-+#   backends/kupnp/kupnpdeviceinterface.cpp
-+#   backends/kupnp/mediaserver1.cpp
-+#   backends/kupnp/mediaserver2.cpp
-+#   backends/kupnp/mediaserver3.cpp
-+#   backends/kupnp/internetgatewaydevice1.cpp
-+#   backends/kupnp/kupnpdevice.cpp
-+#   backends/kupnp/kupnprootdevice.cpp
-+#   backends/kupnp/kupnpmanager.cpp
-+
-+#   )
-+
-+   macro_optional_find_package( UDev )
-+   macro_log_feature( UDEV_FOUND "UDev" "UDev support for Solid" "http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" FALSE "" "Allows Solid to use UDev to provide information about devices on Linux" )
-+   configure_file( config-solid.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-solid.h )
-+
-+
-+   if ( UDEV_FOUND )
-+      message(STATUS "Building Solid UDev backend." )
-+      set(solid_LIB_SRCS ${solid_LIB_SRCS}
-+      backends/udev/udevdevice.cpp
-+      backends/udev/udevmanager.cpp
-+      backends/udev/udevdeviceinterface.cpp
-+      backends/udev/udevgenericinterface.cpp
-+      backends/udev/cpuinfo.cpp
-+      backends/udev/udevprocessor.cpp
-+      backends/udev/udevcamera.cpp
-+      backends/udev/udevvideo.cpp
-+      backends/udev/udevaudiointerface.cpp
-+      backends/udev/udevnetworkinterface.cpp
-+      backends/udev/udevserialinterface.cpp
-+      backends/udev/udevaudiointerface_p.cpp
-+      backends/udev/udevportablemediaplayer.cpp
-+      backends/udev/udevdvbinterface.cpp
-+      backends/udev/udevblock.cpp
-+      backends/shared/udevqtclient.cpp
-+      backends/shared/udevqtdevice.cpp
-+      )
-+
-+      # check for media-player-info (runtime-only optional dependency)
-+      set(XDG_DATA_DIRS_ENV $ENV{XDG_DATA_DIRS})  # if(ENV{..}) does not work for me
-+      if(XDG_DATA_DIRS_ENV)
-+         find_path(MEDIAPLAYERINFO_PATH sony_psp.mpi
-+            PATHS ENV XDG_DATA_DIRS
-+            PATH_SUFFIXES "media-player-info" NO_DEFAULT_PATH
-+         )
-+      else(XDG_DATA_DIRS_ENV)
-+         set(XDG_DATA_DIRS "/usr/share")
-+         message(STATUS "Warning: environment variable XDG_DATA_DIRS not set, falling back to ${XDG_DATA_DIRS}")
-+         find_path(MEDIAPLAYERINFO_PATH sony_psp.mpi
-+            PATHS "${XDG_DATA_DIRS}"
-+            PATH_SUFFIXES "media-player-info" NO_DEFAULT_PATH
-+         )
-+      endif(XDG_DATA_DIRS_ENV)
-+
-+      macro_log_feature(MEDIAPLAYERINFO_PATH
-+         "media-player-info"
-+         "Enables identification and querying of portable media players"
-+         "http://www.freedesktop.org/wiki/Software/media-player-info"
-+         FALSE
-+         ""
-+         "Runtime-only dependency of the udev solid backend. Support for m-p-i is included even if not found during build"
-+      )
-+   endif( UDEV_FOUND )
-+
-+
-+   message(STATUS "Building Solid HAL backend." )
-+   set(solid_LIB_SRCS ${solid_LIB_SRCS}
-+   backends/hal/halacadapter.cpp
-+   backends/hal/halaudiointerface.cpp
-+   backends/hal/halbattery.cpp
-+   backends/hal/halblock.cpp
-+   backends/hal/halbutton.cpp
-+   backends/hal/halcamera.cpp
-+   backends/hal/halcdrom.cpp
-+   backends/hal/haldeviceinterface.cpp
-+   backends/hal/haldvbinterface.cpp
-+   backends/hal/halfstabhandling.cpp
-+   backends/hal/halgenericinterface.cpp
-+   backends/hal/haldevice.cpp
-+   backends/hal/halmanager.cpp
-+   backends/hal/halnetworkinterface.cpp
-+   backends/hal/halserialinterface.cpp
-+   backends/hal/halopticaldisc.cpp
-+   backends/hal/halportablemediaplayer.cpp
-+   backends/hal/halprocessor.cpp
-+   backends/hal/halstorageaccess.cpp
-+   backends/hal/halstorage.cpp
-+   backends/hal/halvideo.cpp
-+   backends/hal/halvolume.cpp
-+   backends/hal/halsmartcardreader.cpp
-+   )
-+
-+   message(STATUS "Building Solid UPower backend." )
-+   set(solid_LIB_SRCS ${solid_LIB_SRCS}
-+   backends/upower/upowermanager.cpp
-+   backends/upower/upowerdevice.cpp
-+   backends/upower/upowerbattery.cpp
-+   backends/upower/upoweracadapter.cpp
-+   backends/upower/upowerdeviceinterface.cpp
-+   backends/upower/upowergenericinterface.cpp
-+   )
-+
-+   # FIXME: this should work on more Unix systems
-+   if (CMAKE_SYSTEM_NAME MATCHES Linux)
-+      message(STATUS "Building Solid UDisks backend." )
-+      set(solid_LIB_SRCS ${solid_LIB_SRCS}
-+      backends/udisks/udisksmanager.cpp
-+      backends/udisks/udisksdevice.cpp
-+      backends/udisks/udisksblock.cpp
-+      backends/udisks/udisksstoragevolume.cpp
-+      backends/udisks/udisksdeviceinterface.cpp
-+      backends/udisks/udisksopticaldisc.cpp
-+      backends/udisks/udisksopticaldrive.cpp
-+      backends/udisks/udisksstoragedrive.cpp
-+      backends/udisks/udisksstorageaccess.cpp
-+      backends/udisks/udisksgenericinterface.cpp
-+      )
-+   endif (CMAKE_SYSTEM_NAME MATCHES Linux)
-+
-+   message(STATUS "Building Solid fstab backend." )
-+   set(solid_LIB_SRCS ${solid_LIB_SRCS}
-+   backends/fstab/fstabmanager.cpp
-+   backends/fstab/fstabdevice.cpp
-+   backends/fstab/fstabnetworkshare.cpp
-+   backends/fstab/fstabstorageaccess.cpp
-+   backends/fstab/fstabhandling.cpp
-+   backends/fstab/fstabwatcher.cpp
-+   )
-+
-+endif(NOT WIN32 AND NOT APPLE)
-+
-+if(APPLE)
-+   find_package(IOKit REQUIRED)
-+
-+   message(STATUS "-- Building Solid IOKit backend." )
-+   set(solid_LIB_SRCS ${solid_LIB_SRCS}
-+   backends/iokit/iokitmanager.cpp
-+   backends/iokit/iokitdevice.cpp
-+   backends/iokit/cfhelper.cpp
-+   backends/iokit/iokitdeviceinterface.cpp
-+   backends/iokit/iokitgenericinterface.cpp
-+   backends/iokit/iokitprocessor.cpp
-+   backends/iokit/iokitnetworkinterface.cpp
-+   backends/iokit/iokitserialinterface.cpp
-+   backends/iokit/iokitbattery.cpp
-+   )
-+endif(APPLE)
-+
-+if(WIN32)
-+   include(CheckIncludeFileCXX)
-+   check_include_file_cxx(wbemidl.h HAVE_WBEM)
-+   FIND_LIBRARY(WBEM_LIBRARIES NAMES wbemuuid wbemuuidd)
-+   if(HAVE_WBEM AND WBEM_LIBRARIES)
-+      set(HAVE_WBEM True)
-+      message(STATUS "Found wbemuuid library: ${WBEM_LIBRARIES}")
-+   else(HAVE_WBEM AND WBEM_LIBRARIES)
-+      set(HAVE_WBEM False)
-+   endif(HAVE_WBEM AND WBEM_LIBRARIES)
-+   if(HAVE_WBEM AND NOT WINCE)
-+       set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_WBEM")
-+       message(STATUS "-- Building Solid WMI backend." )
-+
-+       set(solid_LIB_SRCS ${solid_LIB_SRCS}
-+       backends/wmi/wmiacadapter.cpp
-+       backends/wmi/wmiaudiointerface.cpp
-+       backends/wmi/wmibattery.cpp
-+       backends/wmi/wmiblock.cpp
-+       backends/wmi/wmibutton.cpp
-+       backends/wmi/wmicamera.cpp
-+       backends/wmi/wmicdrom.cpp
-+       backends/wmi/wmideviceinterface.cpp
-+       backends/wmi/wmidvbinterface.cpp
-+       backends/wmi/wmigenericinterface.cpp
-+       backends/wmi/wmidevice.cpp
-+       backends/wmi/wmimanager.cpp
-+       backends/wmi/wminetworkinterface.cpp
-+       backends/wmi/wmiopticaldisc.cpp
-+       backends/wmi/wmiportablemediaplayer.cpp
-+       backends/wmi/wmiprocessor.cpp
-+       backends/wmi/wmiquery.cpp
-+       backends/wmi/wmistorageaccess.cpp
-+       backends/wmi/wmistorage.cpp
-+       backends/wmi/wmivideo.cpp
-+       backends/wmi/wmivolume.cpp
-+
-+       )
-+    endif(HAVE_WBEM AND NOT WINCE)
-+endif(WIN32)
-+
-+set_source_files_properties( org.freedesktop.PowerManagement.xml
-+                             org.freedesktop.PowerManagement.Inhibit.xml
-+                             org.kde.Solid.PowerManagement.PolicyAgent.xml
-+                             PROPERTIES NO_NAMESPACE TRUE)
-+
-+qt4_add_dbus_interfaces(solid_LIB_SRCS org.freedesktop.PowerManagement.xml
-+                        org.freedesktop.PowerManagement.Inhibit.xml
-+                        org.kde.Solid.PowerManagement.PolicyAgent.xml)
-+
-+qt4_add_dbus_interface(solid_LIB_SRCS org.kde.Solid.Networking.Client.xml
-+                       org_kde_solid_networking_client)
-+
-+set(solid_OPTIONAL_LIBS)
-+
-+if(WIN32)
-+   set(solid_OPTIONAL_LIBS ${solid_OPTIONAL_LIBS} ${KDEWIN_LIBRARY})
-+   if(HAVE_WBEM)
-+      set(solid_OPTIONAL_LIBS ${solid_OPTIONAL_LIBS} ${WBEM_LIBRARIES})
-+   endif(HAVE_WBEM)
-+endif(WIN32)
-+
-+if(APPLE)
-+   set(solid_OPTIONAL_LIBS ${IOKIT_LIBRARY})
-+endif(APPLE)
-+
-+kde4_add_library(solid ${LIBRARY_TYPE} ${solid_LIB_SRCS})
-+
-+if ( HUPNP_FOUND )
-+   set(solid_OPTIONAL_LIBS ${solid_OPTIONAL_LIBS} ${HUPNP_LIBS})
-+endif( HUPNP_FOUND )
-+
-+if ( UDEV_FOUND )
-+   set(solid_OPTIONAL_LIBS ${solid_OPTIONAL_LIBS} ${UDEV_LIBS})
-+endif ( UDEV_FOUND )
-+
-+target_link_libraries(solid ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTGUI_LIBRARY} ${solid_OPTIONAL_LIBS} )
-+target_link_libraries(solid LINK_INTERFACE_LIBRARIES ${QT_CORE_LIBRARY} )
-+
-+if (WINCE)
-+   target_link_libraries(solid ${WCECOMPAT_LIBRARIES})
-+endif(WINCE)
-+
-+set_target_properties(solid PROPERTIES
-+   VERSION ${GENERIC_LIB_VERSION}
-+   SOVERSION ${GENERIC_LIB_SOVERSION}
-+)
-+install(TARGETS solid EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
-+
-+install(FILES org.kde.Solid.Networking.Client.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
-+install(FILES org.kde.Solid.PowerManagement.PolicyAgent.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
-+install(FILES org.freedesktop.PowerManagement.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
-+install(FILES org.freedesktop.PowerManagement.Inhibit.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
-+
-+########### static lib for tests  ###############
-+
-+kde4_add_library(solid_static STATIC ${solid_LIB_SRCS})
-+
-+target_link_libraries(solid_static ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTGUI_LIBRARY} ${solid_OPTIONAL_LIBS})
-+
-+if(WIN32)
-+   set_target_properties(solid_static PROPERTIES COMPILE_FLAGS -DSOLID_EXPORT=)
-+endif(WIN32)
-+########### install files ###############
-+
-+install( FILES ${CMAKE_CURRENT_BINARY_DIR}/solid_export.h solidnamespace.h device.h
-+               devicenotifier.h deviceinterface.h genericinterface.h processor.h block.h
-+               storageaccess.h storagedrive.h opticaldrive.h storagevolume.h opticaldisc.h
-+               camera.h portablemediaplayer.h networkinterface.h acadapter.h battery.h
-+               button.h audiointerface.h dvbinterface.h predicate.h powermanagement.h
-+               networking.h video.h serialinterface.h smartcardreader.h internetgateway.h
-+               networkshare.h DESTINATION ${INCLUDE_INSTALL_DIR}/solid COMPONENT Devel)
-+
-+########### parser build ###############
-+
-+set(lexer_FILE predicate_lexer)
-+set(parser_FILE predicate_parser)
-+
-+find_package(Flex)
-+macro_log_feature(FLEX_FOUND
-+   "Flex"
-+   "Allows the Solid predicate parser to be updated"
-+   "http://flex.sourceforge.net"
-+   FALSE
-+   ""
-+   "Required by the UpdateSolidPredicateParser target (mainly useful for developers)")
-+
-+find_program(BISON_EXECUTABLE bison)
-+macro_log_feature(BISON_EXECUTABLE
-+   "Bison"
-+   "Allows the Solid predicate parser to be updated"
-+   "http://www.gnu.org/software/bison"
-+   FALSE
-+   ""
-+   "Required by the UpdateSolidPredicateParser target (mainly useful for developers)")
-+mark_as_advanced(BISON_EXECUTABLE)      # don't show it in the simple view in cmake-gui/ccmake
-+
-+if (FLEX_EXECUTABLE AND BISON_EXECUTABLE)
-+
-+   add_custom_target(UpdateSolidPredicateParser
-+                     COMMAND ${FLEX_EXECUTABLE} -P Solid -o${lexer_FILE}.c ${lexer_FILE}.l
-+                     COMMAND ${BISON_EXECUTABLE} -p Solid -d -b ${parser_FILE} ${parser_FILE}.y
-+                     COMMAND ${CMAKE_COMMAND} -E copy ${parser_FILE}.tab.c ${CMAKE_CURRENT_SOURCE_DIR}/${parser_FILE}.c
-+                     COMMAND ${CMAKE_COMMAND} -E copy ${parser_FILE}.tab.h ${CMAKE_CURRENT_SOURCE_DIR}/${parser_FILE}.h
-+                     COMMAND ${CMAKE_COMMAND} -E remove ${parser_FILE}.tab.c ${parser_FILE}.tab.h
-+                     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-+
-+else (FLEX_EXECUTABLE AND BISON_EXECUTABLE)
-+   add_custom_target(UpdateSolidPredicateParser
-+                     COMMAND echo "flex and/or bison not found, so target UpdateSolidPredicateParser inactive")
-+endif (FLEX_EXECUTABLE AND BISON_EXECUTABLE)
-+
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/dbus/manager.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/dbus/manager.cpp
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/dbus/manager.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/dbus/manager.cpp	2012-06-27 21:52:42.084597220 +0200
-@@ -0,0 +1,26 @@
-+/*
-+ * This file was generated by qdbusxml2cpp version 0.7
-+ * Command line was: qdbusxml2cpp -p manager manager.xml
-+ *
-+ * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-+ *
-+ * This is an auto-generated file.
-+ * This file may have been hand-edited. Look for HAND-EDIT comments
-+ * before re-generating it.
-+ */
-+
-+#include "manager.h"
-+
-+/*
-+ * Implementation of interface class OrgFreedesktopDBusObjectManagerInterface
-+ */
-+
-+OrgFreedesktopDBusObjectManagerInterface::OrgFreedesktopDBusObjectManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
-+    : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
-+{
-+}
-+
-+OrgFreedesktopDBusObjectManagerInterface::~OrgFreedesktopDBusObjectManagerInterface()
-+{
-+}
-+
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/dbus/manager.h kdelibs-4.8.95/solid/solid/backends/udisks2/dbus/manager.h
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/dbus/manager.h	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/dbus/manager.h	2012-06-27 21:52:42.084597220 +0200
-@@ -0,0 +1,59 @@
-+/*
-+ * This file was generated by qdbusxml2cpp version 0.7
-+ * Command line was: qdbusxml2cpp -p manager manager.xml
-+ *
-+ * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-+ *
-+ * This is an auto-generated file.
-+ * Do not edit! All changes made to it will be lost.
-+ */
-+
-+#ifndef MANAGER_H_1329493525
-+#define MANAGER_H_1329493525
-+
-+#include <QtCore/QObject>
-+#include <QtCore/QByteArray>
-+#include <QtCore/QList>
-+#include <QtCore/QMap>
-+#include <QtCore/QString>
-+#include <QtCore/QStringList>
-+#include <QtCore/QVariant>
-+#include <QtDBus/QtDBus>
-+
-+#include "../udisks2.h"
-+
-+/*
-+ * Proxy class for interface org.freedesktop.DBus.ObjectManager
-+ */
-+class OrgFreedesktopDBusObjectManagerInterface: public QDBusAbstractInterface
-+{
-+    Q_OBJECT
-+public:
-+    static inline const char *staticInterfaceName()
-+    { return "org.freedesktop.DBus.ObjectManager"; }
-+
-+public:
-+    OrgFreedesktopDBusObjectManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
-+
-+    ~OrgFreedesktopDBusObjectManagerInterface();
-+
-+public Q_SLOTS: // METHODS
-+    inline QDBusPendingReply<DBUSManagerStruct> GetManagedObjects()
-+    {
-+        QList<QVariant> argumentList;
-+        return asyncCallWithArgumentList(QLatin1String("GetManagedObjects"), argumentList);
-+    }
-+
-+Q_SIGNALS: // SIGNALS
-+    void InterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties);
-+    void InterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces);
-+};
-+
-+namespace org {
-+  namespace freedesktop {
-+    namespace DBus {
-+      typedef ::OrgFreedesktopDBusObjectManagerInterface ObjectManager;
-+    }
-+  }
-+}
-+#endif
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/dbus/manager.xml kdelibs-4.8.95/solid/solid/backends/udisks2/dbus/manager.xml
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/dbus/manager.xml	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/dbus/manager.xml	2012-06-27 21:52:42.085597220 +0200
-@@ -0,0 +1,21 @@
-+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
-+                      "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
-+<node>
-+  <interface name="org.freedesktop.DBus.ObjectManager">
-+    <method name="GetManagedObjects">
-+      <arg type="a{oa{sa{sv}}}" name="object_paths_interfaces_and_properties" direction="out">
-+        <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="DBUSManagerStruct"/>
-+      </arg>
-+    </method>
-+    <signal name="InterfacesAdded">
-+      <arg type="o" name="object_path"/>
-+      <arg type="a{sa{sv}}" name="interfaces_and_properties">
-+        <annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="QVariantMapMap"/>
-+      </arg>
-+    </signal>
-+    <signal name="InterfacesRemoved">
-+      <arg type="o" name="object_path"/>
-+      <arg type="as" name="interfaces"/>
-+    </signal>
-+  </interface>
-+</node>
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisks2.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisks2.h
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisks2.h	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisks2.h	2012-06-27 21:52:42.085597220 +0200
-@@ -0,0 +1,77 @@
-+/*
-+    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef SOLID_BACKENDS_UDISKS2_H
-+#define SOLID_BACKENDS_UDISKS2_H
-+
-+#include <QMetaType>
-+#include <QtDBus>
-+#include <QVariant>
-+#include <QMap>
-+#include <QList>
-+
-+typedef QList<QByteArray> QByteArrayList;
-+Q_DECLARE_METATYPE(QByteArrayList)
-+
-+typedef QMap<QString,QVariantMap> QVariantMapMap;
-+Q_DECLARE_METATYPE(QVariantMapMap)
-+
-+typedef QMap<QDBusObjectPath, QVariantMapMap> DBUSManagerStruct;
-+Q_DECLARE_METATYPE(DBUSManagerStruct)
-+
-+/* UDisks2 */
-+#define UD2_DBUS_SERVICE                 "org.freedesktop.UDisks2"
-+#define UD2_DBUS_PATH                    "/org/freedesktop/UDisks2"
-+#define UD2_UDI_DISKS_PREFIX             "/org/freedesktop/UDisks2"
-+#define UD2_DBUS_PATH_MANAGER            "/org/freedesktop/UDisks2/Manager"
-+#define UD2_DBUS_PATH_DRIVES             "/org/freedesktop/UDisks2/drives/"
-+#define UD2_DBUS_PATH_JOBS               "/org/freedesktop/UDisks2/jobs/"
-+#define DBUS_INTERFACE_PROPS             "org.freedesktop.DBus.Properties"
-+#define DBUS_INTERFACE_INTROSPECT        "org.freedesktop.DBus.Introspectable"
-+#define DBUS_INTERFACE_MANAGER           "org.freedesktop.DBus.ObjectManager"
-+#define UD2_DBUS_INTERFACE_BLOCK         "org.freedesktop.UDisks2.Block"
-+#define UD2_DBUS_INTERFACE_DRIVE         "org.freedesktop.UDisks2.Drive"
-+#define UD2_DBUS_INTERFACE_PARTITION     "org.freedesktop.UDisks2.Partition"
-+#define UD2_DBUS_INTERFACE_PARTITIONTABLE   "org.freedesktop.UDisks2.PartitionTable"
-+#define UD2_DBUS_INTERFACE_FILESYSTEM    "org.freedesktop.UDisks2.Filesystem"
-+#define UD2_DBUS_INTERFACE_ENCRYPTED     "org.freedesktop.UDisks2.Encrypted"
-+#define UD2_DBUS_INTERFACE_SWAP          "org.freedesktop.UDisks2.Swapspace"
-+
-+/* errors */
-+#define UD2_ERROR_UNAUTHORIZED            "org.freedesktop.PolicyKit.Error.NotAuthorized"
-+#define UD2_ERROR_BUSY                    "org.freedesktop.UDisks2.Error.DeviceBusy"
-+#define UD2_ERROR_FAILED                  "org.freedesktop.UDisks2.Error.Failed"
-+#define UD2_ERROR_CANCELED                "org.freedesktop.UDisks2.Error.Cancelled"
-+#define UD2_ERROR_INVALID_OPTION          "org.freedesktop.UDisks2.Error.OptionNotPermitted"
-+#define UD2_ERROR_MISSING_DRIVER          "org.freedesktop.UDisks2.Error.NotSupported"
-+
-+#define UD2_ERROR_ALREADY_MOUNTED         "org.freedesktop.UDisks2.Error.AlreadyMounted"
-+#define UD2_ERROR_NOT_MOUNTED             "org.freedesktop.UDisks2.Error.NotMounted"
-+#define UD2_ERROR_MOUNTED_BY_OTHER_USER   "org.freedesktop.UDisks2.Error.MountedByOtherUser"
-+#define UD2_ERROR_ALREADY_UNMOUNTING      "org.freedesktop.UDisks2.Error.AlreadyUnmounting"
-+#define UD2_ERROR_TIMED_OUT               "org.freedesktop.UDisks2.Error.Timedout"
-+#define UD2_ERROR_WOULD_WAKEUP            "org.freedesktop.UDisks2.Error.WouldWakeup"
-+#define UD2_ERROR_ALREADY_CANCELLED       "org.freedesktop.UDisks2.Error.AlreadyCancelled"
-+
-+#define UD2_ERROR_NOT_AUTHORIZED          "org.freedesktop.UDisks2.Error.NotAuthorized"
-+#define UD2_ERROR_NOT_AUTHORIZED_CAN_OBTAIN  "org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain"
-+#define UD2_ERROR_NOT_AUTHORIZED_DISMISSED   "org.freedesktop.UDisks2.Error.NotAuthorizedDismissed"
-+
-+#endif // SOLID_BACKENDS_UDISKS2_H
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksblock.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksblock.cpp
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksblock.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksblock.cpp	2012-06-27 21:52:42.085597220 +0200
-@@ -0,0 +1,84 @@
-+/*
-+    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include <linux/kdev_t.h>
-+
-+#include <QFile>
-+#include <QtDBus/QDBusConnection>
-+#include <QtDBus/QDBusPendingReply>
-+
-+#include "udisksblock.h"
-+#include "dbus/manager.h"
-+
-+using namespace Solid::Backends::UDisks2;
-+
-+Block::Block(Device *dev)
-+    : DeviceInterface(dev)
-+{
-+    m_devNum = m_device->prop("DeviceNumber").toULongLong();
-+    m_devFile = QFile::decodeName(m_device->prop("Device").toByteArray());
-+
-+    // we have a drive (non-block device for udisks), so let's find the corresponding (real) block device
-+    if (m_devNum == 0 || m_devFile.isEmpty()) {
-+        org::freedesktop::DBus::ObjectManager manager(UD2_DBUS_SERVICE, UD2_DBUS_PATH, QDBusConnection::systemBus());
-+        QDBusPendingReply<DBUSManagerStruct> reply = manager.GetManagedObjects();
-+        reply.waitForFinished();
-+        if (!reply.isError()) {  // enum devices
-+            Q_FOREACH(const QDBusObjectPath &path, reply.value().keys()) {
-+                const QString udi = path.path();
-+
-+                if (udi == UD2_DBUS_PATH_MANAGER || udi == UD2_UDI_DISKS_PREFIX || udi.startsWith(UD2_DBUS_PATH_JOBS))
-+                    continue;
-+
-+                Device device(udi);
-+                if (device.drivePath() == dev->udi()) {
-+                    m_devNum = device.prop("DeviceNumber").toULongLong();
-+                    m_devFile = QFile::decodeName(device.prop("Device").toByteArray());
-+                    break;
-+                }
-+            }
-+        }
-+        else  // show error
-+        {
-+            qWarning() << "Failed enumerating UDisks2 objects:" << reply.error().name() << "\n" << reply.error().message();
-+        }
-+    }
-+
-+    //qDebug() << "devnum:" << m_devNum << "dev file:" << m_devFile;
-+}
-+
-+Block::~Block()
-+{
-+}
-+
-+QString Block::device() const
-+{
-+    return m_devFile;
-+}
-+
-+int Block::deviceMinor() const
-+{
-+    return MINOR(m_devNum);
-+}
-+
-+int Block::deviceMajor() const
-+{
-+    return MAJOR(m_devNum);
-+}
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksblock.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksblock.h
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksblock.h	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksblock.h	2012-06-27 21:52:42.086597220 +0200
-@@ -0,0 +1,56 @@
-+/*
-+    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef UDISKS2BLOCK_H
-+#define UDISKS2BLOCK_H
-+
-+#include <solid/ifaces/block.h>
-+#include "udisksdeviceinterface.h"
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+
-+class Block: public DeviceInterface, virtual public Solid::Ifaces::Block
-+{
-+
-+    Q_OBJECT
-+    Q_INTERFACES(Solid::Ifaces::Block)
-+
-+public:
-+    Block(Device *dev);
-+    virtual ~Block();
-+
-+    virtual QString device() const;
-+    virtual int deviceMinor() const;
-+    virtual int deviceMajor() const;
-+private:
-+    dev_t m_devNum;
-+    QString m_devFile;
-+};
-+
-+}
-+}
-+}
-+
-+#endif // UDISKS2BLOCK_H
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksdevice.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksdevice.cpp
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksdevice.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksdevice.cpp	2012-06-27 21:52:42.087597220 +0200
-@@ -0,0 +1,910 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include "udisksdevice.h"
-+#include "udisksblock.h"
-+#include "udisksdeviceinterface.h"
-+#include "udisksstoragevolume.h"
-+#include "udisksopticaldisc.h"
-+#include "udisksopticaldrive.h"
-+#include "udisksstorageaccess.h"
-+#include "udisksgenericinterface.h"
-+
-+#include <solid/genericinterface.h>
-+#include <solid/deviceinterface.h>
-+#include <solid/device.h>
-+
-+#include <QtCore/QDebug>
-+
-+#include <QtDBus/QDBusMessage>
-+#include <QtDBus/QDBusMetaType>
-+#include <QtDBus/QDBusPendingReply>
-+#include <QtDBus/QDBusArgument>
-+
-+#include <QtXml/QDomDocument>
-+
-+using namespace Solid::Backends::UDisks2;
-+
-+// Adapted from KLocale as Solid needs to be Qt-only
-+static QString formatByteSize(double size)
-+{
-+    // Per IEC 60027-2
-+
-+    // Binary prefixes
-+    //Tebi-byte             TiB             2^40    1,099,511,627,776 bytes
-+    //Gibi-byte             GiB             2^30    1,073,741,824 bytes
-+    //Mebi-byte             MiB             2^20    1,048,576 bytes
-+    //Kibi-byte             KiB             2^10    1,024 bytes
-+
-+    QString s;
-+    // Gibi-byte
-+    if ( size >= 1073741824.0 )
-+    {
-+        size /= 1073741824.0;
-+        if ( size > 1024 ) // Tebi-byte
-+            s = QObject::tr("%1 TiB").arg(QLocale().toString(size / 1024.0, 'f', 1));
-+        else
-+            s = QObject::tr("%1 GiB").arg(QLocale().toString(size, 'f', 1));
-+    }
-+    // Mebi-byte
-+    else if ( size >= 1048576.0 )
-+    {
-+        size /= 1048576.0;
-+        s = QObject::tr("%1 MiB").arg(QLocale().toString(size, 'f', 1));
-+    }
-+    // Kibi-byte
-+    else if ( size >= 1024.0 )
-+    {
-+        size /= 1024.0;
-+        s = QObject::tr("%1 KiB").arg(QLocale().toString(size, 'f', 1));
-+    }
-+    // Just byte
-+    else if ( size > 0 )
-+    {
-+        s = QObject::tr("%1 B").arg(QLocale().toString(size, 'f', 1));
-+    }
-+    // Nothing
-+    else
-+    {
-+        s = QObject::tr("0 B");
-+    }
-+    return s;
-+}
-+
-+Device::Device(const QString &udi)
-+    : Solid::Ifaces::Device()
-+    , m_udi(udi)
-+{
-+    m_device = new QDBusInterface(UD2_DBUS_SERVICE, m_udi,
-+                                  QString(), // no interface, we aggregate them
-+                                  QDBusConnection::systemBus());
-+
-+    if (m_device->isValid()) {
-+        QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, m_udi, DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
-+                                             SLOT(slotPropertiesChanged(QString,QVariantMap,QStringList)));
-+
-+        QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, UD2_DBUS_PATH, DBUS_INTERFACE_MANAGER, "InterfacesAdded",
-+                                             this, SLOT(slotInterfacesAdded(QDBusObjectPath,QVariantMapMap)));
-+        QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, UD2_DBUS_PATH, DBUS_INTERFACE_MANAGER, "InterfacesRemoved",
-+                                             this, SLOT(slotInterfacesRemoved(QDBusObjectPath,QStringList)));
-+
-+        initInterfaces();
-+    }
-+}
-+
-+Device::~Device()
-+{
-+    delete m_device;
-+}
-+
-+QObject* Device::createDeviceInterface(const Solid::DeviceInterface::Type& type)
-+{
-+    if (!queryDeviceInterface(type)) {
-+        return 0;
-+    }
-+
-+    DeviceInterface *iface = 0;
-+    switch (type)
-+    {
-+    case Solid::DeviceInterface::GenericInterface:
-+        iface = new GenericInterface(this);
-+        break;
-+    case Solid::DeviceInterface::Block:
-+        iface = new Block(this);
-+        break;
-+    case Solid::DeviceInterface::StorageAccess:
-+        iface = new StorageAccess(this);
-+        break;
-+    case Solid::DeviceInterface::StorageDrive:
-+        iface = new StorageDrive(this);
-+        break;
-+    case Solid::DeviceInterface::OpticalDrive:
-+        iface = new OpticalDrive(this);
-+        break;
-+    case Solid::DeviceInterface::StorageVolume:
-+        iface = new StorageVolume(this);
-+        break;
-+    case Solid::DeviceInterface::OpticalDisc:
-+        iface = new OpticalDisc(this);
-+        break;
-+    default:
-+        break;
-+    }
-+    return iface;
-+}
-+
-+bool Device::queryDeviceInterface(const Solid::DeviceInterface::Type& type) const
-+{
-+    switch (type) {
-+    case Solid::DeviceInterface::GenericInterface:
-+        return true;
-+    case Solid::DeviceInterface::Block:
-+        return isBlock();
-+    case Solid::DeviceInterface::StorageVolume:
-+        return isStorageVolume();
-+    case Solid::DeviceInterface::StorageAccess:
-+        return isStorageAccess();
-+    case Solid::DeviceInterface::StorageDrive:
-+        return isDrive();
-+    case Solid::DeviceInterface::OpticalDrive:
-+        return isOpticalDrive();
-+    case Solid::DeviceInterface::OpticalDisc:
-+        return isOpticalDisc();
-+    default:
-+        return false;
-+    }
-+}
-+
-+QStringList Device::emblems() const
-+{
-+    QStringList res;
-+
-+    if (queryDeviceInterface(Solid::DeviceInterface::StorageAccess))
-+    {
-+        const UDisks2::StorageAccess accessIface(const_cast<Device *>(this));
-+        if (accessIface.isAccessible())
-+        {
-+            if (isEncryptedContainer())
-+                res << "emblem-encrypted-unlocked";
-+            else
-+                res << "emblem-mounted";
-+        }
-+        else
-+        {
-+            if (isEncryptedContainer())
-+                res << "emblem-encrypted-locked";
-+            else
-+                res << "emblem-unmounted";
-+        }
-+    }
-+
-+    return res;
-+}
-+
-+QString Device::description() const
-+{
-+    const QString hintName = prop("HintName").toString();
-+    if (!hintName.isEmpty())
-+        return hintName;
-+
-+    if (queryDeviceInterface(Solid::DeviceInterface::StorageDrive))
-+        return storageDescription();
-+    else if (queryDeviceInterface(Solid::DeviceInterface::StorageVolume))
-+        return volumeDescription();
-+    else
-+        return product();
-+}
-+
-+QString Device::storageDescription() const
-+{
-+    QString description;
-+    const UDisks2::StorageDrive storageDrive(const_cast<Device*>(this));
-+    Solid::StorageDrive::DriveType drive_type = storageDrive.driveType();
-+    bool drive_is_hotpluggable = storageDrive.isHotpluggable();
-+
-+    if (drive_type == Solid::StorageDrive::CdromDrive)
-+    {
-+        const UDisks2::OpticalDrive opticalDrive(const_cast<Device*>(this));
-+        Solid::OpticalDrive::MediumTypes mediumTypes = opticalDrive.supportedMedia();
-+        QString first;
-+        QString second;
-+
-+        first = QObject::tr("CD-ROM", "First item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::Cdr)
-+            first = QObject::tr("CD-R", "First item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::Cdrw)
-+            first = QObject::tr("CD-RW", "First item of %1%2 Drive sentence");
-+
-+        if (mediumTypes & Solid::OpticalDrive::Dvd)
-+            second = QObject::tr("/DVD-ROM", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::Dvdplusr)
-+            second = QObject::tr("/DVD+R", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::Dvdplusrw)
-+            second = QObject::tr("/DVD+RW", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::Dvdr)
-+            second = QObject::tr("/DVD-R", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::Dvdrw)
-+            second = QObject::tr("/DVD-RW", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::Dvdram)
-+            second = QObject::tr("/DVD-RAM", "Second item of %1%2 Drive sentence");
-+        if ((mediumTypes & Solid::OpticalDrive::Dvdr) && (mediumTypes & Solid::OpticalDrive::Dvdplusr))
-+        {
-+            if(mediumTypes & Solid::OpticalDrive::Dvdplusdl)
-+                second = QObject::trUtf8("/DVD±R DL", "Second item of %1%2 Drive sentence");
-+            else
-+                second = QObject::trUtf8("/DVD±R", "Second item of %1%2 Drive sentence");
-+        }
-+        if ((mediumTypes & Solid::OpticalDrive::Dvdrw) && (mediumTypes & Solid::OpticalDrive::Dvdplusrw))
-+        {
-+            if((mediumTypes & Solid::OpticalDrive::Dvdplusdl) || (mediumTypes & Solid::OpticalDrive::Dvdplusdlrw))
-+                second = QObject::trUtf8("/DVD±RW DL", "Second item of %1%2 Drive sentence");
-+            else
-+                second = QObject::trUtf8("/DVD±RW", "Second item of %1%2 Drive sentence");
-+        }
-+        if (mediumTypes & Solid::OpticalDrive::Bd)
-+            second = QObject::tr("/BD-ROM", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::Bdr)
-+            second = QObject::tr("/BD-R", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::Bdre)
-+            second = QObject::tr("/BD-RE", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::HdDvd)
-+            second = QObject::tr("/HD DVD-ROM", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::HdDvdr)
-+            second = QObject::tr("/HD DVD-R", "Second item of %1%2 Drive sentence");
-+        if (mediumTypes & Solid::OpticalDrive::HdDvdrw)
-+            second = QObject::tr("/HD DVD-RW", "Second item of %1%2 Drive sentence");
-+
-+        if (drive_is_hotpluggable)
-+            description = QObject::tr("External %1%2 Drive", "%1 is CD-ROM/CD-R/etc; %2 is '/DVD-ROM'/'/DVD-R'/etc (with leading slash)").arg(first).arg(second);
-+        else
-+            description = QObject::tr("%1%2 Drive", "%1 is CD-ROM/CD-R/etc; %2 is '/DVD-ROM'/'/DVD-R'/etc (with leading slash)").arg(first).arg(second);
-+
-+        return description;
-+    }
-+
-+    if (drive_type == Solid::StorageDrive::Floppy)
-+    {
-+        if (drive_is_hotpluggable)
-+            description = QObject::tr("External Floppy Drive");
-+        else
-+            description = QObject::tr("Floppy Drive");
-+
-+        return description;
-+    }
-+
-+    bool drive_is_removable = storageDrive.isRemovable();
-+
-+    if (drive_type == Solid::StorageDrive::HardDisk && !drive_is_removable)
-+    {
-+        QString size_str = formatByteSize(storageDrive.size());
-+        if (!size_str.isEmpty())
-+        {
-+            if (drive_is_hotpluggable)
-+                description = QObject::tr("%1 External Hard Drive", "%1 is the size").arg(size_str);
-+            else
-+                description = QObject::tr("%1 Hard Drive", "%1 is the size").arg(size_str);
-+        } else {
-+            if (drive_is_hotpluggable)
-+                description = QObject::tr("External Hard Drive");
-+            else
-+                description = QObject::tr("Hard Drive");
-+        }
-+
-+        return description;
-+    }
-+
-+    QString vendormodel_str;
-+    QString model = product();
-+    QString vendor_str = vendor();
-+
-+    if (vendor_str.isEmpty())
-+    {
-+        if (!model.isEmpty())
-+            vendormodel_str = model;
-+    }
-+    else
-+    {
-+        if (model.isEmpty())
-+            vendormodel_str = vendor_str;
-+        else
-+        {
-+            if (model.startsWith(vendor_str))
-+            {
-+                // e.g. vendor is "Nokia" and model is "Nokia N950" we do not want "Nokia Nokia N950" as description
-+                vendormodel_str = model;
-+            }
-+            else
-+            {
-+                vendormodel_str = QObject::tr("%1 %2", "%1 is the vendor, %2 is the model of the device").arg(vendor_str).arg(model);
-+            }
-+        }
-+    }
-+
-+    if (vendormodel_str.isEmpty())
-+        description = QObject::tr("Drive");
-+    else
-+        description = vendormodel_str;
-+
-+    return description;
-+}
-+
-+QString Device::volumeDescription() const
-+{
-+    QString description;
-+    const UDisks2::StorageVolume storageVolume(const_cast<Device*>(this));
-+    QString volume_label = prop("IdLabel").toString();
-+    if (volume_label.isEmpty())
-+        volume_label = prop("Name").toString();
-+    if (!volume_label.isEmpty())
-+        return volume_label;
-+
-+    UDisks2::Device storageDevice(drivePath());
-+    const UDisks2::StorageDrive storageDrive(&storageDevice);
-+    Solid::StorageDrive::DriveType drive_type = storageDrive.driveType();
-+
-+    // Handle media in optical drives
-+    if (drive_type == Solid::StorageDrive::CdromDrive)
-+    {
-+        const UDisks2::OpticalDisc disc(const_cast<Device*>(this));
-+        switch (disc.discType())
-+        {
-+            case Solid::OpticalDisc::UnknownDiscType:
-+            case Solid::OpticalDisc::CdRom:
-+                description = QObject::tr("CD-ROM");
-+                break;
-+
-+            case Solid::OpticalDisc::CdRecordable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank CD-R");
-+                else
-+                    description = QObject::tr("CD-R");
-+                break;
-+
-+            case Solid::OpticalDisc::CdRewritable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank CD-RW");
-+                else
-+                    description = QObject::tr("CD-RW");
-+                break;
-+
-+            case Solid::OpticalDisc::DvdRom:
-+                description = QObject::tr("DVD-ROM");
-+                break;
-+
-+            case Solid::OpticalDisc::DvdRam:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank DVD-RAM");
-+                else
-+                    description = QObject::tr("DVD-RAM");
-+                break;
-+
-+            case Solid::OpticalDisc::DvdRecordable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank DVD-R");
-+                else
-+                    description = QObject::tr("DVD-R");
-+                break;
-+
-+            case Solid::OpticalDisc::DvdPlusRecordableDuallayer:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank DVD+R Dual-Layer");
-+                else
-+                    description = QObject::tr("DVD+R Dual-Layer");
-+                break;
-+
-+            case Solid::OpticalDisc::DvdRewritable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank DVD-RW");
-+                else
-+                    description = QObject::tr("DVD-RW");
-+                break;
-+
-+            case Solid::OpticalDisc::DvdPlusRecordable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank DVD+R");
-+                else
-+                    description = QObject::tr("DVD+R");
-+                break;
-+
-+            case Solid::OpticalDisc::DvdPlusRewritable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank DVD+RW");
-+                else
-+                    description = QObject::tr("DVD+RW");
-+                break;
-+
-+            case Solid::OpticalDisc::DvdPlusRewritableDuallayer:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank DVD+RW Dual-Layer");
-+                else
-+                    description = QObject::tr("DVD+RW Dual-Layer");
-+                break;
-+
-+            case Solid::OpticalDisc::BluRayRom:
-+                description = QObject::tr("BD-ROM");
-+                break;
-+
-+            case Solid::OpticalDisc::BluRayRecordable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank BD-R");
-+                else
-+                    description = QObject::tr("BD-R");
-+                break;
-+
-+            case Solid::OpticalDisc::BluRayRewritable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank BD-RE");
-+                else
-+                    description = QObject::tr("BD-RE");
-+                break;
-+
-+            case Solid::OpticalDisc::HdDvdRom:
-+                description = QObject::tr("HD DVD-ROM");
-+                break;
-+
-+            case Solid::OpticalDisc::HdDvdRecordable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank HD DVD-R");
-+                else
-+                    description = QObject::tr("HD DVD-R");
-+                break;
-+
-+            case Solid::OpticalDisc::HdDvdRewritable:
-+                if (disc.isBlank())
-+                    description = QObject::tr("Blank HD DVD-RW");
-+                else
-+                    description = QObject::tr("HD DVD-RW");
-+                break;
-+            }
-+
-+        // Special case for pure audio disc
-+        if (disc.availableContent() == Solid::OpticalDisc::Audio)
-+            description = QObject::tr("Audio CD");
-+
-+        return description;
-+    }
-+
-+    const bool drive_is_removable = storageDrive.isRemovable();
-+    const bool drive_is_hotpluggable = storageDrive.isHotpluggable();
-+
-+    QString size_str = formatByteSize(storageVolume.size());
-+    if (isEncryptedContainer())
-+    {
-+        if (!size_str.isEmpty())
-+            description = QObject::tr("%1 Encrypted Container", "%1 is the size").arg(size_str);
-+        else
-+            description = QObject::tr("Encrypted Container");
-+    }
-+    else if (drive_type == Solid::StorageDrive::HardDisk && !drive_is_removable)
-+    {
-+        if (!size_str.isEmpty())
-+        {
-+            if (drive_is_hotpluggable)
-+                description = QObject::tr("%1 External Hard Drive", "%1 is the size").arg(size_str);
-+            else
-+                description = QObject::tr("%1 Hard Drive", "%1 is the size").arg(size_str);
-+        }
-+        else
-+        {
-+            if (drive_is_hotpluggable)
-+                description = QObject::tr("External Hard Drive");
-+            else
-+                description = QObject::tr("Hard Drive");
-+        }
-+    }
-+    else
-+    {
-+        if (drive_is_removable)
-+            description = QObject::tr("%1 Removable Media", "%1 is the size").arg(size_str);
-+        else
-+            description = QObject::tr("%1 Media", "%1 is the size").arg(size_str);
-+    }
-+
-+    return description;
-+}
-+
-+QString Device::icon() const
-+{
-+    QString iconName = prop( "HintIconName" ).toString();
-+
-+    if ( !iconName.isEmpty() )
-+    {
-+        return iconName;
-+    }
-+    else if (isDrive()) {
-+        const bool isRemovable = prop("Removable").toBool();
-+        const QString conn = prop("ConnectionBus").toString();
-+
-+        if (isOpticalDrive())
-+            return "drive-optical";
-+        else if (isRemovable && !isOpticalDisc()) {
-+            if (conn == "usb")
-+                return "drive-removable-media-usb";
-+            else
-+                return "drive-removable-media";
-+        }
-+    }
-+    else if (isBlock()) {
-+        Device drive(drivePath());
-+
-+        // handle media
-+        const QString media = drive.prop("Media").toString();
-+
-+        if ( !media.isEmpty() )
-+        {
-+            if ( isOpticalDisc() )    // optical stuff
-+            {
-+                bool isWritable = drive.prop("OpticalBlank").toBool();
-+
-+                const UDisks2::OpticalDisc disc(const_cast<Device*>(this));
-+                Solid::OpticalDisc::ContentTypes availContent = disc.availableContent();
-+
-+                if (availContent & Solid::OpticalDisc::VideoDvd) // Video DVD
-+                    return "media-optical-dvd-video";
-+                else if ((availContent & Solid::OpticalDisc::VideoCd) || (availContent & Solid::OpticalDisc::SuperVideoCd)) // Video CD
-+                    return "media-optical-video";
-+                else if ((availContent & Solid::OpticalDisc::Data) && (availContent & Solid::OpticalDisc::Audio)) // Mixed CD
-+                    return "media-optical-mixed-cd";
-+                else if (availContent & Solid::OpticalDisc::Audio) // Audio CD
-+                    return "media-optical-audio";
-+                else if (availContent & Solid::OpticalDisc::Data) // Data CD
-+                    return "media-optical-data";
-+                else if ( isWritable )
-+                    return "media-optical-recordable";
-+                else
-+                {
-+                    if ( media.startsWith( "optical_dvd" ) || media.startsWith( "optical_hddvd" ) ) // DVD
-+                        return "media-optical-dvd";
-+                    else if ( media.startsWith( "optical_bd" ) ) // BluRay
-+                        return "media-optical-blu-ray";
-+                }
-+
-+                // fallback for every other optical disc
-+                return "media-optical";
-+            }
-+
-+            if ( media == "flash_ms" ) // Flash & Co.
-+                return "media-flash-memory-stick";
-+            else if ( media == "flash_sd" || media == "flash_sdhc" || media == "flash_sdxc" || media == "flash_mmc" )
-+                return "media-flash-sd-mmc";
-+            else if ( media == "flash_sm" )
-+                return "media-flash-smart-media";
-+            else if ( media == "thumb" )
-+                return "drive-removable-media-usb-pendrive";
-+            else if ( media.startsWith( "flash" ) )
-+                return "media-flash";
-+            else if ( media == "floppy" ) // the good ol' floppy
-+                return "media-floppy";
-+        }
-+
-+        if (drive.prop("ConnectionBus").toString() == "sdio")  // hack for SD cards connected thru sdio bus
-+            return "media-flash-sd-mmc";
-+
-+        return drive.icon();
-+    }
-+
-+    return "drive-harddisk";    // general fallback
-+}
-+
-+QString Device::product() const
-+{
-+    QString product = prop("Model").toString();
-+
-+    if (!isDrive()) {
-+        QString label = prop("IdLabel").toString();
-+        if (!label.isEmpty()) {
-+            product = label;
-+        }
-+    }
-+
-+    return product;
-+}
-+
-+QString Device::vendor() const
-+{
-+    return prop("Vendor").toString();
-+}
-+
-+QString Device::udi() const
-+{
-+    return m_udi;
-+}
-+
-+QString Device::parentUdi() const
-+{
-+    QString parent;
-+
-+    if (isEncryptedContainer())
-+        parent = prop("CryptoBackingDevice").value<QDBusObjectPath>().path();
-+    else if (propertyExists("Drive"))  // block
-+        parent = prop("Drive").value<QDBusObjectPath>().path();
-+    else if (propertyExists("Table"))  // partition
-+        parent = prop("Table").value<QDBusObjectPath>().path();
-+    else if (parent.isEmpty() || parent=="/") {
-+        parent = UD2_UDI_DISKS_PREFIX;
-+    }
-+    return parent;
-+}
-+
-+void Device::checkCache(const QString &key) const
-+{
-+    if (m_cache.isEmpty()) // recreate the cache
-+        allProperties();
-+
-+    if (m_cache.contains(key))
-+        return;
-+
-+    QVariant reply = m_device->property(key.toUtf8());
-+
-+    if (reply.isValid()) {
-+        m_cache.insert(key, reply);
-+    } else {
-+        //qDebug() << "got invalid reply for cache:" << key;
-+        //m_cache.insert(key, QVariant());
-+    }
-+}
-+
-+QString Device::introspect() const
-+{
-+    QDBusMessage call = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_udi,
-+                                                       DBUS_INTERFACE_INTROSPECT, "Introspect");
-+    QDBusPendingReply<QString> reply = QDBusConnection::systemBus().asyncCall(call);
-+    reply.waitForFinished();
-+
-+    if (reply.isValid())
-+        return reply.value();
-+    else {
-+        return QString();
-+    }
-+}
-+
-+QVariant Device::prop(const QString &key) const
-+{
-+    checkCache(key);
-+    return m_cache.value(key);
-+}
-+
-+bool Device::propertyExists(const QString &key) const
-+{
-+    checkCache(key);
-+    return m_cache.contains(key);
-+}
-+
-+QVariantMap Device::allProperties() const
-+{
-+    Q_FOREACH (const QString & iface, m_interfaces) {
-+        if (iface.startsWith("org.freedesktop.DBus"))
-+            continue;
-+        QDBusMessage call = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_udi, DBUS_INTERFACE_PROPS, "GetAll");
-+        call << iface;
-+        QDBusPendingReply<QVariantMap> reply = QDBusConnection::systemBus().asyncCall(call);
-+        reply.waitForFinished();
-+
-+        if (reply.isValid())
-+            m_cache.unite(reply.value());
-+        else
-+            qWarning() << "Error getting props:" << reply.error().name() << reply.error().message();
-+        //qDebug() << "After iface" << iface << ", cache now contains" << m_cache.size() << "items";
-+    }
-+
-+    return m_cache;
-+}
-+
-+bool Device::hasInterface(const QString &name) const
-+{
-+    return m_interfaces.contains(name);
-+}
-+
-+QStringList Device::interfaces() const
-+{
-+    return m_interfaces;
-+}
-+
-+void Device::initInterfaces()
-+{
-+    m_interfaces.clear();
-+    const QString xmlData = introspect();
-+    QDomDocument dom;
-+    dom.setContent(xmlData);
-+    QDomNodeList ifaceNodeList = dom.elementsByTagName("interface");
-+    for (int i = 0; i < ifaceNodeList.count(); i++) {
-+        QDomElement ifaceElem = ifaceNodeList.item(i).toElement();
-+        if (!ifaceElem.isNull())
-+            m_interfaces.append(ifaceElem.attribute("name"));
-+    }
-+    //qDebug() << "Device" << m_udi << "has interfaces:" << m_interfaces;
-+}
-+
-+void Device::slotPropertiesChanged(const QString &ifaceName, const QVariantMap &changedProps, const QStringList &invalidatedProps)
-+{
-+    //Q_UNUSED(ifaceName);
-+
-+    qDebug() << m_udi << "'s interface" << ifaceName << "changed props:";
-+
-+    QMap<QString, int> changeMap;
-+
-+    Q_FOREACH(const QString & key, invalidatedProps) {
-+        m_cache.remove(key);
-+        changeMap.insert(key, Solid::GenericInterface::PropertyRemoved);
-+        qDebug() << "\t invalidated:" << key;
-+    }
-+
-+    QMapIterator<QString, QVariant> i(changedProps);
-+    while (i.hasNext()) {
-+        i.next();
-+        const QString key = i.key();
-+        m_cache.insert(key, i.value());  // replace the value
-+        changeMap.insert(key, Solid::GenericInterface::PropertyModified);
-+        qDebug() << "\t modified:" << key << ":" << m_cache.value(key);
-+    }
-+
-+    Q_EMIT propertyChanged(changeMap);
-+    Q_EMIT changed();
-+}
-+
-+void Device::slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties)
-+{
-+    if (object_path.path() == m_udi) {
-+        m_interfaces.append(interfaces_and_properties.keys());
-+    }
-+}
-+
-+void Device::slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces)
-+{
-+    if (object_path.path() == m_udi) {
-+        Q_FOREACH(const QString & iface, interfaces) {
-+            m_interfaces.removeAll(iface);
-+        }
-+    }
-+}
-+
-+
-+QString Device::errorToString(const QString & error) const
-+{
-+    if (error == UD2_ERROR_UNAUTHORIZED || error == UD2_ERROR_NOT_AUTHORIZED)
-+        return QObject::tr("You are not authorized to perform this operation");
-+    else if (error == UD2_ERROR_BUSY)
-+        return QObject::tr("The device is currently busy");
-+    else if (error == UD2_ERROR_FAILED)
-+        return QObject::tr("The requested operation has failed");
-+    else if (error == UD2_ERROR_CANCELED)
-+        return QObject::tr("The requested operation has been canceled");
-+    else if (error == UD2_ERROR_INVALID_OPTION)
-+        return QObject::tr("An invalid or malformed option has been given");
-+    else if (error == UD2_ERROR_MISSING_DRIVER)
-+        return QObject::tr("The kernel driver for this filesystem type is not available");
-+    else if (error == UD2_ERROR_ALREADY_MOUNTED)
-+        return QObject::tr("The device is already mounted");
-+    else if (error == UD2_ERROR_NOT_MOUNTED)
-+        return QObject::tr("The device is not mounted");
-+    else if (error == UD2_ERROR_MOUNTED_BY_OTHER_USER)
-+        return QObject::tr("The device is mounted by another user");
-+    else if (error == UD2_ERROR_ALREADY_UNMOUNTING)
-+        return QObject::tr("The device is already unmounting");
-+    else if (error == UD2_ERROR_TIMED_OUT)
-+        return QObject::tr("The operation timed out");
-+    else if (error == UD2_ERROR_WOULD_WAKEUP)
-+        return QObject::tr("The operation would wake up a disk that is in a deep-sleep state");
-+    else if (error == UD2_ERROR_ALREADY_CANCELLED)
-+        return QObject::tr("The operation has already been canceled");
-+    else
-+        return QObject::tr("An unspecified error has occurred");
-+}
-+
-+Solid::ErrorType Device::errorToSolidError(const QString & error) const
-+{
-+    if (error == UD2_ERROR_BUSY)
-+        return Solid::DeviceBusy;
-+    else if (error == UD2_ERROR_FAILED)
-+        return Solid::OperationFailed;
-+    else if (error == UD2_ERROR_CANCELED)
-+        return Solid::UserCanceled;
-+    else if (error == UD2_ERROR_INVALID_OPTION)
-+        return Solid::InvalidOption;
-+    else if (error == UD2_ERROR_MISSING_DRIVER)
-+        return Solid::MissingDriver;
-+    else
-+        return Solid::UnauthorizedOperation;
-+}
-+
-+bool Device::isBlock() const
-+{
-+    return hasInterface(UD2_DBUS_INTERFACE_BLOCK);
-+}
-+
-+bool Device::isPartition() const
-+{
-+    return hasInterface(UD2_DBUS_INTERFACE_PARTITION);
-+}
-+
-+bool Device::isPartitionTable() const
-+{
-+    return hasInterface(UD2_DBUS_INTERFACE_PARTITIONTABLE);
-+}
-+
-+bool Device::isStorageVolume() const
-+{
-+    return isPartition() || isPartitionTable() || isStorageAccess() || isOpticalDisc();
-+}
-+
-+bool Device::isStorageAccess() const
-+{
-+    return hasInterface(UD2_DBUS_INTERFACE_FILESYSTEM) || isEncryptedContainer();
-+}
-+
-+bool Device::isDrive() const
-+{
-+    return hasInterface(UD2_DBUS_INTERFACE_DRIVE);
-+}
-+
-+bool Device::isOpticalDrive() const
-+{
-+    return isDrive() && !prop("MediaCompatibility").toStringList().filter("optical_").isEmpty();
-+}
-+
-+bool Device::isOpticalDisc() const
-+{
-+    const QString drv = drivePath();
-+    if (drv.isEmpty() || drv == "/")
-+        return false;
-+
-+    Device drive(drv);
-+    return drive.prop("Optical").toBool();
-+}
-+
-+bool Device::mightBeOpticalDisc() const
-+{
-+    const QString drv = drivePath();
-+    if (drv.isEmpty() || drv == "/")
-+        return false;
-+
-+    Device drive(drv);
-+    return drive.isOpticalDrive();
-+}
-+
-+bool Device::isMounted() const
-+{
-+    return propertyExists("MountPoints") && !qdbus_cast<QByteArrayList>(prop("MountPoints")).isEmpty();
-+}
-+
-+bool Device::isEncryptedContainer() const
-+{
-+    return hasInterface(UD2_DBUS_INTERFACE_ENCRYPTED);
-+}
-+
-+bool Device::isEncryptedCleartext() const
-+{
-+    const QString holderDevice = prop("CryptoBackingDevice").toString();
-+    if (holderDevice.isEmpty() || holderDevice == "/")
-+        return false;
-+    else
-+        return true;
-+}
-+
-+bool Device::isSwap() const
-+{
-+    return hasInterface(UD2_DBUS_INTERFACE_SWAP);
-+}
-+
-+QString Device::drivePath() const
-+{
-+    return prop("Drive").value<QDBusObjectPath>().path();
-+}
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksdevice.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksdevice.h
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksdevice.h	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksdevice.h	2012-06-27 21:52:42.087597220 +0200
-@@ -0,0 +1,112 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef UDISKS2DEVICE_H
-+#define UDISKS2DEVICE_H
-+
-+#include "udisks2.h"
-+
-+#include <ifaces/device.h>
-+#include <solid/deviceinterface.h>
-+#include <solid/solidnamespace.h>
-+
-+#include <QtDBus/QDBusInterface>
-+#include <QtDBus/QDBusObjectPath>
-+#include <QtCore/QStringList>
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+
-+class Device: public Solid::Ifaces::Device
-+{
-+    Q_OBJECT
-+public:
-+    Device(const QString &udi);
-+    virtual ~Device();
-+
-+    virtual QObject* createDeviceInterface(const Solid::DeviceInterface::Type& type);
-+    virtual bool queryDeviceInterface(const Solid::DeviceInterface::Type& type) const;
-+    virtual QString description() const;
-+    virtual QStringList emblems() const;
-+    virtual QString icon() const;
-+    virtual QString product() const;
-+    virtual QString vendor() const;
-+    virtual QString udi() const;
-+    virtual QString parentUdi() const;
-+
-+    QVariant prop(const QString &key) const;
-+    bool propertyExists(const QString &key) const;
-+    QVariantMap allProperties() const;
-+
-+    bool hasInterface(const QString & name) const;
-+    QStringList interfaces() const;
-+
-+    QString errorToString(const QString & error) const;
-+    Solid::ErrorType errorToSolidError(const QString & error) const;
-+
-+    bool isBlock() const;
-+    bool isPartition() const;
-+    bool isPartitionTable() const;
-+    bool isStorageVolume() const;
-+    bool isStorageAccess() const;
-+    bool isDrive() const;
-+    bool isOpticalDrive() const;
-+    bool isOpticalDisc() const;
-+    bool mightBeOpticalDisc() const;
-+    bool isMounted() const;
-+    bool isEncryptedContainer() const;
-+    bool isEncryptedCleartext() const;
-+    bool isSwap() const;
-+
-+    QString drivePath() const;
-+
-+Q_SIGNALS:
-+    void changed();
-+    void propertyChanged(const QMap<QString,int> &changes);
-+
-+private Q_SLOTS:
-+    void slotPropertiesChanged(const QString & ifaceName, const QVariantMap & changedProps, const QStringList & invalidatedProps);
-+    void slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties);
-+    void slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces);
-+
-+private:
-+    QString storageDescription() const;
-+    QString volumeDescription() const;
-+    mutable QDBusInterface *m_device;
-+    QString m_udi;
-+    mutable QVariantMap m_cache;
-+
-+    void initInterfaces();
-+    QStringList m_interfaces;
-+
-+    void checkCache(const QString &key) const;
-+    QString introspect() const;
-+};
-+
-+}
-+}
-+}
-+
-+#endif // UDISKS2DEVICE_H
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksdeviceinterface.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksdeviceinterface.cpp
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksdeviceinterface.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksdeviceinterface.cpp	2012-06-27 21:52:42.088597220 +0200
-@@ -0,0 +1,33 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include "udisksdeviceinterface.h"
-+
-+using namespace Solid::Backends::UDisks2;
-+
-+DeviceInterface::DeviceInterface(Device *device)
-+    : QObject(device), m_device(device)
-+{
-+
-+}
-+
-+DeviceInterface::~DeviceInterface()
-+{
-+}
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksdeviceinterface.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksdeviceinterface.h
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksdeviceinterface.h	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksdeviceinterface.h	2012-06-27 21:52:42.088597220 +0200
-@@ -0,0 +1,148 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef UDISKS2DEVICEINTERFACE_H
-+#define UDISKS2DEVICEINTERFACE_H
-+
-+#include <ifaces/deviceinterface.h>
-+#include "udisksdevice.h"
-+
-+#include <QtCore/QObject>
-+#include <QtCore/QStringList>
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+
-+class DeviceInterface : public QObject, virtual public Solid::Ifaces::DeviceInterface
-+{
-+    Q_OBJECT
-+    Q_INTERFACES(Solid::Ifaces::DeviceInterface)
-+public:
-+    DeviceInterface(Device *device);
-+    virtual ~DeviceInterface();
-+
-+protected:
-+    Device *m_device;
-+
-+public:
-+    inline static QStringList toStringList(Solid::DeviceInterface::Type type)
-+    {
-+        QStringList list;
-+
-+        switch(type)
-+        {
-+        case Solid::DeviceInterface::GenericInterface:
-+            list << "generic";
-+            break;
-+        case Solid::DeviceInterface::Processor:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::Block:
-+            list << "block";
-+            break;
-+        case Solid::DeviceInterface::StorageAccess:
-+            list << "volume";
-+            break;
-+        case Solid::DeviceInterface::StorageDrive:
-+            list << "storage";
-+            break;
-+        case Solid::DeviceInterface::OpticalDrive:
-+            list << "storage.cdrom";
-+            break;
-+        case Solid::DeviceInterface::StorageVolume:
-+            list << "volume";
-+            break;
-+        case Solid::DeviceInterface::OpticalDisc:
-+            list << "volume.disc";
-+            break;
-+        case Solid::DeviceInterface::Camera:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::PortableMediaPlayer:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::NetworkInterface:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::AcAdapter:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::Battery:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::Button:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::AudioInterface:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::DvbInterface:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::Video:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::SerialInterface:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::InternetGateway:
-+            break;
-+        case Solid::DeviceInterface::SmartCardReader:
-+            // Doesn't exist with UDisks
-+        case Solid::DeviceInterface::NetworkShare:
-+            // Doesn't exist with UDisks
-+            break;
-+        case Solid::DeviceInterface::Unknown:
-+            break;
-+        case Solid::DeviceInterface::Last:
-+            break;
-+        }
-+
-+        return list;
-+    }
-+
-+    inline static Solid::DeviceInterface::Type fromString(const QString &capability)
-+    {
-+        if (capability == "generic")
-+            return Solid::DeviceInterface::GenericInterface;
-+        else if (capability == "block")
-+            return Solid::DeviceInterface::Block;
-+        else if (capability == "storage")
-+            return Solid::DeviceInterface::StorageDrive;
-+        else if (capability == "storage.cdrom")
-+            return Solid::DeviceInterface::OpticalDrive;
-+        else if (capability == "volume")
-+            return Solid::DeviceInterface::StorageVolume;
-+        else if (capability == "volume.disc")
-+            return Solid::DeviceInterface::OpticalDisc;
-+        else
-+            return Solid::DeviceInterface::Unknown;
-+    }
-+};
-+
-+}
-+}
-+}
-+
-+#endif // UDISKS2DEVICEINTERFACE_H
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksgenericinterface.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksgenericinterface.cpp
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksgenericinterface.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksgenericinterface.cpp	2012-06-27 21:52:42.088597220 +0200
-@@ -0,0 +1,53 @@
-+/*
-+    Copyright 2009 Pino Toscano <pino@kde.org>
-+    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include "udisksgenericinterface.h"
-+
-+#include "udisksdevice.h"
-+
-+using namespace Solid::Backends::UDisks2;
-+
-+GenericInterface::GenericInterface(Device *device)
-+    : DeviceInterface(device)
-+{
-+    connect(device, SIGNAL(propertyChanged(QMap<QString,int>)),
-+            this, SIGNAL(propertyChanged(QMap<QString,int>)));
-+}
-+
-+GenericInterface::~GenericInterface()
-+{
-+}
-+
-+QVariant GenericInterface::property(const QString &key) const
-+{
-+    return m_device->prop(key);
-+}
-+
-+QVariantMap GenericInterface::allProperties() const
-+{
-+    return m_device->allProperties();
-+}
-+
-+bool GenericInterface::propertyExists(const QString &key) const
-+{
-+    return m_device->propertyExists(key);
-+}
-+
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksgenericinterface.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksgenericinterface.h
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksgenericinterface.h	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksgenericinterface.h	2012-06-27 21:52:42.089597220 +0200
-@@ -0,0 +1,57 @@
-+/*
-+    Copyright 2009 Pino Toscano <pino@kde.org>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef SOLID_BACKENDS_UDISKS2_GENERICINTERFACE_H
-+#define SOLID_BACKENDS_UDISKS2_GENERICINTERFACE_H
-+
-+#include <solid/ifaces/genericinterface.h>
-+#include <solid/genericinterface.h>
-+#include "udisksdeviceinterface.h"
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+class Device;
-+
-+class GenericInterface : public DeviceInterface, virtual public Solid::Ifaces::GenericInterface
-+{
-+    Q_OBJECT
-+    Q_INTERFACES(Solid::Ifaces::GenericInterface)
-+
-+public:
-+    GenericInterface(Device *device);
-+    virtual ~GenericInterface();
-+
-+    virtual QVariant property(const QString &key) const;
-+    virtual QVariantMap allProperties() const;
-+    virtual bool propertyExists(const QString &key) const;
-+
-+Q_SIGNALS:
-+    void propertyChanged(const QMap<QString, int> &changes);
-+    void conditionRaised(const QString &condition, const QString &reason);
-+};
-+}
-+}
-+}
-+
-+#endif // SOLID_BACKENDS_UDISKS2_GENERICINTERFACE_H
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksmanager.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksmanager.cpp
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksmanager.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksmanager.cpp	2012-06-27 21:52:42.089597220 +0200
-@@ -0,0 +1,227 @@
-+/*
-+    Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include "udisksmanager.h"
-+
-+#include <QtCore/QDebug>
-+#include <QtDBus>
-+
-+#include "../shared/rootdevice.h"
-+
-+using namespace Solid::Backends::UDisks2;
-+using namespace Solid::Backends::Shared;
-+
-+Manager::Manager(QObject *parent)
-+    : Solid::Ifaces::DeviceManager(parent),
-+      m_manager(UD2_DBUS_SERVICE,
-+                UD2_DBUS_PATH,
-+                QDBusConnection::systemBus())
-+{
-+    m_supportedInterfaces
-+            << Solid::DeviceInterface::GenericInterface
-+            << Solid::DeviceInterface::Block
-+            << Solid::DeviceInterface::StorageAccess
-+            << Solid::DeviceInterface::StorageDrive
-+            << Solid::DeviceInterface::OpticalDrive
-+            << Solid::DeviceInterface::OpticalDisc
-+            << Solid::DeviceInterface::StorageVolume;
-+
-+    qDBusRegisterMetaType<QList<QDBusObjectPath> >();
-+    qDBusRegisterMetaType<QVariantMap>();
-+    qDBusRegisterMetaType<QVariantMapMap>();
-+    qDBusRegisterMetaType<QByteArrayList>();
-+    qDBusRegisterMetaType<DBUSManagerStruct>();
-+
-+    bool serviceFound = m_manager.isValid();
-+    if (!serviceFound) {
-+        // find out whether it will be activated automatically
-+        QDBusMessage message = QDBusMessage::createMethodCall("org.freedesktop.DBus",
-+                                                              "/org/freedesktop/DBus",
-+                                                              "org.freedesktop.DBus",
-+                                                              "ListActivatableNames");
-+
-+        QDBusReply<QStringList> reply = QDBusConnection::systemBus().call(message);
-+        if (reply.isValid() && reply.value().contains(UD2_DBUS_SERVICE)) {
-+            QDBusConnection::systemBus().interface()->startService(UD2_DBUS_SERVICE);
-+            serviceFound = true;
-+        }
-+    }
-+
-+    if (serviceFound) {
-+        connect(&m_manager, SIGNAL(InterfacesAdded(QDBusObjectPath, QVariantMapMap)),
-+                this, SLOT(slotInterfacesAdded(QDBusObjectPath,QVariantMapMap)));
-+        connect(&m_manager, SIGNAL(InterfacesRemoved(QDBusObjectPath,QStringList)),
-+                this, SLOT(slotInterfacesRemoved(QDBusObjectPath,QStringList)));
-+    }
-+}
-+
-+Manager::~Manager()
-+{
-+}
-+
-+QObject* Manager::createDevice(const QString& udi)
-+{
-+    if (udi==udiPrefix()) {
-+        RootDevice *root = new RootDevice(udi);
-+
-+        root->setProduct(tr("Storage"));
-+        root->setDescription(tr("Storage devices"));
-+        root->setIcon("server-database"); // Obviously wasn't meant for that, but maps nicely in oxygen icon set :-p
-+
-+        return root;
-+    } else if (deviceCache().contains(udi)) {
-+        return new Device(udi);
-+    } else {
-+        return 0;
-+    }
-+}
-+
-+QStringList Manager::devicesFromQuery(const QString& parentUdi, Solid::DeviceInterface::Type type)
-+{
-+    QStringList result;
-+
-+    if (!parentUdi.isEmpty())
-+    {
-+        Q_FOREACH (const QString &udi, deviceCache())
-+        {
-+            Device device(udi);
-+            if (device.queryDeviceInterface(type) && device.parentUdi() == parentUdi)
-+                result << udi;
-+        }
-+
-+        return result;
-+    }
-+    else if (type != Solid::DeviceInterface::Unknown)
-+    {
-+        Q_FOREACH (const QString &udi, deviceCache())
-+        {
-+            Device device(udi);
-+            if (device.queryDeviceInterface(type))
-+                result << udi;
-+        }
-+
-+        return result;
-+    }
-+
-+    return deviceCache();
-+}
-+
-+QStringList Manager::allDevices()
-+{
-+    m_deviceCache.clear();
-+
-+    QDBusPendingReply<DBUSManagerStruct> reply = m_manager.GetManagedObjects();
-+    reply.waitForFinished();
-+    if (!reply.isError()) {  // enum devices
-+        m_deviceCache << udiPrefix();
-+
-+        Q_FOREACH(const QDBusObjectPath &path, reply.value().keys()) {
-+            const QString udi = path.path();
-+            //qDebug() << "Adding device" << udi;
-+
-+            if (udi == UD2_DBUS_PATH_MANAGER || udi == UD2_UDI_DISKS_PREFIX || udi.startsWith(UD2_DBUS_PATH_JOBS))
-+                continue;
-+
-+            Device device(udi);
-+            if (device.mightBeOpticalDisc()) {
-+                QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, udi, DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
-+                                                     SLOT(slotMediaChanged(QDBusMessage)));
-+                if (!device.isOpticalDisc())  // skip empty CD disc
-+                    continue;
-+            }
-+
-+            m_deviceCache.append(udi);
-+        }
-+    }
-+    else  // show error
-+    {
-+        qWarning() << "Failed enumerating UDisks2 objects:" << reply.error().name() << "\n" << reply.error().message();
-+    }
-+
-+    return m_deviceCache;
-+}
-+
-+
-+QSet< Solid::DeviceInterface::Type > Manager::supportedInterfaces() const
-+{
-+    return m_supportedInterfaces;
-+}
-+
-+QString Manager::udiPrefix() const
-+{
-+    return UD2_UDI_DISKS_PREFIX;
-+}
-+
-+void Manager::slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties)
-+{
-+    const QString udi = object_path.path();
-+
-+    qDebug() << udi << "has new interfaces:" << interfaces_and_properties.keys();
-+
-+    // new device, we don't know it yet
-+    if (!m_deviceCache.contains(udi)) {
-+        m_deviceCache.append(udi);
-+        Q_EMIT deviceAdded(udi);
-+    }
-+}
-+
-+void Manager::slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces)
-+{
-+    const QString udi = object_path.path();
-+
-+    qDebug() << udi << "lost interfaces:" << interfaces;
-+
-+    Device device(udi);
-+
-+    if (!udi.isEmpty() && (interfaces.isEmpty() || device.interfaces().isEmpty() || device.interfaces().contains(UD2_DBUS_INTERFACE_FILESYSTEM))) {
-+        Q_EMIT deviceRemoved(udi);
-+        m_deviceCache.removeAll(udi);
-+    }
-+}
-+
-+void Manager::slotMediaChanged(const QDBusMessage & msg)
-+{
-+    const QVariantMap properties = qdbus_cast<QVariantMap>(msg.arguments().at(1));
-+
-+    if (!properties.contains("Size"))  // react only on Size changes
-+        return;
-+
-+    const QString udi = msg.path();
-+    qulonglong size = properties.value("Size").toULongLong();
-+    qDebug() << "MEDIA CHANGED in" << udi << "; size is:" << size;
-+
-+    if (!m_deviceCache.contains(udi) && size > 0) { // we don't know the optdisc, got inserted
-+        m_deviceCache.append(udi);
-+        Q_EMIT deviceAdded(udi);
-+    }
-+
-+    if (m_deviceCache.contains(udi) && size == 0) {  // we know the optdisc, got removed
-+        Q_EMIT deviceRemoved(udi);
-+        m_deviceCache.removeAll(udi);
-+    }
-+}
-+
-+const QStringList & Manager::deviceCache()
-+{
-+    if (m_deviceCache.isEmpty())
-+        allDevices();
-+
-+    return m_deviceCache;
-+}
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksmanager.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksmanager.h
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksmanager.h	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksmanager.h	2012-06-27 21:52:42.091597220 +0200
-@@ -0,0 +1,69 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef UDISKS2MANAGER_H
-+#define UDISKS2MANAGER_H
-+
-+#include "udisks2.h"
-+#include "udisksdevice.h"
-+#include "dbus/manager.h"
-+
-+#include "solid/ifaces/devicemanager.h"
-+
-+#include <QtDBus/QDBusInterface>
-+#include <QtCore/QSet>
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+
-+class Manager: public Solid::Ifaces::DeviceManager
-+{
-+    Q_OBJECT
-+
-+public:
-+    Manager(QObject *parent);
-+    virtual QObject* createDevice(const QString& udi);
-+    virtual QStringList devicesFromQuery(const QString& parentUdi, Solid::DeviceInterface::Type type);
-+    virtual QStringList allDevices();
-+    virtual QSet< Solid::DeviceInterface::Type > supportedInterfaces() const;
-+    virtual QString udiPrefix() const;
-+    virtual ~Manager();
-+
-+private Q_SLOTS:
-+    void slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties);
-+    void slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces);
-+    void slotMediaChanged(const QDBusMessage &msg);
-+
-+private:
-+    const QStringList &deviceCache();
-+    QSet<Solid::DeviceInterface::Type> m_supportedInterfaces;
-+    org::freedesktop::DBus::ObjectManager m_manager;
-+    QStringList m_deviceCache;
-+};
-+
-+}
-+}
-+}
-+#endif // UDISKS2MANAGER_H
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldisc.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldisc.cpp
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldisc.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldisc.cpp	2012-06-27 21:52:42.092597220 +0200
-@@ -0,0 +1,277 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010 - 2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include <sys/types.h>
-+#include <unistd.h>
-+#include <sys/stat.h>
-+#include <fcntl.h>
-+
-+#include <QtCore/QFile>
-+#include <QtDBus/QDBusConnection>
-+
-+#include "../shared/udevqtclient.h"
-+
-+#include "udisks2.h"
-+#include "udisksopticaldisc.h"
-+
-+// inspired by http://cgit.freedesktop.org/hal/tree/hald/linux/probing/probe-volume.c
-+static Solid::OpticalDisc::ContentType advancedDiscDetect(const QByteArray & device_file)
-+{
-+    /* the discs block size */
-+    unsigned short bs;
-+    /* the path table size */
-+    unsigned short ts;
-+    /* the path table location (in blocks) */
-+    unsigned int tl;
-+    /* length of the directory name in current path table entry */
-+    unsigned char len_di = 0;
-+    /* the number of the parent directory's path table entry */
-+    unsigned int parent = 0;
-+    /* filename for the current path table entry */
-+    char dirname[256];
-+    /* our position into the path table */
-+    int pos = 0;
-+    /* the path table record we're on */
-+    int curr_record = 1;
-+
-+    Solid::OpticalDisc::ContentType result = Solid::OpticalDisc::NoContent;
-+
-+    int fd = open(device_file.constData(), O_RDONLY);
-+
-+    /* read the block size */
-+    lseek (fd, 0x8080, SEEK_CUR);
-+    if (read (fd, &bs, 2) != 2)
-+    {
-+        qDebug("Advanced probing on %s failed while reading block size", qPrintable(device_file));
-+        goto out;
-+    }
-+
-+    /* read in size of path table */
-+    lseek (fd, 2, SEEK_CUR);
-+    if (read (fd, &ts, 2) != 2)
-+    {
-+        qDebug("Advanced probing on %s failed while reading path table size", qPrintable(device_file));
-+        goto out;
-+    }
-+
-+    /* read in which block path table is in */
-+    lseek (fd, 6, SEEK_CUR);
-+    if (read (fd, &tl, 4) != 4)
-+    {
-+        qDebug("Advanced probing on %s failed while reading path table block", qPrintable(device_file));
-+        goto out;
-+    }
-+
-+    /* seek to the path table */
-+    lseek (fd, bs * tl, SEEK_SET);
-+
-+    /* loop through the path table entries */
-+    while (pos < ts)
-+    {
-+        /* get the length of the filename of the current entry */
-+        if (read (fd, &len_di, 1) != 1)
-+        {
-+            qDebug("Advanced probing on %s failed, cannot read more entries", qPrintable(device_file));
-+            break;
-+        }
-+
-+        /* get the record number of this entry's parent
-+           i'm pretty sure that the 1st entry is always the top directory */
-+        lseek (fd, 5, SEEK_CUR);
-+        if (read (fd, &parent, 2) != 2)
-+        {
-+            qDebug("Advanced probing on %s failed, couldn't read parent entry", qPrintable(device_file));
-+            break;
-+        }
-+
-+        /* read the name */
-+        if (read (fd, dirname, len_di) != len_di)
-+        {
-+            qDebug("Advanced probing on %s failed, couldn't read the entry name", qPrintable(device_file));
-+            break;
-+        }
-+        dirname[len_di] = 0;
-+
-+        /* if we found a folder that has the root as a parent, and the directory name matches
-+           one of the special directories then set the properties accordingly */
-+        if (parent == 1)
-+        {
-+            if (!strcasecmp (dirname, "VIDEO_TS"))
-+            {
-+                qDebug("Disc in %s is a Video DVD", qPrintable(device_file));
-+                result = Solid::OpticalDisc::VideoDvd;
-+                break;
-+            }
-+            else if (!strcasecmp (dirname, "BDMV"))
-+            {
-+                qDebug("Disc in %s is a Blu-ray video disc", qPrintable(device_file));
-+                result = Solid::OpticalDisc::VideoBluRay;
-+                break;
-+            }
-+            else if (!strcasecmp (dirname, "VCD"))
-+            {
-+                qDebug("Disc in %s is a Video CD", qPrintable(device_file));
-+                result = Solid::OpticalDisc::VideoCd;
-+                break;
-+            }
-+            else if (!strcasecmp (dirname, "SVCD"))
-+            {
-+                qDebug("Disc in %s is a Super Video CD", qPrintable(device_file));
-+                result = Solid::OpticalDisc::SuperVideoCd;
-+                break;
-+            }
-+        }
-+
-+        /* all path table entries are padded to be even,
-+           so if this is an odd-length table, seek a byte to fix it */
-+        if (len_di%2 == 1)
-+        {
-+            lseek (fd, 1, SEEK_CUR);
-+            pos++;
-+        }
-+
-+        /* update our position */
-+        pos += 8 + len_di;
-+        curr_record++;
-+    }
-+
-+    close(fd);
-+    return result;
-+
-+out:
-+    /* go back to the start of the file */
-+    lseek (fd, 0, SEEK_SET);
-+    close(fd);
-+    return result;
-+}
-+
-+using namespace Solid::Backends::UDisks2;
-+
-+OpticalDisc::OpticalDisc(Device *dev)
-+    : StorageVolume(dev), m_needsReprobe(true), m_cachedContent(Solid::OpticalDisc::NoContent)
-+{
-+    UdevQt::Client client(this);
-+    m_udevDevice = client.deviceByDeviceFile(device());
-+    //qDebug() << "udev device:" << m_udevDevice.name() << "valid:" << m_udevDevice.isValid();
-+    /*qDebug() << "\tProperties:" << */ m_udevDevice.deviceProperties(); // initialize the properties DB so that it doesn't crash further down, #298416
-+
-+    m_drive = new Device(m_device->prop("Drive").value<QDBusObjectPath>().path());
-+    QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, m_drive->udi(), DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
-+                                         SLOT(slotDrivePropertiesChanged(QString,QVariantMap,QStringList)));
-+}
-+
-+OpticalDisc::~OpticalDisc()
-+{
-+    delete m_drive;
-+}
-+
-+qulonglong OpticalDisc::capacity() const
-+{
-+    return m_device->prop("Size").toULongLong();
-+}
-+
-+bool OpticalDisc::isRewritable() const
-+{
-+    // the hard way, udisks has no notion of a disc "rewritability"
-+    const QString mediaType = media();
-+    return mediaType == "optical_cd_rw" || mediaType == "optical_dvd_rw" || mediaType == "optical_dvd_ram" ||
-+            mediaType == "optical_dvd_plus_rw" || mediaType == "optical_dvd_plus_rw_dl" ||
-+            mediaType == "optical_bd_re" || mediaType == "optical_hddvd_rw";
-+}
-+
-+bool OpticalDisc::isBlank() const
-+{
-+    return m_drive->prop("OpticalBlank").toBool();
-+}
-+
-+bool OpticalDisc::isAppendable() const
-+{
-+    //qDebug() << "appendable prop" << m_udevDevice.deviceProperty("ID_CDROM_MEDIA_STATE");
-+    return m_udevDevice.deviceProperty("ID_CDROM_MEDIA_STATE").toString() == QLatin1String("appendable");
-+}
-+
-+Solid::OpticalDisc::DiscType OpticalDisc::discType() const
-+{
-+    QMap<Solid::OpticalDisc::DiscType, QString> map;
-+    map[Solid::OpticalDisc::CdRom] = "optical_cd";
-+    map[Solid::OpticalDisc::CdRecordable] = "optical_cd_r";
-+    map[Solid::OpticalDisc::CdRewritable] = "optical_cd_rw";
-+    map[Solid::OpticalDisc::DvdRom] = "optical_dvd";
-+    map[Solid::OpticalDisc::DvdRecordable] = "optical_dvd_r";
-+    map[Solid::OpticalDisc::DvdRewritable] ="optical_dvd_rw";
-+    map[Solid::OpticalDisc::DvdRam] ="optical_dvd_ram";
-+    map[Solid::OpticalDisc::DvdPlusRecordable] ="optical_dvd_plus_r";
-+    map[Solid::OpticalDisc::DvdPlusRewritable] ="optical_dvd_plus_rw";
-+    map[Solid::OpticalDisc::DvdPlusRecordableDuallayer] ="optical_dvd_plus_r_dl";
-+    map[Solid::OpticalDisc::DvdPlusRewritableDuallayer] ="optical_dvd_plus_rw_dl";
-+    map[Solid::OpticalDisc::BluRayRom] ="optical_bd";
-+    map[Solid::OpticalDisc::BluRayRecordable] ="optical_bd_r";
-+    map[Solid::OpticalDisc::BluRayRewritable] ="optical_bd_re";
-+    map[Solid::OpticalDisc::HdDvdRom] ="optical_hddvd";
-+    map[Solid::OpticalDisc::HdDvdRecordable] ="optical_hddvd_r";
-+    map[Solid::OpticalDisc::HdDvdRewritable] ="optical_hddvd_rw";
-+    // TODO add these to Solid
-+    //map[Solid::OpticalDisc::MagnetoOptical] ="optical_mo";
-+    //map[Solid::OpticalDisc::MountRainer] ="optical_mrw";
-+    //map[Solid::OpticalDisc::MountRainerWritable] ="optical_mrw_w";
-+
-+    return map.key(media(), Solid::OpticalDisc::UnknownDiscType);  // FIXME optimize, lookup by value, not key
-+}
-+
-+Solid::OpticalDisc::ContentTypes OpticalDisc::availableContent() const
-+{
-+    if (isBlank()) {
-+        m_needsReprobe = false;
-+        return Solid::OpticalDisc::NoContent;
-+    }
-+
-+    if (m_needsReprobe) {
-+        m_cachedContent = Solid::OpticalDisc::NoContent;
-+        const bool hasData = m_drive->prop("OpticalNumDataTracks").toUInt() > 0;
-+        const bool hasAudio = m_drive->prop("OpticalNumAudioTracks").toUInt() > 0;
-+
-+        if ( hasData ) {
-+            m_cachedContent |= Solid::OpticalDisc::Data;
-+            m_cachedContent |= advancedDiscDetect(m_device->prop("Device").toByteArray());
-+        }
-+        if ( hasAudio )
-+            m_cachedContent |= Solid::OpticalDisc::Audio;
-+
-+        m_needsReprobe = false;
-+    }
-+
-+    return m_cachedContent;
-+}
-+
-+void OpticalDisc::slotDrivePropertiesChanged(const QString &ifaceName, const QVariantMap &changedProps, const QStringList &invalidatedProps)
-+{
-+    Q_UNUSED(ifaceName);
-+
-+    if (changedProps.keys().contains("Media") || invalidatedProps.contains("Media")) {
-+        m_needsReprobe = true;
-+        m_cachedContent = Solid::OpticalDisc::NoContent;
-+    }
-+}
-+
-+QString OpticalDisc::media() const
-+{
-+    return m_drive->prop("Media").toString();
-+}
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldisc.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldisc.h
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldisc.h	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldisc.h	2012-06-27 21:52:42.092597220 +0200
-@@ -0,0 +1,69 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010 - 2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef UDISKS2OPTICALDISC_H
-+#define UDISKS2OPTICALDISC_H
-+
-+#include <solid/ifaces/opticaldisc.h>
-+
-+#include "../shared/udevqtdevice.h"
-+
-+#include "udisksstoragevolume.h"
-+#include "udisksdevice.h"
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+
-+class OpticalDisc: public StorageVolume, virtual public Solid::Ifaces::OpticalDisc
-+{
-+    Q_OBJECT
-+    Q_INTERFACES(Solid::Ifaces::OpticalDisc)
-+
-+public:
-+    OpticalDisc(Device *dev);
-+    virtual ~OpticalDisc();
-+
-+    virtual qulonglong capacity() const;
-+    virtual bool isRewritable() const;
-+    virtual bool isBlank() const;
-+    virtual bool isAppendable() const;
-+    virtual Solid::OpticalDisc::DiscType discType() const;
-+    virtual Solid::OpticalDisc::ContentTypes availableContent() const;
-+
-+private Q_SLOTS:
-+    void slotDrivePropertiesChanged(const QString & ifaceName, const QVariantMap & changedProps, const QStringList & invalidatedProps);
-+
-+private:
-+    QString media() const;
-+    mutable bool m_needsReprobe;
-+    mutable Solid::OpticalDisc::ContentTypes m_cachedContent;
-+    Device * m_drive;
-+    UdevQt::Device m_udevDevice;
-+};
-+
-+}
-+}
-+}
-+#endif // UDISKS2OPTICALDISC_H
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldrive.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldrive.cpp
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldrive.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldrive.cpp	2012-06-27 21:52:42.093597220 +0200
-@@ -0,0 +1,222 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <fcntl.h>
-+#include <string.h>
-+#include <errno.h>
-+#include <unistd.h>
-+#include <stdlib.h>
-+
-+#include <QtCore/QFile>
-+#include <QtCore/QDebug>
-+
-+#include "udisksopticaldrive.h"
-+#include "udisks2.h"
-+#include "udisksdevice.h"
-+#include "dbus/manager.h"
-+
-+using namespace Solid::Backends::UDisks2;
-+
-+OpticalDrive::OpticalDrive(Device *device)
-+    : StorageDrive(device), m_ejectInProgress(false), m_readSpeed(0), m_writeSpeed(0), m_speedsInit(false)
-+{
-+    m_device->registerAction("eject", this,
-+                             SLOT(slotEjectRequested()),
-+                             SLOT(slotEjectDone(int, const QString&)));
-+
-+    connect(m_device, SIGNAL(changed()), this, SLOT(slotChanged()));
-+}
-+
-+OpticalDrive::~OpticalDrive()
-+{
-+}
-+
-+bool OpticalDrive::eject()
-+{
-+    if (m_ejectInProgress)
-+        return false;
-+    m_ejectInProgress = true;
-+    m_device->broadcastActionRequested("eject");
-+
-+    const QString path = m_device->udi();
-+    QDBusConnection c = QDBusConnection::systemBus();
-+
-+    // if the device is mounted, unmount first
-+    QString blockPath;
-+    org::freedesktop::DBus::ObjectManager manager(UD2_DBUS_SERVICE, UD2_DBUS_PATH, c);
-+    QDBusPendingReply<DBUSManagerStruct> reply = manager.GetManagedObjects();
-+    reply.waitForFinished();
-+    if (!reply.isError()) {  // enum devices
-+        Q_FOREACH(const QDBusObjectPath &objPath, reply.value().keys()) {
-+            const QString udi = objPath.path();
-+
-+            //qDebug() << "Inspecting" << udi;
-+
-+            if (udi == UD2_DBUS_PATH_MANAGER || udi == UD2_UDI_DISKS_PREFIX || udi.startsWith(UD2_DBUS_PATH_JOBS))
-+                continue;
-+
-+            Device device(udi);
-+            if (device.drivePath() == path && device.isMounted()) {
-+                //qDebug() << "Got mounted block device:" << udi;
-+                blockPath = udi;
-+                break;
-+            }
-+        }
-+    }
-+    else  // show error
-+    {
-+        qWarning() << "Failed enumerating UDisks2 objects:" << reply.error().name() << "\n" << reply.error().message();
-+    }
-+
-+    if (!blockPath.isEmpty()) {
-+        //qDebug() << "Calling unmount on" << blockPath;
-+        QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, blockPath, UD2_DBUS_INTERFACE_FILESYSTEM, "Unmount");
-+        msg << QVariantMap();   // options, unused now
-+        c.call(msg, QDBus::BlockWithGui);
-+    }
-+
-+    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, UD2_DBUS_INTERFACE_DRIVE, "Eject");
-+    msg << QVariantMap();
-+    return c.callWithCallback(msg, this, SLOT(slotDBusReply(const QDBusMessage &)), SLOT(slotDBusError(const QDBusError &)));
-+}
-+
-+void OpticalDrive::slotDBusReply(const QDBusMessage &/*reply*/)
-+{
-+    m_ejectInProgress = false;
-+    m_device->broadcastActionDone("eject");
-+}
-+
-+void OpticalDrive::slotDBusError(const QDBusError &error)
-+{
-+    m_ejectInProgress = false;
-+    m_device->broadcastActionDone("eject", m_device->errorToSolidError(error.name()),
-+                                  m_device->errorToString(error.name()) + ": " +error.message());
-+}
-+
-+void OpticalDrive::slotEjectRequested()
-+{
-+    m_ejectInProgress = true;
-+    Q_EMIT ejectRequested(m_device->udi());
-+}
-+
-+void OpticalDrive::slotEjectDone(int error, const QString &errorString)
-+{
-+    m_ejectInProgress = false;
-+    Q_EMIT ejectDone(static_cast<Solid::ErrorType>(error), errorString, m_device->udi());
-+}
-+
-+void OpticalDrive::initReadWriteSpeeds() const
-+{
-+#if 0
-+    int read_speed, write_speed;
-+    char *write_speeds = 0;
-+    QByteArray device_file = QFile::encodeName(m_device->property("Device").toString());
-+
-+    //qDebug("Doing open (\"%s\", O_RDONLY | O_NONBLOCK)", device_file.constData());
-+    int fd = open(device_file, O_RDONLY | O_NONBLOCK);
-+    if (fd < 0) {
-+        qWarning("Cannot open %s: %s", device_file.constData(), strerror (errno));
-+        return;
-+    }
-+
-+    if (get_read_write_speed(fd, &read_speed, &write_speed, &write_speeds) >= 0) {
-+        m_readSpeed = read_speed;
-+        m_writeSpeed = write_speed;
-+
-+        QStringList list = QString::fromLatin1(write_speeds).split(',', QString::SkipEmptyParts);
-+        Q_FOREACH (const QString & speed, list)
-+            m_writeSpeeds.append(speed.toInt());
-+
-+        free(write_speeds);
-+
-+        m_speedsInit = true;
-+    }
-+
-+    close(fd);
-+#endif
-+}
-+
-+QList<int> OpticalDrive::writeSpeeds() const
-+{
-+    if (!m_speedsInit)
-+        initReadWriteSpeeds();
-+    //qDebug() << "solid write speeds:" << m_writeSpeeds;
-+    return m_writeSpeeds;
-+}
-+
-+int OpticalDrive::writeSpeed() const
-+{
-+    if (!m_speedsInit)
-+        initReadWriteSpeeds();
-+    return m_writeSpeed;
-+}
-+
-+int OpticalDrive::readSpeed() const
-+{
-+    if (!m_speedsInit)
-+        initReadWriteSpeeds();
-+    return m_readSpeed;
-+}
-+
-+Solid::OpticalDrive::MediumTypes OpticalDrive::supportedMedia() const
-+{
-+    const QStringList mediaTypes = m_device->prop("MediaCompatibility").toStringList();
-+    Solid::OpticalDrive::MediumTypes supported;
-+
-+    QMap<Solid::OpticalDrive::MediumType, QString> map;
-+    map[Solid::OpticalDrive::Cdr] = "optical_cd_r";
-+    map[Solid::OpticalDrive::Cdrw] = "optical_cd_rw";
-+    map[Solid::OpticalDrive::Dvd] = "optical_dvd";
-+    map[Solid::OpticalDrive::Dvdr] = "optical_dvd_r";
-+    map[Solid::OpticalDrive::Dvdrw] ="optical_dvd_rw";
-+    map[Solid::OpticalDrive::Dvdram] ="optical_dvd_ram";
-+    map[Solid::OpticalDrive::Dvdplusr] ="optical_dvd_plus_r";
-+    map[Solid::OpticalDrive::Dvdplusrw] ="optical_dvd_plus_rw";
-+    map[Solid::OpticalDrive::Dvdplusdl] ="optical_dvd_plus_r_dl";
-+    map[Solid::OpticalDrive::Dvdplusdlrw] ="optical_dvd_plus_rw_dl";
-+    map[Solid::OpticalDrive::Bd] ="optical_bd";
-+    map[Solid::OpticalDrive::Bdr] ="optical_bd_r";
-+    map[Solid::OpticalDrive::Bdre] ="optical_bd_re";
-+    map[Solid::OpticalDrive::HdDvd] ="optical_hddvd";
-+    map[Solid::OpticalDrive::HdDvdr] ="optical_hddvd_r";
-+    map[Solid::OpticalDrive::HdDvdrw] ="optical_hddvd_rw";
-+    // TODO add these to Solid
-+    //map[Solid::OpticalDrive::Mo] ="optical_mo";
-+    //map[Solid::OpticalDrive::Mr] ="optical_mrw";
-+    //map[Solid::OpticalDrive::Mrw] ="optical_mrw_w";
-+
-+    Q_FOREACH ( const Solid::OpticalDrive::MediumType & type, map.keys() )
-+    {
-+        if ( mediaTypes.contains( map[type] ) )
-+        {
-+            supported |= type;
-+        }
-+    }
-+
-+    return supported;
-+}
-+
-+void OpticalDrive::slotChanged()
-+{
-+    m_speedsInit = false; // reset the read/write speeds, changes eg. with an inserted media
-+}
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldrive.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldrive.h
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldrive.h	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldrive.h	2012-06-27 21:52:42.093597220 +0200
-@@ -0,0 +1,81 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef UDISKS2OPTICALDRIVE_H
-+#define UDISKS2OPTICALDRIVE_H
-+
-+#include <solid/ifaces/opticaldrive.h>
-+#include "udisksstoragedrive.h"
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+
-+class OpticalDrive: public StorageDrive, virtual public Solid::Ifaces::OpticalDrive
-+{
-+    Q_OBJECT
-+    Q_INTERFACES(Solid::Ifaces::OpticalDrive)
-+
-+public:
-+    OpticalDrive(Device *device);
-+    virtual ~OpticalDrive();
-+
-+Q_SIGNALS:
-+    void ejectPressed(const QString &udi);
-+    void ejectDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
-+    void ejectRequested(const QString &udi);
-+
-+public:
-+    virtual bool eject();
-+    virtual QList<int> writeSpeeds() const;
-+    virtual int writeSpeed() const;
-+    virtual int readSpeed() const;
-+    virtual Solid::OpticalDrive::MediumTypes supportedMedia() const;
-+
-+private Q_SLOTS:
-+    void slotDBusReply(const QDBusMessage &reply);
-+    void slotDBusError(const QDBusError &error);
-+
-+    void slotEjectRequested();
-+    void slotEjectDone(int error, const QString &errorString);
-+
-+    void slotChanged();
-+
-+private:
-+    void initReadWriteSpeeds() const;
-+
-+    bool m_ejectInProgress;
-+
-+    // read/write speeds
-+    mutable int m_readSpeed;
-+    mutable int m_writeSpeed;
-+    mutable QList<int> m_writeSpeeds;
-+    mutable bool m_speedsInit;
-+};
-+
-+}
-+}
-+}
-+
-+#endif // UDISKS2OPTICALDRIVE_H
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstorageaccess.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstorageaccess.cpp
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstorageaccess.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstorageaccess.cpp	2012-06-27 21:52:42.093597220 +0200
-@@ -0,0 +1,360 @@
-+/*
-+    Copyright 2009 Pino Toscano <pino@kde.org>
-+    Copyright 2009-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include "udisksstorageaccess.h"
-+#include "udisks2.h"
-+
-+#include <QtCore/QProcess>
-+#include <QtDBus/QtDBus>
-+#include <QtGui/QApplication>
-+#include <QtGui/QWidget>
-+
-+using namespace Solid::Backends::UDisks2;
-+
-+StorageAccess::StorageAccess(Device *device)
-+    : DeviceInterface(device), m_setupInProgress(false), m_teardownInProgress(false), m_passphraseRequested(false)
-+{
-+    connect(device, SIGNAL(changed()), this, SLOT(checkAccessibility()));
-+    updateCache();
-+
-+    // Delay connecting to DBus signals to avoid the related time penalty
-+    // in hot paths such as predicate matching
-+    QTimer::singleShot(0, this, SLOT(connectDBusSignals()));
-+}
-+
-+StorageAccess::~StorageAccess()
-+{
-+}
-+
-+void StorageAccess::connectDBusSignals()
-+{
-+    m_device->registerAction("setup", this,
-+                             SLOT(slotSetupRequested()),
-+                             SLOT(slotSetupDone(int, const QString&)));
-+
-+    m_device->registerAction("teardown", this,
-+                             SLOT(slotTeardownRequested()),
-+                             SLOT(slotTeardownDone(int, const QString&)));
-+}
-+
-+bool StorageAccess::isLuksDevice() const
-+{
-+    return m_device->isEncryptedContainer(); // encrypted device
-+}
-+
-+bool StorageAccess::isAccessible() const
-+{
-+    if (isLuksDevice()) { // check if the cleartext slave is mounted
-+        if (m_clearTextPath.isEmpty() || m_clearTextPath == "/")
-+            return false;
-+        Device holderDevice(m_clearTextPath);
-+        return holderDevice.isMounted();
-+    }
-+
-+    return m_device->isMounted();
-+}
-+
-+QString StorageAccess::filePath() const
-+{
-+    if (!isAccessible())
-+        return QString();
-+
-+    QByteArrayList mntPoints;
-+
-+    if (isLuksDevice()) {  // encrypted (and unlocked) device
-+        if (m_clearTextPath.isEmpty() || m_clearTextPath == "/")
-+            return QString();
-+        Device holderDevice(m_clearTextPath);
-+        mntPoints = qdbus_cast<QByteArrayList>(holderDevice.prop("MountPoints"));
-+        if (!mntPoints.isEmpty())
-+            return QFile::decodeName(mntPoints.first()); // FIXME Solid doesn't support multiple mount points
-+        else
-+            return QString();
-+    }
-+
-+    mntPoints = qdbus_cast<QByteArrayList>(m_device->prop("MountPoints"));
-+
-+    if (!mntPoints.isEmpty())
-+        return QFile::decodeName(mntPoints.first()); // FIXME Solid doesn't support multiple mount points
-+    else
-+        return QString();
-+}
-+
-+bool StorageAccess::isIgnored() const
-+{
-+    return m_device->prop("HintIgnore").toBool(); // FIXME tune
-+}
-+
-+bool StorageAccess::setup()
-+{
-+    if ( m_teardownInProgress || m_setupInProgress )
-+        return false;
-+    m_setupInProgress = true;
-+    m_device->broadcastActionRequested("setup");
-+
-+    if (m_device->isEncryptedContainer())
-+        return requestPassphrase();
-+    else
-+        return mount();
-+}
-+
-+bool StorageAccess::teardown()
-+{
-+    if ( m_teardownInProgress || m_setupInProgress )
-+        return false;
-+    m_teardownInProgress = true;
-+    m_device->broadcastActionRequested("teardown");
-+
-+    return unmount();
-+}
-+
-+void StorageAccess::updateCache()
-+{
-+    m_isAccessible = isAccessible();
-+}
-+
-+void StorageAccess::checkAccessibility()
-+{
-+    const bool old_isAccessible = m_isAccessible;
-+    updateCache();
-+
-+    if (old_isAccessible != m_isAccessible) {
-+        Q_EMIT accessibilityChanged(m_isAccessible, isLuksDevice() ? m_clearTextPath : m_device->udi());
-+    }
-+}
-+
-+void StorageAccess::slotDBusReply( const QDBusMessage & reply )
-+{
-+    if (m_setupInProgress)
-+    {
-+        if (isLuksDevice() && !isAccessible()) { // unlocked device, now mount it
-+            if (reply.type() == QDBusMessage::ReplyMessage)  // we've got a response from Unlock
-+                m_clearTextPath = reply.arguments().value(0).value<QDBusObjectPath>().path();
-+            mount();
-+        }
-+        else // Don't broadcast setupDone unless the setup is really done. (Fix kde#271156)
-+        {
-+            m_setupInProgress = false;
-+            m_device->broadcastActionDone("setup");
-+
-+            checkAccessibility();
-+        }
-+    }
-+    else if (m_teardownInProgress)  // FIXME
-+    {
-+        if (isLuksDevice() && !m_clearTextPath.isEmpty() && m_clearTextPath != "/") // unlocked device, lock it
-+        {
-+            callCryptoTeardown();
-+        }
-+        else if (!m_clearTextPath.isEmpty() && m_clearTextPath != "/") {
-+            callCryptoTeardown(true); // Lock crypted parent
-+        }
-+        else
-+        {
-+            // try to "eject" (aka safely remove) from the (parent) drive, e.g. SD card from a reader
-+            QString drivePath = m_device->prop("Drive").value<QDBusObjectPath>().path();
-+            if (!drivePath.isEmpty() || drivePath != "/")
-+            {
-+                Device drive(drivePath);
-+                if (drive.prop("Ejectable").toBool() && !m_device->isOpticalDisc()) // optical drives have their Eject method
-+                {
-+                    QDBusConnection c = QDBusConnection::systemBus();
-+                    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, drivePath, UD2_DBUS_INTERFACE_DRIVE, "Eject");
-+                    msg << QVariantMap();   // options, unused now
-+                    c.call(msg, QDBus::NoBlock);
-+                }
-+            }
-+
-+            m_teardownInProgress = false;
-+            m_device->broadcastActionDone("teardown");
-+
-+            checkAccessibility();
-+        }
-+    }
-+}
-+
-+void StorageAccess::slotDBusError( const QDBusError & error )
-+{
-+    if (m_setupInProgress)
-+    {
-+        m_setupInProgress = false;
-+        m_device->broadcastActionDone("setup", m_device->errorToSolidError(error.name()),
-+                                      m_device->errorToString(error.name()) + ": " +error.message());
-+
-+        checkAccessibility();
-+    }
-+    else if (m_teardownInProgress)
-+    {
-+        m_teardownInProgress = false;
-+        m_clearTextPath.clear();
-+        m_device->broadcastActionDone("teardown", m_device->errorToSolidError(error.name()),
-+                                      m_device->errorToString(error.name()) + ": " + error.message());
-+        checkAccessibility();
-+    }
-+}
-+
-+void StorageAccess::slotSetupRequested()
-+{
-+    m_setupInProgress = true;
-+    //qDebug() << "SETUP REQUESTED:" << m_device->udi();
-+    Q_EMIT setupRequested(m_device->udi());
-+}
-+
-+void StorageAccess::slotSetupDone(int error, const QString &errorString)
-+{
-+    m_setupInProgress = false;
-+    //qDebug() << "SETUP DONE:" << m_device->udi();
-+    Q_EMIT setupDone(static_cast<Solid::ErrorType>(error), errorString, m_device->udi());
-+
-+    checkAccessibility();
-+}
-+
-+void StorageAccess::slotTeardownRequested()
-+{
-+    m_teardownInProgress = true;
-+    Q_EMIT teardownRequested(m_device->udi());
-+}
-+
-+void StorageAccess::slotTeardownDone(int error, const QString &errorString)
-+{
-+    m_teardownInProgress = false;
-+    m_clearTextPath.clear();
-+    Q_EMIT teardownDone(static_cast<Solid::ErrorType>(error), errorString, m_device->udi());
-+
-+    checkAccessibility();
-+}
-+
-+bool StorageAccess::mount()
-+{
-+    QString path = m_device->udi();
-+
-+    if (isLuksDevice()) { // mount options for the cleartext volume
-+        path = m_clearTextPath;
-+    }
-+
-+    QDBusConnection c = QDBusConnection::systemBus();
-+    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, UD2_DBUS_INTERFACE_FILESYSTEM, "Mount");
-+    QVariantMap options;
-+
-+    if (m_device->prop("IdType").toString() == "vfat")
-+        options.insert("options", "flush");
-+
-+    msg << options;
-+
-+    return c.callWithCallback(msg, this,
-+                              SLOT(slotDBusReply(const QDBusMessage &)),
-+                              SLOT(slotDBusError(const QDBusError &)));
-+}
-+
-+bool StorageAccess::unmount()
-+{
-+    QString path = m_device->udi();
-+
-+    if (isLuksDevice()) { // unmount options for the cleartext volume
-+        path = m_clearTextPath;
-+    }
-+
-+    QDBusConnection c = QDBusConnection::systemBus();
-+    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, UD2_DBUS_INTERFACE_FILESYSTEM, "Unmount");
-+
-+    msg << QVariantMap();   // options, unused now
-+
-+    return c.callWithCallback(msg, this,
-+                              SLOT(slotDBusReply(const QDBusMessage &)),
-+                              SLOT(slotDBusError(const QDBusError &)),
-+                              s_unmountTimeout);
-+}
-+
-+QString StorageAccess::generateReturnObjectPath()
-+{
-+    static int number = 1;
-+
-+    return "/org/kde/solid/UDisks2StorageAccess_"+QString::number(number++);
-+}
-+
-+bool StorageAccess::requestPassphrase()
-+{
-+    QString udi = m_device->udi();
-+    QString returnService = QDBusConnection::sessionBus().baseService();
-+    m_lastReturnObject = generateReturnObjectPath();
-+
-+    QDBusConnection::sessionBus().registerObject(m_lastReturnObject, this, QDBusConnection::ExportScriptableSlots);
-+
-+    QWidget *activeWindow = QApplication::activeWindow();
-+    uint wId = 0;
-+    if (activeWindow!=0)
-+        wId = (uint)activeWindow->winId();
-+
-+    QString appId = QCoreApplication::applicationName();
-+
-+    QDBusInterface soliduiserver("org.kde.kded5", "/modules/soliduiserver", "org.kde.SolidUiServer");
-+    QDBusReply<void> reply = soliduiserver.call("showPassphraseDialog", udi, returnService,
-+                                                m_lastReturnObject, wId, appId);
-+    m_passphraseRequested = reply.isValid();
-+    if (!m_passphraseRequested)
-+        qWarning() << "Failed to call the SolidUiServer, D-Bus said:" << reply.error();
-+
-+    return m_passphraseRequested;
-+}
-+
-+void StorageAccess::passphraseReply(const QString & passphrase)
-+{
-+    if (m_passphraseRequested)
-+    {
-+        QDBusConnection::sessionBus().unregisterObject(m_lastReturnObject);
-+        m_passphraseRequested = false;
-+        if (!passphrase.isEmpty())
-+            callCryptoSetup(passphrase);
-+        else
-+        {
-+            m_setupInProgress = false;
-+            m_device->broadcastActionDone("setup");
-+        }
-+    }
-+}
-+
-+void StorageAccess::callCryptoSetup(const QString & passphrase)
-+{
-+    QDBusConnection c = QDBusConnection::systemBus();
-+    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_device->udi(), UD2_DBUS_INTERFACE_ENCRYPTED, "Unlock");
-+
-+    msg << passphrase;
-+    msg << QVariantMap();   // options, unused now
-+
-+    c.callWithCallback(msg, this,
-+                       SLOT(slotDBusReply(const QDBusMessage &)),
-+                       SLOT(slotDBusError(const QDBusError &)));
-+}
-+
-+bool StorageAccess::callCryptoTeardown(bool actOnParent)
-+{
-+    QDBusConnection c = QDBusConnection::systemBus();
-+    QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE,
-+                                                      actOnParent ? (m_device->prop("CryptoBackingDevice").value<QDBusObjectPath>().path()) : m_device->udi(),
-+                                                      UD2_DBUS_INTERFACE_ENCRYPTED, "Lock");
-+    msg << QVariantMap();   // options, unused now
-+
-+    m_clearTextPath.clear();
-+
-+    return c.callWithCallback(msg, this,
-+                              SLOT(slotDBusReply(const QDBusMessage &)),
-+                              SLOT(slotDBusError(const QDBusError &)));
-+}
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstorageaccess.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstorageaccess.h
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstorageaccess.h	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstorageaccess.h	2012-06-27 21:52:42.094597220 +0200
-@@ -0,0 +1,104 @@
-+/*
-+    Copyright 2009 Pino Toscano <pino@kde.org>
-+    Copyright 2009-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef UDISKS2STORAGEACCESS_H
-+#define UDISKS2STORAGEACCESS_H
-+
-+#include <solid/ifaces/storageaccess.h>
-+#include "udisksdeviceinterface.h"
-+
-+#include <QtDBus/QDBusMessage>
-+#include <QtDBus/QDBusError>
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+class StorageAccess : public DeviceInterface, virtual public Solid::Ifaces::StorageAccess
-+{
-+    Q_OBJECT
-+    Q_INTERFACES(Solid::Ifaces::StorageAccess)
-+
-+public:
-+    StorageAccess(Device *device);
-+    virtual ~StorageAccess();
-+
-+    virtual bool isAccessible() const;
-+    virtual QString filePath() const;
-+    virtual bool isIgnored() const;
-+    virtual bool setup();
-+    virtual bool teardown();
-+
-+Q_SIGNALS:
-+    void accessibilityChanged(bool accessible, const QString &udi);
-+    void setupDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
-+    void teardownDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
-+    void setupRequested(const QString &udi);
-+    void teardownRequested(const QString &udi);
-+
-+public Q_SLOTS:
-+    Q_SCRIPTABLE Q_NOREPLY void passphraseReply(const QString & passphrase);
-+
-+private Q_SLOTS:
-+    void slotDBusReply(const QDBusMessage & reply);
-+    void slotDBusError(const QDBusError & error);
-+
-+    void connectDBusSignals();
-+
-+    void slotSetupRequested();
-+    void slotSetupDone(int error, const QString &errorString);
-+    void slotTeardownRequested();
-+    void slotTeardownDone(int error, const QString &errorString);
-+
-+    void checkAccessibility();
-+
-+private:
-+    /// @return true if this device is luks and unlocked
-+    bool isLuksDevice() const;
-+
-+    void updateCache();
-+
-+    bool mount();
-+    bool unmount();
-+
-+    bool requestPassphrase();
-+    void callCryptoSetup( const QString & passphrase );
-+    bool callCryptoTeardown( bool actOnParent=false );
-+
-+    QString generateReturnObjectPath();
-+
-+private:
-+    bool m_isAccessible;
-+    bool m_setupInProgress;
-+    bool m_teardownInProgress;
-+    bool m_passphraseRequested;
-+    QString m_lastReturnObject;
-+    QString m_clearTextPath;  // path to the unlocked cleartext device
-+
-+    static const int s_unmountTimeout = 0x7fffffff;
-+};
-+}
-+}
-+}
-+
-+#endif // UDISKS2STORAGEACCESS_H
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragedrive.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragedrive.cpp
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragedrive.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragedrive.cpp	2012-06-27 21:52:42.094597220 +0200
-@@ -0,0 +1,147 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include "udisksstoragedrive.h"
-+
-+#include "../shared/udevqtclient.h"
-+
-+#include <QtCore/QDebug>
-+#include <QtCore/QFile>
-+
-+using namespace Solid::Backends::UDisks2;
-+
-+StorageDrive::StorageDrive(Device *dev)
-+    : Block(dev)
-+{
-+    UdevQt::Client client(this);
-+    m_udevDevice = client.deviceByDeviceFile(device());
-+    m_udevDevice.deviceProperties();
-+}
-+
-+StorageDrive::~StorageDrive()
-+{
-+}
-+
-+qulonglong StorageDrive::size() const
-+{
-+    return m_device->prop("Size").toULongLong();
-+}
-+
-+bool StorageDrive::isHotpluggable() const
-+{
-+    const Solid::StorageDrive::Bus _bus = bus();
-+    return _bus == Solid::StorageDrive::Usb || _bus == Solid::StorageDrive::Ieee1394;
-+}
-+
-+bool StorageDrive::isRemovable() const
-+{
-+    return m_device->prop("MediaRemovable").toBool() || m_device->prop("Removable").toBool();
-+}
-+
-+Solid::StorageDrive::DriveType StorageDrive::driveType() const
-+{
-+    const QStringList mediaTypes = m_device->prop("MediaCompatibility").toStringList();
-+
-+    if ( m_device->isOpticalDrive() ) // optical disks
-+    {
-+        return Solid::StorageDrive::CdromDrive;
-+    }
-+    else if ( mediaTypes.contains( "floppy" ) )
-+    {
-+        return Solid::StorageDrive::Floppy;
-+    }
-+#if 0 // TODO add to Solid
-+    else if ( mediaTypes.contains( "floppy_jaz" ) )
-+    {
-+        return Solid::StorageDrive::Jaz;
-+    }
-+    else if ( mediaTypes.contains( "floppy_zip" ) )
-+    {
-+        return Solid::StorageDrive::Zip;
-+    }
-+    else if ( mediaTypes.contains( "flash" ) )
-+    {
-+        return Solid::StorageDrive::Flash;
-+    }
-+#endif
-+    else if ( mediaTypes.contains( "flash_cf" ) )
-+    {
-+        return Solid::StorageDrive::CompactFlash;
-+    }
-+    else if ( mediaTypes.contains( "flash_ms" ) )
-+    {
-+        return Solid::StorageDrive::MemoryStick;
-+    }
-+    else if ( mediaTypes.contains( "flash_sm" ) )
-+    {
-+        return Solid::StorageDrive::SmartMedia;
-+    }
-+    else if ( mediaTypes.contains( "flash_sd" ) || mediaTypes.contains( "flash_sdhc" )
-+              || mediaTypes.contains( "flash_mmc" ) || mediaTypes.contains("flash_sdxc") )
-+    {
-+        return Solid::StorageDrive::SdMmc;
-+    }
-+    // FIXME: udisks2 doesn't know about xD cards
-+    else
-+    {
-+        return Solid::StorageDrive::HardDisk;
-+    }
-+}
-+
-+Solid::StorageDrive::Bus StorageDrive::bus() const
-+{
-+    const QString bus = m_device->prop("ConnectionBus").toString();
-+    const QString udevBus = m_udevDevice.deviceProperty("ID_BUS").toString();
-+
-+    //qDebug() << "bus:" << bus << "udev bus:" << udevBus;
-+
-+    if (udevBus == "ata")
-+    {
-+        if (m_udevDevice.deviceProperty("ID_ATA_SATA").toInt() == 1) // serial ATA
-+            return Solid::StorageDrive::Sata;
-+        else  // parallel (classical) ATA
-+            return Solid::StorageDrive::Ide;
-+    }
-+    else if (bus == "usb")
-+    {
-+        return Solid::StorageDrive::Usb;
-+    }
-+    else if (bus == "ieee1394")
-+    {
-+        return Solid::StorageDrive::Ieee1394;
-+    }
-+    else if (udevBus == "scsi")
-+    {
-+        return Solid::StorageDrive::Scsi;
-+    }
-+#if 0  // TODO add these to Solid
-+    else if ( bus == "sdio" )
-+    {
-+        return Solid::StorageDrive::SDIO;
-+    }
-+    else if ( bus == "virtual" )
-+    {
-+        return Solid::StorageDrive::Virtual;
-+    }
-+#endif
-+    else
-+        return Solid::StorageDrive::Platform;
-+}
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragedrive.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragedrive.h
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragedrive.h	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragedrive.h	2012-06-27 21:52:42.095597221 +0200
-@@ -0,0 +1,61 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef UDISKS2STORAGEDRIVE_H
-+#define UDISKS2STORAGEDRIVE_H
-+
-+#include <ifaces/storagedrive.h>
-+
-+#include "../shared/udevqtdevice.h"
-+
-+#include "udisksblock.h"
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+
-+class StorageDrive: public Block, virtual public Solid::Ifaces::StorageDrive
-+{
-+    Q_OBJECT
-+    Q_INTERFACES(Solid::Ifaces::StorageDrive)
-+
-+public:
-+    StorageDrive(Device *dev);
-+    virtual ~StorageDrive();
-+
-+    virtual qulonglong size() const;
-+    virtual bool isHotpluggable() const;
-+    virtual bool isRemovable() const;
-+    virtual Solid::StorageDrive::DriveType driveType() const;
-+    virtual Solid::StorageDrive::Bus bus() const;
-+
-+private:
-+    UdevQt::Device m_udevDevice;
-+};
-+
-+}
-+}
-+}
-+
-+#endif // UDISK2SSTORAGEDRIVE_H
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragevolume.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragevolume.cpp
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragevolume.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragevolume.cpp	2012-06-27 21:52:42.095597221 +0200
-@@ -0,0 +1,105 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+    Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#include "udisksstoragevolume.h"
-+#include "udisks2.h"
-+
-+using namespace Solid::Backends::UDisks2;
-+
-+StorageVolume::StorageVolume(Device *device)
-+    : Block(device)
-+{
-+}
-+
-+StorageVolume::~StorageVolume()
-+{
-+}
-+
-+QString StorageVolume::encryptedContainerUdi() const
-+{
-+    const QString path = m_device->prop("CryptoBackingDevice").value<QDBusObjectPath>().path();
-+    if ( path.isEmpty() || path == "/")
-+        return QString();
-+    else
-+        return path;
-+}
-+
-+qulonglong StorageVolume::size() const
-+{
-+    return m_device->prop("Size").toULongLong();
-+}
-+
-+QString StorageVolume::uuid() const
-+{
-+    return m_device->prop("IdUUID").toString();
-+}
-+
-+QString StorageVolume::label() const
-+{
-+    QString label = m_device->prop("HintName").toString();
-+    if (label.isEmpty())
-+        label = m_device->prop("IdLabel").toString();
-+    if (label.isEmpty())
-+        label = m_device->prop("Name").toString();
-+    return label;
-+}
-+
-+QString StorageVolume::fsType() const
-+{
-+    return m_device->prop("IdType").toString();
-+}
-+
-+Solid::StorageVolume::UsageType StorageVolume::usage() const
-+{
-+    const QString usage = m_device->prop("IdUsage").toString();
-+
-+    if (m_device->hasInterface(UD2_DBUS_INTERFACE_FILESYSTEM))
-+    {
-+        return Solid::StorageVolume::FileSystem;
-+    }
-+    else if (m_device->isPartitionTable())
-+    {
-+        return Solid::StorageVolume::PartitionTable;
-+    }
-+    else if (usage == "raid")
-+    {
-+        return Solid::StorageVolume::Raid;
-+    }
-+    else if (m_device->isEncryptedContainer())
-+    {
-+        return Solid::StorageVolume::Encrypted;
-+    }
-+    else if (usage == "unused" || usage.isEmpty())
-+    {
-+        return Solid::StorageVolume::Unused;
-+    }
-+    else
-+    {
-+        return Solid::StorageVolume::Other;
-+    }
-+}
-+
-+bool StorageVolume::isIgnored() const
-+{
-+    const Solid::StorageVolume::UsageType usg = usage();
-+    return m_device->prop("HintIgnore").toBool() || m_device->isSwap() ||
-+            ((usg == Solid::StorageVolume::Unused || usg == Solid::StorageVolume::Other || usg == Solid::StorageVolume::PartitionTable) && !m_device->isOpticalDisc());
-+}
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragevolume.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragevolume.h
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragevolume.h	1970-01-01 01:00:00.000000000 +0100
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragevolume.h	2012-06-27 21:52:42.096597222 +0200
-@@ -0,0 +1,57 @@
-+/*
-+    Copyright 2010 Michael Zanetti <mzanetti@kde.org>
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Lesser General Public
-+    License as published by the Free Software Foundation; either
-+    version 2.1 of the License, or (at your option) version 3, or any
-+    later version accepted by the membership of KDE e.V. (or its
-+    successor approved by the membership of KDE e.V.), which shall
-+    act as a proxy defined in Section 6 of version 3 of the license.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Lesser General Public License for more details.
-+
-+    You should have received a copy of the GNU Lesser General Public
-+    License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+#ifndef UDISKS2STORAGEVOLUME_H
-+#define UDISKS2STORAGEVOLUME_H
-+
-+#include <ifaces/storagevolume.h>
-+#include "udisksblock.h"
-+
-+
-+namespace Solid
-+{
-+namespace Backends
-+{
-+namespace UDisks2
-+{
-+
-+class StorageVolume: public Block, virtual public Solid::Ifaces::StorageVolume
-+{
-+    Q_OBJECT
-+    Q_INTERFACES(Solid::Ifaces::StorageVolume)
-+
-+public:
-+    StorageVolume(Device *device);
-+    virtual ~StorageVolume();
-+
-+    virtual QString encryptedContainerUdi() const;
-+    virtual qulonglong size() const;
-+    virtual QString uuid() const;
-+    virtual QString label() const;
-+    virtual QString fsType() const;
-+    virtual Solid::StorageVolume::UsageType usage() const;
-+    virtual bool isIgnored() const;
-+};
-+
-+}
-+}
-+}
-+
-+#endif // UDISKS2STORAGEVOLUME_H
-diff -ruN kdelibs-4.8.95.orig/solid/solid/managerbase.cpp kdelibs-4.8.95/solid/solid/managerbase.cpp
---- kdelibs-4.8.95.orig/solid/solid/managerbase.cpp	2012-05-23 01:45:29.000000000 +0200
-+++ kdelibs-4.8.95/solid/solid/managerbase.cpp	2012-06-27 21:51:57.030594701 +0200
-@@ -21,7 +21,7 @@
- #include "managerbase_p.h"
- 
- #include <stdlib.h>
--#if !defined (Q_WS_WIN) && !defined (Q_OS_MAC)
-+#if !defined (Q_OS_WIN) && !defined (Q_OS_MAC)
- #include <config-solid.h>
- #endif
- 
-@@ -30,8 +30,7 @@
- #if defined (Q_OS_MAC)
- #include "backends/iokit/iokitmanager.h"
- #elif defined (Q_OS_UNIX)
--#include "backends/hal/halmanager.h"
--#include "backends/udisks/udisksmanager.h"
-+#include "backends/udisks2/udisksmanager.h"
- #include "backends/upower/upowermanager.h"
- 
- #if defined (HUPNP_FOUND)
-@@ -44,7 +43,7 @@
- 
- #include "backends/fstab/fstabmanager.h"
- 
--#elif defined (Q_WS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
-+#elif defined (Q_OS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
- #include "backends/wmi/wmimanager.h"
- #endif
- 
-@@ -68,25 +67,16 @@
- #        if defined(Q_OS_MAC)
-             m_backends << new Solid::Backends::IOKit::IOKitManager(0);
- 
--#        elif defined(Q_WS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
-+#        elif defined(Q_OS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
-             m_backends << new Solid::Backends::Wmi::WmiManager(0);
- 
--#        elif defined(Q_OS_UNIX) && !defined(Q_OS_LINUX)
--            m_backends << new Solid::Backends::Hal::HalManager(0);
--
- #        elif defined(Q_OS_LINUX)
--            bool solidHalLegacyEnabled
--                = QString::fromLocal8Bit(qgetenv("SOLID_HAL_LEGACY")).toInt()==1;
--            if (solidHalLegacyEnabled) {
--                m_backends << new Solid::Backends::Hal::HalManager(0);
--            } else {
- #               if defined(UDEV_FOUND)
-                     m_backends << new Solid::Backends::UDev::UDevManager(0);
- #               endif
--                m_backends << new Solid::Backends::UDisks::UDisksManager(0)
-+                m_backends << new Solid::Backends::UDisks2::Manager(0)
-                            << new Solid::Backends::UPower::UPowerManager(0)
-                            << new Solid::Backends::Fstab::FstabManager(0);
--            }
- #        endif
- 
- #        if defined (HUPNP_FOUND)
-diff -ruN kdelibs-4.8.95.orig/solid/tests/CMakeLists.txt kdelibs-4.8.95/solid/tests/CMakeLists.txt
---- kdelibs-4.8.95.orig/solid/tests/CMakeLists.txt	2012-05-23 01:45:29.000000000 +0200
-+++ kdelibs-4.8.95/solid/tests/CMakeLists.txt	2012-06-27 21:50:56.880591338 +0200
-@@ -16,20 +16,6 @@
- add_definitions(-DTEST_DATA="\\"${CMAKE_CURRENT_SOURCE_DIR}/../solid/backends/fakehw/fakecomputer.xml\\"")
- 
- 
--########### halbasictest ###############
--
--if(NOT WIN32 AND NOT APPLE)
--set(halbasictest_SRCS halbasictest.cpp )
--
--kde4_add_executable(halbasictest ${halbasictest_SRCS})
--
--if(WIN32)
--  set_target_properties(halbasictest PROPERTIES COMPILE_FLAGS -DSOLID_EXPORT=)
--endif(WIN32)
--
--target_link_libraries(halbasictest solid_static ${KDEWIN_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTTEST_LIBRARY} )
--endif(NOT WIN32 AND NOT APPLE)
--
- ########### solidhwtest ###############
- 
- set(solidhwtest_SRCS 

diff --git a/kde-base/kdelibs/kdelibs-4.8.95.ebuild b/kde-base/kdelibs/kdelibs-4.8.95.ebuild
index 69f8c68..b6b8fb7 100644
--- a/kde-base/kdelibs/kdelibs-4.8.95.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.8.95.ebuild
@@ -16,6 +16,7 @@ EGIT_BRANCH="KDE/4.8"
 
 DESCRIPTION="KDE libraries needed by all KDE programs."
 HOMEPAGE="http://www.kde.org/"
+SRC_URI+=" http://dev.gentoo.org/~johu/distfiles/${PN}-4.8.95-udisks2.patch.xz"
 
 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
 LICENSE="LGPL-2.1"
@@ -147,7 +148,7 @@ src_prepare() {
 	use arm && epatch "${FILESDIR}/${PN}-4.6.2-armlinking.patch"
 
 	if use udisks2; then
-		epatch "${FILESDIR}/${PN}-4.8.95-udisks2.patch"
+		epatch "${WORKDIR}/${PN}-4.8.95-udisks2.patch"
 		epatch "${FILESDIR}/${PN}-4.8.95-udisks2-includes.patch"
 	fi
 

diff --git a/kde-base/kdelibs/kdelibs-4.8.97.ebuild b/kde-base/kdelibs/kdelibs-4.8.97.ebuild
index c2d3ecd..aba5ed9 100644
--- a/kde-base/kdelibs/kdelibs-4.8.97.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.8.97.ebuild
@@ -17,6 +17,7 @@ EGIT_BRANCH="KDE/4.9"
 
 DESCRIPTION="KDE libraries needed by all KDE programs."
 HOMEPAGE="http://www.kde.org/"
+SRC_URI+=" http://dev.gentoo.org/~johu/distfiles/${PN}-4.8.95-udisks2.patch.xz"
 
 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
 LICENSE="LGPL-2.1"
@@ -148,7 +149,7 @@ src_prepare() {
 	use arm && epatch "${FILESDIR}/${PN}-4.6.2-armlinking.patch"
 
 	if use udisks2; then
-		epatch "${FILESDIR}/${PN}-4.8.95-udisks2.patch"
+		epatch "${WORKDIR}/${PN}-4.8.95-udisks2.patch"
 		epatch "${FILESDIR}/${PN}-4.8.95-udisks2-includes.patch"
 	fi
 

diff --git a/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild b/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild
index 48227d7..5da37fe 100644
--- a/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild
@@ -17,6 +17,7 @@ EGIT_BRANCH="KDE/4.9"
 
 DESCRIPTION="KDE libraries needed by all KDE programs."
 HOMEPAGE="http://www.kde.org/"
+SRC_URI+=" http://dev.gentoo.org/~johu/distfiles/${PN}-4.8.95-udisks2.patch.xz"
 
 KEYWORDS=""
 LICENSE="LGPL-2.1"
@@ -148,7 +149,7 @@ src_prepare() {
 	use arm && epatch "${FILESDIR}/${PN}-4.6.2-armlinking.patch"
 
 	if use udisks2; then
-		epatch "${FILESDIR}/${PN}-4.8.95-udisks2.patch"
+		epatch "${WORKDIR}/${PN}-4.8.95-udisks2.patch"
 		epatch "${FILESDIR}/${PN}-4.8.95-udisks2-includes.patch"
 	fi
 

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index 48227d7..5da37fe 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -17,6 +17,7 @@ EGIT_BRANCH="KDE/4.9"
 
 DESCRIPTION="KDE libraries needed by all KDE programs."
 HOMEPAGE="http://www.kde.org/"
+SRC_URI+=" http://dev.gentoo.org/~johu/distfiles/${PN}-4.8.95-udisks2.patch.xz"
 
 KEYWORDS=""
 LICENSE="LGPL-2.1"
@@ -148,7 +149,7 @@ src_prepare() {
 	use arm && epatch "${FILESDIR}/${PN}-4.6.2-armlinking.patch"
 
 	if use udisks2; then
-		epatch "${FILESDIR}/${PN}-4.8.95-udisks2.patch"
+		epatch "${WORKDIR}/${PN}-4.8.95-udisks2.patch"
 		epatch "${FILESDIR}/${PN}-4.8.95-udisks2-includes.patch"
 	fi
 



^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-08-17 15:50 Michael Palimaka
  0 siblings, 0 replies; 38+ messages in thread
From: Michael Palimaka @ 2012-08-17 15:50 UTC (permalink / raw
  To: gentoo-commits

commit:     15dd278f55dc125f32b479c04101e8a6e800b238
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 17 15:47:08 2012 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Fri Aug 17 15:47:08 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=15dd278f

[kde-base/kdelibs] Remove solaris patches as per meeting.

(Portage version: 2.1.11.10/git/Linux x86_64, unsigned Manifest commit)

---
 .../files/kdelibs-4.3.2-solaris-fileunix.patch     |   40 -------
 .../files/kdelibs-4.3.2-solaris-getgrouplist.patch |  109 --------------------
 .../files/kdelibs-4.3.2-solaris-ksyscoca.patch     |   16 ---
 kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild        |    8 --
 kde-base/kdelibs/kdelibs-9999.ebuild               |    8 --
 5 files changed, 0 insertions(+), 181 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.3.2-solaris-fileunix.patch b/kde-base/kdelibs/files/kdelibs-4.3.2-solaris-fileunix.patch
deleted file mode 100644
index c036206..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.3.2-solaris-fileunix.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Solaris has no d_type element in dir_ent.
-
-Please refer to
-  https://solaris.bionicmutton.org/hg/kde4-specs-432/rev/be96f7fc958a
-
---- kioslave/file/file_unix.cpp.orig	2009-03-10 13:26:04.000000000 +0100
-+++ kioslave/file/file_unix.cpp	2009-05-04 03:27:15.231305077 +0200
-@@ -42,7 +42,7 @@
- #include <grp.h>
- #include <utime.h>
- #include <pwd.h>
--
-+#include <sys/stat.h>
- #if defined(HAVE_LIMITS_H)
- #include <limits.h>  // PATH_MAX
- #endif
-@@ -338,15 +338,20 @@
-     // files where QFile::encodeName(QFile::decodeName(a)) != a.
-     QList<QByteArray> entryNames;
-     KDE_struct_dirent *ep;
-+    KDE_struct_stat hajmaep;
-     if (details == 0) {
-         // Fast path (for recursive deletion, mostly)
-         // Simply emit the name and file type, nothing else.
-         while ( ( ep = KDE_readdir( dp ) ) != 0 ) {
-             entry.clear();
-             entry.insert(KIO::UDSEntry::UDS_NAME, QFile::decodeName(ep->d_name));
--            entry.insert(KIO::UDSEntry::UDS_FILE_TYPE,
--                         (ep->d_type & DT_DIR) ? S_IFDIR : S_IFREG );
--            if (ep->d_type & DT_LNK) {
-+//            entry.insert(KIO::UDSEntry::UDS_FILE_TYPE,
-+//                         (ep->d_type & DT_DIR) ? S_IFDIR : S_IFREG );
-+KDE_lstat(  ep->d_name, &hajmaep );
-+entry.insert(KIO::UDSEntry::UDS_FILE_TYPE,
-+(S_ISDIR(hajmaep.st_mode)) ? S_IFDIR : S_IFREG );
-+//            if (ep->d_type & DT_LNK) {
-+if (S_ISLNK(hajmaep.st_mode)) {
-                 // for symlinks obey the UDSEntry contract and provide UDS_LINK_DEST
-                 // even if we don't know the link dest (and DeleteJob doesn't care...)
-                 entry.insert(KIO::UDSEntry::UDS_LINK_DEST, QLatin1String("Dummy Link Target"));

diff --git a/kde-base/kdelibs/files/kdelibs-4.3.2-solaris-getgrouplist.patch b/kde-base/kdelibs/files/kdelibs-4.3.2-solaris-getgrouplist.patch
deleted file mode 100644
index 59ab862..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.3.2-solaris-getgrouplist.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-Solaris does not provide getgrouplist().
-
-Please refer to
-  https://solaris.bionicmutton.org/hg/kde4-specs-432/file/539d9ed6c7b5/specs/patches/kdelibs-getgrouplist.diff
-
---- ./kio/kfile/kpropertiesdialog.cpp.orig	Tue Apr 14 23:40:16 2009
-+++ ./kio/kfile/kpropertiesdialog.cpp	Tue Apr 14 23:40:29 2009
-@@ -141,6 +141,101 @@
- #endif
- #endif
- 
-+/*-
-+ * Copyright (c) 1991, 1993
-+ *	The Regents of the University of California.  All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ *    notice, this list of conditions and the following disclaimer.
-+ * 2. Redistributions in binary form must reproduce the above copyright
-+ *    notice, this list of conditions and the following disclaimer in the
-+ *    documentation and/or other materials provided with the distribution.
-+ * 3. All advertising materials mentioning features or use of this software
-+ *    must display the following acknowledgement:
-+ *	This product includes software developed by the University of
-+ *	California, Berkeley and its contributors.
-+ * 4. Neither the name of the University nor the names of its contributors
-+ *    may be used to endorse or promote products derived from this software
-+ *    without specific prior written permission.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-+ * SUCH DAMAGE.
-+ */
-+
-+#if 0
-+#if defined(LIBC_SCCS) && !defined(lint)
-+static char sccsid[] = "@(#)getgrouplist.c	8.2 (Berkeley) 12/8/94";
-+#endif /* LIBC_SCCS and not lint */
-+#include <sys/cdefs.h>
-+__FBSDID("$FreeBSD: src/lib/libc/gen/getgrouplist.c,v 1.14 2005/05/03 16:20:03 delphij Exp $");
-+#endif
-+
-+/*
-+ * get credential
-+ */
-+#include <sys/types.h>
-+
-+#include <grp.h>
-+#include <string.h>
-+#include <unistd.h>
-+
-+int
-+getgrouplist(const char *uname, gid_t agroup, gid_t *groups, int *grpcnt)
-+{
-+	const struct group *grp;
-+	int i, maxgroups, ngroups, ret;
-+
-+	ret = 0;
-+	ngroups = 0;
-+	maxgroups = *grpcnt;
-+	/*
-+	 * When installing primary group, duplicate it;
-+	 * the first element of groups is the effective gid
-+	 * and will be overwritten when a setgid file is executed.
-+	 */
-+	groups ? groups[ngroups++] = agroup : ngroups++;
-+	if (maxgroups > 1)
-+		groups ? groups[ngroups++] = agroup : ngroups++;
-+	/*
-+	 * Scan the group file to find additional groups.
-+	 */
-+	setgrent();
-+	while ((grp = getgrent()) != NULL) {
-+		if (groups) {
-+			for (i = 0; i < ngroups; i++) {
-+				if (grp->gr_gid == groups[i])
-+					goto skip;
-+			}
-+		}
-+		for (i = 0; grp->gr_mem[i]; i++) {
-+			if (!strcmp(grp->gr_mem[i], uname)) {
-+				if (ngroups >= maxgroups) {
-+					ret = -1;
-+					break;
-+				}
-+				groups ? groups[ngroups++] = grp->gr_gid : ngroups++;
-+				break;
-+			}
-+		}
-+skip:
-+		;
-+	}
-+	endgrent();
-+	*grpcnt = ngroups;
-+	return (ret);
-+}
- using namespace KDEPrivate;
- 
- static QString nameFromFileName(QString nameStr)

diff --git a/kde-base/kdelibs/files/kdelibs-4.3.2-solaris-ksyscoca.patch b/kde-base/kdelibs/files/kdelibs-4.3.2-solaris-ksyscoca.patch
deleted file mode 100644
index 64da2e6..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.3.2-solaris-ksyscoca.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Desc:	Add needed include for mmap() on Solaris.
-Author:	Daniel Vergien
-
---- kdelibs-4.3.2/kdecore/sycoca/ksycoca.cpp.orig	2009-10-14 12:12:45.697358506 +0200
-+++ kdelibs-4.3.2/kdecore/sycoca/ksycoca.cpp	2009-10-14 12:13:16.082152232 +0200
-@@ -46,6 +46,10 @@
- 
- #include "ksycocadevices_p.h"
- 
-+/* needed on solaris 10 for mmap */
-+
-+#include <sys/mman.h>
-+
- // TODO: remove mmap() from kdewin32 and use QFile::mmap() when needed
- #ifdef Q_WS_WIN
- #undef HAVE_MMAP

diff --git a/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild b/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild
index 9348d0d..5302c91 100644
--- a/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild
@@ -197,14 +197,6 @@ src_prepare() {
 		# Try to fix kkeyserver_mac
 		epatch "${FILESDIR}"/${PN}-4.3.80-kdeui_util_kkeyserver_mac.patch
 	fi
-
-	if [[ ${CHOST} == *-solaris* ]] ; then
-		epatch "${FILESDIR}/kdelibs-4.3.2-solaris-ksyscoca.patch"
-		# getgrouplist not in solaris libc
-		epatch "${FILESDIR}/kdelibs-4.3.2-solaris-getgrouplist.patch"
-		# solaris has no d_type element in dir_ent
-		epatch "${FILESDIR}/kdelibs-4.3.2-solaris-fileunix.patch"
-	fi
 }
 
 src_configure() {

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index 9348d0d..5302c91 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -197,14 +197,6 @@ src_prepare() {
 		# Try to fix kkeyserver_mac
 		epatch "${FILESDIR}"/${PN}-4.3.80-kdeui_util_kkeyserver_mac.patch
 	fi
-
-	if [[ ${CHOST} == *-solaris* ]] ; then
-		epatch "${FILESDIR}/kdelibs-4.3.2-solaris-ksyscoca.patch"
-		# getgrouplist not in solaris libc
-		epatch "${FILESDIR}/kdelibs-4.3.2-solaris-getgrouplist.patch"
-		# solaris has no d_type element in dir_ent
-		epatch "${FILESDIR}/kdelibs-4.3.2-solaris-fileunix.patch"
-	fi
 }
 
 src_configure() {


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-08-23  7:56 Michael Palimaka
  0 siblings, 0 replies; 38+ messages in thread
From: Michael Palimaka @ 2012-08-23  7:56 UTC (permalink / raw
  To: gentoo-commits

commit:     ba93db5b57a79a9b9c7a89feae4f118aef61828e
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 23 07:55:32 2012 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu Aug 23 07:55:32 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=ba93db5b

[kde-base/kdelibs] Fully remove calculator key patch.

This is fixed upstream in 1c7ae18ef5d1b7adbb271c1164d0d899eb6d4ed8.

(Portage version: 2.1.11.10/git/Linux x86_64, unsigned Manifest commit)

---
 .../files/kdelibs-4.8.2-calculator_key.patch       |   11 -----------
 kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild        |    1 -
 kde-base/kdelibs/kdelibs-9999.ebuild               |    1 -
 3 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.2-calculator_key.patch b/kde-base/kdelibs/files/kdelibs-4.8.2-calculator_key.patch
deleted file mode 100644
index 4c481c6..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.8.2-calculator_key.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- kdeui/util/kkeyserver_x11.cpp	2012-02-25 18:53:49.480771132 -0200
-+++ kdeui/util/kkeyserver_x11.cpp	2012-02-25 18:20:38.912403430 -0200
-@@ -355,7 +355,7 @@
-     { Qt::Key_MediaRecord, XF86XK_AudioRecord },
-     { Qt::Key_LaunchMail, XF86XK_Mail },
-     { Qt::Key_Launch0,    XF86XK_MyComputer },
--    { Qt::Key_Calculator,    XF86XK_Calculator },
-+    { Qt::Key_Launch1,    XF86XK_Calculator },
-     { Qt::Key_Memo,    XF86XK_Memo },
-     { Qt::Key_ToDoList,    XF86XK_ToDoList },
-     { Qt::Key_Calendar,    XF86XK_Calendar },

diff --git a/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild b/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild
index 0d599aa..f6d4261 100644
--- a/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild
@@ -142,7 +142,6 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
-	"${FILESDIR}/${PN}-4.8.2-calculator_key.patch"
 	"${FILESDIR}/${PN}-4.8.4-bytecode.patch"
 )
 

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index 0b55157..da90413 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -144,7 +144,6 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.8.4-bytecode.patch"
 )
-#"${FILESDIR}/${PN}-4.8.2-calculator_key.patch" doesn't apply at all anymore
 
 pkg_pretend() {
 	if [[ ${MERGE_TYPE} != binary ]]; then


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-09-22 17:54 Jonathan Callen
  0 siblings, 0 replies; 38+ messages in thread
From: Jonathan Callen @ 2012-09-22 17:54 UTC (permalink / raw
  To: gentoo-commits

commit:     36014c93623cf3880b03bd1c057a3eb2a9029e65
Author:     Jonathan Callen <abcd <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 22 17:50:15 2012 +0000
Commit:     Jonathan Callen <abcd <AT> gentoo <DOT> org>
CommitDate: Sat Sep 22 17:50:15 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=36014c93

[kde-base/kdelibs] Clean up filesdir; trust that dependencies work

(Portage version: 2.2.0_alpha129/git/Linux x86_64, unsigned Manifest commit)

---
 .../kdelibs/files/kdelibs-4.6.3-bytecode.patch     |   81 --------------------
 .../kdelibs/files/kdelibs-4.8.4-kiopointer.patch   |   21 -----
 kde-base/kdelibs/files/kdelibs-4.8.4-power.patch   |   25 ------
 .../files/kdelibs-4.8.4-sopranorevert1.patch       |   28 -------
 .../files/kdelibs-4.8.4-sopranorevert2.patch       |   29 -------
 kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild        |   13 +---
 kde-base/kdelibs/kdelibs-9999.ebuild               |   13 +---
 7 files changed, 6 insertions(+), 204 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.6.3-bytecode.patch b/kde-base/kdelibs/files/kdelibs-4.6.3-bytecode.patch
deleted file mode 100644
index 736e2ae..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.6.3-bytecode.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-diff -ruN kdelibs-4.6.3.orig/cmake/modules/PythonMacros.cmake kdelibs-4.6.3/cmake/modules/PythonMacros.cmake
---- kdelibs-4.6.3.orig/cmake/modules/PythonMacros.cmake	2011-04-01 15:55:50.000000000 +0200
-+++ kdelibs-4.6.3/cmake/modules/PythonMacros.cmake	2011-06-21 22:30:18.957765437 +0200
-@@ -23,40 +23,42 @@
-   # Install the source file.
-   INSTALL(FILES ${SOURCE_FILE} DESTINATION ${DESINATION_DIR})
- 
--  # Byte compile and install the .pyc file.        
--  GET_FILENAME_COMPONENT(_absfilename ${SOURCE_FILE} ABSOLUTE)
--  GET_FILENAME_COMPONENT(_filename ${SOURCE_FILE} NAME)
--  GET_FILENAME_COMPONENT(_filenamebase ${SOURCE_FILE} NAME_WE)
--  GET_FILENAME_COMPONENT(_basepath ${SOURCE_FILE} PATH)
--
--  if(WIN32)
--    string(REGEX REPLACE ".:/" "/" _basepath "${_basepath}")
--  endif(WIN32)
--
--  SET(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename})
--  SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc)
--
--  FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath})
--
--  SET(_message "-DMESSAGE=Byte-compiling ${_bin_py}")
--
--  GET_FILENAME_COMPONENT(_abs_bin_py ${_bin_py} ABSOLUTE)
--  IF(_abs_bin_py STREQUAL ${_absfilename})    # Don't copy the file onto itself.
--    ADD_CUSTOM_COMMAND(
--      TARGET compile_python_files
--      COMMAND ${CMAKE_COMMAND} -E echo ${message}
--      COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py}
--      DEPENDS ${_absfilename}
--    )
--  ELSE(_abs_bin_py STREQUAL ${_absfilename})
--    ADD_CUSTOM_COMMAND(
--      TARGET compile_python_files
--      COMMAND ${CMAKE_COMMAND} -E echo ${message} 
--      COMMAND ${CMAKE_COMMAND} -E copy ${_absfilename} ${_bin_py}
--      COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py}
--      DEPENDS ${_absfilename}
--    )
--  ENDIF(_abs_bin_py STREQUAL ${_absfilename})
-+  # Byte compile and install the .pyc file.
-+  IF("$ENV{PYTHONDONTWRITEBYTECODE}" STREQUAL "")
-+    GET_FILENAME_COMPONENT(_absfilename ${SOURCE_FILE} ABSOLUTE)
-+    GET_FILENAME_COMPONENT(_filename ${SOURCE_FILE} NAME)
-+    GET_FILENAME_COMPONENT(_filenamebase ${SOURCE_FILE} NAME_WE)
-+    GET_FILENAME_COMPONENT(_basepath ${SOURCE_FILE} PATH)
-+
-+    if(WIN32)
-+      string(REGEX REPLACE ".:/" "/" _basepath "${_basepath}")
-+    endif(WIN32)
-+
-+    SET(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename})
-+    SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc)
-+
-+    FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath})
-+
-+    SET(_message "-DMESSAGE=Byte-compiling ${_bin_py}")
-+
-+    GET_FILENAME_COMPONENT(_abs_bin_py ${_bin_py} ABSOLUTE)
-+    IF(_abs_bin_py STREQUAL ${_absfilename})    # Don't copy the file onto itself.
-+      ADD_CUSTOM_COMMAND(
-+        TARGET compile_python_files
-+        COMMAND ${CMAKE_COMMAND} -E echo ${message}
-+        COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py}
-+        DEPENDS ${_absfilename}
-+      )
-+    ELSE(_abs_bin_py STREQUAL ${_absfilename})
-+      ADD_CUSTOM_COMMAND(
-+        TARGET compile_python_files
-+        COMMAND ${CMAKE_COMMAND} -E echo ${message}
-+        COMMAND ${CMAKE_COMMAND} -E copy ${_absfilename} ${_bin_py}
-+        COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py}
-+        DEPENDS ${_absfilename}
-+      )
-+    ENDIF(_abs_bin_py STREQUAL ${_absfilename})
- 
--  INSTALL(FILES ${_bin_pyc} DESTINATION ${DESINATION_DIR})
-+    INSTALL(FILES ${_bin_pyc} DESTINATION ${DESINATION_DIR})
-+  ENDIF("$ENV{PYTHONDONTWRITEBYTECODE}" STREQUAL "")
- ENDMACRO(PYTHON_INSTALL)

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.4-kiopointer.patch b/kde-base/kdelibs/files/kdelibs-4.8.4-kiopointer.patch
deleted file mode 100644
index a01b221..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.8.4-kiopointer.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/kio/kio/accessmanager.cpp
-+++ b/kio/kio/accessmanager.cpp
-@@ -37,7 +37,7 @@
- #include <klocalizedstring.h>
- 
- #include <QtCore/QUrl>
--#include <QtCore/QWeakPointer>
-+#include <QtCore/QPointer>
- #include <QtGui/QWidget>
- #include <QtDBus/QDBusInterface>
- #include <QtDBus/QDBusConnection>
-@@ -87,7 +87,7 @@
-     bool emitReadyReadOnMetaDataChange;
-     KIO::MetaData requestMetaData;
-     KIO::MetaData sessionMetaData;
--    QWidget* window;
-+    QPointer<QWidget> window;
- };
- 
- namespace Integration {
-

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.4-power.patch b/kde-base/kdelibs/files/kdelibs-4.8.4-power.patch
deleted file mode 100644
index 61ea0aa..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.8.4-power.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 5926264d13900efec70aaac434b7b67f9d8e6837 Mon Sep 17 00:00:00 2001
-From: Lukas Tinkl <lukas@kde.org>
-Date: Tue, 19 Jun 2012 18:27:04 +0200
-Subject: [PATCH 5/5] correctly report power saving status
-
----
- solid/solid/powermanagement.cpp |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/solid/solid/powermanagement.cpp b/solid/solid/powermanagement.cpp
-index 8dc8535..faadea4 100644
---- a/solid/solid/powermanagement.cpp
-+++ b/solid/solid/powermanagement.cpp
-@@ -73,7 +73,7 @@ Solid::PowerManagement::Notifier::Notifier()
- 
- bool Solid::PowerManagement::appShouldConserveResources()
- {
--    return globalPowerManager->powerSaveStatus;
-+    return globalPowerManager->managerIface.GetPowerSaveStatus();
- }
- 
- QSet<Solid::PowerManagement::SleepState> Solid::PowerManagement::supportedSleepStates()
--- 
-1.7.9.2
-

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.4-sopranorevert1.patch b/kde-base/kdelibs/files/kdelibs-4.8.4-sopranorevert1.patch
deleted file mode 100644
index 59c3174..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.8.4-sopranorevert1.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 76e0376d7582cfe5b898c56bf3779ca2279dace8 Mon Sep 17 00:00:00 2001
-From: Vishesh Handa <me@vhanda.in>
-Date: Thu, 14 Jun 2012 02:55:32 +0530
-Subject: [PATCH 1/5] Revert "Disconnect before re-connecting. Soprano does
- not do that for us."
-
-This reverts commit 3708be2d09700b21f934c2129218e1c7ea44efdf.
-
-This is being done so that KDE 4.8.x works with Soprano 2.7.6
----
- nepomuk/core/nepomukmainmodel.cpp |    1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/nepomuk/core/nepomukmainmodel.cpp b/nepomuk/core/nepomukmainmodel.cpp
-index 8dc0b1f..ff742d7 100644
---- a/nepomuk/core/nepomukmainmodel.cpp
-+++ b/nepomuk/core/nepomukmainmodel.cpp
-@@ -97,7 +97,6 @@ public:
-         if ( forced || (!m_socketConnectFailed && !localSocketClient.isConnected()) ) {
-             delete localSocketModel;
-             localSocketModel = 0;
--            localSocketClient.disconnect();
-             QString socketName = KGlobal::dirs()->locateLocal( "socket", "nepomuk-socket" );
-             kDebug() << "Connecting to local socket" << socketName;
-             if ( localSocketClient.connect( socketName ) ) {
--- 
-1.7.9.2
-

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.4-sopranorevert2.patch b/kde-base/kdelibs/files/kdelibs-4.8.4-sopranorevert2.patch
deleted file mode 100644
index 206e654..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.8.4-sopranorevert2.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From bde5aad1e9f7bfb6f8d5c60197797de4a315158d Mon Sep 17 00:00:00 2001
-From: Vishesh Handa <me@vhanda.in>
-Date: Thu, 14 Jun 2012 02:56:31 +0530
-Subject: [PATCH 2/5] Revert "Always rec-connect if forced (ie. when Nepomuk
- server restarts)"
-
-This reverts commit a43824a200ed76cef48a90bd3aee8547698b7c91.
-
-This is done so that 4.8.x works with Soprano 2.7.6
----
- nepomuk/core/nepomukmainmodel.cpp |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/nepomuk/core/nepomukmainmodel.cpp b/nepomuk/core/nepomukmainmodel.cpp
-index ff742d7..be23b38 100644
---- a/nepomuk/core/nepomukmainmodel.cpp
-+++ b/nepomuk/core/nepomukmainmodel.cpp
-@@ -94,7 +94,7 @@ public:
- 
-         // we may get disconnected from the server but we don't want to try
-         // to connect every time the model is requested
--        if ( forced || (!m_socketConnectFailed && !localSocketClient.isConnected()) ) {
-+        if ( !m_socketConnectFailed && !localSocketClient.isConnected() ) {
-             delete localSocketModel;
-             localSocketModel = 0;
-             QString socketName = KGlobal::dirs()->locateLocal( "socket", "nepomuk-socket" );
--- 
-1.7.9.2
-

diff --git a/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild b/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild
index f6d4261..4178699 100644
--- a/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild
@@ -198,18 +198,10 @@ src_prepare() {
 }
 
 src_configure() {
-	if use zeroconf; then
-		if has_version net-dns/avahi; then
-			mycmakeargs=(-DWITH_Avahi=ON -DWITH_DNSSD=OFF)
-		else
-			die "USE=\"zeroconf\" enabled but net-dns/avahi wasn't found."
-		fi
-	else
-		mycmakeargs=(-DWITH_Avahi=OFF -DWITH_DNSSD=OFF)
-	fi
-	mycmakeargs+=(
+	mycmakeargs=(
 		-DWITH_HSPELL=OFF
 		-DWITH_ASPELL=OFF
+		-DWITH_DNSSD=OFF
 		-DKDE_DEFAULT_HOME=.kde4
 		-DKAUTH_BACKEND=POLKITQT-1
 		-DBUILD_libkactivities=OFF
@@ -236,6 +228,7 @@ src_configure() {
 		$(cmake-utils_use_with ssl OpenSSL)
 		$(cmake-utils_use_with udev UDev)
 		$(cmake-utils_use_with upnp HUpnp)
+		$(cmake-utils_use_with zeroconf Avahi)
 	)
 	kde4-base_src_configure
 }

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index c87f773..7275417 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -201,18 +201,10 @@ src_prepare() {
 }
 
 src_configure() {
-	if use zeroconf; then
-		if has_version net-dns/avahi; then
-			mycmakeargs=(-DWITH_Avahi=ON -DWITH_DNSSD=OFF)
-		else
-			die "USE=\"zeroconf\" enabled but net-dns/avahi wasn't found."
-		fi
-	else
-		mycmakeargs=(-DWITH_Avahi=OFF -DWITH_DNSSD=OFF)
-	fi
-	mycmakeargs+=(
+	mycmakeargs=(
 		-DWITH_HSPELL=OFF
 		-DWITH_ASPELL=OFF
+		-DWITH_DNSSD=OFF
 		-DKDE_DEFAULT_HOME=.kde4
 		-DKAUTH_BACKEND=POLKITQT-1
 		-DBUILD_libkactivities=OFF
@@ -239,6 +231,7 @@ src_configure() {
 		$(cmake-utils_use_with ssl OpenSSL)
 		$(cmake-utils_use_with udev UDev)
 		$(cmake-utils_use_with upnp HUpnp)
+		$(cmake-utils_use_with zeroconf Avahi)
 	)
 	kde4-base_src_configure
 }


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-10-08  9:20 Michael Palimaka
  0 siblings, 0 replies; 38+ messages in thread
From: Michael Palimaka @ 2012-10-08  9:20 UTC (permalink / raw
  To: gentoo-commits

commit:     4e1aa27beb6572366c72812b2a51573f48da83d6
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  8 09:17:49 2012 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Mon Oct  8 09:17:49 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=4e1aa27b

[kde-base/kdelibs] Update Python byte compilation patch by Arfrever, wrt bug #437410.

(Portage version: 2.1.11.24/git/Linux x86_64, unsigned Manifest commit)

---
 ... => kdelibs-4.9.3-python-bytecompilation.patch} |   45 +++++++++++++++----
 kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild        |    2 +-
 kde-base/kdelibs/kdelibs-9999.ebuild               |    2 +-
 3 files changed, 37 insertions(+), 12 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.4-bytecode.patch b/kde-base/kdelibs/files/kdelibs-4.9.3-python-bytecompilation.patch
similarity index 61%
rename from kde-base/kdelibs/files/kdelibs-4.8.4-bytecode.patch
rename to kde-base/kdelibs/files/kdelibs-4.9.3-python-bytecompilation.patch
index 6920121..fbd14ae 100644
--- a/kde-base/kdelibs/files/kdelibs-4.8.4-bytecode.patch
+++ b/kde-base/kdelibs/files/kdelibs-4.9.3-python-bytecompilation.patch
@@ -1,7 +1,7 @@
---- cmake/modules/PythonMacros.cmake.orig	2012-05-31 23:28:04.035788719 +0200
-+++ cmake/modules/PythonMacros.cmake	2012-05-31 23:30:13.997840354 +0200
-@@ -24,39 +24,41 @@
-   INSTALL(FILES ${SOURCE_FILE} DESTINATION ${DESINATION_DIR})
+--- cmake/modules/PythonMacros.cmake
++++ cmake/modules/PythonMacros.cmake
+@@ -24,52 +24,54 @@
+   INSTALL(FILES ${SOURCE_FILE} DESTINATION ${DESTINATION_DIR})
  
    # Byte compile and install the .pyc file.        
 -  GET_FILENAME_COMPONENT(_absfilename ${SOURCE_FILE} ABSOLUTE)
@@ -14,11 +14,19 @@
 -  endif(WIN32)
 -
 -  SET(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename})
--  SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc)
+-
+-  # Python 3.2 changed the pyc file location
+-  IF(PYTHON_SHORT_VERSION GREATER 3.1)
+-    # To get the right version for suffix
+-    STRING(REPLACE "." "" _suffix ${PYTHON_SHORT_VERSION})
+-    SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/__pycache__/${_filenamebase}.cpython-${_suffix}.pyc)
+-  ELSE(PYTHON_SHORT_VERSION GREATER 3.1)
+-    SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc)
+-  ENDIF(PYTHON_SHORT_VERSION GREATER 3.1)
 -
 -  FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath})
 -
--  SET(_message "-DMESSAGE=Byte-compiling ${_bin_py}")
+-  SET(_message "Byte-compiling ${_bin_py}")
 -
 -  GET_FILENAME_COMPONENT(_abs_bin_py ${_bin_py} ABSOLUTE)
 -  IF(_abs_bin_py STREQUAL ${_absfilename})    # Don't copy the file onto itself.
@@ -37,6 +45,10 @@
 -      DEPENDS ${_absfilename}
 -    )
 -  ENDIF(_abs_bin_py STREQUAL ${_absfilename})
+-
+-  IF(PYTHON_SHORT_VERSION GREATER 3.1)
+-    INSTALL(FILES ${_bin_pyc} DESTINATION ${DESTINATION_DIR}/__pycache__/)
+-  ELSE (PYTHON_SHORT_VERSION GREATER 3.1)
 +  IF("$ENV{PYTHONDONTWRITEBYTECODE}" STREQUAL "")
 +    GET_FILENAME_COMPONENT(_absfilename ${SOURCE_FILE} ABSOLUTE)
 +    GET_FILENAME_COMPONENT(_filename ${SOURCE_FILE} NAME)
@@ -48,11 +60,19 @@
 +    endif(WIN32)
 +
 +    SET(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename})
-+    SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc)
++
++    # Python 3.2 changed the pyc file location
++    IF(PYTHON_SHORT_VERSION GREATER 3.1)
++      # To get the right version for suffix
++      STRING(REPLACE "." "" _suffix ${PYTHON_SHORT_VERSION})
++      SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/__pycache__/${_filenamebase}.cpython-${_suffix}.pyc)
++    ELSE(PYTHON_SHORT_VERSION GREATER 3.1)
++      SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc)
++    ENDIF(PYTHON_SHORT_VERSION GREATER 3.1)
 +
 +    FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath})
 +
-+    SET(_message "-DMESSAGE=Byte-compiling ${_bin_py}")
++    SET(_message "Byte-compiling ${_bin_py}")
 +
 +    GET_FILENAME_COMPONENT(_abs_bin_py ${_bin_py} ABSOLUTE)
 +    IF(_abs_bin_py STREQUAL ${_absfilename})    # Don't copy the file onto itself.
@@ -71,8 +91,13 @@
 +        DEPENDS ${_absfilename}
 +      )
 +    ENDIF(_abs_bin_py STREQUAL ${_absfilename})
++
++    IF(PYTHON_SHORT_VERSION GREATER 3.1)
++      INSTALL(FILES ${_bin_pyc} DESTINATION ${DESTINATION_DIR}/__pycache__/)
++    ELSE (PYTHON_SHORT_VERSION GREATER 3.1)
+       INSTALL(FILES ${_bin_pyc} DESTINATION ${DESTINATION_DIR})
+-  ENDIF (PYTHON_SHORT_VERSION GREATER 3.1)
++    ENDIF (PYTHON_SHORT_VERSION GREATER 3.1)
  
--  INSTALL(FILES ${_bin_pyc} DESTINATION ${DESINATION_DIR})
-+    INSTALL(FILES ${_bin_pyc} DESTINATION ${DESINATION_DIR})
 +  ENDIF("$ENV{PYTHONDONTWRITEBYTECODE}" STREQUAL "")
  ENDMACRO(PYTHON_INSTALL)

diff --git a/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild b/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild
index 4178699..afc779c 100644
--- a/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild
@@ -142,7 +142,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
-	"${FILESDIR}/${PN}-4.8.4-bytecode.patch"
+	"${FILESDIR}/${PN}-4.9.3-python-bytecompilation.patch"
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index 7275417..e92eb28 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -145,7 +145,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
-	"${FILESDIR}/${PN}-4.8.4-bytecode.patch"
+	"${FILESDIR}/${PN}-4.9.3-python-bytecompilation.patch"
 )
 
 pkg_pretend() {


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-11-07 19:33 Michael Palimaka
  0 siblings, 0 replies; 38+ messages in thread
From: Michael Palimaka @ 2012-11-07 19:33 UTC (permalink / raw
  To: gentoo-commits

commit:     69d8737ffadce62a96087a5b9c485189d706864c
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  7 19:23:05 2012 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Wed Nov  7 19:23:05 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=69d8737f

[kde-base/kdelibs] Update python patch, thanks to Arfever.

Package-Manager: portage-2.1.11.31

---
 .../kdelibs-4.10.0-python-bytecompilation.patch    |  109 ++++++++++++++++++++
 kde-base/kdelibs/kdelibs-9999.ebuild               |    2 +-
 2 files changed, 110 insertions(+), 1 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.10.0-python-bytecompilation.patch b/kde-base/kdelibs/files/kdelibs-4.10.0-python-bytecompilation.patch
new file mode 100644
index 0000000..1d76e2e
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.10.0-python-bytecompilation.patch
@@ -0,0 +1,109 @@
+https://bugs.kde.org/show_bug.cgi?id=276151
+
+--- cmake/modules/PythonMacros.cmake
++++ cmake/modules/PythonMacros.cmake
+@@ -26,54 +26,56 @@
+   install(FILES ${SOURCE_FILE} DESTINATION ${DESTINATION_DIR})
+ 
+   # Byte compile and install the .pyc file.
+-  get_filename_component(_absfilename ${SOURCE_FILE} ABSOLUTE)
+-  get_filename_component(_filename ${SOURCE_FILE} NAME)
+-  get_filename_component(_filenamebase ${SOURCE_FILE} NAME_WE)
+-  get_filename_component(_basepath ${SOURCE_FILE} PATH)
+-
+-  if(WIN32)
+-    # remove drive letter
+-    string(REGEX REPLACE "^[a-zA-Z]:/" "/" _basepath "${_basepath}")
+-  endif(WIN32)
+-
+-  set(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename})
+-
+-  # Python 3.2 changed the pyc file location
+-  if(PYTHON_VERSION_STRING VERSION_GREATER 3.1)
+-    # To get the right version for suffix
+-    set(_bin_pyc "${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/__pycache__/${_filenamebase}.cpython-${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.pyc")
+-    set(_py_install_dir "${DESTINATION_DIR}/__pycache__/")
+-  else()
+-    set(_bin_pyc "${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc")
+-    set(_py_install_dir "${DESTINATION_DIR}")
+-  endif()
+-
+-  FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath})
+-
+-  # Setting because it will be displayed later, in compile_python_files
+-  set(_message "Byte-compiling ${_bin_py} to ${_bin_pyc}")
+-
+-  get_filename_component(_abs_bin_py ${_bin_py} ABSOLUTE)
+-  if(_abs_bin_py STREQUAL _absfilename)    # Don't copy the file onto itself.
+-    add_custom_command(
+-      TARGET compile_python_files
+-      COMMAND "${CMAKE_COMMAND}" -E echo "${_message}"
+-      COMMAND "${PYTHON_EXECUTABLE}" "${_python_compile_py}" "${_bin_py}"
+-      DEPENDS "${_absfilename}"
+-    )
+-  else()
+-    add_custom_command(
+-      TARGET compile_python_files
+-      COMMAND "${CMAKE_COMMAND}" -E echo "${_message}"
+-      COMMAND "${CMAKE_COMMAND}" -E copy "${_absfilename}" "${_bin_py}"
+-      COMMAND "${PYTHON_EXECUTABLE}" "${_python_compile_py}" "${_bin_py}"
+-      DEPENDS "${_absfilename}"
+-    )
+-  endif()
+-
+-  install(FILES ${_bin_pyc} DESTINATION "${_py_install_dir}")
+-  unset(_py_install_dir)
+-  unset(_message)
++  if("$ENV{PYTHONDONTWRITEBYTECODE}" STREQUAL "")
++    get_filename_component(_absfilename ${SOURCE_FILE} ABSOLUTE)
++    get_filename_component(_filename ${SOURCE_FILE} NAME)
++    get_filename_component(_filenamebase ${SOURCE_FILE} NAME_WE)
++    get_filename_component(_basepath ${SOURCE_FILE} PATH)
++
++    if(WIN32)
++      # remove drive letter
++      string(REGEX REPLACE "^[a-zA-Z]:/" "/" _basepath "${_basepath}")
++    endif(WIN32)
++
++    set(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename})
++
++    # Python 3.2 changed the pyc file location
++    if(PYTHON_VERSION_STRING VERSION_GREATER 3.1)
++      # To get the right version for suffix
++      set(_bin_pyc "${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/__pycache__/${_filenamebase}.cpython-${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.pyc")
++      set(_py_install_dir "${DESTINATION_DIR}/__pycache__/")
++    else()
++      set(_bin_pyc "${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc")
++      set(_py_install_dir "${DESTINATION_DIR}")
++    endif()
++
++    FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath})
++
++    # Setting because it will be displayed later, in compile_python_files
++    set(_message "Byte-compiling ${_bin_py} to ${_bin_pyc}")
++
++    get_filename_component(_abs_bin_py ${_bin_py} ABSOLUTE)
++    if(_abs_bin_py STREQUAL _absfilename)    # Don't copy the file onto itself.
++      add_custom_command(
++        TARGET compile_python_files
++        COMMAND "${CMAKE_COMMAND}" -E echo "${_message}"
++        COMMAND "${PYTHON_EXECUTABLE}" "${_python_compile_py}" "${_bin_py}"
++        DEPENDS "${_absfilename}"
++      )
++    else()
++      add_custom_command(
++        TARGET compile_python_files
++        COMMAND "${CMAKE_COMMAND}" -E echo "${_message}"
++        COMMAND "${CMAKE_COMMAND}" -E copy "${_absfilename}" "${_bin_py}"
++        COMMAND "${PYTHON_EXECUTABLE}" "${_python_compile_py}" "${_bin_py}"
++        DEPENDS "${_absfilename}"
++      )
++    endif()
++
++    install(FILES ${_bin_pyc} DESTINATION "${_py_install_dir}")
++    unset(_py_install_dir)
++    unset(_message)
+ 
++  endif("$ENV{PYTHONDONTWRITEBYTECODE}" STREQUAL "")
+ endmacro(PYTHON_INSTALL)
+ 

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index 47fe6d6..ad8bb86 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -144,7 +144,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
-	"${FILESDIR}/${PN}-4.9.3-python-bytecompilation.patch"
+	"${FILESDIR}/${PN}-4.10.0-python-bytecompilation.patch"
 )
 
 pkg_pretend() {


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-11-07 19:47 Michael Palimaka
  0 siblings, 0 replies; 38+ messages in thread
From: Michael Palimaka @ 2012-11-07 19:47 UTC (permalink / raw
  To: gentoo-commits

commit:     eff3696ad87ec672df1b91cd21c9df2b9ed8c276
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  7 19:41:00 2012 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Wed Nov  7 19:43:56 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=eff3696a

[kde-base/kdelibs] Remove patch merged upstream.

Upstream is fast today!

http://quickgit.kde.org/?p=kdelibs.git&a=commit&h=5966ecd67bb1572e0149834501be9eba537e4f54

Package-Manager: portage-2.1.11.31

---
 .../kdelibs-4.10.0-python-bytecompilation.patch    |  109 --------------------
 kde-base/kdelibs/kdelibs-9999.ebuild               |    1 -
 2 files changed, 0 insertions(+), 110 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.10.0-python-bytecompilation.patch b/kde-base/kdelibs/files/kdelibs-4.10.0-python-bytecompilation.patch
deleted file mode 100644
index 1d76e2e..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.10.0-python-bytecompilation.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-https://bugs.kde.org/show_bug.cgi?id=276151
-
---- cmake/modules/PythonMacros.cmake
-+++ cmake/modules/PythonMacros.cmake
-@@ -26,54 +26,56 @@
-   install(FILES ${SOURCE_FILE} DESTINATION ${DESTINATION_DIR})
- 
-   # Byte compile and install the .pyc file.
--  get_filename_component(_absfilename ${SOURCE_FILE} ABSOLUTE)
--  get_filename_component(_filename ${SOURCE_FILE} NAME)
--  get_filename_component(_filenamebase ${SOURCE_FILE} NAME_WE)
--  get_filename_component(_basepath ${SOURCE_FILE} PATH)
--
--  if(WIN32)
--    # remove drive letter
--    string(REGEX REPLACE "^[a-zA-Z]:/" "/" _basepath "${_basepath}")
--  endif(WIN32)
--
--  set(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename})
--
--  # Python 3.2 changed the pyc file location
--  if(PYTHON_VERSION_STRING VERSION_GREATER 3.1)
--    # To get the right version for suffix
--    set(_bin_pyc "${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/__pycache__/${_filenamebase}.cpython-${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.pyc")
--    set(_py_install_dir "${DESTINATION_DIR}/__pycache__/")
--  else()
--    set(_bin_pyc "${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc")
--    set(_py_install_dir "${DESTINATION_DIR}")
--  endif()
--
--  FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath})
--
--  # Setting because it will be displayed later, in compile_python_files
--  set(_message "Byte-compiling ${_bin_py} to ${_bin_pyc}")
--
--  get_filename_component(_abs_bin_py ${_bin_py} ABSOLUTE)
--  if(_abs_bin_py STREQUAL _absfilename)    # Don't copy the file onto itself.
--    add_custom_command(
--      TARGET compile_python_files
--      COMMAND "${CMAKE_COMMAND}" -E echo "${_message}"
--      COMMAND "${PYTHON_EXECUTABLE}" "${_python_compile_py}" "${_bin_py}"
--      DEPENDS "${_absfilename}"
--    )
--  else()
--    add_custom_command(
--      TARGET compile_python_files
--      COMMAND "${CMAKE_COMMAND}" -E echo "${_message}"
--      COMMAND "${CMAKE_COMMAND}" -E copy "${_absfilename}" "${_bin_py}"
--      COMMAND "${PYTHON_EXECUTABLE}" "${_python_compile_py}" "${_bin_py}"
--      DEPENDS "${_absfilename}"
--    )
--  endif()
--
--  install(FILES ${_bin_pyc} DESTINATION "${_py_install_dir}")
--  unset(_py_install_dir)
--  unset(_message)
-+  if("$ENV{PYTHONDONTWRITEBYTECODE}" STREQUAL "")
-+    get_filename_component(_absfilename ${SOURCE_FILE} ABSOLUTE)
-+    get_filename_component(_filename ${SOURCE_FILE} NAME)
-+    get_filename_component(_filenamebase ${SOURCE_FILE} NAME_WE)
-+    get_filename_component(_basepath ${SOURCE_FILE} PATH)
-+
-+    if(WIN32)
-+      # remove drive letter
-+      string(REGEX REPLACE "^[a-zA-Z]:/" "/" _basepath "${_basepath}")
-+    endif(WIN32)
-+
-+    set(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename})
-+
-+    # Python 3.2 changed the pyc file location
-+    if(PYTHON_VERSION_STRING VERSION_GREATER 3.1)
-+      # To get the right version for suffix
-+      set(_bin_pyc "${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/__pycache__/${_filenamebase}.cpython-${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.pyc")
-+      set(_py_install_dir "${DESTINATION_DIR}/__pycache__/")
-+    else()
-+      set(_bin_pyc "${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc")
-+      set(_py_install_dir "${DESTINATION_DIR}")
-+    endif()
-+
-+    FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath})
-+
-+    # Setting because it will be displayed later, in compile_python_files
-+    set(_message "Byte-compiling ${_bin_py} to ${_bin_pyc}")
-+
-+    get_filename_component(_abs_bin_py ${_bin_py} ABSOLUTE)
-+    if(_abs_bin_py STREQUAL _absfilename)    # Don't copy the file onto itself.
-+      add_custom_command(
-+        TARGET compile_python_files
-+        COMMAND "${CMAKE_COMMAND}" -E echo "${_message}"
-+        COMMAND "${PYTHON_EXECUTABLE}" "${_python_compile_py}" "${_bin_py}"
-+        DEPENDS "${_absfilename}"
-+      )
-+    else()
-+      add_custom_command(
-+        TARGET compile_python_files
-+        COMMAND "${CMAKE_COMMAND}" -E echo "${_message}"
-+        COMMAND "${CMAKE_COMMAND}" -E copy "${_absfilename}" "${_bin_py}"
-+        COMMAND "${PYTHON_EXECUTABLE}" "${_python_compile_py}" "${_bin_py}"
-+        DEPENDS "${_absfilename}"
-+      )
-+    endif()
-+
-+    install(FILES ${_bin_pyc} DESTINATION "${_py_install_dir}")
-+    unset(_py_install_dir)
-+    unset(_message)
- 
-+  endif("$ENV{PYTHONDONTWRITEBYTECODE}" STREQUAL "")
- endmacro(PYTHON_INSTALL)
- 

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index ad8bb86..e57d8e4 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -144,7 +144,6 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
-	"${FILESDIR}/${PN}-4.10.0-python-bytecompilation.patch"
 )
 
 pkg_pretend() {


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-11-08  7:51 Michael Palimaka
  0 siblings, 0 replies; 38+ messages in thread
From: Michael Palimaka @ 2012-11-08  7:51 UTC (permalink / raw
  To: gentoo-commits

commit:     df9e5972985d8cb868aaea7b409d14a1bf15eab0
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Thu Nov  8 07:49:07 2012 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu Nov  8 07:49:07 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=df9e5972

[kde-base/kdelibs] Remove -Werror, wrt bug #442278.

Package-Manager: portage-2.1.11.31

---
 kde-base/kdelibs/files/kdelibs-4.9.3-werror.patch |   20 ++++++++++++++++++++
 kde-base/kdelibs/kdelibs-4.9.3.ebuild             |    1 +
 kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild       |    1 +
 kde-base/kdelibs/kdelibs-9999.ebuild              |    1 +
 4 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.9.3-werror.patch b/kde-base/kdelibs/files/kdelibs-4.9.3-werror.patch
new file mode 100644
index 0000000..6ec0b7d
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.9.3-werror.patch
@@ -0,0 +1,20 @@
+--- cmake/modules/FindKDE4Internal.cmake
++++ cmake/modules/FindKDE4Internal.cmake
+@@ -1204,7 +1204,7 @@
+    set(CMAKE_C_FLAGS_DEBUGFULL        "-g3 -fno-inline")
+    set(CMAKE_C_FLAGS_PROFILE          "-g3 -fno-inline -ftest-coverage -fprofile-arcs")
+ 
+-   set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
++   set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
+    # As of Qt 4.6.x we need to override the new exception macros if we want compile with -fno-exceptions
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common")
+ 
+@@ -1295,7 +1295,7 @@
+       endif(NOT _compile_result)
+ 
+       if (GCC_IS_NEWER_THAN_4_2)
+-         set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=return-type -fvisibility-inlines-hidden")
++         set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden")
+       endif (GCC_IS_NEWER_THAN_4_2)
+    else (__KDE_HAVE_GCC_VISIBILITY AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR AND NOT WIN32)
+       set (__KDE_HAVE_GCC_VISIBILITY 0)

diff --git a/kde-base/kdelibs/kdelibs-4.9.3.ebuild b/kde-base/kdelibs/kdelibs-4.9.3.ebuild
index 48a0478..7f74bf0 100644
--- a/kde-base/kdelibs/kdelibs-4.9.3.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.9.3.ebuild
@@ -142,6 +142,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.9.3-python-bytecompilation.patch"
+	"${FILESDIR}/${PN}-4.9.3-werror.patch"
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild b/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild
index 22e8bb3..928a3ce 100644
--- a/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.9.49.9999.ebuild
@@ -141,6 +141,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
+	"${FILESDIR}/${PN}-4.9.3-werror.patch"
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index e57d8e4..6d09d60 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -144,6 +144,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
+	"${FILESDIR}/${PN}-4.9.3-werror.patch"
 )
 
 pkg_pretend() {


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-12-17 21:26 Andreas Hüttel
  0 siblings, 0 replies; 38+ messages in thread
From: Andreas Hüttel @ 2012-12-17 21:26 UTC (permalink / raw
  To: gentoo-commits

commit:     b11d08ac65a1d2cd83f1e9f54dd2fa008de90b5b
Author:     Andreas K. Huettel (dilfridge) <mail <AT> akhuettel <DOT> de>
AuthorDate: Mon Dec 17 21:26:08 2012 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Dec 17 21:26:08 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=b11d08ac

[kde-base/kdelibs] Update FindKipi.cmake to current kdegraphics version, otherwise some software bails out because of missing variables

Package-Manager: portage-2.2.0_alpha148

---
 .../kdelibs/files/kdelibs-4.9.90-findkipi.patch    |  242 ++++++++++++++++++++
 kde-base/kdelibs/kdelibs-4.10.49.9999.ebuild       |    1 +
 kde-base/kdelibs/kdelibs-4.9.90.ebuild             |    1 +
 kde-base/kdelibs/kdelibs-9999.ebuild               |    1 +
 4 files changed, 245 insertions(+), 0 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.9.90-findkipi.patch b/kde-base/kdelibs/files/kdelibs-4.9.90-findkipi.patch
new file mode 100644
index 0000000..050262f
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.9.90-findkipi.patch
@@ -0,0 +1,242 @@
+diff -ruN kdelibs-4.9.90.orig/cmake/modules/FindKipi.cmake kdelibs-4.9.90/cmake/modules/FindKipi.cmake
+--- kdelibs-4.9.90.orig/cmake/modules/FindKipi.cmake	2012-11-14 16:58:29.000000000 +0100
++++ kdelibs-4.9.90/cmake/modules/FindKipi.cmake	2012-12-17 22:21:25.000000000 +0100
+@@ -1,116 +1,133 @@
+-# - Try to find the Kipi library
++# Module that tries to find the Kipi library
+ #
+-# If you have put a local version of libkipi into your source tree,
+-# set KIPI_LOCAL_DIR to the relative path to the local directory.
++# Input values :
+ #
+-# Once done this will define
++# KIPI_LOCAL_DIR    - If you have put a local version of libkipi into your source tree,
++#                     set this variable to the relative path from the local directory.
+ #
+-#  KIPI_FOUND - system has libkipi
+-#  KIPI_INCLUDE_DIR - the libkipi include directory
+-#  KIPI_LIBRARIES - Link these to use libkipi
++# Output values :
++#
++#  KIPI_FOUND       - System has libkipi
++#  KIPI_INCLUDE_DIR - The libkipi include directory
++#  KIPI_LIBRARIES   - Link these to use libkipi
+ #  KIPI_DEFINITIONS - Compiler switches required for using libkipi
++#  KIPI_VERSION     - The release version of the Kipi library
++#  KIPI_SO_VERSION  - The binary SO version of the Kipi library
+ #
+ 
+-# Copyright (c) 2008, Gilles Caulier, <caulier.gilles@gmail.com>
++# Copyright (c) 2012, Victor Dodon <dodonvictor at gmail dot com>
++# Copyright (c) 2012, Gilles Caulier <caulier dot gilles at gmail dot com>
+ #
+ # Redistribution and use is allowed according to the terms of the BSD license.
+ # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+ 
+-if (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS)
+-
+-  message(STATUS "Found Kipi library in cache: ${KIPI_LIBRARIES}")
+-
+-  # in cache already
+-  set(KIPI_FOUND TRUE)
+-
+-else (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS)
++IF(${Kipi_FIND_VERSION} STREQUAL "")
++    SET(Kipi_FIND_VERSION "1.2.0")
++    MESSAGE(STATUS "No Kipi library version required. Check default version : ${Kipi_FIND_VERSION}")
++ELSE()
++    MESSAGE(STATUS "Kipi library version required : ${Kipi_FIND_VERSION}")
++ENDIF()
++
++IF(KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS AND KIPI_VERSION AND KIPI_SO_VERSION)
++
++  IF(NOT Kipi_FIND_QUIETLY)
++    MESSAGE(STATUS "Found kipi library in cache ${KIPI_LIBRARIES}")
++  ENDIF(NOT Kipi_FIND_QUIETLY)
++  # Already in cache
++  SET(KIPI_FOUND TRUE)
++
++ELSE(KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS AND KIPI_VERSION AND KIPI_SO_VERSION)
++
++  IF(NOT Kipi_FIND_QUIETLY)
++    MESSAGE(STATUS "Check Kipi library in local sub-folder...")
++  ENDIF(NOT Kipi_FIND_QUIETLY)
++
++  IF(KIPI_LOCAL_DIR)
++    FIND_FILE(KIPI_LOCAL_FOUND libkipi/version.h.cmake ${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR} NO_DEFAULT_PATH)
++    IF(NOT KIPI_LOCAL_FOUND)
++      MESSAGE(WARNING "KIPI_LOCAL_DIR specified as \"${KIPI_LOCAL_DIR}\" but libkipi could not be found there.")
++    ENDIF(NOT KIPI_LOCAL_FOUND)
++  ELSE(KIPI_LOCAL_DIR)
++    FIND_FILE(KIPI_LOCAL_FOUND libkipi/version.h.cmake ${CMAKE_SOURCE_DIR}/libkipi NO_DEFAULT_PATH)
++    IF(KIPI_LOCAL_FOUND)
++      SET(KIPI_LOCAL_DIR libkipi)
++    ENDIF(KIPI_LOCAL_FOUND)
++
++    FIND_FILE(KIPI_LOCAL_FOUND libkipi/version.h.cmake ${CMAKE_SOURCE_DIR}/libs/libkipi NO_DEFAULT_PATH)
++    IF(KIPI_LOCAL_FOUND)
++      SET(KIPI_LOCAL_DIR libs/libkipi)
++    ENDIF(KIPI_LOCAL_FOUND)
++  ENDIF(KIPI_LOCAL_DIR)
++
++  IF(KIPI_LOCAL_FOUND)
++
++    SET(KIPI_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR}" "${CMAKE_BINARY_DIR}/${KIPI_LOCAL_DIR}")
++    SET(KIPI_DEFINITIONS "-I${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR}" "-I${CMAKE_BINARY_DIR}/${KIPI_LOCAL_DIR}")
++    SET(KIPI_LIBRARIES kipi)
++    IF(NOT Kipi_FIND_QUIETLY)
++      MESSAGE(STATUS "Found Kipi library in local sub-folder: ${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR}")
++    ENDIF(NOT Kipi_FIND_QUIETLY)
++    SET(KIPI_FOUND TRUE)
++    SET(KIPI_VERSION_H_FILENAME "${CMAKE_BINARY_DIR}/${KIPI_LOCAL_DIR}/libkipi/version.h")
++
++  ELSE(KIPI_LOCAL_FOUND)
++
++    IF(NOT WIN32)
++      IF(NOT Kipi_FIND_QUIETLY)
++        MESSAGE(STATUS "Check Kipi library using pkg-config...")
++      ENDIF(NOT Kipi_FIND_QUIETLY)
++
++      INCLUDE(FindPkgConfig)
++      PKG_CHECK_MODULES(KIPI libkipi>=${Kipi_FIND_VERSION})
++    ENDIF(NOT WIN32)
++
++    FIND_LIBRARY(KIPI_LIBRARIES NAMES libkipi PATHS ${KIPI_LIBRARY_DIRS} ${LIB_INSTALL_DIR} ${KDE4_LIB_DIR})
++    FIND_PATH(KIPI_INCLUDE_DIR NAMES libkipi/version.h PATHS ${KIPI_INCLUDE_DIRS} ${INCLUDE_INSTALL_DIR} ${KDE4_INCLUDE_DIR})
++    SET(KIPI_VERSION_H_FILENAME "${KIPI_INCLUDE_DIR}/libkipi/version.h")
++    SET(KIPI_DEFINITIONS ${KIPI_CFLAGS} CACHE STRING "Kipi defintions")
++
++    INCLUDE(FindPackageHandleStandardArgs)
++    FIND_PACKAGE_HANDLE_STANDARD_ARGS(KIPI DEFAULT_MSG KIPI_LIBRARIES KIPI_INCLUDE_DIR)
++
++  ENDIF(KIPI_LOCAL_FOUND)
++
++  IF(KIPI_FOUND)
++
++    IF(NOT KIPI_VERSION)
++      FILE(READ "${KIPI_VERSION_H_FILENAME}" KIPI_VERSION_H_CONTENT)
++      STRING(REGEX REPLACE ".*static +const +char +kipi_version\\[\\] += +\"([^\"]+)\".*" "\\1" KIPI_VERSION "${KIPI_VERSION_H_CONTENT}")
++      MESSAGE(STATUS "Kipi library version: ${KIPI_VERSION}")
++    ENDIF(NOT KIPI_VERSION)
++
++    IF(NOT KIPI_SO_VERSION)
++      FILE(READ "${KIPI_VERSION_H_FILENAME}" KIPI_VERSION_H_CONTENT)
++      STRING(REGEX REPLACE
++             ".*static +const +int +kipi_binary_version +=  ([^ ;]+).*"
++             "\\1"
++             KIPI_SO_VERSION_FOUND
++             "${KIPI_VERSION_H_CONTENT}"
++            )
++      SET(KIPI_SO_VERSION ${KIPI_SO_VERSION_FOUND} CACHE STRING "libkipi so version")
++      MESSAGE(STATUS "Kipi library SO binary version: ${KIPI_SO_VERSION}")
++    ENDIF(NOT KIPI_SO_VERSION)
++
++    UNSET(KIPI_VERSION_H_CONTENT)
++    UNSET(KIPI_VERSION_H_FILENAME)
++  ENDIF(KIPI_FOUND)
++
++  IF(KIPI_FOUND)
++    MESSAGE(STATUS "libkipi: Found version ${KIPI_VERSION} (required: ${Kipi_FIND_VERSION})")
++    IF(${KIPI_VERSION} VERSION_LESS ${Kipi_FIND_VERSION})
++        SET(KIPI_FOUND FALSE)
++    ELSE()
++        MARK_AS_ADVANCED(KIPI_INCLUDE_DIR KIPI_LIBRARIES KIPI_DEFINITIONS KIPI_VERSION KIPI_SO_VERSION)
++    ENDIF()
++  ELSE(KIPI_FOUND)
++    UNSET(KIPI_INCLUDE_DIR)
++    UNSET(KIPI_LIBRARIES)
++    UNSET(KIPI_DEFINITIONS)
++    UNSET(KIPI_VERSION)
++    UNSET(KIPI_SO_VERSION)
++  ENDIF(KIPI_FOUND)
+ 
+-  message(STATUS "Check Kipi library in local sub-folder...")
+-
+-  # Check if library is not in local sub-folder
+-
+-  if (KIPI_LOCAL_DIR)
+-    set (KIPI_LOCAL_FOUND TRUE)
+-  else (KIPI_LOCAL_DIR)
+-    find_file(KIPI_LOCAL_FOUND libkipi/kipi.h ${CMAKE_SOURCE_DIR}/libkipi ${CMAKE_SOURCE_DIR}/libs/libkipi NO_DEFAULT_PATH)
+-
+-    if (KIPI_LOCAL_FOUND)
+-      # Was it found in libkdcraw/ or in libs/libkdcraw?
+-      find_file(KIPI_LOCAL_FOUND_IN_LIBS libkipi/kipi.h ${CMAKE_SOURCE_DIR}/libs/libkipi NO_DEFAULT_PATH)
+-      if (KIPI_LOCAL_FOUND_IN_LIBS)
+-        set(KIPI_LOCAL_DIR libs/libkipi)
+-      else (KIPI_LOCAL_FOUND_IN_LIBS)
+-        set(KIPI_LOCAL_DIR libkipi)
+-      endif (KIPI_LOCAL_FOUND_IN_LIBS)
+-    endif (KIPI_LOCAL_FOUND)
+-  endif (KIPI_LOCAL_DIR)
+-
+-  if (KIPI_LOCAL_FOUND)
+-    # we need two include directories: because the version.h file is put into the build directory
+-    # TODO KIPI_INCLUDE_DIR sounds like it should contain only one directory...
+-    set(KIPI_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR} ${CMAKE_BINARY_DIR}/${KIPI_LOCAL_DIR})
+-    set(KIPI_DEFINITIONS "-I${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR}" "-I${CMAKE_BINARY_DIR}/${KIPI_LOCAL_DIR}")
+-    set(KIPI_LIBRARIES kipi)
+-    message(STATUS "Found Kipi library in local sub-folder: ${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR}")
+-    set(KIPI_FOUND TRUE)
+-    mark_as_advanced(KIPI_INCLUDE_DIR KIPI_LIBRARIES KIPI_DEFINITIONS)
+-
+-  else (KIPI_LOCAL_FOUND)
+-
+-    if (NOT WIN32)
+-      message(STATUS "Check Kipi library using pkg-config...")
+-
+-      # use pkg-config to get the directories and then use these values
+-      # in the FIND_PATH() and FIND_LIBRARY() calls
+-      include(UsePkgConfig)
+-
+-      PKGCONFIG(libkipi _KIPIIncDir _KIPILinkDir _KIPILinkFlags _KIPICflags)
+-
+-      if (_KIPILinkFlags)
+-        # query pkg-config asking for a libkipi >= 0.2.0
+-        exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.2.0 libkipi RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
+-        if (_return_VALUE STREQUAL "0")
+-            message(STATUS "Found libkipi release >= 0.2.0")
+-            set(KIPI_VERSION_GOOD_FOUND TRUE)
+-        else (_return_VALUE STREQUAL "0")
+-            message(STATUS "Found libkipi release < 0.2.0, too old")
+-            set(KIPI_VERSION_GOOD_FOUND FALSE)
+-            set(KIPI_FOUND FALSE)
+-        endif (_return_VALUE STREQUAL "0")
+-      else (_KIPILinkFlags)
+-        set(KIPI_VERSION_GOOD_FOUND FALSE)
+-        set(KIPI_FOUND FALSE)
+-      endif (_KIPILinkFlags)
+-    else (NOT WIN32)
+-      set(KIPI_VERSION_GOOD_FOUND TRUE)
+-    endif (NOT WIN32)
+-    if (KIPI_VERSION_GOOD_FOUND)
+-        set(KIPI_DEFINITIONS ${_KIPICflags})
+-
+-        find_path(KIPI_INCLUDE_DIR NAMES libkipi/version.h PATHS ${KDE4_INCLUDE_DIR} ${_KIPIIncDir})
+-        find_library(KIPI_LIBRARIES NAMES kipi PATHS ${KDE4_LIB_DIR} ${_KIPILinkDir})
+-
+-        if (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES)
+-            set(KIPI_FOUND TRUE)
+-        endif (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES)
+-      endif (KIPI_VERSION_GOOD_FOUND)
+-      if (KIPI_FOUND)
+-          if (NOT Kipi_FIND_QUIETLY)
+-              message(STATUS "Found libkipi: ${KIPI_LIBRARIES}")
+-          endif (NOT Kipi_FIND_QUIETLY)
+-      else (KIPI_FOUND)
+-          if (Kipi_FIND_REQUIRED)
+-              if (NOT KIPI_INCLUDE_DIR)
+-                  message(FATAL_ERROR "Could NOT find libkipi header files")
+-              endif (NOT KIPI_INCLUDE_DIR)
+-              if (NOT KIPI_LIBRARIES)
+-                  message(FATAL_ERROR "Could NOT find libkipi library")
+-              endif (NOT KIPI_LIBRARIES)
+-          endif (Kipi_FIND_REQUIRED)
+-      endif (KIPI_FOUND)
+-
+-    mark_as_advanced(KIPI_INCLUDE_DIR KIPI_LIBRARIES KIPI_DEFINITIONS)
+-
+-  endif (KIPI_LOCAL_FOUND)
+-  
+-endif (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS)
++ENDIF(KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS AND KIPI_VERSION AND KIPI_SO_VERSION)

diff --git a/kde-base/kdelibs/kdelibs-4.10.49.9999.ebuild b/kde-base/kdelibs/kdelibs-4.10.49.9999.ebuild
index 7988b3f..3477255 100644
--- a/kde-base/kdelibs/kdelibs-4.10.49.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.10.49.9999.ebuild
@@ -145,6 +145,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.9.3-werror.patch"
+	"${FILESDIR}/${PN}-4.9.90-findkipi.patch"
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-4.9.90.ebuild b/kde-base/kdelibs/kdelibs-4.9.90.ebuild
index c189845..c126bea 100644
--- a/kde-base/kdelibs/kdelibs-4.9.90.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.9.90.ebuild
@@ -145,6 +145,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.9.3-werror.patch"
+	"${FILESDIR}/${PN}-4.9.90-findkipi.patch"
 )
 
 pkg_pretend() {

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index 7988b3f..3477255 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -145,6 +145,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.9.3-werror.patch"
+	"${FILESDIR}/${PN}-4.9.90-findkipi.patch"
 )
 
 pkg_pretend() {


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-12-28 20:15 Andreas Hüttel
  0 siblings, 0 replies; 38+ messages in thread
From: Andreas Hüttel @ 2012-12-28 20:15 UTC (permalink / raw
  To: gentoo-commits

commit:     ae1d2487279309c9173bde74a92dc5881d55496c
Author:     Andreas K. Huettel (dilfridge) <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 28 20:16:00 2012 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Dec 28 20:16:00 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=ae1d2487

[kde-base/kdelibs] Update FindKexiv2.cmake to digikam sc version

---
 .../kdelibs/files/kdelibs-4.9.95-findkexiv2.patch  |   22 ++++++++++++++++++++
 kde-base/kdelibs/kdelibs-4.9.95.ebuild             |    1 +
 2 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.9.95-findkexiv2.patch b/kde-base/kdelibs/files/kdelibs-4.9.95-findkexiv2.patch
new file mode 100644
index 0000000..1161ed2
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.9.95-findkexiv2.patch
@@ -0,0 +1,22 @@
+diff --git a/cmake/modules/FindKexiv2.cmake b/cmake/modules/FindKexiv2.cmake
+index 4487537..8edd591 100644
+--- a/cmake/modules/FindKexiv2.cmake
++++ b/cmake/modules/FindKexiv2.cmake
+@@ -67,13 +67,13 @@ else (KEXIV2_INCLUDE_DIR AND KEXIV2_LIBRARIES AND KEXIV2_DEFINITIONS)
+       PKGCONFIG(libkexiv2 _KEXIV2IncDir _KEXIV2LinkDir _KEXIV2LinkFlags _KEXIV2Cflags)
+ 
+       if(_KEXIV2LinkFlags)
+-        # query pkg-config asking for a libkexiv2 >= 0.2.0
+-        exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.2.0 libkexiv2 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
++        # query pkg-config asking for a libkexiv2 >= 1.0.0
++        exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=1.0.0 libkexiv2 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
+         if(_return_VALUE STREQUAL "0")
+-            message(STATUS "Found libkexiv2 release >= 0.2.0")
++            message(STATUS "Found libkexiv2 release >= 1.0.0")
+             set(KEXIV2_VERSION_GOOD_FOUND TRUE)
+         else(_return_VALUE STREQUAL "0")
+-            message(STATUS "Found libkexiv2 release < 0.2.0, too old")
++            message(STATUS "Found libkexiv2 release < 1.0.0, too old")
+             set(KEXIV2_VERSION_GOOD_FOUND FALSE)
+             set(KEXIV2_FOUND FALSE)
+         endif(_return_VALUE STREQUAL "0")

diff --git a/kde-base/kdelibs/kdelibs-4.9.95.ebuild b/kde-base/kdelibs/kdelibs-4.9.95.ebuild
index c126bea..3d763b3 100644
--- a/kde-base/kdelibs/kdelibs-4.9.95.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.9.95.ebuild
@@ -146,6 +146,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.9.3-werror.patch"
 	"${FILESDIR}/${PN}-4.9.90-findkipi.patch"
+	"${FILESDIR}/${PN}-4.9.95-findkexiv2.patch"
 )
 
 pkg_pretend() {


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2012-12-28 20:22 Andreas Hüttel
  0 siblings, 0 replies; 38+ messages in thread
From: Andreas Hüttel @ 2012-12-28 20:22 UTC (permalink / raw
  To: gentoo-commits

commit:     a8861d0fd0c91d8e1075ad0370ae04fab1e06f3d
Author:     Andreas K. Huettel (dilfridge) <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 28 20:23:01 2012 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Dec 28 20:23:01 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=a8861d0f

[kde-base/kdelibs] Properly patch Findkexiv2 and FindKdcraw to newest version

---
 .../kdelibs/files/kdelibs-4.9.95-findkexiv2.patch  |   22 --
 .../files/kdelibs-4.9.95-findsomething.patch       |  242 ++++++++++++++++++++
 kde-base/kdelibs/kdelibs-4.9.95.ebuild             |    2 +-
 3 files changed, 243 insertions(+), 23 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.9.95-findkexiv2.patch b/kde-base/kdelibs/files/kdelibs-4.9.95-findkexiv2.patch
deleted file mode 100644
index 1161ed2..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.9.95-findkexiv2.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/cmake/modules/FindKexiv2.cmake b/cmake/modules/FindKexiv2.cmake
-index 4487537..8edd591 100644
---- a/cmake/modules/FindKexiv2.cmake
-+++ b/cmake/modules/FindKexiv2.cmake
-@@ -67,13 +67,13 @@ else (KEXIV2_INCLUDE_DIR AND KEXIV2_LIBRARIES AND KEXIV2_DEFINITIONS)
-       PKGCONFIG(libkexiv2 _KEXIV2IncDir _KEXIV2LinkDir _KEXIV2LinkFlags _KEXIV2Cflags)
- 
-       if(_KEXIV2LinkFlags)
--        # query pkg-config asking for a libkexiv2 >= 0.2.0
--        exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.2.0 libkexiv2 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
-+        # query pkg-config asking for a libkexiv2 >= 1.0.0
-+        exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=1.0.0 libkexiv2 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
-         if(_return_VALUE STREQUAL "0")
--            message(STATUS "Found libkexiv2 release >= 0.2.0")
-+            message(STATUS "Found libkexiv2 release >= 1.0.0")
-             set(KEXIV2_VERSION_GOOD_FOUND TRUE)
-         else(_return_VALUE STREQUAL "0")
--            message(STATUS "Found libkexiv2 release < 0.2.0, too old")
-+            message(STATUS "Found libkexiv2 release < 1.0.0, too old")
-             set(KEXIV2_VERSION_GOOD_FOUND FALSE)
-             set(KEXIV2_FOUND FALSE)
-         endif(_return_VALUE STREQUAL "0")

diff --git a/kde-base/kdelibs/files/kdelibs-4.9.95-findsomething.patch b/kde-base/kdelibs/files/kdelibs-4.9.95-findsomething.patch
new file mode 100644
index 0000000..9963130
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.9.95-findsomething.patch
@@ -0,0 +1,242 @@
+diff -wruN kdelibs-4.9.95.orig/cmake/modules/FindKdcraw.cmake kdelibs-4.9.95/cmake/modules/FindKdcraw.cmake
+--- kdelibs-4.9.95.orig/cmake/modules/FindKdcraw.cmake	2012-12-17 15:14:16.000000000 +0100
++++ kdelibs-4.9.95/cmake/modules/FindKdcraw.cmake	2012-12-28 21:20:21.000000000 +0100
+@@ -1,107 +1,121 @@
+-# - Try to find the Kdcraw library
++# Try to find the Kdcraw library
+ #
+-# If you have put a local version of libkdcraw into your source tree,
+-# set KDCRAW_LOCAL_DIR to the relative path to the local directory.
++# Parameters:
++#  KDCRAW_LOCAL_DIR - If you have put a local version of libkdcraw into
++#                     your source tree, set KDCRAW_LOCAL_DIR to the
++#                     relative path from the root of your source tree
++#                     to the libkdcraw local directory.
+ #
+ # Once done this will define
+ #
+-#  KDCRAW_FOUND - system has libkdcraw
+-#  KDCRAW_INCLUDE_DIR - the libkdcraw include directory
++#  KDCRAW_FOUND - System has libkdcraw
++#  KDCRAW_INCLUDE_DIR - The libkdcraw include directory/directories (for #include <libkdcraw/...> style)
+ #  KDCRAW_LIBRARIES - Link these to use libkdcraw
+ #  KDCRAW_DEFINITIONS - Compiler switches required for using libkdcraw
++#  KDCRAW_VERSION - Version of libkdcraw which was found
+ #
+-
+-# Copyright (c) 2008, Gilles Caulier, <caulier.gilles@gmail.com>
++# Copyright (c) 2008-2011, Gilles Caulier, <caulier.gilles@gmail.com>
++# Copyright (c) 2011, Michael G. Hansen, <mike@mghansen.de>
+ #
+ # Redistribution and use is allowed according to the terms of the BSD license.
+ # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+ 
++# Kdcraw_FIND_QUIETLY and Kdcraw_FIND_REQUIRED may be defined by CMake.
+ 
+-if (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS)
++if (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS AND KDCRAW_VERSION)
+ 
++  if (NOT Kdcraw_FIND_QUIETLY)
+   message(STATUS "Found Kdcraw library in cache: ${KDCRAW_LIBRARIES}")
++  endif (NOT Kdcraw_FIND_QUIETLY)
+ 
+   # in cache already
+   set(KDCRAW_FOUND TRUE)
+ 
+-else (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS)
++else (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS AND KDCRAW_VERSION)
+ 
+-  message(STATUS "Check Kdcraw library in local sub-folder...")
+-
+-  # Check if library is not in local sub-folder
++  if (NOT Kdcraw_FIND_QUIETLY)
++    message(STATUS "Check for Kdcraw library in local sub-folder...")
++  endif (NOT Kdcraw_FIND_QUIETLY)
+ 
++  # Check for a local version of the library.
+   if (KDCRAW_LOCAL_DIR)
+-    set (KDCRAW_LOCAL_FOUND TRUE)
++    find_file(KDCRAW_LOCAL_FOUND libkdcraw/version.h.cmake ${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR} NO_DEFAULT_PATH)
++    if (NOT KDCRAW_LOCAL_FOUND)
++      message(WARNING "KDCRAW_LOCAL_DIR specified as \"${KDCRAW_LOCAL_DIR}\" but libkdcraw could not be found there.")
++    endif (NOT KDCRAW_LOCAL_FOUND)
+   else (KDCRAW_LOCAL_DIR)
+-    find_file(KDCRAW_LOCAL_FOUND libkdcraw/kdcraw.h ${CMAKE_SOURCE_DIR}/libkdcraw ${CMAKE_SOURCE_DIR}/libs/libkdcraw NO_DEFAULT_PATH)
+-
++    find_file(KDCRAW_LOCAL_FOUND libkdcraw/version.h.cmake ${CMAKE_SOURCE_DIR}/libkdcraw NO_DEFAULT_PATH)
+     if (KDCRAW_LOCAL_FOUND)
+-      # Was it found in libkdcraw/ or in libs/libkdcraw?
+-      find_file(KDCRAW_LOCAL_FOUND_IN_LIBS libkdcraw/kdcraw.h ${CMAKE_SOURCE_DIR}/libs/libkdcraw NO_DEFAULT_PATH)
+-      if (KDCRAW_LOCAL_FOUND_IN_LIBS)
+-        set(KDCRAW_LOCAL_DIR libs/libkdcraw)
+-      else (KDCRAW_LOCAL_FOUND_IN_LIBS)
+         set(KDCRAW_LOCAL_DIR libkdcraw)
+-      endif (KDCRAW_LOCAL_FOUND_IN_LIBS)
++    endif (KDCRAW_LOCAL_FOUND)
++    find_file(KDCRAW_LOCAL_FOUND libkdcraw/version.h.cmake ${CMAKE_SOURCE_DIR}/libs/libkdcraw NO_DEFAULT_PATH)
++    if (KDCRAW_LOCAL_FOUND)
++      set(KDCRAW_LOCAL_DIR libs/libkdcraw)
+     endif (KDCRAW_LOCAL_FOUND)
+   endif (KDCRAW_LOCAL_DIR)
+ 
+   if (KDCRAW_LOCAL_FOUND)
+-
+-    # we need two include directories: because the version.h file is put into the build directory
++    # We need two include directories: because the version.h file is put into the build directory
+     # TODO KDCRAW_INCLUDE_DIR sounds like it should contain only one directory...
+     set(KDCRAW_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR} ${CMAKE_BINARY_DIR}/${KDCRAW_LOCAL_DIR})
+     set(KDCRAW_DEFINITIONS "-I${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR}" "-I${CMAKE_BINARY_DIR}/${KDCRAW_LOCAL_DIR}")
+     set(KDCRAW_LIBRARIES kdcraw)
++    if (NOT Kdcraw_FIND_QUIETLY)
+     message(STATUS "Found Kdcraw library in local sub-folder: ${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR}")
++    endif (NOT Kdcraw_FIND_QUIETLY)
+     set(KDCRAW_FOUND TRUE)
+-    mark_as_advanced(KDCRAW_INCLUDE_DIR KDCRAW_LIBRARIES KDCRAW_DEFINITIONS)
+ 
+-  else(KDCRAW_LOCAL_FOUND)
++    set(kdcraw_version_h_filename "${CMAKE_BINARY_DIR}/${KDCRAW_LOCAL_DIR}/libkdcraw/version.h")
+ 
+-    message(STATUS "Check Kdcraw library using pkg-config...")
++  else (KDCRAW_LOCAL_FOUND)
+     if (NOT WIN32)
+-      # use pkg-config to get the directories and then use these values
+-      # in the FIND_PATH() and FIND_LIBRARY() calls
+-      include(UsePkgConfig)
+-    
+-      PKGCONFIG(libkdcraw _KDCRAWIncDir _KDCRAWLinkDir _KDCRAWLinkFlags _KDCRAWCflags)
+-    
+-      if (_KDCRAWLinkFlags)
+-        # query pkg-config asking for a libkdcraw >= 0.2.0
+-        exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.2.0 libkdcraw RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
+-        if (_return_VALUE STREQUAL "0")
+-            message(STATUS "Found libkdcraw release >= 0.2.0")
+-            set(KDCRAW_VERSION_GOOD_FOUND TRUE)
+-        else (_return_VALUE STREQUAL "0")
+-            message(STATUS "Found libkdcaw release < 0.2.0, too old")
++      if (NOT Kdcraw_FIND_QUIETLY)
++        message(STATUS "Check Kdcraw library using pkg-config...")
++      endif (NOT Kdcraw_FIND_QUIETLY)
++
++      # use FindPkgConfig to get the directories and then use these values
++      # in the find_path() and find_library() calls
++      include(FindPkgConfig)
++
++      pkg_check_modules(PC_KDCRAW libkdcraw)
++
++      if (PC_KDCRAW_FOUND)
++        # make sure the version is >= 0.2.0
++        # TODO: WHY?
++        if (PC_KDCRAW_VERSION VERSION_LESS 0.2.0)
++          message(STATUS "Found libkdcraw release < 0.2.0, too old")
+             set(KDCRAW_VERSION_GOOD_FOUND FALSE)
+             set(KDCRAW_FOUND FALSE)
+-        endif (_return_VALUE STREQUAL "0")
+-      else (_KDCRAWLinkFlags)
++        else (PC_KDCRAW_VERSION VERSION_LESS 0.2.0)
++          set(KDCRAW_VERSION "${PC_KDCRAW_VERSION}")
++          if (NOT Kdcraw_FIND_QUIETLY)
++            message(STATUS "Found libkdcraw release ${KDCRAW_VERSION}")
++          endif (NOT Kdcraw_FIND_QUIETLY)
++          set(KDCRAW_VERSION_GOOD_FOUND TRUE)
++        endif (PC_KDCRAW_VERSION VERSION_LESS 0.2.0)
++      else (PC_KDCRAW_FOUND)
+         set(KDCRAW_VERSION_GOOD_FOUND FALSE)
+-        set(KDCRAW_FOUND FALSE)
+-      endif (_KDCRAWLinkFlags)
++      endif (PC_KDCRAW_FOUND)
+     else (NOT WIN32)
++      # TODO: Why do we just assume the version is good?
+       set(KDCRAW_VERSION_GOOD_FOUND TRUE)
+     endif (NOT WIN32)
+ 
+     if (KDCRAW_VERSION_GOOD_FOUND)
+-        set(KDCRAW_DEFINITIONS "${_KDCRAWCflags}")
++      set(KDCRAW_DEFINITIONS "${PC_KDCRAW_CFLAGS_OTHER}")
++
++      find_path(KDCRAW_INCLUDE_DIR libkdcraw/version.h ${PC_KDCRAW_INCLUDE_DIRS})
++      set(kdcraw_version_h_filename "${KDCRAW_INCLUDE_DIR}/libkdcraw/version.h")
+     
+-        find_path(KDCRAW_INCLUDE_DIR libkdcraw/version.h
+-        ${_KDCRAWIncDir}
+-        )
+-    
+-        find_library(KDCRAW_LIBRARIES NAMES kdcraw
+-        PATHS
+-        ${_KDCRAWLinkDir}
+-        )
++      find_library(KDCRAW_LIBRARIES NAMES kdcraw HINTS ${PC_KDCRAW_LIBRARY_DIRS})
+     
+         if (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES)
+             set(KDCRAW_FOUND TRUE)
++      else (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES)
++        set(KDCRAW_FOUND FALSE)
+         endif (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES)
+      endif (KDCRAW_VERSION_GOOD_FOUND) 
++
+      if (KDCRAW_FOUND)
+          if (NOT Kdcraw_FIND_QUIETLY)
+              message(STATUS "Found libkdcraw: ${KDCRAW_LIBRARIES}")
+@@ -109,16 +123,35 @@
+      else (KDCRAW_FOUND)
+          if (Kdcraw_FIND_REQUIRED)
+              if (NOT KDCRAW_INCLUDE_DIR)
+-                 message(FATAL_ERROR "Could NOT find libkdcraw header files")
++          message(FATAL_ERROR "Could NOT find libkdcraw header files.")
++        else(NOT KDCRAW_INCLUDE_DIR)
++          message(FATAL_ERROR "Could NOT find libkdcraw library.")
+              endif (NOT KDCRAW_INCLUDE_DIR)
+-             if (NOT KDCRAW_LIBRARIES)
+-                 message(FATAL_ERROR "Could NOT find libkdcraw library")
+-             endif (NOT KDCRAW_LIBRARIES)
+          endif (Kdcraw_FIND_REQUIRED)
+      endif (KDCRAW_FOUND)
+     
+-    mark_as_advanced(KDCRAW_INCLUDE_DIR KDCRAW_LIBRARIES KDCRAW_DEFINITIONS)
+-
+   endif(KDCRAW_LOCAL_FOUND)
+   
+-endif (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS)
++  if (KDCRAW_FOUND)
++    # Find the version information, unless that was reported by pkg_search_module.
++    if (NOT KDCRAW_VERSION)
++      file(READ "${kdcraw_version_h_filename}" kdcraw_version_h_content)
++      # This is the line we are trying to find: static const char kdcraw_version[] = "1.22.4-beta_5+dfsg";
++      string(REGEX REPLACE ".*char +kdcraw_version\\[\\] += +\"([^\"]+)\".*" "\\1" KDCRAW_VERSION "${kdcraw_version_h_content}")
++      unset(kdcraw_version_h_content)
++
++    endif (NOT KDCRAW_VERSION)
++    unset(kdcraw_version_h_filename)
++  endif (KDCRAW_FOUND)
++
++  if (KDCRAW_FOUND)
++    mark_as_advanced(KDCRAW_INCLUDE_DIR KDCRAW_LIBRARIES KDCRAW_DEFINITIONS KDCRAW_VERSION KDCRAW_FOUND)
++  else (KDCRAW_FOUND)
++    # The library was not found, reset all related variables.
++    unset(KDCRAW_INCLUDE_DIR)
++    unset(KDCRAW_LIBRARIES)
++    unset(KDCRAW_DEFINITIONS)
++    unset(KDCRAW_VERSION)
++  endif (KDCRAW_FOUND)
++
++endif (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS AND KDCRAW_VERSION)
+diff -wruN kdelibs-4.9.95.orig/cmake/modules/FindKexiv2.cmake kdelibs-4.9.95/cmake/modules/FindKexiv2.cmake
+--- kdelibs-4.9.95.orig/cmake/modules/FindKexiv2.cmake	2012-12-17 15:14:16.000000000 +0100
++++ kdelibs-4.9.95/cmake/modules/FindKexiv2.cmake	2012-12-28 21:19:39.000000000 +0100
+@@ -67,13 +67,13 @@
+       PKGCONFIG(libkexiv2 _KEXIV2IncDir _KEXIV2LinkDir _KEXIV2LinkFlags _KEXIV2Cflags)
+     
+       if(_KEXIV2LinkFlags)
+-        # query pkg-config asking for a libkexiv2 >= 0.2.0
+-        exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.2.0 libkexiv2 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
++        # query pkg-config asking for a libkexiv2 >= 1.0.0
++        exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=1.0.0 libkexiv2 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
+         if(_return_VALUE STREQUAL "0")
+-            message(STATUS "Found libkexiv2 release >= 0.2.0")
++            message(STATUS "Found libkexiv2 release >= 1.0.0")
+             set(KEXIV2_VERSION_GOOD_FOUND TRUE)
+         else(_return_VALUE STREQUAL "0")
+-            message(STATUS "Found libkexiv2 release < 0.2.0, too old")
++            message(STATUS "Found libkexiv2 release < 1.0.0, too old")
+             set(KEXIV2_VERSION_GOOD_FOUND FALSE)
+             set(KEXIV2_FOUND FALSE)
+         endif(_return_VALUE STREQUAL "0")

diff --git a/kde-base/kdelibs/kdelibs-4.9.95.ebuild b/kde-base/kdelibs/kdelibs-4.9.95.ebuild
index 3d763b3..f2860f1 100644
--- a/kde-base/kdelibs/kdelibs-4.9.95.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.9.95.ebuild
@@ -146,7 +146,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.9.3-werror.patch"
 	"${FILESDIR}/${PN}-4.9.90-findkipi.patch"
-	"${FILESDIR}/${PN}-4.9.95-findkexiv2.patch"
+	"${FILESDIR}/${PN}-4.9.95-findsomething.patch"
 )
 
 pkg_pretend() {


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2013-01-31 16:15 Michael Palimaka
  0 siblings, 0 replies; 38+ messages in thread
From: Michael Palimaka @ 2013-01-31 16:15 UTC (permalink / raw
  To: gentoo-commits

commit:     797e8400f92c9d8d723ecce57f17871b42e4f898
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 31 16:14:58 2013 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu Jan 31 16:14:58 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=797e8400

[kde-base/kdelibs] Remove unused patches. Clean metadata.

Package-Manager: portage-2.1.11.50

---
 .../files/kdelibs-4.8.95-udisks2-includes.patch    |   48 ----
 .../kdelibs/files/kdelibs-4.9.90-findkipi.patch    |  242 --------------------
 .../files/kdelibs-4.9.95-findsomething.patch       |  242 --------------------
 kde-base/kdelibs/metadata.xml                      |    2 -
 4 files changed, 0 insertions(+), 534 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.8.95-udisks2-includes.patch b/kde-base/kdelibs/files/kdelibs-4.8.95-udisks2-includes.patch
deleted file mode 100644
index d8ece11..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.8.95-udisks2-includes.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldisc.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldisc.cpp
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldisc.cpp	2012-06-28 00:14:38.443073422 +0200
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldisc.cpp	2012-06-28 00:18:20.459086056 +0200
-@@ -27,7 +27,7 @@
- #include <QtCore/QFile>
- #include <QtDBus/QDBusConnection>
- 
--#include "../shared/udevqtclient.h"
-+#include "../shared/udevqt.h"
- 
- #include "udisks2.h"
- #include "udisksopticaldisc.h"
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldisc.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldisc.h
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksopticaldisc.h	2012-06-28 00:14:38.444073422 +0200
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksopticaldisc.h	2012-06-28 00:15:14.569076596 +0200
-@@ -24,7 +24,7 @@
- 
- #include <solid/ifaces/opticaldisc.h>
- 
--#include "../shared/udevqtdevice.h"
-+#include "../shared/udevqt.h"
- 
- #include "udisksstoragevolume.h"
- #include "udisksdevice.h"
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragedrive.cpp kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragedrive.cpp
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragedrive.cpp	2012-06-28 00:14:38.445073422 +0200
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragedrive.cpp	2012-06-28 00:18:02.424084839 +0200
-@@ -21,7 +21,7 @@
- 
- #include "udisksstoragedrive.h"
- 
--#include "../shared/udevqtclient.h"
-+#include "../shared/udevqt.h"
- 
- #include <QtCore/QDebug>
- #include <QtCore/QFile>
-diff -ruN kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragedrive.h kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragedrive.h
---- kdelibs-4.8.95.orig/solid/solid/backends/udisks2/udisksstoragedrive.h	2012-06-28 00:14:38.445073422 +0200
-+++ kdelibs-4.8.95/solid/solid/backends/udisks2/udisksstoragedrive.h	2012-06-28 00:15:14.569076596 +0200
-@@ -24,7 +24,7 @@
- 
- #include <ifaces/storagedrive.h>
- 
--#include "../shared/udevqtdevice.h"
-+#include "../shared/udevqt.h"
- 
- #include "udisksblock.h"
- 

diff --git a/kde-base/kdelibs/files/kdelibs-4.9.90-findkipi.patch b/kde-base/kdelibs/files/kdelibs-4.9.90-findkipi.patch
deleted file mode 100644
index 050262f..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.9.90-findkipi.patch
+++ /dev/null
@@ -1,242 +0,0 @@
-diff -ruN kdelibs-4.9.90.orig/cmake/modules/FindKipi.cmake kdelibs-4.9.90/cmake/modules/FindKipi.cmake
---- kdelibs-4.9.90.orig/cmake/modules/FindKipi.cmake	2012-11-14 16:58:29.000000000 +0100
-+++ kdelibs-4.9.90/cmake/modules/FindKipi.cmake	2012-12-17 22:21:25.000000000 +0100
-@@ -1,116 +1,133 @@
--# - Try to find the Kipi library
-+# Module that tries to find the Kipi library
- #
--# If you have put a local version of libkipi into your source tree,
--# set KIPI_LOCAL_DIR to the relative path to the local directory.
-+# Input values :
- #
--# Once done this will define
-+# KIPI_LOCAL_DIR    - If you have put a local version of libkipi into your source tree,
-+#                     set this variable to the relative path from the local directory.
- #
--#  KIPI_FOUND - system has libkipi
--#  KIPI_INCLUDE_DIR - the libkipi include directory
--#  KIPI_LIBRARIES - Link these to use libkipi
-+# Output values :
-+#
-+#  KIPI_FOUND       - System has libkipi
-+#  KIPI_INCLUDE_DIR - The libkipi include directory
-+#  KIPI_LIBRARIES   - Link these to use libkipi
- #  KIPI_DEFINITIONS - Compiler switches required for using libkipi
-+#  KIPI_VERSION     - The release version of the Kipi library
-+#  KIPI_SO_VERSION  - The binary SO version of the Kipi library
- #
- 
--# Copyright (c) 2008, Gilles Caulier, <caulier.gilles@gmail.com>
-+# Copyright (c) 2012, Victor Dodon <dodonvictor at gmail dot com>
-+# Copyright (c) 2012, Gilles Caulier <caulier dot gilles at gmail dot com>
- #
- # Redistribution and use is allowed according to the terms of the BSD license.
- # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
- 
--if (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS)
--
--  message(STATUS "Found Kipi library in cache: ${KIPI_LIBRARIES}")
--
--  # in cache already
--  set(KIPI_FOUND TRUE)
--
--else (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS)
-+IF(${Kipi_FIND_VERSION} STREQUAL "")
-+    SET(Kipi_FIND_VERSION "1.2.0")
-+    MESSAGE(STATUS "No Kipi library version required. Check default version : ${Kipi_FIND_VERSION}")
-+ELSE()
-+    MESSAGE(STATUS "Kipi library version required : ${Kipi_FIND_VERSION}")
-+ENDIF()
-+
-+IF(KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS AND KIPI_VERSION AND KIPI_SO_VERSION)
-+
-+  IF(NOT Kipi_FIND_QUIETLY)
-+    MESSAGE(STATUS "Found kipi library in cache ${KIPI_LIBRARIES}")
-+  ENDIF(NOT Kipi_FIND_QUIETLY)
-+  # Already in cache
-+  SET(KIPI_FOUND TRUE)
-+
-+ELSE(KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS AND KIPI_VERSION AND KIPI_SO_VERSION)
-+
-+  IF(NOT Kipi_FIND_QUIETLY)
-+    MESSAGE(STATUS "Check Kipi library in local sub-folder...")
-+  ENDIF(NOT Kipi_FIND_QUIETLY)
-+
-+  IF(KIPI_LOCAL_DIR)
-+    FIND_FILE(KIPI_LOCAL_FOUND libkipi/version.h.cmake ${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR} NO_DEFAULT_PATH)
-+    IF(NOT KIPI_LOCAL_FOUND)
-+      MESSAGE(WARNING "KIPI_LOCAL_DIR specified as \"${KIPI_LOCAL_DIR}\" but libkipi could not be found there.")
-+    ENDIF(NOT KIPI_LOCAL_FOUND)
-+  ELSE(KIPI_LOCAL_DIR)
-+    FIND_FILE(KIPI_LOCAL_FOUND libkipi/version.h.cmake ${CMAKE_SOURCE_DIR}/libkipi NO_DEFAULT_PATH)
-+    IF(KIPI_LOCAL_FOUND)
-+      SET(KIPI_LOCAL_DIR libkipi)
-+    ENDIF(KIPI_LOCAL_FOUND)
-+
-+    FIND_FILE(KIPI_LOCAL_FOUND libkipi/version.h.cmake ${CMAKE_SOURCE_DIR}/libs/libkipi NO_DEFAULT_PATH)
-+    IF(KIPI_LOCAL_FOUND)
-+      SET(KIPI_LOCAL_DIR libs/libkipi)
-+    ENDIF(KIPI_LOCAL_FOUND)
-+  ENDIF(KIPI_LOCAL_DIR)
-+
-+  IF(KIPI_LOCAL_FOUND)
-+
-+    SET(KIPI_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR}" "${CMAKE_BINARY_DIR}/${KIPI_LOCAL_DIR}")
-+    SET(KIPI_DEFINITIONS "-I${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR}" "-I${CMAKE_BINARY_DIR}/${KIPI_LOCAL_DIR}")
-+    SET(KIPI_LIBRARIES kipi)
-+    IF(NOT Kipi_FIND_QUIETLY)
-+      MESSAGE(STATUS "Found Kipi library in local sub-folder: ${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR}")
-+    ENDIF(NOT Kipi_FIND_QUIETLY)
-+    SET(KIPI_FOUND TRUE)
-+    SET(KIPI_VERSION_H_FILENAME "${CMAKE_BINARY_DIR}/${KIPI_LOCAL_DIR}/libkipi/version.h")
-+
-+  ELSE(KIPI_LOCAL_FOUND)
-+
-+    IF(NOT WIN32)
-+      IF(NOT Kipi_FIND_QUIETLY)
-+        MESSAGE(STATUS "Check Kipi library using pkg-config...")
-+      ENDIF(NOT Kipi_FIND_QUIETLY)
-+
-+      INCLUDE(FindPkgConfig)
-+      PKG_CHECK_MODULES(KIPI libkipi>=${Kipi_FIND_VERSION})
-+    ENDIF(NOT WIN32)
-+
-+    FIND_LIBRARY(KIPI_LIBRARIES NAMES libkipi PATHS ${KIPI_LIBRARY_DIRS} ${LIB_INSTALL_DIR} ${KDE4_LIB_DIR})
-+    FIND_PATH(KIPI_INCLUDE_DIR NAMES libkipi/version.h PATHS ${KIPI_INCLUDE_DIRS} ${INCLUDE_INSTALL_DIR} ${KDE4_INCLUDE_DIR})
-+    SET(KIPI_VERSION_H_FILENAME "${KIPI_INCLUDE_DIR}/libkipi/version.h")
-+    SET(KIPI_DEFINITIONS ${KIPI_CFLAGS} CACHE STRING "Kipi defintions")
-+
-+    INCLUDE(FindPackageHandleStandardArgs)
-+    FIND_PACKAGE_HANDLE_STANDARD_ARGS(KIPI DEFAULT_MSG KIPI_LIBRARIES KIPI_INCLUDE_DIR)
-+
-+  ENDIF(KIPI_LOCAL_FOUND)
-+
-+  IF(KIPI_FOUND)
-+
-+    IF(NOT KIPI_VERSION)
-+      FILE(READ "${KIPI_VERSION_H_FILENAME}" KIPI_VERSION_H_CONTENT)
-+      STRING(REGEX REPLACE ".*static +const +char +kipi_version\\[\\] += +\"([^\"]+)\".*" "\\1" KIPI_VERSION "${KIPI_VERSION_H_CONTENT}")
-+      MESSAGE(STATUS "Kipi library version: ${KIPI_VERSION}")
-+    ENDIF(NOT KIPI_VERSION)
-+
-+    IF(NOT KIPI_SO_VERSION)
-+      FILE(READ "${KIPI_VERSION_H_FILENAME}" KIPI_VERSION_H_CONTENT)
-+      STRING(REGEX REPLACE
-+             ".*static +const +int +kipi_binary_version +=  ([^ ;]+).*"
-+             "\\1"
-+             KIPI_SO_VERSION_FOUND
-+             "${KIPI_VERSION_H_CONTENT}"
-+            )
-+      SET(KIPI_SO_VERSION ${KIPI_SO_VERSION_FOUND} CACHE STRING "libkipi so version")
-+      MESSAGE(STATUS "Kipi library SO binary version: ${KIPI_SO_VERSION}")
-+    ENDIF(NOT KIPI_SO_VERSION)
-+
-+    UNSET(KIPI_VERSION_H_CONTENT)
-+    UNSET(KIPI_VERSION_H_FILENAME)
-+  ENDIF(KIPI_FOUND)
-+
-+  IF(KIPI_FOUND)
-+    MESSAGE(STATUS "libkipi: Found version ${KIPI_VERSION} (required: ${Kipi_FIND_VERSION})")
-+    IF(${KIPI_VERSION} VERSION_LESS ${Kipi_FIND_VERSION})
-+        SET(KIPI_FOUND FALSE)
-+    ELSE()
-+        MARK_AS_ADVANCED(KIPI_INCLUDE_DIR KIPI_LIBRARIES KIPI_DEFINITIONS KIPI_VERSION KIPI_SO_VERSION)
-+    ENDIF()
-+  ELSE(KIPI_FOUND)
-+    UNSET(KIPI_INCLUDE_DIR)
-+    UNSET(KIPI_LIBRARIES)
-+    UNSET(KIPI_DEFINITIONS)
-+    UNSET(KIPI_VERSION)
-+    UNSET(KIPI_SO_VERSION)
-+  ENDIF(KIPI_FOUND)
- 
--  message(STATUS "Check Kipi library in local sub-folder...")
--
--  # Check if library is not in local sub-folder
--
--  if (KIPI_LOCAL_DIR)
--    set (KIPI_LOCAL_FOUND TRUE)
--  else (KIPI_LOCAL_DIR)
--    find_file(KIPI_LOCAL_FOUND libkipi/kipi.h ${CMAKE_SOURCE_DIR}/libkipi ${CMAKE_SOURCE_DIR}/libs/libkipi NO_DEFAULT_PATH)
--
--    if (KIPI_LOCAL_FOUND)
--      # Was it found in libkdcraw/ or in libs/libkdcraw?
--      find_file(KIPI_LOCAL_FOUND_IN_LIBS libkipi/kipi.h ${CMAKE_SOURCE_DIR}/libs/libkipi NO_DEFAULT_PATH)
--      if (KIPI_LOCAL_FOUND_IN_LIBS)
--        set(KIPI_LOCAL_DIR libs/libkipi)
--      else (KIPI_LOCAL_FOUND_IN_LIBS)
--        set(KIPI_LOCAL_DIR libkipi)
--      endif (KIPI_LOCAL_FOUND_IN_LIBS)
--    endif (KIPI_LOCAL_FOUND)
--  endif (KIPI_LOCAL_DIR)
--
--  if (KIPI_LOCAL_FOUND)
--    # we need two include directories: because the version.h file is put into the build directory
--    # TODO KIPI_INCLUDE_DIR sounds like it should contain only one directory...
--    set(KIPI_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR} ${CMAKE_BINARY_DIR}/${KIPI_LOCAL_DIR})
--    set(KIPI_DEFINITIONS "-I${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR}" "-I${CMAKE_BINARY_DIR}/${KIPI_LOCAL_DIR}")
--    set(KIPI_LIBRARIES kipi)
--    message(STATUS "Found Kipi library in local sub-folder: ${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR}")
--    set(KIPI_FOUND TRUE)
--    mark_as_advanced(KIPI_INCLUDE_DIR KIPI_LIBRARIES KIPI_DEFINITIONS)
--
--  else (KIPI_LOCAL_FOUND)
--
--    if (NOT WIN32)
--      message(STATUS "Check Kipi library using pkg-config...")
--
--      # use pkg-config to get the directories and then use these values
--      # in the FIND_PATH() and FIND_LIBRARY() calls
--      include(UsePkgConfig)
--
--      PKGCONFIG(libkipi _KIPIIncDir _KIPILinkDir _KIPILinkFlags _KIPICflags)
--
--      if (_KIPILinkFlags)
--        # query pkg-config asking for a libkipi >= 0.2.0
--        exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.2.0 libkipi RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
--        if (_return_VALUE STREQUAL "0")
--            message(STATUS "Found libkipi release >= 0.2.0")
--            set(KIPI_VERSION_GOOD_FOUND TRUE)
--        else (_return_VALUE STREQUAL "0")
--            message(STATUS "Found libkipi release < 0.2.0, too old")
--            set(KIPI_VERSION_GOOD_FOUND FALSE)
--            set(KIPI_FOUND FALSE)
--        endif (_return_VALUE STREQUAL "0")
--      else (_KIPILinkFlags)
--        set(KIPI_VERSION_GOOD_FOUND FALSE)
--        set(KIPI_FOUND FALSE)
--      endif (_KIPILinkFlags)
--    else (NOT WIN32)
--      set(KIPI_VERSION_GOOD_FOUND TRUE)
--    endif (NOT WIN32)
--    if (KIPI_VERSION_GOOD_FOUND)
--        set(KIPI_DEFINITIONS ${_KIPICflags})
--
--        find_path(KIPI_INCLUDE_DIR NAMES libkipi/version.h PATHS ${KDE4_INCLUDE_DIR} ${_KIPIIncDir})
--        find_library(KIPI_LIBRARIES NAMES kipi PATHS ${KDE4_LIB_DIR} ${_KIPILinkDir})
--
--        if (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES)
--            set(KIPI_FOUND TRUE)
--        endif (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES)
--      endif (KIPI_VERSION_GOOD_FOUND)
--      if (KIPI_FOUND)
--          if (NOT Kipi_FIND_QUIETLY)
--              message(STATUS "Found libkipi: ${KIPI_LIBRARIES}")
--          endif (NOT Kipi_FIND_QUIETLY)
--      else (KIPI_FOUND)
--          if (Kipi_FIND_REQUIRED)
--              if (NOT KIPI_INCLUDE_DIR)
--                  message(FATAL_ERROR "Could NOT find libkipi header files")
--              endif (NOT KIPI_INCLUDE_DIR)
--              if (NOT KIPI_LIBRARIES)
--                  message(FATAL_ERROR "Could NOT find libkipi library")
--              endif (NOT KIPI_LIBRARIES)
--          endif (Kipi_FIND_REQUIRED)
--      endif (KIPI_FOUND)
--
--    mark_as_advanced(KIPI_INCLUDE_DIR KIPI_LIBRARIES KIPI_DEFINITIONS)
--
--  endif (KIPI_LOCAL_FOUND)
--  
--endif (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS)
-+ENDIF(KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS AND KIPI_VERSION AND KIPI_SO_VERSION)

diff --git a/kde-base/kdelibs/files/kdelibs-4.9.95-findsomething.patch b/kde-base/kdelibs/files/kdelibs-4.9.95-findsomething.patch
deleted file mode 100644
index 9963130..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.9.95-findsomething.patch
+++ /dev/null
@@ -1,242 +0,0 @@
-diff -wruN kdelibs-4.9.95.orig/cmake/modules/FindKdcraw.cmake kdelibs-4.9.95/cmake/modules/FindKdcraw.cmake
---- kdelibs-4.9.95.orig/cmake/modules/FindKdcraw.cmake	2012-12-17 15:14:16.000000000 +0100
-+++ kdelibs-4.9.95/cmake/modules/FindKdcraw.cmake	2012-12-28 21:20:21.000000000 +0100
-@@ -1,107 +1,121 @@
--# - Try to find the Kdcraw library
-+# Try to find the Kdcraw library
- #
--# If you have put a local version of libkdcraw into your source tree,
--# set KDCRAW_LOCAL_DIR to the relative path to the local directory.
-+# Parameters:
-+#  KDCRAW_LOCAL_DIR - If you have put a local version of libkdcraw into
-+#                     your source tree, set KDCRAW_LOCAL_DIR to the
-+#                     relative path from the root of your source tree
-+#                     to the libkdcraw local directory.
- #
- # Once done this will define
- #
--#  KDCRAW_FOUND - system has libkdcraw
--#  KDCRAW_INCLUDE_DIR - the libkdcraw include directory
-+#  KDCRAW_FOUND - System has libkdcraw
-+#  KDCRAW_INCLUDE_DIR - The libkdcraw include directory/directories (for #include <libkdcraw/...> style)
- #  KDCRAW_LIBRARIES - Link these to use libkdcraw
- #  KDCRAW_DEFINITIONS - Compiler switches required for using libkdcraw
-+#  KDCRAW_VERSION - Version of libkdcraw which was found
- #
--
--# Copyright (c) 2008, Gilles Caulier, <caulier.gilles@gmail.com>
-+# Copyright (c) 2008-2011, Gilles Caulier, <caulier.gilles@gmail.com>
-+# Copyright (c) 2011, Michael G. Hansen, <mike@mghansen.de>
- #
- # Redistribution and use is allowed according to the terms of the BSD license.
- # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
- 
-+# Kdcraw_FIND_QUIETLY and Kdcraw_FIND_REQUIRED may be defined by CMake.
- 
--if (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS)
-+if (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS AND KDCRAW_VERSION)
- 
-+  if (NOT Kdcraw_FIND_QUIETLY)
-   message(STATUS "Found Kdcraw library in cache: ${KDCRAW_LIBRARIES}")
-+  endif (NOT Kdcraw_FIND_QUIETLY)
- 
-   # in cache already
-   set(KDCRAW_FOUND TRUE)
- 
--else (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS)
-+else (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS AND KDCRAW_VERSION)
- 
--  message(STATUS "Check Kdcraw library in local sub-folder...")
--
--  # Check if library is not in local sub-folder
-+  if (NOT Kdcraw_FIND_QUIETLY)
-+    message(STATUS "Check for Kdcraw library in local sub-folder...")
-+  endif (NOT Kdcraw_FIND_QUIETLY)
- 
-+  # Check for a local version of the library.
-   if (KDCRAW_LOCAL_DIR)
--    set (KDCRAW_LOCAL_FOUND TRUE)
-+    find_file(KDCRAW_LOCAL_FOUND libkdcraw/version.h.cmake ${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR} NO_DEFAULT_PATH)
-+    if (NOT KDCRAW_LOCAL_FOUND)
-+      message(WARNING "KDCRAW_LOCAL_DIR specified as \"${KDCRAW_LOCAL_DIR}\" but libkdcraw could not be found there.")
-+    endif (NOT KDCRAW_LOCAL_FOUND)
-   else (KDCRAW_LOCAL_DIR)
--    find_file(KDCRAW_LOCAL_FOUND libkdcraw/kdcraw.h ${CMAKE_SOURCE_DIR}/libkdcraw ${CMAKE_SOURCE_DIR}/libs/libkdcraw NO_DEFAULT_PATH)
--
-+    find_file(KDCRAW_LOCAL_FOUND libkdcraw/version.h.cmake ${CMAKE_SOURCE_DIR}/libkdcraw NO_DEFAULT_PATH)
-     if (KDCRAW_LOCAL_FOUND)
--      # Was it found in libkdcraw/ or in libs/libkdcraw?
--      find_file(KDCRAW_LOCAL_FOUND_IN_LIBS libkdcraw/kdcraw.h ${CMAKE_SOURCE_DIR}/libs/libkdcraw NO_DEFAULT_PATH)
--      if (KDCRAW_LOCAL_FOUND_IN_LIBS)
--        set(KDCRAW_LOCAL_DIR libs/libkdcraw)
--      else (KDCRAW_LOCAL_FOUND_IN_LIBS)
-         set(KDCRAW_LOCAL_DIR libkdcraw)
--      endif (KDCRAW_LOCAL_FOUND_IN_LIBS)
-+    endif (KDCRAW_LOCAL_FOUND)
-+    find_file(KDCRAW_LOCAL_FOUND libkdcraw/version.h.cmake ${CMAKE_SOURCE_DIR}/libs/libkdcraw NO_DEFAULT_PATH)
-+    if (KDCRAW_LOCAL_FOUND)
-+      set(KDCRAW_LOCAL_DIR libs/libkdcraw)
-     endif (KDCRAW_LOCAL_FOUND)
-   endif (KDCRAW_LOCAL_DIR)
- 
-   if (KDCRAW_LOCAL_FOUND)
--
--    # we need two include directories: because the version.h file is put into the build directory
-+    # We need two include directories: because the version.h file is put into the build directory
-     # TODO KDCRAW_INCLUDE_DIR sounds like it should contain only one directory...
-     set(KDCRAW_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR} ${CMAKE_BINARY_DIR}/${KDCRAW_LOCAL_DIR})
-     set(KDCRAW_DEFINITIONS "-I${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR}" "-I${CMAKE_BINARY_DIR}/${KDCRAW_LOCAL_DIR}")
-     set(KDCRAW_LIBRARIES kdcraw)
-+    if (NOT Kdcraw_FIND_QUIETLY)
-     message(STATUS "Found Kdcraw library in local sub-folder: ${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR}")
-+    endif (NOT Kdcraw_FIND_QUIETLY)
-     set(KDCRAW_FOUND TRUE)
--    mark_as_advanced(KDCRAW_INCLUDE_DIR KDCRAW_LIBRARIES KDCRAW_DEFINITIONS)
- 
--  else(KDCRAW_LOCAL_FOUND)
-+    set(kdcraw_version_h_filename "${CMAKE_BINARY_DIR}/${KDCRAW_LOCAL_DIR}/libkdcraw/version.h")
- 
--    message(STATUS "Check Kdcraw library using pkg-config...")
-+  else (KDCRAW_LOCAL_FOUND)
-     if (NOT WIN32)
--      # use pkg-config to get the directories and then use these values
--      # in the FIND_PATH() and FIND_LIBRARY() calls
--      include(UsePkgConfig)
--    
--      PKGCONFIG(libkdcraw _KDCRAWIncDir _KDCRAWLinkDir _KDCRAWLinkFlags _KDCRAWCflags)
--    
--      if (_KDCRAWLinkFlags)
--        # query pkg-config asking for a libkdcraw >= 0.2.0
--        exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.2.0 libkdcraw RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
--        if (_return_VALUE STREQUAL "0")
--            message(STATUS "Found libkdcraw release >= 0.2.0")
--            set(KDCRAW_VERSION_GOOD_FOUND TRUE)
--        else (_return_VALUE STREQUAL "0")
--            message(STATUS "Found libkdcaw release < 0.2.0, too old")
-+      if (NOT Kdcraw_FIND_QUIETLY)
-+        message(STATUS "Check Kdcraw library using pkg-config...")
-+      endif (NOT Kdcraw_FIND_QUIETLY)
-+
-+      # use FindPkgConfig to get the directories and then use these values
-+      # in the find_path() and find_library() calls
-+      include(FindPkgConfig)
-+
-+      pkg_check_modules(PC_KDCRAW libkdcraw)
-+
-+      if (PC_KDCRAW_FOUND)
-+        # make sure the version is >= 0.2.0
-+        # TODO: WHY?
-+        if (PC_KDCRAW_VERSION VERSION_LESS 0.2.0)
-+          message(STATUS "Found libkdcraw release < 0.2.0, too old")
-             set(KDCRAW_VERSION_GOOD_FOUND FALSE)
-             set(KDCRAW_FOUND FALSE)
--        endif (_return_VALUE STREQUAL "0")
--      else (_KDCRAWLinkFlags)
-+        else (PC_KDCRAW_VERSION VERSION_LESS 0.2.0)
-+          set(KDCRAW_VERSION "${PC_KDCRAW_VERSION}")
-+          if (NOT Kdcraw_FIND_QUIETLY)
-+            message(STATUS "Found libkdcraw release ${KDCRAW_VERSION}")
-+          endif (NOT Kdcraw_FIND_QUIETLY)
-+          set(KDCRAW_VERSION_GOOD_FOUND TRUE)
-+        endif (PC_KDCRAW_VERSION VERSION_LESS 0.2.0)
-+      else (PC_KDCRAW_FOUND)
-         set(KDCRAW_VERSION_GOOD_FOUND FALSE)
--        set(KDCRAW_FOUND FALSE)
--      endif (_KDCRAWLinkFlags)
-+      endif (PC_KDCRAW_FOUND)
-     else (NOT WIN32)
-+      # TODO: Why do we just assume the version is good?
-       set(KDCRAW_VERSION_GOOD_FOUND TRUE)
-     endif (NOT WIN32)
- 
-     if (KDCRAW_VERSION_GOOD_FOUND)
--        set(KDCRAW_DEFINITIONS "${_KDCRAWCflags}")
-+      set(KDCRAW_DEFINITIONS "${PC_KDCRAW_CFLAGS_OTHER}")
-+
-+      find_path(KDCRAW_INCLUDE_DIR libkdcraw/version.h ${PC_KDCRAW_INCLUDE_DIRS})
-+      set(kdcraw_version_h_filename "${KDCRAW_INCLUDE_DIR}/libkdcraw/version.h")
-     
--        find_path(KDCRAW_INCLUDE_DIR libkdcraw/version.h
--        ${_KDCRAWIncDir}
--        )
--    
--        find_library(KDCRAW_LIBRARIES NAMES kdcraw
--        PATHS
--        ${_KDCRAWLinkDir}
--        )
-+      find_library(KDCRAW_LIBRARIES NAMES kdcraw HINTS ${PC_KDCRAW_LIBRARY_DIRS})
-     
-         if (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES)
-             set(KDCRAW_FOUND TRUE)
-+      else (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES)
-+        set(KDCRAW_FOUND FALSE)
-         endif (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES)
-      endif (KDCRAW_VERSION_GOOD_FOUND) 
-+
-      if (KDCRAW_FOUND)
-          if (NOT Kdcraw_FIND_QUIETLY)
-              message(STATUS "Found libkdcraw: ${KDCRAW_LIBRARIES}")
-@@ -109,16 +123,35 @@
-      else (KDCRAW_FOUND)
-          if (Kdcraw_FIND_REQUIRED)
-              if (NOT KDCRAW_INCLUDE_DIR)
--                 message(FATAL_ERROR "Could NOT find libkdcraw header files")
-+          message(FATAL_ERROR "Could NOT find libkdcraw header files.")
-+        else(NOT KDCRAW_INCLUDE_DIR)
-+          message(FATAL_ERROR "Could NOT find libkdcraw library.")
-              endif (NOT KDCRAW_INCLUDE_DIR)
--             if (NOT KDCRAW_LIBRARIES)
--                 message(FATAL_ERROR "Could NOT find libkdcraw library")
--             endif (NOT KDCRAW_LIBRARIES)
-          endif (Kdcraw_FIND_REQUIRED)
-      endif (KDCRAW_FOUND)
-     
--    mark_as_advanced(KDCRAW_INCLUDE_DIR KDCRAW_LIBRARIES KDCRAW_DEFINITIONS)
--
-   endif(KDCRAW_LOCAL_FOUND)
-   
--endif (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS)
-+  if (KDCRAW_FOUND)
-+    # Find the version information, unless that was reported by pkg_search_module.
-+    if (NOT KDCRAW_VERSION)
-+      file(READ "${kdcraw_version_h_filename}" kdcraw_version_h_content)
-+      # This is the line we are trying to find: static const char kdcraw_version[] = "1.22.4-beta_5+dfsg";
-+      string(REGEX REPLACE ".*char +kdcraw_version\\[\\] += +\"([^\"]+)\".*" "\\1" KDCRAW_VERSION "${kdcraw_version_h_content}")
-+      unset(kdcraw_version_h_content)
-+
-+    endif (NOT KDCRAW_VERSION)
-+    unset(kdcraw_version_h_filename)
-+  endif (KDCRAW_FOUND)
-+
-+  if (KDCRAW_FOUND)
-+    mark_as_advanced(KDCRAW_INCLUDE_DIR KDCRAW_LIBRARIES KDCRAW_DEFINITIONS KDCRAW_VERSION KDCRAW_FOUND)
-+  else (KDCRAW_FOUND)
-+    # The library was not found, reset all related variables.
-+    unset(KDCRAW_INCLUDE_DIR)
-+    unset(KDCRAW_LIBRARIES)
-+    unset(KDCRAW_DEFINITIONS)
-+    unset(KDCRAW_VERSION)
-+  endif (KDCRAW_FOUND)
-+
-+endif (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS AND KDCRAW_VERSION)
-diff -wruN kdelibs-4.9.95.orig/cmake/modules/FindKexiv2.cmake kdelibs-4.9.95/cmake/modules/FindKexiv2.cmake
---- kdelibs-4.9.95.orig/cmake/modules/FindKexiv2.cmake	2012-12-17 15:14:16.000000000 +0100
-+++ kdelibs-4.9.95/cmake/modules/FindKexiv2.cmake	2012-12-28 21:19:39.000000000 +0100
-@@ -67,13 +67,13 @@
-       PKGCONFIG(libkexiv2 _KEXIV2IncDir _KEXIV2LinkDir _KEXIV2LinkFlags _KEXIV2Cflags)
-     
-       if(_KEXIV2LinkFlags)
--        # query pkg-config asking for a libkexiv2 >= 0.2.0
--        exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.2.0 libkexiv2 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
-+        # query pkg-config asking for a libkexiv2 >= 1.0.0
-+        exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=1.0.0 libkexiv2 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
-         if(_return_VALUE STREQUAL "0")
--            message(STATUS "Found libkexiv2 release >= 0.2.0")
-+            message(STATUS "Found libkexiv2 release >= 1.0.0")
-             set(KEXIV2_VERSION_GOOD_FOUND TRUE)
-         else(_return_VALUE STREQUAL "0")
--            message(STATUS "Found libkexiv2 release < 0.2.0, too old")
-+            message(STATUS "Found libkexiv2 release < 1.0.0, too old")
-             set(KEXIV2_VERSION_GOOD_FOUND FALSE)
-             set(KEXIV2_FOUND FALSE)
-         endif(_return_VALUE STREQUAL "0")

diff --git a/kde-base/kdelibs/metadata.xml b/kde-base/kdelibs/metadata.xml
index 5dfbf53..5f0250f 100644
--- a/kde-base/kdelibs/metadata.xml
+++ b/kde-base/kdelibs/metadata.xml
@@ -4,8 +4,6 @@
   <herd>kde</herd>
   <use>
 	<flag name="opengl">Enable OpenGL support for Plasma (GLApplet)</flag>
-	<flag name="udisks">Use udisks for block device access (e.g., automounting)</flag>
-	<flag name="udisks2">Use the udisks2 support backported from kf5</flag>
 	<flag name="upower">Use upower for power management</flag>
 	<flag name="upnp">Build the Solid backend to provide information about UPnP devices on the network</flag>
   </use>


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2013-02-08 12:46 Michael Palimaka
  0 siblings, 0 replies; 38+ messages in thread
From: Michael Palimaka @ 2013-02-08 12:46 UTC (permalink / raw
  To: gentoo-commits

commit:     f883abbf7693dacf60f700498ba496c69c2aeac8
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  7 17:18:17 2013 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Fri Feb  8 12:46:05 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=f883abbf

[kde-base/kdelibs] Add patch by Franz Fellner <alpine.art.de <AT> googlemail.com> to make udisks support optional, wrt bug #455792.

Package-Manager: portage-2.1.11.50

---
 kde-base/kdelibs/files/kdelibs-4.10.0-udisks.patch |   51 ++++++++++++++++++++
 kde-base/kdelibs/kdelibs-4.10.49.9999.ebuild       |   10 ++--
 kde-base/kdelibs/kdelibs-9999.ebuild               |    8 ++-
 kde-base/kdelibs/metadata.xml                      |    1 +
 4 files changed, 63 insertions(+), 7 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.10.0-udisks.patch b/kde-base/kdelibs/files/kdelibs-4.10.0-udisks.patch
new file mode 100644
index 0000000..7de5ec9
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.10.0-udisks.patch
@@ -0,0 +1,51 @@
+udisks1 is deprecated and going away, so removing this clause
+will permit us to build without udisks at all.
+
+--- solid/solid/CMakeLists.txt
++++ solid/solid/CMakeLists.txt
+@@ -283,20 +283,6 @@
+            backends/udisks2/udisksgenericinterface.cpp
+            backends/udisks2/dbus/manager.cpp
+            )
+-       else ( WITH_SOLID_UDISKS2 )
+-           message(STATUS "Building Solid UDisks backend." )
+-           set(solid_LIB_SRCS ${solid_LIB_SRCS}
+-           backends/udisks/udisksmanager.cpp
+-           backends/udisks/udisksdevice.cpp
+-           backends/udisks/udisksblock.cpp
+-           backends/udisks/udisksstoragevolume.cpp
+-           backends/udisks/udisksdeviceinterface.cpp
+-           backends/udisks/udisksopticaldisc.cpp
+-           backends/udisks/udisksopticaldrive.cpp
+-           backends/udisks/udisksstoragedrive.cpp
+-           backends/udisks/udisksstorageaccess.cpp
+-           backends/udisks/udisksgenericinterface.cpp
+-          )
+        endif ( WITH_SOLID_UDISKS2 )
+    endif (CMAKE_SYSTEM_NAME MATCHES Linux)
+
+--- solid/solid/managerbase.cpp
++++ solid/solid/managerbase.cpp
+@@ -33,8 +33,6 @@
+ #include "backends/hal/halmanager.h"
+ #if defined (WITH_SOLID_UDISKS2)
+ #include "backends/udisks2/udisksmanager.h"
+-#else
+-#include "backends/udisks/udisksmanager.h"
+ #endif
+ #include "backends/upower/upowermanager.h"
+ 
+@@ -88,11 +86,9 @@
+                     m_backends << new Solid::Backends::UDev::UDevManager(0);
+ #               endif
+ #		if defined(WITH_SOLID_UDISKS2)
+-                m_backends << new Solid::Backends::UDisks2::Manager(0)
+-#		else
+-                m_backends << new Solid::Backends::UDisks::UDisksManager(0)
++                m_backends << new Solid::Backends::UDisks2::Manager(0);
+ #		endif
+-                           << new Solid::Backends::UPower::UPowerManager(0)
++                m_backends << new Solid::Backends::UPower::UPowerManager(0)
+                            << new Solid::Backends::Fstab::FstabManager(0);
+             }
+ #        endif

diff --git a/kde-base/kdelibs/kdelibs-4.10.49.9999.ebuild b/kde-base/kdelibs/kdelibs-4.10.49.9999.ebuild
index ca8a960..7aabd7e 100644
--- a/kde-base/kdelibs/kdelibs-4.10.49.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.10.49.9999.ebuild
@@ -10,17 +10,18 @@ OPENGL_REQUIRED="optional"
 KDE_HANDBOOK="optional"
 inherit kde4-base fdo-mime multilib toolchain-funcs flag-o-matic
 
-EGIT_BRANCH="master"
+EGIT_BRANCH="KDE/4.10"
 
 DESCRIPTION="KDE libraries needed by all KDE programs."
 
 KEYWORDS=""
 LICENSE="LGPL-2.1"
 IUSE="3dnow acl alsa altivec +bzip2 debug doc fam jpeg2k kerberos lzma
-mmx nls openexr +policykit semantic-desktop spell sse sse2 ssl +udev
+mmx nls openexr +policykit semantic-desktop spell sse sse2 ssl +udev +udisks
 +upower upnp zeroconf"
 
 REQUIRED_USE="
+	udisks? ( udev )
 	upower? ( udev )
 "
 
@@ -98,7 +99,7 @@ RDEPEND="${COMMONDEPEND}
 	$(add_kdebase_dep kde-env)
 	sys-apps/dbus[X]
 	!aqua? (
-		sys-fs/udisks:2
+		udisks? ( sys-fs/udisks:2 )
 		x11-apps/iceauth
 		x11-apps/rgb
 		>=x11-misc/xdg-utils-1.0.2-r3
@@ -137,6 +138,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.9.3-werror.patch"
+	"${FILESDIR}/${PN}-4.10.0-udisks.patch"
 )
 
 pkg_pretend() {
@@ -191,7 +193,6 @@ src_configure() {
 		-DWITH_HSPELL=OFF
 		-DWITH_ASPELL=OFF
 		-DWITH_DNSSD=OFF
-		-DWITH_SOLID_UDISKS2=ON
 		-DKDE_DEFAULT_HOME=.kde4
 		-DKAUTH_BACKEND=POLKITQT-1
 		-DBUILD_libkactivities=OFF
@@ -217,6 +218,7 @@ src_configure() {
 		$(cmake-utils_use_with spell ENCHANT)
 		$(cmake-utils_use_with ssl OpenSSL)
 		$(cmake-utils_use_with udev UDev)
+		$(cmake-utils_use_with udisks SOLID_UDISKS2)
 		$(cmake-utils_use_with upnp HUpnp)
 		$(cmake-utils_use_with zeroconf Avahi)
 	)

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index ca8a960..ed576e6 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -17,10 +17,11 @@ DESCRIPTION="KDE libraries needed by all KDE programs."
 KEYWORDS=""
 LICENSE="LGPL-2.1"
 IUSE="3dnow acl alsa altivec +bzip2 debug doc fam jpeg2k kerberos lzma
-mmx nls openexr +policykit semantic-desktop spell sse sse2 ssl +udev
+mmx nls openexr +policykit semantic-desktop spell sse sse2 ssl +udev +udisks
 +upower upnp zeroconf"
 
 REQUIRED_USE="
+	udisks? ( udev )
 	upower? ( udev )
 "
 
@@ -98,7 +99,7 @@ RDEPEND="${COMMONDEPEND}
 	$(add_kdebase_dep kde-env)
 	sys-apps/dbus[X]
 	!aqua? (
-		sys-fs/udisks:2
+		udisks? ( sys-fs/udisks:2 )
 		x11-apps/iceauth
 		x11-apps/rgb
 		>=x11-misc/xdg-utils-1.0.2-r3
@@ -137,6 +138,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.9.3-werror.patch"
+	"${FILESDIR}/${PN}-4.10.0-udisks.patch"
 )
 
 pkg_pretend() {
@@ -191,7 +193,6 @@ src_configure() {
 		-DWITH_HSPELL=OFF
 		-DWITH_ASPELL=OFF
 		-DWITH_DNSSD=OFF
-		-DWITH_SOLID_UDISKS2=ON
 		-DKDE_DEFAULT_HOME=.kde4
 		-DKAUTH_BACKEND=POLKITQT-1
 		-DBUILD_libkactivities=OFF
@@ -217,6 +218,7 @@ src_configure() {
 		$(cmake-utils_use_with spell ENCHANT)
 		$(cmake-utils_use_with ssl OpenSSL)
 		$(cmake-utils_use_with udev UDev)
+		$(cmake-utils_use_with udisks SOLID_UDISKS2)
 		$(cmake-utils_use_with upnp HUpnp)
 		$(cmake-utils_use_with zeroconf Avahi)
 	)

diff --git a/kde-base/kdelibs/metadata.xml b/kde-base/kdelibs/metadata.xml
index 5f0250f..ea382c5 100644
--- a/kde-base/kdelibs/metadata.xml
+++ b/kde-base/kdelibs/metadata.xml
@@ -4,6 +4,7 @@
   <herd>kde</herd>
   <use>
 	<flag name="opengl">Enable OpenGL support for Plasma (GLApplet)</flag>
+	<flag name="udisks">Use udisks for block device access (e.g., automounting)</flag>
 	<flag name="upower">Use upower for power management</flag>
 	<flag name="upnp">Build the Solid backend to provide information about UPnP devices on the network</flag>
   </use>


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2014-04-23 15:41 Michael Palimaka
  0 siblings, 0 replies; 38+ messages in thread
From: Michael Palimaka @ 2014-04-23 15:41 UTC (permalink / raw
  To: gentoo-commits

commit:     c187ceb3c356bd8a728bcac24eb70622638a7ebf
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 23 15:09:35 2014 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Wed Apr 23 15:39:01 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=c187ceb3

[kde-base/kdelibs] Rebase MIME types patch due to upstream changes wrt bug #508518.

Package-Manager: portage-2.2.8-r1

---
 .../kdelibs/files/kdelibs-4.14.0-mimetypes.patch   | 39 ++++++++++++++++++++++
 kde-base/kdelibs/kdelibs-9999.ebuild               |  2 +-
 2 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.14.0-mimetypes.patch b/kde-base/kdelibs/files/kdelibs-4.14.0-mimetypes.patch
new file mode 100644
index 0000000..5e54390
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.14.0-mimetypes.patch
@@ -0,0 +1,39 @@
+Remove fake MIME types that cause warnings.
+
+The offending MIME types are commented out rather than
+physically removed because doing so would cause the patch
+to be too large.
+
+diff --git a/mimetypes/kde.xml b/mimetypes/kde.xml
+index 76303db..23351c4 100644
+--- a/mimetypes/kde.xml
++++ b/mimetypes/kde.xml
+@@ -1783,8 +1783,8 @@ Notes:
+     </magic>
+     <glob pattern="*.abc"/>
+   </mime-type>
+-
+-  <!-- all/ fake mime types -->
++<!--
++  all/ fake mime types
+   <mime-type type="all/all">
+     <comment>all files and folders</comment>
+     <comment xml:lang="ar">كل الملفات و المجلدات</comment>
+@@ -1902,7 +1902,7 @@ Notes:
+     <comment xml:lang="zh_TW">所有檔案</comment>
+   </mime-type>
+ 
+-  <!-- uri/ fake mime types -->
++  uri/ fake mime types
+   <mime-type type="uri/mms">
+     <comment>mms: URIs</comment>
+     <comment xml:lang="ar">mms: وصلات</comment>
+@@ -2245,7 +2245,7 @@ Notes:
+     <comment xml:lang="zh_CN">rtspu: 地址</comment>
+     <comment xml:lang="zh_TW">rtspu: 網址</comment>
+   </mime-type>
+-
++-->
+   <mime-type type="application/vnd.kde.fontspackage">
+     <sub-class-of type="application/zip"/>
+     <comment>fonts package</comment>

diff --git a/kde-base/kdelibs/kdelibs-9999.ebuild b/kde-base/kdelibs/kdelibs-9999.ebuild
index 8f77154..c22f10c 100644
--- a/kde-base/kdelibs/kdelibs-9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-9999.ebuild
@@ -127,7 +127,7 @@ PDEPEND="
 PATCHES=(
 	"${FILESDIR}/dist/01_gentoo_set_xdg_menu_prefix-1.patch"
 	"${FILESDIR}/dist/02_gentoo_append_xdg_config_dirs-1.patch"
-	"${FILESDIR}/${PN}-4.7.96-mimetypes.patch"
+	"${FILESDIR}/${PN}-4.14.0-mimetypes.patch"
 	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
 	"${FILESDIR}/${PN}-4.6.2-armlinking.patch"
 	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2015-03-21 18:24 Michael Palimaka
  0 siblings, 0 replies; 38+ messages in thread
From: Michael Palimaka @ 2015-03-21 18:24 UTC (permalink / raw
  To: gentoo-commits

commit:     85d2ef91690b22551e579ecfd5fc7f9dbe5fb44f
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 21 18:19:51 2015 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Sat Mar 21 18:19:51 2015 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=85d2ef91

[kde-base/kdelibs] Moved to main tree.

Package-Manager: portage-2.2.18

 .../kdelibs/files/kdelibs-4.15.6-fix-bic.patch     |  47 ----
 kde-base/kdelibs/kdelibs-4.14.6-r1.ebuild          | 307 ---------------------
 2 files changed, 354 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.15.6-fix-bic.patch b/kde-base/kdelibs/files/kdelibs-4.15.6-fix-bic.patch
deleted file mode 100644
index 585ce51..0000000
--- a/kde-base/kdelibs/files/kdelibs-4.15.6-fix-bic.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-diff --git a/khtml/dom/dom_string.h b/khtml/dom/dom_string.h
-index 087f697..b269213 100644
---- a/khtml/dom/dom_string.h
-+++ b/khtml/dom/dom_string.h
-@@ -124,10 +124,23 @@ public:
-     bool endsWith(const DOMString& str) const;
-     bool startsWith(const DOMString& str) const;
- 
--    // http://www.w3.org/TR/html/infrastructure.html#urls
-+    /**
-+     * Return a parsed url.
-+     * Used to parse SRC url attribute,
-+     * see http://www.w3.org/TR/html/infrastructure.html#urls
-+     *
-+     * @since 4.14.6
-+     */
-     DOMString parsedUrl() const;
- 
-     /**
-+     * @deprecated, use parsedUrl()
-+     */
-+#ifndef KDE_NO_DEPRECATED
-+    KDE_DEPRECATED DOMString trimSpaces() const;
-+#endif
-+
-+    /**
-      * @internal get a handle to the imlementation of the DOMString
-      * Use at own risk!!!
-      */
-diff --git a/khtml/dom/dom_string.cpp b/khtml/dom/dom_string.cpp
-index a3c4abd..4da676b 100644
---- a/khtml/dom/dom_string.cpp
-+++ b/khtml/dom/dom_string.cpp
-@@ -336,6 +336,13 @@ DOMString DOMString::parsedUrl() const
-     return out;
- }
- 
-+#ifndef KDE_NO_DEPRECATED
-+DOMString DOMString::trimSpaces() const
-+{
-+    return parsedUrl();
-+}
-+#endif
-+
- // ------------------------------------------------------------------------
- 
- bool DOM::strcasecmp( const DOMString &as, const DOMString &bs )

diff --git a/kde-base/kdelibs/kdelibs-4.14.6-r1.ebuild b/kde-base/kdelibs/kdelibs-4.14.6-r1.ebuild
deleted file mode 100644
index 8ca2f8f..0000000
--- a/kde-base/kdelibs/kdelibs-4.14.6-r1.ebuild
+++ /dev/null
@@ -1,307 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI=5
-
-CPPUNIT_REQUIRED="optional"
-DECLARATIVE_REQUIRED="always"
-OPENGL_REQUIRED="optional"
-KDE_HANDBOOK="optional"
-inherit kde4-base fdo-mime multilib toolchain-funcs flag-o-matic
-
-EGIT_BRANCH="KDE/4.14"
-
-DESCRIPTION="KDE libraries needed by all KDE programs"
-
-KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-LICENSE="LGPL-2.1"
-IUSE="cpu_flags_x86_3dnow acl alsa altivec +bzip2 +crypt debug doc fam jpeg2k
-kerberos lzma cpu_flags_x86_mmx nepomuk nls openexr +policykit spell
-cpu_flags_x86_sse cpu_flags_x86_sse2 ssl +udev +udisks +upower zeroconf"
-
-REQUIRED_USE="
-	udisks? ( udev )
-	upower? ( udev )
-"
-
-# needs the kate regression testsuite from svn
-RESTRICT="test"
-
-COMMONDEPEND="
-	>=app-misc/strigi-0.7.7
-	app-text/docbook-xml-dtd:4.2
-	app-text/docbook-xsl-stylesheets
-	>=dev-libs/libattica-0.4.2
-	>=dev-libs/libdbusmenu-qt-0.3.2[qt4(+)]
-	dev-libs/libpcre[unicode]
-	dev-libs/libxml2
-	dev-libs/libxslt
-	media-libs/fontconfig
-	media-libs/freetype:2
-	media-libs/giflib
-	media-libs/libpng:0=
-	media-libs/phonon[qt4]
-	sys-libs/zlib
-	virtual/jpeg:0
-	>=x11-misc/shared-mime-info-0.60
-	acl? ( virtual/acl )
-	alsa? ( media-libs/alsa-lib )
-	!aqua? (
-		x11-libs/libICE
-		x11-libs/libSM
-		x11-libs/libX11
-		x11-libs/libXau
-		x11-libs/libXcursor
-		x11-libs/libXdmcp
-		x11-libs/libXext
-		x11-libs/libXfixes
-		x11-libs/libXft
-		x11-libs/libXpm
-		x11-libs/libXrender
-		x11-libs/libXScrnSaver
-		x11-libs/libXtst
-		!kernel_SunOS? (
-			|| (
-				sys-libs/libutempter
-				>=sys-freebsd/freebsd-lib-9.0
-			)
-		)
-	)
-	bzip2? ( app-arch/bzip2 )
-	crypt? ( app-crypt/qca:2[qt4(+)] )
-	fam? ( virtual/fam )
-	jpeg2k? ( media-libs/jasper )
-	kerberos? ( virtual/krb5 )
-	nepomuk? (
-		>=dev-libs/shared-desktop-ontologies-0.11.0
-		>=dev-libs/soprano-2.9.0[dbus,raptor,redland]
-	)
-	openexr? (
-		media-libs/openexr:=
-		media-libs/ilmbase:=
-	)
-	policykit? ( >=sys-auth/polkit-qt-0.103.0 )
-	spell? ( app-text/enchant )
-	ssl? ( dev-libs/openssl:0 )
-	udev? ( virtual/udev )
-	zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
-"
-DEPEND="${COMMONDEPEND}
-	doc? ( app-doc/doxygen )
-	nls? ( virtual/libintl )
-"
-RDEPEND="${COMMONDEPEND}
-	!dev-qt/qtphonon
-	!<=kde-base/plasma-workspace-4.7.1:4
-	!<=kde-base/kcontrol-4.4.50:4
-	>=app-crypt/gnupg-2.0.11
-	app-misc/ca-certificates
-	$(add_kdebase_dep kde-env '' 4.14.3)
-	sys-apps/dbus[X]
-	!aqua? (
-		udisks? ( sys-fs/udisks:2 )
-		x11-apps/iceauth
-		x11-apps/rgb
-		>=x11-misc/xdg-utils-1.0.2-r3
-		upower? ( || ( >=sys-power/upower-0.9.23 sys-power/upower-pm-utils ) )
-	)
-	udev? ( app-misc/media-player-info )
-"
-PDEPEND="
-	$(add_kdebase_dep katepart '' 4.14.3)
-	|| (
-		$(add_kdebase_dep kfmclient '' 4.14.3)
-		x11-misc/xdg-utils
-	)
-	handbook? (
-		|| (
-			$(add_kdebase_dep khelpcenter '' 4.14.3)
-			kde-plasma/khelpcenter:5[compat(+)]
-		)
-	)
-	nepomuk? (
-		$(add_kdebase_dep nepomuk-core '' 4.14.3)
-		$(add_kdebase_dep nepomuk-widgets '' 4.14.3)
-	)
-	policykit? ( || (
-		>=sys-auth/polkit-kde-agent-0.99
-		kde-plasma/polkit-kde-agent
-	) )
-"
-
-PATCHES=(
-	"${FILESDIR}/dist/01_gentoo_set_xdg_menu_prefix-1.patch"
-	"${FILESDIR}/dist/02_gentoo_append_xdg_config_dirs-1.patch"
-	"${FILESDIR}/${PN}-4.14.5-fatalwarnings.patch"
-	"${FILESDIR}/${PN}-4.14.5-mimetypes.patch"
-	"${FILESDIR}/${PN}-4.4.90-xslt.patch"
-	"${FILESDIR}/${PN}-4.6.3-no_suid_kdeinit.patch"
-	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
-	"${FILESDIR}/${PN}-4.9.3-werror.patch"
-	"${FILESDIR}/${PN}-4.10.0-udisks.patch"
-	"${FILESDIR}/${PN}-4.15.6-fix-bic.patch"
-)
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]]; then
-		[[ $(gcc-major-version) -lt 4 ]] || \
-				( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 3 ]] ) \
-			&& die "Sorry, but gcc-4.3 and earlier won't work for KDE SC 4.6 (see bug #354837)."
-	fi
-}
-
-src_prepare() {
-	kde4-base_src_prepare
-
-	# Rename applications.menu (needs 01_gentoo_set_xdg_menu_prefix-1.patch to work)
-	sed -e 's|FILES[[:space:]]applications.menu|FILES applications.menu RENAME kde-4-applications.menu|g' \
-		-i kded/CMakeLists.txt || die "Sed on CMakeLists.txt for applications.menu failed."
-
-	if use aqua; then
-		sed -i -e \
-			"s:BUNDLE_INSTALL_DIR \"/Applications:BUNDLE_INSTALL_DIR \"${EPREFIX}/${APP_BUNDLE_DIR}:g" \
-			cmake/modules/FindKDE4Internal.cmake || die "failed to sed FindKDE4Internal.cmake"
-
-		#if [[ ${CHOST} == *-darwin8 ]]; then
-		sed -i -e \
-			"s:set(_add_executable_param MACOSX_BUNDLE):remove(_add_executable_param MACOSX_BUNDLE):g" \
-			cmake/modules/KDE4Macros.cmake || die "failed to sed KDE4Macros.cmake"
-		#fi
-
-		# solid/solid/backends/iokit doesn't properly link, so disable it.
-		sed -e "s|\(APPLE\)|(FALSE)|g" -i solid/solid/CMakeLists.txt \
-			|| die "disabling solid/solid/backends/iokit failed"
-		sed -e "s|m_backend = .*Backends::IOKit.*;|m_backend = 0;|g" -i solid/solid/managerbase.cpp \
-			|| die "disabling solid/solid/backends/iokit failed"
-
-		# There's no fdatasync on OSX and the check fails to detect that.
-		sed -e "/HAVE_FDATASYNC/ d" -i config.h.cmake \
-			|| die "disabling fdatasync failed"
-
-		# Fix nameser include to nameser8_compat
-		sed -e "s|nameser8_compat.h|nameser_compat.h|g" -i kio/misc/kpac/discovery.cpp \
-			|| die "fixing nameser include failed"
-		append-flags -DHAVE_ARPA_NAMESER8_COMPAT_H=1
-
-		# Try to fix kkeyserver_mac
-		epatch "${FILESDIR}"/${PN}-4.3.80-kdeui_util_kkeyserver_mac.patch
-	fi
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DWITH_HSPELL=OFF
-		-DWITH_ASPELL=OFF
-		-DWITH_DNSSD=OFF
-		-DKDE_DEFAULT_HOME=.kde4
-		-DKAUTH_BACKEND=POLKITQT-1
-		-DBUILD_libkactivities=OFF
-		$(cmake-utils_use_build handbook doc)
-		$(cmake-utils_use_has cpu_flags_x86_3dnow X86_3DNOW)
-		$(cmake-utils_use_has altivec PPC_ALTIVEC)
-		$(cmake-utils_use_has cpu_flags_x86_mmx X86_MMX)
-		$(cmake-utils_use_has cpu_flags_x86_sse X86_SSE)
-		$(cmake-utils_use_has cpu_flags_x86_sse2 X86_SSE2)
-		$(cmake-utils_use_with acl)
-		$(cmake-utils_use_with alsa)
-		$(cmake-utils_use_with bzip2 BZip2)
-		$(cmake-utils_use_with crypt QCA2)
-		$(cmake-utils_use_with fam)
-		$(cmake-utils_use_with jpeg2k Jasper)
-		$(cmake-utils_use_with kerberos GSSAPI)
-		$(cmake-utils_use_with lzma LibLZMA)
-		$(cmake-utils_use_with nepomuk Soprano)
-		$(cmake-utils_use_with nepomuk SharedDesktopOntologies)
-		$(cmake-utils_use_with nls Libintl)
-		$(cmake-utils_use_with openexr OpenEXR)
-		$(cmake-utils_use_with opengl OpenGL)
-		$(cmake-utils_use_with policykit PolkitQt-1)
-		$(cmake-utils_use_with spell ENCHANT)
-		$(cmake-utils_use_with ssl OpenSSL)
-		$(cmake-utils_use_with udev UDev)
-		$(cmake-utils_use_with udisks SOLID_UDISKS2)
-		$(cmake-utils_use_with zeroconf Avahi)
-	)
-	kde4-base_src_configure
-}
-
-src_compile() {
-	kde4-base_src_compile
-
-	# The building of apidox is not managed anymore by the build system
-	if use doc; then
-		einfo "Building API documentation"
-		cd "${S}"/doc/api/
-		./doxygen.sh "${S}" || die "APIDOX generation failed"
-	fi
-}
-
-src_install() {
-	kde4-base_src_install
-
-	# use system certificates
-	rm -f "${ED}"/usr/share/apps/kssl/ca-bundle.crt || die
-	dosym /etc/ssl/certs/ca-certificates.crt /usr/share/apps/kssl/ca-bundle.crt
-
-	if use doc; then
-		einfo "Installing API documentation. This could take a bit of time."
-		cd "${S}"/doc/api/
-		docinto /HTML/en/kdelibs-apidox
-		dohtml -r ${P}-apidocs/*
-	fi
-
-	if use aqua; then
-		einfo "fixing ${PN} plugins"
-
-		local _PV=${PV:0:3}.0
-		local _dir=${EPREFIX}/usr/$(get_libdir)/kde4/plugins/script
-
-		install_name_tool -id \
-			"${_dir}/libkrossqtsplugin.${_PV}.dylib" \
-			"${D}/${_dir}/libkrossqtsplugin.${_PV}.dylib" \
-			|| die "failed fixing libkrossqtsplugin.${_PV}.dylib"
-
-		einfo "fixing ${PN} cmake detection files"
-		#sed -i -e \
-		#	"s:if (HAVE_XKB):if (HAVE_XKB AND NOT APPLE):g" \
-		echo -e "set(XKB_FOUND FALSE)\nset(HAVE_XKB FALSE)" > \
-			"${ED}"/usr/share/apps/cmake/modules/FindXKB.cmake \
-			|| die "failed fixing FindXKB.cmake"
-	fi
-
-	einfo Installing environment file.
-	# Since 44qt4 is sourced earlier QT_PLUGIN_PATH is defined.
-	echo "COLON_SEPARATED=QT_PLUGIN_PATH" > "${T}/77kde"
-	echo "QT_PLUGIN_PATH=${EPREFIX}/usr/$(get_libdir)/kde4/plugins" >> "${T}/77kde"
-	doenvd "${T}/77kde"
-}
-
-pkg_postinst() {
-	fdo-mime_mime_database_update
-
-	if use zeroconf; then
-		echo
-		elog "To make zeroconf support available in KDE make sure that the avahi daemon"
-		elog "is running."
-		echo
-		einfo "If you also want to use zeroconf for hostname resolution, emerge sys-auth/nss-mdns"
-		einfo "and enable multicast dns lookups by editing the 'hosts:' line in /etc/nsswitch.conf"
-		einfo "to include 'mdns', e.g.:"
-		einfo "	hosts: files mdns dns"
-		echo
-	fi
-
-	kde4-base_pkg_postinst
-}
-
-pkg_prerm() {
-	# Remove ksycoca4 global database
-	rm -f "${EROOT}${PREFIX}"/share/kde4/services/ksycoca4
-}
-
-pkg_postrm() {
-	fdo-mime_mime_database_update
-
-	kde4-base_pkg_postrm
-}


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/
@ 2015-10-15 19:10 Michael Palimaka
  0 siblings, 0 replies; 38+ messages in thread
From: Michael Palimaka @ 2015-10-15 19:10 UTC (permalink / raw
  To: gentoo-commits

commit:     460630fff44ed3aff2de695658b224d4fce9536d
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 15 19:09:06 2015 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu Oct 15 19:10:38 2015 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=460630ff

kde-base/kdelibs: make Qt selection patch actually work

Package-Manager: portage-2.2.20.1

 ...4-FindQt4.patch => kdelibs-4.14.13-FindQt4.patch} | 20 ++++++++++----------
 kde-base/kdelibs/kdelibs-4.9999.ebuild               |  2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/kde-base/kdelibs/files/kdelibs-4.14.14-FindQt4.patch b/kde-base/kdelibs/files/kdelibs-4.14.13-FindQt4.patch
similarity index 73%
rename from kde-base/kdelibs/files/kdelibs-4.14.14-FindQt4.patch
rename to kde-base/kdelibs/files/kdelibs-4.14.13-FindQt4.patch
index 3994e20..4d413b7 100644
--- a/kde-base/kdelibs/files/kdelibs-4.14.14-FindQt4.patch
+++ b/kde-base/kdelibs/files/kdelibs-4.14.13-FindQt4.patch
@@ -12,12 +12,12 @@ Gentoo-bug: 562746
 
 --- cmake/modules/FindQt4.cmake
 +++ cmake/modules/FindQt4.cmake
-@@ -446,6 +446,23 @@ GET_FILENAME_COMPONENT(qt_install_version "[HKEY_CURRENT_USER\\Software\\trollte
+@@ -446,6 +446,15 @@ GET_FILENAME_COMPONENT(qt_install_version "[HKEY_CURRENT_USER\\Software\\trollte
  # check for qmake
  # Debian uses qmake-qt4
  # macports' Qt uses qmake-mac
 +if(CMAKE_BUILD_TYPE STREQUAL Gentoo)
-+  find_program(QT_QMAKE_EXECUTABLE NAMES ${QMAKE_NAME}
++  find_program(QT_QMAKE_EXECUTABLE NAMES qmake
 +    PATHS
 +      /usr/${CMAKE_INSTALL_LIBDIR}/qt4/bin
 +      /usr/bin
@@ -25,14 +25,14 @@ Gentoo-bug: 562746
 +    DOC "The qmake executable for the Qt installation to use"
 +  )
 +else()
-+  find_program(QT_QMAKE_EXECUTABLE NAMES ${QMAKE_NAME}
-+    PATHS
-+      ENV QTDIR
-+      "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]"
-+    PATH_SUFFIXES bin
-+    DOC "The qmake executable for the Qt installation to use"
-+  )
-+endif()
  FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac PATHS
    "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
    "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
+@@ -453,6 +462,7 @@ FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac PATHS
+   $ENV{QTDIR}/bin
+   DOC "The qmake executable for the Qt installation to use"
+ )
++endif()
+ 
+ IF (QT_QMAKE_EXECUTABLE)
+ 

diff --git a/kde-base/kdelibs/kdelibs-4.9999.ebuild b/kde-base/kdelibs/kdelibs-4.9999.ebuild
index 4cecc61..6201109 100644
--- a/kde-base/kdelibs/kdelibs-4.9999.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.9999.ebuild
@@ -133,7 +133,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.9.3-werror.patch"
 	"${FILESDIR}/${PN}-4.10.0-udisks.patch"
-	"${FILESDIR}/${PN}-4.14.14-FindQt4.patch"
+	"${FILESDIR}/${PN}-4.14.13-FindQt4.patch"
 )
 
 pkg_pretend() {


^ permalink raw reply related	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2015-10-15 19:11 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-24 16:47 [gentoo-commits] proj/kde:master commit in: kde-base/kdelibs/, kde-base/kdelibs/files/ Andreas Hüttel
  -- strict thread matches above, loose matches on Subject: below --
2015-10-15 19:10 Michael Palimaka
2015-03-21 18:24 Michael Palimaka
2014-04-23 15:41 Michael Palimaka
2013-02-08 12:46 Michael Palimaka
2013-01-31 16:15 Michael Palimaka
2012-12-28 20:22 Andreas Hüttel
2012-12-28 20:15 Andreas Hüttel
2012-12-17 21:26 Andreas Hüttel
2012-11-08  7:51 Michael Palimaka
2012-11-07 19:47 Michael Palimaka
2012-11-07 19:33 Michael Palimaka
2012-10-08  9:20 Michael Palimaka
2012-09-22 17:54 Jonathan Callen
2012-08-23  7:56 Michael Palimaka
2012-08-17 15:50 Michael Palimaka
2012-07-14 19:43 Johannes Huber
2012-07-06 20:54 Andreas Hüttel
2012-06-27 22:05 Andreas Hüttel
2012-06-27 19:55 Andreas Hüttel
2012-06-21 20:20 Andreas Hüttel
2012-06-20 11:44 Andreas Hüttel
2012-06-19 21:05 Andreas Hüttel
2012-06-19 20:48 Andreas Hüttel
2012-05-31 21:38 Marc Schiffbauer
2012-04-12 19:38 Michael Palimaka
2012-04-05  5:55 Johannes Huber
2012-04-03 21:01 Andreas Hüttel
2012-01-05 11:12 Johannes Huber
2011-12-27  3:38 Marc Schiffbauer
2011-09-28 10:56 Marc Schiffbauer
2011-09-24 15:36 Andreas Hüttel
2011-06-21 20:38 Andreas Hüttel
2011-05-01 22:24 Tomas Chvatal
2011-05-01 22:13 Tomas Chvatal
2011-04-11 22:07 Andreas K. Huettel
2011-04-03 17:06 Andreas K. Huettel
2011-02-27 20:45 Andreas K. Huettel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox