summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/ruby-fakegem.eclass')
-rw-r--r--eclass/ruby-fakegem.eclass55
1 files changed, 33 insertions, 22 deletions
diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass
index d5349c9220dd..e6cfa8b3956f 100644
--- a/eclass/ruby-fakegem.eclass
+++ b/eclass/ruby-fakegem.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.21 2010/07/27 11:02:47 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.22 2010/07/29 09:38:09 flameeyes Exp $
#
# @ECLASS: ruby-fakegem.eclass
# @MAINTAINER:
@@ -152,7 +152,7 @@ ruby_fakegem_genspec() {
# so better taking this into consideration.
local quoted_description=${DESCRIPTION//\"/\\\"}
cat - > "${T}"/${RUBY_FAKEGEM_NAME}-${_ruby_implementation} <<EOF
-# generated by ruby-fakegem.eclass $Revision: 1.21 $
+# generated by ruby-fakegem.eclass $Revision: 1.22 $
Gem::Specification.new do |s|
s.name = "${RUBY_FAKEGEM_NAME}"
s.version = "${RUBY_FAKEGEM_VERSION}"
@@ -206,7 +206,7 @@ ruby_fakegem_binwrapper() {
#!${rubycmd}
# This is a simplified version of the RubyGems wrapper
#
-# Generated by ruby-fakegem.eclass $Revision: 1.21 $
+# Generated by ruby-fakegem.eclass $Revision: 1.22 $
require 'rubygems'
@@ -237,25 +237,36 @@ all_ruby_unpack() {
# extracted twice and the mtime from the archive _has_ to be
# ignored (it's always set to epoch 0).
for archive in ${A}; do
- if [[ ${archive} == *.gem ]]; then
- # Make sure that we're not running unoack for more than
- # one .gem file, since we won't support that at all.
- [[ -d "${S}" ]] && die "Unable to unpack ${archive}, ${S} exists"
-
- ebegin "Unpacking .gem file..."
- tar -mxf ${DISTDIR}/${archive} || die
- eend $?
-
- mkdir "${S}"
- pushd "${S}" &>/dev/null
-
- ebegin "Unpacking data.tar.gz"
- tar -mxf "${my_WORKDIR}"/data.tar.gz || die
- eend $?
- popd &>/dev/null
- else
- unpack ${archive}
- fi
+ case "${archive}" in
+ *.gem)
+ # Make sure that we're not running unoack for more than
+ # one .gem file, since we won't support that at all.
+ [[ -d "${S}" ]] && die "Unable to unpack ${archive}, ${S} exists"
+
+ ebegin "Unpacking .gem file..."
+ tar -mxf ${DISTDIR}/${archive} || die
+ eend $?
+
+ mkdir "${S}"
+ pushd "${S}" &>/dev/null
+
+ ebegin "Unpacking data.tar.gz"
+ tar -mxf "${my_WORKDIR}"/data.tar.gz || die
+ eend $?
+ popd &>/dev/null
+ ;;
+ *.patch.bz2)
+ # We apply the patches with RUBY_PATCHES directly from DISTDIR,
+ # as the WORKDIR variable changes value between the global-scope
+ # and the time all_ruby_unpack/_prepare are called. Since we can
+ # simply decompress them when applying, this is much easier to
+ # deal with for us.
+ einfo "Keeping ${archive} as-is"
+ ;;
+ *)
+ unpack ${archive}
+ ;;
+ esac
done
}