1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 USE_RUBY="ruby24 ruby25 ruby26"
8 RUBY_FAKEGEM_RECIPE_TEST="rake"
9 RUBY_FAKEGEM_RECIPE_DOC="rdoc"
13 DESCRIPTION="Ruby-language bindings for libcurl"
14 HOMEPAGE="https://github.com/taf2/curb"
21 DEPEND+=" net-misc/curl[ssl]"
22 RDEPEND+=" net-misc/curl[ssl]"
25 # fix tests when localhost is also ::1
26 sed -i -e 's|localhost:|127.0.0.1:|g' tests/*.rb || die
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
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
40 each_ruby_configure() {
41 ${RUBY} -Cext extconf.rb || die "extconf.rb failed"
45 emake -Cext CFLAGS="${CFLAGS} -fPIC" archflags="${LDFLAGS}" V=1
46 cp -l ext/curb_core$(get_modname) lib || die