On Oct 6, 2025, at 01:43, Kenneth Wolcott wrote:
> 
> is is possible to prevent universal ports from being installed?

If you edit /opt/local/etc/macports/macports.conf and change "universal_archs" 
from "arm64 x86_64" only "arm64", that should prevent ports from having a 
universal variant. 


> I use "sudo port install -s port_name", "sudo port upgrade -s port_name" and 
> "sudo port -s upgrade  outdated" and I have arm-only (don't recall what that 
> setting name precisely is) set.

By using the "-s" flag you're forcing a build from source and missing out on 
binaries we offer and making your computer do a lot of unnecessary work. 

But if you really do want to always build from source, you can edit 
macports.conf and change "buildfromsource" from "ifneeded" to "always" and then 
you won't need to use "-s" on the command line. 


> Why do I end up with universal port(s) being installed? I don't want these 
> installed. I just tried to install "pure" and it already installed about 50 
> (?) ports that are x86-64, why?

Because pure requires an old version of llvm that can't be built for arm64. But 
it is available for x86_64, which is compatible with your computer via Rosetta 
2, so MacPorts installs it that way. 

Porting pure to a newer version of llvm is a major undertaking:

https://github.com/agraef/pure-lang/issues/6

But the developer of pure hasn't been working on it for years. 


> If arm64 is not supported, please just exit out stating that I must install 
> universals and/or x86-64, and I'll not continue.

If I hadn't done anything that's what would have happened, but a user reported 
that as a bug so I enabled the port to be installed this way, using universal 
dependencies. 

https://github.com/agraef/pure-lang/issues/42


> Now, how to uninstall all of these ports that that were installed as 
> dependencies?

There isn't a built-in command to do that, so it will take a combination of 
commands. Someone else posted a solution awhile ago that looks almost correct:

https://lists.macports.org/pipermail/macports-users/2012-March/027571.html

except for some erroneous escaping. Here's my corrected version:

port installed | grep '+universal' | sed -e 's/@.*+/+/' -e 
's/+universal/-universal/' -e 's/(active)//' | xargs sudo port upgrade 
--enforce-variants 


Reply via email to