1 |
On 01/25/16 14:18, Ulrich Mueller wrote: |
2 |
> See patch included below. I have kept the changes at the bare minimum |
3 |
> necessary to update this for EAPI 6. A major rewrite of the file may |
4 |
> be considered later. |
5 |
> |
6 |
> Ulrich |
7 |
> |
8 |
> |
9 |
> From 599ad94e1a2f2961e5ef0175bea01cd1b2eb96f7 Mon Sep 17 00:00:00 2001 |
10 |
> From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@g.o> |
11 |
> Date: Mon, 25 Jan 2016 20:01:26 +0100 |
12 |
> Subject: [PATCH] skel.ebuild: Update for EAPI 6. |
13 |
> |
14 |
> Put less emphasis on eutils and epatch; they will be used less often |
15 |
> with eapply being available in EAPI 6. |
16 |
> |
17 |
> Don't mention ancient EAPIs that are banned. |
18 |
That is of debatable utility if overlay generalized, your patch applies |
19 |
it overly generally. |
20 |
> |
21 |
> Don't mention einstall since it is banned. |
22 |
> --- |
23 |
> skel.ebuild | 27 +++++---------------------- |
24 |
> 1 file changed, 5 insertions(+), 22 deletions(-) |
25 |
> |
26 |
> diff --git a/skel.ebuild b/skel.ebuild |
27 |
> index d907f9b..0483b53 100644 |
28 |
> --- a/skel.ebuild |
29 |
> +++ b/skel.ebuild |
30 |
> @@ -12,22 +12,15 @@ |
31 |
> # generated to contain the correct data. |
32 |
> |
33 |
> # The EAPI variable tells the ebuild format in use. |
34 |
> -# Defaults to 0 if not specified. |
35 |
Removing that note is silly: you are removing factually accurate |
36 |
documentation in favor of literally nothing. While EAPI=0 is banned from |
37 |
the tree EAPI still defaults to 0; though some QA tools might, perhaps |
38 |
even should, issue a warning in that case. |
39 |
> # It is suggested that you use the latest EAPI approved by the Council. |
40 |
> # The PMS contains specifications for all EAPIs. Eclasses will test for this |
41 |
> -# variable if they need to use EAPI > 0 features. |
42 |
> -EAPI=5 |
43 |
> +# variable if they need to use features that are not universal in all EAPIs. |
44 |
> +EAPI=6 |
45 |
Any such "universal" features are, by definition, part of a subset of |
46 |
EAPI=0, calling such features "universal" is even arguably misleading. |
47 |
Better to document it as "Eclasses will test this variable if they |
48 |
require features specific to a given EAPI or subset of EAPIs, or if they |
49 |
provide different functionality under different EAPIs." |
50 |
> |
51 |
> -# inherit lists eclasses to inherit functions from. Almost all ebuilds should |
52 |
> -# inherit eutils, as a large amount of important functionality has been |
53 |
> -# moved there. For example, the epatch call mentioned below wont work |
54 |
> -# without the following line: |
55 |
> +# inherit lists eclasses to inherit functions from. For example, an ebuild |
56 |
> +# that needs the epatch function from eutils.eclass won't work without the |
57 |
> +# following line: |
58 |
> inherit eutils |
59 |
Trivially inaccurate, in a way that could be read as endorsing poor |
60 |
form, the ebuild would need a call to inherit which included eutils, it |
61 |
would not necessarily be the only eclass inherited from by means of that |
62 |
call. |
63 |
"For example, an ebuild that uses the epatch function from the eutils |
64 |
eclass would, at a minimum, need to inherit eutils, as in the following |
65 |
line:" |
66 |
> -# A well-used example of an eclass function that needs eutils is epatch. If |
67 |
> -# your source needs patches applied, it's suggested to put your patch in the |
68 |
> -# 'files' directory and use: |
69 |
> -# |
70 |
> -# epatch "${FILESDIR}"/patch-name-here |
71 |
> # |
72 |
> # eclasses tend to list descriptions of how to use their functions properly. |
73 |
> # take a look at /usr/portage/eclass/ for more examples. |
74 |
> @@ -111,7 +104,6 @@ RDEPEND="${DEPEND}" |
75 |
> |
76 |
> # The following src_configure function is implemented as default by portage, so |
77 |
> # you only need to call it if you need a different behaviour. |
78 |
> -# This function is available only in EAPI 2 and later. |
79 |
> #src_configure() { |
80 |
> # Most open-source packages use GNU autoconf for configuration. |
81 |
> # The default, quickest (and preferred) way of running configure is: |
82 |
> @@ -135,9 +127,6 @@ RDEPEND="${DEPEND}" |
83 |
> |
84 |
> # The following src_compile function is implemented as default by portage, so |
85 |
> # you only need to call it, if you need different behaviour. |
86 |
> -# For EAPI < 2 src_compile runs also commands currently present in |
87 |
> -# src_configure. Thus, if you're using an older EAPI, you need to copy them |
88 |
> -# to your src_compile and drop the src_configure function. |
89 |
> #src_compile() { |
90 |
> # emake (previously known as pmake) is a script that calls the |
91 |
> # standard GNU make with parallel building options for speedier |
92 |
> @@ -152,8 +141,6 @@ RDEPEND="${DEPEND}" |
93 |
> |
94 |
> # The following src_install function is implemented as default by portage, so |
95 |
> # you only need to call it, if you need different behaviour. |
96 |
> -# For EAPI < 4 src_install is just returing true, so you need to always specify |
97 |
> -# this function in older EAPIs. |
98 |
> #src_install() { |
99 |
> # You must *personally verify* that this trick doesn't install |
100 |
> # anything outside of DESTDIR; do this by reading and |
101 |
> @@ -178,8 +165,4 @@ RDEPEND="${DEPEND}" |
102 |
> # install |
103 |
> # Again, verify the Makefiles! We don't want anything falling |
104 |
> # outside of ${D}. |
105 |
> - |
106 |
> - # The portage shortcut to the above command is simply: |
107 |
> - # |
108 |
> - #einstall |
109 |
> #} |
110 |
> |