The main reason is the difference between the scandir(3) third argument, which is defined as "const struct dirent *" for Linux and "struct dirent *" for BSD. This only issues a warning for C code, but gcc fails on C++ code. The next one is the missing fmemopen, but that's already handled by the code, only a new condition is needed to avoid using it on __FreeBSD__, or completely depend it on linux/glibc (perhaps something more generic may be better, not just fbsd specific).
Created attachment 112089 [details, diff] libprojectm-0.99-fbsd.patch Patch with the required fixes.
Created attachment 112091 [details, diff] libprojectm_ebuild.patch Patch for the ebuild.
Created attachment 112092 [details, diff] libprojectm_ebuild.patch Sorry, uploaded the same patch twice, this is the patch for the ebuild.
Patch committed in CVS, keyworded ~x86-fbsd, closing bug.