summaryrefslogtreecommitdiff
path: root/media-gfx/freecad/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-04-06 22:33:41 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-04-06 22:33:41 +0100
commite68d405c5d712af4387159df07e226217bdda049 (patch)
tree009ab0f3d427f0813e62930d71802cb054c07e30 /media-gfx/freecad/files
parent401101f9c8077911929d3f2b60a37098460a5d89 (diff)
gentoo resync : 06.04.2022
Diffstat (limited to 'media-gfx/freecad/files')
-rw-r--r--media-gfx/freecad/files/freecad-0.19.2-0001-Backport-of-0004809-Security-vulnerability-in-DWG-im.patch59
-rw-r--r--media-gfx/freecad/files/freecad-0.19.2-0001-fix-failing-test-workbench-testcase.patch26
-rw-r--r--media-gfx/freecad/files/freecad-0.19.2-0002-Backport-of-Use-run-instead-of-Popen-to-avoid-need-f.patch25
-rw-r--r--media-gfx/freecad/files/freecad-0.19.2-0002-fix-femtest-failure-with-yaml-load.patch26
-rw-r--r--media-gfx/freecad/files/freecad-0.19.2-0003-fix-test-when-built-without-GUI.patch33
-rw-r--r--media-gfx/freecad/files/freecad-0.19.2-0007-fix-build-failure-with-opencascade-7.5.2.patch30
-rw-r--r--media-gfx/freecad/files/freecad-0.19.4-backport-correctly-find-PySide2Tools.patch106
7 files changed, 106 insertions, 199 deletions
diff --git a/media-gfx/freecad/files/freecad-0.19.2-0001-Backport-of-0004809-Security-vulnerability-in-DWG-im.patch b/media-gfx/freecad/files/freecad-0.19.2-0001-Backport-of-0004809-Security-vulnerability-in-DWG-im.patch
deleted file mode 100644
index 2df44ff66ac8..000000000000
--- a/media-gfx/freecad/files/freecad-0.19.2-0001-Backport-of-0004809-Security-vulnerability-in-DWG-im.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 4006e62860c73f0943e71c7da478256a7337941d Mon Sep 17 00:00:00 2001
-From: Bernd Waibel <waebbl-gentoo@posteo.net>
-Date: Mon, 31 Jan 2022 08:12:35 +0100
-Subject: [PATCH 1/2] Backport of 0004809: Security vulnerability in DWG import
- when using ODA file converter
-
-Original patch commit id 1742d7ff82af1653253c4a4183c262c9af3b26d6 by
-wmayer <wmayer@users.sourceforge.net>.
-
-Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
---- a/src/Mod/Draft/importDWG.py
-+++ b/src/Mod/Draft/importDWG.py
-@@ -44,8 +44,6 @@ https://knowledge.autodesk.com/support/autocad/downloads/
- # * *
- # ***************************************************************************
-
--# TODO: use subprocess.popen() instead of subprocess.call()
--
- import six
- import FreeCAD
- from FreeCAD import Console as FCC
-@@ -217,15 +215,10 @@ def convertToDxf(dwgfilename):
- indir = os.path.dirname(dwgfilename)
- outdir = tempfile.mkdtemp()
- basename = os.path.basename(dwgfilename)
-- cmdline = ('"%s" "%s" "%s" "ACAD2000" "DXF" "0" "1" "%s"'
-- % (teigha, indir, outdir, basename))
-- FCC.PrintMessage(translate("ImportDWG", "Converting: ")
-- + cmdline + "\n")
-- if six.PY2:
-- if isinstance(cmdline, six.text_type):
-- encoding = sys.getfilesystemencoding()
-- cmdline = cmdline.encode(encoding)
-- subprocess.call(cmdline, shell=True) # os.system(cmdline)
-+ cmdline = [teigha, indir, outdir, "ACAD2000", "DXF", "0", "1", basename]
-+ FCC.PrintMessage(translate("draft", "Converting:") + " " + str(cmdline) + "\n")
-+ proc = subprocess.Popen(cmdline)
-+ proc.communicate()
- result = outdir + os.sep + os.path.splitext(basename)[0] + ".dxf"
- if os.path.exists(result):
- FCC.PrintMessage(translate("ImportDWG",
-@@ -270,10 +263,9 @@ def convertToDwg(dxffilename, dwgfilename):
- indir = os.path.dirname(dxffilename)
- outdir = os.path.dirname(dwgfilename)
- basename = os.path.basename(dxffilename)
-- cmdline = ('"%s" "%s" "%s" "ACAD2000" "DWG" "0" "1" "%s"'
-- % (teigha, indir, outdir, basename))
-- FCC.PrintMessage(translate("ImportDWG", "Converting: ")
-- + cmdline + "\n")
-- subprocess.call(cmdline, shell=True) # os.system(cmdline)
-+ cmdline = [teigha, indir, outdir, "ACAD2000", "DWG", "0", "1", basename]
-+ FCC.PrintMessage(translate("draft", "Converting:") + " " + str(cmdline) + "\n")
-+ proc = subprocess.Popen(cmdline)
-+ proc.communicate()
- return dwgfilename
- return None
---
-2.35.0
-
diff --git a/media-gfx/freecad/files/freecad-0.19.2-0001-fix-failing-test-workbench-testcase.patch b/media-gfx/freecad/files/freecad-0.19.2-0001-fix-failing-test-workbench-testcase.patch
deleted file mode 100644
index 58107fb544d1..000000000000
--- a/media-gfx/freecad/files/freecad-0.19.2-0001-fix-failing-test-workbench-testcase.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From dc04c745ea1e7dc277ab06fab69a2b91fbf543c5 Mon Sep 17 00:00:00 2001
-From: Bernd Waibel <waebbl-gentoo@posteo.net>
-Date: Sun, 25 Apr 2021 23:02:39 +0200
-Subject: [PATCH] fix failing test workbench testcase
-
-Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
----
- src/Mod/Test/Document.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/Mod/Test/Document.py b/src/Mod/Test/Document.py
-index e41375c..fd5eb15 100644
---- a/src/Mod/Test/Document.py
-+++ b/src/Mod/Test/Document.py
-@@ -1307,7 +1307,7 @@ class DocumentFileIncludeCases(unittest.TestCase):
- # copy file from L5 which is in the same directory
- L7 = doc2.addObject("App::DocumentObjectFileIncluded","FileObject3")
- L7.File = (L5.File,"Copy.txt")
-- self.failUnless(os.path.exists(L5.File))
-+ self.failUnless(os.path.exists(L7.File))
- FreeCAD.closeDocument("Doc2")
-
-
---
-2.31.1
-
diff --git a/media-gfx/freecad/files/freecad-0.19.2-0002-Backport-of-Use-run-instead-of-Popen-to-avoid-need-f.patch b/media-gfx/freecad/files/freecad-0.19.2-0002-Backport-of-Use-run-instead-of-Popen-to-avoid-need-f.patch
deleted file mode 100644
index 9b043bd34563..000000000000
--- a/media-gfx/freecad/files/freecad-0.19.2-0002-Backport-of-Use-run-instead-of-Popen-to-avoid-need-f.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 937d8ca9bf4c50f8a7dc0fbcf9e6ac23b0fbe033 Mon Sep 17 00:00:00 2001
-From: Bernd Waibel <waebbl-gentoo@posteo.net>
-Date: Mon, 31 Jan 2022 08:17:24 +0100
-Subject: [PATCH 2/2] Backport of Use run() instead of Popen() to avoid need
- for communicate
-
-Original patch commit id a65dbc6f8296562a12407a36f4931a80bbb628b7 by
-sliptonic <shopinthewoods@gmail.com>
-
-Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
---- a/src/Mod/Path/PathScripts/PathSanity.py
-+++ b/src/Mod/Path/PathScripts/PathSanity.py
-@@ -412,8 +412,7 @@ class CommandPathSanity:
- FreeCAD.Console.PrintMessage('asciidoc file written to {}\n'.format(reportraw))
-
- try:
-- result = os.system('asciidoctor {} -o {}'.format(reportraw,
-- reporthtml))
-+ result = subprocess.run(["asciidoctor", reportraw, "-o", reporthtml])
- if str(result) == "32512":
- msg = "asciidoctor not found. html cannot be generated."
- QtGui.QMessageBox.information(None, "Path Sanity", msg)
---
-2.35.0
-
diff --git a/media-gfx/freecad/files/freecad-0.19.2-0002-fix-femtest-failure-with-yaml-load.patch b/media-gfx/freecad/files/freecad-0.19.2-0002-fix-femtest-failure-with-yaml-load.patch
deleted file mode 100644
index 17da18c2b12c..000000000000
--- a/media-gfx/freecad/files/freecad-0.19.2-0002-fix-femtest-failure-with-yaml-load.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From a8314fdc56bb39f5af85e1678a03d613bfb9ee03 Mon Sep 17 00:00:00 2001
-From: Bernd Waibel <waebbl-gentoo@posteo.net>
-Date: Mon, 26 Apr 2021 19:32:54 +0200
-Subject: [PATCH] fix femtest failure with yaml load
-
-Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
----
- src/Mod/Fem/feminout/importYamlJsonMesh.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/Mod/Fem/feminout/importYamlJsonMesh.py b/src/Mod/Fem/feminout/importYamlJsonMesh.py
-index 9886248..aff83a5 100644
---- a/src/Mod/Fem/feminout/importYamlJsonMesh.py
-+++ b/src/Mod/Fem/feminout/importYamlJsonMesh.py
-@@ -162,7 +162,7 @@ def read(
- or fileExtension.lower() == ".yml"
- ) and has_yaml:
- fp = pyopen(fileString, "rt")
-- raw_mesh_data = yaml.load(fp)
-+ raw_mesh_data = yaml.load(fp, Loader=yaml.SafeLoader)
- fp.close()
- else:
- Console.PrintError(
---
-2.31.1
-
diff --git a/media-gfx/freecad/files/freecad-0.19.2-0003-fix-test-when-built-without-GUI.patch b/media-gfx/freecad/files/freecad-0.19.2-0003-fix-test-when-built-without-GUI.patch
deleted file mode 100644
index 33892ade6d5a..000000000000
--- a/media-gfx/freecad/files/freecad-0.19.2-0003-fix-test-when-built-without-GUI.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From d7ea5a0f20888a2ddae3eb48e508e9067662cdc7 Mon Sep 17 00:00:00 2001
-From: Bernd Waibel <waebbl-gentoo@posteo.net>
-Date: Wed, 28 Apr 2021 08:57:53 +0200
-Subject: [PATCH] fix test when built without GUI
-
-Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
----
- src/Mod/Arch/ArchRoof.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/Mod/Arch/ArchRoof.py b/src/Mod/Arch/ArchRoof.py
-index 99130d0..e2c2955 100644
---- a/src/Mod/Arch/ArchRoof.py
-+++ b/src/Mod/Arch/ArchRoof.py
-@@ -22,7 +22,6 @@
- import math
-
- import ArchComponent
--import Arch_rc
- import Draft
- import DraftGeomUtils
- import DraftVecUtils
-@@ -32,6 +31,7 @@ import Part
- from FreeCAD import Vector
-
- if FreeCAD.GuiUp:
-+ import Arch_rc
- import FreeCADGui
- from PySide import QtCore, QtGui
- from DraftTools import translate
---
-2.31.1
-
diff --git a/media-gfx/freecad/files/freecad-0.19.2-0007-fix-build-failure-with-opencascade-7.5.2.patch b/media-gfx/freecad/files/freecad-0.19.2-0007-fix-build-failure-with-opencascade-7.5.2.patch
deleted file mode 100644
index 46c69326129a..000000000000
--- a/media-gfx/freecad/files/freecad-0.19.2-0007-fix-build-failure-with-opencascade-7.5.2.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From bbbaf3e27d39767ba0b3de998b9d8d5fd42a681f Mon Sep 17 00:00:00 2001
-From: Bernd Waibel <waebbl-gentoo@posteo.net>
-Date: Sun, 20 Jun 2021 16:24:04 +0200
-Subject: [PATCH] fix build failure with opencascade-7.5.2
-
-For patch, see
-https://forum.freecadweb.org/viewtopic.php?f=4&t=58090&sid=07aca55f0513162234c40bc4bd6e4044#p503286
-
-Upstream issue at https://tracker.dev.opencascade.org/view.php?id=32328
-
-Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
----
- src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp b/src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp
-index a268fce..3def142 100644
---- a/src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp
-+++ b/src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp
-@@ -27,6 +27,7 @@
- # include <Standard_Failure.hxx>
- #endif
-
-+#include <TopoDS_Edge.hxx>
- #include "ShapeUpgrade/UnifySameDomainPy.h"
- #include "ShapeUpgrade/UnifySameDomainPy.cpp"
- #include "TopoShapePy.h"
---
-2.32.0
-
diff --git a/media-gfx/freecad/files/freecad-0.19.4-backport-correctly-find-PySide2Tools.patch b/media-gfx/freecad/files/freecad-0.19.4-backport-correctly-find-PySide2Tools.patch
new file mode 100644
index 000000000000..b297727033db
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.19.4-backport-correctly-find-PySide2Tools.patch
@@ -0,0 +1,106 @@
+From https://github.com/FreeCAD/FreeCAD/tree/6b062b25e118fc6d260d8caff6cf46fafd6cfa0f
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sat, 2 Apr 2022 09:30:09 +0200
+Subject: [PATCH] backport correctly find PySide2Tools
+
+Backported from current HEAD
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/cMake/FindPySide2Tools.cmake
++++ b/cMake/FindPySide2Tools.cmake
+@@ -23,7 +23,7 @@ endif(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ # Since Qt v5.14, pyside2-uic and pyside2-rcc are directly provided by Qt5Core uic and rcc, with '-g python' option
+ # We test Qt5Core version to act accordingly
+
+-FIND_PACKAGE(Qt5Core)
++FIND_PACKAGE(Qt5 COMPONENTS Core)
+
+ IF(Qt5Core_VERSION VERSION_LESS 5.14)
+ # Legacy (< 5.14)
+@@ -33,13 +33,20 @@ IF(Qt5Core_VERSION VERSION_LESS 5.14)
+ set(RCCOPTIONS "")
+ ELSE(Qt5Core_VERSION VERSION_LESS 5.14)
+ # New (>= 5.14)
+- FIND_PROGRAM(PYSIDE2UICBINARY NAMES uic-qt5 uic pyside2-uic)
+- set(UICOPTIONS "--generator=python")
+- FIND_PROGRAM(PYSIDE2RCCBINARY NAMES rcc-qt5 rcc pyside2-rcc)
+- set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1")
++ if (TARGET Qt::uic)
++ get_property(PYSIDE2UICBINARY TARGET Qt::uic PROPERTY LOCATION)
++ set(UICOPTIONS "--generator=python")
++ endif()
++ if (TARGET Qt::rcc)
++ get_property(PYSIDE2RCCBINARY TARGET Qt::rcc PROPERTY LOCATION)
++ set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1")
++ endif()
+ ENDIF(Qt5Core_VERSION VERSION_LESS 5.14)
+
+ MACRO(PYSIDE_WRAP_UI outfiles)
++ if (NOT PYSIDE2UICBINARY)
++ message(FATAL_ERROR "Qt uic is required for generating ${ARGN}")
++ endif()
+ FOREACH(it ${ARGN})
+ GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
+ GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
+@@ -58,7 +65,7 @@ MACRO(PYSIDE_WRAP_UI outfiles)
+ # we follow the tool command with in-place sed.
+ ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+ COMMAND "${PYSIDE2UICBINARY}" ${UICOPTIONS} "${infile}" -o "${outfile}"
+- COMMAND sed -i "/^# /d" "${outfile}"
++ COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
+ MAIN_DEPENDENCY "${infile}"
+ )
+ endif()
+@@ -67,6 +74,9 @@ MACRO(PYSIDE_WRAP_UI outfiles)
+ ENDMACRO (PYSIDE_WRAP_UI)
+
+ MACRO(PYSIDE_WRAP_RC outfiles)
++ if (NOT PYSIDE2RCCBINARY)
++ message(FATAL_ERROR "Qt rcc is required for generating ${ARGN}")
++ endif()
+ FOREACH(it ${ARGN})
+ GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
+ GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
+@@ -85,7 +95,7 @@ MACRO(PYSIDE_WRAP_RC outfiles)
+ # we follow the tool command with in-place sed.
+ ADD_CUSTOM_COMMAND(OUTPUT "${outfile}"
+ COMMAND "${PYSIDE2RCCBINARY}" ${RCCOPTIONS} "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
+- COMMAND sed -i "/^# /d" "${outfile}"
++ COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
+ MAIN_DEPENDENCY "${infile}"
+ )
+ endif()
+@@ -93,20 +103,17 @@ MACRO(PYSIDE_WRAP_RC outfiles)
+ ENDFOREACH(it)
+ ENDMACRO (PYSIDE_WRAP_RC)
+
+-IF(EXISTS ${PYSIDE2UICBINARY} AND EXISTS ${PYSIDE2RCCBINARY})
+- set(PYSIDE2_TOOLS_FOUND TRUE)
+-ENDIF(EXISTS ${PYSIDE2UICBINARY} AND EXISTS ${PYSIDE2RCCBINARY})
+-
+ if(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY)
++ set(PYSIDE2_TOOLS_FOUND TRUE)
++ if (NOT PySide2Tools_FIND_QUIETLY)
++ message(STATUS "Found PySide2 tools: ${PYSIDE2UICBINARY}, ${PYSIDE2RCCBINARY}")
++ endif (NOT PySide2Tools_FIND_QUIETLY)
++else(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY)
++ if(PySide2Tools_FIND_REQUIRED)
++ message(FATAL_ERROR "PySide2 tools could not be found, but are required.")
++ else(PySide2Tools_FIND_REQUIRED)
+ if (NOT PySide2Tools_FIND_QUIETLY)
+- message(STATUS "Found PySide2 tools: ${PYSIDE2UICBINARY}, ${PYSIDE2RCCBINARY}")
++ message(STATUS "PySide2 tools: not found.")
+ endif (NOT PySide2Tools_FIND_QUIETLY)
+-else(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY)
+- if(PySide2Tools_FIND_REQUIRED)
+- message(FATAL_ERROR "PySide2 tools could not be found, but are required.")
+- else(PySide2Tools_FIND_REQUIRED)
+- if (NOT PySide2Tools_FIND_QUIETLY)
+- message(STATUS "PySide2 tools: not found.")
+- endif (NOT PySide2Tools_FIND_QUIETLY)
+- endif(PySide2Tools_FIND_REQUIRED)
++ endif(PySide2Tools_FIND_REQUIRED)
+ endif(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY)
+--
+2.35.1
+