Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
The first post of this thread is a WikiPost and can be edited by anyone with the appropiate permissions. Your edits will be public.
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:
  • Like
Reactions: NikolaPPC
I understand why one would want to do it this way (i.e. the correct way) but I have kind of given up on it. My main issue with it all is having to do
Code:
port sync
(I'm sure you know where I'm going with this). Then all of the work that is required to fix things after I run it. Inevitably, to your point earlier about not having time to work on the big stuff, when I run a sync it's going to pull in an updated port that is broken and fails to build.

Traditionally I'd gone and pulled a zipped copy of the entire macport's port tree out of GitHub at whatever version that contained a workable version of what I wanted (using your method to figure out where the breaking change is). I'd then grab the Portfile from the unzipped port tree and put it in my overlay repo, then run
Code:
portindex
. This seems to work and I don't have to take any new ports from remote that might break stuff. Am I at risk of breaking something doing it this way?
 
Ok now I've gone and done it. Something about taking gcc14 seems to have gone sideways, though I got no errors. For whatever reason my /opt/local/lib/libgcc directory is now missing critical dylibs that get symlinked by gcc14 (and others). Is there a way to rebuild the libgcc14 subport without having to rebuild all of gcc14?
 
Ok now I've gone and done it. Something about taking gcc14 seems to have gone sideways, though I got no errors. For whatever reason my /opt/local/lib/libgcc directory is now missing critical dylibs that get symlinked by gcc14 (and others). Is there a way to rebuild the libgcc14 subport without having to rebuild all of gcc14?

Which system are you talking about? If 10a190 or 10.6.8, just use my pre-built port. (You do not need to install my PPCPorts for that or even have my portfiles, just throw the archive into incoming/verified and install with -vb.)
Your description does not have enough info to diagnose the problem. You won’t lose anything by rebuilding libgcc in any case, so try `sudo port -v -n upgrade --force libgcc` (it is different from libgcc14).
 
  • Like
Reactions: doctor_dog
I understand why one would want to do it this way (i.e. the correct way) but I have kind of given up on it. My main issue with it all is having to do
Code:
port sync
(I'm sure you know where I'm going with this). Then all of the work that is required to fix things after I run it. Inevitably, to your point earlier about not having time to work on the big stuff, when I run a sync it's going to pull in an updated port that is broken and fails to build.

Traditionally I'd gone and pulled a zipped copy of the entire macport's port tree out of GitHub at whatever version that contained a workable version of what I wanted (using your method to figure out where the breaking change is). I'd then grab the Portfile from the unzipped port tree and put it in my overlay repo, then run
Code:
portindex
. This seems to work and I don't have to take any new ports from remote that might break stuff. Am I at risk of breaking something doing it this way?

If you need to get an old version of a port, sync won’t help. Assuming you start with a functional set-up, find a single port which does not build, replace it with an older version and run `portindex`, this sounds fine. There is no guarantee it gonna work, of course, but what else you can do in this case.
 
  • Like
Reactions: doctor_dog
1. Consider not using gcc7. MacPorts finally moved to gcc14, which I have been advocating for ages. That is why editing portfile won’t work.
If you really need to have gcc7-based setup, do the following: fork MacPorts GH repo, find a PR which moved the setup to gcc14 for old systems, revert those commits (if it does not work cleanly, you may need to do it by hand). Then you can edit sources.conf to point to your local copy of forked repo. Make it default, because it has to use modified portgroups, not only ports. But again, most likely this is not what you really need to do in this case.

2. On a general note: as long as one needs an older or just different version of some port (or a new port altogether), use an overlay local repo (doesn’t need to be forked from MacPorts or use GH at all) and set it in sources.conf above the default one. Then everything which is in that repo will have prevalence over “official” ports.
This won’t work with portgroups, since unfortunately MacPorts cannot handle overrides for them, so one needs either to replace portgroups manually after every port sync or install a distribution of MacPorts where this issue is fixed and local portgroups are honored (either MacStrop or my PPCPorts).

I'm using Tiger and I don't want to spend 36+ hours compiling a newer version. GCC7 works fine for me.
Nothing is breaking, simply selfupdating MacPorts or any other package tries to update gcc7 first. I want port to skip that entirely.
 
I'm using Tiger and I don't want to spend 36+ hours compiling a newer version. GCC7 works fine for me.
Nothing is breaking, simply selfupdating MacPorts or any other package tries to update gcc7 first. I want port to skip that entirely.

There is no easy solution to keep updating ports but stay on an old unsupported version of libgcc runtime.

You could check the PR which moved from gcc7 to gcc14, and revert related changed for yourself in your overlay repo. You will have to manually replace modified portgroups after every port sync, since MacPorts does not use custom portgoups globally (i.e. unlike with portfiles, you cannot just override them).

If you are comfortable with git, perhaps you may replace default sources with your own repo, and rebase your changes on MacPorts master branch. Then your own port groups will be used directly.

P. S. To be honest, neither of these choices will save you time in the long run. And unlike with compilation, you will actually need to spend your personal time, not just machine cycles. Perhaps request someone with Tiger to build gcc14 and libgcc14 for you and install pre-built versions? Assuming you can trust to use pre-built ports.
 
Last edited:
tried to install samba4 or samba3, both ports are failing on my system.

samba4:



samba3, failing wehen destrooting:

Code:
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_samba3/samba3/work/samba-3.6.25/source3'
xinstall: mkdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_samba3/samba3/work/destroot/opt/local/etc/samba3
xinstall: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_samba3/samba3/work/samba-3.6.25/source3/../examples/smb.conf.default -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_samba3/samba3/work/destroot/opt/local/etc/samba3/smb.conf.sample
error: install_name_tool: can't open file: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_samba3/samba3/work/destroot/opt/local/lib/samba3/libtdb.dylib (No such file or directory)
Command failed: install_name_tool  -change bin/libnetapi.dylib.0 /opt/local/lib/samba3/libnetapi.dylib  -change bin/libsmbclient.dylib.0 /opt/local/lib/samba3/libsmbclient.dylib  -change bin/libsmbsharemodes.dylib.0 /opt/local/lib/samba3/libsmbsharemodes.dylib  -change bin/libtalloc.dylib.2 /opt/local/lib/samba3/libtalloc.dylib  -change bin/libtevent.dylib.0 /opt/local/lib/samba3/libtevent.dylib  -change bin/libtdb.dylib.1 /opt/local/lib/samba3/libtdb.dylib  -change bin/script.dylib /opt/local/lib/samba3/auth/script.dylib  -change bin/CP437.dylib /opt/local/lib/samba3/charset/CP437.dylib  -change bin/CP850.dylib /opt/local/lib/samba3/charset/CP850.dylib  -change bin/macosxfs.dylib /opt/local/lib/samba3/charset/macosxfs.dylib  -change bin/autorid.dylib /opt/local/lib/samba3/idmap/autorid.dylib  -change bin/pam_smbpass.dylib /opt/local/lib/samba3/security/pam_smbpass.dylib  -change bin/acl_tdb.dylib /opt/local/lib/samba3/vfs/acl_tdb.dylib  -change bin/acl_xattr.dylib /opt/local/lib/samba3/vfs/acl_xattr.dylib  -change bin/audit.dylib /opt/local/lib/samba3/vfs/audit.dylib  -change bin/cap.dylib /opt/local/lib/samba3/vfs/cap.dylib  -change bin/catia.dylib /opt/local/lib/samba3/vfs/catia.dylib  -change bin/crossrename.dylib /opt/local/lib/samba3/vfs/crossrename.dylib  -change bin/default_quota.dylib /opt/local/lib/samba3/vfs/default_quota.dylib  -change bin/expand_msdfs.dylib /opt/local/lib/samba3/vfs/expand_msdfs.dylib  -change bin/extd_audit.dylib /opt/local/lib/samba3/vfs/extd_audit.dylib  -change bin/fake_perms.dylib /opt/local/lib/samba3/vfs/fake_perms.dylib  -change bin/full_audit.dylib /opt/local/lib/samba3/vfs/full_audit.dylib  -change bin/linux_xfs_sgid.dylib /opt/local/lib/samba3/vfs/linux_xfs_sgid.dylib  -change bin/netatalk.dylib /opt/local/lib/samba3/vfs/netatalk.dylib  -change bin/preopen.dylib /opt/local/lib/samba3/vfs/preopen.dylib  -change bin/readahead.dylib /opt/local/lib/samba3/vfs/readahead.dylib  -change bin/readonly.dylib /opt/local/lib/samba3/vfs/readonly.dylib  -change bin/recycle.dylib /opt/local/lib/samba3/vfs/recycle.dylib  -change bin/scannedonly.dylib /opt/local/lib/samba3/vfs/scannedonly.dylib  -change bin/shadow_copy.dylib /opt/local/lib/samba3/vfs/shadow_copy.dylib  -change bin/shadow_copy2.dylib /opt/local/lib/samba3/vfs/shadow_copy2.dylib  -change bin/smb_traffic_analyzer.dylib /opt/local/lib/samba3/vfs/smb_traffic_analyzer.dylib  -change bin/streams_depot.dylib /opt/local/lib/samba3/vfs/streams_depot.dylib  -change bin/streams_xattr.dylib /opt/local/lib/samba3/vfs/streams_xattr.dylib  -change bin/time_audit.dylib /opt/local/lib/samba3/vfs/time_audit.dylib  -change bin/xattr_tdb.dylib /opt/local/lib/samba3/vfs/xattr_tdb.dylib -id /opt/local/lib/samba3/libtdb.dylib /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_samba3/samba3/work/destroot/opt/local/lib/samba3/libtdb.dylib
Exit code: 1
Error: Failed to destroot samba3: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_samba3/samba3/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port samba3 failed

I searched through all threads here and all tickets on trac, but I did not find anything.
samba3 installed for me today with no apparent problems smb3.jpg
 
I got R-GUI 1.79 onto powerpc (the latest is 1.81, before we had 1.72). There is still one issue remaining to be solved for it, but it is working.

r-app.png
 
  • Like
Reactions: doctor_dog
@barracuda156 , this piques my curiosity... what is the R GUI, and what "goodies" does it deliver to it's users? I looked it up Google, but it was hard to make sense of the user benefit. Thanks!

Nothing unless you use R and even then just some conveniences. R in terminal works perfectly fine.

It was just something I mentioned ages ago that I wanted to get working, and the best what I could fix then was 1.72.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.