From e8ae3d366c58b6cef275e68571f37e49c67ad14b490388c8b3cc500cad28130e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Thu, 22 Oct 2020 17:34:26 +0000 Subject: [PATCH] Accepting request 843011 from home:namtrac:branches:science - Add vtk-freetype-2.10.3-replace-FT_CALLBACK_DEF.patch to fix compilation with FreeType 2.10.3+ OBS-URL: https://build.opensuse.org/request/show/843011 OBS-URL: https://build.opensuse.org/package/show/science/vtk?expand=0&rev=167 --- ...etype-2.10.3-replace-FT_CALLBACK_DEF.patch | 37 +++++++++++++++++++ vtk.changes | 6 +++ vtk.spec | 3 ++ 3 files changed, 46 insertions(+) create mode 100644 vtk-freetype-2.10.3-replace-FT_CALLBACK_DEF.patch diff --git a/vtk-freetype-2.10.3-replace-FT_CALLBACK_DEF.patch b/vtk-freetype-2.10.3-replace-FT_CALLBACK_DEF.patch new file mode 100644 index 0000000..ef9341f --- /dev/null +++ b/vtk-freetype-2.10.3-replace-FT_CALLBACK_DEF.patch @@ -0,0 +1,37 @@ +Index: VTK-9.0.1/Rendering/FreeType/vtkFreeTypeTools.cxx +=================================================================== +--- VTK-9.0.1.orig/Rendering/FreeType/vtkFreeTypeTools.cxx ++++ VTK-9.0.1/Rendering/FreeType/vtkFreeTypeTools.cxx +@@ -378,7 +378,7 @@ FTC_CMapCache* vtkFreeTypeTools::GetCMap + } + + //---------------------------------------------------------------------------- +-FT_CALLBACK_DEF(FT_Error) ++extern "C" FT_Error + vtkFreeTypeToolsFaceRequester( + FTC_FaceID face_id, FT_Library lib, FT_Pointer request_data, FT_Face* face) + { +Index: VTK-9.0.1/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx +=================================================================== +--- VTK-9.0.1.orig/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx ++++ VTK-9.0.1/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx +@@ -26,10 +26,8 @@ + + vtkStandardNewMacro(vtkFontConfigFreeTypeTools); + +-namespace +-{ + // The FreeType face requester callback: +-FT_CALLBACK_DEF(FT_Error) ++extern "C" FT_Error + vtkFontConfigFreeTypeToolsFaceRequester( + FTC_FaceID face_id, FT_Library lib, FT_Pointer request_data, FT_Face* face) + { +@@ -71,7 +69,6 @@ vtkFontConfigFreeTypeToolsFaceRequester( + + return static_cast(0); + } +-} // end anon namespace + + void vtkFontConfigFreeTypeTools::PrintSelf(ostream& os, vtkIndent indent) + { diff --git a/vtk.changes b/vtk.changes index b0f7651..cfa24ad 100644 --- a/vtk.changes +++ b/vtk.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 20 14:06:35 UTC 2020 - Ismail Dönmez + +- Add vtk-freetype-2.10.3-replace-FT_CALLBACK_DEF.patch to fix + compilation with FreeType 2.10.3+ + ------------------------------------------------------------------- Thu Jul 16 16:55:31 UTC 2020 - Stefan Brüns diff --git a/vtk.spec b/vtk.spec index a9a0aed..c9a55d7 100644 --- a/vtk.spec +++ b/vtk.spec @@ -148,6 +148,8 @@ Patch12: 0001-Guard-glPointSize-with-GL_ES_VERSION_3_0.patch Patch13: 0001-Fix-PyVTKAddFile_-function-signature-mismatch.patch # PATCH-FIX-UPSTREAM -- https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7115 Patch14: 0001-Replace-invalid-GL_LINE-with-GL_LINES-for-glDrawArra.patch +# PATCH-FIX-UPSTREAM -- https://gitlab.kitware.com/vtk/vtk/-/issues/18033 +Patch15: vtk-freetype-2.10.3-replace-FT_CALLBACK_DEF.patch BuildRequires: R-base-devel BuildRequires: chrpath BuildRequires: cmake >= 3.4 @@ -404,6 +406,7 @@ languages. %endif %patch13 -p1 %patch14 -p1 +%patch15 -p1 # Replace relative path ../../../../VTKData with %%{_datadir}/vtkdata # otherwise it will break on symlinks.