if ( $inst_with_gui == 0 ) then
set myconf_keys="${myconf_keys} --without-gui"
endif
- if ( "${module}" == "MED" && ($?METISDIR) && ($?SCOTCHDIR) ) then
- set myconf_keys="${myconf_keys} --enable-splitter=yes --with-metis=${METISDIR} --with-scotch=${SCOTCHDIR}"
+ if ( "${module}" == "MED" && ($?METIS_ROOT_DIR) && ($?SCOTCH_ROOT_DIR) ) then
+ set myconf_keys="${myconf_keys} --enable-splitter=yes --with-metis=${METIS_ROOT_DIR} --with-scotch=${SCOTCH_ROOT_DIR}"
endif
- if ( "${module}" == "NETGENPLUGIN" && ($?NETGENHOME) ) then
- set myconf_keys="${myconf_keys} --with-netgen=${NETGENHOME}"
+ if ( "${module}" == "NETGENPLUGIN" && ($?NETGEN_ROOT_DIR) ) then
+ set myconf_keys="${myconf_keys} --with-netgen=${NETGEN_ROOT_DIR}"
endif
-
if ( "${module}" == "PARAVIS" ) then
cd ${module_build}; cmake ${module_src} -DCMAKE_INSTALL_PREFIX=$px >& ${LOG_DIR}/configure_${module}.log
else
for arg in $@ ; do
known=0
for m in $modules ; do
- if [ "$m" == "$arg" ] ; then known=1 ; break ; fi
+ if [ "$m" = "$arg" ] ; then known=1 ; break ; fi
done
if [ $known -eq 0 ] ; then
echo
for module in ${modules} ; do
found=0
for p in $params ; do
- if [ "$p" == "$module" ] ; then found=1 ; break ; fi
+ if [ "$p" = "$module" ] ; then found=1 ; break ; fi
done
if [ $found -eq 1 ] ; then
xparams="$xparams $module"
#########################################################
# define installation prefix
#########################################################
-if [ "$prefix" == "" ] ; then
+if [ "$prefix" = "" ] ; then
echo
echo '!!! Warning !!! Installation directory is not set.'
echo "All the modules will be installed to the ${BUILD_DIR}${def_install_dir}"
else
- if [ "`echo $prefix | grep -E '^/'`" == "" ] ; then
+ if [ "`echo $prefix | grep -E '^/'`" = "" ] ; then
prefix=${BUILD_DIR}/$prefix
echo
echo '!!! Warning !!! Relative prefix is used.'
if [ ! -e ${module_src}/build_configure ] && [ "${module}" != "PARAVIS" ] ; then
echo '!!! Warning !!! Cannot find build_configure script in '${module_src}'.'
else
- if [ "${module}" == "PARAVIS" ]; then
+ if [ "${module}" = "PARAVIS" ]; then
echo '!!! Warning !!! build_configure step is not executed for '${module}'.'
else
#########################################################
vx=`grep -e "^AC_INIT" ${module_src}/configure.ac | sed -e "s%.*\[\([[:digit:].]*\)\].*%\1%g"`
elif [ -e ${module_src}/configure.in.base ] ; then
vx=`grep -e "^VERSION=" ${module_src}/configure.in.base | awk -F= '{ if (NF>1) print $NF; }' | tr -d '[:space:]'`
- if [ "$vx" == "" ] ; then
+ if [ "$vx" = "" ] ; then
vx=`grep -e "^AC_INIT" ${module_src}/configure.in.base | sed -e "s%.*\[\([[:digit:].]*\)\].*%\1%g"`
fi
elif [ -e ${module_src}/CMakeLists.txt ] ; then
if [ "$vx" != "" ] ; then
vx="_$vx"
fi
- if [ "$prefix" == "" ] ; then
+ if [ "$prefix" = "" ] ; then
px=${BUILD_DIR}${def_install_dir}/${module}${vx}
else
px=$prefix/${module}${vx}
if [ $inst_with_gui -eq 0 ] ; then
myconf_keys="${myconf_keys} --without-gui"
fi
- if [ "${module}" == "MED" ] && [ "${METISDIR}" != "" ] && [ "${SCOTCHDIR}" != "" ] ; then
- myconf_keys="${myconf_keys} --enable-splitter=yes --with-metis=${METISDIR} --with-scotch=${SCOTCHDIR}"
+ if [ "${module}" = "MED" ] && [ "${METIS_ROOT_DIR}" != "" ] && [ "${SCOTCH_ROOT_DIR}" != "" ] ; then
+ myconf_keys="${myconf_keys} --enable-splitter=yes --with-metis=${METIS_ROOT_DIR} --with-scotch=${SCOTCH_ROOT_DIR}"
fi
- if [ "${module}" == "NETGENPLUGIN" ] && [ "$NETGENHOME" != "" ] ; then
- myconf_keys="${myconf_keys} --with-netgen=${NETGENHOME}"
+ if [ "${module}" = "NETGENPLUGIN" ] && [ "$NETGEN_ROOT_DIR" != "" ] ; then
+ myconf_keys="${myconf_keys} --with-netgen=${NETGEN_ROOT_DIR}"
fi
- if [ "${module}" == "PARAVIS" ] ; then
+ if [ "${module}" = "PARAVIS" ] ; then
cd ${module_build}; cmake ${module_src} -DCMAKE_INSTALL_PREFIX=$px >& ${LOG_DIR}/configure_${module}.log
else
${module_src}/configure --prefix=$px ${optim} ${myconf_keys} >& ${LOG_DIR}/configure_${module}.log
#########################################################
# then make
#########################################################
- if [ "${module}" == "PARAVIS" ] ; then
+ if [ "${module}" = "PARAVIS" ] ; then
VTK_AUTOLOAD_PATH_BACKUP=${VTK_AUTOLOAD_PATH}
test "${VTK_AUTOLOAD_PATH}" != "" && unset VTK_AUTOLOAD_PATH
fi
make >& ${LOG_DIR}/make_${module}.log
sts=$?
- if [ "${module}" == "PARAVIS" ] ; then
+ if [ "${module}" = "PARAVIS" ] ; then
test "${VTK_AUTOLOAD_PATH_BACKUP}" != "" && export VTK_AUTOLOAD_PATH=${VTK_AUTOLOAD_PATH_BACKUP}
fi
#########################################################
#########################################################
# perform make if -i or -p flags are given
#########################################################
- if [ $is_install -eq 1 ] && [ $sts -eq 0 ] || [ "${module}" == "KERNEL" ] ; then
+ if [ $is_install -eq 1 ] && [ $sts -eq 0 ] || [ "${module}" = "KERNEL" ] ; then
#########################################################
# deleting build directory if -d flag is given
#########################################################
#this function takes one parameter - path to module source folder
check_salome_src_version(){
-root_dir=`printenv $1`
+root_dir=${!1}
-if [ -n "$root_dir" ]; then
+if [ -n "${root_dir}" ]; then
cfg_file=configure.ac
if [ ! -f ${root_dir}/${cfg_file} ] ; then
cfg_file=configure.in.base
ver=`grep -e "^AC_INIT" ${root_dir}/${cfg_file} | sed -e "s%.*\[\([[:digit:].]*\)\].*%\1%g"`
fi
- if [ "$ver" = "${SALOME_VERSION}" ]; then
+ if [ "${ver}" = "${SALOME_VERSION}" ]; then
return 0
fi
fi
out=$1
shift
errfile=/tmp/errlog
- if [ -n "$INSTALL_WORK" ] ; then errfile=$INSTALL_WORK/errlog; fi
+ if [ -n "${INSTALL_WORK}" ] ; then errfile=${INSTALL_WORK}/errlog; fi
cmd="`pwd` -> $*"
- if [ "$out" != "1" ] ; then cmd="$cmd >> $out" ; fi
- echo -e $cmd
- if [ "$out" != "1" ] ; then
- $* >> $out 2>$errfile
+ if [ "${out}" != "1" ] ; then cmd="${cmd} >> ${out}" ; fi
+ echo -e ${cmd}
+ if [ "${out}" != "1" ] ; then
+ $* >> ${out} 2>${errfile}
else
$*
fi
if [ "$?" -ne "0" ] ; then
- if [ $out != "1" ] ; then
- cat $out
- cat $errfile >&2
- cat $errfile >> $out
+ if [ ${out} != "1" ] ; then
+ cat ${out}
+ cat ${errfile} >&2
+ cat ${errfile} >> ${out}
fi
# VSR : 10/11/05: disable answer mode ==>
#echo -n " " >&2
#echo -e "NOT DONE !!! => $*"
#echo -n "Would you like to continue to install this product: (Y,N) [Y] : "
#read rep;
- #rep=`echo $rep | tr "[A-Z]" "[a-z]"`
- #if test -z $rep || [ $rep = "y" ] ; then
+ #rep=`echo ${rep} | tr "[A-Z]" "[a-z]"`
+ #if test -z ${rep} || [ ${rep} = "y" ] ; then
# return 1
#fi
# VSR : 10/11/05: disable answer mode <==
install_root=$1; shift
install_work=$1;
-for i in $SHRC $CSHRC ; do
- if [ -e ${install_work}/$i ]; then
- rm ${install_work}/$i
+for i in ${SHRC} ${CSHRC} ; do
+ if [ -e ${install_work}/${i} ]; then
+ rm ${install_work}/${i}
fi
- touch ${install_work}/$i
+ touch ${install_work}/${i}
done
if [ $# -eq 4 ] ; then
(test -e ${product_env} && rm ${product_env} )
fi
### !!! writing salome.sh file !!! -> define INST_ROOT
-cat >> ${install_work}/$SHRC <<EOF
+cat >> ${install_work}/${SHRC} <<EOF
#${DELIM} Setting products installation directory ${DELIM}
export INST_ROOT=${install_root}
if [ -f /etc/redhat-release ] ; then
grep -e "Red Hat Linux release 9" /etc/redhat-release > /dev/null
if [ $? -eq 0 ] ; then
- cat >> ${install_work}/$SHRC <<EOF
+ cat >> ${install_work}/${SHRC} <<EOF
#${DELIM} Force RH9 to use old implementation of threads ${DELIM}
export LD_ASSUME_KERNEL=2.4.18
fi
### !!! writing salome.csh file !!! -> set inital variables
pre_vars="PATH LD_LIBRARY_PATH LD_RUN_PATH PYTHONPATH TCLLIBPATH"
-for i in $pre_vars ; do
-cat >> ${install_work}/$CSHRC <<EOF
+for i in ${pre_vars} ; do
+cat >> ${install_work}/${CSHRC} <<EOF
#${DELIM} setting initial ${i} ${DELIM}
if (! (\$?${i}) ) then
- setenv $i
+ setenv ${i}
endif
EOF
# 0. add /usr/lib or /usr/lib64 dir to the LD_LIBRARY_PATH
#if test `uname -m` = "x86_64" ; then
-#echo 'export LD_LIBRARY_PATH=/usr/lib64:${LD_LIBRARY_PATH}' >> ${install_work}/$SHRC 2>/dev/null
-#echo '' >> ${install_work}/$SHRC 2>/dev/null
+#echo 'export LD_LIBRARY_PATH=/usr/lib64:${LD_LIBRARY_PATH}' >> ${install_work}/${SHRC} 2>/dev/null
+#echo '' >> ${install_work}/${SHRC} 2>/dev/null
#else
-#echo 'export LD_LIBRARY_PATH=/usr/lib:${LD_LIBRARY_PATH}' >> ${install_work}/$SHRC 2>/dev/null
-#echo '' >> ${install_work}/$SHRC 2>/dev/null
+#echo 'export LD_LIBRARY_PATH=/usr/lib:${LD_LIBRARY_PATH}' >> ${install_work}/${SHRC} 2>/dev/null
+#echo '' >> ${install_work}/${SHRC} 2>/dev/null
#fi
# Licence activation
# Source of license environment file
-echo '#------ License activation ------' >> ${install_work}/$SHRC 2>/dev/null
-echo 'export LICENSE_FILE=/product/distene/dlim8.var.sh' >> ${install_work}/$SHRC 2>/dev/null
-echo '' >> ${install_work}/$SHRC 2>/dev/null
-echo 'if [ -e "${LICENSE_FILE}" ] ; then' >> ${install_work}/$SHRC 2>/dev/null
-echo 'export SIMULOGD_LICENSE_FILE=29029@soleil' >> ${install_work}/$SHRC 2>/dev/null
-echo 'source ${LICENSE_FILE}' >> ${install_work}/$SHRC 2>/dev/null
-echo 'fi' >> ${install_work}/$SHRC 2>/dev/null
-echo '' >> ${install_work}/$SHRC 2>/dev/null
+echo '#------ License activation ------' >> ${install_work}/${SHRC} 2>/dev/null
+echo 'export LICENSE_FILE=/product/distene/dlim8.var.sh' >> ${install_work}/${SHRC} 2>/dev/null
+echo '' >> ${install_work}/${SHRC} 2>/dev/null
+echo 'if [ -e "${LICENSE_FILE}" ] ; then' >> ${install_work}/${SHRC} 2>/dev/null
+echo 'export SIMULOGD_LICENSE_FILE=29029@soleil' >> ${install_work}/${SHRC} 2>/dev/null
+echo 'source ${LICENSE_FILE}' >> ${install_work}/${SHRC} 2>/dev/null
+echo 'fi' >> ${install_work}/${SHRC} 2>/dev/null
+echo '' >> ${install_work}/${SHRC} 2>/dev/null
-# 1. first dump all environment files into the $SHRC file
+# 1. first dump all environment files into the ${SHRC} file
product_sequence="$2"
install_products="$3"
-for i in $product_sequence ; do
+for i in ${product_sequence} ; do
env_file=${install_work}/env_${i}.sh
_env_file=${install_work}/_env_${i}.sh
- if [ -e $_env_file ] ; then
- cat $_env_file >> ${install_work}/$SHRC 2>/dev/null
- elif [ -e $env_file ] ; then
- echo $install_products | grep -q "\b${i}\b"
+ if [ -e ${_env_file} ] ; then
+ cat ${_env_file} >> ${install_work}/${SHRC} 2>/dev/null
+ elif [ -e ${env_file} ] ; then
+ echo ${install_products} | grep -q "\b${i}\b"
if [ $? -eq 1 ] ; then
- cat $env_file | sed 's/^/## /' >> ${install_work}/$SHRC 2>/dev/null
+ cat ${env_file} | sed 's/^/## /' >> ${install_work}/${SHRC} 2>/dev/null
else
- cat $env_file >> ${install_work}/$SHRC 2>/dev/null
+ cat ${env_file} >> ${install_work}/${SHRC} 2>/dev/null
fi
fi
done
# 2. writing global functions to _salome.sh file
-cat >> ${install_work}/_$SHRC <<EOF
+cat >> ${install_work}/_${SHRC} <<EOF
##########################################################################
# Functions exporta and exportp are used to append/prepend correspondingly
# one directory or a set of directories separated by semicolon symbol (':')
} \\
} \\
}' | sed -e 's/\(.*\):/\1/g'\`
-echo \$out_var
+echo \${out_var}
}
### exporta ###
# appends directory or set of directories, separated by ':' (second parameter)
# to the variable (first parameter)
exporta () {
-xenv=\`printenv \$1\`
-if [ -z "\$xenv" ]; then xenv="<empty>"; fi
-out_var=\`cleandup \$xenv \$2 0\`
-export \$1=\$out_var
+xenv=\${!1}
+if [ -z "\${xenv}" ]; then xenv="<empty>"; fi
+out_var=\`cleandup \${xenv} \$2 0\`
+export \$1=\${out_var}
}
### exportp ###
# prepends directory or set of directories, separated by ':' (second parameter)
# to the variable (first parameter)
exportp () {
-xenv=\`printenv \$1\`
-if [ -z "\$xenv" ]; then xenv="<empty>"; fi
-out_var=\`cleandup \$xenv \$2 1\`
-export \$1=\$out_var
+xenv=\${!1}
+if [ -z "\${xenv}" ]; then xenv="<empty>"; fi
+out_var=\`cleandup \${xenv} \$2 1\`
+export \$1=\${out_var}
}
###########################################################################
EOF
# 3. writing global functions to _salome.csh file
-cat >> ${install_work}/_$CSHRC <<EOF
+cat >> ${install_work}/_${CSHRC} <<EOF
###########################################################################
# Aliases setenva and setenvp are used to append/prepend correspondingly
### setenva ###
# appends directory or set of directories, separated by ':' (second parameter)
# to the variable (first parameter)
-alias setenva 'set a=\!:1 ; set b=\!:2 ; \\
- set c=\`printenv \$a\` ; \\
- set b=\`cleandup \$c \$b 0\` ; \\
- setenv \$a \$b ; \\
+alias setenva 'set a=\!:1 ; set b=\!:2 ; \\
+ set c=\`printenv \${a}\` ; \\
+ set b=\`cleandup \${c} \${b} 0\` ; \\
+ setenv \${a} \${b} ; \\
unset a, b, c'
### setenvp ###
# prepends directory or set of directories, separated by ':' (second parameter)
# to the variable (first parameter)
-alias setenvp 'set a=\!:1 ; set b=\!:2 ; \\
- set c=\`printenv \$a\` ; \\
- set b=\`cleandup \$c \$b 1\` ; \\
- setenv \$a \$b ; \\
+alias setenvp 'set a=\!:1 ; set b=\!:2 ; \\
+ set c=\`printenv \${a}\` ; \\
+ set b=\`cleandup \${c} \${b} 1\` ; \\
+ setenv \${a} \${b} ; \\
unset a, b, c'
###########################################################################
EOF
-cat ${install_work}/$CSHRC >> ${install_work}/_$CSHRC
+cat ${install_work}/${CSHRC} >> ${install_work}/_${CSHRC}
# 4. put the contents of salome.sh to _salome.sh replacing export by export(a|p) aliases where necessary
-sed -e 's%export\([[:blank:]]*\)PATH=\$[{]\?PATH[}]\?:\(.*\)%exporta\1PATH \2%g' -e 's%export\([[:blank:]]*\)PATH=\(.*\):\$[{]\?PATH[}]\?%exportp\1PATH \2%g' ${install_work}/$SHRC > ${INSTALL_WORK}/_tmp1 2>/dev/null
+sed -e 's%export\([[:blank:]]*\)PATH=\$[{]\?PATH[}]\?:\(.*\)%exporta\1PATH \2%g' -e 's%export\([[:blank:]]*\)PATH=\(.*\):\$[{]\?PATH[}]\?%exportp\1PATH \2%g' ${install_work}/${SHRC} > ${INSTALL_WORK}/_tmp1 2>/dev/null
sed -e 's%export\([[:blank:]]*\)LD_LIBRARY_PATH=\$[{]\?LD_LIBRARY_PATH[}]\?:\(.*\)%exporta\1LD_LIBRARY_PATH \2%g' -e 's%export\([[:blank:]]*\)LD_LIBRARY_PATH=\(.*\):\$[{]\?LD_LIBRARY_PATH[}]\?%exportp\1LD_LIBRARY_PATH \2%g' ${INSTALL_WORK}/_tmp1 > ${INSTALL_WORK}/_tmp2 2>/dev/null
sed -e 's%export\([[:blank:]]*\)PYTHONPATH=\$[{]\?PYTHONPATH[}]\?:\(.*\)%exporta\1PYTHONPATH \2%g' -e 's%export\([[:blank:]]*\)PYTHONPATH=\(.*\):\$[{]\?PYTHONPATH[}]\?%exportp\1PYTHONPATH \2%g' ${INSTALL_WORK}/_tmp2 > ${INSTALL_WORK}/_tmp1 2>/dev/null
sed -e 's%export\([[:blank:]]*\)LD_RUN_PATH=\$[{]\?LD_RUN_PATH[}]\?:\(.*\)%exporta\1LD_RUN_PATH \2%g' -e 's%export\([[:blank:]]*\)LD_RUN_PATH=\(.*\):\$[{]\?LD_RUN_PATH[}]\?%exportp\1LD_RUN_PATH \2%g' ${INSTALL_WORK}/_tmp1 > ${INSTALL_WORK}/_tmp2
#echo 'export LD_LIBRARY_PATH=/usr/X11R6/lib:${LD_LIBRARY_PATH}' >> ${INSTALL_WORK}/_tmp2
#fi
-cat ${INSTALL_WORK}/_tmp2 >> ${install_work}/_$SHRC
+cat ${INSTALL_WORK}/_tmp2 >> ${install_work}/_${SHRC}
# 5. Create a salome.csh file from salome.sh by replacing export by setenv, etc.
-sed -e 's%export \([[:alnum:]_[:blank:]]*\)\=%setenv \1 %g' ${install_work}/$SHRC > ${INSTALL_WORK}/_tmp1 2>/dev/null
-cat ${INSTALL_WORK}/_tmp1 >> ${install_work}/$CSHRC
+sed -e 's%export \([[:alnum:]_[:blank:]]*\)\=%setenv \1 %g' ${install_work}/${SHRC} > ${INSTALL_WORK}/_tmp1 2>/dev/null
+cat ${INSTALL_WORK}/_tmp1 >> ${install_work}/${CSHRC}
# 6. Create a _salome.csh file from _salome.sh by replacing export by setenv, exporta by setenva, etc.
sed -e 's%export \([[:alnum:]_[:blank:]]*\)\=%setenv \1 %g' ${INSTALL_WORK}/_tmp2 > ${INSTALL_WORK}/_tmp1 2>/dev/null
sed -e 's%var.sh%var.csh%g' ${INSTALL_WORK}/_tmp1 > ${INSTALL_WORK}/_tmp2 2>/dev/null
sed -e 's%if \[ -e "\${LICENSE_FILE}" \] ; then%if ( -e ${LICENSE_FILE} ) then%g' ${INSTALL_WORK}/_tmp2 > ${INSTALL_WORK}/_tmp1 2>/dev/null
-cat ${INSTALL_WORK}/_tmp1 >> ${install_work}/_$CSHRC 2>/dev/null
+cat ${INSTALL_WORK}/_tmp1 >> ${install_work}/_${CSHRC} 2>/dev/null
rm -f ${INSTALL_WORK}/_tmp1 ${INSTALL_WORK}/_tmp2
if [ $# -eq 5 ] ; then
product_dir=$5
if [ -e ${product_dir} ] ; then
- test -e ${product_dir}/$SHRC && mv ${product_dir}/$SHRC ${product_dir}/${SHRC}_`date +%F_%T`
- cp ${install_work}/_$SHRC ${product_dir}/$SHRC
- test -e ${product_dir}/$CSHRC && mv ${product_dir}/$CSHRC ${product_dir}/${CSHRC}_`date +%F_%T`
- cp ${install_work}/_$CSHRC ${product_dir}/$CSHRC
+ test -e ${product_dir}/${SHRC} && mv ${product_dir}/${SHRC} ${product_dir}/${SHRC}_`date +%F_%T`
+ cp ${install_work}/_${SHRC} ${product_dir}/${SHRC}
+ test -e ${product_dir}/${CSHRC} && mv ${product_dir}/${CSHRC} ${product_dir}/${CSHRC}_`date +%F_%T`
+ cp ${install_work}/_${CSHRC} ${product_dir}/${CSHRC}
fi
fi
-sed -e 's%setenv ENV_FOR_LAUNCH 1%setenv ENV_FOR_LAUNCH 0%' ${install_work}/_$CSHRC > ${install_root}/env_build.csh
-sed -e 's%export ENV_FOR_LAUNCH=1%export ENV_FOR_LAUNCH=0%' ${install_work}/_$SHRC > ${install_root}/env_build.sh
+sed -e 's%setenv ENV_FOR_LAUNCH 1%setenv ENV_FOR_LAUNCH 0%' ${install_work}/_${CSHRC} > ${install_root}/env_build.csh
+sed -e 's%export ENV_FOR_LAUNCH=1%export ENV_FOR_LAUNCH=0%' ${install_work}/_${SHRC} > ${install_root}/env_build.sh
-cp -f ${install_work}/_$CSHRC ${install_root}/env_products.csh
-cp -f ${install_work}/_$SHRC ${install_root}/env_products.sh
+cp -f ${install_work}/_${CSHRC} ${install_root}/env_products.csh
+cp -f ${install_work}/_${SHRC} ${install_root}/env_products.sh
-rm -f ${install_work}/_$SHRC ${install_work}/_$CSHRC
+rm -f ${install_work}/_${SHRC} ${install_work}/_${CSHRC}
### !!! copying build.csh and build.sh scripts
-if [ -e ./build.csh ]; then
+if [ -e ./build.csh ] && [ ! -e ${install_root}/build.csh ]; then
cp -f ./build.csh ${install_root}
fi
-if [ -e ./build.sh ]; then
+if [ -e ./build.sh ] && [ ! -e ${install_root}/build.sh ]; then
cp -f ./build.sh ${install_root}
fi
### !!! copying release notes
for p in `ls ../` ; do
export pdf=`echo ${p} | sed s/[.]/" "/g | awk '{print $2}'`
if [ "${pdf}" = "pdf" ]; then
- export RN=$p
+ export RN=${p}
if [ ! -e ${install_root}/${RN} ]; then
cp -f ../${RN} ${install_root}
fi
if [ -f ${env_file} ] ; then
cp -f ${env_file} ${install_work}/_env_${product_type}.sh
make_env ${install_root} ${install_work} "${product_sequence}" "${installed_products}"
- source ${install_work}/$SHRC
+ source ${install_work}/${SHRC}
check_version
if [ $? -eq 0 ] ; then
return 0
#check existance of lib passed as first parameter
#return 0 if lib exists
#if you pass second parameter search will be done in it
-#otherwise search will be done in $LD_LIBRARY_PATH
+#otherwise search will be done in ${LD_LIBRARY_PATH}
#you should use : as dilimeter if you are going to pass second parameter
check_lib_version(){
if [ -n "$2" ]; then
whereIs=$2
else
- whereIs=$LD_LIBRARY_PATH
+ whereIs=${LD_LIBRARY_PATH}
fi
-for L in `echo ${whereIs} | sed -e"s%:% %g"` ; do
- ret=`find $L -name $1 2>/dev/null`
- if [ -n "$ret" ] ; then
- #echo "The $1 exists on yours system in a $L folder"
+for d in `echo ${whereIs} | sed -e"s%:% %g"` ; do
+ ret=`find ${d} -name $1 2>/dev/null`
+ if [ -n "${ret}" ] ; then
+ #echo "The $1 exists on yours system in a ${d} folder"
return 0
fi
done
file=$1; shift;
path=$*
for i in `echo ${path} | sed -e"s%:% %g"` ; do
- ret=`find $i -name $file -maxdepth 1 2>/dev/null`
- if [ -n "$ret" ] ; then
- ret=`echo $ret | sed -e"s%/\$file$%%g"`
- echo $ret
+ ret=`find ${i} -name ${file} -maxdepth 1 2>/dev/null`
+ if [ -n "${ret}" ] ; then
+ ret=`echo ${ret} | sed -e"s%/\${file}$%%g"`
+ echo ${ret}
return 0
fi
done
sort_path(){
arg1=$1; val1=$2; arg2=$3; val2=$4
-tmp="^$val1$|^$val1:|:$val1$|:$val1:"
-#echo $val2 | grep -E "$tmp" >/dev/null 2>&1
+tmp="^${val1}$|^${val1}:|:${val1}$|:${val1}:"
+#echo ${val2} | grep -E "${tmp}" >/dev/null 2>&1
#if [ $? -eq 0 ] ; then
-# echo "$arg2"
+# echo "${arg2}"
# return
#fi
to_tail=1
exclude_list="usr lib bin sbin etc"
for i in ${exclude_list} ; do
- tmp="^/$i/|^/$i\$"
- echo ${val1} | grep -E "$tmp" >/dev/null 2>&1
- if [ $? == 0 ] ; then to_tail=0; break; fi
+ tmp="^/${i}/|^/${i}\$"
+ echo ${val1} | grep -E "${tmp}" >/dev/null 2>&1
+ if [ "$?" = "0" ] ; then to_tail=0; break; fi
done
-if [ $to_tail -eq 0 ] ; then
- echo $arg2:$arg1
+if [ ${to_tail} -eq 0 ] ; then
+ echo ${arg2}:${arg1}
else
- echo $arg1:$arg2
+ echo ${arg1}:${arg2}
fi
-return $to_tail
+return ${to_tail}
}
where_gcc(){
maj_ver=`echo $1 | awk -F. '{if(NF>0) print $1; else print 0}'`
min_ver=`echo $1 | awk -F. '{if(NF>1) print $2; else print 0}'`
rel_ver=`echo $1 | awk -F. '{if(NF>2) print $3; else print 0}'`
-let ver=$maj_ver*10000+$min_ver*100+$rel_ver
+let ver=${maj_ver}*10000+${min_ver}*100+${rel_ver}
newer=""
newerver=0
for i in `echo ${PATH}:/usr/bin:/usr/local/bin | sed -e"s%:% %g"` ; do
- ret=`find $i -name gcc -maxdepth 1 2>/dev/null`
- if [ -n "$ret" ] ; then
- maj_ver=`$ret -dumpversion | awk -F. '{if(NF>0) print $1; else print 0}'`
- min_ver=`$ret -dumpversion | awk -F. '{if(NF>1) print $2; else print 0}'`
- rel_ver=`$ret -dumpversion | awk -F. '{if(NF>2) print $3; else print 0}'`
- let ver1=$maj_ver*10000+$min_ver*100+$rel_ver
- if [ $ver1 -eq $ver ] ; then
- ret=`echo $ret | sed -e"s%/gcc$%%g"`
- echo $ret
+ ret=`find ${i} -name gcc -maxdepth 1 2>/dev/null`
+ if [ -n "${ret}" ] ; then
+ maj_ver=`${ret} -dumpversion | awk -F. '{if(NF>0) print $1; else print 0}'`
+ min_ver=`${ret} -dumpversion | awk -F. '{if(NF>1) print $2; else print 0}'`
+ rel_ver=`${ret} -dumpversion | awk -F. '{if(NF>2) print $3; else print 0}'`
+ let ver1=${maj_ver}*10000+${min_ver}*100+${rel_ver}
+ if [ ${ver1} -eq ${ver} ] ; then
+ ret=`echo ${ret} | sed -e"s%/gcc$%%g"`
+ echo ${ret}
return 0
fi
- if [ $ver1 -gt $ver ] && [ $ver1 -gt $newerver ] ; then
- let newerver=$ver1
- newer=`echo $ret | sed -e"s%/gcc$%%g"`
+ if [ ${ver1} -gt ${ver} ] && [ ${ver1} -gt ${newerver} ] ; then
+ let newerver=${ver1}
+ newer=`echo ${ret} | sed -e"s%/gcc$%%g"`
fi
fi
done
-if [ -n "$newer" ] ; then
- echo $newer
+if [ -n "${newer}" ] ; then
+ echo ${newer}
return 0
fi
return 1
tclcfg=`find ${TCLHOME}/lib -name "tclConfig.sh" 2> /dev/null`
file=""
maxver=0
-for f in $tclcfg; do
- ver=`cat $f | grep -e "TCL_VERSION=.*" | sed -e "s%TCL_VERSION=[\'|\"]\(.*\)[\'|\"]%\1%g" | awk -F. '{x=0;for(i=1;i<=3;i++){x=x*100;if(i<=NF)x+=$i;}print x;}'`
- if [ $maxver -lt $ver ]; then
- maxver=$ver
- file=$f
+for f in ${tclcfg} ; do
+ ver=`cat ${f} | grep -e "TCL_VERSION=.*" | sed -e "s%TCL_VERSION=[\'|\"]\(.*\)[\'|\"]%\1%g" | awk -F. '{x=0;for(i=1;i<=3;i++){x=x*100;if(i<=NF)x+=$i;}print x;}'`
+ if [ ${maxver} -lt ${ver} ]; then
+ maxver=${ver}
+ file=${f}
fi
done
-if test -n "$file"; then
- echo `dirname $file`
+if test -n "${file}"; then
+ echo `dirname ${file}`
return 0
else
echo ""
tclcfg=`find ${TCLHOME}/lib -name "tkConfig.sh" 2> /dev/null`
file=""
maxver=0
-for f in $tclcfg; do
- ver=`cat $f | grep -e "TK_VERSION=.*" | sed -e "s%TK_VERSION=[\'|\"]\(.*\)[\'|\"]%\1%g" | awk -F. '{x=0;for(i=1;i<=3;i++){x=x*100;if(i<=NF)x+=$i;}print x;}'`
- if [ $maxver -lt $ver ]; then
- maxver=$ver
- file=$f
+for f in ${tclcfg} ; do
+ ver=`cat ${f} | grep -e "TK_VERSION=.*" | sed -e "s%TK_VERSION=[\'|\"]\(.*\)[\'|\"]%\1%g" | awk -F. '{x=0;for(i=1;i<=3;i++){x=x*100;if(i<=NF)x+=$i;}print x;}'`
+ if [ ${maxver} -lt ${ver} ]; then
+ maxver=${ver}
+ file=${f}
fi
done
-if test -n "$file"; then
- echo `dirname $file`
+if test -n "${file}"; then
+ echo `dirname ${file}`
return 0
else
echo ""
where_gl_includes(){
for d in /usr/X11R6/include /usr/include ; do
if [ -d ${d}/GL ] && [ -f ${d}/GL/gl.h ] ; then
- echo "$d"
+ echo "${d}"
return 0
fi
done
for d in /usr/X11R6/lib64 /usr/lib64 /usr/X11R6/lib /usr/lib ; do
if [ "`ls ${d}/libGL.so* 2>/dev/null`" ] && [ -f ${d}/libGL.la ]; then
libdir=`grep "libdir=" ${d}/libGL.la | sed -e "s%libdir='\(.*\)'%\1%" -e "s%/*$%%g"`
- if [ "$libdir" == "$d" ] ; then
- echo "$d"
+ if [ "${libdir}" = "${d}" ] ; then
+ echo "${d}"
return 0
fi
fi
for d in /usr/X11R6/lib64 /usr/lib64 /usr/X11R6/lib /usr/lib ; do
if [ -f ${d}/libGL.la ] ; then
libdir=`grep "libdir=" ${d}/libGL.la | sed -e "s%libdir='\(.*\)'%\1%"`
- if [ "`ls $libdir/libGL.so* 2>/dev/null`" ] ; then
- echo "$d"
+ if [ "`ls ${libdir}/libGL.so* 2>/dev/null`" ] ; then
+ echo "${d}"
return 0
fi
fi
# then search libGL.so* file
for d in /usr/X11R6/lib64 /usr/lib64 /usr/X11R6/lib /usr/lib ; do
if [ "`ls ${d}/libGL.so* 2>/dev/null`" ] ; then
- echo "$d"
+ echo "${d}"
return 0
fi
done
fix_gl_libs(){
local gllibdir="`where_gl_libs`"
- if [ "$gllibdir" != "" ] ; then
+ if [ "${gllibdir}" != "" ] ; then
#VSR: 02/04/2013 - next block is commented as it seems to be wrong :( libGL.la should not be ever mentioned
# 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
+ if [ "${str_to_replace}" = "" ] ; then
str_to_replace="-L${gllibdir} -lGL"
fi
modif_la_files(){
ldir=$1
-if [ -z "$ldir" ] || [ ! -d "$ldir" ]; then return 1; fi
+if [ -z "${ldir}" ] || [ ! -d "${ldir}" ]; then return 1; fi
srcdir=`pwd`
SALOME_MODULES="`env | awk -F_ '/[a-zA-Z0-9]*_ROOT_DIR/ { print $1 }'`"
-cd $ldir
+cd ${ldir}
ldir=`pwd`
la_files=`find . -name "*.la"`
# netgen dir
-netgendir=`printenv NETGENHOME`
+netgendir=${NETGEN_ROOT_DIR}
# freetype dir
-freetypedir=`printenv FREETYPEDIR`
+freetypedir=${FREETYPE_ROOT_DIR}
# ftgl dir
-ftgldir=`printenv FTGLDIR`
+ftgldir=${FTGL_ROOT_DIR}
# gl2ps dir
-gl2psdir=`printenv GL2PSHOME`
+gl2psdir=${GL2PS_ROOT_DIR}
# freeimage dir
-freeimagedir=`printenv FREEIMAGEDIR`
+freeimagedir=${FREEIMAGE_ROOT_DIR}
# tbb dir
-tbbbasedir=`printenv TBBHOME`
+tbbbasedir=${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}
# cgns dir
-cgnslibdir=`printenv CGNSHOME`
+cgnslibdir=${CGNS_ROOT_DIR}
# occt dir
-casdir=`printenv CASROOT`/lib
-if [ ! -d ${casdir} ] ; then casdir=`printenv CASROOT`/Linux/lib ; fi
-if [ ! -d ${casdir} ] ; then casdir=`printenv CASROOT`/lin/lib ; fi
+casdir=${CAS_ROOT_DIR}/lib
+if [ ! -d ${casdir} ] ; then casdir=${CAS_ROOT_DIR}/Linux/lib ; fi
+if [ ! -d ${casdir} ] ; then casdir=${CAS_ROOT_DIR}/lin/lib ; fi
# omniorb dir
-omnidir=`printenv OMNIORBDIR`/lib
+omnidir=${OMNIORB_ROOT_DIR}/lib
# vtk dir
-vtkpath=`printenv VTKHOME`
+vtkpath=${VTK_DIR}
if [ `uname -m` = "x86_64" ] && [ -d ${vtkpath}/lib64 ] ; then
LIB_PREFIX=64
elif [ -d ${vtkpath}/lib ] ; then
vtkldir=${vtkpath}/lib${LIB_PREFIX}
vtkdir=${vtkldir}/vtk-5.0
# hdf dir
-hdfdir=`printenv HDF5HOME`/lib
+hdfdir=${HDF5_ROOT_DIR}/lib
# med dir
-meddir=`printenv MED3HOME`/lib
+meddir=${MEDFILE_ROOT_DIR}/lib
# qwt dir
qwtdir=`find_in_path libqwt.so ${LD_LIBRARY_PATH}`
# python dir
where_python=`which python` # e.g. /usr/bin/python
-if [ -n "$where_python" ] ; then
- where_python=`dirname $where_python` # --> /usr/bin
- where_python=`dirname $where_python` # --> /usr
+if [ -n "${where_python}" ] ; then
+ where_python=`dirname ${where_python}` # --> /usr/bin
+ where_python=`dirname ${where_python}` # --> /usr
python_version=`python -c "import sys; print sys.version[:3]"`
pythondir=${where_python}/lib/python${python_version}
fi
# pyqt dir
pyqtdir=`find_in_path Qt.so ${LD_LIBRARY_PATH}`
# tcl/tk dir
-tcldir=`printenv TCLHOME`/lib
+tcldir=${TCLHOME}/lib
# boost dir
-boostdir=`printenv BOOSTDIR`/lib
+boostdir=${BOOST_ROOT_DIR}/lib
# blsurf dir
-blsurfdir=`printenv BLSURFHOME`/lib
+blsurfdir=${BLSURFHOME}/lib
# libxml2 dir
-libxmldir=`printenv LIBXML_DIR`/lib
+libxmldir=${LIBXML2_ROOT_DIR}/lib
# metis dir
-metisdir=`printenv METISDIR`
+metisdir=${METIS_ROOT_DIR}
# scotch dir
-scotchbindir=`printenv SCOTCHDIR`/bin
-scotchlibdir=`printenv SCOTCHDIR`/lib
+scotchbindir=${SCOTCH_ROOT_DIR}/bin
+scotchlibdir=${SCOTCH_ROOT_DIR}/lib
# gl dir
if test `uname -m` = "x86_64" ; then
libGLpath=/usr/lib64/libGL.la
libGLpath=/usr/lib/libGL.la
fi
# graphviz dir
-graphvizdir=`printenv GRAPHVIZHOME`/lib
+graphvizdir=${GRAPHVIZ_ROOT_DIR}/lib
# qscintilla dir
-qscintilladir=`printenv QSCINTILLA_DIR`/lib
+qscintilladir=${QSCINTILLA_ROOT_DIR}/lib
# expat dir
-expatdir=${EXPAT_ROOT}/lib
+expatdir=${EXPAT_ROOT_DIR}/lib
# paraview dir
-paraviewdir=`printenv PVHOME`/lib
+paraviewdir=${PARAVIEW_ROOT_DIR}/lib
# qt dir
-qtdir=`printenv QTDIR`/lib
+qtdir=${QT4_ROOT_DIR}/lib
# distene meshgems dir
if test `uname -m` = "x86_64" ; then
- mgemsdir=`printenv MESHGEMSHOME`/lib/Linux_64
+ mgemsdir=${MESHGEMS_ROOT_DIR}/lib/Linux_64
else
- mgemsdir=`printenv MESHGEMSHOME`/lib/Linux
+ mgemsdir=${MESHGEMS_ROOT_DIR}/lib/Linux
fi
for l in X ${la_files}; do
-if [ "$l" != "X" ] ; then
- d=`dirname $l`
- l=`basename $l`
- cd $ldir; cd $d
+if [ "${l}" != "X" ] ; then
+ d=`dirname ${l}`
+ l=`basename ${l}`
+ cd ${ldir}; cd ${d}
# . process salome modules dependencies
- for mod in $SALOME_MODULES; do
- moddir=`printenv ${mod}_ROOT_DIR`
+ for mod in ${SALOME_MODULES} ; do
+ moddir=${mod}_ROOT_DIR
+ moddir=${!moddir}
if [ -n "${moddir}" ] ; then
sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*${mod}[1]\?/lib% \1${moddir}/lib%g" \
-e "s%[[:space:]]\(-L\)\?[^[:space:]]*${mod}WOGUI[1]\?/lib% \1${moddir}/lib%g" \
-e "s%^libdir='[^[:space:]]*${mod}[1]\?/\(lib.*\)'%libdir='${moddir}/\1'%g" \
- -e "s%^libdir='[^[:space:]]*${mod}WOGUI[1]\?/\(lib.*\)'%libdir='${moddir}/\1'%g" $l > $l"_"
- mv -f $l"_" $l
+ -e "s%^libdir='[^[:space:]]*${mod}WOGUI[1]\?/\(lib.*\)'%libdir='${moddir}/\1'%g" ${l} > ${l}"_"
+ mv -f ${l}"_" ${l}
fi
done
# . process netgen dependencies
if [ -n "${netgendir}" ] && [ -d "${netgendir}" ] ; then
- sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*netgen-[0-9.]\+/lib% \1${netgendir}/lib%g" $l
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*netgen-[0-9.]\+/lib% \1${netgendir}/lib%g" ${l}
fi
# . process freetype dependencies
if [ -n "${freetypedir}" ] && [ -d "${freetypedir}" ] ; then
- sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*freetype-[0-9.]\+/lib% \1${freetypedir}/lib%g" $l
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*freetype-[0-9.]\+/lib% \1${freetypedir}/lib%g" ${l}
fi
# . process ftgl dependencies
if [ -n "${ftgldir}" ] && [ -d "${ftgldir}" ] ; then
- sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*ftgl-[0-9.]\+/lib% \1${ftgldir}/lib%g" $l
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*ftgl-[0-9.]\+/lib% \1${ftgldir}/lib%g" ${l}
fi
# . process gl2ps dependencies
if [ -n "${gl2psdir}" ] && [ -d "${gl2psdir}" ] ; then
- sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*gl2ps-[0-9.]\+/lib% \1${gl2psdir}/lib%g" $l
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*gl2ps-[0-9.]\+/lib% \1${gl2psdir}/lib%g" ${l}
fi
# . process freeimage dependencies
if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then
- sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*freeimage-[0-9.]\+/lib% \1${freeimagedir}/lib%g" $l
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*freeimage-[0-9.]\+/lib% \1${freeimagedir}/lib%g" ${l}
fi
# . process tbb dependencies
if [ -n "${tbbdir}" ] && [ -d "${tbbdir}" ] ; then
- sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*tbb[^[:space:]]*/lib[^[:space:]]*% \1${tbbdir}%g" $l
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*tbb[^[:space:]]*/lib[^[:space:]]*% \1${tbbdir}%g" ${l}
fi
# . process cgns dependencies
if [ -n "${cgnslibdir}" ] && [ -d "${cgnslibdir}" ] ; then
- sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*cgnslib-[0-9.]\+/lib% \1${cgnslibdir}/lib%g" $l
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*cgnslib-[0-9.]\+/lib% \1${cgnslibdir}/lib%g" ${l}
fi
# . process CAS.CADE dependencies
- if [ -n "${CASROOT}" ] && [ -d "${casdir}" ] ; then
+ if [ -n "${CAS_ROOT_DIR}" ] && [ -d "${casdir}" ] ; then
sed -e "s%-L[^[:space:]]*OCCT[^[:space:]]*/install/lib%-L${casdir}%g" \
-e "s%[^[:space:]]*OCCT[^[:space:]]*/install/lib/%${casdir}/%g" \
- -e "s%[[:space:]]-L[^[:space:]]*\(OCCT\|CAS\)[^[:space:]]*/lib\?% -L${CASROOT}/lib%g" \
- -e "s%[[:space:]][^[:space:]]*\(OCCT\|CAS\)[^[:space:]]*/lib/lib\?% ${CASROOT}/lib/lib%g" $l > $l"_"
- mv -f $l"_" $l
+ -e "s%[[:space:]]-L[^[:space:]]*\(OCCT\|CAS\)[^[:space:]]*/lib\?% -L${CAS_ROOT_DIR}/lib%g" \
+ -e "s%[[:space:]][^[:space:]]*\(OCCT\|CAS\)[^[:space:]]*/lib/lib\?% ${CAS_ROOT_DIR}/lib/lib%g" ${l} > ${l}"_"
+ mv -f ${l}"_" ${l}
fi
# . process omniORB dependencies
- if [ -n "${OMNIORBDIR}" ] && [ -d "${omnidir}" ] ; then
- sed -i "s%-L[^[:space:]]*omni[^[:space:]]*%-L${omnidir}%g;s%-R[^[:space:]]*omni[^[:space:]]*%-R${omnidir}%g" $l
+ if [ -n "${OMNIORB_ROOT_DIR}" ] && [ -d "${omnidir}" ] ; then
+ sed -i "s%-L[^[:space:]]*omni[^[:space:]]*%-L${omnidir}%g;s%-R[^[:space:]]*omni[^[:space:]]*%-R${omnidir}%g" ${l}
fi
# . process VTK dependencies
- if [ -n "${VTKHOME}" ] && [ -d "${vtkdir}" ] && [ -d "${vtkldir}" ] ; then
- sed -i "s%-L[^[:space:]]*VTK[^[:space:]]*/\(lib\|lib64\)/vtk\-5\.0%-L${vtkdir}%g;s%-L[^[:space:]]*VTK[^[:space:]]*/\(lib\|lib64\)%-L${vtkldir}%g" $l
+ if [ -n "${VTK_DIR}" ] && [ -d "${vtkdir}" ] && [ -d "${vtkldir}" ] ; then
+ sed -i "s%-L[^[:space:]]*VTK[^[:space:]]*/\(lib\|lib64\)/vtk\-5\.0%-L${vtkdir}%g;s%-L[^[:space:]]*VTK[^[:space:]]*/\(lib\|lib64\)%-L${vtkldir}%g" ${l}
fi
# . process HDF dependencies
- if [ -n "${HDF5HOME}" ] && [ -d "${hdfdir}" ] ; then
- sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*hdf[^[:space:]/]*/lib% \1${hdfdir}%g" $l
+ if [ -n "${HDF5_ROOT_DIR}" ] && [ -d "${hdfdir}" ] ; then
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*hdf[^[:space:]/]*/lib% \1${hdfdir}%g" ${l}
fi
# . process MED dependencies
- if [ -n "${MED3HOME}" ] && [ -d "${meddir}" ] ; then
- sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*med[^[:space:]/]*/lib% \1${meddir}%g" $l
+ if [ -n "${MEDFILE_ROOT_DIR}" ] && [ -d "${meddir}" ] ; then
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*med[^[:space:]/]*/lib% \1${meddir}%g" ${l}
fi
# . process qwt dependencies
if [ -n "${qwtdir}" ] && [ -d "${qwtdir}" ] ; then
- sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*qwt[^[:space:]/]*/lib% \1${qwtdir}%g" $l
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*qwt[^[:space:]/]*/lib% \1${qwtdir}%g" ${l}
fi
# . process qt dependencies
- if [ -n "${QTDIR}" ] && [ -d "${qtdir}" ] ; then
- sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*qt[^[:space:]/]*/lib% \1${qtdir}%g" $l
+ if [ -n "${QT4_ROOT_DIR}" ] && [ -d "${qtdir}" ] ; then
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*qt[^[:space:]/]*/lib% \1${qtdir}%g" ${l}
fi
# . process python dependencies
if [ -n "${pythondir}" ] && [ -d "${pythondir}" ] ; then
- sed -i "s%-L[^[:space:]]*python[0-9]\.[0-9]\([^[:space:]]*\)%-L${pythondir}\1%g" $l
+ sed -i "s%-L[^[:space:]]*python[0-9]\.[0-9]\([^[:space:]]*\)%-L${pythondir}\1%g" ${l}
fi
# . process sip dependencies
if [ -n "${sipdir}" ] && [ -d "${sipdir}" ] ; then
- sed -i "s%-L[^[:space:]]*sip[^[:space:]]*%-L${sipdir}%g" $l
+ sed -i "s%-L[^[:space:]]*sip[^[:space:]]*%-L${sipdir}%g" ${l}
fi
# . process PyQt dependencies
if [ -n "${pyqtdir}" ] && [ -d "${pyqtdir}" ] ; then
- sed -i "s%-L[^[:space:]]*PyQt[^[:space:]]*%-L${pyqtdir}%g" $l
+ sed -i "s%-L[^[:space:]]*PyQt[^[:space:]]*%-L${pyqtdir}%g" ${l}
fi
# . process tcl/tk dependencies
if [ -n "${tcldir}" ] && [ -d "${tcldir}" ] ; then
- sed -i "s%-L[^[:space:]]*tcltk[^[:space:]]*/lib%-L${tcldir}%g" $l
+ sed -i "s%-L[^[:space:]]*tcltk[^[:space:]]*/lib%-L${tcldir}%g" ${l}
fi
# . process boost dependencies
if [ -n "${boostdir}" ] && [ -d "${boostdir}" ] ; then
- sed -i "s%-L[^[:space:]]*boost[^[:space:]]*/lib%-L${boostdir}%g" $l
+ sed -i "s%-L[^[:space:]]*boost[^[:space:]]*/lib%-L${boostdir}%g" ${l}
fi
# . process blsurf dependencies
if [ -n "${blsurfdir}" ] && [ -d "${blsurfdir}" ] ; then
- sed -i "s%-L[^[:space:]]*BLSurf[^[:space:]]*/lib%-L${blsurfdir}%g" $l
+ sed -i "s%-L[^[:space:]]*BLSurf[^[:space:]]*/lib%-L${blsurfdir}%g" ${l}
fi
# . process libxml dependencies
if [ -n "${libxmldir}" ] && [ -d "${libxmldir}" ] ; then
- sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*libxml2-[0-9]\.[0-9]\.[0-9]/lib% \1${libxmldir}%g;s%[[:space:]]\(-L\)\?[^[:space:]]*libxml2/lib% \1${libxmldir}%g" $l
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*libxml2-[0-9]\.[0-9]\.[0-9]/lib% \1${libxmldir}%g;s%[[:space:]]\(-L\)\?[^[:space:]]*libxml2/lib% \1${libxmldir}%g" ${l}
fi
# . process metis dependencies
if [ -n "${metisdir}" ] && [ -d "${metisdir}" ] ; then
- sed -i "s%-L[^[:space:]]*metis[^[:space:]]*%-L${metisdir}%g" $l
+ sed -i "s%-L[^[:space:]]*metis[^[:space:]]*%-L${metisdir}%g" ${l}
fi
# . process scotch dependencies
if [ -n "${scotchbindir}" ] && [ -d "${scotchbindir}" ] ; then
- sed -i "s%-L[^[:space:]]*scotch[^[:space:]]*/bin%-L${scotchbindir}%g" $l
+ sed -i "s%-L[^[:space:]]*scotch[^[:space:]]*/bin%-L${scotchbindir}%g" ${l}
fi
if [ -n "${scotchlibdir}" ] && [ -d "${scotchlibdir}" ] ; then
- sed -i "s%-L[^[:space:]]*scotch[^[:space:]]*/lib%-L${scotchlibdir}%g" $l
+ sed -i "s%-L[^[:space:]]*scotch[^[:space:]]*/lib%-L${scotchlibdir}%g" ${l}
fi
# . process libGL.la dependencies
- sed -i "s%$libGLpath%""%g" $l
+ sed -i "s%${libGLpath}%""%g" ${l}
# . process graphviz dependencies
if [ -n "${graphvizdir}" ] && [ -d "${graphvizdir}" ] ; then
- sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*graphviz-[0-9]\.[0-9]\+\.[0-9]/lib% \1${graphvizdir}%g;s%[[:space:]]\(-L\)\?[^[:space:]]*graphviz/lib% \1${graphvizdir}%g" $l
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*graphviz-[0-9]\.[0-9]\+\.[0-9]/lib% \1${graphvizdir}%g;s%[[:space:]]\(-L\)\?[^[:space:]]*graphviz/lib% \1${graphvizdir}%g" ${l}
fi
# . process QScintilla dependencies
if [ -n "${qscintilladir}" ] && [ -d "${qscintilladir}" ] ; then
- sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*QScintilla-[0-9]\.[0-9]\(\.[0-9]\)\?/lib% \1${qscintilladir}%g" $l
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*QScintilla-[0-9]\.[0-9]\(\.[0-9]\)\?/lib% \1${qscintilladir}%g" ${l}
fi
# . process expat-2.0.1 dependencies
if [ -n "${expatdir}" ] && [ -d "${expatdir}" ] ; then
- sed -i "s%-L[^[:space:]]*expat[^[:space:]]*/lib%-L${expatdir}%g;s%[^[:space:]]*expat[^[:space:]]*/lib/libexpat.la%-lexpat%g" $l
+ sed -i "s%-L[^[:space:]]*expat[^[:space:]]*/lib%-L${expatdir}%g;s%[^[:space:]]*expat[^[:space:]]*/lib/libexpat.la%-lexpat%g" ${l}
fi
# . process ParaView dependencies
if [ -n "${paraviewdir}" ] && [ -d "${paraviewdir}" ] ; then
- sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*ParaView-[0-9]\.[0-9]\+\.[0-9]/lib% \1${paraviewdir}%g" $l
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*ParaView-[0-9]\.[0-9]\+\.[0-9]/lib% \1${paraviewdir}%g" ${l}
fi
# . process DISTENE MeshGems dependencies
if [ -n "${mgemsdir}" ] && [ -d "${mgemsdir}" ] ; then
- sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*MeshGems-[0-9.]\+/Products/lib/Linux\(_64\)\?% \1${mgemsdir}%g" $l
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*MeshGems-[0-9.]\+/Products/lib/Linux\(_64\)\?% \1${mgemsdir}%g" ${l}
fi
fi
done
-cd $srcdir
+cd ${srcdir}
return 0
}
#
####################################################################################
-QT_REF_VERSION="4.8.4"
+VERSION_QT="4.8.4"
check_version(){
-if [ -z "$QTDIR" ]; then
+if [ -z "${QT4_ROOT_DIR}" ]; then
return 1
fi
-ver=`grep "QT_VERSION_STR" ${QTDIR}/include/Qt/qglobal.h | sed -e 's%^#define QT_VERSION_STR\([[:space:]]*\)%%g' -e 's%\"%%g'`
-if [ "$ver" == "${QT_REF_VERSION}" ] ; then
+ver=`grep "QT_VERSION_STR" ${QT4_ROOT_DIR}/include/Qt/qglobal.h | sed -e 's%^#define QT_VERSION_STR\([[:space:]]*\)%%g' -e 's%\"%%g'`
+if [ "${ver}" = "${VERSION_QT}" ] ; then
return 0
fi
return 1
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export QTDIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export QT_ROOT_DIR=\${QTDIR}
-export QT_PLUGIN_PATH=\${QTDIR}/plugins
-export PATH=\${QTDIR}/bin:\$PATH
-export LD_LIBRARY_PATH=\${QTDIR}/lib:\${LD_LIBRARY_PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export QT4_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export QT_PLUGIN_PATH=\${QT4_ROOT_DIR}/plugins
+export PATH=\${QT4_ROOT_DIR}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${QT4_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}
# check that we need a patch for problem with gstreamer (note that it does not always help!)
pkg-config --libs gstreamer-app-0.10 >& /dev/null
if [ "$?" != "0" ] ; then
- cd ${PRODUCT_SRC_DIR}/src/3rdparty/webkit/Source/WebCore
- sed -i "s%glib-2.0 gio-2.0 gstreamer-0.10%glib-2.0 gio-2.0 '\\\\'gstreamer-0.10 >= 0.10.28\\\\''%g" features.pri
+ sed -i "s%glib-2.0 gio-2.0 gstreamer-0.10%glib-2.0 gio-2.0 '\\\\'gstreamer-0.10 >= 0.10.28\\\\''%g" ${PRODUCT_SRC_DIR}/src/3rdparty/webkit/Source/WebCore/features.pri >& /dev/null
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
}
GCC=`which gcc`
cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
+used gcc=${GCC}
EOF
check_job ${PRODUCT_DIR}/MAKE.LOG make
# ( cd ${PRODUCT_DIR} && ln -sf lib lib64 )
#fi
-cd ${PRODUCT_DIR};
-
-# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
- test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
-fi
-
# patch binaries
local patch_webkit_deps=1
if [ "${patch_webkit_deps}" = "1" ] ; then
- cd ${PRODUCT_DIR}/lib
- sed -i "s% -L../../WebCore/release%%g;s% -L../../JavaScriptCore/release%%g;s% -lwebcore%%g;s% -ljscore%%g" libQtWebKit.la >& /dev/null
+ sed -i "s% -L../../WebCore/release%%g;s% -L../../JavaScriptCore/release%%g;s% -lwebcore%%g;s% -ljscore%%g" ${PRODUCT_DIR}/lib/libQtWebKit.la >& /dev/null
+fi
+
+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
+ test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
fi
# to generate environment scripts
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
+# change installation path
-# modify qt la files
-for l in `find $ldir -name "*.la"`; do
- sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" $l
- sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*${PRODUCT}% \1${PRODUCT_DIR}%g" $l
- sed -i "s%^dependency_libs='\(-L\)\?[^[:space:]]*${PRODUCT}%dependency_libs=\'\1${PRODUCT_DIR}%g" $l
+# - modify qt la files
+for l in X `find ${PRODUCT_DIR}/lib -name "*.la"` ; do
+ if [ "${l}" != "X" ] ; then
+ sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" ${l}
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*${PRODUCT}% \1${PRODUCT_DIR}%g" ${l}
+ sed -i "s%^dependency_libs='\(-L\)\?[^[:space:]]*${PRODUCT}%dependency_libs=\'\1${PRODUCT_DIR}%g" ${l}
+ fi
done
-# modify libGL.so flags
-has_gl_dep=`grep -E "^dependency_libs=.*-lGL.*" libQtOpenGL.la`
+# - modify libGL.so flags
+has_gl_dep=`grep -E "^dependency_libs=.*-lGL.*" ${PRODUCT_DIR}/lib/libQtOpenGL.la`
gllibdir="`where_gl_libs`"
-if [ "$has_gl_dep" != "" ] && [ "$gllibdir" != "" ] ; then
- sed -e "s%-lGL\b%%g" \
- -e "s%^dependency_libs='\(.*\)%dependency_libs='-L$gllibdir -lGL \1%g" \
- libQtOpenGL.la > libQtOpenGL.la.new
- mv -f libQtOpenGL.la.new libQtOpenGL.la
+if [ "${has_gl_dep}" != "" ] && [ "${gllibdir}" != "" ] ; then
+ sed -i "s%-lGL\b%%g;s%^dependency_libs='\(.*\)%dependency_libs='-L${gllibdir} -lGL \1%g" ${PRODUCT_DIR}/lib/libQtOpenGL.la
fi
-# modify qt package config
-cd ${PRODUCT_DIR}/lib/pkgconfig
-for l in X `find . -name "*.pc"`; do
+# - modify qt package config
+for l in X `find ${PRODUCT_DIR}/lib/pkgconfig -name "*.pc"` ; do
if [ "${l}" != "X" ] ; then
- sed -e "s%^prefix=\(.*\)%prefix=${PRODUCT_DIR}%g" \
- -e "s%[[:space:]]\(-L\)\?[^[:space:]]*qt-${QT_REF_VERSION}% \1${PRODUCT_DIR}%g" \
- -e "s%[[:space:]]\(-L\)\?[^[:space:]]*qt-x11-opensource-src-${QT_REF_VERSION}% \1${PRODUCT_DIR}%g" \
- -e "s%moc_location=.*%moc_location=${PRODUCT_DIR}/bin/moc%g" \
- -e "s%uic_location=.*%uic_location=${PRODUCT_DIR}/bin/uic%g" \
- -e "s%rcc_location=.*%uic_location=${PRODUCT_DIR}/bin/rcc%g" \
- -e "s%lupdate_location=.*%uic_location=${PRODUCT_DIR}/bin/lupdate%g" \
- -e "s%lrelease_location=.*%uic_location=${PRODUCT_DIR}/bin/lrelease%g" \
- ${l} > ${l}_
- chmod -f --reference=${l} ${l}_ ; mv -f ${l}_ ${l}
+ sed -i "s%^prefix=\(.*\)%prefix=${PRODUCT_DIR}%g;s%[[:space:]]\(-L\)\?[^[:space:]]*qt-${VERSION_QT}% \1${PRODUCT_DIR}%g;s%[[:space:]]\(-L\)\?[^[:space:]]*qt-x11-opensource-src-${VERSION_QT}% \1${PRODUCT_DIR}%g" ${l}
+ sed -i "s%moc_location=.*%moc_location=${PRODUCT_DIR}/bin/moc%g;s%uic_location=.*%uic_location=${PRODUCT_DIR}/bin/uic%g;s%rcc_location=.*%uic_location=${PRODUCT_DIR}/bin/rcc%g" ${l}
+ sed -i "s%lupdate_location=.*%uic_location=${PRODUCT_DIR}/bin/lupdate%g;s%lrelease_location=.*%uic_location=${PRODUCT_DIR}/bin/lrelease%g" ${l}
fi
done
-# modify qt prl files
-cd ${PRODUCT_DIR}/lib
-for l in X `find . -name "*.prl"`; do
+
+# - modify qt prl files
+for l in X `find ${PRODUCT_DIR}/lib -name "*.prl"` ; do
if [ "${l}" != "X" ] ; then
- sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*qt-${QT_REF_VERSION}% \1${PRODUCT_DIR}%g;s%[[:space:]]\(-L\)\?[^[:space:]]*qt-x11-opensource-src-${QT_REF_VERSION}% \1${PRODUCT_DIR}%g" ${l}
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*qt-${VERSION_QT}% \1${PRODUCT_DIR}%g;s%[[:space:]]\(-L\)\?[^[:space:]]*qt-x11-opensource-src-${VERSION_QT}% \1${PRODUCT_DIR}%g" ${l}
fi
done
-# modify qt mkspecs
-cd ${PRODUCT_DIR}/mkspecs
-sed -i "s%QMAKE_RPATHDIR += \".*\"%QMAKE_RPATHDIR += \"${PRODUCT_DIR}/lib\"%g" qconfig.pri
+# - modify qt mkspecs
+sed -i "s%QMAKE_RPATHDIR += \".*\"%QMAKE_RPATHDIR += \"${PRODUCT_DIR}/lib\"%g" ${PRODUCT_DIR}/mkspecs/qconfig.pri
# generate qt.conf file
cat > ${PRODUCT_DIR}/bin/qt.conf <<EOF
export INSTALL_PRODUCTS=$7;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="qt-${QT_REF_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="qt-${VERSION_QT}"
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}
#
# QWT version
#
-QWT_VERSION=5.2.1
-QWT_MAJOR_VERSION=`echo ${QWT_VERSION} | awk -F. '{print $1}'`
+VERSION_QWT=5.2.1
+QWT_MAJOR_VERSION=`echo ${VERSION_QWT} | awk -F. '{print $1}'`
check_version()
{
-if [ -n "${QWTHOME}" ] ; then
- qwtinc=${QWTHOME}/include/qwt_global.h
- if [ ! -f $qwtinc ] ; then
- qwtinc=${QWTHOME}/include/qwt/qwt_global.h
+if [ -n "${QWT_ROOT_DIR}" ] ; then
+ qwtinc=${QWT_ROOT_DIR}/include/qwt_global.h
+ if [ ! -f ${qwtinc} ] ; then
+ qwtinc=${QWT_ROOT_DIR}/include/qwt/qwt_global.h
fi
- if [ -f $qwtinc ] ; then
- ver=`grep -e "^#define[[:space:]]\+QWT_VERSION_STR" $qwtinc | sed -e 's/^#define[[:space:]]\+QWT_VERSION_STR[[:space:]]*"\(.*\)"/\1/'`
- if [ "$ver" == "${QWT_VERSION}" ]; then
+ if [ -f ${qwtinc} ] ; then
+ ver=`grep -e "^#define[[:space:]]\+QWT_VERSION_STR" ${qwtinc} | sed -e 's/^#define[[:space:]]\+QWT_VERSION_STR[[:space:]]*"\(.*\)"/\1/'`
+ if [ "${ver}" = "${VERSION_QWT}" ]; then
return 0
fi
fi
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export QWTHOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export QWT_ROOT_DIR=\${QWTHOME}
-export LD_LIBRARY_PATH=\${QWTHOME}/lib:\${LD_LIBRARY_PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export QWT_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export LD_LIBRARY_PATH=\${QWT_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}
-# to generate environment scripts
-try_preinstalled
-}
-
-install_source_and_build()
-{
-# install sources
-install_source
-
-# build sources
-cd ${PRODUCT_SRC_DIR}
-test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-
local patch_build_procedure=1
if [ "${patch_build_procedure}" = "1" ] ; then
# specify install path
- if [ "${QWT_MAJOR_VERSION}" == "5" ] ; then
+ if [ "${QWT_MAJOR_VERSION}" = "5" ] ; then
# for Qwt 5.x the variable is INSTALLBASE
sed -i "s%\(INSTALLBASE[[:space:]]*\)=\([[:space:]]*\).*%\1=\2${PRODUCT_DIR}%g" qwtconfig.pri
else
sed -i "s%\(QWT_INSTALL_PREFIX[[:space:]]*\)=\([[:space:]]*\).*%\1=\2${PRODUCT_DIR}%g" qwtconfig.pri
fi
- if [ "${QWT_MAJOR_VERSION}" == "5" ] ; then
+ if [ "${QWT_MAJOR_VERSION}" = "5" ] ; then
# include QwtSvg support (required only for qwt 5.x)
sed -i "s%#\(CONFIG[[:space:]]*+=[[:space:]]*QwtSVGItem\)%\1%g" qwtconfig.pri
# specify correct installation path for the designer plugin (required only for qwt 5.x)
fi
fi
-INSTALL_ROOT_PREV=$INSTALL_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_and_build()
+{
+# install sources
+install_source
+
+# build sources
+cd ${PRODUCT_SRC_DIR}
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+# workaround : clear INSTALL_ROOT env.var if it is set
unset INSTALL_ROOT
# configure with qmake
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_INSTALL.LOG make install
-if [ "${INSTALL_ROOT_PREV}" != "" ] ; then
- export INSTALL_ROOT=$INSTALL_ROOT_PREV
-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}
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
# patch features files (required for Qwt 6.x only)
-if [ "${QWT_MAJOR_VERSION}" == "6" ] ; then
+if [ "${QWT_MAJOR_VERSION}" = "6" ] ; then
test -f ${PRODUCT_DIR}/features/qwtconfig.pri && cd ${PRODUCT_DIR}/features && sed -i "s%\(QWT_INSTALL_PREFIX[[:space:]]*\)=\([[:space:]]*\).*%\1=\2${PRODUCT_DIR}%g" qwtconfig.pri
fi
export INSTALL_PRODUCTS=$7;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="qwt-${QWT_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="qwt-${VERSION_QWT}"
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}
ROOT_DIR=`(cd ${SCRIPT_DIR}/.. ; pwd)`;
# 1. check if there is appropriate PDF files viewer
for r in acroread kpdf kghostview xpdf ; do
- reader=`which $r 2>/dev/null`
- if [ "$?" == "0" ] ; then
+ reader=`which ${r} 2>/dev/null`
+ if [ "$?" = "0" ] ; then
break;
fi
done
# 2. check if Release Notes file is available
if [ "${ROOT_DIR}" != "" ] ; then
rn_files=`find ${ROOT_DIR} -maxdepth 1 -name "*Release_Notes.pdf"`
- if [ "$?" == "0" ] && [ "$rn_files" != "" ] && [ "$reader" != "" ] ; then
+ if [ "$?" = "0" ] && [ "${rn_files}" != "" ] && [ "${reader}" != "" ] ; then
return 0;
fi
fi
ROOT_DIR=`(cd ${SCRIPT_DIR}/.. ; pwd)`;
# 1. find appropriate PDF files viewer
for r in acroread kpdf kghostview xpdf ; do
- reader=`which $r 2> /dev/null`
- if [ "$?" == "0" ] ; then
+ reader=`which ${r} 2> /dev/null`
+ if [ "$?" = "0" ] ; then
break;
fi
done
# 2. find Release Notes file and open it in the viewer
if [ "${ROOT_DIR}" != "" ] ; then
rn_file=`find ${ROOT_DIR} -maxdepth 1 -name "*Release_Notes.pdf"`
- if [ "$?" == "0" ] && [ "$rn_file" != "" ] && [ "$reader" != "" ] ; then
- $reader ${rn_file} &
+ if [ "$?" = "0" ] && [ "${rn_file}" != "" ] && [ "${reader}" != "" ] ; then
+ ${reader} ${rn_file} &
return 0;
fi
fi
INSTALL_WORK=$3;
# Run the procedure
-$PROCEDURE
+${PROCEDURE}
install_work=$1; product_sequence=$2
source ./common.sh
-for i in $product_sequence ; do
+for i in ${product_sequence} ; do
file=${install_work}/env_${i}.sh
(test -f ${file} && rm -f ${file})
done
-(file=${install_work}/$SHRC && test -f ${file} && rm -f ${file})
-(file=${install_work}/$CSHRC && test -f ${file} && rm -f ${file})
+(file=${install_work}/${SHRC} && test -f ${file} && rm -f ${file})
+(file=${install_work}/${CSHRC} && test -f ${file} && rm -f ${file})
#
# scotch version
#
-SCOTCH_VERSION=5.1.11
+VERSION_SCOTCH=5.1.11
check_version(){
# No way to check version!
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export SCOTCHDIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export SCOTCH_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
}
# make install
check_job ${PRODUCT_DIR}/INSTALL.LOG make prefix=${PRODUCT_DIR} 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="scotch-${SCOTCH_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="scotch-${VERSION_SCOTCH}"
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}
#
# sip version
#
-SIP_VERSION=4.14.2
-SIP_XVERSION=`echo ${SIP_VERSION} | awk -F. '{printf("%d",$1*10000+$2*100+$3)}'`
+VERSION_SIP=4.14.2
+SIP_XVERSION=`echo ${VERSION_SIP} | awk -F. '{printf("%d",$1*10000+$2*100+$3)}'`
check_version()
{
-if [ -n "${SIPDIR}" ]; then
- ver=`${SIPDIR}/bin/sip -V | 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 ${SIP_XVERSION} ] ; then
+if [ -n "${SIP_ROOT_DIR}" ]; then
+ ver=`${SIP_ROOT_DIR}/bin/sip -V | 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 ${SIP_XVERSION} ] ; then
return 0
fi
fi
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export SIPDIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export SIP_ROOT_DIR=\${SIPDIR}
-export PATH=\${SIPDIR}/bin:\${PATH}
-export PYTHONPATH=\${SIPDIR}/lib/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
-export LD_LIBRARY_PATH=\${SIPDIR}/lib/python\${PYTHON_VERSION}/site-packages:\${LD_LIBRARY_PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export SIP_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${SIP_ROOT_DIR}/bin:\${PATH}
+export PYTHONPATH=\${SIP_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
+export LD_LIBRARY_PATH=\${SIP_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages:\${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
}
check_job ${PRODUCT_DIR}/CONFIGURE.LOG python ./configure.py ${SIP_CONFIGURE_OPTIONS}
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};
+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}
fi
# modify sipconfig.py file
-if [ -n "${PYTHONROOT}" ] && [ -n "${QTDIR}" ] ; then
- cd ${PRODUCT_DIR}/lib/python${PYTHON_VERSION}/site-packages
+if [ -n "${PYTHON_ROOT_DIR}" ] && [ -n "${QT4_ROOT_DIR}" ] ; then
+ cfg_file=${PRODUCT_DIR}/lib/python${PYTHON_VERSION}/site-packages/sipconfig.py
python_version=`python -V 2>&1 | awk '{print $2}' | awk -F. '{printf("0x%02d%02d%02d",$1,$2,$3)}'`
- qt_version=`grep -e "^#define[[:space:]]\+QT_VERSION[[:space:]]\+" ${QTDIR}/include/Qt/qglobal.h | sed -e 's%^#define[[:space:]\+QT_VERSION[[:space:]]\+\(.*\)$%\1%g'`
- sed -e "s%\('default_bin_dir':[[:space:]]*\).*%\1'${PYTHONROOT}/bin',%g" \
- -e "s%\('default_mod_dir':[[:space:]]*\).*%\1'${PYTHONROOT}/lib/python${PYTHON_VERSION}/site-packages',%g" \
- -e "s%\('default_sip_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/sip',%g" \
- -e "s%\('sip_bin':[[:space:]]*\).*%\1'${PRODUCT_DIR}/bin/sip',%g" \
- -e "s%\('sip_inc_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/include/python${PYTHON_VERSION}',%g" \
- -e "s%\('sip_mod_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/lib/python${PYTHON_VERSION}/site-packages',%g" \
- -e "s%\('qt_dir':[[:space:]]*\).*%\1'${QTDIR}',%g" \
- -e "s%\('qt_version':[[:space:]]*\).*%\1${qt_version},%g" \
- -e "s%\('qt_inc_dir':[[:space:]]*\).*%\1'${QTDIR}/include',%g" \
- -e "s%\('qt_lib_dir':[[:space:]]*\).*%\1'${QTDIR}/lib',%g" \
- -e "s%\('INCDIR_QT':[[:space:]]*\).*%\1'${QTDIR}/include',%g" \
- -e "s%\('LIBDIR_QT':[[:space:]]*\).*%\1'${QTDIR}/lib',%g" \
- -e "s%\('MOC':[[:space:]]*\).*%\1'${QTDIR}/bin/moc',%g" \
- -e "s%\('py_version':[[:space:]]*\).*%\1${python_version},%g" \
- -e "s%\('sip_config_args':[[:space:]]*\).*%\1'${SIP_CONFIGURE_OPTIONS}',%g" \
- -e "s%\('py_inc_dir':[[:space:]]*\).*%\1'${PYTHONROOT}/include/python${PYTHON_VERSION}',%g" \
- -e "s%\('py_lib_dir':[[:space:]]*\).*%\1'${PYTHONROOT}/lib/python${PYTHON_VERSION}/config',%g" \
- -e "s%\('py_conf_inc_dir':[[:space:]]*\).*%\1'${PYTHONROOT}/include/python${PYTHON_VERSION}',%g" sipconfig.py > sipconfig.py.1
- mv -f sipconfig.py.1 sipconfig.py
+ qt_version=`grep -e "^#define[[:space:]]\+QT_VERSION[[:space:]]\+" ${QT4_ROOT_DIR}/include/Qt/qglobal.h | sed -e 's%^#define[[:space:]\+QT_VERSION[[:space:]]\+\(.*\)$%\1%g'`
+ sed -i "s%\('default_bin_dir':[[:space:]]*\).*%\1'${PYTHON_ROOT_DIR}/bin',%g" ${cfg_file}
+ sed -i "s%\('default_mod_dir':[[:space:]]*\).*%\1'${PYTHON_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages',%g" ${cfg_file}
+ sed -i "s%\('default_sip_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/sip',%g;s%\('sip_bin':[[:space:]]*\).*%\1'${PRODUCT_DIR}/bin/sip',%g" ${cfg_file}
+ sed -i "s%\('sip_inc_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/include/python${PYTHON_VERSION}',%g" ${cfg_file}
+ sed -i "s%\('sip_mod_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/lib/python${PYTHON_VERSION}/site-packages',%g" ${cfg_file}
+ sed -i "s%\('qt_dir':[[:space:]]*\).*%\1'${QT4_ROOT_DIR}',%g;s%\('qt_version':[[:space:]]*\).*%\1${qt_version},%g" ${cfg_file}
+ sed -i "s%\('qt_inc_dir':[[:space:]]*\).*%\1'${QT4_ROOT_DIR}/include',%g;s%\('qt_lib_dir':[[:space:]]*\).*%\1'${QT4_ROOT_DIR}/lib',%g" ${cfg_file}
+ sed -i "s%\('INCDIR_QT':[[:space:]]*\).*%\1'${QT4_ROOT_DIR}/include',%g;s%\('LIBDIR_QT':[[:space:]]*\).*%\1'${QT4_ROOT_DIR}/lib',%g" ${cfg_file}
+ sed -i "s%\('MOC':[[:space:]]*\).*%\1'${QT4_ROOT_DIR}/bin/moc',%g;s%\('py_version':[[:space:]]*\).*%\1${python_version},%g" ${cfg_file}
+ sed -i "s%\('sip_config_args':[[:space:]]*\).*%\1'${SIP_CONFIGURE_OPTIONS}',%g" ${cfg_file}
+ sed -i "s%\('py_inc_dir':[[:space:]]*\).*%\1'${PYTHON_ROOT_DIR}/include/python${PYTHON_VERSION}',%g" ${cfg_file}
+ sed -i "s%\('py_lib_dir':[[:space:]]*\).*%\1'${PYTHON_ROOT_DIR}/lib/python${PYTHON_VERSION}/config',%g" ${cfg_file}
+ sed -i "s%\('py_conf_inc_dir':[[:space:]]*\).*%\1'${PYTHON_ROOT_DIR}/include/python${PYTHON_VERSION}',%g" ${cfg_file}
fi
# to generate environment scripts
export INSTALL_PRODUCTS=$7;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="sip-${SIP_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="sip-${VERSION_SIP}"
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 [ "${KERNEL_ROOT_DIR}" != "" ] && [ "${GUI_ROOT_DIR}" != "" ] &&
[ -f ${KERNEL_ROOT_DIR}/bin/salome/runSalome ] ; then
env SALOME_TEST_MODE=1 runSalome >& /dev/null
- if [ "$?" == "0" ] ; then
+ if [ "$?" = "0" ] ; then
return 0;
fi
fi
INSTALL_WORK=$3;
# Run the procedure
-$PROCEDURE
+${PROCEDURE}
#
# swig version
#
-SWIG_VERSION=2.0.8
+VERSION_SWIG=2.0.8
+SWIG_VERSION_SUFFIX=`echo ${VERSION_SWIG} | awk -F. '{printf("%d.%d", $1, $2)}'`
check_version(){
if [ -n "`which swig 2>/dev/null`" ]; then
ver=`swig -version 2>&1 | grep -i version | awk '{ print $3 }' | sed -e 's/^\([0-9.]*\)\(.*\)/\1/'`
- if [ "$ver" == "${SWIG_VERSION}" ] ; then
+ if [ "${ver}" = "${VERSION_SWIG}" ] ; then
return 0;
fi
fi
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export SWIG_ROOT=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export SWIG_ROOT_DIR=\${SWIG_ROOT}
-export SWIG_LIB=\${SWIG_ROOT}/share/swig/${SWIG_VERSION}
-export PATH=\${SWIG_ROOT}/bin:\${PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export SWIG_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export SWIG_LIB=\${SWIG_ROOT_DIR}/share/swig/${VERSION_SWIG}
+export PATH=\${SWIG_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 ${SRC_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
cd ${PRODUCT_SRC_DIR}
-SWIG_CONFIGURE_FLAGS="--with-boost=${BOOSTDIR} --with-python=${PYTHONHOME}/bin/python --without-octave --with-tcl=${TCLHOME}"
+SWIG_CONFIGURE_FLAGS="--with-boost=${BOOST_ROOT_DIR} --with-python=${PYTHON_ROOT_DIR}/bin/python --without-octave --with-tcl=${TCLHOME} --program-suffix=${SWIG_VERSION_SUFFIX}"
if test `uname -m` = "x86_64" ; then
SWIG_CONFIGURE_FLAGS="${SWIG_CONFIGURE_FLAGS} CFLAGS=-m64 CXXFLAGS=-m64"
fi
check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${SWIG_CONFIGURE_FLAGS}
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};
+for l in swig ccache-swig ; do
+ if [ -e ${PRODUCT_DIR}/bin/${l}${SWIG_VERSION_SUFFIX} ] ; then
+ ( cd ${PRODUCT_DIR}/bin && ln -fs ${l}${SWIG_VERSION_SUFFIX} ${l} )
+ fi
+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}
SRC_DIR=$8;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="swig-${SWIG_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="swig-${VERSION_SWIG}"
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}
#
####################################################################################
-TBB_VERSION=30_018oss
+VERSION_TBB=30_018oss
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
check_version(){
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export TBBHOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PATH=\${TBBHOME}/bin/$TBBMODE:\$PATH
-export LD_LIBRARY_PATH=\${TBBHOME}/lib/$TBBMODE:\${LD_LIBRARY_PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export TBB_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${TBB_ROOT_DIR}/bin/${TBBMODE}:\${PATH}
+export LD_LIBRARY_PATH=\${TBB_ROOT_DIR}/lib/${TBBMODE}:\${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_and_build()
{
install_binary
+
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ echo "0" > ${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}
check_jb tar xfz ${BIN_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
-
# to generate environment script
try_preinstalled
}
REMOVE_SRC_TMP=$9;
shift
BIN_DIR=$9;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="tbb${TBB_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="tbb-${VERSION_TBB}"
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}
#
# tcl, tk and tclX versions
#
-TCL_VERSION=8.6.0
-TK_VERSION=8.6.0
-TCLX_VERSION=8.4.1
+VERSION_TCL=8.6.0
+VERSION_TK=8.6.0
+VERSION_TCLX=8.4.1
#
-TCL_LIBVERSION=`echo $TCL_VERSION | awk -F. '{printf("%d.%d", $1, $2)}'`
-TK_LIBVERSION=`echo $TK_VERSION | awk -F. '{printf("%d.%d", $1, $2)}'`
-TCLX_LIBVERSION=`echo $TCLX_VERSION | awk -F. '{printf("%d.%d", $1, $2)}'`
+TCL_LIBVERSION=`echo ${VERSION_TCL} | awk -F. '{printf("%d.%d", $1, $2)}'`
+TK_LIBVERSION=`echo ${VERSION_TK} | awk -F. '{printf("%d.%d", $1, $2)}'`
+TCLX_LIBVERSION=`echo ${VERSION_TCLX} | awk -F. '{printf("%d.%d", $1, $2)}'`
check_version()
{
-if [ -z "$TCLHOME" ]; then
+if [ -z "${TCLHOME}" ]; then
echo "TCLHOME doesn't set"
return 1
fi
if [ ! -f ${tcl_cfg} ]; then tcl_cfg=${TCLHOME}/lib/tcl${TCL_LIBVERSION}/tclConfig.sh; fi
if [ ! -f ${tcl_cfg} ]; then tcl_cfg=${TCLHOME}/lib/tcl${TCL_LIBVERSION}/lib/tclConfig.sh; fi
if [ -f ${tcl_cfg} ]; then
- tcl_ver=`awk '/^TCL_VERSION=.*/ {gsub("TCL_VERSION=","",$1);print $1}' ${tcl_cfg} | cut -d "'" -f 2`
- if [ "$tcl_ver" != ${TCL_LIBVERSION} ] ; then
+ tcl_ver=`awk '/^VERSION_TCL=.*/ {gsub("VERSION_TCL=","",$1);print $1}' ${tcl_cfg} | cut -d "'" -f 2`
+ if [ "${tcl_ver}" != ${TCL_LIBVERSION} ] ; then
return 1
fi
else
if [ ! -f ${tk_cfg} ]; then tk_cfg=${TCLHOME}/lib/tk${TK_LIBVERSION}/tkConfig.sh; fi
if [ ! -f ${tk_cfg} ]; then tk_cfg=${TCLHOME}/lib/tk${TK_LIBVERSION}/lib/tkConfig.sh; fi
if [ -f ${tk_cfg} ]; then
- tk_ver=`awk '/^TK_VERSION=.*/ {gsub("TK_VERSION=","",$1);print $1}' ${tk_cfg} | cut -d "'" -f 2`
- if [ "$tk_ver" != ${TK_LIBVERSION} ] ; then
+ tk_ver=`awk '/^VERSION_TK=.*/ {gsub("VERSION_TK=","",$1);print $1}' ${tk_cfg} | cut -d "'" -f 2`
+ if [ "${tk_ver}" != ${TK_LIBVERSION} ] ; then
return 1
fi
else
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
export TCLHOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export TCLLIBPATH="\${TCLHOME}/lib \${TCLHOME}/lib/tcl${TCL_LIBVERSION} \${TCLHOME}/lib/tk${TK_LIBVERSION}"
export PATH=\${TCLHOME}/bin:\${PATH}
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}
mkdir -p ${PRODUCT_SRC_DIR}
-check_jb tar xfz ${SOURCE_DIR}/tcl-${TCL_VERSION}.tar.gz -C ${PRODUCT_SRC_DIR}
-check_jb tar xfz ${SOURCE_DIR}/tk-${TK_VERSION}.tar.gz -C ${PRODUCT_SRC_DIR}
-check_jb tar xfz ${SOURCE_DIR}/tclx-${TCLX_VERSION}.tar.gz -C ${PRODUCT_SRC_DIR}
+check_jb tar xfz ${SOURCE_DIR}/tcl-${VERSION_TCL}.tar.gz -C ${PRODUCT_SRC_DIR}
+check_jb tar xfz ${SOURCE_DIR}/tk-${VERSION_TK}.tar.gz -C ${PRODUCT_SRC_DIR}
+check_jb tar xfz ${SOURCE_DIR}/tclx-${VERSION_TCLX}.tar.gz -C ${PRODUCT_SRC_DIR}
+
+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}
-cd ${PRODUCT_SRC_DIR}/tcl-${TCL_VERSION}_SRC/unix
+cd ${PRODUCT_SRC_DIR}/tcl-${VERSION_TCL}_SRC/unix
cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
-------------------
Configuring tcl...
if test `uname -m` = "x86_64" ; then
TCL_CONFIGURE_FLAGS="${TCL_CONFIGURE_FLAGS} --enable-64bit"
fi
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure \
- --prefix=${PRODUCT_DIR} ${TCL_CONFIGURE_FLAGS}
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${TCL_CONFIGURE_FLAGS}
GCC=`which gcc`
cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
+used gcc=${GCC}
-------------------
Making tcl...
-------------------
EOF
check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
-(cd ${PRODUCT_DIR}/bin; ln -fs tclsh${TCL_LIBVERSION} tclsh)
-(cd ${PRODUCT_DIR}/lib; ln -fs libtcl${TCL_LIBVERSION}.so libtcl.so)
-(cd ${PRODUCT_DIR}/lib; ln -fs libtclstub${TCL_LIBVERSION}.a libtclstub.a)
+(cd ${PRODUCT_DIR}/bin && ln -fs tclsh${TCL_LIBVERSION} tclsh)
+(cd ${PRODUCT_DIR}/lib && ln -fs libtcl${TCL_LIBVERSION}.so libtcl.so)
+(cd ${PRODUCT_DIR}/lib && ln -fs libtclstub${TCL_LIBVERSION}.a libtclstub.a)
-cd ${PRODUCT_SRC_DIR}/tk-${TK_VERSION}_SRC/unix
+cd ${PRODUCT_SRC_DIR}/tk-${VERSION_TK}_SRC/unix
cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
-------------------
Configuring tk...
if test `uname -m` = "x86_64" ; then
TK_CONFIGURE_FLAGS="${TK_CONFIGURE_FLAGS} --enable-64bit"
fi
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${TK_CONFIGURE_FLAGS} --prefix=${PRODUCT_DIR}
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${TK_CONFIGURE_FLAGS}
cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-------------------
Making tk...
EOF
check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
-(cd ${PRODUCT_DIR}/bin; ln -fs wish${TK_LIBVERSION} wish)
-(cd ${PRODUCT_DIR}/lib; ln -fs libtk${TK_LIBVERSION}.so libtk.so)
-(cd ${PRODUCT_DIR}/lib; ln -fs libtkstub${TK_LIBVERSION}.a libtkstub.a)
-
-#cd ${PRODUCT_SRC_DIR}/tclx-${TCLX_VERSION}_SRC
-##INV - bug in a tclx configure
-#chmod +w configure && sed -i "s/relid'/relid/" configure
+(cd ${PRODUCT_DIR}/bin && ln -fs wish${TK_LIBVERSION} wish)
+(cd ${PRODUCT_DIR}/lib && ln -fs libtk${TK_LIBVERSION}.so libtk.so)
+(cd ${PRODUCT_DIR}/lib && ln -fs libtkstub${TK_LIBVERSION}.a libtkstub.a)
cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
-------------------
if test `uname -m` = "x86_64" ; then
TCLX_CONFIGURE_FLAGS="${TCLX_CONFIGURE_FLAGS} --enable-64bit"
fi
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure \
- --prefix=${PRODUCT_DIR} ${TCLX_CONFIGURE_FLAGS}
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${TCLX_CONFIGURE_FLAGS}
cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-------------------
Making tclx...
EOF
check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
-(cd ${PRODUCT_DIR}/lib; ln -fs tclx${TCLX_LIBVERSION}/libtclx${TCLX_LIBVERSION}.so libtclx.so)
+(cd ${PRODUCT_DIR}/lib && ln -fs tclx${TCLX_LIBVERSION}/libtclx${TCLX_LIBVERSION}.so .)
+(cd ${PRODUCT_DIR}/lib && ln -fs libtclx${TCLX_LIBVERSION}.so libtclx.so)
+###(cd ${PRODUCT_DIR} && test `uname -m` = "x86_64" && test ! -e lib64 && ln -sf lib lib64)
-#cd ${PRODUCT_DIR}
-#test `uname -m` = "x86_64" && test ! -e lib64 && ln -s lib lib64
+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}
-# overriding installation path
-cd ${PRODUCT_DIR}/lib
-old_prefix=`grep -e "^TCL_PREFIX='.*'" tclConfig.sh | sed -e "s%^TCL_PREFIX='\(.*\)'%\1%g"`
-sed -i "s%${old_prefix}%${PRODUCT_DIR}%g" tclConfig.sh
-sed -i "s%${old_prefix}%${PRODUCT_DIR}%g" tkConfig.sh
-
-cd ${PRODUCT_DIR}
-test `uname -m` = "x86_64" && test ! -e lib64 && ln -s lib lib64
+# add symbolic link for 64bit platforms (VSR: is it indeed needed?)
+(cd ${PRODUCT_DIR} && test `uname -m` = "x86_64" && test ! -e lib64 && ln -sf lib lib64)
-# modify pkgconfig
-if [ -d ${PRODUCT_DIR}/lib/pkgconfig ] ; then
- cd ${PRODUCT_DIR}/lib/pkgconfig
- for l in X `find . -name "*.pc"`; do
+# overriding installation path
+old_prefix=`grep -e "^TCL_PREFIX='.*'" ${PRODUCT_DIR}/lib/tclConfig.sh | sed -e "s%^TCL_PREFIX='\(.*\)'%\1%g"`
+for l in X `find ${PRODUCT_DIR}/lib -name "*Config.sh"` `find ${PRODUCT_DIR}/lib/pkgconfig -name "*.pc"` ; do
if [ "${l}" != "X" ] ; then
- sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g;s%exec_prefix=.*%exec_prefix=${PRODUCT_DIR}%g;s%libdir=.*%libdir=${PRODUCT_DIR}/lib%g" ${l}
+ sed -i "s%${old_prefix}%${PRODUCT_DIR}%g" ${l}
fi
- done
-fi
+done
# to generate environment scripts
try_preinstalled
export INSTALL_PRODUCTS=$7;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="tcltk-${TCL_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="tcltk-${VERSION_TCL}"
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}
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
export XDATAROOT=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PATH=\${XDATAROOT}/bin:\${PATH}
export PYTHONPATH=\${XDATAROOT}/lib/python\${PYTHON_VERSION}/site-packages/xdata:\${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 ${SRC_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
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};
# 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}
REMOVE_SRC_TMP=$8;
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="xdata-${XDATA_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC
-$PROCEDURE
+${PROCEDURE}