diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-02-23 15:45:01 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-02-23 15:45:01 +0000 |
commit | 9217a0cce81e89f5648599fcda4e549903c7b9bd (patch) | |
tree | f544fe23d38f148dd56caedc70d93ccaf8a34389 /media-gfx/freecad | |
parent | 8d15cb8238a384acdb70250a0cd213f2ab5f0ab6 (diff) |
gentoo auto-resync : 23:02:2023 - 15:45:01
Diffstat (limited to 'media-gfx/freecad')
-rw-r--r-- | media-gfx/freecad/Manifest | 10 | ||||
-rw-r--r-- | media-gfx/freecad/files/freecad-0.20.2-Fixes-8206-FreeCAD-segfaults-being-run-with-paramete.patch | 22 | ||||
-rw-r--r-- | media-gfx/freecad/files/freecad-0.20.2-Netgen-add-headers-to-support-recent-Netgen.patch | 93 | ||||
-rw-r--r-- | media-gfx/freecad/files/freecad-9999-tests-src-Qt-only-build-test-for-BUILD_GUI-ON.patch | 24 | ||||
-rw-r--r-- | media-gfx/freecad/freecad-0.20.2-r1.ebuild (renamed from media-gfx/freecad/freecad-0.20.1.ebuild) | 77 | ||||
-rw-r--r-- | media-gfx/freecad/freecad-9999.ebuild | 70 | ||||
-rw-r--r-- | media-gfx/freecad/metadata.xml | 7 |
7 files changed, 242 insertions, 61 deletions
diff --git a/media-gfx/freecad/Manifest b/media-gfx/freecad/Manifest index 13843ca43b96..5afa9e98728a 100644 --- a/media-gfx/freecad/Manifest +++ b/media-gfx/freecad/Manifest @@ -1,8 +1,10 @@ AUX freecad-0.19.1-0001-Gentoo-specific-Remove-ccache-usage.patch 797 BLAKE2B 1bd09caaa265e370b70efe9dd23171a61a98920d659c2f19bb3ec07bf77b1d59712c135f421bbc3164bec6c2b19ac0886185bb6200c45cefaaaea94d5cf54222 SHA512 b449fc466a22300c8a4b0a5b223d68b0ef4437512abcdf875580efc364570b157a55e283faa0ddaad5fd4ce98585bf6dd043b4e7a2a7aa86e98bdb9e8a846a30 AUX freecad-0.19.4-Gentoo-specific-don-t-check-vcs.patch 701 BLAKE2B 963afb463acc00fc20f2ed2aa356c0bb9df8b359fb350e948fa7b23df6cd65db521ebd76d74fda53ca76ce0ba89e7ea3737e1903f850c5a04271eaeba45e5eaf SHA512 457f58461744d42db81db6868498b583ba9a4f599cc0cc1d8e98dae50f2d9d91216cd9787548ae83db57b4a8d056e0267e70055d3fba6405f51de80355eef18f -DIST freecad-0.20.1.tar.gz 75545072 BLAKE2B be2d2970b80523b34f7400a2762f997b815a5ae90dcb6cee6e560316712ebe3ab8a64053bd73e9f50548ff076920af0304a6780c94c4f3708d30b82bbee3b5d9 SHA512 ab4cfab4008300b8273769b9395602261c88c19f0893dabe6498a2eac020f1fe3fbf7284928144f1d4147d8627a47d83a40a1777a298673da2e24d956006d827 +AUX freecad-0.20.2-Fixes-8206-FreeCAD-segfaults-being-run-with-paramete.patch 746 BLAKE2B 7cba7847956b9f6dbb4161c2bf70a72790cab98a1110c98ac34160c9dd5005b87ff9a2c71e42b7c4523f3fff9cc428ca0ad3b8f61e13b73d1b3bfdd142f5794f SHA512 08d3a8b849eed184b557b8e918c77e294daa40dad81944e19f0ce0c3a8477910ef6cb426e83a986d03050f1a1bfd935b5efbc27146704930d48ff65cd73389db +AUX freecad-0.20.2-Netgen-add-headers-to-support-recent-Netgen.patch 3622 BLAKE2B fb68ca931c5fa67873d5a60a8b175d6481c572e233974f8b59545f05aef13ced9baf576a51f4aba89020ecb794f39431bca5e8e081536db34f3a15737a11e374 SHA512 ef2ea194176ff10fdf71b7335a84ab97dead7093f9f46b562e8e659ae793d8d7a1e204cdc0be253d3fc4402a88caf95694f1249c38908f150263a00ec37150c7 +AUX freecad-9999-tests-src-Qt-only-build-test-for-BUILD_GUI-ON.patch 606 BLAKE2B acef2151a4ddc90a40ae565fe89032d832a8596b9f9c2608b6b8c3e76125b69b9be12db34d72e3646bd76abeae041bb3f0fd33a0933f22174f48095634568dc2 SHA512 f1d830591dc6532d9517e13da00cfc886e70fc57ec84f7a406f68096a683dd4b86909190858e8aba69c4f668dd963d8de3765e8363ce9661718ac873c729f3f6 DIST freecad-0.20.2.tar.gz 75555561 BLAKE2B 278b05a3fe3bdccb46da62926aee46f066cb073f034b273dc4d8b27975724b754a6822b7eb0b673500db4592237690decb830cc7a30e8da689c6b067c256d4f8 SHA512 c3acd77dd2bb9a2a23ac354da3b6102effb89c95d675e91421d65486414dfe8cc0188a7212245e0deb63f17b9c5df76133017be09e4cd14b833be8cbec52a08d -EBUILD freecad-0.20.1.ebuild 9813 BLAKE2B 39713988546185e5a44b59f6726c0cb6aff8ae7cb949c0b88483fcd229b35d3a347151db10d80ea08378d2c400a0e6219f135a75e76af87d39306bbee68095b4 SHA512 5f0e9c1b9ddc1a0da8898aa93496856a58d0486c307219c6382190c2f8b309817527c06a89fd894726dbe9133343ea474eb9094bbf3911c8f8856638810d3984 +EBUILD freecad-0.20.2-r1.ebuild 10338 BLAKE2B 6743b981e7f7c152a6045960b9e5e79315497af2e5b1fc3e706afeac3b1208162c2ea4e1b3f02652188685068875492e0bcd28dd5558861723f818c5cb0ce3db SHA512 ee94890a79bd87c944ef2215b890360518627f5d4dcae95ebe2ab7c810f113d10c366515193d6bfe1ced550cd0d3c1d4d0e5bb72938b7de0e25827c61687f388 EBUILD freecad-0.20.2.ebuild 9858 BLAKE2B 254dcc53a8eecf329854e10af1d13bd6995f4d2720268cd0e0e59ca3e5c10385d6edfe18ff1c5a36fe03d4ae0a4bccf4eafa6f778424b9ef281b15e0e368c6e4 SHA512 5e6f6bffadf57ab79b578790e9bf62934f5b598e09cdb8a6f08c07a06ff8a4d8daf297114c88f4abb5400991526abd28bb00cd7be79333b27a8f0f92179b49cb -EBUILD freecad-9999.ebuild 9822 BLAKE2B 0765e55171d7aea441dae4ca6589779c69a9be7f6ae2ecfc349f031b315af29c5527fa8b45a2c8ea52865b198011dc72d8d61cd88bed743e4ca27333c2561293 SHA512 9f47a5269abe293862d767ba7bb2495134739ec29ecf0664c16381d32edb0961ad28c85d6149f8b822d105ee4346ea3df5a04e8948290d82e0d1c3164eed0ff5 -MISC metadata.xml 3256 BLAKE2B 1dc274ea8c4d8198f53dc6155a2b70cf8952391902a510c11be93bcad4731314f8a4dea0eec465e3b6307c39596a169127d979f17011d0b27280d3860e05a226 SHA512 e201c191df4d8f352660d075bfc729da3b2ac9d87fc8617907c36b142ada3e844257ed19aabc3a017d4bb4a31ff51f1dfa6c430125f3d870106f73d70bc7d53d +EBUILD freecad-9999.ebuild 10319 BLAKE2B 1bc46e346c02c179adbb29c8354e3ee4e338970be58844fc47eb86292cf1a2ddac94865ac80fd25015eb980d2a6bb70c72235604f4b0f40386e39b8d13c5db15 SHA512 e5163ccb3f71547e030e2e7832fb83f9fe6bf9456217dd6b2bc1477e50de871b359f83358495d1469c5dcd3a75f3dd06497378ffe3710cb175ec3f2ad9ab374e +MISC metadata.xml 3189 BLAKE2B b236dc1ac3c1a56609cc0d40b6f6ed5cb0c70ce06bd3c5dce45c5f3bcf1d06548a3d62e7e5c786278f84a6874ed330a470a753946c1e6963e7b5fa7d43854eb8 SHA512 ac8018f6c6819c237168228bd767659e1fd1b7aec18c8581a284e498a91dceda78ced26f7a5a1f3b110956fd940f72c677984e1127f76c9fd6330a7d54044fa2 diff --git a/media-gfx/freecad/files/freecad-0.20.2-Fixes-8206-FreeCAD-segfaults-being-run-with-paramete.patch b/media-gfx/freecad/files/freecad-0.20.2-Fixes-8206-FreeCAD-segfaults-being-run-with-paramete.patch new file mode 100644 index 000000000000..44d49ca3bf94 --- /dev/null +++ b/media-gfx/freecad/files/freecad-0.20.2-Fixes-8206-FreeCAD-segfaults-being-run-with-paramete.patch @@ -0,0 +1,22 @@ +https://github.com/FreeCAD/FreeCAD/commit/c7a21ecbeecefe7c2dfc9e950b3d6bb42351d476 + +From c7a21ecbeecefe7c2dfc9e950b3d6bb42351d476 Mon Sep 17 00:00:00 2001 +From: wmayer <wmayer@users.sourceforge.net> +Date: Sat, 11 Feb 2023 17:47:49 +0100 +Subject: [PATCH 02/51] Fixes #8206: FreeCAD segfaults being run with + parameters (e.g .desktop file has /usr/bin/freecad --single-instance) + +--- a/src/Base/Interpreter.cpp ++++ b/src/Base/Interpreter.cpp +@@ -563,7 +563,7 @@ void initInterpreter(int argc,char *argv[]) + { + PyStatus status; + PyConfig config; +- PyConfig_InitPythonConfig(&config); ++ PyConfig_InitIsolatedConfig(&config); + + status = PyConfig_SetBytesArgv(&config, argc, argv); + if (PyStatus_Exception(status)) { +-- +2.39.1 + diff --git a/media-gfx/freecad/files/freecad-0.20.2-Netgen-add-headers-to-support-recent-Netgen.patch b/media-gfx/freecad/files/freecad-0.20.2-Netgen-add-headers-to-support-recent-Netgen.patch new file mode 100644 index 000000000000..402c84ee4d28 --- /dev/null +++ b/media-gfx/freecad/files/freecad-0.20.2-Netgen-add-headers-to-support-recent-Netgen.patch @@ -0,0 +1,93 @@ +https://github.com/FreeCAD/FreeCAD/commit/8b056f156fd087b3df36a5223fc5ca6900649a83 + +From 8b056f156fd087b3df36a5223fc5ca6900649a83 Mon Sep 17 00:00:00 2001 +From: Uwe <donovaly@users.noreply.github.com> +Date: Wed, 17 Aug 2022 12:32:02 +0200 +Subject: [PATCH 0008/1678] [Netgen] add headers to support recent Netgen + +- as reported here: https://forum.freecadweb.org/viewtopic.php?p=618174#p618174 +- also fix compiler warnings about unsafe bool handling +--- a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp ++++ b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp +@@ -50,7 +50,9 @@ + + #include <utilities.h> + ++#include <BRepBndLib.hxx> + #include <BRepBuilderAPI_Copy.hxx> ++#include <BRepMesh_IncrementalMesh.hxx> + #include <BRep_Tool.hxx> + #include <Bnd_B3d.hxx> + #include <NCollection_Map.hxx> +@@ -66,6 +68,7 @@ + #include <TopTools_DataMapOfShapeShape.hxx> + #include <TopTools_MapOfShape.hxx> + #include <TopoDS.hxx> ++#include <TopoDS_Solid.hxx> + + #ifdef _MSC_VER + #pragma warning(disable : 4067) +@@ -3027,7 +3030,7 @@ bool NETGENPlugin_Mesher::Compute() + } + } + } +- if (!err && mparams.secondorder > 0) ++ if (!err && mparams.secondorder) + { + try + { +@@ -3302,7 +3305,7 @@ bool NETGENPlugin_Mesher::Evaluate(MapShapeNbElems& aResMap) + // calculate total nb of segments and length of edges + double fullLen = 0.0; + int fullNbSeg = 0; +- int entity = mparams.secondorder > 0 ? SMDSEntity_Quad_Edge : SMDSEntity_Edge; ++ int entity = mparams.secondorder ? SMDSEntity_Quad_Edge : SMDSEntity_Edge; + TopTools_DataMapOfShapeInteger Edge2NbSeg; + for (TopExp_Explorer exp(_shape, TopAbs_EDGE); exp.More(); exp.Next()) + { +@@ -3340,7 +3343,7 @@ bool NETGENPlugin_Mesher::Evaluate(MapShapeNbElems& aResMap) + { + vector<int>& aVec = aResMap[_mesh->GetSubMesh(Edge2NbSegIt.Key())]; + if ( aVec[ entity ] > 1 && aVec[ SMDSEntity_Node ] == 0 ) +- aVec[SMDSEntity_Node] = mparams.secondorder > 0 ? 2*aVec[ entity ]-1 : aVec[ entity ]-1; ++ aVec[SMDSEntity_Node] = mparams.secondorder ? 2*aVec[ entity ]-1 : aVec[ entity ]-1; + + fullNbSeg += aVec[ entity ]; + Edge2NbSeg( Edge2NbSegIt.Key() ) = aVec[ entity ]; +@@ -3386,7 +3389,7 @@ bool NETGENPlugin_Mesher::Evaluate(MapShapeNbElems& aResMap) + int nbNodes = tooManyElems ? hugeNb : (( nbFaces*3 - (nb1d-1)*2 ) / 6 + 1 ); + + vector<int> aVec(SMDSEntity_Last, 0); +- if( mparams.secondorder > 0 ) { ++ if (mparams.secondorder) { + int nb1d_in = (nbFaces*3 - nb1d) / 2; + aVec[SMDSEntity_Node] = nbNodes + nb1d_in; + aVec[SMDSEntity_Quad_Triangle] = nbFaces; +@@ -3428,11 +3431,11 @@ bool NETGENPlugin_Mesher::Evaluate(MapShapeNbElems& aResMap) + if ( tooManyElems ) // avoid FPE + { + aVec[SMDSEntity_Node] = hugeNb; +- aVec[ mparams.secondorder > 0 ? SMDSEntity_Quad_Tetra : SMDSEntity_Tetra] = hugeNb; ++ aVec[ mparams.secondorder ? SMDSEntity_Quad_Tetra : SMDSEntity_Tetra] = hugeNb; + } + else + { +- if( mparams.secondorder > 0 ) { ++ if (mparams.secondorder) { + aVec[SMDSEntity_Node] = nb1d_in/3 + 1 + nb1d_in; + aVec[SMDSEntity_Quad_Tetra] = nbVols; + } +--- a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cpp ++++ b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cpp +@@ -39,6 +39,8 @@ + #include <StdMeshers_MaxElementArea.hxx> + #include <StdMeshers_QuadranglePreference.hxx> + #include <StdMeshers_ViscousLayers2D.hxx> ++#include <TopExp.hxx> ++#include <TopExp_Explorer.hxx> + + #include <Precision.hxx> + #include <Standard_ErrorHandler.hxx> +-- +2.39.1 + 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-0.20.1.ebuild b/media-gfx/freecad/freecad-0.20.2-r1.ebuild index 746a966ee4d0..4099ed239e45 100644 --- a/media-gfx/freecad/freecad-0.20.1.ebuild +++ b/media-gfx/freecad/freecad-0.20.2-r1.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 @@ -18,7 +18,7 @@ if [[ ${PV} = *9999 ]]; then S="${WORKDIR}/freecad-${PV}" else SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="amd64" + KEYWORDS="~amd64" S="${WORKDIR}/FreeCAD-${PV}" fi @@ -26,9 +26,9 @@ fi # examples are licensed CC-BY-SA (without note of specific version) LICENSE="LGPL-2 CC-BY-SA-4.0" SLOT="0" -IUSE="debug designer headless test" +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,53 @@ RESTRICT="!test? ( test )" RDEPEND=" ${PYTHON_DEPS} dev-libs/OpenNI2[opengl(+)] + dev-libs/boost:= 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/med-4.0.0-r1 <sci-libs/opencascade-7.7.0:=[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-1.8.1:=[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 +100,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 +129,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,6 +137,8 @@ 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}-0.20.2-Netgen-add-headers-to-support-recent-Netgen.patch + "${FILESDIR}"/${PN}-0.20.2-Fixes-8206-FreeCAD-segfaults-being-run-with-paramete.patch ) DOCS=( CODE_OF_CONDUCT.md ChangeLog.txt README.md ) @@ -155,11 +172,11 @@ src_configure() { -DBUILD_DRAWING=ON -DBUILD_ENABLE_CXX_STD:STRING="C++17" # needed for >=boost-1.77.0 -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 - -DBUILD_GUI=$(usex !headless) + -DBUILD_GUI=$(usex gui) -DBUILD_IDF=$(usex idf) -DBUILD_IMAGE=$(usex image) -DBUILD_IMPORT=ON # import module for various file formats @@ -197,6 +214,8 @@ src_configure() { -DFREECAD_BUILD_DEBIAN=OFF + -DFREECAD_QT_VERSION="5" + -DFREECAD_USE_EXTERNAL_KDL=ON -DFREECAD_USE_EXTERNAL_SMESH=OFF # no package in Gentoo -DFREECAD_USE_EXTERNAL_ZIPIOS=OFF # doesn't work yet, also no package in Gentoo tree @@ -235,7 +254,7 @@ src_configure() { # We use the FreeCADCmd binary instead of the FreeCAD binary here # for two reasons: -# 1. It works out of the box with USE=headless as well, not needing a guard +# 1. It works out of the box with USE=-gui as well, not needing a guard # 2. We don't need virtualx.eclass and it's dependencies # The exported environment variables are needed, so freecad does know # where to save it's temporary files, and where to look and write it's @@ -255,12 +274,14 @@ src_install() { dobin src/Tools/freecad-thumbnailer - if ! use headless; then + if use gui; then dosym -r /usr/$(get_libdir)/${PN}/bin/FreeCAD /usr/bin/freecad mv "${ED}"/usr/$(get_libdir)/${PN}/share/* "${ED}"/usr/share || die "failed to move shared resources" 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" + 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 @@ -273,7 +294,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/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..17e33f46262b 100644 --- a/media-gfx/freecad/metadata.xml +++ b/media-gfx/freecad/metadata.xml @@ -33,10 +33,6 @@ The Python modules are available, without their GUI parts though, if this is unset. </flag> - <flag name="headless"> - Build FreeCAD without a GUI, usable for server-side instances. - The Python modules are still available, without their GUI parts though. - </flag> <flag name="idf"> Build the IDF module to provide file exchange capabilities with IDF files @@ -52,6 +48,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 |