Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: hasufell@g.o, python@g.o
Subject: [gentoo-dev] [PATCHES] multibuild.eclass: custom phase function helpers
Date: Sun, 10 Mar 2013 10:16:36
Message-Id: 20130310111644.0840d935@pomiocik.lan
1 Hello,
2
3 distutils-r1 (and previously python-distutils-ng) was using custom
4 phase functions for a while. Recently, hasufell added multilib-minimal
5 which does the same. Since in both cases the custom functions are
6 closely related to building multiple variants of the package, I'm
7 thinking of adding a few helper functions to the multibuild.eclass.
8
9 The framework I'm suggesting will make the custom phase functions
10 behave similarly to regular ones. Most importantly, eclasses will be
11 provided with a function to 'export' them.
12
13 I'm sending the following patches in reply to this thread:
14
15 1) introduces two functions to handle phases:
16
17 - multibuild_export_phases -- which exports the listed phases for
18 current eclass,
19 - multibuild_get_phase_function -- which finds and prints the best
20 handler for named phase.
21
22 The export/find logic follows one used for regular phases. If function
23 named ${phase} is declared, it is used. Otherwise, the function
24 exported by most recent eclass is used.
25
26
27 2) uses the new functions in distutils-r1,
28
29 3-4) general cleanup of multilib-minimal to make it suitable
30 for conversion,
31
32 5) uses the new functions in multilib-minimal,
33
34 6) runs multilib_src_configure() in parallel to save time,
35
36 7) makes autotools-multilib reuse multilib-minimal through exporting
37 sub-phase functions.
38
39
40 Comments? Questions?
41
42 --
43 Best regards,
44 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies