1 |
commit: a45e193674d314658e13674229d19703d7cbdc47 |
2 |
Author: Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net> |
3 |
AuthorDate: Sat Apr 2 12:20:35 2022 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 2 12:57:33 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a45e1936 |
7 |
|
8 |
media-gfx/freecad: drop 0.19.2-r7 |
9 |
|
10 |
Drop the version instead of backporting to this version. |
11 |
Use 0.19.4 instead. |
12 |
See discussion on https://github.com/gentoo/gentoo/pull/24861 |
13 |
|
14 |
Bug: https://bugs.gentoo.org/836433 |
15 |
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net> |
16 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
17 |
|
18 |
media-gfx/freecad/Manifest | 1 - |
19 |
...-0004809-Security-vulnerability-in-DWG-im.patch | 59 ---- |
20 |
...-0001-fix-failing-test-workbench-testcase.patch | 26 -- |
21 |
...-Use-run-instead-of-Popen-to-avoid-need-f.patch | 25 -- |
22 |
...2-0002-fix-femtest-failure-with-yaml-load.patch | 26 -- |
23 |
...19.2-0003-fix-test-when-built-without-GUI.patch | 33 --- |
24 |
...-fix-build-failure-with-opencascade-7.5.2.patch | 30 -- |
25 |
media-gfx/freecad/freecad-0.19.2-r7.ebuild | 324 --------------------- |
26 |
8 files changed, 524 deletions(-) |
27 |
|
28 |
diff --git a/media-gfx/freecad/Manifest b/media-gfx/freecad/Manifest |
29 |
index 02d737572cc2..23eb9682d4ed 100644 |
30 |
--- a/media-gfx/freecad/Manifest |
31 |
+++ b/media-gfx/freecad/Manifest |
32 |
@@ -1,3 +1,2 @@ |
33 |
DIST freecad-0.19.2-0005-Make-smesh-compile-with-vtk9.patch.xz 5368 BLAKE2B 69bafefd049effe3c31719bb2c23d32e8ba7ad58235c58ac8279ba6c036feaf1b97d5751cf2d68896e7489803103b2d0f92f76e61b3ccc97ef05a95b337ca5c2 SHA512 66585cc13fb3b0b026cf9dbd761c8ba1c1fe4d4f7db2e144ddd97706e02ccd78f4a43ac7cd93ddcae6e73933bf41d4cbd4d94bcdff8804b81378a6d946c7b070 |
34 |
-DIST freecad-0.19.2.tar.gz 296987961 BLAKE2B 3c21359c71f7ac5a49cc4b4be437dfce02f2af73dfc526a3955547718ee41c461fc787d029a9a77374d58516d7c56fec6982fe6d38ab17fbc30c0a94929136bf SHA512 420f00e696725cbd31c936c47b6ac226d866a17c7b7683ad381b8dd5edaffc7dfb1a3c4238c08e8b4fd34ef0c08d7c244cb7797012e596df1ce0a4f6e3be6b72 |
35 |
DIST freecad-0.19.4.tar.gz 296990652 BLAKE2B 6b252198616f7731144d000307a7f186eb2b24e07b85e008d0aae0f60a732fef5598c06c5c66b70fa44114f05afbc7d81b15c71bbb147bc2e458ea90cc81ee45 SHA512 58e5e6bb4ed40ce7f3a0b653cdb0371208189b9ca266f1c29a8f9077c4e56861b3925f695718fba34781254220f8a8919a2e2a501d43573b2c733f8b21c12c1f |
36 |
|
37 |
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 |
38 |
deleted file mode 100644 |
39 |
index 2df44ff66ac8..000000000000 |
40 |
--- a/media-gfx/freecad/files/freecad-0.19.2-0001-Backport-of-0004809-Security-vulnerability-in-DWG-im.patch |
41 |
+++ /dev/null |
42 |
@@ -1,59 +0,0 @@ |
43 |
-From 4006e62860c73f0943e71c7da478256a7337941d Mon Sep 17 00:00:00 2001 |
44 |
-From: Bernd Waibel <waebbl-gentoo@××××××.net> |
45 |
-Date: Mon, 31 Jan 2022 08:12:35 +0100 |
46 |
-Subject: [PATCH 1/2] Backport of 0004809: Security vulnerability in DWG import |
47 |
- when using ODA file converter |
48 |
- |
49 |
-Original patch commit id 1742d7ff82af1653253c4a4183c262c9af3b26d6 by |
50 |
-wmayer <wmayer@×××××××××××××××××.net>. |
51 |
- |
52 |
-Signed-off-by: Bernd Waibel <waebbl-gentoo@××××××.net> |
53 |
---- a/src/Mod/Draft/importDWG.py |
54 |
-+++ b/src/Mod/Draft/importDWG.py |
55 |
-@@ -44,8 +44,6 @@ https://knowledge.autodesk.com/support/autocad/downloads/ |
56 |
- # * * |
57 |
- # *************************************************************************** |
58 |
- |
59 |
--# TODO: use subprocess.popen() instead of subprocess.call() |
60 |
-- |
61 |
- import six |
62 |
- import FreeCAD |
63 |
- from FreeCAD import Console as FCC |
64 |
-@@ -217,15 +215,10 @@ def convertToDxf(dwgfilename): |
65 |
- indir = os.path.dirname(dwgfilename) |
66 |
- outdir = tempfile.mkdtemp() |
67 |
- basename = os.path.basename(dwgfilename) |
68 |
-- cmdline = ('"%s" "%s" "%s" "ACAD2000" "DXF" "0" "1" "%s"' |
69 |
-- % (teigha, indir, outdir, basename)) |
70 |
-- FCC.PrintMessage(translate("ImportDWG", "Converting: ") |
71 |
-- + cmdline + "\n") |
72 |
-- if six.PY2: |
73 |
-- if isinstance(cmdline, six.text_type): |
74 |
-- encoding = sys.getfilesystemencoding() |
75 |
-- cmdline = cmdline.encode(encoding) |
76 |
-- subprocess.call(cmdline, shell=True) # os.system(cmdline) |
77 |
-+ cmdline = [teigha, indir, outdir, "ACAD2000", "DXF", "0", "1", basename] |
78 |
-+ FCC.PrintMessage(translate("draft", "Converting:") + " " + str(cmdline) + "\n") |
79 |
-+ proc = subprocess.Popen(cmdline) |
80 |
-+ proc.communicate() |
81 |
- result = outdir + os.sep + os.path.splitext(basename)[0] + ".dxf" |
82 |
- if os.path.exists(result): |
83 |
- FCC.PrintMessage(translate("ImportDWG", |
84 |
-@@ -270,10 +263,9 @@ def convertToDwg(dxffilename, dwgfilename): |
85 |
- indir = os.path.dirname(dxffilename) |
86 |
- outdir = os.path.dirname(dwgfilename) |
87 |
- basename = os.path.basename(dxffilename) |
88 |
-- cmdline = ('"%s" "%s" "%s" "ACAD2000" "DWG" "0" "1" "%s"' |
89 |
-- % (teigha, indir, outdir, basename)) |
90 |
-- FCC.PrintMessage(translate("ImportDWG", "Converting: ") |
91 |
-- + cmdline + "\n") |
92 |
-- subprocess.call(cmdline, shell=True) # os.system(cmdline) |
93 |
-+ cmdline = [teigha, indir, outdir, "ACAD2000", "DWG", "0", "1", basename] |
94 |
-+ FCC.PrintMessage(translate("draft", "Converting:") + " " + str(cmdline) + "\n") |
95 |
-+ proc = subprocess.Popen(cmdline) |
96 |
-+ proc.communicate() |
97 |
- return dwgfilename |
98 |
- return None |
99 |
--- |
100 |
-2.35.0 |
101 |
- |
102 |
|
103 |
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 |
104 |
deleted file mode 100644 |
105 |
index 58107fb544d1..000000000000 |
106 |
--- a/media-gfx/freecad/files/freecad-0.19.2-0001-fix-failing-test-workbench-testcase.patch |
107 |
+++ /dev/null |
108 |
@@ -1,26 +0,0 @@ |
109 |
-From dc04c745ea1e7dc277ab06fab69a2b91fbf543c5 Mon Sep 17 00:00:00 2001 |
110 |
-From: Bernd Waibel <waebbl-gentoo@××××××.net> |
111 |
-Date: Sun, 25 Apr 2021 23:02:39 +0200 |
112 |
-Subject: [PATCH] fix failing test workbench testcase |
113 |
- |
114 |
-Signed-off-by: Bernd Waibel <waebbl-gentoo@××××××.net> |
115 |
---- |
116 |
- src/Mod/Test/Document.py | 2 +- |
117 |
- 1 file changed, 1 insertion(+), 1 deletion(-) |
118 |
- |
119 |
-diff --git a/src/Mod/Test/Document.py b/src/Mod/Test/Document.py |
120 |
-index e41375c..fd5eb15 100644 |
121 |
---- a/src/Mod/Test/Document.py |
122 |
-+++ b/src/Mod/Test/Document.py |
123 |
-@@ -1307,7 +1307,7 @@ class DocumentFileIncludeCases(unittest.TestCase): |
124 |
- # copy file from L5 which is in the same directory |
125 |
- L7 = doc2.addObject("App::DocumentObjectFileIncluded","FileObject3") |
126 |
- L7.File = (L5.File,"Copy.txt") |
127 |
-- self.failUnless(os.path.exists(L5.File)) |
128 |
-+ self.failUnless(os.path.exists(L7.File)) |
129 |
- FreeCAD.closeDocument("Doc2") |
130 |
- |
131 |
- |
132 |
--- |
133 |
-2.31.1 |
134 |
- |
135 |
|
136 |
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 |
137 |
deleted file mode 100644 |
138 |
index 9b043bd34563..000000000000 |
139 |
--- a/media-gfx/freecad/files/freecad-0.19.2-0002-Backport-of-Use-run-instead-of-Popen-to-avoid-need-f.patch |
140 |
+++ /dev/null |
141 |
@@ -1,25 +0,0 @@ |
142 |
-From 937d8ca9bf4c50f8a7dc0fbcf9e6ac23b0fbe033 Mon Sep 17 00:00:00 2001 |
143 |
-From: Bernd Waibel <waebbl-gentoo@××××××.net> |
144 |
-Date: Mon, 31 Jan 2022 08:17:24 +0100 |
145 |
-Subject: [PATCH 2/2] Backport of Use run() instead of Popen() to avoid need |
146 |
- for communicate |
147 |
- |
148 |
-Original patch commit id a65dbc6f8296562a12407a36f4931a80bbb628b7 by |
149 |
-sliptonic <shopinthewoods@×××××.com> |
150 |
- |
151 |
-Signed-off-by: Bernd Waibel <waebbl-gentoo@××××××.net> |
152 |
---- a/src/Mod/Path/PathScripts/PathSanity.py |
153 |
-+++ b/src/Mod/Path/PathScripts/PathSanity.py |
154 |
-@@ -412,8 +412,7 @@ class CommandPathSanity: |
155 |
- FreeCAD.Console.PrintMessage('asciidoc file written to {}\n'.format(reportraw)) |
156 |
- |
157 |
- try: |
158 |
-- result = os.system('asciidoctor {} -o {}'.format(reportraw, |
159 |
-- reporthtml)) |
160 |
-+ result = subprocess.run(["asciidoctor", reportraw, "-o", reporthtml]) |
161 |
- if str(result) == "32512": |
162 |
- msg = "asciidoctor not found. html cannot be generated." |
163 |
- QtGui.QMessageBox.information(None, "Path Sanity", msg) |
164 |
--- |
165 |
-2.35.0 |
166 |
- |
167 |
|
168 |
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 |
169 |
deleted file mode 100644 |
170 |
index 17da18c2b12c..000000000000 |
171 |
--- a/media-gfx/freecad/files/freecad-0.19.2-0002-fix-femtest-failure-with-yaml-load.patch |
172 |
+++ /dev/null |
173 |
@@ -1,26 +0,0 @@ |
174 |
-From a8314fdc56bb39f5af85e1678a03d613bfb9ee03 Mon Sep 17 00:00:00 2001 |
175 |
-From: Bernd Waibel <waebbl-gentoo@××××××.net> |
176 |
-Date: Mon, 26 Apr 2021 19:32:54 +0200 |
177 |
-Subject: [PATCH] fix femtest failure with yaml load |
178 |
- |
179 |
-Signed-off-by: Bernd Waibel <waebbl-gentoo@××××××.net> |
180 |
---- |
181 |
- src/Mod/Fem/feminout/importYamlJsonMesh.py | 2 +- |
182 |
- 1 file changed, 1 insertion(+), 1 deletion(-) |
183 |
- |
184 |
-diff --git a/src/Mod/Fem/feminout/importYamlJsonMesh.py b/src/Mod/Fem/feminout/importYamlJsonMesh.py |
185 |
-index 9886248..aff83a5 100644 |
186 |
---- a/src/Mod/Fem/feminout/importYamlJsonMesh.py |
187 |
-+++ b/src/Mod/Fem/feminout/importYamlJsonMesh.py |
188 |
-@@ -162,7 +162,7 @@ def read( |
189 |
- or fileExtension.lower() == ".yml" |
190 |
- ) and has_yaml: |
191 |
- fp = pyopen(fileString, "rt") |
192 |
-- raw_mesh_data = yaml.load(fp) |
193 |
-+ raw_mesh_data = yaml.load(fp, Loader=yaml.SafeLoader) |
194 |
- fp.close() |
195 |
- else: |
196 |
- Console.PrintError( |
197 |
--- |
198 |
-2.31.1 |
199 |
- |
200 |
|
201 |
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 |
202 |
deleted file mode 100644 |
203 |
index 33892ade6d5a..000000000000 |
204 |
--- a/media-gfx/freecad/files/freecad-0.19.2-0003-fix-test-when-built-without-GUI.patch |
205 |
+++ /dev/null |
206 |
@@ -1,33 +0,0 @@ |
207 |
-From d7ea5a0f20888a2ddae3eb48e508e9067662cdc7 Mon Sep 17 00:00:00 2001 |
208 |
-From: Bernd Waibel <waebbl-gentoo@××××××.net> |
209 |
-Date: Wed, 28 Apr 2021 08:57:53 +0200 |
210 |
-Subject: [PATCH] fix test when built without GUI |
211 |
- |
212 |
-Signed-off-by: Bernd Waibel <waebbl-gentoo@××××××.net> |
213 |
---- |
214 |
- src/Mod/Arch/ArchRoof.py | 2 +- |
215 |
- 1 file changed, 1 insertion(+), 1 deletion(-) |
216 |
- |
217 |
-diff --git a/src/Mod/Arch/ArchRoof.py b/src/Mod/Arch/ArchRoof.py |
218 |
-index 99130d0..e2c2955 100644 |
219 |
---- a/src/Mod/Arch/ArchRoof.py |
220 |
-+++ b/src/Mod/Arch/ArchRoof.py |
221 |
-@@ -22,7 +22,6 @@ |
222 |
- import math |
223 |
- |
224 |
- import ArchComponent |
225 |
--import Arch_rc |
226 |
- import Draft |
227 |
- import DraftGeomUtils |
228 |
- import DraftVecUtils |
229 |
-@@ -32,6 +31,7 @@ import Part |
230 |
- from FreeCAD import Vector |
231 |
- |
232 |
- if FreeCAD.GuiUp: |
233 |
-+ import Arch_rc |
234 |
- import FreeCADGui |
235 |
- from PySide import QtCore, QtGui |
236 |
- from DraftTools import translate |
237 |
--- |
238 |
-2.31.1 |
239 |
- |
240 |
|
241 |
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 |
242 |
deleted file mode 100644 |
243 |
index 46c69326129a..000000000000 |
244 |
--- a/media-gfx/freecad/files/freecad-0.19.2-0007-fix-build-failure-with-opencascade-7.5.2.patch |
245 |
+++ /dev/null |
246 |
@@ -1,30 +0,0 @@ |
247 |
-From bbbaf3e27d39767ba0b3de998b9d8d5fd42a681f Mon Sep 17 00:00:00 2001 |
248 |
-From: Bernd Waibel <waebbl-gentoo@××××××.net> |
249 |
-Date: Sun, 20 Jun 2021 16:24:04 +0200 |
250 |
-Subject: [PATCH] fix build failure with opencascade-7.5.2 |
251 |
- |
252 |
-For patch, see |
253 |
-https://forum.freecadweb.org/viewtopic.php?f=4&t=58090&sid=07aca55f0513162234c40bc4bd6e4044#p503286 |
254 |
- |
255 |
-Upstream issue at https://tracker.dev.opencascade.org/view.php?id=32328 |
256 |
- |
257 |
-Signed-off-by: Bernd Waibel <waebbl-gentoo@××××××.net> |
258 |
---- |
259 |
- src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp | 1 + |
260 |
- 1 file changed, 1 insertion(+) |
261 |
- |
262 |
-diff --git a/src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp b/src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp |
263 |
-index a268fce..3def142 100644 |
264 |
---- a/src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp |
265 |
-+++ b/src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp |
266 |
-@@ -27,6 +27,7 @@ |
267 |
- # include <Standard_Failure.hxx> |
268 |
- #endif |
269 |
- |
270 |
-+#include <TopoDS_Edge.hxx> |
271 |
- #include "ShapeUpgrade/UnifySameDomainPy.h" |
272 |
- #include "ShapeUpgrade/UnifySameDomainPy.cpp" |
273 |
- #include "TopoShapePy.h" |
274 |
--- |
275 |
-2.32.0 |
276 |
- |
277 |
|
278 |
diff --git a/media-gfx/freecad/freecad-0.19.2-r7.ebuild b/media-gfx/freecad/freecad-0.19.2-r7.ebuild |
279 |
deleted file mode 100644 |
280 |
index aa2041fd5f01..000000000000 |
281 |
--- a/media-gfx/freecad/freecad-0.19.2-r7.ebuild |
282 |
+++ /dev/null |
283 |
@@ -1,324 +0,0 @@ |
284 |
-# Copyright 1999-2022 Gentoo Authors |
285 |
-# Distributed under the terms of the GNU General Public License v2 |
286 |
- |
287 |
-EAPI=8 |
288 |
- |
289 |
-PYTHON_COMPAT=( python3_{8,9} ) |
290 |
- |
291 |
-inherit check-reqs cmake optfeature python-single-r1 xdg |
292 |
- |
293 |
-DESCRIPTION="QT based Computer Aided Design application" |
294 |
-HOMEPAGE="https://www.freecadweb.org/ https://github.com/FreeCAD/FreeCAD" |
295 |
- |
296 |
-MY_PN=FreeCAD |
297 |
- |
298 |
-if [[ ${PV} = *9999 ]]; then |
299 |
- inherit git-r3 |
300 |
- EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git" |
301 |
- S="${WORKDIR}/freecad-${PV}" |
302 |
-else |
303 |
- MY_PV=$(ver_cut 1-2) |
304 |
- MY_PV=$(ver_rs 1 '_' ${MY_PV}) |
305 |
- SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz |
306 |
- https://raw.githubusercontent.com/waebbl/waebbl-gentoo/master/patches/${P}-0005-Make-smesh-compile-with-vtk9.patch.xz" |
307 |
- KEYWORDS="~amd64" |
308 |
- S="${WORKDIR}/FreeCAD-${PV}" |
309 |
-fi |
310 |
- |
311 |
-# code is licensed LGPL-2 |
312 |
-# examples are licensed CC-BY-SA (without note of specific version) |
313 |
-LICENSE="LGPL-2 CC-BY-SA-4.0" |
314 |
-SLOT="0" |
315 |
-IUSE="debug headless pcl test" |
316 |
-RESTRICT="!test? ( test )" |
317 |
- |
318 |
-FREECAD_EXPERIMENTAL_MODULES="cloud plot ship" |
319 |
-FREECAD_STABLE_MODULES="addonmgr fem idf image inspection material |
320 |
- openscad part-design path points raytracing robot show surface |
321 |
- techdraw tux" |
322 |
- |
323 |
-for module in ${FREECAD_STABLE_MODULES}; do |
324 |
- IUSE="${IUSE} +${module}" |
325 |
-done |
326 |
-for module in ${FREECAD_EXPERIMENTAL_MODULES}; do |
327 |
- IUSE="${IUSE} ${module}" |
328 |
-done |
329 |
-unset module |
330 |
- |
331 |
-RDEPEND=" |
332 |
- ${PYTHON_DEPS} |
333 |
- dev-libs/OpenNI2[opengl(+)] |
334 |
- dev-libs/libspnav[X] |
335 |
- dev-libs/xerces-c[icu] |
336 |
- dev-qt/designer:5 |
337 |
- dev-qt/qtconcurrent:5 |
338 |
- dev-qt/qtcore:5 |
339 |
- dev-qt/qtgui:5 |
340 |
- dev-qt/qtnetwork:5 |
341 |
- dev-qt/qtopengl:5 |
342 |
- dev-qt/qtprintsupport:5 |
343 |
- dev-qt/qtsvg:5 |
344 |
- dev-qt/qtwebengine:5[widgets] |
345 |
- dev-qt/qtwidgets:5 |
346 |
- dev-qt/qtx11extras:5 |
347 |
- dev-qt/qtxml:5 |
348 |
- >=media-libs/coin-4.0.0 |
349 |
- media-libs/freetype |
350 |
- media-libs/qhull:= |
351 |
- sci-libs/flann[openmp] |
352 |
- sci-libs/hdf5:=[fortran,zlib] |
353 |
- >=sci-libs/med-4.0.0-r1[python,${PYTHON_SINGLE_USEDEP}] |
354 |
- <sci-libs/opencascade-7.6.0:=[vtk(+)] |
355 |
- sci-libs/orocos_kdl:= |
356 |
- sys-libs/zlib |
357 |
- virtual/glu |
358 |
- virtual/libusb:1 |
359 |
- virtual/opengl |
360 |
- cloud? ( |
361 |
- dev-libs/openssl:= |
362 |
- net-misc/curl |
363 |
- ) |
364 |
- fem? ( sci-libs/vtk:=[boost(+),python,qt5,rendering,${PYTHON_SINGLE_USEDEP}] ) |
365 |
- openscad? ( media-gfx/openscad ) |
366 |
- pcl? ( >=sci-libs/pcl-1.8.1:=[opengl,openni2(+),qt5(+),vtk(+)] ) |
367 |
- $(python_gen_cond_dep ' |
368 |
- dev-libs/boost:=[python,threads(+),${PYTHON_USEDEP}] |
369 |
- dev-python/matplotlib[${PYTHON_USEDEP}] |
370 |
- dev-python/numpy[${PYTHON_USEDEP}] |
371 |
- >=dev-python/pivy-0.6.5[${PYTHON_USEDEP}] |
372 |
- dev-python/pybind11[${PYTHON_USEDEP}] |
373 |
- dev-python/pyside2[gui,svg,${PYTHON_USEDEP}] |
374 |
- dev-python/shiboken2[${PYTHON_USEDEP}] |
375 |
- addonmgr? ( dev-python/GitPython[${PYTHON_USEDEP}] ) |
376 |
- fem? ( dev-python/ply[${PYTHON_USEDEP}] ) |
377 |
- ') |
378 |
-" |
379 |
-DEPEND=" |
380 |
- ${RDEPEND} |
381 |
- >=dev-cpp/eigen-3.3.1:3 |
382 |
-" |
383 |
-BDEPEND="dev-lang/swig" |
384 |
- |
385 |
-# To get required dependencies: |
386 |
-# 'grep REQUIRES_MODS cMake/FreeCAD_Helpers/CheckInterModuleDependencies.cmake' |
387 |
-# We set the following requirements by default: |
388 |
-# arch, draft, drawing, import, mesh, part, qt5, sketcher, spreadsheet, start, web. |
389 |
-# |
390 |
-# Additionally, we auto-enable mesh_part, flat_mesh and smesh |
391 |
-# Fem actually needs smesh, but as long as we don't have a smesh package, we enable |
392 |
-# smesh through the mesh USE flag. Note however, the fem<-smesh dependency isn't |
393 |
-# reflected by the REQUIRES_MODS macro, but at |
394 |
-# cMake/FreeCAD_Helpers/InitializeFreeCADBuildOptions.cmake:187. |
395 |
-# |
396 |
-# The increase in auto-enabled workbenches is due to their need in parts of the |
397 |
-# test suite when compiled with a minimal set of USE flags. |
398 |
-REQUIRED_USE=" |
399 |
- ${PYTHON_REQUIRED_USE} |
400 |
- inspection? ( points ) |
401 |
- path? ( robot ) |
402 |
- ship? ( image plot ) |
403 |
-" |
404 |
- |
405 |
-PATCHES=( |
406 |
- "${FILESDIR}"/${PN}-0.19_pre20201231-0003-Gentoo-specific-don-t-check-vcs.patch |
407 |
- "${FILESDIR}"/${PN}-0.19.1-0001-Gentoo-specific-Remove-ccache-usage.patch |
408 |
- "${FILESDIR}"/${P}-0001-fix-failing-test-workbench-testcase.patch |
409 |
- "${FILESDIR}"/${P}-0002-fix-femtest-failure-with-yaml-load.patch |
410 |
- "${FILESDIR}"/${P}-0003-fix-test-when-built-without-GUI.patch |
411 |
- "${WORKDIR}"/${P}-0005-Make-smesh-compile-with-vtk9.patch |
412 |
- "${FILESDIR}"/${P}-0006-add-boost-serialization-to-find_package.patch |
413 |
- "${FILESDIR}"/${P}-0007-fix-build-failure-with-opencascade-7.5.2.patch |
414 |
- "${FILESDIR}"/${P}-0001-Backport-of-0004809-Security-vulnerability-in-DWG-im.patch |
415 |
- "${FILESDIR}"/${P}-0002-Backport-of-Use-run-instead-of-Popen-to-avoid-need-f.patch |
416 |
-) |
417 |
- |
418 |
-DOCS=( CODE_OF_CONDUCT.md ChangeLog.txt README.md ) |
419 |
- |
420 |
-CHECKREQS_DISK_BUILD="2G" |
421 |
- |
422 |
-pkg_setup() { |
423 |
- check-reqs_pkg_setup |
424 |
- python-single-r1_pkg_setup |
425 |
- [[ -z ${CASROOT} ]] && die "\${CASROOT} not set, plesae run eselect opencascade" |
426 |
-} |
427 |
- |
428 |
-src_prepare() { |
429 |
- # the upstream provided file doesn't find the coin doc tag file, |
430 |
- # but cmake ships a working one, so we use this. |
431 |
- rm "${S}/cMake/FindCoin3D.cmake" || die |
432 |
- |
433 |
- # Fix desktop file |
434 |
- sed -e 's/Exec=FreeCAD/Exec=freecad/' -i src/XDGData/org.freecadweb.FreeCAD.desktop || die |
435 |
- |
436 |
- cmake_src_prepare |
437 |
-} |
438 |
- |
439 |
-src_configure() { |
440 |
- local mycmakeargs=( |
441 |
- -DBUILD_ADDONMGR=$(usex addonmgr) |
442 |
- -DBUILD_ARCH=ON |
443 |
- -DBUILD_ASSEMBLY=OFF # deprecated |
444 |
- -DBUILD_CLOUD=$(usex cloud) |
445 |
- -DBUILD_COMPLETE=OFF # deprecated |
446 |
- -DBUILD_DRAFT=ON |
447 |
- -DBUILD_DRAWING=ON |
448 |
- -DBUILD_ENABLE_CXX_STD:STRING="C++17" # needed for >=boost-1.77.0 |
449 |
- -DBUILD_FEM=$(usex fem) |
450 |
- -DBUILD_FEM_NETGEN=OFF |
451 |
- -DBUILD_FLAT_MESH=ON |
452 |
- -DBUILD_FORCE_DIRECTORY=ON # force building in a dedicated directory |
453 |
- -DBUILD_FREETYPE=ON # automagic dep |
454 |
- -DBUILD_GUI=$(usex !headless) |
455 |
- -DBUILD_IDF=$(usex idf) |
456 |
- -DBUILD_IMAGE=$(usex image) |
457 |
- -DBUILD_IMPORT=ON # import module for various file formats |
458 |
- -DBUILD_INSPECTION=$(usex inspection) |
459 |
- -DBUILD_JTREADER=OFF # code has been removed upstream, but option is still there |
460 |
- -DBUILD_MATERIAL=$(usex material) |
461 |
- -DBUILD_MESH=ON |
462 |
- -DBUILD_MESH_PART=ON |
463 |
- -DBUILD_OPENSCAD=$(usex openscad) |
464 |
- -DBUILD_PART=ON |
465 |
- -DBUILD_PART_DESIGN=$(usex part-design) |
466 |
- -DBUILD_PATH=$(usex path) |
467 |
- -DBUILD_PLOT=$(usex plot) # conflicts with possible external workbench |
468 |
- -DBUILD_POINTS=$(usex points) |
469 |
- -DBUILD_QT5=ON # OFF means to use Qt4 |
470 |
- -DBUILD_RAYTRACING=$(usex raytracing) |
471 |
- -DBUILD_REVERSEENGINEERING=OFF # currently only an empty sandbox |
472 |
- -DBUILD_ROBOT=$(usex robot) |
473 |
- -DBUILD_SHIP=$(usex ship) # conflicts with possible external workbench |
474 |
- -DBUILD_SHOW=$(usex show) |
475 |
- -DBUILD_SKETCHER=ON # needed by draft workspace |
476 |
- -DBUILD_SMESH=ON |
477 |
- -DBUILD_SPREADSHEET=ON |
478 |
- -DBUILD_START=ON |
479 |
- -DBUILD_SURFACE=$(usex surface) |
480 |
- -DBUILD_TECHDRAW=$(usex techdraw) |
481 |
- -DBUILD_TEST=ON # always build test workbench for run-time testing |
482 |
- -DBUILD_TUX=$(usex tux) |
483 |
- -DBUILD_VR=OFF |
484 |
- -DBUILD_WEB=ON # needed by start workspace |
485 |
- -DBUILD_WITH_CONDA=OFF |
486 |
- |
487 |
- -DCMAKE_INSTALL_DATADIR=/usr/share/${PN}/data |
488 |
- -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF} |
489 |
- -DCMAKE_INSTALL_INCLUDEDIR=/usr/include/${PN} |
490 |
- -DCMAKE_INSTALL_PREFIX=/usr/$(get_libdir)/${PN} |
491 |
- |
492 |
- -DFREECAD_BUILD_DEBIAN=OFF |
493 |
- |
494 |
- -DFREECAD_USE_EXTERNAL_KDL=ON |
495 |
- -DFREECAD_USE_EXTERNAL_SMESH=OFF # no package in Gentoo |
496 |
- -DFREECAD_USE_EXTERNAL_ZIPIOS=OFF # doesn't work yet, also no package in Gentoo tree |
497 |
- -DFREECAD_USE_FREETYPE=ON |
498 |
- -DFREECAD_USE_OCC_VARIANT:STRING="Official Version" |
499 |
- -DFREECAD_USE_PCL=$(usex pcl) |
500 |
- -DFREECAD_USE_PYBIND11=ON |
501 |
- -DFREECAD_USE_QT_FILEDIALOG=ON |
502 |
- -DFREECAD_USE_QTWEBMODULE:STRING="Qt WebEngine" |
503 |
- |
504 |
- # install python modules to site-packages' dir. True only for the main package, |
505 |
- # sub-packages will still be installed inside /usr/lib64/freecad |
506 |
- -DINSTALL_TO_SITEPACKAGES=ON |
507 |
- |
508 |
- # Use the version of shiboken2 that matches the selected python version |
509 |
- -DPYTHON_CONFIG_SUFFIX="-${EPYTHON}" |
510 |
- -DPython3_EXECUTABLE=${PYTHON} |
511 |
- ) |
512 |
- |
513 |
- if use debug; then |
514 |
- mycmakeargs+=( |
515 |
- -DBUILD_SANDBOX=ON |
516 |
- -DBUILD_TEMPLATE=ON |
517 |
- ) |
518 |
- else |
519 |
- mycmakeargs+=( |
520 |
- -DBUILD_SANDBOX=OFF |
521 |
- -DBUILD_TEMPLATE=OFF |
522 |
- ) |
523 |
- fi |
524 |
- |
525 |
- cmake_src_configure |
526 |
-} |
527 |
- |
528 |
-# We use the FreeCADCmd binary instead of the FreeCAD binary here |
529 |
-# for two reasons: |
530 |
-# 1. It works out of the box with USE=headless as well, not needing a guard |
531 |
-# 2. We don't need virtualx.eclass and it's dependencies |
532 |
-# The exported environment variables are needed, so freecad does know |
533 |
-# where to save it's temporary files, and where to look and write it's |
534 |
-# configuration. Without those, there are sandbox violation, when it |
535 |
-# tries to create /var/lib/portage/home/.FreeCAD directory. |
536 |
-src_test() { |
537 |
- pushd "${BUILD_DIR}" > /dev/null || die |
538 |
- export FREECAD_USER_HOME="${HOME}" |
539 |
- export FREECAD_USER_DATA="${T}" |
540 |
- export FREECAD_USER_TEMP="${T}" |
541 |
- nonfatal ./bin/FreeCADCmd --run-test 0 |
542 |
- popd > /dev/null || die |
543 |
-} |
544 |
- |
545 |
-src_install() { |
546 |
- cmake_src_install |
547 |
- |
548 |
- dobin src/Tools/freecad-thumbnailer |
549 |
- |
550 |
- if ! use headless; then |
551 |
- dosym -r /usr/$(get_libdir)/${PN}/bin/FreeCAD /usr/bin/freecad |
552 |
- mv "${ED}"/usr/$(get_libdir)/freecad/share/* "${ED}"/usr/share || die "failed to move shared ressources" |
553 |
- fi |
554 |
- dosym -r /usr/$(get_libdir)/${PN}/bin/FreeCADCmd /usr/bin/freecadcmd |
555 |
- |
556 |
- python_optimize "${ED}"/usr/share/${PN}/data/Mod/Start/StartPage "${ED}"/usr/$(get_libdir)/${PN}{/Ext,/Mod}/ |
557 |
- # compile main package in python site-packages as well |
558 |
- python_optimize |
559 |
-} |
560 |
- |
561 |
-pkg_postinst() { |
562 |
- xdg_pkg_postinst |
563 |
- |
564 |
- if use plot; then |
565 |
- einfo "Note: You are enabling the 'plot' USE flag." |
566 |
- einfo "This conflicts with the plot workbench that can be loaded" |
567 |
- einfo "via the addon manager! You can only install one of those." |
568 |
- fi |
569 |
- |
570 |
- if use ship; then |
571 |
- einfo "Note: You are enabling the 'ship' USE flag." |
572 |
- einfo "This conflicts with the ship workbench that can be loaded" |
573 |
- einfo "via the addon manager! You can only install one of those." |
574 |
- fi |
575 |
- |
576 |
- einfo "You can load a lot of additional workbenches using the integrated" |
577 |
- einfo "AddonManager." |
578 |
- |
579 |
- # ToDo: check opencv, pysolar (::science), elmerfem (::science) |
580 |
- # ifc++, ifcopenshell, netgen, z88 (no pkgs), calculix-ccx (::waebbl) |
581 |
- einfo "There are a lot of additional tools, for which FreeCAD has builtin" |
582 |
- einfo "support. Some of them are available in Gentoo. Take a look at" |
583 |
- einfo "https://wiki.freecadweb.org/Installing#External_software_supported_by_FreeCAD" |
584 |
- optfeature_header "Computational utilities" |
585 |
- optfeature "BLAS library" sci-libs/openblas |
586 |
- optfeature "Statistical computation with Python" dev-python/pandas |
587 |
- optfeature "Use scientific computation with Python" dev-python/scipy |
588 |
- optfeature "Use symbolic math with Python" dev-python/sympy |
589 |
- optfeature_header "Imaging, Plotting and Rendering utilities" |
590 |
- optfeature "Dependency graphs" media-gfx/graphviz |
591 |
- optfeature "PBR Rendering" media-gfx/povray |
592 |
- optfeature_header "Import / Export" |
593 |
- optfeature "Interact with git repositories" dev-python/GitPython |
594 |
- optfeature "Work with COLLADA documents" dev-python/pycollada |
595 |
- optfeature "YAML importer and emitter" dev-python/pyyaml |
596 |
- optfeature "Importing and exporting 2D AutoCAD DWG files" media-gfx/libredwg |
597 |
- optfeature "Importing and exporting geospatial data formats" sci-libs/gdal |
598 |
- optfeature "Working with projection data" sci-libs/proj |
599 |
- optfeature_header "Meshing and FEM" |
600 |
- optfeature "FEM mesh generator" sci-libs/gmsh |
601 |
- optfeature "Triangulating meshes" sci-libs/gts |
602 |
- optfeature "Visualization" sci-visualization/paraview |
603 |
-} |
604 |
- |
605 |
-pkg_postrm() { |
606 |
- xdg_pkg_postrm |
607 |
-} |