Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package FreeCAD for openSUSE:Factory checked 
in at 2021-02-25 18:29:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/FreeCAD (Old)
 and      /work/SRC/openSUSE:Factory/.FreeCAD.new.2378 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "FreeCAD"

Thu Feb 25 18:29:08 2021 rev:29 rq:874946 version:0.18.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/FreeCAD/FreeCAD.changes  2021-01-05 
18:14:52.211423501 +0100
+++ /work/SRC/openSUSE:Factory/.FreeCAD.new.2378/FreeCAD.changes        
2021-02-25 18:29:15.246251283 +0100
@@ -1,0 +2,13 @@
+Tue Feb 23 19:05:09 UTC 2021 - Stefan Br??ns <[email protected]>
+
+- Fix build and tests with OCCT 7.5, add
+  0001-Part-Import-skip-ci-disable-use-of-Message_ProgressI.patch
+  0001-import-Hotfix-for-build-failure-from-bad-debug-code.patch
+  0001-partdesign-fix-failing-tapered-hole-test.patch
+- Add 0001-add-missing-std-namespace-to-build-on-Debian-10.patch
+- Cleanup specfile:
+  * Use system PyCXX, drop unused libboost_python3
+  * Drop some unused dependencies
+  * Remove ChangeLog.txt, not updated since version 0.14
+
+-------------------------------------------------------------------

New:
----
  0001-Part-Import-skip-ci-disable-use-of-Message_ProgressI.patch
  0001-add-missing-std-namespace-to-build-on-Debian-10.patch
  0001-import-Hotfix-for-build-failure-from-bad-debug-code.patch
  0001-partdesign-fix-failing-tapered-hole-test.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ FreeCAD.spec ++++++
--- /var/tmp/diff_new_pack.k2ZUev/_old  2021-02-25 18:29:18.902253658 +0100
+++ /var/tmp/diff_new_pack.k2ZUev/_new  2021-02-25 18:29:18.902253658 +0100
@@ -16,8 +16,6 @@
 #
 
 
-%define build_tar_ball 1
-
 %define x_prefix %{_libdir}/%{name}
 
 %if 0%{?suse_version} > 1500
@@ -56,6 +54,14 @@
 Patch10:        0001-Fix-ODR-violation-correct-Ui_TaskSketcherGeneral-nam.patch
 # PATCH-FIX-UPSTREAM -- 
https://github.com/FreeCAD/FreeCAD/commit/6bd39e8a90e65d81
 Patch11:        0001-Gui-skip-ci-fix-Wodr.patch
+# PATCH-FIX-UPSTREAM -- Rebased 
https://github.com/FreeCAD/FreeCAD/commit/fd9cdb9de9d06ebd
+Patch12:        0001-Part-Import-skip-ci-disable-use-of-Message_ProgressI.patch
+# PATCH-FIX-UPSTREAM -- Rebased 
https://github.com/FreeCAD/FreeCAD/commit/063515f65007c116
+Patch13:        0001-import-Hotfix-for-build-failure-from-bad-debug-code.patch
+# PATCH-FIX-UPSTREAM -- 
https://github.com/FreeCAD/FreeCAD/commit/50957037764de76b
+Patch14:        0001-add-missing-std-namespace-to-build-on-Debian-10.patch
+# PATCH-FIX-UPSTREAM -- 
https://github.com/FreeCAD/FreeCAD/commit/8be2c08141f0275e
+Patch15:        0001-partdesign-fix-failing-tapered-hole-test.patch
 
 # Test suite fails on 32bit and I don't want to debug that anymore
 ExcludeArch:    %ix86 %arm ppc s390 s390x
@@ -64,7 +70,6 @@
 BuildRequires:  libboost_filesystem-devel >= 1.55
 BuildRequires:  libboost_graph-devel >= 1.55
 BuildRequires:  libboost_program_options-devel >= 1.55
-BuildRequires:  libboost_python3-devel >= 1.55
 BuildRequires:  libboost_regex-devel >= 1.55
 %if %{without boost_signals2}
 BuildRequires:  libboost_signals-devel >= 1.55
@@ -73,16 +78,10 @@
 BuildRequires:  libboost_thread-devel >= 1.55
 
 BuildRequires:  cmake
-BuildRequires:  dos2unix
 BuildRequires:  double-conversion-devel
-BuildRequires:  doxygen
 BuildRequires:  eigen3-devel
-BuildRequires:  f2c
 BuildRequires:  fdupes
-BuildRequires:  freeglut-devel
-BuildRequires:  gcc-fortran
 BuildRequires:  glew-devel
-BuildRequires:  graphviz
 BuildRequires:  hdf5-devel
 BuildRequires:  hicolor-icon-theme
 # We use the internal smesh version with fixes atm
@@ -104,6 +103,8 @@
 # Qt5 & python3
 BuildRequires:  python3-devel
 BuildRequires:  python3-matplotlib
