Gentoo Archives: gentoo-soc

From: Sebastian Parborg <darkdefende@×××××.com>
To: gentoo-soc@l.g.o
Subject: [gentoo-soc] Ebuild generator week 4 update
Date: Sat, 11 Jun 2011 17:39:51
Message-Id: BANLkTikXOTXCJpc0QLrML04BV335a3Z3Lw@mail.gmail.com
1 This week I've come really close to generate a actual ebuild for the
2 "doneyet" project.
3 So soon my ebuild generator will actually generate ebuild and not just
4 gather information about the packages.
5
6 I've managed to solve the problem I've had last week with how I should
7 store the information that I get from the makefiles. At first I
8 thought that it would be good to have a huge list with all the targets
9 -> dependencies linked so that it would have a tree structure. But
10 after I've made some prototypes I thought that it would be to
11 cumbersome so instead I create multiple lists with (kinda like the
12 structure in the makefile itself) so that I can link them when needed
13 and get access to all the deps and targets without having to search a
14 huge tree list.
15 To figure out what files I need to search for includes I look at the
16 first target list (they are ordered in the order they are in the
17 makefile), because it is the one that would be built when you just
18 type "make", and then search for any *.o targets and return all files
19 that the .o file target depends on.
20
21 This also caused me to implement the first "try catch exception" in my
22 program as files listed in the makefile might not exist. I didn't know
23 makefiles allowed this...
24 Anyhow, after that was done I implemented a .h file -> package
25 "converter" with the help of qfile. I will change this later as you
26 have to have all the deps for the program installed otherwise qfile is
27 useless.
28 Now I have begun working on the ebuild text output so I can finally
29 put the information to use.
30 I think I will make it to the deadline of my next milestone as I think
31 I'm quite close right now.
32
33 I would also like to have some input on a few things:
34 1. I would like my generator to be able to download the source archive
35 for the project so you don't have to fill out the URL in the
36 ebuildfile manually and for ease of use. But where should I download
37 the unpack the files? I first thought that I should do it like portage
38 and save the archive in distfile and unpack in where portage usually
39 does. However to do this you have to be root and I don't know if it's
40 a good idea or not.
41
42 2. How do I handle makefile projects that doesn't have an "install"
43 target? For the doneyet project you only need to installed the
44 compiled binary so I can just do "doexe" but I realize that you can't
45 take that for granted.
46
47 3. Should I look for RDEPEND deps?
48
49 Next week I plan to finish the "make, make install" project support,
50 but I need more projects to test things out on so I know that I
51 haven't overlooked anything! So if you have any "good and simple"
52 makefile project please post them here.