/[gentoo-x86]/eclass/ruby-ng.eclass
Gentoo

Diff of /eclass/ruby-ng.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.28 Revision 1.31
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.28 2010/09/10 13:03:39 flameeyes Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.31 2011/04/25 06:27:22 graaff Exp $
4# 4#
5# @ECLASS: ruby-ng.eclass 5# @ECLASS: ruby-ng.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Ruby herd <ruby@gentoo.org> 7# Ruby herd <ruby@gentoo.org>
8# 8#
46 46
47# @ECLASS-VARIABLE: RUBY_OPTIONAL 47# @ECLASS-VARIABLE: RUBY_OPTIONAL
48# @DESCRIPTION: 48# @DESCRIPTION:
49# Set the value to "yes" to make the dependency on a Ruby interpreter optional. 49# Set the value to "yes" to make the dependency on a Ruby interpreter optional.
50 50
51# @ECLASS-VARIABLE: RUBY_S
52# @DEFAULT_UNSET
53# @DESCRIPTION:
54# If defined this variable determines the source directory name after
55# unpacking. This defaults to the name of the package. Note that this
56# variable supports a wildcard mechanism to help with github tarballs
57# that contain the commit hash as part of the directory name.
58
51inherit eutils toolchain-funcs 59inherit eutils toolchain-funcs
52 60
53EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_setup 61EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_setup
54 62
55case ${EAPI} in 63case ${EAPI} in
56 0|1) 64 0|1)
57 die "Unsupported EAPI=${EAPI} (too old) for ruby-ng.eclass" ;; 65 die "Unsupported EAPI=${EAPI} (too old) for ruby-ng.eclass" ;;
58 2|3) ;; 66 2|3) ;;
67 4)
68 # S is no longer automatically assigned when it doesn't exist.
69 S="${WORKDIR}"
70 ;;
59 *) 71 *)
60 die "Unknown EAPI=${EAPI} for ruby-ng.eclass" 72 die "Unknown EAPI=${EAPI} for ruby-ng.eclass"
61esac 73esac
62 74
63# @FUNCTION: ruby_implementation_depend 75# @FUNCTION: ruby_implementation_depend
243 fi 255 fi
244done 256done
245 257
246_ruby_invoke_environment() { 258_ruby_invoke_environment() {
247 old_S=${S} 259 old_S=${S}
260 case ${EAPI} in
261 4)
262 sub_S=${RUBY_S}
263 ;;
264 *)
248 sub_S=${S#${WORKDIR}/} 265 sub_S=${S#${WORKDIR}/}
266 ;;
267 esac
249 268
250 # Special case, for the always-lovely GitHub fetches. With this, 269 # Special case, for the always-lovely GitHub fetches. With this,
251 # we allow the star glob to just expand to whatever directory it's 270 # we allow the star glob to just expand to whatever directory it's
252 # called. 271 # called.
253 if [[ ${sub_S} = *"*"* ]]; then 272 if [[ ${sub_S} = *"*"* ]]; then

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.31

  ViewVC Help
Powered by ViewVC 1.1.20