]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Update for salome 6.4.0
authorinv <inv@opencascade.com>
Wed, 9 Nov 2011 07:19:05 +0000 (07:19 +0000)
committerinv <inv@opencascade.com>
Wed, 9 Nov 2011 07:19:05 +0000 (07:19 +0000)
config_Mandriva_2008.0.xml
config_files/DISTENE.sh
config_files/OCCT-6.5.2.sh
config_files/freeimage-3.14.1.sh [new file with mode: 0755]
config_files/freetype-2.3.7.sh [new file with mode: 0755]
config_files/ftgl-2.1.2.sh [new file with mode: 0755]
config_files/gl2ps-1.3.5.sh [new file with mode: 0755]
config_files/med-3.0.3.sh [deleted file]
config_files/med-3.0.4.sh [new file with mode: 0755]
config_files/tbb30_018oss.sh [new file with mode: 0755]
config_files/tcltk-8.5.8.sh

index d247e6691ce70cad5418bec79a937b15f09e874a..fa542fc3c13c14926c8fc6f258d8d2076a553cc7 100755 (executable)
              type="prerequisite"
             description="Tcl/Tk library">
       <installation os="Mandriva 2008.0"
-                   version="8.4.14
+                   version="8.5.8
                    disable="false"
                    installdiskspace="10765,28789,50385"
-                   script="tcltk-8.4.14.sh"/>
+                   script="tcltk-8.5.8.sh"/>
     </product>
     <product name="Python" 
             type="prerequisite"
                    installdiskspace="3923,11661,31647"
                    script="SWIG-1.3.40.sh"/>
     </product>
-    <product name="OpenCascade" 
+    <product name="freetype"
+            type="prerequisite"
+            description="Font service engine">
+      <installation os="Mandriva 2008.0"
+                    version="2.3.7" 
+                   disable="false"
+                   installdiskspace="86460,273932,478152"
+                   script="freetype-2.3.7.sh"/>
+    </product>
+    <product name="ftgl"
+            type="prerequisite"
+            description="Library for using arbitrary fonts in OpenGL applications">
+      <installation os="Mandriva 2008.0"
+                    version="2.1.2" 
+                   disable="false"
+                   installdiskspace="86460,273932,478152"
+                   script="ftgl-2.1.2.sh"/>
+    </product>
+    <product name="freeimage"
             type="prerequisite"
-             description="Open CASCADE version 6.3sp13">
+            description="Library for supporting different graphical formats PNG, BMP, JPEG, TIFF and others">
       <installation os="Mandriva 2008.0"
-                    version="6.3sp13" 
+                    version="3.14.1" 
+                   disable="false"
+                   installdiskspace="86460,273932,478152"
+                   script="freeimage-3.14.1.sh"/>
+    </product>
+    <product name="cmake"
+            type="prerequisite"
+            description="The cross-platform, open-source make system">
+      <installation os="Mandriva 2008.0"
+                    version="2.8.4" 
                    disable="false"
                    installdiskspace="34168,23512,158888"
-                   script="CAS-6.3sp13.sh"/>
+                   script="cmake-2.8.4.sh"/>
     </product>
-    <product name="PatchForOpenCascade" 
+    <product name="gl2ps"
             type="prerequisite"
-             description="Patch for Open CASCADE version 6.3sp13">
+            description="Library for printing an OpenGL output to PostScript (and PDF, and SVG...).">
       <installation os="Mandriva 2008.0"
-                    version="6.3sp13" 
-                   disable="true"
-                   installdiskspace="241631,268394,1222169"
-                   script="CAS-6.3sp13-patch.sh"/>
+                    version="1.3.5"
+                   disable="false"
+                   installdiskspace="86460,273932,478152"
+                   script="gl2ps-1.3.5.sh"/>
+    </product>
+    <product name="tbb"
+            type="prerequisite"
+            description="Intel(R) Threading Building Blocks">
+      <installation os="Mandriva 2008.0"
+                    version="30_018oss"
+                   disable="false"
+                   installdiskspace="86460,273932,478152"
+                   script="tbb30_018oss.sh"/>
+    </product>
+    <product name="OpenCascade" 
+            type="prerequisite"
+             description="Open CASCADE version 6.5.2">
+      <installation os="Mandriva 2008.0"
+                    version="6.5.2" 
+                   disable="false"
+                   installdiskspace="34168,23512,158888"
+                   script="OCCT-6.5.2.sh"/>
     </product>
     <product name="Qwt" 
             type="prerequisite"
                    installdiskspace="9264,63776,115928"
                    script="hdf5-1.8.4.sh"/>
     </product>
