# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit cmake MY_SLOT="$(ver_cut 1-2)" COMMIT="b079fb9877ef64d4a8158a60fa157f59b096debb" COMMIT_SHORT="${COMMIT:0:7}" 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=${COMMIT};sf=tgz -> ${P}.tar.gz" S="${WORKDIR}/occt-${COMMIT_SHORT}" LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )" SLOT="0/${MY_SLOT}" KEYWORDS="amd64 ~arm64 ~riscv ~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" # ffmpeg: https://dev.opencascade.org/content/build-error-when-compiling-against-ffmpeg-5 RDEPEND=" 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/libX11 examples? ( dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtquickcontrols2:5 dev-qt/qtwidgets:5 dev-qt/qtxml:5 ) ffmpeg? ( "${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 }