www-client/google-chrome-beta: automated update (84.0.4147.30)
[gentoo.git] / dev-ruby / curb / curb-0.9.10.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="ruby24 ruby25 ruby26"
7
8 RUBY_FAKEGEM_RECIPE_TEST="rake"
9 RUBY_FAKEGEM_RECIPE_DOC="rdoc"
10
11 inherit ruby-fakegem
12
13 DESCRIPTION="Ruby-language bindings for libcurl"
14 HOMEPAGE="https://github.com/taf2/curb"
15
16 LICENSE="Ruby"
17 SLOT="0"
18 KEYWORDS="~amd64"
19 IUSE=""
20
21 DEPEND+=" net-misc/curl[ssl]"
22 RDEPEND+=" net-misc/curl[ssl]"
23
24 all_ruby_prepare() {
25         # fix tests when localhost is also ::1
26         sed -i -e 's|localhost:|127.0.0.1:|g' tests/*.rb || die
27
28         # avoid tests making outside network connections
29         rm tests/bug_postfields_crash.rb || die
30         sed -e '/test_easy_http_verbs_must_respond_to_str/,/^  end/ s:^:#:' \
31                 -i tests/tc_curl_easy.rb || die
32         sed -e '/test_connection_keepalive/aomit "network connection needed"' \
33                 -i tests/tc_curl_multi.rb || die
34
35         # avoid failing tests where failure condition seems weird, no
36         # upstream travis so not clear if the test is indeed broken.
37         sed -i -e '/test_multi_easy_http/,/^  end/ s:^:#:' tests/tc_curl_multi.rb || die
38 }
39
40 each_ruby_configure() {
41         ${RUBY} -Cext extconf.rb || die "extconf.rb failed"
42 }
43
44 each_ruby_compile() {
45         emake -Cext CFLAGS="${CFLAGS} -fPIC" archflags="${LDFLAGS}" V=1
46         cp -l ext/curb_core$(get_modname) lib || die
47 }