3 ####################################################################################
5 # Created : Thu Dec 18 12:01:00 2002
6 # Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
8 # Module : Installation Wizard
9 # Copyright : 2002-2007 CEA
11 # This script is the part of the SALOME installation procedure.
13 ####################################################################################
17 # check existance of netgen
18 # unfortunarely we can't find anything about netgen version
19 if [ -n "$NETGENROOT" ]; then
27 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
28 #$DELIM ${PRODUCT_TYPE} $DELIM
29 export NETGENHOME=\${INSTALL_ROOT}/${PRODUCT}
32 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
33 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
38 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
39 #$DELIM ${PRODUCT_TYPE}_src $DELIM
43 (test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
44 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
48 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
49 try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
55 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
56 source ${INSTALL_WORK}/$SHRC
58 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
60 # apply general patch for SALOME
61 if [ -f patches/netgen-4.5-for-SALOME.patch ] ; then
62 cp patches/netgen-4.5-for-SALOME.patch ${PRODUCT_DIR}_SRC
63 ( cd ${PRODUCT_DIR}_SRC; patch -p1 < netgen-4.5-for-SALOME.patch )
66 # apply patch for 64-bit platforms
67 if test `uname -m` = "x86_64" ; then
68 if [ -f patches/netgen-4.5-lib64.patch ] ; then
69 cp patches/netgen-4.5-lib64.patch ${PRODUCT_DIR}_SRC
70 ( cd ${PRODUCT_DIR}_SRC; patch -p1 < netgen-4.5-lib64.patch )
74 # additional patching for SALOME
75 (cd ${PRODUCT_DIR}_SRC; cp ngtcltk/ngnewdelete.* libsrc/interface)
77 # apply patch: to make compilable on latest versions of gcc
78 (cd ${PRODUCT_DIR}_SRC/libsrc/meshing; echo -e '16s/^$/class Mesh;\nwq' | ed - meshtype.hpp > /dev/null)
80 # apply patch: to make compilable with CASCADE-6.1.1
81 (cd ${PRODUCT_DIR}_SRC/libsrc; sed -e "s%\(.*\)-DHAVE_LIMITS\'%\1-DHAVE_LIMITS_H%g" makefile.inc > makefile.inc.new; mv makefile.inc.new makefile.inc)
83 # to generate environment scripts
87 install_source_and_build()
93 makedir ${PRODUCT_DIR}
94 # set platform type variable
95 if test `uname -m` = "x86_64" ; then
96 export MACHINE=LINUX64
102 for directory in csg general geom2d gprim interface linalg occ meshing opti stlgeom ; do
103 cd ${PRODUCT_DIR}_SRC/libsrc/${directory}
104 check_job ${PRODUCT_DIR}/MAKE.LOG make
108 mkdir -p ${PRODUCT_DIR}/lib
109 cp -f ${PRODUCT_DIR}_SRC/lib/${MACHINE}/* ${PRODUCT_DIR}/lib
110 mkdir -p ${PRODUCT_DIR}/include
111 cp -f ${PRODUCT_DIR}_SRC/libsrc/interface/nglib.h ${PRODUCT_DIR}/include
112 for directory in csg general geom2d gprim linalg occ meshing opti stlgeom ; do
113 cp -f ${PRODUCT_DIR}_SRC/libsrc/${directory}/*.hpp ${PRODUCT_DIR}/include
115 cp -f ${PRODUCT_DIR}_SRC/libsrc/include/mystdlib.h ${PRODUCT_DIR}_SRC/libsrc/include/mydefs.hpp ${PRODUCT_DIR}/include
117 #du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log
120 # remove sources and temporary files after building
121 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
122 test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC
125 # to generate environment scripts
131 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
132 source ${INSTALL_WORK}/$SHRC
134 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
136 # to generate environment script for sources
141 export INSTALL_WORK=$2;
142 export SOURCE_DIR=$3;
143 export INSTALL_ROOT=$4;
144 export PRODUCT_SEQUENCE=$5;
145 export PRODUCT_TYPE=$6;
146 export INSTALL_PRODUCTS=$7;
149 export PRODUCT="netgen-4.5"
150 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
151 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}