Gentoo Archives: gentoo-dev

From: Hans de Graaff <graaff@g.o>
To: gentoo-dev@l.g.o
Cc: Hans de Graaff <graaff@g.o>
Subject: [gentoo-dev] [PATCH 2/3] ruby-ng.eclass: Use eapply for RUBY_PATCHES in EAPI 6
Date: Sun, 19 Feb 2017 08:04:16
Message-Id: 20170219080308.6965-2-graaff@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/3] ruby-ng.eclass: add support for EAPI=6 by Hans de Graaff
1 This also removes the need for inheriting eutils in EAPI 6.
2 ---
3 eclass/ruby-ng.eclass | 23 ++++++++++++++++++++---
4 1 file changed, 20 insertions(+), 3 deletions(-)
5
6 diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass
7 index cd6a5ae..bc42e66 100644
8 --- a/eclass/ruby-ng.eclass
9 +++ b/eclass/ruby-ng.eclass
10 @@ -73,7 +73,14 @@
11 # (e.g. selenium's firefox driver extension). When set this argument is
12 # passed to "grep -E" to remove reporting of these shared objects.
13
14 -inherit eutils java-utils-2 multilib toolchain-funcs ruby-utils
15 +local inherits=""
16 +case ${EAPI} in
17 + 2|3|4|5)
18 + inherits="eutils"
19 + ;;
20 +esac
21 +
22 +inherit ${inherits} java-utils-2 multilib toolchain-funcs ruby-utils
23
24 EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_setup
25
26 @@ -400,13 +407,23 @@ ruby-ng_src_unpack() {
27
28 _ruby_apply_patches() {
29 for patch in "${RUBY_PATCHES[@]}"; do
30 + local patch_file=""
31 if [ -f "${patch}" ]; then
32 - epatch "${patch}"
33 + patch_file="${patch}"
34 elif [ -f "${FILESDIR}/${patch}" ]; then
35 - epatch "${FILESDIR}/${patch}"
36 + patch_file="${FILESDIR}/${patch}"
37 else
38 die "Cannot find patch ${patch}"
39 fi
40 +
41 + case ${EAPI} in
42 + 2|3|4|5)
43 + epatch "${patch_file}"
44 + ;;
45 + 6)
46 + eapply "${patch_file}"
47 + ;;
48 + esac
49 done
50
51 # This is a special case: instead of executing just in the special
52 --
53 2.10.2

Replies