]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
Add compile script options for CO9
authorGuytri KASTANE <guytri.kastane@cea.fr>
Tue, 17 Oct 2023 09:38:16 +0000 (11:38 +0200)
committerGuytri KASTANE <guytri.kastane@cea.fr>
Tue, 17 Oct 2023 09:38:16 +0000 (11:38 +0200)
products/compil_scripts/ParaView-5.11.0.sh
products/compil_scripts/opencv.sh
products/compil_scripts/openturns-1.20.1.sh
products/compil_scripts/petsc-3.16.0.sh
products/compil_scripts/sip-5.5.0-pip.sh [new file with mode: 0755]

index c1c153dd957b612936c6a522eee022e10e17b151..ec3dd7a944201dbb4105c78431f166bc45c1a5ef 100755 (executable)
@@ -4,6 +4,8 @@ echo "##########################################################################
 echo "ParaView" $VERSION
 echo "##########################################################################"
 
+LINUX_DISTRIBUTION="$DIST_NAME$DIST_VERSION"
+
 PVLIBVERSION=`echo ${VERSION} | awk -F. '{printf("%d.%d",$1,$2)}'`
 
 CMAKE_OPTIONS=""
@@ -46,7 +48,6 @@ fi
 ### spns #20550 - Headless mode
 if [ "$PARAVIEW_HEADLESS_MODE" == "1" ]; then
     EGL_FOUND=false
-    LINUX_DISTRIBUTION="$DIST_NAME$DIST_VERSION"
     case $LINUX_DISTRIBUTION in
         CO*|FD*)
             if [ -f /usr/include/EGL/egl.h ] && [ -f /usr/lib64/libEGL.so ] && [ -f /usr/lib64/libOpenGL.so ]
@@ -274,9 +275,15 @@ if [ -n "$GDAL_ROOT_DIR" ]; then
     echo "INFO: switching ON GDAL"
     CMAKE_OPTIONS+=" -DPARAVIEW_ENABLE_GDAL:BOOL=ON"
     if [ "${SAT_gdal_IS_NATIVE}" != "1" ]; then
-        CMAKE_OPTIONS+=" -DGDAL_ROOT_DIR=$GDAL_ROOT_DIR"
-        CMAKE_OPTIONS+=" -DGDAL_LIBRARY=$GDAL_ROOT_DIR/lib/libgdal.so"
-        CMAKE_OPTIONS+=" -DGDAL_INCLUDE_DIR=$GDAL_ROOT_DIR/include"
+        if [ "${LINUX_DISTRIBUTION}" == "CO9" ]; then
+            CMAKE_OPTIONS+=" -DGDAL_ROOT_DIR=$GDAL_ROOT_DIR"
+            CMAKE_OPTIONS+=" -DGDAL_LIBRARY=$GDAL_ROOT_DIR/lib64/ogdi/libgdal.so"
+            CMAKE_OPTIONS+=" -DGDAL_INCLUDE_DIR=$GDAL_ROOT_DIR/include/gdal"
+        else
+            CMAKE_OPTIONS+=" -DGDAL_ROOT_DIR=$GDAL_ROOT_DIR"
+            CMAKE_OPTIONS+=" -DGDAL_LIBRARY=$GDAL_ROOT_DIR/lib/libgdal.so"
+            CMAKE_OPTIONS+=" -DGDAL_INCLUDE_DIR=$GDAL_ROOT_DIR/include"
+        fi
     fi
     CMAKE_OPTIONS+=" -DPARAVIEW_GENERATE_PROXY_DOCUMENTATION:BOOL=ON"
     CMAKE_OPTIONS+=" -DPARAVIEW_PLUGIN_ENABLE_GeographicalMap:BOOL=ON"
index 7fcb436233b37cbe87093e0ce11ddafad0e4dee3..17b6866a106748a4daac3ff3a2cb8de9a6b62456 100755 (executable)
@@ -35,7 +35,7 @@ if version_ge $VERSION "3."; then
     CMAKE_OPTIONS+=" -DCMAKE_C_FLAGS=-fPIC"
     LINUX_DISTRIBUTION="$DIST_NAME$DIST_VERSION"
     case $LINUX_DISTRIBUTION in
-      FD34|FD35|FD36|FD37|FD38|UB22*)
+      FD34|FD35|FD36|FD37|FD38|UB22*|CO9)
           CMAKE_OPTIONS+=" -DCMAKE_CXX_FLAGS=\"-std=c++14\""
           CMAKE_OPTIONS+=" -DCMAKE_CXX_STANDARD=14"
           ;;
