Source: gpsdrive
Version: 2.10~pre4-6.dfsg-5.1
Severity: serious
Tags: patch

The gpsdrive package is FTBFS with version 2.0.0 of the mapnik library,
which is the current version in Debian wheezy and sid, and Ubuntu
precise. The FTBFS occurs because the APIs of the new 2.0.0 version of
Mapnik are backward-incompatible to the old 0.7.1 version of Mapnik (see
https://github.com/mapnik/mapnik/wiki/Mapnik2).

Note, there is a Debian bug requesting to update the gpsdrive packages
to version 2.11 (Bug #591260), however this will not help resolve the
FTBFS, because 2.11 of gpsdrive is also FTBFS with mapnik version 2.0.0.

Since I'm not sure when or if the gpsdrive developers plan to migrate to
Mapnik 2.0.0, I've submitted a patch to the Ubuntu package that disables
the optional mapnik library in the gpsdrive packages. Attaching the
patch, for Debian upstream application. (I haven't made/tested the minor
changes needed for precise->unstable.)

Allison
=== modified file 'debian/README.Debian'
--- debian/README.Debian	2008-08-31 17:40:05 +0000
+++ debian/README.Debian	2011-12-01 22:27:04 +0000
@@ -1,6 +1,14 @@
 gpsdrive for Debian
 -------------------
 
+Using gpsdrive with mapnik 2.0
+------------------------------
+
+* Gpsdrive is incompatible with the new APIs of mapnik 2.0.0. This
+  optional library is now disabled in the package.
+
+ -- Allison Randal <alli...@canonical.com> Thu, 01 Dec 2011 12:48:22 -0800
+
 Upgrading from gpsdrive 2.09 (etch)
 -------------------------------------
 * The mysql database schema has been changed.

=== modified file 'debian/changelog'
--- debian/changelog	2011-11-23 23:34:54 +0000
+++ debian/changelog	2011-12-01 22:55:21 +0000
@@ -1,3 +1,12 @@
+gpsdrive (2.10~pre4-6.dfsg-5ubuntu4) precise; urgency=low
+
+  * Disable optional mapnik libraries, gpsdrive is incompatible with
+    APIs of mapnik version 2.0.0.
+  * debian/patches/107-fix-disable-mapnik.dpatch:
+    Fix known bug with gpsdrive-2.10pre4 when disabling Mapnik library.
+
+ -- Allison Randal <alli...@canonical.com>  Thu, 01 Dec 2011 12:48:22 -0800
+
 gpsdrive (2.10~pre4-6.dfsg-5ubuntu3) precise; urgency=low
 
   * Rebuild for libmysqlclient transition

=== modified file 'debian/control'
--- debian/control	2010-07-26 06:41:40 +0000
+++ debian/control	2011-12-01 21:39:32 +0000
@@ -6,7 +6,7 @@
 Uploaders: Andreas Putzo <andr...@putzo.net>, Francesco Paolo Lovergine <fran...@debian.org>
 DM-Upload-Allowed: yes
 Build-Depends: debhelper (>= 7), automake1.9, libtool, pkg-config, libpcre3-dev, libgtk2.0-dev,libart-2.0-dev, libxml2-dev, libmysqlclient-dev, 
- autotools-dev, dpatch, libmapnik-dev (>= 0.6), libboost-dev, libboost-filesystem-dev, libboost-serialization-dev, libdbus-glib-1-dev
+ autotools-dev, dpatch, libboost-dev, libboost-filesystem-dev, libboost-serialization-dev, libdbus-glib-1-dev, libltdl-dev (>= 2.4)
 Standards-Version: 3.8.4
 Homepage: http://gpsdrive.de
 Vcs-Svn: svn://svn.debian.org/svn/pkg-grass/packages/gpsdrive/trunk
@@ -40,7 +40,7 @@
 
 Package: gpsdrive-scripts
 Architecture: all
-Depends: gpsdrive, ${perl:Depends}, python, python-imaging, python-mapnik, libdbi-perl, libdbd-mysql-perl, libdate-manip-perl, libfile-slurp-perl, 
+Depends: gpsdrive, ${perl:Depends}, python, python-imaging, libdbi-perl, libdbd-mysql-perl, libdate-manip-perl, libfile-slurp-perl, 
  libmime-base64-perl, libtime-local-perl, libwww-curl-perl, libwww-mechanize-perl, libxml-parser-perl, libxml-simple-perl, libxml-twig-perl, 
  libxml-writer-perl, perlmagick, perl-tk
 Description: Various scripts for gpsdrive

=== modified file 'debian/gpsdrive-scripts.install'
--- debian/gpsdrive-scripts.install	2008-03-26 18:35:38 +0000
+++ debian/gpsdrive-scripts.install	2011-12-01 20:56:19 +0000
@@ -5,7 +5,7 @@
 usr/bin/gpspoint2gpsdrive.pl
 usr/bin/gpsreplay
 usr/bin/poi-manager.pl
-usr/bin/gpsdrive_mapnik_gentiles.py
+#usr/bin/gpsdrive_mapnik_gentiles.py
 usr/share/perl5/Geo/Filter/*        usr/share/perl5/Geo/Gpsdrive/Filter
 usr/share/perl5/Geo/GPX/*           usr/share/perl5/Geo/Gpsdrive/GPX
 usr/share/perl5/Geo/Geometry.pm     usr/share/perl5/Geo/Gpsdrive

=== modified file 'debian/gpsdrive.install'
--- debian/gpsdrive.install	2008-08-31 17:40:05 +0000
+++ debian/gpsdrive.install	2011-12-01 20:55:54 +0000
@@ -2,5 +2,5 @@
 usr/bin/friendsd2
 usr/share/applications/gpsdrive.desktop
 usr/share/gpsdrive/map_koord.txt
-usr/share/gpsdrive/mapnik/osm.xml
+#usr/share/gpsdrive/mapnik/osm.xml
 usr/share/map-icons/icons.xml usr/share/gpsdrive/map-icons/

=== modified file 'debian/patches/00list'
--- debian/patches/00list	2011-07-05 12:30:16 +0000
+++ debian/patches/00list	2011-12-01 22:35:18 +0000
@@ -22,3 +22,4 @@
 104-lp-325288
 105-fix-xcursor-check.dpatch
 106-add-boost-links.dpatch
+107-fix-disable-mapnik.dpatch

=== added file 'debian/patches/107-fix-disable-mapnik.dpatch'
--- debian/patches/107-fix-disable-mapnik.dpatch	1970-01-01 00:00:00 +0000
+++ debian/patches/107-fix-disable-mapnik.dpatch	2011-12-01 22:37:18 +0000
@@ -0,0 +1,24 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 107-disable-mapnik.dpatch by Allison Randal <alli...@canonical.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Don't call into the mapnik library APIs when mapnik is disabled.
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' ftbfs-precise~/src/map_handler.c ftbfs-precise/src/map_handler.c
+--- ftbfs-precise~/src/map_handler.c	2011-12-01 22:24:15.000000000 +0000
++++ ftbfs-precise/src/map_handler.c	2011-12-01 22:37:16.298094236 +0000
+@@ -660,9 +660,12 @@
+   if (maploaded)
+     gdk_pixbuf_unref (image);
+ 
++#ifdef MAPNIK
+   if ( !strcmp (filename,"mapnik") ) {
+ 	  limage = gdk_pixbuf_new_from_data(get_mapnik_imagedata(), GDK_COLORSPACE_RGB, FALSE, 8, 1280, 1024, 1280 * 3, NULL, NULL);
+-  } else {
++  } else
++#endif // MAPNIK
++  {
+ 	  limage = gdk_pixbuf_new_from_file (filename, NULL);
+ 	  if (limage == NULL)
+ 	    {

=== modified file 'debian/rules'
--- debian/rules	2010-02-04 16:53:01 +0000
+++ debian/rules	2011-12-01 20:44:45 +0000
@@ -13,7 +13,7 @@
 DEB_UPSTREAM_VERSION := 2.10~pre4-6.dfsg
 UPSTREAM_VERSION := 2.10pre4
 DESTDIR  := ${CURDIR}/debian/tmp
-MAPNIK_PATH = $(shell mapnik-plugin-base)
+# MAPNIK_PATH = $(shell mapnik-plugin-base)
 
 CFLAGS = -Wall -g
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -51,7 +51,7 @@
 	libtoolize -i -f
 	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
 				--prefix=/usr \
-				--enable-mapnik \
+				--disable-mapnik \
 				--enable-dbus \
 				CFLAGS="$(CFLAGS)"
 
@@ -90,11 +90,11 @@
 			install-poiDATA \
 			install-mapsDATA \
 			DESTDIR=$(DESTDIR)
-	install -d $(CURDIR)/debian/tmp/usr/share/gpsdrive/mapnik
-	install -m 644 $(CURDIR)/scripts/mapnik/osm.xml $(CURDIR)/debian/tmp/usr/share/gpsdrive/mapnik/osm.xml
+	# install -d $(CURDIR)/debian/tmp/usr/share/gpsdrive/mapnik
+	# install -m 644 $(CURDIR)/scripts/mapnik/osm.xml $(CURDIR)/debian/tmp/usr/share/gpsdrive/mapnik/osm.xml
 	install -d $(CURDIR)/debian/tmp/usr/share/map-icons
 	install -m 644 $(CURDIR)/data/map-icons/icons.xml $(CURDIR)/debian/tmp/usr/share/map-icons/icons.xml
-	$(MAKE) -C scripts/mapnik/ install DESTDIR=$(DESTDIR)
+	# $(MAKE) -C scripts/mapnik/ install DESTDIR=$(DESTDIR)
 	$(MAKE) -C src/ install DESTDIR=$(DESTDIR)
 			
 install-indep: build-indep
@@ -116,7 +116,7 @@
 	# strip language extensions
 	mv -f $(CURDIR)/debian/gpsdrive-scripts/usr/bin/convert-waypoints.pl $(CURDIR)/debian/gpsdrive-scripts/usr/bin/convert-waypoints
 	mv -f $(CURDIR)/debian/gpsdrive-scripts/usr/bin/geoinfo.pl $(CURDIR)/debian/gpsdrive-scripts/usr/bin/geoinfo
-	mv -f $(CURDIR)/debian/gpsdrive-scripts/usr/bin/gpsdrive_mapnik_gentiles.py $(CURDIR)/debian/gpsdrive-scripts/usr/bin/gpsdrive_mapnik_gentiles
+	# mv -f $(CURDIR)/debian/gpsdrive-scripts/usr/bin/gpsdrive_mapnik_gentiles.py $(CURDIR)/debian/gpsdrive-scripts/usr/bin/gpsdrive_mapnik_gentiles
 	mv -f $(CURDIR)/debian/gpsdrive-scripts/usr/bin/gpspoint2gpsdrive.pl $(CURDIR)/debian/gpsdrive-scripts/usr/bin/gpspoint2gpsdrive
 	mv -f $(CURDIR)/debian/gpsdrive-scripts/usr/bin/poi-manager.pl $(CURDIR)/debian/gpsdrive-scripts/usr/bin/poi-manager
 	mv -f $(CURDIR)/debian/gpsdrive-scripts/usr/share/man/man1/convert-waypoints.pl.1.gz \

_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to