Gentoo Archives: gentoo-soc

From: Fabian Groffen <grobian@g.o>
To: gentoo-soc@l.g.o
Subject: Re: [gentoo-soc] Ebuild generator week 10 update
Date: Mon, 25 Jul 2011 17:23:41
Message-Id: 20110725172316.GR9415@gentoo.org
In Reply to: [gentoo-soc] Ebuild generator week 10 update by darkdefende@gmail.com
1 On 25-07-2011 13:02:16 +0200, darkdefende@×××××.com wrote:
2 > Because I have the pfl stuff implemented I think I can extend the
3 > previous milestone that is autotools support. I hope I can say that I'm
4 > still on schedule because of that.
5 > If not autotools is a really essential feature for the ebuild generator
6 > so I will not drop that to work on other stuff as the ebuild generator
7 > would be quite useless then…
8 >
9 > Because GSoC is comming to an end soon I think I will first solve the
10 > autoconf problems that I'm having by trying to ignore/work around most
11 > of the problematic stuff so it can at least generate an ebuild for
12 > autotools projects. I really want to have atleast something working by
13 > the end of this GSoC so I think I'll do a basic solution first then
14 > improve it.
15
16 Hey,
17
18 Because you seem to be stuck here, I'll give you some of my thoughts.
19 First off, I'll start by saying that none of my ideas is 100%
20 water-proof for all cases, but they give some start, if not some handle
21 to have something going, quickly.
22
23 Starting with heuristics, I see that some grepping is going to result in
24 some information that we might be interested in here from configure.
25
26 % ./configure --help | grep -E -- '--(with|without)-'
27
28 This gives a list of --with/--without that already might give you a good
29 hint or two. "--with-gpgme[=PFX]" for example, probably needs a
30 USE=gpg. Assume you can map a fair bunch of names to packages.
31
32 % grep -E "checking for [^ ]+ in -l.+\.\.\." configure
33
34 This returns all libs that configure is checking for. If you can map
35 the libs on packages, you can match this with the optional list of
36 above, probably this is where USE-flags are necessary. Other libs (one
37 typically sees -lz in the list) probably need to be unconditional
38 dependencies.
39
40 % grep -E -- "FLAGS=.*-(I|L)" configure
41
42 What is returned usually is a big and ugly list. I doubt it is very
43 useful, but with some brute force case-insensitive grepping package
44 names may be found in variables or path names. The found packages can
45 be optional or mandatory. I expect a big overlap with the lib search
46 before.
47
48 I can imagine a pkg-config check (it's an autoconf macro
49 PKG_CHECK_EXISTS, see pkg-config(1)) to try and do something similar as
50 the previous grep.
51
52 I think largest problem here is to match what you find onto packages.
53 With some luck you can match a fair bit, though.
54
55 Hope this helps a bit,
56
57
58 --
59 Fabian Groffen
60 Gentoo on a different level