summaryrefslogtreecommitdiff
blob: 736ba4376d36cc3832e5d5e4bd9923126e3d8466 (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
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-ruby/locale/locale-2.0.5-r4.ebuild,v 1.2 2014/08/05 16:00:38 mrueg Exp $

EAPI=5

USE_RUBY="ruby19 ruby20 jruby"

RUBY_FAKEGEM_TASK_DOC="rerdoc"
RUBY_FAKEGEM_DOCDIR="doc"
RUBY_FAKEGEM_EXTRADOC="ChangeLog README.rdoc"

RUBY_FAKEGEM_TASK_TEST="test"

inherit ruby-fakegem

DESCRIPTION="A pure ruby library which provides basic APIs for localization"
HOMEPAGE="http://locale.rubyforge.org/"
LICENSE="|| ( Ruby GPL-2 )"

KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-macos"
SLOT="0"
IUSE=""

ruby_add_bdepend "test? ( dev-ruby/test-unit:2 )"

RUBY_PATCHES=( "${FILESDIR}/${PN}-language-fixes.patch" )

all_ruby_prepare() {
	# Avoid automagic dependency on allison, bug 334937
	sed -i -e '/allison/ s:^:#:' Rakefile || die

	sed -i -e 's:rake/rdoctask:rdoc/task:' \
		-e '/gempackagetask/d' \
		-e '/GemPackageTask/,/end/ d' Rakefile || die
}

each_ruby_prepare() {
	case ${RUBY} in
		*jruby)
			# Remove broken test. It's not clear if the test or code is
			# broken... https://github.com/mutoh/locale/issues/2
			rm test/test_detect_general.rb || die
			;;
		*)
			;;
	esac
}

all_ruby_install() {
	all_fakegem_install

	insinto /usr/share/doc/${PF}
	doins -r samples || die
}