+    <product name="cgnslib"
+            type="prerequisite"
+            description="Provides a standard for recording and recovering computer data associated with the numerical solution of the equations of fluid dynamics.">
+      <installation os="Mandriva 2008.0"
+                    version="3.1.3" 
+                   disable="false"
+                   installdiskspace="11524,11468,45860"
+                   script="cgnslib-3.1.3.sh"/>
+    </product>
     <product name="Med"
             type="prerequisite"
             description="MED format interface library">
                    installdiskspace="4296,5644,14388"
                    script="scotch-5.1.11.sh"/>
     </product>
-    <product name="cmake"
-            type="prerequisite"
-            description="The cross-platform, open-source make system">
-      <installation os="Mandriva 2008.0"
-                    version="2.8.4" 
-                   disable="false"
-                   installdiskspace="34168,23512,158888"
-                   script="cmake-2.8.4.sh"/>
-    </product>
     <product name="ParaView"
             type="prerequisite"
             description="Scalable, open-source visualization application">
       <dep>Python</dep>
       <dep>tcltk</dep>
     </product>
+    <product name="ftgl">
+      <dep>freetype</dep>
+    </product>
+    <product name="gl2ps">
+      <dep>cmake</dep>
+    </product>
     <product name="OpenCascade">
+      <dep>tbb</dep>
+      <dep>gl2ps</dep>
+      <dep>freeimage</dep>
+      <dep>ftgl</dep>
+      <dep>freetype</dep>
       <dep>tcltk</dep>
     </product>
     <product name="PatchForOpenCascade">
     <product name="Med">
       <dep>Hdf</dep>
     </product>
+    <product name="cgnslib">
+      <dep>Hdf</dep>
+    </product>
     <product name="ParaView">
       <dep>Python</dep>
       <dep>tcltk</dep>
index c01950783def7ef2d9df135209f1cb50f3d4a9ff..12a5af424c670f1681b520de5bce5f450ab3b933 100755 (executable)
@@ -106,4 +106,4 @@ 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 
index c6310a8084a9f885d0b9718adeeaf19d72ba0d0c..3c352d895717858699442cdcbb431bb316c3c8ce 100755 (executable)
@@ -141,6 +141,8 @@ else
 where_xmu_include=/usr/X11R6/include
 fi
 
+flags=""
+
 flags="$flags --with-xmu-include=$where_xmu_include"
 
 if test `uname -m` = "x86_64" ; then
@@ -161,9 +163,9 @@ if [ $? -eq 0 ] ; then flags="$flags --with-tk=$tkdir"; fi
 flags="$flags --with-tbb-include=${TBBHOME}/include" 
 
 if test `uname -m` = "x86_64" ; then
-    flags="$flags --with-tbb-library=${TBBHOME}/intel64/cc4.1.0_libc2.4_kernel2.6.16.21"
+    flags="$flags --with-tbb-library=${TBBHOME}/lib/intel64/cc4.1.0_libc2.4_kernel2.6.16.21"
 else
-    flags="$flags --with-tbb-library=${TBBHOME}/ia32/cc4.1.0_libc2.4_kernel2.6.16.21"
+    flags="$flags --with-tbb-library=${TBBHOME}/lib/ia32/cc4.1.0_libc2.4_kernel2.6.16.21"
 fi
 
 flags="$flags --with-freetype=${FREETYPEDIR}"
@@ -175,8 +177,10 @@ flags="$flags --disable-debug --enable-production"
 
 export CASROOT=${PRODUCT_SRC_DIR}
 
+./build_configure
+
 echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} $flags  >> ${PRODUCT_DIR}/CONFIGURE.LOG"
-./configure --prefix=${PRODUCT_DIR} $flags >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${INSTALL_WORK}/errlog
+check_job ./configure --prefix=${PRODUCT_DIR} $flags >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${INSTALL_WORK}/errlog
 
 # make
 echo " +++++++++++ make"
