[SCM] GeoGebra: Dynamic mathematics software for education branch, build, updated. debian/3.2.47.0+dfsg1-1-29-g84ae449
Giovanni Mascellani
mascellani at poisson.phc.unipi.it
Sat Dec 24 09:35:21 UTC 2011
The following commit has been merged in the build branch:
commit 471cd86c8bb504bd65a1615886f165d5f67c2ed4
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date: Thu Dec 8 15:38:55 2011 +0100
Patches updated.
diff --git a/debian/patches/patch/ScientificFormat.java.diff b/debian/patches/patch/ScientificFormat.java.diff
index 672fd96..6cf0d22 100644
--- a/debian/patches/patch/ScientificFormat.java.diff
+++ b/debian/patches/patch/ScientificFormat.java.diff
@@ -10,10 +10,10 @@ Signed-off-by: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/geogebra/util/ScientificFormat.java b/geogebra/util/ScientificFormat.java
-index e9fb8c9..d903341 100644
+index 839e673..d983c7f 100644
--- a/geogebra/util/ScientificFormat.java
+++ b/geogebra/util/ScientificFormat.java
-@@ -70,17 +70,17 @@ public class ScientificFormat extends Format
+@@ -69,17 +69,17 @@ public class ScientificFormat extends Format
toAppendTo.append(format(dwe.getValue()));
if (dwe.hasAsymmetricError())
{
@@ -34,7 +34,7 @@ index e9fb8c9..d903341 100644
int errorSigDigit = resolveErrorSigDigit(dwe.getValue(),dwe.getError());
toAppendTo.append(format(dwe.getError(),errorSigDigit));
}
-@@ -238,4 +238,4 @@ public class ScientificFormat extends Format
+@@ -237,4 +237,4 @@ public class ScientificFormat extends Format
// return format(dx, resolveErrorSigDigit(d, dx));
// }
@@ -42,4 +42,4 @@ index e9fb8c9..d903341 100644
\ No newline at end of file
+}
--
-tg: (96b0c0d..) patch/ScientificFormat.java (depends on: master)
+tg: (87975a1..) patch/ScientificFormat.java (depends on: master)
diff --git a/debian/patches/patch/applet_export.diff b/debian/patches/patch/applet_export.diff
index b3d42b4..3f3e900 100644
--- a/debian/patches/patch/applet_export.diff
+++ b/debian/patches/patch/applet_export.diff
@@ -11,14 +11,14 @@ Signed-off-by: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/geogebra/export/WorksheetExportDialog.java b/geogebra/export/WorksheetExportDialog.java
-index fd5eb93..c52b647 100644
+index b489be3..bb7a89c 100644
--- a/geogebra/export/WorksheetExportDialog.java
+++ b/geogebra/export/WorksheetExportDialog.java
-@@ -679,10 +679,15 @@ public class WorksheetExportDialog extends JDialog {
- * whether a signed or unsigned applet is needed for the options set.
+@@ -1109,10 +1109,15 @@ public class WorksheetExportDialog extends JDialog {
+ * unsigned applet is needed for the options set.
*/
private URL getAppletCodebase() {
-- URL codebase = app.getCodeBase();
+- URL codebase = Application.getCodeBase();
+ URL codebase = null;
+ try {
+ codebase = new URL("http://www.geogebra.org/webstart/");
@@ -27,10 +27,10 @@ index fd5eb93..c52b647 100644
+ }
if (!cbSavePrint.isSelected()) {
try {
-- codebase = new URL(app.getCodeBase(), "unsigned/");
+- codebase = new URL(Application.getCodeBase(), "unsigned/");
+ codebase = new URL(codebase, "unsigned/");
} catch (Exception e) {
e.printStackTrace();
}
--
-tg: (96b0c0d..) patch/applet_export (depends on: master)
+tg: (87975a1..) patch/applet_export (depends on: master)
diff --git a/debian/patches/patch/build.xml.diff b/debian/patches/patch/build.xml.diff
deleted file mode 100644
index f267965..0000000
--- a/debian/patches/patch/build.xml.diff
+++ /dev/null
@@ -1,529 +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 | 432 ++++++++-----------------------------------------------------
- 1 files changed, 56 insertions(+), 376 deletions(-)
-
-diff --git a/build.xml b/build.xml
-index 668c4e0..3a624dc 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="../buildggb32/tempproperties"/>
-- <property name="build.dir" location="../buildggb32"/>
-- <property name="temp.dir" location="../buildggb32/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,30 @@ 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-io.jar
-+ /usr/share/java/freehep-io-tests.jar
-+ /usr/share/java/freehep-export.jar
-+ /usr/share/java/freehep-swing.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 +107,11 @@ office at geogebra.org
- <fileset dir="${build.dir}" includes="**/geogebra*.jar, **/gluegen-rt.jar, **/jogl.jar, **/jlatexmath.jar, **/jlm_*.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 +142,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 +165,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 +189,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 +199,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 +209,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 +217,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'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,280 +282,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>
--
--
-- <!--builds BSD package -->
-- <target name="packageBSD" depends="readVersion">
-- <property name="bsd.name" value="geogebra-${fullversion}"/>
-- <tar destfile="${build.dir}/packages/${bsd.name}-src.tar.gz" compression="gzip" longfile="gnu">
-- <tarfileset dir="${src.dir}/unix/bsd"
-- prefix="geogebra-${fullversion}">
-- <include name="**"/>
-- </tarfileset>
-- <tarfileset dir="${src.dir}"
-- fullpath="license.txt">
-- <include name="_LICENSE.txt"/>
-- </tarfileset>
-- <tarfileset dir="${build.dir}/unpacked"
-- prefix="${bsd.name}">
-- <include name="**"/>
-- </tarfileset>
-- <tarfileset dir="${build.dir}/unsigned/unpacked"
-- prefix="${bsd.name}/unsigned">
-- <include name="**"/>
-- </tarfileset>
-- <tarfileset dir="${src.dir}/geogebra"
-- prefix="geogebra-${fullversion}/src/geogebra">
-- <include name="**"/>
-- <exclude name="**/*.class"/>
-- </tarfileset>
-- <tarfileset dir="${src.dir}/org"
-- prefix="geogebra-${fullversion}/src/org">
-- <include name="**"/>
-- <exclude name="**/*.class"/>
-- </tarfileset>
-- <tarfileset dir="${src.dir}/jasymca"
-- prefix="geogebra-${fullversion}/src/jasymca">
-- <include name="**"/>
-- <exclude name="**/*.class"/>
-- </tarfileset>
-- <tarfileset dir="${src.dir}/META-INF"
-- prefix="geogebra-${fullversion}/src/META-INF">
-- <include name="**"/>
-- <exclude name="**/*.class"/>
-- </tarfileset>
-- </tar>
-- </target>
--
-- <!--builds Debian package -->
-- <target name="package" depends="readVersion">
-- <taskdef name="deb" classname="com.googlecode.ant_deb_task.Deb"
-- classpath="ant-deb-0.0.1.jar"/>
--
--
-- <property name="deb.tree" value="${build.dir}/deb"/>
-- <property name="deb.version" value="${fullversion}"/>
-- <property name="deb.packages" value="${build.dir}/packages"/>
-- <property name="deb.package" value="${deb.packages}/geogebra_${deb.version}_all.deb"/>
-- <mkdir dir="${deb.packages}"/>
--
--
--
-- <deb toDir="${deb.packages}" postinst="unix/debcontrol/postinst"
-- package="geogebra"
-- version="${deb.version}"
-- postrm="unix/debcontrol/postrm"
-- section="math"
-- priority="optional"
-- maintainer="Markus Hohenwarter <markus at geogebra.org>"
-- architecture="all"
-- recommends="sun-java6-jre | sun-java5-jre, imagemagick"
-- depends="sun-java6-jre | sun-java5-jre | default-jre"
-- packageEntry="${deb.packages}/Packages"
-- repoLocation=""
-- >
-- <description synopsis="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.
-- </description>
-- <tarfileset dir="${src.dir}/unix/usr/share" prefix="./usr/share"/>
-- <tarfileset dir="${src.dir}/unix/usr/bin" prefix="./usr/bin" filemode="755"/>
-- <tarfileset dir="${build.dir}/unpacked" prefix="./usr/share/geogebra/lib"/>
-- <tarfileset dir="${build.dir}/unsigned/unpacked" prefix="./usr/share/geogebra/lib/unsigned"/>
-- </deb>
--
--
-- </target>
--
-- <!-- makes necessary Release & Packages files for Debian repo-->
-- <target name="release" depends="package">
-- <gzip src="${deb.packages}/Packages" destfile="${deb.packages}/Packages.gz"/>
-- <length file="${deb.packages}/Packages" property="packplain.size"/>
-- <length file="${deb.packages}/Packages.gz" property="packgz.size"/>
-- <checksum file="${deb.packages}/Packages" algorithm="MD5" property="packplain.md5"/>
-- <checksum file="${deb.packages}/Packages.gz" algorithm="MD5" property="packgz.md5"/>
-- <copy todir="${deb.packages}">
-- <fileset file="unix/debrelease/Release"/>
-- <filterset begintoken="[[" endtoken="]]">
-- <filter token="plain.size" value="${packplain.size}"/>
-- <filter token="gz.size" value="${packgz.size}"/>
-- <filter token="plain.md5" value="${packplain.md5}"/>
-- <filter token="gz.md5" value="${packgz.md5}"/>
-- </filterset>
-- </copy>
-- </target>
--</project>
-\ No newline at end of file
-+</project>
-+
---
-tg: (96b0c0d..) 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 1c93a55..0000000
--- a/debian/patches/patch/flanagan_nonfree.diff
+++ /dev/null
@@ -1,785 +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 | 55 +++++-------------
- geogebra/kernel/AlgoRootInterval.java | 19 ++++--
- geogebra/kernel/AlgoRootNewton.java | 60 +++++++++++---------
- geogebra/kernel/AlgoRootsPolynomial.java | 6 ++-
- geogebra/kernel/EquationSolver.java | 53 +++++++++++++-----
- geogebra/kernel/GeoVec2D.java | 47 ++++++++--------
- geogebra/kernel/arithmetic/Function.java | 8 +++
- geogebra/kernel/arithmetic/PolyFunction.java | 4 +
- geogebra/kernel/integration/EllipticArcLength.java | 2 -
- geogebra/kernel/roots/RealRootAdapter.java | 22 +++++++
- geogebra/kernel/roots/RealRootDerivAdapter.java | 36 ++++++++++++
- geogebra/kernel/roots/RealRootDerivFunction.java | 2 +
- geogebra/kernel/roots/RealRootFunction.java | 5 ++
- 14 files changed, 220 insertions(+), 127 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..db64bba 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,11 +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 int adaptiveGaussQuadCounter = 0;
-- private static final int MAX_GAUSS_QUAD_CALLS = 500;
-+ private static final int ORDER = 5;
-+ private static final int MAX_ITER = 100;
-+ private static LegendreGaussIntegrator gauss;
-
- public AlgoIntegralDefinite(
- Construction cons,
-@@ -167,44 +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 (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);
-- }
-+ try {
-+ return gauss.integrate(new RealRootAdapter(fun), a, b);
-+ } catch (Exception e) {
-+ return Double.NaN;
-+ }
- }
-
- 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..b499f5c 100644
---- a/geogebra/kernel/AlgoRootNewton.java
-+++ b/geogebra/kernel/AlgoRootNewton.java
-@@ -12,9 +12,15 @@ 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.RealRootDerivAdapter;
- import geogebra.kernel.roots.RealRootDerivFunction;
- import geogebra.kernel.roots.RealRootUtil;
-
-@@ -33,7 +39,7 @@ public class AlgoRootNewton extends AlgoElement {
- private GeoPoint rootPoint; // output
-
- private GeoElement startGeo;
-- private RealRoot rootFinder;
-+ private UnivariateRealSolver rootFinderBrent, rootFinderNewton;
-
- public AlgoRootNewton(
- Construction cons,
-@@ -45,8 +51,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 +61,6 @@ public class AlgoRootNewton extends AlgoElement {
-
- AlgoRootNewton(Construction cons) {
- super(cons);
-- rootFinder = new RealRoot();
- }
-
- protected String getClassName() {
-@@ -93,35 +96,40 @@ public class AlgoRootNewton extends AlgoElement {
-
- final double calcRoot(Function fun, double start) {
- double root = Double.NaN;
--
-+ double [] borders = getDomain(fun, start);
-+
- // 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/EquationSolver.java b/geogebra/kernel/EquationSolver.java
-index a3ad579..0466abc 100644
---- a/geogebra/kernel/EquationSolver.java
-+++ b/geogebra/kernel/EquationSolver.java
-@@ -12,25 +12,28 @@ 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.UnivariateRealSolver;
-+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;
-+
-+ private LaguerreSolver laguerreSolver;
-+ private UnivariateRealSolver rootFinderBrent, rootFinderNewton;
-
- public EquationSolver(Kernel kernel) {
- // we need someone to polish our roots
-- rootPolisher = new RealRoot();
- //extrFinder = kernel.getExtremumFinder();
- }
-
-@@ -391,8 +394,15 @@ 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 {
-+ if (laguerreSolver == null) {
-+ laguerreSolver = new LaguerreSolver();
-+ }
-+ complexRoots = laguerreSolver.solveAll(eqn, LAGUERRE_START);
-+ } catch (Exception e) {
-+ System.err.println("EquationSolver.LaguerreSolver: "+e.getLocalizedMessage());
-+ }
-
- // sort complexRoots by real part into laguerreRoots
- double [] laguerreRoots = new double[complexRoots.length];
-@@ -419,14 +429,23 @@ public class EquationSolver {
- boolean bounded = f_left * f_right < 0.0;
-
- 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 = rootPolisher.bisectNewtonRaphson(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 = rootPolisher.newtonRaphson(polyFunc, root);
-+ root = rootFinderNewton.solve(new RealRootAdapter(polyFunc), left, right, root);
- //System.out.println("Polish newtonRaphson: " + root);
- }
- }
-@@ -435,10 +454,16 @@ public class EquationSolver {
- // polishing failed: maybe we have an extremum here
- // try to find a local extremum
- try {
-- root = rootPolisher.bisectNewtonRaphson(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) {
-- 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/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/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..e6241c3
---- /dev/null
-+++ b/geogebra/kernel/roots/RealRootAdapter.java
-@@ -0,0 +1,22 @@
-+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 (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/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: (96b0c0d..) patch/flanagan_nonfree (depends on: master)
diff --git a/debian/patches/patch/geogebra.desktop.diff b/debian/patches/patch/geogebra.desktop.diff
deleted file mode 100644
index 020f095..0000000
--- a/debian/patches/patch/geogebra.desktop.diff
+++ /dev/null
@@ -1,71 +0,0 @@
-From: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
-Subject: [PATCH] patch/geogebra.desktop
-
-This patch fixes the categories of geogebra.desktop, in order
-to make Education the preferred one.
-
-Signed-off-by: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
-
----
- unix/usr/share/applications/geogebra.desktop | 51 +++++++++++++-------------
- 1 files changed, 25 insertions(+), 26 deletions(-)
-
-diff --git a/unix/usr/share/applications/geogebra.desktop b/unix/usr/share/applications/geogebra.desktop
-index 329279a..3d0dc73 100644
---- a/unix/usr/share/applications/geogebra.desktop
-+++ b/unix/usr/share/applications/geogebra.desktop
-@@ -1,26 +1,25 @@
--#!/usr/bin/env xdg-open
--[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 %F
--Icon=geogebra
--Terminal=false
--Type=Application
--StartupNotify=true
--StartupWMClass=geogebra-GeoGebra
--Categories=Education;Math
--MimeType=application/vnd.geogebra.file;application/vnd.geogebra.tool;
-\ No newline at end of file
-+[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 %F
-+Icon=geogebra
-+Terminal=false
-+Type=Application
-+StartupNotify=true
-+StartupWMClass=geogebra-GeoGebra
-+Categories=Education;Math
-+MimeType=application/vnd.geogebra.file;application/vnd.geogebra.tool;
---
-tg: (96b0c0d..) patch/geogebra.desktop (depends on: master)
diff --git a/debian/patches/patch/jama.diff b/debian/patches/patch/jama.diff
deleted file mode 100644
index 7fa8b71..0000000
--- a/debian/patches/patch/jama.diff
+++ /dev/null
@@ -1,194 +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 | 74 ++++++++++++------------
- geogebra/kernel/statistics/RegressionMath.java | 2 +-
- 4 files changed, 39 insertions(+), 41 deletions(-)
-
-diff --git a/geogebra/kernel/AlgoInvert.java b/geogebra/kernel/AlgoInvert.java
-index b7493eb..ce611f3 100644
---- a/geogebra/kernel/AlgoInvert.java
-+++ b/geogebra/kernel/AlgoInvert.java
-@@ -81,7 +81,7 @@ public class AlgoInvert extends AlgoElement {
- return;
- }*/
-
-- matrix.inverseImmediate();
-+ matrix = matrix.ggbInverse();
-
- if (matrix.isUndefined()) {
- //outputList.setUndefined();
-diff --git a/geogebra/kernel/AlgoTranspose.java b/geogebra/kernel/AlgoTranspose.java
-index 4147a4f..d0b99b8 100644
---- a/geogebra/kernel/AlgoTranspose.java
-+++ b/geogebra/kernel/AlgoTranspose.java
-@@ -63,7 +63,7 @@ public class AlgoTranspose extends AlgoElement {
- return;
- }
-
-- matrix.transposeImmediate();
-+ matrix = matrix.ggbTranspose();
- // 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..db01f23 100644
---- a/geogebra/kernel/jama/GgbMat.java
-+++ b/geogebra/kernel/jama/GgbMat.java
-@@ -1,44 +1,59 @@
- 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 GgbMat(int row, int col) {
-+ super(row, col);
-+ }
-+
-+ 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,35 +77,18 @@ public class GgbMat extends Matrix{
- }
- }
-
-- public void inverseImmediate() {
--
-+ public GgbMat ggbInverse() {
- try {
-- Matrix ret = inverse();
-- A = ret.A;
-- m = ret.m;
-- n = ret.n;
-- }
-- catch (Exception e) { // can't invert
-- setIsUndefined(true);
-+ return new GgbMat(((Matrix) this).inverse());
-+ } catch (Exception e) {
-+ GgbMat mat = new GgbMat(this.getRowDimension(), this.getColumnDimension());
-+ mat.setIsUndefined(true);
-+ return mat;
- }
--
- }
-
--
--
-- 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]);
-+ public GgbMat ggbTranspose() {
-+ return new GgbMat(((Matrix) this).transpose());
- }
-
- /*
-@@ -106,9 +104,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 +129,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: (96b0c0d..) patch/jama (depends on: master)
diff --git a/debian/patches/patch/no_mac.diff b/debian/patches/patch/no_mac.diff
index 3941227..51df825 100644
--- a/debian/patches/patch/no_mac.diff
+++ b/debian/patches/patch/no_mac.diff
@@ -6,62 +6,15 @@ 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(-)
+ geogebra/gui/app/MacApplicationListener.java | 101 --------------------------
+ 1 files changed, 0 insertions(+), 101 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
+index 0c53155..0000000
--- a/geogebra/gui/app/MacApplicationListener.java
+++ /dev/null
-@@ -1,100 +0,0 @@
+@@ -1,101 +0,0 @@
-package geogebra.gui.app;
-
-import geogebra.main.Application;
@@ -121,7 +74,8 @@ index c4d696f..0000000
-
- // open file
- File [] files = { openFile };
-- boolean openInThisWindow = app.getCurrentFile() == null;
+- // #1541
+- boolean openInThisWindow = app.isSaved();
- app.getGuiManager().doOpenFiles(files, openInThisWindow);
-
- // make sure window is visible
@@ -163,4 +117,4 @@ index c4d696f..0000000
-
-}
--
-tg: (96b0c0d..) patch/no_mac (depends on: master)
+tg: (87975a1..) patch/no_mac (depends on: master)
diff --git a/debian/patches/patch/version.diff b/debian/patches/patch/version.diff
index af98864..7d5749b 100644
--- a/debian/patches/patch/version.diff
+++ b/debian/patches/patch/version.diff
@@ -7,28 +7,36 @@ along with the upstream one.
Signed-off-by: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
---
- geogebra/GeoGebra.java | 3 +++
- geogebra/GeoGebraAppletPreloader.java | 3 ++-
- geogebra/gui/menubar/MenubarImpl.java | 4 +++-
- geogebra/main/Application.java | 3 ++-
- 4 files changed, 10 insertions(+), 3 deletions(-)
+ geogebra/GeoGebra.java | 7 +++++--
+ geogebra/GeoGebraAppletPreloader.java | 3 ++-
+ geogebra/gui/menubar/GeoGebraMenuBar.java | 4 +++-
+ 3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/geogebra/GeoGebra.java b/geogebra/GeoGebra.java
-index d0889f0..fed2a9a 100644
+index f25403d..86c3333 100644
--- a/geogebra/GeoGebra.java
+++ b/geogebra/GeoGebra.java
-@@ -23,6 +23,9 @@ public class GeoGebra extends Object {
-
- public static final String VERSION_STRING = "3.2.47.0";
- public static final String SHORT_VERSION_STRING = "3.2"; // used for online archive
+@@ -26,7 +26,10 @@ public class GeoGebra extends Object {
+ public static final String SHORT_VERSION_STRING = "4.0"; // used for online archive
+ public static final boolean CAS_VIEW_ENABLED = false;
+ public static final boolean IS_PRE_RELEASE = !VERSION_STRING.endsWith(".0");
+-
+
+ // Debian version
+ public static final String DEBIAN_VERSION_STRING = GeoGebraDebian.DEBIAN_VERSION_STRING;
-
++
// File format versions
- public static final String XML_FILE_FORMAT = "3.2";
+ public static final String XML_FILE_FORMAT = "4.0";
+ public static final String GGB_XSD_FILENAME = "ggb.xsd"; // for ggb files
+@@ -96,4 +99,4 @@ public class GeoGebra extends Object {
+ geogebra.gui.app.GeoGebraFrame.main(args);
+ }
+
+-}
+\ No newline at end of file
++}
diff --git a/geogebra/GeoGebraAppletPreloader.java b/geogebra/GeoGebraAppletPreloader.java
-index 90321a8..51a66e5 100644
+index d8de89d..2929722 100644
--- a/geogebra/GeoGebraAppletPreloader.java
+++ b/geogebra/GeoGebraAppletPreloader.java
@@ -11,7 +11,8 @@ public class GeoGebraAppletPreloader extends JApplet {
@@ -37,38 +45,24 @@ index 90321a8..51a66e5 100644
setBackground(Color.white);
- System.out.println("GeoGebraAppletPreloader " + GeoGebra.VERSION_STRING + " started");
+ System.out.println("GeoGebraAppletPreloader " + GeoGebra.VERSION_STRING
-+ + " (Debian package " + GeoGebra.DEBIAN_VERSION_STRING + " started");
- loadAllJarFiles();
++ + " (Debian package " + GeoGebra.DEBIAN_VERSION_STRING + ") started");
+ loadAllJarFiles(true);
}
-diff --git a/geogebra/gui/menubar/MenubarImpl.java b/geogebra/gui/menubar/MenubarImpl.java
-index 41ca861..679f6cc 100644
---- a/geogebra/gui/menubar/MenubarImpl.java
-+++ b/geogebra/gui/menubar/MenubarImpl.java
-@@ -1437,7 +1437,9 @@ public abstract class MenubarImpl extends JMenuBar implements Menubar {
- sb.append(app.getPlain("ApplicationName"));
- sb.append(" ");
- sb.append(GeoGebra.VERSION_STRING);
+diff --git a/geogebra/gui/menubar/GeoGebraMenuBar.java b/geogebra/gui/menubar/GeoGebraMenuBar.java
+index 6991e2c..d6529df 100644
+--- a/geogebra/gui/menubar/GeoGebraMenuBar.java
++++ b/geogebra/gui/menubar/GeoGebraMenuBar.java
+@@ -254,7 +254,9 @@ public class GeoGebraMenuBar extends JMenuBar {
+ StringBuilder sb = new StringBuilder();
+ sb.append("<html><b>");
+ sb.append(vsb);
- sb.append("</b> (");
+ sb.append("</b> <i>Debian package ");
+ sb.append(GeoGebra.DEBIAN_VERSION_STRING);
-+ sb.append("</i> (");
- sb.append("Java "+ System.getProperty("java.version") + ", " +(app.getHeapSize()/1024/1024)+"MB");
- sb.append(")<br>");
- sb.append(GeoGebra.BUILD_DATE);
-diff --git a/geogebra/main/Application.java b/geogebra/main/Application.java
-index a42ca3a..3a7cccf 100644
---- a/geogebra/main/Application.java
-+++ b/geogebra/main/Application.java
-@@ -362,7 +362,8 @@ public abstract class Application implements KeyEventDispatcher {
-
- // Michael Borcherds 2008-05-05
- // added to help debug applets
-- System.out.println("GeoGebra " + GeoGebra.VERSION_STRING + ", "
-+ System.out.println("GeoGebra " + GeoGebra.VERSION_STRING + ", Debian package "
-+ + GeoGebra.DEBIAN_VERSION_STRING + ", "
- + GeoGebra.BUILD_DATE + ", Java "
- + System.getProperty("java.version"));
-
++ sb.append("</i> (");
+ sb.append("Java ");
+ sb.append(System.getProperty("java.version"));
+ sb.append(", ");
--
-tg: (96b0c0d..) patch/version (depends on: master)
+tg: (87975a1..) patch/version (depends on: master)
diff --git a/debian/patches/series b/debian/patches/series
index cbffa5b..e3ff3e8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,8 +1,4 @@
patch/ScientificFormat.java.diff -p1
patch/applet_export.diff -p1
-patch/build.xml.diff -p1
-patch/flanagan_nonfree.diff -p1
-patch/geogebra.desktop.diff -p1
-patch/jama.diff -p1
patch/no_mac.diff -p1
patch/version.diff -p1
--
GeoGebra: Dynamic mathematics software for education
More information about the pkg-java-commits
mailing list