Accepting request 685411 from home:StefanBruens:branches:science
- Add support for Boost::Signals2, Boost::Signals has been deprecated since Boost 1.54 and removed in 1.69: * 0001-Convert-deprecated-boost-signal-to-signals2.patch * 0002-move-from-deprecated-boost.signals-to-boost.signals2.patch * 0003-fix-blocking-of-SelectionObserver.patch - Add explicit double-conversion-devel BuildRequires OBS-URL: https://build.opensuse.org/request/show/685411 OBS-URL: https://build.opensuse.org/package/show/science/FreeCAD?expand=0&rev=70
This commit is contained in:
parent
7620edaa58
commit
58dd0de9bb
133
0001-Convert-deprecated-boost-signal-to-signals2.patch
Normal file
133
0001-Convert-deprecated-boost-signal-to-signals2.patch
Normal file
@ -0,0 +1,133 @@
|
||||
From ca29d09d51f20d147c5377e66207a1c959698afd Mon Sep 17 00:00:00 2001
|
||||
From: wandererfan <wandererfan@gmail.com>
|
||||
Date: Thu, 10 May 2018 12:00:13 -0400
|
||||
Subject: [PATCH 1/3] Convert deprecated boost::signal to signals2
|
||||
|
||||
---
|
||||
src/Mod/TechDraw/App/DrawPage.h | 4 ++--
|
||||
src/Mod/TechDraw/App/DrawView.h | 4 ++--
|
||||
src/Mod/TechDraw/Gui/ViewProviderDrawingView.cpp | 3 ++-
|
||||
src/Mod/TechDraw/Gui/ViewProviderDrawingView.h | 4 +++-
|
||||
src/Mod/TechDraw/Gui/ViewProviderPage.cpp | 3 ++-
|
||||
src/Mod/TechDraw/Gui/ViewProviderPage.h | 4 +++-
|
||||
6 files changed, 14 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/Mod/TechDraw/App/DrawPage.h b/src/Mod/TechDraw/App/DrawPage.h
|
||||
index 60df838b8..cfde590d0 100644
|
||||
--- a/src/Mod/TechDraw/App/DrawPage.h
|
||||
+++ b/src/Mod/TechDraw/App/DrawPage.h
|
||||
@@ -24,7 +24,7 @@
|
||||
#ifndef _DrawPage_h_
|
||||
#define _DrawPage_h_
|
||||
|
||||
-#include <boost/signals.hpp>
|
||||
+#include <boost/signals2.hpp>
|
||||
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/DocumentObjectGroup.h>
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
int addView(App::DocumentObject *docObj);
|
||||
int removeView(App::DocumentObject* docObj);
|
||||
short mustExecute() const;
|
||||
- boost::signal<void (const DrawPage*)> signalGuiPaint;
|
||||
+ boost::signals2::signal<void (const DrawPage*)> signalGuiPaint;
|
||||
|
||||
/// returns the type name of the ViewProvider
|
||||
virtual const char* getViewProviderName(void) const {
|
||||
diff --git a/src/Mod/TechDraw/App/DrawView.h b/src/Mod/TechDraw/App/DrawView.h
|
||||
index dde8baa35..3f09a015f 100644
|
||||
--- a/src/Mod/TechDraw/App/DrawView.h
|
||||
+++ b/src/Mod/TechDraw/App/DrawView.h
|
||||
@@ -23,7 +23,7 @@
|
||||
#ifndef _DrawView_h_
|
||||
#define _DrawView_h_
|
||||
|
||||
-#include <boost/signals.hpp>
|
||||
+#include <boost/signals2.hpp>
|
||||
|
||||
#include <QRectF>
|
||||
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
virtual bool checkFit(DrawPage*) const;
|
||||
virtual void setPosition(double x, double y);
|
||||
bool keepUpdated(void);
|
||||
- boost::signal<void (const DrawView*)> signalGuiPaint;
|
||||
+ boost::signals2::signal<void (const DrawView*)> signalGuiPaint;
|
||||
virtual double getScale(void) const;
|
||||
void checkScale(void);
|
||||
void requestPaint(void);
|
||||
diff --git a/src/Mod/TechDraw/Gui/ViewProviderDrawingView.cpp b/src/Mod/TechDraw/Gui/ViewProviderDrawingView.cpp
|
||||
index 1175c1aff..32fe47afe 100644
|
||||
--- a/src/Mod/TechDraw/Gui/ViewProviderDrawingView.cpp
|
||||
+++ b/src/Mod/TechDraw/Gui/ViewProviderDrawingView.cpp
|
||||
@@ -25,7 +25,8 @@
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
-#include <boost/signal.hpp>
|
||||
+#include <boost/signals2.hpp>
|
||||
+#include <boost/signals2/connection.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#endif
|
||||
diff --git a/src/Mod/TechDraw/Gui/ViewProviderDrawingView.h b/src/Mod/TechDraw/Gui/ViewProviderDrawingView.h
|
||||
index 679fc8413..31970b4a6 100644
|
||||
--- a/src/Mod/TechDraw/Gui/ViewProviderDrawingView.h
|
||||
+++ b/src/Mod/TechDraw/Gui/ViewProviderDrawingView.h
|
||||
@@ -25,6 +25,8 @@
|
||||
#ifndef DRAWINGGUI_VIEWPROVIDERVIEW_H
|
||||
#define DRAWINGGUI_VIEWPROVIDERVIEW_H
|
||||
|
||||
+#include <boost/signals2.hpp>
|
||||
+
|
||||
#include <Gui/ViewProviderFeature.h>
|
||||
#include <Gui/ViewProviderDocumentObjectGroup.h>
|
||||
|
||||
@@ -78,7 +80,7 @@ public:
|
||||
virtual TechDraw::DrawView* getViewObject() const;
|
||||
|
||||
void onGuiRepaint(const TechDraw::DrawView* dv);
|
||||
- typedef boost::signals::scoped_connection Connection;
|
||||
+ typedef boost::signals2::scoped_connection Connection;
|
||||
Connection connectGuiRepaint;
|
||||
|
||||
|
||||
diff --git a/src/Mod/TechDraw/Gui/ViewProviderPage.cpp b/src/Mod/TechDraw/Gui/ViewProviderPage.cpp
|
||||
index fd5903bc1..245e39a9b 100644
|
||||
--- a/src/Mod/TechDraw/Gui/ViewProviderPage.cpp
|
||||
+++ b/src/Mod/TechDraw/Gui/ViewProviderPage.cpp
|
||||
@@ -29,7 +29,8 @@
|
||||
# include <QMenu>
|
||||
# include <QTimer>
|
||||
#include <QPointer>
|
||||
-#include <boost/signal.hpp>
|
||||
+#include <boost/signals2.hpp>
|
||||
+#include <boost/signals2/connection.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#endif
|
||||
diff --git a/src/Mod/TechDraw/Gui/ViewProviderPage.h b/src/Mod/TechDraw/Gui/ViewProviderPage.h
|
||||
index e12be67fb..73e41bdc7 100644
|
||||
--- a/src/Mod/TechDraw/Gui/ViewProviderPage.h
|
||||
+++ b/src/Mod/TechDraw/Gui/ViewProviderPage.h
|
||||
@@ -30,6 +30,8 @@
|
||||
#include <Gui/ViewProviderDocumentObjectGroup.h>
|
||||
#include <Gui/Selection.h>
|
||||
|
||||
+#include <boost/signals2.hpp>
|
||||
+
|
||||
namespace TechDraw{
|
||||
class DrawPage;
|
||||
}
|
||||
@@ -81,7 +83,7 @@ public:
|
||||
|
||||
TechDraw::DrawPage* getDrawPage() const;
|
||||
void onGuiRepaint(const TechDraw::DrawPage* dp);
|
||||
- typedef boost::signals::scoped_connection Connection;
|
||||
+ typedef boost::signals2::scoped_connection Connection;
|
||||
Connection connectGuiRepaint;
|
||||
|
||||
void unsetEdit(int ModNum);
|
||||
--
|
||||
2.21.0
|
||||
|
2155
0002-move-from-deprecated-boost.signals-to-boost.signals2.patch
Normal file
2155
0002-move-from-deprecated-boost.signals-to-boost.signals2.patch
Normal file
File diff suppressed because it is too large
Load Diff
61
0003-fix-blocking-of-SelectionObserver.patch
Normal file
61
0003-fix-blocking-of-SelectionObserver.patch
Normal file
@ -0,0 +1,61 @@
|
||||
From aa280edbde0e4cce207844f97eac3782fe2d3e1a Mon Sep 17 00:00:00 2001
|
||||
From: wmayer <wmayer@users.sourceforge.net>
|
||||
Date: Sun, 4 Nov 2018 11:54:40 +0100
|
||||
Subject: [PATCH 3/3] fix blocking of SelectionObserver
|
||||
|
||||
---
|
||||
src/Gui/Selection.cpp | 10 +++++-----
|
||||
src/Gui/Selection.h | 2 +-
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/Gui/Selection.cpp b/src/Gui/Selection.cpp
|
||||
index 80b7e3056..52976e6a0 100644
|
||||
--- a/src/Gui/Selection.cpp
|
||||
+++ b/src/Gui/Selection.cpp
|
||||
@@ -53,7 +53,7 @@
|
||||
using namespace Gui;
|
||||
using namespace std;
|
||||
|
||||
-SelectionObserver::SelectionObserver() : blocker(connectSelection, false)
|
||||
+SelectionObserver::SelectionObserver() : blockSelection(false)
|
||||
{
|
||||
attachSelection();
|
||||
}
|
||||
@@ -65,17 +65,17 @@ SelectionObserver::~SelectionObserver()
|
||||
|
||||
bool SelectionObserver::blockConnection(bool block)
|
||||
{
|
||||
- bool ok = connectSelection.blocked();
|
||||
+ bool ok = blockSelection;
|
||||
if (block)
|
||||
- blocker.block();
|
||||
+ blockSelection = true;
|
||||
else
|
||||
- blocker.unblock();
|
||||
+ blockSelection = false;
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool SelectionObserver::isConnectionBlocked() const
|
||||
{
|
||||
- return connectSelection.blocked();
|
||||
+ return blockSelection;
|
||||
}
|
||||
|
||||
void SelectionObserver::attachSelection()
|
||||
diff --git a/src/Gui/Selection.h b/src/Gui/Selection.h
|
||||
index e1c195989..5e3144e16 100644
|
||||
--- a/src/Gui/Selection.h
|
||||
+++ b/src/Gui/Selection.h
|
||||
@@ -146,7 +146,7 @@ private:
|
||||
private:
|
||||
typedef boost::signals2::connection Connection;
|
||||
Connection connectSelection;
|
||||
- boost::signals2::shared_connection_block blocker;
|
||||
+ bool blockSelection;
|
||||
};
|
||||
|
||||
/**
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 14 03:36:03 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
- Add support for Boost::Signals2, Boost::Signals has been deprecated
|
||||
since Boost 1.54 and removed in 1.69:
|
||||
* 0001-Convert-deprecated-boost-signal-to-signals2.patch
|
||||
* 0002-move-from-deprecated-boost.signals-to-boost.signals2.patch
|
||||
* 0003-fix-blocking-of-SelectionObserver.patch
|
||||
- Add explicit double-conversion-devel BuildRequires
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 9 15:10:24 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
|
19
FreeCAD.spec
19
FreeCAD.spec
@ -18,6 +18,12 @@
|
||||
|
||||
%define x_prefix %{_libdir}/%{name}
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without boost_signals2
|
||||
%else
|
||||
%bcond_with boost_signals2
|
||||
%endif
|
||||
|
||||
Name: FreeCAD
|
||||
Version: 0.17.1545162057.e1db7bff8
|
||||
Release: 0
|
||||
@ -43,6 +49,14 @@ Patch6: get-rid-of-private-function-_PyImport_FixupBuiltin-for-FreeCAD-a
|
||||
Patch7: 0001-Use-GL_RGB32F-instead-of-GL_RGB32F_ARB.patch
|
||||
# PATCH-FIX-UPSTREAM -- https://github.com/FreeCAD/FreeCAD/commit/5ff383b46.patch
|
||||
Patch8: fix-gcc8-build-failure.patch
|
||||
%if %{with boost_signals2}
|
||||
# PATCH-FIX-UPSTREAM -- https://github.com/FreeCAD/FreeCAD/commit/26d7d747257f.patch
|
||||
Patch9: 0001-Convert-deprecated-boost-signal-to-signals2.patch
|
||||
# PATCH-FIX-UPSTREAM -- https://github.com/FreeCAD/FreeCAD/commit/f898eafd64f8.patch
|
||||
Patch10: 0002-move-from-deprecated-boost.signals-to-boost.signals2.patch
|
||||
# PATCH-FIX-UPSTREAM -- https://github.com/FreeCAD/FreeCAD/commit/c3014fc65f86.patch
|
||||
Patch11: 0003-fix-blocking-of-SelectionObserver.patch
|
||||
%endif
|
||||
|
||||
# Test suite fails on 32bit and I don't want to debug that anymore
|
||||
ExcludeArch: %ix86 %arm ppc s390 s390x
|
||||
@ -56,7 +70,9 @@ BuildRequires: libboost_graph-devel >= 1.55
|
||||
BuildRequires: libboost_program_options-devel >= 1.55
|
||||
BuildRequires: libboost_python3-devel >= 1.55
|
||||
BuildRequires: libboost_regex-devel >= 1.55
|
||||
%if %{without boost_signals2}
|
||||
BuildRequires: libboost_signals-devel >= 1.55
|
||||
%endif
|
||||
BuildRequires: libboost_system-devel >= 1.55
|
||||
BuildRequires: libboost_thread-devel >= 1.55
|
||||
%else
|
||||
@ -65,6 +81,7 @@ BuildRequires: boost-devel >= 1.55
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: double-conversion-devel
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: eigen3-devel
|
||||
BuildRequires: f2c
|
||||
@ -248,7 +265,7 @@ mkdir -p %{buildroot}%{_datadir}/pixmaps
|
||||
mv %{buildroot}%{_datadir}/%{name}/freecad.xpm %{buildroot}%{_datadir}/pixmaps/freecad.xpm
|
||||
|
||||
# Install additional documentation files
|
||||
#install -pm 0644 ChangeLog.txt copying.lib %{buildroot}%{_docdir}/%{name}/
|
||||
#install -pm 0644 ChangeLog.txt copying.lib %%{buildroot}%%{_docdir}/%%{name}/
|
||||
|
||||
%suse_update_desktop_file -c %{name} "%{name}" "3D CAD Modeler" %{name} "freecad" Education Engineering
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user