diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-05-08 10:31:40 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-05-08 10:31:40 +0000 |
commit | 8a3e176ce0e78cb76258d27fcb03756b23a4d496 (patch) | |
tree | 06001c026c9277c8d38a4bbf007122fda432c6e8 /dev-ruby/hpricot | |
parent | Temporarily mask mono-2.4-r1 for bug 265912. (diff) | |
download | gentoo-2-8a3e176ce0e78cb76258d27fcb03756b23a4d496.tar.gz gentoo-2-8a3e176ce0e78cb76258d27fcb03756b23a4d496.tar.bz2 gentoo-2-8a3e176ce0e78cb76258d27fcb03756b23a4d496.zip |
Version bump and use a fake spec instead of a gem.
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby/hpricot')
-rw-r--r-- | dev-ruby/hpricot/ChangeLog | 9 | ||||
-rw-r--r-- | dev-ruby/hpricot/hpricot-0.8.ebuild | 76 |
2 files changed, 83 insertions, 2 deletions
diff --git a/dev-ruby/hpricot/ChangeLog b/dev-ruby/hpricot/ChangeLog index f042debd7d46..d82ea36e2c38 100644 --- a/dev-ruby/hpricot/ChangeLog +++ b/dev-ruby/hpricot/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-ruby/hpricot -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/hpricot/ChangeLog,v 1.13 2008/12/29 15:54:27 graaff Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/hpricot/ChangeLog,v 1.14 2009/05/08 10:31:40 flameeyes Exp $ + +*hpricot-0.8 (08 May 2009) + + 08 May 2009; Diego E. Pettenò <flameeyes@gentoo.org> +hpricot-0.8.ebuild: + Version bump and use a fake spec instead of a gem. 29 Dec 2008; Hans de Graaff <graaff@gentoo.org> -hpricot-0.6.164.ebuild: Remove known to be broken version since we can't fix the gem easily. diff --git a/dev-ruby/hpricot/hpricot-0.8.ebuild b/dev-ruby/hpricot/hpricot-0.8.ebuild new file mode 100644 index 000000000000..4f3e85726ad9 --- /dev/null +++ b/dev-ruby/hpricot/hpricot-0.8.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/hpricot/hpricot-0.8.ebuild,v 1.1 2009/05/08 10:31:40 flameeyes Exp $ + +EAPI=2 + +inherit ruby + +GITHUB_USER=why + +USE_RUBY="ruby18" + +DESCRIPTION="A fast and liberal HTML parser for Ruby." +HOMEPAGE="http://code.whytheluckystiff.net/hpricot/" + +SRC_URI="http://github.com/${GITHUB_USER}/${PN}/tarball/${PV} -> ${P}.tgz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd" +IUSE="doc test" + +DEPEND="dev-util/ragel + dev-ruby/rake" +RDEPEND=">=dev-lang/ruby-1.8.4" + +dofakegemspec() { + cat - > "${T}"/${P}.gemspec <<EOF +Gem::Specification.new do |s| + s.name = "${PN}" + s.version = "${PV}" + s.summary = "${DESCRIPTION}" + s.homepage = "${HOMEPAGE}" +end +EOF + + insinto $(${RUBY} -r rbconfig -e 'print Config::CONFIG["vendorlibdir"]' | sed -e 's:vendor_ruby:gems:')/specifications + doins "${T}"/${P}.gemspec || die "Unable to install fake gemspec" +} + +src_compile() { + cd "${WORKDIR}"/${GITHUB_USER}-${PN}-* + + rake compile || die "rake failed" + + if use doc; then + rake rdoc || die "rake rdoc failed" + fi +} + +src_test() { + cd "${WORKDIR}"/${GITHUB_USER}-${PN}-* + + for ruby in $USE_RUBY; do + [[ -n `type -p $ruby` ]] || continue + $ruby $(type -p rake) test || die "testsuite failed" + done +} + +src_install() { + cd "${WORKDIR}"/${GITHUB_USER}-${PN}-* + + pushd lib + doruby -r *.rb hpricot || die "doruby failed" + exeinto $(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitearchdir"]') + doexe *.so || die "doruby failed" + popd + + if use doc; then + dohtml -r doc/* || die "dohtml failed" + fi + + dodoc CHANGELOG README || die "dodoc failed" + + dofakegemspec +} |