2015-05-18 14:22:11 +03:00
|
|
|
# Copyright 1999-2015 Gentoo Foundation
|
2014-07-20 11:56:16 +04:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
2015-08-10 23:59:40 +03:00
|
|
|
# $Id$
|
2014-07-20 11:56:16 +04:00
|
|
|
|
|
|
|
EAPI="5"
|
|
|
|
|
|
|
|
USE_RUBY="ruby19 ruby20 ruby21"
|
|
|
|
|
|
|
|
RUBY_FAKEGEM_TASK_DOC=""
|
|
|
|
|
|
|
|
inherit ruby-ng
|
|
|
|
|
|
|
|
MY_P=${P/-bindings}
|
|
|
|
|
2014-08-06 16:54:19 +04:00
|
|
|
DESCRIPTION="Ruby bindings for rrdtool"
|
2014-07-20 11:56:16 +04:00
|
|
|
HOMEPAGE="http://oss.oetiker.ch/rrdtool/"
|
|
|
|
SRC_URI="http://oss.oetiker.ch/rrdtool/pub/${MY_P}.tar.gz"
|
|
|
|
RUBY_S="$MY_P"/bindings/ruby
|
|
|
|
|
|
|
|
LICENSE="GPL-2"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos ~x86-solaris"
|
2014-10-04 22:28:41 +04:00
|
|
|
IUSE="graph test"
|
|
|
|
REQUIRED_USE="test? ( graph )"
|
2014-07-20 11:56:16 +04:00
|
|
|
|
|
|
|
# Block on older versions of rrdtool that install the bindings themselves.
|
2015-04-03 10:29:15 +03:00
|
|
|
# requires rrd_xport which requires rrd_graph
|
2014-10-04 22:28:41 +04:00
|
|
|
RDEPEND="
|
|
|
|
~net-analyzer/rrdtool-${PV}[graph=]
|
|
|
|
"
|
|
|
|
DEPEND="
|
|
|
|
test? ( ~net-analyzer/rrdtool-${PV}[graph] )
|
|
|
|
"
|
|
|
|
|
|
|
|
RUBY_PATCHES=(
|
|
|
|
"${FILESDIR}"/${P}-graph-ruby.patch
|
|
|
|
)
|
2014-07-20 11:56:16 +04:00
|
|
|
|
|
|
|
each_ruby_configure() {
|
2014-10-04 22:28:41 +04:00
|
|
|
${RUBY} extconf.rb \
|
|
|
|
--with-cflags="${CFLAGS} $(usex graph -DHAVE_RRD_GRAPH '')" || die
|
2014-07-20 11:56:16 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
each_ruby_compile() {
|
|
|
|
emake V=1
|
|
|
|
}
|
|
|
|
|
|
|
|
each_ruby_test() {
|
|
|
|
${RUBY} -I. test.rb || die
|
|
|
|
}
|
|
|
|
|
|
|
|
all_ruby_install() {
|
|
|
|
dodoc CHANGES README
|
|
|
|
}
|
|
|
|
|
|
|
|
each_ruby_install() {
|
|
|
|
DESTDIR=${D} emake install
|
|
|
|
}
|