for f in X `find . -name "*.py" -exec basename {} ";" | awk -F. '{print $1}'` ; do
case ${f} in
X ) ;;
- * ) ln -sf ${f}.py ${f} ;;
+ * ) sed -i "s%#\!.*python%#\!/usr/bin/env python%" ${f}.py ; ln -sf ${f}.py ${f} ;;
esac
done
install_root=$1
env_sequence="env_build.csh env_build.sh env_products.csh env_products.sh"
-for file_name in $env_sequence ; do
- file=$install_root/$file_name
- if [ -e $file ] ; then
+for file_name in ${env_sequence} ; do
+ file=${install_root}/${file_name}
+ if [ -e ${file} ] ; then
cp ${file} ${file}_`date +%F_%T`
fi
done
#
# boost version
#
-BOOST_VERSION=1.52.0
-BOOST_XVERSION=`echo ${BOOST_VERSION} | awk -F. '{printf("%d",$1*100000+$2*100+$3)}'`
-BOOST_VVERSION=`echo ${BOOST_VERSION} | awk -F. '{printf("%d_%d",$1,$2)}'`
+VERSION_BOOST=1.52.0
+BOOST_XVERSION=`echo ${VERSION_BOOST} | awk -F. '{printf("%d",$1*100000+$2*100+$3)}'`
+BOOST_VVERSION=`echo ${VERSION_BOOST} | awk -F. '{printf("%d_%d",$1,$2)}'`
check_version(){
-if [ -n "${BOOSTDIR}" ] && [ -f ${BOOSTDIR}/include/boost/version.hpp ] ; then
- ver=`egrep 'BOOST_VERSION [0-9]+' ${BOOSTDIR}/include/boost/version.hpp | sed 's/.*BOOST_VERSION \([0-9]\+\)/\1/g'`
- if [ "$ver" = "${BOOST_XVERSION}" ]; then
+if [ -n "${BOOST_ROOT_DIR}" ] && [ -f ${BOOST_ROOT_DIR}/include/boost/version.hpp ] ; then
+ ver=`egrep 'BOOST_VERSION [0-9]+' ${BOOST_ROOT_DIR}/include/boost/version.hpp | sed 's/.*BOOST_VERSION \([0-9]\+\)/\1/g'`
+ if [ "${ver}" = "${BOOST_XVERSION}" ]; then
return 0
fi
fi
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export BOOSTDIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export Boost_ROOT_DIR=\${BOOSTDIR}
-export LD_LIBRARY_PATH=\${BOOSTDIR}/lib:\${LD_LIBRARY_PATH}
-export PATH=\${BOOSTDIR}/include:\${PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export BOOST_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export LD_LIBRARY_PATH=\${BOOST_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 xzf ${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
}
GCC=`which gcc`
cat >> ${PRODUCT_DIR}/BUILD.LOG <<EOF
-used gcc=$GCC
+used gcc=${GCC}
EOF
# configure
if [ "$?" -ne "0" ] ; then
cat ${PRODUCT_DIR}/INSTALL.LOG
- cat $INSTALL_WORK/errlog >&2
- cat $INSTALL_WORK/errlog >> ${PRODUCT_DIR}/INSTALL.LOG
+ cat ${INSTALL_WORK}/errlog >&2
+ cat ${INSTALL_WORK}/errlog >> ${PRODUCT_DIR}/INSTALL.LOG
fi
-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}
test -d ${PRODUCT_BUILD_DIR} && rm -fr ${PRODUCT_BUILD_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="boost-${BOOST_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="boost-${VERSION_BOOST}"
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}
#
# cgns library version
#
-CGNSVERSION=3.1.3
+VERSION_CGNS=3.1.3
check_version(){
# No way to check version!
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export CGNSHOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PATH=\${CGNSHOME}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${CGNSHOME}/lib:\${LD_LIBRARY_PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export CGNS_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${CGNS_ROOT_DIR}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${CGNS_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}
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.src.size
+fi
+
# to generate environment scripts
try_preinstalled
}
# build sources
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+# create build directory
export PRODUCT_BUILD_DIR=${PRODUCT_DIR}_build
mkdir ${PRODUCT_BUILD_DIR}
cd ${PRODUCT_BUILD_DIR}
CMAKE_OPTIONS=""
### common settings
-CMAKE_OPTIONS=$CMAKE_OPTIONS" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_DIR}"
-CMAKE_OPTIONS=$CMAKE_OPTIONS" -DCMAKE_BUILD_TYPE:STRING=Release"
-CMAKE_OPTIONS=$CMAKE_OPTIONS" -DBUILD_SHARED_LIBS:BOOL=ON"
-
+CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_DIR}"
+CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DCMAKE_BUILD_TYPE:STRING=Release"
+CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DBUILD_SHARED_LIBS:BOOL=ON"
### HDF5 settings
-if [ "${HDF5HOME}" != "" ]; then
-CMAKE_OPTIONS=$CMAKE_OPTIONS" -DENABLE_HDF5:BOOL=ON"
-CMAKE_OPTIONS=$CMAKE_OPTIONS" -DHDF5_INCLUDE_PATH:PATH=${HDF5HOME}/include"
-CMAKE_OPTIONS=$CMAKE_OPTIONS" -DHDF5_LIBRARY:FILEPATH=${HDF5HOME}/lib/libhdf5.so"
+if [ "${HDF5_ROOT_DIR}" != "" ]; then
+ CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DENABLE_HDF5:BOOL=ON"
+ CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DHDF5_INCLUDE_PATH:PATH=${HDF5_ROOT_DIR}/include"
+ CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DHDF5_LIBRARY:FILEPATH=${HDF5_ROOT_DIR}/lib/libhdf5.so"
+
+ hdf_inc_file=${HDF5_ROOT_DIR}/include/H5pubconf.h
+ hdf_cfg_file=${HDF5_ROOT_DIR}/lib/libhdf5.settings
+ if [ ! -f ${hdf_cfg_file} ] ; then cfg_file=${HDF5_ROOT_DIR}/share/cmake/hdf5/libhdf5.settings ; fi
+ if [ -f ${hdf_inc_file} ] ; then
+ grep "#define.*H5_HAVE_ZLIB_H" ${hdf_inc_file} >& /dev/null
+ if [ "$?" = "0" ] ; then CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_NEED_ZLIB=ON" ; fi
+ grep "#define.*H5_HAVE_SZLIB_H" ${hdf_inc_file} >& /dev/null
+ if [ "$?" = "0" ] ; then CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_NEED_SZIP=ON" ; fi
+ fi
+ if [ -e ${hdf_cfg_file} ] ; then
+ grep -E "Parallel HDF5.*(ON|yes)" ${hdf_cfg_file} >& /dev/null
+ if [ "$?" = "0" ] ; then CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_NEEDS_MPI=ON" ; fi
+ fi
fi
cat > ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
cmake : `which cmake`
used settings:
-$CMAKE_OPTIONS
+${CMAKE_OPTIONS}
EOF
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake ${PRODUCT_SRC_DIR} $CMAKE_OPTIONS
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake ${PRODUCT_SRC_DIR} ${CMAKE_OPTIONS}
cat > ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
+used gcc=`which gcc`
EOF
check_job ${PRODUCT_DIR}/MAKE.LOG make -j4
check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
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}
test -d ${PRODUCT_BUILD_DIR} && rm -fr ${PRODUCT_BUILD_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="cgnslib-${CGNSVERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="cgnslib-${VERSION_CGNS}"
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}
for prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
do
-# echo "Checking for $prog"
- for as_dir in $PATH; do
- test -z "$as_dir" && as_dir=.
- if test -f "$as_dir/$prog"; then
- FORT="$prog"
- echo "Found $as_dir/$prog"
+# echo "Checking for ${prog}"
+ for as_dir in ${PATH}; do
+ test -z "${as_dir}" && as_dir=.
+ if test -f "${as_dir}/${prog}"; then
+ FORT="${prog}"
+ echo "Found ${as_dir}/${prog}"
break 2
fi
done
# echo "Result: no"
done
-if test -n "$FORT"; then
+if test -n "${FORT}"; then
cat >${DIR}/ftest.f <<_ACEOF
program main
end
_ACEOF
- $FORT -o ${DIR}/ftest.out ${DIR}/ftest.f > /dev/null
+ ${FORT} -o ${DIR}/ftest.out ${DIR}/ftest.f > /dev/null
rm -f ${DIR}/ftest.*
exit $?
else
PROCEDURE=$1
DIR=$2
-$PROCEDURE
+${PROCEDURE}
echo "`basename $0` : wrong parameters"
exit 1
fi
-var=`df -Pk "$1" | awk '{print $4}'`
-for i in $var; do var=$i; done
-if [ "$var" -lt "$2" ]; then
- echo "Available disk space is $var Kb"
+var=`df -Pk "$1" | awk '{print $4}' | grep "[0-9]\+"`
+#for i in ${var}; do var=${i}; done
+if [ "${var}" -lt "$2" ]; then
+ echo "Available disk space is ${var} Kb"
echo "The necessary disk space is $2 Kb"
exit 1
else
#
####################################################################################
-CMAKE_VERSION=2.8.10.2
+VERSION_CMAKE=2.8.10.2
check_version()
{
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export CMAKEHOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PATH=\${CMAKEHOME}/bin:\${PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export CMAKE_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${CMAKE_ROOT_DIR}/bin:\${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}
-# to generate environment scripts
+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}
cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
+used gcc=${GCC}
EOF
check_job ${PRODUCT_DIR}/MAKE.LOG make
check_job ${PRODUCT_DIR}/MAKEINSTALL.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}
export INSTALL_PRODUCTS=$7;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="cmake-${CMAKE_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="cmake-${VERSION_CMAKE}"
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}
# create and source environment file
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# remove config file
if [ -e ${CONFIG_FILE} ] ; then
# for each module create <module> tag
SALOME_MODULES="`env | awk -F_ '/[a-zA-Z0-9]*_ROOT_DIR/ { print $1 }' | grep -v -E '^SALOME$' | grep -v -E '^HXX2SALOME$'`"
-GUI_MODULES="`echo $SALOME_MODULES | tr \"[:space:]\" \"\n\" | grep -v -E \"(^KERNEL|^GUI|^SAMPLES|PLUGIN)$\"`"
+GUI_MODULES="`echo ${SALOME_MODULES} | tr \"[:space:]\" \"\n\" | grep -v -E \"(^KERNEL|^GUI|^SAMPLES|PLUGIN)$\"`"
for mod in ${SALOME_MODULES}; do
echo ${GUI_MODULES} | tr "[:space:]" "\n" | grep -E "^${mod}$" >& /dev/null
- if [ "$?" == "0" ] ; then
+ if [ "$?" = "0" ] ; then
gui_attr="yes"
else
gui_attr="no"
echo "`basename $0` : wrong parameters"
exit 1
fi
-var=`df -Pk "$1" | awk '{print $4}'`
-for i in $var; do var=$i; done
-echo $var
+var=`df -Pk "$1" | awk '{print $4}' | grep "[0-9]\+"`
+#for i in ${var}; do var=${i}; done
+echo ${ar}
exit 0
#
# docutils version
#
-DOCUTILS_VERSION=0.10
+VERSION_DOCUTILS=0.10
check_version(){
# It is not necessary to check version!
print_env_bin(){
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export DOCUTILS_ROOT=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PYTHONPATH=\${DOCUTILS_ROOT}/lib/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
-export PATH=\${DOCUTILS_ROOT}/bin:\${PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export DOCUTILS_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PYTHONPATH=\${DOCUTILS_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
+export PATH=\${DOCUTILS_ROOT_DIR}/bin:\${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
}
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
cd ${PRODUCT_SRC_DIR} ; check_job ${PRODUCT_DIR}/BUILD.LOG python setup.py install --prefix=${PRODUCT_DIR}
-cd ${PRODUCT_DIR}/bin;
-
-scripts=`find . -name "*.py" -exec basename {} ";" | awk -F. '{print $1}'`
-for f in X ${scripts} ; do
- if test "${f}" == "X" ; then continue ; fi
- sed -i "s%#\!.*python%#\!/usr/bin/env python%" ${f}.py
- ln -sf ${f}.py ${f}
+cd ${PRODUCT_DIR}/bin
+for f in X `find . -name "*.py" -exec basename {} ";" | awk -F. '{print $1}'` ; do
+ case ${f} in
+ X ) ;;
+ * ) sed -i "s%#\!.*python%#\!/usr/bin/env python%" ${f}.py ; ln -sf ${f}.py ${f} ;;
+ esac
done
+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="docutils-${DOCUTILS_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="docutils-${VERSION_DOCUTILS}"
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}
#
# Doxygen version
#
-DOXYGEN_VERSION=1.8.3.1
-DOXYGEN_XVERSION=`echo ${DOXYGEN_VERSION} | awk -F. '{printf("%d",$1*10000+$2*100+$3)}'`
+VERSION_DOXYGEN=1.8.3.1
+DOXYGEN_XVERSION=`echo ${VERSION_DOXYGEN} | awk -F. '{printf("%d",$1*10000+$2*100+$3)}'`
check_version()
{
-check_lib_version doxygen $PATH
+check_lib_version doxygen ${PATH}
if [ "$?" -ne "0" ]; then
return 1
fi
ver=`doxygen --version`
-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 ${DOXYGEN_XVERSION} ] ; 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 ${DOXYGEN_XVERSION} ] ; then
return 0
fi
return 1
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export DOXYGEN_ROOT=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export DOXYGEN_ROOT_DIR=\${DOXYGEN_ROOT}
-export PATH=\${DOXYGEN_ROOT}/bin:\${PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export DOXYGEN_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${DOXYGEN_ROOT_DIR}/bin:\${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}
# apply general patch for doxygen
local patch_sources=1
if [ "${patch_sources}" = "1" ] ; then
- if [ -f patches/doxygen-${DOXYGEN_VERSION}.patch ] ; then
- cp patches/doxygen-${DOXYGEN_VERSION}.patch ${PRODUCT_SRC_DIR}
- ( cd ${PRODUCT_SRC_DIR}; patch -p1 < doxygen-${DOXYGEN_VERSION}.patch )
+ if [ -f patches/doxygen-${VERSION_DOXYGEN}.patch ] ; then
+ cp patches/doxygen-${VERSION_DOXYGEN}.patch ${PRODUCT_SRC_DIR}
+ ( cd ${PRODUCT_SRC_DIR}; patch -p1 < doxygen-${VERSION_DOXYGEN}.patch )
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}/MAKEINSTALL.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}
export INSTALL_PRODUCTS=$7;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="doxygen-${DOXYGEN_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="doxygen-${VERSION_DOXYGEN}"
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}
#
# expat version
#
-EXPAT_VERSION=2.0.1
+VERSION_EXPAT=2.0.1
check_version(){
-if [ "$EXPAT_ROOT" != "" ] && [ -f ${EXPAT_ROOT}/include/expat.h ] ; then
- ver_major=`grep "#define XML_MAJOR_VERSION" ${EXPAT_ROOT}/include/expat.h | awk '{print $3}'`
- ver_minor=`grep "#define XML_MINOR_VERSION" ${EXPAT_ROOT}/include/expat.h | awk '{print $3}'`
- ver_maint=`grep "#define XML_MICRO_VERSION" ${EXPAT_ROOT}/include/expat.h | awk '{print $3}'`
- ver="$ver_major.$ver_minor.$ver_maint"
- if [ "$ver" == "${EXPAT_VERSION}" ] ; then
+if [ "${EXPAT_ROOT_DIR}" != "" ] && [ -f ${EXPAT_ROOT_DIR}/include/expat.h ] ; then
+ ver_major=`grep "#define XML_MAJOR_VERSION" ${EXPAT_ROOT_DIR}/include/expat.h | awk '{print $3}'`
+ ver_minor=`grep "#define XML_MINOR_VERSION" ${EXPAT_ROOT_DIR}/include/expat.h | awk '{print $3}'`
+ ver_maint=`grep "#define XML_MICRO_VERSION" ${EXPAT_ROOT_DIR}/include/expat.h | awk '{print $3}'`
+ ver="${ver_major}.${ver_minor}.${ver_maint}"
+ if [ "${ver}" = "${VERSION_EXPAT}" ] ; then
return 0
fi
fi
print_env_bin(){
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export EXPAT_ROOT=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PATH=\${EXPAT_ROOT}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${EXPAT_ROOT}/lib:\${LD_LIBRARY_PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export EXPAT_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${EXPAT_ROOT_DIR}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${EXPAT_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
}
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}/MAKE.LOG make install
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 libdir
-cd ${PRODUCT_DIR}/lib
-for l in XXX `find $ldir -name "*.la"`; do
- if [ "$l" == "XXX" ] ; then continue; fi
- sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" $l
+for l in XXX `find ${PRODUCT_DIR}/lib -name "*.la"`; do
+ if [ "${l}" = "XXX" ] ; then continue; fi
+ sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" ${l}
done
# to generate environment script for sources
export INSTALL_PRODUCTS=$7;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="expat-${EXPAT_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="expat-${VERSION_EXPAT}"
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}
#
# freeimage version
#
-FREEIMAGE_VERSION=3.15.4
+VERSION_FREEIMAGE=3.15.4
check_version()
{
# check existance of freeimage and its version
-if [ "${FREEIMAGEDIR}" != "" ] && [ -f ${FREEIMAGEDIR}/include/FreeImage.h ] ; then
- ver_major=`grep "#define FREEIMAGE_MAJOR_VERSION" ${FREEIMAGEDIR}/include/FreeImage.h | awk '{print $3}'`
- ver_minor=`grep "#define FREEIMAGE_MINOR_VERSION" ${FREEIMAGEDIR}/include/FreeImage.h | awk '{print $3}'`
- ver_maint=`grep "#define FREEIMAGE_RELEASE_SERIAL" ${FREEIMAGEDIR}/include/FreeImage.h | awk '{print $3}'`
- ver="$ver_major.$ver_minor.$ver_maint"
- if [ "$ver" == "${FREEIMAGE_VERSION}" ] ; then
+if [ "${FREEIMAGE_ROOT_DIR}" != "" ] && [ -f ${FREEIMAGE_ROOT_DIR}/include/FreeImage.h ] ; then
+ ver_major=`grep "#define FREEIMAGE_MAJOR_VERSION" ${FREEIMAGE_ROOT_DIR}/include/FreeImage.h | awk '{print $3}'`
+ ver_minor=`grep "#define FREEIMAGE_MINOR_VERSION" ${FREEIMAGE_ROOT_DIR}/include/FreeImage.h | awk '{print $3}'`
+ ver_maint=`grep "#define FREEIMAGE_RELEASE_SERIAL" ${FREEIMAGE_ROOT_DIR}/include/FreeImage.h | awk '{print $3}'`
+ ver="${ver_major}.${ver_minor}.${ver_maint}"
+ if [ "${ver}" = "${VERSION_FREEIMAGE}" ] ; then
return 0
fi
fi
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export FREEIMAGEDIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PATH=\${FREEIMAGEDIR}/bin:\$PATH
-export LD_LIBRARY_PATH=\${FREEIMAGEDIR}/lib:\${LD_LIBRARY_PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export FREEIMAGE_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${FREEIMAGE_ROOT_DIR}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${FREEIMAGE_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}
+# patch sources
+# [-] patch for build procedure
+local patch_build_procedure=1
+if [ "${patch_build_procedure}" = "1" ] ; then
+ sed -i "s%DESTDIR ?= /%DESTDIR ?= /usr%g;s%INCDIR ?= \$(DESTDIR)/usr/include%INCDIR ?= \$(DESTDIR)/include%g;s%INSTALLDIR ?= \$(DESTDIR)/usr/lib%INSTALLDIR ?= \$(DESTDIR)/lib%g;s%-o root -g root %%g" ${PRODUCT_SRC_DIR}/Makefile.gnu
+ sed -i "s%DESTDIR ?= /%DESTDIR ?= /usr%g;s%INCDIR ?= \$(DESTDIR)/usr/include%INCDIR ?= \$(DESTDIR)/include%g;s%INSTALLDIR ?= \$(DESTDIR)/usr/lib%INSTALLDIR ?= \$(DESTDIR)/lib%g;s%-o root -g root %%g" ${PRODUCT_SRC_DIR}/Makefile.fip
+ sed -i "s%\(^[[:space:]]*\)\(install -m 755 \$(SHAREDLIB) \$(INSTALLDIR)\)%\1\2\n\1ln -sf \$(SHAREDLIB) \$(INSTALLDIR)/\$(VERLIBNAME)\n\1ln -sf \$(VERLIBNAME) \$(INSTALLDIR)/\$(LIBNAME)%g" ${PRODUCT_SRC_DIR}/Makefile.fip
+fi
+
+# [-] patch for gcc 4.7 compatibility
+local patch_gcc47_compat=1
+if [ "${patch_gcc47_compat}" = "1" ] ; then
+ sed -i 's%\(#include "OpenEXRConfig.h"\)%\1\n#include <string.h>%g' ${PRODUCT_SRC_DIR}/Source/OpenEXR/IlmImf/ImfAutoArray.h
+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
}
# build sources
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-# patch sources
-# [-]
-local patch_build_procedure=1
-if [ "${patch_build_procedure}" = "1" ] ; then
- cd ${PRODUCT_SRC_DIR}
- sed -i "s%DESTDIR ?= /%DESTDIR ?= /usr%g;s%INCDIR ?= \$(DESTDIR)/usr/include%INCDIR ?= \$(DESTDIR)/include%g;s%INSTALLDIR ?= \$(DESTDIR)/usr/lib%INSTALLDIR ?= \$(DESTDIR)/lib%g;s%-o root -g root %%g" Makefile.gnu
- sed -i "s%DESTDIR ?= /%DESTDIR ?= /usr%g;s%INCDIR ?= \$(DESTDIR)/usr/include%INCDIR ?= \$(DESTDIR)/include%g;s%INSTALLDIR ?= \$(DESTDIR)/usr/lib%INSTALLDIR ?= \$(DESTDIR)/lib%g;s%-o root -g root %%g" Makefile.fip
-fi
-
-# [-]
-local patch_gcc47_compat=1
-if [ "${patch_gcc47_compat}" = "1" ] ; then
- cd ${PRODUCT_SRC_DIR}
- sed -i 's%\(#include "OpenEXRConfig.h"\)%\1\n#include <string.h>%g' Source/OpenEXR/IlmImf/ImfAutoArray.h
-fi
-
cd ${PRODUCT_SRC_DIR}
## building FreeImage library
check_job ${PRODUCT_DIR}/INSTALL.LOG make -f Makefile.gnu DESTDIR=${PRODUCT_DIR} install
# clean temporary files
-make -f Makefile.gnu clean
+###make -f Makefile.gnu clean
## building FreeImagePlus library
check_job ${PRODUCT_DIR}/INSTALLPLUS.LOG make -f Makefile.fip DESTDIR=${PRODUCT_DIR} install
# clean temporary files
-make -f Makefile.fip clean
+###make -f Makefile.fip clean
-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}
-### modifing la files
-cd ${PRODUCT_DIR}/lib
-
# to generate environment script for sources
try_preinstalled
}
export INSTALL_PRODUCTS=$7;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="freeimage-${FREEIMAGE_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="freeimage-${VERSION_FREEIMAGE}"
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}
#
# freetype version
#
-FREETYPE_VERSION=2.4.11
+VERSION_FREETYPE=2.4.11
check_version()
{
# check existance of freetype and its version
-if [ "${FREETYPEDIR}" != "" ] && [ -f ${FREETYPEDIR}/include/freetype2/freetype/freetype.h ] ; then
- ver_major=`grep "#define FREETYPE_MAJOR" ${FREETYPEDIR}/include/freetype2/freetype/freetype.h | awk '{print $3}'`
- ver_minor=`grep "#define FREETYPE_MINOR" ${FREETYPEDIR}/include/freetype2/freetype/freetype.h | awk '{print $3}'`
- ver_maint=`grep "#define FREETYPE_PATCH" ${FREETYPEDIR}/include/freetype2/freetype/freetype.h | awk '{print $3}'`
- ver="$ver_major.$ver_minor.$ver_maint"
- if [ "$ver" == "${FREETYPE_VERSION}" ] ; then
+if [ "${FREETYPE_ROOT_DIR}" != "" ] && [ -f ${FREETYPE_ROOT_DIR}/include/freetype2/freetype/freetype.h ] ; then
+ ver_major=`grep "#define FREETYPE_MAJOR" ${FREETYPE_ROOT_DIR}/include/freetype2/freetype/freetype.h | awk '{print $3}'`
+ ver_minor=`grep "#define FREETYPE_MINOR" ${FREETYPE_ROOT_DIR}/include/freetype2/freetype/freetype.h | awk '{print $3}'`
+ ver_maint=`grep "#define FREETYPE_PATCH" ${FREETYPE_ROOT_DIR}/include/freetype2/freetype/freetype.h | awk '{print $3}'`
+ ver="${ver_major}.${ver_minor}.${ver_maint}"
+ if [ "${ver}" = "${VERSION_FREETYPE}" ] ; then
return 0
fi
fi
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export FREETYPEDIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export LD_LIBRARY_PATH=\${FREETYPEDIR}/lib:\${LD_LIBRARY_PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export FREETYPE_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export LD_LIBRARY_PATH=\${FREETYPE_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
}
cd ${PRODUCT_SRC_DIR}
-FREETYPE_CONFIGURE_OPTIONS="--prefix=${PRODUCT_DIR}"
+FREETYPE_CONFIGURE_OPTIONS=
if test `uname -m` = "x86_64" ; then
FREETYPE_CONFIGURE_OPTIONS="${FREETYPE_CONFIGURE_OPTIONS} CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC'"
fi
-#congigure
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${FREETYPE_CONFIGURE_OPTIONS}
+# congigure
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${FREETYPE_CONFIGURE_OPTIONS}
# compile
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
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
-if [ -f ${PRODUCT_DIR}/lib/libfreetype.la ] ; then
- ( cd ${PRODUCT_DIR}/lib && sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g;" libfreetype.la )
-fi
+test -e ${PRODUCT_DIR}/lib/libfreetype.la && sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g;" ${PRODUCT_DIR}/lib/libfreetype.la
# modify pkgconfig
if [ -d ${PRODUCT_DIR}/lib/pkgconfig ] ; then
- 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
done
fi
+
# modify config file
sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g" ${PRODUCT_DIR}/bin/freetype-config
export INSTALL_PRODUCTS=$7;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="freetype-${FREETYPE_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="freetype-${VERSION_FREETYPE}"
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}
#
# ftgl version
#
-FTGL_VERSION=2.1.3
+VERSION_FTGL=2.1.3
check_version()
{
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export FTGLDIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PATH=\${FTGLDIR}/bin:\$PATH
-export LD_LIBRARY_PATH=\${FTGLDIR}/lib:\${LD_LIBRARY_PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export FTGL_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${FTGL_ROOT_DIR}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${FTGL_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}
# patch for problem with generation of latex documentation on some platforms:
patch_for_latex=1
if [ "${patch_for_latex}" = "1" ] ; then
- ( cd ${PRODUCT_SRC_DIR}/docs && sed -i "s%pdfdoc_DATA =%pdfdoc_DATA = #%g" Makefile.in )
+ sed -i "s%pdfdoc_DATA =%pdfdoc_DATA = #%g" ${PRODUCT_SRC_DIR}/docs/Makefile.in
+fi
+
+# patch for problem with missing gl libraries
+patch_for_gllibs=1
+if [ "${patch_for_gllibs}" = "1" ] ; then
+ sed -i "s%\(CXXTest_LDFLAGS = .*\)$%\1 \$(GL_LIBS)%g" ${PRODUCT_SRC_DIR}/test/Makefile.in
+ sed -i "s%\(.*_LDFLAGS = .*\)$%\1 \$(GL_LIBS)%g" ${PRODUCT_SRC_DIR}/demo/Makefile.in
+fi
+
+patch_for_libs=1
+# patch for problem with missing additional libraries
+if [ "${patch_for_libs}" = "1" ] ; then
+ sed -i "s%\(c_demo_LDFLAGS = .*\)$%\1 -lm%g" ${PRODUCT_SRC_DIR}/demo/Makefile.in
+fi
+
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.src.size
fi
# to generate environment scripts
cd ${PRODUCT_SRC_DIR}
FTGL_CONFIGURE_OPTIONS=""
-FTGL_CONFIGURE_OPTIONS="${FTGL_CONFIGURE_OPTIONS} --enable-shared=yes --prefix=${PRODUCT_DIR}"
-FTGL_CONFIGURE_OPTIONS="${FTGL_CONFIGURE_OPTIONS} --with-ft-prefix=${FREETYPEDIR}"
+FTGL_CONFIGURE_OPTIONS="${FTGL_CONFIGURE_OPTIONS} --enable-shared=yes"
+FTGL_CONFIGURE_OPTIONS="${FTGL_CONFIGURE_OPTIONS} --with-ft-prefix=${FREETYPE_ROOT_DIR}"
FTGL_CONFIGURE_OPTIONS="${FTGL_CONFIGURE_OPTIONS} --with-gl-inc=/usr/include"
if test `uname -m` = "x86_64" ; then
fi
# congigure
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${FTGL_CONFIGURE_OPTIONS}
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${FTGL_CONFIGURE_OPTIONS}
# compile
check_job ${PRODUCT_DIR}/MAKE.LOG make
check_job ${PRODUCT_DIR}/INSTALL.LOG make install
# fix libGL dependecies
-cd ${PRODUCT_DIR}/lib && fix_gl_libs
+( cd ${PRODUCT_DIR}/lib && fix_gl_libs )
-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}
-### modifing la files
+# modifing la files
if [ -f ${PRODUCT_DIR}/lib/libftgl.la ] ; then
cd ${PRODUCT_DIR}/lib
sed -i "s%\(.*\)\([[:space:]].*libfreetype.la\)\(.*\)%\1 -lfreetype\3%g;s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libftgl.la
- sed -i "s%\(.*\)\([[:space:]].*-L.*/freetype-[0-9]\+\.[0-9]\+\.[0-9]\+/lib[[:space:]]\)\(.*\)%\1 -L${FREETYPEDIR}/lib \3%g" libftgl.la
+ sed -i "s%\(.*\)\([[:space:]].*-L.*/freetype-[0-9]\+\.[0-9]\+\.[0-9]\+/lib[[:space:]]\)\(.*\)%\1 -L${FREETYPE_ROOT_DIR}/lib \3%g" libftgl.la
fi
# modify pkgconfig
if [ -d ${PRODUCT_DIR}/lib/pkgconfig ] ; then
- cd ${PRODUCT_DIR}/lib/pkgconfig
- for l in X `find . -name "*.pc"`; do
- if [ "${l}" != "X" ] ; then
- sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g;s%-L[^[:space:]]*/freetype[^[:space:]]*/lib%-L${FREETYPEDIR}/lib%g;s%-I[^[:space:]]*/freetype[^[:space:]]*/include%-I${FREETYPEDIR}/include%g" ${l}
- fi
+ for l in X `find ${PRODUCT_DIR}/lib/pkgconfig -name "*.pc"`; do
+ if [ "${l}" != "X" ] ; then
+ sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g;s%-L[^[:space:]]*/freetype[^[:space:]]*/lib%-L${FREETYPE_ROOT_DIR}/lib%g;s%-I[^[:space:]]*/freetype[^[:space:]]*/include%-I${FREETYPE_ROOT_DIR}/include%g" ${l}
+ fi
done
fi
export INSTALL_PRODUCTS=$7;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="ftgl-${FTGL_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="ftgl-${VERSION_FTGL}"
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}
#
####################################################################################
-if [ "x$GCC_VERSION" == "x" ] ; then
+if [ "x${GCC_VERSION}" = "x" ] ; then
GCC_VERSION="3.2"
fi
-GCC_VERSION_MAJ=`echo $GCC_VERSION | awk -F[.-] '{if(NF>0) print $1; else print 0}'`
-GCC_VERSION_MIN=`echo $GCC_VERSION | awk -F[.-] '{if(NF>1) print $2; else print 0}'`
-GCC_VERSION_REL=`echo $GCC_VERSION | awk -F[.-] '{if(NF>2) print $3; else print 0}'`
-let GCC_VERSION_ID=$GCC_VERSION_MAJ*10000+$GCC_VERSION_MIN*100+$GCC_VERSION_REL
+GCC_VERSION_MAJ=`echo ${GCC_VERSION} | awk -F[.-] '{if(NF>0) print $1; else print 0}'`
+GCC_VERSION_MIN=`echo ${GCC_VERSION} | awk -F[.-] '{if(NF>1) print $2; else print 0}'`
+GCC_VERSION_REL=`echo ${GCC_VERSION} | awk -F[.-] '{if(NF>2) print $3; else print 0}'`
+let GCC_VERSION_ID=${GCC_VERSION_MAJ}*10000+${GCC_VERSION_MIN}*100+${GCC_VERSION_REL}
check_version()
{
# version number is calculated as: <major>*10000+<minor>*100+<release>
# e.g. for gcc 3.2 it is equal to 30200, for gcc 3.3.2 - 30202
gcc_ver=`gcc -dumpversion | awk -F[.-] '{v1=0;v2=0;v3=0;if(NF>0)v1=$1;if(NF>1)v2=$2;if(NF>2)v3=$3;print v1*10000+v2*100+v3}'`
-if [ $gcc_ver -eq $GCC_VERSION_ID ] ; then
+if [ ${gcc_ver} -eq ${GCC_VERSION_ID} ] ; then
return 0
fi
return 1
# looks for the native product and collects it's environment (used by make_env())
try_native(){
-gcc_root="`where_gcc $GCC_VERSION`"
+gcc_root="`where_gcc ${GCC_VERSION}`"
if [ -n "${gcc_root}" ] ; then
gcc_root=`cd ${gcc_root}/..; pwd`
# get version number: <major>, <minor> and <release>
maj_ver=`${gcc_root}/bin/gcc -dumpversion | awk -F[.-] '{if(NF>0) print $1; else print 0}'`
min_ver=`${gcc_root}/bin/gcc -dumpversion | awk -F[.-] '{if(NF>1) print $2; else print 0}'`
rel_ver=`${gcc_root}/bin/gcc -dumpversion | awk -F[.-] '{if(NF>2) print $3; else print 0}'`
- let gcc_ver=$maj_ver*10000+$min_ver*100+$rel_ver
- if [ $gcc_ver -ge $GCC_VERSION_ID ] ; then
+ let gcc_ver=${maj_ver}*10000+${min_ver}*100+${rel_ver}
+ if [ ${gcc_ver} -ge ${GCC_VERSION_ID} ] ; then
tmp="\${GCC_ROOT}/bin ${gcc_root}/bin \${PATH} ${PATH}";
path=`sort_path ${tmp}`
tmp="\${GCC_ROOT}/lib ${gcc_root}/lib \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}";
ld_library_path=`sort_path ${tmp}`
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
#export GCC_ROOT=${gcc_root}
#export CXX=\${GCC_ROOT}/bin/g++
#export CC=\${GCC_ROOT}/bin/gcc
EOF
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
####### THIS COULD BE USED FOR STRICT COMPARISON ##############################
-# if [ $maj_ver -eq 3 ] && [ $min_ver -eq 2 ] && [ $rel_ver -eq 0 ] ; then
+# if [ ${maj_ver} -eq 3 ] && [ ${min_ver} -eq 2 ] && [ ${rel_ver} -eq 0 ] ; then
######################################################################################
- if [ $maj_ver -eq $GCC_VERSION_MAJ ] && [ $min_ver -eq $GCC_VERSION_MIN ] && [ $rel_ver -ge $GCC_VERSION_REL ] ; then
+ if [ ${maj_ver} -eq ${GCC_VERSION_MAJ} ] && [ ${min_ver} -eq ${GCC_VERSION_MIN} ] && [ ${rel_ver} -ge ${GCC_VERSION_REL} ] ; then
return 0
else
return 2
export PRODUCT_SEQUENCE=$5;
export PRODUCT_TYPE=$6;
export INSTALL_PRODUCTS=$7;
-export PRODUCT="gcc-$GCC_VERSION"
+export PRODUCT="gcc-${GCC_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${PRODUCT}
export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
source ./common.sh
-$PROCEDURE
+${PROCEDURE}