commit: 52036a208653d570436bf401f6a6b9b5a56fd5a8 Author: undefined.behavior <bugs.gentoo <AT> igrek <DOT> fastem <DOT> com> AuthorDate: Sat May 17 13:28:06 2025 +0000 Commit: undefined.behavior <bugs.gentoo <AT> igrek <DOT> fastem <DOT> com> CommitDate: Sat May 17 13:29:35 2025 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=52036a20
app-benchmarks/occt-bin: add -r1, fix fcaps usage fcaps should be called only once, otherwise it resets the previous setting Signed-off-by: undefined.behavior <bugs.gentoo <AT> igrek.fastem.com> app-benchmarks/occt-bin/occt-bin-14.0.12-r1.ebuild | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/app-benchmarks/occt-bin/occt-bin-14.0.12-r1.ebuild b/app-benchmarks/occt-bin/occt-bin-14.0.12-r1.ebuild new file mode 100644 index 000000000..1a05f7472 --- /dev/null +++ b/app-benchmarks/occt-bin/occt-bin-14.0.12-r1.ebuild @@ -0,0 +1,58 @@ +# Copyright 2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop fcaps wrapper xdg udev + +DESCRIPTION="All-in-one stability, stress test, benchmark and monitoring tool" +HOMEPAGE="https://www.ocbase.com" + +SRC_URI="https://www.ocbase.com/download/edition:Personal/os:Linux/version:${PV} -> ${P}.bin" +S="${WORKDIR}" + +LICENSE="OCBASE-EULA" +SLOT="0" +KEYWORDS="~amd64" +IUSE="msr-user-access" +RESTRICT="bindist mirror strip" + +src_unpack() { + cp "${DISTDIR}"/"${P}".bin ./ +} + +src_install() { + newicon -s 256 "${FILESDIR}"/occt.png occt.png + + insinto /opt/occt + + newins "${P}".bin occt + + # Disable automatic updates + touch "${ED}"/opt/occt/disable_update + + # Don't use binary path as the config location + touch "${ED}"/opt/occt/use_home_config + + fperms +x /opt/occt/occt + + domenu "${FILESDIR}"/occt.desktop + + make_wrapper occt /opt/occt/occt + + use msr-user-access && udev_dorules "${FILESDIR}/90-occt-msr-access.rules" +} + +pkg_postinst() { + # Allow benchmarks to run with higher priority and /dev/cpu/*/msr access + fcaps "cap_sys_nice,cap_sys_rawio=eip" opt/occt/occt + + # Apply the udev rules + use msr-user-access && udev_reload && udevadm trigger --action=add --subsystem-match=msr + + einfo "" + einfo "If you have a license, you need to copy it into the OCCT config directory:" + einfo "" + einfo " mkdir -p ~/.config/occt && cp license.okl ~/.config/occt/" + einfo "" +}
