graphics/librecad: Fix building with the newer boost.

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
M.Dinslage 2022-02-16 08:50:07 +01:00 committed by Willy Sudiarto Raharjo
parent 04676d1a38
commit bda7caf4ef
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,29 @@
From 1fd07fcd847659d518efa0897a9f603de83fe362 Mon Sep 17 00:00:00 2001
From: Jiri Slaby <jslaby@suse.cz>
Date: Tue, 4 May 2021 09:25:03 +0200
Subject: [PATCH] add boost tuple include to fix build
With boost 1.76, we see:
lib/engine/rs_ellipse.cpp:70:15: error: 'tuple' in namespace 'boost::math' does not name a template type
70 | boost::math::tuple<double, double, double> operator()(double const& z) const {
| ^~~~~
Fix this by including the proper boost header.
---
librecad/src/lib/engine/rs_ellipse.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/librecad/src/lib/engine/rs_ellipse.cpp b/librecad/src/lib/engine/rs_ellipse.cpp
index 291f734ea..d47bf6ca4 100644
--- a/librecad/src/lib/engine/rs_ellipse.cpp
+++ b/librecad/src/lib/engine/rs_ellipse.cpp
@@ -48,6 +48,9 @@
#include <boost/version.hpp>
#include <boost/math/tools/roots.hpp>
#include <boost/math/special_functions/ellint_2.hpp>
+#if BOOST_VERSION > 104500
+#include <boost/math/tools/tuple.hpp>
+#endif
#endif
namespace{

View file

@ -84,6 +84,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# thnx Archlinux!
patch -p1 < $CWD/0003-add-boost-tuple-include-to-fix-build.patch
qmake-qt5 $PRGNAM.pro QMAKE_CFLAGS+="$SLKCFLAGS" QMAKE_CXXFLAGS+="$SLKCFLAGS"
make