git: 62a89437404d - main - cad/freecad: better fix for build on -CURRENT
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 14 Jun 2026 21:55:47 UTC
The branch main has been updated by cmt:
URL: https://cgit.FreeBSD.org/ports/commit/?id=62a89437404dfa98d1224f44d456f78c6dcaf928
commit 62a89437404dfa98d1224f44d456f78c6dcaf928
Author: Christoph Moench-Tegeder <cmt@FreeBSD.org>
AuthorDate: 2026-06-14 21:53:18 +0000
Commit: Christoph Moench-Tegeder <cmt@FreeBSD.org>
CommitDate: 2026-06-14 21:55:29 +0000
cad/freecad: better fix for build on -CURRENT
pull in patch from upstream, where they had similar failures
on other systems with recent compilers.
---
...atch-src_Mod_TechDraw_Gui_CommandCreateDims.cpp | 36 ++++++++++++++++++++--
1 file changed, 33 insertions(+), 3 deletions(-)
diff --git a/cad/freecad/files/patch-src_Mod_TechDraw_Gui_CommandCreateDims.cpp b/cad/freecad/files/patch-src_Mod_TechDraw_Gui_CommandCreateDims.cpp
index e0fb62942284..40b15780c3a1 100644
--- a/cad/freecad/files/patch-src_Mod_TechDraw_Gui_CommandCreateDims.cpp
+++ b/cad/freecad/files/patch-src_Mod_TechDraw_Gui_CommandCreateDims.cpp
@@ -1,13 +1,43 @@
+commit 9e5555fe3fd762474a531da72a3aa1a3cdb1b6c4
+Author: Chris <chris.r.jones.1983@gmail.com>
+Date: Mon Apr 13 22:18:38 2026 -0500
+
+ TechDraw: Remove explicit template use of std::abs (#28985)
+
+ Unnecessary, and fails to build on macOS 26.
+
diff --git src/Mod/TechDraw/Gui/CommandCreateDims.cpp src/Mod/TechDraw/Gui/CommandCreateDims.cpp
-index 01df60faa1..e0f677f622 100644
+index cc3808bf7f..7e55d5993f 100644
--- src/Mod/TechDraw/Gui/CommandCreateDims.cpp
+++ src/Mod/TechDraw/Gui/CommandCreateDims.cpp
-@@ -1103,7 +1103,7 @@ protected:
+@@ -1127,7 +1127,7 @@ protected:
TechDraw::pointPair pp = dim->getLinearPoints();
float dx = pp.first().x - pp.second().x;
float dy = pp.first().y - pp.second().y;
- int alpha = std::round(Base::toDegrees(std::abs<float>(std::atan(type == "DistanceY" ? (dx / dy) : (dy / dx)))));
-+ int alpha = std::round(Base::toDegrees(std::abs<float>((float) std::atan(type == "DistanceY" ? (dx / dy) : (dy / dx)))));
++ int alpha = std::round(Base::toDegrees(std::abs(std::atan(type == "DistanceY" ? (dx / dy) : (dy / dx)))));
std::string sAlpha = std::to_string(alpha);
std::string formatSpec = dim->FormatSpec.getStrValue();
formatSpec = formatSpec + " x" + sAlpha + "°";
+diff --git src/Mod/TechDraw/Gui/CommandExtensionDims.cpp src/Mod/TechDraw/Gui/CommandExtensionDims.cpp
+index e7531ce714..46e6b4be4b 100644
+--- src/Mod/TechDraw/Gui/CommandExtensionDims.cpp
++++ src/Mod/TechDraw/Gui/CommandExtensionDims.cpp
+@@ -1984,7 +1984,7 @@ void execCreateHorizChamferDimension(Gui::Command* cmd) {
+ dim->Y.setValue(-yMax);
+ float dx = allVertexes[0].point.x - allVertexes[1].point.x;
+ float dy = allVertexes[0].point.y - allVertexes[1].point.y;
+- float alpha = std::round(Base::toDegrees(std::abs<float>(std::atan(dy / dx))));
++ float alpha = std::round(Base::toDegrees(std::abs(std::atan(dy / dx))));
+ std::string sAlpha = std::to_string((int)alpha);
+ std::string formatSpec = dim->FormatSpec.getStrValue();
+ formatSpec = formatSpec + " x" + sAlpha + "°";
+@@ -2050,7 +2050,7 @@ void execCreateVertChamferDimension(Gui::Command* cmd) {
+ dim->Y.setValue(-mid.y);
+ float dx = allVertexes[0].point.x - allVertexes[1].point.x;
+ float dy = allVertexes[0].point.y - allVertexes[1].point.y;
+- float alpha = std::round(Base::toDegrees(std::abs<float>(std::atan(dx / dy))));
++ float alpha = std::round(Base::toDegrees(std::abs(std::atan(dx / dy))));
+ std::string sAlpha = std::to_string((int)alpha);
+ std::string formatSpec = dim->FormatSpec.getStrValue();
+ formatSpec = formatSpec + " x" + sAlpha + "°";