1 |
Hi, |
2 |
|
3 |
when talking to a colleague of mine (he's using Gentoo-Linux, and wants |
4 |
to use prefixed portage), an idea for the prefix-api came up: |
5 |
|
6 |
Currently, there's the PREFIX variable (among others) for the ebuilds. |
7 |
|
8 |
The idea is to substitute this with a bash-function, echoing a prefix. |
9 |
|
10 |
This function could be defined to get one argument, which is much like |
11 |
the same syntax as the *DEPEND settings, but only for a single package. |
12 |
If no argument, the current package is used. |
13 |
|
14 |
Yes, the current implementation would be simple: |
15 |
prefix() { |
16 |
echo $PREFIX |
17 |
} |
18 |
|
19 |
But the idea behind that is: |
20 |
|
21 |
Once portage could handle interdomain dependencies, the prefix-api need |
22 |
not to be changed to let ebuilds find the prefix of their dependencies. |
23 |
|
24 |
A sample ebuild-snippet: |
25 |
|
26 |
DEPEND="<my-dependency-2" |
27 |
|
28 |
econf-or-src_build() { |
29 |
.../configure \ |
30 |
--prefix=$(prefix) \ |
31 |
--with-my-dependency=$(prefix "<my-dependency-2") |
32 |
} |
33 |
|
34 |
Another possible feature in the future (not finished thinking about yet) |
35 |
could be to have portage install each (non-system-)package into a |
36 |
separate prefix within its domain, without need to change prefix-api. |
37 |
This could help ebuild-devs to detect unknown dependencies, which are |
38 |
not found implicitly if not specified at configure-line. |
39 |
Well - only for a testing system, and to be enabled explicitly |
40 |
by setting FEATURES. |
41 |
|
42 |
What do you think about this ? |
43 |
|
44 |
-haubi |
45 |
|
46 |
-- |
47 |
gentoo-osx@g.o mailing list |