[SCM] GeoGebra: Dynamic mathematics software for education branch, eclipse, updated. debian/3.2.42.0+dfsg1-1-62-g6f60072

Giovanni Mascellani gio at alioth.debian.org
Fri Jul 23 19:26:19 UTC 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GeoGebra: Dynamic mathematics software for education".

The branch, eclipse has been updated
       via  6f60072d2b45065ec8579e593f5e82eb83f707ae (commit)
       via  3c1588a550d100fc83f73a4d9c2782785c9f4ee6 (commit)
       via  b75fe806f95f6de19c15793ef6cf19449692d09b (commit)
       via  debc6796017830fb0931e7bde62ac49e784d5fab (commit)
       via  b47802034b2965ce39870f07ff4727fcf9fcf3c6 (commit)
       via  c3d1d44c24ca78e13871c79cd07010b3b02a491f (commit)
       via  3ccd011b16bca9fca800f7c18b4356cfa4d0e845 (commit)
       via  102dc2610afe5c9621b5bdf30b7a93849cac522d (commit)
       via  80ccac7dd8b3292a1a4f0e4cc23f087ff396db31 (commit)
       via  dd4c7b415371eb0cc3609fe8ed0d66c042ba3c76 (commit)
       via  0b6cb2cb4eaf1a93ee682c04773117cee6da4240 (commit)
       via  8845b13153a23e551d88e8924177bdcaaf7b2e51 (commit)
       via  900a03e1b739417b97ce3f89c010fc2a3c039bf8 (commit)
       via  98c802194466d182c2d04b93de0759b286f74af4 (commit)
       via  bcb529e00ac89cf5d89932172a88f39fe6bbf54c (commit)
       via  fec65535eeac87083e9aa08c4b6165b5a5afa5b0 (commit)
       via  2c8ae9217f09210920011c8ea626ab54e9734c30 (commit)
       via  f061233314642812c9e556539dd688fdc65f807d (commit)
       via  638ec6a4509ba2feb4656367aeb6ce7c9674bb3a (commit)
       via  9765ca6ca34ad487b5ec2ede21e6267309f06e7b (commit)
       via  1e796f59ef4ef7ada8426cccd281f6aba821595c (commit)
       via  6d6be1c05f816787d4e1f3d5ffd494cd6edde0db (commit)
       via  1e6de0192b23b204354e43c6d828082148d6b0f5 (commit)
       via  d6a2a26124d65e23136154e14dd3a4fb686b8fec (commit)
       via  b474679da829af8f1491e6f43144cc7b6d177d47 (commit)
       via  ed22c0ab63740427d5fa4d99507f0d153e119d3b (commit)
       via  f29dd655fd676913f66ffdc57de344a72ce7681c (commit)
       via  5ba78c0a46567b13b856917d6cfa4c3b5d2c8351 (commit)
       via  5db07a5b54cc3726e0f4767d27ff1bcd8cf89dc8 (commit)
       via  6dd3466d60b66180dbb1e5586208cc242e96d333 (commit)
       via  5de7415e59576fa37203c6a345a7728c2fc8e23a (commit)
       via  7ff37497b073b1c60662995a39863a59ec32d143 (commit)
       via  0fe10d987d2d82cee19edbe6b8893ff7b0c636a2 (commit)
       via  cbaff4deb04fb48336b72243e7894ad466e06ae8 (commit)
       via  705ca2ce15c130ac7b345491b3fa3549235df823 (commit)
       via  d6ddad6f4a48f851dd0a0e307007442b2ec812ca (commit)
       via  44d40b15c8ac1b7464ec3b07c39a1f27fbad6085 (commit)
       via  bfa1a8fbf297669caa58e19778bcda449320e3de (commit)
       via  e0efc72adb961c74a25a239ba4ea00e7fd46dd33 (commit)
       via  86e5a0384e3ab218fc3f619f306921544c1245af (commit)
       via  9408e84590fd484390ca820a2038ee269ee6245b (commit)
       via  1fede02587f02d55f541838b8a81176076141722 (commit)
       via  8163477d074f967ada800a0668a8296576b7f83a (commit)
       via  688070e49303c7493a2322781cdf783e8bbcfa42 (commit)
       via  ca13f2af54f374faa01b9cbc5d6e863d1fe29ac4 (commit)
       via  925828ed7228bba45f597568816e3fdd9838c7a0 (commit)
       via  c578fc6f3feae1bcf5fe5603996f3d649e99e719 (commit)
       via  bf4f7452fd1437d5fecb4740236e6f32948dec9a (commit)
       via  74213534e6825026a047751f9db40dfe113a3612 (commit)
       via  d8f2644802a6368763c777cfb71203ca5c7acd8c (commit)
       via  d5d8c02cbab10fc7c39caa4bb56fd3ecf8c6d61e (commit)
       via  41ab2269e593e430e8f3e58500f94571e6f408dc (commit)
       via  60d0b4c6a64f89e2991827b72246e214b1ad30d6 (commit)
       via  702805d8159fd4718883442b2d9546ea2fe038b3 (commit)
       via  896662c98904495fe23dc54a9b14c399d75a4f55 (commit)
       via  1991d95d8dfbecd23938a3662fd5b5d9b7e2bba2 (commit)
       via  f8af552366a1de23183f0fec3a0e817563d49e78 (commit)
       via  54f78a34c4b8a8c08af287053aecd38634062b4a (commit)
       via  6d989cce136b14b2071983ea38a130f99511d37c (commit)
      from  ba6fb7df8f990f555c099fcadaea423e6307bcc7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6f60072d2b45065ec8579e593f5e82eb83f707ae
Merge: debc679 3c1588a
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 12:36:25 2010 +0200

    Merge branch 'patch/flanagan_nonfree' into eclipse

commit debc6796017830fb0931e7bde62ac49e784d5fab
Merge: b478020 ba6fb7d
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 10:34:39 2010 +0200

    Merge branch 'eclipse' into new-eclipse

commit b47802034b2965ce39870f07ff4727fcf9fcf3c6
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 10:33:53 2010 +0200

    Removed 1.4 source code level

commit c3d1d44c24ca78e13871c79cd07010b3b02a491f
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 10:32:23 2010 +0200

    *.class files ignored

commit 3ccd011b16bca9fca800f7c18b4356cfa4d0e845
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 10:31:38 2010 +0200

    Files generated by javacc added

commit 102dc2610afe5c9621b5bdf30b7a93849cac522d
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 10:29:23 2010 +0200

    Classpath for Eclipse fixed

commit 80ccac7dd8b3292a1a4f0e4cc23f087ff396db31
Merge: dd4c7b4 9765ca6
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 10:23:56 2010 +0200

    Merge branch 'patch/no_mac' into new-eclipse

commit dd4c7b415371eb0cc3609fe8ed0d66c042ba3c76
Merge: 0b6cb2c f061233
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 10:23:53 2010 +0200

    Merge branch 'patch/jama' into new-eclipse

commit 0b6cb2cb4eaf1a93ee682c04773117cee6da4240
Merge: 8845b13 638ec6a
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 10:23:41 2010 +0200

    Merge branch 'patch/flanagan_nonfree' into new-eclipse

commit 8845b13153a23e551d88e8924177bdcaaf7b2e51
Merge: 900a03e 1e796f5
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 10:23:21 2010 +0200

    Merge branch 'patch/ScientificFormat.java' into new-eclipse

commit 900a03e1b739417b97ce3f89c010fc2a3c039bf8
Merge: 98c8021 2c8ae92
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 10:23:10 2010 +0200

    Merge branch 'patch/build.xml' into new-eclipse

commit 98c802194466d182c2d04b93de0759b286f74af4
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Mon Jul 19 11:48:33 2010 +0200

    Better branch description

commit bcb529e00ac89cf5d89932172a88f39fe6bbf54c
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Mon Jul 19 11:46:09 2010 +0200

    Added branch description

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                                         |    1 +
 .settings/org.eclipse.ltk.core.refactoring.prefs   |    3 -
 .topdeps                                           |    1 +
 .topmsg                                            |    6 +
 build.pro                                          |   12 +-
 build.xml                                          |    2 +-
 debian/README.source                               |    3 +
 debian/TODO                                        |    3 +
 debian/changelog                                   |    6 +
 debian/patches/patch/ScientificFormat.java.diff    |   45 --
 debian/patches/patch/build.xml.diff                |  420 --------------
 debian/patches/patch/flanagan_nonfree.diff         |  588 --------------------
 debian/patches/patch/jama.diff                     |  184 ------
 debian/patches/patch/no_mac.diff                   |  166 ------
 debian/patches/series                              |    5 -
 geogebra/GeoGebra.java                             |    5 +-
 geogebra/cas/GeoGebraCAS.java                      |    3 +-
 geogebra/euclidian/DrawRay.java                    |   43 +-
 geogebra/euclidian/EuclidianController.java        |    2 +
 geogebra/gui/ContextMenuGeoElement.java            |    6 +-
 geogebra/gui/PropertiesDialogGeoElement.java       |    1 +
 geogebra/gui/TextInputDialog.java                  |    4 +-
 geogebra/gui/menubar/MenubarImpl.java              |   34 +-
 geogebra/kernel/AlgoAppend.java                    |    2 +-
 geogebra/kernel/AlgoBinomial.java                  |    2 +-
 geogebra/kernel/AlgoDefined.java                   |    2 +-
 geogebra/kernel/AlgoDeterminant.java               |    2 +-
 geogebra/kernel/AlgoExpand.java                    |    2 +-
 geogebra/kernel/AlgoFactor.java                    |    2 +-
 geogebra/kernel/AlgoFirst.java                     |    2 +-
 geogebra/kernel/AlgoGCD.java                       |    2 +-
 geogebra/kernel/AlgoInsert.java                    |    2 +-
 geogebra/kernel/AlgoIntegralDefinite.java          |   25 +-
 geogebra/kernel/AlgoIntersection.java              |    2 +-
 geogebra/kernel/AlgoInvert.java                    |    2 +-
 geogebra/kernel/AlgoIsInteger.java                 |    2 +-
 geogebra/kernel/AlgoJoin.java                      |    2 +-
 geogebra/kernel/AlgoKeepIf.java                    |    2 +-
 geogebra/kernel/AlgoLCM.java                       |    2 +-
 geogebra/kernel/AlgoLast.java                      |    2 +-
 geogebra/kernel/AlgoListGCD.java                   |    2 +-
 geogebra/kernel/AlgoListLCM.java                   |    2 +-
 geogebra/kernel/AlgoPolynomialFromCoordinates.java |    2 +-
 geogebra/kernel/AlgoPolynomialFromFunction.java    |    2 +-
 geogebra/kernel/AlgoRemoveUndefined.java           |    2 +-
 geogebra/kernel/AlgoReverse.java                   |    2 +-
 geogebra/kernel/AlgoRootNewton.java                |   56 +-
 geogebra/kernel/AlgoRootsPolynomial.java           |    6 +-
 geogebra/kernel/AlgoSimplify.java                  |    2 +-
 geogebra/kernel/AlgoSort.java                      |    2 +-
 geogebra/kernel/AlgoTake.java                      |    2 +-
 geogebra/kernel/AlgoTranspose.java                 |    2 +-
 geogebra/kernel/AlgoUnion.java                     |    2 +-
 geogebra/kernel/EquationSolver.java                |   36 +-
 geogebra/kernel/GeoElement.java                    |   20 +-
 geogebra/kernel/GeoList.java                       |    5 +-
 geogebra/kernel/GeoPolygon.java                    |    2 +-
 geogebra/kernel/Kernel.java                        |   10 +-
 geogebra/kernel/arithmetic/Function.java           |    8 +
 geogebra/kernel/arithmetic/PolyFunction.java       |    4 +
 geogebra/kernel/parser/Parser.jj                   |    2 +-
 geogebra/kernel/parser/ParserTokenManager.java     |    2 +-
 geogebra/kernel/roots/RealRootAdapter.java         |    6 +-
 geogebra/kernel/roots/RealRootDerivAdapter.java    |   36 ++
 geogebra/kernel/roots/RealRootDerivFunction.java   |    2 +
 geogebra/kernel/statistics/AlgoFitLineX.java       |    2 +-
 geogebra/kernel/statistics/AlgoFitLineY.java       |    2 +-
 geogebra/kernel/statistics/AlgoInverseNormal.java  |    2 +-
 geogebra/kernel/statistics/AlgoMedian.java         |    2 +-
 geogebra/kernel/statistics/AlgoMode.java           |    2 +-
 geogebra/kernel/statistics/AlgoNormal.java         |    2 +-
 geogebra/kernel/statistics/AlgoQ1.java             |    2 +-
 geogebra/kernel/statistics/AlgoQ3.java             |    2 +-
 geogebra/kernel/statistics/AlgoRandom.java         |    2 +-
 geogebra/kernel/statistics/AlgoRandomBinomial.java |    2 +-
 geogebra/kernel/statistics/AlgoRandomNormal.java   |    2 +-
 geogebra/kernel/statistics/AlgoRandomPoisson.java  |    2 +-
 geogebra/main/Application.java                     |   61 ++-
 unix/debcontrol/postinst                           |   22 +
 unix/debcontrol/postrm                             |   16 +
 unix/debrelease/Packages                           |   21 +
 unix/debrelease/Release                            |   10 +
 unix/usr/bin/geogebra                              |    4 +
 unix/usr/bin/ggthumb                               |   13 +
 unix/usr/share/applications/geogebra.desktop       |   24 +
 unix/usr/share/doc/geogebra/README.Debian          |    8 +
 unix/usr/share/doc/geogebra/changelog.gz           |  Bin 0 -> 152 bytes
 unix/usr/share/doc/geogebra/copyright              |   36 ++
 unix/usr/share/gconf/defaults/10_geogebra          |    3 +
 .../share/icons/hicolor/48x48/apps/geogebra.png    |  Bin 0 -> 4489 bytes
 .../mimetypes/application-vnd.geogebra.file.png    |  Bin 0 -> 4489 bytes
 .../mimetypes/application-vnd.geogebra.tool.png    |  Bin 0 -> 4489 bytes
 unix/usr/share/man/man1/geogebra.1.gz              |  Bin 0 -> 613 bytes
 unix/usr/share/man/man1/ggthumb.1.gz               |  Bin 0 -> 435 bytes
 unix/usr/share/mime/packages/geogebra.xml          |   25 +
 unix/usr/share/pixmaps/geogebra.png                |  Bin 0 -> 4489 bytes
 96 files changed, 495 insertions(+), 1589 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6b468b6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*.class
diff --git a/.settings/org.eclipse.ltk.core.refactoring.prefs b/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index 62ba1b0..0000000
--- a/.settings/org.eclipse.ltk.core.refactoring.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Jul 19 10:58:40 CEST 2010
-eclipse.preferences.version=1
-org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/.topdeps b/.topdeps
new file mode 100644
index 0000000..1f7391f
--- /dev/null
+++ b/.topdeps
@@ -0,0 +1 @@
+master
diff --git a/.topmsg b/.topmsg
new file mode 100644
index 0000000..99a7686
--- /dev/null
+++ b/.topmsg
@@ -0,0 +1,6 @@
+From: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
+Subject: [PATCH] patch/build.xml
+
+Fixes the build.xml for just building GeoGebra.
+
+Signed-off-by: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
diff --git a/build.pro b/build.pro
index ce90ee5..69469b4 100644
--- a/build.pro
+++ b/build.pro
@@ -3,13 +3,13 @@
 #
 # Oct 23rd 2008
 #
--injars ../build/geogebra.jar
--injars ../build/geogebra_main.jar
--injars ../build/geogebra_gui.jar
--injars ../build/geogebra_export.jar
--injars ../build/geogebra_cas.jar
+-injars ../buildggb32/geogebra.jar
+-injars ../buildggb32/geogebra_main.jar
+-injars ../buildggb32/geogebra_gui.jar
+-injars ../buildggb32/geogebra_export.jar
+-injars ../buildggb32/geogebra_cas.jar
 
--outjars ../build/temp
+-outjars ../buildggb32/temp
 
 -libraryjars ../java142-rt.jar
 -libraryjars netscape_javascript.jar
diff --git a/build.xml b/build.xml
index 1cff9bc..b6749ba 100644
--- a/build.xml
+++ b/build.xml
@@ -100,7 +100,7 @@ office at geogebra.org
 		<mkdir dir="${build.dir}/unsigned/unpacked"/>
 		<mkdir dir="${propertiestemp.dir}"/>
 		<delete>
-		    <fileset dir="${build.dir}" includes="**/geogebra*.jar, **/gluegen-rt.jar, **/jogl.jar, **/jlatexmath.jar ,**/*.jar.pack.gz, **/*.html"/>
+		    <fileset dir="${build.dir}" includes="**/geogebra*.jar, **/gluegen-rt.jar, **/jogl.jar, **/jlatexmath.jar, **/jlm_*.jar,**/*.jar.pack.gz, **/*.html"/>
 		</delete>		
 	</target>
 
diff --git a/debian/README.source b/debian/README.source
index 60f0303..6362e72 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -17,6 +17,9 @@ and then:
    doesn't allow commercial use).
  * Deleting the org/ directory, which contains copies of other software
    already package in Debian (which is used instead of the embedded copy).
+ * Deleting the geogebra/kernel/jama/ directory, except
+   the geogebra/kernel/jama/GgbMat.java file, which is a copy of
+   another software already in Debian.
 
 
 QUILT
diff --git a/debian/TODO b/debian/TODO
index 922a5dc..769e324 100644
--- a/debian/TODO
+++ b/debian/TODO
@@ -1,2 +1,5 @@
  * verify exportable JARs
  * add a menu entry
