#
####################################################################################
-LIBBATCH_VERSION=2.0.0
+LIBBATCH_VERSION=2.1.0
check_version(){
# No way to check version!
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
export LIBBATCH_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export LD_LIBRARY_PATH=\${LIBBATCH_ROOT_DIR}/lib:\${LD_LIBRARY_PATH}
export PYTHONPATH=\${LIBBATCH_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
print_env_src()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
# nothing to do
##
EOF
install_source()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake -DCMAKE_INSTALL_PREFIX=${PRODUCT_DIR}
GCC=`which gcc`
cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
+used gcc=${GCC}
EOF
check_job ${PRODUCT_DIR}/MAKE.LOG make
check_job ${PRODUCT_DIR}/INSTALL.LOG make install
cd ${PRODUCT_DIR};
# 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
install_binary()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# create a module directory
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
export INSTALL_PRODUCTS=$7;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
+test $# = 10 && shift && SINGLE_DIR=$9
export PRODUCT="libBatch-${LIBBATCH_VERSION}"
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}
#
# libxml version
#
-LIBXML_VERSION=2.9.0
+VERSION_LIBXML=2.9.0
check_version(){
# No way to check version!
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export LIBXML_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export LIBXML2_ROOT_DIR=\${LIBXML_DIR}
-export PATH=\${LIBXML_DIR}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${LIBXML_DIR}/lib:\${LD_LIBRARY_PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export LIBXML2_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${LIBXML2_ROOT_DIR}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${LIBXML2_ROOT_DIR}/lib:\${LD_LIBRARY_PATH}
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
print_env_src()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
# nothing to do
##
EOF
install_source()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
fi
fi
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.src.size
+fi
+
# to generate environment scripts
try_preinstalled
}
check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR}
GCC=`which gcc`
cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
+used gcc=${GCC}
EOF
check_job ${PRODUCT_DIR}/MAKE.LOG make
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
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
-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
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}
#
# 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
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export MED3HOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PATH=\${MED3HOME}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${MED3HOME}/lib:\${LD_LIBRARY_PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export MEDFILE_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${MEDFILE_ROOT_DIR}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${MEDFILE_ROOT_DIR}/lib:\${LD_LIBRARY_PATH}
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
print_env_src()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
# nothing to do
##
EOF
install_source()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# unpack
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.src.size
+fi
+
# to generate environment scripts
try_preinstalled
}
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 <<EOF
-used gcc=$GCC
-EOF
+cat > ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+cmake : `which cmake`
+used settings:
+${CMAKE_OPTIONS}
+EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake ${PRODUCT_SRC_DIR} ${CMAKE_OPTIONS}
+cat > ${PRODUCT_DIR}/MAKE.LOG <<EOF
+used gcc=`which gcc`
+EOF
check_job ${PRODUCT_DIR}/MAKE.LOG make
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_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
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
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}
#
# 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!
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export METISDIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export METIS_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
print_env_src()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
# nothing to do
##
EOF
install_source()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.src.size
+fi
+
# to generate environment scripts
try_preinstalled
}
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
( 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
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}
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}