forked from pool/openscad
- Disable build with GCAL-5.4 or newer.
Upstream has dropped pre-cgal-5.0 support and with that, reworked CGAL integration fully. Backporting relevant patches does not make sense. - Add patch to fix compilation with CGAL-5.4 + fix_build_with_cgal-5.4.patch - Add patch to fix compilation with newer Boost versions + fix_build_issue_with_overloaded_join.patch Constraint memoryperjob is allowing too small workers for OBS-URL: https://build.opensuse.org/package/show/graphics/openscad?expand=0&rev=45
This commit is contained in:
parent
506f7ea3e8
commit
76ec0815d7
59
fix_build_issue_with_overloaded_join.patch
Normal file
59
fix_build_issue_with_overloaded_join.patch
Normal file
@ -0,0 +1,59 @@
|
||||
commit 9b79576c1ee9d57d0f4a5de5c1365bb87c548f36
|
||||
Author: Torsten Paul <Torsten.Paul@gmx.de>
|
||||
Date: Wed Feb 2 00:50:43 2022 +0100
|
||||
Subject: Fix build issue with overloaded join().
|
||||
Upstream: yes
|
||||
|
||||
Index: openscad-2021.01/src/openscad.cc
|
||||
===================================================================
|
||||
--- openscad-2021.01.orig/src/openscad.cc
|
||||
+++ openscad-2021.01/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::
|
||||
}
|
||||
|
||||
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;
|
||||
}) +
|
@ -6,11 +6,11 @@ Subject: Upstream patch to fix build with cgal-5.3.
|
||||
|
||||
Fix build failure with "generic_print_polyhedron" on CGAL-5.3.
|
||||
|
||||
diff --git a/src/cgalutils-polyhedron.cc b/src/cgalutils-polyhedron.cc
|
||||
index 0e5c72c36..14bddb7f4 100644
|
||||
--- a/src/cgalutils-polyhedron.cc
|
||||
+++ b/src/cgalutils-polyhedron.cc
|
||||
@@ -335,19 +335,6 @@ namespace CGALUtils {
|
||||
Index: openscad-2021.01/src/cgalutils-polyhedron.cc
|
||||
===================================================================
|
||||
--- openscad-2021.01.orig/src/cgalutils-polyhedron.cc
|
||||
+++ openscad-2021.01/src/cgalutils-polyhedron.cc
|
||||
@@ -337,19 +337,6 @@ namespace CGALUtils {
|
||||
}
|
||||
};
|
||||
|
||||
@ -30,11 +30,11 @@ index 0e5c72c36..14bddb7f4 100644
|
||||
}; // namespace CGALUtils
|
||||
|
||||
#endif /* ENABLE_CGAL */
|
||||
diff --git a/src/cgalutils.h b/src/cgalutils.h
|
||||
index 231762ebc..7da5a25ca 100644
|
||||
--- a/src/cgalutils.h
|
||||
+++ b/src/cgalutils.h
|
||||
@@ -33,7 +33,6 @@ namespace CGALUtils {
|
||||
Index: openscad-2021.01/src/cgalutils.h
|
||||
===================================================================
|
||||
--- openscad-2021.01.orig/src/cgalutils.h
|
||||
+++ openscad-2021.01/src/cgalutils.h
|
||||
@@ -45,7 +45,6 @@ namespace CGALUtils {
|
||||
bool is_approximately_convex(const PolySet &ps);
|
||||
Geometry const* applyMinkowski(const Geometry::Geometries &children);
|
||||
|
||||
|
22
fix_build_with_cgal-5.4.patch
Normal file
22
fix_build_with_cgal-5.4.patch
Normal file
@ -0,0 +1,22 @@
|
||||
Date: Sun, 03 Apr 2022 11:15:44 +0300
|
||||
Subject: Fix build with CGAL-5.4
|
||||
Upstream: modified from upstream commits
|
||||
- c32efe043a65b7fd761751c8edb56f8deb6a9ed5
|
||||
- 71f2831c0484c3f35cbf44e1d1dc2c857384100b
|
||||
|
||||
Index: openscad-2021.01/src/cgalutils-tess.cc
|
||||
===================================================================
|
||||
--- openscad-2021.01.orig/src/cgalutils-tess.cc
|
||||
+++ openscad-2021.01/src/cgalutils-tess.cc
|
||||
@@ -6,7 +6,10 @@
|
||||
#pragma push_macro("NDEBUG")
|
||||
#undef NDEBUG
|
||||
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
|
||||
-#if CGAL_VERSION_NR >= CGAL_VERSION_NUMBER(4,11,0)
|
||||
+#if CGAL_VERSION_NR >= CGAL_VERSION_NUMBER(5,4,0)
|
||||
+#include <CGAL/Projection_traits_3.h>
|
||||
+typedef CGAL::Filtered_projection_traits_3<K> Projection;
|
||||
+#elif CGAL_VERSION_NR >= CGAL_VERSION_NUMBER(4,11,0)
|
||||
#include <CGAL/Triangulation_2_projection_traits_3.h>
|
||||
#else
|
||||
#include <CGAL/Triangulation_2_filtered_projection_traits_3.h>
|
@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Apr 3 07:42:33 UTC 2022 - Samu Voutilainen <smar@smar.fi>
|
||||
|
||||
- Disable build with GCAL-5.4 or newer.
|
||||
Upstream has dropped pre-cgal-5.0 support and with that, reworked
|
||||
CGAL integration fully. Backporting relevant patches does not
|
||||
make sense.
|
||||
- Add patch to fix compilation with CGAL-5.4
|
||||
+ fix_build_with_cgal-5.4.patch
|
||||
- Add patch to fix compilation with newer Boost versions
|
||||
+ fix_build_issue_with_overloaded_join.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 6 19:02:05 UTC 2022 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
@ -16,7 +28,7 @@ Fri Aug 27 07:43:42 UTC 2021 - Samu Voutilainen <smar@smar.fi>
|
||||
Sat May 8 07:00:15 UTC 2021 - Samu Voutilainen <smar@smar.fi>
|
||||
|
||||
- Reintroduce memory-contraints macro %limit_build -m 2500.
|
||||
Constraint memoryperjob is allowing too small workers for
|
||||
Constraint memoryperjob is allowing too small workers for
|
||||
the jobs it provides.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
@ -27,6 +27,8 @@ Source: https://files.openscad.org/%{name}-%{version}.src.tar.gz
|
||||
Patch1: fix_build_with_cgal-5.3.patch
|
||||
Patch2: CVE-2022-0496.patch
|
||||
Patch3: CVE-2022-0497.patch
|
||||
Patch4: fix_build_with_cgal-5.4.patch
|
||||
Patch5: fix_build_issue_with_overloaded_join.patch
|
||||
BuildRequires: bison
|
||||
BuildRequires: double-conversion-devel
|
||||
BuildRequires: eigen3-devel
|
||||
@ -39,7 +41,10 @@ BuildRequires: libboost_filesystem-devel
|
||||
BuildRequires: libboost_program_options-devel
|
||||
BuildRequires: libboost_regex-devel
|
||||
BuildRequires: libboost_thread-devel
|
||||
BuildRequires: libcgal-devel
|
||||
# Upstream has dropped pre-cgal-5.0 support and with that, reworked
|
||||
# CGAL integration fully.
|
||||
# Backporting relevant patches does not make sense.
|
||||
BuildRequires: libcgal-devel < 5.4
|
||||
BuildRequires: libqscintilla-qt5-devel
|
||||
BuildRequires: libspnav-devel
|
||||
BuildRequires: memory-constraints
|
||||
@ -69,6 +74,8 @@ aspects, e.g. modelling of machine parts.
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
|
||||
%build
|
||||
%qmake5 PREFIX=%{_prefix} CONFIG+=qopenglwidget CONFIG+=c++14
|
||||
|
Loading…
x
Reference in New Issue
Block a user