Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

View File

@@ -0,0 +1 @@
Disk performance plugin for Xfce.

View File

@@ -0,0 +1,17 @@
# $NetBSD: Makefile,v 1.35 2013/06/06 12:54:00 wiz Exp $
.include "../../meta-pkgs/xfce4/Makefile.common"
XFCE4_VERSION= 2.1.0
DISTNAME= xfce4-diskperf-plugin-${XFCE4_VERSION}
PKGREVISION= 18
CATEGORIES= sysutils
MASTER_SITES= http://goodies.xfce.org/releases/xfce4-diskperf-plugin/
COMMENT= Xfce disk performance plugin
ONLY_FOR_PLATFORM+= NetBSD-*-*
ONLY_FOR_PLATFORM+= Linux-*-*
.include "../../x11/xfce4-panel/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View File

@@ -0,0 +1,8 @@
@comment $NetBSD: PLIST,v 1.3 2007/04/12 09:55:13 martti Exp $
libexec/xfce4/panel-plugins/xfce4-diskperf-plugin
share/locale/ca/LC_MESSAGES/xfce4-diskperf-plugin.mo
share/locale/cs/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/pl/LC_MESSAGES/xfce4-diskperf-plugin.mo
share/xfce4/panel-plugins/diskperf.desktop

View File

@@ -0,0 +1,16 @@
# $NetBSD: buildlink3.mk,v 1.35 2013/06/06 12:54:00 wiz 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.0nb18
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

View File

@@ -0,0 +1,6 @@
$NetBSD: distinfo,v 1.6 2007/04/12 09:55:13 martti 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

View File

@@ -0,0 +1,84 @@
$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);
}