# RHEL does not provide kdiagram(-devel) %if 0%{?rhel} %bcond_with gui %else %bcond_without gui %if 0%{?fedora} >= 40 %global qtver 6 %else %global qtver 5 %endif %endif Name: heaptrack Version: 1.5.0 Release: 7%{?dist}.1sunshine Summary: GUI for heaptrack, a heap memory profiler for Linux License: Apache-2.0 AND BSD-3-Clause AND BSL-1.0 AND GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND MIT URL: https://apps.kde.org/heaptrack/ Source0: https://download.kde.org/stable/heaptrack/%{version}/%{name}-%{version}.tar.xz Patch0: Support-KChart6-for-KF6.patch Patch1: Use-QString-for-KConfigGroup-names.patch # Upstream Patch: https://invent.kde.org/sdk/heaptrack/-/commit/c6c45f3455a652c38aefa402aece5dafa492e8ab # Will prolly be unneeded next release. Patch2: fix-gcc14-cmake-compat.patch BuildRequires: desktop-file-utils %if 0%{?fedora} >= 30 BuildRequires: cmake >= 3.16.0 %else %if %{with gui} BuildRequires: (cmake >= 2.8.12 with cmake < 3) %else BuildRequires: (cmake >= 2.8.9 with cmake < 3) %endif %endif %if %{with gui} BuildRequires: extra-cmake-modules BuildRequires: kf%{qtver}-kcoreaddons-devel BuildRequires: kf%{qtver}-ki18n-devel BuildRequires: kf%{qtver}-kitemmodels-devel BuildRequires: kf%{qtver}-threadweaver-devel BuildRequires: kf%{qtver}-kconfigwidgets-devel BuildRequires: kf%{qtver}-kio-devel BuildRequires: kf%{qtver}-kiconthemes-devel BuildRequires: kdiagram-devel >= 2.6.0 # some distributions probably don't have qt6 yet %if %{qtver} < 6 BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtsvg-devel >= 5.10.0 %else BuildRequires: qt6-qtbase-devel >= 6.5.0 BuildRequires: qt6-qtsvg-devel >= 6.5.0 %endif %endif BuildRequires: boost-devel >= 1.60.0 BuildRequires: libunwind-devel BuildRequires: libdwarf-devel BuildRequires: elfutils-devel BuildRequires: libzstd-devel BuildRequires: sparsehash-devel BuildRequires: zlib-devel %if 0%{!?rhel:1} Recommends: %{name}-base %endif # no libunwind on s390(x) ExcludeArch: s390 s390x %description This is the GUI for inspecting heaptrack traces. %package base Summary: A heap memory profiler for Linux %description base Heaptrack traces all memory allocations and annotates these events with stack traces. Dedicated analysis tools then allow you to interpret the heap memory profile to: - find hotspots that need to be optimized to reduce the memory footprint of your application - find memory leaks, i.e. locations that allocate memory which is never deallocated - find allocation hotspots, i.e. code locations that trigger a lot of memory allocation calls - find temporary allocations, which are allocations that are directly followed by their deallocation %prep %autosetup -n %{name}-%{version} -p1 %build %if %{with gui} %if %{qtver} < 6 %cmake_kf5 \ %else %cmake_kf6 \ %endif %else %{cmake} -DHEAPTRACK_BUILD_GUI=OFF \ %endif %if %{qtver} == 6 -DHEAPTRACK_USE_QT6=1 \ %endif %if "%{?_lib}" == "lib64" %{?_cmake_lib_suffix64} %endif %cmake_build %install %cmake_install %if %{with gui} %find_lang heaptrack --with-qt --all-name %endif %if %{with gui} %check desktop-file-validate %{buildroot}%{_datadir}/applications/org.kde.heaptrack.desktop %endif %files base %license LICENSES/GPL-2.0-or-later.txt %doc README.md screenshots %{_bindir}/heaptrack %{_bindir}/heaptrack_print %{_includedir}/heaptrack_api.h %dir %{_libdir}/heaptrack/ %{_libdir}/heaptrack/libheaptrack_inject.so %{_libdir}/heaptrack/libheaptrack_preload.so %{_libdir}/heaptrack/libexec/heaptrack_interpret %{_libdir}/heaptrack/libexec/heaptrack_env %if %{with gui} %files -f heaptrack.lang %{_bindir}/heaptrack_gui %{_datadir}/applications/org.kde.heaptrack.desktop %{_datadir}/metainfo/org.kde.heaptrack.appdata.xml %{_datadir}/icons/hicolor/*/apps/heaptrack* %endif %changelog * Wed Oct 30 2024 Moritz Barsnick 1.5.0-7.1sunshine - use proper URL - make some BRs versioned - package documentation - allow building without GUI - move CLI tools and library to base package - force build without GUI on EPEL/RHEL, as kdiagram(-devel) is not provided there - explicitly BR cmake (EPEL/RHEL doesn't seem to have it automatically), and version it properly for GUI vs. no GUI build * Thu Jul 18 2024 Fedora Release Engineering - 1.5.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Wed Jan 24 2024 Fedora Release Engineering - 1.5.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sat Jan 20 2024 Fedora Release Engineering - 1.5.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Thu Jan 18 2024 Steve Cossette - 1.5.0-4 - Fix for building on GCC 14 * Wed Jan 17 2024 Jonathan Wakely - 1.5.0-3 - Rebuilt for Boost 1.83 * Tue Jan 16 2024 Alessandro Astone - 1.5.0-2 - Backport Qt6 fixes * Wed Dec 27 2023 Marie Loise Nolden - 1.5.0-1 - Update to 1.5.0 using Qt6 * Fri Dec 15 2023 Florian Weimer - 1.4.0-3 - Fix C compatibility issues in CMake probes * Thu Jul 20 2023 Fedora Release Engineering - 1.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Thu Mar 30 2023 Jan Grulich - 1.4.0-1 - 1.4.0 * Mon Mar 06 2023 Jan Grulich - 1.2.0-13 - Fix build failure against GCC13 * Mon Feb 20 2023 Jonathan Wakely - 1.2.0-12 - Rebuilt for Boost 1.81 * Thu Jan 19 2023 Fedora Release Engineering - 1.2.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Thu Jul 21 2022 Fedora Release Engineering - 1.2.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue May 31 2022 Jan Grulich - 1.2.0-9 - Add missing BR: elfutils-devel * Wed May 04 2022 Thomas Rodgers - 1.2.0-8 - Rebuilt for Boost 1.78 * Thu Jan 20 2022 Fedora Release Engineering - 1.2.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Aug 06 2021 Jonathan Wakely - 1.2.0-6 - Rebuilt for Boost 1.76 * Thu Jul 22 2021 Fedora Release Engineering - 1.2.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Tue Mar 30 2021 Jonathan Wakely - 1.2.0-4 - Rebuilt for removed libstdc++ symbol (#1937698) * Tue Jan 26 2021 Fedora Release Engineering - 1.2.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Fri Jan 22 2021 Jonathan Wakely - 1.2.0-2 - Rebuilt for Boost 1.75 * Tue Sep 01 2020 Jan Grulich - 1.2.0-1 - 1.2.0 * Tue Sep 01 2020 Rex Dieter - 1.1.0-10 - adapt to new cmake macros * Sat Aug 01 2020 Fedora Release Engineering - 1.1.0-9 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue Jul 28 2020 Fedora Release Engineering - 1.1.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Thu May 28 2020 Jonathan Wakely - 1.1.0-7 - Rebuilt for Boost 1.73 * Thu Feb 27 2020 Jan Grulich - 1.1.0-6 - BR: libzstd-devel * Wed Jan 29 2020 Fedora Release Engineering - 1.1.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Jul 25 2019 Fedora Release Engineering - 1.1.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Fri Feb 01 2019 Fedora Release Engineering - 1.1.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Tue Jan 29 2019 Jonathan Wakely - 1.1.0-2 - Rebuilt for Boost 1.69 * Wed Jan 02 2019 Jan Grulich - 1.1.0-1 - 1.1.0 * Fri Jul 13 2018 Fedora Release Engineering - 1.0.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Wed Feb 07 2018 Fedora Release Engineering - 1.0.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Sep 07 2017 Daniel Vrátil - 1.0.0-8 - Fix build against glibc >= 2.26 (rawhide/f27) * Wed Aug 02 2017 Fedora Release Engineering - 1.0.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Wed Jul 26 2017 Fedora Release Engineering - 1.0.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Mon Jul 24 2017 Björn Esser - 1.0.0-5 - Rebuilt for Boost 1.64 * Mon May 15 2017 Fedora Release Engineering - 1.0.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild * Thu Mar 23 2017 Jan Grulich - 1.0.0-3 - Add BR: qt5-qtsvg-devel * Sat Mar 11 2017 Dan Horák - 1.0.0-2 - exclude s390(x), because libunwind is not there * Fri Mar 10 2017 Jan Grulich - 1.0.0-1 - Initial version