GNU bug report logs - #59218
[PATCH] gnu: Add navit

Previous Next

Package: guix-patches;

Reported by: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>

Date: Sat, 12 Nov 2022 15:26:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59218 in the body.
You can then email your comments to 59218 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#59218; Package guix-patches. (Sat, 12 Nov 2022 15:26:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 12 Nov 2022 15:26:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: guix-patches <at> gnu.org
Cc: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Subject: [PATCH] gnu: Add navit
Date: Sat, 12 Nov 2022 16:24:55 +0100
* gnu/packages/geo.scm (navit): New variable.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
---
 gnu/packages/geo.scm | 106 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 106 insertions(+)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 9895756864..9622e76d67 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2021, 2022 Nikolay Korotkiy <sikmir <at> disroot.org>
 ;;; Copyright © 2022 Roman Scherer <roman.scherer <at> burningswell.com>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
+;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -114,6 +115,8 @@ (define-module (gnu packages geo)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages sdl)
+  #:use-module (gnu packages speech)
   #:use-module (gnu packages swig)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages textutils)
@@ -2769,3 +2772,106 @@ (define-public gplates
 reconstructions of geological and paleogeographic features through geological
 time.  Interactively visualize vector, raster and volume data.")
     (license license:gpl2+)))
+
+(define-public navit
+  (package
+   (name "navit")
+   (version "0.5.6")
+   (source (origin
+            (method git-fetch)
+            (uri (git-reference
+                  (url "https://github.com/navit-gps/navit")
+                  (commit (string-append "v" version))))
+            (sha256
+             (base32
+              "1jhlif0sc5m8wqb5j985g1xba2ki7b7mm14pkvzdghjd0q0gf15s"))
+            (file-name (git-file-name name version))))
+   (build-system cmake-build-system)
+   (arguments
+    (list
+     ;; There is no tests
+     #:tests? #f
+     ;; With -DSAMPLE_MAP=TRUE (the default), it tries to download a
+     ;; map during the build process.
+     #:configure-flags #~(list "-DSAMPLE_MAP=FALSE")
+     #:phases
+     #~(modify-phases
+        %standard-phases
+        (add-after
+         'unpack 'patch-navit-config
+         (lambda _
+           ;; For now this package only supports SDL, so if we keep
+           ;; the configuration as-is, Navit doesn't start.
+           (substitute*
+            "navit/navit_shipped.xml"
+            (("<graphics type=\"gtk_drawing_area\"/>")
+             "<graphics type=\"sdl\"/>"))
+           ;; Users are expected to be able to add XML files inside
+           ;; $NAVIT_SHAREDIR, however that directory is in the store.
+           (substitute*
+            "navit/navit_shipped.xml"
+            (("<xi:include href=\"\\$NAVIT_SHAREDIR/maps/\\*\\.xml\"/>")
+             "<xi:include href=\"$NAVIT_USER_DATADIR/maps/*.xml\"/>"))
+           ;; Navit also works without GPS but in that case there is
+           ;; no automatic zooming, so we need zoom buttons to be able
+           ;; to manually zoom in or out.
+           (substitute*
+            "navit/navit_shipped.xml"
+            (((string-append
+               "<osd enabled=\"no\" type=\"button\" x=\"-96\" y=\"-96\" "
+               "command=\"zoom_in()"))
+             (string-append
+              "<osd enabled=\"yes\" type=\"button\" x=\"-96\" y=\"-96\" "
+              "command=\"zoom_in()"))
+            (((string-append
+               "<osd enabled=\"no\" type=\"button\" x=\"0\" y=\"-96\" "
+               "command=\"zoom_out()"))
+             (string-append
+              "<osd enabled=\"yes\" type=\"button\" x=\"0\" y=\"-96\" "
+              "command=\"zoom_out()\" src=\"zoom_out.png\"/>")))))
+        (add-before
+         'build 'set-cache
+         ;; During the build, svg icons are converted in different
+         ;; formats, and this needs XDG_CACHE_HOME to work.
+         (lambda _
+           (setenv "XDG_CACHE_HOME" "/tmp/xdg-cache"))))))
+   (inputs (list dbus-glib
+                 espeak
+                 freeglut
+                 freeimage
+                 freetype
+                 glib
+                 gettext-minimal
+                 gpsd
+                 gdk-pixbuf
+                 imlib2
+                 python
+                 sdl
+                 sdl-image))
+   (native-inputs (list fontconfig
+                        (librsvg-for-system) pkg-config))
+   (home-page "https://www.navit-project.org")
+   (synopsis "Car navigation system with routing engine that uses vector maps data")
+   (description "Navit is a car navigation system with a routing engine.
+
+It is meant to work with touchscreen devices, but it also works
+without a touchscreen. It also supports text to speech.
+
+It can be configured extensively through its own configuration file
+format. For instance we can configure the graphical interface, and
+which map data is to be displayed at which zoom level.
+
+It supports different routing profiles: bike, car, car_avoid_toll,
+car_pedantic, car_shortest, horse, pedestrian, truck.
+
+It can use gpsd or NMEA GPS directly to get position data. It also
+works without GPS: in this case users can also enter position data
+directly.
+
+It can also be used to log GPS data to files using the GPX or NMEA
+formats, or to replay NMEA data.
+
+For maps, it can uses its own \"binfile\" map format, or Garmin map
+file format, and data from OpenStreetMap, Garmin maps, Marco Polo
+Grosser Reiseplaner, Routeplaner Europa 2007, Map + Route.")
+   (license license:gpl2)))
-- 
2.38.0





