diff options
author | Hans de Graaff <graaff@gentoo.org> | 2010-12-18 09:50:08 +0000 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2010-12-18 09:50:08 +0000 |
commit | 872b21f83a6841f27d9dba0976cff0d3f98997c2 (patch) | |
tree | 2e05e5d7070e5cd4157b375e421c47fab598643b /eclass/ruby-fakegem.eclass | |
parent | x86 stable wrt bug #348542 (diff) | |
download | gentoo-2-872b21f83a6841f27d9dba0976cff0d3f98997c2.tar.gz gentoo-2-872b21f83a6841f27d9dba0976cff0d3f98997c2.tar.bz2 gentoo-2-872b21f83a6841f27d9dba0976cff0d3f98997c2.zip |
Depend directly on dev-ruby/rubygems again since we no longer have ruby targets providing rubygems themselves.
Diffstat (limited to 'eclass/ruby-fakegem.eclass')
-rw-r--r-- | eclass/ruby-fakegem.eclass | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass index 517d7ad6878b..8e4a75eddfca 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.24 2010/09/23 06:47:01 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.25 2010/12/18 09:50:08 graaff Exp $ # # @ECLASS: ruby-fakegem.eclass # @MAINTAINER: @@ -59,6 +59,11 @@ inherit ruby-ng # Extra require paths (beside lib) to add to the specification # RUBY_FAKEGEM_REQUIRE_PATHS="" +# @ECLASS-VARIABLE: RUBY_FAKEGEM_GEMSPEC +# @DESCRIPTION: +# Filename of .gemspec file to install instead of generating a generic one. +# RUBY_FAKEGEM_GEMSPEC="" + RUBY_FAKEGEM_NAME="${RUBY_FAKEGEM_NAME:-${PN}}" RUBY_FAKEGEM_VERSION="${RUBY_FAKEGEM_VERSION:-${PV/_pre/.pre}}" RUBY_FAKEGEM_SUFFIX="${RUBY_FAKEGEM_SUFFIX:-}" @@ -84,7 +89,7 @@ fi SRC_URI="mirror://rubygems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}${RUBY_FAKEGEM_SUFFIX:+-${RUBY_FAKEGEM_SUFFIX}}.gem" -ruby_add_rdepend virtual/rubygems +ruby_add_rdepend dev-ruby/rubygems # @FUNCTION: ruby_fakegem_gemsdir # @RETURN: Returns the gem data directory @@ -135,6 +140,22 @@ ruby_fakegem_newins() { ) || die "failed $0 $@" } +# @FUNCTION: ruby_fakegem_gemspec +# @DESCRIPTION: +# Install a .gemspec file for this package. Either use the file indicated +# by the RUBY_FAKEGEM_GEMSPEC variable, or generate one using +# ruby_fakegem_genspec +ruby_fakegem_gemspec() { + if [[ ${RUBY_FAKEGEM_GEMSPEC} != "" ]]; then + ( + insinto $(ruby_fakegem_gemsdir)/specifications + newins "${RUBY_FAKEGEM_GEMSPEC}" ${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}.gemspec + ) || die "Unable to install ${RUBY_FAKEGEM_GEMSPEC} gemspec" + else + ruby_fakegem_genspec + fi +} + # @FUNCTION: ruby_fakegem_genspec # @DESCRIPTION: # Generates a gemspec for the package and places it into the "specifications" @@ -156,7 +177,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.24 $ +# generated by ruby-fakegem.eclass $Revision: 1.25 $ Gem::Specification.new do |s| s.name = "${RUBY_FAKEGEM_NAME}" s.version = "${RUBY_FAKEGEM_VERSION}" @@ -210,7 +231,7 @@ ruby_fakegem_binwrapper() { #!${rubycmd} # This is a simplified version of the RubyGems wrapper # -# Generated by ruby-fakegem.eclass $Revision: 1.24 $ +# Generated by ruby-fakegem.eclass $Revision: 1.25 $ require 'rubygems' @@ -302,7 +323,7 @@ fi # @DESCRIPTION: # Install the package for each ruby target. each_fakegem_install() { - ruby_fakegem_genspec + ruby_fakegem_gemspec local _gemlibdirs="${RUBY_FAKEGEM_EXTRAINSTALL}" for directory in bin lib; do |