From 2a5d7029407c806d9b5ae500fa317b5e11f389f3 Mon Sep 17 00:00:00 2001 From: yopito Date: Mon, 23 Nov 2020 00:54:55 +0100 Subject: [PATCH] freecad: libexecinfo usage, rebuild with coin3 4.0.0 libexecinfo's usage is incomplete: 002-execinfo.patch still needed [ci skip] --- .../patches/010-salomesmesh-execinfo.patch | 30 ----------- .../patches/103-find-coin3v4-doc.patch | 50 +++++++++++++++++++ .../freecad/patches/151-python-warning.patch | 39 +++++++++++++++ srcpkgs/freecad/template | 3 +- 4 files changed, 91 insertions(+), 31 deletions(-) delete mode 100644 srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch create mode 100644 srcpkgs/freecad/patches/103-find-coin3v4-doc.patch create mode 100644 srcpkgs/freecad/patches/151-python-warning.patch diff --git a/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch b/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch deleted file mode 100644 index 2b46616ad7a..00000000000 --- a/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp -+++ src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp -@@ -29,7 +29,9 @@ - #ifndef WIN32 - #include - #include -+#ifdef __GLIBC__ - #include -+#endif - #endif - - -@@ -109,6 +111,7 @@ - #ifndef WIN32 - void print_traceback() - { -+#ifdef __GLIBC__ - void *array[50]; - size_t size; - char **strings; -@@ -123,6 +126,9 @@ - } - - free (strings); -+#else -+ std::cerr << "sorry, no backtrace on musl libc"; -+#endif - } - #else - #if (_MSC_VER >= 1400) // Visual Studio 2005 diff --git a/srcpkgs/freecad/patches/103-find-coin3v4-doc.patch b/srcpkgs/freecad/patches/103-find-coin3v4-doc.patch new file mode 100644 index 00000000000..5b7de514de4 --- /dev/null +++ b/srcpkgs/freecad/patches/103-find-coin3v4-doc.patch @@ -0,0 +1,50 @@ +From 04833a5f1cbc07f8f6ae94453c4535e13789aa05 Mon Sep 17 00:00:00 2001 +From: yopito +Date: Mon, 6 Jul 2020 06:54:07 +0200 +Subject: [PATCH] build: fix Coin 3d documentation discovering + +* coin3d 4.0.0 default location is /usr/share/doc/Coin/html/ +* misuses of find_files() if several candidates for filename +* export variable COIN3D_DOC_FOUND that is used by cMake/FreeCAD_Helpers/PrintFinalReport.cmake +--- + cMake/FindCoin3DDoc.cmake | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git cMake/FindCoin3DDoc.cmake cMake/FindCoin3DDoc.cmake +index 883368445..c6c92f260 100644 +--- cMake/FindCoin3DDoc.cmake ++++ cMake/FindCoin3DDoc.cmake +@@ -23,18 +23,19 @@ IF (COIN3D_FOUND) + find_path(COIN3D_DOC_PATH index.html + /usr/share/doc/libcoin80-doc/html + /usr/share/doc/coin/html ++ /usr/share/doc/Coin/html + ) + IF( EXISTS ${COIN3D_DOC_PATH}) + message(STATUS "Coin3D doc is installed") +- find_file(COIN3D_DOC_TAGFILE coin.tag Coin.tag +- ${COIN3D_DOC_PATH} ++ find_file(COIN3D_DOC_TAGFILE NAMES coin.tag Coin.tag ++ PATHS ${COIN3D_DOC_PATH} + ) + IF( EXISTS ${COIN3D_DOC_TAGFILE}) + SET( COIN3D_DOC_FOUND "YES" + ) + ELSE( EXISTS ${COIN3D_DOC_TAGFILE}) +- find_file(COIN3D_DOC_TAGFILE_GZ coin.tag.gz Coin.tag.gz +- ${COIN3D_DOC_PATH} ++ find_file(COIN3D_DOC_TAGFILE_GZ NAMES coin.tag.gz Coin.tag.gz ++ PATHS ${COIN3D_DOC_PATH} + ) + IF( EXISTS ${COIN3D_DOC_TAGFILE_GZ}) + message(STATUS " Found ${COIN3D_DOC_TAGFILE_GZ}") +@@ -85,4 +86,5 @@ if(COIN3D_DOC_FOUND) + message(STATUS " Location: ${COIN3D_DOC_PATH}") + endif(COIN3D_DOC_FOUND) + +- ++# export for others ++SET( COIN3D_DOC_FOUND "${COIN3D_DOC_FOUND}" CACHE BOOL "Coin3d documentation available") +-- +2.27.0 + diff --git a/srcpkgs/freecad/patches/151-python-warning.patch b/srcpkgs/freecad/patches/151-python-warning.patch new file mode 100644 index 00000000000..e76c8b1c654 --- /dev/null +++ b/srcpkgs/freecad/patches/151-python-warning.patch @@ -0,0 +1,39 @@ +diff --git src/Mod/Fem/feminout/importFenicsMesh.py src/Mod/Fem/feminout/importFenicsMesh.py +index 1bb40de..a0b5484 100644 +--- src/Mod/Fem/feminout/importFenicsMesh.py ++++ src/Mod/Fem/feminout/importFenicsMesh.py +@@ -154,7 +154,7 @@ def export(objectslist, fileString): + FreeCAD.Console.PrintWarning("Tri6 -> Tri3, Tet10 -> Tet4, etc.\n") + writeFenicsXML.write_fenics_mesh_xml(obj, fileString) + elif fileExtension.lower() == '.xdmf': +- if importToolsFem.get_FemMeshObjectMeshGroups(obj) is not (): ++ if importToolsFem.get_FemMeshObjectMeshGroups(obj): + # if there are groups found, make task panel available + panel = WriteXDMFTaskPanel(obj, fileString) + FreeCADGui.Control.showDialog(panel) +diff --git src/Mod/Fem/feminout/writeFenicsXDMF.py src/Mod/Fem/feminout/writeFenicsXDMF.py +index 9e7f01b..5a93823 100644 +--- src/Mod/Fem/feminout/writeFenicsXDMF.py ++++ src/Mod/Fem/feminout/writeFenicsXDMF.py +@@ -258,7 +258,7 @@ def write_fenics_mesh_xdmf(fem_mesh_obj, outputfile, group_values_dict={}, encod + fem_mesh = fem_mesh_obj.FemMesh + gmshgroups = get_FemMeshObjectMeshGroups(fem_mesh_obj) + +- if gmshgroups is not (): ++ if gmshgroups: + print('found mesh groups') + + for g in gmshgroups: +diff --git src/Mod/PartDesign/WizardShaft/Shaft.py src/Mod/PartDesign/WizardShaft/Shaft.py +index c519b97..8c20eb4 100644 +--- src/Mod/PartDesign/WizardShaft/Shaft.py ++++ src/Mod/PartDesign/WizardShaft/Shaft.py +@@ -88,7 +88,7 @@ class Shaft: + # We don't call equilibrium() here because the new segment has no constraints defined yet + # Fix face reference of fixed segment if it is the last one + for i in range(1, len(self.segments)): +- if self.segments[i].constraintType is not "Fixed": ++ if self.segments[i].constraintType != "Fixed": + continue + if i == len(self.segments) - 1: + self.segments[index].constraint.References = [( self.feature.feature, "Face%u" % (2 * (index+1) + 1) )] diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template index 76d6df64724..6fe749b53d7 100644 --- a/srcpkgs/freecad/template +++ b/srcpkgs/freecad/template @@ -1,7 +1,7 @@ # Template file for 'freecad' pkgname=freecad version=0.18.4 -revision=9 +revision=10 wrksrc="FreeCAD-${version}" build_style=cmake @@ -38,6 +38,7 @@ checksum=4e0cce447b31b8989a00cf68c49ae012ce8e5546a56c6e0874fbd8f7ddedffd2 if [ "$XBPS_TARGET_LIBC" = musl ]; then makedepends+=" libexecinfo-devel" + LDFLAGS="-lexecinfo" fi post_extract() {