[polkit-qt] 0.103.0-7

Rex Dieter rdieter at fedoraproject.org
Mon Mar 11 12:31:43 UTC 2013


commit 91de7b1ac0a8061741208a58e2a48d21365e63c8
Author: Rex Dieter <rdieter at math.unl.edu>
Date:   Mon Mar 11 07:31:25 2013 -0500

    0.103.0-7
    
    - pull in some upstream patches
    - .spec cleanup

 ...FindGObject.cmake-with-the-one-in-kdelibs.patch |  132 ++++++++++++++++++++
 0002-Normalize-connect-using-Qt-s-normalize.patch  |  116 +++++++++++++++++
 polkit-qt.spec                                     |   24 ++--
 3 files changed, 260 insertions(+), 12 deletions(-)
---
diff --git a/0001-Sync-FindGObject.cmake-with-the-one-in-kdelibs.patch b/0001-Sync-FindGObject.cmake-with-the-one-in-kdelibs.patch
new file mode 100644
index 0000000..9a28684
--- /dev/null
+++ b/0001-Sync-FindGObject.cmake-with-the-one-in-kdelibs.patch
@@ -0,0 +1,132 @@
+From 56883bddb1d1cf784a0c4e81da6232cddee62562 Mon Sep 17 00:00:00 2001
+From: Raphael Kubo da Costa <rakuco at FreeBSD.org>
+Date: Fri, 30 Dec 2011 21:14:36 -0200
+Subject: [PATCH 1/2] Sync FindGObject.cmake with the one in kdelibs.
+
+Import kdelibs' FindGObject.cmake at commit
+e02cae5112ef7ec37d6af3553399a136726b5288.
+
+Highlights:
+ * Remove unnecessary WIN32 check.
+ * Use the pkg-config paths as HINTS, not PATHS.
+ * Use FindPackageHandleStandardArgs instead of duplicating its
+   functionality.
+
+As a consequence, GOBJECT_LIBRARIES uses full library paths on all
+platforms, which should fix linking when gobject is in a non-standard
+path.
+
+Reviewed-by: Dario Freddi
+---
+ cmake/modules/FindGObject.cmake | 85 +++++++++++++++--------------------------
+ 1 file changed, 31 insertions(+), 54 deletions(-)
+
+diff --git a/cmake/modules/FindGObject.cmake b/cmake/modules/FindGObject.cmake
+index 79a2127..af0c9f7 100644
+--- a/cmake/modules/FindGObject.cmake
++++ b/cmake/modules/FindGObject.cmake
+@@ -6,70 +6,47 @@
+ #  GOBJECT_LIBRARIES - the libraries needed to use GObject
+ #  GOBJECT_DEFINITIONS - Compiler switches required for using GObject
+ 
+-# Copyright (c) 2008 Helio Chissini de Castro, <helio at kde.org>
+-#  (c)2006, Tim Beaulen <tbscope at gmail.com>
+-
+-
+-IF (GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES)
+-   # in cache already
+-   SET(GObject_FIND_QUIETLY TRUE)
+-ELSE (GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES)
+-   SET(GObject_FIND_QUIETLY FALSE)
+-ENDIF (GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES)
+-
+-IF (NOT WIN32)
+-   FIND_PACKAGE(PkgConfig)
+-   # use pkg-config to get the directories and then use these values
+-   # in the FIND_PATH() and FIND_LIBRARY() calls
+-   PKG_CHECK_MODULES(PKG_GOBJECT2 gobject-2.0)
+-   SET(GOBJECT_DEFINITIONS ${PKG_GOBJECT2_CFLAGS})
+-ENDIF (NOT WIN32)
+-
+-FIND_PATH(GOBJECT_INCLUDE_DIR gobject/gobject.h
+-   PATHS
+-   ${PKG_GOBJECT2_INCLUDE_DIRS}
+-   /usr/include/glib-2.0/
+-   PATH_SUFFIXES glib-2.0
++# Copyright (c) 2011, Raphael Kubo da Costa <kubito at gmail.com>
++# Copyright (c) 2006, Tim Beaulen <tbscope at gmail.com>
++#
++# Redistribution and use is allowed according to the terms of the BSD license.
++# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
++
++FIND_PACKAGE(PkgConfig)
++PKG_CHECK_MODULES(PC_GOBJECT gobject-2.0)
++SET(GOBJECT_DEFINITIONS ${PC_GOBJECT_CFLAGS_OTHER})
++
++FIND_PATH(GOBJECT_INCLUDE_DIR gobject.h
++   HINTS
++   ${PC_GOBJECT_INCLUDEDIR}
++   ${PC_GOBJECT_INCLUDE_DIRS}
++   PATH_SUFFIXES glib-2.0/gobject/
+    )
+ 
+ FIND_LIBRARY(_GObjectLibs NAMES gobject-2.0
+-   PATHS
+-   ${PKG_GOBJECT2_LIBRARY_DIRS}
++   HINTS
++   ${PC_GOBJECT_LIBDIR}
++   ${PC_GOBJECT_LIBRARY_DIRS}
+    )
+ FIND_LIBRARY(_GModuleLibs NAMES gmodule-2.0
+-   PATHS
+-   ${PKG_GOBJECT2_LIBRARY_DIRS}
++   HINTS
++   ${PC_GOBJECT_LIBDIR}
++   ${PC_GOBJECT_LIBRARY_DIRS}
+    )
+ FIND_LIBRARY(_GThreadLibs NAMES gthread-2.0
+-   PATHS
+-   ${PKG_GOBJECT2_LIBRARY_DIRS}
++   HINTS
++   ${PC_GOBJECT_LIBDIR}
++   ${PC_GOBJECT_LIBRARY_DIRS}
+    )
+ FIND_LIBRARY(_GLibs NAMES glib-2.0
+-   PATHS
+-   ${PKG_GOBJECT2_LIBRARY_DIRS}
++   HINTS
++   ${PC_GOBJECT_LIBDIR}
++   ${PC_GOBJECT_LIBRARY_DIRS}
+    )
+ 
+-IF (WIN32)
+-SET (GOBJECT_LIBRARIES ${_GObjectLibs} ${_GModuleLibs} ${_GThreadLibs} ${_GLibs})
+-ELSE (WIN32)
+-SET (GOBJECT_LIBRARIES ${PKG_GOBJECT2_LIBRARIES})
+-ENDIF (WIN32)
+-
+-IF (GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES)
+-   SET(GOBJECT_FOUND TRUE)
+-ELSE (GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES)
+-   SET(GOBJECT_FOUND FALSE)
+-ENDIF (GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES)
++SET( GOBJECT_LIBRARIES ${_GObjectLibs} ${_GModuleLibs} ${_GThreadLibs} ${_GLibs} )
+ 
+-IF (GOBJECT_FOUND)
+-   IF (NOT GObject_FIND_QUIETLY)
+-      MESSAGE(STATUS "Found GObject libraries: ${GOBJECT_LIBRARIES}")
+-      MESSAGE(STATUS "Found GObject includes : ${GOBJECT_INCLUDE_DIR}")
+-   ENDIF (NOT GObject_FIND_QUIETLY)
+-ELSE (GOBJECT_FOUND)
+-    IF (GObject_FIND_REQUIRED)
+-      MESSAGE(STATUS "Could NOT find GObject")
+-    ENDIF(GObject_FIND_REQUIRED)
+-ENDIF (GOBJECT_FOUND)
++INCLUDE(FindPackageHandleStandardArgs)
++FIND_PACKAGE_HANDLE_STANDARD_ARGS(GOBJECT DEFAULT_MSG GOBJECT_LIBRARIES GOBJECT_INCLUDE_DIR)
+ 
+-MARK_AS_ADVANCED(GOBJECT_INCLUDE_DIR GOBJECT_LIBRARIES)
++MARK_AS_ADVANCED(GOBJECT_INCLUDE_DIR _GObjectLibs _GModuleLibs _GThreadLibs _GLibs)
+-- 
+1.8.1.4
+
diff --git a/0002-Normalize-connect-using-Qt-s-normalize.patch b/0002-Normalize-connect-using-Qt-s-normalize.patch
new file mode 100644
index 0000000..0c8a866
--- /dev/null
+++ b/0002-Normalize-connect-using-Qt-s-normalize.patch
@@ -0,0 +1,116 @@
+From 5d3fdc79b2b47f21f09351e16f677d55c1907f13 Mon Sep 17 00:00:00 2001
+From: Dario Freddi <drf at kde.org>
+Date: Mon, 30 Jan 2012 02:44:08 +0100
+Subject: [PATCH 2/2] Normalize connect() using Qt's normalize
+
+---
+ core/polkitqt1-authority.cpp |  2 +-
+ examples/PkExample.cpp       | 16 ++++++++--------
+ examples/agent/klistener.cpp |  2 +-
+ 3 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/core/polkitqt1-authority.cpp b/core/polkitqt1-authority.cpp
+index 0951d97..f134ca6 100644
+--- a/core/polkitqt1-authority.cpp
++++ b/core/polkitqt1-authority.cpp
+@@ -256,7 +256,7 @@ void Authority::Private::dbusSignalAdd(const QString &service, const QString &pa
+ {
+     // FIXME: This code seems to be nonfunctional - it needs to be fixed somewhere (is it Qt BUG?)
+     QDBusConnection::systemBus().connect(service, path, interface, name,
+-                                         q, SLOT(dbusFilter(const QDBusMessage &)));
++                                         q, SLOT(dbusFilter(QDBusMessage)));
+ }
+ 
+ void Authority::Private::dbusFilter(const QDBusMessage &message)
+diff --git a/examples/PkExample.cpp b/examples/PkExample.cpp
+index 2168a91..e7e1ff2 100644
+--- a/examples/PkExample.cpp
++++ b/examples/PkExample.cpp
+@@ -59,7 +59,7 @@ PkExample::PkExample(QMainWindow *parent)
+     // This signal was propagated from the QAbstractButton just for
+     // convenience in this case we don't have any benefit but the code
+     // look cleaner
+-    connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
++    connect(bt, SIGNAL(clicked(QAbstractButton*,bool)), bt, SLOT(activate()));
+     // this is the Action activated signal, it is always emmited whenever
+     // someone click and get authorized to do the action
+     connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
+@@ -70,7 +70,7 @@ PkExample::PkExample(QMainWindow *parent)
+     menuActions->addAction(qobject_cast<Action *>(bt));
+     toolBar->addAction(qobject_cast<Action *>(bt));
+     connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
+-    connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
++    connect(bt, SIGNAL(clicked(QAbstractButton*,bool)), bt, SLOT(activate()));
+     connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
+ 
+     bt = new ActionButton(bleedPB, "org.qt.policykit.examples.bleed", this);
+@@ -79,7 +79,7 @@ PkExample::PkExample(QMainWindow *parent)
+     menuActions->addAction(qobject_cast<Action *>(bt));
+     toolBar->addAction(qobject_cast<Action *>(bt));
+     connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
+-    connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
++    connect(bt, SIGNAL(clicked(QAbstractButton*,bool)), bt, SLOT(activate()));
+     connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
+ 
+     // This action is more customized
+@@ -103,7 +103,7 @@ PkExample::PkExample(QMainWindow *parent)
+     menuActions->addAction(qobject_cast<Action *>(bt));
+     toolBar->addAction(qobject_cast<Action *>(bt));
+     connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
+-    connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
++    connect(bt, SIGNAL(clicked(QAbstractButton*,bool)), bt, SLOT(activate()));
+     connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
+ 
+     bt = new ActionButton(deletePB, "org.qt.policykit.examples.delete", this);
+@@ -114,7 +114,7 @@ PkExample::PkExample(QMainWindow *parent)
+     menuActions->addAction(qobject_cast<Action *>(bt));
+     toolBar->addAction(qobject_cast<Action *>(bt));
+     connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
+-    connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
++    connect(bt, SIGNAL(clicked(QAbstractButton*,bool)), bt, SLOT(activate()));
+     connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
+ 
+     bt = new ActionButton(listenPB, "org.qt.policykit.examples.listen", this);
+@@ -125,7 +125,7 @@ PkExample::PkExample(QMainWindow *parent)
+     menuActions->addAction(qobject_cast<Action *>(bt));
+     toolBar->addAction(qobject_cast<Action *>(bt));
+     connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
+-    connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
++    connect(bt, SIGNAL(clicked(QAbstractButton*,bool)), bt, SLOT(activate()));
+     connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
+ 
+     bt = new ActionButton(setPB, "org.qt.policykit.examples.set", this);
+@@ -136,7 +136,7 @@ PkExample::PkExample(QMainWindow *parent)
+     menuActions->addAction(qobject_cast<Action *>(bt));
+     toolBar->addAction(qobject_cast<Action *>(bt));
+     connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
+-    connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
++    connect(bt, SIGNAL(clicked(QAbstractButton*,bool)), bt, SLOT(activate()));
+     connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
+ 
+     bt = new ActionButton(shoutPB, "org.qt.policykit.examples.shout", this);
+@@ -149,7 +149,7 @@ PkExample::PkExample(QMainWindow *parent)
+     menuActions->addAction(qobject_cast<Action *>(bt));
+     toolBar->addAction(qobject_cast<Action *>(bt));
+     connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
+-    connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
++    connect(bt, SIGNAL(clicked(QAbstractButton*,bool)), bt, SLOT(activate()));
+     connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
+ 
+     // test configChanged
+diff --git a/examples/agent/klistener.cpp b/examples/agent/klistener.cpp
+index 32bfb98..e229899 100644
+--- a/examples/agent/klistener.cpp
++++ b/examples/agent/klistener.cpp
+@@ -51,7 +51,7 @@ void KListener::initiateAuthentication(const QString &actionId,
+         qDebug() << identity.toString();
+         Session *session;
+         session = new Session(identity, cookie, result);
+-        connect(session, SIGNAL(request(QString, bool)), this, SLOT(request(QString, bool)));
++        connect(session, SIGNAL(request(QString,bool)), this, SLOT(request(QString,bool)));
+         connect(session, SIGNAL(completed(bool)), this, SLOT(completed(bool)));
+         connect(session, SIGNAL(showError(QString)), this, SLOT(showError(QString)));
+         connect(session, SIGNAL(showInfo(QString)), this, SLOT(showInfo(QString)));
+-- 
+1.8.1.4
+
diff --git a/polkit-qt.spec b/polkit-qt.spec
index fcf8105..0f1f0b1 100644
--- a/polkit-qt.spec
+++ b/polkit-qt.spec
@@ -1,18 +1,18 @@
 Name:            polkit-qt
 Version:         0.103.0
-Release:         6%{?dist}
+Release:         7%{?dist}
 Summary:         Qt bindings for PolicyKit
 
-Group:           System Environment/Libraries
 License:         GPLv2+
 URL:             https://projects.kde.org/projects/kdesupport/polkit-qt-1 
 Source0:         http://download.kde.org/stable/apps/KDE4.x/admin/polkit-qt-1-%{version}.tar.bz2 
 Source1:         Doxyfile
-BuildRoot:       %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Patch0:          polkit-qt-0.95.1-install-cmake-find.patch
 
 ## upstream patches
+Patch101: 0001-Sync-FindGObject.cmake-with-the-one-in-kdelibs.patch
+Patch102: 0002-Normalize-connect-using-Qt-s-normalize.patch
 
 Source10: macros.polkit-qt
 
@@ -53,6 +53,9 @@ BuildArch: noarch
 # module installation
 %patch0 -p1 -b .install-cmake-find
 
+%patch101 -p1 -b .0001
+%patch102 -p1 -b .0002
+
 
 %build
 mkdir -p %{_target_platform}
@@ -68,31 +71,25 @@ make %{?_smp_mflags} -C %{_target_platform}
 doxygen %{SOURCE1}
 
 # Remove installdox file - it is not necessary here
-rm -f html/installdox
+rm -fv html/installdox
 
 
 %install
-rm -rf %{buildroot}
 make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
-install -p -m644 -D %{SOURCE10} %{buildroot}%{_sysconfdir}/rpm/macros.polkit-qt
-
 
-%clean
-rm -rf %{buildroot}
+install -p -m644 -D %{SOURCE10} %{buildroot}%{_sysconfdir}/rpm/macros.polkit-qt
 
 
 %post -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
 
 %files
-%defattr(-,root,root,-)
 %doc AUTHORS COPYING README
 %{_libdir}/libpolkit-qt-core-1.so.1*
 %{_libdir}/libpolkit-qt-gui-1.so.1*
 %{_libdir}/libpolkit-qt-agent-1.so.1*
 
 %files devel
-%defattr(-,root,root,-)
 %{_sysconfdir}/rpm/macros.polkit-qt
 %{_includedir}/polkit-qt-1/
 %{_libdir}/libpolkit-qt-core-1.so
@@ -106,11 +103,14 @@ rm -rf %{buildroot}
 %{_datadir}/cmake/Modules/*.cmake
 
 %files doc
-%defattr(-,root,root,-)
 %doc html/*
 
 
 %changelog
+* Mon Mar 11 2013 Rex Dieter <rdieter at fedoraproject.org> - 0.103.0-7
+- pull in some upstream patches
+- .spec cleanup
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.103.0-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 


More information about the scm-commits mailing list