[MacPorts] #64863: base: (linux) invalid `os_arch` on debian-based distros
MacPorts
noreply at macports.org
Sun Mar 20 22:14:57 UTC 2022
#64863: base: (linux) invalid `os_arch` on debian-based distros
---------------------+--------------------
Reporter: harens | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: base | Version:
Resolution: | Keywords:
Port: |
---------------------+--------------------
Comment (by harens):
Ah okay, thank you for explaining. That makes a lot of sense. The issue
isn't to do with `uname -p`, it's just that the architecture hasn't been
set in MacPorts base.
Also, I really like that switch statement. I found a
[https://stackoverflow.com/a/45125525 list] of some possible `uname -m`
values, and thought I'd try to future proof the code a bit. Thoughts?
{{{#!tcl
switch -regexp -- $os_arch {
{Power Macintosh} {
set os_arch "powerpc"
}
{i[3-7]86} {
set os_arch "i386"
}
{^(arm|aarch)} {
# If the arch begins with arm or aarch
set os_arch "arm"
}
}
}}}
--
Ticket URL: <https://trac.macports.org/ticket/64863#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list