Update to upstream GIT snapshot, drop custom qt5 support patches

epel7
Lubomir Rintel 11 years ago
parent 65f145c0ab
commit c16a4091d7

@ -1,28 +0,0 @@
From 563cb938348d7bdd1db4aa861840e343b67bccec Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Wed, 5 Feb 2014 13:18:07 +0100
Subject: [PATCH] Fix include/libdir paths when they're absolute
Possibly only applies to our package build, not upstreamable as it is.
---
PolkitQt5-1Config.cmake.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/PolkitQt5-1Config.cmake.in b/PolkitQt5-1Config.cmake.in
index 14e1f73..f7caa8c 100644
--- a/PolkitQt5-1Config.cmake.in
+++ b/PolkitQt5-1Config.cmake.in
@@ -13,8 +13,8 @@ if(NOT POLKITQT-1_INSTALL_DIR)
set(POLKITQT-1_INSTALL_DIR "@CMAKE_INSTALL_PREFIX@")
endif(NOT POLKITQT-1_INSTALL_DIR)
-set(POLKITQT-1_INCLUDE_DIR "${POLKITQT-1_INSTALL_DIR}/@INCLUDE_INSTALL_DIR@/polkit-qt5-1")
-set(POLKITQT-1_LIB_DIR "${POLKITQT-1_INSTALL_DIR}/@LIB_INSTALL_DIR@")
+set(POLKITQT-1_INCLUDE_DIR "@INCLUDE_INSTALL_DIR@/polkit-qt5-1")
+set(POLKITQT-1_LIB_DIR "@LIB_INSTALL_DIR@")
set(POLKITQT-1_POLICY_FILES_INSTALL_DIR "${POLKITQT-1_INSTALL_DIR}/share/polkit-1/actions")
# Compatibility
--
1.8.5.3

@ -1,62 +0,0 @@
From 0f5aa46c8fd67c1b40431c628193082203372ab6 Mon Sep 17 00:00:00 2001
From: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Date: Mon, 31 Dec 2012 09:26:33 +0100
Subject: [PATCH 1/5] Include moc generated files.
If we don't include moc generated files, we won't be able to
link the libraries to any program because of unresolved symbols.
---
CMakeLists.txt | 4 ++++
agent/polkitqt1-agent-listener.cpp | 2 +-
agent/polkitqt1-agent-session.cpp | 2 +-
gui/polkitqt1-gui-actionbutton.cpp | 2 --
4 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cef6a8e..c760031 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,10 @@
project("PolkitQt-1")
cmake_minimum_required(VERSION 2.8.11)
+
+# Instruct CMake to run moc automatically when needed
+set(CMAKE_AUTOMOC ON)
+
find_package(ECM 0.0.6 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH})
diff --git a/agent/polkitqt1-agent-listener.cpp b/agent/polkitqt1-agent-listener.cpp
index a38b34d..c96d242 100644
--- a/agent/polkitqt1-agent-listener.cpp
+++ b/agent/polkitqt1-agent-listener.cpp
@@ -121,4 +121,4 @@ const PolkitAgentListener *Listener::listener()
}
-
+#include "moc_polkitqt1-agent-listener.cpp"
diff --git a/agent/polkitqt1-agent-session.cpp b/agent/polkitqt1-agent-session.cpp
index 77c6e75..1f875d0 100644
--- a/agent/polkitqt1-agent-session.cpp
+++ b/agent/polkitqt1-agent-session.cpp
@@ -166,4 +166,4 @@ void AsyncResult::setError(const QString &text)
g_simple_async_result_set_error(d->result, POLKIT_ERROR, POLKIT_ERROR_FAILED, "%s", text.toUtf8().data());
}
-
+#include "moc_polkitqt1-agent-session.cpp"
diff --git a/gui/polkitqt1-gui-actionbutton.cpp b/gui/polkitqt1-gui-actionbutton.cpp
index dabc264..e2a9ee5 100644
--- a/gui/polkitqt1-gui-actionbutton.cpp
+++ b/gui/polkitqt1-gui-actionbutton.cpp
@@ -165,5 +165,3 @@ void ActionButtonPrivate::streamClicked(bool c)
//needed because of Q_PRIVATE_SLOT
#include "moc_polkitqt1-gui-actionbutton.cpp"
-
-
--
1.8.5.3

File diff suppressed because it is too large Load Diff

