commit: 6499c130f97644defd3b71d86c4af3b3b5c96c2a Author: Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net> AuthorDate: Sun Oct 17 19:55:29 2021 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Nov 2 10:04:37 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6499c130
media-gfx/freecad: install freecad-thumbnailer Can be used by file-managers to show previews for FreeCAD's .fcstd files. Additional changes: - bump to EAPI 8 - cleanup inherit statement - patch to build with boost-1.77.0 - soften sci-libs/pcl dependency. pcl-1.12 supports vtk-9, so there's no longer any need to use live ebuild - clean optfeature statments from packages which are installed anyway or controlled by USE flags - use C++17 Suggested-by: Michael Perlov <perlovka <AT> gmail.com> Bug: https://github.com/waebbl/waebbl-gentoo/issues/341 Closes: https://bugs.gentoo.org/821160 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net> Signed-off-by: Sam James <sam <AT> gentoo.org> ...9999-Add-memory-header-for-std-shared_ptr.patch | 31 ++++++++++++++++++++++ media-gfx/freecad/freecad-9999.ebuild | 24 ++++++++--------- 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a/media-gfx/freecad/files/freecad-9999-Add-memory-header-for-std-shared_ptr.patch b/media-gfx/freecad/files/freecad-9999-Add-memory-header-for-std-shared_ptr.patch new file mode 100644 index 00000000000..81a8f22d893 --- /dev/null +++ b/media-gfx/freecad/files/freecad-9999-Add-memory-header-for-std-shared_ptr.patch @@ -0,0 +1,31 @@ +From: Bernd Waibel <waebbl-gen...@posteo.net> +Date: Sat, 16 Oct 2021 17:02:19 +0200 +Subject: [PATCH] Add memory header for std::shared_ptr + +Signed-off-by: Bernd Waibel <waebbl-gen...@posteo.net> +--- + src/App/Metadata.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/App/Metadata.h b/src/App/Metadata.h +index de8be3ea8e..2c5fd8f417 100644 +--- a/src/App/Metadata.h ++++ b/src/App/Metadata.h +@@ -30,6 +30,7 @@ + #include <string> + #include <vector> + #include <map> ++#include <memory> + + #include <xercesc/dom/DOM.hpp> + #include <xercesc/parsers/XercesDOMParser.hpp> +@@ -296,4 +297,4 @@ namespace App { + + } + +-#endif +\ No newline at end of file ++#endif +-- +2.33.1 + diff --git a/media-gfx/freecad/freecad-9999.ebuild b/media-gfx/freecad/freecad-9999.ebuild index 8c0caca6adc..cef63f28477 100644 --- a/media-gfx/freecad/freecad-9999.ebuild +++ b/media-gfx/freecad/freecad-9999.ebuild @@ -1,11 +1,11 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 PYTHON_COMPAT=( python3_{8,9} ) -inherit check-reqs cmake desktop eapi8-dosym optfeature python-single-r1 xdg +inherit check-reqs cmake optfeature python-single-r1 xdg DESCRIPTION="QT based Computer Aided Design application" HOMEPAGE="https://www.freecadweb.org/ https://github.com/FreeCAD/FreeCAD" @@ -81,7 +81,7 @@ RDEPEND=" ) fem? ( sci-libs/vtk:=[boost,python,qt5,rendering,${PYTHON_SINGLE_USEDEP}] ) openscad? ( media-gfx/openscad ) - pcl? ( ~sci-libs/pcl-${PV}:=[opengl,openni2(+),qt5(+),vtk(+)] ) + pcl? ( sci-libs/pcl:=[opengl,openni2(+),qt5(+),vtk(+)] ) $(python_gen_cond_dep ' dev-libs/boost:=[python,threads(+),${PYTHON_USEDEP}] dev-python/matplotlib[${PYTHON_USEDEP}] @@ -120,6 +120,7 @@ REQUIRED_USE=" PATCHES=( "${FILESDIR}"/${PN}-0.19_pre20201231-0003-Gentoo-specific-don-t-check-vcs.patch "${FILESDIR}"/${PN}-0.19.1-0001-Gentoo-specific-Remove-ccache-usage.patch + "${FILESDIR}"/${P}-Add-memory-header-for-std-shared_ptr.patch ) DOCS=( CODE_OF_CONDUCT.md ChangeLog.txt README.md ) @@ -168,7 +169,7 @@ src_configure() { -DBUILD_COMPLETE=OFF # deprecated -DBUILD_DRAFT=ON -DBUILD_DRAWING=ON - -DBUILD_ENABLE_CXX_STD:STRING="C++14" # needed for >=boost-1.75.0 + -DBUILD_ENABLE_CXX_STD:STRING="C++17" # needed for current git master -DBUILD_FEM=$(usex fem) -DBUILD_FEM_NETGEN=OFF -DBUILD_FLAT_MESH=ON @@ -224,14 +225,14 @@ src_configure() { -DFREECAD_USE_QT_FILEDIALOG=ON -DFREECAD_USE_QTWEBMODULE:STRING="Qt WebEngine" - # Use the version of shiboken2 that matches the selected python version - -DPYTHON_CONFIG_SUFFIX="-${EPYTHON}" - # install python modules to site-packages' dir. True only for the main package, # sub-packages will still be installed inside /usr/lib64/freecad -DINSTALL_TO_SITEPACKAGES=ON + # Use the version of shiboken2 that matches the selected python version + -DPYTHON_CONFIG_SUFFIX="-${EPYTHON}" -DPython3_EXECUTABLE=${PYTHON} + -DOCCT_CMAKE_FALLBACK=ON # don't use occt-config which isn't included in opencascade for Gentoo ) @@ -289,11 +290,13 @@ src_test() { src_install() { cmake_src_install + dobin src/Tools/freecad-thumbnailer + if ! use headless; then - dosym8 -r /usr/$(get_libdir)/${PN}/bin/FreeCAD /usr/bin/freecad + dosym -r /usr/$(get_libdir)/${PN}/bin/FreeCAD /usr/bin/freecad mv "${ED}"/usr/$(get_libdir)/freecad/share/* "${ED}"/usr/share || die "failed to move shared ressources" fi - dosym8 -r /usr/$(get_libdir)/${PN}/bin/FreeCADCmd /usr/bin/freecadcmd + dosym -r /usr/$(get_libdir)/${PN}/bin/FreeCADCmd /usr/bin/freecadcmd python_optimize "${ED}"/usr/share/${PN}/data/Mod/Start/StartPage "${ED}"/usr/$(get_libdir)/${PN}{/Ext,/Mod}/ # compile main package in python site-packages as well @@ -326,14 +329,11 @@ pkg_postinst() { einfo "support. Some of them are available in Gentoo. Take a look at" einfo "https://wiki.freecadweb.org/Installing#External_software_supported_by_FreeCAD" optfeature_header "Computational utilities" - optfeature "numerical computations with Python" dev-python/numpy optfeature "BLAS library" sci-libs/openblas optfeature "statistical computation with Python" dev-python/pandas - optfeature "usage of Point Clouds" sci-libs/pcl optfeature "scientific computation with Python" dev-python/scipy optfeature "symbolic math with Python" dev-python/sympy optfeature_header "Imaging, Plotting and Rendering utilities" - optfeature "function plotting with Python" dev-python/matplotlib optfeature "dependency graphs" media-gfx/graphviz optfeature "PBR Rendering" media-gfx/povray optfeature_header "Import / Export"