pkgsrc-Changes archive

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

CVS commit: pkgsrc/sysutils/i3status



Module Name:    pkgsrc
Committed By:   nia
Date:           Tue Apr 12 14:43:01 UTC 2022

Modified Files:
        pkgsrc/sysutils/i3status: Makefile distinfo
        pkgsrc/sysutils/i3status/patches: patch-src_print__volume.c
Added Files:
        pkgsrc/sysutils/i3status/patches: patch-meson.build
            patch-src_print__disk__info.c
Removed Files:
        pkgsrc/sysutils/i3status/patches: patch-Makefile.in
            patch-src_print__wireless__info.c patch-src_pulse.c

Log Message:
i3status: update to 2.14

2021-11-09 i3status 2.14

 • switch to meson build system
 • battery: OpenBSD: If acpibat watts value is not available, try current
 • make pulseaudio an optional dependency
 • print_cpu_usage: use buffered file API
 • fix memory leak in slurp()
 • NetBSD: native audio support
 • wireless: Linux: update %signal and %quality based on station info
 • memory: introduce unit and decimals options
 • battery: introduce format_percentage option
 • memory: fix overflow on 32-bit systems
 • use format_placeholder
 • wireless: introduce format_bitrate, format_noise and format_signal
 • cpu: fix out of bounds read after invalid %cpu conversion
 • file system: use f_frsize for correct block size
 • wireless: FreeBSD: support connection bitrate
 • volume: fix memory leak
 • print_file_contents: resolve tilde
 • add build option to disable manual pages
 • pulseaudio: use port name instead of sink name
 • battery: add support for POWER_SUPPLY_TIME_TO_EMPTY (e.g. pinebook pro)
 • tztime: allow selective pango markup
 • wireless: fix memory corruption


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 pkgsrc/sysutils/i3status/Makefile
cvs rdiff -u -r1.7 -r1.8 pkgsrc/sysutils/i3status/distinfo
cvs rdiff -u -r1.1 -r0 pkgsrc/sysutils/i3status/patches/patch-Makefile.in \
    pkgsrc/sysutils/i3status/patches/patch-src_pulse.c
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/i3status/patches/patch-meson.build
cvs rdiff -u -r0 -r1.3 \
    pkgsrc/sysutils/i3status/patches/patch-src_print__disk__info.c
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/sysutils/i3status/patches/patch-src_print__volume.c
cvs rdiff -u -r1.3 -r0 \
    pkgsrc/sysutils/i3status/patches/patch-src_print__wireless__info.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/i3status/Makefile
diff -u pkgsrc/sysutils/i3status/Makefile:1.21 pkgsrc/sysutils/i3status/Makefile:1.22
--- pkgsrc/sysutils/i3status/Makefile:1.21      Mon Mar 28 10:59:28 2022
+++ pkgsrc/sysutils/i3status/Makefile   Tue Apr 12 14:43:01 2022
@@ -1,10 +1,9 @@
-# $NetBSD: Makefile,v 1.21 2022/03/28 10:59:28 tnn Exp $
+# $NetBSD: Makefile,v 1.22 2022/04/12 14:43:01 nia Exp $
 
-DISTNAME=      i3status-2.13
-PKGREVISION=   11
+DISTNAME=      i3status-2.14
 CATEGORIES=    sysutils
 MASTER_SITES=  https://i3wm.org/i3status/
-EXTRACT_SUFX=  .tar.bz2
+EXTRACT_SUFX=  .tar.xz
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      https://i3wm.org/i3status/
@@ -14,12 +13,12 @@ LICENSE=    modified-bsd
 TOOL_DEPENDS+= asciidoc-[0-9]*:../../textproc/asciidoc
 TOOL_DEPENDS+= xmlto-[0-9]*:../../textproc/xmlto
 
-GNU_CONFIGURE= yes
-USE_TOOLS+=    gmake pkg-config
+USE_TOOLS+=    pkg-config bash perl
 
 INSTALLATION_DIRS=     share/examples/${PKGBASE}
 
-CONF_FILES=    ${PREFIX}/share/examples/${PKGBASE}/i3status.conf ${PKG_SYSCONFDIR}/i3status.conf
+CONF_FILES=    ${PREFIX}/share/examples/${PKGBASE}/i3status.conf \
+               ${PKG_SYSCONFDIR}/i3status.conf
 
 BUILD_DEFS+=   VARBASE
 
@@ -29,14 +28,12 @@ SUBST_MESSAGE.fix-paths=    Fixing absolute
 SUBST_FILES.fix-paths=         man/i3status.*
 SUBST_SED.fix-paths+=          -e 's,/var,${VARBASE},g'
 
