diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-01-15 06:41:45 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-01-15 06:41:45 +0000 |
commit | 8e26aeaca2a19592a9eea3917f3139bfde8641f0 (patch) | |
tree | 3ddb856d2a1de70a5caf3b8f7737425b7f8b0796 /sci-libs/ondselsolver | |
parent | 6e1fc32629c46e29012a7e22b07085307d65ac96 (diff) |
gentoo auto-resync : 15:01:2025 - 06:41:45
Diffstat (limited to 'sci-libs/ondselsolver')
4 files changed, 282 insertions, 0 deletions
diff --git a/sci-libs/ondselsolver/Manifest b/sci-libs/ondselsolver/Manifest index 0b62b60bd257..4548bc9bde14 100644 --- a/sci-libs/ondselsolver/Manifest +++ b/sci-libs/ondselsolver/Manifest @@ -1,4 +1,8 @@ +AUX ondselsolver-1.0.1-include-cstdint-gcc15.patch 1841 BLAKE2B 03215002d913a23f64e051a44f97008ac1f4c633427608afc60d7dea878e3ad1addc64880c1b000b2525d58840f617fd7cfd7926cc8a854d6a94f5dca948f244 SHA512 26120839480f726c87a3bb6e5e5820bdcbc14aed8e1e559c06ef889fbc58fc68a54a69223cff28540415d6c89bb30ad854da88d554f536c33c23280bc699bc82 +AUX ondselsolver-1.0.1-properly-demangle-typenames.patch 4470 BLAKE2B 40eeab404f18b184fcc07aa31212e048c431abbbefbc79a02e5baef9049041c26b3897dc7de1f6f9467738bd9ddf4953fd04976df5b681e80b253eb7edc4cb4a SHA512 be579378d012a428affbaab56608923933efce08066eb44bb2bf12fc6c78eb48f624f012928d08bf400efb9766846dd64296cc9c64f1a224f86471a51590ab29 AUX ondselsolver-1.0.1_p20241024-system-gtest.patch 690 BLAKE2B 2f79542081f864365dc985372c2512615fc60d248e7249e6f66e75ece093c66a257a1fb96174cb827b7919a64d85868cff180d0c5028f15364356a77870c0700 SHA512 f8c72c000664cd896ced30f1e5278e05a37534a5f614a87c42c6337b6eac321ec43615893d976754bf8cabd178d95492a0cadb2c0dd151e627f64e65702e37ff 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 EBUILD ondselsolver-1.0.1_p20241024.ebuild 927 BLAKE2B 1a93522016f5835798f3ae6f5e1b4d6e683bad686660e40b2266659e6eab8558e24c0bd50a6d07bf3bb708b19a68df3a9d62ef5287d8a98e7c1f19eba9b1dbb6 SHA512 eafc06f0a67ec6f61c01abb1e6a1b9c1ff747fb0acbf87803f49470200718d71983275f6e907cbaf0b754cf20c22900ce0f636d6253609756ec05b7c4b8a2379 +EBUILD ondselsolver-1.0.1_p20241127.ebuild 802 BLAKE2B 70432e556014b09432f2a10ce81ae6ecff5f533fb135a729e6e376258d4342dd093d50682d5184afd0b0b63ad03c361ebb823b345d232a245a0eb6e931c2dc68 SHA512 c3280277ce85bb05f7ac0544fe53fa07ca455d38e8c0c9aedc62914dfe3141a890bee5f7341cacde6f7b0885bdcb08255f65ccf212c89a5137af12787a0bdef3 MISC metadata.xml 482 BLAKE2B fdc93965db23730a66b0c65b574f5aa4cf61ddf9b245a5d6a5860b09b2b1c6e3306004e54c0aa238fd9c301e2c6b8842d37eabb5de43dacc96c40afd723eeef8 SHA512 9a83ee5dd0ba8769904e5516b5968c48ee9f59bcbbf615b91451a8c0e59ccf8871f7921691b62d3505b4c7f96c10228c0f5bff41158ddc432f73476330ba386d diff --git a/sci-libs/ondselsolver/files/ondselsolver-1.0.1-include-cstdint-gcc15.patch b/sci-libs/ondselsolver/files/ondselsolver-1.0.1-include-cstdint-gcc15.patch new file mode 100644 index 000000000000..9068c1cf2fad --- /dev/null +++ b/sci-libs/ondselsolver/files/ondselsolver-1.0.1-include-cstdint-gcc15.patch @@ -0,0 +1,70 @@ +From 432aa45ca37ecc3e15a8fb4a62ebf85b0a189775 Mon Sep 17 00:00:00 2001 +From: Paul Zander <negril.nx+gentoo@gmail.com> +Date: Sat, 11 Jan 2025 00:14:18 +0100 +Subject: [PATCH] include cstdint [gcc15] + +Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> + +diff --git a/OndselSolver/Constraint.h b/OndselSolver/Constraint.h +index 119b627..a7409a8 100644 +--- a/OndselSolver/Constraint.h ++++ b/OndselSolver/Constraint.h +@@ -8,6 +8,7 @@ + + #pragma once + ++#include <cstdint> + #include <memory> + + #include "enum.h" +diff --git a/OndselSolver/DirectionCosineConstraintIqcJqc.h b/OndselSolver/DirectionCosineConstraintIqcJqc.h +index 5d68fcd..c81a41f 100644 +--- a/OndselSolver/DirectionCosineConstraintIqcJqc.h ++++ b/OndselSolver/DirectionCosineConstraintIqcJqc.h +@@ -9,6 +9,7 @@ + #pragma once + + #include "DirectionCosineConstraintIqcJc.h" ++#include <cstdint> + + namespace MbD { + class DirectionCosineConstraintIqcJqc : public DirectionCosineConstraintIqcJc +diff --git a/OndselSolver/DispCompIecJecO.h b/OndselSolver/DispCompIecJecO.h +index 74a1ca4..da3243a 100644 +--- a/OndselSolver/DispCompIecJecO.h ++++ b/OndselSolver/DispCompIecJecO.h +@@ -9,6 +9,7 @@ + #pragma once + + #include "KinematicIeJe.h" ++#include <cstdint> + + namespace MbD { + class DispCompIecJecO : public KinematicIeJe +diff --git a/OndselSolver/FullMatrix.h b/OndselSolver/FullMatrix.h +index 1013791..90e54aa 100644 +--- a/OndselSolver/FullMatrix.h ++++ b/OndselSolver/FullMatrix.h +@@ -9,6 +9,7 @@ + #pragma once + + #include <cmath> ++#include <cstdint> + #include <memory> + + #include "RowTypeMatrix.h" +diff --git a/OndselSolver/NewtonRaphson.h b/OndselSolver/NewtonRaphson.h +index 9d9fb19..bf0c517 100644 +--- a/OndselSolver/NewtonRaphson.h ++++ b/OndselSolver/NewtonRaphson.h +@@ -8,6 +8,7 @@ + + #pragma once + ++#include <cstdint> + #include <memory> + #include <vector> + +-- +2.47.1 + diff --git a/sci-libs/ondselsolver/files/ondselsolver-1.0.1-properly-demangle-typenames.patch b/sci-libs/ondselsolver/files/ondselsolver-1.0.1-properly-demangle-typenames.patch new file mode 100644 index 000000000000..20c6533d73a9 --- /dev/null +++ b/sci-libs/ondselsolver/files/ondselsolver-1.0.1-properly-demangle-typenames.patch @@ -0,0 +1,173 @@ +From 71c1f42d85ee1819741786255dc8876047398e8e Mon Sep 17 00:00:00 2001 +From: Paul Zander <negril.nx+gentoo@gmail.com> +Date: Sun, 12 Jan 2025 19:22:48 +0100 +Subject: [PATCH] properly demangle typenames + +Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> + +diff --git a/OndselSolver/ASMTItem.cpp b/OndselSolver/ASMTItem.cpp +index a18e7c9..9d5383a 100644 +--- a/OndselSolver/ASMTItem.cpp ++++ b/OndselSolver/ASMTItem.cpp +@@ -12,6 +12,7 @@ + #include "ASMTAssembly.h" + #include "Constant.h" + #include <algorithm> ++#include "Demangle.h" + + using namespace MbD; + +@@ -41,9 +42,7 @@ void MbD::ASMTItem::noop() + + std::string MbD::ASMTItem::classname() + { +- std::string str = typeid(*this).name(); +- auto answer = str.substr(11, str.size() - 11); +- return answer; ++ return demangle(typeid(*this).name()); + } + + void MbD::ASMTItem::setName(const std::string& str) +diff --git a/OndselSolver/ASMTJoint.cpp b/OndselSolver/ASMTJoint.cpp +index 40edd52..bb710e3 100644 +--- a/OndselSolver/ASMTJoint.cpp ++++ b/OndselSolver/ASMTJoint.cpp +@@ -9,6 +9,7 @@ + + #include "ASMTJoint.h" + #include "Joint.h" ++#include "Demangle.h" + + using namespace MbD; + +@@ -47,9 +48,7 @@ void MbD::ASMTJoint::storeOnLevel(std::ofstream& os, size_t level) + + void MbD::ASMTJoint::storeOnTimeSeries(std::ofstream& os) + { +- std::string label = typeid(*this).name(); +- label = label.substr(15, label.size() - 15); +- os << label << "Series\t" << fullName("") << std::endl; ++ os << demangle(typeid(*this).name()) << "Series\t" << fullName("") << std::endl; + ASMTItemIJ::storeOnTimeSeries(os); + } + +diff --git a/OndselSolver/Array.h b/OndselSolver/Array.h +index 636e9a5..e270795 100644 +--- a/OndselSolver/Array.h ++++ b/OndselSolver/Array.h +@@ -16,6 +16,7 @@ + #include "Numeric.h" + #include <limits> + ++#include "Demangle.h" + //#include "Symbolic.h" + + namespace MbD { +@@ -51,10 +52,7 @@ namespace MbD { + void atitimes(size_t i, double factor); + + virtual std::ostream& printOn(std::ostream& s) const { +- std::string str = typeid(*this).name(); +- auto classname = str.substr(11, str.size() - 11); +- s << classname << std::endl; +- return s; ++ return s << demangle(typeid(*this).name()) << std::endl; + } + friend std::ostream& operator<<(std::ostream& s, const Array& array) + { +diff --git a/OndselSolver/Demangle.h b/OndselSolver/Demangle.h +new file mode 100644 +index 0000000..810936d +--- /dev/null ++++ b/OndselSolver/Demangle.h +@@ -0,0 +1,39 @@ ++#ifndef DEMANGLE_H ++#define DEMANGLE_H 1 ++#include <string> ++ ++#ifdef _WIN32 ++#include <typeinfo> ++namespace { ++std::string demangle(const char* mangled_name) noexcept { ++ return mangled_name; ++} ++} ++#else // __linux__ ++#include <cxxabi.h> ++namespace { ++std::string demangle(const char* mangled_name) noexcept { ++ int error = 0; ++ char *demang_name = abi::__cxa_demangle(mangled_name, 0, 0, &error); ++ ++ switch (error) { ++ case 0: ++ break; ++ case -1: ++ return "memory allocation failed"; ++ case -2: ++ return "not a valid mangled name"; ++ case -3: ++ return "invalid arguments"; ++ default: ++ return "__cxa_demangle failed"; ++ } ++ ++ std::string name(demang_name); ++ free(demang_name); ++ ++ return name.substr(name.find_last_of("::") + 1); ++} ++} ++#endif // __linux__ ++#endif +diff --git a/OndselSolver/Item.cpp b/OndselSolver/Item.cpp +index 4435d5d..120cd3c 100644 +--- a/OndselSolver/Item.cpp ++++ b/OndselSolver/Item.cpp +@@ -15,6 +15,7 @@ + #include "Item.h" + #include "System.h" + #include "Symbolic.h" ++#include "Demangle.h" + + using namespace MbD; + +@@ -44,10 +45,7 @@ void Item::initialize() + + std::ostream& Item::printOn(std::ostream& s) const + { +- std::string str = typeid(*this).name(); +- auto classname = str.substr(11, str.size() - 11); +- s << classname << std::endl; +- return s; ++ return s << demangle(typeid(*this).name()) << std::endl; + } + + void Item::initializeLocally() +diff --git a/OndselSolver/Symbolic.cpp b/OndselSolver/Symbolic.cpp +index 75bcbb6..4961964 100644 +--- a/OndselSolver/Symbolic.cpp ++++ b/OndselSolver/Symbolic.cpp +@@ -15,6 +15,7 @@ + #include "Product.h" + #include "Sum.h" + #include "Power.h" ++#include "Demangle.h" + + using namespace MbD; + +@@ -160,10 +161,7 @@ bool Symbolic::isConstant() + + std::ostream& Symbolic::printOn(std::ostream& s) const + { +- std::string str = typeid(*this).name(); +- auto classname = str.substr(11, str.size() - 11); +- s << classname; +- return s; ++ return s << demangle(typeid(*this).name()); + } + + std::shared_ptr<std::vector<Symsptr>> Symbolic::getTerms() +-- +2.48.0 + diff --git a/sci-libs/ondselsolver/ondselsolver-1.0.1_p20241127.ebuild b/sci-libs/ondselsolver/ondselsolver-1.0.1_p20241127.ebuild new file mode 100644 index 000000000000..da2e1dccd90b --- /dev/null +++ b/sci-libs/ondselsolver/ondselsolver-1.0.1_p20241127.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +COMMIT=07785b7576a0655660badd845f06ed286208da1a + +DESCRIPTION="Assembly Constraints and Multibody Dynamics code" +HOMEPAGE="https://github.com/Ondsel-Development/OndselSolver/" +SRC_URI="https://github.com/Ondsel-Development/OndselSolver/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/OndselSolver-${COMMIT}" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="test" +RESTRICT="!test? ( test )" + +DEPEND="test? ( dev-cpp/gtest )" + +PATCHES=( + "${FILESDIR}/${PN}-1.0.1_p20241024-system-gtest.patch" + "${FILESDIR}/${PN}-1.0.1-properly-demangle-typenames.patch" +) + +src_configure() { + local mycmakeargs=( + -DONDSELSOLVER_BUILD_TESTS=$(usex test) + ) + + cmake_src_configure +} |