# Question about Ports and Packages



## taggedzi (Sep 12, 2011)

I am new to BSD, so bear with me.

I recently installed FreeBSD and attempted to use "ports" to compile gnome2.  After 3 days of going through prompts and compiling, I gave up and decided to download the package using pkg_add.

Is it possible to use pkg_add to download all the dependencies and then compile the specific applications that I want to customize after all the other programs are "installed"?  For example if I wanted different options than the default binary of gnome2?

I guess my question is a simple do ports and packages play nice together? Or are they more like oil and water?

Thanks in advance for any help.


----------



## jb_fvwm2 (Sep 12, 2011)

```
portmaster -PP devel/llvm && portmaster -d -B -i lang/clang
```
 ... will possibly install llvm by package, then build clang from ports. Adding the -P switch to the latter command will use the package "if" available.  So ports and packages can work together (and to illustrate that command a bit.)


----------



## wblock@ (Sep 12, 2011)

They're two stages of the same thing.  A port downloads the source and compiles it into a package.  The difference is that a port is compiled on your system, where a downloaded package was built on the FreeBSD package cluster.  Version problems can and do happen when libraries and other software on your system are different from what the package was built to expect.

GNOME2 isn't a single binary, but yes, it's possible to install all the packages you want and then go back and rebuild selected ones from ports.


----------



## taggedzi (Sep 12, 2011)

@jb_fvwm2: Sorry your a bit over my head on that one.  I'll have to read up a bit more to figure out what that does.

@wblock: Thanks for the info.


----------



## kisscool-fr (Sep 13, 2011)

Or you can go to your port directory ie. /usr/ports/categorie/gnome2, issue a *make config-recursive* to config the port and dependencies, and finally *make install* to install the port and dependecies without any prompting.


----------

