www-client/google-chrome-beta: automated update (84.0.4147.30)
[gentoo.git] / dev-ruby / patron / patron-0.13.3.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 USE_RUBY="ruby24 ruby25 ruby26 ruby27"
6
7 RUBY_FAKEGEM_RECIPE_TEST="rspec3"
8 RUBY_FAKEGEM_RECIPE_DOC="rdoc"
9 RUBY_FAKEGEM_EXTRADOC="README.md"
10
11 inherit multilib ruby-fakegem
12
13 DESCRIPTION="Patron is a Ruby HTTP client library based on libcurl"
14 HOMEPAGE="https://toland.github.com/patron/"
15
16 LICENSE="MIT"
17 SLOT="0"
18 KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
19 IUSE=""
20
21 DEPEND+=" net-misc/curl"
22 RDEPEND+=" net-misc/curl"
23
24 ruby_add_bdepend "test? ( dev-ruby/rack www-servers/puma )"
25
26 all_ruby_prepare() {
27         # Fix Rakefile
28         sed -i -e 's:rake/rdoctask:rdoc/task:' \
29                 -e 's/README.txt/README.md/' \
30                 -e '/bundler/I s:^:#:' \
31                 -e '/extensiontask/ s:^:#:' \
32                 -e '/ExtensionTask/,/^end/ s:^:#:' \
33                 Rakefile || die
34
35         # Avoid specs with failures. We were not running any specs before.
36         rm spec/session_ssl_spec.rb spec/session_spec.rb spec/response_spec.rb || die
37 }
38
39 each_ruby_configure() {
40         ${RUBY} -Cext/patron extconf.rb || die
41 }
42
43 each_ruby_compile() {
44         emake -Cext/patron V=1
45         cp ext/patron/session_ext$(get_modname) lib/patron/ || die "Unable to cp shared object file"
46 }