Commit | Line | Data |
---|---|---|
03c1662e LF |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2016 Leo Famulari <leo@famulari.name> | |
ad1ff78d | 3 | ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com> |
065d0125 | 4 | ;;; Copyright © 2017 Björn Höfling <bjoern.hoefling@bjoernhoefling.de> |
03c1662e LF |
5 | ;;; |
6 | ;;; This file is part of GNU Guix. | |
7 | ;;; | |
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. | |
12 | ;;; | |
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. | |
17 | ;;; | |
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/>. | |
20 | ||
21 | (define-module (gnu packages geo) | |
22 | #:use-module (guix build-system glib-or-gtk) | |
065d0125 | 23 | #:use-module (guix build-system gnu) |
03c1662e | 24 | #:use-module (guix download) |
065d0125 | 25 | #:use-module ((guix licenses) #:prefix license:) |
03c1662e LF |
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)) | |
34 | ||
a7607572 BH |
35 | (define-public geos |
36 | (package | |
37 | (name "geos") | |
38 | (version "3.6.1") | |
39 | (source (origin | |
40 | (method url-fetch) | |
41 | (uri (string-append "http://download.osgeo.org/geos/geos-" | |
42 | version | |
43 | ".tar.bz2")) | |
44 | (sha256 | |
45 | (base32 | |
46 | "1icz31kd5sml2kdxhjznvmv33zfr6nig9l0i6bdcz9q9g8x4wbja")))) | |
47 | (build-system gnu-build-system) | |
48 | (arguments `(#:phases | |
49 | (modify-phases %standard-phases | |
50 | (add-after | |
51 | 'unpack 'patch-test-shebangs | |
52 | (lambda _ | |
53 | (substitute* '("tests/xmltester/testrunner.sh" | |
54 | "tests/geostest/testrunner.sh") | |
55 | (("/bin/sh") (which "sh"))) | |
56 | #t))))) | |
57 | (inputs | |
58 | `(("glib" ,glib))) | |
59 | (home-page "https://geos.osgeo.org/") | |
60 | (synopsis "Geometry Engine for Geographic Information Systems") | |
61 | (description | |
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 | |
67 | topology functions.") | |
68 | (license (list license:lgpl2.1+ ; Main distribution. | |
69 | license:zlib ; tests/xmltester/tinyxml/* | |
70 | license:public-domain)))) ; include/geos/timeval.h | |
71 | ||
03c1662e LF |
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 | |
76 | (package | |
77 | (name "gnome-maps") | |
67bd376b | 78 | (version "3.26.2") |
03c1662e LF |
79 | (source (origin |
80 | (method url-fetch) | |
81 | (uri (string-append "mirror://gnome/sources/" name "/" | |
82 | (version-major+minor version) "/" | |
83 | name "-" version ".tar.xz")) | |
84 | (sha256 | |
85 | (base32 | |
67bd376b | 86 | "0l40l7m9dyphvasiq1jxrn6ivavs1xwzn0bzz2x1z7x73955q783")))) |
03c1662e LF |
87 | (build-system glib-or-gtk-build-system) |
88 | (arguments | |
67bd376b | 89 | `(#:configure-flags ;; Ensure that geoclue is referred to by output. |
03c1662e LF |
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")) | |
94 | #:phases | |
95 | (modify-phases %standard-phases | |
67bd376b KK |
96 | (add-after 'install 'wrap |
97 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
98 | (let ((out (assoc-ref outputs "out")) | |
99 | (gi-typelib-path (getenv "GI_TYPELIB_PATH")) | |
100 | (goa-path (string-append | |
03c1662e | 101 | (assoc-ref inputs "gnome-online-accounts") |
67bd376b KK |
102 | "/lib")) |
103 | (webkitgtk-path (string-append | |
104 | (assoc-ref inputs "webkitgtk") | |
105 | "/lib"))) | |
106 | (wrap-program (string-append out "/bin/gnome-maps") | |
107 | `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)) | |
03c1662e | 108 | |
67bd376b KK |
109 | ;; There seems to be no way to embed the path of |
110 | ;; libgoa-1.0.so.0, libwebkit2gtk-4.0.so.37 and | |
111 | ;; libjavascriptcoregtk-4.0.so.18. | |
112 | `("LD_LIBRARY_PATH" ":" prefix (,goa-path ,webkitgtk-path))) | |
113 | #t)))))) | |
03c1662e LF |
114 | (native-inputs |
115 | `(("gobject-introspection" ,gobject-introspection) | |
116 | ("intltool" ,intltool) | |
117 | ("pkg-config" ,pkg-config))) | |
118 | (inputs | |
119 | `(("folks" ,folks) | |
120 | ("libchamplain" ,libchamplain) | |
121 | ("libgee" ,libgee) | |
122 | ("libxml2" ,libxml2) | |
123 | ("geoclue" ,geoclue) | |
124 | ("geocode-glib" ,geocode-glib) | |
125 | ("gfbgraph" ,gfbgraph) | |
126 | ("gjs" ,gjs) | |
127 | ("glib" ,glib) | |
128 | ("gnome-online-accounts" ,gnome-online-accounts) | |
129 | ("rest" ,rest) | |
130 | ("webkitgtk" ,webkitgtk))) | |
131 | (propagated-inputs | |
132 | `(("gtk+3" ,gtk+))) | |
133 | (synopsis "Graphical map viewer and wayfinding program") | |
134 | (description "GNOME Maps is a graphical map viewer. It uses map data from | |
135 | the OpenStreetMap project. It can provide directions for walking, bicycling, | |
136 | and driving.") | |
137 | (home-page "https://wiki.gnome.org/Apps/Maps") | |
065d0125 BH |
138 | (license license:gpl2+))) |
139 | ||
140 | (define-public proj.4 | |
141 | (package | |
142 | (name "proj.4") | |
143 | (version "4.9.3") | |
144 | (source (origin | |
145 | (method url-fetch) | |
146 | (uri (string-append "http://download.osgeo.org/proj/proj-" | |
147 | version ".tar.gz")) | |
148 | (sha256 | |
149 | (base32 | |
150 | "1xw5f427xk9p2nbsj04j6m5zyjlyd66sbvl2bkg8hd1kx8pm9139")))) | |
151 | (build-system gnu-build-system) | |
152 | (arguments | |
153 | `(#:phases | |
154 | (modify-phases %standard-phases | |
155 | (add-after 'unpack 'patch-test-paths | |
156 | (lambda _ | |
157 | (substitute* '("nad/test27" | |
158 | "nad/test83" | |
159 | "nad/testvarious" | |
160 | "nad/testdatumfile" | |
161 | "nad/testflaky" | |
162 | "nad/testIGNF") | |
163 | (("/bin/rm") (which "rm"))) | |
164 | #t)) | |
165 | ;; Precision problems on i686 and other platforms. See: | |
166 | ;; https://web.archive.org/web/20151006134301/http://trac.osgeo.org/proj/ticket/255 | |
167 | ;; Disable failing test. | |
168 | (add-after 'patch-test-paths 'ignore-failing-tests | |
169 | (lambda _ | |
170 | (substitute* '("nad/Makefile.in") | |
171 | (("\tPROJ_LIB.*" all) (string-append "#" all))) | |
172 | #t))))) | |
173 | (inputs | |
174 | `(("glib" ,glib))) | |
175 | (home-page "http://proj4.org/") | |
176 | (synopsis "Cartographic Projections Library") | |
177 | (description | |
178 | "Proj.4 is a library for converting coordinates between cartographic | |
179 | projections.") | |
180 | (license (list license:expat | |
181 | ;; src/PJ_patterson.c | |
182 | license:asl2.0 | |
183 | ;; src/geodesic.c/h | |
184 | license:x11 | |
185 | ;; Embedded EPSG database. | |
186 | (license:non-copyleft "http://www.epsg.org/TermsOfUse") | |
187 | ;; cmake/* | |
188 | license:boost1.0)))) |