Allow ebuilds to specify GEM_SRC. From Diego Pettenò <flameeyes@gmail.com>
authorRichard Brown <rbrown@gentoo.org>
Mon, 5 Mar 2007 18:26:20 +0000 (18:26 +0000)
committerRichard Brown <rbrown@gentoo.org>
Mon, 5 Mar 2007 18:26:20 +0000 (18:26 +0000)
eclass/gems.eclass

index 6d22506d08cbf749b72bddcc5fd8c8e4ad106423..0beb837329e468420ece8ef0b2f132edc58ed2a5 100644 (file)
@@ -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.16 2007/01/31 13:46:07 pclouds Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/gems.eclass,v 1.17 2007/03/05 18:26:20 rbrown Exp $
 #
 # Author: Rob Cakebread <pythonhead@gentoo.org>
 # Current Maintainer: Ruby Herd <ruby@gentoo.org>
@@ -45,10 +45,10 @@ gems_src_install() {
        gems_location
 
        if [ -z "${MY_P}" ]; then
-               GEM_SRC=${DISTDIR}/${P}
+               [ -z "${GEM_SRC}" ] && GEM_SRC=${DISTDIR}/${P}
                spec_path=${D}/${GEMSDIR}/specifications/${P}.gemspec
        else
-               GEM_SRC=${DISTDIR}/${MY_P}
+               [ -z "${GEM_SRC}" ] && GEM_SRC=${DISTDIR}/${MY_P}
                spec_path=${D}/${GEMSDIR}/specifications/${MY_P}.gemspec
        fi