first attempt, publish is disabled atm

OBS-URL: https://build.opensuse.org/package/show/science/FreeCAD?expand=0&rev=72
This commit is contained in:
Adrian Schröter 2019-03-18 10:48:36 +00:00 committed by Git OBS Bridge
parent 58dd0de9bb
commit 8f7b987973
16 changed files with 23 additions and 3049 deletions

View File

@ -1,133 +0,0 @@
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

View File

@ -1,59 +0,0 @@
From 2293eaf9f973cdda4e638bf00d4ddbbf02f4a54e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Sat, 12 Jan 2019 05:44:21 +0100
Subject: [PATCH] Use GL_RGB32F instead of GL_RGB32F_ARB
The GL_RGB32F{_ARB,_EXT,} constant has the same value in all three
variants, but the ARB variant is only available for Desktop OpenGL and
EXT is only available for GLES. Use the non-suffix variant from OpenGL
3.0 / GLES 3.
This allows building on platforms using GLES for Qt5, i.e. many ARM
platforms.
---
src/Gui/SoFCOffscreenRenderer.cpp | 4 ++--
src/Gui/View3DInventorViewer.cpp | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/Gui/SoFCOffscreenRenderer.cpp b/src/Gui/SoFCOffscreenRenderer.cpp
index d4eb3bc1e..6e26d2176 100644
--- a/src/Gui/SoFCOffscreenRenderer.cpp
+++ b/src/Gui/SoFCOffscreenRenderer.cpp
@@ -598,8 +598,8 @@ SoQtOffscreenRenderer::makeFrameBuffer(int width, int height, int samples)
// format and in the output image search for the above color and
// replaces it with the color requested by the user.
#if defined(HAVE_QT5_OPENGL)
- //fmt.setInternalTextureFormat(GL_RGBA32F_ARB);
- fmt.setInternalTextureFormat(GL_RGB32F_ARB);
+ //fmt.setInternalTextureFormat(GL_RGBA32F);
+ fmt.setInternalTextureFormat(GL_RGB32F);
#else
//fmt.setInternalTextureFormat(GL_RGBA);
fmt.setInternalTextureFormat(GL_RGB);
diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp
index a1fee6459..21ed8a9e8 100644
--- a/src/Gui/View3DInventorViewer.cpp
+++ b/src/Gui/View3DInventorViewer.cpp
@@ -1416,7 +1416,7 @@ QImage View3DInventorViewer::grabFramebuffer()
fboFormat.setSamples(getNumSamples());
fboFormat.setAttachment(QOpenGLFramebufferObject::Depth);
fboFormat.setTextureTarget(GL_TEXTURE_2D);
- fboFormat.setInternalTextureFormat(GL_RGB32F_ARB);
+ fboFormat.setInternalTextureFormat(GL_RGB32F);
QOpenGLFramebufferObject fbo(width, height, fboFormat);
renderToFramebuffer(&fbo);
@@ -1449,8 +1449,8 @@ void View3DInventorViewer::imageFromFramebuffer(int width, int height, int sampl
// format and in the output image search for the above color and
// replaces it with the color requested by the user.
#if defined(HAVE_QT5_OPENGL)
- //fboFormat.setInternalTextureFormat(GL_RGBA32F_ARB);
- fboFormat.setInternalTextureFormat(GL_RGB32F_ARB);
+ //fboFormat.setInternalTextureFormat(GL_RGBA32F);
+ fboFormat.setInternalTextureFormat(GL_RGB32F);
#else
//fboFormat.setInternalTextureFormat(GL_RGBA);
fboFormat.setInternalTextureFormat(GL_RGB);
--
2.20.1

File diff suppressed because it is too large Load Diff

View File

@ -1,61 +0,0 @@
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

View File

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

3
FreeCAD-0.18.obscpio Normal file
View File

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

View File

@ -17,7 +17,7 @@
Name: FreeCAD-test
Version: 0.17.1545162057.e1db7bff8
Version: 0.18
Release: 0
Summary: Meta source package that runs the FreeCAD testsuite when built
License: LGPL-2.0-or-later AND GPL-2.0-or-later

View File

@ -1,5 +1,5 @@
name: FreeCAD
version: 0.17.1545162057.e1db7bff8
mtime: 1545162057
commit: e1db7bff8ff36439373eb9a426567d8afe289c4d
version: 0.18
mtime: 1552397887
commit: 690774c0effe4fd7b8d2b5e2fb2b8c8d145e21ce

View File

@ -25,7 +25,7 @@
%endif
Name: FreeCAD
Version: 0.17.1545162057.e1db7bff8
Version: 0.18
Release: 0
Summary: General Purpose 3D CAD Modeler
License: LGPL-2.0-or-later AND GPL-2.0-or-later
@ -37,32 +37,19 @@ Source2: FreeCADCmd.sh
Source3: FreeCAD_shared_mimeinfo
# python3 and generic compile fixes
Patch1: fix-build.diff
# runtime fix, submitted upstream
Patch3: fix-draft-module-with-python3.patch
# PATCH-FIX-UPSTREAM -- fix-build-with-Qt5_11.diff
Patch4: fix-build-with-Qt5_11.diff
# PATCH-FIX-UPSTREAM -- https://github.com/FreeCAD/FreeCAD/commit/8c08635d3
Patch5: get-rid-of-private-function-_PyImport_FixupBuiltin-for-__FreeCADBase__-module.patch
# PATCH-FIX-UPSTREAM -- https://github.com/FreeCAD/FreeCAD/commit/b79e1bfee
Patch6: get-rid-of-private-function-_PyImport_FixupBuiltin-for-FreeCAD-and-FreeCADGui-modules.patch
# PATCH-FIX-OPENSUSE - fix building on ARM with GLES Qt5
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
BuildRequires: Coin-devel
#BuildRequires: SoQt-devel
BuildRequires: libmed-devel
BuildRequires: netgen-devel
# we use upstream OpenCASCADE instead of oce atm
BuildRequires: occt-devel
BuildRequires: vtk-devel
BuildRequires: vtk-java
BuildRequires: vtk-tcl
%if 0%{?suse_version} >= 1330
BuildRequires: libboost_filesystem-devel >= 1.55
@ -96,6 +83,7 @@ BuildRequires: libmed-devel
BuildRequires: libspnav-devel
BuildRequires: make
# we use upstream OpenCASCADE instead of oce atm
BuildRequires: libXi-devel
BuildRequires: occt-devel
BuildRequires: opencv-devel
BuildRequires: pkg-config
@ -115,6 +103,7 @@ BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5UiTools)
BuildRequires: pkgconfig(Qt5WebKit)
BuildRequires: pkgconfig(Qt5WebKitWidgets)
BuildRequires: pkgconfig(Qt5X11Extras)
Requires: python3-numpy
Requires: python3-pyside2
# For Arch & Draft workbench
@ -172,7 +161,8 @@ Requires: %{name} = %{version}
This package contains the files needed for development with FreeCAD.
%prep
%autosetup -p1
%autosetup
# -p1
# fix env-script-interpreter
sed -i '1c#!%{__python2}' \
@ -195,7 +185,6 @@ mkdir build && cd build
# cmake macro would set standard libdir
# it needs an older specific zipios version -DFREECAD_USE_EXTERNAL_ZIPIOS=TRUE
# -fpermissive should become $RPM_OPT_FLAGS , but bugs ...
printenv
cmake \
-DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name} \
@ -206,15 +195,12 @@ cmake \
-DOCC_INCLUDE_DIR=%{_includedir}/opencascade \
-DRESOURCEDIR=%{_datadir}/%{name} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="-fpermissive -fno-strict-aliasing" \
-DCMAKE_CXX_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
%if 0%{?suse_version} >= 1330
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
-DSHIBOKEN_INCLUDE_DIR=/usr/include/shiboken2/ \
-DPYSIDE_INCLUDE_DIR=/usr/include/PySide2/ \
-DBUILD_QT5=ON \
%else
-DPYCXX_INCLUDE_DIR:PATH=%{_includedir}/python2.7 \
-DPYCXX_SOURCE_DIR:PATH=%{_datadir}/python2.7/CXX \
%endif
-DFREECAD_USE_EXTERNAL_PIVY:BOOL=TRUE \
-DBUILD_MESH_PART:BOOL=ON \
@ -264,9 +250,6 @@ chmod 755 %{buildroot}%{x_prefix}/Mod/Robot/MovieTool.py \
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}/
%suse_update_desktop_file -c %{name} "%{name}" "3D CAD Modeler" %{name} "freecad" Education Engineering
# Install mime type
@ -312,7 +295,7 @@ ln -s -t %{buildroot}/usr/bin %{x_prefix}/bin/FreeCADCmd
%mime_database_postun
%files
%license COPYING
%license LICENSE
%doc ChangeLog.txt README.md
%{_bindir}/FreeCAD*
%doc %{_docdir}/%{name}/

