diff --git a/0002-Remove-daemon-proxy-conection-to-changed.patch b/0002-Remove-daemon-proxy-conection-to-changed.patch new file mode 100644 index 0000000..49a6905 --- /dev/null +++ b/0002-Remove-daemon-proxy-conection-to-changed.patch @@ -0,0 +1,28 @@ +From ec677018df575ef295b5a57b66436b24ded63850 Mon Sep 17 00:00:00 2001 +From: Daniel Nicoletti +Date: Tue, 6 May 2014 12:42:28 -0300 +Subject: [PATCH 2/6] Remove daemon proxy conection to changed() + +--- + src/daemon.cpp | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/src/daemon.cpp b/src/daemon.cpp +index 621fb89..06907f4 100755 +--- a/src/daemon.cpp ++++ b/src/daemon.cpp +@@ -94,10 +94,7 @@ void DaemonPrivate::setupSignal(const QString &signal, bool connect) + const char *signalToConnect = 0; + const char *memberToConnect = 0; + +- if (signal == SIGNAL(changed())) { +- signalToConnect = SIGNAL(Changed()); +- memberToConnect = SIGNAL(changed()); +- } else if (signal == SIGNAL(repoListChanged())) { ++ if (signal == SIGNAL(repoListChanged())) { + signalToConnect = SIGNAL(RepoListChanged()); + memberToConnect = SIGNAL(repoListChanged()); + } else if (signal == SIGNAL(restartScheduled())) { +-- +1.9.3 + diff --git a/0003-Add-operator-to-bitfield.patch b/0003-Add-operator-to-bitfield.patch new file mode 100644 index 0000000..f9689f2 --- /dev/null +++ b/0003-Add-operator-to-bitfield.patch @@ -0,0 +1,74 @@ +From c7b3c1dde34409fba8fd80355338d7f3fc1feffe Mon Sep 17 00:00:00 2001 +From: Daniel Nicoletti +Date: Tue, 6 May 2014 12:43:26 -0300 +Subject: [PATCH 3/6] Add operator== to bitfield + +--- + src/bitfield.cpp | 15 ++++++++++----- + src/bitfield.h | 6 +++++- + 2 files changed, 15 insertions(+), 6 deletions(-) + +diff --git a/src/bitfield.cpp b/src/bitfield.cpp +index c986905..68ef80c 100644 +--- a/src/bitfield.cpp ++++ b/src/bitfield.cpp +@@ -2,7 +2,7 @@ + + using namespace PackageKit; + +-Bitfield::Bitfield () : m_val (0) ++Bitfield::Bitfield () + { + } + +@@ -61,10 +61,15 @@ Bitfield Bitfield::operator|= (Bitfield mask) + + Bitfield& Bitfield::operator= (const Bitfield& other) + { +- if (this == &other) +- return *this; ++ if (this == &other) ++ return *this; + +- m_val = other.m_val; ++ m_val = other.m_val; + +- return *this; ++ return *this; ++} ++ ++bool Bitfield::operator==(const Bitfield &other) ++{ ++ return m_val == other.m_val; + } +diff --git a/src/bitfield.h b/src/bitfield.h +index d7dd481..8535e46 100644 +--- a/src/bitfield.h ++++ b/src/bitfield.h +@@ -2,6 +2,7 @@ + #define PACKAGEKIT_BITFIELD_H + + #include ++#include + + namespace PackageKit { + +@@ -23,11 +24,14 @@ public: + Bitfield operator|= (Bitfield mask); + + Bitfield& operator= (const Bitfield& other); ++ bool operator==(const Bitfield &other); + + private: +- qulonglong m_val; ++ qulonglong m_val = 0; + }; + + } // End namespace PackageKit + ++Q_DECLARE_METATYPE(PackageKit::Bitfield) ++ + #endif +-- +1.9.3 + diff --git a/0004-Remove-the-metatype-registration-for-Transaction-typ.patch b/0004-Remove-the-metatype-registration-for-Transaction-typ.patch new file mode 100644 index 0000000..0a164ed --- /dev/null +++ b/0004-Remove-the-metatype-registration-for-Transaction-typ.patch @@ -0,0 +1,44 @@ +From 9e3a611a3c1177878df2f09b6c4e0bee13239ba3 Mon Sep 17 00:00:00 2001 +From: Daniel Nicoletti +Date: Tue, 6 May 2014 12:44:51 -0300 +Subject: [PATCH 4/6] Remove the metatype registration for Transaction types as + is't a bit useless since it depends on the namespace being used better leave + this to the client to register + +--- + src/daemon.cpp | 19 ------------------- + 1 file changed, 19 deletions(-) + +diff --git a/src/daemon.cpp b/src/daemon.cpp +index 06907f4..fdea8a7 100755 +--- a/src/daemon.cpp ++++ b/src/daemon.cpp +@@ -66,25 +66,6 @@ Daemon::Daemon(QObject *parent) : + if (!db.open()) { + qDebug() << "Failed to initialize the desktop files database"; + } +- +- qRegisterMetaType("PackageKit::Daemon::Network"); +- qRegisterMetaType("PackageKit::Daemon::Authorize"); +- qRegisterMetaType("PackageKit::Transaction::InternalError"); +- qRegisterMetaType("PackageKit::Transaction::Role"); +- qRegisterMetaType("PackageKit::Transaction::Error"); +- qRegisterMetaType("PackageKit::Transaction::Exit"); +- qRegisterMetaType("PackageKit::Transaction::Filter"); +- qRegisterMetaType("PackageKit::Transaction::Message"); +- qRegisterMetaType("PackageKit::Transaction::Status"); +- qRegisterMetaType("PackageKit::Transaction::MediaType"); +- qRegisterMetaType("PackageKit::Transaction::DistroUpgrade"); +- qRegisterMetaType("PackageKit::Transaction::TransactionFlag"); +- qRegisterMetaType("PackageKit::Transaction::TransactionFlags"); +- qRegisterMetaType("PackageKit::Transaction::Restart"); +- qRegisterMetaType("PackageKit::Transaction::UpdateState"); +- qRegisterMetaType("PackageKit::Transaction::Group"); +- qRegisterMetaType("PackageKit::Transaction::Info"); +- qRegisterMetaType("PackageKit::Transaction::SigType"); + } + + void DaemonPrivate::setupSignal(const QString &signal, bool connect) +-- +1.9.3 + diff --git a/0005-Remove-RoleUpgradeSystem-as-it-s-not-supported-in-0..patch b/0005-Remove-RoleUpgradeSystem-as-it-s-not-supported-in-0..patch new file mode 100644 index 0000000..5e5b9bc --- /dev/null +++ b/0005-Remove-RoleUpgradeSystem-as-it-s-not-supported-in-0..patch @@ -0,0 +1,25 @@ +From d53989d7c8051ae0be95a91725646bd4f5fe38b9 Mon Sep 17 00:00:00 2001 +From: Daniel Nicoletti +Date: Wed, 7 May 2014 16:16:25 -0300 +Subject: [PATCH 5/6] Remove RoleUpgradeSystem as it's not supported in 0.9.x + anymore + +--- + src/transaction.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/transaction.h b/src/transaction.h +index 2b03f41..7b17fc5 100644 +--- a/src/transaction.h ++++ b/src/transaction.h +@@ -140,7 +140,6 @@ public: + RoleGetDistroUpgrades, + RoleGetCategories, + RoleGetOldTransactions, +- RoleUpgradeSystem, // Since 0.6.11 + RoleRepairSystem, // Since 0.7.2 + RoleGetDetailsLocal, // Since 0.8.17 + RoleGetFilesLocal, // Since 0.9.1 +-- +1.9.3 + diff --git a/0006-Properly-export-cmake-targets.patch b/0006-Properly-export-cmake-targets.patch new file mode 100644 index 0000000..484444e --- /dev/null +++ b/0006-Properly-export-cmake-targets.patch @@ -0,0 +1,101 @@ +From 8547dc427bd0d09faef7b26078adf39c2fe74e01 Mon Sep 17 00:00:00 2001 +From: Aleix Pol +Date: Tue, 19 Aug 2014 18:54:46 +0200 +Subject: [PATCH 6/6] Properly export cmake targets + +--- + CMakeLists.txt | 7 +++++++ + src/CMakeLists.txt | 20 +++++++++++--------- + src/modules/packagekit-qt-config.cmake.in | 7 +++---- + 3 files changed, 21 insertions(+), 13 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fa8978a..5df701d 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,6 +51,7 @@ set (LOCALE_DIR "${DATADIR}/locale") + set (VERSION "${QPACKAGEKIT_VERSION}") + set (BUILDDIR "${CMAKE_BINARY_DIR}") + set (LOCALSTATEDIR "/var") ++set (CMAKECONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${LIBNAME}/") + + add_definitions("-DLOCALSTATEDIR=\"${LOCALSTATEDIR}\"") + add_definitions("-std=gnu++11") +@@ -75,3 +76,9 @@ endif (DISABLE_MAINTAINER_CFLAGS) + add_definitions(${MAINTAINER_CFLAGS}) + + add_subdirectory(src) ++ ++install(EXPORT PackageKitQtTargets ++ DESTINATION "${CMAKECONFIG_INSTALL_DIR}" ++ FILE PackageKitQtTargets.cmake ++ NAMESPACE PK:: ++ COMPONENT Devel) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 8ef7906..d1176ec 100755 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -55,13 +55,14 @@ set(packagekitqt_SRC + details.cpp + ) + +-find_file(PK_INTERFACE_XML org.freedesktop.PackageKit.xml +- PATHS ${CMAKE_INSTALL_PREFIX}/share/dbus-1/interfaces/ ++find_path(PK_INTERFACES_DIR org.freedesktop.PackageKit.xml ++ HINTS ${CMAKE_INSTALL_PREFIX} /usr ++ PATH_SUFFIXES share/dbus-1/interfaces/ + ) +-find_file(PK_TRANSACTION_INTERFACE_XML org.freedesktop.PackageKit.Transaction.xml +- PATHS ${CMAKE_INSTALL_PREFIX}/share/dbus-1/interfaces/ +-) +-if (PK_INTERFACE_XML STREQUAL "PK_INTERFACE_XML-NOTFOUND" OR PK_TRANSACTION_INTERFACE_XML STREQUAL "PK_TRANSACTION_INTERFACE_XML-NOTFOUND") ++set(PK_INTERFACE_XML "${PK_INTERFACES_DIR}/org.freedesktop.PackageKit.xml") ++set(PK_TRANSACTION_INTERFACE_XML "${PK_INTERFACES_DIR}/org.freedesktop.PackageKit.Transaction.xml") ++ ++if (NOT PK_INTERFACE_XML OR NOT PK_TRANSACTION_INTERFACE_XML) + message (FATAL_ERROR "Unable to find PackageKit DBus specifications! Please install PackageKit to continue!") + endif () + +@@ -87,7 +88,8 @@ set_target_properties(${LIBNAME} PROPERTIES VERSION ${QPACKAGEKIT_VERSION} SOVER + if (Qt5_FOUND) + add_dependencies(${LIBNAME} mocs) + target_link_libraries(${LIBNAME} +- ${Qt5DBus_LIBRARIES} ${Qt5Sql_LIBRARIES} ++ LINK_PUBLIC Qt5::DBus ++ LINK_PRIVATE Qt5::Sql + ) + elseif (Qt4_FOUND) + target_link_libraries(${LIBNAME} +@@ -99,8 +101,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${LIBNAME}.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/${LIBNAME}.pc + @ONLY + ) +- +-install(TARGETS ${LIBNAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++target_include_directories(${LIBNAME} INTERFACE "$") ++install(TARGETS ${LIBNAME} EXPORT PackageKitQtTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LIBNAME}.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig + ) +diff --git a/src/modules/packagekit-qt-config.cmake.in b/src/modules/packagekit-qt-config.cmake.in +index f9f4436..a91b095 100644 +--- a/src/modules/packagekit-qt-config.cmake.in ++++ b/src/modules/packagekit-qt-config.cmake.in +@@ -1,11 +1,10 @@ + # - Config information for PackageKit-Qt@QT_VERSION@ + # This file defines: + # +-# PackageKitQt@QT_VERSION@_INCLUDE_DIR - the PackageKitQt@QT_VERSION@ include directory + # PackageKitQt@QT_VERSION@_LIBRARIES - Link these to use PackageKitQt@QT_VERSION@ + + SET(prefix "@CMAKE_INSTALL_PREFIX@") + SET(exec_prefix "@CMAKE_INSTALL_PREFIX@") +-SET(PackageKitQt@QT_VERSION@_LIBRARIES "@PKQT_INSTALL_LIBDIR@/lib@LIBNAME@.so" CACHE FILEPATH "Libraries for PackageKitQt@QT_VERSION@") +-SET(PackageKitQt@QT_VERSION@_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include/PackageKit/@LIBNAME@" CACHE PATH "Include path for PackageKitQt@QT_VERSION@") +-SET(PackageKitQt@QT_VERSION@_FOUND "TRUE") ++SET(PackageKitQt@QT_VERSION@_LIBRARIES "PK::packagekitqt5") ++ ++include("${CMAKE_CURRENT_LIST_DIR}/PackageKitQtTargets.cmake") +-- +1.9.3 + diff --git a/PackageKit-Qt.spec b/PackageKit-Qt.spec index e45f050..2a53b3a 100644 --- a/PackageKit-Qt.spec +++ b/PackageKit-Qt.spec @@ -4,7 +4,7 @@ Summary: Qt support library for PackageKit Name: PackageKit-Qt Version: 0.9.2 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2+ URL: http://www.packagekit.org/ @@ -17,6 +17,13 @@ Source0: https://gitorious.org/packagekit/packagekit-qt/archive/%{gitTag}.tar. Source0: http://www.freedesktop.org/software/PackageKit/releases/PackageKit-Qt-%{version}.tar.xz %endif +## upstream patches +Patch2: 0002-Remove-daemon-proxy-conection-to-changed.patch +Patch3: 0003-Add-operator-to-bitfield.patch +Patch4: 0004-Remove-the-metatype-registration-for-Transaction-typ.patch +Patch5: 0005-Remove-RoleUpgradeSystem-as-it-s-not-supported-in-0..patch +Patch6: 0006-Properly-export-cmake-targets.patch + BuildRequires: cmake BuildRequires: pkgconfig(QtDBus) pkgconfig(QtSql) @@ -42,7 +49,7 @@ Development headers and libraries for PackageKit-Qt. %prep -%setup -q %{?gitTag:-n packagekit-packagekit-qt} +%autosetup -p1 %{?gitTag:-n packagekit-packagekit-qt} %build @@ -78,6 +85,9 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %changelog +* Tue Aug 26 2014 Rex Dieter 0.9.2-4 +- pull in some upstream fixes + * Fri Aug 15 2014 Fedora Release Engineering - 0.9.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild