From 64e6be5dce12eb3a4aa6f9f06cac871a170c46953d37ce1e241ba134d2f9fa5a Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Mon, 5 Jan 2015 16:34:22 +0000 Subject: [PATCH] Accepting request 279962 from home:dimstar:branches:science - Add paraview-freetype-2.5.4.patch: Fix build with FreeType 2.5.4 API changes. OBS-URL: https://build.opensuse.org/request/show/279962 OBS-URL: https://build.opensuse.org/package/show/science/paraview?expand=0&rev=29 --- paraview-freetype-2.5.4.patch | 24 ++++++++++++++++++++++++ paraview.changes | 6 ++++++ paraview.spec | 5 ++++- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 paraview-freetype-2.5.4.patch diff --git a/paraview-freetype-2.5.4.patch b/paraview-freetype-2.5.4.patch new file mode 100644 index 0000000..a5306bb --- /dev/null +++ b/paraview-freetype-2.5.4.patch @@ -0,0 +1,24 @@ +Index: ParaView-v4.2.0-source/VTK/Rendering/FreeType/vtkFreeTypeTools.cxx +=================================================================== +--- ParaView-v4.2.0-source.orig/VTK/Rendering/FreeType/vtkFreeTypeTools.cxx ++++ ParaView-v4.2.0-source/VTK/Rendering/FreeType/vtkFreeTypeTools.cxx +@@ -1183,7 +1183,7 @@ bool vtkFreeTypeTools::CalculateBounding + 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(bitmap->rows) - (bitmapGlyph->top - 1)), + metaData.descent); + } + ++heightString; +@@ -1950,8 +1950,8 @@ void vtkFreeTypeTools::GetLineMetrics(T + 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(bitmap->width)); ++ bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - static_cast(bitmap->rows)); + bbox[3] = std::max(bbox[3], pen[1] + bitmapGlyph->top - 1); + } + else diff --git a/paraview.changes b/paraview.changes index 83aeb55..3e0fa41 100644 --- a/paraview.changes +++ b/paraview.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 5 12:50:29 UTC 2015 - dimstar@opensuse.org + +- Add paraview-freetype-2.5.4.patch: Fix build with FreeType 2.5.4 + API changes. + ------------------------------------------------------------------- Wed Oct 1 12:40:59 UTC 2014 - foss@grueninger.de diff --git a/paraview.spec b/paraview.spec index b34df38..59236a7 100644 --- a/paraview.spec +++ b/paraview.spec @@ -1,7 +1,7 @@ # # spec file for package paraview # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -32,6 +32,8 @@ Patch0: paraview-default-qtstyle.patch Patch1: paraview-desktop-entry-fix.patch # PATCH-FIX-UPSTREAM paraview-fix-file-contains-date-time.patch badshah400@gmail.com -- Remove reference to __DATE__ and __TIME__ from source Patch2: paraview-fix-file-contains-date-time.patch +# PATCH-FIx-UPSTREAM paraview-freetype-2.5.4.patch dimstar@opensuse.org -- Fix build with FreeType 2.5.4+ +Patch3: paraview-freetype-2.5.4.patch BuildRequires: Mesa-devel BuildRequires: boost-devel BuildRequires: cmake >= 2.8.8 @@ -114,6 +116,7 @@ This package provides the SciberQuestToolKit plugin for paraview. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build # Prepare for gcc 4.9.0: work around gcc 4.9.0 regression