gpsbabel: update to 1.7.0.

This commit is contained in:
Manfred Usselmann 2020-05-06 08:59:24 +02:00 committed by Érico Nogueira Rolim
parent 06fa5f6dcb
commit da2ff163b0
6 changed files with 47 additions and 238 deletions

View File

@ -0,0 +1,25 @@
--- configure
+++ configure
@@ -6401,4 +6401,2 @@ $as_echo_n "checking loader paths for Qt
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: cross compiling: assuming rpath not needed" >&5
+$as_echo "cross compiling: assuming rpath not needed" >&6; }
@@ -6421,6 +6419,6 @@ else
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
+# if test "$cross_compiling" = yes; then :
+# { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+#$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+#as_fn_error $? "cannot run test program while cross compiling
+#See \`config.log' for more details" "$LINENO" 5; }
+#else
@@ -6449 +6447 @@ rm -f core *.core core.conftest.* gmon.o
-fi
+#fi

View File

@ -1,30 +0,0 @@
From 4cecea61aa5a33f4accfa109d0b73d7878462962 Mon Sep 17 00:00:00 2001
From: Robert Lipe <robertlipe@users.noreply.github.com>
Date: Sat, 14 Oct 2017 21:59:24 -0500
Subject: [PATCH 8/8] Correctly read diff and terr from geo format.
Thank you, Rick Richardson.
---
geo.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/geo.cc b/geo.cc
index 5c785f38..e6f4560a 100644
--- geo.cc
+++ geo.cc
@@ -74,9 +74,9 @@ void GeoReadLoc()
waypt_add_url(wpt,
reader.readElementText(), a.value("text").toString());
} else if (current_tag == "/loc/waypoint/difficulty") {
- wpt->gc_data->diff = reader.readElementText().toInt() * 10;
+ wpt->gc_data->diff = reader.readElementText().toDouble() * 10;
} else if (current_tag == "/loc/waypoint/terrain") {
- wpt->gc_data->terr = reader.readElementText().toInt() * 10;
+ wpt->gc_data->terr = reader.readElementText().toDouble() * 10;
} else if (current_tag == "/loc/waypoint/container") {
wpt->gc_data->container = wpt_container(reader.readElementText());
}
--
2.14.3

View File

