dev-ruby/unf: stable 0.1.4 for sparc, bug #628676
[gentoo.git] / dev-ruby / unf / unf-0.1.4.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 USE_RUBY="ruby21 ruby22 ruby23 ruby24"
7
8 RUBY_FAKEGEM_RECIPE_TEST="none"
9 RUBY_FAKEGEM_TASK_DOC=""
10 RUBY_FAKEGEM_EXTRADOC="README.md"
11
12 RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
13
14 inherit ruby-fakegem
15
16 DESCRIPTION="A wrapper library to bring Unicode Normalization Form support to Ruby/JRuby"
17 HOMEPAGE="https://github.com/knu/ruby-unf"
18
19 LICENSE="BSD-2"
20 SLOT="0"
21 KEYWORDS="~alpha amd64 ~arm ~arm64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
22 IUSE="test"
23
24 ruby_add_rdepend "dev-ruby/unf_ext"
25
26 ruby_add_bdepend "
27         test? (
28                 >=dev-ruby/test-unit-2.5.1-r1
29                 dev-ruby/shoulda
30         )"
31
32 all_ruby_prepare() {
33         sed -i -e '/bundler/,/end/ d' test/helper.rb || die
34
35         # Remove development dependencies; also remove platform as we don't
36         # care about it as it is, they only use it to avoid the unf_ext dep
37         # that we tackle on our own; finally remove git ls-files usage.
38         sed -i -e '/dependency.*\(shoulda\|bundler\|jeweler\|rcov\)/d' \
39                 -e '/platform/d' \
40                 -e '/git ls/d' \
41                 ${RUBY_FAKEGEM_GEMSPEC} || die
42 }
43
44 each_ruby_test() {
45         ruby-ng_testrb-2 test/test_*.rb
46 }