The latexpdf target needs images that fit on the page, and does not support gifs.
Using Damien's approach where conf.py and topindex.html are shared by all ports.