@ -1,224 +0,0 @@
From 9cac9ef904042bb69fbda88386a38b50e536ac3a Mon Sep 17 00:00:00 2001
From: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Date: Mon, 31 Dec 2012 15:11:23 +0100
Subject: [PATCH 2/5] Full Qt 5 port.
[lkundrak@v3.sk: Rebased, squashed "Reintroduce ECM.
It's needed for KDEInstallDirs." in to fix build]
---
CMakeLists.txt | 10 +++++++---
agent/CMakeLists.txt | 9 +++------
agent/polkitqt1-agent-listener.cpp | 2 +-
core/CMakeLists.txt | 7 ++-----
core/polkitqt1-authority.cpp | 16 ++++++++--------
gui/CMakeLists.txt | 2 ++
polkit-qt-agent-1.pc.cmake | 2 +-
polkit-qt-core-1.pc.cmake | 2 +-
polkit-qt-gui-1.pc.cmake | 2 +-
9 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c760031..c6a2e28 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,17 +2,21 @@
project("PolkitQt-1")
cmake_minimum_required(VERSION 2.8.11)
+find_package(ECM 0.0.6 REQUIRED NO_MODULE)
+
+# Find includes in corresponding build directories
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed
set(CMAKE_AUTOMOC ON)
-find_package(ECM 0.0.6 REQUIRED NO_MODULE)
-
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH})
-find_package(Qt5 5.1.0 REQUIRED COMPONENTS Core DBus Widgets Xml)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0)
+find_package(Qt5Core REQUIRED)
+find_package(Qt5Gui REQUIRED)
+find_package(Qt5Widgets REQUIRED)
find_package(Polkit REQUIRED)
find_package(GObject REQUIRED)
find_package(GIO REQUIRED)
diff --git a/agent/CMakeLists.txt b/agent/CMakeLists.txt
index 4df7d62..47e649d 100644
--- a/agent/CMakeLists.txt
+++ b/agent/CMakeLists.txt
@@ -1,19 +1,16 @@
-include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}
-)
-
set(polkit_qt_agent_SRCS
polkitqt1-agent-session.cpp
polkitqt1-agent-listener.cpp
listeneradapter.cpp
polkitqtlistener.cpp
)
+
add_library(polkit-qt-agent-1 SHARED ${polkit_qt_agent_SRCS})
+qt5_use_modules(polkit-qt-agent-1 Core)
+
target_link_libraries(polkit-qt-agent-1
${POLKIT_LIBRARIES}
- ${QT_QTCORE_LIBRARY}
${POLKIT_AGENT_LIBRARY}
polkit-qt-core-1
)
diff --git a/agent/polkitqt1-agent-listener.cpp b/agent/polkitqt1-agent-listener.cpp
index c96d242..a193d8b 100644
--- a/agent/polkitqt1-agent-listener.cpp
+++ b/agent/polkitqt1-agent-listener.cpp
@@ -90,7 +90,7 @@ bool Listener::registerListener(const PolkitQt1::Subject &subject, const QString
bool r = polkit_agent_register_listener(d->listener,
#endif
subject.subject(),
- objectPath.toAscii().data(),
+ objectPath.toLatin1().data(),
#ifndef POLKIT_QT_1_COMPATIBILITY_MODE
NULL,
#endif
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index 5afdae4..1adf1f8 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -1,8 +1,3 @@
-include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}
-)
-
set(polkit_qt_core_SRCS
polkitqt1-authority.cpp
polkitqt1-identity.cpp
@@ -14,6 +9,8 @@ set(polkit_qt_core_SRCS
add_library(polkit-qt-core-1 SHARED ${polkit_qt_core_SRCS})
+qt5_use_modules(polkit-qt-core-1 Core DBus Xml)
+
target_link_libraries(polkit-qt-core-1
${POLKIT_LIBRARIES}
${GLIB2_LIBRARIES}
diff --git a/core/polkitqt1-authority.cpp b/core/polkitqt1-authority.cpp
index 265fe70..62488ca 100644
--- a/core/polkitqt1-authority.cpp
+++ b/core/polkitqt1-authority.cpp
@@ -223,7 +223,7 @@ void Authority::Private::init()
if (!msg.arguments().isEmpty()) {
// this method returns a list with present seats
QList<QString> seats;
- qVariantValue<QDBusArgument> (msg.arguments()[0]) >> seats;
+ qvariant_cast<QDBusArgument> (msg.arguments()[0]) >> seats;
// it can be multiple seats present so connect all their signals
Q_FOREACH(const QString &seat, seats) {
seatSignalsConnect(seat);
@@ -267,7 +267,7 @@ void Authority::Private::dbusFilter(const QDBusMessage &message)
// TODO: Test this with the multiseat support
if (message.member() == "SeatAdded") {
- seatSignalsConnect(qVariantValue<QDBusObjectPath> (message.arguments()[0]).path());
+ seatSignalsConnect(qvariant_cast<QDBusObjectPath> (message.arguments()[0]).path());
}
}
}
@@ -323,7 +323,7 @@ Authority::Result Authority::checkAuthorizationSync(const QString &actionId, con
pk_result = polkit_authority_check_authorization_sync(d->pkAuthority,
subject.subject(),
- actionId.toAscii().data(),
+ actionId.toLatin1().data(),
NULL,
(PolkitCheckAuthorizationFlags)(int)flags,
NULL,
@@ -358,7 +358,7 @@ void Authority::checkAuthorization(const QString &actionId, const Subject &subje
polkit_authority_check_authorization(d->pkAuthority,
subject.subject(),
- actionId.toAscii().data(),
+ actionId.toLatin1().data(),
NULL,
(PolkitCheckAuthorizationFlags)(int)flags,
d->m_checkAuthorizationCancellable,
@@ -470,8 +470,8 @@ bool Authority::registerAuthenticationAgentSync(const Subject &subject, const QS
}
result = polkit_authority_register_authentication_agent_sync(d->pkAuthority,
- subject.subject(), locale.toAscii().data(),
- objectPath.toAscii().data(), NULL, &error);
+ subject.subject(), locale.toLatin1().data(),
+ objectPath.toLatin1().data(), NULL, &error);
if (error) {
d->setError(E_RegisterFailed, error->message);
@@ -495,8 +495,8 @@ void Authority::registerAuthenticationAgent(const Subject &subject, const QStrin
polkit_authority_register_authentication_agent(d->pkAuthority,
subject.subject(),
- locale.toAscii().data(),
- objectPath.toAscii().data(),
+ locale.toLatin1().data(),
+ objectPath.toLatin1().data(),
d->m_registerAuthenticationAgentCancellable,
d->registerAuthenticationAgentCallback,
this);
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
index 47ac74d..00d111d 100644
--- a/gui/CMakeLists.txt
+++ b/gui/CMakeLists.txt
@@ -6,6 +6,8 @@ set(polkit_qt_gui_SRCS
add_library(polkit-qt-gui-1 SHARED ${polkit_qt_gui_SRCS})
+qt5_use_modules(polkit-qt-gui-1 Core DBus Gui Widgets)
+
target_link_libraries(polkit-qt-gui-1
${POLKIT_LIBRARIES}
polkit-qt-core-1
diff --git a/polkit-qt-agent-1.pc.cmake b/polkit-qt-agent-1.pc.cmake
index 09f9323..dbf0ba4 100644
--- a/polkit-qt-agent-1.pc.cmake
+++ b/polkit-qt-agent-1.pc.cmake
@@ -6,6 +6,6 @@ includedir=@CMAKE_INSTALL_PREFIX@/include
Name: polkit-qt-agent-1
Description: Convenience library for using polkit Agent with a Qt-styled API
Version: @POLKITQT-1_VERSION_STRING@
-Requires: QtCore QtGui
+Requires: Qt5Core Qt5Gui
Libs: -L${libdir} -lpolkit-qt-agent-1
Cflags: -I${includedir}
diff --git a/polkit-qt-core-1.pc.cmake b/polkit-qt-core-1.pc.cmake
index f553b7b..d5f16b8 100644
--- a/polkit-qt-core-1.pc.cmake
+++ b/polkit-qt-core-1.pc.cmake
@@ -6,6 +6,6 @@ includedir=@CMAKE_INSTALL_PREFIX@/include
Name: polkit-qt-core-1
Description: Convenience library for using polkit with a Qt-styled API, non-GUI classes
Version: @POLKITQT-1_VERSION_STRING@
-Requires: QtCore
+Requires: Qt5Core
Libs: -L${libdir} -lpolkit-qt-core-1
Cflags: -I${includedir}
diff --git a/polkit-qt-gui-1.pc.cmake b/polkit-qt-gui-1.pc.cmake
index 83d4e9a..b211881 100644
--- a/polkit-qt-gui-1.pc.cmake
+++ b/polkit-qt-gui-1.pc.cmake
@@ -6,6 +6,6 @@ includedir=@CMAKE_INSTALL_PREFIX@/include
Name: polkit-qt-gui-1
Description: Convenience library for using polkit with a Qt-styled API, GUI classes
Version: @POLKITQT-1_VERSION_STRING@
-Requires: QtCore QtGui polkit-qt-core-1
+Requires: Qt5Core Qt5Gui Qt5Widgets polkit-qt-core-1
Libs: -L${libdir} -lpolkit-qt-gui-1
Cflags: -I${includedir}
--
1.8.5.3

@ -1,39 +0,0 @@
From 98014b844aa92e303be0565e51405548062e09de Mon Sep 17 00:00:00 2001
From: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Date: Sat, 5 Jan 2013 01:19:23 +0100
Subject: [PATCH 3/5] Check for Qt5DBus and Qt5Xml.
polkit-qt-gui-1 needs them.
---
CMakeLists.txt | 2 ++
polkit-qt-gui-1.pc.cmake | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c6a2e28..d4f6054 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,6 +15,8 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${ECM_MODULE_P
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0)
find_package(Qt5Core REQUIRED)
+find_package(Qt5DBus REQUIRED)
+find_package(Qt5Xml REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Polkit REQUIRED)
diff --git a/polkit-qt-gui-1.pc.cmake b/polkit-qt-gui-1.pc.cmake
index b211881..fe872e0 100644
--- a/polkit-qt-gui-1.pc.cmake
+++ b/polkit-qt-gui-1.pc.cmake
@@ -6,6 +6,6 @@ includedir=@CMAKE_INSTALL_PREFIX@/include
Name: polkit-qt-gui-1
Description: Convenience library for using polkit with a Qt-styled API, GUI classes
Version: @POLKITQT-1_VERSION_STRING@
-Requires: Qt5Core Qt5Gui Qt5Widgets polkit-qt-core-1
+Requires: Qt5Core Qt5DBus Qt5Xml Qt5Gui Qt5Widgets polkit-qt-core-1
Libs: -L${libdir} -lpolkit-qt-gui-1
Cflags: -I${includedir}
--
1.8.5.3

@ -1,23 +1,16 @@
Name: polkit-qt5-1
Version: 0.103.0
Release: 3%{?dist}
Release: 3.20130415gitbac771e%{?dist}
Summary: Qt5 bindings for PolicyKit
License: GPLv2+
URL: https://projects.kde.org/projects/kdesupport/polkit-qt-1
# git clone git://anongit.kde.org/polkit-qt-1
# cd polkit-qt-1
# git archive --prefix=polkit-qt5-1/ 3a5f879 |gzip -9 >polkit-qt5-1.tar.gz
# git archive --prefix=polkit-qt5-1/ bac771e |gzip -9 >polkit-qt5-1.tar.gz
Source0: %{name}.tar.gz
Source1: Doxyfile
# Hawaii-patches
Patch1: 0001-Include-moc-generated-files.patch
Patch2: 0002-Full-Qt-5-port.patch
Patch3: 0003-Check-for-Qt5DBus-and-Qt5Xml.patch
Patch4: 0001-Rename-polkit-qt-1-to-polkit-qt5-1.patch
Patch5: 0001-Fix-include-libdir-paths-when-they-re-absolute.patch
BuildRequires: automoc4
BuildRequires: cmake
BuildRequires: extra-cmake-modules
@ -38,13 +31,6 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%prep
%setup -q -n %{name}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
%{cmake} .
make %{?_smp_mflags}
@ -78,6 +64,9 @@ make install DESTDIR=%{buildroot}
%changelog
* Sun Jun 15 2014 Lubomir Rintel <lkundrak@v3.sk> - 0.103.0-3.20130415gitbac771e
- Update to upstream GIT snapshot, drop custom qt5 support patches
* Wed Jun 11 2014 Rex Dieter <rdieter@fedoraproject.org> - 0.103.0-3
- -devel: Provides: polkit-qt5-devel
- switch to pkgconfig-style build deps

@ -1 +1 @@
67c7ecad92604370a9d2f62dc4da547f polkit-qt5-1.tar.gz
35e28312d1e441eb35b5deabe51b3e90 polkit-qt5-1.tar.gz

Loading…
Cancel
Save