sys-libs/libsemanage: stablize 2.7
[gentoo.git] / dev-ruby / serialport / serialport-1.3.1.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 USE_RUBY="ruby20 ruby21 ruby22 ruby23"
7
8 RUBY_FAKEGEM_TASK_DOC=""
9 RUBY_FAKEGEM_TASK_TEST=""
10 RUBY_FAKEGEM_EXTRADOC="CHANGELOG README.md"
11
12 inherit multilib ruby-fakegem
13
14 DESCRIPTION="a library for serial port (rs232) access in ruby"
15 HOMEPAGE="http://rubyforge.org/projects/ruby-serialport/"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS="amd64 ~ppc x86"
20 IUSE=""
21
22 all_ruby_prepare() {
23         # Fix the miniterm script so that it might actually work, we'll
24         # install it as example.
25         sed -i -e 's:\.\./serialport.so:serialport:' test/miniterm.rb || die
26 }
27
28 each_ruby_configure() {
29         cd ext/native || die
30         ${RUBY} extconf.rb || die
31 }
32
33 each_ruby_compile() {
34         pushd ext/native &>/dev/null
35         emake V=1
36         popd &>/dev/null
37
38         # Avoids the need for a specific install phase
39         cp ext/native/*$(get_modname) lib/ || die "extension copy failed"
40 }
41
42 all_ruby_install() {
43         all_fakegem_install
44
45         # don't compress it
46         insinto /usr/share/doc/${PF}/examples
47         doins test/miniterm.rb
48 }