]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
Add scripts for modules IfcOpenShell and sbim_smodule
authorjfa <jfa@opencascade.com>
Tue, 11 Apr 2023 21:19:17 +0000 (22:19 +0100)
committermbs <martin.bernhard@opencascade.com>
Thu, 15 Jun 2023 09:42:42 +0000 (10:42 +0100)
applications/SALOME-master-native.pyconf
products/IfcOpenShell.pyconf [new file with mode: 0644]
products/compil_scripts/IfcOpenShell.sh [new file with mode: 0755]
products/compil_scripts/sbim_smodule.sh [new file with mode: 0755]
products/env_scripts/IfcOpenShell.py [new file with mode: 0644]
products/env_scripts/sbim_smodule.py [new file with mode: 0644]
products/sbim_smodule.pyconf [new file with mode: 0644]

index 1ea1cc36e261eb092de2426b263e295613babdcc..3483b2cf0957f9428a1baa0301bf7d1280f856ec 100644 (file)
@@ -65,6 +65,7 @@ APPLICATION :
         graphviz : 'native'
         hdf5 : '1.10.3'
         idna : 'native'
+        IfcOpenShell : 'master'
         imagesize : 'native'
         ispc : '1.15.0'
         Jinja2 : 'native'
@@ -115,6 +116,7 @@ APPLICATION :
         requests : 'native'
         rkCommon : '1.5.1'
         root: '6.22.02'
+        sbim_smodule : 'master'
         scipy : 'native'
         scotch : {tag: '6.1.2', section: 'version_6_1_2_MPI', hpc: 'yes', base: 'no'}
         setuptools : 'native'
