From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 30037158086 for ; Sat, 6 Nov 2021 06:03:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 18258E08A2; Sat, 6 Nov 2021 06:03:33 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EE542E088B for ; Sat, 6 Nov 2021 06:03:30 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A599C33DE47 for ; Sat, 6 Nov 2021 06:03:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2F0581A3 for ; Sat, 6 Nov 2021 06:03:27 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1636178584.9f74703d8f9637f484ee9cdbe18d23efb5704a19.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/opencascade/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/opencascade/opencascade-7.5.2-r2.ebuild X-VCS-Directories: sci-libs/opencascade/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 9f74703d8f9637f484ee9cdbe18d23efb5704a19 X-VCS-Branch: master Date: Sat, 6 Nov 2021 06:03:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 1bf0c3db-7fe1-48b4-9dc5-e96242bd87f9 X-Archives-Hash: 7cd888acb2feafcd9c2e81940814c608 commit: 9f74703d8f9637f484ee9cdbe18d23efb5704a19 Author: Bernd Waibel posteo net> AuthorDate: Fri Nov 5 16:31:23 2021 +0000 Commit: Sam James gentoo org> CommitDate: Sat Nov 6 06:03:04 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f74703d sci-libs/opencascade: restrict dependency on dev-cpp/tbb Version tbb-2021.4.0 has some header files removed, so we restrict to earlier versions. Bug: https://bugs.gentoo.org/821655 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Bernd Waibel posteo.net> Signed-off-by: Sam James gentoo.org> sci-libs/opencascade/opencascade-7.5.2-r2.ebuild | 171 +++++++++++++++++++++++ 1 file changed, 171 insertions(+) diff --git a/sci-libs/opencascade/opencascade-7.5.2-r2.ebuild b/sci-libs/opencascade/opencascade-7.5.2-r2.ebuild new file mode 100644 index 00000000000..cf90cc0c8aa --- /dev/null +++ b/sci-libs/opencascade/opencascade-7.5.2-r2.ebuild @@ -0,0 +1,171 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake flag-o-matic + +MY_PV="$(ver_rs 1- '_')" +PV_MAJ="$(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="${PV_MAJ}" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="debug doc 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? ( =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 + + # 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 + + # use TBB for memory allocation optimizations + if use tbb; then + sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=2|' -i "${T}"/${PV_MAJ} || 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}"/${PV_MAJ} || die + fi +} + +src_install() { + cmake_src_install + + # respect slotting + insinto "/etc/env.d/${PN}" + doins "${T}/${PV_MAJ}" + + # remove examples + if use !examples; then + rm -r "${ED}/usr/share/${P}/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}" +}