From patchwork Sat Nov 12 15:24:55 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: 44473 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 CF66827BBEB; Sat, 12 Nov 2022 15:26:17 +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=ham 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 5345827BBE9 for ; Sat, 12 Nov 2022 15:26:16 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otsOT-0007ZN-0N; Sat, 12 Nov 2022 10:26:05 -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 1otsOQ-0007Z3-MX for guix-patches@gnu.org; Sat, 12 Nov 2022 10:26:02 -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 1otsOQ-00061I-ET for guix-patches@gnu.org; Sat, 12 Nov 2022 10:26:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1otsOQ-00054f-9n for guix-patches@gnu.org; Sat, 12 Nov 2022 10:26:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59218] [PATCH] gnu: Add navit Resent-From: Denis 'GNUtoo' Carikli Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 12 Nov 2022 15:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59218 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59218@debbugs.gnu.org Cc: Denis 'GNUtoo' Carikli X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166826670619436 (code B ref -1); Sat, 12 Nov 2022 15:26:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Nov 2022 15:25:06 +0000 Received: from localhost ([127.0.0.1]:48793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otsNV-00053P-G9 for submit@debbugs.gnu.org; Sat, 12 Nov 2022 10:25:05 -0500 Received: from lists.gnu.org ([209.51.188.17]:40162) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otsNU-00053I-H9 for submit@debbugs.gnu.org; Sat, 12 Nov 2022 10:25:05 -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 1otsNU-0007Vd-Bu for guix-patches@gnu.org; Sat, 12 Nov 2022 10:25:04 -0500 Received: from cyberdimension.org ([2001:910:1314:ffff::1] helo=gnutoo.cyberdimension.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1otsNR-0005Ol-ST for guix-patches@gnu.org; Sat, 12 Nov 2022 10:25:03 -0500 Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1]) by cyberdimension.org (OpenSMTPD) with ESMTP id ef9bf645; Sat, 12 Nov 2022 15:18:40 +0000 (UTC) Received: from localhost.localdomain (localhost [::1]) by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id af02e3de; Sat, 12 Nov 2022 15:18:40 +0000 (UTC) From: Denis 'GNUtoo' Carikli Date: Sat, 12 Nov 2022 16:24:55 +0100 Message-Id: <20221112152455.7436-1-GNUtoo@cyberdimension.org> X-Mailer: git-send-email 2.38.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2001:910:1314:ffff::1; envelope-from=GNUtoo@cyberdimension.org; helo=gnutoo.cyberdimension.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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(+) 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 ;;; 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)))