Gentoo Archives: gentoo-user

From: Danny YUE <sheepduke@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Problem while writing ebuild
Date: Thu, 04 May 2017 15:12:41
Message-Id: 871ss4irnw.fsf@gmail.com
In Reply to: Re: [gentoo-user] Problem while writing ebuild by Nils Freydank
1 On 2017-05-04 10:53, Nils Freydank <nils.freydank@××××××.de> wrote:
2 > Am Donnerstag, 4. Mai 2017, 11:59:37 CEST schrieb Danny YUE:
3 >> Hi,
4 >>
5 >> As a noob in ebuild files, I got some problems while created my own
6 >> ebuild. I googled a lot but did not really find any clue.
7 >>
8 >> Let's say package A has features B and C. They are Github repositories
9 >> and A is the entry, while B and C are submodules.
10 >>
11 >> Now I want to make it three different packages respectively, and use USE
12 >> flags to control which to install just like texlive.
13 >>
14 >> 1) I know I can add USE `B' and `C' into `IUSE' variable, but if I run
15 >> `equery u A', those flags are listed but with an "<unknown>"
16 >> description. Where can I add some description information?
17 >
18 > In general, these descriptions are in XML files. Globally used flags (e.g. 'X'
19 > or 'python') are set in the portage profiles (search for ".desc" in the
20 > portage tree[1]). Flags used only by certain packages are in the ebuild dir in
21 > metadata.xml[2]. I suggest you take a look into www-client/firefox’s
22 > metadata.xml, because it uses even descriptions with line breaks. (Avoid the
23 > look into firefox’s ebuild, though :D)
24
25 That's really helpful. Now it shows the message I want.
26
27 >
28 >> 2) Only A has Github release URL, B and C by default should be fetched
29 >> via `git submodule...'. How am I supposed to fetch these packages in my
30 >> ebuild file? Download inside `src_unpack'?
31 >
32 > Sorry, I don’t know much about git submodule. Maybe there’s something useful
33 > in git-r3.eclass (eclass/git-r3.eclass).
34 >
35 >> Any help is appreciated. Thanks in advance.
36 >>
37 >>
38 >> Danny
39 >
40 > [1] find /usr/portage/ -iname "*desc"
41 > [2] find /usr/portage/ -iname "*metadata.xml"
42 >
43 > Nils
44 >
45 > PS: Great you write ebuilds - keep going on and suggest bugfixes for broken
46 > ebuilds later! :)
47
48 Thank you so much :-D
49
50 P.S. Well, riscv-tools is out there for too long..I am really surprised
51 that nobody ever wrote an ebuild for it...