diff options
author | Michele Mocciola | 2016-11-22 22:22:20 +0100 |
---|---|---|
committer | Michele Mocciola | 2016-11-22 22:22:20 +0100 |
commit | f3884d22f577a015a94dd251a2e367448dbff821 (patch) | |
tree | 178ea6e4e74952d8766dbd745a3441f49ca59fde | |
parent | c716c9edd6e8c191eea241132fff9afb90fb00a9 (diff) | |
download | aur-f3884d22f577a015a94dd251a2e367448dbff821.tar.gz |
Updated to version 5.0.1p1
-rw-r--r-- | .SRCINFO | 30 | ||||
-rw-r--r-- | PKGBUILD | 185 | ||||
-rw-r--r-- | ParaView-4.2.0.patch | 1373 | ||||
-rw-r--r-- | ffmpeg3.patch (renamed from ffmpeg-3.patch) | 16 | ||||
-rw-r--r-- | gcc49.patch | 122 | ||||
-rw-r--r-- | gcc6.patch | 19 | ||||
-rw-r--r-- | surface_lic.png | bin | 121059 -> 0 bytes | |||
-rw-r--r-- | uint.patch | 22 |
8 files changed, 95 insertions, 1672 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Fri May 13 20:48:40 UTC 2016 +# Tue Nov 22 21:21:25 UTC 2016 pkgbase = paraview-salome pkgdesc = Parallel Visualization Application using VTK - This version is built to be linked against salome modules - pkgver = 4.2.0 - pkgrel = 3 + pkgver = 5.0.1p1 + pkgrel = 1 url = http://www.paraview.org arch = i686 arch = x86_64 @@ -18,7 +18,7 @@ pkgbase = paraview-salome depends = boost depends = expat depends = freetype2 - depends = hdf5-1.8 + depends = hdf5 depends = libjpeg depends = libxml2 depends = libtheora @@ -26,28 +26,20 @@ pkgbase = paraview-salome depends = libtiff depends = zlib depends = protobuf + depends = openmpi + depends = gl2ps optdepends = python2-matplotlib: Needed to support equation rendering using MathText markup language optdepends = python2-numpy: Needed for using some filters such as "Python Calculator" - provides = paraview=4.2.0 + provides = paraview=5.0.1 options = staticlibs - source = http://paraview.org/files/v4.2/ParaView-v4.2.0-source.tar.gz + source = http://files.salome-platform.org/Salome/Salome7.8.0/SALOME-7.8.0-OPENSOURCE-DB08.tgz source = paraview-salome.png source = paraview-salome.desktop - source = uint.patch - source = gcc49.patch - source = gcc6.patch - source = ffmpeg-3.patch - source = ParaView-4.2.0.patch - source = surface_lic.png - md5sums = 77cf0e3804eb7bb91d2d94b10bd470f4 + source = ffmpeg3.patch + md5sums = 53c07c80009555d1ffc5e0bf13cfbf20 md5sums = db623002bc71a257ddfdd0c9c7b14c3f md5sums = e3ba22be644f91da7018f429c3b7dd39 - md5sums = e034fc590bd332175dcd6bf126f14d97 - md5sums = 12fa547d0c79ea6a780279712574a5fe - md5sums = 951e035583c784986a3cd5e7e35519e2 - md5sums = 58055ab1dd936cc233120b10f4e7eaa7 - md5sums = 3e4c48633eb337c42653f51e6112f347 - md5sums = 2f3f049a703224ca230eadffd5016455 + md5sums = ec32574de308796bc8086a896eb8c2f9 pkgname = paraview-salome @@ -5,19 +5,22 @@ # Contributor: Simon Zilliken <simon____AT____zilliken____DOT____name> pkgname=paraview-salome -pkgver=4.2.0 -pkgrel=3 +pkgver=5.0.1p1 +_salomever=7.8.0 +pkgrel=1 pkgdesc='Parallel Visualization Application using VTK - This version is built to be linked against salome modules' arch=('i686' 'x86_64') url='http://www.paraview.org' license=('custom') -depends=('qtwebkit' 'python2' 'ffmpeg' 'boost' 'expat' 'freetype2' 'hdf5-1.8' 'libjpeg' 'libxml2' 'libtheora' 'libpng' 'libtiff' 'zlib' 'protobuf') +depends=('qtwebkit' 'python2' 'ffmpeg' 'boost' 'expat' 'freetype2' 'hdf5' 'libjpeg' 'libxml2' 'libtheora' 'libpng' 'libtiff' 'zlib' 'protobuf' 'openmpi' 'gl2ps') makedepends=('cmake' 'mesa' 'eigen3' 'doxygen') optdepends=('python2-matplotlib: Needed to support equation rendering using MathText markup language' 'python2-numpy: Needed for using some filters such as "Python Calculator"') -source=("http://paraview.org/files/v${pkgver:0:3}/ParaView-v${pkgver}-source.tar.gz" "${pkgname}.png" "${pkgname}.desktop" "uint.patch" "gcc49.patch" "gcc6.patch" "ffmpeg-3.patch" "ParaView-4.2.0.patch" "surface_lic.png" ) +source=("http://files.salome-platform.org/Salome/Salome${_salomever}/SALOME-${_salomever}-OPENSOURCE-DB08.tgz" + "${pkgname}.png" "${pkgname}.desktop" + "ffmpeg3.patch" ) options=(staticlibs) -provides=("paraview=${pkgver}") +provides=("paraview=${pkgver:0:5}") # _installdir=/opt/${pkgname} _installdir=/usr @@ -27,36 +30,18 @@ prepare(){ if [ -d build ]; then rm -rf build - fi - - cd "${srcdir}/ParaView-v${pkgver}-source" - - # patch to solve gcc49 compatiblity - patch -Np1 -i "${srcdir}/gcc49.patch" - - # patch for gcc6 compatibility - sed -i -e "s|345|3456|" {VTK/CMake/GenerateExportHeader.cmake,VTK/CMake/vtkCompilerExtras.cmake} - patch -Np1 -i "${srcdir}/gcc6.patch" - - # patch to solve uint conversion to int - patch -Np1 -i "${srcdir}/uint.patch" - - # patch to copile with ffmpeg-3 - patch -Np1 -i "${srcdir}/ffmpeg-3.patch" - - # patch from salome-platform - patch -Np1 -i "${srcdir}/ParaView-4.2.0.patch" + fi - sed -i "s%RTLD_LAZY%RTLD_LAZY|RTLD_NODELETE%g" VTK/Utilities/KWSys/vtksys/DynamicLoader.cxx + bsdtar -xf "${srcdir}/SALOME-${_salomever}-OPENSOURCE-DB08/PREREQUISITES/SOURCES/ParaView-5.0.1p1.tar.gz" - cp -f ${srcdir}/surface_lic.png Plugins/SurfaceLIC/doc + cd "${srcdir}/ParaView-${pkgver}" + patch -Np1 -i ../ffmpeg3.patch } build() { - rm -rf "${srcdir}/build" - mkdir "${srcdir}/build" + mkdir -p "${srcdir}/build" cd "${srcdir}/build" - + local cmake_options="" if test "$CARCH" == x86_64; then @@ -65,137 +50,129 @@ build() { fi # cmake general settings + cmake_options+=" -DCMAKE_INSTALL_PREFIX:STRING=${_installdir}" cmake_options+=" -DCMAKE_BUILD_TYPE:STRING=Release" - # cmake_options+=" -DCMAKE_CXX_STANDARD=98" - cmake_options+=" -DCMAKE_INSTALL_PREFIX=${_installdir}" - cmake_options+=" -DBUILD_SHARED_LIBS=ON" - cmake_options+=" -DBUILD_TESTING=OFF" - cmake_options+=" -DBUILD_EXAMPLES=OFF" - cmake_options+=" -DBUILD_DOCUMENTATION=ON" - cmake_options+=" -DDOCUMENTATION_HTML_HELP=ON" - cmake_options+=" -DCMAKE_VERBOSE_MAKEFILE=OFF" + cmake_options+=" -DBUILD_SHARED_LIBS:BOOL=ON" + cmake_options+=" -DBUILD_TESTING:BOOL=OFF" + cmake_options+=" -DBUILD_EXAMPLES:BOOL=OFF" + cmake_options+=" -DBUILD_DOCUMENTATION:BOOL=OFF" + cmake_options+=" -DDOCUMENTATION_HTML_HELP:BOOL=ON" + + # verbose mode + cmake_options+=" -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF" + + # mpi + cmake_options+=" -DPARAVIEW_USE_MPI:BOOL=ON" + cmake_options+=" -DCMAKE_C_COMPILER:STRING=/usr/bin/mpicc" + cmake_options+=" -DCMAKE_CXX_COMPILER:STRING=/usr/bin/mpic++" # Paraview general settings cmake_options+=" -DPARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=ON" + cmake_options+=" -DPARAVIEW_USE_VISITBRIDGE:BOOL=ON" # VTK general settings cmake_options+=" -DVTK_USE_64BIT_IDS:BOOL=OFF" - + cmake_options+=" -DVTK_NO_PYTHON_THREADS:BOOL=OFF" + cmake_options+=" -DVTK_REPORT_OPENGL_ERRORS:BOOL=OFF" + cmake_options+=" -DVTK_PYTHON_FULL_THREADSAFE=ON" + # Qt settings cmake_options+=" -DPARAVIEW_BUILD_QT_GUI:BOOL=ON" + cmake_options+=" -DPARAVIEW_QT_VERSION=4" + cmake_options+=" -DVTK_QT_VERSION=4" cmake_options+=" -DQT_HELP_GENERATOR:STRING=/usr/bin/qhelpgenerator-qt4" cmake_options+=" -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4" # Python settings cmake_options+=" -DPARAVIEW_ENABLE_PYTHON:BOOL=ON" - cmake_options+=" -DVTK_WRAP_PYTHON:BOOL=ON" cmake_options+=" -DPYTHON_EXECUTABLE:STRING=/usr/bin/python2" cmake_options+=" -DPYTHON_INCLUDE_DIR:STRING=/usr/include/python2.7" cmake_options+=" -DPYTHON_LIBRARY:STRING=/usr/lib/python2.7/config/libpython2.7.so" - cmake_options+=" -DVTK_NO_PYTHON_THREADS:BOOL=OFF" # Tcl/Tk settings # TEMPORARILY DISABLE TCL WRAPPINGS DUE TO BUG IN PARAVIEW WRAPPER UTILITY! - if false ; then - local tcl_version = "8.6" - cmake_options+=" -DVTK_WRAP_TCL:BOOL=ON" - cmake_options+=" -DTCL_INCLUDE_PATH:STRING=/usr/include" - cmake_options+=" -DTCL_LIBRARY:STRING=/usr/lib/libtcl${tcl_version}.so" - cmake_options+=" -DTCL_TCLSH:STRING=/usr/bin/tclsh${tcl_version}" - cmake_options+=" -DTK_INCLUDE_PATH:STRING=/usr/include" - cmake_options+=" -DTK_LIBRARY:STRING=/usr/lib/libtk${tcl_version}.so" - cmake_options+=" -DTK_WISH:STRING=/usr/bin/wish${tcl_version}" - else - cmake_options+=" -DVTK_WRAP_TCL:BOOL=OFF" - fi - - # force usage of hdf5-1.8 - local hdf5dir="/opt/hdf5-1.8" - cmake_options+=" -DHDF5_C_COMPILER_EXECUTABLE=${hdf5dir}/bin/h5cc" - cmake_options+=" -DHDF5_C_INCLUDE_DIR=${hdf5dir}/include" - cmake_options+=" -DHDF5_DIFF_EXECUTABLE=${hdf5dir}/bin/h5diff" - cmake_options+=" -DHDF5_HL_INCLUDE_DIR=${hdf5dir}/include" - cmake_options+=" -DHDF5_hdf5_LIBRARY_RELEASE=${hdf5dir}/lib/libhdf5.so" - cmake_options+=" -DHDF5_hdf5_hl_LIBRARY_RELEASE=${hdf5dir}/lib/libhdf5_hl.so" + # local tcl_version="8.6" + # cmake_options+=" -DVTK_WRAP_TCL:BOOL=ON" + # cmake_options+=" -DTCL_INCLUDE_PATH:STRING=/usr/include" + # cmake_options+=" -DTCL_LIBRARY:STRING=/usr/lib/libtcl${tcl_version}.so" + # cmake_options+=" -DTCL_TCLSH:STRING=/usr/bin/tclsh${tcl_version}" + # cmake_options+=" -DTK_INCLUDE_PATH:STRING=/usr/include" + # cmake_options+=" -DTK_LIBRARY:STRING=/usr/lib/libtk${tcl_version}.so" + # cmake_options+=" -DTK_WISH:STRING=/usr/bin/wish${tcl_version}" + cmake_options+=" -DVTK_WRAP_TCL:BOOL=OFF" # Java settings cmake_options+=" -DVTK_WRAP_JAVA:BOOL=OFF" # eigen settings - cmake_options+=" -DEigen_DIR=/usr/include/eigen3" - - # MPI settings - cmake_options+=" -DPARAVIEW_USE_MPI:BOOL=OFF" + cmake_options+=" -DEigen_DIR:PATH=/usr/include/eigen3" # HDF5 settings cmake_options+=" -DVTK_USE_SYSTEM_HDF5:BOOL=ON" - cmake_options+=" -DPARAVIEW_BUILD_PLUGIN_H5PartReader:BOOL=OFF" - - # VisIt Database bridge settings - cmake_options+=" -DPARAVIEW_USE_VISITBRIDGE=ON" + cmake_options+=" -DHDF5_DIR:PATH=/usr/lib/hdf5_18/" + cmake_options+=" -DHDF5_INCLUDE_DIRS:PATH=/usr/include/hdf5_18/" + cmake_options+=" -DHDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc_18" + cmake_options+=" -DHDF5_C_LIBRARY_hdf5:FILEPATH=/usr/lib/hdf5_18/libhdf5.so" + cmake_options+=" -DHDF5_CXX_LIBRARY_hdf5:FILEPATH=/usr/lib/hdf5_18/libhdf5.so" + cmake_options+=" -DHDF5_C_LIBRARY_hdf5_hl:FILEPATH=/usr/lib/hdf5_18/libhdf5_hl.so" + cmake_options+=" -DHDF5_DIFF_EXECUTABLE:FILEPATH=/usr/bin/h5diff_18" # Boost settings cmake_options+=" -DBOOST_ROOT=/usr" # gl2ps settings - cmake_options+=" -DVTK_USE_SYSTEM_GL2PS:BOOL=OFF" + cmake_options+=" -DVTK_USE_SYSTEM_GL2PS:BOOL=ON" # libxml2 settings cmake_options+=" -DVTK_USE_SYSTEM_LIBXML2:BOOL=ON" cmake_options+=" -DLIBXML2_INCLUDE_DIR:STRING=/usr/include/libxml2" cmake_options+=" -DLIBXML2_LIBRARIES:STRING=/usr/lib/libxml2.so" - - # freetype settings - cmake_options+=" -DVTK_USE_SYSTEM_FREETYPE:BOOL=ON" + cmake_options+=" -DLIBXML2_XMLLINT_EXECUTABLE:FILEPATH=/usr/bin/xmllint" # expat settings cmake_options+=" -DVTK_USE_SYSTEM_EXPAT:BOOL=ON" - # jpeg settings cmake_options+=" -DVTK_USE_SYSTEM_JPEG:BOOL=ON" - # tiff settings cmake_options+=" -DVTK_USE_SYSTEM_TIFF:BOOL=ON" - # png settings cmake_options+=" -DVTK_USE_SYSTEM_PNG:BOOL=ON" - # zlib settings cmake_options+=" -DVTK_USE_SYSTEM_ZLIB:BOOL=ON" + # freetype settings + cmake_options+=" -DVTK_USE_SYSTEM_FREETYPE:BOOL=ON" + cmake_options+=" -DFREETYPE_INCLUDE_DIRS:STRING=/usr/include/freetype2" + cmake_options+=" -DFREETYPE_LIBRARY:STRING=/usr/lib/libfreetype.so" + + # Extra options since OCC presta to improve Paraview for Salome + cmake_options+=" -DPARAVIEW_USE_3DGLYPH:BOOL=OFF" + cmake_options+=" -DPARAVIEW_USE_EXTENDED_OPENFILEDIALOG:BOOL=ON" + cmake_options+=" -DPARAVIEW_USE_TIMECONTROL_SLIDER:BOOL=ON" # Extra options (switch off non-used Paraview plug-ins) cmake_options+=" -DPARAVIEW_BUILD_PLUGIN_Moments:BOOL=OFF" - cmake_options+=" -DPARAVIEW_BUILD_PLUGIN_PrismPlugin:BOOL=OFF" cmake_options+=" -DPARAVIEW_BUILD_PLUGIN_SLACTools:BOOL=OFF" cmake_options+=" -DPARAVIEW_BUILD_PLUGIN_SierraPlotTools:BOOL=OFF" cmake_options+=" -DPARAVIEW_BUILD_PLUGIN_PacMan:BOOL=OFF" cmake_options+=" -DPARAVIEW_BUILD_PLUGIN_MobileRemoteControl:BOOL=OFF" - cmake_options+=" -DPARAVIEW_ENABLE_COPROCESSING:BOOL=OFF" cmake_options+=" -DPARAVIEW_ENABLE_CATALYST:BOOL=OFF" # Extra options (switch on required Paraview plug-ins) cmake_options+=" -DPARAVIEW_BUILD_PLUGIN_EyeDomeLighting:BOOL=ON" - cmake_options+=" -DPARAVIEW_BUILD_PLUGIN_ForceTime:BOOL=ON" cmake_options+=" -DPARAVIEW_BUILD_PLUGIN_H5PartReader:BOOL=ON" cmake_options+=" -DPARAVIEW_BUILD_PLUGIN_PointSprite:BOOL=ON" cmake_options+=" -DPARAVIEW_BUILD_PLUGIN_SurfaceLIC:BOOL=ON" + cmake_options+=" -DPARAVIEW_ENABLE_MATPLOTLIB:BOOL=ON" # use ffmpeg cmake_options+=" -DVTK_USE_MPEG2_ENCODER=OFF" cmake_options+=" -DVTK_USE_FFMPEG_ENCODER=ON" cmake_options+=" -DPARAVIEW_ENABLE_FFMPEG=ON" - - # flags to use ffmpeg-compat instead of ffmpeg - # cmake_options+=" -DFFMPEG_INCLUDE_DIR=/usr/include/ffmpeg-compat" - # cmake_options+=" -DFFMPEG_avcodec_LIBRARY=/usr/lib/ffmpeg-compat/libavcodec.so" - # cmake_options+=" -DFFMPEG_avformat_LIBRARY=/usr/lib/ffmpeg-compat/libavformat.so" - # cmake_options+=" -DFFMPEG_avutil_LIBRARY=/usr/lib/ffmpeg-compat/libavutil.so" - # cmake_options+=" -DFFMPEG_swscale_LIBRARY=/usr/lib/ffmpeg-compat/libswscale.so" # let's start cmake -Wno-dev \ ${cmake_options} \ - ../ParaView-v${pkgver}-source + ../ParaView-${pkgver} make } @@ -205,20 +182,8 @@ package() { make DESTDIR="${pkgdir}" install - cd "${srcdir}" - #Install missing cmake file - for _FILE in TopologicalSort.cmake - do - install -Dm644 `find ./ -name ${_FILE}` "${pkgdir}${_installdir}/lib/cmake/paraview-${pkgver:0:3}/" - done - - #Install license - install -Dm644 "${srcdir}/ParaView-v${pkgver}-source/License_v1.2.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - - #Install desktop shortcuts - install -Dm644 "${srcdir}/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png" - desktop-file-install --dir="${pkgdir}/usr/share/applications" "${srcdir}/${pkgname}.desktop" + cp -f "${srcdir}/build/VTK/VTKTargets.cmake" "${pkgdir}${_installdir}/lib/cmake/paraview-${pkgver:0:3}" # refers cmake files to _installdir cd "${pkgdir}${_installdir}/lib/cmake/paraview-${pkgver:0:3}" @@ -230,14 +195,16 @@ package() { do sed -e "s|${srcdir}/build/bin|${_installdir}/bin|" -i "${_FILE}" done - sed -e "s|${srcdir}/ParaView-v${pkgver}/CMake|${_installdir}/lib/CMake|" -i ParaViewConfig.cmake + sed -e "s|${srcdir}/ParaView-${pkgver}/CMake|${_installdir}/lib/CMake|" -i ParaViewConfig.cmake + + #Install license + install -Dm644 "${srcdir}/ParaView-${pkgver}/License_v1.2.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + + #Install desktop shortcuts + install -Dm644 "${srcdir}/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png" + desktop-file-install --dir="${pkgdir}/usr/share/applications" "${srcdir}/${pkgname}.desktop" } -md5sums=('77cf0e3804eb7bb91d2d94b10bd470f4' +md5sums=('53c07c80009555d1ffc5e0bf13cfbf20' 'db623002bc71a257ddfdd0c9c7b14c3f' 'e3ba22be644f91da7018f429c3b7dd39' - 'e034fc590bd332175dcd6bf126f14d97' - '12fa547d0c79ea6a780279712574a5fe' - '951e035583c784986a3cd5e7e35519e2' - '58055ab1dd936cc233120b10f4e7eaa7' - '3e4c48633eb337c42653f51e6112f347' - '2f3f049a703224ca230eadffd5016455') + 'ec32574de308796bc8086a896eb8c2f9') diff --git a/ParaView-4.2.0.patch b/ParaView-4.2.0.patch deleted file mode 100644 index 843a06844e0b..000000000000 --- a/ParaView-4.2.0.patch +++ /dev/null @@ -1,1373 +0,0 @@ -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/CMakeLists.txt ParaView-4.2.0_SRC.new/CMakeLists.txt ---- ParaView-4.2.0_SRC/CMakeLists.txt 2014-09-23 18:46:43.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/CMakeLists.txt 2014-12-19 15:39:41.000000000 +0300 -@@ -543,8 +543,8 @@ - - #---------------------------------------------------------------------------------- - # Set some flags that affect VTK's modules. -- set (VTK_NO_PYTHON_THREADS 1 CACHE INTERNAL -- "Disable Python Threads support" FORCE) -+ set (VTK_NO_PYTHON_THREADS ON CACHE BOOL -+ "Disable Python Threads support") - set(VTK_WRAP_PYTHON ${PARAVIEW_ENABLE_PYTHON} - CACHE INTERNAL "Should VTK Python wrapping be built?" FORCE) - -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/ParaViewCore/ClientServerCore/Core/vtkPVPythonInformation.cxx ParaView-4.2.0_SRC.new/ParaViewCore/ClientServerCore/Core/vtkPVPythonInformation.cxx ---- ParaView-4.2.0_SRC/ParaViewCore/ClientServerCore/Core/vtkPVPythonInformation.cxx 2014-09-23 18:46:44.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/ParaViewCore/ClientServerCore/Core/vtkPVPythonInformation.cxx 2014-12-19 15:39:41.000000000 +0300 -@@ -100,7 +100,9 @@ - namespace { - bool hasModule(const char *module) - { -+ VTK_PY_GIL_ENSURE - vtkSmartPyObject mod(PyImport_ImportModule(module)); -+ VTK_PY_GIL_RELEASE - bool result = mod; - return result; - } -@@ -108,11 +110,13 @@ - // Returns empty string on error. - std::string getModuleAttrAsString(const char *module, const char *attribute) - { -+ VTK_PY_GIL_ENSURE - vtkSmartPyObject mod(PyImport_ImportModule(module)); - if (!mod) - { - std::ostringstream result; - result << "(module '" << module << "' not found)"; -+ VTK_PY_GIL_RELEASE - return result.str(); - } - -@@ -122,11 +126,13 @@ - std::ostringstream result; - result << "('" << module << "' module found, missing '" << attribute - << "' attribute)"; -+ VTK_PY_GIL_RELEASE - return result.str(); - } - - std::string result = PyBytes_AsString(attr); - -+ VTK_PY_GIL_RELEASE - return result; - } - -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/ParaViewCore/ClientServerCore/Core/vtkSession.cxx ParaView-4.2.0_SRC.new/ParaViewCore/ClientServerCore/Core/vtkSession.cxx ---- ParaView-4.2.0_SRC/ParaViewCore/ClientServerCore/Core/vtkSession.cxx 2014-09-23 18:46:44.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/ParaViewCore/ClientServerCore/Core/vtkSession.cxx 2014-12-19 15:39:41.000000000 +0300 -@@ -30,13 +30,15 @@ - //---------------------------------------------------------------------------- - void vtkSession::Activate() - { -- vtkProcessModule::GetProcessModule()->PushActiveSession(this); -+ if(vtkProcessModule::GetProcessModule()) -+ vtkProcessModule::GetProcessModule()->PushActiveSession(this); - } - - //---------------------------------------------------------------------------- - void vtkSession::DeActivate() - { -- vtkProcessModule::GetProcessModule()->PopActiveSession(this); -+ if(vtkProcessModule::GetProcessModule()) -+ vtkProcessModule::GetProcessModule()->PopActiveSession(this); - } - - //---------------------------------------------------------------------------- -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/ParaViewCore/ClientServerCore/Rendering/vtkGeometryRepresentation.cxx ParaView-4.2.0_SRC.new/ParaViewCore/ClientServerCore/Rendering/vtkGeometryRepresentation.cxx ---- ParaView-4.2.0_SRC/ParaViewCore/ClientServerCore/Rendering/vtkGeometryRepresentation.cxx 2014-09-23 18:46:44.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/ParaViewCore/ClientServerCore/Rendering/vtkGeometryRepresentation.cxx 2014-12-19 15:39:41.000000000 +0300 -@@ -172,6 +172,7 @@ - if (geomFilter) - { - geomFilter->SetUseOutline(0); -+ geomFilter->SetTriangulate(0); - geomFilter->SetNonlinearSubdivisionLevel(1); - geomFilter->SetPassThroughCellIds(1); - geomFilter->SetPassThroughPointIds(1); -@@ -236,7 +237,7 @@ - vtkPVRenderView::MarkAsRedistributable(inInfo, this); - - // Tell the view if this representation needs ordered compositing. We need -- // ordered compositing when rendering translucent geometry. -+ // ordered compositing when rendering translucent geometry. - if (this->Actor->HasTranslucentPolygonalGeometry()) - { - // We need to extend this condition to consider translucent LUTs once we -@@ -270,7 +271,7 @@ - this->LODOutlineFilter->Update(); - // Pass along the LOD geometry to the view so that it can deliver it to - // the rendering node as and when needed. -- vtkPVRenderView::SetPieceLOD(inInfo, this, -+ vtkPVRenderView::SetPieceLOD(inInfo, this, - this->LODOutlineFilter->GetOutputDataObject(0)); - } - else -@@ -290,7 +291,7 @@ - - // Pass along the LOD geometry to the view so that it can deliver it to - // the rendering node as and when needed. -- vtkPVRenderView::SetPieceLOD(inInfo, this, -+ vtkPVRenderView::SetPieceLOD(inInfo, this, - this->Decimator->GetOutputDataObject(0)); - } - } -@@ -780,6 +781,19 @@ - } - - //---------------------------------------------------------------------------- -+void vtkGeometryRepresentation::SetTriangulate(int val) -+{ -+ if (vtkPVGeometryFilter::SafeDownCast(this->GeometryFilter)) -+ { -+ vtkPVGeometryFilter::SafeDownCast(this->GeometryFilter)->SetTriangulate(val); -+ } -+ -+ // since geometry filter needs to execute, we need to mark the representation -+ // modified. -+ this->MarkModified(); -+} -+ -+//---------------------------------------------------------------------------- - void vtkGeometryRepresentation::SetNonlinearSubdivisionLevel(int val) - { - if (vtkPVGeometryFilter::SafeDownCast(this->GeometryFilter)) -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/ParaViewCore/ClientServerCore/Rendering/vtkGeometryRepresentation.h ParaView-4.2.0_SRC.new/ParaViewCore/ClientServerCore/Rendering/vtkGeometryRepresentation.h ---- ParaView-4.2.0_SRC/ParaViewCore/ClientServerCore/Rendering/vtkGeometryRepresentation.h 2014-09-23 18:46:44.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/ParaViewCore/ClientServerCore/Rendering/vtkGeometryRepresentation.h 2014-12-19 15:39:41.000000000 +0300 -@@ -19,7 +19,7 @@ - // It handles non-polygonal datasets by extracting external surfaces. One can - // use this representation to show surface/wireframe/points/surface-with-edges. - // .SECTION Thanks --// The addition of a transformation matrix was supported by CEA/DIF -+// The addition of a transformation matrix was supported by CEA/DIF - // Commissariat a l'Energie Atomique, Centre DAM Ile-De-France, Arpajon, France. - - #ifndef __vtkGeometryRepresentation_h -@@ -109,7 +109,7 @@ - // Description: - // Returns true if this class would like to get ghost-cells if available for - // the connection whose information object is passed as the argument. -- static bool DoRequestGhostCells(vtkInformation* information); -+ static bool DoRequestGhostCells(vtkInformation* information); - - // Description: - // Representations that use geometry representation as the internal -@@ -122,6 +122,7 @@ - //*************************************************************************** - // Forwarded to vtkPVGeometryFilter - virtual void SetUseOutline(int); -+ void SetTriangulate(int); - void SetNonlinearSubdivisionLevel(int); - - //*************************************************************************** -@@ -145,7 +146,7 @@ - virtual void SetPosition(double, double, double); - virtual void SetScale(double, double, double); - virtual void SetTexture(vtkTexture*); -- virtual void SetUserTransform(const double[16]); -+ virtual void SetUserTransform(const double[16]); - - //*************************************************************************** - // Forwarded to Mapper and LODMapper. -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/ParaViewCore/ServerManager/Core/vtkSMTrace.cxx ParaView-4.2.0_SRC.new/ParaViewCore/ServerManager/Core/vtkSMTrace.cxx ---- ParaView-4.2.0_SRC/ParaViewCore/ServerManager/Core/vtkSMTrace.cxx 2014-09-23 18:46:44.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/ParaViewCore/ServerManager/Core/vtkSMTrace.cxx 2014-12-19 15:39:41.000000000 +0300 -@@ -69,6 +69,7 @@ - #ifdef PARAVIEW_ENABLE_PYTHON - // ensure Python interpreter is initialized. - vtkPythonInterpreter::Initialize(); -+ VTK_PY_GIL_ENSURE - this->Internals->TraceModule.TakeReference(PyImport_ImportModule("paraview.smtrace")); - if (!this->Internals->TraceModule) - { -@@ -92,6 +93,7 @@ - this->Internals->CreateItemFunction.TakeReference(NULL); - } - } -+ VTK_PY_GIL_RELEASE - #endif - } - -@@ -115,12 +117,15 @@ - - #ifdef PARAVIEW_ENABLE_PYTHON - vtkPythonInterpreter::Initialize(); -+ VTK_PY_GIL_ENSURE - try - { -+ - vtkSmartPyObject module(PyImport_ImportModule("paraview.smstate")); - if (!module || PyErr_Occurred()) - { - vtkGenericWarningMacro("Failed to import paraview.smstate module."); -+ VTK_PY_GIL_RELEASE - throw 1; - } - -@@ -132,9 +137,12 @@ - if (!result || PyErr_Occurred()) - { - vtkGenericWarningMacro("Failed to generate state."); -+ VTK_PY_GIL_RELEASE - throw 1; - } -- return vtkStdString(PyString_AsString(result)); -+ vtkStdString s(PyString_AsString(result)); -+ VTK_PY_GIL_RELEASE -+ return s; - } - catch (int) - { -@@ -144,6 +152,7 @@ - PyErr_Clear(); - } - } -+ VTK_PY_GIL_RELEASE - #endif - (void)propertiesToTraceOnCreate; - (void)skipHiddenRepresentations; -@@ -164,9 +173,11 @@ - } - else - { -+ VTK_PY_GIL_ENSURE - vtkSmartPyObject _start_trace_internal( - PyObject_CallMethod(vtkSMTrace::ActiveTracer->GetTraceModule(), - const_cast<char*>("_start_trace_internal"), NULL)); -+ VTK_PY_GIL_RELEASE - vtkSMTrace::ActiveTracer->CheckForError(); - } - #endif -@@ -192,6 +203,7 @@ - vtkSMTrace::ActiveTracer = NULL; - - #ifdef PARAVIEW_ENABLE_PYTHON -+ VTK_PY_GIL_ENSURE - vtkSmartPyObject _stop_trace_internal( - PyObject_CallMethod(active->GetTraceModule(), const_cast<char*>("_stop_trace_internal"), NULL)); - if (active->CheckForError() == false) -@@ -199,14 +211,18 @@ - // no error. - if (Py_None != _stop_trace_internal.GetPointer() && _stop_trace_internal.GetPointer() != NULL) - { -- return vtkStdString(PyString_AsString(_stop_trace_internal)); -+ vtkStdString s(PyString_AsString(_stop_trace_internal)); -+ VTK_PY_GIL_RELEASE -+ return s; - } - else - { - vtkGenericWarningMacro("Empty trace returned!!!"); -+ VTK_PY_GIL_RELEASE - return vtkStdString(); - } - } -+ VTK_PY_GIL_RELEASE - #endif - return vtkStdString(); - } -@@ -223,13 +239,17 @@ - - #ifdef PARAVIEW_ENABLE_PYTHON - vtkSMTrace* active = vtkSMTrace::ActiveTracer; -+ VTK_PY_GIL_ENSURE - vtkSmartPyObject get_current_trace_output( - PyObject_CallMethod(active->GetTraceModule(), const_cast<char*>("get_current_trace_output"), NULL)); - if (active->CheckForError() == false && get_current_trace_output) - { - // no error. -- return vtkStdString(PyString_AsString(get_current_trace_output)); -+ vtkStdString s(PyString_AsString(get_current_trace_output)); -+ VTK_PY_GIL_RELEASE -+ return s; - } -+ VTK_PY_GIL_RELEASE - #endif - return vtkStdString(); - } -@@ -256,6 +276,7 @@ - bool vtkSMTrace::CheckForError() - { - #ifdef PARAVIEW_ENABLE_PYTHON -+ VTK_PY_GIL_ENSURE - PyObject *exception = PyErr_Occurred(); - if (exception) - { -@@ -264,12 +285,15 @@ - // catch Untraceable exceptions. We can log them when debugging is - // enabled. - PyErr_Clear(); -+ VTK_PY_GIL_RELEASE - return false; - } - PyErr_Print(); - PyErr_Clear(); -+ VTK_PY_GIL_RELEASE - return true; - } -+ VTK_PY_GIL_RELEASE - #endif - return false; - } -@@ -336,6 +360,7 @@ - if (vtkSMTrace::GetActiveTracer()) - { - #ifdef PARAVIEW_ENABLE_PYTHON -+ VTK_PY_GIL_ENSURE - vtkSmartPyObject keyObj(PyString_FromString(key)); - vtkSmartPyObject valObj(vtkPythonUtil::GetObjectFromPointer(val)); - assert(valObj && keyObj); -@@ -343,6 +368,7 @@ - int ret = PyDict_SetItem(this->Internals->GetKWArgs(), keyObj, valObj); - (void)ret; - assert(ret == 0); -+ VTK_PY_GIL_RELEASE - #endif - } - (void)key; -@@ -358,6 +384,7 @@ - if (vtkSMTrace::GetActiveTracer()) - { - #ifdef PARAVIEW_ENABLE_PYTHON -+ VTK_PY_GIL_ENSURE - vtkSmartPyObject keyObj(PyString_FromString(key)); - vtkSmartPyObject valObj; - if (val == NULL) -@@ -374,6 +401,7 @@ - int ret = PyDict_SetItem(this->Internals->GetKWArgs(), keyObj, valObj); - (void)ret; - assert(ret == 0); -+ VTK_PY_GIL_RELEASE - #endif - } - (void)key; -@@ -389,6 +417,7 @@ - if (vtkSMTrace::GetActiveTracer()) - { - #ifdef PARAVIEW_ENABLE_PYTHON -+ VTK_PY_GIL_ENSURE - vtkSmartPyObject keyObj(PyString_FromString(key)); - vtkSmartPyObject valObj(PyInt_FromLong(val)); - assert(keyObj && valObj); -@@ -396,6 +425,7 @@ - int ret = PyDict_SetItem(this->Internals->GetKWArgs(), keyObj, valObj); - (void)ret; - assert(ret == 0); -+ VTK_PY_GIL_RELEASE - #endif - } - (void)key; -@@ -411,6 +441,7 @@ - if (vtkSMTrace::GetActiveTracer()) - { - #ifdef PARAVIEW_ENABLE_PYTHON -+ VTK_PY_GIL_ENSURE - vtkSmartPyObject keyObj(PyString_FromString(key)); - vtkSmartPyObject valObj(PyFloat_FromDouble(val)); - assert(keyObj && valObj); -@@ -418,6 +449,7 @@ - int ret = PyDict_SetItem(this->Internals->GetKWArgs(), keyObj, valObj); - (void)ret; - assert(ret == 0); -+ VTK_PY_GIL_RELEASE - #endif - } - (void)key; -@@ -432,6 +464,7 @@ - if (vtkSMTrace::GetActiveTracer()) - { - #ifdef PARAVIEW_ENABLE_PYTHON -+ VTK_PY_GIL_ENSURE - vtkSmartPyObject keyObj(PyString_FromString(key)); - vtkSmartPyObject valObj(PyBool_FromLong(val? 1 : 0)); - assert(keyObj && valObj); -@@ -439,6 +472,7 @@ - int ret = PyDict_SetItem(this->Internals->GetKWArgs(), keyObj, valObj); - (void)ret; - assert(ret == 0); -+ VTK_PY_GIL_RELEASE - #endif - } - (void)key; -@@ -452,11 +486,13 @@ - if (vtkSMTrace::GetActiveTracer()) - { - #ifdef PARAVIEW_ENABLE_PYTHON -+ VTK_PY_GIL_ENSURE - vtkSmartPyObject valObj(vtkPythonUtil::GetObjectFromPointer(val)); - assert(valObj); - int ret = PyList_Append(this->Internals->GetPositionalArgs(), valObj); - (void)ret; - assert(ret == 0); -+ VTK_PY_GIL_RELEASE - #endif - } - (void)val; -@@ -470,11 +506,13 @@ - if (vtkSMTrace::GetActiveTracer()) - { - #ifdef PARAVIEW_ENABLE_PYTHON -+ VTK_PY_GIL_ENSURE - vtkSmartPyObject valObj(PyString_FromString(val)); - assert(valObj); - int ret = PyList_Append(this->Internals->GetPositionalArgs(), valObj); - (void)ret; - assert(ret == 0); -+ VTK_PY_GIL_RELEASE - #endif - } - (void)val; -@@ -487,11 +525,13 @@ - if (vtkSMTrace::GetActiveTracer()) - { - #ifdef PARAVIEW_ENABLE_PYTHON -+ VTK_PY_GIL_ENSURE - vtkSmartPyObject valObj(PyInt_FromLong(val)); - assert(valObj); - int ret = PyList_Append(this->Internals->GetPositionalArgs(), valObj); - (void)ret; - assert(ret == 0); -+ VTK_PY_GIL_RELEASE - #endif - } - (void)val; -@@ -504,11 +544,13 @@ - if (vtkSMTrace::GetActiveTracer()) - { - #ifdef PARAVIEW_ENABLE_PYTHON -+ VTK_PY_GIL_ENSURE - vtkSmartPyObject valObj(PyFloat_FromDouble(val)); - assert(valObj); - int ret = PyList_Append(this->Internals->GetPositionalArgs(), valObj); - (void)ret; - assert(ret == 0); -+ VTK_PY_GIL_RELEASE - #endif - } - (void)val; -@@ -521,11 +563,13 @@ - if (vtkSMTrace::GetActiveTracer()) - { - #ifdef PARAVIEW_ENABLE_PYTHON -+ VTK_PY_GIL_ENSURE - vtkSmartPyObject valObj(PyBool_FromLong(val? 1 : 0)); - assert(valObj); - int ret = PyList_Append(this->Internals->GetPositionalArgs(), valObj); - (void)ret; - assert(ret == 0); -+ VTK_PY_GIL_RELEASE - #endif - } - (void)val; -@@ -557,9 +601,11 @@ - vtkSMTrace* tracer = vtkSMTrace::GetActiveTracer(); - if (tracer && this->Internals->PyItem) - { -+ VTK_PY_GIL_ENSURE - vtkSmartPyObject reply( - PyObject_CallMethod(this->Internals->PyItem, - const_cast<char*>("finalize"), NULL)); -+ VTK_PY_GIL_RELEASE - tracer->CheckForError(); - tracer->InvokeEvent(vtkCommand::UpdateEvent); - } -@@ -583,6 +629,7 @@ - if (vtkSMTrace* tracer = vtkSMTrace::GetActiveTracer()) - { - #ifdef PARAVIEW_ENABLE_PYTHON -+ VTK_PY_GIL_ENSURE - assert(tracer->GetTraceModule()); - assert(tracer->GetCreateItemFunction()); - -@@ -613,6 +660,7 @@ - this->Internals->PyItem.TakeReference( - PyObject_Call(tracer->GetCreateItemFunction(), args, NULL)); - tracer->CheckForError(); -+ VTK_PY_GIL_RELEASE - #endif - } - (void)arguments; -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/ParaViewCore/ServerManager/Rendering/vtkSMPVRepresentationProxy.cxx ParaView-4.2.0_SRC.new/ParaViewCore/ServerManager/Rendering/vtkSMPVRepresentationProxy.cxx ---- ParaView-4.2.0_SRC/ParaViewCore/ServerManager/Rendering/vtkSMPVRepresentationProxy.cxx 2014-09-23 18:46:44.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/ParaViewCore/ServerManager/Rendering/vtkSMPVRepresentationProxy.cxx 2014-12-19 15:39:41.000000000 +0300 -@@ -276,7 +276,7 @@ - { - if (!info) - { -- vtkWarningMacro("Could not determine array range."); -+ // vtkWarningMacro("Could not determine array range."); - return false; - } - -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/ParaViewCore/ServerManager/SMApplication/Resources/views_and_representations.xml ParaView-4.2.0_SRC.new/ParaViewCore/ServerManager/SMApplication/Resources/views_and_representations.xml ---- ParaView-4.2.0_SRC/ParaViewCore/ServerManager/SMApplication/Resources/views_and_representations.xml 2014-09-23 18:46:44.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/ParaViewCore/ServerManager/SMApplication/Resources/views_and_representations.xml 2014-12-19 15:39:41.000000000 +0300 -@@ -2044,16 +2044,14 @@ - <IntVectorProperty command="SetStereoRender" - default_values="0" - name="StereoRender" -- number_of_elements="1" -- is_internal="1"> -+ number_of_elements="1"> - <BooleanDomain name="bool" /> - </IntVectorProperty> - <IntVectorProperty command="SetStereoType" - default_values="3" - name="StereoType" - panel_visibility="never" -- number_of_elements="1" -- is_internal="1"> -+ number_of_elements="1"> - <EnumerationDomain name="enum"> - <Entry text="Crystal Eyes" - value="1" /> -@@ -3139,6 +3137,8 @@ - panel_visibility="advanced" /> - <Property name="UserTransform" - panel_visibility="never" /> -+ <Property name="Triangulate" -+ panel_visibility="advanced" /> - <Property name="NonlinearSubdivisionLevel" - panel_visibility="advanced" /> - <Property name="BlockVisibility" -@@ -8229,6 +8229,15 @@ - <!--<Entry value="2" text="Phong" />--> - </EnumerationDomain> - </IntVectorProperty> -+ <IntVectorProperty command="SetTriangulate" -+ default_values="0" -+ name="Triangulate" -+ number_of_elements="1"> -+ <BooleanDomain name="bool" /> -+ <Documentation>Triangulate the geometry internally to avoid rendering -+ issues of non-convex polygons. This feature has a processing and memory -+ cost, it should be enabled only when needed.</Documentation> -+ </IntVectorProperty> - <IntVectorProperty command="SetNonlinearSubdivisionLevel" - default_values="1" - name="NonlinearSubdivisionLevel" -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/ParaViewCore/VTKExtensions/Default/vtkPVImageReader.h ParaView-4.2.0_SRC.new/ParaViewCore/VTKExtensions/Default/vtkPVImageReader.h ---- ParaView-4.2.0_SRC/ParaViewCore/VTKExtensions/Default/vtkPVImageReader.h 2014-09-23 18:46:44.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/ParaViewCore/VTKExtensions/Default/vtkPVImageReader.h 2014-12-19 15:39:41.000000000 +0300 -@@ -19,27 +19,15 @@ - - #include "vtkPVVTKExtensionsDefaultModule.h" //needed for exports - --#ifdef PARAVIEW_USE_MPI --#include "vtkMPIImageReader.h" --#else - #include "vtkImageReader.h" --#endif - --class VTKPVVTKEXTENSIONSDEFAULT_EXPORT vtkPVImageReader : public --#ifdef PARAVIEW_USE_MPI --vtkMPIImageReader --#else --vtkImageReader --#endif -+class VTKPVVTKEXTENSIONSDEFAULT_EXPORT vtkPVImageReader : public vtkImageReader - { - public: - static vtkPVImageReader* New(); - --#ifdef PARAVIEW_USE_MPI -- vtkTypeMacro(vtkPVImageReader, vtkMPIImageReader); --#else -+ - vtkTypeMacro(vtkPVImageReader, vtkImageReader); --#endif - - void PrintSelf(ostream& os, vtkIndent indent); - -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/ParaViewCore/VTKExtensions/Rendering/vtkPVGeometryFilter.cxx ParaView-4.2.0_SRC.new/ParaViewCore/VTKExtensions/Rendering/vtkPVGeometryFilter.cxx ---- ParaView-4.2.0_SRC/ParaViewCore/VTKExtensions/Rendering/vtkPVGeometryFilter.cxx 2014-09-23 18:46:44.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/ParaViewCore/VTKExtensions/Rendering/vtkPVGeometryFilter.cxx 2014-12-19 15:39:41.000000000 +0300 -@@ -64,6 +64,7 @@ - #include "vtkStructuredGrid.h" - #include "vtkStructuredGridOutlineFilter.h" - #include "vtkTimerLog.h" -+#include "vtkTriangleFilter.h" - #include "vtkUniformGrid.h" - #include "vtkUnsignedCharArray.h" - #include "vtkUnsignedIntArray.h" -@@ -78,8 +79,6 @@ - #include <set> - #include <algorithm> - --#define VTK_CREATE(type, name) \ -- vtkSmartPointer<type> name = vtkSmartPointer<type>::New() - - vtkStandardNewMacro(vtkPVGeometryFilter); - vtkCxxSetObjectMacro(vtkPVGeometryFilter, Controller, vtkMultiProcessController); -@@ -149,6 +148,7 @@ - this->UseOutline = 1; - this->UseStrips = 0; - this->GenerateCellNormals = 1; -+ this->Triangulate = false; - this->NonlinearSubdivisionLevel = 1; - - this->DataSetSurfaceFilter = vtkDataSetSurfaceFilter::New(); -@@ -1348,8 +1348,8 @@ - { - this->OutlineFlag = 0; - -- bool handleSubdivision = false; -- if (this->NonlinearSubdivisionLevel > 0) -+ bool handleSubdivision = (this->Triangulate != 0); -+ if (!handleSubdivision && (this->NonlinearSubdivisionLevel > 0)) - { - // Check to see if the data actually has nonlinear cells. Handling - // nonlinear cells adds unnecessary work if we only have linear cells. -@@ -1445,6 +1445,16 @@ - this->DataSetSurfaceFilter->UnstructuredGridExecute(input, output, updateghostlevel); - } - -+ if (this->Triangulate && (output->GetNumberOfPolys() > 0)) -+ { -+ // Triangulate the polygonal mesh if requested to avoid rendering -+ // issues of non-convex polygons. -+ vtkNew<vtkTriangleFilter> triangleFilter; -+ triangleFilter->SetInputData(output); -+ triangleFilter->Update(); -+ output->ShallowCopy(triangleFilter->GetOutput()); -+ } -+ - if (handleSubdivision) - { - // Restore state of DataSetSurfaceFilter. -@@ -1456,9 +1466,9 @@ - - // Now use vtkPVRecoverGeometryWireframe to create an edge flag attribute - // that will cause the wireframe to be rendered correctly. -- VTK_CREATE(vtkPolyData, nextStageInput); -+ vtkNew<vtkPolyData> nextStageInput; - nextStageInput->ShallowCopy(output); // Yes output is correct. -- this->RecoverWireframeFilter->SetInputData(nextStageInput); -+ this->RecoverWireframeFilter->SetInputData(nextStageInput.Get()); - - // Observe the progress of the internal filter. - // TODO: Make the consecutive internal filter execution have monotonically -@@ -1489,7 +1499,7 @@ - return; - } - vtkIdType numPts = polyPtIds2FacePtIds->GetNumberOfTuples(); -- VTK_CREATE(vtkIdTypeArray, polyPtIds2OriginalPtIds); -+ vtkNew<vtkIdTypeArray> polyPtIds2OriginalPtIds; - polyPtIds2OriginalPtIds->SetName("vtkOriginalPointIds"); - polyPtIds2OriginalPtIds->SetNumberOfComponents(1); - polyPtIds2OriginalPtIds->SetNumberOfTuples(numPts); -@@ -1503,7 +1513,7 @@ - } - polyPtIds2OriginalPtIds->SetValue(polyPtId, originalPtId); - } -- output->GetPointData()->AddArray(polyPtIds2OriginalPtIds); -+ output->GetPointData()->AddArray(polyPtIds2OriginalPtIds.Get()); - } - } - -@@ -1518,7 +1528,7 @@ - - //---------------------------------------------------------------------------- - void vtkPVGeometryFilter::PolyDataExecute( -- vtkPolyData* input, vtkPolyData* out, int doCommunicate) -+ vtkPolyData* input, vtkPolyData* output, int doCommunicate) - { - if (!this->UseOutline) - { -@@ -1533,54 +1543,90 @@ - inCopy->RemoveGhostCells(1); - stripper->SetInputData(inCopy); - stripper->Update(); -- out->CopyStructure(stripper->GetOutput()); -- out->GetPointData()->ShallowCopy(stripper->GetOutput()->GetPointData()); -- out->GetCellData()->ShallowCopy(stripper->GetOutput()->GetCellData()); -+ output->CopyStructure(stripper->GetOutput()); -+ output->GetPointData()->ShallowCopy(stripper->GetOutput()->GetPointData()); -+ output->GetCellData()->ShallowCopy(stripper->GetOutput()->GetCellData()); - inCopy->Delete(); - stripper->Delete(); - } - else - { -- out->ShallowCopy(input); -+ output->ShallowCopy(input); - if (this->PassThroughCellIds) - { -- vtkIdTypeArray *originalCellIds = vtkIdTypeArray::New(); -+ vtkNew<vtkIdTypeArray> originalCellIds; - originalCellIds->SetName("vtkOriginalCellIds"); - originalCellIds->SetNumberOfComponents(1); -- vtkCellData *outputCD = out->GetCellData(); -- outputCD->AddArray(originalCellIds); -- vtkIdType numTup = out->GetNumberOfCells(); -+ vtkNew<vtkIdTypeArray> originalFaceIds; -+ originalFaceIds->SetName(vtkPVRecoverGeometryWireframe::ORIGINAL_FACE_IDS()); -+ originalFaceIds->SetNumberOfComponents(1); -+ vtkCellData *outputCD = output->GetCellData(); -+ outputCD->AddArray(originalCellIds.Get()); -+ if (this->Triangulate) -+ { -+ outputCD->AddArray(originalFaceIds.Get()); -+ } -+ vtkIdType numTup = output->GetNumberOfCells(); - originalCellIds->SetNumberOfValues(numTup); -+ originalFaceIds->SetNumberOfValues(numTup); - for (vtkIdType cId = 0; cId < numTup; cId++) - { - originalCellIds->SetValue(cId, cId); -+ originalFaceIds->SetValue(cId, cId); - } -- originalCellIds->Delete(); -- originalCellIds = NULL; - } - if (this->PassThroughPointIds) - { -- vtkIdTypeArray *originalPointIds = vtkIdTypeArray::New(); -+ vtkNew<vtkIdTypeArray> originalPointIds; - originalPointIds->SetName("vtkOriginalPointIds"); - originalPointIds->SetNumberOfComponents(1); -- vtkPointData *outputPD = out->GetPointData(); -- outputPD->AddArray(originalPointIds); -- vtkIdType numTup = out->GetNumberOfPoints(); -+ vtkPointData *outputPD = output->GetPointData(); -+ outputPD->AddArray(originalPointIds.Get()); -+ vtkIdType numTup = output->GetNumberOfPoints(); - originalPointIds->SetNumberOfValues(numTup); - for (vtkIdType pId = 0; pId < numTup; pId++) - { - originalPointIds->SetValue(pId, pId); - } -- originalPointIds->Delete(); -- originalPointIds = NULL; - } -- out->RemoveGhostCells(1); -+ -+ output->RemoveGhostCells(1); -+ -+ if (this->Triangulate) -+ { -+ // Triangulate the polygonal mesh. -+ vtkNew<vtkTriangleFilter> triangleFilter; -+ triangleFilter->SetInputData(output); -+ triangleFilter->Update(); -+ -+ // Now use vtkPVRecoverGeometryWireframe to create an edge flag attribute -+ // that will cause the wireframe to be rendered correctly. -+ this->RecoverWireframeFilter->SetInputData(triangleFilter->GetOutput()); -+ -+ // Observe the progress of the internal filter. -+ // TODO: Make the consecutive internal filter execution have monotonically -+ // increasing progress rather than restarting for every internal filter. -+ this->RecoverWireframeFilter->AddObserver( -+ vtkCommand::ProgressEvent, -+ this->InternalProgressObserver); -+ this->RecoverWireframeFilter->Update(); -+ // The internal filter finished. Remove the observer. -+ this->RecoverWireframeFilter->RemoveObserver( -+ this->InternalProgressObserver); -+ -+ this->RecoverWireframeFilter->SetInputData(NULL); -+ -+ // Get what should be the final output. -+ output->ShallowCopy(this->RecoverWireframeFilter->GetOutput()); -+ -+ output->GetCellData()->RemoveArray(vtkPVRecoverGeometryWireframe::ORIGINAL_FACE_IDS()); -+ } - } - return; - } - - this->OutlineFlag = 1; -- this->DataSetExecute(input, out, doCommunicate); -+ this->DataSetExecute(input, output, doCommunicate); - } - - //---------------------------------------------------------------------------- -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/ParaViewCore/VTKExtensions/Rendering/vtkPVGeometryFilter.h ParaView-4.2.0_SRC.new/ParaViewCore/VTKExtensions/Rendering/vtkPVGeometryFilter.h ---- ParaView-4.2.0_SRC/ParaViewCore/VTKExtensions/Rendering/vtkPVGeometryFilter.h 2014-09-23 18:46:44.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/ParaViewCore/VTKExtensions/Rendering/vtkPVGeometryFilter.h 2014-12-19 15:39:41.000000000 +0300 -@@ -85,6 +85,13 @@ - vtkBooleanMacro(GenerateCellNormals, int); - - // Description: -+ // Whether to triangulate mesh for rendering. This parameter avoid -+ // rendering issues of non-convex polygons. -+ vtkSetMacro(Triangulate, int); -+ vtkGetMacro(Triangulate, int); -+ vtkBooleanMacro(Triangulate, int); -+ -+ // Description: - // Nonlinear faces are approximated with flat polygons. This parameter - // controls how many times to subdivide nonlinear surface cells. Higher - // subdivisions generate closer approximations but take more memory and -@@ -101,8 +108,7 @@ - // Description: - // If on, the output polygonal dataset will have a celldata array that - // holds the cell index of the original 3D cell that produced each output -- // cell. This is useful for picking. The default is off to conserve -- // memory. -+ // cell. This is useful for picking but it takes memory. The default is on. - void SetPassThroughCellIds(int); - vtkGetMacro(PassThroughCellIds,int); - vtkBooleanMacro(PassThroughCellIds,int); -@@ -110,8 +116,7 @@ - // Description: - // If on, the output polygonal dataset will have a pointdata array that - // holds the point index of the original vertex that produced each output -- // vertex. This is useful for picking. The default is off to conserve -- // memory. -+ // vertex. This is useful for picking but it takes memory. The default is on. - void SetPassThroughPointIds(int); - vtkGetMacro(PassThroughPointIds,int); - vtkBooleanMacro(PassThroughPointIds,int); -@@ -176,7 +181,7 @@ - virtual vtkExecutive* CreateDefaultExecutive(); - - // Description: -- // Produce geometry for a block in the dataset. -+ // Produce geometry for a block in the dataset. - // This does not handle producing outlines. Call only when this->UseOutline == - // 0; \c extractface mask it is used to determine external faces. - void ExecuteAMRBlock(vtkUniformGrid* input, -@@ -250,6 +255,7 @@ - int UseOutline; - int UseStrips; - int GenerateCellNormals; -+ int Triangulate; - int NonlinearSubdivisionLevel; - - vtkMultiProcessController* Controller; -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/Qt/Components/pqPropertiesPanel.cxx ParaView-4.2.0_SRC.new/Qt/Components/pqPropertiesPanel.cxx ---- ParaView-4.2.0_SRC/Qt/Components/pqPropertiesPanel.cxx 2014-09-23 18:46:44.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/Qt/Components/pqPropertiesPanel.cxx 2014-12-19 15:39:41.000000000 +0300 -@@ -383,6 +383,14 @@ - this->Internals->Ui.DisplayButton->setVisible(has_multiples_types && has_display); - this->Internals->Ui.ViewButton->setVisible(has_multiples_types && has_view); - -+ // added to avoid unwanted save restore buttons -+ this->Internals->Ui.PropertiesSaveAsDefaults->setVisible(has_source); -+ this->Internals->Ui.PropertiesRestoreDefaults->setVisible(has_source); -+ this->Internals->Ui.DisplaySaveAsDefaults->setVisible(has_display); -+ this->Internals->Ui.DisplayRestoreDefaults->setVisible(has_display); -+ this->Internals->Ui.ViewSaveAsDefaults->setVisible(has_view); -+ this->Internals->Ui.ViewRestoreDefaults->setVisible(has_view); -+ - this->updatePanel(); - } - -@@ -593,14 +601,15 @@ - } - - //----------------------------------------------------------------------------- --void pqPropertiesPanel::updateViewPanel (pqView* _view) -+void pqPropertiesPanel::updateViewPanel (pqView* argView) - { -+ pqView* _view = argView; - if ( (this->PanelMode & pqPropertiesPanel::VIEW_PROPERTIES) == 0) - { - _view = NULL; - } - -- if (this->Internals->View != _view) -+ if (this->Internals->View != argView) - { - // The view has changed. - if (this->Internals->View) -@@ -611,8 +620,8 @@ - delete this->Internals->ViewWidgets; - } - } -- this->Internals->View = _view; -- emit this->viewChanged(_view); -+ this->Internals->View = argView; -+ emit this->viewChanged(argView); - if (_view) - { - // create the widgets for this view -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/Qt/Python/pqPythonShell.cxx ParaView-4.2.0_SRC.new/Qt/Python/pqPythonShell.cxx ---- ParaView-4.2.0_SRC/Qt/Python/pqPythonShell.cxx 2014-09-23 18:46:44.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/Qt/Python/pqPythonShell.cxx 2014-12-19 15:40:01.000000000 +0300 -@@ -118,6 +118,7 @@ - /// string list. - QStringList getPythonAttributes(const QString& pythonObjectName) - { -+ VTK_PY_GIL_ENSURE - if (this->Interpreter == NULL || - this->Interpreter->GetInteractiveConsoleLocalsPyObject() == NULL) - { -@@ -191,7 +192,7 @@ - } - Py_DECREF(object); - } -- -+ VTK_PY_GIL_RELEASE - return results; - } - }; -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/Qt/Python/pqPythonSyntaxHighlighter.cxx ParaView-4.2.0_SRC.new/Qt/Python/pqPythonSyntaxHighlighter.cxx ---- ParaView-4.2.0_SRC/Qt/Python/pqPythonSyntaxHighlighter.cxx 2014-09-23 18:46:44.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/Qt/Python/pqPythonSyntaxHighlighter.cxx 2014-12-19 15:39:41.000000000 +0300 -@@ -65,6 +65,7 @@ - this->Internals->TextEdit = textEdit; - this->Internals->TextEdit->installEventFilter(this); - vtkPythonInterpreter::Initialize(); -+ VTK_PY_GIL_ENSURE - this->Internals->PygmentsModule.TakeReference(PyImport_ImportModule("pygments")); - if (this->Internals->PygmentsModule && this->Internals->TextEdit != NULL) - { -@@ -99,6 +100,7 @@ - this->connect(this->Internals->TextEdit.data(), SIGNAL(textChanged()), - this, SLOT(rehighlightSyntax())); - } -+ VTK_PY_GIL_RELEASE - this->Internals->IsSyntaxHighlighting = false; - // Replace tabs with 4 spaces - this->Internals->ReplaceTabs = true; -@@ -175,10 +177,12 @@ - } - QString leadingWhitespace = text.left(leadingWhiteSpaceLength); - QString trailingWhitespace = text.right(trailingWhiteSpaceLength); -+ VTK_PY_GIL_ENSURE - vtkSmartPyObject args(Py_BuildValue("sOO",text.trimmed().toStdString().c_str(), - this->Internals->PythonLexer.GetPointer(),this->Internals->HtmlFormatter.GetPointer())); - vtkSmartPyObject resultingText(PyObject_Call(this->Internals->HighlightFunction,args,NULL)); - const char *resultingTextAsCString = PyString_AsString(resultingText); -+ VTK_PY_GIL_RELEASE - QString pygmentsOutput(resultingTextAsCString); - // the first span tag always should follow the pre tag like this; <pre ...><span - int startOfPre = pygmentsOutput.indexOf(">",pygmentsOutput.indexOf("<pre"))+1; -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/Utilities/VisItBridge/databases/Velodyne/VelodyneReader.C ParaView-4.2.0_SRC.new/Utilities/VisItBridge/databases/Velodyne/VelodyneReader.C ---- ParaView-4.2.0_SRC/Utilities/VisItBridge/databases/Velodyne/VelodyneReader.C 2014-09-23 18:46:46.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/Utilities/VisItBridge/databases/Velodyne/VelodyneReader.C 2014-12-19 15:39:41.000000000 +0300 -@@ -2,7 +2,7 @@ - // This code was contributed to the VisIt project by Corvid Technologies - // on February 10, 2010. - // -- -+#define H5Eset_auto_vers 2 - #include <string.h> - #include <cstdlib> - -@@ -16,7 +16,6 @@ - #endif - - #include <VelodyneReader.h> -- - #include <visit-hdf5.h> - - #include <set> -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/Utilities/VisItBridge/databases/Vs/VsFilter.C ParaView-4.2.0_SRC.new/Utilities/VisItBridge/databases/Vs/VsFilter.C ---- ParaView-4.2.0_SRC/Utilities/VisItBridge/databases/Vs/VsFilter.C 2014-09-23 18:46:46.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/Utilities/VisItBridge/databases/Vs/VsFilter.C 2014-12-19 15:39:41.000000000 +0300 -@@ -1,3 +1,7 @@ -+#define H5Gopen_vers 2 -+#define H5Dopen_vers 2 -+#define H5Eset_auto_vers 2 -+#define H5Aiterate_vers 2 - #include <vtk_hdf5.h> - #include <visit-hdf5.h> - #if HDF5_VERSION_GE(1,8,1) -@@ -146,11 +150,7 @@ - - // Get info of the linked object. - H5O_info_t objinfo; --#ifndef H5_USE_16_API - hid_t obj_id = H5Oopen(locId, name, H5P_DEFAULT); --#else -- hid_t obj_id = H5Oopen(locId, name); --#endif - - if (obj_id < 0) { - VsLog::errorLog() <<"VsFilter::visitLinks() - unable to get id for external object " <<name <<std::endl; -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/Utilities/VisItBridge/databases/Vs/VsH5File.C ParaView-4.2.0_SRC.new/Utilities/VisItBridge/databases/Vs/VsH5File.C ---- ParaView-4.2.0_SRC/Utilities/VisItBridge/databases/Vs/VsH5File.C 2014-09-23 18:46:46.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/Utilities/VisItBridge/databases/Vs/VsH5File.C 2014-12-19 15:39:41.000000000 +0300 -@@ -4,7 +4,7 @@ - * Created on: Apr 27, 2010 - * Author: mdurant - */ -- -+#define H5Eset_auto_vers 2 - #include "VsH5File.h" - #include "VsLog.h" - #include "VsFilter.h" -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/VTK/CMake/vtkModuleTop.cmake ParaView-4.2.0_SRC.new/VTK/CMake/vtkModuleTop.cmake ---- ParaView-4.2.0_SRC/VTK/CMake/vtkModuleTop.cmake 2014-09-23 18:47:10.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/VTK/CMake/vtkModuleTop.cmake 2014-12-19 15:39:41.000000000 +0300 -@@ -476,6 +476,7 @@ - get_property(VTK_TARGETS GLOBAL PROPERTY VTK_TARGETS) - if(VTK_TARGETS) - install(EXPORT ${VTK_INSTALL_EXPORT_NAME} DESTINATION ${VTK_INSTALL_PACKAGE_DIR}) -+ install(EXPORT ${VTK_INSTALL_EXPORT_NAME} DESTINATION ${VTK_INSTALL_PACKAGE_DIR} FILE VTKTargets.cmake) - else() - set(CMAKE_CONFIGURABLE_FILE_CONTENT "# No targets!") - configure_file(${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/VTK/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx ParaView-4.2.0_SRC.new/VTK/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx ---- ParaView-4.2.0_SRC/VTK/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx 2014-09-23 18:47:11.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/VTK/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx 2014-12-19 15:39:41.000000000 +0300 -@@ -48,7 +48,7 @@ - //---------------------------------------------------------------------------- - vtkMatplotlibMathTextUtilities::Availablity - vtkMatplotlibMathTextUtilities::MPLMathTextAvailable = --vtkMatplotlibMathTextUtilities::NOT_TESTED; -+vtkMatplotlibMathTextUtilities::UNAVAILABLE; - - // A macro that is used in New() to print warnings if VTK_MATPLOTLIB_DEBUG - // is defined in the environment. Use vtkGenericWarningMacro to allow this to -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/VTK/ThirdParty/verdict/vtkverdict/V_TetMetric.cpp ParaView-4.2.0_SRC.new/VTK/ThirdParty/verdict/vtkverdict/V_TetMetric.cpp ---- ParaView-4.2.0_SRC/VTK/ThirdParty/verdict/vtkverdict/V_TetMetric.cpp 2014-09-23 18:47:11.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/VTK/ThirdParty/verdict/vtkverdict/V_TetMetric.cpp 2014-12-19 15:39:41.000000000 +0300 -@@ -373,7 +373,7 @@ - coordinates[3][1] - coordinates[0][1], - coordinates[3][2] - coordinates[0][2] ); - -- double detTet = ab % ( ac * ad ); -+ double detTet = fabs( ab % ( ac * ad ) ); - - if( detTet < VERDICT_DBL_MIN ) - return (double)VERDICT_DBL_MAX; -@@ -413,7 +413,7 @@ - D = bd.length(); - - double aspect_ratio; -- aspect_ratio = normal_coeff * hm * ( A + B + C + D ) / fabs( detTet ); -+ aspect_ratio = normal_coeff * hm * ( A + B + C + D ) / detTet; - - if( aspect_ratio > 0 ) - return (double) VERDICT_MIN( aspect_ratio, VERDICT_DBL_MAX ); -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/VTK/Utilities/Python/vtkPython.h ParaView-4.2.0_SRC.new/VTK/Utilities/Python/vtkPython.h ---- ParaView-4.2.0_SRC/VTK/Utilities/Python/vtkPython.h 2014-09-23 18:47:11.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/VTK/Utilities/Python/vtkPython.h 2014-12-19 15:39:41.000000000 +0300 -@@ -87,4 +87,14 @@ - #error "Python.h is different version from what VTK was configured with!!" - #endif - -+#ifdef VTK_NO_PYTHON_THREADS -+# define VTK_PY_GIL_ENSURE -+# define VTK_PY_GIL_RELEASE -+#else -+# define VTK_PY_GIL_ENSURE PyGILState_STATE _gstate_avoid_clash = PyGILState_Ensure(); -+# define VTK_PY_GIL_RELEASE PyGILState_Release(_gstate_avoid_clash); -+# -+#endif -+ -+ - #endif -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/VTK/Utilities/PythonInterpreter/vtkPythonInteractiveInterpreter.cxx ParaView-4.2.0_SRC.new/VTK/Utilities/PythonInterpreter/vtkPythonInteractiveInterpreter.cxx ---- ParaView-4.2.0_SRC/VTK/Utilities/PythonInterpreter/vtkPythonInteractiveInterpreter.cxx 2014-09-23 18:47:11.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/VTK/Utilities/PythonInterpreter/vtkPythonInteractiveInterpreter.cxx 2014-12-19 15:39:41.000000000 +0300 -@@ -45,6 +45,7 @@ - - void CleanupPythonObjects() - { -+ VTK_PY_GIL_ENSURE - Py_XDECREF(this->InteractiveConsoleLocals); - Py_XDECREF(this->InteractiveConsole); - this->InteractiveConsole = NULL; -@@ -54,6 +55,7 @@ - const char* code = "import gc; gc.collect()\n"; - vtkPythonInterpreter::RunSimpleString(code); - } -+ VTK_PY_GIL_RELEASE - } - - PyObject* GetInteractiveConsole() -@@ -65,6 +67,7 @@ - - vtkPythonInterpreter::Initialize(); - -+ VTK_PY_GIL_ENSURE - // set up the code.InteractiveConsole instance that we'll use. - const char* code = "import code\n" - "__vtkConsoleLocals={'__name__':'__vtkconsole__','__doc__':None}\n" -@@ -83,6 +86,7 @@ - { - vtkGenericWarningMacro( - "Failed to locate the InteractiveConsole/InteractiveConsoleLocals object."); -+ VTK_PY_GIL_RELEASE - return NULL; - } - Py_INCREF(this->InteractiveConsole); -@@ -105,7 +109,7 @@ - PySys_SetObject(const_cast<char*>("ps2"), ps2 = PyString_FromString("... ")); - Py_XDECREF(ps2); - } -- -+ VTK_PY_GIL_RELEASE - return this->InteractiveConsole; - } - }; -@@ -167,6 +171,7 @@ - i++; - } - -+ VTK_PY_GIL_ENSURE - bool ret_value = false; - PyObject *res = PyObject_CallMethod(console, - const_cast<char*>("push"), const_cast<char*>("z"), buffer.c_str()); -@@ -179,6 +184,7 @@ - } - Py_DECREF(res); - } -+ VTK_PY_GIL_RELEASE - return ret_value; - } - -@@ -190,12 +196,14 @@ - - this->Internals->GetInteractiveConsole(); //ensure the console is initialized - -+ VTK_PY_GIL_ENSURE - PyObject* context = this->Internals->GetInteractiveConsoleLocalsPyObject(); - PyObject* result = PyRun_String(const_cast<char*>(script), Py_file_input, context, context); - - if (result == NULL) - { - PyErr_Print(); -+ VTK_PY_GIL_RELEASE - return -1; - } - -@@ -204,6 +212,7 @@ - { - PyErr_Clear(); - } -+ VTK_PY_GIL_RELEASE - return 0; - } - -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/VTK/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx ParaView-4.2.0_SRC.new/VTK/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx ---- ParaView-4.2.0_SRC/VTK/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx 2014-09-23 18:47:11.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/VTK/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx 2014-12-19 15:39:54.000000000 +0300 -@@ -60,10 +60,12 @@ - - inline void vtkPrependPythonPath(const char* pathtoadd) - { -+ VTK_PY_GIL_ENSURE - PyObject* path = PySys_GetObject(const_cast<char*>("path")); - PyObject* newpath = PyString_FromString(pathtoadd); - PyList_Insert(path, 0, newpath); - Py_DECREF(newpath); -+ VTK_PY_GIL_RELEASE - } - } - -@@ -107,7 +109,6 @@ - //---------------------------------------------------------------------------- - bool vtkPythonInterpreter::Initialize(int initsigs /*=0*/) - { -- vtkPythonInterpreter::InitializedOnce = true; - if (Py_IsInitialized() == 0) - { - #if (VTK_PYTHON_MAJOR_VERSION > 2) ||\ -@@ -117,11 +118,26 @@ - (void)initsigs; - Py_Initialize(); - #endif -- - #ifdef SIGINT - // Put default SIGINT handler back after Py_Initialize/Py_InitializeEx. - signal(SIGINT, SIG_DFL); - #endif -+ } -+ -+ if (! vtkPythonInterpreter::InitializedOnce) -+ { -+#ifndef VTK_NO_PYTHON_THREADS -+ int threadInit = PyEval_ThreadsInitialized(); -+ PyEval_InitThreads(); // safe to call this multiple time -+#endif -+ // At this point we have GIL, or we are mono-thread. -+ // Access to the static below is safe: -+ vtkPythonInterpreter::InitializedOnce = true; -+ -+#ifndef VTK_NO_PYTHON_THREADS -+ if(!threadInit) -+ PyEval_SaveThread(); // release GIL -+#endif - // HACK: Calling PyRun_SimpleString for the first time for some reason results in - // a "\n" message being generated which is causing the error dialog to - // popup. So we flush that message out of the system before setting up the -@@ -134,15 +150,17 @@ - vtkPythonStdStreamCaptureHelper* wrapperErr = - NewPythonStdStreamCaptureHelper(true); - -- // Redirect Python's stdout and stderr and stdin -- PySys_SetObject(const_cast<char*>("stdout"), -+ // Redirect Python's stdout and stderr and stdin - GIL protected operation -+ VTK_PY_GIL_ENSURE -+ int ret1 = PySys_SetObject(const_cast<char*>("stdout"), - reinterpret_cast<PyObject*>(wrapperOut)); -- PySys_SetObject(const_cast<char*>("stderr"), -+ int ret2 = PySys_SetObject(const_cast<char*>("stderr"), - reinterpret_cast<PyObject*>(wrapperErr)); -- PySys_SetObject(const_cast<char*>("stdin"), -+ int ret3 = PySys_SetObject(const_cast<char*>("stdin"), - reinterpret_cast<PyObject*>(wrapperOut)); - Py_DECREF(wrapperOut); - Py_DECREF(wrapperErr); -+ VTK_PY_GIL_RELEASE - - for (size_t cc=0; cc < PythonPaths.size(); cc++) - { -@@ -162,6 +180,7 @@ - if (Py_IsInitialized() != 0) - { - NotifyInterpreters(vtkCommand::ExitEvent); -+ VTK_PY_GIL_ENSURE - Py_Finalize(); - } - } -@@ -221,7 +240,9 @@ - vtkPythonInterpreter::SetProgramName(argv[0]); - } - vtkPythonInterpreter::Initialize(1); -+ VTK_PY_GIL_ENSURE - return Py_Main(argc, argv); -+ // Py_Main already does a finalize etc ... - } - - //---------------------------------------------------------------------------- -@@ -235,7 +256,9 @@ - buffer.erase(std::remove(buffer.begin(), buffer.end(), '\r'), buffer.end()); - - // The cast is necessary because PyRun_SimpleString() hasn't always been const-correct -+ VTK_PY_GIL_ENSURE - PyRun_SimpleString(const_cast<char*>(buffer.c_str())); -+ VTK_PY_GIL_RELEASE - } - - //---------------------------------------------------------------------------- -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/VTK/Wrapping/PythonCore/vtkPythonCommand.cxx ParaView-4.2.0_SRC.new/VTK/Wrapping/PythonCore/vtkPythonCommand.cxx ---- ParaView-4.2.0_SRC/VTK/Wrapping/PythonCore/vtkPythonCommand.cxx 2014-09-23 18:47:11.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/VTK/Wrapping/PythonCore/vtkPythonCommand.cxx 2014-12-19 15:39:41.000000000 +0300 -@@ -30,14 +30,18 @@ - vtkPythonUtil::UnRegisterPythonCommand(this); - if (this->obj && Py_IsInitialized()) - { -+ VTK_PY_GIL_ENSURE - Py_DECREF(this->obj); -+ VTK_PY_GIL_RELEASE - } - this->obj = NULL; - } - - void vtkPythonCommand::SetObject(PyObject *o) - { -+ VTK_PY_GIL_ENSURE - Py_INCREF(o); -+ VTK_PY_GIL_RELEASE - this->obj = o; - } - -@@ -92,11 +96,11 @@ - // If a threadstate has been set using vtkPythonCommand::SetThreadState, - // then swap it in here. See the email to vtk-developers@vtk.org from - // June 18, 2009 with subject "Py_NewInterpreter and vtkPythonCallback issue" -- PyThreadState* prevThreadState = NULL; -- if (this->ThreadState) -- { -- prevThreadState = PyThreadState_Swap(this->ThreadState); -- } -+// PyThreadState* prevThreadState = NULL; -+// if (this->ThreadState) -+// { -+// prevThreadState = PyThreadState_Swap(this->ThreadState); -+// } - - PyObject * obj2 = NULL; - if (ptr && ptr->GetReferenceCount() > 0) -@@ -237,10 +241,10 @@ - } - - // If we did the swap near the top of this function then swap back now. -- if (this->ThreadState) -- { -- PyThreadState_Swap(prevThreadState); -- } -+// if (this->ThreadState) -+// { -+// PyThreadState_Swap(prevThreadState); -+// } - - #ifndef VTK_NO_PYTHON_THREADS - #if (PY_MAJOR_VERSION > 2) || \ -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/VTK/Wrapping/PythonCore/vtkSmartPyObject.cxx ParaView-4.2.0_SRC.new/VTK/Wrapping/PythonCore/vtkSmartPyObject.cxx ---- ParaView-4.2.0_SRC/VTK/Wrapping/PythonCore/vtkSmartPyObject.cxx 2014-09-23 18:47:11.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/VTK/Wrapping/PythonCore/vtkSmartPyObject.cxx 2014-12-19 15:39:41.000000000 +0300 -@@ -30,37 +30,52 @@ - vtkSmartPyObject::vtkSmartPyObject(const vtkSmartPyObject &other) : - Object(other.Object) - { -+ VTK_PY_GIL_ENSURE - Py_XINCREF(this->Object); -+ VTK_PY_GIL_RELEASE - } - - //-------------------------------------------------------------------- - vtkSmartPyObject::~vtkSmartPyObject() - { -- Py_XDECREF(this->Object); -+ if (Py_IsInitialized()) -+ { -+ VTK_PY_GIL_ENSURE -+ Py_XDECREF(this->Object); -+ VTK_PY_GIL_RELEASE -+ } -+ else -+ Py_XDECREF(this->Object); - } - - //-------------------------------------------------------------------- - vtkSmartPyObject &vtkSmartPyObject::operator=(const vtkSmartPyObject &other) - { -+ VTK_PY_GIL_ENSURE - Py_XDECREF(this->Object); - this->Object = other.Object; - Py_XINCREF(this->Object); -+ VTK_PY_GIL_RELEASE - return *this; - } - - //-------------------------------------------------------------------- - vtkSmartPyObject &vtkSmartPyObject::operator=(PyObject *obj) - { -+ VTK_PY_GIL_ENSURE - Py_XDECREF(this->Object); - this->Object = obj; - Py_XINCREF(this->Object); -+ VTK_PY_GIL_RELEASE - return *this; - } - - //-------------------------------------------------------------------- - void vtkSmartPyObject::TakeReference(PyObject *obj) - { -+ VTK_PY_GIL_ENSURE - Py_XDECREF(this->Object); -+ VTK_PY_GIL_RELEASE - this->Object = obj; - } - -@@ -99,6 +114,8 @@ - //-------------------------------------------------------------------- - PyObject *vtkSmartPyObject::GetAndIncreaseReferenceCount() - { -+ VTK_PY_GIL_ENSURE - Py_XINCREF(this->Object); -+ VTK_PY_GIL_RELEASE - return this->Object; - } -diff -Naur --exclude=CVS --exclude=.git ParaView-4.2.0_SRC/Wrapping/Python/paraview/servermanager.py ParaView-4.2.0_SRC.new/Wrapping/Python/paraview/servermanager.py ---- ParaView-4.2.0_SRC/Wrapping/Python/paraview/servermanager.py 2014-09-23 18:46:44.000000000 +0400 -+++ ParaView-4.2.0_SRC.new/Wrapping/Python/paraview/servermanager.py 2014-12-19 15:39:41.000000000 +0300 -@@ -1092,7 +1092,7 @@ - property = self.SMProperty - nElems = property.GetNumberOfElements() - if nElems%2 != 0: -- raise ValueError, "The SMProperty with XML label '%s' has a size that is not a multiple of 2." % property.GetXMLLabel() -+ nElems -= 1 - self.__arrays = [] - for i in range(0, nElems, 2): - if self.GetElement(i+1) != '0': diff --git a/ffmpeg-3.patch b/ffmpeg3.patch index 2ffdc6d013b6..b5a2cb940141 100644 --- a/ffmpeg-3.patch +++ b/ffmpeg3.patch @@ -1,7 +1,7 @@ -diff -Naur ParaView-v4.2.0-source.orig/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx ParaView-v4.2.0-source/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx ---- ParaView-v4.2.0-source.orig/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx 2016-05-13 11:21:34.322631568 +0200 -+++ ParaView-v4.2.0-source/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx 2016-05-13 15:45:28.098994000 +0200 -@@ -189,11 +189,11 @@ +diff -Naur ParaView-5.0.1p1.orig/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx ParaView-5.0.1p1/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx +--- ParaView-5.0.1p1.orig/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx 2016-11-19 23:17:56.596094663 +0100 ++++ ParaView-5.0.1p1/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx 2016-11-19 23:18:17.099178065 +0100 +@@ -191,11 +191,11 @@ c->height = this->Dim[1]; if (this->Writer->GetCompression()) { @@ -15,7 +15,7 @@ diff -Naur ParaView-v4.2.0-source.orig/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx ParaVie } //to do playback at actual recorded rate, this will need more work see also below -@@ -272,13 +272,13 @@ +@@ -274,13 +274,13 @@ #endif //for the output of the writer's input... @@ -28,10 +28,10 @@ diff -Naur ParaView-v4.2.0-source.orig/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx ParaVie } - int RGBsize = avpicture_get_size(PIX_FMT_RGB24, c->width, c->height); + int RGBsize = avpicture_get_size(AV_PIX_FMT_RGB24, c->width, c->height); - unsigned char *rgb = new unsigned char[RGBsize]; + unsigned char *rgb = (unsigned char *)av_malloc(sizeof(unsigned char) * RGBsize); if (!rgb) { -@@ -286,10 +286,10 @@ +@@ -288,10 +288,10 @@ return 0; } //The rgb buffer should get deleted when this->rgbInput is. @@ -44,7 +44,7 @@ diff -Naur ParaView-v4.2.0-source.orig/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx ParaVie if (!this->yuvOutput) { vtkGenericWarningMacro (<< "Could not make yuvOutput avframe." ); -@@ -347,12 +347,12 @@ +@@ -349,12 +349,12 @@ //convert that to YUV for input to the codec #ifdef VTK_FFMPEG_HAS_IMG_CONVERT img_convert((AVPicture *)this->yuvOutput, cc->pix_fmt, diff --git a/gcc49.patch b/gcc49.patch deleted file mode 100644 index 2ed74f0282c9..000000000000 --- a/gcc49.patch +++ /dev/null @@ -1,122 +0,0 @@ ---- a/VTK/Filters/ParallelMPI/vtkDistributedDataFilter.cxx 2014-09-23 16:47:10.000000000 +0200 -+++ b/VTK/Filters/ParallelMPI/vtkDistributedDataFilter.cxx 2014-12-22 10:31:13.575228267 +0100 -@@ -1091,7 +1091,10 @@ - vtkIdType cellsPerNode = numTotalCells / nprocs; - - vtkIdList **sendCells = new vtkIdList * [ nprocs ]; -- memset(sendCells, 0, sizeof(vtkIdList *) * nprocs); -+ -+ if (sizeof(vtkIdList *) * nprocs > 0) { -+ memset(sendCells, 0, sizeof(vtkIdList *) * nprocs); -+ } - - if (numConsumers == nprocs - 1) - { -@@ -1582,7 +1585,9 @@ - // Exchange int arrays - - float **recvArrays = new float * [nprocs]; -- memset(recvArrays, 0, sizeof(float *) * nprocs); -+ if (sizeof(float *) * nprocs > 0) { -+ memset(recvArrays, 0, sizeof(float *) * nprocs); -+ } - - if (sendSize[me] > 0) // sent myself an array - { -@@ -1703,7 +1708,9 @@ - // Exchange int arrays - - vtkIdType **recvArrays = new vtkIdType * [nprocs]; -- memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs); -+ if (sizeof(vtkIdType *) * nprocs > 0) { -+ memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs); -+ } - - if (sendSize[me] > 0) // sent myself an array - { -@@ -2807,7 +2814,9 @@ - - unsigned char *vals = new unsigned char [npoints]; - -- memset(vals, val, npoints); -+ if (npoints > 0) { -+ memset(vals, val, npoints); -+ } - - vtkUnsignedCharArray *Array = vtkUnsignedCharArray::New(); - Array->SetName(arrayName); -@@ -2827,7 +2836,9 @@ - - unsigned char *vals = new unsigned char [ncells]; - -- memset(vals, val, ncells); -+ if (ncells > 0) { -+ memset(vals, val, ncells); -+ } - - vtkUnsignedCharArray *Array = vtkUnsignedCharArray::New(); - Array->SetName(arrayName); -@@ -3026,7 +3037,9 @@ - vtkIdType nGridPoints = grid->GetNumberOfPoints(); - - vtkIdType *numPointsOutside = new vtkIdType [nprocs]; -- memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs); -+ if (sizeof(vtkIdType) * nprocs > 0) { -+ memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs); -+ } - - vtkIdTypeArray *globalIds = vtkIdTypeArray::New(); - globalIds->SetNumberOfValues(nGridPoints); -@@ -3108,10 +3121,16 @@ - // global ID back? - - vtkFloatArray **ptarrayOut = new vtkFloatArray * [nprocs]; -- memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs); -+ -+ if (sizeof(vtkFloatArray *) * nprocs > 0) { -+ memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs); -+ } - - vtkIdTypeArray **localIds = new vtkIdTypeArray * [nprocs]; -- memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ -+ if (sizeof(vtkIdTypeArray *) * nprocs > 0) { -+ memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ } - - vtkIdType *next = new vtkIdType [nprocs]; - vtkIdType *next3 = new vtkIdType [nprocs]; -@@ -3286,7 +3305,9 @@ - { - // There are no cells in my assigned region - -- memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ if (sizeof(vtkIdTypeArray *) * nprocs > 0) { -+ memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ } - - return gids; - } -@@ -3491,7 +3512,10 @@ - std::multimap<int, int>::iterator mapIt; - - vtkIdTypeArray **processList = new vtkIdTypeArray * [nprocs]; -- memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs); -+ -+ if (sizeof (vtkIdTypeArray *) * nprocs > 0) { -+ memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs); -+ } - - for (int i=0; i<nprocs; i++) - { -@@ -3581,7 +3605,9 @@ - vtkIdType numPoints = grid->GetNumberOfPoints(); - - vtkIdTypeArray **ghostPtIds = new vtkIdTypeArray * [nprocs]; -- memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ if (sizeof(vtkIdTypeArray *) * nprocs) { -+ memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ } - - if (numPoints < 1) - { diff --git a/gcc6.patch b/gcc6.patch deleted file mode 100644 index 4a686fda930a..000000000000 --- a/gcc6.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -Naur ParaView-v4.2.0-source.orig/Plugins/PointSprite/Qvis/VolumeAttributes.cpp ParaView-v4.2.0-source/Plugins/PointSprite/Qvis/VolumeAttributes.cpp ---- ParaView-v4.2.0-source.orig/Plugins/PointSprite/Qvis/VolumeAttributes.cpp 2016-05-13 11:21:34.149298238 +0200 -+++ ParaView-v4.2.0-source/Plugins/PointSprite/Qvis/VolumeAttributes.cpp 2016-05-13 19:24:03.332076000 +0200 -@@ -39,6 +39,7 @@ - #include <DataNode.h> - #include <ColorControlPoint.h> - #include <GaussianControlPoint.h> -+#include <cmath> - - namespace pointsprite { - // -@@ -1825,7 +1826,6 @@ - // Made the method const. - // - // **************************************************************************** --#include <math.h> - void - VolumeAttributes::GetGaussianOpacities(unsigned char *alphas) const - { diff --git a/surface_lic.png b/surface_lic.png Binary files differdeleted file mode 100644 index 7306667e27b6..000000000000 --- a/surface_lic.png +++ /dev/null diff --git a/uint.patch b/uint.patch deleted file mode 100644 index 2a66eea6e4f9..000000000000 --- a/uint.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/VTK/Rendering/FreeType/vtkFreeTypeTools.cxx 2014-09-23 16:47:11.000000000 +0200 -+++ b/VTK/Rendering/FreeType/vtkFreeTypeTools.cxx 2014-12-22 11:04:14.003492645 +0100 -@@ -1183,7 +1183,7 @@ - if (bitmap) - { - metaData.ascent = std::max(bitmapGlyph->top - 1, metaData.ascent); -- metaData.descent = std::min(-(bitmap->rows - (bitmapGlyph->top - 1)), -+ metaData.descent = std::min(-int((bitmap->rows - (bitmapGlyph->top - 1))), - metaData.descent); - } - ++heightString; -@@ -1950,8 +1950,8 @@ - if (bitmap) - { - bbox[0] = std::min(bbox[0], pen[0] + bitmapGlyph->left); -- bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + bitmap->width); -- bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - bitmap->rows); -+ bbox[1] = std::max(bbox[1], int(pen[0] + bitmapGlyph->left + bitmap->width)); -+ bbox[2] = std::min(bbox[2], int(pen[1] + bitmapGlyph->top - 1 - bitmap->rows)); - bbox[3] = std::max(bbox[3], pen[1] + bitmapGlyph->top - 1); - } - else |