apply upstream fix for build issue with overloaded join(), fix build against new CGAL 5.4
This commit is contained in:
parent
689c096c06
commit
1fd845a5cc
|
@ -0,0 +1,27 @@
|
||||||
|
diff -up openscad-2021.01/src/cgalutils-tess.cc.cgal-build-fix openscad-2021.01/src/cgalutils-tess.cc
|
||||||
|
--- openscad-2021.01/src/cgalutils-tess.cc.cgal-build-fix 2022-02-11 18:47:52.034828460 +0000
|
||||||
|
+++ openscad-2021.01/src/cgalutils-tess.cc 2022-02-11 18:49:37.655228014 +0000
|
||||||
|
@@ -6,10 +6,12 @@
|
||||||
|
#pragma push_macro("NDEBUG")
|
||||||
|
#undef NDEBUG
|
||||||
|
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
|
||||||
|
-#if CGAL_VERSION_NR >= CGAL_VERSION_NUMBER(4,11,0)
|
||||||
|
- #include <CGAL/Triangulation_2_projection_traits_3.h>
|
||||||
|
+#if CGAL_VERSION_NR < 1050401000
|
||||||
|
+#include <CGAL/Triangulation_2_projection_traits_3.h>
|
||||||
|
+typedef CGAL::Triangulation_2_filtered_projection_traits_3<K> Projection;
|
||||||
|
#else
|
||||||
|
- #include <CGAL/Triangulation_2_filtered_projection_traits_3.h>
|
||||||
|
+#include <CGAL/Projection_traits_3.h>
|
||||||
|
+typedef CGAL::Filtered_projection_traits_3<K> Projection;
|
||||||
|
#endif
|
||||||
|
#include <CGAL/Triangulation_face_base_with_info_2.h>
|
||||||
|
#pragma pop_macro("NDEBUG")
|
||||||
|
@@ -19,7 +21,6 @@ struct FaceInfo {
|
||||||
|
bool in_domain() { return nesting_level%2 == 1; }
|
||||||
|
};
|
||||||
|
|
||||||
|
-typedef CGAL::Triangulation_2_filtered_projection_traits_3<K> Projection;
|
||||||
|
typedef CGAL::Triangulation_face_base_with_info_2<FaceInfo, K> Fbb;
|
||||||
|
typedef CGAL::Triangulation_data_structure_2<
|
||||||
|
CGAL::Triangulation_vertex_base_2<Projection>,
|
|
@ -0,0 +1,52 @@
|
||||||
|
diff -up openscad-2021.01/src/openscad.cc.fix-overloaded-join openscad-2021.01/src/openscad.cc
|
||||||
|
--- openscad-2021.01/src/openscad.cc.fix-overloaded-join 2022-02-11 18:40:36.655669905 +0000
|
||||||
|
+++ openscad-2021.01/src/openscad.cc 2022-02-11 18:42:36.479585278 +0000
|
||||||
|
@@ -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::
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}) +
|
|
@ -1,7 +1,7 @@
|
||||||
Name: openscad
|
Name: openscad
|
||||||
Version: 2021.01
|
Version: 2021.01
|
||||||
%global upversion %{version}
|
%global upversion %{version}
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
Summary: The Programmers Solid 3D CAD Modeller
|
Summary: The Programmers Solid 3D CAD Modeller
|
||||||
# COPYING contains a linking exception for CGAL
|
# COPYING contains a linking exception for CGAL
|
||||||
# Appdata file is CC0
|
# Appdata file is CC0
|
||||||
|
@ -17,7 +17,11 @@ Patch1: %{name}-cgal5.3.patch
|
||||||
# Upstream backports:
|
# Upstream backports:
|
||||||
%global github https://github.com/openscad/openscad
|
%global github https://github.com/openscad/openscad
|
||||||
|
|
||||||
# ... no backports now ...
|
# https://github.com/openscad/openscad/commit/9b79576c1ee9d57d0f4a5de5c1365bb87c548f36
|
||||||
|
Patch2: %{name}-2021.01-fix-overloaded-join.patch
|
||||||
|
# https://github.com/openscad/openscad/commit/71f2831c0484c3f35cbf44e1d1dc2c857384100b
|
||||||
|
Patch3: %{name}-2021.01-cgal-build-fix.patch
|
||||||
|
|
||||||
|
|
||||||
BuildRequires: CGAL-devel >= 3.6
|
BuildRequires: CGAL-devel >= 3.6
|
||||||
BuildRequires: ImageMagick
|
BuildRequires: ImageMagick
|
||||||
|
@ -220,6 +224,10 @@ cd -
|
||||||
%{_datadir}/%{name}/libraries/MCAD/bitmap/*.scad
|
%{_datadir}/%{name}/libraries/MCAD/bitmap/*.scad
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 11 2022 Tom Callaway <spot@fedoraproject.org> - 2021.01-7
|
||||||
|
- apply upstream fix for build issue with overloaded join()
|
||||||
|
- fix build against new CGAL 5.4
|
||||||
|
|
||||||
* Thu Feb 10 2022 Orion Poplawski <orion@nwra.com> - 2021.01-6
|
* Thu Feb 10 2022 Orion Poplawski <orion@nwra.com> - 2021.01-6
|
||||||
- Rebuild for glew 2.2
|
- Rebuild for glew 2.2
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue