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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.18 - (show annotations) (download)
Sat Oct 27 18:15:08 2012 UTC (20 months, 3 weeks ago) by armin76
Branch: MAIN
Changes since 1.17: +3 -3 lines
s390/sh stable wrt #411507

(Portage version: 2.1.11.9/cvs/Linux x86_64)

1 # Copyright 1999-2012 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.6.ebuild,v 1.17 2011/09/14 17:16:37 jer Exp $
4
5 EAPI=2
6
7 USE_RUBY="ree18 ruby18 jruby"
8
9 RUBY_FAKEGEM_TASK_DOC=""
10 RUBY_FAKEGEM_EXTRADOC="README.en.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 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
21 IUSE=""
22
23 ruby_add_bdepend "dev-ruby/rake test? ( virtual/ruby-test-unit )"
24
25 all_ruby_prepare() {
26 # for Ruby 1.9.2 compatibility
27 sed -i -e '1i $: << "."' Rakefile || die
28
29 sed -i -e '/tasks\/email/s:^:#:' Rakefile || die "rakefile fix failed"
30 sed -i -e '/prerequisites/s:^:#:' tasks/test.rb || die "test task fix failed"
31 sed -i -e 's|/tmp/out|${TMPDIR:-/tmp}/out|' test/helper.rb || die "tests fix failed"
32
33 epatch "${FILESDIR}"/${P}-test-unit.patch
34 }
35
36 each_ruby_prepare() {
37 if [[ $(basename ${RUBY}) == "ruby18" ]]; then
38 sed -i -e 's:ruby/ruby.h:ruby.h:' \
39 ext/racc/cparse/cparse.c || die
40 fi
41 }
42
43 each_ruby_compile() {
44 case ${RUBY} in
45 *jruby)
46 einfo "Under JRuby, racc cannot use the shared object parser, so instead"
47 einfo "you have to rely on the pure Ruby implementation."
48 ;;
49 *)
50 ${RUBY} -S rake build || die "build failed"
51 # Copy over the file here so that we don't have to do
52 # special ruby install for JRuby and the other
53 # implementations.
54 cp -l ext/racc/cparse/cparse$(get_modname) lib/racc/cparse$(get_modname) || die
55 ;;
56 esac
57 }
58
59 each_ruby_test() {
60 case ${RUBY} in
61 *jruby)
62 ewarn "Using JRuby 1.5.2 the tests are currently badly broken,"
63 ewarn "so they are disabled until a new racc or a new JRuby is"
64 ewarn "released."
65 ;;
66 *)
67 each_fakegem_test
68 ;;
69 esac
70 }
71
72 all_ruby_install() {
73 all_fakegem_install
74
75 docinto examples
76 dodoc sample/* || die
77 }

  ViewVC Help
Powered by ViewVC 1.1.20