Information forwarded to guix-patches <at> gnu.org:
bug#59218; Package guix-patches. (Wed, 16 Nov 2022 16:44:02 GMT) Full text and rfc822 format available.

Message #8 received at 59218 <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: 59218 <at> debbugs.gnu.org
Subject: Re: gnu: Add navit
Date: Wed, 16 Nov 2022 17:42:55 +0100
[Message part 1 (text/plain, inline)]
Hi,

I don't know what happened but there is a small issue to fix:
> gnu/packages/geo.scm:2855:16: navit <at> 0.5.6: sentences in description
> should be followed by two spaces; possible infractions at 142, 252,
> 548 checking navit <at> 0.5.6 [derivation]...

Denis.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#59218; Package guix-patches. (Wed, 16 Nov 2022 18:12:02 GMT) Full text and rfc822 format available.

Message #11 received at 59218 <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: 59218 <at> debbugs.gnu.org
Cc: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Subject: [PATCH v2] gnu: Add navit
Date: Wed, 16 Nov 2022 19:11:29 +0100
* gnu/packages/geo.scm (navit): New variable.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
---
 gnu/packages/geo.scm | 106 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 106 insertions(+)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 9895756864..48cd964583 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2021, 2022 Nikolay Korotkiy <sikmir <at> disroot.org>
 ;;; Copyright © 2022 Roman Scherer <roman.scherer <at> burningswell.com>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
+;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -114,6 +115,8 @@ (define-module (gnu packages geo)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages sdl)
+  #:use-module (gnu packages speech)
   #:use-module (gnu packages swig)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages textutils)
@@ -2769,3 +2772,106 @@ (define-public gplates
 reconstructions of geological and paleogeographic features through geological
 time.  Interactively visualize vector, raster and volume data.")
     (license license:gpl2+)))
