-
Notifications
You must be signed in to change notification settings - Fork 5
Adding New Ports
The Haskell Porter tool, or hsporter
for short, is a standalone command-line tool to (almost) automatically turn Haskell Cabal packages, right from the HackageDB, into FreeBSD ports. Using hsporter
requires installation via Cabal:
$ git clone http://github.com/freebsd-haskell/hsporter
$ cd hsporter
$ cabal install
It can be used to add new hs-
ports without much hassle. It takes the URL of the Cabal package description and optionally a category for the port to be created. For example:
$ hsporter http://hackage.haskell.org/package/DeepArrow-0.4.0/DeepArrow.cabal
The tool can figure out the category automatically, but of course this may be also specified (and actually recommended):
$ hsporter http://hackage.haskell.org/package/DeepArrow-0.4.0/DeepArrow.cabal devel
Add the resulting files and directories to the clone of the ports
repository and remember to add a line for the ported Cabal package to the bsd.hackage.mk
file ("database") under lang/ghc
.
Beware, the generated port must be used with care as it may contain mistakes, and sometimes it has to be cleaned up as well, especially the pkg-descr
file. It also recommended to check if all the dependencies have been already ported and available. (Unfortunately, hsporter
cannot do recursive conversions as of the time of writing.) So, once the port is at its place, invoke make(1)
just to see if everything works properly:
$ make checksum
Thanks to bsd.cabal.mk
, the port will then be able to tell if some dependency is missing. Repeat the process for all the dependencies. Do not forget to commit each of the ports separately.