From 22110da38e546ce9312b48da3e5c2042f62278eb Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 29 Nov 2013 14:30:29 +0000 Subject: [PATCH] SALOME 7.3.0 preparation --- config_files/modifyLaFiles.sh | 4 +- config_files/netgen.sh | 87 ++++++++++++------------ config_files/numpy.sh | 52 +++++++++------ config_files/omniORB.sh | 121 ++++++++++++++++------------------ config_files/qscintilla.sh | 62 ++++++++--------- 5 files changed, 161 insertions(+), 165 deletions(-) diff --git a/config_files/modifyLaFiles.sh b/config_files/modifyLaFiles.sh index 1a94bc3..3e67a76 100755 --- a/config_files/modifyLaFiles.sh +++ b/config_files/modifyLaFiles.sh @@ -16,7 +16,7 @@ modify_la_files(){ -modif_la_files ${INST_DIR}/$SDIR_NAME +modif_la_files ${INST_DIR}/${SDIR_NAME} test $? -eq 0 && exit 1 || exit 0 } @@ -27,4 +27,4 @@ INST_DIR=$2 source ${INST_DIR}/env_products.sh source ./common.sh -$PROCEDURE +${PROCEDURE} diff --git a/config_files/netgen.sh b/config_files/netgen.sh index 345a8cf..4f3d336 100755 --- a/config_files/netgen.sh +++ b/config_files/netgen.sh @@ -15,13 +15,13 @@ # # netgen version # -NETGEN_VERSION=4.9.13 +VERSION_NETGEN=4.9.13 check_version() { # check existance of netgen # unfortunarely we can't find anything about netgen version -if [ -n "$NETGENROOT" ]; then +if [ -n "${NETGEN_ROOT_DIR}" ]; then return 0 fi return 1 @@ -30,9 +30,9 @@ return 1 print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <%#include \n#include %g" libsrc/include/mystdlib.h + sed -i "s%#include %#include \n#include %g" ${PRODUCT_SRC_DIR}/libsrc/include/mystdlib.h fi # patch to make nglib only: if [ "${patch_build}" = "1" ] ; then - cd ${PRODUCT_SRC_DIR} - sed -i "s/^\(SUBDIRS = .* \)ng /\1nglib #/g" Makefile.in + sed -i "s/^\(SUBDIRS = .* \)ng /\1nglib #/g" ${PRODUCT_SRC_DIR}/Makefile.in +fi + +if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then + du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.src.size fi # to generate environment scripts @@ -100,7 +102,7 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} cd ${PRODUCT_SRC_DIR} # configure -NETGEN_CONFIGURE_OPTIONS="--with-occ=${CASROOT} --with-tcl=${TCLHOME}/lib --with-tk=${TCLHOME}/lib --with-tclinclude=${TCLHOME}/include" +NETGEN_CONFIGURE_OPTIONS="--with-occ=${CAS_ROOT_DIR} --with-tcl=${TCLHOME}/lib --with-tk=${TCLHOME}/lib --with-tclinclude=${TCLHOME}/include" if test `uname -m` = "x86_64" ; then ./configure --prefix=${PRODUCT_DIR} ${NETGEN_CONFIGURE_OPTIONS} CXXFLAGS='-O2 -m64' >> ${PRODUCT_DIR}/CONFIGURE.LOG else @@ -121,12 +123,17 @@ cp -f ${PRODUCT_SRC_DIR}/libsrc/include/mystdlib.h ${PRODUCT_SRC_DIR}/libsrc/inc cp -f ${PRODUCT_SRC_DIR}/libsrc/occ/occgeom.hpp ${PRODUCT_SRC_DIR}/libsrc/occ/occmeshsurf.hpp ${PRODUCT_DIR}/include # fix libGL dependencies -cd ${PRODUCT_DIR}/lib && fix_gl_libs +( cd ${PRODUCT_DIR}/lib && fix_gl_libs ) -cd ${PRODUCT_DIR}; +cd ${PRODUCT_DIR} + +if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then + du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.build.size + du -sk ${PRODUCT_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.bin.size +fi # remove sources and temporary files after building -if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then +if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR} fi @@ -137,7 +144,7 @@ try_preinstalled install_binary() { make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} -source ${INSTALL_WORK}/$SHRC +source ${INSTALL_WORK}/${SHRC} # create a product directory test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} @@ -149,45 +156,33 @@ if [ -f ${PRODUCT_DIR}/lib/libnglib.la ] ; then cd ${PRODUCT_DIR}/lib - freetypedir=`printenv FREETYPEDIR` - ftgldir=`printenv FTGLDIR` - gl2psdir=`printenv GL2PSHOME` - freeimagedir=`printenv FREEIMAGEDIR` - tbbbasedir=`printenv TBBHOME` + freetypedir=`printenv FREETYPE_ROOT_DIR` + gl2psdir=`printenv GL2PS_ROOT_DIR` + freeimagedir=`printenv FREEIMAGE_ROOT_DIR` + tbbbasedir=`printenv TBB_ROOT_DIR` TBBKERNEL='cc4.1.0_libc2.4_kernel2.6.16.21' if test `uname -m` = "x86_64" ; then - export TBBMODE="intel64/$TBBKERNEL" + export TBBMODE="intel64/${TBBKERNEL}" else - export TBBMODE="ia32/$TBBKERNEL" + export TBBMODE="ia32/${TBBKERNEL}" fi - tbbdir=${tbbbasedir}/lib/$TBBMODE + tbbdir=${tbbbasedir}/lib/${TBBMODE} if [ -n "${freetypedir}" ] && [ -d "${freetypedir}" ] ; then - sed -e "s%\(.*\)\([[:space:]].*-L.*/freetype-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freetypedir}/lib \3%g" \ - -e 's%\(.*\)\([[:space:]].*libfreetype.la\)\(.*\)%\1 -lfreetype \3%g' libnglib.la > _libnglib.la - mv -f _libnglib.la libnglib.la - fi - if [ -n "${ftgldir}" ] && [ -d "${ftgldir}" ] ; then - sed -e "s%\(.*\)\([[:space:]].*-L.*/ftgl-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${ftgldir}/lib \3%g" \ - -e 's%\(.*\)\([[:space:]].*libftgl.la\)\(.*\)%\1 -lftgl \3%g' libnglib.la > _libnglib.la - mv -f _libnglib.la libnglib.la + sed -i "s%\(.*\)\([[:space:]].*-L.*/freetype-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freetypedir}/lib \3%g;s%\(.*\)\([[:space:]].*libfreetype.la\)\(.*\)%\1 -lfreetype \3%g" libnglib.la fi if [ -n "${gl2psdir}" ] && [ -d "${gl2psdir}" ] ; then - sed -e "s%\(.*\)\([[:space:]].*-L.*/gl2ps-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${gl2psdir}/lib \3%g" libnglib.la > _libnglib.la - mv -f _libnglib.la libnglib.la + sed -i "s%\(.*\)\([[:space:]].*-L.*/gl2ps-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${gl2psdir}/lib \3%g" libnglib.la fi if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then - sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage[^[:space:]]*/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" libnglib.la > _libnglib.la - mv -f _libnglib.la libnglib.la + sed -i "s%\(.*\)\([[:space:]].*-L.*/freeimage[^[:space:]]*/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" libnglib.la fi if [ -n "${tbbdir}" ] && [ -d "${tbbdir}" ] ; then - sed -e "s%\(.*\)\([[:space:]].*-L.*/tbb[^[:space:]]*/lib[^[:space:]]*\)\(.*\)%\1 -L${tbbdir} \3%g" libnglib.la > _libnglib.la - mv -f _libnglib.la libnglib.la + sed -i "s%\(.*\)\([[:space:]].*-L.*/tbb[^[:space:]]*/lib[^[:space:]]*\)\(.*\)%\1 -L${tbbdir} \3%g" libnglib.la fi - sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g;s%[[:space:]]-L[^[:space:]]*\(OCCT\|CAS\)[^[:space:]]*/lib\?% -L${CASROOT}/lib%g;s%[[:space:]][^[:space:]]*\(OCCT\|CAS\)[^[:space:]]*/lib/lib\?% ${CASROOT}/lib/lib%g" libnglib.la - chmod a+x libnglib.la + sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g;s%[[:space:]]-L[^[:space:]]*\(OCCT\|CAS\)[^[:space:]]*/lib\?% -L${CAS_ROOT_DIR}/lib%g;s%[[:space:]][^[:space:]]*\(OCCT\|CAS\)[^[:space:]]*/lib/lib\?% ${CAS_ROOT_DIR}/lib/lib%g" libnglib.la fi # to generate environment script for sources @@ -203,10 +198,10 @@ export PRODUCT_TYPE=$6; export INSTALL_PRODUCTS=$7; shift REMOVE_SRC_TMP=$8; -test $# == 10 && shift && SINGLE_DIR=$9 -export PRODUCT="netgen-${NETGEN_VERSION}" +test $# = 10 && shift && SINGLE_DIR=$9 +export PRODUCT="netgen-${VERSION_NETGEN}" export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC source ./common.sh -$PROCEDURE +${PROCEDURE} diff --git a/config_files/numpy.sh b/config_files/numpy.sh index 34f654e..bf6b28b 100755 --- a/config_files/numpy.sh +++ b/config_files/numpy.sh @@ -15,8 +15,8 @@ # # numpy and lapack versions # -NUMPY_VERSION=1.6.2 -LAPACK_VERSION=3.4.2 +VERSION_NUMPY=1.7.1 +VERSION_LAPACK=3.4.2 check_version(){ # It is not necessary to check version! @@ -25,11 +25,11 @@ return 0 print_env_bin(){ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INST_ROOT}/${PRODUCT_TYPE}.src.size +fi # to generate environment scripts try_preinstalled @@ -77,26 +81,34 @@ install_source test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} # lapack cmake options -CMAKE_OPTIONS="-DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_DIR} -DBUILD_SHARED_LIBS:BOOL=ON" +CMAKE_OPTIONS="" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX=${PRODUCT_DIR}" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS:BOOL=ON" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC" # install lapack GCC=`which gcc` cat >> ${PRODUCT_DIR}/MAKE.LOG < ${INST_ROOT}/${PRODUCT_TYPE}.build.size + du -sk ${PRODUCT_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.bin.size +fi + # remove sources and temporary files after building -if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then +if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR} fi @@ -107,7 +119,7 @@ try_preinstalled install_binary() { make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} -source ${INSTALL_WORK}/$SHRC +source ${INSTALL_WORK}/${SHRC} # create a product directory test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} @@ -136,10 +148,10 @@ export PRODUCT_TYPE=$6; export INSTALL_PRODUCTS=$7; shift REMOVE_SRC_TMP=$8; -test $# == 10 && shift && SINGLE_DIR=$9 -export PRODUCT="numpy-${NUMPY_VERSION}" +test $# = 10 && shift && SINGLE_DIR=$9 +export PRODUCT="numpy-${VERSION_NUMPY}" export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC source ./common.sh -$PROCEDURE +${PROCEDURE} diff --git a/config_files/omniORB.sh b/config_files/omniORB.sh index c6f86ed..b799997 100755 --- a/config_files/omniORB.sh +++ b/config_files/omniORB.sh @@ -15,38 +15,37 @@ # # omniORB, omniORBpy, omniNotify versions # -OMNIORB_VERSION=4.1.6 -OMNIORBPY_VERSION=3.6 -OMNINOTIFY_VERSION=2.1 +VERSION_OMNIORB=4.1.6 +VERSION_OMNIORBPY=3.6 +VERSION_OMNINOTIFY=2.1 # major, and minor+release omniORB version info -OMNIORB_MAJOR=`echo $OMNIORB_VERSION | awk -F. '{print $1}'` -OMNIORB_MINOR_RELEASE=`echo $OMNIORB_VERSION | awk -F. '{printf("%d.%d", $2,$3)}'` +OMNIORB_MAJOR=`echo ${VERSION_OMNIORB} | awk -F. '{print $1}'` +OMNIORB_MINOR_RELEASE=`echo ${VERSION_OMNIORB} | awk -F. '{printf("%d.%d", $2,$3)}'` check_version() { -if [ -z "${OMNIORBDIR}" ]; then - #echo "OMNIORBDIR doesn't set" +if [ -z "${OMNIORB_ROOT_DIR}" ]; then return 1 fi # check omniORB version python_version="`python -c 'import sys; print sys.version[:3]'`" -check_lib_version libomniORB${OMNIORB_MAJOR}.so.${OMNIORB_MINOR_RELEASE} ${OMNIORBDIR}/lib +check_lib_version libomniORB${OMNIORB_MAJOR}.so.${OMNIORB_MINOR_RELEASE} ${OMNIORB_ROOT_DIR}/lib if [ "$?" -ne "0" ]; then return 1 fi # check omniORBpy version -check_lib_version _omnipymodule.so.${OMNIORBPY_VERSION} ${OMNIORBDIR}/lib/python${python_version}/site-packages +check_lib_version _omnipymodule.so.${VERSION_OMNIORBPY} ${OMNIORB_ROOT_DIR}/lib/python${python_version}/site-packages if [ "$?" -ne "0" ]; then return 1 fi # check omniNotify version # .... how to check version for arbitrary version of omniNotify ??? -check_lib_version libCOSNotify4.so.0.1 ${OMNIORBDIR}/lib +check_lib_version libCOSNotify4.so.0.1 ${OMNIORB_ROOT_DIR}/lib if [ "$?" -ne "0" ]; then return 1 fi -check_lib_version notifd ${OMNIORBDIR}/bin +check_lib_version notifd ${OMNIORB_ROOT_DIR}/bin if [ "$?" -ne "0" ]; then return 1 fi @@ -55,29 +54,15 @@ return 0 print_env_bin() { - -if [ `uname -m` = "x86_64" ] && [ -d ${PRODUCT_DIR}/lib64 ] ; then - OMNI_LIB_PREFIX=64 -elif [ -d ${PRODUCT_DIR}/lib ] ; then - OMNI_LIB_PREFIX="" -else - OMNI_LIB_PREFIX=64 -fi - cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${PRODUCT_DIR}/.omniORB.cfg < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INST_ROOT}/${PRODUCT_TYPE}.src.size +fi + # to generate environment scripts try_preinstalled } @@ -139,7 +131,7 @@ install_source # build sources test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} # install omniORB -cd ${PRODUCT_SRC_DIR}/omniORB-${OMNIORB_VERSION}_SRC +cd ${PRODUCT_SRC_DIR}/omniORB-${VERSION_OMNIORB}_SRC mkdir build cd build @@ -147,13 +139,13 @@ check_job ${PRODUCT_DIR}/CONFIGURE_OMNIORB.LOG ../configure --prefix=${PRODUCT_D GCC=`which gcc` cat >> ${PRODUCT_DIR}/MAKE_OMNIORB.LOG <> ${PRODUCT_DIR}/MAKE_OMNIORBPY.LOG <> ${PRODUCT_DIR}/MAKE_OMNINOTIFY.LOG < ${INST_ROOT}/${PRODUCT_TYPE}.build.size + du -sk ${PRODUCT_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.bin.size +fi + # remove sources and temporary files after building -if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then +if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR} fi @@ -202,30 +200,25 @@ try_preinstalled install_binary() { make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} -source ${INSTALL_WORK}/$SHRC +source ${INSTALL_WORK}/${SHRC} # create a product directory test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR} -ln -sf ${PRODUCT_DIR} ${INST_ROOT}/omni - -cd ${PRODUCT_DIR}/bin for l in omniidl omniidlrun.py ; do - sed -i "s%#\!.*python%#\!/usr/bin/env python%;s%\"[^[:space:]]*${PRODUCT}\([^[:space:]]*\)\"%\"${PRODUCT_DIR}\1\"%" ${l} + test -e ${PRODUCT_DIR}/bin/${l} && sed -i "s%#\!.*python%#\!/usr/bin/env python%;s%\"[^[:space:]]*${PRODUCT}\([^[:space:]]*\)\"%\"${PRODUCT_DIR}\1\"%" ${PRODUCT_DIR}/bin/${l} done -cd ${PRODUCT_DIR}/lib -for l in X `find . -name "*_idl.py"`; do +for l in X `find ${PRODUCT_DIR}/lib -name "*_idl.py"`; do if [ "${l}" != "X" ] ; then lname=`basename ${l} | sed -e "s%_idl.py$%%g"`".idl" sed -i "s%\(omniORB.openModule(.*,[[:space:]]*r\"\)[^[:space:]]*${PRODUCT}\([^[:space:]]*/${lname}\"\)%\1${PRODUCT_DIR}\2%g" ${l} fi done -cd ${PRODUCT_DIR}/lib/pkgconfig -for l in X `find . -name "*.pc"`; do +for l in X `find ${PRODUCT_DIR}/lib/pkgconfig -name "*.pc"`; do if [ "${l}" != "X" ] ; then sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g" ${l} fi @@ -244,10 +237,10 @@ export PRODUCT_TYPE=$6; export INSTALL_PRODUCTS=$7; shift REMOVE_SRC_TMP=$8; -test $# == 10 && shift && SINGLE_DIR=$9 -export PRODUCT="omniORB-${OMNIORB_VERSION}" +test $# = 10 && shift && SINGLE_DIR=$9 +export PRODUCT="omniORB-${VERSION_OMNIORB}" export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC source ./common.sh -$PROCEDURE +${PROCEDURE} diff --git a/config_files/qscintilla.sh b/config_files/qscintilla.sh index 163c9b1..6092705 100755 --- a/config_files/qscintilla.sh +++ b/config_files/qscintilla.sh @@ -15,14 +15,14 @@ # # QSCINTILLA version # -QSCINTILLA_VERSION=2.7 +VERSION_QSCINTILLA=2.7 check_version(){ -if [ -z "${QSCINTILLA_DIR}" ]; then +if [ -z "${QSCINTILLA_ROOT_DIR}" ]; then return 1 fi -ver=`grep "QSCINTILLA_VERSION_STR" ${QSCINTILLA_DIR}/include/Qsci/qsciglobal.h | sed -e 's%^#define QSCINTILLA_VERSION_STR\([[:space:]]*\)%%g' -e 's%\"%%g'` -if [ "$ver" == "${QSCINTILLA_VERSION}" ] ; then +ver=`grep "QSCINTILLA_VERSION_STR" ${QSCINTILLA_ROOT_DIR}/include/Qsci/qsciglobal.h | sed -e 's%^#define QSCINTILLA_VERSION_STR\([[:space:]]*\)%%g' -e 's%\"%%g'` +if [ "${ver}" = "${VERSION_QSCINTILLA}" ] ; then return 0 fi return 1 @@ -31,9 +31,9 @@ return 1 print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < qscintilla.pro.new - mv -f qscintilla.pro.new qscintilla.pro + sed -i "s%\(target.path[[:space:]]*=[[:space:]]*\).*%\1${PRODUCT_DIR}/lib%g;s%\(header.path[[:space:]]*=[[:space:]]*\).*%\1${PRODUCT_DIR}/include%g" ${PRODUCT_SRC_DIR}/Qt4Qt5/qscintilla.pro + sed -i "s%\(trans.path[[:space:]]*=[[:space:]]*\).*%\1${PRODUCT_DIR}/translations%g;s%\(qsci.path[[:space:]]*=[[:space:]]*\).*%\1${PRODUCT_DIR}%g" ${PRODUCT_SRC_DIR}/Qt4Qt5/qscintilla.pro fi +if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then + du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.src.size +fi # to generate environment scripts try_preinstalled @@ -95,8 +93,7 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} cd ${PRODUCT_SRC_DIR} -# workaround : clear temporarily INSTALL_ROOT env.var if it is set -INSTALL_ROOT_PREV=$INSTALL_ROOT +# workaround : clear INSTALL_ROOT env.var if it is set unset INSTALL_ROOT cd ${PRODUCT_SRC_DIR}/Qt4Qt5 @@ -105,26 +102,25 @@ qmake -o Makefile qscintilla.pro check_job ${PRODUCT_DIR}/MAKE.LOG make check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install -if [ "${PYQTDIR}" != "" ] ; then +if [ "${PYQT4_ROOT_DIR}" != "" ] ; then # install Python wrapping for QScintilla only if pre-installed version of PyQt is used cd ${PRODUCT_SRC_DIR}/Python check_job ${PRODUCT_DIR}/PYCONFIGURE.LOG python configure.py -a ${PRODUCT_DIR}/qsci \ -n ${PRODUCT_DIR}/include -o ${PRODUCT_DIR}/lib -p 4 \ - -d ${PYQTDIR}/PyQt4 -v ${PYQTDIR}/sip + -d ${PYQT4_ROOT_DIR}/PyQt4 -v ${PYQT4_ROOT_DIR}/sip check_job ${PRODUCT_DIR}/PYMAKE.LOG make check_job ${PRODUCT_DIR}/PYMAKEINSTALL.LOG make install fi -if [ "${INSTALL_ROOT_PREV}" != "" ] ; then - export INSTALL_ROOT=$INSTALL_ROOT_PREV -fi +cd ${PRODUCT_DIR} -#rm -rf ${PRODUCT_DIR}/doc -#du -sk ${PRODUCT_SRC_DIR} > ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; +if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then + du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.build.size + du -sk ${PRODUCT_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.bin.size +fi # remove sources and temporary files after building -if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then +if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR} fi @@ -135,17 +131,17 @@ try_preinstalled install_binary() { make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} -source ${INSTALL_WORK}/$SHRC +source ${INSTALL_WORK}/${SHRC} # create a product directory test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR} -if [ "${PYQTDIR}" != "" ] ; then +if [ "${PYQT4_ROOT_DIR}" != "" ] ; then # install Python wrapping for QScintilla only if pre-installed version of PyQt is used if [ -f ${SOURCE_DIR}/${PRODUCT}-python.tar.gz ] ; then - check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}-python.tar.gz -C ${PYQTDIR} + check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}-python.tar.gz -C ${PYQT4_ROOT_DIR} fi fi @@ -162,10 +158,10 @@ export PRODUCT_TYPE=$6; export INSTALL_PRODUCTS=$7; shift REMOVE_SRC_TMP=$8; -test $# == 10 && shift && SINGLE_DIR=$9 -export PRODUCT="QScintilla-${QSCINTILLA_VERSION}" +test $# = 10 && shift && SINGLE_DIR=$9 +export PRODUCT="QScintilla-${VERSION_QSCINTILLA}" export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC source ./common.sh -$PROCEDURE +${PROCEDURE} -- 2.39.2