]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
spns #43020: Fix compilation issues (wip)
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Wed, 9 Oct 2024 19:40:50 +0000 (21:40 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Wed, 9 Oct 2024 19:40:50 +0000 (21:40 +0200)
23 files changed:
applications/SALOME-master-native.pyconf
products/cgal.pyconf
products/compil_scripts/cgal-v5.6.1.sh
products/compil_scripts/cork.sh
products/compil_scripts/irmb.sh [changed mode: 0644->0755]
products/compil_scripts/libigl-v2.5.0.sh
products/compil_scripts/mcut.sh
products/compil_scripts/meshbooleanplugin.sh
products/cork.pyconf
products/env_scripts/cgal.py
products/env_scripts/cork.py
products/env_scripts/irmb.py
products/env_scripts/libigl.py
products/env_scripts/mcut.py
products/irmb.pyconf
products/libigl.pyconf
products/mcut.pyconf
products/meshbooleanplugin.pyconf
products/patches/cgal-p01.patch [new file with mode: 0644]
products/patches/cork-5987de5_off.patch
products/patches/libigl-v2.5.0-p01_609_Boolean.patch
products/patches/mcut-b5b0ec6-p01_cgsboolean.patch
products/patches/mcut-b5b0ec6-p02_cgsboolean.patch

index 09146aa0a618f2b50f368ba51bed2e98093c396d..2ce5639a30c12f1ffe0384a09f6378258dcffcc4 100644 (file)
@@ -45,12 +45,14 @@ APPLICATION :
         C3PO: 'v2.3'
         certifi : 'native'
         cftime: 'native'
+        cgal : 'v5.6.1'
         cgns : '4.2.0'
         chardet : 'native'
         click : 'native'
         cmake : '3.25.2'
         cppunit : 'native'
         cminpack: '1.3.6'
+        cork : '5987de5'
         cycler : 'native'
         Cython : 'native'
         dateutil : 'native'
@@ -70,14 +72,17 @@ APPLICATION :
         hdf5 : '1.10.3'
         idna : 'native'
         imagesize : 'native'
+        irmb : '67d77b4'
         ispc : '1.15.0'
         Jinja2 : 'native'
         kiwisolver : 'native'
         lapack : 'native'
+        libigl : 'v2.5.0'
         libxml2 : 'native'
         llvm : 'native'
         markupsafe : 'native'
         matplotlib : 'native'
+        mcut : 'b5b0ec6'
         mdurl : 'native'
         markdown_it_py : '3.0.0'
         medfile : '4.1.1'
@@ -165,7 +170,7 @@ APPLICATION :
         'MEDCOUPLING' : {tag:'master', base: 'no', section: 'default_MPI', hpc: 'yes'}
         'GUI'
         'GEOM'
-        'SMESH'
+        'SMESH' : 'spns/43020'
         'NETGENPLUGIN'
         'BLSURFPLUGIN'
         'GHS3DPLUGIN'
index b7d54c5b288090edc0e65883a99779f7ea431753..8d1997ecf44d83365f632665fb26baaf97d136f9 100644 (file)
@@ -43,6 +43,7 @@ default :
 
 version_v5_6_1:
 {
-  build_source :  "script"
-  compil_script : "cgal-v5.6.1" + $VARS.scriptExtension
+    build_source :  "script"
+    compil_script : "cgal-v5.6.1" + $VARS.scriptExtension
+    patches : ["cgal-p01.patch"]
 }
index cf6064ce2a278e95c0e1ee013a0d5627f824873c..bb783e6a9de24a5db2e5164967c71d3731e701d6 100755 (executable)
@@ -9,9 +9,12 @@ mkdir $BUILD_DIR
 cd $BUILD_DIR
 
 CMAKE_OPTIONS=
-# common settings
 CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX=${PRODUCT_INSTALL}"
-CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE=Release"
+if [ -n "$SAT_DEBUG" ]; then
+    CMAKE_OPTIONS_COMMON+=" -DCMAKE_BUILD_TYPE:STRING=Debug"
+else
+    CMAKE_OPTIONS_COMMON+=" -DCMAKE_BUILD_TYPE:STRING=Release"
+fi
 CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib"
 CMAKE_OPTIONS+=" -DWITH_examples=ON"
 CMAKE_OPTIONS+=" -DWITH_tests=ON"
@@ -20,7 +23,6 @@ CMAKE_OPTIONS+=" -DCGAL_ENABLE_TESTING=ON"
 
 echo "*** cmake" $CMAKE_OPTIONS
 cmake $CMAKE_OPTIONS $SOURCE_DIR
-
 if [ $? -ne 0 ]; then
     echo "ERROR on CMake"
     exit 1
@@ -42,14 +44,42 @@ if [ $? -ne 0 ]; then
     exit 3
 fi
 
+echo "##########################################################################"
+echo "Building cgal_test"
+echo "##########################################################################"
+
+mkdir $BUILD_DIR/cgal_test
+cd $BUILD_DIR/cgal_test
+CMAKE_OPTIONS=
+if [ -n "$SAT_DEBUG" ]; then
+    CMAKE_OPTIONS_COMMON+=" -DCMAKE_BUILD_TYPE:STRING=Debug"
+else
+    CMAKE_OPTIONS_COMMON+=" -DCMAKE_BUILD_TYPE:STRING=Release"
+fi
+CMAKE_OPTIONS+=" -DCGAL_DIR=${PRODUCT_INSTALL}/lib/cmake"
+CMAKE_OPTIONS+=" -DEXECUTABLE_OUTPUT_PATH=${PRODUCT_INSTALL}/bin"
+echo "*** cmake" $CMAKE_OPTIONS
+cmake $CMAKE_OPTIONS $SOURCE_DIR/cgal_test
+if [ $? -ne 0 ]; then
+    echo "ERROR on CMake"
+    exit 1
+fi
+
+echo
+echo "*** make" $MAKE_OPTIONS
+make $MAKE_OPTIONS
+if [ $? -ne 0 ]; then
+    echo "ERROR on make"
+    exit 2
+fi
+
 echo
-echo "*** make tests"
-#make tests
-#if [ $? -ne 0 ]; then
-#    echo "ERROR on make tests"
-#    exit 4
-#fi
+echo "*** make install"
+make install
+if [ $? -ne 0 ]; then
+    echo "ERROR on make install"
+    exit 3
+fi
 
 echo
 echo "########## END"
-
index aa7dfc6cd06ebbc04ee476d225ec64c1b0a39101..7c85ad4a87e5d1fd1b0e4c26117f41aa76b4108f 100755 (executable)
@@ -19,12 +19,31 @@ fi
 echo
 echo "*** make install"
 mkdir -p ${PRODUCT_INSTALL}/bin
-cp bin/cork ${PRODUCT_INSTALL}/bin
+for f in $(ls $BUILD_DIR/bin); do
+    echo "INFO: next file: $f"
+    F=${PRODUCT_INSTALL}/bin/$(basename $f)
+    mv $BUILD_DIR/bin/$f $F
+    if [ $? -ne 0 ]; then
+        echo "ERROR on make install for file: $f"
+        exit 4
+    fi
+    if [ ! -L "$F" ]; then
+        chmod 755 $F
+    fi
+done
+
+cd $PRODUCT_INSTALL/bin
+mv cork cork_bin
+if [ $? -ne 0 ]; then
+    echo "ERROR on make install for file: $f"
+    exit 5
+fi
+
+cp -r ${BUILD_DIR}/include ${PRODUCT_INSTALL}/include
 if [ $? -ne 0 ]; then
-    echo "ERROR on make install"
-    exit 3
+    echo "ERROR on make install: could not copy include directory..."
+    exit 5
 fi
-chmod 755 ${PRODUCT_INSTALL}/bin/cork
 
 echo
 echo "########## END"
old mode 100644 (file)
new mode 100755 (executable)
index 17ab7ff..428cd45
@@ -9,18 +9,16 @@ mkdir $BUILD_DIR
 cd $BUILD_DIR
 
 CMAKE_OPTIONS=
-# common settings
 CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX=${PRODUCT_INSTALL}"
-CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE=Release"
+if [ -n "$SAT_DEBUG" ]; then
+    CMAKE_OPTIONS_COMMON+=" -DCMAKE_BUILD_TYPE:STRING=Debug"
+else
+    CMAKE_OPTIONS_COMMON+=" -DCMAKE_BUILD_TYPE:STRING=Release"
+fi
 CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib"
-CMAKE_OPTIONS+=" -DWITH_examples=ON"
-CMAKE_OPTIONS+=" -DWITH_tests=ON"
-CMAKE_OPTIONS+=" -DWITH_demos=ON"
-CMAKE_OPTIONS+=" -DCGAL_ENABLE_TESTING=ON"
 
 echo "*** cmake" $CMAKE_OPTIONS
 cmake $CMAKE_OPTIONS $SOURCE_DIR
-
 if [ $? -ne 0 ]; then
     echo "ERROR on CMake"
     exit 1
@@ -43,12 +41,20 @@ if [ $? -ne 0 ]; then
 fi
 
 echo
-echo "*** make tests"
-#make tests
-#if [ $? -ne 0 ]; then
-#    echo "ERROR on make tests"
-#    exit 4
-#fi
+echo "*** make install"
+mkdir -p ${PRODUCT_INSTALL}/bin
+for f in $(ls |grep mesh_booleans); do
+    echo "INFO: next file: $f"
+    F=${PRODUCT_INSTALL}/bin/$f
+    mv ${BUILD_DIR}/$f $F
+    if [ $? -ne 0 ]; then
+        echo "ERROR on make install for file: $f"
+        exit 4
+    fi
+    if [ ! -L "$F" ]; then
+        chmod 755 $F
+    fi
+done
 
 echo
 echo "########## END"
index 4cbc477e1fad8b7b7ef1e62d1c4613637de649f8..f21e4fb61d1f2667111dc8b85f54aeb1bab9c6ca 100755 (executable)
@@ -9,9 +9,12 @@ mkdir $BUILD_DIR
 cd $BUILD_DIR
 
 CMAKE_OPTIONS=
-# common settings
 CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX=${PRODUCT_INSTALL}"
-CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE=Release"
+if [ -n "$SAT_DEBUG" ]; then
+    CMAKE_OPTIONS_COMMON+=" -DCMAKE_BUILD_TYPE:STRING=Debug"
+else
+    CMAKE_OPTIONS_COMMON+=" -DCMAKE_BUILD_TYPE:STRING=Release"
+fi
 CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib"
 
 echo "*** cmake" $CMAKE_OPTIONS
@@ -41,6 +44,11 @@ if [ $? -ne 0 ]; then
 fi
 chmod 755 ${PRODUCT_INSTALL}/bin/609_Boolean
 
+cp -r ${SOURCE_DIR}/include ${PRODUCT_INSTALL}/include
+if [ $? -ne 0 ]; then
+    echo "ERROR on make install: could not copy include directory..."
+    exit 4
+fi
+
 echo
 echo "########## END"
-
index 99beb5fdcc0e7d472e09286016284bc22a37f8fa..20fcb39159c896a2b6e0d4bb7dd84e5e29ce28c3 100755 (executable)
@@ -9,11 +9,15 @@ mkdir $BUILD_DIR
 cd $BUILD_DIR
 
 CMAKE_OPTIONS=
-# common settings
 CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX=${PRODUCT_INSTALL}"
-CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE=Release"
+if [ -n "$SAT_DEBUG" ]; then
+    CMAKE_OPTIONS_COMMON+=" -DCMAKE_BUILD_TYPE:STRING=Debug"
+else
+    CMAKE_OPTIONS_COMMON+=" -DCMAKE_BUILD_TYPE:STRING=Release"
+fi
 CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib"
-CMAKE_OPTIONS+=" -DLIBIGL_ROOT_DIR=${LIBIGL_ROOT_DIR}"
+CMAKE_OPTIONS+=" -DLIBIGL_INCLUDE_DIR=${LIBIGL_INCLUDE_DIR}"
+
 echo "*** cmake" $CMAKE_OPTIONS
 cmake $CMAKE_OPTIONS $SOURCE_DIR
 
@@ -39,5 +43,20 @@ if [ $? -ne 0 ]; then
 fi
 
 echo
-echo "########## END"
+echo "*** make install"
+mkdir -p ${PRODUCT_INSTALL}/bin
+for f in $(ls ${BUILD_DIR}/bin); do
+    echo "INFO: next file: $f"
+    F=${PRODUCT_INSTALL}/bin/$f
+    mv ${BUILD_DIR}/bin/$f $F
+    if [ $? -ne 0 ]; then
+        echo "ERROR on make install for file: $f"
+        exit 4
+    fi
+    if [ ! -L "$F" ]; then
+        chmod 755 $F
+    fi
+done
 
+echo
+echo "########## END"
index 9f571c6002f483479d1010a92d2d49ad65e3a017..67c32ce939233eddae8b3265bef355f1be1cf6bf 100755 (executable)
@@ -4,234 +4,22 @@ echo "##########################################################################
 echo "meshboolean" $VERSION
 echo "##########################################################################"
 
+LINUX_DISTRIBUTION="$DIST_NAME$DIST_VERSION"
+
 rm -rf $BUILD_DIR
 mkdir $BUILD_DIR
+cd $BUILD_DIR
 
-LINUX_DISTRIBUTION="$DIST_NAME$DIST_VERSION"
-
-CMAKE_OPTIONS_COMMON=
-CMAKE_OPTIONS_COMMON+=" -DCMAKE_INSTALL_PREFIX=${PRODUCT_INSTALL}"
+CMAKE_OPTIONS=
+CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX=${PRODUCT_INSTALL}"
 if [ -n "$SAT_DEBUG" ]; then
-    CMAKE_OPTIONS_COMMON+=" -DCMAKE_BUILD_TYPE:STRING=Debug"
+    CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Debug"
 else
-    CMAKE_OPTIONS_COMMON+=" -DCMAKE_BUILD_TYPE:STRING=Release"
+    CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Release"
 fi
-
-echo "##########################################################################"
-echo "Building cgal"
-echo "##########################################################################"
-
-mkdir $BUILD_DIR/cgal
-cd $BUILD_DIR/cgal
-
-CMAKE_OPTIONS=$CMAKE_OPTIONS_COMMON
 CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib"
-CMAKE_OPTIONS+=" -DWITH_examples=OFF"
-CMAKE_OPTIONS+=" -DWITH_tests=OFF"
-CMAKE_OPTIONS+=" -DWITH_demos=OFF"
-CMAKE_OPTIONS+=" -DCGAL_ENABLE_TESTING=OFF"
-
-echo "*** cmake" $CMAKE_OPTIONS
-cmake $CMAKE_OPTIONS $SOURCE_DIR/cgal/cgal
-
-if [ $? -ne 0 ]; then
-    echo "ERROR on CMake"
-    exit 1
-fi
-
-echo
-echo "*** make" $MAKE_OPTIONS
-make $MAKE_OPTIONS
-if [ $? -ne 0 ]; then
-    echo "ERROR on make"
-    exit 2
-fi
-
-echo
-echo "*** make install"
-make install
-if [ $? -ne 0 ]; then
-    echo "ERROR on make install"
-    exit 3
-fi
-
-echo "##########################################################################"
-echo "Building cgal_test"
-echo "##########################################################################"
-
-mkdir $BUILD_DIR/cgal_test
-cd $BUILD_DIR/cgal_test
-CMAKE_OPTIONS=$CMAKE_OPTIONS_COMMON
-CMAKE_OPTIONS+=" -DCGAL_DIR=${PRODUCT_INSTALL}/lib/cmake"
-CMAKE_OPTIONS+=" -DEXECUTABLE_OUTPUT_PATH=${PRODUCT_INSTALL}/bin"
+CMAKE_OPTIONS+=" -DUSE_SAT=ON"
 
-echo "*** cmake" $CMAKE_OPTIONS
-cmake $CMAKE_OPTIONS $SOURCE_DIR/cgal
-if [ $? -ne 0 ]; then
-    echo "ERROR on CMake"
-    exit 1
-fi
-
-echo
-echo "*** make" $MAKE_OPTIONS
-make $MAKE_OPTIONS
-if [ $? -ne 0 ]; then
-    echo "ERROR on make"
-    exit 2
-fi
-
-echo
-echo "*** make install"
-make install
-if [ $? -ne 0 ]; then
-    echo "ERROR on make install"
-    exit 3
-fi
-
-echo "##########################################################################"
-echo "libigl" $VERSION
-echo "##########################################################################"
-
-mkdir $BUILD_DIR/libigl
-cd $BUILD_DIR/libigl
-
-CMAKE_OPTIONS=$CMAKE_OPTIONS_COMMON
-CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib"
-
-# overwrite the main.cpp
-cp -f $SOURCE_DIR/libigl/main.cpp $SOURCE_DIR/libigl/libigl/tutorial/609_Boolean/main.cpp
-
-echo "*** cmake" $CMAKE_OPTIONS
-cmake $CMAKE_OPTIONS $SOURCE_DIR/libigl/libigl
-
-if [ $? -ne 0 ]; then
-    echo "ERROR on CMake"
-    exit 1
-fi
-
-echo
-echo "*** make" $MAKE_OPTIONS
-cd $BUILD_DIR/libigl/tutorial
-make $MAKE_OPTIONS tutorial/CMakeFiles/609_Boolean.dir/rule 
-if [ $? -ne 0 ]; then
-    echo "ERROR on make"
-    exit 2
-fi
-
-echo
-echo "*** make install"
-mkdir -p ${PRODUCT_INSTALL}/bin
-cp $BUILD_DIR/libigl/bin/609_Boolean ${PRODUCT_INSTALL}/bin
-if [ $? -ne 0 ]; then
-    echo "ERROR on make install"
-    exit 3
-fi
-chmod 755 ${PRODUCT_INSTALL}/bin/609_Boolean
-cp -r $SOURCE_DIR/libigl/libigl/include/igl $PRODUCT_INSTALL/include/igl
-export LIBIGL_INCLUDE_DIR=${PRODUCT_INSTALL}/include
-
-echo "##########################################################################"
-echo "Building mcut"
-echo "##########################################################################"
-
-#
-cp -f $SOURCE_DIR/mcut/CSGBoolean.cpp $SOURCE_DIR/mcut/mcut/tutorials/CSGBoolean/CSGBoolean.cpp
-
-mkdir $BUILD_DIR/mcut
-cd $BUILD_DIR/mcut
-
-CMAKE_OPTIONS=$CMAKE_OPTIONS_COMMON
-CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib"
-CMAKE_OPTIONS+=" -DLIBIGL_INCLUDE_DIR=${PRODUCT_INSTALL}/include"
-
-echo "*** cmake" $CMAKE_OPTIONS
-cmake $CMAKE_OPTIONS $SOURCE_DIR/mcut/mcut
-
-if [ $? -ne 0 ]; then
-    echo "ERROR on CMake"
-    exit 1
-fi
-
-echo
-echo "*** make" $MAKE_OPTIONS
-make $MAKE_OPTIONS
-
-if [ $? -ne 0 ]; then
-    echo "ERROR on make"
-    exit 2
-fi
-
-echo
-echo "*** make install"
-mv $BUILD_DIR/mcut/bin/CSGBoolean ${PRODUCT_INSTALL}/bin/
-if [ $? -ne 0 ]; then
-    echo "ERROR on make install"
-    exit 3
-fi
-
-echo "##########################################################################"
-echo "irmb" $VERSION
-echo "##########################################################################"
-
-mkdir $BUILD_DIR/irmb
-cd $BUILD_DIR/irmb
-
-CMAKE_OPTIONS=$CMAKE_OPTIONS_COMMON
-CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib"
-
-echo "*** cmake" $CMAKE_OPTIONS
-cmake $CMAKE_OPTIONS $SOURCE_DIR/irmb/irmb
-if [ $? -ne 0 ]; then
-    echo "ERROR on CMake"
-    exit 1
-fi
-
-echo
-echo "*** make" $MAKE_OPTIONS
-make $MAKE_OPTIONS all
-if [ $? -ne 0 ]; then
-    echo "ERROR on make"
-    exit 2
-fi
-
-mv mesh_booleans ${PRODUCT_INSTALL}/bin
-
-echo "##########################################################################"
-echo "cork" $VERSION
-echo "##########################################################################"
-
-cp -r $SOURCE_DIR/cork/cork $BUILD_DIR/
-cd $BUILD_DIR/cork
-cp $SOURCE_DIR/cork/off.cpp $BUILD_DIR/cork/src/file_formats/off.cpp
-if [ $? -ne 0 ]; then
-    echo "ERROR on copy"
-    exit 1
-fi
-
-echo
-echo "*** make" $MAKE_OPTIONS
-make $MAKE_OPTIONS
-if [ $? -ne 0 ]; then
-    echo "ERROR on make"
-    exit 2
-fi
-
-echo
-echo "*** make install"
-cp bin/cork ${PRODUCT_INSTALL}/bin
-if [ $? -ne 0 ]; then
-    echo "ERROR on make install"
-    exit 3
-fi
-chmod 755 ${PRODUCT_INSTALL}/bin/cork
-
-echo "##########################################################################"
-echo "MESH BOOLEAN PLUGIN" $VERSION
-echo "##########################################################################"
-
-cd $BUILD_DIR
-CMAKE_OPTIONS=$CMAKE_OPTIONS_COMMON
-CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib"
 echo "*** cmake" $CMAKE_OPTIONS
 cmake $CMAKE_OPTIONS $SOURCE_DIR
 if [ $? -ne 0 ]; then
@@ -260,8 +48,13 @@ if [ -f ${PRODUCT_INSTALL}/plugins/meshbooleanplugin/MyPlugDialog_ui.py ]; then
     echo "from qwt import QwtPlot" >> ${BUILD_DIR}/MyPlugDialog_ui.py
     echo                           >> ${BUILD_DIR}/MyPlugDialog_ui.py
     mv ${BUILD_DIR}/MyPlugDialog_ui.py ${PRODUCT_INSTALL}/plugins/meshbooleanplugin/MyPlugDialog_ui.py
+    if [ $? -ne 0 ]; then
+       echo "could not overwrite MyPlugDialog_ui.py"
+       exit 1
+    fi
 else
     echo "ERROR: could not find MyPlugDialog_ui.py"
+    exit 1
 fi
 
 echo
index d6d26ebda26abfa11d615b15e648c2a344a4c0a9..eaab7dc9ab57047777e75ded2be8c8319daf2a2f 100644 (file)
@@ -8,7 +8,7 @@ default :
     {
       repositories :
       {
-        github : "git@github.com:gilbo/cork.git"
+        github : "https://github.com/gilbo/cork.git"
       }
     }
     patches : ['']
@@ -28,7 +28,10 @@ default :
               "PyQt",
               "Python",
               "numpy",
-              "cgal"
+              "cgal",
+             "libigl",
+             "mcut",
+             "irmb"
              ]
     build_depend : ["cmake", "cppunit"]
     opt_depend : []
