# How to see the current dependencies in ports?



## Blackbird (Jun 26, 2010)

Hi,

short question, I didn't find it with Google: :\

How can I figure out, which installed ports depend on a specific package, and because of wich compile option?
In my case, I want to see which of my installed ports depend on HAL.

I came from Gentoo, I think Gentoo has the 'equery depends <...>' for it.

Thanks!


----------



## ckester (Jun 26, 2010)

```
pkg_info -Rx hal
```


----------



## Blackbird (Jul 8, 2010)

Ok, but that only shows the name of dependency, nothing more.

I wanted to know the compile option which causes the dependency, if it is a soft one, so I can disable that option to remove the dependency, e.g. HAL.


----------



## t1066 (Jul 8, 2010)

`$ grep -R HAL /var/db/ports`


----------



## SirDice (Jul 8, 2010)

Blackbird said:
			
		

> I wanted to know the compile option which causes the dependency, if it is a soft one, so I can disable that option to remove the dependency, e.g. HAL.


For me the easiest way to do that is to look at the port's Makefile. They are fairly easy to read. Look for *WITH_** or *WITHOUT_** variables. Those are switches that will turn things on or off respectively. 

All ports have build dependencies and run dependencies. Their names speak for themselves. You can view them with the following commands:


```
dice@molly:>cd /usr/ports/x11/xorg
dice@molly:/usr/ports/x11/xorg>make run-depends-list
/usr/ports/graphics/dri
/usr/ports/x11-drivers/xorg-drivers
/usr/ports/x11-fonts/xorg-fonts
/usr/ports/x11-servers/xorg-server
/usr/ports/x11-themes/xcursor-themes
/usr/ports/x11/xbitmaps
/usr/ports/x11/xorg-apps
/usr/ports/x11/xorg-docs
/usr/ports/x11/xorg-libraries
dice@molly:/usr/ports/x11/xorg>make build-depends-list
dice@molly:/usr/ports/x11/xorg>
```


----------

