mirror of
https://develop.openfoam.com/Development/ThirdParty-common.git
synced 2025-12-08 06:57:50 +00:00
ENH: add a patch mechanism for ParaView build
- this adds some flexiblity/robustness to the build
This commit is contained in:
16
README.org
16
README.org
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
#+TITLE: OpenFOAM Third-Party packages
|
#+TITLE: OpenFOAM Third-Party packages
|
||||||
#+AUTHOR: The OpenFOAM Foundation
|
#+AUTHOR: The OpenFOAM Foundation
|
||||||
#+DATE: 31th May 2016
|
#+DATE: 2016-06-14
|
||||||
#+LINK: http://www.openfoam.org
|
#+LINK: http://www.openfoam.org
|
||||||
#+OPTIONS: author:nil ^:{}
|
#+OPTIONS: author:nil ^:{}
|
||||||
# Copyright (c) 2014-2016 OpenFOAM Foundation.
|
# Copyright (c) 2014-2016 OpenFOAM Foundation.
|
||||||
@ -15,6 +15,8 @@
|
|||||||
+ makeCmake (if the system cmake version is < 2.8.8)
|
+ makeCmake (if the system cmake version is < 2.8.8)
|
||||||
+ makeParaView
|
+ makeParaView
|
||||||
*** Optional Build Components:
|
*** Optional Build Components:
|
||||||
|
+ makeLLVM (Replaces makeGcc in the above description
|
||||||
|
- to use clang as compiler)
|
||||||
+ makeCCMIO (Only required for conversion of STAR-CCM+ meshes)
|
+ makeCCMIO (Only required for conversion of STAR-CCM+ meshes)
|
||||||
+ Allclean (Only required to save disk space)
|
+ Allclean (Only required to save disk space)
|
||||||
* Versions and locations to download the third party packages
|
* Versions and locations to download the third party packages
|
||||||
@ -65,13 +67,21 @@
|
|||||||
directory:
|
directory:
|
||||||
+ wget https://raw.githubusercontent.com/Kitware/VTK/40937e934308e5009e80769dc0c451ee4f157749/IO/Geometry/vtkSTLReader.cxx -O ParaView-4.4.0/VTK/IO/Geometry/vtkSTLReader.cxx
|
+ wget https://raw.githubusercontent.com/Kitware/VTK/40937e934308e5009e80769dc0c451ee4f157749/IO/Geometry/vtkSTLReader.cxx -O ParaView-4.4.0/VTK/IO/Geometry/vtkSTLReader.cxx
|
||||||
See also http://www.openfoam.org/mantisbt/view.php?id=1887
|
See also http://www.openfoam.org/mantisbt/view.php?id=1887
|
||||||
|
|
||||||
|
For ParaView-5.0.1, the necessary patches are supplied with the
|
||||||
|
ThirdParty repository (see the etc/patches directory) and are applied
|
||||||
|
when building paraview.
|
||||||
|
|
||||||
*** Building ParaView-5.0.1 with gcc-6.1.0
|
*** Building ParaView-5.0.1 with gcc-6.1.0
|
||||||
***** Add support for gcc-6.?.?
|
***** Add support for gcc-6.?.?
|
||||||
The following cmake files
|
The following cmake files
|
||||||
+ ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake
|
+ ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake
|
||||||
+ ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake
|
+ ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake
|
||||||
specifically limit the gcc versions supported. To add support gcc-6.?.?
|
specifically limit the gcc versions supported.
|
||||||
replace '[345]' with '[3456]'
|
To add support gcc-6.?.? replace the '[345]' with '[3456]'.
|
||||||
|
This patch is also supplied with the ThirdParty repository and
|
||||||
|
applied when building paraview.
|
||||||
|
|
||||||
***** SciberQuestToolKit
|
***** SciberQuestToolKit
|
||||||
The SciberQuestToolKit plugin fails to compile with gcc-6.1.0 and causes
|
The SciberQuestToolKit plugin fails to compile with gcc-6.1.0 and causes
|
||||||
the compilation of ParaView to halt. The easiest solution is to delete
|
the compilation of ParaView to halt. The easiest solution is to delete
|
||||||
|
|||||||
13
etc/patches/mkdiff-paraview-5.0.1
Normal file
13
etc/patches/mkdiff-paraview-5.0.1
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# simple script to generate patches
|
||||||
|
paraview=ParaView-5.0.1
|
||||||
|
|
||||||
|
for i in \
|
||||||
|
$paraview/VTK/CMake/vtkCompilerExtras.cmake \
|
||||||
|
$paraview/VTK/CMake/GenerateExportHeader.cmake \
|
||||||
|
$paraview/Qt/Components/CMakeLists.txt \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
diff -uw $i.orig $i
|
||||||
|
done
|
||||||
39
etc/patches/paraview-5.0.1
Normal file
39
etc/patches/paraview-5.0.1
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
--- ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake.orig 2016-03-28 17:07:10.000000000 +0200
|
||||||
|
+++ ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake 2016-06-11 15:10:14.820958942 +0200
|
||||||
|
@@ -32,7 +32,7 @@
|
||||||
|
OUTPUT_VARIABLE _gcc_version_info
|
||||||
|
ERROR_VARIABLE _gcc_version_info)
|
||||||
|
|
||||||
|
- string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
|
||||||
|
+ string (REGEX MATCH "[3-6]\\.[0-9]\\.[0-9]*"
|
||||||
|
_gcc_version "${_gcc_version_info}")
|
||||||
|
if(NOT _gcc_version)
|
||||||
|
string (REGEX REPLACE ".*\\(GCC\\).*([34]\\.[0-9]).*" "\\1.0"
|
||||||
|
--- ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake.orig 2016-03-28 17:07:10.000000000 +0200
|
||||||
|
+++ ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake 2016-06-11 15:12:16.344357746 +0200
|
||||||
|
@@ -166,7 +166,7 @@
|
||||||
|
execute_process(COMMAND ${CMAKE_C_COMPILER} ARGS --version
|
||||||
|
OUTPUT_VARIABLE _gcc_version_info
|
||||||
|
ERROR_VARIABLE _gcc_version_info)
|
||||||
|
- string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
|
||||||
|
+ string(REGEX MATCH "[3-6]\\.[0-9]\\.[0-9]*"
|
||||||
|
_gcc_version "${_gcc_version_info}")
|
||||||
|
# gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
|
||||||
|
# patch level, handle this here:
|
||||||
|
--- ParaView-5.0.1/Qt/Components/CMakeLists.txt.orig 2016-06-13 09:27:27.827849525 +0200
|
||||||
|
+++ ParaView-5.0.1/Qt/Components/CMakeLists.txt 2016-06-13 09:29:28.599318445 +0200
|
||||||
|
@@ -656,10 +656,10 @@
|
||||||
|
#the pqSGExportStateWizard has subclasses that directly access
|
||||||
|
#the UI file, and currently we don't have a clean way to break this hard
|
||||||
|
#dependency, so for no we install this ui file.
|
||||||
|
-if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
|
||||||
|
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
|
||||||
|
- DESTINATION "${VTK_INSTALL_INCLUDE_DIR}")
|
||||||
|
-endif()
|
||||||
|
+#OPENFOAM patch#if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
|
||||||
|
+#OPENFOAM patch# install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
|
||||||
|
+#OPENFOAM patch# DESTINATION "${VTK_INSTALL_INCLUDE_DIR}")
|
||||||
|
+#OPENFOAM patch#endif()
|
||||||
|
|
||||||
|
#IF (NOT PV_INSTALL_NO_DEVELOPMENT)
|
||||||
|
# # Headers
|
||||||
@ -3,7 +3,7 @@
|
|||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
@ -364,6 +364,34 @@ addQtSupport()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Apply source-code patch if possible
|
||||||
|
#
|
||||||
|
applyPatch()
|
||||||
|
{
|
||||||
|
local patch="$WM_THIRD_PARTY_DIR/etc/patches/paraview-$ParaView_VERSION"
|
||||||
|
local sentinel="PATCHED_DURING_OPENFOAM_BUILD"
|
||||||
|
|
||||||
|
if [ -r "$patch" ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
cd $ParaView_SOURCE_DIR || exit 1
|
||||||
|
if [ -f "$sentinel" ]
|
||||||
|
then
|
||||||
|
echo "patch for paraview-$ParaView_VERSION was already applied"
|
||||||
|
else
|
||||||
|
echo "apply patch for paraview-$ParaView_VERSION"
|
||||||
|
touch "$sentinel"
|
||||||
|
patch -p1 < $patch
|
||||||
|
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
else
|
||||||
|
echo "no patch found for paraview-$ParaView_VERSION"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Configure via cmake, but don't actually build anything
|
# Configure via cmake, but don't actually build anything
|
||||||
#
|
#
|
||||||
|
|||||||
17
makeParaView
17
makeParaView
@ -4,7 +4,7 @@
|
|||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
@ -111,6 +111,7 @@ For example,
|
|||||||
to add tests
|
to add tests
|
||||||
|
|
||||||
For finer control, the build stages can be selected or deselected individually:
|
For finer control, the build stages can be selected or deselected individually:
|
||||||
|
-patch -no-patch
|
||||||
-config -no-config
|
-config -no-config
|
||||||
-make -no-make
|
-make -no-make
|
||||||
-install -no-install
|
-install -no-install
|
||||||
@ -144,7 +145,7 @@ setVersion
|
|||||||
#
|
#
|
||||||
# various building stages
|
# various building stages
|
||||||
#
|
#
|
||||||
unset runCONFIG runMAKE runINSTALL
|
unset runPATCH runCONFIG runMAKE runINSTALL
|
||||||
runDEFAULT=true
|
runDEFAULT=true
|
||||||
buildType=Release
|
buildType=Release
|
||||||
|
|
||||||
@ -163,6 +164,15 @@ do
|
|||||||
export CXX=g++ # use g++
|
export CXX=g++ # use g++
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-patch) # stage 0: patch sources
|
||||||
|
runPATCH=true
|
||||||
|
unset runDEFAULT
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-no-patch)
|
||||||
|
runPATCH=false
|
||||||
|
shift
|
||||||
|
;;
|
||||||
-config) # stage 1: config only
|
-config) # stage 1: config only
|
||||||
runCONFIG=true
|
runCONFIG=true
|
||||||
unset runDEFAULT
|
unset runDEFAULT
|
||||||
@ -285,6 +295,7 @@ done
|
|||||||
|
|
||||||
if [ "$runDEFAULT" = true ]
|
if [ "$runDEFAULT" = true ]
|
||||||
then
|
then
|
||||||
|
: ${runPATCH:=true}
|
||||||
: ${runCONFIG:=true}
|
: ${runCONFIG:=true}
|
||||||
: ${runMAKE:=true}
|
: ${runMAKE:=true}
|
||||||
: ${runINSTALL:=true}
|
: ${runINSTALL:=true}
|
||||||
@ -309,6 +320,7 @@ cat<<SUMMARY
|
|||||||
|
|
||||||
Build stages selected
|
Build stages selected
|
||||||
---------------------
|
---------------------
|
||||||
|
-patch ${runPATCH:-false}
|
||||||
-config ${runCONFIG:-false}
|
-config ${runCONFIG:-false}
|
||||||
-make ${runMAKE:-false}
|
-make ${runMAKE:-false}
|
||||||
-install ${runINSTALL:-false}
|
-install ${runINSTALL:-false}
|
||||||
@ -328,6 +340,7 @@ $(checkVersion)
|
|||||||
---------------------
|
---------------------
|
||||||
SUMMARY
|
SUMMARY
|
||||||
|
|
||||||
|
[ "$runPATCH" = true ] && applyPatch
|
||||||
[ "$runCONFIG" = true ] && configParaView
|
[ "$runCONFIG" = true ] && configParaView
|
||||||
[ "$runMAKE" = true ] && makeParaView
|
[ "$runMAKE" = true ] && makeParaView
|
||||||
[ "$runINSTALL" = true ] && installParaView
|
[ "$runINSTALL" = true ] && installParaView
|
||||||
|
|||||||
Reference in New Issue
Block a user