Various patches to fix SunOS build.

This commit is contained in:
jperkin 2014-01-09 20:11:27 +00:00
parent b64205101d
commit fd17c2becd
8 changed files with 160 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.57 2013/03/26 23:30:45 joerg Exp $
$NetBSD: distinfo,v 1.58 2014/01/09 20:11:27 jperkin Exp $
SHA1 (kdegraphics-3.5.10.tar.bz2) = 9634e3ab364d017152fb6d636efad8811aeec6c3
RMD160 (kdegraphics-3.5.10.tar.bz2) = 94278e4419ab99885fc9efae9b6ba5ba787f831e
@ -10,7 +10,14 @@ SHA1 (patch-ad) = 39f9af23006d6b8d09d0ecbb83a382df6b125152
SHA1 (patch-ae) = e1984e4441f2b96697ae7a17028bd59bacb7cc73
SHA1 (patch-af) = ab3eff6677c889dfd48b5aa6cc116a0da18dd925
SHA1 (patch-kmrml_kmrml_mrml__elements.h) = f832e7e0a83cec5214630fd871f2d7132b5219d9
SHA1 (patch-kolourpaint_tools_kptoolpolygon.cpp) = 26eaaa93708e6683bebdeb01f38cfd1033a727c2
SHA1 (patch-kolourpaint_widgets_kpcolorsimilaritycube.cpp) = 9e8548df42033ad5adfeecb3767504089f34668c
SHA1 (patch-kooka_thumbview.h) = 8c58202c5c68f27f4a5221541c20e20016b2f76f
SHA1 (patch-kpdf_impl_SVGAnimationElementImpl.cc) = fd16996c1c12ff3e85b287d916b102f963ddc914
SHA1 (patch-kpdf_impl_SVGLengthImpl.cc) = ac1f9390d9d2d4b40398892b65c03aea977e8cd5
SHA1 (patch-kpdf_ui_presentationwidget.cpp) = 4c2735fc3c50c82833cd92e56accafb038fb75af
SHA1 (patch-kpdf_xpdf_goo_GString.cc) = 41c2c6f21cee5c62e324a760cbbea1a474e08fde
SHA1 (patch-ksvg_impl_libs_libtext2path_src_Converter.cpp) = 4a1588c91e94c09862e2b702c357b8c478d19add
SHA1 (patch-kviewshell_documentWidget.cpp) = 605f44f574f8391b9947424d0fee926bc2f7a494
SHA1 (patch-kviewshell_plugins_djvu_libdjvu_GContainer.h) = ba805be065c9eb38b865d969e291ab5bb49b1798
SHA1 (patch-kviewshell_plugins_djvu_libdjvu_GSmartPointer.h) = 7eefdd49015abe79f5bd9c86a40c2c060ae572f5

View file

@ -0,0 +1,15 @@
$NetBSD: patch-kolourpaint_tools_kptoolpolygon.cpp,v 1.1 2014/01/09 20:11:27 jperkin Exp $
Avoid ambiguous function call.
--- kolourpaint/tools/kptoolpolygon.cpp.orig 2005-09-10 08:19:05.000000000 +0000
+++ kolourpaint/tools/kptoolpolygon.cpp
@@ -560,7 +560,7 @@ void kpToolPolygon::applyModifiers ()
// diagonal (dist from start maintained)
else
{
- const double dist = sqrt (diffx * diffx + diffy * diffy);
+ const double dist = sqrt ((double)(diffx * diffx + diffy * diffy));
#define sgn(a) ((a)<0?-1:1)
// Round distances _before_ adding to any coordinate

View file

@ -0,0 +1,15 @@
$NetBSD: patch-kolourpaint_widgets_kpcolorsimilaritycube.cpp,v 1.1 2014/01/09 20:11:27 jperkin Exp $
Avoid ambiguous function call.
--- kolourpaint/widgets/kpcolorsimilaritycube.cpp.orig 2005-09-10 08:19:05.000000000 +0000
+++ kolourpaint/widgets/kpcolorsimilaritycube.cpp
@@ -45,7 +45,7 @@
const double kpColorSimilarityCube::colorCubeDiagonalDistance =
- sqrt (255 * 255 * 3);
+ sqrt ((double)(255 * 255 * 3));
kpColorSimilarityCube::kpColorSimilarityCube (int look,
kpMainWindow *mainWindow,

View file

@ -0,0 +1,60 @@
$NetBSD: patch-kpdf_impl_SVGAnimationElementImpl.cc,v 1.1 2014/01/09 20:11:27 jperkin Exp $
Avoid ambiguous function call.
--- ksvg/impl/SVGAnimationElementImpl.cc.orig 2005-11-08 22:25:43.000000000 +0000
+++ ksvg/impl/SVGAnimationElementImpl.cc
@@ -100,7 +100,7 @@ double SVGAnimationElementImpl::parseClo
{
QString temp = parse.mid(9, 2);
milliseconds = temp.toUInt();
- result += (milliseconds * (1 / pow(10.0, temp.length())));
+ result += (milliseconds * (1 / pow(10.0, (double)temp.length())));
}
}
else if(doublePointOne != -1 && doublePointTwo == -1) // Spec: "Partial clock values"
@@ -115,7 +115,7 @@ double SVGAnimationElementImpl::parseClo
{
QString temp = parse.mid(6, 2);
milliseconds = temp.toUInt();
- result += (milliseconds * (1 / pow(10.0, temp.length())));
+ result += (milliseconds * (1 / pow(10.0, (double)temp.length())));
}
}
else // Spec: "Timecount values"
@@ -130,7 +130,7 @@ double SVGAnimationElementImpl::parseClo
{
result = parse.mid(0, dotPosition).toUInt() * 3600;
QString temp = parse.mid(dotPosition + 1, parse.length() - dotPosition - 2);
- result += (3600.0 * temp.toUInt()) * (1 / pow(10.0, temp.length()));
+ result += (3600.0 * temp.toUInt()) * (1 / pow(10.0, (double)temp.length()));
}
}
else if(parse.endsWith("min"))
@@ -141,7 +141,7 @@ double SVGAnimationElementImpl::parseClo
{
result = parse.mid(0, dotPosition).toUInt() * 60;
QString temp = parse.mid(dotPosition + 1, parse.length() - dotPosition - 4);
- result += (60.0 * temp.toUInt()) * (1 / pow(10.0, temp.length()));
+ result += (60.0 * temp.toUInt()) * (1 / pow(10.0, (double)temp.length()));
}
}
else if(parse.endsWith("ms"))
@@ -152,7 +152,7 @@ double SVGAnimationElementImpl::parseClo
{
result = parse.mid(0, dotPosition).toUInt() / 1000.0;
QString temp = parse.mid(dotPosition + 1, parse.length() - dotPosition - 3);
- result += (temp.toUInt() / 1000.0) * (1 / pow(10.0, temp.length()));
+ result += (temp.toUInt() / 1000.0) * (1 / pow(10.0, (double)temp.length()));
}
}
else if(parse.endsWith("s"))
@@ -163,7 +163,7 @@ double SVGAnimationElementImpl::parseClo
{
result = parse.mid(0, dotPosition).toUInt();
QString temp = parse.mid(dotPosition + 1, parse.length() - dotPosition - 2);
- result += temp.toUInt() * (1 / pow(10.0, temp.length()));
+ result += temp.toUInt() * (1 / pow(10.0, (double)temp.length()));
}
}
else

