1 |
W dniu 19.02.2017, nie o godzinie 09∶03 +0100, użytkownik Hans de Graaff |
2 |
napisał: |
3 |
> This also removes the need for inheriting eutils in EAPI 6. |
4 |
> --- |
5 |
> eclass/ruby-ng.eclass | 23 ++++++++++++++++++++--- |
6 |
> 1 file changed, 20 insertions(+), 3 deletions(-) |
7 |
> |
8 |
> diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass |
9 |
> index cd6a5ae..bc42e66 100644 |
10 |
> --- a/eclass/ruby-ng.eclass |
11 |
> +++ b/eclass/ruby-ng.eclass |
12 |
> @@ -73,7 +73,14 @@ |
13 |
> # (e.g. selenium's firefox driver extension). When set this argument is |
14 |
> # passed to "grep -E" to remove reporting of these shared objects. |
15 |
> |
16 |
> -inherit eutils java-utils-2 multilib toolchain-funcs ruby-utils |
17 |
> +local inherits="" |
18 |
> +case ${EAPI} in |
19 |
> + 2|3|4|5) |
20 |
> + inherits="eutils" |
21 |
> + ;; |
22 |
> +esac |
23 |
> + |
24 |
> +inherit ${inherits} java-utils-2 multilib toolchain-funcs ruby-utils |
25 |
> |
26 |
> EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_setup |
27 |
> |
28 |
> @@ -400,13 +407,23 @@ ruby-ng_src_unpack() { |
29 |
> |
30 |
> _ruby_apply_patches() { |
31 |
> for patch in "${RUBY_PATCHES[@]}"; do |
32 |
> + local patch_file="" |
33 |
> if [ -f "${patch}" ]; then |
34 |
> - epatch "${patch}" |
35 |
> + patch_file="${patch}" |
36 |
> elif [ -f "${FILESDIR}/${patch}" ]; then |
37 |
> - epatch "${FILESDIR}/${patch}" |
38 |
> + patch_file="${FILESDIR}/${patch}" |
39 |
|
40 |
Wouldn't EAPI 6 be a good opportunity to kill this dualism and just |
41 |
require people to say FILESDIR explicitly? |
42 |
|
43 |
> else |
44 |
> die "Cannot find patch ${patch}" |
45 |
> fi |
46 |
> + |
47 |
> + case ${EAPI} in |
48 |
> + 2|3|4|5) |
49 |
> + epatch "${patch_file}" |
50 |
> + ;; |
51 |
> + 6) |
52 |
> + eapply "${patch_file}" |
53 |
> + ;; |
54 |
> + esac |
55 |
> done |
56 |
> |
57 |
> # This is a special case: instead of executing just in the special |
58 |
|
59 |
-- |
60 |
Best regards, |
61 |
Michał Górny |