2 trees for inkscape

Ryan Schmidt ryandesign at macports.org
Wed Dec 9 16:49:50 PST 2009


On Dec 9, 2009, at 05:56, Wolf Drechsel wrote:

>>> create one tree, let's say containing a set of X11 variants,
>>> do something like
>>> mv /opt/local /opt/local-X11
>>> do a second macports install
>>> create a tree containing the aqua variants
>>> 
>>> finally switch the variants by just renaming /opt/local-xxx.
>>> 
>>> Does that idea have a chance to work?
>> 
>> Possibly, but why not just have two MacPorts installations in different prefixes and use whichever one you need at the time? What path recommendations does the Inkscape wiki make?
> 
> It may be hard to imagine, but I'm not at all familiar with the concepts of prefixes

Not hard to imagine at all. :) They are foreign concepts to most Mac and Windows users so I'll try to explain. A prefix is a location where command-line software is installed. Apple provides such software installed in the prefixes / and /usr. A prefix contains several standard directories, such as "bin" for binaries (programs you would run), "sbin" for server programs, "lib" for libraries those programs might use, and so on. This means Apple has installed command-line programs for you in /bin and /usr/bin. MacPorts by default installs into the prefix /opt/local. This means MacPorts-installed command-line programs are in /opt/local/bin.


> and paths

The PATH environment variable defines where your shell looks for programs. (The shell is what you're using when you open Terminal.app.) The PATH variable by default contains something like "/usr/bin:/bin:/usr/sbin:/sbin" which means when you type a program name in the Terminal (for example "sw_vers") the shell will look in /usr/bin, then /bin, then /usr/sbin, then /sbin, trying to find a program called "sw_vers", and will run the first one it finds. When you install MacPorts using the disk image installer, it adds /opt/local/bin and /opt/local/sbin to the front of the path, so that any software you install with MacPorts will be used in preference to any software of the same name Apple already installed for you (desirable since the versions MacPorts provides are generally newer than what Apple provides). MacPorts modifies your PATH by editing the file .profile or .bash_profile in your home directory. You can manually edit this file to change your PATH if desired. Changes to this file take effect after you close the Terminal window and open a new one.


> and neither how to handle a "variants.conf".

variants.conf is a MacPorts configuration file located by default in /opt/local/etc/macports/variants.conf. The comments in that file explain how to use it. But in short, if for example you always want to use the +quartz variant, put "+quartz" into variants.conf.


> I read quite a bit about it - but up to now I didnt get the clou… - so I'm looking for a solution I can understand. (BTHW: My English - I think - ist not so bad - but understanding Unix docu is another cup of tea…)
> 
> Did I get it right that all a macports installation contains is located within /opt/local/*
> So "mounting" another tree at that position would make a completely different macports installation available?

That's the general idea, but in practice it's never 100% true. A default MacPorts installation will place the Tcl library at /Library/Tcl/macports1.0 (outside of the standard /opt/local prefix), and any ports that install GUI applications will place them in /Applications/MacPorts (also outside the prefix). Therefore renaming /opt/local and swapping in a different one is not really sufficient.

See my next reply for more information and recommendations.




More information about the macports-users mailing list