index 303d938d0c21f80b96f26d83948cbe69a8a54797..546821ec3f22bce39bb3570e7f9e4463ae649abc 100755 (executable)
@@ -92,6 +92,13 @@ if [[ $DIST_NAME == "CO" && $DIST_VERSION == "8" &&  -f /usr/lib64/libcblas.so &
     CMAKE_OPTIONS+=" -DBLAS_LIBRARIES=/usr/lib64/libblas.so"
 fi
 
+if [[ $DIST_NAME == "CO" && $DIST_VERSION == "9" &&  -f /usr/lib64/libcblas.so && -f /usr/lib64/libblas.so ]]; then
+    CMAKE_OPTIONS+=" -DLAPACK_DIR=${LAPACK_ROOT_DIR}/lib64"
+    CMAKE_OPTIONS+=" -DCBLAS_DIR=${LAPACK_ROOT_DIR}/lib64"
+    CMAKE_OPTIONS+=" -DCBLAS_LIBRARIES=/usr/lib64/libcblas.so"
+    CMAKE_OPTIONS+=" -DBLAS_LIBRARIES=/usr/lib64/libblas.so"
+fi
+
 ### libxml2 settings
 if [ -n "$LIBXML2_ROOT_DIR" ] && [ "$SAT_libxml2_IS_NATIVE" != "1" ]; then
     CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2"
index 6d066cbe20a7b11aab0ea7840acbf8343a61070e..0306cda717408b36cf731583c7cfbd6b35b517af 100755 (executable)
@@ -4,6 +4,13 @@ echo "##########################################################################
 echo "Petsc" $VERSION
 echo "##########################################################################"
 
+LINUX_DISTRIBUTION="$DIST_NAME$DIST_VERSION"
+
+if [ ${LINUX_DISTRIBUTION} == "CO9"  ]; then
+    export PETSC_DIR=${BUILD_DIR}
+    echo "PETSC_DIR=${PETSC_DIR}"
+fi
+
 cp -r $SOURCE_DIR/* .
 
 CONFIGURE_FLAGS=
diff --git a/products/compil_scripts/sip-5.5.0-pip.sh b/products/compil_scripts/sip-5.5.0-pip.sh
new file mode 100755 (executable)
index 0000000..17cdb02
--- /dev/null
@@ -0,0 +1,95 @@
+#!/bin/bash
+
+echo "##########################################################################"
+echo SIP + PyQt5_sip $VERSION
+echo "##########################################################################"
+
+
+echo  "*** build in SOURCE directory"
+mkdir -p $BUILD_DIR/sip-5.5.0
+cd $BUILD_DIR/sip-5.5.0
+cp -R  $SOURCE_DIR/sip-5.5.0/* .
+
+# we don't install in python directory -> modify environment as described in INSTALL file
+#mkdir -p $PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/site-packages
+export PATH=$(pwd)/bin:$PATH
+export PYTHONPATH=$(pwd):$PYTHONPATH
+#export PYTHONPATH=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH
+
+#echo
+#echo "*** build with $PYTHONBIN"
+#$PYTHONBIN setup.py build
+#if [ $? -ne 0 ]
+#then
+#    echo "ERROR on build"
+#    exit 2
+#fi
+
+echo
+echo "*** install with $PYTHONBIN"
+$PYTHONBIN -m pip install --cache-dir=$BUILD_DIR/cache/pip  .  --no-deps --prefix=$PRODUCT_INSTALL
+if [ $? -ne 0 ]
+then
+    echo "ERROR on install"
+    exit 3
+fi
+
+# ensure that lib is used
+if [ -d "$PRODUCT_INSTALL/lib64" ]; then
+    echo "WARNING: renaming lib64 directory to lib"
+    mv $PRODUCT_INSTALL/lib64 $PRODUCT_INSTALL/lib
+elif [ -d "$PRODUCT_INSTALL/local/lib64" ]; then
+    echo "WARNING: renaming local/lib64 directory to lib"
+    mv $PRODUCT_INSTALL/local/lib64 $PRODUCT_INSTALL/lib
+    rm -rf $PRODUCT_INSTALL/local
+fi
+
+mkdir -p $BUILD_DIR/PyQt5_sip-12.8.1
+cd $BUILD_DIR/PyQt5_sip-12.8.1
+cp -R  $SOURCE_DIR/PyQt5_sip-12.8.1/* .
+#echo
+#echo "*** build with $PYTHONBIN"
+#$PYTHONBIN setup.py build
+#if [ $? -ne 0 ]
+#then
+#    echo "ERROR on build"
+#    exit 2
+#fi
+
+echo
+echo "*** install with $PYTHONBIN"
+$PYTHONBIN -m pip install --cache-dir=$BUILD_DIR/cache/pip  .  --no-deps --prefix=$PRODUCT_INSTALL
+if [ $? -ne 0 ]
+then
+    echo "ERROR on install"
+    exit 3
+fi
+
+mkdir $PRODUCT_INSTALL/include
+cp *.h $PRODUCT_INSTALL/include
+
+cd $PRODUCT_INSTALL/bin
+ln -sf sip5 sip
+
+# ensure that lib is used
+if [ -d "$PRODUCT_INSTALL/lib64" ]; then
+    echo "WARNING: renaming lib64 directory to lib"
+    mv $PRODUCT_INSTALL/lib64 $PRODUCT_INSTALL/lib
+elif [ -d "$PRODUCT_INSTALL/local/lib64" ]; then
+    echo "WARNING: renaming local/lib64 directory to lib"
+    mv $PRODUCT_INSTALL/local/lib64 $PRODUCT_INSTALL/lib
+    rm -rf $PRODUCT_INSTALL/local
+fi
+
+LINUX_DISTRIBUTION="$DIST_NAME$DIST_VERSION"
+case $LINUX_DISTRIBUTION in
+    DB10)
+        cd $PRODUCT_INSTALL/lib/python3.7/site-packages
+        ln -sf PyQt5_sip-12.8.1-py3.7-linux-x86_64.egg/PyQt5
+        ;;
+    *)
+        ;;
+esac
+
+echo
+echo "########## END"