aboutsummaryrefslogtreecommitdiff
path: root/x11/i3status
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2011-12-08 14:56:43 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2011-12-08 14:56:43 +0000
commit264b0f22e928ce30db158fe6531a1d4d62f67b02 (patch)
tree41c581a6b64e325b0d29e1833c838ecf59f0222c /x11/i3status
parent7d27a0d4b9a7c6762ff27ae1bb4eddbeee586a2e (diff)
downloadports-264b0f22e928ce30db158fe6531a1d4d62f67b02.tar.gz
ports-264b0f22e928ce30db158fe6531a1d4d62f67b02.zip
- Fix disk usage
- Use coretemp to get cpu temperature Feature safe: yes
Notes
Notes: svn path=/head/; revision=287070
Diffstat (limited to 'x11/i3status')
-rw-r--r--x11/i3status/Makefile1
-rw-r--r--x11/i3status/files/patch-include__i3status.h12
-rw-r--r--x11/i3status/files/patch-src__print_disk_info.c41
3 files changed, 54 insertions, 0 deletions
diff --git a/x11/i3status/Makefile b/x11/i3status/Makefile
index 72c9df636f11..842b69a0e3a3 100644
--- a/x11/i3status/Makefile
+++ b/x11/i3status/Makefile
@@ -7,6 +7,7 @@
PORTNAME= i3status
PORTVERSION= 2.3
+PORTREVISION= 1
CATEGORIES= x11
MASTER_SITES= http://i3wm.org/i3status/
diff --git a/x11/i3status/files/patch-include__i3status.h b/x11/i3status/files/patch-include__i3status.h
new file mode 100644
index 000000000000..b9d0cc947b8b
--- /dev/null
+++ b/x11/i3status/files/patch-include__i3status.h
@@ -0,0 +1,12 @@
+--- ./include/i3status.h.orig 2011-07-21 23:11:48.000000000 +0200
++++ ./include/i3status.h 2011-12-08 14:48:47.000000000 +0100
+@@ -16,7 +16,8 @@
+
+ #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+
+-#define THERMAL_ZONE "hw.acpi.thermal.tz%d.temperature"
++/* this needs the coretemp module to be loaded */
++#define THERMAL_ZONE "dev.cpu.%d.temperature"
+ #define BATT_LIFE "hw.acpi.battery.life"
+ #define BATT_TIME "hw.acpi.battery.time"
+ #define BATT_STATE "hw.acpi.battery.state"
diff --git a/x11/i3status/files/patch-src__print_disk_info.c b/x11/i3status/files/patch-src__print_disk_info.c
new file mode 100644
index 000000000000..7f8a04eb9390
--- /dev/null
+++ b/x11/i3status/files/patch-src__print_disk_info.c
@@ -0,0 +1,41 @@
+--- ./src/print_disk_info.c.orig 2011-07-21 23:11:48.000000000 +0200
++++ ./src/print_disk_info.c 2011-12-08 15:47:21.000000000 +0100
+@@ -6,6 +6,11 @@
+ #include <stdint.h>
+ #include <sys/statvfs.h>
+ #include <sys/types.h>
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++#include <sys/param.h>
++#include <sys/mount.h>
++#endif
++
+
+ #include "i3status.h"
+
+@@ -39,10 +44,18 @@
+ */
+ void print_disk_info(const char *path, const char *format) {
+ const char *walk;
++
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++ struct statfs buf;
++
++ if (statfs(path, &buf) == -1)
++ return;
++#else
+ struct statvfs buf;
+
+ if (statvfs(path, &buf) == -1)
+ return;
++#endif
+
+ for (walk = format; *walk != '\0'; walk++) {
+ if (*walk != '%') {
+@@ -63,6 +76,7 @@
+ if (BEGINS_WITH(walk+1, "total")) {
+ print_bytes_human((uint64_t)buf.f_bsize * (uint64_t)buf.f_blocks);
+ walk += strlen("total");
++
+ }
+
+ if (BEGINS_WITH(walk+1, "avail")) {