From 7fa8a1e3f149eea4c844c47cfe26136ed7614c58 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 15 Apr 2024 12:04:03 +0100 Subject: gentoo auto-resync : 15:04:2024 - 12:04:02 --- sci-libs/Manifest.gz | Bin 44812 -> 44817 bytes sci-libs/opencascade/Manifest | 14 +- .../opencascade-7.8.0-jemalloc-noexcept.patch | 13 + .../files/opencascade-7.8.1-vtk_components.patch | 24 ++ sci-libs/opencascade/metadata.xml | 1 + sci-libs/opencascade/opencascade-7.7.1.ebuild | 360 -------------------- sci-libs/opencascade/opencascade-7.7.2-r1.ebuild | 362 ++++++++++++++++++++ sci-libs/opencascade/opencascade-7.7.2.ebuild | 356 ------------------- sci-libs/opencascade/opencascade-7.8.0.ebuild | 368 -------------------- sci-libs/opencascade/opencascade-7.8.1.ebuild | 376 +++++++++++++++++++++ sci-libs/opencascade/opencascade-9999.ebuild | 46 +-- sci-libs/pyshp/Manifest | 1 + sci-libs/pyshp/pyshp-2.3.1-r2.ebuild | 29 ++ sci-libs/spr/Manifest | 2 +- sci-libs/spr/spr-3.3.2-r2.ebuild | 46 +++ sci-libs/spr/spr-3.3.2.ebuild | 39 --- sci-libs/tokenizers/Manifest | 3 +- .../tokenizers/files/tokenizers-0.15.2-test.patch | 39 +++ sci-libs/tokenizers/tokenizers-0.15.2-r1.ebuild | 344 +++++++++++++++++++ sci-libs/tokenizers/tokenizers-0.15.2.ebuild | 339 ------------------- sci-libs/transformers/Manifest | 2 + sci-libs/transformers/transformers-4.35.2.ebuild | 36 ++ 22 files changed, 1309 insertions(+), 1491 deletions(-) create mode 100644 sci-libs/opencascade/files/opencascade-7.8.0-jemalloc-noexcept.patch create mode 100644 sci-libs/opencascade/files/opencascade-7.8.1-vtk_components.patch delete mode 100644 sci-libs/opencascade/opencascade-7.7.1.ebuild create mode 100644 sci-libs/opencascade/opencascade-7.7.2-r1.ebuild delete mode 100644 sci-libs/opencascade/opencascade-7.7.2.ebuild delete mode 100644 sci-libs/opencascade/opencascade-7.8.0.ebuild create mode 100644 sci-libs/opencascade/opencascade-7.8.1.ebuild create mode 100644 sci-libs/pyshp/pyshp-2.3.1-r2.ebuild create mode 100644 sci-libs/spr/spr-3.3.2-r2.ebuild delete mode 100644 sci-libs/spr/spr-3.3.2.ebuild create mode 100644 sci-libs/tokenizers/files/tokenizers-0.15.2-test.patch create mode 100644 sci-libs/tokenizers/tokenizers-0.15.2-r1.ebuild delete mode 100644 sci-libs/tokenizers/tokenizers-0.15.2.ebuild create mode 100644 sci-libs/transformers/transformers-4.35.2.ebuild (limited to 'sci-libs') diff --git a/sci-libs/Manifest.gz b/sci-libs/Manifest.gz index 4f2837e71dc3..5dd9ee406247 100644 Binary files a/sci-libs/Manifest.gz and b/sci-libs/Manifest.gz differ diff --git a/sci-libs/opencascade/Manifest b/sci-libs/opencascade/Manifest index e56ab32b26a5..e6e794ca6e42 100644 --- a/sci-libs/opencascade/Manifest +++ b/sci-libs/opencascade/Manifest @@ -11,19 +11,19 @@ AUX opencascade-7.7.0-jemalloc-lib-type.patch 783 BLAKE2B baa529cd277dac5e97fc77 AUX opencascade-7.7.0-musl.patch 3095 BLAKE2B ad17417a93f42b4871c469cd7a50c48ed987f9333c626ca103fedabd49b84b7061de8eefbe834ead65325d606f2ea7f89210156364b55de75336d6493ff483c1 SHA512 6fb94bd075448d4ede48df918d070eda4607956d7a66b01f8b8b3621c0dc57348daa120661c5f1fe6ba7b818fec5737936b2620d62bfd0a7a224d03cbdd3ffc6 AUX opencascade-7.7.0-tbb-detection.patch 2449 BLAKE2B c12e976a0fb69ca0d23c87a4cabc61fbb913acc10ce6d133586c58d88dd7a4d3fc456b047b311f89d11aad236ef4f7eb734206f484d085dd5cc3f6997b60798e SHA512 faae91cd2d522ae0ea12ed1707c3165496403f01b4e9ae8236ff03558f935f5fd1274a23d7659390ff1949920ec0fc2a6f7c65e08dacde149f73ca46cfab3d99 AUX opencascade-7.8.0-cmake-min-version.patch 388 BLAKE2B ebeda19b2bb855a1b01bafb0a69e4bac51b95a84ca1d2fdfb58bfb4af007ba11efb4452812bd51060be5d45233258aabac305bb4048364fb0663c42cabe60d1f SHA512 025611176fdb894e53e413a5de32aabf7822743393dd847e01d650f3fdf00f56fc73b22c1faae97b94b2120d016055f0fd23a2d47c6211e49d2097fe6d510e99 +AUX opencascade-7.8.0-jemalloc-noexcept.patch 529 BLAKE2B 7882379259c483625e8b83d9736cd42385b795552038ae0170e1fb98ffffac537a8eda11b6b1afa50b6bd4da31b7ac9474f75c0406dd1f014a021256e9345908 SHA512 d615f26e28a388e8cb79150321f3a6899990460a601742e5deddaeededd44bb70f59e44e2dc078968186924d888e141d322a5e69bb29efb66b04226e762df157 AUX opencascade-7.8.0-tests.patch 539 BLAKE2B 519e97a2881da6d437c4b54beaeb5e77883669ff8d16b491bc6859db6c02e807dc4ceffa1052ece9a8ec56ba9024c5abb61caca1a1efa7847efbe3bce7d5ef95 SHA512 4ba8fcf8277b4dda3ceb84010299b925ccb561e9bb3d1097dc41c437be6be9499160ac1c3f36d63ca6f4fa9f9f9d012f787125c0bd693b44028c50b9c858bd8a +AUX opencascade-7.8.1-vtk_components.patch 603 BLAKE2B cfe4b19b53a63df593fb64e86ba2a4b31d9346a06fa7666cf29ca6b17aa18bbacf806828a3402395032cdece8ea36a672b27fdc9433fd56b3282173a0fa92310 SHA512 5f63bf223c29a8f2492484364b1ab097bb7c9f5a1ab064c0cff9a593836b2f4fff20de1d677cf81d51f0e68ddfc8b1466a5c1dcffdcd10bea58e6c2501f2b776 AUX opencascade.env.in 4571 BLAKE2B 81780f83a476ba5a2691c003c7fde48fec14be4e355480080749800602307d64b88f779cde09aa94a7bb815849d669b054d5ca00908199d1a9857b07518b4f0d SHA512 98e6861469725f6880e38a2d7389f7bc748bcbdf54930aa3fe05ab6a5e1fab5249c4ffed4f45b6ef982325acece0d5acb7ffd8d92adac9be2db9a41ee5356019 DIST opencascade-7.6.3.tar.gz 48216090 BLAKE2B ff0b63250e77b0240bd99bba38cd0e6b0a8c88bf39e495f5d51d7913f097e2cad83a5ad121e9d56de11c74008249c99a41f4615269a085b7cf97c3d7f0477d6d SHA512 c708f76edb707ba18bdfe7442ed8fa500894ee6c1cd8d0313eb906b3aa7dfa40a575f04dbccd70e84395d670f2b93fb8529f3d59726449234e627b9f35b9dded DIST opencascade-7.7.0.tar.gz 48393806 BLAKE2B b41da7bdd07aa6ef52f7833bef3e8a9fc2ca16cbf754773cb7adcc059c11c2a7937d279a2b6cf3096e7af6fbb42c6fdc2a5c98340d6b084d2ba100ba2c538f2a SHA512 6c90e2761f752241417ae6f18d819f51e66b32f3a50a97384f29ed73fa07f4cded84c71a6f6ba302d5e35c57e2fc13001619521eaf45757e4e5ff670d94bbf5c -DIST opencascade-7.7.1.tar.gz 48408076 BLAKE2B 46e14a47a0ce555ac17a3fca520c1f21d7ca05c67b54259e3d2d8560618db096313d5be3d5e4a24acad1912534c17293ad203f48dd7464690aec86e287d9f230 SHA512 f095848d212afbe7e71614d46f57222e347246aec7c92aafae59e6f07798f5371c7a125042c149393ee7d361f28eb89b5196de17a7cc37233f1586ba919c0839 DIST opencascade-7.7.2.tar.gz 48404428 BLAKE2B 28d637e75eca570e38401a0a59127ffdbcb06838a91cc3899fe905834bb47e0e9a92d16cde52027d94e78b0fbddc2043340a35dcb0f4a472c4f2bdac2713216c SHA512 d9e882d44bb65616f8cfce68ebdcd5765669b84e3d82cfb2d1bc22b71b0e878442c079bacc37e9d54f28ce98a7c23bf81f2a3e3e7bbeeec38927ca739f423dee -DIST opencascade-7.8.0.tar.gz 48428565 BLAKE2B 91253101072af27c94b82b82beed5c1f1d7460f4154600fba805c5b2d27976a4841b9a9dfab9e67706d02463b2c630c5b63d1f056e84c69c9c8eeaca7e7caebf SHA512 af176cbd105c49949282c16bb6e30f69167bc6c00a50e0ae69aea555815d47ac3c4540c233e596c5add7cb846c2b33d7be267d8e02472286e758b662b4a652ab +DIST opencascade-7.8.1.tar.gz 48432051 BLAKE2B de7a40b8e6612642a1567d2cf3e6b471c9edeadbc7f686bc8648502165c8d824b3574259874ecb1775c856703fd8df7481c9bc07a66a3a321a83e699e6802052 SHA512 807c1f8732926cfdabcfbdf8d6a0e76b8dba1a1e614afe084a467ffb4cfd80623f5e3afa7e9905b1ac96667c93e01b5f98ceaa8948a576a1093d98df98cc8f81 DIST opencascade-dataset-7.7.0.tar.gz 128392200 BLAKE2B ebfbe6f24520144ca4a82e4ddd0486890552c2de1b62bf5c0d4990d777d4a1458dea54f8a6f08d8a0999582fb4325eda0002fc8a0137b9e66d024a47145d1279 SHA512 71d7e807b1d629fe7371b9d1d503024d00b7c1ae1775e62803eeffd127bd1c768e5240fdd1f949a237737089d528b5d4e43d26db025bbe14a4e0e4616ebdc5d8 DIST opencascade-dataset-7.8.0.tar.xz 97049756 BLAKE2B aae5f076d9fc8a0d8a05028b0d9ffb527978e7acfdf5ecbc7e71c5ee3d6060cd7db9e56dba5b94a445bf5cf208126711cda70306607bdc5cd5e8b68df8fc150c SHA512 9b4c91d7b4743c47f2cf8d9a3b6ded73409a13133013424150ee9bdb61fd771c0b8799c7f31b459a7d2ba140399b9c0c972e2d0476188006361b4fb04042d990 EBUILD opencascade-7.6.3-r2.ebuild 4690 BLAKE2B 8447a1b6c95c13c14a21bc58fbe82bb113e4d042e1034f66723f19eeddb558f8a243e77514c27ed53b0f220cb077d5bc91a8856f41a74d5fa396c16c3548e658 SHA512 d5821c186e2715fa7cea2b21f043b9c08c99de015789837b5e27a537c4a4017af0366752840d817b92506bea2d9bd2450fa6fca914c2e266001cde0cd483ebf4 EBUILD opencascade-7.7.0-r2.ebuild 4970 BLAKE2B 5d92de56b2b667ad7817c512f0051b007b7089b864b63d438c35d306cdb2073743c5565946ab64f3d4a06ddfcfcd8051574bd41de299c75c9067cff639950d66 SHA512 52394427ab0e3de8599d79a18aaa9135c8d683451a0f0cd58a49de5e43fa734554010be73f19b4bbe33c84940fe805bb76ebd89d988449f86230683b55ced243 -EBUILD opencascade-7.7.1.ebuild 9175 BLAKE2B a89d336ac6f22050943e6ebefb5c4e1ad1e2f91b5944c3f925463f49feb2a6d204e189231cffbb4c59ee90f22710a796af05caf7863837e5e658a1ff468db876 SHA512 8f16ad8efb776bfdac8d0bc6f5d6872cc5cfcc0de7fcdd6eebe9ce6b478814141e39788eb5f6db1433c295d287c0eb2e0a80fae605d3d805e6372e66d92fe21d -EBUILD opencascade-7.7.2.ebuild 9106 BLAKE2B 270c24f2360b79315274fd27d349728c399c4279864124567922a349b3f8f232c741ae7fb0cae5a2c0e112173d6b1c40ee56f3a01fa4654f666d05e71793d34d SHA512 48589ad134e12550b7579a7b3afb6f98ff4ce7156e8ca9e180303c6641de28261767c66330a7ab8cec1c38edec9b73e105dbe75714fc2a02f2e2f0462dbf7804 -EBUILD opencascade-7.8.0.ebuild 9514 BLAKE2B 058b2ff9f339c65c35e1118764d7f2ed74dde0fb95aab0ba4c138148aeef4f0515ab806cf216930ce53fbb9482f69a1efc06bed4eb5a589abcb5c35f6ba3a500 SHA512 fc132fb696a0d5d35c8c699ca0aa482f2f1017b4c2402c9a5f6ee1fff7201786686f7a25ea7f8597c44f73f41f4872cf19cba87b2a733c84746758482f3ae4c2 -EBUILD opencascade-9999.ebuild 9505 BLAKE2B ed00750680b7ee321f7fac0ced124429ddc050154846213b3c2dbd319293f7011ea71b38cc7c19eec824e5923665520dae4ae568955f277a050013cfc2bee3e1 SHA512 f7cd75938f702c55343bfba63726481cc23fdc5b8f8fbcbf3bec7612a83869e0f6f7ab1d37e5b6a333b48c56ddd31e4b1244364112c32bef0d6d28336b3d69f7 -MISC metadata.xml 1377 BLAKE2B ca7101643c8e08017ec12840cecf9e852a5fcfa8e40f50589ce70b21e55bb4b61598689d15596ed132bba7f592fb9672fc14e559540deb6900709bcfc2dcfcc3 SHA512 a6c3e37cda18e3838f4277383a0067166cb14449905d6c1dd566f7d78064b9e20ac35acf3dadb75ef82f9a6a59f463f870e08ea7f501dadf6f06834606a3526d +EBUILD opencascade-7.7.2-r1.ebuild 9241 BLAKE2B de7db8352b0f5d2beca44252e03961820cf93cd6bfad32c0ba65f80f7b5a30aa7e9a975b56a565764c56452f61c613c4b9499b609d03c9e36e09ff0c41f508c7 SHA512 041f238960be08f8b7611443a6efbdbaefd3a39a2a7bf4d7b5eef5f510499f548c9acec665b56aaaf4b87ec35e2026bb6a34415690908e43e5c38e2a1b4d8d17 +EBUILD opencascade-7.8.1.ebuild 9748 BLAKE2B 2322e0356ed98ad0b0aa16d8367ee212da62b3695e929f45e3fb28131cbe83c3b1d028d28090f1db66d6e1e487bfb1d3fb6b294440b6fce1ea272f85cc37a6b7 SHA512 357f8d63375c86382c423fb62b6ce494d17e82c27225eda461254f33f587c76167a1e27e786d5a54ee5a953000800b2aa1881c1d41b55d41205c42c9520fbff8 +EBUILD opencascade-9999.ebuild 9748 BLAKE2B 2322e0356ed98ad0b0aa16d8367ee212da62b3695e929f45e3fb28131cbe83c3b1d028d28090f1db66d6e1e487bfb1d3fb6b294440b6fce1ea272f85cc37a6b7 SHA512 357f8d63375c86382c423fb62b6ce494d17e82c27225eda461254f33f587c76167a1e27e786d5a54ee5a953000800b2aa1881c1d41b55d41205c42c9520fbff8 +MISC metadata.xml 1429 BLAKE2B 5760fac929a12cad37147d72161a4ef190b10911c1fc4e3abdb4d095d93877ec7ec718d58e909b7b6047621e14e0c7de4954ded7cfc6115069eef522b289a214 SHA512 a61af11b06737af90f201247f599173056becc5aa5afd90b4c2c05e94e980992f548f68b08c5d194769b4308c2b61f39a6b120f0739af49b0a0f6e15b07ef209 diff --git a/sci-libs/opencascade/files/opencascade-7.8.0-jemalloc-noexcept.patch b/sci-libs/opencascade/files/opencascade-7.8.0-jemalloc-noexcept.patch new file mode 100644 index 000000000000..2c4a98f5a1fd --- /dev/null +++ b/sci-libs/opencascade/files/opencascade-7.8.0-jemalloc-noexcept.patch @@ -0,0 +1,13 @@ +diff --git a/src/Standard/Standard.cxx b/src/Standard/Standard.cxx +index bb06de7..f73164f 100644 +--- a/src/Standard/Standard.cxx ++++ b/src/Standard/Standard.cxx +@@ -28,7 +28,7 @@ + #elif (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) && (defined(__i386) || defined(__x86_64))) + #include + #else +-extern "C" int posix_memalign(void** thePtr, size_t theAlign, size_t theSize); ++extern "C" int posix_memalign(void** thePtr, size_t theAlign, size_t theSize) throw (); + #endif + + namespace diff --git a/sci-libs/opencascade/files/opencascade-7.8.1-vtk_components.patch b/sci-libs/opencascade/files/opencascade-7.8.1-vtk_components.patch new file mode 100644 index 000000000000..03a6277c6fa8 --- /dev/null +++ b/sci-libs/opencascade/files/opencascade-7.8.1-vtk_components.patch @@ -0,0 +1,24 @@ +diff --git a/adm/cmake/vtk.cmake b/adm/cmake/vtk.cmake +index 7d25a37..79257d1 100644 +--- a/adm/cmake/vtk.cmake ++++ b/adm/cmake/vtk.cmake +@@ -60,7 +60,18 @@ if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}") + set (ENV{VTK_DIR} "${3RDPARTY_VTK_DIR}") + endif() + +-find_package(VTK QUIET) ++find_package(VTK ++ COMPONENTS ++ CommonCore ++ FiltersGeneral ++ IOImage ++ ImagingCore ++ InteractionStyle ++ RenderingCore ++ RenderingFreeType ++ RenderingGL2PSOpenGL2 ++ RenderingOpenGL2 ++) + + if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}") + set (ENV{VTK_DIR} ${CACHED_VTK_DIR}) diff --git a/sci-libs/opencascade/metadata.xml b/sci-libs/opencascade/metadata.xml index f3b6e96ad889..cf700b6db37e 100644 --- a/sci-libs/opencascade/metadata.xml +++ b/sci-libs/opencascade/metadata.xml @@ -13,6 +13,7 @@ Enable support for eigenvalues through the header-only dev-cpp/eigen package. Enable support for image i/o via media-libs/freeimage Enable media-libs/freetype support + Build Inspector tool Enable jemalloc allocator support via dev-libs/jemalloc Enable JSON support through dev-libs/rapidjson Don't clear allocated memory. Use optimized memory manager unlesstbb USE flag is set. diff --git a/sci-libs/opencascade/opencascade-7.7.1.ebuild b/sci-libs/opencascade/opencascade-7.7.1.ebuild deleted file mode 100644 index 58050d6c5717..000000000000 --- a/sci-libs/opencascade/opencascade-7.7.1.ebuild +++ /dev/null @@ -1,360 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake flag-o-matic virtualx - -DESCRIPTION="Development platform for CAD/CAE, 3D surface/solid modeling and data exchange" -HOMEPAGE="https://www.opencascade.com" - -MY_PN="OCCT" - -MY_TEST_PV="7.7.0" -MY_TEST_PV2="${MY_TEST_PV//./_}" - -SRC_URI=" - test? ( https://github.com/Open-Cascade-SAS/${MY_PN}/releases/download/V${MY_TEST_PV2}/${PN}-dataset-${MY_TEST_PV}.tgz - -> ${PN}-dataset-${MY_TEST_PV}.tar.gz ) -" - -if [[ ${PV} = *9999* ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/Open-Cascade-SAS/${MY_PN}.git" -else - MY_PV="${PV//./_}" - SRC_URI+=" - https://github.com/Open-Cascade-SAS/${MY_PN}/archive/refs/tags/V${MY_PV}.tar.gz -> ${P}.tar.gz - " - S="${WORKDIR}/${MY_PN}-${MY_PV}" - KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" -fi - -LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )" -SLOT="0/$(ver_cut 1-2)" -IUSE="X debug doc examples ffmpeg freeimage freetype gles2-only gui json +opengl optimize tbb test testprograms tk vtk" - -REQUIRED_USE=" - ?? ( optimize tbb ) - ?? ( opengl gles2-only ) - examples? ( gui ) - test? ( freeimage json opengl ) -" - -# There's no easy way to test. Testing needs a rather big environment properly set up. -RESTRICT="!test? ( test )" - -# ffmpeg: https://tracker.dev.opencascade.org/view.php?id=32871 -RDEPEND=" - dev-lang/tcl:= - tk? ( dev-lang/tk:= ) - dev-libs/double-conversion - freetype? ( - media-libs/fontconfig - media-libs/freetype:2 - ) - opengl? ( - media-libs/libglvnd - ) - X? ( - x11-libs/libX11 - ) - gui? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtquickcontrols2:5 - dev-qt/qtwidgets:5 - dev-qt/qtxml:5 - ) - ffmpeg? ( /dev/null || die - # should be in paths indicated by CSF_TestDataPath environment variable, - # or in subfolder data in the script directory - unpack "${PN}-dataset-${MY_TEST_PV}.tar.gz" - popd > /dev/null || die - fi -} - -src_prepare() { - cmake_src_prepare - - sed -e 's|/lib\$|/'"$(get_libdir)"'\$|' \ - -i adm/templates/OpenCASCADEConfig.cmake.in || die - - # There is an OCCT_UPDATE_TARGET_FILE cmake macro that fails due to some - # assumptions it makes about installation paths. Rather than fixing it, just - # get rid of the mechanism altogether - its purpose is to allow a - # side-by-side installation of release and debug libraries. - sed -e 's|\\${OCCT_INSTALL_BIN_LETTER}||' \ - -i adm/cmake/occt_toolkit.cmake || die -} - -src_configure() { - # -Werror=odr - # https://bugs.gentoo.org/862912 - # https://tracker.dev.opencascade.org/view.php?id=33091 - filter-lto - - local mycmakeargs=( - -D3RDPARTY_DIR="${ESYSROOT}/usr" - -DBUILD_CPP_STANDARD="C++17" - -DBUILD_SOVERSION_NUMBERS=2 - - -DBUILD_DOC_Overview="$(usex doc)" - -DBUILD_Inspector="$(usex gui)" - - -DBUILD_ENABLE_FPE_SIGNAL_HANDLER="$(usex debug)" - -DBUILD_USE_PCH="no" - # -DBUILD_OPT_PROFILE="Default" # Production - # -DBUILD_RESOURCES="yes" - # -DBUILD_YACCLEX="yes" - - -DBUILD_RELEASE_DISABLE_EXCEPTIONS="no" # bug #847916 - -DINSTALL_DIR="${EPREFIX}/usr" - -DINSTALL_DIR_BIN="$(get_libdir)/${PN}/bin" - -DINSTALL_DIR_CMAKE="$(get_libdir)/cmake/${PN}" - -DINSTALL_DIR_DATA="share/${PN}/data" - -DINSTALL_DIR_DOC="share/doc/${PF}" - -DINSTALL_DIR_INCLUDE="include/${PN}" - -DINSTALL_DIR_LIB="$(get_libdir)/${PN}" - -DINSTALL_DIR_RESOURCE="share/${PN}/resources" - -DINSTALL_DIR_SAMPLES="share/${PN}/samples" - -DINSTALL_DIR_SCRIPT="$(get_libdir)/${PN}/bin" - -DINSTALL_DIR_TESTS="share/${PN}/tests" - -DINSTALL_DIR_WITH_VERSION="no" - -DINSTALL_SAMPLES="$(usex examples)" - - -DINSTALL_TEST_CASES="$(usex testprograms)" - - # no package yet in tree - -DUSE_DRACO="no" - -DUSE_FFMPEG="$(usex ffmpeg)" - -DUSE_FREEIMAGE="$(usex freeimage)" - -DUSE_FREETYPE="$(usex freetype)" - # Indicates whether OpenGL ES 2.0 should be used in OCCT visualization module - -DUSE_GLES2="$(usex gles2-only)" - # Indicates whether OpenGL desktop should be used in OCCT visualization module - -DUSE_OPENGL="$(usex opengl)" - # no package in tree - -DUSE_OPENVR="no" - -DUSE_RAPIDJSON="$(usex json)" - -DUSE_QT="$(usex gui)" - -DUSE_TBB="$(usex tbb)" - -DUSE_TK="$(usex tk)" - -DUSE_VTK="$(usex vtk)" - -DUSE_XLIB="$(usex X)" - ) - - if use doc; then - mycmakeargs+=( - -DINSTALL_DOC_Overview="yes" - -D3RDPARTY_SKIP_DOT_EXECUTABLE="no" - ) - fi - - if use gui; then - mycmakeargs+=( - -D3RDPARTY_QT_DIR="${ESYSROOT}/usr" - -DBUILD_SAMPLES_QT="$(usex examples)" - ) - else - mycmakeargs+=( - -DCMAKE_DISABLE_FIND_PACKAGE_Qt5="yes" - ) - fi - - if use tbb; then - mycmakeargs+=( - -D3RDPARTY_TBB_DIR="${ESYSROOT}/usr" - ) - fi - - if use vtk; then - local vtk_ver - vtk_ver="$(best_version "sci-libs/vtk")" - vtk_ver=$(ver_cut 1-2 "${vtk_ver#sci-libs/vtk-}") - mycmakeargs+=( - -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}/usr/include/vtk-${vtk_ver}" - -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}/usr/$(get_libdir)" - ) - fi - - cmake_src_configure - - sed -e "s|lib/|$(get_libdir)/|" \ - -e "s|VAR_CASROOT|${EPREFIX}/usr|" \ - < "${FILESDIR}/${PN}.env.in" > "${T}/99${PN}" || die - - # use TBB for memory allocation optimizations - if use tbb; then - sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=2|' -i "${T}/99${PN}" || die - fi - - # use internal optimized memory manager and don't clear memory with this - # memory manager. - if use optimize ; then - sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=1|' \ - -e 's|^#MMGT_CLEAR=1$|MMGT_CLEAR=0|' \ - -i "${T}/99${PN}" || die - fi -} - -src_test() { - echo "export CSF_OCCTDataPath=${WORKDIR}/data" >> "${BUILD_DIR}/custom.sh" || die - - if has_version media-fonts/dejavu; then - cp "${ESYSROOT}/usr/share/fonts/dejavu/DejaVuSans.ttf" "${WORKDIR}/data/" # no die here as this isn't fatal - fi - - local test_file=${T}/testscript.tcl - - local draw_opts=( - i # see ${BUILD_DIR}/custom*.sh - # -b # batch mode (no GUI, no viewers) - -v # no GUI, use virtual (off-screen) windows for viewers - ) - - local test_names=( - "demo draw bug30430" # prone to dying due to cpu limit - ) - local test_opts=( # run single tests - -overwrite - ) - for test_name in "${test_names[@]}"; do - cat >> "${test_file}" <<- _EOF_ || die - test ${test_name} -outfile "${BUILD_DIR}/test_results/${test_name// /\/}.html" ${test_opts[@]} - _EOF_ - done - - local testgrid_opts=() - - local SKIP_TESTS=() - - if [[ "${OCCT_OPTIONAL_TESTS}" != "true" ]]; then - SKIP_TESTS+=( - 'blend complex F4' - 'bugs' - 'geometry circ2d3Tan '{CircleCircleLin_11,CircleLinPoint_11} - 'heal checkshape bug32448_1' - 'hlr exact_hlr bug25813_2' - - 'hlr poly_hlr '{bug25813_2,bug25813_3,bug25813_4,Plate} - 'lowalgos intss bug'{565,567_1,25950,27431,29807_i1003,29807_i2006,29807_i3003,29807_i5002,30703} - 'lowalgos proximity '{A4,A5} - 'opengl background bug27836' - 'opengl drivers opengles' - 'opengles3' - - 'offset wire_closed_inside_0_005 D1' - 'offset wire_unclosed_outside_0_025 A1' - - 'demo draw bug30430' - ) - - local DEL_TESTS=( - 'opengl/data/background/bug27836' - 'perf/mesh/bug26965' - 'v3d/trsf/bug26029' - ) - - for test in "${DEL_TESTS[@]}"; do - rm "${CMAKE_USE_DIR}/tests/${test}" || die - done - fi - - if ! use vtk; then - SKIP_TESTS+=( - 'vtk' - ) - echo "IGNORE /Could not open: libTKIVtkDraw/skip VTK" >> "${CMAKE_USE_DIR}/tests/opengl/parse.rules" - fi - - if [[ -n "${SKIP_TESTS[*]}" ]]; then - testgrid_opts+=( -exclude "$(IFS=',' ; echo "${SKIP_TESTS[*]}")" ) - fi - - testgrid_opts+=( - # -refresh 5 - -overwrite - ) - cat >> "${test_file}" <<- _EOF_ || die - testgrid -outdir "${BUILD_DIR}/test_results" ${testgrid_opts[@]} - _EOF_ - - # # regenerate summary in case we have to - # cat >> "${test_file}" <<- _EOF_ || die - # testsummarize "${BUILD_DIR}/test_results" - # _EOF_ - - # Work around zink warnings - export LIBGL_ALWAYS_SOFTWARE="true" - - export CASROOT="${BUILD_DIR}" - - virtx \ - "${BUILD_DIR}/draw.sh" \ - "${draw_opts[@]}" \ - -f "${test_file}" - - if [[ ! -f "${BUILD_DIR}/test_results/tests.log" ]]; then - eerror "tests never ran!" - die - fi - failed_tests="$(grep ": FAILED" "${BUILD_DIR}/test_results/tests.log")" - if [[ -n ${failed_tests} ]]; then - eerror "Failed tests:" - eerror "${failed_tests}" - die - fi -} - -src_install() { - cmake_src_install - - doenvd "${T}/99${PN}" - - docompress -x "/usr/share/doc/${PF}/overview/html" -} diff --git a/sci-libs/opencascade/opencascade-7.7.2-r1.ebuild b/sci-libs/opencascade/opencascade-7.7.2-r1.ebuild new file mode 100644 index 000000000000..f3c88aa3ab89 --- /dev/null +++ b/sci-libs/opencascade/opencascade-7.7.2-r1.ebuild @@ -0,0 +1,362 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake flag-o-matic virtualx + +DESCRIPTION="Development platform for CAD/CAE, 3D surface/solid modeling and data exchange" +HOMEPAGE="https://www.opencascade.com" + +MY_PN="OCCT" + +MY_TEST_PV="7.7.0" +MY_TEST_PV2="${MY_TEST_PV//./_}" + +SRC_URI=" + test? ( https://github.com/Open-Cascade-SAS/${MY_PN}/releases/download/V${MY_TEST_PV2}/${PN}-dataset-${MY_TEST_PV}.tgz + -> ${PN}-dataset-${MY_TEST_PV}.tar.gz ) +" + +if [[ ${PV} = *9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/Open-Cascade-SAS/${MY_PN}.git" +else + MY_PV="${PV//./_}" + SRC_URI+=" + https://github.com/Open-Cascade-SAS/${MY_PN}/archive/refs/tags/V${MY_PV}.tar.gz -> ${P}.tar.gz + " + S="${WORKDIR}/${MY_PN}-${MY_PV}" + KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" +fi + +LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )" +SLOT="0/$(ver_cut 1-2)" +IUSE="X debug doc examples ffmpeg freeimage freetype gles2-only inspector json +opengl optimize tbb test testprograms tk vtk" + +REQUIRED_USE=" + ?? ( optimize tbb ) + ?? ( opengl gles2-only ) + test? ( freeimage json opengl ) +" + +# There's no easy way to test. Testing needs a rather big environment properly set up. +RESTRICT="!test? ( test )" + +# ffmpeg: https://tracker.dev.opencascade.org/view.php?id=32871 +RDEPEND=" + dev-lang/tcl:= + tk? ( dev-lang/tk:= ) + dev-libs/double-conversion + freetype? ( + media-libs/fontconfig + media-libs/freetype:2 + ) + opengl? ( + media-libs/libglvnd + ) + X? ( + x11-libs/libX11 + ) + examples? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtquickcontrols2:5 + dev-qt/qtwidgets:5 + dev-qt/qtxml:5 + ) + ffmpeg? ( /dev/null || die + # should be in paths indicated by CSF_TestDataPath environment variable, + # or in subfolder data in the script directory + unpack "${PN}-dataset-${MY_TEST_PV}.tar.gz" + popd > /dev/null || die + fi +} + +src_prepare() { + cmake_src_prepare + + sed -e 's|/lib\$|/'"$(get_libdir)"'\$|' \ + -i adm/templates/OpenCASCADEConfig.cmake.in || die + + # There is an OCCT_UPDATE_TARGET_FILE cmake macro that fails due to some + # assumptions it makes about installation paths. Rather than fixing it, just + # get rid of the mechanism altogether - its purpose is to allow a + # side-by-side installation of release and debug libraries. + sed -e 's|\\${OCCT_INSTALL_BIN_LETTER}||' \ + -i adm/cmake/occt_toolkit.cmake || die +} + +src_configure() { + # -Werror=odr + # https://bugs.gentoo.org/862912 + # https://tracker.dev.opencascade.org/view.php?id=33091 + filter-lto + + local mycmakeargs=( + -D3RDPARTY_DIR="${ESYSROOT}/usr" + -DBUILD_CPP_STANDARD="C++17" + -DBUILD_SOVERSION_NUMBERS=2 + + -DBUILD_DOC_Overview="$(usex doc)" + -DBUILD_Inspector="$(usex inspector)" + + -DBUILD_ENABLE_FPE_SIGNAL_HANDLER="$(usex debug)" + -DBUILD_USE_PCH="no" + # -DBUILD_OPT_PROFILE="Default" # Production + # -DBUILD_RESOURCES="yes" + # -DBUILD_YACCLEX="yes" + + -DBUILD_RELEASE_DISABLE_EXCEPTIONS="no" # bug #847916 + -DINSTALL_DIR="${EPREFIX}/usr" + -DINSTALL_DIR_BIN="$(get_libdir)/${PN}/bin" + -DINSTALL_DIR_CMAKE="$(get_libdir)/cmake/${PN}" + -DINSTALL_DIR_DATA="share/${PN}/data" + -DINSTALL_DIR_DOC="share/doc/${PF}" + -DINSTALL_DIR_INCLUDE="include/${PN}" + -DINSTALL_DIR_LIB="$(get_libdir)/${PN}" + -DINSTALL_DIR_RESOURCE="share/${PN}/resources" + -DINSTALL_DIR_SAMPLES="share/${PN}/samples" + -DINSTALL_DIR_SCRIPT="$(get_libdir)/${PN}/bin" + -DINSTALL_DIR_TESTS="share/${PN}/tests" + -DINSTALL_DIR_WITH_VERSION="no" + -DINSTALL_SAMPLES="$(usex examples)" + + -DINSTALL_TEST_CASES="$(usex testprograms)" + + # no package yet in tree + -DUSE_DRACO="no" + -DUSE_FFMPEG="$(usex ffmpeg)" + -DUSE_FREEIMAGE="$(usex freeimage)" + -DUSE_FREETYPE="$(usex freetype)" + # Indicates whether OpenGL ES 2.0 should be used in OCCT visualization module + -DUSE_GLES2="$(usex gles2-only)" + # Indicates whether OpenGL desktop should be used in OCCT visualization module + -DUSE_OPENGL="$(usex opengl)" + # no package in tree + -DUSE_OPENVR="no" + -DUSE_RAPIDJSON="$(usex json)" + -DUSE_TBB="$(usex tbb)" + -DUSE_TK="$(usex tk)" + -DUSE_VTK="$(usex vtk)" + -DUSE_XLIB="$(usex X)" + ) + + if use doc; then + mycmakeargs+=( + -DINSTALL_DOC_Overview="yes" + -D3RDPARTY_SKIP_DOT_EXECUTABLE="no" + ) + fi + + if use examples || use inspector; then + mycmakeargs+=( + -D3RDPARTY_QT_DIR="${ESYSROOT}/usr" + -DBUILD_SAMPLES_QT="$(usex examples)" + ) + fi + + if use tbb; then + mycmakeargs+=( + -D3RDPARTY_TBB_DIR="${ESYSROOT}/usr" + ) + fi + + if use vtk; then + local vtk_ver + vtk_ver="$(best_version "sci-libs/vtk")" + vtk_ver=$(ver_cut 1-2 "${vtk_ver#sci-libs/vtk-}") + mycmakeargs+=( + -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}/usr/include/vtk-${vtk_ver}" + -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}/usr/$(get_libdir)" + ) + fi + + cmake_src_configure + + sed -e "s|lib/|$(get_libdir)/|" \ + -e "s|VAR_CASROOT|${EPREFIX}/usr|" \ + < "${FILESDIR}/${PN}.env.in" > "${T}/99${PN}" || die + + # use TBB for memory allocation optimizations + if use tbb; then + sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=2|' -i "${T}/99${PN}" || die + fi + + # use internal optimized memory manager and don't clear memory with this + # memory manager. + if use optimize ; then + sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=1|' \ + -e 's|^#MMGT_CLEAR=1$|MMGT_CLEAR=0|' \ + -i "${T}/99${PN}" || die + fi +} + +src_test() { + echo "export CSF_OCCTDataPath=${WORKDIR}/data" >> "${BUILD_DIR}/custom.sh" || die + + if has_version media-fonts/dejavu; then + cp "${ESYSROOT}/usr/share/fonts/dejavu/DejaVuSans.ttf" "${WORKDIR}/data/" # no die here as this isn't fatal + fi + + local test_file=${T}/testscript.tcl + + local draw_opts=( + i # see ${BUILD_DIR}/custom*.sh + # -b # batch mode (no GUI, no viewers) + -v # no GUI, use virtual (off-screen) windows for viewers + ) + + local test_names=( + "demo draw bug30430" # prone to dying due to cpu limit + ) + local test_opts=( # run single tests + -overwrite + ) + for test_name in "${test_names[@]}"; do + cat >> "${test_file}" <<- _EOF_ || die + test ${test_name} -outfile "${BUILD_DIR}/test_results/${test_name// /\/}.html" ${test_opts[@]} + _EOF_ + done + + local testgrid_opts=() + + local SKIP_TESTS=() + + if [[ "${OCCT_OPTIONAL_TESTS}" != "true" ]]; then + SKIP_TESTS+=( + 'blend complex F4' + 'bugs' + 'geometry circ2d3Tan '{CircleCircleLin_11,CircleLinPoint_11} + 'heal checkshape bug32448_1' + 'hlr exact_hlr bug25813_2' + + 'hlr poly_hlr '{bug25813_2,bug25813_3,bug25813_4,Plate} + 'lowalgos intss bug'{565,567_1,25950,27431,29807_i1003,29807_i2006,29807_i3003,29807_i5002,30703} + 'lowalgos proximity '{A4,A5} + 'opengl background bug27836' + 'opengl drivers opengles' + 'opengles3' + + 'offset wire_closed_inside_0_005 D1' + 'offset wire_unclosed_outside_0_025 A1' + + 'demo draw bug30430' + ) + + local DEL_TESTS=( + 'opengl/data/background/bug27836' + 'perf/mesh/bug26965' + 'v3d/trsf/bug26029' + ) + + for test in "${DEL_TESTS[@]}"; do + rm "${CMAKE_USE_DIR}/tests/${test}" || die + done + fi + + if ! use vtk; then + SKIP_TESTS+=( + 'vtk' + ) + echo "IGNORE /Could not open: libTKIVtkDraw/skip VTK" >> "${CMAKE_USE_DIR}/tests/opengl/parse.rules" + fi + + if [[ -n "${SKIP_TESTS[*]}" ]]; then + testgrid_opts+=( -exclude "$(IFS=',' ; echo "${SKIP_TESTS[*]}")" ) + fi + + testgrid_opts+=( + # -refresh 5 + -overwrite + ) + cat >> "${test_file}" <<- _EOF_ || die + testgrid -outdir "${BUILD_DIR}/test_results" ${testgrid_opts[@]} + _EOF_ + + # # regenerate summary in case we have to + # cat >> "${test_file}" <<- _EOF_ || die + # testsummarize "${BUILD_DIR}/test_results" + # _EOF_ + + # Work around zink warnings + export LIBGL_ALWAYS_SOFTWARE="true" + + export CASROOT="${BUILD_DIR}" + + virtx \ + "${BUILD_DIR}/draw.sh" \ + "${draw_opts[@]}" \ + -f "${test_file}" + + if [[ ! -f "${BUILD_DIR}/test_results/tests.log" ]]; then + eerror "tests never ran!" + die + fi + failed_tests="$(grep ": FAILED" "${BUILD_DIR}/test_results/tests.log")" + if [[ -n ${failed_tests} ]]; then + eerror "Failed tests:" + eerror "${failed_tests}" + die + fi +} + +src_install() { + cmake_src_install + + doenvd "${T}/99${PN}" + + docompress -x "/usr/share/doc/${PF}/overview/html" +} diff --git a/sci-libs/opencascade/opencascade-7.7.2.ebuild b/sci-libs/opencascade/opencascade-7.7.2.ebuild deleted file mode 100644 index a83c28ed566c..000000000000 --- a/sci-libs/opencascade/opencascade-7.7.2.ebuild +++ /dev/null @@ -1,356 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake flag-o-matic virtualx - -DESCRIPTION="Development platform for CAD/CAE, 3D surface/solid modeling and data exchange" -HOMEPAGE="https://www.opencascade.com" - -MY_PN="OCCT" - -MY_TEST_PV="7.7.0" -MY_TEST_PV2="${MY_TEST_PV//./_}" - -SRC_URI=" - test? ( https://github.com/Open-Cascade-SAS/${MY_PN}/releases/download/V${MY_TEST_PV2}/${PN}-dataset-${MY_TEST_PV}.tgz - -> ${PN}-dataset-${MY_TEST_PV}.tar.gz ) -" - -if [[ ${PV} = *9999* ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/Open-Cascade-SAS/${MY_PN}.git" -else - MY_PV="${PV//./_}" - SRC_URI+=" - https://github.com/Open-Cascade-SAS/${MY_PN}/archive/refs/tags/V${MY_PV}.tar.gz -> ${P}.tar.gz - " - S="${WORKDIR}/${MY_PN}-${MY_PV}" - KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" -fi - -LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )" -SLOT="0/$(ver_cut 1-2)" -IUSE="X debug doc examples ffmpeg freeimage freetype gles2-only gui json +opengl optimize tbb test testprograms tk vtk" - -REQUIRED_USE=" - ?? ( optimize tbb ) - ?? ( opengl gles2-only ) - examples? ( gui ) - test? ( freeimage json opengl ) -" - -# There's no easy way to test. Testing needs a rather big environment properly set up. -RESTRICT="!test? ( test )" - -# ffmpeg: https://tracker.dev.opencascade.org/view.php?id=32871 -RDEPEND=" - dev-lang/tcl:= - tk? ( dev-lang/tk:= ) - dev-libs/double-conversion - freetype? ( - media-libs/fontconfig - media-libs/freetype:2 - ) - opengl? ( - media-libs/libglvnd - ) - X? ( - x11-libs/libX11 - ) - gui? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtquickcontrols2:5 - dev-qt/qtwidgets:5 - dev-qt/qtxml:5 - ) - ffmpeg? ( /dev/null || die - # should be in paths indicated by CSF_TestDataPath environment variable, - # or in subfolder data in the script directory - unpack "${PN}-dataset-${MY_TEST_PV}.tar.gz" - popd > /dev/null || die - fi -} - -src_prepare() { - cmake_src_prepare - - sed -e 's|/lib\$|/'"$(get_libdir)"'\$|' \ - -i adm/templates/OpenCASCADEConfig.cmake.in || die - - # There is an OCCT_UPDATE_TARGET_FILE cmake macro that fails due to some - # assumptions it makes about installation paths. Rather than fixing it, just - # get rid of the mechanism altogether - its purpose is to allow a - # side-by-side installation of release and debug libraries. - sed -e 's|\\${OCCT_INSTALL_BIN_LETTER}||' \ - -i adm/cmake/occt_toolkit.cmake || die -} - -src_configure() { - # -Werror=odr - # https://bugs.gentoo.org/862912 - # https://tracker.dev.opencascade.org/view.php?id=33091 - filter-lto - - local mycmakeargs=( - -D3RDPARTY_DIR="${ESYSROOT}/usr" - -DBUILD_CPP_STANDARD="C++17" - -DBUILD_SOVERSION_NUMBERS=2 - - -DBUILD_DOC_Overview="$(usex doc)" - -DBUILD_Inspector="$(usex gui)" - - -DBUILD_ENABLE_FPE_SIGNAL_HANDLER="$(usex debug)" - -DBUILD_USE_PCH="no" - # -DBUILD_OPT_PROFILE="Default" # Production - # -DBUILD_RESOURCES="yes" - # -DBUILD_YACCLEX="yes" - - -DBUILD_RELEASE_DISABLE_EXCEPTIONS="no" # bug #847916 - -DINSTALL_DIR="${EPREFIX}/usr" - -DINSTALL_DIR_BIN="$(get_libdir)/${PN}/bin" - -DINSTALL_DIR_CMAKE="$(get_libdir)/cmake/${PN}" - -DINSTALL_DIR_DATA="share/${PN}/data" - -DINSTALL_DIR_DOC="share/doc/${PF}" - -DINSTALL_DIR_INCLUDE="include/${PN}" - -DINSTALL_DIR_LIB="$(get_libdir)/${PN}" - -DINSTALL_DIR_RESOURCE="share/${PN}/resources" - -DINSTALL_DIR_SAMPLES="share/${PN}/samples" - -DINSTALL_DIR_SCRIPT="$(get_libdir)/${PN}/bin" - -DINSTALL_DIR_TESTS="share/${PN}/tests" - -DINSTALL_DIR_WITH_VERSION="no" - -DINSTALL_SAMPLES="$(usex examples)" - - -DINSTALL_TEST_CASES="$(usex testprograms)" - - # no package yet in tree - -DUSE_DRACO="no" - -DUSE_FFMPEG="$(usex ffmpeg)" - -DUSE_FREEIMAGE="$(usex freeimage)" - -DUSE_FREETYPE="$(usex freetype)" - # Indicates whether OpenGL ES 2.0 should be used in OCCT visualization module - -DUSE_GLES2="$(usex gles2-only)" - # Indicates whether OpenGL desktop should be used in OCCT visualization module - -DUSE_OPENGL="$(usex opengl)" - # no package in tree - -DUSE_OPENVR="no" - -DUSE_RAPIDJSON="$(usex json)" - -DUSE_QT="$(usex gui)" - -DUSE_TBB="$(usex tbb)" - -DUSE_TK="$(usex tk)" - -DUSE_VTK="$(usex vtk)" - -DUSE_XLIB="$(usex X)" - ) - - if use doc; then - mycmakeargs+=( - -DINSTALL_DOC_Overview="yes" - -D3RDPARTY_SKIP_DOT_EXECUTABLE="no" - ) - fi - - if use gui; then - mycmakeargs+=( - -D3RDPARTY_QT_DIR="${ESYSROOT}/usr" - -DBUILD_SAMPLES_QT="$(usex examples)" - ) - fi - - if use tbb; then - mycmakeargs+=( - -D3RDPARTY_TBB_DIR="${ESYSROOT}/usr" - ) - fi - - if use vtk; then - local vtk_ver - vtk_ver="$(best_version "sci-libs/vtk")" - vtk_ver=$(ver_cut 1-2 "${vtk_ver#sci-libs/vtk-}") - mycmakeargs+=( - -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}/usr/include/vtk-${vtk_ver}" - -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}/usr/$(get_libdir)" - ) - fi - - cmake_src_configure - - sed -e "s|lib/|$(get_libdir)/|" \ - -e "s|VAR_CASROOT|${EPREFIX}/usr|" \ - < "${FILESDIR}/${PN}.env.in" > "${T}/99${PN}" || die - - # use TBB for memory allocation optimizations - if use tbb; then - sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=2|' -i "${T}/99${PN}" || die - fi - - # use internal optimized memory manager and don't clear memory with this - # memory manager. - if use optimize ; then - sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=1|' \ - -e 's|^#MMGT_CLEAR=1$|MMGT_CLEAR=0|' \ - -i "${T}/99${PN}" || die - fi -} - -src_test() { - echo "export CSF_OCCTDataPath=${WORKDIR}/data" >> "${BUILD_DIR}/custom.sh" || die - - if has_version media-fonts/dejavu; then - cp "${ESYSROOT}/usr/share/fonts/dejavu/DejaVuSans.ttf" "${WORKDIR}/data/" # no die here as this isn't fatal - fi - - local test_file=${T}/testscript.tcl - - local draw_opts=( - i # see ${BUILD_DIR}/custom*.sh - # -b # batch mode (no GUI, no viewers) - -v # no GUI, use virtual (off-screen) windows for viewers - ) - - local test_names=( - "demo draw bug30430" # prone to dying due to cpu limit - ) - local test_opts=( # run single tests - -overwrite - ) - for test_name in "${test_names[@]}"; do - cat >> "${test_file}" <<- _EOF_ || die - test ${test_name} -outfile "${BUILD_DIR}/test_results/${test_name// /\/}.html" ${test_opts[@]} - _EOF_ - done - - local testgrid_opts=() - - local SKIP_TESTS=() - - if [[ "${OCCT_OPTIONAL_TESTS}" != "true" ]]; then - SKIP_TESTS+=( - 'blend complex F4' - 'bugs' - 'geometry circ2d3Tan '{CircleCircleLin_11,CircleLinPoint_11} - 'heal checkshape bug32448_1' - 'hlr exact_hlr bug25813_2' - - 'hlr poly_hlr '{bug25813_2,bug25813_3,bug25813_4,Plate} - 'lowalgos intss bug'{565,567_1,25950,27431,29807_i1003,29807_i2006,29807_i3003,29807_i5002,30703} - 'lowalgos proximity '{A4,A5} - 'opengl background bug27836' - 'opengl drivers opengles' - 'opengles3' - - 'offset wire_closed_inside_0_005 D1' - 'offset wire_unclosed_outside_0_025 A1' - - 'demo draw bug30430' - ) - - local DEL_TESTS=( - 'opengl/data/background/bug27836' - 'perf/mesh/bug26965' - 'v3d/trsf/bug26029' - ) - - for test in "${DEL_TESTS[@]}"; do - rm "${CMAKE_USE_DIR}/tests/${test}" || die - done - fi - - if ! use vtk; then - SKIP_TESTS+=( - 'vtk' - ) - echo "IGNORE /Could not open: libTKIVtkDraw/skip VTK" >> "${CMAKE_USE_DIR}/tests/opengl/parse.rules" - fi - - if [[ -n "${SKIP_TESTS[*]}" ]]; then - testgrid_opts+=( -exclude "$(IFS=',' ; echo "${SKIP_TESTS[*]}")" ) - fi - - testgrid_opts+=( - # -refresh 5 - -overwrite - ) - cat >> "${test_file}" <<- _EOF_ || die - testgrid -outdir "${BUILD_DIR}/test_results" ${testgrid_opts[@]} - _EOF_ - - # # regenerate summary in case we have to - # cat >> "${test_file}" <<- _EOF_ || die - # testsummarize "${BUILD_DIR}/test_results" - # _EOF_ - - # Work around zink warnings - export LIBGL_ALWAYS_SOFTWARE="true" - - export CASROOT="${BUILD_DIR}" - - virtx \ - "${BUILD_DIR}/draw.sh" \ - "${draw_opts[@]}" \ - -f "${test_file}" - - if [[ ! -f "${BUILD_DIR}/test_results/tests.log" ]]; then - eerror "tests never ran!" - die - fi - failed_tests="$(grep ": FAILED" "${BUILD_DIR}/test_results/tests.log")" - if [[ -n ${failed_tests} ]]; then - eerror "Failed tests:" - eerror "${failed_tests}" - die - fi -} - -src_install() { - cmake_src_install - - doenvd "${T}/99${PN}" - - docompress -x "/usr/share/doc/${PF}/overview/html" -} diff --git a/sci-libs/opencascade/opencascade-7.8.0.ebuild b/sci-libs/opencascade/opencascade-7.8.0.ebuild deleted file mode 100644 index ffa9e2065e14..000000000000 --- a/sci-libs/opencascade/opencascade-7.8.0.ebuild +++ /dev/null @@ -1,368 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake flag-o-matic virtualx - -DESCRIPTION="Development platform for CAD/CAE, 3D surface/solid modeling and data exchange" -HOMEPAGE="https://www.opencascade.com" - -MY_PN="OCCT" - -MY_TEST_PV="7.8.0" -MY_TEST_PV2="${MY_TEST_PV//./_}" - -SRC_URI=" - test? ( https://github.com/Open-Cascade-SAS/${MY_PN}/releases/download/V${MY_TEST_PV2}/${PN}-dataset-${MY_TEST_PV}.tar.xz ) -" - -if [[ ${PV} = *9999* ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/Open-Cascade-SAS/${MY_PN}.git" -else - MY_PV="${PV//./_}" - SRC_URI+=" - https://github.com/Open-Cascade-SAS/${MY_PN}/archive/refs/tags/V${MY_PV}.tar.gz -> ${P}.tar.gz - " - S="${WORKDIR}/${MY_PN}-${MY_PV}" - KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" -fi - -LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )" -SLOT="0/$(ver_cut 1-2)" -IUSE="X debug doc examples ffmpeg freeimage freetype gles2-only gui jemalloc json +opengl optimize tbb test testprograms tk vtk" - -REQUIRED_USE=" - ?? ( optimize tbb ) - ?? ( opengl gles2-only ) - examples? ( gui ) - test? ( freeimage json opengl ) -" - -# There's no easy way to test. Testing needs a rather big environment properly set up. -RESTRICT="!test? ( test )" - -# ffmpeg: https://tracker.dev.opencascade.org/view.php?id=32871 -RDEPEND=" - dev-lang/tcl:= - tk? ( dev-lang/tk:= ) - dev-libs/double-conversion - freetype? ( - media-libs/fontconfig - media-libs/freetype:2 - ) - opengl? ( - media-libs/libglvnd - ) - X? ( - x11-libs/libX11 - ) - gui? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtquickcontrols2:5 - dev-qt/qtwidgets:5 - dev-qt/qtxml:5 - ) - ffmpeg? ( /dev/null || die - # should be in paths indicated by CSF_TestDataPath environment variable, - # or in subfolder data in the script directory - unpack "${PN}-dataset-${MY_TEST_PV}.tar.xz" - popd > /dev/null || die - fi -} - -src_prepare() { - cmake_src_prepare - - sed -e 's|/lib\$|/'"$(get_libdir)"'\$|' \ - -i adm/templates/OpenCASCADEConfig.cmake.in || die - - # There is an OCCT_UPDATE_TARGET_FILE cmake macro that fails due to some - # assumptions it makes about installation paths. Rather than fixing it, just - # get rid of the mechanism altogether - its purpose is to allow a - # side-by-side installation of release and debug libraries. - sed -e 's|\\${OCCT_INSTALL_BIN_LETTER}||' \ - -i adm/cmake/occt_toolkit.cmake || die -} - -src_configure() { - # -Werror=odr - # https://bugs.gentoo.org/862912 - # https://tracker.dev.opencascade.org/view.php?id=33091 - filter-lto - - local mycmakeargs=( - -D3RDPARTY_DIR="${ESYSROOT}/usr" - -DBUILD_CPP_STANDARD="C++17" - -DBUILD_SOVERSION_NUMBERS=2 - - -DBUILD_DOC_Overview="$(usex doc)" - -DBUILD_Inspector="$(usex gui)" - - -DBUILD_ENABLE_FPE_SIGNAL_HANDLER="$(usex debug)" - -DBUILD_USE_PCH="no" - # -DBUILD_OPT_PROFILE="Default" # Production - # -DBUILD_RESOURCES="yes" - # -DBUILD_YACCLEX="yes" - - -DBUILD_RELEASE_DISABLE_EXCEPTIONS="no" # bug #847916 - -DINSTALL_DIR="${EPREFIX}/usr" - -DINSTALL_DIR_BIN="$(get_libdir)/${PN}/bin" - -DINSTALL_DIR_CMAKE="$(get_libdir)/cmake/${PN}" - -DINSTALL_DIR_DATA="share/${PN}/data" - -DINSTALL_DIR_DOC="share/doc/${PF}" - -DINSTALL_DIR_INCLUDE="include/${PN}" - -DINSTALL_DIR_LIB="$(get_libdir)/${PN}" - -DINSTALL_DIR_RESOURCE="share/${PN}/resources" - -DINSTALL_DIR_SAMPLES="share/${PN}/samples" - -DINSTALL_DIR_SCRIPT="$(get_libdir)/${PN}/bin" - -DINSTALL_DIR_TESTS="share/${PN}/tests" - -DINSTALL_DIR_WITH_VERSION="no" - -DINSTALL_SAMPLES="$(usex examples)" - - -DINSTALL_TEST_CASES="$(usex testprograms)" - - # no package yet in tree - -DUSE_DRACO="no" - -DUSE_FFMPEG="$(usex ffmpeg)" - -DUSE_FREEIMAGE="$(usex freeimage)" - -DUSE_FREETYPE="$(usex freetype)" - # Indicates whether OpenGL ES 2.0 should be used in OCCT visualization module - -DUSE_GLES2="$(usex gles2-only)" - # Indicates whether OpenGL desktop should be used in OCCT visualization module - -DUSE_OPENGL="$(usex opengl)" - # no package in tree - -DUSE_OPENVR="no" - -DUSE_RAPIDJSON="$(usex json)" - -DUSE_QT="$(usex gui)" - -DUSE_TBB="$(usex tbb)" - -DUSE_TK="$(usex tk)" - -DUSE_VTK="$(usex vtk)" - -DUSE_XLIB="$(usex X)" - ) - - # Select using memory manager tool. - if ! use jemalloc && ! use tbb; then - mycmakeargs+=( -DUSE_MMGR_TYPE=NATIVE ) - elif use jemalloc && ! use tbb; then - mycmakeargs+=( - -DUSE_MMGR_TYPE=JEMALLOC - -D3RDPARTY_JEMALLOC_INCLUDE_DIR="${ESYSROOT}/usr/include/jemalloc" - ) - elif ! use jemalloc && use tbb; then - mycmakeargs+=( -DUSE_MMGR_TYPE=TBB ) - elif use jemalloc && use tbb; then - mycmakeargs+=( -DUSE_MMGR_TYPE=FLEXIBLE ) - fi - - if use doc; then - mycmakeargs+=( - -DINSTALL_DOC_Overview="yes" - -D3RDPARTY_SKIP_DOT_EXECUTABLE="no" - ) - fi - - if use gui; then - mycmakeargs+=( - -D3RDPARTY_QT_DIR="${ESYSROOT}/usr" - -DBUILD_SAMPLES_QT="$(usex examples)" - ) - fi - - if use tbb; then - mycmakeargs+=( - -D3RDPARTY_TBB_DIR="${ESYSROOT}/usr" - ) - fi - - if use vtk; then - local vtk_ver - vtk_ver="$(best_version "sci-libs/vtk")" - vtk_ver=$(ver_cut 1-2 "${vtk_ver#sci-libs/vtk-}") - mycmakeargs+=( - -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}/usr/include/vtk-${vtk_ver}" - -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}/usr/$(get_libdir)" - ) - fi - - cmake_src_configure - - sed -e "s|lib/|$(get_libdir)/|" \ - -e "s|VAR_CASROOT|${EPREFIX}/usr|" \ - < "${FILESDIR}/${PN}.env.in" > "${T}/99${PN}" || die - - # use TBB for memory allocation optimizations - if use tbb; then - sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=2|' -i "${T}/99${PN}" || die - fi - - # use internal optimized memory manager and don't clear memory with this - # memory manager. - if use optimize ; then - sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=1|' \ - -e 's|^#MMGT_CLEAR=1$|MMGT_CLEAR=0|' \ - -i "${T}/99${PN}" || die - fi -} - -src_test() { - echo "export CSF_OCCTDataPath=${WORKDIR}/data" >> "${BUILD_DIR}/custom.sh" || die - - if has_version media-fonts/dejavu; then - cp "${ESYSROOT}/usr/share/fonts/dejavu/DejaVuSans.ttf" "${WORKDIR}/data/" # no die here as this isn't fatal - fi - - local test_file=${T}/testscript.tcl - - local draw_opts=( - i # see ${BUILD_DIR}/custom*.sh - # -b # batch mode (no GUI, no viewers) - -v # no GUI, use virtual (off-screen) windows for viewers - ) - - local test_names=( - "demo draw bug30430" # prone to dying due to cpu limit - ) - local test_opts=( # run single tests - -overwrite - ) - for test_name in "${test_names[@]}"; do - cat >> "${test_file}" <<- _EOF_ || die - test ${test_name} -outfile "${BUILD_DIR}/test_results/${test_name// /\/}.html" ${test_opts[@]} - _EOF_ - done - - local testgrid_opts=() - - local SKIP_TESTS=() - - if [[ "${OCCT_OPTIONAL_TESTS}" != "true" ]]; then - SKIP_TESTS+=( - 'blend complex F4' - 'bugs' - 'geometry circ2d3Tan '{CircleCircleLin_11,CircleLinPoint_11} - 'heal checkshape bug32448_1' - 'hlr exact_hlr bug25813_2' - - 'hlr poly_hlr '{bug25813_2,bug25813_3,bug25813_4,Plate} - 'lowalgos intss bug'{565,567_1,25950,27431,29807_i1003,29807_i2006,29807_i3003,29807_i5002,30703} - 'lowalgos proximity '{A4,A5} - 'opengl background bug27836' - 'opengl drivers opengles' - 'opengles3' - - 'demo draw bug30430' - ) - - local DEL_TESTS=( - 'opengl/data/background/bug27836' - 'perf/mesh/bug26965' - 'v3d/trsf/bug26029' - ) - - for test in "${DEL_TESTS[@]}"; do - rm "${CMAKE_USE_DIR}/tests/${test}" || die - done - fi - - if ! use vtk; then - SKIP_TESTS+=( - 'vtk' - ) - echo "IGNORE /Could not open: libTKIVtkDraw/skip VTK" >> "${CMAKE_USE_DIR}/tests/opengl/parse.rules" - fi - - if [[ -n "${SKIP_TESTS[*]}" ]]; then - testgrid_opts+=( -exclude "$(IFS=',' ; echo "${SKIP_TESTS[*]}")" ) - fi - - testgrid_opts+=( - # -refresh 5 - -overwrite - ) - cat >> "${test_file}" <<- _EOF_ || die - testgrid -outdir "${BUILD_DIR}/test_results" ${testgrid_opts[@]} - _EOF_ - - # # regenerate summary in case we have to - # cat >> "${test_file}" <<- _EOF_ || die - # testsummarize "${BUILD_DIR}/test_results" - # _EOF_ - - # Work around zink warnings - export LIBGL_ALWAYS_SOFTWARE="true" - - export CASROOT="${BUILD_DIR}" - - virtx \ - "${BUILD_DIR}/draw.sh" \ - "${draw_opts[@]}" \ - -f "${test_file}" - - if [[ ! -f "${BUILD_DIR}/test_results/tests.log" ]]; then - eerror "tests never ran!" - die - fi - failed_tests="$(grep ": FAILED" "${BUILD_DIR}/test_results/tests.log")" - if [[ -n ${failed_tests} ]]; then - eerror "Failed tests:" - eerror "${failed_tests}" - die - fi -} - -src_install() { - cmake_src_install - - doenvd "${T}/99${PN}" - - docompress -x "/usr/share/doc/${PF}/overview/html" -} diff --git a/sci-libs/opencascade/opencascade-7.8.1.ebuild b/sci-libs/opencascade/opencascade-7.8.1.ebuild new file mode 100644 index 000000000000..94a2d018ce23 --- /dev/null +++ b/sci-libs/opencascade/opencascade-7.8.1.ebuild @@ -0,0 +1,376 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake flag-o-matic virtualx + +DESCRIPTION="Development platform for CAD/CAE, 3D surface/solid modeling and data exchange" +HOMEPAGE="https://www.opencascade.com" + +MY_PN="OCCT" + +MY_TEST_PV="7.8.0" +MY_TEST_PV2="${MY_TEST_PV//./_}" + +SRC_URI=" + test? ( https://github.com/Open-Cascade-SAS/${MY_PN}/releases/download/V${MY_TEST_PV2}/${PN}-dataset-${MY_TEST_PV}.tar.xz ) +" + +if [[ ${PV} = *9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/Open-Cascade-SAS/${MY_PN}.git" +else + MY_PV="${PV//./_}" + SRC_URI+=" + https://github.com/Open-Cascade-SAS/${MY_PN}/archive/refs/tags/V${MY_PV}.tar.gz -> ${P}.tar.gz + " + S="${WORKDIR}/${MY_PN}-${MY_PV}" + KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" +fi + +LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )" +SLOT="0/$(ver_cut 1-2)" +IUSE="X debug doc examples ffmpeg freeimage freetype gles2-only inspector jemalloc json +opengl optimize tbb test testprograms tk vtk" + +REQUIRED_USE=" + ?? ( optimize tbb ) + ?? ( opengl gles2-only ) + test? ( freeimage json opengl ) +" + +# There's no easy way to test. Testing needs a rather big environment properly set up. +RESTRICT="!test? ( test )" + +# ffmpeg: https://tracker.dev.opencascade.org/view.php?id=32871 +RDEPEND=" + dev-lang/tcl:= + tk? ( dev-lang/tk:= ) + dev-libs/double-conversion + freetype? ( + media-libs/fontconfig + media-libs/freetype:2 + ) + opengl? ( + media-libs/libglvnd + ) + X? ( + x11-libs/libX11 + ) + examples? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtquickcontrols2:5 + dev-qt/qtwidgets:5 + dev-qt/qtxml:5 + ) + ffmpeg? ( /dev/null || die + # should be in paths indicated by CSF_TestDataPath environment variable, + # or in subfolder data in the script directory + unpack "${PN}-dataset-${MY_TEST_PV}.tar.xz" + popd > /dev/null || die + fi +} + +src_prepare() { + cmake_src_prepare + + sed -e 's|/lib\$|/'"$(get_libdir)"'\$|' \ + -i adm/templates/OpenCASCADEConfig.cmake.in || die + + # There is an OCCT_UPDATE_TARGET_FILE cmake macro that fails due to some + # assumptions it makes about installation paths. Rather than fixing it, just + # get rid of the mechanism altogether - its purpose is to allow a + # side-by-side installation of release and debug libraries. + sed -e 's|\\${OCCT_INSTALL_BIN_LETTER}||' \ + -i adm/cmake/occt_toolkit.cmake || die +} + +src_configure() { + # -Werror=odr + # https://bugs.gentoo.org/862912 + # https://tracker.dev.opencascade.org/view.php?id=33091 + filter-lto + + local mycmakeargs=( + -D3RDPARTY_DIR="${ESYSROOT}/usr" + -DBUILD_CPP_STANDARD="C++17" + -DBUILD_SOVERSION_NUMBERS=2 + + -DBUILD_DOC_Overview="$(usex doc)" + -DBUILD_Inspector="$(usex inspector)" + + -DBUILD_ENABLE_FPE_SIGNAL_HANDLER="$(usex debug)" + -DBUILD_USE_PCH="no" + # -DBUILD_OPT_PROFILE="Default" # Production + # -DBUILD_RESOURCES="yes" + # -DBUILD_YACCLEX="yes" + + -DBUILD_RELEASE_DISABLE_EXCEPTIONS="no" # bug #847916 + -DINSTALL_DIR="${EPREFIX}/usr" + -DINSTALL_DIR_BIN="$(get_libdir)/${PN}/bin" + -DINSTALL_DIR_CMAKE="$(get_libdir)/cmake/${PN}" + -DINSTALL_DIR_DATA="share/${PN}/data" + -DINSTALL_DIR_DOC="share/doc/${PF}" + -DINSTALL_DIR_INCLUDE="include/${PN}" + -DINSTALL_DIR_LIB="$(get_libdir)/${PN}" + -DINSTALL_DIR_RESOURCE="share/${PN}/resources" + -DINSTALL_DIR_SAMPLES="share/${PN}/samples" + -DINSTALL_DIR_SCRIPT="$(get_libdir)/${PN}/bin" + -DINSTALL_DIR_TESTS="share/${PN}/tests" + -DINSTALL_DIR_WITH_VERSION="no" + -DINSTALL_SAMPLES="$(usex examples)" + + -DINSTALL_TEST_CASES="$(usex testprograms)" + + # no package yet in tree + -DUSE_DRACO="no" + -DUSE_FFMPEG="$(usex ffmpeg)" + -DUSE_FREEIMAGE="$(usex freeimage)" + -DUSE_FREETYPE="$(usex freetype)" + # Indicates whether OpenGL ES 2.0 should be used in OCCT visualization module + -DUSE_GLES2="$(usex gles2-only)" + # Indicates whether OpenGL desktop should be used in OCCT visualization module + -DUSE_OPENGL="$(usex opengl)" + # no package in tree + -DUSE_OPENVR="no" + -DUSE_RAPIDJSON="$(usex json)" + -DUSE_TBB="$(usex tbb)" + -DUSE_TK="$(usex tk)" + -DUSE_VTK="$(usex vtk)" + -DUSE_XLIB="$(usex X)" + ) + + # Select using memory manager tool. + if ! use jemalloc && ! use tbb; then + mycmakeargs+=( -DUSE_MMGR_TYPE=NATIVE ) + elif use jemalloc && ! use tbb; then + mycmakeargs+=( + -DUSE_MMGR_TYPE=JEMALLOC + -D3RDPARTY_JEMALLOC_INCLUDE_DIR="${ESYSROOT}/usr/include/jemalloc" + ) + elif ! use jemalloc && use tbb; then + mycmakeargs+=( -DUSE_MMGR_TYPE=TBB ) + elif use jemalloc && use tbb; then + mycmakeargs+=( -DUSE_MMGR_TYPE=FLEXIBLE ) + fi + + if use doc; then + mycmakeargs+=( + -DINSTALL_DOC_Overview="yes" + -D3RDPARTY_SKIP_DOT_EXECUTABLE="no" + ) + fi + + if use examples || use inspector; then + mycmakeargs+=( + -D3RDPARTY_QT_DIR="${ESYSROOT}/usr" + -DBUILD_SAMPLES_QT="$(usex examples)" + ) + fi + + if use tbb; then + mycmakeargs+=( + -D3RDPARTY_TBB_DIR="${ESYSROOT}/usr" + ) + fi + + if use vtk; then + local vtk_ver + vtk_ver="$(best_version "sci-libs/vtk")" + vtk_ver=$(ver_cut 1-2 "${vtk_ver#sci-libs/vtk-}") + mycmakeargs+=( + -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}/usr/include/vtk-${vtk_ver}" + -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}/usr/$(get_libdir)" + ) + fi + + cmake_src_configure + + sed -e "s|lib/|$(get_libdir)/|" \ + -e "s|VAR_CASROOT|${EPREFIX}/usr|" \ + < "${FILESDIR}/${PN}.env.in" > "${T}/99${PN}" || die + + # use TBB for memory allocation optimizations + if use tbb; then + sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=2|' -i "${T}/99${PN}" || die + fi + + # use internal optimized memory manager and don't clear memory with this + # memory manager. + if use optimize ; then + sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=1|' \ + -e 's|^#MMGT_CLEAR=1$|MMGT_CLEAR=0|' \ + -i "${T}/99${PN}" || die + fi +} + +src_test() { + echo "export CSF_OCCTDataPath=${WORKDIR}/data" >> "${BUILD_DIR}/custom.sh" || die + + if has_version media-fonts/dejavu; then + cp "${ESYSROOT}/usr/share/fonts/dejavu/DejaVuSans.ttf" "${WORKDIR}/data/" # no die here as this isn't fatal + fi + + local test_file=${T}/testscript.tcl + + local draw_opts=( + i # see ${BUILD_DIR}/custom*.sh + # -b # batch mode (no GUI, no viewers) + -v # no GUI, use virtual (off-screen) windows for viewers + ) + + local test_names=( + "demo draw bug30430" # prone to dying due to cpu limit + ) + local test_opts=( # run single tests + -overwrite + ) + for test_name in "${test_names[@]}"; do + cat >> "${test_file}" <<- _EOF_ || die + test ${test_name} -outfile "${BUILD_DIR}/test_results/${test_name// /\/}.html" ${test_opts[@]} + _EOF_ + done + + local testgrid_opts=() + + local SKIP_TESTS=() + + if [[ "${OCCT_OPTIONAL_TESTS}" != "true" ]]; then + SKIP_TESTS+=( + 'blend complex F4' + 'bugs' + 'geometry circ2d3Tan '{CircleCircleLin_11,CircleLinPoint_11} + 'heal checkshape bug32448_1' + 'hlr exact_hlr bug25813_2' + + 'hlr poly_hlr '{bug25813_2,bug25813_3,bug25813_4,Plate} + 'lowalgos intss bug'{565,567_1,25950,27431,29807_i1003,29807_i2006,29807_i3003,29807_i5002,30703} + 'lowalgos proximity '{A4,A5} + 'opengl background bug27836' + 'opengl drivers opengles' + 'opengles3' + + 'demo draw bug30430' + ) + + local DEL_TESTS=( + 'opengl/data/background/bug27836' + 'perf/mesh/bug26965' + 'v3d/trsf/bug26029' + ) + + for test in "${DEL_TESTS[@]}"; do + rm "${CMAKE_USE_DIR}/tests/${test}" || die + done + fi + + if ! use vtk; then + SKIP_TESTS+=( + 'vtk' + ) + echo "IGNORE /Could not open: libTKIVtkDraw/skip VTK" >> "${CMAKE_USE_DIR}/tests/opengl/parse.rules" + fi + + if [[ -n "${SKIP_TESTS[*]}" ]]; then + testgrid_opts+=( -exclude "$(IFS=',' ; echo "${SKIP_TESTS[*]}")" ) + fi + + testgrid_opts+=( + # -refresh 5 + -overwrite + ) + cat >> "${test_file}" <<- _EOF_ || die + testgrid -outdir "${BUILD_DIR}/test_results" ${testgrid_opts[@]} + _EOF_ + + # # regenerate summary in case we have to + # cat >> "${test_file}" <<- _EOF_ || die + # testsummarize "${BUILD_DIR}/test_results" + # _EOF_ + + # Work around zink warnings + export LIBGL_ALWAYS_SOFTWARE="true" + + export CASROOT="${BUILD_DIR}" + + virtx \ + "${BUILD_DIR}/draw.sh" \ + "${draw_opts[@]}" \ + -f "${test_file}" + + if [[ ! -f "${BUILD_DIR}/test_results/tests.log" ]]; then + eerror "tests never ran!" + die + fi + failed_tests="$(grep ": FAILED" "${BUILD_DIR}/test_results/tests.log")" + if [[ -n ${failed_tests} ]]; then + eerror "Failed tests:" + eerror "${failed_tests}" + die + fi +} + +src_install() { + cmake_src_install + + doenvd "${T}/99${PN}" + + docompress -x "/usr/share/doc/${PF}/overview/html" +} diff --git a/sci-libs/opencascade/opencascade-9999.ebuild b/sci-libs/opencascade/opencascade-9999.ebuild index e3da366e699f..94a2d018ce23 100644 --- a/sci-libs/opencascade/opencascade-9999.ebuild +++ b/sci-libs/opencascade/opencascade-9999.ebuild @@ -31,7 +31,7 @@ fi LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )" SLOT="0/$(ver_cut 1-2)" -IUSE="X debug doc examples ffmpeg freeimage freetype gles2-only +gui jemalloc json +opengl optimize tbb test testprograms tk vtk" +IUSE="X debug doc examples ffmpeg freeimage freetype gles2-only inspector jemalloc json +opengl optimize tbb test testprograms tk vtk" REQUIRED_USE=" ?? ( optimize tbb ) @@ -57,20 +57,26 @@ RDEPEND=" X? ( x11-libs/libX11 ) - gui? ( - examples? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtquickcontrols2:5 - dev-qt/qtwidgets:5 - dev-qt/qtxml:5 - ) + examples? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtquickcontrols2:5 + dev-qt/qtwidgets:5 + dev-qt/qtxml:5 ) ffmpeg? (