# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-ruby/tidy_table/tidy_table-0.0.5.ebuild,v 1.3 2009/06/13 07:18:00 graaff Exp $ inherit ruby DESCRIPTION="Tool to convert an array of struct into an HTML table." HOMEPAGE="http://seattlerb.rubyforge.org/${PN}/" SRC_URI="mirror://rubyforge/seattlerb/${P}.tgz" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="doc test" RDEPEND="" DEPEND="doc? ( dev-ruby/rake ) test? ( dev-ruby/rake dev-ruby/rspec )" USE_RUBY="ruby18 ruby19" src_compile() { if use doc; then rake docs || die "rake docs failed" fi } src_test() { for ruby in $USE_RUBY; do [[ -n `type -p $ruby` ]] || continue $ruby $(type -p rake) test || die "testsuite failed" done } src_install() { pushd lib doruby -r * || die "doruby failed" popd if use doc; then dohtml -r doc/* || die "dohtml failed" fi dodoc History.txt README.txt || die "dodoc failed" insinto $(${RUBY} -r rbconfig -e 'print Config::CONFIG["vendorlibdir"]' | sed -e 's:vendor_ruby:gems:')/specifications sed -e "s:@VERSION@:${PV}:" "${FILESDIR}"/${PN}.gemspec > "${T}"/${P}.gemspec doins "${T}"/${P}.gemspec || die "Unable to install fake gemspec" }