Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] freecad: update to 0.21.2.
@ 2024-05-20 12:14 ii8
  2024-06-16 23:09 ` [PR PATCH] [Closed]: " classabbyamp
  0 siblings, 1 reply; 2+ messages in thread
From: ii8 @ 2024-05-20 12:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

There is a new pull request by ii8 against master on the void-packages repository

https://github.com/ii8/void-packages freecad
https://github.com/void-linux/void-packages/pull/50441

freecad: update to 0.21.2.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-musl

A patch file from https://github.com/void-linux/void-packages/pull/50441.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-freecad-50441.patch --]
[-- Type: text/x-diff, Size: 25204 bytes --]

From 080c86987789a4f74e83ab16b75fa565319eb52a Mon Sep 17 00:00:00 2001
From: ii8 <murray.calavera@protonmail.com>
Date: Mon, 20 May 2024 11:11:45 +0100
Subject: [PATCH] freecad: update to 0.21.2.

---
 srcpkgs/freecad/patches/001-include.patch     | 112 -------
 .../patches/153-limits.h-for-musl.patch       |  13 -
 .../154-revert-gui-tmp-redirect-stderr.patch  |  68 -----
 ...d63c8c9b1280978be841d04e68a0a55cceb9.patch |  30 --
 srcpkgs/freecad/patches/includes.patch        |  20 ++
 srcpkgs/freecad/patches/pyregex.patch         | 284 ++++++++++++++++++
 srcpkgs/freecad/template                      |  25 +-
 7 files changed, 318 insertions(+), 234 deletions(-)
 delete mode 100644 srcpkgs/freecad/patches/001-include.patch
 delete mode 100644 srcpkgs/freecad/patches/153-limits.h-for-musl.patch
 delete mode 100644 srcpkgs/freecad/patches/154-revert-gui-tmp-redirect-stderr.patch
 delete mode 100644 srcpkgs/freecad/patches/fe02d63c8c9b1280978be841d04e68a0a55cceb9.patch
 create mode 100644 srcpkgs/freecad/patches/includes.patch
 create mode 100644 srcpkgs/freecad/patches/pyregex.patch

diff --git a/srcpkgs/freecad/patches/001-include.patch b/srcpkgs/freecad/patches/001-include.patch
deleted file mode 100644
index 28b5af54999b96..00000000000000
--- a/srcpkgs/freecad/patches/001-include.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From 9a41845a417189776741297c50a3827ce292bc4f Mon Sep 17 00:00:00 2001
-From: Uwe <donovaly@users.noreply.github.com>
-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             | 36 +++----------------------
- src/Mod/Part/App/OffsetCurvePyImp.cpp   | 12 ++++-----
- src/Mod/Part/App/OffsetSurfacePyImp.cpp | 10 +++----
- 3 files changed, 12 insertions(+), 46 deletions(-)
-
---- a/src/Mod/Part/App/OCCError.h
-+++ b/src/Mod/Part/App/OCCError.h
-@@ -23,36 +23,8 @@
- #ifndef _OCCError_h_
- #define _OCCError_h_
- 
--# include <Standard_Version.hxx>
- # include <Standard_Failure.hxx>
--# include <Standard_AbortiveTransaction.hxx>
--# include <Standard_ConstructionError.hxx>
--# if OCC_VERSION_HEX >= 0x060500
--# include <Standard_DefineException.hxx>
--# endif
--# include <Standard_DimensionError.hxx>
--# include <Standard_DimensionMismatch.hxx>
--# include <Standard_DivideByZero.hxx>
--# include <Standard_DomainError.hxx>
--# include <Standard_ImmutableObject.hxx>
--# include <Standard_LicenseError.hxx>
--# include <Standard_LicenseNotFound.hxx>
--# include <Standard_MultiplyDefined.hxx>
--# include <Standard_NegativeValue.hxx>
--# include <Standard_NoMoreObject.hxx>
--# include <Standard_NoSuchObject.hxx>
--# include <Standard_NotImplemented.hxx>
--# include <Standard_NullObject.hxx>
--# include <Standard_NullValue.hxx>
--# include <Standard_NumericError.hxx>
--# include <Standard_OutOfMemory.hxx>
--# include <Standard_OutOfRange.hxx>
--# include <Standard_Overflow.hxx>
--# include <Standard_ProgramError.hxx>
--# include <Standard_RangeError.hxx>
--# include <Standard_TooManyUsers.hxx>
--# include <Standard_TypeMismatch.hxx>
--# include <Standard_Underflow.hxx>
-+# include <Standard_Version.hxx>
- 
- #include <Mod/Part/PartGlobal.h>
- #include <Base/Console.h>
-@@ -88,4 +60,3 @@ PartExport extern PyObject* PartExceptio
- 
- #define PY_CATCH_OCC _PY_CATCH_OCC(return(NULL))
- #endif  // _OCCError_h_
--
---- a/src/Mod/Part/App/OffsetCurvePyImp.cpp
-+++ b/src/Mod/Part/App/OffsetCurvePyImp.cpp
-@@ -20,20 +20,20 @@
-  *                                                                         *
-  ***************************************************************************/
- 
--
- #include "PreCompiled.h"
- #ifndef _PreComp_
- # include <Geom_OffsetCurve.hxx>
- #endif
- 
--#include "OCCError.h"
--#include "Geometry.h"
-+#include <Base/GeometryPyCXX.h>
-+#include <Base/Vector3D.h>
-+#include <Base/VectorPy.h>
-+
- #include "OffsetCurvePy.h"
- #include "OffsetCurvePy.cpp"
-+#include "Geometry.h"
-+#include "OCCError.h"
- 
--#include <Base/GeometryPyCXX.h>
--#include <Base/VectorPy.h>
--#include <Base/Vector3D.h>
- 
- using namespace Part;
- 
---- a/src/Mod/Part/App/OffsetSurfacePyImp.cpp
-+++ b/src/Mod/Part/App/OffsetSurfacePyImp.cpp
-@@ -20,20 +20,16 @@
-  *                                                                         *
-  ***************************************************************************/
- 
--
- #include "PreCompiled.h"
- #ifndef _PreComp_
- # include <Geom_OffsetSurface.hxx>
- # include <memory>
- #endif
- 
--#include <Base/VectorPy.h>
--#include <Base/Vector3D.h>
--
- #include "OCCError.h"
--#include "Geometry.h"
--#include <Mod/Part/App/OffsetSurfacePy.h>
--#include <Mod/Part/App/OffsetSurfacePy.cpp>
-+#include "OffsetSurfacePy.h"
-+#include "OffsetSurfacePy.cpp"
-+
- 
- using namespace Part;
- 
diff --git a/srcpkgs/freecad/patches/153-limits.h-for-musl.patch b/srcpkgs/freecad/patches/153-limits.h-for-musl.patch
deleted file mode 100644
index 4c1b369680b819..00000000000000
--- a/srcpkgs/freecad/patches/153-limits.h-for-musl.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/FCConfig.h
-+++ b/src/FCConfig.h
-@@ -321,4 +321,10 @@ typedef unsigned __int64    uint64_t;
- //#	define _PreComp_                  // use precompiled header
- #endif
- 
-+#if defined(FC_OS_LINUX) || defined(FC_OS_MACOSX) || defined(FC_OS_BSD)
-+#if (!defined(PATH_MAX))
-+#include <limits.h>
-+#endif
-+#endif
-+
- #endif //FC_CONFIG_H
diff --git a/srcpkgs/freecad/patches/154-revert-gui-tmp-redirect-stderr.patch b/srcpkgs/freecad/patches/154-revert-gui-tmp-redirect-stderr.patch
deleted file mode 100644
index d6a9adabdec830..00000000000000
--- a/srcpkgs/freecad/patches/154-revert-gui-tmp-redirect-stderr.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-see https://github.com/FreeCAD/FreeCAD/commit/cfe94b00d3434f3e2c8b5114d2909f628c330fa8#commitcomment-71413407
-
-upstream: yes
-
-From 7b377a216b9185960e4cee980a6504dc1a755f50 Mon Sep 17 00:00:00 2001
-From: wmayer <wmayer@users.sourceforge.net>
-Date: Wed, 29 Jun 2022 15:19:18 +0200
-Subject: [PATCH] Gui: remove workaround for spnav 0.23 due to build failure
- with musl libc
-
----
- src/Gui/3Dconnexion/GuiNativeEventLinux.cpp | 27 ---------------------
- 1 file changed, 27 deletions(-)
-
---- a/src/Gui/3Dconnexion/GuiNativeEventLinux.cpp
-+++ b/src/Gui/3Dconnexion/GuiNativeEventLinux.cpp
-@@ -21,42 +21,17 @@
-  ***************************************************************************/
- 
- #include <FCConfig.h>
--#include <cstdio>
- 
- #include "GuiNativeEventLinux.h"
- 
- #include "GuiApplicationNativeEventAware.h"
- #include <Base/Console.h>
--#include <Base/FileInfo.h>
- #include <QMainWindow>
- 
- #include <QSocketNotifier>
- 
- #include <spnav.h>
- 
--namespace {
--class RedirectStdErr
--{
--public:
--    RedirectStdErr()
--        : fi(Base::FileInfo::getTempFileName())
--        , file(stderr)
--    {
--        stderr = fopen(fi.filePath().c_str(), "w");
--    }
--    ~RedirectStdErr()
--    {
--        fclose(stderr);
--        fi.deleteFile();
--        stderr = file;
--    }
--
--private:
--    Base::FileInfo fi;
--    FILE* file;
--};
--}
--
- Gui::GuiNativeEvent::GuiNativeEvent(Gui::GUIApplicationNativeEventAware *app)
- : GuiAbstractNativeEvent(app)
- {
-@@ -72,8 +47,6 @@ Gui::GuiNativeEvent::~GuiNativeEvent()
- 
- void Gui::GuiNativeEvent::initSpaceball(QMainWindow *window)
- {
--    // tmp. redirect stderr to a file to suppress an error message from spnav_open()
--    RedirectStdErr err;
-     Q_UNUSED(window)
-     if (spnav_open() == -1) {
-         Base::Console().Log("Couldn't connect to spacenav daemon. Please ignore if you don't have a spacemouse.\n");
diff --git a/srcpkgs/freecad/patches/fe02d63c8c9b1280978be841d04e68a0a55cceb9.patch b/srcpkgs/freecad/patches/fe02d63c8c9b1280978be841d04e68a0a55cceb9.patch
deleted file mode 100644
index d4acf370ca0a42..00000000000000
--- a/srcpkgs/freecad/patches/fe02d63c8c9b1280978be841d04e68a0a55cceb9.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From fe02d63c8c9b1280978be841d04e68a0a55cceb9 Mon Sep 17 00:00:00 2001
-From: Roy-043 <70520633+Roy-043@users.noreply.github.com>
-Date: Thu, 29 Dec 2022 23:20:38 +0100
-Subject: [PATCH] Draft: update inspect.getargspec to inspect.getfullargspec
- (#8101)
-
----
- src/Mod/Draft/draftguitools/gui_snapper.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/src/Mod/Draft/draftguitools/gui_snapper.py
-+++ b/src/Mod/Draft/draftguitools/gui_snapper.py
-@@ -1426,7 +1426,7 @@ class Snapper:
-             Gui.Snapper.off()
-             self.ui.offUi()
-             if callback:
--                if len(inspect.getargspec(callback).args) > 1:
-+                if len(inspect.getfullargspec(callback).args) > 1:
-                     obj = None
-                     if self.snapInfo and ("Object" in self.snapInfo) and self.snapInfo["Object"]:
-                         obj = App.ActiveDocument.getObject(self.snapInfo["Object"])
-@@ -1445,7 +1445,7 @@ class Snapper:
-             Gui.Snapper.off()
-             self.ui.offUi()
-             if callback:
--                if len(inspect.getargspec(callback).args) > 1:
-+                if len(inspect.getfullargspec(callback).args) > 1:
-                     callback(None, None)
-                 else:
-                     callback(None)
diff --git a/srcpkgs/freecad/patches/includes.patch b/srcpkgs/freecad/patches/includes.patch
new file mode 100644
index 00000000000000..86287a33355e52
--- /dev/null
+++ b/srcpkgs/freecad/patches/includes.patch
@@ -0,0 +1,20 @@
+--- a/src/Base/Builder3D.h
++++ b/src/Base/Builder3D.h
+@@ -26,6 +26,7 @@
+ 
+ // Std. configurations
+ 
++#include <cstdint>
+ #include <sstream>
+ #include <vector>
+ #include <Base/Tools3D.h>
+--- a/src/Base/FileInfo.cpp
++++ b/src/Base/FileInfo.cpp
+@@ -22,6 +22,7 @@
+  ***************************************************************************/
+ 
+ 
++#include <limits.h>
+ #include "PreCompiled.h"
+ 
+ #ifndef _PreComp_
diff --git a/srcpkgs/freecad/patches/pyregex.patch b/srcpkgs/freecad/patches/pyregex.patch
new file mode 100644
index 00000000000000..7eb032a13037a2
--- /dev/null
+++ b/srcpkgs/freecad/patches/pyregex.patch
@@ -0,0 +1,284 @@
+--- a/src/Mod/Arch/ArchAxis.py
++++ b/src/Mod/Arch/ArchAxis.py
+@@ -451,7 +451,7 @@ class _ViewProviderAxis:
+                                     except Exception:
+                                         # workaround for pivy SoInput.setBuffer() bug
+                                         buf = buf.replace("\n","")
+-                                        pts = re.findall("point \[(.*?)\]",buf)[0]
++                                        pts = re.findall(r"point \[(.*?)\]",buf)[0]
+                                         pts = pts.split(",")
+                                         pc = []
+                                         for point in pts:
+--- a/src/Mod/Arch/ArchRebar.py
++++ b/src/Mod/Arch/ArchRebar.py
+@@ -556,7 +556,7 @@ class _ViewProviderRebar(ArchComponent.ViewProviderComponent):
+                     import re
+                     self.centerline = coin.SoSeparator()
+                     comp = Part.makeCompound(obj.Proxy.wires)
+-                    pts = re.findall("point \[(.*?)\]",comp.writeInventor().replace("\n",""))
++                    pts = re.findall(r"point \[(.*?)\]",comp.writeInventor().replace("\n",""))
+                     pts = [p.split(",") for p in pts]
+                     for pt in pts:
+                         ps = coin.SoSeparator()
+--- a/src/Mod/Arch/ArchSectionPlane.py
++++ b/src/Mod/Arch/ArchSectionPlane.py
+@@ -748,7 +748,7 @@ def getCoinSVG(cutplane,objs,cameradata=None,linewidth=0.2,singleface=False,face
+     wp.alignToPointAndAxis_SVG(Vector(0,0,0),cutplane.normalAt(0,0),0)
+     p = wp.getLocalCoords(markervec)
+     orlength = FreeCAD.Vector(p.x,p.y,0).Length
+-    marker = re.findall("<line x1=.*?stroke=\"\#ffffff\".*?\/>",svg)
++    marker = re.findall(r'<line x1=.*?stroke="#ffffff".*?/>',svg)
+     if marker:
+         marker = marker[0].split("\"")
+         x1 = float(marker[1])
+@@ -764,7 +764,7 @@ def getCoinSVG(cutplane,objs,cameradata=None,linewidth=0.2,singleface=False,face
+             scaledp1 = FreeCAD.Vector(p1.x*factor,p1.y*factor,0)
+             trans = orig.sub(scaledp1)
+         # remove marker
+-        svg = re.sub("<line x1=.*?stroke=\"\#ffffff\".*?\/>","",svg,count=1)
++        svg = re.sub(r'<line x1=.*?stroke="#ffffff".*?/>',"",svg,count=1)
+ 
+     # remove background rectangle
+     svg = re.sub("<path.*?>","",svg,count=1,flags=re.MULTILINE|re.DOTALL)
+@@ -792,9 +792,9 @@ def getCoinSVG(cutplane,objs,cameradata=None,linewidth=0.2,singleface=False,face
+     QtCore.QTimer.singleShot(1,lambda: closeViewer(view_window_name))
+ 
+     # strip svg tags (needed for TD Arch view)
+-    svg = re.sub("<\?xml.*?>","",svg,flags=re.MULTILINE|re.DOTALL)
+-    svg = re.sub("<svg.*?>","",svg,flags=re.MULTILINE|re.DOTALL)
+-    svg = re.sub("<\/svg>","",svg,flags=re.MULTILINE|re.DOTALL)
++    svg = re.sub(r"<\?xml.*?>","",svg,flags=re.MULTILINE|re.DOTALL)
++    svg = re.sub(r"<svg.*?>","",svg,flags=re.MULTILINE|re.DOTALL)
++    svg = re.sub(r"<\/svg>","",svg,flags=re.MULTILINE|re.DOTALL)
+ 
+     ISRENDERING = False
+ 
+--- a/src/Mod/Arch/ArchSite.py
++++ b/src/Mod/Arch/ArchSite.py
+@@ -92,7 +92,7 @@ def toNode(shape):
+     from pivy import coin
+     buf = shape.writeInventor(2,0.01)
+     buf = buf.replace("\n","")
+-    buf = re.findall("point \[(.*?)\]",buf)
++    buf = re.findall(r"point \[(.*?)\]",buf)
+     pts = []
+     for c in buf:
+         pts.extend(c.split(","))
+--- a/src/Mod/Arch/importIFClegacy.py
++++ b/src/Mod/Arch/importIFClegacy.py
+@@ -39,7 +39,7 @@ SCHEMA = "http://www.steptools.com/support/stdev_docs/ifcbim/ifc4.exp" # only fo
+ MAKETEMPFILES = False # if True, shapes are passed from ifcopenshell to freecad through temp files
+ DEBUG = True # this is only for the python console, this value is overridden when importing through the GUI
+ SKIP = ["IfcBuildingElementProxy","IfcFlowTerminal","IfcFurnishingElement"] # default. overwritten by the GUI options
+-IFCLINE_RE = re.compile("#(\d+)[ ]?=[ ]?(.*?)\((.*)\);[\\r]?$")
++IFCLINE_RE = re.compile(r"#(\d+)[ ]?=[ ]?(.*?)\((.*)\);[\r]?$")
+ PRECISION = 4 # rounding value, in number of digits
+ APPLYFIX = True # if true, the ifcopenshell bug-fixing function is applied when saving files
+ # end config
+@@ -1440,9 +1440,9 @@ class IfcSchema:
+             entity = {}
+             raw_entity_str = m.groups()[0]
+ 
+-            entity["name"] = re.search("(.*?)[;|\s]", raw_entity_str).groups()[0].upper()
++            entity["name"] = re.search(r"(.*?)[;|\s]", raw_entity_str).groups()[0].upper()
+ 
+-            subtypeofmatch = re.search(".*SUBTYPE OF \((.*?)\);", raw_entity_str)
++            subtypeofmatch = re.search(r".*SUBTYPE OF \((.*?)\);", raw_entity_str)
+             entity["supertype"] = subtypeofmatch.groups()[0].upper() if subtypeofmatch else None
+ 
+             # find the shortest string matched from the end of the entity type header to the
+--- a/src/Mod/Draft/draftguitools/gui_trackers.py
++++ b/src/Mod/Draft/draftguitools/gui_trackers.py
+@@ -423,7 +423,7 @@ class bsplineTracker(Tracker):
+             except Exception:
+                 # workaround for pivy SoInput.setBuffer() bug
+                 buf = buf.replace("\n", "")
+-                pts = re.findall("point \[(.*?)\]", buf)[0]
++                pts = re.findall(r"point \[(.*?)\]", buf)[0]
+                 pts = pts.split(",")
+                 pc = []
+                 for p in pts:
+@@ -501,7 +501,7 @@ class bezcurveTracker(Tracker):
+                 except Exception:
+                     # workaround for pivy SoInput.setBuffer() bug
+                     buf = buf.replace("\n","")
+-                    pts = re.findall("point \[(.*?)\]", buf)[0]
++                    pts = re.findall(r"point \[(.*?)\]", buf)[0]
+                     pts = pts.split(",")
+                     pc = []
+                     for p in pts:
+@@ -636,7 +636,7 @@ class arcTracker(Tracker):
+         except Exception:
+             # workaround for pivy SoInput.setBuffer() bug
+             buf = buf.replace("\n", "")
+-            pts = re.findall("point \[(.*?)\]", buf)[0]
++            pts = re.findall(r"point \[(.*?)\]", buf)[0]
+             pts = pts.split(",")
+             pc = []
+             for p in pts:
+--- a/src/Mod/Draft/importAirfoilDAT.py
++++ b/src/Mod/Draft/importAirfoilDAT.py
+@@ -4,12 +4,6 @@
+ #  \brief Airfoil (.dat) file importer
+ #
+ # This module provides support for importing airfoil .dat files
+-'''@package importAirfoilDAT
+-\ingroup DRAFT
+-\brief Airfoil (.dat) file importer
+-
+-This module provides support for importing airfoil .dat files.
+-'''
+ # Check code with
+ # flake8 --ignore=E226,E266,E401,W503
+ 
+--- a/src/Mod/Draft/importDXF.py
++++ b/src/Mod/Draft/importDXF.py
+@@ -233,9 +233,9 @@ def deformat(text):
+     # t = re.sub('{([^!}]([^}]|\n)*)}', '', text)
+     # print("input text: ",text)
+     t = text.strip("{}")
+-    t = re.sub("\\\.*?;", "", t)
++    t = re.sub(r"\\.*?;", "", t)
+     # replace UTF codes by utf chars
+-    sts = re.split("\\\\(U\+....)", t)
++    sts = re.split(r"\\(U\+....)", t)
+     t = u"".join(sts)
+     # replace degrees, diameters chars
+     t = re.sub('%%d', u'°', t)
+@@ -3863,7 +3863,7 @@ def exportPage(page, filename):
+     blocks = ""
+     entities = ""
+     r12 = False
+-    ver = re.findall("\$ACADVER\n.*?\n(.*?)\n", template)
++    ver = re.findall(r"\$ACADVER\n.*?\n(.*?)\n", template)
+     if ver:
+         # at the moment this is not used.
+         # TODO: if r12, do not print ellipses or splines
+--- a/src/Mod/Draft/importOCA.py
++++ b/src/Mod/Draft/importOCA.py
+@@ -2,17 +2,14 @@
+ ## @package importOCA
+ #  \ingroup DRAFT
+ #  \brief OCA (Open CAD Format) file importer & exporter
+-'''@package importOCA
+-\ingroup DRAFT
+-\brief OCA (Open CAD Format) file importer & exporter
++#
++#  This module provides support for importing from and exporting to
++#  the OCA format or GCAD format from GCAD3D (http://www.gcad3d.org/).
++#  See: https://groups.google.com/forum/#!forum/open_cad_format
++#
++#  As of 2019 this file format is practically obsolete, and this module is not
++#  maintained.
+ 
+-This module provides support for importing from and exporting to
+-the OCA format or GCAD format from GCAD3D (http://www.gcad3d.org/).
+-See: https://groups.google.com/forum/#!forum/open_cad_format
+-
+-As of 2019 this file format is practically obsolete, and this module is not
+-maintained.
+-'''
+ # Check code with
+ # flake8 --ignore=E226,E266,E401,W503
+ 
+--- a/src/Mod/Draft/importSVG.py
++++ b/src/Mod/Draft/importSVG.py
+@@ -73,8 +73,7 @@ else:
+     draftui = None
+ 
+ # Save the native open function to avoid collisions
+-if open.__module__ in ['__builtin__', 'io']:
+-    pythonopen = open
++pythonopen = open
+ 
+ svgcolors = {
+     'Pink': (255, 192, 203),
+@@ -413,8 +412,8 @@ def getsize(length, mode='discard', base=1):
+         }
+ 
+     # Extract a number from a string like '+56215.14565E+6mm'
+-    _num = '([-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)'
+-    _unit = '(px|pt|pc|mm|cm|in|em|ex|%)?'
++    _num = r"([-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)"
++    _unit = r"(px|pt|pc|mm|cm|in|em|ex|%)?"
+     _full_num = _num + _unit
+     number, exponent, unit = re.findall(_full_num, length)[0]
+     if mode == 'discard':
+@@ -729,7 +728,7 @@ class svgHandler(xml.sax.ContentHandler):
+             if 'inkscape:version' in data:
+                 inks_doc_name = attrs.getValue('sodipodi:docname')
+                 inks_full_ver = attrs.getValue('inkscape:version')
+-                inks_ver_pars = re.search("\d+\.\d+", inks_full_ver)
++                inks_ver_pars = re.search(r"\d+\.\d+", inks_full_ver)
+                 if inks_ver_pars is not None:
+                     inks_ver_f = float(inks_ver_pars.group(0))
+                 else:
+@@ -930,13 +929,13 @@ class svgHandler(xml.sax.ContentHandler):
+                 self.lastdim = obj
+                 data['d'] = []
+ 
+-            _op = '([mMlLhHvVaAcCqQsStTzZ])'
+-            _op2 = '([^mMlLhHvVaAcCqQsStTzZ]*)'
+-            _command = '\s*?' + _op + '\s*?' + _op2 + '\s*?'
++            _op = r"([mMlLhHvVaAcCqQsStTzZ])"
++            _op2 = r"([^mMlLhHvVaAcCqQsStTzZ]*)"
++            _command = r"\s*?" + _op + r"\s*?" + _op2 + r"\s*?"
+             pathcommandsre = re.compile(_command, re.DOTALL)
+ 
+-            _num = '[-+]?[0-9]*\.?[0-9]+'
+-            _exp = '([eE][-+]?[0-9]+)?'
++            _num = r"[-+]?[0-9]*\.?[0-9]+"
++            _exp = r"([eE][-+]?[0-9]+)?"
+             _point = '(' + _num + _exp + ')'
+             pointsre = re.compile(_point, re.DOTALL)
+             _commands = pathcommandsre.findall(' '.join(data['d']))
+@@ -1616,9 +1615,9 @@ class svgHandler(xml.sax.ContentHandler):
+         Base::Matrix4D
+             The translated matrix.
+         """
+-        _op = '(matrix|translate|scale|rotate|skewX|skewY)'
+-        _val = '\((.*?)\)'
+-        _transf = _op + '\s*?' + _val
++        _op = r"(matrix|translate|scale|rotate|skewX|skewY)"
++        _val = r"\((.*?)\)"
++        _transf = _op + r"\s*?" + _val
+         transformre = re.compile(_transf, re.DOTALL)
+         m = FreeCAD.Matrix()
+         for transformation, arguments in transformre.findall(tr):
+--- a/src/Mod/Path/Path/Post/scripts/gcode_pre.py
++++ b/src/Mod/Path/Path/Post/scripts/gcode_pre.py
+@@ -191,10 +191,10 @@ def _identifygcodeByToolNumberList(filename):
+     gfile.close()
+ 
+     # Regular expression to match tool changes in the format 'M6 Tn'
+-    p = re.compile("[mM]+?\s?0?6\s?T\d*\s")
++    p = re.compile(r"[mM]+?\s?0?6\s?T\d*\s")
+ 
+     # split the gcode on tool changes
+-    paths = re.split("([mM]+?\s?0?6\s?T\d*\s)", gcode)
++    paths = re.split(r"([mM]+?\s?0?6\s?T\d*\s)", gcode)
+ 
+     # iterate the gcode sections and add customs for each
+     toolnumber = 0
+--- a/src/Mod/Path/PathTests/TestPathPost.py
++++ b/src/Mod/Path/PathTests/TestPathPost.py
+@@ -352,7 +352,7 @@ class TestBuildPostList(unittest.TestCase):
+ 
+ class TestOutputNameSubstitution(unittest.TestCase):
+ 
+-    """
++    r"""
+     String substitution allows the following:
+     %D ... directory of the active document
+     %d ... name of the active document (with extension)
+--- a/src/Mod/Robot/KukaExporter.py
++++ b/src/Mod/Robot/KukaExporter.py
+@@ -21,7 +21,7 @@ DECL FDAT FP4={TOOL_NO 1,BASE_NO 0,IPO_FRAME #BASE,POINT2[] " "}
+ DECL LDAT LCPDAT1={VEL 2.0,ACC 100.0,APO_DIST 100.0,APO_FAC 50.0,ORI_TYP #VAR}
+ """
+ 
+-HeaderSrc = """&ACCESS RVP
++HeaderSrc = r"""&ACCESS RVP
+ &REL 1
+ &PARAM TEMPLATE = C:\KRC\Roboter\Template\ExpertVorgabe
+ &PARAM EDITMASK = * 
diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index c135701e38b9ad..2c0e80315116fd 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,7 +1,7 @@
 # Template file for 'freecad'
 pkgname=freecad
-version=0.20.2
-revision=7
+version=0.21.2
+revision=1
 build_wrksrc="FreeCAD-${version}"
 build_style=cmake
 pycompile_dirs="usr/lib/${pkgname}/Mod"
@@ -18,14 +18,17 @@ configure_args="
  -DPYSIDE2RCCBINARY=/usr/bin/rcc-qt5
  -DPYSIDE2UICBINARY=/usr/bin/uic-qt5
 "
-hostmakedepends="pkg-config swig doxygen graphviz python3-setuptools"
-makedepends="python3-devel boost-devel libxerces-c-devel zlib-devel occt-devel
- vtk-devel hdf5-devel openmpi-devel libmed-devel eigen double-conversion-devel
- coin3-devel libshiboken2-devel libspnav-devel pyside2-tools
- liblz4-devel libpyside2-python3-devel python3-matplotlib netcdf-devel
- jsoncpp-devel qt5-devel qt5-svg-devel qt5-tools-devel qt5-webkit-devel
- qt5-xmlpatterns-devel coin3-doc glew-devel python3-pivy"
-depends="python3-matplotlib python3-pyside2-webengine python3-pivy"
+hostmakedepends="pkg-config swig doxygen graphviz python3-setuptools
+ python3-matplotlib"
+makedepends="boost-devel libxerces-c-devel zlib-devel occt-devel vtk-devel
+ hdf5-devel openmpi-devel libmed-devel eigen double-conversion-devel
+ coin3-devel libshiboken2-devel libspnav-devel liblz4-devel netcdf-devel
+ jsoncpp-devel coin3-doc glew-devel python3-devel pyside2-tools
+ libpyside2-python3-devel qt5-devel qt5-svg-devel qt5-tools-devel
+ qt5-declarative-devel qt5-webengine-devel qt5-webchannel-devel
+ qt5-location-devel qt5-xmlpatterns-devel"
+depends="python3-matplotlib python3-pyside2-webengine python3-pivy
+ python3-GitPython python3-Markdown"
 short_desc="General purpose 3D CAD modeler"
 maintainer="yopito <pierre.bourgin@free.fr>"
 license="LGPL-2.0-or-later"
@@ -35,7 +38,7 @@ distfiles="
  https://github.com/FreeCAD/FreeCAD/archive/${version}.tar.gz
  ${SOURCEFORGE_SITE}/cxx/pycxx-${_pycxxver}.tar.gz
 "
-checksum="46922f3a477e742e1a89cd5346692d63aebb2b67af887b3e463e094a4ae055da
+checksum="ceaf77cd12e8ad533d1535cc27ae4ca2a6e80778502dc9cdec906415d674b674
  4b91e1e1141c23fbd5039df635c4bb6e75632168548f56b83ce177193c0c98c6"
 python_version=3
 patch_args="-Np1 -d ${build_wrksrc}"

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PR PATCH] [Closed]: freecad: update to 0.21.2.
  2024-05-20 12:14 [PR PATCH] freecad: update to 0.21.2 ii8
@ 2024-06-16 23:09 ` classabbyamp
  0 siblings, 0 replies; 2+ messages in thread
From: classabbyamp @ 2024-06-16 23:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

There's a closed pull request on the void-packages repository

freecad: update to 0.21.2.
https://github.com/void-linux/void-packages/pull/50441

Description:
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-musl

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-16 23:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-20 12:14 [PR PATCH] freecad: update to 0.21.2 ii8
2024-06-16 23:09 ` [PR PATCH] [Closed]: " classabbyamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).