[packages/gpsbabel] - updated to 1.5.4

bszx bszx at pld-linux.org
Fri Nov 2 17:46:58 CET 2018


commit 5438f537330bacf050cee4cd561cfba5717692bc
Author: Bartek Szady <bszx at bszx.eu>
Date:   Fri Nov 2 17:44:12 2018 +0100

    - updated to 1.5.4

 gpsbabel-link.patch       | 16 ++++++-------
 gpsbabel.spec             | 53 ++++++++++++++++++++++---------------------
 privacy.patch             | 13 +++++++++++
 qt.patch                  | 57 +++++++++++++++++++++++++++++++++++++++++++++++
 use-system-shapelib.patch | 26 ++++++++++-----------
 5 files changed, 119 insertions(+), 46 deletions(-)
---
diff --git a/gpsbabel.spec b/gpsbabel.spec
index e9e1e19..def8121 100644
--- a/gpsbabel.spec
+++ b/gpsbabel.spec
@@ -1,51 +1,54 @@
 #
 # Conditional build:
-%bcond_without	qt4		# build Qt4 GUI
+%bcond_without	qt5		# build Qt5 GUI
 #
-%define		qtver		4.7.1
+%define		qtver		5.11.1
+%define         fver    %(echo %{version} | tr . _)
 Summary:	GPSBabel - convert GPS waypoint, route and track data
 Summary(pl.UTF-8):	GPSBabel - konwertowanie danych GPS: waypointów, tras i śladów
 Name:		gpsbabel
-Version:	1.5.1
+Version:	1.5.4
 Release:	1
 License:	GPL v2+
 Group:		Applications/Engineering
 # Source0Download via POST form at https://www.gpsbabel.org/download.html#downloading
-# version=1.4.4
+# version=1.5.4
 # token=$(curl -s http://www.gpsbabel.org/download.html | sed -rne 's/.*gpsbabel-'$version'\.tar\.gz.*token.*value="([^"]+)".*/\1/p' | head -n1)
 # curl -F "token=$token" -F "dl=gpsbabel-$version.tar.gz" http://www.gpsbabel.org/plan9.php -o gpsbabel-$version.tar.gz
-Source0:	%{name}-%{version}.tar.gz
-# Source0-md5:	0016c6313b3a5b97afd8d1d8f23abbe1
+Source0:	https://github.com/gpsbabel/gpsbabel/archive/%{name}_%{fver}.tar.gz
+# Source0-md5:	0f2d422dbae82f939564cf8305a4654c
 Source1:	%{name}.desktop
 Source2:	%{name}.png
 Patch0:		%{name}-auto.patch
 Patch1:		use-system-shapelib.patch
 Patch2:		gmapbase.patch
 Patch3:		%{name}-link.patch
+Patch4:		qt.patch
+Patch5:		privacy.patch
 URL:		http://www.gpsbabel.org/
 BuildRequires:	autoconf >= 2.59
 BuildRequires:	automake
 BuildRequires:	docbook-style-xsl
 BuildRequires:	expat-devel >= 1.95
-BuildRequires:	libusb-compat-devel >= 0.1
+#BuildRequires:	libusb-compat-devel >= 0.1
 BuildRequires:	libxslt-progs
 BuildRequires:	rpmbuild(macros) >= 1.600
 BuildRequires:	shapelib-devel
 BuildRequires:	zlib-devel
-%if %{with qt4}
-BuildRequires:	QtCore-devel >= %{qtver}
-BuildRequires:	QtGui-devel >= %{qtver}
-BuildRequires:	QtNetwork-devel >= %{qtver}
-BuildRequires:	QtWebKit-devel >= %{qtver}
-BuildRequires:	QtXml-devel >= %{qtver}
+BuildRequires:	Qt5Core-devel >= %{qtver}
+%if %{with qt5}
+BuildRequires:	Qt5Gui-devel >= %{qtver}
+BuildRequires:	Qt5Network-devel >= %{qtver}
+BuildRequires:	Qt5WebEngine-devel >= %{qtver}
+BuildRequires:	Qt5Xml-devel >= %{qtver}
 BuildRequires:	desktop-file-utils
-BuildRequires:	qt4-build >= %{qtver}
-BuildRequires:	qt4-linguist >= %{qtver}
-BuildRequires:	qt4-qmake >= %{qtver}
+BuildRequires:	qt5-build >= %{qtver}
+BuildRequires:	qt5-linguist >= %{qtver}
+BuildRequires:	qt5-qmake >= %{qtver}
 %endif
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		translationdir	%{_datadir}/qt4/translations
+%define		translationdir	%{_datadir}/qt5/translations
 
 %description
 Converts GPS waypoint, route and track data from one format type to
@@ -68,11 +71,13 @@ Qt GUI interface for GPSBabel.
 Graficzny interfejs Qt do programu GPSBabel.
 
 %prep
-%setup -q
+%setup -q -n %{name}-%{name}_%{fver}
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 # Use system shapelib instead of bundled partial shapelib
 mv shapelib{,.bundled}
@@ -88,10 +93,10 @@ mv shapelib{,.bundled}
 %{__perl} xmldoc/makedoc
 %{__make} gpsbabel.html
 
-%if %{with qt4}
+%if %{with qt5}
 cd gui
-qmake-qt4
-lrelease-qt4 *.ts
+qmake-qt5
+lrelease-qt5 *.ts
 %{__make}
 %endif
 
@@ -101,7 +106,7 @@ install -d $RPM_BUILD_ROOT%{_bindir}
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-%if %{with qt4}
+%if %{with qt5}
 install -d $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{name},%{translationdir}}
 install -p gui/objects/gpsbabelfe-bin $RPM_BUILD_ROOT%{_bindir}
@@ -141,7 +146,7 @@ rm -rf $RPM_BUILD_ROOT
 %doc AUTHORS README* gpsbabel.html
 %attr(755,root,root) %{_bindir}/gpsbabel
 
-%if %{with qt4}
+%if %{with qt5}
 %files gui -f %{name}.lang
 %defattr(644,root,root,755)
 %doc gui/{AUTHORS,README*,TODO}
@@ -150,6 +155,4 @@ rm -rf $RPM_BUILD_ROOT
 %{_iconsdir}/hicolor/*/apps/gpsbabel.png
 %dir %{_datadir}/%{name}
 %{_datadir}/%{name}/gmapbase.html
-# XXX move to qt.spec?
-%dir %{translationdir}
 %endif
diff --git a/gpsbabel-link.patch b/gpsbabel-link.patch
index cdafea7..9d76428 100644
--- a/gpsbabel-link.patch
+++ b/gpsbabel-link.patch
@@ -1,11 +1,11 @@
---- gpsbabel-1.5.1/Makefile.in.orig	2014-11-23 10:53:00.579901305 +0100
-+++ gpsbabel-1.5.1/Makefile.in	2014-11-23 10:54:42.482400863 +0100
-@@ -111,7 +111,7 @@
-           formspec.o xmltag.o cet.o cet_util.o fatal.o rgbcolors.o \
- 	  inifile.o garmin_fs.o gbsleep.o units.o @GBSER@ gbser.o \
- 	  gbfile.o parse.o session.o src/core/xmlstreamwriter.o \
--	$(PALM_DB) $(GARMIN) $(JEEPS) $(SHAPE) @ZLIB@ $(FMTS) $(FILTERS)
-+	$(PALM_DB) $(GARMIN) $(JEEPS) $(FMTS) $(FILTERS) $(SHAPE) @ZLIB@
+--- gpsbabel-1.5.4/Makefile.in.orig	2018-11-01 11:49:25.061806677 +0100
++++ gpsbabel-1.5.4/Makefile.in	2018-11-01 11:51:00.111159677 +0100
+@@ -119,7 +119,7 @@
+ 	  src/core/xmlstreamwriter.o \
+ 	  src/core/usasciicodec.o\
+ 	  src/core/ziparchive.o \
+-	  $(GARMIN) $(JEEPS) $(SHAPE) @ZLIB@ $(FMTS) $(FILTERS)
++	  $(GARMIN) $(JEEPS) $(FMTS) $(FILTERS) $(SHAPE) @ZLIB@
  OBJS = main.o globals.o $(LIBOBJS) @FILEINFO@
  
  DEPFILES = $(OBJS:.o=.d)
diff --git a/privacy.patch b/privacy.patch
new file mode 100644
index 0000000..67b94f4
--- /dev/null
+++ b/privacy.patch
@@ -0,0 +1,13 @@
+--- gpsbabel-gpsbabel_1_5_4/gui/babeldata.h.orig	2017-01-02 06:05:19.000000000 +0100
++++ gpsbabel-gpsbabel_1_5_4/gui/babeldata.h	2018-11-01 11:44:02.167369665 +0100
+@@ -63,8 +63,8 @@
+     upgradeErrors_(0),
+     upgradeOffers_(0),
+     runCount_(0),
+-    startupVersionCheck_(true),
+-    reportStatistics_(true),
++    startupVersionCheck_(false),
++    reportStatistics_(false),
+     allowBetaUpgrades_(false),
+     ignoreVersionMismatch_(false),
+     disableDonateDialog_(false),
diff --git a/qt.patch b/qt.patch
new file mode 100644
index 0000000..cda2b12
--- /dev/null
+++ b/qt.patch
@@ -0,0 +1,57 @@
+--- gpsbabel-gpsbabel_1_5_4/tef_xml.cc.orig	2017-01-02 06:05:19.000000000 +0100
++++ gpsbabel-gpsbabel_1_5_4/tef_xml.cc	2018-11-01 12:04:19.187883183 +0100
+@@ -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(QByteArrayLiteral("Comment"), Qt::CaseInsensitive) == 0) {
++      if (attr.value().compare(QByteArrayLiteral("TourExchangeFormat"), Qt::CaseInsensitive) == 0) {
+         valid = true;
+       }
+-    } else if (attr.name().compare("Version", Qt::CaseInsensitive) == 0) {
++    } else if (attr.name().compare(QByteArrayLiteral("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(QByteArrayLiteral("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(QByteArrayLiteral("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(QByteArrayLiteral("SegDescription"), Qt::CaseInsensitive) == 0) {
+       wpt_tmp->shortname = attrstr.trimmed();
+-    } else if (attr.name().compare("PointDescription", Qt::CaseInsensitive) == 0) {
++    } else if (attr.name().compare(QByteArrayLiteral("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(QByteArrayLiteral("ViaStation"), Qt::CaseInsensitive) == 0 &&
++               attr.value().compare(QByteArrayLiteral("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(QByteArrayLiteral("Instruction"), Qt::CaseInsensitive) == 0) {
+       wpt_tmp->description = attrstr.trimmed();
+-    } else if (attr.name().compare("Altitude", Qt::CaseInsensitive) == 0) {
++    } else if (attr.name().compare(QByteArrayLiteral("Altitude"), Qt::CaseInsensitive) == 0) {
+       wpt_tmp->altitude = attrstr.toDouble();
+-    } else if (attr.name().compare("TimeStamp", Qt::CaseInsensitive) == 0) {
++    } else if (attr.name().compare(QByteArrayLiteral("TimeStamp"), Qt::CaseInsensitive) == 0) {
+       /* nothing for the moment */
+     }
+   }
diff --git a/use-system-shapelib.patch b/use-system-shapelib.patch
index 1fcf0f0..6f73a6a 100644
--- a/use-system-shapelib.patch
+++ b/use-system-shapelib.patch
@@ -11,38 +11,38 @@ Use system shapelib - not suitable for upstream in this form.
  AC_CONFIG_FILES([gui/makelinuxdist.sh], [chmod +x gui/makelinuxdist.sh])
  AC_OUTPUT
  
