[geogebra] 03/03: Update patches.

Giovanni Mascellani gio at moszumanska.debian.org
Tue Aug 5 20:22:07 UTC 2014


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

gio pushed a commit to branch build
in repository geogebra.

commit ce25c58e787deee32aeda936c255ded1978e4f31
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Tue Aug 5 22:17:01 2014 +0200

    Update patches.
---
 debian/patches/patch/ScientificFormat.java.diff    |   2 +-
 debian/patches/patch/applet_export.diff            |   2 +-
 debian/patches/patch/no_mac.diff                   |   4 +-
 .../patch/use_apache_commons_collections.diff      | 170 +++++++++++++++++++++
 debian/patches/patch/version.diff                  |  10 +-
 debian/patches/series                              |   1 +
 6 files changed, 180 insertions(+), 9 deletions(-)

diff --git a/debian/patches/patch/ScientificFormat.java.diff b/debian/patches/patch/ScientificFormat.java.diff
index 2af9a1e..6a51c53 100644
--- a/debian/patches/patch/ScientificFormat.java.diff
+++ b/debian/patches/patch/ScientificFormat.java.diff
@@ -6,7 +6,7 @@ Little fix to an API glitch with FreeHEP
 Signed-off-by: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
 
 ---
- geogebra/util/ScientificFormat.java |    8 ++++----
+ geogebra/util/ScientificFormat.java | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/geogebra/util/ScientificFormat.java b/geogebra/util/ScientificFormat.java
diff --git a/debian/patches/patch/applet_export.diff b/debian/patches/patch/applet_export.diff
index 67e56ea..357fbfd 100644
--- a/debian/patches/patch/applet_export.diff
+++ b/debian/patches/patch/applet_export.diff
@@ -7,7 +7,7 @@ by the upstream site (which have embedded dependencies).
 Signed-off-by: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
 
 ---
- geogebra/export/WorksheetExportDialog.java |    9 +++++++--
+ geogebra/export/WorksheetExportDialog.java | 9 +++++++--
  1 file changed, 7 insertions(+), 2 deletions(-)
 
 diff --git a/geogebra/export/WorksheetExportDialog.java b/geogebra/export/WorksheetExportDialog.java
diff --git a/debian/patches/patch/no_mac.diff b/debian/patches/patch/no_mac.diff
index 6b7cec9..9e3befc 100644
--- a/debian/patches/patch/no_mac.diff
+++ b/debian/patches/patch/no_mac.diff
@@ -6,8 +6,8 @@ Removes Mac OS X specific code.
 Signed-off-by: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
 
 ---
- geogebra/gui/app/GeoGebraFrame.java          |   10 ---
- geogebra/gui/app/MacApplicationListener.java |  101 --------------------------
+ geogebra/gui/app/GeoGebraFrame.java          |  10 ---
+ geogebra/gui/app/MacApplicationListener.java | 101 ---------------------------
  2 files changed, 111 deletions(-)
 
 diff --git a/geogebra/gui/app/GeoGebraFrame.java b/geogebra/gui/app/GeoGebraFrame.java
