diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2022-05-20 13:38:10 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2022-05-20 13:38:10 +0000 |
commit | 5249e3cc92e69cafef15c4ecb3176c12662335c6 (patch) | |
tree | 697cd676dce28a185060860d5a091be992088e42 | |
parent | 4c9fcd143aff8e2536e203e920f34c829c523dcf (diff) | |
download | ports-5249e3cc92e69cafef15c4ecb3176c12662335c6.tar.gz ports-5249e3cc92e69cafef15c4ecb3176c12662335c6.zip |
sysutils/cpuid2cpuflags: update the port to version 12
FreeBSD/arm{,64} support had been integrated upstream.
-rw-r--r-- | sysutils/cpuid2cpuflags/Makefile | 2 | ||||
-rw-r--r-- | sysutils/cpuid2cpuflags/distinfo | 6 | ||||
-rw-r--r-- | sysutils/cpuid2cpuflags/files/patch-src_hwcap.c | 48 |
3 files changed, 4 insertions, 52 deletions
diff --git a/sysutils/cpuid2cpuflags/Makefile b/sysutils/cpuid2cpuflags/Makefile index 454144e605db..075cfb903f61 100644 --- a/sysutils/cpuid2cpuflags/Makefile +++ b/sysutils/cpuid2cpuflags/Makefile @@ -1,7 +1,7 @@ # Created by: Alexey Dokuchaev <danfe@FreeBSD.org> PORTNAME= cpuid2cpuflags -PORTVERSION= 11 +PORTVERSION= 12 DISTVERSIONPREFIX= v CATEGORIES= sysutils diff --git a/sysutils/cpuid2cpuflags/distinfo b/sysutils/cpuid2cpuflags/distinfo index edff79113d39..4c4d92b21fb9 100644 --- a/sysutils/cpuid2cpuflags/distinfo +++ b/sysutils/cpuid2cpuflags/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1594660495 -SHA256 (mgorny-cpuid2cpuflags-v11_GH0.tar.gz) = d602a1951cc28066dde664eacc81fe889e015b83d4b338f303cbe3fc5932ccc0 -SIZE (mgorny-cpuid2cpuflags-v11_GH0.tar.gz) = 10321 +TIMESTAMP = 1653021281 +SHA256 (mgorny-cpuid2cpuflags-v12_GH0.tar.gz) = 7f0fcba0b4ac1d30dd649e526a06ef955f2467168038d219905f48a5ca2c251c +SIZE (mgorny-cpuid2cpuflags-v12_GH0.tar.gz) = 10777 diff --git a/sysutils/cpuid2cpuflags/files/patch-src_hwcap.c b/sysutils/cpuid2cpuflags/files/patch-src_hwcap.c deleted file mode 100644 index 89c88e4f92b8..000000000000 --- a/sysutils/cpuid2cpuflags/files/patch-src_hwcap.c +++ /dev/null @@ -1,48 +0,0 @@ ---- src/hwcap.c.orig 2020-07-13 17:14:55 UTC -+++ src/hwcap.c -@@ -14,13 +14,19 @@ - #ifdef HAVE_SYS_AUXV_H - # include <sys/auxv.h> - #endif -+#ifdef __FreeBSD__ -+#include <sys/sysctl.h> -+#else - #include <sys/utsname.h> -- --#ifndef __linux__ --# error "Platform not supported (only Linux supported at the moment)" - #endif -+ - #ifndef HAVE_GETAUXVAL --# error "Platform not supported (no getauxval())" -+static unsigned long getauxval(int aux) -+{ -+ unsigned long auxval = 0; -+ elf_aux_info(aux, &auxval, sizeof(auxval)); -+ return auxval; -+} - #endif - - #include "hwcap.h" -@@ -53,9 +59,21 @@ unsigned long get_hwcap2() - */ - char* get_uname_machine() - { -+#ifdef __FreeBSD__ -+ /** -+ * Contrary to this code expectation, on FreeBSD/arm, `uname -m' -+ * is always `arm', so we return more unique `uname -p' instead. -+ */ -+ int mib[] = { CTL_HW, HW_MACHINE_ARCH }; -+ static char buf[48]; -+ size_t len = sizeof(buf); -+ if (sysctl(mib, 2, &buf, &len, NULL, 0) == 0) -+ return buf; -+#else - static struct utsname uname_res; - if (uname(&uname_res) != -1) - return uname_res.machine; -+#endif - else - return NULL; - } |