This also removes the need for inheriting eutils in EAPI 6.
---
eclass/ruby-ng.eclass | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass
index cd6a5ae..bc42e66 100644
--- a/eclass/ruby-ng.eclass
+++ b/eclass/ruby-ng.eclass
@@ -73,7 +73,14 @@
# (e.g. selenium's firefox driver extension). When set this argument is
# passed to "grep -E" to remove reporting of these shared objects.
-inherit eutils java-utils-2 multilib toolchain-funcs ruby-utils
+local inherits=""
+case ${EAPI} in
+ 2|3|4|5)
+ inherits="eutils"
+ ;;
+esac
+
+inherit ${inherits} java-utils-2 multilib toolchain-funcs ruby-utils
EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test
src_install pkg_setup
@@ -400,13 +407,23 @@ ruby-ng_src_unpack() {
_ruby_apply_patches() {
for patch in "${RUBY_PATCHES[@]}"; do
+ local patch_file=""
if [ -f "${patch}" ]; then
- epatch "${patch}"
+ patch_file="${patch}"
elif [ -f "${FILESDIR}/${patch}" ]; then
- epatch "${FILESDIR}/${patch}"
+ patch_file="${FILESDIR}/${patch}"
else
die "Cannot find patch ${patch}"
fi
+
+ case ${EAPI} in
+ 2|3|4|5)
+ epatch "${patch_file}"
+ ;;
+ 6)
+ eapply "${patch_file}"
+ ;;
+ esac
done
# This is a special case: instead of executing just in the special
--
2.10.2