The following commit has been merged in the master branch:
commit 2a1def7a69795a9d8670dfb387da49acf33fbe5c
Author: David Paleino <da...@debian.org>
Date:   Thu Dec 20 22:45:21 2012 +0100

    Move useful shareable data out of the jar.

diff --git a/debian/changelog b/debian/changelog
index 6112851..f11b5dd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,8 +5,9 @@ josm (0.0.svn5608+dfsg1-1) UNRELEASED; urgency=low
     (Closes: #690585)
   * Fixed patch to load images from the openstreetmap-map-icons
     package (Closes: #693486).
+  * Move useful shareable data out of the jar.
 
- -- David Paleino <da...@debian.org>  Thu, 20 Dec 2012 19:39:56 +0100
+ -- David Paleino <da...@debian.org>  Thu, 20 Dec 2012 22:44:42 +0100
 
 josm (0.0.svn5576+dfsg1-1) unstable; urgency=low
 
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..a0eeae2
--- /dev/null
+++ b/debian/install
@@ -0,0 +1,3 @@
+images/    /usr/share/josm/
+styles/    /usr/share/josm/
+data/      /usr/share/josm/
diff --git a/debian/patches/06-move_data_out_of_jar.patch 
b/debian/patches/06-move_data_out_of_jar.patch
new file mode 100644
index 0000000..fb4a758
--- /dev/null
+++ b/debian/patches/06-move_data_out_of_jar.patch
@@ -0,0 +1,132 @@
+From: David Paleino <da...@debian.org>
+Subject: move sharable data out of josm.jar
+Origin: vendor
+Forwarded: not-needed
+
+---
+ build.xml                                                                     
 |    6 +++---
+ src/org/openstreetmap/josm/data/Preferences.java                              
 |    2 +-
+ src/org/openstreetmap/josm/data/projection/Projections.java                   
 |    2 +-
+ 
src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFileWrapper.java 
|    4 ++--
+ src/org/openstreetmap/josm/data/validation/tests/TagChecker.java              
 |    6 +++---
+ src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java               
 |    2 +-
+ src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java        
 |    4 ++--
+ src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java   
 |    2 +-
+ src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java                     
 |    2 +-
+ 9 files changed, 15 insertions(+), 15 deletions(-)
+
+--- josm.orig/build.xml
++++ josm/build.xml
+@@ -84,9 +84,9 @@ Debian-Release: ${debian.version}
+                               <attribute name="Debian-Release" 
value="${debian.version}"/>
+                               <attribute name="Class-Path" 
value="${classpathprop}"/>
+             </manifest>
+-            <zipfileset dir="images" prefix="images"/>
+-            <zipfileset dir="data" prefix="data"/>
+-            <zipfileset dir="styles" prefix="styles"/>
++            <!-- <zipfileset dir="images" prefix="images"/> -->
++            <!-- <zipfileset dir="data" prefix="data"/> -->
++            <!-- <zipfileset dir="styles" prefix="styles"/> -->
+             <zipfileset dir="src/org/openstreetmap/gui/jmapviewer/images" 
prefix="org/openstreetmap/gui/jmapviewer/images"/>
+             <!-- All jar files necessary to run only JOSM (no tests) -->
+             <!-- <zipfileset src="lib/metadata-extractor-2.3.1-nosun.jar"/>  
-->
+--- josm.orig/src/org/openstreetmap/josm/data/Preferences.java
++++ josm/src/org/openstreetmap/josm/data/Preferences.java
+@@ -1511,7 +1511,7 @@ public class Preferences {
+ 
+     public void validateXML(Reader in) throws Exception {
+         SchemaFactory factory =  
SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+-        Schema schema = factory.newSchema(new StreamSource(new 
MirroredInputStream("resource://data/preferences.xsd")));
++        Schema schema = factory.newSchema(new StreamSource(new 
MirroredInputStream("/usr/share/josm/data/preferences.xsd")));
+         Validator validator = schema.newValidator();
+         validator.validate(new StreamSource(in));
+     }
+--- josm.orig/src/org/openstreetmap/josm/data/projection/Projections.java
++++ josm/src/org/openstreetmap/josm/data/projection/Projections.java
+@@ -121,7 +121,7 @@ public class Projections {
+     private static void loadInits() {
+         Pattern epsgPattern = Pattern.compile("<(\\d+)>(.*)<>");
+         try {
+-            InputStream in = new MirroredInputStream("resource://data/epsg");
++            InputStream in = new 
MirroredInputStream("/usr/share/josm/data/epsg");
+             BufferedReader r = new BufferedReader(new InputStreamReader(in));
+             String line, lastline = "";
+             while ((line = r.readLine()) != null) {
+--- 
josm.orig/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
++++ 
josm/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
+@@ -317,7 +317,7 @@ public class TaggingPresetPreference imp
+ 
+         @Override
+         public Collection<ExtendedSourceEntry> getDefault() {
+-            ExtendedSourceEntry i = new 
ExtendedSourceEntry("defaultpresets.xml", "resource://data/defaultpresets.xml");
++            ExtendedSourceEntry i = new 
ExtendedSourceEntry("defaultpresets.xml", 
"/usr/share/josm/data/defaultpresets.xml");
+             i.title = tr("Internal Preset");
+             i.description = tr("The default preset for JOSM");
+             return Collections.singletonList(i);
+--- josm.orig/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
++++ josm/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
+@@ -68,9 +68,9 @@ import org.openstreetmap.josm.tools.Mult
+ public class TagChecker extends Test
+ {
+     /** The default data files */
+-    public static final String DATA_FILE = "resource://data/tagchecker.cfg";
+-    public static final String IGNORE_FILE = "resource://data/ignoretags.cfg";
+-    public static final String SPELL_FILE = "resource://data/words.cfg";
++    public static final String DATA_FILE = 
"/usr/share/josm/data/tagchecker.cfg";
++    public static final String IGNORE_FILE = 
"/usr/share/josm/data/ignoretags.cfg";
++    public static final String SPELL_FILE = "/usr/share/josm/data/words.cfg";
+ 
+     /** The spell check key substitutions: the key should be substituted by 
the value */
+     protected static Map<String, String> spellCheckKeyData;
+--- 
josm.orig/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java
++++ josm/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java
+@@ -237,12 +237,12 @@ public class MapPaintPreference implemen
+ 
+         @Override
+         public Collection<ExtendedSourceEntry> getDefault() {
+-            ExtendedSourceEntry defJOSM = new 
ExtendedSourceEntry("elemstyles.xml", 
"resource://styles/standard/elemstyles.xml");
++            ExtendedSourceEntry defJOSM = new 
ExtendedSourceEntry("elemstyles.xml", 
"/usr/share/josm/styles/standard/elemstyles.xml");
+             defJOSM.active = true;
+             defJOSM.name = "standard";
+             defJOSM.title = tr("JOSM Internal Style");
+             defJOSM.description = tr("Internal style to be used as base for 
runtime switchable overlay styles");
+-            ExtendedSourceEntry defPL2 = new 
ExtendedSourceEntry("potlatch2.mapcss", 
"resource://styles/standard/potlatch2.mapcss");
++            ExtendedSourceEntry defPL2 = new 
ExtendedSourceEntry("potlatch2.mapcss", 
"/usr/share/josm/styles/standard/potlatch2.mapcss");
+             defPL2.active = false;
+             defPL2.name = "standard";
+             defPL2.title = tr("Potlatch 2");
+--- 
josm.orig/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFileWrapper.java
++++ 
josm/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFileWrapper.java
+@@ -15,8 +15,8 @@ import org.openstreetmap.josm.io.Mirrore
+  */
+ public class NTV2GridShiftFileWrapper {
+ 
+-    public final static NTV2GridShiftFileWrapper BETA2007 = new 
NTV2GridShiftFileWrapper("resource://data/BETA2007.gsb");
+-    public final static NTV2GridShiftFileWrapper ntf_rgf93 = new 
NTV2GridShiftFileWrapper("resource://data/ntf_r93_b.gsb");
++    public final static NTV2GridShiftFileWrapper BETA2007 = new 
NTV2GridShiftFileWrapper("/usr/share/josm/data/BETA2007.gsb");
++    public final static NTV2GridShiftFileWrapper ntf_rgf93 = new 
NTV2GridShiftFileWrapper("/usr/share/josm/data/ntf_r93_b.gsb");
+     
+ 
+     private NTV2GridShiftFile instance = null;
+--- josm.orig/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
++++ josm/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
+@@ -70,7 +70,7 @@ public class XmlStyleSource extends Styl
+             XmlObjectParser parser = new XmlObjectParser(new 
XmlStyleSourceHandler(this));
+             parser.startWithValidation(reader,
+                     "http://josm.openstreetmap.de/mappaint-style-1.0";,
+-                    "resource://data/mappaint-style.xsd");
++                    "/usr/share/josm/data/mappaint-style.xsd");
+             while(parser.hasNext()) {
+             }
+ 
+--- josm.orig/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
++++ josm/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
+@@ -1411,7 +1411,7 @@ public class TaggingPreset extends Abstr
+         List<PresetListEntry> listEntries = new LinkedList<PresetListEntry>();
+ 
+         if (validate) {
+-            parser.startWithValidation(in, 
"http://josm.openstreetmap.de/tagging-preset-1.0";, 
"resource://data/tagging-preset.xsd");
++            parser.startWithValidation(in, 
"http://josm.openstreetmap.de/tagging-preset-1.0";, 
"/usr/share/josm/data/tagging-preset.xsd");
+         } else {
+             parser.start(in);
+         }
diff --git a/debian/patches/series b/debian/patches/series
index d6554b6..320864c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,6 +2,6 @@
 01-bts.patch
 02-elemstyles.patch
 03-default_look_and_feel.patch
-04-fix_images.patch
 05-fix_version.patch
 #100-fix_SlippyMapBBoxChooser.patch
+06-move_data_out_of_jar.patch

-- 
Editor for OpenStreetMap

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

Reply via email to