@ -1,143 +0,0 @@
diff -Naur gpsbabel-gpsbabel_1_5_4.orig/gui/advdlg.cc gpsbabel-gpsbabel_1_5_4/gui/advdlg.cc
--- gui/advdlg.cc 2017-01-02 06:05:19.000000000 +0100
+++ gui/advdlg.cc 2018-01-12 12:14:50.428923572 +0100
@@ -37,7 +37,6 @@
{
ui_.setupUi(this);
ui_.synthShortNames->setChecked(synthShortNames);
- ui_.previewGmap->setChecked(previewGmap);
ui_.debugCombo->setCurrentIndex(debugLevel+1);
ui_.buttonBox->button(QDialogButtonBox::Ok)->setIcon(QIcon(":images/ok"));
ui_.buttonBox->button(QDialogButtonBox::Cancel)->setIcon(QIcon(":images/cancel"));
@@ -48,7 +47,6 @@
void AdvDlg::acceptClicked()
{
synthShortNames_ = ui_.synthShortNames->isChecked();
- previewGmap_ = ui_.previewGmap->isChecked();
debugLevel_ = ui_.debugCombo->currentIndex()-1;
accept();
}
diff -Naur gpsbabel-gpsbabel_1_5_4.orig/gui/advui.ui gpsbabel-gpsbabel_1_5_4/gui/advui.ui
--- gui/advui.ui 2017-01-02 06:05:19.000000000 +0100
+++ gui/advui.ui 2018-01-12 12:13:29.919780546 +0100
@@ -38,13 +38,6 @@
</widget>
</item>
<item>
- <widget class="QCheckBox" name="previewGmap">
- <property name="text">
- <string>Preview in Google Maps</string>
- </property>
- </widget>
- </item>
- <item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QComboBox" name="debugCombo">
diff -Naur gpsbabel-gpsbabel_1_5_4.orig/gui/app.pro gpsbabel-gpsbabel_1_5_4/gui/app.pro
--- gui/app.pro 2017-01-02 06:05:19.000000000 +0100
+++ gui/app.pro 2018-01-12 12:05:45.541885058 +0100
@@ -15,13 +15,7 @@
gui \
network \
xml \
-
-greaterThan(QT_MINOR_VERSION, 5) {
- QT += webenginewidgets
- DEFINES += HAVE_WEBENGINE
-} else {
- QT += webkit webkitwidgets
-}
+ widgets \
unix:DESTDIR = objects
unix:MOC_DIR = objects
@@ -72,13 +66,11 @@
SOURCES += filterwidgets.cc
SOURCES += format.cc
SOURCES += formatload.cc
-SOURCES += gmapdlg.cc
SOURCES += gpx.cc
SOURCES += help.cc
SOURCES += latlng.cc
SOURCES += main.cc
SOURCES += mainwindow.cc
-SOURCES += map.cc
SOURCES += optionsdlg.cc
SOURCES += preferences.cc
SOURCES += processwait.cc
@@ -98,11 +90,9 @@
HEADERS += filterwidgets.h
HEADERS += format.h
HEADERS += formatload.h
-HEADERS += gmapdlg.h
HEADERS += gpx.h
HEADERS += help.h
HEADERS += mainwindow.h
-HEADERS += map.h
HEADERS += optionsdlg.h
HEADERS += preferences.h
HEADERS += processwait.h
diff -Naur gpsbabel-gpsbabel_1_5_4.orig/gui/main.cc gpsbabel-gpsbabel_1_5_4/gui/main.cc
--- gui/main.cc 2017-01-02 06:05:19.000000000 +0100
+++ gui/main.cc 2018-01-12 12:05:45.541885058 +0100
@@ -29,7 +29,6 @@
#include <QTextCodec>
#include "mainwindow.h"
-#include "gmapdlg.h"
#ifdef _WIN32
const char *pathSeparator = ";";
diff -Naur gpsbabel-gpsbabel_1_5_4.orig/gui/mainwindow.cc gpsbabel-gpsbabel_1_5_4/gui/mainwindow.cc
--- gui/mainwindow.cc 2017-01-02 06:05:19.000000000 +0100
+++ gui/mainwindow.cc 2018-01-12 12:05:45.601886984 +0100
@@ -38,7 +38,6 @@
#include "donate.h"
#include "filterdlg.h"
#include "formatload.h"
-#include "gmapdlg.h"
#include "help.h"
#include "optionsdlg.h"
#include "preferences.h"
@@ -976,24 +975,6 @@
formatList_[fidx].bumpWriteUseCount(1);
}
- // Now output for preview in google maps
- QString tempName;
- if (babelData_.previewGmap_) {
- QTemporaryFile ftemp;
- ftemp.open();
- tempName = ftemp.fileName();
- ftemp.close();
-
- // Ideally, expost this in the UI. For now, just split the track
- // if we've no recorded fixes for > 5 mins and we've moved > 300 meters.
- //args << "-x";
- //args << "track,pack,sdistance=0.3k,split=5m";
-
- args << "-o";
- args << "gpx";
- args << "-F" << tempName;
- }
-
ui_.outputWindow->clear();
ui_.outputWindow->appendPlainText("gpsbabel " + args.join(" "));
@@ -1005,14 +986,6 @@
ui_.outputWindow->appendPlainText(outputString);
if (x) {
ui_.outputWindow->appendPlainText(tr("Translation successful"));
- if (babelData_.previewGmap_) {
- this->hide();
- GMapDialog dlg(0, tempName, babelData_.debugLevel_ >=1 ? ui_.outputWindow : 0);
- dlg.show();
- dlg.exec();
- QFile(tempName).remove();
- this->show();
- }
}
else
ui_.outputWindow->appendPlainText(tr("Error running gpsbabel: %1\n").arg(errorString));

View File

@ -0,0 +1,17 @@
--- enigma.cc
+++ enigma.cc
@@ -23,0 +24,7 @@
+#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
+
@@ -25,2 +32 @@
-#include <cmath>
-#include <cstdlib>
+#include "gbfile.h" // for gbfclose, gbfopen_le, gbfread, gbfwrite, gbfile
@@ -180 +186 @@ enigma_waypt_disp(const Waypoint* wpt)
- 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);

View File

