Accepting request 880553 from home:StefanBruens:branches:science

- Update to version 0.19.1:
  * Lots of new features, bug fixes and improvements, see
    https://wiki.freecadweb.org/Release_notes_0.19
- Drop upstream patches:
  * 0001-Fix-build-with-pyside2-shiboken2-5.12.1.patch
  * 0003-qt-5.14.patch
  * update-swigpyrunin-for-python-3.8.patch
  * 0001-fem-use-time.process_time-instead-of-removed-time.cl.patch
  * fix_qt_5.15_build.patch
  * 0001-boost-1.73.0-The-practice-of-declaring-the-Bind-plac.patch
  * 0001-Fix-ODR-violation-correct-Ui_TaskSketcherGeneral-nam.patch
  * 0001-Gui-skip-ci-fix-Wodr.patch
  * 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
  * 0001-add-missing-std-namespace-to-build-on-Debian-10.patch
- Rebase fix-smesh-vtk9.patch

OBS-URL: https://build.opensuse.org/request/show/880553
OBS-URL: https://build.opensuse.org/package/show/science/FreeCAD?expand=0&rev=136
This commit is contained in:
Stefan Brüns 2021-03-24 12:00:30 +00:00 committed by Git OBS Bridge
parent 5b15f7dc8a
commit dc9a591b4c
21 changed files with 64 additions and 5575 deletions

View File

@ -1,35 +0,0 @@
From 47be1f5e46acd7f438672b238f1e8354a494decf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Sat, 28 Nov 2020 13:35:59 +0100
Subject: [PATCH] Fix ODR violation, correct Ui_TaskSketcherGeneral namespace
The generated ui_TaskSketcherGeneral.h defines the class in the
SketcherGui namespace.
---
src/Mod/Sketcher/Gui/TaskSketcherGeneral.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/Mod/Sketcher/Gui/TaskSketcherGeneral.h b/src/Mod/Sketcher/Gui/TaskSketcherGeneral.h
index eb3276ec7..c08489eeb 100644
--- a/src/Mod/Sketcher/Gui/TaskSketcherGeneral.h
+++ b/src/Mod/Sketcher/Gui/TaskSketcherGeneral.h
@@ -28,8 +28,6 @@
#include <Gui/Selection.h>
#include <boost/signals2.hpp>
-class Ui_TaskSketcherGeneral;
-
namespace App {
class Property;
}
@@ -40,6 +38,7 @@ class ViewProvider;
namespace SketcherGui {
+class Ui_TaskSketcherGeneral;
class ViewProviderSketch;
class SketcherGeneralWidget : public QWidget
--
2.29.2

View File

@ -1,88 +0,0 @@
From 7d362752633f0e47cebc44f52db8dffbc3b3c2e6 Mon Sep 17 00:00:00 2001
From: Christophe Giboudeaux <christophe@krop.fr>
Date: Thu, 13 Jun 2019 14:15:07 +0200
Subject: [PATCH] Fix build with pyside2/shiboken2 >= 5.12.1
Starting with 5.12.2, pyside2 and shiboken2 now create CMake build targets.
The old variables were removed, leading to linker errors when building FreeCAD.
---
src/Gui/CMakeLists.txt | 54 ++++++++++++++++++++++++------------------
1 file changed, 31 insertions(+), 23 deletions(-)
diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt
index 3bd96e0..93babc5 100644
--- a/src/Gui/CMakeLists.txt
+++ b/src/Gui/CMakeLists.txt
@@ -137,38 +137,46 @@ IF(OCULUS_FOUND)
)
ENDIF(OCULUS_FOUND)
-if(SHIBOKEN_INCLUDE_DIR)
- if (BUILD_QT5)
+if(BUILD_QT5)
+ if(Shiboken2_FOUND)
add_definitions(-DHAVE_SHIBOKEN2)
- else()
+ if("${Shiboken2_VERSION}" VERSION_GREATER 5.12.1)
+ list(APPEND FreeCADGui_LIBS Shiboken2::libshiboken)
+ else()
+ include_directories(${SHIBOKEN_INCLUDE_DIR})
+ list(APPEND FreeCADGui_LIBS ${SHIBOKEN_LIBRARY})
+ endif()
+ endif()
+ if(PySide2_FOUND)
+ add_definitions(-DHAVE_PYSIDE2)
+ if("${PySide2_VERSION}" VERSION_GREATER 5.12.1)
+ list(APPEND FreeCADGui_LIBS PySide2::pyside2)
+ # Needed to '#include pyside2_<module_name>_python.h'
+ get_target_property(PYSIDE_INCLUDE_DIR PySide2::pyside2 INTERFACE_INCLUDE_DIRECTORIES)
+ else()
+ list(APPEND FreeCADGui_LIBS ${PYSIDE_LIBRARY})
+ endif()
+ include_directories(${PYSIDE_INCLUDE_DIR}/QtWidgets)
+ endif()
+else()
+ if(SHIBOKEN_INCLUDE_DIR)
add_definitions(-DHAVE_SHIBOKEN)
+ include_directories(${SHIBOKEN_INCLUDE_DIR})
+ list(APPEND FreeCADGui_LIBS ${SHIBOKEN_LIBRARY})
endif()
- include_directories(
- ${SHIBOKEN_INCLUDE_DIR}
- )
- list(APPEND FreeCADGui_LIBS
- ${SHIBOKEN_LIBRARY}
- )
-endif(SHIBOKEN_INCLUDE_DIR)
+ if(PYSIDE_INCLUDE_DIR)
+ add_definitions(-DHAVE_PYSIDE)
+ list(APPEND FreeCADGui_LIBS ${PYSIDE_LIBRARY})
+ endif()
+endif()
-if(PYSIDE_INCLUDE_DIR)
+if(DEFINED PYSIDE_INCLUDE_DIR)
include_directories(
${PYSIDE_INCLUDE_DIR}
${PYSIDE_INCLUDE_DIR}/QtCore
${PYSIDE_INCLUDE_DIR}/QtGui
)
- list(APPEND FreeCADGui_LIBS
- ${PYSIDE_LIBRARY}
- )
- if (BUILD_QT5)
- include_directories(
- ${PYSIDE_INCLUDE_DIR}/QtWidgets
- )
- add_definitions(-DHAVE_PYSIDE2)
- else()
- add_definitions(-DHAVE_PYSIDE)
- endif()
-endif(PYSIDE_INCLUDE_DIR)
+endif()
generate_from_xml(DocumentPy)
generate_from_xml(PythonWorkbenchPy)
--
2.22.0