+BuildRequires:  python3-pybind11-devel
+BuildRequires:  python3-pycxx-devel
 BuildRequires:  python3-pyside2-devel
 BuildRequires:  python3-vtk
 BuildRequires:  python3-xml
@@ -144,12 +145,9 @@
 %endif
 
 BuildRequires:  swig
-BuildRequires:  unzip
 BuildRequires:  update-desktop-files
 BuildRequires:  vtk-devel
 BuildRequires:  zlib-devel
-Requires(post): shared-mime-info
-Requires(postun): shared-mime-info
 # we need to ensure to have the minimum version from build env
 Requires:       libopencascade7 >= %(/bin/bash -c 'rpm -q --qf "%%{version}" 
libopencascade7')
 
@@ -172,25 +170,26 @@
 This package contains the files needed for development with FreeCAD.
 
 %prep
-%if %{build_tar_ball}
 %setup -q
-%else
-mv %_sourcedir/%name-%version %_builddir/%name-%version
-%setup -q -D -T 0
-%endif
 %autopatch -p1
 
 # fix env-script-interpreter
 sed -i '1c#!%{__python3}' \
-        src/Mod/Test/testmakeWireString.py \
-        src/Mod/Robot/MovieTool.py
+        src/Mod/Robot/MovieTool.py \
+        src/Mod/Test/testmakeWireString.py
 
-# Fix "wrong-file-end-of-line-encoding" rpmlint warning
-sed -i 's/\r$//' ChangeLog.txt
+# Fix "non-executable-script" rpmlint warning
+chmod 755 src/Mod/Robot/MovieTool.py \
+          src/Mod/Test/testmakeWireString.py \
+          src/Mod/Test/unittestgui.py
 
 # Fix "wrong-script-end-of-line-encoding" rpmlint warning
+sed -i 's/\r$//' src/Mod/Part/MakeBottle.py
+sed -i 's/\r$//' src/Mod/PartDesign/Scripts/FilletArc.py
+sed -i 's/\r$//' src/Mod/PartDesign/Scripts/Parallelepiped.py
 sed -i 's/\r$//' src/Mod/PartDesign/Scripts/Spring.py
 sed -i 's/\r$//' src/Mod/Robot/MovieTool.py
+sed -i 's/\r$//' src/Mod/Test/unittestgui.py
 
 # Remove 3rd party libs
 rm src/3rdparty/Pivy -fr
@@ -211,15 +210,19 @@
   -DPYTHON_EXECUTABLE=/usr/bin/python3 \
   -DSHIBOKEN_INCLUDE_DIR=/usr/include/shiboken2/ \
   -DPYSIDE_INCLUDE_DIR=/usr/include/PySide2/ \
+  -DFREECAD_USE_PYBIND11:BOOL=ON \
   -DBUILD_ENABLE_CXX_STD:STRING="C++17" \
   -DBUILD_QT5=ON \
+  -DFREECAD_USE_QT_DIALOG:BOOL=ON \
   -DFREECAD_USE_EXTERNAL_PIVY:BOOL=TRUE \
   -DBUILD_OPENSCAD:BOOL=ON \
-  -DBUILD_FEM_NETGEN:BOOL=OFF \
   -DFREECAD_USE_EXTERNAL_SMESH=OFF \
+  -DBUILD_FLAT_MESH:BOOL=ON \
   -DBUILD_SMESH:BOOL=%{?with_smesh:ON}%{!?with_smesh:OFF} \
   -DBUILD_MESH_PART:BOOL=%{?with_smesh:ON}%{!?with_smesh:OFF} \
   -DBUILD_FEM:BOOL=%{?with_smesh:ON}%{!?with_smesh:OFF} \
+  -DBUILD_FEM_NETGEN:BOOL=OFF \
+  -DBUILD_FEM_VTK:BOOL=ON \
   -Wno-dev \
   ..
 
@@ -228,11 +231,6 @@
 %install
 %cmake_install
 
-# Fix "non-executable-script" rpmlint warning
-chmod 755 %{buildroot}%{x_prefix}/Mod/Robot/MovieTool.py \
-          %{buildroot}%{x_prefix}/Mod/Test/testmakeWireString.py \
-          %{buildroot}%{x_prefix}/Mod/Test/unittestgui.py
-
 # Move icons, mimeinfo, metainfo to the correct location
 mv %{buildroot}%{x_prefix}/share/* %{buildroot}%{_datadir}/
 for size in 64 48 32 16; do
@@ -258,12 +256,6 @@
 mkdir -p %{buildroot}%{_docdir}/%{name}-devel
 #cp -a html/ %%{buildroot}%%{_docdir}/%%{name}-devel/
 
-# Correct line endings
-dos2unix %{buildroot}%{x_prefix}/Mod/PartDesign/Scripts/FilletArc.py
-dos2unix %{buildroot}%{x_prefix}/Mod/PartDesign/Scripts/Parallelepiped.py
-dos2unix %{buildroot}%{x_prefix}/Mod/Test/unittestgui.py
-dos2unix %{buildroot}%{x_prefix}/Mod/Part/MakeBottle.py
-
 # Link binaries
 mkdir -p %{buildroot}/usr/bin
 ln -s -t %{buildroot}/usr/bin %{x_prefix}/bin/FreeCAD
@@ -278,8 +270,8 @@
 
 %files
 %license LICENSE
-%doc ChangeLog.txt README.md
-%{_bindir}/FreeCAD*
+%doc README.md
+%{_bindir}/FreeCAD{,Cmd}
 %doc %{_docdir}/%{name}/
 %{_libdir}/%{name}
 %{_datadir}/%{name}/

++++++ 0001-Part-Import-skip-ci-disable-use-of-Message_ProgressI.patch ++++++
>From de4de28563383c08f247738623a7ea469604e4d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <[email protected]>
Date: Tue, 23 Feb 2021 17:37:07 +0100
Subject: [PATCH] Part/Import: [skip ci] disable use of
 Message_ProgressIndicator for OCC >= 7.5 due to major API changes

---
 src/Mod/Import/App/AppImportPy.cpp     |  8 ++++++++
 src/Mod/Import/Gui/AppImportGuiPy.cpp  | 16 ++++++++++++++++
 src/Mod/Part/App/ImportIges.cpp        |  6 ++++++
 src/Mod/Part/App/ImportStep.cpp        |  4 ++++
 src/Mod/Part/App/ProgressIndicator.cpp |  2 ++
 src/Mod/Part/App/ProgressIndicator.h   |  3 +++
 src/Mod/Part/App/TopoShape.cpp         | 22 +++++++++++++++++++---
 src/Mod/Part/Gui/TaskCheckGeometry.cpp | 13 ++++++++++++-
 src/Mod/Part/Gui/TaskCheckGeometry.h   |  4 +++-
 9 files changed, 73 insertions(+), 5 deletions(-)

diff --git a/src/Mod/Import/App/AppImportPy.cpp 
b/src/Mod/Import/App/AppImportPy.cpp
index dfb6234e5a..8c11ee2078 100644
--- a/src/Mod/Import/App/AppImportPy.cpp
+++ b/src/Mod/Import/App/AppImportPy.cpp
@@ -146,12 +146,16 @@ private:
                         throw Py::Exception(PyExc_IOError, "cannot read STEP 
file");
                     }
 
+#if OCC_VERSION_HEX < 0x070500
                     Handle(Message_ProgressIndicator) pi = new 
Part::ProgressIndicator(100);
                     aReader.Reader().WS()->MapReader()->SetProgress(pi);
                     pi->NewScope(100, "Reading STEP file...");
                     pi->Show();
+#endif
                     aReader.Transfer(hDoc);
+#if OCC_VERSION_HEX < 0x070500
                     pi->EndScope();
+#endif
                 }
                 catch (OSD_Exception& e) {
                     Base::Console().Error("%s\n", e.GetMessageString());
@@ -178,12 +182,16 @@ private:
                         throw Py::Exception(PyExc_IOError, "cannot read IGES 
file");
                     }
 
+#if OCC_VERSION_HEX < 0x070500
                     Handle(Message_ProgressIndicator) pi = new 
Part::ProgressIndicator(100);
                     aReader.WS()->MapReader()->SetProgress(pi);
                     pi->NewScope(100, "Reading IGES file...");
                     pi->Show();
+#endif
                     aReader.Transfer(hDoc);
+#if OCC_VERSION_HEX < 0x070500
                     pi->EndScope();
+#endif
                     // 
http://opencascade.blogspot.de/2009/03/unnoticeable-memory-leaks-part-2.html
                     
Handle(IGESToBRep_Actor)::DownCast(aReader.WS()->TransferReader()->Actor())
                             ->SetModel(new IGESData_IGESModel);
diff --git a/src/Mod/Import/Gui/AppImportGuiPy.cpp 
b/src/Mod/Import/Gui/AppImportGuiPy.cpp
index 8f9ace29c7..9414e622a8 100644
--- a/src/Mod/Import/Gui/AppImportGuiPy.cpp
+++ b/src/Mod/Import/Gui/AppImportGuiPy.cpp
@@ -391,12 +391,16 @@ private:
                         throw Py::Exception(PyExc_IOError, "cannot read STEP 
file");
                     }
 
+#if OCC_VERSION_HEX < 0x070500
                     Handle(Message_ProgressIndicator) pi = new 
Part::ProgressIndicator(100);
                     aReader.Reader().WS()->MapReader()->SetProgress(pi);
                     pi->NewScope(100, "Reading STEP file...");
                     pi->Show();
+#endif
                     aReader.Transfer(hDoc);
+#if OCC_VERSION_HEX < 0x070500
                     pi->EndScope();
+#endif
                 }
                 catch (OSD_Exception& e) {
                     Base::Console().Error("%s\n", e.GetMessageString());
@@ -423,12 +427,16 @@ private:
                         throw Py::Exception(Base::BaseExceptionFreeCADError, 
"cannot read IGES file");
                     }
 
+#if OCC_VERSION_HEX < 0x070500
                     Handle(Message_ProgressIndicator) pi = new 
Part::ProgressIndicator(100);
                     aReader.WS()->MapReader()->SetProgress(pi);
                     pi->NewScope(100, "Reading IGES file...");
                     pi->Show();
+#endif
                     aReader.Transfer(hDoc);
+#if OCC_VERSION_HEX < 0x070500
                     pi->EndScope();
+#endif
                     // 
http://opencascade.blogspot.de/2009/03/unnoticeable-memory-leaks-part-2.html
                     
Handle(IGESToBRep_Actor)::DownCast(aReader.WS()->TransferReader()->Actor())
                             ->SetModel(new IGESData_IGESModel);
@@ -601,12 +609,16 @@ private:
                     throw Py::Exception(PyExc_IOError, "cannot read STEP 
file");
                 }
 
+#if OCC_VERSION_HEX < 0x070500
                 Handle(Message_ProgressIndicator) pi = new 
Part::ProgressIndicator(100);
                 aReader.Reader().WS()->MapReader()->SetProgress(pi);
                 pi->NewScope(100, "Reading STEP file...");
                 pi->Show();
+#endif
                 aReader.Transfer(hDoc);
+#if OCC_VERSION_HEX < 0x070500
                 pi->EndScope();
+#endif
             }
             else if (file.hasExtension("igs") || file.hasExtension("iges")) {
                 Base::Reference<ParameterGrp> hGrp = 
App::GetApplication().GetUserParameter()
@@ -623,12 +635,16 @@ private:
                     throw Py::Exception(PyExc_IOError, "cannot read IGES 
file");
                 }
 
+#if OCC_VERSION_HEX < 0x070500
                 Handle(Message_ProgressIndicator) pi = new 
Part::ProgressIndicator(100);
                 aReader.WS()->MapReader()->SetProgress(pi);
                 pi->NewScope(100, "Reading IGES file...");
                 pi->Show();
+#endif
                 aReader.Transfer(hDoc);
+#if OCC_VERSION_HEX < 0x070500
                 pi->EndScope();
+#endif
                 // 
http://opencascade.blogspot.de/2009/03/unnoticeable-memory-leaks-part-2.html
                 
Handle(IGESToBRep_Actor)::DownCast(aReader.WS()->TransferReader()->Actor())
                         ->SetModel(new IGESData_IGESModel);
diff --git a/src/Mod/Part/App/ImportIges.cpp b/src/Mod/Part/App/ImportIges.cpp
index abc0faeb59..f004e9bc36 100644
--- a/src/Mod/Part/App/ImportIges.cpp
+++ b/src/Mod/Part/App/ImportIges.cpp
@@ -52,6 +52,8 @@
 #include <Interface_EntityIterator.hxx>
 #include <Quantity_Color.hxx>
 #include <TCollection_ExtendedString.hxx>
+#include <Standard_Version.hxx>
+
 
 #include <Base/Console.h>
 #include <Base/Sequencer.h>
@@ -90,16 +92,20 @@ int Part::ImportIgesParts(App::Document *pcDoc, const char* 
FileName)
 
 #if 1
         std::string aName = fi.fileNamePure();
+#if OCC_VERSION_HEX < 0x070500
         Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
         pi->NewScope(100, "Reading IGES file...");
         pi->Show();
         aReader.WS()->MapReader()->SetProgress(pi);
+#endif
 
         // make model
         aReader.ClearShapes();
         //Standard_Integer nbRootsForTransfer = aReader.NbRootsForTransfer();
         aReader.TransferRoots();
+#if OCC_VERSION_HEX < 0x070500
         pi->EndScope();
+#endif
 
         // put all other free-flying shapes into a single compound
         Standard_Boolean emptyComp = Standard_True;
diff --git a/src/Mod/Part/App/ImportStep.cpp b/src/Mod/Part/App/ImportStep.cpp
index 828c27040b..9db9e397d8 100644
--- a/src/Mod/Part/App/ImportStep.cpp
+++ b/src/Mod/Part/App/ImportStep.cpp
@@ -105,10 +105,12 @@ int Part::ImportStepParts(App::Document *pcDoc, const 
char* Name)
         throw Base::FileException("Cannot open STEP file");
     }
 
+#if OCC_VERSION_HEX < 0x070500
     Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
     aReader.WS()->MapReader()->SetProgress(pi);
     pi->NewScope(100, "Reading STEP file...");
     pi->Show();
+#endif
 
     // Root transfers
     Standard_Integer nbr = aReader.NbRootsForTransfer();
@@ -117,7 +119,9 @@ int Part::ImportStepParts(App::Document *pcDoc, const char* 
Name)
         Base::Console().Log("STEP: Transferring Root %d\n",n);
         aReader.TransferRoot(n);
     }
+#if OCC_VERSION_HEX < 0x070500
     pi->EndScope();
+#endif
 
     // Collecting resulting entities
     Standard_Integer nbs = aReader.NbShapes();
diff --git a/src/Mod/Part/App/ProgressIndicator.cpp 
b/src/Mod/Part/App/ProgressIndicator.cpp
index c5f9d64261..8eb0fcadd1 100644
--- a/src/Mod/Part/App/ProgressIndicator.cpp
+++ b/src/Mod/Part/App/ProgressIndicator.cpp
@@ -54,6 +54,7 @@ using namespace Part;
   \endcode
  */
 
+#if OCC_VERSION_HEX < 0x070500
 ProgressIndicator::ProgressIndicator (int theMaxVal)
   : myProgress(new Base::SequencerLauncher("", theMaxVal))
 {
@@ -83,3 +84,4 @@ Standard_Boolean ProgressIndicator::UserBreak()
 {
     return myProgress->wasCanceled();
 }
+#endif
diff --git a/src/Mod/Part/App/ProgressIndicator.h 
b/src/Mod/Part/App/ProgressIndicator.h
index 73214c0716..ad34d2ee5e 100644
--- a/src/Mod/Part/App/ProgressIndicator.h
+++ b/src/Mod/Part/App/ProgressIndicator.h
@@ -25,11 +25,13 @@
 #define PART_PROGRESSINDICATOR_H
 
 #include <Message_ProgressIndicator.hxx>
+#include <Standard_Version.hxx>
 #include <Base/Sequencer.h>
 #include <memory>
 
 namespace Part {
 
+#if OCC_VERSION_HEX < 0x070500
 class PartExport ProgressIndicator : public Message_ProgressIndicator
 {
 public:
@@ -42,6 +44,7 @@ public:
 private:
     std::unique_ptr<Base::SequencerLauncher> myProgress;
 };
+#endif
 
 }
 
diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp
index cc8772e6ed..5615f217a7 100644
--- a/src/Mod/Part/App/TopoShape.cpp
+++ b/src/Mod/Part/App/TopoShape.cpp
@@ -584,17 +584,21 @@ void TopoShape::importIges(const char *FileName)
         if (aReader.ReadFile(encodeFilename(FileName).c_str()) != 
IFSelect_RetDone)
             throw Base::FileException("Error in reading IGES");
 
+#if OCC_VERSION_HEX < 0x070500
         Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
         pi->NewScope(100, "Reading IGES file...");
         pi->Show();
         aReader.WS()->MapReader()->SetProgress(pi);
+#endif
 
         // make brep
         aReader.ClearShapes();
         aReader.TransferRoots();
         // one shape that contains all subshapes
         this->_Shape = aReader.OneShape();
+#if OCC_VERSION_HEX < 0x070500
         pi->EndScope();
+#endif
     }
     catch (Standard_Failure& e) {
         throw Base::CADKernelError(e.GetMessageString());
@@ -608,16 +612,20 @@ void TopoShape::importStep(const char *FileName)
         if (aReader.ReadFile(encodeFilename(FileName).c_str()) != 
IFSelect_RetDone)
             throw Base::FileException("Error in reading STEP");
 
+#if OCC_VERSION_HEX < 0x070500
         Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
         aReader.WS()->MapReader()->SetProgress(pi);
         pi->NewScope(100, "Reading STEP file...");
         pi->Show();
+#endif
 
         // Root transfers
         aReader.TransferRoots();
         // one shape that contains all subshapes
         this->_Shape = aReader.OneShape();
+#if OCC_VERSION_HEX < 0x070500
         pi->EndScope();
+#endif
     }
     catch (Standard_Failure& e) {
         throw Base::CADKernelError(e.GetMessageString());
@@ -630,7 +638,7 @@ void TopoShape::importBrep(const char *FileName)
         // read brep-file
         BRep_Builder aBuilder;
         TopoDS_Shape aShape;
-#if OCC_VERSION_HEX >= 0x060300
+#if OCC_VERSION_HEX >= 0x060300 && OCC_VERSION_HEX < 0x070500
         Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
         pi->NewScope(100, "Reading BREP file...");
         pi->Show();
@@ -652,16 +660,19 @@ void TopoShape::importBrep(std::istream& str, int 
indicator)
         // read brep-file
         BRep_Builder aBuilder;
         TopoDS_Shape aShape;
-#if OCC_VERSION_HEX >= 0x060300
+#if OCC_VERSION_HEX >= 0x060300 && OCC_VERSION_HEX < 0x070500
         if (indicator) {
             Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
             pi->NewScope(100, "Reading BREP file...");
             pi->Show();
             BRepTools::Read(aShape,str,aBuilder,pi);
             pi->EndScope();
-        } else
+        }
+        else {
             BRepTools::Read(aShape,str,aBuilder);
+        }
 #else
+        (void)indicator;
         BRepTools::Read(aShape,str,aBuilder);
 #endif
         this->_Shape = aShape;
@@ -750,10 +761,13 @@ void TopoShape::exportStep(const char *filename) const
 
         const Handle(XSControl_TransferWriter)& hTransferWriter = 
aWriter.WS()->TransferWriter();
         Handle(Transfer_FinderProcess) hFinder = 
hTransferWriter->FinderProcess();
+
+#if OCC_VERSION_HEX < 0x070500
         Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
         hFinder->SetProgress(pi);
         pi->NewScope(100, "Writing STEP file...");
         pi->Show();
+#endif
 
         if (aWriter.Transfer(this->_Shape, STEPControl_AsIs) != 
IFSelect_RetDone)
             throw Base::FileException("Error in transferring STEP");
@@ -767,7 +781,9 @@ void TopoShape::exportStep(const char *filename) const
 
         if (aWriter.Write(encodeFilename(filename).c_str()) != 
IFSelect_RetDone)
             throw Base::FileException("Writing of STEP failed");
+#if OCC_VERSION_HEX < 0x070500
         pi->EndScope();
+#endif
     }
     catch (Standard_Failure& e) {
         throw Base::CADKernelError(e.GetMessageString());
diff --git a/src/Mod/Part/Gui/TaskCheckGeometry.cpp 
b/src/Mod/Part/Gui/TaskCheckGeometry.cpp
index 0b74eec02b..b5d6d11ebb 100644
--- a/src/Mod/Part/Gui/TaskCheckGeometry.cpp
+++ b/src/Mod/Part/Gui/TaskCheckGeometry.cpp
@@ -418,10 +418,12 @@ void TaskCheckGeometryResults::goCheck()
     std::vector<Gui::SelectionSingleton::SelObj>::iterator it;
     ResultEntry *theRoot = new ResultEntry();
 
+#if OCC_VERSION_HEX < 0x070500
     Handle(Message_ProgressIndicator) theProgress = new 
BOPProgressIndicator(tr("Check geometry"), Gui::getMainWindow());
     theProgress->NewScope("BOP check...");
 #if OCC_VERSION_HEX >= 0x060900
     theProgress->Show();
+#endif
 #endif
 
     selectedCount = static_cast<int>(selection.size());
@@ -484,11 +486,18 @@ void TaskCheckGeometryResults::goCheck()
             std::string label = "Checking ";
             label += feature->Label.getStrValue();
             label += "...";
+#if OCC_VERSION_HEX < 0x070500
             theProgress->NewScope(label.c_str());
             invalidShapes += goBOPSingleCheck(shape, theRoot, baseName, 
theProgress);
+#else
+            invalidShapes += goBOPSingleCheck(shape, theRoot, baseName, 
nullptr);
+#endif
+
+#if OCC_VERSION_HEX < 0x070500
             theProgress->EndScope();
             if (theProgress->UserBreak())
               break;
+#endif
           }
         }
     }
@@ -613,7 +622,7 @@ int TaskCheckGeometryResults::goBOPSingleCheck(const 
TopoDS_Shape& shapeIn, Resu
   //this is left for another time.
   TopoDS_Shape BOPCopy = BRepBuilderAPI_Copy(shapeIn).Shape();
   BOPAlgo_ArgumentAnalyzer BOPCheck;
-#if OCC_VERSION_HEX >= 0x060900
+#if OCC_VERSION_HEX >= 0x060900 && OCC_VERSION_HEX < 0x070500
   BOPCheck.SetProgressIndicator(theProgress);
 #else
   Q_UNUSED(theProgress);
@@ -961,6 +970,7 @@ TaskCheckGeometryDialog::~TaskCheckGeometryDialog()
 
 
////////////////////////////////////////////////////////////////////////////////////////////////
 
+#if OCC_VERSION_HEX < 0x070500
 BOPProgressIndicator::BOPProgressIndicator (const QString& title, QWidget* 
parent)
 {
     steps = 0;
@@ -1023,5 +1033,6 @@ Standard_Boolean BOPProgressIndicator::UserBreak()
 
     return Standard_False;
 }
+#endif
 
 #include "moc_TaskCheckGeometry.cpp"
diff --git a/src/Mod/Part/Gui/TaskCheckGeometry.h 
b/src/Mod/Part/Gui/TaskCheckGeometry.h
index e7d7d31271..1cf595bf85 100644
--- a/src/Mod/Part/Gui/TaskCheckGeometry.h
+++ b/src/Mod/Part/Gui/TaskCheckGeometry.h
@@ -27,6 +27,7 @@
 #include <BRepCheck_Analyzer.hxx>
 #include <BRepCheck_Status.hxx>
 #include <Message_ProgressIndicator.hxx>
+#include <Standard_Version.hxx>
 #include <TopTools_MapOfShape.hxx>
 #include <Gui/TaskView/TaskDialog.h>
 #include <Gui/TaskView/TaskView.h>
@@ -147,6 +148,7 @@ private:
     QTextEdit *contentLabel;
 };
 
+#if OCC_VERSION_HEX < 0x070500
 class BOPProgressIndicator : public Message_ProgressIndicator
 {
 public:
@@ -162,7 +164,7 @@ private:
     QTime time;
     QProgressDialog* myProgress;
 };
-
+#endif
 }
 
 #endif // TASKCHECKGEOMETRY_H
-- 
2.30.1

++++++ 0001-add-missing-std-namespace-to-build-on-Debian-10.patch ++++++
>From b084e4340f6cad03b7182c2ffe87d8e21610e9a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <[email protected]>
Date: Tue, 23 Feb 2021 18:15:05 +0100
Subject: [PATCH] add missing std:: namespace to build on Debian 10

---
 src/Mod/Raytracing/App/RayFeature.cpp | 1 +
 src/Mod/TechDraw/App/Geometry.cpp     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/Mod/Raytracing/App/RayFeature.cpp 
b/src/Mod/Raytracing/App/RayFeature.cpp
index cdd2cb6dc1..235a986851 100644
--- a/src/Mod/Raytracing/App/RayFeature.cpp
+++ b/src/Mod/Raytracing/App/RayFeature.cpp
@@ -36,6 +36,7 @@
 
 
 using namespace Raytracing;
+using namespace std;
 
 PROPERTY_SOURCE(Raytracing::RayFeature, Raytracing::RaySegment)
 
