Hi,

here's an update for i3status. Since there are a few users of it I'd like to
make sure this doesn't break anyone's setup. OKs welcome.

Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/i3status/Makefile,v
retrieving revision 1.37
diff -u -p -r1.37 Makefile
--- Makefile    11 Sep 2015 14:58:49 -0000      1.37
+++ Makefile    3 Jan 2016 12:00:17 -0000
@@ -4,8 +4,7 @@ ONLY_FOR_ARCHS=         ${APM_ARCHS}
 
 COMMENT=               generate a statusbar for use with i3/xmobar/dzen2
 
-DISTNAME=              i3status-2.9
-REVISION=              3
+DISTNAME=              i3status-2.10
 CATEGORIES=            x11 sysutils
 
 HOMEPAGE=              http://i3wm.org/i3status/
@@ -18,7 +17,7 @@ PERMIT_PACKAGE_CDROM= Yes
 MASTER_SITES=          ${HOMEPAGE}
 EXTRACT_SUFX=          .tar.bz2
 
-WANTLIB += c confuse yajl
+WANTLIB += c confuse m pthread yajl
 
 USE_GMAKE=             Yes
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/x11/i3status/distinfo,v
retrieving revision 1.8
diff -u -p -r1.8 distinfo
--- distinfo    2 Apr 2015 14:27:20 -0000       1.8
+++ distinfo    3 Jan 2016 12:00:17 -0000
@@ -1,2 +1,2 @@
-SHA256 (i3status-2.9.tar.bz2) = QusJUAxiX8rJpxJaKee/UyykuFQJQkGO4yU6oV5eneM=
-SIZE (i3status-2.9.tar.bz2) = 46615
+SHA256 (i3status-2.10.tar.bz2) = 2vXQdhGwVKQ9oaPSiFCwXi29vW0l/V4l7emLsbZuJ5E=
+SIZE (i3status-2.10.tar.bz2) = 53684
Index: patches/patch-Makefile
===================================================================
RCS file: patches/patch-Makefile
diff -N patches/patch-Makefile
--- patches/patch-Makefile      1 Sep 2015 11:09:37 -0000       1.7
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,20 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.7 2015/09/01 11:09:37 jasper Exp $
-
-From 15f2279592032af1507de09ef31eba81aee53191 Mon Sep 17 00:00:00 2001
-From: "Dmitrij D. Czarkoff" <czark...@gmail.com>
-Date: Fri, 31 Jul 2015 01:51:40 +0200
-Subject: [PATCH] Use SndIO for volume module on OpenBSD
-
---- Makefile.orig      Wed Jul 29 20:16:31 2015
-+++ Makefile   Wed Jul 29 20:16:38 2015
-@@ -39,10 +39,6 @@ CFLAGS+=-I/usr/local/include/
- LDFLAGS+=-L/usr/local/lib/
- endif
- 
--ifeq ($(OS),OpenBSD)
--LIBS+=-lossaudio
--endif
--
- ifeq ($(OS), NetBSD)
- LIBS+= -lprop
- endif
Index: patches/patch-src_print_cpu_usage_c
===================================================================
RCS file: patches/patch-src_print_cpu_usage_c
diff -N patches/patch-src_print_cpu_usage_c
--- patches/patch-src_print_cpu_usage_c 2 Apr 2015 18:33:35 -0000       1.7
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,18 +0,0 @@
-$OpenBSD: patch-src_print_cpu_usage_c,v 1.7 2015/04/02 18:33:35 jasper Exp $
-
-https://github.com/i3/i3status/pull/18
-
---- src/print_cpu_usage.c.orig Tue Sep 16 13:00:15 2014
-+++ src/print_cpu_usage.c      Tue Sep 16 13:01:43 2014
-@@ -10,7 +10,11 @@
- #include <sys/param.h>
- #include <sys/types.h>
- #include <sys/sysctl.h>
-+#if defined(__OpenBSD__)
-+#include <sys/sched.h>
-+#else
- #include <sys/dkstat.h>
-+#endif
- #endif
- 
- #if defined(__DragonFly__)
Index: patches/patch-src_print_disk_info_c
===================================================================
RCS file: patches/patch-src_print_disk_info_c
diff -N patches/patch-src_print_disk_info_c
--- patches/patch-src_print_disk_info_c 2 Apr 2015 20:16:02 -0000       1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-$OpenBSD: patch-src_print_disk_info_c,v 1.4 2015/04/02 20:16:02 jasper Exp $
-
-From ae50bbe2575e8e3234a70f89a7897b544cc4f3f0 Mon Sep 17 00:00:00 2001
-From: Jasper Lievisse Adriaanse <jas...@humppa.nl>
-Date: Thu, 2 Apr 2015 20:31:17 +0200
-Subject: [PATCH] sys/dkstat.h has been removed from OpenBSD and it's 
functionality actually lived/lives in sys/sched.h
-
---- src/print_disk_info.c.orig Mon Mar 23 11:07:26 2015
-+++ src/print_disk_info.c      Mon Mar 23 11:07:33 2015
-@@ -3,7 +3,6 @@
- #include <stdlib.h>
- #include <string.h>
- #include <ctype.h>
--#include <mntent.h>
- #include <stdint.h>
- #include <sys/stat.h>
- #include <sys/statvfs.h>
-@@ -11,6 +10,8 @@
- #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || (__OpenBSD__) || 
defined(__DragonFly__)
- #include <sys/param.h>
- #include <sys/mount.h>
-+#else
-+#include <mntent.h>
- #endif
- #include <yajl/yajl_gen.h>
- #include <yajl/yajl_version.h>
Index: patches/patch-src_print_volume_c
===================================================================
RCS file: patches/patch-src_print_volume_c
diff -N patches/patch-src_print_volume_c
--- patches/patch-src_print_volume_c    1 Sep 2015 11:09:37 -0000       1.7
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,98 +0,0 @@
-$OpenBSD: patch-src_print_volume_c,v 1.7 2015/09/01 11:09:37 jasper Exp $
-
-From 15f2279592032af1507de09ef31eba81aee53191 Mon Sep 17 00:00:00 2001
-From: "Dmitrij D. Czarkoff" <czark...@gmail.com>
-Date: Fri, 31 Jul 2015 01:51:40 +0200
-Subject: [PATCH] Use SndIO for volume module on OpenBSD
-
---- src/print_volume.c.orig    Wed Jul 29 15:31:44 2015
-+++ src/print_volume.c Wed Jul 29 15:31:47 2015
-@@ -20,7 +20,8 @@
- #ifdef __OpenBSD__
- #include <fcntl.h>
- #include <unistd.h>
--#include <soundcard.h>
-+#include <sys/audioio.h>
-+#include <sys/ioctl.h>
- #endif
- 
- #include "i3status.h"
-@@ -145,6 +146,70 @@ void print_volume(yajl_gen json_gen, char *buffer, con
-     if (mixer_idx > 0)
-         free(mixerpath);
- 
-+#if defined(__OpenBSD__)
-+    int oclass_idx = -1, master_idx = -1, master_mute_idx = -1;
-+    mixer_devinfo_t devinfo, devinfo2;
-+    mixer_ctrl_t vinfo;
-+
-+    devinfo.index = 0;
-+    while (ioctl(mixfd, AUDIO_MIXER_DEVINFO, &devinfo) >= 0) {
-+        if (devinfo.type != AUDIO_MIXER_CLASS) {
-+            devinfo.index++;
-+            continue;
-+        }
-+        if (strncmp(devinfo.label.name, AudioCoutputs, MAX_AUDIO_DEV_LEN) == 
0)
-+            oclass_idx = devinfo.index;
-+
-+        devinfo.index++;
-+    }
-+
-+    devinfo2.index = 0;
-+    while (ioctl(mixfd, AUDIO_MIXER_DEVINFO, &devinfo2) >= 0) {
-+        if ((devinfo2.type == AUDIO_MIXER_VALUE)
-+        &&  (devinfo2.mixer_class == oclass_idx)
-+        &&  (strncmp(devinfo2.label.name, AudioNmaster, MAX_AUDIO_DEV_LEN) == 
0))
-+            master_idx = devinfo2.index;
-+
-+        if ((devinfo2.type == AUDIO_MIXER_ENUM)
-+        &&  (devinfo2.mixer_class == oclass_idx)
-+        &&  (strncmp(devinfo2.label.name, AudioNmute, MAX_AUDIO_DEV_LEN) == 
0))
-+            master_mute_idx = devinfo2.index;
-+
-+        devinfo2.index++;
-+    }
-+
-+    if (master_idx == -1)
-+        goto out;
-+
-+    devinfo.index = master_idx;
-+    if (ioctl(mixfd, AUDIO_MIXER_DEVINFO, &devinfo) == -1)
-+        goto out;
-+
-+    vinfo.dev = master_idx;
-+    vinfo.type = AUDIO_MIXER_VALUE;
-+    if (ioctl(mixfd, AUDIO_MIXER_READ, &vinfo) == -1)
-+        goto out;
-+
-+    if (AUDIO_MAX_GAIN != 100) {
-+        float avgf = ((float)vinfo.un.value.level[AUDIO_MIXER_LEVEL_MONO] / 
AUDIO_MAX_GAIN) * 100;
-+        vol = (int)avgf;
-+        vol = (avgf - vol < 0.5 ? vol : (vol + 1));
-+    } else {
-+        vol = (int)vinfo.un.value.level[AUDIO_MIXER_LEVEL_MONO];
-+    }
-+
-+    vinfo.dev = master_mute_idx;
-+    vinfo.type = AUDIO_MIXER_ENUM;
-+    if (ioctl(mixfd, AUDIO_MIXER_READ, &vinfo) == -1)
-+        goto out;
-+
-+    if (master_mute_idx != -1 && vinfo.un.ord) {
-+        START_COLOR("color_degraded");
-+        fmt = fmt_muted;
-+        pbval = 0;
-+    }
-+
-+#else
-     if (ioctl(mixfd, SOUND_MIXER_READ_DEVMASK, &devmask) == -1)
-         return;
-     if (ioctl(mixfd, MIXER_READ(0), &vol) == -1)
-@@ -154,6 +219,7 @@ void print_volume(yajl_gen json_gen, char *buffer, con
-         START_COLOR("color_degraded");
-         pbval = 0;
-     }
-+#endif
- 
-     const char *walk = fmt;
-     for (; *walk != '\0'; walk++) {
Index: patches/patch-src_print_wireless_info_c
===================================================================
RCS file: /cvs/ports/x11/i3status/patches/patch-src_print_wireless_info_c,v
retrieving revision 1.8
diff -u -p -r1.8 patch-src_print_wireless_info_c
--- patches/patch-src_print_wireless_info_c     4 Apr 2015 16:07:16 -0000       
1.8
+++ patches/patch-src_print_wireless_info_c     3 Jan 2016 12:00:17 -0000
@@ -1,22 +1,11 @@
-$OpenBSD: patch-src_print_wireless_info_c,v 1.8 2015/04/04 16:07:16 jasper Exp 
$
-
-From e91891729e799e45561c707768269bb755ca34e9 Mon Sep 17 00:00:00 2001
-From: Jasper Lievisse Adriaanse <jas...@humppa.nl>
-Date: Sat, 4 Apr 2015 10:56:58 +0200
-Subject: [PATCH] Use the maximum rssi, not the scaled percentage for the 
signal level.
-
---- src/print_wireless_info.c.orig     Sat Apr  4 10:51:30 2015
-+++ src/print_wireless_info.c  Sat Apr  4 10:52:18 2015
-@@ -308,10 +308,9 @@ static int get_wireless_info(const char *interface, wi
-             strlcpy(nr.nr_ifname, interface, sizeof(nr.nr_ifname));
+$OpenBSD$
+--- src/print_wireless_info.c.orig     Sun Jan  3 12:55:52 2016
++++ src/print_wireless_info.c  Sun Jan  3 12:58:06 2016
+@@ -50,6 +50,7 @@
+ #include <netinet/if_ether.h>
+ #include <net80211/ieee80211.h>
+ #include <net80211/ieee80211_ioctl.h>
++#define IW_ESSID_MAX_SIZE IEEE80211_NWID_LEN
+ #endif
  
-             if (ioctl(s, SIOCG80211NODE, &nr) == 0 && nr.nr_rssi) {
-+                info->signal_level = nr.nr_rssi;
-                 if (nr.nr_max_rssi)
--                    info->signal_level_max = IEEE80211_NODEREQ_RSSI(&nr);
--                else
--                    info->signal_level = nr.nr_rssi;
-+                    info->signal_level_max = nr.nr_max_rssi;
- 
-                 info->flags |= WIRELESS_INFO_FLAG_HAS_SIGNAL;
-             }
+ #include "i3status.h"

-- 
jasper

Reply via email to