From 6a6da7c1a017145ed97bd125d268026cf6111c2d Mon Sep 17 00:00:00 2001 From: Lukáš Tinkl Date: Jul 03 2013 13:09:10 +0000 Subject: fix FTBS, build against libnm-qt --- diff --git a/changeset_r688e2a2ce823d99e5ca1def1861fdf7591603cf2.diff b/changeset_r688e2a2ce823d99e5ca1def1861fdf7591603cf2.diff new file mode 100644 index 0000000..3c2f1f2 --- /dev/null +++ b/changeset_r688e2a2ce823d99e5ca1def1861fdf7591603cf2.diff @@ -0,0 +1,128 @@ +commit 688e2a2ce823d99e5ca1def1861fdf7591603cf2 +Author: Lamarque V. Souza +Date: Tue Jul 2 00:26:02 2013 -0300 + + Add missing files from last commit. + +diff --git a/contourd/location/network-engines/networkmanager/NetworkManagerQtNotifier.cpp b/contourd/location/network-engines/networkmanager/NetworkManagerQtNotifier.cpp +new file mode 100644 +index 0000000..bccbaf1 +--- /dev/null ++++ b/contourd/location/network-engines/networkmanager/NetworkManagerQtNotifier.cpp +@@ -0,0 +1,66 @@ ++/* ++ * Copyright (C) 2013 Lamarque V. Souza ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2, ++ * or (at your option) any later version, as published by the Free ++ * Software Foundation ++ * ++ * 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 "NetworkManagerQtNotifier.h" ++ ++#include ++#include ++#include ++ ++#include ++ ++#include ++ ++REGISTER_NETWORK_NOTIFIER(NetworkManagerQtNotifier) ++ ++class NetworkManagerQtNotifier::Private { ++public: ++ QHash devices; ++}; ++ ++ ++NetworkManagerQtNotifier::NetworkManagerQtNotifier(QObject *parent) ++ : NetworkNotifier(parent), d(new Private()) ++{ ++} ++ ++void NetworkManagerQtNotifier::init() ++{ ++ kDebug() << "NetworkManagerQt"; ++ ++ foreach (const NetworkManager::Device::Ptr &device, NetworkManager::networkInterfaces()) { ++ // Check whether it is a wifi device. ++ if (device->type() != NetworkManager::Device::Wifi) { ++ continue; ++ } ++ ++ NetworkManager::WirelessDevice::Ptr wifiDevice = device.objectCast(); ++ ++ d->devices[device->interfaceName()] = wifiDevice; ++ ++ connect(wifiDevice.data(), SIGNAL(activeAccessPointChanged(QString)), ++ this, SLOT(setActiveAccessPoint(QString))); ++ } ++} ++ ++NetworkManagerQtNotifier::~NetworkManagerQtNotifier() ++{ ++ delete d; ++} ++ +diff --git a/contourd/location/network-engines/networkmanager/NetworkManagerQtNotifier.h b/contourd/location/network-engines/networkmanager/NetworkManagerQtNotifier.h +new file mode 100644 +index 0000000..765d66c +--- /dev/null ++++ b/contourd/location/network-engines/networkmanager/NetworkManagerQtNotifier.h +@@ -0,0 +1,44 @@ ++/* ++ * Copyright (C) 2013 Lamarque V. Souza ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2, ++ * or (at your option) any later version, as published by the Free ++ * Software Foundation ++ * ++ * 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. ++ */ ++ ++#ifndef NETWORK_MANAGER_QT_NOTIFIER_H ++#define NETWORK_MANAGER_QT_NOTIFIER_H ++ ++#include "../NetworkNotifier.h" ++ ++/** ++ * NetworkManagerQtNotifier ++ */ ++class NetworkManagerQtNotifier: public NetworkNotifier { ++ Q_OBJECT ++ ++public: ++ NetworkManagerQtNotifier(QObject *parent = 0); ++ virtual ~NetworkManagerQtNotifier(); ++ ++protected: ++ void init(); ++ ++private: ++ class Private; ++ Private * const d; ++}; ++ ++#endif // NETWORK_MANAGER_QT_NOTIFIER_H ++ diff --git a/changeset_rd5306e452fd64f8bcb2dab6d5cef770584131486.diff b/changeset_rd5306e452fd64f8bcb2dab6d5cef770584131486.diff new file mode 100644 index 0000000..ef5eb46 --- /dev/null +++ b/changeset_rd5306e452fd64f8bcb2dab6d5cef770584131486.diff @@ -0,0 +1,70 @@ +commit d5306e452fd64f8bcb2dab6d5cef770584131486 +Author: Lamarque V. Souza +Date: Mon Jul 1 22:55:58 2013 -0300 + + Fix build against kde-workspace > 4.10.50. + +diff --git a/contourd/CMakeLists.txt b/contourd/CMakeLists.txt +index a9fec47..bea1dd6 100644 +--- a/contourd/CMakeLists.txt ++++ b/contourd/CMakeLists.txt +@@ -95,15 +95,41 @@ soprano_add_ontology(recommendationmanager_SRC + ######################################################################## + set(ADDITIONAL_LINK_LIBRARIES) + +-set(recommendationmanager_SRC +- ${recommendationmanager_SRC} +- location/network-engines/solid/SolidNetworkNotifier.cpp +- ) +- +-set(ADDITIONAL_LINK_LIBRARIES +- ${ADDITIONAL_LINK_LIBRARIES} +- ${KDE4_SOLID_LIBS} +- ) ++if (${KDE_VERSION} VERSION_GREATER 4.10.50) ++ find_package(NetworkManager) ++ ++ pkg_check_modules(NETWORKMANAGERQT REQUIRED NetworkManagerQt) ++ if (NOT NETWORKMANAGERQT_FOUND) ++ message(FATAL_ERROR "ERROR: NetworkManagerQt not found. http://projects.kde.org/search?q=networkmanager&scope=all&all_words=1&projects=1&submit=Submit") ++ endif (NOT NETWORKMANAGERQT_FOUND) ++ ++ include_directories( ++ ${NETWORKMANAGER_INCLUDE_DIRS} ++ ${NETWORKMANAGERQT_INCLUDE_DIRS} ++ ) ++ ++ set(ADDITIONAL_LINK_LIBRARIES ++ ${ADDITIONAL_LINK_LIBRARIES} ++ NetworkManagerQt ++ ) ++ ++ set(recommendationmanager_SRC ++ ${recommendationmanager_SRC} ++ location/network-engines/networkmanager/NetworkManagerQtNotifier.cpp ++ ) ++else() ++ set(ADDITIONAL_LINK_LIBRARIES ++ ${ADDITIONAL_LINK_LIBRARIES} ++ ${KDE4_SOLID_LIBS} ++ solidcontrol ++ solidcontrolifaces ++ ) ++ ++ set(recommendationmanager_SRC ++ ${recommendationmanager_SRC} ++ location/network-engines/solid/SolidNetworkNotifier.cpp ++ ) ++endif() + + ######################################################################## + +@@ -122,8 +148,6 @@ target_link_libraries( + ${NEPOMUK_QUERY_LIBRARIES} + ${ADDITIONAL_LINK_LIBRARIES} + kworkspace +- solidcontrol +- solidcontrolifaces + # QtLocation + # QtContacts + # QtSensors diff --git a/contour.spec b/contour.spec index 601295a..8ae2b04 100644 --- a/contour.spec +++ b/contour.spec @@ -1,6 +1,6 @@ Name: contour Version: 0.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A context sensitive user interface for Plasma Active License: GPLv2+ @@ -8,6 +8,8 @@ URL: http://community.kde.org/Plasma/Active/Contour Source0: http://download.kde.org/stable/active/3.0/src/%{name}-%{version}.tar.xz Patch0: qtmobility.diff Patch1: contour-0.1.1-find-qtmobility.patch +Patch100: changeset_rd5306e452fd64f8bcb2dab6d5cef770584131486.diff +Patch101: changeset_r688e2a2ce823d99e5ca1def1861fdf7591603cf2.diff BuildRequires: kdelibs4-devel BuildRequires: kde-runtime-devel @@ -17,6 +19,7 @@ BuildRequires: pkgconfig(soprano) BuildRequires: pkgconfig(shared-desktop-ontologies) BuildRequires: kde-runtime-devel BuildRequires: kde-workspace-devel +BuildRequires: libnm-qt-devel Requires: kde-runtime%{?_kde4_version: >= %{_kde4_version}} @@ -38,6 +41,10 @@ Contour is part of Plasma Active project. %patch0 -p1 %patch1 -p1 -b .find-qtmobility +# Upstream patches +%patch100 -p1 -b .makefile +%patch101 -p1 -b .notifier + %build mkdir -p %{_target_platform} pushd %{_target_platform} @@ -65,6 +72,9 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %changelog +* Wed Jun 03 2013 Lukáš Tinkl - 0.3-3 +- fix FTBS, build against libnm-qt + * Wed Feb 13 2013 Fedora Release Engineering - 0.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild