]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Adding config files for installation on Mandriva 2006
authormaintenance team <salome-mnt@opencascade.com>
Wed, 26 Apr 2006 13:10:01 +0000 (13:10 +0000)
committermaintenance team <salome-mnt@opencascade.com>
Wed, 26 Apr 2006 13:10:01 +0000 (13:10 +0000)
config_files/BOOST-1.32.0.sh [new file with mode: 0755]
config_files/Python-2.4.1.sh [new file with mode: 0755]
config_files/doxygen-1.4.4.sh [new file with mode: 0755]
config_files/gcc-4.0.1.sh [new file with mode: 0755]
config_files/omniORB-4.0.6.sh [new file with mode: 0755]

diff --git a/config_files/BOOST-1.32.0.sh b/config_files/BOOST-1.32.0.sh
new file mode 100755 (executable)
index 0000000..2e8610a
--- /dev/null
@@ -0,0 +1,144 @@
+#!/bin/sh
+
+check_version(){
+if [ -n "${BOOSTDIR}" ]; then
+    ver=`egrep 'BOOST_VERSION [0-9]+' ${BOOSTDIR}/boost/version.hpp | sed 's/.*BOOST_VERSION \([0-9]\+\)/\1/g'`
+    if [ "$ver" = "103200" ]; then
+       return 0
+    fi
+fi
+return 1;
+}
+
+print_env()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM 
+export BOOSTDIR=\${INSTALL_ROOT}/${PRODUCT}
+export LD_LIBRARY_PATH=\${BOOSTDIR}/lib:\${LD_LIBRARY_PATH}
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+}
+
+# looks for the native product and collects it's environment (used by make_env())
+try_native(){
+boostdir="`find_in_path version.hpp /usr/include/boost`"
+if [ -z "${boostdir}" ] ; then
+    boostdir="`find_in_path version.hpp /usr/share/include/boost`"
+fi
+if [ -n "${boostdir}" ] ; then
+    boostdir=`cd ${boostdir}/..; pwd`
+    ls ${boostdir}/lib/libboost_thread* &> /dev/null
+    if [ "$?" -ne "0" ] ; then 
+       return 1
+    fi
+    ver=`egrep 'BOOST_VERSION [0-9]+' ${boostdir}/boost/version.hpp | sed 's/.*BOOST_VERSION \([0-9]\+\)/\1/g'`
+    if [ $ver -ge 103200 ] ;  then 
+       cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM 
+export BOOSTDIR=${boostdir}
+export LD_LIBRARY_PATH=\${BOOSTDIR}/lib:\${LD_LIBRARY_PATH}
+##
+EOF
+       make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+       if [ $ver -eq 103200 ] ;  then 
+           return 0
+       else
+           return 2
+       fi
+    fi
+fi
+return 1
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+return $?
+}
+
+install_source()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+makedir ${PRODUCT_DIR}
+
+# unpack
+check_jb tar xzf ${SOURCE_DIR}/boost-1.32.0.tar.gz -C ${INSTALL_WORK}
+
+# build
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/BUILD.LOG <<EOF
+used gcc=$GCC
+EOF
+cd ${PRODUCT_WORK}/tools/build/jam_src
+check_job ${PRODUCT_DIR}/BUILD.LOG ./build.sh
+
+# apply patch to avoid conflicts with Qt signals
+# VSR 07/03/06 : this is no more needed
+#cd ${PRODUCT_WORK}/boost/signals/detail
+#sed -e "s%#  define BOOST_SIGNALS_NAMESPACE signals%#  define BOOST_SIGNALS_NAMESPACE bsignals%g" \
+#    signals_common.hpp > signals_common.hpp.orig
+#mv -f signals_common.hpp.orig signals_common.hpp
+
+# install
+cd ${PRODUCT_WORK}
+python_root=`find_in_path python $PATH`;
+python_root=`cd ${python_root}/..; pwd`
+python_version=`python -c "import sys; print sys.version[:3]"`
+
+echo "`pwd` -> ./tools/build/jam_src/bin.linuxx86/bjam >> ${PRODUCT_DIR}/INSTALL.LOG"
+./tools/build/jam_src/bin.linuxx86/bjam "-sBOOST_ALL_DYN_LINK=1"         \
+    "-sBUILD=release <runtime-link>dynamic <threading>multi"             \
+    --prefix=${PRODUCT_DIR} --builddir=${PRODUCT_WORK}                   \
+    "-sPYTHON_VERSION=$python_version" --with-python-root=${python_root} \
+    install >> ${PRODUCT_DIR}/INSTALL.LOG 2> $INSTALL_WORK/errlog
+
+if [ "$?" -ne "0" ] ; then
+    cat ${PRODUCT_DIR}/INSTALL.LOG
+    cat $INSTALL_WORK/errlog >&2
+    cat $INSTALL_WORK/errlog >> ${PRODUCT_DIR}/INSTALL.LOG
+fi
+
+# move includes
+cd ${PRODUCT_DIR}/include
+mv -f boost-1_32/boost boost
+rm -rf boost-1_32
+
+# create additional links for libraries
+cd ${PRODUCT_DIR}/lib
+for aLib in date_time filesystem prg_exec_monitor python regex signals test_exec_monitor thread unit_test_framework ; do
+    if [ -f libboost_${aLib}-gcc-mt-1_32.so ] ; then
+       ln -s libboost_${aLib}-gcc-mt-1_32.so libboost_${aLib}-mt.so
+    fi
+done
+
+du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
+cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK}
+
+print_env
+}
+
+install_binary()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/boost-1.32.0.tar.gz -C ${INSTALL_ROOT}
+
+print_env
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INSTALL_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="boost" ; fi
+export PRODUCT="boost-1.32.0"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+$PROCEDURE
diff --git a/config_files/Python-2.4.1.sh b/config_files/Python-2.4.1.sh
new file mode 100755 (executable)
index 0000000..cd183ec
--- /dev/null
@@ -0,0 +1,159 @@
+#!/bin/sh
+
+check_version()
+{
+if [ -z "$PYTHONHOME"  ]; then
+   return 1
+fi
+isPython=`which python 2>/dev/null`
+if [ -n "$isPython" ]; then
+  # version number is calculated as: <major>*10000+<minor>*100+<release>
+  # for Python 2.4.1 it is equal to 20401
+  ver=`python -V 2>&1`
+  ver=`echo $ver | awk '{print $2}' | 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 [ $ver -eq 20401 ] ;  then 
+    return 0
+  fi
+fi
+return 1 
+}
+
+print_env()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export PYTHONHOME=\${INSTALL_ROOT}/${PRODUCT}
+export PATH=\${PYTHONHOME}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${PYTHONHOME}/lib:\${LD_LIBRARY_PATH}
+export PYTHON_VERSION=\`python -c "import sys; print sys.version[:3]"\`
+export PYTHON_INCLUDE=\${PYTHONHOME}/include/python\${PYTHON_VERSION}
+export PYTHONPATH=\${PYTHONHOME}/lib/python\${PYTHON_VERSION}:\${PYTHONPATH}
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+}
+
+# looks for the native product and collects it's environment (used by make_env())
+try_native(){
+pythonhome="`find_in_path python ${PATH}`"
+if [ -z "${pythonhome}" ] ; then
+    pythonhome="`find_in_path python /usr/bin`"
+fi
+if [ -n "${pythonhome}" ] ; then
+    pythonhome=`cd ${pythonhome}/..; pwd`
+    # get version number: <major>, <minor> and <release>
+    # <major> and <minor> numbers are checked strickly, but <release> number can be larger than required one
+    # version number is calculated as: <major>*10000+<minor>*100+<release>
+    # for Python 2.4.1 it is equal to 20401
+    ver=`python -V 2>&1`
+    maj_ver=`echo $ver | awk '{print $2}' | awk -F. '{if(NF>0) print $1; else print 0}'`
+    min_ver=`echo $ver | awk '{print $2}' | awk -F. '{if(NF>1) print $2; else print 0}'`
+    rel_ver=`echo $ver | awk '{print $2}' | awk -F. '{if(NF>2) print $3; else print 0}'`
+    let ver=$maj_ver*10000+$min_ver*100+$rel_ver
+    if [ $ver -ge 20401 ] ;  then 
+       tmp="\${PYTHONHOME}/bin ${pythonhome}/bin \${PATH} ${PATH}";  
+       path=`sort_path ${tmp}`
+       tmp="\${PYTHONHOME}/lib/python\${PYTHON_VERSION} ${pythonhome}/lib/python${maj_ver}.${min_ver} \${PYTHONPATH} ${PYTHONPATH}";  
+       pythonpath=`sort_path ${tmp}`
+       tmp="\${PYTHONHOME}/lib ${pythonhome}/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
+export PYTHONHOME=${pythonhome}
+export PATH=${path}
+export LD_LIBRARY_PATH=${ld_library_path}
+export PYTHON_VERSION=\`python -c "import sys; print sys.version[:3]"\`
+export PYTHON_INCLUDE=\${PYTHONHOME}/include/python\${PYTHON_VERSION}
+export PYTHONPATH=${pythonpath}
+##
+EOF
+       make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+#######       THIS COULD BE USED FOR STRICT COMPARISON  ##############################
+#      if [ $maj_ver -eq 2 ] && [ $min_ver -eq 4 ] && [ $rel_ver -eq 1 ] ;  then 
+######################################################################################
+       if [ $maj_ver -eq 2 ] && [ $min_ver -eq 4 ] && [ $rel_ver -ge 1 ] ;  then 
+           return 0
+       else
+           return 2
+       fi
+    fi
+fi
+return 1
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+return $?
+}
+
+install_source()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+makedir ${PRODUCT_DIR}
+
+check_jb tar xfz ${SOURCE_DIR}/Python-2.4.1.tar.gz -C ${INSTALL_WORK}
+cd ${PRODUCT_WORK}
+
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG \
+    ./configure --prefix=${PRODUCT_DIR} --with-threads --with-cxx=`which g++` --enable-shared
+# vsr: force linking to libstdc++.so
+sed -e 's%\(^LIBS=.*\)%\1 -lstdc++%g' Makefile > _Makefile
+mv -f _Makefile Makefile
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
+used gcc=$GCC
+EOF
+
+check_job ${PRODUCT_DIR}/MAKE.LOG make 
+check_job ${PRODUCT_DIR}/MAKINSTALL.LOG make install
+(cd ${PRODUCT_DIR}/lib/python2.4/config; ln -fs ../../libpython2.4.so.1.0 libpython2.4.so)
+
+cd ${PRODUCT_DIR}/bin
+for sc in idle pydoc smtpd.py ; do
+    if [ -e $sc ] ; then
+       sed -e "s%#\!.*python%#\!/usr/bin/env python%" "$sc" > _"$sc"
+       mv -f _"$sc" "$sc"
+       chmod a+x "$sc"
+    fi
+done
+
+#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
+cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK}
+print_env
+}
+
+install_binary()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/Python-2.4.1.tar.gz -C ${INSTALL_ROOT}
+
+(cd ${PRODUCT_DIR}/lib/python2.4/config; ln -fs ../../libpython2.4.so.1.0 libpython2.4.so)
+
+cd ${PRODUCT_DIR}/bin
+for sc in idle pydoc smtpd.py ; do
+    if [ -e $sc ] ; then
+       sed -e "s%#\!.*python%#\!/usr/bin/env python%" "$sc" > _"$sc"
+       mv -f _"$sc" "$sc"
+       chmod a+x "$sc"
+    fi
+done
+
+print_env
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INSTALL_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="python" ; fi
+export PRODUCT="Python-2.4.1"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+${PROCEDURE}
diff --git a/config_files/doxygen-1.4.4.sh b/config_files/doxygen-1.4.4.sh
new file mode 100755 (executable)
index 0000000..9a891d7
--- /dev/null
@@ -0,0 +1,159 @@
+#!/bin/sh
+
+check_version()
+{
+check_lib_version doxygen $PATH
+if [ "$?" -ne "0" ]; then
+   return 1
+fi
+check_lib_version doxytag $PATH
+if [ "$?" -ne "0" ]; then
+   return 1
+fi
+check_lib_version doxywizard $PATH
+if [ "$?" -ne "0" ]; then
+   return 1
+fi
+ver=`doxygen --version`
+if [ "$ver" == "1.4.4" ]; then
+    return 0
+fi
+return 1
+}
+
+print_env()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export PATH=\${INSTALL_ROOT}/${PRODUCT}/bin:\${PATH}
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+}
+
+# looks for the native product and collects it's environment (used by make_env())
+try_native(){
+check_version
+if [ $? -eq 0 ] ; then
+    doxygen="`find_in_path doxygen ${PATH}`"
+    tmp="${doxygen} ${doxygen} \${PATH} ${PATH}";  
+    path=`sort_path ${tmp}`
+    cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export PATH=${path}
+##
+EOF
+    make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+    return 0
+fi
+return 1;
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+return $?
+}
+
+install_source()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/doxygen-1.4.4.tar.gz -C ${INSTALL_WORK}
+
+cd ${PRODUCT_WORK}
+makedir ${PRODUCT_DIR}
+# vsr: fix bug - configure fails on Red Hat 9 because of incorrect autodetect check for install tool
+# so it is necessary to put it directly
+f_install="--install "`which install`
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --with-doxywizard --prefix ${PRODUCT_DIR} $f_install
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
+used gcc=$GCC
+EOF
+check_job ${PRODUCT_DIR}/MAKE.LOG make
+check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
+
+which epstopdf >/dev/null 2>&1;  ISFOUND=$?
+if [ ${ISFOUND} -eq 0 ] ; then  which makeindex >/dev/null 2>&1; ISFOUND=$?; fi
+if [ ${ISFOUND} -eq 0 ] ; then  which latex >/dev/null 2>&1; ISFOUND=$?; fi
+if [ ${ISFOUND} -eq 0 ] ; then  which latex2html >/dev/null 2>&1; ISFOUND=$?; fi
+if [ ${ISFOUND} -eq 0 ] ; then  which pdflatex >/dev/null 2>&1; ISFOUND=$?; fi
+if [ ${ISFOUND} -eq 0 ] ; then  which pslatex >/dev/null 2>&1; ISFOUND=$?; fi
+if [ ${ISFOUND} -eq 0 ] ; then  which pstoimg >/dev/null 2>&1; ISFOUND=$?; fi
+if [ ${ISFOUND} -eq 0 ] ; then
+    check_job ${PRODUCT_DIR}/MAKEDOCS.LOG make docs
+    check_job ${PRODUCT_DIR}/MAKEINSTALLDOCS.LOG make install_docs
+else
+    cat >> ${PRODUCT_DIR}/MAKEDOCS.LOG <<EOF
+Can't find \"epstopdf\" and \"latex\" or another executables on the computer.
+doxygen documentation will not be built!
+SALOME DOCUMENTATION ALSO CAN NOT BE BUILT!
+EOF
+    check_job ${PRODUCT_DIR}/MAKEDOCS.LOG make docs
+#    rm -fr ${PRODUCT_WORK}
+#    echo -e "Can't find \"epstopdf\" and \"latex\" or another executables on the computer."
+#    echo -e "doxygen documentation will not be built!"
+#    echo -e "SALOME DOCUMENTATION ALSO CAN NOT BE BUILT!"
+#    echo -n "Would you like continue : (Y,N) [Y] : "
+#    read rep;
+#    rep=`echo $rep  | tr "[A-Z]" "[a-z]"`
+#    if test -z $rep || [ $rep != "y" ] ; then
+#      rm -fr ${PRODUCT_WORK}
+#      exit 1
+#    fi
+fi
+
+#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
+cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK}
+print_env
+}
+
+install_binary()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/doxygen-1.4.4.tar.gz -C ${INSTALL_ROOT}
+which epstopdf >/dev/null 2>&1;  ISFOUND=$?
+if [ ${ISFOUND} -eq 0 ] ; then  which makeindex >/dev/null 2>&1; ISFOUND=$?; fi
+if [ ${ISFOUND} -eq 0 ] ; then  which latex >/dev/null 2>&1; ISFOUND=$?; fi
+if [ ${ISFOUND} -eq 0 ] ; then  which latex2html >/dev/null 2>&1; ISFOUND=$?; fi
+if [ ${ISFOUND} -eq 0 ] ; then  which pdflatex >/dev/null 2>&1; ISFOUND=$?; fi
+if [ ${ISFOUND} -eq 0 ] ; then  which pslatex >/dev/null 2>&1; ISFOUND=$?; fi
+if [ ${ISFOUND} -eq 0 ] ; then  which pstoimg >/dev/null 2>&1; ISFOUND=$?; fi
+if [ ${ISFOUND} -ne 0 ] ; then
+    cat >> ${PRODUCT_DIR}/DOCS.LOG <<EOF
+Can't find \"epstopdf\" and \"latex\" or another executables on the computer.
+doxygen documentation will not be built!
+SALOME DOCUMENTATION ALSO CAN NOT BE BUILT!
+EOF
+    check_job ${PRODUCT_DIR}/DOCS.LOG make
+#    rm -fr ${PRODUCT_WORK}
+#    echo -e "Can't find \"epstopdf\" and \"latex\" or another executables on the computer."
+#    echo -e "doxygen documentation will not be built!"
+#    echo -e "SALOME DOCUMENTATION ALSO CAN NOT BE BUILT!"
+#    echo -n "Would you like continue : (Y,N) [Y] : "
+#    read rep;
+#    rep=`echo $rep  | tr "[A-Z]" "[a-z]"`
+#    if test -z $rep || [ $rep != "y" ] ; then
+#      rm -fr ${PRODUCT_WORK}
+#      exit 1
+#    fi
+fi
+
+print_env
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INSTALL_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="doxygen" ; fi
+export PRODUCT="doxygen-1.4.4"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+$PROCEDURE 
diff --git a/config_files/gcc-4.0.1.sh b/config_files/gcc-4.0.1.sh
new file mode 100755 (executable)
index 0000000..474690b
--- /dev/null
@@ -0,0 +1,95 @@
+#!/bin/sh
+
+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.4.1 - 30401, for gcc 4.0.1 - 40001
+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 40001 ]  ; then
+    return 0
+fi
+return 1
+}
+
+print_env(){
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export GCC_ROOT=\${INSTALL_ROOT}/${PRODUCT}
+export CXX=\${GCC_ROOT}/bin/g++
+export CC=\${GCC_ROOT}/bin/gcc
+export PATH=\${GCC_ROOT}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${GCC_ROOT}/lib:\${LD_LIBRARY_PATH}
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+}
+
+# looks for the native product and collects it's environment (used by make_env())
+try_native(){
+gcc_root="`where_gcc 4.0.1`"
+if [ -n "${gcc_root}" ] ; then
+    gcc_root=`cd ${gcc_root}/..; pwd`
+    # get version number: <major>, <minor> and <release>
+    # <major> and <minor> numbers are checked strickly, but <release> number can be larger than required one
+    # version number is calculated as: <major>*10000+<minor>*100+<release>
+    # e.g. for gcc 3.2 it is equal to 30200, for gcc 3.4.1 - 30401, for gcc 4.0.1 - 40001
+    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 40001 ]  ; 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
+export GCC_ROOT=${gcc_root}
+export CXX=\${GCC_ROOT}/bin/g++
+export CC=\${GCC_ROOT}/bin/gcc
+export PATH=${path}
+export LD_LIBRARY_PATH=${ld_library_path}
+##
+EOF
+       make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+#######       THIS COULD BE USED FOR STRICT COMPARISON  ##############################
+#      if [ $maj_ver -eq 4 ] && [ $min_ver -eq 0 ] && [ $rel_ver -eq 1 ] ;  then 
+######################################################################################
+       if [ $maj_ver -eq 4 ] && [ $min_ver -eq 0 ] && [ $rel_ver -ge 1 ] ;  then 
+           return 0
+       else
+           return 2
+       fi
+   fi
+fi
+return 1
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+return $?
+}
+
+install_source()
+{
+echo "The installation of gcc 4.0.1 from sources is not provided! Use native gcc."
+return 1
+}
+
+install_binary()
+{
+echo "The installation of gcc 4.0.1 from binaries is not provided! Use native gcc."
+return 1
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INSTALL_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="gcc" ; fi
+export PRODUCT="gcc-3.4.1"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+$PROCEDURE 
diff --git a/config_files/omniORB-4.0.6.sh b/config_files/omniORB-4.0.6.sh
new file mode 100755 (executable)
index 0000000..97df94d
--- /dev/null
@@ -0,0 +1,179 @@
+#!/bin/sh
+
+check_version()
+{
+if [ -z "${OMNIORBDIR}" ]; then
+   #echo "OMNIORBDIR doesn't set"
+   return 1
+fi
+python_version="`python -c 'import sys; print sys.version[:3]'`"
+check_lib_version libomniORB4.so.0.6 ${OMNIORBDIR}/lib
+if [ "$?" -ne "0" ]; then
+   return 1
+fi
+check_lib_version _omnipymodule.so.2.6 ${OMNIORBDIR}/lib/python${python_version}/site-packages
+if [ "$?" -ne "0" ]; then
+   return 1
+fi
+return 0
+}
+
+print_env()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export OMNIORBDIR=\${INSTALL_ROOT}/${PRODUCT}
+export OMNIORB_CONFIG=\${OMNIORBDIR}/.omniORB.cfg
+export PYTHONPATH=\${OMNIORBDIR}/lib:\${OMNIORBDIR}/lib/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
+export PATH=\$OMNIORBDIR/bin:\$PATH
+export LD_LIBRARY_PATH=\$OMNIORBDIR/lib:\$LD_LIBRARY_PATH 
+##
+EOF
+cat > ${PRODUCT_DIR}/.omniORB.cfg <<EOF
+InitRef = NameService=corbaname::`hostname`:2810
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+}
+
+# looks for the native product and collects it's environment (used by make_env())
+try_native(){
+omnidir="`find_in_path omniidl ${PATH}`"
+if [ -z "${omnidir}" ] ; then
+    omnidir="`find_in_path omniidl /usr/bin`"
+fi
+if [ -n "${omnidir}" ] ; then
+  omnidir=`cd ${omnidir}/..; pwd`
+  OMNIORBDIR=${omnidir}
+  check_version
+  if [ "$?" -eq 0 ] ; then
+    python_version="`python -c 'import sys; print sys.version[:3]'`"
+    tmp="${omnidir}/bin ${omnidir}/bin \${PATH} ${PATH}";  
+    path=`sort_path ${tmp}`
+    tmp="${omnidir}/lib ${omnidir}/lib \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}";  
+    ld_library_path=`sort_path ${tmp}`
+    tmp="${omnidir}/lib:${omnidir}/lib/python\${PYTHON_VERSION}/site-packages ${omnidir}/lib:${omnidir}/lib/python${python_version}/site-packages \${PYTHONPATH} ${PYTHONPATH}";  
+    pythonpath=`sort_path ${tmp}`
+    cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export OMNIORB_CONFIG=\${HOME}/.omniORB.cfg
+export PYTHONPATH=${pythonpath}
+export PATH=${path}
+export LD_LIBRARY_PATH=${ld_library_path}
+##
+EOF
+    make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+    return 0
+  fi
+fi
+return 1;
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+return $?
+}
+
+install_source()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+makedir ${PRODUCT_DIR}
+
+check_jb tar xfz ${SOURCE_DIR}/omniORB-4.0.5.tar.gz -C ${INSTALL_WORK}
+check_jb tar xfz ${SOURCE_DIR}/omniORBpy-2.5.tar.gz -C ${INSTALL_WORK}
+check_jb tar xfz ${SOURCE_DIR}/omniNotify-2.1.tar.gz -C ${INSTALL_WORK}
+
+# install omniORB
+cd ${INSTALL_WORK}/omniORB-4.0.5
+mkdir build
+cd build
+
+check_job ${PRODUCT_DIR}/CONFIGURE_OMNIORB.LOG \
+    ../configure --prefix=${PRODUCT_DIR}
+
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/MAKE_OMNIORB.LOG <<EOF
+used gcc=$GCC
+EOF
+check_job ${PRODUCT_DIR}/MAKE_OMNIORB.LOG make
+check_job ${PRODUCT_DIR}/INSTALL_OMNIORB.LOG make install
+
+# install omniORBpy
+cd ${INSTALL_WORK}/omniORBpy-2.5
+mkdir build
+cd build
+
+check_job ${PRODUCT_DIR}/CONFIGURE_OMNIORBPY.LOG \
+    ../configure --prefix=${PRODUCT_DIR}
+
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/MAKE_OMNIORBPY.LOG <<EOF
+used gcc=$GCC
+EOF
+check_job ${PRODUCT_DIR}/MAKE_OMNIORBPY.LOG make
+check_job ${PRODUCT_DIR}/INSTALL_OMNIORBPY.LOG make install
+
+# install omniNotify
+cd ${INSTALL_WORK}/omniNotify
+mkdir build
+cd build
+
+check_job ${PRODUCT_DIR}/CONFIGURE_OMNINOTIFY.LOG \
+    ../configure --prefix=${PRODUCT_DIR}
+
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/MAKE_OMNINOTIFY.LOG <<EOF
+used gcc=$GCC
+EOF
+check_job ${PRODUCT_DIR}/MAKE_OMNINOTIFY.LOG make
+check_job ${PRODUCT_DIR}/INSTALL_OMNINOTIFY.LOG make install
+
+cd ${PRODUCT_DIR}/bin
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidl > _omniidl
+mv -f _omniidl omniidl
+chmod a+x omniidl
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidlrun.py > _omniidlrun.py
+mv -f _omniidlrun.py omniidlrun.py
+chmod a+x omniidlrun.py
+
+#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
+cd ${PRODUCT_DIR}
+rm -fr ${INSTALL_WORK}/omniORB-4.0.5
+rm -fr ${INSTALL_WORK}/omniORBpy-2.5
+rm -fr ${INSTALL_WORK}/omniNotify
+print_env
+}
+
+install_binary()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/omniORB-4.0.5.tar.gz -C ${INSTALL_ROOT}
+
+ln -sf ${PRODUCT_DIR} ${INSTALL_ROOT}/omni
+
+cd ${PRODUCT_DIR}/bin
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidl > _omniidl
+mv -f _omniidl omniidl
+chmod a+x omniidl
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidlrun.py > _omniidlrun.py
+mv -f _omniidlrun.py omniidlrun.py
+chmod a+x omniidlrun.py
+
+print_env
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INSTALL_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="omni" ; fi
+export PRODUCT="omniORB-4.0.5"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+$PROCEDURE