about summary refs log tree commit diff
path: root/pkgs/applications/gis
diff options
context:
space:
mode:
authorNikolay Korotkiy <sikmir@disroot.org>2023-07-21 23:24:17 +0400
committerNikolay Korotkiy <sikmir@disroot.org>2023-07-21 23:42:30 +0400
commit4d2ce90a43e3a7d2775fd2060f202fa0daf8d44c (patch)
treec41c63e969d8b75fc5eaa5d7cd73edac523ba207 /pkgs/applications/gis
parent14cc255189a3862bde6dba8e72685c6c17e91934 (diff)
downloadnixlib-4d2ce90a43e3a7d2775fd2060f202fa0daf8d44c.tar
nixlib-4d2ce90a43e3a7d2775fd2060f202fa0daf8d44c.tar.gz
nixlib-4d2ce90a43e3a7d2775fd2060f202fa0daf8d44c.tar.bz2
nixlib-4d2ce90a43e3a7d2775fd2060f202fa0daf8d44c.tar.lz
nixlib-4d2ce90a43e3a7d2775fd2060f202fa0daf8d44c.tar.xz
nixlib-4d2ce90a43e3a7d2775fd2060f202fa0daf8d44c.tar.zst
nixlib-4d2ce90a43e3a7d2775fd2060f202fa0daf8d44c.zip
qmapshack: 1.16.1 → 1.17.0
Diffstat (limited to 'pkgs/applications/gis')
-rw-r--r--pkgs/applications/gis/qmapshack/default.nix15
-rw-r--r--pkgs/applications/gis/qmapshack/fix-qttranslations-path.patch102
2 files changed, 59 insertions, 58 deletions
diff --git a/pkgs/applications/gis/qmapshack/default.nix b/pkgs/applications/gis/qmapshack/default.nix
index b22a8d408deb..2665e74ed395 100644
--- a/pkgs/applications/gis/qmapshack/default.nix
+++ b/pkgs/applications/gis/qmapshack/default.nix
@@ -1,15 +1,15 @@
-{ mkDerivation, lib, fetchFromGitHub, cmake, substituteAll
+{ lib, stdenv, fetchFromGitHub, cmake, substituteAll, wrapQtAppsHook
 , qtscript, qttranslations, qtwebengine, gdal, proj, routino, quazip }:
 
-mkDerivation rec {
+stdenv.mkDerivation rec {
   pname = "qmapshack";
-  version = "1.16.1";
+  version = "1.17.0";
 
   src = fetchFromGitHub {
     owner = "Maproom";
-    repo = pname;
+    repo = "qmapshack";
     rev = "V_${version}";
-    sha256 = "sha256-2otvRKtFb51PLrIh/Hxltp69n5nyR63HGGvk73TFjqA=";
+    hash = "sha256-qG/fiR2J5wQZaR+xvBGjdp3L7viqki2ktkzBUf6fZi8=";
   };
 
   patches = [
@@ -20,7 +20,7 @@ mkDerivation rec {
     })
   ];
 
-  nativeBuildInputs = [ cmake ];
+  nativeBuildInputs = [ cmake wrapQtAppsHook ];
 
   buildInputs = [ qtscript qtwebengine gdal proj routino quazip ];
 
@@ -33,8 +33,9 @@ mkDerivation rec {
   ];
 
   meta = with lib; {
-    homepage = "https://github.com/Maproom/qmapshack";
     description = "Consumer grade GIS software";
+    homepage = "https://github.com/Maproom/qmapshack";
+    changelog = "https://github.com/Maproom/qmapshack/blob/V_${version}/changelog.txt";
     license = licenses.gpl3Plus;
     maintainers = with maintainers; [ dotlambda sikmir ];
     platforms = with platforms; linux;
diff --git a/pkgs/applications/gis/qmapshack/fix-qttranslations-path.patch b/pkgs/applications/gis/qmapshack/fix-qttranslations-path.patch
index f91f4228d2ce..9f05611f5a28 100644
--- a/pkgs/applications/gis/qmapshack/fix-qttranslations-path.patch
+++ b/pkgs/applications/gis/qmapshack/fix-qttranslations-path.patch
@@ -1,74 +1,74 @@
 diff --git i/src/qmapshack/setup/CAppSetupLinux.cpp w/src/qmapshack/setup/CAppSetupLinux.cpp
-index 63ea06c0..3a03b816 100644
+index 7581ef32..26eba3c8 100644
 --- i/src/qmapshack/setup/CAppSetupLinux.cpp
 +++ w/src/qmapshack/setup/CAppSetupLinux.cpp
-@@ -30,7 +30,7 @@ void CAppSetupLinux::initQMapShack()
-     prepareGdal("", "");
+@@ -30,7 +30,7 @@ void CAppSetupLinux::initQMapShack() {
+   prepareGdal("", "");
  
-     // setup translators
--    QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
-+    QLatin1String resourceDir = QLatin1String("@qttranslations@/translations");
-     QString translationPath = QCoreApplication::applicationDirPath();
-     translationPath.replace(QRegExp("bin$"), "share/qmapshack/translations");
-     prepareTranslator(resourceDir, "qt_");
+   // setup translators
+-  QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
++  QLatin1String resourceDir = QLatin1String("@qttranslations@/translations");
+   QString translationPath = QCoreApplication::applicationDirPath();
+   translationPath.replace(QRegExp("bin$"), "share/qmapshack/translations");
+   prepareTranslator(resourceDir, "qt_");
 diff --git i/src/qmapshack/setup/CAppSetupMac.cpp w/src/qmapshack/setup/CAppSetupMac.cpp
-index ad9b21e9..9dca8a1e 100644
+index 37602802..ae4a5a23 100644
 --- i/src/qmapshack/setup/CAppSetupMac.cpp
 +++ w/src/qmapshack/setup/CAppSetupMac.cpp
-@@ -63,7 +63,7 @@ void CAppSetupMac::initQMapShack()
+@@ -56,7 +56,7 @@ void CAppSetupMac::initQMapShack() {
  
-     // setup translators
-     QString translationPath = getApplicationDir(relTranslationDir).absolutePath();
--    prepareTranslator(translationPath, "qt_");
-+    prepareTranslator(QLatin1String("@qttranslations@/translations"), "qt_");
-     prepareTranslator(translationPath, "qmapshack_");
+   // setup translators
+   QString translationPath = getApplicationDir(relTranslationDir).absolutePath();
+-  prepareTranslator(translationPath, "qt_");
++  prepareTranslator(QLatin1String("@qttranslations@/translations"), "qt_");
+   prepareTranslator(translationPath, "qmapshack_");
  
-     // load and apply style sheet
+   // load and apply style sheet
 diff --git i/src/qmaptool/setup/CAppSetupLinux.cpp w/src/qmaptool/setup/CAppSetupLinux.cpp
-index dea1c4f3..8da95574 100644
+index b703e7bb..637d653e 100644
 --- i/src/qmaptool/setup/CAppSetupLinux.cpp
 +++ w/src/qmaptool/setup/CAppSetupLinux.cpp
-@@ -29,7 +29,7 @@ void CAppSetupLinux::initQMapTool()
-     prepareGdal("", "");
+@@ -29,7 +29,7 @@ void CAppSetupLinux::initQMapTool() {
+   prepareGdal("", "");
  
-     // setup translators
--    QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
-+    QLatin1String resourceDir = QLatin1String("@qttranslations@/translations");
-     QString translationPath = QCoreApplication::applicationDirPath();
-     translationPath.replace(QRegExp("bin$"), "share/qmaptool/translations");
-     prepareTranslator(resourceDir, "qt_");
+   // setup translators
+-  QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
++  QLatin1String resourceDir = QLatin1String("@qttranslations@/translations");
+   QString translationPath = QCoreApplication::applicationDirPath();
+   translationPath.replace(QRegExp("bin$"), "share/qmaptool/translations");
+   prepareTranslator(resourceDir, "qt_");
 diff --git i/src/qmaptool/setup/CAppSetupMac.cpp w/src/qmaptool/setup/CAppSetupMac.cpp
-index 02b27e07..fae27748 100644
+index dd68b9c1..84351cf4 100644
 --- i/src/qmaptool/setup/CAppSetupMac.cpp
 +++ w/src/qmaptool/setup/CAppSetupMac.cpp
-@@ -64,7 +64,7 @@ void CAppSetupMac::initQMapTool()
+@@ -57,7 +57,7 @@ void CAppSetupMac::initQMapTool() {
  
-     // setup translators
-     QString translationPath = getApplicationDir(relTranslationDir).absolutePath();
--    prepareTranslator(translationPath, "qt_");
-+    prepareTranslator(QLatin1String("@qttranslations@/translations"), "qt_");
-     prepareTranslator(translationPath, "qmaptool_");
+   // setup translators
+   QString translationPath = getApplicationDir(relTranslationDir).absolutePath();
+-  prepareTranslator(translationPath, "qt_");
++  prepareTranslator(QLatin1String("@qttranslations@/translations"), "qt_");
+   prepareTranslator(translationPath, "qmaptool_");
  
-     migrateDirContent(defaultCachePath());
+   migrateDirContent(defaultCachePath());
 diff --git i/src/qmt_rgb2pct/main.cpp w/src/qmt_rgb2pct/main.cpp
-index 21267d03..d539cec8 100644
+index 589d3d52..5f7c12f8 100644
 --- i/src/qmt_rgb2pct/main.cpp
 +++ w/src/qmt_rgb2pct/main.cpp
-@@ -50,7 +50,7 @@ static void prepareTranslator(QString translationPath, QString translationPrefix
- static void loadTranslations()
- {
- #if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) || defined(__FreeBSD_kernel__) || defined(__GNU__) || defined(Q_OS_CYGWIN)
--    QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
-+    QLatin1String resourceDir = QLatin1String("@qttranslations@/translations");
-     QString translationPath = QCoreApplication::applicationDirPath();
-     translationPath.replace(QRegExp("bin$"), "share/" APP_STR "/translations");
-     prepareTranslator(resourceDir, "qt_");
-@@ -61,7 +61,7 @@ static void loadTranslations()
-     // os x
-     static QString relTranslationDir = "Resources/translations"; // app
-     QString translationPath = getApplicationDir(relTranslationDir).absolutePath();
--    prepareTranslator(translationPath, "qt_");
-+    prepareTranslator(QLatin1String("@qttranslations@/translations"), "qt_");
-     prepareTranslator(translationPath, APP_STR "_");
+@@ -47,7 +47,7 @@ static void prepareTranslator(QString translationPath, QString translationPrefix
+ static void loadTranslations() {
+ #if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) || defined(__FreeBSD_kernel__) || defined(__GNU__) || \
+     defined(Q_OS_CYGWIN)
+-  QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
++  QLatin1String resourceDir = QLatin1String("@qttranslations@/translations");
+   QString translationPath = QCoreApplication::applicationDirPath();
+   translationPath.replace(QRegExp("bin$"), "share/" APP_STR "/translations");
+   prepareTranslator(resourceDir, "qt_");
+@@ -58,7 +58,7 @@ static void loadTranslations() {
+   // os x
+   static QString relTranslationDir = "Resources/translations";  // app
+   QString translationPath = getApplicationDir(relTranslationDir).absolutePath();
+-  prepareTranslator(translationPath, "qt_");
++  prepareTranslator(QLatin1String("@qttranslations@/translations"), "qt_");
+   prepareTranslator(translationPath, APP_STR "_");
  #endif