creating MacTeX links to MacPorts TeXLive

Faisal Moledina faisal.moledina at
Fri Oct 8 11:53:55 PDT 2010

I use both MacPorts TeXLive and MacTeX from time to time. MacTeX comes
with a handy System Preferences panel that allows you to choose which
TeX distribution you want to use (i.e. TeXLive 2010 and TeXLive 2009
if you have both installed from The MacTeX postflight
installation script also creates links to other TeX distributions so
that one can easily switch between MacTeX and others. Some examples
include gwTeX 2003-2005, Fink-teTeX, and the old MacPorts-teTeX. I
decided to help update the postflight script to link to MacPorts
TeXLive ports, called MacPorts-TeXLive. I've pasted the relevant
portion of the postflight script at and I
was wondering if other MacTeX users or anyone in general can check to
make sure that I haven't missed anything.

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. Since /usr/texbin is
typically recommended to be prepended to $PATH, this would cause
issues for people who do not want MacPorts binaries to take precedence
over system ones (i.e. Perl). I'm not sure how to deal with that apart
from making a texlive-bin somewhere in /opt/local
(opt/local/bin/texlive ?) that would be linked to the TeX
Distributions System Preferences panel instead of /opt/local/bin.
Having said that, I'm not sure how much effort MacPorts texlive* port
maintainers are interested in putting in doing that.

I'm interested in hearing what others think of this approach. For me,
I normally like the simplicity and all-in-one approach that MacPorts
offers. However, I also like to keep up with new XeTeX features,
making it handy to use MacTeX whenever necessary. This is especially
the case if I want to use tlmgr, which is not recommended with
MacPorts for obvious reasons.

Faisal Moledina

More information about the macports-users mailing list