diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-01-16 20:27:28 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-01-16 20:27:28 +0000 |
commit | 2fd57282f0262ca084e05b0f2c63fbada395d02b (patch) | |
tree | 4e0f23cea9ce9fd972e70ebc5214bf36fed465cc /sci-libs/opencascade | |
parent | c3bc61051d7f12b4c682efa7a5460bbc8815649e (diff) |
gentoo resync : 16.01.2021
Diffstat (limited to 'sci-libs/opencascade')
-rw-r--r-- | sci-libs/opencascade/Manifest | 10 | ||||
-rw-r--r-- | sci-libs/opencascade/files/opencascade.env.in (renamed from sci-libs/opencascade/files/opencascade-7.5.env.in) | 32 | ||||
-rw-r--r-- | sci-libs/opencascade/metadata.xml | 4 | ||||
-rw-r--r-- | sci-libs/opencascade/opencascade-7.5.2-r5.ebuild (renamed from sci-libs/opencascade/opencascade-7.5.2-r2.ebuild) | 63 | ||||
-rw-r--r-- | sci-libs/opencascade/opencascade-7.5.3-r6.ebuild (renamed from sci-libs/opencascade/opencascade-7.5.3-r3.ebuild) | 63 | ||||
-rw-r--r-- | sci-libs/opencascade/opencascade-7.6.0-r2.ebuild | 167 |
6 files changed, 257 insertions, 82 deletions
diff --git a/sci-libs/opencascade/Manifest b/sci-libs/opencascade/Manifest index 3a5c7e6b0c42..6154aae3a8ed 100644 --- a/sci-libs/opencascade/Manifest +++ b/sci-libs/opencascade/Manifest @@ -5,9 +5,11 @@ AUX opencascade-7.5.1-0004-fix-installation-of-cmake-config-files.patch 2207 BLA AUX opencascade-7.5.1-0005-fix-write-permissions-on-scripts.patch 2453 BLAKE2B 01b0ec99fb9ad032d6a90cceabb50900528abd0528b53e976484bf02f04eac9bc02b063bce5c221ae88782a126103e8077db9e90aa7f64f4f187dad00354d4d2 SHA512 fb3c374fe8aff8d2bac039a0eef754f2e823a97bfd7860bdd7e047c1b357202abfca0e37b46afc32220c7e354b5edb54805fbbbffde015bb4be2d7f4ded4a8da AUX opencascade-7.5.1-0006-fix-creation-of-custom.sh-script.patch 1245 BLAKE2B 1972c41e264a86761f8b3a3a649e67211776d0a4791b7e0f3adc859833e1d62e3a1d964484b2c53a516f5a33680ab2f32ad2010bf3fd531fca36373435307b68 SHA512 a2ffef88cb87acbc8215a7d1d7fe69ee17210392d39a64535d1538b2c08e43f5918c5b5e4a7540e8d636b1ba0df51670013e9d49f205bfc93a1e0d10a04388a7 AUX opencascade-7.5.1-fix-AllValues-name-collision-with-vtk-9.0.patch 5749 BLAKE2B 9176a738ec6b39a1cd5da61f2d72d096b09f6019f63a5b7733c5aa00796529f2cc5e3becdf5c24cfa01e4ff5b9da5ae9cd359372e6974eeaae7bcdf87e8c03c8 SHA512 5f7970e1461652966c34b1adb6e2580cfd7e3e230abbf108193027f67afbd5e78fc7451b50bf632fa3889174626384e4a0044d693e4f49ab9ece84a2ec6bd04a -AUX opencascade-7.5.env.in 4683 BLAKE2B 4c7c3764e56110c34c9acb9ecb860936049cf03f4ed99d708a8f631b5d3dc7cfa95ca7f8fe8b259986fa637243fe80a6888a2db6a2ad6f80b3b2175a9bb8680f SHA512 773b213e8d7752fc028d951d2a5d5aa610c96ee916499c3655e60f0ec485d393c3bf13a85cae104653242829d8abb9fea451f17bf1b902e1c1fa0bf5b329f08b +AUX opencascade.env.in 4571 BLAKE2B 81780f83a476ba5a2691c003c7fde48fec14be4e355480080749800602307d64b88f779cde09aa94a7bb815849d669b054d5ca00908199d1a9857b07518b4f0d SHA512 98e6861469725f6880e38a2d7389f7bc748bcbdf54930aa3fe05ab6a5e1fab5249c4ffed4f45b6ef982325acece0d5acb7ffd8d92adac9be2db9a41ee5356019 DIST opencascade-7.5.2.tar.gz 47812603 BLAKE2B 86995ea60e24329f91a2cbede26112a70794fb091b34d33614bef412b05b8cc9f1e770aecf78272b54a241c2524422c86f8ff722b3f27b54bf10fa5eda626288 SHA512 f951a941043a56f381cfd25e4d78bb9ae08e5cc29a894e6c0c35daf30aeabf1e44ee09af65bb6b7d62d9325be67741ddcf52266b7186b4c336c70ed8bcfa1676 DIST opencascade-7.5.3.tar.gz 47817862 BLAKE2B be438a08997c18c3cb2c08c520fff2f439cc8a406cc3f471be3b24f874ac3bd892c4afe6fa37f742ffb5da21b5a29f9c8f737e3160dcbda35a217286218eb5e1 SHA512 2d7cf284a1b3ce8d05151085b41579cc2f4e29489b7920769cd04f86a6d76e49f533b570226d3cf041c75582894ed8a6aff889312c7c507fffae47d3e57c5c47 -EBUILD opencascade-7.5.2-r2.ebuild 4640 BLAKE2B e6934f327c65b6add9f1c4f04db820543ca5ae02c636828380966eaa97635d7d2d380c4a966181dbaac54e6647361cf6b1369ce48e9cac57230b95eca92f5479 SHA512 7372ef935034a25f13c78fa88d5605e34d3a927241f2248ff360b341816688c8fe03c04afedd778d0c7ef4645b1b7f0de4c6d363977a02d693be707b521e2185 -EBUILD opencascade-7.5.3-r3.ebuild 4640 BLAKE2B f65b18f0554650c7eb60ad8f8f7684b8ce8ffada6c2e054a5bfffb7ebccc9b5d115eceb372c81f20bac021da0f1169735ff27a2fbf2cafe22361db670ce09d25 SHA512 845d39bbb2871b807b943da578d8fd08f77fea06688ed89bb754b7064f5818b0fdb3711a715e59d3c6ef79a67ef714a58c19a031d329327210578c346a3f1671 -MISC metadata.xml 979 BLAKE2B f5a7d51dd3a85f7409d97671fe8b3ca8675d11f78f3de4c8511d3e7be8d95b7f37bf3993dc21a2e33de0ac8412a57cb4385ec9cd7a37d2dbe3772fbbca298b13 SHA512 eb9673f62eee92feaf2da8ff42887c3cfd7d74558b8a35a5d482809a196211c2a6953c6f23558fdd74f10d6db3f493a4c022a5f8d7b1764e39e473394cf671d6 +DIST opencascade-7.6.0.tar.gz 48193117 BLAKE2B c16cd096f20e90267a00b6be21b17b22b491cf5d9aa1a311d64d7707042dc88380c60ececceb6728dbcdd4ff56a67558144292950e11518b21cbc49ace4e88cd SHA512 6839eb6641b9e0752474fce11cf1756223067febe0f5bcd5db249e3eccef29517a6952c124aae818220b6360070a792dacd1b0b4ce970b8351ce38598f31b4be +EBUILD opencascade-7.5.2-r5.ebuild 4730 BLAKE2B d0fa916eed671b5f1069eb52e474a8dd1d81bf56ede75ac60c3a8cab74a173530bca9b568b3ef9c665323ecd32c4f01508dcb5bf544c910fe057a1b1572d8c23 SHA512 489eacdda65c0eaabb18448200578c10dd7aa3876001efa2df81c1a2924de036127f6c6281c8259412e793cff6677b1d2f63d4369b3b027621885c3c5cf7052e +EBUILD opencascade-7.5.3-r6.ebuild 4730 BLAKE2B f56506fc176a6a2ff8aa238e321bc59ee92367aa40c1138931fee15ab2954290a96bf438338a213cb192a8dec326fca035b350ea7cc280e134a47929932e2b8f SHA512 b09a996e7c4e27f457b0c6a4c1c2bf93d93bef87b20eaa603bc018286e3aab0116e25b94e6c1a4bfd530c8075b67ccd332f574b2ada29d5af6c1b20bbb1f4731 +EBUILD opencascade-7.6.0-r2.ebuild 4423 BLAKE2B 4034cbc3b50261524a61f92fd7d92ad0e380bd58d0ce95c82425b9d634c368530ec4c46d891f979050885b3b11ac95f5d2d51ab2e4b48c41fab6493459011423 SHA512 ea1d6c2233a40dfebad4b610ba9a29719b84ee52479db0a449532d69f07663959bc8c868a15d4f49b610bd071f46d9fdb026f0e73739b59ca628094079c7c396 +MISC metadata.xml 1102 BLAKE2B 8569899b7ab437a4115ced11d3421f063d99233ed81bb5360228e580b20af2ee9753b41a8b3cb1291550160fa627058d915fde0e23514dcbed0f9cddc961ae11 SHA512 e9a38c41beec8eb54d6b9232447df3bc05635318f8dc727ddebc5f13be4d58b8d10576ddbb07a9fef41ba2adeb7ba1abcb4e10087b4711c4ff348d873c4916a8 diff --git a/sci-libs/opencascade/files/opencascade-7.5.env.in b/sci-libs/opencascade/files/opencascade.env.in index d7148c241f11..28006d724806 100644 --- a/sci-libs/opencascade/files/opencascade-7.5.env.in +++ b/sci-libs/opencascade/files/opencascade.env.in @@ -10,8 +10,8 @@ # define the root directory of Open CASCADE Technology (needed) CASROOT="VAR_CASROOT" -PATH="VAR_CASROOT/lib/opencascade-VAR_PV/bin" -LDPATH="VAR_CASROOT/lib/opencascade-VAR_PV" +PATH="VAR_CASROOT/lib/opencascade/bin" +LDPATH="VAR_CASROOT/lib/opencascade" ############################################################################# # The MMGT_* variables are used to determine how memory management will work @@ -79,21 +79,21 @@ LDPATH="VAR_CASROOT/lib/opencascade-VAR_PV" # The following CSF_* variables define various directories and files where # OCCT is looking for resources. -CSF_GraphicShr="VAR_CASROOT/lib/opencascade-VAR_PV/libTKOpenGl.so" -CSF_MIGRATION_TYPES="VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource/MigrationSheet.txt" -CSF_MDTVTexturesDirectory="VAR_CASROOT/share/opencascade-VAR_PV/resources/Textures" -CSF_PluginDefaults="VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource" -CSF_StandardDefaults="VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource" -CSF_StandardLiteDefaults="VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource" -CSF_XCAFDefaults="VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource" -CSF_XmlOcafResource="VAR_CASROOT/share/opencascade-VAR_PV/resources/XmlOcafResource" +CSF_GraphicShr="VAR_CASROOT/lib/opencascade/libTKOpenGl.so" +CSF_MIGRATION_TYPES="VAR_CASROOT/share/opencascade/resources/StdResource/MigrationSheet.txt" +CSF_MDTVTexturesDirectory="VAR_CASROOT/share/opencascade/resources/Textures" +CSF_PluginDefaults="VAR_CASROOT/share/opencascade/resources/StdResource" +CSF_StandardDefaults="VAR_CASROOT/share/opencascade/resources/StdResource" +CSF_StandardLiteDefaults="VAR_CASROOT/share/opencascade/resources/StdResource" +CSF_XCAFDefaults="VAR_CASROOT/share/opencascade/resources/StdResource" +CSF_XmlOcafResource="VAR_CASROOT/share/opencascade/resources/XmlOcafResource" # The below values might be optional. -CSF_IGESDefaults="VAR_CASROOT/share/opencascade-VAR_PV/resources/XSTEPResource" -CSF_ShadersDirectory="VAR_CASROOT/share/opencascade-VAR_PV/resources/Shaders" -CSF_SHMessage="VAR_CASROOT/share/opencascade-VAR_PV/resources/SHMessage" -CSF_STEPDefaults="VAR_CASROOT/share/opencascade-VAR_PV/resources/XSTEPResource" -CSF_UnitsDefinition="VAR_CASROOT/share/opencascade-VAR_PV/resources/UnitsAPI/Units.dat" -CSF_XSMessage="VAR_CASROOT/share/opencascade-VAR_PV/resources/XSMessage" +CSF_IGESDefaults="VAR_CASROOT/share/opencascade/resources/XSTEPResource" +CSF_ShadersDirectory="VAR_CASROOT/share/opencascade/resources/Shaders" +CSF_SHMessage="VAR_CASROOT/share/opencascade/resources/SHMessage" +CSF_STEPDefaults="VAR_CASROOT/share/opencascade/resources/XSTEPResource" +CSF_UnitsDefinition="VAR_CASROOT/share/opencascade/resources/UnitsAPI/Units.dat" +CSF_XSMessage="VAR_CASROOT/share/opencascade/resources/XSMessage" # TODO: check those # they were defined in the original ebuild but the directories and files diff --git a/sci-libs/opencascade/metadata.xml b/sci-libs/opencascade/metadata.xml index fe7ad33b9523..d1b713a48a87 100644 --- a/sci-libs/opencascade/metadata.xml +++ b/sci-libs/opencascade/metadata.xml @@ -10,6 +10,10 @@ <name>Proxy Maintainers</name> </maintainer> <use> + <flag name="eigen"> + Enable support for eigenvalues through the header-only + <pkg>dev-cpp/eigen</pkg> package. + </flag> <flag name="freeimage"> Enable support for image i/o via <pkg>media-libs/freeimage</pkg> </flag> diff --git a/sci-libs/opencascade/opencascade-7.5.2-r2.ebuild b/sci-libs/opencascade/opencascade-7.5.2-r5.ebuild index cf90cc0c8aa1..8bf1c6acd11e 100644 --- a/sci-libs/opencascade/opencascade-7.5.2-r2.ebuild +++ b/sci-libs/opencascade/opencascade-7.5.2-r5.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -14,9 +14,9 @@ SRC_URI="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/ta S="${WORKDIR}/occt-V${MY_PV}" LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )" -SLOT="${PV_MAJ}" +SLOT="0/${PV_MAJ}" KEYWORDS="~amd64 ~arm64 ~x86" -IUSE="debug doc examples ffmpeg freeimage gles2 json optimize tbb vtk" +IUSE="debug doc examples ffmpeg freeimage gles2-only json optimize tbb vtk" REQUIRED_USE="?? ( optimize tbb )" @@ -25,7 +25,7 @@ REQUIRED_USE="?? ( optimize tbb )" RESTRICT="test" RDEPEND=" - app-eselect/eselect-opencascade + !app-eselect/eselect-opencascade dev-lang/tcl:= dev-lang/tk:= dev-tcltk/itcl @@ -49,13 +49,11 @@ RDEPEND=" tbb? ( <dev-cpp/tbb-2021.4.0 ) vtk? ( sci-libs/vtk:=[rendering] ) " -DEPEND=" - ${RDEPEND} +DEPEND="${RDEPEND}" + +BDEPEND=" dev-cpp/eigen dev-libs/rapidjson -" -BDEPEND=" - app-eselect/eselect-opencascade doc? ( app-doc/doxygen ) examples? ( dev-qt/linguist-tools:5 ) " @@ -90,20 +88,25 @@ src_configure() { local mycmakeargs=( -DBUILD_DOC_Overview=$(usex doc) -DBUILD_Inspector=$(usex examples) - -DBUILD_WITH_DEBUG=$(usex debug) - -DINSTALL_DIR_BIN="$(get_libdir)/${P}/bin" - -DINSTALL_DIR_CMAKE="$(get_libdir)/cmake/${P}" + + -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_LIB="$(get_libdir)/${P}" - -DINSTALL_DIR_SCRIPT="$(get_libdir)/${P}/bin" - -DINSTALL_DIR_WITH_VERSION=ON + -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_WITH_VERSION=OFF -DINSTALL_SAMPLES=$(usex examples) -DINSTALL_TEST_CASES=NO + -DUSE_D3D=NO -DUSE_FFMPEG=$(usex ffmpeg) -DUSE_FREEIMAGE=$(usex freeimage) -DUSE_FREETYPE=ON - -DUSE_GLES2=$(usex gles2) + -DUSE_GLES2=$(usex gles2-only) -DUSE_RAPIDJSON=$(usex json) -DUSE_TBB=$(usex tbb) -DUSE_VTK=$(usex vtk) @@ -119,7 +122,13 @@ src_configure() { fi if use vtk; then - if has_version ">=sci-libs/vtk-9.0.0"; then + if has_version ">=sci-libs/vtk-9.1.0"; then + mycmakeargs+=( + -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr + -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.1 + -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}"/usr/$(get_libdir) + ) + elif has_version ">=sci-libs/vtk-9.0.0"; then mycmakeargs+=( -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.0 @@ -132,13 +141,12 @@ src_configure() { # prepare /etc/env.d file sed -e "s|lib/|$(get_libdir)/|" \ - -e "s|VAR_PV|${PV}|" \ - -e "s|VAR_CASROOT|${ESYSROOT}/usr|" \ - < "${FILESDIR}"/${PN}-${PV_MAJ}.env.in > "${T}"/${PV_MAJ} || die + -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}"/${PV_MAJ} || die + 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 @@ -146,26 +154,19 @@ src_configure() { if use optimize ; then sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=1|' \ -e 's|^#MMGT_CLEAR=1$|MMGT_CLEAR=0|' \ - -i "${T}"/${PV_MAJ} || die + -i "${T}"/99${PN} || die fi } src_install() { cmake_src_install - # respect slotting - insinto "/etc/env.d/${PN}" - doins "${T}/${PV_MAJ}" + doenvd "${T}/99${PN}" # remove examples if use !examples; then - rm -r "${ED}/usr/share/${P}/samples" || die + rm -r "${ED}/usr/share/${PN}/samples" || die fi docompress -x /usr/share/doc/${PF}/overview/html } - -pkg_postinst() { - eselect ${PN} set ${PV_MAJ} || die "failed to switch to updated implementation" - einfo "You can switch between available ${PN} implementations using eselect ${PN}" -} diff --git a/sci-libs/opencascade/opencascade-7.5.3-r3.ebuild b/sci-libs/opencascade/opencascade-7.5.3-r6.ebuild index 0296150b6b01..1bec9312ad8d 100644 --- a/sci-libs/opencascade/opencascade-7.5.3-r3.ebuild +++ b/sci-libs/opencascade/opencascade-7.5.3-r6.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -14,9 +14,9 @@ SRC_URI="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/ta S="${WORKDIR}/occt-V${MY_PV}" LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )" -SLOT="${PV_MAJ}" +SLOT="0/${PV_MAJ}" KEYWORDS="~amd64 ~arm64 ~x86" -IUSE="debug doc examples ffmpeg freeimage gles2 json optimize tbb vtk" +IUSE="debug doc examples ffmpeg freeimage gles2-only json optimize tbb vtk" REQUIRED_USE="?? ( optimize tbb )" @@ -25,7 +25,7 @@ REQUIRED_USE="?? ( optimize tbb )" RESTRICT="test" RDEPEND=" - app-eselect/eselect-opencascade + !app-eselect/eselect-opencascade dev-lang/tcl:= dev-lang/tk:= dev-tcltk/itcl @@ -49,13 +49,11 @@ RDEPEND=" tbb? ( <dev-cpp/tbb-2021.4.0 ) vtk? ( sci-libs/vtk:=[rendering] ) " -DEPEND=" - ${RDEPEND} +DEPEND="${RDEPEND}" + +BDEPEND=" dev-cpp/eigen dev-libs/rapidjson -" -BDEPEND=" - app-eselect/eselect-opencascade doc? ( app-doc/doxygen ) examples? ( dev-qt/linguist-tools:5 ) " @@ -90,20 +88,25 @@ src_configure() { local mycmakeargs=( -DBUILD_DOC_Overview=$(usex doc) -DBUILD_Inspector=$(usex examples) - -DBUILD_WITH_DEBUG=$(usex debug) - -DINSTALL_DIR_BIN="$(get_libdir)/${P}/bin" - -DINSTALL_DIR_CMAKE="$(get_libdir)/cmake/${P}" + + -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_LIB="$(get_libdir)/${P}" - -DINSTALL_DIR_SCRIPT="$(get_libdir)/${P}/bin" - -DINSTALL_DIR_WITH_VERSION=ON + -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_WITH_VERSION=OFF -DINSTALL_SAMPLES=$(usex examples) -DINSTALL_TEST_CASES=NO + -DUSE_D3D=NO -DUSE_FFMPEG=$(usex ffmpeg) -DUSE_FREEIMAGE=$(usex freeimage) -DUSE_FREETYPE=ON - -DUSE_GLES2=$(usex gles2) + -DUSE_GLES2=$(usex gles2-only) -DUSE_RAPIDJSON=$(usex json) -DUSE_TBB=$(usex tbb) -DUSE_VTK=$(usex vtk) @@ -119,7 +122,13 @@ src_configure() { fi if use vtk; then - if has_version ">=sci-libs/vtk-9.0.0"; then + if has_version ">=sci-libs/vtk-9.1.0"; then + mycmakeargs+=( + -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr + -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.1 + -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}"/usr/$(get_libdir) + ) + elif has_version ">=sci-libs/vtk-9.0.0"; then mycmakeargs+=( -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.0 @@ -132,13 +141,12 @@ src_configure() { # prepare /etc/env.d file sed -e "s|lib/|$(get_libdir)/|" \ - -e "s|VAR_PV|${PV}|" \ - -e "s|VAR_CASROOT|${ESYSROOT}/usr|" \ - < "${FILESDIR}"/${PN}-${PV_MAJ}.env.in > "${T}"/${PV_MAJ} || die + -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}"/${PV_MAJ} || die + 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 @@ -146,26 +154,19 @@ src_configure() { if use optimize ; then sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=1|' \ -e 's|^#MMGT_CLEAR=1$|MMGT_CLEAR=0|' \ - -i "${T}"/${PV_MAJ} || die + -i "${T}"/99${PN} || die fi } src_install() { cmake_src_install - # respect slotting - insinto "/etc/env.d/${PN}" - doins "${T}/${PV_MAJ}" + doenvd "${T}/99${PN}" # remove examples if use !examples; then - rm -r "${ED}/usr/share/${P}/samples" || die + rm -r "${ED}/usr/share/${PN}/samples" || die fi docompress -x /usr/share/doc/${PF}/overview/html } - -pkg_postinst() { - eselect ${PN} set ${PV_MAJ} || die "failed to switch to updated implementation" - einfo "You can switch between available ${PN} implementations using eselect ${PN}" -} diff --git a/sci-libs/opencascade/opencascade-7.6.0-r2.ebuild b/sci-libs/opencascade/opencascade-7.6.0-r2.ebuild new file mode 100644 index 000000000000..595c605bc985 --- /dev/null +++ b/sci-libs/opencascade/opencascade-7.6.0-r2.ebuild @@ -0,0 +1,167 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +MY_PV="$(ver_rs 1- '_')" +MY_SLOT="$(ver_cut 1-2)" + +DESCRIPTION="Development platform for CAD/CAE, 3D surface/solid modeling and data exchange" +HOMEPAGE="https://www.opencascade.com" +SRC_URI="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/V${MY_PV};sf=tgz -> ${P}.tar.gz" +S="${WORKDIR}/occt-V${MY_PV}" + +LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )" +SLOT="0/${MY_SLOT}" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="doc eigen examples ffmpeg freeimage gles2 json optimize tbb vtk" + +REQUIRED_USE="?? ( optimize tbb )" + +# There's no easy way to test. Testing needs a rather big environment +# properly set up. +RESTRICT="test" + +RDEPEND=" + !app-eselect/eselect-opencascade + dev-lang/tcl:= + dev-lang/tk:= + dev-tcltk/itcl + dev-tcltk/itk + dev-tcltk/tix + media-libs/fontconfig + media-libs/freetype:2 + media-libs/ftgl + virtual/glu + virtual/opengl + x11-libs/libXmu + examples? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtquickcontrols2:5 + dev-qt/qtwidgets:5 + dev-qt/qtxml:5 + ) + ffmpeg? ( media-video/ffmpeg:= ) + freeimage? ( media-libs/freeimage ) + tbb? ( <dev-cpp/tbb-2021.4 ) + vtk? ( sci-libs/vtk:=[rendering] ) +" +DEPEND=" + ${RDEPEND} + eigen? ( dev-cpp/eigen ) + json? ( dev-libs/rapidjson ) +" +BDEPEND=" + doc? ( app-doc/doxygen[dot] ) + examples? ( dev-qt/linguist-tools:5 ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-7.5.1-0004-fix-installation-of-cmake-config-files.patch + "${FILESDIR}"/${PN}-7.5.1-0005-fix-write-permissions-on-scripts.patch + "${FILESDIR}"/${PN}-7.5.1-0006-fix-creation-of-custom.sh-script.patch +) + +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() { + local mycmakeargs=( + -DBUILD_DOC_Overview=$(usex doc) + -DBUILD_Inspector=$(usex examples) + + -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_WITH_VERSION=OFF + -DINSTALL_SAMPLES=$(usex examples) + -DINSTALL_TEST_CASES=NO + + -DUSE_D3D=NO + # no package yet in tree + -DUSE_DRACO=OFF + -DUSE_EIGEN=$(usex eigen) + -DUSE_FFMPEG=$(usex ffmpeg) + -DUSE_FREEIMAGE=$(usex freeimage) + -DUSE_FREETYPE=ON + -DUSE_GLES2=$(usex gles2) + # no package in tree + -DUSE_OPENVR=OFF + -DUSE_RAPIDJSON=$(usex json) + -DUSE_TBB=$(usex tbb) + -DUSE_VTK=$(usex vtk) + -DUSE_XLIB=ON + ) + + use doc && mycmakeargs+=( -DINSTALL_DOC_Overview=ON ) + + if use examples; then + mycmakeargs+=( + -D3RDPARTY_QT_DIR="${ESYSROOT}"/usr + -DBUILD_SAMPLES_QT=ON + ) + fi + + if use vtk; then + if has_version ">=sci-libs/vtk-9.1.0"; then + mycmakeargs+=( + -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr + -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.1 + -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}"/usr/$(get_libdir) + ) + elif has_version ">=sci-libs/vtk-9.0.0"; then + mycmakeargs+=( + -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr + -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.0 + -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}"/usr/$(get_libdir) + ) + fi + 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_install() { + cmake_src_install + + doenvd "${T}/99${PN}" + + docompress -x /usr/share/doc/${PF}/overview/html +} |