I was trying to write an ebuild a while ago but got stuck with the part where it does some magic autodetection of portmidi. There seem to be half a dozen ways of saying on/off in CMake and none of the ones I tried worked.
I know I could just leave the automatic stuff in and it'd work, but Gentoo would probably be more accepting if I don't send them crappy code.