-post-install:
-       ${MV} ${DESTDIR}${PREFIX}/etc/i3status.conf ${DESTDIR}${PREFIX}/share/examples/${PKGBASE}
-
+.include "options.mk"
+.include "../../devel/meson/build.mk"
 .include "../../devel/confuse/buildlink3.mk"
 .include "../../devel/yajl/buildlink3.mk"
 .include "../../mk/bsd.prefs.mk"
 .if ${OPSYS} == "Linux"
 .  include "../../audio/alsa-lib/buildlink3.mk"
-.  include "../../audio/pulseaudio/buildlink3.mk"
 .endif
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/sysutils/i3status/distinfo
diff -u pkgsrc/sysutils/i3status/distinfo:1.7 pkgsrc/sysutils/i3status/distinfo:1.8
--- pkgsrc/sysutils/i3status/distinfo:1.7       Tue Oct 26 11:19:42 2021
+++ pkgsrc/sysutils/i3status/distinfo   Tue Apr 12 14:43:01 2022
@@ -1,9 +1,8 @@
-$NetBSD: distinfo,v 1.7 2021/10/26 11:19:42 nia Exp $
+$NetBSD: distinfo,v 1.8 2022/04/12 14:43:01 nia Exp $
 
-BLAKE2s (i3status-2.13.tar.bz2) = 75d0bb8994ee49219b2605e397b39f8a0433f1e97dd20e2f9f6d19d5fa17f882
-SHA512 (i3status-2.13.tar.bz2) = 6dadff19e53499d169ba4f491e1f821014b4f92fc3c93d7947c85cbbbdeaba538d02bd8ab98fe266a8f80756a287fd5803ec77a8cd874d50082b5cad309875c2
-Size (i3status-2.13.tar.bz2) = 201409 bytes
-SHA1 (patch-Makefile.in) = e50ed614d41a1bcef33feb6414322affa5e20a92
-SHA1 (patch-src_print__volume.c) = b855472d429f17491c7441924e0aca9ce4ee6190
-SHA1 (patch-src_print__wireless__info.c) = 7039b7fbd2f43b798763793cd4296035610eeee0
-SHA1 (patch-src_pulse.c) = bfc5265c5c11f3a56e9b88c936b9856245b998f4
+BLAKE2s (i3status-2.14.tar.xz) = 06556d5a7be94cc298368068a9657f0c18b1568a98565e8815231346e51c02c4
+SHA512 (i3status-2.14.tar.xz) = 10a1235cc314f5fc4dde4e1369a30f49118c95271f636c5803caa52d94d99ad8565b89fcd602d0c8aa7c830a79d3a3bb08e5ac8123cf07cfddc8ef0126b10f80
+Size (i3status-2.14.tar.xz) = 68900 bytes
+SHA1 (patch-meson.build) = 8c3a34e49bcedd1a381909afca4357d001b665ab
+SHA1 (patch-src_print__disk__info.c) = a9fbbcd4aab59cddf6163a9a31e35af78e4c5254
+SHA1 (patch-src_print__volume.c) = d57447621989f470d41463810a1f865bf2aed0da

Index: pkgsrc/sysutils/i3status/patches/patch-src_print__volume.c
diff -u pkgsrc/sysutils/i3status/patches/patch-src_print__volume.c:1.2 pkgsrc/sysutils/i3status/patches/patch-src_print__volume.c:1.3
--- pkgsrc/sysutils/i3status/patches/patch-src_print__volume.c:1.2      Wed Mar 11 23:28:21 2020
+++ pkgsrc/sysutils/i3status/patches/patch-src_print__volume.c  Tue Apr 12 14:43:01 2022
@@ -1,70 +1,45 @@
-$NetBSD: patch-src_print__volume.c,v 1.2 2020/03/11 23:28:21 nia Exp $
+$NetBSD: patch-src_print__volume.c,v 1.3 2022/04/12 14:43:01 nia Exp $
 
-Use sunaudio on NetBSD.
+Fix building on BSD. Upstream code was changed and the BSD paths
+were not tested.
 
-https://github.com/i3/i3status/pull/391
-
---- src/print_volume.c.orig    2019-01-23 08:03:56.000000000 +0000
+--- src/print_volume.c.orig    2021-11-09 07:27:11.977591500 +0000
 +++ src/print_volume.c