@ -1,59 +0,0 @@
diff -wbBur gpsbabel-1.5.4/tef_xml.cc gpsbabel-1.5.4.my/tef_xml.cc
--- tef_xml.cc 2017-01-02 08:05:19.000000000 +0300
+++ tef_xml.cc 2017-02-16 16:20:22.788961096 +0300
@@ -72,11 +72,11 @@
bool valid = false;
foreach(QXmlStreamAttribute attr, *attrv) {
- if (attr.name().compare("Comment", Qt::CaseInsensitive) == 0) {
- if (attr.value().compare("TourExchangeFormat", Qt::CaseInsensitive) == 0) {
+ if (attr.name().compare((QString&)"Comment", Qt::CaseInsensitive) == 0) {
+ if (attr.value().compare((QString&)"TourExchangeFormat", Qt::CaseInsensitive) == 0) {
valid = true;
}
- } else if (attr.name().compare("Version", Qt::CaseInsensitive) == 0) {
+ } else if (attr.name().compare((QString&)"Version", Qt::CaseInsensitive) == 0) {
version = attr.value().toString().toDouble();
}
}
@@ -95,9 +95,9 @@
{
route = route_head_alloc();
foreach(QXmlStreamAttribute attr, *attrv) {
- if (attr.name().compare("Name", Qt::CaseInsensitive) == 0) {
+ if (attr.name().compare((QString&)"Name", Qt::CaseInsensitive) == 0) {
route->rte_name = attr.value().toString().trimmed();
- } else if (attr.name().compare("Software", Qt::CaseInsensitive) == 0) {
+ } else if (attr.name().compare((QString&)"Software", Qt::CaseInsensitive) == 0) {
route->rte_desc = attr.value().toString().trimmed();
}
}
@@ -248,20 +248,20 @@
QString attrstr = attr.value().toString();
QByteArray attrtext = attrstr.toUtf8();
- if (attr.name().compare("SegDescription", Qt::CaseInsensitive) == 0) {
+ if (attr.name().compare((QString&)"SegDescription", Qt::CaseInsensitive) == 0) {
wpt_tmp->shortname = attrstr.trimmed();
- } else if (attr.name().compare("PointDescription", Qt::CaseInsensitive) == 0) {
+ } else if (attr.name().compare((QString&)"PointDescription", Qt::CaseInsensitive) == 0) {
wpt_tmp->description = attrstr.trimmed();
- } else if (attr.name().compare("ViaStation", Qt::CaseInsensitive) == 0 &&
- attr.value().compare("true", Qt::CaseInsensitive) == 0) {
+ } else if (attr.name().compare((QString&)"ViaStation", Qt::CaseInsensitive) == 0 &&
+ attr.value().compare((QString&)"true", Qt::CaseInsensitive) == 0) {
wpt_tmp->wpt_flags.fmt_use = 1; /* only a flag */
/* new in TEF V2 */
- } else if (attr.name().compare("Instruction", Qt::CaseInsensitive) == 0) {
+ } else if (attr.name().compare((QString&)"Instruction", Qt::CaseInsensitive) == 0) {
wpt_tmp->description = attrstr.trimmed();
- } else if (attr.name().compare("Altitude", Qt::CaseInsensitive) == 0) {
+ } else if (attr.name().compare((QString&)"Altitude", Qt::CaseInsensitive) == 0) {
wpt_tmp->altitude = attrstr.toDouble();
- } else if (attr.name().compare("TimeStamp", Qt::CaseInsensitive) == 0) {
+ } else if (attr.name().compare((QString&)"TimeStamp", Qt::CaseInsensitive) == 0) {
/* nothing for the moment */
}
}

View File

@ -1,23 +1,23 @@
# Template file for 'gpsbabel'
pkgname=gpsbabel
version=1.5.4
version=1.7.0
revision=1
wrksrc="gpsbabel-gpsbabel_${version//./_}"
build_style=gnu-configure
build_helper=qmake
makedepends="qt5-devel libusb-compat-devel"
makedepends="qt5-devel qt5-webkit-devel libusb-compat-devel"
depends="desktop-file-utils"
short_desc="Converts waypoints, tracks, and routes between popular GPS formats"
maintainer="Philipp Hirsch <itself@hanspolo.net>"
license="GPL-2.0-or-later"
homepage="https://www.gpsbabel.org/"
distfiles="https://github.com/gpsbabel/${pkgname}/archive/${pkgname}_${version//./_}.tar.gz"
checksum=8cd740db0b92610abff71e942e8a987df58cd6ca5f25cca86e15f2b00e190704
checksum=30b186631fb43db576b8177385ed5c31a5a15c02a6bc07bae1e0d7af9058a797
replaces="gpsbabel-gui>=0"
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" qt5-devel"
hostmakedepends+=" qt5-devel qt5-webkit-devel"
configure_args+=" ac_cv_prog_QMAKE=${XBPS_WRAPPERDIR}/qmake"
fi
@ -37,8 +37,7 @@ do_build() {
do_install() {
make install DESTDIR=${DESTDIR}
vbin gui/gpsbabelfe
vbin gui/objects/gpsbabelfe-bin
vbin gui/objects/gpsbabelfe
vinstall gui/gpsbabel.desktop 644 usr/share/applications
vinstall gui/images/appicon.png 644 usr/share/pixmaps gpsbabel.png
vmkdir usr/share/gpsbabel/translations