summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2017-02-20 15:14:38 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2017-02-20 15:14:38 +0000
commit3679ec4bad92d10382ff2d6bc0de1e3ce9b255b4 (patch)
treee76182c9b71ce3004337e1ce2edf12c0be2d5a3d
parentUpdate to 0.2.2 (diff)
Add go-cpuid 1.0
The cpuid package provides information about the CPU running the current program. CPU features are detected on startup, and kept for fast access through the life of the application. Currently x86 / x64 (AMD64) is supported, and no external C (cgo) code is used, which should make the library very easy to use. You can access the CPU information by accessing the shared CPU variable of the cpuid library. WWW: https://github.com/klauspost/cpuid - While I'm here: - Use DISTVERSIONPREFIX - Add LICENSE_FILE - Remove GH_PROJECT PR: 217210 Submitted by: Guy Tabrar <guy.tabrar@me.com>
Notes
Notes: svn path=/head/; revision=434466
-rw-r--r--devel/Makefile1
-rw-r--r--devel/go-cpuid/Makefile20
-rw-r--r--devel/go-cpuid/distinfo3
-rw-r--r--devel/go-cpuid/pkg-descr12
-rw-r--r--devel/go-cpuid/pkg-plist21
5 files changed, 57 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 437085ca7ff4..8536ab94dbdd 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -751,6 +751,7 @@
SUBDIR += go-bindata
SUBDIR += go-cobra
SUBDIR += go-codec
+ SUBDIR += go-cpuid
SUBDIR += go-faker
SUBDIR += go-form
SUBDIR += go-glide
diff --git a/devel/go-cpuid/Makefile b/devel/go-cpuid/Makefile
new file mode 100644
index 000000000000..4317ca12b68c
--- /dev/null
+++ b/devel/go-cpuid/Makefile
@@ -0,0 +1,20 @@
+# $FreeBSD$
+
+PORTNAME= cpuid
+PORTVERSION= 1.0
+DISTVERSIONPREFIX= v
+CATEGORIES= devel
+PKGNAMEPREFIX= go-
+
+MAINTAINER= guy.tabrar@me.com
+COMMENT= Cpuid provides information about the CPU running the current program
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USE_GITHUB= yes
+GH_ACCOUNT= klauspost
+USES= go
+GO_PKGNAME= github.com/klauspost/cpuid
+
+.include <bsd.port.mk>
diff --git a/devel/go-cpuid/distinfo b/devel/go-cpuid/distinfo
new file mode 100644
index 000000000000..dfa2704aacf3
--- /dev/null
+++ b/devel/go-cpuid/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1487476724
+SHA256 (klauspost-cpuid-v1.0_GH0.tar.gz) = 9739cdbf54eb6c26752c37ae567f59d52ceb879bba7b925b161caf920155d43d
+SIZE (klauspost-cpuid-v1.0_GH0.tar.gz) = 205089
diff --git a/devel/go-cpuid/pkg-descr b/devel/go-cpuid/pkg-descr
new file mode 100644
index 000000000000..68f49166f6c1
--- /dev/null
+++ b/devel/go-cpuid/pkg-descr
@@ -0,0 +1,12 @@
+The cpuid package provides information about the CPU running the
+current program.
+
+CPU features are detected on startup, and kept for fast access
+through the life of the application. Currently x86 / x64 (AMD64)
+is supported, and no external C (cgo) code is used, which should
+make the library very easy to use.
+
+You can access the CPU information by accessing the shared CPU
+variable of the cpuid library.
+
+WWW: https://github.com/klauspost/cpuid
diff --git a/devel/go-cpuid/pkg-plist b/devel/go-cpuid/pkg-plist
new file mode 100644
index 000000000000..d178c115b9e2
--- /dev/null
+++ b/devel/go-cpuid/pkg-plist
@@ -0,0 +1,21 @@
+%%GO_LIBDIR%%/%%GO_PKGNAME%%.a
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/LICENSE
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/README.md
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/cpuid.go
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/cpuid_386.s
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/cpuid_amd64.s
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/cpuid_test.go
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/detect_intel.go
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/detect_ref.go
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/generate.go
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/mockcpu_test.go
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/private-gen.go
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/private/README.md
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/private/cpuid.go
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/private/cpuid_386.s
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/private/cpuid_amd64.s
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/private/cpuid_detect_intel.go
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/private/cpuid_detect_ref.go
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/private/cpuid_test.go
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/testdata/cpuid_data.zip
+%%GO_SRCDIR%%/%%GO_PKGNAME%%/testdata/getall.go