/[gentoo-x86]/dev-ruby/hpricot/hpricot-0.8.6-r1.ebuild
Gentoo

Contents of /dev-ruby/hpricot/hpricot-0.8.6-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Tue Jan 15 05:17:20 2013 UTC (20 months ago) by zerochaos
Branch: MAIN
Changes since 1.6: +3 -3 lines
adding ~arm keywords to net-analyzer/metasploit rdeps

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

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/hpricot/hpricot-0.8.6-r1.ebuild,v 1.6 2012/10/28 18:14:58 armin76 Exp $
4
5 EAPI=4
6
7 USE_RUBY="ruby18 ree18 ruby19 jruby"
8
9 RUBY_FAKEGEM_DOCDIR="doc"
10 RUBY_FAKEGEM_EXTRADOC="CHANGELOG README.md"
11
12 inherit ruby-fakegem eutils
13
14 DESCRIPTION="A fast and liberal HTML parser for Ruby."
15 HOMEPAGE="http://wiki.github.com/hpricot/hpricot"
16
17 LICENSE="MIT"
18 SLOT="0"
19 KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
20 IUSE=""
21
22 ruby_add_bdepend "dev-ruby/rake
23 dev-ruby/rake-compiler
24 test? ( virtual/ruby-test-unit )"
25
26 # dev-ruby/fast_xs does not cover JRuby so still bundle it here for now
27 USE_RUBY="${USE_RUBY/jruby/}" \
28 ruby_add_rdepend "dev-ruby/fast_xs"
29
30 # Probably needs the same jdk as JRuby but I'm not sure how to express
31 # that just yet.
32 DEPEND+="
33 dev-util/ragel
34 ruby_targets_jruby? ( >=virtual/jdk-1.5 )"
35
36 all_ruby_prepare() {
37 sed -i -e '/[Bb]undler/ s:^:#:' Rakefile || die
38
39 # Fix encoding assumption of environment for Ruby 1.9.
40 # https://github.com/hpricot/hpricot/issues/52
41 # sed -i -e '1 iEncoding.default_external=Encoding::UTF_8 if RUBY_VERSION =~ /1.9/' test/load_files.rb || die
42 }
43
44 each_ruby_prepare() {
45 # dev-ruby/fast_xs does not cover JRuby so still bundle it here for now
46 [[ ${RUBY} == */jruby ]] && return
47
48 pushd .. &>/dev/null
49 epatch "${FILESDIR}"/${P}-fast_xs.patch
50 popd .. &>/dev/null
51 }
52
53 each_ruby_configure() {
54 # dev-ruby/fast_xs does not cover JRuby so still bundle it here for now
55 [[ ${RUBY} == */jruby ]] && return
56
57 ${RUBY} -Cext/hpricot_scan extconf.rb || die "hpricot_scan/extconf.rb failed"
58 }
59
60 each_ruby_compile() {
61 local modname=$(get_modname)
62
63 # dev-ruby/fast_xs does not cover JRuby so still bundle it here for now
64 if [[ ${RUBY} == */jruby ]]; then
65 ${RUBY} -S rake compile_java || die "rake compile_java failed"
66 return
67 fi
68
69 emake -Cext/hpricot_scan CFLAGS="${CFLAGS} -fPIC" archflag="${LDFLAGS}" || die "make hpricot_scan failed"
70 cp ext/hpricot_scan/hpricot_scan${modname} lib/ || die
71 }

  ViewVC Help
Powered by ViewVC 1.1.20