Small modifications to existing makefiles; does not overwrite them, but adds new ones for FreeBSD only. Extract into same dir as Box2D/. Compile with gmake -f Makefile.FreeBSD.
Note that FreeBSD seems to default to installing libglut over freeglut (which is needed for the demos), and they appear to not be quite interchangeable; a simple wrapper is probably possible, but I just uninstalled libglut and dropped freeglut in its place, and the demos work great.
Edit: Forgot about this when making the patch; you'll need to add
#include <osreldate.h>
inside any #ifdef __FreeBSD__ sections before checking __FreeBSD_version. On 2.0.1, I only needed to do this once-- after line 79 in Contrib/freeglut/freeglut_joystick.c;
Code:
# if defined(__FreeBSD__) || defined(__NetBSD__)
# include <osreldate.h>
/* XXX The below hack is done until freeglut's autoconf is updated. */
# define HAVE_USB_JS 1
# if defined(__FreeBSD__) && __FreeBSD_version >= 500000