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

Diff of /eclass/ruby-fakegem.eclass

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

Revision 1.39 Revision 1.40
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 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-fakegem.eclass,v 1.39 2013/06/01 13:18:45 graaff Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.40 2013/11/09 10:22:06 graaff Exp $
4 4
5# @ECLASS: ruby-fakegem.eclass 5# @ECLASS: ruby-fakegem.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Ruby herd <ruby@gentoo.org> 7# Ruby herd <ruby@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
49# @ECLASS-VARIABLE: RUBY_FAKEGEM_RECIPE_DOC 49# @ECLASS-VARIABLE: RUBY_FAKEGEM_RECIPE_DOC
50# @DESCRIPTION: 50# @DESCRIPTION:
51# Specify one of the default API doc building function for ruby-fakegem: 51# Specify one of the default API doc building function for ruby-fakegem:
52# - rake (default; see also RUBY_FAKEGEM_TASK_DOC) 52# - rake (default; see also RUBY_FAKEGEM_TASK_DOC)
53# - rdoc (calls `rdoc-2`, adds dev-ruby/rdoc to the dependencies); 53# - rdoc (calls `rdoc-2`, adds dev-ruby/rdoc to the dependencies);
54# - yard (calls `yard`, adds dev-ruby/yard to the dependencies);
54# - none 55# - none
55# RUBY_FAKEGEM_RECIPE_DOC="rake" 56# RUBY_FAKEGEM_RECIPE_DOC="rake"
56 57
57# @ECLASS-VARIABLE: RUBY_FAKEGEM_DOCDIR 58# @ECLASS-VARIABLE: RUBY_FAKEGEM_DOCDIR
58# @DESCRIPTION: 59# @DESCRIPTION:
117 RUBY_FAKEGEM_DOCDIR="doc" 118 RUBY_FAKEGEM_DOCDIR="doc"
118 ;; 119 ;;
119 rdoc) 120 rdoc)
120 IUSE+=" doc" 121 IUSE+=" doc"
121 ruby_add_bdepend "doc? ( dev-ruby/rdoc )" 122 ruby_add_bdepend "doc? ( dev-ruby/rdoc )"
123 RUBY_FAKEGEM_DOCDIR="doc"
124 ;;
125 yard)
126 IUSE+="doc"
127 ruby_add_bdepend "doc? ( dev-ruby/yard )"
122 RUBY_FAKEGEM_DOCDIR="doc" 128 RUBY_FAKEGEM_DOCDIR="doc"
123 ;; 129 ;;
124 none) 130 none)
125 [[ -n ${RUBY_FAKEGEM_DOCDIR} ]] && IUSE+=" doc" 131 [[ -n ${RUBY_FAKEGEM_DOCDIR} ]] && IUSE+=" doc"
126 ;; 132 ;;
279 # copies with different implementations; while for now we're using 285 # copies with different implementations; while for now we're using
280 # the same exact content, we might have differences in the future, 286 # the same exact content, we might have differences in the future,
281 # so better taking this into consideration. 287 # so better taking this into consideration.
282 local quoted_description=${DESCRIPTION//\"/\\\"} 288 local quoted_description=${DESCRIPTION//\"/\\\"}
283 cat - > $1 <<EOF 289 cat - > $1 <<EOF
284# generated by ruby-fakegem.eclass $Revision: 1.39 $ 290# generated by ruby-fakegem.eclass $Revision: 1.40 $
285Gem::Specification.new do |s| 291Gem::Specification.new do |s|
286 s.name = "${RUBY_FAKEGEM_NAME}" 292 s.name = "${RUBY_FAKEGEM_NAME}"
287 s.version = "${RUBY_FAKEGEM_VERSION}" 293 s.version = "${RUBY_FAKEGEM_VERSION}"
288 s.summary = "${quoted_description}" 294 s.summary = "${quoted_description}"
289 s.homepage = "${HOMEPAGE}" 295 s.homepage = "${HOMEPAGE}"
329 335
330 cat - > "${T}"/gembin-wrapper-${gembinary} <<EOF 336 cat - > "${T}"/gembin-wrapper-${gembinary} <<EOF
331#!${rubycmd} 337#!${rubycmd}
332# This is a simplified version of the RubyGems wrapper 338# This is a simplified version of the RubyGems wrapper
333# 339#
334# Generated by ruby-fakegem.eclass $Revision: 1.39 $ 340# Generated by ruby-fakegem.eclass $Revision: 1.40 $
335 341
336require 'rubygems' 342require 'rubygems'
337 343
338load Gem::default_path[-1] + "/gems/${relativegembinary}" 344load Gem::default_path[-1] + "/gems/${relativegembinary}"
339 345
354 rake) 360 rake)
355 rake ${RUBY_FAKEGEM_TASK_DOC} || die "failed to (re)build documentation" 361 rake ${RUBY_FAKEGEM_TASK_DOC} || die "failed to (re)build documentation"
356 ;; 362 ;;
357 rdoc) 363 rdoc)
358 rdoc ${RUBY_FAKEGEM_DOC_SOURCES} || die "failed to (re)build documentation" 364 rdoc ${RUBY_FAKEGEM_DOC_SOURCES} || die "failed to (re)build documentation"
365 ;;
366 yard)
367 yard doc ${RUBY_FAKEGEM_DOC_SOURCES} || die "failed to (re)build documentation"
359 ;; 368 ;;
360 esac 369 esac
361 fi 370 fi
362} 371}
363 372

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40

  ViewVC Help
Powered by ViewVC 1.1.20