1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-20 04:02:27 +00:00

- update to 2.4 (mostly integrate the freebsd support)

This commit is contained in:
Baptiste Daroussin 2011-12-28 20:31:15 +00:00
parent bda525a840
commit 2254bd8140
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=288198
4 changed files with 3 additions and 57 deletions

View File

@ -6,8 +6,7 @@
#
PORTNAME= i3status
PORTVERSION= 2.3
PORTREVISION= 1
PORTVERSION= 2.4
CATEGORIES= x11
MASTER_SITES= http://i3wm.org/i3status/

View File

@ -1,2 +1,2 @@
SHA256 (i3status-2.3.tar.bz2) = 552dac4649f4e142c88ad3c42faace1fc372515c1b9dd979ebca58d36fa4bb1a
SIZE (i3status-2.3.tar.bz2) = 24814
SHA256 (i3status-2.4.tar.bz2) = 620f3768dc4e9ea391ca5b5e358d018ca5d2820da1fce71a71664ca554778abd
SIZE (i3status-2.4.tar.bz2) = 26020

View File

@ -1,12 +0,0 @@
--- ./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"

View File

@ -1,41 +0,0 @@
--- ./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")) {