From: vsr Date: Fri, 29 Nov 2013 14:14:36 +0000 (+0000) Subject: SALOME 7.3.0 preparation X-Git-Tag: V7_3_0rc1~36 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2cc2ca9aa7412826b7ddbb5dd88534b6d384a87c;p=tools%2Finstall.git SALOME 7.3.0 preparation --- diff --git a/config_files/gl2ps.sh b/config_files/gl2ps.sh index 465535a..204c828 100755 --- a/config_files/gl2ps.sh +++ b/config_files/gl2ps.sh @@ -15,17 +15,17 @@ # # gl2ps version # -GL2PS_VERSION=1.3.8 +VERSION_GL2PS=1.3.8 check_version() { # check availability of glp2s and its version -if [ "${GL2PSHOME}" != "" ] && [ -f ${GL2PSHOME}/include/gl2ps.h ] ; then - ver_major=`grep "#define GL2PS_MAJOR_VERSION" ${GL2PSHOME}/include/gl2ps.h | awk '{print $3}'` - ver_minor=`grep "#define GL2PS_MINOR_VERSION" ${GL2PSHOME}/include/gl2ps.h | awk '{print $3}'` - ver_maint=`grep "#define GL2PS_PATCH_VERSION" ${GL2PSHOME}/include/gl2ps.h | awk '{print $3}'` - ver="$ver_major.$ver_minor.$ver_maint" - if [ "$ver" == "${GL2PS_VERSION}" ] ; then +if [ "${GL2PS_ROOT_DIR}" != "" ] && [ -f ${GL2PS_ROOT_DIR}/include/gl2ps.h ] ; then + ver_major=`grep "#define GL2PS_MAJOR_VERSION" ${GL2PS_ROOT_DIR}/include/gl2ps.h | awk '{print $3}'` + ver_minor=`grep "#define GL2PS_MINOR_VERSION" ${GL2PS_ROOT_DIR}/include/gl2ps.h | awk '{print $3}'` + ver_maint=`grep "#define GL2PS_PATCH_VERSION" ${GL2PS_ROOT_DIR}/include/gl2ps.h | awk '{print $3}'` + ver="${ver_major}.${ver_minor}.${ver_maint}" + if [ "${ver}" = "${VERSION_GL2PS}" ] ; then return 0 fi fi @@ -35,10 +35,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 } @@ -93,10 +103,15 @@ check_job ${PRODUCT_DIR}/MAKE.LOG make # install check_job ${PRODUCT_DIR}/INSTALL.LOG make install -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 @@ -107,16 +122,13 @@ 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} -### modifing la files -cd ${PRODUCT_DIR}/lib - # to generate environment script for sources try_preinstalled } @@ -130,10 +142,10 @@ export PRODUCT_TYPE=$6; export INSTALL_PRODUCTS=$7; shift REMOVE_SRC_TMP=$8; -test $# == 10 && shift && SINGLE_DIR=$9 -export PRODUCT="gl2ps-${GL2PS_VERSION}" +test $# = 10 && shift && SINGLE_DIR=$9 +export PRODUCT="gl2ps-${VERSION_GL2PS}" 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/graphviz.sh b/config_files/graphviz.sh index 8fc0f5d..e8d920a 100755 --- a/config_files/graphviz.sh +++ b/config_files/graphviz.sh @@ -15,18 +15,19 @@ # # graphviz version # -GRAPHVIZ_VERSION=2.30.0 +VERSION_GRAPHVIZ=2.30.0 +GRAPHVIZ_XVERSION=`echo ${VERSION_GRAPHVIZ} | awk -F. '{printf("%d",$1*10000+$2*100+$3)}'` check_version() { isdot=`which dot 2>/dev/null` -if [ -n "$isdot" ]; then +if [ -n "${isdot}" ]; then ver=`dot -V 2>&1 | sed -e "s%[A-Za-z-]%%g" | awk '{print $1}'` - maj_ver=`echo $ver | awk -F. '{if(NF>0) print $1; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'` - min_ver=`echo $ver | awk -F. '{if(NF>1) print $2; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'` - rel_ver=`echo $ver | awk -F. '{if(NF>2) print $3; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'` - let ver=$maj_ver*10000+$min_ver*100+$rel_ver - if [ $ver -eq 22400 ] ; then + maj_ver=`echo ${ver} | awk -F. '{if(NF>0) print $1; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'` + min_ver=`echo ${ver} | awk -F. '{if(NF>1) print $2; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'` + rel_ver=`echo ${ver} | awk -F. '{if(NF>2) print $3; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'` + let ver=${maj_ver}*10000+${min_ver}*100+${rel_ver} + if [ ${ver} -eq ${GRAPHVIZ_XVERSION} ] ; then return 0 fi fi @@ -36,11 +37,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 } @@ -91,11 +95,11 @@ if [ "${patch_build_procedure}" = "1" ] ; then sed -i "s%echo 'puts \[info tclversion\]' | \$TCLSH%echo 'puts \[info tclversion\]' | \$TCLSH 2>/dev/null | grep -E '^[0-9.]+$'%g" configure fi -CONFIGURE_FLAGS="--disable-rpath -without-qt" -if [ "${EXPAT_ROOT}" != "" ] ; then - CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-expat --with-expatincludedir=${EXPAT_ROOT}/include --with-expatlibdir=${EXPAT_ROOT}/lib --enable-perl=no " +CONFIGURE_FLAGS="--disable-rpath --disable-tcl --without-qt" +if [ "${EXPAT_ROOT_DIR}" != "" ] ; then + CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-expat --with-expatincludedir=${EXPAT_ROOT_DIR}/include --with-expatlibdir=${EXPAT_ROOT_DIR}/lib --enable-perl=no " fi -if test `uname -m` == "x86_64" ; then +if test `uname -m` = "x86_64" ; then CONFIGURE_FLAGS="${CONFIGURE_FLAGS} CFLAGS=-m64 CXXFLAGS=-m64" fi local without_cgraph=1 @@ -107,15 +111,20 @@ check_job ${PRODUCT_DIR}/CONFIGURE.LOG configure --prefix=${PRODUCT_DIR} ${CONFI 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 @@ -126,7 +135,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} @@ -134,41 +143,31 @@ 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 -cd $ldir - -for l in X `find $ldir -name "*.la"`; do - if [ "$l" != "X" ] ; then - pydir="" ; tcldir="" ; freetypedir="" ; - if [ -n "${PYTHONROOT}" ] ; then pydir=${PYTHONROOT} ; fi - if [ -n "${TCLHOME}" ] ; then tcldir=${TCLHOME} ; fi - if [ -n "${FREETYPEDIR}" ] ; then freetypedir=${FREETYPEDIR} ; fi - - sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*${PRODUCT}% \1${PRODUCT_DIR}%g" \ - -e "s%[[:space:]]\(-L\)\?[^[:space:]]*Python[^[:space:]]*/lib% \1${pydir}/lib%g" \ - -e "s%[[:space:]]\(-L\)\?[^[:space:]]*tcltk[^[:space:]]*/lib% \1${tcldir}/lib%g" \ - -e "s%[[:space:]]\(-L\)\?[^[:space:]]*freetype[^[:space:]]*/lib\(/libfreetype\.la\)% \1${freetypedir}/lib\2%g" $l > $l"_" - chmod -f --reference=$l $l"_" - mv -f $l"_" $l - - lpath=`dirname $l` - libdir=`grep -e "^libdir=.*" $l | sed -e "s/^libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"` - sed -e "s%${libdir}%${lpath}%g" $l > $l"_" - chmod -f --reference=$l $l"_" ; mv -f $l"_" $l - - if [ "${EXPAT_ROOT}" != "" ] ; then - expatdir=${EXPAT_ROOT}/lib - sed -e "s%-L[^[:space:]]*expat[^[:space:]]*/lib%-L${expatdir}%g" \ - -e "s%[^[:space:]]*expat[^[:space:]]*/lib/libexpat.la%-lexpat%g" $l > $l"_" - chmod -f --reference=$l $l"_" - mv -f $l"_" $l - fi +pydir="" +tcldir="" +freetypedir="" +expatdir="" +if [ -n "${PYTHON_ROOT_DIR}" ] ; then pydir=${PYTHON_ROOT_DIR} ; fi +if [ -n "${TCLHOME}" ] ; then tcldir=${TCLHOME} ; fi +if [ -n "${FREETYPE_ROOT_DIR}" ] ; then freetypedir=${FREETYPE_ROOT_DIR} ; fi +if [ "${EXPAT_ROOT_DIR}" != "" ] ; then expatdir=${EXPAT_ROOT_DIR}/lib ; fi + +for l in X `find ${PRODUCT_DIR}/lib -name "*.la"`; do + if [ "${l}" != "X" ] ; then + sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*${PRODUCT}% \1${PRODUCT_DIR}%g" ${l} + sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*Python[^[:space:]]*/lib% \1${pydir}/lib%g" ${l} + sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*tcltk[^[:space:]]*/lib% \1${tcldir}/lib%g" ${l} + sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*freetype[^[:space:]]*/lib\(/libfreetype\.la\)% \1${freetypedir}/lib\2%g" ${l} + sed -i "s%-L[^[:space:]]*expat[^[:space:]]*/lib%-L${expatdir}%g;s%[^[:space:]]*expat[^[:space:]]*/lib/libexpat.la%-lexpat%g" ${l} + + lpath=`dirname ${l}` + libdir=`grep -e "^libdir=.*" ${l} | sed -e "s/^libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"` + sed -i "s%${libdir}%${lpath}%g" ${l} fi done # 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 @@ -187,10 +186,10 @@ export PRODUCT_TYPE=$6; export INSTALL_PRODUCTS=$7; shift REMOVE_SRC_TMP=$8; -test $# == 10 && shift && SINGLE_DIR=$9 -export PRODUCT="graphviz-${GRAPHVIZ_VERSION}" +test $# = 10 && shift && SINGLE_DIR=$9 +export PRODUCT="graphviz-${VERSION_GRAPHVIZ}" 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/hdf5.sh b/config_files/hdf5.sh index 46eb3b1..14895a9 100755 --- a/config_files/hdf5.sh +++ b/config_files/hdf5.sh @@ -15,7 +15,7 @@ # # HDF5 version # -HDF5_VERSION=1.8.10 +VERSION_HDF5=1.8.10 # # Default API version for hdf5: 1.6 # @@ -23,17 +23,20 @@ V16_COMPATIBILITY=yes check_version() { -if [ -z "$HDF5HOME" ]; then +if [ -z "${HDF5_ROOT_DIR}" ]; then return 1 fi -check_lib_version libhdf5.so.0.0.0 ${HDF5HOME}/lib +check_lib_version libhdf5.so.0.0.0 ${HDF5_ROOT_DIR}/lib if [ "$?" -ne "0" ]; then return 1 fi -check_lib_version libhdf5.settings ${HDF5HOME}/lib +cfg_file=${HDF5_ROOT_DIR}/lib/libhdf5.settings +if [ ! -e ${cfg_file} ] ; then + cfg_file=${HDF5_ROOT_DIR}/share/cmake/hdf5/libhdf5.settings +fi if [ "$?" -eq "0" ]; then - ver=`grep "HDF5 Version:" ${HDF5HOME}/lib/libhdf5.settings | awk '{print $3}'` - if [ "$ver" == "${HDF5_VERSION}" ]; then + ver=`grep "HDF5 Version:" ${cfg_file} | awk '{print $3}'` + if [ "${ver}" = "${VERSION_HDF5}" ]; then return 0 fi fi @@ -43,11 +46,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 } @@ -88,31 +94,45 @@ install_source_and_build() # install sources install_source -# build sources -HDF_CONFIGURE_OPTIONS="--disable-debug --enable-production --enable-threadsafe --with-pthread=/usr/include,/usr/lib" +test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} -if test "$V16_COMPATIBILITY" == "yes" ; then - HDF_CONFIGURE_OPTIONS="${HDF_CONFIGURE_OPTIONS} --with-default-api-version=v16" +# create build directory +export PRODUCT_BUILD_DIR=${PRODUCT_DIR}_build +mkdir ${PRODUCT_BUILD_DIR} +cd ${PRODUCT_BUILD_DIR} + +# build options +CMAKE_OPTIONS="" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX=${PRODUCT_DIR}" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_BUILD_TYPE=Release -DHDF5_ENABLE_THREADSAFE=ON -DBUILD_SHARED_LIBS=ON" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_BUILD_TOOLS=ON -DHDF5_BUILD_HL_LIB=ON -DHDF5_ENABLE_Z_LIB_SUPPORT=ON" +if test "${V16_COMPATIBILITY}" = "yes" ; then + CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_USE_16_API_DEFAULT=ON" fi -if test `uname -m` == "x86_64" ; then - HDF_CONFIGURE_OPTIONS="${HDF_CONFIGURE_OPTIONS} CFLAGS=-m64 CXXFLAGS=-m64" -fi +cat > ${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 @@ -123,24 +143,19 @@ 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 libhdf5.la file to correct direct path to hdf5 library -### no need to do this for sources installation because 'make install' does it! -cd ${PRODUCT_DIR}/lib -sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libhdf5.la -if [ -e libhdf5_hl.la ] ; then - sed -i "s%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 ${PRODUCT_DIR}/lib/libhdf5.la\3%g;s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libhdf5_hl.la -fi - # modify settings file -cd ${PRODUCT_DIR}/lib -sed -i "s%Installation point: .*%Installation point: ${PRODUCT_DIR}%g" libhdf5.settings +cfg_file=${PRODUCT_DIR}/lib/libhdf5.settings +if [ ! -e ${cfg_file} ] ; then cfg_file=${PRODUCT_DIR}/share/cmake/hdf5/libhdf5.settings ; fi +if [ -e ${cfg_file} ] ; then + sed -i "s%Installation point: .*%Installation point: ${PRODUCT_DIR}%g" ${cfg_file} +fi # to generate environment script for sources try_preinstalled @@ -155,10 +170,10 @@ export PRODUCT_TYPE=$6; export INSTALL_PRODUCTS=$7; shift REMOVE_SRC_TMP=$8; -test $# == 10 && shift && SINGLE_DIR=$9 -export PRODUCT="hdf5-${HDF5_VERSION}" +test $# = 10 && shift && SINGLE_DIR=$9 +export PRODUCT="hdf5-${VERSION_HDF5}" 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/homard.sh b/config_files/homard.sh index 6a0a979..e8c432a 100755 --- a/config_files/homard.sh +++ b/config_files/homard.sh @@ -15,15 +15,15 @@ # # homard version # -HOMARD_VERSION=10.6 +VERSION_HOMARD=10.7 # # homard's bin directory (platform) # if test `uname -m` = "x86_64" ; then - HOMARD_DIR=HOMARD_V${HOMARD_VERSION}_64 + HOMARD_DIR=HOMARD_V${VERSION_HOMARD}_64 else - HOMARD_DIR=HOMARD_V${HOMARD_VERSION}_32 + HOMARD_DIR=HOMARD_V${VERSION_HOMARD}_32 fi @@ -35,9 +35,9 @@ 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 + du -sk ${PRODUCT_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.bin.size + cp ${INST_ROOT}/${PRODUCT_TYPE}.bin.size ${INST_ROOT}/${PRODUCT_TYPE}.build.size +fi } 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} @@ -96,10 +102,10 @@ SRC_DIR=$8; REMOVE_SRC_TMP=$9; shift BIN_DIR=$9; -test $# == 10 && shift && SINGLE_DIR=$9 -export PRODUCT="homard-${HOMARD_VERSION}" +test $# = 10 && shift && SINGLE_DIR=$9 +export PRODUCT="homard-${VERSION_HOMARD}" 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}