summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJoshua Nichols <nichoj@gentoo.org>2008-01-16 05:52:20 +0000
committerJoshua Nichols <nichoj@gentoo.org>2008-01-16 05:52:20 +0000
commit34c28c350f722d85f24f8e60f4db98a2af39c8a9 (patch)
tree06f6ea60eb5f132573475aad111b7b968a91abcc /eclass
parentRemove vulnerable non-stable targets for #204760 (diff)
downloadhistorical-34c28c350f722d85f24f8e60f4db98a2af39c8a9.tar.gz
historical-34c28c350f722d85f24f8e60f4db98a2af39c8a9.tar.bz2
historical-34c28c350f722d85f24f8e60f4db98a2af39c8a9.zip
Updated rubygems dependency to be >= 0.9, in order to remove obsoleted workaround for gem not returning a proper exit code. This fixes bug #202688. Removed unneeded setting of S. Re-ordered src_* functions to be in order. Use long command line options for gem, to be more clear what it's doing.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/gems.eclass57
1 files changed, 20 insertions, 37 deletions
diff --git a/eclass/gems.eclass b/eclass/gems.eclass
index 1bc87573e375..25f4a0d0f7e1 100644
--- a/eclass/gems.eclass
+++ b/eclass/gems.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gems.eclass,v 1.19 2008/01/11 00:22:03 rbrown Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/gems.eclass,v 1.20 2008/01/16 05:52:20 nichoj Exp $
#
# Author: Rob Cakebread <pythonhead@gentoo.org>
# Current Maintainer: Ruby Herd <ruby@gentoo.org>
@@ -11,74 +11,61 @@
#
# - Features:
# gems_location() - Set ${GEMSDIR} with gem install dir and ${GEM_SRC} with path to gem to install
-# gems_src_install() - installs a gem into ${D}
# gems_src_unpack() - Does nothing.
# gems_src_compile() - Does nothing.
+# gems_src_install() - installs a gem into ${D}
#
# NOTE:
# See http://dev.gentoo.org/~pythonhead/ruby/gems.html for notes on using gems with portage
-inherit eutils ruby versionator
+inherit eutils ruby
SRC_URI="http://gems.rubyforge.org/gems/${P}.gem"
IUSE="doc"
-DEPEND=">=dev-ruby/rubygems-0.8.4-r1
+DEPEND=">=dev-ruby/rubygems-0.9.4
!dev-ruby/rdoc"
-S=${WORKDIR}
-
-
gems_location() {
local sitelibdir
- sitelibdir=`ruby -r rbconfig -e 'print Config::CONFIG["sitelibdir"]'`
+ sitelibdir=$(ruby -r rbconfig -e 'print Config::CONFIG["sitelibdir"]')
export GEMSDIR=${sitelibdir/site_ruby/gems}
}
gems_src_unpack() {
- #ruby_patch_mkmf
+ true
+}
+
+gems_src_compile() {
true
}
gems_src_install() {
gems_location
- if [ -z "${MY_P}" ]; then
- [ -z "${GEM_SRC}" ] && GEM_SRC=${DISTDIR}/${P}
- spec_path=${D}/${GEMSDIR}/specifications/${P}.gemspec
+ if [[ -z "${MY_P}" ]]; then
+ [[ -z "${GEM_SRC}" ]] && GEM_SRC="${DISTDIR}/${P}"
+ spec_path="${D}/${GEMSDIR}/specifications/${P}.gemspec"
else
- [ -z "${GEM_SRC}" ] && GEM_SRC=${DISTDIR}/${MY_P}
- spec_path=${D}/${GEMSDIR}/specifications/${MY_P}.gemspec
+ [[ -z "${GEM_SRC}" ]] && GEM_SRC="${DISTDIR}/${MY_P}"
+ spec_path="${D}/${GEMSDIR}/specifications/${MY_P}.gemspec"
fi
+ local myconf
if use doc; then
- myconf="--rdoc"
+ myconf="--rdoc --ri"
else
- myconf="--no-rdoc"
- fi
-
- # RI documentation installation: bug #145222
- if version_is_at_least "0.9" $(gem --version); then
- if use doc; then
- myconf="--ri ${myconf}"
- else
- myconf="--no-ri ${myconf}"
- fi
+ myconf="--no-rdoc --no-ri"
fi
dodir ${GEMSDIR}
- gem install ${GEM_SRC} -v ${PV} ${myconf} -l -i ${D}/${GEMSDIR} || die "gem install failed: gem-$(gem --version) install ${GEM_SRC} -v ${PV} ${myconf} -l -i ${D}/${GEMSDIR}"
+ gem install ${GEM_SRC} --version ${PV} ${myconf} \
+ --local --install-dir "${D}/${GEMSDIR}" || die "gem install failed"
- # This is a workaround for <=rubygems-0.9.0.8 because it's exitstatus equals 0
- # even if the dependencies are not found. So we are testing if rubygems at
- # least installed the gemspec (which should always occur otherwise).
- # See bug #104733
- test -f ${spec_path} || die "gem install failed (spec file ${spec_path} missing)"
-
- if [ -d ${D}/${GEMSDIR}/bin ] ; then
+ if [[ -d "${D}/${GEMSDIR}/bin" ]] ; then
exeinto /usr/bin
for exe in ${D}/${GEMSDIR}/bin/* ; do
doexe ${exe}
@@ -86,8 +73,4 @@ gems_src_install() {
fi
}
-gems_src_compile() {
- true
-}
-
EXPORT_FUNCTIONS src_unpack src_compile src_install