[paraview] 01/02: Use external vtk to build paraview

Christophe Trophime trophime-guest at alioth.debian.org
Wed Oct 30 10:17:00 UTC 2013


This is an automated email from the git hooks/post-receive script.

trophime-guest pushed a commit to branch use_external_vtk
in repository paraview.

commit 708d2d06d5110f9b52eb9ecc8cd0f92067bfa107
Author: Christophe Trophime <christrophime at googlemail.com>
Date:   Tue Oct 29 16:23:57 2013 +0100

    Use external vtk to build paraview
---
 debian/ParaViewConfig.cmake.in           |  105 +++++
 debian/README.paraviewweb                |   15 +
 debian/changelog                         |    3 +-
 debian/control                           |   68 ++-
 debian/paraview-dev.install              |   31 +-
 debian/paraview-dev.lintian-overrides    |    2 +-
 debian/paraview-doc.docs                 |    3 +-
 debian/paraview-doc.install              |    1 +
 debian/paraview-python.install           |    2 +-
 debian/paraview-python.links             |  125 +-----
 debian/paraview-python.lintian-overrides |    2 +-
 debian/paraview-python.pyinstall         |    7 +-
 debian/paraview.install                  |   30 +-
 debian/paraview.lintian-overrides        |    9 +-
 debian/paraviewweb.docs                  |    1 +
 debian/paraviewweb.install               |   19 +
 debian/patches/BuildAdaptors.patch       |  104 +++++
 debian/patches/docs.patch                |   40 ++
 debian/patches/paraviewconfig.patch      |   95 ++++
 debian/patches/series                    |    5 +
 debian/patches/wrapping_java.patch       |   15 +
 debian/patches/wrapping_python.patch     |  724 ++++++++++++++++++++++++++++++
 debian/rules                             |  132 ++++--
 23 files changed, 1345 insertions(+), 193 deletions(-)

