vtk: normalize patches

This commit is contained in:
Mark Brand 2020-05-27 18:35:34 +02:00
parent 3469f55019
commit 926f05ca2a
3 changed files with 56 additions and 42 deletions

View File

@ -5,12 +5,14 @@ Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20M=C3=BCllenhaupt?= <mm+mxe.cc@netlair.de>
Date: Wed, 20 Feb 2019 23:04:57 +1100
Subject: [PATCH 1/1] fix glew static linking
]
Subject: [PATCH 1/3] fix glew static linking
--- a/Rendering/OpenGL2/CMakeLists.txt 2019-02-20 09:09:42.537485751 +0100
+++ b/Rendering/OpenGL2/CMakeLists.txt 2019-02-20 09:09:51.327305577 +0100
@@ -345,3 +345,11 @@
diff --git a/Rendering/OpenGL2/CMakeLists.txt b/Rendering/OpenGL2/CMakeLists.txt
index 1111111..2222222 100644
--- a/Rendering/OpenGL2/CMakeLists.txt
+++ b/Rendering/OpenGL2/CMakeLists.txt
@@ -345,3 +345,11 @@ if (WIN32 AND ( NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATO
)
target_link_libraries(vtkTestOpenGLVersion opengl32)
endif()
@ -22,3 +24,52 @@ Subject: [PATCH 1/1] fix glew static linking
+ COMPILE_DEFINITIONS GLEW_STATIC
+ )
+endif()
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: jan <jan@linux-a9ex>
Date: Mon, 18 May 2020 22:38:26 +0200
Subject: [PATCH 2/3] ODR fix: use unique names for dummy symbols.
diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c b/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c
index 1111111..2222222 100644
--- a/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c
+++ b/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c
@@ -614,5 +614,5 @@ int ex_create_par_int(const char *path, int cmode, int *comp_ws, int *io_ws, MPI
* Prevent warning in some versions of ranlib(1) because the object
* file has no symbols.
*/
-const char exodus_unused_symbol_dummy_1;
+const char exodus_unused_symbol_dummy_ex_create_par;
#endif
diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c b/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c
index 1111111..2222222 100644
--- a/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c
+++ b/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c
@@ -474,5 +474,5 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float
* Prevent warning in some versions of ranlib(1) because the object
* file has no symbols.
*/
-const char exodus_unused_symbol_dummy_1;
+const char exodus_unused_symbol_dummy_ex_open_par;
#endif
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: jan <jan@linux-a9ex>
Date: Mon, 18 May 2020 22:38:07 +0200
Subject: [PATCH 3/3] Added missing export to __declspec(dllexport).
diff --git a/ThirdParty/libxml2/vtklibxml2/include/libxml/xmlexports.h b/ThirdParty/libxml2/vtklibxml2/include/libxml/xmlexports.h
index 1111111..2222222 100644
--- a/ThirdParty/libxml2/vtklibxml2/include/libxml/xmlexports.h
+++ b/ThirdParty/libxml2/vtklibxml2/include/libxml/xmlexports.h
@@ -135,7 +135,7 @@
#undef XMLCDECL
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
#define XMLPUBFUN __declspec(dllexport)
- #define XMLPUBVAR __declspec(dllexport)
+ #define XMLPUBVAR __declspec(dllexport) extern
#else
#define XMLPUBFUN
#if !defined(LIBXML_STATIC)

View File

@ -1,24 +0,0 @@
See: https://gitlab.kitware.com/vtk/vtk/issues/17774
diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c b/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c
index 8d5d6734f0ad2df04393cf7909ef2c342785e1ac..ef439618dae7b90fdf1057f7051c6a9f0bf1f72d 100644
--- a/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c
+++ b/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c
@@ -216,5 +216,5 @@ int ex_create_par_int(const char *path, int cmode, int *comp_ws, int *io_ws, MPI
* Prevent warning in some versions of ranlib(1) because the object
* file has no symbols.
*/
-const char exodus_unused_symbol_dummy_1;
+const char exodus_unused_symbol_dummy_ex_create_par;
#endif
diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c b/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c
index b2faa22c29489446030f537bb6b3a26feb86c50b..9df4818767d07a3020f1363fe2a8b9f2fcac634a 100644
--- a/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c
+++ b/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c
@@ -459,5 +459,5 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float
* Prevent warning in some versions of ranlib(1) because the object
* file has no symbols.
*/
-const char exodus_unused_symbol_dummy_1;
+const char exodus_unused_symbol_dummy_ex_open_par;
#endif

View File

@ -1,13 +0,0 @@
__declspec(dllexport) does not imply extern: add it. This fixes compilation with gcc-10.1
--- a/ThirdParty/libxml2/vtklibxml2/include/libxml/xmlexports.h 2020-05-17 14:32:52.863037615 +0200
+++ b/ThirdParty/libxml2/vtklibxml2/include/libxml/xmlexports.h 2020-05-17 14:32:23.266063521 +0200
@@ -111,7 +111,7 @@
#undef XMLCDECL
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
#define XMLPUBFUN __declspec(dllexport)
- #define XMLPUBVAR __declspec(dllexport)
+ #define XMLPUBVAR __declspec(dllexport) extern
#else
#define XMLPUBFUN
#if !defined(LIBXML_STATIC)