diff --git a/config_files/freeimage-3.14.1.sh b/config_files/freeimage-3.14.1.sh
new file mode 100755 (executable)
index 0000000..b2ee2e7
--- /dev/null
@@ -0,0 +1,153 @@
+#!/bin/bash -noprofile
+
+####################################################################################
+#  File      : freeimage-3.14.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-2008 CEA
+#
+#  This script is the part of the SALOME installation procedure.
+#
+####################################################################################
+
+FREEIMAGE_REF_VERSION="3.14.1"
+
+check_version()
+{
+# check existance of freeimage and its version
+if [ -n ${FREEIMAGEDIR} ]; then
+  return 0
+fi
+ver_major=`cat ${PRODUCT_SRC_DIR}/FreeImage.rc | grep PRODUCTVERSION | sed -e "s%[A-Z0 ]%%g" | sed -e "s%[,]% %g" | awk '{ print $1}'`
+ver_minor=`cat ${PRODUCT_SRC_DIR}/FreeImage.rc | grep PRODUCTVERSION | sed -e "s%[A-Z0 ]%%g" | sed -e "s%[,]% %g" | awk '{ print $2}'`
+ver_maint=`cat ${PRODUCT_SRC_DIR}/FreeImage.rc | grep PRODUCTVERSION | sed -e "s%[A-Z0 ]%%g" | sed -e "s%[,]% %g" | awk '{ print $3}'`
+ver="$ver_major.$ver_minor.$ver_maint"
+if [ "$ver" == "${FREEIMAGE_REF_VERSION}" ] ; then
+    return 0
+fi
+return 1
+}
+
+print_env_bin()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export FREEIMAGEDIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${FREEIMAGEDIR}/bin:\$PATH 
+export LD_LIBRARY_PATH=\${FREEIMAGEDIR}/lib:\${LD_LIBRARY_PATH}
+##
+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
+# 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
+
+# unpack
+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
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+cd ${PRODUCT_SRC_DIR}
+
+## building FreeImage library
+
+# compile
+#check_job ${PRODUCT_DIR}/MAKE.LOG 
+check_job ${PRODUCT_DIR}/MAKE.LOG make -f Makefile.gnu
+
+# install
+#check_job ${PRODUCT_DIR}/INSTALL.LOG 
+check_job ${PRODUCT_DIR}/INSTALL.LOG make -f Makefile.gnu DESTDIR=${PRODUCT_DIR} install 
+
+#clean temporary files. 
+make -f Makefile.fip clean 
+
+## building FreeImagePlus library
+
+# compile
+#check_job ${PRODUCT_DIR}/MAKE.LOG 
+check_job ${PRODUCT_DIR}/MAKEPLUS.LOG make -f Makefile.fip 
+
+# install
+#check_job ${PRODUCT_DIR}/INSTALL.LOG 
+check_job ${PRODUCT_DIR}/INSTALLPLUS.LOG make -f Makefile.fip DESTDIR=${PRODUCT_DIR} install 
+
+#clean temporary files. 
+make -f Makefile.fip clean 
+
+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 ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
+
+### modifing la files
+cd ${PRODUCT_DIR}/lib
+
+# to generate environment script for sources
+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="freeimage-${FREEIMAGE_REF_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 
diff --git a/config_files/freetype-2.3.7.sh b/config_files/freetype-2.3.7.sh
new file mode 100755 (executable)
index 0000000..24c7ffe
--- /dev/null
@@ -0,0 +1,138 @@
+#!/bin/bash -noprofile
+
+####################################################################################
+#  File      : freetype-2.3.7.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.
+#
+####################################################################################
+
+FREETYPE_REF_VERSION="2.3.7"
+
+check_version()
+{
+# check existance of freetype and its version
+if [ -n ${FREETYPEDIR} ]; then
+  return 0
+fi
+ver=`${PRODUCT_SRC_DIR}/configure --version | grep "FreeType configure" | awk '{ print $3}'`
+if [ "$ver" == "${FREETYPE_REF_VERSION}" ] ; then
+    return 0
+fi
+return 1
+}
+
+print_env_bin()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export FREETYPEDIR=\${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
+
+# unpack
+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
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+cd ${PRODUCT_SRC_DIR}
+FREETYPE_CONFIGURE_OPTIONS=""
+FREETYPE_CONFIGURE_OPTIONS="${FREETYPE_CONFIGURE_OPTIONS} --enable-shared=no --prefix=${PRODUCT_DIR}"
+
+if test `uname -m` = "x86_64" ; then
+FREETYPE_CONFIGURE_OPTIONS="${FREETYPE_CONFIGURE_OPTIONS} CFLAGS=' -fPIC m64'"
+fi
+
+#congigure
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${FREETYPE_CONFIGURE_OPTIONS}
+
+# compile
+check_job ${PRODUCT_DIR}/MAKE.LOG make
+
+# install
+check_job ${PRODUCT_DIR}/INSTALL.LOG make 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 ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
+
+### modifing la files
+cd ${PRODUCT_DIR}/lib
+
+# to generate environment script for sources
+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="freetype-${FREETYPE_REF_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 
diff --git a/config_files/ftgl-2.1.2.sh b/config_files/ftgl-2.1.2.sh
new file mode 100755 (executable)
index 0000000..7eea489
--- /dev/null
@@ -0,0 +1,138 @@
+#!/bin/bash -noprofile
+
+####################################################################################
+#  File      : ftgl-2.1.2.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.
+#
+####################################################################################
+
+FTGL_REF_VERSION="2.1.2"
+
+check_version()
+{
+# check existance of FTGL and its version
+if [ -n ${FTGLDIR} ]; then
+  return 0
+fi
+ver=`${PRODUCT_SRC_DIR}/configure --version | grep "FTGL configure" | awk '{ print $3}'`
+if [ "$ver" == "${FTGL_REF_VERSION}" ] ; then
+    return 0
+fi
+return 1
+}
+
+print_env_bin()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export FTGLDIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${FTGLDIR}/bin:\$PATH 
+export LD_LIBRARY_PATH=\${FTGLDIR}/lib:\${LD_LIBRARY_PATH}
+##
+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
+
+# unpack
+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
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+cd ${PRODUCT_SRC_DIR}/unix
+
+FTGL_CONFIGURE_OPTIONS=""
+FTGL_CONFIGURE_OPTIONS="${FTGL_CONFIGURE_OPTIONS} --enable-shared=yes --prefix=${PRODUCT_DIR}"
+FTGL_CONFIGURE_OPTIONS="${FTGL_CONFIGURE_OPTIONS} --with-freetype-prefix=${FREETYPEDIR}"
+
+#congigure
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${FTGL_CONFIGURE_OPTIONS}
+
+# compile
+check_job ${PRODUCT_DIR}/MAKE.LOG make
+
+# install
+check_job ${PRODUCT_DIR}/INSTALL.LOG make 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 ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
+
+### modifing la files
+cd ${PRODUCT_DIR}/lib
+
+# to generate environment script for sources
+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="ftgl-${FTGL_REF_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 
diff --git a/config_files/gl2ps-1.3.5.sh b/config_files/gl2ps-1.3.5.sh
new file mode 100755 (executable)
index 0000000..21d91d2
--- /dev/null
@@ -0,0 +1,144 @@
+#!/bin/bash -noprofile
+
+####################################################################################
+#  File      : gl2ps-1.3.5.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.
+#
+####################################################################################
+
+GL2PS_REF_VERSION="1.3.5"
+
+check_version()
+{
+# check existance of freeimage and its version
+if [ -n ${GL2PSHOME} ]; then
+  return 0
+fi
+
+ver_maj=`cat ${PRODUCT_SRC_DIR}/CMakeLists.txt | grep set\(GL2PS_MAJOR_VERSION | sed -e "s%[A-Z_()2 ]%%g"`
+ver_min=`cat ${PRODUCT_SRC_DIR}/CMakeLists.txt | grep set\(GL2PS_MINOR_VERSION | sed -e "s%[A-Z_()2 ]%%g"`
+ver_patch=`cat ${PRODUCT_SRC_DIR}/CMakeLists.txt | grep set\(GL2PS_PATCH_VERSION | sed -e "s%[A-Z_()2 ]%%g"`
+ver="${ver_maj}.${ver_min}.${ver_patch}"
+
+if [ "$ver" == "${GL2PS_REF_VERSION}" ] ; then
+    return 0
+fi
+return 1
+}
+
+print_env_bin()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export GL2PSHOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${GL2PSHOME}/bin:\$PATH 
+export LD_LIBRARY_PATH=\${GL2PSHOME}/lib:\${LD_LIBRARY_PATH}
+##
+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
+# 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
+
+# unpack
+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
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+cd ${PRODUCT_SRC_DIR}
+
+## building FreeImage library
+
+# compile
+#check_job ${PRODUCT_DIR}/MAKE.LOG 
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake -DCMAKE_INSTALL_PREFIX=${PRODUCT_DIR} -DCMAKE_BUILD_TYPE=Release
+
+
+# compile
+#check_job ${PRODUCT_DIR}/MAKE.LOG 
+check_job ${PRODUCT_DIR}/MAKE.LOG make
+
+# install
+#check_job ${PRODUCT_DIR}/INSTALL.LOG 
+check_job ${PRODUCT_DIR}/INSTALL.LOG make 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 ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
+
+### modifing la files
+cd ${PRODUCT_DIR}/lib
+
+# to generate environment script for sources
+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="gl2ps-${GL2PS_REF_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 
diff --git a/config_files/med-3.0.3.sh b/config_files/med-3.0.3.sh
deleted file mode 100755 (executable)
index fc1c657..0000000
+++ /dev/null
@@ -1,230 +0,0 @@
-#!/bin/bash -noprofile
-
-####################################################################################
-#  File      : med-3.0.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-2008 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.1.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=\${INST_ROOT}/${SINGLE_DIR:-${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 ${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
-
-# unpack
-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}
-
-#vsr: provide additional flags for f95 (Mandriva 2006.0, Fedora Core 4)
-is_mandriva2006=0
-is_mandriva2007=0
-is_mandriva2008=0
-is_debian40=0
-is_fedora4=0
-is_fedora6=0
-
-if [ -e /etc/issue ] ; then
-  grep -e "Mandriva Linux release 2006.0" /etc/issue > /dev/null
-  if [ $? == 0 ] ; then is_mandriva2006=1 ; fi
-  grep -e "Mandriva Linux release 2007.0" /etc/issue > /dev/null
-  if [ $? == 0 ] ; then is_mandriva2007=1 ; fi
-  grep -e "Mandriva Linux release 2008.0" /etc/issue > /dev/null
-  if [ $? == 0 ] ; then is_mandriva2008=1 ; fi
-  grep -e "Debian GNU/Linux 4.0" /etc/issue > /dev/null
-  if [ $? == 0 ] ; then is_debian40=1 ; fi
-  grep -e "Fedora Core release 4" /etc/issue > /dev/null
-  if [ $? == 0 ] ; then is_fedora4=1 ; fi
-  grep -e "Fedora Core release 6" /etc/issue > /dev/null
-  if [ $? == 0 ] ; then is_fedora6=1 ; fi
-fi
-
-if [ $is_mandriva2006 == 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
-chmod +w ./Makefile.in
-mv Makefile.in Makefile.in.orig
-sed -e 's/include src tests tools doc/include src tools doc/g' Makefile.in.orig > Makefile.in
-fi
-
-if [ $is_mandriva2006 == 1 ] || [ $is_mandriva2007 == 1 ]  || [ $is_mandriva2008 == 1 ] || [ $is_fedora4 == 1 ] || [ $is_fedora6 == 1 ] || [ $is_debian40 == 1 ] ; then
-    if test `uname -m` = "x86_64" ; then
-       if [ $is_mandriva2006 == 1 ] ; then     
-    echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} --disable-mesgerr FFLAGS='-g -O2 -fPIC' CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG"
-    ./configure --prefix=${PRODUCT_DIR} --disable-mesgerr FFLAGS="-g -O2 -fPIC" CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${PRODUCT_SRC_DIR}/errlog
-       else
-    echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} --disable-mesgerr FFLAGS='-g -O2' CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG"
-    ./configure --prefix=${PRODUCT_DIR} --disable-mesgerr FFLAGS="-g -O2" CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${PRODUCT_SRC_DIR}/errlog
-       fi
-    else
-    echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} --disable-mesgerr FFLAGS='-g -O2' >> ${PRODUCT_DIR}/CONFIGURE.LOG"
-    ./configure --prefix=${PRODUCT_DIR} --disable-mesgerr FFLAGS="-g -O2" >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${PRODUCT_SRC_DIR}/errlog
-    fi
-    if [ "$?" -ne "0" ] ; then
-      cat ${PRODUCT_DIR}/CONFIGURE.LOG
-      cat ${PRODUCT_SRC_DIR}/errlog >&2
-      cat ${PRODUCT_SRC_DIR}/errlog >> ${PRODUCT_DIR}/CONFIGURE.LOG
-      exit 1
-    fi
-else
-    check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} --disable-mesgerr 
-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
-
-cd ${PRODUCT_DIR}/lib
-
-sed -e "s%\(.*\)\([[:space:]].*-L.*/med-[0-9]\.[0-9]\.[0-9]_SRC/src[[:space:]]\)\(.*\)%\1 \3%g" libmedimport.la > libmedimport.la.new
-mv -f libmedimport.la.new libmedimport.la
-
-chmod 755 libmedimport.la
-
-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 ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
-
-### 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
-sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmedimport.la > libmedimport.la.new
-mv -f libmedimport.la.new libmedimport.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
-
-sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmedimport.la > libmedimport.la.new
-mv -f libmedimport.la.new libmedimport.la
-
-sed -e "s%\(.*\)\([[:space:]].*/med-[0-9]\.[0-9]\.[0-9]/lib/libmed.la[[:space:]]\)\(.*\)%\1 ${PRODUCT_DIR}/lib/libmed.la \3%g" libmedimport.la > libmedimport.la.new
-mv -f libmedimport.la.new libmedimport.la
-
-sed -e "s%\(.*\)\([[:space:]].*-L.*/med-[0-9]\.[0-9]\.[0-9]_SRC/src[[:space:]]\)\(.*\)%\1 \3%g" libmedimport.la > libmedimport.la.new
-mv -f libmedimport.la.new libmedimport.la
-
-chmod 755 libmed.la
-chmod 755 libmedC.la
-chmod 755 libmedimport.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 INST_ROOT=$4;
-export PRODUCT_SEQUENCE=$5;
-export PRODUCT_TYPE=$6;
-export INSTALL_PRODUCTS=$7;
-shift
-REMOVE_SRC_TMP=$8;
-shift
-SINGLE_DIR=$9
-export PRODUCT="med-3.0.3"
-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 
diff --git a/config_files/med-3.0.4.sh b/config_files/med-3.0.4.sh
new file mode 100755 (executable)
index 0000000..46faff0
--- /dev/null
@@ -0,0 +1,230 @@
+#!/bin/bash -noprofile
+
+####################################################################################
+#  File      : med-3.0.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-2008 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.1.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=\${INST_ROOT}/${SINGLE_DIR:-${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 ${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
+
+# unpack
+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}
+
+#vsr: provide additional flags for f95 (Mandriva 2006.0, Fedora Core 4)
+is_mandriva2006=0
+is_mandriva2007=0
+is_mandriva2008=0
+is_debian40=0
+is_fedora4=0
+is_fedora6=0
+
+if [ -e /etc/issue ] ; then
+  grep -e "Mandriva Linux release 2006.0" /etc/issue > /dev/null
+  if [ $? == 0 ] ; then is_mandriva2006=1 ; fi
+  grep -e "Mandriva Linux release 2007.0" /etc/issue > /dev/null
+  if [ $? == 0 ] ; then is_mandriva2007=1 ; fi
+  grep -e "Mandriva Linux release 2008.0" /etc/issue > /dev/null
+  if [ $? == 0 ] ; then is_mandriva2008=1 ; fi
+  grep -e "Debian GNU/Linux 4.0" /etc/issue > /dev/null
+  if [ $? == 0 ] ; then is_debian40=1 ; fi
+  grep -e "Fedora Core release 4" /etc/issue > /dev/null
+  if [ $? == 0 ] ; then is_fedora4=1 ; fi
+  grep -e "Fedora Core release 6" /etc/issue > /dev/null
+  if [ $? == 0 ] ; then is_fedora6=1 ; fi
+fi
+
+if [ $is_mandriva2006 == 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
+chmod +w ./Makefile.in
+mv Makefile.in Makefile.in.orig
+sed -e 's/include src tests tools doc/include src tools doc/g' Makefile.in.orig > Makefile.in
+fi
+
+if [ $is_mandriva2006 == 1 ] || [ $is_mandriva2007 == 1 ]  || [ $is_mandriva2008 == 1 ] || [ $is_fedora4 == 1 ] || [ $is_fedora6 == 1 ] || [ $is_debian40 == 1 ] ; then
+    if test `uname -m` = "x86_64" ; then
+       if [ $is_mandriva2006 == 1 ] ; then     
+    echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} --disable-mesgerr FFLAGS='-g -O2 -fPIC' CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG"
+    ./configure --prefix=${PRODUCT_DIR} --disable-mesgerr FFLAGS="-g -O2 -fPIC" CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${PRODUCT_SRC_DIR}/errlog
+       else
+    echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} --disable-mesgerr FFLAGS='-g -O2' CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG"
+    ./configure --prefix=${PRODUCT_DIR} --disable-mesgerr FFLAGS="-g -O2" CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${PRODUCT_SRC_DIR}/errlog
+       fi
+    else
+    echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} --disable-mesgerr FFLAGS='-g -O2' >> ${PRODUCT_DIR}/CONFIGURE.LOG"
+    ./configure --prefix=${PRODUCT_DIR} --disable-mesgerr FFLAGS="-g -O2" >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${PRODUCT_SRC_DIR}/errlog
+    fi
+    if [ "$?" -ne "0" ] ; then
+      cat ${PRODUCT_DIR}/CONFIGURE.LOG
+      cat ${PRODUCT_SRC_DIR}/errlog >&2
+      cat ${PRODUCT_SRC_DIR}/errlog >> ${PRODUCT_DIR}/CONFIGURE.LOG
+      exit 1
+    fi
+else
+    check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} --disable-mesgerr 
+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
+
+cd ${PRODUCT_DIR}/lib
+
+sed -e "s%\(.*\)\([[:space:]].*-L.*/med-[0-9]\.[0-9]\.[0-9]_SRC/src[[:space:]]\)\(.*\)%\1 \3%g" libmedimport.la > libmedimport.la.new
+mv -f libmedimport.la.new libmedimport.la
+
+chmod 755 libmedimport.la
+
+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 ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
+
+### 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
+sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmedimport.la > libmedimport.la.new
+mv -f libmedimport.la.new libmedimport.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
+
+sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmedimport.la > libmedimport.la.new
+mv -f libmedimport.la.new libmedimport.la
+
+sed -e "s%\(.*\)\([[:space:]].*/med-[0-9]\.[0-9]\.[0-9]/lib/libmed.la[[:space:]]\)\(.*\)%\1 ${PRODUCT_DIR}/lib/libmed.la \3%g" libmedimport.la > libmedimport.la.new
+mv -f libmedimport.la.new libmedimport.la
+
+sed -e "s%\(.*\)\([[:space:]].*-L.*/med-[0-9]\.[0-9]\.[0-9]_SRC/src[[:space:]]\)\(.*\)%\1 \3%g" libmedimport.la > libmedimport.la.new
+mv -f libmedimport.la.new libmedimport.la
+
+chmod 755 libmed.la
+chmod 755 libmedC.la
+chmod 755 libmedimport.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 INST_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+export PRODUCT_TYPE=$6;
+export INSTALL_PRODUCTS=$7;
+shift
+REMOVE_SRC_TMP=$8;
+shift
+SINGLE_DIR=$9
+export PRODUCT="med-3.0.4"
+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 
diff --git a/config_files/tbb30_018oss.sh b/config_files/tbb30_018oss.sh
new file mode 100755 (executable)
index 0000000..57b4004
--- /dev/null
@@ -0,0 +1,101 @@
+#!/bin/bash -noprofile
+
+####################################################################################
+#  File      : tbb30_018oss.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.
+#
+####################################################################################
+
+
+TBBKERNEL='cc4.1.0_libc2.4_kernel2.6.16.21'
+
+if test `uname -m` = "x86_64" ; then
+    export TBBMODE="intel64/$TBBKERNEL"
+else
+    export TBBMODE="ia32/$TBBKERNEL"
+fi
+
+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 TBBHOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${TBBHOME}/bin/$TBBMODE:\$PATH 
+export LD_LIBRARY_PATH=\${TBBHOME}/lib/$TBBMODE:\${LD_LIBRARY_PATH}
+##
+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()
+{
+echo "It's impossible to install ${PRODUCT} from sources"
+}
+
+install_source_and_build()
+{
+install_binary
+}
+
+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 script
+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="tbb30_018oss"
+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 
index 9f863b354ac9bc8e35aa42a5d03ebfbd9379ac8d..32eaacf4007207a421a9e5e99221339584dc6150 100755 (executable)
@@ -158,25 +158,26 @@ check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
 (cd ${PRODUCT_DIR}/lib; ln -fs libtk8.5.so libtk.so)
 (cd ${PRODUCT_DIR}/lib; ln -fs libtkstub8.5.a libtkstub.a)
 
