- build with C++17 version. Needed by cgal 6.

OBS-URL: https://build.opensuse.org/package/show/graphics/openscad?expand=0&rev=50
This commit is contained in:
Samu Voutilainen 2025-01-15 14:38:56 +00:00 committed by Git OBS Bridge
commit 172c029608
12 changed files with 703 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

76
CVE-2022-0496.patch Normal file
View File

@ -0,0 +1,76 @@
From 00a4692989c4e2f191525f73f24ad8727bacdf41 Mon Sep 17 00:00:00 2001
From: Torsten Paul <Torsten.Paul@gmx.de>
Date: Sat, 5 Feb 2022 18:38:31 +0100
Subject: [PATCH] CVE-2022-0496 Out-of-bounds memory access in DXF loader.
Public issue:
https://github.com/openscad/openscad/issues/4037
Fix in master branch:
https://github.com/openscad/openscad/pull/4090
---
src/dxfdata.cc | 27 +++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/src/dxfdata.cc b/src/dxfdata.cc
index 2bb7236746..aa6b6f3976 100644
--- a/src/dxfdata.cc
+++ b/src/dxfdata.cc
@@ -441,6 +441,11 @@ DxfData::DxfData(double fn, double fs, double fa,
auto lv = grid.data(this->points[lines[idx].idx[j]][0], this->points[lines[idx].idx[j]][1]);
for (size_t ki = 0; ki < lv.size(); ++ki) {
int k = lv.at(ki);
+ if (k < 0 || k >= lines.size()) {
+ LOG(message_group::Warning,Location::NONE,"",
+ "Bad DXF line index in %1$s.",QuotedString(boostfs_uncomplete(filename, fs::current_path()).generic_string()));
+ continue;
+ }
if (k == idx || lines[k].disabled) continue;
goto next_open_path_j;
}
@@ -466,13 +471,20 @@ DxfData::DxfData(double fn, double fs, double fa,
auto lv = grid.data(ref_point[0], ref_point[1]);
for (size_t ki = 0; ki < lv.size(); ++ki) {
int k = lv.at(ki);
+ if (k < 0 || k >= lines.size()) {
+ LOG(message_group::Warning,Location::NONE,"",
+ "Bad DXF line index in %1$s.",QuotedString(boostfs_uncomplete(filename, fs::current_path()).generic_string()));
+ continue;
+ }
if (lines[k].disabled) continue;
- if (grid.eq(ref_point[0], ref_point[1], this->points[lines[k].idx[0]][0], this->points[lines[k].idx[0]][1])) {
+ auto idk0 = lines[k].idx[0]; // make it easier to read and debug
+ auto idk1 = lines[k].idx[1];
+ if (grid.eq(ref_point[0], ref_point[1], this->points[idk0][0], this->points[idk0][1])) {
current_line = k;
current_point = 0;
goto found_next_line_in_open_path;
}
- if (grid.eq(ref_point[0], ref_point[1], this->points[lines[k].idx[1]][0], this->points[lines[k].idx[1]][1])) {
+ if (grid.eq(ref_point[0], ref_point[1], this->points[idk1][0], this->points[idk1][1])) {
current_line = k;
current_point = 1;
goto found_next_line_in_open_path;
@@ -501,13 +513,20 @@ DxfData::DxfData(double fn, double fs, double fa,
auto lv = grid.data(ref_point[0], ref_point[1]);
for (size_t ki = 0; ki < lv.size(); ++ki) {
int k = lv.at(ki);
+ if (k < 0 || k >= lines.size()) {
+ LOG(message_group::Warning,Location::NONE,"",
+ "Bad DXF line index in %1$s.",QuotedString(boostfs_uncomplete(filename, fs::current_path()).generic_string()));
+ continue;
+ }
if (lines[k].disabled) continue;
- if (grid.eq(ref_point[0], ref_point[1], this->points[lines[k].idx[0]][0], this->points[lines[k].idx[0]][1])) {
+ auto idk0 = lines[k].idx[0]; // make it easier to read and debug
+ auto idk1 = lines[k].idx[1];
+ if (grid.eq(ref_point[0], ref_point[1], this->points[idk0][0], this->points[idk0][1])) {
current_line = k;
current_point = 0;
goto found_next_line_in_closed_path;
}
- if (grid.eq(ref_point[0], ref_point[1], this->points[lines[k].idx[1]][0], this->points[lines[k].idx[1]][1])) {
+ if (grid.eq(ref_point[0], ref_point[1], this->points[idk1][0], this->points[idk1][1])) {
current_line = k;
current_point = 1;
goto found_next_line_in_closed_path;

27
CVE-2022-0497.patch Normal file
View File

@ -0,0 +1,27 @@
From 84addf3c1efbd51d8ff424b7da276400bbfa1a4b Mon Sep 17 00:00:00 2001
From: Torsten Paul <Torsten.Paul@gmx.de>
Date: Sat, 5 Feb 2022 18:45:29 +0100
Subject: [PATCH] CVE-2022-0497 Out-of-bounds memory access in comment parser.
Public issue:
https://github.com/openscad/openscad/issues/4043
Fix in master branch:
https://github.com/openscad/openscad/pull/4044
---
src/comment.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/comment.cpp b/src/comment.cpp
index f02ad2c5f6..1ce3ab547b 100644
--- a/src/comment.cpp
+++ b/src/comment.cpp
@@ -92,7 +92,7 @@ static std::string getComment(const std::string &fulltext, int line)
}
int end = start + 1;
- while (fulltext[end] != '\n') end++;
+ while (end < fulltext.size() && fulltext[end] != '\n') end++;
std::string comment = fulltext.substr(start, end - start);

16
_constraints Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<constraints>
<hardware>
<physicalmemory>
<size unit="G">3</size>
</physicalmemory>
<memory>
<size unit="G">5</size>
</memory>
<!--
<memoryperjob>
<size unit="M">2500</size>
</memoryperjob>
-->
</hardware>
</constraints>

View 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;
}) +

View File

@ -0,0 +1,44 @@
commit cc49ad8dac24309f5452d5dea9abd406615a52d9
Author: Jordan Brown <github@jordan.maileater.net>
Date: Sun Jul 18 21:01:46 2021 -0700
Upstream: merged
Subject: Upstream patch to fix build with cgal-5.3.
Fix build failure with "generic_print_polyhedron" on CGAL-5.3.
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 {
}
};
- template <typename Polyhedron>
- std::string printPolyhedron(const Polyhedron &p) {
- std::ostringstream sstream;
- sstream.precision(20);
-
- Polyhedron_writer writer;
- generic_print_polyhedron(sstream, p, writer);
-
- return sstream.str();
- }
-
- template std::string printPolyhedron(const CGAL_Polyhedron &p);
-
}; // namespace CGALUtils
#endif /* ENABLE_CGAL */
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);
- template <typename Polyhedron> std::string printPolyhedron(const Polyhedron &p);
template <typename Polyhedron> bool createPolySetFromPolyhedron(const Polyhedron &p, PolySet &ps);
template <typename Polyhedron> bool createPolyhedronFromPolySet(const PolySet &ps, Polyhedron &p);
template <class Polyhedron_A, class Polyhedron_B>

View File

@ -0,0 +1,34 @@
Date: Sun, 03 Apr 2022 11:15:44 +0300
Subject: Fix build with CGAL-5.4
Upstream: modified from upstream commits
- c32efe043a65b7fd761751c8edb56f8deb6a9ed5
- 71f2831c0484c3f35cbf44e1d1dc2c857384100b
diff --git a/src/cgalutils-tess.cc b/src/cgalutils-tess.cc
index ec1cc1e..fb709fc 100644
--- a/src/cgalutils-tess.cc
+++ b/src/cgalutils-tess.cc
@@ -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 < CGAL_VERSION_NUMBER(5, 4, 0)
+#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>,

12
fix_fs_error.patch Normal file
View File

@ -0,0 +1,12 @@
diff '--color=auto' -Naur openscad-2021.01.orig/src/FileModule.cc openscad-2021.01/src/FileModule.cc
--- openscad-2021.01.orig/src/FileModule.cc 2024-05-27 11:57:04.154249159 +0100
+++ openscad-2021.01/src/FileModule.cc 2024-05-27 11:52:36.324609857 +0100
@@ -65,7 +65,7 @@
auto ext = fs::path(path).extension().generic_string();
if (boost::iequals(ext, ".otf") || boost::iequals(ext, ".ttf")) {
- if (fs::is_regular(path)) {
+ if (fs::is_regular_file(path)) {
FontCache::instance()->register_font_file(path);
} else {
LOG(message_group::Error,Location::NONE,"","Can't read font with path '%1$s'",path);

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d938c297e7e5f65dbab1461cac472fc60dfeaa4999ea2c19b31a4184f2d70359
size 15817555

289
openscad.changes Normal file
View File

@ -0,0 +1,289 @@
-------------------------------------------------------------------
Mon Dec 30 15:59:12 UTC 2024 - Torsten Gruner <simmphonie@opensuse.org>
- build with C++17 version. Needed by cgal 6.
-------------------------------------------------------------------
Mon May 27 11:42:51 UTC 2024 - George <georgewoodall82@gmail.com>
- Add patch to fix is_regular is not a member of fs
+ fix_fs_error.patch
-------------------------------------------------------------------
Mon Jul 4 10:02:04 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
- Rebase fix_build_with_cgal-5.4.patch
- Spec cleanup
-------------------------------------------------------------------
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>
- Add patch to fix out-of-bounds memory access in DXF loader
+ CVE-2022-0496.patch (boo#1195568, CVE-2022-0496)
- Add patch to fix out-of-bounds memory access in comment parser
+ CVE-2022-0497.patch (boo#1195567, CVE-2022-0497)
-------------------------------------------------------------------
Fri Aug 27 07:43:42 UTC 2021 - Samu Voutilainen <smar@smar.fi>
- Added patch fix_build_with_cgal-5.3.patch.
Upstream patch to fix build with CGAL-5.3.
-------------------------------------------------------------------
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
the jobs it provides.
-------------------------------------------------------------------
Thu May 6 05:08:29 UTC 2021 - Samu Voutilainen <smar@smar.fi>
- Increased memoryperjob constraint to 2500 MB.
-------------------------------------------------------------------
Tue Apr 20 11:48:29 UTC 2021 - Samu Voutilainen <smar@smar.fi>
- Update to 2021.1 release
+ Language Features
* New
Add function literals
Add exponent function (e.g. 2^3)
Add convexity parameter to resize()
Add support for generic tail recursion
Add $vpf for viewport field of view
Add warnings for ranges with begin < end
Add warnings for matrix structure problems
* Changed
Allow random seeds to stick between rands() calls
Make comparison operators on mixed types return undef
Track reason for values turning undef
* Fixed
Fix Range precision
Fix empty geometry handling
Fix search order for imported modules
Improve internal handling of data values
Improve performance of array concatenation
Improve float accuracy of mirror matrix calculation
Improve polygon and polyhedron warnings/errors
+ Program Features
* GUI
Add jump to source code from 3D preview
Add Error-Log window for tracking errors and warnings
Add window menu to allow keyboard access to all docked windows
Enable default binary stl output, and ascii option
Show message in console when caches are flushed
Disable HTML rendering in console
Enable color scheme for CGAL 2D render
Simplified OpenCSG edge shader, with added smoothing
New and updated translations: Chinese, Armenian, French, Russian, Polish, German
* Editor
Edit multiple files in tabs
Switch tabs via Ctrl+Tab / Ctrl+Shift+Tab
Modify numbers via mouse scroll (when holding ALT)
Add auto-complete & call-tips for built-ins
Add configurable code snippets
Add (line) bookmarks
Add jump to error
Add support for line/block copy and move
Add convenience context menu to tab header
Open include<>/use<> files via inline link
Fix search highlight for utf8 text
Fix display of matches in search field
Add Find/Find Next/Find Previous to editor context menu
* Command line
Support reading scripts from STDIN
Support export to STDOUT
Add multi-export on command line
Add --animate command line option
Add --export-format command line option
Allow view-port variables in command-line mode
Allow export to .ast, .csg, .echo and .term in preview mode
Print statistics in cmdline mode as in GUI
* General
Add PDF export (single page only)
Add support for line-cap and line-join in SVG import
Add support stroke-linejoin in SVG import
Change CGAL Union to join least complex geometries first
Install start shortcut for all users on Windows
Install icons with defined sizes (e.g. required by flathub)
Switch to C++14 and allow usage of header-only CGAL
Add support for lib3MF v2.0 API
Update AppStream release info
- Ran spec through spec-cleaner
- removed boost_include.diff (upstream)
-------------------------------------------------------------------
Tue Oct 6 12:05:11 UTC 2020 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- openGL is required but Arm uses openGL ES, so exclude %arm
and aarch64
-------------------------------------------------------------------
Fri Oct 2 08:10:59 UTC 2020 - Dirk Stoecker <opensuse@dstoecker.de>
- fix build with new C++ compilers, add boost_include.diff
-------------------------------------------------------------------
Thu Aug 20 09:03:01 UTC 2020 - Martin Liška <mliska@suse.cz>
- Use memoryperjob constraint instead of %limit_build macro.
-------------------------------------------------------------------
Sun Mar 22 07:56:55 UTC 2020 - Christophe Giboudeaux <christophe@krop.fr>
- Explicitly require libboost_thread-devel for building openscad.
-------------------------------------------------------------------
Mon Jun 24 20:06:33 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Update to 2019.05 release
+ Language Features:
* New modules
assert() - stop script evaluation on failed constraints
let() - scoped assignment
* New functions
ord() - convert from character to Unicode code point
echo()
assert() - stop script evaluation on failed constraints
Type testing functions: is_undef(), is_list(), is_num(), is_bool(), is_string()
* New special variable: $preview variable which is set to true in preview mode
* List comprehension updates
Added if/else condition
Added each keyword
Added C-style for loop
Now allows looping over characters of a string
* rotate_extrude(): Added angle parameter to
* import() now supports SVG, 3MF and AMF
* color() now supports hex color codes
* Removed glide() and subdiv() which were never implemented
+ Program Features:
* Customizer: Allow parametrizing design parameters with GUI customization
* Support for using 3D-Mouse / Joystick / Gamepad input devices for controlling the 3D view
* 3D Printing support: Purchase from a print service partner or print to Octoprint
* New export file formats: SVG, 3MF, AMF
* Quick-edit and preview of values using Alt-Arrows (Shift-Alt-Arrows on macOS)
* Added --view cmd-line parameter
* Play sound notification on render complete
* Line numbers and filenames are now shown for many errors and warnings
* Hardwarning preference: Stop on first warning
* Hardwarning and assert now shows a stack trace
* New warnings
Module call parameterns don't match module declaration
Argument value of of range
Duplicate passed argument
Children passed to module not accepting children
Reference to inknown $special_variables
Duplicate assigment
* New translations: Ukrainian, Polish
- Updated BuildRequires:
- Drop glew-devel and some boost headers
- Add libspnav for 3D mouse, Qt5Multimedia for notifications
- Cleanup spec file, remove conditionals for Fedora (still targeting EOLed Qt4)
- Drop upstream patches:
openscad-git4fa5f0340a.patch
openscad-git_c68684f9520d.patch
-------------------------------------------------------------------
Wed Mar 20 00:14:44 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Cleanup BuildRequires, sort, remove duplicates
- Fix Url:, openscad.org redirects to www.openscad.org
- Add openscad-git_c68684f9520d.patch, fix build with Boost 1.69
- Use %license, remove %defattr
-------------------------------------------------------------------
Fri Dec 15 02:12:01 UTC 2017 - plinnell@opensuse.org
- Fix the BuildRequires to fix build on Factory/TW
-------------------------------------------------------------------
Tue Jun 13 07:59:42 UTC 2017 - idonmez@suse.com
- Change license to GPL-3.0+, see
https://github.com/openscad/openscad/issues/2059
-------------------------------------------------------------------
Thu Apr 27 11:25:47 UTC 2017 - jengelh@inai.de
- Remove useless %clean section
- Trim description
-------------------------------------------------------------------
Sun Jan 15 15:02:33 UTC 2017 - herbert@graeber-clan.de
- Add patch openscad-git4fa5f0340a.patch from upstream, to fix
build with newer Qt5 and gcc versions
-------------------------------------------------------------------
Thu Dec 22 23:39:01 UTC 2016 - herbert@graeber-clan.de
- Switch to Qt5
-------------------------------------------------------------------
Thu Nov 19 13:31:52 UTC 2015 - prusnak@opensuse.org
- updated to 2015.03-2
-------------------------------------------------------------------
Tue Apr 21 21:15:27 UTC 2015 - prusnak@opensuse.org
- updated to 2015.03-1
-------------------------------------------------------------------
Wed Mar 11 10:48:57 UTC 2015 - prusnak@opensuse.org
- updated to 2015.03
-------------------------------------------------------------------
Wed Mar 10 00:31:52 UTC 2014 - prusnak@opensuse.org
- updated to 2014.03
-------------------------------------------------------------------
Wed Jun 19 09:14:01 UTC 2013 - prusnak@opensuse.org
- updated to 2013.06
-------------------------------------------------------------------
Sat Jan 19 13:45:01 UTC 2013 - prusnak@opensuse.org
- updated to 2013.01
-------------------------------------------------------------------
Fri Nov 23 12:52:11 UTC 2012 - prusnak@opensuse.org
- fix build (glu.patch)
-------------------------------------------------------------------
Sun Jan 8 16:40:47 UTC 2012 - prusnak@opensuse.org
- updated to 2011.12
-------------------------------------------------------------------
Wed Sep 7 12:11:13 UTC 2011 - prusnak@opensuse.org
- updated to 2011.06
-------------------------------------------------------------------
Fri May 13 14:46:17 UTC 2011 - prusnak@opensuse.org
- updated to 2011.04
-------------------------------------------------------------------
Wed Oct 13 13:19:53 UTC 2010 - prusnak@opensuse.org
- created package (2010.05)

119
openscad.spec Normal file
View File

@ -0,0 +1,119 @@
#
# spec file for package openscad
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%if 0%{suse_version} < 1600
%define gccver 13
%endif
Name: openscad
Version: 2021.01
Release: 0
Summary: Programmers Solid 3D CAD Modeller
License: GPL-3.0-or-later
Group: Productivity/Graphics/CAD
URL: https://www.openscad.org/
Source: https://files.openscad.org/%{name}-%{version}.src.tar.gz
Patch0: fix_build_with_cgal-5.3.patch
Patch1: CVE-2022-0496.patch
Patch2: CVE-2022-0497.patch
Patch3: fix_build_with_cgal-5.4.patch
Patch4: fix_build_issue_with_overloaded_join.patch
Patch5: fix_fs_error.patch
BuildRequires: bison
BuildRequires: double-conversion-devel
BuildRequires: flex
BuildRequires: gcc%{?gccver}-c++
BuildRequires: libboost_filesystem-devel
BuildRequires: libboost_program_options-devel
BuildRequires: libboost_regex-devel
BuildRequires: libboost_thread-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.0
BuildRequires: libqscintilla-qt5-devel
BuildRequires: libspnav-devel
BuildRequires: memory-constraints
BuildRequires: opencsg-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Gamepad)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Multimedia)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5OpenGL)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(cairo) > 1.14
BuildRequires: pkgconfig(eigen3)
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(harfbuzz)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(libzip)
# With v2019.05, openGL is required but Arm uses openGL ES
ExcludeArch: %{arm} aarch64
%description
OpenSCAD is a software for creating solid 3D CAD objects. It does not
focus on the artistic aspects of 3D modelling and does not target the
creation of, say, computer-animated movies, but instead on the CAD
aspects, e.g. modelling of machine parts.
%prep
%autosetup -p1
# build with C++17
sed -i "s|c++14 strict_c++|c++17 strict_c++|g" c++std.pri
sed -i "s|Using C++14|Using C++17|g" c++std.pri
sed -i "s|set(CMAKE_CXX_STANDARD 14)|set(CMAKE_CXX_STANDARD 17)|g" CMakeLists.txt
%build
%qmake5 %{?gccver:QMAKE_CC=gcc-%{gccver} QMAKE_CXX=g++-%{gccver}} \
PREFIX=%{_prefix} CONFIG+=qopenglwidget
# As of 08.05.2021, memoryperjob constraint is not working correctly,
# so limit memory per job here.
%limit_build -m 2500
%make_build
%install
%qmake5_install
install -D -m 0644 doc/openscad.1 %{buildroot}%{_mandir}/man1/openscad.1
# remove bundled liberation fonts
rm -r %{buildroot}%{_datadir}/openscad/fonts
%find_lang %{name}
rm %{buildroot}%{_datadir}/openscad/libraries/MCAD/.gitignore
%files -f %{name}.lang
%dir %{_datadir}/metainfo
%doc README.md doc/*.pdf
%license COPYING
%{_bindir}/openscad
%{_datadir}/applications/openscad.desktop
%{_datadir}/icons/hicolor/
%{_datadir}/metainfo/org.openscad.OpenSCAD.appdata.xml
%{_datadir}/mime/packages/openscad.xml
%{_datadir}/openscad/
%{_mandir}/man1/*
%changelog