But otherwise, the solution is to have a local overlay repository with whichever ports you need to customize or add. Then you are the one who decides when to upgrade them.
In particular, to revert to an older version of any existing port (say, it got broken by MacPorts and no fix available), the following can be done:
1. Fork MacPorts repo on GitHub.
2. Clone your forked repo locally.
3. cd ~/your_local_repo
4. git remote add upstream https://github.com/macports/macports-ports && git fetch upstream
1. Go to https://ports.macports.org and find a port in question, click on Details.
2. From port details page, there is a link to its GitHub location, go there.
3. From a GH page, click History.
4. Locate a commit which makes a breaking change. Usually version update will be such, and it should be explicitly mentioned in a commit message (“someport: update to someversion”). Copy the hash of a commit immediately preceding it.
[4.5. Check the breaking commit to make sure what has been changed; it may not only be a single port, though usually that is the case.]
5. Assuming you are in your local repo: git checkout commit_hash (that is, to a commit before the breaking one, otherwise you will need to rebase to drop the latter).
6. Copy a port in question to an appropriate location inside your overlay repo.
7. Run port sync, the updated (or rather downdated in this case) port will replace “official” one.
Last edited: