The following instructions worked for Mac OS X 10.5.2 and above, client version. It should ensure all the requirements for running the Wikibook Server are satisfied.
Install LATEX and friends
Download and install The MacTeX Distribution.
Install the Xcode Tools
These are on the OS X installation DVD, under Optional Installs. Newer operating system versions require installation of the Xcode app plus the command line tools from the Apple app store.
Follow the instructions for Installing MacPorts.
Install ImageMagick with Perl
Open the Terminal application and enter the following at the command line prompt:
sudo port install p5-perlmagick
The older instruction no longer works:
sudo port install ImageMagick +perl
Install the Perl LWP::UserAgent
From the Terminal, enter the following at the command line prompt:
sudo perl -MCPAN -e shell;
This will start a Perl session and present a number of prompts. Reply “no” to the first prompt and “yes” to the rest. Then enter the following command at the CPAN console prompt:
When it has finished (it will ask a number of questions), enter “q” to return to the Terminal.
Set the Perl path in mkpdf.pl
We have to use the version of Perl that MacPorts installed, not the one that ships with Mac OS X. After untarring Wikipublisher server, change the first line of mkpdf.pl to read:
Configure the paths
If you Activate Latexrender, you also have to make sure the “convert” utility can find gs. From the Terminal, enter the following at the command line prompt (makes a symlink to the gs binary):
sudo ln -s /usr/local/bin/gs /usr/bin/gs
Now continue with the Install the Server process.