Skip site navigation (1)Skip section navigation (2)
Date:      16 Feb 2003 10:44:04 +0100
From:      Henrik Motakef <henrik.motakef@web.de>
To:        freebsd-ports@FreeBSD.org
Subject:   RFC: Common Lisp ports
Message-ID:  <877kc0v9uj.fsf@interim.henrik-motakef.de>

next in thread | raw e-mail | index | archive | help
Hi,

I'd like to create ports for some Common Lisp libraries, and need some
feedback on the best way on how to do them right.

Some background: Currently, there are 3 working Lisp implementations
in the ports tree, lang/cmucl, lang/sbcl and lang/clisp. There is also
lang/gcl, but it's currently broken. There are other Lisps that work
on FreeBSD, so we should be prepared to have ports for them sometime.

(There are, of course, also ports for other dialects of Lisp,
esp. Scheme, Guile and Emacs Lisp. When I'm saying "Lisp" here, I'm
just talking about Common Lisp. Not meant as an offense to Schemers
etc.)

Lisp libraries are usually distributed as source code that one can
simply load into a running Lisp, but they can also be compiled. 
Compiled libraries are not portable across Lisp implementations. 
Additionally, some libraries don't work with every Lisp implementation.

The question is: How should I handle the fact that libraries can be
compiled for various Lisps?

I see three options:

1) One port for each Lisp, and one for the sources

   For example, one would have

   textproc/cl-ppcre
   textproc/cl-ppcre-cmucl
   textproc/cl-ppcre-sbcl
   textproc/cl-ppcre-clisp

   where "cl-ppcre" only installs the sources and is a dependency of
   the other, binary ports/packages.

   PRO: Would be easy to implement.
        Works nice for binary packages.
   CON: Clutters the ports tree with lots of ports.

2) Use WITH_* Makefile variables

   Only one port textproc/cl-ppcre, with some variables like 
   WITH_CMUCL/WITH_SBCL/WITH_CLISP, or a general 
   WITH_LISP="cmucl clisp", possibly initialized to all currently
   installed Lisps that work with the port.

   PRO: Can choose sane defaults based on installed Lisps.
        Can be configured with make.conf/pkgtools.conf.
   CON: Complicated to implement.
        One port may install radically different things, possibly
        making installing libraries that depend on the port a mess.

3) Adopt Debians common-lisp-controller

   Debian handles it's cl-* packages with a program suite called
   "common-lisp-controller". A package only puts the sources and a
   Makefile equivalent in a well-known directory and calls a program
   "register-common-lisp-source" that will compile
   them. Administrators can enable/disable compilation on a per
   package/per Lisp implementation basis. When the package gets
   deinstalled, "unregister-common-lisp-source" removes the binaries.

   More information: <http://www.cliki.net/common-lisp-controller>;

   PRO: Reuses a working system, probably easy to implement.
   CON: Have to port c-l-c first (shouldn't be too hard).
        Binaries are built on the user's computer, no binary packages.
        Binaries are built in-place, i.e. somewhere in /usr/local/lib,
        breaking the rule that "make build" should only write in
        $WRKDIR.
        Dunno if it's easy to register the compiled files so that e.g.
        pkg_info knows about them.
        Looks a little overengineered to me.

Any comments?

Thanks
Henrik


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?877kc0v9uj.fsf>