1 |
I am working on an ebuild for the sound editor snd |
2 |
<http://ccrma-www.stanford.edu/software/snd/>, and I have run into two |
3 |
issues: |
4 |
|
5 |
First, the default scripting language for snd is Guile. There is a |
6 |
configure-time option to use Ruby instead of Guile. If Ruby is |
7 |
enabled, Guile is no longer needed, but I am unclear as to the proper |
8 |
way to express this in a DEPEND declaration. |
9 |
|
10 |
My current approach is to use a shell variable at the top level of the |
11 |
ebuild: |
12 |
|
13 |
SND_SCRIPT_DEPEND=" ( dev-util/guile ) " |
14 |
use ruby && SND_SCRIPT_DEPEND=" ( dev-lang/ruby ) " |
15 |
|
16 |
...and then to include ${SND_SCRIPT_DEPEND} in the definition of |
17 |
DEPEND, but I am completely unsure whether this is considered best |
18 |
practice for ebuilds, or even whether it is allowed at all. |
19 |
|
20 |
The second issue appears to have been discussed on this list in May in |
21 |
a thread about USE variable priority, but I was unable to find a |
22 |
consensus. The approach taken by the xemacs-gamma maintainer seems to |
23 |
be closest to what I am currently doing, but still requires |
24 |
dependencies for all toolkits, even though only one is being used. |
25 |
This is probably not such a big deal in practice, as one could |
26 |
probably safely assume that if a user is bothering to define a USE |
27 |
variable for something, she would be very unlikely to be upset at |
28 |
having its core libraries installed. |
29 |
|
30 |
snd can use either motif or gtk+ as a GUI toolkit, and an inherent |
31 |
ambiguity develops if a user has both USE variables defined. I chose |
32 |
motif as the default, as the upstream author indicates in the |
33 |
configure instructions that the motif port is considerably more robust |
34 |
than the gtk one. So I did this: |
35 |
|
36 |
SND_WIDGET_DEPEND="" |
37 |
use gtk && SND_WIDGET_DEPEND=" ( x11-libs/gtk+ ) " |
38 |
use motif && SND_WIDGET_DEPEND=" ( x11-libs/openmotif ) " |
39 |
|
40 |
...and so here's a partial definition of DEPEND: |
41 |
|
42 |
DEPEND="virtual/glibc |
43 |
${SND_WIDGET_DEPEND} |
44 |
${SND_SCRIPT_DEPEND}" |
45 |
|
46 |
I'm not terribly happy about the namespace pollution, and can't escape |
47 |
the nagging suspicion that I am breaking a core ebuild rule (or |
48 |
several?), and would appreciate advice. |
49 |
|
50 |
-- |
51 |
Robert Coie <rac@××××××××××.jp> |
52 |
Implementor, Apropos Ltd. |