+++ /dev/null
-#!/bin/bash -noprofile
-
-####################################################################################
-# File : hdf5-1.6.3.sh
-# Created : Thu Dec 18 12:01:00 2002
-# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
-# Project : SALOME
-# Module : Installation Wizard
-# Copyright : 2002-2007 CEA
-#
-# This script is the part of the SALOME installation procedure.
-#
-####################################################################################
-
-check_version()
-{
-if [ -z "$HDF5HOME" ]; then
- return 1
-fi
-check_lib_version libhdf5.so.0.0.0 ${HDF5HOME}/lib
-if [ "$?" -ne "0" ]; then
- return 1
-fi
-check_lib_version libhdf5.settings ${HDF5HOME}/lib
-if [ "$?" -eq "0" ]; then
- ver=`grep "HDF5 Version:" ${HDF5HOME}/lib/libhdf5.settings | awk '{print $3}'`
- if [ "$ver" == "1.6.3" ]; then
- return 0
- fi
-fi
-return 1
-}
-
-print_env_bin()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export HDF5HOME=\${INSTALL_ROOT}/${PRODUCT}
-export PATH=\${HDF5HOME}/bin:\$PATH
-export LD_LIBRARY_PATH=\${HDF5HOME}/lib:\${LD_LIBRARY_PATH}
-##
-EOF
-(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-print_env_src()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
-# nothing to do
-##
-EOF
-(test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-try_preinstalled(){
-try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-return $?
-}
-
-install_source()
-{
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
-
-check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_source_and_build()
-{
-# install sources
-install_source
-
-# build sources
-cd ${PRODUCT_DIR}_SRC
-makedir ${PRODUCT_DIR}
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG \
- ./configure --prefix=${PRODUCT_DIR} -disable-debug --enable-production --enable-threadsafe --enable-hdf5v1_2 \
- --enable-stream-vfd --disable-hsizet --with-pthread=/usr/include,/usr/lib
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
-EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make
-check_job ${PRODUCT_DIR}/INSTALL.LOG make install
-
-#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}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
-
-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!
-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
-
-# to generate environment script for sources
-try_preinstalled
-}
-
-export PROCEDURE=$1;
-export INSTALL_WORK=$2;
-export SOURCE_DIR=$3;
-export INSTALL_ROOT=$4;
-export PRODUCT_SEQUENCE=$5;
-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}
-source ./common.sh
-$PROCEDURE
+++ /dev/null
-#!/bin/bash -noprofile
-
-####################################################################################
-# File : med-2.2.3.sh
-# Created : Thu Dec 18 12:01:00 2002
-# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
-# Project : SALOME
-# Module : Installation Wizard
-# Copyright : 2002-2007 CEA
-#
-# This script is the part of the SALOME installation procedure.
-#
-####################################################################################
-
-check_version()
-{
-if [ -z "$MED2HOME" ]; then
- #echo "MED2HOME doesn't set"
- return 1
-fi
-check_lib_version libmed.so.1.0.2 ${MED2HOME}/lib
-if [ "$?" -eq "0" ]; then
- #echo "The product ${PRODUCT} has been already installed on yours system"
- return 0
-fi
-return 1
-}
-
-print_env_bin()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export MED2HOME=\${INSTALL_ROOT}/${PRODUCT}
-export PATH=\${MED2HOME}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${MED2HOME}/lib:\${LD_LIBRARY_PATH}
-##
-EOF
-(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-print_env_src()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
-# nothing to do
-##
-EOF
-(test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-try_preinstalled(){
-try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-return $?
-}
-
-install_source()
-{
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
-
-# unpack
-check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_source_and_build()
-{
-# install sources
-install_source
-
-# build sources
-cd ${PRODUCT_DIR}_SRC
-makedir ${PRODUCT_DIR}
-
-#vsr: provide additional flags for f95 (Mandriva 2006.0, Fedora Core 4)
-is_mandriva=0
-is_fedora=0
-if [ -e /etc/redhat-release ] ; then
- grep -e "Mandriva Linux release 2006.0" /etc/redhat-release > /dev/null
- if [ $? == 0 ] ; then is_mandriva=1 ; fi
- grep -e "Fedora Core release 4" /etc/redhat-release > /dev/null
- if [ $? == 0 ] ; then is_fedora=1 ; fi
-fi
-
-if [ $is_mandriva == 1 ] || [ $is_fedora == 1 ] ; then
- if test `uname -m` = "x86_64" ; then
- echo "`pwd` -> ./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> ${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> ${PRODUCT_DIR}_SRC/errlog
- fi
- if [ "$?" -ne "0" ] ; then
- cat ${PRODUCT_DIR}/CONFIGURE.LOG
- cat ${PRODUCT_DIR}_SRC/errlog >&2
- cat ${PRODUCT_DIR}_SRC/errlog >> ${PRODUCT_DIR}/CONFIGURE.LOG
- exit 1
- fi
-else
- check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR}
-fi
-
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
-EOF
-
-check_job ${PRODUCT_DIR}/MAKE.LOG make
-check_job ${PRODUCT_DIR}/INSTALL.LOG make install
-
-#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
-sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' libmed.la > libmed.la.new
-mv -f libmed.la.new libmed.la
-sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' libmedC.la > libmedC.la.new
-mv -f libmedC.la.new libmedC.la
-tmp=""
-if [ -n "${HDF5HOME}" ]; then
- tmp="-L${HDF5HOME}/lib"
-fi
-sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmed.la > libmed.la.new
-mv -f libmed.la.new libmed.la
-sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmedC.la > libmedC.la.new
-mv -f libmedC.la.new libmedC.la
-
-chmod 755 libmed.la
-chmod 755 libmedC.la
-
-# 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}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
-
-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
-### no need to do this for sources installation because 'make install' does it!
-cd ${PRODUCT_DIR}/lib
-sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmed.la > libmed.la.new
-mv -f libmed.la.new libmed.la
-sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmedC.la > libmedC.la.new
-mv -f libmedC.la.new libmedC.la
-tmp=""
-if [ -n "${HDF5HOME}" ]; then
- tmp="-L${HDF5HOME}/lib"
-fi
-sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmed.la > libmed.la.new
-mv -f libmed.la.new libmed.la
-sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmedC.la > libmedC.la.new
-mv -f libmedC.la.new libmedC.la
-
-chmod 755 libmed.la
-chmod 755 libmedC.la
-
-### modify scripts to correct installation path
-cd ${PRODUCT_DIR}/bin
-sed -e "s%set cmd \".*/bin/mdump\"%set cmd \"${PRODUCT_DIR}/bin/mdump\"%g" xmdump > _xmdump
-mv _xmdump xmdump
-chmod a+x xmdump
-
-# to generate environment script for sources
-try_preinstalled
-}
-
-export PROCEDURE=$1;
-export INSTALL_WORK=$2;
-export SOURCE_DIR=$3;
-export INSTALL_ROOT=$4;
-export PRODUCT_SEQUENCE=$5;
-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}/${PRODUCT}
-source ./common.sh
-$PROCEDURE
--- /dev/null
+#!/bin/bash -noprofile
+
+####################################################################################
+# File : med-2.3.1.sh
+# Created : Thu Dec 18 12:01:00 2002
+# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
+# Project : SALOME
+# Module : Installation Wizard
+# Copyright : 2002-2007 CEA
+#
+# This script is the part of the SALOME installation procedure.
+#
+####################################################################################
+
+check_version()
+{
+if [ -z "$MED2HOME" ]; then
+ #echo "MED2HOME doesn't set"
+ return 1
+fi
+check_lib_version libmed.so.1.0.2 ${MED2HOME}/lib
+if [ "$?" -eq "0" ]; then
+ #echo "The product ${PRODUCT} has been already installed on yours system"
+ return 0
+fi
+return 1
+}
+
+print_env_bin()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export MED2HOME=\${INSTALL_ROOT}/${PRODUCT}
+export PATH=\${MED2HOME}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${MED2HOME}/lib:\${LD_LIBRARY_PATH}
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+print_env_src()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
+#$DELIM ${PRODUCT_TYPE}_src $DELIM
+# nothing to do
+##
+EOF
+(test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+return $?
+}
+
+install_source()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+source ${INSTALL_WORK}/$SHRC
+
+# unpack
+check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_source_and_build()
+{
+# install sources
+install_source
+
+# build sources
+cd ${PRODUCT_DIR}_SRC
+makedir ${PRODUCT_DIR}
+
+#vsr: provide additional flags for f95 (Mandriva 2006.0, Fedora Core 4)
+is_mandriva=0
+is_mandriva2007=0
+is_fedora=0
+if [ -e /etc/redhat-release ] ; then
+ grep -e "Mandriva Linux release 2006.0" /etc/redhat-release > /dev/null
+ if [ $? == 0 ] ; then is_mandriva=1 ; fi
+ grep -e "Mandriva Linux release 2007.0" /etc/redhat-release > /dev/null
+ if [ $? == 0 ] ; then is_mandriva2007=1 ; fi
+ grep -e "Fedora Core release 4" /etc/redhat-release > /dev/null
+ if [ $? == 0 ] ; then is_fedora=1 ; fi
+fi
+if [ $is_mandriva2007 == 1 ] ; then
+chmod +w ./Makefile.am
+mv Makefile.am Makefile.am.orig
+sed -e 's/ include src tests tools doc / include src tools doc /g' Makefile.am.orig > Makefile.am
+fi
+if [ $is_mandriva == 1 ] || [ $is_mandriva2007 == 1 ] || [ $is_fedora == 1 ] ; then
+ if test `uname -m` = "x86_64" ; then
+ echo "`pwd` -> ./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> ${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> ${PRODUCT_DIR}_SRC/errlog
+ fi
+ if [ "$?" -ne "0" ] ; then
+ cat ${PRODUCT_DIR}/CONFIGURE.LOG
+ cat ${PRODUCT_DIR}_SRC/errlog >&2
+ cat ${PRODUCT_DIR}_SRC/errlog >> ${PRODUCT_DIR}/CONFIGURE.LOG
+ exit 1
+ fi
+else
+ check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR}
+fi
+
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
+used gcc=$GCC
+EOF
+
+check_job ${PRODUCT_DIR}/MAKE.LOG make
+check_job ${PRODUCT_DIR}/INSTALL.LOG make install
+
+#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}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+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
+### no need to do this for sources installation because 'make install' does it!
+cd ${PRODUCT_DIR}/lib
+sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmed.la > libmed.la.new
+mv -f libmed.la.new libmed.la
+sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmedC.la > libmedC.la.new
+mv -f libmedC.la.new libmedC.la
+tmp=""
+if [ -n "${HDF5HOME}" ]; then
+ tmp="-L${HDF5HOME}/lib"
+fi
+sed -e "s%\(-L[^[:space:]]*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)%$tmp %g" libmed.la > libmed.la.new
+mv -f libmed.la.new libmed.la
+sed -e "s%\(-L[^[:space:]]*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)%$tmp %g" libmedC.la > libmedC.la.new
+mv -f libmedC.la.new libmedC.la
+
+chmod 755 libmed.la
+chmod 755 libmedC.la
+
+### modify scripts to correct installation path
+cd ${PRODUCT_DIR}/bin
+sed -e "s%set cmd \".*/bin/mdump\"%set cmd \"${PRODUCT_DIR}/bin/mdump\"%g" xmdump > _xmdump
+mv _xmdump xmdump
+chmod a+x xmdump
+
+# to generate environment script for sources
+try_preinstalled
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INSTALL_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+export PRODUCT_TYPE=$6;
+export INSTALL_PRODUCTS=$7;
+shift
+REMOVE_SRC_TMP=$8;
+export PRODUCT="med-2.3.1"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+$PROCEDURE
+++ /dev/null
-#!/bin/bash -noprofile
-
-####################################################################################
-# File : qt-3.3.3.sh
-# Created : Thu Dec 18 12:01:00 2002
-# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
-# Project : SALOME
-# Module : Installation Wizard
-# Copyright : 2002-2007 CEA
-#
-# This script is the part of the SALOME installation procedure.
-#
-####################################################################################
-
-check_version(){
-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
-fi
-return 1
-}
-
-print_env_bin()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export QTDIR=\${INSTALL_ROOT}/${PRODUCT}
-export PATH=\${QTDIR}/bin:\$PATH
-export LD_LIBRARY_PATH=\${QTDIR}/lib:\${LD_LIBRARY_PATH}
-##
-EOF
-(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-print_env_src()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
-# nothing to do
-##
-EOF
-(test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-try_preinstalled(){
-try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-return $?
-}
-
-install_source()
-{
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
-
-check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_source_and_build()
-{
-# install sources
-install_source
-
-# build sources
-makedir ${PRODUCT_DIR}
-
-# apply patch : fix pb of libGL loading
-if [ -f patches/qt-3.3.3-load-gl.patch ] ; then
- cp patches/qt-3.3.3-load-gl.patch ${PRODUCT_DIR}_SRC
- ( cd ${PRODUCT_DIR}_SRC ; patch -p1 < qt-3.3.3-load-gl.patch )
- patched_for_gl="yes"
-fi
-
-cd ${PRODUCT_DIR}_SRC
-
-mv -f configure configure-orig
-sed -e "s%read acceptance%acceptance=yes%" configure-orig > configure
-chmod +x configure
-
-export QTDIR=${PRODUCT_DIR}_SRC
-export LD_LIBRARY_PATH=${QTDIR}/lib:$LD_LIBRARY_PATH
-
-# basic flags
-QT_FLAGS="-release -thread -shared -qt-gif -platform linux-g++"
-# use system graphics libraries
-QT_FLAGS=$QT_FLAGS" -system-libjpeg -system-libpng -system-libmng -qt-imgfmt-jpeg -qt-imgfmt-png -qt-imgfmt-mng -lpng -lmng -ljpeg"
-# use all plugin styles except -plugin-style-windows
-QT_FLAGS=$QT_FLAGS" -plugin-style-cde -plugin-style-compact -plugin-style-motif -plugin-style-motifplus -plugin-style-platinum -plugin-style-sgi"
-
-# add -dlopen-opengl flag (ONLY if the corresponding patch was applied)
-if [ "$patched_for_gl" == "yes" ] ; then
- QT_FLAGS=$QT_FLAGS" -dlopen-opengl"
-fi
-
-# configure
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure $QT_FLAGS -prefix ${PRODUCT_DIR}
-
-sed -e "s%^all: symlinks src-qmake src-moc sub-src sub-tools sub-tutorial sub-examples%all: symlinks src-qmake src-moc sub-src sub-tools%g" Makefile > _Makefile
-mv -f _Makefile Makefile
-
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
-EOF
-# small trick: INSTALL_ROOT is used inside qt-3.3.3 installation
-# so it should be set to empty string
-export INSTALL_ROOT_BACKUP=$INSTALL_ROOT
-export INSTALL_ROOT=""
-check_job ${PRODUCT_DIR}/MAKE.LOG make
-check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
-export INSTALL_ROOT=$INSTALL_ROOT_BACKUP
-
-for b in `find bin -mindepth 1 -maxdepth 1 -name "*"`; do
- b=`basename $b`;
- if [ ! -e ${PRODUCT_DIR}/bin/$b ] || [ -h ${PRODUCT_DIR}/bin/$b ]; then
- if [ -h ${PRODUCT_DIR}/bin/$b ]; then
- rm -f ${PRODUCT_DIR}/bin/$b
- fi
- cp -f ${PRODUCT_DIR}_SRC/bin/$b ${PRODUCT_DIR}/bin/$b
- fi
-done
-
-# modify libGL.so flags
-has_gl_dep=`grep -E "^dependency_libs=.*-lGL.*" ${PRODUCT_DIR}/lib/libqt-mt.la`
-gllibdir="`where_gl_libs`"
-if [ "$has_gl_dep" != "" ] && [ "$gllibdir" != "" ] ; then
- sed -e "s%-lGL%%g" \
- -e "s%^dependency_libs='\(.*\)%dependency_libs='-L$gllibdir -lGL \1%g" \
- ${PRODUCT_DIR}/lib/libqt-mt.la > ${PRODUCT_DIR}/lib/libqt-mt.la.new
- mv -f ${PRODUCT_DIR}/lib/libqt-mt.la.new ${PRODUCT_DIR}/lib/libqt-mt.la
-fi
-
-#rm -rf ${PRODUCT_DIR}/doc
-
-#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}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
-
-check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
-
-cd ${PRODUCT_DIR}/lib
-
-# modify libdir
-sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libqt-mt.la > libqt-mt.la.new
-mv -f libqt-mt.la.new libqt-mt.la
-
-# modify libGL.so flags
-has_gl_dep=`grep -E "^dependency_libs=.*-lGL.*" libqt-mt.la`
-gllibdir="`where_gl_libs`"
-if [ "$has_gl_dep" != "" ] && [ "$gllibdir" != "" ] ; then
- sed -e "s%-lGL%%g" \
- -e "s%^dependency_libs='\(.*\)%dependency_libs='-L$gllibdir -lGL \1%g" \
- libqt-mt.la > libqt-mt.la.new
- mv -f libqt-mt.la.new libqt-mt.la
-fi
-
-# modify qt package config
-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
-
-# to generate environment scripts
-try_preinstalled
-}
-
-export PROCEDURE=$1;
-export INSTALL_WORK=$2;
-export SOURCE_DIR=$3;
-export INSTALL_ROOT=$4;
-export PRODUCT_SEQUENCE=$5;
-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}
-source ./common.sh
-$PROCEDURE
+++ /dev/null
-#!/bin/bash -noprofile
-
-####################################################################################
-# File : qt-3.3.4.sh
-# Created : Thu Dec 18 12:01:00 2002
-# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
-# Project : SALOME
-# Module : Installation Wizard
-# Copyright : 2002-2007 CEA
-#
-# This script is the part of the SALOME installation procedure.
-#
-####################################################################################
-
-check_version(){
-if [ -z "$QTDIR" ]; 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.4" ] ; then
- return 0
-fi
-return 1
-}
-
-print_env_bin()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export QTDIR=\${INSTALL_ROOT}/${PRODUCT}
-export PATH=\${QTDIR}/bin:\$PATH
-export LD_LIBRARY_PATH=\${QTDIR}/lib:\${LD_LIBRARY_PATH}
-##
-EOF
-(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-print_env_src()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
-# nothing to do
-##
-EOF
-(test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-try_preinstalled(){
-try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-return $?
-}
-
-install_source()
-{
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
-
-check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_source_and_build()
-{
-# install sources
-install_source
-
-# build sources
-makedir ${PRODUCT_DIR}
-
-# apply patch : fix pb of libGL loading
-if [ -f patches/qt-3.3.3-load-gl.patch ] ; then
- cp patches/qt-3.3.3-load-gl.patch ${PRODUCT_DIR}_SRC
- ( cd ${PRODUCT_DIR}_SRC ; patch -p1 < qt-3.3.3-load-gl.patch )
- patched_for_gl="yes"
-fi
-
-# apply patch for 64-bit platforms
-if test `uname -m` = "x86_64" ; then
- if [ -f patches/qt-3.3.4-lib64.patch ] ; then
- cp patches/qt-3.3.4-lib64.patch ${PRODUCT_DIR}_SRC
- ( cd ${PRODUCT_DIR}_SRC ; patch -p1 < qt-3.3.4-lib64.patch )
- fi
-fi
-
-cd ${PRODUCT_DIR}_SRC
-
-mv -f configure configure-orig
-sed -e "s%read acceptance%acceptance=yes%" configure-orig > configure
-chmod +x configure
-
-export QTDIR=${PRODUCT_DIR}_SRC
-export LD_LIBRARY_PATH=${QTDIR}/lib:$LD_LIBRARY_PATH
-
-# basic flags
- if test `uname -m` = "x86_64" ; then
- QT_FLAGS="-release -thread -shared -qt-gif -platform linux-g++-64"
- else
- QT_FLAGS="-release -thread -shared -qt-gif -platform linux-g++"
- fi
-# use system graphics libraries
-QT_FLAGS=$QT_FLAGS" -system-libjpeg -system-libpng -system-libmng -qt-imgfmt-jpeg -qt-imgfmt-png -qt-imgfmt-mng -lpng -lmng -ljpeg"
-
-# add -dlopen-opengl flag (ONLY if the corresponding patch was applied)
-if [ "$patched_for_gl" == "yes" ] ; then
- QT_FLAGS=$QT_FLAGS" -dlopen-opengl"
-fi
-
-# plugins
-if [ -e /etc/mandriva-release ] ; then
- version=`cat /etc/mandriva-release | awk '{print $1$4}'`
- if [ "$version" == "Mandriva2006.0" ] ; then
- QT_FLAGS=$QT_FLAGS" -plugin-style-cde -plugin-style-compact -plugin-style-motif -plugin-style-motifplus -plugin-style-platinum -plugin-style-sgi"
- fi
-fi
-
-# configure
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure $QT_FLAGS -prefix ${PRODUCT_DIR}
-
-sed -e "s%^all: symlinks src-qmake src-moc sub-src sub-tools sub-tutorial sub-examples%all: symlinks src-qmake src-moc sub-src sub-tools%g" Makefile > _Makefile
-mv -f _Makefile Makefile
-
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
-EOF
-# small trick: INSTALL_ROOT is used inside qt-3.3.3 installation
-# so it should be set to empty string
-export INSTALL_ROOT_BACKUP=$INSTALL_ROOT
-export INSTALL_ROOT=""
-check_job ${PRODUCT_DIR}/MAKE.LOG make
-check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
-
-if test `uname -m` = "x86_64" ; then
- cd ${PRODUCT_DIR}; ln -sf lib lib64
-fi
-
-export INSTALL_ROOT=$INSTALL_ROOT_BACKUP
-
-for b in `find bin -mindepth 1 -maxdepth 1 -name "*"`; do
- b=`basename $b`;
- if [ ! -e ${PRODUCT_DIR}/bin/$b ] || [ -h ${PRODUCT_DIR}/bin/$b ]; then
- if [ -h ${PRODUCT_DIR}/bin/$b ]; then
- rm -f ${PRODUCT_DIR}/bin/$b
- fi
- cp -f ${PRODUCT_DIR}_SRC/bin/$b ${PRODUCT_DIR}/bin/$b
- fi
-done
-
-# modify libGL.so flags
-has_gl_dep=`grep -E "^dependency_libs=.*-lGL.*" ${PRODUCT_DIR}/lib/libqt-mt.la`
-gllibdir="`where_gl_libs`"
-if [ "$has_gl_dep" != "" ] && [ "$gllibdir" != "" ] ; then
- sed -e "s%-lGL%%g" \
- -e "s%^dependency_libs='\(.*\)%dependency_libs='-L$gllibdir -lGL \1%g" \
- ${PRODUCT_DIR}/lib/libqt-mt.la > ${PRODUCT_DIR}/lib/libqt-mt.la.new
- mv -f ${PRODUCT_DIR}/lib/libqt-mt.la.new ${PRODUCT_DIR}/lib/libqt-mt.la
-fi
-
-#rm -rf ${PRODUCT_DIR}/doc
-
-#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}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
-
-check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
-
-# modify libdir
-cd ${PRODUCT_DIR}/lib
-sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libqt-mt.la > libqt-mt.la.new
-mv -f libqt-mt.la.new libqt-mt.la
-
-# modify libGL.so flags
-has_gl_dep=`grep -E "^dependency_libs=.*-lGL.*" libqt-mt.la`
-gllibdir="`where_gl_libs`"
-if [ "$has_gl_dep" != "" ] && [ "$gllibdir" != "" ] ; then
- sed -e "s%-lGL%%g" \
- -e "s%^dependency_libs='\(.*\)%dependency_libs='-L$gllibdir -lGL \1%g" \
- libqt-mt.la > libqt-mt.la.new
- mv -f libqt-mt.la.new libqt-mt.la
-fi
-
-# modify qt package config
-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
-
-# to generate environment scripts
-try_preinstalled
-}
-
-export PROCEDURE=$1;
-export INSTALL_WORK=$2;
-export SOURCE_DIR=$3;
-export INSTALL_ROOT=$4;
-export PRODUCT_SEQUENCE=$5;
-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}
-source ./common.sh
-$PROCEDURE
--- /dev/null
+#!/bin/bash -noprofile
+
+####################################################################################
+# File : qt-3.3.8.sh
+# Created : Thu Dec 18 12:01:00 2002
+# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
+# Project : SALOME
+# Module : Installation Wizard
+# Copyright : 2002-2007 CEA
+#
+# This script is the part of the SALOME installation procedure.
+#
+####################################################################################
+
+check_version(){
+if [ -z "$QTDIR" ]; 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.8" ] ; then
+ return 0
+fi
+return 1
+}
+
+print_env_bin()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export QTDIR=\${INSTALL_ROOT}/${PRODUCT}
+export PATH=\${QTDIR}/bin:\$PATH
+export LD_LIBRARY_PATH=\${QTDIR}/lib:\${LD_LIBRARY_PATH}
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+print_env_src()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
+#$DELIM ${PRODUCT_TYPE}_src $DELIM
+# nothing to do
+##
+EOF
+(test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+return $?
+}
+
+install_source()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_source_and_build()
+{
+# install sources
+install_source
+
+# build sources
+makedir ${PRODUCT_DIR}
+
+cd ${PRODUCT_DIR}_SRC
+
+mv -f configure configure-orig
+sed -e "s%read acceptance%acceptance=yes%" configure-orig > configure
+chmod +x configure
+
+export QTDIR=${PRODUCT_DIR}_SRC
+export LD_LIBRARY_PATH=${QTDIR}/lib:$LD_LIBRARY_PATH
+
+# basic flags
+ if test `uname -m` = "x86_64" ; then
+ QT_FLAGS="-release -thread -shared -qt-gif -platform linux-g++-64"
+ else
+ QT_FLAGS="-release -thread -shared -qt-gif -platform linux-g++"
+ fi
+# use system graphics libraries
+QT_FLAGS=$QT_FLAGS" -system-libjpeg -system-libpng -system-libmng -qt-imgfmt-jpeg -qt-imgfmt-png -qt-imgfmt-mng -lpng -lmng -ljpeg"
+
+# add -dlopen-opengl flag (ONLY if the corresponding patch was applied)
+if [ "$patched_for_gl" == "yes" ] ; then
+ QT_FLAGS=$QT_FLAGS" -dlopen-opengl"
+fi
+
+# plugins
+if [ -e /etc/mandriva-release ] ; then
+ version=`cat /etc/mandriva-release | awk '{print $1$4}'`
+ if [ "$version" == "Mandriva2006.0" ] ; then
+ QT_FLAGS=$QT_FLAGS" -plugin-style-cde -plugin-style-compact -plugin-style-motif -plugin-style-motifplus -plugin-style-platinum -plugin-style-sgi"
+ fi
+fi
+
+# configure
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure $QT_FLAGS -prefix ${PRODUCT_DIR}
+
+sed -e "s%^all: symlinks src-qmake src-moc sub-src sub-tools sub-tutorial sub-examples%all: symlinks src-qmake src-moc sub-src sub-tools%g" Makefile > _Makefile
+mv -f _Makefile Makefile
+
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
+used gcc=$GCC
+EOF
+# small trick: INSTALL_ROOT is used inside qt-3.3.3 installation
+# so it should be set to empty string
+export INSTALL_ROOT_BACKUP=$INSTALL_ROOT
+export INSTALL_ROOT=""
+check_job ${PRODUCT_DIR}/MAKE.LOG make
+check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
+
+if test `uname -m` = "x86_64" ; then
+ cd ${PRODUCT_DIR}; ln -sf lib lib64
+fi
+
+export INSTALL_ROOT=$INSTALL_ROOT_BACKUP
+
+for b in `find bin -mindepth 1 -maxdepth 1 -name "*"`; do
+ b=`basename $b`;
+ if [ ! -e ${PRODUCT_DIR}/bin/$b ] || [ -h ${PRODUCT_DIR}/bin/$b ]; then
+ if [ -h ${PRODUCT_DIR}/bin/$b ]; then
+ rm -f ${PRODUCT_DIR}/bin/$b
+ fi
+ cp -f ${PRODUCT_DIR}_SRC/bin/$b ${PRODUCT_DIR}/bin/$b
+ fi
+done
+
+# modify libGL.so flags
+has_gl_dep=`grep -E "^dependency_libs=.*-lGL.*" ${PRODUCT_DIR}/lib/libqt-mt.la`
+gllibdir="`where_gl_libs`"
+if [ "$has_gl_dep" != "" ] && [ "$gllibdir" != "" ] ; then
+ sed -e "s%-lGL%%g" \
+ -e "s%^dependency_libs='\(.*\)%dependency_libs='-L$gllibdir -lGL \1%g" \
+ ${PRODUCT_DIR}/lib/libqt-mt.la > ${PRODUCT_DIR}/lib/libqt-mt.la.new
+ mv -f ${PRODUCT_DIR}/lib/libqt-mt.la.new ${PRODUCT_DIR}/lib/libqt-mt.la
+fi
+
+#rm -rf ${PRODUCT_DIR}/doc
+
+#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}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
+
+# modify libdir
+cd ${PRODUCT_DIR}/lib
+sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libqt-mt.la > libqt-mt.la.new
+mv -f libqt-mt.la.new libqt-mt.la
+
+# modify libGL.so flags
+has_gl_dep=`grep -E "^dependency_libs=.*-lGL.*" libqt-mt.la`
+gllibdir="`where_gl_libs`"
+if [ "$has_gl_dep" != "" ] && [ "$gllibdir" != "" ] ; then
+ sed -e "s%-lGL%%g" \
+ -e "s%^dependency_libs='\(.*\)%dependency_libs='-L$gllibdir -lGL \1%g" \
+ libqt-mt.la > libqt-mt.la.new
+ mv -f libqt-mt.la.new libqt-mt.la
+fi
+
+# modify qt package config
+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
+
+# to generate environment scripts
+try_preinstalled
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INSTALL_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+export PRODUCT_TYPE=$6;
+export INSTALL_PRODUCTS=$7;
+shift
+REMOVE_SRC_TMP=$8;
+export PRODUCT="qt-3.3.8"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+$PROCEDURE