Building MacPorts without root, anywhere
I like to vendor MacPorts to support applications, like a MacPorts distribution for xmonad, and another for my Ruby development. This means anchoring to a directory and never using root.
Build the "ports" utility with these options to anchor in "$HOME/xmonad"
./configure --prefix "$HOME/xmonad" --with-install-user=$(id -u -n) --with-install-group=$(id -g -n) --with-no-root-privileges
In "variants.conf", specify global variants:
+no_root -startupitem
In "macports.conf", also set startup item options:
startupitem_type none
startupitem_install no
Also, change paths to include prefix "$HOME/xmonad".
Some ports will hardcode root options and assume chgrp will succeed -- nothing a "port edit" won't fix.
Written by Tom, Bom
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Osx
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#