version="4.0"
disable="false"
installdiskspace="2856,2184,7064"
- script="metis-4.0.sh"/>
+ script="metis.sh"/>
</product>
<product name="Scotch"
type="prerequisite"
description="Software package and library devoted to static mapping, partitioning and sparce matrix block ordering og graph and meshes">
<installation os="CentOS 5.5 64bit"
- version="5.1.11"
+ version="5.1.12b"
disable="false"
installdiskspace="4296,5644,14388"
- script="scotch-5.1.11.sh"/>
+ script="scotch.sh"/>
</product>
<product name="ParaView"
type="prerequisite"
version="4.0"
disable="false"
installdiskspace="2856,2184,7064"
- script="metis-4.0.sh"/>
+ script="metis.sh"/>
</product>
<product name="Scotch"
type="prerequisite"
description="Software package and library devoted to static mapping, partitioning and sparce matrix block ordering og graph and meshes">
<installation os="Debian 4.0"
- version="5.1.11"
+ version="5.1.12b"
disable="false"
installdiskspace="4296,5644,14388"
- script="scotch-5.1.11.sh"/>
+ script="scotch.sh"/>
</product>
<product name="ParaView"
type="prerequisite"
version="4.0"
disable="false"
installdiskspace="2856,2184,7064"
- script="metis-4.0.sh"/>
+ script="metis.sh"/>
</product>
<product name="Scotch"
type="prerequisite"
description="Software package and library devoted to static mapping, partitioning and sparce matrix block ordering og graph and meshes">
<installation os="Debian 4.0 64bit"
- version="5.1.11"
+ version="5.1.12b"
disable="false"
installdiskspace="4296,5644,14388"
- script="scotch-5.1.11.sh"/>
+ script="scotch.sh"/>
</product>
<product name="ParaView"
type="prerequisite"
version="4.0"
disable="false"
installdiskspace="2856,2184,7064"
- script="metis-4.0.sh"/>
+ script="metis.sh"/>
</product>
<product name="Scotch"
type="prerequisite"
description="Software package and library devoted to static mapping, partitioning and sparce matrix block ordering og graph and meshes">
<installation os="Debian 5.0 64bit"
- version="5.1.11"
+ version="5.1.12b"
disable="false"
installdiskspace="4296,5644,14388"
- script="scotch-5.1.11.sh"/>
+ script="scotch.sh"/>
</product>
<product name="ParaView"
type="prerequisite"
version="4.0"
disable="false"
installdiskspace="2856,2184,7064"
- script="metis-4.0.sh"/>
+ script="metis.sh"/>
</product>
<product name="Scotch"
type="prerequisite"
description="Software package and library devoted to static mapping, partitioning and sparce matrix block ordering og graph and meshes">
<installation os="Debian 6.0 64bit"
- version="5.1.11"
+ version="5.1.12b"
disable="false"
installdiskspace="4296,5644,14388"
- script="scotch-5.1.11.sh"/>
+ script="scotch.sh"/>
</product>
<product name="ParaView"
type="prerequisite"
version="4.0"
disable="false"
installdiskspace="2856,2184,7064"
- script="metis-4.0.sh"/>
+ script="metis.sh"/>
</product>
<product name="Scotch"
type="prerequisite"
description="Software package and library devoted to static mapping, partitioning and sparce matrix block ordering og graph and meshes">
<installation os="Mandriva 2008.0"
- version="5.1.11"
+ version="5.1.12b"
disable="false"
installdiskspace="4296,5644,14388"
- script="scotch-5.1.11.sh"/>
+ script="scotch.sh"/>
</product>
<product name="ParaView"
type="prerequisite"
version="4.0"
disable="false"
installdiskspace="2856,2184,7064"
- script="metis-4.0.sh"/>
+ script="metis.sh"/>
</product>
<product name="Scotch"
type="prerequisite"
description="Software package and library devoted to static mapping, partitioning and sparce matrix block ordering og graph and meshes">
<installation os="Mandriva 2008.0 64bit"
- version="5.1.11"
+ version="5.1.12b"
disable="false"
installdiskspace="4296,5644,14388"
- script="scotch-5.1.11.sh"/>
+ script="scotch.sh"/>
</product>
<product name="ParaView"
type="prerequisite"
version="4.0"
disable="false"
installdiskspace="2856,2184,7064"
- script="metis-4.0.sh"/>
+ script="metis.sh"/>
</product>
<product name="Scotch"
type="prerequisite"
description="Software package and library devoted to static mapping, partitioning and sparce matrix block ordering og graph and meshes">
<installation os="Mandriva 2010.0"
- version="5.1.11"
+ version="5.1.12b"
disable="false"
installdiskspace="4296,5644,14388"
- script="scotch-5.1.11.sh"/>
+ script="scotch.sh"/>
</product>
<product name="ParaView"
type="prerequisite"
version="4.0"
disable="false"
installdiskspace="2856,2184,7064"
- script="metis-4.0.sh"/>
+ script="metis.sh"/>
</product>
<product name="Scotch"
type="prerequisite"
description="Software package and library devoted to static mapping, partitioning and sparce matrix block ordering og graph and meshes">
<installation os="Mandriva 2010.0 64bit"
- version="5.1.11"
+ version="5.1.12b"
disable="false"
installdiskspace="4296,5644,14388"
- script="scotch-5.1.11.sh"/>
+ script="scotch.sh"/>
</product>
<product name="ParaView"
type="prerequisite"
version="4.0"
disable="false"
installdiskspace="2856,2184,7064"
- script="metis-4.0.sh"/>
+ script="metis.sh"/>
</product>
<product name="Scotch"
type="prerequisite"
description="Software package and library devoted to static mapping, partitioning and sparce matrix block ordering og graph and meshes">
<installation os="Red Hat Enterprise WS 4 64bit"
- version="5.1.11"
+ version="5.1.12b"
disable="false"
installdiskspace="4296,5644,14388"
- script="scotch-5.1.11.sh"/>
+ script="scotch.sh"/>
</product>
<product name="ParaView"
type="prerequisite"
version="4.0"
disable="false"
installdiskspace="2856,2184,7064"
- script="metis-4.0.sh"/>
+ script="metis.sh"/>
</product>
<product name="Scotch"
type="prerequisite"
description="Software package and library devoted to static mapping, partitioning and sparce matrix block ordering og graph and meshes">
<installation os="Scientific SL 5.1 64bit"
- version="5.1.11"
+ version="5.1.12b"
disable="false"
installdiskspace="4296,5644,14388"
- script="scotch-5.1.11.sh"/>
+ script="scotch.sh"/>
</product>
<product name="ParaView"
type="prerequisite"
+++ /dev/null
-#!/bin/bash -noprofile
-
-####################################################################################
-# File : metis-4.0.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-2008 CEA
-#
-# This script is the part of the SALOME installation procedure.
-#
-####################################################################################
-
-check_version(){
-# No way to check version!
-return 0
-}
-
-print_env_bin()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export METISDIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-##
-EOF
-(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
-# nothing to do
-##
-EOF
-(test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-try_preinstalled(){
-try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-try_existing ${PRODUCT_SRC_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-return $?
-}
-
-install_source()
-{
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
-
-check_jb tar xfz ${SRC_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_source_and_build()
-{
-# install sources
-install_source
-
-# build sources
-cd ${PRODUCT_SRC_DIR}
-test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-
-# patch for 64bit platforms
-if test `uname -m` = "x86_64" ; then
- sed -e "s%COPTIONS[[:space:]]*=[[:space:]]*\(.*\)%COPTIONS = -fPIC \1%g" Makefile.in > Makefile.in.new
- mv Makefile.in.new Makefile.in
-fi
-
-# make
-check_job ${PRODUCT_DIR}/MAKE.LOG make
-
-# install
-cp -rf Doc Graphs libmetis.a pmetis kmetis oemetis onmetis partdmesh partnmesh mesh2dual mesh2nodal graphchk ${PRODUCT_DIR}
-( mkdir -p ${PRODUCT_DIR}/Lib && cp Lib/*.h ${PRODUCT_DIR}/Lib )
-
-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
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_binary()
-{
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
-
-# create a product directory
-test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-
-check_jb tar xfz ${BIN_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
-
-# to generate environment scripts
-try_preinstalled
-}
-
-export PROCEDURE=$1;
-export INSTALL_WORK=$2;
-export SOURCE_DIR=$3;
-export INST_ROOT=$4;
-export PRODUCT_SEQUENCE=$5;
-export PRODUCT_TYPE=$6;
-export INSTALL_PRODUCTS=$7;
-SRC_DIR=$8;
-REMOVE_SRC_TMP=$9;
-shift
-BIN_DIR=$9;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="metis-4.0"
-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
--- /dev/null
+#!/bin/bash -noprofile
+
+####################################################################################
+# File : metis.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-2012 CEA
+#
+# This script is the part of the SALOME installation procedure.
+#
+####################################################################################
+
+#
+# metis version
+#
+METIS_VERSION=4.0
+# 5.0.2
+METIS_MAJOR_VERSION=`echo ${METIS_VERSION} | awk -F. '{print $1}'`
+
+check_version(){
+# No way to check version!
+return 0
+}
+
+print_env_bin()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export METISDIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+##
+EOF
+(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
+# nothing to do
+##
+EOF
+(test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+try_existing ${PRODUCT_SRC_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+return $?
+}
+
+install_source()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_source_and_build()
+{
+# install sources
+install_source
+
+# build sources
+cd ${PRODUCT_SRC_DIR}
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+if [ "${METIS_MAJOR_VERSION}" == "5" ] ; then
+ # for version 5
+
+ # make config
+ check_job ${PRODUCT_DIR}/MAKE_CONFIG.LOG make config shared=1 prefix=${PRODUCT_DIR}
+
+ # make
+ check_job ${PRODUCT_DIR}/MAKE.LOG make
+
+ # make install
+ check_job ${PRODUCT_DIR}/MAKE_INSTALL.LOG make install
+else
+ # for version 4
+
+ # patch for 64bit platforms
+ if test `uname -m` = "x86_64" ; then
+ sed -i "s%COPTIONS[[:space:]]*=[[:space:]]*\(.*\)%COPTIONS = -fPIC \1%g" Makefile.in
+ fi
+
+ # make
+ check_job ${PRODUCT_DIR}/MAKE.LOG make
+
+ # install
+ cp -rf Doc Graphs libmetis.a pmetis kmetis oemetis onmetis partdmesh partnmesh mesh2dual mesh2nodal graphchk ${PRODUCT_DIR}
+ ( mkdir -p ${PRODUCT_DIR}/Lib && cp Lib/*.h ${PRODUCT_DIR}/Lib )
+fi
+
+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
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_binary()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+# create a product directory
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+check_jb tar xfz ${BIN_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
+
+# to generate environment scripts
+try_preinstalled
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INST_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+export PRODUCT_TYPE=$6;
+export INSTALL_PRODUCTS=$7;
+shift
+REMOVE_SRC_TMP=$8;
+test $# == 10 && shift && SINGLE_DIR=$9
+export PRODUCT="metis-${METIS_VERSION}"
+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
+++ /dev/null
-#!/bin/bash -noprofile
-
-####################################################################################
-# File : scotch-5.1.11.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-2008 CEA
-#
-# This script is the part of the SALOME installation procedure.
-#
-####################################################################################
-
-check_version(){
-# No way to check version!
-return 0
-}
-
-print_env_bin()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export SCOTCHDIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-##
-EOF
-(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
-# nothing to do
-##
-EOF
-(test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-try_preinstalled(){
-try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-try_existing ${PRODUCT_SRC_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-return $?
-}
-
-install_source()
-{
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
-
-check_jb tar xfz ${SRC_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_source_and_build()
-{
-# install sources
-install_source
-
-# build sources
-cd ${PRODUCT_SRC_DIR}
-test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-
-cd src
-
-# create Makefile for Linux 64bit platforms
-if test `uname -m` = "x86_64" ; then
- sed -e "s%CFLAGS\([[:space:]]*\)=\([[:space:]]*\)\(.*\)%CFLAGS\1=\2-fPIC \3%g" \
- Make.inc/Makefile.inc.i686_pc_linux2.prof > Make.inc/Makefile.inc.x86_64_pc_linux2.prof
- ln -sf Make.inc/Makefile.inc.x86_64_pc_linux2.prof Makefile.inc
-else
- ln -sf Make.inc/Makefile.inc.i686_pc_linux2.prof Makefile.inc
-fi
-
-sed -e "s%gmake%make%" Makefile.inc > _Makefile.inc
-mv -f _Makefile.inc Makefile.inc
-chmod a+x Makefile.inc
-
-chmod +w ./Makefile
-sed -i 's/\/usr\/local/\$\(PRODUCT_DIR\)/g' ./Makefile
-
-# make
-check_job ${PRODUCT_DIR}/MAKE.LOG make
-
-# make install
-check_job ${PRODUCT_DIR}/INSTALL.LOG make install
-
-# install
-#cd ${PRODUCT_SRC_DIR}
-#cp -rf bin doc grf tgt ${PRODUCT_DIR}
-
-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
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_binary()
-{
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
-
-# create a product directory
-test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-
-check_jb tar xfz ${BIN_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
-
-# to generate environment scripts
-try_preinstalled
-}
-
-export PROCEDURE=$1;
-export INSTALL_WORK=$2;
-export SOURCE_DIR=$3;
-export INST_ROOT=$4;
-export PRODUCT_SEQUENCE=$5;
-export PRODUCT_TYPE=$6;
-export INSTALL_PRODUCTS=$7;
-SRC_DIR=$8;
-REMOVE_SRC_TMP=$9;
-shift
-BIN_DIR=$9;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="scotch-5.1.11"
-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
--- /dev/null
+#!/bin/bash -noprofile
+
+####################################################################################
+# File : scotch.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-2012 CEA
+#
+# This script is the part of the SALOME installation procedure.
+#
+####################################################################################
+
+#
+# scotch version
+#
+SCOTCH_VERSION=5.1.12
+
+check_version(){
+# No way to check version!
+return 0
+}
+
+print_env_bin()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export SCOTCHDIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+##
+EOF
+(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
+# nothing to do
+##
+EOF
+(test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+try_existing ${PRODUCT_SRC_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+return $?
+}
+
+install_source()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_source_and_build()
+{
+# install sources
+install_source
+
+# build sources
+cd ${PRODUCT_SRC_DIR}
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+cd src
+
+if test `uname -m` = "x86_64" ; then
+ # create Makefile for Linux 64bit platforms
+ sed -e "s%CFLAGS\([[:space:]]*\)=\([[:space:]]*\)\(.*\)%CFLAGS\1=\2-fPIC -pg \3%g" \
+ Make.inc/Makefile.inc.x86-64_pc_linux2 > Make.inc/Makefile.inc.x86-64_pc_linux2.prof
+ ln -sf Make.inc/Makefile.inc.x86-64_pc_linux2.prof Makefile.inc
+else
+ ln -sf Make.inc/Makefile.inc.i686_pc_linux2.prof Makefile.inc
+fi
+
+# make
+check_job ${PRODUCT_DIR}/MAKE.LOG make prefix=${PRODUCT_DIR}
+
+# make install
+check_job ${PRODUCT_DIR}/INSTALL.LOG make prefix=${PRODUCT_DIR} install
+
+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
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_binary()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+# create a product directory
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+check_jb tar xfz ${BIN_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
+
+# to generate environment scripts
+try_preinstalled
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INST_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+export PRODUCT_TYPE=$6;
+export INSTALL_PRODUCTS=$7;
+shift
+REMOVE_SRC_TMP=$8;
+test $# == 10 && shift && SINGLE_DIR=$9
+export PRODUCT="scotch-${SCOTCH_VERSION}"
+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