From 3fb3e1892f5c719a3bf8ca06b3a27454a9d94a94 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Fri, 5 Jul 2024 08:46:16 +0200 Subject: [PATCH] spns #41657: OSCAR UB22.04 --- products/GUI.pyconf | 49 +++++++++++++++- products/XDATA.pyconf | 8 +++ products/patches/OSCAR-GUI-V9_12_0.patch | 58 +++++++++++++++++++ .../patches/xdata-9.2.1-python-3.10.patch | 17 ++++++ 4 files changed, 131 insertions(+), 1 deletion(-) create mode 100644 products/patches/OSCAR-GUI-V9_12_0.patch create mode 100644 products/patches/xdata-9.2.1-python-3.10.patch diff --git a/products/GUI.pyconf b/products/GUI.pyconf index 787f8ed..97fef0e 100644 --- a/products/GUI.pyconf +++ b/products/GUI.pyconf @@ -270,11 +270,57 @@ version_python_async : } } +version_OSCAR_GUI_V9_12_0 : +{ + name : "GUI" + build_source : "cmake" + cmake_options : "-DSALOME_ON_DEMAND=OFF -DSALOME_USE_VTKVIEWER=OFF -DSALOME_USE_PVVIEWER=OFF -DSALOME_USE_PV3DVIEWER=OFF" + get_source : "git" + git_info: + { + repositories : + { + tuleap : $PROJECTS.projects.salome.git_info.git_server.tuleap.url + "salome/gui.git" + github : $PROJECTS.projects.salome.git_info.git_server.github.url + "gui.git" + gitpub : $PROJECTS.projects.salome.git_info.git_server.gitpub.url + "modules/gui.git" + } + } + patches : ['OSCAR-GUI-V9_12_0.patch'] + environ : + { + SalomeAppConfig_ : $install_dir + $VARS.sep + "share" + $VARS.sep + "salome" + $VARS.sep + "resources" + $VARS.sep + "gui" + } + depend : ["KERNEL", + "Python", + "qt", + "sip", + "PyQt", + "boost", + "CAS", + "qwt", + "hdf5", + "freetype", + "freeimage", + "gl2ps", + "omniORB", + "docutils", + "libxml2" + ] + build_depend : ["cmake", "swig", "doxygen", "cppunit"] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + properties: + { + is_SALOME_module : "yes" + has_unit_tests + } +} + version_oscar : { name : "GUI" build_source : "cmake" - cmake_options : "-DSALOME_USE_VTKVIEWER=OFF -DSALOME_USE_PVVIEWER=OFF" + cmake_options : "-DSALOME_ON_DEMAND=OFF -DSALOME_USE_VTKVIEWER=OFF -DSALOME_USE_PVVIEWER=OFF -DSALOME_USE_PV3DVIEWER=OFF" get_source : "git" git_info: { @@ -287,6 +333,7 @@ version_oscar : } environ : { + SalomeAppConfig_ : $install_dir + $VARS.sep + "share" + $VARS.sep + "salome" + $VARS.sep + "resources" + $VARS.sep + "gui" } depend : ["KERNEL", "Python", diff --git a/products/XDATA.pyconf b/products/XDATA.pyconf index 1f5c0fc..328932e 100644 --- a/products/XDATA.pyconf +++ b/products/XDATA.pyconf @@ -5,7 +5,10 @@ default : get_source : "git" git_info: { + repositories : + { tuleap : $PROJECTS.projects.salome.git_info.git_server.tuleap.url + "oscar/xdata.git" + } } environ : { @@ -22,6 +25,11 @@ default : } } +version_V9_2_1_UB22_04 : +{ + patches: ['xdata-9.2.1-python-3.10.patch'] +} + version_0_9_11 : { name : "XDATA" diff --git a/products/patches/OSCAR-GUI-V9_12_0.patch b/products/patches/OSCAR-GUI-V9_12_0.patch new file mode 100644 index 0000000..710ccee --- /dev/null +++ b/products/patches/OSCAR-GUI-V9_12_0.patch @@ -0,0 +1,58 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d487b162d..be4a9687e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -53,7 +53,10 @@ ELSE(EXISTS ${KERNEL_ROOT_DIR}) + ENDIF(EXISTS ${KERNEL_ROOT_DIR}) + + # Find SalomeBootstrap +-FIND_PACKAGE(SalomeBootstrap REQUIRED) ++ ++IF(SALOME_ON_DEMAND) ++ FIND_PACKAGE(SalomeBootstrap REQUIRED) ++ENDIF(SALOME_ON_DEMAND) + + # Platform setup + # ============== +diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx +index 89fb8ec12..6c0eb05be 100644 +--- a/src/LightApp/LightApp_Application.cxx ++++ b/src/LightApp/LightApp_Application.cxx +@@ -2098,15 +2098,10 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType + + new LightApp_PV3DSelector( vm, mySelMgr ); + } ++ } + #else +- viewMgr = new PV3DViewer_ViewManager( activeStudy(), desktop() ); +- PV3DViewer_ViewModel* vm = dynamic_cast( viewMgr->getViewModel() ); +- if ( vm ) +- { +- // vm->setBackground(...); //NYI +- } ++ viewMgr = nullptr; + #endif +- } + + if ( !viewMgr ) + return 0; +diff --git a/src/Qtx/QtxDockWidget.cxx b/src/Qtx/QtxDockWidget.cxx +index 9247dca99..a96fe2bfe 100644 +--- a/src/Qtx/QtxDockWidget.cxx ++++ b/src/Qtx/QtxDockWidget.cxx +@@ -368,9 +368,12 @@ myWatcher( 0 ) + */ + QtxDockWidget::~QtxDockWidget() + { +- myWatcher->setParent(nullptr); +- delete myWatcher; +- myWatcher = 0; ++ if (myWatcher) ++ { ++ myWatcher->setParent(nullptr); ++ delete myWatcher; ++ myWatcher = 0; ++ } + } + + /*! diff --git a/products/patches/xdata-9.2.1-python-3.10.patch b/products/patches/xdata-9.2.1-python-3.10.patch new file mode 100644 index 0000000..8acba4b --- /dev/null +++ b/products/patches/xdata-9.2.1-python-3.10.patch @@ -0,0 +1,17 @@ +diff --git a/src/XDATA2SALOME/xdata2salome.py b/src/XDATA2SALOME/xdata2salome.py +index 581fe85..6a2f039 100644 +--- a/src/XDATA2SALOME/xdata2salome.py ++++ b/src/XDATA2SALOME/xdata2salome.py +@@ -7,7 +7,11 @@ warning_sep = '-------------------------------------------------------\n' + warning_line = 'WARNING WARNING WARNING WARNING WARNING WARNING WARNING\n' + + from xdata import * +-from time import clock ++try: ++ from time import clock ++except: ++ from time import time as clock ++ + from xutilities import verbose + + def write(code, filename, component_name): -- 2.39.2