gnu: unbound: Update to 1.10.1.
[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, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
6 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
7 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
15 ;;;
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
20 ;;;
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24 (define-module (gnu packages gps)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix git-download)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix build-system scons)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix utils)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages algebra)
34 #:use-module (gnu packages base)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages docbook)
37 #:use-module (gnu packages glib)
38 #:use-module (gnu packages gtk)
39 #:use-module (gnu packages image)
40 #:use-module (gnu packages libusb)
41 #:use-module (gnu packages linux)
42 #:use-module (gnu packages ncurses)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages python)
45 #:use-module (gnu packages python-xyz)
46 #:use-module (gnu packages qt)
47 #:use-module (gnu packages sqlite)
48 #:use-module (gnu packages xml))
49
50 (define-public gpsbabel
51 (package
52 (name "gpsbabel")
53 (version "1.5.4")
54 (source (origin
55 (method url-fetch)
56 ;; XXX: Downloads from gpsbabel.org are hidden behind a POST, so
57 ;; get it from elsewhere.
58 (uri (string-append
59 "mirror://debian/pool/main/g/gpsbabel/gpsbabel_"
60 version ".orig.tar.gz"))
61 (sha256
62 (base32
63 "19hykxhyl567gf8qcrl33qhv95w0g4vxw9r3h9b8d8plx9bnaf8l"))
64 (patches (search-patches
65 "gpsbabel-minizip.patch"
66 ;; XXX: Remove this patch on the next release.
67 "gpsbabel-qstring.patch"))
68 (modules '((guix build utils)))
69 (snippet
70 '(begin
71 ;; Delete files under GPL-compatible licences but never used
72 ;; on GNU systems, rather than bloating the LICENSE field.
73 (delete-file "gui/serial_mac.cc") ; Apple MIT
74 (delete-file "mingw/include/ddk/hidsdi.h") ; public domain
75 #t))))
76 (build-system gnu-build-system)
77 ;; TODO: "make doc" requires Docbook & co.
78 (arguments
79 `(#:configure-flags
80 '("--with-zlib=system")
81 ;; On i686, 'raymarine.test' fails because of a rounding error:
82 ;; <http://hydra.gnu.org/build/133040>. As a workaround, disable tests
83 ;; on these platforms.
84 ;; FIXME: On x86_64 with -std=gnu++11 tests also fail due to rounding
85 ;; error.
86 #:tests? #f))
87 (inputs
88 `(("expat" ,expat)
89 ("zlib" ,zlib)
90 ("qtbase" ,qtbase)))
91 (native-inputs
92 `(("which" ,which)
93 ("qttools" ,qttools)
94 ("libxml2" ,libxml2))) ;'xmllint' needed for the KML tests
95 (home-page "https://www.gpsbabel.org/")
96 (synopsis "Convert and exchange data with GPS and map programs")
97 (description
98 "GPSBabel converts waypoints, tracks, and routes between hundreds of
99 popular GPS receivers and mapping programs. It contains extensive data
100 manipulation abilities making it a convenient for server-side processing or as
101 the back-end for other tools. It does not convert, transfer, send, or
102 manipulate maps.")
103 (license (list license:expat ; shapelib/*.[ch]
104 license:gpl2+)))) ; everything else
105
106 (define-public gpscorrelate
107 ;; This program is "lightly maintained", so to speak, so we end up taking it
108 ;; directly from its Git repo.
109 (let ((commit "365f6e1b3f"))
110 (package
111 (name "gpscorrelate")
112 (version (string-append "1.6.1." commit))
113 (source (origin
114 (method git-fetch)
115 (uri (git-reference
116 (url "https://github.com/dfandrich/gpscorrelate")
117 (commit commit)))
118 (file-name (git-file-name name version))
119 (sha256
120 (base32
121 "006a6l8p38a4h7y2959sqrmjjn29d8pd50zj9nypcp5ph18nybjb"))))
122 (build-system gnu-build-system)
123 (arguments
124 `(#:phases
125 (modify-phases %standard-phases
126 (replace 'configure
127 (lambda* (#:key inputs outputs #:allow-other-keys)
128 ;; This is a rudimentary build system.
129 (substitute* "Makefile"
130 (("prefix[[:blank:]]*=.*$")
131 (string-append "prefix = " (assoc-ref outputs "out")
132 "\n")))
133 #t)))
134 #:tests? #f))
135 (inputs
136 `(("gtk+" ,gtk+-2)
137 ("libxml2" ,libxml2)
138 ("exiv2" ,exiv2)))
139 (native-inputs
140 `(("pkg-config" ,pkg-config)
141 ("docbook-xml" ,docbook-xml)
142 ("docbook-xsl" ,docbook-xsl)
143 ("libxslt" ,libxslt)))
144 (home-page "https://dfandrich.github.io/gpscorrelate/")
145 (synopsis "GPS photo correlation tool to geo-localize images")
146 (description
147 "GPS Correlate is a program to match a recorded GPS track with the EXIF
148 tags in digital camera photos, and update the EXIF tags with the location that
149 the photo was taken. It does this by using the timestamp in the photo and
150 finding a data point in the GPS track that matches, or interpolating a point
151 between two other data points.")
152 (license license:gpl2+))))
153
154 (define-public gama
155 (package
156 (name "gama")
157 (version "2.08")
158 (source
159 (origin
160 (method url-fetch)
161 (uri (string-append "mirror://gnu/gama/gama-"
162 version ".tar.gz"))
163 (sha256
164 (base32
165 "0fic6a3a83hgj3gj85bin3wd6ghgi2qg76d6jfwckamab0hlv7wx"))))
166 (build-system gnu-build-system)
167 (arguments '(#:parallel-tests? #f)) ; race condition
168 (native-inputs
169 `(("libxml2" ,libxml2)))
170 (inputs
171 `(("expat" ,expat)
172 ("sqlite" ,sqlite)))
173 (home-page "https://www.gnu.org/software/gama")
174 (synopsis "Adjustment of geodetic networks")
175 (description
176 "GNU Gama is a program for the adjustment of geodetic networks. It is
177 useful in measurements where Global Positioning System (GPS) is not available,
178 such as underground. It features the ability to adjust in local Cartesian
179 coordinates as well as partial support for adjustments in global coordinate systems.")
180 (license license:gpl3+)))
181
182 (define-public gpxsee
183 (package
184 (name "gpxsee")
185 (version "7.25")
186 (source (origin
187 (method git-fetch)
188 (uri (git-reference
189 (url "https://github.com/tumic0/GPXSee")
190 (commit version)))
191 (file-name (git-file-name name version))
192 (sha256
193 (base32
194 "0lml3hz2zxljl9j5wnh7bn9bj8k9v3wf6bk3g77x9nnarsmw0fcx"))))
195 (build-system gnu-build-system)
196 (arguments
197 '(#:phases
198 (modify-phases %standard-phases
199 (replace 'configure
200 ;; Use lrelease to convert TS translation files into QM files.
201 (lambda* (#:key inputs outputs #:allow-other-keys)
202 (for-each (lambda (file)
203 (invoke "lrelease" file))
204 (find-files "lang" "\\.ts"))
205 (invoke "qmake"
206 (string-append "PREFIX="
207 (assoc-ref outputs "out"))))))))
208 (inputs
209 `(("qtbase" ,qtbase)))
210 (native-inputs
211 `(("qttools" ,qttools)))
212 (home-page "https://www.gpxsee.org")
213 (synopsis "GPS log file viewer and analyzer")
214 (description
215 "GPXSee is a Qt-based GPS log file viewer and analyzer that supports all
216 common GPS log file formats. It can display multiple tracks on various on-
217 and off-line maps. You can easily add more maps and graph other captured data
218 such as elevation, speed, heart rate, power, temperature, and gear shifts.")
219 (license license:gpl3)))
220
221 (define-public gpsd
222 (package
223 (name "gpsd")
224 (version "3.20")
225 (source
226 (origin
227 (method url-fetch)
228 (uri (string-append "https://download-mirror.savannah.gnu.org"
229 "/releases/gpsd/gpsd-" version ".tar.gz"))
230 (sha256
231 (base32 "0l2yz0yw9sil82lh2l4swkkldgmhzhv588n5lcavib4f0q2phahp"))))
232 (build-system scons-build-system)
233 (native-inputs
234 `(("bc" ,bc)
235 ("pkg-config" ,pkg-config)))
236 (inputs
237 `(("bluez" ,bluez)
238 ("dbus" ,dbus)
239 ("gtk+" ,gtk+)
240 ("libcap" ,libcap)
241 ("libusb" ,libusb)
242 ("ncurses" ,ncurses)
243 ("python" ,python)
244 ("python-pycairo" ,python-pycairo)
245 ("python-pygobject" ,python-pygobject)
246 ("python-pyserial" ,python-pyserial)
247 ("python-wrapper" ,python-wrapper)
248 ("qtbase" ,qtbase)))
249 (arguments
250 `(#:scons-flags
251 (list (string-append "prefix=" %output)
252 (let ((version ,(version-major+minor (package-version python))))
253 (string-append "python_libdir=" %output
254 "/lib/python" version
255 "/site-packages"))
256 "qt_versioned=5")
257 #:phases
258 (modify-phases %standard-phases
259 (add-after 'unpack 'fix-build
260 (lambda* (#:key outputs #:allow-other-keys)
261 (substitute* "SConstruct"
262 (("envs = \\{\\}")
263 "envs = os.environ"))
264 #t))
265 (add-after 'install 'wrap-python-scripts
266 (lambda* (#:key inputs outputs #:allow-other-keys)
267 (let* ((out (assoc-ref outputs "out"))
268 (pycairo (assoc-ref inputs "python-pycairo"))
269 (pygobject (assoc-ref inputs "python-pygobject"))
270 (pyserial (assoc-ref inputs "python-pyserial"))
271 (sitedir (lambda (package)
272 (string-append package
273 "/lib/python"
274 ,(version-major+minor
275 (package-version python))
276 "/site-packages")))
277 (pythonpath (string-join (map sitedir
278 (list out pycairo pygobject
279 pyserial))
280 ":")))
281 (for-each (lambda (script)
282 (wrap-program (string-append out "/bin/" script)
283 `("PYTHONPATH" ":" prefix (,pythonpath))))
284 '("gegps" "gpscat" "gpsfake" "gpsprof"
285 "ubxtool" "xgps" "xgpsspeed" "zerk")))
286 #t)))))
287 (synopsis "GPS service daemon")
288 (description
289 "@code{gpsd} is a service daemon that monitors one or more GPSes or AIS
290 receivers attached to a host computer through serial or USB ports, making all
291 data on the location/course/velocity of the sensors available to be queried on
292 TCP port 2947 of the host computer.")
293 (home-page "https://gpsd.gitlab.io/gpsd/")
294 (license license:bsd-2)))