pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/i3status Import i3status-2.10 as sysutils/i3s...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3676dd9f8117
branches:  trunk
changeset: 348460:3676dd9f8117
user:      kamil <kamil%pkgsrc.org@localhost>
date:      Tue Jun 14 06:39:37 2016 +0000

description:
Import i3status-2.10 as sysutils/i3status

i3status is a small program (about 3000 SLOC) for generating a status bar
for dzen2, xmobar or similar programs. It is designed to be very efficient
by issuing a very small number of system calls, as one generally wants
to update such a status line every second.
This ensures that even under high load, your status bar is updated correctly.
Also, it saves a bit of energy by not hogging your CPU as much as spawning
the corresponding amount of shell commands would.

Originally packaged in pkgsrc-wip by:
- Pierre Allegraud,
- Vitaly Shevtsov,
- Niclas Rosenvik,
- Mateusz Poszwa,
- myself,
with maintanance commits by:
- Aleksej Saushev.

diffstat:

 sysutils/i3status/DESCR                                     |   7 +
 sysutils/i3status/Makefile                                  |  25 ++++++
 sysutils/i3status/PLIST                                     |   5 +
 sysutils/i3status/distinfo                                  |   9 ++
 sysutils/i3status/patches/patch-Makefile                    |  36 ++++++++
 sysutils/i3status/patches/patch-src_print__disk__info.c     |  53 +++++++++++++
 sysutils/i3status/patches/patch-src_print__wireless__info.c |  19 ++++
 7 files changed, 154 insertions(+), 0 deletions(-)

diffs (182 lines):

