How does Macport work?

Scott Haneda talklists at newgeo.com
Wed Jun 10 15:27:33 PDT 2009


Hello, welcome to MacPorts...

On Jun 10, 2009, at 2:54 PM, Fon Vitale wrote:

> I'm a new Macport user and I have a basic question. I would like to  
> know what happens when you want to install one thing that it's  
> alredy installed.
>
> For instance, supose that C compiler is alredy installed in your  
> computer (not installed using macport) and you install it using  
> macport:

Any software isntalled prior to MacPorts is going to be installed  
where that software decided to isntall itself.  Since MacPorts was not  
installed prior, it will not be anywhere near MacPorts.

By default, MacPorts installs 99% of everything in /opt/local though  
you can change that location, most people never do, nor would I  
recommend it.

> sudo port install gcc43 (for example)

If you run
	port info gcc43
That will give you some details on that port

Running
	port dir gcc43
Returns
/opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/ 
gcc43
At that path, you can see the portfile that is used, and look at it to  
see what it is going to do.  A shortcut woudld be:
	port edit gcc43
This will read in the portfile for you to see, or you can also
	cd `port dir gcc43`
Which will get you right to the portfile.

> What is macport installing?

Macports, in your case, would install gcc43 (The GNU compiler  
collection) into /opt/local.

> Where is macport installing C compiler?

Look at the portfile, and look at the configure args, you can see  
where all the bits and pieces are going to end up.

> What happens with C files installed before?

They will be untouched.

> If we want to uninstall C compiler... ?

Your old C compiler would also be untouched.

* I am pretty new to MacPorts, but the questions you ask seem to be  
general to how MacPorts works, which is that, in almost all cases,  
data outside of /opt/local is the only place MacPorts will touch.   
There are exceptions, but those are few.
-- 
Scott * If you contact me off list replace talklists@ with scott@ *



More information about the macports-users mailing list