]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
gcc 4.3 compatibility
authorvsr <vsr@opencascade.com>
Mon, 19 Oct 2009 19:12:22 +0000 (19:12 +0000)
committervsr <vsr@opencascade.com>
Mon, 19 Oct 2009 19:12:22 +0000 (19:12 +0000)
config_files/VTK-5.0.0.sh
config_files/netgen-4.5.sh

index 47bd5cf0809bb95bc6dbf158f932afa2772cf67a..467107a96b54e927afea597d3d54455a2bef8e3b 100755 (executable)
@@ -93,11 +93,17 @@ check_job ${PRODUCT_DIR}/MAKEcmake.LOG make
 
 cd ${PRODUCT_SRC_DIR}/${PRODUCT}_SRC
 
-# apply a small patch for VTK (needed for gcc-3.4)
-sed -e "s%seekg(self->GetFile()->tellg()%seekg(static_cast<long>(self->GetFile()->tellg())%g" IO/vtkBMPReader.cxx > IO/vtkBMPReader.cxx.orig
-mv -f IO/vtkBMPReader.cxx.orig IO/vtkBMPReader.cxx
-sed -e "s%seekg(self->GetFile()->tellg()%seekg(static_cast<long>(self->GetFile()->tellg())%g" IO/vtkImageReader.cxx > IO/vtkImageReader.cxx.orig
-mv -f IO/vtkImageReader.cxx.orig IO/vtkImageReader.cxx
+# patch for gcc-3.4
+for f in IO/vtkBMPReader.cxx IO/vtkImageReader.cxx ; do
+    sed -e "s%seekg(self->GetFile()->tellg()%seekg(static_cast<long>(self->GetFile()->tellg())%g" ${f} > ${f}_
+    mv -f ${f}_ ${f}
+done
+
+# patch for gcc 4.3
+for f in Utilities/DICOMParser/DICOMAppHelper.cxx Utilities/DICOMParser/DICOMFile.cxx Utilities/DICOMParser/DICOMParser.cxx ; do
+    sed -e "s%#include <string>%#include <string>\n#include <string.h>%g" ${f} > ${f}_
+    mv -f ${f}_ ${f}
+done
 
 sed -e "s%char \*doc \=%const char \*doc \=%g" Common/vtkPythonUtil.cxx > Common/vtkPythonUtil.cxx.orig
 mv -f Common/vtkPythonUtil.cxx.orig Common/vtkPythonUtil.cxx
@@ -198,7 +204,7 @@ check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
 
 cd ${PRODUCT_SRC_DIR}/${PRODUCT}_SRC/Wrapping/Python
 
-check_job ${PRODUCT_DIR}/SETUPPYTHON.LOG python setup.py install --prefix=${PRODUCT_DIR}
+check_job ${PRODUCT_DIR}/SETUPPYTHON.LOG python ./setup.py install --prefix=${PRODUCT_DIR}
 
 # set correct symbolic links - bug of python wrappings installation
 #      cd ${PRODUCT_DIR}/include
index d96314a9c51ed58bf8ffd17a4cc566efd2436b7a..dc0e53e137f810f59ee4d791f3cbd1e31679d8bc 100755 (executable)
@@ -74,6 +74,9 @@ fi
 # additional patching for SALOME
 (cd ${PRODUCT_SRC_DIR}; cp ngtcltk/ngnewdelete.* libsrc/interface)
 
+# patch for gcc 4.3
+(cd ${PRODUCT_SRC_DIR}; sed -e "s%#include <string>%#include <string>\n#include <string.h>%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
 }