/[gentoo-x86]/dev-ruby/racc/racc-1.4.8.ebuild
Gentoo

Contents of /dev-ruby/racc/racc-1.4.8.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Tue Jan 1 19:30:37 2013 UTC (20 months, 2 weeks ago) by armin76
Branch: MAIN
Changes since 1.11: +3 -3 lines
arm/s390/sh stable wrt #448296

(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key 0xF6AD3240)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-ruby/racc/racc-1.4.8.ebuild,v 1.11 2012/12/30 20:26:16 ago Exp $
4
5 EAPI=4
6
7 USE_RUBY="ree18 ruby18 ruby19 jruby"
8
9 RUBY_FAKEGEM_TASK_DOC="docs"
10 RUBY_FAKEGEM_EXTRADOC="README.rdoc README.ja.rdoc TODO ChangeLog"
11
12 inherit multilib ruby-fakegem
13
14 DESCRIPTION="A LALR(1) parser generator for Ruby"
15 HOMEPAGE="http://www.loveruby.net/en/racc.html"
16
17 LICENSE="LGPL-2.1"
18 SLOT="0"
19
20 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
21 IUSE="doc test"
22
23 ruby_add_bdepend "dev-ruby/rake
24 doc? ( dev-ruby/hoe )
25 test? ( dev-ruby/hoe )"
26
27 all_ruby_prepare() {
28 sed -i -e 's|/tmp/out|${TMPDIR:-/tmp}/out|' test/helper.rb || die "tests fix failed"
29
30 # Avoid depending on rake-compiler since we don't use it to compile
31 # the extension.
32 sed -i -e '/rake-compiler/ s:^:#:' -e '/extensiontask/ s:^:#:' Rakefile
33 sed -i -e '/ExtensionTask/,/^ end/ s:^:#:' Rakefile
34
35 # Avoid isolation since dependencies are not properly declared.
36 sed -i -e 's/, :isolate//' Rakefile || die
37 }
38
39 each_ruby_prepare() {
40 case ${RUBY} in
41 *jruby)
42 ;;
43 *)
44 ${RUBY} -Cext/racc extconf.rb || die
45 ;;
46 esac
47 }
48
49 each_ruby_compile() {
50 case ${RUBY} in
51 *jruby)
52 einfo "Under JRuby, racc cannot use the shared object parser, so instead"
53 einfo "you have to rely on the pure Ruby implementation."
54 ;;
55 *)
56 emake -Cext/racc
57 # Copy over the file here so that we don't have to do
58 # special ruby install for JRuby and the other
59 # implementations.
60 cp -l ext/racc/cparse$(get_modname) lib/racc/cparse$(get_modname) || die
61 ;;
62 esac
63 }
64
65 each_ruby_test() {
66 case ${RUBY} in
67 *jruby)
68 ewarn "Using JRuby 1.5.2 the tests are currently badly broken,"
69 ewarn "so they are disabled until a new racc or a new JRuby is"
70 ewarn "released."
71 ;;
72 *)
73 each_fakegem_test
74 ;;
75 esac
76 }
77
78 all_ruby_install() {
79 all_fakegem_install
80
81 dodoc -r rdoc
82
83 docinto examples
84 dodoc -r sample
85 }

  ViewVC Help
Powered by ViewVC 1.1.20