Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: maksbotan@g.o, 0xd34df00d@×××××.com
Subject: Re: [gentoo-dev] Re: RFC: leechcraft.eclass
Date: Fri, 22 Jul 2011 12:18:00
Message-Id: 20110722141753.43193bd8@pomiocik.lan
In Reply to: [gentoo-dev] Re: RFC: leechcraft.eclass by Maxim Koltsov
1 On Fri, 22 Jul 2011 14:57:08 +0400
2 Maxim Koltsov <maksbotan@g.o> wrote:
3
4 > Sorry, forgot the eclass. Attaching it here...
5 > P.S. Email of author: 0xd34df00d@×××××.com
6
7 Then you should CC him (like I did now).
8
9 > # Original author: 0xd34df00d <0xd34df00d@×××××.com> and
10 > # Andrian Nord <NightNord@××××××.ru>
11 >
12 > # Commiter: A.Vinogradov aka slepnoga <slep@××××××××××.lv>
13
14 Use eclassdoc.
15
16 > case ${EAPI:-0} in
17 > 4|3|2) ;;
18 > 0|1) die "EAPI not supported, bug ebuild mantainer" ;;
19 > *) die "Unknown EAPI, Bug eclass maintainers." ;;
20 > esac
21
22 Don't mix space and tab indent.
23
24 > if [[ "${PV}" == "9999" ]]; then
25
26 Needs not to be quoted.
27
28 > EGIT_PROJECT="leechcraft-${PV}"
29
30 What's the reasoning for this?
31
32 > KEYWORDS=""
33
34 Keywords must not be set by an eclass. Package managers will complain
35 about this.
36
37 > MY_P='leechcraft'
38
39 Usually, ${MY_P} stands for [alternate PN]-[PV]. MY_PN's what you're
40 referring to here.
41
42 > S="${WORKDIR}/${MY_P}-${PV}"
43
44 You seem not to be using ${MY_P} anywhere else. Just put
45 'leechcraft-${PV}' there then, don't pollute the environment.
46
47 > KEYWORDS="~amd64 ~x86"
48
49 As above, completely illegal.
50
51 > DEPEND="${DEPEND}
52 > !www-client/leechcraft"
53
54 What's this and why is that?
55
56 > SLOT="0"
57
58 SLOTs don't fit eclasses too, unless special use. Eclass is no excuse
59 to avoid declaring standard variables in ebuilds.
60
61 > # @FUNCTION:leechcraft_src_unpack
62 > # @DESCRIPTION:
63 > # Standart src_unpack live ebuild
64 >
65 > leechcraft_src_unpack() {
66 > git-2_src_unpack
67 >
68 > cd "${S}"
69 > }
70
71 What's the point of redeclaring this? Inheriting git-2 should do
72 the same, wouldn't it?
73
74 > # @FUNCTION: leechcraft_src_configure
75 > # @DESCRIPTION:
76 > # Use for configure leechcraft source.
77 > # Build_type is magic :)
78
79 That's not an useful description.
80
81 > # @FUNCTION: leechcraft_src_install
82 > # @DESCRIPTION:
83 > # Call cmake-utils_src_install :)
84 >
85 > leechcraft_src_install() {
86 > cmake-utils_src_install
87 > }
88
89 Once again, inheriting cmake-utils should do that.
90
91 --
92 Best regards,
93 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature