dev-ruby/bson: Remove ruby19
[gentoo.git] / dev-ruby / bson / bson-3.2.6.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"
7
8 RUBY_FAKEGEM_RECIPE_TEST="rspec"
9
10 RUBY_FAKEGEM_RECIPE_DOC="rdoc"
11 RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md"
12
13 RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
14
15 GITHUB_USER="mongodb"
16 GITHUB_PROJECT="bson-ruby"
17
18 inherit multilib ruby-fakegem
19
20 DESCRIPTION="A Ruby BSON implementation for MongoDB. (Includes binary C-based extension.)"
21 HOMEPAGE="http://www.mongodb.org/"
22 SRC_URI="https://github.com/${GITHUB_USER}/${GITHUB_PROJECT}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
23 RUBY_S="bson-ruby-${PV}"
24
25 LICENSE="APSL-2"
26 SLOT="3"
27 KEYWORDS="~amd64"
28 IUSE="test doc"
29
30 all_ruby_prepare() {
31         # Remove bundler support
32         sed -i -e '/bundler/I s:^:#:' Rakefile || die
33
34         # Remove project-specific rspec options
35         rm .rspec || die
36 }
37
38 each_ruby_configure() {
39         ${RUBY} -C ext/bson extconf.rb || die "extconf.rb failed"
40 }
41
42 each_ruby_compile() {
43         emake -C ext/bson V=1 CFLAGS="${CFLAGS} -fPIC" archflag="${LDFLAGS}"
44         cp ext/bson/*$(get_modname) lib/ || die
45 }