--- /dev/null
+1/ Build
+$ sh ./scripts/build_salome.sh
+
+2/ Installer les macros
+$ mkdir -p ${HOME}/.config/ParaView/Macros
+$ cp <install>/PARAVIS-760-simp/bin/salome/Macro/*.py ${HOME}/.config/ParaView/Macros/
+
+3/ Set environment
+3.1/ To test Paraview without any patches:
+$ export PARAVIEW_WITH_PATCHES=no_patches
+$ source ./scripts/environment.sh
+
+3.2/ To test Paraview with patches:
+$ source ./scripts/environment.sh
+
+4/ Run MEDREader unit tests
+$ cd <install>/PARAVIS-760-simp/bin/salome/test/MEDReader
+$ ctest -VV
+
+5/ Start pvserver
+pvserver --multi-clients --use-offscreen-rendering &
+
+6/ Run paraview
+$ paraview
--- /dev/null
+Ce dossier contenait initialement un ensemble d'archives utilisées pour
+construire l'application.
+
+Certaines de ces archives correspondent à des outils tiers en libre
+téléchargement. Pour ne pas alourdir le dépôt, ces archives n'ont pas été
+stockées ici, et il appartiendra de les télécharger par ailleurs. Voici ces
+archives :
+
+cmake-2.8.10.2.tar.gz [5.6M]
+hdf5-1.8.10.tar.gz [7.9M]
+med-3.0.8.tar.gz [54M]
+ParaView-v4.3.1-source.tar.gz [49M]
+Python-2.7.3.tgz [14M]
+qt-everywhere-opensource-src-4.8.4.tar.gz [226M]
+swig-2.0.8.tar.gz [5.1M]
+
+Les autres archives correspondent à des éléments de la plate-forme SALOME dans
+une version identifiée. Ces archives n'ayant pas d'existence en dehors du
+contexte présent, on les laisse dans ce dossier.
+
+MED-760-simp.tgz [1.6M]
+ParaView-v4.3.1-patches.tgz [12K]
+PARAVIS-760-simp.tgz [152K]
--- /dev/null
+#!/bin/bash
+
+software_and_version=$1
+archive_file=$2
+
+# get the absolute path of the directory containing this script
+execPath=$(readlink -f $(dirname $0))
+
+archive=${execPath}/../archives/${archive_file}
+src_dir=${execPath}/../src/${software_and_version}
+build_dir=${execPath}/../build/${software_and_version}
+install_dir=${execPath}/../install/${software_and_version}
+
+mkdir -p ${build_dir}
+mkdir -p ${install_dir}
+
+# source extraction
+(
+ if [ ! -d "${src_dir}" ]
+ then
+ ${execPath}/extract.sh ${archive} ${src_dir}
+ fi
+)
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# configure
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ ${src_dir}/configure --prefix=${install_dir}
+) | tee ${build_dir}/configure.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# build
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ make -j${NB_PROC}
+) | tee ${build_dir}/build.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# install
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ make install
+) | tee ${build_dir}/install.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# update environment
+echo "" >> ${execPath}/environment.sh
+echo "#------ Cmake -----------" >> ${execPath}/environment.sh
+echo "export PATH=${install_dir}/bin:\$PATH" >> ${execPath}/environment.sh
--- /dev/null
+#!/bin/bash
+
+software_and_version=$1
+archive_file=$2
+
+# get the absolute path of the directory containing this script
+execPath=$(readlink -f $(dirname $0))
+
+archive=${execPath}/../archives/${archive_file}
+src_dir=${execPath}/../src/${software_and_version}
+build_dir=${execPath}/../build/${software_and_version}
+install_dir=${execPath}/../install/${software_and_version}
+
+mkdir -p ${build_dir}
+mkdir -p ${install_dir}
+
+# source extraction
+(
+ if [ ! -d "${src_dir}" ]
+ then
+ ${execPath}/extract.sh ${archive} ${src_dir}
+ fi
+)
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# configure
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ cmake -DCMAKE_INSTALL_PREFIX=${install_dir} -DHDF5_BUILD_HL_LIB=ON -DHDF5_BUILD_TOOLS=ON -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_Z_LIB_SUPPORT=ON -DCMAKE_BUILD_TYPE=Release ${src_dir}
+) | tee ${build_dir}/configure.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# build
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ make -j${NB_PROC}
+) | tee ${build_dir}/build.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# install
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ make install
+) | tee ${build_dir}/install.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# update environment
+echo "" >> ${execPath}/environment.sh
+echo "#------ hdf5 ------" >> ${execPath}/environment.sh
+echo "export HDF5HOME=${install_dir}" >> ${execPath}/environment.sh
+echo "export PATH=\${HDF5HOME}/bin:\$PATH" >> ${execPath}/environment.sh
+echo "export LD_LIBRARY_PATH=\${HDF5HOME}/lib:\${LD_LIBRARY_PATH}" >> ${execPath}/environment.sh
+echo "export HDF5_DISABLE_VERSION_CHECK=1" >> ${execPath}/environment.sh
--- /dev/null
+#!/bin/bash
+
+software_and_version=$1
+archive_file=$2
+
+# get the absolute path of the directory containing this script
+execPath=$(readlink -f $(dirname $0))
+
+archive=${execPath}/../archives/${archive_file}
+src_dir=${execPath}/../src/${software_and_version}
+build_dir=${execPath}/../build/${software_and_version}
+install_dir=${execPath}/../install/${software_and_version}
+
+mkdir -p ${build_dir}
+mkdir -p ${install_dir}
+
+# source extraction
+(
+ if [ ! -d "${src_dir}" ]
+ then
+ ${execPath}/extract.sh ${archive} ${src_dir}
+ fi
+)
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# configure
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ cmake -DCMAKE_INSTALL_PREFIX=${install_dir} -DMEDFILE_ROOT_DIR=${MED3HOME} -DSALOME_MED_STANDALONE=ON -DSALOME_MED_ENABLE_PYTHON=ON -DSALOME_MED_ENABLE_PARTITIONER=OFF -DSALOME_MED_ENABLE_RENUMBER=OFF -DSALOME_MED_WITH_FILE_EXAMPLES=OFF -DSALOME_BUILD_TESTS=OFF -DSALOME_BUILD_DOC=OFF -DSALOME_MED_MEDLOADER_USE_XDR=OFF ${src_dir}
+) | tee ${build_dir}/configure.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# build
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ make -j${NB_PROC}
+) | tee ${build_dir}/build.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# install
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ make install
+) | tee ${build_dir}/install.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# update environment
+echo "" >> ${execPath}/environment.sh
+echo "#------- MEDCoupling ------" >> ${execPath}/environment.sh
+echo "export MED_ROOT_DIR=${install_dir}" >> ${execPath}/environment.sh
+echo "export LD_LIBRARY_PATH=\${MED_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}" >> ${execPath}/environment.sh
+echo "export PYTHONPATH=\${MED_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}"
--- /dev/null
+#!/bin/bash
+
+software_and_version=$1
+archive_file=$2
+
+# get the absolute path of the directory containing this script
+execPath=$(readlink -f $(dirname $0))
+
+archive=${execPath}/../archives/${archive_file}
+src_dir=${execPath}/../src/${software_and_version}
+build_dir=${execPath}/../build/${software_and_version}
+install_dir=${execPath}/../install/${software_and_version}
+
+mkdir -p ${build_dir}
+mkdir -p ${install_dir}
+
+# source extraction
+(
+ if [ ! -d "${src_dir}" ]
+ then
+ ${execPath}/extract.sh ${archive} ${src_dir}
+ fi
+)
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# configure
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ ${src_dir}/configure --prefix=${install_dir} --with-hdf5=${HDF5HOME} --disable-mesgerr --enable-production
+) | tee ${build_dir}/configure.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# build
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ make -j${NB_PROC}
+) | tee ${build_dir}/build.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# install
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ make install
+) | tee ${build_dir}/install.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# update environment
+echo "" >> ${execPath}/environment.sh
+echo "#------ med fichier ------" >> ${execPath}/environment.sh
+echo "export MED3HOME=${install_dir}" >> ${execPath}/environment.sh
+echo "export PATH=\${MED3HOME}/bin:\${PATH}" >> ${execPath}/environment.sh
+echo "export LD_LIBRARY_PATH=\${MED3HOME}/lib:\${LD_LIBRARY_PATH}" >> ${execPath}/environment.sh
+echo "export PYTHONPATH=\${MED3HOME}/lib/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}" >> ${execPath}/environment.sh
--- /dev/null
+#!/bin/bash
+
+software_and_version=$1
+archive_file=$2
+
+# get the absolute path of the directory containing this script
+execPath=$(readlink -f $(dirname $0))
+
+archive=${execPath}/../archives/${archive_file}
+src_dir=${execPath}/../src/${software_and_version}
+build_dir=${execPath}/../build/${software_and_version}
+install_dir=${execPath}/../install/${software_and_version}
+
+mkdir -p ${build_dir}
+mkdir -p ${install_dir}
+
+# source extraction
+(
+ if [ ! -d "${src_dir}" ]
+ then
+ ${execPath}/extract.sh ${archive} ${src_dir}
+ fi
+)
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# configure
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ cmake -DCMAKE_INSTALL_PREFIX=${install_dir} -DSALOME_BUILD_DOC=OFF -DSALOME_BUILD_TESTS=ON -DSALOME_PARAVIS_ALL_TEST=OFF -DSALOME_PARAVIS_USE_GEOM_SOURCE=OFF -DSALOME_PARAVIS_USE_SMESH_SOURCE=OFF -DSALOME_LIGHT_ONLY=ON -DPARAVIEW_ROOT_DIR=${PVHOME} -DMED_ROOT_DIR=${MED_ROOT_DIR} ${src_dir}
+) | tee ${build_dir}/configure.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# build
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ make -j${NB_PROC}
+) | tee ${build_dir}/build.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# install
+(
+ cd ${build_dir}
+ make install
+) | tee ${build_dir}/install.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# update environment
+echo "" >> ${execPath}/environment.sh
+echo "#------- MEDReader ------" >> ${execPath}/environment.sh
+echo "export PARAVIS_ROOT_DIR=${install_dir}" >> ${execPath}/environment.sh
+echo "export PV_PLUGIN_PATH=\${PARAVIS_ROOT_DIR}/lib/paraview:\${PV_PLUGIN_PATH}" >> ${execPath}/environment.sh
+echo "export LD_LIBRARY_PATH=\${PARAVIS_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}" >> ${execPath}/environment.sh
--- /dev/null
+#!/bin/bash
+
+software_and_version=$1
+archive_file=$2
+no_patches=$3 # set to "no_patches" to build without any patch
+
+# get the absolute path of the directory containing this script
+execPath=$(readlink -f $(dirname $0))
+
+archive=${execPath}/../archives/${archive_file}
+src_dir=${execPath}/../src/${software_and_version}${no_patches}
+build_dir=${execPath}/../build/${software_and_version}${no_patches}
+install_dir=${execPath}/../install/${software_and_version}${no_patches}
+
+mkdir -p ${build_dir}
+mkdir -p ${install_dir}
+
+# source extraction
+(
+ if [ ! -d "${src_dir}" ]
+ then
+ ${execPath}/extract.sh ${archive} ${src_dir}
+ fi
+ patches_archives=${execPath}/../archives/ParaView-v4.3.1-patches.tgz
+ cd ${execPath}/../archives
+ tar xfz ${patches_archives}
+) | tee ${build_dir}/pre_configure.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# pre-configure: apply patches (see Readme file in patches directory)
+(
+ if [ "xx${no_patches}xx" != "xxno_patchesxx" ]
+ then
+ patches_dir=${execPath}/../archives/ParaView-v4.3.1-patches
+ cd ${src_dir}
+ patch -p1 < ${patches_dir}/0001-22863-EDF-PARAVIS-Double-SIGSEGV-when-exiting-Salome.patch
+ patch -p1 < ${patches_dir}/0002-Enable-multi-threading-support-for-Python-in-ParaVie.patch
+ patch -p1 < ${patches_dir}/0003-22593-CEA-1175-PARAVIS-segmentation-fault.patch
+ patch -p1 < ${patches_dir}/0004-Fix-problem-with-installation-of-VTKTargets.cmake-fi.patch
+ patch -p1 < ${patches_dir}/0005-22607-EDF-8282-SMESH-Two-identical-tetras-give-diffe.patch
+ patch -p1 < ${patches_dir}/0006-Additional-patch-for-compilation-of-VisitBridge-with.patch
+ patch -p1 < ${patches_dir}/0029-Suppress-this-boring-warning-and-error.patch
+ patch -p1 < ${patches_dir}/0030-22871-EDF-10092-PARAVIS-The-macro-modes-is-not-displ.patch
+ patch -p1 < ${patches_dir}/EDFp02_Bug8663_Magnitude_Coloring.patch
+ fi
+)
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# configure
+# set BUILD_DOCUMENTATION=OFF to avoid Doxygen dependency
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ export PYTHON_INSTALL_DIR=${PYTHONHOME}
+ export HDF5_INSTALL_DIR=${HDF5HOME}
+ unset PYTHONHOME
+ cmake -DCMAKE_INSTALL_PREFIX=${install_dir} -DPYTHON_ROOT_DIR="${PYTHON_INSTALL_DIR}" -DHDF5_ROOT_DIR="${HDF5_INSTALL_DIR}" -DPYTHON_EXECUTABLE=${PYTHON_INSTALL_DIR}/bin/python${PYTHON_VERSION} -DPYTHON_INCLUDE_DIR=${PYTHON_INSTALL_DIR}/include/python${PYTHON_VERSION} -DPYTHON_LIBRARY=${PYTHON_INSTALL_DIR}/lib/libpython${PYTHON_VERSION}.so -DHDF5_LIBRARIES=${HDF5_INSTALL_DIR}/lib -DHDF5_INCLUDE_DIRS=${HDF5_INSTALL_DIR}/include -DHDF5_CXX_COMPILER_EXECUTABLE=${HDF5_INSTALL_DIR}/bin/h5pcc -DHDF5_HL_INCLUDE_DIR=${HDF5_INSTALL_DIR}/include -DHDF5_hdf5_hl_LIBRARY=${HDF5_INSTALL_DIR}/lib/libhdf5_hl.so -DHDF5_hdf5_hl_LIBRARY_RELEASE=${HDF5_INSTALL_DIR}/lib/libhdf5_hl.so -DHDF5_hdf5_hl_LIBRARY_DEBUG=${HDF5_INSTALL_DIR}/lib/libhdf5_hl.so -DHDF5_HL_LIBRARY=${HDF5_INSTALL_DIR}/lib/libhdf5_hl.so -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Release -DPARAVIEW_INSTALL_DEVELOPMENT:BOOL=ON -DPARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=ON -DVTK_USE_64BIT_IDS:BOOL=OFF -DPARAVIEW_BUILD_QT_GUI:BOOL=ON -DVTK_QT_USE_WEBKIT:BOOL=ON -DQT_TESTING_INSTALL_DEVELOPMENT:BOOL=ON -DPARAVIEW_ENABLE_PYTHON:BOOL=ON -DVTK_USE_SYSTEM_HDF5:BOOL=ON -DVTK_USE_GL2PS:BOOL=ON -DPARAVIEW_BUILD_PLUGIN_Moments:BOOL=OFF -DPARAVIEW_BUILD_PLUGIN_SierraPlotTools:BOOL=OFF -DPARAVIEW_BUILD_PLUGIN_SLACTools:BOOL=OFF -DPARAVIEW_INSTALL_DEVELOPMENT_FILES=ON -DVTK_NO_PYTHON_THREADS=OFF -DPARAVIEW_ENABLE_CATALYST:BOOL= OFF -DPARAVIEW_BUILD_PLUGIN_AnalyzeNIfTIIO:BOOL= OFF -DPARAVIEW_BUILD_PLUGIN_ArrowGlyph:BOOL= OFF -DPARAVIEW_BUILD_PLUGIN_CatalystScriptGeneratorPlugin:BOOL=OFF -DPARAVIEW_BUILD_PLUGIN_GMVReader:BOOL= OFF -DPARAVIEW_BUILD_PLUGIN_MobileRemoteControl:BOOL= OFF -DPARAVIEW_BUILD_PLUGIN_NonOrthogonalSource:BOOL= OFF -DPARAVIEW_BUILD_PLUGIN_QuadView:BOOL= OFF -DPARAVIEW_BUILD_PLUGIN_PacMan:BOOL= OFF -DPARAVIEW_BUILD_PLUGIN_PrismPlugin:BOOL=OFF -DPARAVIEW_BUILD_PLUGIN_RGBZView:BOOL= OFF -DPARAVIEW_BUILD_PLUGIN_SciberQuestToolKit:BOOL= OFF -DPARAVIEW_BUILD_PLUGIN_StreamingParticles:BOOL= ON -DPARAVIEW_BUILD_PLUGIN_UncertaintyRendering:BOOL= ON -DPARAVIEW_ENABLE_MATPLOTLIB: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 -DCMAKE_BUILD_QT_GUI:BOOL=ON -DVTK_USE_SYSTEM_LIBXML2:BOOL=ON -DVTK_USE_OGGTHEORA_ENCODER:BOOL=ON -DPARAVIEW_INSTALL_THIRD_PARTY_LIBRARIES:BOOL=OFF -DBUILD_DOCUMENTATION:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DBUILD_TESTING:BOOL=OFF -DPARAVIEW_GENERATE_PROXY_DOCUMENTATION:BOOL=ON ${src_dir}
+) | tee ${build_dir}/configure.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# build
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ make -j${NB_PROC}
+) | tee ${build_dir}/build.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# install
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ make install
+) | tee ${build_dir}/install.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# post-install
+(
+ cp ${src_dir}/VTK/CMake/TopologicalSort.cmake ${install_dir}/lib/cmake/paraview-4.3
+ cp ${src_dir}/ParaViewCore/ServerImplementation/Core/vtkSIVectorPropertyTemplate.h ${install_dir}/include/paraview-4.3
+) | tee ${build_dir}/post_install.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# update environment
+if [ "xx${no_patches}xx" != "xxno_patchesxx" ] # assume environment is only defined when compiling with patches
+# Introduce PARAVIEW_WITH_PATCHES to switch on/off patches at runtime
+then
+ echo "" >> ${execPath}/environment.sh
+ echo "#------ ParaView ------" >> ${execPath}/environment.sh
+ echo "export PVHOME=${install_dir}\${PARAVIEW_WITH_PATCHES}" >> ${execPath}/environment.sh
+ echo "export PATH=\${PVHOME}/bin:\$PATH" >> ${execPath}/environment.sh
+ echo "export PVVERSION=4.3" >> ${execPath}/environment.sh
+ echo "export PV_PLUGIN_PATH=\$(readlink -f \${PVHOME}/lib/paraview-\${PVVERSION}:\${PV_PLUGIN_PATH})" >> ${execPath}/environment.sh
+ echo "export LD_LIBRARY_PATH=\${PVHOME}/lib/paraview-\${PVVERSION}:\$LD_LIBRARY_PATH" >> ${execPath}/environment.sh
+ echo "PYTHONPATH=\${PVHOME}/lib/paraview-\${PVVERSION}:\${PYTHONPATH}" >> ${execPath}/environment.sh
+ echo "PYTHONPATH=\${PVHOME}/lib/paraview-\${PVVERSION}/site-packages:\${PYTHONPATH}" >> ${execPath}/environment.sh
+ echo "PYTHONPATH=\${PVHOME}/lib/paraview-\${PVVERSION}/site-packages/vtk:\${PYTHONPATH}" >> ${execPath}/environment.sh
+ echo "PYTHONPATH=\${PVHOME}/lib/paraview-\${PVVERSION}/site-packages/paraview/vtk:\${PYTHONPATH}" >> ${execPath}/environment.sh
+fi
+#
--- /dev/null
+#!/bin/bash
+
+software_and_version=$1
+archive_file=$2
+
+# get the absolute path of the directory containing this script
+execPath=$(readlink -f $(dirname $0))
+
+archive=${execPath}/../archives/${archive_file}
+src_dir=${execPath}/../src/${software_and_version}
+build_dir=${execPath}/../build/${software_and_version}
+install_dir=${execPath}/../install/${software_and_version}
+
+mkdir -p ${build_dir}
+mkdir -p ${install_dir}
+
+# source extraction
+(
+ if [ ! -d "${src_dir}" ]
+ then
+ ${execPath}/extract.sh ${archive} ${src_dir}
+ fi
+)
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# configure
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ ${src_dir}/configure --prefix=${install_dir} --enable-shared --enable-unicode=ucs4 -without-pymalloc || exit 1
+) | tee ${build_dir}/configure.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# build
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ make -j${NB_PROC} || exit 1
+) | tee ${build_dir}/build.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# install
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ make install || exit 1
+) | tee ${build_dir}/install.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# post-install
+(
+ cd ${install_dir}
+ echo "# Add auto-completion and a stored history file of commands to your Python
+# interactive interpreter. Requires Python 2.0+, readline. Autocomplete is
+# bound to the TAB key by default (you can change it - see readline docs).
+#
+# Store the history in ~/pyhistory,
+#
+try:
+ import readline
+ import atexit
+ import os
+ import rlcompleter
+ readline.parse_and_bind('tab: complete')
+
+ historyPath = os.path.expanduser('~/pyhistory')
+
+ MAXLINES = 1000
+ readline.set_history_length(MAXLINES)
+
+ def save_history(historyPath=historyPath):
+ import readline
+ readline.write_history_file(historyPath)
+
+ if os.path.exists(historyPath):
+ readline.read_history_file(historyPath)
+
+ atexit.register(save_history)
+ del os, atexit, readline, rlcompleter, save_history, historyPath
+except:
+ pass" > pythonrc.py
+) | tee ${build_dir}/post_install.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# update environment
+echo "" >> ${execPath}/environment.sh
+echo "#------ python ------" >> ${execPath}/environment.sh
+echo "export PYTHONHOME=${install_dir}" >> ${execPath}/environment.sh
+echo "export PYTHONSTARTUP=\${PYTHONHOME}/pythonrc.py" >> ${execPath}/environment.sh
+echo "export PYTHON_VERSION=\"2.7\"" >> ${execPath}/environment.sh
+echo "export PYTHON_INCLUDE=\${PYTHONHOME}/include/python\${PYTHON_VERSION}" >> ${execPath}/environment.sh
+echo "export PATH=\${PYTHONHOME}/bin:\${PATH}" >> ${execPath}/environment.sh
+echo "export LD_LIBRARY_PATH=\${PYTHONHOME}/lib:\${LD_LIBRARY_PATH}" >> ${execPath}/environment.sh
--- /dev/null
+#!/bin/bash
+
+software_and_version=$1
+archive_file=$2
+
+# get the absolute path of the directory containing this script
+execPath=$(readlink -f $(dirname $0))
+
+archive=${execPath}/../archives/${archive_file}
+src_dir=${execPath}/../src/${software_and_version}
+build_dir=${execPath}/../build/${software_and_version}
+install_dir=${execPath}/../install/${software_and_version}
+
+mkdir -p ${build_dir}
+mkdir -p ${install_dir}
+
+# source extraction
+(
+ if [ ! -d "${src_dir}" ]
+ then
+ ${execPath}/extract.sh ${archive} ${src_dir}
+ fi
+)
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# configure
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ ${src_dir}/configure --prefix=${install_dir} -opensource -confirm-license -no-rpath
+) | tee ${build_dir}/configure.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# build
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ make -j${NB_PROC}
+) | tee ${build_dir}/build.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# install
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ make install
+) | tee ${build_dir}/install.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# update environment
+echo "" >> ${execPath}/environment.sh
+echo "# ------ Qt -------------" >> ${execPath}/environment.sh
+echo "export QTDIR=${install_dir}" >> ${execPath}/environment.sh
+echo "export PATH=\${QTDIR}/bin:\$PATH" >> ${execPath}/environment.sh
+echo "export QT_PLUGIN_PATH=\${QTDIR}/plugins" >> ${execPath}/environment.sh
+echo "export LD_LIBRARY_PATH=\${QTDIR}/lib:\${LD_LIBRARY_PATH}" >> ${execPath}/environment.sh
--- /dev/null
+#!/bin/bash
+
+# get the absolute path of the directory containing this script
+execPath=$(readlink -f $(dirname $0))
+
+# initialize environment
+export NB_PROC=`grep -c ^processor /proc/cpuinfo`
+
+mkdir -p src
+> ${execPath}/environment.sh
+
+# build sofwares
+${execPath}/build_python.sh Python-273 Python-2.7.3.tgz
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+${execPath}/build_cmake.sh cmake-28102 cmake-2.8.10.2.tar.gz
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+${execPath}/build_hdf5.sh hdf5-1810 hdf5-1.8.10.tar.gz
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+${execPath}/build_swig.sh swig-208 swig-2.0.8.tar.gz
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+${execPath}/build_qt.sh qt-484 qt-everywhere-opensource-src-4.8.4.tar.gz
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# Paraview: Build with patches
+${execPath}/build_paraview.sh ParaView-v431 ParaView-v4.3.1-source.tar.gz
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+# Paraview: Build without patches
+${execPath}/build_paraview.sh ParaView-v431 ParaView-v4.3.1-source.tar.gz no_patches
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+${execPath}/build_medfichier.sh med-308 med-3.0.8.tar.gz
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+${execPath}/build_medcoupling.sh MED-760-simp MED-760-simp.tgz
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+${execPath}/build_medreader.sh PARAVIS-760-simp PARAVIS-760-simp.tgz
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+echo "Build successful"
--- /dev/null
+#!/bin/bash
+
+software_and_version=$1
+archive_file=$2
+
+# get the absolute path of the directory containing this script
+execPath=$(readlink -f $(dirname $0))
+
+archive=${execPath}/../archives/${archive_file}
+src_dir=${execPath}/../src/${software_and_version}
+build_dir=${execPath}/../build/${software_and_version}
+install_dir=${execPath}/../install/${software_and_version}
+
+mkdir -p ${build_dir}
+mkdir -p ${install_dir}
+
+# source extraction
+(
+ if [ ! -d "${src_dir}" ]
+ then
+ ${execPath}/extract.sh ${archive} ${src_dir}
+ fi
+)
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# configure
+(
+ cd ${build_dir}
+ ${src_dir}/configure --prefix=${install_dir} --without-pcre --without-octave
+) | tee ${build_dir}/configure.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# build
+(
+ cd ${build_dir}
+ . ${execPath}/environment.sh
+ make -j${NB_PROC}
+) | tee ${build_dir}/build.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# install
+(
+ cd ${build_dir}
+ make install
+) | tee ${build_dir}/install.log 2>&1
+status=$?; if [ ${status} -ne 0 ]; then exit ${status}; fi
+
+# update environment
+echo "" >> ${execPath}/environment.sh
+echo "#------ swig ------" >> ${execPath}/environment.sh
+echo "export SWIG_ROOT_DIR=${install_dir}" >> ${execPath}/environment.sh
+echo "export SWIG_LIB=\${SWIG_ROOT_DIR}/share/swig/2.0.8" >> ${execPath}/environment.sh
+echo "export PATH=\${SWIG_ROOT_DIR}/bin:\$PATH" >> ${execPath}/environment.sh
--- /dev/null
+#!/bin/bash
+
+#
+# Extract archive_file contents to src_dir
+archive=$1
+src_dir=$2
+#
+
+# extract to temp directory
+tmp_dir=`mktemp -d`
+mkdir -p ${tmp_dir}
+if [[ "$archive" == *.tar.gz || "$archive" == *.tgz ]]
+then
+ tar xfz ${archive} -C ${tmp_dir}
+elif [[ "$archive" == *.tar.bz2 ]]
+then
+ tar xfj ${archive} -C ${tmp_dir}
+else
+ echo "Error: unrecognized file extension for archive:" ${archive}
+ exit 1
+fi
+
+# check extracted contents:
+# - if single directory, rename it as src_dir
+# - if multiple files/dirs, rename tmp_dir as src_dir
+nb_inner=`ls -A1 ${tmp_dir} | wc -l`
+if [[ "$nb_inner" -eq 1 ]]
+then
+ inner_element=`ls -A1 ${tmp_dir}`
+ rm -rf ${src_dir}
+ mv ${tmp_dir}/${inner_element} ${src_dir}
+else
+ rm -rf ${src_dir}
+ mv ${tmp_dir} ${src_dir}
+fi