summaryrefslogtreecommitdiff
blob: a8e1c830058bcb36a23a51b0d09704ef42d691ef (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
51
52
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-ruby/redcloth/redcloth-4.2.2-r2.ebuild,v 1.3 2010/01/04 11:47:56 fauli Exp $

EAPI=2

# jruby → should be supported, but since we don't have the Ragel files
#         in the tarball, we cannot generate the Java files (also nt
#         in the tarball).
USE_RUBY="ruby18 ruby19"

RUBY_FAKEGEM_NAME="RedCloth"

RUBY_FAKEGEM_TASK_TEST="spec"
RUBY_FAKEGEM_TASK_DOC="docs"

RUBY_FAKEGEM_DOCDIR="doc"

RUBY_FAKEGEM_EXTRADOC="README CHANGELOG"

RUBY_FAKEGEM_REQUIRE_PATHS="lib/case_sensitive_require"

inherit ruby-fakegem

DESCRIPTION="A module for using Textile in Ruby"
HOMEPAGE="http://redcloth.org/"
SRC_URI="mirror://rubyforge/redcloth/${RUBY_FAKEGEM_NAME}-${PV}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
IUSE=""

S="${WORKDIR}/${RUBY_FAKEGEM_NAME}-${PV}"

# rspec is needed for the Rakefile to work if not patched; should
# probably be reported upstream to fix
ruby_add_bdepend '>=dev-ruby/echoe-3.0.1 dev-ruby/rspec'

ruby_add_bdepend test "dev-ruby/diff-lcs"

all_ruby_prepare() {
	sed -i \
		-e 's|Platform|Echoe::Platform|' \
		-e '/^# Ragel-generated/,/Optimization/ s:^:#:' \
		-e '/task :spec/s|, :compile||' \
		Rakefile || die "Rakefile fixes failed"
}

each_ruby_compile() {
	${RUBY} -S rake compile || die "build failed"
}