From cb0d79e60f1c9bf843f5e677bc1a57be8ecc4fb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 1 Jul 2012 17:32:03 +0200 Subject: [PATCH] viking: Update to 1.3. --- pkgs/applications/misc/viking/default.nix | 26 ++++++---- .../applications/misc/viking/gpsdclient.patch | 51 ------------------- .../misc/viking/implicit-declaration.patch | 13 ----- pkgs/applications/misc/viking/test-bc.patch | 22 -------- pkgs/top-level/all-packages.nix | 4 +- 5 files changed, 20 insertions(+), 96 deletions(-) delete mode 100644 pkgs/applications/misc/viking/gpsdclient.patch delete mode 100644 pkgs/applications/misc/viking/implicit-declaration.patch delete mode 100644 pkgs/applications/misc/viking/test-bc.patch diff --git a/pkgs/applications/misc/viking/default.nix b/pkgs/applications/misc/viking/default.nix index a98ed2aa5ff..70ac055db09 100644 --- a/pkgs/applications/misc/viking/default.nix +++ b/pkgs/applications/misc/viking/default.nix @@ -1,19 +1,27 @@ { fetchurl, stdenv, pkgconfig, intltool, gettext, gtk, expat, curl -, gpsd, bc, file }: +, gpsd, bc, file, gnome_doc_utils, libexif, libxml2, libxslt, scrollkeeper +, docbook_xml_dtd_412 }: -stdenv.mkDerivation rec { - name = "viking-0.9.8"; +let version = "1.3"; in +stdenv.mkDerivation { + name = "viking-${version}"; src = fetchurl { - url = "mirror://sourceforge/viking/${name}.tar.gz"; - sha256 = "1is8g6ld5pd13iiv9qm8526q1cblg01pqyakg52sd6k7fys7dz2d"; + url = "mirror://sourceforge/viking/viking/${version}/viking-${version}.tar.gz"; + sha256 = "1psgy1myx9xn7zgpvqrpricsv041sz41mm82hj5i28k72fq47p2l"; }; - patches = [ - ./test-bc.patch ./gpsdclient.patch ./implicit-declaration.patch - ]; + buildInputs = + [ pkgconfig intltool gettext gtk expat curl gpsd bc file gnome_doc_utils + libexif libxml2 libxslt scrollkeeper docbook_xml_dtd_412 + ]; - buildInputs = [ pkgconfig intltool gettext gtk expat curl gpsd bc file ]; + configureFlags = [ "--disable-scrollkeeper" ]; + + preBuild = + '' sed -i help/Makefile \ + -e 's|--noout|--noout --nonet --path "${scrollkeeper}/share/xml/scrollkeeper/dtds"|g' + ''; doCheck = true; diff --git a/pkgs/applications/misc/viking/gpsdclient.patch b/pkgs/applications/misc/viking/gpsdclient.patch deleted file mode 100644 index 41722632260..00000000000 --- a/pkgs/applications/misc/viking/gpsdclient.patch +++ /dev/null @@ -1,51 +0,0 @@ -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 - #ifdef VIK_CONFIG_REALTIME_GPS_TRACKING - #include -+#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 deleted file mode 100644 index 60f8ad1177f..00000000000 --- a/pkgs/applications/misc/viking/implicit-declaration.patch +++ /dev/null @@ -1,13 +0,0 @@ -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 -+#include - - #include "dialog.h" - diff --git a/pkgs/applications/misc/viking/test-bc.patch b/pkgs/applications/misc/viking/test-bc.patch deleted file mode 100644 index fc0c91eec52..00000000000 --- a/pkgs/applications/misc/viking/test-bc.patch +++ /dev/null @@ -1,22 +0,0 @@ -For some reason, `bc -l' yields no output. - ---- viking-0.9.8/test/check_degrees_conversions.sh 2008-03-15 23:01:48.000000000 +0100 -+++ viking-0.9.8/test/check_degrees_conversions.sh 2009-05-30 23:23:27.000000000 +0200 -@@ -7,7 +7,7 @@ function check_success() - for value in "$@" - do - result=`./degrees_converter "$value" | cut -d' ' -f3` -- diff=`echo "$result - $expected" | bc -l` -+ diff=`echo "$result - $expected" | bc` - if [ $diff != 0 ] - then - echo "$value -> $result != $expected" -@@ -23,7 +23,7 @@ function check_failure() - for value in "$@" - do - result=`./degrees_converter "$value" | cut -d' ' -f3` -- diff=`echo "$result - $expected" | bc -l` -+ diff=`echo "$result - $expected" | bc` - if [ $diff = 0 ] - then - echo "$value -> $result = $expected" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2bc9d10b2bc..c59993528ce 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1533,7 +1533,9 @@ let vifm = callPackage ../applications/misc/vifm {}; - viking = callPackage ../applications/misc/viking { }; + viking = callPackage ../applications/misc/viking { + inherit (gnome) scrollkeeper; + }; vncrec = builderDefsPackage ../tools/video/vncrec { inherit (xlibs) imake libX11 xproto gccmakedep libXt