+
+(define-public navit
+  (package
+   (name "navit")
+   (version "0.5.6")
+   (source (origin
+            (method git-fetch)
+            (uri (git-reference
+                  (url "https://github.com/navit-gps/navit")
+                  (commit (string-append "v" version))))
+            (sha256
+             (base32
+              "1jhlif0sc5m8wqb5j985g1xba2ki7b7mm14pkvzdghjd0q0gf15s"))
+            (file-name (git-file-name name version))))
+   (build-system cmake-build-system)
+   (arguments
+    (list
+     ;; There is no tests
+     #:tests? #f
+     ;; With -DSAMPLE_MAP=TRUE (the default), it tries to download a
+     ;; map during the build process.
+     #:configure-flags #~(list "-DSAMPLE_MAP=FALSE")
+     #:phases
+     #~(modify-phases
+        %standard-phases
+        (add-after
+         'unpack 'patch-navit-config
+         (lambda _
+           ;; For now this package only supports SDL, so if we keep
+           ;; the configuration as-is, Navit doesn't start.
+           (substitute*
+            "navit/navit_shipped.xml"
+            (("<graphics type=\"gtk_drawing_area\"/>")
+             "<graphics type=\"sdl\"/>"))
+           ;; Users are expected to be able to add XML files inside
+           ;; $NAVIT_SHAREDIR, however that directory is in the store.
+           (substitute*
+            "navit/navit_shipped.xml"
+            (("<xi:include href=\"\\$NAVIT_SHAREDIR/maps/\\*\\.xml\"/>")
+             "<xi:include href=\"$NAVIT_USER_DATADIR/maps/*.xml\"/>"))
+           ;; Navit also works without GPS but in that case there is
+           ;; no automatic zooming, so we need zoom buttons to be able
+           ;; to manually zoom in or out.
+           (substitute*
+            "navit/navit_shipped.xml"
+            (((string-append
+               "<osd enabled=\"no\" type=\"button\" x=\"-96\" y=\"-96\" "
+               "command=\"zoom_in()"))
+             (string-append
+              "<osd enabled=\"yes\" type=\"button\" x=\"-96\" y=\"-96\" "
+              "command=\"zoom_in()"))
+            (((string-append
+               "<osd enabled=\"no\" type=\"button\" x=\"0\" y=\"-96\" "
+               "command=\"zoom_out()"))
+             (string-append
+              "<osd enabled=\"yes\" type=\"button\" x=\"0\" y=\"-96\" "
+              "command=\"zoom_out()\" src=\"zoom_out.png\"/>")))))
+        (add-before
+         'build 'set-cache
+         ;; During the build, svg icons are converted in different
+         ;; formats, and this needs XDG_CACHE_HOME to work.
+         (lambda _
+           (setenv "XDG_CACHE_HOME" "/tmp/xdg-cache"))))))
+   (inputs (list dbus-glib
+                 espeak
+                 freeglut
+                 freeimage
+                 freetype
+                 glib
+                 gettext-minimal
+                 gpsd
+                 gdk-pixbuf
+                 imlib2
+                 python
+                 sdl
+                 sdl-image))
+   (native-inputs (list fontconfig
+                        (librsvg-for-system) pkg-config))
+   (home-page "https://www.navit-project.org")
+   (synopsis "Car navigation system with routing engine that uses vector maps data")
+   (description "Navit is a car navigation system with a routing engine.
+
+It is meant to work with touchscreen devices, but it also works
+without a touchscreen.  It also supports text to speech.
+
+It can be configured extensively through its own configuration file
+format.  For instance we can configure the graphical interface, and
+which map data is to be displayed at which zoom level.
+
+It supports different routing profiles: bike, car, car_avoid_toll,
+car_pedantic, car_shortest, horse, pedestrian, truck.
+
+It can use gpsd or NMEA GPS directly to get position data.  It also
+works without GPS: in this case users can also enter position data
+directly.
+
+It can also be used to log GPS data to files using the GPX or NMEA
+formats, or to replay NMEA data.
+
+For maps, it can uses its own \"binfile\" map format, or Garmin map
+file format, and data from OpenStreetMap, Garmin maps, Marco Polo
+Grosser Reiseplaner, Routeplaner Europa 2007, Map + Route.")
+   (license license:gpl2)))

base-commit: 2757de2e2b271d87f6f72ba4161c2225fbdc9e78
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#59218; Package guix-patches. (Thu, 17 Nov 2022 12:08:02 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Cc: 59218-done <at> debbugs.gnu.org, guix-patches <at> gnu.org
Subject: Re: [bug#59218] [PATCH v2] gnu: Add navit
Date: Thu, 17 Nov 2022 12:05:56 +0000
[Message part 1 (text/plain, inline)]
Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org> writes:

> * gnu/packages/geo.scm (navit): New variable.
>
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
> ---
>  gnu/packages/geo.scm | 106 +++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 106

Looks good to me. I added a fullstop to the first line of the commit
message, tweaked a comment and also tweaked the indentation and pushed
to master as b64a80258b8bef89f560f47bf84b71061c6127a6.

Thanks,

Chris
[signature.asc (application/pgp-signature, inline)]

Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Thu, 17 Nov 2022 12:08:03 GMT) Full text and rfc822 format available.

Notification sent to Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>:
bug acknowledged by developer. (Thu, 17 Nov 2022 12:08:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 15 Dec 2022 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 182 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.