[DebianGIS-dev] r1676 - in packages/josm/trunk/debian: . patches

gmascellani-guest at alioth.debian.org gmascellani-guest at alioth.debian.org
Fri Jun 27 16:47:19 UTC 2008


Author: gmascellani-guest
Date: 2008-06-27 16:47:18 +0000 (Fri, 27 Jun 2008)
New Revision: 1676

Modified:
   packages/josm/trunk/debian/changelog
   packages/josm/trunk/debian/patches/00list
   packages/josm/trunk/debian/patches/50_sun.dpatch
Log:
pathces/50_sun: fix 0.6 API specific code (not yet used) which 
doesn't compile with gcj


Modified: packages/josm/trunk/debian/changelog
===================================================================
--- packages/josm/trunk/debian/changelog	2008-06-27 08:03:04 UTC (rev 1675)
+++ packages/josm/trunk/debian/changelog	2008-06-27 16:47:18 UTC (rev 1676)
@@ -1,8 +1,10 @@
 josm (0.0.0.20080518-1) UNRELEASED; urgency=low
 
   * New upstream SVN checkout
+  * pathces/50_sun: fix 0.6 API specific code (not yet used) which 
+    doesn't compile with gcj
 
- -- Giovanni Mascellani <g.mascellani at gmail.com>  Sun, 18 May 2008 16:49:31 +0200
+ -- Giovanni Mascellani <g.mascellani at gmail.com>  Fri, 27 Jun 2008 17:46:55 +0200
 
 josm (0.0.0.20080510-1) unstable; urgency=low
 

Modified: packages/josm/trunk/debian/patches/00list
===================================================================
--- packages/josm/trunk/debian/patches/00list	2008-06-27 08:03:04 UTC (rev 1675)
+++ packages/josm/trunk/debian/patches/00list	2008-06-27 16:47:18 UTC (rev 1676)
@@ -2,3 +2,4 @@
 20_bts
 30_graphics
 40_elemstyles
+50_sun

Modified: packages/josm/trunk/debian/patches/50_sun.dpatch
===================================================================
--- packages/josm/trunk/debian/patches/50_sun.dpatch	2008-06-27 08:03:04 UTC (rev 1675)
+++ packages/josm/trunk/debian/patches/50_sun.dpatch	2008-06-27 16:47:18 UTC (rev 1676)
@@ -1,19 +1,38 @@
 #! /bin/sh /usr/share/dpatch/dpatch-run
-## 50_sun.dpatch by  <g.mascellani at gmail.com>
+## 50_sun.dpatch by Giovanni Mascellani <g.mascellani at gmail.com>
 ##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
+## DP: Fix 0.6 API specific code (not yet used) which doesn't compile with gcj
 
 @DPATCH@
+diff -urNad josm-0.0.0.20080518~/src/org/openstreetmap/josm/gui/MainApplication.java josm-0.0.0.20080518/src/org/openstreetmap/josm/gui/MainApplication.java
+--- josm-0.0.0.20080518~/src/org/openstreetmap/josm/gui/MainApplication.java	2008-05-10 21:47:30.000000000 +0200
++++ josm-0.0.0.20080518/src/org/openstreetmap/josm/gui/MainApplication.java	2008-06-27 18:19:17.000000000 +0200
+@@ -172,6 +172,16 @@
+ 		Main.loadPlugins(false);
+ 		toolbar.refreshToolbarControl();
+ 
++		String version = Main.pref.get("osm-server.version", "0.5");
++		if (version != "0.5") {
++			// Debian JOSM is not API 0.6 compatible
++			JOptionPane.showMessageDialog(null,
++					"This version of JOSM compiled for Debian cannot be used with 0.6 API.\n" +
++					"Please, delete the \"osm-server.version\" line from your configuration file and restart JOSM.",
++					"Not API 0.6 compatible JOSM", JOptionPane.ERROR_MESSAGE);
++			System.exit(0);
++		}
++
+ 		mainFrame.setVisible(true);
+ 
+ 		if (!args.containsKey("no-fullscreen") && !args.containsKey("geometry") && Toolkit.getDefaultToolkit().isFrameStateSupported(JFrame.MAXIMIZED_BOTH))
 diff -urNad josm-0.0.0.20080518~/src/org/openstreetmap/josm/io/MyHttpHandler.java josm-0.0.0.20080518/src/org/openstreetmap/josm/io/MyHttpHandler.java
---- josm-0.0.0.20080518~/src/org/openstreetmap/josm/io/MyHttpHandler.java	2008-05-10 21:47:30.000000000 +0200
-+++ josm-0.0.0.20080518/src/org/openstreetmap/josm/io/MyHttpHandler.java	2008-05-19 18:09:26.000000000 +0200
+--- josm-0.0.0.20080518~/src/org/openstreetmap/josm/io/MyHttpHandler.java	2008-06-27 18:18:15.000000000 +0200
++++ josm-0.0.0.20080518/src/org/openstreetmap/josm/io/MyHttpHandler.java	2008-06-27 18:18:21.000000000 +0200
 @@ -7,7 +7,7 @@
  
  // This is also a java.net.URLStreamHandler
  // Basically a copy of sun.net.www.protocol.http.Handler
 -public class MyHttpHandler extends sun.net.www.protocol.http.Handler  {
-+public class MyHttpHandler extends gnu.java.net.protocol.http.Handler  {
++/*public class MyHttpHandler extends gnu.java.net.protocol.http.Handler  {
              protected String proxy;
              protected int proxyPort;
  
@@ -32,16 +51,22 @@
                  proxyPort = port;
              }
    
+@@ -30,4 +30,4 @@
+                     throws IOException {
+                 return new MyHttpURLConnection(u, p, this);
+             }
+-}
++}*/
 diff -urNad josm-0.0.0.20080518~/src/org/openstreetmap/josm/io/MyHttpURLConnection.java josm-0.0.0.20080518/src/org/openstreetmap/josm/io/MyHttpURLConnection.java
---- josm-0.0.0.20080518~/src/org/openstreetmap/josm/io/MyHttpURLConnection.java	2008-05-10 21:47:30.000000000 +0200
-+++ josm-0.0.0.20080518/src/org/openstreetmap/josm/io/MyHttpURLConnection.java	2008-05-19 18:10:41.000000000 +0200
+--- josm-0.0.0.20080518~/src/org/openstreetmap/josm/io/MyHttpURLConnection.java	2008-06-27 18:18:15.000000000 +0200
++++ josm-0.0.0.20080518/src/org/openstreetmap/josm/io/MyHttpURLConnection.java	2008-06-27 18:18:21.000000000 +0200
 @@ -6,10 +6,11 @@
  import java.net.URL;
  import java.net.Proxy;
  
 -public class MyHttpURLConnection extends sun.net.www.protocol.http.HttpURLConnection {
 -            protected MyHttpURLConnection(URL u, Proxy p, sun.net.www.protocol.http.Handler handler)
-+public class MyHttpURLConnection extends gnu.java.net.protocol.http.HTTPURLConnection {
++/*public class MyHttpURLConnection extends gnu.java.net.protocol.http.HTTPURLConnection {
 +            protected MyHttpURLConnection(URL u, Proxy p, gnu.java.net.protocol.http.Handler handler) throws IOException
              {
 -              super(u,p,handler);
@@ -50,3 +75,50 @@
              }
  
  public synchronized OutputStream getOutputStream()
+@@ -20,4 +21,4 @@
+                 method = oldmethod;
+                 return temp;
+ }
+-}
++}*/
+diff -urNad josm-0.0.0.20080518~/src/org/openstreetmap/josm/io/OsmServerWriter.java josm-0.0.0.20080518/src/org/openstreetmap/josm/io/OsmServerWriter.java
+--- josm-0.0.0.20080518~/src/org/openstreetmap/josm/io/OsmServerWriter.java	2008-06-27 18:18:15.000000000 +0200
++++ josm-0.0.0.20080518/src/org/openstreetmap/josm/io/OsmServerWriter.java	2008-06-27 18:18:21.000000000 +0200
+@@ -303,7 +303,7 @@
+ 	 */
+ 	public void visit(Node n) {
+ 		if (n.deleted) {
+-			sendRequest("DELETE", "node", n, true);
++			sendRequest("DELETE", "node", n, false);
+ 		} else {
+ 			sendRequest("PUT", "node", n, true);
+ 		}
+@@ -315,7 +315,7 @@
+ 	 */
+ 	public void visit(Way w) {
+ 		if (w.deleted) {
+-			sendRequest("DELETE", "way", w, true);
++			sendRequest("DELETE", "way", w, false);
+ 		} else {
+ 			sendRequest("PUT", "way", w, true);
+ 		}
+@@ -327,7 +327,7 @@
+ 	 */
+ 	public void visit(Relation e) {
+ 		if (e.deleted) {
+-			sendRequest("DELETE", "relation", e, true);
++			sendRequest("DELETE", "relation", e, false);
+ 		} else {
+ 			sendRequest("PUT", "relation", e, true);
+ 		}
+@@ -368,8 +368,8 @@
+ 					new URL(Main.pref.get("osm-server.url") +
+ 					"/" + version + "/"),
+ 					urlSuffix + 
+-					"/" + (osm.id==0 ? "create" : osm.id),
+-					(java.net.URLStreamHandler)new MyHttpHandler());
++					"/" + (osm.id==0 ? "create" : osm.id));
++					//(java.net.URLStreamHandler)new MyHttpHandler());
+ 			System.out.print("upload to: "+url+ "..." );
+ 			activeConnection = (HttpURLConnection)url.openConnection();
+ 			activeConnection.setConnectTimeout(15000);




More information about the Pkg-grass-devel mailing list