diff -r 445c132b2bc3 -r 3676dd9f8117 sysutils/i3status/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/i3status/DESCR   Tue Jun 14 06:39:37 2016 +0000
@@ -0,0 +1,7 @@
+i3status is a small program (about 3000 SLOC) for generating a status bar
+for dzen2, xmobar or similar programs. It is designed to be very efficient
+by issuing a very small number of system calls, as one generally wants
+to update such a status line every second.
+This ensures that even under high load, your status bar is updated correctly.
+Also, it saves a bit of energy by not hogging your CPU as much as spawning
+the corresponding amount of shell commands would.
diff -r 445c132b2bc3 -r 3676dd9f8117 sysutils/i3status/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/i3status/Makefile        Tue Jun 14 06:39:37 2016 +0000
@@ -0,0 +1,25 @@
+# $NetBSD: Makefile,v 1.1 2016/06/14 06:39:37 kamil Exp $
+#
+
+DISTNAME=      i3status-2.10
+CATEGORIES=    sysutils
+MASTER_SITES=  http://i3wm.org/i3status/
+EXTRACT_SUFX=  .tar.bz2
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      http://i3wm.org/i3status/
+COMMENT=       Small program for generating a status bar
+LICENSE=       modified-bsd
+
+USE_TOOLS+=    gmake
+
+CONF_FILES=    ${PREFIX}/share/examples/${PKGBASE}/i3status.conf ${PKG_SYSCONFDIR}/i3status.conf
+
+MAKE_ENV+=     MANDIR=${PKGMANDIR}
+MAKE_ENV+=     SYSCONFDIR=${PKG_SYSCONFDIR}
+MAKE_ENV+=     DEBUG=0
+
+.include "../../devel/confuse/buildlink3.mk"
+.include "../../devel/yajl/buildlink3.mk"
+.include "../../audio/pulseaudio/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 445c132b2bc3 -r 3676dd9f8117 sysutils/i3status/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/i3status/PLIST   Tue Jun 14 06:39:37 2016 +0000
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.1 2016/06/14 06:39:37 kamil Exp $
+bin/i3status
+man/man1/i3status.1
+share/doc/i3status/LICENSE
+share/examples/i3status/i3status.conf
diff -r 445c132b2bc3 -r 3676dd9f8117 sysutils/i3status/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/i3status/distinfo        Tue Jun 14 06:39:37 2016 +0000
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1 2016/06/14 06:39:37 kamil Exp $
+
+SHA1 (i3status-2.10.tar.bz2) = b0bfcac24c9e57958eefd9c3b00aed4b73b2c708
+RMD160 (i3status-2.10.tar.bz2) = 78a2d26aea8d59e8b8e9f7a302e28688bd9ae516
+SHA512 (i3status-2.10.tar.bz2) = a514331d83458de15b548686d423b38a7a9198a7a31ca3001f3f136e4b873617c397a0073bb10b44fa8613bc12ed4fa4e384d099d31122a8afbd0df5de2e9c85
+Size (i3status-2.10.tar.bz2) = 53684 bytes
+SHA1 (patch-Makefile) = 2ca0cf79670e189a7e70e14247b1cd4aafb81ffd
+SHA1 (patch-src_print__disk__info.c) = e0662f65b21402e60a643374898707f5807077f2
+SHA1 (patch-src_print__wireless__info.c) = 4632c9eabd5b5d73bc67e541bf7dc93e883339d1
diff -r 445c132b2bc3 -r 3676dd9f8117 sysutils/i3status/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/i3status/patches/patch-Makefile  Tue Jun 14 06:39:37 2016 +0000
@@ -0,0 +1,36 @@
+$NetBSD: patch-Makefile,v 1.1 2016/06/14 06:39:37 kamil Exp $
+
+Adjust paths and install LICENSE.
+
+--- Makefile.orig      2016-01-01 18:51:19.000000000 +0000
++++ Makefile
+@@ -11,6 +11,9 @@ ifndef SYSCONFDIR
+     SYSCONFDIR=$(PREFIX)/etc
+   endif
+ endif
++ifndef MANDIR
++  MANDIR=$(MANDIR)
++endif
+ 
+ CFLAGS+=-Wall -Wshadow -Wpointer-arith -Wcast-qual -Wsign-compare
+ CFLAGS+=-g
+@@ -100,13 +103,15 @@ manpage:
+ 
+ install:
+       install -m 755 -d $(DESTDIR)$(PREFIX)/bin
+-      install -m 755 -d $(DESTDIR)$(SYSCONFDIR)
+-      install -m 755 -d $(DESTDIR)$(MANPREFIX)/share/man/man1
++      install -m 755 -d $(DESTDIR)$(PREFIX)/share/examples/i3status
++      install -m 755 -d $(DESTDIR)$(PREFIX)/share/doc/i3status
++      install -m 755 -d $(DESTDIR)$(MANPREFIX)/$(MANDIR)/man1
+       install -m 755 i3status $(DESTDIR)$(PREFIX)/bin/i3status
+       # Allow network configuration for getting the link speed
+       (which setcap && setcap cap_net_admin=ep $(DESTDIR)$(PREFIX)/bin/i3status) || true
+-      install -m 644 i3status.conf $(DESTDIR)$(SYSCONFDIR)/i3status.conf
+-      install -m 644 man/i3status.1 $(DESTDIR)$(MANPREFIX)/share/man/man1
++      install -m 644 i3status.conf $(DESTDIR)$(PREFIX)/share/examples/i3status/i3status.conf
++      install -m 644 LICENSE $(DESTDIR)$(PREFIX)/share/doc/i3status
++      install -m 644 man/i3status.1 $(DESTDIR)$(MANPREFIX)/$(MANDIR)/man1
+ 
+ release:
+       [ -f i3status-${VERSION} ] || rm -rf i3status-${VERSION}
diff -r 445c132b2bc3 -r 3676dd9f8117 sysutils/i3status/patches/patch-src_print__disk__info.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/i3status/patches/patch-src_print__disk__info.c   Tue Jun 14 06:39:37 2016 +0000
@@ -0,0 +1,53 @@
+$NetBSD: patch-src_print__disk__info.c,v 1.1 2016/06/14 06:39:37 kamil Exp $
+
+* mntent.h and setmntent stuff is linux only
+* NetBSD has statvfs structure, not statfs
+
+--- src/print_disk_info.c.orig 2016-01-01 18:51:19.000000000 +0000
++++ src/print_disk_info.c
+@@ -7,11 +7,11 @@
+ #include <sys/stat.h>
+ #include <sys/statvfs.h>
+ #include <sys/types.h>
+-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || (__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)
++#if defined(__linux__)
++#include <mntent.h>
++#else
+ #include <sys/param.h>
+ #include <sys/mount.h>
+-#else
+-#include <mntent.h>
+ #endif
+ #include <yajl/yajl_gen.h>
+ #include <yajl/yajl_version.h>
+@@ -116,12 +116,7 @@ void print_disk_info(yajl_gen json_gen, 
+ 
+     INSTANCE(path);
+ 
+-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)
+-    struct statfs buf;
+-
+-    if (statfs(path, &buf) == -1)
+-        return;
+-#else
++#if defined(__linux__)
+     struct statvfs buf;
+ 
+     if (statvfs(path, &buf) == -1) {
+@@ -145,6 +140,16 @@ void print_disk_info(yajl_gen json_gen, 
+             format = format_not_mounted;
+         }
+     }
++#elif defined(__NetBSD__)
++    struct statvfs buf;
++
++    if (statvfs(path, &buf) == -1)
++        format = format_not_mounted;
++#else
++    struct statfs buf;
++
++    if (statfs(path, &buf) == -1)
++        return;
+ #endif
+ 
+     if (low_threshold > 0 && below_threshold(buf, prefix_type, threshold_type, low_threshold)) {
diff -r 445c132b2bc3 -r 3676dd9f8117 sysutils/i3status/patches/patch-src_print__wireless__info.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/i3status/patches/patch-src_print__wireless__info.c       Tue Jun 14 06:39:37 2016 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_print__wireless__info.c,v 1.1 2016/06/14 06:39:37 kamil Exp $
+
+Add support for NetBSD.
+
+--- src/print_wireless_info.c.orig     2016-01-01 18:51:19.000000000 +0000
++++ src/print_wireless_info.c
+@@ -52,6 +52,12 @@
+ #include <net80211/ieee80211_ioctl.h>
+ #endif
+ 
++#ifdef __NetBSD__
++#include <unistd.h>
++#include <net80211/ieee80211.h>
++#define IW_ESSID_MAX_SIZE IEEE80211_NWID_LEN
++#endif
++
+ #include "i3status.h"
+ 
+ #define WIRELESS_INFO_FLAG_HAS_ESSID (1 << 0)



Home | Main Index | Thread Index | Old Index