Add temporary patch for building against freetype-2.10.4

This commit is contained in:
Sandro Mani 2020-11-11 11:08:45 +01:00
parent a3837fb8e0
commit 00964b32af
2 changed files with 38 additions and 0 deletions

View File

@ -54,6 +54,9 @@ Patch2: vtk-gcc10.patch
# Qt 5.15 support
# https://gitlab.kitware.com/vtk/vtk/-/issues/18005
Patch3: vtk-qt5.15.patch
# Temporary patch for building against freetype-2.10.4, which removed FT_CALLBACK_DEF,
# but was later re-added in https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=b0667d2d36fb134d48030b2a560eaaa37810d6ba
Patch4: vtk_freetype-2.10.4.patch
URL: http://vtk.org/
@ -494,6 +497,7 @@ programming languages.
%patch1 -p1 -b .proj6
%patch2 -p1 -b .gcc10
%patch3 -p1 -b .qt5.15
%patch4 -p1 -b .freetype
# Remove included thirdparty sources just to be sure
# TODO - diy2 - not yet packaged
# TODO - exodusII - not yet packaged

34
vtk_freetype-2.10.4.patch Normal file
View File

@ -0,0 +1,34 @@
diff -rupN VTK-8.2.0/Rendering/FreeType/vtkFreeTypeTools.cxx VTK-8.2.0-new/Rendering/FreeType/vtkFreeTypeTools.cxx
--- VTK-8.2.0/Rendering/FreeType/vtkFreeTypeTools.cxx 2019-01-30 18:15:13.000000000 +0100
+++ VTK-8.2.0-new/Rendering/FreeType/vtkFreeTypeTools.cxx 2020-11-06 00:21:07.259999338 +0100
@@ -387,6 +387,13 @@ FTC_CMapCache* vtkFreeTypeTools::GetCMap
}
//----------------------------------------------------------------------------
+#ifndef FT_CALLBACK_DEF
+#ifdef __cplusplus
+#define FT_CALLBACK_DEF( x ) extern "C" x
+#else
+#define FT_CALLBACK_DEF( x ) static x
+#endif
+#endif /* FT_CALLBACK_DEF */
FT_CALLBACK_DEF(FT_Error)
vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id,
FT_Library lib,
diff -rupN VTK-8.2.0/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx VTK-8.2.0-new/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx
--- VTK-8.2.0/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx 2019-01-30 18:15:13.000000000 +0100
+++ VTK-8.2.0-new/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx 2020-11-06 00:21:25.588991839 +0100
@@ -29,6 +29,13 @@ vtkStandardNewMacro(vtkFontConfigFreeTyp
namespace
{
// The FreeType face requester callback:
+#ifndef FT_CALLBACK_DEF
+#ifdef __cplusplus
+#define FT_CALLBACK_DEF( x ) extern "C" x
+#else
+#define FT_CALLBACK_DEF( x ) static x
+#endif
+#endif /* FT_CALLBACK_DEF */
FT_CALLBACK_DEF(FT_Error)
vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id,
FT_Library lib,