diff options
Diffstat (limited to 'media-gfx/freecad/files')
3 files changed, 139 insertions, 0 deletions
diff --git a/media-gfx/freecad/files/freecad-0.20.2-Fixes-8206-FreeCAD-segfaults-being-run-with-paramete.patch b/media-gfx/freecad/files/freecad-0.20.2-Fixes-8206-FreeCAD-segfaults-being-run-with-paramete.patch new file mode 100644 index 000000000000..44d49ca3bf94 --- /dev/null +++ b/media-gfx/freecad/files/freecad-0.20.2-Fixes-8206-FreeCAD-segfaults-being-run-with-paramete.patch @@ -0,0 +1,22 @@ +https://github.com/FreeCAD/FreeCAD/commit/c7a21ecbeecefe7c2dfc9e950b3d6bb42351d476 + +From c7a21ecbeecefe7c2dfc9e950b3d6bb42351d476 Mon Sep 17 00:00:00 2001 +From: wmayer <wmayer@users.sourceforge.net> +Date: Sat, 11 Feb 2023 17:47:49 +0100 +Subject: [PATCH 02/51] Fixes #8206: FreeCAD segfaults being run with + parameters (e.g .desktop file has /usr/bin/freecad --single-instance) + +--- a/src/Base/Interpreter.cpp ++++ b/src/Base/Interpreter.cpp +@@ -563,7 +563,7 @@ void initInterpreter(int argc,char *argv[]) + { + PyStatus status; + PyConfig config; +- PyConfig_InitPythonConfig(&config); ++ PyConfig_InitIsolatedConfig(&config); + + status = PyConfig_SetBytesArgv(&config, argc, argv); + if (PyStatus_Exception(status)) { +-- +2.39.1 + diff --git a/media-gfx/freecad/files/freecad-0.20.2-Netgen-add-headers-to-support-recent-Netgen.patch b/media-gfx/freecad/files/freecad-0.20.2-Netgen-add-headers-to-support-recent-Netgen.patch new file mode 100644 index 000000000000..402c84ee4d28 --- /dev/null +++ b/media-gfx/freecad/files/freecad-0.20.2-Netgen-add-headers-to-support-recent-Netgen.patch @@ -0,0 +1,93 @@ +https://github.com/FreeCAD/FreeCAD/commit/8b056f156fd087b3df36a5223fc5ca6900649a83 + +From 8b056f156fd087b3df36a5223fc5ca6900649a83 Mon Sep 17 00:00:00 2001 +From: Uwe <donovaly@users.noreply.github.com> +Date: Wed, 17 Aug 2022 12:32:02 +0200 +Subject: [PATCH 0008/1678] [Netgen] add headers to support recent Netgen + +- as reported here: https://forum.freecadweb.org/viewtopic.php?p=618174#p618174 +- also fix compiler warnings about unsafe bool handling +--- a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp ++++ b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp +@@ -50,7 +50,9 @@ + + #include <utilities.h> + ++#include <BRepBndLib.hxx> + #include <BRepBuilderAPI_Copy.hxx> ++#include <BRepMesh_IncrementalMesh.hxx> + #include <BRep_Tool.hxx> + #include <Bnd_B3d.hxx> + #include <NCollection_Map.hxx> +@@ -66,6 +68,7 @@ + #include <TopTools_DataMapOfShapeShape.hxx> + #include <TopTools_MapOfShape.hxx> + #include <TopoDS.hxx> ++#include <TopoDS_Solid.hxx> + + #ifdef _MSC_VER + #pragma warning(disable : 4067) +@@ -3027,7 +3030,7 @@ bool NETGENPlugin_Mesher::Compute() + } + } + } +- if (!err && mparams.secondorder > 0) ++ if (!err && mparams.secondorder) + { + try + { +@@ -3302,7 +3305,7 @@ bool NETGENPlugin_Mesher::Evaluate(MapShapeNbElems& aResMap) + // calculate total nb of segments and length of edges + double fullLen = 0.0; + int fullNbSeg = 0; +- int entity = mparams.secondorder > 0 ? SMDSEntity_Quad_Edge : SMDSEntity_Edge; ++ int entity = mparams.secondorder ? SMDSEntity_Quad_Edge : SMDSEntity_Edge; + TopTools_DataMapOfShapeInteger Edge2NbSeg; + for (TopExp_Explorer exp(_shape, TopAbs_EDGE); exp.More(); exp.Next()) + { +@@ -3340,7 +3343,7 @@ bool NETGENPlugin_Mesher::Evaluate(MapShapeNbElems& aResMap) + { + vector<int>& aVec = aResMap[_mesh->GetSubMesh(Edge2NbSegIt.Key())]; + if ( aVec[ entity ] > 1 && aVec[ SMDSEntity_Node ] == 0 ) +- aVec[SMDSEntity_Node] = mparams.secondorder > 0 ? 2*aVec[ entity ]-1 : aVec[ entity ]-1; ++ aVec[SMDSEntity_Node] = mparams.secondorder ? 2*aVec[ entity ]-1 : aVec[ entity ]-1; + + fullNbSeg += aVec[ entity ]; + Edge2NbSeg( Edge2NbSegIt.Key() ) = aVec[ entity ]; +@@ -3386,7 +3389,7 @@ bool NETGENPlugin_Mesher::Evaluate(MapShapeNbElems& aResMap) + int nbNodes = tooManyElems ? hugeNb : (( nbFaces*3 - (nb1d-1)*2 ) / 6 + 1 ); + + vector<int> aVec(SMDSEntity_Last, 0); +- if( mparams.secondorder > 0 ) { ++ if (mparams.secondorder) { + int nb1d_in = (nbFaces*3 - nb1d) / 2; + aVec[SMDSEntity_Node] = nbNodes + nb1d_in; + aVec[SMDSEntity_Quad_Triangle] = nbFaces; +@@ -3428,11 +3431,11 @@ bool NETGENPlugin_Mesher::Evaluate(MapShapeNbElems& aResMap) + if ( tooManyElems ) // avoid FPE + { + aVec[SMDSEntity_Node] = hugeNb; +- aVec[ mparams.secondorder > 0 ? SMDSEntity_Quad_Tetra : SMDSEntity_Tetra] = hugeNb; ++ aVec[ mparams.secondorder ? SMDSEntity_Quad_Tetra : SMDSEntity_Tetra] = hugeNb; + } + else + { +- if( mparams.secondorder > 0 ) { ++ if (mparams.secondorder) { + aVec[SMDSEntity_Node] = nb1d_in/3 + 1 + nb1d_in; + aVec[SMDSEntity_Quad_Tetra] = nbVols; + } +--- a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cpp ++++ b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cpp +@@ -39,6 +39,8 @@ + #include <StdMeshers_MaxElementArea.hxx> + #include <StdMeshers_QuadranglePreference.hxx> + #include <StdMeshers_ViscousLayers2D.hxx> ++#include <TopExp.hxx> ++#include <TopExp_Explorer.hxx> + + #include <Precision.hxx> + #include <Standard_ErrorHandler.hxx> +-- +2.39.1 + diff --git a/media-gfx/freecad/files/freecad-9999-tests-src-Qt-only-build-test-for-BUILD_GUI-ON.patch b/media-gfx/freecad/files/freecad-9999-tests-src-Qt-only-build-test-for-BUILD_GUI-ON.patch new file mode 100644 index 000000000000..5455c0ee2992 --- /dev/null +++ b/media-gfx/freecad/files/freecad-9999-tests-src-Qt-only-build-test-for-BUILD_GUI-ON.patch @@ -0,0 +1,24 @@ +From cb77c7d937c259224699273fee1ba5907588fa4c Mon Sep 17 00:00:00 2001 +From: Bernd Waibel <waebbl-gentoo@posteo.net> +Date: Sun, 12 Feb 2023 19:54:13 +0100 +Subject: [PATCH] tests/src/Qt: only build test for BUILD_GUI=ON + +Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net> +--- a/tests/src/Qt/CMakeLists.txt ++++ b/tests/src/Qt/CMakeLists.txt +@@ -30,6 +30,7 @@ endfunction() + set(CMAKE_AUTOMOC ON) + + # Qt Test ++if(BUILD_GUI) + include_directories( + ${QtGui_INCLUDE_DIRS} + ${QtTest_INCLUDE_DIRS} +@@ -46,3 +47,4 @@ set (InventorBuilder_LIBS + SETUP_TESTS( + InventorBuilder + ) ++endif() +-- +2.39.1 + |