summaryrefslogtreecommitdiff
blob: f88fc6fbc6fb10e4bb6dae9beba528a99b56497c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

# ruby22 -> Does not compile
USE_RUBY="ruby19 ruby20"

inherit ruby-ng

DESCRIPTION="A TCP wrappers library for Ruby"
HOMEPAGE="http://raa.ruby-lang.org/list.rhtml?name=ruby-tcpwrap"
SRC_URI="http://shugo.net/archive/ruby-tcpwrap/${P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 ~hppa ~mips ~ppc x86"
IUSE=""

DEPEND+=" net-libs/libident
	sys-apps/tcp-wrappers"

RDEPEND+=" net-libs/libident
	sys-apps/tcp-wrappers"

RUBY_S="${PN}"
RUBY_PATCHES=( "${P}-ruby19.patch" )

each_ruby_configure() {
	${RUBY} extconf.rb || die "extconf.rb failed"
}

each_ruby_compile() {
	# We have injected --no-undefined in Ruby as a safety precaution
	# against broken ebuilds, but the Ruby-Gnome bindings
	# unfortunately rely on the lazy load of other extensions; see bug
	# #320545.
	find . -name Makefile -print0 | xargs -0 \
		sed -i -e 's:-Wl,--no-undefined ::' || die "--no-undefined removal failed"

	emake V=1
}

each_ruby_install() {
	emake DESTDIR="${D}" install V=1
}

all_ruby_install() {
	dodoc README*
	dohtml doc/*

	docinto sample
	dodoc sample/*
}