]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Minor changes
authorvsr <vsr@opencascade.com>
Tue, 16 Apr 2013 15:55:14 +0000 (15:55 +0000)
committervsr <vsr@opencascade.com>
Tue, 16 Apr 2013 15:55:14 +0000 (15:55 +0000)
config_files/netgen.sh

index 9e310ebbf43708b15a84da8544fa9049d844fb16..e77c03367a466f7cce0ab604603c3b3f0e8a7b07 100755 (executable)
@@ -15,7 +15,7 @@
 #
 # netgen version
 #
-NETGEN_VERSION=5.0.0
+NETGEN_VERSION=4.9.13
 
 check_version()
 {
@@ -63,21 +63,27 @@ source ${INSTALL_WORK}/$SHRC
 # unpack
 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
 
+local patch_sources=1
+local patch_build=1
+local patch_gcc43=1
 # apply general patch for SALOME
-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 && \
-       sed -i "s/^\(SUBDIRS = .* \)ng /\1nglib #/g" Makefile.in > /dev/null && \
-       sed -i "s%#include <string>%#include <string>\n#include <string.h>%g" libsrc/include/mystdlib.h > /dev/null )
+if [ "${patch_sources}" = "1" ] ; then
+    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
+fi
+# patch for gcc 4.3 compatibility
+if [ "${patch_gcc43}" = "1" ] ; then
+    cd ${PRODUCT_SRC_DIR}
+    sed -i "s%#include <string>%#include <string>\n#include <string.h>%g" libsrc/include/mystdlib.h
+fi
+# patch to make nglib only:
+if [ "${patch_build}" = "1" ] ; then
+    cd ${PRODUCT_SRC_DIR}
+    sed -i "s/^\(SUBDIRS = .* \)ng /\1nglib #/g" Makefile.in
 fi
-
-# to make nglib only:
-# -SUBDIRS = libsrc ng nglib tutorials doc windows
-# +SUBDIRS = libsrc nglib #ng tutorials doc windows
-( cd ${PRODUCT_SRC_DIR} && sed -i "s/^\(SUBDIRS = .* \)ng /\1nglib #/g" Makefile.in )
-
-# patch for gcc 4.3
-( cd ${PRODUCT_SRC_DIR} && sed -i "s%#include <string>%#include <string>\n#include <string.h>%g" libsrc/include/mystdlib.h )
 
 # to generate environment scripts
 try_preinstalled
@@ -107,12 +113,16 @@ check_job ${PRODUCT_DIR}/MAKE.LOG make
 # install
 check_job ${PRODUCT_DIR}/INSTALL.LOG make install 
 
+# copy additional headers
 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
 
+# fix libGL dependencies
+cd ${PRODUCT_DIR}/lib && fix_gl_libs
+
 cd ${PRODUCT_DIR};
 
 # remove sources and temporary files after building