-#vsr: patch tclx 8.3.5 to make it compiliable on Mandriva 2006.0
-cd ${PRODUCT_SRC_DIR}/tclx8.3.5_SRC/unix
-mv Common.mk.in Common.mk.in.orig
-sed -e 's/@DEFS@/-DSTDC_HEADERS=1 -DNDEBUG=1 -DRETSIGTYPE=void/g' Common.mk.in.orig > Common.mk.in
-cd ${PRODUCT_SRC_DIR}/tclx8.3.5_SRC/tcl/unix
-mv tclxConfig.sh.in tclxConfig.sh.in.orig
-sed -e 's/@DEFS@/ -DSTDC_HEADERS=1 -DNDEBUG=1 -DRETSIGTYPE=void /g' tclxConfig.sh.in.orig > tclxConfig.sh.in
-cd ${PRODUCT_SRC_DIR}/tclx8.3.5_SRC/tk/unix
-mv tkxConfig.sh.in tkxConfig.sh.in.orig
-sed -e 's/@DEFS@/ -DSTDC_HEADERS=1 -DNDEBUG=1 -DRETSIGTYPE=void /g' tkxConfig.sh.in.orig > tkxConfig.sh.in
-
-cd ${PRODUCT_SRC_DIR}/tclx8.3.5_SRC/unix
+#vsr: patch tclx 8.4.0 to make it compiliable on Mandriva 2006.0
+#mv Common.mk.in Common.mk.in.orig
+#sed -e 's/@DEFS@/-DSTDC_HEADERS=1 -DNDEBUG=1 -DRETSIGTYPE=void/g' Common.mk.in.orig > Common.mk.in
+#cd ${PRODUCT_SRC_DIR}/tclx8.4.0_SRC/tcl/unix
+#mv tclxConfig.sh.in tclxConfig.sh.in.orig
+#sed -e 's/@DEFS@/ -DSTDC_HEADERS=1 -DNDEBUG=1 -DRETSIGTYPE=void /g' tclxConfig.sh.in.orig > tclxConfig.sh.in
+#cd ${PRODUCT_SRC_DIR}/tclx8.4.0_SRC/tk/unix
+#mv tkxConfig.sh.in tkxConfig.sh.in.orig
+#sed -e 's/@DEFS@/ -DSTDC_HEADERS=1 -DNDEBUG=1 -DRETSIGTYPE=void /g' tkxConfig.sh.in.orig > tkxConfig.sh.in
+
+#cd ${PRODUCT_SRC_DIR}/tclx8.4.0_SRC/unix
 #VRV - bug in a tclx configure 
