[libgeo-osm-tiles-perl] 01/05: Add patch to handle new OSM URLs in downloadosmtiles script.

gregor herrmann gregoa at debian.org
Mon Mar 24 17:28:20 UTC 2014


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libgeo-osm-tiles-perl.

commit 85142f0d82ceffb07294efdc0b7e7793b26babb8
Author: gregor herrmann <gregoa at debian.org>
Date:   Mon Mar 24 18:23:53 2014 +0100

    Add patch to handle new OSM URLs in downloadosmtiles script.
---
 debian/patches/new-osm-urls.patch | 20 ++++++++++++++++++++
 debian/patches/series             |  1 +
 2 files changed, 21 insertions(+)

diff --git a/debian/patches/new-osm-urls.patch b/debian/patches/new-osm-urls.patch
new file mode 100644
index 0000000..7c74dd9
--- /dev/null
+++ b/debian/patches/new-osm-urls.patch
@@ -0,0 +1,20 @@
+Description: OSM has changed their short copyable URLs
+Origin: vendor
+Bug: https://rt.cpan.org/Ticket/Display.html?id=94148
+Forwarded: https://rt.cpan.org/Ticket/Display.html?id=94148
+Author: gregor herrmann <gregoa at debian.org>
+Last-Update: 2014-03-24
+
+--- a/downloadosmtiles.pl
++++ b/downloadosmtiles.pl
+@@ -98,6 +98,10 @@
+ sub selecttilescmdline
+ {
+     if ($opt{link}) {
++	# rewrite new style OSM links to old pattern
++	if ($opt{link} =~ /^http:\/\/(.+)\/#map=(\d+)\/([\d.]+)\/([\d.]+)/) {
++	    $opt{link} = "http://$1/?lat=$3&lon=$4&zoom=$2&layers=M";
++        }
+ 	die "Invalid link: $opt{link}\n"
+ 	    unless $opt{link} =~ /^http:\/\/.*\/\?lat=(-?\d+(?:\.\d+)?)\&lon=(-?\d+(?:\.\d+)?)\&zoom=(\d+)/;
+ 	my $lat = $1;
diff --git a/debian/patches/series b/debian/patches/series
index 29b14c5..6080584 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 no-internet-tests.patch
+new-osm-urls.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libgeo-osm-tiles-perl.git



More information about the Pkg-perl-cvs-commits mailing list