From 3222fa0a5ebba6ae7672fc2aeec11c4f19b3b9cc Mon Sep 17 00:00:00 2001 From: inv Date: Wed, 4 Apr 2012 07:38:53 +0000 Subject: [PATCH] SALOME 6.5.0 preparation: update script for netgen (4.9.13) --- config_CentOS_5.5_64bit.xml | 3 +- config_Debian_4.0.xml | 3 +- config_Debian_4.0_64bit.xml | 3 +- config_Debian_5.0_64bit.xml | 3 +- config_Debian_6.0_64bit.xml | 3 +- config_Mandriva_2008.0.xml | 3 +- config_Mandriva_2008.0_64bit.xml | 3 +- config_Mandriva_2010.0.xml | 3 +- config_Mandriva_2010.0_64bit.xml | 3 +- config_Red_Hat_Enterprise_WS_4_64bit.xml | 3 +- config_Scientific_SL_5.1_64bit.xml | 3 +- config_files/{netgen-4.9.13.sh => netgen.sh} | 85 +++++++++++--------- 12 files changed, 67 insertions(+), 51 deletions(-) rename config_files/{netgen-4.9.13.sh => netgen.sh} (67%) 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.sh similarity index 67% rename from config_files/netgen-4.9.13.sh rename to config_files/netgen.sh index a4f470f..b24b81a 100755 --- a/config_files/netgen-4.9.13.sh +++ b/config_files/netgen.sh @@ -1,17 +1,22 @@ #!/bin/bash -noprofile #################################################################################### -# File : netgen-4.9.13.sh +# 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-2008 CEA +# 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 @@ -59,18 +64,18 @@ source ${INSTALL_WORK}/$SHRC check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT} # apply general patch for SALOME -if [ -f patches/netgen-4.9.13-for-SALOME.patch ] ; then - cp patches/netgen-4.9.13-for-SALOME.patch ${PRODUCT_SRC_DIR} - ( cd ${PRODUCT_SRC_DIR}; patch -p1 < netgen-4.9.13-for-SALOME.patch ) +if [ -f patches/netgen-${NETGEN_VERSION}-for-SALOME.patch ] ; then + cp patches/netgen-${NETGEN_VERSION}-for-SALOME.patch ${PRODUCT_SRC_DIR} + ( cd ${PRODUCT_SRC_DIR}; patch -p1 < netgen-${NETGEN_VERSION}-for-SALOME.patch ) fi # to make nglib only: # -SUBDIRS = libsrc ng nglib tutorials doc windows # +SUBDIRS = libsrc nglib #ng tutorials doc windows -(cd ${PRODUCT_SRC_DIR}; sed -e "s/ng nglib/nglib #ng/g" Makefile.in > Makefile.in.1 ; mv -f Makefile.in.1 Makefile.in ) +( cd ${PRODUCT_SRC_DIR} && sed -i "s/ng nglib/nglib #ng/g" 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 ) +( cd ${PRODUCT_SRC_DIR} && sed -i "s%#include %#include \n#include %g" libsrc/include/mystdlib.h ) # to generate environment scripts try_preinstalled @@ -86,7 +91,7 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} cd ${PRODUCT_SRC_DIR} -#configure +# 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 @@ -145,38 +150,38 @@ 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 +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 -- 2.39.2