diff options
author | pawel <pawel@FreeBSD.org> | 2016-10-13 02:25:29 +0800 |
---|---|---|
committer | pawel <pawel@FreeBSD.org> | 2016-10-13 02:25:29 +0800 |
commit | 499286f9d4dd0f6eba47e9e7f24037a98893c47a (patch) | |
tree | 3746c93aea36229d02fd3856abe409107b932155 /sysutils/cpuid | |
parent | 977677aa6b25efb63e306359c154da225246279e (diff) | |
download | freebsd-ports-gnome-499286f9d4dd0f6eba47e9e7f24037a98893c47a.tar.gz freebsd-ports-gnome-499286f9d4dd0f6eba47e9e7f24037a98893c47a.tar.zst freebsd-ports-gnome-499286f9d4dd0f6eba47e9e7f24037a98893c47a.zip |
- Update to verion 20160814
- Take maintainership
PR: 213377
Submitted by: Piotr Kubaj
Diffstat (limited to 'sysutils/cpuid')
-rw-r--r-- | sysutils/cpuid/Makefile | 7 | ||||
-rw-r--r-- | sysutils/cpuid/distinfo | 5 | ||||
-rw-r--r-- | sysutils/cpuid/files/patch-cpuid.c | 50 |
3 files changed, 33 insertions, 29 deletions
diff --git a/sysutils/cpuid/Makefile b/sysutils/cpuid/Makefile index 48230d74ed0e..7f53fefab7ad 100644 --- a/sysutils/cpuid/Makefile +++ b/sysutils/cpuid/Makefile @@ -2,13 +2,13 @@ # $FreeBSD$ PORTNAME= cpuid -PORTVERSION= 20140123 +PORTVERSION= 20160814 CATEGORIES= sysutils MASTER_SITES= http://www.etallen.com/cpuid/ PKGNAMESUFFIX= ${CPUID_SUFFIX} DISTNAME= ${PORTNAME}-${PORTVERSION}.src -MAINTAINER= ports@FreeBSD.org +MAINTAINER= pkubaj@anongoth.pl COMMENT= Tool to dump x86 CPUID information about the CPU(s) LICENSE= GPLv2 @@ -17,7 +17,8 @@ LICENSE_FILE= ${WRKSRC}/LICENSE ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= only works with x86 CPUs -USES= gmake +USES= gmake perl5 +USE_PERL5= build ALL_TARGET= default WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} diff --git a/sysutils/cpuid/distinfo b/sysutils/cpuid/distinfo index 057758fe0d62..45b79eacca77 100644 --- a/sysutils/cpuid/distinfo +++ b/sysutils/cpuid/distinfo @@ -1,2 +1,3 @@ -SHA256 (cpuid-20140123.src.tar.gz) = b85aba5696d382f0dba8dc246bd42d09767089d6181a9cd0633d626f079d79ff -SIZE (cpuid-20140123.src.tar.gz) = 67882 +TIMESTAMP = 1476108297 +SHA256 (cpuid-20160814.src.tar.gz) = fd4e2b2d88f417ae32f47a92d29351de395a36578fde8aedc228e2e131f38ecd +SIZE (cpuid-20160814.src.tar.gz) = 77160 diff --git a/sysutils/cpuid/files/patch-cpuid.c b/sysutils/cpuid/files/patch-cpuid.c index 04f30acf438a..86af82ba74f0 100644 --- a/sysutils/cpuid/files/patch-cpuid.c +++ b/sysutils/cpuid/files/patch-cpuid.c @@ -1,41 +1,43 @@ ---- cpuid.c.orig 2014-01-24 01:26:27 UTC +--- cpuid.c.orig 2016-08-15 03:54:53 UTC +++ cpuid.c -@@ -17,6 +17,8 @@ - ** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ +@@ -23,6 +23,8 @@ + #define USE_KERNEL_SCHED_SETAFFINITY + #endif +#define CPUID_MAJOR 0 + #define _GNU_SOURCE #include <stdio.h> #include <sys/types.h> -@@ -26,11 +28,14 @@ - #include <unistd.h> - #include <stdlib.h> +@@ -34,6 +36,8 @@ #include <string.h> --#include <linux/major.h> -+//#include <linux/major.h> #include <regex.h> #include <getopt.h> - #include <sys/syscall.h> - +#include <pthread.h> +#include <pthread_np.h> -+ - typedef int boolean; - #define TRUE 1 - #define FALSE 0 -@@ -5877,7 +5882,8 @@ real_setup(unsigned int cpu, - = (1 << cpu % (sizeof(unsigned int)*8)); + #ifdef USE_CPUID_MODULE + #include <linux/major.h> +@@ -6420,11 +6424,16 @@ real_setup(unsigned int cpu, + int status; + status = syscall(__NR_sched_setaffinity, 0, sizeof(mask), &mask); + #else +- cpu_set_t cpuset; ++ cpuset_t cpuset; + CPU_ZERO(&cpuset); + CPU_SET(cpu, &cpuset); int status; -- status = syscall(__NR_sched_setaffinity, 0, sizeof(mask), &mask); -+ //status = syscall(__NR_sched_setaffinity, 0, sizeof(mask), &mask); -+ status = pthread_setaffinity_np(0, sizeof(mask), &mask); +- status = sched_setaffinity(0, sizeof(cpu_set_t), &cpuset); ++#if defined(__FreeBSD__) ++ status = cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, ++ -1, sizeof(cpuset_t), &cpuset); ++#else ++ status = sched_setaffinity(0, sizeof(cpuset_t), &cpuset); ++#endif + #endif if (status == -1) { if (cpu > 0) { - if (errno == EINVAL) return -1; -@@ -5987,11 +5993,14 @@ static int real_get (int cpuid +@@ -6539,11 +6548,14 @@ static int real_get (int cpuid : "a" (reg), "c" (ecx)); } else { @@ -53,7 +55,7 @@ if (result == -1) { if (quiet) { return FALSE; -@@ -6432,7 +6441,8 @@ main(int argc, +@@ -7050,7 +7062,8 @@ main(int argc, }; boolean opt_one_cpu = FALSE; @@ -63,7 +65,7 @@ boolean opt_kernel = FALSE; boolean opt_raw = FALSE; boolean opt_debug = FALSE; -@@ -6508,7 +6518,8 @@ main(int argc, +@@ -7134,7 +7147,8 @@ main(int argc, } // Default to -i. So use inst unless -k is specified. |