summary refs log tree commit diff
path: root/pkgs/applications/misc/viking
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-05-31 15:01:33 +0000
committerLudovic Courtès <ludo@gnu.org>2009-05-31 15:01:33 +0000
commitb179d2c4809ad76ee3c60407e72680c7acd94fe3 (patch)
tree6339a33f79c90bdd1bacdd05ff5aeee60f474cc3 /pkgs/applications/misc/viking
parent1660db54ff5ad77dce862134e2e307cbce3f378f (diff)
downloadnixpkgs-b179d2c4809ad76ee3c60407e72680c7acd94fe3.tar
nixpkgs-b179d2c4809ad76ee3c60407e72680c7acd94fe3.tar.gz
nixpkgs-b179d2c4809ad76ee3c60407e72680c7acd94fe3.tar.bz2
nixpkgs-b179d2c4809ad76ee3c60407e72680c7acd94fe3.tar.lz
nixpkgs-b179d2c4809ad76ee3c60407e72680c7acd94fe3.tar.xz
nixpkgs-b179d2c4809ad76ee3c60407e72680c7acd94fe3.tar.zst
nixpkgs-b179d2c4809ad76ee3c60407e72680c7acd94fe3.zip
Viking: Link against libgps from `gpsd', thanks to a couple of Debian patches.
svn path=/nixpkgs/trunk/; revision=15810
Diffstat (limited to 'pkgs/applications/misc/viking')
-rw-r--r--pkgs/applications/misc/viking/default.nix11
-rw-r--r--pkgs/applications/misc/viking/gpsdclient.patch51
-rw-r--r--pkgs/applications/misc/viking/implicit-declaration.patch13
3 files changed, 69 insertions, 6 deletions
diff --git a/pkgs/applications/misc/viking/default.nix b/pkgs/applications/misc/viking/default.nix
index eabd4a020f6..a98ed2aa5ff 100644
--- a/pkgs/applications/misc/viking/default.nix
+++ b/pkgs/applications/misc/viking/default.nix
@@ -1,5 +1,5 @@
 { fetchurl, stdenv, pkgconfig, intltool, gettext, gtk, expat, curl
-, bc, file }:
+, gpsd, bc, file }:
 
 stdenv.mkDerivation rec {
   name = "viking-0.9.8";
@@ -9,12 +9,11 @@ stdenv.mkDerivation rec {
     sha256 = "1is8g6ld5pd13iiv9qm8526q1cblg01pqyakg52sd6k7fys7dz2d";
   };
 
-  patches = [ ./test-bc.patch ];
+  patches = [
+    ./test-bc.patch ./gpsdclient.patch ./implicit-declaration.patch
+  ];
 
-  buildInputs = [ pkgconfig intltool gettext gtk expat curl bc file ];
-
-  # XXX: Remove this once we have `gpsd' (http://gpsd.berlios.de/).
-  configureFlags = "--disable-realtime-gps-tracking";
+  buildInputs = [ pkgconfig intltool gettext gtk expat curl gpsd bc file ];
 
   doCheck = true;
 
diff --git a/pkgs/applications/misc/viking/gpsdclient.patch b/pkgs/applications/misc/viking/gpsdclient.patch
new file mode 100644
index 00000000000..41722632260
--- /dev/null
+++ b/pkgs/applications/misc/viking/gpsdclient.patch
@@ -0,0 +1,51 @@
+Debian patch that allows compilation with libgps (from `gpsd').
+Failing to apply this patch, we get the following error:
+
+  vikgpslayer.c:237: error: field 'realtime_gpsd_unit' has incomplete type
+  vikgpslayer.c: In function 'vik_gps_layer_new':
+  vikgpslayer.c:473: warning: implicit declaration of function 'gpsd_units'
+  vikgpslayer.c: In function 'rt_gpsd_try_connect':
+  vikgpslayer.c:1321: warning: passing argument 2 of 'gps_set_raw_hook' from incompatible pointer type
+
+diff -urNad trunk~/src/gpsdclient.h trunk/src/gpsdclient.h
+--- trunk~/src/gpsdclient.h	1970-01-01 01:00:00.000000000 +0100
++++ trunk/src/gpsdclient.h	2009-04-15 14:30:22.000000000 +0200
+@@ -0,0 +1,25 @@
++/* $Id: gpsdclient.h 5330 2009-03-03 04:05:42Z ckuethe $ */
++/* gpsdclient.h -- common functions for GPSD clients */
++
++#ifndef _GPSD_GPSDCLIENT_H_
++#define _GPSD_GPSDCLIENT_H_
++struct fixsource_t 
++/* describe a data source */
++{
++    char *spec;		/* pointer to actual storage */
++    char *server;
++    char *port;
++    char *device;
++};
++
++enum unit {unspecified, imperial, nautical, metric};
++enum unit gpsd_units(void);
++enum deg_str_type { deg_dd, deg_ddmm, deg_ddmmss };
++
++extern /*@observer@*/ char *deg_to_str( enum deg_str_type type,  double f);
++
++extern void gpsd_source_spec(/*@null@*/const char *fromstring, 
++			     /*@out@*/struct fixsource_t *source);
++
++#endif /* _GPSDCLIENT_H_ */
++/* gpsdclient.h ends here */
+diff -urNad trunk~/src/vikgpslayer.c trunk/src/vikgpslayer.c
+--- trunk~/src/vikgpslayer.c	2009-02-08 14:47:01.000000000 +0100
++++ trunk/src/vikgpslayer.c	2009-04-15 14:30:55.000000000 +0200
+@@ -39,6 +39,9 @@
+ #include <glib/gi18n.h>
+ #ifdef VIK_CONFIG_REALTIME_GPS_TRACKING
+ #include <gps.h>
++#ifndef gpsd_units
++#include "gpsdclient.h"
++#endif
+ #endif
+ 
+ #if ! GLIB_CHECK_VERSION(2,14,0)
diff --git a/pkgs/applications/misc/viking/implicit-declaration.patch b/pkgs/applications/misc/viking/implicit-declaration.patch
new file mode 100644
index 00000000000..60f8ad1177f
--- /dev/null
+++ b/pkgs/applications/misc/viking/implicit-declaration.patch
@@ -0,0 +1,13 @@
+Debian patch that fixes an implicat declaration.
+
+diff -urNad trunk~/src/util.c trunk/src/util.c
+--- trunk~/src/util.c	2009-02-08 14:47:01.000000000 +0100
++++ trunk/src/util.c	2009-04-15 17:23:44.000000000 +0200
+@@ -26,6 +26,7 @@
+ #endif
+ 
+ #include <glib/gi18n.h>
++#include <glib/gprintf.h>
+ 
+ #include "dialog.h"
+