diff --git a/src/Mod/TechDraw/App/Geometry.cpp 
b/src/Mod/TechDraw/App/Geometry.cpp
index 123be79795..16e7487eec 100644
--- a/src/Mod/TechDraw/App/Geometry.cpp
+++ b/src/Mod/TechDraw/App/Geometry.cpp
@@ -75,6 +75,7 @@
 
 using namespace TechDrawGeometry;
 using namespace TechDraw;
+using namespace std;
 
 // Collection of Geometric Features
 Wire::Wire()
-- 
2.30.1

++++++ 0001-import-Hotfix-for-build-failure-from-bad-debug-code.patch ++++++
>From 063515f65007c116c4c0e05c1fcf82637b8bf152 Mon Sep 17 00:00:00 2001
From: Gabriel Wicke <[email protected]>
Date: Sun, 17 May 2020 21:09:19 -0700
Subject: [PATCH] [import] Hotfix for build failure from bad debug code

Quick fix for a build failure with latest opencascade. Directly use
std::cout instead of custom streams.
---
 src/Mod/Import/App/StepShape.cpp | 29 ++++++++++++-----------------
 1 file changed, 12 insertions(+), 17 deletions(-)

diff --git a/src/Mod/Import/App/StepShape.cpp b/src/Mod/Import/App/StepShape.cpp
index acd4a9e706..ec714c891e 100644
--- a/src/Mod/Import/App/StepShape.cpp
+++ b/src/Mod/Import/App/StepShape.cpp
@@ -65,38 +65,33 @@ int StepShape::read(const char* fileName)
         throw Base::FileException("Cannot open STEP file");
     }
 
