diff options
author | Hans de Graaff <graaff@gentoo.org> | 2013-10-15 19:36:36 +0000 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2013-10-15 19:36:36 +0000 |
commit | 2e20622450e7ed399c0ce4918e43052a4245dd61 (patch) | |
tree | 9b7a41cd5189e80903f6064abb7736e938e3fec3 | |
parent | Added missing || die. (diff) | |
download | gentoo-2-2e20622450e7ed399c0ce4918e43052a4245dd61.tar.gz gentoo-2-2e20622450e7ed399c0ce4918e43052a4245dd61.tar.bz2 gentoo-2-2e20622450e7ed399c0ce4918e43052a4245dd61.zip |
Drop ree18. Drop useless ruby-test-unit dependency. Add ruby20. Make compilation verbose.
(Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key 0x8883FA56A308A8D7!)
-rw-r--r-- | dev-ruby/hpricot/ChangeLog | 8 | ||||
-rw-r--r-- | dev-ruby/hpricot/hpricot-0.8.6-r2.ebuild | 70 |
2 files changed, 77 insertions, 1 deletions
diff --git a/dev-ruby/hpricot/ChangeLog b/dev-ruby/hpricot/ChangeLog index 49f4d5bbf33e..851177c88800 100644 --- a/dev-ruby/hpricot/ChangeLog +++ b/dev-ruby/hpricot/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-ruby/hpricot # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/hpricot/ChangeLog,v 1.45 2013/07/16 07:37:40 graaff Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/hpricot/ChangeLog,v 1.46 2013/10/15 19:36:36 graaff Exp $ + +*hpricot-0.8.6-r2 (15 Oct 2013) + + 15 Oct 2013; Hans de Graaff <graaff@gentoo.org> +hpricot-0.8.6-r2.ebuild: + Drop ree18. Drop useless ruby-test-unit dependency. Add ruby20. Make + compilation verbose. 16 Jul 2013; Hans de Graaff <graaff@gentoo.org> -hpricot-0.8.4.ebuild, -hpricot-0.8.6.ebuild: diff --git a/dev-ruby/hpricot/hpricot-0.8.6-r2.ebuild b/dev-ruby/hpricot/hpricot-0.8.6-r2.ebuild new file mode 100644 index 000000000000..ca390385371c --- /dev/null +++ b/dev-ruby/hpricot/hpricot-0.8.6-r2.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/hpricot/hpricot-0.8.6-r2.ebuild,v 1.1 2013/10/15 19:36:36 graaff Exp $ + +EAPI=5 + +USE_RUBY="ruby18 ruby19 ruby20 jruby" + +RUBY_FAKEGEM_DOCDIR="doc" +RUBY_FAKEGEM_EXTRADOC="CHANGELOG README.md" + +inherit ruby-fakegem eutils + +DESCRIPTION="A fast and liberal HTML parser for Ruby." +HOMEPAGE="http://wiki.github.com/hpricot/hpricot" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris" +IUSE="" + +ruby_add_bdepend "dev-ruby/rake + dev-ruby/rake-compiler" + +# dev-ruby/fast_xs does not cover JRuby so still bundle it here for now +USE_RUBY="${USE_RUBY/jruby/}" \ + ruby_add_rdepend "dev-ruby/fast_xs" + +# Probably needs the same jdk as JRuby but I'm not sure how to express +# that just yet. +DEPEND+=" + dev-util/ragel + ruby_targets_jruby? ( >=virtual/jdk-1.5 )" + +all_ruby_prepare() { + sed -i -e '/[Bb]undler/ s:^:#:' Rakefile || die + + # Fix encoding assumption of environment for Ruby 1.9. + # https://github.com/hpricot/hpricot/issues/52 + # sed -i -e '1 iEncoding.default_external=Encoding::UTF_8 if RUBY_VERSION =~ /1.9/' test/load_files.rb || die +} + +each_ruby_prepare() { + # dev-ruby/fast_xs does not cover JRuby so still bundle it here for now + [[ ${RUBY} == */jruby ]] && return + + pushd .. &>/dev/null + epatch "${FILESDIR}"/${P}-fast_xs.patch + popd .. &>/dev/null +} + +each_ruby_configure() { + # dev-ruby/fast_xs does not cover JRuby so still bundle it here for now + [[ ${RUBY} == */jruby ]] && return + + ${RUBY} -Cext/hpricot_scan extconf.rb || die "hpricot_scan/extconf.rb failed" +} + +each_ruby_compile() { + local modname=$(get_modname) + + # dev-ruby/fast_xs does not cover JRuby so still bundle it here for now + if [[ ${RUBY} == */jruby ]]; then + ${RUBY} -S rake compile_java || die "rake compile_java failed" + return + fi + + emake V=1 -Cext/hpricot_scan CFLAGS="${CFLAGS} -fPIC" archflag="${LDFLAGS}" || die "make hpricot_scan failed" + cp ext/hpricot_scan/hpricot_scan${modname} lib/ || die +} |