creating MacTeX links to MacPorts TeXLive

Faisal Moledina faisal.moledina at gmail.com
Sat Oct 9 14:13:09 PDT 2010


>> 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.

If I said it is currently like method (1), I was incorrect because
method (2) is what actually occurs.

> 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.

My suggestion is exactly that. I think my first message sounds quite
non-commital in retrospect, but I think that the MacTeX link
/usr/texbin -> /opt/local/bin is not the best solution because of
reasons I stated before. It would work much better if the link was
/usr/texbin -> /opt/local/libexec/texlive/texbin as you suggest, Ryan.
It would certainly be most efficient if it were done at the port
install level so I'll go ahead and request a modification. I realize
now that it would be even more specific if we could extend this
treatment for texlive man and info pages.

Faisal


More information about the macports-users mailing list