[packages/gpsbabel] - updated to 1.9.0 (defaults to qt6 now); actually package gui executable
qboosh
qboosh at pld-linux.org
Wed Jun 26 18:33:15 CEST 2024
commit 239d1ab3157bd4bb8cda81f11b24f7e48e588551
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Jun 26 18:08:31 2024 +0200
- updated to 1.9.0 (defaults to qt6 now); actually package gui executable
gmapbase.patch | 21 +++--
gpsbabel-auto.patch | 12 ---
gpsbabel-link.patch | 12 ---
gpsbabel-system-minizip.patch | 61 ---------------
gpsbabel.desktop | 3 +-
gpsbabel.spec | 178 ++++++++++++++++++++++++------------------
use-system-shapelib.patch | 37 ---------
7 files changed, 113 insertions(+), 211 deletions(-)
---
diff --git a/gpsbabel.spec b/gpsbabel.spec
index ffc9cfe..04b1681 100644
--- a/gpsbabel.spec
+++ b/gpsbabel.spec
@@ -1,20 +1,23 @@
#
# Conditional build:
-%bcond_without qt5 # build Qt5 GUI
+%bcond_without doc # HTML documentation
+%bcond_with qt5 # Qt5 instead of Qt6
+%bcond_without qtwebengine # map preview using Qt WebEngine
#
-%define qtver 5.11.1
-%define fver %(echo %{version} | tr . _)
+%define qt5_ver 5.12
+%define qt6_ver 6.0
+%define fver %(echo %{version} | tr . _)
# disable qt5 on x32 until qt5-qtwebengine builds
# (python segfaults as of 20181212)
%ifarch x32
-%undefine with_qt5
+%undefine with_qtwebengine
%endif
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.6.0
+Version: 1.9.0
Release: 1
License: GPL v2+
Group: Applications/Engineering
@@ -22,41 +25,69 @@ Group: Applications/Engineering
# 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: https://github.com/gpsbabel/gpsbabel/archive/%{name}_%{fver}.tar.gz
-# Source0-md5: accb9f923ebe1b2d2a00c67d0e1dc430
+#Source0Download: https://github.com/GPSBabel/gpsbabel/tags
+Source0: https://github.com/GPSBabel/gpsbabel/archive/%{name}_%{fver}.tar.gz
+# Source0-md5: 8555b7b4c89fbae832451ed0679e04f0
Source1: %{name}.desktop
Source2: %{name}.png
-Patch0: %{name}-auto.patch
-Patch1: use-system-shapelib.patch
Patch2: gmapbase.patch
-Patch3: %{name}-link.patch
Patch4: privacy.patch
-Patch5: %{name}-system-minizip.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: libxslt-progs
-BuildRequires: minizip-devel
-BuildRequires: rpmbuild(macros) >= 1.600
+BuildRequires: cmake >= 3.11
+BuildRequires: desktop-file-utils
+BuildRequires: libstdc++-devel >= 6:7
+BuildRequires: libusb-devel >= 1.0
+BuildRequires: pkgconfig
+BuildRequires: rpmbuild(macros) >= 1.605
BuildRequires: shapelib-devel
-BuildRequires: zlib-devel
-BuildRequires: Qt5Core-devel >= %{qtver}
+BuildRequires: zlib-devel >= 1.2.9
%if %{with qt5}
-BuildRequires: Qt5Gui-devel >= %{qtver}
-BuildRequires: Qt5Network-devel >= %{qtver}
-BuildRequires: Qt5WebEngine-devel >= %{qtver}
-BuildRequires: Qt5Xml-devel >= %{qtver}
-BuildRequires: desktop-file-utils
-BuildRequires: qt5-build >= %{qtver}
-BuildRequires: qt5-linguist >= %{qtver}
-BuildRequires: qt5-qmake >= %{qtver}
+BuildRequires: Qt5Core-devel >= %{qt5_ver}
+%else
+BuildRequires: Qt6Core-devel >= %{qt6_ver}
+%endif
+%if %{with qt5}
+BuildRequires: Qt5Gui-devel >= %{qt5_ver}
+BuildRequires: Qt5Network-devel >= %{qt5_ver}
+BuildRequires: Qt5SerialPort-devel >= %{qt5_ver}
+%if %{with qtwebengine}
+BuildRequires: Qt5WebChannel-devel >= %{qt5_ver}
+BuildRequires: Qt5WebEngine-devel >= %{qt5_ver}
+%endif
+BuildRequires: Qt5Widgets-devel >= %{qt5_ver}
+BuildRequires: Qt5Xml-devel >= %{qt5_ver}
+BuildRequires: qt5-build >= %{qt5_ver}
+BuildRequires: qt5-linguist >= %{qt5_ver}
+BuildRequires: qt5-qmake >= %{qt5_ver}
+%else
+BuildRequires: Qt6Gui-devel >= %{qt6_ver}
+BuildRequires: Qt6Network-devel >= %{qt6_ver}
+BuildRequires: Qt6Qt5Compat-devel >= %{qt6_ver}
+BuildRequires: Qt6SerialPort-devel >= %{qt6_ver}
+%if %{with qtwebengine}
+BuildRequires: Qt6WebChannel-devel >= %{qt6_ver}
+BuildRequires: Qt6WebEngine-devel >= %{qt6_ver}
+%endif
+BuildRequires: Qt6Widgets-devel >= %{qt6_ver}
+BuildRequires: Qt6Xml-devel >= %{qt6_ver}
+BuildRequires: qt6-build >= %{qt6_ver}
+BuildRequires: qt6-linguist >= %{qt6_ver}
+%endif
+%if %{with doc}
+BuildRequires: docbook-dtd50-xml
+BuildRequires: docbook-style-xsl-ns
+BuildRequires: libxslt-progs
+# xmllint + (optional) jing for validation
+BuildRequires: jing
+BuildRequires: libxml2-progs
%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%if %{with qt5}
%define translationdir %{_datadir}/qt5/translations
+%else
+%define translationdir %{_datadir}/qt6/translations
+%endif
%description
Converts GPS waypoint, route and track data from one format type to
@@ -80,46 +111,41 @@ Graficzny interfejs Qt do programu GPSBabel.
%prep
%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}
+%if %{with qt5}
+%{__sed} -i -e '/QT NAMES / s/Qt6 //' gui/CMakeLists.txt
+%endif
%build
-%{__aclocal}
-%{__autoconf}
-%configure \
- --with-zlib=system \
- --with-libminizip=system \
- --with-doc=./manual
+install -d build
+cd build
+%cmake .. \
+ %{!?with_qtwebengine:-DGPSBABEL_MAPPREVIEW=OFF} \
+ -DGPSBABEL_WITH_SHAPELIB=pkgconfig \
+ -DGPSBABEL_WITH_ZLIB=findpackage
+
%{__make}
-%{__perl} xmldoc/makedoc
-%{__make} gpsbabel.html
+%{__make} package_app
+cd ..
-%if %{with qt5}
-cd gui
-qmake-qt5
-lrelease-qt5 *.ts
-%{__make}
+%if %{with doc}
+# docs generation requires in-source build
+%cmake .
+
+%{__make} gpsbabel.html
%endif
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_bindir}
-%{__make} install \
- DESTDIR=$RPM_BUILD_ROOT
-
-%if %{with qt5}
-install -d $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{name},%{translationdir}}
-install -p gui/gpsbabel*_*.qm $RPM_BUILD_ROOT%{translationdir}
-cp -p gui/gmapbase.html $RPM_BUILD_ROOT%{_datadir}/%{name}
+
+install build/gui/GPSBabelFE/gpsbabel $RPM_BUILD_ROOT%{_bindir}
+install build/gui/GPSBabelFE/gpsbabelfe $RPM_BUILD_ROOT%{_bindir}
+cp -p build/gui/GPSBabelFE/gmapbase.html $RPM_BUILD_ROOT%{_datadir}/%{name}
+cp -p build/gui/GPSBabelFE/translations/gpsbabel*.qm $RPM_BUILD_ROOT%{translationdir}
desktop-file-install \
--dir $RPM_BUILD_ROOT%{_desktopdir} \
@@ -128,33 +154,31 @@ desktop-file-install \
install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/256x256/apps
cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/256x256/apps
-#%find_lang %{name} --with-qt --all-name
-# TODO: patch find lang
-cat <<EOF > %{name}.lang
-%lang(de) %{translationdir}/gpsbabelfe_de.qm
-%lang(es) %{translationdir}/gpsbabelfe_es.qm
-%lang(fr) %{translationdir}/gpsbabelfe_fr.qm
-%lang(hu) %{translationdir}/gpsbabelfe_hu.qm
-%lang(it) %{translationdir}/gpsbabelfe_it.qm
-%lang(ru) %{translationdir}/gpsbabelfe_ru.qm
-EOF
-
-%endif
-
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc AUTHORS README* gpsbabel.html
+%doc AUTHORS NEWS README.igc README.md SECURITY.md %{?with_doc:gpsbabel.html}
%attr(755,root,root) %{_bindir}/gpsbabel
-
-%if %{with qt5}
-%files gui -f %{name}.lang
+%lang(de) %{translationdir}/gpsbabel_de.qm
+%lang(es) %{translationdir}/gpsbabel_es.qm
+%lang(fr) %{translationdir}/gpsbabel_fr.qm
+%lang(hu) %{translationdir}/gpsbabel_hu.qm
+%lang(it) %{translationdir}/gpsbabel_it.qm
+%lang(ru) %{translationdir}/gpsbabel_ru.qm
+
+%files gui
%defattr(644,root,root,755)
-%doc gui/{AUTHORS,README*,TODO}
-%{_desktopdir}/gpsbabel.desktop
-%{_iconsdir}/hicolor/*/apps/gpsbabel.png
+%doc gui/{README.gui,TODO}
+%attr(755,root,root) %{_bindir}/gpsbabelfe
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/gmapbase.html
-%endif
+%lang(de) %{translationdir}/gpsbabelfe_de.qm
+%lang(es) %{translationdir}/gpsbabelfe_es.qm
+%lang(fr) %{translationdir}/gpsbabelfe_fr.qm
+%lang(hu) %{translationdir}/gpsbabelfe_hu.qm
+%lang(it) %{translationdir}/gpsbabelfe_it.qm
+%lang(ru) %{translationdir}/gpsbabelfe_ru.qm
+%{_desktopdir}/gpsbabel.desktop
+%{_iconsdir}/hicolor/*/apps/gpsbabel.png
diff --git a/gmapbase.patch b/gmapbase.patch
index 11d25e3..0d9b5fa 100644
--- a/gmapbase.patch
+++ b/gmapbase.patch
@@ -1,12 +1,11 @@
-diff -ruNp gpsbabel-1.6.0.orig/gui/map.cc gpsbabel-1.6.0/gui/map.cc
---- gpsbabel-1.6.0.orig/gui/map.cc 2019-05-02 10:26:47.000000000 +0200
-+++ gpsbabel-1.6.0/gui/map.cc 2019-08-06 03:14:24.165967852 +0200
-@@ -90,7 +90,7 @@ Map::Map(QWidget* parent,
- connect(mclicker, SIGNAL(logTime(QString)), this, SLOT(logTime(QString)));
- #endif
-
+--- gpsbabel-gpsbabel_1_9_0/gui/map.cc.orig 2024-06-25 22:10:16.661252615 +0200
++++ gpsbabel-gpsbabel_1_9_0/gui/map.cc 2024-06-25 22:12:00.294024521 +0200
+@@ -92,7 +92,7 @@ Map::Map(QWidget* parent,
+ // 1. In the file system in the same directory as the executable.
+ // 2. In the Qt resource system. This is useful if the resource was compiled
+ // into the executable.
- QString baseFile = QApplication::applicationDirPath() + "/gmapbase.html";
-+ QString baseFile = "/usr/share/gpsbabel/gmapbase.html";
- if (!QFile(baseFile).exists()) {
- QMessageBox::critical(nullptr, appName,
- tr("Missing \"gmapbase.html\" file. Check installation"));
++ QString baseFile = "/usr/share/gpsbabel/gmapbase.html";
+ QString fileName;
+ QUrl baseUrl;
+ if (QFile(baseFile).exists()) {
diff --git a/gpsbabel-auto.patch b/gpsbabel-auto.patch
deleted file mode 100644
index 857bbad..0000000
--- a/gpsbabel-auto.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ruNp gpsbabel-1.6.0.orig/Makefile.in gpsbabel-1.6.0/Makefile.in
---- gpsbabel-1.6.0.orig/Makefile.in 2019-05-02 10:26:47.000000000 +0200
-+++ gpsbabel-1.6.0/Makefile.in 2019-08-06 03:08:26.267616865 +0200
-@@ -181,7 +181,7 @@ clean:
- $(srcdir)/test-all -W
-
- configure: configure.ac
-- autoconf
-+# autoconf
-
- tag:
- # svn commit
diff --git a/gpsbabel-link.patch b/gpsbabel-link.patch
deleted file mode 100644
index f9a65bd..0000000
--- a/gpsbabel-link.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ruNp gpsbabel-1.6.0.orig/Makefile.in gpsbabel-1.6.0/Makefile.in
---- gpsbabel-1.6.0.orig/Makefile.in 2019-05-02 10:26:47.000000000 +0200
-+++ gpsbabel-1.6.0/Makefile.in 2019-08-06 03:16:08.729486021 +0200
-@@ -121,7 +121,7 @@ LIBOBJS = route.o waypt.o filter_vecs.o
- src/core/textstream.o \
- src/core/usasciicodec.o \
- src/core/xmlstreamwriter.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/gpsbabel-system-minizip.patch b/gpsbabel-system-minizip.patch
deleted file mode 100644
index be0f24c..0000000
--- a/gpsbabel-system-minizip.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-diff -ruNp gpsbabel-1.6.0.orig/Makefile.in gpsbabel-1.6.0/Makefile.in
---- gpsbabel-1.6.0.orig/Makefile.in 2019-05-02 10:26:47.000000000 +0200
-+++ gpsbabel-1.6.0/Makefile.in 2019-08-06 03:31:17.476367571 +0200
-@@ -121,7 +121,7 @@ LIBOBJS = route.o waypt.o filter_vecs.o
- src/core/textstream.o \
- src/core/usasciicodec.o \
- src/core/xmlstreamwriter.o \
-- $(GARMIN) $(JEEPS) $(FMTS) $(FILTERS) $(SHAPE) @ZLIB@
-+ $(GARMIN) $(JEEPS) $(FMTS) $(FILTERS) $(SHAPE) @ZLIB@ @MINIZIP@
- OBJS = main.o globals.o $(LIBOBJS) @FILEINFO@
-
- DEPFILES = $(OBJS:.o=.d)
-diff -ruNp gpsbabel-1.6.0.orig/config.h.in gpsbabel-1.6.0/config.h.in
---- gpsbabel-1.6.0.orig/config.h.in 2019-05-02 10:26:47.000000000 +0200
-+++ gpsbabel-1.6.0/config.h.in 2019-08-06 03:32:15.346105354 +0200
-@@ -21,6 +21,9 @@
- /* Define to 1 if you have the `m' library (-lm). */
- #undef HAVE_LIBM
-
-+/* Define to 1 if you have the `minizip' library (-lminizip). */
-+#undef HAVE_LIBMINIZIP
-+
- /* Defined if you have libusb */
- #undef HAVE_LIBUSB
-
-@@ -66,6 +69,9 @@
- /* 1 to enable as many formats as possible */
- #undef MAXIMAL_ENABLED
-
-+/* 1 to inhibit our use of libminizip. */
-+#undef MINIZIP_INHIBITED
-+
- /* Define to the address where bug reports for this package should be sent. */
- #undef PACKAGE_BUGREPORT
-
-diff -ruNp gpsbabel-1.6.0.orig/configure.ac gpsbabel-1.6.0/configure.ac
---- gpsbabel-1.6.0.orig/configure.ac 2019-05-02 10:26:47.000000000 +0200
-+++ gpsbabel-1.6.0/configure.ac 2019-08-06 03:34:20.233539240 +0200
-@@ -128,6 +128,22 @@ AS_CASE([$with_zlib], ["system"], [
- AC_SUBST(ZLIB_CPP)
- AC_SUBST(ZLIB)
-
-+AC_MSG_CHECKING([whether to support zlib's minizip])
-+AC_ARG_WITH([libminizip],
-+ [AS_HELP_STRING(
-+ [--with-libminizip=(included)|system|no],
-+ [])])
-+AS_CASE([$with_libminizip], ["system"], [
-+ AC_CHECK_LIB([minizip], [zipOpen64])
-+], ["no"], [
-+ AC_DEFINE(MINIZIP_INHIBITED, 1, [1 to inhibit our use of libminizip.])
-+ AC_MSG_RESULT([no])
-+], [
-+ MINIZIP="\$(MINIZIP)"
-+ AC_MSG_RESULT([using included version])
-+])
-+AC_SUBST(MINIZIP)
-+
- AS_CASE(["$target"], [*-*-mingw32*], [
- FILEINFO=fileinfo.o
- AS_IF([test "$CC" = "gcc"], [
diff --git a/gpsbabel.desktop b/gpsbabel.desktop
index 4ae4525..b9505aa 100644
--- a/gpsbabel.desktop
+++ b/gpsbabel.desktop
@@ -2,8 +2,9 @@
Type=Application
Name=GPSBabel
Comment=Qt GUI interface for GPSBabel
+Comment[pl]=Graficzny interfejs Qt do GPSBabel
GenericName=GPSBabel
Icon=gpsbabel
-Exec=gpsbabelfe-bin
+Exec=gpsbabelfe
Terminal=false
Categories=Geography;Education;Utility;
diff --git a/use-system-shapelib.patch b/use-system-shapelib.patch
deleted file mode 100644
index 08d5bfb..0000000
--- a/use-system-shapelib.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff -ruNp gpsbabel-1.6.0.orig/Makefile.in gpsbabel-1.6.0/Makefile.in
---- gpsbabel-1.6.0.orig/Makefile.in 2019-05-02 10:26:47.000000000 +0200
-+++ gpsbabel-1.6.0/Makefile.in 2019-08-06 03:12:10.122585490 +0200
-@@ -105,7 +105,7 @@ JEEPS=jeeps/gpsapp.o jeeps/gpscom.o \
- # 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 \
-@@ -909,11 +909,7 @@ sbp.o: sbp.cc defs.h config.h zlib/zlib.
- session.o: session.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h \
- inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h
- shape.o: shape.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h \
-- inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.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
-+ inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h
- skyforce.o: skyforce.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h \
- inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h
- skytraq.o: skytraq.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h \
-diff -ruNp gpsbabel-1.6.0.orig/shape.cc gpsbabel-1.6.0/shape.cc
---- gpsbabel-1.6.0.orig/shape.cc 2019-05-02 10:26:47.000000000 +0200
-+++ gpsbabel-1.6.0/shape.cc 2019-08-06 03:12:55.459376594 +0200
-@@ -25,7 +25,7 @@
- #include <QtCore/QVector>
-
- #include "defs.h"
--#include "shapelib/shapefil.h"
-+#include <shapefil.h>
- #include <cstdlib>
-
- #if SHAPELIB_ENABLED
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gpsbabel.git/commitdiff/239d1ab3157bd4bb8cda81f11b24f7e48e588551
More information about the pld-cvs-commit
mailing list