It is first necessary to setup the gumstix build environment which is based on OpenEmbedded. I'm not sure of the status of this on Mac OS X so instead I set it up on my Linux server running Slackware 12.0, a guide to doing this can be found on the gumstix website here.
I'm planning on doing all the coding in perl so I used the environment to compile perl for the gumstix and then copied over libperl and the main perl ipkg. To install them you need to use: