me
/
guix
Archived
1
0
Fork 0

gnu: gpsbabel: Enable tests.

* gnu/packages/patches/gps.scm (gpsbabel)[source]: Add patch.
[arguments]: Enable tests.
* gnu/packages/patches/gpsbabel-fix-i686-test.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
master
Efraim Flashner 2021-01-06 10:54:46 +02:00
parent d5ecfb4918
commit 3b141f2eb9
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
3 changed files with 49 additions and 7 deletions

View File

@ -1114,6 +1114,7 @@ dist_patch_DATA = \
%D%/packages/patches/go-skip-gc-test.patch \ %D%/packages/patches/go-skip-gc-test.patch \
%D%/packages/patches/gpm-glibc-2.26.patch \ %D%/packages/patches/gpm-glibc-2.26.patch \
%D%/packages/patches/gpodder-disable-updater.patch \ %D%/packages/patches/gpodder-disable-updater.patch \
%D%/packages/patches/gpsbabel-fix-i686-test.patch \
%D%/packages/patches/grantlee-merge-theme-dirs.patch \ %D%/packages/patches/grantlee-merge-theme-dirs.patch \
%D%/packages/patches/grep-timing-sensitive-test.patch \ %D%/packages/patches/grep-timing-sensitive-test.patch \
%D%/packages/patches/grocsvs-dont-use-admiral.patch \ %D%/packages/patches/grocsvs-dont-use-admiral.patch \

View File

@ -65,6 +65,7 @@
(sha256 (sha256
(base32 (base32
"010g0vd2f5knpq5p7qfnl31kv3r8m5sjdsafcinbj5gh02j2nzpy")) "010g0vd2f5knpq5p7qfnl31kv3r8m5sjdsafcinbj5gh02j2nzpy"))
(patches (search-patches "gpsbabel-fix-i686-test.patch"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
'(begin '(begin
@ -80,13 +81,7 @@
;; TODO: "make doc" requires Docbook & co. ;; TODO: "make doc" requires Docbook & co.
(arguments (arguments
`(#:configure-flags `(#:configure-flags
'("--with-zlib=system") '("--with-zlib=system")))
;; On i686, 'raymarine.test' fails because of a rounding error:
;; <http://hydra.gnu.org/build/133040>. As a workaround, disable tests
;; on these platforms.
;; FIXME: On x86_64 with -std=gnu++11 tests also fail due to rounding
;; error.
#:tests? #f))
(inputs (inputs
`(("expat" ,expat) `(("expat" ,expat)
("libusb" ,libusb) ("libusb" ,libusb)

View File

@ -0,0 +1,46 @@
https://github.com/gpsbabel/gpsbabel/commit/465a74194d53acea5c8d74c5cf3cb2940546ec92.patch
Can be removed next release
From 465a74194d53acea5c8d74c5cf3cb2940546ec92 Mon Sep 17 00:00:00 2001
From: tsteven4 <13596209+tsteven4@users.noreply.github.com>
Date: Fri, 7 Aug 2020 11:29:22 -0600
Subject: [PATCH] fix i386 regression error with engima. (#620)
this was motivated by the test failure seen at
https://buildd.debian.org/status/fetch.php?pkg=gpsbabel&arch=i386&ver=1.7.0%2Bds-4&stamp=1596794554&raw=0
---
enigma.cc | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/enigma.cc b/enigma.cc
index 850f27b4e..32fea92d6 100644
--- a/enigma.cc
+++ b/enigma.cc
@@ -21,9 +21,16 @@
*/
+#include <cmath> // for fabs, lround
+#include <cstdint> // for int32_t, uint8_t, uint32_t
+#include <cstdlib> // for abs
+#include <cstring> // for strlen, memcpy, memset
+
+#include <QtCore/QString> // for QString
+
#include "defs.h"
-#include <cmath>
-#include <cstdlib>
+#include "gbfile.h" // for gbfclose, gbfopen_le, gbfread, gbfwrite, gbfile
+
#define MYNAME "Enigma binary route and waypoint file format"
@@ -177,7 +184,7 @@ enigma_waypt_disp(const Waypoint* wpt)
le_write32(&ewpt.longitude, decToEnigmaPosition(wpt->longitude));
ewpt.waypoint_type = WTYPE_WAYPOINT;
if (wpt->altitude != unknown_alt) {
- le_write32(&ewpt.data.wp_altitude, METERS_TO_FEET(wpt->altitude) + 1000);
+ le_write32(&ewpt.data.wp_altitude, lround(METERS_TO_FEET(wpt->altitude)) + 1000);
}
if (wpt->shortname != nullptr) {
ewpt.shortname_len = (uint8_t) min(6, strlen(CSTRc(wpt->shortname)));