creating MacTeX links to MacPorts TeXLive

Ryan Schmidt ryandesign at
Sat Oct 9 13:41:13 PDT 2010

On Oct 8, 2010, at 13:53, Faisal Moledina wrote:

> Note that doing this doesn't alter anything in /opt/local. It just
> sets up links in /usr/texbin to the appropriate location. The main
> disadvantage that I see is that because MacPorts installs TeXLive
> binaries in /opt/local/bin, when this TeX distribution is selected,
> /usr/texbin would link to /opt/local/bin.

Well, you've said two different things here:

1. You've said links (to programs) will be set up *in* (the directory) /usr/texbin 

2. You've said /usr/texbin *will be a link* (to a directory containing programs)

Indeed, if method (2) is employed, and /usr/texbin *is* a link to /opt/local/bin, then /usr/texbin will contain far more than just TeX, which is probably not the right thing to do.

With method (1), this means you need a directory containing only the TeX programs. MacPorts doesn't give you one, so you'd have to create one, and put into it symlinks to each of the MacPorts TeX programs. The problem here is that MacPorts TeX is split among several dozen ports, and the user most likely won't have them all installed. If you only create links to the programs currently installed, what happens when the user installs more ports later? Answer: they're not available in /usr/texbin, so that's bad. If you instead create links to all possible programs, even those not installed, what happens when the user tries to run one of the not-installed programs? Answer: No such file or directory, so that's bad.

You could request a modification to all MacPorts TeX ports, which would be for each of them to make symlinks to their own programs in a new directory, say /opt/local/libexec/texlive/texbin. Then you could make /usr/texbin a link to /opt/local/libexec/texlive/texbin with no problem; it would auto-update when the user installs or uninstalls ports.

More information about the macports-users mailing list