From: vsr Date: Fri, 29 Nov 2013 14:20:08 +0000 (+0000) Subject: SALOME 7.3.0 preparation X-Git-Tag: V7_3_0rc1~35 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=414485b6c5773c3db51753b00d5c982659fae9a9;p=tools%2Finstall.git SALOME 7.3.0 preparation --- diff --git a/config_files/libBatch.sh b/config_files/libBatch.sh index cf316f6..fb4e533 100755 --- a/config_files/libBatch.sh +++ b/config_files/libBatch.sh @@ -12,7 +12,7 @@ # #################################################################################### -LIBBATCH_VERSION=2.0.0 +LIBBATCH_VERSION=2.1.0 check_version(){ # No way to check version! @@ -22,7 +22,7 @@ return 0 print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <> ${PRODUCT_DIR}/MAKE.LOG < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INST_ROOT}/${PRODUCT_TYPE}.src.size +fi + # to generate environment scripts try_preinstalled } @@ -86,15 +89,20 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} GCC=`which gcc` cat >> ${PRODUCT_DIR}/MAKE.LOG < ${INST_ROOT}/${PRODUCT_TYPE}.build.size + du -sk ${PRODUCT_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.bin.size +fi # remove sources and temporary files after building -if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then +if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR} fi @@ -105,7 +113,7 @@ try_preinstalled install_binary() { make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} -source ${INSTALL_WORK}/$SHRC +source ${INSTALL_WORK}/${SHRC} # create a product directory test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} @@ -113,13 +121,10 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR} # modify *.la files -cd ${PRODUCT_DIR}/lib -test -f libxml2.la && sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g;" libxml2.la -test -f python${PYTHON_VERSION}/site-packages/libxml2mod.la && sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib/python${PYTHON_VERSION}/site-packages'%g;s%[^[:space:]]*/libxml2.la%${PRODUCT_DIR}/lib/libxml2.la%g" python${PYTHON_VERSION}/site-packages/libxml2mod.la - +test -f ${PRODUCT_DIR}/lib/libxml2.la && sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g;" ${PRODUCT_DIR}/lib/libxml2.la +test -f ${PRODUCT_DIR}/lib/python${PYTHON_VERSION}/site-packages/libxml2mod.la && sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib/python${PYTHON_VERSION}/site-packages'%g;s%[^[:space:]]*/libxml2.la%${PRODUCT_DIR}/lib/libxml2.la%g" ${PRODUCT_DIR}/lib/python${PYTHON_VERSION}/site-packages/libxml2mod.la # modify pkgconfig -cd ${PRODUCT_DIR}/lib/pkgconfig -for l in X `find . -name "*.pc"`; do +for l in X `find ${PRODUCT_DIR}/lib/pkgconfig -name "*.pc"`; do if [ "${l}" != "X" ] ; then sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g" ${l} fi @@ -141,10 +146,10 @@ export PRODUCT_TYPE=$6; export INSTALL_PRODUCTS=$7; shift REMOVE_SRC_TMP=$8; -test $# == 10 && shift && SINGLE_DIR=$9 -export PRODUCT="libxml2-${LIBXML_VERSION}" +test $# = 10 && shift && SINGLE_DIR=$9 +export PRODUCT="libxml2-${VERSION_LIBXML}" export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC source ./common.sh -$PROCEDURE +${PROCEDURE} diff --git a/config_files/med.sh b/config_files/med.sh index 40d6b3a..3af7824 100755 --- a/config_files/med.sh +++ b/config_files/med.sh @@ -15,17 +15,15 @@ # # med library version # -MED_VERSION=3.0.6 +VERSION_MED=3.0.7 check_version() { -if [ -z "$MED3HOME" ]; then - #echo "MED3HOME doesn't set" +if [ -z "${MEDFILE_ROOT_DIR}" ]; then return 1 fi -check_lib_version libmed.so.1.1.2 ${MED3HOME}/lib +check_lib_version libmedC.so ${MEDFILE_ROOT_DIR}/lib if [ "$?" -eq "0" ]; then - #echo "The product ${PRODUCT} has been already installed on yours system" return 0 fi return 1 @@ -34,10 +32,10 @@ return 1 print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INST_ROOT}/${PRODUCT_TYPE}.src.size +fi + # to generate environment scripts try_preinstalled } @@ -79,36 +81,50 @@ install_source_and_build() install_source # build sources -cd ${PRODUCT_SRC_DIR} test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} -# --disable-mesgerr -if test `uname -m` = "x86_64" ; then - echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} FFLAGS='-g -O2 -ffixed-line-length-none -fPIC' CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG" - ./configure --prefix=${PRODUCT_DIR} FFLAGS="-g -O2 -ffixed-line-length-none -fPIC" CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${PRODUCT_SRC_DIR}/errlog -else - echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} FFLAGS='-g -O2 -ffixed-line-length-none' >> ${PRODUCT_DIR}/CONFIGURE.LOG" - ./configure --prefix=${PRODUCT_DIR} FFLAGS="-g -O2 -ffixed-line-length-none" >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${PRODUCT_SRC_DIR}/errlog -fi -if [ "$?" -ne "0" ] ; then - cat ${PRODUCT_DIR}/CONFIGURE.LOG - cat ${PRODUCT_SRC_DIR}/errlog >&2 - cat ${PRODUCT_SRC_DIR}/errlog >> ${PRODUCT_DIR}/CONFIGURE.LOG - exit 1 +# create build directory +export PRODUCT_BUILD_DIR=${PRODUCT_DIR}_build +mkdir ${PRODUCT_BUILD_DIR} +cd ${PRODUCT_BUILD_DIR} + +CMAKE_OPTIONS="" +# general options +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX=${PRODUCT_DIR}" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_BUILD_TYPE=Release" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DMEDFILE_BUILD_SHARED_LIBS=ON" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DMEDFILE_BUILD_TESTS=OFF -DMEDFILE_INSTALL_DOC=ON" +# Python options +if [ "${PYTHON_ROOT_DIR}" != "" ] ; then + CMAKE_OPTIONS="${CMAKE_OPTIONS} -DMEDFILE_BUILD_PYTHON=ON" + CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPYTHON_INCLUDE_DIR=${PYTHON_ROOT_DIR}/include/python${PYTHON_VERSION}" + CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPYTHON_LIBRARY=${PYTHON_ROOT_DIR}/lib/python${PYTHON_VERSION}/config/libpython${PYTHON_VERSION}.so" fi +# -DMEDFILE_BUILD_STATIC_LIBS=ON -GCC=`which gcc` -cat >> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/CONFIGURE.LOG < ${PRODUCT_DIR}/MAKE.LOG < ${INST_ROOT}/${PRODUCT_TYPE}.build_src.size + du -sk ${PRODUCT_BUILD_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.build_bld.size + du -sk ${PRODUCT_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.bin.size +fi # remove sources and temporary files after building -if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then +if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR} fi @@ -119,44 +135,36 @@ try_preinstalled install_binary() { make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} -source ${INSTALL_WORK}/$SHRC +source ${INSTALL_WORK}/${SHRC} # create a product directory test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR} -### modify *.la files to correct direct path to hdf5 library and to med library -cd ${PRODUCT_DIR}/lib +# correct installation path -tmp="" -if [ -n "${HDF5HOME}" ]; then - tmp="-L${HDF5HOME}/lib" -fi -for fl in libmed.la libmedC.la libmedimport.la ; do - sed -i "s%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g;s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" ${fl} - sed -i "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\+\.[0-9]\+\.[0-9]\+/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" ${fl} - sed -i "s%\(.*\)\([[:space:]].*-L../../src/\)\(.*\)%\1\3%g;s%\(.*\)\([[:space:]].*libmed.la\)\(.*\)%\1 ${PRODUCT_DIR}/lib/libmed.la \3%g" ${fl} +# - modify scripts +for l in xmdump xmdump2 xmdump3 ; do + if [ -f ${PRODUCT_DIR}/bin/${l} ] ; then + sed -i "s%set cmd \".*/bin/%set cmd \"${PRODUCT_DIR}/bin/p%g" ${PRODUCT_DIR}/bin/${l} + fi done - -### modify scripts to correct installation path -### this pb is fixed in med 3.0.6 -#cd ${PRODUCT_DIR}/bin -#for fl in xmdump xmdump3 ; do -# if [ -f ${fl} ] ; then -# sed -i "s%set cmd \".*/bin/mdump\"%set cmd \"${PRODUCT_DIR}/bin/mdump\"%g;s%#\!.*wish -f%#\!/usr/bin/env wish%g" ${fl} -# fi -#done - -# modify settings file -cd ${PRODUCT_DIR}/lib -sed -i "s%Installation point: .*%Installation point: ${PRODUCT_DIR}%g" libmed3.settings -sed -i "s%-I[^[:space:]]*/hdf5-[0-9]\+\.[0-9]\+\.[0-9]\+/include%-I${HDF5HOME}/include%g" libmed3.settings -sed -i "s%-L[^[:space:]]*/hdf5-[0-9]\+\.[0-9]\+\.[0-9]\+/lib%-L${HDF5HOME}/lib%g" libmed3.settings -sed -i "s%[^[:space:]]*/hdf5-[0-9]\+\.[0-9]\+\.[0-9]\+/bin%${HDF5HOME}/bin%g" libmed3.settings -sed -i "s%Tk/wish used for xmdump :.*%Tk/wish used for xmdump : ${TCLHOME}/bin/wish%g" libmed3.settings - -# +# - modify settings file +settings_file=${PRODUCT_DIR}/lib/libmed3.settings +if [ ! -e ${settings_file} ] ; then settings_file=${PRODUCT_DIR}/share/cmake/MEDFile/libmed3.settings ; fi +if [ -e ${settings_file} ] ; then + sed -i "s%Installation point: .*%Installation point: ${PRODUCT_DIR}%g" ${settings_file} + sed -i "s%-I[^[:space:]]*/hdf5-[0-9]\+\.[0-9]\+\.[0-9]\+/include%-I${HDF5_ROOT_DIR}/include%g" ${settings_file} + sed -i "s%-L[^[:space:]]*/hdf5-[0-9]\+\.[0-9]\+\.[0-9]\+/lib%-L${HDF5_ROOT_DIR}/lib%g" ${settings_file} + sed -i "s%[^[:space:]]*/hdf5-[0-9]\+\.[0-9]\+\.[0-9]\+/bin%${HDF5_ROOT_DIR}/bin%g" ${settings_file} + sed -i "s%Tk/wish used for xmdump :.*%Tk/wish used for xmdump : ${TCLHOME}/bin/wish%g" ${settings_file} +fi +# - modify cmake configuration file +cfg_file=${PRODUCT_DIR}/share/cmake/MEDFile/MEDFileConfig.cmake +if [ -e ${cfg_file} ] ; then + sed -i "s%\"\([^[:space:]\"]*.hdf5-[0-9.]*\)%\"${HDF5_ROOT_DIR}%g" ${cfg_file} +fi # to generate environment script for sources try_preinstalled @@ -173,9 +181,9 @@ shift REMOVE_SRC_TMP=$8; shift SINGLE_DIR=$9 -export PRODUCT="med-${MED_VERSION}" +export PRODUCT="med-${VERSION_MED}" export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC source ./common.sh -$PROCEDURE +${PROCEDURE} diff --git a/config_files/metis.sh b/config_files/metis.sh index 3873b81..aa583ce 100755 --- a/config_files/metis.sh +++ b/config_files/metis.sh @@ -15,9 +15,9 @@ # # metis version # -METIS_VERSION=4.0 +VERSION_METIS=4.0 # 5.0.2 -METIS_MAJOR_VERSION=`echo ${METIS_VERSION} | awk -F. '{print $1}'` +METIS_MAJOR_VERSION=`echo ${VERSION_METIS} | awk -F. '{print $1}'` check_version(){ # No way to check version! @@ -27,8 +27,8 @@ return 0 print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INST_ROOT}/${PRODUCT_TYPE}.src.size +fi + # to generate environment scripts try_preinstalled } @@ -69,10 +73,11 @@ install_source_and_build() install_source # build sources -cd ${PRODUCT_SRC_DIR} test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} -if [ "${METIS_MAJOR_VERSION}" == "5" ] ; then +cd ${PRODUCT_SRC_DIR} + +if [ "${METIS_MAJOR_VERSION}" = "5" ] ; then # for version 5 # make config @@ -102,10 +107,15 @@ else ( mkdir -p ${PRODUCT_DIR}/Lib && cp Lib/*.h ${PRODUCT_DIR}/Lib ) fi -cd ${PRODUCT_DIR}; +cd ${PRODUCT_DIR} + +if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then + du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.build.size + du -sk ${PRODUCT_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.bin.size +fi # remove sources and temporary files after building -if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then +if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR} fi @@ -116,7 +126,7 @@ try_preinstalled install_binary() { make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} -source ${INSTALL_WORK}/$SHRC +source ${INSTALL_WORK}/${SHRC} # create a product directory test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} @@ -136,10 +146,10 @@ export PRODUCT_TYPE=$6; export INSTALL_PRODUCTS=$7; shift REMOVE_SRC_TMP=$8; -test $# == 10 && shift && SINGLE_DIR=$9 -export PRODUCT="metis-${METIS_VERSION}" +test $# = 10 && shift && SINGLE_DIR=$9 +export PRODUCT="metis-${VERSION_METIS}" export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC source ./common.sh -$PROCEDURE +${PROCEDURE}