diff options
| author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2016-08-18 02:21:07 +0000 |
|---|---|---|
| committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2016-08-18 02:21:07 +0000 |
| commit | 6baab87d1c61b425ba72e70c8a5641ccabacf05e (patch) | |
| tree | c2da43758f494ce4e4385d816f6c72c522bc9ff4 /sysutils/libcpuid | |
| parent | Fix BROKEN for < 10.3. While here drop maintainership. (diff) | |
Add a port of libcpuid, small x86 CPU identification library written in C.
NB: TIMESTAMP line in distinfo should read as follows, but has to stay in
its current form due to a bug in the hook script:
TIMESTAMP (libcpuid-0.3.0.tar.gz) = 1468115631
WWW: http://libcpuid.sourceforge.net/
Diffstat (limited to 'sysutils/libcpuid')
| -rw-r--r-- | sysutils/libcpuid/Makefile | 30 | ||||
| -rw-r--r-- | sysutils/libcpuid/distinfo | 3 | ||||
| -rw-r--r-- | sysutils/libcpuid/files/patch-libcpuid_cpuid__main.c | 10 | ||||
| -rw-r--r-- | sysutils/libcpuid/pkg-descr | 15 | ||||
| -rw-r--r-- | sysutils/libcpuid/pkg-plist | 9 |
5 files changed, 67 insertions, 0 deletions
diff --git a/sysutils/libcpuid/Makefile b/sysutils/libcpuid/Makefile new file mode 100644 index 000000000000..43236a828423 --- /dev/null +++ b/sysutils/libcpuid/Makefile @@ -0,0 +1,30 @@ +# Created by: Alexey Dokuchaev <danfe@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= libcpuid +PORTVERSION= 0.3.0 +CATEGORIES= sysutils +MASTER_SITES= SF + +MAINTAINER= danfe@FreeBSD.org +COMMENT= Small x86 CPU identification library + +LICENSE= BSD2CLAUSE + +ONLY_FOR_ARCHS= i386 amd64 + +USES= libtool pathfix +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --disable-silent-rules +USE_LDCONFIG= yes +INSTALL_TARGET= install-strip + +PORTDOCS= AUTHORS ChangeLog Readme.md + +OPTIONS_DEFINE= DOCS + +post-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR} + +.include <bsd.port.mk> diff --git a/sysutils/libcpuid/distinfo b/sysutils/libcpuid/distinfo new file mode 100644 index 000000000000..e85ba5c0fc21 --- /dev/null +++ b/sysutils/libcpuid/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1468115631 +SHA256 (libcpuid-0.3.0.tar.gz) = dcf70a3c163eed34ea146ebee0a3c061a111373f3286391b62cf664402f1e9f8 +SIZE (libcpuid-0.3.0.tar.gz) = 455685 diff --git a/sysutils/libcpuid/files/patch-libcpuid_cpuid__main.c b/sysutils/libcpuid/files/patch-libcpuid_cpuid__main.c new file mode 100644 index 000000000000..b7aee007b8be --- /dev/null +++ b/sysutils/libcpuid/files/patch-libcpuid_cpuid__main.c @@ -0,0 +1,10 @@ +--- libcpuid/cpuid_main.c.orig 2016-08-16 05:32:11 UTC ++++ libcpuid/cpuid_main.c +@@ -126,6 +126,7 @@ static int get_total_cpus(void) + #endif + + #if defined __FreeBSD__ || defined __OpenBSD__ || defined __NetBSD__ || defined __bsdi__ || defined __QNX__ ++#include <sys/types.h> + #include <sys/sysctl.h> + + static int get_total_cpus(void) diff --git a/sysutils/libcpuid/pkg-descr b/sysutils/libcpuid/pkg-descr new file mode 100644 index 000000000000..c5ba37e72b9a --- /dev/null +++ b/sysutils/libcpuid/pkg-descr @@ -0,0 +1,15 @@ +libcpuid is a small C library for x86 CPU detection and feature extraction. +Using it, you can: + + - Get the processor vendor, model, brand string, code name, etc. + - Get information about CPU features such as: number of cores or logical + CPUs, cache sizes, CPU clock, etc. + - Check if the processor implements a specific instruction set such as + SSE2 or 3DNow! + - Execute the CPUID and RDTSC instructions in a portable way + - And have this all in your commercial application, without getting into + trouble, due to permissive license + +Reference utility (rather advanced and useful on its own) is also provided. + +WWW: http://libcpuid.sourceforge.net/ diff --git a/sysutils/libcpuid/pkg-plist b/sysutils/libcpuid/pkg-plist new file mode 100644 index 000000000000..fdb4437bdd71 --- /dev/null +++ b/sysutils/libcpuid/pkg-plist @@ -0,0 +1,9 @@ +bin/cpuid_tool +include/libcpuid/libcpuid.h +include/libcpuid/libcpuid_constants.h +include/libcpuid/libcpuid_types.h +lib/libcpuid.a +lib/libcpuid.so +lib/libcpuid.so.13 +lib/libcpuid.so.13.0.0 +libdata/pkgconfig/libcpuid.pc |
