1 |
2011-06-27 22:57:05 Thomas Sachau napisaĆ(a): |
2 |
> Dirkjan Ochtman wrote: |
3 |
> > On Mon, Jun 27, 2011 at 15:08, Fabian Groffen <grobian@g.o> wrote: |
4 |
> >> On 27-06-2011 14:28:34 +0200, Dirkjan Ochtman wrote: |
5 |
> >> It would be nice when a similar technique could be implemented only |
6 |
> >> once, in a consistent way. In a way, multilib-portage can be considered |
7 |
> >> equal to one of the objectives of the python (and ruby) eclass: |
8 |
> >> multiple times compiling and installing for different ABIs. |
9 |
> > |
10 |
> > Yeah, but it'd be nice not to have to compile subversion three times |
11 |
> > just because we want the python bindings installed in three different |
12 |
> > Python environments. |
13 |
> |
14 |
> You wont be able to prevent this with a general solution, only with some specialized solution inside |
15 |
> the build, if you really want and need that. |
16 |
> Currently, if you want python bindings for three different python environments, you will have to |
17 |
> build everything for all three python environments, even if you only need a subset. |
18 |
|
19 |
Building everything for all Python ABIs is not required in case of majority of packages, which |
20 |
optionally install Python bindings. Makefiles of many packages (including dev-vcs/subversion) |
21 |
provide separate targets for building/installation of core libraries and various bindings. |
22 |
|
23 |
Example: |
24 |
|
25 |
src_compile() { |
26 |
emake || die |
27 |
|
28 |
if use python; then |
29 |
python_copy_sources bindings/python |
30 |
build_python_bindings() { |
31 |
emake \ |
32 |
PYTHON_INCLUDES="$(python_get_includedir)" \ |
33 |
PYTHON_SITE_PACKAGES="$(python_get_sitedir)" \ |
34 |
python_bindings |
35 |
} |
36 |
python_execute_function -s --source-dir bindings/python build_python_bindings |
37 |
fi |
38 |
} |
39 |
|
40 |
|
41 |
-- |
42 |
Arfrever Frehtes Taifersar Arahesis |