View File

@ -2,8 +2,8 @@
<service name="obs_scm" mode="disabled">
<param name="url">https://github.com/FreeCAD/FreeCAD.git</param>
<param name="scm">git</param>
<param name="revision">releases/FreeCAD-0-17</param>
<param name="versionprefix">0.17</param>
<param name="revision">0.18</param>
<param name="version">0.18</param>
</service>
<service name="set_version" mode="disabled"/>

View File

@ -1,286 +0,0 @@
commit 018b41032a5af616fb861538695f8be14ad120ce
Author: sL1pKn07 <sl1pkn07@gmail.com>
Date: Sat Apr 7 02:17:49 2018 +0200
[For v018] Fix build with Qt5 beta
Seems need add some headers for build with incoming Qt 5.11 (Tested with 5.11.0beta2)
diff --git a/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp b/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp
index c3992f9d8..cd9b64a94 100644
--- a/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp
+++ b/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp
@@ -28,6 +28,7 @@
# include <QRegExp>
# include <QTextStream>
# include <QMessageBox>
+# include <QAction>
# include <Precision.hxx>
# include <TopoDS.hxx>
# include <BRepAdaptor_Surface.hxx>
diff --git a/src/Mod/Fem/Gui/TaskFemConstraintContact.cpp b/src/Mod/Fem/Gui/TaskFemConstraintContact.cpp
index c445ca1c8..6fe9898e1 100644
--- a/src/Mod/Fem/Gui/TaskFemConstraintContact.cpp
+++ b/src/Mod/Fem/Gui/TaskFemConstraintContact.cpp
@@ -32,6 +32,7 @@
# include <Geom_Plane.hxx>
# include <Precision.hxx>
# include <QMessageBox>
+# include <QAction>
# include <QRegExp>
# include <QTextStream>
# include <TopoDS.hxx>
diff --git a/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.cpp b/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.cpp
index 0a83e737b..cfb16d9d8 100644
--- a/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.cpp
+++ b/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.cpp
@@ -32,6 +32,7 @@
# include <Geom_Plane.hxx>
# include <Precision.hxx>
# include <QMessageBox>
+# include <QAction>
# include <QRegExp>
# include <QTextStream>
# include <TopoDS.hxx>
diff --git a/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp b/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp
index 0d864e47e..183719432 100644
--- a/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp
+++ b/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp
@@ -29,6 +29,7 @@
# include <Geom_Plane.hxx>
# include <Precision.hxx>
# include <QMessageBox>
+# include <QAction>
# include <QRegExp>
# include <QTextStream>
# include <TopoDS.hxx>
diff --git a/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp b/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp
index c9964403b..8aaacdcf4 100644
--- a/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp
+++ b/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp
@@ -29,6 +29,7 @@
# include <QRegExp>
# include <QTextStream>
# include <QMessageBox>
+# include <QAction>
# include <Precision.hxx>
# include <TopoDS.hxx>
# include <TopoDS_Shape.hxx>
diff --git a/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp b/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp
index 33deb1b00..94fa4209a 100644
--- a/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp
+++ b/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp
@@ -28,6 +28,7 @@
# include <QRegExp>
# include <QTextStream>
# include <QMessageBox>
+# include <QAction>
# include <Precision.hxx>
# include <TopoDS.hxx>
# include <BRepAdaptor_Surface.hxx>
diff --git a/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.cpp b/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.cpp
index 344b8d32b..20a636215 100644
--- a/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.cpp
+++ b/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.cpp
@@ -32,6 +32,7 @@
# include <Geom_Plane.hxx>
# include <Precision.hxx>
# include <QMessageBox>
+# include <QAction>
# include <QRegExp>
# include <QTextStream>
# include <TopoDS.hxx>
diff --git a/src/Mod/Fem/Gui/TaskFemConstraintPlaneRotation.cpp b/src/Mod/Fem/Gui/TaskFemConstraintPlaneRotation.cpp
index b4c3cb03b..29d90c334 100644
--- a/src/Mod/Fem/Gui/TaskFemConstraintPlaneRotation.cpp
+++ b/src/Mod/Fem/Gui/TaskFemConstraintPlaneRotation.cpp
@@ -30,6 +30,7 @@
# include <QRegExp>
# include <QTextStream>
# include <QMessageBox>
+# include <QAction>
# include <Precision.hxx>
# include <TopoDS.hxx>
# include <BRepAdaptor_Surface.hxx>
diff --git a/src/Mod/Fem/Gui/TaskFemConstraintPressure.cpp b/src/Mod/Fem/Gui/TaskFemConstraintPressure.cpp
index 2da2b11cb..a85289183 100644
--- a/src/Mod/Fem/Gui/TaskFemConstraintPressure.cpp
+++ b/src/Mod/Fem/Gui/TaskFemConstraintPressure.cpp
@@ -30,6 +30,7 @@
# include <Geom_Plane.hxx>
# include <Precision.hxx>
# include <QMessageBox>
+# include <QAction>
# include <QRegExp>
# include <QTextStream>
# include <TopoDS.hxx>
diff --git a/src/Mod/Fem/Gui/TaskFemConstraintTemperature.cpp b/src/Mod/Fem/Gui/TaskFemConstraintTemperature.cpp
index 42c0d8f2e..88e9029fd 100644
--- a/src/Mod/Fem/Gui/TaskFemConstraintTemperature.cpp
+++ b/src/Mod/Fem/Gui/TaskFemConstraintTemperature.cpp
@@ -32,6 +32,7 @@
# include <Geom_Plane.hxx>
# include <Precision.hxx>
# include <QMessageBox>
+# include <QAction>
# include <QRegExp>
# include <QTextStream>
# include <TopoDS.hxx>
diff --git a/src/Mod/Fem/Gui/TaskFemConstraintTransform.cpp b/src/Mod/Fem/Gui/TaskFemConstraintTransform.cpp
index 35a1fcf5b..e3afeb785 100644
--- a/src/Mod/Fem/Gui/TaskFemConstraintTransform.cpp
+++ b/src/Mod/Fem/Gui/TaskFemConstraintTransform.cpp
@@ -33,6 +33,7 @@
# include <Geom_Plane.hxx>
# include <Precision.hxx>
# include <QMessageBox>
+# include <QAction>
# include <QRegExp>
# include <QTextStream>
# include <TopoDS.hxx>
diff --git a/src/Mod/MeshPart/Gui/Tessellation.cpp b/src/Mod/MeshPart/Gui/Tessellation.cpp
index e392d470b..7636ad2fb 100644
--- a/src/Mod/MeshPart/Gui/Tessellation.cpp
+++ b/src/Mod/MeshPart/Gui/Tessellation.cpp
@@ -25,6 +25,7 @@
#ifndef _PreComp_
# include <TopExp_Explorer.hxx>
# include <QMessageBox>
+# include <QButtonGroup>
#endif
#include "Tessellation.h"
diff --git a/src/Mod/Part/Gui/DlgSettingsGeneral.cpp b/src/Mod/Part/Gui/DlgSettingsGeneral.cpp
index d0cf0f94e..b44eac6ff 100644
--- a/src/Mod/Part/Gui/DlgSettingsGeneral.cpp
+++ b/src/Mod/Part/Gui/DlgSettingsGeneral.cpp
@@ -22,6 +22,9 @@
#include "PreCompiled.h"
+#ifndef _PreComp_
+# include <QButtonGroup>
+#endif
#include <Interface_Static.hxx>
diff --git a/src/Mod/PartDesign/Gui/TaskBooleanParameters.cpp b/src/Mod/PartDesign/Gui/TaskBooleanParameters.cpp
index 785705448..7e3280065 100644
--- a/src/Mod/PartDesign/Gui/TaskBooleanParameters.cpp
+++ b/src/Mod/PartDesign/Gui/TaskBooleanParameters.cpp
@@ -25,6 +25,7 @@
#ifndef _PreComp_
# include <QMessageBox>
+# include <QAction>
#endif
#include "ui_TaskBooleanParameters.h"
diff --git a/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp b/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp
index 330d58535..4600cc25b 100644
--- a/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp
+++ b/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp
@@ -24,6 +24,7 @@
#include "PreCompiled.h"
#ifndef _PreComp_
+# include <QAction>
#endif
#include "ui_TaskChamferParameters.h"
diff --git a/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp b/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp
index 556fc92ae..020148001 100644
--- a/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp
+++ b/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp
@@ -25,6 +25,7 @@
#ifndef _PreComp_
# include <QMessageBox>
+# include <QAction>
#endif
#include "ui_TaskDraftParameters.h"
diff --git a/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp b/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp
index 3c4025574..5e0c31ec6 100644
--- a/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp
+++ b/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp
@@ -24,6 +24,7 @@
#include "PreCompiled.h"
#ifndef _PreComp_
+# include <QAction>
#endif
#include "ui_TaskFilletParameters.h"
diff --git a/src/Mod/PartDesign/Gui/TaskLinearPatternParameters.cpp b/src/Mod/PartDesign/Gui/TaskLinearPatternParameters.cpp
index 532936310..1970db7ef 100644
--- a/src/Mod/PartDesign/Gui/TaskLinearPatternParameters.cpp
+++ b/src/Mod/PartDesign/Gui/TaskLinearPatternParameters.cpp
@@ -25,6 +25,7 @@
#ifndef _PreComp_
# include <QMessageBox>
+# include <QAction>
# include <QTimer>
#endif
diff --git a/src/Mod/PartDesign/Gui/TaskMirroredParameters.cpp b/src/Mod/PartDesign/Gui/TaskMirroredParameters.cpp
index 084ab353c..f8e96fd6c 100644
--- a/src/Mod/PartDesign/Gui/TaskMirroredParameters.cpp
+++ b/src/Mod/PartDesign/Gui/TaskMirroredParameters.cpp
@@ -25,6 +25,7 @@
#ifndef _PreComp_
# include <QMessageBox>
+# include <QAction>
#endif
#include <Base/Console.h>
diff --git a/src/Mod/PartDesign/Gui/TaskMultiTransformParameters.cpp b/src/Mod/PartDesign/Gui/TaskMultiTransformParameters.cpp
index 1fe452a59..d5a5317ae 100644
--- a/src/Mod/PartDesign/Gui/TaskMultiTransformParameters.cpp
+++ b/src/Mod/PartDesign/Gui/TaskMultiTransformParameters.cpp
@@ -25,6 +25,7 @@
#ifndef _PreComp_
# include <QMessageBox>
+# include <QAction>
#endif
#include "ui_TaskMultiTransformParameters.h"
diff --git a/src/Mod/PartDesign/Gui/TaskPolarPatternParameters.cpp b/src/Mod/PartDesign/Gui/TaskPolarPatternParameters.cpp
index 874273f63..79c564d09 100644
--- a/src/Mod/PartDesign/Gui/TaskPolarPatternParameters.cpp
+++ b/src/Mod/PartDesign/Gui/TaskPolarPatternParameters.cpp
@@ -25,6 +25,7 @@
#ifndef _PreComp_
# include <QMessageBox>
+# include <QAction>
# include <QTimer>
#endif
diff --git a/src/Mod/PartDesign/Gui/TaskScaledParameters.cpp b/src/Mod/PartDesign/Gui/TaskScaledParameters.cpp
index 593664c9b..acaacce6e 100644
--- a/src/Mod/PartDesign/Gui/TaskScaledParameters.cpp
+++ b/src/Mod/PartDesign/Gui/TaskScaledParameters.cpp
@@ -25,6 +25,7 @@
#ifndef _PreComp_
# include <QMessageBox>
+# include <QAction>
#endif
#include "ui_TaskScaledParameters.h"
diff --git a/src/Mod/PartDesign/Gui/TaskThicknessParameters.cpp b/src/Mod/PartDesign/Gui/TaskThicknessParameters.cpp
index b3f17f299..5b907304f 100644
--- a/src/Mod/PartDesign/Gui/TaskThicknessParameters.cpp
+++ b/src/Mod/PartDesign/Gui/TaskThicknessParameters.cpp
@@ -24,6 +24,7 @@
#include "PreCompiled.h"
#ifndef _PreComp_
+# include <QAction>
#endif
#include "ui_TaskThicknessParameters.h"

