blob: 1465ebeabb96d219c303b69884da486645a5432a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# 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"
}
|