From 0e415af0aad9974c8f8fb749f6e33016e819291be7fec82d0c2c6a213220a99b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Sat, 31 Dec 2022 12:38:15 +0000 Subject: [PATCH] Accepting request 1045807 from home:StefanBruens:branches:science - Fix build with OpenCASCADE 7.7.0, add * 0001-Part-OCCError.h-remove-unneeded-includes.patch * 0001-Drawing-add-missing-include.patch * 0001-FEM-add-missing-include.patch * 0001-Revert-unused-parameter-warning-change.patch OBS-URL: https://build.opensuse.org/request/show/1045807 OBS-URL: https://build.opensuse.org/package/show/science/FreeCAD?expand=0&rev=156 --- 0001-Drawing-add-missing-include.patch | 24 ++++ 0001-FEM-add-missing-include.patch | 51 +++++++ ...-OCCError.h-remove-unneeded-includes.patch | 130 ++++++++++++++++++ ...vert-unused-parameter-warning-change.patch | 38 +++++ FreeCAD.changes | 9 ++ FreeCAD.spec | 8 ++ 6 files changed, 260 insertions(+) create mode 100644 0001-Drawing-add-missing-include.patch create mode 100644 0001-FEM-add-missing-include.patch create mode 100644 0001-Part-OCCError.h-remove-unneeded-includes.patch create mode 100644 0001-Revert-unused-parameter-warning-change.patch diff --git a/0001-Drawing-add-missing-include.patch b/0001-Drawing-add-missing-include.patch new file mode 100644 index 0000000..156e749 --- /dev/null +++ b/0001-Drawing-add-missing-include.patch @@ -0,0 +1,24 @@ +From 2d9e4c0137bab0b63482f30f0d89cf3f9418a4e0 Mon Sep 17 00:00:00 2001 +From: Uwe +Date: Mon, 12 Dec 2022 05:15:47 +0100 +Subject: [PATCH] [Drawing] add missing include + +--- + src/Mod/Drawing/App/AppDrawingPy.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/Mod/Drawing/App/AppDrawingPy.cpp b/src/Mod/Drawing/App/AppDrawingPy.cpp +index d4ed53ebaf..ecefd3d5a8 100644 +--- a/src/Mod/Drawing/App/AppDrawingPy.cpp ++++ b/src/Mod/Drawing/App/AppDrawingPy.cpp +@@ -28,6 +28,7 @@ + #include + #include "ProjectionAlgos.h" + #include ++#include + #include + #include + +-- +2.38.1 + diff --git a/0001-FEM-add-missing-include.patch b/0001-FEM-add-missing-include.patch new file mode 100644 index 0000000..3fbc8a0 --- /dev/null +++ b/0001-FEM-add-missing-include.patch @@ -0,0 +1,51 @@ +From 38e0f1da25a1826510c68cb10a8731ebef895eaf Mon Sep 17 00:00:00 2001 +From: Uwe +Date: Mon, 12 Dec 2022 10:43:53 +0100 +Subject: [PATCH] [FEM] add missing include + +- also fix compiler warning about unused parameter +--- + src/Mod/Fem/App/AppFemPy.cpp | 1 + + src/Mod/PartDesign/App/FeatureSketchBased.cpp | 1 - + src/Mod/PartDesign/App/FeatureSketchBased.h | 1 - + 3 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/Mod/Fem/App/AppFemPy.cpp b/src/Mod/Fem/App/AppFemPy.cpp +index ce6bde8c37..ee4d409c1e 100644 +--- a/src/Mod/Fem/App/AppFemPy.cpp ++++ b/src/Mod/Fem/App/AppFemPy.cpp +@@ -32,6 +32,7 @@ + #include + + #include ++#include + #include + #include + #include +diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.cpp b/src/Mod/PartDesign/App/FeatureSketchBased.cpp +index 21485b1dee..5d35bd08f5 100644 +--- a/src/Mod/PartDesign/App/FeatureSketchBased.cpp ++++ b/src/Mod/PartDesign/App/FeatureSketchBased.cpp +@@ -449,7 +449,6 @@ void ProfileBased::getFaceFromLinkSub(TopoDS_Face& upToFace, const App::Property + + void ProfileBased::getUpToFace(TopoDS_Face& upToFace, + const TopoDS_Shape& support, +- const TopoDS_Face& supportface, + const TopoDS_Shape& sketchshape, + const std::string& method, + const gp_Dir& dir) +diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.h b/src/Mod/PartDesign/App/FeatureSketchBased.h +index 62629e288b..db892d15f4 100644 +--- a/src/Mod/PartDesign/App/FeatureSketchBased.h ++++ b/src/Mod/PartDesign/App/FeatureSketchBased.h +@@ -134,7 +134,6 @@ protected: + /// Find a valid face to extrude up to + static void getUpToFace(TopoDS_Face& upToFace, + const TopoDS_Shape& support, +- const TopoDS_Face& supportface, + const TopoDS_Shape& sketchshape, + const std::string& method, + const gp_Dir& dir); +-- +2.38.1 + diff --git a/0001-Part-OCCError.h-remove-unneeded-includes.patch b/0001-Part-OCCError.h-remove-unneeded-includes.patch new file mode 100644 index 0000000..7b06b92 --- /dev/null +++ b/0001-Part-OCCError.h-remove-unneeded-includes.patch @@ -0,0 +1,130 @@ +From 3cbb9f0c11205af622f375b6883e7ae00442dd7b Mon Sep 17 00:00:00 2001 +From: Uwe +Date: Sun, 3 Jul 2022 22:51:16 +0200 +Subject: [PATCH] [Part] OCCError.h: remove unneeded includes + +- also sort includes +--- + src/Mod/Part/App/OCCError.h | 38 ++----------------------- + src/Mod/Part/App/OffsetCurvePyImp.cpp | 12 ++++---- + src/Mod/Part/App/OffsetSurfacePyImp.cpp | 10 ++----- + 3 files changed, 12 insertions(+), 48 deletions(-) + +diff --git a/src/Mod/Part/App/OCCError.h b/src/Mod/Part/App/OCCError.h +index 19e8208179..96558ecb0e 100644 +--- a/src/Mod/Part/App/OCCError.h ++++ b/src/Mod/Part/App/OCCError.h +@@ -23,43 +23,12 @@ + #ifndef _OCCError_h_ + #define _OCCError_h_ + +-# include + # include +-# include +-# include +-# if OCC_VERSION_HEX >= 0x060500 +-# include +-# endif +-# include +-# include +-# include +-# include +-# include +-# include +-# include +-# include +-# include +-# include +-# include +-# include +-# include +-# include +-# include +-# include +-# include +-# include +-# include +-# include +-# include +-# include +-# include ++# include + +-#include +-#include +-#include +-#include + #include +-#include ++#include ++ + + namespace Part { + PartExport extern PyObject* PartExceptionOCCError; +@@ -88,4 +57,3 @@ PartExport extern PyObject* PartExceptionOCCDimensionError; + + #define PY_CATCH_OCC _PY_CATCH_OCC(return(NULL)) + #endif // _OCCError_h_ +- +diff --git a/src/Mod/Part/App/OffsetCurvePyImp.cpp b/src/Mod/Part/App/OffsetCurvePyImp.cpp +index 295d9efeb8..6b18074a0b 100644 +--- a/src/Mod/Part/App/OffsetCurvePyImp.cpp ++++ b/src/Mod/Part/App/OffsetCurvePyImp.cpp +@@ -20,20 +20,20 @@ + * * + ***************************************************************************/ + +- + #include "PreCompiled.h" + #ifndef _PreComp_ + # include + #endif + +-#include "OCCError.h" +-#include "Geometry.h" ++#include ++#include ++#include ++ + #include "OffsetCurvePy.h" + #include "OffsetCurvePy.cpp" ++#include "Geometry.h" ++#include "OCCError.h" + +-#include +-#include +-#include + + using namespace Part; + +diff --git a/src/Mod/Part/App/OffsetSurfacePyImp.cpp b/src/Mod/Part/App/OffsetSurfacePyImp.cpp +index 6aa820aa35..792333c817 100644 +--- a/src/Mod/Part/App/OffsetSurfacePyImp.cpp ++++ b/src/Mod/Part/App/OffsetSurfacePyImp.cpp +@@ -20,20 +20,16 @@ + * * + ***************************************************************************/ + +- + #include "PreCompiled.h" + #ifndef _PreComp_ + # include + # include + #endif + +-#include +-#include +- + #include "OCCError.h" +-#include "Geometry.h" +-#include +-#include ++#include "OffsetSurfacePy.h" ++#include "OffsetSurfacePy.cpp" ++ + + using namespace Part; + +-- +2.38.1 + diff --git a/0001-Revert-unused-parameter-warning-change.patch b/0001-Revert-unused-parameter-warning-change.patch new file mode 100644 index 0000000..ba7f891 --- /dev/null +++ b/0001-Revert-unused-parameter-warning-change.patch @@ -0,0 +1,38 @@ +From 9b643070f6b88c5733d525c1eda8a17f9116d7ff Mon Sep 17 00:00:00 2001 +From: Uwe +Date: Mon, 12 Dec 2022 11:28:07 +0100 +Subject: [PATCH] Revert unused parameter warning change + +This reverts partially commit 38e0f1da25a1826510c68cb10a8731ebef895eaf. +--- + src/Mod/PartDesign/App/FeatureSketchBased.cpp | 1 + + src/Mod/PartDesign/App/FeatureSketchBased.h | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.cpp b/src/Mod/PartDesign/App/FeatureSketchBased.cpp +index 5d35bd08f5..21485b1dee 100644 +--- a/src/Mod/PartDesign/App/FeatureSketchBased.cpp ++++ b/src/Mod/PartDesign/App/FeatureSketchBased.cpp +@@ -449,6 +449,7 @@ void ProfileBased::getFaceFromLinkSub(TopoDS_Face& upToFace, const App::Property + + void ProfileBased::getUpToFace(TopoDS_Face& upToFace, + const TopoDS_Shape& support, ++ const TopoDS_Face& supportface, + const TopoDS_Shape& sketchshape, + const std::string& method, + const gp_Dir& dir) +diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.h b/src/Mod/PartDesign/App/FeatureSketchBased.h +index db892d15f4..62629e288b 100644 +--- a/src/Mod/PartDesign/App/FeatureSketchBased.h ++++ b/src/Mod/PartDesign/App/FeatureSketchBased.h +@@ -134,6 +134,7 @@ protected: + /// Find a valid face to extrude up to + static void getUpToFace(TopoDS_Face& upToFace, + const TopoDS_Shape& support, ++ const TopoDS_Face& supportface, + const TopoDS_Shape& sketchshape, + const std::string& method, + const gp_Dir& dir); +-- +2.38.1 + diff --git a/FreeCAD.changes b/FreeCAD.changes index 9b63a30..679e03e 100644 --- a/FreeCAD.changes +++ b/FreeCAD.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Dec 30 00:55:38 UTC 2022 - Stefan Brüns + +- Fix build with OpenCASCADE 7.7.0, add + * 0001-Part-OCCError.h-remove-unneeded-includes.patch + * 0001-Drawing-add-missing-include.patch + * 0001-FEM-add-missing-include.patch + * 0001-Revert-unused-parameter-warning-change.patch + ------------------------------------------------------------------- Tue Dec 6 19:57:11 UTC 2022 - Stefan Brüns diff --git a/FreeCAD.spec b/FreeCAD.spec index 78c72e3..7314a8e 100644 --- a/FreeCAD.spec +++ b/FreeCAD.spec @@ -40,6 +40,14 @@ Patch0: 0001-Gui-Quarter-Add-missing-OpenGL-includes.patch Patch1: 0001-Avoid-catching-SIGSEGV-defer-to-system-services.patch # PATCH-FIX-UPSTREAM Patch2: 0001-Fix-build-with-NG-6.2.2201-include-BRepMesh_Incremen.patch +# PATCH-FIX-UPSTREAM +Patch3: 0001-Part-OCCError.h-remove-unneeded-includes.patch +# PATCH-FIX-UPSTREAM +Patch4: 0001-Drawing-add-missing-include.patch +# PATCH-FIX-UPSTREAM +Patch5: 0001-FEM-add-missing-include.patch +# PATCH-FIX-UPSTREAM +Patch6: 0001-Revert-unused-parameter-warning-change.patch # Test suite fails on 32bit and I don't want to debug that anymore ExcludeArch: %ix86 %arm ppc s390 s390x