diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-07-29 09:38:09 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-07-29 09:38:09 +0000 |
commit | 699dd2e50ad6a6ab48b4b913d19f07f9730e3d2b (patch) | |
tree | 5dd21c631e21b34a428932f1e8464553c6270481 /eclass/ruby-fakegem.eclass | |
parent | Remove Ruby 1.9 and REE18 support from 4.2.3 so we can ask stable; add new re... (diff) | |
download | historical-699dd2e50ad6a6ab48b4b913d19f07f9730e3d2b.tar.gz historical-699dd2e50ad6a6ab48b4b913d19f07f9730e3d2b.tar.bz2 historical-699dd2e50ad6a6ab48b4b913d19f07f9730e3d2b.zip |
When unpacking, don't unpack patch files.
Since we can declare the patches as an array in global scope, _but_ we
cannot use $WORKDIR in there (they are not extracted in proper
$WORKDIR but rather $WORKDIR/all, then copied/hardlinked for the
various implementations), there is no point into unpacking them when
using .bz2.
Rather, leave it to epatch to deal with them and for the rest of the time.
Diffstat (limited to 'eclass/ruby-fakegem.eclass')
-rw-r--r-- | eclass/ruby-fakegem.eclass | 55 |
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 } |