I have Lion with MacPorts installed packages.
I will describe here all what I did to make compilation work. May be some steps are unnecessary, maybe some additionnal libraries will have to be installed (using MacPorts) prior to sk1libs or uniconvertor compilation to make it work.
My answer is based on @bitboxer's answer with some additions.
Downloads
I used the links provided here: http://sk1project.org/modules.php?name=Products&product=uniconvertor&op=download
Downloaded and extracted uniconvertor and sk1libs
sk1libs installation
First try
I first ran the following:
$ export LDFLAGS="-L/usr/X11/lib"
$ export CFLAGS="-I/usr/X11/include -I/usr/X11/include/freetype2 -I/usr/X11/include/libpng15"
$ python setup.py build
Please notice that the libpng version is 15 (not 12 as in @bitboxer's answer). I noticed this searching in /usr/X11/include directory.
Which gave some errors:
ld: library not found for -llcms
collect2: ld returned 1 exit status
ld: library not found for -llcms
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/3w/5x6f3w0n4rg0w6sdq2n_48j00000gn/T//cc8y3Erh.out (No such file or directory)
error: command 'llvm-gcc-4.2' failed with exit status 1
Troubleshooting
So I tried to figure out if I had already lcms library installed:
$ locate lcms
...
/opt/local/include/lcms.h
...
/opt/local/lib/liblcms.a
....
lcms was installed by MacPort on my computer (lcms seems to be a dependency of Inkscape).
Second try: success
So I did this:
$ export LDFLAGS="-L/usr/X11/lib -L/opt/local/lib/"
$ export CFLAGS="-I/usr/X11/include -I/usr/X11/include/freetype2 -I/usr/X11/include/libpng15 -I/opt/local/include"
Which added the MacPorts include and lib dir to compilation flags.
Then:
$ python setup.py build
Which ended with no errors (but some warnings).
Then:
$ sudo python setup.py install
Uniconvertor installation
Same thing (I ran it just after sk1libs compilation, so LDFLAGS and CFLAGS value are the same):
$ python setup.py build
$ sudo python setup.py install