gnu: r-zellkonverter: Update to 1.6.5.
[jackhill/guix/guix.git] / gnu / packages / geo.scm
index 5923486..43b37c8 100644 (file)
@@ -19,6 +19,7 @@
 ;;; Copyright © 2021 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2021, 2022 Nikolay Korotkiy <sikmir@disroot.org>
 ;;; Copyright © 2022 Roman Scherer <roman.scherer@burningswell.com>
+;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -64,6 +65,7 @@
   #:use-module (gnu packages boost)
   #:use-module (gnu packages build-tools)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cpp)
   #:use-module (gnu packages cups)
@@ -253,7 +255,7 @@ topology functions.")
 (define-public gnome-maps
   (package
     (name "gnome-maps")
-    (version "42.2")
+    (version "43.rc")                   ;for libsoup 3 support
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnome/sources/" name "/"
@@ -261,77 +263,56 @@ topology functions.")
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1cb9s2zz1zib3f33c035lmgshpl679isbzdd3alrx4yclw61nvay"))))
+                "16a3j896fwxgnvrmx27jnrvhxzh3v22paaq87ad57yp8wkq946il"))))
     (build-system meson-build-system)
     (arguments
-     `(#:glib-or-gtk? #t
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'skip-gtk-update-icon-cache
-           ;; Don't create 'icon-theme.cache'.
-           (lambda _
-             (substitute* "meson_post_install.py"
-               (("gtk-update-icon-cache") "true"))))
-         (add-after 'unpack 'patch-dbus-service
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "data/org.gnome.Maps.service.in"
-               (("@pkgdatadir@/org.gnome.Maps")
-                (string-append  (assoc-ref outputs "out")
-                                "/bin/gnome-maps")))))
-         (add-after 'install 'wrap
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
-                   (geocode-glib-path (string-append
-                                       (assoc-ref inputs "geocode-glib")
-                                       "/lib"))
-                   (goa-path (string-append
-                              (assoc-ref inputs "gnome-online-accounts:lib")
-                              "/lib"))
-                   (gdk-pixbuf-path (string-append
-                                     (assoc-ref inputs "gdk-pixbuf")
-                                     "/lib"))
-                   (webkitgtk-path (string-append
-                                    (assoc-ref inputs "webkitgtk")
-                                    "/lib")))
-               (wrap-program (string-append out "/bin/gnome-maps")
-                 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
-
-                 ;; There seems to be no way to embed the path of
-                 ;; libgoa-1.0.so.0, libwebkit2gtk-4.0.so.37,
-                 ;; libgdk_pixbuf-2.0.so, libjavascriptcoregtk-4.0.so.18, and
-                 ;; libgeocode-glib.so.0
-                 `("LD_LIBRARY_PATH" ":" prefix (,goa-path
-                                                 ,webkitgtk-path
-                                                 ,gdk-pixbuf-path
-                                                 ,geocode-glib-path)))
-               #t))))))
+     (list
+      #:glib-or-gtk? #t
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'skip-gtk-update-icon-cache
+            ;; Don't create 'icon-theme.cache'.
+            (lambda _
+              (substitute* "meson_post_install.py"
+                (("gtk-update-icon-cache") "true"))))
+          (add-after 'unpack 'patch-dbus-service
+            (lambda _
+              (substitute* "data/org.gnome.Maps.service.in"
+                (("@pkgdatadir@/org.gnome.Maps")
+                 (string-append #$output "/bin/gnome-maps")))))
+          (add-after 'install 'wrap
+            (lambda _
+              (wrap-program (string-append #$output "/bin/gnome-maps")
+                `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))))))))
     (native-inputs
-     `(("gettext" ,gettext-minimal)
-       ("gobject-introspection" ,gobject-introspection)
-       ("pkg-config" ,pkg-config)))
+     (list gettext-minimal
+           `(,glib "bin")
+           gobject-introspection
+           pkg-config))
     (inputs
-     `(("evolution-data-server" ,evolution-data-server)
-       ("folks" ,folks)
-       ("libchamplain" ,libchamplain)
-       ("libgee" ,libgee)
-       ("libhandy" ,libhandy)
-       ("libsecret" ,libsecret)
-       ("libsoup" ,libsoup-minimal-2)
-       ("libgweather" ,libgweather4)
-       ("libxml2" ,libxml2)
-       ("librsvg" ,librsvg)
-       ("glib-networking" ,glib-networking)
-       ("geoclue" ,geoclue)
-       ("geocode-glib" ,geocode-glib)
-       ("gfbgraph" ,gfbgraph)
-       ("gjs" ,gjs)
-       ("glib" ,glib)
-       ("gnome-online-accounts:lib" ,gnome-online-accounts "lib")
-       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
-       ("gtk+" ,gtk+)
-       ("rest" ,rest)
-       ("webkitgtk" ,webkitgtk-with-libsoup2)))
+     (list folks
+           evolution-data-server
+           geoclue
+           geocode-glib
+           gfbgraph
+           gjs
+           glib
+           glib-networking
+           gnome-online-accounts
+           gsettings-desktop-schemas
+           gtk+
+           libadwaita
+           libgee
+           libgweather4
+           libhandy
+           librsvg
+           libsecret
+           libshumate           
+           libsoup
+           libxml2
+           pango-next                   ;TODO: remove when it's the default
+           rest-next
+           webkitgtk))
     (synopsis "Graphical map viewer and wayfinding program")
     (description "GNOME Maps is a graphical map viewer.  It uses map data from
 the OpenStreetMap project.  It can provide directions for walking, bicycling,
@@ -510,6 +491,8 @@ coverages using a SpatiaLite DBMS.")
     (arguments
      `(#:configure-flags
        '("--enable-rttopo=yes")
+       ;; FIXME: Several tests fail with Proj 9.
+       #:tests? #f
        #:phases
        (modify-phases %standard-phases
          ;; 1 test is failing, ignore it:
@@ -536,7 +519,7 @@ fully fledged Spatial SQL capabilities.")
 (define-public proj
   (package
     (name "proj")
-    (version "9.0.1")
+    (version "9.1.0")
     (source
      (origin
        (method url-fetch)
@@ -544,14 +527,10 @@ fully fledged Spatial SQL capabilities.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "18x6v4iaphyyxyzdgf76r764qwswvjz9w39zyiphsvchwz5slzkk"))))
+         "0593vd9sac0c98j1f4rammd90d4xnhygbr6d49i8il6ajjdj7cl1"))))
     (build-system cmake-build-system)
-    (arguments
-     `(#:configure-flags '("-DUSE_EXTERNAL_GTEST=ON")))
-    (inputs
-     (list curl libjpeg-turbo libtiff sqlite))
-    (native-inputs
-     (list googletest pkg-config))
+    (native-inputs (list googletest pkg-config))
+    (propagated-inputs (list curl libtiff sqlite)) ;required by proj.pc
     (home-page "https://proj.org/")
     (synopsis "Coordinate transformation software")
     (description
@@ -642,14 +621,14 @@ projections.")
 (define-public python-pyproj
   (package
     (name "python-pyproj")
-    (version "3.2.1")
+    (version "3.3.1")
     (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "pyproj" version))
         (sha256
           (base32
-            "0xrqpy708qlyd7nqjra0dl7nvkqzaj9w0v7wq4j5pxazha9n14sa"))))
+            "1gjg63irs44djyqbp9gg7s02d0y5i9cd1a83phyzp5fcj56y3n5k"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -848,42 +827,72 @@ street bearings/orientations, and speed/travel time.")
     (license license:expat)))
 
 (define-public mapnik
-  (package
-    (name "mapnik")
-    (version "3.1.0")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://github.com/mapnik/mapnik/releases/download/v"
-                           version "/mapnik-v" version ".tar.bz2"))
-       (sha256
-        (base32
-         "0qb2irykja5qhr9apz9r230pcxap9v3j85fi98mj2xd9sa163ms3"))))
-    (build-system scons-build-system)
-    (inputs
-     (list boost
-           cairo
-           freetype
-           harfbuzz
-           icu4c
-           libjpeg-turbo
-           libpng
-           libtiff
-           libwebp
-           libxml2
-           proj.4
-           sqlite
-           zlib))
-    (native-inputs
-     (list pkg-config postgresql))
-    (arguments
-     `(#:scons-flags
-       (list "CC=gcc"
-             (string-append "PREFIX=" %output)
-             (string-append "CUSTOM_LDFLAGS=-Wl,-rpath=" %output "/lib"))))
-    (home-page "https://mapnik.org/")
-    (synopsis "Toolkit for developing mapping applications")
-    (description "Mapnik is a toolkit for developing mapping applications.  It
+  ;; There hasn't been a release since early 2021, and it fails to build with
+  ;; Boost 1.77+.
+  (let ((commit "81103491b467e17218140f50bc0bb9dc8c1f0317")
+        (revision "0"))
+    (package
+      (name "mapnik")
+      (version (git-version "3.1.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/mapnik/mapnik")
+               (commit commit)
+               ;; TODO: Un-bundle mapbox dependencies (not yet packaged).
+               (recursive? #t)))        ;for mapbox dependencies and test data
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "094nam57bdd5nak88qy33z2p3kjahk3vk2nk56m5jkcr5d3hlnx2"))))
+      (build-system qt-build-system)
+      (arguments
+       (list
+        #:cmake cmake                   ;for FIND_PACKAGE_ARGS
+        #:configure-flags
+        #~(list (string-append "-DCMAKE_CXX_FLAGS=-I"
+                               #$(this-package-native-input "catch2")
+                               "/include/catch2"))
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'use-system-catch2
+              (lambda _
+                (substitute* "test/CMakeLists.txt"
+                  (("GIT_TAG.*v2.13.7" all)
+                   (string-append all "\n"
+                                  "  FIND_PACKAGE_ARGS NAMES Catch2"))
+                  (("^include.*Catch2_SOURCE_DIR.*contrib/Catch.cmake.*")
+                   "include(Catch)\n"))))
+            (add-after 'unpack 'disable-problematic-tests
+              (lambda _
+                ;; The 'ogr' test fails for unknown reasons.  Mark it as
+                ;; expected to fail (see:
+                ;; https://github.com/mapnik/mapnik/issues/4329).
+                (substitute* "test/unit/datasource/ogr.cpp"
+                  (("TEST_CASE\\(\"ogr\"" all)
+                   (string-append all ", \"[!shouldfail]\""))))))))
+      (native-inputs
+       (list catch2
+             pkg-config
+             postgresql))
+      (inputs
+       (list boost
+             cairo
+             freetype
+             gdal
+             harfbuzz
+             icu4c
+             libjpeg-turbo
+             libpng
+             libtiff
+             libwebp
+             libxml2
+             proj
+             sqlite
+             zlib))
+      (home-page "https://mapnik.org/")
+      (synopsis "Toolkit for developing mapping applications")
+      (description "Mapnik is a toolkit for developing mapping applications.  It
 is basically a collection of geographic objects like maps, layers,
 datasources, features, and geometries.  At its core is a C++ shared library
 providing algorithms and patterns for spatial data access and visualization.
@@ -891,15 +900,15 @@ The library does not rely on any specific windowing system and can be deployed
 to any server environment.  It is intended to play fair in a multi-threaded
 environment and is aimed primarily, but not exclusively, at web-based
 development.")
-    (license (list license:lgpl2.1+
-                   ;; demo/viewer, demo/python/rundemo.py
-                   license:gpl2+
-                   ;; deps/boost, deps/mapbox, deps/agg/include/agg_conv_offset.h
-                   license:boost1.0
-                   ;; deps/mapnik/sparsehash
-                   license:bsd-3
-                   ;; deps/agg
-                   (license:non-copyleft "file://deps/agg/copying")))))
+      (license (list license:lgpl2.1+
+                     ;; demo/viewer, demo/python/rundemo.py
+                     license:gpl2+
+                     ;; deps/boost, deps/mapbox, deps/agg/include/agg_conv_offset.h
+                     license:boost1.0
+                     ;; deps/mapnik/sparsehash
+                     license:bsd-3
+                     ;; deps/agg
+                     (license:non-copyleft "file://deps/agg/copying"))))))
 
 (define-public spatialite-gui
   (package
@@ -1088,13 +1097,13 @@ utilities for data translation and processing.")
   (package
     (name "python-cartopy")
     ;; This is a post-release fix that adds build_ext to setup.py.
-    (version "0.19.0.post1")
+    (version "0.20.3")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "Cartopy" version))
        (sha256
-        (base32 "0xnm8z3as3hriivdfd26s6vn5b63gb46x6vxw6gh1mwfm5rlg2sb"))))
+        (base32 "01lhnkhw22jp6hnrs5qvgkq4fqcni2sx7ydiyv8w8xxx5wpglq0d"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -1112,11 +1121,16 @@ utilities for data translation and processing.")
      (list python-matplotlib
            python-numpy
            python-pykdtree
+           python-pyproj
            python-pyshp
            python-scipy
            python-shapely))
     (inputs
-     (list geos proj))
+     (list geos
+           ;; cartopy's setup.py looks for the proj executable.
+           ;; Not sure if it actually makes use of it since it
+           ;; probably uses proj only through pyproj.
+           proj))
     (native-inputs
      (list python-cython python-flufl-lock python-pytest))
     (home-page "https://scitools.org.uk/cartopy/docs/latest/")
@@ -1968,7 +1982,8 @@ using the dataset of topographical information collected by
     (native-inputs
      (list pkg-config qttools-5))
     (inputs
-     (list gdal
+     (list curl
+           gdal
            libjpeg-turbo
            proj
            qtbase-5
@@ -2204,6 +2219,7 @@ track your position right from your laptop.")
     (inputs
      `(("clipper" ,clipper)
        ("cups" ,cups)
+       ("curl" ,curl)
        ("gdal" ,gdal)
        ("proj" ,proj)
        ("qtbase" ,qtbase-5)
@@ -2353,7 +2369,14 @@ visualization.")
                            (version-major version) "/SAGA%20-%20" version
                            "/saga-" version ".tar.gz"))
        (sha256
-        (base32 "008izjs6gvj09abxf16ssl1xy0ay3ljq4jswbggp6wiiq459minv"))))
+        (base32 "008izjs6gvj09abxf16ssl1xy0ay3ljq4jswbggp6wiiq459minv"))
+       (modules '((guix build utils)))
+       (snippet
+        '(substitute* "saga-gis/src/tools/docs/docs_pdf/doc_pdf.cpp"
+           (("^#include <hpdf\\.h>\n" all)
+            (string-append all "#include <hpdf_version.h>\n"))
+           (("\\bHPDF_PROJECTING_SCUARE_END\\b")
+            "HPDF_PROJECTING_SQUARE_END")))))
     (build-system cmake-build-system)
     (native-inputs
      (list pkg-config swig))
@@ -2465,6 +2488,7 @@ growing set of geoscientific methods.")
                              "ProcessingOtbAlgorithmsTest"
                              "test_core_authmanager"
                              "test_core_compositionconverter"
+                             "test_core_coordinatereferencesystem"
                              "test_core_gdalutils"
                              "test_core_labelingengine"
                              "test_core_layout"
@@ -2474,6 +2498,7 @@ growing set of geoscientific methods.")
                              "test_core_layoutpicture"
                              "test_core_legendrenderer"
                              "test_core_networkaccessmanager"
+                             "test_core_rasterfilewriter"
                              "test_core_tiledownloadmanager"
                              "test_gui_dualview"
                              "test_gui_htmlwidgetwrapper"
@@ -2726,6 +2751,7 @@ using third-party geocoders and other data sources.")
     (inputs
      (list boost
            cgal
+           curl
            gdal
            glew
            glu