mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-24 09:25:01 +00:00
sysutils/py-py-cpuinfo: fix on armv7, add lscpu dependency
On FreeBSD, armv[67] both report "arm" in "uname -m", but this package expected the string armv6 or armv7. Fix the port by adding an extra case for just "arm" to the architecture detection logic. While we are at it, optionally depend on sysutils/lscpu as an additional data source for architecture features. See also: https://github.com/workhorsy/py-cpuinfo/issues/197 Approved by: yuri (maintainer) Differential Revision: https://reviews.freebsd.org/D40252
This commit is contained in:
parent
41cce74a9e
commit
a1fbebbcb6
@ -1,5 +1,6 @@
|
||||
PORTNAME= py-cpuinfo
|
||||
DISTVERSION= 8.0.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= sysutils python
|
||||
MASTER_SITES= PYPI
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
@ -16,4 +17,9 @@ USE_PYTHON= distutils concurrent autoplist
|
||||
|
||||
NO_ARCH= yes
|
||||
|
||||
OPTIONS_DEFINE= LSCPU
|
||||
OPTIONS_DEFAULT= LSCPU
|
||||
LSCPU_DESC= Use sysutils/lscpu as a data source
|
||||
LSCPU_RUN_DEPENDS= lscpu:sysutils/lscpu
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
11
sysutils/py-py-cpuinfo/files/patch-cpuinfo_cpuinfo.py
Normal file
11
sysutils/py-py-cpuinfo/files/patch-cpuinfo_cpuinfo.py
Normal file
@ -0,0 +1,11 @@
|
||||
--- cpuinfo/cpuinfo.py.orig 2023-05-24 07:26:57 UTC
|
||||
+++ cpuinfo/cpuinfo.py
|
||||
@@ -797,7 +797,7 @@ def _parse_arch(arch_string_raw):
|
||||
elif re.match(r'^armv8-a|aarch64|arm64$', arch_string_raw):
|
||||
arch = 'ARM_8'
|
||||
bits = 64
|
||||
- elif re.match(r'^armv7$|^armv7[a-z]$|^armv7-[a-z]$|^armv6[a-z]$', arch_string_raw):
|
||||
+ elif re.match(r'^armv7$|^armv7[a-z]$|^armv7-[a-z]$|^armv6[a-z]$|^arm$', arch_string_raw):
|
||||
arch = 'ARM_7'
|
||||
bits = 32
|
||||
elif re.match(r'^armv8$|^armv8[a-z]$|^armv8-[a-z]$', arch_string_raw):
|
Loading…
Reference in New Issue
Block a user