dev-ruby/patron: add 0.8.0
[gentoo.git] / dev-ruby / patron / patron-0.5.1.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 USE_RUBY="ruby20 ruby21 ruby22 ruby23"
7
8 RUBY_FAKEGEM_RECIPE_TEST="rspec3"
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 ~ppc64 ~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 all_ruby_prepare() {
25         # Fix Rakefile
26         sed -i -e 's:rake/rdoctask:rdoc/task:' \
27                 -e 's/README.txt/README.md/' \
28                 -e '/bundler/I s:^:#:' \
29                 -e '/extensiontask/ s:^:#:' \
30                 -e '/ExtensionTask/,/^end/ s:^:#:' \
31                 Rakefile || die
32
33         # Avoid specs with failures. We were not running any specs before.
34         rm spec/session_ssl_spec.rb spec/session_spec.rb spec/response_spec.rb || die
35 }
36
37 each_ruby_configure() {
38         ${RUBY} -Cext/patron extconf.rb || die
39 }
40
41 each_ruby_compile() {
42         emake -Cext/patron V=1
43         cp ext/patron/session_ext$(get_modname) lib/patron/ || die "Unable to cp shared object file"
44 }