diff --git a/products/IfcOpenShell.pyconf b/products/IfcOpenShell.pyconf
new file mode 100644 (file)
index 0000000..9243d15
--- /dev/null
@@ -0,0 +1,29 @@
+default :
+{
+    name : "IfcOpenShell"
+    build_source : "script"
+    compil_script :  $name + $VARS.scriptExtension
+    get_source : "archive"
+    system_info : 
+    {
+        rpm : []
+        rpm_dev : []
+        apt : []
+        apt_dev : []
+    }
+    environ :
+    {
+       env_script : $name + ".py"
+    }
+    archive_info : {archive_name : "IfcOpenShell.tar.gz"}
+    depend : ["CAS", "boost"]
+    build_depend : ["cmake", "CAS", "boost"]
+    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"
+    }
+    patches : ['IfcOpenShell.patch', 'IfcOpenShell_EDF.patch']
+}
diff --git a/products/compil_scripts/IfcOpenShell.sh b/products/compil_scripts/IfcOpenShell.sh
new file mode 100755 (executable)
index 0000000..11c60e3
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+echo "##########################################################################"
+echo "Compile IfcOpenShell"
+echo "##########################################################################"
+
+CMAKE_OPTIONS=""
+CMAKE_OPTIONS+=" -DOCC_LIBRARY_DIR=${CAS_ROOT_DIR}/lib"
+CMAKE_OPTIONS+=" -DOCC_INCLUDE_DIR=${CAS_ROOT_DIR}/include/opencascade"
+CMAKE_OPTIONS+=" -DCMAKE_PREFIX_PATH=${PYTHON_ROOT_DIR}"
+CMAKE_OPTIONS+=" -DCMAKE_INCLUDE_PATH=${PYTHON_ROOT_DIR}/include/python${PYTHON_VERSION}:${BOOST_ROOT_DIR}/include"
+CMAKE_OPTIONS+=" -DCMAKE_LIBRARY_PATH=${PYTHON_ROOT_DIR}/lib:${PYTHON_ROOT_DIR}/lib/python${PYTHON_VERSION}:${BOOST_ROOT_DIR}/lib"
+CMAKE_OPTIONS+=" -DCMAKE_PROGRAM_PATH=${PYTHON_ROOT_DIR}/bin"
+CMAKE_OPTIONS+=" -DCOLLADA_SUPPORT=OFF -DUNICODE_SUPPORT=OFF"
+CMAKE_OPTIONS+=" -DBUILD_SHARED_LIBS=ON"
+CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}"
+
+echo
+echo "*** cmake" ${CMAKE_OPTIONS}
+cmake ${CMAKE_OPTIONS} $SOURCE_DIR/cmake
+if [ $? -ne 0 ]
+then
+    echo "ERROR on cmake"
+    exit 1
+fi
+
+echo
+echo "*** make"
+make -j8 install
+if [ $? -ne 0 ]
+then
+    echo "ERROR on make install"
+    exit 3
+fi
+
+echo
+echo "########## END"
diff --git a/products/compil_scripts/sbim_smodule.sh b/products/compil_scripts/sbim_smodule.sh
new file mode 100755 (executable)
index 0000000..cbd1df1
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+echo "##########################################################################"
+echo "Compile sbim.smodule"
+echo "##########################################################################"
+
+CMAKE_OPTIONS=""
+CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}"
+CMAKE_OPTIONS+=" -DIFCOPENSHELL_ROOT_DIR=${IFCOPENSHELL_ROOT_DIR}"
+CMAKE_OPTIONS+=" -DKERNEL_ROOT_DIR=${KERNEL_ROOT_DIR}"
+CMAKE_OPTIONS+=" -DGUI_ROOT_DIR=${GUI_ROOT_DIR}"
+CMAKE_OPTIONS+=" -DGEOM_ROOT_DIR=${GEOM_ROOT_DIR}"
+CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE=Debug"
+
+echo
+echo "*** cmake" ${CMAKE_OPTIONS}
+cmake ${CMAKE_OPTIONS} $SOURCE_DIR
+if [ $? -ne 0 ]
+then
+    echo "ERROR on cmake"
+    exit 1
+fi
+
+echo
+echo "*** make"
+make -j8 install
+if [ $? -ne 0 ]
+then
+    echo "ERROR on make install"
+    exit 3
+fi
+
+echo
+echo "########## END"
diff --git a/products/env_scripts/IfcOpenShell.py b/products/env_scripts/IfcOpenShell.py
new file mode 100644 (file)
index 0000000..8020487
--- /dev/null
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+#-*- coding:utf-8 -*-
+
+import os.path
+import platform
+
+def set_env(env, prereq_dir, version):
+    env.set('IFCOPENSHELLHOME', prereq_dir)
+    env.set('IFCOPENSHELL_ROOT_DIR', prereq_dir)
+    env.prepend('PYTHONPATH', prereq_dir)
+    env.prepend('PATH', os.path.join(prereq_dir, 'bin'))
+    env.prepend('LD_LIBRARY_PATH', os.path.join(prereq_dir, 'lib'))
+    env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', 'python'))
+    
+def set_nativ_env(env):
+    env.set('IFCOPENSHELL_ROOT_DIR', '/usr')    # update for cmake
+    env.set('IFCOPENSHELLHOME', '/usr')
diff --git a/products/env_scripts/sbim_smodule.py b/products/env_scripts/sbim_smodule.py
new file mode 100644 (file)
index 0000000..c134e9c
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/env python
+#-*- coding:utf-8 -*-
+
+import os.path
+import platform
+
+def set_env(env, prereq_dir, version):
+    env.set('BuildingISHOME', prereq_dir)
+    env.set('BuildingIS_ROOT_DIR', prereq_dir)
+    env.set('BuildingIS_SRC_DIR', os.path.join(product_root_dir, "SOURCES", "sbim_smodule"))
+    versionPython = env.get('PYTHON_VERSION')
+    env.prepend('PYTHONPATH', env.get('BuildingISHOME'))
+    env.prepend('PATH', os.path.join(prereq_dir, 'bin'))
+    env.prepend('LD_LIBRARY_PATH', os.path.join(prereq_dir, 'lib', 'salome'))
+    #env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', 'python'))
+    env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', 'python' + versionPython, 'site-packages', 'salome'))
+
+def set_nativ_env(env):
+    env.set('BuildingIS_ROOT_DIR', '/usr')    # update for cmake
+    env.set('BuildingISHOME', '/usr')
diff --git a/products/sbim_smodule.pyconf b/products/sbim_smodule.pyconf
new file mode 100644 (file)
index 0000000..56d4c42
--- /dev/null
@@ -0,0 +1,29 @@
+default :
+{
+    name : "sbim_smodule"
+    build_source : "script"
+    compil_script :  $name + $VARS.scriptExtension
+    get_source : "archive"
+    system_info : 
+    {
+        rpm : []
+        rpm_dev : []
+        apt : []
+        apt_dev : []
+    }
+    environ :
+    {
+       SalomeAppConfig_ : $install_dir + $VARS.sep + "share" + $VARS.sep + "salome" + $VARS.sep + "resources" + $VARS.sep + "buildingis"
+       env_script : $name + ".py"
+    }
+    archive_info : {archive_name : "sbim.smodule.tar.gz"}
+    depend : ["CAS", "boost", "IfcOpenShell", "KERNEL", "GUI", "GEOM"]
+    build_depend : ["cmake", "CAS", "boost", "IfcOpenShell", "KERNEL", "GUI", "GEOM"]
+    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"
+    }
+}