-    //Standard_Integer ic = Interface_Static::IVal("read.precision.mode"); 
-    //Standard_Real rp = Interface_Static::RVal("read.maxprecision.val"); 
-    //Standard_Integer ic = Interface_Static::IVal("read.maxprecision.mode"); 
-    //Standard_Integer mv = 
Interface_Static::IVal("read.stdsameparameter.mode"); 
-    //Standard_Integer rp = Interface_Static::IVal("read.surfacecurve.mode"); 
-    //Standard_Real era = 
Interface_Static::RVal("read.encoderegularity.angle"); 
-    //Standard_Integer ic = Interface_Static::IVal("read.step.product.mode"); 
+    //Standard_Integer ic = Interface_Static::IVal("read.precision.mode");
+    //Standard_Real rp = Interface_Static::RVal("read.maxprecision.val");
+    //Standard_Integer ic = Interface_Static::IVal("read.maxprecision.mode");
+    //Standard_Integer mv = 
Interface_Static::IVal("read.stdsameparameter.mode");
+    //Standard_Integer rp = Interface_Static::IVal("read.surfacecurve.mode");
+    //Standard_Real era = 
Interface_Static::RVal("read.encoderegularity.angle");
+    //Standard_Integer ic = Interface_Static::IVal("read.step.product.mode");
     //Standard_Integer ic = 
