diff options
author | Ying-Chieh Liao <ijliao@FreeBSD.org> | 2001-10-14 18:13:23 +0000 |
---|---|---|
committer | Ying-Chieh Liao <ijliao@FreeBSD.org> | 2001-10-14 18:13:23 +0000 |
commit | 0b278f3c0b570f992bb51549ec44443b1ed0f7c8 (patch) | |
tree | 8865a6d4516679895ea50eb42e843ffe4097fd6f /sysutils/x86info | |
parent | 7b1a111123c65b7c37d014eb57c5f53b20ecb766 (diff) | |
download | ports-0b278f3c0b570f992bb51549ec44443b1ed0f7c8.tar.gz ports-0b278f3c0b570f992bb51549ec44443b1ed0f7c8.zip |
Notes
Diffstat (limited to 'sysutils/x86info')
-rw-r--r-- | sysutils/x86info/Makefile | 25 | ||||
-rw-r--r-- | sysutils/x86info/distinfo | 1 | ||||
-rw-r--r-- | sysutils/x86info/files/patch-Makefile | 18 | ||||
-rw-r--r-- | sysutils/x86info/files/patch-x86info.c | 35 | ||||
-rw-r--r-- | sysutils/x86info/files/patch-x86info.h | 16 | ||||
-rw-r--r-- | sysutils/x86info/pkg-comment | 1 | ||||
-rw-r--r-- | sysutils/x86info/pkg-descr | 3 | ||||
-rw-r--r-- | sysutils/x86info/pkg-plist | 1 |
8 files changed, 100 insertions, 0 deletions
diff --git a/sysutils/x86info/Makefile b/sysutils/x86info/Makefile new file mode 100644 index 000000000000..ea2d89fd5a17 --- /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 000000000000..e505bb3909b8 --- /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 000000000000..88d0fde539d3 --- /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 000000000000..a0e8551559d4 --- /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 000000000000..96c8c7281f0f --- /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 000000000000..c84f4e254191 --- /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 000000000000..e17a7f82124c --- /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 000000000000..4563925b0259 --- /dev/null +++ b/sysutils/x86info/pkg-plist @@ -0,0 +1 @@ +bin/x86info |