1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
3 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
4 ;;; Copyright © 2017 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages geo)
22 #:use-module (guix build-system glib-or-gtk)
23 #:use-module (guix build-system gnu)
24 #:use-module (guix download)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages)
27 #:use-module (guix utils)
28 #:use-module (gnu packages glib)
29 #:use-module (gnu packages gnome)
30 #:use-module (gnu packages gtk)
31 #:use-module (gnu packages pkg-config)
32 #:use-module (gnu packages webkit)
33 #:use-module (gnu packages xml))
41 (uri (string-append "http://download.osgeo.org/geos/geos-"
46 "1icz31kd5sml2kdxhjznvmv33zfr6nig9l0i6bdcz9q9g8x4wbja"))))
47 (build-system gnu-build-system)
49 (modify-phases %standard-phases
51 'unpack 'patch-test-shebangs
53 (substitute* '("tests/xmltester/testrunner.sh"
54 "tests/geostest/testrunner.sh")
55 (("/bin/sh") (which "sh")))
59 (home-page "https://geos.osgeo.org/")
60 (synopsis "Geometry Engine for Geographic Information Systems")
62 "GEOS provides a spatial object model and fundamental geometric
63 functions. It is a C++ port of the Java Topology Suite (JTS). As such,
64 it aims to contain the complete functionality of JTS in C++. This
65 includes all the OpenGIS Simple Features for SQL spatial predicate
66 functions and spatial operators, as well as specific JTS enhanced
68 (license (list license:lgpl2.1+ ; Main distribution.
69 license:zlib ; tests/xmltester/tinyxml/*
70 license:public-domain)))) ; include/geos/timeval.h
72 ;;; FIXME GNOME Maps only runs within GNOME. On i3, it fails with this error:
73 ;;; (org.gnome.Maps:8568): GLib-GIO-ERROR **: Settings schema
74 ;;; 'org.gnome.desktop.interface' is not installed
75 (define-public gnome-maps
81 (uri (string-append "mirror://gnome/sources/" name "/"
82 (version-major+minor version) "/"
83 name "-" version ".tar.xz"))
86 "1vdnr2wmhqhql2gxd5n1ijwk88qhim14izbkczncg35846hfsr5i"))))
87 (build-system glib-or-gtk-build-system)
89 `(#:configure-flags ; Ensure that geoclue is referred to by output.
90 (list (string-append "LDFLAGS=-L"
91 (assoc-ref %build-inputs "geoclue") "/lib")
92 (string-append "CFLAGS=-I"
93 (assoc-ref %build-inputs "geoclue") "/include"))
95 (modify-phases %standard-phases
98 (lambda* (#:key inputs outputs #:allow-other-keys)
99 (let ((out (assoc-ref outputs "out"))
100 (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
101 (goa-path (string-append
102 (assoc-ref inputs "gnome-online-accounts")
104 (wrap-program (string-append out "/bin/gnome-maps")
105 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
107 ;; There seems to be no way to embed the path of libgoa-1.0.so.0.
108 `("LD_LIBRARY_PATH" ":" prefix (,goa-path)))
111 `(("gobject-introspection" ,gobject-introspection)
112 ("intltool" ,intltool)
113 ("pkg-config" ,pkg-config)))
116 ("libchamplain" ,libchamplain)
120 ("geocode-glib" ,geocode-glib)
121 ("gfbgraph" ,gfbgraph)
124 ("gnome-online-accounts" ,gnome-online-accounts)
126 ("webkitgtk" ,webkitgtk)))
129 (synopsis "Graphical map viewer and wayfinding program")
130 (description "GNOME Maps is a graphical map viewer. It uses map data from
131 the OpenStreetMap project. It can provide directions for walking, bicycling,
133 (home-page "https://wiki.gnome.org/Apps/Maps")
134 (license license:gpl2+)))
136 (define-public proj.4
142 (uri (string-append "http://download.osgeo.org/proj/proj-"
146 "1xw5f427xk9p2nbsj04j6m5zyjlyd66sbvl2bkg8hd1kx8pm9139"))))
147 (build-system gnu-build-system)
150 (modify-phases %standard-phases
151 (add-after 'unpack 'patch-test-paths
153 (substitute* '("nad/test27"
159 (("/bin/rm") (which "rm")))
161 ;; Precision problems on i686 and other platforms. See:
162 ;; https://web.archive.org/web/20151006134301/http://trac.osgeo.org/proj/ticket/255
163 ;; Disable failing test.
164 (add-after 'patch-test-paths 'ignore-failing-tests
166 (substitute* '("nad/Makefile.in")
167 (("\tPROJ_LIB.*" all) (string-append "#" all)))
171 (home-page "http://proj4.org/")
172 (synopsis "Cartographic Projections Library")
174 "Proj.4 is a library for converting coordinates between cartographic
176 (license (list license:expat
177 ;; src/PJ_patterson.c
181 ;; Embedded EPSG database.
182 (license:non-copyleft "http://www.epsg.org/TermsOfUse")