Finding package build options

I am making my email setup better. I have moved hosts to Fastmail (referrer link) and I am setting up mutt to work with folders correctly. There is a patch for mutt called mutt-sidebar which gives a list of folders in a side pane in mutt, much like the interface would be on the web.

Looking at Freshports it looks like the sidebar patch is part of the FreeBSD port, but it isn't setup by default. I wanted to check this and looked for the option in pkg to list the build options. There is the pkg query command that will show information about installed packages, but it is a little mental to use.

I found how to use pkg query to list the build options for a pkg in the wiki .

$ pkg query "%n is compiled with option %Ok set to %Ov" mutt
mutt is compiled with option ASPELL set to off
mutt is compiled with option COMPRESSED_FOLDERS set to on
mutt is compiled with option DEBUG set to off
...
mutt is compiled with option SIDEBAR_PATCH set to off
...

That tells me that I new to build mutt from the port and turn sidebar patch on.