diff --git a/debian/patches/patch/use_apache_commons_collections.diff b/debian/patches/patch/use_apache_commons_collections.diff
new file mode 100644
index 0000000..bdbe481
--- /dev/null
+++ b/debian/patches/patch/use_apache_commons_collections.diff
@@ -0,0 +1,170 @@
+From: Emmanuel Bourg <ebourg at apache.org>
+Subject: [PATCH] patch/use_apache_commons_collections
+Forwarded: not-needed
+
+Replaces collections15 with commons-collections.
+
+---
+ .../ics/jung/algorithms/shortestpath/DijkstraDistance.java   | 12 ++++++------
+ .../jung/algorithms/shortestpath/DijkstraShortestPath.java   |  6 +++---
+ edu/uci/ics/jung/algorithms/util/MapBinaryHeap.java          |  4 ++--
+ edu/uci/ics/jung/graph/SparseMultigraph.java                 |  6 +++---
+ geogebra/kernel/discrete/AlgoShortestDistance.java           |  8 ++++----
+ 5 files changed, 18 insertions(+), 18 deletions(-)
+
+diff --git a/edu/uci/ics/jung/algorithms/shortestpath/DijkstraDistance.java b/edu/uci/ics/jung/algorithms/shortestpath/DijkstraDistance.java
+index a91ed89..7a44e96 100644
+--- a/edu/uci/ics/jung/algorithms/shortestpath/DijkstraDistance.java
++++ b/edu/uci/ics/jung/algorithms/shortestpath/DijkstraDistance.java
+@@ -19,8 +19,8 @@ import java.util.LinkedHashMap;
+ import java.util.Map;
+ import java.util.Set;
+ 
+-import org.apache.commons.collections15.Transformer;
+-import org.apache.commons.collections15.functors.ConstantTransformer;
++import org.apache.commons.collections.Transformer;
++import org.apache.commons.collections.functors.ConstantTransformer;
+ 
+ import edu.uci.ics.jung.algorithms.util.BasicMapEntry;
+ import edu.uci.ics.jung.algorithms.util.MapBinaryHeap;
+@@ -65,7 +65,7 @@ import edu.uci.ics.jung.graph.Hypergraph;
+ public class DijkstraDistance<V,E> implements Distance<V>
+ {
+     protected Hypergraph<V,E> g;
+-    protected Transformer<E,? extends Number> nev;
++    protected Transformer/*<E,? extends Number>*/ nev;
+     protected Map<V,SourceData> sourceMap;   // a map of source vertices to an instance of SourceData
+     protected boolean cached;
+     protected double max_distance;
+@@ -81,7 +81,7 @@ public class DijkstraDistance<V,E> implements Distance<V>
+      * @param nev   the class responsible for returning weights for edges
+      * @param cached    specifies whether the results are to be cached
+      */
+-    public DijkstraDistance(Hypergraph<V,E> g, Transformer<E,? extends Number> nev, boolean cached) {
++    public DijkstraDistance(Hypergraph<V,E> g, Transformer/*<E,? extends Number>*/ nev, boolean cached) {
+         this.g = g;
+         this.nev = nev;
+         this.sourceMap = new HashMap<V,SourceData>();
+@@ -98,7 +98,7 @@ public class DijkstraDistance<V,E> implements Distance<V>
+      * @param g     the graph on which distances will be calculated
+      * @param nev   the class responsible for returning weights for edges
+      */
+-    public DijkstraDistance(Hypergraph<V,E> g, Transformer<E,? extends Number> nev) {
++    public DijkstraDistance(Hypergraph<V,E> g, Transformer/*<E,? extends Number>*/ nev) {
+         this(g, nev, true);
+     }
+     
+@@ -198,7 +198,7 @@ public class DijkstraDistance<V,E> implements Distance<V>
+                 {
+                     if (!sd.distances.containsKey(w))
+                     {
+-                        double edge_weight = nev.transform(e).doubleValue();
++                        double edge_weight = ((Number) nev.transform(e)).doubleValue();
+                         if (edge_weight < 0)
+                             throw new IllegalArgumentException("Edges weights must be non-negative");
+                         double new_dist = v_dist + edge_weight;
+diff --git a/edu/uci/ics/jung/algorithms/shortestpath/DijkstraShortestPath.java b/edu/uci/ics/jung/algorithms/shortestpath/DijkstraShortestPath.java
+index 749cf0b..b224843 100644
+--- a/edu/uci/ics/jung/algorithms/shortestpath/DijkstraShortestPath.java
++++ b/edu/uci/ics/jung/algorithms/shortestpath/DijkstraShortestPath.java
+@@ -17,7 +17,7 @@ import java.util.List;
+ import java.util.Map;
+ import java.util.Set;
+ 
+-import org.apache.commons.collections15.Transformer;
++import org.apache.commons.collections.Transformer;
+ 
+ import edu.uci.ics.jung.graph.Graph;
+ 
+@@ -47,7 +47,7 @@ public class DijkstraShortestPath<V,E> extends DijkstraDistance<V,E> implements
+      * @param nev   the class responsible for returning weights for edges
+      * @param cached    specifies whether the results are to be cached
+      */
+-    public DijkstraShortestPath(Graph<V,E> g, Transformer<E, ? extends Number> nev, boolean cached)
++    public DijkstraShortestPath(Graph<V,E> g, Transformer/*<E, ? extends Number>*/ nev, boolean cached)
+     {
+         super(g, nev, cached);
+     }
+@@ -60,7 +60,7 @@ public class DijkstraShortestPath<V,E> extends DijkstraDistance<V,E> implements
+      * @param g     the graph on which distances will be calculated
+      * @param nev   the class responsible for returning weights for edges
+      */
+-    public DijkstraShortestPath(Graph<V,E> g, Transformer<E, ? extends Number> nev)
++    public DijkstraShortestPath(Graph<V,E> g, Transformer/*<E, ? extends Number>*/ nev)
+     {
+         super(g, nev);
+     }
+diff --git a/edu/uci/ics/jung/algorithms/util/MapBinaryHeap.java b/edu/uci/ics/jung/algorithms/util/MapBinaryHeap.java
+index bd00a82..cac619e 100644
+--- a/edu/uci/ics/jung/algorithms/util/MapBinaryHeap.java
++++ b/edu/uci/ics/jung/algorithms/util/MapBinaryHeap.java
+@@ -23,7 +23,7 @@ import java.util.NoSuchElementException;
+ import java.util.Queue;
+ import java.util.Vector;
+ 
+-import org.apache.commons.collections15.IteratorUtils;
++import org.apache.commons.collections.IteratorUtils;
+ 
+ /**
+  * An array-based binary heap implementation of a priority queue, 
+@@ -317,7 +317,7 @@ public class MapBinaryHeap<T>
+     @Override
+     public Iterator<T> iterator()
+     {
+-        return IteratorUtils.<T>unmodifiableIterator(heap.iterator());
++        return (Iterator<T>) IteratorUtils.unmodifiableIterator(heap.iterator());
+     }
+ 
+     /**
+diff --git a/edu/uci/ics/jung/graph/SparseMultigraph.java b/edu/uci/ics/jung/graph/SparseMultigraph.java
+index f2d2b63..2527366 100644
+--- a/edu/uci/ics/jung/graph/SparseMultigraph.java
++++ b/edu/uci/ics/jung/graph/SparseMultigraph.java
+@@ -18,7 +18,7 @@ import java.util.HashSet;
+ import java.util.Map;
+ import java.util.Set;
+ 
+-import org.apache.commons.collections15.Factory;
++import org.apache.commons.collections.Factory;
+ 
+ import edu.uci.ics.jung.graph.util.EdgeType;
+ import edu.uci.ics.jung.graph.util.Pair;
+@@ -37,8 +37,8 @@ public class SparseMultigraph<V,E>
+      * @param <V> the vertex type for the graph factory
+      * @param <E> the edge type for the graph factory
+      */
+-	public static <V,E> Factory<Graph<V,E>> getFactory() { 
+-		return new Factory<Graph<V,E>> () {
++	public static <V,E> Factory/*<Graph<V,E>>*/ getFactory() { 
++		return new Factory/*<Graph<V,E>>*/ () {
+ 			public Graph<V,E> create() {
+ 				return new SparseMultigraph<V,E>();
+ 			}
+diff --git a/geogebra/kernel/discrete/AlgoShortestDistance.java b/geogebra/kernel/discrete/AlgoShortestDistance.java
+index f25582d..afccb65 100644
+--- a/geogebra/kernel/discrete/AlgoShortestDistance.java
++++ b/geogebra/kernel/discrete/AlgoShortestDistance.java
+@@ -17,7 +17,7 @@ import java.util.ArrayList;
+ import java.util.HashMap;
+ import java.util.List;
+ 
+-import org.apache.commons.collections15.Transformer;
++import org.apache.commons.collections.Transformer;
+ 
+ public class AlgoShortestDistance extends AlgoElement {
+ 	
+@@ -122,9 +122,9 @@ public class AlgoShortestDistance extends AlgoElement {
+         if (weighted.getBoolean() == true) {
+         	//weighted Shortest Path
+         	// use length of segments to weight
+-	        Transformer<MyLink, Double> wtTransformer = new Transformer<MyLink,Double>() {
+-	        	public Double transform(MyLink link) {
+-	        	return link.weight;
++	        Transformer/*<MyLink, Double>*/ wtTransformer = new Transformer/*<MyLink,Double>*/() {
++	        	public Double transform(Object link) {
++	        	return ((MyLink) link).weight;
+ 	        	}
+ 	        	};
+         	alg = new DijkstraShortestPath<MyNode, MyLink>(g, wtTransformer);
+-- 
+tg: (fd258d5..) patch/use_apache_commons_collections (depends on: master)
diff --git a/debian/patches/patch/version.diff b/debian/patches/patch/version.diff
index 282f53e..ad5b453 100644
--- a/debian/patches/patch/version.diff
+++ b/debian/patches/patch/version.diff
@@ -8,11 +8,11 @@ he's using an old version of GeoGebra.
 Signed-off-by: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
 
 ---
- geogebra/GeoGebra.java                    |    2 ++
- geogebra/GeoGebraAppletPreloader.java     |    3 ++-
- geogebra/gui/app/GeoGebraFrame.java       |    7 -------
- geogebra/gui/menubar/GeoGebraMenuBar.java |    4 +++-
- geogebra/main/Application.java            |    3 ++-
+ geogebra/GeoGebra.java                    | 2 ++
+ geogebra/GeoGebraAppletPreloader.java     | 3 ++-
+ geogebra/gui/app/GeoGebraFrame.java       | 7 -------
+ geogebra/gui/menubar/GeoGebraMenuBar.java | 4 +++-
+ geogebra/main/Application.java            | 3 ++-
  5 files changed, 9 insertions(+), 10 deletions(-)
 
 diff --git a/geogebra/GeoGebra.java b/geogebra/GeoGebra.java
diff --git a/debian/patches/series b/debian/patches/series
index e3ff3e8..d7112eb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ patch/ScientificFormat.java.diff -p1
 patch/applet_export.diff -p1
 patch/no_mac.diff -p1
 patch/version.diff -p1
+patch/use_apache_commons_collections.diff -p1

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/geogebra.git



More information about the pkg-java-commits mailing list