# Listing all available ports having a certain configuration option



## Alain De Vos (Sep 10, 2020)

I want to list all ports available which have for instance the configuration option SNDIO and FLAC.
Because I want to find all ports to play FLAC to SNDIO. [Audacious does not seem to work for me ]
The only way I can think of is first installing all available ports ...., and grepping in all the options files.


----------



## Bobi B. (Sep 10, 2020)

Something like `find /usr/ports -name Makefile | xargs grep -l FLAC | xargs grep -l SNDIO`? However is that going to work if either `FLAC` or `SNDIO` is not a selectable option, but the port supports it anyway?


----------



## VladiBG (Sep 10, 2020)

`pkg search -d flac`
Will show you all packages that are using flac codec

If you want gstreamer-plugin-flac
`pkg search -d gstreamer-plugin-flac`

Edit:
ohh sorry i just re-read your original post. Above is true only for installed ports.

You can use freshports search option to list all ports that depends-run on FLAC codec




__





						FreshPorts -- Search
					

Search




					www.freshports.org


----------



## T-Daemon (Sep 10, 2020)

If you don't want to install the ports tree, you can query https://freshports.org with a web search engine. There the configuration options for every port are listed. Example: `"SNDIO=" "FLAC=" site:freshports.org` .


----------



## T-Daemon (Sep 10, 2020)

Or run a search on https://github.com/freebsd/freebsd-ports:









						Search · FLAC SNDIO · freebsd/freebsd-ports
					

FreeBSD ports tree (read-only mirror). Contribute to freebsd/freebsd-ports development by creating an account on GitHub.




					github.com


----------



## Alain De Vos (Sep 10, 2020)

That looks time exhausting. But with the trick of Boby B. I found one which works , aqualung. But the sound is not perfect.


----------