Interface_Static::IVal("read.step.product.context");
-    //Standard_Integer ic = Interface_Static::IVal("read.step.shape.repr"); 
+    //Standard_Integer ic = Interface_Static::IVal("read.step.shape.repr");
     //Standard_Integer ic = Interface_Static::IVal("read.step.assembly.level");
     //Standard_Integer ic = 
Interface_Static::IVal("read.step.shape.relationship");
-    //Standard_Integer ic = Interface_Static::IVal("read.step.shape.aspect"); 
+    //Standard_Integer ic = Interface_Static::IVal("read.step.shape.aspect");
 
-    Handle(TColStd_HSequenceOfTransient) list = aReader.GiveList(); 
+    Handle(TColStd_HSequenceOfTransient) list = aReader.GiveList();
 
     //Use method StepData_StepModel::NextNumberForLabel to find its rank with 
the following:
     //Standard_CString label = "#...";
     Handle(StepData_StepModel) model = aReader.StepModel();
     //rank = model->NextNumberForLabe(label, 0, Standard_False);
 
-    Handle(Message_PrinterOStream) mstr = new Message_PrinterOStream();
-    Handle(Message_Messenger) msg = new Message_Messenger(mstr);
-
     std::cout << "dump of step header:" << std::endl;
-
-    model->DumpHeader(msg);
+    model->DumpHeader(std::cout);
 
     for(int nent=1;nent<=model->NbEntities();nent++) {
       Handle(Standard_Transient) entity=model->Entity(nent);
-      
       std::cout << "label entity " << nent << ":" ;
-      model->PrintLabel(entity,msg);
+      model->PrintLabel(entity, std::cout);
       std::cout << ";"<< entity->DynamicType()->Name() << std::endl;
     }
 
