dev-python/zc-lockfile: keyworded 2.0 for ia64, bug #717946
[gentoo.git] / dev-ruby / coolio / coolio-1.5.4.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 USE_RUBY="ruby23 ruby24 ruby25 ruby26"
7
8 RUBY_FAKEGEM_RECIPE_TEST="rspec3"
9 RUBY_FAKEGEM_EXTRADOC="CHANGES.md README.md"
10 RUBY_FAKEGEM_NAME="cool.io"
11
12 RUBY_FAKEGEM_GEMSPEC="cool.io.gemspec"
13
14 inherit multilib ruby-fakegem
15
16 DESCRIPTION="A high performance event framework for Ruby which uses the libev C library"
17 HOMEPAGE="https://coolio.github.com/"
18
19 LICENSE="MIT"
20 SLOT="0"
21 KEYWORDS="~amd64 ~x86"
22 IUSE=""
23
24 # cool.io includes a bundled version of libev that is patched to work correctly with ruby.
25
26 ruby_add_rdepend ">=dev-ruby/iobuffer-1"
27
28 all_ruby_prepare() {
29         rm -r Gemfile* lib/.gitignore || die
30
31         sed -i -e '/[Bb]undler/d' Rakefile || die
32         sed -i -e '28i  s.add_dependency "iobuffer"' ${RUBY_FAKEGEM_GEMSPEC} || die
33         sed -i -e '/git ls-files/d' ${RUBY_FAKEGEM_GEMSPEC} || die
34
35         # Avoid dependency on rake-compiler
36         sed -i -e '/extensiontask/ s:^:#:' \
37                 -e '/ExtensionTask/,/^end/ s:^:#:' Rakefile || die
38
39         # Remove specs that require network connectivity
40         rm -f spec/dns_spec.rb || die
41
42         # Use one address consistently
43         sed -i -e 's/localhost/127.0.0.1/' spec/{udp_socket,tcp_server,iobuffer}_spec.rb || die
44 }
45
46 each_ruby_configure() {
47         pushd ext/cool.io || die
48         ${RUBY} extconf.rb || die
49         popd || die
50 }
51
52 each_ruby_compile() {
53         pushd ext/cool.io || die
54         emake V=1
55         popd || die
56         cp ext/cool.io/cool.io_ext$(get_modname) lib/ || die
57 }