Gentoo Archives: gentoo-dev

From: Thomas de Grenier de Latour <degrenier@×××××××××××.fr>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] src_configure
Date: Thu, 07 Jul 2005 02:36:23
Message-Id: 20050707043232.65154e40@eusebe
In Reply to: [gentoo-dev] src_configure by Sven Wegener
1 On Thu, 7 Jul 2005 02:04:04 +0200
2 Sven Wegener <swegener@g.o> wrote:
3
4 > We would like to split up src_compile. The new src_configure
5 > should just do the econf part and src_compile should do the
6 > emake part.
7
8 Just by curiosity, i've run a grep on the tree to count occurences
9 of "^[[:space:]]*econf" and "^[[:space:]]*\..*/configure" in
10 ebuilds. Here are the results (that's numbers of ebuilds, not
11 packages, grouped by the number of econf/configure they have):
12
13 1: 5736
14 2: 182
15 3: 12
16 4: 3
17 5: 2
18 7: 3
19
20 I would have thought this figures would be much worst, but that's
21 actually a few tenths of packages with 2 config calls, and only
22 ~10 with 3+.
23
24
25 Looking at some random ebuilds with 2+ econf/configure, it seems
26 that the most frequent pattern is something like that:
27 ====================================================
28 src_compile() {
29 econf || die
30 emake || die
31 if use foo ; then
32 cd "${S}/foo-plugin"
33 econf || die
34 emake || die
35 fi
36 }
37 ====================================================
38
39 Sure, spliting that will produce a bit of code duplication. It's
40 a bit less readable imho, but that's really just a cosmetic
41 issue:
42 ====================================================
43 src_configure() {
44 econf || die
45 if use foo ; then
46 cd "${S}/foo-plugin"
47 econf || die
48 fi
49 }
50
51 src_compile() {
52 emake || die
53 if use foo ; then
54 cd "${S}/foo-plugin"
55 emake || die
56 fi
57 }
58 ====================================================
59
60
61 I've also searched for some more problematic ebuilds, like some
62 which would configure & build the same source several times
63 (x11-libs/wxGTK maybe, also i'm not really sure) or some which
64 would first configure and build a libfoo/ subtree, and then
65 configure and build the main program (did not found any of that
66 kind, but i would not be surprised some exists).
67
68
69 If anyone want to have a look on my list to find some package
70 that may be problematic, it's here:
71 http://tdegreni.free.fr/gentoo/ebuilds_with_two_or_more_configure.list
72
73 (disclaimer: yup, keep in mind i've just done a quick grep on
74 the tree - this figures might not be completly meaningless, but
75 are for sure not accurate)
76
77 --
78 TGL.
79 --
80 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] src_configure "Robin H. Johnson" <robbat2@g.o>