summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2011-06-17 08:39:56 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2011-06-17 08:39:56 +0000
commit301d933dd02f80287a8876cdfaa9e2549127aece (patch)
tree1f5d9583e5f23f5483bc7270eec605e596ab7e50 /sci-geosciences
parentMask www-client/chromium-14 and dev-lang/v8-3.4 dev channel releases. (diff)
downloadgentoo-2-301d933dd02f80287a8876cdfaa9e2549127aece.tar.gz
gentoo-2-301d933dd02f80287a8876cdfaa9e2549127aece.tar.bz2
gentoo-2-301d933dd02f80287a8876cdfaa9e2549127aece.zip
Fix building with gpsd-2.96. Fixes bug #371859. Patch taken from archlinux.
(Portage version: 2.2.0_alpha38/cvs/Linux x86_64)
Diffstat (limited to 'sci-geosciences')
-rw-r--r--sci-geosciences/viking/ChangeLog6
-rw-r--r--sci-geosciences/viking/files/viking-gpsd-2.96.patch47
-rw-r--r--sci-geosciences/viking/viking-1.2.ebuild10
3 files changed, 60 insertions, 3 deletions
diff --git a/sci-geosciences/viking/ChangeLog b/sci-geosciences/viking/ChangeLog
index abe330e70da6..da46b06d8deb 100644
--- a/sci-geosciences/viking/ChangeLog
+++ b/sci-geosciences/viking/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sci-geosciences/viking
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/viking/ChangeLog,v 1.13 2011/06/07 08:40:24 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/viking/ChangeLog,v 1.14 2011/06/17 08:39:56 scarabeus Exp $
+
+ 17 Jun 2011; Tomáš Chvátal <scarabeus@gentoo.org> viking-1.2.ebuild,
+ +files/viking-gpsd-2.96.patch:
+ Fix building with gpsd-2.96. Fixes bug #371859. Patch taken from archlinux.
*viking-1.2 (07 Jun 2011)
diff --git a/sci-geosciences/viking/files/viking-gpsd-2.96.patch b/sci-geosciences/viking/files/viking-gpsd-2.96.patch
new file mode 100644
index 000000000000..01b117312a21
--- /dev/null
+++ b/sci-geosciences/viking/files/viking-gpsd-2.96.patch
@@ -0,0 +1,47 @@
+diff -wbBur viking-1.1/configure.ac viking-1.1.my/configure.ac
+--- viking-1.1/configure.ac 2011-02-08 21:29:01.000000000 +0000
++++ viking-1.1.my/configure.ac 2011-04-18 13:31:07.000000000 +0000
+@@ -244,7 +244,7 @@
+ [ac_cv_enable_realtimegpstracking], [ac_cv_enable_realtimegpstracking=yes])
+ case $ac_cv_enable_realtimegpstracking in
+ yes)
+- AC_CHECK_LIB(gps,gps_poll,,AC_MSG_ERROR([libgps is needed for Realtime GPS Tracking feature[,] but not found. The feature can be disable with --disable-realtime-gps-tracking]))
++ AC_CHECK_LIB(gps,gps_read,,AC_MSG_ERROR([libgps is needed for Realtime GPS Tracking feature[,] but not found. The feature can be disable with --disable-realtime-gps-tracking]))
+ AC_DEFINE(VIK_CONFIG_REALTIME_GPS_TRACKING, [], [REALTIME GPS TRACKING STUFF])
+ ;;
+ esac
+diff -wbBur viking-1.1/src/vikgpslayer.c viking-1.1.my/src/vikgpslayer.c
+--- viking-1.1/src/vikgpslayer.c 2011-02-08 21:09:00.000000000 +0000
++++ viking-1.1.my/src/vikgpslayer.c 2011-04-18 13:35:48.000000000 +0000
+@@ -1377,8 +1377,11 @@
+ {
+ VikGpsLayer *vgl = data;
+ if (condition == G_IO_IN) {
+- if (!gps_poll(&vgl->vgpsd->gpsd))
++ if (!gps_read(&vgl->vgpsd->gpsd))
++ {
++ gpsd_raw_hook(&vgl->vgpsd->gpsd, NULL);
+ return TRUE;
++ }
+ else {
+ g_warning("Disconnected from gpsd. Trying to reconnect");
+ rt_gpsd_disconnect(vgl);
+@@ -1408,7 +1411,8 @@
+ {
+ VikGpsLayer *vgl = (VikGpsLayer *)data;
+ #ifndef HAVE_GPS_OPEN_R
+- struct gps_data_t *gpsd = gps_open(vgl->gpsd_host, vgl->gpsd_port);
++ static struct gps_data_t __gd;
++ struct gps_data_t *gpsd = gps_open(vgl->gpsd_host, vgl->gpsd_port, &__gd) ? NULL : &__gd;
+
+ if (gpsd == NULL) {
+ #else
+@@ -1439,7 +1443,7 @@
+ vik_trw_layer_add_track(vtl, vgl->realtime_track_name, vgl->realtime_track);
+ }
+
+- gps_set_raw_hook(&vgl->vgpsd->gpsd, gpsd_raw_hook);
++// gps_set_raw_hook(&vgl->vgpsd->gpsd, gpsd_raw_hook);
+ vgl->realtime_io_channel = g_io_channel_unix_new(vgl->vgpsd->gpsd.gps_fd);
+ vgl->realtime_io_watch_id = g_io_add_watch( vgl->realtime_io_channel,
+ G_IO_IN | G_IO_ERR | G_IO_HUP, gpsd_data_available, vgl);
diff --git a/sci-geosciences/viking/viking-1.2.ebuild b/sci-geosciences/viking/viking-1.2.ebuild
index 2334701da216..94b138e73a3a 100644
--- a/sci-geosciences/viking/viking-1.2.ebuild
+++ b/sci-geosciences/viking/viking-1.2.ebuild
@@ -1,9 +1,11 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/viking/viking-1.2.ebuild,v 1.1 2011/06/07 08:40:24 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/viking/viking-1.2.ebuild,v 1.2 2011/06/17 08:39:56 scarabeus Exp $
EAPI=4
+inherit base
+
DESCRIPTION="GPS data editor and analyzer"
HOMEPAGE="http://viking.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
@@ -19,7 +21,7 @@ COMMONDEPEND="dev-libs/expat
sys-libs/zlib
x11-libs/gdk-pixbuf:2
x11-libs/gtk+:2
- gps? ( sci-geosciences/gpsd )
+ gps? ( >=sci-geosciences/gpsd-2.96 )
"
RDEPEND="${COMMONDEPEND}
sci-geosciences/gpsbabel
@@ -34,6 +36,10 @@ DEPEND="${COMMONDEPEND}
DOCS=( README doc/GEOCODED-PHOTOS doc/GETTING-STARTED doc/GPSMAPPER )
+PATCHES=(
+ "${FILESDIR}"/${PN}-gpsd-2.96.patch
+)
+
src_configure() {
econf \
--disable-deprecations \