[arch-commits] Commit in merkaartor/trunk (PKGBUILD gpsd-3.20.patch)
Balló György
bgyorgy at archlinux.org
Mon Mar 9 02:27:57 UTC 2020
Date: Monday, March 9, 2020 @ 02:27:57
Author: bgyorgy
Revision: 592733
upgpkg: merkaartor 0.18.4-2: Fix build with gpsd 3.20
Added:
merkaartor/trunk/gpsd-3.20.patch
Modified:
merkaartor/trunk/PKGBUILD
-----------------+
PKGBUILD | 14 +++++++++++---
gpsd-3.20.patch | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-03-09 02:13:00 UTC (rev 592732)
+++ PKGBUILD 2020-03-09 02:27:57 UTC (rev 592733)
@@ -6,7 +6,7 @@
pkgname=merkaartor
pkgver=0.18.4
-pkgrel=1
+pkgrel=2
pkgdesc='OpenStreetMap editor'
arch=('x86_64')
url='http://merkaartor.be/'
@@ -14,15 +14,23 @@
depends=('exiv2' 'gdal' 'gpsd' 'hicolor-icon-theme' 'qt5-svg')
makedepends=('qt5-tools')
source=("$pkgname-$pkgver.tar.gz::https://github.com/openstreetmap/$pkgname/archive/$pkgver.tar.gz"
+ gpsd-3.20.patch
merkaartor.appdata.xml)
sha256sums=('16e790507a5bb54e4b3c09ea063ebb095a4b014ce8ba937b771706d4c940976a'
+ '6a19357c21e895e48775d0017d953e1d3b53b2cb795861d08984da3a4788005d'
'9602378a7ee703653770a71062598e081d4d18d3cfb628e982a592f41b6fe33d')
+prepare() {
+ cd $pkgname-$pkgver
+ # Fix build with gpsd 3.20
+ # https://github.com/openstreetmap/merkaartor/issues/204
+ patch -Np1 -i ../gpsd-3.20.patch
+}
+
build() {
cd $pkgname-$pkgver
lrelease src/src.pro
- qmake Merkaartor.pro PREFIX=/usr GPSDLIB=1 GEOIMAGE=1 USEWEBENGINE=0 \
- QMAKE_CXXFLAGS="$CXXFLAGS -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1"
+ qmake Merkaartor.pro PREFIX=/usr GPSDLIB=1 GEOIMAGE=1
make
}
Added: gpsd-3.20.patch
===================================================================
--- gpsd-3.20.patch (rev 0)
+++ gpsd-3.20.patch 2020-03-09 02:27:57 UTC (rev 592733)
@@ -0,0 +1,52 @@
+From 13b358fa7899bb34e277b32a4c0d92833050f2c6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ladislav=20L=C3=A1ska?= <krakonos at krakonos.org>
+Date: Tue, 14 Jan 2020 09:20:00 +0100
+Subject: [PATCH 1/2] Added a condition to use the new timespec_t on gpsd APIs
+ >= 9
+
+---
+ src/GPS/qgpsdevice.cpp | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/GPS/qgpsdevice.cpp b/src/GPS/qgpsdevice.cpp
+index f8d1a0cf..cb727d2d 100644
+--- a/src/GPS/qgpsdevice.cpp
++++ b/src/GPS/qgpsdevice.cpp
+@@ -1052,8 +1052,13 @@ void QGPSDDevice::onDataAvailable()
+ qreal Heading = gpsdata->fix.track;
+ if (!__isnan(Heading))
+ setHeading(Heading);
+- if (gpsdata->fix.time)
+- cur_datetime = QDateTime::fromTime_t(gpsdata->fix.time);
++#if GPSD_API_MAJOR_VERSION >= 9
++#define FIX_TIME fix.time.tv_sec
++#else
++#define FIX_TIME fix.time
++#endif
++ if (gpsdata->FIX_TIME)
++ cur_datetime = QDateTime::fromTime_t(gpsdata->FIX_TIME);
+ emit updatePosition(gpsdata->fix.latitude,
+ gpsdata->fix.longitude,
+ cur_datetime,
+
+From 1b76301ed7719f9ec137fd77f69b5702d8be94ab Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ladislav=20L=C3=A1ska?= <krakonos at krakonos.org>
+Date: Tue, 14 Jan 2020 10:34:09 +0100
+Subject: [PATCH 2/2] Added undef to FIX_TIME after end of its scope.
+
+---
+ src/GPS/qgpsdevice.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/GPS/qgpsdevice.cpp b/src/GPS/qgpsdevice.cpp
+index cb727d2d..93605047 100644
+--- a/src/GPS/qgpsdevice.cpp
++++ b/src/GPS/qgpsdevice.cpp
+@@ -1059,6 +1059,7 @@ void QGPSDDevice::onDataAvailable()
+ #endif
+ if (gpsdata->FIX_TIME)
+ cur_datetime = QDateTime::fromTime_t(gpsdata->FIX_TIME);
++#undef FIX_TIME
+ emit updatePosition(gpsdata->fix.latitude,
+ gpsdata->fix.longitude,
+ cur_datetime,
More information about the arch-commits
mailing list