-- 
2.30.1

>From 2cb9b147f13419f019f9808ace21d3d2ceae99c5 Mon Sep 17 00:00:00 2001
From: wmayer <[email protected]>
Date: Sat, 30 May 2020 11:56:14 +0200
Subject: [PATCH] Import: handle OCC versions 7.4.1 and earlier

---
 src/Mod/Import/App/StepShape.cpp | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/Mod/Import/App/StepShape.cpp b/src/Mod/Import/App/StepShape.cpp
index ec714c891e..a27ff781b6 100644
--- a/src/Mod/Import/App/StepShape.cpp
+++ b/src/Mod/Import/App/StepShape.cpp
@@ -34,6 +34,7 @@
 # include <Interface_Static.hxx>
 # include <Message_Messenger.hxx>
 # include <Message_PrinterOStream.hxx>
+# include <Standard_Version.hxx>
 
 # include <Base/FileInfo.h>
 # include <Base/Exception.h>
@@ -86,12 +87,22 @@ int StepShape::read(const char* fileName)
     //rank = model->NextNumberForLabe(label, 0, Standard_False);
 
     std::cout << "dump of step header:" << std::endl;
+#if OCC_VERSION_HEX < 0x070401
+    Handle(Message_PrinterOStream) mstr = new Message_PrinterOStream();
+    Handle(Message_Messenger) msg = new Message_Messenger(mstr);
+    model->DumpHeader(msg);
+#else
     model->DumpHeader(std::cout);
+#endif
 
-    for(int nent=1;nent<=model->NbEntities();nent++) {
+    for (int nent=1;nent<=model->NbEntities();nent++) {
       Handle(Standard_Transient) entity=model->Entity(nent);
       std::cout << "label entity " << nent << ":" ;
+#if OCC_VERSION_HEX < 0x070401
+      model->PrintLabel(entity, msg);
+#else
       model->PrintLabel(entity, std::cout);
+#endif
       std::cout << ";"<< entity->DynamicType()->Name() << std::endl;
     }
 
-- 
2.30.1

++++++ 0001-partdesign-fix-failing-tapered-hole-test.patch ++++++
>From 8be2c08141f0275e9da005bd143771953e982a59 Mon Sep 17 00:00:00 2001
From: lorenz <[email protected]>
Date: Sun, 3 May 2020 07:47:27 +0200
Subject: [PATCH] partdesign: fix failing tapered hole test

The given parameters return an invalid shape. This fails with occt7.4 but 
doesn't with occt7.3. If the angle is 45 degree the cone is self-intersecting 
as Hole.Depth > Hole.Diameter/2. Changing the Hole.TaperedAngle to 60 degree 
solves this issue.
---
 src/Mod/PartDesign/PartDesignTests/TestHole.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Mod/PartDesign/PartDesignTests/TestHole.py 
b/src/Mod/PartDesign/PartDesignTests/TestHole.py
index d84afd69ca..cc838f4a3b 100644
--- a/src/Mod/PartDesign/PartDesignTests/TestHole.py
+++ b/src/Mod/PartDesign/PartDesignTests/TestHole.py
@@ -68,7 +68,7 @@ class TestHole(unittest.TestCase):
     def testTaperedHole(self):
         self.Hole.Diameter = 6
         self.Hole.Depth = 5
-        self.Hole.TaperedAngle = 45
+        self.Hole.TaperedAngle = 60
         self.Hole.ThreadType = 0
         self.Hole.HoleCutType = 0
         self.Hole.DepthType = 0
-- 
2.30.1

Reply via email to