diff --git a/packages/o/openscad/.files b/packages/o/openscad/.files
index 9b08279d081..92a604db1cc 100644
Binary files a/packages/o/openscad/.files and b/packages/o/openscad/.files differ
diff --git a/packages/o/openscad/.rev b/packages/o/openscad/.rev
index d20488c6973..81bdf4ca59b 100644
--- a/packages/o/openscad/.rev
+++ b/packages/o/openscad/.rev
@@ -107,4 +107,12 @@
1177828
+
+ 108a177d4e633df4ff12bb2e306e417e
+ 2021.01
+
+ anag+factory
+
+ 1238079
+
diff --git a/packages/o/openscad/openscad.changes b/packages/o/openscad/openscad.changes
index df9ee6a666d..c6de1872683 100644
--- a/packages/o/openscad/openscad.changes
+++ b/packages/o/openscad/openscad.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Mon Dec 30 15:59:12 UTC 2024 - Torsten Gruner
+
+- build with C++17 version. Needed by cgal 6.
+
-------------------------------------------------------------------
Mon May 27 11:42:51 UTC 2024 - George
diff --git a/packages/o/openscad/openscad.spec b/packages/o/openscad/openscad.spec
index 1f945afe434..6731c9e96b9 100644
--- a/packages/o/openscad/openscad.spec
+++ b/packages/o/openscad/openscad.spec
@@ -15,7 +15,9 @@
# 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
@@ -33,7 +35,7 @@ Patch5: fix_fs_error.patch
BuildRequires: bison
BuildRequires: double-conversion-devel
BuildRequires: flex
-BuildRequires: gcc-c++
+BuildRequires: gcc%{?gccver}-c++
BuildRequires: libboost_filesystem-devel
BuildRequires: libboost_program_options-devel
BuildRequires: libboost_regex-devel
@@ -74,9 +76,14 @@ 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 PREFIX=%{_prefix} CONFIG+=qopenglwidget
+%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.