On FreeBSD, the cmake configuration currently skips TokuDB, as it only checks for a Linux x86_64 system. The attached patch fixes that and corrects a couple of other issues required to get Toku to build properly. I have been successfully using the resulting ha_tokudb.so plugin with MariaDB on FreeBSD 10.1 without issue.
I have submitted these patches to the port maintainer also as a stopgap on FreeBSD until this is committed. See: <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197232>.