I started to examine ways to simplify the installation of gf for Mac OS X users
I see two clear options:
Register gf as a MacPorts project: This might be the prefered way of people having several other tools installed from the MacPorts servers. For these people, it avoids duplication of code but requires the user to be more knowledgeable since it works by locally compiling the sources.
Create a native mac package (.pkg). The binaries are packaged and installed in place. More convenient for the users but requiring manual compiling and re-packaging each time a new gf version is released.
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.