]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Fix wrong compilation of Numeric 23.7 from sources
authorvsr <vsr@opencascade.com>
Wed, 28 Dec 2005 11:21:23 +0000 (11:21 +0000)
committervsr <vsr@opencascade.com>
Wed, 28 Dec 2005 11:21:23 +0000 (11:21 +0000)
config_Mandrake_10.1.xml
config_files/Numeric-23.7.sh

index a59e80b37a9cc0020522aed2530eaa1ca574dd58..b712933ffccc7f90d73e5285353c0fc18d7897ad 100755 (executable)
           supported="install sources,install binaries"
           disable="false"
           dependancies="gcc,Python"
-          installdiskspace="1177"
-          temporarydiskspace="5304"
+          installdiskspace="2396"
+          temporarydiskspace="7840"
           script="Numeric-23.7.sh"/>
   <product name="HappyDoc"
            version="2.1" 
index 0f8387b5e678c1e8f59efece350be55c02bbcd6e..750f9822e80d17c74cf277cee362030620772a05 100755 (executable)
@@ -58,34 +58,51 @@ makedir ${PRODUCT_DIR}
 check_jb tar xfz ${SOURCE_DIR}/Numeric-23.7.tar.gz -C ${INSTALL_WORK}
 cd ${PRODUCT_WORK}
 
-# check existence of lapack, f77blas, cblas, atlas libraries
-found=1
-check_lib_version liblapack.so
-if [ "$?" -ne "0" ] ; then
-  found=0
-fi
-if [ "$found" -eq "1" ] ; then
-    check_lib_version libf77blas.so
-    if [ "$?" -ne "0" ] ; then
-       found=0
+# check existence of lapack, f77blas, cblas, atlas, g2c libraries
+check_lib_version liblapack.so  $LD_LIBRARY_PATH:/usr/lib
+lapack_nf=$?
+check_lib_version libf77blas.so $LD_LIBRARY_PATH:/usr/lib
+f77blas_nf=$?
+check_lib_version libcblas.so   $LD_LIBRARY_PATH:/usr/lib
+cblas_nf=$?
+check_lib_version libatlas.so   $LD_LIBRARY_PATH:/usr/lib
+atlas_nf=$?
+check_lib_version libg2c.so     $LD_LIBRARY_PATH:/usr/lib
+g2c_nf=$?
+let nfound=$lapack_nf+$f77blas_nf+$cblas_nf+$atlas_nf+$g2c_nf
+# modify build procedure according to the libraries found
+if [ $nfound -gt 0 ] ; then
+    cp setup.py setup.py.orig
+    if [ "$lapack_nf" -eq "1" ] ; then
+       sed -e "s%\(^libraries_list = \[\)\('lapack', \)\(.*\)$%\1\3%g" setup.py > _setup.py
+       mv _setup.py setup.py
     fi
-fi
-if [ "$found" -eq "1" ] ; then
-    check_lib_version libcblas.so
-    if [ "$?" -ne "0" ] ; then
-       found=0
+    if [ "$f77blas_nf" -eq "1" ] ; then 
+       sed -e "s%\(^libraries_list = \[.*\)\('f77blas', \)\(.*\)$%\1\3%g" setup.py > _setup.py
+       mv _setup.py setup.py
     fi
-fi
-if [ "$found" -eq "1" ] ; then
-    check_lib_version libatlas.so
-    if [ "$?" -ne "0" ] ; then
-       found=0
+    if [ "$cblas_nf" -eq "1" ] ; then
+       sed -e "s%\(^libraries_list = \[.*\)\('cblas', \)\(.*\)$%\1\3%g" setup.py > _setup.py
+       mv _setup.py setup.py
     fi
-fi
-# if any library is not found modify build procedure
-if [ "$found" -eq "0" ] ; then
-    cp setup.py setup.py.orig
-    sed -e "s%^use_dotblas = 1%use_dotblas = 0%g" -e "s%^libraries_list = \['lapack', 'cblas', 'f77blas', 'atlas', 'g2c'\]%libraries_list = \['g2c'\]%g" setup.py.orig > setup.py
+    if [ "$atlas_nf" -eq "1" ] ; then
+       sed -e "s%\(^libraries_list = \[.*\)\('atlas', \)\(.*\)$%\1\3%g" setup.py > _setup.py
+       mv _setup.py setup.py
+    fi
+    if [ "$g2c_nf" -eq "1" ] ; then
+       sed -e "s%\(^libraries_list = \[.*\)\('g2c'\)\(.*\)$%\1\3%g" setup.py > _setup.py
+       mv _setup.py setup.py
+    fi
+    sed -e "s%^use_dotblas = 1%use_dotblas = 0%g" setup.py > _setup.py
+    mv _setup.py setup.py
+    sed -e "s%#\(os.path.join('Src', 'blas_lite.c'),\)%\1%g" setup.py > _setup.py
+    mv _setup.py setup.py
+    sed -e "s%#\(os.path.join('Src', 'f2c_lite.c'),\)%\1%g" setup.py > _setup.py
+    mv _setup.py setup.py
+    sed -e "s%#\(os.path.join('Src', 'zlapack_lite.c'),\)%\1%g" setup.py > _setup.py
+    mv _setup.py setup.py
+    sed -e "s%#\(os.path.join('Src', 'dlapack_lite.c')\)%\1%g" setup.py > _setup.py
+    mv _setup.py setup.py
     chmod a+x setup.py
 fi