summaryrefslogtreecommitdiff
blob: 7e76b4a9e49e0bb540f9c5be9ff79938887b0973 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-ruby/haml/haml-3.1.8-r2.ebuild,v 1.5 2014/08/15 14:01:04 blueness Exp $

EAPI=5

USE_RUBY="ruby19"

RUBY_FAKEGEM_TASK_TEST="test"
RUBY_FAKEGEM_TASK_DOC="-Ilib doc"

RUBY_FAKEGEM_EXTRADOC="CONTRIBUTING README.md"
RUBY_FAKEGEM_DOCDIR="doc"

RUBY_FAKEGEM_EXTRAINSTALL="init.rb rails VERSION VERSION_NAME"

RUBY_FAKEGEM_BINWRAP=""

inherit ruby-fakegem

DESCRIPTION="HAML - a ruby web page templating engine"
HOMEPAGE="http://haml-lang.com/"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"

# TODO: haml has some emacs modes that it could be installing, in case
IUSE=""

#RESTRICT="test"

ruby_add_rdepend "dev-ruby/sass"

# It could use merb during testing as well, but it's not mandatory
# ruby_add_bdepend "
# 	test? (
# 		dev-ruby/minitest
# 		dev-ruby/hpricot
# 		dev-ruby/erubis
# 		dev-ruby/rails
# 		dev-ruby/ruby_parser
# 		>=dev-ruby/sass-3.2.0
# 	)"
ruby_add_bdepend "doc? (
		dev-ruby/yard
		dev-ruby/maruku
		dev-ruby/sass
	)"

all_ruby_prepare() {
	# unbundle sass; remove dependency over fssm and add one over sass
	# itself.
	rm -r vendor/ || die

	pushd .. &>/dev/null
	epatch "${FILESDIR}"/${PN}-3.1.6-sass.patch
	sed -i \
		-e '/vendor\//d' \
		metadata || die
	popd &>/dev/null

	# Use newer sass and update specs to make a consistent combination.
	sed -i -e 's/fuchsia/magenta/' test/haml/results/filters.xhtml || die
}