modify_la_files(){
-modif_la_files ${INST_DIR}/$SDIR_NAME
+modif_la_files ${INST_DIR}/${SDIR_NAME}
test $? -eq 0 && exit 1 || exit 0
}
source ${INST_DIR}/env_products.sh
source ./common.sh
-$PROCEDURE
+${PROCEDURE}
#
# 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
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export NETGENHOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export LD_LIBRARY_PATH=\${NETGENHOME}/lib:\${LD_LIBRARY_PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export NETGEN_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export LD_LIBRARY_PATH=\${NETGEN_ROOT_DIR}/lib:\${LD_LIBRARY_PATH}
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
print_env_src()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
# nothing to do
##
EOF
install_source()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# unpack
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
local patch_gcc43=1
# apply general patch for SALOME
if [ "${patch_sources}" = "1" ] ; then
- if [ -f patches/netgen-${NETGEN_VERSION}-for-SALOME.patch ] ; then
- cp patches/netgen-${NETGEN_VERSION}-for-SALOME.patch ${PRODUCT_SRC_DIR}
+ if [ -f patches/netgen-${VERSION_NETGEN}-for-SALOME.patch ] ; then
+ cp patches/netgen-${VERSION_NETGEN}-for-SALOME.patch ${PRODUCT_SRC_DIR}
cd ${PRODUCT_SRC_DIR}
- patch -p1 < netgen-${NETGEN_VERSION}-for-SALOME.patch
+ patch -p1 < netgen-${VERSION_NETGEN}-for-SALOME.patch
fi
fi
# patch for gcc 4.3 compatibility
if [ "${patch_gcc43}" = "1" ] ; then
- cd ${PRODUCT_SRC_DIR}
- sed -i "s%#include <string>%#include <string>\n#include <string.h>%g" libsrc/include/mystdlib.h
+ sed -i "s%#include <string>%#include <string>\n#include <string.h>%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
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
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
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}
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
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}
#
# 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!
print_env_bin(){
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export NUMPY_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PYTHONPATH=\${NUMPY_DIR}/lib/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
-export PATH=\${NUMPY_DIR}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${NUMPY_DIR}/lib:\${LD_LIBRARY_PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export NUMPY_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PYTHONPATH=\${NUMPY_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
+export PATH=\${NUMPY_ROOT_DIR}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${NUMPY_ROOT_DIR}/lib:\${LD_LIBRARY_PATH}
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
print_env_src()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
# nothing to do
##
EOF
install_source()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
makedir ${PRODUCT_SRC_DIR}
# unpack
-check_jb tar xfz ${SOURCE_DIR}/lapack-${LAPACK_VERSION}.tar.gz -C ${PRODUCT_SRC_DIR}
-check_jb tar xfz ${SOURCE_DIR}/numpy-${NUMPY_VERSION}.tar.gz -C ${PRODUCT_SRC_DIR}
+check_jb tar xfz ${SOURCE_DIR}/lapack-${VERSION_LAPACK}.tar.gz -C ${PRODUCT_SRC_DIR}
+check_jb tar xfz ${SOURCE_DIR}/numpy-${VERSION_NUMPY}.tar.gz -C ${PRODUCT_SRC_DIR}
+
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.src.size
+fi
# to generate environment scripts
try_preinstalled
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 <<EOF
-used gcc=$GCC
+used gcc=${GCC}
EOF
-cd ${PRODUCT_SRC_DIR}/lapack-${LAPACK_VERSION}_SRC
+cd ${PRODUCT_SRC_DIR}/lapack-${VERSION_LAPACK}_SRC
check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake . ${CMAKE_OPTIONS}
check_job ${PRODUCT_DIR}/MAKE.LOG make
check_job ${PRODUCT_DIR}/INSTALL.LOG make install
# install numpy
-cd ${PRODUCT_SRC_DIR}/numpy-${NUMPY_VERSION}_SRC
+cd ${PRODUCT_SRC_DIR}/numpy-${VERSION_NUMPY}_SRC
check_job ${PRODUCT_DIR}/MAKE.LOG python setup.py install --prefix=${PRODUCT_DIR}
cd ${PRODUCT_DIR}
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.build.size
+ du -sk ${PRODUCT_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.bin.size
+fi
+
# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then
test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
fi
install_binary()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# create a product directory
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
export INSTALL_PRODUCTS=$7;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="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}
#
# 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
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 <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export OMNIORBDIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export OMNIORB_DIR=\${OMNIORBDIR}
-export PYTHONPATH=\${OMNIORBDIR}/lib:\${OMNIORBDIR}/lib/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
-export PATH=\$OMNIORBDIR/bin:\$PATH
-export LD_LIBRARY_PATH=\$OMNIORBDIR/lib:\$LD_LIBRARY_PATH
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export OMNIORB_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export OMNIORBPY_ROOT_DIR=\${OMNIORB_ROOT_DIR}
+export PYTHONPATH=\${OMNIORB_ROOT_DIR}/lib:\${OMNIORB_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
+export PATH=\${OMNIORB_ROOT_DIR}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${OMNIORB_ROOT_DIR}/lib:\${LD_LIBRARY_PATH}
##
EOF
-#if [ $PROCEDURE != "try_preinstalled" ] && [ -w ${PRODUCT_DIR} ] ; then
-# cat > ${PRODUCT_DIR}/.omniORB.cfg <<EOF
-#InitRef = NameService=corbaname::`hostname`:2810
-#EOF
-#fi
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
}
print_env_src()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
# nothing to do
##
EOF
install_source()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
makedir ${PRODUCT_SRC_DIR}
# unpack
-check_jb tar xfz ${SOURCE_DIR}/omniORB-${OMNIORB_VERSION}.tar.gz -C ${PRODUCT_SRC_DIR}
-check_jb tar xfz ${SOURCE_DIR}/omniORBpy-${OMNIORBPY_VERSION}.tar.gz -C ${PRODUCT_SRC_DIR}
-check_jb tar xfz ${SOURCE_DIR}/omniNotify-${OMNINOTIFY_VERSION}.tar.gz -C ${PRODUCT_SRC_DIR}
+check_jb tar xfz ${SOURCE_DIR}/omniORB-${VERSION_OMNIORB}.tar.gz -C ${PRODUCT_SRC_DIR}
+check_jb tar xfz ${SOURCE_DIR}/omniORBpy-${VERSION_OMNIORBPY}.tar.gz -C ${PRODUCT_SRC_DIR}
+check_jb tar xfz ${SOURCE_DIR}/omniNotify-${VERSION_OMNINOTIFY}.tar.gz -C ${PRODUCT_SRC_DIR}
+# patch for omniNotify for latest gcc compatibility
local patch_omninotify=1
if [ "${patch_omninotify}" = "1" ] ; then
- if [ -f patches/omniNotify-${OMNINOTIFY_VERSION}.patch ] ; then
- cp patches/omniNotify-${OMNINOTIFY_VERSION}.patch ${PRODUCT_SRC_DIR}/omniNotify-${OMNINOTIFY_VERSION}_SRC
- ( cd ${PRODUCT_SRC_DIR}/omniNotify-${OMNINOTIFY_VERSION}_SRC ; patch -p1 < omniNotify-${OMNINOTIFY_VERSION}.patch )
+ if [ -f patches/omniNotify-${VERSION_OMNINOTIFY}.patch ] ; then
+ cp patches/omniNotify-${VERSION_OMNINOTIFY}.patch ${PRODUCT_SRC_DIR}/omniNotify-${VERSION_OMNINOTIFY}_SRC
+ ( cd ${PRODUCT_SRC_DIR}/omniNotify-${VERSION_OMNINOTIFY}_SRC ; patch -p1 < omniNotify-${VERSION_OMNINOTIFY}.patch )
fi
fi
+
+# patch for omniNotify for 64bits platforms
local patch_64bits=1
if [ "${patch_64bits}" = "1" ] ; then
if test `uname -m` = "x86_64" ; then
- if [ -f patches/omniNotify-${OMNINOTIFY_VERSION}-lib64.patch ] ; then
- cp patches/omniNotify-${OMNINOTIFY_VERSION}-lib64.patch ${PRODUCT_SRC_DIR}/omniNotify-${OMNINOTIFY_VERSION}_SRC
- ( cd ${PRODUCT_SRC_DIR}/omniNotify-${OMNINOTIFY_VERSION}_SRC ; patch -p1 < omniNotify-${OMNINOTIFY_VERSION}-lib64.patch )
+ if [ -f patches/omniNotify-${VERSION_OMNINOTIFY}-lib64.patch ] ; then
+ cp patches/omniNotify-${VERSION_OMNINOTIFY}-lib64.patch ${PRODUCT_SRC_DIR}/omniNotify-${VERSION_OMNINOTIFY}_SRC
+ ( cd ${PRODUCT_SRC_DIR}/omniNotify-${VERSION_OMNINOTIFY}_SRC ; patch -p1 < omniNotify-${VERSION_OMNINOTIFY}-lib64.patch )
fi
fi
fi
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.src.size
+fi
+
# to generate environment scripts
try_preinstalled
}
# 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
GCC=`which gcc`
cat >> ${PRODUCT_DIR}/MAKE_OMNIORB.LOG <<EOF
-used gcc=$GCC
+used gcc=${GCC}
EOF
check_job ${PRODUCT_DIR}/MAKE_OMNIORB.LOG make
check_job ${PRODUCT_DIR}/INSTALL_OMNIORB.LOG make install
# install omniORBpy
-cd ${PRODUCT_SRC_DIR}/omniORBpy-${OMNIORBPY_VERSION}_SRC
+cd ${PRODUCT_SRC_DIR}/omniORBpy-${VERSION_OMNIORBPY}_SRC
mkdir build
cd build
GCC=`which gcc`
cat >> ${PRODUCT_DIR}/MAKE_OMNIORBPY.LOG <<EOF
-used gcc=$GCC
+used gcc=${GCC}
EOF
check_job ${PRODUCT_DIR}/MAKE_OMNIORBPY.LOG make
check_job ${PRODUCT_DIR}/INSTALL_OMNIORBPY.LOG make install
-# patch omniORBpy binaries
+# patch omniORBpy binaries : path to Python
local patch_pyfiles=1
if [ "${patch_pyfiles}" = "1" ] ; then
- 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
fi
# install omniNotify
-cd ${PRODUCT_SRC_DIR}/omniNotify-${OMNINOTIFY_VERSION}_SRC
+cd ${PRODUCT_SRC_DIR}/omniNotify-${VERSION_OMNINOTIFY}_SRC
mkdir build
cd build
GCC=`which gcc`
cat >> ${PRODUCT_DIR}/MAKE_OMNINOTIFY.LOG <<EOF
-used gcc=$GCC
+used gcc=${GCC}
EOF
check_job ${PRODUCT_DIR}/MAKE_OMNINOTIFY.LOG make
check_job ${PRODUCT_DIR}/INSTALL_OMNINOTIFY.LOG make install
+cd ${PRODUCT_DIR}
+
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.build.size
+ du -sk ${PRODUCT_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.bin.size
+fi
+
# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then
test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
fi
install_binary()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# create a product directory
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
-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
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}
#
# 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
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export QSCINTILLA_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export LD_LIBRARY_PATH=\${QSCINTILLA_DIR}/lib:\${LD_LIBRARY_PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export QSCINTILLA_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export LD_LIBRARY_PATH=\${QSCINTILLA_ROOT_DIR}/lib:\${LD_LIBRARY_PATH}
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
print_env_src()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
# nothing to do
##
EOF
install_source()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
local patch_build_procedure=1
if [ "${patch_build_procedure}" = "1" ] ; then
# patch installation folder
- cd ${PRODUCT_SRC_DIR}/Qt4Qt5
- sed -e "s%\(target.path[[:space:]]*=[[:space:]]*\).*%\1${PRODUCT_DIR}/lib%g" \
- -e "s%\(header.path[[:space:]]*=[[:space:]]*\).*%\1${PRODUCT_DIR}/include%g" \
- -e "s%\(trans.path[[:space:]]*=[[:space:]]*\).*%\1${PRODUCT_DIR}/translations%g" \
- -e "s%\(qsci.path[[:space:]]*=[[:space:]]*\).*%\1${PRODUCT_DIR}%g" \
- qscintilla.pro > 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
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
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
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
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}