r3078 - packages/gpsdrive/trunk/debian/patches
hamish-guest at alioth.debian.org
hamish-guest at alioth.debian.org
Mon Jul 2 08:23:29 UTC 2012
Author: hamish-guest
Date: 2012-07-02 08:23:29 +0000 (Mon, 02 Jul 2012)
New Revision: 3078
Removed:
packages/gpsdrive/trunk/debian/patches/01-make.dpatch
packages/gpsdrive/trunk/debian/patches/10-mapnikdir.dpatch
packages/gpsdrive/trunk/debian/patches/100-fix-insecure-tempfiles.dpatch
packages/gpsdrive/trunk/debian/patches/101-signalposreq.dpatch
packages/gpsdrive/trunk/debian/patches/102-unittest.dpatch
packages/gpsdrive/trunk/debian/patches/40-backported.dpatch
packages/gpsdrive/trunk/debian/patches/50-scripts.dpatch
packages/gpsdrive/trunk/debian/patches/60-sql.dpatch
packages/gpsdrive/trunk/debian/patches/80-dbus.dpatch
packages/gpsdrive/trunk/debian/patches/85-settings.dpatch
packages/gpsdrive/trunk/debian/patches/90-usage.dpatch
packages/gpsdrive/trunk/debian/patches/95-newapi.dpatch
packages/gpsdrive/trunk/debian/patches/96-mapnik-plugins-dir.dpatch
packages/gpsdrive/trunk/debian/patches/98-mapnik-exception.dpatch
packages/gpsdrive/trunk/debian/patches/99-autobestmap.dpatch
packages/gpsdrive/trunk/debian/patches/gpsdrive2.10pre7_osm_proj.patch
Modified:
packages/gpsdrive/trunk/debian/patches/00list
packages/gpsdrive/trunk/debian/patches/30-icons.dpatch
Log:
drop old patches no longer relevant for gpsdrive 2.12
Modified: packages/gpsdrive/trunk/debian/patches/00list
===================================================================
--- packages/gpsdrive/trunk/debian/patches/00list 2012-06-29 08:29:04 UTC (rev 3077)
+++ packages/gpsdrive/trunk/debian/patches/00list 2012-07-02 08:23:29 UTC (rev 3078)
@@ -1,21 +1,6 @@
-01-make
03-manpage
-10-mapnikdir
20-homedir
30-icons
-40-backported
-50-scripts
-60-sql
70-perl
-80-dbus
-85-settings
-90-usage
-95-newapi
-96-mapnik-plugins-dir
97-osmxml
-98-mapnik-exception
-99-autobestmap
-100-fix-insecure-tempfiles
-101-signalposreq
-102-unittest
103-no-textquery
Deleted: packages/gpsdrive/trunk/debian/patches/01-make.dpatch
===================================================================
--- packages/gpsdrive/trunk/debian/patches/01-make.dpatch 2012-06-29 08:29:04 UTC (rev 3077)
+++ packages/gpsdrive/trunk/debian/patches/01-make.dpatch 2012-07-02 08:23:29 UTC (rev 3078)
@@ -1,266 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 01-make.dpatch by Andreas Putzo <andreas at putzo.net>
-##
-## DP: Remove some SUBDIRS from Makefile.am
-## DP: Remove perl checks from configure.ac
-## DP: Remove map-icons from Makefile.am
-## DP: call pod2man on debian/scripts/gpsfetchmap.pl
-
- at DPATCH@
-diff -urNad gpsdrive-2.10~pre4~/Makefile.am gpsdrive-2.10~pre4/Makefile.am
---- gpsdrive-2.10~pre4~/Makefile.am 2007-09-15 15:12:07.000000000 +0000
-+++ gpsdrive-2.10~pre4/Makefile.am 2008-07-19 15:23:42.000000000 +0000
-@@ -1,7 +1,7 @@
- # Makefile.am in main dir
- #AUTOMAKE_OPTIONS=dist-bzip2
-
--SUBDIRS = src man scripts data Documentation debian DSL gentoo po tests
-+SUBDIRS = src man scripts data Documentation po
- DIST_SUBDIRS = $(SUBDIRS)
-
-
-diff -urNad gpsdrive-2.10~pre4~/configure.ac gpsdrive-2.10~pre4/configure.ac
---- gpsdrive-2.10~pre4~/configure.ac 2007-09-15 17:05:51.000000000 +0000
-+++ gpsdrive-2.10~pre4/configure.ac 2008-07-19 15:23:42.000000000 +0000
-@@ -36,13 +36,13 @@
-
- wLL_LINGUAS="da de de_AT es fr hu it ja nl ru sk sv tr"
-
--AC_CONFIG_FILES([DSL/Makefile])
-+dnl AC_CONFIG_FILES([DSL/Makefile])
- AC_CONFIG_FILES([Documentation/Makefile])
- AC_CONFIG_FILES([Makefile])
- AC_CONFIG_FILES([data/Makefile])
- AC_CONFIG_FILES([data/map-icons/Makefile])
--AC_CONFIG_FILES([debian/Makefile])
--AC_CONFIG_FILES([gentoo/Makefile])
-+dnl AC_CONFIG_FILES([debian/Makefile])
-+dnl AC_CONFIG_FILES([gentoo/Makefile])
- AC_CONFIG_FILES([man/Makefile])
- AC_CONFIG_FILES([man/de/Makefile])
- AC_CONFIG_FILES([man/es/Makefile])
-@@ -54,7 +54,7 @@
- AC_CONFIG_FILES([src/Makefile])
- AC_CONFIG_FILES([src/lib_map/Makefile])
- AC_CONFIG_FILES([src/util/Makefile])
--AC_CONFIG_FILES([tests/Makefile])
-+dnl AC_CONFIG_FILES([tests/Makefile])
-
- AC_CHECK_FUNCS([bzero])
- AC_CHECK_FUNCS([floor])
-@@ -667,17 +667,17 @@
- PERL_PACKAGE_DIR=`echo ${PERL_VENDORLIB} | sed "s,/usr/share,${datadir},"`
- AC_SUBST(PERL_PACKAGE_DIR)
-
--AC_PROG_PERL_MODULES(File::Basename , , AC_MSG_ERROR(Need Perl module File::Basename))
--AC_PROG_PERL_MODULES(File::Copy , , AC_MSG_ERROR(Need Perl module File::Copy))
--AC_PROG_PERL_MODULES(File::Path , , AC_MSG_ERROR(Need Perl module File::Path))
--AC_PROG_PERL_MODULES(File::Temp , , AC_MSG_ERROR(Need Perl module File::Temp))
--AC_PROG_PERL_MODULES(Getopt::Long , , AC_MSG_ERROR(Need Perl module Getopt::Long))
--AC_PROG_PERL_MODULES(HTTP::Request , , AC_MSG_ERROR(Need Perl module HTTP::Request))
--AC_PROG_PERL_MODULES(HTTP::Request::Common , , AC_MSG_ERROR(Need Perl module HTTP::Request::Common))
--AC_PROG_PERL_MODULES(IO::File , , AC_MSG_ERROR(Need Perl module IO::File))
--AC_PROG_PERL_MODULES(LWP::Simple , , AC_MSG_ERROR(Need Perl module LWP::Simple))
--AC_PROG_PERL_MODULES(LWP::UserAgent , , AC_MSG_ERROR(Need Perl module LWP::UserAgent))
--AC_PROG_PERL_MODULES(Math::Trig , , AC_MSG_ERROR(Need Perl module Math::Trig))
-+#AC_PROG_PERL_MODULES(File::Basename , , AC_MSG_ERROR(Need Perl module File::Basename))
-+#AC_PROG_PERL_MODULES(File::Copy , , AC_MSG_ERROR(Need Perl module File::Copy))
-+#AC_PROG_PERL_MODULES(File::Path , , AC_MSG_ERROR(Need Perl module File::Path))
-+#AC_PROG_PERL_MODULES(File::Temp , , AC_MSG_ERROR(Need Perl module File::Temp))
-+#AC_PROG_PERL_MODULES(Getopt::Long , , AC_MSG_ERROR(Need Perl module Getopt::Long))
-+#AC_PROG_PERL_MODULES(HTTP::Request , , AC_MSG_ERROR(Need Perl module HTTP::Request))
-+#AC_PROG_PERL_MODULES(HTTP::Request::Common , , AC_MSG_ERROR(Need Perl module HTTP::Request::Common))
-+#AC_PROG_PERL_MODULES(IO::File , , AC_MSG_ERROR(Need Perl module IO::File))
-+#AC_PROG_PERL_MODULES(LWP::Simple , , AC_MSG_ERROR(Need Perl module LWP::Simple))
-+#AC_PROG_PERL_MODULES(LWP::UserAgent , , AC_MSG_ERROR(Need Perl module LWP::UserAgent))
-+#AC_PROG_PERL_MODULES(Math::Trig , , AC_MSG_ERROR(Need Perl module Math::Trig))
-
- # These will only be needed for Building GpsDrive Packages
- #AC_PROG_PERL_MODULES(File::Slurp , , AC_MSG_ERROR(Need Perl module File::Slurp))
-diff -urNad gpsdrive-2.10~pre4~/data/map-icons/Makefile.am gpsdrive-2.10~pre4/data/map-icons/Makefile.am
---- gpsdrive-2.10~pre4~/data/map-icons/Makefile.am 2007-09-15 18:50:48.000000000 +0000
-+++ gpsdrive-2.10~pre4/data/map-icons/Makefile.am 2008-07-19 15:23:42.000000000 +0000
-@@ -474,92 +474,6 @@
- svg_wlan_DATA = svg/wlan/closed.svg svg/wlan/open.svg svg/wlan/pay.svg svg/wlan/wep.svg
- svg_wlandir = $(datadir)/map-icons/svg/wlan
-
--
--japan_DATA = japan/health.svg japan/wlan.svg
--japandir = $(datadir)/map-icons/japan
--
--japan_accommodation_DATA =
--japan_accommodationdir = $(datadir)/map-icons/japan/accommodation
--
--japan_accomodation_DATA =
--japan_accomodationdir = $(datadir)/map-icons/japan/accomodation
--
--japan_education_DATA = japan/education/university.svg
--japan_educationdir = $(datadir)/map-icons/japan/education
--
--japan_education_school_DATA = japan/education/school/junior_high.svg
--japan_education_schooldir = $(datadir)/map-icons/japan/education/school
--
--japan_food_DATA =
--japan_fooddir = $(datadir)/map-icons/japan/food
--
--japan_geocache_DATA =
--japan_geocachedir = $(datadir)/map-icons/japan/geocache
--
--japan_health_DATA = japan/health/hospital.svg
--japan_healthdir = $(datadir)/map-icons/japan/health
--
--japan_incomming_DATA = japan/incomming/Bamboo_grove.svg japan/incomming/Barren_land.svg japan/incomming/Broadleaf_trees.svg japan/incomming/Coniferous_trees.svg japan/incomming/Crater_or_Fumarole.svg japan/incomming/District_Forest_Office.svg japan/incomming/Electronic_Datum_point.svg japan/incomming/Factory.svg japan/incomming/Field.svg japan/incomming/Fishing_port.svg japan/incomming/Government_or_Municipal_office.svg japan/incomming/High_school.svg japan/incomming/High_Tower.svg japan/incomming/Historical_site.svg japan/incomming/Home_for_the_aged.svg japan/incomming/Important_port.svg japan/incomming/Junior_college.svg japan/incomming/Koban.svg japan/incomming/Local_port.svg japan/incomming/Meteorological_observatory.svg japan/incomming/Mine.svg japan/incomming/Mulberry_field.svg japan/incomming/Oil_or_Gas_well.svg japan/incomming/Orchard.svg japan/incomming/Other_Ferry.svg japan/incomming/Other_Tree_plantation.svg japan/incomming/Palm_trees.svg japan/incomming/Pithead.svg japan/incomming/Police_station.svg japan/incomming/Power_plant.svg japan/incomming/Quarry.svg japan/incomming/Rice_field.svg japan/incomming/Shrine.svg japan/incomming/Siberian_Dwarf_Pines.svg japan/incomming/Spa.svg japan/incomming/Standard_point.svg japan/incomming/Tea_plantation.svg japan/incomming/Technical_college.svg japan/incomming/Temple.svg japan/incomming/the_Self-Defense_Forces.svg japan/incomming/Town_or_Village_Office.svg japan/incomming/Triangulation_point.svg
--japan_incommingdir = $(datadir)/map-icons/japan/incomming
--
--japan_misc_DATA =
--japan_miscdir = $(datadir)/map-icons/japan/misc
--
--japan_misc_landmark_DATA = japan/misc/landmark/chimney.svg japan/misc/landmark/lighthouse.svg japan/misc/landmark/tower.svg japan/misc/landmark/windmill.svg
--japan_misc_landmarkdir = $(datadir)/map-icons/japan/misc/landmark
--
--japan_money_DATA =
--japan_moneydir = $(datadir)/map-icons/japan/money
--
--japan_nautical_DATA =
--japan_nauticaldir = $(datadir)/map-icons/japan/nautical
--
--japan_people_DATA =
--japan_peopledir = $(datadir)/map-icons/japan/people
--
--japan_places_DATA =
--japan_placesdir = $(datadir)/map-icons/japan/places
--
--japan_public_DATA = japan/public/firebrigade.svg japan/public/post_office.svg
--japan_publicdir = $(datadir)/map-icons/japan/public
--
--japan_public_administration_DATA = japan/public/administration/court_of_law.svg japan/public/administration/townhall.svg
--japan_public_administrationdir = $(datadir)/map-icons/japan/public/administration
--
--japan_recreation_DATA =
--japan_recreationdir = $(datadir)/map-icons/japan/recreation
--
--japan_religion_DATA = japan/religion/cemetery.svg
--japan_religiondir = $(datadir)/map-icons/japan/religion
--
--japan_shopping_DATA =
--japan_shoppingdir = $(datadir)/map-icons/japan/shopping
--
--japan_shopping_rental_DATA = japan/shopping/rental/library.svg
--japan_shopping_rentaldir = $(datadir)/map-icons/japan/shopping/rental
--
--japan_sightseeing_DATA = japan/sightseeing/castle.svg japan/sightseeing/monument.svg japan/sightseeing/museum.svg
--japan_sightseeingdir = $(datadir)/map-icons/japan/sightseeing
--
--japan_sports_DATA =
--japan_sportsdir = $(datadir)/map-icons/japan/sports
--
--japan_transport_DATA =
--japan_transportdir = $(datadir)/map-icons/japan/transport
--
--japan_transport_ferry_DATA = japan/transport/ferry/ferry-car.svg
--japan_transport_ferrydir = $(datadir)/map-icons/japan/transport/ferry
--
--japan_vehicle_DATA =
--japan_vehicledir = $(datadir)/map-icons/japan/vehicle
--
--japan_waypoint_DATA =
--japan_waypointdir = $(datadir)/map-icons/japan/waypoint
--
--japan_wlan_DATA =
--japan_wlandir = $(datadir)/map-icons/japan/wlan
--
--
- classic.small_DATA = classic.small/accommodation.png classic.small/education.png classic.small/empty.png classic.small/food.png classic.small/geocache.png classic.small/health.png classic.small/misc.png classic.small/money.png classic.small/nautical.png classic.small/people.png classic.small/places.png classic.small/public.png classic.small/recreation.png classic.small/religion.png classic.small/shopping.png classic.small/sightseeing.png classic.small/sports.png classic.small/transport.png classic.small/unknown.png classic.small/vehicle.png classic.small/waypoint.png classic.small/wlan.png
- classic.smalldir = $(datadir)/map-icons/classic.small
-
-@@ -852,11 +766,6 @@
- classic.big_wlan_pay_DATA = classic.big/wlan/pay/fon.png
- classic.big_wlan_paydir = $(datadir)/map-icons/classic.big/wlan/pay
-
--
--nickw_DATA = nickw/amenity.png nickw/barn.png nickw/bridge.png nickw/campsite.png nickw/carpark.png nickw/caution.png nickw/church.png nickw/crossing.png nickw/farm.png nickw/industry.png nickw/interest.png nickw/mast.png nickw/node.png nickw/park.png nickw/pbridleway.png nickw/peak.png nickw/peak_small.png nickw/place.png nickw/pub.png nickw/railway.png nickw/restaurant.png nickw/road.png nickw/stationnew.png nickw/station.png nickw/teashop.png nickw/trackpoint.png nickw/tunnel.png nickw/viewpoint.png nickw/waypoint.png
--nickwdir = $(datadir)/map-icons/nickw
--
--
- icons.xml_DATA = icons.xml
- icons.xmldir = $(datadir)/map-icons/
-
-@@ -1016,34 +925,6 @@
- $(svg_waypoint_flag_DATA) \
- $(svg_waypoint_pin_DATA) \
- $(svg_wlan_DATA) \
-- $(japan_DATA) \
-- $(japan_accommodation_DATA) \
-- $(japan_accomodation_DATA) \
-- $(japan_education_DATA) \
-- $(japan_education_school_DATA) \
-- $(japan_food_DATA) \
-- $(japan_geocache_DATA) \
-- $(japan_health_DATA) \
-- $(japan_incomming_DATA) \
-- $(japan_misc_DATA) \
-- $(japan_misc_landmark_DATA) \
-- $(japan_money_DATA) \
-- $(japan_nautical_DATA) \
-- $(japan_people_DATA) \
-- $(japan_places_DATA) \
-- $(japan_public_DATA) \
-- $(japan_public_administration_DATA) \
-- $(japan_recreation_DATA) \
-- $(japan_religion_DATA) \
-- $(japan_shopping_DATA) \
-- $(japan_shopping_rental_DATA) \
-- $(japan_sightseeing_DATA) \
-- $(japan_sports_DATA) \
-- $(japan_transport_DATA) \
-- $(japan_transport_ferry_DATA) \
-- $(japan_vehicle_DATA) \
-- $(japan_waypoint_DATA) \
-- $(japan_wlan_DATA) \
- $(classic.small_DATA) \
- $(classic.small_accommodation_DATA) \
- $(classic.small_accommodation_camping_DATA) \
-@@ -1141,7 +1022,6 @@
- $(classic.big_waypoint_wpttemp_DATA) \
- $(classic.big_wlan_DATA) \
- $(classic.big_wlan_pay_DATA) \
-- $(nickw_DATA) \
- $(icons.xml_DATA) \
- CMakeLists.txt \
- overview.de.html \
-diff -urNad gpsdrive-2.10~pre4~/man/Makefile.am gpsdrive-2.10~pre4/man/Makefile.am
---- gpsdrive-2.10~pre4~/man/Makefile.am 2007-09-15 15:12:06.000000000 +0000
-+++ gpsdrive-2.10~pre4/man/Makefile.am 2008-07-19 15:23:42.000000000 +0000
-@@ -17,19 +17,13 @@
- EXTRA_DIST = CMakeLists.txt
-
- convert-waypoints.pl.1: $(srcdir)/../scripts/convert-waypoints.pl
-- pod2man $? >$@
-
- gpsdrive-init-db.pl.1: $(srcdir)/../scripts/gpsdrive-init-db.pl
-- pod2man $? >$@
-
--gpsfetchmap.pl.1: $(srcdir)/../scripts/gpsfetchmap.pl
-- pod2man $? >$@
-+gpsfetchmap.pl.1: $(srcdir)/../debian/scripts/gpsfetchmap.pl
-
- gpspoint2gpsdrive.pl.1: $(srcdir)/../scripts/gpspoint2gpsdrive.pl
-- pod2man $? >$@
-
- poi-manager.pl.1: $(srcdir)/../scripts/poi-manager.pl
-- pod2man $? >$@
-
- geoinfo.pl.1: $(srcdir)/../scripts/geoinfo.pl
-- pod2man $? >$@
-diff -urNad gpsdrive-2.10~pre4~/scripts/Makefile.am gpsdrive-2.10~pre4/scripts/Makefile.am
---- gpsdrive-2.10~pre4~/scripts/Makefile.am 2007-09-15 15:11:59.000000000 +0000
-+++ gpsdrive-2.10~pre4/scripts/Makefile.am 2008-07-19 15:23:43.000000000 +0000
-@@ -5,7 +5,7 @@
- dist_bin_SCRIPTS= \
- wpcvt wpget gpspoint2gpsdrive.pl geo-nearest geocache2way \
- geo-code gpssql_backup.sh gpssql_restore.sh gpsreplay\
-- gpssmswatch gpsfetchmap.pl convert-waypoints.pl \
-+ gpssmswatch convert-waypoints.pl \
- geoinfo.pl gpsdrive-init-db.pl wp2sql gpsd_nmea.sh \
- nasaconv.sh \
- start_mysql_as_user.sh poi-manager.pl \
Deleted: packages/gpsdrive/trunk/debian/patches/10-mapnikdir.dpatch
===================================================================
--- packages/gpsdrive/trunk/debian/patches/10-mapnikdir.dpatch 2012-06-29 08:29:04 UTC (rev 3077)
+++ packages/gpsdrive/trunk/debian/patches/10-mapnikdir.dpatch 2012-07-02 08:23:29 UTC (rev 3078)
@@ -1,252 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10-mapnikdir.dpatch by Andreas Putzo <andreas at putzo.net>
-##
-## DP: Put mapnik files into gpsdrive directory.
-
- at DPATCH@
-diff -urNad gpsdrive-2.10~pre4~/scripts/mapnik/Makefile.am gpsdrive-2.10~pre4/scripts/mapnik/Makefile.am
---- gpsdrive-2.10~pre4~/scripts/mapnik/Makefile.am 2007-09-14 21:47:06.000000000 +0000
-+++ gpsdrive-2.10~pre4/scripts/mapnik/Makefile.am 2007-10-16 08:22:45.000000000 +0000
-@@ -2,7 +2,7 @@
-
- bin_SCRIPTS = gpsdrive_mapnik_gentiles.py
-
--mapnikdir = $(datadir)/mapnik
-+mapnikdir = $(datadir)/gpsdrive/mapnik
- mapnik_DATA = osm.xml
-
- EXTRA_DIST = setup_z_order.sql gpsdrive_mapnik_gentiles-in.py osm-in.xml
-@@ -13,7 +13,7 @@
- dummy:
-
- gpsdrive_mapnik_gentiles.py: gpsdrive_mapnik_gentiles-in.py
-- sed 's, at DATA_DIR@,${datadir},' < $< > $@
-+ sed 's, at DATA_DIR@,${mapnikdir},' < $< > $@
-
- osm.xml: osm-in.xml
-- sed 's, at DATA_DIR@,${datadir},' < $< > $@
-+ sed 's, at DATA_DIR@,${mapnikdir},' < $< > $@
-diff -urNad gpsdrive-2.10~pre4~/scripts/mapnik/osm-in.xml gpsdrive-2.10~pre4/scripts/mapnik/osm-in.xml
---- gpsdrive-2.10~pre4~/scripts/mapnik/osm-in.xml 2007-09-14 21:47:06.000000000 +0000
-+++ gpsdrive-2.10~pre4/scripts/mapnik/osm-in.xml 2007-10-16 08:24:20.000000000 +0000
-@@ -93,24 +93,24 @@
- <Rule>
- <MaxScaleDenominator>5000</MaxScaleDenominator>
- <Filter>[amenity]='post_box'</Filter>
-- <PointSymbolizer file="@DATA_DIR@/map-icons/classic.small/public/post_box.png" type="png" width="16" height="16" />
-+ <PointSymbolizer file="/usr/share/icons/openstreetmap/classic.small/public/post_box.png" type="png" width="16" height="16" />
- </Rule>
- <Rule>
- <MaxScaleDenominator>5000</MaxScaleDenominator>
- <Filter>[amenity]='post_office'</Filter>
-- <PointSymbolizer file="@DATA_DIR@/map-icons/classic.small/public/post_office.png" type="png" width="16" height="16" />
-+ <PointSymbolizer file="/usr/share/icons/openstreetmap/classic.small/public/post_office.png" type="png" width="16" height="16" />
- </Rule>
-
- <Rule>
- <MaxScaleDenominator>250000</MaxScaleDenominator>
- <MinScaleDenominator>25000</MinScaleDenominator>
- <Filter>[railway]='station'</Filter>
-- <PointSymbolizer file="@DATA_DIR@/map-icons/classic.small/transport/railway_small.png" type="png" width="5" height="5" />
-+ <PointSymbolizer file="/usr/share/icons/openstreetmap/classic.small/transport/railway_small.png" type="png" width="5" height="5" />
- </Rule>
- <Rule>
- <MaxScaleDenominator>25000</MaxScaleDenominator>
- <Filter>[railway]='station'</Filter>
-- <PointSymbolizer file="@DATA_DIR@/map-icons/classic.small/transport/railway.png" type="png" width="9" height="9" />
-+ <PointSymbolizer file="/usr/share/icons/openstreetmap/classic.small/transport/railway.png" type="png" width="9" height="9" />
- </Rule>
- <Rule>
- <MaxScaleDenominator>50000</MaxScaleDenominator>
-@@ -127,51 +127,51 @@
- <Rule>
- <MaxScaleDenominator>10000</MaxScaleDenominator>
- <Filter>[amenity]='pub'</Filter>
-- <PointSymbolizer file="@DATA_DIR@/map-icons/classic.small/food/pub.png" type="png" width="16" height="16" />
-+ <PointSymbolizer file="/usr/share/icons/openstreetmap/classic.small/food/pub.png" type="png" width="16" height="16" />
- </Rule>
- <Rule>
- <MaxScaleDenominator>100000</MaxScaleDenominator>
- <Filter>[natural]='peak'</Filter>
-- <PointSymbolizer file="@DATA_DIR@/map-icons/classic.small/misc/landmark/peak.png" type="png" width="8" height="8" />
-+ <PointSymbolizer file="/usr/share/icons/openstreetmap/classic.small/misc/landmark/peak.png" type="png" width="8" height="8" />
- </Rule>
- <Rule>
- <MaxScaleDenominator>5000</MaxScaleDenominator>
- <Filter>[man_made]='mast'</Filter>
-- <PointSymbolizer file="@DATA_DIR@/map-icons/classic.small/misc/landmark/tower.png" type="png" width="32" height="32" />
-+ <PointSymbolizer file="/usr/share/icons/openstreetmap/classic.small/misc/landmark/tower.png" type="png" width="32" height="32" />
- </Rule>
- <Rule>
- <MaxScaleDenominator>10000</MaxScaleDenominator>
- <Filter>[amenity]='recycling'</Filter>
-- <PointSymbolizer file="@DATA_DIR@/map-icons/classic.small/public/recycling.png" type="png" width="20" height="20" />
-+ <PointSymbolizer file="/usr/share/icons/openstreetmap/classic.small/public/recycling.png" type="png" width="20" height="20" />
- </Rule>
-
- <Rule>
- <MaxScaleDenominator>20000</MaxScaleDenominator>
- <Filter>[amenity]='hospital'</Filter>
-- <PointSymbolizer file="@DATA_DIR@/map-icons/classic.small/health/hospital.png" type="png" width="20" height="20" />
-+ <PointSymbolizer file="/usr/share/icons/openstreetmap/classic.small/health/hospital.png" type="png" width="20" height="20" />
- </Rule>
-
- <Rule>
- <MaxScaleDenominator>5000</MaxScaleDenominator>
- <Filter>[amenity]='bus_stop' or [highway]='bus_stop'</Filter>
-- <PointSymbolizer file="@DATA_DIR@/map-icons/classic.small/transport/bus.png" type="png" width="30" height="12" />
-+ <PointSymbolizer file="/usr/share/icons/openstreetmap/classic.small/transport/bus.png" type="png" width="30" height="12" />
- </Rule>
-
- <Rule>
- <MaxScaleDenominator>20000</MaxScaleDenominator>
- <Filter>[amenity]='parking'</Filter>
-- <PointSymbolizer file="@DATA_DIR@/map-icons/classic.small/vehicle/parking.png" type="png" width="16" height="16" allow_overlap="false"/>
-+ <PointSymbolizer file="/usr/share/icons/openstreetmap/classic.small/vehicle/parking.png" type="png" width="16" height="16" allow_overlap="false"/>
- </Rule>
-
- <Rule>
- <MaxScaleDenominator>10000</MaxScaleDenominator>
- <Filter>[amenity]='place_of_worship'</Filter>
-- <PointSymbolizer file="@DATA_DIR@/map-icons/classic.small/religion/church.png" type="png" width="16" height="16" allow_overlap="false"/>
-+ <PointSymbolizer file="/usr/share/icons/openstreetmap/classic.small/religion/church.png" type="png" width="16" height="16" allow_overlap="false"/>
- </Rule>
- <Rule>
- <MaxScaleDenominator>10000</MaxScaleDenominator>
- <Filter>[amenity]='airport'</Filter>
-- <PointSymbolizer file="@DATA_DIR@/map-icons/classic.small/transport/airport.png" type="png" width="16" height="16" allow_overlap="false"/>
-+ <PointSymbolizer file="/usr/share/icons/openstreetmap/classic.small/transport/airport.png" type="png" width="16" height="16" allow_overlap="false"/>
- </Rule>
- </Style>
-
-@@ -203,7 +203,7 @@
- <Rule>
- <MaxScaleDenominator>50000</MaxScaleDenominator>
- <Filter>[landuse] = 'cemetery'</Filter>
-- <PolygonPatternSymbolizer file="@DATA_DIR@/map-icons/classic.small/religion/cemetery.png" type="png" width="16" height="16"/>
-+ <PolygonPatternSymbolizer file="/usr/share/icons/openstreetmap/classic.small/religion/cemetery.png" type="png" width="16" height="16"/>
- </Rule>
-
- <Rule>
-@@ -1086,7 +1086,7 @@
- <MaxScaleDenominator>100000</MaxScaleDenominator>
- <MinScaleDenominator>1000</MinScaleDenominator>
- <Filter>[railway] = 'rail'</Filter>
-- <LinePatternSymbolizer file="@DATA_DIR@/map-icons/classic.small/transport/track/rail.png" type="png" width="20" height="3" />
-+ <LinePatternSymbolizer file="/usr/share/icons/openstreetmap/classic.small/transport/track/rail.png" type="png" width="20" height="3" />
- </Rule>
-
- <Rule>
-@@ -1567,7 +1567,7 @@
- <MaxScaleDenominator>100000</MaxScaleDenominator>
- <MinScaleDenominator>1000</MinScaleDenominator>
- <Filter>[railway] = 'preserved'</Filter>
-- <LinePatternSymbolizer file="@DATA_DIR@/map-icons/classic.small/transport/rail_preserved.png" type="png" width="20" height="3" />
-+ <LinePatternSymbolizer file="/usr/share/icons/openstreetmap/classic.small/transport/rail_preserved.png" type="png" width="20" height="3" />
- </Rule>
-
- </Style>
-@@ -1579,19 +1579,19 @@
- <Filter>[highway] = 'motorway' and [length] = 2</Filter>
- <MaxScaleDenominator>500000</MaxScaleDenominator>
- <MinScaleDenominator>100</MinScaleDenominator>
-- <ShieldSymbolizer name="ref" face_name="DejaVu Sans Book" size="11" fill="#809bc0" placement="line" file="@DATA_DIR@/map-icons/classic.small/vehicle/shield/motorway_shield.png" type="png" width="24" height="17" min_distance="100"/>
-+ <ShieldSymbolizer name="ref" face_name="DejaVu Sans Book" size="11" fill="#809bc0" placement="line" file="/usr/share/icons/openstreetmap/classic.small/vehicle/shield/motorway_shield.png" type="png" width="24" height="17" min_distance="100"/>
- </Rule>
- <Rule>
- <Filter>[highway] = 'motorway' and [length] = 3</Filter>
- <MaxScaleDenominator>500000</MaxScaleDenominator>
- <MinScaleDenominator>100</MinScaleDenominator>
-- <ShieldSymbolizer name="ref" face_name="DejaVu Sans Book" size="11" fill="#809bc0" placement="line" file="@DATA_DIR@/map-icons/classic.small/vehicle/shield/motorway_shield2.png" type="png" width="31" height="17" min_distance="100"/>
-+ <ShieldSymbolizer name="ref" face_name="DejaVu Sans Book" size="11" fill="#809bc0" placement="line" file="/usr/share/icons/openstreetmap/classic.small/vehicle/shield/motorway_shield2.png" type="png" width="31" height="17" min_distance="100"/>
- </Rule>
- <Rule>
- <Filter>[highway] = 'motorway' and [length] = 4</Filter>
- <MaxScaleDenominator>500000</MaxScaleDenominator>
- <MinScaleDenominator>100</MinScaleDenominator>
-- <ShieldSymbolizer name="ref" face_name="DejaVu Sans Book" size="11" fill="#809bc0" placement="line" file="@DATA_DIR@/map-icons/classic.small/vehicle/shield/motorway_shield3.png" type="png" width="38" height="17" min_distance="100"/>
-+ <ShieldSymbolizer name="ref" face_name="DejaVu Sans Book" size="11" fill="#809bc0" placement="line" file="/usr/share/icons/openstreetmap/classic.small/vehicle/shield/motorway_shield3.png" type="png" width="38" height="17" min_distance="100"/>
- </Rule>
- <Rule>
- <Filter>[highway] = 'trunk' or [highway] = 'primary' or [highway] = 'secondary'</Filter>
-@@ -1628,12 +1628,12 @@
- <Rule>
- <Filter>[oneway] = 'yes' or [oneway] = 'true'</Filter>
- <MaxScaleDenominator>25000</MaxScaleDenominator>
-- <LinePatternSymbolizer file="@DATA_DIR@/map-icons/classic.small/transport/track/arrow.png" type="png" width="80" height="8" />
-+ <LinePatternSymbolizer file="/usr/share/icons/openstreetmap/classic.small/transport/track/arrow.png" type="png" width="80" height="8" />
- </Rule>
- <Rule>
- <Filter>[oneway] = '-1'</Filter>
- <MaxScaleDenominator>25000</MaxScaleDenominator>
-- <LinePatternSymbolizer file="@DATA_DIR@/map-icons/classic.small/transport/track/arrow_back.png" type="png" width="80" height="8" />
-+ <LinePatternSymbolizer file="/usr/share/icons/openstreetmap/classic.small/transport/track/arrow_back.png" type="png" width="80" height="8" />
- </Rule>
- </Style>
-
-@@ -1641,7 +1641,7 @@
- <StyleName>world-1</StyleName>
- <Datasource>
- <Parameter name="type">shape</Parameter>
-- <Parameter name="file">@DATA_DIR@/mapnik/world_boundaries/world_boundaries_m</Parameter>
-+ <Parameter name="file">@DATA_DIR@/world_boundaries/world_boundaries_m</Parameter>
- </Datasource>
- </Layer>
-
-@@ -1649,7 +1649,7 @@
- <StyleName>world</StyleName>
- <Datasource>
- <Parameter name="type">shape</Parameter>
-- <Parameter name="file">@DATA_DIR@/mapnik/world_boundaries/world_bnd_m</Parameter>
-+ <Parameter name="file">@DATA_DIR@/world_boundaries/world_bnd_m</Parameter>
- </Datasource>
- </Layer>
-
-@@ -1657,7 +1657,7 @@
- <StyleName>coast-poly</StyleName>
- <Datasource>
- <Parameter name="type">shape</Parameter>
-- <Parameter name="file">@DATA_DIR@/mapnik/world_boundaries/shoreline_a</Parameter>
-+ <Parameter name="file">@DATA_DIR@/world_boundaries/shoreline_a</Parameter>
- </Datasource>
- </Layer>
-
-@@ -1665,7 +1665,7 @@
- <StyleName>coast-line</StyleName>
- <Datasource>
- <Parameter name="type">shape</Parameter>
-- <Parameter name="file">@DATA_DIR@/mapnik/world_boundaries/shoreline_l</Parameter>
-+ <Parameter name="file">@DATA_DIR@/world_boundaries/shoreline_l</Parameter>
- </Datasource>
- </Layer>
-
-@@ -1674,7 +1674,7 @@
- <StyleName>builtup</StyleName>
- <Datasource>
- <Parameter name="type">shape</Parameter>
-- <Parameter name="file">@DATA_DIR@/mapnik/world_boundaries/builtup_area</Parameter>
-+ <Parameter name="file">@DATA_DIR@/world_boundaries/builtup_area</Parameter>
- </Datasource>
- </Layer>
-
-@@ -1786,7 +1786,7 @@
- <StyleName>places</StyleName>
- <Datasource>
- <Parameter name="type">shape</Parameter>
-- <Parameter name="file">@DATA_DIR@/mapnik/world_boundaries/places</Parameter>
-+ <Parameter name="file">@DATA_DIR@/world_boundaries/places</Parameter>
- </Datasource>
- </Layer>
- </Map>
-diff -urNad gpsdrive-2.10~pre4~/src/mapnik.cpp gpsdrive-2.10~pre4/src/mapnik.cpp
---- gpsdrive-2.10~pre4~/src/mapnik.cpp 2007-09-14 21:47:13.000000000 +0000
-+++ gpsdrive-2.10~pre4/src/mapnik.cpp 2007-10-16 08:22:45.000000000 +0000
-@@ -156,7 +156,7 @@
- if ( ! boost:: filesystem::exists(mapnik_config_file) )
- mapnik_config_file.assign("../scripts/mapnik/osm.xml");
- if ( ! boost:: filesystem::exists(mapnik_config_file) )
-- mapnik_config_file.assign(DATADIR).append("/mapnik/osm.xml");
-+ mapnik_config_file.assign(DATADIR).append("/gpsdrive/mapnik/osm.xml");
- cout << "Using Mapnik config-file: " << mapnik_config_file << endl;
-
- if ( ! boost:: filesystem::exists(mapnik_config_file) ) {
Deleted: packages/gpsdrive/trunk/debian/patches/100-fix-insecure-tempfiles.dpatch
===================================================================
--- packages/gpsdrive/trunk/debian/patches/100-fix-insecure-tempfiles.dpatch 2012-06-29 08:29:04 UTC (rev 3077)
+++ packages/gpsdrive/trunk/debian/patches/100-fix-insecure-tempfiles.dpatch 2012-07-02 08:23:29 UTC (rev 3078)
@@ -1,86 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 100-fix-insecure-tempfiles.dpatch by Andreas Putzo <andreas at putzo.net>
-##
-## DP: Fix insecure tempfile creation in geo-code.
-## DP: Thanks Moritz Muehlenhoff <jmm at inutil.org>.
-
- at DPATCH@
-diff -urNad gpsdrive-2.10~pre4-6.dfsg~/scripts/geo-code gpsdrive-2.10~pre4-6.dfsg/scripts/geo-code
---- gpsdrive-2.10~pre4-6.dfsg~/scripts/geo-code 2007-09-14 21:47:07.000000000 +0000
-+++ gpsdrive-2.10~pre4-6.dfsg/scripts/geo-code 2008-12-28 17:47:39.000000000 +0000
-@@ -83,6 +83,7 @@
- #
- error() {
- echo "`basename $PROGNAME`: $1" >&2
-+ remove_cruft
- exit 1
- }
-
-@@ -130,8 +131,9 @@
- a) SQLMATCH=all;;
- D) DEBUG="$OPTARG";;
- U) echo "Getting latest version of this script..."
-- curl -o$UPDATEcodeFILE "$UPDATEcodeURL"
-- echo "Latest version is in $UPDATEcodeFILE"
-+ destdir=`mktemp -d`
-+ curl -o$destdir/$UPDATEcodeFILE "$UPDATEcodeURL"
-+ echo "Latest version is in $destdir/$UPDATEcodeFILE"
- exit
- ;;
- h|\?) usage;;
-@@ -239,7 +241,7 @@
- # procedure to remove cruft files
- #
- remove_cruft() {
-- for i in $STYLE $COORDS $OUTWAY $MAP
-+ for i in $STYLE $COORDS $OUTWAY $MAP $TMP
- do
- [ -f $i ] && rm -f $i
- done
-@@ -248,11 +250,11 @@
- #
- # Main Program
- #
--TMP=/tmp/geo$$
--STYLE=${TMP}.style
--COORDS=${TMP}.coords
--OUTWAY=${TMP}.way
--MAP=${TMP}.gif
-+TMP=`mktemp -d`
-+STYLE=${TMP}/style
-+COORDS=${TMP}/coords
-+OUTWAY=${TMP}/way
-+MAP=${TMP}/gif
- UA="Mozilla/5.0"
-
- if [ "$GURL" != "" ]; then
-@@ -269,7 +271,6 @@
- | head -n1 \
- `
- if [ "$URL" = "" ]; then
-- cp $COORDS /tmp/geo.google
- error "Unable to lookup telephone number or name with Google"
- else
- URL="http://maps.yahoo.com/$URL"
-@@ -295,7 +296,7 @@
- fi
-
- if [ $DEBUG -gt 0 ]; then
-- filter="tee /tmp/geo.yahoo"
-+ filter="tee `mktemp`"
- else
- filter=cat
- fi
-@@ -306,9 +307,9 @@
- -e 's/.*slt=\([^%]*\).*sln=\([^%]*\).*Create.*/\1 \2/p' \
- > $COORDS
-
--if [ $DEBUG -gt 0 ]; then
-- cp $COORDS /tmp/geo.coords
--fi
-+#if [ $DEBUG -gt 0 ]; then
-+# cp -d $COORDS /tmp/geo.coords
-+#fi
-
- #
- # Convert the coords, address, and type to the desired
Deleted: packages/gpsdrive/trunk/debian/patches/101-signalposreq.dpatch
===================================================================
--- packages/gpsdrive/trunk/debian/patches/101-signalposreq.dpatch 2012-06-29 08:29:04 UTC (rev 3077)
+++ packages/gpsdrive/trunk/debian/patches/101-signalposreq.dpatch 2012-07-02 08:23:29 UTC (rev 3078)
@@ -1,70 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 101-signalposreq.dpatch by Andreas Putzo <andreas at putzo.net>
-##
-## DP: Remove signalposreq() from gpsdrive, vulnerable to symlink attacks.
-## DP: Remove weird deletion of temporary files.
-
- at DPATCH@
-diff -urNad gpsdrive-2.10~pre4-6.dfsg~/src/gpsdrive.c gpsdrive-2.10~pre4-6.dfsg/src/gpsdrive.c
---- gpsdrive-2.10~pre4-6.dfsg~/src/gpsdrive.c 2008-12-28 18:10:54.000000000 +0000
-+++ gpsdrive-2.10~pre4-6.dfsg/src/gpsdrive.c 2008-12-28 18:11:27.000000000 +0000
-@@ -3087,9 +3087,6 @@
- /* all default values must be set BEFORE readconfig! */
- g_strlcpy (setpositionname, "", sizeof (setpositionname));
-
-- /* setup signal handler */
-- signal (SIGUSR1, signalposreq);
--
- sql_load_lib();
- /* I18l */
-
-@@ -3419,9 +3416,6 @@
- gdk_pixbuf_unref (friendspixbuf);
-
-
-- unlink ("/tmp/cammain.pid");
-- unlink ("/tmp/gpsdrivetext.out");
-- unlink ("/tmp/gpsdrivepos");
- if (local_config.savetrack)
- savetrackfile (2);
- sqlend ();
-diff -urNad gpsdrive-2.10~pre4-6.dfsg~/src/gpsproto.h gpsdrive-2.10~pre4-6.dfsg/src/gpsproto.h
---- gpsdrive-2.10~pre4-6.dfsg~/src/gpsproto.h 2007-09-14 21:47:13.000000000 +0000
-+++ gpsdrive-2.10~pre4-6.dfsg/src/gpsproto.h 2008-12-28 18:11:32.000000000 +0000
-@@ -75,7 +75,6 @@
- gint settings_main_cb (GtkWidget *widget, guint datum);
- gint sel_message_cb (GtkWidget * widget, guint datum);
- gint setmessage_cb (GtkWidget * widget, guint datum);
--void signalposreq ();
- gint reinsertwp_cb (GtkWidget * widget, guint datum);
- GdkPixbuf *create_pixbuf (const gchar * filename);
- gint simulated_pos (GtkWidget * widget, guint * datum);
-diff -urNad gpsdrive-2.10~pre4-6.dfsg~/src/splash.c gpsdrive-2.10~pre4-6.dfsg/src/splash.c
---- gpsdrive-2.10~pre4-6.dfsg~/src/splash.c 2007-09-14 21:47:13.000000000 +0000
-+++ gpsdrive-2.10~pre4-6.dfsg/src/splash.c 2008-12-28 18:11:18.000000000 +0000
-@@ -630,25 +630,3 @@
- (gtk_widget_destroy), NULL);
- return TRUE;
- }
--
--
--/* writes time and position to /tmp/gpsdrivepos */
--void
--signalposreq ()
--{
-- FILE *f;
-- time_t t;
-- struct tm *ts;
--
-- f = fopen ("/tmp/gpsdrivepos", "w");
-- if (f == NULL)
-- {
-- perror ("/tmp/gpsdrivepos");
-- return;
-- }
-- time (&t);
-- ts = localtime (&t);
-- fprintf (f, asctime (ts));
-- fprintf (f, "POS %f %f\n", coords.current_lat, coords.current_lon);
-- fclose (f);
--}
Deleted: packages/gpsdrive/trunk/debian/patches/102-unittest.dpatch
===================================================================
--- packages/gpsdrive/trunk/debian/patches/102-unittest.dpatch 2012-06-29 08:29:04 UTC (rev 3077)
+++ packages/gpsdrive/trunk/debian/patches/102-unittest.dpatch 2012-07-02 08:23:29 UTC (rev 3078)
@@ -1,26 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 102-unittest.dpatch by Andreas Putzo <andreas at putzo.net>
-##
-## DP: Use mkdtemp to avoid a potential symlink attack.
-
- at DPATCH@
-diff -urNad gpsdrive-2.10~pre4-6.dfsg~/src/unit_test.c gpsdrive-2.10~pre4-6.dfsg/src/unit_test.c
---- gpsdrive-2.10~pre4-6.dfsg~/src/unit_test.c 2007-09-15 15:12:03.000000000 +0000
-+++ gpsdrive-2.10~pre4-6.dfsg/src/unit_test.c 2008-12-29 15:33:26.000000000 +0000
-@@ -649,10 +649,12 @@
- gchar fn[500];
- gint response;
-
--
-- g_snprintf (dir_proc, sizeof (dir_proc), "/tmp/gpsdrive-unit-test");
-- mkdir (dir_proc, 0777);
-- g_snprintf (dir_proc, sizeof (dir_proc), "/tmp/gpsdrive-unit-test/proc");
-+ strncpy(dir_proc, "/tmp/gpsdrive-unit-test.XXXXXX", sizeof(dir_proc));
-+ if (mkdtemp(dir_proc) == NULL) {
-+ printf("Error: Faild to create temporary directory\n");
-+ exit(1);
-+ }
-+ strncat(dir_proc, "/proc", sizeof(dir_proc));
- mkdir (dir_proc, 0777);
-
- if (mydebug > 0)
Modified: packages/gpsdrive/trunk/debian/patches/30-icons.dpatch
===================================================================
--- packages/gpsdrive/trunk/debian/patches/30-icons.dpatch 2012-06-29 08:29:04 UTC (rev 3077)
+++ packages/gpsdrive/trunk/debian/patches/30-icons.dpatch 2012-07-02 08:23:29 UTC (rev 3078)
@@ -27,26 +27,3 @@
) {
unless ( $icons_filename && -s $icons_filename ){
print STDERR "Checking icons-file: $fn\n"
-diff -urNad gpsdrive-2.10~pre4~/src/icons.c gpsdrive-2.10~pre4/src/icons.c
---- gpsdrive-2.10~pre4~/src/icons.c 2007-09-29 21:32:42.000000000 +0000
-+++ gpsdrive-2.10~pre4/src/icons.c 2007-09-29 21:53:08.000000000 +0000
-@@ -219,6 +219,7 @@
- {"%s/gpsdrive/pixmaps/", (gchar *) DATADIR},
- {"%s/map-icons/", "/usr/share"},
- {"%s/gpsdrive/pixmaps/", "/usr/share"},
-+ {"/usr/share/icons/openstreetmap/"},
- {"END", NULL}
- };
-
-diff -urNad gpsdrive-2.10~pre4~/src/poi.c gpsdrive-2.10~pre4/src/poi.c
---- gpsdrive-2.10~pre4~/src/poi.c 2007-09-29 21:32:42.000000000 +0000
-+++ gpsdrive-2.10~pre4/src/poi.c 2007-09-29 21:53:08.000000000 +0000
-@@ -713,7 +713,7 @@
- if (xml_reader == NULL)
- {
- g_snprintf (iconsxml_file, sizeof (iconsxml_file),
-- "%s/map-icons/icons.xml", DATADIR);
-+ "%s/gpsdrive/map-icons/icons.xml", DATADIR);
- xml_reader = xmlNewTextReaderFilename(iconsxml_file);
- }
- if (xml_reader == NULL)
Deleted: packages/gpsdrive/trunk/debian/patches/40-backported.dpatch
===================================================================
--- packages/gpsdrive/trunk/debian/patches/40-backported.dpatch 2012-06-29 08:29:04 UTC (rev 3077)
+++ packages/gpsdrive/trunk/debian/patches/40-backported.dpatch 2012-07-02 08:23:29 UTC (rev 3078)
@@ -1,80 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 40-backported.dpatch by Andreas Putzo <andreas at putzo.net>
-##
-## DP: Bugfixes from gpsdrive VCS.
-## DP: r1713: use poi_type_name as title for POI when no title is available .
-## DP: r1716: gpsdrive sets textdomain too late.
-## DP: r1717: include src/main_gui.c into the series of files to extract
-## DP: translatable strings from, so that all of the GUI can get
-## DP: translated.
-## DP: r1733: Adapt font path to debian files.
-
- at DPATCH@
-diff -urNad gpsdrive-2.10~pre4~/po/POTFILES.in gpsdrive-2.10~pre4/po/POTFILES.in
---- gpsdrive-2.10~pre4~/po/POTFILES.in 2007-09-14 21:47:47.000000000 +0000
-+++ gpsdrive-2.10~pre4/po/POTFILES.in 2007-10-03 12:24:09.000000000 +0000
-@@ -21,6 +21,7 @@
- src/lib_map/map_port.c
- src/lib_map/map_render.c
- src/lib_map/map_transform.c
-+src/main_gui.c
- src/map_handler.c
- src/map_projection.c
- src/navigation.c
-diff -urNad gpsdrive-2.10~pre4~/src/gpsdrive.c gpsdrive-2.10~pre4/src/gpsdrive.c
---- gpsdrive-2.10~pre4~/src/gpsdrive.c 2007-09-15 01:24:15.000000000 +0000
-+++ gpsdrive-2.10~pre4/src/gpsdrive.c 2007-10-03 12:23:00.000000000 +0000
-@@ -2985,6 +2985,10 @@
- main (int argc, char *argv[])
- {
-
-+ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
-+ bind_textdomain_codeset (PACKAGE, "utf8");
-+ textdomain (GETTEXT_PACKAGE);
-+
- gchar buf[500];
-
- current.needtosave = FALSE;
-@@ -3167,14 +3171,6 @@
- */
- loadmapconfig ();
-
-- /* PORTING */
-- {
-- gchar *p;
-- p = bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
-- bind_textdomain_codeset (PACKAGE, "utf8");
-- p = textdomain (GETTEXT_PACKAGE);
-- p = textdomain (NULL);
-- }
-
- /* Setting locale for correct Umlauts */
- gtk_set_locale ();
-diff -urNad gpsdrive-2.10~pre4~/src/mapnik.cpp gpsdrive-2.10~pre4/src/mapnik.cpp
---- gpsdrive-2.10~pre4~/src/mapnik.cpp 2007-09-14 21:47:13.000000000 +0000
-+++ gpsdrive-2.10~pre4/src/mapnik.cpp 2007-10-03 12:28:29.000000000 +0000
-@@ -118,7 +118,9 @@
- // Both datasorce_cache and font_engine are 'singletons'.
-
- datasource_cache::instance()->register_datasources("/usr/lib/mapnik/input/");
-- freetype_engine::instance()->register_font("/usr/lib/mapnik/fonts/DejaVuSans.ttf");
-+ // XXX We should make the fontname and path a config option
-+ freetype_engine::instance()->register_font("/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf");
-+
-
- MapnikMap.WidthInt = 1280;
- MapnikMap.HeightInt = 1024;
-diff -urNad gpsdrive-2.10~pre4~/src/poi.c gpsdrive-2.10~pre4/src/poi.c
---- gpsdrive-2.10~pre4~/src/poi.c 2007-09-15 15:12:03.000000000 +0000
-+++ gpsdrive-2.10~pre4/src/poi.c 2007-10-03 12:18:30.000000000 +0000
-@@ -907,6 +907,10 @@
- g_strlcpy(t_description, t_desc_en, sizeof(t_description));
- if (strcmp(t_title, "n/a")==0)
- g_strlcpy(t_title, t_title_en, sizeof(t_title));
-+ /* if also no english title is available,
-+ * use the poi_type_name as title */
-+ if (strcmp(t_title, "n/a")==0)
-+ g_strlcpy(t_title, t_name, sizeof(t_title));
-
-
- g_strlcpy (poi_type_list[index].description,
Deleted: packages/gpsdrive/trunk/debian/patches/50-scripts.dpatch
===================================================================
--- packages/gpsdrive/trunk/debian/patches/50-scripts.dpatch 2012-06-29 08:29:04 UTC (rev 3077)
+++ packages/gpsdrive/trunk/debian/patches/50-scripts.dpatch 2012-07-02 08:23:29 UTC (rev 3078)
@@ -1,31 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 50-scripts.dpatch by Andreas Putzo <andreas at putzo.net>
-##
-## DP: Fix path to osm.xml (Thanks Giovanni Mascellani)
-## DP: Fix bashism in examples/wpget.
-
- at DPATCH@
-diff -urNad gpsdrive-2.10~pre4~/scripts/mapnik/gpsdrive_mapnik_gentiles-in.py gpsdrive-2.10~pre4/scripts/mapnik/gpsdrive_mapnik_gentiles-in.py
---- gpsdrive-2.10~pre4~/scripts/mapnik/gpsdrive_mapnik_gentiles-in.py 2007-09-15 15:11:59.000000000 +0000
-+++ gpsdrive-2.10~pre4/scripts/mapnik/gpsdrive_mapnik_gentiles-in.py 2008-07-15 17:37:07.000000000 +0000
-@@ -166,7 +166,7 @@
-
- home = os.environ['HOME']
- data = "@DATA_DIR@/mapnik"
-- mapfile = data + "/osm.xml"
-+ mapfile = home + "/.gpsdrive/osm.xml"
- tile_dir = home + "/.gpsdrive/maps/mapnik/"
- mapkoordfile = home + "/.gpsdrive/maps/map_koord.txt"
-
-diff -urNad gpsdrive-2.10~pre4~/scripts/wpget gpsdrive-2.10~pre4/scripts/wpget
---- gpsdrive-2.10~pre4~/scripts/wpget 2007-09-14 21:47:07.000000000 +0000
-+++ gpsdrive-2.10~pre4/scripts/wpget 2008-07-15 17:38:12.000000000 +0000
-@@ -32,7 +32,7 @@
- done
-
- opt=${opt:= -w}
--if [[ ${#opt} != "3" && ${#opt} != "12" ]]; then
-+if [ ${#opt} -ne 3 -a ${#opt} -ne 12 ]; then
- echo "Usage: $0 [-r|--get-routes]|[-w|--get-waypts]|[-t|--get-tracks] [-d device|--device device]" >&2 ;
- echo "defaults are: --get-waypts and --device /dev/gps" >&2 ;
- exit 1 ;
Deleted: packages/gpsdrive/trunk/debian/patches/60-sql.dpatch
===================================================================
--- packages/gpsdrive/trunk/debian/patches/60-sql.dpatch 2012-06-29 08:29:04 UTC (rev 3077)
+++ packages/gpsdrive/trunk/debian/patches/60-sql.dpatch 2012-07-02 08:23:29 UTC (rev 3078)
@@ -1,31 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 60-sql.dpatch by Andreas Putzo <andreas at putzo.net>
-##
-## DP: Moved remaining patches from 01old.dpatch.
-## DP: Fixed in upstream svn.
-
- at DPATCH@
-diff -urNad gpsdrive-2.10~pre4~/Documentation/README.SQL gpsdrive-2.10~pre4/Documentation/README.SQL
---- gpsdrive-2.10~pre4~/Documentation/README.SQL 2007-09-14 21:47:42.000000000 +0000
-+++ gpsdrive-2.10~pre4/Documentation/README.SQL 2007-10-03 17:04:32.000000000 +0000
-@@ -8,7 +8,7 @@
- ----------
-
- There is no MySQL needed for compiling, the needed library
--libmysqlclient.so.10 will be loaded at runtime, if found.
-+libmysqlclient.so will be loaded at runtime, if found.
-
- Running and first initialization:
- ---------------------------------
-diff -urNad gpsdrive-2.10~pre4~/src/gpsdrive.h gpsdrive-2.10~pre4/src/gpsdrive.h
---- gpsdrive-2.10~pre4~/src/gpsdrive.h 2007-09-14 21:47:13.000000000 +0000
-+++ gpsdrive-2.10~pre4/src/gpsdrive.h 2007-10-03 17:04:05.000000000 +0000
-@@ -247,7 +247,7 @@
- const char *db,
- unsigned int port,
- const char *unix_socket,
-- unsigned int clientflag);
-+ unsigned long clientflag);
- void (*dl_mysql_close)(MYSQL *sock);
- int (*dl_mysql_query)(MYSQL *mysql, const char *q);
- my_ulonglong (*dl_mysql_affected_rows)(MYSQL *mysql);
Deleted: packages/gpsdrive/trunk/debian/patches/80-dbus.dpatch
===================================================================
--- packages/gpsdrive/trunk/debian/patches/80-dbus.dpatch 2012-06-29 08:29:04 UTC (rev 3077)
+++ packages/gpsdrive/trunk/debian/patches/80-dbus.dpatch 2012-07-02 08:23:29 UTC (rev 3078)
@@ -1,109 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 80-dbus.dpatch by Andreas Putzo <andreas at putzo.net>
-##
-## DP: Fix DBUS support
-
- at DPATCH@
-diff -urNad gpsdrive-2.10~pre4~/src/gps_handler.c gpsdrive-2.10~pre4/src/gps_handler.c
---- gpsdrive-2.10~pre4~/src/gps_handler.c 2007-09-14 21:47:13.000000000 +0000
-+++ gpsdrive-2.10~pre4/src/gps_handler.c 2007-12-17 22:38:52.000000000 +0000
-@@ -371,6 +371,7 @@
- {
- struct tm time;
- time_t ttime;
-+ double direction;
-
- if (!early && (dbus_current_fix.mode==-1)) {
- /* We have handled this one, so clean the mode and bail out */
-@@ -416,10 +417,10 @@
- coords.current_lon = dbus_current_fix.longitude;
- /* Handle speed */
- if (__finite(dbus_current_fix.speed))
-- groundspeed = dbus_current_fix.speed * 3.6; // Convert m/s to km/h
-+ current.groundspeed = dbus_current_fix.speed * 3.6; // Convert m/s to km/h
- else if (dbus_old_fix.mode>1) {
- gdouble timediff = dbus_current_fix.time-dbus_old_fix.time;
-- groundspeed = (timediff>0)?(calcdist2(dbus_old_fix.longitude, dbus_old_fix.latitude) * 3600 / timediff) : 0.0;
-+ current.groundspeed = (timediff>0)?(calcdist2(dbus_old_fix.longitude, dbus_old_fix.latitude) * 3600 / timediff) : 0.0;
- }
- /* Handle bearing */
- if (__finite(dbus_current_fix.track))
-@@ -435,7 +436,7 @@
- }
- if ( mydebug + gps_handler_debug > 80 )
- g_print("gps_handler: DBUS fix: %6.0f %10.6f/%10.6f sp:%5.2f(%5.2f) crs:%5.1f(%5.2f)\n", dbus_current_fix.time,
-- dbus_current_fix.latitude, dbus_current_fix.longitude, dbus_current_fix.speed, groundspeed,
-+ dbus_current_fix.latitude, dbus_current_fix.longitude, dbus_current_fix.speed, current.groundspeed,
- dbus_current_fix.track, direction * 180 / M_PI);
- /* Handle altitude */
- if (dbus_current_fix.mode>2) {
-@@ -453,46 +454,31 @@
- }
-
- static DBusHandlerResult dbus_handle_gps_fix (DBusMessage* message) {
-- DBusMessageIter iter;
-- //double temp_time;
-- //char b[100];
-+
-+ DBusError error;
-+ double temp_time;
- struct dbus_gps_fix fix;
-- //gint32 mode;
-- //gdouble dump;
--
-- if (!dbus_message_iter_init (message, &iter)) {
-- /* we have a problem */
-- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-- }
-
-- /* Fill the fix struct */
-- fix.time = floor(dbus_message_iter_get_double (&iter));
-- dbus_message_iter_next (&iter);
-- fix.mode = dbus_message_iter_get_int32 (&iter);
-- dbus_message_iter_next (&iter);
-- fix.ept = dbus_message_iter_get_double (&iter);
-- dbus_message_iter_next (&iter);
-- fix.latitude = dbus_message_iter_get_double (&iter);
-- dbus_message_iter_next (&iter);
-- fix.longitude = dbus_message_iter_get_double (&iter);
-- dbus_message_iter_next (&iter);
-- fix.eph = dbus_message_iter_get_double (&iter);
-- dbus_message_iter_next (&iter);
-- fix.altitude = dbus_message_iter_get_double (&iter);
-- dbus_message_iter_next (&iter);
-- fix.epv = dbus_message_iter_get_double (&iter);
-- dbus_message_iter_next (&iter);
-- fix.track = dbus_message_iter_get_double (&iter);
-- dbus_message_iter_next (&iter);
-- fix.epd = dbus_message_iter_get_double (&iter);
-- dbus_message_iter_next (&iter);
-- fix.speed = dbus_message_iter_get_double (&iter);
-- dbus_message_iter_next (&iter);
-- fix.eps = dbus_message_iter_get_double (&iter);
-- dbus_message_iter_next (&iter);
-- fix.climb = dbus_message_iter_get_double (&iter);
-- dbus_message_iter_next (&iter);
-- fix.epc = dbus_message_iter_get_double (&iter);
-+ dbus_error_init(&error);
-+
-+ dbus_message_get_args(message,
-+ &error,
-+ DBUS_TYPE_DOUBLE, &temp_time,
-+ DBUS_TYPE_INT32, &fix.mode,
-+ DBUS_TYPE_DOUBLE, &fix.ept,
-+ DBUS_TYPE_DOUBLE, &fix.latitude,
-+ DBUS_TYPE_DOUBLE, &fix.longitude,
-+ DBUS_TYPE_DOUBLE, &fix.eph,
-+ DBUS_TYPE_DOUBLE, &fix.altitude,
-+ DBUS_TYPE_DOUBLE, &fix.epv,
-+ DBUS_TYPE_DOUBLE, &fix.track,
-+ DBUS_TYPE_DOUBLE, &fix.epd,
-+ DBUS_TYPE_DOUBLE, &fix.speed,
-+ DBUS_TYPE_DOUBLE, &fix.eps,
-+ DBUS_TYPE_DOUBLE, &fix.climb,
-+ DBUS_TYPE_DOUBLE, &fix.epc,
-+ DBUS_TYPE_INVALID);
-+ fix.time = floor(temp_time);
-
- if ( mydebug + gps_handler_debug > 80 ) {
- g_print("gps_handler: DBUS raw: ti:%6.0f mode:%d ept:%f %10.6f/%10.6f eph:%f\n", fix.time, fix.mode, fix.ept, fix.latitude, fix.longitude, fix.eph);
Deleted: packages/gpsdrive/trunk/debian/patches/85-settings.dpatch
===================================================================
--- packages/gpsdrive/trunk/debian/patches/85-settings.dpatch 2012-06-29 08:29:04 UTC (rev 3077)
+++ packages/gpsdrive/trunk/debian/patches/85-settings.dpatch 2012-07-02 08:23:29 UTC (rev 3078)
@@ -1,26 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 85-settings.dpatch by Andreas Putzo <andreas at putzo.net>
-##
-## DP: Use basename() for way.txt. Don't rely on a '/' in gpsdriverc
-
- at DPATCH@
-diff -urNad gpsdrive-2.10~pre4~/src/settings.c gpsdrive-2.10~pre4/src/settings.c
---- gpsdrive-2.10~pre4~/src/settings.c 2007-09-15 15:12:03.000000000 +0000
-+++ gpsdrive-2.10~pre4/src/settings.c 2008-01-14 23:18:38.000000000 +0000
-@@ -32,6 +32,7 @@
- #include <stdio.h>
- #include <signal.h>
- #include <unistd.h>
-+#include <dirent.h>
- #include <sys/mman.h>
- #include <math.h>
- #include "poi.h"
-@@ -1763,7 +1764,7 @@
- /* waypoints quick select */
- {
- g_strlcpy (path, local_config.dir_home, sizeof (path));
-- current_wpfile = g_strrstr (local_config.wp_file, "/") + 1;
-+ current_wpfile = basename (local_config.wp_file);
- names = g_new (namesstruct, 102);
- d = opendir (path);
- if (NULL != d)
Deleted: packages/gpsdrive/trunk/debian/patches/90-usage.dpatch
===================================================================
--- packages/gpsdrive/trunk/debian/patches/90-usage.dpatch 2012-06-29 08:29:04 UTC (rev 3077)
+++ packages/gpsdrive/trunk/debian/patches/90-usage.dpatch 2012-07-02 08:23:29 UTC (rev 3078)
@@ -1,48 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 90-usage.dpatch by Andreas Putzo <andreas at putzo.net>
-##
-## DP: Correct usage() output.
-
- at DPATCH@
-diff -urNad gpsdrive-2.10~pre4~/src/gpsdrive.c gpsdrive-2.10~pre4/src/gpsdrive.c
---- gpsdrive-2.10~pre4~/src/gpsdrive.c 2007-12-18 22:08:34.000000000 +0000
-+++ gpsdrive-2.10~pre4/src/gpsdrive.c 2007-12-18 22:09:55.000000000 +0000
-@@ -2738,30 +2738,27 @@
- _("-D X set debug Level to X\n"),
- _("-T do some internal unit Tests(don't start gpsdrive)\n"),
- _("-e use Festival-Lite (flite) for speech output\n"),
-- _("-o serial device, pty master, or file for NMEA *output*\n"),
-- _("-f X Select friends server, X is i.e. friendsd.gpsdrive.de\n"),
-+ _("-o thing serial device, pty master, or file for NMEA *output*\n"),
-+ _("-f server Select friends server, X is i.e. friendsd.gpsdrive.de\n"),
- #ifdef DBUS_ENABLE
- _("-X Use DBUS for communication with gpsd. This disables serial and socket communication\n"),
- #endif
-- _("-l LANG Select language of the voice,\n"
-- " LANG may be english, spanish or german\n"),
-- _("-s HEIGHT set height of the screen, if autodetection\n"
-- " don't satisfy you, X is i.e. 768,600,480,200\n"),
-- _("-r WIDTH set width of the screen, only with -s\n"),
-+ _("-l lang. Select language of the voice,\n"
-+ " language may be 'english', 'spanish' or 'german'\n"),
-+ _("-g geom. set window geometry, e.g. 800x600\n"),
- _("-1 have only 1 button mouse, for example using touchscreen\n"),
- _("-a display APM Stuff ( battery status, Temperature)\n"),
- _("-b Server Servername for NMEA server (if gpsd runs on another host)\n"),
- _("-c WP set start position in simulation mode to waypoint name WP\n"),
-- _("-x create separate window for menu\n"),
-- _("-M mode set guimode to desktop, pda or car\n"),
-+ _("-M mode set GUI mode; mode may be 'desktop' (default), 'pda' or 'car'\n"),
- _("-i ignore NMEA checksum (risky, only for broken GPS receivers\n"),
- _("-q disable SQL support\n"),
- _("-F force display of position even it is invalid\n"),
- _("-S don't show splash screen\n"),
-- _("-P start in Pos Mode\n"),
-+ _("-P start in Position Mode\n"),
- _("-W x set x to 1 to switch WAAS/EGNOS on, set to 0 to switch off\n"),
- _("-H ALT correct altitude, adding this value (ALT) to altitude\n"),
-- _("-C file set config file (--config-file)\n"));
-+ _("-C file set config file (--config-file)\n"));
-
- }
-
Deleted: packages/gpsdrive/trunk/debian/patches/95-newapi.dpatch
===================================================================
--- packages/gpsdrive/trunk/debian/patches/95-newapi.dpatch 2012-06-29 08:29:04 UTC (rev 3077)
+++ packages/gpsdrive/trunk/debian/patches/95-newapi.dpatch 2012-07-02 08:23:29 UTC (rev 3078)
@@ -1,18 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 95-newapi.dpatch by Francesco Paolo Lovergine <frankie at debian.org>
-##
-## DP: Use new api method to register fonts.
-
- at DPATCH@
-diff -urNad gpsdrive-2.10~pre4~/src/mapnik.cpp gpsdrive-2.10~pre4/src/mapnik.cpp
---- gpsdrive-2.10~pre4~/src/mapnik.cpp 2008-02-20 14:27:41.000000000 +0100
-+++ gpsdrive-2.10~pre4/src/mapnik.cpp 2008-02-20 14:28:04.000000000 +0100
-@@ -119,7 +119,7 @@
-
- datasource_cache::instance()->register_datasources("/usr/lib/mapnik/input/");
- // XXX We should make the fontname and path a config option
-- freetype_engine::instance()->register_font("/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf");
-+ freetype_engine::register_font("/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf");
-
-
- MapnikMap.WidthInt = 1280;
Deleted: packages/gpsdrive/trunk/debian/patches/96-mapnik-plugins-dir.dpatch
===================================================================
--- packages/gpsdrive/trunk/debian/patches/96-mapnik-plugins-dir.dpatch 2012-06-29 08:29:04 UTC (rev 3077)
+++ packages/gpsdrive/trunk/debian/patches/96-mapnik-plugins-dir.dpatch 2012-07-02 08:23:29 UTC (rev 3078)
@@ -1,29 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 96-mapnik-plugins-dir.dpatch by Francesco Paolo Lovergine <frankie at debian.org>
-##
-## DP: Use correct mapnik path on debian systems.
-
- at DPATCH@
-diff -urNad gpsdrive-2.10~pre4-6.dfsg~/src/mapnik.cpp gpsdrive-2.10~pre4-6.dfsg/src/mapnik.cpp
---- gpsdrive-2.10~pre4-6.dfsg~/src/mapnik.cpp 2009-06-11 19:23:32.000000000 +0000
-+++ gpsdrive-2.10~pre4-6.dfsg/src/mapnik.cpp 2009-06-11 19:23:32.000000000 +0000
-@@ -108,6 +108,10 @@
- return StringToReplace;
- }
-
-+#if !defined(MAPNIK_PATH)
-+#define MAPNIK_PATH "/usr/lib/mapnik/0.6"
-+#endif
-+
- /*
- * initialize mapnik
- */
-@@ -117,7 +121,7 @@
- // register datasources (plug-ins) and a font
- // Both datasorce_cache and font_engine are 'singletons'.
-
-- datasource_cache::instance()->register_datasources("/usr/lib/mapnik/input/");
-+ datasource_cache::instance()->register_datasources( MAPNIK_PATH "/input/");
- // XXX We should make the fontname and path a config option
- freetype_engine::register_font("/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf");
-
Deleted: packages/gpsdrive/trunk/debian/patches/98-mapnik-exception.dpatch
===================================================================
--- packages/gpsdrive/trunk/debian/patches/98-mapnik-exception.dpatch 2012-06-29 08:29:04 UTC (rev 3077)
+++ packages/gpsdrive/trunk/debian/patches/98-mapnik-exception.dpatch 2012-07-02 08:23:29 UTC (rev 3078)
@@ -1,51 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 98-mapnik-exception.dpatch by Andreas Putzo <andreas at putzo.net>
-##
-## DP: Add exception handling for mapnik config file loading.
-
- at DPATCH@
-diff -urNad gpsdrive-2.10~pre4~/src/mapnik.cpp gpsdrive-2.10~pre4/src/mapnik.cpp
---- gpsdrive-2.10~pre4~/src/mapnik.cpp 2008-02-28 23:37:07.000000000 +0000
-+++ gpsdrive-2.10~pre4/src/mapnik.cpp 2008-02-28 23:37:46.000000000 +0000
-@@ -23,6 +23,7 @@
- #include <mapnik/memory_datasource.hpp>
- #include <mapnik/datasource_cache.hpp>
- #include <mapnik/font_engine_freetype.hpp>
-+#include <mapnik/config_error.hpp>
- #include <string>
- #include <fstream>
-
-@@ -37,6 +38,7 @@
- using mapnik::feature_ptr;
- using mapnik::geometry_ptr;
- using mapnik::CoordTransform;
-+using mapnik::config_error;
-
- extern int mydebug;
- extern int borderlimit;
-@@ -131,11 +133,22 @@
- MapnikMap.BorderlimitInt = borderlimit;
- MapnikMap.ScaleInt = -1; // <-- force creation of map if a map is set
- MapnikMap.MapPtr = new mapnik::Map(MapnikMap.WidthInt, MapnikMap.HeightInt);
-+
-
- //load map
-- std::string mapnik_config_file (ConfigXML);
-- mapnik::load_map(*MapnikMap.MapPtr, mapnik_config_file);
-- MapnikInitYsn = -1;
-+ try {
-+ std::string mapnik_config_file (ConfigXML);
-+ mapnik::load_map(*MapnikMap.MapPtr, mapnik_config_file);
-+ MapnikInitYsn = -1;
-+ }
-+ catch(const mapnik::config_error &ex) {
-+ cerr << "Cannot init mapnik. Mapnik support DISABLED: " << ex.what() << "\n" << endl;
-+ cerr << "Mapnik now raises exceptions on syntax errors in the map file,\n" <<
-+ "failed db connections, missing files, etc.\n" <<
-+ "Please fix or remove ~/.gpsdrive/osm.xml.\n" <<
-+ "See also NEWS.Debian." << endl;
-+ MapnikInitYsn = 0;
-+ }
- }
-
- /*
Deleted: packages/gpsdrive/trunk/debian/patches/99-autobestmap.dpatch
===================================================================
--- packages/gpsdrive/trunk/debian/patches/99-autobestmap.dpatch 2012-06-29 08:29:04 UTC (rev 3077)
+++ packages/gpsdrive/trunk/debian/patches/99-autobestmap.dpatch 2012-07-02 08:23:29 UTC (rev 3078)
@@ -1,26 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 99-autobestmap.dpatch by Andreas Putzo <andreas at putzo.net>
-##
-## DP: The autobestmap config option is not updated when using the toggle button
-## DP: in gpsdrive. Patch backported from 2.10pre5.
-
- at DPATCH@
-diff -urNad gpsdrive-2.10~pre4~/src/main_gui.c gpsdrive-2.10~pre4/src/main_gui.c
---- gpsdrive-2.10~pre4~/src/main_gui.c 2007-09-15 15:12:03.000000000 +0000
-+++ gpsdrive-2.10~pre4/src/main_gui.c 2008-07-15 19:48:34.000000000 +0000
-@@ -229,6 +229,7 @@
- gtk_label_set_text (GTK_LABEL (statusprefscale_lb), _("Auto"));
- if (mapscaler_scaler)
- gtk_widget_set_sensitive (mapscaler_scaler, FALSE);
-+ local_config.autobestmap = TRUE;
- }
- else
- {
-@@ -238,6 +239,7 @@
- gtk_label_set_text (GTK_LABEL (statusprefscale_lb), sc);
- if (mapscaler_scaler)
- gtk_widget_set_sensitive (mapscaler_scaler, TRUE);
-+ local_config.autobestmap = FALSE;
- }
-
- current.needtosave = TRUE;
Deleted: packages/gpsdrive/trunk/debian/patches/gpsdrive2.10pre7_osm_proj.patch
===================================================================
--- packages/gpsdrive/trunk/debian/patches/gpsdrive2.10pre7_osm_proj.patch 2012-06-29 08:29:04 UTC (rev 3077)
+++ packages/gpsdrive/trunk/debian/patches/gpsdrive2.10pre7_osm_proj.patch 2012-07-02 08:23:29 UTC (rev 3078)
@@ -1,572 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## gpsdrive2.10pre7_osm_proj.patch by H. Bowman <hamish_b yahoo com>
-##
-## DP: Fix OpenStreetMap projection handling (backport from upstream)
-
- at DPATCH@
-Index: src/map_download.c
-===================================================================
---- src/map_download.c (revision 2476)
-+++ src/map_download.c (revision 2477)
-@@ -61,8 +61,8 @@
- # endif
-
-
--#include <gpsdrive.h>
--#include <map_handler.h>
-+#include "gpsdrive.h"
-+#include "map_handler.h"
- #include "gpsdrive_config.h"
- #include "gui.h"
- #include "map_download.h"
-@@ -133,24 +133,20 @@
- MAPSOURCE_LANDSAT, "1 : 50 million", 0, 50000000,
-
- MAPSOURCE_OSM_TAH, "OpenStreetMap Tiles at Home", -1, -1,
-- MAPSOURCE_OSM_TAH, "1 : 147 456 000", 1, 256*576000,
-- MAPSOURCE_OSM_TAH, "1 : 73 728 000", 2, 128*576000,
-- MAPSOURCE_OSM_TAH, "1 : 36 864 000", 3, 64*576000,
-- MAPSOURCE_OSM_TAH, "1 : 18 432 000", 4, 32*576000,
-- MAPSOURCE_OSM_TAH, "1 : 9 216 000", 5, 16*576000,
-- MAPSOURCE_OSM_TAH, "1 : 4 608 000", 6, 8*576000,
-- MAPSOURCE_OSM_TAH, "1 : 2 304 000", 7, 4*576000,
-- MAPSOURCE_OSM_TAH, "1 : 1 152 000", 8, 2*576000,
--
-- MAPSOURCE_OSM_TAH, "1 : 576 000", 9, 576000,
-- MAPSOURCE_OSM_TAH, "1 : 288 000", 10, 288000,
-- MAPSOURCE_OSM_TAH, "1 : 144 000", 11, 144000,
-- MAPSOURCE_OSM_TAH, "1 : 72 000", 12, 72000,
-- MAPSOURCE_OSM_TAH, "1 : 36 000", 13, 36000,
-- MAPSOURCE_OSM_TAH, "1 : 18 000", 14, 18000,
-- MAPSOURCE_OSM_TAH, "1 : 9 000", 15, 9000,
-- MAPSOURCE_OSM_TAH, "1 : 4 500", 16, 4500,
-- MAPSOURCE_OSM_TAH, "1 : 2 250", 17, 2250,
-+ /* scale varies with latitude, so this is just a rough guide
-+ which will only be valid for mid-lats */
-+ /* Octave code: for lat=0:5:75; disp( [lat (a * 2*pi *pixelfact * cos(lat * pi/180)) / (256*2^9)]); end */
-+ MAPSOURCE_OSM_TAH, "1 : 2 500", 17, 2250,
-+ MAPSOURCE_OSM_TAH, "1 : 5 000", 16, 4500,
-+ MAPSOURCE_OSM_TAH, "1 : 10 000", 15, 9000,
-+ MAPSOURCE_OSM_TAH, "1 : 20 000", 14, 18000,
-+ MAPSOURCE_OSM_TAH, "1 : 40 000", 13, 36000,
-+ MAPSOURCE_OSM_TAH, "1 : 75 000", 12, 72000,
-+ MAPSOURCE_OSM_TAH, "1 : 150 000", 11, 144000,
-+ MAPSOURCE_OSM_TAH, "1 : 300 000", 10, 288000,
-+ MAPSOURCE_OSM_TAH, "1 : 600 000", 9, 576000,
-+ /* the distortion gets too bad at scales wider than 1:500k
-+ It would be more accurate to stop earlier, but we compromise */
- MAPSOURCE_N_ITEMS, "", 0, 0
- };
-
-@@ -165,7 +161,23 @@
- gtk_entry_set_text (GTK_ENTRY (lon_entry), lon);
- }
-
-+/* *****************************************************************************
-+ * calculate the local map scale based on Web Tile zoom level and latitude
-+ */
-+double
-+calc_webtile_scale (double lat, int zoom)
-+{
-+ double scale;
-+ double a = 6378137.0; /* major radius of WGS84 ellipsoid (meters) */
-
-+ scale = (a * 2*M_PI * cos(DEG2RAD(lat)) * PIXELFACT) / (256 * pow(2,zoom));
-+
-+ if (mydebug > 3)
-+ g_print ("Tile scale: %.2f\n", scale);
-+
-+ return scale;
-+}
-+
- /* *****************************************************************************
- * callback to set paramaters for map to download
- */
-@@ -195,9 +207,13 @@
- 3, &mapdl_scale, -1);
- /* TODO: determine map_ or top_ proj at this point so drawdownloadrectangle()
- * knows how big to draw the green preview box */
-+ if (local_config.mapsource_type == MAPSOURCE_OSM_TAH)
-+ mapdl_scale = (int)calc_webtile_scale(mapdl_lat, mapdl_zoom);
-+
- if (mydebug > 3)
- g_print ("new map scale/zoom level: %d / %d\n",
- mapdl_scale, mapdl_zoom);
-+
- local_config.mapsource_scale = gtk_combo_box_get_active (GTK_COMBO_BOX (scale_combobox));
- current.needtosave = TRUE;
- }
-@@ -439,6 +455,7 @@
- gchar file_path[512];
- gchar path[40];
- gchar img_fmt[4];
-+ gchar scale_str[40];
-
- if (mapdl_active)
- return TRUE;
-@@ -450,11 +467,14 @@
- g_strlcpy (path, "landsat", sizeof (path));
- g_strlcpy (img_fmt, "jpg", sizeof (img_fmt));
- mapdl_geturl_landsat ();
-+ g_snprintf (scale_str, sizeof (scale_str), "%d", mapdl_scale);
- break;
- case MAPSOURCE_OSM_TAH:
- g_strlcpy (path, "openstreetmap_tah", sizeof (path));
- g_strlcpy (img_fmt, "png", sizeof (img_fmt));
- mapdl_geturl_osm_tah ();
-+ mapdl_scale = (int)calc_webtile_scale(mapdl_lat, mapdl_zoom);
-+ g_snprintf (scale_str, sizeof (scale_str), "%d", mapdl_zoom);
- break;
- default:
- return TRUE;
-@@ -464,10 +484,11 @@
- g_print (" download url:\n%s\n", mapdl_url);
-
- /* set file path and create directory if necessary */
--
--
-- g_snprintf (file_path, sizeof (file_path), "%s%s/%d/%.0f/%.0f/",
-- local_config.dir_maps, path, mapdl_scale, mapdl_lat, mapdl_lon);
-+
-+ g_snprintf (file_path, sizeof (file_path), "%s%s/%s/%.0f/%.0f/",
-+ local_config.dir_maps, path, scale_str, mapdl_lat, mapdl_lon);
-+
-+
- if(!g_file_test (file_path, G_FILE_TEST_IS_DIR))
- {
- if (g_mkdir_with_parents (file_path, 0700))
-@@ -477,14 +498,15 @@
- }
-
- /* complete filename */
-- g_snprintf (mapdl_file_w_path, sizeof (mapdl_file_w_path), "%s%s_%d_%5.3f_%5.3f.%s",
-- file_path, mapdl_proj, mapdl_scale, mapdl_lat, mapdl_lon, img_fmt);
-+ g_snprintf (mapdl_file_w_path, sizeof (mapdl_file_w_path), "%s%s_%s_%5.3f_%5.3f.%s",
-+ file_path, mapdl_proj, scale_str, mapdl_lat, mapdl_lon, img_fmt);
-
- if (mydebug > 10)
- g_print (" filename: %s\n", mapdl_file_w_path);
-
- gtk_progress_bar_set_text (GTK_PROGRESS_BAR (mapdl_progress),
- _("Loading Map..."));
-+
- mapdl_abort = FALSE;
- mapdl_download ();
-
-Index: src/map_download.h
-===================================================================
---- src/map_download.h (revision 2476)
-+++ src/map_download.h (revision 2477)
-@@ -1,10 +1,9 @@
- /***********************************************************************
-
- Copyright (c) 2008 Guenther Meyer <d.s.e (at) sordidmusic.com>
--
- Website: www.gpsdrive.de/
-
--Disclaimer: Please do not use for navigation.
-+Disclaimer: Please do not use as a primary means of navigation.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
-@@ -36,5 +35,6 @@
- void mapdl_set_coords (gchar *lat, gchar *lon);
- gint mapdl_init (void);
- gint mapdl_cleanup (void);
-+double calc_webtile_scale (double, int);
-
- #endif /* GPSDRIVE_MAP_DOWNLOAD_H */
-Index: scripts/gpsfetchmap.pl
-===================================================================
---- scripts/gpsfetchmap.pl (revision 2479)
-+++ scripts/gpsfetchmap.pl (revision 2480)
-@@ -47,6 +47,7 @@
- modified (Jul 2007) by Maciek Kaliszewski <mkalkal\@interia.pl>
- modified (Oct 2007) by Andreas Putzo <andreas\@putzo.net>
- modified (Jan 2008) by Gernot Hillier <gernot\@hillier.de> (added Openstreetmap support)
-+modified (Aug 2009) by Hamish Bowman <hamish_b yahoo com> (fix OSM+WMS map scales)
- Version svn-$Version
- ";
-
-@@ -151,24 +152,20 @@
- 10000000 =>10000000,
- 50000000 =>50000000,
- },
-+# Web Map Tiles scale varies with latitude by the formula
-+# (a * 2*pi * PIXELFACT * cos(lat * pi/180)) / (256 * 2^zoom)
-+# where a is major radius of the Earth according to the WGS84 ellipsoid definition.
-+# zoom levels lower than 9 (~1:500k) badly distort the Mercator so are not offered.
- openstreetmap_tah => {
-- 256*576000 => 1,
-- 128*576000 => 2,
-- 64*576000 => 3,
-- 32*576000 => 4,
-- 16*576000 => 5,
-- 8*576000 => 6,
-- 4*576000 => 7,
-- 2*576000 => 8,
-- 576000 => 9,
-- 288000 => 10,
-- 144000 => 11,
-- 72000 => 12,
-- 36000 => 13,
-- 18000 => 14,
-- 9000 => 15,
-- 4500 => 16,
-- 2250 => 17
-+ 600000 => 9,
-+ 300000 => 10,
-+ 150000 => 11,
-+ 75000 => 12,
-+ 40000 => 13,
-+ 20000 => 14,
-+ 10000 => 15,
-+ 5000 => 16,
-+ 2500 => 17
- }
- };
-
-@@ -240,8 +237,6 @@
- $polite=1;
- }
-
--
--
- if ( $mapserver eq 'geoscience' )
- {
- $scale ||= join(",",keys %{$Scale2Zoom->{'geoscience'}});
-@@ -269,22 +264,24 @@
- pod2usage(-verbose=>2) if $man;
-
- sub append_koords($$$$); # {}
-+sub calc_webtile_scale ($$); # {}
- sub check_coverage($); # {}
- sub check_koord_file($); # {}
- sub debug($); # {}
-+sub file_count($); # {}
- sub geoscience_url($$$); # {}
--sub landsat_url($$$); # {}
--sub resize($$); #{}
--sub file_count($); # {}
- sub get_coords_for_route; # {}
- sub get_coords_for_track($); # {}
-+sub get_gpsd_position(); # {}
- sub get_waypoint($); # {}
- sub is_map_file($); # {}
-+sub landsat_url($$$); # {}
-+sub openstreetmap_tah_url($$$); # {}
- sub read_gpstool_map_file(); # {}
- sub read_koord_file($); # {}
-+sub resize($$); # {}
- sub update_gpsdrive_map_koord_file(); # {}
- sub wget_map($$$); # {}
--sub get_gpsd_position(); # {}
-
- STDERR->autoflush(1);
- STDOUT->autoflush(1);
-@@ -407,7 +404,9 @@
-
- my ($existing,$wanted) = file_count($desired_locations);
- print "You are about to download $wanted (".($existing+$wanted).") file(s).\n";
--
-+if ($debug) {
-+ print "Politeness delay set to $polite seconds,\n";
-+}
- if ( $mapserver eq 'geoscience' ){
- print "+-----------------------------------------------------------+\n";
- print "| Geoscience Maps are Copyright, Commonwealth of Australia |\n";
-@@ -419,6 +418,7 @@
- print "+----------------------------------------------------------------+\n";
- print "| Landsat maps are courtesy JPL/NASA's OnEarth WMS Global Mosaic |\n";
- print "| Map prefix will be set automatically based on scale. |\n";
-+ print "+----------------------------------------------------------------+\n";
- # By law, US Government data is without copyright.
- }elsif ( $mapserver eq 'openstreetmap_tah' ){
- print "+-----------------------------------------------------------+\n";
-@@ -427,6 +427,8 @@
- print "| They are free for use under the terms of the |\n";
- print "| Creative Commons \"Attribution-Share Alike 2.0 Generic\" |\n";
- print "| license. See http://www.openstreetmap.org for details. |\n";
-+ print "+-----------------------------------------------------------+\n";
-+
- } elsif ( ! $force) {
- print "You may violating the map servers terms of use!\n";
- print "Please use their service responsible!\n";
-@@ -654,14 +656,32 @@
- ######################################################################
- sub map_filename($$$){
- my ($scale,$lati,$long) = @_;
-+
-+ my $mscale = $scale;
-+
-+ if ( $mapserver eq 'openstreetmap_tah' ) {
-+ my $zoom = undef;
-+ for my $s ( sort keys %{$Scale2Zoom->{openstreetmap_tah}} ) {
-+ next unless $s == $scale;
-+ $zoom = $Scale2Zoom->{openstreetmap_tah}->{$s};
-+ last;
-+ }
-+ unless ( $zoom ) {
-+ print "Error calculating Zoomlevel for Scale: $scale\n";
-+ return (undef);
-+ }
-+ $mscale = $zoom;
-+ }
-
-- my $filename = "$mapserver/$scale"
-+ my $filename = "$mapserver/$mscale"
- ."/".int($lati)
- # ."/".sprintf("%3.1f",$lati)
- ."/".int($long)
-- ."/$FILEPREFIX$scale-$lati-$long.$fileext";
-- printf("Filename(%.0f,%.5f,%.5f): $filename\n",$scale,$lati,$long)
-+ ."/$FILEPREFIX$mscale-$lati-$long.$fileext";
-+
-+ printf("Filename(%.0f,%.5f,%.5f): $filename\n",$mscale,$lati,$long)
- if $debug;
-+
- return $filename;
- }
-
-@@ -678,6 +698,9 @@
- # mapblast/1000/047/047.0232/9/map_1000-047.0232-0009.8140.gif 47.02320 9.81400 1000
- #my $filename = "$mapserver/$scale/".int($lati)."/".sprintf("%3.1f",$lati).
- #"/".int($long)."/$FILEPREFIX$scale-$lati-$long.gif";
-+ if ($debug) {
-+ print "---------------\n";
-+ }
-
- # redundant??
- if ($mapserver eq 'landsat')
-@@ -1082,7 +1105,7 @@
- $lon2 += 360;
- }
-
-- debug( "landsat_url(LAT=$lat,LON=$lon,SCALE=$scale,FACTOR=$factor)");
-+ debug( "landsat_url(LAT=$lat,LON=$lon,SCALE=$scale)");
-
- debug( "Calculated Lat1 $lat1");
- debug( "Calculated Lat2 $lat2");
-@@ -1111,7 +1134,28 @@
- return ($url,$scale);
- }
-
-+
- #############################################################################
-+# calculate the local map scale based on Web Tile zoom level and latitude
-+# This same formula is used by OSM, Google Maps, Microsoft Maps, ...
-+sub calc_webtile_scale ($$){
-+ my $lat = shift;
-+ my $zoom = shift;
-+
-+ # major radius of WGS84 ellipsoid (meters)
-+ my $a = $RADIUS_KM * 1000;
-+
-+ my $zscale = (2*$a*$PI * cos($lat*$D2R) * $PIXELFACT) / (256 * 2**$zoom);
-+
-+ if ($debug) {
-+ print "Tile scale: $zscale\n";
-+ }
-+
-+ return ($zscale);
-+}
-+
-+
-+#############################################################################
- sub openstreetmap_tah_url($$$){
- my $lati = shift;
- my $long = shift;
-@@ -1122,7 +1166,7 @@
- for my $s ( sort keys %{$Scale2Zoom->{openstreetmap_tah}} ) {
- next unless $s == $scale;
- $zoom = $Scale2Zoom->{openstreetmap_tah}->{$s};
-- $mapscale = $s;
-+ $mapscale = calc_webtile_scale($lati, $zoom);
- last;
- }
-
-@@ -1132,10 +1176,9 @@
- }
-
- if ($debug) {
-- print "\n";
-- print "Using openstreetmap_tah zoom ", $zoom, " for requested scale ", $scale, ":1 actual scale ", $mapscale, ":1\n";
-- print "lat: $lati\n";
-- print "lon: $long\n";
-+ print "Using openstreetmap_tah zoom ", $zoom, " for requested scale 1:", $scale, ". Actual scale 1:", $mapscale, "\n";
-+ print "cetner lat: $lati\n";
-+ print "cetner lon: $long\n";
- }
-
- my $url = "http://tah.openstreetmap.org/MapOf/?lat=$lati&long=$long&z=$zoom&w=1280&h=1024&format=png";
-@@ -1903,7 +1946,7 @@
-
- gpsfetchmap -w <WAYPOINT NAME> -sc <SCALE> -a <#> -p
-
--gpsfetchmap -la <latitude DD.DDDD> -lo <latitude DD.DDDD> -sc <SCALE> -a <#> -p
-+gpsfetchmap -la <latitude DD.DDDD> -lo <longitude DD.DDDD> -sc <SCALE> -a <#> -p
-
- gpsfetchmap -sla <start latitude DD.DDDD> -endla <end latitude DD.DDDD> -slo <start longitude DD.DDDD> -endlo <end longitude DD.DDDD> -sc <SCALE> -a <#> -p
-
-@@ -1915,7 +1958,7 @@
- [-la <latitude DD.DDDD>] [-lo <longitude DD.DDDD>]
- [-sla <start latitude DD.DDDD>] [-endla <end latitude DD.DDDD>]
- [-slo <start longitude DD.DDDD>] [-endlo <end longitude DD.DDDD>]
-- [-sc <SCALE>] [-a <#>] [-p] [-m <MAPSERVER>]
-+ [-sc <SCALE>] [-a <#>] [-p <#>] [-m <MAPSERVER>]
- [-u <UNIT>] [-md <DIR>] [-W <FILE>] [-t <FILE>] [-r]
- [-C <FILE>] [-P <PREFIX>] [-F] [-d] [-v] [-h] [-M] [-n] [-U] [-c]
-
-@@ -2000,7 +2043,7 @@
- of longitude. 'units' is read from the configuration file (-C) or as defined
- by (-u).
-
--=item B<-p, --polite>
-+=item B<-p, --polite <#>>
-
- This causes the program to sleep one second between downloads to be polite
- to the mapserver. Takes an optional value of number of seconds to sleep.
-@@ -2117,6 +2160,13 @@
-
- Prints the manual page and exits.
-
-+=back
-+
-+
-+=head1 OUTPUT
-+
-+=over 2
-+
- =item B<Download>
-
- When downloading Maps the output reads as folows:
-@@ -2130,5 +2180,16 @@
-
- =back
-
-+
-+=head1 EXAMPLE
-+
-+Download all 1:10000 OpenStreetMaps in a 5 km radius around the
-+Sydney Convention Centre. Between tile downloads it will let
-+the server rest for 3 seconds.
-+
-+gpsfetchmap --mapserver openstreetmap_tah --polite 3 \
-+ --lat "-33.8753" --lon 151.2001 --scale 10000 \
-+ --area 5 --unit kilometers
-+
- =cut
-
-Index: scripts/mapnik/gpsdrive_mapnik_gentiles-in.py
-===================================================================
---- scripts/mapnik/gpsdrive_mapnik_gentiles-in.py (revision 2473)
-+++ scripts/mapnik/gpsdrive_mapnik_gentiles-in.py (revision 2479)
-@@ -7,14 +7,20 @@
-
- Options:
- -h, --help show this help
-- -b, --bbox boundingbox (lon,lat,lon,lat) - Be carefull! Quote negative values!
-- -s, --scale scale single/range
-- 1 = 147456000
-- 2 = 73728000
-- ...
-- 15 = 9000
-- 16 = 4500
-- 17 = 2250
-+ -b, --bbox boundingbox (minlon,minlat,maxlon,maxlat)
-+ - Be carefull! "Quote" negative values!
-+ -s, --scale scale single/range (zoom level or min-max)
-+ (below "9" Mercator becomes distorted;
-+ actual scale will vary with latitude)
-+ 9 - 1:600,000
-+ 10 - 1:300,000
-+ 11 - 1:150,000
-+ 12 - 1:75,000
-+ 13 - 1:40,000
-+ 14 - 1:20,000
-+ 15 - 1:10,000
-+ 16 - 1:5,000
-+ 17 - 1:2,500
- --test testrun = generates Munich example
-
- Examples:
-@@ -22,7 +28,7 @@
- Munich:
- gpsdrive_mapnik_gentiles.py -b 11.4,48.07,11.7,48.2 -s 10-16
-
-- World:
-+ World: (just to demonstrate lat/lon order; scale not recommended)
- gpsdrive_mapnik_gentiles.py -b "-180.0,-90.0,180.0,90.0" -s 1-6
- """
-
-@@ -32,12 +38,19 @@
- import getopt
- import string
-
--zoom2scale = [728 * 576000,256 * 576000,128 * 576000,64 * 576000,32 * 576000,16 * 576000,8 * 576000,4 * 576000,2 * 576000,576000,288000,144000,72000,36000,18000,9000,4500,2250,1125]
-
--
- DEG_TO_RAD = pi/180
- RAD_TO_DEG = 180/pi
-
-+def calc_scale (lat, zoom):
-+ # GpsDrive's hardcoded pixels per meter ratio
-+ PixelFact = 2817.947378
-+ # wgs84 major Earth axis
-+ a = 6378137.0
-+ dynscale = ( a * 2*pi * cos(lat * DEG_TO_RAD) * PixelFact ) / ( 256*pow(2,zoom) )
-+ print dynscale
-+ return dynscale
-+
- def minmax (a,b,c):
- a = max(a,b)
- a = min(a,c)
-@@ -90,17 +103,28 @@
- os.mkdir(tile_dir)
-
- gprj = GoogleProjection(maxZoom+1)
-+
- #m = Map(2 * 256,2 * 256)
- m = Map(1280,1024)
- load_map(m,mapfile)
-- prj = Projection("+proj=merc +datum=WGS84")
--
-+
-+ #prj = Projection("+proj=merc +datum=WGS84")
-+ # What follows is from /usr/share/proj/esri.extra, EPSG:900913
-+ # "Chris' funny epsgish code for the google mercator"
-+ prj = Projection("+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs")
-+
- ll0 = (bbox[0],bbox[3])
- ll1 = (bbox[2],bbox[1])
--
-+
- for z in range(minZoom,maxZoom + 1):
-+ if z == 9:
-+ print "CAUTION: Mercator projection begins to be noticeably distorted at this zoom level."
-+ elif z < 9:
-+ print "WARNING: Mercator projection is very distorted at this zoom level."
-+
- px0 = gprj.fromLLtoPixel(ll0,z)
- px1 = gprj.fromLLtoPixel(ll1,z)
-+
- for x in range(int(px0[0]/640.0),int(px1[0]/640.0)+1):
- for y in range(int(px0[1]/512.0),int(px1[1]/512.0)+1):
- p0 = gprj.fromPixelToLL((x * 640.0, (y+1) * 512.0),z)
-@@ -145,7 +169,7 @@
- fh_mapkoord.write(tile_path + " ")
- fh_mapkoord.write(str((p0[1] + p1[1]) / 2) + " ")
- fh_mapkoord.write(str((p0[0] + p1[0]) / 2) + " ")
-- fh_mapkoord.write(str(zoom2scale[z]))
-+ fh_mapkoord.write(str( calc_scale( (p0[1] + p1[1])/2, z) ))
- fh_mapkoord.write(" " + str(p0[1]) + " " + str(p0[0]))
- fh_mapkoord.write(" " + str(p1[1]) + " " + str(p1[0]))
- fh_mapkoord.write("\n")
-@@ -221,6 +245,7 @@
-
- # check for correct values
- if str(eval(bboxs[0])) != bboxs[0] or str(eval(bboxs[1])) != bboxs[1] or str(eval(bboxs[2])) != bboxs[2] or str(eval(bboxs[3])) != bboxs[3]:
-+ # rounding problems... what exactly is this supposed to be checking ???
- sys.exit("Boundingbox invalid!")
-
- if minZoom < 1 or minZoom > 17 or maxZoom < 1 and maxZoom > 17 or minZoom > maxZoom or int(minZoom) <> minZoom or int(maxZoom) <> maxZoom:
More information about the Pkg-grass-devel
mailing list