summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-Olivier Barre2021-02-15 15:41:30 +0100
committerMarc-Olivier Barre2021-02-15 15:41:30 +0100
commitdb879431c5d9c9fd0357328495e9c7b1bd9fd03c (patch)
treefae7cd1683992d699c142d243e13d22f0c89834f
parent1269292b2350a20e2f93aed86b9cb902a0cca9ac (diff)
downloadaur-db879431c5d9c9fd0357328495e9c7b1bd9fd03c.tar.gz
Apply patch for upstream PR #325
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD5
-rw-r--r--upstream-pr-325.patch47
3 files changed, 52 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8b7d52f8e5cb..6a5be084d541 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -10,7 +10,9 @@ pkgbase = libindi-gpsd
depends = libindi=1.8.8
depends = gpsd
source = https://github.com/indilib/indi-3rdparty/archive/v1.8.8.tar.gz
+ source = upstream-pr-325.patch
sha256sums = 0a50aff683e4e76d12b7558076734ace3c4340d93fcab2c25c8a7c0bc3d53816
+ sha256sums = 38a4f00ba07cefb42093df38075d76bbdf2b6139f0e5618bd786788b6eb21894
pkgname = libindi-gpsd
diff --git a/PKGBUILD b/PKGBUILD
index 27ba066cdc1c..249805a3684e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,12 +9,13 @@ license=(GPL2)
arch=(i686 x86_64)
depends=(libindi=${pkgver} gpsd)
makedepends=(cmake)
-source=("https://github.com/indilib/indi-3rdparty/archive/v${pkgver}.tar.gz")
-sha256sums=("0a50aff683e4e76d12b7558076734ace3c4340d93fcab2c25c8a7c0bc3d53816")
+source=("https://github.com/indilib/indi-3rdparty/archive/v${pkgver}.tar.gz" "upstream-pr-325.patch")
+sha256sums=("0a50aff683e4e76d12b7558076734ace3c4340d93fcab2c25c8a7c0bc3d53816" "38a4f00ba07cefb42093df38075d76bbdf2b6139f0e5618bd786788b6eb21894")
prepare() {
mkdir -p build
cd indi-3rdparty-${pkgver}
+ patch -Np1 < ${srcdir}/upstream-pr-325.patch
#set all to off by default
sed -i -e '/option(WITH_.*On/s/ On/ Off/' CMakeLists.txt
diff --git a/upstream-pr-325.patch b/upstream-pr-325.patch
new file mode 100644
index 000000000000..6d6f42622342
--- /dev/null
+++ b/upstream-pr-325.patch
@@ -0,0 +1,47 @@
+diff --git a/indi-gpsd/gps_driver.cpp b/indi-gpsd/gps_driver.cpp
+index 66982e53..737ca0ac 100644
+--- a/indi-gpsd/gps_driver.cpp
++++ b/indi-gpsd/gps_driver.cpp
+@@ -279,10 +279,14 @@ IPState GPSD::updateGPS()
+ break;
+ }
+
+-#if GPSD_API_MAJOR_VERSION >= 10
+- if (gpsData->fix.status == STATUS_NO_FIX)
++#if GPSD_API_MAJOR_VERSION >= 11
++ // From gpsd v3.22 STATUS_NO_FIX may also mean unknown fix state, can
++ // only tell from the mode value
++ if (gpsData->fix.mode < MODE_2D)
++#elif GPSD_API_MAJOR_VERSION >= 10
++ if (gpsData->fix.status == STATUS_NO_FIX || gpsData->fix.mode < MODE_2D)
+ #else
+- if (gpsData->status == STATUS_NO_FIX)
++ if (gpsData->status == STATUS_NO_FIX || gpsData->fix.mode < MODE_2D )
+ #endif
+ {
+ // We have no fix and there is no point in further processing.
+@@ -295,24 +299,6 @@ IPState GPSD::updateGPS()
+ IDSetText(&GPSstatusTP, nullptr);
+ return IPS_BUSY;
+ }
+- else
+- {
+- // We may have a fix. Check if fix structure contains proper fix.
+- // We require at least 2D fix - the altitude is not so crucial (?)
+- if (gpsData->fix.mode < MODE_2D)
+- {
+- // The position is not realy measured yet - we have no valid data
+- // Keep looking
+- IUSaveText(&GPSstatusT[0], "NO FIX");
+- if (GPSstatusTP.s == IPS_OK)
+- {
+- LOG_WARN("GPS fix lost.");
+- }
+- GPSstatusTP.s = IPS_BUSY;
+- IDSetText(&GPSstatusTP, nullptr);
+- return IPS_BUSY;
+- }
+- }
+
+ // detect gps fix showing up after not being avaliable
+ if (GPSstatusTP.s != IPS_OK)