1 |
commit: 688c609c7edf5ac40dbdc89ef419187544e4319f |
2 |
Author: Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net> |
3 |
AuthorDate: Thu Feb 3 05:15:21 2022 +0000 |
4 |
Commit: John Helmert III <ajak <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 3 15:51:13 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=688c609c |
7 |
|
8 |
media-gfx/freecad: cleanup vulnerable versions |
9 |
|
10 |
Bug: https://bugs.gentoo.org/832209 |
11 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
12 |
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net> |
13 |
Closes: https://github.com/gentoo/gentoo/pull/24061 |
14 |
Signed-off-by: John Helmert III <ajak <AT> gentoo.org> |
15 |
|
16 |
media-gfx/freecad/freecad-0.19.2-r5.ebuild | 324 ----------------------------- |
17 |
1 file changed, 324 deletions(-) |
18 |
|
19 |
diff --git a/media-gfx/freecad/freecad-0.19.2-r5.ebuild b/media-gfx/freecad/freecad-0.19.2-r5.ebuild |
20 |
deleted file mode 100644 |
21 |
index 7ebeed8e3168..000000000000 |
22 |
--- a/media-gfx/freecad/freecad-0.19.2-r5.ebuild |
23 |
+++ /dev/null |
24 |
@@ -1,324 +0,0 @@ |
25 |
-# Copyright 1999-2021 Gentoo Authors |
26 |
-# Distributed under the terms of the GNU General Public License v2 |
27 |
- |
28 |
-EAPI=8 |
29 |
- |
30 |
-PYTHON_COMPAT=( python3_{8,9} ) |
31 |
- |
32 |
-inherit check-reqs cmake optfeature python-single-r1 xdg |
33 |
- |
34 |
-DESCRIPTION="QT based Computer Aided Design application" |
35 |
-HOMEPAGE="https://www.freecadweb.org/ https://github.com/FreeCAD/FreeCAD" |
36 |
- |
37 |
-MY_PN=FreeCAD |
38 |
- |
39 |
-if [[ ${PV} = *9999 ]]; then |
40 |
- inherit git-r3 |
41 |
- EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git" |
42 |
- S="${WORKDIR}/freecad-${PV}" |
43 |
-else |
44 |
- MY_PV=$(ver_cut 1-2) |
45 |
- MY_PV=$(ver_rs 1 '_' ${MY_PV}) |
46 |
- SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz |
47 |
- https://raw.githubusercontent.com/waebbl/waebbl-gentoo/master/patches/${P}-0005-Make-smesh-compile-with-vtk9.patch.xz" |
48 |
- KEYWORDS="~amd64" |
49 |
- S="${WORKDIR}/FreeCAD-${PV}" |
50 |
-fi |
51 |
- |
52 |
-# code is licensed LGPL-2 |
53 |
-# examples are licensed CC-BY-SA (without note of specific version) |
54 |
-LICENSE="LGPL-2 CC-BY-SA-4.0" |
55 |
-SLOT="0" |
56 |
-IUSE="debug headless pcl test" |
57 |
-RESTRICT="!test? ( test )" |
58 |
- |
59 |
-FREECAD_EXPERIMENTAL_MODULES="cloud plot ship" |
60 |
-FREECAD_STABLE_MODULES="addonmgr fem idf image inspection material |
61 |
- openscad part-design path points raytracing robot show surface |
62 |
- techdraw tux" |
63 |
- |
64 |
-for module in ${FREECAD_STABLE_MODULES}; do |
65 |
- IUSE="${IUSE} +${module}" |
66 |
-done |
67 |
-for module in ${FREECAD_EXPERIMENTAL_MODULES}; do |
68 |
- IUSE="${IUSE} ${module}" |
69 |
-done |
70 |
-unset module |
71 |
- |
72 |
-RDEPEND=" |
73 |
- ${PYTHON_DEPS} |
74 |
- dev-libs/OpenNI2[opengl(+)] |
75 |
- dev-libs/libspnav[X] |
76 |
- dev-libs/xerces-c[icu] |
77 |
- dev-qt/designer:5 |
78 |
- dev-qt/qtconcurrent:5 |
79 |
- dev-qt/qtcore:5 |
80 |
- dev-qt/qtgui:5 |
81 |
- dev-qt/qtnetwork:5 |
82 |
- dev-qt/qtopengl:5 |
83 |
- dev-qt/qtprintsupport:5 |
84 |
- dev-qt/qtsvg:5 |
85 |
- dev-qt/qtwebengine:5[widgets] |
86 |
- dev-qt/qtwidgets:5 |
87 |
- dev-qt/qtx11extras:5 |
88 |
- dev-qt/qtxml:5 |
89 |
- >=media-libs/coin-4.0.0 |
90 |
- media-libs/freetype |
91 |
- media-libs/qhull:= |
92 |
- sci-libs/flann[openmp] |
93 |
- sci-libs/hdf5:=[fortran,zlib] |
94 |
- >=sci-libs/med-4.0.0-r1[python,${PYTHON_SINGLE_USEDEP}] |
95 |
- <sci-libs/opencascade-7.6.0:=[vtk(+)] |
96 |
- sci-libs/orocos_kdl:= |
97 |
- sys-libs/zlib |
98 |
- virtual/glu |
99 |
- virtual/libusb:1 |
100 |
- virtual/opengl |
101 |
- cloud? ( |
102 |
- dev-libs/openssl:= |
103 |
- net-misc/curl |
104 |
- ) |
105 |
- fem? ( sci-libs/vtk:=[boost(+),python,qt5,rendering,${PYTHON_SINGLE_USEDEP}] ) |
106 |
- openscad? ( media-gfx/openscad ) |
107 |
- pcl? ( >=sci-libs/pcl-1.8.1:=[opengl,openni2(+),qt5(+),vtk(+)] ) |
108 |
- $(python_gen_cond_dep ' |
109 |
- dev-libs/boost:=[python,threads(+),${PYTHON_USEDEP}] |
110 |
- dev-python/matplotlib[${PYTHON_USEDEP}] |
111 |
- dev-python/numpy[${PYTHON_USEDEP}] |
112 |
- >=dev-python/pivy-0.6.5[${PYTHON_USEDEP}] |
113 |
- dev-python/pybind11[${PYTHON_USEDEP}] |
114 |
- dev-python/pyside2[gui,svg,${PYTHON_USEDEP}] |
115 |
- dev-python/shiboken2[${PYTHON_USEDEP}] |
116 |
- addonmgr? ( dev-python/GitPython[${PYTHON_USEDEP}] ) |
117 |
- fem? ( dev-python/ply[${PYTHON_USEDEP}] ) |
118 |
- ') |
119 |
-" |
120 |
-DEPEND=" |
121 |
- ${RDEPEND} |
122 |
- >=dev-cpp/eigen-3.3.1:3 |
123 |
-" |
124 |
-BDEPEND="dev-lang/swig" |
125 |
- |
126 |
-# To get required dependencies: |
127 |
-# 'grep REQUIRES_MODS cMake/FreeCAD_Helpers/CheckInterModuleDependencies.cmake' |
128 |
-# We set the following requirements by default: |
129 |
-# arch, draft, drawing, import, mesh, part, qt5, sketcher, spreadsheet, start, web. |
130 |
-# |
131 |
-# Additionally, we auto-enable mesh_part, flat_mesh and smesh |
132 |
-# Fem actually needs smesh, but as long as we don't have a smesh package, we enable |
133 |
-# smesh through the mesh USE flag. Note however, the fem<-smesh dependency isn't |
134 |
-# reflected by the REQUIRES_MODS macro, but at |
135 |
-# cMake/FreeCAD_Helpers/InitializeFreeCADBuildOptions.cmake:187. |
136 |
-# |
137 |
-# The increase in auto-enabled workbenches is due to their need in parts of the |
138 |
-# test suite when compiled with a minimal set of USE flags. |
139 |
-REQUIRED_USE=" |
140 |
- ${PYTHON_REQUIRED_USE} |
141 |
- inspection? ( points ) |
142 |
- path? ( robot ) |
143 |
- ship? ( image plot ) |
144 |
-" |
145 |
- |
146 |
-PATCHES=( |
147 |
- "${FILESDIR}"/${PN}-0.19_pre20201231-0003-Gentoo-specific-don-t-check-vcs.patch |
148 |
- "${FILESDIR}"/${PN}-0.19.1-0001-Gentoo-specific-Remove-ccache-usage.patch |
149 |
- "${FILESDIR}"/${P}-0001-fix-failing-test-workbench-testcase.patch |
150 |
- "${FILESDIR}"/${P}-0002-fix-femtest-failure-with-yaml-load.patch |
151 |
- "${FILESDIR}"/${P}-0003-fix-test-when-built-without-GUI.patch |
152 |
- "${WORKDIR}"/${P}-0005-Make-smesh-compile-with-vtk9.patch |
153 |
- "${FILESDIR}"/${P}-0006-add-boost-serialization-to-find_package.patch |
154 |
- "${FILESDIR}"/${P}-0007-fix-build-failure-with-opencascade-7.5.2.patch |
155 |
-) |
156 |
- |
157 |
-DOCS=( CODE_OF_CONDUCT.md ChangeLog.txt README.md ) |
158 |
- |
159 |
-CHECKREQS_DISK_BUILD="2G" |
160 |
- |
161 |
-pkg_setup() { |
162 |
- check-reqs_pkg_setup |
163 |
- python-single-r1_pkg_setup |
164 |
- [[ -z ${CASROOT} ]] && die "\${CASROOT} not set, plesae run eselect opencascade" |
165 |
-} |
166 |
- |
167 |
-src_prepare() { |
168 |
- # the upstream provided file doesn't find the coin doc tag file, |
169 |
- # but cmake ships a working one, so we use this. |
170 |
- rm "${S}/cMake/FindCoin3D.cmake" || die |
171 |
- |
172 |
- # Fix desktop file |
173 |
- sed -e 's/Exec=FreeCAD/Exec=freecad/' -i src/XDGData/org.freecadweb.FreeCAD.desktop || die |
174 |
- |
175 |
- cmake_src_prepare |
176 |
-} |
177 |
- |
178 |
-src_configure() { |
179 |
- local mycmakeargs=( |
180 |
- -DBUILD_ADDONMGR=$(usex addonmgr) |
181 |
- -DBUILD_ARCH=ON |
182 |
- -DBUILD_ASSEMBLY=OFF # deprecated |
183 |
- -DBUILD_CLOUD=$(usex cloud) |
184 |
- -DBUILD_COMPLETE=OFF # deprecated |
185 |
- -DBUILD_DRAFT=ON |
186 |
- -DBUILD_DRAWING=ON |
187 |
- -DBUILD_ENABLE_CXX_STD:STRING="C++17" # needed for >=boost-1.77.0 |
188 |
- -DBUILD_FEM=$(usex fem) |
189 |
- -DBUILD_FEM_NETGEN=OFF |
190 |
- -DBUILD_FLAT_MESH=ON |
191 |
- -DBUILD_FORCE_DIRECTORY=ON # force building in a dedicated directory |
192 |
- -DBUILD_FREETYPE=ON # automagic dep |
193 |
- -DBUILD_GUI=$(usex !headless) |
194 |
- -DBUILD_IDF=$(usex idf) |
195 |
- -DBUILD_IMAGE=$(usex image) |
196 |
- -DBUILD_IMPORT=ON # import module for various file formats |
197 |
- -DBUILD_INSPECTION=$(usex inspection) |
198 |
- -DBUILD_JTREADER=OFF # code has been removed upstream, but option is still there |
199 |
- -DBUILD_MATERIAL=$(usex material) |
200 |
- -DBUILD_MESH=ON |
201 |
- -DBUILD_MESH_PART=ON |
202 |
- -DBUILD_OPENSCAD=$(usex openscad) |
203 |
- -DBUILD_PART=ON |
204 |
- -DBUILD_PART_DESIGN=$(usex part-design) |
205 |
- -DBUILD_PATH=$(usex path) |
206 |
- -DBUILD_PLOT=$(usex plot) # conflicts with possible external workbench |
207 |
- -DBUILD_POINTS=$(usex points) |
208 |
- -DBUILD_QT5=ON # OFF means to use Qt4 |
209 |
- -DBUILD_RAYTRACING=$(usex raytracing) |
210 |
- -DBUILD_REVERSEENGINEERING=OFF # currently only an empty sandbox |
211 |
- -DBUILD_ROBOT=$(usex robot) |
212 |
- -DBUILD_SHIP=$(usex ship) # conflicts with possible external workbench |
213 |
- -DBUILD_SHOW=$(usex show) |
214 |
- -DBUILD_SKETCHER=ON # needed by draft workspace |
215 |
- -DBUILD_SMESH=ON |
216 |
- -DBUILD_SPREADSHEET=ON |
217 |
- -DBUILD_START=ON |
218 |
- -DBUILD_SURFACE=$(usex surface) |
219 |
- -DBUILD_TECHDRAW=$(usex techdraw) |
220 |
- -DBUILD_TEST=ON # always build test workbench for run-time testing |
221 |
- -DBUILD_TUX=$(usex tux) |
222 |
- -DBUILD_VR=OFF |
223 |
- -DBUILD_WEB=ON # needed by start workspace |
224 |
- -DBUILD_WITH_CONDA=OFF |
225 |
- |
226 |
- -DCMAKE_INSTALL_DATADIR=/usr/share/${PN}/data |
227 |
- -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF} |
228 |
- -DCMAKE_INSTALL_INCLUDEDIR=/usr/include/${PN} |
229 |
- -DCMAKE_INSTALL_PREFIX=/usr/$(get_libdir)/${PN} |
230 |
- |
231 |
- -DFREECAD_BUILD_DEBIAN=OFF |
232 |
- |
233 |
- -DFREECAD_USE_EXTERNAL_KDL=ON |
234 |
- -DFREECAD_USE_EXTERNAL_SMESH=OFF # no package in Gentoo |
235 |
- -DFREECAD_USE_EXTERNAL_ZIPIOS=OFF # doesn't work yet, also no package in Gentoo tree |
236 |
- -DFREECAD_USE_FREETYPE=ON |
237 |
- -DFREECAD_USE_OCC_VARIANT:STRING="Official Version" |
238 |
- -DFREECAD_USE_PCL=$(usex pcl) |
239 |
- -DFREECAD_USE_PYBIND11=ON |
240 |
- -DFREECAD_USE_QT_FILEDIALOG=ON |
241 |
- -DFREECAD_USE_QTWEBMODULE:STRING="Qt WebEngine" |
242 |
- |
243 |
- # install python modules to site-packages' dir. True only for the main package, |
244 |
- # sub-packages will still be installed inside /usr/lib64/freecad |
245 |
- -DINSTALL_TO_SITEPACKAGES=ON |
246 |
- |
247 |
- # Use the version of shiboken2 that matches the selected python version |
248 |
- -DPYTHON_CONFIG_SUFFIX="-${EPYTHON}" |
249 |
- -DPython3_EXECUTABLE=${PYTHON} |
250 |
- ) |
251 |
- |
252 |
- if use debug; then |
253 |
- mycmakeargs+=( |
254 |
- -DBUILD_SANDBOX=ON |
255 |
- -DBUILD_TEMPLATE=ON |
256 |
- ) |
257 |
- else |
258 |
- mycmakeargs+=( |
259 |
- -DBUILD_SANDBOX=OFF |
260 |
- -DBUILD_TEMPLATE=OFF |
261 |
- ) |
262 |
- fi |
263 |
- |
264 |
- cmake_src_configure |
265 |
-} |
266 |
- |
267 |
-# We use the FreeCADCmd binary instead of the FreeCAD binary here |
268 |
-# for two reasons: |
269 |
-# 1. It works out of the box with USE=headless as well, not needing a guard |
270 |
-# 2. We don't need virtualx.eclass and it's dependencies |
271 |
-# The exported environment variables are needed, so freecad does know |
272 |
-# where to save it's temporary files, and where to look and write it's |
273 |
-# configuration. Without those, there are sandbox violation, when it |
274 |
-# tries to create /var/lib/portage/home/.FreeCAD directory. |
275 |
-src_test() { |
276 |
- pushd "${BUILD_DIR}" > /dev/null || die |
277 |
- export FREECAD_USER_HOME="${HOME}" |
278 |
- export FREECAD_USER_DATA="${T}" |
279 |
- export FREECAD_USER_TEMP="${T}" |
280 |
- nonfatal ./bin/FreeCADCmd --run-test 0 |
281 |
- popd > /dev/null || die |
282 |
-} |
283 |
- |
284 |
-src_install() { |
285 |
- cmake_src_install |
286 |
- |
287 |
- dobin src/Tools/freecad-thumbnailer |
288 |
- |
289 |
- if ! use headless; then |
290 |
- dosym -r /usr/$(get_libdir)/${PN}/bin/FreeCAD /usr/bin/freecad |
291 |
- mv "${ED}"/usr/$(get_libdir)/freecad/share/* "${ED}"/usr/share || die "failed to move shared ressources" |
292 |
- fi |
293 |
- dosym -r /usr/$(get_libdir)/${PN}/bin/FreeCADCmd /usr/bin/freecadcmd |
294 |
- |
295 |
- python_optimize "${ED}"/usr/share/${PN}/data/Mod/Start/StartPage "${ED}"/usr/$(get_libdir)/${PN}{/Ext,/Mod}/ |
296 |
- # compile main package in python site-packages as well |
297 |
- python_optimize |
298 |
- |
299 |
- doenvd "${FILESDIR}/99${PN}" |
300 |
-} |
301 |
- |
302 |
-pkg_postinst() { |
303 |
- xdg_pkg_postinst |
304 |
- |
305 |
- if use plot; then |
306 |
- einfo "Note: You are enabling the 'plot' USE flag." |
307 |
- einfo "This conflicts with the plot workbench that can be loaded" |
308 |
- einfo "via the addon manager! You can only install one of those." |
309 |
- fi |
310 |
- |
311 |
- if use ship; then |
312 |
- einfo "Note: You are enabling the 'ship' USE flag." |
313 |
- einfo "This conflicts with the ship workbench that can be loaded" |
314 |
- einfo "via the addon manager! You can only install one of those." |
315 |
- fi |
316 |
- |
317 |
- einfo "You can load a lot of additional workbenches using the integrated" |
318 |
- einfo "AddonManager." |
319 |
- |
320 |
- # ToDo: check opencv, pysolar (::science), elmerfem (::science) |
321 |
- # ifc++, ifcopenshell, netgen, z88 (no pkgs), calculix-ccx (::waebbl) |
322 |
- einfo "There are a lot of additional tools, for which FreeCAD has builtin" |
323 |
- einfo "support. Some of them are available in Gentoo. Take a look at" |
324 |
- einfo "https://wiki.freecadweb.org/Installing#External_software_supported_by_FreeCAD" |
325 |
- optfeature_header "Computational utilities" |
326 |
- optfeature "BLAS library" sci-libs/openblas |
327 |
- optfeature "Statistical computation with Python" dev-python/pandas |
328 |
- optfeature "Use scientific computation with Python" dev-python/scipy |
329 |
- optfeature "Use symbolic math with Python" dev-python/sympy |
330 |
- optfeature_header "Imaging, Plotting and Rendering utilities" |
331 |
- optfeature "Dependency graphs" media-gfx/graphviz |
332 |
- optfeature "PBR Rendering" media-gfx/povray |
333 |
- optfeature_header "Import / Export" |
334 |
- optfeature "Interact with git repositories" dev-python/GitPython |
335 |
- optfeature "Work with COLLADA documents" dev-python/pycollada |
336 |
- optfeature "YAML importer and emitter" dev-python/pyyaml |
337 |
- optfeature "Importing and exporting 2D AutoCAD DWG files" media-gfx/libredwg |
338 |
- optfeature "Importing and exporting geospatial data formats" sci-libs/gdal |
339 |
- optfeature "Working with projection data" sci-libs/proj |
340 |
- optfeature_header "Meshing and FEM" |
341 |
- optfeature "FEM mesh generator" sci-libs/gmsh |
342 |
- optfeature "Triangulating meshes" sci-libs/gts |
343 |
- optfeature "Visualization" sci-visualization/paraview |
344 |
-} |
345 |
- |
346 |
-pkg_postrm() { |
347 |
- xdg_pkg_postrm |
348 |
-} |