pkgsrc-Changes archive

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

CVS commit: pkgsrc/sysutils/fastfetch



Module Name:    pkgsrc
Committed By:   vins
Date:           Sat Jan 25 23:55:10 UTC 2025

Modified Files:
        pkgsrc/sysutils/fastfetch: distinfo
        pkgsrc/sysutils/fastfetch/patches:
            patch-src_detection_sound_sound__bsd.c

Log Message:
sysutils/fastfetch: be more pedantic


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/sysutils/fastfetch/distinfo
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/sysutils/fastfetch/patches/patch-src_detection_sound_sound__bsd.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/fastfetch/distinfo
diff -u pkgsrc/sysutils/fastfetch/distinfo:1.7 pkgsrc/sysutils/fastfetch/distinfo:1.8
--- pkgsrc/sysutils/fastfetch/distinfo:1.7      Sat Jan 25 22:16:08 2025
+++ pkgsrc/sysutils/fastfetch/distinfo  Sat Jan 25 23:55:10 2025
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.7 2025/01/25 22:16:08 vins Exp $
+$NetBSD: distinfo,v 1.8 2025/01/25 23:55:10 vins Exp $
 
 BLAKE2s (fastfetch-2.34.1.tar.gz) = a5e6fc60ee3376e5f054e12ce209bc3e4f4b7d2118b76d5ede064873e85620d7
 SHA512 (fastfetch-2.34.1.tar.gz) = 026b71c8d6ad5d5683ededf173d4cb2e936b3e934c7f27227fa7c5f665b9628717e90413626a4fab25fa5f5fde50cae6cdeb75621d6a2cac1ca6368c943293de
 Size (fastfetch-2.34.1.tar.gz) = 1168310 bytes
 SHA1 (patch-CMakeLists.txt) = e0a5e9758d0aac9c908b645116b2f44fb079eeb8
 SHA1 (patch-src_detection_disk_disk__bsd.c) = 807794a5c46963813e82dbb0af11668ad468bc0c
-SHA1 (patch-src_detection_sound_sound__bsd.c) = 20472a40a218798761cdc2628f96b6593791b45f
+SHA1 (patch-src_detection_sound_sound__bsd.c) = 6b20787d6cba718590dd68cd3823412718169577

Index: pkgsrc/sysutils/fastfetch/patches/patch-src_detection_sound_sound__bsd.c
diff -u pkgsrc/sysutils/fastfetch/patches/patch-src_detection_sound_sound__bsd.c:1.1 pkgsrc/sysutils/fastfetch/patches/patch-src_detection_sound_sound__bsd.c:1.2
--- pkgsrc/sysutils/fastfetch/patches/patch-src_detection_sound_sound__bsd.c:1.1        Sat Jan 25 22:16:09 2025
+++ pkgsrc/sysutils/fastfetch/patches/patch-src_detection_sound_sound__bsd.c    Sat Jan 25 23:55:10 2025
@@ -1,11 +1,11 @@
-$NetBSD: patch-src_detection_sound_sound__bsd.c,v 1.1 2025/01/25 22:16:09 vins Exp $
+$NetBSD: patch-src_detection_sound_sound__bsd.c,v 1.2 2025/01/25 23:55:10 vins Exp $
 
 * Default sound unit detection on NetBSD, via audiocfg(1). 
 * Fix undefined macros on NetBSD.
 
 --- src/detection/sound/sound_bsd.c.orig       2025-01-13 07:57:52.000000000 +0000
 +++ src/detection/sound/sound_bsd.c
-@@ -5,14 +5,38 @@
+@@ -5,13 +5,38 @@
  #include <fcntl.h>
  #include <sys/soundcard.h>
  
@@ -18,33 +18,33 @@ $NetBSD: patch-src_detection_sound_sound
  const char* ffDetectSound(FFlist* devices)
  {
      char path[] = "/dev/mixer0";
-+#ifdef __NetBSD__
++
++#if defined(__FreeBSD) || defined(__DragonFly__)
+     int defaultDev = ffSysctlGetInt("hw.snd.default_unit", -1);
+ 
+     if (defaultDev == -1)
+         return "sysctl(hw.snd.default_unit) failed";
++#elif defined(__NetBSD__)
 +    const char* const cmd = "audiocfg list | grep [*] | cut -d: -f1";
 +    char buf[32];
-+    long defaultDev = 0;
++    long defaultDev = -1;
 +
 +    FILE* f = popen(cmd, "r");
 +    if (f == NULL)
 +        return "popen() failed";
 +
 +    while (fgets(buf, sizeof buf, f) != NULL) {
-+        defaultDev = strtol(buf, NULL, 10);
++        if ((defaultDev = strtol(buf, NULL, 10)) != -1)
++          continue;
 +
 +    if (pclose(f) != 0)
 +        return "pclose() failed";
-+
++#endif
 +    }
-+#else
-     int defaultDev = ffSysctlGetInt("hw.snd.default_unit", -1);
- 
-     if (defaultDev == -1)
-         return "sysctl(hw.snd.default_unit) failed";
  
-+#endif
      for (int idev = 0; idev <= 9; ++idev)
      {
-         path[strlen("/dev/mixer")] = (char) ('0' + idev);
-@@ -26,7 +50,7 @@ const char* ffDetectSound(FFlist* device
+@@ -26,7 +51,7 @@ const char* ffDetectSound(FFlist* device
              continue;
  
          uint32_t mutemask = 0;



Home | Main Index | Thread Index | Old Index