Accepting request 561742 from home:wolfi323:branches:science

- Add remove-qtwebkit.patch and remove-webgui.patch (taken from
  Arch Linux) to fix build without QtWebKit
- Build without QtWebKit on Tumbleweed and SLE/Leap 15 as
  libQtWebKit4 is about to be dropped (boo#1070901)

OBS-URL: https://build.opensuse.org/request/show/561742
OBS-URL: https://build.opensuse.org/package/show/science/FreeCAD?expand=0&rev=18
This commit is contained in:
Adrian Schröter 2018-01-05 08:06:52 +00:00 committed by Git OBS Bridge
parent 3eb2d076e3
commit f5f14426f5
4 changed files with 170 additions and 0 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Jan 4 15:36:57 UTC 2018 - wbauer@tmo.at
- Add remove-qtwebkit.patch and remove-webgui.patch (taken from
Arch Linux) to fix build without QtWebKit
- Build without QtWebKit on Tumbleweed and SLE/Leap 15 as
libQtWebKit4 is about to be dropped (boo#1070901)
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Dec 15 07:13:05 UTC 2017 - adrian@suse.de Fri Dec 15 07:13:05 UTC 2017 - adrian@suse.de

View File

@ -27,6 +27,10 @@ Group: Productivity/Graphics/CAD
Url: http://www.freecadweb.org/ Url: http://www.freecadweb.org/
Source0: %{name}-%{version}.tar.xz Source0: %{name}-%{version}.tar.xz
Source2: FreeCAD_shared_mimeinfo Source2: FreeCAD_shared_mimeinfo
# PATCH-FIX-OPENSUSE remove-qtwebkit.patch -- fix build without QtWebKit
Patch0: remove-qtwebkit.patch
# PATCH-FIX-OPENSUSE remove-webgui.patch -- remove browser view that would need QtWebKit
Patch1: remove-webgui.patch
BuildRequires: Coin-devel BuildRequires: Coin-devel
BuildRequires: SoQt-devel BuildRequires: SoQt-devel
%if 0%{?suse_version} >= 1330 %if 0%{?suse_version} >= 1330
@ -69,7 +73,9 @@ BuildRequires: swig
BuildRequires: unzip BuildRequires: unzip
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
BuildRequires: zlib-devel BuildRequires: zlib-devel
%if 0%{?suse_version} < 1500
BuildRequires: pkgconfig(QtWebKit) BuildRequires: pkgconfig(QtWebKit)
%endif
Requires: python-CXX Requires: python-CXX
Requires: python-pyside Requires: python-pyside
%if 0%{?suse_version} <= 1320 %if 0%{?suse_version} <= 1320
@ -99,6 +105,11 @@ This package contains the files needed for development with FreeCAD.
%prep %prep
%setup -q %setup -q
%if 0%{?suse_version} >= 1500
%patch0 -p1
%patch1 -p1
%endif
# Fix "wrong-file-end-of-line-encoding" rpmlint warning # Fix "wrong-file-end-of-line-encoding" rpmlint warning
sed -i 's/\r$//' ChangeLog.txt sed -i 's/\r$//' ChangeLog.txt
sed -i 's/\r$//' copying.lib sed -i 's/\r$//' copying.lib
@ -133,6 +144,10 @@ cmake \
-DBUILD_FEM_NETGEN=ON \ -DBUILD_FEM_NETGEN=ON \
%else %else
-DBUILD_FEM_NETGEN=OFF \ -DBUILD_FEM_NETGEN=OFF \
%endif
%if 0%{?suse_version} >= 1500
-DBUILD_START=OFF \
-DBUILD_WEB=OFF \
%endif %endif
../ ../

23
remove-qtwebkit.patch Normal file
View File

@ -0,0 +1,23 @@
diff -Naur FreeCAD-0.16.orig/src/Gui/DownloadManager.cpp FreeCAD-0.16/src/Gui/DownloadManager.cpp
--- FreeCAD-0.16.orig/src/Gui/DownloadManager.cpp 2016-04-07 03:39:34.000000000 +0200
+++ FreeCAD-0.16/src/Gui/DownloadManager.cpp 2017-02-07 17:05:51.753657498 +0100
@@ -33,7 +33,6 @@
#include <QMetaEnum>
#include <QSettings>
#include <QFileIconProvider>
-#include <QWebSettings>
#include "DownloadItem.h"
#include "DownloadManager.h"
@@ -224,11 +223,6 @@
ui->downloadsView->setRowHeight(row, item->minimumSizeHint().height());
bool remove = false;
- QWebSettings *globalSettings = QWebSettings::globalSettings();
- if (!item->downloading()
- && globalSettings->testAttribute(QWebSettings::PrivateBrowsingEnabled))
- remove = true;
-
if (item->downloadedSuccessfully()
&& removePolicy() == DownloadManager::SuccessFullDownload) {
remove = true;

124
remove-webgui.patch Normal file
View File

@ -0,0 +1,124 @@
diff -Naur FreeCAD-0.16.orig/src/Mod/Arch/ArchServer.py FreeCAD-0.16/src/Mod/Arch/ArchServer.py
--- FreeCAD-0.16.orig/src/Mod/Arch/ArchServer.py 2016-04-07 03:39:34.000000000 +0200
+++ FreeCAD-0.16/src/Mod/Arch/ArchServer.py 2017-02-07 18:55:34.918643280 +0100
@@ -36,20 +36,6 @@
__url__ = "http://www.freecadweb.org"
-class _CommandBimserver:
- "the Arch Bimserver command definition"
- def GetResources(self):
- return {'Pixmap' : 'Arch_Bimserver',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("Arch_Bimserver","BIM server"),
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Arch_Bimserver","Opens a browser window and connects to a BIM server instance")}
-
- def Activated(self):
- p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
- url = p.GetString("BimServerUrl","http://localhost:8082")
- FreeCADGui.addModule("WebGui")
- FreeCADGui.doCommand("WebGui.openBrowser(\""+url+"\")")
-
-
class _CommandGit:
"the Arch Git Commit command definition"
def GetResources(self):
@@ -161,5 +147,4 @@
if FreeCAD.GuiUp:
- FreeCADGui.addCommand('Arch_Bimserver',_CommandBimserver())
FreeCADGui.addCommand('Arch_Git',_CommandGit())
diff -Naur FreeCAD-0.16.orig/src/Mod/Arch/InitGui.py FreeCAD-0.16/src/Mod/Arch/InitGui.py
--- FreeCAD-0.16.orig/src/Mod/Arch/InitGui.py 2016-04-07 03:39:34.000000000 +0200
+++ FreeCAD-0.16/src/Mod/Arch/InitGui.py 2017-02-07 18:54:19.949158114 +0100
@@ -44,7 +44,7 @@
"Arch_SelectNonSolidMeshes","Arch_RemoveShape",
"Arch_CloseHoles","Arch_MergeWalls","Arch_Check",
"Arch_IfcExplorer","Arch_ToggleIfcBrepFlag","Arch_3Views",
- "Arch_Bimserver","Arch_Git","Arch_IfcSpreadsheet"]
+ "Arch_Git","Arch_IfcSpreadsheet"]
# draft tools
self.drafttools = ["Draft_Line","Draft_Wire","Draft_Circle","Draft_Arc","Draft_Ellipse",
diff -Naur FreeCAD-0.16.orig/src/Mod/Drawing/Gui/Command.cpp FreeCAD-0.16/src/Mod/Drawing/Gui/Command.cpp
--- FreeCAD-0.16.orig/src/Mod/Drawing/Gui/Command.cpp 2016-04-07 03:39:34.000000000 +0200
+++ FreeCAD-0.16/src/Mod/Drawing/Gui/Command.cpp 2017-02-07 18:52:19.077843909 +0100
@@ -427,43 +427,6 @@
//===========================================================================
-// Drawing_OpenBrowserView
-//===========================================================================
-
-DEF_STD_CMD_A(CmdDrawingOpenBrowserView);
-
-CmdDrawingOpenBrowserView::CmdDrawingOpenBrowserView()
- : Command("Drawing_OpenBrowserView")
-{
- // seting the
- sGroup = QT_TR_NOOP("Drawing");
- sMenuText = QT_TR_NOOP("Open &browser view");
- sToolTipText = QT_TR_NOOP("Opens the selected page in a browser view");
- sWhatsThis = "Drawing_OpenBrowserView";
- sStatusTip = QT_TR_NOOP("Opens the selected page in a browser view");
- sPixmap = "actions/drawing-openbrowser";
-}
-
-void CmdDrawingOpenBrowserView::activated(int iMsg)
-{
- unsigned int n = getSelection().countObjectsOfType(Drawing::FeaturePage::getClassTypeId());
- if (n != 1) {
- QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
- QObject::tr("Select one Page object."));
- return;
- }
- std::vector<Gui::SelectionSingleton::SelObj> Sel = getSelection().getSelection();
- doCommand(Doc,"PageName = App.activeDocument().%s.PageResult",Sel[0].FeatName);
- doCommand(Doc,"import WebGui");
- doCommand(Doc,"WebGui.openBrowser(PageName)");
-}
-
-bool CmdDrawingOpenBrowserView::isActive(void)
-{
- return (getActiveGuiDocument() ? true : false);
-}
-
-//===========================================================================
// Drawing_Annotation
//===========================================================================
@@ -786,7 +749,6 @@
rcCmdMgr.addCommand(new CmdDrawingNewA3Landscape());
rcCmdMgr.addCommand(new CmdDrawingNewView());
rcCmdMgr.addCommand(new CmdDrawingOrthoViews());
- rcCmdMgr.addCommand(new CmdDrawingOpenBrowserView());
rcCmdMgr.addCommand(new CmdDrawingAnnotation());
rcCmdMgr.addCommand(new CmdDrawingClip());
rcCmdMgr.addCommand(new CmdDrawingSymbol());
diff -Naur FreeCAD-0.16.orig/src/Mod/Drawing/Gui/Workbench.cpp FreeCAD-0.16/src/Mod/Drawing/Gui/Workbench.cpp
--- FreeCAD-0.16.orig/src/Mod/Drawing/Gui/Workbench.cpp 2016-04-07 03:39:34.000000000 +0200
+++ FreeCAD-0.16/src/Mod/Drawing/Gui/Workbench.cpp 2017-02-07 19:10:18.512913826 +0100
@@ -61,7 +61,6 @@
*part << "Drawing_NewPage";
*part << "Drawing_NewView";
*part << "Drawing_OrthoViews";
- *part << "Drawing_OpenBrowserView";
*part << "Drawing_Annotation";
*part << "Drawing_Clip";
*part << "Drawing_Symbol";
@@ -84,7 +83,6 @@
*part << "Drawing_NewPage";
*part << "Drawing_NewView";
*part << "Drawing_OrthoViews";
- *part << "Drawing_OpenBrowserView";
*part << "Drawing_Annotation";
*part << "Drawing_Clip";
*part << "Drawing_Symbol";
@@ -106,7 +104,6 @@
//*img << "Drawing_NewA3Landscape";
*img << "Drawing_NewPage";
*img << "Drawing_OrthoViews";
- *img << "Drawing_OpenBrowserView";
*img << "Drawing_Annotation";
*img << "Drawing_Clip";
*img << "Drawing_DraftView";