View file

@ -0,0 +1,15 @@
$NetBSD: patch-kpdf_impl_SVGLengthImpl.cc,v 1.1 2014/01/09 20:11:27 jperkin Exp $
Avoid ambiguous function call.
--- ksvg/impl/SVGLengthImpl.cc.orig 2005-11-08 22:25:43.000000000 +0000
+++ ksvg/impl/SVGLengthImpl.cc
@@ -395,7 +395,7 @@ float SVGLengthImpl::percentageOfViewpor
else if(m_mode == LENGTHMODE_HEIGHT)
return value * metrics.height();
else if(m_mode == LENGTHMODE_OTHER)
- return value * sqrt(pow(metrics.width(), 2) + pow(metrics.height(), 2)) / sqrt(2.0);
+ return value * sqrt(pow(metrics.width(), 2.0) + pow(metrics.height(), 2.0)) / sqrt(2.0);
}
return 0;

View file

@ -0,0 +1,15 @@
$NetBSD: patch-kpdf_ui_presentationwidget.cpp,v 1.1 2014/01/09 20:11:27 jperkin Exp $
Avoid ambiguous function call.
--- kpdf/ui/presentationwidget.cpp.orig 2008-02-13 09:37:05.000000000 +0000
+++ kpdf/ui/presentationwidget.cpp
@@ -436,7 +436,7 @@ void PresentationWidget::overlayClick( c
return;
// compute angle relative to indicator (note coord transformation)
- float angle = 0.5 + 0.5 * atan2( -xPos, -yPos ) / M_PI;
+ float angle = 0.5 + 0.5 * atan2((double)-xPos, (double)-yPos) / M_PI;
int pageIndex = (int)( angle * ( m_frames.count() - 1 ) + 0.5 );
// go to selected page

View file

@ -0,0 +1,15 @@
$NetBSD: patch-kpdf_xpdf_goo_GString.cc,v 1.1 2014/01/09 20:11:27 jperkin Exp $
Avoid ambiguous function call.
--- kpdf/xpdf/goo/GString.cc.orig 2007-05-14 07:39:30.000000000 +0000
+++ kpdf/xpdf/goo/GString.cc
@@ -528,7 +528,7 @@ void GString::formatDouble(double x, cha
if ((neg = x < 0)) {
x = -x;
}
- x = floor(x * pow(10, prec) + 0.5);
+ x = floor(x * pow(10.0, (double)prec) + 0.5);
i = bufSize;
started = !trim;
for (j = 0; j < prec && i > 1; ++j) {

View file

@ -0,0 +1,17 @@
$NetBSD: patch-kviewshell_plugins_djvu_libdjvu_GSmartPointer.h,v 1.1 2014/01/09 20:11:27 jperkin Exp $
Include sys/types.h for size_t on SunOS
--- kviewshell/plugins/djvu/libdjvu/GSmartPointer.h.orig 2005-09-10 08:19:20.000000000 +0000
+++ kviewshell/plugins/djvu/libdjvu/GSmartPointer.h
@@ -99,6 +99,10 @@
#include "DjVuGlobal.h"
+#ifdef __sun
+#include <sys/types.h>
+#endif
+
#ifdef HAVE_NAMESPACES
namespace DJVU {
# ifdef NOT_DEFINED // Just to fool emacs c++ mode