Listing all available ports having a certain configuration option

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.
 
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?
 
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
 
That looks time exhausting. But with the trick of Boby B. I found one which works , aqualung. But the sound is not perfect.
 
Back
Top