-@@ -21,7 +21,7 @@
- #include <sys/soundcard.h>
- #endif
+@@ -250,8 +250,8 @@ void print_volume(volume_ctx_t *ctx) {
+     const char *devicename = "UNSUPPORTED"; /* TODO: implement support for this */
+     pbval = 1;
+ 
+-    if (mixer_idx > 0)
+-        asprintf(&mixerpath, "/dev/mixer%d", mixer_idx);
++    if (ctx->mixer_idx > 0)
++        asprintf(&mixerpath, "/dev/mixer%d", ctx->mixer_idx);
+     else
+         mixerpath = defaultmixer;
  
--#ifdef __OpenBSD__
-+#if defined(__NetBSD__) || defined(__OpenBSD__)
- #include <fcntl.h>
- #include <unistd.h>
- #include <sys/audioio.h>
-@@ -86,7 +86,7 @@ void print_volume(yajl_gen json_gen, cha
-         free(instance);
+@@ -264,7 +264,7 @@ void print_volume(volume_ctx_t *ctx) {
+         goto out;
      }
  
--#if !defined(__DragonFly__) && !defined(__OpenBSD__)
-+#if defined(__linux__)
-     /* Try PulseAudio first */
- 
-     /* If the device name has the format "pulse[:N]" where N is the
-@@ -248,7 +248,7 @@ void print_volume(yajl_gen json_gen, cha
-     snd_mixer_selem_id_free(sid);
- 
- #endif
--#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
-+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
-     char *mixerpath;
-     char defaultmixer[] = "/dev/mixer";
-     int mixfd, vol, devmask = 0;
-@@ -272,7 +272,7 @@ void print_volume(yajl_gen json_gen, cha
-     if (mixer_idx > 0)
+-    if (mixer_idx > 0)
++    if (ctx->mixer_idx > 0)
          free(mixerpath);
  
--#if defined(__OpenBSD__)
-+#if defined(__NetBSD__) || defined(__OpenBSD__)
-     int oclass_idx = -1, master_idx = -1, master_mute_idx = -1;
-     int master_next = AUDIO_MIXER_LAST;
-     mixer_devinfo_t devinfo, devinfo2;
-@@ -327,15 +327,17 @@ void print_volume(yajl_gen json_gen, cha
-         vol = (int)vinfo.un.value.level[AUDIO_MIXER_LEVEL_MONO];
-     }
+ #if defined(__NetBSD__) || defined(__OpenBSD__)
+@@ -330,7 +330,7 @@ void print_volume(volume_ctx_t *ctx) {
  
--    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.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;
-+        if (vinfo.un.ord) {
-+            START_COLOR("color_degraded");
-+            fmt = fmt_muted;
-+            pbval = 0;
-+        }
+         if (vinfo.un.ord) {
+             START_COLOR("color_degraded");
+-            fmt = fmt_muted;
++            ctx->fmt = ctx->fmt_muted;
+             pbval = 0;
+         }
+     }
+@@ -351,7 +351,7 @@ void print_volume(volume_ctx_t *ctx) {
      }
  
- #else
+ #endif
+-    buffer = apply_volume_format(fmt, buffer, vol & 0x7f, devicename);
++    ctx->buf = apply_volume_format(ctx->fmt, vol & 0x7f, devicename);
+     close(mixfd);
+     goto out_with_format;
+ #endif

Added files:

Index: pkgsrc/sysutils/i3status/patches/patch-meson.build
diff -u /dev/null pkgsrc/sysutils/i3status/patches/patch-meson.build:1.1
--- /dev/null   Tue Apr 12 14:43:01 2022
+++ pkgsrc/sysutils/i3status/patches/patch-meson.build  Tue Apr 12 14:43:01 2022
@@ -0,0 +1,15 @@
+$NetBSD: patch-meson.build,v 1.1 2022/04/12 14:43:01 nia Exp $
+
+Install configuration to examples, per pkgsrc conventions.
+
+--- meson.build.orig   2021-11-09 07:27:11.974258400 +0000
++++ meson.build
+@@ -215,7 +215,7 @@ executable(
+ install_subdir(
+   'etc',
+   strip_directory: true,
+-  install_dir: get_option('sysconfdir'),
++  install_dir: 'share/examples/i3status'
+ )
+ 
+ # We cannot use configure_file for run-tests.pl.in

Index: pkgsrc/sysutils/i3status/patches/patch-src_print__disk__info.c
diff -u /dev/null pkgsrc/sysutils/i3status/patches/patch-src_print__disk__info.c:1.3
--- /dev/null   Tue Apr 12 14:43:01 2022
+++ pkgsrc/sysutils/i3status/patches/patch-src_print__disk__info.c      Tue Apr 12 14:43:01 2022
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_print__disk__info.c,v 1.3 2022/04/12 14:43:01 nia Exp $
+
+Fix building on BSD. Upstream code was changed and the BSD paths
+were not tested.
+
+--- src/print_disk_info.c.orig 2021-11-09 07:27:11.974258400 +0000
++++ src/print_disk_info.c
+@@ -127,14 +127,14 @@ void print_disk_info(disk_info_ctx_t *ct
+ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)
+     struct statfs buf;
+ 
+-    if (statfs(path, &buf) == -1)
++    if (statfs(ctx->path, &buf) == -1)
+         return;
+ 
+     mounted = true;
+ #elif defined(__NetBSD__)
+     struct statvfs buf;
+ 
+-    if (statvfs(path, &buf) == -1)
++    if (statvfs(ctx->path, &buf) == -1)
+         return;
+ 
+     mounted = true;



Home | Main Index | Thread Index | Old Index