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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (show annotations) (download)
Tue Nov 6 16:54:47 2012 UTC (20 months, 3 weeks ago) by jer
Branch: MAIN
Changes since 1.12: +2 -2 lines
Stable for HPPA (bug #411507).

(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key A792A613)

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-r1.ebuild,v 1.12 2012/10/27 18:37:53 armin76 Exp $
4
5 EAPI=2
6
7 USE_RUBY="ree18 ruby18 ruby19 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 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-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 sed -i -e '/git ls-files/d' tasks/gem.rb || die
33
34 epatch "${FILESDIR}"/${P}-test-unit.patch
35 }
36
37 each_ruby_prepare() {
38 if [[ $(basename ${RUBY}) == "ruby18" ]]; then
39 sed -i -e 's:ruby/ruby.h:ruby.h:' \
40 ext/racc/cparse/cparse.c || die
41 fi
42 }
43
44 each_ruby_compile() {
45 case ${RUBY} in
46 *jruby)
47 einfo "Under JRuby, racc cannot use the shared object parser, so instead"
48 einfo "you have to rely on the pure Ruby implementation."
49 ;;
50 *)
51 ${RUBY} -S rake build || die "build failed"
52 # Copy over the file here so that we don't have to do
53 # special ruby install for JRuby and the other
54 # implementations.
55 cp -l ext/racc/cparse/cparse$(get_modname) lib/racc/cparse$(get_modname) || die
56 ;;
57 esac
58 }
59
60 each_ruby_test() {
61 case ${RUBY} in
62 *jruby)
63 ewarn "Using JRuby 1.5.2 the tests are currently badly broken,"
64 ewarn "so they are disabled until a new racc or a new JRuby is"
65 ewarn "released."
66 ;;
67 *)
68 each_fakegem_test
69 ;;
70 esac
71 }
72
73 all_ruby_install() {
74 all_fakegem_install
75
76 docinto examples
77 dodoc sample/* || die
78 }

  ViewVC Help
Powered by ViewVC 1.1.20