1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 USE_RUBY="ruby23 ruby24 ruby25 ruby26"
8 RUBY_FAKEGEM_RECIPE_TEST="rspec3"
9 RUBY_FAKEGEM_EXTRADOC="CHANGES.md README.md"
10 RUBY_FAKEGEM_NAME="cool.io"
12 RUBY_FAKEGEM_GEMSPEC="cool.io.gemspec"
14 inherit multilib ruby-fakegem
16 DESCRIPTION="A high performance event framework for Ruby which uses the libev C library"
17 HOMEPAGE="https://coolio.github.com/"
21 KEYWORDS="~amd64 ~x86"
24 # cool.io includes a bundled version of libev that is patched to work correctly with ruby.
26 ruby_add_rdepend ">=dev-ruby/iobuffer-1"
29 rm -r Gemfile* lib/.gitignore || die
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
35 # Avoid dependency on rake-compiler
36 sed -i -e '/extensiontask/ s:^:#:' \
37 -e '/ExtensionTask/,/^end/ s:^:#:' Rakefile || die
39 # Remove specs that require network connectivity
40 rm -f spec/dns_spec.rb || die
42 # Use one address consistently
43 sed -i -e 's/localhost/127.0.0.1/' spec/{udp_socket,tcp_server,iobuffer}_spec.rb || die
46 each_ruby_configure() {
47 pushd ext/cool.io || die
48 ${RUBY} extconf.rb || die
53 pushd ext/cool.io || die
56 cp ext/cool.io/cool.io_ext$(get_modname) lib/ || die