From patchwork Wed Nov 16 18:11:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Denis 'GNUtoo' Carikli X-Patchwork-Id: 44549 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 34F6827BBEC; Wed, 16 Nov 2022 18:12:23 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 174AA27BBE9 for ; Wed, 16 Nov 2022 18:12:21 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovMtM-0001zZ-Or; Wed, 16 Nov 2022 13:12:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovMtH-0001sQ-Sx for guix-patches@gnu.org; Wed, 16 Nov 2022 13:12:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ovMtG-0007dG-DQ for guix-patches@gnu.org; Wed, 16 Nov 2022 13:12:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ovMtG-0001U9-5m for guix-patches@gnu.org; Wed, 16 Nov 2022 13:12:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59218] [PATCH v2] gnu: Add navit References: <20221112152455.7436-1-GNUtoo@cyberdimension.org> In-Reply-To: <20221112152455.7436-1-GNUtoo@cyberdimension.org> Resent-From: Denis 'GNUtoo' Carikli Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 16 Nov 2022 18:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59218 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59218@debbugs.gnu.org Cc: Denis 'GNUtoo' Carikli Received: via spool by 59218-submit@debbugs.gnu.org id=B59218.16686222985678 (code B ref 59218); Wed, 16 Nov 2022 18:12:02 +0000 Received: (at 59218) by debbugs.gnu.org; 16 Nov 2022 18:11:38 +0000 Received: from localhost ([127.0.0.1]:58101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovMss-0001TV-Ap for submit@debbugs.gnu.org; Wed, 16 Nov 2022 13:11:38 -0500 Received: from cyberdimension.org ([80.67.179.20]:48890 helo=gnutoo.cyberdimension.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovMsq-0001TN-Uf for 59218@debbugs.gnu.org; Wed, 16 Nov 2022 13:11:37 -0500 Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1]) by cyberdimension.org (OpenSMTPD) with ESMTP id b58d64d4; Wed, 16 Nov 2022 18:10:46 +0000 (UTC) Received: from localhost.localdomain (localhost [::1]) by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id 043ce1df; Wed, 16 Nov 2022 18:10:46 +0000 (UTC) From: Denis 'GNUtoo' Carikli Date: Wed, 16 Nov 2022 19:11:29 +0100 Message-Id: <20221116181129.5505-1-GNUtoo@cyberdimension.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/geo.scm (navit): New variable. Signed-off-by: Denis 'GNUtoo' Carikli --- gnu/packages/geo.scm | 106 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) base-commit: 2757de2e2b271d87f6f72ba4161c2225fbdc9e78 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 ;;; Copyright © 2022 Roman Scherer ;;; Copyright © 2022 Maxim Cournoyer +;;; Copyright © 2022 Denis 'GNUtoo' Carikli ;;; ;;; 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" + (("") + "")) + ;; 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" + (("") + "")) + ;; 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 + ""))))) + (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)))