Re: [gentoo-user] Problem while writing ebuild

2017-05-04 Thread Danny YUE

On 2017-05-04 10:53, Nils Freydank  wrote:
> Am Donnerstag, 4. Mai 2017, 11:59:37 CEST schrieb Danny YUE:
>> Hi,
>> 
>> As a noob in ebuild files, I got some problems while created my own
>> ebuild. I googled a lot but did not really find any clue.
>> 
>> Let's say package A has features B and C. They are Github repositories
>> and A is the entry, while B and C are submodules.
>> 
>> Now I want to make it three different packages respectively, and use USE
>> flags to control which to install just like texlive.
>> 
>> 1) I know I can add USE `B' and `C' into `IUSE' variable, but if I run
>> `equery u A', those flags are listed but with an ""
>> description. Where can I add some description information?
>
> In general, these descriptions are in XML files. Globally used flags (e.g. 
> 'X' 
> or 'python') are set in the portage profiles (search for ".desc" in the 
> portage tree[1]). Flags used only by certain packages are in the ebuild dir 
> in 
> metadata.xml[2]. I suggest you take a look into www-client/firefox’s 
> metadata.xml, because it uses even descriptions with line breaks. (Avoid the 
> look into firefox’s ebuild, though :D)

That's really helpful. Now it shows the message I want.

>
>> 2) Only A has Github release URL, B and C by default should be fetched
>> via `git submodule...'. How am I supposed to fetch these packages in my
>> ebuild file? Download inside `src_unpack'?
>
> Sorry, I don’t know much about git submodule. Maybe there’s something useful 
> in git-r3.eclass (eclass/git-r3.eclass).
>
>> Any help is appreciated. Thanks in advance.
>> 
>> 
>> Danny
>
> [1] find /usr/portage/ -iname "*desc"
> [2] find /usr/portage/ -iname "*metadata.xml"
>
> Nils
>
> PS: Great you write ebuilds - keep going on and suggest bugfixes for broken 
> ebuilds later! :)

Thank you so much :-D

P.S. Well, riscv-tools is out there for too long..I am really surprised
that nobody ever wrote an ebuild for it...



Re: [gentoo-user] Problem while writing ebuild

2017-05-04 Thread gentoo-user
On 17-05-04 at 17:59, Danny YUE wrote:
> Hi,
> 
> As a noob in ebuild files, I got some problems while created my own
> ebuild. I googled a lot but did not really find any clue.
If you have questions on ebuild files, checking [1] is probably the best
bet. Has generic information on ebuilds as well as specific information
regarding specific eclasses.

> Let's say package A has features B and C. They are Github repositories
> and A is the entry, while B and C are submodules.
> 
> Now I want to make it three different packages respectively, and use USE
> flags to control which to install just like texlive.
> 
[..]
> 
> 2) Only A has Github release URL, B and C by default should be fetched
> via `git submodule...'. How am I supposed to fetch these packages in my
> ebuild file? Download inside `src_unpack'?
git-r3.eclass has an EGIT_SUBMODULES array that you can populate
according to the use flags, but you'll probably have to specify the main
repo uri for A in both A, B, and C as the EGIT_REPO_URI and then just cd
to the submodule in the ebuild for B/C. See [2] for more information.

[1]: https://devmanual.gentoo.org/
[2]: https://devmanual.gentoo.org/eclass-reference/git-r3.eclass/index.html

-- 
Simon Thelen



Re: [gentoo-user] Problem while writing ebuild

2017-05-04 Thread Nils Freydank
Am Donnerstag, 4. Mai 2017, 11:59:37 CEST schrieb Danny YUE:
> Hi,
> 
> As a noob in ebuild files, I got some problems while created my own
> ebuild. I googled a lot but did not really find any clue.
> 
> Let's say package A has features B and C. They are Github repositories
> and A is the entry, while B and C are submodules.
> 
> Now I want to make it three different packages respectively, and use USE
> flags to control which to install just like texlive.
> 
> 1) I know I can add USE `B' and `C' into `IUSE' variable, but if I run
> `equery u A', those flags are listed but with an ""
> description. Where can I add some description information?

In general, these descriptions are in XML files. Globally used flags (e.g. 'X' 
or 'python') are set in the portage profiles (search for ".desc" in the 
portage tree[1]). Flags used only by certain packages are in the ebuild dir in 
metadata.xml[2]. I suggest you take a look into www-client/firefox’s 
metadata.xml, because it uses even descriptions with line breaks. (Avoid the 
look into firefox’s ebuild, though :D)

> 2) Only A has Github release URL, B and C by default should be fetched
> via `git submodule...'. How am I supposed to fetch these packages in my
> ebuild file? Download inside `src_unpack'?

Sorry, I don’t know much about git submodule. Maybe there’s something useful 
in git-r3.eclass (eclass/git-r3.eclass).
 
> Any help is appreciated. Thanks in advance.
> 
> 
> Danny

[1] find /usr/portage/ -iname "*desc"
[2] find /usr/portage/ -iname "*metadata.xml"

Nils

PS: Great you write ebuilds - keep going on and suggest bugfixes for broken 
ebuilds later! :)

-- 
GPG fingerprint: '00EF D31F 1B60 D5DB ADB8  31C1 C0EC E696 0E54 475B'
Nils Freydank

signature.asc
Description: This is a digitally signed message part.


[gentoo-user] Problem while writing ebuild

2017-05-04 Thread Danny YUE
Hi,

As a noob in ebuild files, I got some problems while created my own
ebuild. I googled a lot but did not really find any clue.

Let's say package A has features B and C. They are Github repositories
and A is the entry, while B and C are submodules.

Now I want to make it three different packages respectively, and use USE
flags to control which to install just like texlive.

1) I know I can add USE `B' and `C' into `IUSE' variable, but if I run
`equery u A', those flags are listed but with an ""
description. Where can I add some description information?

2) Only A has Github release URL, B and C by default should be fetched
via `git submodule...'. How am I supposed to fetch these packages in my
ebuild file? Download inside `src_unpack'?

Any help is appreciated. Thanks in advance.


Danny