FreeBSD patches
There are several patches in the FreeBSD port that need to be applied upstream:
--- IO/EnSight/vtkEnSight6BinaryReader.cxx.orig 2017-11-21 07:34:56 UTC
+++ IO/EnSight/vtkEnSight6BinaryReader.cxx
@@ -36,8 +36,8 @@
#if defined(_WIN32)
# define VTK_STAT_STRUCT struct _stat64
# define VTK_STAT_FUNC _stat64
-#elif defined _DARWIN_FEATURE_64_BIT_INODE && !defined __FreeBSD__
-// FreeBSD and OSX now deprecate stat64
+#elif defined _DARWIN_FEATURE_64_BIT_INODE || defined __FreeBSD__
+// FreeBSD and OSX use stat
# define VTK_STAT_STRUCT struct stat
# define VTK_STAT_FUNC stat
#else
--- IO/EnSight/vtkEnSightGoldBinaryReader.cxx.orig 2017-11-21 07:32:21 UTC
+++ IO/EnSight/vtkEnSightGoldBinaryReader.cxx
@@ -37,8 +37,8 @@
#if defined(_WIN32)
# define VTK_STAT_STRUCT struct _stat64
# define VTK_STAT_FUNC _stat64
-#elif defined _DARWIN_FEATURE_64_BIT_INODE && !defined __FreeBSD__
-// FreeBSD and OSX now deprecate stat64
+#elif defined _DARWIN_FEATURE_64_BIT_INODE || defined __FreeBSD__
+// FreeBSD and OSX use stat
# define VTK_STAT_STRUCT struct stat
# define VTK_STAT_FUNC stat
#else
--- ThirdParty/libproj4/vtklibproj4/CMakeLists.txt.orig 2017-08-30 20:55:05 UTC
+++ ThirdParty/libproj4/vtklibproj4/CMakeLists.txt
@@ -50,10 +50,10 @@ find_package (Threads)
include(CheckIncludeFiles)
include(CheckSymbolExists)
-CHECK_SYMBOL_EXISTS(PTHREAD_MUTEX_RECURSIVE pthread.h HAVE_PTHREAD_MUTEX_RECURSIVE_DEFN)
-if (HAVE_PTHREAD_MUTEX_RECURSIVE_DEFN)
+#CHECK_SYMBOL_EXISTS(PTHREAD_MUTEX_RECURSIVE pthread.h HAVE_PTHREAD_MUTEX_RECURSIVE_DEFN) # test fails, reported upstream: https://gitlab.kitware.com/vtk/vtk/issues/17178
+#if (HAVE_PTHREAD_MUTEX_RECURSIVE_DEFN)
add_definitions(-DHAVE_PTHREAD_MUTEX_RECURSIVE=1)
-endif()
+#endif()
# Set a default build type for single-configuration cmake generators if
# no build type is set.
--- GUISupport/Qt/PluginInstall.cmake.in.orig 2017-11-21 08:23:50 UTC
+++ GUISupport/Qt/PluginInstall.cmake.in
@@ -10,7 +10,7 @@ if (WIN32)
set(BUILDTYPE_SUFFIX @CMAKE_RELEASE_POSTFIX@)
endif ()
endif ()
-set(VTK_INSTALL_QT_PLUGIN_FILE "@CMAKE_SHARED_LIBRARY_PREFIX@QVTKWidgetPlugin${BUILDTYPE_SUFFIX}@CMAKE_SHARED_LIBRARY_SUFFIX@")
+set(VTK_INSTALL_QT_PLUGIN_FILE "@CMAKE_SHARED_LIBRARY_PREFIX@QVTKWidgetPlugin-@VTK_MAJOR_VERSION@.@VTK_MINOR_VERSION@${BUILDTYPE_SUFFIX}@CMAKE_SHARED_LIBRARY_SUFFIX@")
set(VTK_CONFIGURATIONS "@CMAKE_CONFIGURATION_TYPES@")
if(VTK_CONFIGURATIONS)
--- GUISupport/Qt/CMakeLists.txt.orig 2018-05-11 14:34:24 UTC
+++ GUISupport/Qt/CMakeLists.txt
@@ -145,7 +145,7 @@ if(VTK_BUILD_QT_DESIGNER_PLUGIN AND add_
find_package(Qt5 COMPONENTS ${qt_component} REQUIRED QUIET)
add_definitions(${Qt5${qt_component}_DEFINITIONS})
include_directories(${Qt5${qt_component}_INCLUDE_DIRS})
- qt5_wrap_cpp(PluginMocSrcs ${PluginMocHeaders} TARGET QVTKWidgetPlugin)
+ qt5_wrap_cpp(PluginMocSrcs ${PluginMocHeaders} TARGET QVTKWidgetPlugin-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION})
set(QT_LIBRARIES Qt5::${qt_component})
else()
find_package(Qt4 COMPONENTS QtCore QtGui QtDesignerComponents REQUIRED QUIET)
@@ -157,16 +157,16 @@ if(VTK_BUILD_QT_DESIGNER_PLUGIN AND add_
# add QVTK plugin from sources
# stand-alone as it doesn't depend on QVTK library
- add_library(QVTKWidgetPlugin
+ add_library(QVTKWidgetPlugin-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}
SHARED
${PluginLibSrcs}
${PluginMocSrcs}
)
- set_target_properties(QVTKWidgetPlugin PROPERTIES COMPILE_DEFINITIONS QT_NO_DEBUG)
+ set_target_properties(QVTKWidgetPlugin-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION} PROPERTIES COMPILE_DEFINITIONS QT_NO_DEBUG)
# link with Qt libs
- vtk_module_link_libraries(QVTKWidgetPlugin ${QT_LIBRARIES})
+ vtk_module_link_libraries(QVTKWidgetPlugin-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION} ${QT_LIBRARIES})
# install rules