summaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorijliao <ijliao@FreeBSD.org>2001-10-14 18:13:23 +0000
committerijliao <ijliao@FreeBSD.org>2001-10-14 18:13:23 +0000
commitec3f156be6f24afbb50e5ad12d3ed9440d3a6358 (patch)
treeff740238349e7ba94c136fb1a0e8c483a937550e /sysutils
parenta1e2d301058014cb6a62b9c873358dfc6527e146 (diff)
downloadFreeBSD-ports-ec3f156be6f24afbb50e5ad12d3ed9440d3a6358.zip
FreeBSD-ports-ec3f156be6f24afbb50e5ad12d3ed9440d3a6358.tar.gz
add x86info
Utility to display information about the systems x86 processor(s) PR: 30116 Submitted by: Erik Greenwald <erik@smluc.org>
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/x86info/Makefile25
-rw-r--r--sysutils/x86info/distinfo1
-rw-r--r--sysutils/x86info/files/patch-Makefile18
-rw-r--r--sysutils/x86info/files/patch-x86info.c35
-rw-r--r--sysutils/x86info/files/patch-x86info.h16
-rw-r--r--sysutils/x86info/pkg-comment1
-rw-r--r--sysutils/x86info/pkg-descr3
-rw-r--r--sysutils/x86info/pkg-plist1
9 files changed, 101 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index e45de11..91e28bb 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -187,6 +187,7 @@
SUBDIR += wmpccard
SUBDIR += wmtop
SUBDIR += wmzazof
+ SUBDIR += x86info
SUBDIR += xbatt
SUBDIR += xbattbar
SUBDIR += xcdroast
diff --git a/sysutils/x86info/Makefile b/sysutils/x86info/Makefile
new file mode 100644
index 0000000..ea2d89f
--- /dev/null
+++ b/sysutils/x86info/Makefile
@@ -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>
diff --git a/sysutils/x86info/distinfo b/sysutils/x86info/distinfo
new file mode 100644
index 0000000..e505bb3
--- /dev/null
+++ b/sysutils/x86info/distinfo
@@ -0,0 +1 @@
+MD5 (x86info-1.4.tgz) = 9921a0932a1f0eda4587a1046ca92217
diff --git a/sysutils/x86info/files/patch-Makefile b/sysutils/x86info/files/patch-Makefile
new file mode 100644
index 0000000..88d0fde
--- /dev/null
+++ b/sysutils/x86info/files/patch-Makefile
@@ -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
diff --git a/sysutils/x86info/files/patch-x86info.c b/sysutils/x86info/files/patch-x86info.c
new file mode 100644
index 0000000..a0e8551
--- /dev/null
+++ b/sysutils/x86info/files/patch-x86info.c
@@ -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");
diff --git a/sysutils/x86info/files/patch-x86info.h b/sysutils/x86info/files/patch-x86info.h
new file mode 100644
index 0000000..96c8c72
--- /dev/null
+++ b/sysutils/x86info/files/patch-x86info.h
@@ -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;
+
diff --git a/sysutils/x86info/pkg-comment b/sysutils/x86info/pkg-comment
new file mode 100644
index 0000000..c84f4e2
--- /dev/null
+++ b/sysutils/x86info/pkg-comment
@@ -0,0 +1 @@
+Utility to display information about the systems x86 processor(s)
diff --git a/sysutils/x86info/pkg-descr b/sysutils/x86info/pkg-descr
new file mode 100644
index 0000000..e17a7f8
--- /dev/null
+++ b/sysutils/x86info/pkg-descr
@@ -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.
diff --git a/sysutils/x86info/pkg-plist b/sysutils/x86info/pkg-plist
new file mode 100644
index 0000000..4563925
--- /dev/null
+++ b/sysutils/x86info/pkg-plist
@@ -0,0 +1 @@
+bin/x86info
OpenPOWER on IntegriCloud