From: vsr Date: Fri, 29 Nov 2013 13:20:29 +0000 (+0000) Subject: SALOME 7.3.0 preparation X-Git-Tag: V7_3_0rc1~40 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=013cbdd76b0a52601c8adace9907f2d5d8fc0e80;p=tools%2Finstall.git SALOME 7.3.0 preparation --- diff --git a/config_files/HexoticPLUGIN.sh b/config_files/HexoticPLUGIN.sh index bfcca35..ebc0540 100755 --- a/config_files/HexoticPLUGIN.sh +++ b/config_files/HexoticPLUGIN.sh @@ -15,8 +15,8 @@ check_version(){ if [ -n "${HexoticPLUGIN_ROOT_DIR}" ]; then if [ -f ${HexoticPLUGIN_ROOT_DIR}/bin/salome/VERSION ]; then - ver=`cat ${HexoticPLUGIN_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $NF}' | tr -d '[:space:]' ` - if [ "$ver" = "${SALOME_VERSION}" ]; then + ver=`head -n1 ${HexoticPLUGIN_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` + if [ "${ver}" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -30,7 +30,7 @@ return 1 print_env_bin(){ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < /dev/null version=`cat bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]'` - dir="${HOME}/salome_appli_$version" - ./bin/salome/createAppli.sh $dir - if [ -d $dir/env.d ] ; then - rm -rf $dir/env.d/*.sh + dir="${HOME}/salome_appli_${version}" + ./bin/salome/createAppli.sh ${dir} + if [ -d ${dir}/env.d ] ; then + rm -rf ${dir}/env.d/*.sh fi - if [ ! -e $dir/env.d ] ; then - mkdir -p $dir/env.d + if [ ! -e ${dir}/env.d ] ; then + mkdir -p ${dir}/env.d fi - cp -f ${PRODUCT_DIR}/salome.sh $dir/env.d + cp -f ${PRODUCT_DIR}/salome.sh ${dir}/env.d popd > /dev/null fi create_config.sh ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_DIR} @@ -166,9 +166,9 @@ REMOVE_SRC_TMP=$8; shift shift SINGLE_DIR=$9; -if [ -n "$SINGLE_DIR" ] ; then SINGLE_DIR=$SDIR_NAME; fi +if [ -n "${SINGLE_DIR}" ] ; then SINGLE_DIR=${SDIR_NAME}; fi export PRODUCT="KERNEL_${SALOME_VERSION}" export PRODUCT_SRC="KERNEL_SRC_${SALOME_VERSION}" export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}} export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC} -$PROCEDURE +${PROCEDURE} diff --git a/config_files/LIGHT.sh b/config_files/LIGHT.sh index 87ea641..8c37a7d 100755 --- a/config_files/LIGHT.sh +++ b/config_files/LIGHT.sh @@ -15,8 +15,8 @@ check_version(){ if [ -n "${LIGHT_ROOT_DIR}" ]; then if [ -f ${LIGHT_ROOT_DIR}/bin/salome/VERSION ]; then - ver=`cat ${LIGHT_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $NF}' | tr -d '[:space:]' ` - if [ "$ver" = "${SALOME_VERSION}" ]; then + ver=`head -n1 ${LIGHT_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` + if [ "${ver}" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -30,7 +30,7 @@ return 1 print_env_bin(){ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${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 } @@ -127,36 +130,32 @@ flags="" # ... tcl/tk options if [ "${TCLHOME}" != "" ] ; then - flags="$flags --with-tcl=${TCLHOME}/lib" - flags="$flags --with-tk=${TCLHOME}/lib" + flags="${flags} --with-tcl=${TCLHOME}/lib" + flags="${flags} --with-tk=${TCLHOME}/lib" fi # ... tbb options -if [ "${TBBHOME}" != "" ] ; then - flags="$flags --with-tbb-include=${TBBHOME}/include" +if [ "${TBB_ROOT_DIR}" != "" ] ; then + flags="${flags} --with-tbb-include=${TBB_ROOT_DIR}/include" if test `uname -m` = "x86_64" ; then - flags="$flags --with-tbb-library=${TBBHOME}/lib/intel64/cc4.1.0_libc2.4_kernel2.6.16.21" + flags="${flags} --with-tbb-library=${TBB_ROOT_DIR}/lib/intel64/cc4.1.0_libc2.4_kernel2.6.16.21" else - flags="$flags --with-tbb-library=${TBBHOME}/lib/ia32/cc4.1.0_libc2.4_kernel2.6.16.21" + flags="${flags} --with-tbb-library=${TBB_ROOT_DIR}/lib/ia32/cc4.1.0_libc2.4_kernel2.6.16.21" fi fi # ... freetype options -if [ "{FREETYPEDIR}" != "" ] ; then - flags="$flags --with-freetype=${FREETYPEDIR}" -fi -# ... ftgl options -if [ "{FTGLDIR}" != "" ] ; then - flags="$flags --with-ftgl=${FTGLDIR}" +if [ "{FREETYPE_ROOT_DIR}" != "" ] ; then + flags="${flags} --with-freetype=${FREETYPE_ROOT_DIR}" fi # ... freeimage options -if [ "{FREEIMAGEDIR}" != "" ] ; then - flags="$flags --with-freeimage=${FREEIMAGEDIR}" +if [ "{FREEIMAGE_ROOT_DIR}" != "" ] ; then + flags="${flags} --with-freeimage=${FREEIMAGE_ROOT_DIR}" fi # ... gl2ps options -if [ "{GL2PSHOME}" != "" ] ; then - flags="$flags --with-gl2ps=${GL2PSHOME}" +if [ "{GL2PS_ROOT_DIR}" != "" ] ; then + flags="${flags} --with-gl2ps=${GL2PS_ROOT_DIR}" fi # other options -flags="$flags --disable-debug --enable-production" +flags="${flags} --disable-debug --enable-production" check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${flags} @@ -166,20 +165,24 @@ echo " +++++++++++ make" GCC=`which gcc` cat >> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/size.log -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 echo "${INSTALL_PRODUCTS}" | grep -q "PatchForOpenCascade" -if [ $? -eq 1 ] && [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then +if [ $? -eq 1 ] && [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR} fi @@ -190,7 +193,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} @@ -198,95 +201,66 @@ 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 -ldir=${PRODUCT_DIR}/lib -if [ ! -d $ldir ]; then ldir=${PRODUCT_DIR}/Linux/lib; fi -if [ ! -d $ldir ]; then ldir=${PRODUCT_DIR}/lin/lib; fi -cd $ldir -# 1. set libdir correctly, correct dependencies +ldir=${PRODUCT_DIR}/lib +if [ ! -d ${ldir} ]; then ldir=${PRODUCT_DIR}/Linux/lib; fi +if [ ! -d ${ldir} ]; then ldir=${PRODUCT_DIR}/lin/lib; fi tcldir=`printenv TCLHOME` -freetypedir=`printenv FREETYPEDIR` -ftgldir=`printenv FTGLDIR` -gl2psdir=`printenv GL2PSHOME` -freeimagedir=`printenv FREEIMAGEDIR` -tbbbasedir=`printenv TBBHOME` - +freetypedir=`printenv FREETYPE_ROOT_DIR` +gl2psdir=`printenv GL2PS_ROOT_DIR` +freeimagedir=`printenv FREEIMAGE_ROOT_DIR` +tbbbasedir=`printenv TBB_ROOT_DIR` TBBKERNEL='cc4.1.0_libc2.4_kernel2.6.16.21' if test `uname -m` = "x86_64" ; then - export TBBMODE="intel64/$TBBKERNEL" + export TBBMODE="intel64/${TBBKERNEL}" else - export TBBMODE="ia32/$TBBKERNEL" + export TBBMODE="ia32/${TBBKERNEL}" fi +tbbdir=${tbbbasedir}/lib/${TBBMODE} -tbbdir=${tbbbasedir}/lib/$TBBMODE +cd ${ldir} +# 1. set libdir correctly, correct dependencies for l in X `find . -name "*.la"`; do - if [ "$l" != "X" ] ; then - l=`basename $l` - libdir=`grep -e "libdir=.*" $l | sed -e "s/libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"` - sed -e "s%${libdir}%${ldir}%g" $l > _$l - mv -f _$l $l + if [ "${l}" != "X" ] ; then + l=`basename ${l}` + libdir=`grep -e "libdir=.*" ${l} | sed -e "s/libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"` + sed -i "s%${libdir}%${ldir}%g" ${l} if [ -n "${tcldir}" ] && [ -d "${tcldir}" ] ; then - sed -e "s%-L[^[:space:]]*tcltk[^[:space:]]*/lib%-L${tcldir}/lib%g" $l > _$l - mv -f _$l $l + sed -i "s%-L[^[:space:]]*tcltk[^[:space:]]*/lib%-L${tcldir}/lib%g" ${l} fi - chmod a+x $l if [ -n "${freetypedir}" ] && [ -d "${freetypedir}" ] ; then - sed -e "s%-L[^[:space:]]*/freetype[^[:space:]]*/lib%-L${freetypedir}/lib%g" \ - -e "s%[^[:space:]]*/freetype[^[:space:]]*/lib/libfreetype.la%-lfreetype%g" $l > _$l - mv -f _$l $l + sed -i "s%-L[^[:space:]]*/freetype[^[:space:]]*/lib%-L${freetypedir}/lib%g;s%[^[:space:]]*/freetype[^[:space:]]*/lib/libfreetype.la%-lfreetype%g" ${l} fi - chmod a+x $l - if [ -n "${ftgldir}" ] && [ -d "${ftgldir}" ] ; then - sed -e "s%\(.*\)\([[:space:]].*-L.*/ftgl-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${ftgldir}/lib \3%g" \ - -e 's%\(.*\)\([[:space:]].*libftgl.la\)\(.*\)%\1 -lftgl \3%g' $l > _$l - mv -f _$l $l - fi - chmod a+x $l if [ -n "${gl2psdir}" ] && [ -d "${gl2psdir}" ] ; then - sed -e "s%\(.*\)\([[:space:]].*-L.*/gl2ps-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${gl2psdir}/lib \3%g" $l > _$l - mv -f _$l $l + sed -i "s%\(.*\)\([[:space:]].*-L.*/gl2ps-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${gl2psdir}/lib \3%g" ${l} fi - chmod a+x $l if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then - sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" $l > _$l - mv -f _$l $l + sed -i "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" ${l} fi - chmod a+x $l if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then - sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9][0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" $l > _$l - mv -f _$l $l + sed -i "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9][0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" ${l} fi - chmod a+x $l if [ -n "${tbbdir}" ] && [ -d "${tbbdir}" ] ; then - sed -e "s%\(.*\)\([[:space:]].*-L.*/tbb[^[:space:]]*/lib[^[:space:]]*\)\(.*\)%\1 -L${tbbdir} \3%g" $l > _$l - mv -f _$l $l + sed -i "s%\(.*\)\([[:space:]].*-L.*/tbb[^[:space:]]*/lib[^[:space:]]*\)\(.*\)%\1 -L${tbbdir} \3%g" ${l} fi - chmod a+x $l fi done # 2. fix libGL dependencies - -cd $ldir gllibdir="`where_gl_libs`" -if [ "$gllibdir" != "" ] ; then +if [ "${gllibdir}" != "" ] ; then if [ -f ${gllibdir}/libGL.la ] ; then libdir=`grep "libdir=" ${gllibdir}/libGL.la | sed -e "s%libdir='\(.*\)'%\1%"` - if [ "`ls $libdir/libGL.so* 2>/dev/null`" ] ; then + if [ "`ls ${libdir}/libGL.so* 2>/dev/null`" ] ; then str_to_replace="${gllibdir}/libGL.la" fi -fi - if [ "$str_to_replace" == "" ] ; then + fi + if [ "${str_to_replace}" = "" ] ; then str_to_replace="-L${gllibdir} -lGL" fi - - sed -e "s%-lGL\b%%g" \ - -e "s%[^[:space:]\']*libGL.la[[:space:]]%%g" \ - -e "s%^dependency_libs='\(.*\)%dependency_libs='${str_to_replace} \1%" \ - libTKOpenGl.la > libTKOpenGl.la.new - mv -f libTKOpenGl.la.new libTKOpenGl.la + sed -i "s%-lGL\b%%g;s%[^[:space:]\']*libGL.la[[:space:]]%%g;s%^dependency_libs='\(.*\)%dependency_libs='${str_to_replace} \1%" libTKOpenGl.la fi # to generate environment script for sources @@ -302,10 +276,10 @@ export PRODUCT_TYPE=$6; export INSTALL_PRODUCTS=$7; shift REMOVE_SRC_TMP=$8; -test $# == 10 && shift && SINGLE_DIR=$9 -export PRODUCT="OCCT-${OCCT_VERSION}" +test $# = 10 && shift && SINGLE_DIR=$9 +export PRODUCT="OCCT-${VERSION_OCCT}" 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/PARAVIS.sh b/config_files/PARAVIS.sh index 8931dcc..362ead0 100755 --- a/config_files/PARAVIS.sh +++ b/config_files/PARAVIS.sh @@ -84,7 +84,7 @@ install_source # build sources test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} -if [ -e ./build.sh ] ; then +if [ -e ./build.sh ] && [ ! -e ${INST_ROOT}/build.sh ]; then cp -f ./build.sh ${INST_ROOT} fi diff --git a/config_files/PYHELLO.sh b/config_files/PYHELLO.sh index 6556431..ef2f8eb 100755 --- a/config_files/PYHELLO.sh +++ b/config_files/PYHELLO.sh @@ -80,7 +80,7 @@ install_source # build sources test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} -if [ -e ./build.sh ] ; then +if [ -e ./build.sh ] && [ ! -e ${INST_ROOT}/build.sh ]; then cp -f ./build.sh ${INST_ROOT} fi diff --git a/config_files/PYLIGHT.sh b/config_files/PYLIGHT.sh index 55fa383..efe2b26 100755 --- a/config_files/PYLIGHT.sh +++ b/config_files/PYLIGHT.sh @@ -80,7 +80,7 @@ install_source # build sources test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} -if [ -e ./build.sh ] ; then +if [ -e ./build.sh ] && [ ! -e ${INST_ROOT}/build.sh ]; then cp -f ./build.sh ${INST_ROOT} fi diff --git a/config_files/RANDOMIZER.sh b/config_files/RANDOMIZER.sh index fb65c16..4f9957c 100755 --- a/config_files/RANDOMIZER.sh +++ b/config_files/RANDOMIZER.sh @@ -15,8 +15,8 @@ check_version(){ if [ -n "${RANDOMIZER_ROOT_DIR}" ]; then if [ -f ${RANDOMIZER_ROOT_DIR}/bin/salome/VERSION ]; then - ver=`cat ${RANDOMIZER_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $NF}' | tr -d '[:space:]' ` - if [ "$ver" = "${SALOME_VERSION}" ]; then + ver=`head -n1 ${RANDOMIZER_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` + if [ "${ver}" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -30,7 +30,7 @@ return 1 print_env_bin(){ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <