pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

gpsbabel: Add 99%-done update to 1.5.4



Module Name:	pkgsrc-wip
Committed By:	Greg Troxel <gdt%lexort.com@localhost>
Pushed By:	gdt
Date:		Mon Apr 8 20:23:35 2019 -0400
Changeset:	ec79cce2aa5db399c3758ec086788fe43b400af7

Modified Files:
	Makefile
Added Files:
	gpsbabel/DESCR
	gpsbabel/Makefile
	gpsbabel/PLIST
	gpsbabel/distinfo
	gpsbabel/patches/patch-ad
	gpsbabel/patches/patch-af
	gpsbabel/patches/patch-bushnell.cc
	gpsbabel/patches/patch-configure
	gpsbabel/patches/patch-configure.in

Log Message:
gpsbabel: Add 99%-done update to 1.5.4

The 1.5.4 release is from January 2017, and no longer builds against
current qt5.  In particular, tef_xml.cc fails.  I am dithering between
hoping for a new release and commenting tef_xml out of the build, and
am parking the in-progress work here.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=ec79cce2aa5db399c3758ec086788fe43b400af7

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                            |  1 +
 gpsbabel/DESCR                      |  5 +++
 gpsbabel/Makefile                   | 34 +++++++++++++++++
 gpsbabel/PLIST                      |  2 +
 gpsbabel/distinfo                   | 11 ++++++
 gpsbabel/patches/patch-ad           | 47 +++++++++++++++++++++++
 gpsbabel/patches/patch-af           | 75 +++++++++++++++++++++++++++++++++++++
 gpsbabel/patches/patch-bushnell.cc  | 24 ++++++++++++
 gpsbabel/patches/patch-configure    | 26 +++++++++++++
 gpsbabel/patches/patch-configure.in | 29 ++++++++++++++
 10 files changed, 254 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 6034ceb83d..bdf27025b4 100644
--- a/Makefile
+++ b/Makefile
@@ -1188,6 +1188,7 @@ SUBDIR+=	gopass
 SUBDIR+=	gopkgdep
 SUBDIR+=	gpak
 SUBDIR+=	gplbasic
+SUBDIR+=	gpsbabel
 SUBDIR+=	gpsdrive
 SUBDIR+=	gpx2shp
 SUBDIR+=	gqrx
