diff --git a/akonadi-1.1.1-mysql_conf.patch b/akonadi-1.1.1-mysql_conf.patch deleted file mode 100644 index 0963a37..0000000 --- a/akonadi-1.1.1-mysql_conf.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up akonadi-1.1.1/server/src/storage/mysql-global.conf.mysql_conf akonadi-1.1.1/server/src/storage/mysql-global.conf ---- akonadi-1.1.1/server/src/storage/mysql-global.conf.mysql_conf 2009-01-21 12:29:03.000000000 -0600 -+++ akonadi-1.1.1/server/src/storage/mysql-global.conf 2009-02-20 11:18:57.000000000 -0600 -@@ -49,6 +49,6 @@ innodb_additional_mem_pool_size=1M - # SELECT sum(data_length) as bla, sum(index_length) as blub FROM information_schema.tables WHERE table_schema not in ("mysql", "information_schema"); - innodb_buffer_pool_size=80M - # size of average write burst, keep Innob_log_waits small, keep Innodb_buffer_pool_wait_free small (see show global status like "inno%", show global variables) --innodb_log_file_size=64M -+innodb_log_file_size=8M - innodb_flush_log_at_trx_commit=2 - diff --git a/akonadi-1.4.0-sqlite_default.patch b/akonadi-1.4.0-sqlite_default.patch deleted file mode 100644 index 32ae550..0000000 --- a/akonadi-1.4.0-sqlite_default.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nru akonadi-1.4.0.orig//server/src/storage/dbconfig.cpp akonadi-1.4.0/server/src/storage/dbconfig.cpp ---- akonadi-1.4.0.orig//server/src/storage/dbconfig.cpp 2010-07-31 18:12:25.000000000 +0200 -+++ akonadi-1.4.0/server/src/storage/dbconfig.cpp 2010-09-20 16:36:52.405437609 +0200 -@@ -62,7 +62,7 @@ - QSettings settings( serverConfigFile, QSettings::IniFormat ); - - // determine driver to use -- const QString defaultDriver = QLatin1String( "QMYSQL" ); -+ const QString defaultDriver = QLatin1String( "QSQLITE" ); - QString driverName = settings.value( QLatin1String( "General/Driver" ), defaultDriver ).toString(); - if ( driverName.isEmpty() ) - driverName = defaultDriver; diff --git a/akonadi-16.04.2-qt-5.7.0-sqlite3.patch b/akonadi-16.04.2-qt-5.7.0-sqlite3.patch new file mode 100644 index 0000000..6faf747 --- /dev/null +++ b/akonadi-16.04.2-qt-5.7.0-sqlite3.patch @@ -0,0 +1,891 @@ +diff -Nru akonadi-16.04.2/CMakeLists.txt akonadi-16.04.2.patched/CMakeLists.txt +--- akonadi-16.04.2/CMakeLists.txt 2016-05-31 11:33:56.000000000 +0200 ++++ akonadi-16.04.2.patched/CMakeLists.txt 2016-06-30 22:38:55.661518771 +0200 +@@ -31,14 +31,13 @@ + SOVERSION 5) + + # Find packages +-find_package(Qt5Core ${QT_REQUIRED_VERSION} CONFIG REQUIRED) +-find_package(Qt5Gui ${QT_REQUIRED_VERSION} CONFIG REQUIRED) +-find_package(Qt5Widgets ${QT_REQUIRED_VERSION} CONFIG REQUIRED) +-find_package(Qt5Sql ${QT_REQUIRED_VERSION} CONFIG REQUIRED) +-find_package(Qt5Network ${QT_REQUIRED_VERSION} CONFIG REQUIRED) +-find_package(Qt5Xml ${QT_REQUIRED_VERSION} CONFIG REQUIRED) +-find_package(Qt5DBus ${QT_REQUIRED_VERSION} CONFIG REQUIRED) +-find_package(Qt5Test ${QT_REQUIRED_VERSION} CONFIG REQUIRED) ++find_package(Qt5Core ${QT_REQUIRED_VERSION} REQUIRED COMPONENTS Private) ++find_package(Qt5Sql ${QT_REQUIRED_VERSION} REQUIRED COMPONENTS Private) ++find_package(Qt5DBus ${QT_REQUIRED_VERSION} REQUIRED) ++find_package(Qt5Network ${QT_REQUIRED_VERSION} REQUIRED) ++find_package(Qt5Test ${QT_REQUIRED_VERSION} REQUIRED) ++find_package(Qt5Widgets ${QT_REQUIRED_VERSION} REQUIRED) ++find_package(Qt5Xml ${QT_REQUIRED_VERSION} REQUIRED) + + find_package(KF5ItemViews ${KF5_VERSION} CONFIG REQUIRED) + find_package(KF5KIO ${KF5_VERSION} CONFIG REQUIRED) +@@ -129,7 +128,7 @@ + set(SQLITE_TYPE "OPTIONAL") + endif() + +-if(AKONADI_BUILD_QSQLITE AND Qt5Core_VERSION VERSION_LESS 5.7.0) # API change in 5.7 breaks our sqlite driver ++if(AKONADI_BUILD_QSQLITE) + set(SQLITE_MIN_VERSION 3.6.23) + find_package(Sqlite ${SQLITE_MIN_VERSION}) + set_package_properties(Sqlite PROPERTIES +diff -Nru akonadi-16.04.2/src/qsqlite/CMakeLists.txt akonadi-16.04.2.patched/src/qsqlite/CMakeLists.txt +--- akonadi-16.04.2/src/qsqlite/CMakeLists.txt 2016-05-31 11:33:56.000000000 +0200 ++++ akonadi-16.04.2.patched/src/qsqlite/CMakeLists.txt 2016-06-30 22:27:54.489104785 +0200 +@@ -9,6 +9,8 @@ + set(QSQLITE_INSTALL_PREFIX "${PLUGIN_INSTALL_DIR}/sqldrivers") + + include_directories( ++ ${Qt5Core_PRIVATE_INCLUDE_DIRS} ++ ${Qt5Sql_PRIVATE_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR}/src + ${SQLITE_INCLUDE_DIR} + ) +diff -Nru akonadi-16.04.2/src/qsqlite/src/QtSql/private/qobject_p.h akonadi-16.04.2.patched/src/qsqlite/src/QtSql/private/qobject_p.h +--- akonadi-16.04.2/src/qsqlite/src/QtSql/private/qobject_p.h 2016-05-31 11:33:56.000000000 +0200 ++++ akonadi-16.04.2.patched/src/qsqlite/src/QtSql/private/qobject_p.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,434 +0,0 @@ +-/**************************************************************************** +-** +-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +-** Copyright (C) 2013 Olivier Goffart +-** Contact: http://www.qt-project.org/legal +-** +-** This file is part of the QtCore module of the Qt Toolkit. +-** +-** $QT_BEGIN_LICENSE:LGPL$ +-** Commercial License Usage +-** Licensees holding valid commercial Qt licenses may use this file in +-** accordance with the commercial license agreement provided with the +-** Software or, alternatively, in accordance with the terms contained in +-** a written agreement between you and Digia. For licensing terms and +-** conditions see http://qt.digia.com/licensing. For further information +-** use the contact form at http://qt.digia.com/contact-us. +-** +-** GNU Lesser General Public License Usage +-** Alternatively, this file may be used under the terms of the GNU Lesser +-** General Public License version 2.1 as published by the Free Software +-** Foundation and appearing in the file LICENSE.LGPL included in the +-** packaging of this file. Please review the following information to +-** ensure the GNU Lesser General Public License version 2.1 requirements +-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +-** +-** In addition, as a special exception, Digia gives you certain additional +-** rights. These rights are described in the Digia Qt LGPL Exception +-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +-** +-** GNU General Public License Usage +-** Alternatively, this file may be used under the terms of the GNU +-** General Public License version 3.0 as published by the Free Software +-** Foundation and appearing in the file LICENSE.GPL included in the +-** packaging of this file. Please review the following information to +-** ensure the GNU General Public License version 3.0 requirements will be +-** met: http://www.gnu.org/copyleft/gpl.html. +-** +-** +-** $QT_END_LICENSE$ +-** +-****************************************************************************/ +- +-#ifndef QOBJECT_P_H +-#define QOBJECT_P_H +- +-// +-// W A R N I N G +-// ------------- +-// +-// This file is not part of the Qt API. It exists for the convenience +-// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header +-// file may change from version to version without notice, or even be removed. +-// +-// We mean it. +-// +- +-#include "QtCore/qobject.h" +-#include "QtCore/qpointer.h" +-#include "QtCore/qsharedpointer.h" +-#include "QtCore/qcoreevent.h" +-#include "QtCore/qlist.h" +-#include "QtCore/qvector.h" +-#include "QtCore/qvariant.h" +-#include "QtCore/qreadwritelock.h" +- +-QT_BEGIN_NAMESPACE +- +-class QVariant; +-class QThreadData; +-class QObjectConnectionListVector; +-namespace QtSharedPointer { struct ExternalRefCountData; } +- +-/* for Qt Test */ +-struct QSignalSpyCallbackSet +-{ +- typedef void (*BeginCallback)(QObject *caller, int signal_or_method_index, void **argv); +- typedef void (*EndCallback)(QObject *caller, int signal_or_method_index); +- BeginCallback signal_begin_callback, +- slot_begin_callback; +- EndCallback signal_end_callback, +- slot_end_callback; +-}; +-void Q_CORE_EXPORT qt_register_signal_spy_callbacks(const QSignalSpyCallbackSet &callback_set); +- +-extern QSignalSpyCallbackSet Q_CORE_EXPORT qt_signal_spy_callback_set; +- +-enum { QObjectPrivateVersion = QT_VERSION }; +- +-class Q_CORE_EXPORT QAbstractDeclarativeData +-{ +-public: +- static void (*destroyed)(QAbstractDeclarativeData *, QObject *); +- static void (*destroyed_qml1)(QAbstractDeclarativeData *, QObject *); +- static void (*parentChanged)(QAbstractDeclarativeData *, QObject *, QObject *); +- static void (*signalEmitted)(QAbstractDeclarativeData *, QObject *, int, void **); +- static int (*receivers)(QAbstractDeclarativeData *, const QObject *, int); +- static bool (*isSignalConnected)(QAbstractDeclarativeData *, const QObject *, int); +-}; +- +-// This is an implementation of QAbstractDeclarativeData that is identical with +-// the implementation in QtDeclarative and QtQml for the first bit +-struct QAbstractDeclarativeDataImpl : public QAbstractDeclarativeData +-{ +- quint32 ownedByQml1:1; +- quint32 unused: 31; +-}; +- +-class Q_CORE_EXPORT QObjectPrivate : public QObjectData +-{ +- Q_DECLARE_PUBLIC(QObject) +- +-public: +- struct ExtraData +- { +- ExtraData() {} +- #ifndef QT_NO_USERDATA +- QVector userData; +- #endif +- QList propertyNames; +- QList propertyValues; +- QVector runningTimers; +- QList > eventFilters; +- QString objectName; +- }; +- +- typedef void (*StaticMetaCallFunction)(QObject *, QMetaObject::Call, int, void **); +- struct Connection +- { +- QObject *sender; +- QObject *receiver; +- union { +- StaticMetaCallFunction callFunction; +- QtPrivate::QSlotObjectBase *slotObj; +- }; +- // The next pointer for the singly-linked ConnectionList +- Connection *nextConnectionList; +- //senders linked list +- Connection *next; +- Connection **prev; +- QAtomicPointer argumentTypes; +- QAtomicInt ref_; +- ushort method_offset; +- ushort method_relative; +- uint signal_index : 27; // In signal range (see QObjectPrivate::signalIndex()) +- ushort connectionType : 3; // 0 == auto, 1 == direct, 2 == queued, 4 == blocking +- ushort isSlotObject : 1; +- ushort ownArgumentTypes : 1; +- Connection() : nextConnectionList(0), ref_(2), ownArgumentTypes(true) { +- //ref_ is 2 for the use in the internal lists, and for the use in QMetaObject::Connection +- } +- ~Connection(); +- int method() const { return method_offset + method_relative; } +- void ref() { ref_.ref(); } +- void deref() { +- if (!ref_.deref()) { +- Q_ASSERT(!receiver); +- delete this; +- } +- } +- }; +- // ConnectionList is a singly-linked list +- struct ConnectionList { +- ConnectionList() : first(0), last(0) {} +- Connection *first; +- Connection *last; +- }; +- +- struct Sender +- { +- QObject *sender; +- int signal; +- int ref; +- }; +- +- +- QObjectPrivate(int version = QObjectPrivateVersion); +- virtual ~QObjectPrivate(); +- void deleteChildren(); +- +- void setParent_helper(QObject *); +- void moveToThread_helper(); +- void setThreadData_helper(QThreadData *currentData, QThreadData *targetData); +- void _q_reregisterTimers(void *pointer); +- +- bool isSender(const QObject *receiver, const char *signal) const; +- QObjectList receiverList(const char *signal) const; +- QObjectList senderList() const; +- +- void addConnection(int signal, Connection *c); +- void cleanConnectionLists(); +- +- static inline Sender *setCurrentSender(QObject *receiver, +- Sender *sender); +- static inline void resetCurrentSender(QObject *receiver, +- Sender *currentSender, +- Sender *previousSender); +- +- static QObjectPrivate *get(QObject *o) { +- return o->d_func(); +- } +- +- int signalIndex(const char *signalName, const QMetaObject **meta = 0) const; +- inline bool isSignalConnected(uint signalIdx) const; +- +- // To allow abitrary objects to call connectNotify()/disconnectNotify() without making +- // the API public in QObject. This is used by QQmlNotifierEndpoint. +- inline void connectNotify(const QMetaMethod &signal); +- inline void disconnectNotify(const QMetaMethod &signal); +- +- template +- static inline QMetaObject::Connection connect(const typename QtPrivate::FunctionPointer::Object *sender, Func1 signal, +- const typename QtPrivate::FunctionPointer::Object *receiverPrivate, Func2 slot, +- Qt::ConnectionType type = Qt::AutoConnection); +- +- template +- static inline bool disconnect(const typename QtPrivate::FunctionPointer::Object *sender, Func1 signal, +- const typename QtPrivate::FunctionPointer::Object *receiverPrivate, Func2 slot); +- +- static QMetaObject::Connection connectImpl(const QObject *sender, int signal_index, +- const QObject *receiver, void **slot, +- QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type, +- const int *types, const QMetaObject *senderMetaObject); +- static QMetaObject::Connection connect(const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type); +- static bool disconnect(const QObject *sender, int signal_index, void **slot); +-public: +- ExtraData *extraData; // extra data set by the user +- QThreadData *threadData; // id of the thread that owns the object +- +- QObjectConnectionListVector *connectionLists; +- +- Connection *senders; // linked list of connections connected to this object +- Sender *currentSender; // object currently activating the object +- mutable quint32 connectedSignals[2]; +- +- union { +- QObject *currentChildBeingDeleted; +- QAbstractDeclarativeData *declarativeData; //extra data used by the declarative module +- }; +- +- // these objects are all used to indicate that a QObject was deleted +- // plus QPointer, which keeps a separate list +- QAtomicPointer sharedRefcount; +-}; +- +- +-/*! \internal +- +- Returns \c true if the signal with index \a signal_index from object \a sender is connected. +- Signals with indices above a certain range are always considered connected (see connectedSignals +- in QObjectPrivate). +- +- \a signal_index must be the index returned by QObjectPrivate::signalIndex; +-*/ +-inline bool QObjectPrivate::isSignalConnected(uint signal_index) const +-{ +- return signal_index >= sizeof(connectedSignals) * 8 +- || (connectedSignals[signal_index >> 5] & (1 << (signal_index & 0x1f)) +- || (declarativeData && QAbstractDeclarativeData::isSignalConnected +- && QAbstractDeclarativeData::isSignalConnected(declarativeData, q_func(), signal_index))); +-} +- +-inline QObjectPrivate::Sender *QObjectPrivate::setCurrentSender(QObject *receiver, +- Sender *sender) +-{ +- Sender *previousSender = receiver->d_func()->currentSender; +- receiver->d_func()->currentSender = sender; +- return previousSender; +-} +- +-inline void QObjectPrivate::resetCurrentSender(QObject *receiver, +- Sender *currentSender, +- Sender *previousSender) +-{ +- // ref is set to zero when this object is deleted during the metacall +- if (currentSender->ref == 1) +- receiver->d_func()->currentSender = previousSender; +- // if we've recursed, we need to tell the caller about the objects deletion +- if (previousSender) +- previousSender->ref = currentSender->ref; +-} +- +-inline void QObjectPrivate::connectNotify(const QMetaMethod &signal) +-{ +- q_ptr->connectNotify(signal); +-} +- +-inline void QObjectPrivate::disconnectNotify(const QMetaMethod &signal) +-{ +- q_ptr->disconnectNotify(signal); +-} +- +-namespace QtPrivate { +-template class QPrivateSlotObject : public QSlotObjectBase +-{ +- typedef QtPrivate::FunctionPointer FuncType; +- Func function; +- static void impl(int which, QSlotObjectBase *this_, QObject *r, void **a, bool *ret) +- { +- switch (which) { +- case Destroy: +- delete static_cast(this_); +- break; +- case Call: +- FuncType::template call(static_cast(this_)->function, +- static_cast(QObjectPrivate::get(r)), a); +- break; +- case Compare: +- *ret = *reinterpret_cast(a) == static_cast(this_)->function; +- break; +- case NumOperations: ; +- } +- } +-public: +- explicit QPrivateSlotObject(Func f) : QSlotObjectBase(&impl), function(f) {} +-}; +-} //namespace QtPrivate +- +-template +-inline QMetaObject::Connection QObjectPrivate::connect(const typename QtPrivate::FunctionPointer::Object *sender, Func1 signal, +- const typename QtPrivate::FunctionPointer::Object *receiverPrivate, Func2 slot, +- Qt::ConnectionType type) +-{ +- typedef QtPrivate::FunctionPointer SignalType; +- typedef QtPrivate::FunctionPointer SlotType; +- Q_STATIC_ASSERT_X(QtPrivate::HasQ_OBJECT_Macro::Value, +- "No Q_OBJECT in the class with the signal"); +- +- //compilation error if the arguments does not match. +- Q_STATIC_ASSERT_X(int(SignalType::ArgumentCount) >= int(SlotType::ArgumentCount), +- "The slot requires more arguments than the signal provides."); +- Q_STATIC_ASSERT_X((QtPrivate::CheckCompatibleArguments::value), +- "Signal and slot arguments are not compatible."); +- Q_STATIC_ASSERT_X((QtPrivate::AreArgumentsCompatible::value), +- "Return type of the slot is not compatible with the return type of the signal."); +- +- const int *types = 0; +- if (type == Qt::QueuedConnection || type == Qt::BlockingQueuedConnection) +- types = QtPrivate::ConnectionTypes::types(); +- +- return QObject::connectImpl(sender, reinterpret_cast(&signal), +- receiverPrivate->q_ptr, reinterpret_cast(&slot), +- new QtPrivate::QPrivateSlotObject::Value, +- typename SignalType::ReturnType>(slot), +- type, types, &SignalType::Object::staticMetaObject); +-} +- +-template +-bool QObjectPrivate::disconnect(const typename QtPrivate::FunctionPointer< Func1 >::Object* sender, Func1 signal, +- const typename QtPrivate::FunctionPointer< Func2 >::Object* receiverPrivate, Func2 slot) +-{ +- typedef QtPrivate::FunctionPointer SignalType; +- typedef QtPrivate::FunctionPointer SlotType; +- Q_STATIC_ASSERT_X(QtPrivate::HasQ_OBJECT_Macro::Value, +- "No Q_OBJECT in the class with the signal"); +- //compilation error if the arguments does not match. +- Q_STATIC_ASSERT_X((QtPrivate::CheckCompatibleArguments::value), +- "Signal and slot arguments are not compatible."); +- return QObject::disconnectImpl(sender, reinterpret_cast(&signal), +- receiverPrivate->q_ptr, reinterpret_cast(&slot), +- &SignalType::Object::staticMetaObject); +-} +- +-Q_DECLARE_TYPEINFO(QObjectPrivate::Connection, Q_MOVABLE_TYPE); +-Q_DECLARE_TYPEINFO(QObjectPrivate::Sender, Q_MOVABLE_TYPE); +- +-class QSemaphore; +-class Q_CORE_EXPORT QMetaCallEvent : public QEvent +-{ +-public: +- QMetaCallEvent(ushort method_offset, ushort method_relative, QObjectPrivate::StaticMetaCallFunction callFunction , const QObject *sender, int signalId, +- int nargs = 0, int *types = 0, void **args = 0, QSemaphore *semaphore = 0); +- /*! \internal +- \a signalId is in the signal index range (see QObjectPrivate::signalIndex()). +- */ +- QMetaCallEvent(QtPrivate::QSlotObjectBase *slotObj, const QObject *sender, int signalId, +- int nargs = 0, int *types = 0, void **args = 0, QSemaphore *semaphore = 0); +- +- ~QMetaCallEvent(); +- +- inline int id() const { return method_offset_ + method_relative_; } +- inline const QObject *sender() const { return sender_; } +- inline int signalId() const { return signalId_; } +- inline void **args() const { return args_; } +- +- virtual void placeMetaCall(QObject *object); +- +-private: +- QtPrivate::QSlotObjectBase *slotObj_; +- const QObject *sender_; +- int signalId_; +- int nargs_; +- int *types_; +- void **args_; +- QSemaphore *semaphore_; +- QObjectPrivate::StaticMetaCallFunction callFunction_; +- ushort method_offset_; +- ushort method_relative_; +-}; +- +-class QBoolBlocker +-{ +- Q_DISABLE_COPY(QBoolBlocker) +-public: +- explicit inline QBoolBlocker(bool &b, bool value=true):block(b), reset(b){block = value;} +- inline ~QBoolBlocker(){block = reset; } +-private: +- bool █ +- bool reset; +-}; +- +-void Q_CORE_EXPORT qDeleteInEventHandler(QObject *o); +- +-struct QAbstractDynamicMetaObject; +-struct Q_CORE_EXPORT QDynamicMetaObjectData +-{ +- virtual ~QDynamicMetaObjectData() {} +- virtual void objectDestroyed(QObject *) { delete this; } +- +- virtual QAbstractDynamicMetaObject *toDynamicMetaObject(QObject *) = 0; +- virtual int metaCall(QObject *, QMetaObject::Call, int _id, void **) = 0; +-}; +- +-struct Q_CORE_EXPORT QAbstractDynamicMetaObject : public QDynamicMetaObjectData, public QMetaObject +-{ +- virtual QAbstractDynamicMetaObject *toDynamicMetaObject(QObject *) { return this; } +- virtual int createProperty(const char *, const char *) { return -1; } +- virtual int metaCall(QObject *, QMetaObject::Call c, int _id, void **a) +- { return metaCall(c, _id, a); } +- virtual int metaCall(QMetaObject::Call, int _id, void **) { return _id; } // Compat overload +-}; +- +-QT_END_NAMESPACE +- +-#endif // QOBJECT_P_H +diff -Nru akonadi-16.04.2/src/qsqlite/src/QtSql/private/qsqlcachedresult_p.h akonadi-16.04.2.patched/src/qsqlite/src/QtSql/private/qsqlcachedresult_p.h +--- akonadi-16.04.2/src/qsqlite/src/QtSql/private/qsqlcachedresult_p.h 2016-05-31 11:33:56.000000000 +0200 ++++ akonadi-16.04.2.patched/src/qsqlite/src/QtSql/private/qsqlcachedresult_p.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,100 +0,0 @@ +-/**************************************************************************** +-** +-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +-** All rights reserved. +-** Contact: Nokia Corporation (qt-info@nokia.com) +-** +-** This file is part of the QtSql module of the Qt Toolkit. +-** +-** $QT_BEGIN_LICENSE:LGPL$ +-** Commercial Usage +-** Licensees holding valid Qt Commercial licenses may use this file in +-** accordance with the Qt Commercial License Agreement provided with the +-** Software or, alternatively, in accordance with the terms contained in +-** a written agreement between you and Nokia. +-** +-** GNU Lesser General Public License Usage +-** Alternatively, this file may be used under the terms of the GNU Lesser +-** General Public License version 2.1 as published by the Free Software +-** Foundation and appearing in the file LICENSE.LGPL included in the +-** packaging of this file. Please review the following information to +-** ensure the GNU Lesser General Public License version 2.1 requirements +-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +-** +-** In addition, as a special exception, Nokia gives you certain additional +-** rights. These rights are described in the Nokia Qt LGPL Exception +-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +-** +-** GNU General Public License Usage +-** Alternatively, this file may be used under the terms of the GNU +-** General Public License version 3.0 as published by the Free Software +-** Foundation and appearing in the file LICENSE.GPL included in the +-** packaging of this file. Please review the following information to +-** ensure the GNU General Public License version 3.0 requirements will be +-** met: http://www.gnu.org/copyleft/gpl.html. +-** +-** If you have questions regarding the use of this file, please contact +-** Nokia at qt-info@nokia.com. +-** $QT_END_LICENSE$ +-** +-****************************************************************************/ +- +-#ifndef QSQLCACHEDRESULT_P_H +-#define QSQLCACHEDRESULT_P_H +- +-// +-// W A R N I N G +-// ------------- +-// +-// This file is not part of the Qt API. It exists for the convenience +-// of other Qt classes. This header file may change from version to +-// version without notice, or even be removed. +-// +-// We mean it. +-// +- +-#include "QtSql/qsqlresult.h" +- +-QT_BEGIN_NAMESPACE +- +-class QVariant; +-template class QVector; +- +-class QSqlCachedResultPrivate; +- +-class Q_SQL_EXPORT QSqlCachedResult: public QSqlResult +-{ +-public: +- virtual ~QSqlCachedResult(); +- +- typedef QVector ValueCache; +- +-protected: +- QSqlCachedResult(const QSqlDriver * db); +- +- void init(int colCount); +- void cleanup(); +- void clearValues(); +- +- virtual bool gotoNext(ValueCache &values, int index) = 0; +- +- QVariant data(int i); +- bool isNull(int i); +- bool fetch(int i); +- bool fetchNext(); +- bool fetchPrevious(); +- bool fetchFirst(); +- bool fetchLast(); +- +- int colCount() const; +- ValueCache &cache(); +- +- void virtual_hook(int id, void *data); +-private: +- bool cacheNext(); +- QSqlCachedResultPrivate *d; +-}; +- +-QT_END_NAMESPACE +- +-#endif // QSQLCACHEDRESULT_P_H +diff -Nru akonadi-16.04.2/src/qsqlite/src/QtSql/private/qsqldriver_p.h akonadi-16.04.2.patched/src/qsqlite/src/QtSql/private/qsqldriver_p.h +--- akonadi-16.04.2/src/qsqlite/src/QtSql/private/qsqldriver_p.h 2016-05-31 11:33:56.000000000 +0200 ++++ akonadi-16.04.2.patched/src/qsqlite/src/QtSql/private/qsqldriver_p.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,86 +0,0 @@ +-/**************************************************************************** +-** +-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +-** Contact: http://www.qt-project.org/legal +-** +-** This file is part of the QtSql module of the Qt Toolkit. +-** +-** $QT_BEGIN_LICENSE:LGPL$ +-** Commercial License Usage +-** Licensees holding valid commercial Qt licenses may use this file in +-** accordance with the commercial license agreement provided with the +-** Software or, alternatively, in accordance with the terms contained in +-** a written agreement between you and Digia. For licensing terms and +-** conditions see http://qt.digia.com/licensing. For further information +-** use the contact form at http://qt.digia.com/contact-us. +-** +-** GNU Lesser General Public License Usage +-** Alternatively, this file may be used under the terms of the GNU Lesser +-** General Public License version 2.1 as published by the Free Software +-** Foundation and appearing in the file LICENSE.LGPL included in the +-** packaging of this file. Please review the following information to +-** ensure the GNU Lesser General Public License version 2.1 requirements +-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +-** +-** In addition, as a special exception, Digia gives you certain additional +-** rights. These rights are described in the Digia Qt LGPL Exception +-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +-** +-** GNU General Public License Usage +-** Alternatively, this file may be used under the terms of the GNU +-** General Public License version 3.0 as published by the Free Software +-** Foundation and appearing in the file LICENSE.GPL included in the +-** packaging of this file. Please review the following information to +-** ensure the GNU General Public License version 3.0 requirements will be +-** met: http://www.gnu.org/copyleft/gpl.html. +-** +-** +-** $QT_END_LICENSE$ +-** +-****************************************************************************/ +- +-#ifndef QSQLDRIVER_P_H +-#define QSQLDRIVER_P_H +- +-// +-// W A R N I N G +-// ------------- +-// +-// This file is not part of the Qt API. It exists for the convenience +-// of the QtSQL module. This header file may change from version to version +-// without notice, or even be removed. +-// +-// We mean it. +-// +- +-#include "qobject_p.h" +-#include "qsqldriver.h" +-#include "qsqlerror.h" +- +-QT_BEGIN_NAMESPACE +- +-class QSqlDriverPrivate : public QObjectPrivate +-{ +- Q_DECLARE_PUBLIC(QSqlDriver) +- +-public: +- enum DBMSType {UnknownDB, MSSqlServer, MySqlServer, PostgreSQL, Oracle, Sybase, SQLite, Interbase, DB2}; +- +- QSqlDriverPrivate() +- : QObjectPrivate(), +- isOpen(false), +- isOpenError(false), +- precisionPolicy(QSql::LowPrecisionDouble), +- dbmsType(UnknownDB) +- { } +- +- uint isOpen; +- uint isOpenError; +- QSqlError error; +- QSql::NumericalPrecisionPolicy precisionPolicy; +- DBMSType dbmsType; +-}; +- +-QT_END_NAMESPACE +- +-#endif // QSQLDRIVER_P_H +diff -Nru akonadi-16.04.2/src/qsqlite/src/qsql_sqlite.cpp akonadi-16.04.2.patched/src/qsqlite/src/qsql_sqlite.cpp +--- akonadi-16.04.2/src/qsqlite/src/qsql_sqlite.cpp 2016-05-31 11:33:56.000000000 +0200 ++++ akonadi-16.04.2.patched/src/qsqlite/src/qsql_sqlite.cpp 2016-06-30 22:27:54.490104785 +0200 +@@ -51,8 +51,8 @@ + #include + #include + +-#include "QtSql/private/qsqldriver_p.h" +-#include "QtSql/private/qsqlcachedresult_p.h" ++#include ++#include + + #if defined Q_OS_WIN + # include +@@ -136,7 +136,10 @@ + void virtual_hook(int id, void *data); + + private: +- QSQLiteResultPrivate* d; ++#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0) ++ QSQLiteResultPrivate* d_ptr; ++#endif ++ Q_DECLARE_PRIVATE(QSQLiteResult) + }; + + +@@ -144,24 +147,33 @@ + { + public: + inline QSQLiteDriverPrivate() : access(0) { +- dbmsType = SQLite; ++ dbmsType = QSqlDriver::SQLite; + } + sqlite3 *access; + QList results; + }; + + ++#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) ++class QSQLiteResultPrivate : public QSqlCachedResultPrivate ++#else + class QSQLiteResultPrivate ++#endif + { + public: ++#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) ++ QSQLiteResultPrivate(QSQLiteResult *res, const QSQLiteDriver *drv); ++#else + QSQLiteResultPrivate(QSQLiteResult *res); ++ QSQLiteResult* q_ptr; ++#endif ++ + void cleanup(); + bool fetchNext(QSqlCachedResult::ValueCache &values, int idx, bool initialFetch); + // initializes the recordInfo and the cache + void initColumns(bool emptyResultset); + void finalize(); + +- QSQLiteResult* q; + sqlite3 *access; + + sqlite3_stmt *stmt; +@@ -170,15 +182,27 @@ + bool skipRow; // skip the next fetchNext()? + QSqlRecord rInf; + QVector firstRow; ++ ++ Q_DECLARE_PUBLIC(QSQLiteResult) + }; + +-QSQLiteResultPrivate::QSQLiteResultPrivate(QSQLiteResult* res) : q(res), access(0), +- stmt(0), skippedStatus(false), skipRow(false) ++#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) ++QSQLiteResultPrivate::QSQLiteResultPrivate(QSQLiteResult *res, const QSQLiteDriver *drv) ++ : QSqlCachedResultPrivate(res, drv) ++#else ++QSQLiteResultPrivate::QSQLiteResultPrivate(QSQLiteResult* res) ++ : q_ptr(res) ++#endif ++ , access(0) ++ , stmt(0) ++ , skippedStatus(false) ++ , skipRow(false) + { + } + + void QSQLiteResultPrivate::cleanup() + { ++ Q_Q(QSQLiteResult); + finalize(); + rInf.clear(); + skippedStatus = false; +@@ -199,6 +223,7 @@ + + void QSQLiteResultPrivate::initColumns(bool emptyResultset) + { ++ Q_Q(QSQLiteResult); + int nCols = sqlite3_column_count(stmt); + if (nCols <= 0) + return; +@@ -251,6 +276,8 @@ + + bool QSQLiteResultPrivate::fetchNext(QSqlCachedResult::ValueCache &values, int idx, bool initialFetch) + { ++ Q_Q(QSQLiteResult); ++ + int res; + int i; + +@@ -351,20 +378,28 @@ + } + + QSQLiteResult::QSQLiteResult(const QSQLiteDriver* db) ++#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) ++ : QSqlCachedResult(*new QSQLiteResultPrivate(this, db)) ++#else + : QSqlCachedResult(db) ++ , d_ptr(new QSQLiteResultPrivate(this)) ++#endif + { +- d = new QSQLiteResultPrivate(this); ++ Q_D(QSQLiteResult); + d->access = db->d_func()->access; + const_cast(db->d_func())->results.append(this); + } + + QSQLiteResult::~QSQLiteResult() + { ++ Q_D(QSQLiteResult); + const QSqlDriver *sqlDriver = driver(); + if (sqlDriver) + const_cast(qobject_cast(sqlDriver)->d_func())->results.removeOne(this); + d->cleanup(); ++#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0) + delete d; ++#endif + } + + void QSQLiteResult::virtual_hook(int id, void *data) +@@ -381,6 +416,8 @@ + + bool QSQLiteResult::prepare(const QString &query) + { ++ Q_D(QSQLiteResult); ++ + if (!driver() || !driver()->isOpen() || driver()->isOpenError()) + return false; + +@@ -416,6 +453,7 @@ + + bool QSQLiteResult::exec() + { ++ Q_D(QSQLiteResult); + const QVector values = boundValues(); + + d->skippedStatus = false; +@@ -510,7 +548,7 @@ + + bool QSQLiteResult::gotoNext(QSqlCachedResult::ValueCache& row, int idx) + { +- return d->fetchNext(row, idx, false); ++ return d_func()->fetchNext(row, idx, false); + } + + int QSQLiteResult::size() +@@ -520,13 +558,13 @@ + + int QSQLiteResult::numRowsAffected() + { +- return sqlite3_changes(d->access); ++ return sqlite3_changes(d_func()->access); + } + + QVariant QSQLiteResult::lastInsertId() const + { + if (isActive()) { +- qint64 id = sqlite3_last_insert_rowid(d->access); ++ qint64 id = sqlite3_last_insert_rowid(d_func()->access); + if (id) + return id; + } +@@ -537,18 +575,18 @@ + { + if (!isActive() || !isSelect()) + return QSqlRecord(); +- return d->rInf; ++ return d_func()->rInf; + } + + void QSQLiteResult::detachFromResultSet() + { +- if (d->stmt) +- sqlite3_reset(d->stmt); ++ if (d_func()->stmt) ++ sqlite3_reset(d_func()->stmt); + } + + QVariant QSQLiteResult::handle() const + { +- return qVariantFromValue(d->stmt); ++ return qVariantFromValue(d_func()->stmt); + } + + ///////////////////////////////////////////////////////// +@@ -660,7 +698,7 @@ + + if (isOpen()) { + Q_FOREACH (QSQLiteResult *result, d->results) { +- result->d->finalize(); ++ result->d_func()->finalize(); + } + + if (sqlite3_close(d->access) != SQLITE_OK) diff --git a/akonadi-restore-builtin-automoc4.patch b/akonadi-restore-builtin-automoc4.patch deleted file mode 100644 index 70a5184..0000000 --- a/akonadi-restore-builtin-automoc4.patch +++ /dev/null @@ -1,1986 +0,0 @@ -Index: cmake/automoc/kde4automoc.cpp -=================================================================== ---- cmake/automoc/kde4automoc.cpp (Revision 0) -+++ cmake/automoc/kde4automoc.cpp (Revision 801202) -@@ -0,0 +1,344 @@ -+/* This file is part of the KDE project -+ Copyright (C) 2007 Matthias Kretz -+ -+ This program is free software; you can redistribute it and/or -+ modify it under the terms of the GNU General Public License as -+ published by the Free Software Foundation; either version 2 of -+ the License, or (at your option) any later version. -+ -+ This program 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 General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301, USA. -+ -+*/ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+class AutoMoc -+{ -+ public: -+ AutoMoc(); -+ bool run(); -+ -+ private: -+ void generateMoc(const QString &sourceFile, const QString &mocFileName); -+ void waitForProcesses(); -+ void usage(const QString &); -+ void echoColor(const QString &msg) -+ { -+ QProcess *cmakeEcho = new QProcess; -+ cmakeEcho->setProcessChannelMode(QProcess::ForwardedChannels); -+ QStringList args(cmakeEchoColorArgs); -+ args << msg; -+ cmakeEcho->start("cmake", args, QIODevice::NotOpen); -+ processes.enqueue(Process(cmakeEcho, QString())); -+ } -+ -+ QString builddir; -+ QString mocExe; -+ QStringList mocIncludes; -+ QStringList cmakeEchoColorArgs; -+ const bool verbose; -+ QTextStream cerr; -+ QTextStream cout; -+ struct Process -+ { -+ Process(QProcess *a, const QString &b) : qproc(a), mocFilePath(b) {} -+ QProcess *qproc; -+ QString mocFilePath; -+ }; -+ QQueue processes; -+ bool failed; -+}; -+ -+void AutoMoc::usage(const QString &path) -+{ -+ cout << "usage: " << path << " " << endl; -+ ::exit(EXIT_FAILURE); -+} -+ -+int main(int argc, char **argv) -+{ -+ QCoreApplication app(argc, argv); -+ if (!AutoMoc().run()) { -+ return EXIT_FAILURE; -+ } -+ return 0; -+} -+ -+AutoMoc::AutoMoc() -+ : verbose(!qgetenv("VERBOSE").isEmpty()), cerr(stderr), cout(stdout), failed(false) -+{ -+ const QByteArray colorEnv = qgetenv("COLOR"); -+ cmakeEchoColorArgs << "-E" << "cmake_echo_color" << QString("--switch=") + colorEnv << "--blue" -+ << "--bold"; -+} -+ -+bool AutoMoc::run() -+{ -+ const QStringList args = QCoreApplication::arguments(); -+ Q_ASSERT(args.size() > 0); -+ if (args.size() < 4) { -+ usage(args[0]); -+ } -+ QFile outfile(args[1]); -+ const QFileInfo outfileInfo(outfile); -+ -+ QString srcdir(args[2]); -+ if (!srcdir.endsWith('/')) { -+ srcdir += '/'; -+ } -+ builddir = args[3]; -+ if (!builddir.endsWith('/')) { -+ builddir += '/'; -+ } -+ mocExe = args[4]; -+ -+ QFile dotFiles(args[1] + ".files"); -+ dotFiles.open(QIODevice::ReadOnly | QIODevice::Text); -+ QByteArray line = dotFiles.readLine(); -+ Q_ASSERT(line == "MOC_INCLUDES:\n"); -+ line = dotFiles.readLine().trimmed(); -+ const QStringList incPaths = QString::fromUtf8(line).split(';'); -+ foreach (const QString &path, incPaths) { -+ if (!path.isEmpty()) { -+ mocIncludes << "-I" + path; -+ } -+ } -+ line = dotFiles.readLine(); -+ Q_ASSERT(line == "SOURCES:\n"); -+ line = dotFiles.readLine().trimmed(); -+ dotFiles.close(); -+ const QStringList sourceFiles = QString::fromUtf8(line).split(';'); -+ -+ // the program goes through all .cpp files to see which moc files are included. It is not really -+ // interesting how the moc file is named, but what file the moc is created from. Once a moc is -+ // included the same moc may not be included in the _automoc.cpp file anymore. OTOH if there's a -+ // header containing Q_OBJECT where no corresponding moc file is included anywhere a -+ // moc_.cpp file is created and included in the _automoc.cpp file. -+ QHash includedMocs; // key = moc source filepath, value = moc output filepath -+ QHash notIncludedMocs; // key = moc source filepath, value = moc output filename -+ -+ QRegExp mocIncludeRegExp("[\n]\\s*#\\s*include\\s+[\"<](moc_[^ \">]+\\.cpp|[^ \">]+\\.moc)[\">]"); -+ QRegExp qObjectRegExp("[\n]\\s*Q_OBJECT\\b"); -+ QStringList headerExtensions; -+ headerExtensions << ".h" << ".hpp" << ".hxx" << ".H"; -+ foreach (const QString &absFilename, sourceFiles) { -+ //qDebug() << absFilename; -+ const QFileInfo sourceFileInfo(absFilename); -+ if (absFilename.endsWith(".cpp") || absFilename.endsWith(".cc") || -+ absFilename.endsWith(".cxx") || absFilename.endsWith(".C")) { -+ //qDebug() << "check .cpp file"; -+ QFile sourceFile(absFilename); -+ sourceFile.open(QIODevice::ReadOnly); -+ const QByteArray contents = sourceFile.readAll(); -+ if (contents.isEmpty()) { -+ cerr << "kde4automoc: empty source file: " << absFilename << endl; -+ continue; -+ } -+ const QString contentsString = QString::fromUtf8(contents); -+ const QString absPath = sourceFileInfo.absolutePath() + '/'; -+ Q_ASSERT(absPath.endsWith('/')); -+ int matchOffset = mocIncludeRegExp.indexIn(contentsString); -+ if (matchOffset < 0) { -+ // no moc #include, look whether we need to create a moc from the .h nevertheless -+ //qDebug() << "no moc #include in the .cpp file"; -+ const QString basename = sourceFileInfo.completeBaseName(); -+ const QString headername = absPath + basename + ".h"; -+ if (QFile::exists(headername) && !includedMocs.contains(headername) && -+ !notIncludedMocs.contains(headername)) { -+ const QString currentMoc = "moc_" + basename + ".cpp"; -+ QFile header(headername); -+ header.open(QIODevice::ReadOnly); -+ const QByteArray contents = header.readAll(); -+ if (qObjectRegExp.indexIn(QString::fromUtf8(contents)) >= 0) { -+ //qDebug() << "header contains Q_OBJECT macro"; -+ notIncludedMocs.insert(headername, currentMoc); -+ } -+ } -+ const QString privateHeaderName = absPath + basename + "_p.h"; -+ if (QFile::exists(privateHeaderName) && !includedMocs.contains(privateHeaderName) && -+ !notIncludedMocs.contains(privateHeaderName)) { -+ const QString currentMoc = "moc_" + basename + "_p.cpp"; -+ QFile header(privateHeaderName); -+ header.open(QIODevice::ReadOnly); -+ const QByteArray contents = header.readAll(); -+ if (qObjectRegExp.indexIn(QString::fromUtf8(contents)) >= 0) { -+ //qDebug() << "header contains Q_OBJECT macro"; -+ notIncludedMocs.insert(privateHeaderName, currentMoc); -+ } -+ } -+ } else { -+ do { // call this for every moc include in the file -+ const QString currentMoc = mocIncludeRegExp.cap(1); -+ //qDebug() << "found moc include: " << currentMoc << " at offset " << matchOffset; -+ QString basename = QFileInfo(currentMoc).completeBaseName(); -+ const bool moc_style = currentMoc.startsWith("moc_"); -+ if (moc_style || qObjectRegExp.indexIn(contentsString) < 0) { -+ if (moc_style) { -+ basename = basename.right(basename.length() - 4); -+ } -+ bool headerFound = false; -+ foreach (const QString &ext, headerExtensions) { -+ QString sourceFilePath = absPath + basename + ext; -+ if (QFile::exists(sourceFilePath)) { -+ headerFound = true; -+ includedMocs.insert(sourceFilePath, currentMoc); -+ notIncludedMocs.remove(sourceFilePath); -+ break; -+ } -+ } -+ if (!headerFound) { -+ cerr << "kde4automoc: The file \"" << absFilename << -+ "\" includes the moc file \"" << currentMoc << "\", but \"" << -+ absPath + basename + "{" + headerExtensions.join(",") + "}" << -+ "\" do not exist." << endl; -+ ::exit(EXIT_FAILURE); -+ } -+ } else { -+ includedMocs.insert(absFilename, currentMoc); -+ notIncludedMocs.remove(absFilename); -+ } -+ -+ matchOffset = mocIncludeRegExp.indexIn(contentsString, -+ matchOffset + currentMoc.length()); -+ } while(matchOffset >= 0); -+ } -+ } else if (absFilename.endsWith(".h") || absFilename.endsWith(".hpp") || -+ absFilename.endsWith(".hxx") || absFilename.endsWith(".H")) { -+ if (!includedMocs.contains(absFilename) && !notIncludedMocs.contains(absFilename)) { -+ // if this header is not getting processed yet and is explicitly mentioned for the -+ // automoc the moc is run unconditionally on the header and the resulting file is -+ // included in the _automoc.cpp file (unless there's a .cpp file later on that -+ // includes the moc from this header) -+ const QString currentMoc = "moc_" + sourceFileInfo.completeBaseName() + ".cpp"; -+ notIncludedMocs.insert(absFilename, currentMoc); -+ } -+ } else { -+ if (verbose) { -+ cout << "kde4automoc: ignoring file '" << absFilename << "' with unknown suffix" << endl; -+ } -+ } -+ } -+ -+ // run moc on all the moc's that are #included in source files -+ QHash::ConstIterator end = includedMocs.constEnd(); -+ QHash::ConstIterator it = includedMocs.constBegin(); -+ for (; it != end; ++it) { -+ generateMoc(it.key(), it.value()); -+ } -+ -+ QByteArray automocSource; -+ QTextStream outStream(&automocSource, QIODevice::WriteOnly); -+ outStream << "/* This file is autogenerated, do not edit */\n"; -+ -+ if (notIncludedMocs.isEmpty()) { -+ outStream << "enum some_compilers { need_more_than_nothing };\n"; -+ } else { -+ // run moc on the remaining headers and include them in the _automoc.cpp file -+ end = notIncludedMocs.constEnd(); -+ it = notIncludedMocs.constBegin(); -+ for (; it != end; ++it) { -+ generateMoc(it.key(), it.value()); -+ outStream << "#include \"" << it.value() << "\"\n"; -+ } -+ } -+ -+ // let all remaining moc processes finish -+ waitForProcesses(); -+ -+ if (failed) { -+ // if any moc process failed we don't want to touch the _automoc.cpp file so that -+ // kde4automoc is rerun until the issue is fixed -+ cerr << "returning failed.."<< endl; -+ return false; -+ } -+ outStream.flush(); -+ -+ // source file that includes all remaining moc files -+ outfile.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate); -+ outfile.write(automocSource); -+ outfile.close(); -+ -+ return true; -+} -+ -+void AutoMoc::waitForProcesses() -+{ -+ while (!processes.isEmpty()) { -+ Process proc = processes.dequeue(); -+ -+ bool result = proc.qproc->waitForFinished(-1); -+ //ignore errors from the cmake echo process -+ if (!proc.mocFilePath.isEmpty()) { -+ if (!result || proc.qproc->exitCode()) { -+ cerr << "kde4automoc: process for " << proc.mocFilePath -+ << " failed: " << proc.qproc->errorString() << endl; -+ cerr << "pid to wait for: " << proc.qproc->pid() << endl; -+ cerr << "processes in queue: " << processes.size() << endl; -+ failed = true; -+ QFile::remove(proc.mocFilePath); -+ } -+ } -+ delete proc.qproc; -+ } -+} -+ -+void AutoMoc::generateMoc(const QString &sourceFile, const QString &mocFileName) -+{ -+ //qDebug() << Q_FUNC_INFO << sourceFile << mocFileName; -+ const QString mocFilePath = builddir + mocFileName; -+ if (QFileInfo(mocFilePath).lastModified() < QFileInfo(sourceFile).lastModified()) { -+ if (verbose) { -+ echoColor("Generating " + mocFilePath + " from " + sourceFile); -+ } else { -+ echoColor("Generating " + mocFileName); -+ } -+ -+ // we don't want too many child processes -+#ifdef Q_OS_FREEBSD -+ static const int max_processes = 0; -+#else -+ static const int max_processes = 10; -+#endif -+ -+ if (processes.size() > max_processes) { -+ waitForProcesses(); -+ } -+ -+ QProcess *mocProc = new QProcess; -+ mocProc->setProcessChannelMode(QProcess::ForwardedChannels); -+ QStringList args(mocIncludes); -+#ifdef Q_OS_WIN -+ args << "-DWIN32"; -+#endif -+ args << "-o" << mocFilePath << sourceFile; -+ //qDebug() << "executing: " << mocExe << args; -+ mocProc->start(mocExe, args, QIODevice::NotOpen); -+ if (mocProc->waitForStarted()) -+ processes.enqueue(Process(mocProc, mocFilePath)); -+ else { -+ cerr << "kde4automoc: process for " << mocFilePath << "failed to start: " -+ << mocProc->errorString() << endl; -+ failed = true; -+ delete mocProc; -+ } -+ } -+} -Index: cmake/automoc/CMakeLists.txt -=================================================================== ---- cmake/automoc/CMakeLists.txt (Revision 0) -+++ cmake/automoc/CMakeLists.txt (Revision 801202) -@@ -0,0 +1,4 @@ -+include_directories(${QT_INCLUDE_DIR}) -+add_executable(kde4automoc kde4automoc.cpp) -+kde4_handle_rpath_for_executable(kde4automoc "RUN_UNINSTALLED") -+target_link_libraries(kde4automoc ${QT_QTCORE_LIBRARY}) -Index: cmake/modules/InstallSettings.cmake -=================================================================== ---- cmake/modules/InstallSettings.cmake (Revision 801314) -+++ cmake/modules/InstallSettings.cmake (Revision 801202) -@@ -1,136 +0,0 @@ --# Copyright (c) 2008 Kevin Krammer --# --# Redistribution and use is allowed according to the terms of the BSD license. --# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -- --set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) -- --if (WIN32) --# use relative install prefix to avoid hardcoded install paths in cmake_install.cmake files -- -- set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" ) # The subdirectory relative to the install prefix where libraries will be installed (default is ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}) -- -- set(EXEC_INSTALL_PREFIX "" ) # Base directory for executables and libraries -- set(SHARE_INSTALL_PREFIX "share" ) # Base directory for files which go to share/ -- set(BIN_INSTALL_DIR "bin" ) # The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin) -- set(SBIN_INSTALL_DIR "sbin" ) # The install dir for system executables (default ${EXEC_INSTALL_PREFIX}/sbin) -- -- set(LIBEXEC_INSTALL_DIR "${BIN_INSTALL_DIR}" ) # The subdirectory relative to the install prefix where libraries will be installed (default is ${BIN_INSTALL_DIR}) -- set(INCLUDE_INSTALL_DIR "include" ) # The subdirectory to the header prefix -- -- set(PLUGIN_INSTALL_DIR "lib${LIB_SUFFIX}/kde4" ) # "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde4) -- set(CONFIG_INSTALL_DIR "share/config" ) # The config file install dir -- set(DATA_INSTALL_DIR "share/apps" ) # The parent directory where applications can install their data -- set(HTML_INSTALL_DIR "share/doc/HTML" ) # The HTML install dir for documentation -- set(ICON_INSTALL_DIR "share/icons" ) # The icon install dir (default ${SHARE_INSTALL_PREFIX}/share/icons/) -- set(KCFG_INSTALL_DIR "share/config.kcfg" ) # The install dir for kconfig files -- set(LOCALE_INSTALL_DIR "share/locale" ) # The install dir for translations -- set(MIME_INSTALL_DIR "share/mimelnk" ) # The install dir for the mimetype desktop files -- set(SERVICES_INSTALL_DIR "share/kde4/services" ) # The install dir for service (desktop, protocol, ...) files -- set(SERVICETYPES_INSTALL_DIR "share/kde4/servicetypes" ) # The install dir for servicestypes desktop files -- set(SOUND_INSTALL_DIR "share/sounds" ) # The install dir for sound files -- set(TEMPLATES_INSTALL_DIR "share/templates" ) # The install dir for templates (Create new file...) -- set(WALLPAPER_INSTALL_DIR "share/wallpapers" ) # The install dir for wallpapers -- set(DEMO_INSTALL_DIR "share/demos" ) # The install dir for demos -- set(KCONF_UPDATE_INSTALL_DIR "share/apps/kconf_update" ) # The kconf_update install dir -- set(AUTOSTART_INSTALL_DIR "share/autostart" ) # The install dir for autostart files -- -- set(XDG_APPS_INSTALL_DIR "share/applications/kde4" ) # The XDG apps dir -- set(XDG_DIRECTORY_INSTALL_DIR "share/desktop-directories" ) # The XDG directory -- set(XDG_MIME_INSTALL_DIR "share/mime/packages" ) # The install dir for the xdg mimetypes -- -- set(SYSCONF_INSTALL_DIR "etc" ) # The kde sysconfig install dir (default /etc) -- set(MAN_INSTALL_DIR "share/man" ) # The kde man install dir (default ${SHARE_INSTALL_PREFIX}/man/) -- set(INFO_INSTALL_DIR "share/info" ) # The kde info install dir (default ${SHARE_INSTALL_PREFIX}/info)") -- set(DBUS_INTERFACES_INSTALL_DIR "share/dbus-1/interfaces" ) # The kde dbus interfaces install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/interfaces)") -- set(DBUS_SERVICES_INSTALL_DIR "share/dbus-1/services" ) # The kde dbus services install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/services)") -- --else (WIN32) -- -- # this macro implements some very special logic how to deal with the cache -- # by default the various install locations inherit their value from theit "parent" variable -- # so if you set CMAKE_INSTALL_PREFIX, then EXEC_INSTALL_PREFIX, PLUGIN_INSTALL_DIR will -- # calculate their value by appending subdirs to CMAKE_INSTALL_PREFIX -- # this would work completely without using the cache. -- # but if somebody wants e.g. a different EXEC_INSTALL_PREFIX this value has to go into -- # the cache, otherwise it will be forgotten on the next cmake run. -- # Once a variable is in the cache, it doesn't depend on its "parent" variables -- # anymore and you can only change it by editing it directly. -- # this macro helps in this regard, because as long as you don't set one of the -- # variables explicitely to some location, it will always calculate its value from its -- # parents. So modifying CMAKE_INSTALL_PREFIX later on will have the desired effect. -- # But once you decide to set e.g. EXEC_INSTALL_PREFIX to some special location -- # this will go into the cache and it will no longer depend on CMAKE_INSTALL_PREFIX. -- macro(_SET_FANCY _var _value _comment) -- set(predefinedvalue "${_value}") -- -- if (NOT DEFINED ${_var}) -- set(${_var} ${predefinedvalue}) -- else (NOT DEFINED ${_var}) -- set(${_var} "${${_var}}" CACHE PATH "${_comment}") -- endif (NOT DEFINED ${_var}) -- endmacro(_SET_FANCY) -- -- -- _set_fancy(EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" "Base directory for executables and libraries") -- _set_fancy(SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share" "Base directory for files which go to share/") -- _set_fancy(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" "The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin)") -- _set_fancy(SBIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/sbin" "The install dir for system executables (default ${EXEC_INSTALL_PREFIX}/sbin)") -- _set_fancy(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" "The subdirectory relative to the install prefix where libraries will be installed (default is ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX})") -- _set_fancy(LIBEXEC_INSTALL_DIR "${LIB_INSTALL_DIR}/kde4/libexec" "The subdirectory relative to the install prefix where libraries will be installed (default is ${LIB_INSTALL_DIR}/kde4/libexec)") -- _set_fancy(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" "The subdirectory to the header prefix") -- -- _set_fancy(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/kde4" "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde4)") -- _set_fancy(CONFIG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config" "The config file install dir") -- _set_fancy(DATA_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/apps" "The parent directory where applications can install their data") -- _set_fancy(HTML_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/doc/HTML" "The HTML install dir for documentation") -- _set_fancy(ICON_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/icons" "The icon install dir (default ${SHARE_INSTALL_PREFIX}/share/icons/)") -- _set_fancy(KCFG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config.kcfg" "The install dir for kconfig files") -- _set_fancy(LOCALE_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/locale" "The install dir for translations") -- _set_fancy(MIME_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/mimelnk" "The install dir for the mimetype desktop files") -- _set_fancy(SERVICES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/kde4/services" "The install dir for service (desktop, protocol, ...) files") -- _set_fancy(SERVICETYPES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/kde4/servicetypes" "The install dir for servicestypes desktop files") -- _set_fancy(SOUND_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/sounds" "The install dir for sound files") -- _set_fancy(TEMPLATES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/templates" "The install dir for templates (Create new file...)") -- _set_fancy(WALLPAPER_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/wallpapers" "The install dir for wallpapers") -- _set_fancy(DEMO_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/demos" "The install dir for demos") -- _set_fancy(KCONF_UPDATE_INSTALL_DIR "${DATA_INSTALL_DIR}/kconf_update" "The kconf_update install dir") -- _set_fancy(AUTOSTART_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/autostart" "The install dir for autostart files") -- -- _set_fancy(XDG_APPS_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/applications/kde4" "The XDG apps dir") -- _set_fancy(XDG_DIRECTORY_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/desktop-directories" "The XDG directory") -- _set_fancy(XDG_MIME_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/mime/packages" "The install dir for the xdg mimetypes") -- -- _set_fancy(SYSCONF_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/etc" "The kde sysconfig install dir (default ${CMAKE_INSTALL_PREFIX}/etc)") -- _set_fancy(MAN_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/man" "The kde man install dir (default ${SHARE_INSTALL_PREFIX}/man/)") -- _set_fancy(INFO_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/info" "The kde info install dir (default ${SHARE_INSTALL_PREFIX}/info)") -- _set_fancy(DBUS_INTERFACES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/dbus-1/interfaces" "The kde dbus interfaces install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/interfaces)") -- _set_fancy(DBUS_SERVICES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/dbus-1/services" "The kde dbus services install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/services)") -- --endif (WIN32) -- --# The INSTALL_TARGETS_DEFAULT_ARGS variable should be used when libraries are installed. --# The arguments are also ok for regular executables, i.e. executables which don't go --# into sbin/ or libexec/, but for installing executables the basic syntax --# INSTALL(TARGETS kate DESTINATION "${BIN_INSTALL_DIR}") --# is enough, so using this variable there doesn't help a lot. --# The variable must not be used for installing plugins. --# Usage is like this: --# install(TARGETS kdecore kdeui ${INSTALL_TARGETS_DEFAULT_ARGS} ) --# --# This will install libraries correctly under UNIX, OSX and Windows (i.e. dll's go --# into bin/. --# Later on it will be possible to extend this for installing OSX frameworks --# The COMPONENT Devel argument has the effect that static libraries belong to the --# "Devel" install component. If we use this also for all install() commands --# for header files, it will be possible to install --# -everything: make install OR cmake -P cmake_install.cmake --# -only the development files: cmake -DCOMPONENT=Devel -P cmake_install.cmake --# -everything except the development files: cmake -DCOMPONENT=Unspecified -P cmake_install.cmake --# This can then also be used for packaging with cpack. -- --set(INSTALL_TARGETS_DEFAULT_ARGS RUNTIME DESTINATION "${BIN_INSTALL_DIR}" -- LIBRARY DESTINATION "${LIB_INSTALL_DIR}" -- ARCHIVE DESTINATION "${LIB_INSTALL_DIR}" COMPONENT Devel ) -- -- -Index: cmake/modules/AkonadiInternal.cmake -=================================================================== ---- cmake/modules/AkonadiInternal.cmake (Revision 0) -+++ cmake/modules/AkonadiInternal.cmake (Revision 801202) -@@ -0,0 +1,165 @@ -+# Copyright (c) 2008 Kevin Krammer -+# -+# Redistribution and use is allowed according to the terms of the BSD license. -+# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -+ -+include(FindQt4) -+include(KDE4Macros) -+include(MacroAdditionalCleanFiles) -+include(MacroLogFeature) -+ -+set (EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) -+ -+ if (WIN32) -+ set(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH} ) -+ # CMAKE_CFG_INTDIR is the output subdirectory created e.g. by XCode and MSVC -+ set(KDE4_KCFGC_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kconfig_compiler ) -+ set(KDE4_AUTOMOC_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kde4automoc ) -+ set(KDE4_MEINPROC_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/meinproc4 ) -+ set(KDE4_MAKEKDEWIDGETS_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/makekdewidgets ) -+ else (WIN32) -+ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib ) -+ set(KDE4_KCFGC_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kconfig_compiler.shell ) -+ set(KDE4_AUTOMOC_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kde4automoc ) -+ set(KDE4_MEINPROC_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/meinproc4.shell ) -+ set(KDE4_MAKEKDEWIDGETS_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/makekdewidgets.shell ) -+ endif (WIN32) -+ -+ # when building, make automoc depend on the executable... -+ set( _KDE4_AUTOMOC_EXECUTABLE_DEP kde4automoc) -+ -+if (WIN32) -+# use relative install prefix to avoid hardcoded install paths in cmake_install.cmake files -+ -+ set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" ) # The subdirectory relative to the install prefix where libraries will be installed (default is ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}) -+ -+ set(EXEC_INSTALL_PREFIX "" ) # Base directory for executables and libraries -+ set(SHARE_INSTALL_PREFIX "share" ) # Base directory for files which go to share/ -+ set(BIN_INSTALL_DIR "bin" ) # The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin) -+ set(SBIN_INSTALL_DIR "sbin" ) # The install dir for system executables (default ${EXEC_INSTALL_PREFIX}/sbin) -+ -+ set(LIBEXEC_INSTALL_DIR "${BIN_INSTALL_DIR}" ) # The subdirectory relative to the install prefix where libraries will be installed (default is ${BIN_INSTALL_DIR}) -+ set(INCLUDE_INSTALL_DIR "include" ) # The subdirectory to the header prefix -+ -+ set(PLUGIN_INSTALL_DIR "lib${LIB_SUFFIX}/kde4" ) # "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde4) -+ set(CONFIG_INSTALL_DIR "share/config" ) # The config file install dir -+ set(DATA_INSTALL_DIR "share/apps" ) # The parent directory where applications can install their data -+ set(HTML_INSTALL_DIR "share/doc/HTML" ) # The HTML install dir for documentation -+ set(ICON_INSTALL_DIR "share/icons" ) # The icon install dir (default ${SHARE_INSTALL_PREFIX}/share/icons/) -+ set(KCFG_INSTALL_DIR "share/config.kcfg" ) # The install dir for kconfig files -+ set(LOCALE_INSTALL_DIR "share/locale" ) # The install dir for translations -+ set(MIME_INSTALL_DIR "share/mimelnk" ) # The install dir for the mimetype desktop files -+ set(SERVICES_INSTALL_DIR "share/kde4/services" ) # The install dir for service (desktop, protocol, ...) files -+ set(SERVICETYPES_INSTALL_DIR "share/kde4/servicetypes" ) # The install dir for servicestypes desktop files -+ set(SOUND_INSTALL_DIR "share/sounds" ) # The install dir for sound files -+ set(TEMPLATES_INSTALL_DIR "share/templates" ) # The install dir for templates (Create new file...) -+ set(WALLPAPER_INSTALL_DIR "share/wallpapers" ) # The install dir for wallpapers -+ set(DEMO_INSTALL_DIR "share/demos" ) # The install dir for demos -+ set(KCONF_UPDATE_INSTALL_DIR "share/apps/kconf_update" ) # The kconf_update install dir -+ set(AUTOSTART_INSTALL_DIR "share/autostart" ) # The install dir for autostart files -+ -+ set(XDG_APPS_INSTALL_DIR "share/applications/kde4" ) # The XDG apps dir -+ set(XDG_DIRECTORY_INSTALL_DIR "share/desktop-directories" ) # The XDG directory -+ set(XDG_MIME_INSTALL_DIR "share/mime/packages" ) # The install dir for the xdg mimetypes -+ -+ set(SYSCONF_INSTALL_DIR "etc" ) # The kde sysconfig install dir (default /etc) -+ set(MAN_INSTALL_DIR "share/man" ) # The kde man install dir (default ${SHARE_INSTALL_PREFIX}/man/) -+ set(INFO_INSTALL_DIR "share/info" ) # The kde info install dir (default ${SHARE_INSTALL_PREFIX}/info)") -+ set(DBUS_INTERFACES_INSTALL_DIR "share/dbus-1/interfaces" ) # The kde dbus interfaces install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/interfaces)") -+ set(DBUS_SERVICES_INSTALL_DIR "share/dbus-1/services" ) # The kde dbus services install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/services)") -+ -+else (WIN32) -+ -+ # this macro implements some very special logic how to deal with the cache -+ # by default the various install locations inherit their value from theit "parent" variable -+ # so if you set CMAKE_INSTALL_PREFIX, then EXEC_INSTALL_PREFIX, PLUGIN_INSTALL_DIR will -+ # calculate their value by appending subdirs to CMAKE_INSTALL_PREFIX -+ # this would work completely without using the cache. -+ # but if somebody wants e.g. a different EXEC_INSTALL_PREFIX this value has to go into -+ # the cache, otherwise it will be forgotten on the next cmake run. -+ # Once a variable is in the cache, it doesn't depend on its "parent" variables -+ # anymore and you can only change it by editing it directly. -+ # this macro helps in this regard, because as long as you don't set one of the -+ # variables explicitely to some location, it will always calculate its value from its -+ # parents. So modifying CMAKE_INSTALL_PREFIX later on will have the desired effect. -+ # But once you decide to set e.g. EXEC_INSTALL_PREFIX to some special location -+ # this will go into the cache and it will no longer depend on CMAKE_INSTALL_PREFIX. -+ # -+ # additionally if installing to the same location as kdelibs, the other install -+ # directories are reused from the installed kdelibs -+ macro(_SET_FANCY _var _value _comment) -+ set(predefinedvalue "${_value}") -+ if ("${CMAKE_INSTALL_PREFIX}" STREQUAL "${KDE4_INSTALL_DIR}" AND DEFINED KDE4_${_var}) -+ set(predefinedvalue "${KDE4_${_var}}") -+ endif ("${CMAKE_INSTALL_PREFIX}" STREQUAL "${KDE4_INSTALL_DIR}" AND DEFINED KDE4_${_var}) -+ -+ if (NOT DEFINED ${_var}) -+ set(${_var} ${predefinedvalue}) -+ else (NOT DEFINED ${_var}) -+ set(${_var} "${${_var}}" CACHE PATH "${_comment}") -+ endif (NOT DEFINED ${_var}) -+ endmacro(_SET_FANCY) -+ -+ -+ _set_fancy(EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" "Base directory for executables and libraries") -+ _set_fancy(SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share" "Base directory for files which go to share/") -+ _set_fancy(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" "The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin)") -+ _set_fancy(SBIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/sbin" "The install dir for system executables (default ${EXEC_INSTALL_PREFIX}/sbin)") -+ _set_fancy(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" "The subdirectory relative to the install prefix where libraries will be installed (default is ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX})") -+ _set_fancy(LIBEXEC_INSTALL_DIR "${LIB_INSTALL_DIR}/kde4/libexec" "The subdirectory relative to the install prefix where libraries will be installed (default is ${LIB_INSTALL_DIR}/kde4/libexec)") -+ _set_fancy(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" "The subdirectory to the header prefix") -+ -+ _set_fancy(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/kde4" "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde4)") -+ _set_fancy(CONFIG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config" "The config file install dir") -+ _set_fancy(DATA_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/apps" "The parent directory where applications can install their data") -+ _set_fancy(HTML_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/doc/HTML" "The HTML install dir for documentation") -+ _set_fancy(ICON_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/icons" "The icon install dir (default ${SHARE_INSTALL_PREFIX}/share/icons/)") -+ _set_fancy(KCFG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config.kcfg" "The install dir for kconfig files") -+ _set_fancy(LOCALE_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/locale" "The install dir for translations") -+ _set_fancy(MIME_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/mimelnk" "The install dir for the mimetype desktop files") -+ _set_fancy(SERVICES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/kde4/services" "The install dir for service (desktop, protocol, ...) files") -+ _set_fancy(SERVICETYPES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/kde4/servicetypes" "The install dir for servicestypes desktop files") -+ _set_fancy(SOUND_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/sounds" "The install dir for sound files") -+ _set_fancy(TEMPLATES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/templates" "The install dir for templates (Create new file...)") -+ _set_fancy(WALLPAPER_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/wallpapers" "The install dir for wallpapers") -+ _set_fancy(DEMO_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/demos" "The install dir for demos") -+ _set_fancy(KCONF_UPDATE_INSTALL_DIR "${DATA_INSTALL_DIR}/kconf_update" "The kconf_update install dir") -+ _set_fancy(AUTOSTART_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/autostart" "The install dir for autostart files") -+ -+ _set_fancy(XDG_APPS_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/applications/kde4" "The XDG apps dir") -+ _set_fancy(XDG_DIRECTORY_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/desktop-directories" "The XDG directory") -+ _set_fancy(XDG_MIME_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/mime/packages" "The install dir for the xdg mimetypes") -+ -+ _set_fancy(SYSCONF_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/etc" "The kde sysconfig install dir (default ${CMAKE_INSTALL_PREFIX}/etc)") -+ _set_fancy(MAN_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/man" "The kde man install dir (default ${SHARE_INSTALL_PREFIX}/man/)") -+ _set_fancy(INFO_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/info" "The kde info install dir (default ${SHARE_INSTALL_PREFIX}/info)") -+ _set_fancy(DBUS_INTERFACES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/dbus-1/interfaces" "The kde dbus interfaces install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/interfaces)") -+ _set_fancy(DBUS_SERVICES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/dbus-1/services" "The kde dbus services install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/services)") -+ -+endif (WIN32) -+ -+# The INSTALL_TARGETS_DEFAULT_ARGS variable should be used when libraries are installed. -+# The arguments are also ok for regular executables, i.e. executables which don't go -+# into sbin/ or libexec/, but for installing executables the basic syntax -+# INSTALL(TARGETS kate DESTINATION "${BIN_INSTALL_DIR}") -+# is enough, so using this variable there doesn't help a lot. -+# The variable must not be used for installing plugins. -+# Usage is like this: -+# install(TARGETS kdecore kdeui ${INSTALL_TARGETS_DEFAULT_ARGS} ) -+# -+# This will install libraries correctly under UNIX, OSX and Windows (i.e. dll's go -+# into bin/. -+# Later on it will be possible to extend this for installing OSX frameworks -+# The COMPONENT Devel argument has the effect that static libraries belong to the -+# "Devel" install component. If we use this also for all install() commands -+# for header files, it will be possible to install -+# -everything: make install OR cmake -P cmake_install.cmake -+# -only the development files: cmake -DCOMPONENT=Devel -P cmake_install.cmake -+# -everything except the development files: cmake -DCOMPONENT=Unspecified -P cmake_install.cmake -+# This can then also be used for packaging with cpack. -+ -+set(INSTALL_TARGETS_DEFAULT_ARGS RUNTIME DESTINATION "${BIN_INSTALL_DIR}" -+ LIBRARY DESTINATION "${LIB_INSTALL_DIR}" -+ ARCHIVE DESTINATION "${LIB_INSTALL_DIR}" COMPONENT Devel ) -+ -+ -Index: cmake/modules/kde4_exec_via_sh.cmake -=================================================================== ---- cmake/modules/kde4_exec_via_sh.cmake (Revision 0) -+++ cmake/modules/kde4_exec_via_sh.cmake (Revision 801202) -@@ -0,0 +1,31 @@ -+ -+# Copyright (c) 2006, Alexander Neundorf, -+# -+# Redistribution and use is allowed according to the terms of the BSD license. -+# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -+ -+ -+if (UNIX) -+ -+file(WRITE "${_filename}" -+"#!/bin/sh -+# created by cmake, don't edit, changes will be lost -+ -+${_library_path_variable}=${_ld_library_path}\${${_library_path_variable}:+:\$${_library_path_variable}} \"${_executable}\" \"$@\" -+") -+ -+# make it executable -+# since this is only executed on UNIX, it is safe to call chmod -+exec_program(chmod ARGS ug+x \"${_filename}\" OUTPUT_VARIABLE _dummy ) -+ -+else (UNIX) -+ -+file(TO_NATIVE_PATH "${_ld_library_path}" win_path) -+ -+file(WRITE "${_filename}" -+" -+set PATH=${win_path};$ENV{PATH} -+\"${_executable}\" %* -+") -+ -+endif (UNIX) -Index: cmake/modules/kde4automoc.files.in -=================================================================== ---- cmake/modules/kde4automoc.files.in (Revision 0) -+++ cmake/modules/kde4automoc.files.in (Revision 801202) -@@ -0,0 +1,4 @@ -+MOC_INCLUDES: -+@_moc_incs@ -+SOURCES: -+@_moc_files@ -Index: cmake/modules/KDE4Macros.cmake -=================================================================== ---- cmake/modules/KDE4Macros.cmake (Revision 0) -+++ cmake/modules/KDE4Macros.cmake (Revision 801202) -@@ -0,0 +1,1131 @@ -+# for documentation look at FindKDE4Internal.cmake -+ -+# this file contains the following macros: -+# KDE4_ADD_UI_FILES -+# KDE4_ADD_UI3_FILES -+# KDE4_ADD_KCFG_FILES -+# KDE4_SET_CUSTOM_TARGET_PROPERTY -+# KDE4_GET_CUSTOM_TARGET_PROPERTY -+# KDE4_MOC_HEADERS -+# KDE4_HANDLE_AUTOMOC -+# KDE4_CREATE_FINAL_FILES -+# KDE4_ADD_PLUGIN -+# KDE4_ADD_KDEINIT_EXECUTABLE -+# KDE4_ADD_UNIT_TEST -+# KDE4_ADD_EXECUTABLE -+# KDE4_ADD_WIDGET_FILES -+# KDE4_UPDATE_ICONCACHE -+# KDE4_INSTALL_ICONS -+# KDE4_REMOVE_OBSOLETE_CMAKE_FILES -+# KDE4_NO_ENABLE_FINAL -+# KDE4_CREATE_HANDBOOK -+# KDE4_ADD_APP_ICON -+# KDE4_CREATE_MANPAGE -+ -+# Copyright (c) 2006, 2007, Alexander Neundorf, -+# Copyright (c) 2006, 2007, Laurent Montel, -+# Copyright (c) 2007 Matthias Kretz -+# -+# Redistribution and use is allowed according to the terms of the BSD license. -+# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -+ -+macro (KDE4_ADD_KCFG_FILES _sources ) -+ if( ${ARGV1} STREQUAL "GENERATE_MOC" ) -+ set(_kcfg_generatemoc TRUE) -+ endif( ${ARGV1} STREQUAL "GENERATE_MOC" ) -+ -+ foreach (_current_FILE ${ARGN}) -+ -+ if(NOT ${_current_FILE} STREQUAL "GENERATE_MOC") -+ get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE) -+ get_filename_component(_abs_PATH ${_tmp_FILE} PATH) -+ get_filename_component(_basename ${_tmp_FILE} NAME_WE) -+ -+ file(READ ${_tmp_FILE} _contents) -+ string(REGEX REPLACE "^(.*\n)?File=([^\n]+kcfg).*\n.*$" "\\2" _kcfg_FILE "${_contents}") -+ set(_src_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) -+ set(_header_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) -+ set(_moc_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc) -+ -+ # the command for creating the source file from the kcfg file -+ add_custom_command(OUTPUT ${_header_FILE} ${_src_FILE} -+ COMMAND ${KDE4_KCFGC_EXECUTABLE} -+ ARGS ${_abs_PATH}/${_kcfg_FILE} ${_tmp_FILE} -d ${CMAKE_CURRENT_BINARY_DIR} -+ MAIN_DEPENDENCY ${_tmp_FILE} -+ DEPENDS ${_abs_PATH}/${_kcfg_FILE} ${_KDE4_KCONFIG_COMPILER_DEP} ) -+ -+ if(_kcfg_generatemoc) -+ qt4_generate_moc(${_header_FILE} ${_moc_FILE} ) -+ set_source_files_properties(${_src_FILE} PROPERTIES SKIP_AUTOMOC TRUE) # don't run automoc on this file -+ list(APPEND ${_sources} ${_moc_FILE}) -+ endif(_kcfg_generatemoc) -+ -+ list(APPEND ${_sources} ${_src_FILE} ${_header_FILE}) -+ endif(NOT ${_current_FILE} STREQUAL "GENERATE_MOC") -+ endforeach (_current_FILE) -+ -+endmacro (KDE4_ADD_KCFG_FILES) -+ -+ -+GET_FILENAME_COMPONENT(KDE4_MODULE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) -+ -+#create the implementation files from the ui files and add them to the list of sources -+#usage: KDE4_ADD_UI_FILES(foo_SRCS ${ui_files}) -+macro (KDE4_ADD_UI_FILES _sources ) -+ foreach (_current_FILE ${ARGN}) -+ -+ get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE) -+ get_filename_component(_basename ${_tmp_FILE} NAME_WE) -+ set(_header ${CMAKE_CURRENT_BINARY_DIR}/ui_${_basename}.h) -+ -+ # we need to run uic and replace some things in the generated file -+ # this is done by executing the cmake script kde4uic.cmake -+ add_custom_command(OUTPUT ${_header} -+ COMMAND ${CMAKE_COMMAND} -+ ARGS -+ -DKDE4_HEADER:BOOL=ON -+ -DKDE_UIC_EXECUTABLE:FILEPATH=${QT_UIC_EXECUTABLE} -+ -DKDE_UIC_FILE:FILEPATH=${_tmp_FILE} -+ -DKDE_UIC_H_FILE:FILEPATH=${_header} -+ -DKDE_UIC_BASENAME:STRING=${_basename} -+ -P ${KDE4_MODULE_DIR}/kde4uic.cmake -+ MAIN_DEPENDENCY ${_tmp_FILE} -+ ) -+ list(APPEND ${_sources} ${_header}) -+ endforeach (_current_FILE) -+endmacro (KDE4_ADD_UI_FILES) -+ -+ -+#create the implementation files from the ui files and add them to the list of sources -+#usage: KDE4_ADD_UI3_FILES(foo_SRCS ${ui_files}) -+macro (KDE4_ADD_UI3_FILES _sources ) -+ -+ qt4_get_moc_inc_dirs(_moc_INCS) -+ -+ foreach (_current_FILE ${ARGN}) -+ -+ get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE) -+ get_filename_component(_basename ${_tmp_FILE} NAME_WE) -+ set(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) -+ set(_src ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) -+ set(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc.cpp) -+ -+ add_custom_command(OUTPUT ${_header} -+ COMMAND ${CMAKE_COMMAND} -+ -DKDE3_HEADER:BOOL=ON -+ -DKDE_UIC_EXECUTABLE:FILEPATH=${QT_UIC3_EXECUTABLE} -+ -DKDE_UIC_FILE:FILEPATH=${_tmp_FILE} -+ -DKDE_UIC_H_FILE:FILEPATH=${_header} -+ -DKDE_UIC_BASENAME:STRING=${_basename} -+ -DKDE_UIC_PLUGIN_DIR:FILEPATH="." -+ -P ${KDE4_MODULE_DIR}/kde4uic.cmake -+ MAIN_DEPENDENCY ${_tmp_FILE} -+ ) -+ -+# we need to run uic3 and replace some things in the generated file -+ # this is done by executing the cmake script kde4uic.cmake -+ add_custom_command(OUTPUT ${_src} -+ COMMAND ${CMAKE_COMMAND} -+ ARGS -+ -DKDE3_IMPL:BOOL=ON -+ -DKDE_UIC_EXECUTABLE:FILEPATH=${QT_UIC3_EXECUTABLE} -+ -DKDE_UIC_FILE:FILEPATH=${_tmp_FILE} -+ -DKDE_UIC_CPP_FILE:FILEPATH=${_src} -+ -DKDE_UIC_H_FILE:FILEPATH=${_header} -+ -DKDE_UIC_BASENAME:STRING=${_basename} -+ -DKDE_UIC_PLUGIN_DIR:FILEPATH="." -+ -P ${KDE4_MODULE_DIR}/kde4uic.cmake -+ MAIN_DEPENDENCY ${_header} -+ ) -+ -+ add_custom_command(OUTPUT ${_moc} -+ COMMAND ${QT_MOC_EXECUTABLE} -+ ARGS ${_moc_INCS} ${_header} -o ${_moc} -+ MAIN_DEPENDENCY ${_header} -+ ) -+ list(APPEND ${_sources} ${_src} ${_moc} ) -+ -+ endforeach (_current_FILE) -+endmacro (KDE4_ADD_UI3_FILES) -+ -+macro (KDE4_SET_CUSTOM_TARGET_PROPERTY _target_name _property_name _property) -+ string(REGEX REPLACE "[/ ]" "_" _dir "${CMAKE_CURRENT_SOURCE_DIR}") -+ set(_kde4_${_dir}_${_target_name}_${_property_name} "${_property}") -+endmacro (KDE4_SET_CUSTOM_TARGET_PROPERTY) -+ -+ -+macro (KDE4_GET_CUSTOM_TARGET_PROPERTY _var _target_name _property_name) -+ string(REGEX REPLACE "[/ ]" "_" _dir "${CMAKE_CURRENT_SOURCE_DIR}") -+ set(${_var} "${_kde4_${_dir}_${_target_name}_${_property_name}}") -+endmacro (KDE4_GET_CUSTOM_TARGET_PROPERTY) -+ -+ -+macro (KDE4_MOC_HEADERS _target_NAME) -+ set (_headers_to_moc) -+ foreach (_current_FILE ${ARGN}) -+ get_filename_component(_suffix "${_current_FILE}" EXT) -+ if (".h" STREQUAL "${_suffix}" OR ".hpp" STREQUAL "${_suffix}" OR ".hxx" STREQUAL "${_suffix}" OR ".H" STREQUAL "${_suffix}") -+ list(APPEND _headers_to_moc ${_current_FILE}) -+ else (".h" STREQUAL "${_suffix}" OR ".hpp" STREQUAL "${_suffix}" OR ".hxx" STREQUAL "${_suffix}" OR ".H" STREQUAL "${_suffix}") -+ message(STATUS "KDE4_MOC_HEADERS: ignoring non-header file ${_current_FILE}") -+ endif (".h" STREQUAL "${_suffix}" OR ".hpp" STREQUAL "${_suffix}" OR ".hxx" STREQUAL "${_suffix}" OR ".H" STREQUAL "${_suffix}") -+ endforeach (_current_FILE) -+ # need to create moc_.cpp file using kde4automoc.cmake -+ # and add it to the target -+ if(_headers_to_moc) -+ kde4_set_custom_target_property(${_target_NAME} AUTOMOC_HEADERS "${_headers_to_moc}") -+ endif(_headers_to_moc) -+endmacro (KDE4_MOC_HEADERS) -+ -+macro(KDE4_HANDLE_AUTOMOC _target_NAME _SRCS) -+ set(_moc_files) -+ set(_moc_headers) -+ -+ # first list all explicitly set headers -+ kde4_get_custom_target_property(_headers_to_moc ${_target_NAME} AUTOMOC_HEADERS) -+ if(NOT _headers_to_moc STREQUAL "NOTFOUND") -+ foreach(_header_to_moc ${_headers_to_moc}) -+ get_filename_component(_abs_header ${_header_to_moc} ABSOLUTE) -+ list(APPEND _moc_files ${_abs_header}) -+ list(APPEND _moc_headers ${_abs_header}) -+ endforeach(_header_to_moc) -+ endif(NOT _headers_to_moc STREQUAL "NOTFOUND") -+ -+ # now add all the sources for the automoc -+ foreach (_current_FILE ${${_SRCS}}) -+ get_filename_component(_abs_current_FILE "${_current_FILE}" ABSOLUTE) -+ get_source_file_property(_skip "${_abs_current_FILE}" SKIP_AUTOMOC) -+ get_source_file_property(_generated "${_abs_current_FILE}" GENERATED) -+ -+ if(NOT _generated AND NOT _skip) -+ get_filename_component(_suffix "${_current_FILE}" EXT) -+ # skip every source file that's not C++ -+ if(_suffix STREQUAL ".cpp" OR _suffix STREQUAL ".cc" OR _suffix STREQUAL ".cxx" OR _suffix STREQUAL ".C") -+ get_filename_component(_basename "${_current_FILE}" NAME_WE) -+ get_filename_component(_abs_path "${_abs_current_FILE}" PATH) -+ set(_header "${_abs_path}/${_basename}.h") -+ if(EXISTS "${_header}") -+ list(APPEND _moc_headers ${_header}) -+ endif(EXISTS "${_header}") -+ set(_pheader "${_abs_path}/${_basename}_p.h") -+ if(EXISTS "${_pheader}") -+ list(APPEND _moc_headers ${_pheader}) -+ endif(EXISTS "${_pheader}") -+ list(APPEND _moc_files ${_abs_current_FILE}) -+ endif(_suffix STREQUAL ".cpp" OR _suffix STREQUAL ".cc" OR _suffix STREQUAL ".cxx" OR _suffix STREQUAL ".C") -+ endif(NOT _generated AND NOT _skip) -+ endforeach (_current_FILE) -+ -+ if(_moc_files) -+ set(_automoc_source "${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_automoc.cpp") -+ get_directory_property(_moc_incs INCLUDE_DIRECTORIES) -+ configure_file(${KDE4_MODULE_DIR}/kde4automoc.files.in ${_automoc_source}.files) -+ add_custom_command(OUTPUT ${_automoc_source} -+ COMMAND ${KDE4_AUTOMOC_EXECUTABLE} -+ ${_automoc_source} -+ ${CMAKE_CURRENT_SOURCE_DIR} -+ ${CMAKE_CURRENT_BINARY_DIR} -+ ${QT_MOC_EXECUTABLE} -+ DEPENDS ${${_SRCS}} ${_moc_headers} ${_automoc_source}.files ${_KDE4_AUTOMOC_EXECUTABLE_DEP} -+ ) -+ # the OBJECT_DEPENDS is only necessary when a new moc file has to be generated that is included in a source file -+ # problem: the whole target is recompiled when the automoc.cpp file is touched -+ # set_source_files_properties(${${_SRCS}} PROPERTIES OBJECT_DEPENDS ${_automoc_source}) -+ set(${_SRCS} ${_automoc_source} ${${_SRCS}}) -+ endif(_moc_files) -+endmacro(KDE4_HANDLE_AUTOMOC) -+ -+macro(KDE4_INSTALL_TS_FILES _lang _sdir) -+ file(GLOB_RECURSE _ts_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${_sdir}/*) -+ foreach(_current_TS_FILES ${_ts_files}) -+ string(REGEX MATCH "\\.svn/" _in_svn ${_current_TS_FILES}) -+ if(NOT _in_svn) -+ get_filename_component(_subpath ${_current_TS_FILES} PATH) -+ install(FILES ${_current_TS_FILES} DESTINATION ${LOCALE_INSTALL_DIR}/${_lang}/LC_SCRIPTS/${_subpath}) -+ endif(NOT _in_svn) -+ endforeach(_current_TS_FILES) -+endmacro(KDE4_INSTALL_TS_FILES) -+ -+macro (KDE4_INSTALL_HANDBOOK _lang) -+ message(STATUS "KDE4_INSTALL_HANDBOOK() is deprecated. Remove it please. Now all is done in KDE4_CREATE_HANDBOOK.") -+endmacro (KDE4_INSTALL_HANDBOOK ) -+ -+ -+macro (KDE4_CREATE_HANDBOOK _docbook) -+ get_filename_component(_input ${_docbook} ABSOLUTE) -+ set(_doc ${CMAKE_CURRENT_BINARY_DIR}/index.cache.bz2) -+ -+ #Bootstrap -+ if (_kdeBootStrapping) -+ set(_ssheet ${CMAKE_SOURCE_DIR}/kdoctools/customization/kde-chunk.xsl) -+ set(_bootstrapOption "--srcdir=${CMAKE_SOURCE_DIR}/kdoctools/") -+ else (_kdeBootStrapping) -+ set(_ssheet ${KDE4_DATA_INSTALL_DIR}/ksgmltools2/customization/kde-chunk.xsl) -+ set(_bootstrapOption) -+ endif (_kdeBootStrapping) -+ -+ file(GLOB _docs *.docbook) -+ add_custom_command(OUTPUT ${_doc} -+ COMMAND ${KDE4_MEINPROC_EXECUTABLE} --check ${_bootstrapOption} --cache ${_doc} ${_input} -+ DEPENDS ${_docs} ${_KDE4_MEINPROC_EXECUTABLE_DEP} ${_ssheet} -+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -+ ) -+ get_filename_component(_targ ${CMAKE_CURRENT_SOURCE_DIR} NAME) -+ set(_targ "${_targ}-handbook") -+ add_custom_target(${_targ} ALL DEPENDS ${_doc}) -+ -+ if(KDE4_ENABLE_HTMLHANDBOOK) -+ set(_htmlDoc ${CMAKE_CURRENT_SOURCE_DIR}/index.html) -+ add_custom_command(OUTPUT ${_htmlDoc} -+ COMMAND ${KDE4_MEINPROC_EXECUTABLE} --check ${_bootstrapOption} -o ${_htmlDoc} ${_input} -+ DEPENDS ${_input} ${_KDE4_MEINPROC_EXECUTABLE_DEP} ${_ssheet} -+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -+ ) -+ add_custom_target(htmlhandbook DEPENDS ${_htmlDoc}) -+ endif(KDE4_ENABLE_HTMLHANDBOOK) -+ -+ set(_args ${ARGN}) -+ -+ set(_installDest) -+ if(_args) -+ list(GET _args 0 _tmp) -+ if("${_tmp}" STREQUAL "INSTALL_DESTINATION") -+ list(GET _args 1 _installDest ) -+ list(REMOVE_AT _args 0 1) -+ endif("${_tmp}" STREQUAL "INSTALL_DESTINATION") -+ endif(_args) -+ -+ get_filename_component(dirname ${CMAKE_CURRENT_SOURCE_DIR} NAME_WE) -+ if(_args) -+ list(GET _args 0 _tmp) -+ if("${_tmp}" STREQUAL "SUBDIR") -+ list(GET _args 1 dirname ) -+ list(REMOVE_AT _args 0 1) -+ endif("${_tmp}" STREQUAL "SUBDIR") -+ endif(_args) -+ -+ if(_installDest) -+ file(GLOB _images *.png) -+ install(FILES ${_doc} ${_docs} ${_images} DESTINATION ${_installDest}/${dirname}) -+ # TODO symlinks on non-unix platforms -+ if (UNIX) -+ # execute some cmake code on make install which creates the symlink -+ install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \"${_installDest}/common\" \"\$ENV{DESTDIR}${_installDest}/${dirname}/common\" )" ) -+ endif (UNIX) -+ endif(_installDest) -+ -+endmacro (KDE4_CREATE_HANDBOOK) -+ -+ -+macro (KDE4_CREATE_MANPAGE _docbook _section) -+ get_filename_component(_input ${_docbook} ABSOLUTE) -+ get_filename_component(_base ${_input} NAME_WE) -+ -+ set(_doc ${CMAKE_CURRENT_BINARY_DIR}/${_base}.${_section}) -+ # sometimes we have "man-" prepended -+ string(REGEX REPLACE "/man-" "/" _outdoc ${_doc}) -+ -+ #Bootstrap -+ if (_kdeBootStrapping) -+ set(_ssheet "${CMAKE_SOURCE_DIR}/kdoctools/docbook/xsl/manpages/docbook.xsl") -+ set(_bootstrapOption "--srcdir=${CMAKE_SOURCE_DIR}/kdoctools/") -+ else (_kdeBootStrapping) -+ set(_ssheet "${KDE4_DATA_INSTALL_DIR}/ksgmltools2/docbook/xsl/manpages/docbook.xsl") -+ set(_bootstrapOption) -+ endif (_kdeBootStrapping) -+ -+ add_custom_command(OUTPUT ${_outdoc} -+ COMMAND ${KDE4_MEINPROC_EXECUTABLE} --stylesheet ${_ssheet} --check ${_bootstrapOption} ${_input} -+ DEPENDS ${_input} ${_KDE4_MEINPROC_EXECUTABLE_DEP} ${_ssheet} -+ ) -+ get_filename_component(_targ ${CMAKE_CURRENT_SOURCE_DIR} NAME) -+ set(_targ "${_targ}-manpage") -+ add_custom_target(${_targ} ALL DEPENDS "${_outdoc}") -+ -+ set(_args ${ARGN}) -+ -+ set(_installDest) -+ if(_args) -+ list(GET _args 0 _tmp) -+ if("${_tmp}" STREQUAL "INSTALL_DESTINATION") -+ list(GET _args 1 _installDest ) -+ list(REMOVE_AT _args 0 1) -+ endif("${_tmp}" STREQUAL "INSTALL_DESTINATION") -+ endif(_args) -+ -+ get_filename_component(dirname ${CMAKE_CURRENT_SOURCE_DIR} NAME_WE) -+ if(_args) -+ list(GET _args 0 _tmp) -+ if("${_tmp}" STREQUAL "SUBDIR") -+ list(GET _args 1 dirname ) -+ list(REMOVE_AT _args 0 1) -+ endif("${_tmp}" STREQUAL "SUBDIR") -+ endif(_args) -+ -+ if(_installDest) -+ install(FILES ${_outdoc} DESTINATION ${_installDest}/man${_section}) -+ endif(_installDest) -+endmacro (KDE4_CREATE_MANPAGE) -+ -+ -+macro (KDE4_UPDATE_ICONCACHE) -+ # Update mtime of hicolor icon theme dir. -+ # We don't always have touch command (e.g. on Windows), so instead create -+ # and delete a temporary file in the theme dir. -+ install(CODE " -+ set(DESTDIR_VALUE \"\$ENV{DESTDIR}\") -+ if (NOT DESTDIR_VALUE) -+ file(WRITE \"${ICON_INSTALL_DIR}/hicolor/temp.txt\" \"update\") -+ file(REMOVE \"${ICON_INSTALL_DIR}/hicolor/temp.txt\") -+ endif (NOT DESTDIR_VALUE) -+ ") -+endmacro (KDE4_UPDATE_ICONCACHE) -+ -+# a "map" of short type names to the directories -+# unknown names should give empty results -+# KDE 3 compatibility -+set(_KDE4_ICON_GROUP_mime "mimetypes") -+set(_KDE4_ICON_GROUP_filesys "places") -+set(_KDE4_ICON_GROUP_device "devices") -+set(_KDE4_ICON_GROUP_app "apps") -+set(_KDE4_ICON_GROUP_action "actions") -+# KDE 4 / icon naming specification compatibility -+set(_KDE4_ICON_GROUP_mimetypes "mimetypes") -+set(_KDE4_ICON_GROUP_places "places") -+set(_KDE4_ICON_GROUP_devices "devices") -+set(_KDE4_ICON_GROUP_apps "apps") -+set(_KDE4_ICON_GROUP_actions "actions") -+set(_KDE4_ICON_GROUP_categories "categories") -+set(_KDE4_ICON_GROUP_status "status") -+set(_KDE4_ICON_GROUP_emblems "emblems") -+set(_KDE4_ICON_GROUP_emotes "emotes") -+set(_KDE4_ICON_GROUP_animations "animations") -+set(_KDE4_ICON_GROUP_intl "intl") -+ -+# a "map" of short theme names to the theme directory -+set(_KDE4_ICON_THEME_ox "oxygen") -+set(_KDE4_ICON_THEME_cr "crystalsvg") -+set(_KDE4_ICON_THEME_lo "locolor") -+set(_KDE4_ICON_THEME_hi "hicolor") -+ -+ -+# only used internally by KDE4_INSTALL_ICONS -+macro (_KDE4_ADD_ICON_INSTALL_RULE _install_SCRIPT _install_PATH _group _orig_NAME _install_NAME _l10n_SUBDIR) -+ -+ # if the string doesn't match the pattern, the result is the full string, so all three have the same content -+ if (NOT ${_group} STREQUAL ${_install_NAME} ) -+ set(_icon_GROUP ${_KDE4_ICON_GROUP_${_group}}) -+ if(NOT _icon_GROUP) -+ set(_icon_GROUP "actions") -+ endif(NOT _icon_GROUP) -+# message(STATUS "icon: ${_current_ICON} size: ${_size} group: ${_group} name: ${_name} l10n: ${_l10n_SUBDIR}") -+ install(FILES ${_orig_NAME} DESTINATION ${_install_PATH}/${_icon_GROUP}/${_l10n_SUBDIR}/ RENAME ${_install_NAME} ) -+ endif (NOT ${_group} STREQUAL ${_install_NAME} ) -+ -+endmacro (_KDE4_ADD_ICON_INSTALL_RULE) -+ -+ -+macro (KDE4_INSTALL_ICONS _defaultpath ) -+ -+ # the l10n-subdir if language given as second argument (localized icon) -+ set(_lang ${ARGV1}) -+ if(_lang) -+ set(_l10n_SUBDIR l10n/${_lang}) -+ else(_lang) -+ set(_l10n_SUBDIR ".") -+ endif(_lang) -+ -+ # first the png icons -+ file(GLOB _icons *.png) -+ foreach (_current_ICON ${_icons} ) -+ string(REGEX REPLACE "^.*/([a-zA-Z]+)([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\1" _type "${_current_ICON}") -+ string(REGEX REPLACE "^.*/([a-zA-Z]+)([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\2" _size "${_current_ICON}") -+ string(REGEX REPLACE "^.*/([a-zA-Z]+)([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\3" _group "${_current_ICON}") -+ string(REGEX REPLACE "^.*/([a-zA-Z]+)([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\4" _name "${_current_ICON}") -+ -+ set(_theme_GROUP ${_KDE4_ICON_THEME_${_type}}) -+ if( _theme_GROUP) -+ _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake -+ ${_defaultpath}/${_theme_GROUP}/${_size}x${_size} -+ ${_group} ${_current_ICON} ${_name} ${_l10n_SUBDIR}) -+ endif( _theme_GROUP) -+ endforeach (_current_ICON) -+ -+ # mng icons -+ file(GLOB _icons *.mng) -+ foreach (_current_ICON ${_icons} ) -+ STRING(REGEX REPLACE "^.*/([a-zA-Z]+)([0-9]+)\\-([a-z]+)\\-(.+\\.mng)$" "\\1" _type "${_current_ICON}") -+ STRING(REGEX REPLACE "^.*/([a-zA-Z]+)([0-9]+)\\-([a-z]+)\\-(.+\\.mng)$" "\\2" _size "${_current_ICON}") -+ STRING(REGEX REPLACE "^.*/([a-zA-Z]+)([0-9]+)\\-([a-z]+)\\-(.+\\.mng)$" "\\3" _group "${_current_ICON}") -+ STRING(REGEX REPLACE "^.*/([a-zA-Z]+)([0-9]+)\\-([a-z]+)\\-(.+\\.mng)$" "\\4" _name "${_current_ICON}") -+ -+ set(_theme_GROUP ${_KDE4_ICON_THEME_${_type}}) -+ if( _theme_GROUP) -+ _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake -+ ${_defaultpath}/${_theme_GROUP}/${_size}x${_size} -+ ${_group} ${_current_ICON} ${_name} ${_l10n_SUBDIR}) -+ endif( _theme_GROUP) -+ endforeach (_current_ICON) -+ -+ # and now the svg icons -+ file(GLOB _icons *.svgz) -+ foreach (_current_ICON ${_icons} ) -+ STRING(REGEX REPLACE "^.*/([a-zA-Z]+)sc\\-([a-z]+)\\-(.+\\.svgz)$" "\\1" _type "${_current_ICON}") -+ STRING(REGEX REPLACE "^.*/([a-zA-Z]+)sc\\-([a-z]+)\\-(.+\\.svgz)$" "\\2" _group "${_current_ICON}") -+ STRING(REGEX REPLACE "^.*/([a-zA-Z]+)sc\\-([a-z]+)\\-(.+\\.svgz)$" "\\3" _name "${_current_ICON}") -+ -+ set(_theme_GROUP ${_KDE4_ICON_THEME_${_type}}) -+ if( _theme_GROUP) -+ _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake -+ ${_defaultpath}/${_theme_GROUP}/scalable -+ ${_group} ${_current_ICON} ${_name} ${_l10n_SUBDIR}) -+ endif( _theme_GROUP) -+ endforeach (_current_ICON) -+ -+ KDE4_UPDATE_ICONCACHE() -+ -+endmacro (KDE4_INSTALL_ICONS) -+ -+ -+# For all C++ sources a big source file which includes all the files -+# is created. -+# This is not done for the C sources, they are just gathered in a separate list -+# because they are usually not written by KDE and as such not intended to be -+# compiled all-in-one. -+macro (KDE4_CREATE_FINAL_FILES _filenameCPP _filesExcludedFromFinalFile ) -+ set(${_filesExcludedFromFinalFile}) -+ file(WRITE "${_filenameCPP}" "//autogenerated file\n") -+ foreach (_current_FILE ${ARGN}) -+ get_filename_component(_abs_FILE "${_current_FILE}" ABSOLUTE) -+ # don't include any generated files in the final-file -+ # because then cmake will not know the dependencies -+ get_source_file_property(_isGenerated "${_abs_FILE}" GENERATED) -+ if (_isGenerated) -+ list(APPEND ${_filesExcludedFromFinalFile} "${_abs_FILE}") -+ else (_isGenerated) -+ # only put C++ files in the final-file -+ if("${_abs_FILE}" MATCHES ".+\\.(cpp|cc|cxx|C)$") -+ file(APPEND "${_filenameCPP}" "#include \"${_abs_FILE}\"\n") -+ else("${_abs_FILE}" MATCHES ".+\\.(cpp|cc|cxx|C)$") -+ list(APPEND ${_filesExcludedFromFinalFile} "${_abs_FILE}") -+ endif("${_abs_FILE}" MATCHES ".+\\.(cpp|cc|cxx|C)$") -+ endif (_isGenerated) -+ endforeach (_current_FILE) -+ -+endmacro (KDE4_CREATE_FINAL_FILES) -+ -+# This macro sets the RPATH related options for libraries, plugins and kdeinit executables. -+# It overrides the defaults set in FindKDE4Internal.cmake. -+# If RPATH is not explicitly disabled, libraries and plugins are built without RPATH, in -+# the hope that the RPATH which is compiled into the executable is good enough. -+macro (KDE4_HANDLE_RPATH_FOR_LIBRARY _target_NAME) -+ if (NOT CMAKE_SKIP_RPATH) -+ if(KDE4_USE_ALWAYS_FULL_RPATH) -+ set_target_properties(${_target_NAME} PROPERTIES SKIP_BUILD_RPATH FALSE BUILD_WITH_INSTALL_RPATH FALSE) -+ else(KDE4_USE_ALWAYS_FULL_RPATH) -+ set_target_properties(${_target_NAME} PROPERTIES INSTALL_RPATH_USE_LINK_PATH FALSE SKIP_BUILD_RPATH TRUE BUILD_WITH_INSTALL_RPATH TRUE INSTALL_RPATH "") -+ endif(KDE4_USE_ALWAYS_FULL_RPATH) -+ endif (NOT CMAKE_SKIP_RPATH) -+endmacro (KDE4_HANDLE_RPATH_FOR_LIBRARY) -+ -+# This macro sets the RPATH related options for executables -+# and creates wrapper shell scripts for the executables. -+# It overrides the defaults set in FindKDE4Internal.cmake. -+# For every executable a wrapper script is created, which sets the appropriate -+# environment variable for the platform (LD_LIBRARY_PATH on most UNIX systems, -+# DYLD_LIBRARY_PATH on OS X and PATH in Windows) so that it points to the built -+# but not yet installed versions of the libraries. So if RPATH is disabled, the executables -+# can be run via these scripts from the build tree and will find the correct libraries. -+# If RPATH is not disabled, these scripts are also used but only for consistency, because -+# they don't really influence anything then, because the compiled-in RPATH overrides -+# the LD_LIBRARY_PATH env. variable. -+# Executables with the RUN_UNINSTALLED option will be built with the RPATH pointing to the -+# build dir, so that they can be run safely without being installed, e.g. as code generators -+# for other stuff during the build. These executables will be relinked during "make install". -+# All other executables are built with the RPATH with which they will be installed. -+macro (KDE4_HANDLE_RPATH_FOR_EXECUTABLE _target_NAME _type) -+ if (UNIX) -+ -+ # set the RPATH related properties -+ if (NOT CMAKE_SKIP_RPATH) -+ if (${_type} STREQUAL "GUI") -+ set_target_properties(${_target_NAME} PROPERTIES SKIP_BUILD_RPATH TRUE BUILD_WITH_INSTALL_RPATH TRUE) -+ endif (${_type} STREQUAL "GUI") -+ -+ if (${_type} STREQUAL "NOGUI") -+ set_target_properties(${_target_NAME} PROPERTIES SKIP_BUILD_RPATH TRUE BUILD_WITH_INSTALL_RPATH TRUE) -+ endif (${_type} STREQUAL "NOGUI") -+ -+ if (${_type} STREQUAL "RUN_UNINSTALLED") -+ set_target_properties(${_target_NAME} PROPERTIES SKIP_BUILD_RPATH FALSE BUILD_WITH_INSTALL_RPATH FALSE) -+ endif (${_type} STREQUAL "RUN_UNINSTALLED") -+ endif (NOT CMAKE_SKIP_RPATH) -+ -+ if (APPLE) -+ set(_library_path_variable "DYLD_LIBRARY_PATH") -+ else (APPLE) -+ set(_library_path_variable "LD_LIBRARY_PATH") -+ endif (APPLE) -+ -+ if (APPLE) -+ # DYLD_LIBRARY_PATH does not work like LD_LIBRARY_PATH -+ # OSX already has the RPATH in libraries and executables, putting runtime directories in -+ # DYLD_LIBRARY_PATH actually breaks things -+ set(_ld_library_path "${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/:${KDE4_LIB_DIR}") -+ else (APPLE) -+ set(_ld_library_path "${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/:${LIB_INSTALL_DIR}:${KDE4_LIB_DIR}:${QT_LIBRARY_DIR}") -+ endif (APPLE) -+ get_target_property(_executable ${_target_NAME} LOCATION ) -+ -+ # use add_custom_target() to have the sh-wrapper generated during build time instead of cmake time -+ add_custom_command(TARGET ${_target_NAME} POST_BUILD -+ COMMAND ${CMAKE_COMMAND} -+ -D_filename=${_executable}.shell -D_library_path_variable=${_library_path_variable} -+ -D_ld_library_path="${_ld_library_path}" -D_executable=${_executable} -+ -P ${KDE4_MODULE_DIR}/kde4_exec_via_sh.cmake -+ ) -+ -+ macro_additional_clean_files(${_executable}.shell) -+ -+ # under UNIX, set the property WRAPPER_SCRIPT to the name of the generated shell script -+ # so it can be queried and used later on easily -+ set_target_properties(${_target_NAME} PROPERTIES WRAPPER_SCRIPT ${_executable}.shell) -+ -+ else (UNIX) -+ # under windows, set the property WRAPPER_SCRIPT just to the name of the executable -+ # maybe later this will change to a generated batch file (for setting the PATH so that the Qt libs are found) -+ get_target_property(_executable ${_target_NAME} LOCATION ) -+ set_target_properties(${_target_NAME} PROPERTIES WRAPPER_SCRIPT ${_executable}) -+ -+ set(_ld_library_path "${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}\;${LIB_INSTALL_DIR}\;${KDE4_LIB_DIR}\;${QT_LIBRARY_DIR}") -+ get_target_property(_executable ${_target_NAME} LOCATION ) -+ -+ # use add_custom_target() to have the batch-file-wrapper generated during build time instead of cmake time -+ add_custom_command(TARGET ${_target_NAME} POST_BUILD -+ COMMAND ${CMAKE_COMMAND} -+ -D_filename="${_executable}.bat" -+ -D_ld_library_path="${_ld_library_path}" -D_executable="${_executable}" -+ -P ${KDE4_MODULE_DIR}/kde4_exec_via_sh.cmake -+ ) -+ -+ endif (UNIX) -+endmacro (KDE4_HANDLE_RPATH_FOR_EXECUTABLE) -+ -+ -+macro (KDE4_ADD_PLUGIN _target_NAME _with_PREFIX) -+#is the first argument is "WITH_PREFIX" then keep the standard "lib" prefix, otherwise set the prefix empty -+ if (${_with_PREFIX} STREQUAL "WITH_PREFIX") -+ set(_first_SRC) -+ else (${_with_PREFIX} STREQUAL "WITH_PREFIX") -+ set(_first_SRC ${_with_PREFIX}) -+ endif (${_with_PREFIX} STREQUAL "WITH_PREFIX") -+ -+ set(_SRCS ${_first_SRC} ${ARGN}) -+ kde4_handle_automoc(${_target_NAME} _SRCS) -+ if (KDE4_ENABLE_FINAL) -+ kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp _separate_files ${_SRCS}) -+ add_library(${_target_NAME} MODULE ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp ${_separate_files}) -+ else (KDE4_ENABLE_FINAL) -+ add_library(${_target_NAME} MODULE ${_SRCS}) -+ endif (KDE4_ENABLE_FINAL) -+ -+ if (_first_SRC) -+ set_target_properties(${_target_NAME} PROPERTIES PREFIX "") -+ endif (_first_SRC) -+ -+ kde4_handle_rpath_for_library(${_target_NAME}) -+ -+ if (WIN32) -+ # for shared libraries/plugins a -DMAKE_target_LIB is required -+ string(TOUPPER ${_target_NAME} _symbol) -+ string(REGEX REPLACE "[^_A-Za-z0-9]" "_" _symbol ${_symbol}) -+ set(_symbol "MAKE_${_symbol}_LIB") -+ set_target_properties(${_target_NAME} PROPERTIES DEFINE_SYMBOL ${_symbol}) -+ endif (WIN32) -+ -+endmacro (KDE4_ADD_PLUGIN _target_NAME _with_PREFIX) -+ -+ -+# this macro is intended to check whether a list of source -+# files has the "NOGUI" or "RUN_UNINSTALLED" keywords at the beginning -+# in _output_LIST the list of source files is returned with the "NOGUI" -+# and "RUN_UNINSTALLED" keywords removed -+# if "NOGUI" is in the list of files, the _nogui argument is set to -+# "NOGUI" (which evaluates to TRUE in cmake), otherwise it is set empty -+# (which evaluates to FALSE in cmake) -+# if "RUN_UNINSTALLED" is in the list of files, the _uninst argument is set to -+# "RUN_UNINSTALLED" (which evaluates to TRUE in cmake), otherwise it is set empty -+# (which evaluates to FALSE in cmake) -+# if "TEST" is in the list of files, the _test argument is set to -+# "TEST" (which evaluates to TRUE in cmake), otherwise it is set empty -+# (which evaluates to FALSE in cmake) -+macro(KDE4_CHECK_EXECUTABLE_PARAMS _output_LIST _nogui _uninst _test) -+ set(${_nogui}) -+ set(${_uninst}) -+ set(${_test}) -+ set(${_output_LIST} ${ARGN}) -+ list(LENGTH ${_output_LIST} count) -+ -+ list(GET ${_output_LIST} 0 first_PARAM) -+ -+ set(second_PARAM "NOTFOUND") -+ if (${count} GREATER 1) -+ list(GET ${_output_LIST} 1 second_PARAM) -+ endif (${count} GREATER 1) -+ -+ set(remove "NOTFOUND") -+ -+ if (${first_PARAM} STREQUAL "NOGUI") -+ set(${_nogui} "NOGUI") -+ set(remove 0) -+ endif (${first_PARAM} STREQUAL "NOGUI") -+ -+ if (${first_PARAM} STREQUAL "RUN_UNINSTALLED") -+ set(${_uninst} "RUN_UNINSTALLED") -+ set(remove 0) -+ endif (${first_PARAM} STREQUAL "RUN_UNINSTALLED") -+ -+ if (${first_PARAM} STREQUAL "TEST") -+ set(${_test} "TEST") -+ set(remove 0) -+ endif (${first_PARAM} STREQUAL "TEST") -+ -+ if (${second_PARAM} STREQUAL "NOGUI") -+ set(${_nogui} "NOGUI") -+ set(remove 0;1) -+ endif (${second_PARAM} STREQUAL "NOGUI") -+ -+ if (${second_PARAM} STREQUAL "RUN_UNINSTALLED") -+ set(${_uninst} "RUN_UNINSTALLED") -+ set(remove 0;1) -+ endif (${second_PARAM} STREQUAL "RUN_UNINSTALLED") -+ -+ if (${second_PARAM} STREQUAL "TEST") -+ set(${_test} "TEST") -+ set(remove 0;1) -+ endif (${second_PARAM} STREQUAL "TEST") -+ -+ -+ -+ if (NOT "${remove}" STREQUAL "NOTFOUND") -+ list(REMOVE_AT ${_output_LIST} ${remove}) -+ endif (NOT "${remove}" STREQUAL "NOTFOUND") -+ -+endmacro(KDE4_CHECK_EXECUTABLE_PARAMS) -+ -+ -+macro (KDE4_ADD_KDEINIT_EXECUTABLE _target_NAME ) -+ -+ kde4_check_executable_params(_SRCS _nogui _uninst _test ${ARGN}) -+ -+# if (WIN32) -+# # under windows, just build a normal executable -+# KDE4_ADD_EXECUTABLE(${_target_NAME} ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp ${ARGN} ) -+# else (WIN32) -+ # under UNIX, create a shared library and a small executable, which links to this library -+ -+ kde4_handle_automoc(kdeinit_${_target_NAME} _SRCS) -+ if (KDE4_ENABLE_FINAL) -+ kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/kdeinit_${_target_NAME}_final_cpp.cpp _separate_files ${_SRCS}) -+ add_library(kdeinit_${_target_NAME} SHARED ${CMAKE_CURRENT_BINARY_DIR}/kdeinit_${_target_NAME}_final_cpp.cpp ${_separate_files}) -+ -+ else (KDE4_ENABLE_FINAL) -+ add_library(kdeinit_${_target_NAME} SHARED ${_SRCS}) -+ endif (KDE4_ENABLE_FINAL) -+ -+ kde4_handle_rpath_for_library(kdeinit_${_target_NAME}) -+ set_target_properties(kdeinit_${_target_NAME} PROPERTIES OUTPUT_NAME kdeinit4_${_target_NAME}) -+ -+ configure_file(${KDE4_MODULE_DIR}/kde4init_dummy.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp) -+ kde4_add_executable(${_target_NAME} "${_nogui}" "${_uninst}" ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp) -+ target_link_libraries(${_target_NAME} kdeinit_${_target_NAME}) -+# endif (WIN32) -+ -+ if (WIN32) -+ target_link_libraries(${_target_NAME} ${QT_QTMAIN_LIBRARY}) -+ endif (WIN32) -+ -+endmacro (KDE4_ADD_KDEINIT_EXECUTABLE) -+ -+# add a unit test, which is executed when running make test -+# it will be built with RPATH pointing to the build dir -+# The targets are always created, but only built for the "all" -+# target if the option KDE4_BUILD_TESTS is enabled. Otherwise the rules for the target -+# are created but not built by default. You can build them by manually building the target. -+# The name of the target can be specified using TESTNAME , if it is not given -+# the macro will default to the -+macro (KDE4_ADD_UNIT_TEST _test_NAME) -+ set(_srcList ${ARGN}) -+ set(_targetName ${_test_NAME}) -+ if( ${ARGV1} STREQUAL "TESTNAME" ) -+ set(_targetName ${ARGV2}) -+ list(REMOVE_AT _srcList 0 1) -+ endif( ${ARGV1} STREQUAL "TESTNAME" ) -+ -+ set(_nogui) -+ list(GET ${_srcList} 0 first_PARAM) -+ if( ${first_PARAM} STREQUAL "NOGUI" ) -+ set(_nogui "NOGUI") -+ endif( ${first_PARAM} STREQUAL "NOGUI" ) -+ -+ kde4_add_executable( ${_test_NAME} TEST ${_srcList} ) -+ -+ if(NOT KDE4_TEST_OUTPUT) -+ set(KDE4_TEST_OUTPUT plaintext) -+ endif(NOT KDE4_TEST_OUTPUT) -+ set(KDE4_TEST_OUTPUT ${KDE4_TEST_OUTPUT} CACHE STRING "The output to generate when running the QTest unit tests") -+ -+ set(using_qtest "") -+ foreach(_filename ${_srcList}) -+ if(NOT using_qtest) -+ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_filename}") -+ file(READ ${_filename} file_CONTENT) -+ string(REGEX MATCH "QTEST_(KDE)?MAIN" using_qtest "${file_CONTENT}") -+ endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_filename}") -+ endif(NOT using_qtest) -+ endforeach(_filename) -+ -+ set(_executable ${EXECUTABLE_OUTPUT_PATH}/${_test_NAME}) -+ if (Q_WS_MAC AND NOT _nogui) -+ set(_executable ${EXECUTABLE_OUTPUT_PATH}/${_test_NAME}.app/Contents/MacOS/${_test_NAME}) -+ else (Q_WS_MAC AND NOT _nogui) -+ # Use .shell wrapper where available, to use uninstalled libs. -+ if (UNIX) -+ set(_executable ${_executable}.shell) -+ endif (UNIX) -+ endif (Q_WS_MAC AND NOT _nogui) -+ -+ if (using_qtest AND KDE4_TEST_OUTPUT STREQUAL "xml") -+ #MESSAGE(STATUS "${_targetName} : Using QTestLib, can produce XML report.") -+ add_test( ${_targetName} ${_executable} -xml -o ${_targetName}.tml) -+ else (using_qtest AND KDE4_TEST_OUTPUT STREQUAL "xml") -+ #MESSAGE(STATUS "${_targetName} : NOT using QTestLib, can't produce XML report, please use QTestLib to write your unit tests.") -+ add_test( ${_targetName} ${_executable} ) -+ endif (using_qtest AND KDE4_TEST_OUTPUT STREQUAL "xml") -+ -+# add_test( ${_targetName} ${EXECUTABLE_OUTPUT_PATH}/${_test_NAME} -xml -o ${_test_NAME}.tml ) -+ -+ if (NOT MSVC_IDE) #not needed for the ide -+ # if the tests are EXCLUDE_FROM_ALL, add a target "buildtests" to build all tests -+ if (NOT KDE4_BUILD_TESTS) -+ get_directory_property(_buildtestsAdded BUILDTESTS_ADDED) -+ if(NOT _buildtestsAdded) -+ add_custom_target(buildtests) -+ set_directory_properties(PROPERTIES BUILDTESTS_ADDED TRUE) -+ endif(NOT _buildtestsAdded) -+ add_dependencies(buildtests ${_test_NAME}) -+ endif (NOT KDE4_BUILD_TESTS) -+ endif (NOT MSVC_IDE) -+ -+endmacro (KDE4_ADD_UNIT_TEST) -+ -+macro (KDE4_ADD_TEST_EXECUTABLE _target_NAME) -+ MESSAGE(SEND_ERROR "KDE4_ADD_TEST_EXECUTABLE is deprecated use KDE4_ADD_EXECUTABLE( TEST ) instead") -+endmacro (KDE4_ADD_TEST_EXECUTABLE) -+ -+ -+macro (KDE4_ADD_EXECUTABLE _target_NAME) -+ -+ kde4_check_executable_params( _SRCS _nogui _uninst _test ${ARGN}) -+ -+ set(_add_executable_param) -+ set(_type "GUI") -+ -+ # determine additional parameters for add_executable() -+ # for GUI apps, create a bundle on OSX -+ if (Q_WS_MAC) -+ set(_add_executable_param MACOSX_BUNDLE) -+ endif (Q_WS_MAC) -+ -+ # for GUI apps, this disables the additional console under Windows -+ if (WIN32) -+ set(_add_executable_param WIN32) -+ endif (WIN32) -+ -+ if (_nogui) -+ set(_type "NOGUI") -+ set(_add_executable_param) -+ endif (_nogui) -+ -+ if (_uninst OR _test) -+ set(_type "RUN_UNINSTALLED ${_type}") -+ endif (_uninst OR _test) -+ -+ if (_test AND NOT KDE4_BUILD_TESTS) -+ set(_add_executable_param ${_add_executable_param} EXCLUDE_FROM_ALL) -+ endif (_test AND NOT KDE4_BUILD_TESTS) -+ -+ kde4_handle_automoc(${_target_NAME} _SRCS) -+ if (KDE4_ENABLE_FINAL) -+ kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp _separate_files ${_SRCS}) -+ add_executable(${_target_NAME} ${_add_executable_param} ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp ${_separate_files}) -+ else (KDE4_ENABLE_FINAL) -+ add_executable(${_target_NAME} ${_add_executable_param} ${_SRCS}) -+ endif (KDE4_ENABLE_FINAL) -+ -+ if (_test) -+ set_target_properties(${_target_NAME} PROPERTIES COMPILE_FLAGS -DKDESRCDIR="\\"${CMAKE_CURRENT_SOURCE_DIR}\\"") -+ endif (_test) -+ -+ kde4_handle_rpath_for_executable(${_target_NAME} ${_type}) -+ -+ if (WIN32) -+ target_link_libraries(${_target_NAME} ${QT_QTMAIN_LIBRARY}) -+ endif (WIN32) -+ -+endmacro (KDE4_ADD_EXECUTABLE) -+ -+ -+macro (KDE4_ADD_LIBRARY _target_NAME _lib_TYPE) -+#is the first argument is "WITH_PREFIX" then keep the standard "lib" prefix, otherwise set the prefix empty -+ -+ set(_first_SRC ${_lib_TYPE}) -+ set(_add_lib_param) -+ -+ if (${_lib_TYPE} STREQUAL "STATIC") -+ set(_first_SRC) -+ set(_add_lib_param STATIC) -+ endif (${_lib_TYPE} STREQUAL "STATIC") -+ if (${_lib_TYPE} STREQUAL "SHARED") -+ set(_first_SRC) -+ set(_add_lib_param SHARED) -+ endif (${_lib_TYPE} STREQUAL "SHARED") -+ if (${_lib_TYPE} STREQUAL "MODULE") -+ set(_first_SRC) -+ set(_add_lib_param MODULE) -+ endif (${_lib_TYPE} STREQUAL "MODULE") -+ -+ set(_SRCS ${_first_SRC} ${ARGN}) -+ kde4_handle_automoc(${_target_NAME} _SRCS) -+ if (KDE4_ENABLE_FINAL) -+ kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp _separate_files ${_SRCS}) -+ add_library(${_target_NAME} ${_add_lib_param} ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp ${_separate_files}) -+ else (KDE4_ENABLE_FINAL) -+ add_library(${_target_NAME} ${_add_lib_param} ${_SRCS}) -+ endif (KDE4_ENABLE_FINAL) -+ -+ kde4_handle_rpath_for_library(${_target_NAME}) -+ -+ # for shared libraries a -DMAKE_target_LIB is required -+ string(TOUPPER ${_target_NAME} _symbol) -+ string(REGEX REPLACE "[^_A-Za-z0-9]" "_" _symbol ${_symbol}) -+ set(_symbol "MAKE_${_symbol}_LIB") -+ set_target_properties(${_target_NAME} PROPERTIES DEFINE_SYMBOL ${_symbol}) -+ -+endmacro (KDE4_ADD_LIBRARY _target_NAME _lib_TYPE) -+ -+ -+macro (KDE4_ADD_WIDGET_FILES _sources) -+ foreach (_current_FILE ${ARGN}) -+ -+ get_filename_component(_input ${_current_FILE} ABSOLUTE) -+ get_filename_component(_basename ${_input} NAME_WE) -+ set(_source ${CMAKE_CURRENT_BINARY_DIR}/${_basename}widgets.cpp) -+ set(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}widgets.moc) -+ -+ # create source file from the .widgets file -+ add_custom_command(OUTPUT ${_source} -+ COMMAND ${KDE4_MAKEKDEWIDGETS_EXECUTABLE} -+ ARGS -o ${_source} ${_input} -+ MAIN_DEPENDENCY ${_input} DEPENDS ${_KDE4_MAKEKDEWIDGETS_DEP}) -+ -+ # create moc file -+ qt4_generate_moc(${_source} ${_moc} ) -+ -+ list(APPEND ${_sources} ${_source} ${_moc}) -+ -+ endforeach (_current_FILE) -+ -+endmacro (KDE4_ADD_WIDGET_FILES) -+ -+ -+MACRO(KDE4_REMOVE_OBSOLETE_CMAKE_FILES) -+# the files listed here will be removed by remove_obsoleted_cmake_files.cmake, Alex -+ install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake ) -+ set(module_install_dir ${DATA_INSTALL_DIR}/cmake/modules ) -+ -+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake "#generated by cmake, dont edit\n\n") -+ foreach ( _current_FILE ${ARGN}) -+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake "message(STATUS \"Removing ${module_install_dir}/${_current_FILE}\" )\n" ) -+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake "exec_program( ${CMAKE_COMMAND} ARGS -E remove ${module_install_dir}/${_current_FILE} OUTPUT_VARIABLE _dummy)\n" ) -+ endforeach ( _current_FILE) -+ -+ENDMACRO(KDE4_REMOVE_OBSOLETE_CMAKE_FILES) -+ -+ -+MACRO(KDE4_NO_ENABLE_FINAL _project_name) -+ if(KDE4_ENABLE_FINAL) -+ set(KDE4_ENABLE_FINAL OFF) -+ remove_definitions(-DKDE_USE_FINAL) -+ message(STATUS "You used enable-final argument but \"${_project_name}\" doesn't support it. Try to fix compile it and remove KDE4_NO_ENABLE_FINAL macro. Thanks") -+ -+ endif(KDE4_ENABLE_FINAL) -+ENDMACRO(KDE4_NO_ENABLE_FINAL _project_name) -+ -+ -+macro(KDE4_CREATE_EXPORTS_HEADER _outputFile _libName) -+ string(TOUPPER ${_libName} _libNameUpperCase) -+ string(REGEX REPLACE "[^_A-Za-z0-9]" "_" _libNameUpperCase ${_libNameUpperCase}) -+ # the next line is is required, because in CMake arguments to macros are not real -+ # variables, but handled differently. The next line create a real CMake variable, -+ # so configure_file() will replace it correctly. -+ set(_libName ${_libName}) -+ # compared to write(FILE) configure_file() only really writes the file if the -+ # contents have changed. Otherwise we would have a lot of recompiles. -+ configure_file(${KDE4_MODULE_DIR}/kde4exportsheader.h.in ${_outputFile}) -+endmacro(KDE4_CREATE_EXPORTS_HEADER _outputFile _libName) -+ -+ -+macro (KDE4_CREATE_HTML_HANDBOOK _docbook) -+ message(STATUS "KDE4_CREATE_HTML_HANDBOOK() is deprecated. Enable the option KDE4_ENABLE_HTMLHANDBOOK instead, this will give you targets htmlhandbook for creating the html help.") -+endmacro (KDE4_CREATE_HTML_HANDBOOK) -+ -+ -+# adds application icon to target source list -+# 'appsources' - the sources of the application -+# 'pngfiles' - specifies the list of icon files -+# example: KDE4_ADD_WIN32_APP_ICON(myapp_SRCS "pics/cr16-myapp.png;pics/cr32-myapp.png") -+ -+macro (KDE4_ADD_WIN32_APP_ICON appsources) -+ message(STATUS "KDE4_ADD_WIN32_APP_ICON() is deprecated, use KDE4_ADD_APP_ICON() instead") -+ if (WIN32) -+ find_program(PNG2ICO_EXECUTABLE NAMES png2ico) -+ find_program(WINDRES_EXECUTABLE NAMES windres) -+ if(MSVC) -+ set(WINDRES_EXECUTABLE TRUE) -+ endif(MSVC) -+ STRING(REPLACE _SRCS "" appname ${appsources}) -+ if (PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE) -+ set (_outfilename ${CMAKE_CURRENT_BINARY_DIR}/${appname}) -+ -+ # png2ico is found by the above find_program -+# message("png2ico ${_outfilename}.ico ${ARGN}") -+ exec_program(png2ico ARGS ${_outfilename}.ico ${ARGN}) -+ -+ # now make rc file for adding it to the sources -+ file(WRITE ${_outfilename}.rc "IDI_ICON1 ICON DISCARDABLE \"${_outfilename}.ico\"\n") -+ if (MINGW) -+ exec_program(windres -+ ARGS "-i ${_outfilename}.rc -o ${_outfilename}_res.o --include-dir=${CMAKE_CURRENT_SOURCE_DIR}") -+ list(APPEND ${appsources} ${CMAKE_CURRENT_BINARY_DIR}/${appname}_res.o) -+ else(MINGW) -+ list(APPEND ${appsources} ${CMAKE_CURRENT_BINARY_DIR}/${appname}.rc) -+ endif(MINGW) -+ endif(PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE) -+ endif(WIN32) -+endmacro (KDE4_ADD_WIN32_APP_ICON) -+ -+# adds application icon to target source list -+ -+# this macro adds an application icon to the specified target -+# mac osx notes : the application icon is added to a Mac OS X bundle so that Finder and friends show the right thing. -+# win32 notes: the application icon(s) are compiled into the application -+# parameters: -+# 'appsources' - specifies the list of source files -+# 'pattern' - regular expression for searching application icons -+# example: KDE4_ADD_APP_ICON( myapp_sources "pics/cr*-myapp.png") -+# example: KDE4_ADD_APP_ICON( myapp_sources "icons/oxygen/*/apps/myapp.png") -+ -+macro (KDE4_ADD_APP_ICON appsources pattern) -+ string(REPLACE _SRCS "" target ${appsources}) -+ if (WIN32) -+ find_program(PNG2ICO_EXECUTABLE NAMES png2ico) -+ find_program(WINDRES_EXECUTABLE NAMES windres) -+ if(MSVC) -+ set(WINDRES_EXECUTABLE TRUE) -+ endif(MSVC) -+ if (PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE) -+ string(REPLACE "*" "(.*)" pattern_rx "${pattern}") -+ file(GLOB_RECURSE files "${pattern}") -+ foreach (it ${files}) -+ string(REGEX REPLACE "${pattern_rx}" "\\1" fn "${it}") -+ if (fn MATCHES ".*16.*" ) -+ list (APPEND _icons ${it}) -+ endif (fn MATCHES ".*16.*") -+ if (fn MATCHES ".*32.*" ) -+ list (APPEND _icons ${it}) -+ endif (fn MATCHES ".*32.*") -+ if (fn MATCHES ".*48.*" ) -+ list (APPEND _icons ${it}) -+ endif (fn MATCHES ".*48.*") -+ if (fn MATCHES ".*64.*" ) -+ list (APPEND _icons ${it}) -+ endif (fn MATCHES ".*64.*") -+ if (fn MATCHES ".*128.*" ) -+ list (APPEND _icons ${it}) -+ endif (fn MATCHES ".*128.*") -+ endforeach (it) -+ if (_icons) -+ set (_outfilename ${CMAKE_CURRENT_BINARY_DIR}/${target}) -+ add_custom_command(OUTPUT ${_outfilename}.ico ${_outfilename}.rc -+ COMMAND ${PNG2ICO_EXECUTABLE} ARGS --rcfile ${_outfilename}.rc ${_outfilename}.ico ${_icons} -+ DEPENDS ${PNG2ICO_EXECUTABLE} ${_icons} -+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} -+ ) -+ if (MINGW) -+ add_custom_command(OUTPUT ${_outfilename}_res.o -+ COMMAND ${WINDRES_EXECUTABLE} ARGS -i ${_outfilename}.rc -o ${_outfilename}_res.o --include-dir=${CMAKE_CURRENT_SOURCE_DIR} -+ DEPENDS ${WINDRES_EXECUTABLE} ${_outfilename}.rc -+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} -+ ) -+ list(APPEND ${appsources} ${_outfilename}_res.o) -+ else(MINGW) -+ list(APPEND ${appsources} ${_outfilename}.rc) -+ endif(MINGW) -+ else(_icons) -+ message(STATUS "Unable to find a related icon for target ${target} - application will not have an application icon!") -+ endif(_icons) -+ else(PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE) -+ message(STATUS "Unable to find the png2ico or windres utilities - application will not have an application icon!") -+ endif(PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE) -+ endif(WIN32) -+ if (Q_WS_MAC) -+ # first convert image to a tiff using the Mac OS X "sips" utility, -+ # then use tiff2icns to convert to an icon -+ find_program(SIPS_EXECUTABLE NAMES sips) -+ find_program(TIFF2ICNS_EXECUTABLE NAMES tiff2icns) -+ if (SIPS_EXECUTABLE AND TIFF2ICNS_EXECUTABLE) -+ file(GLOB_RECURSE files "${pattern}") -+ # we can only test for the 128-icon like that - we don't use patterns anymore -+ foreach (it ${files}) -+ if (it MATCHES ".*128.*" ) -+ set (_icon ${it}) -+ endif (it MATCHES ".*128.*") -+ endforeach (it) -+ set (_outfilename ${CMAKE_CURRENT_BINARY_DIR}/${target}) -+ -+ if (_icon) -+ -+ # first, get the basename of our app icon -+ add_custom_command(OUTPUT ${_outfilename}.icns -+ COMMAND ${SIPS_EXECUTABLE} -s format tiff ${_icon} --out ${outfilename}.tiff -+ COMMAND ${TIFF2ICNS_EXECUTABLE} ${outfilename}.tiff ${_outfilename}.icns -+ DEPENDS ${_icon} -+ ) -+ -+ macro_additional_clean_files(${outfilename}.tiff ${_outfilename}.icns) -+ -+ # This will register the icon into the bundle -+ set(MACOSX_BUNDLE_ICON_FILE ${target}.icns) -+ -+ # Append the icns file to the sources list so it will be a dependency to the -+ # main target -+ list(APPEND ${appsources} ${_outfilename}.icns) -+ -+ # this doesn't seem to work for me - Use manual "install" instead -+ # SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/${target}.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) -+ -+ install(FILES ${_outfilename}.icns DESTINATION ${BIN_INSTALL_DIR}/${target}.app/Contents/Resources/) -+ -+ else(_icon) -+ # TODO - try to scale a non-128 icon...? Try to convert an SVG on the fly? -+ message(STATUS "Unable to find an 128x128 icon for target ${target} - application will not have an application icon!") -+ endif(_icon) -+ -+ else(SIPS_EXECUTABLE AND TIFF2ICNS_EXECUTABLE) -+ message(STATUS "Unable to find the sips and tiff2icns utilities - application will not have an application icon!") -+ endif(SIPS_EXECUTABLE AND TIFF2ICNS_EXECUTABLE) -+ endif(Q_WS_MAC) -+endmacro (KDE4_ADD_APP_ICON) -+ -+ -Index: cmake/CMakeLists.txt -=================================================================== ---- cmake/CMakeLists.txt (Revision 801314) -+++ cmake/CMakeLists.txt (Revision 801202) -@@ -1,3 +1,4 @@ - -+add_subdirectory(automoc) - #add_subdirectory(modules) - -Index: server/control/CMakeLists.txt -=================================================================== ---- server/control/CMakeLists.txt (Revision 801314) -+++ server/control/CMakeLists.txt (Revision 801202) -@@ -25,7 +25,7 @@ - processcontrol.cpp - ) - --automoc4(akonadi_control control_SRCS) -+qt4_automoc(${control_SRCS}) - - qt4_add_dbus_adaptor( control_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../../interfaces/org.kde.Akonadi.AgentManager.xml agentmanager.h AgentManager ) - qt4_add_dbus_adaptor( control_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/org.kde.Akonadi.ControlManager.xml controlmanager.h ControlManager ) -Index: server/tests/unittest/CMakeLists.txt -=================================================================== ---- server/tests/unittest/CMakeLists.txt (Revision 801314) -+++ server/tests/unittest/CMakeLists.txt (Revision 801202) -@@ -5,8 +5,6 @@ - - set(handlertest_SRCS handlertest.cpp teststoragebackend.cpp ) - --automoc4(handlertest handlertest_SRCS) --add_executable(handlertest ${handlertest_SRCS}) --add_test(akonadi-handlertest handlertest) -+kde4_add_unit_test(handlertest TESTNAME akonadi-handlertest ${handlertest_SRCS}) - - target_link_libraries(handlertest akonadiprivate ${QT_QTTEST_LIBRARY}) -Index: server/src/tests/CMakeLists.txt -=================================================================== ---- server/src/tests/CMakeLists.txt (Revision 801314) -+++ server/src/tests/CMakeLists.txt (Revision 801202) -@@ -5,17 +5,10 @@ - - set(interpretertest_SRCS interpretertest.cpp ../interpreter.cpp ) - --automoc4(interpretertest interpretertest_SRCS) --add_executable(interpretertest ${interpretertest_SRCS}) --add_test(akonadi-interpretertest interpretertest) -+kde4_add_unit_test(interpretertest TESTNAME akonadi-interpretertest ${interpretertest_SRCS}) - - target_link_libraries(interpretertest ${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY}) - - --set(querybuildertest_SRCS querybuildertest.cpp) -- --automoc4(querybuildertest querybuildertest_SRCS) --add_executable(querybuildertest ${querybuildertest_SRCS}) --add_test(akonadi-querybuildertest querybuildertest) -- -+kde4_add_unit_test(querybuildertest TESTNAME akonadi-querybuildertest querybuildertest.cpp) - target_link_libraries(querybuildertest ${QT_QTCORE_LIBRARY} ${QT_QTSQL_LIBRARY} ${QT_QTTEST_LIBRARY}) -Index: server/akonadictl/CMakeLists.txt -=================================================================== ---- server/akonadictl/CMakeLists.txt (Revision 801314) -+++ server/akonadictl/CMakeLists.txt (Revision 801202) -@@ -12,7 +12,7 @@ - main.cpp - ) - --automoc4(akonadictl akonadictl_SRCS) -+qt4_automoc(${akonadictl_SRCS}) - - qt4_add_dbus_interfaces( akonadictl_SRCS - ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/org.kde.Akonadi.ControlManager.xml -Index: server/CMakeLists.txt -=================================================================== ---- server/CMakeLists.txt (Revision 801314) -+++ server/CMakeLists.txt (Revision 801202) -@@ -98,7 +103,7 @@ - src/nepomukmanager.cpp - ) - --automoc4(akonadiprivate libakonadiprivate_SRCS) -+qt4_automoc(${libakonadiprivate_SRCS}) - - qt4_add_dbus_adaptor( libakonadiprivate_SRCS interfaces/org.kde.Akonadi.TracerNotification.xml dbustracer.h Akonadi::DBusTracer ) - qt4_add_dbus_adaptor( libakonadiprivate_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/org.kde.Akonadi.Tracer.xml tracer.h Akonadi::Tracer -@@ -114,7 +119,7 @@ - - set(xesam_xml interfaces/org.freedesktop.xesam.Search.xml) - --set_source_files_properties(${xesam_xml} PROPERTIES INCLUDE "xesamtypes.h") -+SET_SOURCE_FILES_PROPERTIES(${xesam_xml} PROPERTIES INCLUDE "xesamtypes.h") - - qt4_add_dbus_interface( libakonadiprivate_SRCS ${xesam_xml} xesaminterface ) - -Index: CMakeLists.txt -=================================================================== ---- CMakeLists.txt (Revision 801302) -+++ CMakeLists.txt (Revision 801202) -@@ -2,9 +2,6 @@ - - cmake_minimum_required(VERSION 2.4.5 FATAL_ERROR) - --# enable unit tests --enable_testing() -- - # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked - set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") - -@@ -18,8 +15,6 @@ - message(FATAL_ERROR "Akonadi requires Qt4 with QtDBus module in order to built.") - endif(NOT QT_QTDBUS_FOUND) - --find_package(Automoc4 REQUIRED) -- - set(SHARED_MIME_INFO_MINIMUM_VERSION "0.20") - find_package(SharedMimeInfo REQUIRED) - -@@ -28,8 +23,7 @@ - message(FATAL_ERROR "\nThe command line XSLT processor program 'xsltproc' could not be found.\nPlease install libxslt.\n") - endif(NOT XSLTPROC_EXECUTABLE) - --# this one actually sets only install locations --include(InstallSettings) -+include(AkonadiInternal) - - ################ configure checks and similar things ############################## - -@@ -81,7 +75,7 @@ - - ################# build targets ######################## - --#add_subdirectory(cmake) -+add_subdirectory(cmake) - - include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/akonadi ${QT_INCLUDES}) diff --git a/akonadi.spec b/akonadi.spec index d1daedd..b78b2af 100644 --- a/akonadi.spec +++ b/akonadi.spec @@ -1,70 +1,94 @@ +%define gccver %(gcc -dumpversion) Name: akonadi -Version: 1.13.0 -Release: 5mamba +Version: 16.08.3 +Release: 1mamba Summary: PIM Storage Service Group: System/Libraries Vendor: openmamba Distribution: openmamba Packager: Davide Madrisan URL: http://pim.kde.org/akonadi/ -Source: ftp://ftp.kde.org/pub/kde/stable/akonadi/src/akonadi-%{version}.tar.bz2 -Patch0: %{name}-restore-builtin-automoc4.patch -Patch1: %{name}-1.1.1-mysql_conf.patch -Patch2: %{name}-1.4.0-sqlite_default.patch +Source: http://download.kde.org/stable/applications/%{version}/src/akonadi-%{version}.tar.xz +Patch0: akonadi-16.04.2-qt-5.7.0-sqlite3.patch License: LGPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel -BuildRequires: libboost-devel BuildRequires: libgcc -BuildRequires: libqt4-devel -BuildRequires: libqt4-mysql -BuildRequires: libsoprano-devel +BuildRequires: libkauth-devel +BuildRequires: libkcodecs-devel +BuildRequires: libkcompletion-devel +BuildRequires: libkconfig-devel +BuildRequires: libkconfigwidgets-devel +BuildRequires: libkcoreaddons-devel +BuildRequires: libkdbusaddons-devel +BuildRequires: libki18n-devel +BuildRequires: libkiconthemes-devel +BuildRequires: libkio-devel +BuildRequires: libkitemmodels-devel +BuildRequires: libkitemviews-devel +BuildRequires: libkservice-devel +BuildRequires: libkwidgetsaddons-devel +BuildRequires: libkwindowsystem-devel +BuildRequires: libkxmlgui-devel +BuildRequires: libqt5-devel +BuildRequires: libsqlite-devel BuildRequires: libstdc++6-devel -BuildRequires: mysql +BuildRequires: libxml2-devel ## AUTOBUILDREQ-END BuildRequires: cmake BuildRequires: automoc4 -BuildRequires: libsqlite-devel -Requires: libakonadi = %{?epoch:%epoch:}%{version}-%{release} -Requires: libqt4-sqlite +BuildRequires: libqt5-devel >= 5.6.1 +Requires: libqt5-mysql +Requires: mariadb >= 10.1 +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} +Provides: akonadi5 +Obsoletes: akonadi5 +Conflicts: akonadi4 BuildRoot: %{_tmppath}/%{name}-%{version}-root %description PIM Storage Service. This package contains the server and control files. -%package -n libakonadi +%package -n lib%{name} Group: System/Libraries Summary: Static libraries and headers for %{name} +Provides: libakonadi5 +Obsoletes: libakonadi5 -%description -n libakonadi +%description -n lib%{name} PIM Storage Service. This package contains static libraries and header files need for development. %description PIM Storage Service. -%package -n libakonadi-devel +%package -n lib%{name}-devel Group: Development/Libraries Summary: Static libraries and headers for %{name} -Requires: libakonadi = %{?epoch:%epoch:}%{version}-%{release} +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} +Requires: libstdc++6-devel == %{gccver} +Provides: libakonadi5-devel +Obsoletes: libakonadi5-devel +Conflicts: libakonadi4-devel -%description -n libakonadi-devel +%description -n lib%{name}-devel PIM Storage Service. This package contains static libraries and header files need for development. %prep -%setup -q -#%patch0 -p0 -b .restore-automoc4 -#%patch1 -p1 -#%patch2 -p1 +%setup -q -n akonadi-%{version} +#-D -T +#:<< _EOF +#%patch0 -p1 %build -%cmake -d build \ - -DCONFIG_INSTALL_DIR:PATH=%{_sysconfdir} \ - -DDATABASE_BACKEND=SQLITE \ - -DINSTALL_QSQLITE_IN_QT_PREFIX:BOOL=ON \ - -DQT_PLUGINS_DIR=%{_qt4_plugindir} +#:<< _EOF +%cmake_kde5 -d build \ + -DDATABASE_BACKEND=MYSQL + +# -DCONFIG_INSTALL_DIR:PATH=%{_sysconfdir} \ %make @@ -72,14 +96,22 @@ This package contains static libraries and header files need for development. [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall -C build -install -d -m0755 %{buildroot}%{_sysconfdir}/xprofile.d/ -cat >> %{buildroot}%{_sysconfdir}/xprofile.d/akonadi.sh << _EOF -# set akonadi default backend db to QSQLITE3 when mysqld is not installed -if [ ! -e %{_sbindir}/mysqld -a -e ~/.config/akonadi/akonadiserverrc -a ! -e ~/.config/akonadi.backup.mysqld ]; then - [ "`grep "Driver=QMYSQL" ~/.config/akonadi/akonadiserverrc`" ] && mv ~/.config/akonadi ~/.config/akonadi.backup.mysqld -fi +#install -d -m0755 %{buildroot}%{_sysconfdir}/xprofile.d/ +#cat >> %{buildroot}%{_sysconfdir}/xprofile.d/akonadi.sh << _EOF +## set akonadi default backend db to QSQLITE3 when mysqld is not installed +#if [ ! -e %{_sbindir}/mysqld -a -e ~/.config/akonadi/akonadiserverrc -a ! -e ~/.config/akonadi.backup.mysqld ]; then +# [ "`grep "Driver=QMYSQL" ~/.config/akonadi/akonadiserverrc`" ] && mv ~/.config/akonadi ~/.config/akonadi.backup.mysqld +#fi +#_EOF +#chmod +x %{buildroot}%{_sysconfdir}/xprofile.d/akonadi.sh + +install -d -m0755 %{buildroot}%{_sysconfdir}/prelink.conf.d +cat > %{buildroot}%{_sysconfdir}/prelink.conf.d/akonadi.conf << _EOF +-b %{_bindir}/akonadi_rds +-b %{_bindir}/akonadictl +-b %{_bindir}/akonadiserver +-b %{_bindir}/asapcat _EOF -chmod +x %{buildroot}%{_sysconfdir}/xprofile.d/akonadi.sh %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -94,37 +126,124 @@ update-mime-database %{_datadir}/mime &> /dev/null || : %files %defattr(-,root,root) -%{_sysconfdir}/xprofile.d/akonadi.sh -%dir %{_sysconfdir}/akonadi/ -%config(noreplace) %{_sysconfdir}/akonadi/mysql-global.conf -%config(noreplace) %{_sysconfdir}/akonadi/mysql-global-mobile.conf -%{_bindir}/akonadi_agent_launcher -%{_bindir}/akonadi_agent_server -%{_bindir}/akonadi_control -%{_bindir}/akonadi_rds -%{_bindir}/akonadictl -%{_bindir}/akonadiserver +%{_sysconfdir}/prelink.conf.d/akonadi.conf +%{_sysconfdir}/xdg/akonadi.categories +%dir %{_sysconfdir}/xdg/akonadi +%{_sysconfdir}/xdg/akonadi/mysql-global-mobile.conf +%{_sysconfdir}/xdg/akonadi/mysql-global.conf +%{_bindir}/akonadi* %{_bindir}/asapcat - -%files -n libakonadi -%defattr(-,root,root) -%{_libdir}/libakonadiprotocolinternals.so.* -%{_qt4_plugindir}/sqldrivers/libqsqlite3.so -%{_datadir}/dbus-1/interfaces/org.freedesktop.Akonadi.* +%{_datadir}/akonadi/agents/knutresource.desktop +%{_datadir}/config.kcfg/resourcebase.kcfg %{_datadir}/dbus-1/services/org.freedesktop.Akonadi.* +%{_datadir}/dbus-1/interfaces/org.freedesktop.Akonadi.* %{_datadir}/mime/packages/akonadi-mime.xml + +%files -n lib%{name} +%defattr(-,root,root) +%{_kde5_libdir}/libKF5Akonadi*.so.* +%{_qt5_plugindir}/sqldrivers/libqsqlite3.so +%{_qt5_plugindir}/designer/akonadi5widgets.so +%{_qt5_plugindir}/akonadi/akonadi_test_searchplugin.so +%{_kde5_datadir}/kf5/akonadi/akonadi-xml.xsd +%{_kde5_datadir}/kf5/akonadi/kcfg2dbus.xsl +%{_kde5_datadir}/kf5/akonadi_knut_resource/knut-template.xml %doc AUTHORS NEWS README -%files -n libakonadi-devel +%files -n lib%{name}-devel %defattr(-,root,root) -%{_includedir}/akonadi/ -%{_libdir}/libakonadiprotocolinternals.so -%{_libdir}/cmake/Akonadi/Akonadi*.cmake -%{_libdir}/pkgconfig/akonadi.pc +%dir %{_kde5_includedir}/akonadi/ +%{_kde5_includedir}/akonadi/* +%dir %{_kde5_includedir}/Akonadi* +%{_kde5_includedir}/Akonadi*/* +%{_kde5_includedir}/akonadi_version.h +%{_kde5_libdir}/libKF5Akonadi*.so +%dir %{_kde5_libdir}/cmake/KF5Akonadi +%{_kde5_libdir}/cmake/KF5Akonadi/KF5Akonadi*.cmake +%{_libdir}/qt5/mkspecs/modules/qt_Akonadi*.pri %changelog -* Thu Mar 17 2016 Silvan Calarco 1.13.0-5mamba -- rebuilt +* Thu Nov 10 2016 Automatic Build System 16.08.3-1mamba +- automatic version update by autodist + +* Tue Oct 18 2016 Silvan Calarco 16.08.2-3mamba +- rebuilt with mysql database backend +- require libqt5-mysql and mariadb > 10.1 + +* Tue Oct 18 2016 Silvan Calarco 16.08.2-2mamba +- removed requirement for libqt5-sqlite + +* Thu Oct 13 2016 Automatic Build System 16.08.2-1mamba +- automatic version update by autodist + +* Tue Oct 11 2016 Silvan Calarco 16.08.1-2mamba +- disable binaries prelinking causing akonadiserver not to run anymore + +* Thu Sep 08 2016 Automatic Build System 16.08.1-1mamba +- automatic version update by autodist + +* Tue Aug 30 2016 Automatic Build System 16.08.0-1mamba +- automatic version update by autodist + +* Tue Jul 12 2016 Automatic Build System 16.04.3-1mamba +- automatic version update by autodist + +* Fri Jul 01 2016 Silvan Calarco 16.04.2-3mamba +- rebuild with default CONFIG_INSTALL_DIR + +* Thu Jun 30 2016 Silvan Calarco 16.04.2-2mamba +- uptream patch to re-enable sqlite3 backend after Qt 5.7.0 + +* Tue Jun 14 2016 Automatic Build System 16.04.2-1mamba +- automatic version update by autodist + +* Mon Jun 13 2016 Silvan Calarco 16.04.1-3mamba +- rebuilt with qt 5.6.1 + +* Sat Jun 04 2016 Silvan Calarco 16.04.1-2mamba +- rebuilt with gcc 6.1.0 and needs rebuild at every gcc upgrade + +* Wed May 11 2016 Automatic Build System 16.04.1-1mamba +- automatic version update by autodist + +* Sun Apr 24 2016 Automatic Build System 16.04.0-1mamba +- automatic version update by autodist + +* Tue Mar 15 2016 Automatic Build System 15.12.3-1mamba +- automatic version update by autodist + +* Sun Feb 21 2016 Silvan Calarco 15.12.2-3mamba +- definitely move dbus file to akonadi package + +* Sun Feb 21 2016 Silvan Calarco 15.12.2-2mamba +- moded dbus interface files to -devel package + +* Wed Feb 17 2016 Automatic Build System 15.12.2-1mamba +- automatic version update by autodist + +* Mon Feb 15 2016 Silvan Calarco 15.12.1-2mamba +- rename back from akonadi5 to akonadi + +* Tue Jan 12 2016 Automatic Build System 15.12.1-1mamba +- automatic version update by autodist + +* Fri Jan 01 2016 Silvan Calarco 15.12.0-2mamba +- renamed from akonadi to akonadi5 + +* Sun Dec 20 2015 Automatic Build System 15.12.0-1mamba +- automatic version update by autodist + +* Tue Nov 10 2015 Automatic Build System 15.08.3-1mamba +- automatic version update by autodist + +* Tue Oct 13 2015 Automatic Build System 15.08.2-1mamba +- automatic version update by autodist + +* Sun Sep 20 2015 Automatic Build System 15.08.1-1mamba +- automatic version update by autodist + +* Wed Aug 26 2015 Silvan Calarco 15.08.0-1mamba +- update to 15.08.0 * Sat Jan 24 2015 Silvan Calarco 1.13.0-4mamba - rebuilt