Ticket #44302: qlandkartegt-1.7.7.diff

File qlandkartegt-1.7.7.diff, 6.9 KB (added by mklein-de (Michael Klein), 10 years ago)

updated patch

  • dports/gis/qlandkartegt-garmindev/Portfile

    diff --git a/dports/gis/qlandkartegt-garmindev/Portfile b/dports/gis/qlandkartegt-garmindev/Portfile
    index 02ffda3..b0c5b41 100644
    a b destroot { 
    3434    }
    3535}
    3636
    37 livecheck.url    "http://sourceforge.net/api/file/index/project-id/212192/mtime/desc/rss"
     37livecheck.name   qlandkartegt
    3838livecheck.regex  garmindev-(\[0-9.\]+)${extract.suffix}
  • dports/gis/qlandkartegt/Portfile

    diff --git a/dports/gis/qlandkartegt/Portfile b/dports/gis/qlandkartegt/Portfile
    index c4deba9..a73d386 100644
    a b PortSystem 1.0 
    55PortGroup        cmake 1.0
    66
    77name             qlandkartegt
    8 version          1.7.6
     8version          1.7.7
    99categories       gis
    1010platforms        darwin
    1111maintainers      puffin.lb.shuttle.de:michael.klein
    long_description QLandkarte GT is the ultimate outdoor aficionado's tool. It \ 
    1818                 QLandkarte M, a moving map application for mobile devices.
    1919
    2020homepage         http://www.qlandkarte.org/
    21 master_sites     sourceforge:project/qlandkartegt/qlandkartegt/QLandkarte%20GT%20${version}
     21master_sites     sourceforge:project/qlandkartegt/qlandkartegt/QLandkarteGT%20${version}
    2222
    23 checksums        rmd160  3eda6f83ac1ed89a8b65c850150ca72d29976ffa \
    24                  sha256  ff1e352d07fd136e75a80035d888efe095f1f44ca15d46262169e98e5a14e1c3
     23checksums        rmd160  b26a7124766dcbba8ced253e59460b2192cc19fd \
     24                 sha256  0b0d659bef580bff7c6aabd563ad9bf0cf2d32467fe11e613ceaab58be7363d0
    2525
    2626depends_lib      port:libexif \
    2727                 port:gdal \
    depends_lib port:libexif \ 
    3131                 port:libdmtx \
    3232                 bin:gpsbabel:gpsbabel
    3333
     34patchfiles       patch-src-main.cpp.diff \
     35                 patch-remove-legacy-Dictionary.h.diff
     36
     37post-patch {
     38    # needed by QDeviceWatcher
     39    reinplace "s|CoreFoundation|CoreFoundation -framework DiskArbitration|" ${worksrcpath}/src/CMakeLists.txt
     40}
     41
    3442destroot {
    3543    xinstall -d ${destroot}${applications_dir}
    3644    copy "${worksrcpath}/bin/QLandkarte GT.app" ${destroot}${applications_dir}
    3745}
    3846
    39 livecheck.url    "http://sourceforge.net/api/file/index/project-id/212192/mtime/desc/rss"
    4047livecheck.regex  ${name}-(\[0-9.\]+)${extract.suffix}
  • new file dports/gis/qlandkartegt/files/patch-remove-legacy-Dictionary.h.diff

    diff --git a/dports/gis/qlandkartegt/files/patch-remove-legacy-Dictionary.h.diff b/dports/gis/qlandkartegt/files/patch-remove-legacy-Dictionary.h.diff
    new file mode 100644
    index 0000000..7c3486d
    - +  
     1--- src/CGpx.cpp.orig   2014-04-02 19:23:46.000000000 +0200
     2+++ src/CGpx.cpp        2014-07-19 14:43:03.000000000 +0200
     3@@ -67,7 +67,7 @@
     4     for (int i=0;;++i)
     5     {
     6         QColor trackColor = CTrack::lineColors[i];
     7-        QString colorName = colorMap.left(trackColor);
     8+        QString colorName = colorMap.key(trackColor);
     9         if (!colorName.isEmpty()) trackColorMap.insert(colorName, i);
     10         if (trackColor == Qt::transparent) break;
     11     }
     12@@ -80,13 +80,13 @@
     13 }
     14 
     15 
     16-const Dictionary<QString, QColor>& CGpx::getColorMap() const
     17+const QMap<QString, QColor>& CGpx::getColorMap() const
     18 {
     19     return colorMap;
     20 }
     21 
     22 
     23-const Dictionary<QString, int>& CGpx::getTrackColorMap() const
     24+const QMap<QString, int>& CGpx::getTrackColorMap() const
     25 {
     26     return trackColorMap;
     27 }
     28--- src/CGpx.h.orig     2014-04-02 19:23:47.000000000 +0200
     29+++ src/CGpx.h  2014-07-19 11:39:24.000000000 +0200
     30@@ -24,8 +24,6 @@
     31 #include <QString>
     32 #include <QtXml/QDomDocument>
     33 
     34-#include "Dictionary.h"
     35-
     36 /// handle geo data from GPX files
     37 class CGpx : public QObject, public QDomDocument
     38 {
     39@@ -68,10 +66,11 @@
     40         void save(const QString& filename);
     41         void makeExtensions();
     42 
     43-        static QMap<QString,QDomElement> mapChildElements(const QDomNode& parent);
     44+        static QMap<QString,QDomElement> mapChildElements(const QDomNode&
     45+                                                          parent);
     46 
     47-        const Dictionary<QString, QColor>& getColorMap() const;
     48-        const Dictionary<QString, int>& getTrackColorMap() const;
     49+        const QMap<QString, QColor>& getColorMap() const;
     50+        const QMap<QString, int>& getTrackColorMap() const;
     51 
     52         QDomElement &getExtensions() { return extensions; }
     53         gpx_version version() { return file_version; }
     54@@ -80,8 +79,8 @@
     55     protected:
     56         void writeMetadata();
     57 
     58-        Dictionary<QString, QColor> colorMap;
     59-        Dictionary<QString, int> trackColorMap;
     60+        QMap<QString, QColor> colorMap;
     61+        QMap<QString, int> trackColorMap;
     62 
     63     private:
     64         QDomElement extensions;
     65--- src/CMakeLists.txt.orig     2014-05-18 15:36:36.000000000 +0200
     66+++ src/CMakeLists.txt  2014-07-21 21:45:56.000000000 +0200
     67@@ -463,7 +463,6 @@
     68     CImageViewer.h
     69     CMapRmp.h
     70     CMapDEMSlopeSetup.h
     71-    Dictionary.h
     72     QFileExt.h
     73     IExchange.h
     74     CExchangeGarmin.h
     75--- src/CTrackDB.cpp.orig       2014-04-02 19:23:46.000000000 +0200
     76+++ src/CTrackDB.cpp    2014-07-19 14:49:25.000000000 +0200
     77@@ -233,7 +233,7 @@
     78                 tmpelem = trackextensionmap.value(CGpx::gpxx_ns + ":" + "DisplayColor");
     79                 if (!tmpelem.isNull())
     80                 {
     81-                    int colorID = gpx.getTrackColorMap().right(tmpelem.text(), -1);
     82+                    int colorID = gpx.getTrackColorMap().value(tmpelem.text(), -1);
     83                     if (colorID >= 0) track->setColor(colorID);
     84                 }
     85             }
     86@@ -488,7 +488,7 @@
     87         QDomElement color = gpx.createElement("gpxx:DisplayColor");
     88         gpxx_ext.appendChild(color);
     89 
     90-        QString colname = gpx.getTrackColorMap().left(track->getColorIdx());
     91+        QString colname = gpx.getTrackColorMap().key(track->getColorIdx());
     92         QDomText _color_ = gpx.createTextNode(colname);
     93         color.appendChild(_color_);
     94 
  • new file dports/gis/qlandkartegt/files/patch-src-main.cpp.diff

    diff --git a/dports/gis/qlandkartegt/files/patch-src-main.cpp.diff b/dports/gis/qlandkartegt/files/patch-src-main.cpp.diff
    new file mode 100644
    index 0000000..9e97d50
    - +  
     1--- src/main.cpp.orig   2014-04-02 19:23:47.000000000 +0200
     2+++ src/main.cpp        2014-07-10 20:17:08.000000000 +0200
     3@@ -284,15 +284,11 @@
     4     GDALAllRegister();
     5 
     6 #ifdef Q_OS_MAC
     7-    QCoreApplication::setApplicationName("QLandkarte GT");
     8     QCoreApplication::setApplicationVersion(VER_STR);
     9-    QCoreApplication::setOrganizationName("org.qlandkarte");
     10-    QCoreApplication::setOrganizationDomain("org.qlandkarte");
     11-#else
     12+#endif
     13     QCoreApplication::setApplicationName("QLandkarteGT");
     14     QCoreApplication::setOrganizationName("QLandkarteGT");
     15     QCoreApplication::setOrganizationDomain("qlandkarte.org");
     16-#endif
     17     QApplication::setWindowIcon(QIcon(":/icons/qlandkartegt.png"));
     18 
     19 #ifdef WIN32