From 79e8d310897045b79aba1c85f24403881b40c37f Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Tue, 2 Oct 2018 23:12:27 +0300 Subject: [PATCH] GPXSee: new recipe (#3176) --- .../gpxsee/additional-files/gpxsee.rdef.in | 52 +++++++++++++ sci-geosciences/gpxsee/gpxsee-6.0.recipe | 78 +++++++++++++++++++ .../gpxsee/patches/gpxsee-6.0.patchset | 23 ++++++ 3 files changed, 153 insertions(+) create mode 100644 sci-geosciences/gpxsee/additional-files/gpxsee.rdef.in create mode 100644 sci-geosciences/gpxsee/gpxsee-6.0.recipe create mode 100644 sci-geosciences/gpxsee/patches/gpxsee-6.0.patchset diff --git a/sci-geosciences/gpxsee/additional-files/gpxsee.rdef.in b/sci-geosciences/gpxsee/additional-files/gpxsee.rdef.in new file mode 100644 index 000000000..2a28f8bb6 --- /dev/null +++ b/sci-geosciences/gpxsee/additional-files/gpxsee.rdef.in @@ -0,0 +1,52 @@ + +resource app_flags B_MULTIPLE_LAUNCH; + +resource app_version { + major = @MAJOR@, + middle = @MIDDLE@, + minor = @MINOR@, + + variety = B_APPV_FINAL, + internal = 0, + + short_info = "GPXSee", + long_info = "@LONG_INFO@" +}; + +resource app_signature "@APP_SIGNATURE@"; + +resource file_types message { + "types" = "application/gpx+xml", + "types" = "application/tcx+xml", + "types" = "application/kml+xml", + "types" = "application/loc+xml", + "types" = "application/slf+xml", + "types" = "application/vnd.ant.fit", + "types" = "application/vnd.fai.igc", + "types" = "application/vnd.nmea.nmea", + "types" = "application/vnd.oziexplorer.plt", + "types" = "application/vnd.oziexplorer.rte", + "types" = "application/vnd.oziexplorer.wpt" +}; + +resource vector_icon { + $"6E63696601050005020320B3A020B34620B42DB396B3C8B31EB42DB455B328B3" + $"961FB4551FB3461F0204CB2AB346CAF8B31ECB5CB378CBCBB3FBCBA3B3BECBF3" + $"B437CC1BB3AACC1BB40FCC1BB350CB701FCBD51FCB161F0220BFCAB469C01AB4" + $"0FBF0BB51EBF97B669BF01B5D3BFF2B6C4BECEBB8340B805BE1ABE10BD1FC088" + $"BD5BC04CBC7EC129BA0FBCCEBA0FBE38BA0FBBE7B914BB65B9DDBB97B764BAF6" + $"B764BDE7B637BCBAB823BEA6B51EC81BB641C6F7B405C92AB4CDCAB2B3F1C9DF" + $"B596CB7AB714CAB2B64BCB7AB7D3C9F3B728C8C5B7DD59B6BAC825B797C384B6" + $"C4C766B823C101B8E2BE9CB8BABECEB95ABE24BBB5C1FCBBDDC11FBB83C301BD" + $"6FC3DEBC56C3DEBEA6C3DEBEBAC165BF51C2A7BE60C09CBF8DBBDDBE88BF97C0" + $"42B95AC0EDB764C0E3B750C101B778C30BBE60C1F2BA9CC475C351C493C5B6C4" + $"E3C55CC457C5FCC46BC734C44CC6A7C4A7C811C5F2C81BC4D9C839C701C7FD53" + $"C6CFC734C7D4C784C552C952C489C86BC44CCA1BC4BBCB52C2E3CB52C3B6CB52" + $"C22EC98EC11FCA39C11FC8E4C11FC807C329C7C0C2B1C84DC3A2C661C50BC70C" + $"C50BC610C50BC515C26AC584C3E8C1D4B750C242B67DC1CAB732C27FB60FC2B1" + $"26C2B1B596C2B1B4D8C0EDB3C8C18DB3C8C0A6B3C8020320CB8420CAC620CBD5" + $"B364CC1BB328CC1BB396CC1BB38CCB84B3AACBD5B33CCAC60204CB84CBB7CBA3" + $"CB7ACB66CBE9CBADCC1BCB7ACC1BCBE9CC1BCC1BCBB7CC1BCBE9CC1BCB7ACBF3" + $"CB52CC07CB52CBD5CB52050A000100000A000101000A000102000A000103000A" + $"00010400" +}; diff --git a/sci-geosciences/gpxsee/gpxsee-6.0.recipe b/sci-geosciences/gpxsee/gpxsee-6.0.recipe new file mode 100644 index 000000000..2dfdfb3dd --- /dev/null +++ b/sci-geosciences/gpxsee/gpxsee-6.0.recipe @@ -0,0 +1,78 @@ +SUMMARY="GPS log file viewer and analyzer" +DESCRIPTION="GPXSee is a Qt-based GPS log file viewer and analyzer that supports \ +GPX, TCX, KML, FIT, IGC, NMEA, SLF, LOC and OziExplorer files." +HOMEPAGE="https://www.gpxsee.org/" +COPYRIGHT="2018 Martin Tůma" +LICENSE="GNU GPL v3" +REVISION="1" +SOURCE_URI="https://github.com/tumic0/gpxsee/archive/$portVersion/GPXSee-$portVersion.tar.gz" +CHECKSUM_SHA256="250e316fc40e542397720990b943c43cf1725a7b2d665ccf911c9e62d4a8f249" +SOURCE_DIR="GPXSee-$portVersion" +PATCHES="gpxsee-$portVersion.patchset" +ADDITIONAL_FILES="gpxsee.rdef.in" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + gpxsee$secondaryArchSuffix = $portVersion + app:GPXSee = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libGL$secondaryArchSuffix + lib:libQt5Core$secondaryArchSuffix + lib:libQt5Gui$secondaryArchSuffix + lib:libQt5Network$secondaryArchSuffix + lib:libQt5PrintSupport$secondaryArchSuffix + lib:libQt5Sql$secondaryArchSuffix + lib:libQt5Widgets$secondaryArchSuffix + " +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libGL$secondaryArchSuffix + devel:libQt5Core$secondaryArchSuffix + devel:libQt5Gui$secondaryArchSuffix + devel:libQt5Network$secondaryArchSuffix + devel:libQt5PrintSupport$secondaryArchSuffix + devel:libQt5Sql$secondaryArchSuffix + devel:libQt5Widgets$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:g++$secondaryArchSuffix + cmd:lrelease$secondaryArchSuffix + cmd:make + cmd:qmake$secondaryArchSuffix + " + +BUILD() +{ + lrelease gpxsee.pro + qmake gpxsee.pro + make $jobArgs +} + +INSTALL() +{ + mkdir -p $appsDir/GPXSee/{maps,csv,translations} + cp GPXSee $appsDir/GPXSee/ + cp -r pkg/maps/* $appsDir/GPXSee/maps + cp -r pkg/csv/* $appsDir/GPXSee/csv + cp -r lang/*.qm $appsDir/GPXSee/translations + + local APP_SIGNATURE="application/x-vnd.qt5-gpxsee" + local MAJOR="`echo "$portVersion" | cut -d. -f1`" + local MIDDLE="`echo "$portVersion" | cut -d. -f2`" + local MINOR="0" + local LONG_INFO="$SUMMARY" + sed \ + -e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \ + -e "s|@MAJOR@|$MAJOR|" \ + -e "s|@MIDDLE@|$MIDDLE|" \ + -e "s|@MINOR@|$MINOR|" \ + -e "s|@LONG_INFO@|$LONG_INFO|" \ + $portDir/additional-files/gpxsee.rdef.in > gpxsee.rdef + + addResourcesToBinaries gpxsee.rdef $appsDir/GPXSee/GPXSee + addAppDeskbarSymlink $appsDir/GPXSee/GPXSee +} diff --git a/sci-geosciences/gpxsee/patches/gpxsee-6.0.patchset b/sci-geosciences/gpxsee/patches/gpxsee-6.0.patchset new file mode 100644 index 000000000..a1c504f9d --- /dev/null +++ b/sci-geosciences/gpxsee/patches/gpxsee-6.0.patchset @@ -0,0 +1,23 @@ +From 5b17ce9c25328c12b2906dcfc6596c1ae1cde1aa Mon Sep 17 00:00:00 2001 +From: Nikolay Korotkiy +Date: Mon, 1 Oct 2018 22:52:47 +0300 +Subject: Fix GLOBAL_DIR/USER_DIR + + +diff --git a/src/config.h b/src/config.h +index 3f078f4..8a7019c 100644 +--- a/src/config.h ++++ b/src/config.h +@@ -26,6 +26,9 @@ + #define USER_DIR QDir::homePath() + QString("/.gpxsee") + #define GLOBAL_DIR QApplication::applicationDirPath() \ + + QString("/../Resources") ++#elif defined(Q_OS_HAIKU) ++#define USER_DIR QDir::homePath() + QString("/config/settings/GPXSee") ++#define GLOBAL_DIR QApplication::applicationDirPath() + #else + #define USER_DIR QDir::homePath() + QString("/.gpxsee") + #define GLOBAL_DIR QString("/usr/share/gpxsee") +-- +2.19.0 +