mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
add x86info
Utility to display information about the systems x86 processor(s) PR: 30116 Submitted by: Erik Greenwald <erik@smluc.org>
This commit is contained in:
parent
7b1a111123
commit
0b278f3c0b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=48763
@ -187,6 +187,7 @@
|
||||
SUBDIR += wmpccard
|
||||
SUBDIR += wmtop
|
||||
SUBDIR += wmzazof
|
||||
SUBDIR += x86info
|
||||
SUBDIR += xbatt
|
||||
SUBDIR += xbattbar
|
||||
SUBDIR += xcdroast
|
||||
|
25
sysutils/x86info/Makefile
Normal file
25
sysutils/x86info/Makefile
Normal file
@ -0,0 +1,25 @@
|
||||
# New ports collection makefile for: x86info
|
||||
# Date created: 26 Aug 2001
|
||||
# Whom: Erik Greenwald <erik@smluc.org>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= x86info
|
||||
PORTVERSION= 1.4
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= ${PORTNAME}
|
||||
EXTRACT_SUFX= .tgz
|
||||
|
||||
MAINTAINER= erik@smluc.org
|
||||
|
||||
ONLY_FOR_ARCHS= i386
|
||||
|
||||
post-patch:
|
||||
@${PERL} -pi -e "s,gcc,${CC},g" ${WRKSRC}/Makefile
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/x86info ${PREFIX}/bin
|
||||
|
||||
.include <bsd.port.mk>
|
1
sysutils/x86info/distinfo
Normal file
1
sysutils/x86info/distinfo
Normal file
@ -0,0 +1 @@
|
||||
MD5 (x86info-1.4.tgz) = 9921a0932a1f0eda4587a1046ca92217
|
18
sysutils/x86info/files/patch-Makefile
Normal file
18
sysutils/x86info/files/patch-Makefile
Normal file
@ -0,0 +1,18 @@
|
||||
--- Makefile.orig Mon Oct 15 02:07:53 2001
|
||||
+++ Makefile Mon Oct 15 02:08:22 2001
|
||||
@@ -1,4 +1,4 @@
|
||||
-CFLAGS = -Wall -W -g -O2
|
||||
+#CFLAGS = -Wall -W -g -O2
|
||||
all: x86info
|
||||
|
||||
OBJS =\
|
||||
@@ -22,6 +22,9 @@
|
||||
|
||||
x86info: $(OBJS)
|
||||
gcc -o x86info $(OBJS)
|
||||
+
|
||||
+.c.o:
|
||||
+ gcc $(CFLAGS) -o $@ -c $<
|
||||
|
||||
clean:
|
||||
rm -f *.o x86info
|
35
sysutils/x86info/files/patch-x86info.c
Normal file
35
sysutils/x86info/files/patch-x86info.c
Normal file
@ -0,0 +1,35 @@
|
||||
--- x86info.c.orig Mon Oct 15 02:04:23 2001
|
||||
+++ x86info.c Mon Oct 15 02:06:27 2001
|
||||
@@ -11,6 +11,10 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
+#ifndef linux
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/sysctl.h>
|
||||
+#endif
|
||||
#include "x86info.h"
|
||||
|
||||
int show_msr=0;
|
||||
@@ -89,7 +93,21 @@
|
||||
return(0);
|
||||
}
|
||||
|
||||
+#if defined _SC_NPROCESSORS /* linux */
|
||||
nrCPUs = sysconf (_SC_NPROCESSORS_CONF);
|
||||
+#elif defined HW_NCPU /* bsd */
|
||||
+ {
|
||||
+ int mib[2] = { CTL_HW, HW_NCPU };
|
||||
+ size_t len;
|
||||
+
|
||||
+ len = sizeof(nrCPUs);
|
||||
+ sysctl(mib, 2, &nrCPUs, &len, NULL, 0);
|
||||
+ }
|
||||
+#else
|
||||
+ /* unknown interface to count cpu's */
|
||||
+ nrCPUs=1;
|
||||
+#endif
|
||||
+
|
||||
printf ("Found %d CPU", nrCPUs);
|
||||
if (nrCPUs > 1)
|
||||
printf ("s");
|
16
sysutils/x86info/files/patch-x86info.h
Normal file
16
sysutils/x86info/files/patch-x86info.h
Normal file
@ -0,0 +1,16 @@
|
||||
diff -urNb x86info.h x86info.h
|
||||
--- x86info.h.orig Thu Jul 26 14:40:46 2001
|
||||
+++ x86info.h Sun Aug 26 23:12:33 2001
|
||||
@@ -3,7 +3,12 @@
|
||||
* May be used under the terms of the GNU Public License (GPL)
|
||||
*/
|
||||
|
||||
+#ifdef linux
|
||||
#include <linux/types.h>
|
||||
+#else
|
||||
+#include <machine/types.h>
|
||||
+#define __u32 int
|
||||
+#endif
|
||||
|
||||
typedef __u32 u32;
|
||||
|
1
sysutils/x86info/pkg-comment
Normal file
1
sysutils/x86info/pkg-comment
Normal file
@ -0,0 +1 @@
|
||||
Utility to display information about the systems x86 processor(s)
|
3
sysutils/x86info/pkg-descr
Normal file
3
sysutils/x86info/pkg-descr
Normal file
@ -0,0 +1,3 @@
|
||||
The x86info utility displays information about each of the systems 80x86
|
||||
processors. Cache info, flags, registers, msr's, and processor
|
||||
name/family/model are all displayed.
|
1
sysutils/x86info/pkg-plist
Normal file
1
sysutils/x86info/pkg-plist
Normal file
@ -0,0 +1 @@
|
||||
bin/x86info
|
Loading…
Reference in New Issue
Block a user