From: Nabil Ghodbane Date: Fri, 3 Nov 2023 14:57:15 +0000 (+0100) Subject: spns #38391: Mmg SALOME plugin X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=be885234787d3eb6a519837d4524b06b4f52538f;p=tools%2Fsat_salome.git spns #38391: Mmg SALOME plugin --- diff --git a/applications/SALOME-9.11.0-native.pyconf b/applications/SALOME-9.11.0-native.pyconf index 0938664..29d48ab 100644 --- a/applications/SALOME-9.11.0-native.pyconf +++ b/applications/SALOME-9.11.0-native.pyconf @@ -78,6 +78,8 @@ APPLICATION : mesa : {tag : '19.0.8-x86_64-'+$VARS.dist, base: 'no', section: 'version_bin'} MeshGems : '2.15-1' metis : 'native' + mmg : '5.7.0' + mmgplugin : '689960e' mpi4py: 'native' netgen : '5.3.1_with_CAS_7.2' # comment out line above and uncomment the line below to use Netgen 6. diff --git a/applications/SALOME-9.11.0.pyconf b/applications/SALOME-9.11.0.pyconf index b8dbd9e..2e22139 100644 --- a/applications/SALOME-9.11.0.pyconf +++ b/applications/SALOME-9.11.0.pyconf @@ -79,6 +79,8 @@ APPLICATION : medfile : '4.1.1' mesa : '19.0.8' MeshGems : '2.15-1' + mmg : '5.7.0' + mmgplugin : '689960e' mpi4py: '3.0.3' metis : '5.1.0' netgen : '5.3.1_with_CAS_7.2' diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index 35bf7e8..157fbd0 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -78,6 +78,8 @@ APPLICATION : mesa : {tag : '19.0.8-x86_64-'+$VARS.dist, base: 'no', section: 'version_bin'} MeshGems : '2.15-1' metis : 'native' + mmg : '5.7.0' + mmgplugin : '689960e' mpi4py: 'native' netgen : '5.3.1_with_CAS_7.2' # comment out line above and uncomment the line below to use Netgen 6. diff --git a/products/compil_scripts/mmg-5.7.0.sh b/products/compil_scripts/mmg-5.7.0.sh new file mode 100755 index 0000000..893fe87 --- /dev/null +++ b/products/compil_scripts/mmg-5.7.0.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +echo "##########################################################################" +echo "mmg " $VERSION +echo "##########################################################################" + +echo "Installing binary version" +if [ ! -d $PRODUCT_INSTALL ]; then + mkdir -p $PRODUCT_INSTALL +fi +ls $SOURCE_DIR -ltr +mkdir -p $PRODUCT_INSTALL/bin +cp -r $SOURCE_DIR/* $PRODUCT_INSTALL/bin + +for f in $(ls $PRODUCT_INSTALL/bin); do + chmod 755 $PRODUCT_INSTALL/bin/$f +done + +echo +echo "########## END" + diff --git a/products/env_scripts/mmg.py b/products/env_scripts/mmg.py new file mode 100644 index 0000000..5398972 --- /dev/null +++ b/products/env_scripts/mmg.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os.path +import platform + +def set_env(env, prereq_dir, version): + env.set('MMG_ROOT_DIR', prereq_dir) + + if platform.system() != "Windows" : + env.prepend('PATH', os.path.join(prereq_dir, 'bin')) + +def set_nativ_env(env): + pass diff --git a/products/env_scripts/mmgplugin.py b/products/env_scripts/mmgplugin.py new file mode 100644 index 0000000..cdff61a --- /dev/null +++ b/products/env_scripts/mmgplugin.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os.path +import platform + +def set_env(env, prereq_dir, version): + env.set('MMGPLUGIN_ROOT_DIR', prereq_dir) + env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'plugins')) + +def set_nativ_env(env): + pass diff --git a/products/mmg.pyconf b/products/mmg.pyconf new file mode 100644 index 0000000..0576725 --- /dev/null +++ b/products/mmg.pyconf @@ -0,0 +1,45 @@ +default : +{ + name : "mmg" + build_source : "script" + compil_script : "mmg" + $VARS.scriptExtension + get_source : "archive" + environ : + { + env_script : $name + ".py" + } + depend : ["Python", "gmsh"] + build_depend : ["cmake"] + patches : [] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + install_dir : "base" + properties: + { + incremental : "yes" + } + post_script: "fix_permissions.sh" +} + +default_win: +{ + depend : ["Python", "gmsh"] + properties : + { + incremental : "yes" + single_install_dir : "yes" # aimed to solve sat #18914 + } +} + +version_5_7_0 : +{ + compil_script : "mmg-5.7.0.sh" + archive_info : {archive_name : "mmg-5.7.0-Linux-5.10.124-linuxkit-appli.tar.gz"} +} + + +version_5_7_0_win : +{ + compil_script : "mmg-5.7.0.bat" + archive_info : {archive_name : "mmg-5.7.0-Windows-10.0.17763-appli.tar.gz"} +} \ No newline at end of file diff --git a/products/mmgplugin.pyconf b/products/mmgplugin.pyconf new file mode 100644 index 0000000..67bee11 --- /dev/null +++ b/products/mmgplugin.pyconf @@ -0,0 +1,32 @@ +default : +{ + name : "mmgplugin" + build_source : "cmake" + cmake_options : "" + get_source : "archive" + #get_source : "git" + git_info: + { + repo : "https://github.com/SalomePlatform/mmgplugin.git" + repo_dev : $repo_dev + } + environ : + { + env_script : $name + ".py" + } + depend : ["SMESH", + "mmg", + "PyQt", + "Python" + ] + build_depend : ["cmake", "cppunit"] + opt_depend : [] + patches : [] + check_install : [] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + properties: + { + incremental : "yes" + } +}