Package: calligra
Version: 1:2.4.2-1
Severity: serious
callira FTBFS on armel and armhf with the following error
/build/buildd-calligra_2.4.2-1-armhf-0fWQX5/calligra-2.4.2/plugins/pathshapes/rectangle/RectangleShape.cpp:64:85:
error: no matching function for call to 'qMin(double, qreal)'
/build/buildd-calligra_2.4.2-1-armhf-0fWQX5/calligra-2.4.2/plugins/pathshapes/rectangle/RectangleShape.cpp:64:85:
note: candidate is:
/usr/include/qt4/QtCore/qglobal.h:1196:34: note: template<class T> const T& qMin(const
T&, const T&)
/build/buildd-calligra_2.4.2-1-armhf-0fWQX5/calligra-2.4.2/plugins/pathshapes/rectangle/RectangleShape.cpp:65:86:
error: no matching function for call to 'qMin(double, qreal)'
/build/buildd-calligra_2.4.2-1-armhf-0fWQX5/calligra-2.4.2/plugins/pathshapes/rectangle/RectangleShape.cpp:65:86:
note: candidate is:
The issue is that on arm architectures qreal is defined as float
and due to the way qMin is defined as a template it needs the two
parameters to be of exactly the same type.
The fix should be a trvial matter of adding some typecasts,
normally I would test this before submitting a bug report
but my arm box is busy doing other stuff and it's a very long build.
Untested patch
P.S. the package has never built on armel so the armel failure is
not RC but it HAS built on armhf which is now a release architecture
so the armhf failure is rc.
Description: Fix qmin calls
Add some typecasts so that both parameters to qMin are of the same type
To fix arm build failure.
Bug-debian: http://bugs.debian.org/??????
Author: Peter Michael Green <plugw...@p10link.net>
---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:
Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>
--- calligra-2.4.2.orig/plugins/pathshapes/rectangle/RectangleShape.cpp
+++ calligra-2.4.2/plugins/pathshapes/rectangle/RectangleShape.cpp
@@ -61,8 +61,8 @@ bool RectangleShape::loadOdf(const KoXml
QString cornerRadius = element.attributeNS(KoXmlNS::draw, "corner-radius", "");
if (! cornerRadius.isEmpty()) {
float radius = KoUnit::parseValue(cornerRadius);
- m_cornerRadiusX = qMin(radius / (0.5 * size().width()) * 100, qreal(100));
- m_cornerRadiusY = qMin(radius / (0.5 * size().height()) * 100, qreal(100));
+ m_cornerRadiusX = qMin(qreal(radius / (0.5 * size().width()) * 100), qreal(100));
+ m_cornerRadiusY = qMin(qreal(radius / (0.5 * size().height()) * 100), qreal(100));
}
}