sci-libs/ondselsolver: add 1.0.1_p20260723, 9999

extend demangle patch further

Closes: https://bugs.gentoo.org/969202
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1856
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Paul Zander
2026-09-15 16:34:46 +01:00
committed by Sam James
parent d9335cf0c9
commit e850fdfacd
5 changed files with 237 additions and 0 deletions
+1
View File
@@ -1,3 +1,4 @@
DIST ondselsolver-1.0.1_p20241024.tar.gz 4668075 BLAKE2B 82e13168b2f6d988e411613584d9bb943afd9df73716a467d2681658d530e71173abcb31e432075dce8ebc1f0276ecb2b7b837bf057fb68f654c972e2d77f5b5 SHA512 918542fca4bfcb952d6d9500a0f3721549810dd2cde9adfb352d9301e0e1bf0fe1100a301316f15a6dcd18e36d371c58ba4a41b8f8e0878a77db4cbf054a095a
DIST ondselsolver-1.0.1_p20241127.tar.gz 4669048 BLAKE2B 6f6c4f9468b2474890b05ca394947aa91bc1780e1ef922bba40144a30c247db32d7a5de469ed27e426209013b07a137522bad9c220d9e1862f7e946696974b0b SHA512 3504a6ab379f2d9d943a1a6da8f79abffebd7fe45fd3258f0bfeb0a789d73a2b68714c10e77e48987514c8acb23800412c10daa0046ed82dab4a2aab569851ff
DIST ondselsolver-1.0.1_p20260211.tar.gz 4667722 BLAKE2B 7ae7e44ecbb33cf13af6b7b4e51caf7ceb26cd189a07d7ff1968010aa0bf9cac48b11c496c256d9eccf254e28a1dc9bf64decb54fc677c13654dcec157c194b2 SHA512 00cbb6c39352f4a695189ea7d5c1e3b5fc149d35ad81880725b372e9311599b25e350fc2ac02214c6a06430920de2516e8fa54566bde231cd8ef96e916e78910
DIST ondselsolver-1.0.1_p20260723.tar.gz 4669639 BLAKE2B ac1a424194f08edb0816cc7bdea677c6c6d72e668aad90dd62483e863f404c6c511296175101f94645dddec8ca0c25c5e36d6ce4b4fb2dae0b059633ba1bdc82 SHA512 d556dc6e686190dcbb0b4ea941def21b767cc5f45960d79c739eb64330dfc498ed89268bad619379f1da7a83a1db91a4f299b920b78e08529e011c57b3569a4f
@@ -57,6 +57,25 @@ index 40edd52..bb710e3 100644
ASMTItemIJ::storeOnTimeSeries(os);
}
diff --git a/OndselSolver/AccNewtonRaphson.cpp b/OndselSolver/AccNewtonRaphson.cpp
index 588d0fe..abc9ce5 100644
--- a/OndselSolver/AccNewtonRaphson.cpp
+++ b/OndselSolver/AccNewtonRaphson.cpp
@@ -126,12 +126,12 @@ void AccNewtonRaphson::preRun()
void MbD::AccNewtonRaphson::handleSingularMatrix()
{
auto& r = *matrixSolver;
- std::string str = typeid(r).name();
+ std::string str = demangle(typeid(r).name());
if (str.find("GESpMatParPvMarkoFast") != std::string::npos) {
matrixSolver = CREATE<GESpMatParPvPrecise>::With();
this->solveEquations();
} else {
- str = typeid(r).name();
+ str = demangle(typeid(r).name());
if (str.find("GESpMatParPvPrecise") != std::string::npos) {
this->logSingularMatrixMessage();
matrixSolver->throwSingularMatrixError("AccAccNewtonRaphson");
diff --git a/OndselSolver/Array.h b/OndselSolver/Array.h
index 636e9a5..e270795 100644
--- a/OndselSolver/Array.h
@@ -81,6 +100,28 @@ index 636e9a5..e270795 100644
}
friend std::ostream& operator<<(std::ostream& s, const Array& array)
{
diff --git a/OndselSolver/CREATE.h b/OndselSolver/CREATE.h
index 0c6fc96..7c94b82 100644
--- a/OndselSolver/CREATE.h
+++ b/OndselSolver/CREATE.h
@@ -70,7 +70,7 @@ namespace MbD {
}
static std::shared_ptr<Constraint> ConstraintWith(std::shared_ptr<EndFramec> frmi, std::shared_ptr<EndFramec> frmj, size_t axis) {
std::shared_ptr<Constraint> inst;
- std::string str = typeid(T).name();
+ std::string str = demangle(typeid(T).name());
if (str.find("AtPointConstraintIqcJqc") != std::string::npos) {
if (std::dynamic_pointer_cast<EndFrameqct>(frmi)) {
inst = std::make_shared<AtPointConstraintIqctJqc>(frmi, frmj, axis);
@@ -97,7 +97,7 @@ namespace MbD {
}
static std::shared_ptr<Constraint> ConstraintWith(std::shared_ptr<EndFramec> frmi, std::shared_ptr<EndFramec> frmj, size_t axisi, size_t axisj) {
std::shared_ptr<Constraint> inst;
- std::string str = typeid(T).name();
+ std::string str = demangle(typeid(T).name());
if (str.find("DirectionCosineConstraintIqcJqc") != std::string::npos) {
if (std::dynamic_pointer_cast<EndFrameqct>(frmi)) {
inst = std::make_shared<DirectionCosineConstraintIqctJqc>(frmi, frmj, axisi, axisj);
diff --git a/OndselSolver/Demangle.h b/OndselSolver/Demangle.h
new file mode 100644
index 0000000..810936d
@@ -150,6 +191,48 @@ index 4435d5d..120cd3c 100644
}
void Item::initializeLocally()
diff --git a/OndselSolver/PartFrame.cpp b/OndselSolver/PartFrame.cpp
index 5219bb8..b395458 100644
--- a/OndselSolver/PartFrame.cpp
+++ b/OndselSolver/PartFrame.cpp
@@ -187,7 +187,7 @@ void PartFrame::constraintsReport()
std::string str = "MbD: " + part->classname() + std::string(" ") + part->name + " has the following constraint(s) removed: ";
this->logString(str);
std::for_each(redunCons->begin(), redunCons->end(), [&](auto& con) {
- str = "MbD: " + std::string(" ") + std::string(typeid(*con).name());
+ str = "MbD: " + std::string(" ") + std::string(demangle(typeid(*con).name()));
this->logString(str);
});
}
diff --git a/OndselSolver/PosICNewtonRaphson.cpp b/OndselSolver/PosICNewtonRaphson.cpp
index b581e82..87285eb 100644
--- a/OndselSolver/PosICNewtonRaphson.cpp
+++ b/OndselSolver/PosICNewtonRaphson.cpp
@@ -17,6 +17,7 @@
#include "CREATE.h"
#include "GESpMatParPvPrecise.h"
#include "GESpMatFullPvPosIC.h"
+#include "Demangle.h"
using namespace MbD;
@@ -108,14 +109,14 @@ void PosICNewtonRaphson::handleSingularMatrix()
}
else {
auto& r = *matrixSolver;
- std::string str = typeid(r).name();
+ std::string str = demangle(typeid(r).name());
if (str.find("GESpMatParPvMarkoFast") != std::string::npos) {
matrixSolver = CREATE<GESpMatParPvPrecise>::With();
this->solveEquations();
}
else {
auto& msRef = *matrixSolver.get(); // extrapolated to suppress warning
- str = typeid(msRef).name();
+ str = demangle(typeid(msRef).name());
(void) msRef; // also for warning suppression
if (str.find("GESpMatParPvPrecise") != std::string::npos) {
this->lookForRedundantConstraints();
diff --git a/OndselSolver/Symbolic.cpp b/OndselSolver/Symbolic.cpp
index 75bcbb6..4961964 100644
--- a/OndselSolver/Symbolic.cpp
@@ -174,6 +257,46 @@ index 75bcbb6..4961964 100644
}
std::shared_ptr<std::vector<Symsptr>> Symbolic::getTerms()
diff --git a/OndselSolver/SystemNewtonRaphson.cpp b/OndselSolver/SystemNewtonRaphson.cpp
index 1a32f85..c2e5fc5 100644
--- a/OndselSolver/SystemNewtonRaphson.cpp
+++ b/OndselSolver/SystemNewtonRaphson.cpp
@@ -66,13 +66,13 @@ void SystemNewtonRaphson::basicSolveEquations()
void SystemNewtonRaphson::handleSingularMatrix()
{
auto& r = *matrixSolver;
- std::string str = typeid(r).name();
+ std::string str = demangle(typeid(r).name());
if (str.find("GESpMatParPvMarkoFast") != std::string::npos) {
matrixSolver = CREATE<GESpMatParPvPrecise>::With();
this->solveEquations();
}
else {
- str = typeid(r).name();
+ str = demangle(typeid(r).name());
if (str.find("GESpMatParPvPrecise") != std::string::npos) {
str = "MbD: Singular Matrix Error. ";
system->logString(str);
diff --git a/OndselSolver/VelSolver.cpp b/OndselSolver/VelSolver.cpp
index b62cb70..a6a03da 100644
--- a/OndselSolver/VelSolver.cpp
+++ b/OndselSolver/VelSolver.cpp
@@ -25,13 +25,13 @@ void VelSolver::basicSolveEquations()
void VelSolver::handleSingularMatrix()
{
auto& r = *matrixSolver;
- std::string str = typeid(r).name();
+ std::string str = demangle(typeid(r).name());
if (str.find("GESpMatParPvMarkoFast") != std::string::npos) {
matrixSolver = CREATE<GESpMatParPvPrecise>::With();
this->solveEquations();
}
else {
- str = typeid(r).name();
+ str = demangle(typeid(r).name());
if (str.find("GESpMatParPvPrecise") != std::string::npos) {
this->logSingularMatrixMessage();
matrixSolver->throwSingularMatrixError("VelSolver");
diff --git a/OndselSolver/CMakeLists.txt b/OndselSolver/CMakeLists.txt
index 6836e72..30d5bf4 100644
--- a/OndselSolver/CMakeLists.txt
+4
View File
@@ -11,5 +11,9 @@
</maintainer>
<upstream>
<remote-id type="github">Ondsel-Development/OndselSolver</remote-id>
<remote-id type="github">FreeCAD/OndselSolver</remote-id>
</upstream>
<use>
<flag name="tools">build the standalone OndselSolver executable</flag>
</use>
</pkgmetadata>
@@ -0,0 +1,50 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="Assembly Constraints and Multibody Dynamics code"
HOMEPAGE="https://github.com/FreeCAD/OndselSolve"
if [[ ${PV} = *9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/FreeCAD/OndselSolver.git"
else
COMMIT="3afcb30353084d402e3c34760cd662cf22d88759"
SRC_URI="
https://github.com/FreeCAD/OndselSolver/archive/${COMMIT}.tar.gz -> ${P}.tar.gz
"
S="${WORKDIR}/OndselSolver-${COMMIT}"
KEYWORDS="~amd64"
fi
LICENSE="LGPL-2.1"
SLOT="0"
IUSE="test tools"
RESTRICT="!test? ( test )"
DEPEND="test? ( dev-cpp/gtest )"
PATCHES=(
"${FILESDIR}/${PN}-1.0.1-properly-demangle-typenames.patch"
)
src_configure() {
local mycmakeargs=(
-DONDSELSOLVER_BUILD_EXE="$(usex tools)"
-DONDSELSOLVER_BUILD_TESTS="$(usex test)"
)
cmake_src_configure
}
src_test() {
local CMAKE_SKIP_TESTS=(
"^OndselSolver.runPreDragBackhoe[1-3]$"
)
cmake_src_test
}
@@ -0,0 +1,59 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="Assembly Constraints and Multibody Dynamics code"
HOMEPAGE="https://github.com/FreeCAD/OndselSolve"
if [[ ${PV} = *9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/FreeCAD/OndselSolver.git"
else
COMMIT="30e9b64e8bf881d438d4b88834f9ba3674865418"
SRC_URI="
https://github.com/FreeCAD/OndselSolver/archive/${COMMIT}.tar.gz -> ${P}.tar.gz
"
S="${WORKDIR}/OndselSolver-${COMMIT}"
KEYWORDS="~amd64"
fi
LICENSE="LGPL-2.1"
SLOT="0"
IUSE="test tools"
RESTRICT="!test? ( test )"
DEPEND="test? ( dev-cpp/gtest )"
PATCHES=(
"${FILESDIR}/${PN}-1.0.1-properly-demangle-typenames.patch"
)
src_configure() {
local mycmakeargs=(
-DONDSELSOLVER_BUILD_EXE="$(usex tools)"
-DONDSELSOLVER_BUILD_TESTS="$(usex test)"
)
cmake_src_configure
}
src_test() {
local CMAKE_SKIP_TESTS=(
"^OndselSolver.runPreDragBackhoe[1-3]$"
"^OndselSolver.sliderrunDragStep$"
"^OndselSolver.slider_issue$"
# random fails
"^OndselSolver.Gears$"
"^OndselSolver.anglejoint$"
"^OndselSolver.rackscrew$"
"^OndselSolver.planarbug$"
"^OndselSolver.piston$"
)
cmake_src_test
}