summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Waibel <waebbl-gentoo@posteo.net>2023-02-13 21:20:00 +0100
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2023-02-23 12:25:11 +0100
commit2a75bd98a3a22b79d764207b0ce16195662ece4b (patch)
tree767d049b99a09d89e2956470a86573e509ec1d4f /media-gfx/freecad
parentwww-apps/mediawiki: bump to 1.39.2 (diff)
downloadgentoo-2a75bd98a3a22b79d764207b0ce16195662ece4b.tar.gz
gentoo-2a75bd98a3a22b79d764207b0ce16195662ece4b.tar.bz2
gentoo-2a75bd98a3a22b79d764207b0ce16195662ece4b.zip
media-gfx/freecad: enable netgen support in live ebuild
- add py3.11 support - better organize dependencies, add new libfmt dep - fix REQUIRED_USE for designer plugin Bug: https://bugs.gentoo.org/895660 Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net> Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'media-gfx/freecad')
-rw-r--r--media-gfx/freecad/files/freecad-9999-tests-src-Qt-only-build-test-for-BUILD_GUI-ON.patch24
-rw-r--r--media-gfx/freecad/freecad-9999.ebuild70
-rw-r--r--media-gfx/freecad/metadata.xml3
3 files changed, 72 insertions, 25 deletions
diff --git a/media-gfx/freecad/files/freecad-9999-tests-src-Qt-only-build-test-for-BUILD_GUI-ON.patch b/media-gfx/freecad/files/freecad-9999-tests-src-Qt-only-build-test-for-BUILD_GUI-ON.patch
new file mode 100644
index 000000000000..5455c0ee2992
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-9999-tests-src-Qt-only-build-test-for-BUILD_GUI-ON.patch
@@ -0,0 +1,24 @@
+From cb77c7d937c259224699273fee1ba5907588fa4c Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sun, 12 Feb 2023 19:54:13 +0100
+Subject: [PATCH] tests/src/Qt: only build test for BUILD_GUI=ON
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/tests/src/Qt/CMakeLists.txt
++++ b/tests/src/Qt/CMakeLists.txt
+@@ -30,6 +30,7 @@ endfunction()
+ set(CMAKE_AUTOMOC ON)
+
+ # Qt Test
++if(BUILD_GUI)
+ include_directories(
+ ${QtGui_INCLUDE_DIRS}
+ ${QtTest_INCLUDE_DIRS}
+@@ -46,3 +47,4 @@ set (InventorBuilder_LIBS
+ SETUP_TESTS(
+ InventorBuilder
+ )
++endif()
+--
+2.39.1
+
diff --git a/media-gfx/freecad/freecad-9999.ebuild b/media-gfx/freecad/freecad-9999.ebuild
index ba5840c6b720..a006497fe1bd 100644
--- a/media-gfx/freecad/freecad-9999.ebuild
+++ b/media-gfx/freecad/freecad-9999.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-PYTHON_COMPAT=( python3_{9..10} )
+PYTHON_COMPAT=( python3_{9..11} )
inherit check-reqs cmake optfeature python-single-r1 xdg
@@ -28,7 +28,7 @@ LICENSE="LGPL-2 CC-BY-SA-4.0"
SLOT="0"
IUSE="debug designer +gui test"
-FREECAD_EXPERIMENTAL_MODULES="cloud pcl"
+FREECAD_EXPERIMENTAL_MODULES="cloud netgen pcl"
FREECAD_STABLE_MODULES="addonmgr fem idf image inspection material
openscad part-design path points raytracing robot show surface
techdraw tux"
@@ -46,47 +46,54 @@ RESTRICT="!test? ( test )"
RDEPEND="
${PYTHON_DEPS}
dev-libs/OpenNI2[opengl(+)]
+ dev-libs/boost:=
+ dev-libs/libfmt:=
dev-libs/libspnav[X]
dev-libs/xerces-c[icu]
- dev-qt/designer:5
dev-qt/qtconcurrent:5
dev-qt/qtcore:5
- dev-qt/qtgui:5
dev-qt/qtnetwork:5
- dev-qt/qtopengl:5
- dev-qt/qtprintsupport:5
- dev-qt/qtsvg:5
- dev-qt/qtwebengine:5[widgets]
- dev-qt/qtwidgets:5
- dev-qt/qtx11extras:5
dev-qt/qtxml:5
- >=media-libs/coin-4.0.0
+ dev-qt/qtxmlpatterns:5
media-libs/freetype
media-libs/qhull:=
sci-libs/flann[openmp]
sci-libs/hdf5:=[fortran,zlib]
- >=sci-libs/med-4.0.0-r1[python,${PYTHON_SINGLE_USEDEP}]
- sci-libs/opencascade:=[json,vtk(+)]
+ >=sci-libs/med-4.0.0-r1
+ sci-libs/opencascade:=[json,vtk]
sci-libs/orocos_kdl:=
sys-libs/zlib
- virtual/glu
virtual/libusb:1
- virtual/opengl
cloud? (
dev-libs/openssl:=
net-misc/curl
)
- fem? ( sci-libs/vtk:=[boost(+),python,qt5,rendering,${PYTHON_SINGLE_USEDEP}] )
+ fem? ( sci-libs/vtk:=[qt5,rendering] )
+ gui? (
+ dev-qt/designer:5
+ dev-qt/qtgui:5
+ dev-qt/qtopengl:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtsvg:5
+ dev-qt/qtwebengine:5[widgets]
+ dev-qt/qtwidgets:5
+ dev-qt/qtx11extras:5
+ >=media-libs/coin-4.0.0
+ virtual/glu
+ virtual/opengl
+ $(python_gen_cond_dep '
+ dev-python/matplotlib[${PYTHON_USEDEP}]
+ >=dev-python/pivy-0.6.5[${PYTHON_USEDEP}]
+ dev-python/pyside2[gui,svg,webchannel,webengine,${PYTHON_USEDEP}]
+ dev-python/shiboken2[${PYTHON_USEDEP}]
+ ')
+ )
+ netgen? ( media-gfx/netgen[opencascade] )
openscad? ( media-gfx/openscad )
- pcl? ( sci-libs/pcl:=[opengl,openni2(+),qt5(+),vtk(+)] )
+ pcl? ( sci-libs/pcl:=[opengl,openni2,qt5,vtk] )
$(python_gen_cond_dep '
- dev-libs/boost:=[python,${PYTHON_USEDEP}]
- dev-python/matplotlib[${PYTHON_USEDEP}]
dev-python/numpy[${PYTHON_USEDEP}]
- >=dev-python/pivy-0.6.5[${PYTHON_USEDEP}]
dev-python/pybind11[${PYTHON_USEDEP}]
- dev-python/pyside2[gui,svg,webchannel,webengine,${PYTHON_USEDEP}]
- dev-python/shiboken2[${PYTHON_USEDEP}]
addonmgr? ( dev-python/GitPython[${PYTHON_USEDEP}] )
fem? ( dev-python/ply[${PYTHON_USEDEP}] )
')
@@ -94,10 +101,18 @@ RDEPEND="
DEPEND="
${RDEPEND}
>=dev-cpp/eigen-3.3.1:3
+ test? (
+ $(python_gen_cond_dep 'dev-python/pyyaml[${PYTHON_USEDEP}]')
+ dev-qt/qttest:5
+ )
"
BDEPEND="
app-text/dos2unix
dev-lang/swig
+ test? (
+ $(python_gen_cond_dep 'dev-python/pyyaml[${PYTHON_USEDEP}]')
+ dev-qt/qttest:5
+ )
"
# To get required dependencies:
@@ -115,6 +130,7 @@ BDEPEND="
# test suite when compiled with a minimal set of USE flags.
REQUIRED_USE="
${PYTHON_REQUIRED_USE}
+ designer? ( gui )
inspection? ( points )
path? ( robot )
"
@@ -122,9 +138,10 @@ REQUIRED_USE="
PATCHES=(
"${FILESDIR}"/${PN}-0.19.4-Gentoo-specific-don-t-check-vcs.patch
"${FILESDIR}"/${PN}-0.19.1-0001-Gentoo-specific-Remove-ccache-usage.patch
+ "${FILESDIR}"/${PN}-9999-tests-src-Qt-only-build-test-for-BUILD_GUI-ON.patch
)
-DOCS=( CODE_OF_CONDUCT.md ChangeLog.txt README.md )
+DOCS=( CODE_OF_CONDUCT.md README.md )
CHECKREQS_DISK_BUILD="2G"
@@ -155,7 +172,7 @@ src_configure() {
-DBUILD_DRAWING=ON
-DBUILD_ENABLE_CXX_STD:STRING="C++17" # needed for current git master
-DBUILD_FEM=$(usex fem)
- -DBUILD_FEM_NETGEN=OFF
+ -DBUILD_FEM_NETGEN=$(usex netgen)
-DBUILD_FLAT_MESH=ON
-DBUILD_FORCE_DIRECTORY=ON # force building in a dedicated directory
-DBUILD_FREETYPE=ON # automagic dep
@@ -263,6 +280,9 @@ src_install() {
fi
dosym -r /usr/$(get_libdir)/${PN}/bin/FreeCADCmd /usr/bin/freecadcmd
+ rm -r "${ED}"/usr/$(get_libdir)/${PN}/include/E57Format || die "failed to drop unneeded include directory E57Format"
+ use test && rm -r "${ED}"/usr/include/${PN}/{gmock,gtest} || die
+
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
python_optimize
@@ -275,7 +295,7 @@ pkg_postinst() {
einfo "AddonManager."
# ToDo: check opencv, pysolar (::science), elmerfem (::science)
- # ifc++, ifcopenshell, netgen, z88 (no pkgs), calculix-ccx (::waebbl)
+ # ifc++, ifcopenshell, z88 (no pkgs), calculix-ccx (::waebbl)
einfo "There are a lot of additional tools, for which FreeCAD has builtin"
einfo "support. Some of them are available in Gentoo. Take a look at"
einfo "https://wiki.freecadweb.org/Installing#External_software_supported_by_FreeCAD"
diff --git a/media-gfx/freecad/metadata.xml b/media-gfx/freecad/metadata.xml
index 6e0770f45ea8..bc3069a7931c 100644
--- a/media-gfx/freecad/metadata.xml
+++ b/media-gfx/freecad/metadata.xml
@@ -52,6 +52,9 @@
<flag name="material">
Build the material module and workbench to work with materials
</flag>
+ <flag name="netgen">
+ Build support for the netgen mesher through <pkg>media-gfx/netgen</pkg>.
+ </flag>
<flag name="openscad">
Build the OpenSCAD module for interoperability with OpenSCAD
and repairing Constructive Solid Geometry (CSG) history