devel/heaptrack: Port to Qt6/KF6

This commit is contained in:
Jason E. Hale
2025-03-13 21:24:17 -04:00
parent 092b9a2345
commit 25fe350e4e
3 changed files with 44 additions and 10 deletions
+15 -9
View File
@@ -1,9 +1,13 @@
PORTNAME= heaptrack
DISTVERSION= 1.5.0
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= devel kde
MASTER_SITES= KDE/stable/${PORTNAME}/
PATCH_SITES= https://invent.kde.org/sdk/heaptrack/-/commit/
PATCHFILES+= 2de688e02fbc5ff96fcf29ad3af962e8035824eb.patch:-p1 # Support KChart6
PATCHFILES+= 38fd1d7b0ff53a35ed7c4ef241c21c8c06e1efb2.patch:-p1 # Use QString for KConfigGroup names
MAINTAINER= kde@FreeBSD.org
COMMENT= Heap memory profiler
WWW= https://github.com/KDE/heaptrack
@@ -11,20 +15,22 @@ WWW= https://github.com/KDE/heaptrack
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/LICENSES/GPL-2.0-or-later.txt
LIB_DEPENDS= libboost_regex.so:devel/boost-libs \
LIB_DEPENDS= libKChart6.so:graphics/kdiagram-qt6 \
libboost_regex.so:devel/boost-libs \
libdw.so:devel/elfutils \
libunwind.so:devel/libunwind \
libKChart.so:graphics/kdiagram \
libzstd.so:archivers/zstd
USES= cmake compiler:c++11-lang desktop-file-utils kde:5 localbase \
qt:5 tar:xz xorg
USE_KDE= auth codecs completion config configwidgets coreaddons i18n \
USES= cmake compiler:c++17-lang desktop-file-utils gl gettext-tools \
kde:6 localbase qt:6 tar:xz xorg
USE_GL= gl opengl # GLX
USE_KDE= colorscheme completion config configwidgets coreaddons i18n \
iconthemes itemmodels jobwidgets kio service solid \
threadweaver widgetsaddons windowsystem \
threadweaver widgetsaddons \
ecm:build
USE_QT= concurrent core dbus gui network svg widgets xml \
buildtools:build qmake:build
USE_QT= base svg
USE_XORG= x11
CMAKE_ON= HEAPTRACK_USE_QT6
.include <bsd.port.mk>
+5 -1
View File
@@ -1,3 +1,7 @@
TIMESTAMP = 1696092144
TIMESTAMP = 1741909645
SHA256 (heaptrack-1.5.0.tar.xz) = a278d9d8f91e8bfb8a1c2f5b73eecab47fd45d0693f5dbea637536413cec2ea5
SIZE (heaptrack-1.5.0.tar.xz) = 5447668
SHA256 (2de688e02fbc5ff96fcf29ad3af962e8035824eb.patch) = e472792c6c4966debb0a50ddc1ae564c9dc52a71603cbe98fc5c40266e3b978a
SIZE (2de688e02fbc5ff96fcf29ad3af962e8035824eb.patch) = 2493
SHA256 (38fd1d7b0ff53a35ed7c4ef241c21c8c06e1efb2.patch) = 4108dce8193e031b8f90ab6f70e33d0fdc1b9ffd837ccf4871cd9a06392cbb1c
SIZE (38fd1d7b0ff53a35ed7c4ef241c21c8c06e1efb2.patch) = 2772
@@ -0,0 +1,24 @@
Fix build with Qt6/C++17. Follow KDE upstream trend and replace Q_DECL_UNUSED
with the C++17 [[maybe_unused]] attribute. Heaptrack still supports Qt5, so
keeping this local.
/usr/ports/devel/heaptrack/work/heaptrack-1.5.0/src/analyze/gui/gui.cpp:26:6:
error: 'maybe_unused' attribute cannot be applied to types
26 | void Q_DECL_UNUSED initRCCIconTheme()
| ^
/usr/local/include/qt6/QtCore/qcompilerdetection.h:978:27: note: expanded from macro 'Q_DECL_UNUSED'
978 | # define Q_DECL_UNUSED [[maybe_unused]]
| ^
1 error generated.
--- src/analyze/gui/gui.cpp.orig 2023-09-29 17:02:09 UTC
+++ src/analyze/gui/gui.cpp
@@ -23,7 +23,7 @@
#include <QResource>
// FIXME: patch KIconTheme so that this isn't needed here
-void Q_DECL_UNUSED initRCCIconTheme()
+[[maybe_unused]] void initRCCIconTheme()
{
const QString iconThemeRcc = qApp->applicationDirPath() + QStringLiteral("/../share/icons/breeze/breeze-icons.rcc");
if (!QFile::exists(iconThemeRcc)) {