summaryrefslogtreecommitdiff
blob: c1b2b792cfa98b4e4bcbe416ad81773f79011ecb (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-ruby/css_parser/css_parser-1.2.6.ebuild,v 1.1 2012/02/20 21:09:54 flameeyes Exp $

EAPI=4
USE_RUBY="ruby18 ruby19 ree18 jruby"

RUBY_FAKEGEM_TASK_DOC="rdoc"
RUBY_FAKEGEM_DOC_DIR="doc"
RUBY_FAKEGEM_EXTRADOC="README.rdoc"

RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"

GITHUB_USER="alexdunae"
GITHUB_PROJECT="${PN}"
RUBY_S="${GITHUB_USER}-${GITHUB_PROJECT}-*"

inherit ruby-fakegem

DESCRIPTION="Sass-based Stylesheet Framework"
HOMEPAGE="http://compass-style.org/"
LICENSE="MIT"

SRC_URI="https://github.com/${GITHUB_USER}/${GITHUB_PROJECT}/tarball/${PV} -> ${GITHUB_PROJECT}-${PV}.tar.gz"

SLOT="0"
KEYWORDS="~amd64"

ruby_add_rdepend "dev-ruby/addressable
	virtual/ruby-ssl"

all_ruby_prepare() {
	# fix wrong runtime dependency over rdoc
	sed -i -e '/rdoc/s:add_dep:add_development_dep:' "${RUBY_FAKEGEM_GEMSPEC}" || die

	# get rid of bundler usage
	rm Gemfile || die
	sed -i -e '/bundler/d' rakefile.rb || die
}

each_ruby_prepare() {
	if [[ ${RUBY} == */jruby ]]; then
		sed -i -e '/add_development_dependency/i s.add_dependency("jruby-openssl")' "${RUBY_FAKEGEM_GEMSPEC}" || die
	fi
}