index 106c0d44977bd5ec6fca45dee6b32028a84c7018..f6572522b8504b653760832b72a56cccb130ca32 100644 (file)
@@ -6,6 +6,7 @@ import platform
 
 def set_env(env, prereq_dir, version):
   env.set('CGAL_ROOT_DIR', prereq_dir)
+  env.set('CGAL_VERSION', version)
   env.set('CGAL_DIR', os.path.join(prereq_dir, 'lib', 'cmake'))
 
 def set_nativ_env(env):
index 590d6a68703e49b920f6a3b41c48a3d34bf807ae..415787fdcad868ff646ede74033a0bf0ed5e2957 100644 (file)
@@ -7,6 +7,7 @@ import platform
 def set_env(env, prereq_dir, version):
   env.set('CORK_ROOT_DIR', prereq_dir)
   env.prepend('PATH', os.path.join(prereq_dir, 'bin'))
+  env.set('CORK_VERSION', version)
 
 def set_nativ_env(env):
   pass
index f19fda1ad49a96b8d143542670cbeab78ed73c4e..5a65f4c28d5039ed54b585915d6ce94fab461f18 100644 (file)
@@ -7,6 +7,7 @@ import platform
 def set_env(env, prereq_dir, version):
   env.set('IRMB_ROOT_DIR', prereq_dir)
   env.set('IRMB_DIR', os.path.join(prereq_dir, 'lib', 'cmake'))