View File

@ -1,62 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3ecfe23a6..246bb15a8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -445,7 +445,6 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=677598
# Acceptable versions of Python
-set(Python_ADDITIONAL_VERSIONS "2.7")
# For building on OS X
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
diff --git a/src/3rdParty/salomesmesh/CMakeLists.txt b/src/3rdParty/salomesmesh/CMakeLists.txt
index 303ae6e0a..9c10046e6 100644
--- a/src/3rdParty/salomesmesh/CMakeLists.txt
+++ b/src/3rdParty/salomesmesh/CMakeLists.txt
@@ -379,6 +379,7 @@ if (BUILD_FEM_NETGEN)
FILE(GLOB NETGENPlugin_source_files src/NETGENPlugin/*.cpp inc/NETGENPlugin_*.h* )
ADD_LIBRARY(NETGENPlugin SHARED ${NETGENPlugin_source_files})
TARGET_LINK_LIBRARIES(NETGENPlugin SMDS SMESHDS SMESH StdMeshers ${SMESH_LIBS} )
+set_property(TARGET NETGENPlugin PROPERTY CXX_STANDARD 14)
SET_BIN_DIR(NETGENPlugin NETGENPlugin)
if(WIN32)
diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
index 3b66ec663..3d4bc8afd 100644
--- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
+++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
@@ -38,6 +38,7 @@
#include <GC_MakeSegment.hxx>
#include <GeomAPI_ExtremaCurveCurve.hxx>
#include <Geom_Line.hxx>
+#include <Quantity_Parameter.hxx>
#include <IntAna_IntConicQuad.hxx>
#include <IntAna_Quadric.hxx>
#include <gp_Lin.hxx>
diff --git a/src/Mod/Test/TestApp.py b/src/Mod/Test/TestApp.py
index e4b5c8d44..211a4c95a 100644
--- a/src/Mod/Test/TestApp.py
+++ b/src/Mod/Test/TestApp.py
@@ -66,8 +66,7 @@ def All():
"Menu" ]
# add the module tests
- tests += [ "TestFem",
- "MeshTestsApp",
+ tests += [ "MeshTestsApp",
"TestSketcherApp",
"TestPartApp",
"TestPartDesignApp",
diff --git a/src/Mod/Test/TestGui.py b/src/Mod/Test/TestGui.py
index ae5712bfc..7fbc2760c 100644
--- a/src/Mod/Test/TestGui.py
+++ b/src/Mod/Test/TestGui.py
@@ -47,7 +47,6 @@ class TestCmd:
QtUnitGui.addTest("Document")
QtUnitGui.addTest("UnicodeTests")
QtUnitGui.addTest("MeshTestsApp")
- QtUnitGui.addTest("TestFem")
QtUnitGui.addTest("TestSketcherApp")
QtUnitGui.addTest("TestPartApp")
QtUnitGui.addTest("TestPartDesignApp")

View File

@ -1,48 +0,0 @@
commit 338630b951abab1e44b01c80fbe2d07aba415daf
Author: Adrian Schröter <adrian@suse.de>
Date: Tue Apr 17 08:39:39 2018 +0200
fix runtime error creating a wire from string with python3
Tested against version 0.17
diff --git a/src/Mod/Draft/Draft.py b/src/Mod/Draft/Draft.py
index 4c27018c4..da8db2895 100644
--- a/src/Mod/Draft/Draft.py
+++ b/src/Mod/Draft/Draft.py
@@ -6133,8 +6133,10 @@ class _ShapeString(_DraftObject):
ff8 = obj.FontFile.encode('utf8') # 1947 accents in filepath
# TODO: change for Py3?? bytes?
# Part.makeWireString uses FontFile as char* string
-# CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
- CharList = Part.makeWireString(obj.String,ff8,obj.Size,obj.Tracking)
+ if sys.version_info.major < 3:
+ CharList = Part.makeWireString(obj.String,ff8,obj.Size,obj.Tracking)
+ else:
+ CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
if len(CharList) == 0:
msg(translate("draft","ShapeString: string has no wires\n"), 'warning')
return
@@ -6142,8 +6144,7 @@ class _ShapeString(_DraftObject):
# test a simple letter to know if we have a sticky font or not
sticky = False
-# testWire = Part.makeWireString("L",obj.FontFile,obj.Size,obj.Tracking)[0][0]
- testWire = Part.makeWireString("L",ff8,obj.Size,obj.Tracking)[0][0]
+ testWire = Part.makeWireString("L",obj.FontFile,obj.Size,obj.Tracking)[0][0]
if testWire.isClosed:
try:
testFace = Part.Face(testWire)
diff --git a/src/Mod/Draft/DraftTools.py b/src/Mod/Draft/DraftTools.py
index a007d03e6..1de205bbf 100644
--- a/src/Mod/Draft/DraftTools.py
+++ b/src/Mod/Draft/DraftTools.py
@@ -2204,7 +2204,7 @@ class ShapeString(Creator):
#print("debug: D_T ShapeString.createObject type(self.SString): " str(type(self.SString)))
dquote = '"'
- if type(self.SString) == unicode: # Python3: no more unicode
+ if sys.version_info.major < 3: # Python3: no more unicode
String = 'u' + dquote + self.SString.encode('unicode_escape') + dquote
else:
String = dquote + self.SString + dquote

View File

@ -1,22 +0,0 @@
From 5ff383b46ccb0645e890573e783f467068d2488d Mon Sep 17 00:00:00 2001
From: wmayer <wmayer@users.sourceforge.net>
Date: Fri, 2 Nov 2018 18:57:43 +0100
Subject: [PATCH] fix gcc8 build failure
---
src/3rdParty/salomesmesh/inc/StdMeshers_ProjectionUtils.hxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/3rdParty/salomesmesh/inc/StdMeshers_ProjectionUtils.hxx b/src/3rdParty/salomesmesh/inc/StdMeshers_ProjectionUtils.hxx
index d31e72147cd..f7f9d323149 100644
--- a/src/3rdParty/salomesmesh/inc/StdMeshers_ProjectionUtils.hxx
+++ b/src/3rdParty/salomesmesh/inc/StdMeshers_ProjectionUtils.hxx
@@ -30,7 +30,7 @@
#include "SMESH_StdMeshers.hxx"
-#include "SMDS_MeshElement.hxx"
+#include "SMDS_MeshNode.hxx"
#include <TopTools_DataMapOfShapeShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>

View File

@ -1,121 +0,0 @@
From b79e1bfee45d003e5ba646d828faca5d673f3e9b Mon Sep 17 00:00:00 2001
From: wmayer <wmayer@users.sourceforge.net>
Date: Sat, 1 Sep 2018 19:57:15 +0200
Subject: [PATCH] get rid of private function _PyImport_FixupBuiltin for
FreeCAD and FreeCADGui modules
---
src/App/Application.cpp | 38 ++++++++++++++++++++++++++++++--------
src/Gui/Application.cpp | 6 ++++--
src/Main/MainPy.cpp | 4 +++-
3 files changed, 37 insertions(+), 11 deletions(-)
diff --git a/src/App/Application.cpp b/src/App/Application.cpp
index 82270e3eea0..0895a8c83ac 100644
--- a/src/App/Application.cpp
+++ b/src/App/Application.cpp
@@ -226,6 +226,21 @@ init_freecad_base_module(void)
};
return PyModule_Create(&BaseModuleDef);
}
+
+// Set in inside Application
+static PyMethodDef* __AppMethods = nullptr;
+
+PyMODINIT_FUNC
+init_freecad_module(void)
+{
+ static struct PyModuleDef FreeCADModuleDef = {
+ PyModuleDef_HEAD_INIT,
+ "FreeCAD", FreeCAD_doc, -1,
+ __AppMethods,
+ NULL, NULL, NULL, NULL
+ };
+ return PyModule_Create(&FreeCADModuleDef);
+}
#endif
Application::Application(std::map<std::string,std::string> &mConfig)
@@ -239,14 +254,15 @@ Application::Application(std::map<std::string,std::string> &mConfig)
// setting up Python binding
Base::PyGILStateLocker lock;
#if PY_MAJOR_VERSION >= 3
- static struct PyModuleDef FreeCADModuleDef = {
- PyModuleDef_HEAD_INIT,
- "FreeCAD", FreeCAD_doc, -1,
- Application::Methods,
- NULL, NULL, NULL, NULL
- };
- PyObject* pAppModule = PyModule_Create(&FreeCADModuleDef);
- _PyImport_FixupBuiltin(pAppModule, "FreeCAD");
+ PyObject* modules = PyImport_GetModuleDict();
+
+ __AppMethods = Application::Methods;
+ PyObject* pAppModule = PyImport_ImportModule ("FreeCAD");
+ if (!pAppModule) {
+ PyErr_Clear();
+ pAppModule = init_freecad_module();
+ PyDict_SetItemString(modules, "FreeCAD", pAppModule);
+ }
#else
PyObject* pAppModule = Py_InitModule3("FreeCAD", Application::Methods, FreeCAD_doc);
#endif
@@ -282,6 +298,11 @@ Application::Application(std::map<std::string,std::string> &mConfig)
#if PY_MAJOR_VERSION >= 3
PyObject* pBaseModule = PyImport_ImportModule ("__FreeCADBase__");
+ if (!pBaseModule) {
+ PyErr_Clear();
+ pBaseModule = init_freecad_base_module();
+ PyDict_SetItemString(modules, "__FreeCADBase__", pBaseModule);
+ }
#else
PyObject* pBaseModule = Py_InitModule3("__FreeCADBase__", NULL, Base_doc);
#endif
@@ -1427,6 +1448,7 @@ void Application::initConfig(int argc, char ** argv)
// init python
#if PY_MAJOR_VERSION >= 3
+ PyImport_AppendInittab ("FreeCAD", init_freecad_module);
PyImport_AppendInittab ("__FreeCADBase__", init_freecad_base_module);
#endif
mConfig["PythonSearchPath"] = Interpreter().init(argc,argv);
diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp
index 33ddde2b4c6..8715c8d6e52 100644
--- a/src/Gui/Application.cpp
+++ b/src/Gui/Application.cpp
@@ -345,7 +345,8 @@ Application::Application(bool GUIenabled)
#if PY_MAJOR_VERSION >= 3
// if this returns a valid pointer then the 'FreeCADGui' Python module was loaded,
// otherwise the executable was launched
- PyObject *module = PyImport_AddModule("FreeCADGui");
+ PyObject* modules = PyImport_GetModuleDict();
+ PyObject* module = PyDict_GetItemString(modules, "FreeCADGui");
if (!module) {
static struct PyModuleDef FreeCADGuiModuleDef = {
PyModuleDef_HEAD_INIT,
@@ -354,7 +355,8 @@ Application::Application(bool GUIenabled)
NULL, NULL, NULL, NULL
};
module = PyModule_Create(&FreeCADGuiModuleDef);
- _PyImport_FixupBuiltin(module, "FreeCADGui");
+
+ PyDict_SetItemString(modules, "FreeCADGui", module);
}
else {
// extend the method list
diff --git a/src/Main/MainPy.cpp b/src/Main/MainPy.cpp
index 061740903c0..58b86fa7991 100644
--- a/src/Main/MainPy.cpp
+++ b/src/Main/MainPy.cpp
@@ -225,7 +225,9 @@ PyMOD_INIT_FUNC(FreeCAD)
free(argv);
#if PY_MAJOR_VERSION >= 3
- PyObject* module = _PyImport_FindBuiltin("FreeCAD");
+ //PyObject* module = _PyImport_FindBuiltin("FreeCAD");
+ PyObject* modules = PyImport_GetModuleDict();
+ PyObject* module = PyDict_GetItemString(modules, "FreeCAD");
if (!module) {
PyErr_SetString(PyExc_ImportError, "Failed to load FreeCAD module!");
}

View File

@ -1,62 +0,0 @@
From 8c08635d301c3418810e5c8984bdb9f2c17cb9dc Mon Sep 17 00:00:00 2001
From: wmayer <wmayer@users.sourceforge.net>
Date: Sat, 1 Sep 2018 16:26:18 +0200
Subject: [PATCH] get rid of private function _PyImport_FixupBuiltin for
__FreeCADBase__ module
---
src/App/Application.cpp | 27 ++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)
diff --git a/src/App/Application.cpp b/src/App/Application.cpp
index f719cd2375a..82270e3eea0 100644
--- a/src/App/Application.cpp
+++ b/src/App/Application.cpp
@@ -212,6 +212,22 @@ PyDoc_STRVAR(Base_doc,
"like vector, matrix, bounding box, placement, rotation, axis, ...\n"
);
+#if PY_MAJOR_VERSION >= 3
+// This is called via the PyImport_AppendInittab mechanism called
+// during initialization, to make the built-in __FreeCADBase__
+// module known to Python.
+PyMODINIT_FUNC
+init_freecad_base_module(void)
+{
+ static struct PyModuleDef BaseModuleDef = {
+ PyModuleDef_HEAD_INIT,
+ "__FreeCADBase__", Base_doc, -1,
+ NULL, NULL, NULL, NULL, NULL
+ };
+ return PyModule_Create(&BaseModuleDef);
+}
+#endif
+
Application::Application(std::map<std::string,std::string> &mConfig)
: _mConfig(mConfig), _pActiveDoc(0)
{
@@ -265,13 +281,7 @@ Application::Application(std::map<std::string,std::string> &mConfig)
// remove these types from the FreeCAD module.
#if PY_MAJOR_VERSION >= 3
- static struct PyModuleDef BaseModuleDef = {
- PyModuleDef_HEAD_INIT,
- "__FreeCADBase__", Base_doc, -1,
- NULL, NULL, NULL, NULL, NULL
- };
- PyObject* pBaseModule = PyModule_Create(&BaseModuleDef);
- _PyImport_FixupBuiltin(pBaseModule, "__FreeCADBase__");
+ PyObject* pBaseModule = PyImport_ImportModule ("__FreeCADBase__");
#else
PyObject* pBaseModule = Py_InitModule3("__FreeCADBase__", NULL, Base_doc);
#endif
@@ -1416,6 +1426,9 @@ void Application::initConfig(int argc, char ** argv)
# endif
// init python
+#if PY_MAJOR_VERSION >= 3
+ PyImport_AppendInittab ("__FreeCADBase__", init_freecad_base_module);
+#endif
mConfig["PythonSearchPath"] = Interpreter().init(argc,argv);
// Parse the options that have impact on the init process