chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] .meta needs on a per platform basis


From: felix winkelmann
Subject: Re: [Chicken-users] .meta needs on a per platform basis
Date: Tue, 9 Jan 2007 07:47:08 +0100

On 1/8/07, Kon Lovett <address@hidden> wrote:
>
> Would an extension of the needs clause like this be sufficient:
>
> needs = (needs EXTENSION-ID ...)
>            | (needs ((FEATURE-ID EXTENSION-ID ...) ...)
>
> i.e. like the body of a `cond-expand' form?

I think so. I use forms like this in my code (.scm & .setup):

#+unix ...
#+windows ...

& it works fine for me. The only problem being the different .egg
rqrmnts for platforms. (Another possibility is a "tool" that writes
stubs for all exported variables so every egg is "available" on every
platform.)


Hm... I'd prefer not to generate stubs.

Actually, I'd like to extend "needs" even more: every non-symbolic
requirement (extension-id) may alternatively be an expressions
that should return a list of extension-ids. That way we can use
`cond-expand' or even perform platform-specific tests whether
certain software is installed.

This opens up the possibilty for eggs containing 3rd-party libraries
(i.e. bb.meta contains a needs clause that checks fot an installed
fltk, if it isn't require an egg containing the fltk tarball and build
instructions).

The downside is that this may be a security problem: the code in
the needs clause will be executed by chicken-setup, even if the
user doesn't request an actual installation (which would run the .setup
script, which of course can do all sorts of things and may even be run
as root).


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]