/[gentoo-x86]/dev-ruby/parsetree/parsetree-3.0.9.ebuild
Gentoo

Contents of /dev-ruby/parsetree/parsetree-3.0.9.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sun Sep 9 17:43:03 2012 UTC (23 months, 1 week ago) by graaff
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Cleanup.

(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/parsetree/parsetree-3.0.9.ebuild,v 1.2 2012/08/16 03:59:53 flameeyes Exp $
4
5 EAPI=4
6
7 USE_RUBY="ruby18 ree18"
8
9 RUBY_FAKEGEM_NAME="ParseTree"
10
11 RUBY_FAKEGEM_TASK_DOC="docs"
12 RUBY_FAKEGEM_DOCDIR="doc"
13 RUBY_FAKEGEM_EXTRADOC="README.txt History.txt"
14
15 inherit multilib ruby-fakegem
16
17 DESCRIPTION="ParseTree extracts the parse tree for a Class or method and returns it as a s-expression."
18 HOMEPAGE="http://www.zenspider.com/ZSS/Products/ParseTree/"
19
20 LICENSE="GPL-2"
21 SLOT="0"
22 KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
23 IUSE=""
24
25 ruby_add_rdepend '
26 >=dev-ruby/RubyInline-3.10.0
27 >=dev-ruby/sexp_processor-3.0.0'
28 ruby_add_bdepend "
29 test? (
30 dev-ruby/hoe
31 dev-ruby/hoe-seattlerb
32 dev-ruby/minitest
33 dev-ruby/ruby2ruby
34 )
35 doc? (
36 dev-ruby/hoe
37 dev-ruby/hoe-seattlerb
38 )"
39
40 all_ruby_prepare() {
41 # Fix USE=doc by removing the path that triggers running the tests
42 # and thus building the extensions in the wrong way.
43 sed -i -e '/require_paths/d' Rakefile || die
44
45 }
46
47 each_ruby_prepare() {
48 # RubyInline employs a very stupid caching strategy solely based on
49 # the public signatures of methods. Never mind bugs within the C
50 # code... We add a dynamic method name to the parsetree interface
51 # just so that we can guarantee compilation. Fixes #329497.
52 epatch "${FILESDIR}/${PN}-3.0.6-timestamp.patch"
53 sed -i -e "s/TIMESTAMP/$(date +%s)/" lib/parse_tree.rb || die
54 }
55
56 src_compile() {
57 chmod 0755 "${HOME}" || die "Failed to fix permissions on home"
58 ruby-ng_src_compile
59 }
60
61 each_ruby_compile() {
62 # The ruby extension uses RubyInline to use C code within Ruby;
63 # since it causes us no little pain, we'll do our best here to
64 # prebuild the extensions.
65
66 INLINEDIR="${PWD}" ${RUBY} -Ilib -rparse_tree -e '' || die "Unable to load ${PN}"
67
68 mkdir lib/inline
69 cp .ruby_inline/*/*$(get_modname) lib/inline/ || die
70 }
71
72 src_test() {
73 chmod 0755 "${HOME}" || die "Failed to fix permissions on home"
74 ruby-ng_src_test
75 }
76
77 pkg_postinst() {
78 elog "${CATEGORY}/${PN} uses the RubyInline library to build its parser."
79 elog "RubyInline builds loadable extensions at runtime in your home"
80 elog "directory if they are not supplied by the gems."
81 elog ""
82 elog "We are currently providing you with pre-built extensions for"
83 elog "the Ruby implementations you're using. Unfortunately these are"
84 elog "different from version to version, so you might have to"
85 elog "rebuild ${CATEGORY}/${PN} after each update to dev-lang/ruby or"
86 elog "dev-lang/ruby-enterprise."
87 }

  ViewVC Help
Powered by ViewVC 1.1.20