diff --git a/debian/ParaViewConfig.cmake.in b/debian/ParaViewConfig.cmake.in
new file mode 100644
index 0000000..5f7a5bc
--- /dev/null
+++ b/debian/ParaViewConfig.cmake.in
@@ -0,0 +1,105 @@
+#-----------------------------------------------------------------------------
+#
+# ParaViewConfig.cmake - ParaView CMake configuration file for external projects.
+#
+# This file is configured by ParaView and used by the UseParaView.cmake module
+# to load ParaView's settings for an external project.
+set (__pv_install_tree @PARAVIEW_CONFIG_INSTALLED@)
+if (__pv_install_tree)
+  get_filename_component(location "${CMAKE_CURRENT_LIST_FILE}" PATH)
+  if (PARAVIEW_USING_EXTERNAL_VTK)
+    find_package(VTK REQUIRED)
+    message(STATUS "Using External VTK from \"${VTK_DIR}\"")
+    set (VTK_CONFIG_FILE "${VTK_DIR}/VTKConfig.cmake")
+
+    # Update CMAKE_MODULE_PATH to include VTK's cmake files.
+    set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
+                           ${VTK_CMAKE_DIR}
+                           ${VTK_MODULES_DIR})
+  else()
+    set (VTK_CONFIG_FILE "${location}/VTKConfig.cmake")
+  endif ()
+  set (ParaView_CMAKE_DIR "${location}")
+  set (PARAVIEW_CONFIG_TARGETS_FILE "${location}/ParaViewTargets.cmake")
+  if (PARAVIEW_USING_EXTERNAL_VTK)
+    # Update CMAKE_MODULE_PATH to include PARAVIEW's cmake files.
+    set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
+                           ${PARAVIEW_CMAKE_DIR}
+			   ${PARAVIEW_MODULES_DIR})
+  endif ()
+else()
+  # The ParaView is in the build-location.
+  if (PARAVIEW_USING_EXTERNAL_VTK)
+    find_package(VTK REQUIRED)
+    message(STATUS "Using External VTK from \"${VTK_DIR}\"")
+    set (VTK_CONFIG_FILE "${VTK_DIR}/VTKConfig.cmake")
+    #
+    # is this needed?
+    #set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
+    #                      "@ParaView_BINARY_DIR@/lib/cmake/paraview-4.0/Modules") 
+  else()
+    set (VTK_CONFIG_FILE "@ParaView_BINARY_DIR@/VTK/VTKConfig.cmake")
+  endif ()
+  set (ParaView_CMAKE_DIR "@ParaView_CMAKE_DIR@")
+  set (PARAVIEW_CONFIG_TARGETS_FILE "@ParaView_BINARY_DIR@/ParaViewTargets.cmake")
+endif()
+
+#------------------------------------------------------------------------------
+# Version information for ParaView
+SET(PARAVIEW_VERSION_MAJOR "@PARAVIEW_VERSION_MAJOR@")
+SET(PARAVIEW_VERSION_MINOR "@PARAVIEW_VERSION_MINOR@")
+SET(PARAVIEW_VERSION_PATCH "@PARAVIEW_VERSION_PATCH@")
+SET(PARAVIEW_VERSION_FULL  "@PARAVIEW_VERSION_FULL@")
+
+# The location of the UseParaView.cmake file
+# FIXME: I don't like this mixing of case, we need to fix that to be consistent.
+set (ParaView_USE_FILE "${ParaView_CMAKE_DIR}/UseParaView.cmake")
+
+set (PARAVIEW_USE_FILE ${ParaView_USE_FILE})
+set (PARAVIEW_CMAKE_DIR ${ParaView_CMAKE_DIR})
+message(STATUS "PARAVIEW_CMAKE_DIR= \"${ParaView_CMAKE_DIR}\"")
+
+# Import ParaView targets.
+if(NOT TARGET vtkPVCommon)
+  include("${PARAVIEW_CONFIG_TARGETS_FILE}")
+endif()
+
+# load VTK config. This will bring in information about all modules (including
+# ParaView's modules).
+set (paraview_build_qt_gui "@PARAVIEW_BUILD_QT_GUI@")
+if (paraview_build_qt_gui)
+  set (VTK_FIND_COMPONENTS pqApplicationComponents)
+else()
+  set (VTK_FIND_COMPONENTS vtkPVServerManagerApplication)
+endif()
+
+set (VTK_FIND_COMPONENTS ${VTK_FIND_COMPONENTS} ${ParaView_FIND_COMPONENTS})
+include("${VTK_CONFIG_FILE}")
+
+if (__pv_install_tree)
+  set (PARAVIEW_WWW_DIR "${VTK_INSTALL_PREFIX}/lib/paraview- at PARAVIEW_VERSION_MAJOR@. at PARAVIEW_VERSION_MINOR@/www")
+else()
+  list(APPEND VTK_INCLUDE_DIRS "@ParaView_BINARY_DIR@")
+  set (PARAVIEW_WWW_DIR "@ParaView_BINARY_DIR@/www")
+endif()
+
+# unless using external vtk (when we start supporting it, that is)
+# PARAVIEW_INCLUDE_DIRS is same as VTK_INCLUDE_DIRS, but to make it easier for
+# ParaView users.
+set (PARAVIEW_INCLUDE_DIRS ${VTK_INCLUDE_DIRS})
+
+#------------------------------------------------------------------------------
+# ParaView global configuration options.
+
+set (PARAVIEW_BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@")
+set (PARAVIEW_BUILD_QT_GUI "@PARAVIEW_BUILD_QT_GUI@")
+set (PARAVIEW_USE_MPI "@PARAVIEW_USE_MPI@")
+set (PARAVIEW_ENABLE_PYTHON "@PARAVIEW_ENABLE_PYTHON@")
+set (PARAVIEW_ENABLE_QT_SUPPORT "@PARAVIEW_ENABLE_QT_SUPPORT@")
+set (PARAVIEW_QT_QMAKE_EXECUTABLE "@QT_QMAKE_EXECUTABLE@")
+set (PARAVIEW_USE_VISITBRIDGE "@PARAVIEW_USE_VISITBRIDGE@")
+set (PARAVIEW_ENABLE_COPROCESSING "@PARAVIEW_ENABLE_COPROCESSING@")
+set (PARAVIEW_ENABLE_WEB "@PARAVIEW_ENABLE_WEB@")
+
+# cleanup
+unset(__pv_install_tree)
diff --git a/debian/README.paraviewweb b/debian/README.paraviewweb
new file mode 100644
index 0000000..319cc31
--- /dev/null
+++ b/debian/README.paraviewweb
@@ -0,0 +1,15 @@
+Starting the web-server
+
+$PARAVIEW_ROOT/bin/pvpython \
+ lib/paraview-4.0/site-packages/paraview/pipeline_manager.py \
+ --content www --port 8080 --data-dir $PARAVIEW_DATA 
+
+
+Starting the client
+
+Once the server has started, simply point your web-browser 
+to http://localhost:8080/apps/WebVisualizer/
+
+For more details see also
+http://www.paraview.org/Wiki/ParaViewWeb
+http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/index.html
diff --git a/debian/changelog b/debian/changelog
index 3fd6d25..eee559c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,7 @@
 paraview (4.0.1-1.1) unstable; urgency=low
 
   * Non-maintainer upload.
-  * debian/paraview.install:
-    - add usr/bin/vtkProcessShader
+  * Build against libvtk6-dev
 
  -- Christophe Trophime <christophe.trophime at lncmi.cnrs.fr>  Sun, 06 Oct 2013 16:57:40 +0200
 
diff --git a/debian/control b/debian/control
index aba8e54..ebfac82 100644
--- a/debian/control
+++ b/debian/control
@@ -4,18 +4,26 @@ Priority: extra
 Maintainer: Debian Science Team <debian-science-maintainers at lists.alioth.debian.org>
 Uploaders: Christophe Prud'homme <prudhomm at debian.org>, 
  Anton Gladky <gladk at debian.org>
-Build-Depends: debhelper (>= 9), cmake (>= 2.6.3), 
- libqt4-dev (>= 4.3.3-2), libsqlite3-dev,
- qt4-dev-tools, libboost-all-dev, 
- libavformat-dev (>= 4:0.7.1),
- libavutil-dev, libavcodec-dev, libswscale-dev, python-dev, python-support, 
- libglu1-mesa-dev, libxt-dev, python-all, 
+Build-Depends: debhelper (>= 9), cmake (>= 2.6.3), gfortran,
+ mpi-default-dev, mpi-default-bin,
+ python-dev, dh-python, python-all, 
  python-all-dev (>= 2.7), python-all-dev (<< 2.8),
- libxext-dev, doxygen, graphviz, gnuplot, libtiff-dev, libpng-dev, libjpeg-dev,
- libxml2-dev, libexpat-dev,
- zlib1g-dev, libfreetype6-dev, libmysqlclient-dev, libpq-dev, libtheora-dev, 
- libogg-dev, mpi-default-dev, mpi-default-bin, libhdf5-dev (>= 1.8.8), hdf5-tools,
- libgl2ps-dev, libqtwebkit-dev (>=2.2.1), libeigen3-dev, libjsoncpp-dev
+ python-matplotlib, python-sphinx,
+ default-jdk, javahelper,
+ tcl8.6-dev,
+ libvtk6-dev, tcl-vtk, python-vtk, libvtk-java, libvtk6-qt4-dev,
+ zlib1g-dev, libfreetype6-dev,
+ libhdf5-mpi-dev (>= 1.8.8), hdf5-tools,
+ libeigen3-dev, libboost-all-dev,
+ libqt4-dev (>= 4.3.3-2), libqt4-opengl-dev (>= 4.3.3-2), libsqlite3-dev, qt4-dev-tools, libqtwebkit-dev (>=2.2.1),
+ freeglut3-dev, libxmu-dev, libxi-dev,
+ xvfb, xauth,
+ libjsoncpp-dev,
+ libavformat-dev (>= 4:0.7.1), libavutil-dev, libavcodec-dev, libvorbis-dev, libswscale-dev, libtheora-dev, libgsm1-dev, libdts-dev,
+ r-base, r-base-core, r-base-dev
+# libphonon-dev, qt4-dev-tools, qt4-qmake, libqt4-opengl-dev, libqtwebkit-dev (>=2.2.1), python-qt4-dev,
+Build-Depends-Indep: libdigest-md5-perl, doxygen-latex, texlive-binaries, texlive-math-extra,
+ graphviz, gnuplot-nox, ghostscript
 Standards-Version: 3.9.4
 Homepage: http://www.paraview.org/
 Vcs-Git: git://git.debian.org/git/debian-science/packages/paraview.git
@@ -23,7 +31,8 @@ Vcs-Browser: http://git.debian.org/?p=debian-science/packages/paraview.git
 
 Package: paraview
 Architecture: any
-Depends: tcl8.5 | tclsh, ${shlibs:Depends}, ${misc:Depends}
+Depends: tcl8.6 , ${shlibs:Depends}, ${misc:Depends},
+ python-matplotlib
 Suggests: hdf5-tools, h5utils
 Recommends: mpi-default-bin, paraview-python, paraview-doc
 Description: Parallel Visualization Application
@@ -46,7 +55,9 @@ Description: Parallel Visualization Application
 Package: paraview-dev
 Architecture: any
 Section: libdevel
-Depends: qt4-dev-tools, ${shlibs:Depends}, ${misc:Depends}, paraview (= ${binary:Version}), libeigen3-dev
+Depends: qt4-dev-tools, ${shlibs:Depends}, ${misc:Depends}, 
+ paraview (= ${binary:Version}), libeigen3-dev,
+ libgl2ps-dev, libboost1.54-dev
 Recommends: qt4-dev-tools (>= 4.3.3-2)
 Description: Parallel Visualization Application. Development header files
  ParaView is an open-source, multi-platform application designed to
@@ -91,7 +102,7 @@ Package: paraview-python
 Architecture: any
 Section: python
 Depends: paraview (= ${binary:Version}), ${python:Depends}, ${misc:Depends}, 
- ${shlibs:Depends}, python (>= 2.7), python (<<2.8), python-vtk
+ ${shlibs:Depends}, python (>= 2.7), python (<<2.8)
 Provides: ${python:Provides}
 Description: Parallel Visualization Application. python-support
  ParaView is an open-source, multi-platform application designed to
@@ -109,3 +120,32 @@ Description: Parallel Visualization Application. python-support
  supercomputers. Under the hood, ParaView uses the Visualization
  Toolkit as the data processing and rendering engine and has a user
  interface written using Qt. Enables python support.
+
+Package: paraviewweb
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, 
+ python-twisted, python-autobahn, python-mod-pywebsocket,
+ javascript-common 
+Suggests: hdf5-tools, h5utils
+Recommends: mpi-default-bin, paraview-python, paraview-doc
+Description: Parallel Visualization Webapp
+ ParaView is an open-source, multi-platform application designed to
+ visualize data sets of size varying from small to very large. The
+ goals of the ParaView project include the following:
+ .
+     * Develop an open-source, multi-platform visualization application.
+     * Support distributed computation models to process large data sets.
+     * Create an open, flexible, and intuitive user interface.
+     * Develop an extensible architecture based on open standards.
+ .
+ ParaView runs on distributed and shared memory parallel as well as
+ single processor systems and has been successfully tested on Windows,
+ Mac OS X, Linux and various Unix workstations, clusters and
+ supercomputers. Under the hood, ParaView uses the Visualization
+ Toolkit as the data processing and rendering engine and has a user
+ interface written using Qt.
+ .
+ ParaViewWeb is a collection of components that enables the use 
+ of ParaView's visualization and data analysis capabilities 
+ within Web applications.
+ 
diff --git a/debian/paraview-dev.install b/debian/paraview-dev.install
index e2b1f91..5621bac 100644
--- a/debian/paraview-dev.install
+++ b/debian/paraview-dev.install
@@ -1,6 +1,27 @@
-usr/include
-usr/lib/cmake/paraview/*.cmake
-usr/lib/cmake/paraview/*.in
-usr/lib/cmake/paraview/*.xsl
-usr/lib/cmake/paraview/*.cmake
+usr/include/paraview-4.0
+usr/lib/cmake/paraview-4.0/*.cmake
+usr/lib/cmake/paraview-4.0/Modules/*.cmake usr/lib/vtk-6.0/Modules
+usr/lib/cmake/paraview-4.0/Modules/*.txt usr/lib/vtk-6.0/Modules
+usr/lib/cmake/paraview-4.0/*.in
+usr/lib/cmake/paraview-4.0/*.xsl
+usr/lib/cmake/paraview-4.0/ParaViewValgrindSuppressions.supp
+usr/lib/cmake/paraview-4.0/pre-commit
+usr/lib/paraview-4.0/*.a
+usr/lib/paraview-4.0/*.so
+
+
+usr/lib/cmake/paraview-4.0/Modules/*_HINTS
+usr/lib/cmake/paraview-4.0/VisItLib/*
+usr/lib/paraview-4.0/*.cmake	usr/lib/cmake/paraview-4.0
+
+usr/lib/paraview-4.0/smTestDriver
+
+
 usr/bin/vtkWrapClientServer
+usr/bin/vtkkwProcessXML
+
+#is this needed??
+#usr/lib/CMake/QtTestingConfig.cmake usr/lib/vtk-6.0/Modules
+
+ThirdParty/QtTesting/vtkqttesting/*.h usr/include/paraview-4.0
+Build/ThirdParty/QtTesting/vtkqttesting/QtTestingConfigure.h usr/include/paraview-4.0
diff --git a/debian/paraview-dev.lintian-overrides b/debian/paraview-dev.lintian-overrides
index 5a62066..6e13325 100644
--- a/debian/paraview-dev.lintian-overrides
+++ b/debian/paraview-dev.lintian-overrides
@@ -1 +1 @@
-paraview-dev: binary-or-shlib-defines-rpath 
+#paraview-dev: binary-or-shlib-defines-rpath 
diff --git a/debian/paraview-doc.docs b/debian/paraview-doc.docs
index 07b0b2a..ebb6e70 100644
--- a/debian/paraview-doc.docs
+++ b/debian/paraview-doc.docs
@@ -1,3 +1,2 @@
-debian/tmp/usr/share/doc/paraview/paraview.qch
-debian/tmp/usr/share/doc/paraview/doxygen
 Applications/ParaView/Documentation/Book
+Build/Utilities/Doxygen/doc/html
diff --git a/debian/paraview-doc.install b/debian/paraview-doc.install
new file mode 100644
index 0000000..1fcfd9e
--- /dev/null
+++ b/debian/paraview-doc.install
@@ -0,0 +1 @@
+usr/share/doc/paraview-4.0/paraview.qch
diff --git a/debian/paraview-python.install b/debian/paraview-python.install
index cc9baa7..5a18df4 100644
--- a/debian/paraview-python.install
+++ b/debian/paraview-python.install
@@ -1,2 +1,2 @@
 usr/bin/pvpython
-usr/lib/paraview/pvpython
+usr/lib/paraview-4.0/pvpython
diff --git a/debian/paraview-python.links b/debian/paraview-python.links
index 104bc0f..671dceb 100644
--- a/debian/paraview-python.links
+++ b/debian/paraview-python.links
@@ -1,103 +1,22 @@
-usr/lib/paraview/libvtkRenderingAnnotationPython27D.so usr/lib/python2.7/dist-packages/vtkRenderingAnnotationPython.so
-usr/lib/paraview/libvtkCommonComputationalGeometryPython27D.so usr/lib/python2.7/dist-packages/vtkCommonComputationalGeometryPython.so
-usr/lib/paraview/libvtkPVServerManagerDefaultPython27D.so usr/lib/python2.7/dist-packages/vtkPVServerManagerDefaultPython.so
-usr/lib/paraview/libvtkPVServerManagerRenderingPython27D.so usr/lib/python2.7/dist-packages/vtkPVServerManagerRenderingPython.so
-usr/lib/paraview/libvtkInteractionStylePython27D.so usr/lib/python2.7/dist-packages/vtkInteractionStylePython.so
-usr/lib/paraview/libvtkFiltersTexturePython27D.so usr/lib/python2.7/dist-packages/vtkFiltersTexturePython.so
-usr/lib/paraview/libvtkIOMPIImagePython27D.so usr/lib/python2.7/dist-packages/vtkIOMPIImagePython.so
-usr/lib/paraview/libvtkIONetCDFPython27D.so usr/lib/python2.7/dist-packages/vtkIONetCDFPython.so
-usr/lib/paraview/libvtkIOAMRPython27D.so usr/lib/python2.7/dist-packages/vtkIOAMRPython.so
-usr/lib/paraview/libvtkParallelCorePython27D.so usr/lib/python2.7/dist-packages/vtkParallelCorePython.so
-usr/lib/paraview/libvtkIOLegacyPython27D.so usr/lib/python2.7/dist-packages/vtkIOLegacyPython.so
-usr/lib/paraview/libvtkFiltersParallelFlowPathsPython27D.so usr/lib/python2.7/dist-packages/vtkFiltersParallelFlowPathsPython.so
-usr/lib/paraview/libvtkRenderingFreeTypePython27D.so usr/lib/python2.7/dist-packages/vtkRenderingFreeTypePython.so
-usr/lib/paraview/libvtkIOImportPython27D.so usr/lib/python2.7/dist-packages/vtkIOImportPython.so
-usr/lib/paraview/libvtkFiltersAMRPython27D.so usr/lib/python2.7/dist-packages/vtkFiltersAMRPython.so
-usr/lib/paraview/libvtkPVServerImplementationCorePython27D.so usr/lib/python2.7/dist-packages/vtkPVServerImplementationCorePython.so
-usr/lib/paraview/libvtkIOXMLParserPython27D.so usr/lib/python2.7/dist-packages/vtkIOXMLParserPython.so
-usr/lib/paraview/libvtkFiltersParallelMPIPython27D.so usr/lib/python2.7/dist-packages/vtkFiltersParallelMPIPython.so
-usr/lib/paraview/libvtkFiltersHyperTreePython27D.so usr/lib/python2.7/dist-packages/vtkFiltersHyperTreePython.so
-usr/lib/paraview/libvtkFiltersGeometryPython27D.so usr/lib/python2.7/dist-packages/vtkFiltersGeometryPython.so
-usr/lib/paraview/libvtkFiltersExtractionPython27D.so usr/lib/python2.7/dist-packages/vtkFiltersExtractionPython.so
-usr/lib/paraview/libvtkRenderingLabelPython27D.so usr/lib/python2.7/dist-packages/vtkRenderingLabelPython.so
-usr/lib/paraview/libvtkCommonCorePython27D.so usr/lib/python2.7/dist-packages/vtkCommonCorePython.so
-usr/lib/paraview/libvtkPVServerImplementationRenderingPython27D.so usr/lib/python2.7/dist-packages/vtkPVServerImplementationRenderingPython.so
-usr/lib/paraview/libvtkIOExodusPython27D.so usr/lib/python2.7/dist-packages/vtkIOExodusPython.so
-usr/lib/paraview/libvtkIOLSDynaPython27D.so usr/lib/python2.7/dist-packages/vtkIOLSDynaPython.so
-usr/lib/paraview/libvtkPVVTKExtensionsRenderingPython27D.so usr/lib/python2.7/dist-packages/vtkPVVTKExtensionsRenderingPython.so
-usr/lib/paraview/libvtkRenderingOpenGLPython27D.so usr/lib/python2.7/dist-packages/vtkRenderingOpenGLPython.so
-usr/lib/paraview/libvtkCommonSystemPython27D.so usr/lib/python2.7/dist-packages/vtkCommonSystemPython.so
-usr/lib/paraview/libvtkIOInfovisPython27D.so usr/lib/python2.7/dist-packages/vtkIOInfovisPython.so
-usr/lib/paraview/libvtkIOImagePython27D.so usr/lib/python2.7/dist-packages/vtkIOImagePython.so
-usr/lib/paraview/libvtkFiltersSourcesPython27D.so usr/lib/python2.7/dist-packages/vtkFiltersSourcesPython.so
-usr/lib/paraview/libvtkIOParallelNetCDFPython27D.so usr/lib/python2.7/dist-packages/vtkIOParallelNetCDFPython.so
-usr/lib/paraview/libvtkInteractionWidgetsPython27D.so usr/lib/python2.7/dist-packages/vtkInteractionWidgetsPython.so
-usr/lib/paraview/libvtkImagingCorePython27D.so usr/lib/python2.7/dist-packages/vtkImagingCorePython.so
-usr/lib/paraview/libvtkCommonColorPython27D.so usr/lib/python2.7/dist-packages/vtkCommonColorPython.so
-usr/lib/paraview/libvtkInteractionImagePython27D.so usr/lib/python2.7/dist-packages/vtkInteractionImagePython.so
-usr/lib/paraview/libvtkIOXdmf2Python27D.so usr/lib/python2.7/dist-packages/vtkIOXdmf2Python.so
-usr/lib/paraview/libvtkPVClientServerCoreRenderingPython27D.so usr/lib/python2.7/dist-packages/vtkPVClientServerCoreRenderingPython.so
-usr/lib/paraview/libvtkTestingRenderingPython27D.so usr/lib/python2.7/dist-packages/vtkTestingRenderingPython.so
-usr/lib/paraview/libvtkRenderingContext2DPython27D.so usr/lib/python2.7/dist-packages/vtkRenderingContext2DPython.so
-usr/lib/paraview/libvtkIOParallelPython27D.so usr/lib/python2.7/dist-packages/vtkIOParallelPython.so
-usr/lib/paraview/libvtkRenderingLODPython27D.so usr/lib/python2.7/dist-packages/vtkRenderingLODPython.so
-usr/lib/paraview/libvtkViewsCorePython27D.so usr/lib/python2.7/dist-packages/vtkViewsCorePython.so
-usr/lib/paraview/libvtkFiltersCorePython27D.so usr/lib/python2.7/dist-packages/vtkFiltersCorePython.so
-usr/lib/paraview/libvtkFiltersModelingPython27D.so usr/lib/python2.7/dist-packages/vtkFiltersModelingPython.so
-usr/lib/paraview/libvtkIOPLYPython27D.so usr/lib/python2.7/dist-packages/vtkIOPLYPython.so
-usr/lib/paraview/libvtkPVCommonPython27D.so usr/lib/python2.7/dist-packages/vtkPVCommonPython.so
-usr/lib/paraview/libvtkImagingFourierPython27D.so usr/lib/python2.7/dist-packages/vtkImagingFourierPython.so
-usr/lib/paraview/libvtkRenderingCorePython27D.so usr/lib/python2.7/dist-packages/vtkRenderingCorePython.so
-usr/lib/paraview/libvtkFiltersGeneralPython27D.so usr/lib/python2.7/dist-packages/vtkFiltersGeneralPython.so
-usr/lib/paraview/libvtkFiltersVerdictPython27D.so usr/lib/python2.7/dist-packages/vtkFiltersVerdictPython.so
-usr/lib/paraview/libvtkViewsContext2DPython27D.so usr/lib/python2.7/dist-packages/vtkViewsContext2DPython.so
-usr/lib/paraview/libvtkRenderingVolumeAMRPython27D.so usr/lib/python2.7/dist-packages/vtkRenderingVolumeAMRPython.so
-usr/lib/paraview/libvtkPVVTKExtensionsCorePython27D.so usr/lib/python2.7/dist-packages/vtkPVVTKExtensionsCorePython.so
-usr/lib/paraview/libvtkIOCorePython27D.so usr/lib/python2.7/dist-packages/vtkIOCorePython.so
-usr/lib/paraview/libvtkFiltersParallelImagingPython27D.so usr/lib/python2.7/dist-packages/vtkFiltersParallelImagingPython.so
-usr/lib/paraview/libvtkPVServerManagerApplicationPython27D.so usr/lib/python2.7/dist-packages/vtkPVServerManagerApplicationPython.so
-usr/lib/paraview/libvtkIOGeometryPython27D.so usr/lib/python2.7/dist-packages/vtkIOGeometryPython.so
-usr/lib/paraview/libvtkFiltersParallelStatisticsPython27D.so usr/lib/python2.7/dist-packages/vtkFiltersParallelStatisticsPython.so
-usr/lib/paraview/libvtkIOXMLPython27D.so usr/lib/python2.7/dist-packages/vtkIOXMLPython.so
-usr/lib/paraview/libvtkFiltersGenericPython27D.so usr/lib/python2.7/dist-packages/vtkFiltersGenericPython.so
-usr/lib/paraview/libvtkChartsCorePython27D.so usr/lib/python2.7/dist-packages/vtkChartsCorePython.so
-usr/lib/paraview/libvtkIOVPICPython27D.so usr/lib/python2.7/dist-packages/vtkIOVPICPython.so
-usr/lib/paraview/libvtkCommonTransformsPython27D.so usr/lib/python2.7/dist-packages/vtkCommonTransformsPython.so
-usr/lib/paraview/libvtkDomainsChemistryPython27D.so usr/lib/python2.7/dist-packages/vtkDomainsChemistryPython.so
-usr/lib/paraview/libvtkRenderingFreeTypeOpenGLPython27D.so usr/lib/python2.7/dist-packages/vtkRenderingFreeTypeOpenGLPython.so
-usr/lib/paraview/libvtkFiltersCosmoPython27D.so usr/lib/python2.7/dist-packages/vtkFiltersCosmoPython.so
-usr/lib/paraview/libvtkImagingSourcesPython27D.so usr/lib/python2.7/dist-packages/vtkImagingSourcesPython.so
-usr/lib/paraview/libvtkPVClientServerCoreCorePython27D.so usr/lib/python2.7/dist-packages/vtkPVClientServerCoreCorePython.so
-usr/lib/paraview/libvtkCommonMathPython27D.so usr/lib/python2.7/dist-packages/vtkCommonMathPython.so
-usr/lib/paraview/libvtkIOParallelExodusPython27D.so usr/lib/python2.7/dist-packages/vtkIOParallelExodusPython.so
-usr/lib/paraview/libvtkIOParallelLSDynaPython27D.so usr/lib/python2.7/dist-packages/vtkIOParallelLSDynaPython.so
-usr/lib/paraview/libvtkPVServerManagerCorePython27D.so usr/lib/python2.7/dist-packages/vtkPVServerManagerCorePython.so
-usr/lib/paraview/libvtkFiltersFlowPathsPython27D.so usr/lib/python2.7/dist-packages/vtkFiltersFlowPathsPython.so
-usr/lib/paraview/libvtkImagingHybridPython27D.so usr/lib/python2.7/dist-packages/vtkImagingHybridPython.so
-usr/lib/paraview/libvtkParallelMPIPython27D.so usr/lib/python2.7/dist-packages/vtkParallelMPIPython.so
-usr/lib/paraview/libvtkImagingColorPython27D.so usr/lib/python2.7/dist-packages/vtkImagingColorPython.so
-usr/lib/paraview/libvtkRenderingVolumeOpenGLPython27D.so usr/lib/python2.7/dist-packages/vtkRenderingVolumeOpenGLPython.so
-usr/lib/paraview/libvtkCommonMiscPython27D.so usr/lib/python2.7/dist-packages/vtkCommonMiscPython.so
-usr/lib/paraview/libvtkFiltersParallelPython27D.so usr/lib/python2.7/dist-packages/vtkFiltersParallelPython.so
-usr/lib/paraview/libvtkRenderingParallelPython27D.so usr/lib/python2.7/dist-packages/vtkRenderingParallelPython.so
-usr/lib/paraview/libvtkInfovisCorePython27D.so usr/lib/python2.7/dist-packages/vtkInfovisCorePython.so
-usr/lib/paraview/libvtkImagingGeneralPython27D.so usr/lib/python2.7/dist-packages/vtkImagingGeneralPython.so
-usr/lib/paraview/libvtkPVVTKExtensionsWebGLExporterPython27D.so usr/lib/python2.7/dist-packages/vtkPVVTKExtensionsWebGLExporterPython.so
-usr/lib/paraview/libvtkPVClientServerCoreDefaultPython27D.so usr/lib/python2.7/dist-packages/vtkPVClientServerCoreDefaultPython.so
-usr/lib/paraview/libvtkFiltersStatisticsPython27D.so usr/lib/python2.7/dist-packages/vtkFiltersStatisticsPython.so
-usr/lib/paraview/libvtkPVServerImplementationDefaultPython27D.so usr/lib/python2.7/dist-packages/vtkPVServerImplementationDefaultPython.so
-usr/lib/paraview/libvtkRenderingGL2PSPython27D.so usr/lib/python2.7/dist-packages/vtkRenderingGL2PSPython.so
-usr/lib/paraview/libvtkPVVTKExtensionsDefaultPython27D.so usr/lib/python2.7/dist-packages/vtkPVVTKExtensionsDefaultPython.so
-usr/lib/paraview/libvtkFiltersHybridPython27D.so usr/lib/python2.7/dist-packages/vtkFiltersHybridPython.so
-usr/lib/paraview/libvtkIOEnSightPython27D.so usr/lib/python2.7/dist-packages/vtkIOEnSightPython.so
-usr/lib/paraview/libvtkCommonExecutionModelPython27D.so usr/lib/python2.7/dist-packages/vtkCommonExecutionModelPython.so
-usr/lib/paraview/libvtkRenderingHybridOpenGLPython27D.so usr/lib/python2.7/dist-packages/vtkRenderingHybridOpenGLPython.so
-usr/lib/paraview/libvtkRenderingVolumePython27D.so usr/lib/python2.7/dist-packages/vtkRenderingVolumePython.so
-usr/lib/paraview/libvtkImagingMorphologicalPython27D.so usr/lib/python2.7/dist-packages/vtkImagingMorphologicalPython.so
-usr/lib/paraview/libvtkFiltersProgrammablePython27D.so usr/lib/python2.7/dist-packages/vtkFiltersProgrammablePython.so
-usr/lib/paraview/libvtkRenderingMatplotlibPython27D.so usr/lib/python2.7/dist-packages/vtkRenderingMatplotlibPython.so
-usr/lib/paraview/libvtkCommonDataModelPython27D.so usr/lib/python2.7/dist-packages/vtkCommonDataModelPython.so
-usr/lib/paraview/libvtkIOExportPython27D.so usr/lib/python2.7/dist-packages/vtkIOExportPython.so
-usr/lib/paraview/libvtkCoProcessorPython27D.so usr/lib/python2.7/dist-packages/vtkCoProcessorPython.so
-usr/lib/paraview/libvtkFiltersImagingPython27D.so usr/lib/python2.7/dist-packages/vtkFiltersImagingPython.so
-usr/lib/paraview/libvtkIOMoviePython27D.so usr/lib/python2.7/dist-packages/vtkIOMoviePython.so
+usr/lib/paraview-4.0/libvtkpqPython.so usr/lib/python2.7/dist-packages/paraview/vtkpqPython.so
+usr/lib/paraview-4.0/libvtkPVPythonCatalystJava.so usr/lib/python2.7/dist-packages/paraview/vtkPVPythonCatalystJava.so
+usr/lib/paraview-4.0/libvtkPVPythonCatalystPythonD.so usr/lib/python2.7/dist-packages/paraview/vtkPVPythonCatalystPythonD.so
+usr/lib/paraview-4.0/libvtkPVPythonCatalyst.so usr/lib/python2.7/dist-packages/paraview/vtkPVPythonCatalyst.so
+usr/lib/paraview-4.0/libvtkPVPythonCatalystTCL.so usr/lib/python2.7/dist-packages/paraview/vtkPVPythonCatalystTCL.so
+usr/lib/paraview-4.0/libvtkUtilitiesPythonInitializer.so usr/lib/python2.7/dist-packages/paraview/vtkUtilitiesPythonInitializer.so
+
+#usr/lib/paraview-4.0/libvtkPVClientServerCoreCorePython27D.so usr/lib/python2.7/dist-packages/vtkPVClientServerCoreCorePython.so
+#usr/lib/paraview-4.0/libvtkPVClientServerCoreDefaultPython27D.so usr/lib/python2.7/dist-packages/vtkPVClientServerCoreDefaultPython.so
+#usr/lib/paraview-4.0/libvtkPVClientServerCoreRenderingPython27D.so usr/lib/python2.7/dist-packages/vtkPVClientServerCoreRenderingPython.so
+#usr/lib/paraview-4.0/libvtkPVCommonPython27D.so usr/lib/python2.7/dist-packages/vtkPVCommonPython.so
+#usr/lib/paraview-4.0/libvtkPVServerImplementationCorePython27D.so usr/lib/python2.7/dist-packages/vtkPVServerImplementationCorePython.so
+#usr/lib/paraview-4.0/libvtkPVServerImplementationDefaultPython27D.so usr/lib/python2.7/dist-packages/vtkPVServerImplementationDefaultPython.so
+#usr/lib/paraview-4.0/libvtkPVServerImplementationRenderingPython27D.so usr/lib/python2.7/dist-packages/vtkPVServerImplementationRenderingPython.so
+#usr/lib/paraview-4.0/libvtkPVServerManagerApplicationPython27D.so usr/lib/python2.7/dist-packages/vtkPVServerManagerApplicationPython.so
+#usr/lib/paraview-4.0/libvtkPVServerManagerCorePython27D.so usr/lib/python2.7/dist-packages/vtkPVServerManagerCorePython.so
+#usr/lib/paraview-4.0/libvtkPVServerManagerDefaultPython27D.so usr/lib/python2.7/dist-packages/vtkPVServerManagerDefaultPython.so
+#usr/lib/paraview-4.0/libvtkPVServerManagerRenderingPython27D.so usr/lib/python2.7/dist-packages/vtkPVServerManagerRenderingPython.so
+#usr/lib/paraview-4.0/libvtkPVVTKExtensionsCorePython27D.so usr/lib/python2.7/dist-packages/vtkPVVTKExtensionsCorePython.so
+#usr/lib/paraview-4.0/libvtkPVVTKExtensionsDefaultPython27D.so usr/lib/python2.7/dist-packages/vtkPVVTKExtensionsDefaultPython.so
+#usr/lib/paraview-4.0/libvtkPVVTKExtensionsRenderingPython27D.so usr/lib/python2.7/dist-packages/vtkPVVTKExtensionsRenderingPython.so
+#usr/lib/paraview-4.0/libvtkPVVTKExtensionsWebGLExporterPython27D.so usr/lib/python2.7/dist-packages/vtkPVVTKExtensionsWebGLExporterPython.so
diff --git a/debian/paraview-python.lintian-overrides b/debian/paraview-python.lintian-overrides
index d7b4501..3378061 100644
--- a/debian/paraview-python.lintian-overrides
+++ b/debian/paraview-python.lintian-overrides
@@ -1,4 +1,4 @@
 # These embedded libraries, seems, have different versions than in repository.
 # The code is incompatible with repo-versions.
-paraview-python: binary-or-shlib-defines-rpath 
+#paraview-python: binary-or-shlib-defines-rpath 
 
diff --git a/debian/paraview-python.pyinstall b/debian/paraview-python.pyinstall
index 1640bd6..d3006bf 100644
--- a/debian/paraview-python.pyinstall
+++ b/debian/paraview-python.pyinstall
@@ -1,3 +1,4 @@
-debian/tmp/usr/lib/paraview/site-packages/paraview/*.py paraview
-debian/tmp/usr/lib/paraview/site-packages/paraview/demos/*.py paraview.demos
-debian/tmp/usr/lib/paraview/site-packages/paraview/vtk/*.py paraview.vtk
+debian/tmp/usr/lib/paraview-4.0/site-packages/paraview/*.py paraview
+debian/tmp/usr/lib/paraview-4.0/site-packages/paraview/ParaViewWebPython* paraview
+debian/tmp/usr/lib/paraview-4.0/site-packages/paraview/demos/*.py paraview.demos
+debian/tmp/usr/lib/paraview-4.0/site-packages/paraview/vtk/*.py paraview.vtk
diff --git a/debian/paraview.install b/debian/paraview.install
index 27e434f..44b05c8 100644
--- a/debian/paraview.install
+++ b/debian/paraview.install
@@ -1,19 +1,19 @@
 debian/*.xpm usr/share/pixmaps/
 debian/*.desktop usr/share/applications/
-usr/bin/paraview
-usr/lib/paraview/paraview
-usr/bin/pvbatch
-usr/lib/paraview/pvbatch
+usr/lib/paraview-4.0/paraview
+usr/lib/paraview-4.0/pvbatch
+usr/lib/paraview-4.0/pvdataserver
+usr/lib/paraview-4.0/pvrenderserver
+usr/lib/paraview-4.0/pvserver
+usr/lib/paraview-4.0/*.so.*
+usr/lib/cmake/paraview-4.0/*.png
+usr/lib/cmake/paraview-4.0/branded_splash.png usr/share/doc/paraview/images/CMake/
+usr/lib/paraview-4.0/*.so usr/lib/
+usr/lib/paraview-4.0/.plugins
+
+usr/bin/pvserver
+usr/bin/smTestDriver
 usr/bin/pvdataserver
-usr/lib/paraview/pvdataserver
+usr/bin/paraview
 usr/bin/pvrenderserver
-usr/lib/paraview/pvrenderserver
-usr/bin/pvserver
-usr/lib/paraview/pvserver
-usr/lib/paraview/*.so.*
-usr/lib/paraview/*.so
-usr/lib/cmake/paraview/*.png
-usr/lib/cmake/paraview/branded_splash.png usr/share/doc/paraview/images/CMake/
-usr/lib/paraview-4.0/*.so usr/lib/
-usr/lib/paraview/.plugins
-usr/bin/vtkProcessShader
+usr/bin/pvbatch
diff --git a/debian/paraview.lintian-overrides b/debian/paraview.lintian-overrides
index 8920de6..e277ad1 100644
--- a/debian/paraview.lintian-overrides
+++ b/debian/paraview.lintian-overrides
@@ -1,9 +1,8 @@
 # These embedded libraries, seems, have different versions than in repository.
 # The code is incompatible with repo-versions.
-paraview: embedded-library usr/lib/paraview/libvtkftgl.so.1: ftgl
-paraview: postinst-has-useless-call-to-ldconfig
-paraview: postrm-has-useless-call-to-ldconfig
-paraview: binary-or-shlib-defines-rpath 
+#paraview: postinst-has-useless-call-to-ldconfig
+#paraview: postrm-has-useless-call-to-ldconfig
+#paraview: binary-or-shlib-defines-rpath 
 
 # Seems this issue due to --as-needed flag
-paraview: library-not-linked-against-libc
+#paraview: library-not-linked-against-libc
diff --git a/debian/paraviewweb.docs b/debian/paraviewweb.docs
new file mode 100644
index 0000000..3a9a8f0
--- /dev/null
+++ b/debian/paraviewweb.docs
@@ -0,0 +1 @@
+debian/README.paraviewweb
diff --git a/debian/paraviewweb.install b/debian/paraviewweb.install
new file mode 100644
index 0000000..328088f
--- /dev/null
+++ b/debian/paraviewweb.install
@@ -0,0 +1,19 @@
+usr/lib/paraview-4.0/www/ext/js-core/*
+usr/lib/paraview-4.0/www/ext/widgets/*
+usr/lib/paraview-4.0/www/ext/widgets/jquery-ui/*
+usr/lib/paraview-4.0/www/apps/LiveArticles/*
+usr/lib/paraview-4.0/www/apps/LiveArticles/images/*
+usr/lib/paraview-4.0/www/apps/DataProber/*
+usr/lib/paraview-4.0/www/apps/DataProber/icons/*
+usr/lib/paraview-4.0/www/apps/DataProber/jclv/*
+usr/lib/paraview-4.0/www/apps/WebFileViewer/*
+usr/lib/paraview-4.0/www/apps/WebFileViewer/js/*
+usr/lib/paraview-4.0/www/apps/WebFileViewer/images/*
+usr/lib/paraview-4.0/www/apps/WebFileViewer/js/themes/*
+usr/lib/paraview-4.0/www/apps/WebVisualizer/*
+usr/lib/paraview-4.0/www/lib/js/*
+usr/lib/paraview-4.0/www/lib/css/*
+usr/lib/paraview-4.0/www/lib/css/paraview/*
+usr/lib/paraview-4.0/www/lib/css/paraview/pipeline/*
+usr/lib/paraview-4.0/www/lib/css/paraview/toolbar/*
+
diff --git a/debian/patches/BuildAdaptors.patch b/debian/patches/BuildAdaptors.patch
new file mode 100644
index 0000000..fa06c37
--- /dev/null
+++ b/debian/patches/BuildAdaptors.patch
@@ -0,0 +1,104 @@
+Index: paraview-4.0.1/CoProcessing/Adaptors/BuildAdaptors.cmake
+===================================================================
+--- paraview-4.0.1.orig/CoProcessing/Adaptors/BuildAdaptors.cmake	2013-10-23 12:37:43.000000000 +0000
++++ paraview-4.0.1/CoProcessing/Adaptors/BuildAdaptors.cmake	2013-10-23 12:37:43.000000000 +0000
+@@ -54,7 +54,10 @@
+             --build-generator ${CMAKE_GENERATOR}
+             --build-makeprogram ${CMAKE_MAKE_PROGRAM}
+             --build-options -DParaView_DIR:PATH=${ParaView_BINARY_DIR}
+-                            -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
++	                    -DParaView_SOURCE_DIR:PATH=${ParaView_SOURCE_DIR}
++	                    -DPARAVIEW_USING_EXTERNAL_VTK:BOOL=${PARAVIEW_USING_EXTERNAL_VTK}
++                            -DCMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE}
++			    -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+                             -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+                             -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
+                             -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
+Index: paraview-4.0.1/pv-src-tmp/CoProcessing/Adaptors/BuildAdaptors.cmake
+===================================================================
+--- paraview-4.0.1.orig/pv-src-tmp/CoProcessing/Adaptors/BuildAdaptors.cmake	2013-10-23 12:37:43.000000000 +0000
++++ paraview-4.0.1/pv-src-tmp/CoProcessing/Adaptors/BuildAdaptors.cmake	2013-10-23 12:37:43.000000000 +0000
+@@ -54,7 +54,10 @@
+             --build-generator ${CMAKE_GENERATOR}
+             --build-makeprogram ${CMAKE_MAKE_PROGRAM}
+             --build-options -DParaView_DIR:PATH=${ParaView_BINARY_DIR}
+-                            -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
++	                    -DParaView_SOURCE_DIR:PATH=${ParaView_SOURCE_DIR}
++	                    -DPARAVIEW_USING_EXTERNAL_VTK:BOOL=${PARAVIEW_USING_EXTERNAL_VTK}
++                            -DCMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE}
++			    -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+                             -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+                             -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
+                             -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
+Index: paraview-4.0.1/CoProcessing/Adaptors/CTHAdaptor/CMakeLists.txt
+===================================================================
+--- paraview-4.0.1.orig/CoProcessing/Adaptors/CTHAdaptor/CMakeLists.txt	2013-10-23 12:37:43.000000000 +0000
++++ paraview-4.0.1/CoProcessing/Adaptors/CTHAdaptor/CMakeLists.txt	2013-10-23 12:37:43.000000000 +0000
+@@ -9,6 +9,12 @@
+   vtkCTHDataArray.cxx
+ )
+ 
++include_directories(
++  ${ParaView_SOURCE_DIR}/CoProcessing/Catalyst
++  ${ParaView_SOURCE_DIR}/CoProcessing/PythonCatalyst
++  ${ParaView_DIR}/CoProcessing/Catalyst
++  ${ParaView_DIR}/CoProcessing/PythonCatalyst)
++
+ add_library(CTHAdaptor ${CTHAdaptor_SRCS})
+ target_link_libraries(
+   CTHAdaptor
+Index: paraview-4.0.1/CoProcessing/Adaptors/NPICAdaptor/CMakeLists.txt
+===================================================================
+--- paraview-4.0.1.orig/CoProcessing/Adaptors/NPICAdaptor/CMakeLists.txt	2013-10-23 12:37:43.000000000 +0000
++++ paraview-4.0.1/CoProcessing/Adaptors/NPICAdaptor/CMakeLists.txt	2013-10-23 12:37:43.000000000 +0000
+@@ -5,5 +5,12 @@
+ include("${PARAVIEW_USE_FILE}")
+ 
+ set(NPICAdaptor_SRCS NPICAdaptor.cxx)
++
++include_directories(
++  ${ParaView_SOURCE_DIR}/CoProcessing/Catalyst
++  ${ParaView_SOURCE_DIR}/CoProcessing/PythonCatalyst
++  ${ParaView_DIR}/CoProcessing/Catalyst
++  ${ParaView_DIR}/CoProcessing/PythonCatalyst)
++
+ add_library(NPICAdaptor ${NPICAdaptor_SRCS})
+ target_link_libraries(NPICAdaptor vtkPVCatalyst)
+Index: paraview-4.0.1/CoProcessing/Adaptors/ParticleAdaptor/CMakeLists.txt
+===================================================================
+--- paraview-4.0.1.orig/CoProcessing/Adaptors/ParticleAdaptor/CMakeLists.txt	2013-10-23 12:37:43.000000000 +0000
++++ paraview-4.0.1/CoProcessing/Adaptors/ParticleAdaptor/CMakeLists.txt	2013-10-23 12:45:31.000000000 +0000
+@@ -4,6 +4,16 @@
+ find_package(ParaView REQUIRED COMPONENTS vtkPVCatalyst)
+ include("${PARAVIEW_USE_FILE}")
+ 
++include_directories(
++  ${ParaView_SOURCE_DIR}/CoProcessing/Catalyst
++  ${ParaView_SOURCE_DIR}/CoProcessing/PythonCatalyst
++  ${ParaView_DIR}/CoProcessing/Catalyst
++  ${ParaView_DIR}/CoProcessing/PythonCatalyst
++  ${ParaView_SOURCE_DIR}/ParaViewCore/VTKExtensions/Rendering
++  ${ParaView_DIR}/ParaViewCore/VTKExtensions/Rendering
++  ${ParaView_SOURCE_DIR}/ParaViewCore/ClientServerCore/Rendering
++  ${ParaView_DIR}/ParaViewCore/ClientServerCore/Rendering)
++
+ add_library(ParticleAdaptor
+   ParticleAdaptor.cxx
+   vtkParticlePipeline.cxx)
+Index: paraview-4.0.1/CoProcessing/Adaptors/ParticleAdaptor/CMakeLists.txt
+===================================================================
+--- paraview-4.0.1.orig/CoProcessing/Adaptors/PhastaAdaptor/CMakeLists.txt	2013-10-23 15:27:26.000000000 +0000
++++ paraview-4.0.1/CoProcessing/Adaptors/PhastaAdaptor/CMakeLists.txt	2013-10-23 15:28:21.000000000 +0000
+@@ -7,6 +7,12 @@
+ enable_language(Fortran)
+ include(FortranCInterface)
+ 
++include_directories(
++  ${ParaView_SOURCE_DIR}/CoProcessing/Catalyst
++  ${ParaView_SOURCE_DIR}/CoProcessing/PythonCatalyst
++  ${ParaView_DIR}/CoProcessing/Catalyst
++  ${ParaView_DIR}/CoProcessing/PythonCatalyst)
++
+ FortranCInterface_HEADER(PhastaAdaptorAPIMangling.h SYMBOLS
+   createpointsandallocatecells insertblockofcells addfields)
+ 
diff --git a/debian/patches/docs.patch b/debian/patches/docs.patch
new file mode 100644
index 0000000..3205b2e
--- /dev/null
+++ b/debian/patches/docs.patch
@@ -0,0 +1,40 @@
+Index: paraview/Utilities/Doxygen/doc_makeall.cmake.in
+===================================================================
+--- paraview.orig/Utilities/Doxygen/doc_makeall.cmake.in	2013-10-29 14:12:24.000000000 +0100
++++ paraview/Utilities/Doxygen/doc_makeall.cmake.in	2013-10-29 14:13:47.000000000 +0100
+@@ -7,6 +7,9 @@
+ set(HTML_HELP_COMPILER "@HTML_HELP_COMPILER@")
+ set(PERL "@PERL@")
+ set(DOXYGEN_KEEP_TEMP "@DOXYGEN_KEEP_TEMP@")
++set(PARAVIEW_USING_EXTERNAL_VTK "@PARAVIEW_USING_EXTERNAL_VTK@")
++set(VTK_MAJOR_VERSION @VTK_MAJOR_VERSION@)
++set(VTK_MINOR_VERSION @VTK_MINOR_VERSION@)
+ 
+ if(NOT DOXYGEN)
+   message(FATAL_ERROR "error: cannot build ParaView documentation without doxygen")
+@@ -35,7 +38,11 @@
+ # Example:
+ #   PATH_TO_VTK_DOX_SCRIPTS=@ParaView_SOURCE_DIR@/Utilities/Doxygen
+ #
+-set(PATH_TO_VTK_DOX_SCRIPTS "@ParaView_SOURCE_DIR@/VTK/Utilities/Doxygen")
++if (PARAVIEW_USING_EXTERNAL_VTK)
++  set(PATH_TO_VTK_DOX_SCRIPTS "${VTK_INSTALL_PREFIX}/share/doc/vtk-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}/doxygen")
++else()
++  set(PATH_TO_VTK_DOX_SCRIPTS "@ParaView_SOURCE_DIR@/VTK/Utilities/Doxygen")
++endif()
+ set(PATH_TO_PARAVIEW_DOX_SCRIPTS "@ParaView_SOURCE_DIR@/Utilities/Doxygen")
+ 
+ # SOURCE_DIR:
+Index: paraview/Utilities/Doxygen/doxyfile.in
+===================================================================
+--- paraview.orig/Utilities/Doxygen/doxyfile.in	2013-10-29 14:12:24.000000000 +0100
++++ paraview/Utilities/Doxygen/doxyfile.in	2013-10-29 14:12:24.000000000 +0100
+@@ -47,7 +47,7 @@
+           @PV_MODULE_DIRS_DOXYGEN_ESCAPED@
+ 
+ 
+-EXCLUDE_PATTERNS     =
++EXCLUDE_PATTERNS = */VTK.old/*
+ EXCLUDE              = \
+     "@VTK_BINARY_DIR@/Utilities/Doxygen/dox/Common/Core/vtkSetGet.h" \
+     "@VTK_BINARY_DIR@/Utilities/Doxygen/dox/Common/DataModel/vtkMarchingSquaresCases.h" \
diff --git a/debian/patches/paraviewconfig.patch b/debian/patches/paraviewconfig.patch
new file mode 100644
index 0000000..13b97f6
--- /dev/null
+++ b/debian/patches/paraviewconfig.patch
@@ -0,0 +1,95 @@
+Index: paraview/ParaViewConfig.cmake.in
+===================================================================
+--- paraview.orig/ParaViewConfig.cmake.in	2013-10-28 13:20:00.000000000 +0100
++++ paraview/ParaViewConfig.cmake.in	2013-10-28 13:20:54.000000000 +0100
+@@ -2,17 +2,49 @@
+ #
+ # ParaViewConfig.cmake - ParaView CMake configuration file for external projects.
+ #
++
++#
++set (PARAVIEW_USING_EXTERNAL_VTK @PARAVIEW_USING_EXTERNAL_VTK@)
++
+ # This file is configured by ParaView and used by the UseParaView.cmake module
+ # to load ParaView's settings for an external project.
+ set (__pv_install_tree @PARAVIEW_CONFIG_INSTALLED@)
+ if (__pv_install_tree)
+   get_filename_component(location "${CMAKE_CURRENT_LIST_FILE}" PATH)
+-  set (VTK_CONFIG_FILE "${location}/VTKConfig.cmake")
++  if (PARAVIEW_USING_EXTERNAL_VTK)
++    find_package(VTK REQUIRED)
++    message(STATUS "Using External VTK from \"${VTK_DIR}\"")
++    set (VTK_CONFIG_FILE "${VTK_DIR}/VTKConfig.cmake")
++
++    # Update CMAKE_MODULE_PATH to include VTK's cmake files.
++    set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
++                           ${VTK_CMAKE_DIR}
++                           ${VTK_MODULES_DIR})
++  else()
++    set (VTK_CONFIG_FILE "${location}/VTKConfig.cmake")
++  endif ()
+   set (ParaView_CMAKE_DIR "${location}")
+   set (PARAVIEW_CONFIG_TARGETS_FILE "${location}/ParaViewTargets.cmake")
++  set (ParaView_MODULES_DIR ${location}/Modules)
++  if (PARAVIEW_USING_EXTERNAL_VTK)
++    # Update CMAKE_MODULE_PATH to include PARAVIEW's cmake files.
++    set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
++                           ${PARAVIEW_CMAKE_DIR}
++			   ${PARAVIEW_MODULES_DIR})
++  endif ()
+ else()
+   # The ParaView is in the build-location.
+-  set (VTK_CONFIG_FILE "@ParaView_BINARY_DIR@/VTK/VTKConfig.cmake")
++  if (PARAVIEW_USING_EXTERNAL_VTK)
++    find_package(VTK REQUIRED)
++    message(STATUS "Using External VTK from \"${VTK_DIR}\"")
++    set (VTK_CONFIG_FILE "${VTK_DIR}/VTKConfig.cmake")
++    #
++    # is this needed?
++    set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
++                          "@ParaView_BINARY_DIR@/lib/cmake/paraview-4.0/Modules")
++  else()
++    set (VTK_CONFIG_FILE "@ParaView_BINARY_DIR@/VTK/VTKConfig.cmake")
++  endif ()
+   set (ParaView_CMAKE_DIR "@ParaView_CMAKE_DIR@")
+   set (PARAVIEW_CONFIG_TARGETS_FILE "@ParaView_BINARY_DIR@/ParaViewTargets.cmake")
+ endif()
+@@ -30,6 +62,7 @@
+ 
+ set (PARAVIEW_USE_FILE ${ParaView_USE_FILE})
+ set (PARAVIEW_CMAKE_DIR ${ParaView_CMAKE_DIR})
++message(STATUS "PARAVIEW_CMAKE_DIR= \"${ParaView_CMAKE_DIR}\"")
+ 
+ # Import ParaView targets.
+ if(NOT TARGET vtkPVCommon)
+@@ -45,10 +78,18 @@
+   set (VTK_FIND_COMPONENTS vtkPVServerManagerApplication)
+ endif()
+ 
+-set (VTK_FIND_COMPONENTS ${VTK_FIND_COMPONENTS} ${ParaView_FIND_COMPONENTS})
+-include("${VTK_CONFIG_FILE}")
++if (PARAVIEW_USING_EXTERNAL_VTK)
++  include("${VTK_FIND_COMPONENTS}")
++  if (ParaView_FIND_COMPONENTS)
++     include("${ParaView_FIND_COMPONENTS}")
++  endif()
++else()
++  set (VTK_FIND_COMPONENTS ${VTK_FIND_COMPONENTS} ${ParaView_FIND_COMPONENTS})
++  include("${VTK_CONFIG_FILE}")
++endif()
+ 
+ if (__pv_install_tree)
++  list(APPEND VTK_INCLUDE_DIRS PARAVIEW_INCLUDE_DIRS)
+   set (PARAVIEW_WWW_DIR "${VTK_INSTALL_PREFIX}/lib/paraview- at PARAVIEW_VERSION_MAJOR@. at PARAVIEW_VERSION_MINOR@/www")
+ else()
+   list(APPEND VTK_INCLUDE_DIRS "@ParaView_BINARY_DIR@")
+@@ -58,7 +99,9 @@
+ # unless using external vtk (when we start supporting it, that is)
+ # PARAVIEW_INCLUDE_DIRS is same as VTK_INCLUDE_DIRS, but to make it easier for
+ # ParaView users.
++message (STATUS "VTK_INCLUDE_DIRS=" ${VTK_INCLUDE_DIRS})
+ set (PARAVIEW_INCLUDE_DIRS ${VTK_INCLUDE_DIRS})
++message (STATUS "PARAVIEW_INCLUDE_DIRS=" ${VTK_INCLUDE_DIRS})
+ 
+ #------------------------------------------------------------------------------
+ # ParaView global configuration options.
diff --git a/debian/patches/series b/debian/patches/series
index fa3626f..89b477f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,7 @@
 fix_manpages_errors.patch
 use_system_json.patch
+paraviewconfig.patch
+BuildAdaptors.patch
+wrapping_python.patch
+wrapping_java.patch
+docs.patch
diff --git a/debian/patches/wrapping_java.patch b/debian/patches/wrapping_java.patch
new file mode 100644
index 0000000..622f1f3
--- /dev/null
+++ b/debian/patches/wrapping_java.patch
@@ -0,0 +1,15 @@
+Index: paraview/CMakeLists.txt
+===================================================================
+--- paraview.orig/CMakeLists.txt	2013-10-04 19:18:45.000000000 +0200
++++ paraview/CMakeLists.txt	2013-10-25 08:44:43.000000000 +0200
+@@ -424,6 +424,10 @@
+   # configuration files generated for modules ParaView adds go in the correct
+   # location.
+   set (VTK_MODULES_DIR ${PARAVIEW_MODULES_DIR})
++  
++  # Since importing VTK does not define VTK_JAVA_HOME variable,
++  # we update the variable.
++  set(VTK_JAVA_HOME ${CMAKE_CURRENT_BINARY_DIR}/java)
+ 
+ else()
+ 
diff --git a/debian/patches/wrapping_python.patch b/debian/patches/wrapping_python.patch
new file mode 100644
index 0000000..ec8ddd9
--- /dev/null
+++ b/debian/patches/wrapping_python.patch
@@ -0,0 +1,724 @@
+Index: paraview-4.0.1/Wrapping/Python/CMakeLists.txt
+===================================================================
+--- paraview-4.0.1.orig/Wrapping/Python/CMakeLists.txt	2013-10-04 19:18:47.000000000 +0200
++++ paraview-4.0.1/Wrapping/Python/CMakeLists.txt	2013-10-24 09:02:32.000000000 +0200
+@@ -38,6 +38,7 @@
+ set(PV_PYTHON_MODULE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/paraview")
+ set(PV_PYTHON_MODULE_BINARY_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/site-packages/paraview")
+ 
++if ( NOT PARAVIEW_USING_EXTERNAL_VTK)
+ # Handle out-of-source builds correctly.
+ #
+ #  1. Create a list of Python files to be installed/copied.
+@@ -69,7 +70,8 @@
+            "${ParaView_SOURCE_DIR}/VTK/Wrapping/Python/vtk/util/vtkConstants.py"
+       DESTINATION ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/site-packages/paraview
+       USE_SOURCE_PERMISSIONS)
+-
++      
++endif()
+ 
+ # Byte compile the Python files.
+ CONFIGURE_FILE(${PV_PYTHON_MODULE_SOURCE_DIR}/compile_all_pv.py.in
+Index: paraview-4.0.1/CMakeLists.txt b/CMakeLists.txt
+===================================================================
+--- paraview-4.0.1.orig/CMakeLists.txt
++++ paraview-4.0.1/CMakeLists.txt
+@@ -550,6 +550,7 @@ add_subdirectory(Wrapping/Python)
+ # Process modules that need to be add at the end, after all other modules have
+ # been processed.
+ if (PARAVIEW_ENABLE_PYTHON)
++  FIND_PACKAGE(PythonLibs REQUIRED)
+   add_subdirectory(Utilities/PythonInitializer)
+ endif()
+ 
+Index: paraview-4.0.1/VTK/CMake/FindPythonLibs.cmake b/VTK/CMake/FindPythonLibs.cmake
+===================================================================
+--- paraview-4.0.1.orig/VTK/CMake/FindPythonLibs.cmake
++++ paraview-4.0.1/VTK/CMake/FindPythonLibs.cmake
+@@ -7,14 +7,17 @@
+ #  PYTHON_LIBRARIES           - path to the python library
+ #  PYTHON_INCLUDE_PATH        - path to where Python.h is found (deprecated)
+ #  PYTHON_INCLUDE_DIRS        - path to where Python.h is found
+-#  PYTHON_DEBUG_LIBRARIES     - path to the debug library
+-#  PYTHON_VERSION             - python version string e.g. 2.7.1
+-#  PYTHON_MAJOR_VERSION       - python major version number
+-#  PYTHON_MINOR_VERSION       - python minor version number
+-#  PYTHON_MICRO_VERSION       - python release version number
++#  PYTHON_DEBUG_LIBRARIES     - path to the debug library (deprecated)
++#  PYTHONLIBS_VERSION_STRING  - version of the Python libs found (since CMake 2.8.8)
+ #
+-# This code uses the following variables:
+-#  Python_ADDITIONAL_VERSIONS - list of additional Python versions to search for
++# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list of
++# version numbers that should be taken into account when searching for Python.
++# You need to set this variable before calling find_package(PythonLibs).
++#
++# If you'd like to specify the installation of Python to use, you should modify
++# the following cache variables:
++#  PYTHON_LIBRARY             - path to the python library
++#  PYTHON_INCLUDE_DIR         - path to where Python.h is found
+ 
+ #=============================================================================
+ # Copyright 2001-2009 Kitware, Inc.
+@@ -29,35 +32,81 @@
+ # (To distribute this file outside of CMake, substitute the full
+ #  License text for the above reference.)
+ 
+-INCLUDE(CMakeFindFrameworks)
++include(${CMAKE_CURRENT_LIST_DIR}/CMakeFindFrameworks.cmake)
+ # Search for the python framework on Apple.
+ CMAKE_FIND_FRAMEWORKS(Python)
+ 
++set(_PYTHON1_VERSIONS 1.6 1.5)
++set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
++set(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0)
++
++if(PythonLibs_FIND_VERSION)
++    if(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
++        string(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" _PYTHON_FIND_MAJ_MIN "${PythonLibs_FIND_VERSION}")
++        string(REGEX REPLACE "^([0-9]+).*" "\\1" _PYTHON_FIND_MAJ "${_PYTHON_FIND_MAJ_MIN}")
++        unset(_PYTHON_FIND_OTHER_VERSIONS)
++        if(PythonLibs_FIND_VERSION_EXACT)
++            if(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
++                set(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}")
++            else()
++                set(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}" "${_PYTHON_FIND_MAJ_MIN}")
++            endif()
++        else()
++            foreach(_PYTHON_V ${_PYTHON${_PYTHON_FIND_MAJ}_VERSIONS})
++                if(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN)
++                    list(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V})
++                endif()
++             endforeach()
++        endif()
++        unset(_PYTHON_FIND_MAJ_MIN)
++        unset(_PYTHON_FIND_MAJ)
++    else()
++        set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON${PythonLibs_FIND_VERSION}_VERSIONS})
++    endif()
++else()
++    set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS})
++endif()
++
+ # Set up the versions we know about, in the order we will search. Always add
+ # the user supplied additional versions to the front.
+ set(_Python_VERSIONS
+   ${Python_ADDITIONAL_VERSIONS}
+-  2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
++  ${_PYTHON_FIND_OTHER_VERSIONS}
++  )
++
++unset(_PYTHON_FIND_OTHER_VERSIONS)
++unset(_PYTHON1_VERSIONS)
++unset(_PYTHON2_VERSIONS)
++unset(_PYTHON3_VERSIONS)
+ 
+-FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
+-  STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
+-  IF(WIN32)
+-    FIND_LIBRARY(PYTHON_DEBUG_LIBRARY
++foreach(_CURRENT_VERSION ${_Python_VERSIONS})
++  string(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
++  if(WIN32)
++    find_library(PYTHON_DEBUG_LIBRARY
+       NAMES python${_CURRENT_VERSION_NO_DOTS}_d python
+       PATHS
+       [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
+-      [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs )
+-  ENDIF(WIN32)
++      [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
++      [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
++      [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
++      )
++  endif()
+ 
+-  FIND_LIBRARY(PYTHON_LIBRARY
+-    NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
++  find_library(PYTHON_LIBRARY
++    NAMES
++    python${_CURRENT_VERSION_NO_DOTS}
++    python${_CURRENT_VERSION}mu
++    python${_CURRENT_VERSION}m
++    python${_CURRENT_VERSION}u
++    python${_CURRENT_VERSION}
+     PATHS
+       [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
+   )
+   # Look for the static library in the Python config directory
+-  FIND_LIBRARY(PYTHON_LIBRARY
++  find_library(PYTHON_LIBRARY
+     NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
+     # Avoid finding the .dll in the PATH.  We want the .lib.
+     NO_SYSTEM_ENVIRONMENT_PATH
+@@ -67,68 +116,182 @@ FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
+ 
+   # For backward compatibility, honour value of PYTHON_INCLUDE_PATH, if
+   # PYTHON_INCLUDE_DIR is not set.
+-  IF(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)
+-    SET(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}" CACHE PATH
++  if(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)
++    set(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}" CACHE PATH
+       "Path to where Python.h is found" FORCE)
+-  ENDIF(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)
++  endif()
+ 
+-  SET(PYTHON_FRAMEWORK_INCLUDES)
+-  IF(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR)
+-    FOREACH(dir ${Python_FRAMEWORKS})
+-      SET(PYTHON_FRAMEWORK_INCLUDES ${PYTHON_FRAMEWORK_INCLUDES}
++  set(PYTHON_FRAMEWORK_INCLUDES)
++  if(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR)
++    foreach(dir ${Python_FRAMEWORKS})
++      set(PYTHON_FRAMEWORK_INCLUDES ${PYTHON_FRAMEWORK_INCLUDES}
+         ${dir}/Versions/${_CURRENT_VERSION}/include/python${_CURRENT_VERSION})
+-    ENDFOREACH(dir)
+-  ENDIF(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR)
++    endforeach()
++  endif()
+ 
+-  FIND_PATH(PYTHON_INCLUDE_DIR
++  find_path(PYTHON_INCLUDE_DIR
+     NAMES Python.h
+     PATHS
+       ${PYTHON_FRAMEWORK_INCLUDES}
+       [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
++      [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
++    PATH_SUFFIXES
++      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}mu
++      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}m
++      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}u
++      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}
++      python${_CURRENT_VERSION}mu
++      python${_CURRENT_VERSION}m
++      python${_CURRENT_VERSION}u
++      python${_CURRENT_VERSION}
++  )
++
++  find_path(PYTHON_INCLUDE_DIR2
++    NAMES pyconfig.h
++    PATHS
++      ${PYTHON_FRAMEWORK_INCLUDES}
++      [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
++      [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
+     PATH_SUFFIXES
++      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}mu
++      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}m
++      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}u
++      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}
++      python${_CURRENT_VERSION}mu
++      python${_CURRENT_VERSION}m
++      python${_CURRENT_VERSION}u
+       python${_CURRENT_VERSION}
+   )
+ 
+-  # For backward compatibility, set PYTHON_INCLUDE_PATH, but make it internal.
+-  SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}" CACHE INTERNAL
+-    "Path to where Python.h is found (deprecated)")
++  # For backward compatibility, set PYTHON_INCLUDE_PATH.
++  set(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}")
++
++  if(PYTHON_INCLUDE_DIR AND EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h")
++    file(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" python_version_str
++         REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"")
++    string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1"
++                         PYTHONLIBS_VERSION_STRING "${python_version_str}")
++    unset(python_version_str)
++  endif()
+ 
+-ENDFOREACH(_CURRENT_VERSION)
++  if(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR)
++    break()
++  endif()
++endforeach()
+ 
+-MARK_AS_ADVANCED(
++mark_as_advanced(
+   PYTHON_DEBUG_LIBRARY
+   PYTHON_LIBRARY
+   PYTHON_INCLUDE_DIR
++  PYTHON_INCLUDE_DIR2
+ )
+ 
+-
+-# look in PYTHON_INCLUDE_DIR for patchlevel.h, which contains the
+-# version number macros in all versions of python from 1.5 through
+-# at least version 3.2, and set these vars:  PYTHON_VERSION,
+-# PYTHON_MAJOR_VERSION, PYTHON_MINOR_VERSION, PYTHON_MICRO_VERSION.
+-IF(PYTHON_INCLUDE_DIR)
+-  SET(_VERSION_REGEX
+-      "^#define[ \t]+PY([A-Z_]*_VERSION)[ \t]+[\"]*([[0-9A-Za-z\\.]+)[\"]*[ \t]*$")
+-  FILE(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" _VERSION_STRINGS
+-       LIMIT_COUNT 10 REGEX ${_VERSION_REGEX})
+-  FOREACH(_VERSION_STRING ${_VERSION_STRINGS})
+-    STRING(REGEX REPLACE ${_VERSION_REGEX} "PYTHON\\1"
+-           _VERSION_VARIABLE "${_VERSION_STRING}")
+-    STRING(REGEX REPLACE ${_VERSION_REGEX} "\\2"
+-           _VERSION_NUMBER "${_VERSION_STRING}")
+-    SET(${_VERSION_VARIABLE} ${_VERSION_NUMBER})
+-  ENDFOREACH(_VERSION_STRING ${_VERSION_STRINGS})
+-ENDIF(PYTHON_INCLUDE_DIR)
+-
+-
+ # We use PYTHON_INCLUDE_DIR, PYTHON_LIBRARY and PYTHON_DEBUG_LIBRARY for the
+ # cache entries because they are meant to specify the location of a single
+ # library. We now set the variables listed by the documentation for this
+ # module.
+-SET(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
+-SET(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
+-SET(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
++set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}" "${PYTHON_INCLUDE_DIR2}")
++set(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
++
++# These variables have been historically named in this module different from
++# what SELECT_LIBRARY_CONFIGURATIONS() expects.
++set(PYTHON_LIBRARY_DEBUG "${PYTHON_DEBUG_LIBRARY}")
++set(PYTHON_LIBRARY_RELEASE "${PYTHON_LIBRARY}")
++include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
++SELECT_LIBRARY_CONFIGURATIONS(PYTHON)
++# SELECT_LIBRARY_CONFIGURATIONS() sets ${PREFIX}_FOUND if it has a library.
++# Unset this, this prefix doesn't match the module prefix, they are different
++# for historical reasons.
++unset(PYTHON_FOUND)
++
++include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
++FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs
++                                  REQUIRED_VARS PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS
++                                  VERSION_VAR PYTHONLIBS_VERSION_STRING)
++
++# PYTHON_ADD_MODULE(<name> src1 src2 ... srcN) is used to build modules for python.
++# PYTHON_WRITE_MODULES_HEADER(<filename>) writes a header file you can include
++# in your sources to initialize the static python modules
++function(PYTHON_ADD_MODULE _NAME )
++  get_property(_TARGET_SUPPORTS_SHARED_LIBS
++    GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)
++  option(PYTHON_ENABLE_MODULE_${_NAME} "Add module ${_NAME}" TRUE)
++  option(PYTHON_MODULE_${_NAME}_BUILD_SHARED
++    "Add module ${_NAME} shared" ${_TARGET_SUPPORTS_SHARED_LIBS})
++
++  # Mark these options as advanced
++  mark_as_advanced(PYTHON_ENABLE_MODULE_${_NAME}
++    PYTHON_MODULE_${_NAME}_BUILD_SHARED)
++
++  if(PYTHON_ENABLE_MODULE_${_NAME})
++    if(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
++      set(PY_MODULE_TYPE MODULE)
++    else()
++      set(PY_MODULE_TYPE STATIC)
++      set_property(GLOBAL  APPEND  PROPERTY  PY_STATIC_MODULES_LIST ${_NAME})
++    endif()
++
++    set_property(GLOBAL  APPEND  PROPERTY  PY_MODULES_LIST ${_NAME})
++    add_library(${_NAME} ${PY_MODULE_TYPE} ${ARGN})
++#    target_link_libraries(${_NAME} ${PYTHON_LIBRARIES})
++
++    if(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
++      set_target_properties(${_NAME} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}")
++      if(WIN32 AND NOT CYGWIN)
++        set_target_properties(${_NAME} PROPERTIES SUFFIX ".pyd")
++      endif()
++    endif()
++
++  endif()
++endfunction()
++
++function(PYTHON_WRITE_MODULES_HEADER _filename)
++
++  get_property(PY_STATIC_MODULES_LIST  GLOBAL  PROPERTY PY_STATIC_MODULES_LIST)
++
++  get_filename_component(_name "${_filename}" NAME)
++  string(REPLACE "." "_" _name "${_name}")
++  string(TOUPPER ${_name} _nameUpper)
++  set(_filename ${CMAKE_CURRENT_BINARY_DIR}/${_filename})
++
++  set(_filenameTmp "${_filename}.in")
++  file(WRITE ${_filenameTmp} "/*Created by cmake, do not edit, changes will be lost*/\n")
++  file(APPEND ${_filenameTmp}
++"#ifndef ${_nameUpper}
++#define ${_nameUpper}
++
++#include <Python.h>
++
++#ifdef __cplusplus
++extern \"C\" {
++#endif /* __cplusplus */
++
++")
++
++  foreach(_currentModule ${PY_STATIC_MODULES_LIST})
++    file(APPEND ${_filenameTmp} "extern void init${PYTHON_MODULE_PREFIX}${_currentModule}(void);\n\n")
++  endforeach()
++
++  file(APPEND ${_filenameTmp}
++"#ifdef __cplusplus
++}
++#endif /* __cplusplus */
++
++")
++
++
++  foreach(_currentModule ${PY_STATIC_MODULES_LIST})
++    file(APPEND ${_filenameTmp} "int ${_name}_${_currentModule}(void) \n{\n  static char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n")
++  endforeach()
++
++  file(APPEND ${_filenameTmp} "void ${_name}_LoadAllPythonModules(void)\n{\n")
++  foreach(_currentModule ${PY_STATIC_MODULES_LIST})
++    file(APPEND ${_filenameTmp} "  ${_name}_${_currentModule}();\n")
++  endforeach()
++  file(APPEND ${_filenameTmp} "}\n\n")
++  file(APPEND ${_filenameTmp} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n  ${_name}_LoadAllPythonModules();\n}\n#endif\n\n#endif\n")
+ 
++# with configure_file() cmake complains that you may not use a file created using file(WRITE) as input file for configure_file()
++  execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_filenameTmp}" "${_filename}" OUTPUT_QUIET ERROR_QUIET)
+ 
+-INCLUDE(FindPackageHandleStandardArgs)
+-FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs DEFAULT_MSG PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
++endfunction()
+Index: paraview-4.0.1/pv-src-tmp/VTK/CMake/FindPythonLibs.cmake b/pv-src-tmp/VTK/CMake/FindPythonLibs.cmake
+===================================================================
+--- paraview-4.0.1.orig/pv-src-tmp/VTK/CMake/FindPythonLibs.cmake
++++ paraview-4.0.1/pv-src-tmp/VTK/CMake/FindPythonLibs.cmake
+@@ -7,14 +7,17 @@
+ #  PYTHON_LIBRARIES           - path to the python library
+ #  PYTHON_INCLUDE_PATH        - path to where Python.h is found (deprecated)
+ #  PYTHON_INCLUDE_DIRS        - path to where Python.h is found
+-#  PYTHON_DEBUG_LIBRARIES     - path to the debug library
+-#  PYTHON_VERSION             - python version string e.g. 2.7.1
+-#  PYTHON_MAJOR_VERSION       - python major version number
+-#  PYTHON_MINOR_VERSION       - python minor version number
+-#  PYTHON_MICRO_VERSION       - python release version number
++#  PYTHON_DEBUG_LIBRARIES     - path to the debug library (deprecated)
++#  PYTHONLIBS_VERSION_STRING  - version of the Python libs found (since CMake 2.8.8)
+ #
+-# This code uses the following variables:
+-#  Python_ADDITIONAL_VERSIONS - list of additional Python versions to search for
++# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list of
++# version numbers that should be taken into account when searching for Python.
++# You need to set this variable before calling find_package(PythonLibs).
++#
++# If you'd like to specify the installation of Python to use, you should modify
++# the following cache variables:
++#  PYTHON_LIBRARY             - path to the python library
++#  PYTHON_INCLUDE_DIR         - path to where Python.h is found
+ 
+ #=============================================================================
+ # Copyright 2001-2009 Kitware, Inc.
+@@ -29,35 +32,81 @@
+ # (To distribute this file outside of CMake, substitute the full
+ #  License text for the above reference.)
+ 
+-INCLUDE(CMakeFindFrameworks)
++include(${CMAKE_CURRENT_LIST_DIR}/CMakeFindFrameworks.cmake)
+ # Search for the python framework on Apple.
+ CMAKE_FIND_FRAMEWORKS(Python)
+ 
++set(_PYTHON1_VERSIONS 1.6 1.5)
++set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
++set(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0)
++
++if(PythonLibs_FIND_VERSION)
++    if(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
++        string(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" _PYTHON_FIND_MAJ_MIN "${PythonLibs_FIND_VERSION}")
++        string(REGEX REPLACE "^([0-9]+).*" "\\1" _PYTHON_FIND_MAJ "${_PYTHON_FIND_MAJ_MIN}")
++        unset(_PYTHON_FIND_OTHER_VERSIONS)
++        if(PythonLibs_FIND_VERSION_EXACT)
++            if(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
++                set(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}")
++            else()
++                set(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}" "${_PYTHON_FIND_MAJ_MIN}")
++            endif()
++        else()
++            foreach(_PYTHON_V ${_PYTHON${_PYTHON_FIND_MAJ}_VERSIONS})
++                if(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN)
++                    list(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V})
++                endif()
++             endforeach()
++        endif()
++        unset(_PYTHON_FIND_MAJ_MIN)
++        unset(_PYTHON_FIND_MAJ)
++    else()
++        set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON${PythonLibs_FIND_VERSION}_VERSIONS})
++    endif()
++else()
++    set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS})
++endif()
++
+ # Set up the versions we know about, in the order we will search. Always add
+ # the user supplied additional versions to the front.
+ set(_Python_VERSIONS
+   ${Python_ADDITIONAL_VERSIONS}
+-  2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
++  ${_PYTHON_FIND_OTHER_VERSIONS}
++  )
++
++unset(_PYTHON_FIND_OTHER_VERSIONS)
++unset(_PYTHON1_VERSIONS)
++unset(_PYTHON2_VERSIONS)
++unset(_PYTHON3_VERSIONS)
+ 
+-FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
+-  STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
+-  IF(WIN32)
+-    FIND_LIBRARY(PYTHON_DEBUG_LIBRARY
++foreach(_CURRENT_VERSION ${_Python_VERSIONS})
++  string(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
++  if(WIN32)
++    find_library(PYTHON_DEBUG_LIBRARY
+       NAMES python${_CURRENT_VERSION_NO_DOTS}_d python
+       PATHS
+       [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
+-      [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs )
+-  ENDIF(WIN32)
++      [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
++      [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
++      [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
++      )
++  endif()
+ 
+-  FIND_LIBRARY(PYTHON_LIBRARY
+-    NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
++  find_library(PYTHON_LIBRARY
++    NAMES
++    python${_CURRENT_VERSION_NO_DOTS}
++    python${_CURRENT_VERSION}mu
++    python${_CURRENT_VERSION}m
++    python${_CURRENT_VERSION}u
++    python${_CURRENT_VERSION}
+     PATHS
+       [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
+   )
+   # Look for the static library in the Python config directory
+-  FIND_LIBRARY(PYTHON_LIBRARY
++  find_library(PYTHON_LIBRARY
+     NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
+     # Avoid finding the .dll in the PATH.  We want the .lib.
+     NO_SYSTEM_ENVIRONMENT_PATH
+@@ -67,68 +116,182 @@ FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
+ 
+   # For backward compatibility, honour value of PYTHON_INCLUDE_PATH, if
+   # PYTHON_INCLUDE_DIR is not set.
+-  IF(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)
+-    SET(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}" CACHE PATH
++  if(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)
++    set(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}" CACHE PATH
+       "Path to where Python.h is found" FORCE)
+-  ENDIF(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)
++  endif()
+ 
+-  SET(PYTHON_FRAMEWORK_INCLUDES)
+-  IF(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR)
+-    FOREACH(dir ${Python_FRAMEWORKS})
+-      SET(PYTHON_FRAMEWORK_INCLUDES ${PYTHON_FRAMEWORK_INCLUDES}
++  set(PYTHON_FRAMEWORK_INCLUDES)
++  if(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR)
++    foreach(dir ${Python_FRAMEWORKS})
++      set(PYTHON_FRAMEWORK_INCLUDES ${PYTHON_FRAMEWORK_INCLUDES}
+         ${dir}/Versions/${_CURRENT_VERSION}/include/python${_CURRENT_VERSION})
+-    ENDFOREACH(dir)
+-  ENDIF(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR)
++    endforeach()
++  endif()
+ 
+-  FIND_PATH(PYTHON_INCLUDE_DIR
++  find_path(PYTHON_INCLUDE_DIR
+     NAMES Python.h
+     PATHS
+       ${PYTHON_FRAMEWORK_INCLUDES}
+       [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
++      [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
++    PATH_SUFFIXES
++      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}mu
++      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}m
++      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}u
++      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}
++      python${_CURRENT_VERSION}mu
++      python${_CURRENT_VERSION}m
++      python${_CURRENT_VERSION}u
++      python${_CURRENT_VERSION}
++  )
++
++  find_path(PYTHON_INCLUDE_DIR2
++    NAMES pyconfig.h
++    PATHS
++      ${PYTHON_FRAMEWORK_INCLUDES}
++      [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
++      [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
+     PATH_SUFFIXES
++      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}mu
++      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}m
++      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}u
++      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}
++      python${_CURRENT_VERSION}mu
++      python${_CURRENT_VERSION}m
++      python${_CURRENT_VERSION}u
+       python${_CURRENT_VERSION}
+   )
+ 
+-  # For backward compatibility, set PYTHON_INCLUDE_PATH, but make it internal.
+-  SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}" CACHE INTERNAL
+-    "Path to where Python.h is found (deprecated)")
++  # For backward compatibility, set PYTHON_INCLUDE_PATH.
++  set(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}")
++
++  if(PYTHON_INCLUDE_DIR AND EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h")
++    file(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" python_version_str
++         REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"")
++    string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1"
++                         PYTHONLIBS_VERSION_STRING "${python_version_str}")
++    unset(python_version_str)
++  endif()
+ 
+-ENDFOREACH(_CURRENT_VERSION)
++  if(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR)
++    break()
++  endif()
++endforeach()
+ 
+-MARK_AS_ADVANCED(
++mark_as_advanced(
+   PYTHON_DEBUG_LIBRARY
+   PYTHON_LIBRARY
+   PYTHON_INCLUDE_DIR
++  PYTHON_INCLUDE_DIR2
+ )
+ 
+-
+-# look in PYTHON_INCLUDE_DIR for patchlevel.h, which contains the
+-# version number macros in all versions of python from 1.5 through
+-# at least version 3.2, and set these vars:  PYTHON_VERSION,
+-# PYTHON_MAJOR_VERSION, PYTHON_MINOR_VERSION, PYTHON_MICRO_VERSION.
+-IF(PYTHON_INCLUDE_DIR)
+-  SET(_VERSION_REGEX
+-      "^#define[ \t]+PY([A-Z_]*_VERSION)[ \t]+[\"]*([[0-9A-Za-z\\.]+)[\"]*[ \t]*$")
+-  FILE(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" _VERSION_STRINGS
+-       LIMIT_COUNT 10 REGEX ${_VERSION_REGEX})
+-  FOREACH(_VERSION_STRING ${_VERSION_STRINGS})
+-    STRING(REGEX REPLACE ${_VERSION_REGEX} "PYTHON\\1"
+-           _VERSION_VARIABLE "${_VERSION_STRING}")
+-    STRING(REGEX REPLACE ${_VERSION_REGEX} "\\2"
+-           _VERSION_NUMBER "${_VERSION_STRING}")
+-    SET(${_VERSION_VARIABLE} ${_VERSION_NUMBER})
+-  ENDFOREACH(_VERSION_STRING ${_VERSION_STRINGS})
+-ENDIF(PYTHON_INCLUDE_DIR)
+-
+-
+ # We use PYTHON_INCLUDE_DIR, PYTHON_LIBRARY and PYTHON_DEBUG_LIBRARY for the
+ # cache entries because they are meant to specify the location of a single
+ # library. We now set the variables listed by the documentation for this
+ # module.
+-SET(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
+-SET(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
+-SET(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
++set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}" "${PYTHON_INCLUDE_DIR2}")
++set(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
++
++# These variables have been historically named in this module different from
++# what SELECT_LIBRARY_CONFIGURATIONS() expects.
++set(PYTHON_LIBRARY_DEBUG "${PYTHON_DEBUG_LIBRARY}")
++set(PYTHON_LIBRARY_RELEASE "${PYTHON_LIBRARY}")
++include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
++SELECT_LIBRARY_CONFIGURATIONS(PYTHON)
++# SELECT_LIBRARY_CONFIGURATIONS() sets ${PREFIX}_FOUND if it has a library.
++# Unset this, this prefix doesn't match the module prefix, they are different
++# for historical reasons.
++unset(PYTHON_FOUND)
++
++include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
++FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs
++                                  REQUIRED_VARS PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS
++                                  VERSION_VAR PYTHONLIBS_VERSION_STRING)
++
++# PYTHON_ADD_MODULE(<name> src1 src2 ... srcN) is used to build modules for python.
++# PYTHON_WRITE_MODULES_HEADER(<filename>) writes a header file you can include
++# in your sources to initialize the static python modules
++function(PYTHON_ADD_MODULE _NAME )
++  get_property(_TARGET_SUPPORTS_SHARED_LIBS
++    GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)
++  option(PYTHON_ENABLE_MODULE_${_NAME} "Add module ${_NAME}" TRUE)
++  option(PYTHON_MODULE_${_NAME}_BUILD_SHARED
++    "Add module ${_NAME} shared" ${_TARGET_SUPPORTS_SHARED_LIBS})
++
++  # Mark these options as advanced
++  mark_as_advanced(PYTHON_ENABLE_MODULE_${_NAME}
++    PYTHON_MODULE_${_NAME}_BUILD_SHARED)
++
++  if(PYTHON_ENABLE_MODULE_${_NAME})
++    if(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
++      set(PY_MODULE_TYPE MODULE)
++    else()
++      set(PY_MODULE_TYPE STATIC)
++      set_property(GLOBAL  APPEND  PROPERTY  PY_STATIC_MODULES_LIST ${_NAME})
++    endif()
++
++    set_property(GLOBAL  APPEND  PROPERTY  PY_MODULES_LIST ${_NAME})
++    add_library(${_NAME} ${PY_MODULE_TYPE} ${ARGN})
++#    target_link_libraries(${_NAME} ${PYTHON_LIBRARIES})
++
++    if(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
++      set_target_properties(${_NAME} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}")
++      if(WIN32 AND NOT CYGWIN)
++        set_target_properties(${_NAME} PROPERTIES SUFFIX ".pyd")
++      endif()
++    endif()
++
++  endif()
++endfunction()
++
++function(PYTHON_WRITE_MODULES_HEADER _filename)
++
++  get_property(PY_STATIC_MODULES_LIST  GLOBAL  PROPERTY PY_STATIC_MODULES_LIST)
++
++  get_filename_component(_name "${_filename}" NAME)
++  string(REPLACE "." "_" _name "${_name}")
++  string(TOUPPER ${_name} _nameUpper)
++  set(_filename ${CMAKE_CURRENT_BINARY_DIR}/${_filename})
++
++  set(_filenameTmp "${_filename}.in")
++  file(WRITE ${_filenameTmp} "/*Created by cmake, do not edit, changes will be lost*/\n")
++  file(APPEND ${_filenameTmp}
++"#ifndef ${_nameUpper}
++#define ${_nameUpper}
++
++#include <Python.h>
++
++#ifdef __cplusplus
++extern \"C\" {
++#endif /* __cplusplus */
++
++")
++
++  foreach(_currentModule ${PY_STATIC_MODULES_LIST})
++    file(APPEND ${_filenameTmp} "extern void init${PYTHON_MODULE_PREFIX}${_currentModule}(void);\n\n")
++  endforeach()
++
++  file(APPEND ${_filenameTmp}
++"#ifdef __cplusplus
++}
++#endif /* __cplusplus */
++
++")
++
++
++  foreach(_currentModule ${PY_STATIC_MODULES_LIST})
++    file(APPEND ${_filenameTmp} "int ${_name}_${_currentModule}(void) \n{\n  static char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n")
++  endforeach()
++
++  file(APPEND ${_filenameTmp} "void ${_name}_LoadAllPythonModules(void)\n{\n")
++  foreach(_currentModule ${PY_STATIC_MODULES_LIST})
++    file(APPEND ${_filenameTmp} "  ${_name}_${_currentModule}();\n")
++  endforeach()
++  file(APPEND ${_filenameTmp} "}\n\n")
++  file(APPEND ${_filenameTmp} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n  ${_name}_LoadAllPythonModules();\n}\n#endif\n\n#endif\n")
+ 
++# with configure_file() cmake complains that you may not use a file created using file(WRITE) as input file for configure_file()
++  execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_filenameTmp}" "${_filename}" OUTPUT_QUIET ERROR_QUIET)
+ 
+-INCLUDE(FindPackageHandleStandardArgs)
+-FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs DEFAULT_MSG PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
++endfunction()
diff --git a/debian/rules b/debian/rules
index ef958d1..bd18997 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,67 +1,117 @@
 #! /usr/bin/make -f
 #export DH_VERBOSE=1
 
+# export JAVA_HOME to help FindJava.cmake and FindJNI.cmake
+export JAVA_HOME=/usr/lib/jvm/default-java
+
 DESTDIR = $(CURDIR)/debian/tmp
 UPSTREAM_VERSION = $(shell dpkg-parsechangelog | awk '/^Version:/ { sub("-[^-]*$$", "", $$2); print $$2}')
 
+# FTBS when build in // 
 %:
-	dh $@ --with python2 --parallel
+	dh $@ --builddirectory=$(CURDIR)/Build --with python2 --with javahelper --parallel
 
-export LD_LIBRARY_PATH+=:$(CURDIR)/debian/paraview/usr/lib/paraview
+export LD_LIBRARY_PATH+=:$(CURDIR)/debian/paraview/usr/lib/paraview-4.0
 
 export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
+
 # Explicit settings of MPI_* is required see
 # http://www.vtk.org/Bug/view.php?id=12572
 PYVER = $(shell pyversions -dv)
 extra_flags += -Wno-dev \
-	-DBUILD_DOCUMENTATION=ON \
-	-DCMAKE_INSTALL_RPATH=/usr/lib/paraview \
-	-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=OFF  \
-	-DCMAKE_SKIP_RPATH=OFF \
-	-DBUILD_SHARED_LIBS=ON \
-	-DVTK_USE_SYSTEM_FREETYPE=ON \
-	-DVTK_USE_SYSTEM_JPEG=ON \
-	-DVTK_USE_SYSTEM_PNG=ON \
-	-DBUILD_TESTING=OFF \
-	-DVTK_USE_MPEG2_ENCODER=OFF \
- 	-DVTK_USE_FFMPEG_ENCODER=ON \
- 	-DPARAVIEW_ENABLE_FFMPEG=ON \
-	-DVTK_USE_OGGTHEORA_ENCODER=ON \
-	-DVTK_USE_SYSTEM_OGGTHEORA=ON \
-	-DVTK_INSTALL_LIBRARY_DIR="lib/paraview" \
-	-DVTK_INSTALL_ARCHIVE_DIR="lib/paraview" \
-	-DVTK_INSTALL_INCLUDE_DIR="include/paraview" \
-	-DVTK_INSTALL_DATA_DIR="share/paraview" \
-	-DVTK_INSTALL_DOC_DIR="share/doc/paraview" \
-	-DVTK_INSTALL_PACKAGE_DIR="lib/cmake/paraview" \
-	-DVTK_CUSTOM_LIBRARY_SUFFIX="" \
-	-DVTK_USE_SYSTEM_TIFF=ON \
-	-DVTK_USE_SYSTEM_ZLIB=ON \
-	-DBUILD_EXAMPLES=OFF \
-	-DVTK_USE_SYSTEM_LIBXML2=ON \
-	-DVTK_USE_SYSTEM_EXPAT=ON \
-	-DDOCUMENTATION_HTML_HELP=ON \
-	-DPARAVIEW_INSTALL_DEVELOPMENT_FILES=ON \
-	-DBUILD_DOCUMENTATION=ON \
-	-DPARAVIEW_USE_MPI=ON \
-	-DMPI_INCLUDE_PATH="/usr/include/mpi" \
-	-DVTK_USE_SYSTEM_HDF5=ON \
-	-DPARAVIEW_ENABLE_PYTHON=ON \
-	-DPARAVIEW_BUILD_PLUGIN_AdiosReader:BOOL=ON \
-	-DPARAVIEW_BUILD_PLUGIN_EyeDomeLighting:BOOL=ON \
-	-DEigen_DIR=/usr/include/eigen3
+ -DUSE_EXTERNAL_VTK:BOOL=ON \
+ -DCMAKE_BUILD_TYPE:STRING=RELEASE \
+ -DCMAKE_VERBOSE_MAKEFILE:BOOL=$(DH_VERBOSE) \
+ -DCMAKE_INSTALL_RPATH=/usr/lib/paraview \
+ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=OFF  \
+ -DCMAKE_SKIP_RPATH:BOOL=OFF \
+ -DBUILD_SHARED_LIBS:BOOL=ON \
+ -DPARAVIEW_USE_MPI:BOOL=ON \
+ -DMPI_CXX_INCLUDE_PATH="/usr/include/mpi" \
+ -DMPI_C_INCLUDE_PATH="/usr/include/mpi" \
+ -DPARAVIEW_ENABLE_FFMPEG:BOOL=ON \
+ -DPARAVIEW_ENABLE_PYTHON:BOOL=ON \
+ -DPARAVIEW_BUILD_PLUGIN_AdiosReader:BOOL=ON \
+ -DPARAVIEW_BUILD_PLUGIN_EyeDomeLighting:BOOL=ON \
+ -DPARAVIEW_BUILD_PLUGIN_ForceTime:BOOL=ON \
+ -DPARAVIEW_BUILD_PLUGIN_H5PartReader:BOOL=ON \
+ -DPARAVIEW_BUILD_PLUGIN_PointSprite:BOOL=ON \
+ -DPARAVIEW_BUILD_PLUGIN_SurfaceLIC:BOOL=ON \
+ -DPARAVIEW_USE_SYSTEM_TWISTED:BOOL=ON \
+ -DPARAVIEW_USE_SYSTEM_AUTOBAHN:BOOL=ON \
+ -DPARAVIEW_USE_SYSTEM_ZOPE:BOOL=ON \
+ -DPARAVIEW_USE_SYSTEM_MPI4PY:BOOL=ON \
+ -DPARAVIEW_USE_VISITBRIDGE:BOOL=ON \
+ -DPARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=ON \
+ -DBUILD_DOCUMENTATION:BOOL=ON \
+ 	-DDOCUMENTATION_HTML_HELP:BOOL=OFF \
+ 	-DALLOW_ERASE_OUTPUT_DIRECTORY:BOOL=OFF \
+ 	-DDOCUMENTATION_HTML_TARZ:BOOL=ON \
+ 	-DCREATE_HTML_TARZ_ARCHIVE:BOOL=ON \
+ -DVTK_Group_Imaging:BOOL=ON \
+ -DVTK_Group_MPI:BOOL=ON \
+ -DVTK_Group_ParaView:BOOL=ON \
+ -DVTK_Group_ParaViewCore:BOOL=ON \
+ -DVTK_Group_ParaViewPython:BOOL=ON \
+ -DVTK_Group_ParaViewQt:BOOL=ON \
+ -DVTK_Group_ParaViewRendering:BOOL=ON \
+ -DVTK_Group_Qt:BOOL=ON \
+ -DVTK_Group_Rendering:BOOL=ON \
+ -DVTK_Group_StandAlone:BOOL=ON \
+ -DVTK_Group_Views:BOOL=ON \
+ -DVTK_CUSTOM_LIBRARY_SUFFIX="" \
+ -DEigen_DIR=/usr/include/eigen3
+
+# -DPYTHON_INCLUDE_PATH=/usr/include/python2.7
 	
-  
+# PARAVIEW_USE_PISTON=OFF since it requires cuda
+# PARAVIEW_BUILD_CATALYST_ADAPTORS:BOOL=OFF FTBS when ON - pb with USE_EXTERNAL_VTK
+
+cmake_debug_flgs += \
+	--debug-output --trace --warn-uninitialized
+	 
+override_dh_auto_clean:
+	rm -rf $(CURDIR)/Build
+	rm -rf $(CURDIR)/debian/tmp
+	#if [ -d VTK.old ]; then mv VTK.old VTK; fi
+	#if [ -d pv-src-tmp/VTK.old ]; then mv pv-src-tmp/VTK.old pv-src-tmp/VTK; fi
+	jh_build --clean
+
 override_dh_auto_configure:
+	#mv VTK VTK.old
+	#mv pv-src-tmp/VTK pv-src-tmp/VTK.old
+	
+	mkdir -p $(CURDIR)/Build/java
+	
 	dh_auto_configure -- $(extra_flags)
 
 override_dh_compress:
 	dh_compress -X.qch
 
-override_dh_install:
-	dh_install --list-missing
+override_dh_auto_build:
+	dh_auto_build
+	
+	# Should we patch ParaviewTargets-release.cmake?
+	#                 ParaviewTargets.cmake?
+	find $(CURDIR)/debian/tmp -name ParaViewTargets.cmake | xargs perl -pi -e "s|# Create imported target visitcommon|set(set(_IMPORT_PREFIX \"/usr\")\n# Create imported target visitcommon|/usr|g"
+	
+	# Make doc
+	cd Build && make ParaViewDoxygenDoc 
+
+override_dh_auto_install:
+	#dh_install --list-missing -X.pyo -X.pyc
+	dh_auto_install -X.pyo -X.pyc
+	
+	# 
+	chmod ugo+x $(CURDIR)/debian/tmp/usr/lib/cmake/paraview-4.0/pre-commit
+
+override_dh_shlibdeps:
+	dh_shlibdeps -a -l /usr/lib/jvm/default-java/lib
 
 override_dh_makeshlibs:
 	dh_makeshlibs -V'paraview (>= $(UPSTREAM_VERSION)), paraview (<< $(UPSTREAM_VERSION).)'
+
+override_dh_auto_test:
+	#xvfb-run -a dh_auto_test

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/paraview.git



More information about the debian-science-commits mailing list