public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/hardinfo2] epel10: Fix build with CMake 4.0
@ 2026-09-05 16:43 Yaakov Selkowitz
  0 siblings, 0 replies; only message in thread
From: Yaakov Selkowitz @ 2026-09-05 16:43 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/hardinfo2
            Branch : epel10
            Commit : 01ed2d5e79dad14577c9a92b712cdec9e47aa4f8
            Author : Yaakov Selkowitz <yselkowi@redhat.com>
            Date   : 2026-07-27T21:58:50-04:00
            Stats  : +1/-15 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/hardinfo2/c/01ed2d5e79dad14577c9a92b712cdec9e47aa4f8?branch=epel10

            Log:
            Fix build with CMake 4.0

OS less-than comparisons must be done carefully to avoid unintended
consequences.  Any version of Fedora also matches 0%{?rhel} < 8, but cmake
4.0 dropped the cmake3 name, so this no longer builds.  Since EPEL 7 is out
of support and RHEL 8 cmake is 3.x, simply dropping EPEL 7 compatibility is
the simplest solution.

---
diff --git a/hardinfo2.spec b/hardinfo2.spec
index a214eda..23a6bbe 100644
--- a/hardinfo2.spec
+++ b/hardinfo2.spec
@@ -1,6 +1,5 @@
-%if 0%{?rhel} <= 8
+%if 0%{?rhel} == 8
 %undefine __cmake_in_source_build
-%undefine __cmake3_in_source_build
 %endif
 
 Name:           hardinfo2
@@ -49,11 +48,7 @@ URL:            https://github.com/hardinfo2/hardinfo2
 Source0:        %{url}/archive/release-%{version}/hardinfo2-release-%{version}.tar.gz
 
 BuildRequires:  gcc-c++
-%if 0%{?rhel} < 8
-BuildRequires:  cmake3
-%else
 BuildRequires:  cmake
-%endif
 
 BuildRequires:  cmake(Qt5Core)
 BuildRequires:  cmake(Qt5Gui)
@@ -109,20 +104,11 @@ Features include:
 %autosetup -p1 -n hardinfo2-release-%{version}
 
 %build
-%if 0%{?rhel} < 8
-%cmake3 -DCMAKE_BUILD_TYPE=Release
-%cmake3_build
-%else
 %cmake -DCMAKE_BUILD_TYPE=Release
 %cmake_build
-%endif
 
 %install
-%if 0%{?rhel} < 8
-%cmake3_install
-%else
 %cmake_install
-%endif
 
 %find_lang %{name}
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-05 16:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-05 16:43 [rpms/hardinfo2] epel10: Fix build with CMake 4.0 Yaakov Selkowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox