1 |
hello, I've attached a cleaned up version of common-lisp.eclass. The |
2 |
purpose of this change is to remove dependency on |
3 |
dev-lisp/common-lisp-controller and to help reduce code duplication in |
4 |
ebuilds. |
5 |
|
6 |
I'll try to explain how CL packages work: |
7 |
|
8 |
1) a CL package installs exactly one directory under |
9 |
/usr/share/common-lisp/source. This is contained in the variable |
10 |
$CLPACKAGE and it defaults to $PN. Exception: app-emacs/slime installs a |
11 |
package named "swank" |
12 |
|
13 |
2) a CL package contains one or more ASDF files(.asd). The variable |
14 |
$CLSYSTEMS contains the names of those systems and defaults to $PN |
15 |
because in the simplest case there is only one .asd |
16 |
The .asd files usually are contained in the toplevel of the source |
17 |
directory and get symlinked into /usr/share/common-lisp/systems |
18 |
|
19 |
3) in order to find the systems, ASDF must be aware of the |
20 |
/usr/share/common-lisp/systems directory, which must be added to the |
21 |
list contained in the variable asdf:*central-registry*; |
22 |
dev-lisp/gentoo-init takes care of setting up everything for the user |
23 |
|
24 |
4) to load a system, one must start a Lisp and eval |
25 |
(asdf:oos 'asdf:load-op <system>) |
26 |
|
27 |
|
28 |
The eclass has three explicit "public" functions: |
29 |
|
30 |
1) common-lisp-install(): must receive at least one argument. It installs |
31 |
files or directories(recursively) into /usr/share/common-lisp/source |
32 |
|
33 |
2) common-lisp-system-symlink(): when called with no arguments, it |
34 |
installs the systems contained in $CLSYSTEMS. The system names must be |
35 |
relative paths. Example: CLSYSTEMS="foo1 foo2 src/bar" |
36 |
When called with some arguments, it installs those systems, ignoring |
37 |
$CLSYSTEMS |
38 |
|
39 |
3) do-debian-credits(): taken from common-lisp-common.eclass, since I've |
40 |
dropped the inheritance on it |
41 |
|
42 |
and an exported function, common-lisp_src_install, which is sufficient |
43 |
for a good share of CL packages in the tree |
44 |
|
45 |
|
46 |
if there are no objections, I'll commit the eclass next evening - Oct. 13 |
47 |
|
48 |
-- |
49 |
Stelian Ionescu a.k.a. fe[nl]ix |
50 |
Quidquid latine dictum sit, altum videtur. |