Ways to facilitate the installation of Gf for Mac OS X

I started to examine ways to simplify the installation of gf for Mac OS X users

I see two clear options:

Creating a MacPorts project for gf

The goal of submitting gf as a MacProject is to be eventually able to type:

sudo port install gf

to have gf automagically compiled and installed in your mac.

To prepare a MacPorts submission I first checked which tools from the MacPorts repository will be needed to compile gf-3.1. It happened that the only dependency was the haskell compiler ghc and once this was present and activated, it compiled gf with no fuss.

The only difference to be noted is that MacPorts insists on installing code under /opt/local instead of the more usual path /usr/local. This had to be taken into account as soon as posible in the building process since the final path for the resource libraries is encoded into gf during the configuration phase.

After checking that a usable gf executable was made in /opt/local/bin (with corresponding libraries in /opt/local/share) I prepared a Portfile describing what is to be done in the configuration/building/installation phase to reproduce this result, complemented with other information (where to get the sources, to which code category it belongs, etc.)

I copied this Portfile to a special place in my computer and hacked my MacPorts installation to make this file visible to the port command alongise the official ones and checked again that all goes as expected.

The next step was to submit a ticket to the MacPorts bug-tracking system asking for a new (publically available) port for gf to be created. And this is for the moment the end of the story, after 3 weeks I received no more feedback on it, nor the status of the submission has changed.

Creating a native Mac OS X package for gf

Finally I found time to check the other way: I made a directory tree for GF.framework (to reside at /Library/Frameworks) and copied there the files from the Intel Mac binary distribution at gf download page.

Then, I wrote a bash script (the actual executable) setting the right values of GHOME and GF_LIB_PATH (this one pointing to the present subdirectory of the library)

Using Apple's Package Maker, I created a set for a new package. Then I:

and build the package. It works for me. If you want to try it in your computer just ask.

Notes