summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2025-01-16 15:13:40 +0100
committerPacho Ramos <pacho@gentoo.org>2025-01-16 15:16:20 +0100
commit6b519a41ff8dbb81b407142252891e2053bcae72 (patch)
tree2484db663c35b032faf00c63d7541df8e9ca50ae /app-benchmarks/i7z
parentcargo.eclass: Emit a warning if the package uses 300+ crates (diff)
downloadgentoo-6b519a41ff8dbb81b407142252891e2053bcae72.tar.gz
gentoo-6b519a41ff8dbb81b407142252891e2053bcae72.tar.bz2
gentoo-6b519a41ff8dbb81b407142252891e2053bcae72.zip
app-benchmarks/i7z: Migrate to qt6
By the way, also provide a working desktop file for regular desktop users to more easily launch i7z gui. Thanks-to: Andreas Sturmlechner Closes: https://bugs.gentoo.org/947627 Signed-off-by: Pacho Ramos <pacho@gentoo.org>
Diffstat (limited to 'app-benchmarks/i7z')
-rw-r--r--app-benchmarks/i7z/files/i7z_GUI.policy18
-rw-r--r--app-benchmarks/i7z/i7z-93_p20131012-r3.ebuild71
2 files changed, 89 insertions, 0 deletions
diff --git a/app-benchmarks/i7z/files/i7z_GUI.policy b/app-benchmarks/i7z/files/i7z_GUI.policy
new file mode 100644
index 000000000000..03756867650a
--- /dev/null
+++ b/app-benchmarks/i7z/files/i7z_GUI.policy
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
+<policyconfig>
+ <vendor>i7z</vendor>
+ <vendor_url>https://github.com/ajaiantilal/i7z</vendor_url>
+ <icon_name>i7z</icon_name>
+ <action id="i7z_GUI">
+ <description>Run i7z_GUI as root</description>
+ <message>Authentication is required to run i7z GUI as root</message>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/i7z_GUI</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+</policyconfig>
diff --git a/app-benchmarks/i7z/i7z-93_p20131012-r3.ebuild b/app-benchmarks/i7z/i7z-93_p20131012-r3.ebuild
new file mode 100644
index 000000000000..b4f65ba24612
--- /dev/null
+++ b/app-benchmarks/i7z/i7z-93_p20131012-r3.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop qmake-utils toolchain-funcs
+
+COMMIT="5023138d7c35c4667c938b853e5ea89737334e92"
+DESCRIPTION="A better i7 (and now i3, i5) reporting tool for Linux"
+HOMEPAGE="https://github.com/ajaiantilal/i7z"
+SRC_URI="https://github.com/ajaiantilal/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="policykit qt6"
+
+RDEPEND="
+ sys-libs/ncurses:0=
+ qt6? (
+ policykit? ( sys-auth/polkit )
+ dev-qt/qtbase:6[gui,widgets]
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/i7z-0.27.2-ncurses.patch
+ "${FILESDIR}"/qt5.patch
+ "${FILESDIR}"/gcc5.patch
+
+ # From Debian
+ "${FILESDIR}"/fix-insecure-tempfile.patch
+ "${FILESDIR}"/fix_cpuid_asm.patch
+ "${FILESDIR}"/hyphen-used-as-minus-sign.patch
+ "${FILESDIR}"/install-i7z_rw_registers.patch
+ "${FILESDIR}"/use_stdbool.patch
+ "${FILESDIR}"/nehalem.patch
+ "${FILESDIR}"/gcc-10.patch
+ "${FILESDIR}"/typos.patch
+)
+
+src_configure() {
+ tc-export CC PKG_CONFIG
+ cd GUI || die
+ use qt6 && eqmake6 ${PN}_GUI.pro
+}
+
+src_compile() {
+ default
+
+ if use qt6; then
+ emake -C GUI clean
+ emake -C GUI
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${ED}" docdir=/usr/share/doc/${PF} install
+
+ if use qt6; then
+ dosbin GUI/i7z_GUI
+ if use policykit; then
+ insinto /usr/share/polkit-1/actions
+ doins "${FILESDIR}/i7z_GUI.policy"
+ make_desktop_entry "pkexec --disable-internal-agent /usr/sbin/i7z_GUI" i7z kcmprocessor
+ fi
+ fi
+}