Merge commit '8d83cebef638c75e56f746690399d78a572f079a'
[foam-extend-4.0.git] / ThirdParty / AllMake.stage4
blob8f3a0a7f5419ab22bbdf2026b7a82b62c917a942
1 #!/bin/bash
2 #------------------------------------------------------------------------------
3 # ========= |
4 # \\ / F ield | foam-extend: Open Source CFD
5 # \\ / O peration |
6 # \\ / A nd | For copyright notice see file Copyright
7 # \\/ M anipulation |
8 #------------------------------------------------------------------------------
9 # License
10 # This file is part of foam-extend.
12 # foam-extend is free software: you can redistribute it and/or modify it
13 # under the terms of the GNU General Public License as published by the
14 # Free Software Foundation, either version 3 of the License, or (at your
15 # option) any later version.
17 # foam-extend is distributed in the hope that it will be useful, but
18 # WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 # General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 # Script
26 # AllMake.stage4
28 # Description
29 # Build script for ThirdParty packages: Stage4
31 # The foam-extend viewers
33 # Requirements:
34 # 1: Your foam-extend environment must be properly initialized
35 # 2: AllMake.stage1 if you are overriding your system compiler
36 # 3: AllMake.stage2 if you are overriding your system comm. libraries
38 # Author:
39 # Martin Beaudoin, Hydro-Quebec, (2015)
41 #------------------------------------------------------------------------------
42 # run from third-party directory only
43 cd ${0%/*} || exit 1
45 wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
46 echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
47 echo " The environment variables are inconsistent with the installation."
48 echo " Check the foam-extend entries in your dot-files and source them."
49 exit 1
51 . tools/makeThirdPartyFunctionsForRPM
52 #------------------------------------------------------------------------------
54 echo ========================================
55 echo Starting ThirdParty AllMake: Stage4
56 echo ========================================
57 echo
59 # qt-everywhere-opensource-src-4.8.6
60 if [ ! -z "$QT_THIRD_PARTY" ]
61 then
62 # Qt 4.8.6
64 [ ! -z "$WM_THIRD_PARTY_USE_QT_486" ] && {
65 echo "Building Qt 4.8.6"
66 ( rpm_make -p qt-everywhere-opensource-src-4.8.6 -s qt-everywhere-opensource-src-4.8.6.spec -u http://download.qt.io/archive/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz )
68 else
69 echo "Using system installed QT"
70 echo ""
73 # Paraview
74 if [ -z "$PARAVIEW_SYSTEM" ]
75 then
76 # Make sure we get the value of QT_BIN_DIR initialized
77 . $WM_PROJECT_DIR/etc/settings.sh
79 if [ -d "$QT_BIN_DIR" -a -r "$QT_BIN_DIR"/qmake ]
80 then
81 # ParaView 4.0.1
83 [ ! -z "$WM_THIRD_PARTY_USE_PARAVIEW_401" ] && {
84 echo "Building ParaView 4.0.1"
85 ( rpm_make -p ParaView-4.0.1 -s ParaView-4.0.1.spec -u http://downloads.sourceforge.net/project/foam-extend/ThirdParty/ParaView-v4.0.1-source.tgz \
86 -f --define='_qmakePath $QT_BIN_DIR/qmake'
89 # ParaView 4.1.0
91 [ ! -z "$WM_THIRD_PARTY_USE_PARAVIEW_410" ] && {
92 echo "Building ParaView 4.1.0"
93 ( rpm_make -p ParaView-4.1.0 -s ParaView-4.1.0.spec -u http://downloads.sourceforge.net/project/foam-extend/ThirdParty/ParaView-v4.1.0-source.tar.gz \
94 -f --define='_qmakePath $QT_BIN_DIR/qmake'
97 # ParaView 4.3.1
99 [ ! -z "$WM_THIRD_PARTY_USE_PARAVIEW_431" ] && {
100 echo "Building ParaView 4.3.1"
101 ( rpm_make -p ParaView-4.3.1 -s ParaView-4.3.1.spec -u http://downloads.sourceforge.net/project/foam-extend/ThirdParty/ParaView-v4.3.1-source.tar.gz \
102 -f --define='_qmakePath $QT_BIN_DIR/qmake'
105 # ParaView 4.4.0
107 [ ! -z "$WM_THIRD_PARTY_USE_PARAVIEW_440" ] && {
108 echo "Building ParaView 4.4.0"
109 ( rpm_make -p ParaView-4.4.0 -s ParaView-4.4.0.spec -u http://downloads.sourceforge.net/project/foam-extend/ThirdParty/ParaView-v4.4.0-source.tar.gz \
110 -f --define='_qmakePath $QT_BIN_DIR/qmake'
113 else
114 echo "WARNING: "
115 echo "WARNING: Skipping the installation of ParaView-4.x.x."
116 echo "WARNING: Please make sure the QT_BIN_DIR environment variable properly"
117 echo "WARNING: initialized in the file prefs.sh or prefs.csh"
118 echo "WARNING: The command \$QT_BIN_DIR/qmake needs to be valid"
119 echo "WARNING: "
121 else
122 echo "Using system installed ParaView"
123 echo ""
126 # ParaView Server
127 if [ -z "$PARAVIEW_SERVER_THIRD_PARTY" ]
128 then
129 # ParaView 4.1.0: Server-only
131 [ ! -z "$WM_THIRD_PARTY_USE_PARAVIEW_SERVER_410" ] && {
132 echo "Building ParaView Server 4.1.0"
133 ( rpm_make -p llvm-3.6.0 -s llvm-3.6.0.spec -u http://llvm.org/releases/3.6.0/llvm-3.6.0.src.tar.xz )
134 ( rpm_make -p mesa-git -s mesa-git.spec -u ftp://ftp.freedesktop.org/pub/mesa/10.5.3/mesa-10.5.3.tar.gz )
135 ( rpm_make -p ParaView-4.1.0_Server -s ParaView-4.1.0_Server.spec -u http://www.paraview.org/files/v4.1/ParaView-v4.1.0-source.tar.gz \
136 -f --define='_qmakePath $QT_BIN_DIR/qmake'
139 # ParaView 4.3.1: Server-only
141 [ ! -z "$WM_THIRD_PARTY_USE_PARAVIEW_SERVER_431" ] && {
142 echo "Building ParaView Server 4.3.1"
143 ( rpm_make -p llvm-3.6.0 -s llvm-3.6.0.spec -u http://llvm.org/releases/3.6.0/llvm-3.6.0.src.tar.xz )
144 ( rpm_make -p mesa-git -s mesa-git.spec -u ftp://ftp.freedesktop.org/pub/mesa/10.5.3/mesa-10.5.3.tar.gz )
145 ( rpm_make -p ParaView-4.3.1_Server -s ParaView-4.3.1_Server.spec -u http://www.paraview.org/files/v4.3/ParaView-v4.3.1-source.tar.gz \
146 -f --define='_qmakePath $QT_BIN_DIR/qmake'
149 else
150 echo "Using system installed ParaView Server"
151 echo ""
155 echo ========================================
156 echo Done ThirdParty AllMake: Stage4
157 echo ========================================
158 echo
160 # ----------------------------------------------------------------- end-of-file