Enough raving about homebrew now. I'm currently exploring Puppet , it has builtin support for macports (or as it calls it darwinports) but not for my new love. I guess it was the perfect excuse to write my own provider.
On the puppet wiki I found a document describing in generic terms what you need to do to write a custom provider. It's probably me, but I didn't get it when I read. Therefore I dug into the code of other providers. I found the gem provider most useful, but that's probably because I'm familiar with the gem command and output to see how it works.
It will only work in new versions of puppet as it uses the new directory structure lib/puppet instead of lib/plugins. There was one gotcha for me. I assumed that I needed to put my provider, well in the directory modulename/puppet/provider/ . It turns out that you need to put it in a subdirectory of the type your are implementing the provider for : module/puppet/provider/package in my case.
Code is up on github : https://github.com/jedi4ever/puppet-homebrew .
I hope one day, this provider gets into the main puppet provider list :)