-chmod +w ./configure
-echo -e '/test "$no_create" = yes || ${CONFIG_SHELL-\/bin\/sh} $CONFIG_STATUS || exit 1\ns/test "$no_create" = yes || ${CONFIG_SHELL-\/bin\/sh} $CONFIG_STATUS || exit 1/test "$no_create" = yes || ${CONFIG_SHELL-\/bin\/sh} $CONFIG_STATUS || exit 0\nwq' | ed - configure 
+#chmod +w ./configure
+#echo -e '/test "$no_create" = yes || ${CONFIG_SHELL-\/bin\/sh} $CONFIG_STATUS || exit 1\ns/test "$no_create" = yes || ${CONFIG_SHELL-\/bin\/sh} $CONFIG_STATUS || exit 1/test "$no_create" = yes || ${CONFIG_SHELL-\/bin\/sh} $CONFIG_STATUS || exit 0\nwq' | ed - configure 
 #INV - bug in a tclx configure 
-cp configure configure.orig && sed "s/relid'/relid/" configure.orig > configure
-chmod 755 ./configure
+#cp configure configure.orig && sed "s/relid'/relid/" configure.orig > configure
+#chmod 755 ./configure
 #VRV - bug in a tclx configure 
+cd ${PRODUCT_SRC_DIR}/tclx8.4.0_SRC
+
 cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
 -------------------
 Configuring tclx...
