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: Sun Jan 26 17:30:20 UTC 2025
Modified Files:
pkgsrc/sysutils/fastfetch: Makefile distinfo
pkgsrc/sysutils/fastfetch/patches: patch-CMakeLists.txt
patch-src_detection_sound_sound__bsd.c
Removed Files:
pkgsrc/sysutils/fastfetch/patches: patch-src_detection_disk_disk__bsd.c
Log Message:
sysutils/fastfetch: update to 2.35.0
# pkgsrc changes
* Incorporate upstream patch to enable OSS support on NetBSD.
Likely to be included in the next formal release. See:
https://github.com/fastfetch-cli/fastfetch/issues/1527
# upstream changes (since 2.34.0)
Bugfixes:
* Suppress output of EGL again (#1513, GPU, Linux)
Regression of 2.34.0
Features:
* Show SOC name reported in cpuinfo if available (#1510, CPU, Linux)
* Change package manager name of NetBSD from pkg to pkgsrc (#1515, Packages, NetBSD)
* Detect SOC name on RISCV (#1519, CPU, Linux)
* Report marketing name of new QS8Es (CPU, Android)
* Acquire acquire more os info from lsb-release if missing from os-release (#1521)
* CMake: add option -DCUSTOM_LSB_RELEASE_PATH to specify the path of lsb-release file
-DCUSTOM_OS_RELEASE_PATH has been supported since v2.11.4
* Report more SOC names on Android (CPU, Android)
* Support duration printing in custom format (Disk / Users)
Logo:
* Add Arch_old
* Update key color of NetBSD_small
* Fix OpenBSD and many other ascii logos (#1522)
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 pkgsrc/sysutils/fastfetch/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/sysutils/fastfetch/distinfo
cvs rdiff -u -r1.3 -r1.4 \
pkgsrc/sysutils/fastfetch/patches/patch-CMakeLists.txt \
pkgsrc/sysutils/fastfetch/patches/patch-src_detection_sound_sound__bsd.c
cvs rdiff -u -r1.1 -r0 \
pkgsrc/sysutils/fastfetch/patches/patch-src_detection_disk_disk__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/Makefile
diff -u pkgsrc/sysutils/fastfetch/Makefile:1.10 pkgsrc/sysutils/fastfetch/Makefile:1.11
--- pkgsrc/sysutils/fastfetch/Makefile:1.10 Sun Jan 26 09:14:05 2025
+++ pkgsrc/sysutils/fastfetch/Makefile Sun Jan 26 17:30:20 2025
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.10 2025/01/26 09:14:05 vins Exp $
+# $NetBSD: Makefile,v 1.11 2025/01/26 17:30:20 vins Exp $
-DISTNAME= fastfetch-2.34.1
-PKGREVISION= 4
+DISTNAME= fastfetch-2.35.0
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_GITHUB:=fastfetch-cli/}
GITHUB_TAG= ${PKGVERSION_NOREV}
@@ -24,8 +23,9 @@ REPLACE_TOOL_PYTHON+= scripts/gen-pciids
SUBST_CLASSES+= paths
SUBST_STAGE.paths= pre-configure
SUBST_MESSAGE.paths= Replacing hard-coded paths.
-SUBST_FILES.paths+= src/detection/packages/packages_obsd.c
-SUBST_FILES.paths+= doc/fastfetch.1.in scripts/gen-man.py
+SUBST_FILES.paths+= src/detection/packages/packages_obsd.c \
+ src/detection/packages/packages_sunos.c \
+ doc/fastfetch.1.in scripts/gen-man.py
SUBST_SED.paths+= -e "s:/usr/pkg/pkgdb:${PKG_DBDIR}:g"
SUBST_SED.paths+= -e "s:/usr/share:${PREFIX}/share:g"
Index: pkgsrc/sysutils/fastfetch/distinfo
diff -u pkgsrc/sysutils/fastfetch/distinfo:1.9 pkgsrc/sysutils/fastfetch/distinfo:1.10
--- pkgsrc/sysutils/fastfetch/distinfo:1.9 Sun Jan 26 09:14:05 2025
+++ pkgsrc/sysutils/fastfetch/distinfo Sun Jan 26 17:30:20 2025
@@ -1,8 +1,7 @@
-$NetBSD: distinfo,v 1.9 2025/01/26 09:14:05 vins Exp $
+$NetBSD: distinfo,v 1.10 2025/01/26 17:30:20 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) = 7f043f7bc5456b5a7696b8cfbc3f4d3eb5caf4e2
+BLAKE2s (fastfetch-2.35.0.tar.gz) = bfa20ac20bcaff76148936c95ae542414f626fd358a853bcdcf95b946d0bc706
+SHA512 (fastfetch-2.35.0.tar.gz) = c77f0496e7be630b1e19443058e5176c0b361375adeb4a6c2f1e5084c00869f9c939f82e35205c9316f3f81a622124bcc926f409fd0eb9c0ce59be5f5ab086a2
+Size (fastfetch-2.35.0.tar.gz) = 1171386 bytes
+SHA1 (patch-CMakeLists.txt) = 4b3536dc6aff90a42ee6e56beacf0fdc25627944
+SHA1 (patch-src_detection_sound_sound__bsd.c) = a9dee8cddbdb50676b8726314184d339928f9dcb
Index: pkgsrc/sysutils/fastfetch/patches/patch-CMakeLists.txt
diff -u pkgsrc/sysutils/fastfetch/patches/patch-CMakeLists.txt:1.3 pkgsrc/sysutils/fastfetch/patches/patch-CMakeLists.txt:1.4
--- pkgsrc/sysutils/fastfetch/patches/patch-CMakeLists.txt:1.3 Sat Jan 25 22:16:09 2025
+++ pkgsrc/sysutils/fastfetch/patches/patch-CMakeLists.txt Sun Jan 26 17:30:20 2025
@@ -1,9 +1,18 @@
-$NetBSD: patch-CMakeLists.txt,v 1.3 2025/01/25 22:16:09 vins Exp $
+$NetBSD: patch-CMakeLists.txt,v 1.4 2025/01/26 17:30:20 vins Exp $
Enable sound support on NetBSD via ossaudio(3).
---- CMakeLists.txt.orig 2025-01-13 07:57:52.000000000 +0000
+--- CMakeLists.txt.orig 2025-01-26 02:14:38.000000000 +0000
+++ CMakeLists.txt
+@@ -75,7 +75,7 @@ cmake_dependent_option(ENABLE_GLX "Enabl
+ cmake_dependent_option(ENABLE_OSMESA "Enable osmesa" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS" OFF)
+ cmake_dependent_option(ENABLE_OPENCL "Enable opencl" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR WIN32 OR ANDROID OR SunOS" OFF)
+ cmake_dependent_option(ENABLE_FREETYPE "Enable freetype" ON "ANDROID" OFF)
+-cmake_dependent_option(ENABLE_PULSE "Enable pulse" ON "LINUX OR OpenBSD OR NetBSD OR SunOS" OFF)
++cmake_dependent_option(ENABLE_PULSE "Enable pulse" ON "LINUX OR OpenBSD OR SunOS" OFF)
+ cmake_dependent_option(ENABLE_DDCUTIL "Enable ddcutil" ON "LINUX" OFF)
+ cmake_dependent_option(ENABLE_DIRECTX_HEADERS "Enable DirectX headers for WSL" ON "LINUX" OFF)
+ cmake_dependent_option(ENABLE_ELF "Enable libelf" ON "LINUX OR ANDROID OR DragonFly" OFF)
@@ -761,7 +761,7 @@ elseif(NetBSD)
src/detection/poweradapter/poweradapter_nosupport.c
src/detection/processes/processes_nbsd.c
@@ -13,12 +22,11 @@ Enable sound support on NetBSD via ossau
src/detection/swap/swap_obsd.c
src/detection/terminalfont/terminalfont_linux.c
src/detection/terminalshell/terminalshell_linux.c
-@@ -1205,7 +1205,7 @@ elseif(SunOS)
- elseif(NetBSD)
- target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-char-subscripts")
-- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,/usr/X11R7/lib -Wl,-rpath,/usr/pkg/lib") # ditto
-+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,/usr/X11R7/lib -Wl,-rpath,/usr/pkg/lib -lossaudio") # ditto
- endif()
-
- if(FreeBSD OR OpenBSD OR NetBSD)
+@@ -1509,6 +1509,7 @@ elseif(NetBSD)
+ target_link_libraries(libfastfetch
+ PRIVATE "m"
+ PRIVATE "prop"
++ PRIVATE "ossaudio"
+ )
+ elseif(SunOS)
+ target_link_libraries(libfastfetch
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.3 pkgsrc/sysutils/fastfetch/patches/patch-src_detection_sound_sound__bsd.c:1.4
--- pkgsrc/sysutils/fastfetch/patches/patch-src_detection_sound_sound__bsd.c:1.3 Sun Jan 26 09:14:05 2025
+++ pkgsrc/sysutils/fastfetch/patches/patch-src_detection_sound_sound__bsd.c Sun Jan 26 17:30:20 2025
@@ -1,56 +1,83 @@
-$NetBSD: patch-src_detection_sound_sound__bsd.c,v 1.3 2025/01/26 09:14:05 vins Exp $
+$NetBSD: patch-src_detection_sound_sound__bsd.c,v 1.4 2025/01/26 17:30:20 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.orig 2025-01-26 02:14:38.000000000 +0000
+++ src/detection/sound/sound_bsd.c
-@@ -5,13 +5,39 @@
+@@ -4,29 +4,54 @@
+
#include <fcntl.h>
#include <sys/soundcard.h>
++#include <unistd.h>
-+/* Obsolete macros */
-+#ifndef SOUND_MIXER_MUTE // unavailable on some platforms
-+#define SOUND_MIXER_MUTE SOUND_MIXER_NONE
-+#define SOUND_MIXER_READ_MUTE MIXER_READ(SOUND_MIXER_MUTE)
-+#endif
-+
const char* ffDetectSound(FFlist* devices)
{
- char path[] = "/dev/mixer0";
-+
-+#if defined(__FreeBSD) || defined(__DragonFly__)
+- char path[] = "/dev/mixer0";
++ #ifndef __NetBSD__
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 = -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 == -1)
-+ return "audiocfg: failed to get default sound unit";
-+
-+ if (pclose(f) != 0)
-+ return "pclose() failed";
-+#endif
++ #else
++ int defaultDev;
++ {
++ char mixerp[12];
++ ssize_t plen = readlink("/dev/mixer", mixerp, ARRAY_SIZE(mixerp));
++ if (plen < 6)
++ return "readlink(/dev/mixer) failed";
++ defaultDev = mixerp[plen - 1] - '0';
++ if (defaultDev < 0 || defaultDev > 9)
++ return "Invalid mixer device";
+ }
++ #endif
- for (int idev = 0; idev <= 9; ++idev)
+- for (int idev = 0; idev <= 9; ++idev)
++ char path[] = "/dev/mixer0";
++
++ struct oss_sysinfo info = { .nummixers = 9 };
++
++ for (int idev = 0; idev <= info.nummixers; ++idev)
{
-@@ -26,7 +52,7 @@ const char* ffDetectSound(FFlist* device
+ path[strlen("/dev/mixer")] = (char) ('0' + idev);
+ FF_AUTO_CLOSE_FD int fd = open(path, O_RDWR);
+ if (fd < 0) break;
+
++ if (idev == 0)
++ {
++ if (ioctl(fd, SNDCTL_SYSINFO, &info) != 0)
++ return "ioctl(SNDCTL_SYSINFO) failed";
++ }
++
+ uint32_t devmask = 0;
+ if (ioctl(fd, SOUND_MIXER_READ_DEVMASK, &devmask) < 0)
+ continue;
+ if (!(devmask & SOUND_MASK_VOLUME))
continue;
++ #if defined(SOUND_MIXER_MUTE) && (SOUND_MIXER_MUTE != SOUND_MIXER_NONE)
++ #define FF_SOUND_HAVE_MIXER_MUTE 1
uint32_t mutemask = 0;
- ioctl(fd, SOUND_MIXER_READ_MUTE, &mutemask); // doesn't seem to be available on DragonFly
+ ioctl(fd, SOUND_MIXER_READ_MUTE, &mutemask);
++ #endif
struct oss_card_info ci = { .card = idev };
if (ioctl(fd, SNDCTL_CARDINFO, &ci) < 0)
+@@ -40,10 +65,12 @@ const char* ffDetectSound(FFlist* device
+ ffStrbufInitS(&device->identifier, path);
+ ffStrbufInitF(&device->name, "%s %s", ci.longname, ci.hw_info);
+ ffStrbufTrimRightSpace(&device->name);
+- ffStrbufInitStatic(&device->platformApi, "OSS");
+- device->volume = mutemask & SOUND_MASK_VOLUME
+- ? 0
+- : ((uint8_t) volume /*left*/ + (uint8_t) (volume >> 8) /*right*/) / 2;
++ ffStrbufInitF(&device->platformApi, "%s %s", info.product, info.version);
++ device->volume =
++ #ifdef FF_SOUND_HAVE_MIXER_MUTE
++ mutemask & SOUND_MASK_VOLUME ? 0 :
++ #endif
++ ((uint8_t) volume /*left*/ + (uint8_t) (volume >> 8) /*right*/) / 2;
+ device->active = true;
+ device->main = defaultDev == idev;
+ }
Home |
Main Index |
Thread Index |
Old Index