Control: tags -1 jessie patch

On Wed, 04 Mar 2015 22:57:03 +0100 Andreas Cadhalpun 
<andreas.cadhal...@googlemail.com> wrote:
> Source: vtk6
> Version: 6.1.0+dfsg2-5
> Tags: sid
> Severity: serious
> Justification: fails to build from source
> 
> Dear Maintainer,
> 
> vtk6 fails to build on sid/amd64, but it works on jessie/amd64 (hence the sid 
> tag).

Now that freetype 2.5.2-3 has migrated to testing, this bug affects
jessie as well.

I've attached the patch upstream applied to fix this.
http://review.source.kitware.com/#/c/18751/

Thanks,
James

From 88f5a5bf546f7962089e107f7f1ae444c6d2797c Mon Sep 17 00:00:00 2001
From: "Marcus D. Hanwell" <marcus.hanw...@kitware.com>
Date: Thu, 8 Jan 2015 16:49:54 -0500
Subject: [PATCH] Fix compile failures seen with latest FreeType

Thanks to Oon-Ee Ng for reporting the issue on the VTK users list.
This makes some minor changes to account for changes in return type
in the FreeType API. VTK should now compile against the latest release.

Change-Id: I5dcb608573f387a37ebbc2f9621e89c4551d98f2
---
 Rendering/FreeType/vtkFreeTypeTools.cxx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Rendering/FreeType/vtkFreeTypeTools.cxx b/Rendering/FreeType/vtkFreeTypeTools.cxx
index fe0a1c2..84ff0f8 100644
--- a/Rendering/FreeType/vtkFreeTypeTools.cxx
+++ b/Rendering/FreeType/vtkFreeTypeTools.cxx
@@ -1198,7 +1198,7 @@ bool vtkFreeTypeTools::CalculateBoundingBox(const T& str,
     if (bitmap)
       {
       metaData.ascent = std::max(bitmapGlyph->top - 1, metaData.ascent);
-      metaData.descent = std::min(-(bitmap->rows - (bitmapGlyph->top - 1)),
+      metaData.descent = std::min(-static_cast<int>((bitmap->rows - (bitmapGlyph->top - 1))),
                                   metaData.descent);
       }
     ++heightString;
@@ -1534,11 +1534,11 @@ bool vtkFreeTypeTools::RenderCharacter(CharType character, int &x, int &y,
     unsigned char *glyphPtr;
     float tpropAlpha = iMetaData->rgba[3] / 255.0;
 
-    for (int j = 0; j < bitmap->rows; ++j)
+    for (int j = 0; j < static_cast<int>(bitmap->rows); ++j)
       {
       glyphPtr = glyphPtrRow;
 
-      for (int i = 0; i < bitmap->width; ++i)
+      for (int i = 0; i < static_cast<int>(bitmap->width); ++i)
         {
         if (*glyphPtr == 0)
           {
@@ -2001,8 +2001,8 @@ void vtkFreeTypeTools::GetLineMetrics(T begin, T end, MetaData &metaData,
     if (bitmap)
       {
       bbox[0] = std::min(bbox[0], pen[0] + bitmapGlyph->left);
-      bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + bitmap->width);
-      bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - bitmap->rows);
+      bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + static_cast<int>(bitmap->width));
+      bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - static_cast<int>(bitmap->rows));
       bbox[3] = std::max(bbox[3], pen[1] + bitmapGlyph->top - 1);
       }
     else

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to