From eba11f56f7cd93abe60ddd1613938bdd2683a4e8139475888c91a0cdbd916526 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 30 Jul 2024 08:33:36 +0000 Subject: [PATCH] - Support libproc2 (aka procps 4): Add pkgconfig(libproc2) BuildRequires. OBS-URL: https://build.opensuse.org/package/show/utilities/cpu-x?expand=0&rev=39 --- .gitattributes | 23 +++++++ .gitignore | 1 + cpu-x.changes | 169 ++++++++++++++++++++++++++++++++++++++++++++++++ cpu-x.spec | 127 ++++++++++++++++++++++++++++++++++++ no-no-pie.patch | 22 +++++++ v5.0.4.tar.gz | 3 + 6 files changed, 345 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 cpu-x.changes create mode 100644 cpu-x.spec create mode 100644 no-no-pie.patch create mode 100644 v5.0.4.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/cpu-x.changes b/cpu-x.changes new file mode 100644 index 0000000..3e9d7d3 --- /dev/null +++ b/cpu-x.changes @@ -0,0 +1,169 @@ +------------------------------------------------------------------- +Tue Jul 30 07:29:51 UTC 2024 - Dominique Leuenberger + +- Support libproc2 (aka procps 4): Add pkgconfig(libproc2) + BuildRequires. + +------------------------------------------------------------------- +Sun Apr 28 17:02:32 UTC 2024 - Andrea Manzini + +- Update to release 5.0.4 +- Changed + * Update databases (more CPU packages, Intel Meteor Lake-H, + Intel Emerald Rapids-SP) + * Patch dmidecode to version 3.6 +- Fixed + * Do not display unavailable DMI fields in Memory tab (#322) + +- added %check section to run unit tests + +------------------------------------------------------------------- +Mon Jan 15 09:42:42 UTC 2024 - pallaswept + +- Update to release 5.0.3 +- Changed + * Do not print OpenGL version for unknown user mode driver + * Reword labels about 'theme' in Settings (#314) + * Set tooltip for all labels with full text in GTK GUI (#316) + * Update databases (AMD Storm Peak) +- Fixed + * Fix active graphic card in GTK GUI (#313) + * Fix missing AMD GPU power average for some cards (#315) +- Update patch for new version +- Add desktop file + +------------------------------------------------------------------- +Thu Nov 23 17:19:11 UTC 2023 - Jan Engelhardt + +- Update to release 5.0.2 + * Print vendor ID and device ID in Graphics tab for "Device ID" + label + +------------------------------------------------------------------- +Sun Nov 5 10:29:24 UTC 2023 - Manfred Hollstein + +- Use newer g++, as Leap's default compiler does not provide the + header. +- Add build requires for glibmm. + +------------------------------------------------------------------- +Wed Nov 1 11:09:11 UTC 2023 - Jan Engelhardt + +- Update to release 5.0.1 + * Add more debug data, including a debug mode for the daemon + * Add an option to choose temperature unit among Celsius, + Fahrenheit, Kelvin and Rankine + * Update databases (AMD Genoa, Intel Sapphire Rapids-WS, AMD + Phoenix, Intel Alder Lake-U, Intel Apollo Lake) + +------------------------------------------------------------------- +Fri May 5 07:24:21 UTC 2023 - Martin Pluskal + +- Update to version 4.5.3: + * Add BAR size for Intel discrete GPU + * Add total VRAM size via Vulkan API for checking ResizableBAR + * Update databases (Intel Alder Lake, Intel Raptor Lake-S/P/U) + * Disable OpenCL support by default + * Update brand logos for AMD and Intel + * Make yellow brighter for dark themes in GTK GUI + * Patch dmidecode to version 3.5.484f893 + * Update 'Technology' label in CPU tab for new node name (like + Intel 7) and change prefix for technology nodes >= 100nm to µm +- Drop no longer needed cpu-x-update-database.patch + +------------------------------------------------------------------- +Wed Mar 15 19:52:07 UTC 2023 - malcolmlewis@opensuse.org + +- Add build requires to enable Vulkan support. +- Add cpu-x-update-database.patch: Update database.h to include cpu + information for Clarkdale (Core i3) and Haswell-EP. + +------------------------------------------------------------------- +Thu Nov 17 15:53:06 UTC 2022 - Jan Engelhardt + +- Update to release 4.5.2 + * Add support for hybrid CPUs + * Add support for TAB key and scrolling in NCurses TUI + * Support for procps-ng 4.0.1rc3 + * Update databases (Intel Tremont, Intel Ice Lake Xeon-D, AMD + Mendocino, AMD Zen 2 Desktop Kit, AMD Athlon 64 Sherman) + +------------------------------------------------------------------- +Thu Aug 25 22:24:56 UTC 2022 - Bjørn Lie + +- Update to version 4.3.1: + * Fix CPU usage in System tab when theme is Auto + * Fix a crash when libpci is upgraded and CPU-X is not rebuild + against the new shared library + +------------------------------------------------------------------- +Mon Apr 18 12:45:13 UTC 2022 - Manfred Hollstein + +- Revert, see https://bugzilla.opensuse.org/show_bug.cgi?id=1198266 + +------------------------------------------------------------------- +Thu Apr 7 08:21:55 UTC 2022 - Manfred Hollstein + +- Use new libproc-2 on Tumbleweed instead of libprocps. + +------------------------------------------------------------------- +Sat Mar 19 20:40:06 UTC 2022 - Matthias Fehring + +- Add opencl-headers to the BuildRequires to fix build on + openSUSE Leap 15.3 + +------------------------------------------------------------------- +Sat Mar 19 20:24:58 UTC 2022 - Matthias Fehring + +- Update to version 4.3.0 + * Add Compute Unit in Graphics Tab (require OpenCL) + * Add Resizable BAR in Graphics tab + * Update databases + * Rename from "Ext. Family/Model" to "Disp. Family/Model" + * Display a warning for unsupported CPUs + * Patch dmidecode to version 3.3.024b0fb4 + * Fix build with musl libc + * Limit number of characters for labels in Graphics tab (GTK GUI) + * Allow to translate settings (GTK GUI) +- Add pkgconfig(OpenCL) to the BuildRequires + +------------------------------------------------------------------- +Wed Jun 30 15:40:59 UTC 2021 - Ferdinand Thiessen + +- Update to version 4.2.0 + * Remove support for libcpuid before v0.5.0 + * Add glfw dependency for UMD + * Add new option --cpuid-decimal to display CPUID values in decimal + * Add User Mode Driver (UMD) to Graphics Tab + * Add GPU DeviceID:RevisonID in Graphics tab + * Add PCIe link speed/width in Graphics tab + * Add CPUX_ARGS environment variable to set default command line + * Add alternative key mapping for NCurses mode (option --keymap) + * Add debug mode (option --debug) + * Add screen reader accessibility on GUI + * Add Core Voltage, Power Avg and Memory Used in Graphics tab + (AMDGPU only) + * Add a dropdown list in Graphics tab to choose graphic card to monitor + * Reduce the GPU clock precision in Graphics tab + * Update CPU databasesSupport more GPU in Graphics tab + * Change bars color in System tab in GTK GUI when Dark theme is used + * Ignore batteries voltage when searching CPU voltage + * Fix for --issue-fmt + * Fix overflow caused by some translations + * Fix list of influenceable environment variables in help + * Fix screen flickering in NCurses TUI + +------------------------------------------------------------------- +Tue Oct 13 10:48:54 UTC 2020 - Jan Engelhardt + +- Split language files to -lang subpackage. + +------------------------------------------------------------------- +Mon Oct 12 13:20:03 UTC 2020 - Jan Engelhardt + +- Make powerpc builds possible. Split shell completions. + +------------------------------------------------------------------- +Sat Oct 10 10:00:06 UTC 2020 - Jan Engelhardt + +- Initial package (version 4.0.1) for build.opensuse.org diff --git a/cpu-x.spec b/cpu-x.spec new file mode 100644 index 0000000..494a8be --- /dev/null +++ b/cpu-x.spec @@ -0,0 +1,127 @@ +# +# spec file for package cpu-x +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define src_name CPU-X-%version +Name: cpu-x +Version: 5.0.4 +Release: 0 +Summary: Hardware overview utility +License: GPL-3.0-or-later +Group: System/X11/Utilities +URL: https://github.com/TheTumultuousUnicornOfDarkness/CPU-X +Source: https://github.com/TheTumultuousUnicornOfDarkness/CPU-X/archive/refs/tags/v%version.tar.gz +Patch1: no-no-pie.patch +%if 0%{suse_version} < 1599 +BuildRequires: gcc12 +BuildRequires: gcc12-c++ +%endif +BuildRequires: c++_compiler +BuildRequires: cmake >= 3.12 +BuildRequires: gettext-tools +%ifarch %ix86 x86_64 +BuildRequires: nasm +%endif +BuildRequires: opencl-headers +BuildRequires: (pkgconfig(libproc2) or pkgconfig(libprocps)) +BuildRequires: pkgconfig(OpenCL) +BuildRequires: pkgconfig(glfw3) +BuildRequires: pkgconfig(gtk+-3.0) >= 3.12.0 +BuildRequires: pkgconfig(gtkmm-3.0) >= 3.12.0 +BuildRequires: pkgconfig(libcpuid) >= 0.6.0 +BuildRequires: pkgconfig(libpci) +BuildRequires: pkgconfig(ncursesw) +BuildRequires: pkgconfig(vulkan) +# https://github.com/TheTumultuousUnicornOfDarkness/CPU-X/issues/105 +Provides: bundled(bandwidth) = 1.5.1 +Provides: bundled(dmidecode) = 3.5.20230314 + +%description +CPU-X is a software that gathers information about CPU, motherboard +and peripherals. It is similar to CPU-Z (Windows) and can be used in +graphical mode by using GTK or in text-based mode by using NCurses. A +dump mode is present from command line. + +%package bash-completion +Summary: Bash completion for %name +Group: System/Shells +Supplements: (%name and bash-completion) +BuildArch: noarch + +%description bash-completion +Shell completion definitions from %name for %name. + +%package fish-completion +Summary: Bash completion for %name +Group: System/Shells +Supplements: (%name and fish) +BuildArch: noarch + +%description fish-completion +Shell completion definitions from %name for %name. + +%package zsh-completion +Summary: Bash completion for %name +Group: System/Shells +Supplements: (%name and zsh) +BuildArch: noarch + +%description zsh-completion +Shell completion definitions from %name for %name. + +%lang_package + +%prep +%autosetup -p1 -n %src_name + +%build +%if 0%{suse_version} < 1599 +export CC=gcc-12 CXX=g++-12 +%endif +%cmake -DWITH_OPENCL=1 +%cmake_build + +%install +%cmake_install +rm -Rf "%buildroot/%_datadir/polkit-1" +%find_lang %name + +%check +for dir in awk grep ; do pushd tests/$dir && ./test_regex.sh && popd ; done + +%files +%_bindir/cpu-x +%_libexecdir/cpu-x* +%_datadir/applications/*.desktop +%_datadir/cpu-x/ +%_datadir/icons/* +%_datadir/glib-2.0/ +%_datadir/metainfo/ +%license COPYING + +%files bash-completion +%_datadir/bash-completion/ + +%files fish-completion +%_datadir/fish/ + +%files lang -f %name.lang + +%files zsh-completion +%_datadir/zsh/ + +%changelog diff --git a/no-no-pie.patch b/no-no-pie.patch new file mode 100644 index 0000000..a5a245c --- /dev/null +++ b/no-no-pie.patch @@ -0,0 +1,22 @@ +From: Jan Engelhardt +Date: 2020-10-10 12:34:08.413465744 +0200 + +Revert 04472c948d7a0f51d9ec6cda3caed683bca488ce. +Why is this flag even here... + +--- + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +Index: CPU-X-5.0.4/CMakeLists.txt +=================================================================== +--- CPU-X-5.0.4.orig/CMakeLists.txt ++++ CPU-X-5.0.4/CMakeLists.txt +@@ -47,7 +47,6 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_E + include(CheckCCompilerFlag) + check_c_compiler_flag("-no-pie" HAS_NO_PIE) + if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND HAS_NO_PIE) +- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -no-pie") + endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND HAS_NO_PIE) + + # Options diff --git a/v5.0.4.tar.gz b/v5.0.4.tar.gz new file mode 100644 index 0000000..8be2d31 --- /dev/null +++ b/v5.0.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7375e7184656f2630327afb13120e715956a509b40ae0fdb9edb5306638dce21 +size 1995465