diff options
author | Guillaume Le Vaillant <glv@posteo.net> | 2024-08-22 15:30:32 +0200 |
---|---|---|
committer | Guillaume Le Vaillant <glv@posteo.net> | 2024-08-22 15:34:12 +0200 |
commit | 6bec6c20b6b18dc173383a6828f1bb84314f986b (patch) | |
tree | 4451821834a05e5d8139296570586eca1137e2f5 /gnu/packages/patches/openscad-fix-boost-join.patch | |
parent | 645cb9b6f609a6e399437d2c76f9b61b8e6dd7a3 (diff) |
gnu: openscad: Fix build.
Fixes <https://issues.guix.gnu.org/72693>.
* gnu/packages/patches/openscad-fix-boost-join.patch: New file.
* gnu/packages/patches/openscad-with-cgal-5.3.patch: New file.
* gnu/packages/patches/openscad-with-cgal-5.4.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register new patches.
* gnu/packages/engineering.scm (openscad)[source]: Use new patches.
[inputs, native-inputs]: Remove labels.
[arguments]: Disable a few more tests. Remove trailing booleans.
Change-Id: I3ce103afd8669dd68c95352a87d76994a3f08504
Diffstat (limited to 'gnu/packages/patches/openscad-fix-boost-join.patch')
-rw-r--r-- | gnu/packages/patches/openscad-fix-boost-join.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/gnu/packages/patches/openscad-fix-boost-join.patch b/gnu/packages/patches/openscad-fix-boost-join.patch new file mode 100644 index 0000000000..1347c2746a --- /dev/null +++ b/gnu/packages/patches/openscad-fix-boost-join.patch @@ -0,0 +1,62 @@ +From 08bf69b4115c989fc5671254e0d05735d01bcca5 Mon Sep 17 00:00:00 2001 +From: Torsten Paul <Torsten.Paul@gmx.de> +Date: Wed, 2 Feb 2022 00:50:43 +0100 +Subject: [PATCH] Fix build issue with overloaded join(). + +--- + src/openscad.cc | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +diff --git a/src/openscad.cc b/src/openscad.cc +index a6f648d2a2..3c46cda2af 100644 +--- a/src/openscad.cc ++++ b/src/openscad.cc +@@ -65,7 +65,6 @@ + #include <chrono> + #include <boost/algorithm/string.hpp> + #include <boost/algorithm/string/split.hpp> +-#include <boost/algorithm/string/join.hpp> + #include <boost/range/adaptor/transformed.hpp> + #include <boost/program_options.hpp> + #include <boost/filesystem.hpp> +@@ -307,7 +306,7 @@ void set_render_color_scheme(const std::string color_scheme, const bool exit_if_ + } + + if (exit_if_not_found) { +- LOG(message_group::None,Location::NONE,"",(boost::join(ColorMap::inst()->colorSchemeNames(), "\n"))); ++ LOG(message_group::None,Location::NONE,"",(boost::algorithm::join(ColorMap::inst()->colorSchemeNames(), "\n"))); + + exit(1); + } else { +@@ -885,7 +884,7 @@ struct CommaSeparatedVector + }; + + template <class Seq, typename ToString> +-std::string join(const Seq &seq, const std::string &sep, const ToString &toString) ++std::string str_join(const Seq &seq, const std::string &sep, const ToString &toString) + { + return boost::algorithm::join(boost::adaptors::transform(seq, toString), sep); + } +@@ -947,7 +946,7 @@ int main(int argc, char **argv) + ("P,P", po::value<string>(), "customizer parameter set") + #ifdef ENABLE_EXPERIMENTAL + ("enable", po::value<vector<string>>(), ("enable experimental features: " + +- join(boost::make_iterator_range(Feature::begin(), Feature::end()), " | ", ++ str_join(boost::make_iterator_range(Feature::begin(), Feature::end()), " | ", + [](const Feature *feature) { + return feature->get_name(); + }) + +@@ -964,11 +963,11 @@ int main(int argc, char **argv) + ("render", po::value<string>()->implicit_value(""), "for full geometry evaluation when exporting png") + ("preview", po::value<string>()->implicit_value(""), "[=throwntogether] -for ThrownTogether preview png") + ("animate", po::value<unsigned>(), "export N animated frames") +- ("view", po::value<CommaSeparatedVector>(), ("=view options: " + boost::join(viewOptions.names(), " | ")).c_str()) ++ ("view", po::value<CommaSeparatedVector>(), ("=view options: " + boost::algorithm::join(viewOptions.names(), " | ")).c_str()) + ("projection", po::value<string>(), "=(o)rtho or (p)erspective when exporting png") + ("csglimit", po::value<unsigned int>(), "=n -stop rendering at n CSG elements when exporting png") + ("colorscheme", po::value<string>(), ("=colorscheme: " + +- join(ColorMap::inst()->colorSchemeNames(), " | ", ++ str_join(ColorMap::inst()->colorSchemeNames(), " | ", + [](const std::string& colorScheme) { + return (colorScheme == ColorMap::inst()->defaultColorSchemeName() ? "*" : "") + colorScheme; + }) + |