From: inv Date: Wed, 4 Apr 2012 07:38:53 +0000 (+0000) Subject: SALOME 6.5.0 preparation: update script for netgen (4.9.13) X-Git-Tag: V6_5_0b1~38 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3222fa0a5ebba6ae7672fc2aeec11c4f19b3b9cc;p=tools%2Finstall.git SALOME 6.5.0 preparation: update script for netgen (4.9.13) --- diff --git a/config_CentOS_5.5_64bit.xml b/config_CentOS_5.5_64bit.xml index 2855fe8..ecf8468 100755 --- a/config_CentOS_5.5_64bit.xml +++ b/config_CentOS_5.5_64bit.xml @@ -642,7 +642,7 @@ version="4.9.13" disable="false" installdiskspace="5615,51450,17231" - script="netgen-4.9.13.sh"/> + script="netgen.sh"/> Python + tcltk OpenCascade diff --git a/config_Debian_4.0.xml b/config_Debian_4.0.xml index e648ead..e1dc1ba 100755 --- a/config_Debian_4.0.xml +++ b/config_Debian_4.0.xml @@ -642,7 +642,7 @@ version="4.9.13" disable="false" installdiskspace="5615,51450,17231" - script="netgen-4.9.13.sh"/> + script="netgen.sh"/> Python + tcltk OpenCascade diff --git a/config_Debian_4.0_64bit.xml b/config_Debian_4.0_64bit.xml index 8f8a99c..491a5a7 100755 --- a/config_Debian_4.0_64bit.xml +++ b/config_Debian_4.0_64bit.xml @@ -642,7 +642,7 @@ version="4.9.13" disable="false" installdiskspace="5615,51450,17231" - script="netgen-4.9.13.sh"/> + script="netgen.sh"/> Python + tcltk OpenCascade diff --git a/config_Debian_5.0_64bit.xml b/config_Debian_5.0_64bit.xml index 74ba246..ee7c7bb 100755 --- a/config_Debian_5.0_64bit.xml +++ b/config_Debian_5.0_64bit.xml @@ -642,7 +642,7 @@ version="4.9.13" disable="false" installdiskspace="5615,51450,17231" - script="netgen-4.9.13.sh"/> + script="netgen.sh"/> Python + tcltk OpenCascade diff --git a/config_Debian_6.0_64bit.xml b/config_Debian_6.0_64bit.xml index 9fed88d..50063d6 100755 --- a/config_Debian_6.0_64bit.xml +++ b/config_Debian_6.0_64bit.xml @@ -642,7 +642,7 @@ version="4.9.13" disable="false" installdiskspace="5615,51450,17231" - script="netgen-4.9.13.sh"/> + script="netgen.sh"/> Python + tcltk OpenCascade diff --git a/config_Mandriva_2008.0.xml b/config_Mandriva_2008.0.xml index d5f81e0..1593fd7 100755 --- a/config_Mandriva_2008.0.xml +++ b/config_Mandriva_2008.0.xml @@ -642,7 +642,7 @@ version="4.9.13" disable="false" installdiskspace="5615,51450,17231" - script="netgen-4.9.13.sh"/> + script="netgen.sh"/> Python + tcltk OpenCascade diff --git a/config_Mandriva_2008.0_64bit.xml b/config_Mandriva_2008.0_64bit.xml index 28935a6..09ea5ad 100755 --- a/config_Mandriva_2008.0_64bit.xml +++ b/config_Mandriva_2008.0_64bit.xml @@ -642,7 +642,7 @@ version="4.9.13" disable="false" installdiskspace="5615,51450,17231" - script="netgen-4.9.13.sh"/> + script="netgen.sh"/> Python + tcltk OpenCascade diff --git a/config_Mandriva_2010.0.xml b/config_Mandriva_2010.0.xml index 9136be0..4ac6cb2 100755 --- a/config_Mandriva_2010.0.xml +++ b/config_Mandriva_2010.0.xml @@ -642,7 +642,7 @@ version="4.9.13" disable="false" installdiskspace="5615,51450,17231" - script="netgen-4.9.13.sh"/> + script="netgen.sh"/> Python + tcltk OpenCascade diff --git a/config_Mandriva_2010.0_64bit.xml b/config_Mandriva_2010.0_64bit.xml index 08ac83b..f351ec2 100755 --- a/config_Mandriva_2010.0_64bit.xml +++ b/config_Mandriva_2010.0_64bit.xml @@ -642,7 +642,7 @@ version="4.9.13" disable="false" installdiskspace="5615,51450,17231" - script="netgen-4.9.13.sh"/> + script="netgen.sh"/> Python + tcltk OpenCascade diff --git a/config_Red_Hat_Enterprise_WS_4_64bit.xml b/config_Red_Hat_Enterprise_WS_4_64bit.xml index 3cc6cfa..f578eb2 100755 --- a/config_Red_Hat_Enterprise_WS_4_64bit.xml +++ b/config_Red_Hat_Enterprise_WS_4_64bit.xml @@ -642,7 +642,7 @@ version="4.9.13" disable="false" installdiskspace="5615,51450,17231" - script="netgen-4.9.13.sh"/> + script="netgen.sh"/> Python + tcltk OpenCascade diff --git a/config_Scientific_SL_5.1_64bit.xml b/config_Scientific_SL_5.1_64bit.xml index 4367064..feb27ff 100755 --- a/config_Scientific_SL_5.1_64bit.xml +++ b/config_Scientific_SL_5.1_64bit.xml @@ -642,7 +642,7 @@ version="4.9.13" disable="false" installdiskspace="5615,51450,17231" - script="netgen-4.9.13.sh"/> + script="netgen.sh"/> Python + tcltk OpenCascade diff --git a/config_files/netgen-4.9.13.sh b/config_files/netgen-4.9.13.sh deleted file mode 100755 index a4f470f..0000000 --- a/config_files/netgen-4.9.13.sh +++ /dev/null @@ -1,202 +0,0 @@ -#!/bin/bash -noprofile - -#################################################################################### -# File : netgen-4.9.13.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() -{ -# check existance of netgen -# unfortunarely we can't find anything about netgen version -if [ -n "$NETGENROOT" ]; then - return 0 -fi -return 1 -} - -print_env_bin() -{ -cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < Makefile.in.1 ; mv -f Makefile.in.1 Makefile.in ) - -# patch for gcc 4.3 -(cd ${PRODUCT_SRC_DIR}; sed -e "s%#include %#include \n#include %g" libsrc/include/mystdlib.h > libsrc/include/mystdlib.h.1 ; mv -f libsrc/include/mystdlib.h.1 libsrc/include/mystdlib.h ) - -# 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} - -#configure -NETGEN_CONFIGURE_OPTIONS="--with-occ=${CASROOT} --prefix=${PRODUCT_DIR}" -NETGEN_CONFIGURE_OPTIONS="${NETGEN_CONFIGURE_OPTIONS} --with-tcl=${TCLHOME}/lib --with-tk=${TCLHOME}/lib --with-tclinclude=${TCLHOME}/include" -if test `uname -m` = "x86_64" ; then - ./configure ${NETGEN_CONFIGURE_OPTIONS} CXXFLAGS='-O2 -m64' >> ${PRODUCT_DIR}/CONFIGURE.LOG -else - ./configure ${NETGEN_CONFIGURE_OPTIONS} CXXFLAGS=-O2 >> ${PRODUCT_DIR}/CONFIGURE.LOG -fi - -# compile -check_job ${PRODUCT_DIR}/MAKE.LOG make - -# install -check_job ${PRODUCT_DIR}/INSTALL.LOG make install - -for directory in general gprim linalg meshing ; do - cp -f ${PRODUCT_SRC_DIR}/libsrc/${directory}/*.hpp ${PRODUCT_DIR}/include -done -cp -f ${PRODUCT_SRC_DIR}/libsrc/include/mystdlib.h ${PRODUCT_SRC_DIR}/libsrc/include/mydefs.hpp ${PRODUCT_DIR}/include -cp -f ${PRODUCT_SRC_DIR}/libsrc/occ/occgeom.hpp ${PRODUCT_SRC_DIR}/libsrc/occ/occmeshsurf.hpp ${PRODUCT_DIR}/include - -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 -freetypedir=`printenv FREETYPEDIR` -ftgldir=`printenv FTGLDIR` -gl2psdir=`printenv GL2PSHOME` -freeimagedir=`printenv FREEIMAGEDIR` -tbbbasedir=`printenv TBBHOME` - -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 - -tbbdir=${tbbbasedir}/lib/$TBBMODE - - if [ -n "${freetypedir}" ] && [ -d "${freetypedir}" ] ; then - sed -e "s%\(.*\)\([[:space:]].*-L.*/freetype-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freetypedir}/lib \3%g" \ - -e 's%\(.*\)\([[:space:]].*libfreetype.la\)\(.*\)%\1 -lfreetype \3%g' libnglib.la > _libnglib.la - mv -f _libnglib.la libnglib.la - fi - chmod a+x libnglib.la - if [ -n "${ftgldir}" ] && [ -d "${ftgldir}" ] ; then - sed -e "s%\(.*\)\([[:space:]].*-L.*/ftgl-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${ftgldir}/lib \3%g" \ - -e 's%\(.*\)\([[:space:]].*libftgl.la\)\(.*\)%\1 -lftgl \3%g' libnglib.la > _libnglib.la - mv -f _libnglib.la libnglib.la - fi - chmod a+x libnglib.la - if [ -n "${gl2psdir}" ] && [ -d "${gl2psdir}" ] ; then - sed -e "s%\(.*\)\([[:space:]].*-L.*/gl2ps-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${gl2psdir}/lib \3%g" libnglib.la > _libnglib.la - mv -f _libnglib.la libnglib.la - fi - chmod a+x libnglib.la - if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then - sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" libnglib.la > _libnglib.la - mv -f _libnglib.la libnglib.la - fi - chmod a+x libnglib.la - if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then - sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9][0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" libnglib.la > _libnglib.la - mv -f _libnglib.la libnglib.la - fi - chmod a+x libnglib.la - if [ -n "${tbbdir}" ] && [ -d "${tbbdir}" ] ; then - sed -e "s%\(.*\)\([[:space:]].*-L.*/tbb[^[:space:]]*/lib[^[:space:]]*\)\(.*\)%\1 -L${tbbdir} \3%g" libnglib.la > _libnglib.la - mv -f _libnglib.la libnglib.la - fi - chmod a+x libnglib.la - -sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g;s%[[:space:]]-L[^[:space:]]*\(OCCT\|CAS\)[^[:space:]]*/lib\?% -L${CASROOT}/lib%g;s%[[:space:]][^[:space:]]*\(OCCT\|CAS\)[^[:space:]]*/lib/lib\?% ${CASROOT}/lib/lib%g" libnglib.la - -# 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="netgen-4.9.13" -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/netgen.sh b/config_files/netgen.sh new file mode 100755 index 0000000..b24b81a --- /dev/null +++ b/config_files/netgen.sh @@ -0,0 +1,207 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : netgen.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. +# +#################################################################################### + +# +# netgen version +# +NETGEN_VERSION=4.9.13 + +check_version() +{ +# check existance of netgen +# unfortunarely we can't find anything about netgen version +if [ -n "$NETGENROOT" ]; then + return 0 +fi +return 1 +} + +print_env_bin() +{ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <%#include \n#include %g" libsrc/include/mystdlib.h ) + +# 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} + +# configure +NETGEN_CONFIGURE_OPTIONS="--with-occ=${CASROOT} --prefix=${PRODUCT_DIR}" +NETGEN_CONFIGURE_OPTIONS="${NETGEN_CONFIGURE_OPTIONS} --with-tcl=${TCLHOME}/lib --with-tk=${TCLHOME}/lib --with-tclinclude=${TCLHOME}/include" +if test `uname -m` = "x86_64" ; then + ./configure ${NETGEN_CONFIGURE_OPTIONS} CXXFLAGS='-O2 -m64' >> ${PRODUCT_DIR}/CONFIGURE.LOG +else + ./configure ${NETGEN_CONFIGURE_OPTIONS} CXXFLAGS=-O2 >> ${PRODUCT_DIR}/CONFIGURE.LOG +fi + +# compile +check_job ${PRODUCT_DIR}/MAKE.LOG make + +# install +check_job ${PRODUCT_DIR}/INSTALL.LOG make install + +for directory in general gprim linalg meshing ; do + cp -f ${PRODUCT_SRC_DIR}/libsrc/${directory}/*.hpp ${PRODUCT_DIR}/include +done +cp -f ${PRODUCT_SRC_DIR}/libsrc/include/mystdlib.h ${PRODUCT_SRC_DIR}/libsrc/include/mydefs.hpp ${PRODUCT_DIR}/include +cp -f ${PRODUCT_SRC_DIR}/libsrc/occ/occgeom.hpp ${PRODUCT_SRC_DIR}/libsrc/occ/occmeshsurf.hpp ${PRODUCT_DIR}/include + +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 +freetypedir=`printenv FREETYPEDIR` +ftgldir=`printenv FTGLDIR` +gl2psdir=`printenv GL2PSHOME` +freeimagedir=`printenv FREEIMAGEDIR` +tbbbasedir=`printenv TBBHOME` + +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 + +tbbdir=${tbbbasedir}/lib/$TBBMODE + +if [ -n "${freetypedir}" ] && [ -d "${freetypedir}" ] ; then + sed -e "s%\(.*\)\([[:space:]].*-L.*/freetype-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freetypedir}/lib \3%g" \ + -e 's%\(.*\)\([[:space:]].*libfreetype.la\)\(.*\)%\1 -lfreetype \3%g' libnglib.la > _libnglib.la + mv -f _libnglib.la libnglib.la +fi +chmod a+x libnglib.la +if [ -n "${ftgldir}" ] && [ -d "${ftgldir}" ] ; then + sed -e "s%\(.*\)\([[:space:]].*-L.*/ftgl-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${ftgldir}/lib \3%g" \ + -e 's%\(.*\)\([[:space:]].*libftgl.la\)\(.*\)%\1 -lftgl \3%g' libnglib.la > _libnglib.la + mv -f _libnglib.la libnglib.la +fi +chmod a+x libnglib.la +if [ -n "${gl2psdir}" ] && [ -d "${gl2psdir}" ] ; then + sed -e "s%\(.*\)\([[:space:]].*-L.*/gl2ps-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${gl2psdir}/lib \3%g" libnglib.la > _libnglib.la + mv -f _libnglib.la libnglib.la +fi +chmod a+x libnglib.la +if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then + sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" libnglib.la > _libnglib.la + mv -f _libnglib.la libnglib.la +fi +chmod a+x libnglib.la +if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then + sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9][0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" libnglib.la > _libnglib.la + mv -f _libnglib.la libnglib.la +fi +chmod a+x libnglib.la +if [ -n "${tbbdir}" ] && [ -d "${tbbdir}" ] ; then + sed -e "s%\(.*\)\([[:space:]].*-L.*/tbb[^[:space:]]*/lib[^[:space:]]*\)\(.*\)%\1 -L${tbbdir} \3%g" libnglib.la > _libnglib.la + mv -f _libnglib.la libnglib.la +fi +chmod a+x libnglib.la + +sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g;s%[[:space:]]-L[^[:space:]]*\(OCCT\|CAS\)[^[:space:]]*/lib\?% -L${CASROOT}/lib%g;s%[[:space:]][^[:space:]]*\(OCCT\|CAS\)[^[:space:]]*/lib/lib\?% ${CASROOT}/lib/lib%g" libnglib.la + +# 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="netgen-4.9.13" +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