[SCM] KDE Base Workspace module packaging branch, kde4.6, updated. debian/4.6.5-3-2-g1b96a72

Pino Toscano pino at alioth.debian.org
Fri Dec 2 20:00:25 UTC 2011


The following commit has been merged in the kde4.6 branch:
commit 1b96a72b704c4f38a3ff46a73b1a6bd1db6d194f
Author: Pino Toscano <pino at debian.org>
Date:   Fri Dec 2 19:52:33 2011 +0100

    backport upstream patch to fix compatibility with newer gpsd (#648504)
---
 debian/changelog                                   |    3 +
 debian/patches/series                              |    1 +
 ...as-changed-and-for-GPSD_API_MAJOR_VERSION.patch |   80 ++++++++++++++++++++
 3 files changed, 84 insertions(+), 0 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 98f5b34..333dccf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
 kdebase-workspace (4:4.6.5-4) UNRELEASED; urgency=low
 
+  [ Pino Toscano ]
+  * Backport upstream patch to fix compatibility with newer gpsd.
+    (Closes: #648504)
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Fri, 02 Dec 2011 19:46:21 +0100
 
diff --git a/debian/patches/series b/debian/patches/series
index 561766c..1e17a43 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -19,3 +19,4 @@ initialize_variables_crashfix.diff
 enable_dlrestrcitions.diff
 kdm_vt_switching_on_kfreebsd.diff
 kwin_avoid_deep_vector_copies.diff
+upstream_gpsd-api-has-changed-and-for-GPSD_API_MAJOR_VERSION.patch
diff --git a/debian/patches/upstream_gpsd-api-has-changed-and-for-GPSD_API_MAJOR_VERSION.patch b/debian/patches/upstream_gpsd-api-has-changed-and-for-GPSD_API_MAJOR_VERSION.patch
new file mode 100644
index 0000000..c347496
--- /dev/null
+++ b/debian/patches/upstream_gpsd-api-has-changed-and-for-GPSD_API_MAJOR_VERSION.patch
@@ -0,0 +1,80 @@
+From a3009dd96e8519bcc205d75c29e18bbbb81fce03 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafael=20Fern=C3=A1ndez=20L=C3=B3pez?= <ereslibre at kde.org>
+Date: Thu, 28 Apr 2011 13:35:53 +0200
+Subject: [PATCH] gpsd api has changed and for GPSD_API_MAJOR_VERSION >=5
+ there are some calls that are slightly different. Make the
+ dataengine compile against this version and previous one by
+ adding conditional code.
+
+REVIEW: 101247
+---
+ .../dataengines/geolocation/location_gps.cpp       |   21 +++++++++++++++++--
+ .../generic/dataengines/geolocation/location_gps.h |    3 ++
+ 2 files changed, 21 insertions(+), 3 deletions(-)
+
+diff --git a/plasma/generic/dataengines/geolocation/location_gps.cpp b/plasma/generic/dataengines/geolocation/location_gps.cpp
+index c44cb30..9ed8f92 100644
+--- a/plasma/generic/dataengines/geolocation/location_gps.cpp
++++ b/plasma/generic/dataengines/geolocation/location_gps.cpp
+@@ -51,7 +51,11 @@ void Gpsd::run()
+     while (!m_abort) {
+         Plasma::DataEngine::Data d;
+ 
++#if GPSD_API_MAJOR_VERSION >= 5
++	if (gps_read(m_gpsdata) != -1) {
++#else
+         if (gps_poll(m_gpsdata) != -1) {
++#endif
+             //kDebug() << "poll ok";
+             if (m_gpsdata->online) {
+                 //kDebug() << "online";
+@@ -73,11 +77,19 @@ void Gpsd::run()
+ Gps::Gps(QObject* parent, const QVariantList& args)
+     : GeolocationProvider(parent, args),
+       m_gpsd(0)
++#if GPSD_API_MAJOR_VERSION >= 5
++    , m_gpsdata(0)
++#endif
+ {
+-    gps_data_t* gpsdata = gps_open("localhost", DEFAULT_GPSD_PORT);
+-    if (gpsdata) {
++#if GPSD_API_MAJOR_VERSION >= 5
++    m_gpsdata = new gps_data_t;
++    gps_open("localhost", DEFAULT_GPSD_PORT, m_gpsdata);
++#else
++    gps_data_t* m_gpsdata = gps_open("localhost", DEFAULT_GPSD_PORT);
++#endif
++    if (m_gpsdata) {
+         kDebug() << "gpsd found.";
+-        m_gpsd = new Gpsd(gpsdata);
++        m_gpsd = new Gpsd(m_gpsdata);
+         connect(m_gpsd, SIGNAL(dataReady(const Plasma::DataEngine::Data&)),
+                 this, SIGNAL(setData(const Plasma::DataEngine::Data&)));
+     } else {
+@@ -90,6 +102,9 @@ Gps::Gps(QObject* parent, const QVariantList& args)
+ Gps::~Gps()
+ {
+     delete m_gpsd;
++#if GPSD_API_MAJOR_VERSION >= 5
++    delete m_gpsdata;
++#endif
+ }
+ 
+ void Gps::update()
+diff --git a/plasma/generic/dataengines/geolocation/location_gps.h b/plasma/generic/dataengines/geolocation/location_gps.h
+index 506d1d1..dba65a2 100644
+--- a/plasma/generic/dataengines/geolocation/location_gps.h
++++ b/plasma/generic/dataengines/geolocation/location_gps.h
+@@ -58,6 +58,9 @@ public:
+ 
+ private:
+     Gpsd* m_gpsd;
++#if GPSD_API_MAJOR_VERSION >= 5
++    gps_data_t* m_gpsdata;
++#endif
+ };
+ 
+ #endif
+-- 
+1.7.7.3
+

-- 
KDE Base Workspace module packaging



More information about the pkg-kde-commits mailing list