summaryrefslogtreecommitdiff
path: root/sysutils/xfce4-diskperf-plugin
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2015-04-21 08:56:37 +0000
committerjperkin <jperkin@pkgsrc.org>2015-04-21 08:56:37 +0000
commit79d3242cef99cec8e8de668f9aa51fbb94bb4582 (patch)
treeae790a249f25dd74c81f5e89461d2643574091dc /sysutils/xfce4-diskperf-plugin
parent5a5be857f778521d8843411893666ab07567d5a4 (diff)
downloadpkgsrc-79d3242cef99cec8e8de668f9aa51fbb94bb4582.tar.gz
Update Xfce to 4.12.0.
This is a very large change, and incorporates the 4.8, 4.10, and 4.12 major Xfce releases since 4.6.2, our previous pkgsrc release. For more information about the thousands of changes in each major release since then, please see: Xfce 4.12 announcement: http://www.xfce.org/about/news Xfce 4.12 tour: http://www.xfce.org/about/tour Xfce 4.10 announcement: http://www.xfce.org/about/news/?post=1335571200 Xfce 4.10 tour: http://www.xfce.org/about/tour410 Xfce 4.8 announcement: http://www.xfce.org/about/news/?post=1295136000 Xfce 4.8 tour: http://www.xfce.org/about/tour48 The pkgsrc changes since then are: New packages: archivers/xfce4-thunar-archive graphics/elementary-xfce-icon-theme mail/xfce4-mailwatch-plugin misc/xfce4-time-out-plugin multimedia/xfce4-thunar-media-tags sysutils/xfce4-mount-plugin sysutils/xfce4-taskmanager sysutils/xfce4-thunar-vcs sysutils/xfce4-verve-plugin x11/xfce4-garcon x11/xfce4-notifyd x11/xfce4-tumbler x11/xfce4-whiskermenu-plugin Renamed packages: devel/xfconf to devel/xfce4-conf x11/libxfce4menu to x11/libxfce4ui x11/xfce4-screenshooter-plugin to x11/xfce4-screenshooter Updated packages: audio/xfce4-mixer audio/xfce4-xmms-plugin devel/xfce4-dev-tools editors/xfce4-mousepad graphics/ristretto meta-pkgs/xfce4-extras meta-pkgs/xfce4 misc/xfce4-weather-plugin multimedia/xfce4-mpc-plugin net/xfce4-wavelan-plugin sysutils/xfce4-appfinder sysutils/xfce4-battery-plugin sysutils/xfce4-cpugraph-plugin sysutils/xfce4-diskperf-plugin sysutils/xfce4-fsguard-plugin sysutils/xfce4-genmon-plugin sysutils/xfce4-netload-plugin sysutils/xfce4-quicklauncher-plugin sysutils/xfce4-systemload-plugin sysutils/xfce4-thunar sysutils/xfce4-xarchiver sysutils/xfce4-xkb-plugin textproc/xfce4-dict-plugin time/xfce4-datetime-plugin time/xfce4-orage time/xfce4-timer-plugin wm/xfce4-wm-themes wm/xfce4-wm x11/libxfce4gui x11/libxfce4util x11/xfce4-clipman-plugin x11/xfce4-desktop x11/xfce4-exo x11/xfce4-eyes-plugin x11/xfce4-gtk2-engine x11/xfce4-notes-plugin x11/xfce4-panel x11/xfce4-places-plugin x11/xfce4-session x11/xfce4-settings x11/xfce4-terminal Removed packages: sysutils/xfce4-volman x11/xfce4-utils This is based on a huge amount of work by the NetBSDfr team and Youri Mouton, who takes over as MAINTAINER, and has been tested by Youri on a large number of platforms prior to commit. A massive thanks to them. Any issues with the import are mine alone as the committer-by-proxy.
Diffstat (limited to 'sysutils/xfce4-diskperf-plugin')
-rw-r--r--sysutils/xfce4-diskperf-plugin/Makefile14
-rw-r--r--sysutils/xfce4-diskperf-plugin/PLIST37
-rw-r--r--sysutils/xfce4-diskperf-plugin/buildlink3.mk16
-rw-r--r--sysutils/xfce4-diskperf-plugin/distinfo10
-rw-r--r--sysutils/xfce4-diskperf-plugin/patches/patch-aa84
-rw-r--r--sysutils/xfce4-diskperf-plugin/patches/patch-panel-plugin_devperf.c179
6 files changed, 223 insertions, 117 deletions
diff --git a/sysutils/xfce4-diskperf-plugin/Makefile b/sysutils/xfce4-diskperf-plugin/Makefile
index 353f9d74a60..2c73473f469 100644
--- a/sysutils/xfce4-diskperf-plugin/Makefile
+++ b/sysutils/xfce4-diskperf-plugin/Makefile
@@ -1,17 +1,13 @@
-# $NetBSD: Makefile,v 1.38 2014/05/05 00:48:22 ryoon Exp $
+# $NetBSD: Makefile,v 1.39 2015/04/21 08:56:40 jperkin Exp $
.include "../../meta-pkgs/xfce4/Makefile.common"
-XFCE4_VERSION= 2.1.0
-
-DISTNAME= xfce4-diskperf-plugin-${XFCE4_VERSION}
-PKGREVISION= 21
+DISTNAME= xfce4-diskperf-plugin-2.5.4
CATEGORIES= sysutils
-MASTER_SITES= http://goodies.xfce.org/releases/xfce4-diskperf-plugin/
-COMMENT= Xfce disk performance plugin
+MASTER_SITES= http://archive.xfce.org/src/panel-plugins/xfce4-diskperf-plugin/2.5/
-ONLY_FOR_PLATFORM+= NetBSD-*-*
-ONLY_FOR_PLATFORM+= Linux-*-*
+HOMEPAGE= http://goodies.xfce.org/projects/panel-plugins/xfce4-diskperf-plugin
+COMMENT= Xfce disk performance plugin
.include "../../x11/xfce4-panel/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/xfce4-diskperf-plugin/PLIST b/sysutils/xfce4-diskperf-plugin/PLIST
index 961ec8334d8..d5b5d99d5fa 100644
--- a/sysutils/xfce4-diskperf-plugin/PLIST
+++ b/sysutils/xfce4-diskperf-plugin/PLIST
@@ -1,8 +1,39 @@
-@comment $NetBSD: PLIST,v 1.3 2007/04/12 09:55:13 martti Exp $
-libexec/xfce4/panel-plugins/xfce4-diskperf-plugin
+@comment $NetBSD: PLIST,v 1.4 2015/04/21 08:56:40 jperkin Exp $
+lib/xfce4/panel/plugins/libdiskperf.la
+share/locale/ar/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/ast/LC_MESSAGES/xfce4-diskperf-plugin.mo
share/locale/ca/LC_MESSAGES/xfce4-diskperf-plugin.mo
share/locale/cs/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/da/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/de/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/el/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/en_GB/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/es/LC_MESSAGES/xfce4-diskperf-plugin.mo
share/locale/eu/LC_MESSAGES/xfce4-diskperf-plugin.mo
share/locale/fr/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/gl/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/hu/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/id/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/it/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/ja/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/ko/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/lt/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/lv/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/nb/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/nl/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/pa/LC_MESSAGES/xfce4-diskperf-plugin.mo
share/locale/pl/LC_MESSAGES/xfce4-diskperf-plugin.mo
-share/xfce4/panel-plugins/diskperf.desktop
+share/locale/pt/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/pt_BR/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/ru/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/sk/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/sq/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/sv/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/tr/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/ug/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/uk/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/ur/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/ur_PK/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/zh_CN/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/locale/zh_TW/LC_MESSAGES/xfce4-diskperf-plugin.mo
+share/xfce4/panel/plugins/diskperf.desktop
diff --git a/sysutils/xfce4-diskperf-plugin/buildlink3.mk b/sysutils/xfce4-diskperf-plugin/buildlink3.mk
deleted file mode 100644
index 92d81441c3b..00000000000
--- a/sysutils/xfce4-diskperf-plugin/buildlink3.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-# $NetBSD: buildlink3.mk,v 1.38 2014/05/05 00:48:22 ryoon Exp $
-
-BUILDLINK_TREE+= xfce4-diskperf-plugin
-
-.if !defined(XFCE4_DISKPERF_PLUGIN_BUILDLINK3_MK)
-XFCE4_DISKPERF_PLUGIN_BUILDLINK3_MK:=
-
-BUILDLINK_API_DEPENDS.xfce4-diskperf-plugin+= xfce4-diskperf-plugin>=2.1.0
-BUILDLINK_ABI_DEPENDS.xfce4-diskperf-plugin+= xfce4-diskperf-plugin>=2.1.0nb21
-BUILDLINK_PKGSRCDIR.xfce4-diskperf-plugin?= ../../sysutils/xfce4-diskperf-plugin
-
-.include "../../x11/xfce4-panel/buildlink3.mk"
-.include "../../devel/glib2/buildlink3.mk"
-.endif # XFCE4_DISKPERF_PLUGIN_BUILDLINK3_MK
-
-BUILDLINK_TREE+= -xfce4-diskperf-plugin
diff --git a/sysutils/xfce4-diskperf-plugin/distinfo b/sysutils/xfce4-diskperf-plugin/distinfo
index 52329182cd2..5d3568975d0 100644
--- a/sysutils/xfce4-diskperf-plugin/distinfo
+++ b/sysutils/xfce4-diskperf-plugin/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.6 2007/04/12 09:55:13 martti Exp $
+$NetBSD: distinfo,v 1.7 2015/04/21 08:56:40 jperkin Exp $
-SHA1 (xfce4-diskperf-plugin-2.1.0.tar.bz2) = 66db93af32f4a3ca0ce931fed312b267a3a3dece
-RMD160 (xfce4-diskperf-plugin-2.1.0.tar.bz2) = 7e66634d48499dc9be777580ac48e66c9e51039b
-Size (xfce4-diskperf-plugin-2.1.0.tar.bz2) = 183492 bytes
-SHA1 (patch-aa) = 86a3cabe41c9470716f82000e41e6d9b64f6d372
+SHA1 (xfce4-diskperf-plugin-2.5.4.tar.bz2) = fc74484b986eac9d98b050c5a98130e8a9671048
+RMD160 (xfce4-diskperf-plugin-2.5.4.tar.bz2) = 18d7be932d15bbec28810b822386df6a00285ae5
+Size (xfce4-diskperf-plugin-2.5.4.tar.bz2) = 321974 bytes
+SHA1 (patch-panel-plugin_devperf.c) = 77c02a425cf525607bacb9b55d0238eb5b110067
diff --git a/sysutils/xfce4-diskperf-plugin/patches/patch-aa b/sysutils/xfce4-diskperf-plugin/patches/patch-aa
deleted file mode 100644
index 9052518ce94..00000000000
--- a/sysutils/xfce4-diskperf-plugin/patches/patch-aa
+++ /dev/null
@@ -1,84 +0,0 @@
-$NetBSD: patch-aa,v 1.4 2007/04/12 09:55:13 martti Exp $
-
---- panel-plugin/devperf.c.orig 2003-11-30 12:58:54.000000000 +0200
-+++ panel-plugin/devperf.c 2006-07-02 10:05:44.000000000 +0300
-@@ -264,21 +264,39 @@
- const char *device = (const char *) p_pvDevice;
- struct timeval tv;
- size_t size, i, ndrives;
-+#ifdef HW_DISKSTATS
- struct disk_sysctl *drives, drive;
-+#else
-+ struct io_sysctl *drives, drive;
-+#endif
- int mib[3];
-
- mib[0] = CTL_HW;
-+#ifdef HW_DISKSTATS
- mib[1] = HW_DISKSTATS;
- mib[2] = sizeof(struct disk_sysctl);
-+#else
-+ mib[1] = HW_IOSTATS;
-+ mib[2] = sizeof(struct io_sysctl);
-+#endif
-+
- if (sysctl(mib, 3, NULL, &size, NULL, 0) == -1)
- return(-1);
-+#ifdef HW_DISKSTATS
- ndrives = size / sizeof(struct disk_sysctl);
-+#else
-+ ndrives = size / sizeof(struct io_sysctl);
-+#endif
- drives = malloc(size);
- if (sysctl(mib, 3, drives, &size, NULL, 0) == -1)
- return(-1);
-
- for (i = 0; i < ndrives; i++) {
-+#ifdef HW_DISKSTATS
- if (strcmp(drives[i].dk_name, device) == 0) {
-+#else
-+ if (strcmp(drives[i].name, device) == 0) {
-+#endif
- drive = drives[i];
- break;
- }
-@@ -292,13 +310,18 @@
- gettimeofday (&tv, 0);
- perf->timestamp_ns = (uint64_t)1000ull * 1000ull * 1000ull *
- tv.tv_sec + 1000ull * tv.tv_usec;
--#if defined(__NetBSD_Version__) && (__NetBSD_Version__ < 106110000)
-+#ifdef HW_DISKSTATS
-+# if defined(__NetBSD_Version__) && (__NetBSD_Version__ < 106110000)
- /* NetBSD < 1.6K does not have separate read/write statistics. */
- perf->rbytes = drive.dk_bytes;
- perf->wbytes = drive.dk_bytes;
--#else
-+# else
- perf->rbytes = drive.dk_rbytes;
- perf->wbytes = drive.dk_wbytes;
-+# endif
-+#else
-+ perf->rbytes = drive.rbytes;
-+ perf->wbytes = drive.wbytes;
- #endif
-
- /*
-@@ -306,10 +329,18 @@
- * time separatly.
- * -- Benedikt
- */
-+#ifdef HW_DISKSTATS
- perf->qlen = drive.dk_xfer;
- perf->rbusy_ns = ((uint64_t)1000ull * 1000ull * 1000ull * drive.dk_time_sec
- + 1000ull * drive.dk_time_usec) / 2ull;
- perf->wbusy_ns = perf->rbusy_ns;
-+#else
-+ perf->qlen = drive.xfer;
-+ perf->rbusy_ns = ((uint64_t)1000ull * 1000ull * 1000ull * drive.time_sec
-+ + 1000ull * drive.time_usec) / 2ull;
-+ perf->wbusy_ns = perf->rbusy_ns;
-+
-+#endif
-
- return(0);
- }
diff --git a/sysutils/xfce4-diskperf-plugin/patches/patch-panel-plugin_devperf.c b/sysutils/xfce4-diskperf-plugin/patches/patch-panel-plugin_devperf.c
new file mode 100644
index 00000000000..420757ed6e8
--- /dev/null
+++ b/sysutils/xfce4-diskperf-plugin/patches/patch-panel-plugin_devperf.c
@@ -0,0 +1,179 @@
+$NetBSD: patch-panel-plugin_devperf.c,v 1.1 2015/04/21 08:56:40 jperkin Exp $
+
+Add FreeBSD support and fix NetBSD support.
+--- panel-plugin/devperf.c.orig 2015-02-09 23:25:33.000000000 +0000
++++ panel-plugin/devperf.c
+@@ -225,6 +225,93 @@ int main ()
+
+ /************************** Linux End ***************/
+
++#elif defined(__FreeBSD__)
++
++#include <sys/disk.h>
++#include <sys/param.h>
++#include <sys/sysctl.h>
++#include <sys/types.h>
++#include <sys/errno.h>
++#include <sys/resource.h>
++#include <sys/time.h>
++#include <devstat.h>
++#include <fcntl.h>
++#include <limits.h>
++#include <string.h>
++#include <syslog.h>
++#include <stdarg.h>
++
++#define MAXNAMELEN 256
++
++struct statinfo stats;
++struct devinfo dinfo;
++
++int DevPerfInit ()
++{
++ stats.dinfo = &dinfo;
++
++ return (0);
++}
++
++int DevCheckStatAvailability(char const **strptr)
++{
++ return (0);
++}
++
++int DevGetPerfData (const void *p_pvDevice, struct devperf_t *perf)
++{
++ struct timeval tv;
++ struct timespec ts;
++ struct devstat dev;
++ kvm_t *kd = NULL;
++ int i, found = 0;
++ char *check_dev = (char *) p_pvDevice;
++
++ if(devstat_getdevs(kd, &stats) == -1) {
++ syslog(0, "DISKPERF: getdevs fail");
++ }
++
++ for(found = 0, i = 0; i < (stats.dinfo)->numdevs; i++) {
++ char dev_name[MAXNAMELEN];
++ dev = (stats.dinfo)->devices[i];
++ snprintf(dev_name, MAXNAMELEN-1, "%s%d",
++ dev.device_name, dev.unit_number);
++ if ((check_dev != NULL) && (strcmp(check_dev, dev_name) != 0))
++ continue;
++ else {
++ found = 1;
++ break;
++ }
++
++ }
++
++ if(check_dev != NULL && found) {
++ perf->wbytes = dev.bytes[DEVSTAT_WRITE];
++ perf->rbytes = dev.bytes[DEVSTAT_READ];
++ gettimeofday (&tv, 0);
++ perf->timestamp_ns = (uint64_t)1000ull * 1000ull * 1000ull *
++ tv.tv_sec + 1000ull * tv.tv_usec;
++ perf->qlen = dev.start_count - dev.end_count;
++ // I'm not sure about rbusy and wbusy calculation
++ bintime2timespec(&dev.busy_time, &ts);
++ perf->rbusy_ns = (uint64_t) ts.tv_nsec;
++ perf->wbusy_ns = perf->rbusy_ns;
++ }
++
++ return (0);
++}
++
++#if 0 /* Standalone test purpose */
++int main ()
++{
++ struct devperf_t oPerf;
++ DevGetPerfData ((void*)"ada0", &oPerf);
++ printf ("%lu\t%lu\n", oPerf.rbytes, oPerf.wbytes);
++ return (0);
++}
++#endif
++
++
+
+ #elif defined(__NetBSD__)
+ /**************************************************************/
+@@ -251,21 +338,39 @@ int DevGetPerfData (const void *p_pvDevi
+ const char *device = (const char *) p_pvDevice;
+ struct timeval tv;
+ size_t size, i, ndrives;
++#ifdef HW_DISKSTATS
+ struct disk_sysctl *drives, drive;
++#else
++ struct io_sysctl *drives, drive;
++#endif
+ int mib[3];
+
+ mib[0] = CTL_HW;
++#ifdef HW_DISKSTATS
+ mib[1] = HW_DISKSTATS;
+ mib[2] = sizeof(struct disk_sysctl);
++#else
++ mib[1] = HW_IOSTATS;
++ mib[2] = sizeof(struct io_sysctl);
++#endif
++
+ if (sysctl(mib, 3, NULL, &size, NULL, 0) == -1)
+ return(-1);
++#ifdef HW_DISKSTATS
+ ndrives = size / sizeof(struct disk_sysctl);
++#else
++ ndrives = size / sizeof(struct io_sysctl);
++#endif
+ drives = malloc(size);
+ if (sysctl(mib, 3, drives, &size, NULL, 0) == -1)
+ return(-1);
+
+ for (i = 0; i < ndrives; i++) {
++#ifdef HW_DISKSTATS
+ if (strcmp(drives[i].dk_name, device) == 0) {
++#else
++ if (strcmp(drives[i].name, device) == 0) {
++#endif
+ drive = drives[i];
+ break;
+ }
+@@ -279,13 +384,18 @@ int DevGetPerfData (const void *p_pvDevi
+ gettimeofday (&tv, 0);
+ perf->timestamp_ns = (uint64_t)1000ull * 1000ull * 1000ull *
+ tv.tv_sec + 1000ull * tv.tv_usec;
+-#if defined(__NetBSD_Version__) && (__NetBSD_Version__ < 106110000)
++#ifdef HW_DISKSTATS
++# if defined(__NetBSD_Version__) && (__NetBSD_Version__ < 106110000)
+ /* NetBSD < 1.6K does not have separate read/write statistics. */
+ perf->rbytes = drive.dk_bytes;
+ perf->wbytes = drive.dk_bytes;
+-#else
++# else
+ perf->rbytes = drive.dk_rbytes;
+ perf->wbytes = drive.dk_wbytes;
++# endif
++#else
++ perf->rbytes = drive.rbytes;
++ perf->wbytes = drive.wbytes;
+ #endif
+
+ /*
+@@ -293,10 +403,18 @@ int DevGetPerfData (const void *p_pvDevi
+ * time separatly.
+ * -- Benedikt
+ */
++#ifdef HW_DISKSTATS
+ perf->qlen = drive.dk_xfer;
+ perf->rbusy_ns = ((uint64_t)1000ull * 1000ull * 1000ull * drive.dk_time_sec
+ + 1000ull * drive.dk_time_usec) / 2ull;
+ perf->wbusy_ns = perf->rbusy_ns;
++#else
++ perf->qlen = drive.xfer;
++ perf->rbusy_ns = ((uint64_t)1000ull * 1000ull * 1000ull * drive.time_sec
++ + 1000ull * drive.time_usec) / 2ull;
++ perf->wbusy_ns = perf->rbusy_ns;
++
++#endif
+
+ return(0);
+ }