+  env.set('IRMB_VERSION', version)
 
 def set_nativ_env(env):
   pass
index 216e9a1a36659b6ff214063304a42214d2bf065d..e8993aef6fb74199fcb7bb2ff5b22a9f934767e1 100644 (file)
@@ -6,7 +6,9 @@ import platform
 
 def set_env(env, prereq_dir, version):
   env.set('LIBIGL_ROOT_DIR', prereq_dir)
+  env.set('LIBIGL_VERSION', version)
   env.prepend('PATH', os.path.join(prereq_dir, 'bin'))
+  env.set('LIBIGL_INCLUDE_DIR', os.path.join(prereq_dir, 'include'))
 
 def set_nativ_env(env):
   pass
index e50baa2c965e338d1ace85e01e32ccf60995ff27..859e1a303b5a09812484edf7d3402787840721d7 100644 (file)
@@ -6,6 +6,8 @@ import platform
 
 def set_env(env, prereq_dir, version):
   env.set('MCUT_ROOT_DIR', prereq_dir)
+  env.set('MCUT_VERSION', version)
+  env.prepend('PATH', os.path.join(prereq_dir, 'bin'))
 
 def set_nativ_env(env):
   pass
index def68ab21ec8e2ea62d0bea37e098759474c0897..c04870fd280564a056e765147de46e8fa4fecc9f 100644 (file)
@@ -1,14 +1,14 @@
 default :
 {
     name : "irmb"
-    build_source : "cmake"
-    cmake_options : "-DCMAKE_INSTALL_LIBDIR:STRING=lib"
+    build_source: "script"
+    compil_script: "irmb" + $VARS.scriptExtension
     get_source : "git"
     git_info:
     {
       repositories :
       {
-        github : "git@github.com:gcherchi/InteractiveAndRobustMeshBooleans.git"
+        github : "https://github.com/gcherchi/InteractiveAndRobustMeshBooleans.git"
       }
     }
     patches : []
@@ -28,7 +28,9 @@ default :
               "PyQt",
               "Python",
               "numpy",
-              "cgal"
+              "cgal",
+             "libigl",
+             "mcut"
              ]
     build_depend : ["cmake", "cppunit"]
     opt_depend : []