View File

@ -1,54 +0,0 @@
From 6bd39e8a90e65d81733e06d73bc627387808c772 Mon Sep 17 00:00:00 2001
From: wmayer <wmayer@users.sourceforge.net>
Date: Tue, 24 Nov 2020 15:46:46 +0100
Subject: [PATCH] Gui: [skip ci] fix -Wodr The forward declarations of
QuantitySpinBox and Ui_TaskAppearance were done in the wrong namespace
---
src/Gui/TaskCSysDragger.h | 3 +--
src/Gui/TaskView/TaskAppearance.h | 5 +++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Gui/TaskCSysDragger.h b/src/Gui/TaskCSysDragger.h
index 721cc51c8d..b2dcad3b5e 100644
--- a/src/Gui/TaskCSysDragger.h
+++ b/src/Gui/TaskCSysDragger.h
@@ -26,10 +26,9 @@
#include <Gui/TaskView/TaskDialog.h>
#include <App/DocumentObserver.h>
-class QuantitySpinBox;
-
namespace Gui
{
+ class QuantitySpinBox;
class SoFCCSysDragger;
class ViewProviderDragger;
diff --git a/src/Gui/TaskView/TaskAppearance.h b/src/Gui/TaskView/TaskAppearance.h
index 1e3de8a898..b637053f33 100644
--- a/src/Gui/TaskView/TaskAppearance.h
+++ b/src/Gui/TaskView/TaskAppearance.h
@@ -29,16 +29,17 @@
#include <boost/signals2.hpp>
-class Ui_TaskAppearance;
-
namespace App {
class Property;
}
namespace Gui {
class ViewProvider;
+
namespace TaskView {
+
typedef boost::signals2::connection TaskAppearance_Connection;
+class Ui_TaskAppearance;
class TaskAppearance : public TaskBox, public Gui::SelectionSingleton::ObserverType
{
--
2.29.2

View File

@ -1,426 +0,0 @@
From de4de28563383c08f247738623a7ea469604e4d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
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

View File

@ -1,37 +0,0 @@
From b084e4340f6cad03b7182c2ffe87d8e21610e9a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
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

File diff suppressed because it is too large Load Diff

View File

@ -1,86 +0,0 @@
From 96af5fea1fab074e93011078974fd24fff1068f8 Mon Sep 17 00:00:00 2001
From: looooo <sppedflyer@gmail.com>
Date: Tue, 14 Jan 2020 13:45:35 +0100
Subject: [PATCH] fem: use time.process_time instead of removed time.clock()
[rebased on 0.18.4 branch]
---
src/Mod/Fem/femmesh/femmesh2mesh.py | 4 ++--
src/Mod/Fem/femsolver/calculix/writer.py | 9 +++++++--
src/Mod/Fem/femsolver/z88/writer.py | 8 ++++++--
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/src/Mod/Fem/femmesh/femmesh2mesh.py b/src/Mod/Fem/femmesh/femmesh2mesh.py
index 9c0b4f1b9..e6159f2c7 100644
--- a/src/Mod/Fem/femmesh/femmesh2mesh.py
+++ b/src/Mod/Fem/femmesh/femmesh2mesh.py
@@ -90,7 +90,7 @@ def femmesh_2_mesh(myFemMesh, myResults=None):
# This code generates a dict and a faceCode for each face of all elements
# All faceCodes are than sorted.
- start_time = time.clock()
+ start_time = time.process_time()
faceCodeList = []
faceCodeDict = {}
@@ -194,6 +194,6 @@ def femmesh_2_mesh(myFemMesh, myResults=None):
output_mesh.extend(triangle)
# print('my 2. triangle: ', triangle)
- end_time = time.clock()
+ end_time = time.process_time()
print('Mesh by surface search method: ', end_time - start_time)
return output_mesh
diff --git a/src/Mod/Fem/femsolver/calculix/writer.py b/src/Mod/Fem/femsolver/calculix/writer.py
index e9d9e9bae..33302cefa 100644
--- a/src/Mod/Fem/femsolver/calculix/writer.py
+++ b/src/Mod/Fem/femsolver/calculix/writer.py
@@ -69,12 +69,17 @@ class FemInputWriterCcx(FemInputWriter.FemInputWriter):
FreeCAD.Console.PrintMessage('FemInputWriterCcx --> self.file_name --> ' + self.file_name + '\n')
def write_calculix_input_file(self):
- timestart = time.clock()
+ timestart = time.process_time()
+ FreeCAD.Console.PrintMessage("Start writing CalculiX input file\n")
+ FreeCAD.Console.PrintMessage("Write ccx input file to: {}\n".format(self.file_name))
if self.solver_obj.SplitInputWriter is True:
self.write_calculix_splitted_input_file()
else:
self.write_calculix_one_input_file()
- writing_time_string = "Writing time input file: " + str(round((time.clock() - timestart), 2)) + " seconds"
+ writing_time_string = (
+ "Writing time CalculiX input file: {} seconds"
+ .format(round((time.process_time() - timestart), 2))
+ )
if self.femelement_count_test is True:
FreeCAD.Console.PrintMessage(writing_time_string + ' \n\n')
return self.file_name
diff --git a/src/Mod/Fem/femsolver/z88/writer.py b/src/Mod/Fem/femsolver/z88/writer.py
index e141ab9f0..cdcaff63b 100644
--- a/src/Mod/Fem/femsolver/z88/writer.py
+++ b/src/Mod/Fem/femsolver/z88/writer.py
@@ -61,7 +61,7 @@ class FemInputWriterZ88(FemInputWriter.FemInputWriter):
FreeCAD.Console.PrintMessage('FemInputWriterZ88 --> self.file_name --> ' + self.file_name + '\n')
def write_z88_input(self):
- timestart = time.clock()
+ timestart = time.process_time()
if not self.femnodes_mesh:
self.femnodes_mesh = self.femmesh.Nodes
if not self.femelement_table:
@@ -76,7 +76,11 @@ class FemInputWriterZ88(FemInputWriter.FemInputWriter):
self.write_z88_integration_properties()
self.write_z88_memory_parameter()
self.write_z88_solver_parameter()
- FreeCAD.Console.PrintMessage("Writing time input file: " + str(time.clock() - timestart) + ' \n\n')
+ writing_time_string = (
+ "Writing time input file: {} seconds"
+ .format(round((time.process_time() - timestart), 2))
+ )
+ FreeCAD.Console.PrintMessage(writing_time_string + " \n\n")
return self.dir_name
def set_z88_elparam(self):
--
2.25.1

View File

@ -1,117 +0,0 @@
From 063515f65007c116c4c0e05c1fcf82637b8bf152 Mon Sep 17 00:00:00 2001
From: Gabriel Wicke <gswicke@gmail.com>
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 <wmayer@users.sourceforge.net>
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

View File

@ -1,26 +0,0 @@
From 8be2c08141f0275e9da005bd143771953e982a59 Mon Sep 17 00:00:00 2001
From: lorenz <looooo@users.noreply.github.com>
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

View File

@ -1,77 +0,0 @@
commit 17ed2b196a58afbbc3cc1bb99f6eb76060171ad2
Author: howetuft <howetuft@gmail.com>
Date: Tue Dec 24 16:06:18 2019 +0100
[Cmake] Update FindPySide2Tools for PySide2 5.14 - issue #4229
Since PySide2 5.14, 'pyside2-rcc' and 'pyside2-uic' have been renamed into plain 'rcc' and 'uic'.
This leads FindPySide2Tools.cmake to no longer find rcc/uic, as reported in bug #4229 (https://www.freecadweb.org/tracker/view.php?id=4229) and prevents compilation.
FindPySide2Tools has been updated accordingly.
diff --git a/cMake/FindPySide2Tools.cmake b/cMake/FindPySide2Tools.cmake
index 9c9751488..7ca9690dc 100644
--- a/cMake/FindPySide2Tools.cmake
+++ b/cMake/FindPySide2Tools.cmake
@@ -20,8 +20,24 @@ if(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(PYSIDE_BIN_DIR ${PYTHON_BIN_DIR})
endif(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-FIND_PROGRAM(PYSIDE2UICBINARY NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
-FIND_PROGRAM(PYSIDE2RCCBINARY NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
+# Since Qt v5.14, pyside2-uic and pyside2-rcc are directly provided by Qt5Core uic and rcc, with '-g python' option
+# We test Qt5Core version to act accordingly
+
+FIND_PACKAGE(Qt5Core)
+
+IF(Qt5Core_VERSION_STRING VERSION_GREATER_EQUAL 5.14)
+ # New (>= 5.14)
+ FIND_PROGRAM(PYSIDE2UICBINARY NAMES uic-qt5 uic)
+ set(UICOPTIONS "--generator=python")
+ FIND_PROGRAM(PYSIDE2RCCBINARY NAMES rcc-qt5 rcc)
+ set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1")
+ELSE(Qt5Core_VERSION_STRING VERSION_LESS 5.14)
+ # Legacy (< 5.14)
+ FIND_PROGRAM(PYSIDE2UICBINARY NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
+ FIND_PROGRAM(PYSIDE2RCCBINARY NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
+ set(UICOPTIONS "")
+ set(RCCOPTIONS "")
+ENDIF(Qt5Core_VERSION_STRING VERSION_GREATER_EQUAL 5.14)
MACRO(PYSIDE_WRAP_UI outfiles)
FOREACH(it ${ARGN})
@@ -33,7 +49,7 @@ MACRO(PYSIDE_WRAP_UI outfiles)
#)
if(WIN32 OR APPLE)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
- COMMAND ${PYSIDE2UICBINARY} ${infile} -o ${outfile}
+ COMMAND ${PYSIDE2UICBINARY} ${UICOPTIONS} ${infile} -o ${outfile}
MAIN_DEPENDENCY ${infile}
)
else()
@@ -41,7 +57,7 @@ MACRO(PYSIDE_WRAP_UI outfiles)
# pyside2-uic generates in comments at beginning., which is why
# we follow the tool command with in-place sed.
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
- COMMAND "${PYSIDE2UICBINARY}" "${infile}" -o "${outfile}"
+ COMMAND "${PYSIDE2UICBINARY}" ${UICOPTIONS} "${infile}" -o "${outfile}"
COMMAND sed -i "/^# /d" "${outfile}"
MAIN_DEPENDENCY "${infile}"
)
@@ -60,7 +76,7 @@ MACRO(PYSIDE_WRAP_RC outfiles)
#)
if(WIN32 OR APPLE)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
- COMMAND ${PYSIDE2RCCBINARY} ${infile} -o ${outfile}
+ COMMAND ${PYSIDE2RCCBINARY} ${RCCOPTIONS} ${infile} -o ${outfile}
MAIN_DEPENDENCY ${infile}
)
else()
@@ -68,7 +84,7 @@ MACRO(PYSIDE_WRAP_RC outfiles)
# pyside-rcc generates in comments at beginning, which is why
# we follow the tool command with in-place sed.
ADD_CUSTOM_COMMAND(OUTPUT "${outfile}"
- COMMAND "${PYSIDE2RCCBINARY}" "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
+ COMMAND "${PYSIDE2RCCBINARY}" ${RCCOPTIONS} "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
COMMAND sed -i "/^# /d" "${outfile}"
MAIN_DEPENDENCY "${infile}"
)

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:53ffe7703d67b768fedb216bc9dfa6c0c79ca41acc94a1f7fedadf85e5fc75b4
size 427464718

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c173d76fe0737c7a9dd203205945c46c4113b5fec61b70dd22a58e683bad3633
size 200710932

3
FreeCAD-0.19.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5ec0003c18df204f7b449d4ac0a82f945b41613a0264127de3ef16f6b2efa60f
size 296983463

View File

@ -17,7 +17,7 @@
Name: FreeCAD-test
Version: 0.18.5
Version: 0.19.0
Release: 0
Summary: Meta source package that runs the FreeCAD testsuite when built
License: LGPL-2.0-or-later AND GPL-2.0-or-later

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Mon Mar 22 11:57:09 UTC 2021 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Update to version 0.19.1:
* Lots of new features, bug fixes and improvements, see
https://wiki.freecadweb.org/Release_notes_0.19
- Drop upstream patches:
* 0001-Fix-build-with-pyside2-shiboken2-5.12.1.patch
* 0003-qt-5.14.patch
* update-swigpyrunin-for-python-3.8.patch
* 0001-fem-use-time.process_time-instead-of-removed-time.cl.patch
* fix_qt_5.15_build.patch
* 0001-boost-1.73.0-The-practice-of-declaring-the-Bind-plac.patch
* 0001-Fix-ODR-violation-correct-Ui_TaskSketcherGeneral-nam.patch
* 0001-Gui-skip-ci-fix-Wodr.patch
* 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
* 0001-add-missing-std-namespace-to-build-on-Debian-10.patch
- Rebase fix-smesh-vtk9.patch
-------------------------------------------------------------------
Tue Feb 23 19:05:09 UTC 2021 - Stefan Brüns <stefan.bruens@rwth-aachen.de>

View File

@ -1,5 +0,0 @@
name: FreeCAD
version: 0.18.5
mtime: 1603973581
commit: 734202bc810bf61bd6f66bdc060e6951bd0d134d

View File

@ -23,45 +23,20 @@
%else
%bcond_with boost_signals2
%endif
# Bundled SALOME-MESH (smesh) fails to build with VTK 9.0
%bcond_without smesh
%bcond_with smesh_external
Name: FreeCAD
Version: 0.18.5
Version: 0.19.1
Release: 0
Summary: General Purpose 3D CAD Modeler
License: LGPL-2.0-or-later AND GPL-2.0-or-later
Group: Productivity/Graphics/CAD
URL: https://www.freecadweb.org/
Source0: %{name}-%version.tar.xz
# PATCH-FIX-UPSTREAM 0001-Fix-build-with-pyside2-shiboken2-5.12.1.patch -- Fix build with shiboken2/pyside2 >= 5.12.1
Patch1: 0001-Fix-build-with-pyside2-shiboken2-5.12.1.patch
# PATCH-FIX-OPENSUSE qt-5.14.patch
Patch3: 0003-qt-5.14.patch
# PATCH-FIX-UPSTREAM https://github.com/FreeCAD/FreeCAD/commit/6eacb17b3e03d200.patch
Patch4: update-swigpyrunin-for-python-3.8.patch
# PATCH-FIX-UPSTREAM https://github.com/FreeCAD/FreeCAD/pull/2899
Patch5: 0001-fem-use-time.process_time-instead-of-removed-time.cl.patch
Source0: https://github.com/FreeCAD/FreeCAD/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE Use correct import for Python 3 tkinter
Patch6: fix_unittestgui_tkinter_py3.patch
# PATCH-FIX-UPSTREAM https://github.com/FreeCAD/FreeCAD/pull/3558
Patch7: fix_qt_5.15_build.patch
# PATCH-FIX-UPSTREAM -- Rebased https://github.com/FreeCAD/FreeCAD/commit/4ec45b545ebf
Patch8: 0001-boost-1.73.0-The-practice-of-declaring-the-Bind-plac.patch
Patch1: fix_unittestgui_tkinter_py3.patch
# PATCH-FIX-UPSTREAM Rebased https://github.com/wwmayer/FreeCAD/commit/bb9bcbd51df7
Patch9: fix-smesh-vtk9.patch
# PATCH-FIX-UPSTREAM
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
Patch2: fix-smesh-vtk9.patch
# Test suite fails on 32bit and I don't want to debug that anymore
ExcludeArch: %ix86 %arm ppc s390 s390x
@ -74,6 +49,7 @@ BuildRequires: libboost_regex-devel >= 1.55
%if %{without boost_signals2}
BuildRequires: libboost_signals-devel >= 1.55
%endif
BuildRequires: libboost_serialization-devel >= 1.55
BuildRequires: libboost_system-devel >= 1.55
BuildRequires: libboost_thread-devel >= 1.55
@ -84,8 +60,10 @@ BuildRequires: fdupes
BuildRequires: glew-devel
BuildRequires: hdf5-devel
BuildRequires: hicolor-icon-theme
%if %{with smesh_external}
# We use the internal smesh version with fixes atm
#BuildRequires: smesh-devel
BuildRequires: smesh-devel
%endif
BuildRequires: java-devel
BuildRequires: libXerces-c-devel
BuildRequires: libXi-devel
@ -93,13 +71,11 @@ BuildRequires: libmed-devel
BuildRequires: libspnav-devel
BuildRequires: make
BuildRequires: netgen-devel
# we use upstream OpenCASCADE instead of oce-devel atm
BuildRequires: occt-devel
BuildRequires: pkg-config
BuildRequires: proj-devel
BuildRequires: sqlite3-devel
%if 0%{?suse_version}
# Qt5 & python3
BuildRequires: python3-devel
BuildRequires: python3-matplotlib
@ -117,32 +93,16 @@ BuildRequires: pkgconfig(Qt5UiTools)
BuildRequires: pkgconfig(Qt5WebKit)
BuildRequires: pkgconfig(Qt5WebKitWidgets)
BuildRequires: pkgconfig(Qt5X11Extras)
BuildRequires: pkgconfig(Qt5XmlPatterns)
Requires: python3-numpy
Requires: python3-pyside2
Requires: python3-vtk
# For Arch & Draft workbench
Requires: python3-pivy
# For FEM workbench
Requires: python3-PyYAML
Requires: python3-ply
Requires: python3-six
# core dump if PySide (version 1) is installed
Conflicts: python3-pyside
Conflicts: python-pyside
# reported to break FreeCAD here
# https://forum.freecadweb.org/viewtopic.php?t=24610
Conflicts: python-pivy
%endif
%if 0%{?fedora} > 18
BuildRequires: libshiboken-devel
BuildRequires: python-CXX-devel
BuildRequires: python-devel
BuildRequires: python-matplotlib
BuildRequires: python-pyside-devel
BuildRequires: python-pyside-tools
BuildRequires: pkgconfig(QtWebKit)
Requires: python-numpy
Requires: python-pyside
BuildRequires: qt5-qtbase-devel
%endif
BuildRequires: swig
BuildRequires: update-desktop-files
@ -175,53 +135,66 @@ This package contains the files needed for development with FreeCAD.
# fix env-script-interpreter
sed -i '1c#!%{__python3}' \
src/Mod/AddonManager/AddonManager.py \
src/Mod/Mesh/App/MeshTestsApp.py \
src/Mod/Robot/KukaExporter.py \
src/Mod/Robot/MovieTool.py \
src/Mod/Spreadsheet/importXLSX.py \
src/Mod/TechDraw/TDTest/D*Test.py \
src/Mod/Test/testmakeWireString.py
# Fix "non-executable-script" rpmlint warning
chmod 755 src/Mod/Robot/MovieTool.py \
src/Mod/Test/testmakeWireString.py \
src/Mod/Test/unittestgui.py
chmod 755 src/Mod/AddonManager/AddonManager.py \
src/Mod/Robot/KukaExporter.py \
src/Mod/Robot/MovieTool.py \
src/Mod/Spreadsheet/importXLSX.py \
src/Mod/TechDraw/TDTest/D*Test.py \
src/Mod/Test/testmakeWireString.py
# Fix "wrong-script-end-of-line-encoding" rpmlint warning
sed -i 's/\r$//' src/Mod/Mesh/App/MeshTestsApp.py
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/Robot/KukaExporter.py
sed -i 's/\r$//' src/Mod/Test/unittestgui.py
# Remove 3rd party libs
rm src/3rdparty/Pivy -fr
rm src/3rdparty/Pivy-0.5 -fr
# Resources are looked up relative to the binaries location,
# so all these need the same prefix, see src/App/Application.cpp
%build
%cmake \
-DCMAKE_INSTALL_PREFIX=%{x_prefix} \
-DCMAKE_INSTALL_LIBDIR=%{x_prefix}/lib \
-DCMAKE_INSTALL_BINDIR=%{x_prefix}/bin \
-DCMAKE_INSTALL_DATAROOTDIR=%{_datadir} \
-DCMAKE_INSTALL_DATADIR=%{_datadir}/%{name} \
-DCMAKE_INSTALL_DOCDIR=%{_docdir}/%{name} \
-DCMAKE_INSTALL_LIBDIR=%{x_prefix}/lib \
-DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/%{name} \
-DCMAKE_SKIP_RPATH:BOOL=OFF \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON \
-DOCC_INCLUDE_DIR=%{_includedir}/opencascade \
-DRESOURCEDIR=%{_datadir}/%{name} \
-DCMAKE_CXX_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
-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_QT_DIALOG:BOOL=OFF \
-DFREECAD_USE_EXTERNAL_PIVY:BOOL=TRUE \
-DBUILD_OPENSCAD:BOOL=ON \
-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} \
-DFREECAD_USE_EXTERNAL_SMESH=%{?with_smesh_external:ON}%{!?with_smesh_external:OFF} \
-DBUILD_SMESH:BOOL=ON \
-DBUILD_MESH_PART:BOOL=ON \
-DBUILD_FEM:BOOL=%{?with_smesh:ON}%{!?with_smesh:OFF} \
-DBUILD_FEM_NETGEN:BOOL=OFF \
-DBUILD_FEM_NETGEN:BOOL=ON \
-DBUILD_FEM_VTK:BOOL=ON \
-Wno-dev \
..
@ -231,30 +204,13 @@ rm src/3rdparty/Pivy-0.5 -fr
%install
%cmake_install
# Move icons, mimeinfo, metainfo to the correct location
mv %{buildroot}%{x_prefix}/share/* %{buildroot}%{_datadir}/
for size in 64 48 32 16; do
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps
mv %{buildroot}%{_datadir}/%{name}/freecad-icon-${size}.png \
%{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/org.freecadweb.FreeCAD.png
done
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/64x64/mimetypes/
# Install under the correct name according to FDO shared-mime-info-spec
mv %{buildroot}%{_datadir}/%{name}/freecad-doc.png %{buildroot}%{_datadir}/icons/hicolor/64x64/mimetypes/application-x-extension-fcstd.png
rm %{buildroot}%{_datadir}/%{name}/freecad.xpm
rm %{buildroot}%{_datadir}/%{name}/freecad.svg
%suse_update_desktop_file -r org.freecadweb.FreeCAD Education Engineering
# Remove unneeded files
find %{buildroot} -type f -name "*.la" -delete -print
# Fix rpmlint warning "doc-file-dependency"
rm -f html/installdox
# Install development documentation manually in order to fix rpmlint warning "files-duplicate"
mkdir -p %{buildroot}%{_docdir}/%{name}-devel
#cp -a html/ %%{buildroot}%%{_docdir}/%%{name}-devel/
rm -Rf %{buildroot}%{_datadir}/pixmaps
# Broken
rm -Rf %{buildroot}%{_datadir}/thumbnailers
# Link binaries
mkdir -p %{buildroot}/usr/bin

View File

@ -5,7 +5,7 @@
<size unit="G">14</size>
</disk>
<memory>
<size unit="G">5</size>
<size unit="G">6</size>
</memory>
</hardware>
</constraints>

View File

@ -813,28 +813,3 @@ index fcd044b00f2..f54c24f8618 100644
grid->GetCellPoints(vtkId, npts, pts);
for (int i=0; i<npts; i++)
{
diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp
index dde2bd824..3acfead65 100644
--- a/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp
+++ b/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp
@@ -56,6 +56,11 @@
using namespace FemGui;
+#ifdef VTK_CELL_ARRAY_V2
+typedef const vtkIdType* vtkIdTypePtr;
+#else
+typedef vtkIdType* vtkIdTypePtr;
+#endif
PROPERTY_SOURCE(FemGui::ViewProviderFemPostObject, Gui::ViewProviderDocumentObject)
@@ -316,7 +321,7 @@ void ViewProviderFemPostObject::update3D() {
vtkDataArray *tcoords = NULL;
vtkCellArray *cells;
vtkIdType npts = 0;
- vtkIdType *indx = 0;
+ vtkIdTypePtr indx = 0;
points = pd->GetPoints();
pntData = pd->GetPointData();

View File

@ -1,21 +0,0 @@
From b2882c699b1444efadd9faee36855a965ac6a215 Mon Sep 17 00:00:00 2001
From: bartoszek <bartoszek.github@bartus.33mail.com>
Date: Thu, 4 Jun 2020 14:10:08 +0200
Subject: [PATCH] Fix qt5:5.15.0 build.
---
src/Mod/Image/Gui/OpenGLImageBox.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/Mod/Image/Gui/OpenGLImageBox.cpp b/src/Mod/Image/Gui/OpenGLImageBox.cpp
index 404a1a19f1b..bb22ae0f836 100644
--- a/src/Mod/Image/Gui/OpenGLImageBox.cpp
+++ b/src/Mod/Image/Gui/OpenGLImageBox.cpp
@@ -26,6 +26,7 @@
# include <QSurfaceFormat>
# include <QMessageBox>
# include <QPainter>
+# include <QPainterPath>
#endif
#if defined(__MINGW32__)

View File

@ -1,27 +0,0 @@
From 6eacb17b3e03d20039b85c9daebab9e44386d6bf Mon Sep 17 00:00:00 2001
From: Richard <hobbes1069@gmail.com>
Date: Thu, 17 Oct 2019 11:20:10 -0500
Subject: [PATCH] Update swigpyrun.in for Python 3.8
In Python 3.8 some functions related to thread state were intentionally made private.
This fix (specific to FreeCAD) was suggested here:
https://bugs.python.org/issue35886
---
src/Base/swigpyrun.inl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Base/swigpyrun.inl b/src/Base/swigpyrun.inl
index 0eedaaa87a9..65bba62db3c 100644
--- a/src/Base/swigpyrun.inl
+++ b/src/Base/swigpyrun.inl
@@ -72,7 +72,7 @@ void cleanupSWIG_T(const char* TypeName)
PyObject *module, *dict;
PyInterpreterState *interp = PyThreadState_GET()->interp;
- PyObject *modules = interp->modules;
+ PyObject *modules = PyImport_GetModuleDict();
module = PyDict_GetItemString(modules, "__builtin__");
if (module != NULL && PyModule_Check(module)) {
dict = PyModule_GetDict(module);