@@ -196,12 +197,12 @@ cat >> ${PRODUCT_DIR}/MAKEINSTALLEXEC.LOG <<EOF
 Installing tclx...
 -------------------
 EOF
-check_job ${PRODUCT_DIR}/MAKEINSTALLEXEC.LOG make install-exec
+check_job ${PRODUCT_DIR}/MAKEINSTALLEXEC.LOG make install
 
-(cd ${PRODUCT_DIR}/lib; ln -fs libtclx8.3.so libtclx.so)
-(cd ${PRODUCT_DIR}/lib; ln -fs libtclx8.3.a  libtclx.a)
-(cd ${PRODUCT_DIR}/lib; ln -fs libtkx8.3.so  libtkx.so)
-(cd ${PRODUCT_DIR}/lib; ln -fs libtkx8.3.a   libtkx.a)
+(cd ${PRODUCT_DIR}/lib; ln -fs tclx8.4/libtclx8.4.so libtclx.so)
+#(cd ${PRODUCT_DIR}/lib; ln -fs tclx8.4/libtclx8.4.a  libtclx.a)
+#(cd ${PRODUCT_DIR}/lib; ln -fs tclx8.4/libtkx8.4.so  libtkx.so)
+#(cd ${PRODUCT_DIR}/lib; ln -fs tclx8.4/libtkx8.4.a   libtkx.a)
 
 cd ${PRODUCT_DIR}