pkgsrc-WIP-changes archive

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

bsdfetch: update to prerelease 0.9.



Module Name:	pkgsrc-wip
Committed By:	Paolo Vincenzo Olivo <vms%retrobsd.ddns.net@localhost>
Pushed By:	vms
Date:		Thu Dec 1 09:15:02 2022 +0100
Changeset:	bdca26ad8f98987b613696cbb52d9e4dd2e17b13

Modified Files:
	bsdfetch/Makefile
	bsdfetch/distinfo
Removed Files:
	bsdfetch/patches/patch-bsdfetch.c

Log Message:
bsdfetch: update to prerelease 0.9.

patch dropped, changes merged upstream.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=bdca26ad8f98987b613696cbb52d9e4dd2e17b13

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

diffstat:
 bsdfetch/Makefile                 |  5 +--
 bsdfetch/distinfo                 |  7 ++--
 bsdfetch/patches/patch-bsdfetch.c | 87 ---------------------------------------
 3 files changed, 5 insertions(+), 94 deletions(-)

diffs:
diff --git a/bsdfetch/Makefile b/bsdfetch/Makefile
index 2dbd997ed9..e18f03ccb2 100644
--- a/bsdfetch/Makefile
+++ b/bsdfetch/Makefile
@@ -1,10 +1,9 @@
 # $NetBSD$
 
-DISTNAME=	bsdfetch-20221123
+DISTNAME=	bsdfetch-0.9
 CATEGORIES=	sysutils
 MASTER_SITES=	${MASTER_SITE_GITHUB:=jhx0/}
-GITHUB_TAG=	c75e286bec960d00f71cb166e59c2af7a71c8835
-DIST_SUBDIR=	${PKGNAME_NOREV}
+GITHUB_TAG=	9840c3153fcf49150ebcee94f527f4ebcc0b8c1b
 
 MAINTAINER=	vms%retrobsd.ddns.net@localhost
 HOMEPAGE=	https://github.com/jhx0/bsdfetch/
diff --git a/bsdfetch/distinfo b/bsdfetch/distinfo
index 754d62d436..a0c2d0a68f 100644
--- a/bsdfetch/distinfo
+++ b/bsdfetch/distinfo
@@ -1,7 +1,6 @@
 $NetBSD$
 
-BLAKE2s (bsdfetch-20221123/bsdfetch-20221123-c75e286bec960d00f71cb166e59c2af7a71c8835.tar.gz) = 57d429b85d0c3b1759f0c63075fad9b8a38be97997692ac8f27613772a582864
-SHA512 (bsdfetch-20221123/bsdfetch-20221123-c75e286bec960d00f71cb166e59c2af7a71c8835.tar.gz) = a5060c5484252b224daa9e352f2dc27c13ffa937846788b0531bc41b88221deee21696985802b7ede368d08d927449974e2b45aaccef87289ac461c9a700ae44
-Size (bsdfetch-20221123/bsdfetch-20221123-c75e286bec960d00f71cb166e59c2af7a71c8835.tar.gz) = 6592 bytes
+BLAKE2s (bsdfetch-0.9-9840c3153fcf49150ebcee94f527f4ebcc0b8c1b.tar.gz) = ee4bd56abbdb8c5ef1159798bfdc3f18b535520facea300d69002ebd02813c91
+SHA512 (bsdfetch-0.9-9840c3153fcf49150ebcee94f527f4ebcc0b8c1b.tar.gz) = b62d956f25eacc2426743c09523e89ade002fadd44445aa5c2628425b10d45d0133354be765af17fac78a936436197a8de5b02efd9c670dcdcf9513f0b744bb3
+Size (bsdfetch-0.9-9840c3153fcf49150ebcee94f527f4ebcc0b8c1b.tar.gz) = 6794 bytes
 SHA1 (patch-Makefile) = 62812c29b42d05ad9a9b1b9cc263ec309a7a4771
-SHA1 (patch-bsdfetch.c) = 86c0e3e45a7ffbafdd935c985672c021ff585e95
diff --git a/bsdfetch/patches/patch-bsdfetch.c b/bsdfetch/patches/patch-bsdfetch.c
deleted file mode 100644
index f2942f6575..0000000000
--- a/bsdfetch/patches/patch-bsdfetch.c
+++ /dev/null
@@ -1,87 +0,0 @@
-$NetBSD$
-
-* Improve CPU model name detection on NetBSD.
-* Fix uptime count on NetBSD and re-enable it.
-
---- bsdfetch.c.orig	2022-11-23 13:22:36.000000000 +0000
-+++ bsdfetch.c
-@@ -17,19 +17,20 @@
- #include <errno.h>
- #include <stdlib.h>
- #include <string.h>
--#include <time.h>
- #include <unistd.h>
- #include <sys/types.h>
- #include <sys/sysctl.h>
- #include <sys/utsname.h>
- #include <dlfcn.h>
- #if defined(__FreeBSD__) || defined(__DragonFly__)
-+#include <sys/time.h>
- #include <sys/vmmeter.h>
- #include <vm/vm_param.h>
-+#elif defined(__NetBSD__) || defined(__OpenBSD__)
-+#include <sys/time.h>
- #endif
- #ifdef __OpenBSD__
- #include "sysctlbyname.h"
--#include <sys/time.h>
- #include <sys/sensors.h>
- #endif
- 
-@@ -103,7 +104,6 @@ static void get_user() {
- 
- static void get_cpu() {
- 	size_t num_cpu_size = 0;
--	size_t cpu_type_size = 0;
- 	uint num_cpu = 0;
- 	char cpu_type[200] = {0};
- 	char tmp[100] = {0};
-@@ -113,11 +113,24 @@ static void get_cpu() {
- 	if(sysctlbyname("hw.ncpu", &num_cpu, &num_cpu_size, NULL, 0) == -1)
- 		die(errno, __LINE__);
- 
--	cpu_type_size = sizeof(char) * 200;
-+#if defined(__NetBSD__)
-+	FILE *fc = NULL;
- 
--	if(sysctlbyname("hw.model", &cpu_type, &cpu_type_size, NULL, 0) == -1)
-+	fc = popen("awk 'BEGIN{FS=\":\"} /model name/ { print $2; exit }' "
-+                   "/proc/cpuinfo | sed -e 's/ @//' -e 's/^ *//g' -e 's/ *$//g' "
-+                   "| head -1 | tr -d '\\n'",
-+                   "r");
-+	if (fc == NULL)
- 		die(errno, __LINE__);
- 
-+	fgets(cpu_type, sizeof(cpu_type), fc);
-+	pclose(fc);
-+#else
-+	size_t cpu_type_size = 0;
-+	cpu_type_size = sizeof(char) * 200;
-+	if(sysctlbyname("hw.model", &cpu_type, &cpu_type_size, NULL, 0) == -1)
-+		die(errno, __LINE__);
-+#endif
- 	show("CPU", cpu_type);
- 
- 	_SILENT sprintf(tmp, "%d", num_cpu);
-@@ -284,10 +297,8 @@ static void get_uptime() {
- 	int minutes = 0;
- 	struct timespec t;
- 
--// NetBSD kernel doesn't implement CLOCK_UPTIME, to assume we've we'll set CLOCK_UPTIME to CLOCK_REALTIME
--// More easily we can also use value 5 instead CLOCK_UPTIME, since it's only for FreeBSD
- #ifndef CLOCK_UPTIME
--#define CLOCK_UPTIME 0
-+#define CLOCK_UPTIME CLOCK_MONOTONIC 
- #endif
- 	ret = clock_gettime(CLOCK_UPTIME, &t);
- 	if(ret == -1)
-@@ -413,9 +424,7 @@ int main(int argc, char **argv) {
- 	get_shell();
- 	get_user();
- 	get_packages();
--#ifndef __NetBSD__
- 	get_uptime();
--#endif
- 	get_memory();
- 	get_loadavg();
- 	get_cpu();


Home | Main Index | Thread Index | Old Index