diff --git a/_constraints b/_constraints
index d5c1b35..6200bf7 100644
--- a/_constraints
+++ b/_constraints
@@ -1,10 +1,14 @@
+
-
+
3
-
-
+
+
5
-
+
+
+ 2200
+
diff --git a/boost_include.diff b/boost_include.diff
new file mode 100644
index 0000000..595afb9
--- /dev/null
+++ b/boost_include.diff
@@ -0,0 +1,22 @@
+diff -ur openscad-2019.05/src/import.cc openscad-2019.05_fix/src/import.cc
+--- openscad-2019.05/src/import.cc 2019-03-31 06:14:41.000000000 +0200
++++ openscad-2019.05_fix/src/import.cc 2020-10-02 12:34:14.840331047 +0200
+@@ -50,7 +50,6 @@
+ #include
+ using namespace boost::assign; // bring 'operator+=()' into scope
+
+-#include
+ #include
+
+ extern PolySet * import_amf(std::string, const Location &loc);
+diff -ur openscad-2019.05/src/parser.y openscad-2019.05_fix/src/parser.y
+--- openscad-2019.05/src/parser.y 2019-04-07 17:45:27.000000000 +0200
++++ openscad-2019.05_fix/src/parser.y 2020-10-02 11:58:27.114794108 +0200
+@@ -35,6 +35,7 @@
+ #else
+ #include
+ #endif
++#include
+
+ #include "FileModule.h"
+ #include "UserModule.h"
diff --git a/openscad.changes b/openscad.changes
index 56ca9ff..596d018 100644
--- a/openscad.changes
+++ b/openscad.changes
@@ -1,3 +1,13 @@
+-------------------------------------------------------------------
+Fri Oct 2 08:10:59 UTC 2020 - Dirk Stoecker
+
+- fix build with new C++ compilers, add boost_include.diff
+
+-------------------------------------------------------------------
+Thu Aug 20 09:03:01 UTC 2020 - Martin Liška
+
+- Use memoryperjob constraint instead of %limit_build macro.
+
-------------------------------------------------------------------
Sun Mar 22 07:56:55 UTC 2020 - Christophe Giboudeaux
diff --git a/openscad.spec b/openscad.spec
index 857c313..70bf207 100644
--- a/openscad.spec
+++ b/openscad.spec
@@ -1,7 +1,7 @@
#
# spec file for package openscad
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -22,8 +22,10 @@ Release: 0
Summary: Programmers Solid 3D CAD Modeller
License: GPL-3.0-or-later
Group: Productivity/Graphics/CAD
-Url: https://www.openscad.org/
+URL: https://www.openscad.org/
Source: https://files.openscad.org/%{name}-%{version}.src.tar.gz
+#PATCH-FIX-UPSTREAM remove and add an include line to fix build
+Patch1: boost_include.diff
BuildRequires: bison
BuildRequires: double-conversion-devel
BuildRequires: eigen3-devel
@@ -39,7 +41,6 @@ BuildRequires: libboost_thread-devel
BuildRequires: libcgal-devel
BuildRequires: libqscintilla-qt5-devel
BuildRequires: libspnav-devel
-BuildRequires: memory-constraints
BuildRequires: opencsg-devel
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5Core)
@@ -59,10 +60,10 @@ aspects, e.g. modelling of machine parts.
%prep
%setup -q -n %{name}-%{version}
+%patch1 -p1
%build
-qmake-qt5 PREFIX=%{_prefix} QMAKE_CXXFLAGS="%{optflags}" CONFIG+=qopenglwidget
-%limit_build -m 2200
+qmake-qt5 PREFIX=%{_prefix} QMAKE_CXXFLAGS="%{optflags}" CONFIG+=qopenglwidget CONFIG+=c++14
make %{?_smp_mflags}
%install