index fe2caff94c1edcd2173916719b37feeeb928551a..e1fbfa685a3ad570aaf0c7f780f62baed92f0376 100644 (file)
@@ -8,7 +8,7 @@ default :
     {
       repositories :
       {
-        github : "git@github.com:libigl/libigl.git"
+        github : "https://github.com/libigl/libigl.git"
       }
     }
     patches : []
index ce6f08d7ce6451d7fe50f4d93f79532421ff6dc5..076100bd06cb7633938aa49d01994c41db3140aa 100644 (file)
@@ -8,7 +8,7 @@ default :
     {
       repositories :
       {
-        github : "git@github.com:cutdigital/mcut.git"
+        github : "https://github.com/cutdigital/mcut.git"
       }
     }
     patches : []
@@ -29,6 +29,7 @@ default :
               "Python",
               "numpy",
               "eigen",
+             "cgal",
               "libigl"
              ]
     build_depend : ["cmake", "cppunit"]
@@ -47,5 +48,7 @@ version_b5b0ec6:
 {
   build_source: "script"
   compil_script: "mcut" + $VARS.scriptExtension
-  patches : ['mcut-b5b0ec6-p01_cgsboolean.patch']
+  patches : ['mcut-b5b0ec6-p01_cgsboolean.patch',
+             'mcut-b5b0ec6-p02_cgsboolean.patch'
+           ]
 }
index 186c0f2a3f848f2f58e477d4c18384ea0f14c74e..257cff00ebadc07a54760551de0f57560e4d6d02 100644 (file)
@@ -8,16 +8,11 @@ default :
     {
       repositories :
       {
+#        github : $PROJECTS.projects.salome.git_info.git_server.github.url + "meshbooleanplugin.git"
         github : "https://github.com/nitawa/meshbooleanplugin.git"
       }
-      git_options : ' --recurse-submodules'
     }
-    patches: [
-              'libigl-v2.5.0-p01_609_Boolean.patch',
-               'mcut-b5b0ec6-p01_cgsboolean.patch',
-               'mcut-b5b0ec6-p02_cgsboolean.patch',
-               'cork-5987de5_off.patch'
-              ]
+    patches: []
     system_info : 
     {
         rpm : []
@@ -29,7 +24,8 @@ default :
     {
        env_script : $name + ".py"
     }
-    depend : ["SMESH",
+    depend : ["CONFIGURATION",
+              "SMESH",
               "PyQt",
               "Python",
               "numpy",
@@ -37,7 +33,7 @@ default :
               "qtpy"
              ]
     build_depend : ["cmake", "cppunit"]
-    opt_depend : []
+    opt_depend : ["cgal", "libigl", "mcut", "irmb", "cork"]
     source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name
     build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name
     install_dir : 'base'
diff --git a/products/patches/cgal-p01.patch b/products/patches/cgal-p01.patch
new file mode 100644 (file)
index 0000000..79bdd64
--- /dev/null
@@ -0,0 +1,79 @@
+diff --git a/cgal_test/CMakeLists.txt b/cgal_test/CMakeLists.txt
+new file mode 100644
+index 00000000000..13be5cfe196
+--- /dev/null
++++ b/cgal_test/CMakeLists.txt
+@@ -0,0 +1,21 @@
++cmake_minimum_required(VERSION 3.12)
++project(cgal)
++
++option(CGAL_DIR "Path to CGAL installation" ${CMAKE_CURRENT_SOURCE_DIR}/cgal)
++option(EXECUTABLE_OUTPUT_PATH "Installation directory" ${CMAKE_CURRENT_SOURCE_DIR})
++
++# Find CGAL package
++IF(CGAL_DIR)
++  LIST(APPEND CMAKE_PREFIX_PATH "${CGAL_DIR}")
++ENDIF(CGAL_DIR)
++find_package(CGAL REQUIRED COMPONENTS Core)
++
++# Add executable
++add_executable(exec_cgal exec_cgal.cc)
++
++# Link CGAL libraries
++target_link_libraries(exec_cgal PRIVATE CGAL::CGAL)
++
++# Enable C++11 features
++target_compile_features(exec_cgal PRIVATE cxx_std_11)
++INSTALL (TARGETS exec_cgal RUNTIME DESTINATION ${EXECUTABLE_OUTPUT_PATH})
+diff --git a/cgal_test/exec_cgal.cc b/cgal_test/exec_cgal.cc
+new file mode 100644
+index 00000000000..b46213e4bb3
+--- /dev/null
++++ b/cgal_test/exec_cgal.cc
+@@ -0,0 +1,46 @@
++#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
++#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
++#include <CGAL/Polygon_mesh_processing/corefinement.h>
++#include <CGAL/Surface_mesh.h>
++
++#include <iostream>
++
++typedef CGAL::Exact_predicates_exact_constructions_kernel K;
++typedef CGAL::Surface_mesh<K::Point_3> Mesh;
++
++namespace PMP = CGAL::Polygon_mesh_processing;
++
++int main(int argc, const char** argv)
++{
++    const std::string filename1 = argv[2];
++    const std::string filename2 = argv[3];
++
++    Mesh mesh1, mesh2;
++
++    if(!PMP::IO::read_polygon_mesh(filename1, mesh1) || !PMP::IO::read_polygon_mesh(filename2, mesh2))
++    {
++        std::cerr << "Invalid input." << std::endl;
++        return 1;
++    }
++
++    bool valid_op;
++    Mesh result;
++
++    if (!strcmp(argv[1], "union")) {
++        valid_op = PMP::corefine_and_compute_union(mesh1, mesh2, result);
++    } else if (!strcmp(argv[1], "intersection")) {
++        valid_op = PMP::corefine_and_compute_intersection(mesh1, mesh2, result);
++    } else {
++        valid_op = PMP::corefine_and_compute_difference(mesh1, mesh2, result);
++    }
++
++    if(valid_op)
++    {
++        std::cout << "Union was successfully computed\n";
++        CGAL::IO::write_polygon_mesh(argv[4], result, CGAL::parameters::stream_precision(17));
++        return 0;
++    }
++
++    std::cout << "Union could not be computed\n";
++    return 1;
++}
index be900e6681e7e6bf161b9580e2f2318b2e30f9ac..6fd0c334da4432fb7ed0ea72d01840bb9aebfa41 100644 (file)
@@ -1,7 +1,7 @@
-diff --git a/cork/cork/src/file_formats/off.cpp b/cork/cork/src/file_formats/off.cpp
+diff --git a/src/file_formats/off.cpp b/src/file_formats/off.cpp
 index 3b12571..2a52bf4 100644
---- a/cork/cork/src/file_formats/off.cpp
-+++ b/cork/cork/src/file_formats/off.cpp
+--- a/src/file_formats/off.cpp
++++ b/src/file_formats/off.cpp
 @@ -50,6 +50,7 @@ int readOFF(string filename, FileMesh *data)
      in >> filetype;
      if(filetype != "OFF") return 1;
index 6bf2b19d4b53d9f0f2238b253afd248726f4d561..256ca45950b972dd7b881a03eeef6e6f4ac29da5 100644 (file)
@@ -1,5 +1,5 @@
---- libigl-v2.5.0_ref/libigl/libigl/tutorial/609_Boolean/main.cpp      2024-05-24 17:16:22.793731575 +0200
-+++ libigl-v2.5.0_dev/libigl/libigl/tutorial/609_Boolean/main.cpp      2024-05-24 17:17:14.666323894 +0200
+--- libigl-v2.5.0_ref/tutorial/609_Boolean/main.cpp    2024-05-24 17:16:22.793731575 +0200
++++ libigl-v2.5.0_dev/tutorial/609_Boolean/main.cpp    2024-05-24 17:17:14.666323894 +0200
 @@ -1,4 +1,5 @@
 -#include <igl/readOFF.h>
 +#include <igl/readOBJ.h>
index 8de30f4327ab073ca2decbde0bc6972c3f747623..160f54b4783e32bfe1f5098908db2a6512512d2e 100644 (file)
@@ -1,7 +1,7 @@
-diff --git a/mcut/mcut/tutorials/CSGBoolean/CSGBoolean.cpp b/mcut/mcut/tutorials/CSGBoolean/CSGBoolean.cpp
+diff --git a/tutorials/CSGBoolean/CSGBoolean.cpp b/tutorials/CSGBoolean/CSGBoolean.cpp
 index d73472a..9ffbd66 100644
---- a/mcut/mcut/tutorials/CSGBoolean/CSGBoolean.cpp
-+++ b/mcut/mcut/tutorials/CSGBoolean/CSGBoolean.cpp
+--- a/tutorials/CSGBoolean/CSGBoolean.cpp
++++ b/tutorials/CSGBoolean/CSGBoolean.cpp
 @@ -1,54 +1,25 @@
 -/***************************************************************************
 - *  This file is part of the MCUT project, which is comprised of a library 
index e68d8e04c0815f5b858a15767a31012ef30c5235..b30b60aafb1b9b8f69a075af3ceec759559be671 100644 (file)
@@ -1,5 +1,5 @@
---- a/mcut/mcut/CMakeLists.txt 2024-10-08 22:04:07.763300956 +0200
-+++ b/mcut/mcut/CMakeLists.txt 2024-10-07 15:25:44.107901112 +0200
+--- a/CMakeLists.txt   2024-10-08 22:04:07.763300956 +0200
++++ b/CMakeLists.txt   2024-10-07 15:25:44.107901112 +0200
 @@ -42,7 +42,8 @@
  set(MCUT_MAJOR 1)
  set(MCUT_MINOR 2)
@@ -35,8 +35,8 @@
        add_subdirectory(${mio_SOURCE_DIR} build)
  
        #
---- a/mcut/mcut/tutorials/CMakeLists.txt       2024-10-08 22:04:07.775300917 +0200
-+++ b/mcut/mcut/tutorials/CMakeLists.txt       2024-10-07 12:57:28.643032926 +0200
+--- a/tutorials/CMakeLists.txt 2024-10-08 22:04:07.775300917 +0200
++++ b/tutorials/CMakeLists.txt 2024-10-07 12:57:28.643032926 +0200
 @@ -3,7 +3,7 @@
  function(create_tutorial_target tutorial_name)
      add_executable(${tutorial_name} "${CMAKE_CURRENT_SOURCE_DIR}/${tutorial_name}/${tutorial_name}.cpp")