+ * check jama patch (inverse of a singular matrix)
+ * additional patch provided by Markus
+ * additional resources in http://groups.google.com/group/geogebra-dev/browse_thread/thread/77c6736ed48688ae
diff --git a/debian/changelog b/debian/changelog
index 8e8bd71..df59793 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+geogebra (3.2.43.0+dfsg1-1) unstable; urgency=low
+
+  * New upstream release (mostly bugfixes).
+
+ -- Giovanni Mascellani <gio at debian.org>  Fri, 23 Jul 2010 10:02:58 +0200
+
 geogebra (3.2.42.0+dfsg1-1) unstable; urgency=low
 
   * Initial release (Closes: #505704)
diff --git a/debian/patches/patch/ScientificFormat.java.diff b/debian/patches/patch/ScientificFormat.java.diff
deleted file mode 100644
index 355f37d..0000000
--- a/debian/patches/patch/ScientificFormat.java.diff
+++ /dev/null
@@ -1,45 +0,0 @@
-From: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
-Subject: [PATCH] patch/ScientificFormat.java
-
-Little fix to an API glitch with FreeHEP
-
-Signed-off-by: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
-
----
- geogebra/util/ScientificFormat.java |    8 ++++----
- 1 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/geogebra/util/ScientificFormat.java b/geogebra/util/ScientificFormat.java
-index e9fb8c9..d903341 100644
---- a/geogebra/util/ScientificFormat.java
-+++ b/geogebra/util/ScientificFormat.java
-@@ -70,17 +70,17 @@ public class ScientificFormat extends Format
-          toAppendTo.append(format(dwe.getValue()));
-          if (dwe.hasAsymmetricError())
-          {
--            toAppendTo.append(DoubleWithError.plus);
-+            toAppendTo.append('+');
-             int errorSigDigit = resolveErrorSigDigit(dwe.getValue(),dwe.getPlusError());
-             toAppendTo.append(format(dwe.getPlusError(),errorSigDigit));
-             
--            toAppendTo.append(DoubleWithError.minus);
-+            toAppendTo.append('-');
-             errorSigDigit = resolveErrorSigDigit(dwe.getValue(),dwe.getMinError());
-             toAppendTo.append(format(dwe.getMinError(),errorSigDigit));
-          }
-          else
-          {
--            toAppendTo.append(DoubleWithError.plusorminus);
-+            toAppendTo.append('\u00b1');
-             int errorSigDigit = resolveErrorSigDigit(dwe.getValue(),dwe.getError());
-             toAppendTo.append(format(dwe.getError(),errorSigDigit));
-          }
-@@ -238,4 +238,4 @@ public class ScientificFormat extends Format
- //      return format(dx, resolveErrorSigDigit(d, dx));
- //   }
- 
--}
-\ No newline at end of file
-+}
--- 
-tg: (b5e82e7..) patch/ScientificFormat.java (depends on: master)
diff --git a/debian/patches/patch/build.xml.diff b/debian/patches/patch/build.xml.diff
deleted file mode 100644
index cae1aa7..0000000
--- a/debian/patches/patch/build.xml.diff
+++ /dev/null
@@ -1,420 +0,0 @@
-From: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
-Subject: [PATCH] patch/build.xml
-
-Fixes the build.xml for just building GeoGebra.
-
-Signed-off-by: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
-
----
- build.xml |  323 ++++++++++---------------------------------------------------
- 1 files changed, 52 insertions(+), 271 deletions(-)
-
-diff --git a/build.xml b/build.xml
-index e67d26f..1cff9bc 100644
---- a/build.xml
-+++ b/build.xml
-@@ -38,22 +38,31 @@ office at geogebra.org
- 	
- 	<property name="src.dir" location="."/>
- 	<property name="propertiessrc.dir" location="./geogebra/properties"/>
--	<property name="propertiestemp.dir" location="../build/tempproperties"/>
--	<property name="build.dir" location="../build"/>
--	<property name="temp.dir" location="../build/temp"/>
--	<property name="workspace.dir" location="../"/>
-+	<property name="propertiestemp.dir" location="build/tempproperties"/>
-+	<property name="build.dir" location="build"/>
-+	<property name="javacc.dir" location="build/javacc"/>
-+	<property name="temp.dir" location="build/temp"/>
-     			
- 	<!-- build signed and unsigned GeoGebra jar files -->
- 	<target name="geogebra" 
--		depends="clean, ggb-jar-files, obfuscate, ggb-jar-index, 
--					copyJars, sign, pack, preloadHtml, finish">	  
--	</target>
--	
--	<!-- build jar files for testing without obfuscation -->
--	<target name="geogebra-test" 
--		depends="clean, ggb-jar-files, ggb-jar-index, 
--					copyJars, sign, pack, preloadHtml, finish">	  
-+		depends="ggb-jar-files">	  
- 	</target>
-+
-+	<target name="compile" depends="makedirs">
-+		<mkdir dir="${javacc.dir}/geogebra/kernel/parser"/>
-+		<javacc target="geogebra/kernel/parser/Parser.jj"
-+				outputdirectory="${javacc.dir}/geogebra/kernel/parser"
-+				javacchome="/usr/share/java"
-+				static="false">
-+		</javacc>
-+		<javac destdir="."
-+				target="1.5" source="1.5" debug="on" encoding="UTF-8">
-+			<src>
-+				<dirset dir="." includes="geogebra,jasymca"/>
-+				<dirset dir="${javacc.dir}"/>
-+			</src>
-+		</javac>
-+ 	</target>
- 	
- 	<!-- create all jar files -->
- 	<target name="ggb-jar-files" 
-@@ -63,11 +72,26 @@ office at geogebra.org
- 	<manifest file="../manifest.mf">	    
- 		<attribute name="Main-Class" value="geogebra.GeoGebra"/>
- 		<attribute name="Class-Path" 
--			value="geogebra.jar geogebra_main.jar geogebra_gui.jar geogebra_properties.jar geogebra_export.jar geogebra_cas.jar"/>
-+			value="/usr/share/geogebra/geogebra.jar
-+				/usr/share/geogebra/geogebra_main.jar
-+				/usr/share/geogebra/geogebra_gui.jar
-+				/usr/share/geogebra/geogebra_properties.jar
-+				/usr/share/geogebra/geogebra_export.jar
-+				/usr/share/geogebra/geogebra_cas.jar
-+				/usr/share/java/mathpiper.jar
-+				/usr/share/java/commons-math.jar
-+				/usr/share/java/jama.jar
-+				/usr/share/java/freehep-xml.jar
-+				/usr/share/java/freehep-util.jar
-+				/usr/share/java/freehep-graphics2d.jar
-+				/usr/share/java/freehep-graphicsio.jar
-+				/usr/share/java/freehep-graphicsio-svg.jar
-+				/usr/share/java/freehep-graphicsio-pdf.jar
-+				/usr/share/java/freehep-graphicsio-emf.jar"/>
- 		<!--	<attribute name="SplashScreen-Image" value="geogebra/splash.gif"/>	-->
- 	</manifest>	
- 	
--	<target name="clean">
-+	<target name="makedirs">
- 		<mkdir dir="${build.dir}"/>
- 		<mkdir dir="${build.dir}/packed"/>
- 		<mkdir dir="${build.dir}/unpacked"/>
-@@ -79,6 +103,11 @@ office at geogebra.org
- 		    <fileset dir="${build.dir}" includes="**/geogebra*.jar, **/gluegen-rt.jar, **/jogl.jar, **/jlatexmath.jar ,**/*.jar.pack.gz, **/*.html"/>
- 		</delete>		
- 	</target>
-+
-+	<target name="clean">
-+		<delete dir="${build.dir}"/>
-+		<delete file="**/*.class"/>
-+	</target>
- 	
- 	<target name="finish">		
- 		<delete dir="${propertiestemp.dir}"/>		   
-@@ -109,7 +138,7 @@ office at geogebra.org
- 	</target>
- 	
- 	<!-- geogebra.jar loads the geogebra_main.jar file and starts up the application/applet  -->
--	<target name="ggb-jar" depends="clean" description="create unsigned geogebra.jar">		
-+	<target name="ggb-jar" depends="compile" description="create unsigned geogebra.jar">		
- 		<jar jarfile="${build.dir}/geogebra.jar" manifest="../manifest.mf" >		
- 			<fileset dir="${src.dir}"		   
- 				includes="geogebra/*"			
-@@ -132,7 +161,7 @@ office at geogebra.org
- 	 
- 	    
- 	<!-- geogebra_main.jar includes all basic classes to run the application and applet  -->
--	<target name="ggb-main-jar" depends="clean" description="create unsigned geogebra_main.jar">		
-+	<target name="ggb-main-jar" depends="compile" description="create unsigned geogebra_main.jar">		
- 		<jar jarfile="${build.dir}/geogebra_main.jar"		
- 			basedir="${src.dir}"		   
- 			includes="**/*.class, 				
-@@ -156,7 +185,7 @@ office at geogebra.org
- 		/>
- 	</target>
- 	
--	<target name="ggb-export-jar" depends="clean" description="create unsigned geogebra_export.jar">
-+	<target name="ggb-export-jar" depends="compile" description="create unsigned geogebra_export.jar">
- 		<jar jarfile="${build.dir}/geogebra_export.jar"
- 			basedir="${src.dir}"
- 			includes="geogebra/export/**, 
-@@ -166,7 +195,7 @@ office at geogebra.org
- 		/>
- 	</target>
- 	
--	<target name="ggb-cas-jar" depends="clean" description="create unsigned geogebra_cas.jar">
-+	<target name="ggb-cas-jar" depends="compile" description="create unsigned geogebra_cas.jar">
- 		<jar jarfile="${build.dir}/geogebra_cas.jar"
- 			basedir="${src.dir}"
- 			includes="geogebra/cas/**,
-@@ -176,7 +205,7 @@ office at geogebra.org
- 		/>
- 	</target>
- 
--	<target name="ggb-gui-jar" depends="clean" description="create unsigned geogebra_gui.jar">
-+	<target name="ggb-gui-jar" depends="compile" description="create unsigned geogebra_gui.jar">
- 		<jar jarfile="${build.dir}/geogebra_gui.jar"
- 			basedir="${src.dir}"
- 			includes="geogebra/gui/**"
-@@ -184,91 +213,13 @@ office at geogebra.org
- 		/>
- 	</target>
- 	
--	<target name="ggb-properties-jar" depends="clean, stripComments" description="create unsigned geogebra_properties.jar">
-+	<target name="ggb-properties-jar" depends="stripComments" description="create unsigned geogebra_properties.jar">
- 		<jar jarfile="${build.dir}/geogebra_properties.jar"
- 			basedir="${propertiestemp.dir}"
- 			includes="**/*"			 
- 		/>
- 	</target>
--				
--	
--	<!-- Define Proguard task -->
--	<taskdef 
--		resource="proguard/ant/task.properties" 
--		classpath="proguard44.jar" />
--	
--	<!-- Define pack200 task -->
--	<taskdef name="p200ant"
--	    classname="de.matthiasmann.p200ant.P200AntTask"
--	    classpath="p200ant_java5only.jar"/>
--	
--	<!-- Obfuscate jar files without signing -->
--	<target name="obfuscate" depends="ggb-jar-files">
--		<!-- check if java142-rt.jar file present -->
--	    <condition property="java142-rt.present">
--	    	<available file="${workspace.dir}/java142-rt.jar"/>
--	    </condition>
--		<antcall target="doObfuscate"/>
--	</target>
--	<target name="doObfuscate" if="java142-rt.present" description="obfuscate jar files">
--			<proguard configuration="build.pro"/>
--			<move todir="${build.dir}">
--			    <fileset dir="${temp.dir}">
--			      <include name="*.jar"/>
--			    </fileset>
--			</move>
--			<delete dir="${temp.dir}"/>
--	</target>
--			
--	<!-- Sign jar files -->
--	<target name="sign" depends="ggb-jar-files">	    	
--		<!-- check if keystore file present -->
--		<condition property="keystore.present">
--			<available file="${workspace.dir}/igi-keystore.p12"/>
--		</condition>		
--		<antcall target="doSign"/>	
--	</target>
--	<target name="doSign" if="keystore.present" description="sign jar files">	
--		<!-- repack jars -->
--	    <fileset id="jars2pack" dir="${build.dir}">
--	        <include name="*.jar"/>
--	    </fileset>	        
--	    <p200ant repack="true"  configFile="p200.config">
--	        <fileset refid="jars2pack"/>
--	    </p200ant>	   
--	            
--		<!-- sign jars -->
--		<signjar 
--			keystore="${workspace.dir}/igi-keystore.p12" 	
--			alias="International GeoGebra Institute&apos;s GlobalSign nv-sa ID"
--			storetype="pkcs12"
--			storepass="geogebra">
--		    <fileset dir="${build.dir}" includes="*.jar" />
--		</signjar>    
--	</target>
--	
--	<!-- pack jars -->
--	<target name="pack" description="pack jar files">
--	    <fileset id="unsignedJars" dir="${build.dir}/unsigned/unpacked">
--			<include name="*.jar"/>
--		</fileset>	
--		<p200ant destdir="${build.dir}/unsigned/packed"  configFile="p200.config">
--	        <fileset refid="unsignedJars"/>
--	    </p200ant>	
--		
--		<move todir="${build.dir}/unpacked">
--	      <fileset dir="${build.dir}">
--            <include name="*.jar" />
--	      </fileset>
--        </move>
--		<fileset id="signedJars" dir="${build.dir}/unpacked">
--			<include name="*.jar"/>
--		</fileset>	
--		<p200ant destdir="${build.dir}/packed"  configFile="p200.config">
--	        <fileset refid="signedJars"/>
--	    </p200ant>	
--	</target>
--	
-+
- 	<!-- reads the version/build number from geogebra.GeoGebra.java -->
- 	<target name="readVersion">
- 		<loadfile property="fullversion" srcfile="${src.dir}/geogebra/GeoGebra.java">
-@@ -327,175 +278,5 @@ office at geogebra.org
- 		<echo> ${builddate}   </echo>
- 		-->
- 	</target>
--	
--	<!-- creates preload.html by inserting version strings into preload.txt -->
--	<target name="preloadHtml" depends="readVersion">
--		<copy file="${src.dir}/preload.txt"
--		      tofile="${build.dir}/unsigned/preload.html">
--		</copy>
--		<replace file="${build.dir}/unsigned/preload.html" 
--			token="VERSION_STRING" value="${fullversion}"/>
--	</target>
--	
--	<target name="installer" depends="installer-clean, installer-windows, installer-macosx"/>
--	
--	<target name="installer-clean">
--		<delete dir="${build.dir}/installer"/>
--		<mkdir  dir="${build.dir}/installer"/>
--		<mkdir  dir="${build.dir}/installer/windows"/>
--		<mkdir  dir="${build.dir}/installer/windows/unsigned"/>
--		<mkdir  dir="${build.dir}/installer/windows/temp"/>
--		<mkdir  dir="${build.dir}/installer/macosx"/>
--	</target>
--	
--	<!-- defines the launch4j and nsis tasks used to create the Windows installer -->
--	<taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask" classpath="installer/launch4j/launch4j.jar" />
--    <taskdef name="nsis" classname="net.sf.nsisant.Task" classpath="installer/nsisant-1.2.jar" />
--	
--	<!-- defines the conditions used during creation of the Windows installer -->
--	<condition property="installer-windows">
--		<or>
--			<os family="winnt"/>
--			<and>
--				<os family="mac"/>
--				<available file="/Applications/Wine.app"/>
--			</and>
--		</or>
--	</condition>
--	<condition property="installer-windows-keystore">
--		<and>
--			<available file="${workspace.dir}/igi-keystore.spc"/>
--			<or>
--				<and>
--					<os family="winnt"/>
--					<available file="${workspace.dir}/igi-keystore.pvk"/>
--				</and>
--				<and>
--					<os family="mac"/>
--					<available file="${workspace.dir}/igi-keystore.der"/>
--				</and>
--			</or>
--		</and>
--	</condition>
--	<condition property="installer-windows-uninstaller" value="${build.dir}\installer\windows\unsigned\">
--		<os family="winnt"/>
--	</condition>
--	<condition property="installer-windows-uninstaller" value="C:\">
--		<os family="mac"/>
--	</condition>
--	<condition property="installer-windows-osfamily-mac">
--		<os family="mac"/>
--	</condition>
--	
--	<!-- creates a GeoGebra.exe installer for Windows -->
--	<target name="installer-windows" depends="readVersion" if="installer-windows">
--		<launch4j configFile="${src.dir}/installer/geogebra.xml"
--			outfile="${build.dir}/installer/windows/unsigned/geogebra.exe"
--			fileVersion="${fullversion}"
--			txtFileVersion="${fullversion}"
--			productVersion="${fullversion}"
--			txtProductVersion="${fullversion}"/>
--		<copy file="${build.dir}/installer/windows/unsigned/geogebra.exe" tofile="${build.dir}/installer/windows/geogebra.exe"/>
--		<nsis script="installer/geogebra.nsi" verbosity="1" path="${src.dir}/installer/nsis">
--			<define name="build.dir"   value="${build.dir}"/>
--			<define name="fullversion" value="${fullversion}"/>
--			<define name="versionname" value="${versionname}"/>
--			<define name="builddate"   value="${builddate}"/>
--			<define name="outfile"     value="${build.dir}/installer/windows/temp/uninstaller.exe"/>
--			<define name="uninstaller" value="${installer-windows-uninstaller}"/>
--		</nsis>
--		<exec executable="${build.dir}/installer/windows/temp/uninstaller.exe" osfamily="winnt"/>
--		<exec dir="/Applications/Wine.app/Contents/MacOS" executable="/Applications/Wine.app/Contents/MacOS/startwine" osfamily="mac">
--			<arg file="${build.dir}/installer/windows/temp/uninstaller.exe"/>
--			<env key="WINEPREFIX" value="${workspace.dir}/wine"/>
--		</exec>
--		<antcall target="installer-windows-move-uninstaller"/>
--		<copy file="${build.dir}/installer/windows/unsigned/uninstaller.exe" tofile="${build.dir}/installer/windows/uninstaller.exe"/>
--		<antcall target="installer-windows-sign-components"/>
--		<nsis script="installer/geogebra.nsi" verbosity="1" path="${src.dir}/installer/nsis">
--			<define name="build.dir"   value="${build.dir}"/>
--			<define name="fullversion" value="${fullversion}"/>
--			<define name="versionname" value="${versionname}"/>
--			<define name="builddate"   value="${builddate}"/>
--			<define name="outfile"     value="${build.dir}/installer/windows/unsigned/GeoGebra_Installer_${versionname}.exe"/>
--		</nsis>
--		<copy file="${build.dir}/installer/windows/unsigned/GeoGebra_Installer_${versionname}.exe" tofile="${build.dir}/installer/windows/GeoGebra_Installer_${versionname}.exe"/>
--		<antcall target="installer-windows-sign-installer"/>
--		<move file="${build.dir}/installer/windows/GeoGebra_Installer_${versionname}.exe" tofile="${build.dir}/installer/GeoGebra_Installer_${versionname}.exe"/>
--		<delete dir="${build.dir}/installer/windows"/>
--	</target>
--	<target name="installer-windows-move-uninstaller" if="installer-windows-osfamily-mac">
--		<move file="${workspace.dir}/wine/drive_c/uninstaller.exe" tofile="${build.dir}/installer/windows/unsigned/uninstaller.exe"/>
--	</target>
--	<target name="installer-windows-sign-uninstall-generator" if="installer-windows-keystore">
--		<exec executable="${src.dir}/installer/signcode" osfamily="winnt">
--			<arg line="-spc '${workspace.dir}/igi-keystore.spc' -v '${workspace.dir}/igi-keystore.pvk' -n GeoGebra -i http://www.geogebra.org/ -t http://timestamp.verisign.com/scripts/timstamp.dll '${build.dir}/installer/windows/temp/uninstaller.exe'"/>
--		</exec>
--	</target>
--	<target name="installer-windows-sign-components" if="installer-windows-keystore">
--		<exec executable="${src.dir}/installer/signcode" osfamily="winnt">
--			<arg line="-spc '${workspace.dir}/igi-keystore.spc' -v '${workspace.dir}/igi-keystore.pvk' -n GeoGebra -i http://www.geogebra.org/ -t http://timestamp.verisign.com/scripts/timstamp.dll '${build.dir}/installer/windows/geogebra.exe'"/>
--		</exec>
--		<exec executable="${src.dir}/installer/signcode" osfamily="winnt">
--			<arg line="-spc '${workspace.dir}/igi-keystore.spc' -v '${workspace.dir}/igi-keystore.pvk' -n GeoGebra -i http://www.geogebra.org/ -t http://timestamp.verisign.com/scripts/timstamp.dll '${build.dir}/installer/windows/uninstaller.exe'"/>
--		</exec>
--		<exec executable="${src.dir}/installer/osslsigncode" osfamily="mac">
--			<arg line="-spc '${workspace.dir}/igi-keystore.spc' -key '${workspace.dir}/igi-keystore.der' -n GeoGebra -i http://www.geogebra.org/ -t http://timestamp.verisign.com/scripts/timstamp.dll -in '${build.dir}/installer/windows/unsigned/geogebra.exe' -out '${build.dir}/installer/windows/geogebra.exe'"/>
--		</exec>
--		<exec executable="${src.dir}/installer/osslsigncode" osfamily="mac">
--			<arg line="-spc '${workspace.dir}/igi-keystore.spc' -key '${workspace.dir}/igi-keystore.der' -n GeoGebra -i http://www.geogebra.org/ -t http://timestamp.verisign.com/scripts/timstamp.dll -in '${build.dir}/installer/windows/unsigned/uninstaller.exe' -out '${build.dir}/installer/windows/uninstaller.exe'"/>
--		</exec>
--	</target>
--	<target name="installer-windows-sign-installer" if="installer-windows-keystore">
--		<exec executable="${src.dir}/installer/signcode" osfamily="winnt">
--			<arg line="-spc '${workspace.dir}/igi-keystore.spc' -v '${workspace.dir}/igi-keystore.pvk' -n GeoGebra -i http://www.geogebra.org/ -t http://timestamp.verisign.com/scripts/timstamp.dll '${build.dir}/installer/windows/GeoGebra_Installer_${versionname}.exe'"/>
--		</exec>
--		<exec executable="${src.dir}/installer/osslsigncode" osfamily="mac">
--			<arg line="-spc '${workspace.dir}/igi-keystore.spc' -key '${workspace.dir}/igi-keystore.der' -n GeoGebra -i http://www.geogebra.org/ -t http://timestamp.verisign.com/scripts/timstamp.dll -in '${build.dir}/installer/windows/unsigned/GeoGebra_Installer_${versionname}.exe' -out '${build.dir}/installer/windows/GeoGebra_Installer_${versionname}.exe'"/>
--		</exec>
--	</target>
--	
--	<!-- defines the jarbundler task used to create the Mac OS X bundle -->
--	<taskdef name="jarbundler" classname="net.sourceforge.jarbundler.JarBundler" classpath="installer/jarbundler-2.1.0.jar" />
--	
--	<!-- creates a GeoGebra.app bundle for Mac OS X -->
--	<target name="installer-macosx" depends="readVersion">
--		<jarbundler
--				dir="${build.dir}/installer/macosx"
--				name="GeoGebra"
--				mainclass="geogebra.GeoGebra" 
--				jar="${build.dir}/unpacked/geogebra.jar"
--				build="${build}"
--				bundleid="geogebra.GeoGebra"
--				icon="installer/geogebra.icns"
--				infostring="GeoGebra ${fullversion}, (C) 2001-2010 International GeoGebra Institute"
--				jvmversion="1.4.2+"
--				shortname="GeoGebra"
--				signature="GGB"
--				stubfile="installer/JavaApplicationStub"
--				version="${version}">
--			<javaproperty name="apple.laf.useScreenMenuBar" value="true" />
--			<javafileset dir="${build.dir}/unpacked" />
--			<javafileset dir="${build.dir}/unsigned" includes="unpacked/*.jar" />
--			<documenttype
--				name="GeoGebra File"
--				extensions="ggb"
--				mimetypes="application/vnd.geogebra.file"
--				iconfile="installer/geogebra.icns"
--				role="Editor" />
--			<documenttype
--				name="GeoGebra Tool"
--				extensions="ggt"
--				mimetypes="application/vnd.geogebra.tool"
--				iconfile="installer/geogebra.icns"
--				role="Editor" />
--		</jarbundler>
--		<copy file="${src.dir}/installer/gpl-2.0.txt" tofile="${build.dir}/installer/macosx/GeoGebra.app/Contents/Resources/gpl-2.0.txt" />
--		<move file="${build.dir}/installer/macosx/GeoGebra.app/Contents/Resources/Java/unpacked" tofile="${build.dir}/installer/macosx/GeoGebra.app/Contents/Resources/Java/unsigned" />
--		<zip destfile="${build.dir}/installer/GeoGebra_${versionname}.zip">
--			<zipfileset dir="${build.dir}/installer/macosx" excludes="GeoGebra.app/Contents/MacOS/JavaApplicationStub" />
--			<zipfileset dir="${build.dir}/installer/macosx" includes="GeoGebra.app/Contents/MacOS/JavaApplicationStub" filemode="755" />
--		</zip>
--		<delete dir="${build.dir}/installer/macosx" />
--	</target>
--</project>
-\ No newline at end of file
-+</project>
-+
--- 
-tg: (b5e82e7..) patch/build.xml (depends on: master)
diff --git a/debian/patches/patch/flanagan_nonfree.diff b/debian/patches/patch/flanagan_nonfree.diff
deleted file mode 100644
index 2dba143..0000000
--- a/debian/patches/patch/flanagan_nonfree.diff
+++ /dev/null
@@ -1,588 +0,0 @@
-From: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
-Subject: [PATCH] patch/flanagan_nonfree
-
-This patch substitutes non free code from Michael Flanagan with
-equivalent code from Apache Commons Math.
-
-Signed-off-by: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
-
----
- geogebra/io/MyI2GHandler.java                      |   28 ++++++------
- geogebra/kernel/AlgoIntegralDefinite.java          |   44 ++++++++-----------
- geogebra/kernel/AlgoRootInterval.java              |   19 +++++---
- geogebra/kernel/AlgoRootNewton.java                |   22 +++++++--
- geogebra/kernel/EquationSolver.java                |   29 ++++++++-----
- geogebra/kernel/GeoVec2D.java                      |   47 ++++++++++----------
- geogebra/kernel/integration/EllipticArcLength.java |    2 -
- geogebra/kernel/roots/RealRootAdapter.java         |   20 ++++++++
- geogebra/kernel/roots/RealRootFunction.java        |    5 ++
- 9 files changed, 128 insertions(+), 88 deletions(-)
-
-diff --git a/geogebra/io/MyI2GHandler.java b/geogebra/io/MyI2GHandler.java
-index b62a9d8..ba24ad9 100644
---- a/geogebra/io/MyI2GHandler.java
-+++ b/geogebra/io/MyI2GHandler.java
-@@ -27,13 +27,13 @@ import geogebra.kernel.GeoVector;
- import geogebra.kernel.Kernel;
- import geogebra.kernel.arithmetic.Command;
- import geogebra.kernel.arithmetic.ExpressionNode;
--import geogebra.kernel.complex.Complex;
- import geogebra.kernel.parser.Parser;
- import geogebra.main.Application;
- import geogebra.main.MyError;
- 
- import java.util.LinkedHashMap;
- 
-+import org.apache.commons.math.complex.Complex;
- import org.xml.sax.SAXException;
- 
- /**
-@@ -326,7 +326,7 @@ debug("startElements", eName);
-     				break;
-     			}
-     			for (coord = 0; coord < coords.length; coord++) {
--    				if (Complex.isNaN(coords[coord])) {
-+    				if (coords[coord].isNaN()) {
-     					break;
-     				}
-     			}
-@@ -366,8 +366,8 @@ debug("textElements", str);
-     		        		coords[coord] = new Complex(Double.parseDouble(str), 0);
-     		        	} else if (Double.isNaN(coords[coord].getReal())) {
-     		        		coords[coord] = new Complex(Double.parseDouble(str), Double.NaN);
--    		        	} else if (Double.isNaN(coords[coord].getImag())) {
--    		        		coords[coord].setImag(Double.parseDouble(str));
-+    		        	} else if (Double.isNaN(coords[coord].getImaginary())) {
-+    		        		coords[coord] = new Complex(coords[coord].getReal(), Double.parseDouble(str));
-     		        	} else {
-             				Application.debug("more than 2 <double> specified for <complex>");
-     		        	}
-@@ -397,7 +397,7 @@ debug("endElements", eName);
-     			break;
-     			
-     		case MODE_COORDINATES :
--				if (Complex.isNaN(coords[coords.length - 1])) {
-+				if (coords[coords.length - 1].isNaN()) {
-         			String tag = "<double>";
-         			if (cmdName.equals("homogeneous_coordinates")) {
-         				tag = "<double> or <complex>";
-@@ -406,12 +406,12 @@ debug("endElements", eName);
- 				} else {
- 			        GeoVec3D v = (GeoVec3D) geo;
- 					if (coords.length == 3) {
--						if (!coords[2].isReal()) {
--							coords[0] = Complex.over(coords[0], coords[2], new Complex());
--							coords[1] = Complex.over(coords[1], coords[2], new Complex());
--							coords[2] = Complex.over(coords[2], coords[2], new Complex());
-+						if (coords[2].getImaginary() != 0.0) {
-+							coords[0] = coords[0].divide(coords[2]);
-+							coords[1] = coords[1].divide(coords[2]);
-+							coords[2] = coords[2].divide(coords[2]);
- 						}
--			            if (coords[0].isReal() && coords[1].isReal() && coords[2].isReal()) {
-+			            if (coords[0].getImaginary() == 0.0 && coords[1].getImaginary() == 0.0 && coords[2].getImaginary() == 0.0) {
- 							v.setCoords(coords[0].getReal(), coords[1].getReal(), coords[2].getReal());
- 			            } else {
- 			            	Application.debug("could not import complex coordinates");
-@@ -434,12 +434,12 @@ debug("endElements", eName);
-     			break;
-     			
-     		case MODE_COORDINATES_COMPLEX :
--				if (coord < coords.length && Complex.isNaN(coords[coord])) {
-+				if (coord < coords.length && coords[coord].isNaN()) {
- 					if (Double.isNaN(coords[coord].getReal())) {
--						coords[coord] = new Complex();
-+						coords[coord] = new Complex(0, 0);
-     					Application.debug("no <double> specified for <complex>");
--					} else if (Double.isNaN(coords[coord].getImag())) {
--						coords[coord].setImag(0);
-+					} else if (Double.isNaN(coords[coord].getImaginary())) {
-+						coords[coord] = new Complex(coords[coord].getReal(), 0);
-     					Application.debug("only 1 <double> specified for <complex>");
- 					}
- 				}
-diff --git a/geogebra/kernel/AlgoIntegralDefinite.java b/geogebra/kernel/AlgoIntegralDefinite.java
-index bf7e8ce..06f6196 100644
---- a/geogebra/kernel/AlgoIntegralDefinite.java
-+++ b/geogebra/kernel/AlgoIntegralDefinite.java
-@@ -12,8 +12,12 @@ the Free Software Foundation.
- 
- package geogebra.kernel;
- 
-+import org.apache.commons.math.ConvergenceException;
-+import org.apache.commons.math.FunctionEvaluationException;
-+import org.apache.commons.math.analysis.integration.LegendreGaussIntegrator;
-+
- import geogebra.kernel.arithmetic.NumberValue;
--import geogebra.kernel.integration.GaussQuadIntegration;
-+import geogebra.kernel.roots.RealRootAdapter;
- import geogebra.kernel.roots.RealRootFunction;
- 
- /**
-@@ -33,9 +37,9 @@ public class AlgoIntegralDefinite extends AlgoElement {
-     private GeoFunction symbIntegral;
-     
-     // for numerical adaptive GaussQuad integration  
--    private static final int FIRST_ORDER = 5;
--    private static final int SECOND_ORDER = 7;   
--    private static GaussQuadIntegration firstGauss, secondGauss;
-+    private static final int ORDER = 5;
-+    private static final int MAX_ITER = 10;   
-+    private static LegendreGaussIntegrator gauss;
-     private static int adaptiveGaussQuadCounter = 0;
-     private static final int MAX_GAUSS_QUAD_CALLS = 500;     
- 
-@@ -180,31 +184,19 @@ public class AlgoIntegralDefinite extends AlgoElement {
-     	}
-     	
-     	// init GaussQuad classes for numerical integration
--        if (firstGauss == null) {
--            firstGauss = new GaussQuadIntegration(FIRST_ORDER);
--            secondGauss = new GaussQuadIntegration(SECOND_ORDER);
-+        if (gauss == null) {
-+            gauss = new LegendreGaussIntegrator(ORDER, MAX_ITER);
-         }
-     	
-         // integrate using gauss quadrature
--        double firstSum = firstGauss.integrate(fun, a, b);
--        if (Double.isNaN(firstSum)) return Double.NaN;        
--        double secondSum = secondGauss.integrate(fun, a, b);
--        if (Double.isNaN(secondSum)) return Double.NaN;
--        
--        // check if both results are equal
--        boolean equal = Kernel.isEqual(firstSum, secondSum, Kernel.STANDARD_PRECISION);
--       
--        if (equal) { 
--        	// success              
--            return secondSum;
--        } else {           
--            double mid = (a + b) / 2;                             
--            double left = doAdaptiveGaussQuad(fun, a, mid);
--            if (Double.isNaN(left))
--                return Double.NaN;
--            else
--                return left + doAdaptiveGaussQuad(fun, mid, b);           
--        }
-+        double sum;
-+		try {
-+			sum = gauss.integrate(new RealRootAdapter(fun), a, b);
-+		} catch (Exception e) {
-+			sum = Double.NaN;
-+		} 
-+
-+        return sum;
-     }
- 
-     final public String toString() {
-diff --git a/geogebra/kernel/AlgoRootInterval.java b/geogebra/kernel/AlgoRootInterval.java
-index d9479db..e103fb3 100644
---- a/geogebra/kernel/AlgoRootInterval.java
-+++ b/geogebra/kernel/AlgoRootInterval.java
-@@ -12,9 +12,13 @@ the Free Software Foundation.
- 
- package geogebra.kernel;
- 
-+import org.apache.commons.math.analysis.solvers.BrentSolver;
-+import org.apache.commons.math.analysis.solvers.UnivariateRealSolver;
-+import org.apache.commons.math.analysis.solvers.UnivariateRealSolverFactory;
-+
- import geogebra.kernel.arithmetic.Function;
- import geogebra.kernel.arithmetic.NumberValue;
--import geogebra.kernel.roots.RealRoot;
-+import geogebra.kernel.roots.RealRootAdapter;
- import geogebra.kernel.roots.RealRootUtil;
- import geogebra.main.Application;
- 
-@@ -32,7 +36,6 @@ public class AlgoRootInterval extends AlgoElement {
-     private GeoPoint rootPoint; // output 
- 
-     private GeoElement aGeo, bGeo;
--    private RealRoot rootFinder;
- 
-     public AlgoRootInterval(
-         Construction cons,
-@@ -47,8 +50,6 @@ public class AlgoRootInterval extends AlgoElement {
-         aGeo = a.toGeoElement();
-         bGeo = b.toGeoElement();
- 
--        rootFinder = new RealRoot();
--
-         // output
-         rootPoint = new GeoPoint(cons);
-         setInputOutput(); // for AlgoElement    
-@@ -87,16 +88,18 @@ public class AlgoRootInterval extends AlgoElement {
-         double root = Double.NaN;
-         Function fun = f.getFunction();
-         
-+        UnivariateRealSolverFactory fact = UnivariateRealSolverFactory.newInstance();
-+        UnivariateRealSolver rootFinder = fact.newBrentSolver();
-         try {
-         	// Brent's method
--            root = rootFinder.brent(fun, a.getDouble(), b.getDouble());            
-+            root = rootFinder.solve(new RealRootAdapter(fun), a.getDouble(), b.getDouble());
-             //root = rootFinder.falsePosition(fun, a.getDouble(), b.getDouble());            
--        } catch (IllegalArgumentException e) {        	
-+        } catch (Exception e) {        	
-             try {                               	        	
-             	// Brent's failed because we left our function's domain
-             	// Let's search for a valid domain and try again
-             	double [] borders = RealRootUtil.getDefinedInterval(fun, a.getDouble(), b.getDouble());            	
--            	root = rootFinder.brent(fun, borders[0], borders[1]);                
-+            	root = rootFinder.solve(new RealRootAdapter(fun), borders[0], borders[1]);                
-             } catch (Exception ex) {   
-             	root = Double.NaN;
-             } 
-@@ -105,6 +108,7 @@ public class AlgoRootInterval extends AlgoElement {
-         if (Math.abs(fun.evaluate(root)) < Kernel.MIN_PRECISION)
-             return root;
-         
-+        /*
-         // Brent's failed, try false position (regula falsi) method
-         double aVal = fun.evaluate(a.getDouble());
-         double bVal = fun.evaluate(b.getDouble());
-@@ -114,6 +118,7 @@ public class AlgoRootInterval extends AlgoElement {
- 	        if (Math.abs(fun.evaluate(root)) < Kernel.MIN_PRECISION)
- 	            return root;
-         }
-+        */
- 
-         return Double.NaN;
-     }
-diff --git a/geogebra/kernel/AlgoRootNewton.java b/geogebra/kernel/AlgoRootNewton.java
-index 188f672..c148d30 100644
---- a/geogebra/kernel/AlgoRootNewton.java
-+++ b/geogebra/kernel/AlgoRootNewton.java
-@@ -12,9 +12,14 @@ the Free Software Foundation.
- 
- package geogebra.kernel;
- 
-+import org.apache.commons.math.ConvergenceException;
-+import org.apache.commons.math.FunctionEvaluationException;
-+import org.apache.commons.math.analysis.solvers.UnivariateRealSolver;
-+import org.apache.commons.math.analysis.solvers.UnivariateRealSolverFactory;
-+
- import geogebra.kernel.arithmetic.Function;
- import geogebra.kernel.arithmetic.NumberValue;
--import geogebra.kernel.roots.RealRoot;
-+import geogebra.kernel.roots.RealRootAdapter;
- import geogebra.kernel.roots.RealRootDerivFunction;
- import geogebra.kernel.roots.RealRootUtil;
- 
-@@ -33,7 +38,6 @@ public class AlgoRootNewton extends AlgoElement {
-     private GeoPoint rootPoint; // output 
- 
-     private GeoElement startGeo;
--    private RealRoot rootFinder;
- 
-     public AlgoRootNewton(
-         Construction cons,
-@@ -45,8 +49,6 @@ public class AlgoRootNewton extends AlgoElement {
-         this.start = start;
-         startGeo = start.toGeoElement();
- 
--        rootFinder = new RealRoot();
--
-         // output
-         rootPoint = new GeoPoint(cons);
-         setInputOutput(); // for AlgoElement    
-@@ -57,7 +59,6 @@ public class AlgoRootNewton extends AlgoElement {
- 
-     AlgoRootNewton(Construction cons) {
-         super(cons);
--        rootFinder = new RealRoot();
-     }
- 
-     protected String getClassName() {
-@@ -94,6 +95,16 @@ public class AlgoRootNewton extends AlgoElement {
-     final double calcRoot(Function fun, double start) {
-     	double root = Double.NaN;
-     	
-+    	UnivariateRealSolverFactory fact = UnivariateRealSolverFactory.newInstance();
-+    	UnivariateRealSolver rootFinder = fact.newBrentSolver();
-+    	double [] borders = getDomain(fun, start);
-+    	try {
-+			root = rootFinder.solve(new RealRootAdapter(fun), borders[0], borders[1], start);
-+		} catch (Exception e) {
-+			root = Double.NaN;
-+		}
-+
-+        /*
-     	// for Newton's method we need the derivative of our function fun
-         RealRootDerivFunction derivFun = fun.getRealRootDerivFunction();        
-         
-@@ -122,6 +133,7 @@ public class AlgoRootNewton extends AlgoElement {
-                 }                      	        	        	
-             }
-         }
-+        */
-               
-         // check what we got
-         if (Math.abs(fun.evaluate(root)) < Kernel.MIN_PRECISION )
-diff --git a/geogebra/kernel/EquationSolver.java b/geogebra/kernel/EquationSolver.java
-index a3ad579..8f8dac4 100644
---- a/geogebra/kernel/EquationSolver.java
-+++ b/geogebra/kernel/EquationSolver.java
-@@ -12,25 +12,26 @@ the Free Software Foundation.
- 
- package geogebra.kernel;
- 
-+import org.apache.commons.math.ConvergenceException;
-+import org.apache.commons.math.FunctionEvaluationException;
-+import org.apache.commons.math.analysis.solvers.LaguerreSolver;
-+import org.apache.commons.math.analysis.solvers.UnivariateRealSolverFactory;
-+import org.apache.commons.math.complex.Complex;
- 
- import java.util.Arrays;
- 
- import geogebra.kernel.arithmetic.PolyFunction;
--import geogebra.kernel.complex.Complex;
--import geogebra.kernel.complex.ComplexPoly;
--import geogebra.kernel.roots.RealRoot;
-+import geogebra.kernel.roots.RealRootAdapter;
- 
- public class EquationSolver { 
- 		
- 	private static final double LAGUERRE_EPS = 1E-5;
- 	private double epsilon = Kernel.STANDARD_PRECISION;
- 	
--	private RealRoot rootPolisher;
- 	//private ExtremumFinder extrFinder;
- 	
-     public EquationSolver(Kernel kernel) {		
- 		// we need someone to polish our roots
--		rootPolisher = new RealRoot();
- 		//extrFinder = kernel.getExtremumFinder();
-     }
-     
-@@ -391,8 +392,12 @@ public class EquationSolver {
- 		*/			
- 	
- 		// calc roots with Laguerre method
--		ComplexPoly poly = new ComplexPoly(eqn);	
--		Complex [] complexRoots = poly.roots(false, new Complex(LAGUERRE_START, 0)); // don't polish here 
-+		Complex[] complexRoots = null;
-+		try {
-+			complexRoots = new LaguerreSolver().solveAll(eqn, LAGUERRE_START);
-+		} catch (Exception e) {
-+			e.printStackTrace();
-+		}
- 	
- 		// sort complexRoots by real part into laguerreRoots
- 		double [] laguerreRoots = new double[complexRoots.length];
-@@ -418,15 +423,16 @@ public class EquationSolver {
- 			double f_right = polyFunc.evaluate(right);
- 			boolean bounded = f_left * f_right < 0.0; 
- 			
-+			UnivariateRealSolverFactory fact = UnivariateRealSolverFactory.newInstance();
- 			try {					
- 				if (bounded) {						
- 					//	small f'(root): don't go too fare from our laguerre root !	
--					root = rootPolisher.bisectNewtonRaphson(polyFunc, left, right);
-+					root = fact.newBrentSolver().solve(new RealRootAdapter(polyFunc), left, right);
- 					//System.out.println("Polish bisectNewtonRaphson: " + root);
- 				} 
- 				else {
- 					// the root is not bounded: give Mr. Newton a chance
--					root = rootPolisher.newtonRaphson(polyFunc, root);
-+					root = fact.newNewtonSolver().solve(new RealRootAdapter(polyFunc), left, right, root);
- 					//System.out.println("Polish newtonRaphson: " + root);
- 				}				
- 			} 
-@@ -435,10 +441,11 @@ public class EquationSolver {
- 				// polishing failed: maybe we have an extremum here
- 				// try to find a local extremum
- 				try {		
--					root = rootPolisher.bisectNewtonRaphson(derivFunc, left, right);	
-+					root = fact.newBrentSolver().solve(new RealRootAdapter(derivFunc), left, right);
- 					//System.out.println("    find extremum successfull: " + root);
- 				} catch (Exception ex) {
--					System.err.println(ex.getMessage());
-+
-+					//System.err.println(ex.getMessage());
- 				}
- 			}
- 
-diff --git a/geogebra/kernel/GeoVec2D.java b/geogebra/kernel/GeoVec2D.java
-index f30afd1..2f19282 100644
---- a/geogebra/kernel/GeoVec2D.java
-+++ b/geogebra/kernel/GeoVec2D.java
-@@ -25,10 +25,11 @@ import geogebra.kernel.arithmetic.MyList;
- import geogebra.kernel.arithmetic.NumberValue;
- import geogebra.kernel.arithmetic.ValidExpression;
- import geogebra.kernel.arithmetic.VectorValue;
--import geogebra.kernel.complex.Complex;
- 
- import java.util.HashSet;
- 
-+import org.apache.commons.math.complex.Complex;
-+
- /** 
-  * 
-  * @author  Markus
-@@ -410,12 +411,12 @@ implements VectorValue {
-       //c.x = (x1 * x2 + y1 * y2)/(x2 * x2 + y2 * b.y);
-       //c.y = (y1 * x2 - x1 * y2)/(x2 * x2 + y2 * b.y);
-       
--      Complex out = new Complex();
-+      Complex out;
-       
--      Complex.over(new Complex(a.x, a.y), new Complex(b.x, b.y), out);
-+      out = new Complex(a.x, a.y).divide(new Complex(b.x, b.y));
-       
-       c.x = out.getReal();
--      c.y = out.getImag();
-+      c.y = out.getImaginary();
-     	c.setMode(Kernel.COORD_COMPLEX);
-       
-     }
-@@ -431,12 +432,12 @@ implements VectorValue {
-       //c.y = ( - x1 * y2)/(x2 * x2 + y2 * b.y);
- 
-     
--      Complex out = new Complex();
-+      Complex out;
-       
--      Complex.over(a.getDouble(), new Complex(b.x, b.y), out);
-+      out = new Complex(a.getDouble(), 0).divide(new Complex(b.x, b.y));
-       
-       c.x = out.getReal();
--      c.y = out.getImag();
-+      c.y = out.getImaginary();
-     	c.setMode(Kernel.COORD_COMPLEX);
- }
-     
-@@ -452,62 +453,62 @@ implements VectorValue {
- 
-     /** c = a ^ b Michael Borcherds 2009-03-10 */
-     final public static void complexPower(GeoVec2D a, NumberValue b, GeoVec2D c) {                                       
--        Complex out = new Complex();
-+        Complex out;
-         
--        out = Complex.pow(new Complex(a.x, a.y), b.getDouble());
-+        out = new Complex(a.x, a.y).pow(new Complex(b.getDouble(), 0));
-         
-         c.x = out.getReal();
--        c.y = out.getImag();
-+        c.y = out.getImaginary();
-       	c.setMode(Kernel.COORD_COMPLEX);
-     }
- 
-     /** c = a ^ b Michael Borcherds 2009-03-10 */
-     final public static void complexPower(NumberValue a, GeoVec2D b, GeoVec2D c) {                                       
--        Complex out = new Complex();
-+        Complex out;
-         
--        out = Complex.pow(new Complex(a.getDouble(), 0.0), new Complex(b.x, b.y));
-+        out = new Complex(a.getDouble(), 0.0).pow(new Complex(b.x, b.y));
-         
-         c.x = out.getReal();
--        c.y = out.getImag();
-+        c.y = out.getImaginary();
-       	c.setMode(Kernel.COORD_COMPLEX);
-     }
- 
-     /** c = e ^ a Michael Borcherds 2009-03-10 */
-     final public static void complexExp(GeoVec2D a, GeoVec2D c) {                                       
--        Complex out = new Complex();
-+        Complex out;
-         
--        out = Complex.exp(new Complex(a.x, a.y));
-+        out = new Complex(a.x, a.y).exp();
-         
-         c.x = out.getReal();
--        c.y = out.getImag();
-+        c.y = out.getImaginary();
-       	c.setMode(Kernel.COORD_COMPLEX);
-     }
- 
-     /** c = natural log(a) Michael Borcherds 2009-03-10 */
-     final public static void complexLog(GeoVec2D a, GeoVec2D c) {                                       
--        Complex out = new Complex();
-+        Complex out;
-         
--        out = Complex.log(new Complex(a.x, a.y));
-+        out = new Complex(a.x, a.y).log();
-         
-         c.x = out.getReal();
--        c.y = out.getImag();
-+        c.y = out.getImaginary();
-       	c.setMode(Kernel.COORD_COMPLEX);
-     }
- 
-     /** c = natural log(a) Michael Borcherds 2009-03-10 */
-     final public static double complexAbs(GeoVec2D a) {                                       
-                 
--        return Complex.abs(new Complex(a.x, a.y));
-+        return new Complex(a.x, a.y).abs();
-     }
- 
-     /** c = a ^ b Michael Borcherds 2009-03-14 */
-     final public static void complexPower(GeoVec2D a, GeoVec2D b, GeoVec2D c) {                                       
--        Complex out = new Complex();
-+        Complex out;
-         
--        out = Complex.pow(new Complex(a.x, a.y), new Complex(b.x, b.y));
-+        out = new Complex(a.x, a.y).pow(new Complex(b.x, b.y));
-         
-         c.x = out.getReal();
--        c.y = out.getImag();
-+        c.y = out.getImaginary();
-       	c.setMode(Kernel.COORD_COMPLEX);
-     }
- 
-diff --git a/geogebra/kernel/integration/EllipticArcLength.java b/geogebra/kernel/integration/EllipticArcLength.java
-index d6aec8f..e80c66d 100644
---- a/geogebra/kernel/integration/EllipticArcLength.java
-+++ b/geogebra/kernel/integration/EllipticArcLength.java
-@@ -24,12 +24,10 @@ public class EllipticArcLength {
- 
- 	private double [] halfAxes;
- 	private RealRootFunction arcLengthFunction;
--	private GaussQuadIntegration gauss;
- 	
- 	public EllipticArcLength(GeoConic ellipse) {
- 		halfAxes = ellipse.getHalfAxes();
- 		arcLengthFunction = new EllipticArcLengthFunction();
--		gauss = new GaussQuadIntegration(5);
- 	}
- 	
- 	/**
-diff --git a/geogebra/kernel/roots/RealRootAdapter.java b/geogebra/kernel/roots/RealRootAdapter.java
-new file mode 100644
-index 0000000..427a8ad
---- /dev/null
-+++ b/geogebra/kernel/roots/RealRootAdapter.java
-@@ -0,0 +1,20 @@
-+package geogebra.kernel.roots;
-+
-+import org.apache.commons.math.FunctionEvaluationException;
-+import org.apache.commons.math.analysis.UnivariateRealFunction;
-+
-+public class RealRootAdapter implements UnivariateRealFunction {
-+
-+	private RealRootFunction fun;
-+
-+	public RealRootAdapter(RealRootFunction fun) {
-+		this.fun = fun;
-+	}
-+
-+	public double value(double x) throws FunctionEvaluationException {
-+		double res = this.fun.evaluate(x);
-+		if (res == Double.NaN) throw new FunctionEvaluationException(res);
-+		return res;
-+	}
-+
-+}
-diff --git a/geogebra/kernel/roots/RealRootFunction.java b/geogebra/kernel/roots/RealRootFunction.java
-new file mode 100644
-index 0000000..65c8438
---- /dev/null
-+++ b/geogebra/kernel/roots/RealRootFunction.java
-@@ -0,0 +1,5 @@
-+package geogebra.kernel.roots;
-+
-+public interface RealRootFunction {
-+	public double evaluate(double x);
-+}
--- 
-tg: (7db013e..) patch/flanagan_nonfree (depends on: master)
diff --git a/debian/patches/patch/jama.diff b/debian/patches/patch/jama.diff
deleted file mode 100644
index de0dc4e..0000000
--- a/debian/patches/patch/jama.diff
+++ /dev/null
@@ -1,184 +0,0 @@
-From: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
-Subject: [PATCH] patch/jama
-
-This patch fixes the import used to work with the JAMA library.
-
-Signed-off-by: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
-
----
- geogebra/kernel/AlgoInvert.java                |    2 +-
- geogebra/kernel/AlgoTranspose.java             |    2 +-
- geogebra/kernel/jama/GgbMat.java               |   68 ++++++++---------------
- geogebra/kernel/statistics/RegressionMath.java |    2 +-
- 4 files changed, 27 insertions(+), 47 deletions(-)
-
-diff --git a/geogebra/kernel/AlgoInvert.java b/geogebra/kernel/AlgoInvert.java
-index 0934f2f..890b8e8 100644
---- a/geogebra/kernel/AlgoInvert.java
-+++ b/geogebra/kernel/AlgoInvert.java
-@@ -81,7 +81,7 @@ public class AlgoInvert extends AlgoElement {
-    			return;
-    		}*/
-    		
--   		matrix.inverseImmediate();
-+   		matrix = new GgbMat(matrix.inverse());
-    		
-    		if (matrix.isUndefined()) {
-   			//outputList.setUndefined();
-diff --git a/geogebra/kernel/AlgoTranspose.java b/geogebra/kernel/AlgoTranspose.java
-index 282466c..89f7495 100644
---- a/geogebra/kernel/AlgoTranspose.java
-+++ b/geogebra/kernel/AlgoTranspose.java
-@@ -63,7 +63,7 @@ public class AlgoTranspose extends AlgoElement {
- 	   		return;   		
- 	   	}
-    		
--   		matrix.transposeImmediate();
-+   		matrix = new GgbMat(matrix.transpose());
-    		// Transpose[{{1,2},{3,4}}]
-    		
-    		outputList = matrix.getGeoList(outputList, cons);
-diff --git a/geogebra/kernel/jama/GgbMat.java b/geogebra/kernel/jama/GgbMat.java
-index 80ee214..e8aa175 100644
---- a/geogebra/kernel/jama/GgbMat.java
-+++ b/geogebra/kernel/jama/GgbMat.java
-@@ -1,44 +1,55 @@
- package geogebra.kernel.jama;
- 
-+import java.awt.Dimension;
-+
- import geogebra.kernel.Construction;
- import geogebra.kernel.GeoElement;
- import geogebra.kernel.GeoList;
- import geogebra.kernel.GeoNumeric;
- import geogebra.main.Application;
- 
-+import Jama.Matrix;
- 
- public class GgbMat extends Matrix{
- 
- 	private boolean isUndefined = false;
- 
--	public GgbMat (GeoList inputList) {
-+	public GgbMat (Matrix m) {
-+		super(m.getArray());
-+	}
-+
-+	public static Dimension calcDim(GeoList inputList) {
- 		int rows = inputList.size();
- 		if (!inputList.isDefined() || rows == 0) {
--			setIsUndefined(true);
--			return;
-+			return new Dimension(0, 0);
- 		} 
- 
- 		GeoElement geo = inputList.get(0);
- 
- 		if (!geo.isGeoList()) {
--			setIsUndefined(true);
--			return;   		
-+			return new Dimension(0, 0);
- 		}
- 
- 
- 		int cols = ((GeoList)geo).size();
- 
- 		if (cols == 0) {
--			setIsUndefined(true);
--			return;   		
-+			return new Dimension(0, 0);	
- 		}
- 
--		A = new double[rows][cols];
--		m = rows;
--		n = cols;
-+		return new Dimension(rows, cols);
-+		
-+	}
-+
-+	public GgbMat (GeoList inputList) {
-+		super(calcDim(inputList).width, calcDim(inputList).height);
-+
-+		int rows = this.getRowDimension();
-+		int cols = this.getColumnDimension();
- 
- 		GeoList rowList;
- 
-+		GeoElement geo;
- 		for (int r = 0 ; r < rows ; r++) {
- 			geo = inputList.get(r);
- 			if (!geo.isGeoList()) {
-@@ -62,37 +73,6 @@ public class GgbMat extends Matrix{
- 		}
- 	}
- 
--	public void inverseImmediate() {
--
--		try {
--			Matrix ret = inverse();
--			A = ret.A;
--			m = ret.m;
--			n = ret.n;
--		}
--		catch (Exception e) { // can't invert
--			setIsUndefined(true);
--		}
--
--	}
--
--
--
--	public void transposeImmediate() {
--
--		double[][] C = new double[n][m];
--		for (int i = 0; i < m; i++) {
--			for (int j = 0; j < n; j++) {
--				C[j][i] = A[i][j];
--			}
--		}
--		A = C;
--		int temp = n;
--		n = m;
--		m = temp;
--		//Application.debug(""+A[0][0]);
--	}
--
- 	/*
- 	 * returns GgbMatrix as a GeoList eg { {1,2}, {3,4} }
- 	 */
-@@ -106,9 +86,9 @@ public class GgbMat extends Matrix{
- 		outputList.clear();
- 		outputList.setDefined(true);
- 
--		for (int r = 0 ; r < m ; r++) {  	   			
-+		for (int r = 0 ; r < this.getRowDimension() ; r++) {  	   			
- 			GeoList columnList = new GeoList(cons);
--			for (int c = 0 ; c < n ; c++) {
-+			for (int c = 0 ; c < this.getColumnDimension() ; c++) {
- 				//Application.debug(get(r, c)+"");
- 				columnList.add(new GeoNumeric(cons, get(r, c)));  	   			
- 			}
-@@ -131,7 +111,7 @@ public class GgbMat extends Matrix{
- 	}
- 
- 	public boolean isSquare() {
--		return (n == m);
-+		return (this.getColumnDimension() == this.getRowDimension());
- 	}
- 
- 
-diff --git a/geogebra/kernel/statistics/RegressionMath.java b/geogebra/kernel/statistics/RegressionMath.java
-index 55ee4fc..8d4ff23 100644
---- a/geogebra/kernel/statistics/RegressionMath.java
-+++ b/geogebra/kernel/statistics/RegressionMath.java
-@@ -2,7 +2,7 @@ package geogebra.kernel.statistics;
- import geogebra.kernel.GeoList;
- import geogebra.kernel.GeoPoint;
- import geogebra.kernel.GeoElement;
--import geogebra.kernel.jama.*;
-+import Jama.*;
- 
- /* 
- GeoGebra - Dynamic Mathematics for Everyone
--- 
-tg: (f0cc56c..) patch/jama (depends on: master)
diff --git a/debian/patches/patch/no_mac.diff b/debian/patches/patch/no_mac.diff
deleted file mode 100644
index 02845c3..0000000
--- a/debian/patches/patch/no_mac.diff
+++ /dev/null
@@ -1,166 +0,0 @@
-From: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
-Subject: [PATCH] patch/no_mac
-
-Removes Mac OS X specific code.
-
-Signed-off-by: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
-
----
- geogebra/gui/app/GeoGebraFrame.java          |   23 +------
- geogebra/gui/app/MacApplicationListener.java |  100 --------------------------
- 2 files changed, 1 insertions(+), 122 deletions(-)
-
-diff --git a/geogebra/gui/app/GeoGebraFrame.java b/geogebra/gui/app/GeoGebraFrame.java
-index 87f02b5..809932e 100644
---- a/geogebra/gui/app/GeoGebraFrame.java
-+++ b/geogebra/gui/app/GeoGebraFrame.java
-@@ -250,9 +250,6 @@ public class GeoGebraFrame extends JFrame implements WindowFocusListener
- 			return;
- 		}
- 		    	
--     	if (Application.MAC_OS) 
--    		initMacSpecifics();
--				
-     	// set system look and feel
- 		try {							
- 			if (Application.MAC_OS || Application.WINDOWS)
-@@ -277,24 +274,6 @@ public class GeoGebraFrame extends JFrame implements WindowFocusListener
- 		return activeInstance;
- 	}
- 
--	/**
--	 * MacOS X specific initing. Note: this method can only be run
--	 * on a Mac!
--	 */
--	public static void initMacSpecifics() {
--		try {
--			// init mac application listener
--			MacApplicationListener.initMacApplicationListener();
--	
--			//mac menu bar	
--		    //System.setProperty("com.apple.macos.useScreenMenuBar", "true"); 	
--		    System.setProperty("apple.laf.useScreenMenuBar", "true"); 	
--		} catch (Exception e) {
--			Application.debug(e+"");
--		}
--	}
--	
--	
- 	//public abstract GeoGebra buildGeoGebra();
- 
- 	public static synchronized GeoGebraFrame createNewWindow(String[] args) {				
-@@ -391,4 +370,4 @@ public class GeoGebraFrame extends JFrame implements WindowFocusListener
- 	
- 	
- 
--}
-\ No newline at end of file
-+}
-diff --git a/geogebra/gui/app/MacApplicationListener.java b/geogebra/gui/app/MacApplicationListener.java
-deleted file mode 100644
-index c4d696f..0000000
---- a/geogebra/gui/app/MacApplicationListener.java
-+++ /dev/null
-@@ -1,100 +0,0 @@
--package geogebra.gui.app;
--
--import geogebra.main.Application;
--
--import java.io.File;
--
--public class MacApplicationListener implements com.apple.eawt.ApplicationListener  {
--	
--	public static void initMacApplicationListener() {
--		com.apple.eawt.Application app = new com.apple.eawt.Application();
--		app.addApplicationListener(new MacApplicationListener());
--	}
--	
--	/**
--	 * Gets active instance of GeoGebra window. This method waits
--	 * until an active instance was created by GeoGebra.main()
--	 * @return
--	 */
--	private synchronized GeoGebraFrame getGGBInstance() {
--		GeoGebraFrame wnd = null;
--		while (wnd == null) {
--			try {
--				Thread.sleep(100);			
--				wnd = GeoGebraFrame.getActiveInstance();	
--			} catch (Exception e) {
--				Application.debug("MacApplicationListener.getGGBInstance(): " + e.getMessage());
--				wnd = null;
--			}
--		}
--		return wnd;
--	}
--	
--	public synchronized void handleQuit(com.apple.eawt.ApplicationEvent ev) {
--		// quit all frames
--		Application app = getGGBInstance().getApplication();					
--		app.exitAll();	
--	}			
--						
--	public synchronized void handleAbout(com.apple.eawt.ApplicationEvent event) {
--		 event.setHandled(true);
--         Application app = getGGBInstance().getApplication();	
--         app.getGuiManager().showAboutDialog();
--     }
--
--	public synchronized void handleOpenFile(com.apple.eawt.ApplicationEvent ev) {	
--		Application.debug("handleOpenFile event, filename: " + ev.getFilename());
--		
--		// open file			
--		String fileName = ev.getFilename();		
--											
--		if (fileName != null) {				
--			File openFile = new File(fileName);
--			if (openFile.exists()) {
--				// get application instance
--				GeoGebraFrame ggb = getGGBInstance();
--				Application app = ggb.getApplication();
--				
--				// open file 
--				File [] files = { openFile };
--				boolean openInThisWindow = app.getCurrentFile() == null;
--				app.getGuiManager().doOpenFiles(files, openInThisWindow);
--				
--				// make sure window is visible
--				if (openInThisWindow)
--					ggb.setVisible(true);							
--			}
--		}
--	}
--	
--	public synchronized void handlePrintFile(com.apple.eawt.ApplicationEvent event) {
--		Application.debug("handlePrintFile event, filename: " + event.getFilename());
--		
--		handleOpenFile(event);
--		getGGBInstance().getApplication().getGuiManager().showPrintPreview();
--	}
--
--	public synchronized void handleOpenApplication(com.apple.eawt.ApplicationEvent ev) {
--		Application.debug("handleOpenApplication event, filename: " + ev.getFilename());
--		
--		// open file			
--		String fileName = ev.getFilename();		
--		if (fileName != null) {
--			handleOpenFile(ev);
--		} else {
--			GeoGebraFrame wnd = getGGBInstance();
--			if (!wnd.isShowing())
--				wnd.setVisible(true);
--		}
--	}
--
--	public synchronized void handlePreferences(com.apple.eawt.ApplicationEvent arg0) {
--		Application.debug("handlePreferences event, filename: " + arg0.getFilename());
--	}
--
--	public synchronized void handleReOpenApplication(com.apple.eawt.ApplicationEvent arg0) {
--		Application.debug("handleReOpenApplication event, filename: " + arg0.getFilename());
--	}
--		
--	
--}
--- 
-tg: (b5e82e7..) patch/no_mac (depends on: master)
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 9c9d63f..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,5 +0,0 @@
-patch/ScientificFormat.java.diff -p1
-patch/build.xml.diff -p1
-patch/flanagan_nonfree.diff -p1
-patch/jama.diff -p1
-patch/no_mac.diff -p1
diff --git a/debian/stamp-patched b/debian/stamp-patched
deleted file mode 100644
index e69de29..0000000
diff --git a/geogebra/GeoGebra.java b/geogebra/GeoGebra.java
index 2fc7cce..e042af5 100644
--- a/geogebra/GeoGebra.java
+++ b/geogebra/GeoGebra.java
@@ -19,8 +19,9 @@ import java.net.URL;
 public class GeoGebra extends Object {
 	
 	// GeoGebra version
-	public static final String BUILD_DATE = "June 19, 2010";
-	public static final String VERSION_STRING = "3.2.42.0";
+	public static final String BUILD_DATE = "July 21, 2010";
+	
+	public static final String VERSION_STRING = "3.2.43.0";
 	public static final String SHORT_VERSION_STRING = "3.2"; // used for online archive
 		
 	// File format versions
diff --git a/geogebra/cas/GeoGebraCAS.java b/geogebra/cas/GeoGebraCAS.java
index f9a308f..fca7591 100644
--- a/geogebra/cas/GeoGebraCAS.java
+++ b/geogebra/cas/GeoGebraCAS.java
@@ -130,8 +130,7 @@ public class GeoGebraCAS {
 			// where to find MathPiper scripts
 			//eg docBase = "jar:http://www.geogebra.org/webstart/alpha/geogebra_cas.jar!/";
 			String scriptBase = "jar:" + app.getCodeBase().toString() + 
-										Application.CAS_JAR_NAME + "!/";		
-			System.err.println(scriptBase);
+										Application.CAS_JAR_NAME + "!/";			
 
 			ggbMathPiper = Interpreters.getSynchronousInterpreter(scriptBase);
 			boolean success = initMyMathPiperFunctions();
diff --git a/geogebra/euclidian/DrawRay.java b/geogebra/euclidian/DrawRay.java
index 5e6553d..64d9f71 100644
--- a/geogebra/euclidian/DrawRay.java
+++ b/geogebra/euclidian/DrawRay.java
@@ -18,6 +18,7 @@ the Free Software Foundation.
 
 package geogebra.euclidian;
 
+import geogebra.euclidian.clipping.ClipLine;
 import geogebra.kernel.ConstructionDefaults;
 import geogebra.kernel.GeoElement;
 import geogebra.kernel.GeoLine;
@@ -55,8 +56,7 @@ implements Previewable {
     	this.view = view;
     	this.ray = ray;
     	geo = ray;
-    	    	
-    	
+
         update();
     }
     
@@ -79,18 +79,7 @@ implements Previewable {
         if (isVisible) { 
 			labelVisible = showLabel && geo.isLabelVisible();       
 			updateStrokes(ray);
-			
-			A = ray.getStartPoint();			
-			
-			// calc start point of ray in screen coords
-			a[0] = A.inhomX;
-			a[1] = A.inhomY;
-			view.toScreenCoords(a);
-
-			// calc direction vector of ray in screen coords
-			v[0] = ray.y * view.xscale;
-			v[1] = ray.x * view.yscale;
-			
+						
 			setClippedLine();
 			
 			 // line on screen?		
@@ -135,6 +124,16 @@ implements Previewable {
     }
     
     private void setClippedLine() {
+    	A = ray.getStartPoint();			
+		
+		// calc start point of ray in screen coords
+		A.getInhomCoords(a);
+		boolean onscreenA = view.toScreenCoords(a);
+
+		// calc direction vector of ray in screen coords
+		v[0] = ray.y * view.xscale;
+		v[1] = ray.x * view.yscale;
+		    	    	
 		// calc clip point C = a + lambda * v
 		double lambda;
 		if (Math.abs(v[0]) > Math.abs(v[1])) {
@@ -154,7 +153,21 @@ implements Previewable {
 			return;
 		}
 
-		line.setLine( a[0], a[1],  a[0] + 100*lambda * v[0], a[1] + 100*lambda * v[1]);		  
+		if (onscreenA ) {
+			// A on screen
+			line.setLine(a[0], a[1],  a[0] + lambda * v[0], a[1] + lambda * v[1]);
+		} else {
+			// A off screen
+			// clip ray at screen, that's important for huge coordinates of A
+			Point2D.Double [] clippedPoints = 
+				ClipLine.getClipped(a[0], a[1],  a[0] + lambda * v[0], a[1] + lambda * v[1], -EuclidianView.CLIP_DISTANCE, view.width + EuclidianView.CLIP_DISTANCE, -EuclidianView.CLIP_DISTANCE, view.height + EuclidianView.CLIP_DISTANCE);
+			if (clippedPoints == null) {
+				isVisible = false;	
+			} else {
+				line.setLine(clippedPoints[0].x, clippedPoints[0].y, clippedPoints[1].x, clippedPoints[1].y);
+			}
+		}
+		
     }
     
     final public void draw(Graphics2D g2) {
diff --git a/geogebra/euclidian/EuclidianController.java b/geogebra/euclidian/EuclidianController.java
index b65b0bd..0ad753f 100644
--- a/geogebra/euclidian/EuclidianController.java
+++ b/geogebra/euclidian/EuclidianController.java
@@ -1016,6 +1016,7 @@ MouseMotionListener, MouseWheelListener, ComponentListener {
 			// important for electronic whiteboards
 			if (movedGeoBoolean.isCheckboxFixed()) {
 				movedGeoBoolean.setValue(!movedGeoBoolean.getBoolean());
+				app.removeSelectedGeo(movedGeoBoolean); // make sure it doesn't get selected
 				movedGeoBoolean.updateCascade();
 
 			} 
@@ -1502,6 +1503,7 @@ MouseMotionListener, MouseWheelListener, ComponentListener {
 					GeoBoolean bool = (GeoBoolean)(hits.get(0));
 					if (!bool.isCheckboxFixed()) { // otherwise changed on mouse down
 						bool.setValue(!bool.getBoolean());
+						app.removeSelectedGeo(bool); // make sure doesn't get selected
 						bool.updateCascade();
 					}
 				}
diff --git a/geogebra/gui/ContextMenuGeoElement.java b/geogebra/gui/ContextMenuGeoElement.java
index 8e98e11..630565c 100644
--- a/geogebra/gui/ContextMenuGeoElement.java
+++ b/geogebra/gui/ContextMenuGeoElement.java
@@ -364,7 +364,7 @@ public class ContextMenuGeoElement extends JPopupMenu {
     		final GeoText geoText = (GeoText) geo;
     		 // show object
         	JCheckBoxMenuItem cbItem = new JCheckBoxMenuItem(app.getPlain("AbsoluteScreenLocation"));
-        	cbItem.setIcon(app.getEmptyIcon());
+        	app.setEmptyIcon(cbItem);
             cbItem.setSelected(geoText.isAbsoluteScreenLocActive());
             cbItem.addActionListener(new ActionListener() {
         		public void actionPerformed(ActionEvent e) {
@@ -457,7 +457,7 @@ public class ContextMenuGeoElement extends JPopupMenu {
             //  animation
             if (geo.isAnimatable()) {            	
                 cbItem = new JCheckBoxMenuItem( app.getPlain("Animating"));
-                cbItem.setIcon(app.getEmptyIcon());
+                app.setEmptyIcon(cbItem);
                 cbItem.setSelected(((GeoNumeric) geo).isAnimating() && app.getKernel().getAnimatonManager().isRunning());
                 cbItem.addActionListener(new ActionListener() {
                 	public void actionPerformed(ActionEvent e) {
@@ -498,7 +498,7 @@ public class ContextMenuGeoElement extends JPopupMenu {
             if (geo.isFixable() && (geo.isGeoText() || geo.isGeoImage())) {   
             	
             	cbItem = new JCheckBoxMenuItem( app.getPlain("FixObject"));
-                cbItem.setIcon(app.getEmptyIcon());
+                app.setEmptyIcon(cbItem);
                 cbItem.setSelected(geo.isFixed());
                 cbItem.addActionListener(new ActionListener() {
                 	public void actionPerformed(ActionEvent e) {
diff --git a/geogebra/gui/PropertiesDialogGeoElement.java b/geogebra/gui/PropertiesDialogGeoElement.java
index 9ed7cb0..9d57076 100644
--- a/geogebra/gui/PropertiesDialogGeoElement.java
+++ b/geogebra/gui/PropertiesDialogGeoElement.java
@@ -5248,6 +5248,7 @@ class ColorFunctionPanel
 				for (int i=0; i < geos.length; i++) {
 					GeoElement geo = (GeoElement) geos[i];	
 					geo.removeColorFunction();
+					geo.setObjColor(geo.getObjectColor());
 					geo.updateRepaint();
 				}
 				tfRed.setText("");
diff --git a/geogebra/gui/TextInputDialog.java b/geogebra/gui/TextInputDialog.java
index cd8aff7..c8f50e4 100644
--- a/geogebra/gui/TextInputDialog.java
+++ b/geogebra/gui/TextInputDialog.java
@@ -153,11 +153,11 @@ public class TextInputDialog extends InputDialog {
 						break;
 						
 					case 8: // 2x2 matrix
-						insertString("\\left(\\begin{array} a & b \\\\ c & d \\\\ \\end{array}\\right)");						
+						insertString("\\left(\\begin{array}{} a & b \\\\ c & d \\\\ \\end{array}\\right)");						
 						break;
 						
 					case 9: // 3x3 matrix
-						insertString("\\left(\\begin{array} a & b & c \\\\ d & e & f \\\\ g & h & i \\\\ \\end{array}\\right)");						
+						insertString("\\left(\\begin{array}{} a & b & c \\\\ d & e & f \\\\ g & h & i \\\\ \\end{array}\\right)");						
 						break;
 						
 					default:
diff --git a/geogebra/gui/menubar/MenubarImpl.java b/geogebra/gui/menubar/MenubarImpl.java
index 3658f3c..7a24880 100644
--- a/geogebra/gui/menubar/MenubarImpl.java
+++ b/geogebra/gui/menubar/MenubarImpl.java
@@ -331,45 +331,50 @@ public abstract class MenubarImpl extends JMenuBar implements Menubar {
 		menu.addSeparator();
 
 		cbShowAlgebraView = new JCheckBoxMenuItem(showAlgebraViewAction);		
-		cbShowAlgebraView.setIcon(app.getEmptyIcon());
+		app.setEmptyIcon(cbShowAlgebraView);
 		cbShowAlgebraView.setSelected(app.showAlgebraView());
 		setMenuShortCutShiftAccelerator(cbShowAlgebraView, 'A');
 		menu.add(cbShowAlgebraView);
 
 	    // Michael Borcherds 2008-01-14
 		cbShowSpreadsheet = new JCheckBoxMenuItem(showSpreadsheetAction);		
-		cbShowSpreadsheet.setIcon(app.getEmptyIcon());
+		app.setEmptyIcon(cbShowSpreadsheet);
 		cbShowSpreadsheet.setSelected(app.showSpreadsheetView());	
 		setMenuShortCutShiftAccelerator(cbShowSpreadsheet, 'S');
 		menu.add(cbShowSpreadsheet);		
 		
 		cbShowAuxiliaryObjects = new JCheckBoxMenuItem(
 				showAuxiliaryObjectsAction);
-		cbShowAuxiliaryObjects.setIcon(app.getEmptyIcon());
+		app.setEmptyIcon(cbShowAuxiliaryObjects);
 		cbShowAuxiliaryObjects.setSelected(app.showAuxiliaryObjects());
 		menu.add(cbShowAuxiliaryObjects);
 
 		cbHorizontalSplit = new JCheckBoxMenuItem(horizontalSplitAction);				
-		cbHorizontalSplit.setIcon(app.getEmptyIcon());
+		app.setEmptyIcon(cbHorizontalSplit);
 		menu.add(cbHorizontalSplit);
 
 		menu.addSeparator();
 
 		// show/hide cmdlist, algebra input
-		cbShowAlgebraInput = new JCheckBoxMenuItem(showAlgebraInputAction);		
+		cbShowAlgebraInput = new JCheckBoxMenuItem(showAlgebraInputAction);	
+		app.setEmptyIcon(cbShowAlgebraInput);
 		menu.add(cbShowAlgebraInput);
 
-		cbShowCmdList = new JCheckBoxMenuItem(showCmdListAction);		
+		cbShowCmdList = new JCheckBoxMenuItem(showCmdListAction);	
+		app.setEmptyIcon(cbShowCmdList);
 		menu.add(cbShowCmdList);
 		menu.addSeparator();
 
 		// Construction Protocol
 		cbShowConsProtNavigation = new JCheckBoxMenuItem(
 				showConsProtNavigationAction);
+		app.setEmptyIcon(cbShowConsProtNavigation);
 		cbShowConsProtNavigationPlay = new JCheckBoxMenuItem(
 				showConsProtNavigationPlayAction);
+		app.setEmptyIcon(cbShowConsProtNavigationPlay);
 		cbShowConsProtNavigationOpenProt = new JCheckBoxMenuItem(
 				showConsProtNavigationOpenProtAction);	
+		app.setEmptyIcon(cbShowConsProtNavigationOpenProt);
 		menu.add(constProtocolAction);
 		menu.add(cbShowConsProtNavigation);
 		menu.add(cbShowConsProtNavigationPlay);
@@ -690,8 +695,7 @@ public abstract class MenubarImpl extends JMenuBar implements Menubar {
 			}
 		};
 
-		showAlgebraInputAction = new AbstractAction(app.getMenu("InputField"),
-				app.getEmptyIcon()) {
+		showAlgebraInputAction = new AbstractAction(app.getMenu("InputField")) {
 			private static final long serialVersionUID = 1L;
 
 			public void actionPerformed(ActionEvent e) {
@@ -702,8 +706,7 @@ public abstract class MenubarImpl extends JMenuBar implements Menubar {
 			}
 		};
 
-		showCmdListAction = new AbstractAction(app.getMenu("CmdList"),
-				app.getEmptyIcon()) {
+		showCmdListAction = new AbstractAction(app.getMenu("CmdList")) {
 			private static final long serialVersionUID = 1L;
 
 			public void actionPerformed(ActionEvent e) {
@@ -739,8 +742,7 @@ public abstract class MenubarImpl extends JMenuBar implements Menubar {
 		};
 
 		showConsProtNavigationAction = new AbstractAction(
-				app.getPlain("ConstructionProtocolNavigation"),
-				app.getEmptyIcon()) {
+				app.getPlain("ConstructionProtocolNavigation")) {
 			private static final long serialVersionUID = 1L;
 
 			public void actionPerformed(ActionEvent e) {
@@ -753,8 +755,7 @@ public abstract class MenubarImpl extends JMenuBar implements Menubar {
 		};
 
 		showConsProtNavigationPlayAction = new AbstractAction(
-				app.getPlain("PlayButton"),
-				app.getEmptyIcon()) {
+				app.getPlain("PlayButton")) {
 			private static final long serialVersionUID = 1L;
 
 			public void actionPerformed(ActionEvent e) {
@@ -770,8 +771,7 @@ public abstract class MenubarImpl extends JMenuBar implements Menubar {
 		};
 
 		showConsProtNavigationOpenProtAction = new AbstractAction(
-				app.getPlain("ConstructionProtocolButton"),
-				app.getEmptyIcon()) {
+				app.getPlain("ConstructionProtocolButton")) {
 			private static final long serialVersionUID = 1L;
 
 			public void actionPerformed(ActionEvent e) {
@@ -1755,6 +1755,6 @@ public abstract class MenubarImpl extends JMenuBar implements Menubar {
         }
     }
     
-    
+
   
 }
diff --git a/geogebra/kernel/AlgoAppend.java b/geogebra/kernel/AlgoAppend.java
index ddc7508..4a42cd0 100644
--- a/geogebra/kernel/AlgoAppend.java
+++ b/geogebra/kernel/AlgoAppend.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoBinomial.java b/geogebra/kernel/AlgoBinomial.java
index 2416f74..8bdab5e 100644
--- a/geogebra/kernel/AlgoBinomial.java
+++ b/geogebra/kernel/AlgoBinomial.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoDefined.java b/geogebra/kernel/AlgoDefined.java
index 3b4fddf..13c5388 100644
--- a/geogebra/kernel/AlgoDefined.java
+++ b/geogebra/kernel/AlgoDefined.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoDeterminant.java b/geogebra/kernel/AlgoDeterminant.java
index 93a3106..af4c8e7 100644
--- a/geogebra/kernel/AlgoDeterminant.java
+++ b/geogebra/kernel/AlgoDeterminant.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoExpand.java b/geogebra/kernel/AlgoExpand.java
index e04a8ff..4046af8 100644
--- a/geogebra/kernel/AlgoExpand.java
+++ b/geogebra/kernel/AlgoExpand.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoFactor.java b/geogebra/kernel/AlgoFactor.java
index 2e84177..5ac9aa3 100644
--- a/geogebra/kernel/AlgoFactor.java
+++ b/geogebra/kernel/AlgoFactor.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoFirst.java b/geogebra/kernel/AlgoFirst.java
index 1c5faf7..c8c61ec 100644
--- a/geogebra/kernel/AlgoFirst.java
+++ b/geogebra/kernel/AlgoFirst.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoGCD.java b/geogebra/kernel/AlgoGCD.java
index 1088cf6..0f368a8 100644
--- a/geogebra/kernel/AlgoGCD.java
+++ b/geogebra/kernel/AlgoGCD.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoInsert.java b/geogebra/kernel/AlgoInsert.java
index 8cc255d..c3e62b6 100644
--- a/geogebra/kernel/AlgoInsert.java
+++ b/geogebra/kernel/AlgoInsert.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoIntegralDefinite.java b/geogebra/kernel/AlgoIntegralDefinite.java
index 06f6196..db64bba 100644
--- a/geogebra/kernel/AlgoIntegralDefinite.java
+++ b/geogebra/kernel/AlgoIntegralDefinite.java
@@ -38,10 +38,8 @@ public class AlgoIntegralDefinite extends AlgoElement {
     
     // for numerical adaptive GaussQuad integration  
     private static final int ORDER = 5;
-    private static final int MAX_ITER = 10;   
-    private static LegendreGaussIntegrator gauss;
-    private static int adaptiveGaussQuadCounter = 0;
-    private static final int MAX_GAUSS_QUAD_CALLS = 500;     
+    private static final int MAX_ITER = 100;   
+    private static LegendreGaussIntegrator gauss;  
 
     public AlgoIntegralDefinite(
         Construction cons,
@@ -171,32 +169,17 @@ public class AlgoIntegralDefinite extends AlgoElement {
      * quadrature approach.
      */
     public static double adaptiveGaussQuad(RealRootFunction fun, double a, double b) {
-    	adaptiveGaussQuadCounter = 0;
-    	double result = doAdaptiveGaussQuad(fun, a, b);
-    	
-    	//System.out.println("calls: " + adaptiveGaussQuadCounter);  
-    	return result;
-    }
-    
-    private static double doAdaptiveGaussQuad(RealRootFunction fun, double a, double b) {    		   	
-    	if (++adaptiveGaussQuadCounter > MAX_GAUSS_QUAD_CALLS) {
-    		return Double.NaN;
-    	}
-    	
     	// init GaussQuad classes for numerical integration
         if (gauss == null) {
             gauss = new LegendreGaussIntegrator(ORDER, MAX_ITER);
         }
     	
         // integrate using gauss quadrature
-        double sum;
 		try {
-			sum = gauss.integrate(new RealRootAdapter(fun), a, b);
+			return gauss.integrate(new RealRootAdapter(fun), a, b);
 		} catch (Exception e) {
-			sum = Double.NaN;
+			return Double.NaN;
 		} 
-
-        return sum;
     }
 
     final public String toString() {
diff --git a/geogebra/kernel/AlgoIntersection.java b/geogebra/kernel/AlgoIntersection.java
index bc64162..8e5107b 100644
--- a/geogebra/kernel/AlgoIntersection.java
+++ b/geogebra/kernel/AlgoIntersection.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoInvert.java b/geogebra/kernel/AlgoInvert.java
index 890b8e8..c5cf4dd 100644
--- a/geogebra/kernel/AlgoInvert.java
+++ b/geogebra/kernel/AlgoInvert.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoIsInteger.java b/geogebra/kernel/AlgoIsInteger.java
index 1a502fc..f577369 100644
--- a/geogebra/kernel/AlgoIsInteger.java
+++ b/geogebra/kernel/AlgoIsInteger.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoJoin.java b/geogebra/kernel/AlgoJoin.java
index e40a242..0dd7921 100644
--- a/geogebra/kernel/AlgoJoin.java
+++ b/geogebra/kernel/AlgoJoin.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
  */
diff --git a/geogebra/kernel/AlgoKeepIf.java b/geogebra/kernel/AlgoKeepIf.java
index fb68ed7..4bfe9f0 100644
--- a/geogebra/kernel/AlgoKeepIf.java
+++ b/geogebra/kernel/AlgoKeepIf.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoLCM.java b/geogebra/kernel/AlgoLCM.java
index 4b5ae1c..96c36bd 100644
--- a/geogebra/kernel/AlgoLCM.java
+++ b/geogebra/kernel/AlgoLCM.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoLast.java b/geogebra/kernel/AlgoLast.java
index df84d65..22ec5aa 100644
--- a/geogebra/kernel/AlgoLast.java
+++ b/geogebra/kernel/AlgoLast.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoListGCD.java b/geogebra/kernel/AlgoListGCD.java
index 6ff6c29..fdd8575 100644
--- a/geogebra/kernel/AlgoListGCD.java
+++ b/geogebra/kernel/AlgoListGCD.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoListLCM.java b/geogebra/kernel/AlgoListLCM.java
index d61845c..34081dc 100644
--- a/geogebra/kernel/AlgoListLCM.java
+++ b/geogebra/kernel/AlgoListLCM.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoPolynomialFromCoordinates.java b/geogebra/kernel/AlgoPolynomialFromCoordinates.java
index 5d2c7e8..78caa0b 100644
--- a/geogebra/kernel/AlgoPolynomialFromCoordinates.java
+++ b/geogebra/kernel/AlgoPolynomialFromCoordinates.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoPolynomialFromFunction.java b/geogebra/kernel/AlgoPolynomialFromFunction.java
index afdcc9c..9522ab7 100644
--- a/geogebra/kernel/AlgoPolynomialFromFunction.java
+++ b/geogebra/kernel/AlgoPolynomialFromFunction.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoRemoveUndefined.java b/geogebra/kernel/AlgoRemoveUndefined.java
index c551d59..2aa4c66 100644
--- a/geogebra/kernel/AlgoRemoveUndefined.java
+++ b/geogebra/kernel/AlgoRemoveUndefined.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoReverse.java b/geogebra/kernel/AlgoReverse.java
index be0a5bb..9ce27bd 100644
--- a/geogebra/kernel/AlgoReverse.java
+++ b/geogebra/kernel/AlgoReverse.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoRootNewton.java b/geogebra/kernel/AlgoRootNewton.java
index c148d30..b499f5c 100644
--- a/geogebra/kernel/AlgoRootNewton.java
+++ b/geogebra/kernel/AlgoRootNewton.java
@@ -20,6 +20,7 @@ import org.apache.commons.math.analysis.solvers.UnivariateRealSolverFactory;
 import geogebra.kernel.arithmetic.Function;
 import geogebra.kernel.arithmetic.NumberValue;
 import geogebra.kernel.roots.RealRootAdapter;
+import geogebra.kernel.roots.RealRootDerivAdapter;
 import geogebra.kernel.roots.RealRootDerivFunction;
 import geogebra.kernel.roots.RealRootUtil;
 
@@ -38,6 +39,7 @@ public class AlgoRootNewton extends AlgoElement {
     private GeoPoint rootPoint; // output 
 
     private GeoElement startGeo;
+    private UnivariateRealSolver rootFinderBrent, rootFinderNewton;
 
     public AlgoRootNewton(
         Construction cons,
@@ -94,46 +96,40 @@ public class AlgoRootNewton extends AlgoElement {
 
     final double calcRoot(Function fun, double start) {
     	double root = Double.NaN;
-    	
-    	UnivariateRealSolverFactory fact = UnivariateRealSolverFactory.newInstance();
-    	UnivariateRealSolver rootFinder = fact.newBrentSolver();
     	double [] borders = getDomain(fun, start);
-    	try {
-			root = rootFinder.solve(new RealRootAdapter(fun), borders[0], borders[1], start);
-		} catch (Exception e) {
-			root = Double.NaN;
-		}
 
-        /*
     	// for Newton's method we need the derivative of our function fun
         RealRootDerivFunction derivFun = fun.getRealRootDerivFunction();        
         
-        // no derivative found: let's use REGULA FALSI
-        if (derivFun == null) {
-        	double [] borders = getDomain(fun, start);
-        	try {
-        		root = rootFinder.brent(fun, borders[0], borders[1]);
-        	} catch (Exception e) {
-        		root = Double.NaN;
+        // derivative found: let's use Newton's method
+        if (derivFun != null) {
+        	if (rootFinderNewton == null) {
+        		UnivariateRealSolverFactory fact = UnivariateRealSolverFactory.newInstance();
+        		rootFinderNewton = fact.newNewtonSolver();
         	}
-        }
-        else {
-        	// NEWTON's METHOD
+
             try {        	                  	
-            	root = rootFinder.newtonRaphson(derivFun, start);                      
+            	root = rootFinderNewton.solve(new RealRootDerivAdapter(derivFun), borders[0], borders[1], start);
             } 
-            catch (IllegalArgumentException e) {   
-            	// BISECTION with NEWTON's METHOD
-                try {                               	        	
-                	// Newton's method failed because we left our function's domain
-                	// Let's search for a valid domain and try again using a restricted method
-                	double [] borders = getDomain(fun, start);
-                	root = rootFinder.bisectNewtonRaphson(derivFun, borders[0], borders[1]);                                
-                } catch (Exception ex) {
-                }                      	        	        	
+            catch (Exception e) {   
+            	e.printStackTrace();
+            	root = Double.NaN;                    	        	        	
             }
         }
-        */
+        
+        // if Newton didn't know the answer, let's ask Brent
+        if (Double.isNaN(root)) {
+        	if (rootFinderBrent == null) {
+        		UnivariateRealSolverFactory fact = UnivariateRealSolverFactory.newInstance();
+        		rootFinderBrent = fact.newBrentSolver();
+        	}
+        	
+        	try {		
+        		root = rootFinderBrent.solve(new RealRootAdapter(fun), borders[0], borders[1]);
+        	} catch (Exception e) {
+        		root = Double.NaN;
+        	}
+        }
               
         // check what we got
         if (Math.abs(fun.evaluate(root)) < Kernel.MIN_PRECISION )
diff --git a/geogebra/kernel/AlgoRootsPolynomial.java b/geogebra/kernel/AlgoRootsPolynomial.java
index cac5380..7af3d07 100644
--- a/geogebra/kernel/AlgoRootsPolynomial.java
+++ b/geogebra/kernel/AlgoRootsPolynomial.java
@@ -20,8 +20,10 @@ import java.util.Arrays;
 import java.util.Iterator;
 import java.util.LinkedList;
 
+import org.apache.commons.math.analysis.solvers.UnivariateRealSolver;
+
 /**
- * Finds all real roots of a polynomial.
+ * Finds all real roots of a polynomial using Brent's method.
  * TODO: extend for rational functions
  * 
  * @author Markus Hohenwarter
@@ -52,6 +54,8 @@ public class AlgoRootsPolynomial extends AlgoIntersect {
     // used for AlgoExtremumPolynomial, see setRootPoints()
     private Function diffFunction; // used for intersection of f and g
     private GeoPoint tempPoint;
+    
+    private UnivariateRealSolver rootFinder;
 
     /**
      * Computes all roots of f
diff --git a/geogebra/kernel/AlgoSimplify.java b/geogebra/kernel/AlgoSimplify.java
index 6f754c2..bd8f21e 100644
--- a/geogebra/kernel/AlgoSimplify.java
+++ b/geogebra/kernel/AlgoSimplify.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoSort.java b/geogebra/kernel/AlgoSort.java
index 87e38bf..b228dc2 100644
--- a/geogebra/kernel/AlgoSort.java
+++ b/geogebra/kernel/AlgoSort.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoTake.java b/geogebra/kernel/AlgoTake.java
index 04b83c7..7fa3bc6 100644
--- a/geogebra/kernel/AlgoTake.java
+++ b/geogebra/kernel/AlgoTake.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoTranspose.java b/geogebra/kernel/AlgoTranspose.java
index 89f7495..0f1c3c9 100644
--- a/geogebra/kernel/AlgoTranspose.java
+++ b/geogebra/kernel/AlgoTranspose.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoUnion.java b/geogebra/kernel/AlgoUnion.java
index 1234c5d..299b685 100644
--- a/geogebra/kernel/AlgoUnion.java
+++ b/geogebra/kernel/AlgoUnion.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/EquationSolver.java b/geogebra/kernel/EquationSolver.java
index 8f8dac4..0466abc 100644
--- a/geogebra/kernel/EquationSolver.java
+++ b/geogebra/kernel/EquationSolver.java
@@ -15,6 +15,7 @@ package geogebra.kernel;
 import org.apache.commons.math.ConvergenceException;
 import org.apache.commons.math.FunctionEvaluationException;
 import org.apache.commons.math.analysis.solvers.LaguerreSolver;
+import org.apache.commons.math.analysis.solvers.UnivariateRealSolver;
 import org.apache.commons.math.analysis.solvers.UnivariateRealSolverFactory;
 import org.apache.commons.math.complex.Complex;
 
@@ -27,8 +28,9 @@ public class EquationSolver {
 		
 	private static final double LAGUERRE_EPS = 1E-5;
 	private double epsilon = Kernel.STANDARD_PRECISION;
-	
-	//private ExtremumFinder extrFinder;
+
+	private LaguerreSolver laguerreSolver;
+	private UnivariateRealSolver rootFinderBrent, rootFinderNewton;
 	
     public EquationSolver(Kernel kernel) {		
 		// we need someone to polish our roots
@@ -394,9 +396,12 @@ public class EquationSolver {
 		// calc roots with Laguerre method
 		Complex[] complexRoots = null;
 		try {
-			complexRoots = new LaguerreSolver().solveAll(eqn, LAGUERRE_START);
+			if (laguerreSolver == null) {
+				laguerreSolver = new LaguerreSolver();
+			}
+			complexRoots = laguerreSolver.solveAll(eqn, LAGUERRE_START);
 		} catch (Exception e) {
-			e.printStackTrace();
+			System.err.println("EquationSolver.LaguerreSolver: "+e.getLocalizedMessage());
 		}
 	
 		// sort complexRoots by real part into laguerreRoots
@@ -423,16 +428,24 @@ public class EquationSolver {
 			double f_right = polyFunc.evaluate(right);
 			boolean bounded = f_left * f_right < 0.0; 
 			
-			UnivariateRealSolverFactory fact = UnivariateRealSolverFactory.newInstance();
 			try {					
-				if (bounded) {						
+				if (bounded) {		
+					if (rootFinderBrent == null) {
+						UnivariateRealSolverFactory fact = UnivariateRealSolverFactory.newInstance();
+						rootFinderBrent = fact.newBrentSolver();
+					}
+					
 					//	small f'(root): don't go too fare from our laguerre root !	
-					root = fact.newBrentSolver().solve(new RealRootAdapter(polyFunc), left, right);
+					root = rootFinderBrent.solve(new RealRootAdapter(polyFunc), left, right);
 					//System.out.println("Polish bisectNewtonRaphson: " + root);
 				} 
 				else {
+					if (rootFinderNewton == null) {
+						UnivariateRealSolverFactory fact = UnivariateRealSolverFactory.newInstance();
+						rootFinderNewton = fact.newNewtonSolver();
+					}
 					// the root is not bounded: give Mr. Newton a chance
-					root = fact.newNewtonSolver().solve(new RealRootAdapter(polyFunc), left, right, root);
+					root = rootFinderNewton.solve(new RealRootAdapter(polyFunc), left, right, root);
 					//System.out.println("Polish newtonRaphson: " + root);
 				}				
 			} 
@@ -441,7 +454,12 @@ public class EquationSolver {
 				// polishing failed: maybe we have an extremum here
 				// try to find a local extremum
 				try {		
-					root = fact.newBrentSolver().solve(new RealRootAdapter(derivFunc), left, right);
+					if (rootFinderBrent == null) {
+						UnivariateRealSolverFactory fact = UnivariateRealSolverFactory.newInstance();
+						rootFinderBrent = fact.newBrentSolver();
+					}
+					
+					root = rootFinderBrent.solve(new RealRootAdapter(derivFunc), left, right);
 					//System.out.println("    find extremum successfull: " + root);
 				} catch (Exception ex) {
 
diff --git a/geogebra/kernel/GeoElement.java b/geogebra/kernel/GeoElement.java
index e4f43e0..bb5ccd9 100644
--- a/geogebra/kernel/GeoElement.java
+++ b/geogebra/kernel/GeoElement.java
@@ -2051,10 +2051,24 @@ public abstract class GeoElement
 		// remove this object from List
 		if (isIndependent()) 
 			cons.removeFromConstructionList(this);
+		
+		// remove Listeners
+		AlgoElement algo = getParentAlgorithm();
+		if (algo instanceof EuclidianViewAlgo) {
+			cons.unregisterEuclidianViewAlgo((EuclidianViewAlgo)algo);
+		}
+
+		if (condShowObject != null) {
+			condShowObject.unregisterConditionListener(this);
+		}
+				
+		if (colFunction != null) {
+			colFunction.unregisterColorFunctionListener(this);
+		}
+
 
 		// remove all dependent algorithms		
 		if (algorithmList != null) {
-			AlgoElement algo;
 			Object[] algos = algorithmList.toArray();
 			for (int i = 0; i < algos.length; i++) {
 				algo = (AlgoElement) algos[i];
@@ -2068,8 +2082,8 @@ public abstract class GeoElement
 		}
 
 		// remove from selection
-		app.removeSelectedGeo(this, false);					
-				
+		app.removeSelectedGeo(this, false);		
+		
 		// notify views before we change labelSet
 		notifyRemove();
 		
diff --git a/geogebra/kernel/GeoList.java b/geogebra/kernel/GeoList.java
index c2bfc75..b3cf03d 100644
--- a/geogebra/kernel/GeoList.java
+++ b/geogebra/kernel/GeoList.java
@@ -163,6 +163,8 @@ public class GeoList extends GeoElement implements ListValue, LineProperties, Po
 			// copy color function
 			if (this.colFunction != null) {
 				geo.setColorFunction(this.colFunction);
+			} else {
+				geo.removeColorFunction();
 			}
 			
 			geo.setLineThickness(this.getLineThickness());
@@ -204,8 +206,9 @@ public class GeoList extends GeoElement implements ListValue, LineProperties, Po
     	int size = geoList.size();	        
         for (int i=0; i < size; i++) {
 			GeoElement geo = (GeoElement)geoList.get(i);
-			if (!geo.isLabelSet())
+			if (!geo.isLabelSet()) {
         		geo.removeColorFunction();
+			}
         }
 	}
 	
diff --git a/geogebra/kernel/GeoPolygon.java b/geogebra/kernel/GeoPolygon.java
index d83bf7c..554a423 100644
--- a/geogebra/kernel/GeoPolygon.java
+++ b/geogebra/kernel/GeoPolygon.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/Kernel.java b/geogebra/kernel/Kernel.java
index 0e4d7fe..d0256ab 100644
--- a/geogebra/kernel/Kernel.java
+++ b/geogebra/kernel/Kernel.java
@@ -4939,17 +4939,17 @@ public class Kernel {
 	}
 
 	/**
-	 * Returns whether x is greater than y
+	 * Returns whether x is greater than y	 	 
 	 */
 	final public boolean isGreater(double x, double y) {
-		return x > y;
+		return x > y + EPSILON;
 	}
-
+	
 	/**
-	 * Returns whether x is greater than or equal to y
+	 * Returns whether x is greater than or equal to y	 	 
 	 */
 	final public boolean isGreaterEqual(double x, double y) {
-		return x > y || isEqual(x, y);
+		return x + EPSILON > y;
 	}
 
 	// compares double arrays:
diff --git a/geogebra/kernel/arithmetic/Function.java b/geogebra/kernel/arithmetic/Function.java
index 9e094b5..7c16b17 100644
--- a/geogebra/kernel/arithmetic/Function.java
+++ b/geogebra/kernel/arithmetic/Function.java
@@ -256,6 +256,10 @@ implements ExpressionValue, RealRootFunction, Functional {
     	}
     }
     
+    public double evaluateDerivative(double x) {
+    	return getDerivative(1).evaluate(x);
+    }
+    
     /**
      * Returns this function's value at position x.
      * (Note: use this method if isBooleanFunction() returns true.
@@ -1249,6 +1253,10 @@ implements ExpressionValue, RealRootFunction, Functional {
 		public double evaluate(double x) { 
 			return fun.evaluate(x);
 		}
+
+		public double evaluateDerivative(double x) {
+			return derivative.evaluate(x);
+		}
     }
 	
 	public final boolean includesDivisionByVariable() {
diff --git a/geogebra/kernel/arithmetic/PolyFunction.java b/geogebra/kernel/arithmetic/PolyFunction.java
index 98c1884..6df2802 100644
--- a/geogebra/kernel/arithmetic/PolyFunction.java
+++ b/geogebra/kernel/arithmetic/PolyFunction.java
@@ -87,6 +87,10 @@ public class PolyFunction implements RealRootFunction, RealRootDerivFunction {
 		return deriv;
 	}
 	
+	final public double evaluateDerivative(double x) {
+		return evaluateDerivFunc(x)[1];
+	}
+	
 	/**
 	 * Evaluates polynomial and its derivative 
 	 */		 
diff --git a/geogebra/kernel/parser/Parser.jj b/geogebra/kernel/parser/Parser.jj
index 7d88d89..21d1002 100644
--- a/geogebra/kernel/parser/Parser.jj
+++ b/geogebra/kernel/parser/Parser.jj
@@ -173,7 +173,7 @@ TOKEN : {
         | "." <INTEGER> 
         | <INTEGER> "."
         >
- |     < EFLOAT: <FLOAT> "E"  (<MINUS>)? <INTEGER> >
+ |     < EFLOAT: <FLOAT> "E"  (<PLUS>|<MINUS>)? <INTEGER> >
   |     < #INTEGER: ( <DIGIT> )+ >
   |     < #DIGIT:                                     // unicode digits
        [
diff --git a/geogebra/kernel/parser/ParserTokenManager.java b/geogebra/kernel/parser/ParserTokenManager.java
index 5131aaf..3d12e7d 100644
--- a/geogebra/kernel/parser/ParserTokenManager.java
+++ b/geogebra/kernel/parser/ParserTokenManager.java
@@ -870,7 +870,7 @@ private int jjMoveNfa_0(int startState, int curPos)
                      jjCheckNAddTwoStates(138, 139);
                   break;
                case 140:
-                  if (curChar == 45)
+                  if ((0x280000000000L & l) != 0L)
                      jjCheckNAdd(141);
                   break;
                case 141:
diff --git a/geogebra/kernel/roots/RealRootAdapter.java b/geogebra/kernel/roots/RealRootAdapter.java
index 427a8ad..e6241c3 100644
--- a/geogebra/kernel/roots/RealRootAdapter.java
+++ b/geogebra/kernel/roots/RealRootAdapter.java
@@ -13,8 +13,10 @@ public class RealRootAdapter implements UnivariateRealFunction {
 
 	public double value(double x) throws FunctionEvaluationException {
 		double res = this.fun.evaluate(x);
-		if (res == Double.NaN) throw new FunctionEvaluationException(res);
-		return res;
+		if (Double.isInfinite(res) || Double.isNaN(res))
+			throw new FunctionEvaluationException(res);
+		else
+			return res;
 	}
 
 }
diff --git a/geogebra/kernel/roots/RealRootDerivAdapter.java b/geogebra/kernel/roots/RealRootDerivAdapter.java
new file mode 100644
index 0000000..65c8725
--- /dev/null
+++ b/geogebra/kernel/roots/RealRootDerivAdapter.java
@@ -0,0 +1,36 @@
+package geogebra.kernel.roots;
+
+import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.analysis.DifferentiableUnivariateRealFunction;
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+
+public class RealRootDerivAdapter implements
+		DifferentiableUnivariateRealFunction {
+
+	private RealRootDerivFunction derivFun;
+	
+	public RealRootDerivAdapter(RealRootDerivFunction derivFun) {
+		this.derivFun = derivFun;
+	}
+	
+	public UnivariateRealFunction derivative() {
+		return new UnivariateRealFunction() {
+			public double value(double x) throws FunctionEvaluationException {
+				double res = derivFun.evaluateDerivative(x);
+				if (Double.isInfinite(res) || Double.isNaN(res))
+					throw new FunctionEvaluationException(x);
+				else
+					return res;
+			}
+		};
+	}
+
+	public double value(double x) throws FunctionEvaluationException {
+		double res = derivFun.evaluate(x);
+		if (Double.isInfinite(res) || Double.isNaN(res))
+			throw new FunctionEvaluationException(x);
+		else
+			return res;
+	}
+	
+}
diff --git a/geogebra/kernel/roots/RealRootDerivFunction.java b/geogebra/kernel/roots/RealRootDerivFunction.java
index 055f023..ba4c964 100644
--- a/geogebra/kernel/roots/RealRootDerivFunction.java
+++ b/geogebra/kernel/roots/RealRootDerivFunction.java
@@ -7,4 +7,6 @@ public interface RealRootDerivFunction extends RealRootFunction {
 	 * @param x	 
 	 */
 	public double [] evaluateDerivFunc(double x);
+
+	public double evaluateDerivative(double x);
 }
diff --git a/geogebra/kernel/statistics/AlgoFitLineX.java b/geogebra/kernel/statistics/AlgoFitLineX.java
index 44ce8f7..ca6692c 100644
--- a/geogebra/kernel/statistics/AlgoFitLineX.java
+++ b/geogebra/kernel/statistics/AlgoFitLineX.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/statistics/AlgoFitLineY.java b/geogebra/kernel/statistics/AlgoFitLineY.java
index 6f6984b..4cb53ee 100644
--- a/geogebra/kernel/statistics/AlgoFitLineY.java
+++ b/geogebra/kernel/statistics/AlgoFitLineY.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/statistics/AlgoInverseNormal.java b/geogebra/kernel/statistics/AlgoInverseNormal.java
index 9fc9dac..a2a4f81 100644
--- a/geogebra/kernel/statistics/AlgoInverseNormal.java
+++ b/geogebra/kernel/statistics/AlgoInverseNormal.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/statistics/AlgoMedian.java b/geogebra/kernel/statistics/AlgoMedian.java
index 922d66a..8114511 100644
--- a/geogebra/kernel/statistics/AlgoMedian.java
+++ b/geogebra/kernel/statistics/AlgoMedian.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/statistics/AlgoMode.java b/geogebra/kernel/statistics/AlgoMode.java
index cfd9c35..03b7d3b 100644
--- a/geogebra/kernel/statistics/AlgoMode.java
+++ b/geogebra/kernel/statistics/AlgoMode.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/statistics/AlgoNormal.java b/geogebra/kernel/statistics/AlgoNormal.java
index 45ba9a0..92f30ec 100644
--- a/geogebra/kernel/statistics/AlgoNormal.java
+++ b/geogebra/kernel/statistics/AlgoNormal.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/statistics/AlgoQ1.java b/geogebra/kernel/statistics/AlgoQ1.java
index dee4c14..f461d67 100644
--- a/geogebra/kernel/statistics/AlgoQ1.java
+++ b/geogebra/kernel/statistics/AlgoQ1.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/statistics/AlgoQ3.java b/geogebra/kernel/statistics/AlgoQ3.java
index 96decf2..5cf4659 100644
--- a/geogebra/kernel/statistics/AlgoQ3.java
+++ b/geogebra/kernel/statistics/AlgoQ3.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/statistics/AlgoRandom.java b/geogebra/kernel/statistics/AlgoRandom.java
index 0f59fcf..71759f3 100644
--- a/geogebra/kernel/statistics/AlgoRandom.java
+++ b/geogebra/kernel/statistics/AlgoRandom.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
  */
diff --git a/geogebra/kernel/statistics/AlgoRandomBinomial.java b/geogebra/kernel/statistics/AlgoRandomBinomial.java
index 7bc18ee..c7cc926 100644
--- a/geogebra/kernel/statistics/AlgoRandomBinomial.java
+++ b/geogebra/kernel/statistics/AlgoRandomBinomial.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
  */
diff --git a/geogebra/kernel/statistics/AlgoRandomNormal.java b/geogebra/kernel/statistics/AlgoRandomNormal.java
index 21f2257..e173696 100644
--- a/geogebra/kernel/statistics/AlgoRandomNormal.java
+++ b/geogebra/kernel/statistics/AlgoRandomNormal.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
  */
diff --git a/geogebra/kernel/statistics/AlgoRandomPoisson.java b/geogebra/kernel/statistics/AlgoRandomPoisson.java
index 883513c..6de8a9b 100644
--- a/geogebra/kernel/statistics/AlgoRandomPoisson.java
+++ b/geogebra/kernel/statistics/AlgoRandomPoisson.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
  */
diff --git a/geogebra/main/Application.java b/geogebra/main/Application.java
index 6da86a4..d613cfa 100644
--- a/geogebra/main/Application.java
+++ b/geogebra/main/Application.java
@@ -88,6 +88,7 @@ import javax.imageio.ImageIO;
 import javax.swing.BorderFactory;
 import javax.swing.ImageIcon;
 import javax.swing.JApplet;
+import javax.swing.JCheckBoxMenuItem;
 import javax.swing.JComponent;
 import javax.swing.JDialog;
 import javax.swing.JFrame;
@@ -119,9 +120,7 @@ public abstract class Application implements KeyEventDispatcher {
 	// supported GUI languages (from properties files)
 	public static ArrayList supportedLocales = new ArrayList();
 	static {
-		// TODO: remove IS_PRE_RELEASE
-		if (GeoGebra.IS_PRE_RELEASE)
-			supportedLocales.add(new Locale("sq")); // Albanian
+		supportedLocales.add(new Locale("sq")); // Albanian
 		
 		supportedLocales.add(new Locale("ar")); // Arabic
 		supportedLocales.add(new Locale("eu")); // Basque
@@ -168,23 +167,17 @@ public abstract class Application implements KeyEventDispatcher {
 		supportedLocales.add(new Locale("ro")); // Romanian
 		supportedLocales.add(new Locale("ru")); // Russian
 		supportedLocales.add(new Locale("sr")); // Serbian
-		// TODO: remove IS_PRE_RELEASE
-		if (GeoGebra.IS_PRE_RELEASE)
-			supportedLocales.add(new Locale("si")); // Sinhala (Sri Lanka)
+		supportedLocales.add(new Locale("si")); // Sinhala (Sri Lanka)
 		
 		supportedLocales.add(new Locale("sk")); // Slovakian
 		supportedLocales.add(new Locale("sl")); // Slovenian
 		supportedLocales.add(new Locale("es")); // Spanish
 		supportedLocales.add(new Locale("sv")); // Swedish
 		// supportedLocales.add(new Locale("ty")); // Tahitian
-		// TODO: remove IS_PRE_RELEASE
-		if (GeoGebra.IS_PRE_RELEASE)
-			supportedLocales.add(new Locale("ta")); // Tamil
+		supportedLocales.add(new Locale("ta")); // Tamil
 		
 		// supportedLocales.add(new Locale("te")); // Telugu
-		// TODO: remove IS_PRE_RELEASE
-		if (GeoGebra.IS_PRE_RELEASE)
-			supportedLocales.add(new Locale("th")); // Thai
+		supportedLocales.add(new Locale("th")); // Thai
 
 		supportedLocales.add(new Locale("tr")); // Turkish
 		// supportedLocales.add(new Locale("uk")); // Ukrainian
@@ -3065,12 +3058,48 @@ public abstract class Application implements KeyEventDispatcher {
 	}
 
 	// check if we are on a mac
-	public static boolean MAC_OS = System.getProperty("os.name").toLowerCase(
-			Locale.US).startsWith("mac");
-	public static boolean WINDOWS = System.getProperty("os.name").toLowerCase(
-			Locale.US).startsWith("windows"); // Michael Borcherds 2008-03-21
+	public static String OS = System.getProperty("os.name").toLowerCase(Locale.US);
+	public static boolean MAC_OS = OS.startsWith("mac");
+	public static boolean WINDOWS = OS.startsWith("windows"); // Michael Borcherds 2008-03-21
+	
+			/* current possible values http://mindprod.com/jgloss/properties.html
+			 * AIX
+		Digital Unix
+		FreeBSD
+		HP UX
+		Irix
+		Linux
+		Mac OS
+		Mac OS X
+		MPE/iX
+		Netware 4.11
+		OS/2
+		Solaris
+		Windows 2000
+		Windows 7
+		Windows 95
+		Windows 98
+		Windows NT
+		Windows Vista
+		Windows XP */
+	
+	// make sure still works in the future on eg Windows 9 
+	public static boolean WINDOWS_VISTA_OR_LATER = WINDOWS && !OS.startsWith("windows 2000")
+														   && !OS.startsWith("windows 95")
+														   && !OS.startsWith("windows 98")
+														   && !OS.startsWith("windows nt")
+														   && !OS.startsWith("windows xp");
 
 	/*
+	 * needed for padding in Windows XP or earlier
+	 * without check, checkbox isn't shown in Vista, Win 7
+	 */
+    public void setEmptyIcon(JCheckBoxMenuItem cb) {
+        if (!WINDOWS_VISTA_OR_LATER)
+                cb.setIcon(getEmptyIcon());
+    }
+
+    /*
 	 * check for alt pressed (but not ctrl) (or ctrl but not alt on MacOS)
 	 */
 	public static boolean isAltDown(InputEvent e) {
diff --git a/unix/debcontrol/postinst b/unix/debcontrol/postinst
new file mode 100755
index 0000000..195b1b0
--- /dev/null
+++ b/unix/debcontrol/postinst
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ] ; then
+  # update desktop database
+  if [ -x /usr/bin/update-desktop-database ]; then
+    update-desktop-database -q /usr/share/applications
+  fi
+fi
+ # Automatically added by dh_installmime
+if [ "$1" = "configure" ] && [ -x "`which update-mime-database 2>/dev/null`" ]; then
+	update-mime-database /usr/share/mime
+fi
+# End automatically added section
+# Automatically added by dh_gconf
+if [ "$1" = "configure" ] && which update-gconf-defaults >/dev/null 2>&1; then
+	update-gconf-defaults 
+fi
+# End automatically added section
+
+
diff --git a/unix/debcontrol/postrm b/unix/debcontrol/postrm
new file mode 100755
index 0000000..7737dbe
--- /dev/null
+++ b/unix/debcontrol/postrm
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+
+ # Automatically added by dh_gconf
+if which update-gconf-defaults >/dev/null 2>&1; then
+	update-gconf-defaults 
+fi
+# End automatically added section
+# Automatically added by dh_installmime
+if [ -x "`which update-mime-database 2>/dev/null`" ]; then
+	update-mime-database /usr/share/mime
+fi
+# End automatically added section
+
+
diff --git a/unix/debrelease/Packages b/unix/debrelease/Packages
new file mode 100644
index 0000000..9e37258
--- /dev/null
+++ b/unix/debrelease/Packages
@@ -0,0 +1,21 @@
+*Package: geogebra
+*Version: [[version]]
+*Architecture: all
+*Maintainer: Markus Hohenwarter <markus at geogebra.org>
+*Installed-Size: [[installed.kb]]
+*Depends: sun-java6-jre | sun-java5-jre | default-jre
+*Recommends: sun-java6-jre | sun-java5-jre, imagemagick
+Filename: ./geogebra_[[version]]_all.deb
+Size: [[size]]
+MD5sum: [[md5]]
+SHA1: [[sha1]]
+SHA256: [[sha256]]
+*Section: math
+*Priority: optional
+*Description: Dynamic mathematics software for all levels of education
+ GeoGebra joins arithmetic, geometry, algebra and calculus. It offers multiple
+ representations of objects in its graphics, algebra, and spreadsheet views
+ that are all dynamically linked.
+ This package also contains a thumbnailer for .ggb files which runs only when
+ imagemagick is installed.
+
diff --git a/unix/debrelease/Release b/unix/debrelease/Release
new file mode 100644
index 0000000..d04a7cd
--- /dev/null
+++ b/unix/debrelease/Release
@@ -0,0 +1,10 @@
+Origin: GeoGebra unofficial repo
+Label: GeoGebra
+Codename: lucid
+Date: Sun, 04 Apr 2010 09:08:27 +0000
+Architectures: i386
+Components: main
+Description: GeoGebra -- Dynamic mathematics for everyone
+MD5Sum:
+ [[plain.md5]] [[plain.size]] main/binary-i386/Packages
+ [[gz.md5]] [[gz.size]] main/binary-i386/Packages.gz
diff --git a/unix/usr/bin/geogebra b/unix/usr/bin/geogebra
new file mode 100755
index 0000000..eee626a
--- /dev/null
+++ b/unix/usr/bin/geogebra
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+java -jar /usr/share/geogebra/lib/geogebra.jar "$@"
+
diff --git a/unix/usr/bin/ggthumb b/unix/usr/bin/ggthumb
new file mode 100755
index 0000000..67c9de8
--- /dev/null
+++ b/unix/usr/bin/ggthumb
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+urldecode(){
+  echo -e "$(sed 'y/+/ /; s/%/\\x/g')"
+}
+
+mkdir /tmp/ggthumb
+f=`echo -n $3| sed 's/file:\/\///'|urldecode`
+cp "$f" /tmp/ggthumb/ggt.zip
+unzip -qq /tmp/ggthumb/ggt.zip -d /tmp/ggthumb
+convert -resize $2 /tmp/ggthumb/geogebra_thumbnail.png $4 2>/dev/null
+echo "$3 $f $?">>/tmp/glog
+rm -rf /tmp/ggthumb
diff --git a/unix/usr/share/applications/geogebra.desktop b/unix/usr/share/applications/geogebra.desktop
new file mode 100644
index 0000000..1631774
--- /dev/null
+++ b/unix/usr/share/applications/geogebra.desktop
@@ -0,0 +1,24 @@
+[Desktop Entry]
+Name=GeoGebra
+GenericName=Dynamic mathematics software
+GenericName[cs]=Dynamický matematický software
+GenericName[de]=Dynamische Mathematiksoftware
+GenericName[es]=Programa de matemáticas dinámico
+GenericName[fr]=Logiciel de Mathématiques dynamiques
+GenericName[hi]=सक्रिय गणितीय सॉफ्टवेर 
+GenericName[it]=Software di matematica dinamica
+GenericName[pt_BR]=Programa de Matemática Dinâmica
+Comment=Create interactive mathematical constructions and applets. 
+Comment[cs]=Vytvořte interaktivní konstrukce a aplety.
+Comment[de]=Erstelle interaktive Konstruktionen und Applets.
+Comment[fr]=Créer des constructions mathématiques et des appliquettes.
+Comment[hi]=संवादात्मक गणितीय निर्माण और एप्लेट बनाएँ
+Comment[it]=Creazione di costruzioni matematiche e applet interattive.
+Comment[pt_BR]=Crie construções matemáticas interativas e applets.
+Exec=geogebra
+Icon=geogebra.png
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=Science;Math;Education
+MimeType=application/vnd.geogebra.file;application/vnd.geogebra.tool;
diff --git a/unix/usr/share/doc/geogebra/README.Debian b/unix/usr/share/doc/geogebra/README.Debian
new file mode 100644
index 0000000..1f791c9
--- /dev/null
+++ b/unix/usr/share/doc/geogebra/README.Debian
@@ -0,0 +1,8 @@
+geogebra for Debian
+-------------------
+
+For GeoGebra to work properly, you may have to replace the openjdk by
+sun-java6. For more details see 
+http://www.geogebra.org/en/wiki/index.php/GeoGebra_in_Linux
+
+ -- Zbynek Konecny (Kondr) <kondr at lesnimoudrost.cz>  Mon, 29 Mar 2010 00:12:03 +0200
diff --git a/unix/usr/share/doc/geogebra/changelog.gz b/unix/usr/share/doc/geogebra/changelog.gz
new file mode 100644
index 0000000..6a23cff
Binary files /dev/null and b/unix/usr/share/doc/geogebra/changelog.gz differ
diff --git a/unix/usr/share/doc/geogebra/copyright b/unix/usr/share/doc/geogebra/copyright
new file mode 100644
index 0000000..a0bb4b7
--- /dev/null
+++ b/unix/usr/share/doc/geogebra/copyright
@@ -0,0 +1,36 @@
+This package was debianized by George Sturr <george at geogebra.org> 
+Sat, 03 Apr 2010 21:39:06 +0100.
+
+It was downloaded from http://www.geogebra.org/
+
+Upstream Authors:
+
+    Markus Hohenwarter <markus at geogebra.org>
+    Michael Borcherds  <michael at geogebra.org>
+    Mathieu Blosier <mathieu at geogebra.org>
+    Judith Hohenwarter <judith at geogebra.org> 
+    Zoltan Kovacs <zoltan at geogebra.org>
+    Yves Kreis <yves at geogebra.org>
+    Florian Sonner <florian at geogebra.org>
+    George Sturr <george at geogebra.org>
+    
+Copyright:
+
+    Copyright (C) 2010 International GeoGebra Institute
+
+License:
+
+    GPL v2 and Creative Commons Attribution-Share Alike 3.0
+
+The Debian packaging is:
+
+    Copyright (C) 2010 George Sturr <george at geogebra.org>
+
+and is licensed under the GPL version 3, 
+see `/usr/share/common-licenses/GPL-3'.
+
+All GeoGebra language and documentation files are subject to 
+   the following Creative Commons Attribution-Share Alike License; 
+   either version 3.0 of the License, or (at your option) any later 
+   version (see http://creativecommons.org/licenses/by-sa/3.0/):
+
diff --git a/unix/usr/share/gconf/defaults/10_geogebra b/unix/usr/share/gconf/defaults/10_geogebra
new file mode 100644
index 0000000..e7b1a74
--- /dev/null
+++ b/unix/usr/share/gconf/defaults/10_geogebra
@@ -0,0 +1,3 @@
+/desktop/gnome/thumbnailers/application at geogebra.vnd.file/command /usr/bin/ggthumb -s %s %u %o
+/desktop/gnome/thumbnailers/application at geogebra.vnd.file/enable true
+
diff --git a/unix/usr/share/icons/hicolor/48x48/apps/geogebra.png b/unix/usr/share/icons/hicolor/48x48/apps/geogebra.png
new file mode 100644
index 0000000..fbd66e6
Binary files /dev/null and b/unix/usr/share/icons/hicolor/48x48/apps/geogebra.png differ
diff --git a/unix/usr/share/icons/hicolor/48x48/mimetypes/application-vnd.geogebra.file.png b/unix/usr/share/icons/hicolor/48x48/mimetypes/application-vnd.geogebra.file.png
new file mode 100644
index 0000000..fbd66e6
Binary files /dev/null and b/unix/usr/share/icons/hicolor/48x48/mimetypes/application-vnd.geogebra.file.png differ
diff --git a/unix/usr/share/icons/hicolor/48x48/mimetypes/application-vnd.geogebra.tool.png b/unix/usr/share/icons/hicolor/48x48/mimetypes/application-vnd.geogebra.tool.png
new file mode 100644
index 0000000..fbd66e6
Binary files /dev/null and b/unix/usr/share/icons/hicolor/48x48/mimetypes/application-vnd.geogebra.tool.png differ
diff --git a/unix/usr/share/man/man1/geogebra.1.gz b/unix/usr/share/man/man1/geogebra.1.gz
new file mode 100644
index 0000000..4b76848
Binary files /dev/null and b/unix/usr/share/man/man1/geogebra.1.gz differ
diff --git a/unix/usr/share/man/man1/ggthumb.1.gz b/unix/usr/share/man/man1/ggthumb.1.gz
new file mode 100644
index 0000000..74aeb28
Binary files /dev/null and b/unix/usr/share/man/man1/ggthumb.1.gz differ
diff --git a/unix/usr/share/mime/packages/geogebra.xml b/unix/usr/share/mime/packages/geogebra.xml
new file mode 100644
index 0000000..e908dab
--- /dev/null
+++ b/unix/usr/share/mime/packages/geogebra.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+  <mime-type type="application/vnd.geogebra.file">
+         <comment>GeoGebra worksheet</comment>
+         <comment xml:lang="cs">Pracovní list GeoGebry</comment>
+         <comment xml:lang="de">GeoGebra Arbeitsblatt</comment>
+         <comment xml:lang="es">Archivo GeoGebra</comment>
+         <comment xml:lang="fr">Feuille de travail GeoGebra </comment>
+         <comment xml:lang="hi">जीओ-जेब्रा कार्य-पत्र</comment>
+         <comment xml:lang="it">Foglio di lavoro GeoGebra </comment>
+         <comment xml:lang="pt-BR">Planilha GeoGebra</comment>
+         <glob pattern="*.ggb"/>
+  </mime-type>
+  <mime-type type="application/vnd.geogebra.tool">
+         <comment>GeoGebra tool</comment>
+         <comment xml:lang="cs">Nástroj GeoGebry</comment>
+         <comment xml:lang="de">GeoGebra Werkzeug</comment>
+         <comment xml:lang="es">Herramienta GeoGebra</comment>
+         <comment xml:lang="fr">Outil GeoGebra</comment>
+         <comment xml:lang="hi">जीओ-जेब्रा साधन</comment>
+         <comment xml:lang="it">Strumento GeoGebra</comment>
+         <comment xml:lang="pt-BR">Ferramenta GeoGebra</comment>
+         <glob pattern="*.ggt"/>
+  </mime-type>
+</mime-info>
diff --git a/unix/usr/share/pixmaps/geogebra.png b/unix/usr/share/pixmaps/geogebra.png
new file mode 100644
index 0000000..fbd66e6
Binary files /dev/null and b/unix/usr/share/pixmaps/geogebra.png differ


hooks/post-receive
-- 
GeoGebra: Dynamic mathematics software for education



More information about the pkg-java-commits mailing list