There are probably a bazillion of these posts out there, but I wanted to play with DTrace and Wine in OS X (post on this to come) and had to get the thing built first. This is mainly a “here’s what I did” post, with some “and this is why” sprinkled in.
I grabbed the dependency I was missing (you might need others, like libjpeg and libpng3 that I already had around) and the latest source from git
sudo fink install fontforge git
git clone git://source.winehq.org/git/wine.git \
wine-git
Of course, it’s good practice not to muddy up your source tree, so build in a separate directory
mkdir bwine-git
cd bwine-git
Running just `configure` generates complaints about missing libxslt, libpng, and libjpeg. For libpng and libjpeg, I just needed to point to Fink’s libraries and headers under /sw. It took a little digging to figure out pkg-config had been installed by Fink, but since I wanted to use the system libxml and libxslt under /usr, I had to point pkg-config to the .pc files in /usr/lib/pkgconfig[1].
PKG_CONFIG_PATH=/usr/lib/pkgconfig \
CPPFLAGS=-I/sw/include \
LDFLAGS=-L/sw/lib ../wine-git/configure
I’m directed by configure to `make depend && make`; I purposely leave out a -j2 since 1) it’s a hot day and I don’t want to kill my poor MacBook Pro, and 2) I don’t remember if it works correctly
make depend && make
And finally, test it works
./wine notepad.exe
Unfortunately, I get the message that “Wine cannot find the FreeType font library. To enable Wine to use TrueType fonts please install a version of FreeType greater than or equal to 2.0.5.” Let’s point dyld to our X11 libs (where FreeType lives), and try again
DYLD_FALLBACK_LIBRARY_PATH=/usr/X11/lib \
./wine notepad.exe
Success!
[1] It seems that Wine’s autoconf script takes the value returned from pkg-config, if pkg-config exists, without trying the alternative (values from xslt-config and xml2-config, in this case), even if pkg-config returns an empty string. I might get around to submitting a patch.