diff --git a/gpsbabel/DESCR b/gpsbabel/DESCR
new file mode 100644
index 0000000000..d697b6c55c
--- /dev/null
+++ b/gpsbabel/DESCR
@@ -0,0 +1,5 @@
+GPSBabel converts waypoints, tracks, and routes from one
+format to another, whether that format is a common mapping
+format like Delorme, Streets and Trips, or even a serial
+or USB upload or download to a GPS receiver such as those
+from Garmin and Magellan.
diff --git a/gpsbabel/Makefile b/gpsbabel/Makefile
new file mode 100644
index 0000000000..a16f7a7777
--- /dev/null
+++ b/gpsbabel/Makefile
@@ -0,0 +1,34 @@
+# $NetBSD: Makefile,v 1.20 2019/04/09 00:21:03 gdt Exp $
+#
+
+DISTNAME=	gpsbabel-1.5.4
+CATEGORIES=	geography
+MASTER_SITES=	${MASTER_SITE_LOCAL}
+# Download from official site apparently only via interactive form,
+# but code is gnu-gpl-v2 so hosted elsewhere.
+# older versions were at
+# MASTER_SITES+=	http://archlinux-stuff.googlecode.com/files/
+
+MAINTAINER=	gdt%NetBSD.org@localhost
+HOMEPAGE=	http://www.gpsbabel.org/
+#HOMEPAGE=	https://github.com/gpsbabel/gpsbabel
+COMMENT=	Utility to convert and fetch GPS related data
+LICENSE=	gnu-gpl-v2
+
+USE_LANGUAGES=	c c++11
+
+TEST_TARGET=	check
+
+LIBS.Darwin+=	-lexpat
+
+GNU_CONFIGURE=	yes
+
+CONFIGURE_ENV+=	QMAKE=${QTDIR}/bin/qmake
+CONFIGURE_ENV+=	LUPDATE=${QTDIR}/bin/lupdate
+CONFIGURE_ENV+=	LRELEASE=${QTDIR}/bin/lrelease
+
+.include "../../mk/libusb.buildlink3.mk"
+.include "../../textproc/expat/buildlink3.mk"
+.include "../../x11/qt5-qtbase/buildlink3.mk"
+.include "../../x11/qt5-qttools/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/gpsbabel/PLIST b/gpsbabel/PLIST
new file mode 100644
index 0000000000..62696dc66d
--- /dev/null
+++ b/gpsbabel/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2007/09/21 05:12:08 martti Exp $
+bin/gpsbabel
diff --git a/gpsbabel/distinfo b/gpsbabel/distinfo
new file mode 100644
index 0000000000..fc544141ca
--- /dev/null
+++ b/gpsbabel/distinfo
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.11 2016/12/21 13:37:24 joerg Exp $
+
+SHA1 (gpsbabel-1.5.4.tar.gz) = 628a94dd376253a1aadf0e34d694acd4d6ccaec9
+RMD160 (gpsbabel-1.5.4.tar.gz) = 45916ef4c21363cca535de26f54592ee62d72b2a
+SHA512 (gpsbabel-1.5.4.tar.gz) = 5fdc3bc07ad52d6c1e3532b287dcb506aba612ae9bc8db393b4837d79d773d6e22ad31f8f8e65770ec52b1afbda556e452af20dada1e411de93ca6e18054225b
+Size (gpsbabel-1.5.4.tar.gz) = 9099765 bytes
+SHA1 (patch-ad) = 9f7d481ddc1d2935fb05df687db25127fe3b37f0
+SHA1 (patch-af) = 5f066824b49f959ea8b06cdeccf21a4ce789fd1d
+SHA1 (patch-bushnell.cc) = 258c41eebe7a606c9143d6982d953da6719493d1
+SHA1 (patch-configure) = fc40f70e4b1212a3c476db4914a853265e29fa6f
+SHA1 (patch-configure.in) = 3e36074053f87f6280a0780d342f75bbd5acdc65
diff --git a/gpsbabel/patches/patch-ad b/gpsbabel/patches/patch-ad
new file mode 100644
index 0000000000..7afffec52d
--- /dev/null
+++ b/gpsbabel/patches/patch-ad
@@ -0,0 +1,47 @@
+$NetBSD: patch-ad,v 1.5 2015/06/06 12:57:58 gdt Exp $
+
+This patch was rejected by upstream.  There is a comment in upstream
+Makefile.in that explains why there is no space, and output flag is
+set to "-o ", so that the output flag can be set to "-Fo" for MSVC.n
+
+On NetBSD, the upstream version works, but there is some mysterious
+failure on Mac OS X.  This patch therefore needs investigation and
+resolution to be filed with upstream.  (It almost certainly breaks
+native compilation on Windows, but that's not a pkgsrc platform.)
+
+--- Makefile.in.orig	2014-12-17 00:47:31.000000000 +0000
++++ Makefile.in
+@@ -119,9 +119,9 @@ OBJS = main.o globals.o $(LIBOBJS) @FILE
+ DEPFILES = $(OBJS:.o=.d)
+ 
+ .cc.o:
+-	$(CXX) @CPPFLAGS@ @CXXFLAGS@ -c $(GBCFLAGS) $< $(OUTPUT_SWITCH)$@
++	$(CXX) @CPPFLAGS@ @CXXFLAGS@ -c $(GBCFLAGS) $< $(OUTPUT_SWITCH) $@
+ .c.o:
+-	$(CC) @CPPFLAGS@ @CFLAGS@ -c $(GBCFLAGS) $< $(OUTPUT_SWITCH)$@
++	$(CC) @CPPFLAGS@ @CFLAGS@ -c $(GBCFLAGS) $< $(OUTPUT_SWITCH) $@
+ 
+ 
+ 
+@@ -141,10 +141,10 @@ gui linux-gui mac-gui mac-gui-dmg msvc-b
+ all: gpsbabel$(EXEEXT)
+ 
+ gpsbabel$(EXEEXT): configure Makefile $(OBJS) @GPSBABEL_DEBUG@ 
+-	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJS) @LIBS@ $(QT_LIBS) @USB_LIBS@ $(OUTPUT_SWITCH)$@
++	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJS) @LIBS@ $(QT_LIBS) @USB_LIBS@ $(OUTPUT_SWITCH) $@
+ 
+ gpsbabel-debug: $(OBJS)
+-	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJS) @LIBS@ @EFENCE_LIB@ $(QT_LIBS) @USB_LIBS@ $(OUTPUT_SWITCH)$@
++	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJS) @LIBS@ @EFENCE_LIB@ $(QT_LIBS) @USB_LIBS@ $(OUTPUT_SWITCH) $@
+ 
+ Makefile gbversion.h: Makefile.in config.status xmldoc/makedoc.in \
+ 	  gbversion.h.in gui/setup.iss.in
+@@ -157,7 +157,7 @@ config.status: configure 
+ 	$(SHELL) config.status --recheck
+ 
+ jeeps/gpslibusb.o: 
+-	$(CXX) @CPPFLAGS@ @CXXFLAGS@ -c $(GBCFLAGS) @USB_CFLAGS@ @srcdir@/jeeps/gpslibusb.cc $(OUTPUT_SWITCH)$@
++	$(CXX) @CPPFLAGS@ @CXXFLAGS@ -c $(GBCFLAGS) @USB_CFLAGS@ @srcdir@/jeeps/gpslibusb.cc $(OUTPUT_SWITCH) $@
+ 
+ fileinfo.o: win32/gpsbabel.rc
+ 	$(RC) -o fileinfo.o win32/gpsbabel.rc
diff --git a/gpsbabel/patches/patch-af b/gpsbabel/patches/patch-af
new file mode 100644
index 0000000000..3c8d5d6b1b
--- /dev/null
+++ b/gpsbabel/patches/patch-af
@@ -0,0 +1,75 @@
+$NetBSD: patch-af,v 1.5 2015/06/06 12:57:58 gdt Exp $
+
+From Giles Lean, who places it in the public domain.  Workarounds for
+problems with buggy USB serial adapators.  Not applied by upstream
+2009-02-21 because it's too dangerous to work around problems without
+understanding them.
+
+--- jeeps/gpsread.cc.orig	2014-02-13 00:12:48.000000000 +0000
++++ jeeps/gpsread.cc
+@@ -98,6 +98,36 @@ int32 GPS_Serial_Packet_Read(gpsdevh* fd
+       GPS_Diag("%02x ", u);
+ 
+       if (!len) {
++                /*
++                 * Missed DLE characters have been observed with Geko
++                 * 201 and Legend GPSRs with Prolific USB-serial
++                 * cables.  The following kludge seems to help.
++                 *
++                 * It has been tested so far with the following
++                 * combinations of software and hardware:
++                 *
++                 * OS X 10.4.x and 10.5.x:
++                 *
++                 * - a Geko 201 (firmware version 2.70) and a third
++                 *   party cable using a Prolific USB-serial converter
++                 * - a Legend using a serial cable with a non-integral
++                 *   Prolific USB-serial converter.
++                 *
++                 * NetBSD-4.0/i386 with the Geko and cable as above.
++                 *
++                 * REVISIT GFL Should this be a switch in a .ini file?
++                 *
++                 * + it's a kludge, so leaving it always on is ugly
++                 * - if it's harmless to properly working hardware,
++                 *   then it's a better user experience to leave it on
++                 */
++                if (u == 0x06 || u == 0x15)
++                {
++                    ++len;
++		    (void) fprintf(stderr,"GPS_Packet_Read: inserted DLE due to 0x%02x.\n", u);
++                    goto dle_missed;
++                }
++
+         if (u != DLE) {
+           (void) fprintf(stderr,"GPS_Packet_Read: No DLE.  Data received, but probably not a garmin packet.\n");
+           (void) fflush(stderr);
+@@ -107,6 +137,7 @@ int32 GPS_Serial_Packet_Read(gpsdevh* fd
+         continue;
+       }
+ 
++dle_missed:
+       if (len==1) {
+         (*packet).type = u;
+         ++len;
+@@ -130,6 +161,20 @@ int32 GPS_Serial_Packet_Read(gpsdevh* fd
+       if (u == ETX)
+         if (isDLE) {
+           if (p-(*packet).data-2 != (*packet).n) {
++	    /*
++	     * When used with a buggy Prolific USB-serial converter the
++	     * calling sequence GPS_A000() -> GPS_Get_Ack() sometimes
++	     * returns data != type causing this routine to fail and the
++	     * following error message to be emitted:
++	     *
++	     *   GARMIN:Can't init /dev/cu.usbserial
++	     *
++	     * Manually retrying usually works, and subsequent
++	     * investigation shows that the call that fails is made from
++	     * GPS_Init() which in this case is GPS_Serial_Init().  Simply
++	     * retrying the call a workaround: see note and retry loop in
++	     * gpsapp.c:GPS_Init().
++	     */
+             GPS_Error("GPS_Packet_Read: Bad count");
+             gps_errno = FRAMING_ERROR;
+             return 0;
diff --git a/gpsbabel/patches/patch-bushnell.cc b/gpsbabel/patches/patch-bushnell.cc
new file mode 100644
index 0000000000..3802eb6f67
--- /dev/null
+++ b/gpsbabel/patches/patch-bushnell.cc
@@ -0,0 +1,24 @@
+$NetBSD: patch-bushnell.cc,v 1.1 2016/12/21 13:37:24 joerg Exp $
+
+Don't check pointer signs.
+
+--- bushnell.cc.orig	2016-12-21 00:00:02.839899031 +0000
++++ bushnell.cc
+@@ -135,7 +135,7 @@ bushnell_get_icon_from_name(QString name
+     name = "Waypoint";
+   }
+ 
+-  for (t = bushnell_icons; t->icon > 0; t++) {
++  for (t = bushnell_icons; t->icon; t++) {
+     if (0 == name.compare(t->icon, Qt::CaseInsensitive)) {
+       return t->symbol;
+     }
+@@ -147,7 +147,7 @@ static const char*
+ bushnell_get_name_from_symbol(signed int s)
+ {
+   icon_mapping_t* t;
+-  for (t = bushnell_icons; t->icon > 0; t++) {
++  for (t = bushnell_icons; t->icon; t++) {
+     if (s == t->symbol) {
+       return t->icon;
+     }
diff --git a/gpsbabel/patches/patch-configure b/gpsbabel/patches/patch-configure
new file mode 100644
index 0000000000..5901e2f47e
--- /dev/null
+++ b/gpsbabel/patches/patch-configure
@@ -0,0 +1,26 @@
+$NetBSD: patch-configure,v 1.1 2015/09/07 18:57:47 gdt Exp $
+
+--- configure.orig	2017-01-02 05:05:19.000000000 +0000
++++ configure
+@@ -5134,20 +5134,7 @@ rm -f core conftest.err conftest.$ac_obj
+       USB_LIBS="-framework  IOKit -framework CoreFoundation"
+       $as_echo "#define HAVE_LIBUSB 1" >>confdefs.h
+ 
+-
+-      # On Mac, use frameworks for includes and library files.
+-      # Macports uses a non-standard build of Qt with an added
+-      # QT_INSTALL_FRAMEWORKS flag, so look for thier custom
+-      # version first.  That will fail on 'normal' Qt so fall
+-      # back to QT_INSTALL_LIBS.
+-      QT_FW_OR_LIBS=$($QMAKE -query QT_INSTALL_FRAMEWORKS)
+-      if test $QT_FW_OR_LIBS = "**Unknown**" ; then
+-         QT_FW_OR_LIBS=$($QMAKE -query QT_INSTALL_LIBS)
+-      fi
+-      QT_LIBS="-Wl,-rpath, $QT_FW_OR_LIBS -F$QT_FW_OR_LIBS -framework QtCore"
+-      QT_INC="$QT_FW_OR_LIBS"
+-      QT_INC_OPT="-F"
+-      QT_SYSINC_OPT="-iframework"
++      # In pkgsrc, we use the installed qt, not the framework.
+       ;;
+     *-*-freebsd*)
+ 	GBSER=gbser_posix.o
diff --git a/gpsbabel/patches/patch-configure.in b/gpsbabel/patches/patch-configure.in
new file mode 100644
index 0000000000..9e726cdb53
--- /dev/null
+++ b/gpsbabel/patches/patch-configure.in
@@ -0,0 +1,29 @@
+$NetBSD: patch-configure.in,v 1.1 2015/09/07 18:57:47 gdt Exp $
+
+In pkgsrc, we don't provide Qt as a framework.
+
+It's not clear how/if this should be addressed upstream.
+
+--- configure.in.orig	2017-01-02 05:05:19.000000000 +0000
++++ configure.in
+@@ -220,19 +220,7 @@ case "$target" in
+       USB_LIBS="-framework  IOKit -framework CoreFoundation"
+       AC_DEFINE(HAVE_LIBUSB, 1)
+  
+-      # On Mac, use frameworks for includes and library files.
+-      # Macports uses a non-standard build of Qt with an added 
+-      # QT_INSTALL_FRAMEWORKS flag, so look for thier custom
+-      # version first.  That will fail on 'normal' Qt so fall 
+-      # back to QT_INSTALL_LIBS.
+-      QT_FW_OR_LIBS=$($QMAKE -query QT_INSTALL_FRAMEWORKS)
+-      if test $QT_FW_OR_LIBS = "**Unknown**" ; then
+-         QT_FW_OR_LIBS=$($QMAKE -query QT_INSTALL_LIBS)
+-      fi
+-      QT_LIBS="-Wl,-rpath, $QT_FW_OR_LIBS -F$QT_FW_OR_LIBS -framework QtCore"
+-      QT_INC="$QT_FW_OR_LIBS"
+-      QT_INC_OPT="-F"
+-      QT_SYSINC_OPT="-iframework"
++      # In pkgsrc, we use the installed qt, not the framework.
+       ;;
+     *-*-freebsd*)
+ 	GBSER=gbser_posix.o


Home | Main Index | Thread Index | Old Index