blob: 2ec5e94f27973c6d30dc7fc713326656decc701b (
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
66
67
68
69
70
71
72
73
74
|
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-ruby/i18n/i18n-0.4.2.ebuild,v 1.4 2011/01/23 08:40:38 graaff Exp $
EAPI=2
USE_RUBY="ruby18 jruby ree18"
# doc regeneration seem to need Jeweler, which is not currently
# available
RUBY_FAKEGEM_TASK_DOC=""
RUBY_FAKEGEM_EXTRADOC="README.textile CHANGELOG.textile"
inherit ruby-fakegem versionator
DESCRIPTION="Add Internationalization support to your Ruby application."
HOMEPAGE="http://rails-i18n.org/"
SRC_URI="http://github.com/svenfuchs/${PN}/tarball/v${PV} -> ${PN}-git-${PV}.tgz"
S="${WORKDIR}/svenfuchs-${PN}-*"
LICENSE="MIT"
SLOT="$(get_version_component_range 1-2)"
KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~ppc-macos ~x86-macos ~x64-solaris ~x86-solaris"
IUSE=""
DEPEND=""
RDEPEND="${DEPEND}"
# The testsuite uses the activerecord gem to run some tests; they
# require sqlite3-ruby, and that is not available on JRuby.
USE_RUBY="${USE_RUBY/jruby/}" \
ruby_add_bdepend "
test? (
dev-ruby/activerecord
dev-ruby/sqlite3-ruby
dev-ruby/ruby2ruby
)"
# mocha is optionally used by the testsuite, try to increase coverage
# of testing by depending on it.
#
# One further test dependency would be ruby-cldr
# (http://rubygems.org/gems/ruby-cldr) but we don't have it in tree
# yet.
ruby_add_bdepend "test? ( dev-ruby/mocha )"
all_ruby_prepare() {
sed -i '/bundler/d' test/test_setup/bundle.rb || die "Unable to remove Bundler support"
}
src_compile() {
# permissions need to be stricter for Ruby-Inline to work properly.
chmod 0755 "${HOME}" || die "Failed to fix permissions on home"
ruby-ng_src_compile
}
src_test() {
# permissions need to be stricter for Ruby-Inline to work properly.
chmod 0755 "${HOME}" || die "Failed to fix permissions on home"
ruby-ng_src_test
}
each_ruby_test() {
# Make sure the optional activerecord tests are not run for jruby
# because we don't ship a compatible sqlite3
case ${RUBY} in
*jruby)
;;
*)
each_fakegem_test
esac
}
|