aboutsummaryrefslogtreecommitdiffstats
path: root/editors/calligra
diff options
context:
space:
mode:
authorpetef <petef@FreeBSD.org>2002-08-24 04:57:46 +0800
committerpetef <petef@FreeBSD.org>2002-08-24 04:57:46 +0800
commitcfdfe6bb46af8b32e8702176ca728bbbc267c055 (patch)
tree63d59e8d5a4e2e3c1550490f50636bbc277dfc31 /editors/calligra
parentf189a131401cedbd06fb7ae55c0e0c187bee6c5d (diff)
downloadfreebsd-ports-gnome-cfdfe6bb46af8b32e8702176ca728bbbc267c055.tar.gz
freebsd-ports-gnome-cfdfe6bb46af8b32e8702176ca728bbbc267c055.tar.zst
freebsd-ports-gnome-cfdfe6bb46af8b32e8702176ca728bbbc267c055.zip
Fix the koffice build.
PR: 40342 Submitted by: Peter Avalos <pavalos@theshell.com> Forgotten by: petef :)
Diffstat (limited to 'editors/calligra')
-rw-r--r--editors/calligra/files/patch-KDChartPainter.cpp11
-rw-r--r--editors/calligra/files/patch-KDChartTable.h25
-rw-r--r--editors/calligra/files/patch-kspread_interpreter.cc26
3 files changed, 51 insertions, 11 deletions
diff --git a/editors/calligra/files/patch-KDChartPainter.cpp b/editors/calligra/files/patch-KDChartPainter.cpp
new file mode 100644
index 000000000000..3cb0a7c17df3
--- /dev/null
+++ b/editors/calligra/files/patch-KDChartPainter.cpp
@@ -0,0 +1,11 @@
+--- ./kchart/kdchart/KDChartPainter.cpp.orig Tue Aug 13 18:11:14 2002
++++ ./kchart/kdchart/KDChartPainter.cpp Tue Aug 13 18:11:41 2002
+@@ -8,6 +8,8 @@
+ Copyright (C) 2001 by Klar�lvdalens Datakonsult AB
+ */
+
++#include <cmath>
++#include <stdlib.h>
+ #include <KDDrawText.h>
+ #include <KDChartPainter.h>
+ #include <KDChartEnums.h>
diff --git a/editors/calligra/files/patch-KDChartTable.h b/editors/calligra/files/patch-KDChartTable.h
index 87007b7e3f70..dbff1d90355a 100644
--- a/editors/calligra/files/patch-KDChartTable.h
+++ b/editors/calligra/files/patch-KDChartTable.h
@@ -1,15 +1,18 @@
---- ./kchart/kdchart/KDChartTable.h.orig Mon Dec 10 06:53:35 2001
-+++ ./kchart/kdchart/KDChartTable.h Sat May 25 13:28:46 2002
-@@ -28,9 +28,9 @@
+$FreeBSD$
+
+--- ./kchart/kdchart/KDChartTable.h.orig Tue Aug 13 18:05:16 2002
++++ ./kchart/kdchart/KDChartTable.h Tue Aug 13 18:07:10 2002
+@@ -23,12 +23,10 @@
#define MAXDOUBLE DBL_MAX
#define MINDOUBLE DBL_MIN
- #else
+ #define std
+-#elif defined __APPLE__
++#else
+ #include <float.h>
+ #define MAXDOUBLE DBL_MAX
+ #define MINDOUBLE DBL_MIN
+-#else
-#include <values.h>
--#include <limits.h>
--#include <math.h>
-+#include <float.h>
-+#define MAXDOUBLE DBL_MAX
-+#define MINDOUBLE DBL_MIN
+ #include <limits.h>
+ #include <math.h>
#endif
-
- #if defined SUN7 || ( defined HP11_aCC && defined HP1100 )
diff --git a/editors/calligra/files/patch-kspread_interpreter.cc b/editors/calligra/files/patch-kspread_interpreter.cc
new file mode 100644
index 000000000000..3b71bb0a64b0
--- /dev/null
+++ b/editors/calligra/files/patch-kspread_interpreter.cc
@@ -0,0 +1,26 @@
+$FreeBSD$
+
+--- ./kspread/kspread_interpreter.cc.orig Tue Aug 13 18:08:16 2002
++++ ./kspread/kspread_interpreter.cc Tue Aug 13 18:09:55 2002
+@@ -2547,10 +2547,10 @@
+ }
+ // This is not correct solution for problem with floating point numbers and probably
+ // will fail in platforms where float and double lenghts are same.
+- if (approx_equal(floor(args[0]->doubleValue()*pow(10,digits)), args[0]->doubleValue()*pow(10,digits)))
++ if (approx_equal(floor(args[0]->doubleValue()*::pow(10,digits)), args[0]->doubleValue()*::pow(10,digits)))
+ result = args[0]->doubleValue();
+ else
+- result=floor(args[0]->doubleValue()*pow(10,digits)+1)/pow(10,digits);
++ result=floor(args[0]->doubleValue()*::pow(10,digits)+1)/::pow(10,digits);
+ context.setValue( new KSValue( result) );
+
+ return true;
+@@ -3404,7 +3404,7 @@
+ return false;
+ }
+
+- double arg=pow(sqrt(pow(imag,2)+pow(real,2)),args[1]->intValue());
++ double arg=::pow(sqrt(pow(imag,2)+pow(real,2)),args[1]->intValue());
+ double angle=atan(imag/real);
+
+ double real_res=arg*cos(angle*args[1]->intValue());