git: c769e65b01c6 - main - KDiskMark is an HDD/SSD benchmark tool on top of Flexible I/O Tester.
Alexey Dokuchaev
danfe at FreeBSD.org
Mon May 17 14:39:14 UTC 2021
The branch main has been updated by danfe:
URL: https://cgit.FreeBSD.org/ports/commit/?id=c769e65b01c65830ca6e98a3ff0a6ef02c2f9438
commit c769e65b01c65830ca6e98a3ff0a6ef02c2f9438
Author: Alexey Dokuchaev <danfe at FreeBSD.org>
AuthorDate: 2021-05-17 14:36:24 +0000
Commit: Alexey Dokuchaev <danfe at FreeBSD.org>
CommitDate: 2021-05-17 14:36:49 +0000
KDiskMark is an HDD/SSD benchmark tool on top of Flexible I/O Tester.
WWW: https://github.com/JonMagon/KDiskMark
---
sysutils/Makefile | 1 +
sysutils/kdiskmark/Makefile | 30 ++++++++++++++++
sysutils/kdiskmark/distinfo | 3 ++
.../kdiskmark/files/patch-src_diskdriveinfo.cpp | 40 ++++++++++++++++++++++
sysutils/kdiskmark/pkg-descr | 7 ++++
sysutils/kdiskmark/pkg-plist | 25 ++++++++++++++
6 files changed, 106 insertions(+)
diff --git a/sysutils/Makefile b/sysutils/Makefile
index c1a3b351d023..f1e9a99cbf9a 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -567,6 +567,7 @@
SUBDIR += kdebugsettings
SUBDIR += kdf
SUBDIR += kdialog
+ SUBDIR += kdiskmark
SUBDIR += keyboard-daemon
SUBDIR += kf5-baloo
SUBDIR += kf5-kwallet
diff --git a/sysutils/kdiskmark/Makefile b/sysutils/kdiskmark/Makefile
new file mode 100644
index 000000000000..4f5cdc7a9e26
--- /dev/null
+++ b/sysutils/kdiskmark/Makefile
@@ -0,0 +1,30 @@
+# Created by: Alexey Dokuchaev <danfe at FreeBSD.org>
+
+PORTNAME= kdiskmark
+PORTVERSION= 2.2.0
+CATEGORIES= sysutils
+
+MAINTAINER= danfe at FreeBSD.org
+COMMENT= Graphical HDD/SSD benchmarking tool
+
+LICENSE= GPLv3
+
+RUN_DEPENDS= fio:benchmarks/fio
+
+USE_GITHUB= yes
+GH_ACCOUNT= JonMagon
+GH_PROJECT= KDiskMark
+
+USES= cmake kde:5 qt:5
+USE_QT= buildtools_build linguisttools_build qmake_build \
+ core gui widgets
+USE_KDE= auth coreaddons
+
+post-patch:
+ @${REINPLACE_CMD} -e '/--ioengine=/s,libaio,posixaio,' \
+ ${WRKSRC}/src/benchmark.cpp
+# XXX: disable pagecache flushing by default to avoid "kf.auth: Tried
+# to start an invalid action: org.jonmagon.kdiskmark.dropcache" error.
+ @${REINPLACE_CMD} -e '908s,true,false,' ${WRKSRC}/src/mainwindow.ui
+
+.include <bsd.port.mk>
diff --git a/sysutils/kdiskmark/distinfo b/sysutils/kdiskmark/distinfo
new file mode 100644
index 000000000000..7908ba9b2ee4
--- /dev/null
+++ b/sysutils/kdiskmark/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1613729258
+SHA256 (JonMagon-KDiskMark-2.2.0_GH0.tar.gz) = f778dd8422ebbeff07d335284a0fd658fc581a87d4a8e07a1c3c7e17dfbe6d3c
+SIZE (JonMagon-KDiskMark-2.2.0_GH0.tar.gz) = 232843
diff --git a/sysutils/kdiskmark/files/patch-src_diskdriveinfo.cpp b/sysutils/kdiskmark/files/patch-src_diskdriveinfo.cpp
new file mode 100644
index 000000000000..a08da7de24a4
--- /dev/null
+++ b/sysutils/kdiskmark/files/patch-src_diskdriveinfo.cpp
@@ -0,0 +1,40 @@
+--- src/diskdriveinfo.cpp.orig 2021-02-19 10:07:38 UTC
++++ src/diskdriveinfo.cpp
+@@ -3,6 +3,10 @@
+ #include <QString>
+ #include <QFile>
+ #include <QFileInfo>
++#ifdef __FreeBSD__
++#include <sys/disk.h>
++#include <sys/fcntl.h>
++#endif
+
+ QString DiskDriveInfo::getDeviceByVolume(const QString &volume)
+ {
+@@ -12,6 +16,7 @@ QString DiskDriveInfo::getDeviceByVolume(const QString
+
+ QString DiskDriveInfo::getModelName(const QString &volume)
+ {
++#if defined(__linux__)
+ QFileInfo sysClass(QFileInfo(QString("/sys/class/block/%1/..")
+ .arg(getDeviceByVolume(volume)))
+ .canonicalFilePath());
+@@ -24,7 +29,18 @@ QString DiskDriveInfo::getModelName(const QString &vol
+ QString model = sysBlock.readAll().simplified();
+
+ sysBlock.close();
++#elif defined(__FreeBSD__)
++ struct diocgattr_arg arg;
+
++ strlcpy(arg.name, "GEOM::descr", sizeof(arg.name));
++ arg.len = sizeof(arg.value.str);
++
++ int fd = open(volume.toStdString().c_str(), O_RDONLY);
++ if (fd == -1 || ioctl(fd, DIOCGATTR, &arg) == -1)
++ return QString();
++
++ QString model(arg.value.str);
++#endif
+ return model;
+ }
+
diff --git a/sysutils/kdiskmark/pkg-descr b/sysutils/kdiskmark/pkg-descr
new file mode 100644
index 000000000000..e48aa2fa53b3
--- /dev/null
+++ b/sysutils/kdiskmark/pkg-descr
@@ -0,0 +1,7 @@
+KDiskMark is an HDD and SSD benchmark tool with a very friendly graphical
+user interface. KDiskMark with its presets and powerful GUI calls Flexible
+I/O Tester and handles the output to provide an easy to view and interpret
+comprehensive benchmark result. The application is written in C++ with Qt
+and has minimal KDE dependencies.
+
+WWW: https://github.com/JonMagon/KDiskMark
diff --git a/sysutils/kdiskmark/pkg-plist b/sysutils/kdiskmark/pkg-plist
new file mode 100644
index 000000000000..c5c68876bc5c
--- /dev/null
+++ b/sysutils/kdiskmark/pkg-plist
@@ -0,0 +1,25 @@
+bin/kdiskmark
+lib/libexec/kauth/kdiskmark_helper
+share/applications/kdiskmark.desktop
+share/dbus-1/system-services/org.jonmagon.kdiskmark.service
+share/dbus-1/system.d/org.jonmagon.kdiskmark.conf
+share/icons/hicolor/128x128/apps/kdiskmark.png
+share/icons/hicolor/16x16/apps/kdiskmark.png
+share/icons/hicolor/24x24/apps/kdiskmark.png
+share/icons/hicolor/256x256/apps/kdiskmark.png
+share/icons/hicolor/32x32/apps/kdiskmark.png
+share/icons/hicolor/48x48/apps/kdiskmark.png
+share/icons/hicolor/512x512/apps/kdiskmark.png
+share/icons/hicolor/64x64/apps/kdiskmark.png
+%%DATADIR%%/translations/kdiskmark_cs_CZ.qm
+%%DATADIR%%/translations/kdiskmark_de_DE.qm
+%%DATADIR%%/translations/kdiskmark_es_MX.qm
+%%DATADIR%%/translations/kdiskmark_fr_FR.qm
+%%DATADIR%%/translations/kdiskmark_it_IT.qm
+%%DATADIR%%/translations/kdiskmark_pl_PL.qm
+%%DATADIR%%/translations/kdiskmark_pt_BR.qm
+%%DATADIR%%/translations/kdiskmark_ru_RU.qm
+%%DATADIR%%/translations/kdiskmark_sk_SK.qm
+%%DATADIR%%/translations/kdiskmark_uk_UA.qm
+%%DATADIR%%/translations/kdiskmark_zh_CN.qm
+share/polkit-1/actions/org.jonmagon.kdiskmark.policy
More information about the dev-commits-ports-all
mailing list