From 7bacfa2f11b13a9c0e38c3b0e17bf6bb311bc9ae Mon Sep 17 00:00:00 2001 From: akl Date: Fri, 27 Jul 2007 13:51:37 +0000 Subject: [PATCH] Modifications in according to improvement 15165. --- config_files/BOOST-1.31.0.sh | 93 ++++++++++++++------------- config_files/BOOST-1.32.0.sh | 91 ++++++++++++++------------- config_files/CAS-6.2.sh | 93 +++++++++++++++------------ config_files/HXX2SALOME.sh | 76 +++++++++++++--------- config_files/HXX2SALOMEDOC.sh | 58 +++++++++++++---- config_files/Numeric-22.0.sh | 78 +++++++++++++---------- config_files/Numeric-23.7.sh | 85 ++++++++++++++----------- config_files/PyQt-3.13.sh | 102 +++++++++++++----------------- config_files/PyQt-3.14.1.sh | 110 +++++++++++++------------------- config_files/Python-2.3.4.sh | 104 ++++++++++++++---------------- config_files/Python-2.3.5.sh | 103 +++++++++++++----------------- config_files/Python-2.4.1.sh | 108 ++++++++++++++----------------- config_files/SAMPLES.sh | 47 ++++++-------- config_files/SWIG-1.3.24.sh | 81 +++++++++++++----------- config_files/VTK-4.2.2.sh | 93 ++++++++++++++------------- config_files/VTK-4.2.6.sh | 105 +++++++++++++++++-------------- config_files/common.sh | 56 +++++++++++------ config_files/docutils-0.3.7.sh | 59 ++++++++++++----- config_files/doxygen-1.4.6.sh | 79 +++++++++++++---------- config_files/gcc-common.sh | 38 +++-------- config_files/graphviz-1.9.sh | 76 +++++++++++++--------- config_files/graphviz-2.2.1.sh | 82 +++++++++++++----------- config_files/hdf5-1.6.3.sh | 80 ++++++++++++----------- config_files/hdf5-1.6.4.sh | 83 +++++++++++++----------- config_files/med-2.2.3.sh | 84 ++++++++++++++----------- config_files/msg2qm.sh | 75 +++++++++++++--------- config_files/netgen-4.5.sh | 95 +++++++++++++++++----------- config_files/omniORB-4.0.5.sh | 95 +++++++++++++++------------- config_files/omniORB-4.0.6.sh | 97 ++++++++++++++-------------- config_files/omniORB-4.0.7.sh | 111 ++++++++++++++++---------------- config_files/qt-3.3.3.sh | 104 +++++++++++++++--------------- config_files/qt-3.3.4.sh | 112 +++++++++++++++------------------ config_files/qwt-0.4.1.sh | 73 ++++++++++++--------- config_files/qwt-4.2.0.sh | 81 +++++++++++++----------- config_files/sip-4.1.sh | 91 +++++++++++++-------------- config_files/sip-4.2.1.sh | 100 ++++++++++++++--------------- config_files/tcltk-8.3.3.sh | 92 ++++++++++++++------------- config_files/tcltk-8.4.5.sh | 103 ++++++++++++++++-------------- config_files/tcltk-8.4.7.sh | 99 +++++++++++++++-------------- 39 files changed, 1808 insertions(+), 1584 deletions(-) diff --git a/config_files/BOOST-1.31.0.sh b/config_files/BOOST-1.31.0.sh index 4453781..3c05694 100755 --- a/config_files/BOOST-1.31.0.sh +++ b/config_files/BOOST-1.31.0.sh @@ -22,78 +22,73 @@ fi return 1; } -print_env() +print_env_bin() { -cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < /dev/null - if [ "$?" -ne "0" ] ; then - return 1 - fi - ver=`egrep 'BOOST_VERSION [0-9]+' ${boostdir}/include/boost/version.hpp | sed 's/.*BOOST_VERSION \([0-9]\+\)/\1/g'` - if [ $ver -ge 103100 ] ; then - cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <> ${PRODUCT_DIR}/BUILD.LOG < signals_common.hpp.orig #mv -f signals_common.hpp.orig signals_common.hpp # install -cd ${PRODUCT_WORK} +cd ${PRODUCT_DIR}_SRC python_root=`find_in_path python $PATH`; python_root=`cd ${python_root}/..; pwd` python_version=`python -c "import sys; print sys.version[:3]"` @@ -101,7 +96,7 @@ 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 dynamic multi" \ - --prefix=${PRODUCT_DIR} --builddir=${PRODUCT_WORK} \ + --prefix=${PRODUCT_DIR} --builddir=${PRODUCT_DIR}_SRC \ "-sPYTHON_VERSION=$python_version" --with-python-root=${python_root} \ install >> ${PRODUCT_DIR}/INSTALL.LOG 2> $INSTALL_WORK/errlog @@ -124,20 +119,27 @@ for aLib in date_time filesystem prg_exec_monitor python regex signals test_exec fi done -#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi -print_env +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/boost-1.31.0.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} -print_env +# to generate environment scripts +try_preinstalled } export PROCEDURE=$1; @@ -145,7 +147,10 @@ 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_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="boost-1.31.0" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/BOOST-1.32.0.sh b/config_files/BOOST-1.32.0.sh index fa03e14..b658da9 100755 --- a/config_files/BOOST-1.32.0.sh +++ b/config_files/BOOST-1.32.0.sh @@ -22,7 +22,7 @@ fi return 1; } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < /dev/null - if [ "$?" -ne "0" ] ; then - return 1 - fi - ver=`egrep 'BOOST_VERSION [0-9]+' ${boostdir}/include/boost/version.hpp | sed 's/.*BOOST_VERSION \([0-9]\+\)/\1/g'` - if [ $ver -ge 103200 ] ; then - cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <> ${PRODUCT_DIR}/BUILD.LOG < signals_common.hpp.orig #mv -f signals_common.hpp.orig signals_common.hpp # install -cd ${PRODUCT_WORK} +cd ${PRODUCT_DIR}_SRC python_root=`find_in_path python $PATH`; python_root=`cd ${python_root}/..; pwd` python_version=`python -c "import sys; print sys.version[:3]"` @@ -105,7 +100,7 @@ fi echo "`pwd` -> ./tools/build/jam_src/${binfolder}/bjam >> ${PRODUCT_DIR}/INSTALL.LOG" ./tools/build/jam_src/${binfolder}/bjam "-sBOOST_ALL_DYN_LINK=1" \ "-sBUILD=release dynamic multi" \ - --prefix=${PRODUCT_DIR} --builddir=${PRODUCT_WORK} \ + --prefix=${PRODUCT_DIR} --builddir=${PRODUCT_DIR}_SRC \ "-sPYTHON_VERSION=$python_version" --with-python-root=${python_root} \ install >> ${PRODUCT_DIR}/INSTALL.LOG 2> $INSTALL_WORK/errlog @@ -130,20 +125,27 @@ done if test `uname -m` = "x86_64" ; then cd ${PRODUCT_DIR}; ln -sf lib lib64 fi -#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi -print_env +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/boost-1.32.0.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} -print_env +# to generate environment scripts +try_preinstalled } export PROCEDURE=$1; @@ -151,7 +153,10 @@ 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_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="boost-1.32.0" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/CAS-6.2.sh b/config_files/CAS-6.2.sh index 2f70bee..9108292 100755 --- a/config_files/CAS-6.2.sh +++ b/config_files/CAS-6.2.sh @@ -31,7 +31,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/CAS-6.2.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} # modify *.la files ldir=${PRODUCT_DIR}/lib @@ -215,7 +226,8 @@ if [ "$gllibdir" != "" ] ; then mv -f libTKOpenGl.la.new libTKOpenGl.la fi -print_env +# to generate environment script for sources +try_preinstalled } export PROCEDURE=$1; @@ -223,7 +235,10 @@ 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="cas" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="CAS-6.2" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/HXX2SALOME.sh b/config_files/HXX2SALOME.sh index 450d3b0..e840cd3 100755 --- a/config_files/HXX2SALOME.sh +++ b/config_files/HXX2SALOME.sh @@ -12,12 +12,14 @@ # #################################################################################### +VERSION="3.2.6" + check_version(){ # No way to check version! return 0 } -print_env(){ +print_env_bin(){ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <> ${PRODUCT_DIR}/CONFIGURE.LOG < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} +#du -sk ${PRODUCT_SRC_DIR} > ${PRODUCT_DIR}/size.log +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 -print_env +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/HXX2SALOMEbinariesV3.2.6.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/HXX2SALOMEbinariesV${VERSION}.tar.gz -C ${INSTALL_ROOT} -print_env +# to generate environment scripts +try_preinstalled } export PROCEDURE=$1; @@ -100,9 +117,12 @@ 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="HXX2SALOME" ; fi -export PRODUCT="HXX2SALOME_3.2.6" +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; +export PRODUCT="HXX2SALOME_${VERSION}" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} -export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} +export PRODUCT_SRC_DIR=${INSTALL_ROOT}/"HXX2SALOME_SRC_${VERSION}" source ./common.sh $PROCEDURE diff --git a/config_files/HXX2SALOMEDOC.sh b/config_files/HXX2SALOMEDOC.sh index dccfdca..47ab052 100755 --- a/config_files/HXX2SALOMEDOC.sh +++ b/config_files/HXX2SALOMEDOC.sh @@ -12,41 +12,72 @@ # #################################################################################### +VERSION="3.2.6" + check_version(){ # No way to check version! return 0 } -print_env(){ +print_env_bin(){ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh </dev/null` -if [ -n "${numpath}" ] ; then - numpath=`dirname ${numpath}` - ver=`python -c 'import Numeric; print Numeric.__version__' 2>/dev/null | awk -F. '{v=0;for(i=1;i<=NF;i++)v=v*100+$i;print v}'` - if [ $ver -ge 2200 ] ; then - tmp="${numpath} ${numpath} \${PYTHONPATH} ${PYTHONPATH}"; - pythonpath=`sort_path ${tmp}` - cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -check_jb tar xfz ${SOURCE_DIR}/Numeric-22.0.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} -print_env +# to generate environment scripts +try_preinstalled } export PROCEDURE=$1; @@ -89,7 +96,10 @@ 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="numeric" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="Numeric-22.0" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/Numeric-23.7.sh b/config_files/Numeric-23.7.sh index 96f5095..4435559 100755 --- a/config_files/Numeric-23.7.sh +++ b/config_files/Numeric-23.7.sh @@ -12,7 +12,8 @@ # #################################################################################### -check_version(){ +check_version() +{ ver=`python -c 'import Numeric; print Numeric.__version__' 2>/dev/null` if [ "$ver" == "23.7" ]; then return 0 @@ -20,55 +21,56 @@ fi return 1 } -print_env(){ +print_env_bin() +{ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh </dev/null` -if [ -n "${numpath}" ] ; then - numpath=`dirname ${numpath}` - ver=`python -c 'import Numeric; print Numeric.__version__' 2>/dev/null | awk -F. '{v=0;for(i=1;i<=NF;i++)v=v*100+$i;print v}'` - if [ $ver -ge 2307 ] ; then - tmp="${numpath} ${numpath} \${PYTHONPATH} ${PYTHONPATH}"; - pythonpath=`sort_path ${tmp}` - cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -check_jb tar xfz ${SOURCE_DIR}/Numeric-23.7.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} -print_env +# to generate environment scripts +try_preinstalled } export PROCEDURE=$1; @@ -144,7 +154,10 @@ 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="numeric" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="Numeric-23.7" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/PyQt-3.13.sh b/config_files/PyQt-3.13.sh index 62c2e1b..4d81ab6 100755 --- a/config_files/PyQt-3.13.sh +++ b/config_files/PyQt-3.13.sh @@ -29,7 +29,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh </dev/null` -if [ -n "$ver" ] ; then - maj_ver=`echo $ver | awk -F. '{if(NF>0) print $1; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'` - min_ver=`echo $ver | awk -F. '{if(NF>1) print $2; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'` - rel_ver=`echo $ver | awk -F. '{if(NF>2) print $3; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'` - let ver=$maj_ver*10000+$min_ver*100+$rel_ver - # version number should be at least 3.13 - if [ $ver -ge 031300 ] ; then - tmp="${pyqtdir} ${pyqtdir} \${PATH} ${PATH}"; - path=`sort_path ${tmp}` - tmp="${pyqt_lib} ${pyqt_lib} \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}"; - ld_library_path=`sort_path ${tmp}` - tmp="${pyqt_cfg} ${pyqt_cfg} \${PYTHONPATH} ${PYTHONPATH}"; - pythonpath=`sort_path ${tmp}` - cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < configure.py.new mv -f configure.py.new configure.py @@ -118,17 +95,24 @@ EOF check_job ${PRODUCT_DIR}/MAKE.LOG make check_job ${PRODUCT_DIR}/INSTALL.LOG make install -#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/PyQt-3.13.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} # modify pyqtconfig.py file cd ${PRODUCT_DIR} @@ -137,7 +121,8 @@ sed -e "s%\('pyqt_mod_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}',%g" pyqtconfi sed -e "s%\('pyqt_sip_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/sip',%g" pyqtconfig.py > pyqtconfig.py.1 mv pyqtconfig.py.1 pyqtconfig.py -print_env +# to generate environment script for sources +try_preinstalled } export PROCEDURE=$1; @@ -145,7 +130,10 @@ 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="pyqt" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="PyQt-3.13" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/PyQt-3.14.1.sh b/config_files/PyQt-3.14.1.sh index 951eec9..fb6f2dd 100755 --- a/config_files/PyQt-3.14.1.sh +++ b/config_files/PyQt-3.14.1.sh @@ -29,7 +29,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh </dev/null` -if [ -n "$ver" ] ; then - maj_ver=`echo $ver | awk -F. '{if(NF>0) print $1; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'` - min_ver=`echo $ver | awk -F. '{if(NF>1) print $2; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'` - rel_ver=`echo $ver | awk -F. '{if(NF>2) print $3; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'` - let ver=$maj_ver*10000+$min_ver*100+$rel_ver - # version number should be at least 3.13 - if [ $ver -ge 031300 ] ; then - tmp="${pyqtdir} ${pyqtdir} \${PATH} ${PATH}"; - path=`sort_path ${tmp}` - tmp="${pyqt_lib} ${pyqt_lib} \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}"; - ld_library_path=`sort_path ${tmp}` - tmp="${pyqt_cfg} ${pyqt_cfg} \${PYTHONPATH} ${PYTHONPATH}"; - pythonpath=`sort_path ${tmp}` - cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/PyQt-3.14.1.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} # modify pyqtconfig.py file cd ${PRODUCT_DIR} @@ -149,7 +125,8 @@ sed -e "s%\('pyqt_mod_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}',%g" pyqtconfi sed -e "s%\('pyqt_sip_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/sip',%g" pyqtconfig.py > pyqtconfig.py.1 mv pyqtconfig.py.1 pyqtconfig.py -print_env +# to generate environment script for sources +try_preinstalled } export PROCEDURE=$1; @@ -157,7 +134,10 @@ 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="pyqt" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="PyQt-3.14.1" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/Python-2.3.4.sh b/config_files/Python-2.3.4.sh index 086675c..ad5b11b 100755 --- a/config_files/Python-2.3.4.sh +++ b/config_files/Python-2.3.4.sh @@ -30,7 +30,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <, and - # and numbers are checked strickly, but number can be larger than required one - # version number is calculated as: *10000+*100+ - # e.g. for Python 2.3.4 it is equal to 20304 - 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 20304 ] ; 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 < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/Python-2.3.4.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} (cd ${PRODUCT_DIR}/lib/python2.3/config; ln -fs ../../libpython2.3.so.1.0 libpython2.3.so) @@ -154,7 +138,8 @@ for sc in idle pydoc smtpd.py ; do fi done -print_env +# to generate environment scripts +try_preinstalled } export PROCEDURE=$1; @@ -162,7 +147,10 @@ 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_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="Python-2.3.4" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/Python-2.3.5.sh b/config_files/Python-2.3.5.sh index d53d267..6d37cad 100755 --- a/config_files/Python-2.3.5.sh +++ b/config_files/Python-2.3.5.sh @@ -30,7 +30,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <, and - # and numbers are checked strickly, but number can be larger than required one - # version number is calculated as: *10000+*100+ - # e.g. for Python 2.3.5 it is equal to 20305 - 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 20305 ] ; 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 < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/Python-2.3.5.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} (cd ${PRODUCT_DIR}/lib/python2.3/config; ln -fs ../../libpython2.3.so.1.0 libpython2.3.so) @@ -155,7 +138,8 @@ for sc in idle pydoc smtpd.py ; do fi done -print_env +# to generate environment script for sources +try_preinstalled } export PROCEDURE=$1; @@ -163,7 +147,10 @@ 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_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="Python-2.3.5" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/Python-2.4.1.sh b/config_files/Python-2.4.1.sh index 0cbf69d..f4bbcdd 100755 --- a/config_files/Python-2.4.1.sh +++ b/config_files/Python-2.4.1.sh @@ -30,7 +30,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <, and - # and numbers are checked strickly, but number can be larger than required one - # version number is calculated as: *10000+*100+ - # 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 < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <& /dev/null ; \ @@ -133,7 +95,20 @@ if test `uname -m` = "x86_64" ; then fi fi -cd ${PRODUCT_WORK} +if [ $PROCEDURE == "install_source" ]; then +# to generate environment scripts + try_preinstalled +fi +} + +install_source_and_build() +{ +# install sources +install_source + +# build sources +makedir ${PRODUCT_DIR} +cd ${PRODUCT_DIR}_SRC check_job ${PRODUCT_DIR}/CONFIGURE.LOG \ ./configure --prefix=${PRODUCT_DIR} $PYTHON_CONFIGURE_OPTIONS @@ -162,17 +137,24 @@ if test `uname -m` = "x86_64" ; then ( cd ${PRODUCT_DIR}; ln -sf lib64 lib ) fi -#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/Python-2.4.1.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} (cd ${PRODUCT_DIR}/lib/python2.4/config; ln -fs ../../libpython2.4.so.1.0 libpython2.4.so) @@ -185,7 +167,8 @@ for sc in idle pydoc smtpd.py ; do fi done -print_env +# to generate environment scripts +try_preinstalled } export PROCEDURE=$1; @@ -193,7 +176,10 @@ 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_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="Python-2.4.1" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/SAMPLES.sh b/config_files/SAMPLES.sh index 5e5ffd7..9f4aa66 100755 --- a/config_files/SAMPLES.sh +++ b/config_files/SAMPLES.sh @@ -19,44 +19,34 @@ check_version(){ return 0 } -print_env(){ -cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <&1 | grep -i version | awk '{ print $3 }' | sed -e 's/^\([0-9.]*\)\(.*\)/\1/'` - if [ "$ver" == "1.3.24" ] ; then - tmp="\${SWIG_ROOT}/bin ${swig_root}/bin \${PATH} ${PATH}"; - path=`sort_path ${tmp}` - cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -echo "It impossible to install SWIG 1.3.24 from binaries, try to install it from sources." -return 1 +echo "It impossible to install ${PRODUCT} from binaries! So this one will be build from sources." +install_source_and_build } export PROCEDURE=$1; @@ -103,8 +110,12 @@ 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="swig" ; fi -export PRODUCT="SWIG-1.3.24" +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +SRC_DIR=$8; +shift +REMOVE_SRC_TMP=$8; +export PRODUCT="swig-1.3.24" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} source ./common.sh diff --git a/config_files/VTK-4.2.2.sh b/config_files/VTK-4.2.2.sh index 74b8035..b8399af 100755 --- a/config_files/VTK-4.2.2.sh +++ b/config_files/VTK-4.2.2.sh @@ -24,7 +24,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <> ${PRODUCT_DIR}/MAKEcmake.LOG < ${PRODUCT_DIR}/CONFIGURE.LOG < ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/size.log -#du -sk ${INSTALL_WORK}/cmake-1.6.6 >> ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} ${INSTALL_WORK}/cmake-1.6.6 +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; # set correct symbolic links - bug of python wrappings installation cd ${PRODUCT_DIR}/lib/python${python_version}/site-packages/vtk_python ln -sf ../../../vtk/*Python*.so . -print_env +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/VTK-4.2.2.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} -print_env +# to generate environment script for sources +try_preinstalled } export PROCEDURE=$1; @@ -176,7 +182,10 @@ 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="vtk" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="VTK-4.2.2" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/VTK-4.2.6.sh b/config_files/VTK-4.2.6.sh index 9c15a1f..f3cd246 100755 --- a/config_files/VTK-4.2.6.sh +++ b/config_files/VTK-4.2.6.sh @@ -24,7 +24,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <> ${PRODUCT_DIR}/MAKEcmake.LOG <GetFile()->tellg()%seekg(static_cast(self->GetFile()->tellg())%g" IO/vtkBMPReader.cxx > IO/vtkBMPReader.cxx.orig @@ -179,7 +179,7 @@ cat > ${PRODUCT_DIR}/CONFIGURE.LOG < ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/size.log -#du -sk ${INSTALL_WORK}/cmake-1.6.6 >> ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} ${INSTALL_WORK}/cmake-1.6.6 +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi -print_env +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC if [ -n "$MESA_HOME" ]; then - check_jb tar xfz ${SOURCE_DIR}/VTK-4.2.6-with-Mesa.tar.gz -C ${INSTALL_ROOT} + check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}_with_Mesa.tar.gz -C ${INSTALL_ROOT} else - check_jb tar xfz ${SOURCE_DIR}/VTK-4.2.6.tar.gz -C ${INSTALL_ROOT} + check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} fi -print_env +# to generate environment script for sources +try_preinstalled } export PROCEDURE=$1; @@ -230,7 +236,10 @@ 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="vtk" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="VTK-4.2.6" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/common.sh b/config_files/common.sh index f1a8def..0a86f3a 100755 --- a/config_files/common.sh +++ b/config_files/common.sh @@ -84,8 +84,8 @@ for i in $SHRC $CSHRC ; do touch ${install_work}/$i done -if [ $# -eq 3 ] ; then - product_name=$3; +if [ $# -eq 4 ] ; then + product_name=$4; product_env=${install_work}/env_${product_name}.sh (test -e ${product_env} && rm ${product_env} ) fi @@ -136,9 +136,20 @@ fi # 1. first dump all environment files into the $SHRC file product_sequence="$2" +install_products="$3" for i in $product_sequence ; do env_file=${install_work}/env_${i}.sh - ( test -e $env_file && cat $env_file >> ${install_work}/$SHRC 2>/dev/null ) + _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 [ $? -eq 1 ] ; then + cat $env_file | sed 's/^/## /' >> ${install_work}/$SHRC 2>/dev/null + else + cat $env_file >> ${install_work}/$SHRC 2>/dev/null + fi + fi done # 2. writing global functions to _salome.sh file @@ -339,25 +350,31 @@ cat ${INSTALL_WORK}/_tmp2 >> ${install_work}/_$CSHRC 2>/dev/null rm -f ${INSTALL_WORK}/_tmp1 ${INSTALL_WORK}/_tmp2 -if [ $# -eq 4 ] ; then - product_dir=$4 +if [ $# -eq 5 ] ; then + product_dir=$5 if [ -e ${product_dir} ] ; then - cp -f ${install_work}/_$SHRC ${product_dir}/$SHRC - cp -f ${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 +#test -e ${install_root}/env_products.csh && mv ${install_root}/env_products.csh ${install_root}/env_products.csh_`date +%F_%T` cp -f ${install_work}/_$CSHRC ${install_root}/env_products.csh +#test -e ${install_root}/env_products.sh && mv ${install_root}/env_products.sh ${install_root}/env_products.sh_`date +%F_%T` cp -f ${install_work}/_$SHRC ${install_root}/env_products.sh rm -f ${install_work}/_$SHRC ${install_work}/_$CSHRC ### !!! copying build.csh and build.sh scripts if [ -e ./build.csh ]; then + #test -e ${install_root}/build.csh && mv ${install_root}/build.csh ${install_root}/build.csh_`date +%F_%T` cp -f ./build.csh ${install_root} fi if [ -e ./build.sh ]; then + #test -e ${install_root}/build.sh && mv ${install_root}/build.sh ${install_root}/build.sh_`date +%F_%T` cp -f ./build.sh ${install_root} fi ### !!! copying release notes @@ -376,25 +393,26 @@ done #try use already existing product try_existing() { -product_dir=$1; install_root=$2; install_work=$3; product_sequence="$4"; product_type=$5 +product_dir=$1; install_root=$2; install_work=$3; +product_sequence="$4"; installed_products="$5"; product_type=$6 env_file=${product_dir}/env_${product_type}.sh if [ -f ${env_file} ] ; then - cp -f ${env_file} ${install_work} - make_env ${install_root} ${install_work} "${product_sequence}" +# cp -f ${env_file} ${install_work} + cp -f ${env_file} ${install_work}/_env_${product_type}.sh + make_env ${install_root} ${install_work} "${product_sequence}" "${installed_products}" source ${install_work}/$SHRC check_version if [ $? -eq 0 ] ; then - if [ -d ${product_dir} ] && [ -w ${product_dir} ] ; then - #makedir ${product_dir} - print_env - return 0 - fi - else - rm -f ${install_work}/env_${product_type}.sh - make_env ${install_root} ${install_work} "${product_sequence}" + return 0 fi fi -return 1; +echo ${product_type} | grep -q '_src$' +if [ $? -eq 1 ] ; then + print_env_bin +else + print_env_src +fi +return 0 } #check existance of lib passed as first parameter diff --git a/config_files/docutils-0.3.7.sh b/config_files/docutils-0.3.7.sh index c847e46..b994dd1 100755 --- a/config_files/docutils-0.3.7.sh +++ b/config_files/docutils-0.3.7.sh @@ -17,7 +17,7 @@ check_version(){ return 0 } -print_env(){ +print_env_bin(){ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < _rst2latex.py @@ -86,7 +111,8 @@ mv -f _rst2html.py rst2html.py chmod a+x rst2html.py ln -sf rst2html.py rst2html -print_env +# to generate environment script for sources +try_preinstalled } export PROCEDURE=$1; @@ -94,7 +120,10 @@ 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="docutils" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="docutils-0.3.7" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/doxygen-1.4.6.sh b/config_files/doxygen-1.4.6.sh index c27509b..f9e58af 100755 --- a/config_files/doxygen-1.4.6.sh +++ b/config_files/doxygen-1.4.6.sh @@ -29,7 +29,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <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 -ge 10404 ] ; then - tmp="${doxyhome} ${doxyhome} \${PATH} ${PATH}"; - path=`sort_path ${tmp}` - cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ./tmake/lib/linux-g++/tmake.conf.new @@ -114,19 +114,27 @@ check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install #EOF #fi -#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/doxygen-1.4.6.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} -print_env +# to generate environment script for sources +try_preinstalled } export PROCEDURE=$1; @@ -134,7 +142,10 @@ 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_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="doxygen-1.4.6" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/gcc-common.sh b/config_files/gcc-common.sh index af4d794..960294e 100755 --- a/config_files/gcc-common.sh +++ b/config_files/gcc-common.sh @@ -20,7 +20,8 @@ GCC_VERSION_MIN=`echo $GCC_VERSION | awk -F[.-] '{if(NF>1) print $2; else print GCC_VERSION_REL=`echo $GCC_VERSION | awk -F[.-] '{if(NF>2) print $3; else print 0}'` let GCC_VERSION_ID=$GCC_VERSION_MAJ*10000+$GCC_VERSION_MIN*100+$GCC_VERSION_REL -check_version(){ +check_version() +{ # version number is calculated as: *10000+*100+ # e.g. for gcc 3.2 it is equal to 30200, for gcc 3.3.2 - 30202 gcc_ver=`gcc -dumpversion | awk -F[.-] '{v1=0;v2=0;v3=0;if(NF>0)v1=$1;if(NF>1)v2=$2;if(NF>2)v3=$3;print v1*10000+v2*100+v3}'` @@ -30,20 +31,6 @@ fi return 1 } -print_env(){ -cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/graphviz-1.9.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} cd ${PRODUCT_DIR}/lib/graphviz for l in `ls *.la`; do libdir=`grep -e "libdir=.*" $l | sed -e "s/libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"` @@ -101,7 +111,8 @@ for l in `ls *.la`; do chmod a+x $l done -print_env +# to generate environment scripts +try_preinstalled } export PROCEDURE=$1; @@ -109,7 +120,10 @@ 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="graphviz" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="graphviz-1.9" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/graphviz-2.2.1.sh b/config_files/graphviz-2.2.1.sh index 7d4ddbf..5c66a10 100755 --- a/config_files/graphviz-2.2.1.sh +++ b/config_files/graphviz-2.2.1.sh @@ -28,7 +28,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <&1 | awk '{print $3}'` - 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 -ge 20201 ] ; then - dothome=`cd ${dothome}/..; pwd` - tmp="${dothome}/bin ${dothome}/bin \${PATH} ${PATH}"; - path=`sort_path ${tmp}` - tmp="${dothome}/lib/graphviz ${dothome}/lib/graphviz \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}"; - ld_library_path=`sort_path ${tmp}` - cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/graphviz-2.2.1.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} cd ${PRODUCT_DIR}/lib/graphviz for l in `ls *.la`; do libdir=`grep -e "libdir=.*" $l | sed -e "s/libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"` @@ -115,7 +119,8 @@ for l in `ls *.la`; do chmod a+x $l done -print_env +# to generate environment scripts +try_preinstalled } export PROCEDURE=$1; @@ -123,7 +128,10 @@ 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="graphviz" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="graphviz-2.2.1" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/hdf5-1.6.3.sh b/config_files/hdf5-1.6.3.sh index 8a2718f..efb89a9 100755 --- a/config_files/hdf5-1.6.3.sh +++ b/config_files/hdf5-1.6.3.sh @@ -31,7 +31,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/hdf5-1.6.3.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} ### modify libhdf5.la file to correct direct path to hdf5 library ### no need to do this for sources installation because 'make install' does it! @@ -111,7 +117,8 @@ cd ${PRODUCT_DIR}/lib sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libhdf5.la > libhdf5.la.new mv -f libhdf5.la.new libhdf5.la -print_env +# to generate environment script for sources +try_preinstalled } export PROCEDURE=$1; @@ -119,7 +126,10 @@ 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="hdf" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="hdf5-1.6.3" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/hdf5-1.6.4.sh b/config_files/hdf5-1.6.4.sh index a80569f..939e031 100755 --- a/config_files/hdf5-1.6.4.sh +++ b/config_files/hdf5-1.6.4.sh @@ -31,7 +31,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/hdf5-1.6.4.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} ### modify libhdf5.la file to correct direct path to hdf5 library ### no need to do this for sources installation because 'make install' does it! @@ -118,7 +127,8 @@ if [ -e libhdf5_hl.la ] ; then mv -f libhdf5_hl.la.new libhdf5_hl.la fi -print_env +# to generate environment script for sources +try_preinstalled } export PROCEDURE=$1; @@ -126,7 +136,10 @@ 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="hdf" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="hdf5-1.6.4" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/med-2.2.3.sh b/config_files/med-2.2.3.sh index b642fdf..82ba28a 100755 --- a/config_files/med-2.2.3.sh +++ b/config_files/med-2.2.3.sh @@ -26,7 +26,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ./configure --prefix=${PRODUCT_DIR} FFLAGS='-g -O2 -ffixed-line-length-none' CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG" - ./configure --prefix=${PRODUCT_DIR} FFLAGS="-g -O2 -ffixed-line-length-none" CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${INSTALL_WORK}/errlog + ./configure --prefix=${PRODUCT_DIR} FFLAGS="-g -O2 -ffixed-line-length-none" CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${PRODUCT_DIR}_SRC/errlog else echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} FFLAGS='-g -O2 -ffixed-line-length-none' >> ${PRODUCT_DIR}/CONFIGURE.LOG" - ./configure --prefix=${PRODUCT_DIR} FFLAGS="-g -O2 -ffixed-line-length-none" >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${INSTALL_WORK}/errlog + ./configure --prefix=${PRODUCT_DIR} FFLAGS="-g -O2 -ffixed-line-length-none" >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${PRODUCT_DIR}_SRC/errlog fi if [ "$?" -ne "0" ] ; then cat ${PRODUCT_DIR}/CONFIGURE.LOG - cat ${INSTALL_WORK}/errlog >&2 - cat ${INSTALL_WORK}/errlog >> ${PRODUCT_DIR}/CONFIGURE.LOG + cat ${PRODUCT_DIR}_SRC/errlog >&2 + cat ${PRODUCT_DIR}_SRC/errlog >> ${PRODUCT_DIR}/CONFIGURE.LOG exit 1 fi else @@ -111,8 +115,8 @@ EOF check_job ${PRODUCT_DIR}/MAKE.LOG make check_job ${PRODUCT_DIR}/INSTALL.LOG make install -#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; ### modify libmed.la libmedC.la files to correct direct path to hdf5 library cd ${PRODUCT_DIR}/lib @@ -132,15 +136,21 @@ mv -f libmedC.la.new libmedC.la chmod 755 libmed.la chmod 755 libmedC.la -print_env +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/med-2.2.3.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} ### modify libmed.la libmedC.la files to correct direct path to hdf5 library ### also modify libmed.la and libmedC.la files to correct direct path to med libraries @@ -168,7 +178,8 @@ sed -e "s%set cmd \".*/bin/mdump\"%set cmd \"${PRODUCT_DIR}/bin/mdump\"%g" xmdum mv _xmdump xmdump chmod a+x xmdump -print_env +# to generate environment script for sources +try_preinstalled } export PROCEDURE=$1; @@ -176,9 +187,12 @@ 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="med" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="med-2.2.3" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} -export PRODUCT_WORK=${INSTALL_WORK}/med_fichier2.2.3.src +export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} source ./common.sh $PROCEDURE diff --git a/config_files/msg2qm.sh b/config_files/msg2qm.sh index 43df201..bf06151 100755 --- a/config_files/msg2qm.sh +++ b/config_files/msg2qm.sh @@ -21,7 +21,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -rf ${PRODUCT_WORK} +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi -print_env +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/msg2qm.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} -print_env +# to generate environment scripts +try_preinstalled } export PROCEDURE=$1; @@ -96,7 +112,10 @@ 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="msg2qm" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="msg2qm" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/netgen-4.5.sh b/config_files/netgen-4.5.sh index b5800df..9c7a416 100755 --- a/config_files/netgen-4.5.sh +++ b/config_files/netgen-4.5.sh @@ -22,7 +22,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < /dev/null) +(cd ${PRODUCT_DIR}_SRC/libsrc/meshing; echo -e '16s/^$/class Mesh;\nwq' | ed - meshtype.hpp > /dev/null) # apply patch: to make compilable with CASCADE-6.1.1 -(cd ${PRODUCT_WORK}/libsrc; sed -e "s%\(.*\)-DHAVE_LIMITS\'%\1-DHAVE_LIMITS_H%g" makefile.inc > makefile.inc.new; mv makefile.inc.new makefile.inc) +(cd ${PRODUCT_DIR}_SRC/libsrc; sed -e "s%\(.*\)-DHAVE_LIMITS\'%\1-DHAVE_LIMITS_H%g" makefile.inc > makefile.inc.new; mv makefile.inc.new makefile.inc) +if [ $PROCEDURE == "install_source" ]; then +# to generate environment scripts + try_preinstalled +fi +} + +install_source_and_build() +{ +# install sources +install_source + +# build sources +makedir ${PRODUCT_DIR} # set platform type variable if test `uname -m` = "x86_64" ; then export MACHINE=LINUX64 @@ -94,33 +102,41 @@ fi # compile for directory in csg general geom2d gprim interface linalg occ meshing opti stlgeom ; do - cd ${PRODUCT_WORK}/libsrc/${directory} + cd ${PRODUCT_DIR}_SRC/libsrc/${directory} check_job ${PRODUCT_DIR}/MAKE.LOG make done # install mkdir -p ${PRODUCT_DIR}/lib -cp -f ${PRODUCT_WORK}/lib/${MACHINE}/* ${PRODUCT_DIR}/lib +cp -f ${PRODUCT_DIR}_SRC/lib/${MACHINE}/* ${PRODUCT_DIR}/lib mkdir -p ${PRODUCT_DIR}/include -cp -f ${PRODUCT_WORK}/libsrc/interface/nglib.h ${PRODUCT_DIR}/include +cp -f ${PRODUCT_DIR}_SRC/libsrc/interface/nglib.h ${PRODUCT_DIR}/include for directory in csg general geom2d gprim linalg occ meshing opti stlgeom ; do - cp -f ${PRODUCT_WORK}/libsrc/${directory}/*.hpp ${PRODUCT_DIR}/include + cp -f ${PRODUCT_DIR}_SRC/libsrc/${directory}/*.hpp ${PRODUCT_DIR}/include done -cp -f ${PRODUCT_WORK}/libsrc/include/mystdlib.h ${PRODUCT_WORK}/libsrc/include/mydefs.hpp ${PRODUCT_DIR}/include +cp -f ${PRODUCT_DIR}_SRC/libsrc/include/mystdlib.h ${PRODUCT_DIR}_SRC/libsrc/include/mydefs.hpp ${PRODUCT_DIR}/include + +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi -#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/netgen-4.5.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} -print_env +# to generate environment script for sources +try_preinstalled } export PROCEDURE=$1; @@ -128,7 +144,10 @@ 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="netgen" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="netgen-4.5" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/omniORB-4.0.5.sh b/config_files/omniORB-4.0.5.sh index e31f4f6..0d0b8ee 100755 --- a/config_files/omniORB-4.0.5.sh +++ b/config_files/omniORB-4.0.5.sh @@ -38,7 +38,7 @@ fi return 0 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${PRODUCT_DIR}/.omniORB.cfg < ${PRODUCT_DIR}/.omniORB.cfg < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < _omniidlrun.py mv -f _omniidlrun.py omniidlrun.py chmod a+x omniidlrun.py -#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log +#du -sk ${PRODUCT_DIR}_SRC > ${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 + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/omniORB-4.0.5.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} ln -sf ${PRODUCT_DIR} ${INSTALL_ROOT}/omni @@ -176,7 +181,8 @@ 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 +# to generate environment script for sources +try_preinstalled } export PROCEDURE=$1; @@ -184,7 +190,10 @@ 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_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="omniORB-4.0.5" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/omniORB-4.0.6.sh b/config_files/omniORB-4.0.6.sh index 987d5f2..e679708 100755 --- a/config_files/omniORB-4.0.6.sh +++ b/config_files/omniORB-4.0.6.sh @@ -38,7 +38,7 @@ fi return 0 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${PRODUCT_DIR}/.omniORB.cfg < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < _omniidlrun.py mv -f _omniidlrun.py omniidlrun.py chmod a+x omniidlrun.py -#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log cd ${PRODUCT_DIR} -rm -fr ${INSTALL_WORK}/omniORB-4.0.6 -rm -fr ${INSTALL_WORK}/omniORBpy-2.6 -rm -fr ${INSTALL_WORK}/omniNotify -print_env + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/omniORB-4.0.6.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} ln -sf ${PRODUCT_DIR} ${INSTALL_ROOT}/omni @@ -181,7 +180,8 @@ 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 +# to generate environment script for sources +try_preinstalled } export PROCEDURE=$1; @@ -189,7 +189,10 @@ 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_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="omniORB-4.0.6" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/omniORB-4.0.7.sh b/config_files/omniORB-4.0.7.sh index c707b08..e2492b6 100755 --- a/config_files/omniORB-4.0.7.sh +++ b/config_files/omniORB-4.0.7.sh @@ -38,7 +38,7 @@ fi return 0 } -print_env() +print_env_bin() { if test `uname -m` = "x86_64" ; then @@ -58,75 +58,68 @@ cat > ${PRODUCT_DIR}/.omniORB.cfg < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < _omniidlrun.py mv -f _omniidlrun.py omniidlrun.py chmod a+x omniidlrun.py -#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log cd ${PRODUCT_DIR} -rm -fr ${INSTALL_WORK}/omniORB-4.0.7 -rm -fr ${INSTALL_WORK}/omniORBpy-2.7 -rm -fr ${INSTALL_WORK}/omniNotify -print_env + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/omniORB-4.0.7.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} ln -sf ${PRODUCT_DIR} ${INSTALL_ROOT}/omni @@ -208,7 +205,8 @@ 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 +# to generate environment script for sources +try_preinstalled } export PROCEDURE=$1; @@ -216,7 +214,10 @@ 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_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="omniORB-4.0.7" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/qt-3.3.3.sh b/config_files/qt-3.3.3.sh index 5744bf1..2e2299c 100755 --- a/config_files/qt-3.3.3.sh +++ b/config_files/qt-3.3.3.sh @@ -13,9 +13,10 @@ #################################################################################### check_version(){ -if [ -z "$QTDIR" ]; then +if [ -z "$QTDIR" ] || [ ! -f ${QTDIR}/include/qglobal.h ]; then return 1 fi + ver=`grep "QT_VERSION_STR" ${QTDIR}/include/qglobal.h | sed -e 's%^#define QT_VERSION_STR\([[:space:]]*\)%%g' -e 's%\"%%g'` if [ "$ver" == "3.3.3" ] ; then return 0 @@ -23,7 +24,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < configure chmod +x configure -export QTDIR=${PRODUCT_WORK} +export QTDIR=${PRODUCT_DIR}_SRC export LD_LIBRARY_PATH=${QTDIR}/lib:$LD_LIBRARY_PATH # basic flags @@ -140,7 +127,7 @@ for b in `find bin -mindepth 1 -maxdepth 1 -name "*"`; do if [ -h ${PRODUCT_DIR}/bin/$b ]; then rm -f ${PRODUCT_DIR}/bin/$b fi - cp -f ${PRODUCT_WORK}/bin/$b ${PRODUCT_DIR}/bin/$b + cp -f ${PRODUCT_DIR}_SRC/bin/$b ${PRODUCT_DIR}/bin/$b fi done @@ -156,17 +143,24 @@ fi #rm -rf ${PRODUCT_DIR}/doc -#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/qt-3.3.3.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} cd ${PRODUCT_DIR}/lib @@ -189,7 +183,8 @@ cd ${PRODUCT_DIR}/lib/pkgconfig sed -e "s%^prefix=\(.*\)%prefix=${PRODUCT_DIR}%g" qt-mt.pc > qt-mt.pc.new mv -f qt-mt.pc.new qt-mt.pc -print_env +# to generate environment scripts +try_preinstalled } export PROCEDURE=$1; @@ -197,7 +192,10 @@ 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="qt" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="qt-3.3.3" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/qt-3.3.4.sh b/config_files/qt-3.3.4.sh index ee0b25e..5195d0d 100755 --- a/config_files/qt-3.3.4.sh +++ b/config_files/qt-3.3.4.sh @@ -23,7 +23,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < configure chmod +x configure -export QTDIR=${PRODUCT_WORK} +export QTDIR=${PRODUCT_DIR}_SRC export LD_LIBRARY_PATH=${QTDIR}/lib:$LD_LIBRARY_PATH # basic flags @@ -170,7 +149,7 @@ for b in `find bin -mindepth 1 -maxdepth 1 -name "*"`; do if [ -h ${PRODUCT_DIR}/bin/$b ]; then rm -f ${PRODUCT_DIR}/bin/$b fi - cp -f ${PRODUCT_WORK}/bin/$b ${PRODUCT_DIR}/bin/$b + cp -f ${PRODUCT_DIR}_SRC/bin/$b ${PRODUCT_DIR}/bin/$b fi done @@ -186,17 +165,24 @@ fi #rm -rf ${PRODUCT_DIR}/doc -#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/qt-3.3.4.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} # modify libdir cd ${PRODUCT_DIR}/lib @@ -218,7 +204,8 @@ cd ${PRODUCT_DIR}/lib/pkgconfig sed -e "s%^prefix=\(.*\)%prefix=${PRODUCT_DIR}%g" qt-mt.pc > qt-mt.pc.new mv -f qt-mt.pc.new qt-mt.pc -print_env +# to generate environment scripts +try_preinstalled } export PROCEDURE=$1; @@ -226,7 +213,10 @@ 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="qt" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="qt-3.3.4" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/qwt-0.4.1.sh b/config_files/qwt-0.4.1.sh index c7c9aa7..ed8e8b4 100755 --- a/config_files/qwt-0.4.1.sh +++ b/config_files/qwt-0.4.1.sh @@ -23,7 +23,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -rf ${PRODUCT_WORK} +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi -print_env +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/qwt-0.4.1.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} -print_env +# to generate environment script for sources +try_preinstalled } export PROCEDURE=$1; @@ -100,7 +112,10 @@ 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="qwt" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="qwt-0.4.1" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/qwt-4.2.0.sh b/config_files/qwt-4.2.0.sh index 30f690e..0bbe5c8 100755 --- a/config_files/qwt-4.2.0.sh +++ b/config_files/qwt-4.2.0.sh @@ -29,7 +29,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -rf ${PRODUCT_WORK} +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi -print_env +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/qwt-4.2.0.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} -print_env +# to generate environment script for sources +try_preinstalled } export PROCEDURE=$1; @@ -114,7 +118,10 @@ 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="qwt" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="qwt-4.2.0" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/sip-4.1.sh b/config_files/sip-4.1.sh index b06cbc9..6f43df1 100755 --- a/config_files/sip-4.1.sh +++ b/config_files/sip-4.1.sh @@ -27,7 +27,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <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 - # minimal required version is 4.1 - if [ $ver -ge 40100 ] ; then - tmp="${sipdir} ${sipdir} \${PATH} ${PATH}"; - path=`sort_path ${tmp}` - tmp="${sippython} ${sippython} \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}"; - ld_library_path=`sort_path ${tmp}` - tmp="${sippython} ${sippython} \${PYTHONPATH} ${PYTHONPATH}"; - pythonpath=`sort_path ${tmp}` - cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/sip-4.1.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} # modify sipconfig.py file if [ -n "${PYTHONHOME}" ] && [ -n "${QTDIR}" ] ; then @@ -137,7 +132,8 @@ if [ -n "${PYTHONHOME}" ] && [ -n "${QTDIR}" ] ; then rm sipconfig.py.1 fi -print_env +# to generate environment scripts +try_preinstalled } export PROCEDURE=$1; @@ -145,7 +141,10 @@ 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="sip" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="sip-4.1" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/sip-4.2.1.sh b/config_files/sip-4.2.1.sh index 0a4dc76..8b6be70 100755 --- a/config_files/sip-4.2.1.sh +++ b/config_files/sip-4.2.1.sh @@ -27,7 +27,7 @@ fi return 1 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <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 - # minimal required version is 4.1 - if [ $ver -ge 40100 ] ; then - tmp="${sipdir} ${sipdir} \${PATH} ${PATH}"; - path=`sort_path ${tmp}` - tmp="${sippython} ${sippython} \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}"; - ld_library_path=`sort_path ${tmp}` - tmp="${sippython} ${sippython} \${PYTHONPATH} ${PYTHONPATH}"; - pythonpath=`sort_path ${tmp}` - cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/sip-4.2.1.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} # modify sipconfig.py file if [ -n "${PYTHONHOME}" ] && [ -n "${QTDIR}" ] ; then @@ -156,7 +146,8 @@ if [ -n "${PYTHONHOME}" ] && [ -n "${QTDIR}" ] ; then rm sipconfig.py.1 fi -print_env +# to generate environment scripts +try_preinstalled } export PROCEDURE=$1; @@ -164,7 +155,10 @@ 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="sip" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="sip-4.2.1" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/tcltk-8.3.3.sh b/config_files/tcltk-8.3.3.sh index 6b33f26..9e7ff1c 100755 --- a/config_files/tcltk-8.3.3.sh +++ b/config_files/tcltk-8.3.3.sh @@ -52,7 +52,7 @@ fi return 0 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <> ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/CONFIGURE.LOG < ${PRODUCT_DIR}/size.log -#du -sk ${INSTALL_WORK}/tk8.3.3 >> ${PRODUCT_DIR}/size.log -#du -sk ${INSTALL_WORK}/tclx8.3 >> ${PRODUCT_DIR}/size.log +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log cd ${PRODUCT_DIR} -rm -fr ${INSTALL_WORK}/tcl8.3.3 ${INSTALL_WORK}/tk8.3.3 ${INSTALL_WORK}/tclx8.3 -print_env + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/tcltk-8.3.3.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} # overriding installation path cd ${PRODUCT_DIR}/lib @@ -215,7 +219,8 @@ mv -f _tclConfig.sh tclConfig.sh sed -e "s%${old_prefix}%${PRODUCT_DIR}%g" tkConfig.sh > _tkConfig.sh mv -f _tkConfig.sh tkConfig.sh -print_env +# to generate environment scripts +try_preinstalled } export PROCEDURE=$1; @@ -223,7 +228,10 @@ 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="tcl" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="tcltk-8.3.3" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} diff --git a/config_files/tcltk-8.4.5.sh b/config_files/tcltk-8.4.5.sh index 7b83978..2f7ee9a 100755 --- a/config_files/tcltk-8.4.5.sh +++ b/config_files/tcltk-8.4.5.sh @@ -52,7 +52,7 @@ fi return 0 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <> ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/CONFIGURE.LOG < Common.mk.in -cd ${INSTALL_WORK}/tclx8.3.5/tcl/unix +cd ${PRODUCT_DIR}_SRC/tclx-8.3.5_SRC/tcl/unix mv tclxConfig.sh.in tclxConfig.sh.in.orig sed -e 's/@DEFS@/ -DSTDC_HEADERS=1 -DNDEBUG=1 -DRETSIGTYPE=void /g' tclxConfig.sh.in.orig > tclxConfig.sh.in -cd ${INSTALL_WORK}/tclx8.3.5/tk/unix +cd ${PRODUCT_DIR}_SRC/tclx-8.3.5_SRC/tk/unix mv tkxConfig.sh.in tkxConfig.sh.in.orig sed -e 's/@DEFS@/ -DSTDC_HEADERS=1 -DNDEBUG=1 -DRETSIGTYPE=void /g' tkxConfig.sh.in.orig > tkxConfig.sh.in -cd ${INSTALL_WORK}/tclx8.3.5/unix +cd ${PRODUCT_DIR}_SRC/tclx-8.3.5_SRC/unix #VRV - bug in a tclx configure chmod +w ./configure echo -e '/test "$no_create" = yes || ${CONFIG_SHELL-\/bin\/sh} $CONFIG_STATUS || exit 1\ns/test "$no_create" = yes || ${CONFIG_SHELL-\/bin\/sh} $CONFIG_STATUS || exit 1/test "$no_create" = yes || ${CONFIG_SHELL-\/bin\/sh} $CONFIG_STATUS || exit 0\nwq' | ed - configure @@ -207,20 +207,25 @@ check_job ${PRODUCT_DIR}/MAKEINSTALLEXEC.LOG make install-exec (cd ${PRODUCT_DIR}/lib; ln -fs libtkx8.3.so libtkx.so) (cd ${PRODUCT_DIR}/lib; ln -fs libtkx8.3.a libtkx.a) -#du -sk ${INSTALL_WORK}/tcl8.4.5 > ${PRODUCT_DIR}/size.log -#du -sk ${INSTALL_WORK}/tk8.4.5 >> ${PRODUCT_DIR}/size.log -#du -sk ${INSTALL_WORK}/tclx8.3.5 >> ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR} -rm -fr ${INSTALL_WORK}/tcl8.4.5 ${INSTALL_WORK}/tk8.4.5 ${INSTALL_WORK}/tclx8.3.5 -print_env +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/tcltk-8.4.5.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} # overriding installation path cd ${PRODUCT_DIR}/lib @@ -230,7 +235,8 @@ mv -f _tclConfig.sh tclConfig.sh sed -e "s%${old_prefix}%${PRODUCT_DIR}%g" tkConfig.sh > _tkConfig.sh mv -f _tkConfig.sh tkConfig.sh -print_env +# to generate environment scripts +try_preinstalled } export PROCEDURE=$1; @@ -238,8 +244,11 @@ 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="tcl" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; export PRODUCT="tcltk-8.4.5" +shift +REMOVE_SRC_TMP=$8; export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} source ./common.sh diff --git a/config_files/tcltk-8.4.7.sh b/config_files/tcltk-8.4.7.sh index 992b9ec..40f042e 100755 --- a/config_files/tcltk-8.4.7.sh +++ b/config_files/tcltk-8.4.7.sh @@ -52,7 +52,7 @@ fi return 0 } -print_env() +print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <> ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/CONFIGURE.LOG < Common.mk.in -cd ${INSTALL_WORK}/tclx8.3.5/tcl/unix +cd ${PRODUCT_DIR}_SRC/tclx-8.3.5_SRC/tcl/unix mv tclxConfig.sh.in tclxConfig.sh.in.orig sed -e 's/@DEFS@/ -DSTDC_HEADERS=1 -DNDEBUG=1 -DRETSIGTYPE=void /g' tclxConfig.sh.in.orig > tclxConfig.sh.in -cd ${INSTALL_WORK}/tclx8.3.5/tk/unix +cd ${PRODUCT_DIR}_SRC/tclx-8.3.5_SRC/tk/unix mv tkxConfig.sh.in tkxConfig.sh.in.orig sed -e 's/@DEFS@/ -DSTDC_HEADERS=1 -DNDEBUG=1 -DRETSIGTYPE=void /g' tkxConfig.sh.in.orig > tkxConfig.sh.in -cd ${INSTALL_WORK}/tclx8.3.5/unix +cd ${PRODUCT_DIR}_SRC/tclx-8.3.5_SRC/unix #VRV - bug in a tclx configure chmod +w ./configure echo -e '/test "$no_create" = yes || ${CONFIG_SHELL-\/bin\/sh} $CONFIG_STATUS || exit 1\ns/test "$no_create" = yes || ${CONFIG_SHELL-\/bin\/sh} $CONFIG_STATUS || exit 1/test "$no_create" = yes || ${CONFIG_SHELL-\/bin\/sh} $CONFIG_STATUS || exit 0\nwq' | ed - configure @@ -204,20 +203,24 @@ check_job ${PRODUCT_DIR}/MAKEINSTALLEXEC.LOG make install-exec (cd ${PRODUCT_DIR}/lib; ln -fs libtkx8.3.so libtkx.so) (cd ${PRODUCT_DIR}/lib; ln -fs libtkx8.3.a libtkx.a) -#du -sk ${INSTALL_WORK}/tcl8.4.7 > ${PRODUCT_DIR}/size.log -#du -sk ${INSTALL_WORK}/tk8.4.7 >> ${PRODUCT_DIR}/size.log -#du -sk ${INSTALL_WORK}/tclx8.3.5 >> ${PRODUCT_DIR}/size.log +#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log cd ${PRODUCT_DIR} -rm -fr ${INSTALL_WORK}/tcl8.4.7 ${INSTALL_WORK}/tk8.4.7 ${INSTALL_WORK}/tclx8.3.5 -print_env + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled } install_binary() { -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/tcltk-8.4.7.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} # overriding installation path cd ${PRODUCT_DIR}/lib @@ -227,7 +230,8 @@ mv -f _tclConfig.sh tclConfig.sh sed -e "s%${old_prefix}%${PRODUCT_DIR}%g" tkConfig.sh > _tkConfig.sh mv -f _tkConfig.sh tkConfig.sh -print_env +# to generate environment scripts +try_preinstalled } export PROCEDURE=$1; @@ -235,7 +239,10 @@ 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="tcl" ; fi +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; export PRODUCT="tcltk-8.4.7" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -- 2.39.2