From: Nabil Ghodbane Date: Thu, 18 Aug 2022 13:36:52 +0000 (+0200) Subject: more robust approach aimed to check if a product is native/embedded X-Git-Tag: V9_11_0~344 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=56a45a298d75b87f72c788ba2561947c4463df04;p=tools%2Fsat_salome.git more robust approach aimed to check if a product is native/embedded --- diff --git a/products/compil_scripts/PERSALYS-v11.0.sh b/products/compil_scripts/PERSALYS-v11.0.sh index 4e2aa6c..62c81af 100755 --- a/products/compil_scripts/PERSALYS-v11.0.sh +++ b/products/compil_scripts/PERSALYS-v11.0.sh @@ -24,10 +24,11 @@ CMAKE_OPTIONS+=" -DOpenTURNS_DIR=$OT_ROOT_DIR/lib/cmake/openturns" CMAKE_OPTIONS+=" -DPy2cpp_DIR=$PY2CPP_ROOT_DIR//lib/cmake/py2cpp" # strangely Centos 8 fails to guess qwt installation -if [[ $DIST_NAME == "CO" && $DIST_VERSION == "8" && $APPLICATION_NAME =~ native ]]; then + +if [[ $DIST_NAME == "CO" && $DIST_VERSION == "8" && "${SAT_qwt_IS_NATIVE}" == "1" ]]; then CMAKE_OPTIONS+=" -DQWT_LIBRARY=/usr/lib64/libqwt-qt5.so" CMAKE_OPTIONS+=" -DQWT_INCLUDE_DIR=/usr/include/qt5/qwt" -elif [ "$QWT_ROOT_DIR" != "/usr" ]; then +if [ "${SAT_qwt_IS_NATIVE}" != "1" ]; then CMAKE_OPTIONS+=" -DQWT_LIBRARY=$QWT_ROOT_DIR/lib/libqwt.so" CMAKE_OPTIONS+=" -DQWT_INCLUDE_DIR=$QWT_ROOT_DIR/include" fi @@ -46,11 +47,11 @@ fi CMAKE_OPTIONS+=" -DPYTHON_EXECUTABLE=$PYTHONBIN" CMAKE_OPTIONS+=" -DPYTHON_INCLUDE_DIR=$PYTHON_INCLUDE" -if [ "$PYTHON_ROOT_DIR" != "/usr" ]; then +if [ "${SAT_Python_IS_NATIVE}" != "1" ]; then CMAKE_OPTIONS+=" -DPYTHON_LIBRARY=$PYTHON_ROOT_DIR/lib/libpython$PYTHON_VERSION.so" fi -if [ "$SPHINX_ROOT_DIR" != "/usr" ]; then +if [ "${SAT_Sphinx_IS_NATIVE}" != "1" ]; then CMAKE_OPTIONS+=" -DSPHINX_ROOT_DIR:FILEPATH=$SPHINX_ROOT_DIR" CMAKE_OPTIONS+=" -DSPHINX_EXECUTABLE:FILEPATH=$SPHINX_ROOT_DIR/bin/sphinx-build" fi diff --git a/products/compil_scripts/ParaView-5.8.0.sh b/products/compil_scripts/ParaView-5.8.0.sh index 7fa8a19..4577725 100755 --- a/products/compil_scripts/ParaView-5.8.0.sh +++ b/products/compil_scripts/ParaView-5.8.0.sh @@ -102,8 +102,7 @@ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_BUILD_QT_DESIGNER_PLUGIN:BOOL=OFF" ### Python settings CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_USE_PYTHON:BOOL=ON" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_WRAP_PYTHON:BOOL=ON" -if [ "${PYTHON_ROOT_DIR}" != "/usr" ] -then +if [ "${SAT_Python_IS_NATIVE}" != "1" ]; then CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPython3_INCLUDE_DIR:STRING=${PYTHON_ROOT_DIR}/include/python${PYTHON_VERSION}" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPython3_LIBRARY:STRING=${PYTHON_ROOT_DIR}/lib/libpython${PYTHON_VERSION}.so" fi @@ -160,8 +159,7 @@ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_ROOT:PATH=${HDF5_ROOT_DIR}" ### CGNS CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_MODULE_USE_EXTERNAL_ParaView_cgns:BOOL=ON" -if [ "$CGNS_ROOT_DIR" != "/usr" ] -then +if [ -n "$CGNS_ROOT_DIR" ] && [ "${SAT_cgns_IS_NATIVE}" != "1" ]; then CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCGNS_INCLUDE_DIR:PATH=${CGNS_ROOT_DIR}/include" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCGNS_LIBRARY:PATH=${CGNS_ROOT_DIR}/lib/libcgns.so" fi @@ -181,12 +179,10 @@ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DBoost_NO_SYSTEM_PATHS:BOOL=ON" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps:BOOL=OFF" ### libxml2 settings -if [ -n "$LIBXML2_ROOT_DIR" ] -then +if [ -n "$LIBXML2_ROOT_DIR" ]; then # with a native libxml2, do not use these options CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_MODULE_USE_EXTERNAL_VTK_libxml2:BOOL=ON" - if [ "${LIBXML2_ROOT_DIR}" != "/usr" ] - then + if [ "${SAT_libxml2_IS_NATIVE}" != "1" ]; then CMAKE_OPTIONS="${CMAKE_OPTIONS} -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint" @@ -195,8 +191,7 @@ fi ### freetype settings CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_MODULE_USE_EXTERNAL_VTK_freetype:BOOL=ON" -if [ -n "$FREETYPE_ROOT_DIR" ] -then +if [ -n "$FREETYPE_ROOT_DIR" ] && [ "${SAT_freetype_IS_NATIVE}" != "1" ]; then # with a native freetype, do not use these options CMAKE_OPTIONS="${CMAKE_OPTIONS} -DFREETYPE_INCLUDE_DIRS:STRING=${FREETYPE_ROOT_DIR}/include/freetype2" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DFREETYPE_LIBRARY:STRING=${FREETYPE_ROOT_DIR}/lib/libfreetype.so" diff --git a/products/compil_scripts/ParaView-5.9.0.sh b/products/compil_scripts/ParaView-5.9.0.sh index f91b68e..8cffe1c 100755 --- a/products/compil_scripts/ParaView-5.9.0.sh +++ b/products/compil_scripts/ParaView-5.9.0.sh @@ -185,8 +185,7 @@ CMAKE_OPTIONS+=" -DHDF5_IS_PARALLEL=OFF" ### CGNS CMAKE_OPTIONS+=" -DVTK_MODULE_USE_EXTERNAL_ParaView_cgns:BOOL=ON" -if [ "${SAT_cgns_IS_NATIVE}" != "1" ] -then +if [ -n "$CGNS_ROOT_DIR" ] && [ "${SAT_cgns_IS_NATIVE}" != "1" ]; then CMAKE_OPTIONS+=" -DCGNS_INCLUDE_DIR:PATH=${CGNS_ROOT_DIR}/include" CMAKE_OPTIONS+=" -DCGNS_LIBRARY:PATH=${CGNS_ROOT_DIR}/lib/libcgns.so" fi diff --git a/products/compil_scripts/ParaView.sh b/products/compil_scripts/ParaView.sh index 94d3fa2..d638d3d 100755 --- a/products/compil_scripts/ParaView.sh +++ b/products/compil_scripts/ParaView.sh @@ -100,8 +100,7 @@ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_BUILD_QT_DESIGNER_PLUGIN:BOOL=OFF" ### Python settings CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_USE_PYTHON:BOOL=ON" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_WRAP_PYTHON:BOOL=ON" -if [ "${PYTHON_ROOT_DIR}" != "/usr" ] -then +if [ "${SAT_Python_IS_NATIVE}" != "1" ]; then CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPython3_INCLUDE_DIR:STRING=${PYTHON_ROOT_DIR}/include/python${PYTHON_VERSION}" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPython3_LIBRARY:STRING=${PYTHON_ROOT_DIR}/lib/libpython${PYTHON_VERSION}.so" fi @@ -160,8 +159,7 @@ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_ROOT:PATH=${HDF5_ROOT_DIR}" ### CGNS CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_MODULE_USE_EXTERNAL_ParaView_cgns:BOOL=ON" -if [ "$CGNS_ROOT_DIR" != "/usr" ] -then +if [ -n "$CGNS_ROOT_DIR" ] && [ "${SAT_cgns_IS_NATIVE}" != "1" ]; then CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCGNS_INCLUDE_DIR:PATH=${CGNS_ROOT_DIR}/include" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCGNS_LIBRARY:PATH=${CGNS_ROOT_DIR}/lib/libcgns.so" fi @@ -181,12 +179,10 @@ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DBoost_NO_SYSTEM_PATHS:BOOL=ON" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps:BOOL=OFF" ### libxml2 settings -if [ -n "$LIBXML2_ROOT_DIR" ] -then +if [ -n "$LIBXML2_ROOT_DIR" ]; then # with a native libxml2, do not use these options CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_MODULE_USE_EXTERNAL_VTK_libxml2:BOOL=ON" - if [ "${LIBXML2_ROOT_DIR}" != "/usr" ] - then + if [ "${SAT_libxml2_IS_NATIVE}" != "1" ]; then CMAKE_OPTIONS="${CMAKE_OPTIONS} -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint" @@ -195,8 +191,7 @@ fi ### freetype settings CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_MODULE_USE_EXTERNAL_VTK_freetype:BOOL=ON" -if [ -n "$FREETYPE_ROOT_DIR" ] -then +if [ -n "$FREETYPE_ROOT_DIR" ] && [ "${SAT_freetype_IS_NATIVE}" != "1" ]; then # with a native freetype, do not use these options CMAKE_OPTIONS="${CMAKE_OPTIONS} -DFREETYPE_INCLUDE_DIRS:STRING=${FREETYPE_ROOT_DIR}/include/freetype2" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DFREETYPE_LIBRARY:STRING=${FREETYPE_ROOT_DIR}/lib/libfreetype.so" diff --git a/products/compil_scripts/netcdf-4.6.2.sh b/products/compil_scripts/netcdf-4.6.2.sh index 3ed6464..ec5c187 100755 --- a/products/compil_scripts/netcdf-4.6.2.sh +++ b/products/compil_scripts/netcdf-4.6.2.sh @@ -21,14 +21,14 @@ CMAKE_OPTIONS+=" -DENABLE_TESTS=ON" CMAKE_OPTIONS+=" -DPYTHON_EXECUTABLE=${PYTHONBIN}" ### libxml2 settings -if [ -n "$LIBXML2_ROOT_DIR" ] && [ "${LIBXML2_ROOT_DIR}" != "/usr" ]; then +if [ -n "$LIBXML2_ROOT_DIR" ] && [ "${SAT_libxml2_IS_NATIVE}" != "1" ]; then CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2" CMAKE_OPTIONS+=" -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so" CMAKE_OPTIONS+=" -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint" fi # HDF5 -if [ -n "$HDF5_ROOT_DIR" ] && [ "${HDF5_ROOT_DIR}" != "/usr" ]; then +if [ -n "$HDF5_ROOT_DIR" ] && [ "${SAT_hdf5_IS_NATIVE}" != "1" ]; then CMAKE_OPTIONS+=" -DHDF5_DIR:PATH=${HDF5_ROOT_DIR}/share/cmake/hdf5" CMAKE_OPTIONS+=" -DHDF5_USE_STATIC_LIBRARIES:BOOL=OFF" CMAKE_OPTIONS+=" -DHDF5_ROOT:PATH=${HDF5_ROOT_DIR}" @@ -38,7 +38,7 @@ if [ -n "$HDF5_ROOT_DIR" ] && [ "${HDF5_ROOT_DIR}" != "/usr" ]; then fi ### libxml2 settings -if [ -n "$LIBXML2_ROOT_DIR" ] && [ "${LIBXML2_ROOT_DIR}" != "/usr" ]; then +if [ -n "$LIBXML2_ROOT_DIR" ] && [ "${SAT_libxml2_IS_NATIVE}" != "1" ]; then CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2" CMAKE_OPTIONS+=" -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so" CMAKE_OPTIONS+=" -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint" diff --git a/products/compil_scripts/openturns-1.18.sh b/products/compil_scripts/openturns-1.18.sh index 9afbfd2..719726a 100755 --- a/products/compil_scripts/openturns-1.18.sh +++ b/products/compil_scripts/openturns-1.18.sh @@ -332,12 +332,19 @@ if [[ -d "$SOURCE_DIR/otfftw-0.11" ]]; then DB10) SITE_PATCH=/usr/lib/python3/dist-packages/setuptools/site-patch.py ;; + UB22*) + SITE_PATCH=/usr/lib/pypy/dist-packages/setuptools/site-patch.py + ;; UB20*) SITE_PATCH=/usr/lib/pypy/dist-packages/setuptools/site-patch.py ;; FD32) SITE_PATCH=/usr/lib/pypy/dist-packages/setuptools/site-patch.py ;; + FD36) + ###SITE_PATCH= + SITE_PATCH=$SOURCE_DIR/addons/site-patch.py + ;; FD34) ###SITE_PATCH= SITE_PATCH=$SOURCE_DIR/addons/site-patch.py diff --git a/products/compil_scripts/zeromq-4.3.1.sh b/products/compil_scripts/zeromq-4.3.1.sh index 5b02fd2..d29c0aa 100755 --- a/products/compil_scripts/zeromq-4.3.1.sh +++ b/products/compil_scripts/zeromq-4.3.1.sh @@ -8,7 +8,7 @@ CMAKE_OPTIONS="" CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}" CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib" ### libxml2 settings -if [ -n "$LIBXML2_ROOT_DIR" ] && [ "${LIBXML2_ROOT_DIR}" != "/usr" ]; then +if [ "${SAT_libxml2_IS_NATIVE}" != "1" ]; then CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2" CMAKE_OPTIONS+=" -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so" CMAKE_OPTIONS+=" -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint"