0a9038b7a4a5225b69be0bcbab36e239e8e4bfac
[jackhill/guix/guix.git] / gnu / packages / gps.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages gps)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix git-download)
24 #:use-module (guix build-system gnu)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (gnu packages base)
27 #:use-module (gnu packages pkg-config)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages docbook)
30 #:use-module (gnu packages image)
31 #:use-module (gnu packages xml)
32 #:use-module (gnu packages gtk)
33 #:use-module (gnu packages qt))
34
35 (define-public gpsbabel
36 (package
37 (name "gpsbabel")
38 (version "1.5.2")
39 (source (origin
40 (method url-fetch)
41 ;; XXX: Downloads from gpsbabel.org are hidden behind a POST, so
42 ;; get it from elsewhere.
43 (uri (string-append
44 "mirror://debian/pool/main/g/gpsbabel/gpsbabel_"
45 version ".orig.tar.gz"))
46 (sha256
47 (base32
48 "0xf7wmy2m29g2lm8lqc74yf8rf7sxfl3cfwbk7dpf0yf42pb0b6w"))))
49 (build-system gnu-build-system)
50 (arguments
51 `(#:configure-flags
52 '("--with-zlib=system"
53 ;; XXX Use -fPIC to work around build problems with Qt, GCC 5, and
54 ;; recent binutils:
55 ;; https://codereview.qt-project.org/#/c/111787/
56 "CXXFLAGS=-std=gnu++11 -fPIC")
57 #:phases
58 (modify-phases %standard-phases
59 (add-before 'configure 'pre-configure
60 (lambda _
61 (chdir "gpsbabel"))))
62 ;; TODO: "make doc" requires Docbook & co.
63
64 ;; On i686, 'raymarine.test' fails because of a rounding error:
65 ;; <http://hydra.gnu.org/build/133040>. As a workaround, disable tests
66 ;; on these platforms.
67 ;; FIXME: On x86_64 with -std=gnu++11 tests also fail due to rounding
68 ;; error.
69 #:tests? #f))
70 (inputs
71 `(("expat" ,expat)
72 ("zlib" ,zlib)
73 ("qtbase" ,qtbase)
74 ("qttools" ,qttools)))
75 (native-inputs
76 `(("which" ,which)
77 ("libxml2" ,libxml2))) ;'xmllint' needed for the KML tests
78 (home-page "http://www.gpsbabel.org/")
79 (synopsis "Convert and exchange data with GPS and map programs")
80 (description
81 "GPSBabel converts waypoints, tracks, and routes between hundreds of
82 popular GPS receivers and mapping programs. It contains extensive data
83 manipulation abilities making it a convenient for server-side processing or as
84 the back-end for other tools. It does not convert, transfer, send, or
85 manipulate maps.")
86 (license license:gpl2+)))
87
88 (define-public gpscorrelate
89 ;; This program is "lightly maintained", so to speak, so we end up taking it
90 ;; directly from its Git repo.
91 (let ((commit "365f6e1b3f"))
92 (package
93 (name "gpscorrelate")
94 (version (string-append "1.6.1." commit))
95 (source (origin
96 (method git-fetch)
97 (uri (git-reference
98 (url "https://github.com/freefoote/gpscorrelate")
99 (commit commit)))
100 (sha256
101 (base32
102 "006a6l8p38a4h7y2959sqrmjjn29d8pd50zj9nypcp5ph18nybjb"))))
103 (build-system gnu-build-system)
104 (arguments
105 `(#:phases (alist-replace
106 'configure
107 (lambda* (#:key inputs outputs #:allow-other-keys)
108 ;; This is a rudimentary build system.
109 (substitute* "Makefile"
110 (("prefix[[:blank:]]*=.*$")
111 (string-append "prefix = " (assoc-ref outputs "out")
112 "\n"))))
113 %standard-phases)
114 #:tests? #f))
115 (inputs
116 `(("gtk+" ,gtk+-2)
117 ("libxml2" ,libxml2)
118 ("exiv2" ,exiv2)))
119 (native-inputs
120 `(("pkg-config" ,pkg-config)
121 ("docbook-xml" ,docbook-xml)
122 ("docbook-xsl" ,docbook-xsl)
123 ("libxslt" ,libxslt)))
124 (home-page "http://freefoote.dview.net/linux/gpscorrelate")
125 (synopsis "GPS photo correlation tool to geo-localize images")
126 (description
127 "GPS Correlate is a program to match a recorded GPS track with the EXIF
128 tags in digital camera photos, and update the EXIF tags with the location that
129 the photo was taken. It does this by using the timestamp in the photo and
130 finding a data point in the GPS track that matches, or interpolating a point
131 between two other data points.")
132 (license license:gpl2+))))