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