[arch-commits] Commit in gpsbabel/trunk (PKGBUILD install.patch no-map.patch)
Antonio Rojas
arojas at gemini.archlinux.org
Sun Mar 13 13:41:29 UTC 2022
Date: Sunday, March 13, 2022 @ 13:41:27
Author: arojas
Revision: 1150969
Update to 1.8.0
Modified:
gpsbabel/trunk/PKGBUILD
Deleted:
gpsbabel/trunk/install.patch
gpsbabel/trunk/no-map.patch
---------------+
PKGBUILD | 60 ++-----
install.patch | 459 --------------------------------------------------------
no-map.patch | 162 -------------------
3 files changed, 22 insertions(+), 659 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-03-13 13:27:32 UTC (rev 1150968)
+++ PKGBUILD 2022-03-13 13:41:27 UTC (rev 1150969)
@@ -4,61 +4,45 @@
# Contributor: William Rea <sillywilly at gmail.com>
pkgname=gpsbabel
-pkgver=1.7.0
-pkgrel=2
+pkgver=1.8.0
+pkgrel=1
pkgdesc="Read, write and manipulate GPS waypoints in a variety of formats"
arch=(x86_64)
url="https://www.gpsbabel.org/"
license=(GPL)
-depends=(hicolor-icon-theme libusb qt5-base)
-makedepends=(libicns qt5-tools)
+depends=(hicolor-icon-theme libusb shapelib qt6-serialport qt6-5compat)
+makedepends=(cmake libicns qt6-tools)
source=(https://github.com/gpsbabel/$pkgname/archive/${pkgname}_${pkgver//./_}.tar.gz
- gpsbabel.appdata.xml
- install.patch
- no-map.patch)
-sha256sums=('30b186631fb43db576b8177385ed5c31a5a15c02a6bc07bae1e0d7af9058a797'
- '5eb52ab0c4bdde61c747856e849f9bce9ca660e942c15f730a4330a38fd6a39a'
- 'a12a48f2bcad5c2184cf2157488ee18d90f3415cb406eb8b70513f35dfe26b16'
- '378202355f7dd5a01df554af6298b8871e8ab8112aa2a7fa727d26434623da21')
+ gpsbabel.appdata.xml)
+sha256sums=('448379f0bf5f5e4514ed9ca8a1069b132f4d0e2ab350e2277e0166bf126b0832'
+ '5eb52ab0c4bdde61c747856e849f9bce9ca660e942c15f730a4330a38fd6a39a')
prepare() {
icns2png -x $pkgname-${pkgname}_${pkgver//./_}/gui/images/appicon.icns
-
- cd $pkgname-${pkgname}_${pkgver//./_}
-
- # Support make install for GUI on Linux systems
- # https://github.com/gpsbabel/gpsbabel/pull/391
- patch -Np1 -i ../install.patch
- sed -i '/INSTALLS +=/ s/ icon//' gui/app.pro
-
- # Remove map due to heavy WebEngine dependency
- # https://github.com/gpsbabel/gpsbabel/pull/606
- patch -Np1 -i ../no-map.patch
}
build() {
- cd $pkgname-${pkgname}_${pkgver//./_}
- ./configure --prefix=/usr
- make
-
- # GUI
- cd gui
- qmake-qt5 PREFIX=/usr
- lrelease *.ts
- make
+ cmake -B build -S $pkgname-${pkgname}_${pkgver//./_} \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DGPSBABEL_WITH_ZLIB=pkgconfig \
+ -DGPSBABEL_WITH_SHAPELIB=pkgconfig \
+ -DGPSBABEL_WITH_LIBUSB=pkgconfig \
+ -DGPSBABEL_MAPPREVIEW=OFF
+ cmake --build build
}
package() {
- cd $pkgname-${pkgname}_${pkgver//./_}
- make DESTDIR="$pkgdir" install
+ DESTDIR="$pkgdir" cmake --install build
- # GUI
- cd gui
- make INSTALL_ROOT="$pkgdir" install
- install -Dm644 ../../$pkgname.appdata.xml "$pkgdir/usr/share/metainfo/$pkgname.appdata.xml"
+# make install is broken
+ install -Dm755 build/gpsbabel build/gui/GPSBabelFE/gpsbabelfe -t "$pkgdir"/usr/bin
+ install -Dm644 $pkgname-${pkgname}_${pkgver//./_}/gui/*.qm $pkgname-${pkgname}_${pkgver//./_}/gui/coretool/*.qm -t "$pkgdir"/usr/share/gpsbabel/translations
+ install -Dm644 $pkgname-${pkgname}_${pkgver//./_}/gui/gmapbase.html -t "$pkgdir"/usr/share/gpsbabel
+ install -Dm644 $pkgname-${pkgname}_${pkgver//./_}/gui/gpsbabel.desktop -t "$pkgdir"/usr/share/applications
+ install -Dm644 $pkgname.appdata.xml -t "$pkgdir/usr/share/metainfo"
for res in 16 32 128 256 512; do
- install -Dm644 ../../appicon_${res}x${res}x32.png \
+ install -Dm644 appicon_${res}x${res}x32.png \
"$pkgdir/usr/share/icons/hicolor/${res}x${res}/apps/$pkgname.png"
done
}
Deleted: install.patch
===================================================================
--- install.patch 2022-03-13 13:27:32 UTC (rev 1150968)
+++ install.patch 2022-03-13 13:41:27 UTC (rev 1150969)
@@ -1,459 +0,0 @@
-From 814c4695e6789666d4416e5c06aed0858feb9791 Mon Sep 17 00:00:00 2001
-From: tsteven4 <13596209+tsteven4 at users.noreply.github.com>
-Date: Tue, 6 Aug 2019 08:59:32 -0600
-Subject: [PATCH 1/4] provide method to override file locations.
-
-linux installs typically install the translation files
-and gmapbase.html out of the tree. These operations are now
-supported, see. gui/app.pro and look for PKGDATADIR, QTTRANSLATIONDIR.
----
- gui/app.pro | 24 ++++++++++++++++++++++++
- gui/mainwindow.cc | 7 +++++--
- gui/map.cc | 7 +++++--
- 3 files changed, 34 insertions(+), 4 deletions(-)
-
-diff --git a/gui/app.pro b/gui/app.pro
-index cb1992bc0..de283ce0c 100755
---- a/gui/app.pro
-+++ b/gui/app.pro
-@@ -33,6 +33,30 @@ unix {
- DEFINES += HAVE_UDEV
- PKGCONFIG += libudev
- }
-+
-+ # To override the installed location of gmapbase.html set PKGDATADIR.
-+ # e.g. qmake PKGDATADIR=/usr/share/gpsbabel
-+ !isEmpty(PKGDATADIR):DEFINES += PKGDATADIR=\\\"$$PKGDATADIR\\\"
-+
-+ # To override the installed location of the translation files (*.qm)
-+ # set QTTRANSLATIONDIR.
-+ # Common use case 1:
-+ # If the translations are installed local to the package then
-+ # gpsbabel_*.qm, gpsbabelfe_*.qm and the concatenated qt_*.qm must all
-+ # be in QTTRANSLATIONDIR.
-+ # .e.g. qmake QTTRANSLATIONDIR=/usr/share/gpsbabel/translations
-+ # Note that the package_app target will create the concatenated qt_*.qm files.
-+ # The concatenated qt_*.qm files are DIFFERENT from the
-+ # the Qt provided meta catalog file of the same name, the concatenated
-+ # qt_*.qm files include all the necessary Qt provided module qm files.
-+ # Common use case 2:
-+ # If the translations are installed in the directory that contains all the
-+ # original Qt provided translations, then only gpsbabel_*.qm and
-+ # gpsbabelfe_*.qm need be installed alongside the original Qt provided
-+ # translations (which include the meta catalogs as well as the module
-+ # qm files.)
-+ # .e.g. qmake QTTRANSLATIONDIR=/usr/share/qt5/translations
-+ !isEmpty(QTTRANSLATIONDIR):DEFINES += QTTRANSLATIONDIR=\\\"$$QTTRANSLATIONDIR\\\"
- }
-
- UI_DIR = tmp
-diff --git a/gui/mainwindow.cc b/gui/mainwindow.cc
-index 80a6bbc62..17202c0c9 100644
---- a/gui/mainwindow.cc
-+++ b/gui/mainwindow.cc
-@@ -219,8 +219,11 @@ MainWindow::MainWindow(QWidget* parent): QMainWindow(parent)
-
- ui_.outputWindow->setReadOnly(true);
-
-- langPath_ = QApplication::applicationDirPath();
-- langPath_.append("/translations/");
-+#ifdef QTTRANSLATIONDIR
-+ langPath_ = QTTRANSLATIONDIR;
-+#else
-+ langPath_ = QApplication::applicationDirPath() + "/translations";
-+#endif
-
- // Start up in the current system language.
- loadLanguage(QLocale::system().name());
-diff --git a/gui/map.cc b/gui/map.cc
-index 9efeb6e09..42045845a 100644
---- a/gui/map.cc
-+++ b/gui/map.cc
-@@ -90,13 +90,16 @@ Map::Map(QWidget* parent,
- connect(mclicker, SIGNAL(logTime(QString)), this, SLOT(logTime(QString)));
- #endif
-
-+#ifdef PKGDATADIR
-+ QString baseFile = PKGDATADIR + "/gmapbase.html";
-+#else
- QString baseFile = QApplication::applicationDirPath() + "/gmapbase.html";
-+#endif
- if (!QFile(baseFile).exists()) {
- QMessageBox::critical(nullptr, appName,
- tr("Missing \"gmapbase.html\" file. Check installation"));
- } else {
-- QString urlStr = "file:///" + baseFile;
-- this->load(QUrl(urlStr));
-+ this->load(QUrl::fromLocalFile(baseFile));
- }
-
- #ifdef DEBUG_JS_GENERATION
-
-From 217dc1e0085a0e83d65f565254476e276fc15f0d Mon Sep 17 00:00:00 2001
-From: tsteven4 <13596209+tsteven4 at users.noreply.github.com>
-Date: Tue, 6 Aug 2019 13:49:19 -0600
-Subject: [PATCH 2/4] fix error using PKGDATADIR concatenation.
-
----
- gui/map.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gui/map.cc b/gui/map.cc
-index 42045845a..661aa19a8 100644
---- a/gui/map.cc
-+++ b/gui/map.cc
-@@ -91,7 +91,7 @@ Map::Map(QWidget* parent,
- #endif
-
- #ifdef PKGDATADIR
-- QString baseFile = PKGDATADIR + "/gmapbase.html";
-+ QString baseFile = PKGDATADIR "/gmapbase.html";
- #else
- QString baseFile = QApplication::applicationDirPath() + "/gmapbase.html";
- #endif
-
-From c6a8e404d4cd750b0e615ea68d01e8d2cc8dd363 Mon Sep 17 00:00:00 2001
-From: tsteven4 <13596209+tsteven4 at users.noreply.github.com>
-Date: Thu, 8 Aug 2019 12:52:37 -0600
-Subject: [PATCH 3/4] use a search path for finding translation files.
-
-We search for translation files (*.qm) in this order:
-1a. Relative to the executable, specifically at
- QApplication::applicationDirPath() + "/translations".
- This works when we package the app on windows and macos.
- It also works we create a bundled app on linux,
- for example with the package target. However, linux packagers typically
- install the translation files in another location.
- OR
-1b. In PKGDATADIR/translations. This works for linux packages that
- place the translations in PKGDATADIR/translations, e.g.
- qmake PKGDATADIR=/usr/share/gpsbabel with the translations in
- /usr/share/gpsbabel/translations.
-2. In the Qt TranslationsPath. If this is not overridden in qt.conf it
- will point to the hard-coded paths that are compiled into the Qt library.
- This hard-coded path can be found with "qmake -query QT_INSTALL_TRANSLATIONS".
- This works for linux packages that have some or all translation files
- installed in the original location they used when compiling Qt.
-
-Further details can be found in app.pro.
----
- gui/app.pro | 72 ++++++++++++++++++++++++++++++++---------------
- gui/mainwindow.cc | 29 ++++++++++++-------
- gui/mainwindow.h | 1 -
- 3 files changed, 69 insertions(+), 33 deletions(-)
-
-diff --git a/gui/app.pro b/gui/app.pro
-index de283ce0c..9024e16eb 100755
---- a/gui/app.pro
-+++ b/gui/app.pro
-@@ -34,29 +34,57 @@ unix {
- PKGCONFIG += libudev
- }
-
-- # To override the installed location of gmapbase.html set PKGDATADIR.
-- # e.g. qmake PKGDATADIR=/usr/share/gpsbabel
-- !isEmpty(PKGDATADIR):DEFINES += PKGDATADIR=\\\"$$PKGDATADIR\\\"
-+ # Setting PKGDATADIR will:
-+ # 1. Look for gmapbase.html in PKGDATADIR instead
-+ # of in QApplication::applicationDirPath().
-+ # E.g. qmake PKGDATADIR=/usr/share/gpsbabel
-+ # will use /usr/share/gpsbabel/gmapbase.html instead of
-+ # QApplication::applicationDirPath() + "/gmapbase.html".
-+ # 2. Substitude PKGDATADIR/translations in the search path for
-+ # translation files instead of
-+ # QApplication::applicationDirPath() + "/translations".
-+ # E.g. qmake PKGDATADIR=/usr/share/gpsbabel
-+ # will look in /usr/share/gpsbabel/translations instead of
-+ # QApplication::applicationDirPath() + "/translations".
-+
-+ # We search for translation files (*.qm) in this order:
-+ # 1a. Relative to the executable, specifically at
-+ # QApplication::applicationDirPath() + "/translations".
-+ # This works when we package the app on windows and macos.
-+ # It also works we create a bundled app on linux,
-+ # for example with the package target. However, linux packagers typically
-+ # install the translation files in another location.
-+ # OR
-+ # 1b. In PKGDATADIR/translations. This works for linux packages that
-+ # place the translations in PKGDATADIR/translations, e.g.
-+ # qmake PKGDATADIR=/usr/share/gpsbabel with the translations in
-+ # /usr/share/gpsbabel/translations.
-+ # 2. In the Qt TranslationsPath. If this is not overridden in qt.conf it
-+ # will point to the hard-coded paths that are compiled into the Qt library.
-+ # This hard-coded path can be found with "qmake -query QT_INSTALL_TRANSLATIONS".
-+ # This works for linux packages that have some or all translation files
-+ # installed in the original location they used when compiling Qt.
-+
-+ # There are three sets of translation files that should be available
-+ # when running gpsbabelfe:
-+ # 1. gpsbabelfe_*.qm
-+ # 2. gpsbabel_*.qm
-+ # 3a. The Qt supplied meta catalogs (qt_*.qm) and the module files they
-+ # refer to (qt*_*.qm).
-+ # Note if you are counting on finding the Qt supplied translations,
-+ # then the package that provides the Qt translations
-+ # needs to be a prerequisite to the gpsbabel gui package.
-+ # OR
-+ # 3b. The concatentated translation files for the modules that gpsbabelfe
-+ # uses. These files are created by building the package target.
-+ # These are named identically to the Qt translation meta catalogs, i.e.
-+ # qt_*.qm, but contain the necessary translation data for the modules
-+ # gpsbabelfe uses.
-+ # A description of the meta catalogs and concatentation process is
-+ # available at
-+ # https://doc.qt.io/qt-5/linguist-programmers.html#deploying-translations
-
-- # To override the installed location of the translation files (*.qm)
-- # set QTTRANSLATIONDIR.
-- # Common use case 1:
-- # If the translations are installed local to the package then
-- # gpsbabel_*.qm, gpsbabelfe_*.qm and the concatenated qt_*.qm must all
-- # be in QTTRANSLATIONDIR.
-- # .e.g. qmake QTTRANSLATIONDIR=/usr/share/gpsbabel/translations
-- # Note that the package_app target will create the concatenated qt_*.qm files.
-- # The concatenated qt_*.qm files are DIFFERENT from the
-- # the Qt provided meta catalog file of the same name, the concatenated
-- # qt_*.qm files include all the necessary Qt provided module qm files.
-- # Common use case 2:
-- # If the translations are installed in the directory that contains all the
-- # original Qt provided translations, then only gpsbabel_*.qm and
-- # gpsbabelfe_*.qm need be installed alongside the original Qt provided
-- # translations (which include the meta catalogs as well as the module
-- # qm files.)
-- # .e.g. qmake QTTRANSLATIONDIR=/usr/share/qt5/translations
-- !isEmpty(QTTRANSLATIONDIR):DEFINES += QTTRANSLATIONDIR=\\\"$$QTTRANSLATIONDIR\\\"
-+ !isEmpty(PKGDATADIR):DEFINES += PKGDATADIR=\\\"$$PKGDATADIR\\\"
- }
-
- UI_DIR = tmp
-diff --git a/gui/mainwindow.cc b/gui/mainwindow.cc
-index 17202c0c9..9708962ac 100644
---- a/gui/mainwindow.cc
-+++ b/gui/mainwindow.cc
-@@ -26,11 +26,14 @@
- #include <QtCore/QEvent> // for QEvent (& QEvent::LanguageChange, QEvent::LocaleChange)
- #include <QtCore/QFile> // for QFile
- #include <QtCore/QFileInfo> // for QFileInfo
-+#include <QtCore/QLibraryInfo> // for QLibraryInfo, QLibraryInfo::TranslationsPath
- #include <QtCore/QLocale> // for QLocale
- #include <QtCore/QMimeData> // for QMimeData
- #include <QtCore/QProcess> // for QProcess, QProcess::NotRunning
- #include <QtCore/QRegExp> // for QRegExp
- #include <QtCore/QSettings> // for QSettings
-+#include <QtCore/QString> // for QString
-+#include <QtCore/QStringList> // for QStringList
- #include <QtCore/QTemporaryFile> // for QTemporaryFile
- #include <QtCore/QTime> // for QTime
- #include <QtCore/QUrl> // for QUrl
-@@ -39,7 +42,6 @@
- #include <QtCore/QtGlobal> // for foreach
- #include <QtGui/QCursor> // for QCursor
- #include <QtGui/QDesktopServices> // for QDesktopServices
--#include <QtGui/QIcon> // for QIcon
- #include <QtGui/QImage> // for QImage
- #include <QtWidgets/QApplication> // for QApplication, qApp
- #include <QtWidgets/QCheckBox> // for QCheckBox
-@@ -219,12 +221,6 @@ MainWindow::MainWindow(QWidget* parent): QMainWindow(parent)
-
- ui_.outputWindow->setReadOnly(true);
-
--#ifdef QTTRANSLATIONDIR
-- langPath_ = QTTRANSLATIONDIR;
--#else
-- langPath_ = QApplication::applicationDirPath() + "/translations";
--#endif
--
- // Start up in the current system language.
- loadLanguage(QLocale::system().name());
- loadFormats();
-@@ -314,9 +310,22 @@ void MainWindow::switchTranslator(QTranslator& translator, const QString& filena
- // remove the old translator
- qApp->removeTranslator(&translator);
-
-- // load the new translator
-- if (translator.load(filename, langPath_)) {
-- qApp->installTranslator(&translator);
-+ // Set a list of directories to search for the translation file.
-+ const QStringList directories = {
-+#ifdef PKGDATADIR
-+ PKGDATADIR "/translations",
-+#else
-+ QApplication::applicationDirPath() + "/translations",
-+#endif
-+ QLibraryInfo::location(QLibraryInfo::TranslationsPath)
-+ };
-+
-+ // Load the new translator.
-+ for (const auto& directory : directories) {
-+ if (translator.load(filename, directory)) {
-+ qApp->installTranslator(&translator);
-+ break;
-+ }
- }
- }
-
-diff --git a/gui/mainwindow.h b/gui/mainwindow.h
-index 3fd107fbf..b6de39944 100644
---- a/gui/mainwindow.h
-+++ b/gui/mainwindow.h
-@@ -70,7 +70,6 @@ class MainWindow: public QMainWindow
- QTranslator translatorCore_; // translation for the core application.
- QTranslator translatorQt_; // translations for Qt.
- QString currLang_; // currently loaded language.
-- QString langPath_; // Absolute path of language files.
-
- private:
- void loadFormats();
-
-From 203f13c6b222ab4f283d5335fa7255e8c8692824 Mon Sep 17 00:00:00 2001
-From: Chris Mayo <aklhfex at gmail.com>
-Date: Sun, 11 Aug 2019 19:35:00 +0100
-Subject: [PATCH 4/4] Support make install for GUI on Linux systems
-
----
- gui/app.pro | 128 +++++++++++++++++++++++++++++++---------------------
- 1 file changed, 76 insertions(+), 52 deletions(-)
-
-diff --git a/gui/app.pro b/gui/app.pro
-index 9024e16eb..5305124a0 100755
---- a/gui/app.pro
-+++ b/gui/app.pro
-@@ -33,58 +33,6 @@ unix {
- DEFINES += HAVE_UDEV
- PKGCONFIG += libudev
- }
--
-- # Setting PKGDATADIR will:
-- # 1. Look for gmapbase.html in PKGDATADIR instead
-- # of in QApplication::applicationDirPath().
-- # E.g. qmake PKGDATADIR=/usr/share/gpsbabel
-- # will use /usr/share/gpsbabel/gmapbase.html instead of
-- # QApplication::applicationDirPath() + "/gmapbase.html".
-- # 2. Substitude PKGDATADIR/translations in the search path for
-- # translation files instead of
-- # QApplication::applicationDirPath() + "/translations".
-- # E.g. qmake PKGDATADIR=/usr/share/gpsbabel
-- # will look in /usr/share/gpsbabel/translations instead of
-- # QApplication::applicationDirPath() + "/translations".
--
-- # We search for translation files (*.qm) in this order:
-- # 1a. Relative to the executable, specifically at
-- # QApplication::applicationDirPath() + "/translations".
-- # This works when we package the app on windows and macos.
-- # It also works we create a bundled app on linux,
-- # for example with the package target. However, linux packagers typically
-- # install the translation files in another location.
-- # OR
-- # 1b. In PKGDATADIR/translations. This works for linux packages that
-- # place the translations in PKGDATADIR/translations, e.g.
-- # qmake PKGDATADIR=/usr/share/gpsbabel with the translations in
-- # /usr/share/gpsbabel/translations.
-- # 2. In the Qt TranslationsPath. If this is not overridden in qt.conf it
-- # will point to the hard-coded paths that are compiled into the Qt library.
-- # This hard-coded path can be found with "qmake -query QT_INSTALL_TRANSLATIONS".
-- # This works for linux packages that have some or all translation files
-- # installed in the original location they used when compiling Qt.
--
-- # There are three sets of translation files that should be available
-- # when running gpsbabelfe:
-- # 1. gpsbabelfe_*.qm
-- # 2. gpsbabel_*.qm
-- # 3a. The Qt supplied meta catalogs (qt_*.qm) and the module files they
-- # refer to (qt*_*.qm).
-- # Note if you are counting on finding the Qt supplied translations,
-- # then the package that provides the Qt translations
-- # needs to be a prerequisite to the gpsbabel gui package.
-- # OR
-- # 3b. The concatentated translation files for the modules that gpsbabelfe
-- # uses. These files are created by building the package target.
-- # These are named identically to the Qt translation meta catalogs, i.e.
-- # qt_*.qm, but contain the necessary translation data for the modules
-- # gpsbabelfe uses.
-- # A description of the meta catalogs and concatentation process is
-- # available at
-- # https://doc.qt.io/qt-5/linguist-programmers.html#deploying-translations
--
-- !isEmpty(PKGDATADIR):DEFINES += PKGDATADIR=\\\"$$PKGDATADIR\\\"
- }
-
- UI_DIR = tmp
-@@ -189,3 +137,79 @@ macx|linux{
- QMAKE_DISTCLEAN += compile_commands.json
- }
-
-+linux:!isEmpty(PREFIX) {
-+ DATADIR = $$PREFIX/share
-+ ICONSDIR = $$DATADIR/pixmaps
-+ PKGDATADIR = $$DATADIR/gpsbabel
-+
-+ target.path = $$PREFIX/bin
-+
-+ desktop.path = $$DATADIR/applications
-+ desktop.files = gpsbabel.desktop
-+
-+ icon.path = $$ICONSDIR
-+ icon.extra = $(INSTALL_FILE) images/appicon.png $(INSTALL_ROOT)$$ICONSDIR/gpsbabel.png
-+
-+ gmapbase.files = gmapbase.html
-+ gmapbase.path = $$PKGDATADIR
-+
-+ translations.files = gpsbabelfe_*.qm
-+ translations.files += coretool/gpsbabel_*.qm
-+ translations.path = $$PKGDATADIR/translations
-+
-+ INSTALLS += target desktop icon gmapbase translations
-+}
-+
-+unix {
-+ # Setting PKGDATADIR will:
-+ # 1. Look for gmapbase.html in PKGDATADIR instead
-+ # of in QApplication::applicationDirPath().
-+ # E.g. qmake PKGDATADIR=/usr/share/gpsbabel
-+ # will use /usr/share/gpsbabel/gmapbase.html instead of
-+ # QApplication::applicationDirPath() + "/gmapbase.html".
-+ # 2. Substitude PKGDATADIR/translations in the search path for
-+ # translation files instead of
-+ # QApplication::applicationDirPath() + "/translations".
-+ # E.g. qmake PKGDATADIR=/usr/share/gpsbabel
-+ # will look in /usr/share/gpsbabel/translations instead of
-+ # QApplication::applicationDirPath() + "/translations".
-+
-+ # We search for translation files (*.qm) in this order:
-+ # 1a. Relative to the executable, specifically at
-+ # QApplication::applicationDirPath() + "/translations".
-+ # This works when we package the app on windows and macos.
-+ # It also works we create a bundled app on linux,
-+ # for example with the package target. However, linux packagers typically
-+ # install the translation files in another location.
-+ # OR
-+ # 1b. In PKGDATADIR/translations. This works for linux packages that
-+ # place the translations in PKGDATADIR/translations, e.g.
-+ # qmake PKGDATADIR=/usr/share/gpsbabel with the translations in
-+ # /usr/share/gpsbabel/translations.
-+ # 2. In the Qt TranslationsPath. If this is not overridden in qt.conf it
-+ # will point to the hard-coded paths that are compiled into the Qt library.
-+ # This hard-coded path can be found with "qmake -query QT_INSTALL_TRANSLATIONS".
-+ # This works for linux packages that have some or all translation files
-+ # installed in the original location they used when compiling Qt.
-+
-+ # There are three sets of translation files that should be available
-+ # when running gpsbabelfe:
-+ # 1. gpsbabelfe_*.qm
-+ # 2. gpsbabel_*.qm
-+ # 3a. The Qt supplied meta catalogs (qt_*.qm) and the module files they
-+ # refer to (qt*_*.qm).
-+ # Note if you are counting on finding the Qt supplied translations,
-+ # then the package that provides the Qt translations
-+ # needs to be a prerequisite to the gpsbabel gui package.
-+ # OR
-+ # 3b. The concatentated translation files for the modules that gpsbabelfe
-+ # uses. These files are created by building the package target.
-+ # These are named identically to the Qt translation meta catalogs, i.e.
-+ # qt_*.qm, but contain the necessary translation data for the modules
-+ # gpsbabelfe uses.
-+ # A description of the meta catalogs and concatentation process is
-+ # available at
-+ # https://doc.qt.io/qt-5/linguist-programmers.html#deploying-translations
-+
-+ !isEmpty(PKGDATADIR):DEFINES += PKGDATADIR=\\\"$$PKGDATADIR\\\"
-+}
Deleted: no-map.patch
===================================================================
--- no-map.patch 2022-03-13 13:27:32 UTC (rev 1150968)
+++ no-map.patch 2022-03-13 13:41:27 UTC (rev 1150969)
@@ -1,162 +0,0 @@
-From 58b44bb24ceedf8de9a728ed13ac1a3f51f933a5 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor at gmail.com>
-Date: Tue, 14 Jul 2020 00:02:13 +0200
-Subject: [PATCH] Make the map optional
-
-This makes the webengine/webkit dependency optional.
----
- gui/advdlg.cc | 4 ++++
- gui/app.pro | 5 ++++-
- gui/gmapdlg.cc | 2 ++
- gui/gmapdlg.h | 2 ++
- gui/mainwindow.cc | 6 ++++++
- gui/map.cc | 2 ++
- gui/map.h | 2 ++
- 7 files changed, 22 insertions(+), 1 deletion(-)
-
-diff --git a/gui/advdlg.cc b/gui/advdlg.cc
-index 469aa4694..17779d544 100644
---- a/gui/advdlg.cc
-+++ b/gui/advdlg.cc
-@@ -37,7 +37,11 @@ AdvDlg::AdvDlg(QWidget* parent,
- {
- ui_.setupUi(this);
- ui_.synthShortNames->setChecked(synthShortNames);
-+#if HAVE_WEBENGINE || HAVE_WEBKIT
- ui_.previewGmap->setChecked(previewGmap);
-+#else // HAVE_WEBENGINE || HAVE_WEBKIT
-+ ui_.previewGmap->hide();
-+#endif // HAVE_WEBENGINE || HAVE_WEBKIT
- ui_.debugCombo->setCurrentIndex(debugLevel+1);
- #if defined (Q_OS_WIN)
- ui_.buttonBox->button(QDialogButtonBox::Ok)->setIcon(QIcon(":/images/ok.png"));
-diff --git a/gui/app.pro b/gui/app.pro
-index 4daefde48..d3523862e 100755
---- a/gui/app.pro
-+++ b/gui/app.pro
-@@ -18,7 +18,10 @@ qtHaveModule(webenginewidgets) {
- QT += webenginewidgets webchannel
- DEFINES += HAVE_WEBENGINE
- } else {
-- QT += webkit webkitwidgets
-+ qtHaveModule(webkitwidgets) {
-+ QT += webkit webkitwidgets
-+ DEFINES += HAVE_WEBKIT
-+ }
- }
-
- unix:DESTDIR = objects
-diff --git a/gui/gmapdlg.cc b/gui/gmapdlg.cc
-index 8b761441b..3dedf8be4 100644
---- a/gui/gmapdlg.cc
-+++ b/gui/gmapdlg.cc
-@@ -21,6 +21,7 @@
- //
- //------------------------------------------------------------------------
-
-+#if HAVE_WEBENGINE || HAVE_WEBKIT
- #include <QStandardItemModel>
- #include <QMenu>
- #include <QHeaderView>
-@@ -580,3 +581,4 @@ void GMapDialog::copyButtonClickedX()
- {
-
- }
-+#endif // HAVE_WEBENGINE || HAVE_WEBKIT
-diff --git a/gui/gmapdlg.h b/gui/gmapdlg.h
-index 461c89cab..5c3b414a7 100644
---- a/gui/gmapdlg.h
-+++ b/gui/gmapdlg.h
-@@ -20,6 +20,7 @@
- // USA.
- //
- //------------------------------------------------------------------------
-+#if HAVE_WEBENGINE || HAVE_WEBKIT
- #ifndef GMAPDLG_H
- #define GMAPDLG_H
-
-@@ -92,3 +93,4 @@ private slots:
- };
-
- #endif
-+#endif // HAVE_WEBENGINE || HAVE_WEBKIT
-diff --git a/gui/mainwindow.cc b/gui/mainwindow.cc
-index 22b2b449c..4c496b18c 100644
---- a/gui/mainwindow.cc
-+++ b/gui/mainwindow.cc
-@@ -62,7 +62,9 @@
- #include "donate.h" // for Donate
- #include "filterdlg.h" // for FilterDialog
- #include "formatload.h" // for FormatLoad
-+#if HAVE_WEBENGINE || HAVE_WEBKIT
- #include "gmapdlg.h" // for GMapDialog
-+#endif // HAVE_WEBENGINE || HAVE_WEBKIT
- #include "help.h" // for ShowHelp
- #include "optionsdlg.h" // for OptionsDlg
- #include "preferences.h" // for Preferences
-@@ -1023,6 +1025,7 @@ void MainWindow::applyActionX()
- }
-
- // Now output for preview in google maps
-+#if HAVE_WEBENGINE || HAVE_WEBKIT
- QString tempName;
- if (babelData_.previewGmap_) {
- QTemporaryFile ftemp;
-@@ -1039,6 +1042,7 @@ void MainWindow::applyActionX()
- args << "gpx";
- args << "-F" << tempName;
- }
-+#endif // HAVE_WEBENGINE || HAVE_WEBKIT
-
- ui_.outputWindow->clear();
- ui_.outputWindow->appendPlainText("gpsbabel " + args.join(" "));
-@@ -1052,6 +1056,7 @@ void MainWindow::applyActionX()
- ui_.outputWindow->appendPlainText(outputString);
- if (x) {
- ui_.outputWindow->appendPlainText(tr("Translation successful"));
-+#if HAVE_WEBENGINE || HAVE_WEBKIT
- if (babelData_.previewGmap_) {
- this->hide();
- GMapDialog dlg(nullptr, tempName, babelData_.debugLevel_ >=1 ? ui_.outputWindow : nullptr);
-@@ -1060,6 +1065,7 @@ void MainWindow::applyActionX()
- QFile(tempName).remove();
- this->show();
- }
-+#endif // HAVE_WEBENGINE || HAVE_WEBKIT
- } else {
- ui_.outputWindow->appendPlainText(tr("Error running gpsbabel: %1\n").arg(errorString));
- }
-diff --git a/gui/map.cc b/gui/map.cc
-index a55c752e3..0acbfba79 100644
---- a/gui/map.cc
-+++ b/gui/map.cc
-@@ -20,6 +20,7 @@
- // USA.
- //
- //------------------------------------------------------------------------
-+#if HAVE_WEBENGINE || HAVE_WEBKIT
- #include "map.h"
-
- #include <QNetworkRequest>
-@@ -471,3 +472,4 @@ void Map::evaluateJS(const QStringList& s, bool upd)
- {
- evaluateJS(s.join('\n'), upd);
- }
-+#endif // HAVE_WEBENGINE || HAVE_WEBKIT
-diff --git a/gui/map.h b/gui/map.h
-index 460e1c9b7..b03ad976a 100644
---- a/gui/map.h
-+++ b/gui/map.h
-@@ -20,6 +20,7 @@
- // USA.
- //
- //------------------------------------------------------------------------
-+#if HAVE_WEBENGINE || HAVE_WEBKIT
- #ifndef MAP_H
- #define MAP_H
- #if HAVE_WEBENGINE
-@@ -127,3 +128,4 @@ public slots:
-
-
- #endif // HEADER_H
-+#endif // HAVE_WEBENGINE || HAVE_WEBKIT
More information about the arch-commits
mailing list