vtk: update to 9.1.0
This commit is contained in:
committed by
مهدي شينون (Mehdi Chinoune)
parent
fd283d9ad8
commit
38cdfb13df
11
mingw-w64-vtk/001-no-strptime-with-clang.patch
Normal file
11
mingw-w64-vtk/001-no-strptime-with-clang.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/Filters/General/vtkDateToNumeric.cxx
|
||||
+++ b/Filters/General/vtkDateToNumeric.cxx
|
||||
@@ -30,7 +30,7 @@
|
||||
// old versions of gcc are missing some pices of c++11 such as std::get_time
|
||||
// so use
|
||||
|
||||
-#if (defined(__GNUC__) && (__GNUC__ < 5)) || defined(ANDROID)
|
||||
+#if (defined(__GNUC__) && (__GNUC__ < 5) && !defined(__clang__)) || defined(ANDROID)
|
||||
#define USE_STRPTIME
|
||||
#include "time.h"
|
||||
#endif
|
||||
@@ -1,52 +0,0 @@
|
||||
diff -Naur VTK-6.1.0.a/Common/Core/vtkConditionVariable.cxx VTK-6.1.0.b/Common/Core/vtkConditionVariable.cxx
|
||||
--- VTK-6.1.0.a/Common/Core/vtkConditionVariable.cxx 2014-01-21 23:22:59.000000000 +0700
|
||||
+++ VTK-6.1.0.b/Common/Core/vtkConditionVariable.cxx 2014-09-21 00:06:12.458762700 +0700
|
||||
@@ -77,6 +77,15 @@
|
||||
#endif // ! defined(VTK_USE_PTHREADS) && ! defined(VTK_HP_PTHREADS) && ! defined(VTK_USE_WIN32_THREADS)
|
||||
|
||||
#ifdef VTK_USE_WIN32_THREADS
|
||||
+
|
||||
+#define pthread_cond_t vtk_win32_pthread_cond_t
|
||||
+#define pthread_condattr_t vtk_win32_pthread_condattr_t
|
||||
+#define pthread_cond_init vtk_win32_pthread_cond_init
|
||||
+#define pthread_cond_wait vtk_win32_pthread_cond_wait
|
||||
+#define pthread_cond_signal vtk_win32_pthread_cond_signal
|
||||
+#define pthread_cond_broadcast vtk_win32_pthread_cond_broadcast
|
||||
+#define pthread_cond_destroy vtk_win32_pthread_cond_destroy
|
||||
+
|
||||
typedef int pthread_condattr_t;
|
||||
|
||||
# if 1
|
||||
diff -Naur VTK-6.1.0.a/Common/Core/vtkConditionVariable.h VTK-6.1.0.b/Common/Core/vtkConditionVariable.h
|
||||
--- VTK-6.1.0.a/Common/Core/vtkConditionVariable.h 2014-01-21 23:22:59.000000000 +0700
|
||||
+++ VTK-6.1.0.b/Common/Core/vtkConditionVariable.h 2014-09-21 00:06:12.489962700 +0700
|
||||
@@ -50,6 +50,7 @@
|
||||
|
||||
#ifdef VTK_USE_WIN32_THREADS
|
||||
#if 1
|
||||
+#define pthread_cond_t vtk_win32_pthread_cond_t
|
||||
typedef struct
|
||||
{
|
||||
// Number of threads waiting on condition.
|
||||
@@ -70,6 +71,7 @@
|
||||
} pthread_cond_t;
|
||||
|
||||
typedef pthread_cond_t vtkConditionType;
|
||||
+#undef pthread_cond_t
|
||||
# else // 0
|
||||
typedef struct
|
||||
{
|
||||
diff -Naur VTK-6.1.0.a/Filters/General/vtkMultiThreshold.h VTK-6.1.0.b/Filters/General/vtkMultiThreshold.h
|
||||
--- VTK-6.1.0.a/Filters/General/vtkMultiThreshold.h 2014-01-21 23:22:59.000000000 +0700
|
||||
+++ VTK-6.1.0.b/Filters/General/vtkMultiThreshold.h 2014-09-21 05:32:57.474083800 +0700
|
||||
@@ -107,6 +107,10 @@
|
||||
#include <set> // for UpdateDependents()
|
||||
#include <string> // for holding array names in NormKey
|
||||
|
||||
+#ifdef AND
|
||||
+#undef AND
|
||||
+#endif
|
||||
+
|
||||
class vtkCell;
|
||||
class vtkCellData;
|
||||
class vtkDataArray;
|
||||
22
mingw-w64-vtk/002-fix-python-modules-path.patch
Normal file
22
mingw-w64-vtk/002-fix-python-modules-path.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
--- a/CMake/vtkModuleWrapPython.cmake
|
||||
+++ b/CMake/vtkModuleWrapPython.cmake
|
||||
@@ -71,7 +71,7 @@
|
||||
"Only Python2 and Python3 are supported right now.")
|
||||
endif ()
|
||||
|
||||
- if (WIN32 AND NOT CYGWIN)
|
||||
+ if (MSVC)
|
||||
set(destination "${CMAKE_INSTALL_BINDIR}/Lib/site-packages")
|
||||
else ()
|
||||
if (NOT DEFINED "Python${_vtk_module_python_MAJOR_VERSION}_VERSION_MAJOR" OR
|
||||
--- a/Utilities/Python/CMakeLists.txt
|
||||
+++ b/Utilities/Python/CMakeLists.txt
|
||||
@@ -81,7 +81,7 @@
|
||||
# Export location of python module dirs in install and build tree for every vtkpython module to use
|
||||
# As long as those modules depend on vtkpython, they can retrieve and use these
|
||||
if (NOT VTK_PYTHON_SITE_PACKAGES_SUFFIX)
|
||||
- if (WIN32 AND NOT CYGWIN)
|
||||
+ if (MSVC)
|
||||
set(VTK_PYTHON_SITE_PACKAGES_SUFFIX "Lib/site-packages")
|
||||
else ()
|
||||
set(VTK_PYTHON_SITE_PACKAGES_SUFFIX
|
||||
@@ -1,25 +0,0 @@
|
||||
--- VTK-8.0.1/ThirdParty/libharu/vtk_libharu.h.in.orig 2017-09-05 19:09:32.245588300 +0300
|
||||
+++ VTK-8.0.1/ThirdParty/libharu/vtk_libharu.h.in 2017-09-05 19:09:48.414513100 +0300
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/* HPDF requires that HPDF_DLL be defined when linking against a shared library
|
||||
* on MSVC. */
|
||||
-#if defined(VTK_COMPILER_MSVC)
|
||||
+#if defined(WIN32)
|
||||
|
||||
#ifdef VTK_USE_SYSTEM_LIBHARU
|
||||
|
||||
--- VTK-8.1.0/IO/Export/CMakeLists.txt.orig 2018-01-16 14:40:52.435101000 +0300
|
||||
+++ VTK-8.1.0/IO/Export/CMakeLists.txt 2018-01-16 14:43:22.684067900 +0300
|
||||
@@ -36,6 +36,11 @@
|
||||
ABSTRACT
|
||||
)
|
||||
|
||||
+if(VTK_USE_SYSTEM_LIBHARU AND VTK_EXTERNAL_LIBHARU_IS_SHARED)
|
||||
+ add_definitions(-DHPDF_DLL)
|
||||
+elseif(VTK_BUILD_SHARED_LIBS)
|
||||
+ add_definitions(-DHPDF_DLL)
|
||||
+endif()
|
||||
vtk_module_library(vtkIOExport ${Module_SRCS})
|
||||
include(vtkOpenGL)
|
||||
vtk_opengl_link(vtkIOExport)
|
||||
22
mingw-w64-vtk/003-fix-find-odbc-mingw.patch
Normal file
22
mingw-w64-vtk/003-fix-find-odbc-mingw.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
--- a/CMake/FindODBC.cmake
|
||||
+++ b/CMake/FindODBC.cmake
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
# No .pc files are shipped with ODBC on Windows.
|
||||
set(_ODBC_use_pkgconfig 0)
|
||||
-if (NOT WIN32)
|
||||
+if (NOT MSVC)
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PkgConfig_FOUND)
|
||||
set(_ODBC_use_pkgconfig 1)
|
||||
@@ -36,6 +36,10 @@
|
||||
add_library(ODBC::ODBC INTERFACE IMPORTED)
|
||||
target_link_libraries(ODBC::ODBC
|
||||
INTERFACE "PkgConfig::${_odbc_target}")
|
||||
+ if(MINGW AND (${_odbc_target} STREQUAL "_unixodbc"))
|
||||
+ set_target_properties(ODBC::ODBC PROPERTIES
|
||||
+ INTERFACE_COMPILE_DEFINITIONS SQL_WCHART_CONVERT)
|
||||
+ endif()
|
||||
endif ()
|
||||
endif ()
|
||||
unset(_odbc_target)
|
||||
@@ -1,432 +0,0 @@
|
||||
diff --git a/Rendering/Tk/CMakeLists.txt b/Rendering/Tk/CMakeLists.txt
|
||||
index 916d376..976cc4f 100644
|
||||
--- a/Rendering/Tk/CMakeLists.txt
|
||||
+++ b/Rendering/Tk/CMakeLists.txt
|
||||
@@ -1,8 +1,6 @@
|
||||
vtk_module_export_info()
|
||||
|
||||
-# The cmake code to find the libs is in vtkWrapTcl
|
||||
-set(VTK_WRAP_TCL_FIND_LIBS 1)
|
||||
-include(vtkWrapTcl)
|
||||
+find_package(TCL)
|
||||
|
||||
if(TK_FOUND AND VTK_USE_TK)
|
||||
|
||||
@@ -31,6 +29,8 @@ if(TK_FOUND AND VTK_USE_TK)
|
||||
set(try_paths "${TK_INCLUDE_PATH_PARENT}/PrivateHeaders")
|
||||
endif()
|
||||
if(try_file)
|
||||
+ include(vtkTclTkMacros)
|
||||
+
|
||||
VTK_GET_TCL_TK_VERSION ("TCL_TK_MAJOR_VERSION" "TCL_TK_MINOR_VERSION")
|
||||
set(TCL_TK_VERSIOND "${TCL_TK_MAJOR_VERSION}.${TCL_TK_MINOR_VERSION}")
|
||||
set(try_paths ${try_paths}
|
||||
@@ -50,53 +50,17 @@ if(TK_FOUND AND VTK_USE_TK)
|
||||
${TK_INCLUDE_PATH}
|
||||
${TK_INTERNAL_PATH}
|
||||
${TK_XLIB_PATH}
|
||||
- ${TCL_INCLUDE_PATH}
|
||||
- ${VTK_SOURCE_DIR}/Wrapping/Tcl
|
||||
- ${VTK_BINARY_DIR}/Wrapping/Tcl)
|
||||
+ ${TCL_INCLUDE_PATH})
|
||||
|
||||
if(VTK_USE_X)
|
||||
include_directories(${VTK_BINARY_DIR}/Utilities/KWSys)
|
||||
endif()
|
||||
|
||||
- if (VTK_WRAP_TCL)
|
||||
- set(Module_TCL_SRCS
|
||||
- vtkTclTkWidgetsInit.cxx
|
||||
- vtkTkRenderWidget.cxx
|
||||
- vtkTkImageViewerWidget.cxx)
|
||||
-
|
||||
- if(VTK_USE_COCOA)
|
||||
- set(Module_TCL_SRCS ${Module_TCL_SRCS} vtkCocoaTkUtilities.mm)
|
||||
-
|
||||
- # Set specified Objective-C++ flags, if any.
|
||||
- if(VTK_REQUIRED_OBJCXX_FLAGS)
|
||||
- set_source_files_properties(vtkCocoaTkUtilities.mm
|
||||
- PROPERTIES COMPILE_FLAGS "${VTK_REQUIRED_OBJCXX_FLAGS}")
|
||||
- endif()
|
||||
- endif()
|
||||
-
|
||||
- set(Module_TCL_LIBS ${VTK_TK_LIBRARIES})
|
||||
- # Use special interactor for X and Tk.
|
||||
- if(VTK_USE_X)
|
||||
- find_package(X11 REQUIRED)
|
||||
- if(NOT X11_Xt_FOUND)
|
||||
- message(FATAL_ERROR "X11_Xt_LIB could not be found. Required for VTK X lib.")
|
||||
- endif()
|
||||
- set(Module_TCL_SRCS ${Module_TCL_SRCS} vtkXRenderWindowTclInteractor.cxx)
|
||||
- set(Module_TCL_LIBS vtksys vtkRendering${VTK_RENDERING_BACKEND} ${TK_LIBRARY} ${X11_LIBRARIES})
|
||||
- endif()
|
||||
-
|
||||
- vtk_add_library(vtkRenderingTkTCL ${Module_TCL_SRCS})
|
||||
-
|
||||
- vtk_module_link_libraries(vtkRenderingTkTCL
|
||||
- vtkRenderingCore vtkCommonDataModel vtkCommonCoreTCL
|
||||
- vtkInteractionImage
|
||||
- ${Module_TCL_LIBS})
|
||||
-
|
||||
- set_property(GLOBAL APPEND PROPERTY VTK_TCL_WRAPPED vtkRenderingTk)
|
||||
-
|
||||
- endif()
|
||||
-
|
||||
if (VTK_WRAP_PYTHON)
|
||||
+ configure_file(
|
||||
+ "${CMAKE_CURRENT_SOURCE_DIR}/vtkTkAppInitConfigure.h.in"
|
||||
+ "${CMAKE_CURRENT_BINARY_DIR}/vtkTkAppInitConfigure.h")
|
||||
+
|
||||
set(Module_PYTHON_SRCS
|
||||
vtkPythonTkWidgetsInit.cxx
|
||||
vtkTkRenderWidgetPython.cxx
|
||||
@@ -129,6 +93,8 @@ if(TK_FOUND AND VTK_USE_TK)
|
||||
vtk_module_link_libraries(vtkRenderingPythonTkWidgets
|
||||
vtkRenderingCore vtkCommonDataModel
|
||||
vtkInteractionImage
|
||||
- ${Module_PYTHON_LIBS})
|
||||
+ ${Module_PYTHON_LIBS}
|
||||
+ ${TCL_LIBRARY}
|
||||
+ ${TK_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
diff --git a/Rendering/Tk/vtkPythonTkWidgetsInit.cxx b/Rendering/Tk/vtkPythonTkWidgetsInit.cxx
|
||||
index 75a4e84..0b6e0b0 100644
|
||||
--- a/Rendering/Tk/vtkPythonTkWidgetsInit.cxx
|
||||
+++ b/Rendering/Tk/vtkPythonTkWidgetsInit.cxx
|
||||
@@ -23,10 +23,10 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// Vtkrenderingpythontkwidgets_Init
|
||||
// Called upon system startup to create the widget commands.
|
||||
-extern "C" {VTK_TK_EXPORT int Vtkrenderingpythontkwidgets_Init(Tcl_Interp *interp);}
|
||||
+extern "C" {VTK_EXPORT int Vtkrenderingpythontkwidgets_Init(Tcl_Interp *interp);}
|
||||
|
||||
-extern "C" {VTK_TK_EXPORT int Vtktkrenderwidget_Init(Tcl_Interp *interp);}
|
||||
-extern "C" {VTK_TK_EXPORT int Vtktkimageviewerwidget_Init(Tcl_Interp *interp);}
|
||||
+extern "C" {VTK_EXPORT int Vtktkrenderwidget_Init(Tcl_Interp *interp);}
|
||||
+extern "C" {VTK_EXPORT int Vtktkimageviewerwidget_Init(Tcl_Interp *interp);}
|
||||
|
||||
#define VTKTK_TO_STRING(x) VTKTK_TO_STRING0(x)
|
||||
#define VTKTK_TO_STRING0(x) VTKTK_TO_STRING1(x)
|
||||
diff --git a/Rendering/Tk/vtkTcl.h b/Rendering/Tk/vtkTcl.h
|
||||
new file mode 100644
|
||||
index 0000000..5b763d5
|
||||
--- /dev/null
|
||||
+++ b/Rendering/Tk/vtkTcl.h
|
||||
@@ -0,0 +1,28 @@
|
||||
+/*=========================================================================
|
||||
+
|
||||
+ Program: Visualization Toolkit
|
||||
+ Module: vtkTcl.h
|
||||
+
|
||||
+ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
|
||||
+ All rights reserved.
|
||||
+ See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
|
||||
+
|
||||
+ This software is distributed WITHOUT ANY WARRANTY; without even
|
||||
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
+ PURPOSE. See the above copyright notice for more information.
|
||||
+
|
||||
+=========================================================================*/
|
||||
+#ifndef vtkTcl_h
|
||||
+#define vtkTcl_h
|
||||
+
|
||||
+#include "vtkTkAppInitConfigure.h"
|
||||
+
|
||||
+#ifdef VTK_TCL_TK_STATIC
|
||||
+# ifndef STATIC_BUILD
|
||||
+# define STATIC_BUILD
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
+#include <tcl.h>
|
||||
+
|
||||
+#endif
|
||||
diff --git a/Rendering/Tk/vtkTclTkWidgetsInit.cxx b/Rendering/Tk/vtkTclTkWidgetsInit.cxx
|
||||
deleted file mode 100644
|
||||
index 9e5fc31..0000000
|
||||
--- a/Rendering/Tk/vtkTclTkWidgetsInit.cxx
|
||||
+++ /dev/null
|
||||
@@ -1,51 +0,0 @@
|
||||
-/*=========================================================================
|
||||
-
|
||||
- Program: Visualization Toolkit
|
||||
- Module: vtkTkWidgetsInit.cxx
|
||||
-
|
||||
- Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
|
||||
- All rights reserved.
|
||||
- See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
|
||||
-
|
||||
- This software is distributed WITHOUT ANY WARRANTY; without even
|
||||
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
- PURPOSE. See the above copyright notice for more information.
|
||||
-
|
||||
-=========================================================================*/
|
||||
-#include "vtkTcl.h"
|
||||
-#include "vtkTk.h"
|
||||
-#include "vtkVersionMacros.h"
|
||||
-#include "vtkTkImageViewerWidget.h"
|
||||
-#include "vtkTkRenderWidget.h"
|
||||
-#include "vtkImageData.h"
|
||||
-
|
||||
-
|
||||
-//----------------------------------------------------------------------------
|
||||
-// Vtkrenderingtcltkwidgets_Init
|
||||
-// Called upon system startup to create the widget commands.
|
||||
-extern "C" {VTK_TK_EXPORT int Vtkrenderingtktcl_Init(Tcl_Interp *interp);}
|
||||
-
|
||||
-extern "C" {VTK_TK_EXPORT int Vtktkrenderwidget_Init(Tcl_Interp *interp);}
|
||||
-extern "C" {VTK_TK_EXPORT int Vtktkimageviewerwidget_Init(Tcl_Interp *interp);}
|
||||
-
|
||||
-#define VTKTK_TO_STRING(x) VTKTK_TO_STRING0(x)
|
||||
-#define VTKTK_TO_STRING0(x) VTKTK_TO_STRING1(x)
|
||||
-#define VTKTK_TO_STRING1(x) #x
|
||||
-#define VTKTK_VERSION VTKTK_TO_STRING(VTK_MAJOR_VERSION) "." VTKTK_TO_STRING(VTK_MINOR_VERSION)
|
||||
-
|
||||
-int Vtkrenderingtktcl_Init(Tcl_Interp *interp)
|
||||
-{
|
||||
- // Forward the call to the real init functions.
|
||||
- if(Vtktkrenderwidget_Init(interp) == TCL_OK &&
|
||||
- Vtktkimageviewerwidget_Init(interp) == TCL_OK)
|
||||
- {
|
||||
- // Report that the package is provided.
|
||||
- return Tcl_PkgProvide(interp, (char*)"vtkRenderingTkTCL",
|
||||
- (char*)VTKTK_VERSION);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- // One of the widgets is not provided.
|
||||
- return TCL_ERROR;
|
||||
- }
|
||||
-}
|
||||
diff --git a/Rendering/Tk/vtkTclUtil.h b/Rendering/Tk/vtkTclUtil.h
|
||||
new file mode 100644
|
||||
index 0000000..45db3c0
|
||||
--- /dev/null
|
||||
+++ b/Rendering/Tk/vtkTclUtil.h
|
||||
@@ -0,0 +1,118 @@
|
||||
+/*=========================================================================
|
||||
+
|
||||
+ Program: Visualization Toolkit
|
||||
+ Module: vtkTclUtil.h
|
||||
+
|
||||
+ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
|
||||
+ All rights reserved.
|
||||
+ See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
|
||||
+
|
||||
+ This software is distributed WITHOUT ANY WARRANTY; without even
|
||||
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
+ PURPOSE. See the above copyright notice for more information.
|
||||
+
|
||||
+=========================================================================*/
|
||||
+
|
||||
+#ifndef vtkTclUtil_h
|
||||
+#define vtkTclUtil_h
|
||||
+
|
||||
+#include "vtkObject.h"
|
||||
+#include "vtkCommand.h"
|
||||
+#include "vtkTcl.h"
|
||||
+
|
||||
+#ifdef _WIN32
|
||||
+#define VTKTCL_EXPORT __declspec( dllexport )
|
||||
+#else
|
||||
+#define VTKTCL_EXPORT
|
||||
+#endif
|
||||
+
|
||||
+extern VTKTCL_EXPORT void vtkTclUpdateCommand(Tcl_Interp *interp,
|
||||
+ char *name,
|
||||
+ vtkObject *obj);
|
||||
+
|
||||
+extern VTKTCL_EXPORT void vtkTclDeleteObjectFromHash(vtkObject *,
|
||||
+ unsigned long eventId,
|
||||
+ void *, void *);
|
||||
+extern VTKTCL_EXPORT void vtkTclGenericDeleteObject(ClientData cd);
|
||||
+
|
||||
+extern VTKTCL_EXPORT void
|
||||
+vtkTclGetObjectFromPointer(Tcl_Interp *interp, void *temp,
|
||||
+ const char *targetType);
|
||||
+
|
||||
+extern VTKTCL_EXPORT void *
|
||||
+vtkTclGetPointerFromObject(const char *name, const char *result_type,
|
||||
+ Tcl_Interp *interp, int &error);
|
||||
+
|
||||
+extern VTKTCL_EXPORT void vtkTclVoidFunc(void *);
|
||||
+extern VTKTCL_EXPORT void vtkTclVoidFuncArgDelete(void *);
|
||||
+extern VTKTCL_EXPORT void vtkTclListInstances(Tcl_Interp *interp,
|
||||
+ ClientData arg);
|
||||
+extern VTKTCL_EXPORT int vtkTclInDelete(Tcl_Interp *interp);
|
||||
+
|
||||
+extern VTKTCL_EXPORT int vtkTclNewInstanceCommand(ClientData cd,
|
||||
+ Tcl_Interp *interp,
|
||||
+ int argc, char *argv[]);
|
||||
+extern VTKTCL_EXPORT void vtkTclDeleteCommandStruct(ClientData cd);
|
||||
+extern VTKTCL_EXPORT
|
||||
+void vtkTclCreateNew(Tcl_Interp *interp, const char *cname,
|
||||
+ ClientData (*NewCommand)(),
|
||||
+ int (*CommandFunction)(ClientData cd,
|
||||
+ Tcl_Interp *interp,
|
||||
+ int argc, char *argv[]));
|
||||
+
|
||||
+class vtkTclCommand : public vtkCommand
|
||||
+{
|
||||
+public:
|
||||
+ static vtkTclCommand *New() { return new vtkTclCommand; };
|
||||
+
|
||||
+ void SetStringCommand(const char *arg);
|
||||
+ void SetInterp(Tcl_Interp *interp) { this->Interp = interp; };
|
||||
+
|
||||
+ void Execute(vtkObject *, unsigned long, void *);
|
||||
+
|
||||
+ char *StringCommand;
|
||||
+ Tcl_Interp *Interp;
|
||||
+protected:
|
||||
+ vtkTclCommand();
|
||||
+ ~vtkTclCommand();
|
||||
+};
|
||||
+
|
||||
+typedef struct _vtkTclVoidFuncArg
|
||||
+{
|
||||
+ Tcl_Interp *interp;
|
||||
+ char *command;
|
||||
+} vtkTclVoidFuncArg;
|
||||
+
|
||||
+struct vtkTclCommandArgStruct
|
||||
+{
|
||||
+ void *Pointer;
|
||||
+ Tcl_Interp *Interp;
|
||||
+ unsigned long Tag;
|
||||
+};
|
||||
+
|
||||
+struct vtkTclCommandStruct
|
||||
+{
|
||||
+ ClientData (*NewCommand)();
|
||||
+ int (*CommandFunction)(ClientData cd, Tcl_Interp *interp,
|
||||
+ int argc, char *argv[]);
|
||||
+};
|
||||
+
|
||||
+struct vtkTclInterpStruct
|
||||
+{
|
||||
+ Tcl_HashTable InstanceLookup;
|
||||
+ Tcl_HashTable PointerLookup;
|
||||
+ Tcl_HashTable CommandLookup;
|
||||
+
|
||||
+ int Number;
|
||||
+ int DebugOn;
|
||||
+ int InDelete;
|
||||
+ int DeleteExistingObjectOnNew;
|
||||
+};
|
||||
+
|
||||
+extern VTKTCL_EXPORT
|
||||
+void vtkTclApplicationInitExecutable(int argc, const char* const argv[]);
|
||||
+extern VTKTCL_EXPORT
|
||||
+void vtkTclApplicationInitTclTk(Tcl_Interp* interp,
|
||||
+ const char* const relative_dirs[]);
|
||||
+
|
||||
+#endif
|
||||
diff --git a/Rendering/Tk/vtkTk.h b/Rendering/Tk/vtkTk.h
|
||||
new file mode 100644
|
||||
index 0000000..ff13966
|
||||
--- /dev/null
|
||||
+++ b/Rendering/Tk/vtkTk.h
|
||||
@@ -0,0 +1,28 @@
|
||||
+/*=========================================================================
|
||||
+
|
||||
+ Program: Visualization Toolkit
|
||||
+ Module: vtkTk.h
|
||||
+
|
||||
+ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
|
||||
+ All rights reserved.
|
||||
+ See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
|
||||
+
|
||||
+ This software is distributed WITHOUT ANY WARRANTY; without even
|
||||
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
+ PURPOSE. See the above copyright notice for more information.
|
||||
+
|
||||
+=========================================================================*/
|
||||
+#ifndef vtkTk_h
|
||||
+#define vtkTk_h
|
||||
+
|
||||
+#include "vtkTkAppInitConfigure.h"
|
||||
+
|
||||
+#ifdef VTK_TCL_TK_STATIC
|
||||
+# ifndef STATIC_BUILD
|
||||
+# define STATIC_BUILD
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
+#include <tk.h>
|
||||
+
|
||||
+#endif
|
||||
diff --git a/Rendering/Tk/vtkTkAppInitConfigure.h.in b/Rendering/Tk/vtkTkAppInitConfigure.h.in
|
||||
new file mode 100644
|
||||
index 0000000..3e0dec7
|
||||
--- /dev/null
|
||||
+++ b/Rendering/Tk/vtkTkAppInitConfigure.h.in
|
||||
@@ -0,0 +1,18 @@
|
||||
+#ifndef vtkTkAppInitConfigure_h
|
||||
+#define vtkTkAppInitConfigure_h
|
||||
+
|
||||
+/* Whether we are linking to Tcl/Tk statically. */
|
||||
+#cmakedefine VTK_TCL_TK_STATIC
|
||||
+
|
||||
+/* Whether Tk widgets are NOT initialized when vtkRendering loads. */
|
||||
+#cmakedefine VTK_USE_TK
|
||||
+
|
||||
+/* Whether the Tcl/Tk support files are copied to the build dir */
|
||||
+#cmakedefine VTK_TCL_TK_COPY_SUPPORT_LIBRARY
|
||||
+
|
||||
+/* Where the VTK Tcl packages can be found */
|
||||
+#define VTK_INSTALL_TCL_DIR "@VTK_INSTALL_TCL_DIR@"
|
||||
+
|
||||
+@VTK_EXTRA_TCL_WRAPPING_CODE@
|
||||
+
|
||||
+#endif
|
||||
diff --git a/Rendering/Tk/vtkTkImageViewerWidget.cxx b/Rendering/Tk/vtkTkImageViewerWidget.cxx
|
||||
index d3ae0f0..5967b7f 100644
|
||||
--- a/Rendering/Tk/vtkTkImageViewerWidget.cxx
|
||||
+++ b/Rendering/Tk/vtkTkImageViewerWidget.cxx
|
||||
@@ -443,7 +443,7 @@ extern "C"
|
||||
//----------------------------------------------------------------------------
|
||||
// vtkTkImageViewerWidget_Init
|
||||
// Called upon system startup to create vtkTkImageViewerWidget command.
|
||||
-extern "C" {VTK_TK_EXPORT int Vtktkimageviewerwidget_Init(Tcl_Interp *interp);}
|
||||
+extern "C" {VTK_EXPORT int Vtktkimageviewerwidget_Init(Tcl_Interp *interp);}
|
||||
|
||||
#define VTKTK_TO_STRING(x) VTKTK_TO_STRING0(x)
|
||||
#define VTKTK_TO_STRING0(x) VTKTK_TO_STRING1(x)
|
||||
diff --git a/Rendering/Tk/vtkTkRenderWidget.cxx b/Rendering/Tk/vtkTkRenderWidget.cxx
|
||||
index 6c1825d..a30cc38 100644
|
||||
--- a/Rendering/Tk/vtkTkRenderWidget.cxx
|
||||
+++ b/Rendering/Tk/vtkTkRenderWidget.cxx
|
||||
@@ -759,14 +759,14 @@ extern "C"
|
||||
//----------------------------------------------------------------------------
|
||||
// vtkTkRenderWidget_Init
|
||||
// Called upon system startup to create vtkTkRenderWidget command.
|
||||
-extern "C" {VTK_TK_EXPORT int Vtktkrenderwidget_Init(Tcl_Interp *interp);}
|
||||
+extern "C" {VTK_EXPORT int Vtktkrenderwidget_Init(Tcl_Interp *interp);}
|
||||
|
||||
#define VTKTK_TO_STRING(x) VTKTK_TO_STRING0(x)
|
||||
#define VTKTK_TO_STRING0(x) VTKTK_TO_STRING1(x)
|
||||
#define VTKTK_TO_STRING1(x) #x
|
||||
#define VTKTK_VERSION VTKTK_TO_STRING(VTK_MAJOR_VERSION) "." VTKTK_TO_STRING(VTK_MINOR_VERSION)
|
||||
|
||||
-int VTK_TK_EXPORT Vtktkrenderwidget_Init(Tcl_Interp *interp)
|
||||
+int VTK_EXPORT Vtktkrenderwidget_Init(Tcl_Interp *interp)
|
||||
{
|
||||
// This widget requires Tk to function.
|
||||
Tcl_PkgRequire(interp, (char *)"Tk", (char*)TK_VERSION, 0);
|
||||
diff --git a/ThirdParty/TclTk/CMakeLists.txt b/ThirdParty/TclTk/CMakeLists.txt
|
||||
index eb2b61d..904acf0 100644
|
||||
--- a/ThirdParty/TclTk/CMakeLists.txt
|
||||
+++ b/ThirdParty/TclTk/CMakeLists.txt
|
||||
@@ -19,9 +19,7 @@ endif()
|
||||
vtk_dependent_option(VTK_USE_TK "Build VTK with Tk support"
|
||||
${VTK_USE_TK_DEFAULT} "VTK_CAN_USE_TK" OFF)
|
||||
|
||||
-# The cmake code to find the libs is in vtkWrapTcl
|
||||
-set(VTK_WRAP_TCL_FIND_LIBS 1)
|
||||
-include(vtkWrapTcl)
|
||||
+include(vtkTclTkMacros)
|
||||
|
||||
# Subdirs
|
||||
ADD_SUBDIRECTORY(internals)
|
||||
25
mingw-w64-vtk/004-Build-GUISupportMFC-only-with-MSVC.patch
Normal file
25
mingw-w64-vtk/004-Build-GUISupportMFC-only-with-MSVC.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From 83f7f1e7d321b9ab674e47bcd18d7e6770aacb81 Mon Sep 17 00:00:00 2001
|
||||
From: Mehdi Chinoune <mehdi.chinoune@hotmail.com>
|
||||
Date: Sat, 26 Mar 2022 22:51:04 +0100
|
||||
Subject: [PATCH] Build GUISupportMFC only with MSVC
|
||||
|
||||
---
|
||||
GUISupport/MFC/vtk.module | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/GUISupport/MFC/vtk.module b/GUISupport/MFC/vtk.module
|
||||
index 77288e37a4..ae471d3d8e 100644
|
||||
--- a/GUISupport/MFC/vtk.module
|
||||
+++ b/GUISupport/MFC/vtk.module
|
||||
@@ -3,7 +3,7 @@ NAME
|
||||
LIBRARY_NAME
|
||||
vtkGUISupportMFC
|
||||
CONDITION
|
||||
- WIN32
|
||||
+ MSVC
|
||||
DEPENDS
|
||||
# If dependencies are added, update the list in the `CMakeLists.txt`.
|
||||
VTK::RenderingOpenGL2
|
||||
--
|
||||
2.35.1.windows.2
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
--- VTK-8.1.0/Rendering/Tk/CMakeLists.txt.orig 2018-01-16 12:43:51.876548900 +0300
|
||||
+++ VTK-8.1.0/Rendering/Tk/CMakeLists.txt 2018-01-16 12:44:37.861020600 +0300
|
||||
@@ -93,6 +93,7 @@
|
||||
vtk_module_link_libraries(vtkRenderingPythonTkWidgets
|
||||
vtkRenderingCore vtkCommonDataModel
|
||||
vtkInteractionImage
|
||||
+ vtkRendering${VTK_RENDERING_BACKEND}
|
||||
${Module_PYTHON_LIBS}
|
||||
${TCL_LIBRARY}
|
||||
${TK_LIBRARY})
|
||||
61
mingw-w64-vtk/005-fix-build-vtkm-mingw.patch
Normal file
61
mingw-w64-vtk/005-fix-build-vtkm-mingw.patch
Normal file
@@ -0,0 +1,61 @@
|
||||
--- a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/internal/Configure.h.in
|
||||
+++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/internal/Configure.h.in
|
||||
@@ -49,6 +49,11 @@
|
||||
//compliance
|
||||
#define VTKM_CLANG
|
||||
|
||||
+#elif defined(__MINGW32__)
|
||||
+//Check for MinGW before GCC, since MinGW will be otherwise categorized
|
||||
+//as VTKM_GCC
|
||||
+#define VTKM_MINGW
|
||||
+
|
||||
#elif defined(__GNUC__)
|
||||
// Several compilers pretend to be GCC but have minor differences. Try to
|
||||
// compensate for that, by checking for those compilers first
|
||||
--- a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/io/FileUtils.cxx
|
||||
+++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/io/FileUtils.cxx
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
-#ifdef _MSC_VER
|
||||
+#ifdef _WIN32
|
||||
#include <direct.h>
|
||||
#endif
|
||||
|
||||
@@ -42,7 +42,7 @@ std::string Filename(const std::string& filePath)
|
||||
// std::filesystem::path path(filePath);
|
||||
// return path.filename();
|
||||
|
||||
-#ifdef _MSC_VER
|
||||
+#ifdef _WIN32
|
||||
auto lastSlashPos = filePath.rfind(GetWindowsPathSeperator(filePath));
|
||||
#else
|
||||
auto lastSlashPos = filePath.rfind('/');
|
||||
@@ -60,7 +60,7 @@ std::string ParentPath(const std::string& filePath)
|
||||
// std::filesystem::path path(filePath);
|
||||
// return path.parent_path();
|
||||
|
||||
-#ifdef _MSC_VER
|
||||
+#ifdef _WIN32
|
||||
auto lastSlashPos = filePath.rfind(GetWindowsPathSeperator(filePath));
|
||||
#else
|
||||
auto lastSlashPos = filePath.rfind('/');
|
||||
@@ -88,7 +88,7 @@ bool CreateDirectoriesFromFilePath(const std::string& filePath)
|
||||
return false;
|
||||
}
|
||||
|
||||
-#ifdef _MSC_VER
|
||||
+#ifdef _WIN32
|
||||
auto ret = _mkdir(dir.c_str());
|
||||
#else
|
||||
mode_t mode = 0755;
|
||||
@@ -145,7 +145,7 @@ std::string MergePaths(const std::string& filePathPrefix, const std::string& fil
|
||||
return prefix;
|
||||
}
|
||||
|
||||
-#ifdef _MSC_VER
|
||||
+#ifdef _WIN32
|
||||
prefixPathSeperator = GetWindowsPathSeperator(prefix);
|
||||
suffixPathSeperator = suffix[0] == '/' || suffix[0] == '\\' ? suffix[0] : prefixPathSeperator;
|
||||
#endif
|
||||
@@ -1,11 +0,0 @@
|
||||
--- VTK-8.1.1/CMake/FindFFMPEG.cmake.orig 2018-09-20 21:20:30.374287300 +0200
|
||||
+++ VTK-8.1.1/CMake/FindFFMPEG.cmake 2018-09-20 22:29:52.930584400 +0200
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
# Note we don't check FFMPEG_LIBSWSCALE_FOUND, FFMPEG_LIBAVDEVICE_FOUND,
|
||||
# and FFMPEG_LIBAVUTIL_FOUND as they are optional.
|
||||
-IF (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND STDINT_OK)
|
||||
+IF (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVCODEC_FOUND)
|
||||
|
||||
SET(FFMPEG_FOUND "YES")
|
||||
|
||||
12
mingw-w64-vtk/006-link-to-pdalcpp.patch
Normal file
12
mingw-w64-vtk/006-link-to-pdalcpp.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
--- a/IO/PDAL/CMakeLists.txt
|
||||
+++ b/IO/PDAL/CMakeLists.txt
|
||||
@@ -7,7 +7,8 @@
|
||||
CLASSES ${classes})
|
||||
vtk_module_link(VTK::IOPDAL
|
||||
PRIVATE
|
||||
- pdal_base)
|
||||
+ pdalcpp
|
||||
+ pdal_util)
|
||||
# XXX(pdal): PDAL should add include interfaces to its exported targets. See
|
||||
# https://github.com/PDAL/PDAL/issues/2262.
|
||||
vtk_module_include(VTK::IOPDAL
|
||||
@@ -1,18 +0,0 @@
|
||||
--- VTK-8.1.2/Rendering/OpenGL2/vtkWin32RenderWindowInteractor.cxx.orig 2018-11-28 07:52:31.531104700 +0300
|
||||
+++ VTK-8.1.2/Rendering/OpenGL2/vtkWin32RenderWindowInteractor.cxx 2018-11-28 07:53:04.823563300 +0300
|
||||
@@ -56,6 +56,7 @@
|
||||
// so we define them and then do a runtime checks and function pointers
|
||||
// to avoid a link requirement on Windows 7
|
||||
#define MOUSEEVENTF_FROMTOUCH 0xFF515700
|
||||
+#if _WIN32_WINNT < 0x601
|
||||
#define WM_TOUCH 0x0240
|
||||
#define TOUCH_COORD_TO_PIXEL(l) ((l) / 100)
|
||||
typedef struct _TOUCHINPUT {
|
||||
@@ -75,6 +76,7 @@
|
||||
#define TOUCHEVENTF_MOVE 0x0001
|
||||
#define TOUCHEVENTF_DOWN 0x0002
|
||||
#define TOUCHEVENTF_UP 0x0004
|
||||
+#endif
|
||||
typedef bool (WINAPI *RegisterTouchWindowType)(HWND,ULONG);
|
||||
typedef bool (WINAPI *GetTouchInputInfoType)(HTOUCHINPUT,UINT,PTOUCHINPUT,int);
|
||||
typedef bool (WINAPI *CloseTouchInputHandleType)(HTOUCHINPUT);
|
||||
159
mingw-w64-vtk/007-dll-export-some-functions.patch
Normal file
159
mingw-w64-vtk/007-dll-export-some-functions.patch
Normal file
@@ -0,0 +1,159 @@
|
||||
--- a/Common/Core/vtkAOSDataArrayTemplate.h
|
||||
+++ b/Common/Core/vtkAOSDataArrayTemplate.h
|
||||
@@ -63,7 +63,7 @@
|
||||
/**
|
||||
* Get the value at @a valueIdx. @a valueIdx assumes AOS ordering.
|
||||
*/
|
||||
- ValueType GetValue(vtkIdType valueIdx) const
|
||||
+ VTKCOMMONCORE_EXPORT ValueType GetValue(vtkIdType valueIdx) const
|
||||
VTK_EXPECTS(0 <= valueIdx && valueIdx < GetNumberOfValues())
|
||||
{
|
||||
return this->Buffer->GetBuffer()[valueIdx];
|
||||
@@ -72,7 +72,7 @@
|
||||
/**
|
||||
* Set the value at @a valueIdx to @a value. @a valueIdx assumes AOS ordering.
|
||||
*/
|
||||
- void SetValue(vtkIdType valueIdx, ValueType value)
|
||||
+ VTKCOMMONCORE_EXPORT void SetValue(vtkIdType valueIdx, ValueType value)
|
||||
VTK_EXPECTS(0 <= valueIdx && valueIdx < GetNumberOfValues())
|
||||
{
|
||||
this->Buffer->GetBuffer()[valueIdx] = value;
|
||||
@@ -82,7 +82,7 @@
|
||||
/**
|
||||
* Copy the tuple at @a tupleIdx into @a tuple.
|
||||
*/
|
||||
- void GetTypedTuple(vtkIdType tupleIdx, ValueType* tuple) const
|
||||
+ VTKCOMMONCORE_EXPORT void GetTypedTuple(vtkIdType tupleIdx, ValueType* tuple) const
|
||||
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
|
||||
{
|
||||
const vtkIdType valueIdx = tupleIdx * this->NumberOfComponents;
|
||||
@@ -95,7 +95,7 @@
|
||||
/**
|
||||
* Set this array's tuple at @a tupleIdx to the values in @a tuple.
|
||||
*/
|
||||
- void SetTypedTuple(vtkIdType tupleIdx, const ValueType* tuple)
|
||||
+ VTKCOMMONCORE_EXPORT void SetTypedTuple(vtkIdType tupleIdx, const ValueType* tuple)
|
||||
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
|
||||
{
|
||||
const vtkIdType valueIdx = tupleIdx * this->NumberOfComponents;
|
||||
@@ -106,7 +106,7 @@
|
||||
/**
|
||||
* Get component @a comp of the tuple at @a tupleIdx.
|
||||
*/
|
||||
- ValueType GetTypedComponent(vtkIdType tupleIdx, int comp) const VTK_EXPECTS(0 <= tupleIdx &&
|
||||
+ VTKCOMMONCORE_EXPORT ValueType GetTypedComponent(vtkIdType tupleIdx, int comp) const VTK_EXPECTS(0 <= tupleIdx &&
|
||||
tupleIdx < GetNumberOfTuples()) VTK_EXPECTS(0 <= comp && comp < GetNumberOfComponents())
|
||||
{
|
||||
return this->Buffer->GetBuffer()[this->NumberOfComponents * tupleIdx + comp];
|
||||
@@ -116,7 +116,7 @@
|
||||
/**
|
||||
* Set component @a comp of the tuple at @a tupleIdx to @a value.
|
||||
*/
|
||||
- void SetTypedComponent(vtkIdType tupleIdx, int comp, ValueType value) VTK_EXPECTS(0 <= tupleIdx &&
|
||||
+ VTKCOMMONCORE_EXPORT void SetTypedComponent(vtkIdType tupleIdx, int comp, ValueType value) VTK_EXPECTS(0 <= tupleIdx &&
|
||||
tupleIdx < GetNumberOfTuples()) VTK_EXPECTS(0 <= comp && comp < GetNumberOfComponents())
|
||||
{
|
||||
const vtkIdType valueIdx = tupleIdx * this->NumberOfComponents + comp;
|
||||
@@ -260,7 +260,7 @@
|
||||
vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray* source) override;
|
||||
// MSVC doesn't like 'using' here (error C2487). Just forward instead:
|
||||
// using Superclass::InsertTuples;
|
||||
- void InsertTuples(vtkIdList* dstIds, vtkIdList* srcIds, vtkAbstractArray* source) override
|
||||
+ VTKCOMMONCORE_EXPORT void InsertTuples(vtkIdList* dstIds, vtkIdList* srcIds, vtkAbstractArray* source) override
|
||||
{
|
||||
this->Superclass::InsertTuples(dstIds, srcIds, source);
|
||||
}
|
||||
--- a/Common/Core/vtkSetGet.h
|
||||
+++ b/Common/Core/vtkSetGet.h
|
||||
@@ -827,7 +827,7 @@
|
||||
\
|
||||
public: \
|
||||
typedef superclass Superclass; \
|
||||
- static vtkTypeBool IsTypeOf(const char* type) \
|
||||
+ static VTKCOMMONCORE_EXPORT vtkTypeBool IsTypeOf(const char* type) \
|
||||
{ \
|
||||
if (!strcmp(thisClassName, type)) \
|
||||
{ \
|
||||
@@ -836,7 +836,7 @@
|
||||
return superclass::IsTypeOf(type); \
|
||||
} \
|
||||
vtkTypeBool IsA(const char* type) override { return this->thisClass::IsTypeOf(type); } \
|
||||
- static thisClass* SafeDownCast(vtkObjectBase* o) \
|
||||
+ static VTKCOMMONCORE_EXPORT thisClass* SafeDownCast(vtkObjectBase* o) \
|
||||
{ \
|
||||
if (o && o->IsA(thisClassName)) \
|
||||
{ \
|
||||
@@ -848,7 +848,7 @@
|
||||
{ \
|
||||
return instanceType::SafeDownCast(this->NewInstanceInternal()); \
|
||||
} \
|
||||
- static vtkIdType GetNumberOfGenerationsFromBaseType(const char* type) \
|
||||
+ static VTKCOMMONCORE_EXPORT vtkIdType GetNumberOfGenerationsFromBaseType(const char* type) \
|
||||
{ \
|
||||
if (!strcmp(thisClassName, type)) \
|
||||
{ \
|
||||
--- a/Common/Core/vtkSOADataArrayTemplate.h
|
||||
+++ b/Common/Core/vtkSOADataArrayTemplate.h
|
||||
@@ -60,7 +60,7 @@
|
||||
/**
|
||||
* Get the value at @a valueIdx. @a valueIdx assumes AOS ordering.
|
||||
*/
|
||||
- inline ValueType GetValue(vtkIdType valueIdx) const
|
||||
+ inline VTKCOMMONCORE_EXPORT ValueType GetValue(vtkIdType valueIdx) const
|
||||
{
|
||||
vtkIdType tupleIdx;
|
||||
int comp;
|
||||
@@ -73,7 +73,7 @@
|
||||
/**
|
||||
* Set the value at @a valueIdx to @a value. @a valueIdx assumes AOS ordering.
|
||||
*/
|
||||
- inline void SetValue(vtkIdType valueIdx, ValueType value)
|
||||
+ inline VTKCOMMONCORE_EXPORT void SetValue(vtkIdType valueIdx, ValueType value)
|
||||
{
|
||||
vtkIdType tupleIdx;
|
||||
int comp;
|
||||
@@ -85,7 +85,7 @@
|
||||
/**
|
||||
* Copy the tuple at @a tupleIdx into @a tuple.
|
||||
*/
|
||||
- inline void GetTypedTuple(vtkIdType tupleIdx, ValueType* tuple) const
|
||||
+ inline VTKCOMMONCORE_EXPORT void GetTypedTuple(vtkIdType tupleIdx, ValueType* tuple) const
|
||||
{
|
||||
for (size_t cc = 0; cc < this->Data.size(); cc++)
|
||||
{
|
||||
@@ -96,7 +96,7 @@
|
||||
/**
|
||||
* Set this array's tuple at @a tupleIdx to the values in @a tuple.
|
||||
*/
|
||||
- inline void SetTypedTuple(vtkIdType tupleIdx, const ValueType* tuple)
|
||||
+ inline VTKCOMMONCORE_EXPORT void SetTypedTuple(vtkIdType tupleIdx, const ValueType* tuple)
|
||||
{
|
||||
for (size_t cc = 0; cc < this->Data.size(); ++cc)
|
||||
{
|
||||
@@ -107,7 +107,7 @@
|
||||
/**
|
||||
* Get component @a comp of the tuple at @a tupleIdx.
|
||||
*/
|
||||
- inline ValueType GetTypedComponent(vtkIdType tupleIdx, int comp) const
|
||||
+ inline VTKCOMMONCORE_EXPORT ValueType GetTypedComponent(vtkIdType tupleIdx, int comp) const
|
||||
{
|
||||
return this->Data[comp]->GetBuffer()[tupleIdx];
|
||||
}
|
||||
@@ -115,7 +115,7 @@
|
||||
/**
|
||||
* Set component @a comp of the tuple at @a tupleIdx to @a value.
|
||||
*/
|
||||
- inline void SetTypedComponent(vtkIdType tupleIdx, int comp, ValueType value)
|
||||
+ inline VTKCOMMONCORE_EXPORT void SetTypedComponent(vtkIdType tupleIdx, int comp, ValueType value)
|
||||
{
|
||||
this->Data[comp]->GetBuffer()[tupleIdx] = value;
|
||||
}
|
||||
@@ -198,7 +198,7 @@
|
||||
vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray* source) override;
|
||||
// MSVC doesn't like 'using' here (error C2487). Just forward instead:
|
||||
// using Superclass::InsertTuples;
|
||||
- void InsertTuples(vtkIdList* dstIds, vtkIdList* srcIds, vtkAbstractArray* source) override
|
||||
+ VTKCOMMONCORE_EXPORT void InsertTuples(vtkIdList* dstIds, vtkIdList* srcIds, vtkAbstractArray* source) override
|
||||
{
|
||||
this->Superclass::InsertTuples(dstIds, srcIds, source);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
--- VTK-8.2.0/io/Movie/CMakeLists.txt.orig 2019-05-22 12:35:55.497788800 +0300
|
||||
+++ VTK-8.2.0/io/Movie/CMakeLists.txt 2019-05-22 12:38:27.387002000 +0300
|
||||
@@ -30,6 +30,10 @@
|
||||
|
||||
vtk_module_library(vtkIOMovie ${Module_SRCS})
|
||||
|
||||
+if (VTK_HAS_OGGTHEORA_SUPPORT)
|
||||
+ vtk_module_link_libraries(vtkIOMovie LINK_PRIVATE ${OGG_LIBRARY})
|
||||
+endif()
|
||||
+
|
||||
if(WIN32 AND VTK_USE_VIDEO_FOR_WINDOWS)
|
||||
vtk_module_link_libraries(vtkIOMovie LINK_PRIVATE vfw32)
|
||||
endif()
|
||||
@@ -1,75 +0,0 @@
|
||||
--- VTK-8.2.0/Utilities/Python/CMakeLists.txt.orig 2019-05-22 15:09:47.607021700 +0300
|
||||
+++ VTK-8.2.0/Utilities/Python/CMakeLists.txt 2019-05-22 15:10:29.029079800 +0300
|
||||
@@ -28,7 +28,7 @@
|
||||
# Export location of python module dirs in install and build tree for every vtkpython module to use
|
||||
# As long as those modules depend on vtkpython, they can retrieve and use these
|
||||
if(NOT VTK_PYTHON_SITE_PACKAGES_SUFFIX)
|
||||
- if(WIN32 AND NOT CYGWIN)
|
||||
+ if(MSVC)
|
||||
set(VTK_PYTHON_SITE_PACKAGES_SUFFIX "Lib/site-packages")
|
||||
else()
|
||||
set(VTK_PYTHON_SITE_PACKAGES_SUFFIX
|
||||
@@ -52,7 +52,7 @@
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED VTK_INSTALL_PYTHON_MODULES_DIR)
|
||||
- if(WIN32 AND NOT CYGWIN)
|
||||
+ if(MSVC)
|
||||
set(VTK_INSTALL_PYTHON_MODULES_DIR
|
||||
"${VTK_INSTALL_RUNTIME_DIR}/${VTK_PYTHON_SITE_PACKAGES_SUFFIX}"
|
||||
CACHE INTERNAL "Directory where python modules will be installed")
|
||||
--- VTK-8.2.0/ThirdParty/xdmf2/vtkxdmf2/CMake/setup_install_paths.py.orig 2019-05-22 15:14:18.614402100 +0300
|
||||
+++ VTK-8.2.0/ThirdParty/xdmf2/vtkxdmf2/CMake/setup_install_paths.py 2019-05-22 15:15:06.457469200 +0300
|
||||
@@ -16,6 +16,7 @@
|
||||
import string
|
||||
import sys
|
||||
import os
|
||||
+from sysconfig import _POSIX_BUILD
|
||||
|
||||
def get_install_path(command, *args):
|
||||
"""Return the module install path, given the arguments that were
|
||||
@@ -84,7 +85,7 @@
|
||||
platlib = home+'/lib/python'
|
||||
scripts = home+'/bin'
|
||||
data = home
|
||||
- elif os.name == 'posix':
|
||||
+ elif os.name == 'posix' or _POSIX_BUILD:
|
||||
ver = sys.version[0:3]
|
||||
purelib = prefix+'/lib/python'+ver+'/site-packages'
|
||||
platlib = exec_prefix+'/lib/python'+ver+'/site-packages'
|
||||
--- VTK-8.2.0/CMake/FindPythonLibs.cmake.orig 2019-01-30 18:15:13.000000000 +0100
|
||||
+++ VTK-8.2.0/CMake/FindPythonLibs.cmake 2021-01-03 10:14:54.693475800 +0100
|
||||
@@ -32,7 +32,7 @@
|
||||
# Use the executable's path as a hint
|
||||
set(_Python_LIBRARY_PATH_HINT)
|
||||
if(PYTHON_EXECUTABLE)
|
||||
- if(WIN32)
|
||||
+ if(MSVC)
|
||||
get_filename_component(_Python_PREFIX ${PYTHON_EXECUTABLE} PATH)
|
||||
if(_Python_PREFIX)
|
||||
set(_Python_LIBRARY_PATH_HINT ${_Python_PREFIX}/libs)
|
||||
@@ -70,11 +70,11 @@
|
||||
# the user supplied additional versions to the front.
|
||||
set(_Python_VERSIONS
|
||||
${Python_ADDITIONAL_VERSIONS} ${_PythonInterp_VERSION}
|
||||
- 2.7 2.6 2.5 3.6 3.5 3.4 3.3 3.2)
|
||||
+ 2.7 2.6 2.5 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2)
|
||||
|
||||
foreach(_CURRENT_VERSION ${_Python_VERSIONS})
|
||||
string(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
|
||||
- if(WIN32)
|
||||
+ if(MSVC)
|
||||
find_library(PYTHON_DEBUG_LIBRARY
|
||||
NAMES python${_CURRENT_VERSION_NO_DOTS}_d python
|
||||
HINTS ${_Python_LIBRARY_PATH_HINT}
|
||||
@@ -102,10 +102,6 @@
|
||||
python${_CURRENT_VERSION}
|
||||
HINTS
|
||||
${_Python_LIBRARY_PATH_HINT}
|
||||
- PATHS
|
||||
- ${PYTHON_FRAMEWORK_LIBRARIES}
|
||||
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
|
||||
- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
|
||||
# Avoid finding the .dll in the PATH. We want the .lib.
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
)
|
||||
12
mingw-w64-vtk/008-support-netcdf-4.9.0.patch
Normal file
12
mingw-w64-vtk/008-support-netcdf-4.9.0.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
--- a/ThirdParty/exodusII/vtkexodusII/src/ex_utils.c
|
||||
+++ b/ThirdParty/exodusII/vtkexodusII/src/ex_utils.c
|
||||
@@ -1770,7 +1770,9 @@ void ex__compress_variable(int exoid, int varid, int type)
|
||||
*/
|
||||
|
||||
/* const int NC_SZIP_EC = 4; */ /* Selects entropy coding method for szip. */
|
||||
+#ifndef NC_SZIP_NN
|
||||
const int NC_SZIP_NN = 32; /* Selects nearest neighbor coding method for szip. */
|
||||
+#endif
|
||||
/* Even and between 4 and 32; typical values are 8, 10, 16, 32 */
|
||||
const int SZIP_PIXELS_PER_BLOCK =
|
||||
file->compression_level == 0 ? 32 : file->compression_level;
|
||||
32
mingw-w64-vtk/009-vtk-libharu-2.4.0.patch
Normal file
32
mingw-w64-vtk/009-vtk-libharu-2.4.0.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
diff --git a/IO/ExportPDF/vtkPDFContextDevice2D.cxx b/IO/ExportPDF/vtkPDFContextDevice2D.cxx
|
||||
index 2df979c303..541a73e882 100644
|
||||
--- a/IO/ExportPDF/vtkPDFContextDevice2D.cxx
|
||||
+++ b/IO/ExportPDF/vtkPDFContextDevice2D.cxx
|
||||
@@ -1617,21 +1617,21 @@ void vtkPDFContextDevice2D::ApplyLineWidth(float width)
|
||||
void vtkPDFContextDevice2D::ApplyLineType(int type)
|
||||
{
|
||||
// These match the OpenGL2 implementation:
|
||||
- static const HPDF_UINT16 noPen[] = { 0, 10 };
|
||||
+ static const HPDF_REAL noPen[] = { 0.0f, 10.0f };
|
||||
static const HPDF_UINT noPenLen = 2;
|
||||
|
||||
- static const HPDF_UINT16 dash[] = { 8 };
|
||||
+ static const HPDF_REAL dash[] = { 8.0f };
|
||||
static const HPDF_UINT dashLen = 1;
|
||||
|
||||
- static const HPDF_UINT16 dot[] = { 1, 7 };
|
||||
- static const HPDF_UINT16 denseDot[] = { 1, 3 };
|
||||
+ static const HPDF_REAL dot[] = { 1.0f, 7.0f };
|
||||
+ static const HPDF_REAL denseDot[] = { 1.0f, 3.0f };
|
||||
static const HPDF_UINT dotLen = 2;
|
||||
|
||||
- static const HPDF_UINT16 dashDot[] = { 4, 6, 2, 4 };
|
||||
+ static const HPDF_REAL dashDot[] = { 4.0f, 6.0f, 2.0f, 4.0f };
|
||||
static const HPDF_UINT dashDotLen = 4;
|
||||
|
||||
// This is dash-dot-dash, but eh. It matches the OpenGL2 0x1C47 pattern.
|
||||
- static const HPDF_UINT16 dashDotDot[] = { 3, 3, 1, 3, 3, 3 };
|
||||
+ static const HPDF_REAL dashDotDot[] = { 3.0f, 3.0f, 1.0f, 3.0f, 3.0f, 3.0f };
|
||||
static const HPDF_UINT dashDotDotLen = 6;
|
||||
|
||||
switch (type)
|
||||
@@ -1,175 +0,0 @@
|
||||
From 257b9d7b18d5f3db3fe099dc18f230e23f7dfbab Mon Sep 17 00:00:00 2001
|
||||
From: David Gobbi <david.gobbi@gmail.com>
|
||||
Date: Tue, 20 Aug 2019 17:02:24 -0600
|
||||
Subject: [PATCH] Compatibility for Python 3.8
|
||||
|
||||
The PyTypeObject struct was modified in Python 3.8, this change is
|
||||
required to avoid compile errors.
|
||||
---
|
||||
.../PythonInterpreter/vtkPythonStdStreamCaptureHelper.h | 6 ++++++
|
||||
Wrapping/PythonCore/PyVTKMethodDescriptor.cxx | 2 +-
|
||||
Wrapping/PythonCore/PyVTKNamespace.cxx | 2 +-
|
||||
Wrapping/PythonCore/PyVTKReference.cxx | 8 ++++----
|
||||
Wrapping/PythonCore/PyVTKTemplate.cxx | 2 +-
|
||||
Wrapping/PythonCore/vtkPythonCompatibility.h | 8 +++++++-
|
||||
Wrapping/Tools/vtkWrapPythonClass.c | 2 +-
|
||||
Wrapping/Tools/vtkWrapPythonEnum.c | 2 +-
|
||||
Wrapping/Tools/vtkWrapPythonType.c | 2 +-
|
||||
9 files changed, 23 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h b/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h
|
||||
index b1c12c83de..14ccfbe928 100644
|
||||
--- a/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h
|
||||
+++ b/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h
|
||||
@@ -140,6 +140,12 @@ static PyTypeObject vtkPythonStdStreamCaptureHelperType = {
|
||||
#if PY_VERSION_HEX >= 0x03040000
|
||||
0, // tp_finalize
|
||||
#endif
|
||||
+#if PY_VERSION_HEX >= 0x03080000
|
||||
+ 0, // tp_vectorcall
|
||||
+#if PY_VERSION_HEX < 0x03090000
|
||||
+ 0, // tp_print
|
||||
+#endif
|
||||
+#endif
|
||||
};
|
||||
|
||||
static PyObject* vtkWrite(PyObject* self, PyObject* args)
|
||||
diff --git a/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx b/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx
|
||||
index 2b0d443537..3840038498 100644
|
||||
--- a/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx
|
||||
+++ b/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx
|
||||
@@ -186,7 +186,7 @@ PyTypeObject PyVTKMethodDescriptor_Type = {
|
||||
sizeof(PyMethodDescrObject), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
PyVTKMethodDescriptor_Delete, // tp_dealloc
|
||||
- nullptr, // tp_print
|
||||
+ 0, // tp_vectorcall_offset
|
||||
nullptr, // tp_getattr
|
||||
nullptr, // tp_setattr
|
||||
nullptr, // tp_compare
|
||||
diff --git a/Wrapping/PythonCore/PyVTKNamespace.cxx b/Wrapping/PythonCore/PyVTKNamespace.cxx
|
||||
index 71ee2a3516..5cf5bfbe6b 100644
|
||||
--- a/Wrapping/PythonCore/PyVTKNamespace.cxx
|
||||
+++ b/Wrapping/PythonCore/PyVTKNamespace.cxx
|
||||
@@ -49,7 +49,7 @@ PyTypeObject PyVTKNamespace_Type = {
|
||||
0, // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
PyVTKNamespace_Delete, // tp_dealloc
|
||||
- nullptr, // tp_print
|
||||
+ 0, // tp_vectorcall_offset
|
||||
nullptr, // tp_getattr
|
||||
nullptr, // tp_setattr
|
||||
nullptr, // tp_compare
|
||||
diff --git a/Wrapping/PythonCore/PyVTKReference.cxx b/Wrapping/PythonCore/PyVTKReference.cxx
|
||||
index 943ac71080..b7104091c0 100644
|
||||
--- a/Wrapping/PythonCore/PyVTKReference.cxx
|
||||
+++ b/Wrapping/PythonCore/PyVTKReference.cxx
|
||||
@@ -1010,7 +1010,7 @@ PyTypeObject PyVTKReference_Type = {
|
||||
sizeof(PyVTKReference), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
PyVTKReference_Delete, // tp_dealloc
|
||||
- nullptr, // tp_print
|
||||
+ 0, // tp_vectorcall_offset
|
||||
nullptr, // tp_getattr
|
||||
nullptr, // tp_setattr
|
||||
nullptr, // tp_compare
|
||||
@@ -1067,7 +1067,7 @@ PyTypeObject PyVTKNumberReference_Type = {
|
||||
sizeof(PyVTKReference), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
PyVTKReference_Delete, // tp_dealloc
|
||||
- nullptr, // tp_print
|
||||
+ 0, // tp_vectorcall_offset
|
||||
nullptr, // tp_getattr
|
||||
nullptr, // tp_setattr
|
||||
nullptr, // tp_compare
|
||||
@@ -1124,7 +1124,7 @@ PyTypeObject PyVTKStringReference_Type = {
|
||||
sizeof(PyVTKReference), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
PyVTKReference_Delete, // tp_dealloc
|
||||
- nullptr, // tp_print
|
||||
+ 0, // tp_vectorcall_offset
|
||||
nullptr, // tp_getattr
|
||||
nullptr, // tp_setattr
|
||||
nullptr, // tp_compare
|
||||
@@ -1181,7 +1181,7 @@ PyTypeObject PyVTKTupleReference_Type = {
|
||||
sizeof(PyVTKReference), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
PyVTKReference_Delete, // tp_dealloc
|
||||
- nullptr, // tp_print
|
||||
+ 0, // tp_vectorcall_offset
|
||||
nullptr, // tp_getattr
|
||||
nullptr, // tp_setattr
|
||||
nullptr, // tp_compare
|
||||
diff --git a/Wrapping/PythonCore/PyVTKTemplate.cxx b/Wrapping/PythonCore/PyVTKTemplate.cxx
|
||||
index be200985b3..340fe7953b 100644
|
||||
--- a/Wrapping/PythonCore/PyVTKTemplate.cxx
|
||||
+++ b/Wrapping/PythonCore/PyVTKTemplate.cxx
|
||||
@@ -268,7 +268,7 @@ PyTypeObject PyVTKTemplate_Type = {
|
||||
0, // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
nullptr, // tp_dealloc
|
||||
- nullptr, // tp_print
|
||||
+ 0, // tp_vectorcall_offset
|
||||
nullptr, // tp_getattr
|
||||
nullptr, // tp_setattr
|
||||
nullptr, // tp_compare
|
||||
diff --git a/Wrapping/PythonCore/vtkPythonCompatibility.h b/Wrapping/PythonCore/vtkPythonCompatibility.h
|
||||
index 4a767844a6..be208faeef 100644
|
||||
--- a/Wrapping/PythonCore/vtkPythonCompatibility.h
|
||||
+++ b/Wrapping/PythonCore/vtkPythonCompatibility.h
|
||||
@@ -64,7 +64,13 @@
|
||||
#endif
|
||||
|
||||
// PyTypeObject compatibility
|
||||
-#if PY_VERSION_HEX >= 0x03040000
|
||||
+#if PY_VERSION_HEX >= 0x03090000
|
||||
+#define VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED \
|
||||
+ 0, 0, 0, 0,
|
||||
+#elif PY_VERSION_HEX >= 0x03080000
|
||||
+#define VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED \
|
||||
+ 0, 0, 0, 0, 0,
|
||||
+#elif PY_VERSION_HEX >= 0x03040000
|
||||
#define VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED \
|
||||
0, 0, 0,
|
||||
#else
|
||||
diff --git a/Wrapping/Tools/vtkWrapPythonClass.c b/Wrapping/Tools/vtkWrapPythonClass.c
|
||||
index b1e45f8e80..4d558ea081 100644
|
||||
--- a/Wrapping/Tools/vtkWrapPythonClass.c
|
||||
+++ b/Wrapping/Tools/vtkWrapPythonClass.c
|
||||
@@ -521,7 +521,7 @@ void vtkWrapPython_GenerateObjectType(
|
||||
" sizeof(PyVTKObject), // tp_basicsize\n"
|
||||
" 0, // tp_itemsize\n"
|
||||
" PyVTKObject_Delete, // tp_dealloc\n"
|
||||
- " nullptr, // tp_print\n"
|
||||
+ " 0, // tp_vectorcall_offset\n"
|
||||
" nullptr, // tp_getattr\n"
|
||||
" nullptr, // tp_setattr\n"
|
||||
" nullptr, // tp_compare\n"
|
||||
diff --git a/Wrapping/Tools/vtkWrapPythonEnum.c b/Wrapping/Tools/vtkWrapPythonEnum.c
|
||||
index b933702242..1249362854 100644
|
||||
--- a/Wrapping/Tools/vtkWrapPythonEnum.c
|
||||
+++ b/Wrapping/Tools/vtkWrapPythonEnum.c
|
||||
@@ -145,7 +145,7 @@ void vtkWrapPython_GenerateEnumType(
|
||||
" sizeof(PyIntObject), // tp_basicsize\n"
|
||||
" 0, // tp_itemsize\n"
|
||||
" nullptr, // tp_dealloc\n"
|
||||
- " nullptr, // tp_print\n"
|
||||
+ " 0, // tp_vectorcall_offset\n"
|
||||
" nullptr, // tp_getattr\n"
|
||||
" nullptr, // tp_setattr\n"
|
||||
" nullptr, // tp_compare\n"
|
||||
diff --git a/Wrapping/Tools/vtkWrapPythonType.c b/Wrapping/Tools/vtkWrapPythonType.c
|
||||
index 744cb1b9d3..0a1375e541 100644
|
||||
--- a/Wrapping/Tools/vtkWrapPythonType.c
|
||||
+++ b/Wrapping/Tools/vtkWrapPythonType.c
|
||||
@@ -709,7 +709,7 @@ void vtkWrapPython_GenerateSpecialType(
|
||||
" sizeof(PyVTKSpecialObject), // tp_basicsize\n"
|
||||
" 0, // tp_itemsize\n"
|
||||
" Py%s_Delete, // tp_dealloc\n"
|
||||
- " nullptr, // tp_print\n"
|
||||
+ " 0, // tp_vectorcall_offset\n"
|
||||
" nullptr, // tp_getattr\n"
|
||||
" nullptr, // tp_setattr\n"
|
||||
" nullptr, // tp_compare\n"
|
||||
--
|
||||
2.22.0
|
||||
@@ -1,12 +0,0 @@
|
||||
https://bugs.gentoo.org/758611
|
||||
--- a/IO/CityGML/CMakeLists.txt
|
||||
+++ b/IO/CityGML/CMakeLists.txt
|
||||
@@ -5,7 +5,4 @@ vtk_module_library(vtkIOCityGML ${Module_SRCS})
|
||||
if(VTK_USE_SYSTEM_PUGIXML AND NOT pugixml_INCLUDE_DIRS)
|
||||
find_package(pugixml REQUIRED)
|
||||
- get_target_property(pugixml_INCLUDE_DIRS pugixml INTERFACE_INCLUDE_DIRECTORIES)
|
||||
- get_target_property(pugixml_LIBRARIES pugixml LOCATION)
|
||||
- include_directories(${pugixml_INCLUDE_DIRS})
|
||||
- vtk_module_link_libraries(vtkIOCityGML LINK_PRIVATE ${pugixml_LIBRARIES})
|
||||
+ vtk_module_link_libraries(vtkIOCityGML LINK_PRIVATE pugixml::pugixml)
|
||||
endif()
|
||||
@@ -1,40 +0,0 @@
|
||||
From a9079bdccbb2165583d6773a5ed848427e2a38a8 Mon Sep 17 00:00:00 2001
|
||||
From: Seacas Upstream <kwrobot@kitware.com>
|
||||
Date: Tue, 28 Jan 2020 09:13:38 -0500
|
||||
Subject: [PATCH] exodusII 2020-01-28 (d97eb08d)
|
||||
|
||||
Code extracted from:
|
||||
|
||||
https://gitlab.kitware.com/third-party/seacas.git
|
||||
|
||||
at commit d97eb08d79e87c82facfae39bc75deb60c0a2d83 (for/vtk-20200128-7.24f-v2019-12-18).
|
||||
---
|
||||
ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c | 2 +-
|
||||
ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c b/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c
|
||||
index 8d5d6734f0..ef439618da 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 b2faa22c29..9df4818767 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
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
--- VTK-8.2.0/ThirdParty/freetype/vtk_freetype.h.in.orig 2019-01-30 18:15:13.000000000 +0100
|
||||
+++ VTK-8.2.0/ThirdParty/freetype/vtk_freetype.h.in 2020-10-17 00:03:32.730820908 +0200
|
||||
@@ -20,6 +20,15 @@
|
||||
|
||||
#ifdef VTK_USE_SYSTEM_FREETYPE
|
||||
# include <ft2build.h>
|
||||
+/* FT_CALLBACK_DEF no longer exported since freetype-2.10.3 */
|
||||
+/* has been moved to <freetype/internal/compiler-macros.h> */
|
||||
+# 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 */
|
||||
#else
|
||||
# include <vtkfreetype/include/ft2build.h>
|
||||
#endif
|
||||
@@ -1,37 +0,0 @@
|
||||
From 797f28697d5ba50c1fa2bc5596af626a3c277826 Mon Sep 17 00:00:00 2001
|
||||
From: "Andrew J. P. Maclean" <andrew.amaclean@gmail.com>
|
||||
Date: Wed, 27 May 2020 15:27:15 +1000
|
||||
Subject: [PATCH] Qt 5.15 needs the include file QPainterPath
|
||||
|
||||
---
|
||||
Rendering/Qt/vtkQtLabelRenderStrategy.cxx | 1 +
|
||||
Rendering/Qt/vtkQtStringToImage.cxx | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/Rendering/Qt/vtkQtLabelRenderStrategy.cxx b/Rendering/Qt/vtkQtLabelRenderStrategy.cxx
|
||||
index afda585cca..eca65c64cd 100644
|
||||
--- a/Rendering/Qt/vtkQtLabelRenderStrategy.cxx
|
||||
+++ b/Rendering/Qt/vtkQtLabelRenderStrategy.cxx
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <QImage>
|
||||
#include <QMap>
|
||||
#include <QPainter>
|
||||
+#include <QPainterPath>
|
||||
#include <QPair>
|
||||
#include <QPixmap>
|
||||
#include <QTextDocument>
|
||||
diff --git a/Rendering/Qt/vtkQtStringToImage.cxx b/Rendering/Qt/vtkQtStringToImage.cxx
|
||||
index 659c71570e..fbb9b78f05 100644
|
||||
--- a/Rendering/Qt/vtkQtStringToImage.cxx
|
||||
+++ b/Rendering/Qt/vtkQtStringToImage.cxx
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <QFontMetrics>
|
||||
#include <QImage>
|
||||
#include <QPainter>
|
||||
+#include <QPainterPath>
|
||||
#include <QPixmap>
|
||||
#include <QString>
|
||||
#include <QTextDocument>
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
--- a/Common/Core/vtkInformation.h
|
||||
+++ b/Common/Core/vtkInformation.h
|
||||
@@ -509,8 +509,8 @@
|
||||
friend class vtkInformationIterator;
|
||||
|
||||
private:
|
||||
- VTKCOMMONCORE_EXPORT vtkInformation(const vtkInformation&) = delete;
|
||||
- VTKCOMMONCORE_EXPORT void operator=(const vtkInformation&) = delete;
|
||||
+ vtkInformation(const vtkInformation&) = delete;
|
||||
+ void operator=(const vtkInformation&) = delete;
|
||||
vtkInformationRequestKey *Request;
|
||||
};
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
_realname=vtk
|
||||
pkgbase="mingw-w64-${_realname}"
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=8.2.0
|
||||
pkgrel=16
|
||||
pkgver=9.1.0
|
||||
pkgrel=1
|
||||
pkgdesc="A software system for 3D computer graphics, image processing and visualization (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
|
||||
@@ -14,80 +14,107 @@ license=("BSD")
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
|
||||
"${MINGW_PACKAGE_PREFIX}-double-conversion"
|
||||
"${MINGW_PACKAGE_PREFIX}-expat"
|
||||
"${MINGW_PACKAGE_PREFIX}-ffmpeg"
|
||||
"${MINGW_PACKAGE_PREFIX}-fontconfig"
|
||||
"${MINGW_PACKAGE_PREFIX}-freetype"
|
||||
"${MINGW_PACKAGE_PREFIX}-fmt"
|
||||
"${MINGW_PACKAGE_PREFIX}-glew"
|
||||
"${MINGW_PACKAGE_PREFIX}-gl2ps"
|
||||
"${MINGW_PACKAGE_PREFIX}-hdf5"
|
||||
"${MINGW_PACKAGE_PREFIX}-intel-tbb"
|
||||
"${MINGW_PACKAGE_PREFIX}-jsoncpp"
|
||||
"${MINGW_PACKAGE_PREFIX}-libjpeg"
|
||||
# "${MINGW_PACKAGE_PREFIX}-libharu"
|
||||
"${MINGW_PACKAGE_PREFIX}-libpng"
|
||||
"${MINGW_PACKAGE_PREFIX}-libogg"
|
||||
"${MINGW_PACKAGE_PREFIX}-libtheora"
|
||||
"${MINGW_PACKAGE_PREFIX}-libtiff"
|
||||
"${MINGW_PACKAGE_PREFIX}-libxml2"
|
||||
"${MINGW_PACKAGE_PREFIX}-libharu"
|
||||
"${MINGW_PACKAGE_PREFIX}-libwinpthread-git"
|
||||
"${MINGW_PACKAGE_PREFIX}-lz4"
|
||||
"${MINGW_PACKAGE_PREFIX}-netcdf"
|
||||
# "${MINGW_PACKAGE_PREFIX}-proj"
|
||||
$([[ ${MINGW_PACKAGE_PREFIX} != *-clang-* ]] || echo "${MINGW_PACKAGE_PREFIX}-openmp")
|
||||
"${MINGW_PACKAGE_PREFIX}-pugixml"
|
||||
"${MINGW_PACKAGE_PREFIX}-sqlite3"
|
||||
"${MINGW_PACKAGE_PREFIX}-xz"
|
||||
"${MINGW_PACKAGE_PREFIX}-zlib"
|
||||
)
|
||||
"${MINGW_PACKAGE_PREFIX}-zlib")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
||||
"${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
"${MINGW_PACKAGE_PREFIX}-ninja"
|
||||
"${MINGW_PACKAGE_PREFIX}-adios2"
|
||||
"${MINGW_PACKAGE_PREFIX}-boost"
|
||||
"${MINGW_PACKAGE_PREFIX}-gdal"
|
||||
"${MINGW_PACKAGE_PREFIX}-cgns"
|
||||
"${MINGW_PACKAGE_PREFIX}-cli11"
|
||||
"${MINGW_PACKAGE_PREFIX}-eigen3"
|
||||
"${MINGW_PACKAGE_PREFIX}-ffmpeg"
|
||||
"${MINGW_PACKAGE_PREFIX}-fontconfig"
|
||||
"${MINGW_PACKAGE_PREFIX}-freetype"
|
||||
"${MINGW_PACKAGE_PREFIX}-gdal"
|
||||
"${MINGW_PACKAGE_PREFIX}-gl2ps"
|
||||
"${MINGW_PACKAGE_PREFIX}-hdf5"
|
||||
"${MINGW_PACKAGE_PREFIX}-libjpeg"
|
||||
"${MINGW_PACKAGE_PREFIX}-liblas"
|
||||
"${MINGW_PACKAGE_PREFIX}-libmariadbclient"
|
||||
"${MINGW_PACKAGE_PREFIX}-libpng"
|
||||
"${MINGW_PACKAGE_PREFIX}-libogg"
|
||||
"${MINGW_PACKAGE_PREFIX}-libtheora"
|
||||
"${MINGW_PACKAGE_PREFIX}-libtiff"
|
||||
"${MINGW_PACKAGE_PREFIX}-libxml2"
|
||||
"${MINGW_PACKAGE_PREFIX}-netcdf"
|
||||
"${MINGW_PACKAGE_PREFIX}-openslide"
|
||||
"${MINGW_PACKAGE_PREFIX}-openturns"
|
||||
# "${MINGW_PACKAGE_PREFIX}-openvdb" for an unkown reason IlmBase couldn't be found!
|
||||
"${MINGW_PACKAGE_PREFIX}-openvr"
|
||||
"${MINGW_PACKAGE_PREFIX}-pdal"
|
||||
# "${MINGW_PACKAGE_PREFIX}-pegtl" https://gitlab.kitware.com/vtk/vtk/-/issues/18151
|
||||
"${MINGW_PACKAGE_PREFIX}-postgresql"
|
||||
"${MINGW_PACKAGE_PREFIX}-proj"
|
||||
"${MINGW_PACKAGE_PREFIX}-python"
|
||||
"${MINGW_PACKAGE_PREFIX}-qt5-base"
|
||||
"${MINGW_PACKAGE_PREFIX}-qt5-winextras"
|
||||
"${MINGW_PACKAGE_PREFIX}-qt5-tools"
|
||||
"${MINGW_PACKAGE_PREFIX}-tk"
|
||||
"${MINGW_PACKAGE_PREFIX}-qt5-declarative"
|
||||
"${MINGW_PACKAGE_PREFIX}-sqlite3"
|
||||
# "${MINGW_PACKAGE_PREFIX}-tk"
|
||||
"${MINGW_PACKAGE_PREFIX}-unixodbc"
|
||||
"${MINGW_PACKAGE_PREFIX}-utf8cpp"
|
||||
)
|
||||
optdepends=("${MINGW_PACKAGE_PREFIX}-boost: InfovisBoost and InfovisBoostGraphAlgorithms modules"
|
||||
"${MINGW_PACKAGE_PREFIX}-gdal"
|
||||
"${MINGW_PACKAGE_PREFIX}-libmariadbclient: interface to MariaDB"
|
||||
optdepends=("${MINGW_PACKAGE_PREFIX}-adios2: I/O ADIOS2"
|
||||
"${MINGW_PACKAGE_PREFIX}-boost: InfovisBoost and InfovisBoostGraphAlgorithms modules"
|
||||
"${MINGW_PACKAGE_PREFIX}-cgns: CGNS Reader"
|
||||
"${MINGW_PACKAGE_PREFIX}-ffmpeg: I/O FFMPEG"
|
||||
"${MINGW_PACKAGE_PREFIX}-fontconfig: Freetype/Fontconfig Rendering"
|
||||
"${MINGW_PACKAGE_PREFIX}-freetype: Freetype Rendering"
|
||||
"${MINGW_PACKAGE_PREFIX}-gdal: I/O GDAL"
|
||||
"${MINGW_PACKAGE_PREFIX}-gl2ps: PS Rendering"
|
||||
"${MINGW_PACKAGE_PREFIX}-hdf5: I/O HDF5"
|
||||
"${MINGW_PACKAGE_PREFIX}-libjpeg: I/O Images"
|
||||
"${MINGW_PACKAGE_PREFIX}-liblas"
|
||||
"${MINGW_PACKAGE_PREFIX}-libmariadbclient: interface to MySQL/MariaDB"
|
||||
"${MINGW_PACKAGE_PREFIX}-libpng: I/O Images"
|
||||
"${MINGW_PACKAGE_PREFIX}-libogg: I/O OGG and Theora"
|
||||
"${MINGW_PACKAGE_PREFIX}-libtheora: I/O OGG and Theora"
|
||||
"${MINGW_PACKAGE_PREFIX}-libtiff: I/O Images"
|
||||
"${MINGW_PACKAGE_PREFIX}-libxml2: Infovis"
|
||||
"${MINGW_PACKAGE_PREFIX}-netcdf: I/O netCDF"
|
||||
"${MINGW_PACKAGE_PREFIX}-openslide: DomainsMicroscopy"
|
||||
"${MINGW_PACKAGE_PREFIX}-openturns"
|
||||
# "${MINGW_PACKAGE_PREFIX}-openvdb: I/O OpenVDB"
|
||||
"${MINGW_PACKAGE_PREFIX}-openvr: OpenVR Rendering"
|
||||
"${MINGW_PACKAGE_PREFIX}-pdal: I/O PDAL"
|
||||
"${MINGW_PACKAGE_PREFIX}-postgresql: interface to PostgreSQL"
|
||||
"${MINGW_PACKAGE_PREFIX}-proj: GEOVis"
|
||||
"${MINGW_PACKAGE_PREFIX}-python: Python bindings"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-matplotlib: Matplotlib renderer"
|
||||
"${MINGW_PACKAGE_PREFIX}-tk: TCL bindings, Python Tk widgets"
|
||||
"${MINGW_PACKAGE_PREFIX}-qt-base"
|
||||
"${MINGW_PACKAGE_PREFIX}-qt-winextras")
|
||||
"${MINGW_PACKAGE_PREFIX}-qt5-base: Qt Rendering"
|
||||
"${MINGW_PACKAGE_PREFIX}-qt5-declarative: Qt Qml plugin"
|
||||
"${MINGW_PACKAGE_PREFIX}-sqlite3: Interface to SQL"
|
||||
# "${MINGW_PACKAGE_PREFIX}-tk: TCL bindings, Python Tk widgets"
|
||||
"${MINGW_PACKAGE_PREFIX}-unixodbc")
|
||||
source=(https://www.vtk.org/files/release/${pkgver%.*}/VTK-${pkgver}.tar.gz
|
||||
"001-vtk-mingw-w64.patch"
|
||||
"004-fix-linking-rendering-tk.patch"
|
||||
"005-remove-bogus-stdint-check.patch"
|
||||
"006-win7-defines-guard.patch"
|
||||
"007-fix-linking-movie.patch"
|
||||
"008-fix-python-modules-path.patch"
|
||||
"020-python38-compat.patch"
|
||||
"030-pugixml.patch"
|
||||
"031-fno-common.patch"
|
||||
"032-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch"
|
||||
"033-qt-5.15.patch"
|
||||
"034-no-dllexport-with-delete.patch"
|
||||
"https://gitlab.kitware.com/vtk/vtk/-/merge_requests/6178.patch")
|
||||
sha256sums=('34c3dc775261be5e45a8049155f7228b6bd668106c72a3c435d95730d17d57bb'
|
||||
'db3163012fc7d90f6ffd8300a7a306a609e7c69a88a1dcfb9cb5b5df4391e3ad'
|
||||
'7f428a9c15b2dfc23fff2a19a11c48a628c9b52f82ec0d1dca37d0a5cffc9aef'
|
||||
'769e28e106e612671433eb2f84ab6c0c9ef676109d690f6fe330641631c1fd2b'
|
||||
'087d570104d2ae7f00437897e88225a1eb904b125e3a27bb9392ddf8ef068f6c'
|
||||
'ec39407b6174c9b1326389b4badf1c0c377d74a6dd2c53caf983613fafe43c81'
|
||||
'b6d6f4de0e58251843dec3dfad0ae5d5308c66ab8e55a56eeb3855cd699b02f3'
|
||||
'1d9a3227feb50d08cb507d2a750b480f15eb1819f15c5b88474ba944c51f256a'
|
||||
'cbcc8a0c81450e015c2ce4035f2f128956d20a22be581199446c4a72c0396190'
|
||||
'a4597f0410bea856b06d023d9db7d2661b505eec110f4beccc155f6aa2c593f7'
|
||||
'aa43d6b702e3e1bca2cb8560c1c7e6ce5681cef8a89e9b6442f8037bc295c21c'
|
||||
'de1d2088c54bc7fdd494cb8a90464d2f53dc7cabddcd0415d9fb8cc4de448d0e'
|
||||
'902ec3d23551de899a0682af88acc61257242fb5f474470884c3468d86a0d9f8'
|
||||
'49574bb914e2564b21ab0fb23cadcccd7dd323ae7f0f26f64fd6346c3db14cd7')
|
||||
"001-no-strptime-with-clang.patch"
|
||||
"002-fix-python-modules-path.patch"
|
||||
"003-fix-find-odbc-mingw.patch"
|
||||
"004-Build-GUISupportMFC-only-with-MSVC.patch"
|
||||
"005-fix-build-vtkm-mingw.patch"
|
||||
"006-link-to-pdalcpp.patch"
|
||||
"007-dll-export-some-functions.patch"
|
||||
"008-support-netcdf-4.9.0.patch"
|
||||
"009-vtk-libharu-2.4.0.patch")
|
||||
sha256sums=('8fed42f4f8f1eb8083107b68eaa9ad71da07110161a3116ad807f43e5ca5ce96'
|
||||
'df2eef7c8533ebcf9926a8bab309531253387849a1fc2e797fb01c0638aee094'
|
||||
'a2396e3aecc3c8ade391496f7a7ce4efc7f6eb53911ddd1b473f2230e1b22161'
|
||||
'7d22fcfb108b7edb0ceb050378461e9987a330636a1317dfca68638962815948'
|
||||
'5b39f9aa28f169d1f35b42cf5ae8433eb4ea6f8bee4894b7dcd63d2ba622b3e5'
|
||||
'353d046a96fe6cb3019857132676671b60e18d02e4bba43e79a21673e4d5735f'
|
||||
'af98e72a0d64af3fa755929e724e900faa9ab466917fc24084026512f02399e4'
|
||||
'bac0c76884095fd3e15553e0b6f55c373acef65a0f43baf2b503e13693ba8f48'
|
||||
'ce1f8d4b3173debd1ebb72e47fb83444913a6e2cb5e558f6f755b1a22e483fcc'
|
||||
'675707ec492182d1f0c8f4682775613dd9b5d315596af8df99ad4d758196e9c3')
|
||||
|
||||
# Helper macros to help make tasks easier #
|
||||
apply_patch_with_msg() {
|
||||
@@ -101,83 +128,76 @@ apply_patch_with_msg() {
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
# https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9015
|
||||
apply_patch_with_msg \
|
||||
001-vtk-mingw-w64.patch \
|
||||
004-fix-linking-rendering-tk.patch
|
||||
# it will find stdint from msys2-runtime-devel, but that's useless
|
||||
001-no-strptime-with-clang.patch
|
||||
# https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9016
|
||||
apply_patch_with_msg \
|
||||
005-remove-bogus-stdint-check.patch
|
||||
002-fix-python-modules-path.patch
|
||||
# https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9019
|
||||
apply_patch_with_msg \
|
||||
006-win7-defines-guard.patch \
|
||||
007-fix-linking-movie.patch \
|
||||
008-fix-python-modules-path.patch \
|
||||
020-python38-compat.patch \
|
||||
030-pugixml.patch \
|
||||
031-fno-common.patch \
|
||||
032-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch \
|
||||
033-qt-5.15.patch \
|
||||
034-no-dllexport-with-delete.patch \
|
||||
6178.patch
|
||||
003-fix-find-odbc-mingw.patch
|
||||
# https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9024
|
||||
apply_patch_with_msg \
|
||||
004-Build-GUISupportMFC-only-with-MSVC.patch
|
||||
apply_patch_with_msg \
|
||||
005-fix-build-vtkm-mingw.patch \
|
||||
006-link-to-pdalcpp.patch
|
||||
# https://gitlab.kitware.com/vtk/vtk/-/commit/2dc96875f958182b31a8be0d489bbcfa6591fb75
|
||||
apply_patch_with_msg \
|
||||
008-support-netcdf-4.9.0.patch
|
||||
# Copied from https://github.com/archlinux/svntogit-community/blob/packages/vtk/trunk/vtk-libharu-2.4.0.patch
|
||||
apply_patch_with_msg \
|
||||
009-vtk-libharu-2.4.0.patch
|
||||
# Succeed with Clang but failed with GCC!
|
||||
if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]]; then
|
||||
apply_patch_with_msg \
|
||||
007-dll-export-some-functions.patch
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
[[ -d ${srcdir}/build-${MSYSTEM} ]] && rm -rf ${srcdir}/build-${MSYSTEM}
|
||||
mkdir -p ${srcdir}/build-${MSYSTEM} && cd ${srcdir}/build-${MSYSTEM}
|
||||
|
||||
CFLAGS+=" ${CPPFLAGS}"
|
||||
CXXFLAGS+=" ${CPPFLAGS} -std=gnu++11 -Wno-ignored-attributes -Wno-deprecated-declarations"
|
||||
[[ "$CARCH" = 'i686' ]] && {
|
||||
_cmakeopts=('-DVTK_USE_64BIT_IDS=OFF')
|
||||
}
|
||||
[[ "$CARCH" = 'x86_64' ]] && {
|
||||
_cmakeopts=('-DVTK_USE_64BIT_IDS=ON')
|
||||
}
|
||||
declare -a extra_config
|
||||
if check_option "debug" "n"; then
|
||||
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
|
||||
else
|
||||
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
|
||||
fi
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=;-DVTK_INSTALL_QT_PLUGIN_DIR=;-DVTK_INSTALL_TCL_DIR=" \
|
||||
CFLAGS+=" ${CPPFLAGS}"
|
||||
CXXFLAGS+=" ${CPPFLAGS} -Wno-attributes -Wno-ignored-attributes -Wno-deprecated-declarations"
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
|
||||
${MINGW_PREFIX}/bin/cmake \
|
||||
-Wno-dev \
|
||||
-G"Ninja" \
|
||||
${extra_config[@]} \
|
||||
-DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_RC_FLAGS=--use-temp-file \
|
||||
-DCMAKE_INSTALL_LICENSEDIR=share/licenses/vtk \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DPYTHON_EXECUTABLE="${MINGW_PREFIX}/bin/python.exe" \
|
||||
-DBUILD_DOCUMENTATION=OFF \
|
||||
-DBUILD_EXAMPLES=OFF \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DVTK_Group_Imaging=ON \
|
||||
-DVTK_Group_MPI=OFF \
|
||||
-DVTK_Group_Qt=ON \
|
||||
-DVTK_Group_Rendering=ON \
|
||||
-DVTK_Group_StandAlone=ON \
|
||||
-DVTK_Group_Tk=ON \
|
||||
-DVTK_Group_Views=ON \
|
||||
-DVTK_Group_Web=OFF \
|
||||
-DVTK_USE_SYSTEM_LIBRARIES=ON \
|
||||
-DVTK_USE_SYSTEM_LIBPROJ=OFF \
|
||||
-DVTK_USE_SYSTEM_LIBHARU=OFF \
|
||||
-DModule_vtkIOFFMPEG=ON \
|
||||
-DModule_vtkIOMySQL=ON \
|
||||
-DModule_vtkInfovisBoost=ON \
|
||||
-DModule_vtkInfovisBoostGraphAlgorithms=ON \
|
||||
-DModule_vtkIOGDAL=ON \
|
||||
-DModule_vtkIOODBC=OFF \
|
||||
-DModule_vtkIOPostgreSQL=ON \
|
||||
-DModule_vtkPythonInterpreter=ON \
|
||||
-DModule_vtkFiltersReebGraph=ON \
|
||||
-DModule_vtkRenderingFreeTypeFontConfig=ON \
|
||||
-DModule_vtkRenderingMatplotlib=ON \
|
||||
-DVTK_INSTALL_QT_PLUGIN_DIR="${MINGW_PREFIX}/share/qt5/plugins/designer" \
|
||||
-DVTK_INSTALL_TCL_DIR="${MINGW_PREFIX}/lib/vtk-${pkgver%.*}" \
|
||||
-DVTK_LEGACY_REMOVE=OFF \
|
||||
-DPython3_EXECUTABLE="${MINGW_PREFIX}/bin/python.exe" \
|
||||
-DVTK_BUILD_TESTING=OFF \
|
||||
-DVTK_VERSIONED_INSTALL=OFF \
|
||||
-DVTK_BUILD_ALL_MODULES=ON \
|
||||
-DVTK_GROUP_ENABLE_MPI=NO \
|
||||
-DVTK_GROUP_ENABLE_Web=NO \
|
||||
-DVTK_MODULE_ENABLE_VTK_vtkm=NO \
|
||||
-DVTK_MODULE_ENABLE_VTK_IOOpenVDB=NO \
|
||||
-DVTK_USE_EXTERNAL=ON \
|
||||
-DVTK_MODULE_USE_EXTERNAL_VTK_exprtk=OFF \
|
||||
-DVTK_MODULE_USE_EXTERNAL_VTK_ioss=OFF \
|
||||
-DVTK_MODULE_USE_EXTERNAL_VTK_pegtl=OFF \
|
||||
-DVTK_WRAP_JAVA=OFF \
|
||||
-DVTK_WRAP_PYTHON=ON \
|
||||
-DVTK_QT_VERSION=5 \
|
||||
-DVTK_SMP_IMPLEMENTATION_TYPE=TBB \
|
||||
-DVTK_SMP_ENABLE_SEQUENTIAL=ON \
|
||||
-DVTK_SMP_ENABLE_STDTHREAD=ON \
|
||||
-DVTK_SMP_ENABLE_OPENMP=ON \
|
||||
-DVTK_USE_VIDEO_FOR_WINDOWS=ON \
|
||||
-DMYSQL_INCLUDE_DIRECTORIES="${MINGW_PREFIX}/include/mariadb" \
|
||||
-DMYSQL_LIBRARY="${MINGW_PREFIX}/lib/libmariadb.dll.a" \
|
||||
${_cmakeopts[@]} \
|
||||
-DVTK_ENABLE_OSPRAY=OFF \
|
||||
../${_realname}-${pkgver}
|
||||
|
||||
${MINGW_PREFIX}/bin/cmake --build .
|
||||
@@ -186,16 +206,4 @@ build() {
|
||||
package() {
|
||||
cd "${srcdir}/build-${MSYSTEM}"
|
||||
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install .
|
||||
|
||||
local PREFIX_DEPS=$(cygpath -am ${MINGW_PREFIX})
|
||||
|
||||
pushd "${pkgdir}${MINGW_PREFIX}/lib/cmake/${_realname}-${pkgver%.*}" > /dev/null
|
||||
sed -s 's|Qt5::|Qt5|g' -i ./VTKTargets*.cmake
|
||||
sed -s "s|${PREFIX_DEPS}|\${_IMPORT_PREFIX}|g" -i ./VTKTargets.cmake
|
||||
find . -name '*.cmake' -exec \
|
||||
sed -s "s|${PREFIX_DEPS}|\${VTK_INSTALL_PREFIX}|g" -i {} \;
|
||||
popd > /dev/null
|
||||
|
||||
install -Dm644 "${srcdir}/${_realname}-${pkgver}/Copyright.txt" \
|
||||
"${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/Copyright.txt"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user