pkgsrc-Changes archive

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

CVS commit: pkgsrc/sysutils/lscpu



Module Name:    pkgsrc
Committed By:   vins
Date:           Sat Jul  8 21:29:33 UTC 2023

Added Files:
        pkgsrc/sysutils/lscpu: DESCR Makefile PLIST distinfo
        pkgsrc/sysutils/lscpu/patches: patch-lscpu.c

Log Message:
sysutils/lscpu: import package from wip.

This utility gathers CPU architecture information for OpenBSD, FreeBSD,
NetBSD, Mac OS X & DragonFly.
The main usage of this program should be for x86 architecture since it
leverages CPUID instructions. For other architectures, it just shows
very limited facts.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/lscpu/DESCR \
    pkgsrc/sysutils/lscpu/Makefile pkgsrc/sysutils/lscpu/PLIST \
    pkgsrc/sysutils/lscpu/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/lscpu/patches/patch-lscpu.c

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

Added files:

Index: pkgsrc/sysutils/lscpu/DESCR
diff -u /dev/null pkgsrc/sysutils/lscpu/DESCR:1.1
--- /dev/null   Sat Jul  8 21:29:33 2023
+++ pkgsrc/sysutils/lscpu/DESCR Sat Jul  8 21:29:33 2023
@@ -0,0 +1,4 @@
+lscpu for OpenBSD, FreeBSD, NetBSD, Mac OS X & DragonFly.
+The main usage of this program should be for x86 architecture since it
+leverages CPUID instructions. For other architectures, it just shows
+very limited facts.
Index: pkgsrc/sysutils/lscpu/Makefile
diff -u /dev/null pkgsrc/sysutils/lscpu/Makefile:1.1
--- /dev/null   Sat Jul  8 21:29:33 2023
+++ pkgsrc/sysutils/lscpu/Makefile      Sat Jul  8 21:29:33 2023
@@ -0,0 +1,20 @@
+# $NetBSD: Makefile,v 1.1 2023/07/08 21:29:33 vins Exp $
+
+DISTNAME=      lscpu-1.2.0
+CATEGORIES=    sysutils
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=NanXiao/}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/NanXiao/lscpu/
+COMMENT=       The lscpu for BSD
+LICENSE=       modified-bsd
+
+INSTALLATION_DIRS+=    bin ${PKGMANDIR}/man1
+
+do-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/lscpu              \
+               ${DESTDIR}${PREFIX}/bin/lscpu
+       ${INSTALL_MAN}     ${WRKSRC}/lscpu.1            \
+               ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/sysutils/lscpu/PLIST
diff -u /dev/null pkgsrc/sysutils/lscpu/PLIST:1.1
--- /dev/null   Sat Jul  8 21:29:33 2023
+++ pkgsrc/sysutils/lscpu/PLIST Sat Jul  8 21:29:33 2023
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2023/07/08 21:29:33 vins Exp $
+bin/lscpu
+man/man1/lscpu.1
Index: pkgsrc/sysutils/lscpu/distinfo
diff -u /dev/null pkgsrc/sysutils/lscpu/distinfo:1.1
--- /dev/null   Sat Jul  8 21:29:33 2023
+++ pkgsrc/sysutils/lscpu/distinfo      Sat Jul  8 21:29:33 2023
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2023/07/08 21:29:33 vins Exp $
+
+BLAKE2s (lscpu-1.2.0.tar.gz) = a4133355535f08c6f7ccda2b4451d4ae3699654cfd1ae723410ba0b8c7339c51
+SHA512 (lscpu-1.2.0.tar.gz) = 4d884c792aa2c91d3b4f860c9054c5f11644c7a91dc6bb2ffe51601348063cedfa946fb49671589d379ed04dfd96fec58a71825df0d0c3eb5a5590f21abeb155
+Size (lscpu-1.2.0.tar.gz) = 7863 bytes
+SHA1 (patch-lscpu.c) = ee8e55e865330f249f8e66a79b1e66f45b5dc0f5

Index: pkgsrc/sysutils/lscpu/patches/patch-lscpu.c
diff -u /dev/null pkgsrc/sysutils/lscpu/patches/patch-lscpu.c:1.1
--- /dev/null   Sat Jul  8 21:29:33 2023
+++ pkgsrc/sysutils/lscpu/patches/patch-lscpu.c Sat Jul  8 21:29:33 2023
@@ -0,0 +1,18 @@
+$NetBSD: patch-lscpu.c,v 1.1 2023/07/08 21:29:33 vins Exp $
+
+Fix architecture detection on FreeBSD.
+
+--- lscpu.c.orig       2018-05-05 02:25:31.000000000 +0000
++++ lscpu.c
+@@ -926,7 +926,11 @@ int main(int argc, char **argv) 
+     };
+ 
+     sysctl_get_cpu_info sysctl_array[] = {
++#ifdef __FreeBSD__
++        {HW_MACHINE_ARCH, gen_info.arch, sizeof(gen_info.arch), "HW_MACHINE_ARCH"},
++#else
+         {HW_MACHINE, gen_info.arch, sizeof(gen_info.arch), "HW_MACHINE"},
++#endif
+         {HW_BYTEORDER, &(gen_info.byte_order), sizeof(gen_info.byte_order), "HW_BYTEORDER"},
+         {HW_MODEL, gen_info.model, sizeof(gen_info.model), "HW_MODEL"},
+         {HW_NCPU, &(gen_info.active_cpu_num), sizeof(gen_info.active_cpu_num), "HW_NCPU"},



Home | Main Index | Thread Index | Old Index