---- gpsbabel-1.5.1/Makefile.in.orig	2014-11-23 10:08:03.677290002 +0100
-+++ gpsbabel-1.5.1/Makefile.in	2014-11-23 10:40:46.535655647 +0100
-@@ -99,7 +99,7 @@
+--- gpsbabel-1.5.4/Makefile.in.orig	2018-11-01 11:23:12.597708780 +0100
++++ gpsbabel-1.5.4/Makefile.in	2018-11-01 11:26:35.878954083 +0100
+@@ -100,7 +100,7 @@
  # Extra modules in Jeeps that we don't use
  # 	jeeps/gpsfmt.o jeeps/gpsinput.o jeeps/gpsproj.o
  
 -SHAPE=shapelib/shpopen.o shapelib/dbfopen.o shapelib/safileio.o
 +SHAPE=-lshp
  
- ZLIB=zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o zlib/inffast.o \
- 	zlib/inflate.o zlib/infback.o zlib/inftrees.o zlib/trees.o \
-@@ -906,11 +906,7 @@
+ MINIZIP=zlib/contrib/minizip/zip.o \
+ 	zlib/contrib/minizip/ioapi.o
+@@ -894,11 +894,7 @@
  session.o: session.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \
-   gbfile.h cet.h cet_util.h inifile.h session.h src/core/datetime.h
+   gbfile.h cet.h inifile.h session.h src/core/datetime.h
  shape.o: shape.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \
--  gbfile.h cet.h cet_util.h inifile.h session.h src/core/datetime.h \
+-  gbfile.h cet.h inifile.h session.h src/core/datetime.h \
 -  shapelib/shapefil.h
 -shapelib/dbfopen.o: shapelib/dbfopen.c shapelib/shapefil.h
 -shapelib/safileio.o: shapelib/safileio.c shapelib/shapefil.h
 -shapelib/shpopen.o: shapelib/shpopen.c shapelib/shapefil.h
-+  gbfile.h cet.h cet_util.h inifile.h session.h src/core/datetime.h 
++  gbfile.h cet.h inifile.h session.h src/core/datetime.h
  skyforce.o: skyforce.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \
-   gbfile.h cet.h cet_util.h inifile.h session.h src/core/datetime.h
+   gbfile.h cet.h inifile.h session.h src/core/datetime.h
  skytraq.o: skytraq.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \
---- gpsbabel-1.5.1/shape.cc.orig	2014-04-10 04:43:08.000000000 +0200
-+++ gpsbabel-1.5.1/shape.cc	2014-11-23 10:42:23.854932957 +0100
+--- gpsbabel-1.5.4/shape.cc.orig	2018-11-01 11:23:12.597708780 +0100
++++ gpsbabel-1.5.4/shape.cc	2018-11-01 11:29:59.950436006 +0100
 @@ -20,7 +20,7 @@
  
   */
  #include "defs.h"
 -#include "shapelib/shapefil.h"
 +#include <libshp/shapefil.h>
+ #include <stdlib.h>
  
  #if SHAPELIB_ENABLED
- static SHPHandle ihandle;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gpsbabel.git/commitdiff/5438f537330bacf050cee4cd561cfba5717692bc



More information about the pld-cvs-commit mailing list