From 667b27408fe8c9e2e077135239386383a790984c Mon Sep 17 00:00:00 2001 From: inv Date: Fri, 18 Mar 2011 08:28:05 +0000 Subject: [PATCH] Update for Salome 6.3.0 --- config_Debian_4.0_64bit.xml | 124 ++- config_Debian_6.0_64bit.xml | 124 ++- config_files/ATOMGEN.sh | 143 ++++ config_files/ATOMIC.sh | 143 ++++ config_files/ATOMSOLV.sh | 143 ++++ .../{BOOST-1.40.0.sh => BOOST-1.46.0.sh} | 44 +- config_files/PARAVIS.sh | 1 + config_files/ParaView-3.10.sh | 294 +++++++ config_files/TUTORIAL.sh | 75 ++ config_files/build.csh | 2 +- config_files/build.sh | 2 +- .../{cmake-2.8.0.sh => cmake-2.8.4.sh} | 4 +- .../{docutils-0.6.0.sh => docutils-0.7.0.sh} | 4 +- .../{doxygen-1.6.1.sh => doxygen-1.7.3.sh} | 4 +- ...{graphviz-2.24.0.sh => graphviz-2.26.3.sh} | 4 +- .../{libxml2-2.7.7.sh => libxml2-2.7.8.sh} | 9 +- config_files/med-3.0.0.sh | 232 ++++++ .../{netgen-4.5.sh => netgen-4.9.13.sh} | 49 +- .../{numpy-1.3.0.sh => numpy-1.5.1.sh} | 36 +- .../{omniORB-4.1.4.sh => omniORB-4.1.5.sh} | 12 +- config_files/patches/libxml2_2.7.8.patch | 13 + .../patches/netgen-4.9.13-for-SALOME.patch | 737 ++++++++++++++++++ .../patches/paraview-3.10.0-depend.patch | 15 + .../{scotch-4.0.sh => scotch-5.1.11.sh} | 14 +- .../{sphinx-1.0.4.sh => sphinx-1.0.7.sh} | 12 +- 25 files changed, 2087 insertions(+), 153 deletions(-) create mode 100755 config_files/ATOMGEN.sh create mode 100755 config_files/ATOMIC.sh create mode 100755 config_files/ATOMSOLV.sh rename config_files/{BOOST-1.40.0.sh => BOOST-1.46.0.sh} (84%) create mode 100755 config_files/ParaView-3.10.sh create mode 100755 config_files/TUTORIAL.sh rename config_files/{cmake-2.8.0.sh => cmake-2.8.4.sh} (98%) rename config_files/{docutils-0.6.0.sh => docutils-0.7.0.sh} (98%) rename config_files/{doxygen-1.6.1.sh => doxygen-1.7.3.sh} (98%) rename config_files/{graphviz-2.24.0.sh => graphviz-2.26.3.sh} (98%) rename config_files/{libxml2-2.7.7.sh => libxml2-2.7.8.sh} (94%) create mode 100755 config_files/med-3.0.0.sh rename config_files/{netgen-4.5.sh => netgen-4.9.13.sh} (74%) rename config_files/{numpy-1.3.0.sh => numpy-1.5.1.sh} (82%) rename config_files/{omniORB-4.1.4.sh => omniORB-4.1.5.sh} (96%) create mode 100755 config_files/patches/libxml2_2.7.8.patch create mode 100755 config_files/patches/netgen-4.9.13-for-SALOME.patch create mode 100755 config_files/patches/paraview-3.10.0-depend.patch rename config_files/{scotch-4.0.sh => scotch-5.1.11.sh} (92%) rename config_files/{sphinx-1.0.4.sh => sphinx-1.0.7.sh} (94%) diff --git a/config_Debian_4.0_64bit.xml b/config_Debian_4.0_64bit.xml index 837a3d3..cd96300 100755 --- a/config_Debian_4.0_64bit.xml +++ b/config_Debian_4.0_64bit.xml @@ -2,7 +2,7 @@ + + + + + + + + + @@ -276,6 +303,16 @@ installdiskspace="115800,115800,115800" script="SAMPLES.sh"/> + + + @@ -371,10 +408,10 @@ type="prerequisite" description="Free peer-reviewed portable STL extension"> + script="BOOST-1.46.0.sh"/> + script="omniORB-4.1.5.sh"/> + script="med-3.0.0.sh"/> + script="scotch-5.1.11.sh"/> + script="cmake-2.8.4.sh"/> + script="ParaView-3.10.sh"/> + script="numpy-1.5.1.sh"/> + script="graphviz-2.26.3.sh"/> + script="doxygen-1.7.3.sh"/> + script="docutils-0.7.0.sh"/> + script="sphinx-1.0.7.sh"/> + script="netgen-4.9.13.sh"/> + script="libxml2-2.7.8.sh"/> @@ -977,6 +1014,8 @@ tcltk Hdf cmake + Qt + boost Python @@ -1029,6 +1068,35 @@ Qt HXX2SALOMEDOC + + Python + Qt + PyQt + OmniORB + KERNEL + GUI + + + Python + Qt + OmniORB + ParaView + OpenCascade + KERNEL + GUI + ATOMGEN + + + Python + Qt + OmniORB + ParaView + Hdf + OpenCascade + Doxygen + Graphviz + KERNEL + GUI + - diff --git a/config_Debian_6.0_64bit.xml b/config_Debian_6.0_64bit.xml index ae5f6c5..12a7077 100755 --- a/config_Debian_6.0_64bit.xml +++ b/config_Debian_6.0_64bit.xml @@ -2,7 +2,7 @@ + + + + + + + + + @@ -276,6 +303,16 @@ installdiskspace="115800,115800,115800" script="SAMPLES.sh"/> + + + @@ -371,10 +408,10 @@ type="prerequisite" description="Free peer-reviewed portable STL extension"> + script="BOOST-1.46.0.sh"/> + script="omniORB-4.1.5.sh"/> + script="med-3.0.0.sh"/> + script="scotch-5.1.11.sh"/> + script="cmake-2.8.4.sh"/> + script="ParaView-3.10.sh"/> + script="numpy-1.5.1.sh"/> + script="graphviz-2.26.3.sh"/> + script="doxygen-1.7.3.sh"/> + script="docutils-0.7.0.sh"/> + script="sphinx-1.0.7.sh"/> + script="netgen-4.9.13.sh"/> + script="libxml2-2.7.8.sh"/> @@ -977,6 +1014,8 @@ tcltk Hdf cmake + Qt + boost Python @@ -1029,6 +1068,35 @@ Qt HXX2SALOMEDOC + + Python + Qt + PyQt + OmniORB + KERNEL + GUI + + + Python + Qt + OmniORB + ParaView + OpenCascade + KERNEL + GUI + ATOMGEN + + + Python + Qt + OmniORB + ParaView + Hdf + OpenCascade + Doxygen + Graphviz + KERNEL + GUI + - diff --git a/config_files/ATOMGEN.sh b/config_files/ATOMGEN.sh new file mode 100755 index 0000000..9d78230 --- /dev/null +++ b/config_files/ATOMGEN.sh @@ -0,0 +1,143 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : ATOMGEN.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 [ -n "${ATOMGEN_ROOT_DIR}" ]; then + check_lib_version VERSION ${ATOMGEN_ROOT_DIR}/bin/salome + if [ "$?" -eq "0" ]; then + ver=`cat ${ATOMGEN_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` + if [ "$ver" = "${SALOME_VERSION}" ]; then + return 0 + fi + fi +elif [ -n "${ATOMGEN_SRC_DIR}" ]; then + check_salome_src_version ATOMGEN_SRC_DIR + if [ $? -eq 0 ] ; then return 0 ; fi + return 1 +fi +return 1 +} + +print_env_bin(){ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <> ${PRODUCT_DIR}/BUILD.LOG < ./tools/jam/src/${binfolder}/bjam ${OPTIONS} >> ${PRODUCT_DIR}/INSTALL.LOG" -./tools/jam/src/${binfolder}/bjam ${OPTIONS} >> ${PRODUCT_DIR}/INSTALL.LOG 2> $INSTALL_WORK/errlog +echo "`pwd` -> ./tools/build/v2/engine/src/${binfolder}/bjam ${OPTIONS} >> ${PRODUCT_DIR}/INSTALL.LOG" +./tools/build/v2/engine/src/${binfolder}/bjam ${OPTIONS} >> ${PRODUCT_DIR}/INSTALL.LOG 2> $INSTALL_WORK/errlog if [ "$?" -ne "0" ] ; then cat ${PRODUCT_DIR}/INSTALL.LOG @@ -145,22 +145,22 @@ if [ "$?" -ne "0" ] ; then fi # create additional links for libraries -cd ${PRODUCT_DIR}/lib - -maj_ver=`gcc -dumpversion | awk -F[.-] '{if(NF>0) print $1; else print 0}'` -min_ver=`gcc -dumpversion | awk -F[.-] '{if(NF>1) print $2; else print 0}'` -gcc_ver=$maj_ver$min_ver - -listlib=`find . -name "libboost_*-gcc${gcc_ver}-mt-${BOOST_VVERSION}.so" -exec basename {} ";" | sed -e "s%libboost_\(.*\)-gcc${gcc_ver}-mt-${BOOST_VVERSION}.so%\1%g"` - -for aLib in XXX $listlib ; do - if [ "$aLib" == "XXX" ] ; then continue ; fi - aLibLink=libboost_${aLib}-mt.so - aLib=libboost_${aLib}-gcc${gcc_ver}-mt-${BOOST_VVERSION}.so - if [ -f ${aLib} ] && [ ! -e ${aLibLink} ] ; then - ln -sf ${aLib} ${aLibLink} - fi -done +#cd ${PRODUCT_DIR}/lib + +#maj_ver=`gcc -dumpversion | awk -F[.-] '{if(NF>0) print $1; else print 0}'` +#min_ver=`gcc -dumpversion | awk -F[.-] '{if(NF>1) print $2; else print 0}'` +#gcc_ver=$maj_ver$min_ver + +#listlib=`find . -name "libboost_*-gcc${gcc_ver}-mt-${BOOST_VVERSION}.so" -exec basename {} ";" | sed -e "s%libboost_\(.*\)-gcc${gcc_ver}-mt-${BOOST_VVERSION}.so%\1%g"` + +#for aLib in XXX $listlib ; do +# if [ "$aLib" == "XXX" ] ; then continue ; fi +# aLibLink=libboost_${aLib}-mt.so +# aLib=libboost_${aLib}-gcc${gcc_ver}-mt-${BOOST_VVERSION}.so +# if [ -f ${aLib} ] && [ ! -e ${aLibLink} ] ; then +# ln -sf ${aLib} ${aLibLink} +# fi +#done cd ${PRODUCT_DIR}; diff --git a/config_files/PARAVIS.sh b/config_files/PARAVIS.sh index 5eb3535..a50fa2e 100755 --- a/config_files/PARAVIS.sh +++ b/config_files/PARAVIS.sh @@ -33,6 +33,7 @@ print_env_bin(){ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <& /dev/null || \ + sed -i "s%\([[:space:]]*\)PyVTKSpecialObject.h%\1PyVTKSpecialObject.h\n\1PyVTKMutableObject.h%g" \ + VTK/Wrapping/Python/CMakeLists.txt ) +fi + +# 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} + +export PRODUCT_BUILD_DIR=${PRODUCT_DIR}_build +mkdir ${PRODUCT_BUILD_DIR} +cd ${PRODUCT_BUILD_DIR} +# get Python and tcl/tk version +python_version="`python -c 'import sys; print sys.version[:3]'`" +tcl_version="" +tcl_includes="" +tcl_libs="" +tcldir="`where_tcl`" +if [ $? -eq 0 ] && [ -e ${tcldir}/tclConfig.sh ] ; then + tcl_version=`grep -e "TCL_VERSION=.*" ${tcldir}/tclConfig.sh | sed -e "s%TCL_VERSION=[\'|\"]\(.*\)[\'|\"]%\1%g"` + tcl_includes=`grep -e "TCL_INCLUDE_SPEC=.*" ${tcldir}/tclConfig.sh | sed -e "s%TCL_INCLUDE_SPEC=[\'|\"]-I\(.*\)[\'|\"]%\1%g"` + if [ -z "$tcl_includes" ] ; then tcl_includes=/usr/include ; fi + tcl_libs=`grep -e "TCL_PACKAGE_PATH=.*" ${tcldir}/tclConfig.sh | sed -e "s%TCL_PACKAGE_PATH=[\'|\"]\(.*\)[\'|\"]%\1%g"` +fi + +CMAKE_OPTIONS="" + +### common settings +CMAKE_OPTIONS=$CMAKE_OPTIONS" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_DIR}" +CMAKE_OPTIONS=$CMAKE_OPTIONS" -DCMAKE_BUILD_TYPE:STRING=Release" +CMAKE_OPTIONS=$CMAKE_OPTIONS" -DBUILD_SHARED_LIBS:BOOL=ON" + +### compiler settings +CMAKE_OPTIONS=$CMAKE_OPTIONS" -DVTK_HAVE_GETSOCKNAME_WITH_SOCKLEN_T=1" +CMAKE_OPTIONS=$CMAKE_OPTIONS" -DCMAKE_CXX_COMPILER:STRING=`which g++`" +CMAKE_OPTIONS=$CMAKE_OPTIONS" -DCMAKE_C_COMPILER:STRING=`which gcc`" +### compiler settings for 64 bit platforms +if test `uname -m` = "x86_64" ; then + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DCMAKE_CXX_FLAGS:STRING=-m64" + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DCMAKE_C_FLAGS:STRING=-m64" +fi + +### Paraview general settings +CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_INSTALL_DEVELOPMENT:BOOL=ON" + +### VTK general settings +CMAKE_OPTIONS=$CMAKE_OPTIONS" -DVTK_USE_HYBRID:BOOL=ON" +CMAKE_OPTIONS=$CMAKE_OPTIONS" -DVTK_USE_GL2PS:BOOL=ON" +CMAKE_OPTIONS=$CMAKE_OPTIONS" -DVTK_USE_PARALLEL:BOOL=ON" +CMAKE_OPTIONS=$CMAKE_OPTIONS" -DVTK_USE_PATENTED:BOOL=OFF" +CMAKE_OPTIONS=$CMAKE_OPTIONS" -DVTK_USE_RENDERING:BOOL=ON" +CMAKE_OPTIONS=$CMAKE_OPTIONS" -DVTK_USE_64BIT_IDS:BOOL=OFF" + +### Qt settings +CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_QT_GUI:BOOL=ON" +CMAKE_OPTIONS=$CMAKE_OPTIONS" -DVTK_QT_USE_WEBKIT:BOOL=ON" + +### Python settings +if [ "${python_version}" != "" ]; then + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_ENABLE_PYTHON:BOOL=ON" + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DVTK_WRAP_PYTHON:BOOL=ON" + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPYTHON_EXECUTABLE:STRING=${PYTHONROOT}/bin/python${python_version}" + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPYTHON_INCLUDE_PATH:STRING=${PYTHONROOT}/include/python${python_version}" + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPYTHON_LIBRARY:STRING=${PYTHONROOT}/lib/python${python_version}/config/libpython${python_version}.a" +fi + +### Tcl/Tk settings +if [ "${tcl_version}" != "" ] && [ "${tcl_includes}" != "" ] && [ "${tcl_libs}" != "" ] ; then + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DVTK_WRAP_TCL:BOOL=ON" + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DTCL_INCLUDE_PATH:STRING=${tcl_includes}" + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DTCL_LIBRARY:STRING=${tcl_libs}/libtcl${tcl_version}.so" + #CMAKE_OPTIONS=$CMAKE_OPTIONS" -DTCL_STUB_LIBRARY:STRING=${tcl_libs}/libtclstub${tcl_version}.a" + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DTCL_TCLSH:STRING=${TCLHOME}/bin/tclsh${tcl_version}" + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DTK_INCLUDE_PATH:STRING=${tcl_includes}" + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DTK_LIBRARY:STRING=${tcl_libs}/libtk${tcl_version}.so" + #CMAKE_OPTIONS=$CMAKE_OPTIONS" -DTK_STUB_LIBRARY:STRING=${tcl_libs}/libtkstub${tcl_version}.a" + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DTK_WISH:STRING=${TCLHOME}/bin/wish${tcl_version}" +fi + +### HDF5 settings +if [ "${HDF5HOME}" != "" ]; then + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_USE_SYSTEM_HDF5:BOOL=ON" + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DHDF5_INCLUDE_DIR:STRING=${HDF5HOME}/include" + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DHDF5_LIBRARY:STRING=${HDF5HOME}/lib/libhdf5.so" + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_H5PartReader:BOOL=OFF" +fi + +### VisIt Database bridge settings +CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_USE_VISITBRIDGE=ON" +CMAKE_OPTIONS=$CMAKE_OPTIONS" -DBOOST_ROOT=${BOOSTDIR}" + +### Mesa settings (if pre-installed) [OBSOLETE] +if [ -n "$MESA_HOME" ]; then + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DOPENGL_INCLUDE_DIR:STRING=${MESA_HOME}/include" + if test `uname -m` = "x86_64" ; then + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DOPENGL_gl_LIBRARY:STRING=${MESA_HOME}/lib64/libGL.so" + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DOPENGL_glu_LIBRARY:STRING=${MESA_HOME}/lib64/libGLU.so" + else + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DOPENGL_gl_LIBRARY:STRING=${MESA_HOME}/lib/libGL.so" + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DOPENGL_glu_LIBRARY:STRING=${MESA_HOME}/lib/libGLU.so" + fi + CMAKE_OPTIONS=$CMAKE_OPTIONS" -DOPENGL_xmesa_INCLUDE_DIR:STRING=${MESA_HOME}/include" +fi + +cat > ${PRODUCT_DIR}/CONFIGURE.LOG < ${PRODUCT_DIR}/MAKE.LOG < ${f}.new + mv -f ${f}.new ${f} +done + + +# 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="ParaView-${PVVERSION}" +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/TUTORIAL.sh b/config_files/TUTORIAL.sh new file mode 100755 index 0000000..62f552a --- /dev/null +++ b/config_files/TUTORIAL.sh @@ -0,0 +1,75 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : TUTORIAL.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(){ +# There is no possibility to check version number +return 0 +} + +print_env_bin(){ +return 1 +} + +print_env_src(){ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < /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 < 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 +sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmedimportcxx.la > libmedimportcxx.la.new +mv -f libmedimportcxx.la.new libmedimportcxx.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.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 diff --git a/config_files/netgen-4.5.sh b/config_files/netgen-4.9.13.sh similarity index 74% rename from config_files/netgen-4.5.sh rename to config_files/netgen-4.9.13.sh index dc0e53e..9691200 100755 --- a/config_files/netgen-4.5.sh +++ b/config_files/netgen-4.9.13.sh @@ -1,7 +1,7 @@ #!/bin/bash -noprofile #################################################################################### -# File : netgen-4.5.sh +# 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 @@ -58,21 +58,15 @@ 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.5-for-SALOME.patch ] ; then - cp patches/netgen-4.5-for-SALOME.patch ${PRODUCT_SRC_DIR} - ( cd ${PRODUCT_SRC_DIR}; patch -p1 < netgen-4.5-for-SALOME.patch ) +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 ) fi -# apply patch for 64-bit platforms -if test `uname -m` = "x86_64" ; then - if [ -f patches/netgen-4.5-lib64.patch ] ; then - cp patches/netgen-4.5-lib64.patch ${PRODUCT_SRC_DIR} - ( cd ${PRODUCT_SRC_DIR}; patch -p1 < netgen-4.5-lib64.patch ) - fi -fi - -# additional patching for SALOME -(cd ${PRODUCT_SRC_DIR}; cp ngtcltk/ngnewdelete.* libsrc/interface) +# 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 ) # 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 ) @@ -88,28 +82,29 @@ install_source # build sources test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} -# set platform type variable + +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 - export MACHINE=LINUX64 + check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${NETGEN_CONFIGURE_OPTIONS} CXXFLAGS='-O2 -m64' else - export MACHINE=LINUX + check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${NETGEN_CONFIGURE_OPTIONS} CXXFLAGS=-O2 fi # compile -for directory in csg general geom2d gprim interface linalg occ meshing opti stlgeom ; do - cd ${PRODUCT_SRC_DIR}/libsrc/${directory} - check_job ${PRODUCT_DIR}/MAKE.LOG make -done +check_job ${PRODUCT_DIR}/MAKE.LOG make # install -mkdir -p ${PRODUCT_DIR}/lib -cp -f ${PRODUCT_SRC_DIR}/lib/${MACHINE}/* ${PRODUCT_DIR}/lib -mkdir -p ${PRODUCT_DIR}/include -cp -f ${PRODUCT_SRC_DIR}/libsrc/interface/nglib.h ${PRODUCT_DIR}/include -for directory in csg general geom2d gprim linalg occ meshing opti stlgeom ; do +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}; @@ -146,7 +141,7 @@ export INSTALL_PRODUCTS=$7; shift REMOVE_SRC_TMP=$8; test $# == 10 && shift && SINGLE_DIR=$9 -export PRODUCT="netgen-4.5" +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 diff --git a/config_files/numpy-1.3.0.sh b/config_files/numpy-1.5.1.sh similarity index 82% rename from config_files/numpy-1.3.0.sh rename to config_files/numpy-1.5.1.sh index 624a3e7..049226b 100755 --- a/config_files/numpy-1.3.0.sh +++ b/config_files/numpy-1.5.1.sh @@ -1,7 +1,7 @@ #!/bin/bash -noprofile #################################################################################### -# File : numpy-1.3.0.sh +# File : numpy-1.5.1.sh # Created : Thu Dec 18 12:01:00 2002 # Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) # Project : SALOME @@ -54,25 +54,13 @@ source ${INSTALL_WORK}/$SHRC makedir ${PRODUCT_SRC_DIR} # unpack -is_debian31=0 +export LAPACKSUFF="3.3" -if [ -e /etc/issue ] ; then - grep -e "Debian GNU/Linux 3.1" /etc/issue > /dev/null - if [ $? == 0 ] ; then is_debian31=1 ; fi -fi - -if [ $is_debian31 == 1 ] ; then -export LAPACKSUFF="3.1.1" -else -export LAPACKSUFF="3.2" -fi - -export LD_LIBRARY_PATH=${PRODUCT_SRC_DIR}/lapack-${LAPACKSUFF}_SRC:${LD_LIBRARY_PATH} +export LD_LIBRARY_PATH=${PRODUCT_SRC_DIR}/lapack-${LAPACKSUFF}_SRC/lib:${LD_LIBRARY_PATH} check_jb tar xfz ${SOURCE_DIR}/lapack-${LAPACKSUFF}.tar.gz -C ${PRODUCT_SRC_DIR} - -check_jb tar xfz ${SOURCE_DIR}/numpy-1.3.0.tar.gz -C ${PRODUCT_SRC_DIR} +check_jb tar xfz ${SOURCE_DIR}/numpy-1.5.1.tar.gz -C ${PRODUCT_SRC_DIR} # to generate environment scripts try_preinstalled @@ -86,15 +74,23 @@ install_source # build sources test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} +# lapck cmake options + +CMAKE_OPTIONS="-DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_SRC_DIR}/lapack-${LAPACKSUFF}_SRC -DBUILD_SHARED_LIBS:BOOL=ON" + # install GCC=`which gcc` cat >> ${PRODUCT_DIR}/MAKE.LOG < ++#include + + #include "meshing.hpp" + +@@ -650,7 +651,7 @@ + + double det = trans.Det(); + +- if (det <= 0) ++ if (det <= DBL_MIN) + err += 1e12; + else + err += frob * frob / det; +@@ -706,7 +707,7 @@ + + double det = trans(0,0)*trans(1,1)-trans(1,0)*trans(0,1); + +- if (det <= 0) ++ if (det <= DBL_MIN) + { + dd = 0; + return 1e12; +@@ -790,7 +791,7 @@ + = dtrans(0,0) * trans(1,1) - trans(0,1) * dtrans(1,0) + + trans(0,0) * dtrans(1,1) - dtrans(0,1) * trans(1,0); + +- if (det <= 0) ++ if (det <= DBL_MIN) + err += 1e12; + else + { +@@ -840,7 +841,7 @@ + frob /= 2; + + double det = trans.Det(); +- if (det <= 0) ++ if (det <= DBL_MIN) + err += 1e12; + else + err += frob * frob / det; +@@ -1857,7 +1858,7 @@ + case PYRAMID: + { + double noz = 1-p(2); +- if (noz == 0.0) noz = 1e-10; ++ if (noz <= DBL_MIN) noz = 1e-10; + + double xi = p(0) / noz; + double eta = p(1) / noz; +@@ -2035,7 +2036,7 @@ + + double det = -trans.Det(); + +- if (det <= 0) ++ if (det <= DBL_MIN) + err += 1e12; + else + err += frob * frob * frob / det; +@@ -2107,7 +2108,7 @@ + ddet *= -1; + + +- if (det <= 0) ++ if (det <= DBL_MIN) + err += 1e12; + else + { +@@ -2189,7 +2190,7 @@ + + det *= -1; + +- if (det <= 0) ++ if (det <= DBL_MIN) + err += 1e12; + else + { +@@ -2522,10 +2523,10 @@ + + MeshingParameters :: MeshingParameters () + { +- optimize3d = "cmdmustm"; ++ optimize3d = (char*)"cmdmustm"; + //optimize3d = "cmdmstm"; + optsteps3d = 3; +- optimize2d = "smsmsmSmSmSm"; ++ optimize2d = (char*)"smsmsmSmSmSm"; + optsteps2d = 3; + opterrpow = 2; + blockfill = 1; +diff -Naur netgen-4.9.13_orig/libsrc/meshing/meshtype.hpp netgen-4.9.13_new/libsrc/meshing/meshtype.hpp +--- netgen-4.9.13_orig/libsrc/meshing/meshtype.hpp 2009-11-09 13:50:43.000000000 +0300 ++++ netgen-4.9.13_new/libsrc/meshing/meshtype.hpp 2011-02-18 11:24:03.000000000 +0300 +@@ -12,7 +12,7 @@ + Classes for NETGEN + */ + +- ++class Mesh; + enum ELEMENT_TYPE { + SEGMENT = 1, SEGMENT3 = 2, + TRIG = 10, QUAD=11, TRIG6 = 12, QUAD6 = 13, QUAD8 = 14, +diff -Naur netgen-4.9.13_orig/libsrc/meshing/smoothing2.cpp netgen-4.9.13_new/libsrc/meshing/smoothing2.cpp +--- netgen-4.9.13_orig/libsrc/meshing/smoothing2.cpp 2009-11-09 13:47:09.000000000 +0300 ++++ netgen-4.9.13_new/libsrc/meshing/smoothing2.cpp 2011-02-18 16:24:34.000000000 +0300 +@@ -302,7 +302,8 @@ + vgrad = 0; + badness = 0; + +- meshthis -> GetNormalVector (surfi, sp1, gi1, n); ++ //meshthis -> GetNormalVector (surfi, sp1, gi1, n); ++ n = normal; + pp1 = sp1 + x(0) * t1 + x(1) * t2; + + // meshthis -> ProjectPoint (surfi, pp1); +@@ -360,7 +361,8 @@ + vgrad = 0; + badness = 0; + +- meshthis -> GetNormalVector (surfi, sp1, gi1, n); ++ //meshthis -> GetNormalVector (surfi, sp1, gi1, n); ++ n = normal; + + pp1 = sp1 + x(0) * t1 + x(1) * t2; + +@@ -514,7 +516,8 @@ + vgrad = 0; + badness = 0; + +- meshthis -> GetNormalVector (surfi, sp1, gi1, n); ++ //meshthis -> GetNormalVector (surfi, sp1, gi1, n); ++ n = normal; + + pp1 = sp1 + x(0) * t1 + x(1) * t2; + +@@ -586,7 +589,8 @@ + vgrad = 0; + badness = 0; + +- meshthis -> GetNormalVector (surfi, sp1, gi1, n); ++ //meshthis -> GetNormalVector (surfi, sp1, gi1, n); ++ n = normal; + + // pp1 = sp1; + // pp1.Add2 (x.Get(1), t1, x.Get(2), t2); +@@ -973,7 +977,7 @@ + { + mesh[pi] = Point<3> (origp); + } +- ++ break; + } + } + +diff -Naur netgen-4.9.13_orig/libsrc/occ/occconstruction.cpp netgen-4.9.13_new/libsrc/occ/occconstruction.cpp +--- netgen-4.9.13_orig/libsrc/occ/occconstruction.cpp 2009-08-24 06:32:47.000000000 +0400 ++++ netgen-4.9.13_new/libsrc/occ/occconstruction.cpp 2011-02-18 14:04:45.000000000 +0300 +@@ -28,7 +28,7 @@ + #include + #include + #include +-#include ++//#include + //#include + #include + #include +diff -Naur netgen-4.9.13_orig/libsrc/occ/occgenmesh.cpp netgen-4.9.13_new/libsrc/occ/occgenmesh.cpp +--- netgen-4.9.13_orig/libsrc/occ/occgenmesh.cpp 2010-03-16 09:30:07.000000000 +0300 ++++ netgen-4.9.13_new/libsrc/occ/occgenmesh.cpp 2011-02-18 17:06:25.000000000 +0300 +@@ -15,6 +15,7 @@ + + #define DIVIDEEDGESECTIONS 1000 + #define IGNORECURVELENGTH 1e-4 ++#define VSMALL 1e-10 + + + bool merge_solids = 1; +@@ -26,7 +27,7 @@ + double nq = n*q; + + Point<3> p = p0 + 0.5*n; +- double lambda = (p-l.p0)*n / nq; ++ double lambda = (fabs(nq) > 1e-10 ? (p-l.p0)*n / nq : -1); + + if (lambda >= 0 && lambda <= 1) + { +@@ -54,7 +55,7 @@ + + + +- double ComputeH (double kappa) ++ static double ComputeH (double kappa) + { + double hret; + kappa *= mparam.curvaturesafety; +@@ -62,7 +63,7 @@ + if (mparam.maxh * kappa < 1) + hret = mparam.maxh; + else +- hret = 1 / kappa; ++ hret = 1 / (kappa + VSMALL); + + if (mparam.maxh < hret) + hret = mparam.maxh; +@@ -73,7 +74,7 @@ + + + +- void RestrictHTriangle (gp_Pnt2d & par0, gp_Pnt2d & par1, gp_Pnt2d & par2, ++ static void RestrictHTriangle (gp_Pnt2d & par0, gp_Pnt2d & par1, gp_Pnt2d & par2, + BRepLProp_SLProps * prop, Mesh & mesh, int depth, double h = 0) + { + int ls = -1; +@@ -168,8 +169,8 @@ + if(h < 1e-4*maxside) + return; + +- +- if (h > 30) return; ++ // commented to restrict H on a large sphere for example ++ //if (h > 30) return; + } + + if (h < maxside && depth < 10) +@@ -228,7 +229,7 @@ + + + +- void DivideEdge (TopoDS_Edge & edge, Array & ps, ++ static void DivideEdge (TopoDS_Edge & edge, Array & ps, + Array & params, Mesh & mesh) + { + double s0, s1; +@@ -247,8 +248,8 @@ + hvalue[0] = 0; + pnt = c->Value(s0); + +- double olddist = 0; +- double dist = 0; ++ //double olddist = 0; ++ //double dist = 0; + + int tmpVal = (int)(DIVIDEEDGESECTIONS); + +@@ -256,15 +257,15 @@ + { + oldpnt = pnt; + pnt = c->Value(s0+(i/double(DIVIDEEDGESECTIONS))*(s1-s0)); +- hvalue[i] = hvalue[i-1] + +- 1.0/mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))* +- pnt.Distance(oldpnt); ++ hvalue[i] = hvalue[i-1] + min( 1.0, ++ 1.0/mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))* ++ pnt.Distance(oldpnt)); + + //(*testout) << "mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z())) " << mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z())) + // << " pnt.Distance(oldpnt) " << pnt.Distance(oldpnt) << endl; + +- olddist = dist; +- dist = pnt.Distance(oldpnt); ++ //olddist = dist; ++ //dist = pnt.Distance(oldpnt); + } + + // nsubedges = int(ceil(hvalue[DIVIDEEDGESECTIONS])); +@@ -323,6 +324,7 @@ + (*testout) << "nedges = " << nedges << endl; + + double eps = 1e-6 * geom.GetBoundingBox().Diam(); ++ const double eps2 = eps * eps; + + for (int i = 1; i <= nvertices; i++) + { +@@ -332,7 +334,7 @@ + bool exists = 0; + if (merge_solids) + for (PointIndex pi = 1; pi <= mesh.GetNP(); pi++) +- if ( Dist2 (mesh[pi], Point<3>(mp)) < eps*eps) ++ if ( Dist2 (mesh[pi], Point<3>(mp)) < eps2 ) + { + exists = 1; + break; +@@ -362,6 +364,7 @@ + { + TopoDS_Face face = TopoDS::Face(exp1.Current()); + int facenr = geom.fmap.FindIndex(face); ++ if ( facenr < 1 ) continue; // support of sub-meshes + + if (face2solid[0][facenr-1] == 0) + face2solid[0][facenr-1] = solidnr; +@@ -381,6 +384,7 @@ + int facenr = 0; + int edgenr = 0; + ++ edgenr = mesh.GetNSeg(); // support of sub-meshes + + (*testout) << "faces = " << geom.fmap.Extent() << endl; + int curr = 0; +@@ -442,6 +446,8 @@ + //(*testout) << "ignoring degenerated edge" << endl; + continue; + } ++ if ( geom.emap.FindIndex(edge) < 1 ) ++ continue; // support sub-meshes + + if (geom.vmap.FindIndex(TopExp::FirstVertex (edge)) == + geom.vmap.FindIndex(TopExp::LastVertex (edge))) +@@ -486,8 +492,8 @@ + pnums.Last() = -1; + for (PointIndex pi = 1; pi < first_ep; pi++) + { +- if (Dist2 (mesh[pi], fp) < eps*eps) pnums[0] = pi; +- if (Dist2 (mesh[pi], lp) < eps*eps) pnums.Last() = pi; ++ if (Dist2 (mesh[pi], fp) < eps2) pnums[0] = pi; ++ if (Dist2 (mesh[pi], lp) < eps2) pnums.Last() = pi; + } + } + +@@ -497,7 +503,7 @@ + bool exists = 0; + int j; + for (j = first_ep; j <= mesh.GetNP(); j++) +- if ((mesh.Point(j)-Point<3>(mp[i-1])).Length() < eps) ++ if ((mesh.Point(j)-Point<3>(mp[i-1])).Length() < eps2) + { + exists = 1; + break; +@@ -633,7 +639,7 @@ + } + + (*testout) << "mesh face " << k << endl; +- multithread.percent = 100 * k / (mesh.GetNFD()+1e-10); ++ multithread.percent = 100 * k / (mesh.GetNFD() + VSMALL); + geom.facemeshstatus[k-1] = -1; + + +@@ -901,7 +907,7 @@ + // if (k != 36) continue; + + // (*testout) << "optimize face " << k << endl; +- multithread.percent = 100 * k / (mesh.GetNFD()+1e-10); ++ multithread.percent = 100 * k / (mesh.GetNFD() + VSMALL); + + FaceDescriptor & fd = mesh.GetFaceDescriptor(k); + +@@ -1229,7 +1235,7 @@ + mindist = min (mindist, line.Dist(lines[num])); + } + +- mindist *= occparam.resthcloseedgefac; ++ mindist /= (occparam.resthcloseedgefac + VSMALL); + + if (mindist < 1e-3) + { +@@ -1456,3 +1462,4 @@ + } + + #endif ++ +diff -Naur netgen-4.9.13_orig/libsrc/occ/occgeom.cpp netgen-4.9.13_new/libsrc/occ/occgeom.cpp +--- netgen-4.9.13_orig/libsrc/occ/occgeom.cpp 2010-03-05 16:16:21.000000000 +0300 ++++ netgen-4.9.13_new/libsrc/occ/occgeom.cpp 2011-02-18 15:34:01.000000000 +0300 +@@ -7,7 +7,8 @@ + #include "ShapeAnalysis_ShapeContents.hxx" + #include "ShapeAnalysis_CheckSmallFace.hxx" + #include "ShapeAnalysis_DataMapOfShapeListOfReal.hxx" +-#include "ShapeAnalysis_Surface.hxx" ++#include ++#include + #include "BRepAlgoAPI_Fuse.hxx" + #include "BRepCheck_Analyzer.hxx" + #include "BRepLib.hxx" +@@ -15,11 +16,18 @@ + #include "ShapeFix.hxx" + #include "ShapeFix_FixSmallFace.hxx" + #include "Partition_Spliter.hxx" +- ++#include + + namespace netgen + { +- void OCCGeometry :: PrintNrShapes () ++ OCCGeometry::~OCCGeometry() ++ { ++ NCollection_DataMap::Iterator it(fclsmap); ++ for (; it.More(); it.Next()) ++ delete it.Value(); ++ } ++ ++ void OCCGeometry :: PrintNrShapes () + { + TopExp_Explorer e; + int count = 0; +@@ -952,24 +960,47 @@ + + + ++ void OCCGeometry::GetFaceTools(int surfi, Handle(ShapeAnalysis_Surface)& proj, ++ BRepTopAdaptor_FClass2d*& cls) const ++ { ++ //MSV: organize caching projector in the map ++ if (fprjmap.IsBound(surfi)) ++ { ++ proj = fprjmap.Find(surfi); ++ cls = fclsmap.Find(surfi); ++ } ++ else ++ { ++ const TopoDS_Face& aFace = TopoDS::Face(fmap(surfi)); ++ Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace); ++ proj = new ShapeAnalysis_Surface(aSurf); ++ fprjmap.Bind(surfi, proj); ++ cls = new BRepTopAdaptor_FClass2d(aFace,Precision::Confusion()); ++ fclsmap.Bind(surfi, cls); ++ } ++ } + +- void OCCGeometry :: Project (int surfi, Point<3> & p) const ++ bool OCCGeometry :: Project (int surfi, Point<3> & p, double& u, double& v) const + { + static int cnt = 0; + if (++cnt % 1000 == 0) cout << "Project cnt = " << cnt << endl; + + gp_Pnt pnt(p(0), p(1), p(2)); +- +- double u,v; +- Handle( Geom_Surface ) thesurf = BRep_Tool::Surface(TopoDS::Face(fmap(surfi))); +- Handle( ShapeAnalysis_Surface ) su = new ShapeAnalysis_Surface( thesurf ); +- gp_Pnt2d suval = su->ValueOfUV ( pnt, BRep_Tool::Tolerance( TopoDS::Face(fmap(surfi)) ) ); +- suval.Coord( u, v); +- pnt = thesurf->Value( u, v ); +- +- ++ ++ Handle(ShapeAnalysis_Surface) proj; ++ BRepTopAdaptor_FClass2d *cls; ++ GetFaceTools(surfi, proj, cls); ++ ++ gp_Pnt2d p2d = proj->ValueOfUV(pnt, Precision::Confusion()); ++ if (cls->Perform(p2d) == TopAbs_OUT) ++ { ++ return false; ++ } ++ pnt = proj->Value(p2d); ++ p2d.Coord(u, v); ++ + p = Point<3> (pnt.X(), pnt.Y(), pnt.Z()); +- ++ return true; + } + + +@@ -979,54 +1010,20 @@ + { + gp_Pnt p(ap(0), ap(1), ap(2)); + +- Handle(Geom_Surface) surface = BRep_Tool::Surface(TopoDS::Face(fmap(surfi))); +- +- gp_Pnt x = surface->Value (u,v); +- +- if (p.SquareDistance(x) <= sqr(PROJECTION_TOLERANCE)) return true; +- +- gp_Vec du, dv; +- +- surface->D1(u,v,x,du,dv); +- +- int count = 0; +- +- gp_Pnt xold; +- gp_Vec n; +- double det, lambda, mu; +- +- do { +- count++; +- +- n = du^dv; +- +- det = Det3 (n.X(), du.X(), dv.X(), +- n.Y(), du.Y(), dv.Y(), +- n.Z(), du.Z(), dv.Z()); +- +- if (det < 1e-15) return false; +- +- lambda = Det3 (n.X(), p.X()-x.X(), dv.X(), +- n.Y(), p.Y()-x.Y(), dv.Y(), +- n.Z(), p.Z()-x.Z(), dv.Z())/det; +- +- mu = Det3 (n.X(), du.X(), p.X()-x.X(), +- n.Y(), du.Y(), p.Y()-x.Y(), +- n.Z(), du.Z(), p.Z()-x.Z())/det; +- +- u += lambda; +- v += mu; +- +- xold = x; +- surface->D1(u,v,x,du,dv); +- +- } while (xold.SquareDistance(x) > sqr(PROJECTION_TOLERANCE) && count < 50); +- +- // (*testout) << "FastProject count: " << count << endl; +- +- if (count == 50) return false; +- +- ap = Point<3> (x.X(), x.Y(), x.Z()); ++ Handle(ShapeAnalysis_Surface) proj; ++ BRepTopAdaptor_FClass2d *cls; ++ GetFaceTools(surfi, proj, cls); ++ ++ gp_Pnt2d p2d = proj->NextValueOfUV(gp_Pnt2d(u,v), p, Precision::Confusion()); ++ if (cls->Perform(p2d) == TopAbs_OUT) ++ { ++ //cout << "Projection fails" << endl; ++ return false; ++ } ++ ++ p = proj->Value(p2d); ++ p2d.Coord(u, v); ++ ap = Point<3> (p.X(), p.Y(), p.Z()); + + return true; + } +diff -Naur netgen-4.9.13_orig/libsrc/occ/occgeom.hpp netgen-4.9.13_new/libsrc/occ/occgeom.hpp +--- netgen-4.9.13_orig/libsrc/occ/occgeom.hpp 2010-01-14 19:56:19.000000000 +0300 ++++ netgen-4.9.13_new/libsrc/occ/occgeom.hpp 2011-02-18 15:33:10.000000000 +0300 +@@ -15,8 +15,6 @@ + #include "Geom_Curve.hxx" + #include "Geom2d_Curve.hxx" + #include "Geom_Surface.hxx" +-#include "GeomAPI_ProjectPointOnSurf.hxx" +-#include "GeomAPI_ProjectPointOnCurve.hxx" + #include "BRepTools.hxx" + #include "TopExp.hxx" + #include "BRepBuilderAPI_MakeVertex.hxx" +@@ -42,8 +40,6 @@ + #include "Geom_Curve.hxx" + #include "Geom2d_Curve.hxx" + #include "Geom_Surface.hxx" +-#include "GeomAPI_ProjectPointOnSurf.hxx" +-#include "GeomAPI_ProjectPointOnCurve.hxx" + #include "TopoDS_Wire.hxx" + #include "BRepTools_WireExplorer.hxx" + #include "BRepTools.hxx" +@@ -68,7 +64,7 @@ + #include "IGESToBRep_Reader.hxx" + #include "Interface_Static.hxx" + #include "GeomAPI_ExtremaCurveCurve.hxx" +-#include "Standard_ErrorHandler.hxx" ++//#include "Standard_ErrorHandler.hxx" + #include "Standard_Failure.hxx" + #include "ShapeUpgrade_ShellSewing.hxx" + #include "ShapeFix_Shape.hxx" +@@ -80,6 +76,10 @@ + #include "ShapeAnalysis.hxx" + #include "ShapeBuild_ReShape.hxx" + ++#include ++class Handle_ShapeAnalysis_Surface; ++class BRepTopAdaptor_FClass2d; ++ + + // Philippose - 29/01/2009 + // OpenCascade XDE Support +@@ -190,6 +190,8 @@ + class OCCGeometry : public NetgenGeometry + { + Point<3> center; ++ mutable NCollection_DataMap fprjmap; ++ mutable NCollection_DataMap fclsmap; + + public: + TopoDS_Shape shape; +@@ -241,6 +243,8 @@ + vmap.Clear(); + } + ++ ~OCCGeometry(); ++ + void BuildFMap(); + + Box<3> GetBoundingBox() +@@ -260,9 +264,12 @@ + Point<3> Center() + { return center;} + +- void Project (int surfi, Point<3> & p) const; ++ bool Project (int surfi, Point<3> & p, double& u, double& v) const; + bool FastProject (int surfi, Point<3> & ap, double& u, double& v) const; + ++ void GetFaceTools(int surfi, Handle(ShapeAnalysis_Surface)& proj, ++ BRepTopAdaptor_FClass2d*& cls) const; ++ + OCCSurface GetSurface (int surfi) + { + cout << "OCCGeometry::GetSurface using PLANESPACE" << endl; +diff -Naur netgen-4.9.13_orig/libsrc/occ/occmeshsurf.cpp netgen-4.9.13_new/libsrc/occ/occmeshsurf.cpp +--- netgen-4.9.13_orig/libsrc/occ/occmeshsurf.cpp 2009-08-24 06:32:47.000000000 +0400 ++++ netgen-4.9.13_new/libsrc/occ/occmeshsurf.cpp 2011-02-18 16:27:39.000000000 +0300 +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + + + namespace netgen +@@ -434,23 +435,21 @@ + + void MeshOptimize2dOCCSurfaces :: ProjectPoint (INDEX surfind, Point<3> & p) const + { +- geometry.Project (surfind, p); ++ double u, v; ++ geometry.Project (surfind, p, u, v); + } + + + int MeshOptimize2dOCCSurfaces :: ProjectPointGI (INDEX surfind, Point<3> & p, PointGeomInfo & gi) const + { +- double u = gi.u; +- double v = gi.v; +- + Point<3> hp = p; +- if (geometry.FastProject (surfind, hp, u, v)) +- { +- p = hp; +- return 1; +- } +- ProjectPoint (surfind, p); +- return CalcPointGeomInfo (surfind, gi, p); ++ bool ok; ++ if (gi.trignum > 0) ++ ok = geometry.FastProject (surfind, hp, gi.u, gi.v); ++ else ++ ok = geometry.Project (surfind, hp, gi.u, gi.v); ++ p = hp; ++ return ok; + } + + +@@ -680,7 +679,7 @@ + if (!geometry.FastProject (surfi, hnewp, u, v)) + { + // cout << "Fast projection to surface fails! Using OCC projection" << endl; +- geometry.Project (surfi, hnewp); ++ geometry.Project (surfi, hnewp, u, v); + } + + newgi.trignum = 1; +@@ -708,14 +707,17 @@ + hnewp = Point<3> (pnt.X(), pnt.Y(), pnt.Z()); + newp = hnewp; + newgi = ap1; +- }; ++ } + + + void OCCRefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi) + { + if (surfi > 0) +- geometry.Project (surfi, p); +- }; ++ { ++ double u, v; ++ geometry.Project (surfi, p, u, v); ++ } ++ } + + void OCCRefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi, PointGeomInfo & gi) + { +@@ -723,9 +725,10 @@ + if (!geometry.FastProject (surfi, p, gi.u, gi.v)) + { + cout << "Fast projection to surface fails! Using OCC projection" << endl; +- geometry.Project (surfi, p); ++ double u, v; ++ geometry.Project (surfi, p, u, v); + } +- }; ++ } + + + +diff -Naur netgen-4.9.13_orig/libsrc/occ/utilities.h netgen-4.9.13_new/libsrc/occ/utilities.h +--- netgen-4.9.13_orig/libsrc/occ/utilities.h 2009-08-24 06:12:24.000000000 +0400 ++++ netgen-4.9.13_new/libsrc/occ/utilities.h 2011-02-18 11:24:03.000000000 +0300 +@@ -33,6 +33,7 @@ + + #include + #include ++#include + #include + // #include "SALOME_Log.hxx" + +diff -Naur netgen-4.9.13_orig/libsrc/stlgeom/stlgeommesh.cpp netgen-4.9.13_new/libsrc/stlgeom/stlgeommesh.cpp +--- netgen-4.9.13_orig/libsrc/stlgeom/stlgeommesh.cpp 2009-08-10 15:40:51.000000000 +0400 ++++ netgen-4.9.13_new/libsrc/stlgeom/stlgeommesh.cpp 2011-02-18 11:24:03.000000000 +0300 +@@ -1435,7 +1435,7 @@ + + if (!optstring || strlen(optstring) == 0) + { +- mparam.optimize2d = "smcm"; ++ mparam.optimize2d = (char*)"smcm"; + } + else + { +@@ -1451,7 +1451,7 @@ + mparam.grading); + mesh -> LoadLocalMeshSize (mparam.meshsizefilename); + mesh -> CalcLocalHFromSurfaceCurvature (stlparam.resthsurfmeshcurvfac); +- mparam.optimize2d = "cmsmSm"; ++ mparam.optimize2d = (char*)"cmsmSm"; + STLSurfaceOptimization (*stlgeometry, *mesh, mparam); + #ifdef STAT_STREAM + (*statout) << GetTime() << " & "; +@@ -1557,7 +1557,7 @@ + + if (!optstring || strlen(optstring) == 0) + { +- mparam.optimize3d = "cmdmstm"; ++ mparam.optimize3d = (char*)"cmdmstm"; + } + else + { +--- netgen-4.9.13_orig/nglib/nglib.h 2010-05-18 15:20:25.000000000 +0400 ++++ netgen-4.9.13_new/nglib/nglib.h 2010-05-31 13:02:19.000000000 +0400 +@@ -24,7 +24,7 @@ + // Philippose - 14.02.2009 + // Modifications for creating a DLL in Windows + #ifdef WIN32 +- #ifdef NGLIB_EXPORTS || nglib_EXPORTS ++ #if defined NGLIB_EXPORTS || defined nglib_EXPORTS + #define DLL_HEADER __declspec(dllexport) + #else + #define DLL_HEADER __declspec(dllimport) diff --git a/config_files/patches/paraview-3.10.0-depend.patch b/config_files/patches/paraview-3.10.0-depend.patch new file mode 100755 index 0000000..4a53531 --- /dev/null +++ b/config_files/patches/paraview-3.10.0-depend.patch @@ -0,0 +1,15 @@ +--- CMakeLists.txt 2011-03-14 17:38:16.000000000 +0300 ++++ CMakeLists_new.txt 2011-03-14 17:38:57.000000000 +0300 +@@ -336,6 +336,12 @@ + ENDIF (PARAVIEW_BUILD_QT_GUI) + + #################################################################################### ++# The ParaView library dependencies. ++SET(PARAVIEW_LIBRARY_DEPENDS_FILE ++ "${ParaView_BINARY_DIR}/ParaViewLibraryDepends.cmake") ++EXPORT_LIBRARY_DEPENDENCIES(${PARAVIEW_LIBRARY_DEPENDS_FILE}) ++ ++#################################################################################### + # Export Targets file. + SET(PARAVIEW_TARGETS_FILE "${CMAKE_BINARY_DIR}/${PV_INSTALL_EXPORT_NAME}.cmake") + diff --git a/config_files/scotch-4.0.sh b/config_files/scotch-5.1.11.sh similarity index 92% rename from config_files/scotch-4.0.sh rename to config_files/scotch-5.1.11.sh index f3c9edb..a3b9c7f 100755 --- a/config_files/scotch-4.0.sh +++ b/config_files/scotch-5.1.11.sh @@ -1,7 +1,7 @@ #!/bin/bash -noprofile #################################################################################### -# File : scotch-4.0.sh +# 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 @@ -80,12 +80,18 @@ 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_SRC_DIR} +#cp -rf bin doc grf tgt ${PRODUCT_DIR} cd ${PRODUCT_DIR}; @@ -124,7 +130,7 @@ REMOVE_SRC_TMP=$9; shift BIN_DIR=$9; test $# == 10 && shift && SINGLE_DIR=$9 -export PRODUCT="scotch-4.0" +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 diff --git a/config_files/sphinx-1.0.4.sh b/config_files/sphinx-1.0.7.sh similarity index 94% rename from config_files/sphinx-1.0.4.sh rename to config_files/sphinx-1.0.7.sh index ace2b5f..7938a60 100755 --- a/config_files/sphinx-1.0.4.sh +++ b/config_files/sphinx-1.0.7.sh @@ -1,7 +1,7 @@ #!/bin/bash -noprofile #################################################################################### -# File : sphinx-1.0.4.sh +# File : sphinx-1.0.7.sh # Created : Thu Dec 18 12:01:00 2002 # Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) # Project : SALOME @@ -15,7 +15,7 @@ # # Sphinx version # -SPHINX_VERSION=1.0.4 +SPHINX_VERSION=1.0.7 check_version(){ # It is not necessary to check version! @@ -59,8 +59,8 @@ makedir ${PRODUCT_SRC_DIR} # unpack check_jb tar xfz ${SOURCE_DIR}/sphinx-${SPHINX_VERSION}.tar.gz -C ${PRODUCT_SRC_DIR} check_jb tar xfz ${SOURCE_DIR}/setuptools-0.6c11.tar.gz -C ${PRODUCT_SRC_DIR} -check_jb tar xfz ${SOURCE_DIR}/jinja2-2.5.0.tar.gz -C ${PRODUCT_SRC_DIR} -check_jb tar xfz ${SOURCE_DIR}/pygments-1.3.1.tar.gz -C ${PRODUCT_SRC_DIR} +check_jb tar xfz ${SOURCE_DIR}/jinja2-2.5.5.tar.gz -C ${PRODUCT_SRC_DIR} +check_jb tar xfz ${SOURCE_DIR}/pygments-1.4.0.tar.gz -C ${PRODUCT_SRC_DIR} # to generate environment scripts try_preinstalled @@ -90,8 +90,8 @@ cat >> ${PRODUCT_DIR}/MAKE.LOG <