summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <hans@degraaff.org>2009-12-05 10:28:49 +0100
committerHans de Graaff <hans@degraaff.org>2009-12-05 10:28:49 +0100
commit37325afbe0b79b53ce3343988a885e35e2995198 (patch)
treef6e80fcb67b789e37300d99ffa42032000233d21
parentUse RUBY_PATCHES instead of PATCHES. (diff)
downloadruby-scripts-37325afbe0b79b53ce3343988a885e35e2995198.tar.gz
ruby-scripts-37325afbe0b79b53ce3343988a885e35e2995198.tar.bz2
ruby-scripts-37325afbe0b79b53ce3343988a885e35e2995198.zip
Make FILESDIR prefix optional in RUBY_PATCHES.
Copied from elisp.eclass.
-rw-r--r--ruby-ng-testbed/eclass/ruby-ng.eclass12
1 files changed, 10 insertions, 2 deletions
diff --git a/ruby-ng-testbed/eclass/ruby-ng.eclass b/ruby-ng-testbed/eclass/ruby-ng.eclass
index 74576a2..7267980 100644
--- a/ruby-ng-testbed/eclass/ruby-ng.eclass
+++ b/ruby-ng-testbed/eclass/ruby-ng.eclass
@@ -10,6 +10,8 @@
#
# Author: Alex Legler <a3li@gentoo.org>
#
+# Author: Hans de Graaff <graaff@gentoo.org>
+#
# @BLURB: An eclass for installing Ruby packages with proper support for multiple Ruby slots.
# @DESCRIPTION:
# The Ruby eclass is designed to allow an easier installation of Ruby packages
@@ -281,8 +283,14 @@ ruby-ng_src_unpack() {
}
_ruby_apply_patches() {
- for x in "${RUBY_PATCHES[@]}"; do
- epatch "${x}"
+ for patch in "${RUBY_PATCHES[@]}"; do
+ if [ -f "${patch}" ]; then
+ epatch "${patch}"
+ elif [ -f "${FILESDIR}/${patch}" ]; then
+ epatch "${FILESDIR}/${patch}"
+ else
+ die "Cannot find patch ${patch}"
+ fi
done
# This is a special case: instead of executing just in the special