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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Jan 28 15:15:18 2013 UTC (19 months, 3 weeks ago) by aballier
Branch: MAIN
Changes since 1.1: +3 -3 lines
keyword ~amd64-fbsd

(Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key 160F534A)

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.9.ebuild,v 1.1 2012/12/01 15:47:29 graaff Exp $
4
5 EAPI=4
6
7 USE_RUBY="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 ~sparc ~x86 ~amd64-fbsd ~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 *ruby18)
44 sed -i -e '/test_norule_y/,/end/ s:^:#:' \
45 -e '/test_unterm_y/,/end/ s:^:#:' test/test_racc_command.rb || die
46 ${RUBY} -Cext/racc extconf.rb || die
47 ;;
48 *)
49 ${RUBY} -Cext/racc extconf.rb || die
50 ;;
51 esac
52 }
53
54 each_ruby_compile() {
55 case ${RUBY} in
56 *jruby)
57 einfo "Under JRuby, racc cannot use the shared object parser, so instead"
58 einfo "you have to rely on the pure Ruby implementation."
59 ;;
60 *)
61 emake -Cext/racc
62 # Copy over the file here so that we don't have to do
63 # special ruby install for JRuby and the other
64 # implementations.
65 cp -l ext/racc/cparse$(get_modname) lib/racc/cparse$(get_modname) || die
66 ;;
67 esac
68 }
69
70 each_ruby_test() {
71 case ${RUBY} in
72 *jruby)
73 ewarn "Using JRuby 1.5.2 the tests are currently badly broken,"
74 ewarn "so they are disabled until a new racc or a new JRuby is"
75 ewarn "released."
76 ;;
77 *)
78 each_fakegem_test
79 ;;
80 esac
81 }
82
83 all_ruby_install() {
84 all_fakegem_install
85
86 dodoc -r rdoc
87
88 docinto examples
89 dodoc -r sample
90 }

  ViewVC Help
Powered by ViewVC 1.1.20