Gentoo Archives: gentoo-dev

From: kosmikus <kosmikus@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] eclass for Haskell GHC packages
Date: Fri, 29 Oct 2004 09:53:04
Message-Id: 20041029095728.GH27489@cs.uu.nl
1 I have written a new eclass, to be called ghc-package.eclass,
2 and submitted it as bug #69270 for everyone to see.
3
4 Explanation for non-Haskellers:
5
6 The Glasgow Haskell Compiler (GHC) is available in Gentoo
7 as an ebuild (dev-lang/ghc).
8
9 There are also a couple of Haskell libraries in the distribution,
10 and there are going to be more in the future ... For a library
11 to be available for other Haskell programs to use, it has to be
12 registered with GHC's package tool, called ghc-pkg, which is
13 shipped with the compiler.
14
15 This package tool writes a system-wide package configuration file,
16 and can therefore only be executed during post-installation.
17
18 Currently, the Haskell libraries that have ebuilds use slightly
19 varying hacks to prevent the makefiles from calling ghc-pkg
20 directly and to register the packages during post-installation
21 (and to unregister packages during removal).
22
23 This is the main purpose that the eclass fulfills: it specifies
24 clearly what the package maintainer has to do, and it leaves
25 all the dirty work to the eclass methods.
26
27 I have adapted a few ebuilds to use the eclass -- they are
28 also included in the bug. It seems to work fine.
29
30 I am away for the weekend, which gives you time to send comments
31 and flames. If I don't hear anything negative, I would commit
32 the eclass next week, and start to convert ebuilds to use it
33 afterwards ...
34
35 Cheers,
36 ks
37
38 --
39 gentoo-dev@g.o mailing list